(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[19],{

/***/ "../../node_modules/@blueprintjs/core/lib/esm/components/slider/coreSlider.js":
/*!********************************************************************************************************!*\
  !*** C:/workspace/gitfish/twii/node_modules/@blueprintjs/core/lib/esm/components/slider/coreSlider.js ***!
  \********************************************************************************************************/
/*! exports provided: CoreSlider, formatPercentage */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "CoreSlider", function() { return CoreSlider; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "formatPercentage", function() { return formatPercentage; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "../../node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _common_abstractPureComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/abstractPureComponent */ "../../node_modules/@blueprintjs/core/lib/esm/common/abstractPureComponent.js");
/* harmony import */ var _common_classes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/classes */ "../../node_modules/@blueprintjs/core/lib/esm/common/classes.js");
/* harmony import */ var _common_errors__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/errors */ "../../node_modules/@blueprintjs/core/lib/esm/common/errors.js");
/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/utils */ "../../node_modules/@blueprintjs/core/lib/esm/common/utils.js");
/*
 * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
 *
 * Licensed under the terms of the LICENSE file distributed with this project.
 */







var CoreSlider = /** @class */ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](CoreSlider, _super);
    function CoreSlider(props) {
        var _this = _super.call(this, props) || this;
        _this.className = _common_classes__WEBPACK_IMPORTED_MODULE_4__["SLIDER"];
        _this.refHandlers = {
            track: function (el) { return (_this.trackElement = el); },
        };
        _this.maybeHandleTrackClick = function (event) {
            if (_this.canHandleTrackEvent(event)) {
                _this.handleTrackClick(event);
            }
        };
        _this.maybeHandleTrackTouch = function (event) {
            if (_this.canHandleTrackEvent(event)) {
                _this.handleTrackTouch(event);
            }
        };
        _this.canHandleTrackEvent = function (event) {
            var target = event.target;
            // ensure event does not come from inside the handle
            return !_this.props.disabled && target.closest("." + _common_classes__WEBPACK_IMPORTED_MODULE_4__["SLIDER_HANDLE"]) == null;
        };
        _this.state = {
            labelPrecision: _this.getLabelPrecision(props),
            tickSize: 0,
            tickSizeRatio: 0,
        };
        return _this;
    }
    CoreSlider.prototype.render = function () {
        var classes = classnames__WEBPACK_IMPORTED_MODULE_1___default()(this.className, (_a = {},
            _a[_common_classes__WEBPACK_IMPORTED_MODULE_4__["DISABLED"]] = this.props.disabled,
            _a[_common_classes__WEBPACK_IMPORTED_MODULE_4__["SLIDER"] + "-unlabeled"] = this.props.labelRenderer === false,
            _a[_common_classes__WEBPACK_IMPORTED_MODULE_4__["VERTICAL"]] = this.props.vertical,
            _a), this.props.className);
        return (react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: classes, onMouseDown: this.maybeHandleTrackClick, onTouchStart: this.maybeHandleTrackTouch },
            react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: _common_classes__WEBPACK_IMPORTED_MODULE_4__["SLIDER"] + "-track", ref: this.refHandlers.track }),
            this.maybeRenderFill(),
            this.maybeRenderAxis(),
            this.renderHandles()));
        var _a;
    };
    CoreSlider.prototype.componentDidMount = function () {
        this.updateTickSize();
    };
    CoreSlider.prototype.componentDidUpdate = function () {
        this.updateTickSize();
    };
    CoreSlider.prototype.componentWillReceiveProps = function (props) {
        _super.prototype.componentWillReceiveProps.call(this, props);
        this.setState({ labelPrecision: this.getLabelPrecision(props) });
    };
    CoreSlider.prototype.formatLabel = function (value) {
        var labelRenderer = this.props.labelRenderer;
        if (labelRenderer === false) {
            return undefined;
        }
        else if (Object(_common_utils__WEBPACK_IMPORTED_MODULE_6__["isFunction"])(labelRenderer)) {
            // TODO: TS 2.7 might have a type narrowing issue?
            return labelRenderer(value);
        }
        else {
            return value.toFixed(this.state.labelPrecision);
        }
    };
    CoreSlider.prototype.validateProps = function (props) {
        if (props.stepSize <= 0) {
            throw new Error(_common_errors__WEBPACK_IMPORTED_MODULE_5__["SLIDER_ZERO_STEP"]);
        }
        if (props.labelStepSize <= 0) {
            throw new Error(_common_errors__WEBPACK_IMPORTED_MODULE_5__["SLIDER_ZERO_LABEL_STEP"]);
        }
    };
    CoreSlider.prototype.getTrackInitialPixel = function () {
        if (this.trackElement == null) {
            return undefined;
        }
        var trackRect = this.trackElement.getBoundingClientRect();
        // for vertical tracks, the initial (lowest-`value`) pixel is on the bottom.
        return this.props.vertical ? trackRect.top + trackRect.height : trackRect.left;
    };
    CoreSlider.prototype.maybeRenderAxis = function () {
        // explicit typedefs are required because tsc (rightly) assumes that props might be overriden with different
        // types in subclasses
        var max = this.props.max;
        var min = this.props.min;
        var labelStepSize = this.props.labelStepSize;
        if (this.props.labelRenderer === false) {
            return undefined;
        }
        var stepSizeRatio = this.state.tickSizeRatio * labelStepSize;
        var labels = [];
        // tslint:disable-next-line:one-variable-per-declaration ban-comma-operator
        for (var i = min, offsetRatio = 0; i < max || Object(_common_utils__WEBPACK_IMPORTED_MODULE_6__["approxEqual"])(i, max); i += labelStepSize, offsetRatio += stepSizeRatio) {
            var offsetPercentage = formatPercentage(offsetRatio);
            var style = this.props.vertical ? { bottom: offsetPercentage } : { left: offsetPercentage };
            labels.push(react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: _common_classes__WEBPACK_IMPORTED_MODULE_4__["SLIDER"] + "-label", key: i, style: style }, this.formatLabel(i)));
        }
        return react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: _common_classes__WEBPACK_IMPORTED_MODULE_4__["SLIDER"] + "-axis" }, labels);
    };
    CoreSlider.prototype.maybeRenderFill = function () {
        if (this.props.showTrackFill && this.trackElement != null) {
            return this.renderFill();
        }
        return undefined;
    };
    CoreSlider.prototype.getLabelPrecision = function (_a) {
        var labelPrecision = _a.labelPrecision, stepSize = _a.stepSize;
        // infer default label precision from stepSize because that's how much the handle moves.
        return labelPrecision == null ? Object(_common_utils__WEBPACK_IMPORTED_MODULE_6__["countDecimalPlaces"])(stepSize) : labelPrecision;
    };
    CoreSlider.prototype.updateTickSize = function () {
        if (this.trackElement != null) {
            var trackSize = this.props.vertical ? this.trackElement.clientHeight : this.trackElement.clientWidth;
            var tickSizeRatio = 1 / (this.props.max - this.props.min);
            var tickSize = trackSize * tickSizeRatio;
            this.setState({ tickSize: tickSize, tickSizeRatio: tickSizeRatio });
        }
    };
    return CoreSlider;
}(_common_abstractPureComponent__WEBPACK_IMPORTED_MODULE_3__["AbstractPureComponent"]));

