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, { enumerable: true, get: getter });
/******/ 		}
/******/ 	};
/******/
/******/ 	// define __esModule on exports
/******/ 	__webpack_require__.r = function(exports) {
/******/ 		if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
/******/ 			Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
/******/ 		}
/******/ 		Object.defineProperty(exports, '__esModule', { value: true });
/******/ 	};
/******/
/******/ 	// create a fake namespace object
/******/ 	// mode & 1: value is a module id, require it
/******/ 	// mode & 2: merge all properties of value into the ns
/******/ 	// mode & 4: return value when already ns object
/******/ 	// mode & 8|1: behave like require
/******/ 	__webpack_require__.t = function(value, mode) {
/******/ 		if(mode & 1) value = __webpack_require__(value);
/******/ 		if(mode & 8) return value;
/******/ 		if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
/******/ 		var ns = Object.create(null);
/******/ 		__webpack_require__.r(ns);
/******/ 		Object.defineProperty(ns, 'default', { enumerable: true, value: value });
/******/ 		if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
/******/ 		return ns;
/******/ 	};
/******/
/******/ 	// 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 = 84);
/******/ })
/************************************************************************/
/******/ ({

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

"use strict";
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return normalizeComponent; });
/* globals __VUE_SSR_CONTEXT__ */

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

function normalizeComponent (
  scriptExports,
  render,
  staticRenderFns,
  functionalTemplate,
  injectStyles,
  scopeId,
  moduleIdentifier, /* server only */
  shadowMode /* vue-cli only */
) {
  // Vue.extend constructor export interop
  var options = typeof scriptExports === 'function'
    ? scriptExports.options
    : scriptExports

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

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

  // scopedId
  if (scopeId) {
    options._scopeId = 'data-v-' + 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 = shadowMode
      ? function () { injectStyles.call(this, this.$root.$options.shadowRoot) }
      : injectStyles
  }

  if (hook) {
    if (options.functional) {
      // 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
      var originalRender = options.render
      options.render = function renderWithStyleInjection (h, context) {
        hook.call(context)
        return originalRender(h, context)
      }
    } else {
      // inject component registration as beforeCreate hook
      var existing = options.beforeCreate
      options.beforeCreate = existing
        ? [].concat(existing, hook)
        : [hook]
    }
  }

  return {
    exports: scriptExports,
    options: options
  }
}


/***/ }),

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

module.exports = require("d-element-ui/lib/mixins/migrating");

/***/ }),

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

module.exports = require("d-element-ui/lib/button");

/***/ }),

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

module.exports = require("d-element-ui/lib/utils/popup");

/***/ }),

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

module.exports = require("d-element-ui/lib/utils/dom");

/***/ }),

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

module.exports = require("d-element-ui/lib/mixins/emitter");

/***/ }),

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

"use strict";
__webpack_require__.r(__webpack_exports__);

