module.exports =
/******/ (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;
/******/
/******/ 	// 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 = "/dist/";
/******/
/******/ 	// Load entry module and return exports
/******/ 	return __webpack_require__(__webpack_require__.s = 158);
/******/ })
/************************************************************************/
/******/ ({

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

/* globals __VUE_SSR_CONTEXT__ */

// IMPORTANT: Do NOT use ES2015 features in this file.
// This module is a runtime utility for cleaner component module output and will
// be included in the final webpack user bundle.

module.exports = function normalizeComponent (
  rawScriptExports,
  compiledTemplate,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier /* server only */
) {
  var esModule
  var scriptExports = rawScriptExports = rawScriptExports || {}

  // ES6 modules interop
  var type = typeof rawScriptExports.default
  if (type === 'object' || type === 'function') {
    esModule = rawScriptExports
    scriptExports = rawScriptExports.default
  }

  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

  // render functions
  if (compiledTemplate) {
    options.render = compiledTemplate.render
    options.staticRenderFns = compiledTemplate.staticRenderFns
    options._compiled = true
  }

  // functional template
  if (functionalTemplate) {
    options.functional = true
  }

  // scopedId
  if (scopeId) {
    options._scopeId = scopeId
  }

  var hook
  if (moduleIdentifier) { // server build
    hook = function (context) {
      // 2.3 injection
      context =
        context || // cached call
        (this.$vnode && this.$vnode.ssrContext) || // stateful
        (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext) // functional
      // 2.2 with runInNewContext: true
      if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {
        context = __VUE_SSR_CONTEXT__
      }
      // inject component styles
      if (injectStyles) {
        injectStyles.call(this, context)
      }
      // register component module identifier for async chunk inferrence
      if (context && context._registeredComponents) {
        context._registeredComponents.add(moduleIdentifier)
      }
    }
    // used by ssr in case component is cached and beforeCreate
    // never gets called
    options._ssrRegister = hook
  } else if (injectStyles) {
    hook = injectStyles
  }

  if (hook) {
    var functional = options.functional
    var existing = functional
      ? options.render
      : options.beforeCreate

    if (!functional) {
      // inject component registration as beforeCreate hook
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    } else {
      // for template-only hot-reload because in that case the render fn doesn't
      // go through the normalizer
      options._injectStyles = hook
      // register for functioal component in vue file
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return existing(h, context)
      }
    }
  }

  return {
    esModule: esModule,
    exports: scriptExports,
    options: options
  }
}


/***/ }),

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

module.exports = require("kyligence-kylin-ui/lib/mixins/emitter");

/***/ }),

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

module.exports = __webpack_require__(159);


/***/ }),

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

"use strict";


exports.__esModule = true;

var _component = __webpack_require__(160);

var _component2 = _interopRequireDefault(_component);

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

/* istanbul ignore next */
_component2.default.install = function (Vue) {
  Vue.component(_component2.default.name, _component2.default);
};

exports.default = _component2.default;

/***/ }),

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

module.exports = require("kyligence-kylin-ui/lib/utils/popup");

/***/ }),

/***/ 160:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
Object.defineProperty(__webpack_exports__, "__esModule", { value: true });
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_component_vue__ = __webpack_require__(53);
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_component_vue___default = __webpack_require__.n(__WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_component_vue__);
/* harmony namespace reexport (unknown) */ for(var __WEBPACK_IMPORT_KEY__ in __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_component_vue__) if(__WEBPACK_IMPORT_KEY__ !== 'default') (function(key) { __webpack_require__.d(__webpack_exports__, key, function() { return __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_component_vue__[key]; }) }(__WEBPACK_IMPORT_KEY__));
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_12ef8bc1_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_component_vue__ = __webpack_require__(161);
var normalizeComponent = __webpack_require__(0)
/* script */


/* template */

