(function webpackUniversalModuleDefinition(root, factory) {
	if(typeof exports === 'object' && typeof module === 'object')
		module.exports = factory();
	else if(typeof define === 'function' && define.amd)
		define("olControlLayerSwitcher", [], factory);
	else if(typeof exports === 'object')
		exports["olControlLayerSwitcher"] = factory();
	else
		root["olControlLayerSwitcher"] = factory();
})(this, function() {
return /******/ (function(modules) { // webpackBootstrap
/******/ 	// The module cache
/******/ 	var installedModules = {};
/******/
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/
/******/ 		// Check if module is in cache
/******/ 		if(installedModules[moduleId]) {
/******/ 			return installedModules[moduleId].exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		var module = installedModules[moduleId] = {
/******/ 			i: moduleId,
/******/ 			l: false,
/******/ 			exports: {}
/******/ 		};
/******/
/******/ 		// Execute the module function
/******/ 		modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
/******/
/******/ 		// Flag the module as loaded
/******/ 		module.l = true;
/******/
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/
/******/
/******/ 	// expose the modules object (__webpack_modules__)
/******/ 	__webpack_require__.m = modules;
/******/
/******/ 	// expose the module cache
/******/ 	__webpack_require__.c = installedModules;
/******/
/******/ 	// identity function for calling harmony imports with the correct context
/******/ 	__webpack_require__.i = function(value) { return value; };
/******/
/******/ 	// define getter function for harmony exports
/******/ 	__webpack_require__.d = function(exports, name, getter) {
/******/ 		if(!__webpack_require__.o(exports, name)) {
/******/ 			Object.defineProperty(exports, name, {
/******/ 				configurable: false,
/******/ 				enumerable: true,
/******/ 				get: getter
/******/ 			});
/******/ 		}
/******/ 	};
/******/
/******/ 	// getDefaultExport function for compatibility with non-harmony modules
/******/ 	__webpack_require__.n = function(module) {
/******/ 		var getter = module && module.__esModule ?
/******/ 			function getDefault() { return module['default']; } :
/******/ 			function getModuleExports() { return module; };
/******/ 		__webpack_require__.d(getter, 'a', getter);
/******/ 		return getter;
/******/ 	};
/******/
/******/ 	// Object.prototype.hasOwnProperty.call
/******/ 	__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
/******/
/******/ 	// __webpack_public_path__
/******/ 	__webpack_require__.p = "../";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 110);
/******/ })
/************************************************************************/
/******/ ({

/***/ 110:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});

__webpack_require__(128);

var _constants = __webpack_require__(9);

var _domUtils = __webpack_require__(3);

var htmlUtils = _interopRequireWildcard(_domUtils);

var _Events = __webpack_require__(2);

var Events = _interopRequireWildcard(_Events);

var _layerUtils = __webpack_require__(17);

var _layerUtils2 = _interopRequireDefault(_layerUtils);

var _mixin = __webpack_require__(19);

var _mixin2 = _interopRequireDefault(_mixin);

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

function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

ol.control.LayerSwitcher = function () {
  var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};

  this.options = params;

  this.className_ = this.options.className !== undefined ? this.options.className : 'hmap-layer-switcher';

  this.options['itemWidth'] = this.options['itemWidth'] === 'number' ? this.options['itemWidth'] : 86;

  this.baseLayers_ = [];

  this.labelLayers_ = [];

  this.baseLayerKey = this.options['baseLayerKey'] ? this.options['baseLayerKey'] : 'isBaseLayer';

  this.isDefaultKey = this.options['isDefaultKey'] ? this.options['isDefaultKey'] : 'isDefault';

  this.labelAliasKey = this.options['labelAlias'] ? this.options['labelAlias'] : 'layerName';

  this.labelLayerKey = this.options['labelLayerKey'] ? this.options['labelLayerKey'] : 'isLabelLayerKey';

  this.isActionSelected_ = false;

  this.options['itemHeight'] = typeof this.options['itemHeight'] === 'number' ? this.options['itemHeight'] : 60;

  this.options['key'] = this.options['key'] ? this.options['key'] : 'layerName';
  if (this.labelLayerKey === this.baseLayerKey) {
    throw new Error('标注图层关键字不能和底图相同！');
  }

  this.element_ = htmlUtils.create('div', this.className_ + ' ' + _constants.BASE_CLASS_NAME.CLASS_UNSELECTABLE);
  Events.listen(this.element_, 'mouseover', this.contentMouseOver_, this);
  Events.listen(this.element_, 'mouseout', this.contentMouseOut_, this);

  this.innerElement_ = htmlUtils.create('ul', this.className_ + '-ul-inner', this.element_, this.className_ + '-ul-inner');

  if (this.options['layers'] && Array.isArray(this.options['layers']) && this.options['layers'].length > 0) {
    this.initDomInternal(this.options['layers'], this.className_, this.options['key']);
  }

  ol.control.Control.call(this, {
    element: this.element_,
    target: this.options['target']
  });
};

ol.inherits(ol.control.LayerSwitcher, ol.control.Control);
(0, _mixin2.default)(ol.control.LayerSwitcher, _layerUtils2.default);

ol.control.LayerSwitcher.prototype.initDomInternal = function (layers, className, key) {
  var _this = this;

  var width = this.options['itemWidth'];
  var height = this.options['itemHeight'];
  var length = layers.length;
  this.innerElement_.style.width = width + (length - 1) * 10 + 'px';
  this.innerElement_.style.height = height + 'px';
  layers.forEach(function (item, index) {
    if (item && item[key]) {
      var li_ = htmlUtils.create('li', className + '-li-inner', _this.innerElement_, className + '-li' + index + '-inner');
      li_.style.background = 'url(' + item['icon'] + ') 0px 0px no-repeat';
      li_.style.width = width + 'px';
      li_.style.height = height + 'px';
      li_.style.zIndex = index + 1;
      li_.style.right = '0px';
      li_.style.marginRight = (length - 1 - index) * 10 + 'px';
      li_.setAttribute('data-name', item[key]);
      Events.listen(li_, 'click', _this.handleClick_, _this);
      if (item['name']) {
        var name_ = htmlUtils.create('span', 'layer-name', li_);
        name_.setAttribute('data-name', item[key]);
        name_.innerHTML = item['name'];
      }
      if (!_this.isActionSelected_ && (item[_this.isDefaultKey] || index === length - 1)) {
        htmlUtils.addClass(li_, 'selected-item');
        _this.isActionSelected_ = true;
      }
    }
  });
};

ol.control.LayerSwitcher.prototype.contentMouseOver_ = function (event) {
  var length = this.options['layers'].length;
  if (length > 0) {
    for (var i = 0; i < length - 1; i++) {
      var item = htmlUtils.get(this.className_ + '-li' + i + '-inner');
      if (item) {
        item.style.marginRight = '0px';
        item.style.zIndex = '';
        item.style.right = (length - 1 - i) * (10 + this.options['itemWidth']) + 'px';
      }
    }
    this.innerElement_.style.width = this.options['itemWidth'] * length + 10 * (length - 1) + 'px';
  }
};

ol.control.LayerSwitcher.prototype.contentMouseOut_ = function (event) {
  var length = this.options['layers'].length;
  if (length > 0) {
    for (var i = 0; i < length - 1; i++) {
      var item = htmlUtils.get(this.className_ + '-li' + i + '-inner');
      if (item) {
        item.style.zIndex = i + 1;
        item.style.right = '0px';
        item.style.marginRight = (length - 1 - i) * 10 + 'px';
      }
    }
    this.innerElement_.style.width = this.options['itemWidth'] + (length - 1) * 10 + 'px';
  }
};

ol.control.LayerSwitcher.prototype.handleClick_ = function (event) {
  var value = event.target.getAttribute('data-name');
  this.switcher(this.options['key'], value);
};

ol.control.LayerSwitcher.prototype.switcher = function (key, value) {
  var _this2 = this;

  if (!this.map) return;
  if (this.baseLayers_.length <= 0) {
    this.baseLayers_ = this.getLayersArrayByKeyValue(this.baseLayerKey, true);
  }
  if (this.labelLayers_.length <= 0) {
    this.labelLayers_ = this.getLayersArrayByKeyValue(this.labelLayerKey, true);
  }
  if (this.baseLayers_.length > 0 && this.baseLayers_.length === this.options['layers'].length) {
    if (this.labelLayers_ && this.labelLayers_.length > 0) {
      this.labelLayers_.forEach(function (labelLayer) {
        if (labelLayer && labelLayer.get(_this2.labelAliasKey) === value) {
          labelLayer.setVisible(true);
        } else {
          labelLayer.setVisible(false);
        }
      });
    }
    this.baseLayers_.forEach(function (layer) {
      if (layer && layer.get(key) === value) {
        layer.setVisible(true);
        layer.set(_this2.isDefaultKey, true);
      } else {
        layer.setVisible(false);
        layer.set(_this2.isDefaultKey, false);
      }
    });
    var length = this.options['layers'].length;
    if (length > 0) {
      for (var i = 0; i < length; i++) {
        var item = htmlUtils.get(this.className_ + '-li' + i + '-inner');
        if (item && item.getAttribute('data-name') === value) {
          htmlUtils.addClass(item, 'selected-item');
        } else {
          htmlUtils.removeClass(item, 'selected-item');
        }
      }
    }
  } else {
    throw new Error('请检查是否存在底图获取底图数量是否和配置相同！');
  }
};

ol.control.LayerSwitcher.prototype.setMap = function (map) {
  ol.control.Control.prototype.setMap.call(this, map);
  this.map = map;
  if (map && map instanceof ol.Map) {
    this.baseLayers_ = this.getLayersArrayByKeyValue(this.baseLayerKey, true);
    this.labelLayers_ = this.getLayersArrayByKeyValue(this.labelLayerKey, true);
  }
};

var olControlLayerSwitcher = ol.control.LayerSwitcher;
exports.default = olControlLayerSwitcher;
module.exports = exports['default'];

/***/ }),

