@pdftron/webviewer
Version:
[WebViewer](https://www.apryse.com/webviewer) is a powerful JavaScript Document SDK and UI Component Library that is a part of the [Apryse PDF SDK](https://www.apryse.com). It provides a slick, out-of-the-box responsive UI that interacts with the core lib
1 lines • 101 kB
JavaScript
(window.webpackJsonpWebViewerUI=window.webpackJsonpWebViewerUI||[]).push([[34],{1571:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ReactCSS=t.loop=t.handleActive=t.handleHover=t.hover=void 0;var a=p(r(2013)),n=p(r(2020)),o=p(r(2021)),i=p(r(2022)),l=p(r(2023)),s=p(r(2024));function p(e){return e&&e.__esModule?e:{default:e}}t.hover=i.default,t.handleHover=i.default,t.handleActive=l.default,t.loop=s.default;var c=t.ReactCSS=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];var l=(0,a.default)(r),s=(0,n.default)(e,l);return(0,o.default)(s)};t.default=c},1577:function(e,t,r){"use strict";r.d(t,"a",(function(){return x})),r.d(t,"b",(function(){return f})),r.d(t,"d",(function(){return w})),r.d(t,"e",(function(){return O})),r.d(t,"f",(function(){return B})),r.d(t,"g",(function(){return P})),r.d(t,"c",(function(){return L.a})),r.d(t,"h",(function(){return X}));var a=r(0),n=r.n(a),o=r(1571),i=r.n(o),l=function(e,t,r,a,n){var o=n.clientWidth,i=n.clientHeight,l="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,s="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,p=l-(n.getBoundingClientRect().left+window.pageXOffset),c=s-(n.getBoundingClientRect().top+window.pageYOffset);if("vertical"===r){var u=void 0;if(u=c<0?0:c>i?1:Math.round(100*c/i)/100,t.a!==u)return{h:t.h,s:t.s,l:t.l,a:u,source:"rgb"}}else{var f=void 0;if(a!==(f=p<0?0:p>o?1:Math.round(100*p/o)/100))return{h:t.h,s:t.s,l:t.l,a:f,source:"rgb"}}return null},s={},p=function(e,t,r,a){var n=e+"-"+t+"-"+r+(a?"-server":"");if(s[n])return s[n];var o=function(e,t,r,a){if("undefined"==typeof document&&!a)return null;var n=a?new a:document.createElement("canvas");n.width=2*r,n.height=2*r;var o=n.getContext("2d");return o?(o.fillStyle=e,o.fillRect(0,0,n.width,n.height),o.fillStyle=t,o.fillRect(0,0,r,r),o.translate(r,r),o.fillRect(0,0,r,r),n.toDataURL()):null}(e,t,r,a);return s[n]=o,o},c=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},u=function(e){var t=e.white,r=e.grey,o=e.size,l=e.renderers,s=e.borderRadius,u=e.boxShadow,f=e.children,h=i()({default:{grid:{borderRadius:s,boxShadow:u,absolute:"0px 0px 0px 0px",background:"url("+p(t,r,o,l.canvas)+") center left"}}});return Object(a.isValidElement)(f)?n.a.cloneElement(f,c({},f.props,{style:c({},f.props.style,h.grid)})):n.a.createElement("div",{style:h.grid})};u.defaultProps={size:8,white:"transparent",grey:"rgba(0,0,0,.08)",renderers:{}};var f=u,h=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},d=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}();function b(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function g(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var x=function(e){function t(){var e,r,a;b(this,t);for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=a=g(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),a.handleChange=function(e){var t=l(e,a.props.hsl,a.props.direction,a.props.a,a.container);t&&"function"==typeof a.props.onChange&&a.props.onChange(t,e)},a.handleMouseDown=function(e){a.handleChange(e),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},a.unbindEventListeners=function(){window.removeEventListener("mousemove",a.handleChange),window.removeEventListener("mouseup",a.handleMouseUp)},g(a,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),d(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"render",value:function(){var e=this,t=this.props.rgb,r=i()({default:{alpha:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},checkboard:{absolute:"0px 0px 0px 0px",overflow:"hidden",borderRadius:this.props.radius},gradient:{absolute:"0px 0px 0px 0px",background:"linear-gradient(to right, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)",boxShadow:this.props.shadow,borderRadius:this.props.radius},container:{position:"relative",height:"100%",margin:"0 3px"},pointer:{position:"absolute",left:100*t.a+"%"},slider:{width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",marginTop:"1px",transform:"translateX(-2px)"}},vertical:{gradient:{background:"linear-gradient(to bottom, rgba("+t.r+","+t.g+","+t.b+", 0) 0%,\n rgba("+t.r+","+t.g+","+t.b+", 1) 100%)"},pointer:{left:0,top:100*t.a+"%"}},overwrite:h({},this.props.style)},{vertical:"vertical"===this.props.direction,overwrite:!0});return n.a.createElement("div",{style:r.alpha},n.a.createElement("div",{style:r.checkboard},n.a.createElement(f,{renderers:this.props.renderers})),n.a.createElement("div",{style:r.gradient}),n.a.createElement("div",{style:r.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.a.createElement("div",{style:r.pointer},this.props.pointer?n.a.createElement(this.props.pointer,this.props):n.a.createElement("div",{style:r.slider}))))}}]),t}(a.PureComponent||a.Component),v=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}();var m=[38,40],y=1,w=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return r.handleBlur=function(){r.state.blurValue&&r.setState({value:r.state.blurValue,blurValue:null})},r.handleChange=function(e){r.setUpdatedValue(e.target.value,e)},r.handleKeyDown=function(e){var t,a=function(e){return Number(String(e).replace(/%/g,""))}(e.target.value);if(!isNaN(a)&&(t=e.keyCode,m.indexOf(t)>-1)){var n=r.getArrowOffset(),o=38===e.keyCode?a+n:a-n;r.setUpdatedValue(o,e)}},r.handleDrag=function(e){if(r.props.dragLabel){var t=Math.round(r.props.value+e.movementX);t>=0&&t<=r.props.dragMax&&r.props.onChange&&r.props.onChange(r.getValueObjectWithLabel(t),e)}},r.handleMouseDown=function(e){r.props.dragLabel&&(e.preventDefault(),r.handleDrag(e),window.addEventListener("mousemove",r.handleDrag),window.addEventListener("mouseup",r.handleMouseUp))},r.handleMouseUp=function(){r.unbindEventListeners()},r.unbindEventListeners=function(){window.removeEventListener("mousemove",r.handleDrag),window.removeEventListener("mouseup",r.handleMouseUp)},r.state={value:String(e.value).toUpperCase(),blurValue:String(e.value).toUpperCase()},r.inputId="rc-editable-input-"+y++,r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),v(t,[{key:"componentDidUpdate",value:function(e,t){this.props.value===this.state.value||e.value===this.props.value&&t.value===this.state.value||(this.input===document.activeElement?this.setState({blurValue:String(this.props.value).toUpperCase()}):this.setState({value:String(this.props.value).toUpperCase(),blurValue:!this.state.blurValue&&String(this.props.value).toUpperCase()}))}},{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"getValueObjectWithLabel",value:function(e){return function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}({},this.props.label,e)}},{key:"getArrowOffset",value:function(){return this.props.arrowOffset||1}},{key:"setUpdatedValue",value:function(e,t){var r=this.props.label?this.getValueObjectWithLabel(e):e;this.props.onChange&&this.props.onChange(r,t),this.setState({value:e})}},{key:"render",value:function(){var e=this,t=i()({default:{wrap:{position:"relative"}},"user-override":{wrap:this.props.style&&this.props.style.wrap?this.props.style.wrap:{},input:this.props.style&&this.props.style.input?this.props.style.input:{},label:this.props.style&&this.props.style.label?this.props.style.label:{}},"dragLabel-true":{label:{cursor:"ew-resize"}}},{"user-override":!0},this.props);return n.a.createElement("div",{style:t.wrap},n.a.createElement("input",{id:this.inputId,style:t.input,ref:function(t){return e.input=t},value:this.state.value,onKeyDown:this.handleKeyDown,onChange:this.handleChange,onBlur:this.handleBlur,placeholder:this.props.placeholder,spellCheck:"false"}),this.props.label&&!this.props.hideLabel?n.a.createElement("label",{htmlFor:this.inputId,style:t.label,onMouseDown:this.handleMouseDown},this.props.label):null)}}]),t}(a.PureComponent||a.Component),E=function(e,t,r,a){var n=a.clientWidth,o=a.clientHeight,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=i-(a.getBoundingClientRect().left+window.pageXOffset),p=l-(a.getBoundingClientRect().top+window.pageYOffset);if("vertical"===t){var c=void 0;if(p<0)c=359;else if(p>o)c=0;else{c=360*(-100*p/o+100)/100}if(r.h!==c)return{h:c,s:r.s,l:r.l,a:r.a,source:"hsl"}}else{var u=void 0;if(s<0)u=0;else if(s>n)u=359;else{u=360*(100*s/n)/100}if(r.h!==u)return{h:u,s:r.s,l:r.l,a:r.a,source:"hsl"}}return null},C=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}();function k(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function S(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var O=function(e){function t(){var e,r,a;k(this,t);for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return r=a=S(this,(e=t.__proto__||Object.getPrototypeOf(t)).call.apply(e,[this].concat(o))),a.handleChange=function(e){var t=E(e,a.props.direction,a.props.hsl,a.container);t&&"function"==typeof a.props.onChange&&a.props.onChange(t,e)},a.handleMouseDown=function(e){a.handleChange(e),window.addEventListener("mousemove",a.handleChange),window.addEventListener("mouseup",a.handleMouseUp)},a.handleMouseUp=function(){a.unbindEventListeners()},S(a,r)}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),C(t,[{key:"componentWillUnmount",value:function(){this.unbindEventListeners()}},{key:"unbindEventListeners",value:function(){window.removeEventListener("mousemove",this.handleChange),window.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.direction,r=void 0===t?"horizontal":t,a=i()({default:{hue:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius,boxShadow:this.props.shadow},container:{padding:"0 2px",position:"relative",height:"100%",borderRadius:this.props.radius},pointer:{position:"absolute",left:100*this.props.hsl.h/360+"%"},slider:{marginTop:"1px",width:"4px",borderRadius:"1px",height:"8px",boxShadow:"0 0 2px rgba(0, 0, 0, .6)",background:"#fff",transform:"translateX(-2px)"}},vertical:{pointer:{left:"0px",top:-100*this.props.hsl.h/360+100+"%"}}},{vertical:"vertical"===r});return n.a.createElement("div",{style:a.hue},n.a.createElement("div",{className:"hue-"+r,style:a.container,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.a.createElement("style",null,"\n .hue-horizontal {\n background: linear-gradient(to right, #f00 0%, #ff0 17%, #0f0\n 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to right, #f00 0%, #ff0\n 17%, #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n\n .hue-vertical {\n background: linear-gradient(to top, #f00 0%, #ff0 17%, #0f0 33%,\n #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n background: -webkit-linear-gradient(to top, #f00 0%, #ff0 17%,\n #0f0 33%, #0ff 50%, #00f 67%, #f0f 83%, #f00 100%);\n }\n "),n.a.createElement("div",{style:a.pointer},this.props.pointer?n.a.createElement(this.props.pointer,this.props):n.a.createElement("div",{style:a.slider}))))}}]),t}(a.PureComponent||a.Component),_=r(2),R=r.n(_),j=r(1591),F=function(e){var t=e.zDepth,r=e.radius,a=e.background,o=e.children,l=e.styles,s=void 0===l?{}:l,p=i()(Object(j.a)({default:{wrap:{position:"relative",display:"inline-block"},content:{position:"relative"},bg:{absolute:"0px 0px 0px 0px",boxShadow:"0 "+t+"px "+4*t+"px rgba(0,0,0,.24)",borderRadius:r,background:a}},"zDepth-0":{bg:{boxShadow:"none"}},"zDepth-1":{bg:{boxShadow:"0 2px 10px rgba(0,0,0,.12), 0 2px 5px rgba(0,0,0,.16)"}},"zDepth-2":{bg:{boxShadow:"0 6px 20px rgba(0,0,0,.19), 0 8px 17px rgba(0,0,0,.2)"}},"zDepth-3":{bg:{boxShadow:"0 17px 50px rgba(0,0,0,.19), 0 12px 15px rgba(0,0,0,.24)"}},"zDepth-4":{bg:{boxShadow:"0 25px 55px rgba(0,0,0,.21), 0 16px 28px rgba(0,0,0,.22)"}},"zDepth-5":{bg:{boxShadow:"0 40px 77px rgba(0,0,0,.22), 0 27px 24px rgba(0,0,0,.2)"}},square:{bg:{borderRadius:"0"}},circle:{bg:{borderRadius:"50%"}}},s),{"zDepth-1":1===t});return n.a.createElement("div",{style:p.wrap},n.a.createElement("div",{style:p.bg}),n.a.createElement("div",{style:p.content},o))};F.propTypes={background:R.a.string,zDepth:R.a.oneOf([0,1,2,3,4,5]),radius:R.a.number,styles:R.a.object},F.defaultProps={background:"#fff",zDepth:1,radius:2,styles:{}};var B=F,A=r(1884),M=r(1581);var H=function(e,t,r){var a=!0,n=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return Object(M.a)(r)&&(a="leading"in r?!!r.leading:a,n="trailing"in r?!!r.trailing:n),Object(A.a)(e,t,{leading:a,maxWait:t,trailing:n})},T=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}();var P=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var r=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.handleChange=function(e){"function"==typeof r.props.onChange&&r.throttle(r.props.onChange,function(e,t,r){var a=r.getBoundingClientRect(),n=a.width,o=a.height,i="number"==typeof e.pageX?e.pageX:e.touches[0].pageX,l="number"==typeof e.pageY?e.pageY:e.touches[0].pageY,s=i-(r.getBoundingClientRect().left+window.pageXOffset),p=l-(r.getBoundingClientRect().top+window.pageYOffset);s<0?s=0:s>n&&(s=n),p<0?p=0:p>o&&(p=o);var c=s/n,u=1-p/o;return{h:t.h,s:c,v:u,a:t.a,source:"hsv"}}(e,r.props.hsl,r.container),e)},r.handleMouseDown=function(e){r.handleChange(e);var t=r.getContainerRenderWindow();t.addEventListener("mousemove",r.handleChange),t.addEventListener("mouseup",r.handleMouseUp)},r.handleMouseUp=function(){r.unbindEventListeners()},r.throttle=H((function(e,t,r){e(t,r)}),50),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),T(t,[{key:"componentWillUnmount",value:function(){this.throttle.cancel(),this.unbindEventListeners()}},{key:"getContainerRenderWindow",value:function(){for(var e=this.container,t=window;!t.document.contains(e)&&t.parent!==t;)t=t.parent;return t}},{key:"unbindEventListeners",value:function(){var e=this.getContainerRenderWindow();e.removeEventListener("mousemove",this.handleChange),e.removeEventListener("mouseup",this.handleMouseUp)}},{key:"render",value:function(){var e=this,t=this.props.style||{},r=t.color,a=t.white,o=t.black,l=t.pointer,s=t.circle,p=i()({default:{color:{absolute:"0px 0px 0px 0px",background:"hsl("+this.props.hsl.h+",100%, 50%)",borderRadius:this.props.radius},white:{absolute:"0px 0px 0px 0px",borderRadius:this.props.radius},black:{absolute:"0px 0px 0px 0px",boxShadow:this.props.shadow,borderRadius:this.props.radius},pointer:{position:"absolute",top:-100*this.props.hsv.v+100+"%",left:100*this.props.hsv.s+"%",cursor:"default"},circle:{width:"4px",height:"4px",boxShadow:"0 0 0 1.5px #fff, inset 0 0 1px 1px rgba(0,0,0,.3),\n 0 0 1px 2px rgba(0,0,0,.4)",borderRadius:"50%",cursor:"hand",transform:"translate(-2px, -2px)"}},custom:{color:r,white:a,black:o,pointer:l,circle:s}},{custom:!!this.props.style});return n.a.createElement("div",{style:p.color,ref:function(t){return e.container=t},onMouseDown:this.handleMouseDown,onTouchMove:this.handleChange,onTouchStart:this.handleChange},n.a.createElement("style",null,"\n .saturation-white {\n background: -webkit-linear-gradient(to right, #fff, rgba(255,255,255,0));\n background: linear-gradient(to right, #fff, rgba(255,255,255,0));\n }\n .saturation-black {\n background: -webkit-linear-gradient(to top, #000, rgba(0,0,0,0));\n background: linear-gradient(to top, #000, rgba(0,0,0,0));\n }\n "),n.a.createElement("div",{style:p.white,className:"saturation-white"},n.a.createElement("div",{style:p.black,className:"saturation-black"}),n.a.createElement("div",{style:p.pointer},this.props.pointer?n.a.createElement(this.props.pointer,this.props):n.a.createElement("div",{style:p.circle}))))}}]),t}(a.PureComponent||a.Component),L=r(1782),D=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},z=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}();function N(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function G(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function U(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var W=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},X=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function a(){var e,t,r;N(this,a);for(var n=arguments.length,o=Array(n),i=0;i<n;i++)o[i]=arguments[i];return t=r=G(this,(e=a.__proto__||Object.getPrototypeOf(a)).call.apply(e,[this].concat(o))),r.state={focus:!1},r.handleFocus=function(){return r.setState({focus:!0})},r.handleBlur=function(){return r.setState({focus:!1})},G(r,t)}return U(a,r),z(a,[{key:"render",value:function(){return n.a.createElement(t,{onFocus:this.handleFocus,onBlur:this.handleBlur},n.a.createElement(e,D({},this.props,this.state)))}}]),a}(n.a.Component)}((function(e){var t=e.color,r=e.style,a=e.onClick,o=void 0===a?function(){}:a,l=e.onHover,s=e.title,p=void 0===s?t:s,c=e.children,u=e.focus,h=e.focusStyle,d=void 0===h?{}:h,b="transparent"===t,g=i()({default:{swatch:W({background:t,height:"100%",width:"100%",cursor:"pointer",position:"relative",outline:"none"},r,u?d:{})}}),x={};return l&&(x.onMouseOver=function(e){return l(t,e)}),n.a.createElement("div",W({style:g.swatch,onClick:function(e){return o(t,e)},title:p,tabIndex:0,onKeyDown:function(e){return 13===e.keyCode&&o(t,e)}},x),c,b&&n.a.createElement(f,{borderRadius:g.swatch.borderRadius,boxShadow:"inset 0 0 0 1px rgba(0,0,0,0.1)"}))}))},1624:function(e,t,r){"use strict";r.d(t,"d",(function(){return i})),r.d(t,"e",(function(){return l})),r.d(t,"b",(function(){return s})),r.d(t,"a",(function(){return p})),r.d(t,"c",(function(){return c}));var a=function(e,t){for(var r=-1,a=null==e?0:e.length;++r<a&&!1!==t(e[r],r,e););return e},n=r(2025),o=r.n(n),i=function(e){var t=0,r=0;return a(["r","g","b","a","h","s","l","v"],(function(a){if(e[a]&&(t+=1,isNaN(e[a])||(r+=1),"s"===a||"l"===a)){/^\d+%$/.test(e[a])&&(r+=1)}})),t===r&&e},l=function(e,t){var r=e.hex?o()(e.hex):o()(e),a=r.toHsl(),n=r.toHsv(),i=r.toRgb(),l=r.toHex();return 0===a.s&&(a.h=t||0,n.h=t||0),{hsl:a,hex:"000000"===l&&0===i.a?"transparent":"#"+l,rgb:i,hsv:n,oldHue:e.h||t||a.h,source:e.source}},s=function(e){if("transparent"===e)return!0;var t="#"===String(e).charAt(0)?1:0;return e.length!==4+t&&e.length<7+t&&o()(e).isValid()},p=function(e){if(!e)return"#fff";var t=l(e);return"transparent"===t.hex?"rgba(0,0,0,0.4)":(299*t.rgb.r+587*t.rgb.g+114*t.rgb.b)/1e3>=128?"#000":"#fff"},c=function(e,t){var r=e.replace("°","");return o()(t+" ("+r+")")._ok}},1782:function(e,t,r){"use strict";var a=r(0),n=r.n(a),o=r(1884),i=r(1624),l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},s=function(){function e(e,t){for(var r=0;r<t.length;r++){var a=t[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,r,a){return r&&e(t.prototype,r),a&&e(t,a),t}}();t.a=function(e){var t=function(t){function r(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return t.handleChange=function(e,r){if(i.d(e)){var a=i.e(e,e.h||t.state.oldHue);t.setState(a),t.props.onChangeComplete&&t.debounce(t.props.onChangeComplete,a,r),t.props.onChange&&t.props.onChange(a,r)}},t.handleSwatchHover=function(e,r){if(i.d(e)){var a=i.e(e,e.h||t.state.oldHue);t.props.onSwatchHover&&t.props.onSwatchHover(a,r)}},t.state=l({},i.e(e.color,0)),t.debounce=Object(o.a)((function(e,t,r){e(t,r)}),100),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,t),s(r,[{key:"render",value:function(){var t={};return this.props.onSwatchHover&&(t.onSwatchHover=this.handleSwatchHover),n.a.createElement(e,l({},this.props,this.state,{onChange:this.handleChange},t))}}],[{key:"getDerivedStateFromProps",value:function(e,t){return l({},i.e(e.color,t.oldHue))}}]),r}(a.PureComponent||a.Component);return t.propTypes=l({},e.propTypes),t.defaultProps=l({},e.defaultProps,{color:{h:250,s:.5,l:.2,a:1}}),t}},1807:function(e,t,r){var a=r(2014),n=r(2017);e.exports=function(e,t){return e&&a(e,n(t))}},1884:function(e,t,r){"use strict";var a=r(1581),n=r(1637),o=function(){return n.a.Date.now()};var i=function(e){return e},l=Math.max,s=Math.min;t.a=function(e,t,r){var n,p,c,u,f,h,d=0,b=!1,g=!1,x=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function v(t){var r=n,a=p;return n=p=void 0,d=t,u=e.apply(a,r)}function m(e){return d=e,f=setTimeout(w,t),b?v(e):u}function y(e){var r=e-h;return void 0===h||r>=t||r<0||g&&e-d>=c}function w(){var e=o();if(y(e))return E(e);f=setTimeout(w,function(e){var r=t-(e-h);return g?s(r,c-(e-d)):r}(e))}function E(e){return f=void 0,x&&n?v(e):(n=p=void 0,u)}function C(){var e=o(),r=y(e);if(n=arguments,p=this,h=e,r){if(void 0===f)return m(h);if(g)return clearTimeout(f),f=setTimeout(w,t),v(h)}return void 0===f&&(f=setTimeout(w,t)),u}return t=i(t)||0,Object(a.a)(r)&&(b=!!r.leading,c=(g="maxWait"in r)?l(i(r.maxWait)||0,t):c,x="trailing"in r?!!r.trailing:x),C.cancel=function(){void 0!==f&&clearTimeout(f),d=0,n=h=p=f=void 0},C.flush=function(){return void 0===f?u:E(o())},C}},2013:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flattenNames=void 0;var a=l(r(238)),n=l(r(1807)),o=l(r(2018)),i=l(r(2019));function l(e){return e&&e.__esModule?e:{default:e}}var s=t.flattenNames=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=[];return(0,i.default)(t,(function(t){Array.isArray(t)?e(t).map((function(e){return r.push(e)})):(0,o.default)(t)?(0,n.default)(t,(function(e,t){!0===e&&r.push(t),r.push(t+"-"+e)})):(0,a.default)(t)&&r.push(t)})),r};t.default=s},2014:function(e,t,r){var a=r(2015),n=r(498);e.exports=function(e,t){return e&&a(e,t,n)}},2015:function(e,t,r){var a=r(2016)();e.exports=a},2016:function(e,t){e.exports=function(e){return function(t,r,a){for(var n=-1,o=Object(t),i=a(t),l=i.length;l--;){var s=i[e?l:++n];if(!1===r(o[s],s,o))break}return t}}},2017:function(e,t){e.exports=function(e){return e}},2018:function(e,t,r){var a=r(419),n=r(649),o=r(325),i=Function.prototype,l=Object.prototype,s=i.toString,p=l.hasOwnProperty,c=s.call(Object);e.exports=function(e){if(!o(e)||"[object Object]"!=a(e))return!1;var t=n(e);if(null===t)return!0;var r=p.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&s.call(r)==c}},2019:function(e,t){e.exports=function(e,t){for(var r=-1,a=null==e?0:e.length,n=Array(a);++r<a;)n[r]=t(e[r],r,e);return n}},2020:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeClasses=void 0;var a=i(r(1807)),n=i(r(201)),o=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e};function i(e){return e&&e.__esModule?e:{default:e}}var l=t.mergeClasses=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=e.default&&(0,n.default)(e.default)||{};return t.map((function(t){var n=e[t];return n&&(0,a.default)(n,(function(e,t){r[t]||(r[t]={}),r[t]=o({},r[t],n[t])})),t})),r};t.default=l},2021:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.autoprefix=void 0;var a,n=r(1807),o=(a=n)&&a.__esModule?a:{default:a},i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e};var l={borderRadius:function(e){return{msBorderRadius:e,MozBorderRadius:e,OBorderRadius:e,WebkitBorderRadius:e,borderRadius:e}},boxShadow:function(e){return{msBoxShadow:e,MozBoxShadow:e,OBoxShadow:e,WebkitBoxShadow:e,boxShadow:e}},userSelect:function(e){return{WebkitTouchCallout:e,KhtmlUserSelect:e,MozUserSelect:e,msUserSelect:e,WebkitUserSelect:e,userSelect:e}},flex:function(e){return{WebkitBoxFlex:e,MozBoxFlex:e,WebkitFlex:e,msFlex:e,flex:e}},flexBasis:function(e){return{WebkitFlexBasis:e,flexBasis:e}},justifyContent:function(e){return{WebkitJustifyContent:e,justifyContent:e}},transition:function(e){return{msTransition:e,MozTransition:e,OTransition:e,WebkitTransition:e,transition:e}},transform:function(e){return{msTransform:e,MozTransform:e,OTransform:e,WebkitTransform:e,transform:e}},absolute:function(e){var t=e&&e.split(" ");return{position:"absolute",top:t&&t[0],right:t&&t[1],bottom:t&&t[2],left:t&&t[3]}},extend:function(e,t){var r=t[e];return r||{extend:e}}},s=t.autoprefix=function(e){var t={};return(0,o.default)(e,(function(e,r){var a={};(0,o.default)(e,(function(e,t){var r=l[t];r?a=i({},a,r(e)):a[t]=e})),t[r]=a})),t};t.default=s},2022:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hover=void 0;var a,n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},o=r(0),i=(a=o)&&a.__esModule?a:{default:a};function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=t.hover=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function a(){var r,o,p;l(this,a);for(var c=arguments.length,u=Array(c),f=0;f<c;f++)u[f]=arguments[f];return o=p=s(this,(r=a.__proto__||Object.getPrototypeOf(a)).call.apply(r,[this].concat(u))),p.state={hover:!1},p.handleMouseOver=function(){return p.setState({hover:!0})},p.handleMouseOut=function(){return p.setState({hover:!1})},p.render=function(){return i.default.createElement(t,{onMouseOver:p.handleMouseOver,onMouseOut:p.handleMouseOut},i.default.createElement(e,n({},p.props,p.state)))},s(p,o)}return p(a,r),a}(i.default.Component)};t.default=c},2023:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.active=void 0;var a,n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},o=r(0),i=(a=o)&&a.__esModule?a:{default:a};function l(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function p(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var c=t.active=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"span";return function(r){function a(){var r,o,p;l(this,a);for(var c=arguments.length,u=Array(c),f=0;f<c;f++)u[f]=arguments[f];return o=p=s(this,(r=a.__proto__||Object.getPrototypeOf(a)).call.apply(r,[this].concat(u))),p.state={active:!1},p.handleMouseDown=function(){return p.setState({active:!0})},p.handleMouseUp=function(){return p.setState({active:!1})},p.render=function(){return i.default.createElement(t,{onMouseDown:p.handleMouseDown,onMouseUp:p.handleMouseUp},i.default.createElement(e,n({},p.props,p.state)))},s(p,o)}return p(a,r),a}(i.default.Component)};t.default=c},2024:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.default=function(e,t){var r={},a=function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];r[e]=t};return 0===e&&a("first-child"),e===t-1&&a("last-child"),(0===e||e%2==0)&&a("even"),1===Math.abs(e%2)&&a("odd"),a("nth-child",e),r}},2025:function(e,t,r){var a;!function(n){var o=/^\s+/,i=/\s+$/,l=0,s=n.round,p=n.min,c=n.max,u=n.random;function f(e,t){if(t=t||{},(e=e||"")instanceof f)return e;if(!(this instanceof f))return new f(e,t);var r=function(e){var t={r:0,g:0,b:0},r=1,a=null,l=null,s=null,u=!1,f=!1;"string"==typeof e&&(e=function(e){e=e.replace(o,"").replace(i,"").toLowerCase();var t,r=!1;if(F[e])e=F[e],r=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=W.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=W.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=W.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=W.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=W.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=W.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=W.hex8.exec(e))return{r:T(t[1]),g:T(t[2]),b:T(t[3]),a:z(t[4]),format:r?"name":"hex8"};if(t=W.hex6.exec(e))return{r:T(t[1]),g:T(t[2]),b:T(t[3]),format:r?"name":"hex"};if(t=W.hex4.exec(e))return{r:T(t[1]+""+t[1]),g:T(t[2]+""+t[2]),b:T(t[3]+""+t[3]),a:z(t[4]+""+t[4]),format:r?"name":"hex8"};if(t=W.hex3.exec(e))return{r:T(t[1]+""+t[1]),g:T(t[2]+""+t[2]),b:T(t[3]+""+t[3]),format:r?"name":"hex"};return!1}(e));"object"==typeof e&&(X(e.r)&&X(e.g)&&X(e.b)?(h=e.r,d=e.g,b=e.b,t={r:255*M(h,255),g:255*M(d,255),b:255*M(b,255)},u=!0,f="%"===String(e.r).substr(-1)?"prgb":"rgb"):X(e.h)&&X(e.s)&&X(e.v)?(a=L(e.s),l=L(e.v),t=function(e,t,r){e=6*M(e,360),t=M(t,100),r=M(r,100);var a=n.floor(e),o=e-a,i=r*(1-t),l=r*(1-o*t),s=r*(1-(1-o)*t),p=a%6;return{r:255*[r,l,i,i,s,r][p],g:255*[s,r,r,l,i,i][p],b:255*[i,i,s,r,r,l][p]}}(e.h,a,l),u=!0,f="hsv"):X(e.h)&&X(e.s)&&X(e.l)&&(a=L(e.s),s=L(e.l),t=function(e,t,r){var a,n,o;function i(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+6*(t-e)*r:r<.5?t:r<2/3?e+(t-e)*(2/3-r)*6:e}if(e=M(e,360),t=M(t,100),r=M(r,100),0===t)a=n=o=r;else{var l=r<.5?r*(1+t):r+t-r*t,s=2*r-l;a=i(s,l,e+1/3),n=i(s,l,e),o=i(s,l,e-1/3)}return{r:255*a,g:255*n,b:255*o}}(e.h,a,s),u=!0,f="hsl"),e.hasOwnProperty("a")&&(r=e.a));var h,d,b;return r=A(r),{ok:u,format:e.format||f,r:p(255,c(t.r,0)),g:p(255,c(t.g,0)),b:p(255,c(t.b,0)),a:r}}(e);this._originalInput=e,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=s(100*this._a)/100,this._format=t.format||r.format,this._gradientType=t.gradientType,this._r<1&&(this._r=s(this._r)),this._g<1&&(this._g=s(this._g)),this._b<1&&(this._b=s(this._b)),this._ok=r.ok,this._tc_id=l++}function h(e,t,r){e=M(e,255),t=M(t,255),r=M(r,255);var a,n,o=c(e,t,r),i=p(e,t,r),l=(o+i)/2;if(o==i)a=n=0;else{var s=o-i;switch(n=l>.5?s/(2-o-i):s/(o+i),o){case e:a=(t-r)/s+(t<r?6:0);break;case t:a=(r-e)/s+2;break;case r:a=(e-t)/s+4}a/=6}return{h:a,s:n,l:l}}function d(e,t,r){e=M(e,255),t=M(t,255),r=M(r,255);var a,n,o=c(e,t,r),i=p(e,t,r),l=o,s=o-i;if(n=0===o?0:s/o,o==i)a=0;else{switch(o){case e:a=(t-r)/s+(t<r?6:0);break;case t:a=(r-e)/s+2;break;case r:a=(e-t)/s+4}a/=6}return{h:a,s:n,v:l}}function b(e,t,r,a){var n=[P(s(e).toString(16)),P(s(t).toString(16)),P(s(r).toString(16))];return a&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function g(e,t,r,a){return[P(D(a)),P(s(e).toString(16)),P(s(t).toString(16)),P(s(r).toString(16))].join("")}function x(e,t){t=0===t?0:t||10;var r=f(e).toHsl();return r.s-=t/100,r.s=H(r.s),f(r)}function v(e,t){t=0===t?0:t||10;var r=f(e).toHsl();return r.s+=t/100,r.s=H(r.s),f(r)}function m(e){return f(e).desaturate(100)}function y(e,t){t=0===t?0:t||10;var r=f(e).toHsl();return r.l+=t/100,r.l=H(r.l),f(r)}function w(e,t){t=0===t?0:t||10;var r=f(e).toRgb();return r.r=c(0,p(255,r.r-s(-t/100*255))),r.g=c(0,p(255,r.g-s(-t/100*255))),r.b=c(0,p(255,r.b-s(-t/100*255))),f(r)}function E(e,t){t=0===t?0:t||10;var r=f(e).toHsl();return r.l-=t/100,r.l=H(r.l),f(r)}function C(e,t){var r=f(e).toHsl(),a=(r.h+t)%360;return r.h=a<0?360+a:a,f(r)}function k(e){var t=f(e).toHsl();return t.h=(t.h+180)%360,f(t)}function S(e){var t=f(e).toHsl(),r=t.h;return[f(e),f({h:(r+120)%360,s:t.s,l:t.l}),f({h:(r+240)%360,s:t.s,l:t.l})]}function O(e){var t=f(e).toHsl(),r=t.h;return[f(e),f({h:(r+90)%360,s:t.s,l:t.l}),f({h:(r+180)%360,s:t.s,l:t.l}),f({h:(r+270)%360,s:t.s,l:t.l})]}function _(e){var t=f(e).toHsl(),r=t.h;return[f(e),f({h:(r+72)%360,s:t.s,l:t.l}),f({h:(r+216)%360,s:t.s,l:t.l})]}function R(e,t,r){t=t||6,r=r||30;var a=f(e).toHsl(),n=360/r,o=[f(e)];for(a.h=(a.h-(n*t>>1)+720)%360;--t;)a.h=(a.h+n)%360,o.push(f(a));return o}function j(e,t){t=t||6;for(var r=f(e).toHsv(),a=r.h,n=r.s,o=r.v,i=[],l=1/t;t--;)i.push(f({h:a,s:n,v:o})),o=(o+l)%1;return i}f.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,r,a=this.toRgb();return e=a.r/255,t=a.g/255,r=a.b/255,.2126*(e<=.03928?e/12.92:n.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:n.pow((t+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:n.pow((r+.055)/1.055,2.4))},setAlpha:function(e){return this._a=A(e),this._roundA=s(100*this._a)/100,this},toHsv:function(){var e=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=d(this._r,this._g,this._b),t=s(360*e.h),r=s(100*e.s),a=s(100*e.v);return 1==this._a?"hsv("+t+", "+r+"%, "+a+"%)":"hsva("+t+", "+r+"%, "+a+"%, "+this._roundA+")"},toHsl:function(){var e=h(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=h(this._r,this._g,this._b),t=s(360*e.h),r=s(100*e.s),a=s(100*e.l);return 1==this._a?"hsl("+t+", "+r+"%, "+a+"%)":"hsla("+t+", "+r+"%, "+a+"%, "+this._roundA+")"},toHex:function(e){return b(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,r,a,n){var o=[P(s(e).toString(16)),P(s(t).toString(16)),P(s(r).toString(16)),P(D(a))];if(n&&o[0].charAt(0)==o[0].charAt(1)&&o[1].charAt(0)==o[1].charAt(1)&&o[2].charAt(0)==o[2].charAt(1)&&o[3].charAt(0)==o[3].charAt(1))return o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0);return o.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:s(this._r),g:s(this._g),b:s(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+s(this._r)+", "+s(this._g)+", "+s(this._b)+")":"rgba("+s(this._r)+", "+s(this._g)+", "+s(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:s(100*M(this._r,255))+"%",g:s(100*M(this._g,255))+"%",b:s(100*M(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+s(100*M(this._r,255))+"%, "+s(100*M(this._g,255))+"%, "+s(100*M(this._b,255))+"%)":"rgba("+s(100*M(this._r,255))+"%, "+s(100*M(this._g,255))+"%, "+s(100*M(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(B[b(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+g(this._r,this._g,this._b,this._a),r=t,a=this._gradientType?"GradientType = 1, ":"";if(e){var n=f(e);r="#"+g(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+a+"startColorstr="+t+",endColorstr="+r+")"},toString:function(e){var t=!!e;e=e||this._format;var r=!1,a=this._a<1&&this._a>=0;return t||!a||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(r=this.toRgbString()),"prgb"===e&&(r=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(r=this.toHexString()),"hex3"===e&&(r=this.toHexString(!0)),"hex4"===e&&(r=this.toHex8String(!0)),"hex8"===e&&(r=this.toHex8String()),"name"===e&&(r=this.toName()),"hsl"===e&&(r=this.toHslString()),"hsv"===e&&(r=this.toHsvString()),r||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return f(this.toString())},_applyModification:function(e,t){var r=e.apply(null,[this].concat([].slice.call(t)));return this._r=r._r,this._g=r._g,this._b=r._b,this.setAlpha(r._a),this},lighten:function(){return this._applyModification(y,arguments)},brighten:function(){return this._applyModification(w,arguments)},darken:function(){return this._applyModification(E,arguments)},desaturate:function(){return this._applyModification(x,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(m,arguments)},spin:function(){return this._applyModification(C,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(R,arguments)},complement:function(){return this._applyCombination(k,arguments)},monochromatic:function(){return this._applyCombination(j,arguments)},splitcomplement:function(){return this._applyCombination(_,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(O,arguments)}},f.fromRatio=function(e,t){if("object"==typeof e){var r={};for(var a in e)e.hasOwnProperty(a)&&(r[a]="a"===a?e[a]:L(e[a]));e=r}return f(e,t)},f.equals=function(e,t){return!(!e||!t)&&f(e).toRgbString()==f(t).toRgbString()},f.random=function(){return f.fromRatio({r:u(),g:u(),b:u()})},f.mix=function(e,t,r){r=0===r?0:r||50;var a=f(e).toRgb(),n=f(t).toRgb(),o=r/100;return f({r:(n.r-a.r)*o+a.r,g:(n.g-a.g)*o+a.g,b:(n.b-a.b)*o+a.b,a:(n.a-a.a)*o+a.a})},f.readability=function(e,t){var r=f(e),a=f(t);return(n.max(r.getLuminance(),a.getLuminance())+.05)/(n.min(r.getLuminance(),a.getLuminance())+.05)},f.isReadable=function(e,t,r){var a,n,o=f.readability(e,t);switch(n=!1,(a=function(e){var t,r;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),r=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==r&&"large"!==r&&(r="small");return{level:t,size:r}}(r)).level+a.size){case"AAsmall":case"AAAlarge":n=o>=4.5;break;case"AAlarge":n=o>=3;break;case"AAAsmall":n=o>=7}return n},f.mostReadable=function(e,t,r){var a,n,o,i,l=null,s=0;n=(r=r||{}).includeFallbackColors,o=r.level,i=r.size;for(var p=0;p<t.length;p++)(a=f.readability(e,t[p]))>s&&(s=a,l=f(t[p]));return f.isReadable(e,l,{level:o,size:i})||!n?l:(r.includeFallbackColors=!1,f.mostReadable(e,["#fff","#000"],r))};var F=f.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},B=f.hexNames=function(e){var t={};for(var r in e)e.hasOwnProperty(r)&&(t[e[r]]=r);return t}(F);function A(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function M(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var r=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=p(t,c(0,parseFloat(e))),r&&(e=parseInt(e*t,10)/100),n.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function H(e){return p(1,c(0,e))}function T(e){return parseInt(e,16)}function P(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function D(e){return n.round(255*parseFloat(e)).toString(16)}function z(e){return T(e)/255}var N,G,U,W=(G="[\\s|\\(]+("+(N="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+N+")[,|\\s]+("+N+")\\s*\\)?",U="[\\s|\\(]+("+N+")[,|\\s]+("+N+")[,|\\s]+("+N+")[,|\\s]+("+N+")\\s*\\)?",{CSS_UNIT:new RegExp(N),rgb:new RegExp("rgb"+G),rgba:new RegExp("rgba"+U),hsl:new RegExp("hsl"+G),hsla:new RegExp("hsla"+U),hsv:new RegExp("hsv"+G),hsva:new RegExp("hsva"+U),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function X(e){return!!W.CSS_UNIT.exec(e)}e.exports?e.exports=f:void 0===(a=function(){return f}.call(t,r,t,e))||(e.exports=a)}(Math)},2026:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},o=r(0),i=(a=o)&&a.__esModule?a:{default:a};t.default=function(e){var t=e.fill,r=void 0===t?"currentColor":t,a=e.width,o=void 0===a?24:a,l=e.height,s=void 0===l?24:l,p=e.style,c=void 0===p?{}:p,u=function(e,t){var r={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r}(e,["fill","width","height","style"]);return i.default.createElement("svg",n({viewBox:"0 0 24 24",style:n({fill:r,width:o,height:s},c)},u),i.default.createElement("path",{d:"M12,18.17L8.83,15L7.42,16.41L12,21L16.59,16.41L15.17,15M12,5.83L15.17,9L16.58,7.59L12,3L7.41,7.59L8.83,9L12,5.83Z"}))}},2027:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,n=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},o=r(0),i=(a=o)&&a.__esModule?a:{default:a};t.default=function(e){var t=e.fill,r=void 0===t?"currentColor":t,a=e.width,o=void 0===a?24:a,l=e.height,s=void 0===l?24:l,p=e.style,c=void 0===p?{}:p,u=function(e,t){var r={};for(var a in e)t.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(e,a)&&(r[a]=e[a]);return r}(e,["fill","width","height","style"]);return i.default.createElement("svg",n({viewBox:"0 0 24 24",style:n({fill:r,width:o,height:s},c)},u),i.default.createElement("path",{d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"}))}},2081:function(e,t,r){"use strict";r.d(t,"a",(function(){return be}));var a=r(0),n=r.n(a),o=r(1571),i=r.n(o),l=r(1577),s=function(e){var t=e.direction,r=i()({default:{picker:{width:"18px",height:"18px",borderRadius:"50%",transform:"translate(-9px, -1px)",backgroundColor:"rgb(248, 248, 248)",boxShadow:"0 1px 4px 0 rgba(0, 0, 0, 0.37)"}},vertical:{picker:{transform:"translate(-3px, -9px)"}}},{vertical:"vertical"===t});return n.a.createElement("div",{style:r.picker})},p=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(e[a]=r[a])}return e},c=function(e){var t=e.rgb,r=e.hsl,a=e.width,o=e.height,s=e.onChange,c=e.direction,u=e.style,f=e.renderers,h=e.pointer,d=e.className,b=void 0===d?"":d,g=i()({default:{picker:{position:"relative",width:a,height:o},alpha:{radius:"2px",style:u}}});return n.a.createElement("div",{style:g.picker,className:"alpha-picker "+b},n.a.createElement(l.a,p({},g.alpha,{rgb:t,hsl:r,pointer:h,renderers:f,onChange:s,direction:c})))};c.defaultProps={width:"316px"