/** Helper function for formatting ratios as CSS percentage values. */
function formatPercentage(ratio) {
    return (ratio * 100).toFixed(2) + "%";
}


/***/ }),

/***/ "../../node_modules/@blueprintjs/core/lib/esm/components/slider/handle.js":
/*!****************************************************************************************************!*\
  !*** C:/workspace/gitfish/twii/node_modules/@blueprintjs/core/lib/esm/components/slider/handle.js ***!
  \****************************************************************************************************/
/*! exports provided: Handle */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Handle", function() { return Handle; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "../../node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _common_abstractPureComponent__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/abstractPureComponent */ "../../node_modules/@blueprintjs/core/lib/esm/common/abstractPureComponent.js");
/* harmony import */ var _common_classes__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/classes */ "../../node_modules/@blueprintjs/core/lib/esm/common/classes.js");
/* harmony import */ var _common_keys__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/keys */ "../../node_modules/@blueprintjs/core/lib/esm/common/keys.js");
/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ../../common/utils */ "../../node_modules/@blueprintjs/core/lib/esm/common/utils.js");
/* harmony import */ var _coreSlider__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./coreSlider */ "../../node_modules/@blueprintjs/core/lib/esm/components/slider/coreSlider.js");
/*
 * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
 *
 * Licensed under the terms of the LICENSE file distributed with this project.
 */








