-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path3.e1cab4fc.js
1 lines (1 loc) · 33.4 KB
/
3.e1cab4fc.js
1
(window.webpackJsonp=window.webpackJsonp||[]).push([[3],{137:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(207);var a=n(165),o=n(176);function i(e){return function(e){if(Array.isArray(e))return Object(r.a)(e)}(e)||Object(a.a)(e)||Object(o.a)(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},165:function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}n.d(t,"a",(function(){return r}))},218:function(e,t){e.exports=function(e,t,n,r){var a=n?n.call(r,e,t):void 0;if(void 0!==a)return!!a;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var o=Object.keys(e),i=Object.keys(t);if(o.length!==i.length)return!1;for(var c=Object.prototype.hasOwnProperty.bind(t),s=0;s<o.length;s++){var u=o[s];if(!c(u))return!1;var l=e[u],f=t[u];if(!1===(a=n?n.call(r,l,f,u):void 0)||void 0===a&&l!==f)return!1}return!0}},230:function(e,t,n){"use strict";n.d(t,"b",(function(){return o})),n.d(t,"a",(function(){return i}));var r=n(153),a=n.n(r);function o(e,t){"function"==typeof e?e(t):"object"===a()(e)&&e&&"current"in e&&(e.current=t)}function i(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){t.forEach((function(t){o(t,e)}))}}},412:function(e,t,n){"use strict";var r=n(115),a=n.n(r),o=n(116),i=n.n(o),c=n(144),s=n.n(c),u=n(0),l=n.n(u),f=n(117),p=n(128),d=n(129),v=n(130),h=n(155),b=n(152),y=n(131);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){Object(f.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=function(e){var t,n,r=e.className,a=e.included,o=e.vertical,i=e.style,c=e.length,s=e.offset,u=e.reverse;c<0&&(u=!u,c=Math.abs(c),s=100-s);var p=o?(t={},Object(f.a)(t,u?"top":"bottom","".concat(s,"%")),Object(f.a)(t,u?"bottom":"top","auto"),Object(f.a)(t,"height","".concat(c,"%")),t):(n={},Object(f.a)(n,u?"right":"left","".concat(s,"%")),Object(f.a)(n,u?"left":"right","auto"),Object(f.a)(n,"width","".concat(c,"%")),n),d=O(O({},i),p);return a?l.a.createElement("div",{className:r,style:d}):null},j=n(127);function k(e,t,n){return(k="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(e,t,n){var r=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=Object(b.a)(e)););return e}(e,t);if(r){var a=Object.getOwnPropertyDescriptor(r,t);return a.get?a.get.call(n):a.value}})(e,t,n||e)}var P=n(217),x=n(112),w=n.n(x);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){Object(f.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var D=function(e){var t=e.prefixCls,n=e.vertical,r=e.reverse,a=e.marks,o=e.dots,i=e.step,c=e.included,s=e.lowerBound,u=e.upperBound,p=e.max,d=e.min,v=e.dotStyle,h=e.activeDotStyle,b=p-d,m=function(e,t,n,r,a,o){Object(y.a)(!n||r>0,"`Slider[step]` should be a positive number in order to make Slider[dots] work.");var i=Object.keys(t).map(parseFloat).sort((function(e,t){return e-t}));if(n&&r)for(var c=a;c<=o;c+=r)-1===i.indexOf(c)&&i.push(c);return i}(0,a,o,i,d,p).map((function(e){var a,o="".concat(Math.abs(e-d)/b*100,"%"),i=!c&&e===u||c&&e<=u&&e>=s,p=C(C({},v),{},n?Object(f.a)({},r?"top":"bottom",o):Object(f.a)({},r?"right":"left",o));i&&(p=C(C({},p),h));var y=w()((a={},Object(f.a)(a,"".concat(t,"-dot"),!0),Object(f.a)(a,"".concat(t,"-dot-active"),i),Object(f.a)(a,"".concat(t,"-dot-reverse"),r),a));return l.a.createElement("span",{className:y,style:p,key:e})}));return l.a.createElement("div",{className:"".concat(t,"-step")},m)},E=n(145);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function R(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){Object(f.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var B=function(e){var t=e.className,n=e.vertical,r=e.reverse,a=e.marks,o=e.included,i=e.upperBound,c=e.lowerBound,s=e.max,u=e.min,p=e.onClickLabel,d=Object.keys(a),v=s-u,h=d.map(parseFloat).sort((function(e,t){return e-t})).map((function(e){var s,d=a[e],h="object"===Object(E.a)(d)&&!l.a.isValidElement(d),b=h?d.label:d;if(!b&&0!==b)return null;var y=!o&&e===i||o&&e<=i&&e>=c,m=w()((s={},Object(f.a)(s,"".concat(t,"-text"),!0),Object(f.a)(s,"".concat(t,"-text-active"),y),s)),O=Object(f.a)({marginBottom:"-50%"},r?"top":"bottom","".concat((e-u)/v*100,"%")),g=Object(f.a)({transform:"translateX(".concat(r?"50%":"-50%",")"),msTransform:"translateX(".concat(r?"50%":"-50%",")")},r?"right":"left","".concat((e-u)/v*100,"%")),j=n?O:g,k=h?R(R({},j),d.style):j;return l.a.createElement("span",{className:m,style:k,key:e,onMouseDown:function(t){return p(t,e)},onTouchStart:function(t){return p(t,e)}},b)}));return l.a.createElement("div",{className:t},h)};function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){Object(f.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function L(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(b.a)(e);if(t){var a=Object(b.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(h.a)(this,n)}}var N=function(e){Object(v.a)(n,e);var t=L(n);function n(){var e;return Object(p.a)(this,n),(e=t.apply(this,arguments)).state={clickFocused:!1},e.setHandleRef=function(t){e.handle=t},e.handleMouseUp=function(){document.activeElement===e.handle&&e.setClickFocus(!0)},e.handleMouseDown=function(t){t.preventDefault(),e.focus()},e.handleBlur=function(){e.setClickFocus(!1)},e.handleKeyDown=function(){e.setClickFocus(!1)},e}return Object(d.a)(n,[{key:"componentDidMount",value:function(){this.onMouseUpListener=Object(P.a)(document,"mouseup",this.handleMouseUp)}},{key:"componentWillUnmount",value:function(){this.onMouseUpListener&&this.onMouseUpListener.remove()}},{key:"setClickFocus",value:function(e){this.setState({clickFocused:e})}},{key:"clickFocus",value:function(){this.setClickFocus(!0),this.focus()}},{key:"focus",value:function(){this.handle.focus()}},{key:"blur",value:function(){this.handle.blur()}},{key:"render",value:function(){var e,t,n,r=this.props,a=r.prefixCls,o=r.vertical,i=r.reverse,c=r.offset,s=r.style,u=r.disabled,p=r.min,d=r.max,v=r.value,h=r.tabIndex,b=r.ariaLabel,y=r.ariaLabelledBy,m=r.ariaValueTextFormatter,O=Object(j.a)(r,["prefixCls","vertical","reverse","offset","style","disabled","min","max","value","tabIndex","ariaLabel","ariaLabelledBy","ariaValueTextFormatter"]),g=w()(this.props.className,Object(f.a)({},"".concat(a,"-handle-click-focused"),this.state.clickFocused)),k=o?(e={},Object(f.a)(e,i?"top":"bottom","".concat(c,"%")),Object(f.a)(e,i?"bottom":"top","auto"),Object(f.a)(e,"transform",i?null:"translateY(+50%)"),e):(t={},Object(f.a)(t,i?"right":"left","".concat(c,"%")),Object(f.a)(t,i?"left":"right","auto"),Object(f.a)(t,"transform","translateX(".concat(i?"+":"-","50%)")),t),P=T(T({},s),k),x=h||0;return(u||null===h)&&(x=null),m&&(n=m(v)),l.a.createElement("div",Object.assign({ref:this.setHandleRef,tabIndex:x},O,{className:g,style:P,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseDown:this.handleMouseDown,role:"slider","aria-valuemin":p,"aria-valuemax":d,"aria-valuenow":v,"aria-disabled":!!u,"aria-label":b,"aria-labelledby":y,"aria-valuetext":n}))}}]),n}(l.a.Component),V=n(137),H=n(20),U=n(135);function A(e,t){try{return Object.keys(t).some((function(n){return e.target===Object(H.findDOMNode)(t[n])}))}catch(n){return!1}}function I(e,t){var n=t.min,r=t.max;return e<n||e>r}function G(e){return e.touches.length>1||"touchend"===e.type.toLowerCase()&&e.touches.length>0}function K(e,t){var n=t.marks,r=t.step,a=t.min,o=t.max,i=Object.keys(n).map(parseFloat);if(null!==r){var c=Math.floor((o-a)/r),s=Math.min((e-a)/r,c),u=Math.round(s)*r+a;i.push(u)}var l=i.map((function(t){return Math.abs(e-t)}));return i[l.indexOf(Math.min.apply(Math,Object(V.a)(l)))]}function W(e,t){return e?t.clientY:t.pageX}function X(e,t){return e?t.touches[0].clientY:t.touches[0].pageX}function J(e,t){var n=t.getBoundingClientRect();return e?n.top+.5*n.height:window.pageXOffset+n.left+.5*n.width}function Y(e,t){var n=t.max,r=t.min;return e<=r?r:e>=n?n:e}function _(e,t){var n=t.step,r=isFinite(K(e,t))?K(e,t):0;return null===n?r:parseFloat(r.toFixed(function(e){var t=e.toString(),n=0;return t.indexOf(".")>=0&&(n=t.length-t.indexOf(".")-1),n}(n)))}function q(e){e.stopPropagation(),e.preventDefault()}function z(e,t,n){var r="increase",a="decrease",o=r;switch(e.keyCode){case U.a.UP:o=t&&n?a:r;break;case U.a.RIGHT:o=!t&&n?a:r;break;case U.a.DOWN:o=t&&n?r:a;break;case U.a.LEFT:o=!t&&n?r:a;break;case U.a.END:return function(e,t){return t.max};case U.a.HOME:return function(e,t){return t.min};case U.a.PAGE_UP:return function(e,t){return e+2*t.step};case U.a.PAGE_DOWN:return function(e,t){return e-2*t.step};default:return}return function(e,t){return function(e,t,n){var r={increase:function(e,t){return e+t},decrease:function(e,t){return e-t}},a=r[e](Object.keys(n.marks).indexOf(JSON.stringify(t)),1),o=Object.keys(n.marks)[a];return n.step?r[e](t,n.step):Object.keys(n.marks).length&&n.marks[o]?n.marks[o]:t}(o,e,t)}}function Q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Q(Object(n),!0).forEach((function(t){Object(f.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(b.a)(e);if(t){var a=Object(b.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(h.a)(this,n)}}function ee(){}function te(e){var t;return(t=function(e){Object(v.a)(n,e);var t=$(n);function n(e){var r;Object(p.a)(this,n),(r=t.call(this,e)).onMouseDown=function(e){if(0===e.button){var t=r.props.vertical,n=W(t,e);if(A(e,r.handlesRefs)){var a=J(t,e.target);r.dragOffset=n-a,n=a}else r.dragOffset=0;r.removeDocumentEvents(),r.onStart(n),r.addDocumentMouseEvents()}},r.onTouchStart=function(e){if(!G(e)){var t=r.props.vertical,n=X(t,e);if(A(e,r.handlesRefs)){var a=J(t,e.target);r.dragOffset=n-a,n=a}else r.dragOffset=0;r.onStart(n),r.addDocumentTouchEvents(),q(e)}},r.onFocus=function(e){var t=r.props,n=t.onFocus,a=t.vertical;if(A(e,r.handlesRefs)){var o=J(a,e.target);r.dragOffset=0,r.onStart(o),q(e),n&&n(e)}},r.onBlur=function(e){var t=r.props.onBlur;r.onEnd(),t&&t(e)},r.onMouseUp=function(){r.handlesRefs[r.prevMovedHandleIndex]&&r.handlesRefs[r.prevMovedHandleIndex].clickFocus()},r.onMouseMove=function(e){if(r.sliderRef){var t=W(r.props.vertical,e);r.onMove(e,t-r.dragOffset)}else r.onEnd()},r.onTouchMove=function(e){if(!G(e)&&r.sliderRef){var t=X(r.props.vertical,e);r.onMove(e,t-r.dragOffset)}else r.onEnd()},r.onKeyDown=function(e){r.sliderRef&&A(e,r.handlesRefs)&&r.onKeyboard(e)},r.onClickMarkLabel=function(e,t){e.stopPropagation(),r.onChange({value:t}),r.setState({value:t},(function(){return r.onEnd(!0)}))},r.saveSlider=function(e){r.sliderRef=e};var a=e.step,o=e.max,i=e.min,c=!isFinite(o-i)||(o-i)%a==0;return Object(y.a)(!a||Math.floor(a)!==a||c,"Slider[max] - Slider[min] (".concat(o-i,") should be a multiple of Slider[step] (").concat(a,")")),r.handlesRefs={},r}return Object(d.a)(n,[{key:"componentDidMount",value:function(){this.document=this.sliderRef&&this.sliderRef.ownerDocument;var e=this.props,t=e.autoFocus,n=e.disabled;t&&!n&&this.focus()}},{key:"componentWillUnmount",value:function(){k(Object(b.a)(n.prototype),"componentWillUnmount",this)&&k(Object(b.a)(n.prototype),"componentWillUnmount",this).call(this),this.removeDocumentEvents()}},{key:"getSliderStart",value:function(){var e=this.sliderRef,t=this.props,n=t.vertical,r=t.reverse,a=e.getBoundingClientRect();return n?r?a.bottom:a.top:window.pageXOffset+(r?a.right:a.left)}},{key:"getSliderLength",value:function(){var e=this.sliderRef;if(!e)return 0;var t=e.getBoundingClientRect();return this.props.vertical?t.height:t.width}},{key:"addDocumentTouchEvents",value:function(){this.onTouchMoveListener=Object(P.a)(this.document,"touchmove",this.onTouchMove),this.onTouchUpListener=Object(P.a)(this.document,"touchend",this.onEnd)}},{key:"addDocumentMouseEvents",value:function(){this.onMouseMoveListener=Object(P.a)(this.document,"mousemove",this.onMouseMove),this.onMouseUpListener=Object(P.a)(this.document,"mouseup",this.onEnd)}},{key:"removeDocumentEvents",value:function(){this.onTouchMoveListener&&this.onTouchMoveListener.remove(),this.onTouchUpListener&&this.onTouchUpListener.remove(),this.onMouseMoveListener&&this.onMouseMoveListener.remove(),this.onMouseUpListener&&this.onMouseUpListener.remove()}},{key:"focus",value:function(){this.props.disabled||this.handlesRefs[0].focus()}},{key:"blur",value:function(){var e=this;this.props.disabled||Object.keys(this.handlesRefs).forEach((function(t){e.handlesRefs[t]&&e.handlesRefs[t].blur&&e.handlesRefs[t].blur()}))}},{key:"calcValue",value:function(e){var t=this.props,n=t.vertical,r=t.min,a=t.max,o=Math.abs(Math.max(e,0)/this.getSliderLength());return n?(1-o)*(a-r)+r:o*(a-r)+r}},{key:"calcValueByPos",value:function(e){var t=(this.props.reverse?-1:1)*(e-this.getSliderStart());return this.trimAlignValue(this.calcValue(t))}},{key:"calcOffset",value:function(e){var t=this.props,n=t.min,r=(e-n)/(t.max-n);return Math.max(0,100*r)}},{key:"saveHandle",value:function(e,t){this.handlesRefs[e]=t}},{key:"render",value:function(){var e,t=this.props,r=t.prefixCls,a=t.className,o=t.marks,i=t.dots,c=t.step,s=t.included,u=t.disabled,p=t.vertical,d=t.reverse,v=t.min,h=t.max,y=t.children,m=t.maximumTrackStyle,O=t.style,g=t.railStyle,j=t.dotStyle,P=t.activeDotStyle,x=k(Object(b.a)(n.prototype),"render",this).call(this),S=x.tracks,C=x.handles,E=w()(r,(e={},Object(f.a)(e,"".concat(r,"-with-marks"),Object.keys(o).length),Object(f.a)(e,"".concat(r,"-disabled"),u),Object(f.a)(e,"".concat(r,"-vertical"),p),Object(f.a)(e,a,a),e));return l.a.createElement("div",{ref:this.saveSlider,className:E,onTouchStart:u?ee:this.onTouchStart,onMouseDown:u?ee:this.onMouseDown,onMouseUp:u?ee:this.onMouseUp,onKeyDown:u?ee:this.onKeyDown,onFocus:u?ee:this.onFocus,onBlur:u?ee:this.onBlur,style:O},l.a.createElement("div",{className:"".concat(r,"-rail"),style:Z(Z({},m),g)}),S,l.a.createElement(D,{prefixCls:r,vertical:p,reverse:d,marks:o,dots:i,step:c,included:s,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:h,min:v,dotStyle:j,activeDotStyle:P}),C,l.a.createElement(B,{className:"".concat(r,"-mark"),onClickLabel:u?ee:this.onClickMarkLabel,vertical:p,marks:o,included:s,lowerBound:this.getLowerBound(),upperBound:this.getUpperBound(),max:h,min:v,reverse:d}),y)}}]),n}(e)).displayName="ComponentEnhancer(".concat(e.displayName,")"),t.defaultProps=Z(Z({},e.defaultProps),{},{prefixCls:"rc-slider",className:"",min:0,max:100,step:1,marks:{},handle:function(e){var t=e.index,n=Object(j.a)(e,["index"]);return delete n.dragging,null===n.value?null:l.a.createElement(N,Object.assign({},n,{key:t}))},onBeforeChange:ee,onChange:ee,onAfterChange:ee,included:!0,disabled:!1,dots:!1,vertical:!1,reverse:!1,trackStyle:[{}],handleStyle:[{}],railStyle:{},dotStyle:{},activeDotStyle:{}}),t}function ne(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function re(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ne(Object(n),!0).forEach((function(t){Object(f.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ne(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(b.a)(e);if(t){var a=Object(b.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(h.a)(this,n)}}var oe=te(function(e){Object(v.a)(n,e);var t=ae(n);function n(e){var r;Object(p.a)(this,n),(r=t.call(this,e)).onEnd=function(e){var t=r.state.dragging;r.removeDocumentEvents(),(t||e)&&r.props.onAfterChange(r.getValue()),r.setState({dragging:!1})};var a=void 0!==e.defaultValue?e.defaultValue:e.min,o=void 0!==e.value?e.value:a;return r.state={value:r.trimAlignValue(o),dragging:!1},Object(y.a)(!("minimumTrackStyle"in e),"minimumTrackStyle will be deprecated, please use trackStyle instead."),Object(y.a)(!("maximumTrackStyle"in e),"maximumTrackStyle will be deprecated, please use railStyle instead."),r}return Object(d.a)(n,[{key:"calcValueByPos",value:function(e){return 0}},{key:"calcOffset",value:function(e){return 0}},{key:"saveHandle",value:function(e,t){}},{key:"removeDocumentEvents",value:function(){}},{key:"componentDidUpdate",value:function(e,t){if("value"in this.props||"min"in this.props||"max"in this.props){var n=this.props,r=n.value,a=n.onChange,o=void 0!==r?r:t.value,i=this.trimAlignValue(o,this.props);i!==t.value&&(this.setState({value:i}),I(o,this.props)&&a(i))}}},{key:"onChange",value:function(e){var t=this.props,n=!("value"in t),r=e.value>this.props.max?re(re({},e),{},{value:this.props.max}):e;n&&this.setState(r);var a=r.value;t.onChange(a)}},{key:"onStart",value:function(e){this.setState({dragging:!0});var t=this.props,n=this.getValue();t.onBeforeChange(n);var r=this.calcValueByPos(e);this.startValue=r,this.startPosition=e,r!==n&&(this.prevMovedHandleIndex=0,this.onChange({value:r}))}},{key:"onMove",value:function(e,t){q(e);var n=this.state.value,r=this.calcValueByPos(t);r!==n&&this.onChange({value:r})}},{key:"onKeyboard",value:function(e){var t=this.props,n=t.reverse,r=z(e,t.vertical,n);if(r){q(e);var a=this.state.value,o=r(a,this.props),i=this.trimAlignValue(o);if(i===a)return;this.onChange({value:i}),this.props.onAfterChange(i),this.onEnd()}}},{key:"getValue",value:function(){return this.state.value}},{key:"getLowerBound",value:function(){return this.props.min}},{key:"getUpperBound",value:function(){return this.state.value}},{key:"trimAlignValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(null===e)return null;var n=re(re({},this.props),t),r=Y(e,n);return _(r,n)}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.vertical,a=t.included,o=t.disabled,i=t.minimumTrackStyle,c=t.trackStyle,s=t.handleStyle,u=t.tabIndex,f=t.ariaLabelForHandle,p=t.ariaLabelledByForHandle,d=t.ariaValueTextFormatterForHandle,v=t.min,h=t.max,b=t.startPoint,y=t.reverse,m=t.handle,O=this.state,j=O.value,k=O.dragging,P=this.calcOffset(j),x=m({className:"".concat(n,"-handle"),prefixCls:n,vertical:r,offset:P,value:j,dragging:k,disabled:o,min:v,max:h,reverse:y,index:0,tabIndex:u,ariaLabel:f,ariaLabelledBy:p,ariaValueTextFormatter:d,style:s[0]||s,ref:function(t){return e.saveHandle(0,t)}}),w=void 0!==b?this.calcOffset(b):0,S=c[0]||c;return{tracks:l.a.createElement(g,{className:"".concat(n,"-track"),vertical:r,included:a,offset:w,reverse:y,length:P-w,style:re(re({},i),S)}),handles:x}}}]),n}(l.a.Component)),ie=n(218),ce=n.n(ie);function se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ue(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?se(Object(n),!0).forEach((function(t){Object(f.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(b.a)(e);if(t){var a=Object(b.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(h.a)(this,n)}}var fe=function(e){var t=e.value,n=e.handle,r=e.bounds,a=e.props,o=a.allowCross,i=a.pushable,c=Number(i),s=Y(t,a),u=s;return o||null==n||void 0===r||(n>0&&s<=r[n-1]+c&&(u=r[n-1]+c),n<r.length-1&&s>=r[n+1]-c&&(u=r[n+1]-c)),_(u,a)},pe=function(e){Object(v.a)(n,e);var t=le(n);function n(e){var r;Object(p.a)(this,n),(r=t.call(this,e)).onEnd=function(e){var t=r.state.handle;r.removeDocumentEvents(),(null!==t||e)&&r.props.onAfterChange(r.getValue()),r.setState({handle:null})};var a=e.count,o=e.min,i=e.max,c=Array.apply(void 0,Object(V.a)(Array(a+1))).map((function(){return o})),s="defaultValue"in e?e.defaultValue:c,u=(void 0!==e.value?e.value:s).map((function(t,n){return fe({value:t,handle:n,props:e})})),l=u[0]===i?0:u.length-1;return r.state={handle:null,recent:l,bounds:u},r}return Object(d.a)(n,[{key:"calcValueByPos",value:function(e){return 0}},{key:"calcOffset",value:function(e){return 0}},{key:"saveHandle",value:function(e,t){}},{key:"removeDocumentEvents",value:function(){}},{key:"componentDidUpdate",value:function(e,t){var n=this;if(("value"in this.props||"min"in this.props||"max"in this.props)&&(this.props.min!==e.min||this.props.max!==e.max||!ce()(this.props.value,e.value))){var r=this.props,a=r.onChange,o=r.value||t.bounds;if(o.some((function(e){return I(e,n.props)})))a(o.map((function(e){return Y(e,n.props)})))}}},{key:"onChange",value:function(e){var t=this.props;if(!("value"in t))this.setState(e);else{var n={};["handle","recent"].forEach((function(t){void 0!==e[t]&&(n[t]=e[t])})),Object.keys(n).length&&this.setState(n)}var r=ue(ue({},this.state),e).bounds;t.onChange(r)}},{key:"onStart",value:function(e){var t=this.props,n=this.state,r=this.getValue();t.onBeforeChange(r);var a=this.calcValueByPos(e);this.startValue=a,this.startPosition=e;var o=this.getClosestBound(a);if(this.prevMovedHandleIndex=this.getBoundNeedMoving(a,o),this.setState({handle:this.prevMovedHandleIndex,recent:this.prevMovedHandleIndex}),a!==r[this.prevMovedHandleIndex]){var i=Object(V.a)(n.bounds);i[this.prevMovedHandleIndex]=a,this.onChange({bounds:i})}}},{key:"onMove",value:function(e,t){q(e);var n=this.state,r=this.calcValueByPos(t);r!==n.bounds[n.handle]&&this.moveTo(r)}},{key:"onKeyboard",value:function(e){var t=this.props,n=t.reverse,r=z(e,t.vertical,n);if(r){q(e);var a=this.state,o=this.props,i=a.bounds,c=a.handle,s=i[null===c?a.recent:c],u=r(s,o),l=fe({value:u,handle:c,bounds:a.bounds,props:o});if(l===s)return;this.moveTo(l,!0)}}},{key:"getValue",value:function(){return this.state.bounds}},{key:"getClosestBound",value:function(e){for(var t=this.state.bounds,n=0,r=1;r<t.length-1;r+=1)e>=t[r]&&(n=r);return Math.abs(t[n+1]-e)<Math.abs(t[n]-e)&&(n+=1),n}},{key:"getBoundNeedMoving",value:function(e,t){var n=this.state,r=n.bounds,a=n.recent,o=t,i=r[t+1]===r[t];return i&&r[a]===r[t]&&(o=a),i&&e!==r[t+1]&&(o=e<r[t+1]?t:t+1),o}},{key:"getLowerBound",value:function(){return this.state.bounds[0]}},{key:"getUpperBound",value:function(){var e=this.state.bounds;return e[e.length-1]}},{key:"getPoints",value:function(){var e=this.props,t=e.marks,n=e.step,r=e.min,a=e.max,o=this.internalPointsCache;if(!o||o.marks!==t||o.step!==n){var i=ue({},t);if(null!==n)for(var c=r;c<=a;c+=n)i[c]=c;var s=Object.keys(i).map(parseFloat);s.sort((function(e,t){return e-t})),this.internalPointsCache={marks:t,step:n,points:s}}return this.internalPointsCache.points}},{key:"moveTo",value:function(e,t){var n=this,r=this.state,a=this.props,o=Object(V.a)(r.bounds),i=null===r.handle?r.recent:r.handle;o[i]=e;var c=i;!1!==a.pushable?this.pushSurroundingHandles(o,c):a.allowCross&&(o.sort((function(e,t){return e-t})),c=o.indexOf(e)),this.onChange({recent:c,handle:c,bounds:o}),t&&(this.props.onAfterChange(o),this.setState({},(function(){n.handlesRefs[c].focus()})),this.onEnd())}},{key:"pushSurroundingHandles",value:function(e,t){var n=e[t],r=this.props.pushable,a=Number(r),o=0;if(e[t+1]-n<a&&(o=1),n-e[t-1]<a&&(o=-1),0!==o){var i=t+o,c=o*(e[i]-n);this.pushHandle(e,i,o,a-c)||(e[t]=e[i]-o*a)}}},{key:"pushHandle",value:function(e,t,n,r){for(var a=e[t],o=e[t];n*(o-a)<r;){if(!this.pushHandleOnePoint(e,t,n))return e[t]=a,!1;o=e[t]}return!0}},{key:"pushHandleOnePoint",value:function(e,t,n){var r=this.getPoints(),a=r.indexOf(e[t])+n;if(a>=r.length||a<0)return!1;var o=t+n,i=r[a],c=this.props.pushable,s=Number(c),u=n*(e[o]-i);return!!this.pushHandle(e,o,n,s-u)&&(e[t]=i,!0)}},{key:"trimAlignValue",value:function(e){var t=this.state,n=t.handle,r=t.bounds;return fe({value:e,handle:n,bounds:r,props:this.props})}},{key:"render",value:function(){var e=this,t=this.state,n=t.handle,r=t.bounds,a=this.props,o=a.prefixCls,i=a.vertical,c=a.included,s=a.disabled,u=a.min,p=a.max,d=a.reverse,v=a.handle,h=a.trackStyle,b=a.handleStyle,y=a.tabIndex,m=a.ariaLabelGroupForHandles,O=a.ariaLabelledByGroupForHandles,j=a.ariaValueTextFormatterGroupForHandles,k=r.map((function(t){return e.calcOffset(t)})),P="".concat(o,"-handle"),x=r.map((function(t,r){var a,c=y[r]||0;(s||null===y[r])&&(c=null);var l=n===r;return v({className:w()((a={},Object(f.a)(a,P,!0),Object(f.a)(a,"".concat(P,"-").concat(r+1),!0),Object(f.a)(a,"".concat(P,"-dragging"),l),a)),prefixCls:o,vertical:i,dragging:l,offset:k[r],value:t,index:r,tabIndex:c,min:u,max:p,reverse:d,disabled:s,style:b[r],ref:function(t){return e.saveHandle(r,t)},ariaLabel:m[r],ariaLabelledBy:O[r],ariaValueTextFormatter:j[r]})}));return{tracks:r.slice(0,-1).map((function(e,t){var n,r=t+1,a=w()((n={},Object(f.a)(n,"".concat(o,"-track"),!0),Object(f.a)(n,"".concat(o,"-track-").concat(r),!0),n));return l.a.createElement(g,{className:a,vertical:i,reverse:d,included:c,offset:k[r-1],length:k[r]-k[r-1],style:h[t],key:r})})),handles:x}}}],[{key:"getDerivedStateFromProps",value:function(e,t){if(!("value"in e||"min"in e||"max"in e))return null;var n=e.value||t.bounds,r=n.map((function(n,r){return fe({value:n,handle:r,bounds:t.bounds,props:e})}));if(t.bounds.length===r.length){if(r.every((function(e,n){return e===t.bounds[n]})))return null}else r=n.map((function(t,n){return fe({value:t,handle:n,props:e})}));return ue(ue({},t),{},{bounds:r})}}]),n}(l.a.Component);pe.displayName="Range",pe.defaultProps={count:1,allowCross:!0,pushable:!1,tabIndex:[],ariaLabelGroupForHandles:[],ariaLabelledByGroupForHandles:[],ariaValueTextFormatterGroupForHandles:[]};var de=te(pe),ve=n(269);function he(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function be(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?he(Object(n),!0).forEach((function(t){Object(f.a)(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):he(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=Object(b.a)(e);if(t){var a=Object(b.a)(this).constructor;n=Reflect.construct(r,arguments,a)}else n=r.apply(this,arguments);return Object(h.a)(this,n)}}var me=oe;me.Range=de,me.Handle=N,me.createSliderWithTooltip=function(e){var t;return(t=function(t){Object(v.a)(r,t);var n=ye(r);function r(){var e;return Object(p.a)(this,r),(e=n.apply(this,arguments)).state={visibles:{}},e.handleTooltipVisibleChange=function(t,n){e.setState((function(e){return{visibles:be(be({},e.visibles),{},Object(f.a)({},t,n))}}))},e.handleWithTooltip=function(t){var n,r=t.value,a=t.dragging,o=t.index,i=t.disabled,c=Object(j.a)(t,["value","dragging","index","disabled"]),s=e.props,u=s.tipFormatter,f=s.tipProps,p=s.handleStyle,d=s.getTooltipContainer,v=f.prefixCls,h=void 0===v?"rc-slider-tooltip":v,b=f.overlay,y=void 0===b?u(r):b,m=f.placement,O=void 0===m?"top":m,g=f.visible,k=void 0!==g&&g,P=Object(j.a)(f,["prefixCls","overlay","placement","visible"]);return n=Array.isArray(p)?p[o]||p[0]:p,l.a.createElement(ve.a,Object.assign({},P,{getTooltipContainer:d,prefixCls:h,overlay:y,placement:O,visible:!i&&(e.state.visibles[o]||a)||k,key:o}),l.a.createElement(N,Object.assign({},c,{style:be({},n),value:r,onMouseEnter:function(){return e.handleTooltipVisibleChange(o,!0)},onMouseLeave:function(){return e.handleTooltipVisibleChange(o,!1)}})))},e}return Object(d.a)(r,[{key:"render",value:function(){return l.a.createElement(e,Object.assign({},this.props,{handle:this.handleWithTooltip}))}}]),r}(l.a.Component)).defaultProps={tipFormatter:function(e){return e},handleStyle:[{}],tipProps:{},getTooltipContainer:function(e){return e.parentNode}},t};var Oe=me,ge=n(267),je=n(230);var ke=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=u.useRef();return u.useEffect((function(){t.forEach((function(e){e&&Object(je.b)(e,r.current)}))}),[t]),r},Pe=u.forwardRef((function(e,t){var n=e.visible,r=u.useRef(null),a=ke(t,r),o=u.useRef(null);function c(){window.cancelAnimationFrame(o.current),o.current=null}function s(){o.current=window.requestAnimationFrame((function(){a.current.forcePopupAlign(),o.current=null,s()}))}return u.useEffect((function(){return n?s():c(),c}),[n]),u.createElement(ge.a,i()({ref:a},e))})),xe=n(414),we=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var a=0;for(r=Object.getOwnPropertySymbols(e);a<r.length;a++)t.indexOf(r[a])<0&&Object.prototype.propertyIsEnumerable.call(e,r[a])&&(n[r[a]]=e[r[a]])}return n},Se=u.forwardRef((function(e,t){var n=u.useContext(xe.b),r=n.getPrefixCls,o=n.direction,c=n.getPopupContainer,l=u.useState({}),f=s()(l,2),p=f[0],d=f[1],v=function(e,t){d((function(n){return i()(i()({},n),a()({},e,t))}))},h=function(e,t){return e||(t?"rtl"===o?"left":"right":"top")},b=function(t){var n=t.tooltipPrefixCls,r=t.prefixCls,a=t.info,o=a.value,s=a.dragging,l=a.index,f=we(a,["value","dragging","index"]),d=e.tipFormatter,b=e.tooltipVisible,y=e.tooltipPlacement,m=e.getTooltipPopupContainer,O=e.vertical,g=!!d&&(p[l]||s),j=b||void 0===b&&g;return u.createElement(Pe,{prefixCls:n,title:d?d(o):"",visible:j,placement:h(y,O),transitionName:"zoom-down",key:l,overlayClassName:"".concat(r,"-tooltip"),getPopupContainer:m||c||function(){return document.body}},u.createElement(N,i()({},f,{value:o,onMouseEnter:function(){return v(l,!0)},onMouseLeave:function(){return v(l,!1)}})))},y=e.prefixCls,m=e.tooltipPrefixCls,O=e.range,g=e.className,j=we(e,["prefixCls","tooltipPrefixCls","range","className"]),k=r("slider",y),P=r("tooltip",m),x=w()(g,a()({},"".concat(k,"-rtl"),"rtl"===o));return"rtl"!==o||j.vertical||(j.reverse=!j.reverse),O?u.createElement(de,i()({},j,{step:j.step,className:x,ref:t,handle:function(e){return b({tooltipPrefixCls:P,prefixCls:k,info:e})},prefixCls:k})):u.createElement(Oe,i()({},j,{step:j.step,className:x,ref:t,handle:function(e){return b({tooltipPrefixCls:P,prefixCls:k,info:e})},prefixCls:k}))}));Se.displayName="Slider",Se.defaultProps={tipFormatter:function(e){return"number"==typeof e?e.toString():""}};t.a=Se}}]);