UNPKG

framer

Version:

The Framer library is the code that drives Framer projects and components. It helps you build from simple interactive components to whole apps.

1 lines 913 kB
!function webpackUniversalModuleDefinition(n,r){"object"==typeof exports&&"object"==typeof module?module.exports=r(require("react")):"function"==typeof define&&define.amd?define(["react"],r):"object"==typeof exports?exports.Framer=r(require("react")):n.Framer=r(n.React)}(window,(function(n){return function(n){var r={};function __webpack_require__(i){if(r[i])return r[i].exports;var o=r[i]={i,l:!1,exports:{}};return n[i].call(o.exports,o,o.exports,__webpack_require__),o.l=!0,o.exports}return __webpack_require__.m=n,__webpack_require__.c=r,__webpack_require__.d=function(n,r,i){__webpack_require__.o(n,r)||Object.defineProperty(n,r,{enumerable:!0,get:i})},__webpack_require__.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},__webpack_require__.t=function(n,r){if(1&r&&(n=__webpack_require__(n)),8&r)return n;if(4&r&&"object"==typeof n&&n&&n.__esModule)return n;var i=Object.create(null);if(__webpack_require__.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:n}),2&r&&"string"!=typeof n)for(var o in n)__webpack_require__.d(i,o,function(r){return n[r]}.bind(null,o));return i},__webpack_require__.n=function(n){var r=n&&n.__esModule?function getDefault(){return n.default}:function getModuleExports(){return n};return __webpack_require__.d(r,"a",r),r},__webpack_require__.o=function(n,r){return Object.prototype.hasOwnProperty.call(n,r)},__webpack_require__.p="",__webpack_require__(__webpack_require__.s=228)}([function(r,i){r.exports=n},function(n,r,i){"use strict";i.d(r,"b",(function(){return __extends})),i.d(r,"a",(function(){return __assign})),i.d(r,"d",(function(){return __rest})),i.d(r,"c",(function(){return __read})),i.d(r,"e",(function(){return __spread})),i.d(r,"f",(function(){return __spreadArrays}));var extendStatics=function(n,r){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)r.hasOwnProperty(i)&&(n[i]=r[i])})(n,r)};function __extends(n,r){function __(){this.constructor=n}extendStatics(n,r),n.prototype=null===r?Object.create(r):(__.prototype=r.prototype,new __)}var __assign=function(){return(__assign=Object.assign||function __assign(n){for(var r,i=1,o=arguments.length;i<o;i++)for(var s in r=arguments[i])Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s]);return n}).apply(this,arguments)};function __rest(n,r){var i={};for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&r.indexOf(o)<0&&(i[o]=n[o]);if(null!=n&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(o=Object.getOwnPropertySymbols(n);s<o.length;s++)r.indexOf(o[s])<0&&Object.prototype.propertyIsEnumerable.call(n,o[s])&&(i[o[s]]=n[o[s]])}return i}function __read(n,r){var i="function"==typeof Symbol&&n[Symbol.iterator];if(!i)return n;var o,s,p=i.call(n),S=[];try{for(;(void 0===r||r-- >0)&&!(o=p.next()).done;)S.push(o.value)}catch(_){s={error:_}}finally{try{o&&!o.done&&(i=p.return)&&i.call(p)}finally{if(s)throw s.error}}return S}function __spread(){for(var n=[],r=0;r<arguments.length;r++)n=n.concat(__read(arguments[r]));return n}function __spreadArrays(){for(var n=0,r=0,i=arguments.length;r<i;r++)n+=arguments[r].length;var o=Array(n),s=0;for(r=0;r<i;r++)for(var p=arguments[r],S=0,_=p.length;S<_;S++,s++)o[s]=p[S];return o}},function(n,r,i){"use strict";i.r(r),i.d(r,"alpha",(function(){return x})),i.d(r,"color",(function(){return ue})),i.d(r,"complex",(function(){return le})),i.d(r,"degrees",(function(){return w})),i.d(r,"filter",(function(){return me})),i.d(r,"hex",(function(){return ie})),i.d(r,"hsla",(function(){return U})),i.d(r,"number",(function(){return _})),i.d(r,"percent",(function(){return P})),i.d(r,"progressPercentage",(function(){return N})),i.d(r,"px",(function(){return T})),i.d(r,"rgbUnit",(function(){return $})),i.d(r,"rgba",(function(){return te})),i.d(r,"scale",(function(){return O})),i.d(r,"vh",(function(){return j})),i.d(r,"vw",(function(){return D}));var o=i(1),clamp=function(n,r){return function(i){return Math.max(Math.min(i,r),n)}},sanitize=function(n){return n%1?Number(n.toFixed(5)):n},s=/(-)?([\d]*\.?[\d])+/g,p=/(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi,S=/^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;function isString(n){return"string"==typeof n}var _={test:function(n){return"number"==typeof n},parse:parseFloat,transform:function(n){return n}},x=Object(o.a)(Object(o.a)({},_),{transform:clamp(0,1)}),O=Object(o.a)(Object(o.a)({},_),{default:1}),createUnitType=function(n){return{test:function(r){return isString(r)&&r.endsWith(n)&&1===r.split(" ").length},parse:parseFloat,transform:function(r){return""+r+n}}},w=createUnitType("deg"),P=createUnitType("%"),T=createUnitType("px"),j=createUnitType("vh"),D=createUnitType("vw"),N=Object(o.a)(Object(o.a)({},P),{parse:function(n){return P.parse(n)/100},transform:function(n){return P.transform(100*n)}}),isColorString=function(n,r){return function(i){return isString(i)&&S.test(i)&&i.startsWith(n)||r&&i.hasOwnProperty(r)}},splitColor=function(n,r,i){return function(o){var p;if(!isString(o))return o;var S=o.match(s),_=S[0],x=S[1],O=S[2],w=S[3];return(p={})[n]=parseFloat(_),p[r]=parseFloat(x),p[i]=parseFloat(O),p.alpha=void 0!==w?parseFloat(w):1,p}},U={test:isColorString("hsl","hue"),parse:splitColor("hue","saturation","lightness"),transform:function(n){var r=n.hue,i=n.saturation,o=n.lightness,s=n.alpha,p=void 0===s?1:s;return"hsla("+Math.round(r)+", "+P.transform(sanitize(i))+", "+P.transform(sanitize(o))+", "+sanitize(x.transform(p))+")"}},q=clamp(0,255),$=Object(o.a)(Object(o.a)({},_),{transform:function(n){return Math.round(q(n))}}),te={test:isColorString("rgb","red"),parse:splitColor("red","green","blue"),transform:function(n){var r=n.red,i=n.green,o=n.blue,s=n.alpha,p=void 0===s?1:s;return"rgba("+$.transform(r)+", "+$.transform(i)+", "+$.transform(o)+", "+sanitize(x.transform(p))+")"}};var ie={test:isColorString("#"),parse:function parseHex(n){var r="",i="",o="",s="";return n.length>5?(r=n.substr(1,2),i=n.substr(3,2),o=n.substr(5,2),s=n.substr(7,2)):(r=n.substr(1,1),i=n.substr(2,1),o=n.substr(3,1),s=n.substr(4,1),r+=r,i+=i,o+=o,s+=s),{red:parseInt(r,16),green:parseInt(i,16),blue:parseInt(o,16),alpha:s?parseInt(s,16)/255:1}},transform:te.transform},ue={test:function(n){return te.test(n)||ie.test(n)||U.test(n)},parse:function(n){return te.test(n)?te.parse(n):U.test(n)?U.parse(n):ie.parse(n)},transform:function(n){return isString(n)?n:n.hasOwnProperty("red")?te.transform(n):U.transform(n)}};function analyse(n){var r=[],i=0,o=n.match(p);o&&(i=o.length,n=n.replace(p,"${c}"),r.push.apply(r,o.map(ue.parse)));var S=n.match(s);return S&&(n=n.replace(s,"${n}"),r.push.apply(r,S.map(_.parse))),{values:r,numColors:i,tokenised:n}}function parse(n){return analyse(n).values}function createTransformer(n){var r=analyse(n),i=r.values,o=r.numColors,s=r.tokenised,p=i.length;return function(n){for(var r=s,i=0;i<p;i++)r=r.replace(i<o?"${c}":"${n}",i<o?ue.transform(n[i]):sanitize(n[i]));return r}}var convertNumbersToZero=function(n){return"number"==typeof n?0:n};var le={test:function test(n){var r,i,o,S;return isNaN(n)&&isString(n)&&(null!==(i=null===(r=n.match(s))||void 0===r?void 0:r.length)&&void 0!==i?i:0)+(null!==(S=null===(o=n.match(p))||void 0===o?void 0:o.length)&&void 0!==S?S:0)>0},parse,createTransformer,getAnimatableNone:function getAnimatableNone(n){var r=parse(n);return createTransformer(n)(r.map(convertNumbersToZero))}},pe=new Set(["brightness","contrast","saturate","opacity"]);function applyDefaultFilter(n){var r=n.slice(0,-1).split("("),i=r[0],o=r[1];if("drop-shadow"===i)return n;var p=(o.match(s)||[])[0];if(!p)return n;var S=o.replace(p,""),_=pe.has(i)?1:0;return p!==o&&(_*=100),i+"("+_+S+")"}var he=/([a-z-]*)\(.*?\)/g,me=Object(o.a)(Object(o.a)({},le),{getAnimatableNone:function(n){var r=n.match(he);return r?r.map(applyDefaultFilter).join(" "):n}})},function(n,r,i){"use strict";i.r(r),i.d(r,"angle",(function(){return angle})),i.d(r,"animate",(function(){return animate})),i.d(r,"anticipate",(function(){return te})),i.d(r,"applyOffset",(function(){return applyOffset})),i.d(r,"attract",(function(){return le})),i.d(r,"attractExpo",(function(){return pe})),i.d(r,"backIn",(function(){return U})),i.d(r,"backInOut",(function(){return $})),i.d(r,"backOut",(function(){return q})),i.d(r,"bounceIn",(function(){return ie})),i.d(r,"bounceInOut",(function(){return bounceInOut})),i.d(r,"bounceOut",(function(){return bounceOut})),i.d(r,"circIn",(function(){return circIn})),i.d(r,"circInOut",(function(){return N})),i.d(r,"circOut",(function(){return D})),i.d(r,"clamp",(function(){return clamp})),i.d(r,"createAnticipate",(function(){return createAnticipate})),i.d(r,"createAttractor",(function(){return createAttractor})),i.d(r,"createBackIn",(function(){return createBackIn})),i.d(r,"createExpoIn",(function(){return createExpoIn})),i.d(r,"cubicBezier",(function(){return cubicBezier})),i.d(r,"decay",(function(){return decay})),i.d(r,"degreesToRadians",(function(){return degreesToRadians})),i.d(r,"distance",(function(){return distance})),i.d(r,"easeIn",(function(){return P})),i.d(r,"easeInOut",(function(){return j})),i.d(r,"easeOut",(function(){return T})),i.d(r,"inertia",(function(){return inertia})),i.d(r,"interpolate",(function(){return interpolate})),i.d(r,"isPoint",(function(){return isPoint})),i.d(r,"isPoint3D",(function(){return isPoint3D})),i.d(r,"keyframes",(function(){return keyframes})),i.d(r,"linear",(function(){return linear})),i.d(r,"mirrorEasing",(function(){return mirrorEasing})),i.d(r,"mix",(function(){return mix})),i.d(r,"mixColor",(function(){return mixColor})),i.d(r,"mixComplex",(function(){return mixComplex})),i.d(r,"pipe",(function(){return pipe})),i.d(r,"pointFromVector",(function(){return pointFromVector})),i.d(r,"progress",(function(){return progress})),i.d(r,"radiansToDegrees",(function(){return radiansToDegrees})),i.d(r,"reverseEasing",(function(){return reverseEasing})),i.d(r,"smooth",(function(){return smooth})),i.d(r,"smoothFrame",(function(){return smoothFrame})),i.d(r,"snap",(function(){return snap})),i.d(r,"spring",(function(){return spring})),i.d(r,"steps",(function(){return steps})),i.d(r,"toDecimal",(function(){return toDecimal})),i.d(r,"velocityPerFrame",(function(){return velocityPerFrame})),i.d(r,"velocityPerSecond",(function(){return velocityPerSecond})),i.d(r,"wrap",(function(){return wrap}));var o=i(1),s=i(10),p=i(2),S=i(8),clamp=function(n,r,i){return Math.min(Math.max(i,n),r)};function findSpring(n){var r,i,o=n.duration,p=void 0===o?800:o,S=n.bounce,_=void 0===S?.25:S,x=n.velocity,O=void 0===x?0:x,w=n.mass,P=void 0===w?1:w;Object(s.warning)(p<=1e4,"Spring duration must be 10 seconds or less");var T=1-_;T=clamp(.05,1,T),p=clamp(.01,10,p/1e3),T<1?(r=function(n){var r=n*T,i=r*p;return.001-(r-O)/calcAngularFreq(n,T)*Math.exp(-i)},i=function(n){var i=n*T*p,o=i*O+O,s=Math.pow(T,2)*Math.pow(n,2)*p,S=Math.exp(-i),_=calcAngularFreq(Math.pow(n,2),T);return(.001-r(n)>0?-1:1)*((o-s)*S)/_}):(r=function(n){return Math.exp(-n*p)*((n-O)*p+1)-.001},i=function(n){return Math.exp(-n*p)*(p*p*(O-n))});var j=function approximateRoot(n,r,i){for(var o=i,s=1;s<12;s++)o-=n(o)/r(o);return o}(r,i,5/p);if(isNaN(j))return{stiffness:100,damping:10};var D=Math.pow(j,2)*P;return{stiffness:D,damping:2*T*Math.sqrt(P*D)}}function calcAngularFreq(n,r){return n*Math.sqrt(1-r*r)}var _=["duration","bounce"],x=["stiffness","damping","mass"];function isSpringType(n,r){return r.some((function(r){return void 0!==n[r]}))}function spring(n){var r=n.from,i=void 0===r?0:r,s=n.to,p=void 0===s?1:s,S=n.restSpeed,O=void 0===S?2:S,w=n.restDelta,P=Object(o.d)(n,["from","to","restSpeed","restDelta"]),T={done:!1,value:i},j=function getSpringOptions(n){var r=Object(o.a)({velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1},n);if(!isSpringType(n,x)&&isSpringType(n,_)){var i=findSpring(n);(r=Object(o.a)(Object(o.a)(Object(o.a)({},r),i),{velocity:0,mass:1})).isResolvedFromDuration=!0}return r}(P),D=j.stiffness,N=j.damping,U=j.mass,q=j.velocity,$=j.isResolvedFromDuration,te=zero,ie=zero;function createSpring(){var n=q?-q/1e3:0,r=p-i,o=N/(2*Math.sqrt(D*U)),s=Math.sqrt(D/U)/1e3;if(null!=w||(w=Math.abs(p-i)<=1?.01:.4),o<1){var S=calcAngularFreq(s,o);te=function(i){var _=Math.exp(-o*s*i);return p-_*((n+o*s*r)/S*Math.sin(S*i)+r*Math.cos(S*i))},ie=function(i){var p=Math.exp(-o*s*i);return o*s*p*(Math.sin(S*i)*(n+o*s*r)/S+r*Math.cos(S*i))-p*(Math.cos(S*i)*(n+o*s*r)-S*r*Math.sin(S*i))}}else if(1===o)te=function(i){return p-Math.exp(-s*i)*(r+(n+s*r)*i)};else{var _=s*Math.sqrt(o*o-1);te=function(i){var S=Math.exp(-o*s*i),x=Math.min(_*i,300);return p-S*((n+o*s*r)*Math.sinh(x)+_*r*Math.cosh(x))/_}}}return createSpring(),{next:function(n){var r=te(n);if($)T.done=n>=P.duration;else{var i=1e3*ie(n),o=Math.abs(i)<=O,s=Math.abs(p-r)<=w;T.done=o&&s}return T.value=T.done?p:r,T},flipTarget:function(){var n;q=-q,i=(n=[p,i])[0],p=n[1],createSpring()}}}spring.needsInterpolation=function(n,r){return"string"==typeof n||"string"==typeof r};var zero=function(n){return 0},progress=function(n,r,i){var o=r-n;return 0===o?1:(i-n)/o},mix=function(n,r,i){return-i*n+i*r+n},mixLinearColor=function(n,r,i){var o=n*n,s=r*r;return Math.sqrt(Math.max(0,i*(s-o)+o))},O=[p.hex,p.rgba,p.hsla],getColorType=function(n){return O.find((function(r){return r.test(n)}))},notAnimatable=function(n){return"'"+n+"' is not an animatable color. Use the equivalent color code instead."},mixColor=function(n,r){var i=getColorType(n),S=getColorType(r);Object(s.invariant)(!!i,notAnimatable(n)),Object(s.invariant)(!!S,notAnimatable(r)),Object(s.invariant)(i.transform===S.transform,"Both colors must be hex/RGBA, OR both must be HSLA.");var _=i.parse(n),x=S.parse(r),O=Object(o.a)({},_),w=i===p.hsla?mix:mixLinearColor;return function(n){for(var r in O)"alpha"!==r&&(O[r]=w(_[r],x[r],n));return O.alpha=mix(_.alpha,x.alpha,n),i.transform(O)}},w={x:0,y:0,z:0},isNum=function(n){return"number"==typeof n},combineFunctions=function(n,r){return function(i){return r(n(i))}},pipe=function(){for(var n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return n.reduce(combineFunctions)};function getMixer(n,r){return isNum(n)?function(i){return mix(n,r,i)}:p.color.test(n)?mixColor(n,r):mixComplex(n,r)}var mixArray=function(n,r){var i=Object(o.f)(n),s=i.length,p=n.map((function(n,i){return getMixer(n,r[i])}));return function(n){for(var r=0;r<s;r++)i[r]=p[r](n);return i}},mixObject=function(n,r){var i=Object(o.a)(Object(o.a)({},n),r),s={};for(var p in i)void 0!==n[p]&&void 0!==r[p]&&(s[p]=getMixer(n[p],r[p]));return function(n){for(var r in s)i[r]=s[r](n);return i}};function analyse(n){for(var r=p.complex.parse(n),i=r.length,o=0,s=0,S=0,_=0;_<i;_++)o||"number"==typeof r[_]?o++:void 0!==r[_].hue?S++:s++;return{parsed:r,numNumbers:o,numRGB:s,numHSL:S}}var mixComplex=function(n,r){var i=p.complex.createTransformer(r),o=analyse(n),S=analyse(r);return Object(s.invariant)(o.numHSL===S.numHSL&&o.numRGB===S.numRGB&&o.numNumbers>=S.numNumbers,"Complex values '"+n+"' and '"+r+"' too different to mix. Ensure all colors are of the same type."),pipe(mixArray(o.parsed,S.parsed),i)},mixNumber=function(n,r){return function(i){return mix(n,r,i)}};function createMixers(n,r,i){for(var o=[],s=i||function detectMixerFactory(n){return"number"==typeof n?mixNumber:"string"==typeof n?p.color.test(n)?mixColor:mixComplex:Array.isArray(n)?mixArray:"object"==typeof n?mixObject:void 0}(n[0]),S=n.length-1,_=0;_<S;_++){var x=s(n[_],n[_+1]);if(r){var O=Array.isArray(r)?r[_]:r;x=pipe(O,x)}o.push(x)}return o}function interpolate(n,r,i){var o=void 0===i?{}:i,p=o.clamp,S=void 0===p||p,_=o.ease,x=o.mixer,O=n.length;Object(s.invariant)(O===r.length,"Both input and output ranges must be the same length"),Object(s.invariant)(!_||!Array.isArray(_)||_.length===O-1,"Array of easing functions must be of length `input.length - 1`, as it applies to the transitions **between** the defined values."),n[0]>n[O-1]&&(n=[].concat(n),r=[].concat(r),n.reverse(),r.reverse());var w=createMixers(r,_,x),P=2===O?function fastInterpolate(n,r){var i=n[0],o=n[1],s=r[0];return function(n){return s(progress(i,o,n))}}(n,w):function slowInterpolate(n,r){var i=n.length,o=i-1;return function(s){var p=0,S=!1;if(s<=n[0]?S=!0:s>=n[o]&&(p=o-1,S=!0),!S){for(var _=1;_<i&&!(n[_]>s||_===o);_++);p=_-1}var x=progress(n[p],n[p+1],s);return r[p](x)}}(n,w);return S?function(r){return P(clamp(n[0],n[O-1],r))}:P}var reverseEasing=function(n){return function(r){return 1-n(1-r)}},mirrorEasing=function(n){return function(r){return r<=.5?n(2*r)/2:(2-n(2*(1-r)))/2}},createExpoIn=function(n){return function(r){return Math.pow(r,n)}},createBackIn=function(n){return function(r){return r*r*((n+1)*r-n)}},createAnticipate=function(n){var r=createBackIn(n);return function(n){return(n*=2)<1?.5*r(n):.5*(2-Math.pow(2,-10*(n-1)))}},linear=function(n){return n},P=createExpoIn(2),T=reverseEasing(P),j=mirrorEasing(P),circIn=function(n){return 1-Math.sin(Math.acos(n))},D=reverseEasing(circIn),N=mirrorEasing(D),U=createBackIn(1.525),q=reverseEasing(U),$=mirrorEasing(U),te=createAnticipate(1.525),bounceOut=function(n){if(1===n||0===n)return n;var r=n*n;return n<4/11?7.5625*r:n<8/11?9.075*r-9.9*n+3.4:n<.9?4356/361*r-35442/1805*n+16061/1805:10.8*n*n-20.52*n+10.72},ie=reverseEasing(bounceOut),bounceInOut=function(n){return n<.5?.5*(1-bounceOut(1-2*n)):.5*bounceOut(2*n-1)+.5};function defaultEasing(n,r){return n.map((function(){return r||j})).splice(0,n.length-1)}function keyframes(n){var r=n.from,i=void 0===r?0:r,o=n.to,s=void 0===o?1:o,p=n.ease,S=n.offset,_=n.duration,x=void 0===_?300:_,O={done:!1,value:i},w=Array.isArray(s)?s:[i,s],P=function convertOffsetToTimes(n,r){return n.map((function(n){return n*r}))}(S&&S.length===w.length?S:function defaultOffset(n){var r=n.length;return n.map((function(n,i){return 0!==i?i/(r-1):0}))}(w),x);function createInterpolator(){return interpolate(P,w,{ease:Array.isArray(p)?p:defaultEasing(w,p)})}var T=createInterpolator();return{next:function(n){return O.value=T(n),O.done=n>=x,O},flipTarget:function(){w.reverse(),T=createInterpolator()}}}function decay(n){var r=n.velocity,i=void 0===r?0:r,o=n.from,s=void 0===o?0:o,p=n.power,S=void 0===p?.8:p,_=n.timeConstant,x=void 0===_?350:_,O=n.restDelta,w=void 0===O?.5:O,P=n.modifyTarget,T={done:!1,value:s},j=S*i,D=s+j,N=void 0===P?D:P(D);return N!==D&&(j=N-s),{next:function(n){var r=-j*Math.exp(-n/x);return T.done=!(r>w||r<-w),T.value=T.done?N:N+r,T},flipTarget:function(){}}}var ue={keyframes,spring,decay};function loopElapsed(n,r,i){return void 0===i&&(i=0),n-r-i}var framesync=function(n){var passTimestamp=function(r){var i=r.delta;return n(i)};return{start:function(){return S.default.update(passTimestamp,!0,!0)},stop:function(){return S.cancelSync.update(passTimestamp)}}};function animate(n){var r,i,s,p,S,_=n.from,x=n.autoplay,O=void 0===x||x,w=n.driver,P=void 0===w?framesync:w,T=n.elapsed,j=void 0===T?0:T,D=n.repeat,N=void 0===D?0:D,U=n.repeatType,q=void 0===U?"loop":U,$=n.repeatDelay,te=void 0===$?0:$,ie=n.onPlay,le=n.onStop,pe=n.onComplete,he=n.onRepeat,me=n.onUpdate,ve=Object(o.d)(n,["from","autoplay","driver","elapsed","repeat","repeatType","repeatDelay","onPlay","onStop","onComplete","onRepeat","onUpdate"]),Se=ve.to,_e=0,we=ve.duration,Pe=!1,Te=!0,Ee=function detectAnimationFromOptions(n){if(Array.isArray(n.to))return keyframes;if(ue[n.type])return ue[n.type];var r=new Set(Object.keys(n));return r.has("ease")||r.has("duration")&&!r.has("dampingRatio")?keyframes:r.has("dampingRatio")||r.has("stiffness")||r.has("mass")||r.has("damping")||r.has("restSpeed")||r.has("restDelta")?spring:keyframes}(ve);(null===(i=(r=Ee).needsInterpolation)||void 0===i?void 0:i.call(r,_,Se))&&(S=interpolate([0,100],[_,Se],{clamp:!1}),_=0,Se=100);var ke=Ee(Object(o.a)(Object(o.a)({},ve),{from:_,to:Se}));function repeat(){_e++,"reverse"===q?j=function reverseElapsed(n,r,i,o){return void 0===i&&(i=0),void 0===o&&(o=!0),o?loopElapsed(r+-n,r,i):r-(n-r)+i}(j,we,te,Te=_e%2==0):(j=loopElapsed(j,we,te),"mirror"===q&&ke.flipTarget()),Pe=!1,he&&he()}function update(n){if(Te||(n=-n),j+=n,!Pe){var r=ke.next(Math.max(0,j));p=r.value,S&&(p=S(p)),Pe=Te?r.done:j<=0}null==me||me(p),Pe&&(0===_e&&(null!=we||(we=j)),_e<N?function hasRepeatDelayElapsed(n,r,i,o){return o?n>=r+i:n<=-i}(j,we,te,Te)&&repeat():function complete(){s.stop(),pe&&pe()}())}return O&&function play(){null==ie||ie(),(s=P(update)).start()}(),{stop:function(){null==le||le(),s.stop()}}}function velocityPerSecond(n,r){return r?n*(1e3/r):0}function inertia(n){var r,i=n.from,s=void 0===i?0:i,p=n.velocity,_=void 0===p?0:p,x=n.min,O=n.max,w=n.power,P=void 0===w?.8:w,T=n.timeConstant,j=void 0===T?750:T,D=n.bounceStiffness,N=void 0===D?500:D,U=n.bounceDamping,q=void 0===U?10:U,$=n.restDelta,te=void 0===$?1:$,ie=n.modifyTarget,ue=n.driver,le=n.onUpdate,pe=n.onComplete;function isOutOfBounds(n){return void 0!==x&&n<x||void 0!==O&&n>O}function boundaryNearest(n){return void 0===x?O:void 0===O||Math.abs(x-n)<Math.abs(O-n)?x:O}function startAnimation(n){null==r||r.stop(),r=animate(Object(o.a)(Object(o.a)({},n),{driver:ue,onUpdate:function(r){var i;null==le||le(r),null===(i=n.onUpdate)||void 0===i||i.call(n,r)},onComplete:pe}))}function startSpring(n){startAnimation(Object(o.a)({type:"spring",stiffness:N,damping:q,restDelta:te},n))}if(isOutOfBounds(s))startSpring({from:s,velocity:_,to:boundaryNearest(s)});else{var he=P*_+s;void 0!==ie&&(he=ie(he));var me,ve,Se=boundaryNearest(he),_e=Se===x?-1:1;startAnimation({type:"decay",from:s,velocity:_,timeConstant:j,power:P,restDelta:te,modifyTarget:ie,onUpdate:isOutOfBounds(he)?function(n){me=ve,ve=n,_=velocityPerSecond(n-me,Object(S.getFrameData)().delta),(1===_e&&n>Se||-1===_e&&n<Se)&&startSpring({from:n,to:Se,velocity:_})}:void 0})}return{stop:function(){return null==r?void 0:r.stop()}}}var radiansToDegrees=function(n){return 180*n/Math.PI},angle=function(n,r){return void 0===r&&(r=w),radiansToDegrees(Math.atan2(r.y-n.y,r.x-n.x))},applyOffset=function(n,r){var i=!0;return void 0===r&&(r=n,i=!1),function(o){return i?o-n+r:(n=o,i=!0,r)}},identity=function(n){return n},createAttractor=function(n){return void 0===n&&(n=identity),function(r,i,o){var s=i-o,p=-(0-r+1)*(0-n(Math.abs(s)));return s<=0?i+p:i-p}},le=createAttractor(),pe=createAttractor(Math.sqrt),degreesToRadians=function(n){return n*Math.PI/180},isPoint=function(n){return n.hasOwnProperty("x")&&n.hasOwnProperty("y")},isPoint3D=function(n){return isPoint(n)&&n.hasOwnProperty("z")},distance1D=function(n,r){return Math.abs(n-r)};function distance(n,r){if(isNum(n)&&isNum(r))return distance1D(n,r);if(isPoint(n)&&isPoint(r)){var i=distance1D(n.x,r.x),o=distance1D(n.y,r.y),s=isPoint3D(n)&&isPoint3D(r)?distance1D(n.z,r.z):0;return Math.sqrt(Math.pow(i,2)+Math.pow(o,2)+Math.pow(s,2))}}var pointFromVector=function(n,r,i){return r=degreesToRadians(r),{x:i*Math.cos(r)+n.x,y:i*Math.sin(r)+n.y}},toDecimal=function(n,r){return void 0===r&&(r=2),r=Math.pow(10,r),Math.round(n*r)/r},smoothFrame=function(n,r,i,o){return void 0===o&&(o=0),toDecimal(n+i*(r-n)/Math.max(o,i))},smooth=function(n){void 0===n&&(n=50);var r=0,i=0;return function(o){var s=Object(S.getFrameData)().timestamp,p=s!==i?s-i:0,_=p?smoothFrame(r,o,p,n):r;return i=s,r=_,_}},snap=function(n){if("number"==typeof n)return function(r){return Math.round(r/n)*n};var r=0,i=n.length;return function(o){var s=Math.abs(n[0]-o);for(r=1;r<i;r++){var p=n[r],S=Math.abs(p-o);if(0===S)return p;if(S>s)return n[r-1];if(r===i-1)return p;s=S}}};function velocityPerFrame(n,r){return n/(1e3/r)}var wrap=function(n,r,i){var o=r-n;return((i-n)%o+o)%o+n},a=function(n,r){return 1-3*r+3*n},b=function(n,r){return 3*r-6*n},c=function(n){return 3*n},calcBezier=function(n,r,i){return((a(r,i)*n+b(r,i))*n+c(r))*n},getSlope=function(n,r,i){return 3*a(r,i)*n*n+2*b(r,i)*n+c(r)};function cubicBezier(n,r,i,o){if(n===r&&i===o)return linear;for(var s=new Float32Array(11),p=0;p<11;++p)s[p]=calcBezier(.1*p,n,i);function getTForX(r){for(var o=0,p=1;10!==p&&s[p]<=r;++p)o+=.1;--p;var S=o+.1*((r-s[p])/(s[p+1]-s[p])),_=getSlope(S,n,i);return _>=.001?function newtonRaphsonIterate(n,r,i,o){for(var s=0;s<8;++s){var p=getSlope(r,i,o);if(0===p)return r;r-=(calcBezier(r,i,o)-n)/p}return r}(r,S,n,i):0===_?S:function binarySubdivide(n,r,i,o,s){var p,S,_=0;do{(p=calcBezier(S=r+(i-r)/2,o,s)-n)>0?i=S:r=S}while(Math.abs(p)>1e-7&&++_<10);return S}(r,o,o+.1,n,i)}return function(n){return 0===n||1===n?n:calcBezier(getTForX(n),r,o)}}var steps=function(n,r){return void 0===r&&(r="end"),function(i){var o=(i="end"===r?Math.min(i,.999):Math.max(i,.001))*n,s="end"===r?Math.floor(o):Math.ceil(o);return clamp(0,1,s/n)}}},function(n,r,i){n.exports=function(){"use strict";var n=Array.prototype.slice;function createClass(n,r){r&&(n.prototype=Object.create(r.prototype)),n.prototype.constructor=n}function Iterable(n){return isIterable(n)?n:Seq(n)}function KeyedIterable(n){return isKeyed(n)?n:KeyedSeq(n)}function IndexedIterable(n){return isIndexed(n)?n:IndexedSeq(n)}function SetIterable(n){return isIterable(n)&&!isAssociative(n)?n:SetSeq(n)}function isIterable(n){return!(!n||!n[r])}function isKeyed(n){return!(!n||!n[i])}function isIndexed(n){return!(!n||!n[o])}function isAssociative(n){return isKeyed(n)||isIndexed(n)}function isOrdered(n){return!(!n||!n[s])}createClass(KeyedIterable,Iterable),createClass(IndexedIterable,Iterable),createClass(SetIterable,Iterable),Iterable.isIterable=isIterable,Iterable.isKeyed=isKeyed,Iterable.isIndexed=isIndexed,Iterable.isAssociative=isAssociative,Iterable.isOrdered=isOrdered,Iterable.Keyed=KeyedIterable,Iterable.Indexed=IndexedIterable,Iterable.Set=SetIterable;var r="@@__IMMUTABLE_ITERABLE__@@",i="@@__IMMUTABLE_KEYED__@@",o="@@__IMMUTABLE_INDEXED__@@",s="@@__IMMUTABLE_ORDERED__@@",p={},S={value:!1},_={value:!1};function MakeRef(n){return n.value=!1,n}function SetRef(n){n&&(n.value=!0)}function OwnerID(){}function arrCopy(n,r){r=r||0;for(var i=Math.max(0,n.length-r),o=new Array(i),s=0;s<i;s++)o[s]=n[s+r];return o}function ensureSize(n){return void 0===n.size&&(n.size=n.__iterate(returnTrue)),n.size}function wrapIndex(n,r){if("number"!=typeof r){var i=r>>>0;if(""+i!==r||4294967295===i)return NaN;r=i}return r<0?ensureSize(n)+r:r}function returnTrue(){return!0}function wholeSlice(n,r,i){return(0===n||void 0!==i&&n<=-i)&&(void 0===r||void 0!==i&&r>=i)}function resolveBegin(n,r){return resolveIndex(n,r,0)}function resolveEnd(n,r){return resolveIndex(n,r,r)}function resolveIndex(n,r,i){return void 0===n?i:n<0?Math.max(0,r+n):void 0===r?n:Math.min(r,n)}var x,O,w,P="function"==typeof Symbol&&Symbol.iterator,T=P||"@@iterator";function Iterator(n){this.next=n}function iteratorValue(n,r,i,o){var s=0===n?r:1===n?i:[r,i];return o?o.value=s:o={value:s,done:!1},o}function iteratorDone(){return{value:void 0,done:!0}}function hasIterator(n){return!!getIteratorFn(n)}function isIterator(n){return n&&"function"==typeof n.next}function getIterator(n){var r=getIteratorFn(n);return r&&r.call(n)}function getIteratorFn(n){var r=n&&(P&&n[P]||n["@@iterator"]);if("function"==typeof r)return r}function isArrayLike(n){return n&&"number"==typeof n.length}function Seq(n){return null==n?emptySequence():isIterable(n)?n.toSeq():function seqFromValue(n){var r=maybeIndexedSeqFromValue(n)||"object"==typeof n&&new ObjectSeq(n);if(!r)throw new TypeError("Expected Array or iterable object of values, or keyed object: "+n);return r}(n)}function KeyedSeq(n){return null==n?emptySequence().toKeyedSeq():isIterable(n)?isKeyed(n)?n.toSeq():n.fromEntrySeq():keyedSeqFromValue(n)}function IndexedSeq(n){return null==n?emptySequence():isIterable(n)?isKeyed(n)?n.entrySeq():n.toIndexedSeq():indexedSeqFromValue(n)}function SetSeq(n){return(null==n?emptySequence():isIterable(n)?isKeyed(n)?n.entrySeq():n:indexedSeqFromValue(n)).toSetSeq()}function ArraySeq(n){this._array=n,this.size=n.length}function ObjectSeq(n){var r=Object.keys(n);this._object=n,this._keys=r,this.size=r.length}function IterableSeq(n){this._iterable=n,this.size=n.length||n.size}function IteratorSeq(n){this._iterator=n,this._iteratorCache=[]}function isSeq(n){return!(!n||!n["@@__IMMUTABLE_SEQ__@@"])}function emptySequence(){return x||(x=new ArraySeq([]))}function keyedSeqFromValue(n){var r=Array.isArray(n)?new ArraySeq(n).fromEntrySeq():isIterator(n)?new IteratorSeq(n).fromEntrySeq():hasIterator(n)?new IterableSeq(n).fromEntrySeq():"object"==typeof n?new ObjectSeq(n):void 0;if(!r)throw new TypeError("Expected Array or iterable object of [k, v] entries, or keyed object: "+n);return r}function indexedSeqFromValue(n){var r=maybeIndexedSeqFromValue(n);if(!r)throw new TypeError("Expected Array or iterable object of values: "+n);return r}function maybeIndexedSeqFromValue(n){return isArrayLike(n)?new ArraySeq(n):isIterator(n)?new IteratorSeq(n):hasIterator(n)?new IterableSeq(n):void 0}function seqIterate(n,r,i,o){var s=n._cache;if(s){for(var p=s.length-1,S=0;S<=p;S++){var _=s[i?p-S:S];if(!1===r(_[1],o?_[0]:S,n))return S+1}return S}return n.__iterateUncached(r,i)}function seqIterator(n,r,i,o){var s=n._cache;if(s){var p=s.length-1,S=0;return new Iterator((function(){var n=s[i?p-S:S];return S++>p?{value:void 0,done:!0}:iteratorValue(r,o?n[0]:S-1,n[1])}))}return n.__iteratorUncached(r,i)}function fromJS(n,r){return r?function fromJSWith(n,r,i,o){return Array.isArray(r)?n.call(o,i,IndexedSeq(r).map((function(i,o){return fromJSWith(n,i,o,r)}))):isPlainObj(r)?n.call(o,i,KeyedSeq(r).map((function(i,o){return fromJSWith(n,i,o,r)}))):r}(r,n,"",{"":n}):fromJSDefault(n)}function fromJSDefault(n){return Array.isArray(n)?IndexedSeq(n).map(fromJSDefault).toList():isPlainObj(n)?KeyedSeq(n).map(fromJSDefault).toMap():n}function isPlainObj(n){return n&&(n.constructor===Object||void 0===n.constructor)}function is(n,r){if(n===r||n!=n&&r!=r)return!0;if(!n||!r)return!1;if("function"==typeof n.valueOf&&"function"==typeof r.valueOf){if((n=n.valueOf())===(r=r.valueOf())||n!=n&&r!=r)return!0;if(!n||!r)return!1}return!("function"!=typeof n.equals||"function"!=typeof r.equals||!n.equals(r))}function deepEqual(n,r){if(n===r)return!0;if(!isIterable(r)||void 0!==n.size&&void 0!==r.size&&n.size!==r.size||void 0!==n.__hash&&void 0!==r.__hash&&n.__hash!==r.__hash||isKeyed(n)!==isKeyed(r)||isIndexed(n)!==isIndexed(r)||isOrdered(n)!==isOrdered(r))return!1;if(0===n.size&&0===r.size)return!0;var i=!isAssociative(n);if(isOrdered(n)){var o=n.entries();return r.every((function(n,r){var s=o.next().value;return s&&is(s[1],n)&&(i||is(s[0],r))}))&&o.next().done}var s=!1;if(void 0===n.size)if(void 0===r.size)"function"==typeof n.cacheResult&&n.cacheResult();else{s=!0;var S=n;n=r,r=S}var _=!0,x=r.__iterate((function(r,o){if(i?!n.has(r):s?!is(r,n.get(o,p)):!is(n.get(o,p),r))return _=!1,!1}));return _&&n.size===x}function Repeat(n,r){if(!(this instanceof Repeat))return new Repeat(n,r);if(this._value=n,this.size=void 0===r?1/0:Math.max(0,r),0===this.size){if(O)return O;O=this}}function invariant(n,r){if(!n)throw new Error(r)}function Range(n,r,i){if(!(this instanceof Range))return new Range(n,r,i);if(invariant(0!==i,"Cannot step a Range by 0"),n=n||0,void 0===r&&(r=1/0),i=void 0===i?1:Math.abs(i),r<n&&(i=-i),this._start=n,this._end=r,this._step=i,this.size=Math.max(0,Math.ceil((r-n)/i-1)+1),0===this.size){if(w)return w;w=this}}function Collection(){throw TypeError("Abstract")}function KeyedCollection(){}function IndexedCollection(){}function SetCollection(){}Iterator.prototype.toString=function(){return"[Iterator]"},Iterator.KEYS=0,Iterator.VALUES=1,Iterator.ENTRIES=2,Iterator.prototype.inspect=Iterator.prototype.toSource=function(){return this.toString()},Iterator.prototype[T]=function(){return this},createClass(Seq,Iterable),Seq.of=function(){return Seq(arguments)},Seq.prototype.toSeq=function(){return this},Seq.prototype.toString=function(){return this.__toString("Seq {","}")},Seq.prototype.cacheResult=function(){return!this._cache&&this.__iterateUncached&&(this._cache=this.entrySeq().toArray(),this.size=this._cache.length),this},Seq.prototype.__iterate=function(n,r){return seqIterate(this,n,r,!0)},Seq.prototype.__iterator=function(n,r){return seqIterator(this,n,r,!0)},createClass(KeyedSeq,Seq),KeyedSeq.prototype.toKeyedSeq=function(){return this},createClass(IndexedSeq,Seq),IndexedSeq.of=function(){return IndexedSeq(arguments)},IndexedSeq.prototype.toIndexedSeq=function(){return this},IndexedSeq.prototype.toString=function(){return this.__toString("Seq [","]")},IndexedSeq.prototype.__iterate=function(n,r){return seqIterate(this,n,r,!1)},IndexedSeq.prototype.__iterator=function(n,r){return seqIterator(this,n,r,!1)},createClass(SetSeq,Seq),SetSeq.of=function(){return SetSeq(arguments)},SetSeq.prototype.toSetSeq=function(){return this},Seq.isSeq=isSeq,Seq.Keyed=KeyedSeq,Seq.Set=SetSeq,Seq.Indexed=IndexedSeq,Seq.prototype["@@__IMMUTABLE_SEQ__@@"]=!0,createClass(ArraySeq,IndexedSeq),ArraySeq.prototype.get=function(n,r){return this.has(n)?this._array[wrapIndex(this,n)]:r},ArraySeq.prototype.__iterate=function(n,r){for(var i=this._array,o=i.length-1,s=0;s<=o;s++)if(!1===n(i[r?o-s:s],s,this))return s+1;return s},ArraySeq.prototype.__iterator=function(n,r){var i=this._array,o=i.length-1,s=0;return new Iterator((function(){return s>o?{value:void 0,done:!0}:iteratorValue(n,s,i[r?o-s++:s++])}))},createClass(ObjectSeq,KeyedSeq),ObjectSeq.prototype.get=function(n,r){return void 0===r||this.has(n)?this._object[n]:r},ObjectSeq.prototype.has=function(n){return this._object.hasOwnProperty(n)},ObjectSeq.prototype.__iterate=function(n,r){for(var i=this._object,o=this._keys,s=o.length-1,p=0;p<=s;p++){var S=o[r?s-p:p];if(!1===n(i[S],S,this))return p+1}return p},ObjectSeq.prototype.__iterator=function(n,r){var i=this._object,o=this._keys,s=o.length-1,p=0;return new Iterator((function(){var S=o[r?s-p:p];return p++>s?{value:void 0,done:!0}:iteratorValue(n,S,i[S])}))},ObjectSeq.prototype[s]=!0,createClass(IterableSeq,IndexedSeq),IterableSeq.prototype.__iterateUncached=function(n,r){if(r)return this.cacheResult().__iterate(n,r);var i=getIterator(this._iterable),o=0;if(isIterator(i))for(var s;!(s=i.next()).done&&!1!==n(s.value,o++,this););return o},IterableSeq.prototype.__iteratorUncached=function(n,r){if(r)return this.cacheResult().__iterator(n,r);var i=getIterator(this._iterable);if(!isIterator(i))return new Iterator(iteratorDone);var o=0;return new Iterator((function(){var r=i.next();return r.done?r:iteratorValue(n,o++,r.value)}))},createClass(IteratorSeq,IndexedSeq),IteratorSeq.prototype.__iterateUncached=function(n,r){if(r)return this.cacheResult().__iterate(n,r);for(var i,o=this._iterator,s=this._iteratorCache,p=0;p<s.length;)if(!1===n(s[p],p++,this))return p;for(;!(i=o.next()).done;){var S=i.value;if(s[p]=S,!1===n(S,p++,this))break}return p},IteratorSeq.prototype.__iteratorUncached=function(n,r){if(r)return this.cacheResult().__iterator(n,r);var i=this._iterator,o=this._iteratorCache,s=0;return new Iterator((function(){if(s>=o.length){var r=i.next();if(r.done)return r;o[s]=r.value}return iteratorValue(n,s,o[s++])}))},createClass(Repeat,IndexedSeq),Repeat.prototype.toString=function(){return 0===this.size?"Repeat []":"Repeat [ "+this._value+" "+this.size+" times ]"},Repeat.prototype.get=function(n,r){return this.has(n)?this._value:r},Repeat.prototype.includes=function(n){return is(this._value,n)},Repeat.prototype.slice=function(n,r){var i=this.size;return wholeSlice(n,r,i)?this:new Repeat(this._value,resolveEnd(r,i)-resolveBegin(n,i))},Repeat.prototype.reverse=function(){return this},Repeat.prototype.indexOf=function(n){return is(this._value,n)?0:-1},Repeat.prototype.lastIndexOf=function(n){return is(this._value,n)?this.size:-1},Repeat.prototype.__iterate=function(n,r){for(var i=0;i<this.size;i++)if(!1===n(this._value,i,this))return i+1;return i},Repeat.prototype.__iterator=function(n,r){var i=this,o=0;return new Iterator((function(){return o<i.size?iteratorValue(n,o++,i._value):{value:void 0,done:!0}}))},Repeat.prototype.equals=function(n){return n instanceof Repeat?is(this._value,n._value):deepEqual(n)},createClass(Range,IndexedSeq),Range.prototype.toString=function(){return 0===this.size?"Range []":"Range [ "+this._start+"..."+this._end+(1!==this._step?" by "+this._step:"")+" ]"},Range.prototype.get=function(n,r){return this.has(n)?this._start+wrapIndex(this,n)*this._step:r},Range.prototype.includes=function(n){var r=(n-this._start)/this._step;return r>=0&&r<this.size&&r===Math.floor(r)},Range.prototype.slice=function(n,r){return wholeSlice(n,r,this.size)?this:(n=resolveBegin(n,this.size),(r=resolveEnd(r,this.size))<=n?new Range(0,0):new Range(this.get(n,this._end),this.get(r,this._end),this._step))},Range.prototype.indexOf=function(n){var r=n-this._start;if(r%this._step==0){var i=r/this._step;if(i>=0&&i<this.size)return i}return-1},Range.prototype.lastIndexOf=function(n){return this.indexOf(n)},Range.prototype.__iterate=function(n,r){for(var i=this.size-1,o=this._step,s=r?this._start+i*o:this._start,p=0;p<=i;p++){if(!1===n(s,p,this))return p+1;s+=r?-o:o}return p},Range.prototype.__iterator=function(n,r){var i=this.size-1,o=this._step,s=r?this._start+i*o:this._start,p=0;return new Iterator((function(){var S=s;return s+=r?-o:o,p>i?{value:void 0,done:!0}:iteratorValue(n,p++,S)}))},Range.prototype.equals=function(n){return n instanceof Range?this._start===n._start&&this._end===n._end&&this._step===n._step:deepEqual(this,n)},createClass(Collection,Iterable),createClass(KeyedCollection,Collection),createClass(IndexedCollection,Collection),createClass(SetCollection,Collection),Collection.Keyed=KeyedCollection,Collection.Indexed=IndexedCollection,Collection.Set=SetCollection;var j="function"==typeof Math.imul&&-2===Math.imul(4294967295,2)?Math.imul:function imul(n,r){var i=65535&(n|=0),o=65535&(r|=0);return i*o+((n>>>16)*o+i*(r>>>16)<<16>>>0)|0};function smi(n){return n>>>1&1073741824|3221225471&n}function hash(n){if(!1===n||null==n)return 0;if("function"==typeof n.valueOf&&(!1===(n=n.valueOf())||null==n))return 0;if(!0===n)return 1;var r=typeof n;if("number"===r){if(n!=n||n===1/0)return 0;var i=0|n;for(i!==n&&(i^=4294967295*n);n>4294967295;)i^=n/=4294967295;return smi(i)}if("string"===r)return n.length>ie?function cachedHashString(n){var r=pe[n];return void 0===r&&(r=hashString(n),le===ue&&(le=0,pe={}),le++,pe[n]=r),r}(n):hashString(n);if("function"==typeof n.hashCode)return n.hashCode();if("object"===r)return function hashJSObj(n){var r;if(q&&void 0!==(r=D.get(n)))return r;if(void 0!==(r=n[te]))return r;if(!U){if(void 0!==(r=n.propertyIsEnumerable&&n.propertyIsEnumerable[te]))return r;if(void 0!==(r=function getIENodeHash(n){if(n&&n.nodeType>0)switch(n.nodeType){case 1:return n.uniqueID;case 9:return n.documentElement&&n.documentElement.uniqueID}}(n)))return r}if(r=++$,1073741824&$&&($=0),q)D.set(n,r);else{if(void 0!==N&&!1===N(n))throw new Error("Non-extensible objects are not allowed as keys.");if(U)Object.defineProperty(n,te,{enumerable:!1,configurable:!1,writable:!1,value:r});else if(void 0!==n.propertyIsEnumerable&&n.propertyIsEnumerable===n.constructor.prototype.propertyIsEnumerable)n.propertyIsEnumerable=function(){return this.constructor.prototype.propertyIsEnumerable.apply(this,arguments)},n.propertyIsEnumerable[te]=r;else{if(void 0===n.nodeType)throw new Error("Unable to set a non-enumerable property on object.");n[te]=r}}return r}(n);if("function"==typeof n.toString)return hashString(n.toString());throw new Error("Value type "+r+" cannot be hashed.")}function hashString(n){for(var r=0,i=0;i<n.length;i++)r=31*r+n.charCodeAt(i)|0;return smi(r)}var D,N=Object.isExtensible,U=function(){try{return Object.defineProperty({},"@",{}),!0}catch(n){return!1}}(),q="function"==typeof WeakMap;q&&(D=new WeakMap);var $=0,te="__immutablehash__";"function"==typeof Symbol&&(te=Symbol(te));var ie=16,ue=255,le=0,pe={};function assertNotInfinite(n){invariant(n!==1/0,"Cannot perform this action with an infinite size.")}function Map(n){return null==n?emptyMap():isMap(n)&&!isOrdered(n)?n:emptyMap().withMutations((function(r){var i=KeyedIterable(n);assertNotInfinite(i.size),i.forEach((function(n,i){return r.set(i,n)}))}))}function isMap(n){return!(!n||!n[me])}createClass(Map,KeyedCollection),Map.of=function(){var r=n.call(arguments,0);return emptyMap().withMutations((function(n){for(var i=0;i<r.length;i+=2){if(i+1>=r.length)throw new Error("Missing value for key: "+r[i]);n.set(r[i],r[i+1])}}))},Map.prototype.toString=function(){return this.__toString("Map {","}")},Map.prototype.get=function(n,r){return this._root?this._root.get(0,void 0,n,r):r},Map.prototype.set=function(n,r){return updateMap(this,n,r)},Map.prototype.setIn=function(n,r){return this.updateIn(n,p,(function(){return r}))},Map.prototype.remove=function(n){return updateMap(this,n,p)},Map.prototype.deleteIn=function(n){return this.updateIn(n,(function(){return p}))},Map.prototype.update=function(n,r,i){return 1===arguments.length?n(this):this.updateIn([n],r,i)},Map.prototype.updateIn=function(n,r,i){i||(i=r,r=void 0);var o=function updateInDeepMap(n,r,i,o){var s=n===p,S=r.next();if(S.done){var _=s?i:n,x=o(_);return x===_?n:x}invariant(s||n&&n.set,"invalid keyPath");var O=S.value,w=s?p:n.get(O,p),P=updateInDeepMap(w,r,i,o);return P===w?n:P===p?n.remove(O):(s?emptyMap():n).set(O,P)}(this,forceIterator(n),r,i);return o===p?void 0:o},Map.prototype.clear=function(){return 0===this.size?this:this.__ownerID?(this.size=0,this._root=null,this.__hash=void 0,this.__altered=!0,this):emptyMap()},Map.prototype.merge=function(){return mergeIntoMapWith(this,void 0,arguments)},Map.prototype.mergeWith=function(r){var i=n.call(arguments,1);return mergeIntoMapWith(this,r,i)},Map.prototype.mergeIn=function(r){var i=n.call(arguments,1);return this.updateIn(r,emptyMap(),(function(n){return"function"==typeof n.merge?n.merge.apply(n,i):i[i.length-1]}))},Map.prototype.mergeDeep=function(){return mergeIntoMapWith(this,deepMerger,arguments)},Map.prototype.mergeDeepWith=function(r){var i=n.call(arguments,1);return mergeIntoMapWith(this,deepMergerWith(r),i)},Map.prototype.mergeDeepIn=function(r){var i=n.call(arguments,1);return this.updateIn(r,emptyMap(),(function(n){return"function"==typeof n.mergeDeep?n.mergeDeep.apply(n,i):i[i.length-1]}))},Map.prototype.sort=function(n){return OrderedMap(sortFactory(this,n))},Map.prototype.sortBy=function(n,r){return OrderedMap(sortFactory(this,r,n))},Map.prototype.withMutations=function(n){var r=this.asMutable();return n(r),r.wasAltered()?r.__ensureOwner(this.__ownerID):this},Map.prototype.asMutable=function(){return this.__ownerID?this:this.__ensureOwner(new OwnerID)},Map.prototype.asImmutable=function(){return this.__ensureOwner()},Map.prototype.wasAltered=function(){return this.__altered},Map.prototype.__iterator=function(n,r){return new MapIterator(this,n,r)},Map.prototype.__iterate=function(n,r){var i=this,o=0;return this._root&&this._root.iterate((function(r){return o++,n(r[1],r[0],i)}),r),o},Map.prototype.__ensureOwner=function(n){return n===this.__ownerID?this:n?makeMap(this.size,this._root,n,this.__hash):(this.__ownerID=n,this.__altered=!1,this)},Map.isMap=isMap;var he,me="@@__IMMUTABLE_MAP__@@",ve=Map.prototype;function ArrayMapNode(n,r){this.ownerID=n,this.entries=r}function BitmapIndexedNode(n,r,i){this.ownerID=n,this.bitmap=r,this.nodes=i}function HashArrayMapNode(n,r,i){this.ownerID=n,this.count=r,this.nodes=i}function HashCollisionNode(n,r,i){this.ownerID=n,this.keyHash=r,this.entries=i}function ValueNode(n,r,i){this.ownerID=n,this.keyHash=r,this.entry=i}function MapIterator(n,r,i){this._type=r,this._reverse=i,this._stack=n._root&&mapIteratorFrame(n._root)}function mapIteratorValue(n,r){return iteratorValue(n,r[0],r[1])}function mapIteratorFrame(n,r){return{node:n,index:0,__prev:r}}function makeMap(n,r,i,o){var s=Object.create(ve);return s.size=n,s._root=r,s.__ownerID=i,s.__hash=o,s.__altered=!1,s}function emptyMap(){return he||(he=makeMap(0))}function updateMap(n,r,i){var o,s;if(n._root){var x=MakeRef(S),O=MakeRef(_);if(o=updateNode(n._root,n.__ownerID,0,void 0,r,i,x,O),!O.value)return n;s=n.size+(x.value?i===p?-1:1:0)}else{if(i===p)return n;s=1,o=new ArrayMapNode(n.__ownerID,[[r,i]])}return n.__ownerID?(n.size=s,n._root=o,n.__hash=void 0,n.__altered=!0,n):o?makeMap(s,o):emptyMap()}function updateNode(n,r,i,o,s,S,_,x){return n?n.update(r,i,o,s,S,_,x):S===p?n:(SetRef(x),SetRef(_),new ValueNode(r,o,[s,S]))}function isLeafNode(n){return n.constructor===ValueNode||n.constructor===HashCollisionNode}function mergeIntoNode(n,r,i,o,s){if(n.keyHash===o)return new HashCollisionNode(r,o,[n.entry,s]);var p,S=31&(0===i?n.keyHash:n.keyHash>>>i),_=31&(0===i?o:o>>>i);return new BitmapIndexedNode(r,1<<S|1<<_,S===_?[mergeIntoNode(n,r,i+5,o,s)]:(p=new ValueNode(r,o,s),S<_?[n,p]:[p,n]))}function mergeIntoMapWith(n,r,i){for(var o=[],s=0;s<i.length;s++){var p=i[s],S=KeyedIterable(p);isIterable(p)||(S=S.map((function(n){return fromJS(n)}))),o.push(S)}return mergeIntoCollectionWith(n,r,o)}function deepMerger(n,r,i){return n&&n.mergeDeep&&isIterable(r)?n.mergeDeep(r):is(n,r)?n:r}function deepMergerWith(n){return function(r,i,o){if(r&&r.mergeDeepWith&&isIterable(i))return r.mergeDeepWith(n,i);var s=n(r,i,o);return is(r,s)?r:s}}function mergeIntoCollectionWith(n,r,i){return 0===(i=i.filter((function(n){return 0!==n.size}))).length?n:0!==n.size||n.__ownerID||1!==i.length?n.withMutations((function(n){for(var o=r?function(i,o){n.update(o,p,(function(n){return n===p?i:r(n,i,o)}))}:function(r,i){n.set(i,r)},s=0;s<i.length;s++)i[s].forEach(o)})):n.constructor(i[0])}function popCount(n){return n=(n=(858993459&(n-=n>>1&1431655765))+(n>>2&858993459))+(n>>4)&252645135,n+=n>>8,127&(n+=n>>16)}function setIn(n,r,i,o){var s=o?n:arrCopy(n);return s[r]=i,s}ve[me]=!0,ve.delete=ve.remove,ve.removeIn=ve.deleteIn,ArrayMapNode.prototype.get=function(n,r,i,o){for(var s=this.entries,p=0,S=s.length;p<S;p++)if(is(i,s[p][0]))return s[p][1];return o},ArrayMapNode.prototype.update=function(n,r,i,o,s,S,_){for(var x=s===p,O=this.entries,w=0,P=O.length;w<P&&!is(o,O[w][0]);w++);var T=w<P;if(T?O[w][1]===s:x)return this;if(SetRef(_),(x||!T)&&SetRef(S),!x||1!==O.length){if(!T&&!x&&O.length>=Se)return function createNodes(n,r,i,o){n||(n=new OwnerID);for(var s=new ValueNode(n,hash(i),[i,o]),p=0;p<r.length;p++){var S=r[p];s=s.update(n,0,void 0,S[0],S[1])}return s}(n,O,o,s);var j=n&&n===this.ownerID,D=j?O:arrCopy(O);return T?x?w===P-1?D.pop():D[w]=D.pop():D[w]=[o,s]:D.push([o,s]),j?(this.entries=D,this):new ArrayMapNode(n,D)}},BitmapIndexedNode.prototype.get=function(n,r,i,o){void 0===r&&(r=hash(i));var s=1<<(31&(0===n?r:r>>>n)),p=this.bitmap;return 0==(p&s)?o:this.nodes[popCount(p&s-1)].get(n+5,r,i,o)},BitmapIndexedNode.prototype.update=function(n,r,i,o,s,S,_){void 0===i&&(i=hash(o));var x=31&(0===r?i:i>>>r),O=1<<x,w=this.bitmap,P=0!=(w&O);if(!P&&s===p)return this;var T=popCount(w&O-1),j=this.nodes,D=P?j[T]:void 0,N=updateNode(D,n,r+5,i,o,s,S,_);if(N===D)return this;if(!P&&N&&j.length>=_e)return function expandNodes(n,r,i,o,s){for(var p=0,S=new Array(32),_=0;0!==i;_++,i>>>=1)S[_]=1&i?r[p++]:void 0;return S[o]=s,new HashArrayMapNode(n,p+1,S)}(n,j,w,x,N);if(P&&!N&&2===j.length&&isLeafNode(j[1^T]))return j[1^T];if(P&&N&&1===j.length&&isLeafNode(N))return N;var U=n&&n===this.ownerID,q=P?N?w:w^O:w|O,$=P?N?setIn(j,T,N,U):function spliceOut(n,r,i){var o=n.length-1;if(i&&r===o)return n.pop(),n;for(var s=new Array(o),p=0,S=0;S<o;S++)S===r&&(p=1),s[S]=n[S+p];return s}(j,T,U):function spliceIn(n,r,i,o){var s=n.length+1;if(o&&r+1===s)return n[r]=i,n;for(var p=new Array(s),S=0,_=0;_<s;_++)_===r?(p[_]=i,S=-1):p[_]=n[_+S];return p}(j,T,N,U);return U?(this.bitmap=q,this.nodes=$,this):new BitmapIndexedNode(n,q,$)},HashArrayMapNode.prototype.get=function(n,r,i,o){void 0===r&&(r=hash(i));var s=31&(0===n?r:r>>>n),p=this.nodes[s];return p?p.get(n+5,r,i,o):o},HashArrayMapNode.prototype.update=function(n,r,i,o,s,S,_){void 0===i&&(i=hash(o));var x=31&(0===r?i:i>>>r),O=s===p,w=this.nodes,P=w[x];if(O&&!P)return this;var T=updateNode(P,n,r+5,i,o,s,S,_);if(T===P)return this;var j=this.count;if(P){if(!T&&--j<we)return function packNodes(n,r,i,o){for(var s=0,p=0,S=new Array(i),_=0,x=1,O=r.length;_<O;_++,x<<=1){var w=r[_];void 0!==w&&_!==o&&(s|=x,S[p++]=w)}return new BitmapIndexedNode(n,s,S)}(n,w,j,x)}else j++;var D=n&&n===this.ownerID,N=setIn(w,x,T,D);return D?(this.count=j,this.nodes=N,this):new HashArrayMapNode(n,j,N)},HashCollisionNode.prototype.get=function(n,r,i,o){for(var s=this.entries,p=0,S=s.length;p<S;p++)if(is(i,s[p][0]))return s[p][1];return o},HashCollisionNode.prototype.update=function(n,r,i,o,s,S,_){void 0===i&&(i=hash(o));var x=s===p;if(i!==this.keyHash)return x?this:(SetRef(_),SetRef(S),mergeIntoNode(this,n,r,i,[o,s]));for(var O=this.entries,w=0,P=O.length;w<P&&!is(o,O[w][0]);w++);var T=w<P;if(T?O[w][1]===s:x)return this;if(SetRef(_),(x||!T)&&SetRef(S),x&&2===P)return new ValueNode(n,this.keyHash,O[1^w]);var j=n&&n===this.ownerID,D=j?O:arrCopy(O);return T?x?w===P-1?D.pop():D[w]=D.pop():D[w]=[o,s]:D.push([o,s]),j?(this.entries=D,this):new HashCollisionNode(n,this.keyHash,D)},ValueNode.prototype.get=function(n,r,i,o){return is(i,this.entry[0])?this.entry[1]:o},ValueNode.prototype.update=function(n,r,i,o,s,S,_){var x=s===p,O=is(o,this.entry[0]);return(O?s===this.entry[1]:x)?this:(SetRef(_),x?void SetRef(S):O?n&&n===this.ownerID?(this.entry[1]=s,this):new ValueNode(n,this.keyHash,[o,s]):(SetRef(S),mergeIntoNode(this,n,r,hash(o),[o,s])))},ArrayMapNode.prototype.iterate=HashCollisionNode.prototype.iterate=function(n,r){for(var i=this.entries,o=0,s=i.length-1;o<=s;o++)if(!1===n(i[r?s-o:o]))return!1},BitmapIndexedNode.prototype.iterate=HashArrayMapNode.prototype.iterate=function(n,r){for(var i=this.nodes,o=0,s=i.length-1;o<=s;o++){var p=i[r?s-o:o];if(p&&!1===p.iterate(n,r))return!1}},ValueNode.prototype.iterate=function(n,r){return n(this.entry)},createClass(MapI