/* template functional */
var __vue_template_functional__ = false
/* styles */
var __vue_styles__ = null
/* scopeId */
var __vue_scopeId__ = null
/* moduleIdentifier (server only) */
var __vue_module_identifier__ = null
var Component = normalizeComponent(
  __WEBPACK_IMPORTED_MODULE_0__babel_loader_node_modules_vue_loader_lib_selector_type_script_index_0_component_vue___default.a,
  __WEBPACK_IMPORTED_MODULE_1__node_modules_vue_loader_lib_template_compiler_index_id_data_v_12ef8bc1_hasScoped_false_preserveWhitespace_false_buble_transforms_node_modules_vue_loader_lib_selector_type_template_index_0_component_vue__["a" /* default */],
  __vue_template_functional__,
  __vue_styles__,
  __vue_scopeId__,
  __vue_module_identifier__
)

/* harmony default export */ __webpack_exports__["default"] = (Component.exports);


/***/ }),

/***/ 161:
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('transition',{attrs:{"name":"dialog-fade"},on:{"after-enter":_vm.afterEnter,"after-leave":_vm.afterLeave}},[_c('div',{directives:[{name:"show",rawName:"v-show",value:(_vm.visible),expression:"visible"}],staticClass:"el-dialog__wrapper",on:{"click":function($event){if($event.target !== $event.currentTarget){ return null; }_vm.handleWrapperClick($event)}}},[_c('div',{ref:"dialog",staticClass:"el-dialog",class:[{ 'is-fullscreen': _vm.fullscreen, 'el-dialog--center': _vm.center }, _vm.customClass],style:(_vm.style)},[_c('div',{staticClass:"el-dialog__header",class:{'dragable': _vm.isDragable}},[(_vm.statusIcon)?_c('el-icon',{attrs:{"name":_vm.statusIcon,"type":"mult"}}):_vm._e(),_vm._t("title",[_c('span',{staticClass:"el-dialog__title"},[_vm._v(_vm._s(_vm.title))])]),(_vm.showClose)?_c('el-button',{staticClass:"el-dialog__headerbtn",attrs:{"type":"button","aria-label":"Close","nobg-text":"","icon":"el-ksd-icon-close_22"},on:{"click":function($event){$event.stopPropagation();_vm.handleClose($event)}}}):_vm._e()],2),(_vm.rendered)?_c('div',{staticClass:"el-dialog__body",style:(_vm.bodyStyle)},[_vm._t("default")],2):_vm._e(),(_vm.$slots.footer)?_c('div',{staticClass:"el-dialog__footer"},[_vm._t("footer")],2):_vm._e()])])])}
var staticRenderFns = []
var esExports = { render: render, staticRenderFns: staticRenderFns }
/* harmony default export */ __webpack_exports__["a"] = (esExports);

/***/ }),

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

"use strict";


exports.__esModule = true;

var _popup = __webpack_require__(16);

var _popup2 = _interopRequireDefault(_popup);

var _migrating = __webpack_require__(7);

var _migrating2 = _interopRequireDefault(_migrating);

var _emitter = __webpack_require__(1);

var _emitter2 = _interopRequireDefault(_emitter);

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