// CONCATENATED MODULE: ./node_modules/vue-loader/lib/loaders/templateLoader.js??vue-loader-options!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/component.vue?vue&type=template&id=60140e62&
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",
          style: { "pointer-events": _vm.modalEvent ? "auto" : "none" },
          on: {
            click: function($event) {
              if ($event.target !== $event.currentTarget) {
                return null
              }
              return _vm.handleWrapperClick($event)
            }
          }
        },
        [
          _c(
            "div",
            {
              key: _vm.key,
              ref: "dialog",
              class: [
                "el-dialog",
                {
                  "is-fullscreen": _vm.fullscreen,
                  "el-dialog--center": _vm.center,
                  "el-dialog--noPadding": !_vm.defaultPadding
                },
                _vm.dialogSize ? "el-dialog--" + _vm.dialogSize : "",
                _vm.className
              ],
              style: _vm.style,
              attrs: {
                role: "dialog",
                "aria-modal": "true",
                "aria-label": _vm.title || "dialog"
              }
            },
            [
              _c(
                "div",
                {
                  staticClass: "el-dialog__header relative",
                  class: {
                    "el-dialog__header--hidden": !_vm.title,
                    "el-dialog-header-line": !_vm.title
                      ? false
                      : _vm.showHeaderLine
                  }
                },
                [
                  _vm.showReturn
                    ? _c(
                        "span",
                        {
                          staticClass: "el-dialog__returnBtn mr-16 pointer",
                          on: { click: _vm.handleReturn }
                        },
                        [
                          _c("i", { staticClass: "el-icon-back mr-4" }),
                          _c("span", { staticClass: "text-14" }, [
                            _vm._v("返回")
                          ])
                        ]
                      )
                    : _vm._e(),
                  _vm._t("title", [
                    _c("span", { staticClass: "el-dialog__title" }, [
                      _vm._v(_vm._s(_vm.title))
                    ])
                  ]),
                  _c(
                    "button",
                    {
                      staticClass: "el-dialog__headerbtn",
                      attrs: { type: "button", "aria-label": "Close" },
                      on: { click: _vm.handleClose }
                    },
                    [
                      _c("i", {
                        staticClass: "el-dialog__close el-icon el-icon-close"
                      })
                    ]
                  )
                ],
                2
              ),
              _vm.rendered
                ? _c(
                    "div",
                    {
                      staticClass: "el-dialog__body",
                      class: { "el-dialog__header--hidden__body": !_vm.title },
                      style: {
                        maxHeight: _vm.maxBodyHeight,
                        overflow: "auto"
                      }
                    },
                    [_vm._t("default")],
                    2
                  )
                : _vm._e(),
              _vm.isShowFooter
                ? _c(
                    "div",
                    {
                      staticClass: "el-dialog__footer",
                      class: {
                        "el-dialog-footer-line": !_vm.title
                          ? false
                          : _vm.showFooterLine
                      }
                    },
                    [
                      _vm._t("footer", [
                        _vm.cancelText
                          ? _c(
                              "ElButton",
                              {
                                staticClass: "el-dialog__footerBtn",
                                on: { click: _vm.handleClose }
                              },
                              [
                                _vm._v(
                                  "\n                  " +
                                    _vm._s(_vm.cancelText) +
                                    "\n              "
                                )
                              ]
                            )
                          : _vm._e(),
                        _c(
                          "ElButton",
                          {
                            staticClass: "el-dialog__footerBtn",
                            class: {
                              "el-dialog__footerBtn--center":
                                _vm.cancelText && _vm.center
                            },
                            attrs: { loading: _vm.loading, type: "primary" },
                            on: { click: _vm.handleSubmit }
                          },
                          [
                            _vm._v(
                              "\n                  " +
                                _vm._s(_vm.submitText) +
                                "\n              "
                            )
                          ]
                        )
                      ])
                    ],
                    2
                  )
                : _vm._e()
            ]
          )
        ]
      )
    ]
  )
}
var staticRenderFns = []
render._withStripped = true


// CONCATENATED MODULE: ./packages/dialog/src/component.vue?vue&type=template&id=60140e62&

// EXTERNAL MODULE: external "d-element-ui/lib/utils/popup"
var popup_ = __webpack_require__(17);
var popup_default = /*#__PURE__*/__webpack_require__.n(popup_);

// EXTERNAL MODULE: external "d-element-ui/lib/mixins/migrating"
var migrating_ = __webpack_require__(11);
var migrating_default = /*#__PURE__*/__webpack_require__.n(migrating_);

// EXTERNAL MODULE: external "d-element-ui/lib/mixins/emitter"
var emitter_ = __webpack_require__(4);
var emitter_default = /*#__PURE__*/__webpack_require__.n(emitter_);

// EXTERNAL MODULE: external "d-element-ui/lib/button"
var button_ = __webpack_require__(13);
var button_default = /*#__PURE__*/__webpack_require__.n(button_);

// EXTERNAL MODULE: external "d-element-ui/lib/utils/dom"
var dom_ = __webpack_require__(2);

// CONCATENATED MODULE: ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib??vue-loader-options!./packages/dialog/src/component.vue?vue&type=script&lang=js&
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//
//






