import { __exports as T } from "../../../../../../_virtual/slider.js";
import z from "react";
import { __require as C } from "./inner-slider.js";
import { __require as J } from "../../../../json2mq@0.2.0/node_modules/json2mq/index.js";
import { __require as Q } from "./default-props.js";
import { __require as F } from "./utils/innerSliderUtils.js";
import { __require as L } from "../../../../enquire.js@2.1.6/node_modules/enquire.js/src/index.js";
var M;
function ne() {
  return M ? T : (M = 1, function(g) {
    Object.defineProperty(g, "__esModule", {
      value: !0
    }), g.default = void 0;
    var l = S(z), U = C(), w = S(J()), j = S(Q()), _ = F();
    function S(r) {
      return r && r.__esModule ? r : { default: r };
    }
    function h(r) {
      "@babel/helpers - typeof";
      return h = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
        return typeof e;
      } : function(e) {
        return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
      }, h(r);
    }
    function P() {
      return P = Object.assign ? Object.assign.bind() : function(r) {
        for (var e = 1; e < arguments.length; e++) {
          var o = arguments[e];
          for (var n in o)
            Object.prototype.hasOwnProperty.call(o, n) && (r[n] = o[n]);
        }
        return r;
      }, P.apply(this, arguments);
    }
    function R(r, e) {
      var o = Object.keys(r);
      if (Object.getOwnPropertySymbols) {
        var n = Object.getOwnPropertySymbols(r);
        e && (n = n.filter(function(i) {
          return Object.getOwnPropertyDescriptor(r, i).enumerable;
        })), o.push.apply(o, n);
      }
      return o;
    }
    function m(r) {
      for (var e = 1; e < arguments.length; e++) {
        var o = arguments[e] != null ? arguments[e] : {};
        e % 2 ? R(Object(o), !0).forEach(function(n) {
          f(r, n, o[n]);
        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(r, Object.getOwnPropertyDescriptors(o)) : R(Object(o)).forEach(function(n) {
          Object.defineProperty(r, n, Object.getOwnPropertyDescriptor(o, n));
        });
      }
      return r;
    }
    function x(r, e) {
      if (!(r instanceof e))
        throw new TypeError("Cannot call a class as a function");
    }
    function I(r, e) {
      for (var o = 0; o < e.length; o++) {
        var n = e[o];
        n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(r, D(n.key), n);
      }
    }
    function H(r, e, o) {
      return e && I(r.prototype, e), Object.defineProperty(r, "prototype", { writable: !1 }), r;
    }
    function V(r, e) {
      if (typeof e != "function" && e !== null)
        throw new TypeError("Super expression must either be null or a function");
      r.prototype = Object.create(e && e.prototype, { constructor: { value: r, writable: !0, configurable: !0 } }), Object.defineProperty(r, "prototype", { writable: !1 }), e && q(r, e);
    }
    function q(r, e) {
      return q = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(n, i) {
        return n.__proto__ = i, n;
      }, q(r, e);
    }
    function A(r) {
      var e = k();
      return function() {
        var n = O(r), i;
        if (e) {
          var t = O(this).constructor;
          i = Reflect.construct(n, arguments, t);
        } else
          i = n.apply(this, arguments);
        return B(this, i);
      };
    }
    function B(r, e) {
      if (e && (h(e) === "object" || typeof e == "function"))
        return e;
      if (e !== void 0)
        throw new TypeError("Derived constructors may only return object or undefined");
      return c(r);
    }
    function c(r) {
      if (r === void 0)
        throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
      return r;
    }
    function k() {
      try {
        var r = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function() {
        }));
      } catch {
      }
      return (k = function() {
        return !!r;
      })();
    }
    function O(r) {
      return O = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function(o) {
        return o.__proto__ || Object.getPrototypeOf(o);
      }, O(r);
    }
    function f(r, e, o) {
      return e = D(e), e in r ? Object.defineProperty(r, e, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : r[e] = o, r;
    }
    function D(r) {
      var e = G(r, "string");
      return h(e) == "symbol" ? e : String(e);
    }
    function G(r, e) {
      if (h(r) != "object" || !r) return r;
      var o = r[Symbol.toPrimitive];
      if (o !== void 0) {
        var n = o.call(r, e);
        if (h(n) != "object") return n;
        throw new TypeError("@@toPrimitive must return a primitive value.");
      }
      return (e === "string" ? String : Number)(r);
    }
    var N = (0, _.canUseDOM)() && L();
    g.default = /* @__PURE__ */ function(r) {
      V(o, r);
      var e = A(o);
      function o(n) {
        var i;
        return x(this, o), i = e.call(this, n), f(c(i), "innerSliderRefHandler", function(t) {
          return i.innerSlider = t;
        }), f(c(i), "slickPrev", function() {
          return i.innerSlider.slickPrev();
        }), f(c(i), "slickNext", function() {
          return i.innerSlider.slickNext();
        }), f(c(i), "slickGoTo", function(t) {
          var d = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : !1;
          return i.innerSlider.slickGoTo(t, d);
        }), f(c(i), "slickPause", function() {
          return i.innerSlider.pause("paused");
        }), f(c(i), "slickPlay", function() {
          return i.innerSlider.autoPlay("play");
        }), i.state = {
          breakpoint: null
        }, i._responsiveMediaHandlers = [], i;
      }
      return H(o, [{
        key: "media",
        value: function(i, t) {
          N.register(i, t), this._responsiveMediaHandlers.push({
            query: i,
            handler: t
          });
        }
        // handles responsive breakpoints
      }, {
        key: "componentDidMount",
        value: function() {
          var i = this;
          if (this.props.responsive) {
            var t = this.props.responsive.map(function(s) {
              return s.breakpoint;
            });
            t.sort(function(s, u) {
              return s - u;
            }), t.forEach(function(s, u) {
              var y;
              u === 0 ? y = (0, w.default)({
                minWidth: 0,
                maxWidth: s
              }) : y = (0, w.default)({
                minWidth: t[u - 1] + 1,
                maxWidth: s
              }), (0, _.canUseDOM)() && i.media(y, function() {
                i.setState({
                  breakpoint: s
                });
              });
            });
            var d = (0, w.default)({
              minWidth: t.slice(-1)[0]
            });
            (0, _.canUseDOM)() && this.media(d, function() {
              i.setState({
                breakpoint: null
              });
            });
          }
        }
      }, {
        key: "componentWillUnmount",
        value: function() {
          this._responsiveMediaHandlers.forEach(function(i) {
            N.unregister(i.query, i.handler);
          });
        }
      }, {
        key: "render",
        value: function() {
          var i = this, t, d;
          this.state.breakpoint ? (d = this.props.responsive.filter(function(b) {
            return b.breakpoint === i.state.breakpoint;
          }), t = d[0].settings === "unslick" ? "unslick" : m(m(m({}, j.default), this.props), d[0].settings)) : t = m(m({}, j.default), this.props), t.centerMode && (t.slidesToScroll > 1 && process.env.NODE_ENV !== "production" && console.warn("slidesToScroll should be equal to 1 in centerMode, you are using ".concat(t.slidesToScroll)), t.slidesToScroll = 1), t.fade && (t.slidesToShow > 1 && process.env.NODE_ENV !== "production" && console.warn("slidesToShow should be equal to 1 when fade is true, you're using ".concat(t.slidesToShow)), t.slidesToScroll > 1 && process.env.NODE_ENV !== "production" && console.warn("slidesToScroll should be equal to 1 when fade is true, you're using ".concat(t.slidesToScroll)), t.slidesToShow = 1, t.slidesToScroll = 1);
          var s = l.default.Children.toArray(this.props.children);
          s = s.filter(function(b) {
            return typeof b == "string" ? !!b.trim() : !!b;
          }), t.variableWidth && (t.rows > 1 || t.slidesPerRow > 1) && (console.warn("variableWidth is not supported in case of rows > 1 or slidesPerRow > 1"), t.variableWidth = !1);
          for (var u = [], y = null, a = 0; a < s.length; a += t.rows * t.slidesPerRow) {
            for (var E = [], v = a; v < a + t.rows * t.slidesPerRow; v += t.slidesPerRow) {
              for (var W = [], p = v; p < v + t.slidesPerRow && (t.variableWidth && s[p].props.style && (y = s[p].props.style.width), !(p >= s.length)); p += 1)
                W.push(/* @__PURE__ */ l.default.cloneElement(s[p], {
                  key: 100 * a + 10 * v + p,
                  tabIndex: -1,
                  style: {
                    width: "".concat(100 / t.slidesPerRow, "%"),
                    display: "inline-block"
                  }
                }));
              E.push(/* @__PURE__ */ l.default.createElement("div", {
                key: 10 * a + v
              }, W));
            }
            t.variableWidth ? u.push(/* @__PURE__ */ l.default.createElement("div", {
              key: a,
              style: {
                width: y
              }
            }, E)) : u.push(/* @__PURE__ */ l.default.createElement("div", {
              key: a
            }, E));
          }
          if (t === "unslick") {
            var K = "regular slider " + (this.props.className || "");
            return /* @__PURE__ */ l.default.createElement("div", {
              className: K
            }, s);
          } else u.length <= t.slidesToShow && !t.infinite && (t.unslick = !0);
          return /* @__PURE__ */ l.default.createElement(U.InnerSlider, P({
            style: this.props.style,
            ref: this.innerSliderRefHandler
          }, (0, _.filterSettings)(t)), u);
        }
      }]), o;
    }(l.default.Component);
  }(T), T);
}
export {
  ne as __require
};
//# sourceMappingURL=slider.js.map
