react-animated-numbers
Advanced tools
@@ -1,1 +0,1 @@ | ||
module.exports=function(t){var e={};function i(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,i),r.l=!0,r.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)i.d(n,r,function(e){return t[e]}.bind(null,r));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=2)}([function(t,e){t.exports=require("react")},function(t,e,i){"use strict";function n(t){return t&&"object"==typeof t&&"default"in t?t.default:t}Object.defineProperty(e,"__esModule",{value:!0});var r=n(i(3)),o=n(i(4)),s=n(i(0)),a=n(i(5));let l=void 0,d=void 0,c=[],u=t=>"undefined"!=typeof window&&window.requestAnimationFrame(t),h=t=>"undefined"!=typeof window&&window.cancelAnimationFrame(t),p=void 0,f=()=>Date.now(),m=void 0,g=void 0;const y=(t,e)=>d={fn:t,transform:e},v=t=>c=t,b=t=>l=t,w=t=>p=t,x=t=>m=t,k=t=>g=t;var A=Object.freeze({get bugfixes(){return l},get applyAnimatedValues(){return d},get colorNames(){return c},get requestFrame(){return u},get cancelFrame(){return h},get interpolation(){return p},get now(){return f},get defaultElement(){return m},get createAnimatedStyle(){return g},injectApplyAnimatedValues:y,injectColorNames:v,injectBugfixes:b,injectInterpolation:w,injectFrame:(t,e)=>{var i=[t,e];return u=i[0],h=i[1],i},injectNow:t=>f=t,injectDefaultElement:x,injectCreateAnimatedStyle:k});class S{attach(){}detach(){}getValue(){}getAnimatedValue(){return this.getValue()}addChild(t){}removeChild(t){}getChildren(){return[]}}const j=t=>Object.keys(t).map(e=>t[e]);class P extends S{constructor(){var t;super(...arguments),t=this,this.children=[],this.getChildren=()=>this.children,this.getPayload=function(e){return void 0===e&&(e=void 0),void 0!==e&&t.payload?t.payload[e]:t.payload||t}}addChild(t){0===this.children.length&&this.attach(),this.children.push(t)}removeChild(t){const e=this.children.indexOf(t);this.children.splice(e,1),0===this.children.length&&this.detach()}}class E extends P{constructor(){super(...arguments),this.payload=[],this.getAnimatedValue=()=>this.getValue(),this.attach=()=>this.payload.forEach(t=>t instanceof S&&t.addChild(this)),this.detach=()=>this.payload.forEach(t=>t instanceof S&&t.removeChild(this))}}class V extends P{constructor(){super(...arguments),this.payload={},this.getAnimatedValue=()=>this.getValue(!0),this.attach=()=>j(this.payload).forEach(t=>t instanceof S&&t.addChild(this)),this.detach=()=>j(this.payload).forEach(t=>t instanceof S&&t.removeChild(this))}getValue(t){void 0===t&&(t=!1);const e={};for(const i in this.payload){const n=this.payload[i];(!t||n instanceof S)&&(e[i]=n instanceof S?n[t?"getAnimatedValue":"getValue"]():n)}return e}}class O extends V{constructor(t){super(),!(t=t||{}).transform||t.transform instanceof S||(t=d.transform(t)),this.payload=t}}const C={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};class F{static create(t,e,i){if("function"==typeof t)return t;if(p&&t.output&&"string"==typeof t.output[0])return p(t);if(Array.isArray(t))return F.create({range:t,output:e,extrapolate:i||"extend"});let n=t.output,r=t.range||[0,1],o=t.easing||(t=>t),s="extend",a=t.map;void 0!==t.extrapolateLeft?s=t.extrapolateLeft:void 0!==t.extrapolate&&(s=t.extrapolate);let l="extend";return void 0!==t.extrapolateRight?l=t.extrapolateRight:void 0!==t.extrapolate&&(l=t.extrapolate),t=>{let e=function(t,e){for(var i=1;i<e.length-1&&!(e[i]>=t);++i);return i-1}(t,r);return function(t,e,i,n,r,o,s,a,l){let d=l?l(t):t;if(d<e){if("identity"===s)return d;"clamp"===s&&(d=e)}if(d>i){if("identity"===a)return d;"clamp"===a&&(d=i)}if(n===r)return n;if(e===i)return t<=e?n:r;e===-1/0?d=-d:i===1/0?d-=e:d=(d-e)/(i-e);d=o(d),n===-1/0?d=-d:r===1/0?d+=n:d=d*(r-n)+n;return d}(t,r[e],r[e+1],n[e],n[e+1],o,s,l,a)}}}const R="[-+]?\\d*\\.?\\d+";function T(){return"\\(\\s*("+Array.prototype.slice.call(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}const M=new RegExp("rgb"+T(R,R,R)),I=new RegExp("rgba"+T(R,R,R,R)),U=new RegExp("hsl"+T(R,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%")),q=new RegExp("hsla"+T(R,"[-+]?\\d*\\.?\\d+%","[-+]?\\d*\\.?\\d+%",R)),D=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,W=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,$=/^#([0-9a-fA-F]{6})$/,_=/^#([0-9a-fA-F]{8})$/;function K(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function L(t,e,i){const n=i<.5?i*(1+e):i+e-i*e,r=2*i-n,o=K(r,n,t+1/3),s=K(r,n,t),a=K(r,n,t-1/3);return Math.round(255*o)<<24|Math.round(255*s)<<16|Math.round(255*a)<<8}function z(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function N(t){return(parseFloat(t)%360+360)%360/360}function G(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function H(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function B(t){let e=function(t){let e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=$.exec(t))?parseInt(e[1]+"ff",16)>>>0:C.hasOwnProperty(t)?C[t]:(e=M.exec(t))?(z(e[1])<<24|z(e[2])<<16|z(e[3])<<8|255)>>>0:(e=I.exec(t))?(z(e[1])<<24|z(e[2])<<16|z(e[3])<<8|G(e[4]))>>>0:(e=D.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=_.exec(t))?parseInt(e[1],16)>>>0:(e=W.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=U.exec(t))?(255|L(N(e[1]),H(e[2]),H(e[3])))>>>0:(e=q.exec(t))?(L(N(e[1]),H(e[2]),H(e[3]))|G(e[4]))>>>0:null}(t);return null===e?t:(e=e||0,`rgba(${(4278190080&e)>>>24}, ${(16711680&e)>>>16}, ${(65280&e)>>>8}, ${(255&e)/255})`)}const Y=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Z=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,J=new RegExp(`(${Object.keys(C).join("|")})`,"g");class Q extends E{constructor(t,e,i){super(),this.getValue=()=>this.calc(...this.payload.map(t=>t.getValue())),this.updateConfig=(t,e)=>this.calc=F.create(t,e),this.interpolate=(t,e)=>new Q(this,t,e),this.payload=t instanceof E&&!t.updateConfig?t.payload:Array.isArray(t)?t:[t],this.calc=F.create(e,i)}}class X extends P{constructor(t){var e;super(),e=this,this.setValue=function(t,i){void 0===i&&(i=!0),e.value=t,i&&e.flush()},this.getValue=()=>this.value,this.updateStyles=()=>function t(e,i){"function"==typeof e.update?i.add(e):e.getChildren().forEach(e=>t(e,i))}(this,this.animatedStyles),this.updateValue=t=>this.flush(this.value=t),this.interpolate=(t,e)=>new Q(this,t,e),this.value=t,this.animatedStyles=new Set,this.done=!1,this.startPosition=t,this.lastPosition=t,this.lastVelocity=void 0,this.lastTime=void 0,this.controller=void 0}flush(){0===this.animatedStyles.size&&this.updateStyles(),this.animatedStyles.forEach(t=>t.update())}prepare(t){void 0===this.controller&&(this.controller=t),this.controller===t&&(this.startPosition=this.value,this.lastPosition=this.value,this.lastVelocity=t.isActive?this.lastVelocity:void 0,this.lastTime=t.isActive?this.lastTime:void 0,this.done=!1,this.animatedStyles.clear())}}class tt extends E{constructor(t){var e;super(),e=this,this.setValue=function(t,i){void 0===i&&(i=!0),Array.isArray(t)?t.length===e.payload.length&&t.forEach((t,n)=>e.payload[n].setValue(t,i)):e.payload.forEach((n,r)=>e.payload[r].setValue(t,i))},this.getValue=()=>this.payload.map(t=>t.getValue()),this.interpolate=(t,e)=>new Q(this,t,e),this.payload=t.map(t=>new X(t))}}function et(t,e){return null==t?e:t}function it(t){return void 0!==t?Array.isArray(t)?t:[t]:[]}function nt(t,e){if(typeof t!=typeof e)return!1;if("string"==typeof t||"number"==typeof t)return t===e;let i;for(i in t)if(!(i in e))return!1;for(i in e)if(t[i]!==e[i])return!1;return void 0!==i||t===e}function rt(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),n=1;n<e;n++)i[n-1]=arguments[n];return"function"==typeof t?t(...i):t}function ot(t){return Object.keys(t).map(e=>t[e])}function st(t){const e=function(t){return t.to,t.from,t.config,t.native,t.onStart,t.onRest,t.onFrame,t.children,t.reset,t.reverse,t.force,t.immediate,t.impl,t.inject,t.delay,t.attach,t.destroyed,t.interpolateTo,t.autoStart,t.ref,r(t,["to","from","config","native","onStart","onRest","onFrame","children","reset","reverse","force","immediate","impl","inject","delay","attach","destroyed","interpolateTo","autoStart","ref"])}(t),i=Object.keys(t).reduce((i,n)=>void 0!==e[n]?i:o({},i,{[n]:t[n]}),{});return o({to:e},i)}function at(t,e){let i=e[0],n=e[1];return o({},t,{[i]:new(Array.isArray(n)?tt:X)(n)})}function lt(t){const e=t.from,i=t.to,n=t.native,r=Object.entries(o({},e,i));return n?r.reduce(at,{}):o({},e,i)}function dt(t,e){return e&&("function"==typeof e?e(t):"object"==typeof e&&(e.current=t)),t}const ct=t=>"auto"===t;let ut={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const ht=["Webkit","Ms","Moz","O"];function pt(t,e,i){return null==e||"boolean"==typeof e||""===e?"":i||"number"!=typeof e||0===e||ut.hasOwnProperty(t)&&ut[t]?(""+e).trim():e+"px"}ut=Object.keys(ut).reduce((t,e)=>(ht.forEach(i=>t[((t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1))(i,e)]=t[e]),t),ut);const ft={};k(t=>new O(t)),x("div"),w((function(t){const e=t.output.map(t=>t.replace(Z,B)).map(t=>t.replace(J,B)),i=e[0].match(Y).map(()=>[]);e.forEach(t=>{t.match(Y).forEach((t,e)=>i[e].push(+t))});const n=e[0].match(Y).map((e,n)=>F.create(o({},t,{output:i[n]})));return t=>{let i=0;return e[0].replace(Y,()=>n[i++](t)).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,(t,e,i,n,r)=>`rgba(${Math.round(e)}, ${Math.round(i)}, ${Math.round(n)}, ${r})`)}})),v(C),b((function(t,e){const i=t.from,n=t.to,r=t.children;if(!ot(n).some(ct)&&!ot(i).some(ct))return;let l=r(lt(t));if(!l)return;Array.isArray(l)&&(l={type:"div",props:{children:l}});const d=l.props.style;return s.createElement(l.type,o({key:l.key?l.key:void 0},l.props,{style:o({},d,{position:"absolute",visibility:"hidden"}),ref:r=>{if(r){let s,l,d=a.findDOMNode(r),c=getComputedStyle(d);if("border-box"===c.boxSizing)s=d.offsetWidth,l=d.offsetHeight;else{const t=parseFloat(c.paddingLeft||0)+parseFloat(c.paddingRight||0),e=parseFloat(c.paddingTop||0)+parseFloat(c.paddingBottom||0),i=parseFloat(c.borderLeftWidth||0)+parseFloat(c.borderRightWidth||0),n=parseFloat(c.borderTopWidth||0)+parseFloat(c.borderBottomWidth||0);s=d.offsetWidth-t-i,l=d.offsetHeight-e-n}const u=((t,e)=>(i,n)=>{let r=n[0],s=n[1];return o({},i,{[r]:"auto"===s?~r.indexOf("height")?e:t:s})})(s,l);e(o({},t,{from:Object.entries(i).reduce(u,i),to:Object.entries(n).reduce(u,n)}))}}}))})),y((t,e)=>{if(!t.nodeType||void 0===t.setAttribute)return!1;{const o=e.style,s=e.children,a=e.scrollTop,l=e.scrollLeft,d=r(e,["style","children","scrollTop","scrollLeft"]);void 0!==a&&(t.scrollTop=a),void 0!==l&&(t.scrollLeft=l),void 0!==s&&(t.textContent=s);for(let e in o)if(o.hasOwnProperty(e)){var i=0===e.indexOf("--"),n=pt(e,o[e],i);"float"===e&&(e="cssFloat"),i?t.style.setProperty(e,n):t.style[e]=n}for(let e in d){const i=ft[e]||(ft[e]=e.replace(/([A-Z])/g,t=>"-"+t.toLowerCase()));void 0!==t.getAttribute(i)&&t.setAttribute(i,d[e])}}},t=>t);let mt=!1;const gt=new Set,yt=()=>{let t=f();for(let e of gt){let i=!0,n=!0;for(let r=0;r<e.configs.length;r++){let o,s,a=e.configs[r];for(let r=0;r<a.animatedValues.length;r++){let l=a.animatedValues[r];if(l.done)continue;let d=a.fromValues[r],c=a.toValues[r],u=l.lastPosition,h=c instanceof S,p=Array.isArray(a.initialVelocity)?a.initialVelocity[r]:a.initialVelocity;if(h&&(c=c.getValue()),a.immediate||!h&&!a.decay&&d===c)l.updateValue(c),l.done=!0;else if(a.delay&&t-e.startTime<a.delay)i=!1;else if(n=!1,"string"!=typeof d&&"string"!=typeof c){if(void 0!==a.duration)u=d+a.easing((t-e.startTime-a.delay)/a.duration)*(c-d),o=t>=e.startTime+a.delay+a.duration;else if(a.decay)u=d+p/(1-.998)*(1-Math.exp(-(1-.998)*(t-e.startTime))),o=Math.abs(l.lastPosition-u)<.1,o&&(c=u);else{s=void 0!==l.lastTime?l.lastTime:t,p=void 0!==l.lastVelocity?l.lastVelocity:a.initialVelocity,t>s+64&&(s=t);let e=Math.floor(t-s);for(let t=0;t<e;++t){p+=1*((-a.tension*(u-c)+-a.friction*p)/a.mass)/1e3,u+=1*p/1e3}let i=!(!a.clamp||0===a.tension)&&(d<c?u>c:u<c),n=Math.abs(p)<=a.precision,r=0===a.tension||Math.abs(c-u)<=a.precision;o=i||n&&r,l.lastVelocity=p,l.lastTime=t}h&&!a.toValues[r].done&&(o=!1),o?(l.value!==c&&(u=c),l.done=!0):i=!1,l.updateValue(u),l.lastPosition=u}else l.updateValue(c),l.done=!0}!e.props.onFrame&&e.props.native||(e.animatedProps[a.name]=a.interpolation.getValue())}!e.props.onFrame&&e.props.native||(!e.props.native&&e.onUpdate&&e.onUpdate(),e.props.onFrame&&e.props.onFrame(e.animatedProps)),i&&(gt.delete(e),e.debouncedOnEnd({finished:!0,noChange:n}))}gt.size?u(yt):mt=!1},vt=t=>{gt.has(t)&>.delete(t)};class bt{constructor(t,e){void 0===e&&(e={native:!0,interpolateTo:!0,autoStart:!0}),this.getValues=()=>this.props.native?this.interpolations:this.animatedProps,this.dependents=new Set,this.isActive=!1,this.hasChanged=!1,this.props={},this.merged={},this.animations={},this.interpolations={},this.animatedProps={},this.configs=[],this.frame=void 0,this.startTime=void 0,this.lastTime=void 0,this.update(o({},t,e))}update(t){this.props=o({},this.props,t);let e=this.props.interpolateTo?st(this.props):this.props,i=e.from,n=void 0===i?{}:i,r=e.to,s=void 0===r?{}:r,a=e.config,l=void 0===a?{}:a,d=e.delay,u=void 0===d?0:d,h=e.reverse,p=e.attach,f=e.reset,m=e.immediate,g=e.autoStart,y=e.ref;if(h){var v=[s,n];n=v[0],s=v[1]}this.hasChanged=!1;let b=p&&p(this),w=f?{}:this.merged;if(this.merged=o({},n,w,s),this.animations=Object.entries(this.merged).reduce((t,e,i)=>{let r=e[0],s=e[1],a=!f&&t[r]||{};const d="number"==typeof s,h="string"==typeof s&&!s.startsWith("#")&&!/\d/.test(s)&&!c[s],p=!d&&!h&&Array.isArray(s);let g=void 0!==n[r]?n[r]:s,y=d||p||h?s:1,v=rt(l,r);if(b&&(y=b.animations[r].parent),void 0===v.decay&&nt(a.changes,s))return t;{let e,i;if(this.hasChanged=!0,d||h)e=i=a.parent||new X(g);else if(p)e=i=a.parent||new tt(g);else{const t=a.interpolation&&a.interpolation.calc(a.parent.value);a.parent?(e=a.parent,e.setValue(0,!1)):e=new X(0);const n={output:[void 0!==t?t:g,s]};a.interpolation?(i=a.interpolation,a.interpolation.updateConfig(n)):i=e.interpolate(n)}rt(m,r)&&e.setValue(s,!1);const n=it(e.getPayload());return n.forEach(t=>t.prepare(this)),o({},t,{[r]:o({},a,{name:r,parent:e,interpolation:i,animatedValues:n,changes:s,fromValues:it(e.getValue()),toValues:it(b?y.getPayload():y),immediate:rt(m,r),delay:et(v.delay,u||0),initialVelocity:et(v.velocity,0),clamp:et(v.clamp,!1),precision:et(v.precision,.01),tension:et(v.tension,170),friction:et(v.friction,26),mass:et(v.mass,1),duration:v.duration,easing:et(v.easing,t=>t),decay:v.decay})})}},this.animations),this.hasChanged){this.configs=ot(this.animations),this.animatedProps={},this.interpolations={};for(let t in this.animations)this.interpolations[t]=this.animations[t].interpolation,this.animatedProps[t]=this.animations[t].interpolation.getValue()}for(var x=arguments.length,k=new Array(x>1?x-1:0),A=1;A<x;A++)k[A-1]=arguments[A];y||!g&&!k.length||this.start(...k);const S=k[0],j=k[1];return this.onEnd="function"==typeof S&&S,this.onUpdate=j,this.getValues()}start(t,e){var i;return this.startTime=f(),this.isActive&&this.stop(),this.isActive=!0,this.onEnd="function"==typeof t&&t,this.onUpdate=e,this.props.onStart&&this.props.onStart(),i=this,gt.has(i)||(gt.add(i),mt||u(yt),mt=!0),new Promise(t=>this.resolve=t)}stop(t){void 0===t&&(t=!1),t&&ot(this.animations).forEach(t=>t.changes=void 0),this.debouncedOnEnd({finished:t})}destroy(){vt(this),this.props={},this.merged={},this.animations={},this.interpolations={},this.animatedProps={},this.configs=[]}debouncedOnEnd(t){vt(this),this.isActive=!1;const e=this.onEnd;this.onEnd=null,e&&e(t),this.resolve&&this.resolve(),this.resolve=null}}class wt extends V{constructor(t,e){super(),t.style&&(t=o({},t,{style:g(t.style)})),this.payload=t,this.update=e,this.attach()}}function xt(t){class e extends s.Component{constructor(t){super(),this.callback=()=>{if(this.node){!1===d.fn(this.node,this.propsAnimated.getAnimatedValue(),this)&&this.forceUpdate()}},this.attachProps(t)}componentWillUnmount(){this.propsAnimated&&this.propsAnimated.detach()}setNativeProps(t){!1===d.fn(this.node,t,this)&&this.forceUpdate()}attachProps(t){t.forwardRef;let e=r(t,["forwardRef"]);const i=this.propsAnimated;this.propsAnimated=new wt(e,this.callback),i&&i.detach()}shouldComponentUpdate(t){const e=t.style,i=r(t,["style"]),n=this.props,o=n.style;return(!nt(r(n,["style"]),i)||!nt(o,e))&&(this.attachProps(t),!0)}render(){const e=this.propsAnimated.getValue(),i=(e.scrollTop,e.scrollLeft,r(e,["scrollTop","scrollLeft"]));return s.createElement(t,o({},i,{ref:t=>this.node=dt(t,this.props.forwardRef)}))}}return s.forwardRef((t,i)=>s.createElement(e,o({},t,{forwardRef:i})))}const kt={default:{tension:170,friction:26},gentle:{tension:120,friction:14},wobbly:{tension:180,friction:12},stiff:{tension:210,friction:20},slow:{tension:280,friction:60},molasses:{tension:280,friction:120}};class At extends s.Component{constructor(){super(...arguments),this.state={lastProps:{from:{},to:{}},propsChanged:!1,internal:!1},this.controller=new bt(null,null),this.didUpdate=!1,this.didInject=!1,this.finished=!0,this.start=()=>{this.finished=!1;let t=this.mounted;this.controller.start(e=>this.finish(o({},e,{wasMounted:t})),this.update)},this.stop=()=>this.controller.stop(!0),this.update=()=>this.mounted&&this.setState({internal:!0}),this.finish=t=>{let e=t.finished,i=t.noChange,n=t.wasMounted;this.finished=!0,this.mounted&&e&&(!this.props.onRest||!n&&i||this.props.onRest(this.controller.merged),this.mounted&&this.didInject&&(this.afterInject=lt(this.props),this.setState({internal:!0})),this.mounted&&(this.didInject||this.props.after)&&this.setState({internal:!0}),this.didInject=!1)}}componentDidMount(){this.componentDidUpdate(),this.mounted=!0}componentWillUnmount(){this.mounted=!1,this.stop()}static getDerivedStateFromProps(t,e){let i=e.internal,n=e.lastProps;const r=t.from,o=t.to,s=t.reset,a=t.force;return{propsChanged:!nt(o,n.to)||!nt(r,n.from)||s&&!i||a&&!i,lastProps:t,internal:!1}}render(){const t=this.props.children,e=this.state.propsChanged;if(this.props.inject&&e&&!this.injectProps){const t=this.props.inject(this.props,t=>{this.injectProps=t,this.setState({internal:!0})});if(t)return t}(this.injectProps||e)&&(this.didInject=!1,this.injectProps?(this.controller.update(this.injectProps),this.didInject=!0):e&&this.controller.update(this.props),this.didUpdate=!0,this.afterInject=void 0,this.injectProps=void 0);let i=o({},this.controller.getValues(),this.afterInject);return this.finished&&(i=o({},i,this.props.after)),Object.keys(i).length?t(i):null}componentDidUpdate(){this.didUpdate&&this.start(),this.didUpdate=!1}}At.defaultProps={from:{},to:{},config:kt.default,native:!1,immediate:!1,reset:!1,force:!1,inject:l};class St extends s.PureComponent{constructor(){super(...arguments),this.first=!0,this.instances=new Set,this.hook=(t,e,i,n)=>(this.instances.add(t),(n?e===i-1:0===e)?void 0:Array.from(this.instances)[n?e+1:e-1])}render(){const t=this.props,e=t.items,i=t.children,n=t.from,a=void 0===n?{}:n,l=t.initial,d=t.reverse,c=t.keys,u=t.delay,h=t.onRest,p=r(t,["items","children","from","initial","reverse","keys","delay","onRest"]),f=it(e);return it(f).map((t,e)=>s.createElement(At,o({onRest:0===e?h:null,key:"function"==typeof c?c(t):it(c)[e],from:this.first&&void 0!==l?l||{}:a},p,{delay:0===e&&u||void 0,attach:t=>this.hook(t,e,f.length,d),children:n=>{const r=i(t,e);return r?r(n):null}})))}componentDidUpdate(t){this.first=!1,t.items!==this.props.items&&this.instances.clear()}}St.defaultProps={keys:t=>t};class jt extends s.PureComponent{constructor(){var t;super(...arguments),t=this,this.guid=0,this.state={props:{},resolve:()=>null,last:!0,index:0},this.next=function(e,i,n){return void 0===i&&(i=!0),void 0===n&&(n=0),t.running=!0,new Promise(r=>{t.mounted&&t.setState(t=>({props:e,resolve:r,last:i,index:n}),()=>t.running=!1)})}}componentDidMount(){this.mounted=!0,this.componentDidUpdate({})}componentWillUnmount(){this.mounted=!1}componentDidUpdate(t){var e=this;const i=this.props,n=i.states,r=i.filter,o=i.state;if((t.state!==this.props.state||this.props.reset&&!this.running||!nt(n[o],t.states[t.state]))&&n&&o&&n[o]){const t=++this.guid,i=n[o];if(i)if(Array.isArray(i)){let e=Promise.resolve();for(let n=0;n<i.length;n++){let o=n,s=i[o],a=o===i.length-1;e=e.then(()=>t===this.guid&&this.next(r(s),a,o))}}else if("function"==typeof i){let n=0;i((function(i,o){return void 0===o&&(o=!1),t===e.guid&&e.next(r(i),o,n++)}),()=>u(()=>this.instance&&this.instance.stop()),this.props)}else this.next(r(n[o]))}}render(){const t=this.state,e=t.props,i=t.resolve,n=t.last,a=t.index;if(!e||0===Object.keys(e).length)return null;let l=this.props,d=(l.state,l.filter,l.states,l.config),c=l.primitive,u=l.onRest,h=l.forwardRef,p=r(l,["state","filter","states","config","primitive","onRest","forwardRef"]);return Array.isArray(d)&&(d=d[a]),s.createElement(c,o({ref:t=>this.instance=dt(t,h),config:d},p,e,{onRest:t=>{i(t),u&&n&&u(t)}}))}}jt.defaultProps={state:"__default"};const Pt=s.forwardRef((t,e)=>s.createElement(jt,o({},t,{forwardRef:e})));Pt.create=t=>function(e,i){return void 0===i&&(i=t=>t),("function"==typeof e||Array.isArray(e))&&(e={__default:e}),n=>s.createElement(jt,o({primitive:t,states:e,filter:i},n))},Pt.Spring=t=>Pt.create(At)(t,st),Pt.Trail=t=>Pt.create(St)(t,st);let Et=0,Vt=t=>{let e=t.items,i=t.keys,n=r(t,["items","keys"]);return e=it(void 0!==e?e:null),i="function"==typeof i?e.map(i):it(i),o({items:e,keys:i.map(t=>String(t))},n)};class Ot extends s.PureComponent{componentDidMount(){this.mounted=!0}componentWillUnmount(){this.mounted=!1}constructor(t){super(t),this.destroyItem=(t,e,i)=>n=>{const r=this.props,o=r.onRest,s=r.onDestroyed;this.mounted&&(s&&s(t),this.setState(t=>({deleted:t.deleted.filter(t=>t.key!==e)})),o&&o(t,i,n))},this.state={first:!0,transitions:[],current:{},deleted:[],prevProps:t}}static getDerivedStateFromProps(t,e){let i=e.first,n=e.prevProps,s=r(e,["first","prevProps"]),a=Vt(t),l=a.items,d=a.keys,c=a.initial,u=a.from,h=a.enter,p=a.leave,f=a.update,m=a.trail,g=void 0===m?0:m,y=a.unique,v=a.config,b=Vt(n),w=b.keys,x=b.items,k=o({},s.current),A=[...s.deleted],S=Object.keys(k),j=new Set(S),P=new Set(d),E=d.filter(t=>!j.has(t)),V=s.transitions.filter(t=>!t.destroyed&&!P.has(t.originalKey)).map(t=>t.originalKey),O=d.filter(t=>j.has(t)),C=0;E.forEach(t=>{y&&A.find(e=>e.originalKey===t)&&(A=A.filter(e=>e.originalKey!==t));const e=d.indexOf(t),n=l[e];k[t]={state:"enter",originalKey:t,key:y?String(t):Et++,item:n,trail:C+=g,config:rt(v,n,"enter"),from:rt(i&&void 0!==c?c||{}:u,n),to:rt(h,n)}}),V.forEach(t=>{const e=w.indexOf(t),i=x[e];A.push(o({},k[t],{state:"leave",destroyed:!0,left:w[Math.max(0,e-1)],right:w[Math.min(w.length,e+1)],trail:C+=g,config:rt(v,i,"leave"),to:rt(p,i)})),delete k[t]}),O.forEach(t=>{const e=d.indexOf(t),i=l[e];k[t]=o({},k[t],{item:i,state:"update",trail:C+=g,config:rt(v,i,"update"),to:rt(f,i)})});let F=d.map(t=>k[t]);return A.forEach(t=>{let e,i=t.left,n=t.right,o=r(t,["left","right"]);-1!==(e=F.findIndex(t=>t.originalKey===i))&&(e+=1),-1===e&&(e=F.findIndex(t=>t.originalKey===n)),-1===e&&(e=A.findIndex(t=>t.originalKey===i)),-1===e&&(e=A.findIndex(t=>t.originalKey===n)),e=Math.max(0,e),F=[...F.slice(0,e),o,...F.slice(e)]}),{first:i&&0===E.length,transitions:F,current:k,deleted:A,prevProps:t}}render(){const t=this.props,e=(t.initial,t.from,t.enter,t.leave,t.update,t.onDestroyed,t.keys,t.items,t.onFrame),i=t.onRest,n=t.onStart,a=(t.trail,t.config,t.children),l=(t.unique,t.reset),d=r(t,["initial","from","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","trail","config","children","unique","reset"]);return this.state.transitions.map((t,r)=>{let c=t.state,u=t.key,h=t.item,p=t.from,f=t.to,m=t.trail,g=t.config,y=t.destroyed;return s.createElement(Pt,o({reset:l&&"enter"===c,primitive:At,state:c,filter:st,states:{[c]:f},key:u,onRest:y?this.destroyItem(h,u,c):i&&(t=>i(h,c,t)),onStart:n&&(()=>n(h,c)),onFrame:e&&(t=>e(h,c,t)),delay:m,config:g},d,{from:p,children:t=>{const e=a(h,c,r);return e?e(t):null}}))})}}Ot.defaultProps={keys:t=>t,unique:!1,reset:!1};const Ct=["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].reduce((t,e)=>(t[e]=xt(e),t),xt);e.Spring=At,e.Keyframes=Pt,e.Transition=Ot,e.Trail=St,e.Controller=bt,e.config=kt,e.animated=Ct,e.interpolate=(t,e,i)=>t&&new Q(t,e,i),e.Globals=A},function(t,e,i){"use strict";i.r(e);var n=i(0),r=i.n(n),o=i(1);const s=[0,1,2,3,4,5,6,7,8,9];e.default=({animateToNumber:t,fontStyle:e,config:i,includeComma:a,delay:l,onFinish:d,onStart:c,animationType:u="random"})=>{const h=(t=>{const e=r.a.useRef();return r.a.useEffect(()=>{e.current=t}),void 0===e.current?0:e.current})(t),p=String(Math.abs(t)),f=String(Math.abs(h)),m=Array.from(p,Number),g=Array.from(f,Number),[y,v]=r.a.useState(!1),[b,w]=r.a.useState(!1);if(r.a.useEffect(()=>{if(y&&c){if(setTimeout(()=>{c(),v(!1)},void 0===l?0:l),d&&"random"===u){let t=500;i&&i.duration&&(t=i.duration),setTimeout(()=>{d()},t)}}},[y]),r.a.useEffect(()=>{if(b&&d&&"calm"===u){const t=S(0);setTimeout(()=>{d(),w(!1)},t)}},[b]),a){const t=new Array(Math.ceil(p.length/3)).fill(0),e=new Array(Math.ceil(f.length/3)).fill(0);t.forEach((t,e)=>{0!==e&&m.splice(p.length-3*e,0,",")}),e.forEach((t,e)=>{0!==e&&g.splice(f.length-3*e,0,",")})}const[x,k]=r.a.useState(0),A=r.a.useRef(null),S=Object(n.useCallback)(t=>{const e=m.slice(t).filter(t=>"string"==typeof t).length;return l?l+300*(m.length-1-t-e):i&&i.duration?(m.length-1-t-e)*i.duration:300*(m.length-1-t-e)},[m,b]);return r.a.useEffect(()=>{k(A.current.clientHeight)},[t]),r.a.createElement(r.a.Fragment,null,0!==x&&r.a.createElement("div",{style:{display:"flex",flexDirection:"row"}},t<0&&r.a.createElement("div",{style:e},"-"),m.map((t,n)=>"string"==typeof t?r.a.createElement("div",{key:n,style:{...e}},t):r.a.createElement("div",{key:n,style:{height:x,overflow:"hidden"}},r.a.createElement(o.Spring,{from:{transform:"translateY(0px)"},to:{transform:`translateY(${x*m[n]*-1})`},config:i,delay:"calm"===u?S(n):null,onRest:()=>w(!0),onStart:()=>v(!0)},t=>s.map((i,n)=>r.a.createElement("div",{key:n,style:{...t,...e}},i)))))),r.a.createElement("div",{ref:A,style:{position:"absolute",top:-9999,...e}},0))}},function(t,e,i){"use strict";function n(t,e){if(null==t)return{};var i,n,r={},o=Object.keys(t);for(n=0;n<o.length;n++)i=o[n],e.indexOf(i)>=0||(r[i]=t[i]);return r}i.r(e),i.d(e,"default",(function(){return n}))},function(t,e,i){"use strict";function n(){return(n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)Object.prototype.hasOwnProperty.call(i,n)&&(t[n]=i[n])}return t}).apply(this,arguments)}i.r(e),i.d(e,"default",(function(){return n}))},function(t,e){t.exports=require("react-dom")}]); | ||
(()=>{"use strict";var t={122:(t,e,i)=>{function r(){return(r=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(t[r]=i[r])}return t}).apply(this,arguments)}i.r(e),i.d(e,{default:()=>r})},756:(t,e,i)=>{function r(t,e){if(null==t)return{};var i,r,n={},s=Object.keys(t);for(r=0;r<s.length;r++)i=s[r],e.indexOf(i)>=0||(n[i]=t[i]);return n}i.r(e),i.d(e,{default:()=>r})},823:(t,e,i)=>{function r(t){return t&&"object"==typeof t&&"default"in t?t.default:t}var n=r(i(756)),s=r(i(122)),o=r(i(297)),a=r(i(268));let l,d,h,c,p,u=[],f=t=>"undefined"!=typeof window&&window.requestAnimationFrame(t),m=()=>Date.now();const g=(t,e)=>d={fn:t,transform:e},y=t=>u=t,v=t=>l=t,b=t=>h=t,x=t=>c=t,k=t=>p=t;class w{attach(){}detach(){}getValue(){}getAnimatedValue(){return this.getValue()}addChild(t){}removeChild(t){}getChildren(){return[]}}const A=t=>Object.keys(t).map((e=>t[e]));class P extends w{constructor(){var t;super(...arguments),t=this,this.children=[],this.getChildren=()=>this.children,this.getPayload=function(e){return void 0===e&&(e=void 0),void 0!==e&&t.payload?t.payload[e]:t.payload||t}}addChild(t){0===this.children.length&&this.attach(),this.children.push(t)}removeChild(t){const e=this.children.indexOf(t);this.children.splice(e,1),0===this.children.length&&this.detach()}}class S extends P{constructor(){super(...arguments),this.payload=[],this.getAnimatedValue=()=>this.getValue(),this.attach=()=>this.payload.forEach((t=>t instanceof w&&t.addChild(this))),this.detach=()=>this.payload.forEach((t=>t instanceof w&&t.removeChild(this)))}}class E extends P{constructor(){super(...arguments),this.payload={},this.getAnimatedValue=()=>this.getValue(!0),this.attach=()=>A(this.payload).forEach((t=>t instanceof w&&t.addChild(this))),this.detach=()=>A(this.payload).forEach((t=>t instanceof w&&t.removeChild(this)))}getValue(t){void 0===t&&(t=!1);const e={};for(const i in this.payload){const r=this.payload[i];(!t||r instanceof w)&&(e[i]=r instanceof w?r[t?"getAnimatedValue":"getValue"]():r)}return e}}class V extends E{constructor(t){super(),!(t=t||{}).transform||t.transform instanceof w||(t=d.transform(t)),this.payload=t}}const j={transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199};class O{static create(t,e,i){if("function"==typeof t)return t;if(h&&t.output&&"string"==typeof t.output[0])return h(t);if(Array.isArray(t))return O.create({range:t,output:e,extrapolate:i||"extend"});let r=t.output,n=t.range||[0,1],s=t.easing||(t=>t),o="extend",a=t.map;void 0!==t.extrapolateLeft?o=t.extrapolateLeft:void 0!==t.extrapolate&&(o=t.extrapolate);let l="extend";return void 0!==t.extrapolateRight?l=t.extrapolateRight:void 0!==t.extrapolate&&(l=t.extrapolate),t=>{let e=function(t,e){for(var i=1;i<e.length-1&&!(e[i]>=t);++i);return i-1}(t,n);return function(t,e,i,r,n,s,o,a,l){let d=l?l(t):t;if(d<e){if("identity"===o)return d;"clamp"===o&&(d=e)}if(d>i){if("identity"===a)return d;"clamp"===a&&(d=i)}return r===n?r:e===i?t<=e?r:n:(e===-1/0?d=-d:i===1/0?d-=e:d=(d-e)/(i-e),d=s(d),r===-1/0?d=-d:n===1/0?d+=r:d=d*(n-r)+r,d)}(t,n[e],n[e+1],r[e],r[e+1],s,o,l,a)}}}const C="[-+]?\\d*\\.?\\d+",R=C+"%";function F(){return"\\(\\s*("+Array.prototype.slice.call(arguments).join(")\\s*,\\s*(")+")\\s*\\)"}const M=new RegExp("rgb"+F(C,C,C)),T=new RegExp("rgba"+F(C,C,C,C)),I=new RegExp("hsl"+F(C,R,R)),U=new RegExp("hsla"+F(C,R,R,C)),q=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,D=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,W=/^#([0-9a-fA-F]{6})$/,$=/^#([0-9a-fA-F]{8})$/;function L(t,e,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?t+6*(e-t)*i:i<.5?e:i<2/3?t+(e-t)*(2/3-i)*6:t}function K(t,e,i){const r=i<.5?i*(1+e):i+e-i*e,n=2*i-r,s=L(n,r,t+1/3),o=L(n,r,t),a=L(n,r,t-1/3);return Math.round(255*s)<<24|Math.round(255*o)<<16|Math.round(255*a)<<8}function z(t){const e=parseInt(t,10);return e<0?0:e>255?255:e}function N(t){return(parseFloat(t)%360+360)%360/360}function _(t){const e=parseFloat(t);return e<0?0:e>1?255:Math.round(255*e)}function G(t){const e=parseFloat(t);return e<0?0:e>100?1:e/100}function H(t){let e=function(t){let e;return"number"==typeof t?t>>>0===t&&t>=0&&t<=4294967295?t:null:(e=W.exec(t))?parseInt(e[1]+"ff",16)>>>0:j.hasOwnProperty(t)?j[t]:(e=M.exec(t))?(z(e[1])<<24|z(e[2])<<16|z(e[3])<<8|255)>>>0:(e=T.exec(t))?(z(e[1])<<24|z(e[2])<<16|z(e[3])<<8|_(e[4]))>>>0:(e=q.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+"ff",16)>>>0:(e=$.exec(t))?parseInt(e[1],16)>>>0:(e=D.exec(t))?parseInt(e[1]+e[1]+e[2]+e[2]+e[3]+e[3]+e[4]+e[4],16)>>>0:(e=I.exec(t))?(255|K(N(e[1]),G(e[2]),G(e[3])))>>>0:(e=U.exec(t))?(K(N(e[1]),G(e[2]),G(e[3]))|_(e[4]))>>>0:null}(t);return null===e?t:(e=e||0,`rgba(${(4278190080&e)>>>24}, ${(16711680&e)>>>16}, ${(65280&e)>>>8}, ${(255&e)/255})`)}const B=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Y=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Z=new RegExp(`(${Object.keys(j).join("|")})`,"g");class J extends S{constructor(t,e,i){super(),this.getValue=()=>this.calc(...this.payload.map((t=>t.getValue()))),this.updateConfig=(t,e)=>this.calc=O.create(t,e),this.interpolate=(t,e)=>new J(this,t,e),this.payload=t instanceof S&&!t.updateConfig?t.payload:Array.isArray(t)?t:[t],this.calc=O.create(e,i)}}function Q(t,e){"function"==typeof t.update?e.add(t):t.getChildren().forEach((t=>Q(t,e)))}class X extends P{constructor(t){var e;super(),e=this,this.setValue=function(t,i){void 0===i&&(i=!0),e.value=t,i&&e.flush()},this.getValue=()=>this.value,this.updateStyles=()=>Q(this,this.animatedStyles),this.updateValue=t=>this.flush(this.value=t),this.interpolate=(t,e)=>new J(this,t,e),this.value=t,this.animatedStyles=new Set,this.done=!1,this.startPosition=t,this.lastPosition=t,this.lastVelocity=void 0,this.lastTime=void 0,this.controller=void 0}flush(){0===this.animatedStyles.size&&this.updateStyles(),this.animatedStyles.forEach((t=>t.update()))}prepare(t){void 0===this.controller&&(this.controller=t),this.controller===t&&(this.startPosition=this.value,this.lastPosition=this.value,this.lastVelocity=t.isActive?this.lastVelocity:void 0,this.lastTime=t.isActive?this.lastTime:void 0,this.done=!1,this.animatedStyles.clear())}}class tt extends S{constructor(t){var e;super(),e=this,this.setValue=function(t,i){void 0===i&&(i=!0),Array.isArray(t)?t.length===e.payload.length&&t.forEach(((t,r)=>e.payload[r].setValue(t,i))):e.payload.forEach(((r,n)=>e.payload[n].setValue(t,i)))},this.getValue=()=>this.payload.map((t=>t.getValue())),this.interpolate=(t,e)=>new J(this,t,e),this.payload=t.map((t=>new X(t)))}}function et(t,e){return null==t?e:t}function it(t){return void 0!==t?Array.isArray(t)?t:[t]:[]}function rt(t,e){if(typeof t!=typeof e)return!1;if("string"==typeof t||"number"==typeof t)return t===e;let i;for(i in t)if(!(i in e))return!1;for(i in e)if(t[i]!==e[i])return!1;return void 0!==i||t===e}function nt(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),r=1;r<e;r++)i[r-1]=arguments[r];return"function"==typeof t?t(...i):t}function st(t){return Object.keys(t).map((e=>t[e]))}function ot(t){const e=function(t){return t.to,t.from,t.config,t.native,t.onStart,t.onRest,t.onFrame,t.children,t.reset,t.reverse,t.force,t.immediate,t.impl,t.inject,t.delay,t.attach,t.destroyed,t.interpolateTo,t.autoStart,t.ref,n(t,["to","from","config","native","onStart","onRest","onFrame","children","reset","reverse","force","immediate","impl","inject","delay","attach","destroyed","interpolateTo","autoStart","ref"])}(t),i=Object.keys(t).reduce(((i,r)=>void 0!==e[r]?i:s({},i,{[r]:t[r]})),{});return s({to:e},i)}function at(t,e){let i=e[0],r=e[1];return s({},t,{[i]:new(Array.isArray(r)?tt:X)(r)})}function lt(t){const e=t.from,i=t.to,r=t.native,n=Object.entries(s({},e,i));return r?n.reduce(at,{}):s({},e,i)}function dt(t,e){return e&&("function"==typeof e?e(t):"object"==typeof e&&(e.current=t)),t}const ht=t=>"auto"===t;let ct={animationIterationCount:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0};const pt=["Webkit","Ms","Moz","O"];function ut(t,e,i){return null==e||"boolean"==typeof e||""===e?"":i||"number"!=typeof e||0===e||ct.hasOwnProperty(t)&&ct[t]?(""+e).trim():e+"px"}ct=Object.keys(ct).reduce(((t,e)=>(pt.forEach((i=>t[((t,e)=>t+e.charAt(0).toUpperCase()+e.substring(1))(i,e)]=t[e])),t)),ct);const ft={};k((t=>new V(t))),x("div"),b((function(t){const e=t.output.map((t=>t.replace(Y,H))).map((t=>t.replace(Z,H))),i=e[0].match(B).map((()=>[]));e.forEach((t=>{t.match(B).forEach(((t,e)=>i[e].push(+t)))}));const r=e[0].match(B).map(((e,r)=>O.create(s({},t,{output:i[r]}))));return t=>{let i=0;return e[0].replace(B,(()=>r[i++](t))).replace(/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,((t,e,i,r,n)=>`rgba(${Math.round(e)}, ${Math.round(i)}, ${Math.round(r)}, ${n})`))}})),y(j),v((function(t,e){const i=t.from,r=t.to,n=t.children;if(!st(r).some(ht)&&!st(i).some(ht))return;let l=n(lt(t));if(!l)return;Array.isArray(l)&&(l={type:"div",props:{children:l}});const d=l.props.style;return o.createElement(l.type,s({key:l.key?l.key:void 0},l.props,{style:s({},d,{position:"absolute",visibility:"hidden"}),ref:n=>{if(n){let o,l,d=a.findDOMNode(n),h=getComputedStyle(d);if("border-box"===h.boxSizing)o=d.offsetWidth,l=d.offsetHeight;else{const t=parseFloat(h.paddingLeft||0)+parseFloat(h.paddingRight||0),e=parseFloat(h.paddingTop||0)+parseFloat(h.paddingBottom||0),i=parseFloat(h.borderLeftWidth||0)+parseFloat(h.borderRightWidth||0),r=parseFloat(h.borderTopWidth||0)+parseFloat(h.borderBottomWidth||0);o=d.offsetWidth-t-i,l=d.offsetHeight-e-r}const c=((t,e)=>(i,r)=>{let n=r[0],o=r[1];return s({},i,{[n]:"auto"===o?~n.indexOf("height")?e:t:o})})(o,l);e(s({},t,{from:Object.entries(i).reduce(c,i),to:Object.entries(r).reduce(c,r)}))}}}))})),g(((t,e)=>{if(!t.nodeType||void 0===t.setAttribute)return!1;{const s=e.style,o=e.children,a=e.scrollTop,l=e.scrollLeft,d=n(e,["style","children","scrollTop","scrollLeft"]);void 0!==a&&(t.scrollTop=a),void 0!==l&&(t.scrollLeft=l),void 0!==o&&(t.textContent=o);for(let e in s)if(s.hasOwnProperty(e)){var i=0===e.indexOf("--"),r=ut(e,s[e],i);"float"===e&&(e="cssFloat"),i?t.style.setProperty(e,r):t.style[e]=r}for(let e in d){const i=ft[e]||(ft[e]=e.replace(/([A-Z])/g,(t=>"-"+t.toLowerCase())));void 0!==t.getAttribute(i)&&t.setAttribute(i,d[e])}}}),(t=>t));let mt=!1;const gt=new Set,yt=()=>{let t=m();for(let e of gt){let i=!0,r=!0;for(let n=0;n<e.configs.length;n++){let s,o,a=e.configs[n];for(let n=0;n<a.animatedValues.length;n++){let l=a.animatedValues[n];if(l.done)continue;let d=a.fromValues[n],h=a.toValues[n],c=l.lastPosition,p=h instanceof w,u=Array.isArray(a.initialVelocity)?a.initialVelocity[n]:a.initialVelocity;if(p&&(h=h.getValue()),a.immediate||!p&&!a.decay&&d===h)l.updateValue(h),l.done=!0;else if(a.delay&&t-e.startTime<a.delay)i=!1;else if(r=!1,"string"!=typeof d&&"string"!=typeof h){if(void 0!==a.duration)c=d+a.easing((t-e.startTime-a.delay)/a.duration)*(h-d),s=t>=e.startTime+a.delay+a.duration;else if(a.decay)c=d+u/(1-.998)*(1-Math.exp(-(1-.998)*(t-e.startTime))),s=Math.abs(l.lastPosition-c)<.1,s&&(h=c);else{o=void 0!==l.lastTime?l.lastTime:t,u=void 0!==l.lastVelocity?l.lastVelocity:a.initialVelocity,t>o+64&&(o=t);let e=Math.floor(t-o);for(let t=0;t<e;++t)u+=(-a.tension*(c-h)+-a.friction*u)/a.mass*1/1e3,c+=1*u/1e3;let i=!(!a.clamp||0===a.tension)&&(d<h?c>h:c<h),r=Math.abs(u)<=a.precision,n=0===a.tension||Math.abs(h-c)<=a.precision;s=i||r&&n,l.lastVelocity=u,l.lastTime=t}p&&!a.toValues[n].done&&(s=!1),s?(l.value!==h&&(c=h),l.done=!0):i=!1,l.updateValue(c),l.lastPosition=c}else l.updateValue(h),l.done=!0}!e.props.onFrame&&e.props.native||(e.animatedProps[a.name]=a.interpolation.getValue())}!e.props.onFrame&&e.props.native||(!e.props.native&&e.onUpdate&&e.onUpdate(),e.props.onFrame&&e.props.onFrame(e.animatedProps)),i&&(gt.delete(e),e.debouncedOnEnd({finished:!0,noChange:r}))}gt.size?f(yt):mt=!1},vt=t=>{gt.has(t)&>.delete(t)};class bt{constructor(t,e){void 0===e&&(e={native:!0,interpolateTo:!0,autoStart:!0}),this.getValues=()=>this.props.native?this.interpolations:this.animatedProps,this.dependents=new Set,this.isActive=!1,this.hasChanged=!1,this.props={},this.merged={},this.animations={},this.interpolations={},this.animatedProps={},this.configs=[],this.frame=void 0,this.startTime=void 0,this.lastTime=void 0,this.update(s({},t,e))}update(t){this.props=s({},this.props,t);let e=this.props.interpolateTo?ot(this.props):this.props,i=e.from,r=void 0===i?{}:i,n=e.to,o=void 0===n?{}:n,a=e.config,l=void 0===a?{}:a,d=e.delay,h=void 0===d?0:d,c=e.reverse,p=e.attach,f=e.reset,m=e.immediate,g=e.autoStart,y=e.ref;if(c){var v=[o,r];r=v[0],o=v[1]}this.hasChanged=!1;let b=p&&p(this),x=f?{}:this.merged;if(this.merged=s({},r,x,o),this.animations=Object.entries(this.merged).reduce(((t,e,i)=>{let n=e[0],o=e[1],a=!f&&t[n]||{};const d="number"==typeof o,c="string"==typeof o&&!o.startsWith("#")&&!/\d/.test(o)&&!u[o],p=!d&&!c&&Array.isArray(o);let g=void 0!==r[n]?r[n]:o,y=d||p||c?o:1,v=nt(l,n);if(b&&(y=b.animations[n].parent),void 0===v.decay&&rt(a.changes,o))return t;{let e,i;if(this.hasChanged=!0,d||c)e=i=a.parent||new X(g);else if(p)e=i=a.parent||new tt(g);else{const t=a.interpolation&&a.interpolation.calc(a.parent.value);a.parent?(e=a.parent,e.setValue(0,!1)):e=new X(0);const r={output:[void 0!==t?t:g,o]};a.interpolation?(i=a.interpolation,a.interpolation.updateConfig(r)):i=e.interpolate(r)}nt(m,n)&&e.setValue(o,!1);const r=it(e.getPayload());return r.forEach((t=>t.prepare(this))),s({},t,{[n]:s({},a,{name:n,parent:e,interpolation:i,animatedValues:r,changes:o,fromValues:it(e.getValue()),toValues:it(b?y.getPayload():y),immediate:nt(m,n),delay:et(v.delay,h||0),initialVelocity:et(v.velocity,0),clamp:et(v.clamp,!1),precision:et(v.precision,.01),tension:et(v.tension,170),friction:et(v.friction,26),mass:et(v.mass,1),duration:v.duration,easing:et(v.easing,(t=>t)),decay:v.decay})})}}),this.animations),this.hasChanged){this.configs=st(this.animations),this.animatedProps={},this.interpolations={};for(let t in this.animations)this.interpolations[t]=this.animations[t].interpolation,this.animatedProps[t]=this.animations[t].interpolation.getValue()}for(var k=arguments.length,w=new Array(k>1?k-1:0),A=1;A<k;A++)w[A-1]=arguments[A];y||!g&&!w.length||this.start(...w);const P=w[0],S=w[1];return this.onEnd="function"==typeof P&&P,this.onUpdate=S,this.getValues()}start(t,e){return this.startTime=m(),this.isActive&&this.stop(),this.isActive=!0,this.onEnd="function"==typeof t&&t,this.onUpdate=e,this.props.onStart&&this.props.onStart(),this,gt.has(this)||(gt.add(this),mt||f(yt),mt=!0),new Promise((t=>this.resolve=t))}stop(t){void 0===t&&(t=!1),t&&st(this.animations).forEach((t=>t.changes=void 0)),this.debouncedOnEnd({finished:t})}destroy(){vt(this),this.props={},this.merged={},this.animations={},this.interpolations={},this.animatedProps={},this.configs=[]}debouncedOnEnd(t){vt(this),this.isActive=!1;const e=this.onEnd;this.onEnd=null,e&&e(t),this.resolve&&this.resolve(),this.resolve=null}}class xt extends E{constructor(t,e){super(),t.style&&(t=s({},t,{style:p(t.style)})),this.payload=t,this.update=e,this.attach()}}function kt(t){class e extends o.Component{constructor(t){super(),this.callback=()=>{this.node&&!1===d.fn(this.node,this.propsAnimated.getAnimatedValue(),this)&&this.forceUpdate()},this.attachProps(t)}componentWillUnmount(){this.propsAnimated&&this.propsAnimated.detach()}setNativeProps(t){!1===d.fn(this.node,t,this)&&this.forceUpdate()}attachProps(t){t.forwardRef;let e=n(t,["forwardRef"]);const i=this.propsAnimated;this.propsAnimated=new xt(e,this.callback),i&&i.detach()}shouldComponentUpdate(t){const e=t.style,i=n(t,["style"]),r=this.props,s=r.style;return!(rt(n(r,["style"]),i)&&rt(s,e)||(this.attachProps(t),0))}render(){const e=this.propsAnimated.getValue(),i=(e.scrollTop,e.scrollLeft,n(e,["scrollTop","scrollLeft"]));return o.createElement(t,s({},i,{ref:t=>this.node=dt(t,this.props.forwardRef)}))}}return o.forwardRef(((t,i)=>o.createElement(e,s({},t,{forwardRef:i}))))}class wt extends o.Component{constructor(){super(...arguments),this.state={lastProps:{from:{},to:{}},propsChanged:!1,internal:!1},this.controller=new bt(null,null),this.didUpdate=!1,this.didInject=!1,this.finished=!0,this.start=()=>{this.finished=!1;let t=this.mounted;this.controller.start((e=>this.finish(s({},e,{wasMounted:t}))),this.update)},this.stop=()=>this.controller.stop(!0),this.update=()=>this.mounted&&this.setState({internal:!0}),this.finish=t=>{let e=t.finished,i=t.noChange,r=t.wasMounted;this.finished=!0,this.mounted&&e&&(!this.props.onRest||!r&&i||this.props.onRest(this.controller.merged),this.mounted&&this.didInject&&(this.afterInject=lt(this.props),this.setState({internal:!0})),this.mounted&&(this.didInject||this.props.after)&&this.setState({internal:!0}),this.didInject=!1)}}componentDidMount(){this.componentDidUpdate(),this.mounted=!0}componentWillUnmount(){this.mounted=!1,this.stop()}static getDerivedStateFromProps(t,e){let i=e.internal,r=e.lastProps;const n=t.from,s=t.to,o=t.reset,a=t.force;return{propsChanged:!rt(s,r.to)||!rt(n,r.from)||o&&!i||a&&!i,lastProps:t,internal:!1}}render(){const t=this.props.children,e=this.state.propsChanged;if(this.props.inject&&e&&!this.injectProps){const t=this.props.inject(this.props,(t=>{this.injectProps=t,this.setState({internal:!0})}));if(t)return t}(this.injectProps||e)&&(this.didInject=!1,this.injectProps?(this.controller.update(this.injectProps),this.didInject=!0):e&&this.controller.update(this.props),this.didUpdate=!0,this.afterInject=void 0,this.injectProps=void 0);let i=s({},this.controller.getValues(),this.afterInject);return this.finished&&(i=s({},i,this.props.after)),Object.keys(i).length?t(i):null}componentDidUpdate(){this.didUpdate&&this.start(),this.didUpdate=!1}}wt.defaultProps={from:{},to:{},config:{tension:170,friction:26},native:!1,immediate:!1,reset:!1,force:!1,inject:l};class At extends o.PureComponent{constructor(){super(...arguments),this.first=!0,this.instances=new Set,this.hook=(t,e,i,r)=>(this.instances.add(t),(r?e===i-1:0===e)?void 0:Array.from(this.instances)[r?e+1:e-1])}render(){const t=this.props,e=t.items,i=t.children,r=t.from,a=void 0===r?{}:r,l=t.initial,d=t.reverse,h=t.keys,c=t.delay,p=t.onRest,u=n(t,["items","children","from","initial","reverse","keys","delay","onRest"]),f=it(e);return it(f).map(((t,e)=>o.createElement(wt,s({onRest:0===e?p:null,key:"function"==typeof h?h(t):it(h)[e],from:this.first&&void 0!==l?l||{}:a},u,{delay:0===e&&c||void 0,attach:t=>this.hook(t,e,f.length,d),children:r=>{const n=i(t,e);return n?n(r):null}}))))}componentDidUpdate(t){this.first=!1,t.items!==this.props.items&&this.instances.clear()}}At.defaultProps={keys:t=>t};const Pt="__default";class St extends o.PureComponent{constructor(){var t;super(...arguments),t=this,this.guid=0,this.state={props:{},resolve:()=>null,last:!0,index:0},this.next=function(e,i,r){return void 0===i&&(i=!0),void 0===r&&(r=0),t.running=!0,new Promise((n=>{t.mounted&&t.setState((t=>({props:e,resolve:n,last:i,index:r})),(()=>t.running=!1))}))}}componentDidMount(){this.mounted=!0,this.componentDidUpdate({})}componentWillUnmount(){this.mounted=!1}componentDidUpdate(t){var e=this;const i=this.props,r=i.states,n=i.filter,s=i.state;if((t.state!==this.props.state||this.props.reset&&!this.running||!rt(r[s],t.states[t.state]))&&r&&s&&r[s]){const t=++this.guid,i=r[s];if(i)if(Array.isArray(i)){let e=Promise.resolve();for(let r=0;r<i.length;r++){let s=r,o=i[s],a=s===i.length-1;e=e.then((()=>t===this.guid&&this.next(n(o),a,s)))}}else if("function"==typeof i){let r=0;i((function(i,s){return void 0===s&&(s=!1),t===e.guid&&e.next(n(i),s,r++)}),(()=>f((()=>this.instance&&this.instance.stop()))),this.props)}else this.next(n(r[s]))}}render(){const t=this.state,e=t.props,i=t.resolve,r=t.last,a=t.index;if(!e||0===Object.keys(e).length)return null;let l=this.props,d=(l.state,l.filter,l.states,l.config),h=l.primitive,c=l.onRest,p=l.forwardRef,u=n(l,["state","filter","states","config","primitive","onRest","forwardRef"]);return Array.isArray(d)&&(d=d[a]),o.createElement(h,s({ref:t=>this.instance=dt(t,p),config:d},u,e,{onRest:t=>{i(t),c&&r&&c(t)}}))}}St.defaultProps={state:Pt};const Et=o.forwardRef(((t,e)=>o.createElement(St,s({},t,{forwardRef:e}))));Et.create=t=>function(e,i){return void 0===i&&(i=t=>t),("function"==typeof e||Array.isArray(e))&&(e={[Pt]:e}),r=>o.createElement(St,s({primitive:t,states:e,filter:i},r))},Et.Spring=t=>Et.create(wt)(t,ot),Et.Trail=t=>Et.create(At)(t,ot);let Vt=0,jt=t=>{let e=t.items,i=t.keys,r=n(t,["items","keys"]);return e=it(void 0!==e?e:null),i="function"==typeof i?e.map(i):it(i),s({items:e,keys:i.map((t=>String(t)))},r)};class Ot extends o.PureComponent{componentDidMount(){this.mounted=!0}componentWillUnmount(){this.mounted=!1}constructor(t){super(t),this.destroyItem=(t,e,i)=>r=>{const n=this.props,s=n.onRest,o=n.onDestroyed;this.mounted&&(o&&o(t),this.setState((t=>({deleted:t.deleted.filter((t=>t.key!==e))}))),s&&s(t,i,r))},this.state={first:!0,transitions:[],current:{},deleted:[],prevProps:t}}static getDerivedStateFromProps(t,e){let i=e.first,r=e.prevProps,o=n(e,["first","prevProps"]),a=jt(t),l=a.items,d=a.keys,h=a.initial,c=a.from,p=a.enter,u=a.leave,f=a.update,m=a.trail,g=void 0===m?0:m,y=a.unique,v=a.config,b=jt(r),x=b.keys,k=b.items,w=s({},o.current),A=[...o.deleted],P=Object.keys(w),S=new Set(P),E=new Set(d),V=d.filter((t=>!S.has(t))),j=o.transitions.filter((t=>!t.destroyed&&!E.has(t.originalKey))).map((t=>t.originalKey)),O=d.filter((t=>S.has(t))),C=0;V.forEach((t=>{y&&A.find((e=>e.originalKey===t))&&(A=A.filter((e=>e.originalKey!==t)));const e=d.indexOf(t),r=l[e],n="enter";w[t]={state:n,originalKey:t,key:y?String(t):Vt++,item:r,trail:C+=g,config:nt(v,r,n),from:nt(i&&void 0!==h?h||{}:c,r),to:nt(p,r)}})),j.forEach((t=>{const e=x.indexOf(t),i=k[e],r="leave";A.push(s({},w[t],{state:r,destroyed:!0,left:x[Math.max(0,e-1)],right:x[Math.min(x.length,e+1)],trail:C+=g,config:nt(v,i,r),to:nt(u,i)})),delete w[t]})),O.forEach((t=>{const e=d.indexOf(t),i=l[e],r="update";w[t]=s({},w[t],{item:i,state:r,trail:C+=g,config:nt(v,i,r),to:nt(f,i)})}));let R=d.map((t=>w[t]));return A.forEach((t=>{let e,i=t.left,r=t.right,s=n(t,["left","right"]);-1!==(e=R.findIndex((t=>t.originalKey===i)))&&(e+=1),-1===e&&(e=R.findIndex((t=>t.originalKey===r))),-1===e&&(e=A.findIndex((t=>t.originalKey===i))),-1===e&&(e=A.findIndex((t=>t.originalKey===r))),e=Math.max(0,e),R=[...R.slice(0,e),s,...R.slice(e)]})),{first:i&&0===V.length,transitions:R,current:w,deleted:A,prevProps:t}}render(){const t=this.props,e=(t.initial,t.from,t.enter,t.leave,t.update,t.onDestroyed,t.keys,t.items,t.onFrame),i=t.onRest,r=t.onStart,a=(t.trail,t.config,t.children),l=(t.unique,t.reset),d=n(t,["initial","from","enter","leave","update","onDestroyed","keys","items","onFrame","onRest","onStart","trail","config","children","unique","reset"]);return this.state.transitions.map(((t,n)=>{let h=t.state,c=t.key,p=t.item,u=t.from,f=t.to,m=t.trail,g=t.config,y=t.destroyed;return o.createElement(Et,s({reset:l&&"enter"===h,primitive:wt,state:h,filter:ot,states:{[h]:f},key:c,onRest:y?this.destroyItem(p,c,h):i&&(t=>i(p,h,t)),onStart:r&&(()=>r(p,h)),onFrame:e&&(t=>e(p,h,t)),delay:m,config:g},d,{from:u,children:t=>{const e=a(p,h,n);return e?e(t):null}}))}))}}Ot.defaultProps={keys:t=>t,unique:!1,reset:!1};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].reduce(((t,e)=>(t[e]=kt(e),t)),kt);e.AM=wt},297:t=>{t.exports=require("react")},268:t=>{t.exports=require("react-dom")}},e={};function i(r){var n=e[r];if(void 0!==n)return n.exports;var s=e[r]={exports:{}};return t[r](s,s.exports,i),s.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var r in e)i.o(e,r)&&!i.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{i.r(r),i.d(r,{default:()=>o});var t=i(297),e=i.n(t),n=i(823);const s=[0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9],o=({animateToNumber:i,fontStyle:r,config:o,includeComma:a,delay:l,onFinish:d,onStart:h,animationType:c="random"})=>{const p=(t=>{const i=e().useRef();return e().useEffect((()=>{i.current=t})),void 0===i.current?0:i.current})(i),u=String(Math.abs(i)),f=String(Math.abs(p)),m=Array.from(u,Number),g=Array.from(f,Number),[y,v]=e().useState(!1),[b,x]=e().useState(!1);if(e().useEffect((()=>{if(y&&h&&(setTimeout((()=>{h(),v(!1)}),void 0===l?0:l),d&&"random"===c)){const t=void 0===o?.duration?500:o.duration;setTimeout((()=>{d()}),t)}}),[y]),a){const t=new Array(Math.ceil(u.length/3)).fill(0),e=new Array(Math.ceil(f.length/3)).fill(0);t.forEach(((t,e)=>{0!==e&&m.splice(u.length-3*e,0,",")})),e.forEach(((t,e)=>{0!==e&&g.splice(f.length-3*e,0,",")}))}const[k,w]=e().useState(0),A=e().useRef(null),P=(0,t.useCallback)((t=>{const e=m.slice(t).filter((t=>"string"==typeof t)).length;return l?l+200*(m.length-1-t-e):o&&o.duration?(m.length-1-t-e)*o.duration-200:200*(m.length-1-t-e)}),[m,b]);return e().useEffect((()=>{w(A.current.clientHeight)}),[i]),e().createElement(e().Fragment,null,0!==k&&e().createElement("div",{style:{display:"flex",flexDirection:"row"}},i<0&&e().createElement("div",{style:r},"-"),m.map(((t,i)=>"string"==typeof t?e().createElement("div",{key:i,style:{...r}},t):e().createElement("div",{key:i,style:{height:k,overflow:"hidden"}},e().createElement(n.AM,{key:m[i],from:{transform:"translateY(0px)"},to:{transform:`translateY(${k*m[i]*-1-20*k})`},config:o,delay:"calm"===c?P(i):null,onRest:()=>x(!0),onStart:()=>v(!0)},(t=>s.map(((i,n)=>e().createElement("div",{key:n,style:{...t,...r}},i))))))))),e().createElement("div",{ref:A,style:{position:"absolute",top:-9999,...r}},0))}})(),module.exports=r})(); |
{ | ||
"name": "react-animated-numbers", | ||
"version": "0.4.0", | ||
"version": "0.4.1", | ||
"description": "Library showing animation of number changes in react.js", | ||
@@ -43,4 +43,4 @@ "main": "./dist/index.js", | ||
"babel-loader": "^8.1.0", | ||
"webpack": "^4.44.1", | ||
"webpack-cli": "^3.3.12" | ||
"webpack": "^5.44.0", | ||
"webpack-cli": "^4.7.2" | ||
}, | ||
@@ -47,0 +47,0 @@ "peerDependencies": { |
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
36372
-3.74%1
Infinity%