/***/ 128:
/***/ (function(module, exports) {

// removed by extract-text-webpack-plugin

/***/ }),

/***/ 17:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
ol.layer.LayerUtils = function (map) {
  if (map && map instanceof ol.Map) {
    this.map = map;
  } else {
    throw new Error('传入的不是地图对象！');
  }
};

ol.layer.LayerUtils.prototype.getLayerByLayerName = function (layerName) {
  try {
    var targetLayer = null;
    if (this.map) {
      var layers = this.map.getLayers().getArray();
      targetLayer = this.getLayerInternal(layers, 'layerName', layerName);
    }
    return targetLayer;
  } catch (e) {
    console.log(e);
  }
};

ol.layer.LayerUtils.prototype.getLayerInternal = function (layers, key, value) {
  var _this = this;

  var _target = null;
  if (layers.length > 0) {
    layers.every(function (layer) {
      if (layer instanceof ol.layer.Group) {
        var _layers = layer.getLayers().getArray();
        _target = _this.getLayerInternal(_layers, key, value);
        if (_target) {
          return false;
        } else {
          return true;
        }
      } else if (layer.get(key) === value) {
        _target = layer;
        return false;
      } else {
        return true;
      }
    });
  }
  return _target;
};

ol.layer.LayerUtils.prototype.getLayersArrayInternal = function (layers, key, value) {
  var _this2 = this;

  var _target = [];
  if (layers.length > 0) {
    layers.forEach(function (layer) {
      if (layer instanceof ol.layer.Group) {
        var _layers2 = layer.getLayers().getArray();
        _target = _this2.getLayerInternal(_layers2, key, value);
        if (_target) {
          _target.push(layer);
        }
      } else if (layer.get(key) === value) {
        _target.push(layer);
      }
    });
  }
  return _target;
};

