!function(e,n){"object"==typeof exports&&"object"==typeof module?module.exports=n():"function"==typeof define&&define.amd?define([],n):"object"==typeof exports?exports.Vue2BootstrapModal=n():e.Vue2BootstrapModal=n()}(this,()=>(()=>{var e={56:(e,n,t)=>{"use strict";e.exports=function(e){var n=t.nc;n&&e.setAttribute("nonce",n)}},72:e=>{"use strict";var n=[];function t(e){for(var t=-1,o=0;o<n.length;o++)if(n[o].identifier===e){t=o;break}return t}function o(e,o){for(var r={},s=[],i=0;i<e.length;i++){var l=e[i],d=o.base?l[0]+o.base:l[0],c=r[d]||0,u="".concat(d," ").concat(c);r[d]=c+1;var f=t(u),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==f)n[f].references++,n[f].updater(p);else{var m=a(p,o);o.byIndex=i,n.splice(i,0,{identifier:u,updater:m,references:1})}s.push(u)}return s}function a(e,n){var t=n.domAPI(n);return t.update(e),function(n){if(n){if(n.css===e.css&&n.media===e.media&&n.sourceMap===e.sourceMap&&n.supports===e.supports&&n.layer===e.layer)return;t.update(e=n)}else t.remove()}}e.exports=function(e,a){var r=o(e=e||[],a=a||{});return function(e){e=e||[];for(var s=0;s<r.length;s++){var i=t(r[s]);n[i].references--}for(var l=o(e,a),d=0;d<r.length;d++){var c=t(r[d]);0===n[c].references&&(n[c].updater(),n.splice(c,1))}r=l}}},96:(e,n,t)=>{e.exports=t(591)},113:e=>{"use strict";e.exports=function(e,n){if(n.styleSheet)n.styleSheet.cssText=e;else{for(;n.firstChild;)n.removeChild(n.firstChild);n.appendChild(document.createTextNode(e))}}},314:e=>{"use strict";e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var t="",o=void 0!==n[5];return n[4]&&(t+="@supports (".concat(n[4],") {")),n[2]&&(t+="@media ".concat(n[2]," {")),o&&(t+="@layer".concat(n[5].length>0?" ".concat(n[5]):""," {")),t+=e(n),o&&(t+="}"),n[2]&&(t+="}"),n[4]&&(t+="}"),t}).join("")},n.i=function(e,t,o,a,r){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(o)for(var i=0;i<this.length;i++){var l=this[i][0];null!=l&&(s[l]=!0)}for(var d=0;d<e.length;d++){var c=[].concat(e[d]);o&&s[c[0]]||(void 0!==r&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=r),t&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=t):c[2]=t),a&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=a):c[4]="".concat(a)),n.push(c))}},n}},354:e=>{"use strict";e.exports=function(e){var n=e[1],t=e[3];if(!t)return n;if("function"==typeof btoa){var o=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),a="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(o),r="/*# ".concat(a," */");return[n].concat([r]).join("\n")}return[n].join("\n")}},540:e=>{"use strict";e.exports=function(e){var n=document.createElement("style");return e.setAttributes(n,e.attributes),e.insert(n,e.options),n}},591:(e,n,t)=>{"use strict";t.r(n),t.d(n,{default:()=>g});var o=function(){var e=this,n=e._self._c;return n("div",{ref:"modal",staticClass:"modal fade background-darken",class:{in:e.isOpen,show:e.isShow},attrs:{tabindex:"-1",role:"dialog"},on:{click:function(n){return n.target!==n.currentTarget?null:e.close()},keyup:function(n){return!n.type.indexOf("key")&&e._k(n.keyCode,"esc",27,n.key,["Esc","Escape"])?null:e.close()}}},[n("div",{staticClass:"modal-dialog",class:e.modalSize,attrs:{role:"document"}},[n("div",{staticClass:"modal-content"},[e.needHeader?n("div",{staticClass:"modal-header"},[n("button",{staticClass:"close",attrs:{type:"button","data-dismiss":"modal","aria-label":"Close"},on:{click:function(n){return e.close()}}},[n("span",{attrs:{"aria-hidden":"true"}},[e._v("×")])]),e._v(" "),n("h4",{staticClass:"modal-title"},[e._t("title",function(){return[e._v("\n                        Modal\n                    ")]})],2)]):e._e(),e._v(" "),n("div",{staticClass:"modal-body"},[e._t("body",function(){return[e._v("\n                    Body\n                ")]})],2),e._v(" "),e.needFooter?n("div",{staticClass:"modal-footer"},[e._t("footer")],2):e._e()])])])};o._withStripped=!0;const a={props:{opened:{type:Function,default:function(){}},closed:{type:Function,default:function(){}},needHeader:{type:Boolean,default:!0},needFooter:{type:Boolean,default:!0},size:{type:String,default:""}},data:function(){return{sizeClasses:{large:"modal-lg",small:"modal-sm",medium:"modal-md",full:"modal-full"},isOpen:!1,isShow:!1,lastKnownBodyStyle:{overflow:"auto"}}},methods:{open:function(){var e=this;this.isShow||(this.isShow=!0,this.$nextTick(function(){e.isOpen=!0,e.$refs.modal.focus(),e.lastKnownBodyStyle.overflow=document.body.style.overflow,document.body.style.overflow="hidden",e.opened()}))},close:function(){var e=this;this.isOpen=!1,this.$nextTick(function(){setTimeout(function(){e.isShow=!1,document.body.style.overflow=e.lastKnownBodyStyle.overflow,e.closed()},500)})}},computed:{modalSize:function(){return this.sizeClasses[this.size]||""}}};var r=t(72),s=t.n(r),i=t(825),l=t.n(i),d=t(659),c=t.n(d),u=t(56),f=t.n(u),p=t(540),m=t.n(p),v=t(113),y=t.n(v),h=t(973),b={};b.styleTagTransform=y(),b.setAttributes=f(),b.insert=c().bind(null,"head"),b.domAPI=l(),b.insertStyleElement=m(),s()(h.A,b),h.A&&h.A.locals&&h.A.locals;var A=function(e,n,t,o,a,r){var s,i="function"==typeof e?e.options:e;if(n&&(i.render=n,i.staticRenderFns=[],i._compiled=!0),r&&(i._scopeId="data-v-"+r),s)if(i.functional){i._injectStyles=s;var l=i.render;i.render=function(e,n){return s.call(n),l(e,n)}}else{var d=i.beforeCreate;i.beforeCreate=d?[].concat(d,s):[s]}return{exports:e,options:i}}(a,o,0,0,0,"73d60a72");const g=A.exports},659:e=>{"use strict";var n={};e.exports=function(e,t){var o=function(e){if(void 0===n[e]){var t=document.querySelector(e);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}n[e]=t}return n[e]}(e);if(!o)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");o.appendChild(t)}},825:e=>{"use strict";e.exports=function(e){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var n=e.insertStyleElement(e);return{update:function(t){!function(e,n,t){var o="";t.supports&&(o+="@supports (".concat(t.supports,") {")),t.media&&(o+="@media ".concat(t.media," {"));var a=void 0!==t.layer;a&&(o+="@layer".concat(t.layer.length>0?" ".concat(t.layer):""," {")),o+=t.css,a&&(o+="}"),t.media&&(o+="}"),t.supports&&(o+="}");var r=t.sourceMap;r&&"undefined"!=typeof btoa&&(o+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),n.styleTagTransform(o,e,n.options)}(n,e,t)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(n)}}}},973:(e,n,t)=>{"use strict";t.d(n,{A:()=>i});var o=t(354),a=t.n(o),r=t(314),s=t.n(r)()(a());s.push([e.id,"\n.background-darken[data-v-73d60a72] {\n  background: rgba(0, 0, 0, 0.3);\n}\n.modal[data-v-73d60a72] {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n.modal-full[data-v-73d60a72] {\n  margin-left: 16px;\n  margin-right: 16px;\n  width: auto;\n}\n","",{version:3,sources:["webpack://./src/Vue2BootstrapModal.vue"],names:[],mappings:";AACA;EACA,8BAAA;AACA;AAEA;EACA,kBAAA;EACA,gBAAA;AACA;AAEA;EACA,iBAAA;EACA,kBAAA;EACA,WAAA;AACA",sourcesContent:['<style scoped>\n.background-darken {\n  background: rgba(0, 0, 0, 0.3);\n}\n\n.modal {\n  overflow-x: hidden;\n  overflow-y: auto;\n}\n\n.modal-full {\n  margin-left: 16px;\n  margin-right: 16px;\n  width: auto;\n}\n</style>\n\n<template>\n\n    <div ref="modal" class="modal fade background-darken" tabindex="-1" role="dialog" :class="{in:isOpen,show:isShow}" @click.self="close()" @keyup.esc="close()">\n        <div class="modal-dialog" :class="modalSize" role="document">\n            <div class="modal-content">\n                <div v-if="needHeader" class="modal-header">\n                    <button type="button" class="close" data-dismiss="modal" aria-label="Close" @click="close()">\n                        <span aria-hidden="true">&times;</span>\n                    </button>\n                    <h4 class="modal-title">\n                        <slot name="title">\n                            Modal\n                        </slot>\n                    </h4>\n                </div>\n                <div class="modal-body">\n                    <slot name="body">\n                        Body\n                    </slot>\n                </div>\n                <div v-if="needFooter" class="modal-footer">\n                    <slot name="footer">\n\n                    </slot>\n                </div>\n            </div>\n            \x3c!-- /.modal-content --\x3e\n        </div>\n        \x3c!-- /.modal-dialog --\x3e\n    </div>\n    \x3c!-- /.modal --\x3e\n\n</template>\n\n<script>\n//require(\'bootstrap-loader\')\nexport default {\n  props: {\n    opened: {\n      type: Function,\n      default: () => {}\n    },\n    closed: {\n      type: Function,\n      default: () => {}\n    },\n    needHeader: {\n      type: Boolean,\n      default: true\n    },\n    needFooter: {\n      type: Boolean,\n      default: true\n    },\n    size: {\n      type: String,\n      default: \'\'\n    }\n  },\n  data() {\n    return {\n      sizeClasses: {\n        large: \'modal-lg\',\n        small: \'modal-sm\',\n        medium: \'modal-md\',\n        full: \'modal-full\'\n      },\n      isOpen: false,\n      isShow: false,\n      lastKnownBodyStyle: {\n        overflow: \'auto\'\n      }\n    }\n  },\n  methods: {\n    open() {\n      if (this.isShow) {\n        return\n      }\n      this.isShow = true\n      this.$nextTick(() => {\n        this.isOpen = true\n        this.$refs.modal.focus()\n        this.lastKnownBodyStyle.overflow = document.body.style.overflow\n        document.body.style.overflow = \'hidden\'\n        this.opened()\n      })\n    },\n    close() {\n      this.isOpen = false\n      this.$nextTick(() => {\n        setTimeout(() => {\n          this.isShow = false\n          document.body.style.overflow = this.lastKnownBodyStyle.overflow\n          this.closed()\n        }, 500)\n      })\n    }\n  },\n  computed: {\n    modalSize: function() {\n      return this.sizeClasses[this.size] || \'\'\n    }\n  }\n}\n<\/script>\n'],sourceRoot:""}]);const i=s}},n={};function t(o){var a=n[o];if(void 0!==a)return a.exports;var r=n[o]={id:o,exports:{}};return e[o](r,r.exports,t),r.exports}return t.n=e=>{var n=e&&e.__esModule?()=>e.default:()=>e;return t.d(n,{a:n}),n},t.d=(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},t.o=(e,n)=>Object.prototype.hasOwnProperty.call(e,n),t.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.nc=void 0,t(96)})());
//# sourceMappingURL=bootstrap-modal.min.js.map