{"version":3,"sources":["webpack:///./src/views/manage-knowledge-base/index.vue?a4ed","webpack:///./src/views/manage-knowledge-base/index.vue","webpack:///./src/views/manage-knowledge-base/index.vue?9661","webpack:///./node_modules/element-plus/es/utils/dom/aria.mjs","webpack:///./node_modules/element-plus/es/directives/trap-focus/index.mjs","webpack:///./node_modules/element-plus/es/constants/date.mjs","webpack:///./node_modules/element-plus/es/utils/vue/validator.mjs","webpack:///./node_modules/element-plus/es/components/message-box/src/index.mjs","webpack:///./node_modules/element-plus/es/components/message-box/src/messageBox.mjs","webpack:///./node_modules/element-plus/es/components/message-box/index.mjs"],"names":["toaster","createToaster","position","kbData","ref","getKbDataLoading","page","size","getKbData","value","getKb","page_size","then","res","data","finally","handleSizeChange","v","handleCurrentChange","selectedKb","handleSelectionChange","i","length","push","filename","console","log","delLoading","delKbHandler","ElMessageBox","confirm","confirmButtonText","cancelButtonText","type","delKb","resData","code","success","error","msg","onMounted","__exports__","FOCUSABLE_ELEMENT_SELECTORS","isVisible","element","computed","getComputedStyle","offsetParent","obtainAllFocusableElements","Array","from","querySelectorAll","filter","item","isFocusable","tabIndex","getAttribute","disabled","nodeName","href","rel","FOCUSABLE_CHILDREN","FOCUS_STACK","FOCUS_HANDLER","e","focusableElement","tab","preventDefault","document","activeElement","focus","goingBackward","shiftKey","isFirst","target","isLast","TrapFocus","el","addEventListener","shift","removeEventListener","isValidComponentSize","val","includes","_sfc_main","name","directives","components","ElButton","ElFocusTrap","ElInput","ElOverlay","ElIcon","inheritAttrs","props","buttonSize","String","validator","modal","Boolean","default","lockScroll","showClose","closeOnClickModal","closeOnPressEscape","closeOnHashChange","center","draggable","overflow","roundButton","container","boxType","emits","emit","locale","zIndex","ns","btnSize","t","nextZIndex","visible","state","autofocus","beforeClose","callback","cancelButtonClass","confirmButtonClass","customClass","customStyle","dangerouslyUseHTMLString","distinguishCancelAndClose","icon","inputPattern","inputPlaceholder","inputType","inputValue","inputValidator","inputErrorMessage","message","modalFade","modalClass","showCancelButton","showConfirmButton","title","showInput","action","confirmButtonLoading","cancelButtonLoading","confirmButtonDisabled","editorErrorMessage","validateError","typeClass","bm","contentId","inputId","iconComponent","hasMessage","rootRef","headerRef","focusStartRef","inputRef","confirmRef","confirmButtonClasses","async","validate","immediate","_a","_b","$el","_a2","getInputElement","doClose","window","handleWrapperClick","handleAction","overlayEvent","handleInputEnter","call","test","validateResult","inputRefs","$refs","input","textarea","handleClose","onCloseRequested","_hoisted_1","_hoisted_2","_hoisted_3","_sfc_render","_ctx","_cache","$props","$setup","$data","$options","_component_el_icon","_component_close","_component_el_input","_component_el_button","_component_el_focus_trap","_component_el_overlay","onAfterLeave","$event","$emit","persisted","is","mask","role","class","namespace","onClick","args","onMousedown","onMouseup","loop","trapped","onReleaseRequested","b","m","style","tabindex","key","_","onKeydown","id","$slots","for","innerHTML","modelValue","placeholder","invalid","visibility","loading","round","MessageBoxConstructor","messageInstance","Map","getAppendToElement","appendTo","body","querySelector","initInstance","appContext","vnode","appendChild","firstElementChild","component","genContainer","createElement","showMessage","options","onVanish","delete","vm","onAction","currentMsg","get","resolve","instance","proxy","reject","prop","MessageBox","Promise","_context","set","MESSAGE_BOX_VARIANTS","MESSAGE_BOX_DEFAULT_OPTS","alert","prompt","messageBoxFactory","titleOrOpts","Object","assign","forEach","close","clear","_MessageBox","install","app","config","globalProperties","$msgbox","$messageBox","$alert","$confirm","$prompt"],"mappings":"yIAAA,W,oLCwCA,MAAMA,EAAUC,eAAc,CAC5BC,SAAU,QAGLC,EAASC,iBAAI,IAClBC,EAAmBD,kBAAI,GACvBE,EAAOF,iBAAI,GACXG,EAAOH,iBAAI,IAGPI,GAFKJ,iBAAI,MAEGI,KAChBH,EAAiBI,OAAQ,EACzBC,eAAM,CACJJ,KAAMA,EAAKG,MACXE,UAAWJ,EAAKE,QACfG,KAAKC,IACNV,EAAOM,MAAQI,EAAIC,OAClBC,QAAQ,KACTV,EAAiBI,OAAQ,MAGvBO,EAAoBC,IACxBX,EAAKG,MAAQ,E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../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--11-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--11-oneOf-1-1!../../../node_modules/vue-loader-v16/dist/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--11-oneOf-1-2!../../../node_modules/less-loader/dist/cjs.js??ref--11-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader-v16/dist/index.js??ref--1-1!./index.vue?vue&type=style&index=0&id=05844711&scoped=true&lang=less\"","\r\n\r\n\r\n\r\n","import script from \"./index.vue?vue&type=script&setup=true&lang=js\"\nexport * from \"./index.vue?vue&type=script&setup=true&lang=js\"\n\nimport \"./index.vue?vue&type=style&index=0&id=05844711&scoped=true&lang=less\"\n\nimport exportComponent from \"C:\\\\Users\\\\Admin\\\\PycharmProjects\\\\chatlawyer-web\\\\node_modules\\\\vue-loader-v16\\\\dist\\\\exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['__scopeId',\"data-v-05844711\"]])\n\nexport default __exports__","const FOCUSABLE_ELEMENT_SELECTORS = `a[href],button:not([disabled]),button:not([hidden]),:not([tabindex=\"-1\"]),input:not([disabled]),input:not([type=\"hidden\"]),select:not([disabled]),textarea:not([disabled])`;\nconst isVisible = (element) => {\n if (process.env.NODE_ENV === \"test\")\n return true;\n const computed = getComputedStyle(element);\n return computed.position === \"fixed\" ? false : element.offsetParent !== null;\n};\nconst obtainAllFocusableElements = (element) => {\n return Array.from(element.querySelectorAll(FOCUSABLE_ELEMENT_SELECTORS)).filter((item) => isFocusable(item) && isVisible(item));\n};\nconst isFocusable = (element) => {\n if (element.tabIndex > 0 || element.tabIndex === 0 && element.getAttribute(\"tabIndex\") !== null) {\n return true;\n }\n if (element.disabled) {\n return false;\n }\n switch (element.nodeName) {\n case \"A\": {\n return !!element.href && element.rel !== \"ignore\";\n }\n case \"INPUT\": {\n return !(element.type === \"hidden\" || element.type === \"file\");\n }\n case \"BUTTON\":\n case \"SELECT\":\n case \"TEXTAREA\": {\n return true;\n }\n default: {\n return false;\n }\n }\n};\nconst attemptFocus = (element) => {\n var _a;\n if (!isFocusable(element)) {\n return false;\n }\n (_a = element.focus) == null ? void 0 : _a.call(element);\n return document.activeElement === element;\n};\nconst triggerEvent = function(elm, name, ...opts) {\n let eventName;\n if (name.includes(\"mouse\") || name.includes(\"click\")) {\n eventName = \"MouseEvents\";\n } else if (name.includes(\"key\")) {\n eventName = \"KeyboardEvent\";\n } else {\n eventName = \"HTMLEvents\";\n }\n const evt = document.createEvent(eventName);\n evt.initEvent(name, ...opts);\n elm.dispatchEvent(evt);\n return elm;\n};\nconst isLeaf = (el) => !el.getAttribute(\"aria-owns\");\nconst getSibling = (el, distance, elClass) => {\n const { parentNode } = el;\n if (!parentNode)\n return null;\n const siblings = parentNode.querySelectorAll(elClass);\n const index = Array.prototype.indexOf.call(siblings, el);\n return siblings[index + distance] || null;\n};\nconst focusNode = (el) => {\n if (!el)\n return;\n el.focus();\n !isLeaf(el) && el.click();\n};\n\nexport { attemptFocus, focusNode, getSibling, isFocusable, isLeaf, isVisible, obtainAllFocusableElements, triggerEvent };\n//# sourceMappingURL=aria.mjs.map\n","import { nextTick } from 'vue';\nimport '../../utils/index.mjs';\nimport '../../constants/index.mjs';\nimport { EVENT_CODE } from '../../constants/aria.mjs';\nimport { obtainAllFocusableElements } from '../../utils/dom/aria.mjs';\n\nconst FOCUSABLE_CHILDREN = \"_trap-focus-children\";\nconst TRAP_FOCUS_HANDLER = \"_trap-focus-handler\";\nconst FOCUS_STACK = [];\nconst FOCUS_HANDLER = (e) => {\n var _a;\n if (FOCUS_STACK.length === 0)\n return;\n const focusableElement = FOCUS_STACK[FOCUS_STACK.length - 1][FOCUSABLE_CHILDREN];\n if (focusableElement.length > 0 && e.code === EVENT_CODE.tab) {\n if (focusableElement.length === 1) {\n e.preventDefault();\n if (document.activeElement !== focusableElement[0]) {\n focusableElement[0].focus();\n }\n return;\n }\n const goingBackward = e.shiftKey;\n const isFirst = e.target === focusableElement[0];\n const isLast = e.target === focusableElement[focusableElement.length - 1];\n if (isFirst && goingBackward) {\n e.preventDefault();\n focusableElement[focusableElement.length - 1].focus();\n }\n if (isLast && !goingBackward) {\n e.preventDefault();\n focusableElement[0].focus();\n }\n if (process.env.NODE_ENV === \"test\") {\n const index = focusableElement.indexOf(e.target);\n if (index !== -1) {\n (_a = focusableElement[goingBackward ? index - 1 : index + 1]) == null ? void 0 : _a.focus();\n }\n }\n }\n};\nconst TrapFocus = {\n beforeMount(el) {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);\n FOCUS_STACK.push(el);\n if (FOCUS_STACK.length <= 1) {\n document.addEventListener(\"keydown\", FOCUS_HANDLER);\n }\n },\n updated(el) {\n nextTick(() => {\n el[FOCUSABLE_CHILDREN] = obtainAllFocusableElements(el);\n });\n },\n unmounted() {\n FOCUS_STACK.shift();\n if (FOCUS_STACK.length === 0) {\n document.removeEventListener(\"keydown\", FOCUS_HANDLER);\n }\n }\n};\n\nexport { FOCUSABLE_CHILDREN, TRAP_FOCUS_HANDLER, TrapFocus as default };\n//# sourceMappingURL=index.mjs.map\n","const datePickTypes = [\n \"year\",\n \"years\",\n \"month\",\n \"date\",\n \"dates\",\n \"week\",\n \"datetime\",\n \"datetimerange\",\n \"daterange\",\n \"monthrange\"\n];\nconst WEEK_DAYS = [\n \"sun\",\n \"mon\",\n \"tue\",\n \"wed\",\n \"thu\",\n \"fri\",\n \"sat\"\n];\n\nexport { WEEK_DAYS, datePickTypes };\n//# sourceMappingURL=date.mjs.map\n","import '../../constants/index.mjs';\nimport { componentSizes } from '../../constants/size.mjs';\nimport { datePickTypes } from '../../constants/date.mjs';\n\nconst isValidComponentSize = (val) => [\"\", ...componentSizes].includes(val);\nconst isValidDatePickType = (val) => [...datePickTypes].includes(val);\n\nexport { isValidComponentSize, isValidDatePickType };\n//# sourceMappingURL=validator.mjs.map\n","import { defineComponent, computed, ref, reactive, watch, nextTick, onMounted, onBeforeUnmount, toRefs, resolveComponent, openBlock, createBlock, Transition, withCtx, withDirectives, createVNode, createElementVNode, normalizeClass, normalizeStyle, withModifiers, createElementBlock, resolveDynamicComponent, createCommentVNode, toDisplayString, withKeys, renderSlot, createTextVNode, vShow } from 'vue';\nimport { ElButton } from '../../button/index.mjs';\nimport '../../../directives/index.mjs';\nimport '../../../hooks/index.mjs';\nimport { ElInput } from '../../input/index.mjs';\nimport { ElOverlay } from '../../overlay/index.mjs';\nimport '../../../utils/index.mjs';\nimport { ElIcon } from '../../icon/index.mjs';\nimport '../../focus-trap/index.mjs';\nimport '../../config-provider/index.mjs';\nimport _export_sfc from '../../../_virtual/plugin-vue_export-helper.mjs';\nimport TrapFocus from '../../../directives/trap-focus/index.mjs';\nimport ElFocusTrap from '../../focus-trap/src/focus-trap.mjs';\nimport { TypeComponents, TypeComponentsMap } from '../../../utils/vue/icon.mjs';\nimport { isValidComponentSize } from '../../../utils/vue/validator.mjs';\nimport { useGlobalComponentSettings } from '../../config-provider/src/hooks/use-global-config.mjs';\nimport { useId } from '../../../hooks/use-id/index.mjs';\nimport { useDraggable } from '../../../hooks/use-draggable/index.mjs';\nimport { useSameTarget } from '../../../hooks/use-same-target/index.mjs';\nimport { useLockscreen } from '../../../hooks/use-lockscreen/index.mjs';\n\nconst _sfc_main = defineComponent({\n name: \"ElMessageBox\",\n directives: {\n TrapFocus\n },\n components: {\n ElButton,\n ElFocusTrap,\n ElInput,\n ElOverlay,\n ElIcon,\n ...TypeComponents\n },\n inheritAttrs: false,\n props: {\n buttonSize: {\n type: String,\n validator: isValidComponentSize\n },\n modal: {\n type: Boolean,\n default: true\n },\n lockScroll: {\n type: Boolean,\n default: true\n },\n showClose: {\n type: Boolean,\n default: true\n },\n closeOnClickModal: {\n type: Boolean,\n default: true\n },\n closeOnPressEscape: {\n type: Boolean,\n default: true\n },\n closeOnHashChange: {\n type: Boolean,\n default: true\n },\n center: Boolean,\n draggable: Boolean,\n overflow: Boolean,\n roundButton: {\n default: false,\n type: Boolean\n },\n container: {\n type: String,\n default: \"body\"\n },\n boxType: {\n type: String,\n default: \"\"\n }\n },\n emits: [\"vanish\", \"action\"],\n setup(props, { emit }) {\n const {\n locale,\n zIndex,\n ns,\n size: btnSize\n } = useGlobalComponentSettings(\"message-box\", computed(() => props.buttonSize));\n const { t } = locale;\n const { nextZIndex } = zIndex;\n const visible = ref(false);\n const state = reactive({\n autofocus: true,\n beforeClose: null,\n callback: null,\n cancelButtonText: \"\",\n cancelButtonClass: \"\",\n confirmButtonText: \"\",\n confirmButtonClass: \"\",\n customClass: \"\",\n customStyle: {},\n dangerouslyUseHTMLString: false,\n distinguishCancelAndClose: false,\n icon: \"\",\n inputPattern: null,\n inputPlaceholder: \"\",\n inputType: \"text\",\n inputValue: null,\n inputValidator: null,\n inputErrorMessage: \"\",\n message: null,\n modalFade: true,\n modalClass: \"\",\n showCancelButton: false,\n showConfirmButton: true,\n type: \"\",\n title: void 0,\n showInput: false,\n action: \"\",\n confirmButtonLoading: false,\n cancelButtonLoading: false,\n confirmButtonDisabled: false,\n editorErrorMessage: \"\",\n validateError: false,\n zIndex: nextZIndex()\n });\n const typeClass = computed(() => {\n const type = state.type;\n return { [ns.bm(\"icon\", type)]: type && TypeComponentsMap[type] };\n });\n const contentId = useId();\n const inputId = useId();\n const iconComponent = computed(() => state.icon || TypeComponentsMap[state.type] || \"\");\n const hasMessage = computed(() => !!state.message);\n const rootRef = ref();\n const headerRef = ref();\n const focusStartRef = ref();\n const inputRef = ref();\n const confirmRef = ref();\n const confirmButtonClasses = computed(() => state.confirmButtonClass);\n watch(() => state.inputValue, async (val) => {\n await nextTick();\n if (props.boxType === \"prompt\" && val !== null) {\n validate();\n }\n }, { immediate: true });\n watch(() => visible.value, (val) => {\n var _a, _b;\n if (val) {\n if (props.boxType !== \"prompt\") {\n if (state.autofocus) {\n focusStartRef.value = (_b = (_a = confirmRef.value) == null ? void 0 : _a.$el) != null ? _b : rootRef.value;\n } else {\n focusStartRef.value = rootRef.value;\n }\n }\n state.zIndex = nextZIndex();\n }\n if (props.boxType !== \"prompt\")\n return;\n if (val) {\n nextTick().then(() => {\n var _a2;\n if (inputRef.value && inputRef.value.$el) {\n if (state.autofocus) {\n focusStartRef.value = (_a2 = getInputElement()) != null ? _a2 : rootRef.value;\n } else {\n focusStartRef.value = rootRef.value;\n }\n }\n });\n } else {\n state.editorErrorMessage = \"\";\n state.validateError = false;\n }\n });\n const draggable = computed(() => props.draggable);\n const overflow = computed(() => props.overflow);\n useDraggable(rootRef, headerRef, draggable, overflow);\n onMounted(async () => {\n await nextTick();\n if (props.closeOnHashChange) {\n window.addEventListener(\"hashchange\", doClose);\n }\n });\n onBeforeUnmount(() => {\n if (props.closeOnHashChange) {\n window.removeEventListener(\"hashchange\", doClose);\n }\n });\n function doClose() {\n if (!visible.value)\n return;\n visible.value = false;\n nextTick(() => {\n if (state.action)\n emit(\"action\", state.action);\n });\n }\n const handleWrapperClick = () => {\n if (props.closeOnClickModal) {\n handleAction(state.distinguishCancelAndClose ? \"close\" : \"cancel\");\n }\n };\n const overlayEvent = useSameTarget(handleWrapperClick);\n const handleInputEnter = (e) => {\n if (state.inputType !== \"textarea\") {\n e.preventDefault();\n return handleAction(\"confirm\");\n }\n };\n const handleAction = (action) => {\n var _a;\n if (props.boxType === \"prompt\" && action === \"confirm\" && !validate()) {\n return;\n }\n state.action = action;\n if (state.beforeClose) {\n (_a = state.beforeClose) == null ? void 0 : _a.call(state, action, state, doClose);\n } else {\n doClose();\n }\n };\n const validate = () => {\n if (props.boxType === \"prompt\") {\n const inputPattern = state.inputPattern;\n if (inputPattern && !inputPattern.test(state.inputValue || \"\")) {\n state.editorErrorMessage = state.inputErrorMessage || t(\"el.messagebox.error\");\n state.validateError = true;\n return false;\n }\n const inputValidator = state.inputValidator;\n if (typeof inputValidator === \"function\") {\n const validateResult = inputValidator(state.inputValue);\n if (validateResult === false) {\n state.editorErrorMessage = state.inputErrorMessage || t(\"el.messagebox.error\");\n state.validateError = true;\n return false;\n }\n if (typeof validateResult === \"string\") {\n state.editorErrorMessage = validateResult;\n state.validateError = true;\n return false;\n }\n }\n }\n state.editorErrorMessage = \"\";\n state.validateError = false;\n return true;\n };\n const getInputElement = () => {\n const inputRefs = inputRef.value.$refs;\n return inputRefs.input || inputRefs.textarea;\n };\n const handleClose = () => {\n handleAction(\"close\");\n };\n const onCloseRequested = () => {\n if (props.closeOnPressEscape) {\n handleClose();\n }\n };\n if (props.lockScroll) {\n useLockscreen(visible);\n }\n return {\n ...toRefs(state),\n ns,\n overlayEvent,\n visible,\n hasMessage,\n typeClass,\n contentId,\n inputId,\n btnSize,\n iconComponent,\n confirmButtonClasses,\n rootRef,\n focusStartRef,\n headerRef,\n inputRef,\n confirmRef,\n doClose,\n handleClose,\n onCloseRequested,\n handleWrapperClick,\n handleInputEnter,\n handleAction,\n t\n };\n }\n});\nconst _hoisted_1 = [\"aria-label\", \"aria-describedby\"];\nconst _hoisted_2 = [\"aria-label\"];\nconst _hoisted_3 = [\"id\"];\nfunction _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {\n const _component_el_icon = resolveComponent(\"el-icon\");\n const _component_close = resolveComponent(\"close\");\n const _component_el_input = resolveComponent(\"el-input\");\n const _component_el_button = resolveComponent(\"el-button\");\n const _component_el_focus_trap = resolveComponent(\"el-focus-trap\");\n const _component_el_overlay = resolveComponent(\"el-overlay\");\n return openBlock(), createBlock(Transition, {\n name: \"fade-in-linear\",\n onAfterLeave: _cache[11] || (_cache[11] = ($event) => _ctx.$emit(\"vanish\")),\n persisted: \"\"\n }, {\n default: withCtx(() => [\n withDirectives(createVNode(_component_el_overlay, {\n \"z-index\": _ctx.zIndex,\n \"overlay-class\": [_ctx.ns.is(\"message-box\"), _ctx.modalClass],\n mask: _ctx.modal\n }, {\n default: withCtx(() => [\n createElementVNode(\"div\", {\n role: \"dialog\",\n \"aria-label\": _ctx.title,\n \"aria-modal\": \"true\",\n \"aria-describedby\": !_ctx.showInput ? _ctx.contentId : void 0,\n class: normalizeClass(`${_ctx.ns.namespace.value}-overlay-message-box`),\n onClick: _cache[8] || (_cache[8] = (...args) => _ctx.overlayEvent.onClick && _ctx.overlayEvent.onClick(...args)),\n onMousedown: _cache[9] || (_cache[9] = (...args) => _ctx.overlayEvent.onMousedown && _ctx.overlayEvent.onMousedown(...args)),\n onMouseup: _cache[10] || (_cache[10] = (...args) => _ctx.overlayEvent.onMouseup && _ctx.overlayEvent.onMouseup(...args))\n }, [\n createVNode(_component_el_focus_trap, {\n loop: \"\",\n trapped: _ctx.visible,\n \"focus-trap-el\": _ctx.rootRef,\n \"focus-start-el\": _ctx.focusStartRef,\n onReleaseRequested: _ctx.onCloseRequested\n }, {\n default: withCtx(() => [\n createElementVNode(\"div\", {\n ref: \"rootRef\",\n class: normalizeClass([\n _ctx.ns.b(),\n _ctx.customClass,\n _ctx.ns.is(\"draggable\", _ctx.draggable),\n { [_ctx.ns.m(\"center\")]: _ctx.center }\n ]),\n style: normalizeStyle(_ctx.customStyle),\n tabindex: \"-1\",\n onClick: _cache[7] || (_cache[7] = withModifiers(() => {\n }, [\"stop\"]))\n }, [\n _ctx.title !== null && _ctx.title !== void 0 ? (openBlock(), createElementBlock(\"div\", {\n key: 0,\n ref: \"headerRef\",\n class: normalizeClass([_ctx.ns.e(\"header\"), { \"show-close\": _ctx.showClose }])\n }, [\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"title\"))\n }, [\n _ctx.iconComponent && _ctx.center ? (openBlock(), createBlock(_component_el_icon, {\n key: 0,\n class: normalizeClass([_ctx.ns.e(\"status\"), _ctx.typeClass])\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))\n ]),\n _: 1\n }, 8, [\"class\"])) : createCommentVNode(\"v-if\", true),\n createElementVNode(\"span\", null, toDisplayString(_ctx.title), 1)\n ], 2),\n _ctx.showClose ? (openBlock(), createElementBlock(\"button\", {\n key: 0,\n type: \"button\",\n class: normalizeClass(_ctx.ns.e(\"headerbtn\")),\n \"aria-label\": _ctx.t(\"el.messagebox.close\"),\n onClick: _cache[0] || (_cache[0] = ($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? \"close\" : \"cancel\")),\n onKeydown: _cache[1] || (_cache[1] = withKeys(withModifiers(($event) => _ctx.handleAction(_ctx.distinguishCancelAndClose ? \"close\" : \"cancel\"), [\"prevent\"]), [\"enter\"]))\n }, [\n createVNode(_component_el_icon, {\n class: normalizeClass(_ctx.ns.e(\"close\"))\n }, {\n default: withCtx(() => [\n createVNode(_component_close)\n ]),\n _: 1\n }, 8, [\"class\"])\n ], 42, _hoisted_2)) : createCommentVNode(\"v-if\", true)\n ], 2)) : createCommentVNode(\"v-if\", true),\n createElementVNode(\"div\", {\n id: _ctx.contentId,\n class: normalizeClass(_ctx.ns.e(\"content\"))\n }, [\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"container\"))\n }, [\n _ctx.iconComponent && !_ctx.center && _ctx.hasMessage ? (openBlock(), createBlock(_component_el_icon, {\n key: 0,\n class: normalizeClass([_ctx.ns.e(\"status\"), _ctx.typeClass])\n }, {\n default: withCtx(() => [\n (openBlock(), createBlock(resolveDynamicComponent(_ctx.iconComponent)))\n ]),\n _: 1\n }, 8, [\"class\"])) : createCommentVNode(\"v-if\", true),\n _ctx.hasMessage ? (openBlock(), createElementBlock(\"div\", {\n key: 1,\n class: normalizeClass(_ctx.ns.e(\"message\"))\n }, [\n renderSlot(_ctx.$slots, \"default\", {}, () => [\n !_ctx.dangerouslyUseHTMLString ? (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? \"label\" : \"p\"), {\n key: 0,\n for: _ctx.showInput ? _ctx.inputId : void 0\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(!_ctx.dangerouslyUseHTMLString ? _ctx.message : \"\"), 1)\n ]),\n _: 1\n }, 8, [\"for\"])) : (openBlock(), createBlock(resolveDynamicComponent(_ctx.showInput ? \"label\" : \"p\"), {\n key: 1,\n for: _ctx.showInput ? _ctx.inputId : void 0,\n innerHTML: _ctx.message\n }, null, 8, [\"for\", \"innerHTML\"]))\n ])\n ], 2)) : createCommentVNode(\"v-if\", true)\n ], 2),\n withDirectives(createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"input\"))\n }, [\n createVNode(_component_el_input, {\n id: _ctx.inputId,\n ref: \"inputRef\",\n modelValue: _ctx.inputValue,\n \"onUpdate:modelValue\": _cache[2] || (_cache[2] = ($event) => _ctx.inputValue = $event),\n type: _ctx.inputType,\n placeholder: _ctx.inputPlaceholder,\n \"aria-invalid\": _ctx.validateError,\n class: normalizeClass({ invalid: _ctx.validateError }),\n onKeydown: withKeys(_ctx.handleInputEnter, [\"enter\"])\n }, null, 8, [\"id\", \"modelValue\", \"type\", \"placeholder\", \"aria-invalid\", \"class\", \"onKeydown\"]),\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"errormsg\")),\n style: normalizeStyle({\n visibility: !!_ctx.editorErrorMessage ? \"visible\" : \"hidden\"\n })\n }, toDisplayString(_ctx.editorErrorMessage), 7)\n ], 2), [\n [vShow, _ctx.showInput]\n ])\n ], 10, _hoisted_3),\n createElementVNode(\"div\", {\n class: normalizeClass(_ctx.ns.e(\"btns\"))\n }, [\n _ctx.showCancelButton ? (openBlock(), createBlock(_component_el_button, {\n key: 0,\n loading: _ctx.cancelButtonLoading,\n class: normalizeClass([_ctx.cancelButtonClass]),\n round: _ctx.roundButton,\n size: _ctx.btnSize,\n onClick: _cache[3] || (_cache[3] = ($event) => _ctx.handleAction(\"cancel\")),\n onKeydown: _cache[4] || (_cache[4] = withKeys(withModifiers(($event) => _ctx.handleAction(\"cancel\"), [\"prevent\"]), [\"enter\"]))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.cancelButtonText || _ctx.t(\"el.messagebox.cancel\")), 1)\n ]),\n _: 1\n }, 8, [\"loading\", \"class\", \"round\", \"size\"])) : createCommentVNode(\"v-if\", true),\n withDirectives(createVNode(_component_el_button, {\n ref: \"confirmRef\",\n type: \"primary\",\n loading: _ctx.confirmButtonLoading,\n class: normalizeClass([_ctx.confirmButtonClasses]),\n round: _ctx.roundButton,\n disabled: _ctx.confirmButtonDisabled,\n size: _ctx.btnSize,\n onClick: _cache[5] || (_cache[5] = ($event) => _ctx.handleAction(\"confirm\")),\n onKeydown: _cache[6] || (_cache[6] = withKeys(withModifiers(($event) => _ctx.handleAction(\"confirm\"), [\"prevent\"]), [\"enter\"]))\n }, {\n default: withCtx(() => [\n createTextVNode(toDisplayString(_ctx.confirmButtonText || _ctx.t(\"el.messagebox.confirm\")), 1)\n ]),\n _: 1\n }, 8, [\"loading\", \"class\", \"round\", \"disabled\", \"size\"]), [\n [vShow, _ctx.showConfirmButton]\n ])\n ], 2)\n ], 6)\n ]),\n _: 3\n }, 8, [\"trapped\", \"focus-trap-el\", \"focus-start-el\", \"onReleaseRequested\"])\n ], 42, _hoisted_1)\n ]),\n _: 3\n }, 8, [\"z-index\", \"overlay-class\", \"mask\"]), [\n [vShow, _ctx.visible]\n ])\n ]),\n _: 3\n });\n}\nvar MessageBoxConstructor = /* @__PURE__ */ _export_sfc(_sfc_main, [[\"render\", _sfc_render], [\"__file\", \"index.vue\"]]);\n\nexport { MessageBoxConstructor as default };\n//# sourceMappingURL=index.mjs.map\n","import { createVNode, isVNode, render } from 'vue';\nimport '../../../utils/index.mjs';\nimport MessageBoxConstructor from './index.mjs';\nimport { isString, isFunction, hasOwn, isObject } from '@vue/shared';\nimport { isElement, isUndefined } from '../../../utils/types.mjs';\nimport { debugWarn } from '../../../utils/error.mjs';\nimport { isClient } from '@vueuse/core';\n\nconst messageInstance = /* @__PURE__ */ new Map();\nconst getAppendToElement = (props) => {\n let appendTo = document.body;\n if (props.appendTo) {\n if (isString(props.appendTo)) {\n appendTo = document.querySelector(props.appendTo);\n }\n if (isElement(props.appendTo)) {\n appendTo = props.appendTo;\n }\n if (!isElement(appendTo)) {\n debugWarn(\"ElMessageBox\", \"the appendTo option is not an HTMLElement. Falling back to document.body.\");\n appendTo = document.body;\n }\n }\n return appendTo;\n};\nconst initInstance = (props, container, appContext = null) => {\n const vnode = createVNode(MessageBoxConstructor, props, isFunction(props.message) || isVNode(props.message) ? {\n default: isFunction(props.message) ? props.message : () => props.message\n } : null);\n vnode.appContext = appContext;\n render(vnode, container);\n getAppendToElement(props).appendChild(container.firstElementChild);\n return vnode.component;\n};\nconst genContainer = () => {\n return document.createElement(\"div\");\n};\nconst showMessage = (options, appContext) => {\n const container = genContainer();\n options.onVanish = () => {\n render(null, container);\n messageInstance.delete(vm);\n };\n options.onAction = (action) => {\n const currentMsg = messageInstance.get(vm);\n let resolve;\n if (options.showInput) {\n resolve = { value: vm.inputValue, action };\n } else {\n resolve = action;\n }\n if (options.callback) {\n options.callback(resolve, instance.proxy);\n } else {\n if (action === \"cancel\" || action === \"close\") {\n if (options.distinguishCancelAndClose && action !== \"cancel\") {\n currentMsg.reject(\"close\");\n } else {\n currentMsg.reject(\"cancel\");\n }\n } else {\n currentMsg.resolve(resolve);\n }\n }\n };\n const instance = initInstance(options, container, appContext);\n const vm = instance.proxy;\n for (const prop in options) {\n if (hasOwn(options, prop) && !hasOwn(vm.$props, prop)) {\n vm[prop] = options[prop];\n }\n }\n vm.visible = true;\n return vm;\n};\nfunction MessageBox(options, appContext = null) {\n if (!isClient)\n return Promise.reject();\n let callback;\n if (isString(options) || isVNode(options)) {\n options = {\n message: options\n };\n } else {\n callback = options.callback;\n }\n return new Promise((resolve, reject) => {\n const vm = showMessage(options, appContext != null ? appContext : MessageBox._context);\n messageInstance.set(vm, {\n options,\n callback,\n resolve,\n reject\n });\n });\n}\nconst MESSAGE_BOX_VARIANTS = [\"alert\", \"confirm\", \"prompt\"];\nconst MESSAGE_BOX_DEFAULT_OPTS = {\n alert: { closeOnPressEscape: false, closeOnClickModal: false },\n confirm: { showCancelButton: true },\n prompt: { showCancelButton: true, showInput: true }\n};\nMESSAGE_BOX_VARIANTS.forEach((boxType) => {\n ;\n MessageBox[boxType] = messageBoxFactory(boxType);\n});\nfunction messageBoxFactory(boxType) {\n return (message, title, options, appContext) => {\n let titleOrOpts = \"\";\n if (isObject(title)) {\n options = title;\n titleOrOpts = \"\";\n } else if (isUndefined(title)) {\n titleOrOpts = \"\";\n } else {\n titleOrOpts = title;\n }\n return MessageBox(Object.assign({\n title: titleOrOpts,\n message,\n type: \"\",\n ...MESSAGE_BOX_DEFAULT_OPTS[boxType]\n }, options, {\n boxType\n }), appContext);\n };\n}\nMessageBox.close = () => {\n messageInstance.forEach((_, vm) => {\n vm.doClose();\n });\n messageInstance.clear();\n};\nMessageBox._context = null;\n\nexport { MessageBox as default };\n//# sourceMappingURL=messageBox.mjs.map\n","import MessageBox from './src/messageBox.mjs';\nimport './src/message-box.type.mjs';\n\nconst _MessageBox = MessageBox;\n_MessageBox.install = (app) => {\n _MessageBox._context = app._context;\n app.config.globalProperties.$msgbox = _MessageBox;\n app.config.globalProperties.$messageBox = _MessageBox;\n app.config.globalProperties.$alert = _MessageBox.alert;\n app.config.globalProperties.$confirm = _MessageBox.confirm;\n app.config.globalProperties.$prompt = _MessageBox.prompt;\n};\nconst ElMessageBox = _MessageBox;\n\nexport { ElMessageBox, _MessageBox as default };\n//# sourceMappingURL=index.mjs.map\n"],"sourceRoot":""}