/* harmony default export */ var componentvue_type_script_lang_js_ = ({
  name: 'ElDialog',
  components: {
    ElButton: button_default.a
  },
  mixins: [popup_default.a, emitter_default.a, migrating_default.a],
  inject: {
    injectBeforeClose: {
      default: undefined
    }
  },
  props: {
    dragable: {
      type: Boolean,
      default: false
    },
    dragEl: {
      type: String,
      default: '.el-dialog__header'
    },
    loading: {
      type: Boolean,
      default: false
    },
    size: String,
    defaultPadding: {
      type: Boolean,
      default: true
    },
    submitText: {
      type: String,
      default: '确认'
    },
    cancelText: {
      type: String,
      default: '取消'
    },
    title: {
      type: String,
      default: ''
    },

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

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

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

    closeOnClickModal: {
      type: Boolean,
      default: false
    },
    maxBodyHeight: {
      type: String,
      default: '56vh'
    },
    closeOnPressEscape: {
      type: Boolean,
      default: true
    },
    showClose: {
      type: Boolean,
      default: true
    },
    isShowFooter: {
      type: Boolean,
      default: true
    },
    width: String,

    fullscreen: Boolean,

    className: {
      type: String,
      default: ''
    },
    beforeClose: {
      default: function _default() {
        return this.injectBeforeClose;
      }
    },
    submitHandle: Function,
    center: {
      type: Boolean,
      default: false
    },

    destroyOnClose: Boolean,
    showReturn: {
      type: Boolean,
      default: false
    },
    returnHandle: Function,
    basePosition: {
      type: Object,
      default: function _default() {}
    },
    showHeaderLine: {
      type: Boolean,
      default: true
    },
    showFooterLine: {
      type: Boolean,
      default: true
    }
  },

  data: function data() {
    return {
      closed: false,
      key: 0,
      dragFixConfig: {
        fixLeft: 0,
        fixTop: 0,
        maxHeight: 0,
        maxWidth: 0
      }
    };
  },


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

      if (val) {
        this.closed = false;
        this.$emit('open');
        this.setBaseStyle();
        this.$el.addEventListener('scroll', this.updatePopper);
        if (this.dragable) {
          this.bindDrag();
        }
        this.$refs.dialog.scrollTop = 0;
        if (this.appendToBody) {
          document.body.appendChild(this.$el);
        }
      } else {
        this.$el.removeEventListener('scroll', this.updatePopper);
        this.cleanDragHandle();
        this.$refs.dialog.top = undefined;
        this.$refs.dialog.left = undefined;
        if (!this.closed) this.$emit('close');
        if (this.destroyOnClose) {
          this.$nextTick(function () {
            _this.key++;
          });
        }
      }
    }
  },

  computed: {
    dialogSize: function dialogSize() {
      return this.size || (this.$ELEMENT || {}).size;
    },
    style: function style() {
      var style = {
        pointerEvents: 'auto'
      };
      if (!this.fullscreen) {
        if (this.width) {
          style.width = this.width;
        }
      }
      return style;
    }
  },

  methods: {
    setBaseStyle: function setBaseStyle() {
      this.unsetDialogPostion();
      for (var key in this.basePosition) {
        if (Object.hasOwnProperty.call(this.basePosition, key)) {
          var element = this.basePosition[key];
          this.$refs.dialog.style[key] = element;
        }
      }
    },
    unsetDialogPostion: function unsetDialogPostion() {
      this.$refs.dialog.style.position = null;
      this.$refs.dialog.style.top = null;
      this.$refs.dialog.style.left = null;
      this.$refs.dialog.style.right = null;
      this.$refs.dialog.style.bottom = null;
    },
    handleWrapperClick: function handleWrapperClick() {
      if (!this.closeOnClickModal) return;
      this.handleClose();
    },
    handleClose: function handleClose() {
      if (typeof this.beforeClose === 'function') {
        this.beforeClose(this.hide);
      } else {
        this.hide();
      }
    },
    handleSubmit: function handleSubmit() {
      if (typeof this.submitHandle === 'function') {
        this.submitHandle(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');
    },
    afterEnter: function afterEnter() {
      this.$emit('opened');
    },
    afterLeave: function afterLeave() {
      this.$emit('closed');
    },
    handleReturn: function handleReturn() {
      if (typeof this.returnHandle === 'function') {
        this.returnHandle(this.hide);
      } else {
        this.hide();
      }
    },
    setPositonByMouse: function setPositonByMouse(event) {
      var realTop = event.pageY - this.dragFixConfig.fixTop;
      var realLeft = event.pageX - this.dragFixConfig.fixLeft;
      var top = realTop < this.dragFixConfig.maxHeight ? Math.max(realTop, 0) : this.dragFixConfig.maxHeight;
      var left = realLeft < this.dragFixConfig.maxWidth ? Math.max(realLeft, 0) : this.dragFixConfig.maxWidth;
      this.$refs.dialog.style.top = top + 'px';
      this.$refs.dialog.style.left = left + 'px';
    },
    dragIngHandle: function dragIngHandle(event) {
      this.setPositonByMouse(event);
      if (event.which !== 1) {
        this.dragEndHandle(event);
      }
    },
    dragEndHandle: function dragEndHandle() {
      Object(dom_["off"])(document, 'mousemove', this.dragIngHandle);
      Object(dom_["off"])(document, 'mouseUp', this.dragIngHandle);
    },
    cleanDragHandle: function cleanDragHandle() {
      Object(dom_["off"])(document, 'mousemove', this.dragIngHandle);
      Object(dom_["off"])(document, 'mouseUp', this.dragIngHandle);
      // on(this.$refs.dialog, 'mousedown', this.dragStartHandle);
      Object(dom_["off"])(this.$refs.dialog, 'mousedown');
      // const dragEl = this.$el.querySelectorAll(this.dragEl);
      // dragEl.forEach(e => {
      //   e.removeEventListener('mousedown', this.dragStartHandle);
      // });
    },
    dragStartHandle: function dragStartHandle(event) {
      event.preventDefault();
      var el = this.$refs.dialog;
      var rectObj = el.getBoundingClientRect();
      this.dragFixConfig.maxHeight = window.innerHeight - rectObj.height;
      this.dragFixConfig.maxWidth = window.innerWidth - rectObj.width;
      this.dragFixConfig.fixLeft = event.clientX - rectObj.left;
      this.dragFixConfig.fixTop = event.clientY - rectObj.top;
      this.unsetDialogPostion();
      el.style.position = 'absolute';
      this.setPositonByMouse(event);
      Object(dom_["on"])(document, 'mousemove', this.dragIngHandle);
      Object(dom_["on"])(document, 'mouseUp', this.dragIngHandle);
    },
    bindDrag: function bindDrag() {
      Object(dom_["delegate"])(this.$el, this.dragEl, 'mousedown', this.dragStartHandle);
    }
  },

  mounted: function mounted() {
    if (this.visible) {
      this.rendered = true;
      this.setBaseStyle();
      this.open();
      if (this.dragable) {
        this.bindDrag();
      }
      if (this.appendToBody) {
        document.body.appendChild(this.$el);
      }
    }
  },
  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);
    }
    this.cleanDragHandle();
  }
});
// CONCATENATED MODULE: ./packages/dialog/src/component.vue?vue&type=script&lang=js&
 /* harmony default export */ var src_componentvue_type_script_lang_js_ = (componentvue_type_script_lang_js_); 
// EXTERNAL MODULE: ./node_modules/vue-loader/lib/runtime/componentNormalizer.js
var componentNormalizer = __webpack_require__(0);

// CONCATENATED MODULE: ./packages/dialog/src/component.vue





/* normalize component */

var component = Object(componentNormalizer["a" /* default */])(
  src_componentvue_type_script_lang_js_,
  render,
  staticRenderFns,
  false,
  null,
  null,
  null
  
)

/* hot reload */
if (false) { var api; }
component.options.__file = "packages/dialog/src/component.vue"
/* harmony default export */ var src_component = (component.exports);
// CONCATENATED MODULE: ./packages/dialog/index.js


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

/* harmony default export */ var dialog = __webpack_exports__["default"] = (src_component);

/***/ })

/******/ });