(function(S,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("ant-design-vue"),require("lodash-es"),require("dayjs"),require("@ant-design/icons-vue"),require("msgreader"),require("@vueuse/core"),require("resize-observer-polyfill"),require("@purge-icons/generated")):typeof define=="function"&&define.amd?define(["exports","vue","ant-design-vue","lodash-es","dayjs","@ant-design/icons-vue","msgreader","@vueuse/core","resize-observer-polyfill","@purge-icons/generated"],t):(S=typeof globalThis<"u"?globalThis:S||self,t(S.index={},S.Vue,S.antDesignVue,S.lodashEs,null,S.iconsVue,S.MSGReader,S.core,S.ResizeObserver,S.Iconify))})(this,function(S,t,h,P,So,x,ue,G,tt,nt){"use strict";const Ne="g";function te(e,n,i){let r=e;return n&&(r+=`__${n}`),i&&(r+=`--${i}`),r}function U(e,n=!1){const i=n?`.${Ne}-${e}`:`${Ne}-${e}`;return{b:()=>te(i),e:s=>s?te(i,s):"",m:s=>s?te(i,"",s):"",em:(s,c)=>s&&c?te(i,s,c):""}}/*!
 * is-plain-object <https://github.com/jonschlinkert/is-plain-object>
 *
 * Copyright (c) 2014-2017, Jon Schlinkert.
 * Released under the MIT License.
 */function Le(e){return Object.prototype.toString.call(e)==="[object Object]"}function ot(e){var n,i;return Le(e)===!1?!1:(n=e.constructor,n===void 0?!0:(i=n.prototype,!(Le(i)===!1||i.hasOwnProperty("isPrototypeOf")===!1)))}function X(){return X=Object.assign?Object.assign.bind():function(e){for(var n=1;n<arguments.length;n++){var i=arguments[n];for(var r in i)Object.prototype.hasOwnProperty.call(i,r)&&(e[r]=i[r])}return e},X.apply(this,arguments)}function Ie(e,n){if(e==null)return{};var i,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n.indexOf(i=l[r])>=0||(o[i]=e[i]);return o}const de={silent:!1,logLevel:"warn"},rt=["validator"],je=Object.prototype,Te=je.toString,it=je.hasOwnProperty,he=/^\s*function (\w+)/;function Se(e){var n;const i=(n=e==null?void 0:e.type)!==null&&n!==void 0?n:e;if(i){const r=i.toString().match(he);return r?r[1]:""}return""}const Q=ot,Ce=e=>e;let C=Ce;process.env.NODE_ENV!=="production"&&(C=typeof console<"u"?function(n,i=de.logLevel){de.silent===!1&&console[i](`[VueTypes warn]: ${n}`)}:Ce);const R=(e,n)=>it.call(e,n),lt=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e},H=Array.isArray||function(e){return Te.call(e)==="[object Array]"},W=e=>Te.call(e)==="[object Function]",ne=e=>Q(e)&&R(e,"_vueTypes_name"),De=e=>Q(e)&&(R(e,"type")||["_vueTypes_name","validator","default","required"].some(n=>R(e,n)));function ge(e,n){return Object.defineProperty(e.bind(n),"__original",{value:e})}function $(e,n,i=!1){let r,o=!0,l="";r=Q(e)?e:{type:e};const a=ne(r)?r._vueTypes_name+" - ":"";if(De(r)&&r.type!==null){if(r.type===void 0||r.type===!0||!r.required&&n===void 0)return o;H(r.type)?(o=r.type.some(s=>$(s,n,!0)===!0),l=r.type.map(s=>Se(s)).join(" or ")):(l=Se(r),o=l==="Array"?H(n):l==="Object"?Q(n):l==="String"||l==="Number"||l==="Boolean"||l==="Function"?function(s){if(s==null)return"";const c=s.constructor.toString().match(he);return c?c[1]:""}(n)===l:n instanceof r.type)}if(!o){const s=`${a}value "${n}" should be of type "${l}"`;return i===!1?(C(s),!1):s}if(R(r,"validator")&&W(r.validator)){const s=C,c=[];if(C=u=>{c.push(u)},o=r.validator(n),C=s,!o){const u=(c.length>1?"* ":"")+c.join(`
* `);return c.length=0,i===!1?(C(u),o):u}}return o}function A(e,n){const i=Object.defineProperties(n,{_vueTypes_name:{value:e,writable:!0},isRequired:{get(){return this.required=!0,this}},def:{value(o){return o===void 0?(R(this,"default")&&delete this.default,this):W(o)||$(this,o,!0)===!0?(this.default=H(o)?()=>[...o]:Q(o)?()=>Object.assign({},o):o,this):(C(`${this._vueTypes_name} - invalid default value: "${o}"`),this)}}}),{validator:r}=i;return W(r)&&(i.validator=ge(r,i)),i}function k(e,n){const i=A(e,n);return Object.defineProperty(i,"validate",{value(r){return W(this.validator)&&C(`${this._vueTypes_name} - calling .validate() will overwrite the current custom validator function. Validator info:
${JSON.stringify(this)}`),this.validator=ge(r,this),this}})}function ze(e,n,i){const r=function(c){const u={};return Object.getOwnPropertyNames(c).forEach(M=>{u[M]=Object.getOwnPropertyDescriptor(c,M)}),Object.defineProperties({},u)}(n);if(r._vueTypes_name=e,!Q(i))return r;const{validator:o}=i,l=Ie(i,rt);if(W(o)){let{validator:c}=r;c&&(c=(s=(a=c).__original)!==null&&s!==void 0?s:a),r.validator=ge(c?function(u){return c.call(this,u)&&o.call(this,u)}:o,r)}var a,s;return Object.assign(r,l)}function oe(e){return e.replace(/^(?!\s*$)/gm,"  ")}const at=()=>k("any",{}),st=()=>k("function",{type:Function}),ct=()=>k("boolean",{type:Boolean}),ut=()=>k("string",{type:String}),dt=()=>k("number",{type:Number}),gt=()=>k("array",{type:Array}),Mt=()=>k("object",{type:Object}),ft=()=>A("integer",{type:Number,validator:e=>lt(e)}),pt=()=>A("symbol",{validator:e=>typeof e=="symbol"});function mt(e,n="custom validation failed"){if(typeof e!="function")throw new TypeError("[VueTypes error]: You must provide a function as argument");return A(e.name||"<<anonymous function>>",{type:null,validator(i){const r=e(i);return r||C(`${this._vueTypes_name} - ${n}`),r}})}function yt(e){if(!H(e))throw new TypeError("[VueTypes error]: You must provide an array as argument.");const n=`oneOf - value should be one of "${e.join('", "')}".`,i=e.reduce((r,o)=>{if(o!=null){const l=o.constructor;r.indexOf(l)===-1&&r.push(l)}return r},[]);return A("oneOf",{type:i.length>0?i:void 0,validator(r){const o=e.indexOf(r)!==-1;return o||C(n),o}})}function Nt(e){if(!H(e))throw new TypeError("[VueTypes error]: You must provide an array as argument");let n=!1,i=[];for(let o=0;o<e.length;o+=1){const l=e[o];if(De(l)){if(ne(l)&&l._vueTypes_name==="oneOf"&&l.type){i=i.concat(l.type);continue}if(W(l.validator)&&(n=!0),l.type===!0||!l.type){C('oneOfType - invalid usage of "true" or "null" as types.');continue}i=i.concat(l.type)}else i.push(l)}i=i.filter((o,l)=>i.indexOf(o)===l);const r=i.length>0?i:null;return A("oneOfType",n?{type:r,validator(o){const l=[],a=e.some(s=>{const c=$(ne(s)&&s._vueTypes_name==="oneOf"?s.type||null:s,o,!0);return typeof c=="string"&&l.push(c),c===!0});return a||C(`oneOfType - provided value does not match any of the ${l.length} passed-in validators:
${oe(l.join(`
`))}`),a}}:{type:r})}function Lt(e){return A("arrayOf",{type:Array,validator(n){let i="";const r=n.every(o=>(i=$(e,o,!0),i===!0));return r||C(`arrayOf - value validation error:
${oe(i)}`),r}})}function It(e){return A("instanceOf",{type:e})}function jt(e){return A("objectOf",{type:Object,validator(n){let i="";const r=Object.keys(n).every(o=>(i=$(e,n[o],!0),i===!0));return r||C(`objectOf - value validation error:
${oe(i)}`),r}})}function Tt(e){const n=Object.keys(e),i=n.filter(o=>{var l;return!((l=e[o])===null||l===void 0||!l.required)}),r=A("shape",{type:Object,validator(o){if(!Q(o))return!1;const l=Object.keys(o);if(i.length>0&&i.some(a=>l.indexOf(a)===-1)){const a=i.filter(s=>l.indexOf(s)===-1);return C(a.length===1?`shape - required property "${a[0]}" is not defined.`:`shape - required properties "${a.join('", "')}" are not defined.`),!1}return l.every(a=>{if(n.indexOf(a)===-1)return this._vueTypes_isLoose===!0||(C(`shape - shape definition does not include a "${a}" property. Allowed keys: "${n.join('", "')}".`),!1);const s=$(e[a],o[a],!0);return typeof s=="string"&&C(`shape - "${a}" property validation error:
 ${oe(s)}`),s===!0})}});return Object.defineProperty(r,"_vueTypes_isLoose",{writable:!0,value:!1}),Object.defineProperty(r,"loose",{get(){return this._vueTypes_isLoose=!0,this}}),r}const ht=["name","validate","getter"],St=(()=>{var e;return(e=class{static get any(){return at()}static get func(){return st().def(this.defaults.func)}static get bool(){return ct().def(this.defaults.bool)}static get string(){return ut().def(this.defaults.string)}static get number(){return dt().def(this.defaults.number)}static get array(){return gt().def(this.defaults.array)}static get object(){return Mt().def(this.defaults.object)}static get integer(){return ft().def(this.defaults.integer)}static get symbol(){return pt()}static get nullable(){return{type:null}}static extend(n){if(H(n))return n.forEach(c=>this.extend(c)),this;const{name:i,validate:r=!1,getter:o=!1}=n,l=Ie(n,ht);if(R(this,i))throw new TypeError(`[VueTypes error]: Type "${i}" already defined`);const{type:a}=l;if(ne(a))return delete l.type,Object.defineProperty(this,i,o?{get:()=>ze(i,a,l)}:{value(...c){const u=ze(i,a,l);return u.validator&&(u.validator=u.validator.bind(u,...c)),u}});let s;return s=o?{get(){const c=Object.assign({},l);return r?k(i,c):A(i,c)},enumerable:!0}:{value(...c){const u=Object.assign({},l);let M;return M=r?k(i,u):A(i,u),u.validator&&(M.validator=u.validator.bind(M,...c)),M},enumerable:!0},Object.defineProperty(this,i,s)}}).defaults={},e.sensibleDefaults=void 0,e.config=de,e.custom=mt,e.oneOf=yt,e.instanceOf=It,e.oneOfType=Nt,e.arrayOf=Lt,e.objectOf=jt,e.shape=Tt,e.utils={validate:(n,i)=>$(i,n,!0)===!0,toType:(n,i,r=!1)=>r?k(n,i):A(n,i)},e})();function xe(e={func:()=>{},bool:!0,string:"",number:0,array:()=>[],object:()=>({}),integer:0}){var n;return(n=class extends St{static get sensibleDefaults(){return X({},this.defaults)}static set sensibleDefaults(i){this.defaults=i!==!1?X({},i!==!0?i:e):{}}}).defaults=X({},e),n}class Co extends xe(){}const Ae=xe({func:void 0,bool:void 0,string:void 0,number:void 0,object:void 0,integer:void 0});Ae.extend([{name:"style",getter:!0,type:[String,Object],default:void 0},{name:"VNodeChild",getter:!0,type:void 0}]);const re="G",Ct=Object.prototype.toString;function we(e,n){return Ct.call(e)===`[object ${n}]`}function Z(e){return we(e,"String")}function Me(e){return e&&Array.isArray(e)}function Oe(e){return e!==null&&we(e,"Object")}function ie(e){return typeof e=="function"}function Dt(e){return typeof e<"u"}function zt(e){return!Dt(e)}const Ee=!(typeof window>"u");function be(e,n,i="replace"){return n?e?P.mergeWith({},e,n,(r,o)=>{if(Me(o)&&Me(r))switch(i){case"union":return P.unionWith(r,o,P.isEqual);case"intersection":return P.intersectionWith(r,o,P.isEqual);case"concat":return r.concat(o);case"replace":return o;default:throw new Error(`Unknown merge array strategy: ${i}`)}if(Oe(o)&&Oe(r))return be(r,o,i)}):n:e}function ke(e,n="default",i,r){if(!e||!Reflect.has(e,n))return null;if(!ie(e[n]))return console.error(`${n} is not a function!`),null;const o=e[n];if(!o)return null;const l={...i,...r};return o(l)}function xt(e,n=[]){const i=Object.keys(e),r={};return i.map(o=>{if(n.includes(o))return null;r[o]=l=>ke(e,o,l)}),r}function _e(e,n,i){e&&n&&i&&e.addEventListener(n,i,!1)}function Be(e,n,i){e&&n&&i&&e.removeEventListener(n,i,!1)}for(let e=0;e<=15;e++)e.toString(16);const fe="-internal",Pe=e=>(e==null?void 0:e.startsWith("http"))&&(e==null?void 0:e.includes(fe)),At=e=>{if(Z(e))return Pe(e)&&(e=e==null?void 0:e.replace(fe,"")),e;let n=e==null?void 0:e.fileUrl;return Z(n)&&Pe(n)&&(n=n==null?void 0:n.replace(fe,"")),n},wt=t.defineComponent({name:"ImagePreview",components:{Image:h.Image,PreviewGroup:h.Image.PreviewGroup},props:{functional:Ae.bool,imageList:{type:Array}},setup(e){const n=U("image-preview"),i=t.computed(()=>{const{imageList:r}=e;return r?r.map(o=>Z(o)?{src:o,placeholder:!1}:o):[]});return{prefixCls:n,getImageList:i}}}),zo="",E=(e,n)=>{const i=e.__vccOpts||e;for(const[r,o]of n)i[r]=o;return i};function Ot(e,n,i,r,o,l){const a=t.resolveComponent("Image"),s=t.resolveComponent("PreviewGroup");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.prefixCls)},[t.createVNode(s,null,{default:t.withCtx(()=>[!e.imageList||e.$slots.default?t.renderSlot(e.$slots,"default",{key:0}):(t.openBlock(!0),t.createElementBlock(t.Fragment,{key:1},t.renderList(e.getImageList,c=>(t.openBlock(),t.createBlock(a,t.normalizeProps(t.mergeProps({key:c.src},c)),t.createSlots({_:2},[c.placeholder?{name:"placeholder",fn:t.withCtx(()=>[t.createVNode(a,t.mergeProps(c,{src:c.placeholder,preview:!1}),null,16,["src"])]),key:"0"}:void 0]),1040))),128))]),_:3})],2)}const J=E(wt,[["render",Ot]]),Ye=Object.assign({"./lang/en.ts":Object.freeze(Object.defineProperty({__proto__:null,default:{pagination:{totalItemText:"Total",goToText:"Go to"},accordion:{loading:"loading",noData:"No Data"},autoCompleteDropdown:{latestInput:"Latest input"},cascaderList:{noData:"No data"},colorPicker:{foundationPanel:"Foundation panel",advancedPanel:"Advanced panel"},datePickerPro:{ok:"OK",placeholder:"select date",month1:"Jan",month2:"Feb",month3:"Mar",month4:"Apr",month5:"May",month6:"June",month7:"July",month8:"Aug",month9:"Sep",month10:"Oct",month11:"Nov",month12:"Dec",year:"年",startPlaceholder:"select start date",endPlaceholder:"select end date",getWeekDays(){return["Sun","Mon","Tue","Wed","Thur","Fri","Sat"]},getTimeArr(){return["Hr","Min","Sec"]},getYearMonthStr(e,n){return`${e} - ${n}`}},editableSelect:{noRelatedRecords:"No related records found",noData:"No data"},input:{placeholder:"Please enter"},splitterBar:{collapse:"Collapse",expand:"Expand"},stepsGuide:{previous:"Previous",continue:"Continue",ok:"OK"},table:{selectAll:"Select all",ok:"OK"},timePopup:{ok:"OK"},transfer:{unit:"",panelUnit:"",headerUnit:"",noData:"No Data",placeholder:"Please enter keywords"},tree:{loading:"Loading",newNode:"New node",selectPlaceholder:"Please select"},upload:{save:"Save",upload:"Upload",imgUpload:"ImageUpload",uploaded:"Uploaded",operating:"Operating",del:"Delete",download:"download",saveWarn:"Please wait for the file to upload and save!",saveError:"There is no file successfully uploaded and cannot be saved!",preview:"Preview",choose:"Select the file",accept:"Support {0} format",acceptUpload:"Only upload files in {0} format",maxSize:"A single file does not exceed {0}MB ",maxSizeMultiple:"Only upload files up to {0}MB!",maxNumber:"Only upload up to {0} files",legend:"Legend",fileName:"File name",fileSize:"File size",fileStatue:"File status",startUpload:"Start upload",uploadSuccess:"Upload successfully",uploadError:"Upload failed",uploading:"Uploading",uploadWait:"Please wait for the file upload to finish",reUploadFailed:"Re-upload failed files",noFile:"The file does not exist!"},search:{placeholder:"Enter a keyword"},select:{placeholder:"Please select",noDataText:"No data",noMatchText:"No related records found",loadingText:"Loading..."},tagInput:{maxTagsText:"Maximum number reached: "},timeSelect:{placeholder:"Please select time"},modal:{cancelText:"Close",okText:"Confirm",close:"Close",maximize:"Maximize",restore:"Restore"},excel:{exportModalTitle:"Export data",fileType:"File type",fileName:"File name"},form:{putAway:"Put away",unfold:"Unfold",maxTip:"The number of characters should be less than {0}",apiSelectNotFound:"Wait for data loading to complete..."},previewFile:{notSupport:"The file does not support preview",download:"download"},signature:{deleteSelectedSignature:"Delete selected signature",deleteAllSignature:"Delete all signatures",page:"page",jumpTo:"jump to",dragTip:"Please select the following signature and drag it to the left file",selectTip:"Please select the signature",smallTip:"The signature can't be any smaller",deleteTip:"Please select the signature you want to delete",addSignature:"Add Signature"},common:{preview:"Preview",download:"Download",okText:"OK",closeText:"Close",cancelText:"Cancel",loadingText:"Loading...",saveText:"Save",submitText:"Submit",delText:"Delete",resetText:"Reset",searchText:"Search",queryText:"Search",inputText:"Please enter",chooseText:"Please choose",redo:"Refresh",back:"Back",light:"Light",dark:"Dark",zoomIn:"Zoom In",zoomOut:"Zoom Out",reset:"reset",enterFullScreen:"Full Screen",exitFullScreen:"Exit Full Screen"}}},Symbol.toStringTag,{value:"Module"})),"./lang/zh_cn.ts":Object.freeze(Object.defineProperty({__proto__:null,default:{pagination:{totalItemText:"所有条目",goToText:"跳至",perPage:"条/页"},accordion:{loading:"加载中",noData:"没有数据"},autoCompleteDropdown:{latestInput:"最近输入"},cascaderList:{noData:"没有数据"},colorPicker:{foundationPanel:"基础面板",advancedPanel:"高级面板"},datePickerPro:{ok:"确定",placeholder:"请选择日期",month1:"1月",month2:"2月",month3:"3月",month4:"4月",month5:"5月",month6:"6月",month7:"7月",month8:"8月",month9:"9月",month10:"10月",month11:"11月",month12:"12月",year:"年",startPlaceholder:"请选择开始日期",endPlaceholder:"请选择结束日期",getWeekDays(){return["日","一","二","三","四","五","六"]},getTimeArr(){return["时","分","秒"]},getYearMonthStr(e,n){return`${e}年${n}月`}},editableSelect:{noRelatedRecords:"找不到相关记录",noData:"没有数据"},input:{placeholder:"请输入"},splitterBar:{collapse:"收起",expand:"展开"},stepsGuide:{previous:"上一步",continue:"我知道啦，继续",ok:"我知道啦"},table:{selectAll:"全选",ok:"确定"},timePopup:{ok:"确定"},transfer:{unit:"项",panelUnit:"项",headerUnit:"项",noData:"暂无数据",placeholder:"请输入关键词搜索"},tree:{loading:"加载中",newNode:"新节点",selectPlaceholder:"请选择"},upload:{save:"保存",upload:"上传",imgUpload:"图片上传",uploaded:"已上传",operating:"操作",del:"删除",download:"下载",saveWarn:"请等待文件上传后，保存!",saveError:"没有上传成功的文件，无法保存!",preview:"预览",choose:"选择文件",accept:"支持{0}格式",acceptUpload:"只能上传{0}格式文件",maxSize:"单个文件不超过{0}MB",maxSizeMultiple:"只能上传不超过{0}MB的文件!",maxNumber:"最多只能上传{0}个文件",legend:"略缩图",fileName:"文件名",fileSize:"文件大小",fileStatue:"状态",startUpload:"开始上传",uploadSuccess:"上传成功",uploadError:"上传失败",uploading:"上传中",uploadWait:"请等待文件上传结束后操作",reUploadFailed:"重新上传失败文件",import:"导入",startImport:"开始导入",importing:"导入中",reImportFailed:"重新导入失败文件",noFile:"文件不存在！"},search:{placeholder:"请输入关键字"},select:{placeholder:"请选择",noDataText:"无数据",noMatchText:"找不到相关记录",loadingText:"加载中..."},tagInput:{maxTagsText:"已达到最大个数："},timeSelect:{placeholder:"请选择时间"},modal:{cancelText:"关闭",okText:"确认",close:"关闭",maximize:"最大化",restore:"还原"},excel:{exportModalTitle:"导出数据",fileType:"文件类型",fileName:"文件名"},form:{putAway:"收起",unfold:"展开",maxTip:"字符数应小于{0}位",apiSelectNotFound:"请等待数据加载完成..."},previewFile:{notSupport:"该文件不支持预览",download:"下载"},signature:{deleteSelectedSignature:"删除选中签名",deleteAllSignature:"删除全部签名",page:"页",jumpTo:"跳至",dragTip:"请选择以下签名并将其拖到左侧文件",selectTip:"请选择签名",smallTip:"已经最小了",deleteTip:"请选中你要删除的签名",addSignature:"新建电子签章"},common:{preview:"预览",download:"下载",okText:"确认",closeText:"关闭",cancelText:"取消",loadingText:"加载中...",saveText:"保存",submitText:"提交",delText:"删除",resetText:"重置",searchText:"搜索",queryText:"查询",inputText:"请输入",chooseText:"请选择",redo:"刷新",back:"返回",light:"亮色主题",dark:"黑暗主题",zoomIn:"放大",zoomOut:"缩小",reset:"还原",enterFullScreen:"全屏",exitFullScreen:"退出全屏"}}},Symbol.toStringTag,{value:"Module"}))}),Qe={};Object.keys(Ye).forEach(e=>{const n=Ye[e].default||{};Qe[e]=n});const $e=t.ref("zh_cn"),Fe=()=>{const e=t.reactive({langMessages:Qe}),n=()=>$e.value.toLocaleLowerCase();return{getLang:n,setLang:o=>{$e.value=o},getMessages:()=>{const o=`./lang/${n()}.ts`;return e.langMessages[o]}}},Et="/"+"preview.html",Ue=["csv","djvu","doc","docm","docx","docxf","dot","dotm","dotx","epub","fb2","fodp","fods","fodt","htm","html","mht","odp","ods","odt","oform","otp","ots","ott","oxps","pdf","pot","potm","potx","pps","ppsm","ppsx","ppt","pptm","pptx","rtf","txt","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xml","xps"],Re=["jpg","jpeg","png","gif","bmp","webp"],bt=["msg"],kt=[...Ue,...Re,...bt];function He(e){const{url:n,fileName:i,...r}=e,o=t.computed(()=>{const g=t.unref(i);if(g)return g;if(!t.unref(n))return"";const L=t.unref(n).split("/"),j=L.length,f=L[j-1].split("?");return decodeURIComponent(f[0])}),l=t.computed(()=>{const g=t.unref(o);if(!g)return"";const y=g.split(".").pop();return(y==null?void 0:y.toLowerCase())||""}),a=t.computed(()=>{const g=t.unref(l);return g?kt.includes(g):!1}),s=t.computed(()=>{const g=t.unref(l);return g?Ue.includes(g):!1}),c=t.computed(()=>{const g=t.unref(l);return g?Re.includes(g):!1}),u=t.computed(()=>t.unref(l)==="pdf"),M=t.computed(()=>{const g=t.unref(l);return g?g==="msg":!1}),m=t.computed(()=>{const g=At(t.unref(n)),y=t.unref(u),L=t.unref(s),{getLang:j}=Fe(),f=j()==="en"?"en":"zh_CN",I=t.unref(e==null?void 0:e.mode)||"view";if(y&&I==="view")return g;if(L){let N=`${Et}?url=${encodeURIComponent(g)}&fileName=${encodeURIComponent(t.unref(o))}&fileType=${t.unref(l)}&lang=${f}`;for(const D in r)if(Object.prototype.hasOwnProperty.call(r,D)){const w=t.unref(r[D]);N+=`&${D}=${encodeURIComponent(w)}`}return N}return g});return{getFileName:o,getFileExt:l,getIsSupportPreview:a,getIsOfficeFile:s,getIsImageFile:c,getIsPdfFile:u,getPreviewSrc:m,getIsMsgFile:M}}function _t(e,n){const i=n.split(".");let r=e;return i.forEach(o=>{r=r[o]??""}),r}function q(){return e=>{const n=Fe().getMessages();return _t(n,e)}}const Bt=["src"],Pt=["src"],Yt={key:2,class:"empty"},Qt={class:"description"},$t=["href"],Ft=t.defineComponent({__name:"DocViewer",props:{url:{type:String,required:!0},fileName:{type:String}},setup(e){const n=e,i=q(),{url:r,fileName:o}=t.toRefs(n),{getPreviewSrc:l,getIsImageFile:a,getIsSupportPreview:s}=He({url:r,fileName:o});return(c,u)=>t.unref(a)?(t.openBlock(),t.createElementBlock("img",{key:0,src:t.unref(l)},null,8,Bt)):t.unref(s)?(t.openBlock(),t.createElementBlock("iframe",{key:1,src:t.unref(l),width:"100%",height:"100%"},null,8,Pt)):t.unref(r)?(t.openBlock(),t.createElementBlock("div",Yt,[t.createVNode(t.unref(x.FileUnknownOutlined),{class:"icon"}),t.createElementVNode("div",Qt,[t.createTextVNode(t.toDisplayString(t.unref(i)("previewFile.notSupport"))+", ",1),t.createElementVNode("a",{href:t.unref(r),target:"_blank"},t.toDisplayString(t.unref(i)("previewFile.download")),9,$t)])])):t.createCommentVNode("",!0)}}),bo="",K=E(Ft,[["__scopeId","data-v-b5917ee6"]]),We=q(),Ut={visible:{type:Boolean},scrollTop:{type:Boolean,default:!0},height:{type:Number},minHeight:{type:Number},draggable:{type:Boolean,default:!0},centered:{type:Boolean},cancelText:{type:String,default:We("modal.cancelText")},okText:{type:String,default:We("modal.okText")},closeFunc:Function},pe=Object.assign({},Ut,{defaultFullscreen:{type:Boolean},canFullscreen:{type:Boolean,default:!0},wrapperFooterOffset:{type:Number,default:0},helpMessage:[String,Array],useWrapper:{type:Boolean,default:!0},loading:{type:Boolean},loadingTip:{type:String},showCancelBtn:{type:Boolean,default:!0},showOkBtn:{type:Boolean,default:!0},wrapperProps:Object,afterClose:Function,bodyStyle:Object,closable:{type:Boolean,default:!0},closeIcon:Object,confirmLoading:{type:Boolean},destroyOnClose:{type:Boolean,default:!0},footer:Object,getContainer:Function,mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},keyboard:{type:Boolean,default:!0},maskStyle:Object,okType:{type:String,default:"primary"},okButtonProps:Object,cancelButtonProps:Object,title:{type:String},visible:{type:Boolean},width:[String,Number],wrapClassName:{type:String},zIndex:{type:Number}});function Rt(e){const n=t.ref(!1);let i;function r(){n.value=!1,i&&window.clearTimeout(i)}function o(){r(),i=setTimeout(()=>{n.value=!0},e)}return o(),G.tryOnUnmounted(r),{readyRef:n,stop:r,start:o}}function Ht(e,n,i=!1){if(!ie(e))throw new Error("handle is not Function!");const{readyRef:r,stop:o,start:l}=Rt(n);return i?e():t.watch(r,a=>{a&&e()},{immediate:!1}),{readyRef:r,stop:o,start:l}}function Wt(e){const n=(o,l)=>getComputedStyle(o)[l],i=o=>{if(!o)return;o.setAttribute("data-drag",t.unref(e.draggable));const l=o.querySelector(".ant-modal-header"),a=o.querySelector(".ant-modal");!l||!a||!t.unref(e.draggable)||(l.style.cursor="move",l.onmousedown=s=>{if(!s)return;const c=s.clientX,u=s.clientY,M=document.body.clientWidth,m=document.documentElement.clientHeight,g=a.offsetWidth,y=a.offsetHeight,L=a.offsetLeft,j=M-a.offsetLeft-g,f=a.offsetTop,I=m-a.offsetTop-y,N=n(a,"left"),D=n(a,"top");let w=+N,_=+D;N.includes("%")?(w=+document.body.clientWidth*(+N.replace(/%/g,"")/100),_=+document.body.clientHeight*(+D.replace(/%/g,"")/100)):(w=+N.replace(/px/g,""),_=+D.replace(/px/g,"")),document.onmousemove=function(Y){let p=Y.clientX-c,O=Y.clientY-u;-p>L?p=-L:p>j&&(p=j),-O>f?O=-f:O>I&&(O=I),a.style.cssText+=`;left:${p+w}px;top:${O+_}px;`},document.onmouseup=()=>{document.onmousemove=null,document.onmouseup=null}})},r=()=>{const o=document.querySelectorAll(".ant-modal-wrap");for(const l of Array.from(o)){if(!l)continue;const a=n(l,"display"),s=l.getAttribute("data-drag");a!=="none"&&(s===null||t.unref(e.destroyOnClose))&&i(l)}};t.watchEffect(()=>{!t.unref(e.visible)||!t.unref(e.draggable)||Ht(()=>{r()},30)})}function Zt(e){return typeof e=="function"||Object.prototype.toString.call(e)==="[object Object]"&&!t.isVNode(e)}const vt=t.defineComponent({name:"Modal",inheritAttrs:!1,components:{Modal:h.Modal},props:pe,emits:["cancel"],setup(e,{slots:n,emit:i,attrs:r}){const{visible:o,draggable:l,destroyOnClose:a}=t.toRefs(e);Wt({visible:o,destroyOnClose:a,draggable:l});const s=c=>{i("cancel",c)};return()=>{let c;const u={...t.unref(r),...e,onCancel:s};return t.createVNode(h.Modal,u,Zt(c=xt(n))?c:{default:()=>[c]})}}});function Vt(e,n=150,i){let r=()=>{e()};r=G.useDebounceFn(r,n);const l=()=>{i&&i.immediate&&r(),window.addEventListener("resize",r)},a=()=>{window.removeEventListener("resize",r)};return G.tryOnMounted(()=>{l()}),G.tryOnUnmounted(()=>{a()}),[l,a]}const Gt=typeof window>"u";function Xt(e){for(const n of e){const i=n.target.__resizeListeners__||[];i.length&&i.forEach(r=>{r()})}}function Ze(e,n){Gt||(e.__resizeListeners__||(e.__resizeListeners__=[],e.__ro__=new tt(Xt),e.__ro__.observe(e)),e.__resizeListeners__.push(n))}function ve(e,n){!e||!e.__resizeListeners__||(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(n),1),e.__resizeListeners__.length||e.__ro__.disconnect())}const Jt={vertical:{offset:"offsetHeight",scroll:"scrollTop",scrollSize:"scrollHeight",size:"height",key:"vertical",axis:"Y",client:"clientY",direction:"top"},horizontal:{offset:"offsetWidth",scroll:"scrollLeft",scrollSize:"scrollWidth",size:"width",key:"horizontal",axis:"X",client:"clientX",direction:"left"}};function qt({move:e,size:n,bar:i}){const r={},o=`translate${i.axis}(${e}%)`;return r[i.size]=n,r.transform=o,r.msTransform=o,r.webkitTransform=o,r}function Kt(e,n){return Object.assign(e,n)}function en(e){const n={};for(let i=0;i<e.length;i++)e[i]&&Kt(n,e[i]);return n}const tn=t.defineComponent({name:"Bar",props:{vertical:Boolean,size:String,move:Number},setup(e){const n=t.getCurrentInstance(),i=t.ref(),r=t.inject("scroll-bar-wrap",{}),o=t.computed(()=>Jt[e.vertical?"vertical":"horizontal"]),l=t.ref({}),a=t.ref(),s=g=>{var I,N;if(a.value===!1)return;const y=l.value[o.value.axis];if(!y)return;const L=(((I=n==null?void 0:n.vnode.el)==null?void 0:I.getBoundingClientRect()[o.value.direction])-g[o.value.client])*-1,j=i.value[o.value.offset]-y,f=(L-j)*100/((N=n==null?void 0:n.vnode.el)==null?void 0:N[o.value.offset]);r.value[o.value.scroll]=f*r.value[o.value.scrollSize]/100};function c(){a.value=!1,l.value[o.value.axis]=0,Be(document,"mousemove",s),document.onselectstart=null}const u=g=>{g.stopImmediatePropagation(),a.value=!0,_e(document,"mousemove",s),_e(document,"mouseup",c),document.onselectstart=()=>!1},M=g=>{var y;g.ctrlKey||g.button===2||((y=window.getSelection())==null||y.removeAllRanges(),u(g),l.value[o.value.axis]=g.currentTarget[o.value.offset]-(g[o.value.client]-g.currentTarget.getBoundingClientRect()[o.value.direction]))},m=g=>{var f;const y=Math.abs(g.target.getBoundingClientRect()[o.value.direction]-g[o.value.client]),L=i.value[o.value.offset]/2,j=(y-L)*100/((f=n==null?void 0:n.vnode.el)==null?void 0:f[o.value.offset]);r.value[o.value.scroll]=j*r.value[o.value.scrollSize]/100};return t.onUnmounted(()=>{Be(document,"mouseup",c)}),()=>t.h("div",{class:["scrollbar__bar","is-"+o.value.key],onMousedown:m},t.h("div",{ref:i,class:"scrollbar__thumb",onMousedown:M,style:qt({size:e.size,move:e.move,bar:o.value})}))}}),nn=t.defineComponent({name:"Scrollbar",components:{Bar:tn},props:{native:{type:Boolean,default:!1},wrapStyle:{type:[String,Array],default:""},wrapClass:{type:[String,Array],default:""},viewClass:{type:[String,Array],default:""},viewStyle:{type:[String,Array],default:""},noresize:Boolean,tag:{type:String,default:"div"}},setup(e){const n=t.ref("0"),i=t.ref("0"),r=t.ref(0),o=t.ref(0),l=t.ref(),a=t.ref();t.provide("scroll-bar-wrap",l);const s=t.computed(()=>Array.isArray(e.wrapStyle)?en(e.wrapStyle):e.wrapStyle),c=()=>{e.native||(o.value=t.unref(l).scrollTop*100/t.unref(l).clientHeight,r.value=t.unref(l).scrollLeft*100/t.unref(l).clientWidth)},u=()=>{if(!t.unref(l))return;const M=t.unref(l).clientHeight*100/t.unref(l).scrollHeight,m=t.unref(l).clientWidth*100/t.unref(l).scrollWidth;i.value=M<100?M+"%":"",n.value=m<100?m+"%":""};return t.onMounted(()=>{e.native||(t.nextTick(u),e.noresize||(Ze(t.unref(a),u),Ze(t.unref(l),u),addEventListener("resize",u)))}),t.onBeforeUnmount(()=>{e.native||e.noresize||(ve(t.unref(a),u),ve(t.unref(l),u),removeEventListener("resize",u))}),{moveX:r,moveY:o,sizeWidth:n,sizeHeight:i,style:s,wrap:l,resize:a,update:u,handleScroll:c}}}),ko="",on={class:"scrollbar"};function rn(e,n,i,r,o,l){const a=t.resolveComponent("bar");return t.openBlock(),t.createElementBlock("div",on,[t.createElementVNode("div",{ref:"wrap",class:t.normalizeClass([e.wrapClass,"scrollbar__wrap",e.native?"":"scrollbar__wrap--hidden-default"]),style:t.normalizeStyle(e.style),onScroll:n[0]||(n[0]=(...s)=>e.handleScroll&&e.handleScroll(...s))},[(t.openBlock(),t.createBlock(t.resolveDynamicComponent(e.tag),{ref:"resize",class:t.normalizeClass(["scrollbar__view",e.viewClass]),style:t.normalizeStyle(e.viewStyle)},{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},8,["class","style"]))],38),e.native?t.createCommentVNode("",!0):(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[t.createVNode(a,{move:e.moveX,size:e.sizeWidth},null,8,["move","size"]),t.createVNode(a,{vertical:"",move:e.moveY,size:e.sizeHeight},null,8,["move","size"])],64))])}const ln=E(nn,[["render",rn]]),an=(e,n,i,r)=>(e/=r/2,e<1?i/2*e*e+n:(e--,-i/2*(e*(e-2)-1)+n)),sn=(e,n)=>{e.scrollTop=n},cn=e=>e.scrollTop;function Ve({el:e,to:n,duration:i=500,callback:r}){const o=t.ref(!1),l=cn(e),a=n-l,s=20;let c=0;i=zt(i)?500:i;const u=function(){if(!t.unref(o))return;c+=s;const g=an(c,l,a,i);sn(e,g),c<i&&t.unref(o)?requestAnimationFrame(u):r&&ie(r)&&r()};return{start:()=>{o.value=!0,u()},stop:()=>{o.value=!1}}}const un=t.defineComponent({name:`${re}ScrollContainer`,components:{Scrollbar:ln},setup(){const e=t.ref(null);function n(o,l=500){const a=t.unref(e);a&&t.nextTick(()=>{const s=t.unref(a.wrap);if(!s)return;const{start:c}=Ve({el:s,to:o,duration:l});c()})}function i(){const o=t.unref(e);return o?o.wrap:null}function r(){const o=t.unref(e);o&&t.nextTick(()=>{const l=t.unref(o.wrap);if(!l)return;const a=l.scrollHeight,{start:s}=Ve({el:l,to:a});s()})}return{scrollbarRef:e,scrollTo:n,scrollBottom:r,getScrollWrap:i}}}),_o="";function dn(e,n,i,r,o,l){const a=t.resolveComponent("Scrollbar");return t.openBlock(),t.createBlock(a,t.mergeProps({ref:"scrollbarRef",class:"scroll-container"},e.$attrs),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16)}const le=E(un,[["render",dn]]);le.install=function(e,n){e.component(n||le.name,le)};function gn(e,n=Symbol(),i={}){const{readonly:r=!0,createProvider:o=!1,native:l=!1}=i,a=t.reactive(e),s=r?t.readonly(a):a;return!o&&t.provide(n,l?e:s),{state:a}}const Mn=Symbol();function fn(e){return gn(e,Mn)}const pn={loading:{type:Boolean},useWrapper:{type:Boolean,default:!0},modalHeaderHeight:{type:Number,default:57},modalFooterHeight:{type:Number,default:74},minHeight:{type:Number,default:200},height:{type:Number},footerOffset:{type:Number,default:0},visible:{type:Boolean},fullScreen:{type:Boolean},loadingTip:{type:String}},mn=t.defineComponent({name:"ModalWrapper",components:{ScrollContainer:le},inheritAttrs:!1,props:pn,emits:["height-change","ext-height"],setup(e,{emit:n}){const i=t.ref(null),r=t.ref(null),o=t.ref(0),l=t.ref(0);let a=0;Vt(u.bind(null,!1)),G.useMutationObserver(r,()=>{u()},{attributes:!0,subtree:!0}),fn({redoModalHeight:u});const s=t.computed(()=>({minHeight:`${e.minHeight}px`,[e.fullScreen?"height":"maxHeight"]:`${t.unref(o)}px`}));t.watchEffect(()=>{e.useWrapper&&u()}),t.watch(()=>e.fullScreen,M=>{u(),M?l.value=o.value:o.value=l.value}),t.onMounted(()=>{const{modalHeaderHeight:M,modalFooterHeight:m}=e;n("ext-height",M+m)}),t.onUnmounted(()=>{});async function c(){t.nextTick(()=>{var m;const M=t.unref(i);M&&((m=M==null?void 0:M.scrollTo)==null||m.call(M,0))})}async function u(){if(!e.visible)return;const M=t.unref(i);if(!M)return;const m=M.$el.parentElement;if(m){m.style.padding="0",await t.nextTick();try{const g=m.parentElement&&m.parentElement.parentElement;if(!g)return;const y=getComputedStyle(g).top,L=Number.parseInt(y);let j=window.innerHeight-L*2+(e.footerOffset||0)-e.modalFooterHeight-e.modalHeaderHeight;L<40&&(j-=26),await t.nextTick();const f=t.unref(r);if(!f)return;await t.nextTick(),a=f.scrollHeight,e.fullScreen?o.value=window.innerHeight-e.modalFooterHeight-e.modalHeaderHeight-28:o.value=e.height?e.height:a>j?j:a,n("height-change",t.unref(o))}catch(g){console.log(g)}}}return{wrapperRef:i,spinRef:r,spinStyle:s,scrollTop:c,setModalHeight:u}}}),yn=["loading-tip"];function Nn(e,n,i,r,o,l){const a=t.resolveComponent("ScrollContainer"),s=t.resolveDirective("loading");return t.openBlock(),t.createBlock(a,{ref:"wrapperRef"},{default:t.withCtx(()=>[t.withDirectives((t.openBlock(),t.createElementBlock("div",{ref:"spinRef",style:t.normalizeStyle(e.spinStyle),"loading-tip":e.loadingTip},[t.renderSlot(e.$slots,"default")],12,yn)),[[s,e.loading]])]),_:3},512)}const Ln=E(mn,[["render",Nn]]),In=t.defineComponent({name:"ModalClose",components:{Tooltip:h.Tooltip,FullscreenExitOutlined:x.FullscreenExitOutlined,FullscreenOutlined:x.FullscreenOutlined,CloseOutlined:x.CloseOutlined},props:{canFullscreen:{type:Boolean,default:!0},fullScreen:{type:Boolean}},emits:["cancel","fullscreen"],setup(e,{emit:n}){const r=U("basic-modal-close").b();t.getCurrentInstance();const o=q(),l=t.computed(()=>[r,`${r}--custom`,{[`${r}--can-full`]:e.canFullscreen}]);function a(c){n("cancel",c)}function s(c){c==null||c.stopPropagation(),c==null||c.preventDefault(),n("fullscreen")}return{t:o,getClass:l,prefixCls:r,handleCancel:a,handleFullScreen:s}}}),Bo="";function jn(e,n,i,r,o,l){const a=t.resolveComponent("FullscreenExitOutlined"),s=t.resolveComponent("Tooltip"),c=t.resolveComponent("FullscreenOutlined"),u=t.resolveComponent("CloseOutlined");return t.openBlock(),t.createElementBlock("div",{class:t.normalizeClass(e.getClass)},[e.canFullscreen?(t.openBlock(),t.createElementBlock(t.Fragment,{key:0},[e.fullScreen?(t.openBlock(),t.createBlock(s,{key:0,title:e.t("modal.restore"),placement:"bottom"},{default:t.withCtx(()=>[t.createVNode(a,{role:"full",onClick:e.handleFullScreen},null,8,["onClick"])]),_:1},8,["title"])):(t.openBlock(),t.createBlock(s,{key:1,title:e.t("modal.maximize"),placement:"bottom"},{default:t.withCtx(()=>[t.createVNode(c,{role:"close",onClick:e.handleFullScreen},null,8,["onClick"])]),_:1},8,["title"]))],64)):t.createCommentVNode("",!0),t.createVNode(s,{title:e.t("modal.close"),placement:"bottom"},{default:t.withCtx(()=>[t.createVNode(u,{onClick:e.handleCancel},null,8,["onClick"])]),_:1},8,["title"])],2)}const Tn=E(In,[["render",jn]]),hn=t.defineComponent({name:"BasicModalFooter",props:pe,components:{Button:h.Button},emits:["ok","cancel"],setup(e,{emit:n}){function i(o){n("ok",o)}function r(o){n("cancel",o)}return{handleOk:i,handleCancel:r}}});function Sn(e,n,i,r,o,l){const a=t.resolveComponent("Button");return t.openBlock(),t.createElementBlock("div",null,[t.renderSlot(e.$slots,"insertFooter"),e.showCancelBtn?(t.openBlock(),t.createBlock(a,t.mergeProps({key:0},e.cancelButtonProps,{onClick:e.handleCancel}),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.cancelText),1)]),_:1},16,["onClick"])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"centerFooter"),e.showOkBtn?(t.openBlock(),t.createBlock(a,t.mergeProps({key:1,type:e.okType,onClick:e.handleOk,loading:e.confirmLoading},e.okButtonProps),{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.okText),1)]),_:1},16,["type","onClick","loading"])):t.createCommentVNode("",!0),t.renderSlot(e.$slots,"appendFooter")])}const Cn=E(hn,[["render",Sn]]),Dn=t.defineComponent({name:`${re}SvgIcon`,props:{prefix:{type:String,default:"icon"},name:{type:String,required:!0},size:{type:[Number,String],default:16},spin:{type:Boolean,default:!1}},setup(e){const i=U("svg-icon").b(),r=t.computed(()=>`#${e.prefix}-${e.name}`),o=t.computed(()=>{const{size:l}=e;let a=`${l}`;return a=`${a.replace("px","")}px`,{width:a,height:a}});return{symbolId:r,prefixCls:i,getStyle:o}}}),Po="",zn=["xlink:href"];function xn(e,n,i,r,o,l){return t.openBlock(),t.createElementBlock("svg",{class:t.normalizeClass([e.prefixCls,e.$attrs.class,e.spin&&"svg-icon-spin"]),style:t.normalizeStyle(e.getStyle),"aria-hidden":"true"},[t.createElementVNode("use",{"xlink:href":e.symbolId},null,8,zn)],6)}const An=E(Dn,[["render",xn]]),Ge="|svg",wn=t.defineComponent({name:`${re}Icon`,components:{SvgIcon:An},props:{icon:String,color:String,size:{type:[String,Number],default:16},spin:{type:Boolean,default:!1},prefix:{type:String,default:""}},setup(e){const n=t.ref(null),i=t.computed(()=>{var s;return(s=e.icon)==null?void 0:s.endsWith(Ge)}),r=t.computed(()=>e.icon.replace(Ge,"")),o=t.computed(()=>`${e.prefix?e.prefix+":":""}${e.icon}`),l=async()=>{if(t.unref(i))return;const s=t.unref(n);if(!s)return;await t.nextTick();const c=t.unref(o);if(!c)return;const u=nt.renderSVG(c,{});if(u)s.textContent="",s.appendChild(u);else{const M=document.createElement("span");M.className="iconify",M.dataset.icon=c,s.textContent="",s.appendChild(M)}},a=t.computed(()=>{const{size:s,color:c}=e;let u=s;return Z(s)&&(u=parseInt(s,10)),{fontSize:`${u}px`,color:c,display:"inline-flex"}});return t.watch(()=>e.icon,l,{flush:"post"}),t.onMounted(l),{elRef:n,getWrapStyle:a,isSvgIcon:i,getSvgIcon:r}}}),Yo="";function On(e,n,i,r,o,l){const a=t.resolveComponent("SvgIcon");return e.isSvgIcon?(t.openBlock(),t.createBlock(a,{key:0,size:e.size,name:e.getSvgIcon,class:t.normalizeClass([e.$attrs.class,"anticon"]),spin:e.spin},null,8,["size","name","class","spin"])):(t.openBlock(),t.createElementBlock("span",{key:1,ref:"elRef",class:t.normalizeClass([e.$attrs.class,"app-iconify anticon",e.spin&&"app-iconify-spin"]),style:t.normalizeStyle(e.getWrapStyle)},null,6))}const me=E(wn,[["render",On]]);me.install=function(e,n){e.component(n||me.name,me)};const Qo="",En={maxWidth:{type:String,default:"600px"},showIndex:{type:Boolean},color:{type:String,default:"#ffffff"},fontSize:{type:String,default:"14px"},placement:{type:String,default:"right"},text:{type:[Array,String]}},bn=t.defineComponent({name:"BasicHelp",components:{Tooltip:h.Tooltip},props:En,setup(e,{slots:n}){const r=U("basic-help").b(),o=t.computed(()=>({color:e.color,fontSize:e.fontSize})),l=t.computed(()=>({maxWidth:e.maxWidth}));function a(){const c=e.text;return Z(c)?t.createVNode("p",null,[c]):Me(c)?c.map((u,M)=>t.createVNode("p",{key:u},[t.createVNode(t.Fragment,null,[e.showIndex?`${M+1}. `:"",u])])):null}function s(c){return(c==null?void 0:c.parentNode)??document.body}return()=>t.createVNode(h.Tooltip,{overlayClassName:`${r}__wrap`,title:t.createVNode("div",{style:t.unref(o)},[a()]),autoAdjustOverflow:!0,overlayStyle:t.unref(l),placement:e.placement,getPopupContainer:()=>s()},{default:()=>[t.createVNode("span",{class:r},[ke(n)||t.createVNode(x.InfoCircleOutlined,null,null)])]})}}),$o="",kn=t.defineComponent({__name:"BasicTitle",props:{helpMessage:{type:[String,Array],default:""},span:{type:Boolean},normal:{type:Boolean}},setup(e){const n=U("basic-title"),i=e,r=n.b(),o=t.useSlots(),l=t.computed(()=>[r,{[`${r}-show-span`]:i.span&&o.default},{[`${r}-normal`]:i.normal}]);return(a,s)=>(t.openBlock(),t.createElementBlock("span",{class:t.normalizeClass(l.value)},[t.renderSlot(a.$slots,"default"),e.helpMessage?(t.openBlock(),t.createBlock(bn,{key:0,class:t.normalizeClass(`${t.unref(r)}-help`),text:e.helpMessage},null,8,["class","text"])):t.createCommentVNode("",!0)],2))}}),Fo="",_n=t.defineComponent({name:"BasicModalHeader",components:{BasicTitle:kn},props:{helpMessage:{type:[String,Array]},title:{type:String}},emits:["dblclick"]});function Bn(e,n,i,r,o,l){const a=t.resolveComponent("BasicTitle");return t.openBlock(),t.createBlock(a,{helpMessage:e.helpMessage},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(e.title),1)]),_:1},8,["helpMessage"])}const Pn=E(_n,[["render",Bn]]);function Yn(e){const n=t.ref(!1),i=t.computed(()=>{const o=t.unref(e.wrapClassName)||"";return t.unref(n)?`fullscreen-modal ${o} `:t.unref(o)});function r(o){o&&o.stopPropagation(),n.value=!t.unref(n)}return{getWrapClassName:i,handleFullScreen:r,fullScreenRef:n}}const Qn=t.defineComponent({name:`${re}BasicModal`,components:{Modal:vt,ModalWrapper:Ln,ModalClose:Tn,ModalFooter:Cn,ModalHeader:Pn},inheritAttrs:!1,props:pe,emits:["visible-change","height-change","cancel","ok","register","update:visible"],setup(e,{emit:n,attrs:i}){const r=t.ref(!1),o=t.ref(null),l=t.ref(null),a=U("basic-modal"),s=t.ref(0),c={setModalProps:N,emitVisible:void 0,redoModalHeight:()=>{t.nextTick(()=>{t.unref(l)&&t.unref(l).setModalHeight()})}},u=t.getCurrentInstance();u&&n("register",c,u.uid);const M=t.computed(()=>({...e,...t.unref(o)})),{handleFullScreen:m,getWrapClassName:g,fullScreenRef:y}=Yn({modalWrapperRef:l,extHeightRef:s,wrapClassName:t.toRef(M.value,"wrapClassName")}),L=t.computed(()=>({...{...t.unref(M),visible:t.unref(r),okButtonProps:void 0,cancelButtonProps:void 0,title:void 0},wrapClassName:t.unref(g)})),j=t.computed(()=>{const p={...i,...t.unref(M),visible:t.unref(r),wrapClassName:t.unref(g)};return t.unref(y)?P.omit(p,["height","title"]):P.omit(p,"title")}),f=t.computed(()=>{if(!t.unref(y))return t.unref(L).height});t.watchEffect(()=>{r.value=!!e.visible,y.value=!!e.defaultFullscreen}),t.watch(()=>t.unref(r),p=>{n("visible-change",p),n("update:visible",p),t.nextTick(()=>{e.scrollTop&&p&&t.unref(l)&&t.unref(l).scrollTop()})},{immediate:!1});async function I(p){var O,ce;if(p==null||p.stopPropagation(),!((ce=(O=p.target)==null?void 0:O.classList)!=null&&ce.contains(a.b()+"-close--custom"))){if(e.closeFunc&&ie(e.closeFunc)){const ye=await e.closeFunc();r.value=!ye;return}r.value=!1,n("cancel",p)}}function N(p){o.value=be(t.unref(o)||{},p),Reflect.has(p,"visible")&&(r.value=!!p.visible),Reflect.has(p,"defaultFullscreen")&&(y.value=!!p.defaultFullscreen)}function D(p){n("ok",p)}function w(p){n("height-change",p)}function _(p){s.value=p}function Y(p){e.canFullscreen&&(p.stopPropagation(),m(p))}return{handleCancel:I,getBindValue:j,getProps:L,handleFullScreen:m,fullScreenRef:y,getMergeProps:M,handleOk:D,visibleRef:r,omit:P.omit,modalWrapperRef:l,handleExtHeight:_,handleHeightChange:w,handleTitleDbClick:Y,getWrapperHeight:f}}});function $n(e,n,i,r,o,l){const a=t.resolveComponent("ModalClose"),s=t.resolveComponent("ModalHeader"),c=t.resolveComponent("ModalFooter"),u=t.resolveComponent("ModalWrapper"),M=t.resolveComponent("Modal",!0);return t.openBlock(),t.createBlock(M,t.mergeProps(e.getBindValue,{onCancel:e.handleCancel}),t.createSlots({default:t.withCtx(()=>[t.createVNode(u,t.mergeProps({useWrapper:e.getProps.useWrapper,footerOffset:e.wrapperFooterOffset,fullScreen:e.fullScreenRef,ref:"modalWrapperRef",loading:e.getProps.loading,"loading-tip":e.getProps.loadingTip,minHeight:e.getProps.minHeight,height:e.getWrapperHeight,visible:e.visibleRef,modalFooterHeight:e.footer!==void 0&&!e.footer?0:void 0},e.omit(e.getProps.wrapperProps,"visible","height","modalFooterHeight"),{onExtHeight:e.handleExtHeight,onHeightChange:e.handleHeightChange}),{default:t.withCtx(()=>[t.renderSlot(e.$slots,"default")]),_:3},16,["useWrapper","footerOffset","fullScreen","loading","loading-tip","minHeight","height","visible","modalFooterHeight","onExtHeight","onHeightChange"])]),_:2},[e.$slots.closeIcon?void 0:{name:"closeIcon",fn:t.withCtx(()=>[t.createVNode(a,{canFullscreen:e.getProps.canFullscreen,fullScreen:e.fullScreenRef,onCancel:e.handleCancel,onFullscreen:e.handleFullScreen},null,8,["canFullscreen","fullScreen","onCancel","onFullscreen"])]),key:"0"},e.$slots.title?void 0:{name:"title",fn:t.withCtx(()=>[t.createVNode(s,{helpMessage:e.getProps.helpMessage,title:e.getMergeProps.title,onDblclick:e.handleTitleDbClick},null,8,["helpMessage","title","onDblclick"])]),key:"1"},e.$slots.footer?void 0:{name:"footer",fn:t.withCtx(()=>[t.createVNode(c,t.mergeProps(e.getBindValue,{onOk:e.handleOk,onCancel:e.handleCancel}),t.createSlots({_:2},[t.renderList(Object.keys(e.$slots),m=>({name:m,fn:t.withCtx(g=>[t.renderSlot(e.$slots,m,t.normalizeProps(t.guardReactiveProps(g||{})))])}))]),1040,["onOk","onCancel"])]),key:"2"},t.renderList(Object.keys(e.omit(e.$slots,"default")),m=>({name:m,fn:t.withCtx(g=>[t.renderSlot(e.$slots,m,t.normalizeProps(t.guardReactiveProps(g||{})))])}))]),1040,["onCancel"])}const ae=E(Qn,[["render",$n]]),Uo="";t.reactive({}),t.reactive({}),ae.install=function(e,n){e.component(n||ae.name,ae)};const Fn=e=>{const n=e==null?void 0:e.split(".").pop().toLowerCase();return["doc","docx"].includes(n)?"application/msword":["docx"].includes(n)?"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["xls"].includes(n)?"application/vnd.ms-excel":["xlsx"].includes(n)?"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["ppt"].includes(n)?"application/vnd.ms-powerpoint":["pptx"].includes(n)?"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pdf"].includes(n)?"application/pdf":["png","jpg","jpeg","gif","bmp","svg","webp"].includes(n)?`image/${n}`:["zip"].includes(n)?"application/zip":""},Un={class:"content"},Rn={class:"subject"},Hn={class:"sender"},Wn={style:{width:"50px"}},Zn={class:"person"},vn={class:"sender-t"},Vn=t.createElementVNode("b",null,"发件人: ",-1),Gn=["title"],Xn=t.createElementVNode("b",null,"收件人: ",-1),Jn=["title"],qn={class:"body"},Kn=["innerHTML"],eo={key:0,class:"file"},to=t.createElementVNode("h1",null,"附件",-1),no=["href","download"],oo={name:"GMsgUrlReader"},v=t.defineComponent({...oo,props:{url:{type:String,default:""},fileName:{type:String,default:""},msgApi:{type:Function,default:()=>{},required:!1}},setup(e){const n=e,i=t.ref(!1),r=t.ref({});t.ref(n.url).value?a():console.error("msg url or msg api is empty");const l=s=>{const c=s.body,u=/<(https?:\/\/[^>]+)>/g;return c.replace(u,(m,g)=>`<a href="${g}" target="_blank">${g}</a>`).replace(/\r\n/g,"<br/>")};async function a(){try{const s=n==null?void 0:n.fileName,c=n==null?void 0:n.url,M=await(n==null?void 0:n.msgApi)({fileName:s,fileUrl:c}),m=M==null?void 0:M.data,g=new Blob([new Uint8Array(m)],{type:"application/octet-stream"}),y=new FileReader;y.onload=L=>{var j;try{const f=(j=L==null?void 0:L.target)==null?void 0:j.result;let I;typeof ue=="function"?I=new ue(f):I=new ue.default(f);const N=I.getFileData();console.log("Parsed MSG Data:",N);const D=((N==null?void 0:N.attachments)||[]).map((w,_)=>{const Y=I==null?void 0:I.getAttachment(_),p=Fn(w.fileName),O=new Blob([new Uint8Array(Y.content)],{type:p||"application/octet-stream"});return{...w,url:URL.createObjectURL(O)}});r.value={subject:N.subject,senderEmail:N.senderEmail,senderName:N.senderName,recipients:N==null?void 0:N.recipients,body:l(N),attachments:D},i.value=!0}catch(f){console.error("文件解析失败:",f)}},y.readAsArrayBuffer(g)}catch(s){console.error("解析 .msg 文件失败:",s)}}return(s,c)=>(t.openBlock(),t.createBlock(t.unref(ae),{width:"800px",minHeight:"300",wrapClassName:"g-msgFile-model-wrapper",showOkBtn:!1,maskClosable:!1,visible:i.value,"onUpdate:visible":c[1]||(c[1]=u=>i.value=u),onCancel:c[2]||(c[2]=u=>i.value=!1)},{title:t.withCtx(()=>[t.createVNode(t.unref(x.MailOutlined))]),footer:t.withCtx(()=>[t.createVNode(t.unref(h.Button),{onClick:c[0]||(c[0]=u=>i.value=!1)},{default:t.withCtx(()=>[t.createTextVNode("cancle")]),_:1})]),default:t.withCtx(()=>{var u,M,m,g,y,L,j;return[t.createElementVNode("div",Un,[t.createElementVNode("h1",Rn,t.toDisplayString((u=r.value)==null?void 0:u.subject),1),t.createElementVNode("div",Hn,[t.createElementVNode("div",Wn,[t.createVNode(t.unref(h.Avatar),{style:{"background-color":"#0084f4",opacity:"0.8"}},{default:t.withCtx(()=>{var f,I;return[t.createTextVNode(t.toDisplayString((I=(f=r.value)==null?void 0:f.senderName)==null?void 0:I.slice(0,1)),1)]}),_:1})]),t.createElementVNode("div",Zn,[t.createElementVNode("div",vn,[Vn,t.createElementVNode("span",{title:(M=r.value)==null?void 0:M.senderEmail},t.toDisplayString((m=r.value)==null?void 0:m.senderName),9,Gn)]),t.createElementVNode("div",null,[Xn,(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList((g=r.value)==null?void 0:g.recipients,(f,I)=>(t.openBlock(),t.createElementBlock("span",{key:I},[t.createElementVNode("span",{style:{"margin-right":"3px"},title:f==null?void 0:f.email},t.toDisplayString(f==null?void 0:f.name)+";",9,Jn)]))),128))])])]),t.createElementVNode("div",qn,[t.createElementVNode("p",{innerHTML:(y=r.value)==null?void 0:y.body},null,8,Kn)]),(j=(L=r.value)==null?void 0:L.attachments)!=null&&j.length?(t.openBlock(),t.createElementBlock("div",eo,[to,t.createElementVNode("ul",null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(r.value.attachments,(f,I)=>(t.openBlock(),t.createElementBlock("li",{key:I},[t.createElementVNode("a",{href:f==null?void 0:f.url,download:f==null?void 0:f.fileName},t.toDisplayString(f==null?void 0:f.fileName),9,no)]))),128))])])):t.createCommentVNode("",!0)])]}),_:1},8,["visible"]))}}),Ro="",ro="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/PjwhRE9DVFlQRSBzdmcgUFVCTElDICItLy9XM0MvL0RURCBTVkcgMS4xLy9FTiIgImh0dHA6Ly93d3cudzMub3JnL0dyYXBoaWNzL1NWRy8xLjEvRFREL3N2ZzExLmR0ZCI+PHN2ZyB0PSIxNTk1MzA3MTU0MjM5IiBjb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02Ny43LTYuOC0xNy43LTE5LjktMjYuNi0zOS40LTI2LjYtMTcuOSAwLTMxIDguNC0zOS4zIDI1LjItOC4zIDE2LjgtMTIuNCA0MS42LTEyLjQgNzQuMyAwIDI0LjYgMi42IDQ0LjQgNy45IDU5LjQgOC4xIDIyLjggMjIgMzQuMyA0MS42IDM0LjMgMTUuNyAwIDI4LjMtNyAzNy43LTIwLjl6TTgwMy4zIDM4Ny4yYzExLjIgMTEuMyAxNi44IDI1IDE2LjggNDEuMiAwIDE2LjctNS44IDMwLjctMTcuNSA0MS44Qzc5MSA0ODEuNCA3NzcuNCA0ODcgNzYyIDQ4N2MtMTcuMSAwLTMxLjItNS44LTQyLjEtMTcuNC0xMC45LTExLjYtMTYuNC0yNS4xLTE2LjQtNDAuNiAwLTE2LjUgNS44LTMwLjQgMTcuMy00MS43IDExLjUtMTEuMyAyNS4zLTE3IDQxLjItMTcgMTYuMyAwIDMwLjEgNS43IDQxLjMgMTYuOXpNNzM5LjUgNDUxYzYuMiA2LjIgMTMuNyA5LjMgMjIuNSA5LjMgOC40IDAgMTUuOC0zLjEgMjIuMS05LjMgNi4zLTYuMiA5LjQtMTMuNyA5LjQtMjIuNiAwLTguNS0zLjEtMTUuOS05LjMtMjIuMS02LjItNi4yLTEzLjYtOS4zLTIyLjItOS4zcy0xNi4xIDMuMS0yMi40IDkuM2MtNi4zIDYuMi05LjQgMTMuNy05LjQgMjIuNi0wLjEgOC40IDMgMTUuOCA5LjMgMjIuMXoiIHAtaWQ9IjEzNTQiIGZpbGw9IiNmZmZmZmYiPjwvcGF0aD48L3N2Zz4K";var F;(function(e){e[e.LOADING=0]="LOADING",e[e.DONE=1]="DONE",e[e.FAIL=2]="FAIL"})(F||(F={}));const co={show:{type:Boolean,default:!1},imageList:{type:[Array],default:null},index:{type:Number,default:0},scaleStep:{type:Number},defaultWidth:{type:Number},maskClosable:{type:Boolean},rememberState:{type:Boolean}},z="img-preview",uo=t.defineComponent({name:"ImagePreview",props:co,emits:["img-load","img-error"],setup(e,{expose:n,emit:i}){const r=new Map,o=t.reactive({currentUrl:"",imgScale:1,imgRotate:0,imgTop:0,imgLeft:0,status:F.LOADING,currentIndex:0,moveX:0,moveY:0,show:e.show}),l=t.ref(null),a=t.ref(null);function s(){u();const{index:d,imageList:T}=e;if(!T||!T.length)throw new Error("imageList is undefined");o.currentIndex=d,j(T[d])}function c(){o.imgScale=1,o.imgRotate=0,o.imgTop=0,o.imgLeft=0}function u(){const d=t.unref(l);d&&(d.onmousewheel=m,document.body.addEventListener("DOMMouseScroll",m),document.ondragstart=function(){return!1})}const M=t.computed(()=>{const d=(e==null?void 0:e.scaleStep)??0;return d??0>0?d/100:o.imgScale/10});function m(d){d=d||window.event,d.delta=d.wheelDelta||-d.detail,d.preventDefault(),d.delta>0&&g(M.value),d.delta<0&&g(-M.value)}function g(d){o.imgScale<=.2&&d<0||(o.imgScale+=d)}function y(d){o.imgRotate+=d}function L(){const d=t.unref(a);d&&(d.onmousemove=null)}function j(d){o.status=F.LOADING;const T=new Image;T.src=d,T.onload=b=>{if(o.currentUrl!==d){const B=b.composedPath();if(e.rememberState){r.set(o.currentUrl,{scale:o.imgScale,top:o.imgTop,left:o.imgLeft,rotate:o.imgRotate});const ee=r.get(d);ee?(o.imgScale=ee.scale,o.imgTop=ee.top,o.imgRotate=ee.rotate,o.imgLeft=ee.left):(c(),e.defaultWidth&&(o.imgScale=e.defaultWidth/B[0].naturalWidth))}else e.defaultWidth&&(o.imgScale=e.defaultWidth/B[0].naturalWidth);B&&i("img-load",{index:o.currentIndex,dom:B[0],url:d})}o.currentUrl=d,o.status=F.DONE},T.onerror=b=>{const B=b.composedPath();B&&i("img-error",{index:o.currentIndex,dom:B[0],url:d}),o.status=F.FAIL}}function f(d){d&&d.stopPropagation(),I()}function I(){o.show=!1,document.body.removeEventListener("DOMMouseScroll",m),document.ondragstart=null}function N(){c()}n({resume:N,close:I,prev:D.bind(null,"left"),next:D.bind(null,"right"),setScale:d=>{d>0&&d<=10&&(o.imgScale=d)},setRotate:d=>{o.imgRotate=d}});function D(d){const{currentIndex:T}=o,{imageList:b}=e;d==="left"&&(o.currentIndex--,T<=0&&(o.currentIndex=b.length-1)),d==="right"&&(o.currentIndex++,T>=b.length-1&&(o.currentIndex=0)),j(b[o.currentIndex])}function w(d){d=d||window.event,o.moveX=d.clientX,o.moveY=d.clientY;const T=t.unref(a);T&&(T.onmousemove=_)}function _(d){d=d||window.event,d.preventDefault();const T=d.clientX-o.moveX,b=d.clientY-o.moveY;o.imgLeft+=T,o.imgTop+=b,o.moveX=d.clientX,o.moveY=d.clientY}const Y=t.computed(()=>{const{imgScale:d,imgRotate:T,imgTop:b,imgLeft:B}=o;return{transform:`scale(${d}) rotate(${T}deg)`,marginTop:`${b}px`,marginLeft:`${B}px`,maxWidth:e.defaultWidth?"unset":"100%"}}),p=t.computed(()=>{const{imageList:d}=e;return d.length>1});t.watchEffect(()=>{e.show&&s(),e.imageList&&c()});const O=d=>{e.maskClosable&&d.target&&d.target.classList.contains(`${z}-content`)&&f(d)},ce=()=>t.createVNode("div",{class:`${z}__close`,onClick:f},[t.createVNode(x.CloseOutlined,{class:`${z}__close-icon`},null)]),ye=()=>{if(!t.unref(p))return null;const{currentIndex:d}=o,{imageList:T}=e;return t.createVNode("div",{class:`${z}__index`},[d+1,t.createTextVNode(" / "),T.length])},ho=()=>t.createVNode("div",{class:`${z}__controller`},[t.createVNode("div",{class:`${z}__controller-item`,onClick:()=>g(-M.value)},[t.createVNode("img",{src:ao},null)]),t.createVNode("div",{class:`${z}__controller-item`,onClick:()=>g(M.value)},[t.createVNode("img",{src:lo},null)]),t.createVNode("div",{class:`${z}__controller-item`,onClick:N},[t.createVNode("img",{src:ro},null)]),t.createVNode("div",{class:`${z}__controller-item`,onClick:()=>y(-90)},[t.createVNode("img",{src:so},null)]),t.createVNode("div",{class:`${z}__controller-item`,onClick:()=>y(90)},[t.createVNode("img",{src:io},null)])]),et=d=>t.unref(p)?t.createVNode("div",{class:[`${z}__arrow`,d],onClick:()=>D(d)},[d==="left"?t.createVNode(x.LeftOutlined,null,null):t.createVNode(x.RightOutlined,null,null)]):null;return()=>o.show&&t.createVNode("div",{class:z,ref:l,onMouseup:L,onClick:O},[t.createVNode("div",{class:`${z}-content`},[t.createVNode("img",{style:t.unref(Y),class:[`${z}-image`,o.status===F.DONE?"":"hidden"],ref:a,src:o.currentUrl,onMousedown:w},null),ce(),ye(),ho(),et("left"),et("right")])])}}),Ho="";function Xe(e){return e==="warning"?t.createVNode(x.InfoCircleFilled,{class:"modal-icon-warning"},null):e==="success"?t.createVNode(x.CheckCircleFilled,{class:"modal-icon-success"},null):e==="info"?t.createVNode(x.InfoCircleFilled,{class:"modal-icon-info"},null):t.createVNode(x.CloseCircleFilled,{class:"modal-icon-error"},null)}function Je({content:e}){return Z(e)?t.createVNode("div",{innerHTML:`<div>${e}</div>`},null):e}function go(e){const n=e.iconType||"warning";Reflect.deleteProperty(e,"iconType");const i={centered:!0,icon:Xe(n),...e,content:Je(e)};return h.Modal.confirm(i)}const Mo=()=>({okText:q()("common.okText"),centered:!0});function se(e,n){return{...Mo(),...e,content:Je(e),icon:Xe(n)}}function fo(e){return h.Modal.success(se(e,"success"))}function po(e){return h.Modal.error(se(e,"close"))}function mo(e){return h.Modal.info(se(e,"info"))}function yo(e){return h.Modal.warning(se(e,"warning"))}h.notification.config({placement:"topRight",duration:3});function No(){return{createMessage:h.message,notification:h.notification,createConfirm:go,createSuccessModal:fo,createErrorModal:po,createInfoModal:mo,createWarningModal:yo}}const{createMessage:Lo}=No(),Io=q();let V=null;function qe(e){var r;if(!Ee)return;const n={},i=document.createElement("div");return Object.assign(n,{show:!0,index:0,scaleStep:10},e),V=t.createVNode(uo,n),t.render(V,i),document.body.appendChild(i),(r=V.component)==null?void 0:r.exposed}function Ke(e){var r;if(!Ee)return;const n={},i=document.createElement("div");return Object.assign(n,e),V=t.createVNode(v,n),t.render(V,i),document.body.appendChild(i),(r=V.component)==null?void 0:r.exposed}function jo(e){const{getPreviewSrc:n,getIsSupportPreview:i,getIsImageFile:r,getIsMsgFile:o}=He(t.toRefs(e)),l=i.value,a=r.value,s=o.value,c=n.value;if(!l){Lo.warning(Io("previewFile.notSupport"));return}if(s){Ke({...e});return}a?qe({imageList:[c]}):window.open(c)}J.install=function(e,n){e.component(J.name||n,J)},K.install=function(e,n){e.component(K.name||n,K)},v.install=function(e,n){e.component(v.name||n,v)};const To={title:"PreviewFile 文件预览",parts:"UI组件",category:"高级组件",status:"100%",install(e){e.component(J.name,J),e.component(K.name,K),e.component(v.name,v)}};S.createDocPreview=jo,S.createImgPreview=qe,S.createMsgUrlReader=Ke,S.default=To,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