// props that require number values, for validation
var NUMBER_PROPS = ["max", "min", "stepSize", "tickSize", "value"];
var Handle = /** @class */ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Handle, _super);
    function Handle() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.state = {
            isMoving: false,
        };
        _this.refHandlers = {
            handle: function (el) { return (_this.handleElement = el); },
        };
        _this.beginHandleMovement = function (event) {
            document.addEventListener("mousemove", _this.handleHandleMovement);
            document.addEventListener("mouseup", _this.endHandleMovement);
            _this.setState({ isMoving: true });
            _this.changeValue(_this.clientToValue(_this.mouseEventClientOffset(event)));
        };
        _this.beginHandleTouchMovement = function (event) {
            document.addEventListener("touchmove", _this.handleHandleTouchMovement);
            document.addEventListener("touchend", _this.endHandleTouchMovement);
            document.addEventListener("touchcancel", _this.endHandleTouchMovement);
            _this.setState({ isMoving: true });
            _this.changeValue(_this.clientToValue(_this.touchEventClientOffset(event)));
        };
        _this.endHandleMovement = function (event) {
            _this.handleMoveEndedAt(_this.mouseEventClientOffset(event));
        };
        _this.endHandleTouchMovement = function (event) {
            _this.handleMoveEndedAt(_this.touchEventClientOffset(event));
        };
        _this.handleMoveEndedAt = function (clientPixel) {
            _this.removeDocumentEventListeners();
            _this.setState({ isMoving: false });
            // not using changeValue because we want to invoke the handler regardless of current prop value
            var onRelease = _this.props.onRelease;
            var finalValue = _this.clamp(_this.clientToValue(clientPixel));
            Object(_common_utils__WEBPACK_IMPORTED_MODULE_6__["safeInvoke"])(onRelease, finalValue);
        };
        _this.handleHandleMovement = function (event) {
            _this.handleMovedTo(_this.mouseEventClientOffset(event));
        };
        _this.handleHandleTouchMovement = function (event) {
            _this.handleMovedTo(_this.touchEventClientOffset(event));
        };
        _this.handleMovedTo = function (clientPixel) {
            if (_this.state.isMoving && !_this.props.disabled) {
                _this.changeValue(_this.clientToValue(clientPixel));
            }
        };
        _this.handleKeyDown = function (event) {
            var _a = _this.props, stepSize = _a.stepSize, value = _a.value;
            var which = event.which;
            if (which === _common_keys__WEBPACK_IMPORTED_MODULE_5__["ARROW_DOWN"] || which === _common_keys__WEBPACK_IMPORTED_MODULE_5__["ARROW_LEFT"]) {
                _this.changeValue(value - stepSize);
                // this key event has been handled! prevent browser scroll on up/down
                event.preventDefault();
            }
            else if (which === _common_keys__WEBPACK_IMPORTED_MODULE_5__["ARROW_UP"] || which === _common_keys__WEBPACK_IMPORTED_MODULE_5__["ARROW_RIGHT"]) {
                _this.changeValue(value + stepSize);
                event.preventDefault();
            }
        };
        _this.handleKeyUp = function (event) {
            if ([_common_keys__WEBPACK_IMPORTED_MODULE_5__["ARROW_UP"], _common_keys__WEBPACK_IMPORTED_MODULE_5__["ARROW_DOWN"], _common_keys__WEBPACK_IMPORTED_MODULE_5__["ARROW_LEFT"], _common_keys__WEBPACK_IMPORTED_MODULE_5__["ARROW_RIGHT"]].indexOf(event.which) >= 0) {
                Object(_common_utils__WEBPACK_IMPORTED_MODULE_6__["safeInvoke"])(_this.props.onRelease, _this.props.value);
            }
        };
        return _this;
    }
    Handle.prototype.render = function () {
        var _a = this.props, className = _a.className, disabled = _a.disabled, label = _a.label, min = _a.min, tickSizeRatio = _a.tickSizeRatio, value = _a.value, vertical = _a.vertical;
        var isMoving = this.state.isMoving;
        // The handle midpoint of RangeSlider is actually shifted by a margin to
        // be on the edge of the visible handle element. Because the midpoint
        // calculation does not take this margin into account, we instead
        // measure the long side (which is equal to the short side plus the
        // margin).
        var handleMidpoint = this.getHandleMidpointAndOffset(this.handleElement, true).handleMidpoint;
        var offsetRatio = (value - min) * tickSizeRatio;
        var offsetCalc = "calc(" + Object(_coreSlider__WEBPACK_IMPORTED_MODULE_7__["formatPercentage"])(offsetRatio) + " - " + handleMidpoint + "px)";
        var style = vertical ? { bottom: offsetCalc } : { left: offsetCalc };
        return (react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: classnames__WEBPACK_IMPORTED_MODULE_1___default()(_common_classes__WEBPACK_IMPORTED_MODULE_4__["SLIDER_HANDLE"], (_b = {}, _b[_common_classes__WEBPACK_IMPORTED_MODULE_4__["ACTIVE"]] = isMoving, _b), className), onKeyDown: disabled ? null : this.handleKeyDown, onKeyUp: disabled ? null : this.handleKeyUp, onMouseDown: disabled ? null : this.beginHandleMovement, onTouchStart: disabled ? null : this.beginHandleTouchMovement, ref: this.refHandlers.handle, style: style, tabIndex: 0 }, label == null ? null : react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("span", { className: _common_classes__WEBPACK_IMPORTED_MODULE_4__["SLIDER_LABEL"] }, label)));
        var _b;
    };
    Handle.prototype.componentWillUnmount = function () {
        this.removeDocumentEventListeners();
    };
    /** Convert client pixel to value between min and max. */
    Handle.prototype.clientToValue = function (clientPixel) {
        var _a = this.props, stepSize = _a.stepSize, tickSize = _a.tickSize, value = _a.value, vertical = _a.vertical;
        if (this.handleElement == null) {
            return value;
        }
        // #1769: this logic doesn't work perfectly when the tick size is
        // smaller than the handle size; it may be off by a tick or two.
        var clientPixelNormalized = vertical ? window.innerHeight - clientPixel : clientPixel;
        var handleCenterPixel = this.getHandleElementCenterPixel(this.handleElement);
        var pixelDelta = clientPixelNormalized - handleCenterPixel;
        // convert pixels to range value in increments of `stepSize`
        var valueDelta = Math.round(pixelDelta / (tickSize * stepSize)) * stepSize;
        return value + valueDelta;
    };
    Handle.prototype.mouseEventClientOffset = function (event) {
        return this.props.vertical ? event.clientY : event.clientX;
    };
    Handle.prototype.touchEventClientOffset = function (event) {
        var touch = event.changedTouches[0];
        return this.props.vertical ? touch.clientY : touch.clientX;
    };
    Handle.prototype.validateProps = function (props) {
        for (var _i = 0, NUMBER_PROPS_1 = NUMBER_PROPS; _i < NUMBER_PROPS_1.length; _i++) {
            var prop = NUMBER_PROPS_1[_i];
            if (typeof props[prop] !== "number") {
                throw new Error("[Blueprint] <Handle> requires number value for " + prop + " prop");
            }
        }
    };
    /** Clamp value and invoke callback if it differs from current value */
    Handle.prototype.changeValue = function (newValue, callback) {
        if (callback === void 0) { callback = this.props.onChange; }
        newValue = this.clamp(newValue);
        if (!isNaN(newValue) && this.props.value !== newValue) {
            Object(_common_utils__WEBPACK_IMPORTED_MODULE_6__["safeInvoke"])(callback, newValue);
        }
    };
    /** Clamp value between min and max props */
    Handle.prototype.clamp = function (value) {
        return Object(_common_utils__WEBPACK_IMPORTED_MODULE_6__["clamp"])(value, this.props.min, this.props.max);
    };
    Handle.prototype.getHandleElementCenterPixel = function (handleElement) {
        var _a = this.getHandleMidpointAndOffset(handleElement), handleMidpoint = _a.handleMidpoint, handleOffset = _a.handleOffset;
        return handleOffset + handleMidpoint;
    };
    Handle.prototype.getHandleMidpointAndOffset = function (handleElement, useOppositeDimension) {
        if (useOppositeDimension === void 0) { useOppositeDimension = false; }
        if (handleElement == null) {
            return { handleMidpoint: 0, handleOffset: 0 };
        }
        var vertical = this.props.vertical;
        // getBoundingClientRect().height includes border size; clientHeight does not.
        var handleRect = handleElement.getBoundingClientRect();
        var sizeKey = vertical
            ? useOppositeDimension ? "width" : "height"
            : useOppositeDimension ? "height" : "width";
        // "bottom" value seems to be consistently incorrect, so explicitly
        // calculate it using the window offset instead.
        var handleOffset = vertical ? window.innerHeight - (handleRect.top + handleRect[sizeKey]) : handleRect.left;
        return { handleMidpoint: handleRect[sizeKey] / 2, handleOffset: handleOffset };
    };
    Handle.prototype.removeDocumentEventListeners = function () {
        document.removeEventListener("mousemove", this.handleHandleMovement);
        document.removeEventListener("mouseup", this.endHandleMovement);
        document.removeEventListener("touchmove", this.handleHandleTouchMovement);
        document.removeEventListener("touchend", this.endHandleTouchMovement);
        document.removeEventListener("touchcancel", this.endHandleTouchMovement);
    };
    Handle.displayName = "Blueprint2.SliderHandle";
    return Handle;
}(_common_abstractPureComponent__WEBPACK_IMPORTED_MODULE_3__["AbstractPureComponent"]));