ol.layer.LayerUtils.prototype.getLayerByKeyValue = function (key, value) {
  try {
    var targetLayer = null;
    if (this.map) {
      var layers = this.map.getLayers().getArray();
      targetLayer = this.getLayerInternal(layers, key, value);
    }
    return targetLayer;
  } catch (e) {
    console.log(e);
  }
};

ol.layer.LayerUtils.prototype.getLayersArrayByKeyValue = function (key, value) {
  try {
    var targetLayers = [];
    if (this.map) {
      var layers = this.map.getLayers().getArray();
      targetLayers = this.getLayersArrayInternal(layers, key, value);
    }
    return targetLayers;
  } catch (e) {
    console.log(e);
  }
};

ol.layer.LayerUtils.prototype.createVectorLayer = function (layerName, params) {
  try {
    if (this.map) {
      var vectorLayer = this.getLayerByLayerName(layerName);
      if (!(vectorLayer instanceof ol.layer.Vector)) {
        vectorLayer = null;
      }
      if (!vectorLayer) {
        if (params && params.create) {
          vectorLayer = new ol.layer.Vector({
            layerName: layerName,
            params: params,
            layerType: 'vector',
            source: new ol.source.Vector({
              wrapX: false
            }),
            style: new ol.style.Style({
              fill: new ol.style.Fill({
                color: 'rgba(67, 110, 238, 0.4)'
              }),
              stroke: new ol.style.Stroke({
                color: '#4781d9',
                width: 2
              }),
              image: new ol.style.Circle({
                radius: 7,
                fill: new ol.style.Fill({
                  color: '#ffcc33'
                })
              })
            })
          });
        }
      }
      if (this.map && vectorLayer) {
        if (params && params.hasOwnProperty('selectable')) {
          vectorLayer.set('selectable', params.selectable);
        }

        var _vectorLayer = this.getLayerByLayerName(layerName);
        if (!_vectorLayer || !(_vectorLayer instanceof ol.layer.Vector)) {
          this.map.addLayer(vectorLayer);
        }
      }
      return vectorLayer;
    }
  } catch (e) {
    console.log(e);
  }
};

