@infinityfx/lively 2.1.3 → 2.1.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.
@@ -0,0 +1 @@
1
+ "use strict";var e=require("@babel/runtime/helpers/asyncToGenerator"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),s=require("@babel/runtime/regenerator"),l=require("react"),u=require("./animation-42f8a59c.js"),c=require("./link-66cfde2c.js"),h=require("./events-5dde14ba.js");function f(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var p=f(e),y=f(t),d=f(r),v=f(n),m=f(i),g=f(a),b=f(o),w=f(s);function k(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return O(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return O(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var j=function(){function e(){y.default(this,e),this.t=Date.now(),this.managers=[],this.step()}return d.default(e,[{key:"step",value:function(){var e,t=Date.now(),r=k(this.managers);try{for(r.s();!(e=r.n()).done;){e.value.step((t-this.t)/1e3)}}catch(e){r.e(e)}finally{r.f()}this.t=t,requestAnimationFrame(this.step.bind(this))}},{key:"add",value:function(e){var t=Math.max(this.managers.findIndex((function(t){return t.priority>=e.priority})),0);this.managers.splice(t,0,e)}},{key:"remove",value:function(e){this.managers.splice(this.managers.indexOf(e),1)}}],[{key:"get",value:function(){return window.Lively||(window.Lively=new e),window.Lively}}]),e}();function A(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return x(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var S=function(){function e(t,r,n){y.default(this,e),this.element=t,this.tracks=[],this.queue=[],this.playing=!0,this.culling=r,this.layout=n,this.transforms=["translate","scale","skew","rotate"]}return d.default(e,[{key:"purge",value:function(){if(!("cache"in this.element)){this.element.cache={strokeDasharray:1,borderRadius:c.getProperty(this.element,"borderRadius"),webkitBackfaceVisibility:"hidden"};for(var e=0;e<this.element.style.length;e++){var t=this.element.style[e];this.element.cache[t]=this.element.style[t]}}for(var r in this.element.style={},this.element.cache)this.element.style[r]=this.element.cache[r];this.channel=null}},{key:"clear",value:function(){this.tracks=[],this.queue=[]}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.immediate,n=void 0!==r&&r,i=t.composite,a=void 0===i||i;n&&this.clear(),a||!this.tracks.length?this.tracks.push(e):this.queue.push(e)}},{key:"remove",value:function(e){this.tracks.splice(this.tracks.indexOf(e),1),!this.tracks.length&&this.queue.length&&this.tracks.push(this.queue.shift())}},{key:"step",value:function(e){if(this.playing){for(var t=this.element.correction?{scale:c.DEFAULT_OBJECTS.scale}:{},r=this.tracks.length+ +!this.channel.isEmpty,n=0;n<r;n++){var i=this.tracks[n]||this.channel;c.mergeProperties(t,i.get(this.element,this.culling)),i.step(e)&&this.remove(i)}this.apply(this.element,t)}}},{key:"apply",value:function(e,t){if(!c.isEmpty(t)){var r=[];for(var n in t){var i=t[n];if("scale"==n){if(this.layout){var a,o={x:[1/i.x[0],i.x[1]],y:[1/i.y[0],i.y[1]]},s=A(e.children);try{for(s.s();!(a=s.n()).done;){a.value.correction=o}}catch(e){s.e(e)}finally{s.f()}var l=t.borderRadius||e.cache.borderRadius;delete t.borderRadius,e.style.borderRadius="".concat(l[0]/i.x[0]).concat(l[1]," / ").concat(l[0]/i.y[0]).concat(l[1])}e.correction&&(i=c.merge(i,e.correction,c.MERGE_FUNCTIONS.scale))}var u=this.transforms.indexOf(n);u>=0?r[u]="".concat(n,"(").concat(c.isObj(i)?c.objToStr(i,", ",["x","y"]):c.arrToStyle(i),")"):(n=c.Aliases[n]||n,c.isColor(i)?e.style[n]="rgba(".concat(i.r[0],", ").concat(i.g[0],", ").concat(i.b[0],", ").concat(i.a[0],")"):e.style[n]=n in c.Aliases?c.Aliases[n](i):c.arrToStyle(i))}(r=r.filter((function(e){return!!e}))).length&&(e.style.transform=r.join(" "))}}},{key:"initialize",value:function(e,t){this.channel&&!t||(this.apply(this.element,e.initials),this.channel=e.channel)}}]),e}();function E(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function P(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?E(Object(r),!0).forEach((function(t){b.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function D(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return q(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return q(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function q(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var M=function(){function e(t){var r=t.priority,n=void 0===r?0:r,i=t.stagger,a=void 0===i?.1:i,o=t.culling,s=void 0===o||o,l=t.noDeform,u=void 0!==l&&l,c=t.paused,h=void 0!==c&&c;y.default(this,e),this.targets=[],this.priority=n,this.stagger=a,this.culling=s,this.noDeform=u,this.paused=h}return d.default(e,[{key:"register",value:function(){j.get().add(this)}},{key:"destroy",value:function(){this.targets=[],j.get().remove(this)}},{key:"purge",value:function(){var e,t=D(this.targets);try{for(t.s();!(e=t.n()).done;){e.value.purge()}}catch(e){t.e(e)}finally{t.f()}}},{key:"clear",value:function(){var e,t=D(this.targets);try{for(t.s();!(e=t.n()).done;){e.value.clear()}}catch(e){t.e(e)}finally{t.f()}}},{key:"set",value:function(e){for(var t=0;t<e.length;t++)this.targets[t]?this.targets[t].element=e[t]:this.targets[t]=new S(e[t],this.culling,this.noDeform);this.targets.length=e.length}},{key:"play",value:function(e,t){if(!e.isEmpty)for(var r=0;r<this.targets.length;r++){var n=P(P({},t),{},{delay:(t.delay||0)+r*this.stagger});r<this.targets.length-1&&(n.callback=null),this.targets[r].add(e.play(n),t)}}},{key:"initialize",value:function(e,t){var r,n=D(this.targets);try{for(n.s();!(r=n.n()).done;){r.value.initialize(e,t)}}catch(e){n.e(e)}finally{n.f()}}},{key:"step",value:function(e){if(!this.paused){var t,r=D(this.targets);try{for(r.s();!(t=r.n()).done;){t.value.step(e)}}catch(e){r.e(e)}finally{r.f()}}}}]),e}();function I(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function C(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?I(Object(r),!0).forEach((function(t){b.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):I(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function L(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return V(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return V(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function V(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g.default(e);if(t){var i=g.default(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return m.default(this,r)}}var B=function(e){v.default(n,e);var t,r=R(n);function n(e){var t;for(var i in y.default(this,n),(t=r.call(this,e)).animations={default:t.parse(t.props.animate||{})},t.props.animations||{})t.animations[i]=t.parse(t.props.animations[i]);return t.mounted=new Promise((function(e){return t.mount=e})),t.children=[],t.elements=[],t.stagger=c.isNul(t.props.stagger)?.1:t.props.stagger,t.cascade=c.isNul(t.props.cascade)?1:t.props.cascade,t.manager=new M({priority:t.props.group,stagger:t.stagger,culling:t.props.lazy,noDeform:t.props.noDeform,paused:t.props.paused}),t}return d.default(n,[{key:"parse",value:function(e){return u.Animation.isInstance(e)?e.use():c.isObj(e)?new u.Clip(e,this.props.initial):null}},{key:"update",value:(t=p.default(w.default.mark((function e(){var t,r,n,i,a=arguments;return w.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=!(a.length>0&&void 0!==a[0])||a[0],this.manager.set(this.elements),t&&(this.manager.clear(),this.manager.purge()),this.manager.initialize(this.animations.default),t){e.next=25;break}r=L(this.children),e.prev=6,r.s();case 8:if((n=r.n()).done){e.next=17;break}if((i=n.value).rendered){e.next=15;break}return e.next=13,i.mounted;case 13:i.play(i.props.onMount,void 0,!0),i.onScroll();case 15:e.next=8;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(6),r.e(e.t0);case 22:return e.prev=22,r.f(),e.finish(22);case 25:case"end":return e.stop()}}),e,this,[[6,19,22,25]])}))),function(){return t.apply(this,arguments)})},{key:"componentDidMount",value:function(){var e=this;this.scrollEventListener=c.throttle(this.onScroll.bind(this)),h.addEventListener("scroll",this.scrollEventListener),this.eventListener=this.onEvent.bind(this),h.onAny(n.events,this.elements,this.eventListener),this.update(),this.manager.register(),this.rendered=0,document.fonts.ready.then((function(){e.update(),e.inViewport=!1,e.mount(),e.props.group||(e.play(e.props.onMount),e.onScroll())}))}},{key:"componentWillUnmount",value:function(){h.removeEventListener("scroll",this.scrollEventListener),h.offAny(n.events,this.elements,this.eventListener),this.manager.destroy()}},{key:"componentDidUpdate",value:function(){this.manager.paused=this.props.paused,this.update(!1)}},{key:"dispatch",value:function(e){c.isFunc(this.props[e])&&this.props[e]()}},{key:"onEvent",value:function(e){switch(e.type){case"click":this.play(this.props.onClick);break;case"mouseenter":this.hover||(this.hover=!0,this.play(this.props.whileHover));break;case"mouseleave":this.hover&&(this.hover=!1,this.play(this.props.whileHover,{reverse:!0}));break;case"focus":this.focus||(this.focus=!0,this.play(this.props.whileFocus));break;case"blur":this.focus&&(this.focus=!1,this.play(this.props.whileFocus,{reverse:!0}))}}},{key:"getBoundingBox",value:function(){var e,t={x:Number.MAX_VALUE,y:Number.MAX_VALUE,right:0,bottom:0},r=L(this.elements.length?this.elements:this.children);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=this.elements.length?n.getBoundingClientRect():n.getBoundingBox();t.y=Math.min(i.y,t.y),t.x=Math.min(i.x,t.x),t.right=Math.max(i.right,t.right),t.bottom=Math.max(i.bottom,t.bottom)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"onScroll",value:function(){if(this.props.whileViewport){var e=c.inViewport(this.getBoundingBox(),this.props.viewportMargin),t=e.entered,r=e.left;t&&!this.inViewport&&(this.inViewport=!0,this.play(this.props.whileViewport),this.dispatch("onEnterViewport")),r&&this.inViewport&&(this.inViewport=!1,this.play(this.props.whileViewport,{reverse:!0,immediate:!0}),this.dispatch("onLeaveViewport"))}}},{key:"play",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.reverse,i=void 0!==n&&n,a=r.composite,o=void 0!==a&&a,s=r.immediate,l=void 0!==s&&s,u=r.delay,h=void 0===u?0:u,f=r.callback,p=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!(!e||this.props.disabled||this.props.group>0&&!p)){c.isStr(e)||(e="default"),this.dispatch("onAnimationStart");var y=this.animations[e],d=y.length()*this.cascade,v=f;this.props.group||(f=function(){t.dispatch("onAnimationEnd"),c.isFunc(v)&&v()});for(var m=0,g=0;g<this.children.length;g++)m=Math.max(m,this.children[g].play(e,{reverse:i,immediate:l,delay:h+d+this.stagger*g,callback:f},!0));return i&&!this.props.group||!i&&!this.children.length||(f=null),this.manager.play(y,{reverse:i,composite:o,immediate:l,delay:i?m:h,callback:f}),d+(i?m:h)}}},{key:"stop",value:function(){this.manager.clear()}},{key:"prerender",value:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return l.Children.map(e,(function(e){if(!l.isValidElement(e))return e;var a={pathLength:1};if(r){var o=t.elements.length++;a.ref=function(e){e&&(t.elements[o]=e)}}var s=n.isInstance(e)&&i&&!e.props.stopPropagation;return s&&(a.index=t.children.length++,a.group=t.props.group+1,a.ref=function(e){e&&(t.children[a.index]=e)},a.paused=t.props.paused,t.props.group||(a.active=t.props.active),c.mergeObjects(a,C(C({},t.props),e.props),t.constructor.cascadingProps)),l.cloneElement(e,a,t.prerender(e.props.children,!1,!s))}))}},{key:"render",value:function(){return this.rendered++,this.elements.length=this.children.length=0,this.prerender(this.props.children)}}],[{key:"isInstance",value:function(e){return e.type===n||e.type.prototype instanceof n}}]),n}(l.Component);b.default(B,"events",["click","mouseenter","mouseleave","focus","blur"]),b.default(B,"cascadingProps",["animate","initial","animations","stagger","cascade"]),b.default(B,"defaultProps",{group:0,viewportMargin:.75,lazy:!0,paused:!1}),exports.Animatable=B;
@@ -0,0 +1 @@
1
+ "use strict";var t=require("@babel/runtime/helpers/slicedToArray"),e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),n=require("@babel/runtime/helpers/classCallCheck"),i=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),u=require("@babel/runtime/helpers/getPrototypeOf"),s=require("./link-66cfde2c.js");function l(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=l(t),f=l(e),h=l(r),p=l(n),v=l(i),d=l(a),y=l(o),m=l(u);function b(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var O=function t(e,r,n,i){if(s.isObj(e)){var a={};for(var o in e)a[o]=t(e[o],r[o],n,i);return a}return[i(e[0],r[0],n),e[1]]},w=function(t,e,r){return s.isNum(t)&&s.isNum(e)?t*(1-r)+e*r:r>.5?e:t},j={constant:function(t){return t},linear:w,ease:function(t,e,r){return w(t,e,(1-Math.cos(r*Math.PI))/2)},spring:function(t,e,r){return r=1-1*Math.exp(-3.6*r)*Math.cos(2.5*Math.pow(r,2)*Math.PI),w(t,e,r)}},k=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.reverse,i=void 0!==n&&n,a=r.repeat,o=void 0===a?1:a,u=r.delay,s=void 0===u?0:u,l=r.alternate,c=void 0!==l&&l,f=r.callback;p.default(this,t),this.indices={},this.clip=e,this.t=0,this.T=e.duration*o+s,this.reverse=i,this.delay=s,this.alternate=c,this.callback=f}return v.default(t,[{key:"normalize",value:function(t,e,r){return s.isNul(t)&&(t=s.getProperty(r,e)),s.Units.toBase(t,e,r)}},{key:"getInterpolatedValue",value:function(t,e,r,n,i){if(s.isFunc(e))return s.Units.toBase(s.convert(e(r,this.clip.duration),t),t,n);var a,o=this.reverse?-1:1,u=this.indices[t],l=e[u+o],c=s.isNul(u);if((c||(this.reverse?e[u].time<r:e[u].time>r))&&(this.indices[t]=u=this.reverse?e.length-1:0,a=c?this.reverse?e[u].end:e[u].start:this.reverse?l.start:l.end),l=e[u+o],(this.reverse?l.time>r:l.time<r)&&(a=this.reverse?l.end||e[u].start:l.start||e[u].end,this.indices[t]=u+=o,l=e[u+o]),i&&(a=this.reverse?l.start:l.end),a)return this.normalize(a,t,n);var f=this.normalize(e[u].set,t,n),h=this.normalize(l.set,t,n),p=j[l.interpolate||this.clip.interpolate]||j.ease;return O(f,h,(r-e[u].time)/(l.time-e[u].time),p)}},{key:"get",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r={},n=this.t>=this.T,i=this.t-this.delay,a=this.clip.duration;if(i<0||e&&!n&&!s.isVisible(t))return r;var o=this.alternate&&Math.floor(i/a)%2==+!n;for(var u in i=n?a:i%a,i=s.xor(this.reverse,o)?a-i:i,r.origin=this.clip.origin,this.clip.properties)r[u]=this.getInterpolatedValue(u,this.clip.properties[u],i,t,n);return r}},{key:"step",value:function(t){var e=this.t>=this.T;return this.t+=t,e&&s.isFunc(this.callback)&&this.callback(),e}}]),t}();function P(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m.default(t);if(e){var i=m.default(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y.default(this,r)}}var S=function(t){d.default(r,t);var e=P(r);function r(t){var n;return p.default(this,r),(n=e.call(this,{duration:1/0,properties:{},origin:{x:.5,y:.5},interpolate:t})).isEmpty=!0,n.cache={},n}return v.default(r,[{key:"add",value:function(t,e){this.clip.properties[t]=e,this.isEmpty=!1}},{key:"getInterpolatedValue",value:function(t,e,r,n){s.isNul(e.internal.t)&&(e.internal.t=r),e.internal.t===r&&(this.cache[t]={});var i=e.internal.duration?Math.min((r-e.internal.t)/e.internal.duration,1):1,a=this.cache[t]||{};if(a.t===i)return a.value;var o=s.Units.toBase(s.convert(e(),t),t,n),u=a.from;if(1!=i){u||(u=s.Units.toBase(s.getProperty(n,t),t,n));var l=j[this.clip.interpolate]||j.linear;o=O(u,o,i,l)}return this.cache[t]={value:o,from:1!=i?u:null,t:i},o}}]),r}(k),I=["duration","delay","repeat","alternate","interpolate","origin"];function x(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return A(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function z(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?q(Object(r),!0).forEach((function(e){f.default(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var M=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.duration,n=void 0===r?1:r,i=e.delay,a=e.repeat,o=e.alternate,u=e.interpolate,l=e.origin,f=void 0===l?{x:.5,y:.5}:l,v=h.default(e,I),d=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p.default(this,t),this.duration=n,this.origin=s.originToStr(f),this.channel=new S(u);var y=this.parse(v,d),m=c.default(y,2);this.properties=m[0],this.initials=m[1],this.isEmpty=s.isEmpty(this.properties),this.interpolate=u,this.defaults={delay:i,repeat:a,alternate:o}}return v.default(t,[{key:"length",value:function(){return this.duration*(this.defaults.repeat||1)+(this.defaults.delay||0)}},{key:"parse",value:function(t,e){var r=this,n=function(n){var i=t[n];if(s.Link.isInstance(i))return r.channel.add(n,i),delete t[n],"continue";if(s.isFunc(i))return"continue";(i=s.isArr(i)?i:[i]).length<2?i.unshift(n in e?e[n]:null):s.isNul(i[0])||(e[n]=i[0]);for(var a=i.map((function(t){return r.sanitize(t,n)})),o=0;o<a.length;o++)r.quantize(a,o);t[n]=a};for(var i in t)n(i);for(var a in e=z({},e)){var o=this.sanitize(e[a],a);e[a]=o.start||o.set}return[t,e]}},{key:"sanitize",value:function(t,e){t=s.isObj(t)?z({},t):{set:t},s.hasSomeKey(t,s.POSITIONS)||(t={set:t}),"set"in t||(t.set=t.start||t.end),"time"in t&&t.time>this.duration&&delete t.time;var r,n=x(s.POSITIONS);try{for(n.s();!(r=n.n()).done;){var i=r.value;i in t&&(t[i]=s.convert(t[i],e))}}catch(t){n.e(t)}finally{n.f()}return t}},{key:"quantize",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e-1;if("time"in t[e])return t[e].time;if(0==e||e==t.length-1)return t[e].time=0==e?0:this.duration;var n=this.quantize(t,r,r);return t[e].time=n+(this.quantize(t,e+1,r)-n)*((e-r)/(e-r+1))}},{key:"play",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new k(this,s.mergeObjects(t,this.defaults))}}]),t}(),T={create:function(t){var e=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.use=t.use.bind(t,e),t};return e.use=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t(e),n=c.default(r,2),i=n[0],a=n[1];return new M(i,a)},e},isInstance:function(t){return s.isFunc(t)&&s.isFunc(t.use)}};exports.Animation=T,exports.Clip=M,exports.computeMorph=function(t,e,r){var n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a={duration:i},o={},u=b(r);try{for(u.s();!(n=u.n()).done;){var s=n.value;"scale"==s?(a.scale={x:1,y:1},o.scale={x:1+(e.layout.width-t.layout.width)/t.layout.width,y:1+(e.layout.height-t.layout.height)/t.layout.height}):"translate"==s?(a.translate={x:0,y:0},o.translate={x:(e.layout.x-t.layout.x)*t.layout.parentWidth,y:(e.layout.y-t.layout.y)*t.layout.parentHeight}):(a[s]=t[s],o[s]=e[s])}}catch(t){u.e(t)}finally{u.f()}return new M(a,o)};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./animation-6471b73e.js"),r=require("@babel/runtime/helpers/defineProperty"),t=require("./pop-d67b1795.js"),n=require("@babel/runtime/helpers/objectWithoutProperties");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./link-8b6abc45.js"),require("@babel/runtime/helpers/typeof");var i=o(r),c=o(n);function u(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?u(Object(t),!0).forEach((function(r){i.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var p=e.Animation.create((function(e){return[a({opacity:1,duration:.65},e),{opacity:0}]})),s=["direction"];function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?b(Object(t),!0).forEach((function(r){i.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var f=e.Animation.create((function(e){var r=e.direction,t=void 0===r?"right":r,n=c.default(e,s),o=0,i=1,u={x:0,y:.5};switch(t){case"left":u.x=1;break;case"up":o=1,i=0,u={x:0,y:1};break;case"down":o=1,i=0,u={x:0,y:0}}return[l({scale:{x:1},origin:u,duration:.6},n),{scale:{x:o,y:i}}]})),O=["direction"];function y(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function j(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?y(Object(t),!0).forEach((function(r){i.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var d=e.Animation.create((function(e){var r=e.direction,t=void 0===r?"right":r,n=c.default(e,O);return["left","right","top","bottom"].includes(t)||(t="right"),[j({clip:i.default({},t,0)},n),{clip:i.default({},t,1)}]}));exports.Animation=e.Animation,exports.Move=t.Move,exports.Pop=t.Pop,exports.Fade=p,exports.Scale=f,exports.Wipe=d;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./animation-42f8a59c.js"),r=require("@babel/runtime/helpers/defineProperty"),t=require("./pop-b6e5c61a.js"),n=require("@babel/runtime/helpers/objectWithoutProperties");function o(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/classCallCheck"),require("@babel/runtime/helpers/createClass"),require("@babel/runtime/helpers/inherits"),require("@babel/runtime/helpers/possibleConstructorReturn"),require("@babel/runtime/helpers/getPrototypeOf"),require("./link-66cfde2c.js"),require("@babel/runtime/helpers/typeof");var i=o(r),c=o(n);function u(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function a(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?u(Object(t),!0).forEach((function(r){i.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):u(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var p=e.Animation.create((function(e){return[a({opacity:1,duration:.65},e),{opacity:0}]})),s=["direction"];function b(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function l(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?b(Object(t),!0).forEach((function(r){i.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):b(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var f=e.Animation.create((function(e){var r=e.direction,t=void 0===r?"right":r,n=c.default(e,s),o=0,i=1,u={x:0,y:.5};switch(t){case"left":u.x=1;break;case"up":o=1,i=0,u={x:0,y:1};break;case"down":o=1,i=0,u={x:0,y:0}}return[l({scale:{x:1},origin:u,duration:.6},n),{scale:{x:o,y:i}}]})),O=["direction"];function y(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,n)}return t}function j(e){for(var r=1;r<arguments.length;r++){var t=null!=arguments[r]?arguments[r]:{};r%2?y(Object(t),!0).forEach((function(r){i.default(e,r,t[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):y(Object(t)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(t,r))}))}return e}var d=e.Animation.create((function(e){var r=e.direction,t=void 0===r?"right":r,n=c.default(e,O);return["left","right","top","bottom"].includes(t)||(t="right"),[j({clip:i.default({},t,0)},n),{clip:i.default({},t,1)}]}));exports.Animation=e.Animation,exports.Move=t.Move,exports.Pop=t.Pop,exports.Fade=p,exports.Scale=f,exports.Wipe=d;
package/dist/cjs/auto.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/get"),n=require("@babel/runtime/helpers/inherits"),i=require("@babel/runtime/helpers/possibleConstructorReturn"),a=require("@babel/runtime/helpers/getPrototypeOf"),o=require("@babel/runtime/helpers/defineProperty"),u=require("./animatable-68f722e8.js"),l=require("react"),s=require("./link-8b6abc45.js"),c=require("./animation-6471b73e.js"),p=require("@babel/runtime/helpers/toConsumableArray"),f=require("./scroll-7da583bf.js");function d(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./events-5eb50ffa.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/slicedToArray"),require("@babel/runtime/helpers/objectWithoutProperties");var h=d(e),y=d(t),m=d(r),v=d(n),b=d(i),g=d(a),O=d(o),P=d(l),j=d(p);function w(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function E(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?w(Object(r),!0).forEach((function(t){O.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):w(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function A(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return x(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g.default(e);if(t){var i=g.default(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b.default(this,r)}}var S={},k=function(e){v.default(r,e);var t=R(r);function r(e){var n;return h.default(this,r),(n=t.call(this,e)).animations={default:new c.Clip({},{opacity:+e.active,pointerEvents:e.active?"":"none"}),unmorph:new c.Clip({},{opacity:0,pointerEvents:"none"})},n.properties=s.subArray(n.props.include,n.props.exclude),n.uuid=(e.id||0).toString()+(e.index||0)+e.group,n}return y.default(r,[{key:"shouldComponentUpdate",value:function(e){return this.props.active!==e.active&&(this.uuid in S?S[this.uuid].push(this):S[this.uuid]=[this]),this.props.active!==e.active}},{key:"getSnapshotBeforeUpdate",value:function(e){if(this.props.active!==e.active&&this.props.active){var t,r=A(S[this.uuid]);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n!==this)return s.getSnapshot(n.elements[0],this.props.group)}}catch(e){r.e(e)}finally{r.f()}}return null}},{key:"componentDidUpdate",value:function(e,t,n){if(m.default(g.default(r.prototype),"componentDidUpdate",this).call(this),S[this.uuid]=[],n){var i=s.getSnapshot(this.elements[0],this.props.group);i.opacity=1,i.pointerEvents="",this.manager.play(c.computeMorph(i,n,this.properties,this.props.duration),{composite:!0})}else this.manager.initialize(this.animations.unmorph)}},{key:"render",value:function(){var e=this.props.children;if(s.isArr(e)){if(e.length>1)return e;e=e[0]}return l.isValidElement(e)?m.default(g.default(r.prototype),"render",this).call(this):e}}]),r}(u.Animatable);function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=g.default(e);if(t){var i=g.default(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return b.default(this,r)}}O.default(k,"cascadingProps",["id","duration"]),O.default(k,"defaultProps",E(E({},u.Animatable.defaultProps),{},{cascade:0,active:!1,include:s.MORPH_PROPERTIES,exclude:[]}));var C=function(e){v.default(r,e);var t=q(r);function r(e){var n;return h.default(this,r),(n=t.call(this,e)).children=[],n.properties=s.subArray(n.props.include,n.props.exclude),n}return y.default(r,[{key:"getSnapshotBeforeUpdate",value:function(){return this.children.map((function(e){var t=null==e?void 0:e.elements[0];return t?{data:s.getSnapshot(t),key:e.props.layoutKey}:null}))}},{key:"componentDidUpdate",value:function(e,t,r){for(var n=0,i=0;n<r.length;n++,i++){var a=this.children[i];if(a&&a.elements[0]){var o=r[n];if(o&&a.props.layoutKey===o.key){var u=s.getSnapshot(a.elements[0]);a.manager.play(c.computeMorph(u,o.data,this.properties,this.props.duration),{composite:!0})}else i--}}}},{key:"render",value:function(){var e=this;return this.childIndex=0,l.Children.map(this.props.children,(function(t){if(!l.isValidElement(t)||!u.Animatable.isInstance(t))return t;var r=e.childIndex++;return l.cloneElement(t,{ref:function(t){return e.children[r]=t},layoutKey:t.key})}))}}]),r}(l.Component);function I(e){var t=e.children,r=e.className,n=e.style,i=e.duration;if(!s.isStr(t))return t;var a=t.split("");return P.default.createElement("div",{className:r,style:n},P.default.createElement(u.Animatable,{whileViewport:!0,animate:{opacity:1,translate:{y:0},rotate:0,duration:.8},initial:{opacity:0,translate:{y:"100%"},rotate:10},stagger:(i-.8)/(a.length-1)},a.map((function(e,t){return P.default.createElement("span",{style:{display:"inline-block"},key:t},/\s/.test(e)?" ":e)}))))}function M(e){var t,r=e.children,n=e.color,i=e.duration,a=(null===(t=r.props)||void 0===t?void 0:t.children)||[];Array.isArray(a)||(a=[a]);var o=[P.default.createElement(u.Animatable,{key:0,initial:{clip:{right:0}},animate:{clip:{left:1},duration:i/2}},P.default.createElement("div",{style:{position:"absolute",inset:0,backgroundColor:n}}))].concat(j.default(a));return P.default.createElement(u.Animatable,{whileViewport:!0,animate:{clip:{right:0},duration:i/2},initial:{clip:{right:1}}},l.cloneElement(r,{},o))}function B(e){var t,r=e.children,n=e.amount,i=f.useScroll(),a=l.useRef();return P.default.createElement(u.Animatable,{ref:a,animate:{translate:i((function(e){if(void 0===t){var r,i=null===(r=a.current)||void 0===r?void 0:r.elements[0];i&&(t=Math.max(i.getBoundingClientRect().y+window.scrollY-window.innerHeight/2,0))}return{x:0,y:(e-(t||0))*n}}))}},r)}O.default(C,"defaultProps",{include:s.MORPH_PROPERTIES,exclude:[]}),I.defaultProps={style:{},className:"",duration:1.6},M.defaultProps={color:"grey",duration:1.6},B.defaultProps={amount:.5},exports.ColorWipe=M,exports.LayoutGroup=C,exports.Morph=k,exports.Parallax=B,exports.WriteOn=I;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),t=require("@babel/runtime/helpers/classCallCheck"),r=require("@babel/runtime/helpers/createClass"),n=require("@babel/runtime/helpers/get"),i=require("@babel/runtime/helpers/inherits"),a=require("@babel/runtime/helpers/possibleConstructorReturn"),o=require("@babel/runtime/helpers/getPrototypeOf"),u=require("@babel/runtime/helpers/defineProperty"),l=require("./animatable-6ef62899.js"),s=require("react"),c=require("./link-66cfde2c.js"),p=require("./animation-42f8a59c.js"),f=require("@babel/runtime/helpers/toConsumableArray"),d=require("./scroll-9bb98808.js");function h(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("./events-5dde14ba.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/objectWithoutProperties");var y=h(e),m=h(t),v=h(r),b=h(n),g=h(i),O=h(a),P=h(o),j=h(u),w=h(s),E=h(f);function A(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function q(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?A(Object(r),!0).forEach((function(t){j.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):A(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function x(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return R(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return R(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){u=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}function R(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=P.default(e);if(t){var i=P.default(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return O.default(this,r)}}var S={},C=function(e){g.default(r,e);var t=k(r);function r(e){var n;return m.default(this,r),(n=t.call(this,e)).animations={default:new p.Clip({},{opacity:+e.active,pointerEvents:e.active?"":"none"}),unmorph:new p.Clip({},{opacity:0,pointerEvents:"none"})},n.properties=c.subArray(n.props.include,n.props.exclude),n.uuid=(e.id||0).toString()+(e.index||0)+e.group,n}return v.default(r,[{key:"shouldComponentUpdate",value:function(e){if(this.props.active!==e.active){var t=[this,this.elements[0]];this.uuid in S?S[this.uuid].push(t):S[this.uuid]=[t]}return this.props.active!==e.active}},{key:"getSnapshotBeforeUpdate",value:function(e){if(this.props.active!==e.active&&this.props.active){var t,r=x(S[this.uuid]);try{for(r.s();!(t=r.n()).done;){var n=y.default(t.value,2),i=n[0],a=n[1];if(i!==this)return c.getSnapshot(a,this.props.group)}}catch(e){r.e(e)}finally{r.f()}}return null}},{key:"componentDidUpdate",value:function(e,t,n){if(b.default(P.default(r.prototype),"componentDidUpdate",this).call(this),S[this.uuid]=[],!n)return this.manager.clear(),void this.manager.initialize(this.animations.unmorph,!0);var i=c.getSnapshot(this.elements[0],this.props.group);i.opacity=1,i.pointerEvents="",this.manager.play(p.computeMorph(i,n,this.properties,this.props.duration),{composite:!0})}},{key:"render",value:function(){var e=this.props.children;if(c.isArr(e)){if(e.length>1)return e;e=e[0]}return s.isValidElement(e)?b.default(P.default(r.prototype),"render",this).call(this):e}}]),r}(l.Animatable);function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=P.default(e);if(t){var i=P.default(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return O.default(this,r)}}j.default(C,"cascadingProps",["id","duration"]),j.default(C,"defaultProps",q(q({},l.Animatable.defaultProps),{},{cascade:0,active:!1,include:c.MORPH_PROPERTIES,exclude:[]}));var M=function(e){g.default(r,e);var t=I(r);function r(e){var n;return m.default(this,r),(n=t.call(this,e)).children=[],n.properties=c.subArray(n.props.include,n.props.exclude),n}return v.default(r,[{key:"shouldComponentUpdate",value:function(){return this.snapshots=this.children.map((function(e){var t=null==e?void 0:e.elements[0];return t?{snapshot:c.getSnapshot(t),key:e.props.layoutKey}:{}})),!0}},{key:"componentDidUpdate",value:function(){for(var e=0,t=0;e<this.snapshots.length;e++,t++){var r=this.children[t];null!=r&&r.elements[0]&&(r.props.layoutKey===this.snapshots[e].key?r.manager.play(p.computeMorph(c.getSnapshot(r.elements[0]),this.snapshots[e].snapshot,this.properties,this.props.duration),{composite:!0}):t--)}}},{key:"render",value:function(){var e=this;return this.childIndex=0,s.Children.map(this.props.children,(function(t){if(!s.isValidElement(t)||!l.Animatable.isInstance(t))return t;var r=e.childIndex++;return s.cloneElement(t,{ref:function(t){return e.children[r]=t},layoutKey:t.key})}))}}]),r}(s.Component);function D(e){var t=e.children,r=e.className,n=e.style,i=e.duration;if(!c.isStr(t))return t;var a=t.split("");return w.default.createElement("div",{className:r,style:n},w.default.createElement(l.Animatable,{whileViewport:!0,animate:{opacity:1,translate:{y:0},rotate:0,duration:.8},initial:{opacity:0,translate:{y:"100%"},rotate:10},stagger:(i-.8)/(a.length-1)},a.map((function(e,t){return w.default.createElement("span",{style:{display:"inline-block"},key:t},/\s/.test(e)?" ":e)}))))}function U(e){var t,r=e.children,n=e.color,i=e.duration,a=(null===(t=r.props)||void 0===t?void 0:t.children)||[];Array.isArray(a)||(a=[a]);var o=[w.default.createElement(l.Animatable,{key:0,initial:{clip:{right:0}},animate:{clip:{left:1},duration:i/2}},w.default.createElement("div",{style:{position:"absolute",inset:0,backgroundColor:n}}))].concat(E.default(a));return w.default.createElement(l.Animatable,{whileViewport:!0,animate:{clip:{right:0},duration:i/2},initial:{clip:{right:1}}},s.cloneElement(r,{},o))}function B(e){var t,r=e.children,n=e.amount,i=d.useScroll(),a=s.useRef();return w.default.createElement(l.Animatable,{ref:a,animate:{translate:i((function(e){if(void 0===t){var r,i=null===(r=a.current)||void 0===r?void 0:r.elements[0];i&&(t=Math.max(i.getBoundingClientRect().y+window.scrollY-window.innerHeight/2,0))}return{x:0,y:(e-(t||0))*n}}))}},r)}j.default(M,"defaultProps",{include:c.MORPH_PROPERTIES,exclude:[]}),D.defaultProps={style:{},className:"",duration:1.6},U.defaultProps={color:"grey",duration:1.6},B.defaultProps={amount:.5},exports.ColorWipe=U,exports.LayoutGroup=M,exports.Morph=C,exports.Parallax=B,exports.WriteOn=D;
@@ -1 +1 @@
1
- "use strict";var n=require("./link-8b6abc45.js");function e(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return r(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var o=0,i=function(){};return{s:i,n:function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,f=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return u=n.done,n},e:function(n){f=!0,a=n},f:function(){try{u||null==t.return||t.return()}finally{if(f)throw a}}}}function r(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}var t={};exports.addEventListener=function(e,r){e in t||(t[e]={unique:0},window.addEventListener(e,(function(r){for(var o=0,i=Object.values(t[e]);o<i.length;o++){var a=i[o];n.isFunc(a)&&a(r)}})));var o=t[e];r.LivelyID=o.unique,o[o.unique++]=r},exports.offAny=function(n,r,t){var o,i=e(n);try{for(i.s();!(o=i.n()).done;){var a,u=o.value,f=e(r);try{for(f.s();!(a=f.n()).done;){a.value.removeEventListener(u,t)}}catch(n){f.e(n)}finally{f.f()}}}catch(n){i.e(n)}finally{i.f()}},exports.onAny=function(n,r,t){var o,i=e(n);try{for(i.s();!(o=i.n()).done;){var a,u=o.value,f=e(r);try{for(f.s();!(a=f.n()).done;){a.value.addEventListener(u,t)}}catch(n){f.e(n)}finally{f.f()}}}catch(n){i.e(n)}finally{i.f()}},exports.removeEventListener=function(e,r){e in t&&!n.isNul(r)&&"LivelyID"in r&&delete t[e][r.LivelyID]};
1
+ "use strict";var n=require("./link-66cfde2c.js");function e(n,e){var t="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!t){if(Array.isArray(n)||(t=function(n,e){if(!n)return;if("string"==typeof n)return r(n,e);var t=Object.prototype.toString.call(n).slice(8,-1);"Object"===t&&n.constructor&&(t=n.constructor.name);if("Map"===t||"Set"===t)return Array.from(n);if("Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return r(n,e)}(n))||e&&n&&"number"==typeof n.length){t&&(n=t);var o=0,i=function(){};return{s:i,n:function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}},e:function(n){throw n},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,f=!1;return{s:function(){t=t.call(n)},n:function(){var n=t.next();return u=n.done,n},e:function(n){f=!0,a=n},f:function(){try{u||null==t.return||t.return()}finally{if(f)throw a}}}}function r(n,e){(null==e||e>n.length)&&(e=n.length);for(var r=0,t=new Array(e);r<e;r++)t[r]=n[r];return t}var t={};exports.addEventListener=function(e,r){e in t||(t[e]={unique:0},window.addEventListener(e,(function(r){for(var o=0,i=Object.values(t[e]);o<i.length;o++){var a=i[o];n.isFunc(a)&&a(r)}})));var o=t[e];r.LivelyID=o.unique,o[o.unique++]=r},exports.offAny=function(n,r,t){var o,i=e(n);try{for(i.s();!(o=i.n()).done;){var a,u=o.value,f=e(r);try{for(f.s();!(a=f.n()).done;){a.value.removeEventListener(u,t)}}catch(n){f.e(n)}finally{f.f()}}}catch(n){i.e(n)}finally{i.f()}},exports.onAny=function(n,r,t){var o,i=e(n);try{for(i.s();!(o=i.n()).done;){var a,u=o.value,f=e(r);try{for(f.s();!(a=f.n()).done;){a.value.addEventListener(u,t)}}catch(n){f.e(n)}finally{f.f()}}}catch(n){i.e(n)}finally{i.f()}},exports.removeEventListener=function(e,r){e in t&&!n.isNul(r)&&"LivelyID"in r&&delete t[e][r.LivelyID]};
package/dist/cjs/hooks.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),r=require("react"),t=require("./scroll-7da583bf.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./events-5eb50ffa.js"),require("./link-8b6abc45.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/defineProperty");var u=n(e);exports.useLink=t.useLink,exports.useScroll=t.useScroll,exports.usePath=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=r.useRef(),u=r.useCallback((function(r,u){if(!n.current)return{x:0,y:0};var i=n.current.getTotalLength()*r/u,o=n.current.getPointAtLength(i),a=o.x,s=o.y;return{x:e[0]+a*t,y:e[1]+s*t}}),[n]);return[u,n]},exports.useReducedMotion=function(){var e=r.useState(!1),t=u.default(e,2),n=t[0],i=t[1],o=function(e){return i(e.matches)};return r.useEffect((function(){var e=matchMedia("(prefers-reduced-motion: reduce)");return e.addEventListener("change",o),i(e.matches),function(){return e.removeEventListener("change",o)}}),[]),n},exports.useUnmount=function(e){var t=r.useState(e),n=u.default(t,2),i=n[0],o=n[1],a=r.useRef();return[i,function(){var e;if(!i)return o(!0);null===(e=a.current)||void 0===e||e.play(a.current.props.onUnmount,{reverse:!0,immediate:!0,callback:function(){return o(!1)}})},a]};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("@babel/runtime/helpers/slicedToArray"),r=require("react"),t=require("./scroll-9bb98808.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./events-5dde14ba.js"),require("./link-66cfde2c.js"),require("@babel/runtime/helpers/typeof"),require("@babel/runtime/helpers/defineProperty");var u=n(e);exports.useLink=t.useLink,exports.useScroll=t.useScroll,exports.usePath=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=r.useRef(),u=r.useCallback((function(r,u){if(!n.current)return{x:0,y:0};var i=n.current.getTotalLength()*r/u,o=n.current.getPointAtLength(i),s=o.x,c=o.y;return{x:e[0]+s*t,y:e[1]+c*t}}),[n]);return[u,n]},exports.useReducedMotion=function(){var e=r.useState(!1),t=u.default(e,2),n=t[0],i=t[1],o=function(e){return i(e.matches)};return r.useEffect((function(){var e=matchMedia("(prefers-reduced-motion: reduce)");return e.addEventListener("change",o),i(e.matches),function(){return e.removeEventListener("change",o)}}),[]),n},exports.useUnmount=function(e){var t=r.useState(e),n=u.default(t,2),i=n[0],o=n[1],s=r.useRef();return[i,function(){var e;if(!i)return o(!0);null===(e=s.current)||void 0===e||e.play(s.current.props.onUnmount,{reverse:!0,immediate:!0,callback:function(){return o(!1)}})},s]};
package/dist/cjs/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./animatable-68f722e8.js"),r=require("@babel/runtime/helpers/extends"),t=require("@babel/runtime/helpers/objectWithoutProperties"),n=require("@babel/runtime/helpers/classCallCheck"),a=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/inherits"),l=require("@babel/runtime/helpers/possibleConstructorReturn"),u=require("@babel/runtime/helpers/getPrototypeOf"),s=require("@babel/runtime/helpers/defineProperty"),o=require("react"),f=require("./pop-d67b1795.js"),c=require("./link-8b6abc45.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("./animation-6471b73e.js"),require("@babel/runtime/helpers/slicedToArray"),require("./events-5eb50ffa.js"),require("@babel/runtime/helpers/typeof");var b=p(r),m=p(t),h=p(n),d=p(a),v=p(i),y=p(l),q=p(u),A=p(s),j=p(o),k=["levels","animations"];function C(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,n=q.default(e);if(r){var a=q.default(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return y.default(this,t)}}var P=function(r){v.default(n,r);var t=C(n);function n(e){var r;return h.default(this,n),(r=t.call(this,e)).levels=r.props.levels,r.animations=c.padArray(r.props.animations,r.levels),r}return d.default(n,[{key:"makeAnimatable",value:function(r){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(n<1||o.Children.count(r)<1)return r;var a=this.props;a.levels,a.animations;var i=m.default(a,k),l=this.animations[this.levels-n];return n===this.levels&&(i.ref=function(e){return t.animatable=e}),j.default.createElement(e.Animatable,b.default({},i,{animate:l}),o.Children.map(r,(function(e){return o.isValidElement(e)?o.cloneElement(e,{},t.makeAnimatable(e.props.children,n-1)):e})))}},{key:"play",value:function(){var e;null===(e=this.animatable)||void 0===e||e.play.apply(e,arguments)}},{key:"render",value:function(){return this.makeAnimatable(this.props.children,this.levels)}}]),n}(o.Component);A.default(P,"defaultProps",{levels:1,animations:[f.Move,f.Pop]}),exports.Animatable=e.Animatable,exports.Animate=P;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./animatable-6ef62899.js"),r=require("@babel/runtime/helpers/extends"),t=require("@babel/runtime/helpers/objectWithoutProperties"),n=require("@babel/runtime/helpers/classCallCheck"),a=require("@babel/runtime/helpers/createClass"),i=require("@babel/runtime/helpers/inherits"),l=require("@babel/runtime/helpers/possibleConstructorReturn"),u=require("@babel/runtime/helpers/getPrototypeOf"),s=require("@babel/runtime/helpers/defineProperty"),o=require("react"),c=require("./pop-b6e5c61a.js"),f=require("./link-66cfde2c.js");function p(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("@babel/runtime/helpers/asyncToGenerator"),require("@babel/runtime/regenerator"),require("./animation-42f8a59c.js"),require("@babel/runtime/helpers/slicedToArray"),require("./events-5dde14ba.js"),require("@babel/runtime/helpers/typeof");var b=p(r),m=p(t),h=p(n),d=p(a),v=p(i),y=p(l),q=p(u),A=p(s),j=p(o),k=["levels","animations"];function C(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,n=q.default(e);if(r){var a=q.default(this).constructor;t=Reflect.construct(n,arguments,a)}else t=n.apply(this,arguments);return y.default(this,t)}}var P=function(r){v.default(n,r);var t=C(n);function n(e){var r;return h.default(this,n),(r=t.call(this,e)).levels=r.props.levels,r.animations=f.padArray(r.props.animations,r.levels),r}return d.default(n,[{key:"makeAnimatable",value:function(r){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(n<1||o.Children.count(r)<1)return r;var a=this.props;a.levels,a.animations;var i=m.default(a,k),l=this.animations[this.levels-n];return n===this.levels&&(i.ref=function(e){return t.animatable=e}),j.default.createElement(e.Animatable,b.default({},i,{animate:l}),o.Children.map(r,(function(e){return o.isValidElement(e)?o.cloneElement(e,{},t.makeAnimatable(e.props.children,n-1)):e})))}},{key:"play",value:function(){var e;null===(e=this.animatable)||void 0===e||e.play.apply(e,arguments)}},{key:"render",value:function(){return this.makeAnimatable(this.props.children,this.levels)}}]),n}(o.Component);A.default(P,"defaultProps",{levels:1,animations:[c.Move,c.Pop]}),exports.Animatable=e.Animatable,exports.Animate=P;
@@ -0,0 +1 @@
1
+ "use strict";var t=require("@babel/runtime/helpers/typeof"),n=require("@babel/runtime/helpers/slicedToArray"),r=require("@babel/runtime/helpers/defineProperty");function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=e(t),i=e(n),u=e(r),a=["%","px","em","rem","vw","vh","vmin","vmax","deg","rad"],f={rotate:"deg",skew:"deg",scale:"%",clip:"%",opacity:null,zIndex:null,lineHeight:null,fontWeight:null,length:null,default:"px"},c=[["x","y"],["r","g","b","a"],["left","top","right","bottom"]],l={translate:{x:[0,"px"],y:[0,"px"]},scale:{x:[1,"%"],y:[1,"%"]},clip:{left:[0,"%"],top:[0,"%"],right:[0,"%"],bottom:[0,"%"]},r:[127,null],g:[127,null],b:[127,null],a:[255,null]},s=["translate","scale","rotate","opacity","borderRadius","backgroundColor","color","zIndex","pointerEvents"],p={translate:function(t,n){return t+n},rotate:function(t,n){return t+n},scale:function(t,n){return t*n},default:function(t,n){return(t+n)/2}},d=function(t){return t.parentElement.clientHeight},h={get:function(t,n){return parseFloat((h[n]||h.default)(t))},default:function(t){return t.parentElement.clientWidth},x:function(t){return t.clientWidth},y:function(t){return t.clientHeight},fontSize:function(t){return getComputeStyle(t.parentElement).fontSize},height:d,top:d,bottom:d},y={"%_px":function(t,n,r){return t*h.get(n,r)},em_px:function(t,n){return t*parseFloat(getComputedStyle(n).fontSize)},rem_px:function(t){return y.emtopx(t,document.body)},vw_px:function(t){return t*window.innerWidth},vh_px:function(t){return t*window.innerHeight},vmin_px:function(t){return t*Math.min(window.innerWidth,window.innerHeight)},vmax_px:function(t){return t*Math.max(window.innerWidth,window.innerHeight)},rad_deg:function(t){return 180*t/Math.PI}};function g(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(!t)return;if("string"==typeof t)return v(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(t,n)}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var e=0,o=function(){};return{s:o,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(a)throw i}}}}function v(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var m=function(t,n){return Object.keys(t).some((function(t){return n.includes(t)}))},b=function(t){return null==t},x=function(t){return Array.isArray(t)},w=function(t){return!b(t)&&"object"===o.default(t)&&!x(t)},O=function(t){return t instanceof Function},S=function(t){return"string"==typeof t},j=function(t){return"number"==typeof t},P=function(t){return t.match(/^rgba?\(.*\)$/i)},A=function(t){return t.match(/^#[0-9a-f]{3,8}$/i)},I=function(t){var n=new DOMMatrix(t),r=Math.sqrt(n.a*n.a+n.b*n.b)*Math.sign(n.a),e=Math.sqrt(n.c*n.c+n.d*n.d)*Math.sign(n.d),o=180*Math.atan2(n.d,n.c)/Math.PI-90,i=180*Math.atan2(n.b,n.a)/Math.PI;return{translate:{x:n.e,y:n.f},scale:{x:r,y:e},rotate:i,skew:{x:o,y:0}}},k=function t(n,r,e){return w(n)?M(n,(function(n,o){return t(n,r[o],e)})):j(n[0])&&j(r[0])?[e(n[0],r[0]),n[1]]:r},M=function(t,n){var r={};for(var e in t)r[e]=n(t[e],e);return r};function E(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function C(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?E(Object(r),!0).forEach((function(n){u.default(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):E(Object(r)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))}))}return t}function D(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(!t)return;if("string"==typeof t)return T(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return T(t,n)}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var e=0,o=function(){};return{s:o,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,u=!0,a=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){a=!0,i=t},f:function(){try{u||null==r.return||r.return()}finally{if(a)throw i}}}}function T(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var _=function t(n,r){var e,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(b(n))return null;if("scale"!==r||o||w(n)||(n={x:n,y:n}),w(n)){var u,a=Object.keys(n),f=D(c);try{for(f.s();!(u=f.n()).done;){var s=u.value;if(m(n,s)){a=s;break}}}catch(t){f.e(t)}finally{f.f()}n=C({},n);var p,d=D(a);try{for(d.s();!(p=d.n()).done;){var h=p.value,y=r in l?l[r][h]:l[h];n[h]=h in n?t(n[h],r,!0):y}}catch(t){d.e(t)}finally{d.f()}return n}if(S(n)){if(A(n))return H(n);if(P(n))return F(n);var g=W(n),v=i.default(g,2);n=v[0],"%"==(e=v[1])&&(n/=100)}return[n,e=j(n)?B.normalize(e,r):null]},H=function(t){var n=t.match(/^#([\da-f]{1,2})([\da-f]{1,2})([\da-f]{1,2})([\da-f]{2})?/i),r=i.default(n,5);r[0];var e=r[1],o=r[2],u=r[3],a=r[4],f=function(t){return[b(t)?255:parseInt(t.padStart(2,t),16),null]};return{r:f(e),g:f(o),b:f(u),a:f(a)}},F=function(t){var n=t.match(/^rgba?\((\d+)\D+(\d+)\D+(\d+)\D*(\d+)?\)/i),r=i.default(n,5);r[0];var e=r[1],o=r[2],u=r[3],a=r[4],f=function(t){return[b(t)?255:parseInt(t),null]};return{r:f(e),g:f(o),b:f(u),a:f(a)}},R=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object.keys(t);return r.map((function(n){return z(t[n])})).join(n)},W=function(t){var n=t.toString().match(/^(-?[\d.]+)([^\d.]*)$/i);return n?[parseFloat(n[1]),n[2]||null]:[t,null]},z=function(t){return("%"==t[1]?100*t[0]:t[0])+(b(t[1])?"":t[1])},B={fromProperty:function(t){return t in f?f[t]:f.default},toBase:function(t,n,r,e){if(w(t))return M(t,(function(t,e){return B.toBase(t,n,r,e)}));if(!j(t[0]))return t;var o=B.fromProperty(n);if(b(t[1])&&!b(o))return[t[0],o];var i=y["".concat(t[1],"_").concat(o)];return i?[i(t[0],r,e||n),o]:t},normalize:function(t,n){return a.includes(t)||b(t)&&n in f?t:B.fromProperty(n)}},q={origin:"transformOrigin",length:"strokeDashoffset",clip:"clipPath",transformOrigin:function(t){return"".concat(100*t.x,"% ").concat(100*t.y,"%")},strokeDashoffset:function(t){return 1-t[0]},clipPath:function(t){return"inset(".concat(R(t," ",["top","right","bottom","left"]),")")}},N={bind:function(t,n){t.origin=t.origin||t;var r=function(){for(var r,e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return(r=t.origin).call.apply(r,[n].concat(o))};return r.origin=t.origin,r},create:function(t){var n=N.bind((function(t){if(O(t)){var r=N.bind(n,{transform:t});return r.set=n.set,r.internal=n.internal,r}return this.transform(n.internal.value)}),{transform:function(t){return t}});return n.set=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;n.internal.value=t,n.internal.duration=r,n.internal.t=null},n.internal={value:t,duration:0},n},isInstance:function(t){return O(t)&&O(t.set)}},U=N;exports.Aliases=q,exports.DEFAULT_OBJECTS=l,exports.Link=U,exports.MERGE_FUNCTIONS=p,exports.MORPH_PROPERTIES=s,exports.POSITIONS=["set","start","end"],exports.Units=B,exports.arrToStyle=z,exports.convert=_,exports.getProperty=function(t,n){var r=getComputedStyle(t),e=I(r.transform);if(n in e)return _(e[n],n);if("length"===n)return[1-parseFloat(r.strokeDashoffset),null];var o=r[n];return P(o)?F(o):W(o)},exports.getSnapshot=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=getComputedStyle(t),o=t.getBoundingClientRect(),i=o.x,u=o.y,a=o.width,f=o.height,c=(r?t.parentElement:document.body).getBoundingClientRect(),l={layout:{x:i=(i-c.x+a/2)/c.width,y:u=(u-c.y+f/2)/c.height,width:a,height:f,parentWidth:c.width,parentHeight:c.height}},p=g(s);try{for(p.s();!(n=p.n()).done;){var d=n.value;l[d]=e[d]}}catch(t){p.e(t)}finally{p.f()}return Object.assign(l,I(e.transform)),l},exports.hasSomeKey=m,exports.inViewport=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t.y,e=t.bottom,o=e-r;return{left:r>window.innerHeight+o*n,entered:r+o*n<window.innerHeight}},exports.isArr=x,exports.isColor=function(t){return w(t)&&"r"in t},exports.isEmpty=function(t){return function(t,n){return Object.keys(t).length===n}(t,0)},exports.isFunc=O,exports.isNul=b,exports.isNum=j,exports.isObj=w,exports.isStr=S,exports.isVisible=function(t){var n=t.getBoundingClientRect(),r=n.x,e=n.y,o=n.right,i=n.bottom;return!(o-r<1||i-e<1)&&(e<window.innerHeight&&i>0&&r<window.innerWidth&&o>0)},exports.merge=k,exports.mergeObjects=function(t,n){var r,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object.keys(n),o=g(e);try{for(o.s();!(r=o.n()).done;){var i=r.value;b(n[i])||(t[i]=n[i])}}catch(t){o.e(t)}finally{o.f()}return t},exports.mergeProperties=function(t,n){for(var r in n){var e=p[r]||p.default;t[r]=r in t?k(t[r],n[r],e):n[r]}},exports.objToStr=R,exports.originToStr=function(t){var n=w(t)?t:{},r=n.x,e=void 0===r?.5:r,o=n.y,i=void 0===o?.5:o;if(S(t))switch(t){case"left":e=0;break;case"right":e=1;break;case"top":i=0;break;case"bottom":i=1}return{x:e,y:i}},exports.padArray=function(t,n){return new Array(n).fill(0).map((function(n,r){return r<t.length?t[r]:t[t.length-1]}))},exports.subArray=function(t,n){return t.filter((function(t){return!n.includes(t)}))},exports.throttle=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250;return function(){var r=Date.now();r-t.LivelyTimestamp<n||(t.LivelyTimestamp=r,t())}},exports.xor=function(t,n){return t&&!n||!t&&n};
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/objectWithoutProperties"),r=require("./animation-6471b73e.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e),c=n(t),i=["direction"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){o.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=r.Animation.create((function(e){var t=e.direction,r=void 0===t?"up":t,n=c.default(e,i),o="0px",a="20px";switch(r){case"down":a="-20px";break;case"left":o="20px",a="0px";break;case"right":o="-20px",a="0px"}return[p({translate:{x:0,y:0},opacity:1,duration:.5},n),{translate:{x:o,y:a},opacity:0}]}));function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){o.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=r.Animation.create((function(e){return[b({opacity:1,scale:1,duration:.25},e),{opacity:0,scale:.85}]}));exports.Move=u,exports.Pop=f;
1
+ "use strict";var e=require("@babel/runtime/helpers/defineProperty"),t=require("@babel/runtime/helpers/objectWithoutProperties"),r=require("./animation-42f8a59c.js");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var o=n(e),c=n(t),i=["direction"];function a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function p(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?a(Object(r),!0).forEach((function(t){o.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):a(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var u=r.Animation.create((function(e){var t=e.direction,r=void 0===t?"up":t,n=c.default(e,i),o="0px",a="20px";switch(r){case"down":a="-20px";break;case"left":o="20px",a="0px";break;case"right":o="-20px",a="0px"}return[p({translate:{x:0,y:0},opacity:1,duration:.5},n),{translate:{x:o,y:a},opacity:0}]}));function s(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function b(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?s(Object(r),!0).forEach((function(t){o.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):s(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}var f=r.Animation.create((function(e){return[b({opacity:1,scale:1,duration:.25},e),{opacity:0,scale:.85}]}));exports.Move=u,exports.Pop=f;
@@ -1 +1 @@
1
- "use strict";var e=require("@babel/runtime/helpers/slicedToArray"),r=require("react"),t=require("./events-5eb50ffa.js"),n=require("./link-8b6abc45.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var i=u(e);function c(e){var t=r.useRef(n.Link.create(e));return[t.current,t.current.set]}exports.useLink=c,exports.useScroll=function(){var e=c(0),n=i.default(e,2),u=n[0],s=n[1];return r.useEffect((function(){var e=function(){return s(window.scrollY)};return e(),t.addEventListener("scroll",e),function(){return t.removeEventListener("scroll",e)}}),[]),u};
1
+ "use strict";var e=require("@babel/runtime/helpers/slicedToArray"),r=require("react"),t=require("./events-5dde14ba.js"),n=require("./link-66cfde2c.js");function u(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var c=u(e);function i(e){var t=r.useRef(n.Link.create(e));return[t.current,t.current.set]}exports.useLink=i,exports.useScroll=function(){var e=i(0),n=c.default(e,2),u=n[0],s=n[1];return r.useEffect((function(){var e=function(){return s(window.scrollY)};return e(),t.addEventListener("scroll",e),function(){return t.removeEventListener("scroll",e)}}),[]),u};
@@ -0,0 +1 @@
1
+ import e from"@babel/runtime/helpers/asyncToGenerator";import t from"@babel/runtime/helpers/classCallCheck";import r from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import s from"@babel/runtime/regenerator";import{Children as l,isValidElement as c,cloneElement as u,Component as h}from"react";import{A as p,C as f}from"./animation-14b9f97e.js";import{g as y,D as m,m as v,i as d,a as g,b,o as k,c as w,A as O,d as j,M as x,e as A,t as S,f as P,h as D,j as E,k as M}from"./link-0a883169.js";import{a as I,o as L,r as R,b as V}from"./events-080727b0.js";function C(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return B(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return B(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function B(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var U=function(){function e(){t(this,e),this.t=Date.now(),this.managers=[],this.step()}return r(e,[{key:"step",value:function(){var e,t=Date.now(),r=C(this.managers);try{for(r.s();!(e=r.n()).done;){e.value.step((t-this.t)/1e3)}}catch(e){r.e(e)}finally{r.f()}this.t=t,requestAnimationFrame(this.step.bind(this))}},{key:"add",value:function(e){var t=Math.max(this.managers.findIndex((function(t){return t.priority>=e.priority})),0);this.managers.splice(t,0,e)}},{key:"remove",value:function(e){this.managers.splice(this.managers.indexOf(e),1)}}],[{key:"get",value:function(){return window.Lively||(window.Lively=new e),window.Lively}}]),e}();function q(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return z(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return z(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function z(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var T=function(){function e(r,n,i){t(this,e),this.element=r,this.tracks=[],this.queue=[],this.playing=!0,this.culling=n,this.layout=i,this.transforms=["translate","scale","skew","rotate"]}return r(e,[{key:"purge",value:function(){if(!("cache"in this.element)){this.element.cache={strokeDasharray:1,borderRadius:y(this.element,"borderRadius"),webkitBackfaceVisibility:"hidden"};for(var e=0;e<this.element.style.length;e++){var t=this.element.style[e];this.element.cache[t]=this.element.style[t]}}for(var r in this.element.style={},this.element.cache)this.element.style[r]=this.element.cache[r];this.channel=null}},{key:"clear",value:function(){this.tracks=[],this.queue=[]}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.immediate,n=void 0!==r&&r,i=t.composite,o=void 0===i||i;n&&this.clear(),o||!this.tracks.length?this.tracks.push(e):this.queue.push(e)}},{key:"remove",value:function(e){this.tracks.splice(this.tracks.indexOf(e),1),!this.tracks.length&&this.queue.length&&this.tracks.push(this.queue.shift())}},{key:"step",value:function(e){if(this.playing){for(var t=this.element.correction?{scale:m.scale}:{},r=this.tracks.length+ +!this.channel.isEmpty,n=0;n<r;n++){var i=this.tracks[n]||this.channel;v(t,i.get(this.element,this.culling)),i.step(e)&&this.remove(i)}this.apply(this.element,t)}}},{key:"apply",value:function(e,t){if(!d(t)){var r=[];for(var n in t){var i=t[n];if("scale"==n){if(this.layout){var o,a={x:[1/i.x[0],i.x[1]],y:[1/i.y[0],i.y[1]]},s=q(e.children);try{for(s.s();!(o=s.n()).done;){o.value.correction=a}}catch(e){s.e(e)}finally{s.f()}var l=t.borderRadius||e.cache.borderRadius;delete t.borderRadius,e.style.borderRadius="".concat(l[0]/i.x[0]).concat(l[1]," / ").concat(l[0]/i.y[0]).concat(l[1])}e.correction&&(i=g(i,e.correction,x.scale))}var c=this.transforms.indexOf(n);c>=0?r[c]="".concat(n,"(").concat(b(i)?k(i,", ",["x","y"]):w(i),")"):(n=O[n]||n,j(i)?e.style[n]="rgba(".concat(i.r[0],", ").concat(i.g[0],", ").concat(i.b[0],", ").concat(i.a[0],")"):e.style[n]=n in O?O[n](i):w(i))}(r=r.filter((function(e){return!!e}))).length&&(e.style.transform=r.join(" "))}}},{key:"initialize",value:function(e,t){this.channel&&!t||(this.apply(this.element,e.initials),this.channel=e.channel)}}]),e}();function $(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function F(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?$(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function H(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return N(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return N(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function N(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var X=function(){function e(r){var n=r.priority,i=void 0===n?0:n,o=r.stagger,a=void 0===o?.1:o,s=r.culling,l=void 0===s||s,c=r.noDeform,u=void 0!==c&&c,h=r.paused,p=void 0!==h&&h;t(this,e),this.targets=[],this.priority=i,this.stagger=a,this.culling=l,this.noDeform=u,this.paused=p}return r(e,[{key:"register",value:function(){U.get().add(this)}},{key:"destroy",value:function(){this.targets=[],U.get().remove(this)}},{key:"purge",value:function(){var e,t=H(this.targets);try{for(t.s();!(e=t.n()).done;){e.value.purge()}}catch(e){t.e(e)}finally{t.f()}}},{key:"clear",value:function(){var e,t=H(this.targets);try{for(t.s();!(e=t.n()).done;){e.value.clear()}}catch(e){t.e(e)}finally{t.f()}}},{key:"set",value:function(e){for(var t=0;t<e.length;t++)this.targets[t]?this.targets[t].element=e[t]:this.targets[t]=new T(e[t],this.culling,this.noDeform);this.targets.length=e.length}},{key:"play",value:function(e,t){if(!e.isEmpty)for(var r=0;r<this.targets.length;r++){var n=F(F({},t),{},{delay:(t.delay||0)+r*this.stagger});r<this.targets.length-1&&(n.callback=null),this.targets[r].add(e.play(n),t)}}},{key:"initialize",value:function(e,t){var r,n=H(this.targets);try{for(n.s();!(r=n.n()).done;){r.value.initialize(e,t)}}catch(e){n.e(e)}finally{n.f()}}},{key:"step",value:function(e){if(!this.paused){var t,r=H(this.targets);try{for(r.s();!(t=r.n()).done;){t.value.step(e)}}catch(e){r.e(e)}finally{r.f()}}}}]),e}();function _(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function G(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?_(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):_(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function W(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return J(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return J(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function J(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function K(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var Q=function(i){n(y,h);var o,a=K(y);function y(e){var r;for(var n in t(this,y),(r=a.call(this,e)).animations={default:r.parse(r.props.animate||{})},r.props.animations||{})r.animations[n]=r.parse(r.props.animations[n]);return r.mounted=new Promise((function(e){return r.mount=e})),r.children=[],r.elements=[],r.stagger=A(r.props.stagger)?.1:r.props.stagger,r.cascade=A(r.props.cascade)?1:r.props.cascade,r.manager=new X({priority:r.props.group,stagger:r.stagger,culling:r.props.lazy,noDeform:r.props.noDeform,paused:r.props.paused}),r}return r(y,[{key:"parse",value:function(e){return p.isInstance(e)?e.use():b(e)?new f(e,this.props.initial):null}},{key:"update",value:(o=e(s.mark((function e(){var t,r,n,i,o=arguments;return s.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=!(o.length>0&&void 0!==o[0])||o[0],this.manager.set(this.elements),t&&(this.manager.clear(),this.manager.purge()),this.manager.initialize(this.animations.default),t){e.next=25;break}r=W(this.children),e.prev=6,r.s();case 8:if((n=r.n()).done){e.next=17;break}if((i=n.value).rendered){e.next=15;break}return e.next=13,i.mounted;case 13:i.play(i.props.onMount,void 0,!0),i.onScroll();case 15:e.next=8;break;case 17:e.next=22;break;case 19:e.prev=19,e.t0=e.catch(6),r.e(e.t0);case 22:return e.prev=22,r.f(),e.finish(22);case 25:case"end":return e.stop()}}),e,this,[[6,19,22,25]])}))),function(){return o.apply(this,arguments)})},{key:"componentDidMount",value:function(){var e=this;this.scrollEventListener=S(this.onScroll.bind(this)),I("scroll",this.scrollEventListener),this.eventListener=this.onEvent.bind(this),L(y.events,this.elements,this.eventListener),this.update(),this.manager.register(),this.rendered=0,document.fonts.ready.then((function(){e.update(),e.inViewport=!1,e.mount(),e.props.group||(e.play(e.props.onMount),e.onScroll())}))}},{key:"componentWillUnmount",value:function(){R("scroll",this.scrollEventListener),V(y.events,this.elements,this.eventListener),this.manager.destroy()}},{key:"componentDidUpdate",value:function(){this.manager.paused=this.props.paused,this.update(!1)}},{key:"dispatch",value:function(e){P(this.props[e])&&this.props[e]()}},{key:"onEvent",value:function(e){switch(e.type){case"click":this.play(this.props.onClick);break;case"mouseenter":this.hover||(this.hover=!0,this.play(this.props.whileHover));break;case"mouseleave":this.hover&&(this.hover=!1,this.play(this.props.whileHover,{reverse:!0}));break;case"focus":this.focus||(this.focus=!0,this.play(this.props.whileFocus));break;case"blur":this.focus&&(this.focus=!1,this.play(this.props.whileFocus,{reverse:!0}))}}},{key:"getBoundingBox",value:function(){var e,t={x:Number.MAX_VALUE,y:Number.MAX_VALUE,right:0,bottom:0},r=W(this.elements.length?this.elements:this.children);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=this.elements.length?n.getBoundingClientRect():n.getBoundingBox();t.y=Math.min(i.y,t.y),t.x=Math.min(i.x,t.x),t.right=Math.max(i.right,t.right),t.bottom=Math.max(i.bottom,t.bottom)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"onScroll",value:function(){if(this.props.whileViewport){var e=D(this.getBoundingBox(),this.props.viewportMargin),t=e.entered,r=e.left;t&&!this.inViewport&&(this.inViewport=!0,this.play(this.props.whileViewport),this.dispatch("onEnterViewport")),r&&this.inViewport&&(this.inViewport=!1,this.play(this.props.whileViewport,{reverse:!0,immediate:!0}),this.dispatch("onLeaveViewport"))}}},{key:"play",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.reverse,i=void 0!==n&&n,o=r.composite,a=void 0!==o&&o,s=r.immediate,l=void 0!==s&&s,c=r.delay,u=void 0===c?0:c,h=r.callback,p=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!(!e||this.props.disabled||this.props.group>0&&!p)){E(e)||(e="default"),this.dispatch("onAnimationStart");var f=this.animations[e],y=f.length()*this.cascade,m=h;this.props.group||(h=function(){t.dispatch("onAnimationEnd"),P(m)&&m()});for(var v=0,d=0;d<this.children.length;d++)v=Math.max(v,this.children[d].play(e,{reverse:i,immediate:l,delay:u+y+this.stagger*d,callback:h},!0));return i&&!this.props.group||!i&&!this.children.length||(h=null),this.manager.play(f,{reverse:i,composite:a,immediate:l,delay:i?v:u,callback:h}),y+(i?v:u)}}},{key:"stop",value:function(){this.manager.clear()}},{key:"prerender",value:function(e){var t=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return l.map(e,(function(e){if(!c(e))return e;var i={pathLength:1};if(r){var o=t.elements.length++;i.ref=function(e){e&&(t.elements[o]=e)}}var a=y.isInstance(e)&&n&&!e.props.stopPropagation;return a&&(i.index=t.children.length++,i.group=t.props.group+1,i.ref=function(e){e&&(t.children[i.index]=e)},i.paused=t.props.paused,t.props.group||(i.active=t.props.active),M(i,G(G({},t.props),e.props),t.constructor.cascadingProps)),u(e,i,t.prerender(e.props.children,!1,!a))}))}},{key:"render",value:function(){return this.rendered++,this.elements.length=this.children.length=0,this.prerender(this.props.children)}}],[{key:"isInstance",value:function(e){return e.type===y||e.type.prototype instanceof y}}]),y}();a(Q,"events",["click","mouseenter","mouseleave","focus","blur"]),a(Q,"cascadingProps",["animate","initial","animations","stagger","cascade"]),a(Q,"defaultProps",{group:0,viewportMargin:.75,lazy:!0,paused:!1});export{Q as A};
@@ -0,0 +1 @@
1
+ import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import n from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import s from"@babel/runtime/helpers/getPrototypeOf";import{b as u,l,e as c,g as f,U as h,f as p,n as v,q as y,x as d,r as m,k as b,s as g,i as w,L as O,u as j,P as k}from"./link-0a883169.js";function P(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return x(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return x(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var A=function t(e,r,n,i){if(u(e)){var a={};for(var o in e)a[o]=t(e[o],r[o],n,i);return a}return[i(e[0],r[0],n),e[1]]},I=function(t,e,r){return l(t)&&l(e)?t*(1-r)+e*r:r>.5?e:t},S={constant:function(t){return t},linear:I,ease:function(t,e,r){return I(t,e,(1-Math.cos(r*Math.PI))/2)},spring:function(t,e,r){return r=1-1*Math.exp(-3.6*r)*Math.cos(2.5*Math.pow(r,2)*Math.PI),I(t,e,r)}},z=function(t,e,r){var n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a={duration:i},o={},s=P(r);try{for(s.s();!(n=s.n()).done;){var u=n.value;"scale"==u?(a.scale={x:1,y:1},o.scale={x:1+(e.layout.width-t.layout.width)/t.layout.width,y:1+(e.layout.height-t.layout.height)/t.layout.height}):"translate"==u?(a.translate={x:0,y:0},o.translate={x:(e.layout.x-t.layout.x)*t.layout.parentWidth,y:(e.layout.y-t.layout.y)*t.layout.parentHeight}):(a[u]=t[u],o[u]=e[u])}}catch(t){s.e(t)}finally{s.f()}return new U(a,o)},M=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.reverse,a=void 0!==i&&i,o=r.repeat,s=void 0===o?1:o,u=r.delay,l=void 0===u?0:u,c=r.alternate,f=void 0!==c&&c,h=r.callback;n(this,t),this.indices={},this.clip=e,this.t=0,this.T=e.duration*s+l,this.reverse=a,this.delay=l,this.alternate=f,this.callback=h}return i(t,[{key:"normalize",value:function(t,e,r){return c(t)&&(t=f(r,e)),h.toBase(t,e,r)}},{key:"getInterpolatedValue",value:function(t,e,r,n,i){if(p(e))return h.toBase(v(e(r,this.clip.duration),t),t,n);var a,o=this.reverse?-1:1,s=this.indices[t],u=e[s+o],l=c(s);if((l||(this.reverse?e[s].time<r:e[s].time>r))&&(this.indices[t]=s=this.reverse?e.length-1:0,a=l?this.reverse?e[s].end:e[s].start:this.reverse?u.start:u.end),u=e[s+o],(this.reverse?u.time>r:u.time<r)&&(a=this.reverse?u.end||e[s].start:u.start||e[s].end,this.indices[t]=s+=o,u=e[s+o]),i&&(a=this.reverse?u.start:u.end),a)return this.normalize(a,t,n);var f=this.normalize(e[s].set,t,n),y=this.normalize(u.set,t,n),d=S[u.interpolate||this.clip.interpolate]||S.ease;return A(f,y,(r-e[s].time)/(u.time-e[s].time),d)}},{key:"get",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r={},n=this.t>=this.T,i=this.t-this.delay,a=this.clip.duration;if(i<0||e&&!n&&!y(t))return r;var o=this.alternate&&Math.floor(i/a)%2==+!n;for(var s in i=n?a:i%a,i=d(this.reverse,o)?a-i:i,r.origin=this.clip.origin,this.clip.properties)r[s]=this.getInterpolatedValue(s,this.clip.properties[s],i,t,n);return r}},{key:"step",value:function(t){var e=this.t>=this.T;return this.t+=t,e&&p(this.callback)&&this.callback(),e}}]),t}();function C(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=s(t);if(e){var i=s(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}var E=function(t){a(r,M);var e=C(r);function r(t){var i;return n(this,r),(i=e.call(this,{duration:1/0,properties:{},origin:{x:.5,y:.5},interpolate:t})).isEmpty=!0,i.cache={},i}return i(r,[{key:"add",value:function(t,e){this.clip.properties[t]=e,this.isEmpty=!1}},{key:"getInterpolatedValue",value:function(t,e,r,n){c(e.internal.t)&&(e.internal.t=r),e.internal.t===r&&(this.cache[t]={});var i=e.internal.duration?Math.min((r-e.internal.t)/e.internal.duration,1):1,a=this.cache[t]||{};if(a.t===i)return a.value;var o=h.toBase(v(e(),t),t,n),s=a.from;if(1!=i){s||(s=h.toBase(f(n,t),t,n));var u=S[this.clip.interpolate]||S.linear;o=A(s,o,i,u)}return this.cache[t]={value:o,from:1!=i?s:null,t:i},o}}]),r}(),B=["duration","delay","repeat","alternate","interpolate","origin"];function R(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return T(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return T(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){s=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function D(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?q(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var U=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=i.duration,o=void 0===a?1:a,s=i.delay,u=i.repeat,l=i.alternate,c=i.interpolate,f=i.origin,h=void 0===f?{x:.5,y:.5}:f,p=r(i,B),v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this.duration=o,this.origin=g(h),this.channel=new E(c);var y=this.parse(p,v),d=t(y,2);this.properties=d[0],this.initials=d[1],this.isEmpty=w(this.properties),this.interpolate=c,this.defaults={delay:s,repeat:u,alternate:l}}return i(e,[{key:"length",value:function(){return this.duration*(this.defaults.repeat||1)+(this.defaults.delay||0)}},{key:"parse",value:function(t,e){var r=this,n=function(n){var i=t[n];if(O.isInstance(i))return r.channel.add(n,i),delete t[n],"continue";if(p(i))return"continue";(i=j(i)?i:[i]).length<2?i.unshift(n in e?e[n]:null):c(i[0])||(e[n]=i[0]);for(var a=i.map((function(t){return r.sanitize(t,n)})),o=0;o<a.length;o++)r.quantize(a,o);t[n]=a};for(var i in t)n(i);for(var a in e=D({},e)){var o=this.sanitize(e[a],a);e[a]=o.start||o.set}return[t,e]}},{key:"sanitize",value:function(t,e){t=u(t)?D({},t):{set:t},m(t,k)||(t={set:t}),"set"in t||(t.set=t.start||t.end),"time"in t&&t.time>this.duration&&delete t.time;var r,n=R(k);try{for(n.s();!(r=n.n()).done;){var i=r.value;i in t&&(t[i]=v(t[i],e))}}catch(t){n.e(t)}finally{n.f()}return t}},{key:"quantize",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e-1;if("time"in t[e])return t[e].time;if(0==e||e==t.length-1)return t[e].time=0==e?0:this.duration;var n=this.quantize(t,r,r);return t[e].time=n+(this.quantize(t,e+1,r)-n)*((e-r)/(e-r+1))}},{key:"play",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new M(this,b(t,this.defaults))}}]),e}(),V={create:function(e){var r=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.use=t.use.bind(t,e),t};return r.use=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e(r),i=t(n,2),a=i[0],o=i[1];return new U(a,o)},r},isInstance:function(t){return p(t)&&p(t.use)}};export{V as A,U as C,z as c};
@@ -1 +1 @@
1
- import{A as e}from"./animation-38e60844.js";export{A as Animation}from"./animation-38e60844.js";import r from"@babel/runtime/helpers/defineProperty";export{M as Move,P as Pop}from"./pop-d07034ea.js";import t from"@babel/runtime/helpers/objectWithoutProperties";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./link-bd9f6403.js";import"@babel/runtime/helpers/typeof";function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var i=e.create((function(e){return[n({opacity:1,duration:.65},e),{opacity:0}]})),c=["direction"];function p(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function a(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?p(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}var s=e.create((function(e){var r=e.direction,o=void 0===r?"right":r,n=t(e,c),i=0,p=1,s={x:0,y:.5};switch(o){case"left":s.x=1;break;case"up":i=1,p=0,s={x:0,y:1};break;case"down":i=1,p=0,s={x:0,y:0}}return[a({scale:{x:1},origin:s,duration:.6},n),{scale:{x:i,y:p}}]})),b=["direction"];function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function u(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}var O=e.create((function(e){var o=e.direction,n=void 0===o?"right":o,i=t(e,b);return["left","right","top","bottom"].includes(n)||(n="right"),[u({clip:r({},n,0)},i),{clip:r({},n,1)}]}));export{i as Fade,s as Scale,O as Wipe};
1
+ import{A as e}from"./animation-14b9f97e.js";export{A as Animation}from"./animation-14b9f97e.js";import r from"@babel/runtime/helpers/defineProperty";export{M as Move,P as Pop}from"./pop-8ecb8706.js";import t from"@babel/runtime/helpers/objectWithoutProperties";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/classCallCheck";import"@babel/runtime/helpers/createClass";import"@babel/runtime/helpers/inherits";import"@babel/runtime/helpers/possibleConstructorReturn";import"@babel/runtime/helpers/getPrototypeOf";import"./link-0a883169.js";import"@babel/runtime/helpers/typeof";function o(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function n(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){r(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}var i=e.create((function(e){return[n({opacity:1,duration:.65},e),{opacity:0}]})),c=["direction"];function p(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function a(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?p(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}var s=e.create((function(e){var r=e.direction,o=void 0===r?"right":r,n=t(e,c),i=0,p=1,s={x:0,y:.5};switch(o){case"left":s.x=1;break;case"up":i=1,p=0,s={x:0,y:1};break;case"down":i=1,p=0,s={x:0,y:0}}return[a({scale:{x:1},origin:s,duration:.6},n),{scale:{x:i,y:p}}]})),b=["direction"];function l(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function u(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?l(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):l(Object(o)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(o,r))}))}return e}var O=e.create((function(e){var o=e.direction,n=void 0===o?"right":o,i=t(e,b);return["left","right","top","bottom"].includes(n)||(n="right"),[u({clip:r({},n,0)},i),{clip:r({},n,1)}]}));export{i as Fade,s as Scale,O as Wipe};
package/dist/esm/auto.js CHANGED
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/classCallCheck";import t from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/get";import n from"@babel/runtime/helpers/inherits";import i from"@babel/runtime/helpers/possibleConstructorReturn";import o from"@babel/runtime/helpers/getPrototypeOf";import a from"@babel/runtime/helpers/defineProperty";import{A as u}from"./animatable-bc43497c.js";import l,{isValidElement as s,Children as c,cloneElement as p,Component as f,useRef as h}from"react";import{v as d,w as m,u as y,y as v,j as b}from"./link-bd9f6403.js";import{C as g,c as w}from"./animation-38e60844.js";import O from"@babel/runtime/helpers/toConsumableArray";import{a as j}from"./scroll-128ad06b.js";import"./events-62ddbb02.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/slicedToArray";import"@babel/runtime/helpers/objectWithoutProperties";function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function k(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){a(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function x(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return E(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return E(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){u=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}function E(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}var A={},C=function(i){n(l,u);var a=R(l);function l(t){var r;return e(this,l),(r=a.call(this,t)).animations={default:new g({},{opacity:+t.active,pointerEvents:t.active?"":"none"}),unmorph:new g({},{opacity:0,pointerEvents:"none"})},r.properties=d(r.props.include,r.props.exclude),r.uuid=(t.id||0).toString()+(t.index||0)+t.group,r}return t(l,[{key:"shouldComponentUpdate",value:function(e){return this.props.active!==e.active&&(this.uuid in A?A[this.uuid].push(this):A[this.uuid]=[this]),this.props.active!==e.active}},{key:"getSnapshotBeforeUpdate",value:function(e){if(this.props.active!==e.active&&this.props.active){var t,r=x(A[this.uuid]);try{for(r.s();!(t=r.n()).done;){var n=t.value;if(n!==this)return m(n.elements[0],this.props.group)}}catch(e){r.e(e)}finally{r.f()}}return null}},{key:"componentDidUpdate",value:function(e,t,n){if(r(o(l.prototype),"componentDidUpdate",this).call(this),A[this.uuid]=[],n){var i=m(this.elements[0],this.props.group);i.opacity=1,i.pointerEvents="",this.manager.play(w(i,n,this.properties,this.props.duration),{composite:!0})}else this.manager.initialize(this.animations.unmorph)}},{key:"render",value:function(){var e=this.props.children;if(y(e)){if(e.length>1)return e;e=e[0]}return s(e)?r(o(l.prototype),"render",this).call(this):e}}]),l}();function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=o(e);if(t){var a=o(this).constructor;r=Reflect.construct(n,arguments,a)}else r=n.apply(this,arguments);return i(this,r)}}a(C,"cascadingProps",["id","duration"]),a(C,"defaultProps",k(k({},u.defaultProps),{},{cascade:0,active:!1,include:v,exclude:[]}));var B=function(r){n(o,f);var i=S(o);function o(t){var r;return e(this,o),(r=i.call(this,t)).children=[],r.properties=d(r.props.include,r.props.exclude),r}return t(o,[{key:"getSnapshotBeforeUpdate",value:function(){return this.children.map((function(e){var t=null==e?void 0:e.elements[0];return t?{data:m(t),key:e.props.layoutKey}:null}))}},{key:"componentDidUpdate",value:function(e,t,r){for(var n=0,i=0;n<r.length;n++,i++){var o=this.children[i];if(o&&o.elements[0]){var a=r[n];if(a&&o.props.layoutKey===a.key){var u=m(o.elements[0]);o.manager.play(w(u,a.data,this.properties,this.props.duration),{composite:!0})}else i--}}}},{key:"render",value:function(){var e=this;return this.childIndex=0,c.map(this.props.children,(function(t){if(!s(t)||!u.isInstance(t))return t;var r=e.childIndex++;return p(t,{ref:function(t){return e.children[r]=t},layoutKey:t.key})}))}}]),o}();function D(e){var t=e.children,r=e.className,n=e.style,i=e.duration;if(!b(t))return t;var o=t.split("");return l.createElement("div",{className:r,style:n},l.createElement(u,{whileViewport:!0,animate:{opacity:1,translate:{y:0},rotate:0,duration:.8},initial:{opacity:0,translate:{y:"100%"},rotate:10},stagger:(i-.8)/(o.length-1)},o.map((function(e,t){return l.createElement("span",{style:{display:"inline-block"},key:t},/\s/.test(e)?" ":e)}))))}function U(e){var t,r=e.children,n=e.color,i=e.duration,o=(null===(t=r.props)||void 0===t?void 0:t.children)||[];Array.isArray(o)||(o=[o]);var a=[l.createElement(u,{key:0,initial:{clip:{right:0}},animate:{clip:{left:1},duration:i/2}},l.createElement("div",{style:{position:"absolute",inset:0,backgroundColor:n}}))].concat(O(o));return l.createElement(u,{whileViewport:!0,animate:{clip:{right:0},duration:i/2},initial:{clip:{right:1}}},p(r,{},a))}function I(e){var t,r=e.children,n=e.amount,i=j(),o=h();return l.createElement(u,{ref:o,animate:{translate:i((function(e){if(void 0===t){var r,i=null===(r=o.current)||void 0===r?void 0:r.elements[0];i&&(t=Math.max(i.getBoundingClientRect().y+window.scrollY-window.innerHeight/2,0))}return{x:0,y:(e-(t||0))*n}}))}},r)}a(B,"defaultProps",{include:v,exclude:[]}),D.defaultProps={style:{},className:"",duration:1.6},U.defaultProps={color:"grey",duration:1.6},I.defaultProps={amount:.5};export{U as ColorWipe,B as LayoutGroup,C as Morph,I as Parallax,D as WriteOn};
1
+ import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/classCallCheck";import r from"@babel/runtime/helpers/createClass";import n from"@babel/runtime/helpers/get";import i from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import a from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import{A as u}from"./animatable-5db28797.js";import l,{isValidElement as c,Children as p,cloneElement as f,Component as h,useRef as m}from"react";import{v as d,w as y,u as v,y as b,j as g}from"./link-0a883169.js";import{C as w,c as O}from"./animation-14b9f97e.js";import j from"@babel/runtime/helpers/toConsumableArray";import{a as P}from"./scroll-89df3fdf.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"./events-080727b0.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/objectWithoutProperties";function k(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function x(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?k(Object(r),!0).forEach((function(e){s(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):k(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function E(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return R(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return R(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function R(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function A(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=a(t);if(e){var i=a(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}var C={},S=function(o){i(l,u);var s=A(l);function l(t){var r;return e(this,l),(r=s.call(this,t)).animations={default:new w({},{opacity:+t.active,pointerEvents:t.active?"":"none"}),unmorph:new w({},{opacity:0,pointerEvents:"none"})},r.properties=d(r.props.include,r.props.exclude),r.uuid=(t.id||0).toString()+(t.index||0)+t.group,r}return r(l,[{key:"shouldComponentUpdate",value:function(t){if(this.props.active!==t.active){var e=[this,this.elements[0]];this.uuid in C?C[this.uuid].push(e):C[this.uuid]=[e]}return this.props.active!==t.active}},{key:"getSnapshotBeforeUpdate",value:function(e){if(this.props.active!==e.active&&this.props.active){var r,n=E(C[this.uuid]);try{for(n.s();!(r=n.n()).done;){var i=t(r.value,2),o=i[0],a=i[1];if(o!==this)return y(a,this.props.group)}}catch(t){n.e(t)}finally{n.f()}}return null}},{key:"componentDidUpdate",value:function(t,e,r){if(n(a(l.prototype),"componentDidUpdate",this).call(this),C[this.uuid]=[],!r)return this.manager.clear(),void this.manager.initialize(this.animations.unmorph,!0);var i=y(this.elements[0],this.props.group);i.opacity=1,i.pointerEvents="",this.manager.play(O(i,r,this.properties,this.props.duration),{composite:!0})}},{key:"render",value:function(){var t=this.props.children;if(v(t)){if(t.length>1)return t;t=t[0]}return c(t)?n(a(l.prototype),"render",this).call(this):t}}]),l}();function D(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=a(t);if(e){var i=a(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}s(S,"cascadingProps",["id","duration"]),s(S,"defaultProps",x(x({},u.defaultProps),{},{cascade:0,active:!1,include:b,exclude:[]}));var U=function(t){i(o,h);var n=D(o);function o(t){var r;return e(this,o),(r=n.call(this,t)).children=[],r.properties=d(r.props.include,r.props.exclude),r}return r(o,[{key:"shouldComponentUpdate",value:function(){return this.snapshots=this.children.map((function(t){var e=null==t?void 0:t.elements[0];return e?{snapshot:y(e),key:t.props.layoutKey}:{}})),!0}},{key:"componentDidUpdate",value:function(){for(var t=0,e=0;t<this.snapshots.length;t++,e++){var r=this.children[e];null!=r&&r.elements[0]&&(r.props.layoutKey===this.snapshots[t].key?r.manager.play(O(y(r.elements[0]),this.snapshots[t].snapshot,this.properties,this.props.duration),{composite:!0}):e--)}}},{key:"render",value:function(){var t=this;return this.childIndex=0,p.map(this.props.children,(function(e){if(!c(e)||!u.isInstance(e))return e;var r=t.childIndex++;return f(e,{ref:function(e){return t.children[r]=e},layoutKey:e.key})}))}}]),o}();function B(t){var e=t.children,r=t.className,n=t.style,i=t.duration;if(!g(e))return e;var o=e.split("");return l.createElement("div",{className:r,style:n},l.createElement(u,{whileViewport:!0,animate:{opacity:1,translate:{y:0},rotate:0,duration:.8},initial:{opacity:0,translate:{y:"100%"},rotate:10},stagger:(i-.8)/(o.length-1)},o.map((function(t,e){return l.createElement("span",{style:{display:"inline-block"},key:e},/\s/.test(t)?" ":t)}))))}function I(t){var e,r=t.children,n=t.color,i=t.duration,o=(null===(e=r.props)||void 0===e?void 0:e.children)||[];Array.isArray(o)||(o=[o]);var a=[l.createElement(u,{key:0,initial:{clip:{right:0}},animate:{clip:{left:1},duration:i/2}},l.createElement("div",{style:{position:"absolute",inset:0,backgroundColor:n}}))].concat(j(o));return l.createElement(u,{whileViewport:!0,animate:{clip:{right:0},duration:i/2},initial:{clip:{right:1}}},f(r,{},a))}function K(t){var e,r=t.children,n=t.amount,i=P(),o=m();return l.createElement(u,{ref:o,animate:{translate:i((function(t){if(void 0===e){var r,i=null===(r=o.current)||void 0===r?void 0:r.elements[0];i&&(e=Math.max(i.getBoundingClientRect().y+window.scrollY-window.innerHeight/2,0))}return{x:0,y:(t-(e||0))*n}}))}},r)}s(U,"defaultProps",{include:b,exclude:[]}),B.defaultProps={style:{},className:"",duration:1.6},I.defaultProps={color:"grey",duration:1.6},K.defaultProps={amount:.5};export{I as ColorWipe,U as LayoutGroup,S as Morph,K as Parallax,B as WriteOn};
@@ -1 +1 @@
1
- import{f as n,e as r}from"./link-bd9f6403.js";function e(n,r){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=function(n,r){if(!n)return;if("string"==typeof n)return t(n,r);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return t(n,r)}(n))||r&&n&&"number"==typeof n.length){e&&(n=e);var o=0,a=function(){};return{s:a,n:function(){return o>=n.length?{done:!0}:{done:!1,value:n[o++]}},e:function(n){throw n},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,f=!0,u=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return f=n.done,n},e:function(n){u=!0,i=n},f:function(){try{f||null==e.return||e.return()}finally{if(u)throw i}}}}function t(n,r){(null==r||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);e<r;e++)t[e]=n[e];return t}var o={},a=function(r,e){r in o||(o[r]={unique:0},window.addEventListener(r,(function(e){for(var t=0,a=Object.values(o[r]);t<a.length;t++){var i=a[t];n(i)&&i(e)}})));var t=o[r];e.LivelyID=t.unique,t[t.unique++]=e},i=function(n,e){n in o&&!r(e)&&"LivelyID"in e&&delete o[n][e.LivelyID]},f=function(n,r,t){var o,a=e(n);try{for(a.s();!(o=a.n()).done;){var i,f=o.value,u=e(r);try{for(u.s();!(i=u.n()).done;){i.value.addEventListener(f,t)}}catch(n){u.e(n)}finally{u.f()}}}catch(n){a.e(n)}finally{a.f()}},u=function(n,r,t){var o,a=e(n);try{for(a.s();!(o=a.n()).done;){var i,f=o.value,u=e(r);try{for(u.s();!(i=u.n()).done;){i.value.removeEventListener(f,t)}}catch(n){u.e(n)}finally{u.f()}}}catch(n){a.e(n)}finally{a.f()}};export{a,u as b,f as o,i as r};
1
+ import{f as n,e as r}from"./link-0a883169.js";function e(n,r){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(!e){if(Array.isArray(n)||(e=function(n,r){if(!n)return;if("string"==typeof n)return t(n,r);var e=Object.prototype.toString.call(n).slice(8,-1);"Object"===e&&n.constructor&&(e=n.constructor.name);if("Map"===e||"Set"===e)return Array.from(n);if("Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e))return t(n,r)}(n))||r&&n&&"number"==typeof n.length){e&&(n=e);var a=0,o=function(){};return{s:o,n:function(){return a>=n.length?{done:!0}:{done:!1,value:n[a++]}},e:function(n){throw n},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,f=!0,u=!1;return{s:function(){e=e.call(n)},n:function(){var n=e.next();return f=n.done,n},e:function(n){u=!0,i=n},f:function(){try{f||null==e.return||e.return()}finally{if(u)throw i}}}}function t(n,r){(null==r||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);e<r;e++)t[e]=n[e];return t}var a={},o=function(r,e){r in a||(a[r]={unique:0},window.addEventListener(r,(function(e){for(var t=0,o=Object.values(a[r]);t<o.length;t++){var i=o[t];n(i)&&i(e)}})));var t=a[r];e.LivelyID=t.unique,t[t.unique++]=e},i=function(n,e){n in a&&!r(e)&&"LivelyID"in e&&delete a[n][e.LivelyID]},f=function(n,r,t){var a,o=e(n);try{for(o.s();!(a=o.n()).done;){var i,f=a.value,u=e(r);try{for(u.s();!(i=u.n()).done;){i.value.addEventListener(f,t)}}catch(n){u.e(n)}finally{u.f()}}}catch(n){o.e(n)}finally{o.f()}},u=function(n,r,t){var a,o=e(n);try{for(o.s();!(a=o.n()).done;){var i,f=a.value,u=e(r);try{for(u.s();!(i=u.n()).done;){i.value.removeEventListener(f,t)}}catch(n){u.e(n)}finally{u.f()}}}catch(n){o.e(n)}finally{o.f()}};export{o as a,u as b,f as o,i as r};
package/dist/esm/hooks.js CHANGED
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/slicedToArray";import{useState as e,useRef as t,useCallback as n,useEffect as o}from"react";export{u as useLink,a as useScroll}from"./scroll-128ad06b.js";import"./events-62ddbb02.js";import"./link-bd9f6403.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/defineProperty";function i(n){var o=e(n),i=r(o,2),u=i[0],a=i[1],c=t();return[u,function(){var r;if(!u)return a(!0);null===(r=c.current)||void 0===r||r.play(c.current.props.onUnmount,{reverse:!0,immediate:!0,callback:function(){return a(!1)}})},c]}function c(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=t(),i=n((function(t,n){if(!o.current)return{x:0,y:0};var i=o.current.getTotalLength()*t/n,u=o.current.getPointAtLength(i),a=u.x,c=u.y;return{x:r[0]+a*e,y:r[1]+c*e}}),[o]);return[i,o]}function l(){var t=e(!1),n=r(t,2),i=n[0],u=n[1],a=function(r){return u(r.matches)};return o((function(){var r=matchMedia("(prefers-reduced-motion: reduce)");return r.addEventListener("change",a),u(r.matches),function(){return r.removeEventListener("change",a)}}),[]),i}export{c as usePath,l as useReducedMotion,i as useUnmount};
1
+ import r from"@babel/runtime/helpers/slicedToArray";import{useState as e,useRef as t,useCallback as n,useEffect as o}from"react";export{u as useLink,a as useScroll}from"./scroll-89df3fdf.js";import"./events-080727b0.js";import"./link-0a883169.js";import"@babel/runtime/helpers/typeof";import"@babel/runtime/helpers/defineProperty";function i(n){var o=e(n),i=r(o,2),u=i[0],a=i[1],c=t();return[u,function(){var r;if(!u)return a(!0);null===(r=c.current)||void 0===r||r.play(c.current.props.onUnmount,{reverse:!0,immediate:!0,callback:function(){return a(!1)}})},c]}function c(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[0,0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=t(),i=n((function(t,n){if(!o.current)return{x:0,y:0};var i=o.current.getTotalLength()*t/n,u=o.current.getPointAtLength(i),a=u.x,c=u.y;return{x:r[0]+a*e,y:r[1]+c*e}}),[o]);return[i,o]}function f(){var t=e(!1),n=r(t,2),i=n[0],u=n[1],a=function(r){return u(r.matches)};return o((function(){var r=matchMedia("(prefers-reduced-motion: reduce)");return r.addEventListener("change",a),u(r.matches),function(){return r.removeEventListener("change",a)}}),[]),i}export{c as usePath,f as useReducedMotion,i as useUnmount};
package/dist/esm/index.js CHANGED
@@ -1 +1 @@
1
- import{A as e}from"./animatable-bc43497c.js";export{A as Animatable}from"./animatable-bc43497c.js";import t from"@babel/runtime/helpers/extends";import r from"@babel/runtime/helpers/objectWithoutProperties";import n from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import m,{Children as p,isValidElement as u,cloneElement as c,Component as f}from"react";import{M as b,P as h}from"./pop-d07034ea.js";import{p as v}from"./link-bd9f6403.js";import"./animation-38e60844.js";import"@babel/runtime/helpers/slicedToArray";import"./events-62ddbb02.js";import"@babel/runtime/helpers/typeof";var y=["levels","animations"];function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=l(e);if(t){var i=l(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}var k=function(o){a(s,f);var l=d(s);function s(e){var t;return n(this,s),(t=l.call(this,e)).levels=t.props.levels,t.animations=v(t.props.animations,t.levels),t}return i(s,[{key:"makeAnimatable",value:function(n){var i=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(a<1||p.count(n)<1)return n;var o=this.props;o.levels,o.animations;var l=r(o,y),s=this.animations[this.levels-a];return a===this.levels&&(l.ref=function(e){return i.animatable=e}),m.createElement(e,t({},l,{animate:s}),p.map(n,(function(e){return u(e)?c(e,{},i.makeAnimatable(e.props.children,a-1)):e})))}},{key:"play",value:function(){var e;null===(e=this.animatable)||void 0===e||e.play.apply(e,arguments)}},{key:"render",value:function(){return this.makeAnimatable(this.props.children,this.levels)}}]),s}();s(k,"defaultProps",{levels:1,animations:[b,h]});export{k as Animate};
1
+ import{A as e}from"./animatable-5db28797.js";export{A as Animatable}from"./animatable-5db28797.js";import r from"@babel/runtime/helpers/extends";import t from"@babel/runtime/helpers/objectWithoutProperties";import n from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import l from"@babel/runtime/helpers/getPrototypeOf";import s from"@babel/runtime/helpers/defineProperty";import m,{Children as p,isValidElement as u,cloneElement as f,Component as c}from"react";import{M as b,P as h}from"./pop-8ecb8706.js";import{p as v}from"./link-0a883169.js";import"@babel/runtime/helpers/asyncToGenerator";import"@babel/runtime/regenerator";import"./animation-14b9f97e.js";import"@babel/runtime/helpers/slicedToArray";import"./events-080727b0.js";import"@babel/runtime/helpers/typeof";var y=["levels","animations"];function d(e){var r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var t,n=l(e);if(r){var i=l(this).constructor;t=Reflect.construct(n,arguments,i)}else t=n.apply(this,arguments);return o(this,t)}}var k=function(o){a(s,c);var l=d(s);function s(e){var r;return n(this,s),(r=l.call(this,e)).levels=r.props.levels,r.animations=v(r.props.animations,r.levels),r}return i(s,[{key:"makeAnimatable",value:function(n){var i=this,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(a<1||p.count(n)<1)return n;var o=this.props;o.levels,o.animations;var l=t(o,y),s=this.animations[this.levels-a];return a===this.levels&&(l.ref=function(e){return i.animatable=e}),m.createElement(e,r({},l,{animate:s}),p.map(n,(function(e){return u(e)?f(e,{},i.makeAnimatable(e.props.children,a-1)):e})))}},{key:"play",value:function(){var e;null===(e=this.animatable)||void 0===e||e.play.apply(e,arguments)}},{key:"render",value:function(){return this.makeAnimatable(this.props.children,this.levels)}}]),s}();s(k,"defaultProps",{levels:1,animations:[b,h]});export{k as Animate};
@@ -0,0 +1 @@
1
+ import t from"@babel/runtime/helpers/typeof";import n from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/defineProperty";var e=["set","start","end"],i=["%","px","em","rem","vw","vh","vmin","vmax","deg","rad"],o={rotate:"deg",skew:"deg",scale:"%",clip:"%",opacity:null,zIndex:null,lineHeight:null,fontWeight:null,length:null,default:"px"},a=[["x","y"],["r","g","b","a"],["left","top","right","bottom"]],u={translate:{x:[0,"px"],y:[0,"px"]},scale:{x:[1,"%"],y:[1,"%"]},clip:{left:[0,"%"],top:[0,"%"],right:[0,"%"],bottom:[0,"%"]},r:[127,null],g:[127,null],b:[127,null],a:[255,null]},f=["translate","scale","rotate","opacity","borderRadius","backgroundColor","color","zIndex","pointerEvents"],c={translate:function(t,n){return t+n},rotate:function(t,n){return t+n},scale:function(t,n){return t*n},default:function(t,n){return(t+n)/2}},l=function(t){return t.parentElement.clientHeight},s={get:function(t,n){return parseFloat((s[n]||s.default)(t))},default:function(t){return t.parentElement.clientWidth},x:function(t){return t.clientWidth},y:function(t){return t.clientHeight},fontSize:function(t){return getComputeStyle(t.parentElement).fontSize},height:l,top:l,bottom:l},d={"%_px":function(t,n,r){return t*s.get(n,r)},em_px:function(t,n){return t*parseFloat(getComputedStyle(n).fontSize)},rem_px:function(t){return d.emtopx(t,document.body)},vw_px:function(t){return t*window.innerWidth},vh_px:function(t){return t*window.innerHeight},vmin_px:function(t){return t*Math.min(window.innerWidth,window.innerHeight)},vmax_px:function(t){return t*Math.max(window.innerWidth,window.innerHeight)},rad_deg:function(t){return 180*t/Math.PI}};function h(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(!t)return;if("string"==typeof t)return y(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return y(t,n)}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var e=0,i=function(){};return{s:i,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}function y(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var p=function(t,n){return t&&!n||!t&&n},g=function(t,n){return new Array(n).fill(0).map((function(n,r){return r<t.length?t[r]:t[t.length-1]}))},m=function(t,n){return t.filter((function(t){return!n.includes(t)}))},v=function(t,n){return Object.keys(t).some((function(t){return n.includes(t)}))},b=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t.y,e=t.bottom,i=e-r;return{left:r>window.innerHeight+i*n,entered:r+i*n<window.innerHeight}},w=function(t){var n=t.getBoundingClientRect(),r=n.x,e=n.y,i=n.right,o=n.bottom;return!(i-r<1||o-e<1)&&(e<window.innerHeight&&o>0&&r<window.innerWidth&&i>0)},x=function(t){return null==t},O=function(t){return Array.isArray(t)},j=function(n){return!x(n)&&"object"===t(n)&&!O(n)},S=function(t){return t instanceof Function},A=function(t){return"string"==typeof t},P=function(t){return"number"==typeof t},k=function(t){return function(t,n){return Object.keys(t).length===n}(t,0)},M=function(t){return t.match(/^rgba?\(.*\)$/i)},I=function(t){return t.match(/^#[0-9a-f]{3,8}$/i)},D=function(t){return j(t)&&"r"in t},C=function(t){var n=new DOMMatrix(t),r=Math.sqrt(n.a*n.a+n.b*n.b)*Math.sign(n.a),e=Math.sqrt(n.c*n.c+n.d*n.d)*Math.sign(n.d),i=180*Math.atan2(n.d,n.c)/Math.PI-90,o=180*Math.atan2(n.b,n.a)/Math.PI;return{translate:{x:n.e,y:n.f},scale:{x:r,y:e},rotate:o,skew:{x:i,y:0}}},H=function(t,n){var r=getComputedStyle(t),e=C(r.transform);if(n in e)return L(e[n],n);if("length"===n)return[1-parseFloat(r.strokeDashoffset),null];var i=r[n];return M(i)?G(i):N(i)},E=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=getComputedStyle(t),i=t.getBoundingClientRect(),o=i.x,a=i.y,u=i.width,c=i.height,l=(r?t.parentElement:document.body).getBoundingClientRect(),s={layout:{x:o=(o-l.x+u/2)/l.width,y:a=(a-l.y+c/2)/l.height,width:u,height:c,parentWidth:l.width,parentHeight:l.height}},d=h(f);try{for(d.s();!(n=d.n()).done;){var y=n.value;s[y]=e[y]}}catch(t){d.e(t)}finally{d.f()}return Object.assign(s,C(e.transform)),s},_=function(t,n){var r,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object.keys(n),i=h(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;x(n[o])||(t[o]=n[o])}}catch(t){i.e(t)}finally{i.f()}return t},W=function t(n,r,e){return j(n)?B(n,(function(n,i){return t(n,r[i],e)})):P(n[0])&&P(r[0])?[e(n[0],r[0]),n[1]]:r},z=function(t,n){for(var r in n){var e=c[r]||c.default;t[r]=r in t?W(t[r],n[r],e):n[r]}},B=function(t,n){var r={};for(var e in t)r[e]=n(t[e],e);return r},F=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250;return function(){var r=Date.now();r-t.LivelyTimestamp<n||(t.LivelyTimestamp=r,t())}};function T(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function $(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?T(Object(e),!0).forEach((function(n){r(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):T(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function R(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(!t)return;if("string"==typeof t)return q(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return q(t,n)}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var e=0,i=function(){};return{s:i,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}function q(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var L=function t(r,e){var i,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(x(r))return null;if("scale"!==e||o||j(r)||(r={x:r,y:r}),j(r)){var f,c=Object.keys(r),l=R(a);try{for(l.s();!(f=l.n()).done;){var s=f.value;if(v(r,s)){c=s;break}}}catch(t){l.e(t)}finally{l.f()}r=$({},r);var d,h=R(c);try{for(h.s();!(d=h.n()).done;){var y=d.value,p=e in u?u[e][y]:u[y];r[y]=y in r?t(r[y],e,!0):p}}catch(t){h.e(t)}finally{h.f()}return r}if(A(r)){if(I(r))return U(r);if(M(r))return G(r);var g=N(r),m=n(g,2);r=m[0],"%"==(i=m[1])&&(r/=100)}return[r,i=P(r)?V.normalize(i,e):null]},U=function(t){var r=t.match(/^#([\da-f]{1,2})([\da-f]{1,2})([\da-f]{1,2})([\da-f]{2})?/i),e=n(r,5);e[0];var i=e[1],o=e[2],a=e[3],u=e[4],f=function(t){return[x(t)?255:parseInt(t.padStart(2,t),16),null]};return{r:f(i),g:f(o),b:f(a),a:f(u)}},G=function(t){var r=t.match(/^rgba?\((\d+)\D+(\d+)\D+(\d+)\D*(\d+)?\)/i),e=n(r,5);e[0];var i=e[1],o=e[2],a=e[3],u=e[4],f=function(t){return[x(t)?255:parseInt(t),null]};return{r:f(i),g:f(o),b:f(a),a:f(u)}},J=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object.keys(t);return r.map((function(n){return Q(t[n])})).join(n)},K=function(t){var n=j(t)?t:{},r=n.x,e=void 0===r?.5:r,i=n.y,o=void 0===i?.5:i;if(A(t))switch(t){case"left":e=0;break;case"right":e=1;break;case"top":o=0;break;case"bottom":o=1}return{x:e,y:o}},N=function(t){var n=t.toString().match(/^(-?[\d.]+)([^\d.]*)$/i);return n?[parseFloat(n[1]),n[2]||null]:[t,null]},Q=function(t){return("%"==t[1]?100*t[0]:t[0])+(x(t[1])?"":t[1])},V={fromProperty:function(t){return t in o?o[t]:o.default},toBase:function(t,n,r,e){if(j(t))return B(t,(function(t,e){return V.toBase(t,n,r,e)}));if(!P(t[0]))return t;var i=V.fromProperty(n);if(x(t[1])&&!x(i))return[t[0],i];var o=d["".concat(t[1],"_").concat(i)];return o?[o(t[0],r,e||n),i]:t},normalize:function(t,n){return i.includes(t)||x(t)&&n in o?t:V.fromProperty(n)}},X={origin:"transformOrigin",length:"strokeDashoffset",clip:"clipPath",transformOrigin:function(t){return"".concat(100*t.x,"% ").concat(100*t.y,"%")},strokeDashoffset:function(t){return 1-t[0]},clipPath:function(t){return"inset(".concat(J(t," ",["top","right","bottom","left"]),")")}},Y={bind:function(t,n){t.origin=t.origin||t;var r=function(){for(var r,e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return(r=t.origin).call.apply(r,[n].concat(i))};return r.origin=t.origin,r},create:function(t){var n=Y.bind((function(t){if(S(t)){var r=Y.bind(n,{transform:t});return r.set=n.set,r.internal=n.internal,r}return this.transform(n.internal.value)}),{transform:function(t){return t}});return n.set=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;n.internal.value=t,n.internal.duration=r,n.internal.t=null},n.internal={value:t,duration:0},n},isInstance:function(t){return S(t)&&S(t.set)}},Z=Y;export{X as A,u as D,Z as L,c as M,e as P,V as U,W as a,j as b,Q as c,D as d,x as e,S as f,H as g,b as h,k as i,A as j,_ as k,P as l,z as m,L as n,J as o,g as p,w as q,v as r,K as s,F as t,O as u,m as v,E as w,p as x,f as y};
@@ -1 +1 @@
1
- import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{A as t}from"./animation-38e60844.js";var o=["direction"];function n(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function c(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var i=t.create((function(e){var t=e.direction,n=void 0===t?"up":t,i=r(e,o),p="0px",a="20px";switch(n){case"down":a="-20px";break;case"left":p="20px",a="0px";break;case"right":p="-20px",a="0px"}return[c({translate:{x:0,y:0},opacity:1,duration:.5},i),{translate:{x:p,y:a},opacity:0}]}));function p(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function a(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?p(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var s=t.create((function(e){return[a({opacity:1,scale:1,duration:.25},e),{opacity:0,scale:.85}]}));export{i as M,s as P};
1
+ import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import{A as t}from"./animation-14b9f97e.js";var o=["direction"];function n(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function c(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var i=t.create((function(e){var t=e.direction,n=void 0===t?"up":t,i=r(e,o),p="0px",a="20px";switch(n){case"down":a="-20px";break;case"left":p="20px",a="0px";break;case"right":p="-20px",a="0px"}return[c({translate:{x:0,y:0},opacity:1,duration:.5},i),{translate:{x:p,y:a},opacity:0}]}));function p(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);r&&(o=o.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),t.push.apply(t,o)}return t}function a(r){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?p(Object(o),!0).forEach((function(t){e(r,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(r,Object.getOwnPropertyDescriptors(o)):p(Object(o)).forEach((function(e){Object.defineProperty(r,e,Object.getOwnPropertyDescriptor(o,e))}))}return r}var s=t.create((function(e){return[a({opacity:1,scale:1,duration:.25},e),{opacity:0,scale:.85}]}));export{i as M,s as P};
@@ -1 +1 @@
1
- import r from"@babel/runtime/helpers/slicedToArray";import{useRef as t,useEffect as n}from"react";import{a as e,r as o}from"./events-62ddbb02.js";import{L as a}from"./link-bd9f6403.js";function s(r){var n=t(a.create(r));return[n.current,n.current.set]}function u(){var t=s(0),a=r(t,2),u=a[0],c=a[1];return n((function(){var r=function(){return c(window.scrollY)};return r(),e("scroll",r),function(){return o("scroll",r)}}),[]),u}export{u as a,s as u};
1
+ import r from"@babel/runtime/helpers/slicedToArray";import{useRef as t,useEffect as n}from"react";import{a as e,r as o}from"./events-080727b0.js";import{L as a}from"./link-0a883169.js";function s(r){var n=t(a.create(r));return[n.current,n.current.set]}function u(){var t=s(0),a=r(t,2),u=a[0],c=a[1];return n((function(){var r=function(){return c(window.scrollY)};return r(),e("scroll",r),function(){return o("scroll",r)}}),[]),u}export{u as a,s as u};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@infinityfx/lively",
3
- "version": "2.1.3",
3
+ "version": "2.1.6",
4
4
  "description": "Feature complete, lightweight react animation library.",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1 +0,0 @@
1
- "use strict";var e=require("@babel/runtime/helpers/classCallCheck"),t=require("@babel/runtime/helpers/createClass"),r=require("@babel/runtime/helpers/inherits"),n=require("@babel/runtime/helpers/possibleConstructorReturn"),i=require("@babel/runtime/helpers/getPrototypeOf"),a=require("@babel/runtime/helpers/defineProperty"),o=require("react"),s=require("./animation-6471b73e.js"),l=require("./link-8b6abc45.js"),u=require("./events-5eb50ffa.js");function c(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var h=c(e),f=c(t),p=c(r),y=c(n),d=c(i),v=c(a);function m(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return g(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var b=function(){function e(){h.default(this,e),this.t=Date.now(),this.managers=[],this.step()}return f.default(e,[{key:"step",value:function(){var e,t=Date.now(),r=m(this.managers);try{for(r.s();!(e=r.n()).done;){e.value.step((t-this.t)/1e3)}}catch(e){r.e(e)}finally{r.f()}this.t=t,requestAnimationFrame(this.step.bind(this))}},{key:"add",value:function(e){var t=Math.max(this.managers.findIndex((function(t){return t.priority>=e.priority})),0);this.managers.splice(t,0,e)}},{key:"remove",value:function(e){this.managers.splice(this.managers.indexOf(e),1)}}],[{key:"get",value:function(){return window.Lively||(window.Lively=new e),window.Lively}}]),e}();function w(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return k(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return k(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function k(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var O=function(){function e(t,r,n){h.default(this,e),this.element=t,this.tracks=[],this.queue=[],this.playing=!0,this.culling=r,this.layout=n,this.transforms=["translate","scale","skew","rotate"]}return f.default(e,[{key:"purge",value:function(){if(!("cache"in this.element)){this.element.cache={strokeDasharray:1,borderRadius:l.getProperty(this.element,"borderRadius"),webkitBackfaceVisibility:"hidden"};for(var e=0;e<this.element.style.length;e++){var t=this.element.style[e];this.element.cache[t]=this.element.style[t]}}for(var r in this.element.style={},this.element.cache)this.element.style[r]=this.element.cache[r]}},{key:"clear",value:function(){this.tracks=[],this.queue=[]}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.immediate,n=void 0!==r&&r,i=t.composite,a=void 0===i||i;n&&this.clear(),a||!this.tracks.length?this.tracks.push(e):this.queue.push(e)}},{key:"remove",value:function(e){this.tracks.splice(this.tracks.indexOf(e),1),!this.tracks.length&&this.queue.length&&this.tracks.push(this.queue.shift())}},{key:"step",value:function(e){if(this.playing){for(var t=this.element.correction?{scale:l.DEFAULT_OBJECTS.scale}:{},r=this.tracks.length+ +!this.channel.isEmpty,n=0;n<r;n++){var i=this.tracks[n]||this.channel;l.mergeProperties(t,i.get(this.element,this.culling)),i.step(e)&&this.remove(i)}this.apply(this.element,t)}}},{key:"apply",value:function(e,t){if(!l.isEmpty(t)){var r=[];for(var n in t){var i=t[n];if("scale"==n){if(this.layout){var a,o={x:[1/i.x[0],i.x[1]],y:[1/i.y[0],i.y[1]]},s=w(e.children);try{for(s.s();!(a=s.n()).done;){a.value.correction=o}}catch(e){s.e(e)}finally{s.f()}var u=t.borderRadius||e.cache.borderRadius;delete t.borderRadius,e.style.borderRadius="".concat(u[0]/i.x[0]).concat(u[1]," / ").concat(u[0]/i.y[0]).concat(u[1])}e.correction&&(i=l.merge(i,e.correction,l.MERGE_FUNCTIONS.scale))}var c=this.transforms.indexOf(n);c>=0?r[c]="".concat(n,"(").concat(l.isObj(i)?l.objToStr(i,", ",["x","y"]):l.arrToStyle(i),")"):(n=l.Aliases[n]||n,l.isColor(i)?e.style[n]="rgba(".concat(i.r[0],", ").concat(i.g[0],", ").concat(i.b[0],", ").concat(i.a[0],")"):e.style[n]=n in l.Aliases?l.Aliases[n](i):l.arrToStyle(i))}(r=r.filter((function(e){return!!e}))).length&&(e.style.transform=r.join(" "))}}},{key:"initialize",value:function(e){this.apply(this.element,e.initials),this.channel=e.channel}}]),e}();function j(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function A(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?j(Object(r),!0).forEach((function(t){v.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):j(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function S(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return x(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return x(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function x(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var E=function(){function e(t){var r=t.priority,n=void 0===r?0:r,i=t.stagger,a=void 0===i?.1:i,o=t.culling,s=void 0===o||o,l=t.noDeform,u=void 0!==l&&l,c=t.paused,f=void 0!==c&&c;h.default(this,e),this.targets=[],this.priority=n,this.stagger=a,this.culling=s,this.noDeform=u,this.paused=f}return f.default(e,[{key:"register",value:function(){b.get().add(this)}},{key:"destroy",value:function(){this.targets=[],b.get().remove(this)}},{key:"purge",value:function(){var e,t=S(this.targets);try{for(t.s();!(e=t.n()).done;){e.value.purge()}}catch(e){t.e(e)}finally{t.f()}}},{key:"clear",value:function(){var e,t=S(this.targets);try{for(t.s();!(e=t.n()).done;){e.value.clear()}}catch(e){t.e(e)}finally{t.f()}}},{key:"set",value:function(e){var t=this;this.targets=e.map((function(e){return new O(e,t.culling,t.noDeform)}))}},{key:"play",value:function(e,t){if(!e.isEmpty)for(var r=0;r<this.targets.length;r++){var n=A(A({},t),{},{delay:(t.delay||0)+r*this.stagger});r<this.targets.length-1&&(n.callback=null),this.targets[r].add(e.play(n),t)}}},{key:"initialize",value:function(e){var t,r=S(this.targets);try{for(r.s();!(t=r.n()).done;){t.value.initialize(e)}}catch(e){r.e(e)}finally{r.f()}}},{key:"step",value:function(e){if(!this.paused){var t,r=S(this.targets);try{for(r.s();!(t=r.n()).done;){t.value.step(e)}}catch(e){r.e(e)}finally{r.f()}}}}]),e}();function P(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function I(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?P(Object(r),!0).forEach((function(t){v.default(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):P(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function D(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(!e)return;if("string"==typeof e)return M(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);"Object"===r&&e.constructor&&(r=e.constructor.name);if("Map"===r||"Set"===r)return Array.from(e);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return M(e,t)}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return o=e.done,e},e:function(e){s=!0,a=e},f:function(){try{o||null==r.return||r.return()}finally{if(s)throw a}}}}function M(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,n=d.default(e);if(t){var i=d.default(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return y.default(this,r)}}var C=function(e){p.default(r,e);var t=q(r);function r(e){var n;for(var i in h.default(this,r),(n=t.call(this,e)).animations={default:n.parse(n.props.animate||{})},n.props.animations||{})n.animations[i]=n.parse(n.props.animations[i]);return n.children=[],n.elements=[],n.stagger=l.isNul(n.props.stagger)?.1:n.props.stagger,n.cascade=l.isNul(n.props.cascade)?1:n.props.cascade,n.manager=new E({priority:n.props.group,stagger:n.stagger,culling:n.props.lazy,noDeform:n.props.noDeform,paused:n.props.paused}),n}return f.default(r,[{key:"parse",value:function(e){return s.Animation.isInstance(e)?e.use():l.isObj(e)?new s.Clip(e,this.props.initial):null}},{key:"update",value:function(){this.manager.clear(),this.manager.purge(),this.manager.initialize(this.animations.default)}},{key:"componentDidMount",value:function(){var e=this;this.scrollEventListener=l.throttle(this.onScroll.bind(this)),u.addEventListener("scroll",this.scrollEventListener),this.eventListener=this.onEvent.bind(this),u.onAny(r.events,this.elements,this.eventListener),this.manager.set(this.elements),this.manager.register(),this.update(),document.fonts.ready.then((function(){e.update(),e.inViewport=!1,e.props.group||(e.play(e.props.onMount),e.onScroll())}))}},{key:"componentWillUnmount",value:function(){u.removeEventListener("scroll",this.scrollEventListener),u.offAny(r.events,this.elements,this.eventListener),this.manager.destroy()}},{key:"componentDidUpdate",value:function(){this.manager.paused=this.props.paused;var e,t=D(this.children);try{for(t.s();!(e=t.n()).done;){e.value.manager.paused=this.props.paused}}catch(e){t.e(e)}finally{t.f()}}},{key:"dispatch",value:function(e){l.isFunc(this.props[e])&&this.props[e]()}},{key:"onEvent",value:function(e){switch(e.type){case"click":this.play(this.props.onClick);break;case"mouseenter":this.hover||(this.hover=!0,this.play(this.props.whileHover));break;case"mouseleave":this.hover&&(this.hover=!1,this.play(this.props.whileHover,{reverse:!0}));break;case"focus":this.focus||(this.focus=!0,this.play(this.props.whileFocus));break;case"blur":this.focus&&(this.focus=!1,this.play(this.props.whileFocus,{reverse:!0}))}}},{key:"getBoundingBox",value:function(){var e,t={x:Number.MAX_VALUE,y:Number.MAX_VALUE,right:0,bottom:0},r=D(this.elements.length?this.elements:this.children);try{for(r.s();!(e=r.n()).done;){var n=e.value,i=this.elements.length?n.getBoundingClientRect():n.getBoundingBox();t.y=Math.min(i.y,t.y),t.x=Math.min(i.x,t.x),t.right=Math.max(i.right,t.right),t.bottom=Math.max(i.bottom,t.bottom)}}catch(e){r.e(e)}finally{r.f()}return t}},{key:"onScroll",value:function(){if(this.props.whileViewport){var e=l.inViewport(this.getBoundingBox(),this.props.viewportMargin),t=e.entered,r=e.left;t&&!this.inViewport&&(this.inViewport=!0,this.play(this.props.whileViewport),this.dispatch("onEnterViewport")),r&&this.inViewport&&(this.inViewport=!1,this.play(this.props.whileViewport,{reverse:!0,immediate:!0}),this.dispatch("onLeaveViewport"))}}},{key:"play",value:function(e){var t=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.reverse,i=void 0!==n&&n,a=r.composite,o=void 0!==a&&a,s=r.immediate,u=void 0!==s&&s,c=r.delay,h=void 0===c?0:c,f=r.callback,p=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!(!e||this.props.disabled||this.props.group>0&&!p)){l.isStr(e)||(e="default"),this.dispatch("onAnimationStart");var y=this.animations[e],d=y.length()*this.cascade,v=f;this.props.group||(f=function(){t.dispatch("onAnimationEnd"),l.isFunc(v)&&v()});for(var m=0,g=0;g<this.children.length;g++)m=Math.max(m,this.children[g].play(e,{reverse:i,immediate:u,delay:h+d+this.stagger*g,callback:f},!0));return i&&!this.props.group||!i&&!this.children.length||(f=null),this.manager.play(y,{reverse:i,composite:o,immediate:u,delay:i?m:h,callback:f}),d+(i?m:h)}}},{key:"stop",value:function(){this.manager.clear()}},{key:"prerender",value:function(e){var t=this,n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],i=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return o.Children.map(e,(function(e){if(!o.isValidElement(e))return e;var a={pathLength:1};if(n){var s=t.elementIndex++;a.ref=function(e){return t.elements[s]=e}}var u=r.isInstance(e)&&i&&!e.props.stopPropagation;return u&&(a.index=t.childIndex++,a.group=t.props.group+1,a.ref=function(e){return t.children[a.index]=e},t.props.group||(a.active=t.props.active),l.mergeObjects(a,I(I({},t.props),e.props),t.constructor.cascadingProps)),o.cloneElement(e,a,t.prerender(e.props.children,!1,!u))}))}},{key:"render",value:function(){return this.elementIndex=this.childIndex=0,this.prerender(this.props.children)}}],[{key:"isInstance",value:function(e){return e.type===r||e.type.prototype instanceof r}}]),r}(o.Component);v.default(C,"events",["click","mouseenter","mouseleave","focus","blur"]),v.default(C,"cascadingProps",["animate","initial","animations","stagger","cascade"]),v.default(C,"defaultProps",{group:0,viewportMargin:.75,lazy:!0,paused:!1}),exports.Animatable=C;
@@ -1 +0,0 @@
1
- "use strict";var t=require("@babel/runtime/helpers/slicedToArray"),e=require("@babel/runtime/helpers/defineProperty"),r=require("@babel/runtime/helpers/objectWithoutProperties"),n=require("@babel/runtime/helpers/classCallCheck"),i=require("@babel/runtime/helpers/createClass"),a=require("@babel/runtime/helpers/inherits"),o=require("@babel/runtime/helpers/possibleConstructorReturn"),u=require("@babel/runtime/helpers/getPrototypeOf"),l=require("./link-8b6abc45.js");function s(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var c=s(t),f=s(e),h=s(r),p=s(n),v=s(i),y=s(a),d=s(o),m=s(u);function b(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return g(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return g(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}function g(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var O=function t(e,r,n,i){if(l.isObj(e)){var a={};for(var o in e)a[o]=t(e[o],r[o],n,i);return a}return[i(e[0],r[0],n),e[1]]},w=function(t,e,r){return l.isNum(t)&&l.isNum(e)?t*(1-r)+e*r:r>.5?e:t},j={constant:function(t){return t},linear:w,ease:function(t,e,r){return w(t,e,(1-Math.cos(r*Math.PI))/2)},spring:function(t,e,r){return r=1-1*Math.exp(-3.6*r)*Math.cos(2.5*Math.pow(r,2)*Math.PI),w(t,e,r)}},k=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.reverse,i=void 0!==n&&n,a=r.repeat,o=void 0===a?1:a,u=r.delay,l=void 0===u?0:u,s=r.alternate,c=void 0!==s&&s,f=r.callback;p.default(this,t),this.indices={},this.clip=e,this.t=0,this.T=e.duration*o+l,this.reverse=i,this.delay=l,this.alternate=c,this.callback=f}return v.default(t,[{key:"normalize",value:function(t,e,r){return l.isNul(t)&&(t=l.getProperty(r,e)),l.Units.toBase(t,e,r)}},{key:"getInterpolatedValue",value:function(t,e,r,n){if(l.isFunc(e))return l.Units.toBase(l.convert(e(r,this.clip.duration),t),t,n);var i=this.reverse?-1:1,a=this.indices[t];(l.isNul(a)||(this.reverse?r-e[a].time:e[a].time-r)>0)&&(this.indices[t]=a=this.reverse?e.length-1:0);var o=e[a],u=e[a+i];if(this.reverse?u.time>r:u.time<r){this.indices[t]=a+=i;var s=["start","end"],c=s[+!this.reverse],f=s[+this.reverse];if(c in o||f in u)return this.normalize(c in o?o[c]:u[f],t,n);o=e[a],u=e[a+i]}var h=this.normalize(o.set,t,n),p=this.normalize(u.set,t,n),v=j[u.interpolate||this.clip.interpolate]||j.ease;return O(h,p,(r-o.time)/(u.time-o.time),v)}},{key:"get",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r={},n=this.t>=this.T;if(this.t<this.delay||e&&!n&&!l.isVisible(t))return r;var i=this.t-this.delay,a=this.clip.duration,o=this.alternate&&Math.floor(i/a)%2==+!n;for(var u in i=n?a:i%a,i=l.xor(this.reverse,o)?a-i:i,r.origin=this.clip.origin,this.clip.properties)r[u]=this.getInterpolatedValue(u,this.clip.properties[u],i,t);return r}},{key:"step",value:function(t){var e=this.t>=this.T;return this.t+=t,e&&l.isFunc(this.callback)&&this.callback(),e}}]),t}();function P(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=m.default(t);if(e){var i=m.default(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return d.default(this,r)}}var S=function(t){y.default(r,t);var e=P(r);function r(t){var n;return p.default(this,r),(n=e.call(this,{duration:1/0,properties:{},origin:{x:.5,y:.5},interpolate:t})).isEmpty=!0,n.cache={},n}return v.default(r,[{key:"add",value:function(t,e){this.clip.properties[t]=e,this.isEmpty=!1}},{key:"getInterpolatedValue",value:function(t,e,r,n){l.isNul(e.internal.t)&&(e.internal.t=r),e.internal.t===r&&(this.cache[t]={});var i=e.internal.duration?Math.min((r-e.internal.t)/e.internal.duration,1):1,a=this.cache[t]||{};if(a.t===i)return a.value;var o=l.Units.toBase(l.convert(e(),t),t,n),u=a.from;if(1!=i){u||(u=l.Units.toBase(l.getProperty(n,t),t,n));var s=j[this.clip.interpolate]||j.linear;o=O(u,o,i,s)}return this.cache[t]={value:o,from:1!=i?u:null,t:i},o}}]),r}(k),I=["duration","delay","repeat","alternate","interpolate","origin"];function x(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return A(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return A(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}function A(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function M(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?q(Object(r),!0).forEach((function(e){f.default(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):q(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var z=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=e.duration,n=void 0===r?1:r,i=e.delay,a=e.repeat,o=e.alternate,u=e.interpolate,s=e.origin,f=void 0===s?{x:.5,y:.5}:s,v=h.default(e,I),y=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};p.default(this,t),this.duration=n,this.origin=l.originToStr(f),this.channel=new S(u);var d=this.parse(v,y),m=c.default(d,2);this.properties=m[0],this.initials=m[1],this.isEmpty=l.isEmpty(this.properties),this.interpolate=u,this.defaults={delay:i,repeat:a,alternate:o}}return v.default(t,[{key:"length",value:function(){return this.duration*(this.defaults.repeat||1)+(this.defaults.delay||0)}},{key:"parse",value:function(t,e){var r=this,n=function(n){var i=t[n];if(l.Link.isInstance(i))return r.channel.add(n,i),delete t[n],"continue";if(l.isFunc(i))return"continue";(i=l.isArr(i)?i:[i]).length<2?i.unshift(n in e?e[n]:null):l.isNul(i[0])||(e[n]=i[0]);for(var a=i.map((function(t){return r.sanitize(t,n)})),o=0;o<a.length;o++)r.quantize(a,o);t[n]=a};for(var i in t)n(i);for(var a in e=M({},e))e[a]=l.convert(e[a],a);return[t,e]}},{key:"sanitize",value:function(t,e){t=l.isObj(t)?M({},t):{set:t},l.hasSomeKey(t,l.POSITIONS)||(t={set:t}),"set"in t||(t.set=t.start||t.end),"time"in t&&t.time>this.duration&&delete t.time;var r,n=x(l.POSITIONS);try{for(n.s();!(r=n.n()).done;){var i=r.value;i in t&&(t[i]=l.convert(t[i],e))}}catch(t){n.e(t)}finally{n.f()}return t}},{key:"quantize",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e-1;if("time"in t[e])return t[e].time;if(0==e||e==t.length-1)return t[e].time=0==e?0:this.duration;var n=this.quantize(t,r,r);return t[e].time=n+(this.quantize(t,e+1,r)-n)*((e-r)/(e-r+1))}},{key:"play",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new k(this,l.mergeObjects(t,this.defaults))}}]),t}(),T={create:function(t){var e=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.use=t.use.bind(t,e),t};return e.use=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=t(e),n=c.default(r,2),i=n[0],a=n[1];return new z(i,a)},e},isInstance:function(t){return l.isFunc(t)&&l.isFunc(t.use)}};exports.Animation=T,exports.Clip=z,exports.computeMorph=function(t,e,r){var n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a={duration:i},o={},u=b(r);try{for(u.s();!(n=u.n()).done;){var l=n.value;"scale"==l?(a.scale={x:1,y:1},o.scale={x:1+(e.layout.width-t.layout.width)/t.layout.width,y:1+(e.layout.height-t.layout.height)/t.layout.height}):"translate"==l?(a.translate={x:0,y:0},o.translate={x:(e.layout.x-t.layout.x)*t.layout.parentWidth,y:(e.layout.y-t.layout.y)*t.layout.parentHeight}):(a[l]=t[l],o[l]=e[l])}}catch(t){u.e(t)}finally{u.f()}return new z(a,o)};
@@ -1 +0,0 @@
1
- "use strict";var t=require("@babel/runtime/helpers/typeof"),r=require("@babel/runtime/helpers/slicedToArray"),n=require("@babel/runtime/helpers/defineProperty");function e(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}var o=e(t),i=e(r),a=e(n);function u(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,r){if(!t)return;if("string"==typeof t)return f(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return f(t,r)}(t))||r&&t&&"number"==typeof t.length){n&&(t=n);var e=0,o=function(){};return{s:o,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function f(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}var l=["%","px","em","rem","vw","vh","vmin","vmax","deg","rad"],c={rotate:"deg",skew:"deg",scale:"%",clip:"%",opacity:null,zIndex:null,lineHeight:null,fontWeight:null,length:null,default:"px"},s=[["x","y"],["r","g","b","a"],["left","top","right","bottom"]],p={translate:{x:[0,"px"],y:[0,"px"]},scale:{x:[1,"%"],y:[1,"%"]},clip:{left:[0,"%"],top:[0,"%"],right:[0,"%"],bottom:[0,"%"]},r:[127,null],g:[127,null],b:[127,null],a:[255,null]},d=["translate","scale","rotate","opacity","borderRadius","backgroundColor","color","zIndex","pointerEvents"],y={translate:function(t,r){return t+r},rotate:function(t,r){return t+r},scale:function(t,r){return t*r},default:function(t,r){return(t+r)/2}},h=["parentElement","clientHeight"],g={x:["clientWidth"],y:["clientHeight"],fontSize:["parentElement","style","fontSize"],default:["parentElement","clientWidth"],height:h,top:h,bottom:h},v={"%_px":function(t,r,n){var e,o=u(g[n]||g.default);try{for(o.s();!(e=o.n()).done;){r=r[e.value]}}catch(t){o.e(t)}finally{o.f()}return t*parseFloat(r)},em_px:function(t,r){return t*parseFloat(getComputedStyle(r).fontSize)},rem_px:function(t){return v.emtopx(t,document.body)},vw_px:function(t){return t*window.innerWidth},vh_px:function(t){return t*window.innerHeight},vmin_px:function(t){return t*Math.min(window.innerWidth,window.innerHeight)},vmax_px:function(t){return t*Math.max(window.innerWidth,window.innerHeight)},rad_deg:function(t){return 180*t/Math.PI}};function m(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,r){if(!t)return;if("string"==typeof t)return b(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return b(t,r)}(t))||r&&t&&"number"==typeof t.length){n&&(t=n);var e=0,o=function(){};return{s:o,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function b(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}var x=function(t,r){return Object.keys(t).some((function(t){return r.includes(t)}))},w=function(t){return null==t},O=function(t){return Array.isArray(t)},S=function(t){return!w(t)&&"object"===o.default(t)&&!O(t)},j=function(t){return t instanceof Function},A=function(t){return"string"==typeof t},P=function(t){return"number"==typeof t},I=function(t){return t.match(/^rgba?\(.*\)$/i)},M=function(t){return t.match(/^#[0-9a-f]{3,8}$/i)},k=function(t){var r=new DOMMatrix(t),n=Math.sqrt(r.a*r.a+r.b*r.b)*Math.sign(r.a),e=Math.sqrt(r.c*r.c+r.d*r.d)*Math.sign(r.d),o=180*Math.atan2(r.d,r.c)/Math.PI-90,i=180*Math.atan2(r.b,r.a)/Math.PI;return{translate:{x:r.e,y:r.f},scale:{x:n,y:e},rotate:i,skew:{x:o,y:0}}},E=function t(r,n,e){return S(r)?T(r,(function(r,o){return t(r,n[o],e)})):P(r[0])&&P(n[0])?[e(r[0],n[0]),r[1]]:n},T=function(t,r){var n={};for(var e in t)n[e]=r(t[e],e);return n};function C(t,r){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);r&&(e=e.filter((function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable}))),n.push.apply(n,e)}return n}function D(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?C(Object(n),!0).forEach((function(r){a.default(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))}))}return t}function _(t,r){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,r){if(!t)return;if("string"==typeof t)return H(t,r);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return H(t,r)}(t))||r&&t&&"number"==typeof t.length){n&&(t=n);var e=0,o=function(){};return{s:o,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return a=t.done,t},e:function(t){u=!0,i=t},f:function(){try{a||null==n.return||n.return()}finally{if(u)throw i}}}}function H(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=new Array(r);n<r;n++)e[n]=t[n];return e}var F=function t(r,n){var e,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(w(r))return null;if("scale"!==n||o||S(r)||(r={x:r,y:r}),S(r)){var a,u=Object.keys(r),f=_(s);try{for(f.s();!(a=f.n()).done;){var l=a.value;if(x(r,l)){u=l;break}}}catch(t){f.e(t)}finally{f.f()}r=D({},r);var c,d=_(u);try{for(d.s();!(c=d.n()).done;){var y=c.value,h=n in p?p[n][y]:p[y];r[y]=y in r?t(r[y],n,!0):h}}catch(t){d.e(t)}finally{d.f()}return r}if(A(r)){if(M(r))return R(r);if(I(r))return W(r);var g=B(r),v=i.default(g,2);r=v[0],"%"==(e=v[1])&&(r/=100)}return[r,e=P(r)?$.normalize(e,n):null]},R=function(t){var r=t.match(/^#([\da-f]{1,2})([\da-f]{1,2})([\da-f]{1,2})([\da-f]{2})?/i),n=i.default(r,5);n[0];var e=n[1],o=n[2],a=n[3],u=n[4],f=function(t){return[w(t)?255:parseInt(t.padStart(2,t),16),null]};return{r:f(e),g:f(o),b:f(a),a:f(u)}},W=function(t){var r=t.match(/^rgba?\((\d+)\D+(\d+)\D+(\d+)\D*(\d+)?\)/i),n=i.default(r,5);n[0];var e=n[1],o=n[2],a=n[3],u=n[4],f=function(t){return[w(t)?255:parseInt(t),null]};return{r:f(e),g:f(o),b:f(a),a:f(u)}},z=function(t,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object.keys(t);return n.map((function(r){return U(t[r])})).join(r)},B=function(t){var r=t.toString().match(/^(-?[\d.]+)([^\d.]*)$/i);return r?[parseFloat(r[1]),r[2]||null]:[t,null]},U=function(t){return("%"==t[1]?100*t[0]:t[0])+(w(t[1])?"":t[1])},$={fromProperty:function(t){return t in c?c[t]:c.default},toBase:function(t,r,n,e){if(S(t))return T(t,(function(t){return $.toBase(t,r,n,e)}));if(!P(t[0]))return t;var o=$.fromProperty(r);if(w(t[1])&&!w(o))return[t[0],o];var i=v["".concat(t[1],"_").concat(o)];return i?[i(t[0],n,e||r),o]:t},normalize:function(t,r){return l.includes(t)||w(t)&&r in c?t:$.fromProperty(r)}},q={origin:"transformOrigin",length:"strokeDashoffset",clip:"clipPath",transformOrigin:function(t){return"".concat(100*t.x,"% ").concat(100*t.y,"%")},strokeDashoffset:function(t){return 1-t[0]},clipPath:function(t){return"inset(".concat(z(t," ",["top","right","bottom","left"]),")")}},N={bind:function(t,r){t.origin=t.origin||t;var n=function(){for(var n,e=arguments.length,o=new Array(e),i=0;i<e;i++)o[i]=arguments[i];return(n=t.origin).call.apply(n,[r].concat(o))};return n.origin=t.origin,n},create:function(t){var r=N.bind((function(t){if(j(t)){var n=N.bind(r,{transform:t});return n.set=r.set,n.internal=r.internal,n}return this.transform(r.internal.value)}),{transform:function(t){return t}});return r.set=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;r.internal.value=t,r.internal.duration=n,r.internal.t=null},r.internal={value:t,duration:0},r},isInstance:function(t){return j(t)&&j(t.set)}},L=N;exports.Aliases=q,exports.DEFAULT_OBJECTS=p,exports.Link=L,exports.MERGE_FUNCTIONS=y,exports.MORPH_PROPERTIES=d,exports.POSITIONS=["set","start","end"],exports.Units=$,exports.arrToStyle=U,exports.convert=F,exports.getProperty=function(t,r){var n=getComputedStyle(t),e=k(n.transform);if(r in e)return F(e[r],r);if("length"===r)return[1-parseFloat(n.strokeDashoffset),null];var o=n[r];return I(o)?W(o):B(o)},exports.getSnapshot=function(t){var r,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=getComputedStyle(t),o=t.getBoundingClientRect(),i=o.x,a=o.y,u=o.width,f=o.height,l=(n?t.parentElement:document.body).getBoundingClientRect(),c={layout:{x:i=(i-l.x+u/2)/l.width,y:a=(a-l.y+f/2)/l.height,width:u,height:f,parentWidth:l.width,parentHeight:l.height}},s=m(d);try{for(s.s();!(r=s.n()).done;){var p=r.value;c[p]=e[p]}}catch(t){s.e(t)}finally{s.f()}return Object.assign(c,k(e.transform)),c},exports.hasSomeKey=x,exports.inViewport=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t.y,e=t.bottom,o=e-n;return{left:n>window.innerHeight+o*r,entered:n+o*r<window.innerHeight}},exports.isArr=O,exports.isColor=function(t){return S(t)&&"r"in t},exports.isEmpty=function(t){return function(t,r){return Object.keys(t).length===r}(t,0)},exports.isFunc=j,exports.isNul=w,exports.isNum=P,exports.isObj=S,exports.isStr=A,exports.isVisible=function(t){var r=t.getBoundingClientRect(),n=r.x,e=r.y,o=r.right,i=r.bottom;return!(o-n<1||i-e<1)&&(e<window.innerHeight&&i>0&&n<window.innerWidth&&o>0)},exports.merge=E,exports.mergeObjects=function(t,r){var n,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object.keys(r),o=m(e);try{for(o.s();!(n=o.n()).done;){var i=n.value;w(r[i])||(t[i]=r[i])}}catch(t){o.e(t)}finally{o.f()}return t},exports.mergeProperties=function(t,r){for(var n in r){var e=y[n]||y.default;t[n]=n in t?E(t[n],r[n],e):r[n]}},exports.objToStr=z,exports.originToStr=function(t){var r=S(t)?t:{},n=r.x,e=void 0===n?.5:n,o=r.y,i=void 0===o?.5:o;if(A(t))switch(t){case"left":e=0;break;case"right":e=1;break;case"top":i=0;break;case"bottom":i=1}return{x:e,y:i}},exports.padArray=function(t,r){return new Array(r).fill(0).map((function(r,n){return n<t.length?t[n]:t[t.length-1]}))},exports.subArray=function(t,r){return t.filter((function(t){return!r.includes(t)}))},exports.throttle=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250;return function(){var n=Date.now();n-t.LivelyTimestamp<r||(t.LivelyTimestamp=n,t())}},exports.xor=function(t,r){return t&&!r||!t&&r};
@@ -1 +0,0 @@
1
- import t from"@babel/runtime/helpers/classCallCheck";import e from"@babel/runtime/helpers/createClass";import r from"@babel/runtime/helpers/inherits";import n from"@babel/runtime/helpers/possibleConstructorReturn";import i from"@babel/runtime/helpers/getPrototypeOf";import o from"@babel/runtime/helpers/defineProperty";import{Children as a,isValidElement as s,cloneElement as l,Component as c}from"react";import{A as u,C as h}from"./animation-38e60844.js";import{g as p,D as f,m as y,i as m,a as v,b as d,o as g,c as b,A as w,d as k,M as O,e as j,t as A,f as x,h as S,j as P,k as I}from"./link-bd9f6403.js";import{a as D,o as E,r as M,b as L}from"./events-62ddbb02.js";function R(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return V(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return V(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function V(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var C=function(){function r(){t(this,r),this.t=Date.now(),this.managers=[],this.step()}return e(r,[{key:"step",value:function(){var t,e=Date.now(),r=R(this.managers);try{for(r.s();!(t=r.n()).done;){t.value.step((e-this.t)/1e3)}}catch(t){r.e(t)}finally{r.f()}this.t=e,requestAnimationFrame(this.step.bind(this))}},{key:"add",value:function(t){var e=Math.max(this.managers.findIndex((function(e){return e.priority>=t.priority})),0);this.managers.splice(e,0,t)}},{key:"remove",value:function(t){this.managers.splice(this.managers.indexOf(t),1)}}],[{key:"get",value:function(){return window.Lively||(window.Lively=new r),window.Lively}}]),r}();function B(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return U(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return U(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function U(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var q=function(){function r(e,n,i){t(this,r),this.element=e,this.tracks=[],this.queue=[],this.playing=!0,this.culling=n,this.layout=i,this.transforms=["translate","scale","skew","rotate"]}return e(r,[{key:"purge",value:function(){if(!("cache"in this.element)){this.element.cache={strokeDasharray:1,borderRadius:p(this.element,"borderRadius"),webkitBackfaceVisibility:"hidden"};for(var t=0;t<this.element.style.length;t++){var e=this.element.style[t];this.element.cache[e]=this.element.style[e]}}for(var r in this.element.style={},this.element.cache)this.element.style[r]=this.element.cache[r]}},{key:"clear",value:function(){this.tracks=[],this.queue=[]}},{key:"add",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.immediate,n=void 0!==r&&r,i=e.composite,o=void 0===i||i;n&&this.clear(),o||!this.tracks.length?this.tracks.push(t):this.queue.push(t)}},{key:"remove",value:function(t){this.tracks.splice(this.tracks.indexOf(t),1),!this.tracks.length&&this.queue.length&&this.tracks.push(this.queue.shift())}},{key:"step",value:function(t){if(this.playing){for(var e=this.element.correction?{scale:f.scale}:{},r=this.tracks.length+ +!this.channel.isEmpty,n=0;n<r;n++){var i=this.tracks[n]||this.channel;y(e,i.get(this.element,this.culling)),i.step(t)&&this.remove(i)}this.apply(this.element,e)}}},{key:"apply",value:function(t,e){if(!m(e)){var r=[];for(var n in e){var i=e[n];if("scale"==n){if(this.layout){var o,a={x:[1/i.x[0],i.x[1]],y:[1/i.y[0],i.y[1]]},s=B(t.children);try{for(s.s();!(o=s.n()).done;){o.value.correction=a}}catch(t){s.e(t)}finally{s.f()}var l=e.borderRadius||t.cache.borderRadius;delete e.borderRadius,t.style.borderRadius="".concat(l[0]/i.x[0]).concat(l[1]," / ").concat(l[0]/i.y[0]).concat(l[1])}t.correction&&(i=v(i,t.correction,O.scale))}var c=this.transforms.indexOf(n);c>=0?r[c]="".concat(n,"(").concat(d(i)?g(i,", ",["x","y"]):b(i),")"):(n=w[n]||n,k(i)?t.style[n]="rgba(".concat(i.r[0],", ").concat(i.g[0],", ").concat(i.b[0],", ").concat(i.a[0],")"):t.style[n]=n in w?w[n](i):b(i))}(r=r.filter((function(t){return!!t}))).length&&(t.style.transform=r.join(" "))}}},{key:"initialize",value:function(t){this.apply(this.element,t.initials),this.channel=t.channel}}]),r}();function z(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function T(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?z(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):z(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function $(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return F(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return F(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function F(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var H=function(){function r(e){var n=e.priority,i=void 0===n?0:n,o=e.stagger,a=void 0===o?.1:o,s=e.culling,l=void 0===s||s,c=e.noDeform,u=void 0!==c&&c,h=e.paused,p=void 0!==h&&h;t(this,r),this.targets=[],this.priority=i,this.stagger=a,this.culling=l,this.noDeform=u,this.paused=p}return e(r,[{key:"register",value:function(){C.get().add(this)}},{key:"destroy",value:function(){this.targets=[],C.get().remove(this)}},{key:"purge",value:function(){var t,e=$(this.targets);try{for(e.s();!(t=e.n()).done;){t.value.purge()}}catch(t){e.e(t)}finally{e.f()}}},{key:"clear",value:function(){var t,e=$(this.targets);try{for(e.s();!(t=e.n()).done;){t.value.clear()}}catch(t){e.e(t)}finally{e.f()}}},{key:"set",value:function(t){var e=this;this.targets=t.map((function(t){return new q(t,e.culling,e.noDeform)}))}},{key:"play",value:function(t,e){if(!t.isEmpty)for(var r=0;r<this.targets.length;r++){var n=T(T({},e),{},{delay:(e.delay||0)+r*this.stagger});r<this.targets.length-1&&(n.callback=null),this.targets[r].add(t.play(n),e)}}},{key:"initialize",value:function(t){var e,r=$(this.targets);try{for(r.s();!(e=r.n()).done;){e.value.initialize(t)}}catch(t){r.e(t)}finally{r.f()}}},{key:"step",value:function(t){if(!this.paused){var e,r=$(this.targets);try{for(r.s();!(e=r.n()).done;){e.value.step(t)}}catch(t){r.e(t)}finally{r.f()}}}}]),r}();function N(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function X(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?N(Object(r),!0).forEach((function(e){o(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):N(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function _(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return W(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return W(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){s=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function W(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function G(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,o=i(t);if(e){var a=i(this).constructor;r=Reflect.construct(o,arguments,a)}else r=o.apply(this,arguments);return n(this,r)}}var J=function(n){r(o,c);var i=G(o);function o(e){var r;for(var n in t(this,o),(r=i.call(this,e)).animations={default:r.parse(r.props.animate||{})},r.props.animations||{})r.animations[n]=r.parse(r.props.animations[n]);return r.children=[],r.elements=[],r.stagger=j(r.props.stagger)?.1:r.props.stagger,r.cascade=j(r.props.cascade)?1:r.props.cascade,r.manager=new H({priority:r.props.group,stagger:r.stagger,culling:r.props.lazy,noDeform:r.props.noDeform,paused:r.props.paused}),r}return e(o,[{key:"parse",value:function(t){return u.isInstance(t)?t.use():d(t)?new h(t,this.props.initial):null}},{key:"update",value:function(){this.manager.clear(),this.manager.purge(),this.manager.initialize(this.animations.default)}},{key:"componentDidMount",value:function(){var t=this;this.scrollEventListener=A(this.onScroll.bind(this)),D("scroll",this.scrollEventListener),this.eventListener=this.onEvent.bind(this),E(o.events,this.elements,this.eventListener),this.manager.set(this.elements),this.manager.register(),this.update(),document.fonts.ready.then((function(){t.update(),t.inViewport=!1,t.props.group||(t.play(t.props.onMount),t.onScroll())}))}},{key:"componentWillUnmount",value:function(){M("scroll",this.scrollEventListener),L(o.events,this.elements,this.eventListener),this.manager.destroy()}},{key:"componentDidUpdate",value:function(){this.manager.paused=this.props.paused;var t,e=_(this.children);try{for(e.s();!(t=e.n()).done;){t.value.manager.paused=this.props.paused}}catch(t){e.e(t)}finally{e.f()}}},{key:"dispatch",value:function(t){x(this.props[t])&&this.props[t]()}},{key:"onEvent",value:function(t){switch(t.type){case"click":this.play(this.props.onClick);break;case"mouseenter":this.hover||(this.hover=!0,this.play(this.props.whileHover));break;case"mouseleave":this.hover&&(this.hover=!1,this.play(this.props.whileHover,{reverse:!0}));break;case"focus":this.focus||(this.focus=!0,this.play(this.props.whileFocus));break;case"blur":this.focus&&(this.focus=!1,this.play(this.props.whileFocus,{reverse:!0}))}}},{key:"getBoundingBox",value:function(){var t,e={x:Number.MAX_VALUE,y:Number.MAX_VALUE,right:0,bottom:0},r=_(this.elements.length?this.elements:this.children);try{for(r.s();!(t=r.n()).done;){var n=t.value,i=this.elements.length?n.getBoundingClientRect():n.getBoundingBox();e.y=Math.min(i.y,e.y),e.x=Math.min(i.x,e.x),e.right=Math.max(i.right,e.right),e.bottom=Math.max(i.bottom,e.bottom)}}catch(t){r.e(t)}finally{r.f()}return e}},{key:"onScroll",value:function(){if(this.props.whileViewport){var t=S(this.getBoundingBox(),this.props.viewportMargin),e=t.entered,r=t.left;e&&!this.inViewport&&(this.inViewport=!0,this.play(this.props.whileViewport),this.dispatch("onEnterViewport")),r&&this.inViewport&&(this.inViewport=!1,this.play(this.props.whileViewport,{reverse:!0,immediate:!0}),this.dispatch("onLeaveViewport"))}}},{key:"play",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=r.reverse,i=void 0!==n&&n,o=r.composite,a=void 0!==o&&o,s=r.immediate,l=void 0!==s&&s,c=r.delay,u=void 0===c?0:c,h=r.callback,p=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(!(!t||this.props.disabled||this.props.group>0&&!p)){P(t)||(t="default"),this.dispatch("onAnimationStart");var f=this.animations[t],y=f.length()*this.cascade,m=h;this.props.group||(h=function(){e.dispatch("onAnimationEnd"),x(m)&&m()});for(var v=0,d=0;d<this.children.length;d++)v=Math.max(v,this.children[d].play(t,{reverse:i,immediate:l,delay:u+y+this.stagger*d,callback:h},!0));return i&&!this.props.group||!i&&!this.children.length||(h=null),this.manager.play(f,{reverse:i,composite:a,immediate:l,delay:i?v:u,callback:h}),y+(i?v:u)}}},{key:"stop",value:function(){this.manager.clear()}},{key:"prerender",value:function(t){var e=this,r=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2];return a.map(t,(function(t){if(!s(t))return t;var i={pathLength:1};if(r){var a=e.elementIndex++;i.ref=function(t){return e.elements[a]=t}}var c=o.isInstance(t)&&n&&!t.props.stopPropagation;return c&&(i.index=e.childIndex++,i.group=e.props.group+1,i.ref=function(t){return e.children[i.index]=t},e.props.group||(i.active=e.props.active),I(i,X(X({},e.props),t.props),e.constructor.cascadingProps)),l(t,i,e.prerender(t.props.children,!1,!c))}))}},{key:"render",value:function(){return this.elementIndex=this.childIndex=0,this.prerender(this.props.children)}}],[{key:"isInstance",value:function(t){return t.type===o||t.type.prototype instanceof o}}]),o}();o(J,"events",["click","mouseenter","mouseleave","focus","blur"]),o(J,"cascadingProps",["animate","initial","animations","stagger","cascade"]),o(J,"defaultProps",{group:0,viewportMargin:.75,lazy:!0,paused:!1});export{J as A};
@@ -1 +0,0 @@
1
- import t from"@babel/runtime/helpers/slicedToArray";import e from"@babel/runtime/helpers/defineProperty";import r from"@babel/runtime/helpers/objectWithoutProperties";import n from"@babel/runtime/helpers/classCallCheck";import i from"@babel/runtime/helpers/createClass";import a from"@babel/runtime/helpers/inherits";import o from"@babel/runtime/helpers/possibleConstructorReturn";import u from"@babel/runtime/helpers/getPrototypeOf";import{b as s,l,e as c,g as f,U as h,f as p,n as v,q as y,x as d,r as m,k as b,s as g,i as w,L as O,u as j,P as k}from"./link-bd9f6403.js";function P(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return x(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return x(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}function x(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}var A=function t(e,r,n,i){if(s(e)){var a={};for(var o in e)a[o]=t(e[o],r[o],n,i);return a}return[i(e[0],r[0],n),e[1]]},I=function(t,e,r){return l(t)&&l(e)?t*(1-r)+e*r:r>.5?e:t},S={constant:function(t){return t},linear:I,ease:function(t,e,r){return I(t,e,(1-Math.cos(r*Math.PI))/2)},spring:function(t,e,r){return r=1-1*Math.exp(-3.6*r)*Math.cos(2.5*Math.pow(r,2)*Math.PI),I(t,e,r)}},z=function(t,e,r){var n,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,a={duration:i},o={},u=P(r);try{for(u.s();!(n=u.n()).done;){var s=n.value;"scale"==s?(a.scale={x:1,y:1},o.scale={x:1+(e.layout.width-t.layout.width)/t.layout.width,y:1+(e.layout.height-t.layout.height)/t.layout.height}):"translate"==s?(a.translate={x:0,y:0},o.translate={x:(e.layout.x-t.layout.x)*t.layout.parentWidth,y:(e.layout.y-t.layout.y)*t.layout.parentHeight}):(a[s]=t[s],o[s]=e[s])}}catch(t){u.e(t)}finally{u.f()}return new U(a,o)},M=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r.reverse,a=void 0!==i&&i,o=r.repeat,u=void 0===o?1:o,s=r.delay,l=void 0===s?0:s,c=r.alternate,f=void 0!==c&&c,h=r.callback;n(this,t),this.indices={},this.clip=e,this.t=0,this.T=e.duration*u+l,this.reverse=a,this.delay=l,this.alternate=f,this.callback=h}return i(t,[{key:"normalize",value:function(t,e,r){return c(t)&&(t=f(r,e)),h.toBase(t,e,r)}},{key:"getInterpolatedValue",value:function(t,e,r,n){if(p(e))return h.toBase(v(e(r,this.clip.duration),t),t,n);var i=this.reverse?-1:1,a=this.indices[t];(c(a)||(this.reverse?r-e[a].time:e[a].time-r)>0)&&(this.indices[t]=a=this.reverse?e.length-1:0);var o=e[a],u=e[a+i];if(this.reverse?u.time>r:u.time<r){this.indices[t]=a+=i;var s=["start","end"],l=s[+!this.reverse],f=s[+this.reverse];if(l in o||f in u)return this.normalize(l in o?o[l]:u[f],t,n);o=e[a],u=e[a+i]}var y=this.normalize(o.set,t,n),d=this.normalize(u.set,t,n),m=S[u.interpolate||this.clip.interpolate]||S.ease;return A(y,d,(r-o.time)/(u.time-o.time),m)}},{key:"get",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r={},n=this.t>=this.T;if(this.t<this.delay||e&&!n&&!y(t))return r;var i=this.t-this.delay,a=this.clip.duration,o=this.alternate&&Math.floor(i/a)%2==+!n;for(var u in i=n?a:i%a,i=d(this.reverse,o)?a-i:i,r.origin=this.clip.origin,this.clip.properties)r[u]=this.getInterpolatedValue(u,this.clip.properties[u],i,t);return r}},{key:"step",value:function(t){var e=this.t>=this.T;return this.t+=t,e&&p(this.callback)&&this.callback(),e}}]),t}();function C(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=u(t);if(e){var i=u(this).constructor;r=Reflect.construct(n,arguments,i)}else r=n.apply(this,arguments);return o(this,r)}}var E=function(t){a(r,M);var e=C(r);function r(t){var i;return n(this,r),(i=e.call(this,{duration:1/0,properties:{},origin:{x:.5,y:.5},interpolate:t})).isEmpty=!0,i.cache={},i}return i(r,[{key:"add",value:function(t,e){this.clip.properties[t]=e,this.isEmpty=!1}},{key:"getInterpolatedValue",value:function(t,e,r,n){c(e.internal.t)&&(e.internal.t=r),e.internal.t===r&&(this.cache[t]={});var i=e.internal.duration?Math.min((r-e.internal.t)/e.internal.duration,1):1,a=this.cache[t]||{};if(a.t===i)return a.value;var o=h.toBase(v(e(),t),t,n),u=a.from;if(1!=i){u||(u=h.toBase(f(n,t),t,n));var s=S[this.clip.interpolate]||S.linear;o=A(u,o,i,s)}return this.cache[t]={value:o,from:1!=i?u:null,t:i},o}}]),r}(),B=["duration","delay","repeat","alternate","interpolate","origin"];function R(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(!t)return;if("string"==typeof t)return T(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return T(t,e)}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){u=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(u)throw a}}}}function T(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function q(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function D(t){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?q(Object(n),!0).forEach((function(r){e(t,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var U=function(){function e(){var i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=i.duration,o=void 0===a?1:a,u=i.delay,s=i.repeat,l=i.alternate,c=i.interpolate,f=i.origin,h=void 0===f?{x:.5,y:.5}:f,p=r(i,B),v=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n(this,e),this.duration=o,this.origin=g(h),this.channel=new E(c);var y=this.parse(p,v),d=t(y,2);this.properties=d[0],this.initials=d[1],this.isEmpty=w(this.properties),this.interpolate=c,this.defaults={delay:u,repeat:s,alternate:l}}return i(e,[{key:"length",value:function(){return this.duration*(this.defaults.repeat||1)+(this.defaults.delay||0)}},{key:"parse",value:function(t,e){var r=this,n=function(n){var i=t[n];if(O.isInstance(i))return r.channel.add(n,i),delete t[n],"continue";if(p(i))return"continue";(i=j(i)?i:[i]).length<2?i.unshift(n in e?e[n]:null):c(i[0])||(e[n]=i[0]);for(var a=i.map((function(t){return r.sanitize(t,n)})),o=0;o<a.length;o++)r.quantize(a,o);t[n]=a};for(var i in t)n(i);for(var a in e=D({},e))e[a]=v(e[a],a);return[t,e]}},{key:"sanitize",value:function(t,e){t=s(t)?D({},t):{set:t},m(t,k)||(t={set:t}),"set"in t||(t.set=t.start||t.end),"time"in t&&t.time>this.duration&&delete t.time;var r,n=R(k);try{for(n.s();!(r=n.n()).done;){var i=r.value;i in t&&(t[i]=v(t[i],e))}}catch(t){n.e(t)}finally{n.f()}return t}},{key:"quantize",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e-1;if("time"in t[e])return t[e].time;if(0==e||e==t.length-1)return t[e].time=0==e?0:this.duration;var n=this.quantize(t,r,r);return t[e].time=n+(this.quantize(t,e+1,r)-n)*((e-r)/(e-r+1))}},{key:"play",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return new M(this,b(t,this.defaults))}}]),e}(),V={create:function(e){var r=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t.use=t.use.bind(t,e),t};return r.use=function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=e(r),i=t(n,2),a=i[0],o=i[1];return new U(a,o)},r},isInstance:function(t){return p(t)&&p(t.use)}};export{V as A,U as C,z as c};
@@ -1 +0,0 @@
1
- import t from"@babel/runtime/helpers/typeof";import n from"@babel/runtime/helpers/slicedToArray";import r from"@babel/runtime/helpers/defineProperty";function e(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(!t)return;if("string"==typeof t)return i(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return i(t,n)}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var e=0,o=function(){};return{s:o,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,u=!0,f=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return u=t.done,t},e:function(t){f=!0,a=t},f:function(){try{u||null==r.return||r.return()}finally{if(f)throw a}}}}function i(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var o=["set","start","end"],a=["%","px","em","rem","vw","vh","vmin","vmax","deg","rad"],u={rotate:"deg",skew:"deg",scale:"%",clip:"%",opacity:null,zIndex:null,lineHeight:null,fontWeight:null,length:null,default:"px"},f=[["x","y"],["r","g","b","a"],["left","top","right","bottom"]],c={translate:{x:[0,"px"],y:[0,"px"]},scale:{x:[1,"%"],y:[1,"%"]},clip:{left:[0,"%"],top:[0,"%"],right:[0,"%"],bottom:[0,"%"]},r:[127,null],g:[127,null],b:[127,null],a:[255,null]},l=["translate","scale","rotate","opacity","borderRadius","backgroundColor","color","zIndex","pointerEvents"],s={translate:function(t,n){return t+n},rotate:function(t,n){return t+n},scale:function(t,n){return t*n},default:function(t,n){return(t+n)/2}},d=["parentElement","clientHeight"],h={x:["clientWidth"],y:["clientHeight"],fontSize:["parentElement","style","fontSize"],default:["parentElement","clientWidth"],height:d,top:d,bottom:d},y={"%_px":function(t,n,r){var i,o=e(h[r]||h.default);try{for(o.s();!(i=o.n()).done;){n=n[i.value]}}catch(t){o.e(t)}finally{o.f()}return t*parseFloat(n)},em_px:function(t,n){return t*parseFloat(getComputedStyle(n).fontSize)},rem_px:function(t){return y.emtopx(t,document.body)},vw_px:function(t){return t*window.innerWidth},vh_px:function(t){return t*window.innerHeight},vmin_px:function(t){return t*Math.min(window.innerWidth,window.innerHeight)},vmax_px:function(t){return t*Math.max(window.innerWidth,window.innerHeight)},rad_deg:function(t){return 180*t/Math.PI}};function p(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(!t)return;if("string"==typeof t)return v(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return v(t,n)}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var e=0,i=function(){};return{s:i,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}function v(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var m=function(t,n){return t&&!n||!t&&n},g=function(t,n){return new Array(n).fill(0).map((function(n,r){return r<t.length?t[r]:t[t.length-1]}))},b=function(t,n){return t.filter((function(t){return!n.includes(t)}))},w=function(t,n){return Object.keys(t).some((function(t){return n.includes(t)}))},x=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=t.y,e=t.bottom,i=e-r;return{left:r>window.innerHeight+i*n,entered:r+i*n<window.innerHeight}},O=function(t){var n=t.getBoundingClientRect(),r=n.x,e=n.y,i=n.right,o=n.bottom;return!(i-r<1||o-e<1)&&(e<window.innerHeight&&o>0&&r<window.innerWidth&&i>0)},j=function(t){return null==t},S=function(t){return Array.isArray(t)},A=function(n){return!j(n)&&"object"===t(n)&&!S(n)},P=function(t){return t instanceof Function},k=function(t){return"string"==typeof t},I=function(t){return"number"==typeof t},M=function(t){return function(t,n){return Object.keys(t).length===n}(t,0)},D=function(t){return t.match(/^rgba?\(.*\)$/i)},C=function(t){return t.match(/^#[0-9a-f]{3,8}$/i)},E=function(t){return A(t)&&"r"in t},H=function(t){var n=new DOMMatrix(t),r=Math.sqrt(n.a*n.a+n.b*n.b)*Math.sign(n.a),e=Math.sqrt(n.c*n.c+n.d*n.d)*Math.sign(n.d),i=180*Math.atan2(n.d,n.c)/Math.PI-90,o=180*Math.atan2(n.b,n.a)/Math.PI;return{translate:{x:n.e,y:n.f},scale:{x:r,y:e},rotate:o,skew:{x:i,y:0}}},_=function(t,n){var r=getComputedStyle(t),e=H(r.transform);if(n in e)return G(e[n],n);if("length"===n)return[1-parseFloat(r.strokeDashoffset),null];var i=r[n];return D(i)?K(i):V(i)},W=function(t){var n,r=arguments.length>1&&void 0!==arguments[1]&&arguments[1],e=getComputedStyle(t),i=t.getBoundingClientRect(),o=i.x,a=i.y,u=i.width,f=i.height,c=(r?t.parentElement:document.body).getBoundingClientRect(),s={layout:{x:o=(o-c.x+u/2)/c.width,y:a=(a-c.y+f/2)/c.height,width:u,height:f,parentWidth:c.width,parentHeight:c.height}},d=p(l);try{for(d.s();!(n=d.n()).done;){var h=n.value;s[h]=e[h]}}catch(t){d.e(t)}finally{d.f()}return Object.assign(s,H(e.transform)),s},z=function(t,n){var r,e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object.keys(n),i=p(e);try{for(i.s();!(r=i.n()).done;){var o=r.value;j(n[o])||(t[o]=n[o])}}catch(t){i.e(t)}finally{i.f()}return t},T=function t(n,r,e){return A(n)?B(n,(function(n,i){return t(n,r[i],e)})):I(n[0])&&I(r[0])?[e(n[0],r[0]),n[1]]:r},$=function(t,n){for(var r in n){var e=s[r]||s.default;t[r]=r in t?T(t[r],n[r],e):n[r]}},B=function(t,n){var r={};for(var e in t)r[e]=n(t[e],e);return r},F=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250;return function(){var r=Date.now();r-t.LivelyTimestamp<n||(t.LivelyTimestamp=r,t())}};function R(t,n){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(t);n&&(e=e.filter((function(n){return Object.getOwnPropertyDescriptor(t,n).enumerable}))),r.push.apply(r,e)}return r}function U(t){for(var n=1;n<arguments.length;n++){var e=null!=arguments[n]?arguments[n]:{};n%2?R(Object(e),!0).forEach((function(n){r(t,n,e[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(e)):R(Object(e)).forEach((function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(e,n))}))}return t}function q(t,n){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,n){if(!t)return;if("string"==typeof t)return L(t,n);var r=Object.prototype.toString.call(t).slice(8,-1);"Object"===r&&t.constructor&&(r=t.constructor.name);if("Map"===r||"Set"===r)return Array.from(t);if("Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return L(t,n)}(t))||n&&t&&"number"==typeof t.length){r&&(t=r);var e=0,i=function(){};return{s:i,n:function(){return e>=t.length?{done:!0}:{done:!1,value:t[e++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,u=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){u=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(u)throw o}}}}function L(t,n){(null==n||n>t.length)&&(n=t.length);for(var r=0,e=new Array(n);r<n;r++)e[r]=t[r];return e}var G=function t(r,e){var i,o=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(j(r))return null;if("scale"!==e||o||A(r)||(r={x:r,y:r}),A(r)){var a,u=Object.keys(r),l=q(f);try{for(l.s();!(a=l.n()).done;){var s=a.value;if(w(r,s)){u=s;break}}}catch(t){l.e(t)}finally{l.f()}r=U({},r);var d,h=q(u);try{for(h.s();!(d=h.n()).done;){var y=d.value,p=e in c?c[e][y]:c[y];r[y]=y in r?t(r[y],e,!0):p}}catch(t){h.e(t)}finally{h.f()}return r}if(k(r)){if(C(r))return J(r);if(D(r))return K(r);var v=V(r),m=n(v,2);r=m[0],"%"==(i=m[1])&&(r/=100)}return[r,i=I(r)?Y.normalize(i,e):null]},J=function(t){var r=t.match(/^#([\da-f]{1,2})([\da-f]{1,2})([\da-f]{1,2})([\da-f]{2})?/i),e=n(r,5);e[0];var i=e[1],o=e[2],a=e[3],u=e[4],f=function(t){return[j(t)?255:parseInt(t.padStart(2,t),16),null]};return{r:f(i),g:f(o),b:f(a),a:f(u)}},K=function(t){var r=t.match(/^rgba?\((\d+)\D+(\d+)\D+(\d+)\D*(\d+)?\)/i),e=n(r,5);e[0];var i=e[1],o=e[2],a=e[3],u=e[4],f=function(t){return[j(t)?255:parseInt(t),null]};return{r:f(i),g:f(o),b:f(a),a:f(u)}},N=function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Object.keys(t);return r.map((function(n){return X(t[n])})).join(n)},Q=function(t){var n=A(t)?t:{},r=n.x,e=void 0===r?.5:r,i=n.y,o=void 0===i?.5:i;if(k(t))switch(t){case"left":e=0;break;case"right":e=1;break;case"top":o=0;break;case"bottom":o=1}return{x:e,y:o}},V=function(t){var n=t.toString().match(/^(-?[\d.]+)([^\d.]*)$/i);return n?[parseFloat(n[1]),n[2]||null]:[t,null]},X=function(t){return("%"==t[1]?100*t[0]:t[0])+(j(t[1])?"":t[1])},Y={fromProperty:function(t){return t in u?u[t]:u.default},toBase:function(t,n,r,e){if(A(t))return B(t,(function(t){return Y.toBase(t,n,r,e)}));if(!I(t[0]))return t;var i=Y.fromProperty(n);if(j(t[1])&&!j(i))return[t[0],i];var o=y["".concat(t[1],"_").concat(i)];return o?[o(t[0],r,e||n),i]:t},normalize:function(t,n){return a.includes(t)||j(t)&&n in u?t:Y.fromProperty(n)}},Z={origin:"transformOrigin",length:"strokeDashoffset",clip:"clipPath",transformOrigin:function(t){return"".concat(100*t.x,"% ").concat(100*t.y,"%")},strokeDashoffset:function(t){return 1-t[0]},clipPath:function(t){return"inset(".concat(N(t," ",["top","right","bottom","left"]),")")}},tt={bind:function(t,n){t.origin=t.origin||t;var r=function(){for(var r,e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];return(r=t.origin).call.apply(r,[n].concat(i))};return r.origin=t.origin,r},create:function(t){var n=tt.bind((function(t){if(P(t)){var r=tt.bind(n,{transform:t});return r.set=n.set,r.internal=n.internal,r}return this.transform(n.internal.value)}),{transform:function(t){return t}});return n.set=function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;n.internal.value=t,n.internal.duration=r,n.internal.t=null},n.internal={value:t,duration:0},n},isInstance:function(t){return P(t)&&P(t.set)}},nt=tt;export{Z as A,c as D,nt as L,s as M,o as P,Y as U,T as a,A as b,X as c,E as d,j as e,P as f,_ as g,x as h,M as i,k as j,z as k,I as l,$ as m,G as n,N as o,g as p,O as q,w as r,Q as s,F as t,S as u,b as v,W as w,m as x,l as y};