/***/ }),

/***/ "../../node_modules/@blueprintjs/core/lib/esm/components/slider/rangeSlider.js":
/*!*********************************************************************************************************!*\
  !*** C:/workspace/gitfish/twii/node_modules/@blueprintjs/core/lib/esm/components/slider/rangeSlider.js ***!
  \*********************************************************************************************************/
/*! exports provided: RangeSlider */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "RangeSlider", function() { return RangeSlider; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! classnames */ "../../node_modules/classnames/index.js");
/* harmony import */ var classnames__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(classnames__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_2__);
/* harmony import */ var _common_classes__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/classes */ "../../node_modules/@blueprintjs/core/lib/esm/common/classes.js");
/* harmony import */ var _common_errors__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../../common/errors */ "../../node_modules/@blueprintjs/core/lib/esm/common/errors.js");
/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ../../common/utils */ "../../node_modules/@blueprintjs/core/lib/esm/common/utils.js");
/* harmony import */ var _coreSlider__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./coreSlider */ "../../node_modules/@blueprintjs/core/lib/esm/components/slider/coreSlider.js");
/* harmony import */ var _handle__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ./handle */ "../../node_modules/@blueprintjs/core/lib/esm/components/slider/handle.js");
/*
 * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
 *
 * Licensed under the terms of the LICENSE file distributed with this project.
 */