var olLayerLayerUtils = ol.layer.LayerUtils;
exports.default = olLayerLayerUtils;
module.exports = exports['default'];

/***/ }),

/***/ 19:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var copyProperties = function copyProperties(target, source) {
  var _iteratorNormalCompletion = true;
  var _didIteratorError = false;
  var _iteratorError = undefined;

  try {
    for (var _iterator = Object.getOwnPropertyNames(source)[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
      var key = _step.value;

      if (!key.match(/^(?:constructor|prototype|arguments|caller|name|bind|call|apply|toString|length)$/)) {
        var desc = Object.getOwnPropertyDescriptor(source, key);
        Object.defineProperty(target, key, desc);
      }
    }
  } catch (err) {
    _didIteratorError = true;
    _iteratorError = err;
  } finally {
    try {
      if (!_iteratorNormalCompletion && _iterator.return) {
        _iterator.return();
      }
    } finally {
      if (_didIteratorError) {
        throw _iteratorError;
      }
    }
  }
};

var mixin = function mixin(childCtor) {
  for (var _len = arguments.length, mixins = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
    mixins[_key - 1] = arguments[_key];
  }

  for (var key in mixins) {
    var _mixin = mixins[key];
    copyProperties(childCtor, _mixin);
    copyProperties(childCtor.prototype, _mixin.prototype);
  }
};

exports.default = mixin;
module.exports = exports["default"];

/***/ }),

/***/ 2:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.removeListener = exports.addListener = exports.getDomEventKey = exports.unlistenAll = exports.clear = exports.unListenByKey = exports.unListen = exports.listenOnce = exports.listen = exports.removeListeners = exports.getListenerMap = exports.getListeners = exports.findListener = exports.bindListener = undefined;

var _utils = __webpack_require__(4);

var bindListener = exports.bindListener = function bindListener(listenerObj) {
  var boundListener = function boundListener(evt) {
    var listener = listenerObj.listener;
    var bindTo = listenerObj.bindTo || listenerObj.target;
    if (listenerObj.callOnce) {
      unListenByKey(listenerObj);
    }
    return listener.call(bindTo, evt);
  };
  listenerObj.boundListener = boundListener;
  return boundListener;
};

var findListener = exports.findListener = function findListener(listeners, listener, optThis, optSetDeleteIndex) {
  var listenerObj = null;
  for (var i = 0, ii = listeners.length; i < ii; ++i) {
    listenerObj = listeners[i];
    if (listenerObj.listener === listener && listenerObj.bindTo === optThis) {
      if (optSetDeleteIndex) {
        listenerObj.deleteIndex = i;
      }
      return listenerObj;
    }
  }
  return undefined;
};

var getListeners = exports.getListeners = function getListeners(target, type) {
  var listenerMap = target.vlm;
  return listenerMap ? listenerMap[type] : undefined;
};

var getListenerMap = exports.getListenerMap = function getListenerMap(target) {
  var listenerMap = target.vlm;
  if (!listenerMap) {
    listenerMap = target.vlm = {};
  }
  return listenerMap;
};

var removeListeners = exports.removeListeners = function removeListeners(target, type) {
  var listeners = getListeners(target, type);
  if (listeners) {
    for (var i = 0, ii = listeners.length; i < ii; ++i) {
      target.removeEventListener(type, listeners[i].boundListener);
      clear(listeners[i]);
    }
    listeners.length = 0;
    var listenerMap = target.vlm;
    if (listenerMap) {
      delete listenerMap[type];
      if (Object.keys(listenerMap).length === 0) {
        delete target.vlm;
      }
    }
  }
};

var listen = exports.listen = function listen(target, type, listener, optThis, optOnce) {
  var listenerMap = getListenerMap(target);
  var listeners = listenerMap[type];
  if (!listeners) {
    listeners = listenerMap[type] = [];
  }
  var listenerObj = findListener(listeners, listener, optThis, false);
  if (listenerObj) {
    if (!optOnce) {
      listenerObj.callOnce = false;
    }
  } else {
    listenerObj = {
      bindTo: optThis,
      callOnce: !!optOnce,
      listener: listener,
      target: target,
      type: type
    };
    target.addEventListener(type, bindListener(listenerObj));
    listeners.push(listenerObj);
  }
  return listenerObj;
};

