var __defProp = Object.defineProperty;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __hasOwnProp = Object.prototype.hasOwnProperty;
var __propIsEnum = Object.prototype.propertyIsEnumerable;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __spreadValues = (a, b) => {
  for (var prop in b || (b = {}))
    if (__hasOwnProp.call(b, prop))
      __defNormalProp(a, prop, b[prop]);
  if (__getOwnPropSymbols)
    for (var prop of __getOwnPropSymbols(b)) {
      if (__propIsEnum.call(b, prop))
        __defNormalProp(a, prop, b[prop]);
    }
  return a;
};
import { n as normalizeComponent, l as lodash, bb as isVideoTemplet, bn as compatibleVideoAndMask } from "./index.js";
import { b as bemMixin } from "./bem.js";
import apiService from "./api-service.js";
import { R as RangeSlider, c as ceil_1 } from "./vue-slider-component.umd.min.js";
import "vue";
let Zepto;
(function(global, factory) {
  if (typeof define === "function" && define.amd) {
    define(function() {
      return factory(global);
    });
  } else {
    factory(global);
  }
})(window, function(window2) {
  Zepto = function() {
    var undefined$1;
    var key;
    var $2;
    var classList;
    var emptyArray = [];
    var concat = emptyArray.concat;
    var filter = emptyArray.filter;
    var slice = emptyArray.slice;
    var document2 = window2.document;
    var elementDisplay = {};
    var classCache = {};
    var cssNumber = {
      "column-count": 1,
      columns: 1,
      "font-weight": 1,
      "line-height": 1,
      opacity: 1,
      "z-index": 1,
      zoom: 1
    };
    var fragmentRE = /^\s*<(\w+|!)[^>]*>/;
    var singleTagRE = /^<(\w+)\s*\/?>(?:<\/\1>|)$/;
    var tagExpanderRE = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi;
    var rootNodeRE = /^(?:body|html)$/i;
    var capitalRE = /([A-Z])/g;
    var methodAttributes = ["val", "css", "html", "text", "data", "width", "height", "offset"];
    var adjacencyOperators = ["after", "prepend", "before", "append"];
    var table = document2.createElement("table");
    var tableRow = document2.createElement("tr");
    var containers = {
      tr: document2.createElement("tbody"),
      tbody: table,
      thead: table,
      tfoot: table,
      td: tableRow,
      th: tableRow,
      "*": document2.createElement("div")
    };
    var readyRE = /complete|loaded|interactive/;
    var simpleSelectorRE = /^[\w-]*$/;
    var class2type = {};
    var toString = class2type.toString;
    var zepto = {};
    var camelize;
    var uniq;
    var tempParent = document2.createElement("div");
    var propMap = {
      tabindex: "tabIndex",
      readonly: "readOnly",
      for: "htmlFor",
      class: "className",
      maxlength: "maxLength",
      cellspacing: "cellSpacing",
      cellpadding: "cellPadding",
      rowspan: "rowSpan",
      colspan: "colSpan",
      usemap: "useMap",
      frameborder: "frameBorder",
      contenteditable: "contentEditable"
    };
    var isArray = Array.isArray || function(object) {
      return object instanceof Array;
    };
    zepto.matches = function(element, selector) {
      if (!selector || !element || element.nodeType !== 1)
        return false;
      var matchesSelector = element.matches || element.webkitMatchesSelector || element.mozMatchesSelector || element.oMatchesSelector || element.matchesSelector;
      if (matchesSelector)
        return matchesSelector.call(element, selector);
      var match;
      var parent = element.parentNode;
      var temp = !parent;
      if (temp)
        (parent = tempParent).appendChild(element);
      match = ~zepto.qsa(parent, selector).indexOf(element);
      temp && tempParent.removeChild(element);
      return match;
    };
    function type(obj) {
      return obj == null ? String(obj) : class2type[toString.call(obj)] || "object";
    }
    function isFunction(value) {
      return type(value) == "function";
    }
    function isWindow(obj) {
      return obj != null && obj == obj.window;
    }
    function isDocument(obj) {
      return obj != null && obj.nodeType == obj.DOCUMENT_NODE;
    }
    function isObject(obj) {
      return type(obj) == "object";
    }
    function isPlainObject(obj) {
      return isObject(obj) && !isWindow(obj) && Object.getPrototypeOf(obj) == Object.prototype;
    }
    function likeArray(obj) {
      var length = !!obj && "length" in obj && obj.length;
      var type2 = $2.type(obj);
      return type2 != "function" && !isWindow(obj) && (type2 == "array" || length === 0 || typeof length === "number" && length > 0 && length - 1 in obj);
    }
    function compact(array) {
      return filter.call(array, function(item) {
        return item != null;
      });
    }
    function flatten(array) {
      return array.length > 0 ? $2.fn.concat.apply([], array) : array;
    }
    camelize = function(str) {
      return str.replace(/-+(.)?/g, function(match, chr) {
        return chr ? chr.toUpperCase() : "";
      });
    };
    function dasherize(str) {
      return str.replace(/::/g, "/").replace(/([A-Z]+)([A-Z][a-z])/g, "$1_$2").replace(/([a-z\d])([A-Z])/g, "$1_$2").replace(/_/g, "-").toLowerCase();
    }
    uniq = function(array) {
      return filter.call(array, function(item, idx) {
        return array.indexOf(item) == idx;
      });
    };
    function classRE(name) {
      return name in classCache ? classCache[name] : classCache[name] = new RegExp("(^|\\s)" + name + "(\\s|$)");
    }
    function maybeAddPx(name, value) {
      return typeof value === "number" && !cssNumber[dasherize(name)] ? value + "px" : value;
    }
    function defaultDisplay(nodeName) {
      var element, display;
      if (!elementDisplay[nodeName]) {
        element = document2.createElement(nodeName);
        document2.body.appendChild(element);
        display = getComputedStyle(element, "").getPropertyValue("display");
        element.parentNode.removeChild(element);
        display == "none" && (display = "block");
        elementDisplay[nodeName] = display;
      }
      return elementDisplay[nodeName];
    }
    function children(element) {
      return "children" in element ? slice.call(element.children) : $2.map(element.childNodes, function(node) {
        if (node.nodeType == 1)
          return node;
      });
    }
    function Z(dom, selector) {
      var i;
      var len = dom ? dom.length : 0;
      for (i = 0; i < len; i++)
        this[i] = dom[i];
      this.length = len;
      this.selector = selector || "";
    }
    zepto.fragment = function(html, name, properties) {
      var dom, nodes, container;
      if (singleTagRE.test(html))
        dom = $2(document2.createElement(RegExp.$1));
      if (!dom) {
        if (html.replace)
          html = html.replace(tagExpanderRE, "<$1></$2>");
        if (name === undefined$1)
          name = fragmentRE.test(html) && RegExp.$1;
        if (!(name in containers))
          name = "*";
        container = containers[name];
        container.innerHTML = "" + html;
        dom = $2.each(slice.call(container.childNodes), function() {
          container.removeChild(this);
        });
      }
      if (isPlainObject(properties)) {
        nodes = $2(dom);
        $2.each(properties, function(key2, value) {
          if (methodAttributes.indexOf(key2) > -1)
            nodes[key2](value);
          else
            nodes.attr(key2, value);
        });
      }
      return dom;
    };
    zepto.Z = function(dom, selector) {
      return new Z(dom, selector);
    };
    zepto.isZ = function(object) {
      return object instanceof zepto.Z;
    };
    zepto.init = function(selector, context) {
      var dom;
      if (!selector)
        return zepto.Z();
      else if (typeof selector === "string") {
        selector = selector.trim();
        if (selector[0] == "<" && fragmentRE.test(selector)) {
          dom = zepto.fragment(selector, RegExp.$1, context), selector = null;
        } else if (context !== undefined$1)
          return $2(context).find(selector);
        else
          dom = zepto.qsa(document2, selector);
      } else if (isFunction(selector))
        return $2(document2).ready(selector);
      else if (zepto.isZ(selector))
        return selector;
      else {
        if (isArray(selector))
          dom = compact(selector);
        else if (isObject(selector)) {
          dom = [selector], selector = null;
        } else if (fragmentRE.test(selector)) {
          dom = zepto.fragment(selector.trim(), RegExp.$1, context), selector = null;
        } else if (context !== undefined$1)
          return $2(context).find(selector);
        else
          dom = zepto.qsa(document2, selector);
      }
      return zepto.Z(dom, selector);
    };
    $2 = function(selector, context) {
      return zepto.init(selector, context);
    };
    function extend(target, source, deep) {
      for (key in source) {
        if (deep && (isPlainObject(source[key]) || isArray(source[key]))) {
          if (isPlainObject(source[key]) && !isPlainObject(target[key])) {
            target[key] = {};
          }
          if (isArray(source[key]) && !isArray(target[key])) {
            target[key] = [];
          }
          extend(target[key], source[key], deep);
        } else if (source[key] !== undefined$1)
          target[key] = source[key];
      }
    }
    $2.extend = function(target) {
      var deep;
      var args = slice.call(arguments, 1);
      if (typeof target === "boolean") {
        deep = target;
        target = args.shift();
      }
      args.forEach(function(arg) {
        extend(target, arg, deep);
      });
      return target;
    };
    zepto.qsa = function(element, selector) {
      var found;
      var maybeID = selector[0] == "#";
      var maybeClass = !maybeID && selector[0] == ".";
      var nameOnly = maybeID || maybeClass ? selector.slice(1) : selector;
      var isSimple = simpleSelectorRE.test(nameOnly);
      return element.getElementById && isSimple && maybeID ? (found = element.getElementById(nameOnly)) ? [found] : [] : element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11 ? [] : slice.call(isSimple && !maybeID && element.getElementsByClassName ? maybeClass ? element.getElementsByClassName(nameOnly) : element.getElementsByTagName(selector) : element.querySelectorAll(selector));
    };
    function filtered(nodes, selector) {
      return selector == null ? $2(nodes) : $2(nodes).filter(selector);
    }
    $2.contains = document2.documentElement.contains ? function(parent, node) {
      return parent !== node && parent.contains(node);
    } : function(parent, node) {
      while (node && (node = node.parentNode)) {
        if (node === parent)
          return true;
      }
      return false;
    };
    function funcArg(context, arg, idx, payload) {
      return isFunction(arg) ? arg.call(context, idx, payload) : arg;
    }
    function setAttribute(node, name, value) {
      value == null ? node.removeAttribute(name) : node.setAttribute(name, value);
    }
    function className(node, value) {
      var klass = node.className || "";
      var svg = klass && klass.baseVal !== undefined$1;
      if (value === undefined$1)
        return svg ? klass.baseVal : klass;
      svg ? klass.baseVal = value : node.className = value;
    }
    function deserializeValue(value) {
      try {
        return value ? value == "true" || (value == "false" ? false : value == "null" ? null : +value + "" == value ? +value : /^[\[\{]/.test(value) ? $2.parseJSON(value) : value) : value;
      } catch (e) {
        return value;
      }
    }
    $2.type = type;
    $2.isFunction = isFunction;
    $2.isWindow = isWindow;
    $2.isArray = isArray;
    $2.isPlainObject = isPlainObject;
    $2.isEmptyObject = function(obj) {
      var name;
      for (name in obj)
        return false;
      return true;
    };
    $2.isNumeric = function(val) {
      var num = Number(val);
      var type2 = typeof val;
      return val != null && type2 != "boolean" && (type2 != "string" || val.length) && !isNaN(num) && isFinite(num) || false;
    };
    $2.inArray = function(elem, array, i) {
      return emptyArray.indexOf.call(array, elem, i);
    };
    $2.camelCase = camelize;
    $2.trim = function(str) {
      return str == null ? "" : String.prototype.trim.call(str);
    };
    $2.uuid = 0;
    $2.support = {};
    $2.expr = {};
    $2.noop = function() {
    };
    $2.map = function(elements, callback) {
      var value;
      var values = [];
      var i;
      var key2;
      if (likeArray(elements)) {
        for (i = 0; i < elements.length; i++) {
          value = callback(elements[i], i);
          if (value != null)
            values.push(value);
        }
      } else {
        for (key2 in elements) {
          value = callback(elements[key2], key2);
          if (value != null)
            values.push(value);
        }
      }
      return flatten(values);
    };
    $2.each = function(elements, callback) {
      var i, key2;
      if (likeArray(elements)) {
        for (i = 0; i < elements.length; i++) {
          if (callback.call(elements[i], i, elements[i]) === false)
            return elements;
        }
      } else {
        for (key2 in elements) {
          if (callback.call(elements[key2], key2, elements[key2]) === false)
            return elements;
        }
      }
      return elements;
    };
    $2.grep = function(elements, callback) {
      return filter.call(elements, callback);
    };
    if (window2.JSON)
      $2.parseJSON = JSON.parse;
    $2.each("Boolean Number String Function Array Date RegExp Object Error".split(" "), function(i, name) {
      class2type["[object " + name + "]"] = name.toLowerCase();
    });
    $2.fn = {
      constructor: zepto.Z,
      length: 0,
      forEach: emptyArray.forEach,
      reduce: emptyArray.reduce,
      push: emptyArray.push,
      sort: emptyArray.sort,
      splice: emptyArray.splice,
      indexOf: emptyArray.indexOf,
      concat: function() {
        var i;
        var value;
        var args = [];
        for (i = 0; i < arguments.length; i++) {
          value = arguments[i];
          args[i] = zepto.isZ(value) ? value.toArray() : value;
        }
        return concat.apply(zepto.isZ(this) ? this.toArray() : this, args);
      },
      map: function(fn) {
        return $2($2.map(this, function(el, i) {
          return fn.call(el, i, el);
        }));
      },
      slice: function() {
        return $2(slice.apply(this, arguments));
      },
      ready: function(callback) {
        if (readyRE.test(document2.readyState) && document2.body)
          callback($2);
        else {
          document2.addEventListener("DOMContentLoaded", function() {
            callback($2);
          }, false);
        }
        return this;
      },
      get: function(idx) {
        return idx === undefined$1 ? slice.call(this) : this[idx >= 0 ? idx : idx + this.length];
      },
      toArray: function() {
        return this.get();
      },
      size: function() {
        return this.length;
      },
      remove: function() {
        return this.each(function() {
          if (this.parentNode != null) {
            this.parentNode.removeChild(this);
          }
        });
      },
      each: function(callback) {
        emptyArray.every.call(this, function(el, idx) {
          return callback.call(el, idx, el) !== false;
        });
        return this;
      },
      filter: function(selector) {
        if (isFunction(selector))
          return this.not(this.not(selector));
        return $2(filter.call(this, function(element) {
          return zepto.matches(element, selector);
        }));
      },
      add: function(selector, context) {
        return $2(uniq(this.concat($2(selector, context))));
      },
      is: function(selector) {
        return this.length > 0 && zepto.matches(this[0], selector);
      },
      not: function(selector) {
        var nodes = [];
        if (isFunction(selector) && selector.call !== undefined$1) {
          this.each(function(idx) {
            if (!selector.call(this, idx))
              nodes.push(this);
          });
        } else {
          var excludes = typeof selector === "string" ? this.filter(selector) : likeArray(selector) && isFunction(selector.item) ? slice.call(selector) : $2(selector);
          this.forEach(function(el) {
            if (excludes.indexOf(el) < 0)
              nodes.push(el);
          });
        }
        return $2(nodes);
      },
      has: function(selector) {
        return this.filter(function() {
          return isObject(selector) ? $2.contains(this, selector) : $2(this).find(selector).size();
        });
      },
      eq: function(idx) {
        return idx === -1 ? this.slice(idx) : this.slice(idx, +idx + 1);
      },
      first: function() {
        var el = this[0];
        return el && !isObject(el) ? el : $2(el);
      },
      last: function() {
        var el = this[this.length - 1];
        return el && !isObject(el) ? el : $2(el);
      },
      find: function(selector) {
        var result;
        var $this = this;
        if (!selector)
          result = $2();
        else if (typeof selector === "object") {
          result = $2(selector).filter(function() {
            var node = this;
            return emptyArray.some.call($this, function(parent) {
              return $2.contains(parent, node);
            });
          });
        } else if (this.length == 1)
          result = $2(zepto.qsa(this[0], selector));
        else {
          result = this.map(function() {
            return zepto.qsa(this, selector);
          });
        }
        return result;
      },
      closest: function(selector, context) {
        var nodes = [];
        var collection = typeof selector === "object" && $2(selector);
        this.each(function(_, node) {
          while (node && !(collection ? collection.indexOf(node) >= 0 : zepto.matches(node, selector))) {
            node = node !== context && !isDocument(node) && node.parentNode;
          }
          if (node && nodes.indexOf(node) < 0)
            nodes.push(node);
        });
        return $2(nodes);
      },
      parents: function(selector) {
        var ancestors = [];
        var nodes = this;
        while (nodes.length > 0) {
          nodes = $2.map(nodes, function(node) {
            if ((node = node.parentNode) && !isDocument(node) && ancestors.indexOf(node) < 0) {
              ancestors.push(node);
              return node;
            }
          });
        }
        return filtered(ancestors, selector);
      },
      parent: function(selector) {
        return filtered(uniq(this.pluck("parentNode")), selector);
      },
      children: function(selector) {
        return filtered(this.map(function() {
          return children(this);
        }), selector);
      },
      contents: function() {
        return this.map(function() {
          return this.contentDocument || slice.call(this.childNodes);
        });
      },
      siblings: function(selector) {
        return filtered(this.map(function(i, el) {
          return filter.call(children(el.parentNode), function(child) {
            return child !== el;
          });
        }), selector);
      },
      empty: function() {
        return this.each(function() {
          this.innerHTML = "";
        });
      },
      pluck: function(property) {
        return $2.map(this, function(el) {
          return el[property];
        });
      },
      show: function() {
        return this.each(function() {
          this.style.display == "none" && (this.style.display = "");
          if (getComputedStyle(this, "").getPropertyValue("display") == "none") {
            this.style.display = defaultDisplay(this.nodeName);
          }
        });
      },
      replaceWith: function(newContent) {
        return this.before(newContent).remove();
      },
      wrap: function(structure) {
        var func = isFunction(structure);
        if (this[0] && !func) {
          var dom = $2(structure).get(0);
        }
        var clone = dom.parentNode || this.length > 1;
        return this.each(function(index) {
          $2(this).wrapAll(func ? structure.call(this, index) : clone ? dom.cloneNode(true) : dom);
        });
      },
      wrapAll: function(structure) {
        if (this[0]) {
          $2(this[0]).before(structure = $2(structure));
          var children2;
          while ((children2 = structure.children()).length)
            structure = children2.first();
          $2(structure).append(this);
        }
        return this;
      },
      wrapInner: function(structure) {
        var func = isFunction(structure);
        return this.each(function(index) {
          var self = $2(this);
          var contents = self.contents();
          var dom = func ? structure.call(this, index) : structure;
          contents.length ? contents.wrapAll(dom) : self.append(dom);
        });
      },
      unwrap: function() {
        this.parent().each(function() {
          $2(this).replaceWith($2(this).children());
        });
        return this;
      },
      clone: function() {
        return this.map(function() {
          return this.cloneNode(true);
        });
      },
      hide: function() {
        return this.css("display", "none");
      },
      toggle: function(setting) {
        return this.each(function() {
          var el = $2(this);
          (setting === undefined$1 ? el.css("display") == "none" : setting) ? el.show() : el.hide();
        });
      },
      prev: function(selector) {
        return $2(this.pluck("previousElementSibling")).filter(selector || "*");
      },
      next: function(selector) {
        return $2(this.pluck("nextElementSibling")).filter(selector || "*");
      },
      html: function(html) {
        return 0 in arguments ? this.each(function(idx) {
          var originHtml = this.innerHTML;
          $2(this).empty().append(funcArg(this, html, idx, originHtml));
        }) : 0 in this ? this[0].innerHTML : null;
      },
      text: function(text) {
        return 0 in arguments ? this.each(function(idx) {
          var newText = funcArg(this, text, idx, this.textContent);
          this.textContent = newText == null ? "" : "" + newText;
        }) : 0 in this ? this.pluck("textContent").join("") : null;
      },
      attr: function(name, value) {
        var result;
        return typeof name === "string" && !(1 in arguments) ? 0 in this && this[0].nodeType == 1 && (result = this[0].getAttribute(name)) != null ? result : undefined$1 : this.each(function(idx) {
          if (this.nodeType !== 1)
            return;
          if (isObject(name))
            for (key in name)
              setAttribute(this, key, name[key]);
          else
            setAttribute(this, name, funcArg(this, value, idx, this.getAttribute(name)));
        });
      },
      removeAttr: function(name) {
        return this.each(function() {
          this.nodeType === 1 && name.split(" ").forEach(function(attribute) {
            setAttribute(this, attribute);
          }, this);
        });
      },
      prop: function(name, value) {
        name = propMap[name] || name;
        return 1 in arguments ? this.each(function(idx) {
          this[name] = funcArg(this, value, idx, this[name]);
        }) : this[0] && this[0][name];
      },
      removeProp: function(name) {
        name = propMap[name] || name;
        return this.each(function() {
          delete this[name];
        });
      },
      data: function(name, value) {
        var attrName = "data-" + name.replace(capitalRE, "-$1").toLowerCase();
        var data = 1 in arguments ? this.attr(attrName, value) : this.attr(attrName);
        return data !== null ? deserializeValue(data) : undefined$1;
      },
      val: function(value) {
        if (0 in arguments) {
          if (value == null)
            value = "";
          return this.each(function(idx) {
            this.value = funcArg(this, value, idx, this.value);
          });
        } else {
          return this[0] && (this[0].multiple ? $2(this[0]).find("option").filter(function() {
            return this.selected;
          }).pluck("value") : this[0].value);
        }
      },
      offset: function(coordinates) {
        if (coordinates) {
          return this.each(function(index) {
            var $this = $2(this);
            var coords = funcArg(this, coordinates, index, $this.offset());
            var parentOffset = $this.offsetParent().offset();
            var props = {
              top: coords.top - parentOffset.top,
              left: coords.left - parentOffset.left
            };
            if ($this.css("position") == "static")
              props["position"] = "relative";
            $this.css(props);
          });
        }
        if (!this.length)
          return null;
        if (document2.documentElement !== this[0] && !$2.contains(document2.documentElement, this[0])) {
          return { top: 0, left: 0 };
        }
        var obj = this[0].getBoundingClientRect();
        return {
          left: obj.left + window2.pageXOffset,
          top: obj.top + window2.pageYOffset,
          width: Math.round(obj.width),
          height: Math.round(obj.height)
        };
      },
      css: function(property, value) {
        if (arguments.length < 2) {
          var element = this[0];
          if (typeof property === "string") {
            if (!element)
              return;
            return element.style[camelize(property)] || getComputedStyle(element, "").getPropertyValue(property);
          } else if (isArray(property)) {
            if (!element)
              return;
            var props = {};
            var computedStyle = getComputedStyle(element, "");
            $2.each(property, function(_, prop) {
              props[prop] = element.style[camelize(prop)] || computedStyle.getPropertyValue(prop);
            });
            return props;
          }
        }
        var css = "";
        if (type(property) == "string") {
          if (!value && value !== 0) {
            this.each(function() {
              this.style.removeProperty(dasherize(property));
            });
          } else {
            css = dasherize(property) + ":" + maybeAddPx(property, value);
          }
        } else {
          for (key in property) {
            if (!property[key] && property[key] !== 0) {
              this.each(function() {
                this.style.removeProperty(dasherize(key));
              });
            } else {
              css += dasherize(key) + ":" + maybeAddPx(key, property[key]) + ";";
            }
          }
        }
        return this.each(function() {
          this.style.cssText += ";" + css;
        });
      },
      index: function(element) {
        return element ? this.indexOf($2(element)[0]) : this.parent().children().indexOf(this[0]);
      },
      hasClass: function(name) {
        if (!name)
          return false;
        return emptyArray.some.call(this, function(el) {
          return this.test(className(el));
        }, classRE(name));
      },
      addClass: function(name) {
        if (!name)
          return this;
        return this.each(function(idx) {
          if (!("className" in this))
            return;
          classList = [];
          var cls = className(this);
          var newName = funcArg(this, name, idx, cls);
          newName.split(/\s+/g).forEach(function(klass) {
            if (!$2(this).hasClass(klass))
              classList.push(klass);
          }, this);
          classList.length && className(this, cls + (cls ? " " : "") + classList.join(" "));
        });
      },
      removeClass: function(name) {
        return this.each(function(idx) {
          if (!("className" in this))
            return;
          if (name === undefined$1)
            return className(this, "");
          classList = className(this);
          funcArg(this, name, idx, classList).split(/\s+/g).forEach(function(klass) {
            classList = classList.replace(classRE(klass), " ");
          });
          className(this, classList.trim());
        });
      },
      toggleClass: function(name, when) {
        if (!name)
          return this;
        return this.each(function(idx) {
          var $this = $2(this);
          var names = funcArg(this, name, idx, className(this));
          names.split(/\s+/g).forEach(function(klass) {
            (when === undefined$1 ? !$this.hasClass(klass) : when) ? $this.addClass(klass) : $this.removeClass(klass);
          });
        });
      },
      scrollTop: function(value) {
        if (!this.length)
          return;
        var hasScrollTop = "scrollTop" in this[0];
        if (value === undefined$1)
          return hasScrollTop ? this[0].scrollTop : this[0].pageYOffset;
        return this.each(hasScrollTop ? function() {
          this.scrollTop = value;
        } : function() {
          this.scrollTo(this.scrollX, value);
        });
      },
      scrollLeft: function(value) {
        if (!this.length)
          return;
        var hasScrollLeft = "scrollLeft" in this[0];
        if (value === undefined$1)
          return hasScrollLeft ? this[0].scrollLeft : this[0].pageXOffset;
        return this.each(hasScrollLeft ? function() {
          this.scrollLeft = value;
        } : function() {
          this.scrollTo(value, this.scrollY);
        });
      },
      position: function() {
        if (!this.length)
          return;
        var elem = this[0];
        var offsetParent = this.offsetParent();
        var offset = this.offset();
        var parentOffset = rootNodeRE.test(offsetParent[0].nodeName) ? { top: 0, left: 0 } : offsetParent.offset();
        offset.top -= parseFloat($2(elem).css("margin-top")) || 0;
        offset.left -= parseFloat($2(elem).css("margin-left")) || 0;
        parentOffset.top += parseFloat($2(offsetParent[0]).css("border-top-width")) || 0;
        parentOffset.left += parseFloat($2(offsetParent[0]).css("border-left-width")) || 0;
        return {
          top: offset.top - parentOffset.top,
          left: offset.left - parentOffset.left
        };
      },
      offsetParent: function() {
        return this.map(function() {
          var parent = this.offsetParent || document2.body;
          while (parent && !rootNodeRE.test(parent.nodeName) && $2(parent).css("position") == "static") {
            parent = parent.offsetParent;
          }
          return parent;
        });
      }
    };
    $2.fn.detach = $2.fn.remove;
    ["width", "height"].forEach(function(dimension) {
      var dimensionProperty = dimension.replace(/./, function(m) {
        return m[0].toUpperCase();
      });
      $2.fn[dimension] = function(value) {
        var offset;
        var el = this[0];
        if (value === undefined$1) {
          return isWindow(el) ? el["inner" + dimensionProperty] : isDocument(el) ? el.documentElement["scroll" + dimensionProperty] : (offset = this.offset()) && offset[dimension];
        } else {
          return this.each(function(idx) {
            el = $2(this);
            el.css(dimension, funcArg(this, value, idx, el[dimension]()));
          });
        }
      };
    });
    function traverseNode(node, fun) {
      fun(node);
      for (var i = 0, len = node.childNodes.length; i < len; i++) {
        traverseNode(node.childNodes[i], fun);
      }
    }
    adjacencyOperators.forEach(function(operator, operatorIndex) {
      var inside = operatorIndex % 2;
      $2.fn[operator] = function() {
        var argType;
        var nodes = $2.map(arguments, function(arg) {
          var arr = [];
          argType = type(arg);
          if (argType == "array") {
            arg.forEach(function(el) {
              if (el.nodeType !== undefined$1)
                return arr.push(el);
              else if ($2.zepto.isZ(el))
                return arr = arr.concat(el.get());
              arr = arr.concat(zepto.fragment(el));
            });
            return arr;
          }
          return argType == "object" || arg == null ? arg : zepto.fragment(arg);
        });
        var parent;
        var copyByClone = this.length > 1;
        if (nodes.length < 1)
          return this;
        return this.each(function(_, target) {
          parent = inside ? target : target.parentNode;
          target = operatorIndex == 0 ? target.nextSibling : operatorIndex == 1 ? target.firstChild : operatorIndex == 2 ? target : null;
          var parentInDocument = $2.contains(document2.documentElement, parent);
          nodes.forEach(function(node) {
            if (copyByClone)
              node = node.cloneNode(true);
            else if (!parent)
              return $2(node).remove();
            parent.insertBefore(node, target);
            if (parentInDocument) {
              traverseNode(node, function(el) {
                if (el.nodeName != null && el.nodeName.toUpperCase() === "SCRIPT" && (!el.type || el.type === "text/javascript") && !el.src) {
                  var target2 = el.ownerDocument ? el.ownerDocument.defaultView : window2;
                  target2["eval"].call(target2, el.innerHTML);
                }
              });
            }
          });
        });
      };
      $2.fn[inside ? operator + "To" : "insert" + (operatorIndex ? "Before" : "After")] = function(html) {
        $2(html)[operator](this);
        return this;
      };
    });
    zepto.Z.prototype = Z.prototype = $2.fn;
    zepto.uniq = uniq;
    zepto.deserializeValue = deserializeValue;
    $2.zepto = zepto;
    return $2;
  }();
  (function($2) {
    var _zid = 1;
    var undefined$1;
    var slice = Array.prototype.slice;
    var isFunction = $2.isFunction;
    var isString = function(obj) {
      return typeof obj === "string";
    };
    var handlers = {};
    var specialEvents = {};
    var focusinSupported = "onfocusin" in window2;
    var focus = { focus: "focusin", blur: "focusout" };
    var hover = { mouseenter: "mouseover", mouseleave: "mouseout" };
    specialEvents.click = specialEvents.mousedown = specialEvents.mouseup = specialEvents.mousemove = "MouseEvents";
    function zid(element) {
      return element._zid || (element._zid = _zid++);
    }
    function findHandlers(element, event, fn, selector) {
      event = parse(event);
      if (event.ns)
        var matcher = matcherFor(event.ns);
      return (handlers[zid(element)] || []).filter(function(handler) {
        return handler && (!event.e || handler.e == event.e) && (!event.ns || matcher.test(handler.ns)) && (!fn || zid(handler.fn) === zid(fn)) && (!selector || handler.sel == selector);
      });
    }
    function parse(event) {
      var parts = ("" + event).split(".");
      return { e: parts[0], ns: parts.slice(1).sort().join(" ") };
    }
    function matcherFor(ns) {
      return new RegExp("(?:^| )" + ns.replace(" ", " .* ?") + "(?: |$)");
    }
    function eventCapture(handler, captureSetting) {
      return handler.del && !focusinSupported && handler.e in focus || !!captureSetting;
    }
    function realEvent(type) {
      return hover[type] || focusinSupported && focus[type] || type;
    }
    function add(element, events, fn, data, selector, delegator, capture) {
      var id = zid(element);
      var set = handlers[id] || (handlers[id] = []);
      events.split(/\s/).forEach(function(event) {
        if (event == "ready")
          return $2(document).ready(fn);
        var handler = parse(event);
        handler.fn = fn;
        handler.sel = selector;
        if (handler.e in hover) {
          fn = function(e) {
            var related = e.relatedTarget;
            if (!related || related !== this && !$2.contains(this, related)) {
              return handler.fn.apply(this, arguments);
            }
          };
        }
        handler.del = delegator;
        var callback = delegator || fn;
        handler.proxy = function(e) {
          e = compatible(e);
          if (e.isImmediatePropagationStopped())
            return;
          try {
            e.data = data;
          } catch (e2) {
          }
          var result = callback.apply(element, e._args == undefined$1 ? [e] : [e].concat(e._args));
          if (result === false)
            e.preventDefault(), e.stopPropagation();
          return result;
        };
        handler.i = set.length;
        set.push(handler);
        if ("addEventListener" in element) {
          element.addEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture));
        }
      });
    }
    function remove(element, events, fn, selector, capture) {
      var id = zid(element);
      (events || "").split(/\s/).forEach(function(event) {
        findHandlers(element, event, fn, selector).forEach(function(handler) {
          delete handlers[id][handler.i];
          if ("removeEventListener" in element) {
            element.removeEventListener(realEvent(handler.e), handler.proxy, eventCapture(handler, capture));
          }
        });
      });
    }
    $2.event = { add, remove };
    $2.proxy = function(fn, context) {
      var args = 2 in arguments && slice.call(arguments, 2);
      if (isFunction(fn)) {
        var proxyFn = function() {
          return fn.apply(context, args ? args.concat(slice.call(arguments)) : arguments);
        };
        proxyFn._zid = zid(fn);
        return proxyFn;
      } else if (isString(context)) {
        if (args) {
          args.unshift(fn[context], fn);
          return $2.proxy.apply(null, args);
        } else {
          return $2.proxy(fn[context], fn);
        }
      } else {
        throw new TypeError("expected function");
      }
    };
    $2.fn.bind = function(event, data, callback) {
      return this.on(event, data, callback);
    };
    $2.fn.unbind = function(event, callback) {
      return this.off(event, callback);
    };
    $2.fn.one = function(event, selector, data, callback) {
      return this.on(event, selector, data, callback, 1);
    };
    var returnTrue = function() {
      return true;
    };
    var returnFalse = function() {
      return false;
    };
    var ignoreProperties = /^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/;
    var eventMethods = {
      preventDefault: "isDefaultPrevented",
      stopImmediatePropagation: "isImmediatePropagationStopped",
      stopPropagation: "isPropagationStopped"
    };
    function compatible(event, source) {
      if (source || !event.isDefaultPrevented) {
        source || (source = event);
        $2.each(eventMethods, function(name, predicate) {
          var sourceMethod = source[name];
          event[name] = function() {
            this[predicate] = returnTrue;
            return sourceMethod && sourceMethod.apply(source, arguments);
          };
          event[predicate] = returnFalse;
        });
        event.timeStamp || (event.timeStamp = Date.now());
        if (source.defaultPrevented !== undefined$1 ? source.defaultPrevented : "returnValue" in source ? source.returnValue === false : source.getPreventDefault && source.getPreventDefault()) {
          event.isDefaultPrevented = returnTrue;
        }
      }
      return event;
    }
    function createProxy(event) {
      var key;
      var proxy = { originalEvent: event };
      for (key in event) {
        if (!ignoreProperties.test(key) && event[key] !== undefined$1)
          proxy[key] = event[key];
      }
      return compatible(proxy, event);
    }
    $2.fn.delegate = function(selector, event, callback) {
      return this.on(event, selector, callback);
    };
    $2.fn.undelegate = function(selector, event, callback) {
      return this.off(event, selector, callback);
    };
    $2.fn.live = function(event, callback) {
      $2(document.body).delegate(this.selector, event, callback);
      return this;
    };
    $2.fn.die = function(event, callback) {
      $2(document.body).undelegate(this.selector, event, callback);
      return this;
    };
    $2.fn.on = function(event, selector, data, callback, one) {
      var autoRemove;
      var delegator;
      var $this = this;
      if (event && !isString(event)) {
        $2.each(event, function(type, fn) {
          $this.on(type, selector, data, fn, one);
        });
        return $this;
      }
      if (!isString(selector) && !isFunction(callback) && callback !== false) {
        callback = data, data = selector, selector = undefined$1;
      }
      if (callback === undefined$1 || data === false) {
        callback = data, data = undefined$1;
      }
      if (callback === false)
        callback = returnFalse;
      return $this.each(function(_, element) {
        if (one) {
          autoRemove = function(e) {
            remove(element, e.type, callback);
            return callback.apply(this, arguments);
          };
        }
        if (selector) {
          delegator = function(e) {
            var evt;
            var match = $2(e.target).closest(selector, element).get(0);
            if (match && match !== element) {
              evt = $2.extend(createProxy(e), {
                currentTarget: match,
                liveFired: element
              });
              return (autoRemove || callback).apply(match, [evt].concat(slice.call(arguments, 1)));
            }
          };
        }
        add(element, event, callback, data, selector, delegator || autoRemove);
      });
    };
    $2.fn.off = function(event, selector, callback) {
      var $this = this;
      if (event && !isString(event)) {
        $2.each(event, function(type, fn) {
          $this.off(type, selector, fn);
        });
        return $this;
      }
      if (!isString(selector) && !isFunction(callback) && callback !== false) {
        callback = selector, selector = undefined$1;
      }
      if (callback === false)
        callback = returnFalse;
      return $this.each(function() {
        remove(this, event, callback, selector);
      });
    };
    $2.fn.trigger = function(event, args) {
      event = isString(event) || $2.isPlainObject(event) ? $2.Event(event) : compatible(event);
      event._args = args;
      return this.each(function() {
        if (event.type in focus && typeof this[event.type] === "function")
          this[event.type]();
        else if ("dispatchEvent" in this)
          this.dispatchEvent(event);
        else
          $2(this).triggerHandler(event, args);
      });
    };
    $2.fn.triggerHandler = function(event, args) {
      var e, result;
      this.each(function(i, element) {
        e = createProxy(isString(event) ? $2.Event(event) : event);
        e._args = args;
        e.target = element;
        $2.each(findHandlers(element, event.type || event), function(i2, handler) {
          result = handler.proxy(e);
          if (e.isImmediatePropagationStopped())
            return false;
        });
      });
      return result;
    };
    "focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(event) {
      $2.fn[event] = function(callback) {
        return 0 in arguments ? this.bind(event, callback) : this.trigger(event);
      };
    });
    $2.Event = function(type, props) {
      if (!isString(type))
        props = type, type = props.type;
      var event = document.createEvent(specialEvents[type] || "Events");
      var bubbles = true;
      if (props)
        for (var name in props)
          name == "bubbles" ? bubbles = !!props[name] : event[name] = props[name];
      event.initEvent(type, bubbles, true);
      return compatible(event);
    };
  })(Zepto);
  (function() {
    try {
      getComputedStyle(void 0);
    } catch (e) {
      var nativeGetComputedStyle = getComputedStyle;
      window2.getComputedStyle = function(element, pseudoElement) {
        try {
          return nativeGetComputedStyle(element, pseudoElement);
        } catch (e2) {
          return null;
        }
      };
    }
  })();
  return Zepto;
});
var $ = Zepto;
var render$1 = function() {
  var _vm = this;
  var _h = _vm.$createElement;
  var _c = _vm._self._c || _h;
  return _c("div", {
    ref: "control",
    class: _vm.bem("", [_vm.simple ? "simple" : "", _vm.size, _vm.isMouseenter ? "hover" : ""]),
    on: {
      "mouseenter": function($event) {
        return _vm.handleToggleMouseenter(true);
      },
      "mouseleave": function($event) {
        return _vm.handleToggleMouseenter(false);
      }
    }
  }, [_c("div", {
    class: _vm.bem("inner", _vm.seeking ? "active" : "")
  }, [_c("div", {
    class: _vm.bem("play-btn"),
    on: {
      "click": function($event) {
        $event.stopPropagation();
        return _vm.handlePlay.apply(null, arguments);
      }
    }
  }, [_c("span", {
    class: _vm.bem(`play-btn--${_vm.paused ? "media-play" : "media-pause"}`)
  })]), _vm.controls ? _c("div", {
    class: _vm.bem("bottom")
  }, [!_vm.simple ? _c("span", {
    class: _vm.bem("status-btn", [_vm.paused ? "media-play" : "media-pause"]),
    on: {
      "click": function($event) {
        $event.stopPropagation();
        return _vm.handlePlay.apply(null, arguments);
      }
    }
  }) : _vm._e(), !_vm.simple ? _c("div", {
    class: _vm.bem("time")
  }, [_vm._v(_vm._s(_vm.formatTime(_vm.currentTime)))]) : _vm._e(), _vm.rangeSliderVisible ? _c("RangeSlider", {
    class: _vm.bem("progress"),
    attrs: {
      "min": 0,
      "max": _vm.ceilDuration,
      "interval": 0.1,
      "duration": 0,
      "value": _vm.ceilCurrentTime,
      "tooltipFormatter": function(v) {
        return _vm.formatTime(v, _vm.simple);
      },
      "railStyle": _vm.railStyle,
      "dotSize": _vm.simple ? 13 : 20
    },
    on: {
      "drag-start": _vm.handleTimeDragStart,
      "dragging": _vm.handleTimeDragging,
      "drag-end": _vm.handleTimeDragEnd,
      "change": _vm.handleTimeChange
    },
    nativeOn: {
      "click": function($event) {
        $event.stopPropagation();
      },
      "mousedown": function($event) {
        return function(e) {
          return e.stopPropagation();
        }.apply(null, arguments);
      }
    }
  }) : _vm._e(), _c("div", {
    class: [_vm.bem("time"), _vm.bem("duration")]
  }, [_vm._v(_vm._s(_vm.formatTime(_vm.duration, _vm.simple)))]), !_vm.simple ? _c("div", {
    class: _vm.bem("volume", [_vm.volumeDraging ? "active" : ""])
  }, [_c("div", {
    class: _vm.bem("volume__inner")
  }, [_c("RangeSlider", {
    class: _vm.bem("volume-value"),
    attrs: {
      "direction": "btt",
      "value": Math.floor(_vm.volume * 100),
      "min": 0,
      "max": 100
    },
    on: {
      "change": _vm.handleVolumeChange,
      "drag-start": _vm.handleVolumeDragStart,
      "drag-end": _vm.handleVolumeDragEnd
    }
  }), _c("span", {
    class: _vm.bem("volume-btn", [_vm.volume === 0 || _vm.muted ? "media-mute" : "media-volume"]),
    on: {
      "click": _vm.handleVolumeClick
    }
  })], 1)]) : _vm._e()], 1) : _vm._e()])]);
};
var staticRenderFns$1 = [];
var index_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => '.em-video-controls{position:absolute;top:0;left:0;width:100%;height:100%}.em-video-controls__inner{position:relative;width:100%;height:100%}.em-video-controls__inner:hover .em-video-controls__bottom,.em-video-controls__inner--active .em-video-controls__bottom,.em-video-controls--hover .em-video-controls__play-btn{display:flex}.em-video-controls__play-btn{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);width:40px;height:40px;border:1px solid #f6f7f9;border-radius:50%;background-color:#0000004d;display:none;justify-content:center;align-items:center;font-size:24px;color:#fff;cursor:pointer}.em-video-controls__play-btn:hover{background-color:#0009}.em-video-controls__play-btn>span{width:24px;height:24px;background-position:center}.em-video-controls__play-btn--media-play{display:inline-block;background-image:svg-load("./assets/media-play.svg",fill=#fff)}.em-video-controls__play-btn--media-pause{display:inline-block;background-image:svg-load("./assets/media-pause.svg",fill=#fff)}.em-video-controls--small .em-video-controls__play-btn,.em-video-controls--smaller .em-video-controls__play-btn{top:-4px;transform:translate(-50%,-100%)}.em-video-controls--small .em-video-controls__play-btn:after,.em-video-controls--smaller .em-video-controls__play-btn:after{content:"";position:absolute;width:120%;left:-10%;height:10px;bottom:-5px}.em-video-controls__bottom{position:absolute;bottom:0;width:100%;height:50px;box-sizing:border-box;padding:0 20px;background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,.4) 100%);mix-blend-mode:normal;display:none;justify-content:center;align-items:center;color:#fff}.em-video-controls--simple .em-video-controls__bottom{height:40px;padding:12px 3% 0;background:linear-gradient(180deg,rgba(0,0,0,0) 0%,rgba(0,0,0,.3) 100%)}.em-video-controls--smaller .em-video-controls__bottom{display:none}.em-video-controls__status-btn{margin-right:14px;width:24px;height:24px;background-position:center;cursor:pointer}.em-video-controls__status-btn--media-play{display:inline-block;background-image:svg-load("./assets/media-play.svg",fill=#fff)}.em-video-controls__status-btn--media-pause{display:inline-block;background-image:svg-load("./assets/media-pause.svg",fill=#fff)}.em-video-controls__progress{flex:1;margin:0 16px;cursor:pointer;height:auto!important}.em-video-controls--simple .em-video-controls__progress{margin:0 8px}.em-video-controls__time{min-width:38px;color:#fff;font-size:14px}.em-video-controls--simple .em-video-controls__time{min-width:auto;font-size:10px}.em-video-controls--small .em-video-controls__duration,.em-video-controls--smaller .em-video-controls__duration{display:none}.em-video-controls__volume{position:relative;margin-left:20px;width:24px;height:24px;cursor:pointer}.em-video-controls__volume__inner{position:absolute;bottom:0;left:0;width:100%;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;border-radius:16px;transition:all .3s}.em-video-controls__volume-value{opacity:0;margin-bottom:3px;width:46px;flex:1}.em-video-controls__volume-btn{width:20px;height:20px;cursor:pointer}.em-video-controls__volume-btn--media-volume{display:inline-block;background-image:svg-load("./assets/media-volume.svg",fill=#fff)}.em-video-controls__volume-btn--media-mute{display:inline-block;background-image:svg-load("./assets/media-mute.svg",fill=#fff)}.em-video-controls__volume--active .em-video-controls__volume__inner,.em-video-controls__volume:hover .em-video-controls__volume__inner{height:80px;background-color:#0000004d;padding-top:11px}.em-video-controls__volume:hover .em-video-controls__volume-value,.em-video-controls__volume--active .em-video-controls__volume-value{display:block;opacity:1}.em-video-controls .vue-slider-disabled{opacity:.5;cursor:not-allowed}.em-video-controls .vue-slider-rail{background-color:#ffffff40;border-radius:3.5px}.em-video-controls .vue-slider-process{background-color:#fff;border-radius:15px}.em-video-controls .vue-slider-mark{z-index:4}.em-video-controls .vue-slider-mark:first-child .vue-slider-mark-step,.em-video-controls .vue-slider-mark:last-child .vue-slider-mark-step{display:none}.em-video-controls .vue-slider-mark-step{width:100%;height:100%;border-radius:50%;background-color:#00000029}.em-video-controls .vue-slider-mark-label{font-size:14px;white-space:nowrap}.em-video-controls .vue-slider-dot-handle{cursor:pointer;width:100%;height:100%;border-radius:50%;background-color:#fff;box-sizing:border-box;box-shadow:.5px .5px 2px 1px #00000052}.em-video-controls .vue-slider-dot-handle-focus{box-shadow:0 2px 4px #00000080}.em-video-controls .vue-slider-dot-handle-disabled{cursor:not-allowed;background-color:#ccc}.em-video-controls .vue-slider-dot-tooltip-inner{font-size:12px;white-space:nowrap;padding:2px 5px;min-width:20px;text-align:center;color:#fff;border-radius:4px;border-color:#33383e;background-color:#33383e;box-sizing:content-box}.em-video-controls .vue-slider-dot-tooltip-inner:after{content:"";position:absolute}.em-video-controls .vue-slider-dot-tooltip-inner-top:after{top:100%;left:50%;transform:translate(-50%);height:0;width:0;border-color:transparent;border-style:solid;border-width:5px;border-top-color:inherit}.em-video-controls .vue-slider-dot-tooltip-inner-bottom:after{bottom:100%;left:50%;transform:translate(-50%);height:0;width:0;border-color:transparent;border-style:solid;border-width:5px;border-bottom-color:inherit}.em-video-controls .vue-slider-dot-tooltip-inner-left:after{left:100%;top:50%;transform:translateY(-50%);height:0;width:0;border-color:transparent;border-style:solid;border-width:5px;border-left-color:inherit}.em-video-controls .vue-slider-dot-tooltip-inner-right:after{right:100%;top:50%;transform:translateY(-50%);height:0;width:0;border-color:transparent;border-style:solid;border-width:5px;border-right-color:inherit}.em-video-controls .vue-slider-dot-tooltip-wrapper{opacity:0;transition:all .3s}.em-video-controls .vue-slider-dot-tooltip-wrapper-show{opacity:1}body{min-width:1200px;overflow:overlay;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0)}body::-webkit-scrollbar{width:7px}body::-webkit-scrollbar-thumb{background-color:#000000b3;border:1px solid #fff;border-radius:10rem}body::-webkit-scrollbar-track-piece:start,body::-webkit-scrollbar-track-piece:end{background:transparent}ul{padding:0;list-style:none}.tofh{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[id^=HUABAN],[class^=HUABAN],[id^=ZCOOL],[class^=ZCOOL],[id^=lvye],[class^=lvye],[id^=xmt-],[class^=xmt-]{display:none!important}body>iframe[src="chrome-extension://gpdjojdkbbmdfjfahjcgigfpmkopogic/html/grid.html"],body>iframe[src="chrome-extension://gpdjojdkbbmdfjfahjcgigfpmkopogic/html/search.html"]{visibility:hidden!important;transform:translate(-10000px)!important}.eui-popup-base{z-index:2100!important}.eui-tabs__header{border-bottom-width:1px!important}.gda-btn:not(.gda-btn-sm){min-width:88px}.gda-btn>.gdaicon{font-size:20px;vertical-align:-.1em}.gda-btn svg{vertical-align:bottom}.gda-btn.disabled,.gda-btn[disabled]{cursor:default}.gda-dropdown-menu{box-shadow:0 2px 8px #00000029}.gda-dropdown-menu-item{padding:10px 12px;line-height:20px}.gda-dropdown-menu-item>.gdaicon:first-child{font-size:20px;vertical-align:bottom}.gda-dropdown-menu-item:hover,.gda-dropdown-menu-submenu-title:hover{background:#f6f7f9}.gda-dropdown-menu-item-disabled:hover,.gda-dropdown-menu-submenu-title-disabled:hover{background-color:#fff}.gda-modal-header{padding:18px 24px;border-bottom:none}.gda-modal-title{line-height:24px}.gda-modal-close-x{width:60px;height:60px;line-height:60px}.gda-modal-footer{border-top:none}.gda-form-item-label{font-weight:700}.gda-form-horizontal .gda-form-item{margin-bottom:10px}.gda-form-horizontal .gda-form-item-label{font-weight:700;line-height:48px}.gda-pagination-item,.gda-pagination-item:focus,.gda-pagination-item:hover,.gda-pagination-prev .gda-pagination-item-link,.gda-pagination-next .gda-pagination-item-link{color:#444950;background-color:#f0f3f4;border:none}.gda-pagination-item-active,.gda-pagination-item-active:focus,.gda-pagination-item-active:hover{background:#2254f4;border:none}.gda-pagination-item-active a,.gda-pagination-item-active:focus a,.gda-pagination-item-active:hover a{color:#fff}.gda-pagination-prev.gda-pagination-disabled .gda-pagination-item-link,.gda-pagination-next.gda-pagination-disabled .gda-pagination-item-link{opacity:.3}.gda-pagination-prev:focus .gda-pagination-item-link,.gda-pagination-next:focus .gda-pagination-item-link,.gda-pagination-prev:hover .gda-pagination-item-link,.gda-pagination-next:hover .gda-pagination-item-link{color:#444950}.gda-tree li,.gda-tree li:first-child,.gda-tree li:last-child{padding:0}.gda-tree-child-tree>li:first-child{padding-top:0}:root .gda-tree li span.gda-tree-switcher.gda-tree-switcher_close .gda-tree-switcher-icon,:root .gda-tree li span.gda-tree-switcher.gda-tree-switcher_open .gda-tree-switcher-icon{font-size:16px;vertical-align:-3px}.gda-tree.gda-tree-directory>li span.gda-tree-node-content-wrapper:hover:before,.gda-tree.gda-tree-directory .gda-tree-child-tree>li span.gda-tree-node-content-wrapper:hover:before{border-radius:4px}.gda-tree .gda-tree-treenode-checkbox-checked .gda-tree-checkbox-checked:after{display:none}\n')();
const __vue2_script$1 = {
  name: "em-video-controls",
  components: {
    RangeSlider
  },
  mixins: [bemMixin],
  props: {
    size: {
      type: String,
      default: "medium"
    },
    currentTime: {
      type: Number,
      default: 0
    },
    duration: {
      type: Number,
      default: 0
    },
    volume: {
      type: Number,
      default: 1
    },
    paused: {
      type: Boolean,
      default: true
    },
    muted: {
      type: Boolean,
      default: false
    },
    simple: {
      type: Boolean,
      default: false
    },
    controls: {
      type: Boolean,
      default: true
    }
  },
  data() {
    return {
      rangeSliderVisible: true,
      isMouseenter: false,
      volumeDraging: false,
      seeking: false
    };
  },
  computed: {
    railStyle() {
      if (this.simple) {
        return {
          padding: 0,
          height: "3px"
        };
      }
      return {
        padding: 0,
        height: "4px"
      };
    },
    ceilDuration() {
      return ceil_1(this.duration, 1);
    },
    ceilCurrentTime() {
      return ceil_1(this.currentTime, 1);
    }
  },
  watch: {
    ceilDuration() {
      this.rangeSliderVisible = false;
      this.$nextTick(() => {
        this.rangeSliderVisible = true;
      });
    }
  },
  mounted() {
    $(document).on("keyup", this._onKeyup = (e) => {
      if (e.keyCode === 32) {
        this.$emit("space", !this.paused);
      }
    });
  },
  beforeDestroy() {
    $(document).off("keyup", this._onKeyup);
  },
  methods: {
    handleToggleMouseenter(bool) {
      clearTimeout(this._toggleMouseenterTimer);
      if (!bool) {
        this._toggleMouseenterTimer = setTimeout(() => {
          this.isMouseenter = false;
        }, this.size.includes("small") ? 500 : 0);
      } else {
        this.isMouseenter = true;
      }
    },
    formatTime(time, simple = false) {
      time = Math.min(this.duration, time);
      if (simple)
        return `${ceil_1(time, 1)}s`;
      time = Math.ceil(time);
      const double = (num) => `${num < 10 ? "0" : ""}${num}`;
      const minutes = Math.floor(time / 60) % 60;
      const seconds = time % 60;
      return `${double(minutes)}:${double(seconds)}`;
    },
    handlePlay() {
      this.$emit("play-click", !this.paused);
    },
    handleTimeDragStart() {
      this.seeking = true;
      this.$emit("time-drag-start");
    },
    handleTimeDragging(v) {
      if (this.seeking) {
        this.$emit("seek", v, { action: "drag" });
      }
      this.$emit("time-dragging");
    },
    handleTimeDragEnd() {
      this.seeking = false;
      this.$emit("time-drag-end");
    },
    handleTimeChange(v) {
      if (this.seeking)
        return;
      this.$emit("seek", v, { action: this.seeking ? "drag" : "click" });
    },
    handleVolumeClick() {
      this.$emit("mute", !this.muted);
    },
    handleVolumeChange(v) {
      this.$emit("volume-change", v / 100);
    },
    handleVolumeDragStart() {
      this.volumeDraging = true;
    },
    handleVolumeDragEnd() {
      this.volumeDraging = false;
    }
  }
};
const __cssModules$1 = {};
var __component__$1 = /* @__PURE__ */ normalizeComponent(__vue2_script$1, render$1, staticRenderFns$1, false, __vue2_injectStyles$1, null, null, null);
function __vue2_injectStyles$1(context) {
  for (let o in __cssModules$1) {
    this[o] = __cssModules$1[o];
  }
}
var VideoControls = /* @__PURE__ */ function() {
  return __component__$1.exports;
}();
var controller = {
  components: {
    VideoControls
  },
  watch: {
    model(v) {
      if (v) {
        this.$set(this.model, "$muted", this.model.muted);
        this.$set(this.model, "$volume", this.model.volume);
      }
    },
    "editor.currentLayout"() {
      this.videoModels.forEach((model) => {
        model.$playing = false;
      });
    }
  },
  mounted() {
    this.$watch("model", (v) => {
      this.destroy();
      this.videoModels.forEach((model) => {
        v && this.loadVideo(model);
      });
    }, {
      immediate: true
    });
  },
  computed: {
    model() {
      let max = 0;
      let maxDurationElement;
      this.videoModels.forEach((element) => {
        if (element.type === "video") {
          const d = element.endTime - element.startTime;
          if (d > max)
            maxDurationElement = element;
          max = Math.max(max, d);
        }
      });
      return maxDurationElement;
    },
    duration() {
      return lodash.exports.ceil((this.model.endTime - this.model.startTime) / 1e3, 1);
    },
    startTime() {
      const { startTime, endTime, naturalDuration, invertPlay } = this.model;
      if (invertPlay) {
        return naturalDuration - endTime;
      }
      return startTime;
    },
    endTime() {
      const { startTime, endTime, naturalDuration, invertPlay } = this.model;
      if (invertPlay) {
        return naturalDuration - startTime;
      }
      return endTime;
    },
    currentTime() {
      const currentTime = (this.model.$currentTime - this.startTime) / 1e3;
      return lodash.exports.ceil(currentTime >= 0 ? currentTime : 0, 1);
    },
    videoModels() {
      if (!this.editor)
        return [];
      const elements = [];
      this.editor.walkTemplet((element) => {
        element.type === "video" && elements.push(element);
      }, true, [this.editor.currentLayout]);
      return elements;
    }
  },
  methods: {
    destroy() {
      if (this.video) {
        this.video.pause();
        this.video.removeEventListener("timeupdate", this.onTimeUpdate);
      }
    },
    onTimeUpdate() {
      this.videoModels.forEach((model) => {
        const video = model.$video;
        const videoCurrentTime = video.currentTime * 1e3;
        if (!model || !model.$playing)
          return;
        if (videoCurrentTime >= this.endTime) {
          model.$playing = false;
        }
        model.$currentTime = Math.min(this.endTime, Math.max(videoCurrentTime, this.startTime));
      });
    },
    async loadVideo(model) {
      await this.$nextTick();
      const videoC = model && this.editor.getComponentById(model.$id);
      const video = videoC.$refs.video;
      model.$video = video;
      if (video) {
        video.removeEventListener("timeupdate", this.onTimeUpdate);
        video.addEventListener("timeupdate", this.onTimeUpdate);
      }
      this.editor.walkTemplet((elm) => {
        if (elm.type === "video" && elm !== this.model) {
          elm.$playing = false;
        }
      }, true, this.editor.layouts);
    },
    handleSeek(time) {
      this.videoModels.forEach((model) => {
        const startTime = model.invertPlay ? model.naturalDuration - model.endTime : model.startTime;
        model.$currentTime = startTime + time * 1e3;
      });
      this.model.$playing && this.handlePlayClick(false);
    },
    handlePlayClick(paused) {
      if (this.currentTime >= this.endTime / 1e3) {
        this.handleSeek(0);
      }
      this.videoModels.forEach((model) => {
        const endTime = model.invertPlay ? model.naturalDuration - model.startTime : model.endTime;
        if (this.currentTime < endTime / 1e3) {
          model.$playing = !paused;
        }
      });
    },
    handleVolumeChange(vol) {
      this.videoModels.forEach((model) => {
        model.$volume = vol;
        model.$video.volume = vol;
      });
    },
    handleMute(muted) {
      this.$set(this.model, "$muted", muted);
      this.videoModels.forEach((model) => {
        model.$video.muted = muted;
      });
    }
  },
  beforeDestroy() {
    this.destroy();
  }
};
var render = function() {
  var _vm = this;
  var _h = _vm.$createElement;
  var _c = _vm._self._c || _h;
  return _c("div", {
    class: _vm.bem(null, {
      flow: _vm.isFlowTemplet
    })
  }, [_c("div", {
    ref: "editorWrap"
  }), _vm.model ? _c("VideoControls", {
    directives: [{
      name: "show",
      rawName: "v-show",
      value: _vm.videoControlsVisible,
      expression: "videoControlsVisible"
    }],
    style: _vm.videoControlsStyle,
    attrs: {
      "size": "medium",
      "currentTime": _vm.currentTime,
      "duration": _vm.duration,
      "volume": _vm.model.$volume,
      "muted": _vm.model.$muted,
      "paused": !_vm.model.$playing,
      "simple": false
    },
    on: {
      "seek": _vm.handleSeek,
      "play-click": _vm.handlePlayClick,
      "volume-change": _vm.handleVolumeChange,
      "mute": _vm.handleMute
    }
  }) : _vm._e()], 1);
};
var staticRenderFns = [];
var activity_vue_vue_type_style_index_0_lang = /* @__PURE__ */ (() => '.em-editor-templet-view-acitivity{width:100%;height:100%;position:relative}.em-editor-templet-view-acitivity--flow{overflow:auto}.em-editor-templet-view-acitivity--flow .editor-container{overflow:visible;height:auto;position:relative}.em-editor-templet-view-acitivity .em-video-controls{z-index:9}.em-editor-templet-view-acitivity .editor-container{pointer-events:none}.em-editor-templet-view-acitivity .editor-transform .editor-grip,.em-editor-templet-view-acitivity .editor-transform .editor-rotato,.em-editor-templet-view-acitivity .editor-transform .editor-lock-icon{display:none}body{min-width:1200px;overflow:overlay;-webkit-font-smoothing:antialiased;-webkit-tap-highlight-color:rgba(0,0,0,0)}body::-webkit-scrollbar{width:7px}body::-webkit-scrollbar-thumb{background-color:#000000b3;border:1px solid #fff;border-radius:10rem}body::-webkit-scrollbar-track-piece:start,body::-webkit-scrollbar-track-piece:end{background:transparent}ul{padding:0;list-style:none}.tofh{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[id^=HUABAN],[class^=HUABAN],[id^=ZCOOL],[class^=ZCOOL],[id^=lvye],[class^=lvye],[id^=xmt-],[class^=xmt-]{display:none!important}body>iframe[src="chrome-extension://gpdjojdkbbmdfjfahjcgigfpmkopogic/html/grid.html"],body>iframe[src="chrome-extension://gpdjojdkbbmdfjfahjcgigfpmkopogic/html/search.html"]{visibility:hidden!important;transform:translate(-10000px)!important}.eui-popup-base{z-index:2100!important}.eui-tabs__header{border-bottom-width:1px!important}.gda-btn:not(.gda-btn-sm){min-width:88px}.gda-btn>.gdaicon{font-size:20px;vertical-align:-.1em}.gda-btn svg{vertical-align:bottom}.gda-btn.disabled,.gda-btn[disabled]{cursor:default}.gda-dropdown-menu{box-shadow:0 2px 8px #00000029}.gda-dropdown-menu-item{padding:10px 12px;line-height:20px}.gda-dropdown-menu-item>.gdaicon:first-child{font-size:20px;vertical-align:bottom}.gda-dropdown-menu-item:hover,.gda-dropdown-menu-submenu-title:hover{background:#f6f7f9}.gda-dropdown-menu-item-disabled:hover,.gda-dropdown-menu-submenu-title-disabled:hover{background-color:#fff}.gda-modal-header{padding:18px 24px;border-bottom:none}.gda-modal-title{line-height:24px}.gda-modal-close-x{width:60px;height:60px;line-height:60px}.gda-modal-footer{border-top:none}.gda-form-item-label{font-weight:700}.gda-form-horizontal .gda-form-item{margin-bottom:10px}.gda-form-horizontal .gda-form-item-label{font-weight:700;line-height:48px}.gda-pagination-item,.gda-pagination-item:focus,.gda-pagination-item:hover,.gda-pagination-prev .gda-pagination-item-link,.gda-pagination-next .gda-pagination-item-link{color:#444950;background-color:#f0f3f4;border:none}.gda-pagination-item-active,.gda-pagination-item-active:focus,.gda-pagination-item-active:hover{background:#2254f4;border:none}.gda-pagination-item-active a,.gda-pagination-item-active:focus a,.gda-pagination-item-active:hover a{color:#fff}.gda-pagination-prev.gda-pagination-disabled .gda-pagination-item-link,.gda-pagination-next.gda-pagination-disabled .gda-pagination-item-link{opacity:.3}.gda-pagination-prev:focus .gda-pagination-item-link,.gda-pagination-next:focus .gda-pagination-item-link,.gda-pagination-prev:hover .gda-pagination-item-link,.gda-pagination-next:hover .gda-pagination-item-link{color:#444950}.gda-tree li,.gda-tree li:first-child,.gda-tree li:last-child{padding:0}.gda-tree-child-tree>li:first-child{padding-top:0}:root .gda-tree li span.gda-tree-switcher.gda-tree-switcher_close .gda-tree-switcher-icon,:root .gda-tree li span.gda-tree-switcher.gda-tree-switcher_open .gda-tree-switcher-icon{font-size:16px;vertical-align:-3px}.gda-tree.gda-tree-directory>li span.gda-tree-node-content-wrapper:hover:before,.gda-tree.gda-tree-directory .gda-tree-child-tree>li span.gda-tree-node-content-wrapper:hover:before{border-radius:4px}.gda-tree .gda-tree-treenode-checkbox-checked .gda-tree-checkbox-checked:after{display:none}\n')();
const __vue2_script = {
  name: "em-editor-templet-view-acitivity",
  mixins: [bemMixin, controller],
  props: {
    initEditor: {
      type: [Object, Function],
      required: true
    },
    templetContent: {
      type: Object,
      required: true
    },
    editorOptions: {
      type: Object,
      default: () => ({})
    },
    isFlowTemplet: {
      type: Boolean,
      default: false
    },
    activedIndex: {
      type: Number,
      default: 0
    }
  },
  data() {
    return {
      editor: null,
      paused: true
    };
  },
  computed: {
    videoLayouts() {
      return lodash.exports.get(this, "editor.layouts", []).filter((layout) => isVideoTemplet({ layouts: [layout] }));
    },
    videoControlsVisible() {
      return lodash.exports.get(this, "editor.currentLayout") && isVideoTemplet({ layouts: [this.editor.currentLayout] });
    },
    videoControlsStyle() {
      const { currentLayout, shellRect, zoom } = this.editor;
      const height = Math.max(100, currentLayout.height * zoom);
      const width = Math.max(100, currentLayout.width * zoom);
      return {
        left: shellRect.left + "px",
        top: shellRect.top + currentLayout.top * zoom + "px",
        width: width + "px",
        height: height + "px"
      };
    }
  },
  watch: {
    editorOptions(v) {
      v && this.editor && this.editor.setOptions(v);
    },
    activedIndex(index) {
      this.editor.toggleLayout(index);
      this.editor.updateContainerRect();
      this.editor.fitZoom();
    },
    "editor.currentElement"(v) {
      if (v && v.type !== "video") {
        this.editor.currentElement = null;
      }
    }
  },
  mounted() {
    const Editor = typeof this.initEditor === "function" ? this.initEditor : this.initEditor.constructor;
    this.editor = new Editor({
      el: this.$refs.editorWrap,
      propsData: {
        editorOptions: {}
      }
    });
    window.editor = this.editor;
    this.initEditorFn();
    this.initDomEvent();
  },
  methods: {
    async initEditorFn() {
      const { templet } = this;
      let mode = "design";
      if (this.isFlowTemplet) {
        mode = "flow";
      }
      const editorData = this.templetContent || JSON.parse(templet.content);
      const cptData = await compatibleVideoAndMask(editorData, false);
      const editor = this.editor;
      editor.disableHotkey();
      const options = await this.getEditorOptions(this.editorOptions);
      editor.setOptions(__spreadValues({
        mode
      }, options));
      editor.$on("templetCreated", (e) => {
        this.$emit("templetCreated", e);
      });
      editor.$on("layoutLoaded", (layout) => {
        this.$emit("layoutLoaded", layout);
      });
      editor.setTemplet(cptData).then(() => {
        this.$emit("editorReady", editor);
      });
    },
    async getEditorOptions(options = {}) {
      let fontList = [];
      if (!options.fontList || !options.fontList.length) {
        fontList = await apiService.apis.getFontsByTemplet({
          content: this.templetContent
        }).catch(console.error);
        fontList = fontList || [];
      }
      return __spreadValues({
        padding: [50, 0, 50, 0],
        showGuider: false,
        showHover: false,
        showResizeGuider: false,
        fontLoadTimeout: 15 * 1e3,
        selector: false,
        bindHotkey: false,
        contextmenu: false,
        fontList,
        fontSubset: {
          defaultContent: "Aa",
          initialEnable: true,
          exportEnableCallback: () => {
            return true;
          },
          getUrl: (font, content) => {
            return apiService.apis.getFontSubset({
              font_id: font.id,
              content,
              type: "woff"
            }, {
              responseType: "blob"
            }).then((res) => {
              return URL.createObjectURL(res.data);
            }).catch((err) => {
              if (err.preventDefault) {
                err.preventDefault();
              }
              throw err;
            });
          },
          supportTypes: ["text", "effectText", "threeText", "table"]
        }
      }, options);
    },
    initDomEvent() {
      const onMousemove = lodash.exports.throttle((e) => {
        const editor = this.editor;
        if (editor.mode !== "flow")
          return;
        const rects = this.videoLayouts.map((layout) => editor.getComponentById(layout.$id).$el.getBoundingClientRect());
        const layoutIndex = rects.findIndex((rect) => {
          if (e.pageY > rect.top && e.pageY < rect.top + rect.height && e.pageX > rect.left && e.pageX < rect.left + rect.width) {
            return true;
          }
        });
        if (this.videoLayouts[layoutIndex]) {
          this.editor.toggleLayout(this.videoLayouts[layoutIndex]);
        }
      }, 200);
      this.$el.addEventListener("mousemove", onMousemove);
      this.$on("hook:beforeDestroy", () => {
        this.$el.removeEventListener("mousemove", onMousemove);
      });
    }
  }
};
const __cssModules = {};
var __component__ = /* @__PURE__ */ normalizeComponent(__vue2_script, render, staticRenderFns, false, __vue2_injectStyles, null, null, null);
function __vue2_injectStyles(context) {
  for (let o in __cssModules) {
    this[o] = __cssModules[o];
  }
}
var activity = /* @__PURE__ */ function() {
  return __component__.exports;
}();
export { activity as default };