var RangeIndex;
(function (RangeIndex) {
    RangeIndex[RangeIndex["START"] = 0] = "START";
    RangeIndex[RangeIndex["END"] = 1] = "END";
})(RangeIndex || (RangeIndex = {}));
var RangeSlider = /** @class */ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](RangeSlider, _super);
    function RangeSlider() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.className = classnames__WEBPACK_IMPORTED_MODULE_1___default()(_common_classes__WEBPACK_IMPORTED_MODULE_3__["SLIDER"], _common_classes__WEBPACK_IMPORTED_MODULE_3__["RANGE_SLIDER"]);
        _this.handles = [];
        _this.addHandleRef = function (ref) {
            if (ref != null) {
                _this.handles.push(ref);
            }
        };
        _this.getHandlerForIndex = function (index, callback) { return function (newValue) {
            if (Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["isFunction"])(callback)) {
                var _a = _this.props.value, startValue = _a[0], endValue = _a[1];
                if (index === RangeIndex.START) {
                    callback([Math.min(newValue, endValue), endValue]);
                }
                else {
                    callback([startValue, Math.max(newValue, startValue)]);
                }
            }
        }; };
        _this.handleChange = function (newValue) {
            var _a = _this.props.value, startValue = _a[0], endValue = _a[1];
            var newStartValue = newValue[0], newEndValue = newValue[1];
            if ((startValue !== newStartValue || endValue !== newEndValue) && Object(_common_utils__WEBPACK_IMPORTED_MODULE_5__["isFunction"])(_this.props.onChange)) {
                _this.props.onChange(newValue);
            }
        };
        return _this;
    }
    RangeSlider.prototype.renderFill = function () {
        var tickSizeRatio = this.state.tickSizeRatio;
        var _a = this.props.value, startValue = _a[0], endValue = _a[1];
        if (startValue === endValue) {
            return undefined;
        }
        var offsetRatio = (startValue - this.props.min) * tickSizeRatio;
        var sizeRatio = (endValue - startValue) * tickSizeRatio;
        if (sizeRatio < 0) {
            offsetRatio += sizeRatio;
            sizeRatio = Math.abs(sizeRatio);
        }
        // expand by 1px in each direction so it sits under the handle border
        var offsetCalc = "calc(" + Object(_coreSlider__WEBPACK_IMPORTED_MODULE_6__["formatPercentage"])(offsetRatio) + " - 1px)";
        var sizeCalc = "calc(" + Object(_coreSlider__WEBPACK_IMPORTED_MODULE_6__["formatPercentage"])(sizeRatio) + " + 2px)";
        var style = this.props.vertical
            ? { bottom: offsetCalc, height: sizeCalc }
            : { left: offsetCalc, width: sizeCalc };
        return react__WEBPACK_IMPORTED_MODULE_2__["createElement"]("div", { className: _common_classes__WEBPACK_IMPORTED_MODULE_3__["SLIDER"] + "-progress", style: style });
    };
    RangeSlider.prototype.renderHandles = function () {
        var _this = this;
        var _a = this.props, disabled = _a.disabled, max = _a.max, min = _a.min, onRelease = _a.onRelease, stepSize = _a.stepSize, value = _a.value, vertical = _a.vertical;
        return value.map(function (val, index) { return (react__WEBPACK_IMPORTED_MODULE_2__["createElement"](_handle__WEBPACK_IMPORTED_MODULE_7__["Handle"], { disabled: disabled, key: index, label: _this.formatLabel(val), max: max, min: min, onChange: _this.getHandlerForIndex(index, _this.handleChange), onRelease: _this.getHandlerForIndex(index, onRelease), ref: _this.addHandleRef, stepSize: stepSize, tickSize: _this.state.tickSize, tickSizeRatio: _this.state.tickSizeRatio, value: val, vertical: vertical })); });
    };
    RangeSlider.prototype.handleTrackClick = function (event) {
        var _this = this;
        this.handles
            .reduce(function (min, handle) {
            // find closest handle to the mouse position
            var offset = handle.mouseEventClientOffset(event);
            var value = handle.clientToValue(offset);
            return _this.nearestHandleForValue(value, min, handle);
        })
            .beginHandleMovement(event);
    };
    RangeSlider.prototype.handleTrackTouch = function (event) {
        var _this = this;
        this.handles
            .reduce(function (min, handle) {
            // find closest handle to the touch position
            var value = handle.clientToValue(handle.touchEventClientOffset(event));
            return _this.nearestHandleForValue(value, min, handle);
        })
            .beginHandleTouchMovement(event);
    };
    RangeSlider.prototype.nearestHandleForValue = function (value, firstHandle, secondHandle) {
        var firstHandleValue = firstHandle.props.value;
        var firstDistance = Math.abs(value - firstHandleValue);
        var secondDistance = Math.abs(value - secondHandle.props.value);
        if (firstDistance < secondDistance) {
            return firstHandle;
        }
        else if (secondDistance < firstDistance) {
            return secondHandle;
        }
        else {
            // if the values are equal, return the handle that is *able* to move
            // in the necessary direction.
            return value < firstHandleValue ? firstHandle : secondHandle;
        }
    };
    RangeSlider.prototype.validateProps = function (props) {
        var value = props.value;
        if (value == null || value[RangeIndex.START] == null || value[RangeIndex.END] == null) {
            throw new Error(_common_errors__WEBPACK_IMPORTED_MODULE_4__["RANGESLIDER_NULL_VALUE"]);
        }
    };
    RangeSlider.defaultProps = {
        disabled: false,
        labelStepSize: 1,
        max: 10,
        min: 0,
        showTrackFill: true,
        stepSize: 1,
        value: [0, 10],
        vertical: false,
    };
    RangeSlider.displayName = "Blueprint2.RangeSlider";
    return RangeSlider;
}(_coreSlider__WEBPACK_IMPORTED_MODULE_6__["CoreSlider"]));