var listenOnce = exports.listenOnce = function listenOnce(target, type, listener, optThis) {
  return listen(target, type, listener, optThis, true);
};

var unListen = exports.unListen = function unListen(target, type, listener, optThis) {
  var listeners = getListeners(target, type);
  if (listeners) {
    var listenerObj = findListener(listeners, listener, optThis, true);
    if (listenerObj) {
      unListenByKey(listenerObj);
    }
  }
};

var unListenByKey = exports.unListenByKey = function unListenByKey(key) {
  if (key && key.target) {
    key.target.removeEventListener(key.type, key.boundListener);
    var listeners = getListeners(key.target, key.type);
    if (listeners) {
      var i = 'deleteIndex' in key ? key.deleteIndex : listeners.indexOf(key);
      if (i !== -1) {
        listeners.splice(i, 1);
      }
      if (listeners.length === 0) {
        removeListeners(key.target, key.type);
      }
    }
    clear(key);
  }
};

var clear = exports.clear = function clear(object) {
  for (var property in object) {
    delete object[property];
  }
};

var unlistenAll = exports.unlistenAll = function unlistenAll(target) {
  var listenerMap = getListenerMap(target);
  for (var type in listenerMap) {
    removeListeners(target, type);
  }
};

var getDomEventKey = exports.getDomEventKey = function getDomEventKey(type, fn, context) {
  return '_dom_event_' + type + '_' + (0, _utils.stamp)(fn) + (context ? '_' + (0, _utils.stamp)(context) : '');
};

var addListener = exports.addListener = function addListener(element, type, fn, context) {
  var eventKey = getDomEventKey(type, fn, context);
  var handler = element[eventKey];
  if (handler) {
    return this;
  }
  handler = function handler(e) {
    return fn.call(context || element, e);
  };
  if ('addEventListener' in element) {
    element.addEventListener(type, handler, false);
  } else if ('attachEvent' in element) {
    element.attachEvent('on' + type, handler);
  }
  element[eventKey] = handler;
  return this;
};

var removeListener = exports.removeListener = function removeListener(element, type, fn, context) {
  var eventKey = getDomEventKey(type, fn, context);
  var handler = element[eventKey];
  if (!handler) {
    return this;
  }
  if ('removeEventListener' in element) {
    element.removeEventListener(type, handler, false);
  } else if ('detachEvent' in element) {
    element.detachEvent('on' + type, handler);
  }
  element[eventKey] = null;
  return this;
};

/***/ }),

/***/ 3:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
exports.createHidden = exports.setClass = exports.removeClass = exports.addClass = exports.hasClass = exports.toBack = exports.toFront = exports.empty = exports.remove = exports.create = exports.getStyle = exports.getClass = exports.getElementsByClassName = exports.getChildByTagName = exports.get = undefined;

var _utils = __webpack_require__(4);

var get = exports.get = function get(id) {
  return typeof id === 'string' ? document.getElementById(id) : id;
};

var getChildByTagName = exports.getChildByTagName = function getChildByTagName(str, container) {
  return container.getElementsByTagName(str);
};

var getElementsByClassName = exports.getElementsByClassName = function getElementsByClassName(str, container, root) {
  var _root = root || window;
  var $ = _root.document.querySelector.bind(_root.document);

  var target = $(str);
  return target;
};

var getClass = exports.getClass = function getClass(elem) {
  return elem.getAttribute && elem.getAttribute('class') || '';
};

var getStyle = exports.getStyle = function getStyle(el, style) {
  var value = el.style[style] || el.currentStyle && el.currentStyle[style];
  if ((!value || value === 'auto') && document.defaultView) {
    var css = document.defaultView.getComputedStyle(el, null);
    value = css ? css[style] : null;
  }
  return value === 'auto' ? null : value;
};

var create = exports.create = function create(tagName, className, container, id) {
  var el = document.createElement(tagName);
  el.className = className || '';
  if (id) {
    el.id = id;
  }
  if (container) {
    container.appendChild(el);
  }
  return el;
};

var remove = exports.remove = function remove(el) {
  var parent = el.parentNode;
  if (parent) {
    parent.removeChild(el);
  }
};