exports.default = {
  name: 'ElDialog',

  mixins: [_popup2.default, _emitter2.default, _migrating2.default],

  props: {
    title: {
      type: String,
      default: ''
    },

    modal: {
      type: Boolean,
      default: true
    },

    modalAppendToBody: {
      type: Boolean,
      default: true
    },

    appendToBody: {
      type: Boolean,
      default: false
    },

    isDragable: {
      type: Boolean,
      default: false
    },

    lockScroll: {
      type: Boolean,
      default: true
    },

    closeOnClickModal: {
      type: Boolean,
      default: true
    },

    closeOnPressEscape: {
      type: Boolean,
      default: true
    },

    showClose: {
      type: Boolean,
      default: true
    },

    width: String,

    fullscreen: Boolean,

    customClass: {
      type: String,
      default: ''
    },

    top: {
      type: String,
      default: '15vh'
    },
    beforeClose: Function,
    center: {
      type: Boolean,
      default: false
    },
    limitedArea: {
      type: Boolean,
      default: false
    },
    statusIcon: String
  },

  data: function data() {
    return {
      closed: false,
      mousePoint: { x: 0, y: 0 },
      offset: { left: 0, top: 0 },
      bodyStyle: {},
      dialogStyle: {},
      _scrollSizeCache: null
    };
  },


  watch: {
    visible: function visible(val) {
      var _this = this;

      if (val) {
        var hasTitleSlot = this.$slots && this.$slots.title && this.$slots.title[0] && this.$slots.title[0].data;
        var slotTitleClass = hasTitleSlot && this.$slots.title[0].data.staticClass ? this.$slots.title[0].data.staticClass : '';
        if (hasTitleSlot && slotTitleClass.indexOf('el-dialog__title') === -1) {
          var tempClass = slotTitleClass ? slotTitleClass + ' el-dialog__title' : 'el-dialog__title';
          this.$slots.title[0].data.staticClass = tempClass;
        }
        this.closed = false;
        this.$emit('open');
        this.$el.addEventListener('scroll', this.updatePopper);
        if (this.isDragable) {
          this.dragable();
        }
        this.$nextTick(function () {
          _this.$refs.dialog.scrollTop = 0;
          _this.$el.focus();
          _this.resetSize();
          // console.log(this.$el);
        });
        if (this.appendToBody) {
          document.body.appendChild(this.$el);
        }
      } else {
        this.$el.removeEventListener('scroll', this.updatePopper);
        if (!this.closed) this.$emit('close');
      }
    }
  },

  computed: {
    style: function style() {
      var style = {};
      if (this.limitedArea) {
        var scrollBarSize = this._getScrollbarSize();
        style['max-width'] = 'calc(100vw - ' + scrollBarSize.width + 'px)';
      }
      if (this.width) {
        style.width = this.width;
      }
      if (!this.fullscreen) {
        style.marginTop = this.top;
      }
      return style;
    }
  },

  methods: {
    _getScrollbarSize: function _getScrollbarSize() {
      if (this._scrollSizeCache) {
        return this._scrollSizeCache;
      }
      var oP = document.createElement('p');
      var styles = {
        width: '100px',
        height: '100px',
        overflow: 'scroll',
        position: 'absolute'
      };
      var i = void 0;
      var scrollbarWidth = void 0;
      var scrollbarHeight = void 0;
      for (i in styles) {
        oP.style[i] = styles[i];
      }
      document.body.appendChild(oP);
      scrollbarWidth = oP.offsetWidth - oP.clientWidth;
      scrollbarHeight = oP.offsetHeight - oP.clientHeight;
      removeElement(oP);
      function removeElement(_element) {
        var _parentElement = _element.parentNode;
        if (_parentElement) {
          _parentElement.removeChild(_element);
        }
      }
      this._scrollSizeCache = {
        width: scrollbarWidth, height: scrollbarHeight
      };
      return this._scrollSizeCache;
    },
    resetSize: function resetSize() {
      var _this2 = this;

      if (!this.limitedArea) {
        return;
      }
      this.$nextTick(function () {
        var headerDom = _this2.$el.querySelector('.el-dialog__header');
        var footerDom = _this2.$el.querySelector('.el-dialog__footer');
        var bodyDom = _this2.$el.querySelector('.el-dialog__body');
        var padding = 0;
        var computedDomStyle = window.getComputedStyle(bodyDom, null);
        padding += +computedDomStyle.paddingTop.replace('px', '');
        padding += +computedDomStyle.paddingBottom.replace('px', '');
        var headerH = headerDom && headerDom.offsetHeight || 0;
        var footerH = footerDom && footerDom.offsetHeight || 0;
        var scrollBarSize = _this2._getScrollbarSize();
        _this2.bodyStyle = {
          'max-height': 'calc(100vh - ' + scrollBarSize.height + 'px - ' + _this2.top + ' - ' + headerH + 'px - ' + footerH + 'px - ' + padding + 'px)',
          'overflow-y': 'auto'
        };
      });
    },
    getMigratingConfig: function getMigratingConfig() {
      return {
        props: {
          'size': 'size is removed.'
        }
      };
    },
    handleWrapperClick: function handleWrapperClick() {
      if (!this.closeOnClickModal) return;
      this.handleClose();
    },
    handleClose: function handleClose() {
      if (typeof this.beforeClose === 'function') {
        this.beforeClose(this.hide);
      } else {
        this.hide();
      }
    },
    hide: function hide(cancel) {
      if (cancel !== false) {
        this.$emit('update:visible', false);
        this.$emit('close');
        this.closed = true;
      }
    },
    updatePopper: function updatePopper() {
      this.broadcast('ElSelectDropdown', 'updatePopper');
      this.broadcast('ElDropdownMenu', 'updatePopper');
    },
    dragable: function dragable() {
      var _this3 = this;

      var targetid = this.$el.querySelector('.el-dialog__header');
      var moveTarget = this.$el.querySelector('.el-dialog');
      var leftLimit = void 0;
      var topLimit = void 0;
      var topMaxLimit = void 0;
      targetid.onmousedown = function (event) {
        var e = event;
        var offsetLeft = _this3.offset.left;
        var offsetTop = _this3.offset.top;
        leftLimit = (window.innerWidth - moveTarget.offsetWidth) / 2;
        topLimit = window.innerHeight * moveTarget.style['margin-top'].split('vh')[0] / 100;
        topMaxLimit = window.innerHeight * (100 - moveTarget.style['margin-top'].split('vh')[0]) / 100 - moveTarget.offsetHeight;
        _this3.mousePoint.x = e.clientX - offsetLeft;
        _this3.mousePoint.y = e.clientY - offsetTop;
        document.onmousemove = move;
        e.stopPropagation();
      };
      var move = function move(event) {
        var e = event;
        var l = e.clientX - _this3.mousePoint.x;
        var t = e.clientY - _this3.mousePoint.y;
        if (l < 0 - leftLimit) {
          l = 0 - leftLimit;
        } else if (l > leftLimit) {
          l = leftLimit;
        }
        if (t < 0 - topLimit) {
          t = 0 - topLimit;
        } else if (t > topMaxLimit) {
          t = topMaxLimit;
        }
        _this3.offset.left = l;
        _this3.offset.top = t;
        moveTarget.style.left = _this3.offset.left + 'px';
        moveTarget.style.top = _this3.offset.top + 'px';
        document.onmouseup = end;
        targetid.onmouseup = end;
        e.stopPropagation();
      };
      var end = function end(event) {
        var e = event;
        document.onmousemove = null;
        document.onmouseup = null;
        e.stopPropagation();
      };
    },
    afterEnter: function afterEnter() {
      this.$emit('opened');
    },
    afterLeave: function afterLeave() {
      this.$emit('closed');
    }
  },

  mounted: function mounted() {
    if (this.visible) {
      this.rendered = true;
      this.open();
      if (this.appendToBody) {
        document.body.appendChild(this.$el);
      }
      this.resetSize();
      window.addEventListener('resize', this.resetSize);
    }
  },
  beforeDestroy: function beforeDestroy() {
    window.removeEventListener('resize', this.resetSize);
  },
  destroyed: function destroyed() {
    // if appendToBody is true, remove DOM node after destroy
    if (this.appendToBody && this.$el && this.$el.parentNode) {
      this.$el.parentNode.removeChild(this.$el);
    }
  }
}; //
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//

/***/ }),

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

module.exports = require("kyligence-kylin-ui/lib/mixins/migrating");

/***/ })

/******/ });