/***/ }),

/***/ "../../node_modules/@blueprintjs/core/lib/esm/components/slider/slider.js":
/*!****************************************************************************************************!*\
  !*** C:/workspace/gitfish/twii/node_modules/@blueprintjs/core/lib/esm/components/slider/slider.js ***!
  \****************************************************************************************************/
/*! exports provided: Slider */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "Slider", function() { return Slider; });
/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! tslib */ "../../node_modules/tslib/tslib.es6.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_1__);
/* harmony import */ var _common_classes__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../../common/classes */ "../../node_modules/@blueprintjs/core/lib/esm/common/classes.js");
/* harmony import */ var _common_utils__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../../common/utils */ "../../node_modules/@blueprintjs/core/lib/esm/common/utils.js");
/* harmony import */ var _coreSlider__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./coreSlider */ "../../node_modules/@blueprintjs/core/lib/esm/components/slider/coreSlider.js");
/* harmony import */ var _handle__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./handle */ "../../node_modules/@blueprintjs/core/lib/esm/components/slider/handle.js");
/*
 * Copyright 2016 Palantir Technologies, Inc. All rights reserved.
 *
 * Licensed under the terms of the LICENSE file distributed with this project.
 */






var Slider = /** @class */ (function (_super) {
    tslib__WEBPACK_IMPORTED_MODULE_0__["__extends"](Slider, _super);
    function Slider() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        // tslint:enable member-ordering
        _this.handleHandleRef = function (ref) {
            _this.handle = ref;
        };
        return _this;
    }
    Slider.prototype.renderFill = function () {
        var tickSizeRatio = this.state.tickSizeRatio;
        var initialValue = Object(_common_utils__WEBPACK_IMPORTED_MODULE_3__["clamp"])(this.props.initialValue, this.props.min, this.props.max);
        var offsetRatio = (initialValue - this.props.min) * tickSizeRatio;
        var sizeRatio = (this.props.value - initialValue) * tickSizeRatio;
        if (sizeRatio < 0) {
            offsetRatio += sizeRatio;
            sizeRatio = Math.abs(sizeRatio);
        }
        var offsetPercentage = Object(_coreSlider__WEBPACK_IMPORTED_MODULE_4__["formatPercentage"])(offsetRatio);
        var sizePercentage = Object(_coreSlider__WEBPACK_IMPORTED_MODULE_4__["formatPercentage"])(sizeRatio);
        var style = this.props.vertical
            ? { bottom: offsetPercentage, height: sizePercentage }
            : { left: offsetPercentage, width: sizePercentage };
        return react__WEBPACK_IMPORTED_MODULE_1__["createElement"]("div", { className: _common_classes__WEBPACK_IMPORTED_MODULE_2__["SLIDER"] + "-progress", style: style });
    };
    Slider.prototype.renderHandles = function () {
        // make sure to *not* pass this.props.className to handle
        return (react__WEBPACK_IMPORTED_MODULE_1__["createElement"](_handle__WEBPACK_IMPORTED_MODULE_5__["Handle"], tslib__WEBPACK_IMPORTED_MODULE_0__["__assign"]({}, this.props, this.state, { className: "", label: this.formatLabel(this.props.value), ref: this.handleHandleRef })));
    };
    Slider.prototype.handleTrackClick = function (event) {
        if (this.handle != null) {
            this.handle.beginHandleMovement(event);
        }
    };
    Slider.prototype.handleTrackTouch = function (event) {
        if (this.handle != null) {
            this.handle.beginHandleTouchMovement(event);
        }
    };
    Slider.defaultProps = {
        disabled: false,
        initialValue: 0,
        labelStepSize: 1,
        max: 10,
        min: 0,
        showTrackFill: true,
        stepSize: 1,
        value: 0,
        vertical: false,
    };
    return Slider;
}(_coreSlider__WEBPACK_IMPORTED_MODULE_4__["CoreSlider"]));