var empty = exports.empty = function empty(el) {
  while (el.firstChild) {
    el.removeChild(el.firstChild);
  }
};

var toFront = exports.toFront = function toFront(el) {
  el.parentNode.appendChild(el);
};

var toBack = exports.toBack = function toBack(el) {
  var parent = el.parentNode;
  parent.insertBefore(el, parent.firstChild);
};

var hasClass = exports.hasClass = function hasClass(el, name) {
  if (el.classList !== undefined) {
    return el.classList.contains(name);
  }
  var className = getClass(el);
  return className.length > 0 && new RegExp('(^|\\s)' + name + '(\\s|$)').test(className);
};

var addClass = exports.addClass = function addClass(el, name) {
  if (el.classList !== undefined) {
    var classes = (0, _utils.splitWords)(name);
    for (var i = 0, len = classes.length; i < len; i++) {
      el.classList.add(classes[i]);
    }
  } else if (!hasClass(el, name)) {
    var className = getClass(el);
    setClass(el, (className ? className + ' ' : '') + name);
  }
};

var removeClass = exports.removeClass = function removeClass(el, name) {
  if (el.classList !== undefined) {
    el.classList.remove(name);
  } else {
    setClass(el, String.trim((' ' + getClass(el) + ' ').replace(' ' + name + ' ', ' ')));
  }
};

var setClass = exports.setClass = function setClass(el, name) {
  if (el.className.baseVal === undefined) {
    el.className = name;
  } else {
    el.className.baseVal = name;
  }
};

var createHidden = exports.createHidden = function createHidden(tagName, parent, id) {
  var element = document.createElement(tagName);
  element.style.display = 'none';
  if (id) {
    element.id = id;
  }
  if (parent) {
    parent.appendChild(element);
  }
  return element;
};

/***/ }),

/***/ 4:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});
var getrandom = exports.getrandom = function getrandom(t1, t2, t3) {
  if (!t1 || isNaN(t1)) {
    t1 = 0;
  }
  if (!t2 || isNaN(t2)) {
    t2 = 1;
  }
  if (!t3 || isNaN(t3)) {
    t3 = 0;
  }
  t3 = t3 > 15 ? 15 : t3;
  var _ref = [Math.random() * (t2 - t1) + t1, Math.pow(10, t3)],
      ra = _ref[0],
      du = _ref[1];

  ra = Math.round(ra * du) / du;
  return ra;
};

var getuuid = exports.getuuid = function getuuid() {
  var s = [],
      hexDigits = '0123456789abcdef';

  for (var i = 0; i < 36; i++) {
    s[i] = hexDigits.substr(Math.floor(Math.random() * 0x10), 1);
  }
  s[14] = '4';
  s[19] = hexDigits.substr(s[19] & 0x3 | 0x8, 1);
  s[8] = s[13] = s[18] = s[23] = '-';
  return s.join('');
};

var stamp = exports.stamp = function stamp(obj) {
  var key = '_event_id_';
  obj[key] = obj[key] || getuuid();
  return obj[key];
};

var trim = exports.trim = function trim(str) {
  return str.trim ? str.trim() : str.replace(/^\s+|\s+$/g, '');
};

var splitWords = exports.splitWords = function splitWords(str) {
  return trim(str).split(/\s+/);
};

var firstUpperToCase = exports.firstUpperToCase = function firstUpperToCase(str) {
  return str.toLowerCase().replace(/( |^)[a-z]/g, function (L) {
    return L.toUpperCase();
  });
};
var upperFirstChart = exports.upperFirstChart = function upperFirstChart(str) {
  return str.replace(/( |^)[a-z]/g, function (L) {
    return L.toUpperCase();
  });
};

var arrayRemove = exports.arrayRemove = function arrayRemove(arr, obj) {
  var i = arr.indexOf(obj);
  var found = i > -1;
  if (found) {
    arr.splice(i, 1);
  }
  return found;
};

/***/ }),

/***/ 9:
/***/ (function(module, exports, __webpack_require__) {

"use strict";


Object.defineProperty(exports, "__esModule", {
  value: true
});


var BASE_CLASS_NAME = {
  CLASS_HIDDEN: 'ol-hidden',
  CLASS_SELECTABLE: 'ol-selectable',
  CLASS_UNSELECTABLE: 'ol-unselectable',
  CLASS_CONTROL: 'ol-control'
};

exports.BASE_CLASS_NAME = BASE_CLASS_NAME;

/***/ })

/******/ });
});
//# sourceMappingURL=olControlLayerSwitcher.js.map