| 1 |
- !function(){function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(){"use strict";/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */t=function(){return n};var n={},r=Object.prototype,o=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},i=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",u=a.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(S){c=function(e,t,n){return e[t]=n}}function s(e,t,n,r){var o=t&&t.prototype instanceof p?t:p,a=Object.create(o.prototype),i=new O(r||[]);return a._invoke=function(e,t,n){var r="suspendedStart";return function(o,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===o)throw a;return B()}for(n.method=o,n.arg=a;;){var i=n.delegate;if(i){var l=E(i,n);if(l){if(l===d)continue;return l}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var u=f(e,t,n);if("normal"===u.type){if(r=n.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r="completed",n.method="throw",n.arg=u.arg)}}}(e,n,i),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(S){return{type:"throw",arg:S}}}n.wrap=s;var d={};function p(){}function h(){}function v(){}var y={};c(y,i,(function(){return this}));var m=Object.getPrototypeOf,g=m&&m(m(L([])));g&&g!==r&&o.call(g,i)&&(y=g);var b=v.prototype=p.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function x(t,n){function r(a,i,l,u){var c=f(t[a],t,i);if("throw"!==c.type){var s=c.arg,d=s.value;return d&&"object"==e(d)&&o.call(d,"__await")?n.resolve(d.__await).then((function(e){r("next",e,l,u)}),(function(e){r("throw",e,l,u)})):n.resolve(d).then((function(e){s.value=e,l(s)}),(function(e){return r("throw",e,l,u)}))}u(c.arg)}var a;this._invoke=function(e,t){function o(){return new n((function(n,o){r(e,t,n,o)}))}return a=a?a.then(o,o):o()}}function E(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,E(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=f(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var o=r.arg;return o?o.done?(t[e.resultName]=o.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):o:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function k(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function O(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function L(e){if(e){var t=e[i];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:B}}function B(){return{value:void 0,done:!0}}return h.prototype=v,c(b,"constructor",v),c(v,"constructor",h),h.displayName=c(v,u,"GeneratorFunction"),n.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===h||"GeneratorFunction"===(t.displayName||t.name))},n.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,c(e,u,"GeneratorFunction")),e.prototype=Object.create(b),e},n.awrap=function(e){return{__await:e}},w(x.prototype),c(x.prototype,l,(function(){return this})),n.AsyncIterator=x,n.async=function(e,t,r,o,a){void 0===a&&(a=Promise);var i=new x(s(e,t,r,o),a);return n.isGeneratorFunction(t)?i:i.next().then((function(e){return e.done?e.value:i.next()}))},w(b),c(b,u,"Generator"),c(b,i,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),n.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},n.values=L,O.prototype={constructor:O,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(k),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return i.type="throw",i.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r],i=a.completion;if("root"===a.tryLoc)return n("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),u=o.call(a,"finallyLoc");if(l&&u){if(this.prev<a.catchLoc)return n(a.catchLoc,!0);if(this.prev<a.finallyLoc)return n(a.finallyLoc)}else if(l){if(this.prev<a.catchLoc)return n(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return n(a.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var a=r;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var i=a?a.completion:{};return i.type=e,i.arg=t,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(i)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),k(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var o=r.arg;k(n)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:L(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},n}function n(e,t,n,r,o,a,i){try{var l=e[a](i),u=l.value}catch(c){return void n(c)}l.done?t(u):Promise.resolve(u).then(r,o)}function r(e){return function(){var t=this,r=arguments;return new Promise((function(o,a){var i=e.apply(t,r);function l(e){n(i,o,a,l,u,"next",e)}function u(e){n(i,o,a,l,u,"throw",e)}l(void 0)}))}}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}System.register(["./index-legacy.7a6c6e87.js","./index2-legacy.e34406f9.js"],(function(e){"use strict";var n,o,l,u,c,s,f,d,p,h,v,y,m,g,b,w,x,E,C,k,O,L,B,S,T,P,M,j,I,_,A,R,z,V,N,D,$,G,H,F,U,K,q,W,X,Y,Z,Q,J,ee,te,ne,re,oe,ae,ie,le;return{setters:[function(e){n=e.w,o=e.b2,l=e.aU,u=e.n,c=e.bK,s=e.aj,f=e.d,d=e.M,p=e.bL,h=e.L,v=e.bM,y=e.E,m=e.bN,g=e.a8,b=e.s,w=e.e,x=e.bw,E=e.r,C=e.j,k=e.bO,O=e.bi,L=e.q,B=e.bP,S=e.o,T=e.g,P=e.bQ,M=e.a6,j=e._,I=e.bR,_=e.k,A=e.t,R=e.B,z=e.C,V=e.U,N=e.V,D=e.c,$=e.x,G=e.z,H=e.H,F=e.D,U=e.v,K=e.a0,q=e.G,W=e.a7,X=e.as,Y=e.y,Z=e.a,Q=e.T,J=e.W,ee=e.aZ,te=e.aw,ne=e.a1,re=e.aX,oe=e.bS,ae=e.bT,ie=e.h},function(e){le=e.i}],execute:function(){var ue=function(e){return Array.from(e.querySelectorAll('a[href],button:not([disabled]),button:not([hidden]),:not([tabindex="-1"]),input:not([disabled]),input:not([type="hidden"]),select:not([disabled]),textarea:not([disabled])')).filter((function(e){return ce(e)&&function(e){return"fixed"!==getComputedStyle(e).position&&null!==e.offsetParent}(e)}))},ce=function(e){if(e.tabIndex>0||0===e.tabIndex&&null!==e.getAttribute("tabIndex"))return!0;if(e.disabled)return!1;switch(e.nodeName){case"A":return!!e.href&&"ignore"!==e.rel;case"INPUT":return!("hidden"===e.type||"file"===e.type);case"BUTTON":case"SELECT":case"TEXTAREA":return!0;default:return!1}},se="_trap-focus-children",fe=[],de=function(e){if(0!==fe.length){var t=fe[fe.length-1][se];if(t.length>0&&e.code===s.tab){if(1===t.length)return e.preventDefault(),void(document.activeElement!==t[0]&&t[0].focus());var n=e.shiftKey,r=e.target===t[0],o=e.target===t[t.length-1];r&&n&&(e.preventDefault(),t[t.length-1].focus()),o&&!n&&(e.preventDefault(),t[0].focus())}}},pe=f({name:"ElMessageBox",directives:{TrapFocus:{beforeMount:function(e){e[se]=ue(e),fe.push(e),fe.length<=1&&l(document,"keydown",de)},updated:function(e){u((function(){e[se]=ue(e)}))},unmounted:function(){fe.shift(),0===fe.length&&c(document,"keydown",de)}}},components:a({ElButton:d,ElFocusTrap:p,ElInput:h,ElOverlay:v,ElIcon:y},m),inheritAttrs:!1,props:{buttonSize:{type:String,validator:le},modal:{type:Boolean,default:!0},lockScroll:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},closeOnClickModal:{type:Boolean,default:!0},closeOnPressEscape:{type:Boolean,default:!0},closeOnHashChange:{type:Boolean,default:!0},center:Boolean,draggable:Boolean,roundButton:{default:!1,type:Boolean},container:{type:String,default:"body"},boxType:{type:String,default:""}},emits:["vanish","action"],setup:function(e,s){var f=s.emit,d=g().t,p=b("message-box"),h=w(!1),v=x().nextZIndex,y=E({beforeClose:null,callback:null,cancelButtonText:"",cancelButtonClass:"",confirmButtonText:"",confirmButtonClass:"",customClass:"",customStyle:{},dangerouslyUseHTMLString:!1,distinguishCancelAndClose:!1,icon:"",inputPattern:null,inputPlaceholder:"",inputType:"text",inputValue:null,inputValidator:null,inputErrorMessage:"",message:null,modalFade:!0,modalClass:"",showCancelButton:!1,showConfirmButton:!0,type:"",title:void 0,showInput:!1,action:"",confirmButtonLoading:!1,cancelButtonLoading:!1,confirmButtonDisabled:!1,editorErrorMessage:"",validateError:!1,zIndex:v()}),m=C((function(){var e=y.type;return i({},p.bm("icon",e),e&&k[e])})),j=O(),_=O(),A=L(C((function(){return e.buttonSize})),{prop:!0,form:!0,formItem:!0}),R=C((function(){return y.icon||k[y.type]||""})),z=C((function(){return!!y.message})),V=w(),N=w(),D=w(),$=w(),G=w(),H=C((function(){return y.confirmButtonClass}));n((function(){return y.inputValue}),function(){var n=r(t().mark((function n(r){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u();case 2:"prompt"===e.boxType&&null!==r&&Q();case 3:case"end":return t.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}(),{immediate:!0}),n((function(){return h.value}),(function(t){var n,r;t&&("alert"!==e.boxType&&"confirm"!==e.boxType||(D.value=null!=(r=null==(n=G.value)?void 0:n.$el)?r:V.value),y.zIndex=v()),"prompt"===e.boxType&&(t?u().then((function(){var e;$.value&&$.value.$el&&(D.value=null!=(e=J())?e:V.value)})):(y.editorErrorMessage="",y.validateError=!1))}));var F=C((function(){return e.draggable}));function U(){h.value&&(h.value=!1,u((function(){y.action&&f("action",y.action)})))}B(V,N,F),S(r(t().mark((function n(){return t().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,u();case 2:e.closeOnHashChange&&l(window,"hashchange",U);case 3:case"end":return t.stop()}}),n)})))),T((function(){e.closeOnHashChange&&c(window,"hashchange",U)}));var K,q,W,X=function(){e.closeOnClickModal&&Z(y.distinguishCancelAndClose?"close":"cancel")},Y=I(X),Z=function(t){var n;("prompt"!==e.boxType||"confirm"!==t||Q())&&(y.action=t,y.beforeClose?null==(n=y.beforeClose)||n.call(y,t,y,U):U())},Q=function(){if("prompt"===e.boxType){var t=y.inputPattern;if(t&&!t.test(y.inputValue||""))return y.editorErrorMessage=y.inputErrorMessage||d("el.messagebox.error"),y.validateError=!0,!1;var n=y.inputValidator;if("function"==typeof n){var r=n(y.inputValue);if(!1===r)return y.editorErrorMessage=y.inputErrorMessage||d("el.messagebox.error"),y.validateError=!0,!1;if("string"==typeof r)return y.editorErrorMessage=r,y.validateError=!0,!1}}return y.editorErrorMessage="",y.validateError=!1,!0},J=function(){var e=$.value.$refs;return e.input||e.textarea},ee=function(){Z("close")};return e.lockScroll&&P(h),K=h,n((function(){return K.value}),(function(e){var t,n;e?(W=document.activeElement,o(q)&&(null==(n=(t=q.value).focus)||n.call(t))):W.focus()})),a(a({},M(y)),{},{ns:p,overlayEvent:Y,visible:h,hasMessage:z,typeClass:m,contentId:j,inputId:_,btnSize:A,iconComponent:R,confirmButtonClasses:H,rootRef:V,focusStartRef:D,headerRef:N,inputRef:$,confirmRef:G,doClose:U,handleClose:ee,onCloseRequested:function(){e.closeOnPressEscape&&ee()},handleWrapperClick:X,handleInputEnter:function(e){if("textarea"!==y.inputType)return e.preventDefault(),Z("confirm")},handleAction:Z,t:d})}}),he=["aria-label","aria-describedby"],ve=["aria-label"],ye=["id"];var me=j(pe,[["render",function(e,t,n,r,o,a){var l=_("el-icon"),u=_("close"),c=_("el-input"),s=_("el-button"),f=_("el-focus-trap"),d=_("el-overlay");return A(),R(Q,{name:"fade-in-linear",onAfterLeave:t[11]||(t[11]=function(t){return e.$emit("vanish")}),persisted:""},{default:z((function(){return[V(D(d,{"z-index":e.zIndex,"overlay-class":[e.ns.is("message-box"),e.modalClass],mask:e.modal},{default:z((function(){return[$("div",{role:"dialog","aria-label":e.title,"aria-modal":"true","aria-describedby":e.showInput?void 0:e.contentId,class:G("".concat(e.ns.namespace.value,"-overlay-message-box")),onClick:t[8]||(t[8]=function(){var t;return e.overlayEvent.onClick&&(t=e.overlayEvent).onClick.apply(t,arguments)}),onMousedown:t[9]||(t[9]=function(){var t;return e.overlayEvent.onMousedown&&(t=e.overlayEvent).onMousedown.apply(t,arguments)}),onMouseup:t[10]||(t[10]=function(){var t;return e.overlayEvent.onMouseup&&(t=e.overlayEvent).onMouseup.apply(t,arguments)})},[D(f,{loop:"",trapped:e.visible,"focus-trap-el":e.rootRef,"focus-start-el":e.focusStartRef,onReleaseRequested:e.onCloseRequested},{default:z((function(){return[$("div",{ref:"rootRef",class:G([e.ns.b(),e.customClass,e.ns.is("draggable",e.draggable),i({},e.ns.m("center"),e.center)]),style:H(e.customStyle),tabindex:"-1",onClick:t[7]||(t[7]=F((function(){}),["stop"]))},[null!==e.title&&void 0!==e.title?(A(),U("div",{key:0,ref:"headerRef",class:G(e.ns.e("header"))},[$("div",{class:G(e.ns.e("title"))},[e.iconComponent&&e.center?(A(),R(l,{key:0,class:G([e.ns.e("status"),e.typeClass])},{default:z((function(){return[(A(),R(K(e.iconComponent)))]})),_:1},8,["class"])):q("v-if",!0),$("span",null,W(e.title),1)],2),e.showClose?(A(),U("button",{key:0,type:"button",class:G(e.ns.e("headerbtn")),"aria-label":e.t("el.messagebox.close"),onClick:t[0]||(t[0]=function(t){return e.handleAction(e.distinguishCancelAndClose?"close":"cancel")}),onKeydown:t[1]||(t[1]=X(F((function(t){return e.handleAction(e.distinguishCancelAndClose?"close":"cancel")}),["prevent"]),["enter"]))},[D(l,{class:G(e.ns.e("close"))},{default:z((function(){return[D(u)]})),_:1},8,["class"])],42,ve)):q("v-if",!0)],2)):q("v-if",!0),$("div",{id:e.contentId,class:G(e.ns.e("content"))},[$("div",{class:G(e.ns.e("container"))},[e.iconComponent&&!e.center&&e.hasMessage?(A(),R(l,{key:0,class:G([e.ns.e("status"),e.typeClass])},{default:z((function(){return[(A(),R(K(e.iconComponent)))]})),_:1},8,["class"])):q("v-if",!0),e.hasMessage?(A(),U("div",{key:1,class:G(e.ns.e("message"))},[Y(e.$slots,"default",{},(function(){return[e.dangerouslyUseHTMLString?(A(),R(K(e.showInput?"label":"p"),{key:1,for:e.showInput?e.inputId:void 0,innerHTML:e.message},null,8,["for","innerHTML"])):(A(),R(K(e.showInput?"label":"p"),{key:0,for:e.showInput?e.inputId:void 0},{default:z((function(){return[Z(W(e.dangerouslyUseHTMLString?"":e.message),1)]})),_:1},8,["for"]))]}))],2)):q("v-if",!0)],2),V($("div",{class:G(e.ns.e("input"))},[D(c,{id:e.inputId,ref:"inputRef",modelValue:e.inputValue,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.inputValue=t}),type:e.inputType,placeholder:e.inputPlaceholder,"aria-invalid":e.validateError,class:G({invalid:e.validateError}),onKeydown:X(e.handleInputEnter,["enter"])},null,8,["id","modelValue","type","placeholder","aria-invalid","class","onKeydown"]),$("div",{class:G(e.ns.e("errormsg")),style:H({visibility:e.editorErrorMessage?"visible":"hidden"})},W(e.editorErrorMessage),7)],2),[[N,e.showInput]])],10,ye),$("div",{class:G(e.ns.e("btns"))},[e.showCancelButton?(A(),R(s,{key:0,loading:e.cancelButtonLoading,class:G([e.cancelButtonClass]),round:e.roundButton,size:e.btnSize,onClick:t[3]||(t[3]=function(t){return e.handleAction("cancel")}),onKeydown:t[4]||(t[4]=X(F((function(t){return e.handleAction("cancel")}),["prevent"]),["enter"]))},{default:z((function(){return[Z(W(e.cancelButtonText||e.t("el.messagebox.cancel")),1)]})),_:1},8,["loading","class","round","size"])):q("v-if",!0),V(D(s,{ref:"confirmRef",type:"primary",loading:e.confirmButtonLoading,class:G([e.confirmButtonClasses]),round:e.roundButton,disabled:e.confirmButtonDisabled,size:e.btnSize,onClick:t[5]||(t[5]=function(t){return e.handleAction("confirm")}),onKeydown:t[6]||(t[6]=X(F((function(t){return e.handleAction("confirm")}),["prevent"]),["enter"]))},{default:z((function(){return[Z(W(e.confirmButtonText||e.t("el.messagebox.confirm")),1)]})),_:1},8,["loading","class","round","disabled","size"]),[[N,e.showConfirmButton]])],2)],6)]})),_:3},8,["trapped","focus-trap-el","focus-start-el","onReleaseRequested"])],42,he)]})),_:3},8,["z-index","overlay-class","mask"]),[[N,e.visible]])]})),_:3})}],["__file","/home/runner/work/element-plus/element-plus/packages/components/message-box/src/index.vue"]]),ge=new Map,be=function(e,t){var r=document.createElement("div");e.onVanish=function(){oe(null,r),ge.delete(a)},e.onAction=function(t){var n,r=ge.get(a);n=e.showInput?{value:a.inputValue,action:t}:t,e.callback?e.callback(n,o.proxy):"cancel"===t||"close"===t?e.distinguishCancelAndClose&&"cancel"!==t?r.reject("close"):r.reject("cancel"):r.resolve(n)};var o=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=ie(me,e);return r.appContext=n,oe(r,t),document.body.appendChild(t.firstElementChild),r.component}(e,r,t),a=o.proxy;for(var i in e)ae(e,i)&&!ae(a.$props,i)&&(a[i]=e[i]);return n((function(){return a.message}),(function(e,t){te(e)?o.slots.default=function(){return[e]}:te(t)&&!te(e)&&delete o.slots.default}),{immediate:!0}),a.visible=!0,a};function we(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return J?(ee(e)||te(e)?e={message:e}:t=e.callback,new Promise((function(r,o){var a=be(e,null!=n?n:we._context);ge.set(a,{options:e,callback:t,resolve:r,reject:o})}))):Promise.reject()}var xe={alert:{closeOnPressEscape:!1,closeOnClickModal:!1},confirm:{showCancelButton:!0},prompt:{showCancelButton:!0,showInput:!0}};["alert","confirm","prompt"].forEach((function(e){we[e]=function(e){return function(t,n,r,o){var i;return ne(n)?(r=n,i=""):i=re(n)?"":n,we(Object.assign(a({title:i,message:t,type:""},xe[e]),r,{boxType:e}),o)}}(e)})),we.close=function(){ge.forEach((function(e,t){t.doClose()})),ge.clear()},we._context=null;var Ee=we;Ee.install=function(e){Ee._context=e._context,e.config.globalProperties.$msgbox=Ee,e.config.globalProperties.$messageBox=Ee,e.config.globalProperties.$alert=Ee.alert,e.config.globalProperties.$confirm=Ee.confirm,e.config.globalProperties.$prompt=Ee.prompt};e("E",Ee)}}}))}();
|