faded
Version:
Standalone Javascript Plugin for creating visually hinted scroll views.
2 lines • 33.1 kB
JavaScript
!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;t="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,t.Fog=e()}}(function(){return function e(t,r,n){function a(o,s){if(!r[o]){if(!t[o]){var u="function"==typeof require&&require;if(!s&&u)return u(o,!0);if(i)return i(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var h=r[o]={exports:{}};t[o][0].call(h.exports,function(e){var r=t[o][1][e];return a(r?r:e)},h,h.exports,e,t,r,n)}return r[o].exports}for(var i="function"==typeof require&&require,o=0;o<n.length;o++)a(n[o]);return a}({1:[function(e,t,r){"use strict";function n(e,t){function r(){return d=i(h)}function n(){return b||r(),!0}function s(e,t,r){return(e-t)/(r-t)}function u(e,t,r){if(r>=1)return e;if(0>=r)return t;var n=e.clone();return n.mix(t,r)}function l(e,t,r,n){var a=r*e;return a=n?r-a:a,t>a?t:a}function h(){function e(e,t){return y>v?t:w>v?l(s(v,y,w),e,t,!0):e}function t(e,t){return d>M?t:d>x?l(s(d,x,M),e,t,!1):e}function r(r,n,a){var i={};return i.top=e(n,a),i.bottom=t(n,a),i}b=!0;var n=[].slice.call(g.children),a=p.style,i=p.range,o=[],h={},c=g.clientHeight,f=g.scrollHeight,v=g.scrollTop,d=v+c;d=d>f?f:d;var m=n[0],y=m.offsetTop,w=y+m.clientHeight,k=n[n.length-1],x=k.offsetTop,M=x+k.clientHeight,S=(1-i)/2,A=S*c,O=v+A,q=d-A;n.forEach(function(e,t){var n=e.offsetTop,i=n+e.offsetHeight;o[t]=o[t]||{};for(var l in a)if(a.hasOwnProperty(l)){var c=a[l].isColor?0:a[l].min,f=a[l].isColor?1:a[l].max,g=c;h[l]||(h[l]=r(l,c,f)),i>=v&&d>=n&&(O>n?(g=f*s(n,v,O),g=g<h[l].top?h[l].top:g):i>q?(g=f-f*s(i,q,d),g=g<h[l].bottom?h[l].bottom:g):g=f),a[l].isColor&&(g=u(a[l].max,a[l].min,g).rgbaString()),o[t][l]=g}}),n.forEach(function(e,t){var r=o[t];for(var n in r)r.hasOwnProperty(n)&&(e.style[n]=r[n])}),b=!1}function c(){var e=Object.keys(v.style),t=Object.keys(p.style),r=o.arrayDifference(e,t);if(e.length&&r.length){var n=[].slice.call(g.children);n.forEach(function(e){r.forEach(function(t){e.style[t]=""})})}}function f(){g.addEventListener("scroll",n),n()}var g=e,v={},p=t,d=0,b=!1;this.remove=function(){var e=!1;return n&&(g.removeEventListener("scroll",n),e=!0),b&&d&&(i.cancel(d),d=0,e=!0),e},this.setOpts=function(e){var t=!1;return v=p,p=a.resolveAllOption(e),r(),c(),t=!0},f()}var a=e(2),i=e(34),o=e(5);t.exports=function(e,t){return e=a.resolveList(e),t=a.resolveAllOption(t),new n(e,t)}},{2:2,34:34,5:5}],2:[function(e,t,r){"use strict";function n(){var e={},t=p["default"].style,r=p["default"].min,n=p["default"].max;return e[t]={isColor:!1,min:r,max:n},e}function a(e){return e.split(".").join(" ").trim()}function i(e){var t=e.trim()[0],r=null;if("#"===t){var n=e.slice(1);r=document.getElementById(n)}else if("."===t){var n=a(e),i=document.getElementsByClassName(n);1!==i.length&&d("Argument 'element' MUST reference single unique <HTMLElement>."),r=i[0]}else d("Argument 'element' MUST reference single unique <HTMLElement>.");return r}function o(e){return e in document.body.style}function s(e){var t;try{t=new v(e)}catch(r){d("Invalid Color "+e)}return t}function u(e,t){var r={};return e.indexOf("color")>=0?(t.min||t.max||d("One <String> (min/max) color is REQUIRED for '"+e+"'"),r.min=s(t.min||p["default"].color),r.max=s(t.max||p["default"].color),r.isColor=!0):(r.min=t.min&&g(t.min)?t.min:p["default"].min,r.max=t.max&&g(t.max)?t.max:p["default"].max,r.isColor=!1),r}function l(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(r=r.toLowerCase(),o(r)||d("'"+r+"' is not supported. Check README."),t[r]=u(r,e[r]));return t}var h=e(24),c=e(29),f=e(30),g=e(27),v=e(10),p=e(3),d=e(4).error;r.resolveList=function(e){return e&&h(e)?e:e&&f(e)?i(e):void d("Argument 'element' typeof <HTMLElement> or <String> REQUIRED!")},r.resolveAllOption=function(e){var t=e&&c(e)?e:{};c(t.style)&&Object.keys(t.style).length>0?t.style=l(t.style):t.style=n();var r=t.range;return t.range=r&&g(r)&&1>=r?r:p["default"].range,t}},{10:10,24:24,27:27,29:29,3:3,30:30,4:4}],3:[function(e,t,r){"use strict";t.exports={title:"Fog",file:"fog.js","default":{style:"opacity",min:.1,max:1,color:"#FFF",range:.6}}},{}],4:[function(e,t,r){"use strict";var n=e(3);r.error=function(){var e=n.title+":",t=Array.prototype.slice.call(arguments);t.unshift(e);var r=t.join(" ");throw new Error(r,n.file)}},{3:3}],5:[function(e,t,r){"use strict";var n=e(4);r.arrayDifference=function(e,t){return Boolean(Array.isArray(e)&&Array.isArray(t))||n("(Helper.arrayExclusiveIntersect): two array arguments required."),e.filter(function(e){return!t.some(function(t){return Boolean(e===t)})})}},{4:4}],6:[function(e,t,n){function a(e){var t,r,n,a=e[0]/255,i=e[1]/255,o=e[2]/255,s=Math.min(a,i,o),u=Math.max(a,i,o),l=u-s;return u==s?t=0:a==u?t=(i-o)/l:i==u?t=2+(o-a)/l:o==u&&(t=4+(a-i)/l),t=Math.min(60*t,360),0>t&&(t+=360),n=(s+u)/2,r=u==s?0:.5>=n?l/(u+s):l/(2-u-s),[t,100*r,100*n]}function i(e){var t,r,n,a=e[0],i=e[1],o=e[2],s=Math.min(a,i,o),u=Math.max(a,i,o),l=u-s;return r=0==u?0:l/u*1e3/10,u==s?t=0:a==u?t=(i-o)/l:i==u?t=2+(o-a)/l:o==u&&(t=4+(a-i)/l),t=Math.min(60*t,360),0>t&&(t+=360),n=u/255*1e3/10,[t,r,n]}function o(e){var t=e[0],r=e[1],n=e[2],i=a(e)[0],o=1/255*Math.min(t,Math.min(r,n)),n=1-1/255*Math.max(t,Math.max(r,n));return[i,100*o,100*n]}function s(e){var t,r,n,a,i=e[0]/255,o=e[1]/255,s=e[2]/255;return a=Math.min(1-i,1-o,1-s),t=(1-i-a)/(1-a)||0,r=(1-o-a)/(1-a)||0,n=(1-s-a)/(1-a)||0,[100*t,100*r,100*n,100*a]}function u(e){return X[JSON.stringify(e)]}function l(e){var t=e[0]/255,r=e[1]/255,n=e[2]/255;t=t>.04045?Math.pow((t+.055)/1.055,2.4):t/12.92,r=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,n=n>.04045?Math.pow((n+.055)/1.055,2.4):n/12.92;var a=.4124*t+.3576*r+.1805*n,i=.2126*t+.7152*r+.0722*n,o=.0193*t+.1192*r+.9505*n;return[100*a,100*i,100*o]}function h(e){var t,r,n,a=l(e),i=a[0],o=a[1],s=a[2];return i/=95.047,o/=100,s/=108.883,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,s=s>.008856?Math.pow(s,1/3):7.787*s+16/116,t=116*o-16,r=500*(i-o),n=200*(o-s),[t,r,n]}function c(e){return R(h(e))}function f(e){var t,r,n,a,i,o=e[0]/360,s=e[1]/100,u=e[2]/100;if(0==s)return i=255*u,[i,i,i];r=.5>u?u*(1+s):u+s-u*s,t=2*u-r,a=[0,0,0];for(var l=0;3>l;l++)n=o+1/3*-(l-1),0>n&&n++,n>1&&n--,i=1>6*n?t+6*(r-t)*n:1>2*n?r:2>3*n?t+(r-t)*(2/3-n)*6:t,a[l]=255*i;return a}function v(e){var t,r,n=e[0],a=e[1]/100,i=e[2]/100;return 0===i?[0,0,0]:(i*=2,a*=1>=i?i:2-i,r=(i+a)/2,t=2*a/(i+a),[n,100*t,100*r])}function p(e){return o(f(e))}function d(e){return s(f(e))}function m(e){return u(f(e))}function y(e){var t=e[0]/60,r=e[1]/100,n=e[2]/100,a=Math.floor(t)%6,i=t-Math.floor(t),o=255*n*(1-r),s=255*n*(1-r*i),u=255*n*(1-r*(1-i)),n=255*n;switch(a){case 0:return[n,u,o];case 1:return[s,n,o];case 2:return[o,n,u];case 3:return[o,s,n];case 4:return[u,o,n];case 5:return[n,o,s]}}function w(e){var t,r,n=e[0],a=e[1]/100,i=e[2]/100;return r=(2-a)*i,t=a*i,t/=1>=r?r:2-r,t=t||0,r/=2,[n,100*t,100*r]}function k(e){return o(y(e))}function x(e){return s(y(e))}function M(e){return u(y(e))}function S(e){var t,n,a,i,o=e[0]/360,s=e[1]/100,u=e[2]/100,l=s+u;switch(l>1&&(s/=l,u/=l),t=Math.floor(6*o),n=1-u,a=6*o-t,0!=(1&t)&&(a=1-a),i=s+a*(n-s),t){default:case 6:case 0:r=n,g=i,b=s;break;case 1:r=i,g=n,b=s;break;case 2:r=s,g=n,b=i;break;case 3:r=s,g=i,b=n;break;case 4:r=i,g=s,b=n;break;case 5:r=n,g=s,b=i}return[255*r,255*g,255*b]}function A(e){return a(S(e))}function O(e){return i(S(e))}function q(e){return s(S(e))}function j(e){return u(S(e))}function C(e){var t,r,n,a=e[0]/100,i=e[1]/100,o=e[2]/100,s=e[3]/100;return t=1-Math.min(1,a*(1-s)+s),r=1-Math.min(1,i*(1-s)+s),n=1-Math.min(1,o*(1-s)+s),[255*t,255*r,255*n]}function V(e){return a(C(e))}function E(e){return i(C(e))}function F(e){return o(C(e))}function T(e){return u(C(e))}function H(e){var t,r,n,a=e[0]/100,i=e[1]/100,o=e[2]/100;return t=3.2406*a+-1.5372*i+o*-.4986,r=a*-.9689+1.8758*i+.0415*o,n=.0557*a+i*-.204+1.057*o,t=t>.0031308?1.055*Math.pow(t,1/2.4)-.055:t=12.92*t,r=r>.0031308?1.055*Math.pow(r,1/2.4)-.055:r=12.92*r,n=n>.0031308?1.055*Math.pow(n,1/2.4)-.055:n=12.92*n,t=Math.min(Math.max(0,t),1),r=Math.min(Math.max(0,r),1),n=Math.min(Math.max(0,n),1),[255*t,255*r,255*n]}function D(e){var t,r,n,a=e[0],i=e[1],o=e[2];return a/=95.047,i/=100,o/=108.883,a=a>.008856?Math.pow(a,1/3):7.787*a+16/116,i=i>.008856?Math.pow(i,1/3):7.787*i+16/116,o=o>.008856?Math.pow(o,1/3):7.787*o+16/116,t=116*i-16,r=500*(a-i),n=200*(i-o),[t,r,n]}function I(e){return R(D(e))}function N(e){var t,r,n,a,i=e[0],o=e[1],s=e[2];return 8>=i?(r=100*i/903.3,a=7.787*(r/100)+16/116):(r=100*Math.pow((i+16)/116,3),a=Math.pow(r/100,1/3)),t=.008856>=t/95.047?t=95.047*(o/500+a-16/116)/7.787:95.047*Math.pow(o/500+a,3),n=.008859>=n/108.883?n=108.883*(a-s/200-16/116)/7.787:108.883*Math.pow(a-s/200,3),[t,r,n]}function R(e){var t,r,n,a=e[0],i=e[1],o=e[2];return t=Math.atan2(o,i),r=360*t/2/Math.PI,0>r&&(r+=360),n=Math.sqrt(i*i+o*o),[a,n,r]}function L(e){return H(N(e))}function z(e){var t,r,n,a=e[0],i=e[1],o=e[2];return n=o/360*2*Math.PI,t=i*Math.cos(n),r=i*Math.sin(n),[a,t,r]}function P(e){return N(z(e))}function $(e){return L(z(e))}function U(e){return W[e]}function B(e){return a(U(e))}function J(e){return i(U(e))}function Q(e){return o(U(e))}function _(e){return s(U(e))}function G(e){return h(U(e))}function K(e){return l(U(e))}t.exports={rgb2hsl:a,rgb2hsv:i,rgb2hwb:o,rgb2cmyk:s,rgb2keyword:u,rgb2xyz:l,rgb2lab:h,rgb2lch:c,hsl2rgb:f,hsl2hsv:v,hsl2hwb:p,hsl2cmyk:d,hsl2keyword:m,hsv2rgb:y,hsv2hsl:w,hsv2hwb:k,hsv2cmyk:x,hsv2keyword:M,hwb2rgb:S,hwb2hsl:A,hwb2hsv:O,hwb2cmyk:q,hwb2keyword:j,cmyk2rgb:C,cmyk2hsl:V,cmyk2hsv:E,cmyk2hwb:F,cmyk2keyword:T,keyword2rgb:U,keyword2hsl:B,keyword2hsv:J,keyword2hwb:Q,keyword2cmyk:_,keyword2lab:G,keyword2xyz:K,xyz2rgb:H,xyz2lab:D,xyz2lch:I,lab2xyz:N,lab2rgb:L,lab2lch:R,lch2lab:z,lch2xyz:P,lch2rgb:$};var W={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},X={};for(var Y in W)X[JSON.stringify(W[Y])]=Y},{}],7:[function(e,t,r){var n=e(6),a=function(){return new l};for(var i in n){a[i+"Raw"]=function(e){return function(t){return"number"==typeof t&&(t=Array.prototype.slice.call(arguments)),n[e](t)}}(i);var o=/(\w+)2(\w+)/.exec(i),s=o[1],u=o[2];a[s]=a[s]||{},a[s][u]=a[i]=function(e){return function(t){"number"==typeof t&&(t=Array.prototype.slice.call(arguments));var r=n[e](t);if("string"==typeof r||void 0===r)return r;for(var a=0;a<r.length;a++)r[a]=Math.round(r[a]);return r}}(i)}var l=function(){this.convs={}};l.prototype.routeSpace=function(e,t){var r=t[0];return void 0===r?this.getValues(e):("number"==typeof r&&(r=Array.prototype.slice.call(t)),this.setValues(e,r))},l.prototype.setValues=function(e,t){return this.space=e,this.convs={},this.convs[e]=t,this},l.prototype.getValues=function(e){var t=this.convs[e];if(!t){var r=this.space,n=this.convs[r];t=a[r][e](n),this.convs[e]=t}return t},["rgb","hsl","hsv","cmyk","keyword"].forEach(function(e){l.prototype[e]=function(t){return this.routeSpace(e,arguments)}}),t.exports=a},{6:6}],8:[function(e,t,r){t.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},{}],9:[function(e,t,r){function n(e){if(e){var t=/^#([a-fA-F0-9]{3})$/,r=/^#([a-fA-F0-9]{6})$/,n=/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,a=/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,i=/(\D+)/,o=[0,0,0],s=1,u=e.match(t);if(u){u=u[1];for(var l=0;l<o.length;l++)o[l]=parseInt(u[l]+u[l],16)}else if(u=e.match(r)){u=u[1];for(var l=0;l<o.length;l++)o[l]=parseInt(u.slice(2*l,2*l+2),16)}else if(u=e.match(n)){for(var l=0;l<o.length;l++)o[l]=parseInt(u[l+1]);s=parseFloat(u[4])}else if(u=e.match(a)){for(var l=0;l<o.length;l++)o[l]=Math.round(2.55*parseFloat(u[l+1]));s=parseFloat(u[4])}else if(u=e.match(i)){if("transparent"==u[1])return[0,0,0,0];if(o=w[u[1]],!o)return}for(var l=0;l<o.length;l++)o[l]=m(o[l],0,255);return s=s||0==s?m(s,0,1):1,o[3]=s,o}}function a(e){if(e){var t=/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,r=e.match(t);if(r){var n=parseFloat(r[4]),a=m(parseInt(r[1]),0,360),i=m(parseFloat(r[2]),0,100),o=m(parseFloat(r[3]),0,100),s=m(isNaN(n)?1:n,0,1);return[a,i,o,s]}}}function i(e){if(e){var t=/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/,r=e.match(t);if(r){var n=parseFloat(r[4]),a=m(parseInt(r[1]),0,360),i=m(parseFloat(r[2]),0,100),o=m(parseFloat(r[3]),0,100),s=m(isNaN(n)?1:n,0,1);return[a,i,o,s]}}}function o(e){var t=n(e);return t&&t.slice(0,3)}function s(e){var t=a(e);return t&&t.slice(0,3)}function u(e){var t=n(e);return t?t[3]:(t=a(e))?t[3]:(t=i(e))?t[3]:void 0}function l(e){return"#"+y(e[0])+y(e[1])+y(e[2])}function h(e,t){return 1>t||e[3]&&e[3]<1?c(e,t):"rgb("+e[0]+", "+e[1]+", "+e[2]+")"}function c(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function f(e,t){if(1>t||e[3]&&e[3]<1)return g(e,t);var r=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),a=Math.round(e[2]/255*100);return"rgb("+r+"%, "+n+"%, "+a+"%)"}function g(e,t){var r=Math.round(e[0]/255*100),n=Math.round(e[1]/255*100),a=Math.round(e[2]/255*100);return"rgba("+r+"%, "+n+"%, "+a+"%, "+(t||e[3]||1)+")"}function v(e,t){return 1>t||e[3]&&e[3]<1?p(e,t):"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"}function p(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function d(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"}function b(e){return k[e.slice(0,3)]}function m(e,t,r){return Math.min(Math.max(t,e),r)}function y(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var w=e(8);t.exports={getRgba:n,getHsla:a,getRgb:o,getHsl:s,getHwb:i,getAlpha:u,hexString:l,rgbString:h,rgbaString:c,percentString:f,percentaString:g,hslString:v,hslaString:p,hwbString:d,keyword:b};var k={};for(var x in w)k[w[x]]=x},{8:8}],10:[function(e,t,r){var n=e(7),a=e(9),i=function(e){if(e instanceof i)return e;if(!(this instanceof i))return new i(e);if(this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},"string"==typeof e){var t=a.getRgba(e);if(t)this.setValues("rgb",t);else if(t=a.getHsla(e))this.setValues("hsl",t);else{if(!(t=a.getHwb(e)))throw new Error('Unable to parse color from string "'+e+'"');this.setValues("hwb",t)}}else if("object"==typeof e){var t=e;if(void 0!==t.r||void 0!==t.red)this.setValues("rgb",t);else if(void 0!==t.l||void 0!==t.lightness)this.setValues("hsl",t);else if(void 0!==t.v||void 0!==t.value)this.setValues("hsv",t);else if(void 0!==t.w||void 0!==t.whiteness)this.setValues("hwb",t);else{if(void 0===t.c&&void 0===t.cyan)throw new Error("Unable to parse color from object "+JSON.stringify(e));this.setValues("cmyk",t)}}};i.prototype={rgb:function(e){return this.setSpace("rgb",arguments)},hsl:function(e){return this.setSpace("hsl",arguments)},hsv:function(e){return this.setSpace("hsv",arguments)},hwb:function(e){return this.setSpace("hwb",arguments)},cmyk:function(e){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){return 1!==this.values.alpha?this.values.hwb.concat([this.values.alpha]):this.values.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values.rgb;return e.concat([this.values.alpha])},hslaArray:function(){var e=this.values.hsl;return e.concat([this.values.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return a.hexString(this.values.rgb)},rgbString:function(){return a.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return a.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return a.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return a.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return a.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return a.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return a.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){return this.values.rgb[0]<<16|this.values.rgb[1]<<8|this.values.rgb[2]},luminosity:function(){for(var e=this.values.rgb,t=[],r=0;r<e.length;r++){var n=e[r]/255;t[r]=.03928>=n?n/12.92:Math.pow((n+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),r=e.luminosity();return t>r?(t+.05)/(r+.05):(r+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return t>=7.1?"AAA":t>=4.5?"AA":""},dark:function(){var e=this.values.rgb,t=(299*e[0]+587*e[1]+114*e[2])/1e3;return 128>t},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;3>t;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){return this.values.hsl[2]+=this.values.hsl[2]*e,this.setValues("hsl",this.values.hsl),this},darken:function(e){return this.values.hsl[2]-=this.values.hsl[2]*e,this.setValues("hsl",this.values.hsl),this},saturate:function(e){return this.values.hsl[1]+=this.values.hsl[1]*e,this.setValues("hsl",this.values.hsl),this},desaturate:function(e){return this.values.hsl[1]-=this.values.hsl[1]*e,this.setValues("hsl",this.values.hsl),this},whiten:function(e){return this.values.hwb[1]+=this.values.hwb[1]*e,this.setValues("hwb",this.values.hwb),this},blacken:function(e){return this.values.hwb[2]+=this.values.hwb[2]*e,this.setValues("hwb",this.values.hwb),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){return this.setValues("alpha",this.values.alpha-this.values.alpha*e),this},opaquer:function(e){return this.setValues("alpha",this.values.alpha+this.values.alpha*e),this},rotate:function(e){var t=this.values.hsl[0];return t=(t+e)%360,t=0>t?360+t:t,this.values.hsl[0]=t,this.setValues("hsl",this.values.hsl),this},mix:function(e,t){var r=this,n=e,a=void 0!==t?t:.5,i=2*a-1,o=r.alpha()-n.alpha(),s=((i*o==-1?i:(i+o)/(1+i*o))+1)/2,u=1-s;return this.rgb(s*r.red()+u*n.red(),s*r.green()+u*n.green(),s*r.blue()+u*n.blue()).alpha(r.alpha()*a+n.alpha()*(1-a))},toJSON:function(){return this.rgb()},clone:function(){return new i(this.rgb())}},i.prototype.getValues=function(e){for(var t={},r=0;r<e.length;r++)t[e.charAt(r)]=this.values[e][r];return 1!=this.values.alpha&&(t.a=this.values.alpha),t},i.prototype.setValues=function(e,t){var r={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},a={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},i=1;if("alpha"==e)i=t;else if(t.length)this.values[e]=t.slice(0,e.length),i=t[e.length];else if(void 0!==t[e.charAt(0)]){for(var o=0;o<e.length;o++)this.values[e][o]=t[e.charAt(o)];i=t.a}else if(void 0!==t[r[e][0]]){for(var s=r[e],o=0;o<e.length;o++)this.values[e][o]=t[s[o]];i=t.alpha}if(this.values.alpha=Math.max(0,Math.min(1,void 0!==i?i:this.values.alpha)),"alpha"!=e){for(var o=0;o<e.length;o++){var u=Math.max(0,Math.min(a[e][o],this.values[e][o]));this.values[e][o]=Math.round(u)}for(var l in r){l!=e&&(this.values[l]=n[e][l](this.values[e]));for(var o=0;o<l.length;o++){var u=Math.max(0,Math.min(a[l][o],this.values[l][o]));this.values[l][o]=Math.round(u)}}return!0}},i.prototype.setSpace=function(e,t){var r=t[0];return void 0===r?this.getValues(e):("number"==typeof r&&(r=Array.prototype.slice.call(t)),this.setValues(e,r),this)},i.prototype.setChannel=function(e,t,r){return void 0===r?this.values[e][t]:(this.values[e][t]=r,this.setValues(e,this.values[e]),this)},t.exports=i},{7:7,9:9}],11:[function(e,t,r){var n=e(14),a=n();t.exports=a},{14:14}],12:[function(e,t,r){function n(e,t){return a(e,t,i)}var a=e(11),i=e(31);t.exports=n},{11:11,31:31}],13:[function(e,t,r){function n(e){return function(t){return null==t?void 0:t[e]}}t.exports=n},{}],14:[function(e,t,r){function n(e){return function(t,r,n){for(var i=a(t),o=n(t),s=o.length,u=e?s:-1;e?u--:++u<s;){var l=o[u];if(r(i[l],l,i)===!1)break}return t}}var a=e(21);t.exports=n},{21:21}],15:[function(e,t,r){var n=e(13),a=n("length");t.exports=a},{13:13}],16:[function(e,t,r){function n(e,t){var r=null==e?void 0:e[t];return a(r)?r:void 0}var a=e(26);t.exports=n},{26:26}],17:[function(e,t,r){function n(e){return null!=e&&i(a(e))}var a=e(15),i=e(19);t.exports=n},{15:15,19:19}],18:[function(e,t,r){function n(e,t){return e="number"==typeof e||a.test(e)?+e:-1,t=null==t?i:t,e>-1&&e%1==0&&t>e}var a=/^\d+$/,i=9007199254740991;t.exports=n},{}],19:[function(e,t,r){function n(e){return"number"==typeof e&&e>-1&&e%1==0&&a>=e}var a=9007199254740991;t.exports=n},{}],20:[function(e,t,r){function n(e){return!!e&&"object"==typeof e}t.exports=n},{}],21:[function(e,t,r){function n(e){return a(e)?e:Object(e)}var a=e(28);t.exports=n},{28:28}],22:[function(e,t,r){function n(e){return i(e)&&a(e)&&s.call(e,"callee")&&!u.call(e,"callee")}var a=e(17),i=e(20),o=Object.prototype,s=o.hasOwnProperty,u=o.propertyIsEnumerable;t.exports=n},{17:17,20:20}],23:[function(e,t,r){var n=e(16),a=e(19),i=e(20),o="[object Array]",s=Object.prototype,u=s.toString,l=n(Array,"isArray"),h=l||function(e){return i(e)&&a(e.length)&&u.call(e)==o};t.exports=h},{16:16,19:19,20:20}],24:[function(e,t,r){function n(e){return!!e&&1===e.nodeType&&a(e)&&!i(e)}var a=e(20),i=e(29);t.exports=n},{20:20,29:29}],25:[function(e,t,r){function n(e){return a(e)&&s.call(e)==i}var a=e(28),i="[object Function]",o=Object.prototype,s=o.toString;t.exports=n},{28:28}],26:[function(e,t,r){function n(e){return null==e?!1:a(e)?h.test(u.call(e)):i(e)&&o.test(e)}var a=e(25),i=e(20),o=/^\[object .+?Constructor\]$/,s=Object.prototype,u=Function.prototype.toString,l=s.hasOwnProperty,h=RegExp("^"+u.call(l).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=n},{20:20,25:25}],27:[function(e,t,r){function n(e){return"number"==typeof e||a(e)&&s.call(e)==i}var a=e(20),i="[object Number]",o=Object.prototype,s=o.toString;t.exports=n},{20:20}],28:[function(e,t,r){function n(e){var t=typeof e;return!!e&&("object"==t||"function"==t)}t.exports=n},{}],29:[function(e,t,r){function n(e){var t;if(!o(e)||h.call(e)!=s||i(e)||!l.call(e,"constructor")&&(t=e.constructor,"function"==typeof t&&!(t instanceof t)))return!1;var r;return a(e,function(e,t){r=t}),void 0===r||l.call(e,r)}var a=e(12),i=e(22),o=e(20),s="[object Object]",u=Object.prototype,l=u.hasOwnProperty,h=u.toString;t.exports=n},{12:12,20:20,22:22}],30:[function(e,t,r){function n(e){return"string"==typeof e||a(e)&&s.call(e)==i}var a=e(20),i="[object String]",o=Object.prototype,s=o.toString;t.exports=n},{20:20}],31:[function(e,t,r){function n(e){if(null==e)return[];u(e)||(e=Object(e));var t=e.length;t=t&&s(t)&&(i(e)||a(e))&&t||0;for(var r=e.constructor,n=-1,l="function"==typeof r&&r.prototype===e,c=Array(t),f=t>0;++n<t;)c[n]=n+"";for(var g in e)f&&o(g,t)||"constructor"==g&&(l||!h.call(e,g))||c.push(g);return c}var a=e(22),i=e(23),o=e(18),s=e(19),u=e(28),l=Object.prototype,h=l.hasOwnProperty;t.exports=n},{18:18,19:19,22:22,23:23,28:28}],32:[function(e,t,r){(function(e){(function(){var r,n,a;"undefined"!=typeof performance&&null!==performance&&performance.now?t.exports=function(){return performance.now()}:"undefined"!=typeof e&&null!==e&&e.hrtime?(t.exports=function(){return(r()-a)/1e6},n=e.hrtime,r=function(){var e;return e=n(),1e9*e[0]+e[1]},a=r()):Date.now?(t.exports=function(){return Date.now()-a},a=Date.now()):(t.exports=function(){return(new Date).getTime()-a},a=(new Date).getTime())}).call(this)}).call(this,e(33))},{33:33}],33:[function(e,t,r){function n(){h=!1,s.length?l=s.concat(l):c=-1,l.length&&a()}function a(){if(!h){var e=setTimeout(n);h=!0;for(var t=l.length;t;){for(s=l,l=[];++c<t;)s&&s[c].run();c=-1,t=l.length}s=null,h=!1,clearTimeout(e)}}function i(e,t){this.fun=e,this.array=t}function o(){}var s,u=t.exports={},l=[],h=!1,c=-1;u.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];l.push(new i(e,t)),1!==l.length||h||setTimeout(a,0)},i.prototype.run=function(){this.fun.apply(null,this.array)},u.title="browser",u.browser=!0,u.env={},u.argv=[],u.version="",
u.versions={},u.on=o,u.addListener=o,u.once=o,u.off=o,u.removeListener=o,u.removeAllListeners=o,u.emit=o,u.binding=function(e){throw new Error("process.binding is not supported")},u.cwd=function(){return"/"},u.chdir=function(e){throw new Error("process.chdir is not supported")},u.umask=function(){return 0}},{}],34:[function(e,t,r){for(var n=e(32),a="undefined"==typeof window?{}:window,i=["moz","webkit"],o="AnimationFrame",s=a["request"+o],u=a["cancel"+o]||a["cancelRequest"+o],l=0;l<i.length&&!s;l++)s=a[i[l]+"Request"+o],u=a[i[l]+"Cancel"+o]||a[i[l]+"CancelRequest"+o];if(!s||!u){var h=0,c=0,f=[],g=1e3/60;s=function(e){if(0===f.length){var t=n(),r=Math.max(0,g-(t-h));h=r+t,setTimeout(function(){var e=f.slice(0);f.length=0;for(var t=0;t<e.length;t++)if(!e[t].cancelled)try{e[t].callback(h)}catch(r){setTimeout(function(){throw r},0)}},Math.round(r))}return f.push({handle:++c,callback:e,cancelled:!1}),c},u=function(e){for(var t=0;t<f.length;t++)f[t].handle===e&&(f[t].cancelled=!0)}}t.exports=function(e){return s.call(a,e)},t.exports.cancel=function(){u.apply(a,arguments)}},{32:32}]},{},[1])(1)});