Liferay.Loader.define("frontend-image-editor-web@4.0.37/ContrastSlider.soy", ['module', 'exports', 'require', 'frontend-js-metal-web$metal-component', 'frontend-js-metal-web$metal-soy'], function (module, exports, require) {
  var define = undefined;
  var global = window;
  {
    Object.defineProperty(exports, "__esModule", {
      value: true
    });
    exports.default = exports.templates = exports.ContrastSlider = void 0;

    var _metalComponent = _interopRequireDefault(require("frontend-js-metal-web$metal-component"));

    var _metalSoy = _interopRequireDefault(require("frontend-js-metal-web$metal-soy"));

    function _interopRequireDefault(obj) {
      return obj && obj.__esModule ? obj : { default: obj };
    }

    function _typeof(obj) {
      "@babel/helpers - typeof";
      if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
        _typeof = function _typeof(obj) {
          return typeof obj;
        };
      } else {
        _typeof = function _typeof(obj) {
          return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
        };
      }return _typeof(obj);
    }

    function _classCallCheck(instance, Constructor) {
      if (!(instance instanceof Constructor)) {
        throw new TypeError("Cannot call a class as a function");
      }
    }

    function _possibleConstructorReturn(self, call) {
      if (call && (_typeof(call) === "object" || typeof call === "function")) {
        return call;
      }return _assertThisInitialized(self);
    }

    function _assertThisInitialized(self) {
      if (self === void 0) {
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      }return self;
    }

    function _getPrototypeOf(o) {
      _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
        return o.__proto__ || Object.getPrototypeOf(o);
      };return _getPrototypeOf(o);
    }

    function _inherits(subClass, superClass) {
      if (typeof superClass !== "function" && superClass !== null) {
        throw new TypeError("Super expression must either be null or a function");
      }subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } });if (superClass) _setPrototypeOf(subClass, superClass);
    }

    function _setPrototypeOf(o, p) {
      _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
        o.__proto__ = p;return o;
      };return _setPrototypeOf(o, p);
    }

    var templates;
    exports.templates = templates;
    goog.loadModule(function (exports) {
      var soy = goog.require('soy');

      goog.require('soydata');

      // This file was automatically generated from ContrastSlider.soy.
      // Please don't edit this file by hand.

      /**
       * @fileoverview Templates in namespace ContrastSlider.
       * @public
       */

      goog.module('ContrastSlider.incrementaldom');

      goog.require('goog.soy.data.SanitizedContent');

      var incrementalDom = goog.require('incrementaldom');

      goog.require('soy.asserts');

      var soyIdom = goog.require('soy.idom');
      /**
       * @param {{
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  inputName: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  max: (null|number|undefined),
       *  min: (null|number|undefined),
       *  value: (null|number|undefined)
       * }} opt_data
       * @param {Object<string, *>=} opt_ijData
       * @param {Object<string, *>=} opt_ijData_deprecated
       * @return {void}
       * @suppress {checkTypes}
       */

      function $render(opt_data, opt_ijData, opt_ijData_deprecated) {
        opt_ijData = opt_ijData_deprecated || opt_ijData;
        var $$temp;
        opt_data = opt_data || {};
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */

        var elementClasses = soy.asserts.assertType(opt_data.elementClasses == null || goog.isString(opt_data.elementClasses) || opt_data.elementClasses instanceof goog.soy.data.SanitizedContent, 'elementClasses', opt_data.elementClasses, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {!goog.soy.data.SanitizedContent|null|string|undefined} */

        var inputName = soy.asserts.assertType(opt_data.inputName == null || goog.isString(opt_data.inputName) || opt_data.inputName instanceof goog.soy.data.SanitizedContent, 'inputName', opt_data.inputName, '!goog.soy.data.SanitizedContent|null|string|undefined');
        /** @type {null|number|undefined} */

        var max = soy.asserts.assertType(opt_data.max == null || goog.isNumber(opt_data.max), 'max', opt_data.max, 'null|number|undefined');
        /** @type {null|number|undefined} */

        var min = soy.asserts.assertType(opt_data.min == null || goog.isNumber(opt_data.min), 'min', opt_data.min, 'null|number|undefined');
        /** @type {null|number|undefined} */

        var value = soy.asserts.assertType(opt_data.value == null || goog.isNumber(opt_data.value), 'value', opt_data.value, 'null|number|undefined');
        var maxNumber__soy272 = ($$temp = max) == null ? 100 : $$temp;
        var minNumber__soy274 = ($$temp = min) == null ? 0 : $$temp;
        var valueNumber__soy276 = ($$temp = value) == null ? 0 : $$temp;
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'slider ' + (($$temp = elementClasses) == null ? '' : $$temp));
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('input');
        incrementalDom.attr('name', ($$temp = inputName) == null ? '' : $$temp);
        incrementalDom.attr('type', 'hidden');
        incrementalDom.attr('value', valueNumber__soy276);
        incrementalDom.elementOpenEnd();
        incrementalDom.elementClose('input');
        incrementalDom.elementOpen('span');
        soyIdom.print(valueNumber__soy276);
        incrementalDom.elementClose('span');
        var percentage__soy286 = 100 * (valueNumber__soy276 - minNumber__soy274) / (maxNumber__soy272 - minNumber__soy274) + '%';
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'rail');
        incrementalDom.attr('data-onclick', 'onRailClick_');
        incrementalDom.attr('ref', 'rail');
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'rail-active');
        incrementalDom.attr('style', 'width: ' + percentage__soy286);
        incrementalDom.elementOpenEnd();
        incrementalDom.elementClose('div');
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'rail-handle');
        incrementalDom.attr('style', 'left: ' + percentage__soy286);
        incrementalDom.elementOpenEnd();
        incrementalDom.elementOpenStart('div');
        incrementalDom.attr('class', 'handle');
        incrementalDom.attr('ref', 'handle');
        incrementalDom.attr('tabindex', '0');
        incrementalDom.attr('role', 'slider');
        incrementalDom.attr('aria-valuemin', minNumber__soy274);
        incrementalDom.attr('aria-valuemax', maxNumber__soy272);
        incrementalDom.attr('aria-valuenow', valueNumber__soy276);
        incrementalDom.elementOpenEnd();
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
        incrementalDom.elementClose('div');
      }

      exports.render = $render;
      /**
       * @typedef {{
       *  elementClasses: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  inputName: (!goog.soy.data.SanitizedContent|null|string|undefined),
       *  max: (null|number|undefined),
       *  min: (null|number|undefined),
       *  value: (null|number|undefined)
       * }}
       */

      $render.Params;

      if (goog.DEBUG) {
        $render.soyTemplateName = 'ContrastSlider.render';
      }

      exports.render.params = ["elementClasses", "inputName", "max", "min", "value"];
      exports.render.types = {
        "elementClasses": "string",
        "inputName": "string",
        "max": "int",
        "min": "int",
        "value": "int"
      };
      exports.templates = templates = exports;
      return exports;
    });

    var ContrastSlider = /*#__PURE__*/function (_Component) {
      _inherits(ContrastSlider, _Component);

      function ContrastSlider() {
        _classCallCheck(this, ContrastSlider);

        return _possibleConstructorReturn(this, _getPrototypeOf(ContrastSlider).apply(this, arguments));
      }

      return ContrastSlider;
    }(_metalComponent.default);

    exports.ContrastSlider = ContrastSlider;

    _metalSoy.default.register(ContrastSlider, templates);

    var _default = templates;
    /* jshint ignore:end */

    exports.default = _default;
    //# sourceMappingURL=ContrastSlider.soy.js.map
  }
});
//# sourceMappingURL=ContrastSlider.soy.js.map