/***/ }),

/***/ "../blueprint-samples/lib/component/SliderSamples.js":
/*!***********************************************************!*\
  !*** ../blueprint-samples/lib/component/SliderSamples.js ***!
  \***********************************************************/
/*! exports provided: SliderSamples, default */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
__webpack_require__.r(__webpack_exports__);
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "SliderSamples", function() { return SliderSamples; });
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "default", function() { return SliderSamples; });
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "../../node_modules/react/index.js");
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
/* harmony import */ var _blueprintjs_core_lib_esm_components_slider_slider__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @blueprintjs/core/lib/esm/components/slider/slider */ "../../node_modules/@blueprintjs/core/lib/esm/components/slider/slider.js");
/* harmony import */ var _blueprintjs_core_lib_esm_components_slider_rangeSlider__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @blueprintjs/core/lib/esm/components/slider/rangeSlider */ "../../node_modules/@blueprintjs/core/lib/esm/components/slider/rangeSlider.js");
var __extends = (undefined && undefined.__extends) || (function () {
    var extendStatics = Object.setPrototypeOf ||
        ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
        function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
    return function (d, b) {
        extendStatics(d, b);
        function __() { this.constructor = d; }
        d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
    };
})();



var SliderSamples = /** @class */ (function (_super) {
    __extends(SliderSamples, _super);
    function SliderSamples() {
        return _super !== null && _super.apply(this, arguments) || this;
    }
    SliderSamples.prototype.render = function () {
        return (react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", null,
            react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: { padding: 16 } },
                react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_blueprintjs_core_lib_esm_components_slider_slider__WEBPACK_IMPORTED_MODULE_1__["Slider"], null)),
            react__WEBPACK_IMPORTED_MODULE_0__["createElement"]("div", { style: { padding: 16 } },
                react__WEBPACK_IMPORTED_MODULE_0__["createElement"](_blueprintjs_core_lib_esm_components_slider_rangeSlider__WEBPACK_IMPORTED_MODULE_2__["RangeSlider"], { value: [3, 8] }))));
    };
    return SliderSamples;
}(react__WEBPACK_IMPORTED_MODULE_0__["Component"]));



/***/ })

}]);
//# sourceMappingURL=19.js.map