@10yun/cv-pc-ui 0.3.64 → 0.3.65

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/cv-ui.cjs CHANGED
@@ -1,10 +1,4 @@
1
- var ka=Object.create;var fo=Object.defineProperty;var ba=Object.getOwnPropertyDescriptor;var ya=Object.getOwnPropertyNames;var wa=Object.getPrototypeOf,_a=Object.prototype.hasOwnProperty;var Va=(e,o,a,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of ya(o))!_a.call(e,n)&&n!==a&&fo(e,n,{get:()=>o[n],enumerable:!(r=ba(o,n))||r.enumerable});return e};var Kt=(e,o,a)=>(a=e!=null?ka(wa(e)):{},Va(o||!e||!e.__esModule?fo(a,"default",{value:e,enumerable:!0}):a,e));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var Sa=Object.create,Ao=Object.defineProperty,Ba=Object.getOwnPropertyDescriptor,Na=Object.getOwnPropertyNames,Ea=Object.getPrototypeOf,$a=Object.prototype.hasOwnProperty,xa=(e,o,a,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(var n=Na(o),l=0,i=n.length,c;l<i;l++)c=n[l],!$a.call(e,c)&&c!==a&&Ao(e,c,{get:(d=>o[d]).bind(null,c),enumerable:!(r=Ba(o,c))||r.enumerable});return e},Da=(e,o,a)=>(a=e!=null?Sa(Ea(e)):{},xa(o||!e||!e.__esModule?Ao(a,"default",{value:e,enumerable:!0}):a,e));let k=require("element-plus"),t=require("vue"),Ta=require("codemirror"),U=require("@codemirror/state"),z=require("@codemirror/view"),Ia=require("@codemirror/commands"),P=require("@codemirror/language"),s=require("@lezer/highlight"),vo=require("@codemirror/lang-javascript"),La=require("@codemirror/lang-html"),Fa=require("@codemirror/lang-json"),Pa=require("@codemirror/lang-markdown"),Oa=require("@codemirror/lang-vue"),Ma=require("@codemirror/lang-php"),za=require("@codemirror/lang-java"),Co=require("@codemirror/lang-sql"),Aa=require("@codemirror/lang-python"),Ha=require("@codemirror/lang-xml"),ja=require("@codemirror/lang-go"),Ra=require("@codemirror/lang-css"),ao=require("html-to-md");ao=Da(ao);var f=(e,o)=>{const a=e.__vccOpts||e;for(const[r,n]of o)a[r]=n;return a},Ua={name:"cvBadge",extends:{ExtendBadge:k.ElBadge},props:{...k.ElBadge.props},created(){},computed:{isShow(){return this.value?!(this.value>0):!0}},data(){return{}}};function Wa(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-badge");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{hidden:l.isShow}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16,["hidden"])}var ie=f(Ua,[["render",Wa]]);ie.install=function(e){e.component(ie.name,ie)};var Ya={name:"cvRow",props:{gutter:{type:[Number,String],default:0},type:{type:[String],default:""},justify:{type:[String],default:"start"},align:{type:[String],default:"top"},tag:{type:[String],default:"div"}},data(){return{}},methods:{}};function qa(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-row");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({class:"cv-row"},{type:a.type,justify:a.justify,align:a.align,tag:a.tag},{gutter:parseInt(a.gutter)}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16,["gutter"])}var se=f(Ya,[["render",qa]]),Xa={name:"cvCol",props:{span:{type:[Number,String],default:24},offset:{type:[Number,String],default:0}},data(){return{}},methods:{}};function Ka(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-col");return(0,t.openBlock)(),(0,t.createBlock)(i,{class:"cv-col",span:parseInt(a.span),offset:parseInt(a.offset)},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},8,["span","offset"])}var ce=f(Xa,[["render",Ka]]);se.install=function(e){e.component(se.name,se)};ce.install=function(e){e.component(ce.name,ce)};var Ga={name:"cvBtnBase",emits:["click"],props:{...k.ElButton.props,autoLoading:{type:Boolean,default:!1},svg:{type:[String],default:""}},data(){return{loadingStatus:!1}},computed:{filteredProps(){const{autoLoading:e,...o}=this.$props;return o},hasDefaultContent(){const e=this.$slots.default?.();return e&&e.length>0}},methods:{handleClick(e){this.autoLoading&&(this.loadingStatus=!0);try{this.$emit("click",()=>{this.loadingStatus=!1})}catch(o){throw this.loadingStatus=!1,o}}}};function Za(e,o,a,r,n,l){const i=(0,t.resolveComponent)("cv-mask-svg"),c=(0,t.resolveComponent)("el-button");return e.$slots.default||l.hasDefaultContent?((0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({key:0,class:"cv-btn"},l.filteredProps,{loading:n.loadingStatus,onClick:l.handleClick}),(0,t.createSlots)({default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:2},[a.svg?{name:"icon",fn:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{name:a.svg,size:"14",color:"currentColor"},null,8,["name"])]),key:"0"}:void 0]),1040,["loading","onClick"])):((0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({key:1,class:"cv-btn"},l.filteredProps,{loading:n.loadingStatus,onClick:l.handleClick}),(0,t.createSlots)({_:2},[a.svg?{name:"icon",fn:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{name:a.svg,size:"14",color:"currentColor"},null,8,["name"])]),key:"0"}:void 0]),1040,["loading","onClick"]))}var de=f(Ga,[["render",Za]]),Qa={name:"cvBtnText",emits:["click"],props:{...k.ElButton.props,autoLoading:{type:Boolean,default:!1},svg:{type:[String],default:""}},data(){return{loadingStatus:!1}},methods:{handleClick(){this.autoLoading&&(this.loadingStatus=!0),this.$emit("click",()=>{this.loadingStatus=!1})}}};function Ja(e,o,a,r,n,l){const i=(0,t.resolveComponent)("cv-mask-svg"),c=(0,t.resolveComponent)("el-button");return(0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({class:"cv-btn"},e.$props,{link:"",loading:n.loadingStatus,onClick:l.handleClick}),(0,t.createSlots)({default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:2},[a.svg?{name:"icon",fn:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{name:a.svg,size:"14",color:"currentColor"},null,8,["name"])]),key:"0"}:void 0]),1040,["loading","onClick"])}var ue=f(Qa,[["render",Ja]]);de.install=function(e){e.component(de.name,de)};ue.install=function(e){e.component(ue.name,ue)};var en={name:"cvAutocompleteBase",props:{...k.ElAutocomplete.props},data(){return{localVal:"",loadingStatus:!1}},created(){},methods:{async querySearchAsync(e,o){}}};function tn(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-autocomplete");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>n.localVal=c)},e.$props,{"fetch-suggestions":l.querySearchAsync}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16,["modelValue","fetch-suggestions"])}var pe=f(en,[["render",tn]]),Wt={props:{compConfig:{},dataParse:{type:[Function],default:()=>null}},data(){return{searchData:{},loadDataLoading:!1,loadDataList:[],loadDataTotal:0,loadPageCurr:1,loadPageLimit:10,loadConfigSetting:{},loadConfigDef:{pageCurr:1,pageLimit:10,isSkip:!1,url:null,apiFunc:null,mockData:null,where:{},response:{statusName:"status",statusCode:200,msgName:"msg",countName:"total",dataName:"data"},request:{pageName:"page",limitName:"pagesize"}}}},methods:{loadEnding(){this.loadDataLoading=!1,this.$nextTick(()=>{this.loadDataLoading=!1})},loadGetData(){if(this.loadDataLoading=!0,this.loadConfigSetting.apiFunc&&typeof this.loadConfigSetting.apiFunc=="function"){const e=this.loadConfigSetting;let o={...e.where};o[e.request.pageName]=this.loadPageCurr,o[e.request.limitName]=this.loadPageLimit,o=Object.assign(o,this.searchData),this.loadConfigSetting.apiFunc(o).then(a=>{this.loadPageCurr=o[e.request.pageName],this.loadEnding();let r=this.sortOutData(a);if(r.status!=e.response.statusCode){ExtendMessage({message:r.msg,type:"error",duration:1300});return}if(r.data.length===0){ExtendMessage({message:"没有更多数据了",type:"warning",duration:1300});return}let n=r[e.response.dataName]||[];this.dataParse&&typeof this.dataParse=="function"&&(n=this.dataParse.call(null,n)),this.loadDataList.push(...n),this.loadDataTotal=r[e.response.countName]||0}).catch(a=>{this.loadEnding()})}else this.loadDataList.length>0&&(this.loadDataTotal=this.loadDataList.length),this.loadEnding()},sortOutData(e){let o=this.loadConfigSetting.response,a={},r=[],n=[];a.status=e[o.statusName],a.msg=e[o.msgName],a.total=e[o.countName],r=e[o.dataName];for(let l in r)n[l]=r[l];return a.data=n,a}}},on={name:"cvAutocompleteLoad",mixins:[Wt],emits:["update:modelValue","input"],props:{...k.ElAutocomplete.props,modelValue:{type:[String,Object,Number],default:()=>({})},placeholder:{type:[String],default:"请输入内容"},popperClass:{type:[String],default:"cv-autocomplete-load"},clearable:{type:[Boolean],default:!0},triggerOnFocus:!1,debounce:500,refID:{type:[String],required:!1,default(){return"cvAutocompleteLoad-"+ +new Date+((Math.random()/1e4).toFixed(0)+"")}},compConfig:{type:[Object],default:()=>({})}},data(){return{localVal:"",searchList:[],compConfigDef:{searchField:["value"]},timeout:null,loadingMore:!1}},directives:{loadmore:{mounted(e,o){const r=((l,i)=>{let c=null;return function(...d){c&&clearTimeout(c),c=setTimeout(()=>{l.apply(this,d)},i)}})(l=>{const{scrollTop:i,scrollHeight:c,clientHeight:d}=l.target;c-(i+d)<10&&!o.instance.loading&&o.value()},200),n=new MutationObserver(()=>{const l=e.querySelector(".el-autocomplete-suggestion__wrap");l&&!e.__scrollHandler__&&(l.addEventListener("scroll",r),e.__scrollHandler__=r,n.disconnect())});n.observe(e,{childList:!0,subtree:!0})},beforeUnmount(e){if(e.__scrollHandler__){const o=e.querySelector(".el-autocomplete-suggestion__wrap");o&&o.removeEventListener("scroll",e.__scrollHandler__),delete e.__scrollHandler__}}}},created(){this.initConfAll(),this.getData()},methods:{initConfAll(){let e={};Object.assign(e,this.loadConfigDef,this.compConfigDef,this.compConfig),this.loadPageCurr=e.pageCurr||1,this.loadPageLimit=e.pageLimit||10,Object.assign(e.where,this.searchData),this.loadConfigSetting=e},getMoreData(){if(!(this.loadingMore||this.loadDataList.length>=this.loadDataTotal))try{this.loadingMore=!0,this.loadPageCurr++,this.loadGetData()}finally{this.loadingMore=!1}},getData(){this.loadPageCurr=1,this.loadDataList=[],this.loadGetData()},async querySearchAsync(e,o){this.loadPageCurr=1,this.loadDataLoading=!0;var a=this.loadDataList||[];let r=[];const n=this.loadConfigSetting.searchField||["value"];if(e=e.toLowerCase(),r=e?a.filter(this.createFilter(e,n)):a,r.length>0)o(r.map(l=>({...l,is_last_tip:!1}))),this.lookFlag=!0;else try{this.loadDataList.length<this.loadDataTotal&&this.loadPageCurr++,this.searchData.keyword=e,this.loadDataList=[],await this.loadGetData();const l=this.loadDataList.map(i=>({...i,is_last_tip:!1}));l.push({is_last_tip:!0}),o(l)}catch{}finally{this.lookFlag=!0}},createFilter(e,o){return a=>o.some(r=>(a[r]+"").toLowerCase().indexOf(e)!==-1)},handleChange(e){},handleSelect(e){this.$emit("update:modelValue",e)}}};function an(e,o,a,r,n,l){const i=(0,t.resolveComponent)("cv-icons"),c=(0,t.resolveComponent)("el-autocomplete"),d=(0,t.resolveDirective)("loadmore");return(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createVNode)(c,(0,t.mergeProps)(e.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[1]||(o[1]=u=>n.localVal=u),"fetch-suggestions":l.querySearchAsync,onChange:l.handleChange,onSelect:l.handleSelect,teleported:!1,"popper-append-to-body":!1}),{load:(0,t.withCtx)(()=>[...o[2]||(o[2]=[])]),default:(0,t.withCtx)(({item:u})=>[u.is_last_tip?(0,t.createCommentVNode)("",!0):(0,t.renderSlot)(e.$slots,"default",(0,t.normalizeProps)((0,t.mergeProps)({key:0},{item:u}))),u.is_last_tip?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"cv-autocomolete-nodata",onClick:o[0]||(o[0]=(0,t.withModifiers)((...m)=>l.getData&&l.getData(...m),["stop"])),disabled:""},[o[3]||(o[3]=(0,t.createTextVNode)(" 没有更多数据了 ",-1)),(0,t.createVNode)(i,{type:"ElIconRefreshLeft"}),o[4]||(o[4]=(0,t.createTextVNode)(" 刷新按钮 ",-1))])):(0,t.createCommentVNode)("",!0)]),_:3},16,["modelValue","fetch-suggestions","onChange","onSelect"])])),[[d,l.getMoreData]])}var me=f(on,[["render",an]]);pe.install=function(e){e.component(pe.name,pe)};me.install=function(e){e.component(me.name,me)};var nn={...k.ElForm,name:"cvFormBase",extends:k.ElForm,provide(){return{elForm:this}},props:{...k.ElForm.props,labelWidth:{type:[String,Number],default:"auto"},labelPosition:{type:String,default:"right"}},watch:{model(){}},data(){return{}}};function ln(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-form");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({class:"cv-form-base"},{...e.$props,...e.$attrs},(0,t.toHandlers)(e.$attrs)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var he=f(nn,[["render",ln]]),rn={name:"cvFormInline",provide(){return{elForm:this}},props:{...k.ElForm.props},watch:{},data(){return{form:{}}}};function sn(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-form");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({class:"cv-form-base"},e.$props,(0,t.toHandlers)(e.$attrs),{inline:!0}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var ge=f(rn,[["render",sn]]),cn={name:"cvFormItem",extends:k.ElFormItem,props:{...k.ElFormItem.props},data(){return{localLabelWidth:"",localError:""}},created(){},methods:{}},dn={key:0,class:"cv-form-item__tip"};function un(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-form-item");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.normalizeProps)((0,t.guardReactiveProps)({...e.$props,...e.$attrs})),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default"),e.$slots.tip?((0,t.openBlock)(),(0,t.createElementBlock)("div",dn,[(0,t.renderSlot)(e.$slots,"tip")])):(0,t.createCommentVNode)("",!0)]),_:3},16)}var fe=f(cn,[["render",un]]);he.install=function(e){e.component(he.name,he)};ge.install=function(e){e.component(ge.name,ge)};fe.install=function(e){e.component(fe.name,fe)};var W={extends:k.ElInput,emits:["update:modelValue","change"],props:{...k.ElInput.props,modelValue:{type:[Number,String],default:""},placeholder:{type:[Number,String],default:""},disabled:{type:Boolean,default:!1}},watch:{modelValue(e){this.localVal=e},localVal(){this.handleChange(),this.handleInput()}},data(){return{localVal:this.modelValue,localRules:[]}},created(){},methods:{handleChange(){this.$emit("change",this.localVal)},handleInput(){this.$emit("update:modelValue",this.localVal)},handleBlur(){this._isCheckValue()},_showError(e){this.localError=e||"请输入正确的"+this.label},_diyValidate(){},_isCheckValue(){const e=this?.rules.split("|");this.localError="";for(let o in e){let a=e[o].split(":"),r=a[0]||"",n=a[1]||"";switch(r){case"require":if(this.localVal==""){this._showError(this.label+"不能为空");return}break;case"max":if(this.localVal.length>n){this._showError(this.label+"最大长度不超过"+n);return}break;case"min":if(this.localVal.length<n){this._showError(this.label+"最小长度不小于"+n);return}break;default:this._diyValidate(r);break}}}}},pn={name:"cvInputText",mixins:[W],props:{},data(){return{}},methods:{}};function mn(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({type:"text"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入",clearable:""}),(0,t.createSlots)({_:2},[e.$slots.prepend?{name:"prepend",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.prepend?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var hn=f(pn,[["render",mn]]),gn={name:"cvInputMobile",mixins:[W],components:{},props:{},data(){return{}},methods:{}};function fn(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({type:"number",oninput:"if(value.length>11)value=value.slice(0,11)"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入11位大陆手机号",clearable:""}),(0,t.createSlots)({prepend:(0,t.withCtx)(()=>[o[1]||(o[1]=(0,t.createTextVNode)("+86",-1))]),_:2},[e.$slots.append?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"0"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var ve=f(gn,[["render",fn]]),vn={name:"cvInputEmail",mixins:[W],components:{},props:{},data(){return{}},methods:{}};function Cn(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({type:"text"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入邮箱",clearable:""}),(0,t.createSlots)({_:2},[e.$slots.prepend?{name:"prepend",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var Ce=f(vn,[["render",Cn]]),kn={name:"cvInputPassword",mixins:[W],components:{},props:{showPassword:{type:Boolean,default:!1}},data(){return{}},methods:{}};function bn(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({type:"password"},{disabled:e.disabled,showPassword:a.showPassword},{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入密码",clearable:""}),(0,t.createSlots)({_:2},[e.$slots.prepend?{name:"prepend",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var ke=f(kn,[["render",bn]]),yn={name:"cvInputNumber",mixins:[W],props:{},data(){return{}},methods:{}};function wn(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({class:"cv-number",type:"number"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入整数",clearable:""}),(0,t.createSlots)({_:2},[e.$slots.prepend?{name:"prepend",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var be=f(yn,[["render",wn]]),_n={name:"cvInputIdcard",mixins:[W],components:{},props:{},data(){return{}},methods:{}};function Vn(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({type:"text",oninput:"if(value.length>18)value=value.slice(0,18)"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入身份证",clearable:"",maxlength:"18"}),(0,t.createSlots)({_:2},[e.$slots.prepend?{name:"prepend",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var ye=f(_n,[["render",Vn]]),Sn={name:"cvInputDigit",mixins:[W],components:{},props:{},data(){return{}},methods:{}};function Bn(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({type:"number"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入",clearable:""}),(0,t.createSlots)({_:2},[e.$slots.prepend?{name:"prepend",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var we=f(Sn,[["render",Bn]]),Nn={name:"cvTextarea",mixins:[W],props:{rows:{type:[Number,String],default:3},autosize:{type:[Boolean,Object],default:!1}},data(){return{}},computed:{lastRow(){return parseInt(this.rows)}},created(){},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}};function En(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({type:"textarea"},{disabled:e.disabled,rows:l.lastRow,autosize:a.autosize},{rows:l.lastRow,modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入内容",clearable:""}),null,16,["rows","modelValue","onInput","placeholder"])}var _e=f(Nn,[["render",En]]),$n={name:"cvTextareaBtn",mixins:[W],components:{},props:{rows:{type:[Number,String],default:3},btnText:{type:[Number,String],default:""},btnIcon:{type:[String],default:""},autosize:{type:[Boolean,Object],default:!1}},data(){return{}},computed:{lastRow(){return parseInt(this.rows)}},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},xn={class:"cv-textab-group"},Dn={class:"cv-textab-group__append"},Tn={class:"cv-textab_slot-wrap"};function In(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input"),c=(0,t.resolveComponent)("el-button");return(0,t.openBlock)(),(0,t.createElementBlock)("div",xn,[(0,t.createVNode)(i,(0,t.mergeProps)({type:"textarea"},{disabled:e.disabled,rows:l.lastRow,autosize:a.autosize},{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>e.localVal=d),onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入内容",clearable:""}),null,16,["modelValue","onInput","placeholder"]),(0,t.createElementVNode)("div",Dn,[(0,t.createElementVNode)("div",Tn,[(0,t.renderSlot)(e.$slots,"default",{},()=>[(0,t.createVNode)(c,{class:"cv-textab_slotbtn",type:"primary",size:e.size,onClick:l.onSubmit},{default:(0,t.withCtx)(()=>[a.btnIcon?((0,t.openBlock)(),(0,t.createElementBlock)("i",{key:0,class:(0,t.normalizeClass)(a.btnIcon),style:{"margin-right":"5px"}},null,2)):(0,t.createCommentVNode)("",!0),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(a.btnText),1)]),_:1},8,["size","onClick"])])])])])}var Ve=f($n,[["render",In]]),Ln={name:"cvInputBtn",mixins:[W],emits:["btnClick"],components:{},props:{btnText:{type:[Number,String],default:"确定"},btnIcon:{type:[String],default:""}},data(){return{}},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},Fn={class:"cv-input-group"},Pn={class:"cv-input-group__append"};function On(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input"),c=(0,t.resolveComponent)("el-button");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Fn,[(0,t.createVNode)(i,(0,t.mergeProps)({type:"text"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>e.localVal=d),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入",clearable:""}),null,16,["modelValue","onChange","onInput","placeholder"]),(0,t.createElementVNode)("div",Pn,[(0,t.renderSlot)(e.$slots,"default",{},()=>[(0,t.createVNode)(c,{class:"cv-input-btn__slotbtn",type:"primary",size:e.size,onClick:l.onSubmit},{default:(0,t.withCtx)(()=>[a.btnIcon?((0,t.openBlock)(),(0,t.createElementBlock)("i",{key:0,class:(0,t.normalizeClass)(a.btnIcon),style:{"margin-right":"5px"}},null,2)):(0,t.createCommentVNode)("",!0),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(a.btnText),1)]),_:1},8,["size","onClick"])])])])}var Se=f(Ln,[["render",On]]),Mn={data(){return{formData:{}}}};function zn(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div")}var Gt=f(Mn,[["render",zn]]);ve.install=function(e){e.component(ve.name,ve)};Ce.install=function(e){e.component(Ce.name,Ce)};ke.install=function(e){e.component(ke.name,ke)};be.install=function(e){e.component(be.name,be)};ye.install=function(e){e.component(ye.name,ye)};we.install=function(e){e.component(we.name,we)};_e.install=function(e){e.component(_e.name,_e)};Ve.install=function(e){e.component(Ve.name,Ve)};Se.install=function(e){e.component(Se.name,Se)};Gt.install=function(e){e.component(Gt.name,Gt)};var An={name:"cvInputCounter",extends:k.ElInputNumber,props:{},watch:{modelValue(){this.localVal=this.modelValue}},data(){return{localVal:0}},created(){},methods:{handleChange(e){this.$emit("update:modelValue",this.localVal)}}};function Hn(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input-number");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>n.localVal=c),onChange:l.handleChange,step:e.step}),null,16,["modelValue","onChange","step"])}var Be=f(An,[["render",Hn]]);Be.install=function(e){e.component(Be.name,Be)};var jn={name:"cvShowText",mixins:[],components:{},props:{text:{type:[Number,String,Object],default:""}},data(){return{}},created(){},methods:{}},Rn={class:"cv-show-text"},Un=["innerHTML"];function Wn(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Rn,[a.text?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,innerHTML:a.text},null,8,Un)):(0,t.createCommentVNode)("",!0),a.text?(0,t.createCommentVNode)("",!0):(0,t.renderSlot)(e.$slots,"default",{key:1})])}var Ne=f(jn,[["render",Wn]]),Yn={name:"cvShowImage",mixins:[],components:{},props:{url:{type:[String,Array,Object],default:""},width:{type:[String],default:"100px"},height:{type:[String],default:"100px"}},data(){return{localUrl:""}},watch:{url:{handler(){this.localUrl=typeof this.url=="string"?[this.url]:this.url},immediate:!0,deep:!0}},created(){},methods:{}},qn={class:"cv-show-image"};function Xn(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-image");return(0,t.openBlock)(),(0,t.createElementBlock)("div",qn,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.localUrl,(c,d)=>((0,t.openBlock)(),(0,t.createBlock)(i,{style:(0,t.normalizeStyle)("width:"+a.width+"; height:"+a.height+"; margin-right:10px"),key:d,src:c,"preview-src-list":n.localUrl},null,8,["style","src","preview-src-list"]))),128))])}var Ee=f(Yn,[["render",Xn]]),Kn={name:"cvShowTip",props:{borderColor:{type:[String],default:"#50bfff"},bgColor:{type:[String],default:"#ecf8ff"}},data(){return{backgroundColor:"#ecf8ff",borderLeft:"5px solid #50bfff"}},created(){this.borderLeft=`5px solid ${this.borderColor}`,this.backgroundColor=`${this.bgColor}`},methods:{}};function Gn(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-show-tip",style:(0,t.normalizeStyle)({backgroundColor:this.backgroundColor,borderLeft:this.borderLeft})},[(0,t.renderSlot)(e.$slots,"default")],4)}var $e=f(Kn,[["render",Gn]]),Zn={name:"cv-gallery-dialog",props:{type:String,title:String,sources:Array,sliceSingle:{type:Boolean,default:!1},carouselAttrs:Object},data(){return{isShowCarousel:!1,sourceTitle:"",initialIndex:0,isShowPreview:!1}},methods:{startPreview(e){this.isShowPreview=!0,this.initialIndex=e,this.sourceTitle=this.sources[e].title},handleCarouselChange(e){this.sources[e]&&this.sources[e].title?this.sourceTitle=this.sources[e].title:this.sourceTitle=""}}},Qn=["src"],Jn={key:0,class:"cv-gallery-iframe embed-responsive embed-responsive-16by9"},el=["src"],tl=["src"],ol=["src"];function al(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-carousel-item"),c=(0,t.resolveComponent)("el-carousel"),d=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createBlock)(d,{visible:n.isShowPreview,"append-to-body":"",onOpen:o[0]||(o[0]=u=>n.isShowCarousel=!0),onClosed:o[1]||(o[1]=u=>n.isShowCarousel=!1),style:{"text-align":"center"}},{header:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.sourceTitle||a.title),1)]),default:(0,t.withCtx)(()=>[a.type==="video"?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[n.isShowPreview?((0,t.openBlock)(),(0,t.createElementBlock)("video",{key:0,src:a.sources[n.initialIndex].src,autoplay:"autoplay",class:"cv-gallery-video",controls:"controls",width:"100%"},null,8,Qn)):(0,t.createCommentVNode)("",!0)],64)):a.type==="iframe"?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[n.isShowPreview?((0,t.openBlock)(),(0,t.createElementBlock)("div",Jn,[(0,t.createElementVNode)("iframe",{src:a.sources[n.initialIndex].src,allowfullscreen:"true",border:"0",frameborder:"no",framespacing:"0",scrolling:"no"},null,8,el)])):(0,t.createCommentVNode)("",!0)],64)):a.type==="image"?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:2},[a.sliceSingle&&a.sources[n.initialIndex]||a.sources.length===1?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,src:a.sources[n.initialIndex].src,class:"cv-gallery-image"},null,8,tl)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[n.isShowCarousel?((0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({key:0,"initial-index":n.initialIndex,onChange:l.handleCarouselChange,"indicator-position":"outside"},a.carouselAttrs),{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.sources,(u,m)=>((0,t.openBlock)(),(0,t.createBlock)(i,{key:m},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("img",{src:u.src,class:"cv-gallery-image"},null,8,ol)]),_:2},1024))),128))]),_:1},16,["initial-index","onChange"])):(0,t.createCommentVNode)("",!0)],64))],64)):(0,t.createCommentVNode)("",!0)]),_:1},8,["visible"])}var nl=f(Zn,[["render",al]]),ll={name:"gallery",components:{GalleryDialog:nl},props:{type:{type:String,default:"image",validator(e){return["image","video","iframe"].includes(e)}},size:Number,width:Number,height:Number,lazy:{type:Boolean,default:!1},source:[String,Array,Object],thumbSuffix:{type:String,default:""},thumbStyle:Object,carouselAttrs:Object,title:String,sliceSingle:{type:Boolean,default:!1}},data(){return{}},computed:{computedStyle(){let e=this.width||this.size,o=this.height||this.size;return this.type==="iframe"&&(e=e?e+"px":"360px",o=o?o+"px":"auto"),Object.assign({},{width:e,height:o,display:"block"},this.thumbStyle)},thumbs(){return this.computedSources.map(e=>e.thumb)},computedSources(){const e=this.source;if(typeof e=="string")return[this.getStringSource(e)];if(e instanceof Array){const o=[];return e.forEach(a=>{a instanceof Object?o.push(this.getObjectSource(a)):typeof a=="string"&&o.push(this.getStringSource(a))}),o}else return e instanceof Object?[this.getObjectSource(e)]:[]}},methods:{handlePreview(e){this.$refs.dialog.startPreview(e)},getStringSource(e){let o=e;return this.type==="image"&&this.thumbSuffix&&(o+=this.thumbSuffix),{type:this.type,src:e,thumb:o}},getObjectSource(e){return e.type=e.thumb?"image":this.type,e.thumb=e.thumb||e.src,e}}},rl={key:0,class:"cv-gallery"},il={class:"el-upload-list el-upload-list--picture-card"},sl=["src"],cl={class:"el-upload-list__item-actions"},dl=["onClick"];function ul(e,o,a,r,n,l){const i=(0,t.resolveComponent)("cv-icons"),c=(0,t.resolveComponent)("GalleryDialog");return a.source?((0,t.openBlock)(),(0,t.createElementBlock)("div",rl,[(0,t.createElementVNode)("div",il,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.computedSources,(d,u)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:u,class:"el-upload-list__item"},[(0,t.createElementVNode)("div",{style:(0,t.normalizeStyle)(l.computedStyle),class:"cv-gallery-iframe embed-responsive embed-responsive-16by9"},[(0,t.createElementVNode)("iframe",{src:d.thumb,allowfullscreen:"true",border:"0",frameborder:"no",framespacing:"0",scrolling:"no"},null,8,sl)],4),(0,t.createElementVNode)("span",cl,[(0,t.createElementVNode)("span",{onClick:m=>l.handlePreview(u,d)},[(0,t.createVNode)(i,{type:"ElIconVideoPlay",size:"20"})],8,dl),(0,t.renderSlot)(e.$slots,"action",(0,t.mergeProps)({ref_for:!0},{source:d,index:u}))])]))),128))]),(0,t.createVNode)(c,{carouselAttrs:a.carouselAttrs,sliceSingle:a.sliceSingle,sources:l.computedSources,title:a.title,type:a.type,ref:"dialog"},null,8,["carouselAttrs","sliceSingle","sources","title","type"])])):(0,t.createCommentVNode)("",!0)}var Zt=f(ll,[["render",ul]]);Ne.install=function(e){e.component(Ne.name,Ne)};Ee.install=function(e){e.component(Ee.name,Ee)};$e.install=function(e){e.component($e.name,$e)};Zt.install=function(e){e.component(Zt.name,Zt)};var pl={name:"cvRadioOptBase"};function ml(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-radio");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var xe=f(pl,[["render",ml]]),hl={name:"cvRadioOptBtn"};function gl(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-radio-button");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var De=f(hl,[["render",gl]]),fl={name:"cvRadioGroup"};function vl(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-radio-group");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var Te=f(fl,[["render",vl]]);xe.install=function(e){e.component(xe.name,xe)};De.install=function(e){e.component(De.name,De)};Te.install=function(e){e.component(Te.name,Te)};var Cl={name:"cvCheckboxOptBase",extends:k.ElCheckbox};function kl(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-checkbox");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var Ie=f(Cl,[["render",kl]]),bl={name:"cvCheckboxOptBtn",extends:k.ElCheckboxButton,props:{}};function yl(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-checkbox-button");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var Le=f(bl,[["render",yl]]),wl={props:{...k.ElCheckboxGroup.props,modelValue:{type:[Array],default:()=>[]},dataLists:{type:Array,default:()=>[]},dataField:{type:[Object],default:()=>({})},disabled:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.handleChange()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0}},data(){return{localVal:this.modelValue,localOpt:[]}},created(){this.handleChange(),this._parseLocalOpt()},methods:{handleChange(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let e=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(r=>{e.push({label:r,value:r})}),this.localOpt=e;else{var o=this.dataField&&this.dataField.label||"label",a=this.dataField&&this.dataField.value||"value";this.dataLists.map(r=>{let n=r[o]===0?0:r[o]||"",l=r[a]===0?0:r[a]||"";l=l===0?0:l||n,e.push({label:n,value:l,disabled:r.disabled&&!0||!1}),(r.checked=="true"||r.checked==!0)&&(typeof this.localVal=="string"?this.localVal=l:typeof this.localVal=="object"&&this.localVal.push(l))}),this.localOpt=e}this._parseLocalOptDiy()},_parseLocalOptDiy(){}}},_l={name:"cvCheckboxAll",mixins:[wl],components:{},data(){return{checkAll:!1,isIndeterminate:!0,localOptAll:[]}},methods:{handleCheckAllChange(e){this.localVal=e?this.localOptAll:[],this.isIndeterminate=!1,this.handleChange()},handleCheckedCitiesChange(e){let o=e.length;this.checkAll=o===this.localOptAll.length,this.isIndeterminate=o>0&&o<this.localOptAll.length},_parseLocalOptDiy(){this.localOpt&&this.localOpt.length!==0&&this.localOpt.map(e=>{e.disabled||this.localOptAll.push(e.label)})}}},Vl={class:"cv-checkbox-all"};function Sl(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-checkbox"),c=(0,t.resolveComponent)("el-checkbox-group");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Vl,[(0,t.createVNode)(i,{indeterminate:n.isIndeterminate,modelValue:n.checkAll,"onUpdate:modelValue":o[0]||(o[0]=d=>n.checkAll=d),onChange:l.handleCheckAllChange},{default:(0,t.withCtx)(()=>[...o[2]||(o[2]=[(0,t.createTextVNode)("全选",-1)])]),_:1},8,["indeterminate","modelValue","onChange"]),o[3]||(o[3]=(0,t.createElementVNode)("div",{style:{margin:"15px 0"}},null,-1)),(0,t.createVNode)(c,{modelValue:e.localVal,"onUpdate:modelValue":o[1]||(o[1]=d=>e.localVal=d),onChange:l.handleCheckedCitiesChange},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default",{},()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.localOpt,(d,u)=>((0,t.openBlock)(),(0,t.createBlock)(i,{value:d.value,key:u,onChange:e.handleChange,disabled:e.disabled||d.disabled},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(d.label),1)]),_:2},1032,["value","onChange","disabled"]))),128))])]),_:3},8,["modelValue","onChange"])])}var Fe=f(_l,[["render",Sl]]),Bl={name:"cvCheckboxGroup"};function Nl(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-checkbox-group");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var Pe=f(Bl,[["render",Nl]]);Ie.install=function(e){e.component(Ie.name,Ie)};Le.install=function(e){e.component(Le.name,Le)};Pe.install=function(e){e.component(Pe.name,Pe)};Fe.install=function(e){e.component(Fe.name,Fe)};function El(e,o,a){var r=a||{},n=r.noTrailing,l=n===void 0?!1:n,i=r.noLeading,c=i===void 0?!1:i,d=r.debounceMode,u=d===void 0?void 0:d,m,h=!1,g=0;function v(){m&&clearTimeout(m)}function C(y){var b=(y||{}).upcomingOnly,w=b===void 0?!1:b;v(),h=!w}function p(){for(var y=arguments.length,b=new Array(y),w=0;w<y;w++)b[w]=arguments[w];var _=this,O=Date.now()-g;if(h)return;function A(){g=Date.now(),o.apply(_,b)}function j(){m=void 0}!c&&u&&!m&&A(),v(),u===void 0&&O>e?c?(g=Date.now(),l||(m=setTimeout(u?j:A,e))):A():l!==!0&&(m=setTimeout(u?j:A,u===void 0?e-O:e))}return p.cancel=C,p}function Ho(e,o,a){var r=(a||{}).atBegin;return El(e,o,{debounceMode:(r===void 0?!1:r)!==!1})}function $l(e,o=!1){let a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),a.setAttribute("id",e),o?a.setAttribute("href",e+"?t="+new Date().getTime()):a.setAttribute("href",e),document.getElementById(e)||document.head.appendChild(a)}function Oe(e,o=!1,a=!0){return new Promise((r,n)=>{const l=document.createElement("script");e=e.replace(/([^:]\/)\/+/g,"$1"),l.id=e,l.type="text/javascript",o?l.src=e+"?t="+new Date().getTime():l.src=e,document.getElementById(e)&&a?r():(document.body.appendChild(l),l.onload=()=>{r()})})}function xl(e){const o=e;try{const a=document.createElement("textarea");a.value=o,document.body.appendChild(a),a.select(),document.execCommand("Copy"),a.remove(),document.body.removeChild(a)}catch{navigator.clipboard.writeText(o).then(()=>{}).catch(r=>{})}(0,k.ElMessage)({message:"复制成功",type:"success"})}function Dl(e){if(/^\d{8}T\d{6}Z$/.test(e)){const o=e.replace(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/,"$1-$2-$3T$4:$5:$6Z");return new Date(o)}return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|([+-]\d{2}:\d{2}))?$/.test(e)?new Date(e):/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?new Date(e.replace(" ","T")):new Date(e)}function Tl(e){var o=new Date,a=new Date(e),r=o-a,n=Math.floor(r/1e3),l=Math.floor(n/60),i=Math.floor(l/60);if(l<1)var c=n+"秒前";else if(i<1)var c=l+"分钟前";else if(i<24)var c=i+"小时前";else var c=a.toLocaleString();return c}function q(e,...o){return o.reduce((a,r)=>Object.keys(r).reduce((n,l)=>{const i=r[l];return Ut(i)?n[l]=q(n[l]?n[l]:{},i):Ro(i)?n[l]=i.map((c,d)=>{if(Ut(c)){const u=n[l]?n[l]:[];return q(u[d]?u[d]:{},c)}else return c}):n[l]=i,n},a),e)}function jo(e,o){const{[o[0]]:a,...r}=e;return Object.keys(e).reduce((n,l)=>(o.includes(l)||(n[l]=e[l]),n),{})}function Ut(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ro(e){return typeof Array.isArray=="function"?Array.isArray(e):Object.prototype.toString.call(e)==="[object Array]"}function Z(e){return Ro(e)?e.length===0:Ut(e)?Object.keys(e).length===0:e===""||e===void 0||e===null}function J(e,o){return Z(e)?o:e}function Il(e){let o=["png","jpg","jpeg","gif","webp","svg"],a=e.lastIndexOf("."),r=e.substring(a+1);return o.indexOf(r.toLowerCase())!=-1}function Ll(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")}function X(e){return e==null?"":String(e)}var Fl=/([\:\-\_]+(.))/g,Pl=/^moz([A-Z])/,Ol=Number(document.documentMode),ko=function(e){return e.replace(Fl,function(o,a,r,n){return n?r.toUpperCase():r}).replace(Pl,"Moz$1")};const Dg=(function(){return document.addEventListener?function(e,o,a){e&&o&&a&&e.addEventListener(o,a,!1)}:function(e,o,a){e&&o&&a&&e.attachEvent("on"+o,a)}})(),Tg=(function(){return document.removeEventListener?function(e,o,a){e&&o&&e.removeEventListener(o,a,!1)}:function(e,o,a){e&&o&&e.detachEvent("on"+o,a)}})(),Ig=Ol<9?function(e,o){if(!e||!o)return null;o=ko(o),o==="float"&&(o="styleFloat");try{switch(o){case"opacity":try{return e.filters.item("alpha").opacity/100}catch{return 1}default:return e.style[o]||e.currentStyle?e.currentStyle[o]:null}}catch{return e.style[o]}}:function(e,o){if(!e||!o)return null;o=ko(o),o==="float"&&(o="cssFloat");try{var a=document.defaultView.getComputedStyle(e,"");return e.style[o]||a?a[o]:null}catch{return e.style[o]}};function Ml(e){return window.URL?window.URL.createObjectURL(e):window.webkitURL?window.webkitURL.createObjectURL(e):""}var Uo=(()=>{const e={svg:["image/svg+xml","image/svg"],jpg:["image/jpeg","image/jpg"],jpeg:["image/jpeg"],png:["image/png"],gif:["image/gif"],webp:["image/webp"],bmp:["image/bmp","image/x-bmp","image/x-ms-bmp"],ico:["image/x-icon","image/vnd.microsoft.icon"],tiff:["image/tiff","image/tif","image/x-tiff"],apng:["image/apng"],avif:["image/avif"],heic:["image/heic"],pdf:["application/pdf"],txt:["text/plain"],csv:["text/csv"],json:["application/json"],xml:["application/xml"],doc:["application/msword"],docx:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],xls:["application/vnd.ms-excel"],xlsx:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],ppt:["application/vnd.ms-powerpoint"],pptx:["application/vnd.openxmlformats-officedocument.presentationml.presentation"],zip:["application/zip"],rar:["application/x-rar-compressed"],"7z":["application/x-7z-compressed"],mp3:["audio/mpeg"],mp4:["video/mp4"],mov:["video/quicktime"],avi:["video/x-msvideo"],wav:["audio/wav"]},o={},a={};for(const[r,n]of Object.entries(e)){o[r]=n[0];for(const l of n)a[l]=r}return{extensionToMime:o,mimeToExtension:a}})();function zl(e){if(!e)return"jpg";const o=e.toLowerCase().trim();return Uo.mimeToExtension[o]||"jpg"}function Al(e){if(!e)return"";const o=e.replace(/^\./,"").toLowerCase();return Uo.extensionToMime[o]||""}function Hl(){const e=new Date;return[e.getFullYear(),String(e.getMonth()+1).padStart(2,"0"),String(e.getDate()).padStart(2,"0"),String(e.getHours()).padStart(2,"0"),String(e.getMinutes()).padStart(2,"0"),String(e.getSeconds()).padStart(2,"0")].join("")+Math.random().toString(36).substring(2,10)}var jl={name:"cvGeoCity",mixins:[],components:{},emits:["update:province","update:city","update:district","update:provinceCode","update:cityCode","update:districtCode"],props:{modelValue:{type:[String,Array,Number],default(){return[]}},province:{type:[String]},provinceCode:{type:[Number,String],default:""},city:{type:[String]},cityCode:{type:[Number,String],default:""},district:{type:[String]},districtCode:{type:[Number,String],default:""},cityHide:{type:Boolean,default:!1},districtHide:{type:Boolean,default:!1}},watch:{modelValue(e){},province(e){this.initProvince()},provinceCode(e){this.initProvince()},cityCode(e){this.initCity()},districtCode(e){this.initDistrict()}},data(){return{provinceCdnList:{},cityCdnList:{},districtCdnList:{},isCdnLoading:!0,provinceList:[],cityList:[],districtList:[],local1_code:"",local1_name:"",local2_code:"",local2_name:"",local3_code:"",local3_name:"",local1_flag:!1,local2_flag:!1,local3_flag:!1,hideMunicipality:!1,municipalities:["110000","120000","310000","500000","北京市","天津市","上海市","重庆市"]}},async mounted(){await Oe(this.CDN_URL_UI+"/dict/geo/province-kv-window.js"),await Oe(this.CDN_URL_UI+"/dict/geo/city-kv-window.js"),await Oe(this.CDN_URL_UI+"/dict/geo/district-kv-window.js"),await this.initLoad()},methods:{initLoad(){setTimeout(()=>{this.provinceCdnList=window.cdn__DictAreaProvince,this.cityCdnList=window.cdn__DictAreaCity,this.districtCdnList=window.cdn__DictAreaDistrict,this.local1_flag=!1,this.isCdnLoading=!1,this.getProvinces(),this.initProvince()},200)},initProvince(){if(!this.province&&!this.provinceCode)return!1;this.getProvinces();const e=this.provinceList.find(o=>this.province?o.provinceName===this.province:this.provinceCode&&o.provinceCode===this.provinceCode);e&&(this.local1_code=e.provinceCode,this.changeProvince(e.provinceCode)),this.initCity()},initCity(){if(!this.city&&!this.cityCode)return!1;const e=this.cityList.find(o=>this.city?o.cityName===this.city:this.cityCode&&o.cityCode===this.cityCode);e&&(this.local2_code=e.cityCode,this.changeCity(e.cityCode)),this.initDistrict()},initDistrict(){if(!this.district&&!this.districtCode)return!1;const e=this.districtList.find(o=>this.district?o.districtName===this.district:this.districtCode&&o.districtCode===this.districtCode);e&&this.changeDistrict(e.districtCode)},getProvinces(){if(!this.local1_flag&&typeof this.provinceCdnList=="object"){let e=[];for(let o in this.provinceCdnList)e.push({provinceCode:o,provinceName:this.provinceCdnList[o]});this.provinceList=e,this.local1_flag=!0}},changeProvince(e){this._getNeedCity(),this.local2_flag=!0,this.local2_code="",this.local2_name="",this.local3_code="",this.local3_name="",this.local1_code=e,this.local1_name=this.provinceList.find(o=>o.provinceCode===e)?.provinceName,this.handleChoose()},_getNeedCity(){let e=[],o=this.local1_code.substring(0,2);for(let a in this.cityCdnList)a.substring(0,2)==o&&e.push({cityCode:a,cityName:this.cityCdnList[a]});this.cityList=e},getCities(){this.local2_flag||this.provinceCode&&(this._getNeedCity(),this.local2_flag=!0)},changeCity(e){this._getNeedDistrict(),this.local3_flag=!0,this.local3_name="",this.local3_code="",this.local2_code=e,this.local2_name=this.cityList.find(o=>o.cityCode===e)?.cityName,this.handleChoose()},_getNeedDistrict(){let e=[],o=this.local2_code.substring(0,4);for(let a in this.districtCdnList)a.substring(0,4)==o&&e.push({districtCode:a,districtName:this.districtCdnList[a]});this.districtList=e},getDistrict(){this.local3_flag||this.local2_code&&this._getNeedDistrict()},changeDistrict(e){this.local3_code=e,this.local3_name=this.districtList.find(o=>o.districtCode===e)?.districtName,this.handleChoose()},handleChoose(){this.$emit("update:province",this.local1_name),this.$emit("update:provinceCode",this.local1_code),this.$emit("update:city",this.local2_name),this.$emit("update:cityCode",this.local2_code),this.$emit("update:district",this.local3_name),this.$emit("update:districtCode",this.local3_code)}}},Rl={class:"cv-geo-city"},Ul={key:0},Wl={key:1};function Yl(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-option"),c=(0,t.resolveComponent)("el-select"),d=(0,t.resolveDirective)("loading");return(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",Rl,[(0,t.createElementVNode)("div",null,[(0,t.createVNode)(c,{modelValue:n.local1_code,"onUpdate:modelValue":o[0]||(o[0]=u=>n.local1_code=u),onFocus:l.getProvinces,onChange:l.changeProvince,placeholder:"省",filterable:""},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.provinceList,(u,m)=>((0,t.openBlock)(),(0,t.createBlock)(i,{key:u.provinceCode,label:u.provinceName,value:u.provinceCode},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(u.provinceName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]),a.cityHide?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",Ul,[(0,t.createVNode)(c,{modelValue:n.local2_code,"onUpdate:modelValue":o[1]||(o[1]=u=>n.local2_code=u),onFocus:l.getCities,onChange:l.changeCity,placeholder:"市",filterable:""},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.cityList,(u,m)=>((0,t.openBlock)(),(0,t.createBlock)(i,{key:u.cityCode,label:u.cityName,value:u.cityCode},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(u.cityName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])])),!a.cityHide&&!a.districtHide?((0,t.openBlock)(),(0,t.createElementBlock)("div",Wl,[(0,t.createVNode)(c,{modelValue:n.local3_code,"onUpdate:modelValue":o[2]||(o[2]=u=>n.local3_code=u),onFocus:l.getDistrict,onChange:l.changeDistrict,placeholder:"区/县",filterable:""},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.districtList,(u,m)=>((0,t.openBlock)(),(0,t.createBlock)(i,{key:u.districtCode,label:u.districtName,value:u.districtCode},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(u.districtName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])])):(0,t.createCommentVNode)("",!0)])),[[d,n.isCdnLoading]])}var Me=f(jl,[["render",Yl]]),Wo={computed:{componentName(){return this.$options.name}},methods:{_mergeAttrs(e){const o=this.$cvUiParams||{},a=e?o[e]||{}:{},r=o[this.componentName]||{},n=Object.assign({},a,r);return Object.assign({},n,this.$attrs)}}},ql={name:"cvGeoMap",mixins:[Wo],emits:["update:address","update:latitude","update:longitude","update:name","update:city"],props:{title:{type:[String],default:"选择经纬度地点"},mapKey:{type:[String],default:""},mapSecret:{type:[String],default:""},mapType:{type:[String],default:"qq"},address:{type:[String]},name:{type:[String]},city:{type:[String]},latitude:{type:[Number,String]},longitude:{type:[Number,String]}},watch:{address(e){this.localAddress=e},latitude(e){this.localLatitude=e},longitude(e){this.localLongitude=e},name(e){this.localName=e},city(e){this.localCity=e}},computed:{localMapKey(){return this._mergeAttrs("geo").mapKey},localMapSecret(){return this._mergeAttrs("geo").mapSecret},mapSrc(){let e=this.localMapKey;if(this.mapType=="qq"){if(!this.localMapKey)return"";let o="https://apis.map.qq.com/tools/locpicker";return o+=`?search=1&type=1&key=${e}&referer=myapp`,this.latitude&&this.longitude&&(o+=`&coord=${this.latitude},${this.longitude}`),o}else if(this.mapType=="amap"){if(!this.localMapKey||!this.localMapSecret)return"";let o="https://m.amap.com/picker/";return o+=`?zoom=15&radius=1000&total=20&key=${e}&jscode=${localMapSecret}`,this.latitude&&this.longitude&&(o+=`&center=${this.longitude},${this.latitude}`),o}else return this.$message.info("目前不支持百度地图"),""}},data(){return{localMapShow:!1,localAddress:"",localLatitude:"",localLongitude:"",localName:"",localCity:""}},mounted(){this.initData()},methods:{initData(){let e=this;window.addEventListener("message",o=>{let a=o.data;a&&a.module=="locationPicker"&&(e.localAddress=a.poiaddress||"",e.localName=a.poiname||"",e.localCity=a.cityname||"",e.localLatitude=a.latlng.lat||"",e.localLongitude=a.latlng.lng||"")},!1)},handleMapClose(){this.localMapShow=!1},handleMapOpen(){this.localMapShow=!0},handleConfirm(){this.$emit("update:address",this.localAddress),this.$emit("update:longitude",this.localLongitude),this.$emit("update:latitude",this.localLatitude),this.$emit("update:name",this.localName),this.$emit("update:city",this.localCity),this.handleMapClose()},handleCopy(e){this.$cvCopy(e)}}},Xl={class:"cv-geo-map__wrap"},Kl={class:"cv-geo-map__box"},Gl={style:{width:"100%",height:"510px"}},Zl=["src"],Ql={class:"cv-geo-map__info"},Jl={key:0,class:"cv-geo-map__address"},er={key:1,class:"cv-geo-map__jwd"};function tr(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input"),c=(0,t.resolveComponent)("el-tooltip"),d=(0,t.resolveComponent)("el-button"),u=(0,t.resolveComponent)("el-scrollbar"),m=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("div",Xl,[(0,t.createElementVNode)("div",Kl,[(0,t.createVNode)(c,{class:"item",effect:"dark",content:"请点击查找位置选择位置",placement:"bottom"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{modelValue:n.localAddress,"onUpdate:modelValue":o[0]||(o[0]=h=>n.localAddress=h)},null,8,["modelValue"])]),_:1}),(0,t.createVNode)(d,{type:"primary",icon:"ElIconSearch",onClick:l.handleMapOpen},{default:(0,t.withCtx)(()=>[...o[5]||(o[5]=[(0,t.createTextVNode)("请查找位置",-1)])]),_:1},8,["onClick"])])]),(0,t.createVNode)(m,{modelValue:n.localMapShow,"onUpdate:modelValue":o[4]||(o[4]=h=>n.localMapShow=h),title:a.title,width:"520","before-close":l.handleMapClose},{footer:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Ql,[n.localAddress?((0,t.openBlock)(),(0,t.createElementBlock)("div",Jl,[o[6]||(o[6]=(0,t.createElementVNode)("span",{class:"cv-geo-map__label"},"已选:",-1)),(0,t.createVNode)(c,{class:"item",effect:"dark",content:"点击复制",placement:"bottom"},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("span",{class:"cv-geo-map__value",onClick:o[1]||(o[1]=h=>l.handleCopy(n.localAddress))},(0,t.toDisplayString)(n.localAddress),1)]),_:1})])):(0,t.createCommentVNode)("",!0),n.localAddress?((0,t.openBlock)(),(0,t.createElementBlock)("div",er,[o[7]||(o[7]=(0,t.createElementVNode)("span",{class:"cv-geo-map__label"},"经度:",-1)),(0,t.createVNode)(c,{class:"item",effect:"dark",content:"点击复制",placement:"bottom"},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("span",{class:"cv-geo-map__value",onClick:o[2]||(o[2]=h=>l.handleCopy(n.localLongitude))},(0,t.toDisplayString)(n.localLongitude),1)]),_:1}),o[8]||(o[8]=(0,t.createElementVNode)("span",{class:"cv-geo-map__label"},"纬度:",-1)),(0,t.createVNode)(c,{class:"item",effect:"dark",content:"点击复制",placement:"bottom"},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("span",{class:"cv-geo-map__value",onClick:o[3]||(o[3]=h=>l.handleCopy(n.localLatitude))},(0,t.toDisplayString)(n.localLatitude),1)]),_:1})])):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("div",null,[(0,t.createVNode)(d,{onClick:l.handleMapClose},{default:(0,t.withCtx)(()=>[...o[9]||(o[9]=[(0,t.createTextVNode)("取消",-1)])]),_:1},8,["onClick"]),(0,t.createVNode)(d,{type:"primary",onClick:l.handleConfirm,disabled:!n.localAddress},{default:(0,t.withCtx)(()=>[...o[10]||(o[10]=[(0,t.createTextVNode)("确认选择",-1)])]),_:1},8,["onClick","disabled"])])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Gl,[(0,t.createVNode)(u,{style:{height:"510px"}},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("iframe",{id:"mapPage",width:"100%",height:"100%",style:{height:"500px"},frameborder:"0",src:l.mapSrc},null,8,Zl)]),_:1})])]),_:1},8,["modelValue","title","before-close"])],64)}var ze=f(ql,[["render",tr]]);Me.install=function(e){e.component(Me.name,Me)};ze.install=function(e){e.component(ze.name,ze)};var or={...k.ElOption,extends:k.ElOption,name:"cvSelectOpt"},Ae=or,ar={name:"cvSelectBase",emits:["onChoose","change","update:modelValue"],props:{...k.ElSelect.props,modelValue:{type:[String,Array,Number],default(){return""}},emptyValues:{type:[Array],default:[null,void 0]},dataLists:{type:[Array],default(){return[]}},dataField:{type:[Object],default(){return{}}},dataDisabled:{type:[Array],default(){return[]}},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"}},watch:{modelValue(e){this.localVal=e},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(e){this.handleChange()}},data(){return{localVal:this.modelValue,localOpt:[]}},methods:{handleChoose(e,o){this.$emit("onChoose",e,o)},handleChange(){this.$emit("change",this.localVal),this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let e=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(r=>{e.push({label:r,value:r})}),this.localOpt=e;else{var o=this.dataField&&this.dataField.label||"label",a=this.dataField&&this.dataField.value||"value";this.dataLists.map(r=>{let n=r[o]===0?0:r[o]||"",l=r[a]===0?0:r[a]||"";if(l=l===0?0:l||n,this.dataDisabled.length>0)for(let i in this.dataDisabled)this.dataDisabled[i][a]==l&&(r.disabled=!0);e.push({label:n,value:l,disabled:r.disabled&&!0||!1}),(r.checked=="true"||r.checked==!0)&&(typeof this.localVal=="string"?this.localVal=l:typeof this.localVal=="object"&&this.localVal.push(l))}),this.localOpt=e}}}};function nr(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-option"),c=(0,t.resolveComponent)("el-select");return(0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({class:"cv-select-base"},e.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>n.localVal=d),size:e.size,filterable:"",clearable:""}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default",{},()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.localOpt,(d,u)=>((0,t.openBlock)(),(0,t.createBlock)(i,{key:u,label:d.label,value:d.value,disabled:d.disabled,onClick:m=>l.handleChoose(d,u)},null,8,["label","value","disabled","onClick"]))),128))])]),_:3},16,["modelValue","size"])}var He=f(ar,[["render",nr]]),lr={name:"cvSelectTree",emits:["update:modelValue","change"],props:{...k.ElSelect.props,modelValue:{type:[String,Array,Number],default(){return""}},dataLists:{type:[Array],default(){return[]}},dataField:{type:[Object],default:()=>({value:"id",label:"title",children:"children"})},clearable:{type:Boolean,default:!0},accordion:{type:Boolean,default:!1},defaultExpandAll:{type:Boolean,default:!0},dataDisabled:{type:[Array],default(){return[]}},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"},showAllLevels:{type:Boolean,default:!0},showCheckbox:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},emitPath:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},refID:{type:[String],required:!1,default(){return"cvSelectTree-"+ +new Date+((Math.random()/1e4).toFixed(0)+"")}}},watch:{modelValue(){this.localVal=this.modelValue,this.initHandle()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(){this.handleChange()}},data(){return{localVal:"",localOpt:[],localTitle:"",defaultExpandedKey:[]}},computed:{props2(){return Object.assign(this.dataField,{emitPath:this.emitPath},{multiple:this.multiple})}},created(){},mounted(){this.localVal=this.modelValue,this.initHandle()},methods:{initHandle(){if(this.localVal){var e=this.$refs[this.refID+"tree"].getNode(this.localVal);e&&(this.localTitle=e.data[this.dataField.label],this.$refs[this.refID+"tree"].setCurrentKey(this.localVal),this.defaultExpandedKey=[this.localVal])}else this.clearHandle();this.initScroll()},initScroll(){this.$nextTick(()=>{let e=document.querySelectorAll(".cv-select-tree .el-scrollbar .el-select-dropdown__wrap")[0],o=document.querySelectorAll(".cv-select-tree .el-scrollbar .el-scrollbar__bar");e.style.cssText="margin: 0px; max-height: none; overflow: hidden;",o.forEach(a=>a.style.width=0)})},handleNodeClick(e,o,a){e.disabled||(this.localTitle=e[this.dataField.label],this.localVal=e[this.dataField.value],this.defaultExpandedKey=[],this.$refs[this.refID].blur())},clearHandle(){this.localTitle="",this.localVal="",this.defaultExpandedKey=[],this.clearSelected()},clearSelected(){document.querySelectorAll(`#${this.refID}tree .el-tree-node`).forEach(e=>e.classList.remove("is-current"))},handleChange(){this.$emit("change",this.localVal),this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let e=this.dataLists;this.dataField&&this.dataField.label;let o=this.dataField&&this.dataField.value||"value",a=this.dataField&&this.dataField.children||"children",r=this.dataDisabled;n(e);function n(l){for(let i in l)r.map(c=>{l[i][o]==c[o]&&(l[i].disabled=!0)}),l[i][a]&&n(l[i][a])}this.localOpt=e}}};function rr(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-tree"),c=(0,t.resolveComponent)("el-option"),d=(0,t.resolveComponent)("el-select");return(0,t.openBlock)(),(0,t.createBlock)(d,(0,t.mergeProps)(e.$props,{ref:a.refID,"popper-class":"cv-select-tree",modelValue:n.localTitle,onClear:l.clearHandle}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{value:n.localTitle,label:n.localTitle,class:"options"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{"highlight-current":"",id:a.refID+"tree",ref:a.refID+"tree",accordion:a.accordion,showCheckbox:a.showCheckbox,data:n.localOpt,props:a.dataField,"node-key":a.dataField.value,onNodeClick:l.handleNodeClick,"default-expand-all":a.defaultExpandAll},null,8,["id","accordion","showCheckbox","data","props","node-key","onNodeClick","default-expand-all"])]),_:1},8,["value","label"])]),_:1},16,["modelValue","onClear"])}var je=f(lr,[["render",rr],["__scopeId","data-v-a62c37b7"]]);Ae.install=function(e){e.component(Ae.name,Ae)};He.install=function(e){e.component(He.name,He)};je.install=function(e){e.component(je.name,je)};var ir={name:"cvCascaderBase",components:{},props:{...k.ElCascader.props,modelValue:{type:[String,Array,Number],default(){}},dataLists:{type:[Array],default(){return[]}},dataDisabled:{type:[Array],default(){return[]}},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"},showAllLevels:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},dataField:{type:[Object],default(){return{}}},emitPath:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(){this.handleChange(),this.handleInput()}},data(){return{localVal:this.modelValue,localOpt:[]}},computed:{props2(){return Object.assign(this.dataField,{emitPath:this.emitPath},{multiple:this.multiple})}},created(){},methods:{handleChange(){this.$emit("change",this.localVal)},handleInput(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let e=this.dataLists,o=this.dataField&&this.dataField.value||"value",a=this.dataDisabled;r(e);function r(n){for(let l in n)a.map(i=>{n[l][o]==i[o]&&(n[l].disabled=!0)}),n[l].children&&r(n[l].children)}this.localOpt=e},getCheckedNodes(){}}},sr={class:"cv-cascader-base block"};function cr(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-cascader");return(0,t.openBlock)(),(0,t.createElementBlock)("div",sr,[(0,t.createVNode)(i,(0,t.mergeProps)(e.$props,{props:l.props2,modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>n.localVal=c),options:n.localOpt,onChange:l.handleChange,onGetCheckedNodes:l.getCheckedNodes}),null,16,["props","modelValue","options","onChange","onGetCheckedNodes"])])}var Re=f(ir,[["render",cr]]);Re.install=function(e){e.component(Re.name,Re)};var Yo={props:{...k.ElTimePicker.props,modelValue:{type:[String,Array,Number,Object,Date],default:null}},watch:{modelValue:{handler(){if(this.valueFormat=="timestamp"){if(Array.isArray(this.modelValue)){var e=this.modelValue.map(o=>{if(!isNaN(o)&&o.toString().length==10)return o*1e3});if(this.localVal&&this.localVal[0]==e[0]&&this.localVal[1]==e[1])return;this.localVal=e}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=this.modelValue*1e3&&(this.localVal=this.modelValue*1e3);return}this.localVal=this.modelValue},immediate:!0,deep:!0},localVal(){if(this.valueFormat=="timestamp"){var e;if(Array.isArray(this.localVal)){if(e=this.localVal.map(o=>{if(!isNaN(o)&&o.toString().length==13)return parseInt(o/1e3)}),this.modelValue&&e[0]==this.modelValue[0]&&e[1]==this.modelValue[1])return;this.$emit("update:modelValue",e)}else!isNaN(this.localVal)&&this.localVal.toString().length==13&&(e=parseInt(this.localVal/1e3),this.modelValue!=e&&this.$emit("update:modelValue",e));return}this.$emit("update:modelValue",this.localVal)}},data(){return{localVal:""}},created(){},methods:{}},dr={name:"cvTimeBase",mixins:[Yo],props:{format:{type:String,default:"HH:mm:ss"},valueFormat:{type:String,default:"HH:mm:ss"},placeholder:{type:[String,Number],default:"选择时间"}}};function ur(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-time-picker");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({class:"cv-timePicker-base"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),format:a.format,"picker-options":{}}),null,16,["modelValue","format"])}var Ue=f(dr,[["render",ur]]),pr={name:"cvTimeRange",mixins:[Yo],props:{format:{type:String,default:"HH:mm:ss"},valueFormat:{type:String,default:"HH:mm:ss"},startPlaceholder:{type:[String,Number],default:"开始时间"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束时间"}}};function mr(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-time-picker");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({class:"cv-timePicker-range"},e.$props,{"is-range":"",modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),format:a.format,"range-separator":a.rangeSeparator,"start-placeholder":a.startPlaceholder,"end-placeholder":a.endPlaceholder}),null,16,["modelValue","format","range-separator","start-placeholder","end-placeholder"])}var We=f(pr,[["render",mr]]),hr={name:"cvTimeSelect"};function gr(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-time-select");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({class:"cv-time-select"},e.$props),null,16)}var Ye=f(hr,[["render",gr]]),Yt={props:{...k.ElDatePicker.props,modelValue:{type:[String,Array,Number,Object,Date],default:null},pickerOptions:{type:Boolean,default:!1}},watch:{modelValue:{handler(){if(this.valueFormat=="timestamp"){if(Array.isArray(this.modelValue)){var e=this.modelValue.map(o=>{if(!isNaN(o)&&o.toString().length==10)return o*1e3});if(this.localVal&&this.localVal[0]==e[0]&&this.localVal[1]==e[1])return;this.localVal=e}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=this.modelValue*1e3&&(this.localVal=this.modelValue*1e3);return}this.localVal=this.modelValue},immediate:!0,deep:!0},localVal(){if(this.valueFormat=="timestamp"){var e;if(Array.isArray(this.localVal)){if(e=this.localVal.map(o=>{if(!isNaN(o)&&o.toString().length==13)return parseInt(o/1e3)}),this.modelValue&&e[0]==this.modelValue[0]&&e[1]==this.modelValue[1])return;this.$emit("update:modelValue",e)}else!isNaN(this.localVal)&&this.localVal.toString().length==13&&(e=parseInt(this.localVal/1e3),this.modelValue!=e&&this.$emit("update:modelValue",e));return}this.$emit("update:modelValue",this.localVal)}},data(){return{localVal:""}}},fr={name:"cvDateBase",mixins:[Yt],props:{format:{type:String,default:"YYYY-MM-DD"},valueFormat:{type:String,default:"YYYY-MM-DD"},placeholder:{type:[String,Number],default:"选择日期"}},data(){return{localPickerOptions:{disabledDate(e){return e.getTime()>Date.now()},shortcuts:[{text:"今天",onClick(e){e.$emit("pick",new Date)}},{text:"昨天",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24),e.$emit("pick",o)}},{text:"一周前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*7),e.$emit("pick",o)}},{text:"一个月前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*30),e.$emit("pick",o)}},{text:"三个月前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*90),e.$emit("pick",o)}},{text:"六个月前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*180),e.$emit("pick",o)}},{text:"一年前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*365),e.$emit("pick",o)}}]}}}};function vr(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-date-picker");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),type:"date","value-format":a.valueFormat,placeholder:a.placeholder,"picker-options":e.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","placeholder","picker-options"])}var qe=f(fr,[["render",vr]]),Cr={name:"cvDateRange",mixins:[Yt],props:{valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:[String,Number],default:"开始日期"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束日期"}},data(){return{localPickerOptions:{shortcuts:[{text:"今天",onClick(e){const o=new Date,a=new Date;e.$emit("pick",[a,o])}},{text:"昨天",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24),o.setTime(o.getTime()-3600*1e3*24),e.$emit("pick",[a,o])}},{text:"最近一周",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*7),e.$emit("pick",[a,o])}},{text:"最近一个月",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*30),e.$emit("pick",[a,o])}},{text:"最近三个月",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*90),e.$emit("pick",[a,o])}},{text:"最近六个月",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*180),e.$emit("pick",[a,o])}},{text:"最近一年",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*365),e.$emit("pick",[a,o])}}]}}}};function kr(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-date-picker");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),type:"daterange","value-format":a.valueFormat,"range-separator":a.rangeSeparator,"start-placeholder":a.startPlaceholder,"end-placeholder":a.endPlaceholder,"picker-options":e.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","range-separator","start-placeholder","end-placeholder","picker-options"])}var Xe=f(Cr,[["render",kr]]),br={name:"cvDatetimeBase",mixins:[Yt],props:{format:{type:String,default:"YYYY-MM-DD HH:mm:ss"},valueFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},placeholder:{type:[String,Number],default:"选择日期时间"}},data(){return{localPickerOptions:{disabledDate(e){return e.getTime()>Date.now()},shortcuts:[{text:"今天",onClick(e){e.$emit("pick",new Date)}},{text:"昨天",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24),e.$emit("pick",o)}},{text:"一周前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*7),e.$emit("pick",o)}},{text:"一个月前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*30),e.$emit("pick",o)}},{text:"三个月前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*90),e.$emit("pick",o)}},{text:"六个月前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*180),e.$emit("pick",o)}},{text:"一年前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*365),e.$emit("pick",o)}}]}}}};function yr(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-date-picker");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),type:"datetime","value-format":a.valueFormat,placeholder:a.placeholder,"picker-options":e.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","placeholder","picker-options"])}var Ke=f(br,[["render",yr]]),wr={name:"cvDatetimeRange",mixins:[Yt],props:{valueFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},startPlaceholder:{type:[String,Number],default:"开始日期"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束日期"}},data(){return{localPickerOptions:{shortcuts:[{text:"今天",onClick(e){const o=new Date,a=new Date;e.$emit("pick",[a,o])}},{text:"昨天",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24),o.setTime(o.getTime()-3600*1e3*24),e.$emit("pick",[a,o])}},{text:"最近一周",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*7),e.$emit("pick",[a,o])}},{text:"最近一个月",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*30),e.$emit("pick",[a,o])}},{text:"最近三个月",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*90),e.$emit("pick",[a,o])}},{text:"最近六个月",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*180),e.$emit("pick",[a,o])}},{text:"最近一年",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*365),e.$emit("pick",[a,o])}}]}}}};function _r(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-date-picker");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),type:"datetimerange","value-format":a.valueFormat,"range-separator":a.rangeSeparator,"start-placeholder":a.startPlaceholder,"end-placeholder":a.endPlaceholder,align:"right","picker-options":e.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","range-separator","start-placeholder","end-placeholder","picker-options"])}var Ge=f(wr,[["render",_r]]),Vr={name:"cvDatetimeScreen",props:{start:{type:String,default:null},end:{type:String,default:null},autoUpdate:{type:Boolean,default:!0}},emits:["update:start","update:end","change"],data(){return{defaultTime:[new Date(2e3,0,1,0,0,0),new Date(2e3,0,1,23,59,59)],internalValue:[this.start||"",this.end||""]}},watch:{start(e){(e===null||e==="")&&(this.end===null||this.end==="")?this.internalValue=[null,null]:this.internalValue[0]=e},end(e){(this.start===null||this.start==="")&&(e===null||e==="")?this.internalValue=[null,null]:this.internalValue[1]=e}},computed:{dateUtil(){return{getStartOfDay(e=new Date){const o=new Date(e);return o.setHours(0,0,0,0),o},getEndOfDay(e=new Date){const o=new Date(e);return o.setHours(23,59,59,999),o},getYesterday(){const e=new Date;return e.setDate(e.getDate()-1),e},getDaysAgo(e){const o=new Date;return o.setDate(o.getDate()-(e-1)),o},getFirstDayOfMonth(){const e=new Date;return e.setDate(1),e},getFirstDayOfYear(){const e=new Date;return e.setMonth(0,1),e}}},refinedShortcuts(){return[{text:"本日",value:()=>[this.dateUtil.getStartOfDay(),this.dateUtil.getEndOfDay()]},{text:"昨天",value:()=>{const e=this.dateUtil.getYesterday();return[this.dateUtil.getStartOfDay(e),this.dateUtil.getEndOfDay(e)]}},{text:"最近7天",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getDaysAgo(7)),this.dateUtil.getEndOfDay()]},{text:"最近30天",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getDaysAgo(30)),this.dateUtil.getEndOfDay()]},{text:"本月",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getFirstDayOfMonth()),this.dateUtil.getEndOfDay()]},{text:"本年",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getFirstDayOfYear()),this.dateUtil.getEndOfDay()]},{text:"全部",value:()=>[null,null]}]}},methods:{syncInternalValue(){(this.start===null||this.start==="")&&(this.end===null||this.end==="")?this.internalValue=[null,null]:this.internalValue=[this.start,this.end]},handleDateChange(e){e?(this.$emit("update:start",e[0]),this.$emit("update:end",e[1])):(this.$emit("update:start",null),this.$emit("update:end",null)),this.$emit("change",e)},handleCalendarChange(e){}},created(){this.syncInternalValue()}};function Sr(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-date-picker");return(0,t.openBlock)(),(0,t.createBlock)(i,{modelValue:n.internalValue,"onUpdate:modelValue":o[0]||(o[0]=c=>n.internalValue=c),type:"datetimerange",shortcuts:l.refinedShortcuts,"range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"YYYY-MM-DD HH:mm:ss","default-time":n.defaultTime,onChange:l.handleDateChange,onCalendarChange:l.handleCalendarChange,clearable:"",class:"screen-date-picker"},null,8,["modelValue","shortcuts","default-time","onChange","onCalendarChange"])}var Ze=f(Vr,[["render",Sr]]);Ue.install=function(e){e.component(Ue.name,Ue)};We.install=function(e){e.component(We.name,We)};Ye.install=function(e){e.component(Ye.name,Ye)};qe.install=function(e){e.component(qe.name,qe)};Xe.install=function(e){e.component(Xe.name,Xe)};Ke.install=function(e){e.component(Ke.name,Ke)};Ge.install=function(e){e.component(Ge.name,Ge)};Ze.install=function(e){e.component(Ze.name,Ze)};var Br={name:"cvSwitchBase",props:{...k.ElSwitch.props,activeColor:{type:[String],default:""},inactiveColor:{type:[String],default:""},disabled:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.$emit("update:modelValue",this.localVal)}},data(){return{localVal:this.modelValue}},created(){this.localVal=this.modelValue},methods:{}};function Nr(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-switch");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>n.localVal=c)}),null,16,["modelValue"])}var Qe=f(Br,[["render",Nr]]);Qe.install=function(e){e.component(Qe.name,Qe)};var Er={name:"cvCodeSms",mixins:[],components:{},props:{...k.ElInput.props,maxlength:{type:[Number,String],default:6},modelValue:{type:[Number,String],default:""},placeholder:{type:[Number,String],default:"请输入验证码"},disabled:{type:Boolean,default:!1},mobile:{type:[Number,String],default:""},mobileParam:{type:String,default:"mobile"},codeUrl:{type:String,default:""},codeSign:{type:Boolean,default:!1},apiFunc:{type:Function,default:null},waitTime:{type:[Number,String],default:60}},watch:{mobile(e){this.localMobile=e},modelValue(e){this.localVal=e}},data(){return{localVal:this.modelValue,localMobile:"",nextTime:0,diyPlaceholder:"短信验证码",btnDisabled:!1,btnText:"获取验证码",btnIntervalObj:null}},created(){this.localMobile=this.mobile},methods:{showDiyMsg(e){this.$message(e)},getSmsCode(){if(!this.localMobile){this.showDiyMsg("手机号不正确"),this.$emit("onGetSms",!1);return}if(!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.localMobile)){this.showDiyMsg("手机号格式不正确"),this.$emit("onGetSms",!1);return}if(!this.codeUrl&&!this.apiFunc){this.showDiyMsg("短信接口地址不能为空");return}this.btnDisabled=!0,!this.btnIntervalObj&&this.btnDisabled&&(this.btnText="请稍后...",this.apiFunc?this.apiFunc({postType:"sendSms",cto_sms_type:"alterMobile",sendCode:"发送验证码",[this.mobileParam]:this.localMobile}).then(e=>{let o=e;o.status==200?(this.showDiyMsg("发送成功!"),setTimeout(()=>{this.codeSign&&(this.diyPlaceholder="识别码:"+(o.data&&o.data.sign||"")),this.smsCodeWaitTime()},500)):(this.showDiyMsg("短信获取失败,请检查网络"),this.btnDisabled=!1,this.btnText="获取验证码")}).catch(e=>{this.btnDisabled=!1,this.btnText="获取验证码"}):(this.btnDisabled=!1,this.btnText="重新获取验证码"))},smsCodeWaitTime(){this.nextTime=Date.parse(new Date)/1e3+parseInt(this.waitTime),this.btnIntervalObj=setInterval(()=>{let e=this.nextTime-Date.parse(new Date)/1e3;e<=0?(clearInterval(this.btnIntervalObj),this.btnText="重新获取验证码",this.btnIntervalObj=0,this.btnDisabled=!1):(this.btnDisabled=!0,this.btnText=e.toString()+"s")},100)},updateInput(e){this.$emit("update:modelValue",this.localVal)}}};function $r(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-button"),c=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)(e.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>n.localVal=d),clearable:"",placeholder:n.diyPlaceholder,onInput:l.updateInput}),{append:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{onClick:l.getSmsCode,disabled:n.btnDisabled},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.btnText),1)]),_:1},8,["onClick","disabled"])]),_:1},16,["modelValue","placeholder","onInput"])}var Je=f(Er,[["render",$r]]);Je.install=function(e){e.component(Je.name,Je)};var xr={props:{fileType:{type:[Array],default:[]},fileSize:{type:[Number],default:2},fileUnit:{type:[String],default:""},multiple:{type:[Boolean],default:!1},limit:{type:[Number],default:5}}},Dr={class:"cv-upload-tip-box"},Tr={key:0},Ir={key:1};function Lr(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Dr,[o[0]||(o[0]=(0,t.createElementVNode)("span",null,"最多上传",-1)),(0,t.createElementVNode)("b",null,(0,t.toDisplayString)(a.limit),1),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(a.fileUnit),1),a.fileType.length?((0,t.openBlock)(),(0,t.createElementBlock)("b",Tr,(0,t.toDisplayString)(a.fileType.length?a.fileType.join("/"):""),1)):(0,t.createCommentVNode)("",!0),a.fileType.length?((0,t.openBlock)(),(0,t.createElementBlock)("span",Ir,"格式")):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("span",null,"文件;且每"+(0,t.toDisplayString)(a.fileUnit)+"不超过",1),(0,t.createElementVNode)("b",null,(0,t.toDisplayString)(a.fileSize)+"MB",1)])}var Fr=f(xr,[["render",Lr]]),qt={inheritAttrs:!1,emits:["update:modelValue","update:initValue","delete","error","success"],components:{uploadTip:Fr},mixins:[Wo],props:{multiple:{type:[Boolean],default:!1},limit:{type:[Number,String],default:1},drag:{type:Boolean,default:!1},httpRequest:{type:[Function],default:()=>{}},accept:String,beforeRemove:Function,upResponseFn:{type:[Function],default:null},signatureFn:{type:Function,default:null},signatureType:{type:[String],default:"aliyun_oss_type2"},signatureParam:{type:[Object],default:()=>({})}},data(){return{cropShow:!1,upIngPercent:0,upIngLoading:!1,upIngFileInfo:{}}},computed:{fileTypeStr(){return this.fileType.join(",")},tipAttr(){return{fileType:this.fileType||[],fileSize:this.fileSize||"",multiple:this?.multiple||!1,limit:this.limit?parseInt(this.limit):5}},mergeAttrs(){let e=this._mergeAttrs("upload");return this.$props.signatureType&&(e.signatureType=this.$props.signatureType),this.$props.signatureFn&&(e.signatureFn=this.$props.signatureFn),this.$props.signatureParam&&(e.signatureParam=this.$props.signatureParam),typeof e.upResponseFn!="function"&&(e.upResponseFn=null),Object.assign({},e,this.$attrs)}},methods:{_commonBeforeUpload(e){e.type;const o=e.name||"";e.size/1024/1024;const a=o.split(".").pop().toLowerCase(),r=this.fileType.join("、");return this.fileType.includes(a)?e>this.fileSize?(ExtendMessage.error(`文件大小不能超过 ${this.fileSize} MB`),!1):!0:(ExtendMessage.error(`文件格式错误,请上传类型 如:${r}格式文件`),!1)},_commonRemove(){return new Promise((e,o)=>{this.$confirm("提示",{title:"确定删除??",showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{e(!0)}).catch(()=>{o(!1)})})},initHttpRequest(){},initOnProgress(e){this.upIngPercent=Number(e.percentage.toFixed(0))},initOnSuccess(e,o){},initOnExceed(){this.$message.error(`最多上传${this.limit}个文件`)}}};function lo(e){let o=[],a=Object.prototype.toString.call(e);if(a==="[object String]")o.push(bo(e));else if(a==="[object Object]")e.name&&e.url&&o.push(e);else if(a==="[object Array]")for(let r in e){let n=e[r],l=Object.prototype.toString.call(n);l==="[object String]"?o.push(bo(n)):l==="[object Object]"&&n.name&&n.url&&o.push(n)}return o}function bo(e){let o=e.lastIndexOf("/"),a=e.substring(o+1,e.length),r="";return a.lastIndexOf(".")>-1&&(r=a.slice(a.lastIndexOf(".")+1),r="image/"+r),{name:a,url:e,type:r,status:"success"}}function Y(e){return Math.pow(1024,e)}function yo(e){return e?e<Y(1)?e+" B":e<Y(2)?(e/Y(1)).toFixed(2)+" KB":e<Y(3)?(e/Y(2)).toFixed(2)+" MB":e<Y(4)?(e/Y(3)).toFixed(2)+" GB":(e/Y(4)).toFixed(2)+" TB":"-"}function Pr(e){if(!e)return!0;const o=e?.expiration_last;if(!o)return!0;const a=Dl(o),r=new Date;return isNaN(a.getTime())?!0:a.getTime()-r.getTime()<=6e4}async function wo(e,o){if(!e||typeof e!="function")return!1;let a=null;if(Pr(a)){let r=await e({...o});if(r&&r.data&&r.status==200)a=r.data||{};else throw k.ElMessage.error("获取STS令牌失败"),new Error(`获取STS令牌失败 ${r?.message}`)}return{...a,pass:!!a}}async function _o(e,o,a,r){e=e||"aliyun_oss_type2",r=r||{};const n=await wo(o,{upload_type:e,...a});if(!n.pass)return k.ElMessage.error("获取oss上传凭证异常");if(e=="oss_upload1"){const l={bucket:n.bucket,region:n.endpoint.split(".")[0],accessKeyId:n.accessKeyId,accessKeySecret:n.accessKeySecret,stsToken:n.securityToken,expiration:n.expiration,...r,refreshSTSToken:async()=>{const i=await wo(o);return{accessKeyId:i.accessKeyId,accessKeySecret:i.accessKeySecret,stsToken:i.securityToken}},refreshSTSTokenInterval:new Date(n.expiration)-new Date-6e4};return new OSS(l)}else if(e=="aliyun_oss_type2")return n;throw new Error("上传类型错误")}async function qo(e,o,a){let r={},n=new FormData;n.append("success_action_status",o.success_action_status||"200"),n.append("policy",o.policy),n.append("signature",o.signature),n.append("x-oss-signature",o.signature),n.append("x-oss-signature-version","OSS4-HMAC-SHA256"),n.append("x-oss-credential",o.x_oss_credential),n.append("x-oss-date",o.x_oss_date),n.append("x-oss-security-token",o.security_token);let l=o.key;if(o.key||(l=o.dir+"/"+e.name),n.append("key",l),o.callback&&n.append("callback",o.callback),o.callback_var&&Ut(o.callback_var))for(const i in o.callback_var)o.callback_var.hasOwnProperty(i)&&n.append(i,o.callback_var[i]);return n.append("file",e),fetch(o.host,{method:"POST",body:n,headers:r}).then(i=>{if(i.ok)return i.json()}).then(i=>{if(i&&i.success)return i.data}).catch(i=>{})}async function ro(e,o,a,r){if(!a||typeof a!="function")return k.ElMessage.error("签名方法错误"),Promise.reject();try{let n=Hl(),l=zl(e.type),i=`${n}.${l}`;const c=await a({upload_type:o,...r,save_extension:l}).then(d=>d.data||{}).catch(d=>(k.ElMessage.error("签名失败"),Promise.reject()));if(!c)return Promise.reject();if(c.name&&(i=`${c.name}.${l}`),e instanceof Blob&&(e=new File([e],i,{type:e.type,lastModified:Date.now()})),e)return await qo(e,c)}catch{return Promise.reject()}}var Xo={};Xo.getData=e=>new Promise((o,a)=>{let r={};Or(e).then(n=>{r.arrayBuffer=n;try{r.orientation=Hr(n)}catch{r.orientation=-1}o(r)}).catch(n=>{a(n)})});function Or(e){let o=null;return new Promise((a,r)=>{if(e.src)if(/^data\:/i.test(e.src))o=zr(e.src),a(o);else if(/^blob\:/i.test(e.src)){var n=new FileReader;n.onload=function(i){o=i.target.result,a(o)},Mr(e.src,function(i){n.readAsArrayBuffer(i)})}else{var l=new XMLHttpRequest;l.onload=function(){if(this.status==200||this.status===0)o=l.response,a(o);else throw"Could not load image";l=null},l.open("GET",e.src,!0),l.responseType="arraybuffer",l.send(null)}else r("img error")})}function Mr(e,o){var a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="blob",a.onload=function(r){(this.status==200||this.status===0)&&o(this.response)},a.send()}function zr(e,o){o=o||e.match(/^data\:([^\;]+)\;base64,/im)[1]||"",e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var a=atob(e),r=a.length%2==0?a.length:a.length+1,n=new ArrayBuffer(r),l=new Uint16Array(n),i=0;i<r;i++)l[i]=a.charCodeAt(i);return n}function Ar(e,o,a){var r="",n;for(n=o,a+=o;n<a;n++)r+=String.fromCharCode(e.getUint8(n));return r}function Hr(e){var o=new DataView(e),a=o.byteLength,r,n,l,i,c,d,u,m,h,g;if(o.getUint8(0)===255&&o.getUint8(1)===216)for(h=2;h<a;){if(o.getUint8(h)===255&&o.getUint8(h+1)===225){u=h;break}h++}if(u&&(n=u+4,l=u+10,Ar(o,n,4)==="Exif"&&(d=o.getUint16(l),c=d===18761,(c||d===19789)&&o.getUint16(l+2,c)===42&&(i=o.getUint32(l+4,c),i>=8&&(m=l+i)))),m){for(a=o.getUint16(m,c),g=0;g<a;g++)if(h=m+g*12+2,o.getUint16(h,c)===274){h+=8,r=o.getUint16(h,c);break}}return r}var jr=(e,o)=>{const a=e.__vccOpts||e;for(const[r,n]of o)a[r]=n;return a},Rr=(0,t.defineComponent)({data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0,imgIsQqualCrop:!1}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:()=>[1,1]},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:()=>10,validator:function(e){return Array.isArray(e)?Number(e[0])>=0&&Number(e[1])>=0:Number(e)>=0}},fillColor:{type:String,default:""}},computed:{cropInfo(){let e={};if(e.top=this.cropOffsertY>21?"-21px":"0px",e.width=this.cropW>0?this.cropW:0,e.height=this.cropH>0?this.cropH:0,this.infoTrue){let o=1;this.high&&!this.full&&(o=window.devicePixelRatio),this.enlarge!==1&!this.full&&(o=Math.abs(Number(this.enlarge))),e.width=e.width*o,e.height=e.height*o,this.full&&(e.width=e.width/this.scale,e.height=e.height/this.scale)}return e.width=e.width.toFixed(0),e.height=e.height.toFixed(0),e},isIE(){return!!window.ActiveXObject||"ActiveXObject"in window},passive(){return this.isIE?null:{passive:!1}},isRotateRightOrLeft(){return[1,-1,3,-3].includes(this.rotate)}},watch:{img(){this.checkedImg()},imgs(e){e!==""&&this.reload()},cropW(){this.showPreview()},cropH(){this.showPreview()},cropOffsertX(){this.showPreview()},cropOffsertY(){this.showPreview()},scale(e,o){this.showPreview()},x(){this.showPreview()},y(){this.showPreview()},autoCrop(e){e&&this.goAutoCrop()},autoCropWidth(){this.autoCrop&&this.goAutoCrop()},autoCropHeight(){this.autoCrop&&this.goAutoCrop()},mode(){this.checkedImg()},rotate(){this.showPreview(),this.autoCrop?this.goAutoCrop(this.cropW,this.cropH):(this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion(e){var o=navigator.userAgent.split(" "),a="";let r=0;const n=new RegExp(e,"i");for(var l=0;l<o.length;l++)n.test(o[l])&&(a=o[l]);return a?r=a.split("/")[1].split("."):r=["0","0","0"],r},checkOrientationImage(e,o,a,r){if(this.getVersion("chrome")[0]>=81)o=-1;else if(this.getVersion("safari")[0]>=605){const i=this.getVersion("version");i[0]>13&&i[1]>1&&(o=-1)}else{const i=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(i){let c=i[1];c=c.split("_"),(c[0]>13||c[0]>=13&&c[1]>=4)&&(o=-1)}}let n=document.createElement("canvas"),l=n.getContext("2d");switch(l.save(),o){case 2:n.width=a,n.height=r,l.translate(a,0),l.scale(-1,1);break;case 3:n.width=a,n.height=r,l.translate(a/2,r/2),l.rotate(180*Math.PI/180),l.translate(-a/2,-r/2);break;case 4:n.width=a,n.height=r,l.translate(0,r),l.scale(1,-1);break;case 5:n.height=a,n.width=r,l.rotate(.5*Math.PI),l.scale(1,-1);break;case 6:n.width=r,n.height=a,l.translate(r/2,a/2),l.rotate(90*Math.PI/180),l.translate(-a/2,-r/2);break;case 7:n.height=a,n.width=r,l.rotate(.5*Math.PI),l.translate(a,-r),l.scale(-1,1);break;case 8:n.height=a,n.width=r,l.translate(r/2,a/2),l.rotate(-90*Math.PI/180),l.translate(-a/2,-r/2);break;default:n.width=a,n.height=r}l.drawImage(e,0,0,a,r),l.restore(),n.toBlob(i=>{let c=URL.createObjectURL(i);URL.revokeObjectURL(this.imgs),this.imgs=c},"image/"+this.outputType,1)},checkedImg(){if(this.img===null||this.img===""){this.imgs="",this.clearCrop();return}this.loading=!0,this.scale=1,this.rotate=0,this.imgIsQqualCrop=!1,this.clearCrop();let e=new Image;if(e.onload=()=>{if(this.img==="")return this.$emit("img-load",new Error("图片不能为空")),!1;let a=e.width,r=e.height;Xo.getData(e).then(n=>{this.orientation=n.orientation||1;let l=Number(this.maxImgSize);if(!this.orientation&&a<l&r<l){this.imgs=this.img;return}a>l&&(r=r/a*l,a=l),r>l&&(a=a/r*l,r=l),this.checkOrientationImage(e,this.orientation,a,r)}).catch(n=>{this.$emit("img-load","error"),this.$emit("img-load-error",n)})},e.onerror=a=>{this.$emit("img-load","error"),this.$emit("img-load-error",a)},this.img.substr(0,4)!=="data"&&(e.crossOrigin=""),this.isIE){var o=new XMLHttpRequest;o.onload=function(){e.src=URL.createObjectURL(this.response)},o.open("GET",this.img,!0),o.responseType="blob",o.send()}else e.src=this.img},startMove(e){if(e.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in e?e.clientX:e.touches[0].clientX)-this.x,this.moveY=("clientY"in e?e.clientY:e.touches[0].clientY)-this.y,e.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),e.touches.length==2&&(this.touches=e.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=e.offsetX?e.offsetX:e.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=e.offsetY?e.offsetY:e.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in e?e.clientX:e.touches[0].clientX,this.cropY="clientY"in e?e.clientY:e.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale(e){e.preventDefault();let o=this.scale;var a={x:this.touches[0].clientX,y:this.touches[0].clientY},r={x:e.touches[0].clientX,y:e.touches[0].clientY},n={x:this.touches[1].clientX,y:this.touches[1].clientY},l={x:e.touches[1].clientX,y:e.touches[1].clientY},i=Math.sqrt(Math.pow(a.x-n.x,2)+Math.pow(a.y-n.y,2)),c=Math.sqrt(Math.pow(r.x-l.x,2)+Math.pow(r.y-l.y,2))-i,d=1;d=d/this.trueWidth>d/this.trueHeight?d/this.trueHeight:d/this.trueWidth,d=d>.1?.1:d;var u=d*c;if(!this.touchNow){if(this.touchNow=!0,c>0?o+=Math.abs(u):c<0&&o>Math.abs(u)&&(o-=Math.abs(u)),this.touches=e.touches,setTimeout(()=>{this.touchNow=!1},8),!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o}},cancelTouchScale(e){window.removeEventListener("touchmove",this.touchScale)},moveImg(e){if(e.preventDefault(),e.touches&&e.touches.length===2)return this.touches=e.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;let o="clientX"in e?e.clientX:e.touches[0].clientX,a="clientY"in e?e.clientY:e.touches[0].clientY,r,n;r=o-this.moveX,n=a-this.moveY,this.$nextTick(()=>{if(this.centerBox){let l=this.getImgAxis(r,n,this.scale),i=this.getCropAxis(),c=this.trueHeight*this.scale,d=this.trueWidth*this.scale,u,m,h,g;switch(this.rotate){case 1:case-1:case 3:case-3:u=this.cropOffsertX-this.trueWidth*(1-this.scale)/2+(c-d)/2,m=this.cropOffsertY-this.trueHeight*(1-this.scale)/2+(d-c)/2,h=u-c+this.cropW,g=m-d+this.cropH;break;default:u=this.cropOffsertX-this.trueWidth*(1-this.scale)/2,m=this.cropOffsertY-this.trueHeight*(1-this.scale)/2,h=u-d+this.cropW,g=m-c+this.cropH;break}l.x1>=i.x1&&(r=u),l.y1>=i.y1&&(n=m),l.x2<=i.x2&&(r=h),l.y2<=i.y2&&(n=g)}this.x=r,this.y=n,this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})})},leaveImg(e){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize(e){e.preventDefault();let o=this.scale;var a=e.deltaY||e.wheelDelta;a=navigator.userAgent.indexOf("Firefox")>0?a*30:a,this.isIE&&(a=-a);var r=this.coe;r=r/this.trueWidth>r/this.trueHeight?r/this.trueHeight:r/this.trueWidth;var n=r*a;n<0?o+=Math.abs(n):o>Math.abs(n)&&(o-=Math.abs(n));let l=n<0?"add":"reduce";if(l!==this.coeStatus&&(this.coeStatus=l,this.coe=.2),this.scaling||(this.scalingSet=setTimeout(()=>{this.scaling=!1,this.coe=this.coe+=.01},50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o},changeScale(e){let o=this.scale;e=e||1;var a=20;if(a=a/this.trueWidth>a/this.trueHeight?a/this.trueHeight:a/this.trueWidth,e=e*a,e>0?o+=Math.abs(e):o>Math.abs(e)&&(o-=Math.abs(e)),!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o},createCrop(e){e.preventDefault();var o="clientX"in e?e.clientX:e.touches?e.touches[0].clientX:0,a="clientY"in e?e.clientY:e.touches?e.touches[0].clientY:0;this.$nextTick(()=>{var r=o-this.cropX,n=a-this.cropY;if(r>0?(this.cropW=r+this.cropChangeX>this.w?this.w-this.cropChangeX:r,this.cropOffsertX=this.cropChangeX):(this.cropW=this.w-this.cropChangeX+Math.abs(r)>this.w?this.cropChangeX:Math.abs(r),this.cropOffsertX=this.cropChangeX+r>0?this.cropChangeX+r:0),!this.fixed)n>0?(this.cropH=n+this.cropChangeY>this.h?this.h-this.cropChangeY:n,this.cropOffsertY=this.cropChangeY):(this.cropH=this.h-this.cropChangeY+Math.abs(n)>this.h?this.cropChangeY:Math.abs(n),this.cropOffsertY=this.cropChangeY+n>0?this.cropChangeY+n:0);else{var l=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];l+this.cropOffsertY>this.h?(this.cropH=this.h-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],r>0?this.cropOffsertX=this.cropChangeX:this.cropOffsertX=this.cropChangeX-this.cropW):this.cropH=l,this.cropOffsertY=this.cropOffsertY}})},changeCropSize(e,o,a,r,n){e.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=o,this.canChangeY=a,this.changeCropTypeX=r,this.changeCropTypeY=n,this.cropX="clientX"in e?e.clientX:e.touches[0].clientX,this.cropY="clientY"in e?e.clientY:e.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow(e){e.preventDefault();var o="clientX"in e?e.clientX:e.touches?e.touches[0].clientX:0,a="clientY"in e?e.clientY:e.touches?e.touches[0].clientY:0;let r=this.w,n=this.h,l=0,i=0;if(this.centerBox){let u=this.getImgAxis(),m=u.x2,h=u.y2;l=u.x1>0?u.x1:0,i=u.y1>0?u.y1:0,r>m&&(r=m),n>h&&(n=h)}const[c,d]=this.checkCropLimitSize();this.$nextTick(()=>{var u=o-this.cropX,m=a-this.cropY;if(this.canChangeX&&(this.changeCropTypeX===1?this.cropOldW-u<c?(this.cropW=c,this.cropOffsertX=this.cropOldW+this.cropChangeX-l-c):this.cropOldW-u>0?(this.cropW=r-this.cropChangeX-u<=r-l?this.cropOldW-u:this.cropOldW+this.cropChangeX-l,this.cropOffsertX=r-this.cropChangeX-u<=r-l?this.cropChangeX+u:l):(this.cropW=Math.abs(u)+this.cropChangeX<=r?Math.abs(u)-this.cropOldW:r-this.cropOldW-this.cropChangeX,this.cropOffsertX=this.cropChangeX+this.cropOldW):this.changeCropTypeX===2&&(this.cropOldW+u<c?this.cropW=c:this.cropOldW+u>0?(this.cropW=this.cropOldW+u+this.cropOffsertX<=r?this.cropOldW+u:r-this.cropOffsertX,this.cropOffsertX=this.cropChangeX):(this.cropW=r-this.cropChangeX+Math.abs(u+this.cropOldW)<=r-l?Math.abs(u+this.cropOldW):this.cropChangeX-l,this.cropOffsertX=r-this.cropChangeX+Math.abs(u+this.cropOldW)<=r-l?this.cropChangeX-Math.abs(u+this.cropOldW):l))),this.canChangeY&&(this.changeCropTypeY===1?this.cropOldH-m<d?(this.cropH=d,this.cropOffsertY=this.cropOldH+this.cropChangeY-i-d):this.cropOldH-m>0?(this.cropH=n-this.cropChangeY-m<=n-i?this.cropOldH-m:this.cropOldH+this.cropChangeY-i,this.cropOffsertY=n-this.cropChangeY-m<=n-i?this.cropChangeY+m:i):(this.cropH=Math.abs(m)+this.cropChangeY<=n?Math.abs(m)-this.cropOldH:n-this.cropOldH-this.cropChangeY,this.cropOffsertY=this.cropChangeY+this.cropOldH):this.changeCropTypeY===2&&(this.cropOldH+m<d?this.cropH=d:this.cropOldH+m>0?(this.cropH=this.cropOldH+m+this.cropOffsertY<=n?this.cropOldH+m:n-this.cropOffsertY,this.cropOffsertY=this.cropChangeY):(this.cropH=n-this.cropChangeY+Math.abs(m+this.cropOldH)<=n-i?Math.abs(m+this.cropOldH):this.cropChangeY-i,this.cropOffsertY=n-this.cropChangeY+Math.abs(m+this.cropOldH)<=n-i?this.cropChangeY-Math.abs(m+this.cropOldH):i))),this.canChangeX&&this.fixed){var h=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];h<d?(this.cropH=d,this.cropW=this.fixedNumber[0]*d/this.fixedNumber[1],this.changeCropTypeX===1&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):h+this.cropOffsertY>n?(this.cropH=n-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],this.changeCropTypeX===1&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):this.cropH=h}if(this.canChangeY&&this.fixed){var g=this.cropH/this.fixedNumber[1]*this.fixedNumber[0];g<c?(this.cropW=c,this.cropH=this.fixedNumber[1]*c/this.fixedNumber[0],this.cropOffsertY=this.cropOldH+this.cropChangeY-this.cropH):g+this.cropOffsertX>r?(this.cropW=r-this.cropOffsertX,this.cropH=this.cropW/this.fixedNumber[0]*this.fixedNumber[1]):this.cropW=g}})},checkCropLimitSize(){let{cropW:e,cropH:o,limitMinSize:a}=this,r=new Array;return Array.isArray(a)?r=a:r=[a,a],e=parseFloat(r[0]),o=parseFloat(r[1]),[e,o]},changeCropEnd(e){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},calculateSize(e,o,a,r,n,l){const i=e/o;let c=n,d=l;return c<a&&(c=a,d=Math.ceil(c/i)),d<r&&(d=r,c=Math.ceil(d*i),c<a&&(c=a,d=Math.ceil(c/i))),c<n&&(c=n,d=Math.ceil(c/i)),d<l&&(d=l,c=Math.ceil(d*i)),{width:c,height:d}},endCrop(){this.cropW===0&&this.cropH===0&&(this.cropping=!1);let[e,o]=this.checkCropLimitSize();const{width:a,height:r}=this.fixed?this.calculateSize(this.fixedNumber[0],this.fixedNumber[1],e,o,this.cropW,this.cropH):{width:e,height:o};a>this.cropW&&(this.cropW=a,this.cropOffsertX+a>this.w&&(this.cropOffsertX=this.w-a)),r>this.cropH&&(this.cropH=r,this.cropOffsertY+r>this.h&&(this.cropOffsertY=this.h-r)),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop(){this.crop=!0},stopCrop(){this.crop=!1},clearCrop(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove(e){if(e.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(e),!1;if(e.touches&&e.touches.length===2)return this.crop=!1,this.startMove(e),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);let o="clientX"in e?e.clientX:e.touches[0].clientX,a="clientY"in e?e.clientY:e.touches[0].clientY,r,n;r=o-this.cropOffsertX,n=a-this.cropOffsertY,this.cropX=r,this.cropY=n,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop(e,o){let a=0,r=0;e&&(e.preventDefault(),a="clientX"in e?e.clientX:e.touches[0].clientX,r="clientY"in e?e.clientY:e.touches[0].clientY),this.$nextTick(()=>{let n,l,i=a-this.cropX,c=r-this.cropY;if(o&&(i=this.cropOffsertX,c=this.cropOffsertY),i<=0?n=0:i+this.cropW>this.w?n=this.w-this.cropW:n=i,c<=0?l=0:c+this.cropH>this.h?l=this.h-this.cropH:l=c,this.centerBox){let d=this.getImgAxis();n<=d.x1&&(n=d.x1),n+this.cropW>d.x2&&(n=d.x2-this.cropW),l<=d.y1&&(l=d.y1),l+this.cropH>d.y2&&(l=d.y2-this.cropH)}this.cropOffsertX=n,this.cropOffsertY=l,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})})},getImgAxis(e,o,a){e=e||this.x,o=o||this.y,a=a||this.scale;let r={x1:0,x2:0,y1:0,y2:0},n=this.trueWidth*a,l=this.trueHeight*a;switch(this.rotate){case 0:r.x1=e+this.trueWidth*(1-a)/2,r.x2=r.x1+this.trueWidth*a,r.y1=o+this.trueHeight*(1-a)/2,r.y2=r.y1+this.trueHeight*a;break;case 1:case-1:case 3:case-3:r.x1=e+this.trueWidth*(1-a)/2+(n-l)/2,r.x2=r.x1+this.trueHeight*a,r.y1=o+this.trueHeight*(1-a)/2+(l-n)/2,r.y2=r.y1+this.trueWidth*a;break;default:r.x1=e+this.trueWidth*(1-a)/2,r.x2=r.x1+this.trueWidth*a,r.y1=o+this.trueHeight*(1-a)/2,r.y2=r.y1+this.trueHeight*a;break}return r},getCropAxis(){let e={x1:0,x2:0,y1:0,y2:0};return e.x1=this.cropOffsertX,e.x2=e.x1+this.cropW,e.y1=this.cropOffsertY,e.y2=e.y1+this.cropH,e},leaveCrop(e){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked(e){let o=document.createElement("canvas"),a=o.getContext("2d"),r=new Image,n=this.rotate,l=this.trueWidth,i=this.trueHeight,c=this.cropOffsertX,d=this.cropOffsertY;r.onload=()=>{if(this.cropW!==0){let h=1;this.high&!this.full&&(h=window.devicePixelRatio),this.enlarge!==1&!this.full&&(h=Math.abs(Number(this.enlarge)));let g=this.cropW*h,v=this.cropH*h,C=l*this.scale*h,p=i*this.scale*h,y=(this.x-c+this.trueWidth*(1-this.scale)/2)*h,b=(this.y-d+this.trueHeight*(1-this.scale)/2)*h;switch(m(g,v),a.save(),n){case 0:this.full?(m(g/this.scale,v/this.scale),a.drawImage(r,y/this.scale,b/this.scale,C/this.scale,p/this.scale)):a.drawImage(r,y,b,C,p);break;case 1:case-3:this.full?(m(g/this.scale,v/this.scale),y=y/this.scale+(C/this.scale-p/this.scale)/2,b=b/this.scale+(p/this.scale-C/this.scale)/2,a.rotate(n*90*Math.PI/180),a.drawImage(r,b,-y-p/this.scale,C/this.scale,p/this.scale)):(y=y+(C-p)/2,b=b+(p-C)/2,a.rotate(n*90*Math.PI/180),a.drawImage(r,b,-y-p,C,p));break;case 2:case-2:this.full?(m(g/this.scale,v/this.scale),a.rotate(n*90*Math.PI/180),y=y/this.scale,b=b/this.scale,a.drawImage(r,-y-C/this.scale,-b-p/this.scale,C/this.scale,p/this.scale)):(a.rotate(n*90*Math.PI/180),a.drawImage(r,-y-C,-b-p,C,p));break;case 3:case-1:this.full?(m(g/this.scale,v/this.scale),y=y/this.scale+(C/this.scale-p/this.scale)/2,b=b/this.scale+(p/this.scale-C/this.scale)/2,a.rotate(n*90*Math.PI/180),a.drawImage(r,-b-C/this.scale,y,C/this.scale,p/this.scale)):(y=y+(C-p)/2,b=b+(p-C)/2,a.rotate(n*90*Math.PI/180),a.drawImage(r,-b-C,y,C,p));break;default:this.full?(m(g/this.scale,v/this.scale),a.drawImage(r,y/this.scale,b/this.scale,C/this.scale,p/this.scale)):a.drawImage(r,y,b,C,p)}a.restore()}else{let h=l*this.scale,g=i*this.scale;switch(a.save(),n){case 0:m(h,g),a.drawImage(r,0,0,h,g);break;case 1:case-3:m(g,h),a.rotate(n*90*Math.PI/180),a.drawImage(r,0,-g,h,g);break;case 2:case-2:m(h,g),a.rotate(n*90*Math.PI/180),a.drawImage(r,-h,-g,h,g);break;case 3:case-1:m(g,h),a.rotate(n*90*Math.PI/180),a.drawImage(r,-h,0,h,g);break;default:m(h,g),a.drawImage(r,0,0,h,g)}a.restore()}e(o)},this.img.substr(0,4)!=="data"&&(r.crossOrigin="Anonymous"),r.src=this.imgs;const u=this.fillColor;function m(h,g){o.width=Math.round(h),o.height=Math.round(g),u&&(a.fillStyle=u,a.fillRect(0,0,o.width,o.height))}},getCropData(e){this.getCropChecked(o=>{e(o.toDataURL("image/"+this.outputType,this.outputSize))})},getCropBlob(e){this.getCropChecked(o=>{o.toBlob(a=>e(a),"image/"+this.outputType,this.outputSize)})},showPreview(){if(this.isCanShow)this.isCanShow=!1,setTimeout(()=>{this.isCanShow=!0},16);else return!1;let e=this.cropW,o=this.cropH,a=this.scale;var r={};r.div={width:`${e}px`,height:`${o}px`};let n=(this.x-this.cropOffsertX)/a,l=(this.y-this.cropOffsertY)/a,i=0;r.w=e,r.h=o,r.url=this.imgs,r.img={width:`${this.trueWidth}px`,height:`${this.trueHeight}px`,transform:`scale(${a})translate3d(${n}px, ${l}px, ${i}px)rotateZ(${this.rotate*90}deg)`},r.html=`
2
- <div class="show-preview" style="width: ${r.w}px; height: ${r.h}px,; overflow: hidden">
3
- <div style="width: ${e}px; height: ${o}px">
4
- <img src=${r.url} style="width: ${this.trueWidth}px; height: ${this.trueHeight}px; transform:
5
- scale(${a})translate3d(${n}px, ${l}px, ${i}px)rotateZ(${this.rotate*90}deg)">
6
- </div>
7
- </div>`,this.$emit("real-time",r)},reload(){let e=new Image;e.onload=()=>{this.w=parseFloat(window.getComputedStyle(this.$refs.cropper).width),this.h=parseFloat(window.getComputedStyle(this.$refs.cropper).height),this.trueWidth=e.width,this.trueHeight=e.height,this.original?this.scale=1:this.scale=this.checkedMode(),this.$nextTick(()=>{this.x=-(this.trueWidth-this.trueWidth*this.scale)/2+(this.w-this.trueWidth*this.scale)/2,this.y=-(this.trueHeight-this.trueHeight*this.scale)/2+(this.h-this.trueHeight*this.scale)/2,this.loading=!1,this.autoCrop&&this.goAutoCrop(),this.$emit("img-load","success"),setTimeout(()=>{this.showPreview()},20)})},e.onerror=()=>{this.$emit("img-load","error")},e.src=this.imgs},checkedMode(){let e=1,o=this.trueWidth,a=this.trueHeight;const r=this.mode.split(" ");switch(r[0]){case"contain":this.trueWidth>this.w&&(e=this.w/this.trueWidth),this.trueHeight*e>this.h&&(e=this.h/this.trueHeight);break;case"cover":o=this.w,e=o/this.trueWidth,a=a*e,a<this.h&&(a=this.h,e=a/this.trueHeight);break;default:try{let n=r[0];if(n.search("px")!==-1){n=n.replace("px",""),o=parseFloat(n);const l=o/this.trueWidth;let i=1,c=r[1];c.search("px")!==-1&&(c=c.replace("px",""),a=parseFloat(c),i=a/this.trueHeight),e=Math.min(l,i)}if(n.search("%")!==-1&&(n=n.replace("%",""),o=parseFloat(n)/100*this.w,e=o/this.trueWidth),r.length===2&&n==="auto"){let l=r[1];l.search("px")!==-1&&(l=l.replace("px",""),a=parseFloat(l),e=a/this.trueHeight),l.search("%")!==-1&&(l=l.replace("%",""),a=parseFloat(l)/100*this.h,e=a/this.trueHeight)}}catch{e=1}}return e},goAutoCrop(e,o){if(this.imgs===""||this.imgs===null)return;this.clearCrop(),this.cropping=!0;let a=this.w,r=this.h;if(this.centerBox){const i=Math.abs(this.rotate)%2>0;let c=(i?this.trueHeight:this.trueWidth)*this.scale,d=(i?this.trueWidth:this.trueHeight)*this.scale;a=c<a?c:a,r=d<r?d:r}var n=e||parseFloat(this.autoCropWidth),l=o||parseFloat(this.autoCropHeight);(n===0||l===0)&&(n=a*.8,l=r*.8),n=n>a?a:n,l=l>r?r:l,this.fixed&&(l=n/this.fixedNumber[0]*this.fixedNumber[1]),l>this.h&&(l=this.h,n=l/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(n,l)},changeCrop(e,o){if(this.centerBox){let a=this.getImgAxis();e>a.x2-a.x1&&(e=a.x2-a.x1,o=e/this.fixedNumber[0]*this.fixedNumber[1]),o>a.y2-a.y1&&(o=a.y2-a.y1,e=o/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=e,this.cropH=o,this.checkCropLimitSize(),this.$nextTick(()=>{this.cropOffsertX=(this.w-this.cropW)/2,this.cropOffsertY=(this.h-this.cropH)/2,this.centerBox&&this.moveCrop(null,!0)})},refresh(){this.img,this.imgs="",this.scale=1,this.crop=!1,this.rotate=0,this.w=0,this.h=0,this.trueWidth=0,this.trueHeight=0,this.imgIsQqualCrop=!1,this.clearCrop(),this.$nextTick(()=>{this.checkedImg()})},rotateLeft(){this.rotate=this.rotate<=-3?0:this.rotate-1},rotateRight(){this.rotate=this.rotate>=3?0:this.rotate+1},rotateClear(){this.rotate=0},checkoutImgAxis(e,o,a){e=e||this.x,o=o||this.y,a=a||this.scale;let r=!0;if(this.centerBox){let n=this.getImgAxis(e,o,a),l=this.getCropAxis();n.x1>=l.x1&&(r=!1),n.x2<=l.x2&&(r=!1),n.y1>=l.y1&&(r=!1),n.y2<=l.y2&&(r=!1),r||this.changeImgScale(n,l,a)}return r},changeImgScale(e,o,a){let r=this.trueWidth,n=this.trueHeight,l=r*a,i=n*a;if(l>=this.cropW&&i>=this.cropH)this.scale=a;else{const c=this.cropW/r,d=this.cropH/n,u=this.cropH<=n*c?c:d;this.scale=u,l=r*u,i=n*u}this.imgIsQqualCrop||(e.x1>=o.x1&&(this.isRotateRightOrLeft?this.x=o.x1-(r-l)/2-(l-i)/2:this.x=o.x1-(r-l)/2),e.x2<=o.x2&&(this.isRotateRightOrLeft?this.x=o.x1-(r-l)/2-(l-i)/2-i+this.cropW:this.x=o.x2-(r-l)/2-l),e.y1>=o.y1&&(this.isRotateRightOrLeft?this.y=o.y1-(n-i)/2-(i-l)/2:this.y=o.y1-(n-i)/2),e.y2<=o.y2&&(this.isRotateRightOrLeft?this.y=o.y2-(n-i)/2-(i-l)/2-l:this.y=o.y2-(n-i)/2-i)),(l<this.cropW||i<this.cropH)&&(this.imgIsQqualCrop=!0)}},mounted(){this.support="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";let e=this;this.isIOS=!!navigator.userAgent.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(o,a,r){for(var n=atob(this.toDataURL(a,r).split(",")[1]),l=n.length,i=new Uint8Array(l),c=0;c<l;c++)i[c]=n.charCodeAt(c);o(new Blob([i],{type:e.type||"image/png"}))}}),this.showPreview(),this.checkedImg()},unmounted(){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.cancelScale()}}),Ur={key:0,class:"cropper-box"},Wr=["src"],Yr={class:"cropper-view-box"},qr=["src"],Xr={key:1};function Kr(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"vue-cropper",ref:"cropper",onMouseover:o[28]||(o[28]=(...i)=>e.scaleImg&&e.scaleImg(...i)),onMouseout:o[29]||(o[29]=(...i)=>e.cancelScale&&e.cancelScale(...i))},[e.imgs?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ur,[(0,t.withDirectives)((0,t.createElementVNode)("div",{class:"cropper-box-canvas",style:(0,t.normalizeStyle)({width:e.trueWidth+"px",height:e.trueHeight+"px",transform:"scale("+e.scale+","+e.scale+") translate3d("+e.x/e.scale+"px,"+e.y/e.scale+"px,0)rotateZ("+e.rotate*90+"deg)"})},[(0,t.createElementVNode)("img",{src:e.imgs,alt:"cropper-img",ref:"cropperImg"},null,8,Wr)],4),[[t.vShow,!e.loading]])])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["cropper-drag-box",{"cropper-move":e.move&&!e.crop,"cropper-crop":e.crop,"cropper-modal":e.cropping}]),onMousedown:o[0]||(o[0]=(...i)=>e.startMove&&e.startMove(...i)),onTouchstart:o[1]||(o[1]=(...i)=>e.startMove&&e.startMove(...i))},null,34),(0,t.withDirectives)((0,t.createElementVNode)("div",{class:"cropper-crop-box",style:(0,t.normalizeStyle)({width:e.cropW+"px",height:e.cropH+"px",transform:"translate3d("+e.cropOffsertX+"px,"+e.cropOffsertY+"px,0)"})},[(0,t.createElementVNode)("span",Yr,[(0,t.createElementVNode)("img",{style:(0,t.normalizeStyle)({width:e.trueWidth+"px",height:e.trueHeight+"px",transform:"scale("+e.scale+","+e.scale+") translate3d("+(e.x-e.cropOffsertX)/e.scale+"px,"+(e.y-e.cropOffsertY)/e.scale+"px,0)rotateZ("+e.rotate*90+"deg)"}),src:e.imgs,alt:"cropper-img"},null,12,qr)]),(0,t.createElementVNode)("span",{class:"cropper-face cropper-move",onMousedown:o[2]||(o[2]=(...i)=>e.cropMove&&e.cropMove(...i)),onTouchstart:o[3]||(o[3]=(...i)=>e.cropMove&&e.cropMove(...i))},null,32),e.info?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:0,class:"crop-info",style:(0,t.normalizeStyle)({top:e.cropInfo.top})},(0,t.toDisplayString)(e.cropInfo.width)+" × "+(0,t.toDisplayString)(e.cropInfo.height),5)):(0,t.createCommentVNode)("",!0),e.fixedBox?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("span",Xr,[(0,t.createElementVNode)("span",{class:"crop-line line-w",onMousedown:o[4]||(o[4]=i=>e.changeCropSize(i,!1,!0,0,1)),onTouchstart:o[5]||(o[5]=i=>e.changeCropSize(i,!1,!0,0,1))},null,32),(0,t.createElementVNode)("span",{class:"crop-line line-a",onMousedown:o[6]||(o[6]=i=>e.changeCropSize(i,!0,!1,1,0)),onTouchstart:o[7]||(o[7]=i=>e.changeCropSize(i,!0,!1,1,0))},null,32),(0,t.createElementVNode)("span",{class:"crop-line line-s",onMousedown:o[8]||(o[8]=i=>e.changeCropSize(i,!1,!0,0,2)),onTouchstart:o[9]||(o[9]=i=>e.changeCropSize(i,!1,!0,0,2))},null,32),(0,t.createElementVNode)("span",{class:"crop-line line-d",onMousedown:o[10]||(o[10]=i=>e.changeCropSize(i,!0,!1,2,0)),onTouchstart:o[11]||(o[11]=i=>e.changeCropSize(i,!0,!1,2,0))},null,32),(0,t.createElementVNode)("span",{class:"crop-point point1",onMousedown:o[12]||(o[12]=i=>e.changeCropSize(i,!0,!0,1,1)),onTouchstart:o[13]||(o[13]=i=>e.changeCropSize(i,!0,!0,1,1))},null,32),(0,t.createElementVNode)("span",{class:"crop-point point2",onMousedown:o[14]||(o[14]=i=>e.changeCropSize(i,!1,!0,0,1)),onTouchstart:o[15]||(o[15]=i=>e.changeCropSize(i,!1,!0,0,1))},null,32),(0,t.createElementVNode)("span",{class:"crop-point point3",onMousedown:o[16]||(o[16]=i=>e.changeCropSize(i,!0,!0,2,1)),onTouchstart:o[17]||(o[17]=i=>e.changeCropSize(i,!0,!0,2,1))},null,32),(0,t.createElementVNode)("span",{class:"crop-point point4",onMousedown:o[18]||(o[18]=i=>e.changeCropSize(i,!0,!1,1,0)),onTouchstart:o[19]||(o[19]=i=>e.changeCropSize(i,!0,!1,1,0))},null,32),(0,t.createElementVNode)("span",{class:"crop-point point5",onMousedown:o[20]||(o[20]=i=>e.changeCropSize(i,!0,!1,2,0)),onTouchstart:o[21]||(o[21]=i=>e.changeCropSize(i,!0,!1,2,0))},null,32),(0,t.createElementVNode)("span",{class:"crop-point point6",onMousedown:o[22]||(o[22]=i=>e.changeCropSize(i,!0,!0,1,2)),onTouchstart:o[23]||(o[23]=i=>e.changeCropSize(i,!0,!0,1,2))},null,32),(0,t.createElementVNode)("span",{class:"crop-point point7",onMousedown:o[24]||(o[24]=i=>e.changeCropSize(i,!1,!0,0,2)),onTouchstart:o[25]||(o[25]=i=>e.changeCropSize(i,!1,!0,0,2))},null,32),(0,t.createElementVNode)("span",{class:"crop-point point8",onMousedown:o[26]||(o[26]=i=>e.changeCropSize(i,!0,!0,2,2)),onTouchstart:o[27]||(o[27]=i=>e.changeCropSize(i,!0,!0,2,2))},null,32)]))],4),[[t.vShow,e.cropping]])],544)}var Gr=jr(Rr,[["render",Kr],["__scopeId","data-v-a742df44"]]);var Zr={props:{loading:{type:[Boolean],default:!1},modelValue:{type:[Boolean],default:!1},src:{type:[String],default:""},size:{type:[Number],default:120},title:{type:[String],default:"裁剪"}},components:{VueCropper:Gr},emits:["update:modelValue","onSubmit","onClose"],data(){return{cropDialogVisible:!1,cropAutoCrop:!0,cropFixedBox:!0,cropOutputType:"png",cropPreviews:{},cropVisible:!1,cropBeforelImage:"",cropAfterImage:"",cropLocalWidth:this.size,cropLocalHeight:this.size}},watch:{modelValue(e){this.cropDialogVisible=e,this.cropInit()},src(e){this.cropInit()}},computed:{cropAttrs(){return{info:!0,autoCrop:this.cropAutoCrop,fixedBox:this.cropFixedBox,autoCropWidth:this.cropLocalWidth,autoCropHeight:this.cropLocalHeight,outputType:this.cropOutputType}}},mounted(){},methods:{cropInit(){this.cropBeforelImage=this.src||""},cropDialoClose(){this.cropBeforelImage="",this.cropPreviews="",this.cropVisible=!1,this.cropDialogVisible=!1,this.$emit("update:modelValue",!1),this.$emit("onClose",!1)},cropDialogOpened(){this.$nextTick(()=>{this.cropVisible=!0})},cropSubmit(){this._submit_blob()},_submit_blob(){this.$refs.cvAvatartCropper.getCropBlob(e=>{this.$emit("onSubmit",{file:e})})},_submit_base64(){this.$refs.cvAvatartCropper.getCropData(e=>{let o=new Image;o.src=e,o.onload=async()=>{imageCompress(o)}})},cropRotateRefresh(){},cropRotateLeft(){this.$refs.cvAvatartCropper.rotateLeft()},cropRotateRight(){this.$refs.cvAvatartCropper.rotateRight()},cropChangeScale(e){e=e||1,this.$refs.cvAvatartCropper.changeScale(e)},cropRealTime(e){this.cropPreviews=e}}},Qr={class:"cv-upload-crop-box"},Jr={class:"cv-upload-crop-left-box"},ei={class:"cv-upload-crop-left-opt"},ti={class:"cv-upload-crop-left-opt2"},oi={class:"cv-upload-crop-left-opt2"},ai={class:"cv-upload-crop-right-box"},ni=["innerHTML"];function li(e,o,a,r,n,l){const i=(0,t.resolveComponent)("vue-cropper"),c=(0,t.resolveComponent)("el-button"),d=(0,t.resolveComponent)("el-tooltip"),u=(0,t.resolveComponent)("el-input"),m=(0,t.resolveComponent)("el-dialog"),h=(0,t.resolveDirective)("loading");return(0,t.openBlock)(),(0,t.createBlock)(m,{title:a.title,modelValue:n.cropDialogVisible,"onUpdate:modelValue":o[7]||(o[7]=g=>n.cropDialogVisible=g),width:"800px","append-to-body":"",onOpened:l.cropDialogOpened,onClose:l.cropDialoClose},{footer:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{type:"primary",onClick:l.cropSubmit,loading:a.loading,disabled:a.loading},{default:(0,t.withCtx)(()=>[...o[12]||(o[12]=[(0,t.createTextVNode)("提 交",-1)])]),_:1},8,["onClick","loading","disabled"])]),default:(0,t.withCtx)(()=>[(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",Qr,[(0,t.createElementVNode)("div",Jr,[n.cropVisible?((0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({key:0,ref:"cvAvatartCropper",img:n.cropBeforelImage},l.cropAttrs,{onRealTime:l.cropRealTime}),null,16,["img","onRealTime"])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",ei,[(0,t.renderSlot)(e.$slots,"default"),(0,t.createVNode)(d,{effect:"dark",content:"重置",placement:"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{icon:"ElIconRefresh",onClick:o[0]||(o[0]=g=>l.cropRotateRefresh())})]),_:1}),(0,t.createVNode)(d,{effect:"dark",content:"放大",placement:"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{icon:"ElIconZoomIn",onClick:o[1]||(o[1]=g=>l.cropChangeScale(1))})]),_:1}),(0,t.createVNode)(d,{effect:"dark",content:"缩小",placement:"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{icon:"ElIconZoomOut",onClick:o[2]||(o[2]=g=>l.cropChangeScale(-1))})]),_:1}),(0,t.createVNode)(d,{effect:"dark",content:"向左旋转",placement:"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{icon:"ElIconRefreshLeft",onClick:o[3]||(o[3]=g=>l.cropRotateLeft())})]),_:1}),(0,t.createVNode)(d,{effect:"dark",content:"向右旋转",placement:"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{icon:"ElIconRefreshRight",onClick:o[4]||(o[4]=g=>l.cropRotateRight())})]),_:1})]),(0,t.createElementVNode)("div",ti,[(0,t.createVNode)(u,{size:"small"},{prepend:(0,t.withCtx)(()=>[...o[8]||(o[8]=[(0,t.createTextVNode)("X 坐标",-1)])]),_:1}),(0,t.createVNode)(u,{size:"small"},{prepend:(0,t.withCtx)(()=>[...o[9]||(o[9]=[(0,t.createTextVNode)("Y 坐标",-1)])]),_:1})]),(0,t.createElementVNode)("div",oi,[(0,t.createVNode)(u,{size:"small",modelValue:n.cropLocalWidth,"onUpdate:modelValue":o[5]||(o[5]=g=>n.cropLocalWidth=g)},{prepend:(0,t.withCtx)(()=>[...o[10]||(o[10]=[(0,t.createTextVNode)("宽度",-1)])]),_:1},8,["modelValue"]),(0,t.createVNode)(u,{size:"small",modelValue:n.cropLocalHeight,"onUpdate:modelValue":o[6]||(o[6]=g=>n.cropLocalHeight=g)},{prepend:(0,t.withCtx)(()=>[...o[11]||(o[11]=[(0,t.createTextVNode)("高度",-1)])]),_:1},8,["modelValue"])])]),(0,t.createElementVNode)("div",ai,[(0,t.createElementVNode)("div",{class:"cv-upload-crop-preview",innerHTML:n.cropPreviews.html},null,8,ni)])])),[[h,a.loading]])]),_:3},8,["title","modelValue","onOpened","onClose"])}var ri=f(Zr,[["render",li]]),ii={title:"头像上传",name:"cvUploadAvatar",mixins:[qt],components:{UploadCrop:ri},props:{modelValue:{type:[String],default:""},initValue:{type:[String],default:""},fileSize:{type:[Number],default:2},fileType:{type:[Array],default:()=>["png","jpg","jpeg","gif"]},showSize:{type:Number,default:120},crop:{type:[Boolean],default:!0},signatureParam:{type:[Object],default:()=>({save_sign:"avatar"})}},data(){return{localValue:"",localList:[],upAccept:"image/*"}},computed:{localRef(){return"cvUploadAvatar"+ +new Date+((Math.random()*1e3).toFixed(0)+"")},handlerAttr(){return{ref:this.localRef,action:"#",accept:this.upAccept,limit:1,multiple:!1,drag:!1,disabled:this.upIngLoading,showFileList:!1}},showStyle(){return{width:this.showSize+"px",height:this.showSize+"px",lineHeight:this.showSize+"px"}}},watch:{initValue(e){this._init_parse()}},mounted(){this._init_parse()},methods:{_init_parse(){this.localValue=this.initValue||""},cropDialogOpen(){this.cropShow=!0,this.$nextTick(()=>{this._init_parse()})},initBeforeUpload(e){if(!this._commonBeforeUpload(e))return this.upIngLoading=!1,!1;if(this.crop){const o=new FileReader;o.readAsDataURL(e),o.onload=()=>{this.localValue=o.result},this.$refs.cvUploadAvatar.clearFiles()}},async onHttpRequest(e){const{file:o}=e;this.upIngLoading=!0,await ro(o,this.mergeAttrs.signatureType||null,this.mergeAttrs.signatureFn||null,this.mergeAttrs.signatureParam||{}).then(a=>{this.$nextTick(()=>{this.$emit("update:modelValue",a.full_path),this.$emit("update:initValue",a.cdn_full_path)}),k.ElMessage.success("上传成功"),this.upIngLoading=!1,this.cropShow=!1}).catch(()=>{this.upIngLoading=!1})}}},si=["src"];function ci(e,o,a,r,n,l){const i=(0,t.resolveComponent)("upload-tip"),c=(0,t.resolveComponent)("cv-icons"),d=(0,t.resolveComponent)("el-button"),u=(0,t.resolveComponent)("el-tooltip"),m=(0,t.resolveComponent)("el-upload"),h=(0,t.resolveComponent)("upload-crop");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-upload-avatar-wrap",onClick:o[2]||(o[2]=(...g)=>l.cropDialogOpen&&l.cropDialogOpen(...g))},[a.initValue?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:"cv-upload-avatar-box cv-upload-avatar-empty",style:(0,t.normalizeStyle)(l.showStyle)},[...o[3]||(o[3]=[(0,t.createElementVNode)("div",{class:"cv-upload-avatar__text"},"上传头像",-1)])],4)),a.initValue?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"cv-upload-avatar-box",style:(0,t.normalizeStyle)(l.showStyle)},[(0,t.createElementVNode)("img",{class:"cv-upload-avatar__img",src:a.initValue},null,8,si)],4)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(i,(0,t.mergeProps)(e.tipAttr,{fileUnit:"张",multiple:!1,limit:1}),null,16),a.crop?((0,t.openBlock)(),(0,t.createBlock)(h,{key:2,modelValue:e.cropShow,"onUpdate:modelValue":o[0]||(o[0]=g=>e.cropShow=g),title:"修改头像",size:a.showSize,onOnSubmit:l.onHttpRequest,onOnClose:o[1]||(o[1]=g=>e.upIngLoading=!1),loading:e.upIngLoading,src:n.localValue},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(m,(0,t.mergeProps)(l.handlerAttr,{"before-upload":l.initBeforeUpload,"http-request":e.initHttpRequest}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(u,{effect:"dark",content:"选择图片",placement:"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(d,{style:{"margin-right":"10px"},loading:e.upIngLoading,disabled:e.upIngLoading},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{type:"ElIconPlus",size:"14",style:{"margin-right":"10px"}}),o[4]||(o[4]=(0,t.createTextVNode)(" 选择 ",-1))]),_:1},8,["loading","disabled"])]),_:1})]),_:1},16,["before-upload","http-request"])]),_:1},8,["modelValue","size","onOnSubmit","loading","src"])):(0,t.createCommentVNode)("",!0)])}var et=f(ii,[["render",ci]]);function ee(e){return e?typeof e=="string"||typeof e=="number"?[e]:Object.prototype.toString.call(e)==="[object Object]"?[]:[...e]:[]}function Vo(e,o){let a=[];Array.isArray(e)&&e.length>0&&a.push(...e),Array.isArray(o)&&o.length>0&&a.push(...o),typeof o=="string"&&a.push(o);let r=[];for(let n in a){let l=a[n],i=Object.prototype.toString.call(l);i==="[object String]"?r.push(l):i==="[object Object]"&&l.url&&r.push(l.url)}return r}var di={title:"图片上传",name:"cvUploadImage",mixins:[qt],components:{},props:{modelValue:{type:[String,Number,Array,Object],default:""},initValue:{type:[String,Number,Array],default:()=>""},fileSize:{type:[Number],default:2},fileType:{type:[Array],default:()=>["png","jpg","jpeg","gif"]},showSize:{type:Number,default:150},showBig:{type:[Boolean],default:!1},crop:{type:[Boolean],default:!1},galleryLabel:{type:String,default:""},lazy:{type:Boolean,default:!0},drag:{type:Boolean,default:!1},signatureParam:{type:[Object],default:()=>({save_sign:"image"})}},data(){return{localValue:[],localList:[],previewShow:!1,previewTitle:"",previewUrl:"",upAccept:"image/*"}},computed:{localRef(){return"cvUploadImage"+ +new Date+((Math.random()*1e3).toFixed(0)+"")},handlerAttr(){return{ref:this.localRef,action:"#",accept:this.upAccept,limit:parseInt(this.limit),multiple:this.multiple,drag:!!this.drag,disabled:this.upIngLoading,showFileList:!1}},showUpload(){return!(this.localList.length>=this.limit)},showStyle(){let e=this.showSize+"px";return(this.showBig||this.drag)&&(e=this.showSize*2+"px"),{width:e,height:this.showSize+"px",lineHeight:this.showSize+"px"}}},watch:{modelValue(e){this._init_parse_value()},initValue(e){this._init_parse_list()}},mounted(){},methods:{_init_parse_value(){this.modelValue?typeof this.modelValue=="string"&&this.modelValue.includes(",")?this.localValue=ee(String(this.modelValue).split(",").map(e=>e.trim())):this.localValue=ee(this.modelValue):this.localValue=[]},_init_parse_list(){this.initValue?this.localList=lo(this.initValue):this.localList=[]},initOnChange(e,o){},initBeforeUpload(e){return this.upIngLoading=!0,this._commonBeforeUpload(e)?!0:(this.upIngLoading=!1,!1)},async initHttpRequest(e){const{file:o}=e;this.upIngLoading=!0,this.mergeAttrs.upResponseFn,await ro(o,this.mergeAttrs.signatureType||null,this.mergeAttrs.signatureFn||null,this.mergeAttrs.signatureParam||{}).then(a=>{this.$nextTick(()=>{this.updateValue(a.filelog_id,a.cdn_full_path)}),k.ElMessage.success("上传成功"),this.upIngLoading=!1}).catch(()=>{this.upIngLoading=!1})},updateValue(e,o){if(this.multiple){let a=Vo(this.localValue,e).join(",");this.$emit("update:modelValue",a)}else this.$emit("update:modelValue",e);if(this.multiple){let a=Vo(this.localList,o);this.$emit("update:initValue",a)}else this.$emit("update:initValue",o)},handleItemPreview(e,o){e.raw,e.type.includes("image")?(this.previewTitle=e.name,this.previewUrl=e.url,this.previewShow=!0):window.open(e.url)},doRemove(e){this.multiple?(this.localValue.splice(e,1),this.localList.splice(e,1)):(this.localValue="",this.localList=[]),this.updateValue(null,null)},handleItemRemove(e,o){if(this.beforeRemove&&typeof this.beforeRemove=="function"){const a=this.multiple?this.localValue[o]:this.localValue,r=this.beforeRemove(a,this.localValue);r&&r.then?r.then(()=>{this.doRemove(o)},()=>{}):r!==!1&&this.doRemove(o)}else this.doRemove(o)},handleItemEdit(e,o){k.ElMessageBox.prompt("请输入文件地址","编辑",{confirmButtonText:"OK",cancelButtonText:"Cancel",inputValue:e.url||"",inputErrorMessage:"格式不正确"}).then(({value:a})=>{const r=a.split("/").pop(),n=r.split(".").pop().toLowerCase();if(!this.fileType.includes(n)){let c=this.fileType.join("、");return k.ElMessage.error(`文件格式错误,请填写类型,如:${c} 格式文件`),!1}const l=Al(n);if(!l)return k.ElMessage.error("文件格式错误"),!1;Ll(a)||this.mergeAttrs?.baseDomain&&(a=this.mergeAttrs?.baseDomain+a);const i={name:r,status:"success",type:l,uid:Date.now(),url:a};this.localList[o]=i}).catch(()=>{})},handleItemCrop(e,o){}}},ui={class:"cv-upload-image cv-upload-common"},pi={class:"cv-upload-list-box el-upload-list el-upload-list--picture-card"},mi=["tabindex"],hi={class:"el-upload-list__item-status-label"},gi={class:"el-upload-list__item-actions"},fi=["onClick"],vi={class:"el-upload-list__item-delete"},Ci={class:"el-upload-list__item-delete"},ki=["onClick"],bi={style:{margin:"0 auto"}},yi=["src"];function wi(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-image"),c=(0,t.resolveComponent)("cv-icons"),d=(0,t.resolveComponent)("el-upload"),u=(0,t.resolveComponent)("upload-tip"),m=(0,t.resolveComponent)("el-dialog"),h=(0,t.resolveDirective)("loading");return(0,t.openBlock)(),(0,t.createElementBlock)("div",ui,[(0,t.createElementVNode)("div",pi,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.localList,(g,v)=>((0,t.openBlock)(),(0,t.createElementBlock)("section",{class:"el-upload-list__item is-success",key:v,tabindex:v,style:(0,t.normalizeStyle)(l.showStyle)},[(0,t.createVNode)(i,{class:"el-upload-list__item-thumbnail",lazy:a.lazy,src:g.url,style:(0,t.normalizeStyle)(l.showStyle),fit:"contain"},null,8,["lazy","src","style"]),(0,t.createElementVNode)("label",hi,[(0,t.createVNode)(c,{type:"ElIconCheck",color:"#ffffff",size:"12"})]),(0,t.createElementVNode)("span",gi,[(0,t.createElementVNode)("span",{class:"el-upload-list__item-preview",onClick:C=>l.handleItemPreview(g)},[(0,t.createVNode)(c,{type:"ElIconZoomIn",size:"20"})],8,fi),(0,t.createElementVNode)("span",vi,[(0,t.createVNode)(c,{type:"ElIconDelete",size:"20",onClick:C=>l.handleItemRemove(g,v)},null,8,["onClick"])]),(0,t.createElementVNode)("span",Ci,[(0,t.createVNode)(c,{type:"ElIconEdit",size:"20",onClick:C=>l.handleItemEdit(g,v)},null,8,["onClick"])]),a.crop?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:0,class:"el-upload-list__item-preview",onClick:C=>l.handleItemCrop(g)},[(0,t.createVNode)(c,{type:"ElIconCrop",size:"20"})],8,ki)):(0,t.createCommentVNode)("",!0)])],12,mi))),128)),l.showUpload?((0,t.openBlock)(),(0,t.createBlock)(d,(0,t.mergeProps)({key:0,class:"cv-upload-common-handle"},l.handlerAttr,{"file-list":n.localList,"before-upload":l.initBeforeUpload,"http-request":l.initHttpRequest,"on-change":l.initOnChange,"on-exceed":e.initOnExceed,style:l.showStyle}),{default:(0,t.withCtx)(()=>[(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-upload-common__ing",style:(0,t.normalizeStyle)(l.showStyle)},[a.drag?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createVNode)(c,{type:"ElIconUpload",size:"24"}),o[1]||(o[1]=(0,t.createElementVNode)("div",{class:"el-upload__text"},[(0,t.createTextVNode)(" 将文件拖到此处,或 "),(0,t.createElementVNode)("em",null,"点击上传")],-1))],64)):((0,t.openBlock)(),(0,t.createBlock)(c,{key:1,type:"ElIconPlus",size:a.showSize/3},null,8,["size"]))],4)),[[h,e.upIngLoading]])]),_:1},16,["file-list","before-upload","http-request","on-change","on-exceed","style"])):(0,t.createCommentVNode)("",!0)]),(0,t.createVNode)(u,(0,t.mergeProps)(e.tipAttr,{fileUnit:"张"}),null,16),(0,t.createVNode)(m,{modelValue:n.previewShow,"onUpdate:modelValue":o[0]||(o[0]=g=>n.previewShow=g),title:n.previewTitle,"append-to-body":""},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",bi,[(0,t.createElementVNode)("img",{width:"100%",src:n.previewUrl,style:{"max-width":"300px"}},null,8,yi)])]),_:1},8,["modelValue","title"])])}var tt=f(di,[["render",wi]]),_i={mdb:"access",accdb:"access",ai:"ai",html:"html",htm:"html",asp:"web",pdf:"pdf",psd:"photoshop",psb:"photoshop",mpo:"photoshop",eps:"photoshop",avi:"video",wmv:"video",rm:"video",rmvb:"video",mp4:"video","3gp":"video",asf:"video",mov:"video",m4v:"video",flv:"video",f4v:"video",mkv:"video",mts:"video",swf:"flash",ts:"video",mp3:"audio",wav:"audio",wma:"audio",ape:"audio",aac:"audio",zip:"zip",rar:"zip",gz:"zip","7z":"zip",z:"zip",bmp:"image",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",txt:"txt",rtf:"txt",xls:"excel",xlsx:"excel",xlsm:"excel",xltx:"excel",doc:"word",docx:"word",docm:"word",wps:"word",dotx:"word",dotm:"word",ppt:"powerpoint",pptx:"powerpoint",mdf:"db",db:"db",dbf:"db",wdb:"db",vue:"vue",php:"php",jar:"jar",ini:"ini",bat:"bat",config:"config",fla:"fla",eot:"font",otf:"font",fon:"font",font:"font",ttf:"font",ttc:"font",woff:"font",woff2:"font",js:"js",md:"markdown",one:"onenote",jsx:"reactjs",xfl:"xfl",file:"file",css:"css"};function Vi(e){return`https://10ui.cn/ions/type/${_i[e]}.svg`}var Qt=Vi,Si={name:"uploadList",props:{files:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0}},methods:{getExtension(e){return e.lastIndexOf(".")>-1&&Qt[e.slice(e.lastIndexOf(".")+1).toLowerCase()]||Qt.file},getSize(e){return e&&!isNaN(Number(e))?e:""},parsePercentage(e){return parseInt(e,10)},handleDownload(e){e.url},handleDelete(e,o){this.$confirm("确认删除该文件吗? ").then(()=>{this.$emit("remove",e,o)}).catch(()=>{})}}},Bi=["src"],Ni={class:"cv-upload-list__item-content-action"};function Ei(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-link");return(0,t.openBlock)(),(0,t.createBlock)(t.TransitionGroup,{class:"cv-upload-file-list el-upload-list el-upload-list--text",name:"el-list",tag:"ul"},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.files,(c,d)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:c.uid,class:"el-upload-list__item cv-upload-list__item-content"},[(0,t.createVNode)(i,{href:c.url,underline:!1,target:"_blank"},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("img",{src:l.getExtension(c.name),class:"el-upload-list__item-content-name-icon"},null,8,Bi),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(c.name),1)]),_:2},1032,["href"]),(0,t.createElementVNode)("div",Ni,[(0,t.createVNode)(i,{underline:!1},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(l.getSize(c.size)),1)]),_:2},1024),a.isCanDownload?((0,t.openBlock)(),(0,t.createBlock)(i,{key:0,underline:!1,onClick:u=>l.handleDownload(c)},{default:(0,t.withCtx)(()=>[...o[0]||(o[0]=[(0,t.createTextVNode)("下载",-1)])]),_:1},8,["onClick"])):(0,t.createCommentVNode)("",!0),!a.disabled&&a.isCanDelete?((0,t.openBlock)(),(0,t.createBlock)(i,{key:1,underline:!1,onClick:u=>l.handleDelete(d,c),type:"danger"},{default:(0,t.withCtx)(()=>[...o[1]||(o[1]=[(0,t.createTextVNode)(" 删除 ",-1)])]),_:1},8,["onClick"])):(0,t.createCommentVNode)("",!0)])]))),128))]),_:1})}var $i=f(Si,[["render",Ei]]),xi={title:"文件上传",inheritAttrs:!1,name:"cvUploadFile",mixins:[qt],components:{uploadList:$i},props:{modelValue:{type:[String,Object,Array],default:""},initValue:{type:[String,Object,Array],default:""},fileSize:{type:[Number],default:5},fileType:{type:[Array],default:["txt","png","jpg","xlsx","xls"]},multiple:{type:[Boolean],default:!1},limit:{type:[Number],default:5},disabled:Boolean,isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0},isCanUploadSame:{type:Boolean,default:!0}},data(){return{localValue:[],localList:[]}},computed:{localRef(){return"cvUploadFile"+ +new Date+((Math.random()*1e3).toFixed(0)+"")},handlerAttr(){return{ref:this.localRef,action:"#",limit:parseInt(this.limit),multiple:this.multiple,drag:!1,disabled:this.upIngLoading,showFileList:!0}},list(){let e=1;return this.modelValue?(Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]).map(o=>(typeof o=="string"&&(o={name:o,url:o}),o.uid=o.uid||new Date().getTime()+e++,o)):[]}},watch:{initValue(e){this._init_parse()}},mounted(){this._init_parse()},methods:{_init_parse(){this.initValue?this.localList=lo(this.initValue):this.localList=[]},initOnChange(e,o){this.localList=o},initBeforeUpload(e){return this._commonBeforeUpload(e)?!this.isCanUploadSame&&this.localList.some(o=>o.name+o.size===e.name+e.size)?(this.$message.error("此文件已上传!"),!1):!0:!1},upFileError(e){this.$message.error("上传失败, 请重试"),this.$emit("error",e)},upFileSuccess(e,o){this.upResponseFn&&typeof this.upResponseFn=="function"&&(e=this.upResponseFn(e,o,this.localList)),this.multiple?this.$emit("update:modelValue",[...this.localList,e]):this.$emit("update:modelValue",e),this.$emit("success",e,this.localList)},handleRemove(e,o){if(this.beforeRemove&&typeof this.beforeRemove=="function"){const a=this.beforeRemove(this.localList[o],this.localList);a&&a.then?a.then(()=>{this._do_remove(o)},()=>{}):a!==!1&&this._do_remove(o)}else this._do_remove(o)},_do_remove(e){if(this.$emit("remove",this.list[e],this.list),this.localList.splice(e,1),this.multiple){const o=[...this.list];o.splice(e,1),this.$emit("update:modelValue",o||[])}else this.$emit("update:modelValue",null)}}},Di={class:"cv-upload-file"};function Ti(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-button"),c=(0,t.resolveComponent)("el-upload"),d=(0,t.resolveComponent)("upload-tip"),u=(0,t.resolveComponent)("upload-list");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Di,[(0,t.createVNode)(c,(0,t.mergeProps)({class:"cv-upload-file-uploader"},l.handlerAttr,{"file-list":n.localList,"onUpdate:fileList":o[0]||(o[0]=m=>n.localList=m),"before-upload":l.initBeforeUpload,"on-change":l.initOnChange,"on-exceed":e.initOnExceed,"on-error":l.upFileError,"on-success":l.upFileSuccess}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{type:"primary",icon:"ElIconUpload"},{default:(0,t.withCtx)(()=>[...o[1]||(o[1]=[(0,t.createTextVNode)("上传文件",-1)])]),_:1})]),_:1},16,["file-list","before-upload","on-change","on-exceed","on-error","on-success"]),(0,t.createVNode)(d,(0,t.mergeProps)(e.tipAttr,{fileUnit:"个"}),null,16),(0,t.createVNode)(u,{disabled:a.disabled,files:l.list,isCanDelete:a.isCanDelete,isCanDownload:a.isCanDownload,onRemove:l.handleRemove},null,8,["disabled","files","isCanDelete","isCanDownload","onRemove"])])}var ot=f(xi,[["render",Ti]]),Ii={title:"视频上传",name:"cvUploadVideo",mixins:[qt],components:{},props:{modelValue:{type:[String],default:""},initValue:{type:[String],default:""},fileSize:{type:[Number],default:10},fileType:{type:Array,default:["mp4","mp3"]},showSize:{type:Number,default:360},signatureParam:{type:[Object],default:()=>({save_sign:"video"})}},data(){return{localValue:"",localList:"",previewShow:!1,previewTitle:"",previewUrl:"",upAccept:"video/*"}},computed:{localRef(){return"cvUploadVideo"+ +new Date+((Math.random()*1e3).toFixed(0)+"")},handlerAttr(){return{ref:this.localRef,action:"#",accept:this.upAccept,limit:1,multiple:!1,drag:!0,disabled:this.upIngLoading,showFileList:!1}},showUpload(){return!this.localValue},showStyle(){return{width:this.showSize+"px",height:this.showSize/5*3+"px",lineHeight:this.showSize+"px"}}},watch:{modelValue(e){this._init_parse_value()},initValue(e){this._init_parse_list()}},mounted(){this._init_parse_value(),this._init_parse_list()},methods:{_init_parse_value(){this.modelValue?this.localValue=ee(this.modelValue):this.localValue=""},_init_parse_list(){this.initValue?this.localList=lo(this.initValue):this.localList=""},initBeforeUpload(e){return this.upIngLoading=!0,this._commonBeforeUpload(e)?!0:(this.upIngLoading=!1,!1)},async initHttpRequest(e){const{file:o}=e;this.upIngLoading=!0,this.mergeAttrs.upResponseFn,await ro(o,this.mergeAttrs.signatureType||null,this.mergeAttrs.signatureFn||null,this.mergeAttrs.signatureParam||{}).then(a=>{this.$nextTick(()=>{this.$emit("update:modelValue",a.full_path),this.$emit("update:initValue",a.cdn_full_path)}),ExtendMessage.success("上传成功"),this.upIngLoading=!1}).catch(()=>{this.upIngLoading=!1})},handleItemPreview(e,o){this.previewTitle=e.name,this.previewUrl=e.url,this.previewShow=!0},doRemove(e){this.localValue="",this.localList="",this.$emit("update:modelValue",""),this.$emit("update:initValue","")},handleItemRemove(e,o){if(this.beforeRemove&&typeof this.beforeRemove=="function"){const a=this.multiple?this.localValue[o]:this.localValue,r=this.beforeRemove(a,this.localValue);r&&r.then?r.then(()=>{this.doRemove(o)},()=>{}):r!==!1&&this.doRemove(o)}else this.doRemove(o)}}},Li={class:"cv-upload-video"},Fi={class:"cv-upload-list-box el-upload-list el-upload-list--picture-card"},Pi=["tabindex"],Oi=["src"],Mi={class:"el-upload-list__item-status-label"},zi={class:"el-upload-list__item-actions"},Ai=["onClick"],Hi={class:"el-upload-list__item-delete"},ji={class:"el-upload-list__item-delete"},Ri={key:0,style:{width:"500px",height:"300px",margin:"0 auto"}},Ui=["src"];function Wi(e,o,a,r,n,l){const i=(0,t.resolveComponent)("cv-icons"),c=(0,t.resolveComponent)("el-progress"),d=(0,t.resolveComponent)("el-upload"),u=(0,t.resolveComponent)("upload-tip"),m=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Li,[(0,t.createElementVNode)("div",Fi,[n.localList?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(n.localList,(h,g)=>((0,t.openBlock)(),(0,t.createElementBlock)("section",{class:"el-upload-list__item is-success",key:g,tabindex:g,style:(0,t.normalizeStyle)(l.showStyle)},[(0,t.createElementVNode)("video",{class:"el-upload-list__item-thumbnail",autoplay:!1,src:h.url,style:(0,t.normalizeStyle)(l.showStyle)}," 您的浏览器不支持视频播放 ",12,Oi),(0,t.createElementVNode)("label",Mi,[(0,t.createVNode)(i,{type:"ElIconCheck",color:"#ffffff",size:"12"})]),(0,t.createElementVNode)("span",zi,[(0,t.createElementVNode)("span",{class:"el-upload-list__item-preview",onClick:v=>l.handleItemPreview(h)},[(0,t.createVNode)(i,{type:"ElIconVideoPlay",size:"20"})],8,Ai),(0,t.createElementVNode)("span",Hi,[(0,t.createVNode)(i,{type:"ElIconDelete",size:"20",onClick:v=>l.handleItemRemove(h,g)},null,8,["onClick"])]),(0,t.createElementVNode)("span",ji,[(0,t.createVNode)(i,{type:"ElIconEdit",size:"20",onClick:v=>e.handleItemEdit(h,g)},null,8,["onClick"])])])],12,Pi))),128)):(0,t.createCommentVNode)("",!0),l.showUpload?((0,t.openBlock)(),(0,t.createBlock)(d,(0,t.mergeProps)({key:1,class:"cv-upload-handler"},l.handlerAttr,{"before-upload":l.initBeforeUpload,"http-request":l.initHttpRequest,style:l.showStyle}),{default:(0,t.withCtx)(()=>[e.upIngPercent>0?((0,t.openBlock)(),(0,t.createBlock)(c,{key:0,percentage:e.upIngPercent,style:{"margin-top":"20px"},type:"circle"},null,8,["percentage"])):((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"cv-upload-video__ing",style:(0,t.normalizeStyle)(l.showStyle)},[(0,t.createVNode)(i,{type:"ElIconUpload",size:"24"}),o[1]||(o[1]=(0,t.createElementVNode)("div",{class:"el-upload__text"},[(0,t.createTextVNode)(" 将视频拖到此处,或 "),(0,t.createElementVNode)("em",null,"点击上传")],-1))],4))]),_:1},16,["before-upload","http-request","style"])):(0,t.createCommentVNode)("",!0)]),(0,t.createVNode)(u,(0,t.mergeProps)(e.tipAttr,{fileUnit:"个",limit:1}),null,16),(0,t.createVNode)(m,{modelValue:n.previewShow,"onUpdate:modelValue":o[0]||(o[0]=h=>n.previewShow=h),title:n.previewTitle,"append-to-body":""},{default:(0,t.withCtx)(()=>[n.previewShow?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ri,[(0,t.createElementVNode)("video",{autoplay:!0,src:n.previewUrl,controls:"controls",style:{width:"500px",height:"300px"}}," 您的浏览器不支持视频播放 ",8,Ui)])):(0,t.createCommentVNode)("",!0)]),_:1},8,["modelValue","title"])])}var at=f(Ii,[["render",Wi]]),Yi={emits:["get-unlist","on-close","on-update","on-delete"],props:{modelValue:{type:Array,default:()=>[]},model:{type:String,default:""},accept:{type:String,default:""},multiple:{type:Boolean,default:!1}},data(){return{audioInfo:{},file:null,fileList:[],fileHash:"",tempCheckpoint:null,uploadId:"",uploadStatus:null,showAudio:!1,percentage:0,uploadName:"",client:null,year:new Date().getFullYear(),uploadDisabled:!0,resumeDisabled:!0,pauseDisabled:!0,dialogVisible:!1,isDoing:!1,unList:[],fileMap:{},map_max_key:0,partSize:1024*1024,parallel:4,checkpoints:{}}},watch:{dialogVisible:{handler(e){e||(this.fileList=[],this.$refs.upload.uploadFiles=[])}},fileList:{handler(e){if(e.length){this.dialogVisible=!0;let o=[],a=[];e.forEach(r=>{r.raw.name.indexOf(".")===-1&&(r.errMsg="不支持此格式上传"),r.percentage===100?o.push(r):a.push(r)}),o.length===e.length?(this.pauseDisabled=!0,this.isDoing=!0):this.isDoing=!1,this.unList=a}},deep:!0}},mounted(){window.addEventListener("online",this.resumeUpload)},methods:{filterSize:yo,handleExceed(){this.$confirm("上传文件数量不能超过100个,请重新选择!","操作提示",{confirmButtonText:"确 定",cancelButtonText:"取 消",type:"warning"}).then(()=>{this.fileList=[],this.dialogVisible=!1}).catch(()=>{this.fileList=[]})},handleDeleteChangeFile(e){this.fileList.splice(e,1),this.fileList.length||(this.dialogVisible=!1)},fileTypeIcon(e){const{type:o}=e.raw,a=o.indexOf("video")!==-1,r=o.indexOf("image")!==-1,n=o.indexOf("audio")!==-1,l=o.indexOf("zip")!==-1,i=o.indexOf("wordprocessingml")!==-1,c=o.indexOf("pdf")!==-1,d=o.indexOf("text")!==-1,u=o.indexOf("sheet")!==-1;return a?"MP4":r?"JPG1":n?"mp3-1":l?"yasuo":i?"DOCX":c?"wenjianleixing-biaozhuntu-PDFwendang":d?"div-1":u?"excel1":"weizhiwenjian"},handleClose(){this.$emit("on-close"),this.isDoing?this.dialogVisible=!1:this.$confirm("正在上传文件,关闭后上传文件会丢失!是否继续?","操作提示",{confirmButtonText:"确 定",cancelButtonText:"取 消",type:"warning"}).then(()=>{this.$emit("get-unlist"),this.fileList.forEach(e=>{e.client&&e.percentage<100&&e.client.cancel()}),this.dialogVisible=!1}).catch(()=>{})},async handleBeforeUpload(e){},handleStopChangeFile(e,o){o.isPlay=!o.isPlay,this.fileList.splice(e,1,o),o.isPlay?this.resumeMultipartUpload(o):o.client.cancel()},async starUpload(){this.uploadDisabled=!0,this.pauseDisabled=!1,this.multipartUpload()},async multipartUpload(){if(!this.file){k.ElMessage.error("请选择文件");return}this.fileList.forEach(async e=>{e.isLoading=!0,await this.ossUploadHandle(e,this.fileList)})},async resumeUpload(){this.pauseDisabled=!1,this.uploadDisabled=!0,this.resumeDisabled=!0,await this.resumeMultipartUpload()},stopUpload(){this.resumeDisabled=!1,this.pauseDisabled=!0,this.fileList.forEach(e=>{e.client.cancel(),e.isPlay=!1})},async change(e,o){this.fileMap[e]=o,this.map_max_key=e},async handle_network_speed_change(e,o,a){e-this.map_max_key>=1e4&&(this.fileMap={});for(let r=e;r<=o;r++){const n=await this.fileMap[r];n?await this.change(r,n+a):await this.change(r,a)}},handle_network_speed(e,o,a){const r=e.rt/1e3,n=new Date(e.headers.date).getTime(),l=n-r;let i=parseInt(o/r);return a===0&&(i=0),i===0||this.handle_network_speed_change(l,n,i),i?yo(i):0},async resetUpload(e,o){JSON.stringify(e).indexOf("Error")!==-1&&(o.client&&o.client.cancel(),o.client=await _o(this.signatureType,this.apiFunc),await this.resumeMultipartUpload(o))},async resumeMultipartUpload(e){if(e){const{tempCheckpoint:o}=e;this.resumeUploadFile(e,o)}else Object.values(this.checkpoints).forEach(o=>{const{uploadId:a}=o,r=this.fileList.findIndex(l=>l.upload===a),n=this.fileList[r];this.resumeUploadFile(n,o)})},async resumeUploadFile(e,o){const{uploadId:a,file:r,name:n}=o;try{const{raw:l,percentage:i}=e;e.partSize=0,i<100&&l.name.indexOf(".")!==-1&&e.client.multipartUpload(a,r,{parallel:this.parallel,partSize:this.partSize,progress:async(c,d,u)=>{await this.onUploadProgress(e,c,d,u,n)},checkpoint:o}).then(()=>{delete this.checkpoints[o.uploadId],this.$emit("update:modelValue",this.fileList),this.resumeDisabled=!0,this.unList.length&&this.uploadDisabled&&(this.resumeDisabled=!1),this.onCreatePanFile(e)}).catch(async c=>{await this.resetUpload(c,e)})}catch{}},async onUploadProgress(e,o,a,r,n){a&&(this.checkpoints[a.uploadId]=a,e.speed=this.handle_network_speed(r,this.partSize,o),e.tempCheckpoint=a,e.abortCheckpoint=a,e.upload=a.uploadId),e.isPlay=!0,e.isPlay&&(e.isLoading=!1),e.uploadName=n,e.percentage=Number((o*100).toFixed(2))},async ossUploadHandle(e){let o={pass:!0,filePath:""};try{const{raw:a,percentage:r}=e,n=a,l=await _o(this.signatureType,this.apiFunc,{},{secure:!0});if(this.signatureType=="aliyun_oss_type1"){if(e.client=l,e.partSize=0,r<100&&a.name.indexOf(".")!==-1){const i=l.dir+n.name;await e.client.multipartUpload(i,n,{parallel:this.parallel,partSize:this.partSize,progress:async(c,d,u)=>{await this.onUploadProgress(e,c,d,u,i)}}).then(()=>{this.$emit("upload:modelValue",this.fileList),this.resumeDisabled=!0,this.onCreatePanFile(e),this.unList.length&&this.uploadDisabled&&(this.resumeDisabled=!1)}).catch(async c=>{})}}else this.signatureType=="aliyun_oss_type2"&&qo(n,l)}catch(a){o={...a,pass:!1,filePath:""}}return o},getToday(){const e=new Date;return`${e.getFullYear()}${e.getMonth()+1}${e.getDate()}${e.getHours()}${e.getMinutes()}${e.getSeconds()}`},handleChange(e,o){o.forEach(a=>{a.client=null,a.isPlay=!1,a.isLoading=!1,a.abortCheckpoint=!1}),this.fileList=o,this.file=e.raw,this.uploadDisabled=!1,this.pauseDisabled=this.resumeDisabled=!0},handleDeleteFile(e){const o=e.indexOf(this.model),a=e.substring(o,e.length);this.$emit("on-delete"),this.fileList=[],k.ElMessage.success("删除成功")},async onCreatePanFile(e){let o=await this.getParams(e);this.$emit("on-update")},handleMediaRes(e){return{image:async function(o){return new Promise(a=>{var r=new FileReader;r.onload=function(n){var l=n.target.result,i=new Image;i.onload=function(){a({Width:this.width,Height:this.height})},i.src=l},r.readAsDataURL(o)})},audio:async function(o){return new Promise(a=>{var r=new FileReader;r.onload=function(n){var l=n.target.result,i=new Audio;i.onloadeddata=function(){const c=i.duration;a({Duration:c*1e3})},i.src=l},r.readAsDataURL(o)})},video:async function(o){return new Promise(a=>{var r=URL.createObjectURL(o);const n=document.createElement("video");n.src=r,n.onloadeddata=function(){a({CoverImg:"",Duration:this.duration*1e3,Width:this.videoWidth,Height:this.videoHeight})}})}}[e]},captureImage(e,o){return o=o||"3000 ",e+"?x-oss-process=video/snapshot,t_"+o+",f_jpg"},async getParams(e){const{type:o}=e.raw,a=o.indexOf("video")!==-1,r=o.indexOf("image")!==-1,n=o.indexOf("audio")!==-1;let l="";a?l="video":r?o.indexOf("adobe")===-1&&(l="image"):n&&(l="audio");let i;return(a||r||n)&&l&&(i=await this.handleMediaRes(l)(e.raw)),{ResTitle:e.name,ResDescribe:"",OssKey:e.uploadName,ContentType:o||"application/octet-stream",ContentLength:e.size,...i}}}},qi={name:"cvUploadOss",mixins:[Yi]},Xi={class:"oss-upload"},Ki={class:"cv-upload-task-hd-title"},Gi={class:"cv-upload-task-hd-num"},Zi={class:"cv-upload-task-opts"},Qi={class:"cv-upload-task-lists"},Ji={class:"cv-upload-task-item-name"},es={class:"name"},ts={class:"file-name-item"},os={key:0,class:"speed"},as={key:1,class:"speed"},ns={key:2,class:"success"},ls={class:"total"},rs={key:0,class:"name error"},is={class:"cv-upload-task-item-tool"},ss=["onClick"],cs=["onClick"];function ds(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-button"),c=(0,t.resolveComponent)("el-upload"),d=(0,t.resolveComponent)("el-progress"),u=(0,t.resolveComponent)("cv-icons"),m=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Xi,[(0,t.createVNode)(c,{ref:"upload",action:"","show-file-list":!1,multiple:"","on-change":e.handleChange,"before-upload":e.handleBeforeUpload,"auto-upload":!1,limit:100,"on-exceed":e.handleExceed,accept:e.accept},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{type:"primary",icon:"ElIconUpload",round:""},{default:(0,t.withCtx)(()=>[...o[1]||(o[1]=[(0,t.createTextVNode)("上 传",-1)])]),_:1})]),_:1},8,["on-change","before-upload","on-exceed","accept"]),(0,t.createVNode)(m,{modelValue:e.dialogVisible,"onUpdate:modelValue":o[0]||(o[0]=h=>e.dialogVisible=h),width:"650px",height:"500","destroy-on-close":"","close-on-click-modal":!1,"before-close":e.handleClose,style:{height:"500px"}},{header:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Ki,[o[2]||(o[2]=(0,t.createElementVNode)("span",null,"上传",-1)),(0,t.createElementVNode)("span",Gi,(0,t.toDisplayString)(e.fileList.length-e.unList.length)+"/"+(0,t.toDisplayString)(e.fileList.length),1)])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Zi,[(0,t.createVNode)(i,{type:"primary",icon:"ElIconVideoPlay",disabled:e.uploadDisabled,onClick:e.starUpload},{default:(0,t.withCtx)(()=>[...o[3]||(o[3]=[(0,t.createTextVNode)("开始上传",-1)])]),_:1},8,["disabled","onClick"]),(0,t.createVNode)(i,{type:"success",icon:"ElIconRefreshRight",disabled:e.resumeDisabled,onClick:e.resumeUpload},{default:(0,t.withCtx)(()=>[...o[4]||(o[4]=[(0,t.createTextVNode)("继续",-1)])]),_:1},8,["disabled","onClick"]),(0,t.createVNode)(i,{type:"danger",icon:"ElIconVideoPause",disabled:e.pauseDisabled,onClick:e.stopUpload},{default:(0,t.withCtx)(()=>[...o[5]||(o[5]=[(0,t.createTextVNode)("暂停",-1)])]),_:1},8,["disabled","onClick"])]),(0,t.createElementVNode)("div",Qi,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.fileList,(h,g)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-upload-task-item-box",key:g},[(0,t.createElementVNode)("div",Ji,[(0,t.createElementVNode)("div",es,[(0,t.createElementVNode)("span",ts,(0,t.toDisplayString)(g+1)+"."+(0,t.toDisplayString)(h.name),1),h.isLoading&&!h.isPlay?((0,t.openBlock)(),(0,t.createElementBlock)("span",os,"准备就绪")):(0,t.createCommentVNode)("",!0),h.isPlay&&h.percentage!==100?((0,t.openBlock)(),(0,t.createElementBlock)("span",as,(0,t.toDisplayString)(h.speed)+"/s",1)):(0,t.createCommentVNode)("",!0),h.percentage===100?((0,t.openBlock)(),(0,t.createElementBlock)("span",ns,"完成")):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",ls,(0,t.toDisplayString)(e.filterSize(h.size)),1)]),h.errMsg?((0,t.openBlock)(),(0,t.createElementBlock)("span",rs,(0,t.toDisplayString)(h.errMsg),1)):(0,t.createCommentVNode)("",!0),h.percentage<100&&!h.errMsg?((0,t.openBlock)(),(0,t.createBlock)(d,{key:1,percentage:h.percentage},null,8,["percentage"])):((0,t.openBlock)(),(0,t.createBlock)(d,{key:2,percentage:h.percentage,status:h.errMsg?"exception":"success"},null,8,["percentage","status"]))]),(0,t.createElementVNode)("div",is,[!h.percentage||0<h.percentage<100&&!h.isPlay?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:0,class:"icon delete",onClick:v=>e.handleDeleteChangeFile(g)},[(0,t.createVNode)(u,{type:"ElIconClose"})],8,ss)):(0,t.createCommentVNode)("",!0),h.percentage&&h.percentage!==100?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:1,class:(0,t.normalizeClass)(["icon",h.isPlay?"delete":"success"]),onClick:v=>e.handleStopChangeFile(g,h)},[h.isPlay?((0,t.openBlock)(),(0,t.createBlock)(u,{key:0,type:"ElIconVideoPause"})):((0,t.openBlock)(),(0,t.createBlock)(u,{key:1,type:"ElIconCaretRight"}))],10,cs)):(0,t.createCommentVNode)("",!0)])]))),128))])]),_:1},8,["modelValue","before-close"])])}var nt=f(qi,[["render",ds],["__scopeId","data-v-9c3ea43c"]]);et.install=function(e){e.component(et.name,et)};tt.install=function(e){e.component(tt.name,tt)};ot.install=function(e){e.component(ot.name,ot)};at.install=function(e){e.component(at.name,at)};nt.install=function(e){e.component(nt.name,nt)};var us={name:"cvTabsJump",props:{tabPosition:{type:String,default:"top"}},provide(){return{addChildComponents:e=>{this.childComponents.push(e)},clearChildClass:()=>{this.childComponents.map(e=>{e.className=null})}}},data(){return{childComponents:[]}},computed:{tabPositionClass(){return this.tabPosition=="left"?"left":this.tabPosition=="right"?"right":this.tabPosition=="bottom"?"bottom":"top"}},created(){},mounted(){}},ps={class:"tabs-header"};function ms(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["cv-tabs-jump",l.tabPositionClass])},[(0,t.createElementVNode)("div",ps,[(0,t.renderSlot)(e.$slots,"default")])],2)}var lt=f(us,[["render",ms]]),hs={name:"cvTabPane",emits:["click"],inject:["addChildComponents","clearChildClass"],data(){return{isshow:!0,className:null}},props:{label:{type:String,default:""},current:{type:Boolean,default:!1},name:{type:String}},mounted(){this.addChildComponents(this),this.initCurrent()},methods:{initCurrent(){this.current&&this.handleClick()},handleClick(){this.clearChildClass(),this.className="active",this.$emit("click")}}},gs={key:1};function fs(e,o,a,r,n,l){return(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["cv-tab-pane",n.className]),onClick:o[0]||(o[0]=(...i)=>l.handleClick&&l.handleClick(...i))},[e.$slots.label?(0,t.renderSlot)(e.$slots,"label",{key:0}):((0,t.openBlock)(),(0,t.createElementBlock)("span",gs,(0,t.toDisplayString)(a.label),1))],2)),[[t.vShow,n.isshow]])}var rt=f(hs,[["render",fs]]);lt.install=function(e){e.component(lt.name,lt)};rt.install=function(e){e.component(rt.name,rt)};var vs={name:"cvDrawCaptcha",props:{modelValue:{type:[String,Number],default:"1234"},baseCode:{type:String,default:"1234567890ABCDEFGHGKMNPQRSTUVWXY"},fontSizeMin:{type:Number,default:25},fontSizeMax:{type:Number,default:30},backgroundColorMin:{type:Number,default:255},backgroundColorMax:{type:Number,default:255},colorMin:{type:Number,default:0},colorMax:{type:Number,default:160},lineColorMin:{type:Number,default:100},lineColorMax:{type:Number,default:255},dotColorMin:{type:Number,default:0},dotColorMax:{type:Number,default:255},contentWidth:{type:Number,default:112},contentHeight:{type:Number,default:31},refreshNum:{type:Number,default:1}},data(){return{localCode:""}},watch:{modelValue(e){this.localCode=e,this.drawPic()},refreshNum(){this.refreshCode(),this.drawPic()}},mounted(){this.modelValue==""&&(this.refreshCode(),this.drawPic())},created(){this.localCode=this.modelValue},methods:{refreshCode(){this.localCode="",this.makeCode(this.baseCode,4),this.$emit("update:modelValue",this.localCode)},makeCode(e,o){for(let a=0;a<o;a++)this.localCode+=this.baseCode[this.randomNum(0,this.baseCode.length)]},randomNum(e,o){return Math.floor(Math.random()*(o-e)+e)},randomColor(e,o){let a=this.randomNum(e,o),r=this.randomNum(e,o),n=this.randomNum(e,o);return"rgb("+a+","+r+","+n+")"},drawPic(){let e=document.getElementById("cv-draw-captcha").getContext("2d");e.textBaseline="bottom",e.fillStyle=this.randomColor(this.backgroundColorMin,this.backgroundColorMax),e.fillRect(0,0,this.contentWidth,this.contentHeight);for(let o=0;o<this.localCode.length;o++)this.drawText(e,this.localCode[o],o);this.drawLine(e),this.drawDot(e)},drawText(e,o,a){e.fillStyle=this.randomColor(this.colorMin,this.colorMax),e.font=this.randomNum(this.fontSizeMin,this.fontSizeMax)+"px SimHei";let r=(a+1)*(this.contentWidth/(this.localCode.length+1)),n=this.randomNum(this.fontSizeMax,this.contentHeight-5);var l=this.randomNum(-45,45);e.translate(r,n),e.rotate(l*Math.PI/180),e.fillText(o,0,0),e.rotate(-l*Math.PI/180),e.translate(-r,-n)},drawLine(e){for(let o=0;o<5;o++)e.strokeStyle=this.randomColor(this.lineColorMin,this.lineColorMax),e.beginPath(),e.moveTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),e.lineTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),e.stroke()},drawDot(e){for(let o=0;o<80;o++)e.fillStyle=this.randomColor(0,255),e.beginPath(),e.arc(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight),1,0,2*Math.PI),e.fill()}}},Cs={class:"cv-draw-captcha"},ks=["width","height"];function bs(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Cs,[(0,t.createElementVNode)("canvas",{id:"cv-draw-captcha",width:a.contentWidth,height:a.contentHeight,onClick:o[0]||(o[0]=(...i)=>l.refreshCode&&l.refreshCode(...i))},null,8,ks)])}var it=f(vs,[["render",bs]]),ys={name:"cvDrawQrcode",data(){return{}}};function ws(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,"二维码")}var st=f(ys,[["render",ws]]);it.install=function(e){e.component(it.name,it)};st.install=function(e){e.component(st.name,st)};var _s={name:"cvTagBase",mixins:[],components:{},emits:["update:modelValue","exceed-max-length"],props:{...k.ElTag.props,modelValue:{type:[Array,String],default:()=>[]},closable:{type:Boolean,default:!1},disableTransitions:{type:Boolean,default:!1},effect:{type:String,default:"light"},color:{type:String,default:""},hit:{type:Boolean,default:!1},type:{type:[String],default:"primary"},size:{type:[String],default:"large"},disabled:{type:Boolean,default:!1},maxlength:{type:Number,default:3,validator:e=>e>0}},watch:{modelValue(e){this._init_parse_value()},localVal(e){this._parse_last()}},data(){return{localVal:""}},mounted(){this._init_parse_value()},methods:{_init_parse_value(){if(this.modelValue)if(typeof this.modelValue=="string"&&this.modelValue.includes(",")){const e=String(this.modelValue).split(",").map(o=>o.trim());this.localVal=ee(e)}else this.localVal=ee(this.modelValue)},_parse_last(){let e=this.localVal,o=e.join(",");this.$emit("update:modelValue",o),e.length>=this.maxlength&&this.$emit("exceed-max-length",e.length)},addTag(){this.disabled||this.localVal.length>=this.maxlength||(this.localVal.push("新标签"),this.$nextTick(()=>{let e=this.localVal.length,o=this.$refs[`newTag${e-1}`][0],a=document.createRange();a.selectNodeContents(o),window.getSelection().removeAllRanges(),window.getSelection().addRange(a),this._parse_last()}))},checkTag(e){if(this.disabled)return;let o=this.$refs[`newTag${e}`][0].innerText.trim();o.length==0?this.localVal.pop():this.localVal[e]=o,this._parse_last()},removeTag(e){this.disabled||(this.localVal.splice(e,1),this._parse_last())}}},Vs={class:"cv-tag-base"},Ss=["contenteditable","onKeyup","onBlur"],Bs={key:1,class:"cv-tag-maxlength-hint"};function Ns(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-tag"),c=(0,t.resolveComponent)("cv-icons");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Vs,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.localVal,(d,u)=>((0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({class:"cv-tag-content"},{ref_for:!0},{closable:!a.disabled&&a.closable,disableTransitions:a.disableTransitions,effect:a.effect,type:a.type,color:a.color,hit:a.hit,size:a.size},{key:u,onClose:m=>l.removeTag(u),disabled:a.disabled}),{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",{class:"cv-tag-item",contenteditable:!a.disabled&&"plaintext-only",ref_for:!0,ref:`newTag${u}`,onKeyup:(0,t.withKeys)(m=>!a.disabled&&l.checkTag(u),["enter"]),onBlur:m=>!a.disabled&&l.checkTag(u)},(0,t.toDisplayString)(d),41,Ss)]),_:2},1040,["onClose","disabled"]))),128)),!a.disabled&&n.localVal.length<a.maxlength?((0,t.openBlock)(),(0,t.createBlock)(c,{key:0,type:"ElIconCirclePlus",size:"20",onClick:o[0]||(o[0]=d=>l.addTag())})):(0,t.createCommentVNode)("",!0),!a.disabled&&n.localVal.length>=a.maxlength?((0,t.openBlock)(),(0,t.createElementBlock)("span",Bs,"已达到最大数量 ("+(0,t.toDisplayString)(a.maxlength)+")",1)):(0,t.createCommentVNode)("",!0)])}var ct=f(_s,[["render",Ns]]);ct.install=function(e){e.component(ct.name,ct)};var Es={name:"cvTransferTable",props:{modelValue:{type:[Array],default(){return[]}},showQuery:{type:Boolean,default:!1},showPagination:{type:Boolean,default:!1},paginationCallBack:{type:Function,default:function(){return new Promise((e,o)=>{try{e({total:0,data:null})}catch{o()}})}},titleTexts:{type:Array,default(){return["待选项","已选项"]}},buttonTexts:{type:Array,default(){return[]}},queryTexts:{type:Array,default(){return["查询","筛选"]}},leftColumns:{type:Array,default(){return[]}},rightColumns:{type:Array,default(){}},minHeight:{type:String,default:"300px"},maxHeight:{type:String,default:"500px"},tableRowKey:{type:Function,default(e){return e&&e&&e.id}}},data(){return{leftTableData:[],rightTableData:[],pageIndex:1,pageSize:20,totalSize:0,leftSelection:[],rightSelection:[],leftQueryCondition:{},rightQueryCondition:{},rightConditionTemp:void 0}},watch:{modelValue(e){this.rightTableData=e}},created(){this.rightTableData=this.modelValue,this.handlePaginationCallBack()},computed:{hasButtonTexts(){return this.buttonTexts.length===2},buttonClasses(){return["transfer-button",{"is-with-texts":this.hasButtonTexts}]},disabledLeftButton(){return!this.leftSelection.some(e=>!this.rightTableData.some(o=>this.checkObjectIsEqual(e,o)))},calcRightTableData(){if(this.showQuery&&this.rightConditionTemp){const e=Object.keys(this.rightConditionTemp);return this.rightTableData.filter(o=>e.some(a=>{const r=o[a],n=this.rightConditionTemp[a].trim();return r?String(r).indexOf(n)>-1:!0}))}return this.rightTableData}},methods:{handleLeftSelectionChange(e){this.leftSelection=e},handleRightSelectionChange(e){this.rightSelection=e},handleLeftRowClick(e){this.rightTableData.some(o=>this.checkObjectIsEqual(o,e))||this.$refs.leftTable.toggleRowSelection(e)},handleRightRowClick(e){this.$refs.rightTable.toggleRowSelection(e)},handleSizeChange(e){this.pageSize=e,this.handlePaginationCallBack()},handleCurrentChange(e){this.pageIndex=e,this.handlePaginationCallBack()},handlePaginationCallBack(){if(this.showPagination&&this.paginationCallBack){const e={pageIndex:this.pageIndex,pageSize:this.pageSize,...this.leftQueryCondition};this.paginationCallBack.call(null,e).then(o=>{o&&Array.isArray(o.data)&&(this.leftTableData=o.data,this.totalSize=o.total),this.$nextTick(()=>{this.leftTableData.forEach(a=>{const r=this.rightTableData.some(n=>this.checkObjectIsEqual(n,a));this.$refs.leftTable.toggleRowSelection(a,r)})})})}},handleRowStyle({row:e}){return this.rightTableData.some(o=>this.checkObjectIsEqual(o,e))?{color:"blue"}:{}},handleSelectable(e){return!this.rightTableData.some(o=>this.checkObjectIsEqual(o,e))},addToRight(){for(const e of this.leftSelection)this.rightTableData.some(o=>this.checkObjectIsEqual(o,e))||this.rightTableData.push(e);this.$emit("update:modelValue",this.rightTableData)},addToLeft(){this.rightSelection.forEach(e=>{const o=this.rightTableData.findIndex(a=>this.checkObjectIsEqual(a,e));if(o!==-1){this.rightTableData.splice(o,1);const a=this.leftTableData.find(r=>this.checkObjectIsEqual(r,e));a&&this.$refs.leftTable.toggleRowSelection(a,!1)}}),this.$emit("update:modelValue",this.rightTableData)},onLeftQuerySubmit(){this.handlePaginationCallBack()},onRightQuerySubmit(){this.rightConditionTemp=JSON.parse(JSON.stringify(this.rightQueryCondition))},checkObjectIsEqual(e,o){return this.tableRowKey(e)===this.tableRowKey(o)},clear(){this.rightTableData=[],this.$refs.leftTable.clearSelection();for(const e in this.leftQueryCondition)this.leftQueryCondition[e]=void 0;for(const e in this.rightQueryCondition)this.rightQueryCondition[e]=void 0;this.pageIndex=1,this.handlePaginationCallBack()}}},$s={class:"cv-transfer-table"},xs={class:"transfer-panel"},Ds={class:"transfer-panel-header"},Ts={key:0},Is={style:{padding:"5px"}},Ls={class:"transfer-buttons"},Fs={key:0,class:"button-text"},Ps={key:0,class:"button-text"},Os={class:"transfer-panel"},Ms={class:"transfer-panel-header"},zs={key:0},As={style:{padding:"5px"}};function Hs(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-button"),c=(0,t.resolveComponent)("el-form-item"),d=(0,t.resolveComponent)("el-form"),u=(0,t.resolveComponent)("el-table-column"),m=(0,t.resolveComponent)("el-table"),h=(0,t.resolveComponent)("el-pagination"),g=(0,t.resolveComponent)("cv-icons");return(0,t.openBlock)(),(0,t.createElementBlock)("div",$s,[(0,t.createElementVNode)("div",xs,[(0,t.createElementVNode)("p",Ds,[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(a.titleTexts&&a.titleTexts[0]),1),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(n.leftSelection.length)+"/"+(0,t.toDisplayString)(n.leftTableData.length),1)]),a.showQuery?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ts,[(0,t.createVNode)(d,{inline:!0,model:n.leftQueryCondition,class:"cv-transfer-form"},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"leftCondition",{scope:n.leftQueryCondition}),(0,t.createVNode)(c,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{type:"primary",onClick:o[0]||(o[0]=v=>l.onLeftQuerySubmit())},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(a.queryTexts[0]),1)]),_:1})]),_:1})]),_:3},8,["model"])])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(m,{ref:"leftTable","max-height":a.maxHeight,height:a.minHeight,data:n.leftTableData,"row-key":a.tableRowKey,"row-style":l.handleRowStyle,onRowClick:l.handleLeftRowClick,onSelectionChange:l.handleLeftSelectionChange,border:"",stripe:""},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(u,{width:"40px",type:"selection",selectable:l.handleSelectable},null,8,["selectable"]),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.leftColumns,v=>((0,t.openBlock)(),(0,t.createBlock)(u,{prop:v.id,key:v.id,label:v.label,width:v.width},{default:(0,t.withCtx)(C=>[(0,t.renderSlot)(e.$slots,"default",{scope:{row:C.row,col:v}},()=>[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(C.row[v.id]),1)])]),_:2},1032,["prop","label","width"]))),128))]),_:3},8,["max-height","height","data","row-key","row-style","onRowClick","onSelectionChange"]),(0,t.createElementVNode)("div",Is,[a.showPagination?((0,t.openBlock)(),(0,t.createBlock)(h,{key:0,onSizeChange:l.handleSizeChange,onCurrentChange:l.handleCurrentChange,"current-page":n.pageIndex,"page-sizes":[10,20,50,100],"page-size":n.pageSize,"pager-count":5,total:n.totalSize,layout:"total, sizes, prev, pager, next"},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])):(0,t.createCommentVNode)("",!0)])]),(0,t.createElementVNode)("div",Ls,[(0,t.createVNode)(i,{type:"primary",class:(0,t.normalizeClass)(l.buttonClasses),disabled:l.disabledLeftButton,onClick:l.addToRight},{default:(0,t.withCtx)(()=>[a.buttonTexts[0]!==void 0?((0,t.openBlock)(),(0,t.createElementBlock)("span",Fs,(0,t.toDisplayString)(a.buttonTexts[0]),1)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(g,{type:"ElIconArrowRight"})]),_:1},8,["class","disabled","onClick"]),(0,t.createVNode)(i,{type:"primary",class:(0,t.normalizeClass)(l.buttonClasses),disabled:n.rightSelection.length===0,onClick:l.addToLeft},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(g,{type:"ElIconArrowLeft"}),a.buttonTexts[1]!==void 0?((0,t.openBlock)(),(0,t.createElementBlock)("span",Ps,(0,t.toDisplayString)(a.buttonTexts[1]),1)):(0,t.createCommentVNode)("",!0)]),_:1},8,["class","disabled","onClick"])]),(0,t.createElementVNode)("div",Os,[(0,t.createElementVNode)("p",Ms,[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(a.titleTexts&&a.titleTexts[1]),1),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(n.rightSelection.length)+"/"+(0,t.toDisplayString)(n.rightTableData.length),1)]),a.showQuery?((0,t.openBlock)(),(0,t.createElementBlock)("div",zs,[(0,t.createVNode)(d,{inline:!0,model:n.rightQueryCondition,class:"cv-transfer-form"},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"rightCondition",{scope:n.rightQueryCondition}),(0,t.createVNode)(c,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{type:"primary",onClick:o[1]||(o[1]=v=>l.onRightQuerySubmit())},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(a.queryTexts[1]),1)]),_:1})]),_:1})]),_:3},8,["model"])])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(m,{ref:"rightTable","max-height":a.maxHeight,height:a.minHeight,data:l.calcRightTableData,"row-key":a.tableRowKey,onRowClick:l.handleRightRowClick,onSelectionChange:l.handleRightSelectionChange,border:"",stripe:""},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(u,{width:"40px",type:"selection"}),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.rightColumns||a.leftColumns,v=>((0,t.openBlock)(),(0,t.createBlock)(u,{prop:v.id,key:v.id,label:v.label,width:v.width},{default:(0,t.withCtx)(C=>[(0,t.renderSlot)(e.$slots,"default",{scope:{row:C.row,col:v}},()=>[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(C.row[v.id]),1)])]),_:2},1032,["prop","label","width"]))),128))]),_:3},8,["max-height","height","data","row-key","onRowClick","onSelectionChange"]),(0,t.createElementVNode)("div",As,[a.showPagination?((0,t.openBlock)(),(0,t.createBlock)(h,{key:0,total:n.rightTableData.length,layout:"total"},null,8,["total"])):(0,t.createCommentVNode)("",!0)])])])}var dt=f(Es,[["render",Hs]]);dt.install=function(e){e.component(dt.name,dt)};var io={provide(){return{pageCurr:this.loadConfigSetting.pageCurr||1,pageLimit:this.loadConfigSetting.pageLimit||10}},props:{...k.ElTable.props,modelValue:{type:[Array,Object],default(){return[]}},headerCellStyle:{type:[Function,Object],default:()=>({})}},data(){return{loadDataList:[]}},watch:{modelValue(e){this.loadDataList=e},loadDataList(e){this.$emit("update:modelValue",e)}},created(){this.loadDataList=this.modelValue},methods:{_getPageCurr(){return this.loadPageCurr},_getPageSize(){return this.loadPageLimit},handleCurrentChange(e){this.loadPageCurr=e,this.getData()},handleSizeChange(e){this.loadPageLimit=e,this.getData()}}},js={name:"cvTableBase",mixins:[Wt,io],props:{align:{type:String,default:"left"},showPagebreak:{type:[Boolean,String],default:!0},tablePagin:{type:Object,default(){return{}}},tableConfig:{type:Object,default(){return{}}},tableRefresh:{type:Number,default(){return 0}}},data(){return{paginationGroup:[10,20,30,50,100,200],paginationCount:7,searchData:{},tableConfDef:{}}},watch:{tableRefresh(e,o){this.initConfAll(),this.refresh()}},updated(){},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(e){this.$emit("selection-change",e)},initConfAll(){let e={};Object.assign(e,this.loadConfigDef,this.tableConfDef,this.tableConfig),this.loadPageCurr=e.pageCurr||1,this.loadPageLimit=e.pageLimit||this.paginationGroup[0],Object.assign(e.where,this.searchData),this.loadConfigSetting=e},searchSubmit(e){if(this.searchData=e||{},this.loadConfigSetting.isSkip){({...this.searchData});return}this.page=1,this.getData()},searchReset(e){e={},this.searchData={},this.page=1,this.getData()},refresh(e){this.getData()}}},Rs={class:"cv-table-list"},Us={key:0,class:"cv-tablie-list-page page"};function Ws(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-table"),c=(0,t.resolveComponent)("cv-icons"),d=(0,t.resolveComponent)("el-button"),u=(0,t.resolveComponent)("el-pagination"),m=(0,t.resolveDirective)("loading");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Rs,[(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{data:e.loadDataList,style:{width:"100%"},onSelectionChange:l.handleSelectionChange}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16,["data","onSelectionChange"])),[[m,e.loadDataLoading]]),a.showPagebreak?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",Us,[(0,t.createVNode)(d,{onClick:l.refresh,style:{float:"left",margin:"0 10px 0 0",padding:"5px 10px"}},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{type:"ElIconRefresh",size:"14"})]),_:1},8,["onClick"]),(0,t.createVNode)(u,{background:"",onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange,"pager-count":n.paginationCount,"page-sizes":n.paginationGroup,"current-page":e.loadPageCurr,"page-size":e.loadPageLimit,layout:"total, sizes, prev, pager, next, jumper",total:e.loadDataTotal},null,8,["onSizeChange","onCurrentChange","pager-count","page-sizes","current-page","page-size","total"])],512)),[[t.vShow,e.loadDataLoading===!1]]):(0,t.createCommentVNode)("",!0)])}var ut=f(js,[["render",Ws]]),Ys={name:"cvTableTree",mixins:[Wt,io],props:{tableConfig:{type:Object,default(){return{}}},tableRefresh:{type:Number,default(){return 0}}},data(){return{searchData:{},tableConfDef:{tablePrimary:"",childName:"children"},pager_count:7,page:1}},watch:{tableRefresh(e,o){this.refresh()}},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(e){this.$emit("selection-change",e)},initConfAll(){let e={};Object.assign(e,this.loadConfigDef,this.tableConfDef,this.tableConfig),Object.assign(e.where,this.searchData),this.loadConfigSetting=e},searchSubmit(e){if(this.searchData=e||{},this.loadConfigSetting.isSkip){({...this.searchData});return}this.page=1,this.getData()},searchReset(e){e={},this.searchData={},this.page=1,this.getData()},refresh(e){this.getData()}}},qs={class:"cv-table-tree"};function Xs(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-table"),c=(0,t.resolveDirective)("loading");return(0,t.openBlock)(),(0,t.createElementBlock)("div",qs,[(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{data:e.loadDataList,style:{width:"100%"},onSelectionChange:l.handleSelectionChange,"row-key":e.loadConfigSetting.tablePrimary,"tree-props":{children:e.loadConfigSetting.childName,hasChildren:"hasChildren"}}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16,["data","onSelectionChange","row-key","tree-props"])),[[c,e.loadDataLoading]])])}var pt=f(Ys,[["render",Xs]]),Ks={name:"cvTableEditor",mixins:[Wt,io],props:{border:{type:[Boolean],default:!0},tableConfig:{type:[Array,Object],default(){return{}}}},data(){return{mergeRules:{},apiFunc:null,tableConfDef:{},cell_click_index:null,cell_click_label:""}},watch:{},created(){this.loadConfigSetting=Object.assign({},this.tableConfDef,this.tableConfig)},mounted(){},methods:{cell_click(e,o,a,r){switch(this.cell_click_index=e.index,this.cell_click_label=o.label,o.label){case"taskid":this.cell_click_index=e.index,this.cell_click_label=o.label;break;case"taskname":this.cell_click_index=e.index,this.cell_click_label=o.label;break;default:return}},handleChangeTData(e){}}},Gs={class:"cv-table-editor"};function Zs(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-table"),c=(0,t.resolveDirective)("loading");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Gs,[(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{data:e.loadDataList,style:{width:"100%"},"row-class-name":"cv-tbed-tr"}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16,["data"])),[[c,e.loadDataLoading]])])}var mt=f(Ks,[["render",Zs]]),Qs={name:"cvTbColumnIndex",inject:{pageCurr:{default:1},pageLimit:{default:10}},props:{...k.ElTableColumn.props,fixed:{type:[String],default:"left"},align:{type:String,default:"center"},width:{type:[String,Number],default:55},continuity:{type:[Boolean,String],default:!1}},data(){return{}},created(){},methods:{indexMethod(e){return this.continuity&&this.pageCurr&&this.pageLimit?e+1+(this.pageCurr-1)*this.pageLimit:e+1}}};function Js(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{type:"index",index:l.indexMethod}),null,16,["index"])}var ht=f(Qs,[["render",Js]]),ec={name:"cvTbColumnCheck",props:{...k.ElTableColumn.props,fixed:{type:[String],default:"left"},align:{type:[String],default:"center"},width:{type:[String,Number],default:55}},data(){return{}},created(){}};function tc(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{type:"selection"}),null,16)}var gt=f(ec,[["render",tc]]),oc={name:"cvTbColumnText",props:{...k.ElTableColumn.props},data(){return{}},created(){},methods:{getContentText(e){let o=e.row[this.prop];return this.formatter&&(o=this.formatter(e.row,e.column)),o}}},ac={style:{display:"contents"}};function nc(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(c=>[(0,t.createElementVNode)("div",ac,(0,t.toDisplayString)(c.row[e.prop]),1)]),_:1},16)}var ft=f(oc,[["render",nc]]),lc={name:"cvTbColumnImg",props:{...k.ElTableColumn.props,imgWidth:{type:[String,Number],default:null},imgHeight:{type:[String,Number],default:null}},data(){return{localImgWidth:"50px",localImgHeight:"50px",localImgArr:[],localImgOne:""}},created(){this.imgWidth&&(this.localImgWidth=this.imgWidth.indexOf("px")!==-1?this.imgWidth:this.imgWidth+"px"),this.imgHeight&&(this.localImgHeight=this.imgHeight.indexOf("px")!==-1?this.imgHeight:this.imgHeight+"px")},methods:{handleImgOne(e){let o=e[this.prop]||null;if(o){if(Object.prototype.toString.call(o)==="[object Array]")return o[0];if(Object.prototype.toString.call(o)==="[object String]")return o}},handleImgArr(e){let o=e[this.prop]||null;if(o){if(Object.prototype.toString.call(o)==="[object Array]")return o;if(Object.prototype.toString.call(o)==="[object String]")return[o]}},handleImgLeng(e){let o=e[this.prop]||null;if(o){if(Object.prototype.toString.call(o)==="[object Array]")return o.length;if(Object.prototype.toString.call(o)==="[object String]")return 1}else return 0}}},rc={key:0,class:"cv-table-column-img-mark"},ic={class:"cv-table-column-img-text"};function sc(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-image"),c=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(c,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(d=>[(0,t.createElementVNode)("div",{class:"cv-table-column-img-box",style:(0,t.normalizeStyle)({width:n.localImgWidth,height:n.localImgHeight})},[(0,t.createVNode)(i,{style:(0,t.normalizeStyle)({width:n.localImgWidth,height:n.localImgHeight}),fit:"scale-down",lazy:"",src:l.handleImgOne(d.row),"preview-src-list":l.handleImgArr(d.row),"preview-teleported":!0},{error:(0,t.withCtx)(()=>[...o[0]||(o[0]=[(0,t.createElementVNode)("span",{class:"el-image__error cv-table-column-img-err"},[(0,t.createTextVNode)(" 暂无 "),(0,t.createElementVNode)("br"),(0,t.createTextVNode)(" 图片 ")],-1)])]),_:1},8,["style","src","preview-src-list"]),l.handleImgLeng(d.row)>1?((0,t.openBlock)(),(0,t.createElementBlock)("p",rc,[(0,t.createElementVNode)("span",ic,(0,t.toDisplayString)(l.handleImgLeng(d.row))+"张",1)])):(0,t.createCommentVNode)("",!0)],4)]),_:1},16)}var vt=f(lc,[["render",sc]]),cc={name:"cvTbColumnOpt",props:{...k.ElTableColumn.props,fixed:{type:[String],default:"right"},label:{type:[String],default:"操作"}},data(){return{}},created(){}};function dc(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(c=>[(0,t.renderSlot)(e.$slots,"default",(0,t.normalizeProps)((0,t.guardReactiveProps)({row:c.row,$index:c.$index,scope:c})))]),_:3},16)}var Ct=f(cc,[["render",dc]]),uc={name:"cvTbColumnBase",props:{...k.ElTableColumn.props,width:{type:[String,Number],default:""}},data(){return{}},created(){}};function pc(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(c=>[(0,t.renderSlot)(e.$slots,"default",(0,t.normalizeProps)((0,t.guardReactiveProps)({row:c.row,$index:c.$index,scope:c})))]),_:3},16)}var kt=f(uc,[["render",pc]]),mc={name:"cvTbColumnExpand",props:{...k.ElTableColumn.props},data(){return{}},created(){}};function hc(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)(e.$props,{type:"expand"}),{default:(0,t.withCtx)(c=>[(0,t.renderSlot)(e.$slots,"default",(0,t.normalizeProps)((0,t.guardReactiveProps)({row:c.row,$index:c.$index,props:c})))]),_:3},16)}var bt=f(mc,[["render",hc]]),gc={name:"cvTbColumnEnum",props:{...k.ElTableColumn.props,dataLists:{type:[Object,Array],default:()=>({})}},data(){return{}},created(){},methods:{dealTypeEnum(e){let o=Object.keys(this.dataLists);return e[this.prop]?this.dataLists[e[this.prop]]||"":this.dataLists[o[0]]||""}}};function fc(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(c=>[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(l.dealTypeEnum(c.row)),1)]),_:1},16)}var yt=f(gc,[["render",fc]]),vc={name:"cvTbEditSearch",props:{...k.ElTableColumn.props,modelValue:{type:[String],default:""},align:{type:[String],default:"left"}},data(){return{isEditIndex:null,localVal:"",autocompleteAttr:{debounce:0},searchSett:{searchFunc:null,searchParam:{},searchMockData:null,searchField:{}},searchResList:[],searchCurrClass:"",searchCurrTbIndex:0,searchIsSelect:!1}},watch:{modelValue(e){},localVal(e){this.$emit("update:modelValue",e)}},directives:{edfocus:{mounted:e=>{}}},created(){},methods:{searchEdit(e,o){this.isEditIndex=o,this.$nextTick(()=>{this.$refs[`cv-tbce-autocomplete${o}`].focus()})},searchSave(e,o){this.isEditIndex=null},searchSelect(e,o,a){this.searchIsSelect=!0,this.localTableData[a]=Object.assign(this.localTableData[a],e),this.localTableData[a].row_num=1,e.row_attr?this.localTableData[a].row_name=e.row_name+`<br><span class="cv-tbce-showtext-attr">[ ${e.row_attr} ]</span>`:this.localTableData[a].row_name=e.row_name},searchFocus(e,o){this.searchCurrClass="cvtegac"+e,this.searchCurrTbIndex=e},searchBlur(e,o){this.searchIsSelect||(this.isEditIndex=null)},searchQuery(e,o){this.searchIsSelect=!1,this.searchResList=[];const a=this.searchSett;if(a.searchMockData!=null&&a.searchMockData){if(typeof a.searchMockData=="object"){const r=this.sortOutData(a.searchMockData);this.tableData=r,this.$message({message:r.msg||"",type:"warning",duration:1300})}this.$nextTick(()=>{this.tableLoading=!1})}else a.searchFunc&&typeof a.searchFunc=="function"&&a.searchFunc({page:1,pagesize:20,keyword:e,...a.searchParam}).then(r=>{this.searchResList=[...r.data],this.searchParseData(e,o)})},searchParseData(e,o){var a=[],r=[];const n=this.searchSett;if(this.searchResList.length>0){for(let l in this.searchResList){let i=this.searchResList[l];i.row_price=i[n.searchField.row_price],i.row_stock=i[n.searchField.row_stock],i.row_attr=i[n.searchField.row_attr],i.row_name=i[n.searchField.row_name],i.row_unit=i[n.searchField.row_unit],i.row_id=i[n.searchField.row_id],i.value=i.row_name,r.push(i)}a=r}clearTimeout(this.timeout),this.timeout=setTimeout(()=>{o(a)},600)},inputSearchFilter(e){return o=>o.value.toLowerCase().indexOf(e.toLowerCase())===0},searchIconClick(){this.isEditIndex=null}}},Cc={class:"name"},kc={class:"addr"},bc={class:"addr"},yc={class:"droplist-item"},wc={class:"name"},_c={key:0,class:"attr"},Vc={class:"price"},Sc={class:"rest"},Bc=["onClick"];function Nc(e,o,a,r,n,l){const i=(0,t.resolveComponent)("ElIconCircleClose"),c=(0,t.resolveComponent)("el-icon"),d=(0,t.resolveComponent)("el-autocomplete"),u=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(u,(0,t.mergeProps)(e.$props,{"class-name":"cv-table-editor-search-column"}),{default:(0,t.withCtx)(m=>[n.isEditIndex==m.$index?((0,t.openBlock)(),(0,t.createBlock)(d,(0,t.mergeProps)({key:0,ref:`cv-tbce-autocomplete${m.$index}`},n.autocompleteAttr,{modelValue:m.row[e.prop],"onUpdate:modelValue":h=>m.row[e.prop]=h,"popper-class":`cv-tbce-autocomplete cvtegac${m.$index}`,"fetch-suggestions":l.searchQuery,onSelect:h=>l.searchSelect(h,m.row,m.$index),onFocus:h=>l.searchFocus(m.$index,h),onBlur:h=>l.searchBlur(m.row,m.$index)}),{suffix:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{onClick:h=>l.searchIconClick(m.row,m.$index)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(i)]),_:1},8,["onClick"])]),default:(0,t.withCtx)(({item:h})=>[(0,t.renderSlot)(e.$slots,"default",{item:h},()=>[(0,t.createElementVNode)("div",Cc,(0,t.toDisplayString)(h.row_name),1),(0,t.createElementVNode)("span",kc,"价格:"+(0,t.toDisplayString)(h.row_price),1),(0,t.createElementVNode)("span",bc,(0,t.toDisplayString)(h.row_rest),1),(0,t.createElementVNode)("div",yc,[(0,t.createElementVNode)("div",wc,[(0,t.createTextVNode)((0,t.toDisplayString)(h.row_name)+" ",1),h.row_attr?((0,t.openBlock)(),(0,t.createElementBlock)("div",_c,"[ "+(0,t.toDisplayString)(h.row_attr)+"]",1)):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("div",Vc,"¥ "+(0,t.toDisplayString)(h.row_price),1),(0,t.createElementVNode)("div",Sc,(0,t.toDisplayString)(h.attr_stock),1)])],!0)]),_:2},1040,["modelValue","onUpdate:modelValue","popper-class","fetch-suggestions","onSelect","onFocus","onBlur"])):((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:1,class:"showtext",onClick:h=>l.searchEdit(m.row,m.$index)},(0,t.toDisplayString)(m.row[e.prop]),9,Bc))]),_:3},16)}var wt=f(vc,[["render",Nc],["__scopeId","data-v-2f76009a"]]),Ec={name:"cvTbEditOpt",props:{tableData:{type:[Array],default:()=>[]},...k.ElTableColumn.props,label:{type:[String],default:"操作"},align:{type:[String],default:"center"},width:{type:[String],default:"100"},fixed:{type:[String],default:"left"},btnAdd:{type:[Boolean,String],default:!0},btnDel:{type:[Boolean,String],default:!0}},data(){return{localTbData:[]}},watch:{tableData(e){this.localTbData=e}},created(){this.localTbData=this.tableData},methods:{optHdDelete(e,o){this.localTbData.splice(e,1),this.localTbData.length<1&&this.optHdAdd()},optHdAdd(){this.localTbData.push({})}}};function $c(e,o,a,r,n,l){const i=(0,t.resolveComponent)("cv-icons"),c=(0,t.resolveComponent)("el-button"),d=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(d,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(u=>[a.btnAdd?((0,t.openBlock)(),(0,t.createBlock)(c,{key:0,plain:"",style:{padding:"5px",width:"26px",height:"26px"},onClick:o[0]||(o[0]=m=>l.optHdAdd())},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{type:"ElIconPlus"})]),_:1})):(0,t.createCommentVNode)("",!0),a.btnDel?((0,t.openBlock)(),(0,t.createBlock)(c,{key:1,plain:"",style:{padding:"5px",width:"26px",height:"26px"},onClick:m=>l.optHdDelete(u.$index,u.row)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{type:"ElIconClose"})]),_:1},8,["onClick"])):(0,t.createCommentVNode)("",!0)]),_:1},16)}var _t=f(Ec,[["render",$c]]),xc={name:"cvTbEditText",props:{...k.ElTableColumn.props,width:{type:[String,Number],default:""},editAttr:{type:[Object],default:()=>({placeholder:"请输入"})},editClearable:{type:[Boolean],default:!0},editStyle:{type:[Object],default:()=>({"--el-input-border":0,"--el-input-border-radius":0,"--el-input-height":"36px"})},editClass:{type:[Object],default:()=>({})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}},toFixed:{type:[String,Number],default:""}},data(){return{currValue:"",isEditIndex:null,isErrIndex:[]}},directives:{edfocus:{mounted:e=>{e.querySelector("input").focus()},inserted:function(e){e.querySelector("input").focus()}}},created(){},methods:{textIsError(e){return this.isErrIndex&&this.isErrIndex[e]&&this.isErrIndex[e][this.prop]},textHdEdit(e,o){this.isEditIndex=o},textHdClear(e,o){},textHdSave(e,o){this.isEditIndex=null;let a=e[this.prop];if(this.toFixed!=""){let r=parseInt(this.toFixed);isNaN(a)||(e[this.prop]=parseFloat(a).toFixed(r))}else e[this.prop]=a}},render22(e,o){let a=this;return e("el-table-column",{props:{...this.$props},scopedSlots:{default:r=>{this.currValue=r.row[this.prop];let n=r.$index;return this.isEditIndex==n?e("el-input",{props:{style:this.editStyle,class:this.editClass},domProps:{value:this.currValue},props:{placeholder:this.placeholder,value:this.param},nativeOn:{keyup:l=>{l.keyCode===13&&(this.$emit("update:param",l.target.value),this.callback&&this.callback())}},on:{blur:l=>{this.$emit("update:param",l.target.value),this.callback&&this.callback()},input:function(l){a.currValue=l||l.target.value},blur:l=>{this.isEditIndex=null,a.currValue=l||l.target.value}}},this.currValue):e("span",{class:{showtext:!0},on:{click:()=>{this.isEditIndex=n}}},this.currValue)}}})}},Dc=["onClick"];function Tc(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-input"),c=(0,t.resolveComponent)("el-table-column"),d=(0,t.resolveDirective)("edfocus");return(0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)(e.$props,{"class-name":"cv-table-editor-text-column"}),{default:(0,t.withCtx)(u=>[n.isEditIndex==u.$index&&!a.editAttr.disabled?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(i,(0,t.mergeProps)({key:0},a.editAttr,{clearable:a.editClearable,style:a.editStyle,class:a.editClass,modelValue:u.row[e.prop],"onUpdate:modelValue":m=>u.row[e.prop]=m,onBlur:(0,t.withModifiers)(m=>l.textHdSave(u.row,u.$index),["prevent"]),onClear:m=>l.textHdClear(u.row,u.$index)}),null,16,["clearable","style","class","modelValue","onUpdate:modelValue","onBlur","onClear"])),[[d]]):((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:1,class:"showtext",onClick:m=>l.textHdEdit(u.row,u.$index)},(0,t.toDisplayString)(u.row[e.prop]),9,Dc))]),_:1},16)}var Vt=f(xc,[["render",Tc]]),Ic={name:"cvTbEditRadio",props:{...k.ElTableColumn.props,editAttr:{type:[Object],default:()=>({})},editStyle:{type:[Object],default:()=>({})},editClass:{type:[Object],default:()=>({})},dataLists:{type:[Object,Array],default:()=>({})},dataField:{type:Object,default:()=>({label:"label",value:"value"})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}}},data(){return{}},created(){}};function Lc(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-radio"),c=(0,t.resolveComponent)("el-radio-group"),d=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(d,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(u=>[(0,t.createVNode)(c,(0,t.mergeProps)({style:a.editStyle,class:a.editClass,modelValue:u.row[e.prop],"onUpdate:modelValue":m=>u.row[e.prop]=m},a.editAttr),{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.dataLists,(m,h)=>((0,t.openBlock)(),(0,t.createBlock)(i,{key:h,label:m[a.dataField.label],value:m[a.dataField.value]},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(m[a.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:1},16,["style","class","modelValue","onUpdate:modelValue"])]),_:1},16)}var St=f(Ic,[["render",Lc]]),Fc={name:"cvTbEditCheckbox",props:{...k.ElTableColumn.props,editAttr:{type:[Object],default:()=>({})},editStyle:{type:[Object],default:()=>({})},editClass:{type:[Object],default:()=>({})},dataLists:{type:[Object,Array],default:()=>({})},dataField:{type:Object,default:()=>({label:"label",value:"value"})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}}},data(){return{localVal:[]}},created(){},methods:{handleParseValue(e){this.localVal=[]}}};function Pc(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-checkbox"),c=(0,t.resolveComponent)("el-checkbox-group"),d=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(d,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(u=>[u.row[e.prop]?((0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({key:0,style:a.editStyle,class:a.editClass,modelValue:u.row[e.prop],"onUpdate:modelValue":m=>u.row[e.prop]=m},a.editAttr),{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.dataLists,(m,h)=>((0,t.openBlock)(),(0,t.createBlock)(i,{key:h,label:m[a.dataField.label],value:m[a.dataField.value]},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(m[a.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:1},16,["style","class","modelValue","onUpdate:modelValue"])):(0,t.createCommentVNode)("",!0)]),_:1},16)}var Bt=f(Fc,[["render",Pc]]),Oc={name:"cvTbEditSelect",props:{...k.ElTableColumn.props,editAttr:{type:[Object],default:()=>({})},editStyle:{type:[Object],default:()=>({})},editClass:{type:[Object],default:()=>({})},dataLists:{type:[Object,Array],default:()=>({})},dataField:{type:Object,default:()=>({label:"label",value:"value"})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}}},data(){return{}},created(){}};function Mc(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-option"),c=(0,t.resolveComponent)("el-select"),d=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(d,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(u=>[(0,t.createVNode)(c,(0,t.mergeProps)({style:a.editStyle,class:a.editClass,modelValue:u.row[e.prop],"onUpdate:modelValue":m=>u.row[e.prop]=m},a.editAttr),{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.dataLists,(m,h)=>((0,t.openBlock)(),(0,t.createBlock)(i,{key:h,label:m[a.dataField.label],value:m[a.dataField.value]},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(m[a.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:1},16,["style","class","modelValue","onUpdate:modelValue"])]),_:1},16)}var Nt=f(Oc,[["render",Mc]]);ut.install=function(e){e.component(ut.name,ut)};pt.install=function(e){e.component(pt.name,pt)};mt.install=function(e){e.component(mt.name,mt)};ht.install=function(e){e.component(ht.name,ht)};gt.install=function(e){e.component(gt.name,gt)};ft.install=function(e){e.component(ft.name,ft)};vt.install=function(e){e.component(vt.name,vt)};Ct.install=function(e){e.component(Ct.name,Ct)};kt.install=function(e){e.component(kt.name,kt)};bt.install=function(e){e.component(bt.name,bt)};yt.install=function(e){e.component(yt.name,yt)};wt.install=function(e){e.component(wt.name,wt)};_t.install=function(e){e.component(_t.name,_t)};Vt.install=function(e){e.component(Vt.name,Vt)};St.install=function(e){e.component(St.name,St)};Bt.install=function(e){e.component(Bt.name,Bt)};Nt.install=function(e){e.component(Nt.name,Nt)};var zc={},Ac={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function Hc(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",Ac,[...o[0]||(o[0]=[(0,t.createElementVNode)("rect",{width:"12",height:"12",rx:"2",fill:"#86909C"},null,-1),(0,t.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.98095 5.49307L8.22012 3.25389C8.28521 3.18881 8.39074 3.18881 8.45582 3.25389L8.69153 3.4896C8.75661 3.55468 8.75661 3.66021 8.69153 3.7253L6.45235 5.96447L8.69153 8.20364C8.75661 8.26873 8.75661 8.37426 8.69153 8.43934L8.45582 8.67505C8.39074 8.74013 8.28521 8.74013 8.22012 8.67505L5.98095 6.43587L3.74178 8.67505C3.67669 8.74013 3.57116 8.74013 3.50608 8.67505L3.27037 8.43934C3.20529 8.37426 3.20529 8.26873 3.27037 8.20364L5.50954 5.96447L3.27037 3.7253C3.20529 3.66021 3.20529 3.55468 3.27037 3.4896L3.50608 3.25389C3.57116 3.18881 3.67669 3.18881 3.74178 3.25389L5.98095 5.49307Z",fill:"white"},null,-1)])])}var jc=f(zc,[["render",Hc]]),Rc={},Uc={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"};function Wc(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",Uc,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00002 0.666504C12.0501 0.666504 15.3334 3.94975 15.3334 7.99984C15.3334 12.0499 12.0501 15.3332 8.00002 15.3332C3.94993 15.3332 0.666687 12.0499 0.666687 7.99984C0.666687 3.94975 3.94993 0.666504 8.00002 0.666504ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM10.6667 5.66667V7.66667H9.33333V5.66667H10.6667ZM6.66667 5.66667V7.66667H5.33333V5.66667H6.66667ZM10.0767 9.33333H11.0495C11.1804 9.33333 11.2866 9.43951 11.2866 9.57048C11.2866 9.60754 11.2779 9.64409 11.2612 9.67718L11.244 9.71053C10.6294 10.8739 9.40726 11.6667 7.99998 11.6667C6.61523 11.6667 5.40977 10.8991 4.7859 9.76612L4.73786 9.67593C4.67845 9.56052 4.72385 9.4188 4.83926 9.35939C4.87253 9.34226 4.90941 9.33333 4.94683 9.33333H5.92347C6.02396 9.33332 6.11908 9.37865 6.18238 9.4567C6.26207 9.55496 6.32833 9.62955 6.38117 9.68046C6.80074 10.0847 7.37133 10.3333 7.99998 10.3333C8.63289 10.3333 9.20694 10.0814 9.62728 9.67224C9.67791 9.62296 9.74135 9.55121 9.8176 9.45698C9.88089 9.37877 9.97611 9.33333 10.0767 9.33333Z"},null,-1)])])}var Yc=f(Rc,[["render",Wc]]),qc={},Xc={class:"comment-common-icon"};function Kc(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("i",Xc,[...o[0]||(o[0]=[(0,t.createElementVNode)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},[(0,t.createElementVNode)("path",{d:"M4.88933 0.613974C4.92947 0.616946 4.96831 0.629568 5.00253 0.650767C6.67348 1.68589 7.55141 3.13884 7.63632 5.00962C7.947 5.00962 8.2245 4.65999 8.46882 3.96072L8.49487 3.88447C8.53862 3.75351 8.68025 3.68282 8.8112 3.72656C8.83398 3.73417 8.85554 3.74502 8.87522 3.75878C9.96316 4.5193 10.5048 5.50231 10.5 6.70782C10.4999 6.73762 10.4982 6.76675 10.495 6.7952C10.4985 6.86294 10.5 6.93131 10.5 7.00005C10.5 9.48533 8.48528 11.5 6 11.5C3.51472 11.5 1.5 9.48533 1.5 7.00005C1.5 6.90255 1.5031 6.80578 1.50921 6.70983C1.5062 6.70917 1.5031 6.70849 1.5 6.70782C1.50864 6.60849 1.52139 6.50994 1.53824 6.41219C1.54515 6.35775 1.55321 6.30373 1.56222 6.25003L1.57017 6.24983C1.7622 5.3813 2.28426 4.57601 3.13635 3.83394C4.00892 3.07405 4.50079 2.11523 4.61198 0.957499L4.62156 0.844839C4.63175 0.707146 4.75163 0.603784 4.88933 0.613974Z"})],-1)])])}var Gc=f(qc,[["render",Kc]]),Zc={},Qc={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"};function Jc(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",Qc,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 1.3335C14.3514 1.3335 14.6394 1.60546 14.6648 1.95041L14.6666 2.00016V14.0002C14.6666 14.3516 14.3947 14.6396 14.0497 14.665L14 14.6668H1.99998C1.64853 14.6668 1.36059 14.3949 1.33514 14.0499L1.33331 14.0002V2.00016C1.33331 1.64871 1.60527 1.36077 1.95023 1.33532L1.99998 1.3335H14ZM13.3333 2.66618H2.66664V13.3328H13.3333V2.66618ZM11.9219 6.7879C11.9719 6.83791 12 6.90574 12 6.97647V11.7993C12 11.9098 11.9104 11.9993 11.8 11.9993H6.81615C6.7975 11.9993 6.77945 11.9968 6.76232 11.992L3.91042 11.9847C3.79996 11.9844 3.71063 11.8947 3.7109 11.7842C3.71102 11.7313 3.73209 11.6807 3.76948 11.6433L6.52468 8.88807C6.62882 8.78393 6.79766 8.78393 6.9018 8.88807L8.17297 10.1593L11.5447 6.7879C11.6489 6.68376 11.8177 6.68376 11.9219 6.7879ZM5.99997 3.99951V5.99951H3.99997V3.99951H5.99997Z"},null,-1)])])}var ed=f(Zc,[["render",Jc]]),td={},od={class:"comment-common-icon"};function ad(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("i",od,[...o[0]||(o[0]=[(0,t.createElementVNode)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[(0,t.createElementVNode)("path",{d:"M586.624 234.624a74.624 74.624 0 1 1-149.184 0 74.624 74.624 0 0 1 149.12 0z m0 554.624a74.624 74.624 0 1 1-149.248 0 74.624 74.624 0 0 1 149.248 0zM512 586.624a74.624 74.624 0 1 0 0-149.248 74.624 74.624 0 0 0 0 149.248z",fill:"currentColor"})],-1)])])}var nd=f(td,[["render",ad]]),ld={},rd={class:"comment-common-icon",style:{color:"#1e80ff"}};function id(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("i",rd,[...o[0]||(o[0]=[(0,t.createElementVNode)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1534"},[(0,t.createElementVNode)("path",{d:"M668.928 166.912c-20.48-53.504-47.9744-84.7872-82.0224-94.9248-33.5872-10.0352-61.952 4.096-76.032 13.9776-27.5456 19.3536-41.216 49.664-50.0224 74.1376-3.3792 9.3184-6.4512 19.0976-9.216 27.9552l-2.6624 8.3968a227.8912 227.8912 0 0 1-10.3936 27.9552c-25.344 52.9408-47.4112 84.5312-66.7648 104.96-18.944 19.968-36.4544 30.464-55.1936 39.7824a45.3632 45.3632 0 0 0-25.088 40.5504l-0.1024 480.7168c0 24.9344 20.2752 45.2096 45.2096 45.2096h423.0656c21.7088 0 38.144-6.912 50.0224-16.9984a72.192 72.192 0 0 0 14.4896-16.896l0.2048-0.2048 0.0512-0.1536 0.8192-1.024 1.2288-1.8944c39.424-63.7952 66.7648-114.688 88.2176-175.616 24.4224-69.4784 36.8128-129.6896 42.0352-176.64 5.12-45.6704 3.7888-81.664-1.5872-101.376a77.9776 77.9776 0 0 0-45.568-52.3264 116.5824 116.5824 0 0 0-45.4144-8.6016l-192.8192-2.6624c28.1088-115.0976 10.0864-181.6064-2.4576-214.3744zM64.0512 413.9008a45.2096 45.2096 0 0 1 45.1584-47.36H176.128c24.9344 0 45.2096 20.2752 45.2096 45.2096v480.6144a45.2096 45.2096 0 0 1-45.2096 45.2096h-44.288a45.2096 45.2096 0 0 1-45.1584-43.0592L64 413.952z","p-id":"1535"})],-1)])])}var sd=f(ld,[["render",id]]),cd={},dd={class:"comment-common-icon"};function ud(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("i",dd,[...o[0]||(o[0]=[(0,t.createElementVNode)("svg",{t:"1650360973068",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1168",width:"200",height:"200"},[(0,t.createElementVNode)("path",{d:"M547.968 138.88c6.656-4.672 14.08-6.976 20.48-5.056 6.08 1.792 22.848 10.752 40.192 56.128 8.576 22.4 27.264 81.536-5.632 197.504a45.44 45.44 0 0 0 42.88 57.984l217.6 3.008h0.448a53.12 53.12 0 0 1 20.096 3.328 16.256 16.256 0 0 1 5.568 3.648 14.464 14.464 0 0 1 3.264 6.4c2.176 7.808 4.608 33.984-0.256 77.248-4.672 41.984-15.936 97.408-38.784 162.368-19.136 54.336-43.52 100.48-81.472 161.792a56.384 56.384 0 0 0-1.664 2.496l-0.128 0.128-1.408 2.112a7.872 7.872 0 0 1-1.28 1.472 3.84 3.84 0 0 1-1.28 0.64 20.48 20.48 0 0 1-6.848 0.96H356.032V421.44c19.712-10.624 40.704-24.576 62.592-47.616 25.472-26.88 51.008-64.768 78.208-121.6 5.568-11.584 9.856-24.384 13.632-36.032l3.072-9.856c2.688-8.448 5.184-16.384 8.064-24.32 8.064-22.4 16.128-36.032 26.368-43.136z m120.96 27.968c-20.48-53.44-48-84.736-81.984-94.912-33.6-9.984-61.952 4.16-76.032 14.08-27.584 19.264-41.28 49.6-50.048 74.048-3.392 9.344-6.464 19.2-9.216 27.968l-2.688 8.448a227.84 227.84 0 0 1-10.432 27.904c-25.28 52.928-47.36 84.544-66.752 104.96-18.944 19.968-36.48 30.464-55.168 39.808a45.376 45.376 0 0 0-25.088 40.576l-0.064 480.64c0 24.96 20.224 45.248 45.184 45.248h423.04c21.76 0 38.144-6.912 50.048-16.96a71.808 71.808 0 0 0 14.528-16.896l0.128-0.256 0.128-0.128 0.832-0.96 1.152-1.92c39.424-63.872 66.816-114.688 88.256-175.68a810.24 810.24 0 0 0 42.048-176.64c5.12-45.632 3.776-81.664-1.6-101.376a77.952 77.952 0 0 0-45.568-52.288 116.544 116.544 0 0 0-45.44-8.64l-192.768-2.688c28.096-115.072 10.048-181.568-2.496-214.336z m-604.864 247.04a45.184 45.184 0 0 1 45.12-47.296h67.008c24.96 0 45.184 20.288 45.184 45.248v480.64c0 24.96-20.224 45.12-45.184 45.12H131.84a45.184 45.184 0 0 1-45.12-43.072l-22.656-480.64z","p-id":"1169"})],-1)])])}var pd=f(cd,[["render",ud]]),md={},hd={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""};function gd(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",hd,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{"data-v-d6f79dbc":"","fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99976 7.93206L10.0656 3.86619C10.1633 3.76856 10.3215 3.76856 10.4192 3.86619L10.7727 4.21975C10.8704 4.31738 10.8704 4.47567 10.7727 4.5733L6.35331 8.99272C6.15805 9.18798 5.84147 9.18798 5.6462 8.99272L1.22679 4.5733C1.12916 4.47567 1.12916 4.31738 1.22679 4.21975L1.58034 3.86619C1.67797 3.76856 1.83626 3.76856 1.93389 3.86619L5.99976 7.93206Z"},null,-1)])])}var fd=f(md,[["render",gd]]),vd={},Cd={class:"comment-common-icon"};function kd(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("i",Cd,[...o[0]||(o[0]=[(0,t.createElementVNode)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},[(0,t.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99951 0.5C9.03708 0.5 11.4995 2.96243 11.4995 6C11.4995 9.03757 9.03708 11.5 5.99951 11.5C2.96195 11.5 0.499512 9.03757 0.499512 6C0.499512 2.96243 2.96195 0.5 5.99951 0.5ZM6.25 3.49988C6.38807 3.49988 6.5 3.61181 6.5 3.74988V5.49988H8.25C8.38807 5.49988 8.5 5.61181 8.5 5.74988V6.24988C8.5 6.38795 8.38807 6.49988 8.25 6.49988H5.75C5.61193 6.49988 5.5 6.38795 5.5 6.24988V3.74988C5.5 3.61181 5.61193 3.49988 5.75 3.49988H6.25Z"})],-1)])])}var bd=f(vd,[["render",kd]]),yd={},wd={class:"comment-common-icon"};function _d(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("i",wd,[...o[0]||(o[0]=[(0,t.createElementVNode)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1320",width:"200",height:"200"},[(0,t.createElementVNode)("path",{d:"M147.264 647.296V220.928c0-49.536 40.128-89.728 89.6-89.728H793.6c49.536 0 89.728 40.192 89.728 89.728v426.368c0 49.536-40.128 89.728-89.6 89.728h-145.216a47.04 47.04 0 0 0-28.16 9.408l-194.56 145.792a3.392 3.392 0 0 1-5.12-1.984l-26.752-116.672a47.04 47.04 0 0 0-45.824-36.544H236.992a89.728 89.728 0 0 1-89.728-89.728zM236.864 64A156.928 156.928 0 0 0 80 220.928l0.064 426.368a156.928 156.928 0 0 0 156.928 156.928h94.976l23.232 101.312 0.064 0.448a70.592 70.592 0 0 0 109.696 40.832l190.208-142.592H793.6a156.928 156.928 0 0 0 156.928-156.928l-0.064-426.368A156.928 156.928 0 0 0 793.536 64H236.928z m69.44 442.496a65.344 65.344 0 1 0 0-130.752 65.344 65.344 0 0 0 0 130.752z m268.8-65.344a65.344 65.344 0 1 1-130.752 0 65.344 65.344 0 0 1 130.752 0z m138.368 65.344a65.344 65.344 0 1 0 0-130.752 65.344 65.344 0 0 0 0 130.752z","p-id":"1321"})],-1)])])}var Vd=f(yd,[["render",_d]]),Sd={class:"cv-comment-emoji"},Bd={class:"face-tooltip-head select-none"},Nd=["onClick"],Ed=["src"],$d={class:"emoji-body select-none"},xd={style:{padding:"0 5px"}},Dd=["onClick"],Td={class:"emoji-btn select-none"},Id={key:0},Ld=Object.assign({name:"CompInputEmoji"},{__name:"input-emoji",props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:"bottom"},emits:["addEmoji"],setup(e,{emit:o}){const a=e,r=(0,t.ref)(0),n=(0,t.ref)(0),l=(0,t.ref)(new Array(2)),{emojiList:i,faceList:c}=a.emoji;function d(m){switch(r.value=m,m){case 0:n.value=0;break;case 1:n.value=-50,l.value[1]=i[1];break}}function u(){l.value[0]=i[0]}return(m,h)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",Sd,[(0,t.createVNode)((0,t.unref)(k.ElPopover),{placement:e.placement,"popper-class":"emoji-popover",width:250,trigger:"click",onBeforeEnter:u},{reference:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Td,[m.$slots.default?(0,t.renderSlot)(m.$slots,"default",{key:1},void 0,!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",Id,[(0,t.createVNode)((0,t.unref)(Yc)),h[0]||(h[0]=(0,t.createElementVNode)("span",null,"表情",-1))]))])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Bd,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(c),(g,v)=>((0,t.openBlock)(),(0,t.createElementBlock)("label",{key:v,class:(0,t.normalizeClass)(r.value==v?"active":""),onClick:C=>d(v)},[(0,t.createElementVNode)("img",{src:g,alt:""},null,8,Ed)],10,Nd))),128))]),(0,t.createElementVNode)("div",$d,[(0,t.createElementVNode)("div",{class:"emjio-container",style:(0,t.normalizeStyle)({transform:`translateX(${n.value}%)`})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.value,(g,v)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:v,class:"emoji-wrapper"},[(0,t.createVNode)((0,t.unref)(k.ElScrollbar),null,{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",xd,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(g,(C,p)=>((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:p,class:"emoji-item",onClick:y=>m.$emit("addEmoji",p)},[(0,t.createVNode)((0,t.unref)(k.ElImage),{src:C,title:String(p),class:"emoji",style:{width:"24px",height:"24px",margin:"5px"},lazy:""},null,8,["src","title"])],8,Dd))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,["placement"])]))}}),Fd=f(Ld,[["__scopeId","data-v-2fb59975"]]),Pd={class:"cv-comment-editor"},Od=["placeholder","innerHTML"],Md=["src"],zd=["onClick"],Ad={key:0,class:"cv-comment-editor__action"},Hd={__name:"input-box",props:{placeholder:"",contentBtn:"",parentId:"",reply:""},emits:["hide","close"],setup(e,{expose:o,emit:a}){const r=e,n=(0,t.ref)(""),l=(0,t.ref)(),i=(0,t.ref)(!1),c=(0,t.ref)(!1),d=(0,t.ref)(),u=(0,t.ref)(!0),m=(0,t.ref)(),h=(0,t.ref)(),g=(0,t.ref)([]),v=(0,t.ref)([]),C=(0,t.reactive)({imgLength:0}),p={minHeight:64},y=(0,t.ref)(),b=(0,t.ref)(!1),w=(0,t.ref)(),_=(0,t.computed)(()=>p.minHeight+"px"),O=(0,t.computed)(()=>p.minHeight==30?"4px 10px":"8px 12px"),A=a,{upload:j,submit:Xt,focus:oe}=(0,t.inject)("InjectInputBox"),ae=(0,t.inject)("InjectionEmojiApi");(0,t.watch)(()=>n.value,M=>{b.value||(l.value=M)});function mo(){Xt({content:r.reply?`回复 <span style="color: var(--cv-color-success-dark-2);">@${r.reply.user.username}:</span> ${n.value}`:n.value,parentId:J(r.parentId,null),reply:r.reply,files:v.value,clear:()=>{va(),A("close")}})}function ca(M){Z(n.value)&&!C.imgLength&&(c.value=!1,A("hide",M))}function da(M){b.value=!0,i.value=!0,c.value=!0,(0,t.nextTick)(()=>{m.value=document.querySelector("div[id^='el-popper-container']")}),oe()}function ua(M){y.value=window.getSelection()?.getRangeAt(0),d.value?.innerHTML||(i.value=!1),b.value=!1}function pa(M){const{innerHTML:F}=M?.target||M;n.value=F||"",Z(n.value.replace(/&nbsp;|<br>| /g,""))?u.value=!0:u.value=!1}function ma(M){let F=window.getSelection();F&&(F.removeAllRanges(),y.value||(ho(),y.value=F.getRangeAt(0)),y.value.deleteContents(),y.value.insertNode(y.value.createContextualFragment(M)),y.value.collapse(!1),F.addRange(y.value),n.value=d?.value?.innerHTML||"",Z(n.value.replace(/&nbsp;|<br>| /g,""))?u.value=!0:u.value=!1)}function ha(){d.value&&(d.value.innerHTML="",n.value=d.value.innerHTML,i.value=!1)}function ho(){(0,t.nextTick)(()=>{d.value?.focus()})}function ga(M){M.ctrlKey&&M.key=="Enter"&&(Z(n.value.replace(/&nbsp;|<br>| /g,""))?(0,k.ElMessage)({message:"内容不能为空",type:"info"}):mo())}function fa(M){g.value.length=0,v.value.length=0;const F=h.value?.files;if(C.imgLength=J(F?.length,0),F)for(let R=0;R<F.length;R++){let ne=F[R].name,go=Ml(F[R]);v.value.push(F[R]),Il(ne)?g.value.push(go):(0,k.ElMessage)({type:"warn",message:"请选择图片类型文件!",duration:2500})}}function va(){ha(),g.value.length=0,v.value=[],u.value=!0}function Ca(M){g?.value?.splice(M,1)}return(0,t.onMounted)(()=>{d.value?.addEventListener("keyup",M=>{const F=M.target;F.innerHTML=="<br>"&&(F.innerHTML="")})}),o({focus:()=>ho()}),(M,F)=>(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",Pd,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["cv-comment-editor__box",{active:i.value,"input-active":c.value}])},[(0,t.createElementVNode)("div",{ref_key:"editorRef",ref:d,class:"rich-input",contenteditable:"true",placeholder:r.placeholder,onFocus:da,onInput:pa,onBlur:ua,onKeydown:(0,t.withKeys)(ga,["enter"]),innerHTML:l.value,style:(0,t.normalizeStyle)({minHeight:_.value,padding:O.value})},null,44,Od),(0,t.createElementVNode)("div",{ref_key:"imageRef",ref:w,class:"image-preview-box"},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(g.value,(R,ne)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:ne,class:"image-preview"},[(0,t.createElementVNode)("img",{src:R,alt:""},null,8,Md),(0,t.createElementVNode)("div",{class:"clean-btn",onClick:go=>Ca(ne)},[(0,t.createVNode)((0,t.unref)(jc))],8,zd)]))),128))],512)],2),(0,t.createVNode)(t.Transition,{name:"fade"},{default:(0,t.withCtx)(()=>[c.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ad,[(0,t.createElementVNode)("div",null,[(0,t.createVNode)(Fd,{emoji:(0,t.unref)(ae),onAddEmoji:F[0]||(F[0]=R=>ma(R))},null,8,["emoji"]),(0,t.createElementVNode)("div",{class:"picture",onClick:F[1]||(F[1]=(...R)=>h.value?.click&&h.value?.click(...R))},[(0,t.createVNode)((0,t.unref)(ed)),F[2]||(F[2]=(0,t.createElementVNode)("span",null,"图片",-1)),(0,t.createElementVNode)("input",{id:"comment-upload",ref_key:"inputRef",ref:h,type:"file",multiple:"",onChange:fa},null,544)])]),(0,t.createElementVNode)("div",null,[F[3]||(F[3]=(0,t.createElementVNode)("span",{style:{"margin-right":"10px"}},[(0,t.createTextVNode)(" 文明上网理性发言,请遵守 "),(0,t.createElementVNode)("a",{href:"###",target:"_blank"},"《新闻评论服务协议》")],-1)),(0,t.createVNode)((0,t.unref)(k.ElButton),{type:"primary",disabled:u.value,onClick:mo},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(r.contentBtn),1)]),_:1},8,["disabled"])])])):(0,t.createCommentVNode)("",!0)]),_:1})])),[[(0,t.unref)(k.ClickOutside),ca,m.value]])}},Ko=f(Hd,[["__scopeId","data-v-e3fd437e"]]),jd={class:"u-fold"},Rd={class:"action-box select-none"},Ud=Object.assign({name:"UFold"},{__name:"fold",props:{line:{type:[Number,String],default:5}},setup(e){(0,t.useCssVars)(c=>({v15491e60:a.value}));const o=e,a=(0,t.computed)(()=>{let c=Math.trunc(Number(o.line));return c>0?c:1}),r=(0,t.ref)(!0),n=(0,t.ref)(!1),l=(0,t.ref)();let i;return(0,t.onMounted)(()=>{i=new ResizeObserver(c=>{r.value&&l.value&&(n.value=l.value.offsetHeight<l.value.scrollHeight)}),i.observe(l.value)}),(0,t.onUnmounted)(()=>{i.disconnect()}),(c,d)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",jd,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["txt-box",{"over-hidden":r.value}])},[(0,t.createElementVNode)("div",{ref_key:"divBox",ref:l},[(0,t.renderSlot)(c.$slots,"default",{},void 0,!0)],512)],2),(0,t.createElementVNode)("div",Rd,[n.value&&c.unfold?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:"expand-btn",onClick:d[0]||(d[0]=u=>r.value=!r.value)},(0,t.toDisplayString)(r.value?"展开":"收起"),1)):(0,t.createCommentVNode)("",!0)])]))}}),Wd=f(Ud,[["__scopeId","data-v-94334818"]]),Yd={__name:"user-card",props:{uid:""},setup(e){const o=(0,t.ref)({}),{showInfo:a}=(0,t.inject)("InjectContentBox"),r=(0,t.inject)("InjectSlots"),n=()=>(0,t.h)("div",r.card(o.value));return(l,i)=>(0,t.unref)(r).card?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(k.ElPopover),{key:0,placement:"top",width:300,"show-after":300,onBeforeEnter:i[0]||(i[0]=()=>(0,t.unref)(a)(e.uid,c=>o.value=c))},{reference:(0,t.withCtx)(()=>[(0,t.renderSlot)(l.$slots,"default")]),default:(0,t.withCtx)(()=>[(0,t.createVNode)(n)]),_:3})):(0,t.renderSlot)(l.$slots,"default",{key:1})}},So=Yd;function qd(e,o){return(0,t.getCurrentScope)()?((0,t.onScopeDispose)(e,o),!0):!1}var te=typeof window<"u"&&typeof document<"u",Lg=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,Xd=Object.prototype.toString,Kd=e=>Xd.call(e)==="[object Object]";function Gd(e){let o;function a(){return o||(o=e()),o}return a.reset=async()=>{const r=o;o=void 0,r&&await r},a}function Jt(e){return Array.isArray(e)?e:[e]}function Go(e){const o=Object.create(null);return(a=>o[a]||(o[a]=e(a)))}var Zd=/\B([A-Z])/g,Fg=Go(e=>e.replace(Zd,"-$1").toLowerCase()),Qd=/-(\w)/g,Pg=Go(e=>e.replace(Qd,(o,a)=>a?a.toUpperCase():""));function Jd(e,o,a={}){const{immediate:r=!0,immediateCallback:n=!1}=a,l=(0,t.shallowRef)(!1);let i;function c(){i&&(clearTimeout(i),i=void 0)}function d(){l.value=!1,c()}function u(...m){n&&e(),c(),l.value=!0,i=setTimeout(()=>{l.value=!1,i=void 0,e(...m)},(0,t.toValue)(o))}return r&&(l.value=!0,te&&u()),qd(d),{isPending:(0,t.shallowReadonly)(l),start:u,stop:d}}function eu(e,o,a){return(0,t.watch)(e,o,{...a,immediate:!0})}var tu=te?window:void 0,Og=te?window.document:void 0,Zo=te?window.navigator:void 0,Mg=te?window.location:void 0;function ou(e){var o;const a=(0,t.toValue)(e);return(o=a?.$el)!==null&&o!==void 0?o:a}function Qo(...e){const o=(r,n,l,i)=>(r.addEventListener(n,l,i),()=>r.removeEventListener(n,l,i)),a=(0,t.computed)(()=>{const r=Jt((0,t.toValue)(e[0])).filter(n=>n!=null);return r.every(n=>typeof n!="string")?r:void 0});return eu(()=>{var r,n;return[(r=(n=a.value)===null||n===void 0?void 0:n.map(l=>ou(l)))!==null&&r!==void 0?r:[tu].filter(l=>l!=null),Jt((0,t.toValue)(a.value?e[1]:e[0])),Jt((0,t.unref)(a.value?e[2]:e[1])),(0,t.toValue)(a.value?e[3]:e[2])]},([r,n,l,i],c,d)=>{if(!r?.length||!n?.length||!l?.length)return;const u=Kd(i)?{...i}:i,m=r.flatMap(h=>n.flatMap(g=>l.map(v=>o(h,g,v,u))));d(()=>{m.forEach(h=>h())})},{flush:"post"})}function au(){const e=(0,t.shallowRef)(!1),o=(0,t.getCurrentInstance)();return o&&(0,t.onMounted)(()=>{e.value=!0},o),e}function Jo(e){const o=au();return(0,t.computed)(()=>(o.value,!!e()))}function Bo(e,o={}){const{controls:a=!1,navigator:r=Zo}=o,n=Jo(()=>r&&"permissions"in r),l=(0,t.shallowRef)(),i=typeof e=="string"?{name:e}:e,c=(0,t.shallowRef)(),d=()=>{var m,h;c.value=(m=(h=l.value)===null||h===void 0?void 0:h.state)!==null&&m!==void 0?m:"prompt"};Qo(l,"change",d,{passive:!0});const u=Gd(async()=>{if(n.value){if(!l.value)try{l.value=await r.permissions.query(i)}catch{l.value=void 0}finally{d()}if(a)return(0,t.toRaw)(l.value)}});return u(),a?{state:c,isSupported:n,query:u}:c}function nu(e={}){const{navigator:o=Zo,read:a=!1,source:r,copiedDuring:n=1500,legacy:l=!1}=e,i=Jo(()=>o&&"clipboard"in o),c=Bo("clipboard-read"),d=Bo("clipboard-write"),u=(0,t.computed)(()=>i.value||l),m=(0,t.shallowRef)(""),h=(0,t.shallowRef)(!1),g=Jd(()=>h.value=!1,n,{immediate:!1});async function v(){let w=!(i.value&&b(c.value));if(!w)try{m.value=await o.clipboard.readText()}catch{w=!0}w&&(m.value=y())}u.value&&a&&Qo(["copy","cut"],v,{passive:!0});async function C(w=(0,t.toValue)(r)){if(u.value&&w!=null){let _=!(i.value&&b(d.value));if(!_)try{await o.clipboard.writeText(w)}catch{_=!0}_&&p(w),m.value=w,h.value=!0,g.start()}}function p(w){const _=document.createElement("textarea");_.value=w,_.style.position="absolute",_.style.opacity="0",_.setAttribute("readonly",""),document.body.appendChild(_),_.select(),document.execCommand("copy"),_.remove()}function y(){var w,_,O;return(w=(_=document)===null||_===void 0||(O=_.getSelection)===null||O===void 0||(O=O.call(_))===null||O===void 0?void 0:O.toString())!==null&&w!==void 0?w:""}function b(w){return w==="granted"||w==="prompt"}return{isSupported:u,text:(0,t.readonly)(m),copied:(0,t.readonly)(h),copy:C}}var zg=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}],lu={class:"comment-list-actbox__right"},ru={class:"operation-warp"},iu={class:"dialog-footer"},su={__name:"comment-operate",props:{data:{type:[Object],default:()=>({})}},setup(e){const{copy:o}=nu(),a=(0,t.ref)(!1),r=(0,t.ref)({report_type:"",report_content:""}),n=e;function l(){let c=n.data||{};a.value=!1,(0,k.ElMessage)({type:"info",message:"举报成功: "+c.id})}function i(c){let d=n.data||{};switch(c){case"remove":setTimeout(()=>{commentRef.value?.remove(d)},200);break;case"report":a.value=!0;break;case"copy":o(d.content),(0,k.ElMessage)({type:"info",message:"复制成功"})}}return(c,d)=>{const u=(0,t.resolveComponent)("el-dropdown-item"),m=(0,t.resolveComponent)("el-dropdown-menu"),h=(0,t.resolveComponent)("el-dropdown"),g=(0,t.resolveComponent)("el-radio"),v=(0,t.resolveComponent)("el-radio-group"),C=(0,t.resolveComponent)("el-form-item"),p=(0,t.resolveComponent)("el-input"),y=(0,t.resolveComponent)("el-form"),b=(0,t.resolveComponent)("el-button"),w=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createElementBlock)("div",lu,[(0,t.createVNode)(h,{trigger:"click",onCommand:d[0]||(d[0]=_=>i(_))},{dropdown:(0,t.withCtx)(()=>[(0,t.createVNode)(m,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(u,{command:"report"},{default:(0,t.withCtx)(()=>[...d[5]||(d[5]=[(0,t.createTextVNode)("举报",-1)])]),_:1}),(0,t.createVNode)(u,{command:"remove"},{default:(0,t.withCtx)(()=>[...d[6]||(d[6]=[(0,t.createTextVNode)("删除",-1)])]),_:1}),(0,t.createVNode)(u,{divided:"",command:"copy"},{default:(0,t.withCtx)(()=>[...d[7]||(d[7]=[(0,t.createTextVNode)("复制",-1)])]),_:1})]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",ru,[(0,t.createVNode)((0,t.unref)(nd))])]),_:1}),(0,t.createVNode)(w,{title:"举报",modelValue:a.value,"onUpdate:modelValue":d[4]||(d[4]=_=>a.value=_),width:"400px",style:{width:"90%","max-width":"400px"}},{footer:(0,t.withCtx)(()=>[(0,t.createElementVNode)("span",iu,[(0,t.createVNode)(b,{onClick:d[3]||(d[3]=_=>a.value=!1)},{default:(0,t.withCtx)(()=>[...d[13]||(d[13]=[(0,t.createTextVNode)("取消",-1)])]),_:1}),(0,t.createVNode)(b,{type:"primary",onClick:l},{default:(0,t.withCtx)(()=>[...d[14]||(d[14]=[(0,t.createTextVNode)("提交",-1)])]),_:1})])]),default:(0,t.withCtx)(()=>[(0,t.createVNode)(y,{"label-position":"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(C,{label:"您为什么要举报此信息?"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(v,{modelValue:r.value.report_type,"onUpdate:modelValue":d[1]||(d[1]=_=>r.value.report_type=_)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(g,{value:"色情淫秽"},{default:(0,t.withCtx)(()=>[...d[8]||(d[8]=[(0,t.createTextVNode)("色情淫秽",-1)])]),_:1}),(0,t.createVNode)(g,{value:"骚扰谩骂"},{default:(0,t.withCtx)(()=>[...d[9]||(d[9]=[(0,t.createTextVNode)("骚扰谩骂",-1)])]),_:1}),(0,t.createVNode)(g,{value:"广告欺诈"},{default:(0,t.withCtx)(()=>[...d[10]||(d[10]=[(0,t.createTextVNode)("广告欺诈",-1)])]),_:1}),(0,t.createVNode)(g,{value:"反动"},{default:(0,t.withCtx)(()=>[...d[11]||(d[11]=[(0,t.createTextVNode)("反动",-1)])]),_:1}),(0,t.createVNode)(g,{value:"其他"},{default:(0,t.withCtx)(()=>[...d[12]||(d[12]=[(0,t.createTextVNode)("其他",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),(0,t.createVNode)(C,{label:"举报说明(可选):"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(p,{type:"textarea",modelValue:r.value.report_content,"onUpdate:modelValue":d[2]||(d[2]=_=>r.value.report_content=_),maxlength:"200",placeholder:"描述恶意行为",rows:"3"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}},cu=su,du={class:"comment-sub"},uu=["href"],pu={class:"comment-primary"},mu={class:"comment-main"},hu={key:1,class:"user-info"},gu=["href"],fu={class:"username"},vu={class:"name",style:{"max-width":"10em"}},Cu={blank:"true",class:"rank"},ku=["innerHTML"],bu={class:"address",style:{color:"#939393","font-size":"12px"}},yu={class:"time"},wu={class:"content"},_u=["innerHTML"],Vu={class:"imgbox",style:{display:"flex"}},Su={class:"comment-list-actbox select-none"},Bu={class:"comment-list-actbox__left"},Nu={key:2},Eu={class:"comment-list-actbox__right"},$u={key:2},xu={__name:"content-box",props:{reply:{type:[Boolean],default:!1},data:{type:[Object],default:()=>({})},id:{type:[String],default:""}},setup(e){const o=e,a=(0,t.reactive)({active:!1}),r=(0,t.ref)(),n=(0,t.ref)(),l=(0,t.computed)(()=>{let b=o.data.contentImg;return Z(b)?[]:b?.split("||")}),{allEmoji:i}=(0,t.inject)("InjectionEmojiApi"),{like:c,user:d,relativeTime:u}=(0,t.inject)("InjectContentBox");function m(){a.active=!a.active,a.active&&(0,t.nextTick)(()=>{r.value?.focus()})}function h(b){const w=b.target;n.value?.contains(w)||(a.active=!1)}const g=(0,t.inject)("InjectSlots"),v=()=>(0,t.h)("div",g.info(o.data)),C=(b,w)=>(w=w.replace(/\[.+?\]/g,_=>{const O=b[_];return O?['<img src="',O,'" width="20" height="20" alt="',_,'" title="',_,'" style="margin: 0 1px; vertical-align: text-bottom"',"/>"].join(""):_}),w),p=(0,t.computed)(()=>C(i,o.data.content)),y=b=>{switch(b){case 1:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="831"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#8CDBF4" p-id="832"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="833"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m950.857143-365.714285l73.142857-73.142858v146.285715h-73.142857z m73.142857-73.142858h146.285715v146.285715h-146.285715z m0 146.285715h146.285715v438.857143h-146.285715z" fill="#FFFFFF"></path></svg>';case 2:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="765"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#6ECEFF" p-id="766"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="767"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m877.714286-438.857143h365.714286v146.285715h-365.714286z m219.428572 146.285715h146.285714v146.285714h-146.285714z m-219.428572 292.571428V512h146.285714v146.285714z" fill="#FFFFFF" p-id="768"></path><path d="M1097.142857 585.142857V438.857143h365.714286v146.285714z m0 73.142857h365.714286v146.285715h-365.714286z" fill="#FFFFFF"></path></svg>';case 3:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="799"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#599DFF" p-id="800"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="801"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m877.714286-438.857143h365.714286v146.285715h-365.714286z m219.428572 146.285715h146.285714v73.142857h-146.285714z m0 219.428571h146.285714v73.142857h-146.285714z m-146.285715-146.285714h292.571429v146.285714h-292.571429z m-73.142857 219.428571h365.714286v146.285715h-365.714286z" fill="#FFFFFF"></path></svg>';case 4:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="815"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#34D19B" p-id="816"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="817"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m975.213715-365.714285L1243.428571 219.428571v219.428572h-146.285714zM1097.142857 438.857143h146.285714v292.571428h-146.285714z m146.285714 146.285714h73.142858v146.285714h-73.142858z m0-365.714286h73.142858v146.285715h-73.142858z m73.142858 0h146.285714v585.142858h-146.285714z" fill="#FFFFFF"></path></svg>';case 5:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="782"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#FFA000" p-id="783"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="784"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m1097.142858-73.142857h146.285714v219.428572h-146.285714z m-219.428572-365.714286h365.714286v146.285715h-365.714286z m0 438.857143h219.428572v146.285715h-219.428572z m73.142857-219.428571h219.428572v146.285714h-219.428572z" fill="#FFFFFF" p-id="785"></path><path d="M1316.571429 438.857143h146.285714v146.285714h-146.285714z m-219.428572-73.142857h146.285714v219.428571h-146.285714z" fill="#FFFFFF"></path></svg>';case 6:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="748"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#F36262" p-id="749"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="750"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m1097.142858-146.285714h146.285714v292.571429h-146.285714z m-73.142858-292.571429h146.285715v146.285715h-146.285715z m-146.285714 146.285715h146.285714v438.857143h-146.285714z" fill="#FFFFFF" p-id="751"></path><path d="M1243.428571 438.857143h219.428572v146.285714h-219.428572z m-48.786285-170.642286L1243.428571 219.428571v146.285715h-146.285714zM1243.428571 658.285714h146.285715v146.285715h-146.285715z" fill="#FFFFFF"></path></svg>';default:return""}};return(b,w)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["comment",{reply:o.reply}])},[(0,t.createElementVNode)("div",du,[(0,t.createVNode)(So,{uid:(0,t.unref)(X)(e.data.uid)},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("a",{href:e.data.user.homeLink,target:"_blank",class:"no-underline",style:{display:"block"}},[(0,t.createVNode)((0,t.unref)(k.ElAvatar),{style:{"margin-top":"5px"},size:40,fit:"cover",src:e.data.user.avatar},{default:(0,t.withCtx)(()=>[...w[2]||(w[2]=[(0,t.createElementVNode)("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])]),_:1},8,["src"])],8,uu)]),_:1},8,["uid"])]),(0,t.createElementVNode)("div",pu,[(0,t.createElementVNode)("div",mu,[(0,t.unref)(g).info?((0,t.openBlock)(),(0,t.createBlock)(v,{key:0})):((0,t.openBlock)(),(0,t.createElementBlock)("div",hu,[(0,t.createVNode)(So,{uid:(0,t.unref)(X)(e.data.uid)},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("a",{href:e.data.user.homeLink,target:"_blank",class:"no-underline",style:{display:"block"}},[(0,t.createElementVNode)("div",fu,[(0,t.createElementVNode)("span",vu,(0,t.toDisplayString)(e.data.user.username),1),(0,t.createElementVNode)("span",Cu,[(0,t.createElementVNode)("i",{class:"comment-common-icon",style:{"font-size":"24px"},innerHTML:y(e.data.user.level)},null,8,ku)])])],8,gu)]),_:1},8,["uid"]),(0,t.createElementVNode)("span",bu,"  "+(0,t.toDisplayString)(e.data.address),1),(0,t.createElementVNode)("time",yu,(0,t.toDisplayString)((0,t.unref)(u)?(0,t.unref)(Tl)(e.data.createTime):e.data.createTime),1)])),(0,t.createElementVNode)("div",wu,[(0,t.createVNode)(Wd,{unfold:""},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",{innerHTML:p.value},null,8,_u),(0,t.createElementVNode)("div",Vu,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.value,(_,O)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(k.ElImage),{key:O,src:_,style:{height:"72px",padding:"8px 4px"},lazy:"","preview-src-list":l.value,"initial-index":O},null,8,["src","preview-src-list","initial-index"]))),128))])]),_:1})]),(0,t.createElementVNode)("div",Su,[(0,t.createElementVNode)("div",Bu,[(0,t.createElementVNode)("div",{"data-tip":"点赞",class:"item",onClick:w[0]||(w[0]=_=>(0,t.unref)(c)((0,t.unref)(X)(e.data.id)))},[(0,t.unref)(d).likeIds.map(String).indexOf((0,t.unref)(X)(e.data.id))==-1?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(pd),{key:0})):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(sd),{key:1})),e.data.likes!=0?((0,t.openBlock)(),(0,t.createElementBlock)("span",Nu,(0,t.toDisplayString)(e.data.likes),1)):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("div",{"data-tip":"回复",ref_key:"btnRef",ref:n,class:(0,t.normalizeClass)(["item",{active:a.active}]),onClick:m},[(0,t.createVNode)((0,t.unref)(Vd)),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(a.active?"取消回复":"回复"),1)],2)]),(0,t.createElementVNode)("div",Eu,[(0,t.renderSlot)(b.$slots,"operate",{},()=>[(0,t.createVNode)(cu,{data:o.data},null,8,["data"])],!0)])]),a.active?((0,t.openBlock)(),(0,t.createElementBlock)("div",$u,[(0,t.createVNode)(Ko,{ref_key:"commentRef",ref:r,"parent-id":(0,t.unref)(X)(e.id),placeholder:`回复 @${e.data.user.username}...`,reply:e.data,"content-btn":"发布",style:{"margin-top":"12px"},onHide:h,onClose:w[1]||(w[1]=_=>a.active=!1)},null,8,["parent-id","placeholder","reply"])])):(0,t.createCommentVNode)("",!0)]),(0,t.renderSlot)(b.$slots,"default",{},void 0,!0)])],2))}},ea=f(xu,[["__scopeId","data-v-cfe79df7"]]),Du={key:0,class:"reply-box"},Tu={class:"reply-list"},Iu={key:0,class:"fetch-more"},Lu={key:0},Fu={key:1},Pu={key:0},Ou={key:1,class:"fetch-more"},Mu={__name:"reply-box",props:{data:{type:[Array,Object],default:()=>null},id:{type:[String],default:""}},setup(e){const o=e,a=(0,t.reactive)({loading:!1,over:!1,pageNum:1,pageSize:5}),{replyPage:r,replyShowSize:n,comments:l,page:i}=(0,t.inject)("InjectReplyBox"),c=(0,t.computed)(()=>{let g={total:0,length:0,list:[]};if(o.data){let v=o.data.list.length;g={total:o.data.total,length:v,list:o.data.list}}if(!a.over){let v=g.list.slice(0,n);g.list=v}return i&&(g.list=g.list.slice(0,5)),g}),d=()=>{a.over=!0},u=g=>{l.value.forEach(v=>{v.id==o.id&&v.reply&&(v.reply=g)})},m=g=>{a.pageNum=g,r(o.id,g,a.pageSize,v=>u(v))},h=g=>{a.pageSize=g,r(o.id,a.pageNum,g,v=>u(v))};return(g,v)=>c.value.length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",Du,[(0,t.createElementVNode)("div",Tu,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(c.value.list,(C,p)=>((0,t.openBlock)(),(0,t.createBlock)(ea,{id:e.id,key:p,data:C,reply:""},null,8,["id","data"]))),128)),c.value.length>(0,t.unref)(n)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Iu,[a.loading?((0,t.openBlock)(),(0,t.createElementBlock)("span",Lu,"加载中...")):((0,t.openBlock)(),(0,t.createElementBlock)("div",Fu,[a.over?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",Pu,[(0,t.createTextVNode)(" 共"+(0,t.toDisplayString)(c.value.total)+"条回复, ",1),(0,t.createElementVNode)("span",{class:"fetch-more-comment select-none",onClick:d},[v[0]||(v[0]=(0,t.createTextVNode)(" 点击查看 ",-1)),(0,t.createVNode)((0,t.unref)(fd))])]))]))])):(0,t.createCommentVNode)("",!0),a.over&&(0,t.unref)(i)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ou,[(0,t.createVNode)((0,t.unref)(k.ElPagination),{small:"","hide-on-single-page":"",layout:"total, prev, pager, next",total:c.value.total,"page-size":a.pageSize,onCurrentChange:m,onSizeChange:h},null,8,["total","page-size"])])):(0,t.createCommentVNode)("",!0)])])):(0,t.createCommentVNode)("",!0)}},zu=f(Mu,[["__scopeId","data-v-16e0a50b"]]),Au={key:0,class:"comment-list"},Hu={__name:"comment-list",props:{data:{type:[Array,Object],default:()=>[]},total:{type:[Number],default:0},showSize:{type:[Number],default:0}},setup(e){return(o,a)=>e.data?((0,t.openBlock)(),(0,t.createElementBlock)("div",Au,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.data,(r,n)=>((0,t.openBlock)(),(0,t.createBlock)(ea,{id:(0,t.unref)(X)(r.id),key:n,data:r},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(zu,{id:(0,t.unref)(X)(r.id),data:r.reply},null,8,["id","data"])]),_:2},1032,["id","data"]))),128))])):(0,t.createCommentVNode)("",!0)}},ju=Hu,Ru={class:"cv-comment-base"},Uu={class:"cv-comment-form"},Wu={class:"cv-comment-form__content"},Yu={class:"cv-comment-form__avatar"},qu={class:"cv-comment-list-wrapper"},Xu=Object.assign({name:"cvCommentBase"},{__name:"comment",props:{config:{},page:!1,upload:!1,relativeTime:!1},emits:["submit","like","replyPage","showInfo","focus"],setup(e,{expose:o,emit:a}){const r=e,{user:n,comments:l,showSize:i,replyShowSize:c,total:d}=(0,t.toRefs)(r.config),u=a,m=({content:C,parentId:p,reply:y,files:b,clear:w})=>{u("submit",{content:C,parentId:p,reply:y,files:b,finish:O=>{if(w(),p){let A=l.value.find(j=>j.id==p);if(A){let j=A.reply;j?(j.list.unshift(O),j.total++):A.reply={total:1,list:[O]}}}else l.value.unshift(O)}})};(0,t.provide)("InjectInputBox",{upload:r.upload,submit:m,focus:()=>u("focus")});const h=(C,p)=>{let y=null;l.value.forEach(b=>{b.id==C?y=b:y=b.reply?.list.find(w=>w.id==C),y&&(y.likes+=p)})},g=C=>{const p=r.config.user.likeIds;u("like",C,()=>{if(p.findIndex(y=>y==C)==-1)p.push(C),h(C,1);else{let y=p.findIndex(b=>b==C);y!=-1&&(p.splice(y,1),h(C,-1))}})};(0,t.provide)("InjectContentBox",{user:n,like:g,relativeTime:J(r.relativeTime,!1),showInfo:(C,p)=>u("showInfo",C,p)}),(0,t.provide)("InjectReplyBox",{page:r.page,replyPage:(C,p,y,b)=>{u("replyPage",{parentId:C,pageNum:p,pageSize:y,finish:b})},replyShowSize:J(c,3),comments:l});const v=C=>{const{parentId:p,id:y}=C;if(p){let b=l.value.find(w=>w.id==p)?.reply;if(b){let w=b.list.findIndex(_=>_.id==y);w!=-1&&(b.list.splice(w,1),b.total--)}}else{let b=l.value.findIndex(w=>w.id==y);b!=-1&&l.value.splice(b,1)}};return(0,t.provide)("InjectionEmojiApi",r.config.emoji),(0,t.provide)("InjectSlots",(0,t.useSlots)()),o({remove:v}),(C,p)=>{const y=(0,t.resolveComponent)("el-avatar");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Ru,[(0,t.createElementVNode)("div",Uu,[p[1]||(p[1]=(0,t.createElementVNode)("div",{class:"cv-comment-form__header"},[(0,t.createElementVNode)("span",{class:"cv-comment-form__hdtitle"},"评论")],-1)),(0,t.createElementVNode)("div",Wu,[(0,t.createElementVNode)("div",Yu,[(0,t.createVNode)(y,{size:40,src:e.config.user.avatar},{default:(0,t.withCtx)(()=>[...p[0]||(p[0]=[(0,t.createElementVNode)("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])]),_:1},8,["src"])]),(0,t.createVNode)(Ko,{placeholder:"输入评论(Enter换行,Ctrl + Enter发送)","content-btn":"发表评论"})])]),(0,t.renderSlot)(C.$slots,"default",{},()=>[p[2]||(p[2]=(0,t.createElementVNode)("div",{class:"title"},"全部评论",-1))]),(0,t.createElementVNode)("div",qu,[(0,t.createVNode)(ju,{data:(0,t.unref)(l),total:(0,t.unref)(d),"show-size":(0,t.unref)(J)((0,t.unref)(i),5)},null,8,["data","total","show-size"])])])}}}),Et=Xu,Ku={class:"comment-scroll"},Gu=["infinite-scroll-disabled"],Zu={class:"scroll-btn"},Qu={key:1},Ju={key:2},ep=Object.assign({name:"cvCommentScroll"},{__name:"comment-scroll",props:{disable:{type:[Boolean],default:!1},show:{type:[Boolean],default:!1}},emits:["more"],setup(e,{emit:o}){const a=e,r=(0,t.ref)(!1),n=(0,t.ref)(!1),l=o,i=(0,t.computed)(()=>n.value&&a.disable),c=(0,t.computed)(()=>!n.value||r.value||i.value),d=Ho(()=>{l("more"),r.value=!1},500),u=()=>{r.value=!0,d()};return(m,h)=>{const g=(0,t.resolveComponent)("el-link"),v=(0,t.resolveDirective)("infinite-scroll");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Ku,[(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",{"infinite-scroll-disabled":c.value,"infinite-scroll-distance":"2"},[(0,t.renderSlot)(m.$slots,"default"),(0,t.createElementVNode)("div",Zu,[n.value?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)(g,{key:0,type:"primary",underline:"never",onClick:h[0]||(h[0]=C=>n.value=!n.value)},{default:(0,t.withCtx)(()=>[...h[1]||(h[1]=[(0,t.createTextVNode)("加载更多",-1)])]),_:1})),r.value?((0,t.openBlock)(),(0,t.createElementBlock)("p",Qu,"加载中...")):(0,t.createCommentVNode)("",!0),i.value?((0,t.openBlock)(),(0,t.createElementBlock)("p",Ju,"没有更多了")):(0,t.createCommentVNode)("",!0)])],8,Gu)),[[v,u]])])}}}),$t=ep,tp={class:"cv-comment-nav-wrap"},op={class:"cv-comment-nav__sort"},ap=Object.assign({name:"cvCommentNav"},{__name:"comment-nav",props:{modelValue:!1},emits:["update:modelValue","sorted"],setup(e,{emit:o}){const a=e,r=o,n=(0,t.computed)({get(){return a.modelValue},set(l){r("update:modelValue",l),r("sorted",l)}});return(l,i)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",tp,[i[4]||(i[4]=(0,t.createElementVNode)("span",{class:"cv-comment-nav__title"},"全部评论",-1)),(0,t.createElementVNode)("div",op,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["item select-none",{active:n.value}]),onClick:i[0]||(i[0]=c=>n.value=!0)},[(0,t.createVNode)((0,t.unref)(bd)),i[2]||(i[2]=(0,t.createTextVNode)(" 最新 ",-1))],2),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["item select-none",{active:!n.value}]),onClick:i[1]||(i[1]=c=>n.value=!1)},[(0,t.createVNode)((0,t.unref)(Gc)),i[3]||(i[3]=(0,t.createTextVNode)(" 最热 ",-1))],2)])]))}}),xt=ap;Et.install=function(e){e.component(Et.name,Et)};$t.install=function(e){e.component($t.name,$t)};xt.install=function(e){e.component(xt.name,xt)};var np={name:"cvIcons",props:{...k.ElIcon.prop,type:{type:[String],default:""},size:{type:[String,Number],default:12},name:{type:[String],default:""}},data(){return{}},computed:{style(){return{fontSize:isNaN(Number(this.size))?this.size+"px":this.size,color:props.color}}},created(){},methods:{}},lp={key:0,"aria-hidden":"true"},rp=["xlink:href"];function ip(e,o,a,r,n,l){const i=(0,t.resolveComponent)("el-icon");return(0,t.openBlock)(),(0,t.createBlock)(i,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default",{},()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(a.type)))],!0),a.name?((0,t.openBlock)(),(0,t.createElementBlock)("svg",lp,[(0,t.createElementVNode)("use",{"xlink:href":a.name},null,8,rp)])):(0,t.createCommentVNode)("",!0)]),_:3},16)}var Dt=f(np,[["render",ip],["__scopeId","data-v-3d601d08"]]),ta={emits:["click"],props:{name:{type:String,required:!0,validator:e=>e.trim().length>0},size:{type:[Number,String],default:24},color:{type:String,default:"#333333"},hoverColor:{type:String,default:"currentColor"},hoverEffect:{type:Boolean,default:!1}},data(){return{iconType:"svg"}},computed:{maskIconUrl(){const e="https://10ui.cn/icons";let o=this.name||"",a="";o=o.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`),o=o.replace(/^-|-$/g,""),o=o.toLowerCase().trim();const r=/-(filled|bold)$/;if(r.test(o)){const n=o.match(r)[1],l=o.slice(0,o.lastIndexOf(`-${n}`));l?a=`${l.split("-").filter(i=>i.trim().length>0).join("/")}-${n}`:a=o}else o.includes("-")?a=o.split("-").filter(n=>n.trim().length>0).join("/"):a=o;switch(this.iconType?.toLowerCase()||"png"){case"svg":return`${e}/${a}.svg`;case"png":return`${e}/png/${a}.png`;default:return`${e}/png/${a}.png`}},iconSize(){return typeof this.size=="string"&&(this.size.includes("px")||this.size.includes("rpx"))?this.size:`${parseFloat(this.size)}px`},iconStyle(){const e={width:this.iconSize,height:this.iconSize,backgroundColor:this.color,WebkitMaskImage:`url(${this.maskIconUrl})`,maskImage:`url(${this.maskIconUrl})`,WebkitMaskSize:"contain",maskSize:"contain",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat",WebkitMaskPosition:"center",maskPosition:"center"};return this.hoverEffect&&(e.transition="background-color 0.2s ease"),e}}},so={name:"cvMaskSvg",mixins:[ta]},No=()=>{(0,t.useCssVars)(e=>({v2042f27c:e.hoverColor}))},Eo=so.setup;so.setup=Eo?(e,o)=>(No(),Eo(e,o)):No;function sp(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-mask-icon",style:(0,t.normalizeStyle)(e.iconStyle),onTap:o[0]||(o[0]=i=>e.$emit("click",i))},null,36)}var Tt=f(so,[["render",sp],["__scopeId","data-v-590b4b89"]]),co={name:"cvMaskPng",mixins:[ta],data(){return{iconType:"png"}}},$o=()=>{(0,t.useCssVars)(e=>({v6bb780e0:e.hoverColor}))},xo=co.setup;co.setup=xo?(e,o)=>($o(),xo(e,o)):$o;function cp(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-mask-icon",style:(0,t.normalizeStyle)(e.iconStyle),onTap:o[0]||(o[0]=i=>e.$emit("click",i))},null,36)}var It=f(co,[["render",cp],["__scopeId","data-v-4f8ce869"]]);Dt.install=function(e){e.component(Dt.name,Dt)};Tt.install=function(e){e.component(Tt.name,Tt)};It.install=function(e){e.component(It.name,It)};var dp={class:"u-emoji"},up={class:"face-tooltip-head select-none"},pp=["onClick"],mp=["src"],hp={class:"emoji-body select-none"},gp={style:{padding:"0 5px"}},fp=["onClick"],vp={class:"emoji-btn select-none"},Cp={key:0},kp=Object.assign({name:"cvEmoji"},{__name:"emoji",props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:"bottom"},emits:["addEmoji"],setup(e,{emit:o}){const a=e,r=(0,t.ref)(0),n=(0,t.ref)(0),l=(0,t.ref)(new Array(2)),{emojiList:i,faceList:c}=a.emoji;function d(m){switch(r.value=m,m){case 0:n.value=0;break;case 1:n.value=-50,l.value[1]=i[1];break}}function u(){l.value[0]=i[0]}return(m,h)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",dp,[(0,t.createVNode)((0,t.unref)(k.ElPopover),{placement:e.placement,"popper-class":"emoji-popover",width:250,trigger:"click",onBeforeEnter:u},{reference:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",vp,[m.$slots.default?(0,t.renderSlot)(m.$slots,"default",{key:1},void 0,!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",Cp,[...h[0]||(h[0]=[(0,t.createElementVNode)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},[(0,t.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00002 0.666504C12.0501 0.666504 15.3334 3.94975 15.3334 7.99984C15.3334 12.0499 12.0501 15.3332 8.00002 15.3332C3.94993 15.3332 0.666687 12.0499 0.666687 7.99984C0.666687 3.94975 3.94993 0.666504 8.00002 0.666504ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM10.6667 5.66667V7.66667H9.33333V5.66667H10.6667ZM6.66667 5.66667V7.66667H5.33333V5.66667H6.66667ZM10.0767 9.33333H11.0495C11.1804 9.33333 11.2866 9.43951 11.2866 9.57048C11.2866 9.60754 11.2779 9.64409 11.2612 9.67718L11.244 9.71053C10.6294 10.8739 9.40726 11.6667 7.99998 11.6667C6.61523 11.6667 5.40977 10.8991 4.7859 9.76612L4.73786 9.67593C4.67845 9.56052 4.72385 9.4188 4.83926 9.35939C4.87253 9.34226 4.90941 9.33333 4.94683 9.33333H5.92347C6.02396 9.33332 6.11908 9.37865 6.18238 9.4567C6.26207 9.55496 6.32833 9.62955 6.38117 9.68046C6.80074 10.0847 7.37133 10.3333 7.99998 10.3333C8.63289 10.3333 9.20694 10.0814 9.62728 9.67224C9.67791 9.62296 9.74135 9.55121 9.8176 9.45698C9.88089 9.37877 9.97611 9.33333 10.0767 9.33333Z"})],-1),(0,t.createElementVNode)("span",null,"表情",-1)])]))])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",up,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(c),(g,v)=>((0,t.openBlock)(),(0,t.createElementBlock)("label",{key:v,class:(0,t.normalizeClass)(r.value==v?"active":""),onClick:C=>d(v)},[(0,t.createElementVNode)("img",{src:g,alt:""},null,8,mp)],10,pp))),128))]),(0,t.createElementVNode)("div",hp,[(0,t.createElementVNode)("div",{class:"emjio-container",style:(0,t.normalizeStyle)({transform:`translateX(${n.value}%)`})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.value,(g,v)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:v,class:"emoji-wrapper"},[(0,t.createVNode)((0,t.unref)(k.ElScrollbar),null,{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",gp,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(g,(C,p)=>((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:p,class:"emoji-item",onClick:y=>m.$emit("addEmoji",p)},[(0,t.createVNode)((0,t.unref)(k.ElImage),{src:C,title:String(p),class:"emoji",style:{width:"24px",height:"24px",margin:"5px"},lazy:""},null,8,["src","title"])],8,fp))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,["placement"])]))}}),bp=f(kp,[["__scopeId","data-v-da53b6ed"]]),yp={class:"cv-chat-message"},wp={class:"chat-list"},_p={class:"content"},Vp={key:0,class:"username"},Sp=["innerHTML"],Bp={__name:"message",props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0}},setup(e,{expose:o}){const{allEmoji:a}=(0,t.inject)("InjectionEmojiApi"),r=(0,t.ref)();o({scroll:()=>{(0,t.nextTick)(()=>{const i=document.querySelector(".chat-item:last-child");r.value.setScrollTop(i.offsetTop)})}});const l=(i,c)=>(c=c.replace(/\[.+?\]/g,d=>{const u=i[d];return u?['<img src="',u,'" width="20" height="20" alt="',d,'" title="',d,'" style="margin: 0 1px; vertical-align: text-bottom"',"/>"].join(""):d}),c);return(i,c)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",yp,[(0,t.createVNode)((0,t.unref)(k.ElScrollbar),{ref_key:"scrollbarRef",ref:r},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",wp,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.data,(d,u)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:u,class:(0,t.normalizeClass)([{self:e.userId==d.id},"chat-item"])},[(0,t.createElementVNode)("div",null,[(0,t.createVNode)((0,t.unref)(k.ElAvatar),null,{default:(0,t.withCtx)(()=>[...c[0]||(c[0]=[(0,t.createElementVNode)("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])]),_:1})]),(0,t.createElementVNode)("div",_p,[e.userId!=d.id?((0,t.openBlock)(),(0,t.createElementBlock)("div",Vp,(0,t.toDisplayString)(d.username),1)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:"card-box",innerHTML:l((0,t.unref)(a),d.content)},null,8,Sp)]),c[1]||(c[1]=(0,t.createElementVNode)("div",{class:"date"},null,-1))],2))),128))])]),_:1},512)]))}},Np=Bp,Ep={class:"cv-chat-wrap"},$p={class:"header"},xp={id:"chat-footer",class:"footer"},Dp=Object.assign({name:"cvChat"},{__name:"chat",props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0},emoji:{type:[Object],default:()=>({})}},emits:["submit"],setup(e,{emit:o}){const a=e,r=(0,t.ref)(!1),n=(0,t.ref)(""),l=(0,t.ref)(),{data:i}=a,c=o,d=g=>{const{ctrlKey:v,key:C}=g;v&&C=="Enter"&&m()},u=()=>{n.value="",l.value.scroll()},m=()=>{let g=n.value;g.trim()?(g=g.replace(/\n/g,"<br/>"),c("submit",{clear:u,content:g})):(0,k.ElMessage)({type:"error",message:"内容不能为空"})},h=g=>{let v=document.getElementById("emojiInput"),C=v.selectionStart,p=v.selectionEnd,y=v.value;if(C===null||p===null)return;let b=y.substring(0,C)+g+y.substring(p);v.value=b,v.focus(),v.selectionStart=C+g.length,v.selectionEnd=C+g.length,n.value=b};return(0,t.provide)("InjectionEmojiApi",a.emoji),(g,v)=>{const C=(0,t.resolveComponent)("cvIcons");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Ep,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)([{active:r.value},"chat-container translate"])},[(0,t.createElementVNode)("div",$p,[(0,t.createVNode)(C,{size:"32"},{default:(0,t.withCtx)(()=>[...v[2]||(v[2]=[(0,t.createElementVNode)("svg",{viewBox:"0 0 1318 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[(0,t.createElementVNode)("path",{d:"M1318.502489 432.779052c0-231.790522-209.29842-419.704826-467.458992-419.704826s-467.56979 188.357498-467.56979 419.704826 209.409219 419.704826 467.56979 419.704826a512.110799 512.110799 0 0 0 183.482363-33.239559l93.292361 93.292361a25.816057 25.816057 0 0 0 44.319412-19.168145L1165.822116 742.350141C1259.336074 665.56676 1318.502489 555.433023 1318.502489 432.779052z",fill:"#612273","p-id":"10993"}),(0,t.createElementVNode)("path",{d:"M1034.304263 745.784895a509.673231 509.673231 0 0 1-183.482363 33.239559c-244.532352 0-445.077689-168.524562-465.353819-383.25211-1.107985 12.07704-1.883575 24.264878-1.883575 36.563514 0 231.790522 209.409219 419.704826 467.56979 419.704826a512.110799 512.110799 0 0 0 183.482363-33.239559l93.292361 93.292361a25.816057 25.816057 0 0 0 44.319411-19.168145 25.262064 25.262064 0 0 0-7.5343-17.284571zM1165.822116 669.223112l2.769964 70.689461C1260.44406 663.239991 1318.502489 553.992642 1318.502489 432.779052a366.632331 366.632331 0 0 0-1.883575-36.785111 403.971435 403.971435 0 0 1-150.796798 273.229171z",fill:"#612273",opacity:".2","p-id":"10994"}),(0,t.createElementVNode)("path",{d:"M383.25211 432.779052a383.141311 383.141311 0 0 1 41.881844-172.956503c-12.298637-0.997187-24.81887-1.661978-37.449903-1.661978C173.510496 258.160571 0 413.943302 0 606.178749c0 101.713049 48.97295 193.011037 126.421121 256.609392l-5.761524 148.470028a12.187838 12.187838 0 0 0 20.830124 9.08548l94.06795-93.957153A425.577148 425.577148 0 0 0 387.79485 954.196927a404.636226 404.636226 0 0 0 300.37481-128.304696c-177.831638-59.388011-304.91755-212.733175-304.91755-393.113179z",fill:"#EB3D72","p-id":"10995"}),(0,t.createElementVNode)("path",{d:"M342.256654 391.672798c0 117.557239 53.958883 223.59143 140.714132 299.71002a391.008007 391.008007 0 0 1-99.718676-258.603766 383.141311 383.141311 0 0 1 41.881844-172.956503c-12.298637-0.997187-24.81887-1.661978-37.449903-1.661978-7.091106 0-14.071413 0-21.05172 0.553993a375.939407 375.939407 0 0 0-24.375677 132.958234zM630.111231 802.181346a407.627786 407.627786 0 0 1-283.533434 110.798528 424.136767 424.136767 0 0 1-152.12638-27.699632l-71.686647 71.686648-2.105173 54.291279a12.187838 12.187838 0 0 0 20.830124 9.08548l94.06795-93.957153A425.577148 425.577148 0 0 0 387.79485 954.196927a404.636226 404.636226 0 0 0 300.37481-128.304696 486.294741 486.294741 0 0 1-58.058429-23.710885zM85.425665 821.792686l-5.761523-4.985934c1.883575 2.215971 3.656351 4.431941 5.650725 6.647911z",fill:"#EB3D72",opacity:".5","p-id":"10996"}),(0,t.createElementVNode)("path",{d:"M833.426531 332.395585c64.263147-10.193465 64.041549-66.479117 62.601169-75.342999s-15.400995-54.291279-59.942004-47.200173S799.078987 254.836615 799.078987 254.836615a28.475222 28.475222 0 1 0 56.174854-8.97468s6.315516 3.323956 8.30989 20.27613-11.966241 29.029214-35.455529 33.239559-88.638823-19.943735-104.039819-115.452067C709.110582 96.39472 781.57282 28.253625 838.966457 13.185025a55.399264 55.399264 0 0 0-64.041549-5.318329c-56.064055 35.123134-97.170309 109.579745-85.536464 182.817571 14.957801 93.846354 79.664142 151.904783 144.038087 141.711318zM203.980091 573.825579a53.072495 53.072495 0 0 0 33.90435-67.919498c-2.659165-6.537113-21.162519-38.225492-53.51569-25.040467a30.026401 30.026401 0 0 0-19.832936 40.773858 22.159706 22.159706 0 1 0 40.773858-16.619779s5.318329 1.329582 9.861069 13.739017-3.988747 24.043281-21.05172 31.023588-70.02467 0.553993-98.832288-68.695087C68.916685 417.599654 110.798528 353.558104 151.904783 332.395585a42.879031 42.879031 0 0 0-48.97295 7.423502 146.918849 146.918849 0 0 0-32.574767 152.458775c27.810431 68.141095 86.866046 100.605064 133.623025 81.547717z",fill:"#FED150","p-id":"10997"})],-1)])]),_:1}),v[3]||(v[3]=(0,t.createElementVNode)("div",{style:{"margin-left":"12px"}},[(0,t.createElementVNode)("div",null,"聊天室"),(0,t.createElementVNode)("div",{style:{"font-size":"12px"}},"当前2人在线")],-1))]),(0,t.createVNode)(Np,{ref_key:"messageRef",ref:l,data:(0,t.unref)(i),"user-id":e.userId},null,8,["data","user-id"]),(0,t.createElementVNode)("div",xp,[(0,t.createVNode)((0,t.unref)(k.ElInput),{id:"emojiInput",modelValue:n.value,"onUpdate:modelValue":v[0]||(v[0]=p=>n.value=p),type:"textarea",autosize:{minRows:1,maxRows:4},placeholder:"请输入内容",onKeydown:(0,t.withKeys)(d,["enter"])},null,8,["modelValue"]),(0,t.createVNode)(bp,{style:{margin:"0 8px 0"},emoji:e.emoji,placement:"top-end",onAddEmoji:h},{default:(0,t.withCtx)(()=>[...v[4]||(v[4]=[(0,t.createElementVNode)("svg",{width:"22",height:"22",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"7186"},[(0,t.createElementVNode)("path",{d:"M510.944 960c-247.04 0-448-200.96-448-448s200.992-448 448-448c247.008 0 448 200.96 448 448S757.984 960 510.944 960zM510.944 128c-211.744 0-384 172.256-384 384 0 211.744 172.256 384 384 384 211.744 0 384-172.256 384-384C894.944 300.256 722.688 128 510.944 128zM512 773.344c-89.184 0-171.904-40.32-226.912-110.624-10.88-13.92-8.448-34.016 5.472-44.896 13.888-10.912 34.016-8.48 44.928 5.472 42.784 54.688 107.136 86.048 176.512 86.048 70.112 0 134.88-31.904 177.664-87.552 10.784-14.016 30.848-16.672 44.864-5.888 14.016 10.784 16.672 30.88 5.888 44.864C685.408 732.32 602.144 773.344 512 773.344zM368 515.2c-26.528 0-48-21.472-48-48l0-64c0-26.528 21.472-48 48-48s48 21.472 48 48l0 64C416 493.696 394.496 515.2 368 515.2zM656 515.2c-26.496 0-48-21.472-48-48l0-64c0-26.528 21.504-48 48-48s48 21.472 48 48l0 64C704 493.696 682.496 515.2 656 515.2z","p-id":"7187"})],-1)])]),_:1},8,["emoji"]),(0,t.createVNode)(C,{size:"18",class:(0,t.normalizeClass)([{".cv-chat-wrap submit-btn":n.value.trim()!=""},"select-none cursor-pointer"]),style:{"padding-bottom":"5px"},onClick:m},{default:(0,t.withCtx)(()=>[...v[5]||(v[5]=[(0,t.createElementVNode)("svg",{viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15072"},[(0,t.createElementVNode)("path",{d:"M1008.00076 6.285714q18.857143 13.714286 15.428571 36.571429l-146.285714 877.714286q-2.857143 16.571429-18.285714 25.714286-8 4.571429-17.714286 4.571429-6.285714 0-13.714286-2.857143l-258.857143-105.714286-138.285714 168.571429q-10.285714 13.142857-28 13.142857-7.428571 0-12.571429-2.285714-10.857143-4-17.428571-13.428571t-6.571429-20.857143l0-199.428571 493.714286-605.142857-610.857143 528.571429-225.714286-92.571429q-21.142857-8-22.857143-31.428571-1.142857-22.857143 18.285714-33.714286l950.857143-548.571429q8.571429-5.142857 18.285714-5.142857 11.428571 0 20.571429 6.285714z","p-id":"15073"})],-1)])]),_:1},8,["class"])])],2),(0,t.createVNode)((0,t.unref)(k.ElButton),{class:"chat-btn",onClick:v[1]||(v[1]=p=>r.value=!r.value)},{default:(0,t.withCtx)(()=>[...v[6]||(v[6]=[(0,t.createTextVNode)("chat",-1)])]),_:1})])}}}),Lt=f(Dp,[["__scopeId","data-v-c77a9347"]]);Lt.install=function(e){e.component(Lt.name,Lt)};var Tp={key:0},Ip=Object.assign({name:"cvNoticeBar"},{__name:"notice-bar",props:{data:{type:[String,Array],default:()=>[]},vertical:{type:[Boolean],default:!1},suffixIcon:{type:[String],default:""},prefixIcon:{type:[String],default:""},size:{type:[Number],default:14},height:{type:[Number],default:40},delay:{type:[Number],default:1e3},spped:{type:[Number],default:100},color:{type:[String],default:"--color-warning"},background:{type:[String],default:"var(--color-warning-light-9)"}},setup(e){const o=e,{data:a,vertical:r,suffixIcon:n,prefixIcon:l,size:i,height:c,delay:d,spped:u,color:m,background:h}=o,g=(0,t.reactive)({boxWidth:0,textWidth:0,oneTime:0,twoTime:0,order:1}),v=(0,t.ref)({}),C=(0,t.ref)({style:{cssText:""}}),p=(0,t.computed)(()=>o.delay>2e3?o.delay:2e3),y=()=>{(0,t.nextTick)(()=>{g.boxWidth=v.value.offsetWidth,g.textWidth=C.value.offsetWidth,document.styleSheets[0].insertRule(`@keyframes oneAnimation {0% {left: 0px;} 100% {left: -${g.textWidth}px;}}`),document.styleSheets[0].insertRule(`@keyframes twoAnimation {0% {left: ${g.boxWidth}px;} 100% {left: -${g.textWidth}px;}}`),b(),setTimeout(()=>{w()},o.delay)})},b=()=>{g.oneTime=g.textWidth/o.spped,g.twoTime=(g.textWidth+g.boxWidth)/o.spped},w=()=>{g.order===1?(C.value?.style&&(C.value.style.cssText=`animation: oneAnimation ${g.oneTime}s linear; opactity: 1;}`),g.order=2):C.value?.style&&(C.value.style.cssText=`animation: twoAnimation ${g.twoTime}s linear infinite; opacity: 1;`)},_=()=>{C.value.addEventListener("animationend",()=>{w()},!1)};return(0,t.onMounted)(()=>{o.vertical||(y(),_())}),(O,A)=>{const j=(0,t.resolveComponent)("el-carousel-item"),Xt=(0,t.resolveComponent)("el-carousel"),oe=(0,t.resolveComponent)("cvIcons");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-notice-bar",style:(0,t.normalizeStyle)({background:(0,t.unref)(h),height:`${(0,t.unref)(c)}px`})},[(0,t.unref)(r)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Tp,[(0,t.createVNode)(Xt,{height:"40px",direction:"vertical",autoplay:!0,"indicator-position":"none",interval:p.value},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(a),ae=>((0,t.openBlock)(),(0,t.createBlock)(j,{key:ae},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(ae),1)]),_:2},1024))),128))]),_:1},8,["interval"])])):((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,style:(0,t.normalizeStyle)({color:(0,t.unref)(m),fontSize:`${(0,t.unref)(i)}px`}),class:"cv-notice-bar-wrap"},[(0,t.unref)(l)?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:0,type:(0,t.unref)(l)},null,8,["type"])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{ref_key:"boxRef",ref:v,class:"text-box"},[(0,t.createElementVNode)("div",{ref_key:"textRef",ref:C,class:"text"},(0,t.toDisplayString)((0,t.unref)(a)),513)],512),(0,t.unref)(n)?((0,t.openBlock)(),(0,t.createBlock)(oe,{key:1,type:(0,t.unref)(n)},null,8,["type"])):(0,t.createCommentVNode)("",!0)],4))],4)}}}),Ft=Ip;Ft.install=function(e){e.component(Ft.name,Ft)};const Lp=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[Ta.basicSetup]});var H={Change:"change",Update:"update",Focus:"focus",Blur:"blur",Ready:"ready",ModelUpdate:"update:modelValue"};const Fp=({onUpdate:e,onChange:o,onFocus:a,onBlur:r,...n})=>U.EditorState.create({doc:n.doc,selection:n.selection,extensions:[...Array.isArray(n.extensions)?n.extensions:[n.extensions],z.EditorView.updateListener.of(l=>{e(l),l.docChanged&&o(l.state.doc.toString(),l),l.focusChanged&&(l.view.hasFocus?a(l):r(l))})]}),G=e=>{const o=new U.Compartment;return{compartment:o,run:r=>{o.get(e.state)?e.dispatch({effects:o.reconfigure(r)}):e.dispatch({effects:U.StateEffect.appendConfig.of(o.of(r))})}}},Do=(e,o)=>{const{compartment:a,run:r}=G(e);return n=>{const l=a.get(e.state);r(n??l!==o?o:[])}},Pp=e=>{const o=()=>e.state.doc.toString(),a=p=>{p!==o()&&e.dispatch({changes:{from:0,to:e.state.doc.length,insert:p}})},r=()=>e.focus(),{run:n}=G(e),l=Do(e,[z.EditorView.editable.of(!1),U.EditorState.readOnly.of(!0)]),i=Do(e,z.keymap.of([Ia.indentWithTab])),{run:c}=G(e),d=p=>{c([U.EditorState.tabSize.of(p),P.indentUnit.of(" ".repeat(p))])},{run:u}=G(e),m=p=>{u([U.EditorState.phrases.of(p)])},{run:h}=G(e),g=p=>{h((0,z.placeholder)(p))},{run:v}=G(e);return{focus:r,getDoc:o,setDoc:a,reExtensions:n,toggleDisabled:l,toggleIndentWithTab:i,setTabSize:d,setPhrases:m,setPlaceholder:g,setStyle:(p={})=>{v(z.EditorView.theme({"&":{...p}}))}}};var Op=(0,t.defineComponent)({name:"VueCodemirror",props:{modelValue:{type:String,default:""},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},indentWithTab:{type:Boolean,default:!1},tabSize:Number,placeholder:String,style:Object,autoDestroy:{type:Boolean,default:!1},phrases:Object,root:Object,extensions:Array,selection:Object},emits:{[H.Change]:(e,o)=>!0,[H.Update]:e=>!0,[H.Focus]:e=>!0,[H.Blur]:e=>!0,[H.Ready]:e=>!0,[H.ModelUpdate]:(e,o)=>!0},setup(e,o){const a=(0,t.shallowRef)(),r=(0,t.shallowRef)(),n=(0,t.shallowRef)(),l={...Lp},i=(0,t.computed)(()=>{const c={};return Object.keys((0,t.toRaw)(e)).forEach(d=>{d!=="modelValue"&&(c[d]=e[d]??l[d])}),c});return(0,t.onMounted)(()=>{r.value=Fp({doc:e.modelValue,selection:i.value.selection,extensions:l.extensions??[],onFocus:d=>o.emit(H.Focus,d),onBlur:d=>o.emit(H.Blur,d),onUpdate:d=>o.emit(H.Update,d),onChange:(d,u)=>{d!==e.modelValue&&(o.emit(H.Change,d,u),o.emit(H.ModelUpdate,d,u))}}),n.value=new z.EditorView({state:r.value,parent:a.value,root:i.value.root}),n.value.contentDOM.addEventListener("scroll",d=>{});const c=Pp(n.value);(0,t.watch)(()=>e.modelValue,d=>{d!==c.getDoc()&&c.setDoc(d)}),(0,t.watch)(()=>e.extensions,d=>c.reExtensions(d||[]),{immediate:!0}),(0,t.watch)(()=>i.value.disabled,d=>c.toggleDisabled(d),{immediate:!0}),(0,t.watch)(()=>i.value.indentWithTab,d=>c.toggleIndentWithTab(d),{immediate:!0}),(0,t.watch)(()=>i.value.tabSize,d=>c.setTabSize(d),{immediate:!0}),(0,t.watch)(()=>i.value.phrases,d=>c.setPhrases(d||{}),{immediate:!0}),(0,t.watch)(()=>i.value.placeholder,d=>c.setPlaceholder(d),{immediate:!0}),(0,t.watch)(()=>i.value.style,d=>c.setStyle(d),{immediate:!0}),i.value.autofocus&&c.focus(),o.emit(H.Ready,{state:r.value,view:n.value,container:a.value,editorTools:c})}),(0,t.onBeforeUnmount)(()=>{i.value.autoDestroy&&n.value&&n.value.destroy()}),()=>(0,t.h)("div",{class:"cv-editor-codemirror",ref:a})}}),Mp="#e5c07b",To="#e06c75",zp="#56b6c2",Ap="#ffffff",Pt="#abb2bf",no="#7d8799",Hp="#61afef",jp="#98c379",Io="#d19a66",Rp="#c678dd",Up="#21252b",Lo="#2c313a",Fo="#282c34",eo="#353a42",Wp="#3E4451",Po="#528bff",Yp=z.EditorView.theme({"&":{color:Pt,backgroundColor:Fo},".cm-content":{caretColor:Po},".cm-cursor, .cm-dropCursor":{borderLeftColor:Po},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Wp},".cm-panels":{backgroundColor:Up,color:Pt},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Fo,color:no,border:"none"},".cm-activeLineGutter":{backgroundColor:Lo},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:eo},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:eo,borderBottomColor:eo},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Lo,color:Pt}}},{dark:!0}),qp=P.HighlightStyle.define([{tag:s.tags.keyword,color:Rp},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.propertyName,s.tags.macroName],color:To},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:Hp},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Io},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Pt},{tag:[s.tags.typeName,s.tags.className,s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:Mp},{tag:[s.tags.operator,s.tags.operatorKeyword,s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link,s.tags.special(s.tags.string)],color:zp},{tag:[s.tags.meta,s.tags.comment],color:no},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.strikethrough,textDecoration:"line-through"},{tag:s.tags.link,color:no,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:To},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Io},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted],color:jp},{tag:s.tags.invalid,color:Ap}]),Xp=[Yp,(0,P.syntaxHighlighting)(qp)],V={name:"materialLight",dark:!1,background:"#FAFAFA",foreground:"#90A4AE",selection:"#80CBC440",cursor:"#272727",dropdownBackground:"#FAFAFA",dropdownBorder:"#00000010",activeLine:"#c2c2c222",lineNumber:"#CFD8DC",lineNumberActive:"#7E939E",matchingBracket:"#FAFAFA",keyword:"#7C4DFF",storage:"#7C4DFF",variable:"#90A4AE",parameter:"#90A4AE",function:"#6182B8",string:"#91B859",constant:"#F76D47",type:"#8796B0",class:"#FFB62C",number:"#F76D47",comment:"#90A4AE",heading:"#91B859",invalid:"#E53935",regexp:"#39ADB5"},Kp=z.EditorView.theme({"&":{color:V.foreground,backgroundColor:V.background},".cm-content":{caretColor:V.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:V.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:V.selection},".cm-panels":{backgroundColor:V.dropdownBackground,color:V.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:V.dropdownBackground,outline:`1px solid ${V.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:V.selection},".cm-activeLine":{backgroundColor:V.activeLine},".cm-selectionMatch":{backgroundColor:V.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:V.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:V.background,color:V.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:V.background},".cm-lineNumbers .cm-gutterElement":{color:V.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:V.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:V.foreground},".cm-tooltip":{border:`1px solid ${V.dropdownBorder}`,backgroundColor:V.dropdownBackground,color:V.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:V.foreground,borderBottomColor:V.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:V.selection,color:V.foreground}}},{dark:V.dark}),Gp=P.HighlightStyle.define([{tag:s.tags.keyword,color:V.keyword},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:V.variable},{tag:[s.tags.propertyName],color:V.function},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:V.string},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:V.function},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:V.constant},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:V.variable},{tag:[s.tags.className],color:V.class},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:V.number},{tag:[s.tags.typeName],color:V.type,fontStyle:V.type},{tag:[s.tags.operator,s.tags.operatorKeyword],color:V.keyword},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:V.regexp},{tag:[s.tags.meta,s.tags.comment],color:V.comment},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.link,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:V.heading},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:V.variable},{tag:s.tags.invalid,color:V.invalid},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Zp=[Kp,(0,P.syntaxHighlighting)(Gp)],S={name:"materialDark",dark:!0,background:"#263238",foreground:"#EEFFFF",selection:"#80CBC420",cursor:"#FFCC00",dropdownBackground:"#263238",dropdownBorder:"#FFFFFF10",activeLine:"#4c616c22",lineNumber:"#37474F",lineNumberActive:"#607a86",matchingBracket:"#263238",keyword:"#C792EA",storage:"#C792EA",variable:"#EEFFFF",parameter:"#EEFFFF",function:"#82AAFF",string:"#C3E88D",constant:"#F78C6C",type:"#B2CCD6",class:"#FFCB6B",number:"#F78C6C",comment:"#546E7A",heading:"#C3E88D",invalid:"#FF5370",regexp:"#89DDFF"},Qp=z.EditorView.theme({"&":{color:S.foreground,backgroundColor:S.background},".cm-content":{caretColor:S.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:S.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:S.selection},".cm-panels":{backgroundColor:S.dropdownBackground,color:S.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:S.dropdownBackground,outline:`1px solid ${S.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:S.selection},".cm-activeLine":{backgroundColor:S.activeLine},".cm-selectionMatch":{backgroundColor:S.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:S.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:S.background,color:S.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:S.background},".cm-lineNumbers .cm-gutterElement":{color:S.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:S.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:S.foreground},".cm-tooltip":{border:`1px solid ${S.dropdownBorder}`,backgroundColor:S.dropdownBackground,color:S.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:S.foreground,borderBottomColor:S.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:S.selection,color:S.foreground}}},{dark:S.dark}),Jp=P.HighlightStyle.define([{tag:s.tags.keyword,color:S.keyword},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:S.variable},{tag:[s.tags.propertyName],color:S.function},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:S.string},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:S.function},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:S.constant},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:S.variable},{tag:[s.tags.className],color:S.class},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:S.number},{tag:[s.tags.typeName],color:S.type,fontStyle:S.type},{tag:[s.tags.operator,s.tags.operatorKeyword],color:S.keyword},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:S.regexp},{tag:[s.tags.meta,s.tags.comment],color:S.comment},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.link,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:S.heading},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:S.variable},{tag:s.tags.invalid,color:S.invalid},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),em=[Qp,(0,P.syntaxHighlighting)(Jp)],B={name:"solarizedLight",dark:!1,background:"#FDF6E3",foreground:"#586E75",selection:"#EEE8D5",cursor:"#657B83",dropdownBackground:"#FDF6E3",dropdownBorder:"#D3AF86",activeLine:"#d5bd5c22",lineNumber:"#586E75",lineNumberActive:"#567983",matchingBracket:"#EEE8D5",keyword:"#859900",storage:"#586E75",variable:"#268BD2",parameter:"#268BD2",function:"#268BD2",string:"#2AA198",constant:"#CB4B16",type:"#CB4B16",class:"#CB4B16",number:"#D33682",comment:"#93A1A1",heading:"#268BD2",invalid:"#DC322F",regexp:"#DC322F"},tm=z.EditorView.theme({"&":{color:B.foreground,backgroundColor:B.background},".cm-content":{caretColor:B.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:B.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:B.selection},".cm-panels":{backgroundColor:B.dropdownBackground,color:B.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:B.dropdownBackground,outline:`1px solid ${B.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:B.selection},".cm-activeLine":{backgroundColor:B.activeLine},".cm-selectionMatch":{backgroundColor:B.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:B.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:B.background,color:B.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:B.background},".cm-lineNumbers .cm-gutterElement":{color:B.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:B.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:B.foreground},".cm-tooltip":{border:`1px solid ${B.dropdownBorder}`,backgroundColor:B.dropdownBackground,color:B.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:B.foreground,borderBottomColor:B.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:B.selection,color:B.foreground}}},{dark:B.dark}),om=P.HighlightStyle.define([{tag:s.tags.keyword,color:B.keyword},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:B.variable},{tag:[s.tags.propertyName],color:B.function},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:B.string},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:B.function},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:B.constant},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:B.variable},{tag:[s.tags.className],color:B.class},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:B.number},{tag:[s.tags.typeName],color:B.type,fontStyle:B.type},{tag:[s.tags.operator,s.tags.operatorKeyword],color:B.keyword},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:B.regexp},{tag:[s.tags.meta,s.tags.comment],color:B.comment},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.link,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:B.heading},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:B.variable},{tag:s.tags.invalid,color:B.invalid},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),am=[tm,(0,P.syntaxHighlighting)(om)],N={name:"solarizedDark",dark:!0,background:"#002B36",foreground:"#93A1A1",selection:"#274642",cursor:"#D30102",dropdownBackground:"#002B36",dropdownBorder:"#2AA19899",activeLine:"#005b7022",lineNumber:"#93A1A1",lineNumberActive:"#949494",matchingBracket:"#073642",keyword:"#859900",storage:"#93A1A1",variable:"#268BD2",parameter:"#268BD2",function:"#268BD2",string:"#2AA198",constant:"#CB4B16",type:"#CB4B16",class:"#CB4B16",number:"#D33682",comment:"#586E75",heading:"#268BD2",invalid:"#DC322F",regexp:"#DC322F"},nm=z.EditorView.theme({"&":{color:N.foreground,backgroundColor:N.background},".cm-content":{caretColor:N.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:N.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:N.selection},".cm-panels":{backgroundColor:N.dropdownBackground,color:N.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:N.dropdownBackground,outline:`1px solid ${N.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:N.selection},".cm-activeLine":{backgroundColor:N.activeLine},".cm-selectionMatch":{backgroundColor:N.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:N.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:N.background,color:N.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:N.background},".cm-lineNumbers .cm-gutterElement":{color:N.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:N.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:N.foreground},".cm-tooltip":{border:`1px solid ${N.dropdownBorder}`,backgroundColor:N.dropdownBackground,color:N.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:N.foreground,borderBottomColor:N.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:N.selection,color:N.foreground}}},{dark:N.dark}),lm=P.HighlightStyle.define([{tag:s.tags.keyword,color:N.keyword},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:N.variable},{tag:[s.tags.propertyName],color:N.function},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:N.string},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:N.function},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:N.constant},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:N.variable},{tag:[s.tags.className],color:N.class},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:N.number},{tag:[s.tags.typeName],color:N.type,fontStyle:N.type},{tag:[s.tags.operator,s.tags.operatorKeyword],color:N.keyword},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:N.regexp},{tag:[s.tags.meta,s.tags.comment],color:N.comment},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.link,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:N.heading},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:N.variable},{tag:s.tags.invalid,color:N.invalid},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),rm=[nm,(0,P.syntaxHighlighting)(lm)],E={name:"dracula",dark:!0,background:"#282A36",foreground:"#F8F8F2",selection:"#44475A",cursor:"#F8F8F2",dropdownBackground:"#282A36",dropdownBorder:"#191A21",activeLine:"#53576c22",lineNumber:"#6272A4",lineNumberActive:"#F8F8F2",matchingBracket:"#44475A",keyword:"#FF79C6",storage:"#FF79C6",variable:"#F8F8F2",parameter:"#F8F8F2",function:"#50FA7B",string:"#F1FA8C",constant:"#BD93F9",type:"#8BE9FD",class:"#8BE9FD",number:"#BD93F9",comment:"#6272A4",heading:"#BD93F9",invalid:"#FF5555",regexp:"#F1FA8C"},im=z.EditorView.theme({"&":{color:E.foreground,backgroundColor:E.background},".cm-content":{caretColor:E.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:E.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:E.selection},".cm-panels":{backgroundColor:E.dropdownBackground,color:E.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:E.dropdownBackground,outline:`1px solid ${E.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:E.selection},".cm-activeLine":{backgroundColor:E.activeLine},".cm-selectionMatch":{backgroundColor:E.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:E.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:E.background,color:E.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:E.background},".cm-lineNumbers .cm-gutterElement":{color:E.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:E.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:E.foreground},".cm-tooltip":{border:`1px solid ${E.dropdownBorder}`,backgroundColor:E.dropdownBackground,color:E.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:E.foreground,borderBottomColor:E.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:E.selection,color:E.foreground}}},{dark:E.dark}),sm=P.HighlightStyle.define([{tag:s.tags.keyword,color:E.keyword},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:E.variable},{tag:[s.tags.propertyName],color:E.function},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:E.string},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:E.function},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:E.constant},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:E.variable},{tag:[s.tags.className],color:E.class},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:E.number},{tag:[s.tags.typeName],color:E.type,fontStyle:E.type},{tag:[s.tags.operator,s.tags.operatorKeyword],color:E.keyword},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:E.regexp},{tag:[s.tags.meta,s.tags.comment],color:E.comment},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.link,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:E.heading},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:E.variable},{tag:s.tags.invalid,color:E.invalid},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),cm=[im,(0,P.syntaxHighlighting)(sm)],$={name:"githubLight",dark:!1,background:"#fff",foreground:"#444d56",selection:"#0366d625",cursor:"#044289",dropdownBackground:"#fff",dropdownBorder:"#e1e4e8",activeLine:"#c6c6c622",lineNumber:"#1b1f234d",lineNumberActive:"#24292e",matchingBracket:"#34d05840",keyword:"#d73a49",storage:"#d73a49",variable:"#e36209",parameter:"#24292e",function:"#005cc5",string:"#032f62",constant:"#005cc5",type:"#005cc5",class:"#6f42c1",number:"#005cc5",comment:"#6a737d",heading:"#005cc5",invalid:"#cb2431",regexp:"#032f62"},dm=z.EditorView.theme({"&":{color:$.foreground,backgroundColor:$.background},".cm-content":{caretColor:$.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:$.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:$.selection},".cm-panels":{backgroundColor:$.dropdownBackground,color:$.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:$.dropdownBackground,outline:`1px solid ${$.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:$.selection},".cm-activeLine":{backgroundColor:$.activeLine},".cm-selectionMatch":{backgroundColor:$.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:$.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:$.background,color:$.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:$.background},".cm-lineNumbers .cm-gutterElement":{color:$.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:$.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:$.foreground},".cm-tooltip":{border:`1px solid ${$.dropdownBorder}`,backgroundColor:$.dropdownBackground,color:$.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:$.foreground,borderBottomColor:$.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:$.selection,color:$.foreground}}},{dark:$.dark}),um=P.HighlightStyle.define([{tag:s.tags.keyword,color:$.keyword},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:$.variable},{tag:[s.tags.propertyName],color:$.function},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:$.string},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:$.function},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:$.constant},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:$.variable},{tag:[s.tags.className],color:$.class},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:$.number},{tag:[s.tags.typeName],color:$.type,fontStyle:$.type},{tag:[s.tags.operator,s.tags.operatorKeyword],color:$.keyword},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:$.regexp},{tag:[s.tags.meta,s.tags.comment],color:$.comment},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.link,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:$.heading},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:$.variable},{tag:s.tags.invalid,color:$.invalid},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),pm=[dm,(0,P.syntaxHighlighting)(um)],x={name:"githubDark",dark:!0,background:"#24292e",foreground:"#d1d5da",selection:"#3392FF44",cursor:"#c8e1ff",dropdownBackground:"#24292e",dropdownBorder:"#1b1f23",activeLine:"#4d566022",lineNumber:"#444d56",lineNumberActive:"#e1e4e8",matchingBracket:"#17E5E650",keyword:"#f97583",storage:"#f97583",variable:"#ffab70",parameter:"#e1e4e8",function:"#79b8ff",string:"#9ecbff",constant:"#79b8ff",type:"#79b8ff",class:"#b392f0",number:"#79b8ff",comment:"#6a737d",heading:"#79b8ff",invalid:"#f97583",regexp:"#9ecbff"},mm=z.EditorView.theme({"&":{color:x.foreground,backgroundColor:x.background},".cm-content":{caretColor:x.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:x.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:x.selection},".cm-panels":{backgroundColor:x.dropdownBackground,color:x.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:x.dropdownBackground,outline:`1px solid ${x.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:x.selection},".cm-activeLine":{backgroundColor:x.activeLine},".cm-selectionMatch":{backgroundColor:x.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:x.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:x.background,color:x.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:x.background},".cm-lineNumbers .cm-gutterElement":{color:x.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:x.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:x.foreground},".cm-tooltip":{border:`1px solid ${x.dropdownBorder}`,backgroundColor:x.dropdownBackground,color:x.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:x.foreground,borderBottomColor:x.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:x.selection,color:x.foreground}}},{dark:x.dark}),hm=P.HighlightStyle.define([{tag:s.tags.keyword,color:x.keyword},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:x.variable},{tag:[s.tags.propertyName],color:x.function},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:x.string},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:x.function},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:x.constant},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:x.variable},{tag:[s.tags.className],color:x.class},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:x.number},{tag:[s.tags.typeName],color:x.type,fontStyle:x.type},{tag:[s.tags.operator,s.tags.operatorKeyword],color:x.keyword},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:x.regexp},{tag:[s.tags.meta,s.tags.comment],color:x.comment},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.link,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:x.heading},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:x.variable},{tag:s.tags.invalid,color:x.invalid},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),gm=[mm,(0,P.syntaxHighlighting)(hm)],D={name:"aura",dark:!0,background:"#21202e",foreground:"#edecee",selection:"#3d375e7f",cursor:"#a277ff",dropdownBackground:"#21202e",dropdownBorder:"#3b334b",activeLine:"#4d4b6622",lineNumber:"#a394f033",lineNumberActive:"#cdccce",matchingBracket:"#a394f033",keyword:"#a277ff",storage:"#a277ff",variable:"#edecee",parameter:"#edecee",function:"#ffca85",string:"#61ffca",constant:"#61ffca",type:"#82e2ff",class:"#82e2ff",number:"#61ffca",comment:"#6d6d6d",heading:"#a277ff",invalid:"#ff6767",regexp:"#61ffca"},fm=z.EditorView.theme({"&":{color:D.foreground,backgroundColor:D.background},".cm-content":{caretColor:D.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:D.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:D.selection},".cm-panels":{backgroundColor:D.dropdownBackground,color:D.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:D.dropdownBackground,outline:`1px solid ${D.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:D.selection},".cm-activeLine":{backgroundColor:D.activeLine},".cm-selectionMatch":{backgroundColor:D.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:D.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:D.background,color:D.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:D.background},".cm-lineNumbers .cm-gutterElement":{color:D.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:D.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:D.foreground},".cm-tooltip":{border:`1px solid ${D.dropdownBorder}`,backgroundColor:D.dropdownBackground,color:D.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:D.foreground,borderBottomColor:D.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:D.selection,color:D.foreground}}},{dark:D.dark}),vm=P.HighlightStyle.define([{tag:s.tags.keyword,color:D.keyword},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:D.variable},{tag:[s.tags.propertyName],color:D.function},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:D.string},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:D.function},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:D.constant},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:D.variable},{tag:[s.tags.className],color:D.class},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:D.number},{tag:[s.tags.typeName],color:D.type,fontStyle:D.type},{tag:[s.tags.operator,s.tags.operatorKeyword],color:D.keyword},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:D.regexp},{tag:[s.tags.meta,s.tags.comment],color:D.comment},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.link,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:D.heading},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:D.variable},{tag:s.tags.invalid,color:D.invalid},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Cm=[fm,(0,P.syntaxHighlighting)(vm)],T={name:"tokyoNight",dark:!0,background:"#1a1b26",foreground:"#787c99",selection:"#515c7e40",cursor:"#c0caf5",dropdownBackground:"#1a1b26",dropdownBorder:"#787c99",activeLine:"#43455c22",lineNumber:"#363b54",lineNumberActive:"#737aa2",matchingBracket:"#16161e",keyword:"#bb9af7",storage:"#bb9af7",variable:"#c0caf5",parameter:"#c0caf5",function:"#7aa2f7",string:"#9ece6a",constant:"#bb9af7",type:"#0db9d7",class:"#c0caf5",number:"#ff9e64",comment:"#444b6a",heading:"#89ddff",invalid:"#ff5370",regexp:"#b4f9f8"},km=z.EditorView.theme({"&":{color:T.foreground,backgroundColor:T.background},".cm-content":{caretColor:T.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:T.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:T.selection},".cm-panels":{backgroundColor:T.dropdownBackground,color:T.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:T.dropdownBackground,outline:`1px solid ${T.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:T.selection},".cm-activeLine":{backgroundColor:T.activeLine},".cm-selectionMatch":{backgroundColor:T.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:T.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:T.background,color:T.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:T.background},".cm-lineNumbers .cm-gutterElement":{color:T.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:T.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:T.foreground},".cm-tooltip":{border:`1px solid ${T.dropdownBorder}`,backgroundColor:T.dropdownBackground,color:T.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:T.foreground,borderBottomColor:T.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:T.selection,color:T.foreground}}},{dark:T.dark}),bm=P.HighlightStyle.define([{tag:s.tags.keyword,color:T.keyword},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:T.variable},{tag:[s.tags.propertyName],color:T.function},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:T.string},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:T.function},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:T.constant},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:T.variable},{tag:[s.tags.className],color:T.class},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:T.number},{tag:[s.tags.typeName],color:T.type,fontStyle:T.type},{tag:[s.tags.operator,s.tags.operatorKeyword],color:T.keyword},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:T.regexp},{tag:[s.tags.meta,s.tags.comment],color:T.comment},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.link,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:T.heading},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:T.variable},{tag:s.tags.invalid,color:T.invalid},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),ym=[km,(0,P.syntaxHighlighting)(bm)],I={name:"tokyoNightStorm",dark:!0,background:"#24283b",foreground:"#7982a9",selection:"#6f7bb630",cursor:"#c0caf5",dropdownBackground:"#24283b",dropdownBorder:"#7982a9",activeLine:"#4d547722",lineNumber:"#3b4261",lineNumberActive:"#737aa2",matchingBracket:"#1f2335",keyword:"#bb9af7",storage:"#bb9af7",variable:"#c0caf5",parameter:"#c0caf5",function:"#7aa2f7",string:"#9ece6a",constant:"#bb9af7",type:"#2ac3de",class:"#c0caf5",number:"#ff9e64",comment:"#565f89",heading:"#89ddff",invalid:"#ff5370",regexp:"#b4f9f8"},wm=z.EditorView.theme({"&":{color:I.foreground,backgroundColor:I.background},".cm-content":{caretColor:I.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:I.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:I.selection},".cm-panels":{backgroundColor:I.dropdownBackground,color:I.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:I.dropdownBackground,outline:`1px solid ${I.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:I.selection},".cm-activeLine":{backgroundColor:I.activeLine},".cm-selectionMatch":{backgroundColor:I.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:I.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:I.background,color:I.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:I.background},".cm-lineNumbers .cm-gutterElement":{color:I.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:I.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:I.foreground},".cm-tooltip":{border:`1px solid ${I.dropdownBorder}`,backgroundColor:I.dropdownBackground,color:I.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:I.foreground,borderBottomColor:I.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:I.selection,color:I.foreground}}},{dark:I.dark}),_m=P.HighlightStyle.define([{tag:s.tags.keyword,color:I.keyword},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:I.variable},{tag:[s.tags.propertyName],color:I.function},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:I.string},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:I.function},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:I.constant},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:I.variable},{tag:[s.tags.className],color:I.class},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:I.number},{tag:[s.tags.typeName],color:I.type,fontStyle:I.type},{tag:[s.tags.operator,s.tags.operatorKeyword],color:I.keyword},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:I.regexp},{tag:[s.tags.meta,s.tags.comment],color:I.comment},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.link,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:I.heading},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:I.variable},{tag:s.tags.invalid,color:I.invalid},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Vm=[wm,(0,P.syntaxHighlighting)(_m)],L={name:"tokyoNightDay",dark:!1,background:"#e1e2e7",foreground:"#6a6f8e",selection:"#8591b840",cursor:"#3760bf",dropdownBackground:"#e1e2e7",dropdownBorder:"#6a6f8e",activeLine:"#a7aaba22",lineNumber:"#b3b6cd",lineNumberActive:"#68709a",matchingBracket:"#e9e9ec",keyword:"#9854f1",storage:"#9854f1",variable:"#3760bf",parameter:"#3760bf",function:"#2e7de9",string:"#587539",constant:"#9854f1",type:"#07879d",class:"#3760bf",number:"#b15c00",comment:"#9da3c2",heading:"#006a83",invalid:"#ff3e64",regexp:"#2e5857"},Sm=z.EditorView.theme({"&":{color:L.foreground,backgroundColor:L.background},".cm-content":{caretColor:L.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:L.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:L.selection},".cm-panels":{backgroundColor:L.dropdownBackground,color:L.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:L.dropdownBackground,outline:`1px solid ${L.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:L.selection},".cm-activeLine":{backgroundColor:L.activeLine},".cm-selectionMatch":{backgroundColor:L.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:L.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:L.background,color:L.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:L.background},".cm-lineNumbers .cm-gutterElement":{color:L.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:L.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:L.foreground},".cm-tooltip":{border:`1px solid ${L.dropdownBorder}`,backgroundColor:L.dropdownBackground,color:L.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:L.foreground,borderBottomColor:L.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:L.selection,color:L.foreground}}},{dark:L.dark}),Bm=P.HighlightStyle.define([{tag:s.tags.keyword,color:L.keyword},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:L.variable},{tag:[s.tags.propertyName],color:L.function},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:L.string},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:L.function},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:L.constant},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:L.variable},{tag:[s.tags.className],color:L.class},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:L.number},{tag:[s.tags.typeName],color:L.type,fontStyle:L.type},{tag:[s.tags.operator,s.tags.operatorKeyword],color:L.keyword},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:L.regexp},{tag:[s.tags.meta,s.tags.comment],color:L.comment},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.link,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:L.heading},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:L.variable},{tag:s.tags.invalid,color:L.invalid},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Nm=[Sm,(0,P.syntaxHighlighting)(Bm)],Em={disabled:!1,indentWithTab:!0,tabSize:4,autofocus:!1,placeholder:"input...",backgroundColor:"white",language:"markdown",theme:"oneDark",phrases:"en-us"},oa={emits:["update:config"],components:{CodemirrorEditor:Op},data(){return{codemrrConfig:{...Em},codemrrThemes:{oneDark:Xp,materialLight:Zp,materialDark:em,solarizedLight:am,solarizedDark:rm,dracula:cm,githubLight:pm,githubDark:gm,aura:Cm,tokyoNight:ym,tokyoNightStorm:Vm,tokyoNightDay:Nm},codemrrLanguages:{javascript:(0,vo.javascript)(),js:(0,vo.javascript)(),html:(0,La.html)(),markdown:(0,Pa.markdown)(),json:(0,Fa.json)(),vue:(0,Oa.vue)(),java:(0,za.java)(),php:(0,Ma.php)(),python:(0,Aa.python)(),go:(0,ja.go)(),mysql:(0,Co.sql)(),sql:(0,Co.sql)(),xml:(0,Ha.xml)(),css:(0,Ra.css)()},codemrrPhrases:{"Control character":"Steuerzeichen","Selection deleted":"Auswahl gelöscht","Folded lines":"Eingeklappte Zeilen","Unfolded lines":"Ausgeklappte Zeilen",to:"bis","folded code":"eingeklappter Code",unfold:"ausklappen","Fold line":"Zeile einklappen","Unfold line":"Zeile ausklappen","Go to line":"Springe zu Zeile",go:"OK",Find:"Suchen",Replace:"Ersetzen",next:"nächste",previous:"vorherige",all:"alle","match case":"groß/klein beachten","by word":"ganze Wörter",replace:"ersetzen","replace all":"alle ersetzen",close:"schließen","current match":"aktueller Treffer","replaced $ matches":"$ Treffer ersetzt","replaced match on line $":"Treffer on Zeile $ ersetzt","on line":"auf Zeile",Completions:"Vervollständigungen",Diagnostics:"Diagnosen","No diagnostics":"Keine Diagnosen"},editorViewInst:null,editorStateInst:null}},computed:{optionTheme(){let e=Object.keys(this.codemrrThemes);return["default"].concat(e)},optionPhrases(){return["en-us","de-de"]},optionLanguage(){return Object.keys(this.codemrrLanguages)},extensions(){const e=[];return e.push(this.codemrrLanguages[this.codemrrConfig.language]),this.codemrrThemes[this.codemrrConfig.theme]&&e.push(this.codemrrThemes[this.codemrrConfig.theme]),e},codemrrBind(){return{theme:this.codemrrConfig.theme,language:this.codemrrConfig.language,autofocus:this.codemrrConfig.autofocus,placeholder:this.codemrrConfig.placeholder,indentWithTab:this.codemrrConfig.indentWithTab,tabSize:this.codemrrConfig.tabSize,disabled:this.codemrrConfig.disabled,phrases:this.codemrrConfig.phrases==="en-us"?{}:this.codemrrPhrases}}},watch:{codemrrConfig(e){this.$emit("update:config",e)}}},Q={props:{editorID:{type:[String],required:!1,default(){return""}}},data(){return{editorRefEL:null}},computed:{editorRefID(){return this.editorID?this.editorID:this.$options.name+ +new Date+((Math.random()*1e3).toFixed(0)+"")}}};function aa(e,o){var a=document.createElement("a");if(a.setAttribute("href","data:text/plain;charset=UTF-8,"+encodeURIComponent(e)),a.setAttribute("download",o),a.style.display="none",document.createEvent){const r=document.createEvent("MouseEvents");r.initEvent("click",!0,!0),a.dispatchEvent(r)}else a.click()}function le(e){return e<10?"0"+e:e}var $m={undo:!1,redo:!1,strong:!0,italic:!0,overline:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,hr:!0,quote:!0,ul:!0,ol:!0,notChecked:!0,checked:!0,link:!0,table:!0,image:!0,uploadImage:!0,custom_image:!0,custom_uploadImage:!0,custom_uploadFile:!0,importmd:!0,exportmd:!0,code:!0,html_to_markdown:!0,split:!0,preview:!0,scrollSync:!0,save:!0,clear:!0,copy:!0,toc:!0,fullscreen:!0,theme:!0,backgroundColor:!1,language:!1,phrases:!1,disabled:!1,autofocus:!1,indentWithTab:!1},xm={name:"SvgImgMap"},Dm={t:"1713021153946",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1924",width:"20",height:"20"};function Tm(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",Dm,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{d:"M659.456 786.432l-114.688-188.416c-4.10112-8.192-8.19712-12.28288-16.384-12.28288-4.096 0-8.19712 4.096-12.288 4.096l-57.344 57.344-61.44-90.11712c-4.096-8.192-8.192-12.28288-16.384-12.28288s-12.288 4.096-16.384 8.192l-151.552 225.28c0 4.096-4.096 8.192-4.096 12.288 0 12.28288 8.192 20.48 20.48 20.48h413.696c12.288 0 20.48-8.19712 20.48-20.48l-4.096-4.10112zM286.72 512c40.96 0 73.728-32.768 73.728-73.728S327.68 364.544 286.72 364.544s-73.728 32.768-73.728 73.728C208.896 479.232 245.76 512 286.72 512zM851.968 98.304H323.584c-40.96 0-73.728 32.768-73.728 73.728v20.48c0 12.288 8.192 20.48 20.48 20.48s16.384-12.288 16.384-20.48v-20.48c0-20.48 16.384-36.864 36.864-36.864h528.384c20.48 0 36.85888 16.384 36.85888 36.864v528.384c0 20.48-16.37888 36.864-36.85888 36.864h-20.48c-12.288 0-20.48 8.192-20.48 20.48s8.192 20.48 20.48 20.48h20.48c40.96 0 73.72288-32.768 73.72288-73.728v-532.48c0.00512-40.96-32.76288-73.728-73.72288-73.728z","p-id":"1925"},null,-1),(0,t.createElementVNode)("path",{d:"M700.416 249.856H172.032c-40.96 0-73.728 32.768-73.728 73.728v528.384c0 40.96 32.768 73.72288 73.728 73.72288h528.384c40.96 0 73.728-32.76288 73.728-73.72288V323.584c0-40.96-32.768-73.728-73.728-73.728z m36.864 602.112c0 20.48-16.384 36.85888-36.864 36.85888H172.032c-20.48 0-36.864-16.37888-36.864-36.85888V323.584c0-20.48 16.384-36.864 36.864-36.864h528.384c20.48 0 36.864 16.384 36.864 36.864v528.384z","p-id":"1926"},null,-1)])])}var Im=f(xm,[["render",Tm]]),Lm={name:"SvgUploadFile"},Fm={t:"1599285632421",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"45640",width:"17",height:"17"};function Pm(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",Fm,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{d:"M127.519 892.879v-763.34h655.448V514.69h63.612V81.831c0-8.783-7.12-15.903-15.903-15.903H79.81c-8.783 0-15.903 7.12-15.903 15.903v858.757c0 8.783 7.12 15.903 15.903 15.903h493.993v-63.612H127.519z","p-id":"45641"},null,-1),(0,t.createElementVNode)("path",{d:"M231.608 228.388h447.269V292H231.608zM231.608 384.409h447.269v63.612H231.608zM231.608 540.43h245.141v63.612H231.608zM231.608 696.451h245.141v63.612H231.608zM923.269 762.938L745.315 584.984c-3.545-3.545-8.34-5.074-12.966-4.596a15.931 15.931 0 0 0-9.848 4.616L544.586 762.918c-6.248 6.248-6.248 16.379 0 22.627l22.353 22.353c6.248 6.248 16.379 6.248 22.627 0l112.555-112.555v245.148c0 8.837 7.163 16 16 16h31.612c8.837 0 16-7.163 16-16V695.363l112.555 112.555c6.248 6.248 16.379 6.248 22.627 0l22.353-22.353c6.249-6.248 6.249-16.378 0.001-22.627z","p-id":"45642"},null,-1)])])}var Om=f(Lm,[["render",Pm]]),Mm={name:"SvgToc"},zm={t:"1611551476626",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4615",width:"22",height:"22"};function Am(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",zm,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{d:"M370.1 371.5h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.1-2.6 5.7-5.7 5.7z m333.5-7.6H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.2-2.7 5.7-5.8 5.7zM370.1 712.4h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.2-2.6 5.7-5.7 5.7z m333.5-7.5H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.1-2.7 5.7-5.8 5.7zM370.1 542.5h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.1-2.6 5.7-5.7 5.7z m333.5-7.6H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.2-2.7 5.7-5.8 5.7z","p-id":"4616"},null,-1),(0,t.createElementVNode)("path",{d:"M847.1 560.4V250.1s0-24.7-14-46.4c-10.8-16.8-30-31.8-64.2-31.8h-261c-0.2 0-0.3 0-0.5 0.1H255s-78.1 0-78.1 78.1l0.1 213.4V774s0 24.7 13.9 46.3c10.8 16.8 30 31.8 64.2 31.8h261.1c0.2 0 0.3 0 0.5-0.1H769s78.1 0 78.1-78.1l-0.1-213.4 0.1-0.1z m-39 213.6c-1.3 38.5-38.9 39-38.9 39h-514c-1.3-0.1-2.5-0.2-3.8-0.3-5.4-1.1-15.7-4.1-23.9-11.7-9-9.7-11.2-22.3-11.7-26.1v-0.7l0.1-524.2c1.3-38.5 38.9-39 38.9-39h514c1.3 0.1 2.5 0.2 3.7 0.3 5.4 1.1 15.7 4.1 23.9 11.7 9 9.7 11.2 22.2 11.7 26 0 0.2 0 0.5 0.1 0.7l-0.1 524.3z","p-id":"4617"},null,-1)])])}var Hm=f(Mm,[["render",Am]]),jm={name:"SvgCopy"},Rm={t:"1713097613984",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"6856",width:"18",height:"18"};function Um(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",Rm,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{d:"M857.373005 65.290005 469.604424 65.290005c-34.211173 0-62.044078 27.832905-62.044078 62.043055l0 10.340509-63.076594 0c-25.993001 0-48.228421 16.346293-57.001225 39.293935L166.626995 176.967504c-34.21015 0-62.043055 27.832905-62.043055 62.043055l0 657.655358c0 34.21015 27.832905 62.043055 62.043055 62.043055l550.115086 0c34.21015 0 62.043055-27.832905 62.043055-62.043055l0-49.634444 78.587869 0c34.21015 0 62.043055-27.832905 62.043055-62.043055L919.41606 127.33306C919.41606 93.122911 891.583155 65.290005 857.373005 65.290005zM344.483752 179.035606l194.402595 0c10.833743 0 19.646456 8.813736 19.646456 19.646456 0 10.833743-8.813736 19.646456-19.646456 19.646456L344.483752 218.328517c-10.833743 0-19.646456-8.813736-19.646456-19.646456C324.836273 187.849342 333.650009 179.035606 344.483752 179.035606zM737.423099 896.665917c0 11.402701-9.278317 20.681018-20.681018 20.681018L166.626995 917.346935c-11.403724 0-20.681018-9.278317-20.681018-20.681018L145.945977 239.010559c0-11.402701 9.277294-20.681018 20.681018-20.681018l120.111588 0c8.197706 24.02723 30.977525 41.362037 57.744145 41.362037l194.402595 0c26.767644 0 49.54644-17.334807 57.744145-41.362037l120.111588 0c11.402701 0 20.681018 9.278317 20.681018 20.681018L737.422076 896.665917zM878.054023 784.988418c0 11.402701-9.278317 20.681018-20.681018 20.681018l-78.587869 0L778.785136 239.010559c0-34.21015-27.832905-62.043055-62.043055-62.043055L595.886549 176.967504c-8.771781-22.947641-31.007201-39.293935-57.001225-39.293935l-89.963964 0L448.921359 127.33306c0-11.403724 9.278317-20.681018 20.683065-20.681018l387.768581 0c11.402701 0 20.681018 9.277294 20.681018 20.681018L878.054023 784.988418z","p-id":"6857"},null,-1),(0,t.createElementVNode)("path",{d:"M620.597347 334.252737 260.748652 334.252737c-11.422144 0-20.681018 9.259898-20.681018 20.681018s9.258874 20.681018 20.681018 20.681018l359.849718 0c11.42112 0 20.681018-9.259898 20.681018-20.681018S632.018467 334.252737 620.597347 334.252737z","p-id":"6858"},null,-1),(0,t.createElementVNode)("path",{d:"M620.597347 454.201619 260.748652 454.201619c-11.422144 0-20.681018 9.259898-20.681018 20.681018 0 11.42112 9.258874 20.681018 20.681018 20.681018l359.849718 0c11.42112 0 20.681018-9.259898 20.681018-20.681018C641.278365 463.46254 632.018467 454.201619 620.597347 454.201619z","p-id":"6859"},null,-1),(0,t.createElementVNode)("path",{d:"M440.673511 574.151525 260.748652 574.151525c-11.422144 0-20.681018 9.259898-20.681018 20.681018 0 11.42112 9.258874 20.681018 20.681018 20.681018l179.924859 0c11.42112 0 20.681018-9.259898 20.681018-20.681018C461.35453 583.411423 452.093609 574.151525 440.673511 574.151525z","p-id":"6860"},null,-1)])])}var Wm=f(jm,[["render",Um]]),Ym={name:"SvgLanguage"},qm={t:"1713109019954",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"13071",width:"18",height:"18"};function Xm(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",qm,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{d:"M200.313605 806.764028h487.993851v78.708685h-487.993851z",fill:"#6C7280","p-id":"13072"},null,-1),(0,t.createElementVNode)("path",{d:"M809.518832 136.166026H79.102229a78.708686 78.708686 0 0 0-78.708686 78.708686V944.504228a78.708686 78.708686 0 0 0 78.708686 78.708685h730.416603a78.708686 78.708686 0 0 0 78.708685-78.708685V214.874712a78.708686 78.708686 0 0 0-78.708685-78.708686z m0 848.479631V944.504228H79.102229V214.874712h730.416603V944.504228z","p-id":"13073"},null,-1),(0,t.createElementVNode)("path",{d:"M944.897771 0H171.978478v78.708686H944.897771v787.086856h78.708686V78.708686a78.708686 78.708686 0 0 0-78.708686-78.708686z","p-id":"13074"},null,-1),(0,t.createElementVNode)("path",{d:"M360.092237 609.205227h161.352805l44.863951 117.275941h58.244427l-157.417371-385.672559h-55.09608L263.280553 725.694081H315.228286z m57.45734-157.417372a487.206764 487.206764 0 0 0 20.464259-73.986164q8.657955 31.483474 27.548039 78.708686l40.14143 107.043812H375.046887z","p-id":"13075"},null,-1)])])}var Km=f(Ym,[["render",Xm]]),uo={components:{SvgImgMap:Im,SvgUploadFile:Om,SvgToc:Hm,SvgCopy:Wm,SvgLanguage:Km},emits:["on-action","on-act-copy","on-act-save","on-act-theme","on-act-custom","on-act-choose-image"],props:{exportFileName:{type:String,default:""},toolbars:{type:Object,default(){return{}}},isPreview:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1}},data(){return{actionThemeDropdown:!1,actionPhrasesDropdown:!1,actionLanguageDropdown:!1,actionBgColorDropdown:!1,actionSplit:!0,actionPreview:!1,actionScrollSync:!0,actionToc:!0,actionFullscreen:!1,actionHtmlDiaVisible:!1,actionHtmlText:""}},computed:{lastExpFileName(){let e=new Date,o=e.getFullYear(),a=e.getMonth()+1,r=e.getDate(),n=e.getHours(),l=e.getMinutes(),i=o+"-"+le(a)+"-"+le(r)+"_"+le(n)+"-"+le(l);return this.exportFileName||i},toolConfig(){const{toolbars:e={}}=this;return{...$m,...e}}},created(){this.actionPreview=this.isPreview||!1},methods:{actionPhrasesSet(e){this.codemrrConfig.phrases=e,this.actionPhrasesDropdown=!1},actionLanguageSet(e){this.codemrrConfig.language=e,this.actionLanguageDropdown=!1},actionBgColorSet(e){this.codemrrConfig.backgroundColor=e,this.actionBgColorDropdown=!1},actionThemesSet(e){this.codemrrConfig.theme=e,this.actionThemeDropdown=!1,this.$emit("on-act-theme",e)},actionFullscreenSet(e){this.actionFullscreen=e;let o=this.$refs[this.editorWrapRefID];e?o.classList.add("fullscreen"):o.classList.remove("fullscreen"),this.actionCurrent("fullscreen",e)},actionChooseImage(){const e=document.createElement("input");e.type="file",e.accept="image/*",e.onchange=()=>{const o=e.files;o[0]&&(this.$emit("on-act-choose-image",o[0]),e.value="")},e.click()},actionInsBg(){const e=this.getLastPoint(),o=e.content||!1;o?this.insertContent("=="+o+"=="):(this.insertContent("===="),this.setCursor(e.line,e.ch+1))},actionUndo(){if(this.editorViewInst){const e=this.editorViewInst.state.behavior(U.EditorState.effect(U.EditorState.undo));this.editorViewInst.update([{changes:{from:0,to:e.doc.length,insert:e.doc},selection:U.EditorSelection.single(0)}])}},actionRedo(){this.editorViewInst&&this.editorViewInst.dispatch({...this.editorViewInst.state,effects:U.EditorState.redo()})},actionInsStrong(){const e=this.getLastPoint(),o=e.content||!1;let a="";o?(a="**"+o+"**",this.deleteContent(e.start,e.end),this.insertContent(e.start,a)):(a="****",this.insertContent(e.start,a)),this.setCursor(e.start+a.length,e.start+a.length)},actionInsItalic(){const e=this.getLastPoint(),o=e.content||!1;let a="";o?(a="*"+o+"*",this.deleteContent(e.start,e.end),this.insertContent(e.start,a)):(a="**",this.insertContent(e.start,a)),this.setCursor(e.start+a.length,e.start+a.length)},actionInsOverline(){const e=this.getLastPoint(),o=e.content||!1;let a="";o?(a="~~"+o+"~~",this.deleteContent(e.start,e.end),this.insertContent(e.start,a)):(a="~~~~",this.insertContent(e.start,a)),this.setCursor(e.start+a.length,e.start+a.length)},actionInsUnderline(){const e=this.getLastPoint(),o=e.content||!1;let a="";o?(a="<u>"+o+"</u>",this.deleteContent(e.start,e.end),this.insertContent(e.start,a)):(a="<u></u>",this.insertContent(e.start,a)),this.setCursor(e.start+a.length,e.start+a.length)},actionInsTitle(e){const o={1:"# ",2:"## ",3:"### ",4:"#### ",5:"##### ",6:"###### "}[e],a=this.getLastPoint(),r=a.content||!1;let n=`
1
+ var Sn=Object.create;var sa=Object.defineProperty;var Nn=Object.getOwnPropertyDescriptor;var En=Object.getOwnPropertyNames;var xn=Object.getPrototypeOf,$n=Object.prototype.hasOwnProperty;var Dn=(e,o,a,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(let n of En(o))!$n.call(e,n)&&n!==a&&sa(e,n,{get:()=>o[n],enumerable:!(r=Nn(o,n))||r.enumerable});return e};var xo=(e,o,a)=>(a=e!=null?Sn(xn(e)):{},Dn(o||!e||!e.__esModule?sa(a,"default",{value:e,enumerable:!0}):a,e));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var Tn=Object.create,Oa=Object.defineProperty,Ln=Object.getOwnPropertyDescriptor,In=Object.getOwnPropertyNames,Fn=Object.getPrototypeOf,Pn=Object.prototype.hasOwnProperty,An=(e,o,a,r)=>{if(o&&typeof o=="object"||typeof o=="function")for(var n=In(o),l=0,s=n.length,c;l<s;l++)c=n[l],!Pn.call(e,c)&&c!==a&&Oa(e,c,{get:(d=>o[d]).bind(null,c),enumerable:!(r=Ln(o,c))||r.enumerable});return e},Mn=(e,o,a)=>(a=e!=null?Tn(Fn(e)):{},An(o||!e||!e.__esModule?Oa(a,"default",{value:e,enumerable:!0}):a,e));let b=require("element-plus"),t=require("vue"),zn=require("codemirror"),X=require("@codemirror/state"),U=require("@codemirror/view"),On=require("@codemirror/commands"),j=require("@codemirror/language"),i=require("@lezer/highlight"),ca=require("@codemirror/lang-javascript"),jn=require("@codemirror/lang-html"),Rn=require("@codemirror/lang-json"),Hn=require("@codemirror/lang-markdown"),Un=require("@codemirror/lang-vue"),Wn=require("@codemirror/lang-php"),qn=require("@codemirror/lang-java"),da=require("@codemirror/lang-sql"),Kn=require("@codemirror/lang-python"),Gn=require("@codemirror/lang-xml"),Yn=require("@codemirror/lang-go"),Zn=require("@codemirror/lang-css"),Ho=require("html-to-md");Ho=Mn(Ho);var y=(e,o)=>{const a=e.__vccOpts||e;for(const[r,n]of o)a[r]=n;return a},Qn={name:"cvBadge",extends:{ExtendBadge:b.ElBadge},props:{...b.ElBadge.props},created(){},computed:{isShow(){return this.value?!(this.value>0):!0}},data(){return{}}};function Xn(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-badge");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{hidden:l.isShow}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16,["hidden"])}var Te=y(Qn,[["render",Xn]]);Te.install=function(e){e.component(Te.name,Te)};var Jn={name:"cvRow",props:{gutter:{type:[Number,String],default:0},type:{type:[String],default:""},justify:{type:[String],default:"start"},align:{type:[String],default:"top"},tag:{type:[String],default:"div"}},data(){return{}},methods:{}};function el(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-row");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({class:"cv-row"},{type:a.type,justify:a.justify,align:a.align,tag:a.tag},{gutter:parseInt(a.gutter)}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16,["gutter"])}var Le=y(Jn,[["render",el]]),tl={name:"cvCol",props:{span:{type:[Number,String],default:24},offset:{type:[Number,String],default:0}},data(){return{}},methods:{}};function ol(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-col");return(0,t.openBlock)(),(0,t.createBlock)(s,{class:"cv-col",span:parseInt(a.span),offset:parseInt(a.offset)},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},8,["span","offset"])}var Ie=y(tl,[["render",ol]]);Le.install=function(e){e.component(Le.name,Le)};Ie.install=function(e){e.component(Ie.name,Ie)};var al={name:"cvBtnBase",emits:["click"],props:{...b.ElButton.props,autoLoading:{type:Boolean,default:!1},svg:{type:[String],default:""}},data(){return{loadingStatus:!1}},computed:{filteredProps(){const{autoLoading:e,...o}=this.$props;return o},hasDefaultContent(){const e=this.$slots.default?.();return e&&e.length>0}},methods:{handleClick(e){this.autoLoading&&(this.loadingStatus=!0);try{this.$emit("click",()=>{this.loadingStatus=!1})}catch(o){throw this.loadingStatus=!1,o}}}};function nl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("cv-mask-svg"),c=(0,t.resolveComponent)("el-button");return e.$slots.default||l.hasDefaultContent?((0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({key:0,class:"cv-btn"},l.filteredProps,{loading:n.loadingStatus,onClick:l.handleClick}),(0,t.createSlots)({default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:2},[a.svg?{name:"icon",fn:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{name:a.svg,size:"14",color:"currentColor"},null,8,["name"])]),key:"0"}:void 0]),1040,["loading","onClick"])):((0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({key:1,class:"cv-btn"},l.filteredProps,{loading:n.loadingStatus,onClick:l.handleClick}),(0,t.createSlots)({_:2},[a.svg?{name:"icon",fn:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{name:a.svg,size:"14",color:"currentColor"},null,8,["name"])]),key:"0"}:void 0]),1040,["loading","onClick"]))}var Fe=y(al,[["render",nl]]),ll={name:"cvBtnText",emits:["click"],props:{...b.ElButton.props,autoLoading:{type:Boolean,default:!1},svg:{type:[String],default:""}},data(){return{loadingStatus:!1}},methods:{handleClick(e){this.autoLoading&&(this.loadingStatus=!0);try{this.$emit("click",()=>{this.loadingStatus=!1})}catch(o){throw this.loadingStatus=!1,o}}}};function rl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("cv-mask-svg"),c=(0,t.resolveComponent)("el-button");return(0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({class:"cv-btn"},e.$props,{link:"",loading:n.loadingStatus,onClick:l.handleClick}),(0,t.createSlots)({default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:2},[a.svg?{name:"icon",fn:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{name:a.svg,size:"14",color:"currentColor"},null,8,["name"])]),key:"0"}:void 0]),1040,["loading","onClick"])}var Pe=y(ll,[["render",rl]]);Fe.install=function(e){e.component(Fe.name,Fe)};Pe.install=function(e){e.component(Pe.name,Pe)};var il={name:"cvAutocompleteBase",props:{...b.ElAutocomplete.props},data(){return{localVal:"",loadingStatus:!1}},created(){},methods:{async querySearchAsync(e,o){}}};function sl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-autocomplete");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>n.localVal=c)},e.$props,{"fetch-suggestions":l.querySearchAsync}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16,["modelValue","fetch-suggestions"])}var Ae=y(il,[["render",sl]]),vo={props:{compConfig:{},dataParse:{type:[Function],default:()=>null}},data(){return{searchData:{},loadDataLoading:!1,loadDataList:[],loadDataTotal:0,loadPageCurr:1,loadPageLimit:10,loadConfigSetting:{},loadConfigDef:{pageCurr:1,pageLimit:10,isSkip:!1,url:null,apiFunc:null,mockData:null,where:{},response:{statusName:"status",statusCode:200,msgName:"msg",countName:"total",dataName:"data"},request:{pageName:"page",limitName:"pagesize"}}}},methods:{loadEnding(){this.loadDataLoading=!1,this.$nextTick(()=>{this.loadDataLoading=!1})},loadGetData(){if(this.loadDataLoading=!0,this.loadConfigSetting.apiFunc&&typeof this.loadConfigSetting.apiFunc=="function"){const e=this.loadConfigSetting;let o={...e.where};o[e.request.pageName]=this.loadPageCurr,o[e.request.limitName]=this.loadPageLimit,o=Object.assign(o,this.searchData),this.loadConfigSetting.apiFunc(o).then(a=>{this.loadPageCurr=o[e.request.pageName],this.loadEnding();let r=this.sortOutData(a);if(r.status!=e.response.statusCode){ExtendMessage({message:r.msg,type:"error",duration:1300});return}if(r.data.length===0){ExtendMessage({message:"没有更多数据了",type:"warning",duration:1300});return}let n=r[e.response.dataName]||[];this.dataParse&&typeof this.dataParse=="function"&&(n=this.dataParse.call(null,n)),this.loadDataList.push(...n),this.loadDataTotal=r[e.response.countName]||0}).catch(a=>{this.loadEnding()})}else this.loadDataList.length>0&&(this.loadDataTotal=this.loadDataList.length),this.loadEnding()},sortOutData(e){let o=this.loadConfigSetting.response,a={},r=[],n=[];a.status=e[o.statusName],a.msg=e[o.msgName],a.total=e[o.countName],r=e[o.dataName];for(let l in r)n[l]=r[l];return a.data=n,a}}},cl={name:"cvAutocompleteLoad",mixins:[vo],emits:["update:modelValue","input"],props:{...b.ElAutocomplete.props,modelValue:{type:[String,Object,Number],default:()=>({})},placeholder:{type:[String],default:"请输入内容"},popperClass:{type:[String],default:"cv-autocomplete-load"},clearable:{type:[Boolean],default:!0},triggerOnFocus:!1,debounce:500,refID:{type:[String],required:!1,default(){return"cvAutocompleteLoad-"+ +new Date+((Math.random()/1e4).toFixed(0)+"")}},compConfig:{type:[Object],default:()=>({})}},data(){return{localVal:"",searchList:[],compConfigDef:{searchField:["value"]},timeout:null,loadingMore:!1}},directives:{loadmore:{mounted(e,o){const r=((l,s)=>{let c=null;return function(...d){c&&clearTimeout(c),c=setTimeout(()=>{l.apply(this,d)},s)}})(l=>{const{scrollTop:s,scrollHeight:c,clientHeight:d}=l.target;c-(s+d)<10&&!o.instance.loading&&o.value()},200),n=new MutationObserver(()=>{const l=e.querySelector(".el-autocomplete-suggestion__wrap");l&&!e.__scrollHandler__&&(l.addEventListener("scroll",r),e.__scrollHandler__=r,n.disconnect())});n.observe(e,{childList:!0,subtree:!0})},beforeUnmount(e){if(e.__scrollHandler__){const o=e.querySelector(".el-autocomplete-suggestion__wrap");o&&o.removeEventListener("scroll",e.__scrollHandler__),delete e.__scrollHandler__}}}},created(){this.initConfAll(),this.getData()},methods:{initConfAll(){let e={};Object.assign(e,this.loadConfigDef,this.compConfigDef,this.compConfig),this.loadPageCurr=e.pageCurr||1,this.loadPageLimit=e.pageLimit||10,Object.assign(e.where,this.searchData),this.loadConfigSetting=e},getMoreData(){if(!(this.loadingMore||this.loadDataList.length>=this.loadDataTotal))try{this.loadingMore=!0,this.loadPageCurr++,this.loadGetData()}finally{this.loadingMore=!1}},getData(){this.loadPageCurr=1,this.loadDataList=[],this.loadGetData()},async querySearchAsync(e,o){this.loadPageCurr=1,this.loadDataLoading=!0;var a=this.loadDataList||[];let r=[];const n=this.loadConfigSetting.searchField||["value"];if(e=e.toLowerCase(),r=e?a.filter(this.createFilter(e,n)):a,r.length>0)o(r.map(l=>({...l,is_last_tip:!1}))),this.lookFlag=!0;else try{this.loadDataList.length<this.loadDataTotal&&this.loadPageCurr++,this.searchData.keyword=e,this.loadDataList=[],await this.loadGetData();const l=this.loadDataList.map(s=>({...s,is_last_tip:!1}));l.push({is_last_tip:!0}),o(l)}catch{}finally{this.lookFlag=!0}},createFilter(e,o){return a=>o.some(r=>(a[r]+"").toLowerCase().indexOf(e)!==-1)},handleChange(e){},handleSelect(e){this.$emit("update:modelValue",e)}}};function dl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("cv-icons"),c=(0,t.resolveComponent)("el-autocomplete"),d=(0,t.resolveDirective)("loadmore");return(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",null,[(0,t.createVNode)(c,(0,t.mergeProps)(e.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[1]||(o[1]=u=>n.localVal=u),"fetch-suggestions":l.querySearchAsync,onChange:l.handleChange,onSelect:l.handleSelect,teleported:!1,"popper-append-to-body":!1}),{load:(0,t.withCtx)(()=>[...o[2]||(o[2]=[])]),default:(0,t.withCtx)(({item:u})=>[u.is_last_tip?(0,t.createCommentVNode)("",!0):(0,t.renderSlot)(e.$slots,"default",(0,t.normalizeProps)((0,t.mergeProps)({key:0},{item:u}))),u.is_last_tip?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"cv-autocomolete-nodata",onClick:o[0]||(o[0]=(0,t.withModifiers)((...h)=>l.getData&&l.getData(...h),["stop"])),disabled:""},[o[3]||(o[3]=(0,t.createTextVNode)(" 没有更多数据了 ",-1)),(0,t.createVNode)(s,{type:"ElIconRefreshLeft"}),o[4]||(o[4]=(0,t.createTextVNode)(" 刷新按钮 ",-1))])):(0,t.createCommentVNode)("",!0)]),_:3},16,["modelValue","fetch-suggestions","onChange","onSelect"])])),[[d,l.getMoreData]])}var Me=y(cl,[["render",dl]]);Ae.install=function(e){e.component(Ae.name,Ae)};Me.install=function(e){e.component(Me.name,Me)};var ul={...b.ElForm,name:"cvFormBase",extends:b.ElForm,provide(){return{elForm:this}},props:{...b.ElForm.props,labelWidth:{type:[String,Number],default:"auto"},labelPosition:{type:String,default:"right"}},watch:{model(){}},data(){return{}}};function ml(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-form");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({class:"cv-form-base"},{...e.$props,...e.$attrs},(0,t.toHandlers)(e.$attrs)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var ze=y(ul,[["render",ml]]),pl={name:"cvFormInline",provide(){return{elForm:this}},props:{...b.ElForm.props},watch:{},data(){return{form:{}}}};function hl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-form");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({class:"cv-form-base"},e.$props,(0,t.toHandlers)(e.$attrs),{inline:!0}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var Oe=y(pl,[["render",hl]]),gl={name:"cvFormItem",extends:b.ElFormItem,props:{...b.ElFormItem.props},data(){return{localLabelWidth:"",localError:""}},created(){},methods:{}},fl={key:0,class:"cv-form-item__tip"};function vl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-form-item");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.normalizeProps)((0,t.guardReactiveProps)({...e.$props,...e.$attrs})),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default"),e.$slots.tip?((0,t.openBlock)(),(0,t.createElementBlock)("div",fl,[(0,t.renderSlot)(e.$slots,"tip")])):(0,t.createCommentVNode)("",!0)]),_:3},16)}var je=y(gl,[["render",vl]]);ze.install=function(e){e.component(ze.name,ze)};Oe.install=function(e){e.component(Oe.name,Oe)};je.install=function(e){e.component(je.name,je)};var J={extends:b.ElInput,emits:["update:modelValue","change"],props:{...b.ElInput.props,modelValue:{type:[Number,String],default:""},placeholder:{type:[Number,String],default:""},disabled:{type:Boolean,default:!1}},watch:{modelValue(e){this.localVal=e},localVal(){this.handleChange(),this.handleInput()}},data(){return{localVal:this.modelValue,localRules:[]}},created(){},methods:{handleChange(){this.$emit("change",this.localVal)},handleInput(){this.$emit("update:modelValue",this.localVal)},handleBlur(){this._isCheckValue()},_showError(e){this.localError=e||"请输入正确的"+this.label},_diyValidate(){},_isCheckValue(){const e=this?.rules.split("|");this.localError="";for(let o in e){let a=e[o].split(":"),r=a[0]||"",n=a[1]||"";switch(r){case"require":if(this.localVal==""){this._showError(this.label+"不能为空");return}break;case"max":if(this.localVal.length>n){this._showError(this.label+"最大长度不超过"+n);return}break;case"min":if(this.localVal.length<n){this._showError(this.label+"最小长度不小于"+n);return}break;default:this._diyValidate(r);break}}}}},yl={name:"cvInputText",mixins:[J],props:{},data(){return{}},methods:{}};function Cl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({type:"text"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入",clearable:""}),(0,t.createSlots)({_:2},[e.$slots.prepend?{name:"prepend",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.prepend?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var bl=y(yl,[["render",Cl]]),kl={name:"cvInputMobile",mixins:[J],components:{},props:{},data(){return{}},methods:{}};function wl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({type:"number",oninput:"if(value.length>11)value=value.slice(0,11)"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入11位大陆手机号",clearable:""}),(0,t.createSlots)({prepend:(0,t.withCtx)(()=>[o[1]||(o[1]=(0,t.createTextVNode)("+86",-1))]),_:2},[e.$slots.append?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"0"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var Re=y(kl,[["render",wl]]),_l={name:"cvInputEmail",mixins:[J],components:{},props:{},data(){return{}},methods:{}};function Vl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({type:"text"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入邮箱",clearable:""}),(0,t.createSlots)({_:2},[e.$slots.prepend?{name:"prepend",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var He=y(_l,[["render",Vl]]),Bl={name:"cvInputPassword",mixins:[J],components:{},props:{showPassword:{type:Boolean,default:!1}},data(){return{}},methods:{}};function Sl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({type:"password"},{disabled:e.disabled,showPassword:a.showPassword},{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入密码",clearable:""}),(0,t.createSlots)({_:2},[e.$slots.prepend?{name:"prepend",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var Ue=y(Bl,[["render",Sl]]),Nl={name:"cvInputNumber",mixins:[J],props:{},data(){return{}},methods:{}};function El(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({class:"cv-number",type:"number"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入整数",clearable:""}),(0,t.createSlots)({_:2},[e.$slots.prepend?{name:"prepend",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var We=y(Nl,[["render",El]]),xl={name:"cvInputIdcard",mixins:[J],components:{},props:{},data(){return{}},methods:{}};function $l(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({type:"text",oninput:"if(value.length>18)value=value.slice(0,18)"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入身份证",clearable:"",maxlength:"18"}),(0,t.createSlots)({_:2},[e.$slots.prepend?{name:"prepend",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var qe=y(xl,[["render",$l]]),Dl={name:"cvInputDigit",mixins:[J],components:{},props:{},data(){return{}},methods:{}};function Tl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({type:"number"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入",clearable:""}),(0,t.createSlots)({_:2},[e.$slots.prepend?{name:"prepend",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"prepend")]),key:"0"}:void 0,e.$slots.append?{name:"append",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}var Ke=y(Dl,[["render",Tl]]),Ll={name:"cvTextarea",mixins:[J],props:{rows:{type:[Number,String],default:3},autosize:{type:[Boolean,Object],default:!1}},data(){return{}},computed:{lastRow(){return parseInt(this.rows)}},created(){},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}};function Il(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({type:"textarea"},{disabled:e.disabled,rows:l.lastRow,autosize:a.autosize},{rows:l.lastRow,modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入内容",clearable:""}),null,16,["rows","modelValue","onInput","placeholder"])}var Ge=y(Ll,[["render",Il]]),Fl={name:"cvTextareaBtn",mixins:[J],components:{},props:{rows:{type:[Number,String],default:3},btnText:{type:[Number,String],default:""},btnIcon:{type:[String],default:""},autosize:{type:[Boolean,Object],default:!1}},data(){return{}},computed:{lastRow(){return parseInt(this.rows)}},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},Pl={class:"cv-textab-group"},Al={class:"cv-textab-group__append"},Ml={class:"cv-textab_slot-wrap"};function zl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input"),c=(0,t.resolveComponent)("el-button");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Pl,[(0,t.createVNode)(s,(0,t.mergeProps)({type:"textarea"},{disabled:e.disabled,rows:l.lastRow,autosize:a.autosize},{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>e.localVal=d),onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入内容",clearable:""}),null,16,["modelValue","onInput","placeholder"]),(0,t.createElementVNode)("div",Al,[(0,t.createElementVNode)("div",Ml,[(0,t.renderSlot)(e.$slots,"default",{},()=>[(0,t.createVNode)(c,{class:"cv-textab_slotbtn",type:"primary",size:e.size,onClick:l.onSubmit},{default:(0,t.withCtx)(()=>[a.btnIcon?((0,t.openBlock)(),(0,t.createElementBlock)("i",{key:0,class:(0,t.normalizeClass)(a.btnIcon),style:{"margin-right":"5px"}},null,2)):(0,t.createCommentVNode)("",!0),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(a.btnText),1)]),_:1},8,["size","onClick"])])])])])}var Ye=y(Fl,[["render",zl]]),Ol={name:"cvInputBtn",mixins:[J],emits:["btnClick"],components:{},props:{btnText:{type:[Number,String],default:"确定"},btnIcon:{type:[String],default:""}},data(){return{}},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},jl={class:"cv-input-group"},Rl={class:"cv-input-group__append"};function Hl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input"),c=(0,t.resolveComponent)("el-button");return(0,t.openBlock)(),(0,t.createElementBlock)("div",jl,[(0,t.createVNode)(s,(0,t.mergeProps)({type:"text"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>e.localVal=d),onChange:e.handleChange,onInput:e.handleInput,placeholder:e.placeholder?e.placeholder:"请输入",clearable:""}),null,16,["modelValue","onChange","onInput","placeholder"]),(0,t.createElementVNode)("div",Rl,[(0,t.renderSlot)(e.$slots,"default",{},()=>[(0,t.createVNode)(c,{class:"cv-input-btn__slotbtn",type:"primary",size:e.size,onClick:l.onSubmit},{default:(0,t.withCtx)(()=>[a.btnIcon?((0,t.openBlock)(),(0,t.createElementBlock)("i",{key:0,class:(0,t.normalizeClass)(a.btnIcon),style:{"margin-right":"5px"}},null,2)):(0,t.createCommentVNode)("",!0),(0,t.createTextVNode)(" "+(0,t.toDisplayString)(a.btnText),1)]),_:1},8,["size","onClick"])])])])}var Ze=y(Ol,[["render",Hl]]),Ul={data(){return{formData:{}}}};function Wl(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div")}var $o=y(Ul,[["render",Wl]]);Re.install=function(e){e.component(Re.name,Re)};He.install=function(e){e.component(He.name,He)};Ue.install=function(e){e.component(Ue.name,Ue)};We.install=function(e){e.component(We.name,We)};qe.install=function(e){e.component(qe.name,qe)};Ke.install=function(e){e.component(Ke.name,Ke)};Ge.install=function(e){e.component(Ge.name,Ge)};Ye.install=function(e){e.component(Ye.name,Ye)};Ze.install=function(e){e.component(Ze.name,Ze)};$o.install=function(e){e.component($o.name,$o)};var ql={name:"cvInputCounter",extends:b.ElInputNumber,props:{},watch:{modelValue(){this.localVal=this.modelValue}},data(){return{localVal:0}},created(){},methods:{handleChange(e){this.$emit("update:modelValue",this.localVal)}}};function Kl(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input-number");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>n.localVal=c),onChange:l.handleChange,step:e.step}),null,16,["modelValue","onChange","step"])}var Qe=y(ql,[["render",Kl]]);Qe.install=function(e){e.component(Qe.name,Qe)};var Gl={name:"cvShowText",mixins:[],components:{},props:{text:{type:[Number,String,Object],default:""}},data(){return{}},created(){},methods:{}},Yl={class:"cv-show-text"},Zl=["innerHTML"];function Ql(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Yl,[a.text?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,innerHTML:a.text},null,8,Zl)):(0,t.createCommentVNode)("",!0),a.text?(0,t.createCommentVNode)("",!0):(0,t.renderSlot)(e.$slots,"default",{key:1})])}var Xe=y(Gl,[["render",Ql]]),Xl={name:"cvShowImage",mixins:[],components:{},props:{url:{type:[String,Array,Object],default:""},width:{type:[String],default:"100px"},height:{type:[String],default:"100px"}},data(){return{localUrl:""}},watch:{url:{handler(){this.localUrl=typeof this.url=="string"?[this.url]:this.url},immediate:!0,deep:!0}},created(){},methods:{}},Jl={class:"cv-show-image"};function er(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-image");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Jl,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.localUrl,(c,d)=>((0,t.openBlock)(),(0,t.createBlock)(s,{style:(0,t.normalizeStyle)("width:"+a.width+"; height:"+a.height+"; margin-right:10px"),key:d,src:c,"preview-src-list":n.localUrl},null,8,["style","src","preview-src-list"]))),128))])}var Je=y(Xl,[["render",er]]),tr={name:"cvShowTip",props:{borderColor:{type:[String],default:"#50bfff"},bgColor:{type:[String],default:"#ecf8ff"}},data(){return{backgroundColor:"#ecf8ff",borderLeft:"5px solid #50bfff"}},created(){this.borderLeft=`5px solid ${this.borderColor}`,this.backgroundColor=`${this.bgColor}`},methods:{}};function or(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-show-tip",style:(0,t.normalizeStyle)({backgroundColor:this.backgroundColor,borderLeft:this.borderLeft})},[(0,t.renderSlot)(e.$slots,"default")],4)}var et=y(tr,[["render",or]]),ar={name:"cv-gallery-dialog",props:{type:String,title:String,sources:Array,sliceSingle:{type:Boolean,default:!1},carouselAttrs:Object},data(){return{isShowCarousel:!1,sourceTitle:"",initialIndex:0,isShowPreview:!1}},methods:{startPreview(e){this.isShowPreview=!0,this.initialIndex=e,this.sourceTitle=this.sources[e].title},handleCarouselChange(e){this.sources[e]&&this.sources[e].title?this.sourceTitle=this.sources[e].title:this.sourceTitle=""}}},nr=["src"],lr={key:0,class:"cv-gallery-iframe embed-responsive embed-responsive-16by9"},rr=["src"],ir=["src"],sr=["src"];function cr(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-carousel-item"),c=(0,t.resolveComponent)("el-carousel"),d=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createBlock)(d,{visible:n.isShowPreview,"append-to-body":"",onOpen:o[0]||(o[0]=u=>n.isShowCarousel=!0),onClosed:o[1]||(o[1]=u=>n.isShowCarousel=!1),style:{"text-align":"center"}},{header:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.sourceTitle||a.title),1)]),default:(0,t.withCtx)(()=>[a.type==="video"?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[n.isShowPreview?((0,t.openBlock)(),(0,t.createElementBlock)("video",{key:0,src:a.sources[n.initialIndex].src,autoplay:"autoplay",class:"cv-gallery-video",controls:"controls",width:"100%"},null,8,nr)):(0,t.createCommentVNode)("",!0)],64)):a.type==="iframe"?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[n.isShowPreview?((0,t.openBlock)(),(0,t.createElementBlock)("div",lr,[(0,t.createElementVNode)("iframe",{src:a.sources[n.initialIndex].src,allowfullscreen:"true",border:"0",frameborder:"no",framespacing:"0",scrolling:"no"},null,8,rr)])):(0,t.createCommentVNode)("",!0)],64)):a.type==="image"?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:2},[a.sliceSingle&&a.sources[n.initialIndex]||a.sources.length===1?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,src:a.sources[n.initialIndex].src,class:"cv-gallery-image"},null,8,ir)):((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:1},[n.isShowCarousel?((0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({key:0,"initial-index":n.initialIndex,onChange:l.handleCarouselChange,"indicator-position":"outside"},a.carouselAttrs),{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.sources,(u,h)=>((0,t.openBlock)(),(0,t.createBlock)(s,{key:h},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("img",{src:u.src,class:"cv-gallery-image"},null,8,sr)]),_:2},1024))),128))]),_:1},16,["initial-index","onChange"])):(0,t.createCommentVNode)("",!0)],64))],64)):(0,t.createCommentVNode)("",!0)]),_:1},8,["visible"])}var dr=y(ar,[["render",cr]]),ur={name:"gallery",components:{GalleryDialog:dr},props:{type:{type:String,default:"image",validator(e){return["image","video","iframe"].includes(e)}},size:Number,width:Number,height:Number,lazy:{type:Boolean,default:!1},source:[String,Array,Object],thumbSuffix:{type:String,default:""},thumbStyle:Object,carouselAttrs:Object,title:String,sliceSingle:{type:Boolean,default:!1}},data(){return{}},computed:{computedStyle(){let e=this.width||this.size,o=this.height||this.size;return this.type==="iframe"&&(e=e?e+"px":"360px",o=o?o+"px":"auto"),Object.assign({},{width:e,height:o,display:"block"},this.thumbStyle)},thumbs(){return this.computedSources.map(e=>e.thumb)},computedSources(){const e=this.source;if(typeof e=="string")return[this.getStringSource(e)];if(e instanceof Array){const o=[];return e.forEach(a=>{a instanceof Object?o.push(this.getObjectSource(a)):typeof a=="string"&&o.push(this.getStringSource(a))}),o}else return e instanceof Object?[this.getObjectSource(e)]:[]}},methods:{handlePreview(e){this.$refs.dialog.startPreview(e)},getStringSource(e){let o=e;return this.type==="image"&&this.thumbSuffix&&(o+=this.thumbSuffix),{type:this.type,src:e,thumb:o}},getObjectSource(e){return e.type=e.thumb?"image":this.type,e.thumb=e.thumb||e.src,e}}},mr={key:0,class:"cv-gallery"},pr={class:"el-upload-list el-upload-list--picture-card"},hr=["src"],gr={class:"el-upload-list__item-actions"},fr=["onClick"];function vr(e,o,a,r,n,l){const s=(0,t.resolveComponent)("cv-icons"),c=(0,t.resolveComponent)("GalleryDialog");return a.source?((0,t.openBlock)(),(0,t.createElementBlock)("div",mr,[(0,t.createElementVNode)("div",pr,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.computedSources,(d,u)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:u,class:"el-upload-list__item"},[(0,t.createElementVNode)("div",{style:(0,t.normalizeStyle)(l.computedStyle),class:"cv-gallery-iframe embed-responsive embed-responsive-16by9"},[(0,t.createElementVNode)("iframe",{src:d.thumb,allowfullscreen:"true",border:"0",frameborder:"no",framespacing:"0",scrolling:"no"},null,8,hr)],4),(0,t.createElementVNode)("span",gr,[(0,t.createElementVNode)("span",{onClick:h=>l.handlePreview(u,d)},[(0,t.createVNode)(s,{type:"ElIconVideoPlay",size:"20"})],8,fr),(0,t.renderSlot)(e.$slots,"action",(0,t.mergeProps)({ref_for:!0},{source:d,index:u}))])]))),128))]),(0,t.createVNode)(c,{carouselAttrs:a.carouselAttrs,sliceSingle:a.sliceSingle,sources:l.computedSources,title:a.title,type:a.type,ref:"dialog"},null,8,["carouselAttrs","sliceSingle","sources","title","type"])])):(0,t.createCommentVNode)("",!0)}var Do=y(ur,[["render",vr]]);Xe.install=function(e){e.component(Xe.name,Xe)};Je.install=function(e){e.component(Je.name,Je)};et.install=function(e){e.component(et.name,et)};Do.install=function(e){e.component(Do.name,Do)};var yr={name:"cvRadioOptBase"};function Cr(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-radio");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var tt=y(yr,[["render",Cr]]),br={name:"cvRadioOptBtn"};function kr(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-radio-button");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var ot=y(br,[["render",kr]]),wr={name:"cvRadioGroup"};function _r(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-radio-group");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var at=y(wr,[["render",_r]]);tt.install=function(e){e.component(tt.name,tt)};ot.install=function(e){e.component(ot.name,ot)};at.install=function(e){e.component(at.name,at)};var Vr={name:"cvCheckboxOptBase",extends:b.ElCheckbox};function Br(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-checkbox");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var nt=y(Vr,[["render",Br]]),Sr={name:"cvCheckboxOptBtn",extends:b.ElCheckboxButton,props:{}};function Nr(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-checkbox-button");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var lt=y(Sr,[["render",Nr]]),Er={props:{...b.ElCheckboxGroup.props,modelValue:{type:[Array],default:()=>[]},dataLists:{type:Array,default:()=>[]},dataField:{type:[Object],default:()=>({})},disabled:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.handleChange()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0}},data(){return{localVal:this.modelValue,localOpt:[]}},created(){this.handleChange(),this._parseLocalOpt()},methods:{handleChange(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let e=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(r=>{e.push({label:r,value:r})}),this.localOpt=e;else{var o=this.dataField&&this.dataField.label||"label",a=this.dataField&&this.dataField.value||"value";this.dataLists.map(r=>{let n=r[o]===0?0:r[o]||"",l=r[a]===0?0:r[a]||"";l=l===0?0:l||n,e.push({label:n,value:l,disabled:r.disabled&&!0||!1}),(r.checked=="true"||r.checked==!0)&&(typeof this.localVal=="string"?this.localVal=l:typeof this.localVal=="object"&&this.localVal.push(l))}),this.localOpt=e}this._parseLocalOptDiy()},_parseLocalOptDiy(){}}},xr={name:"cvCheckboxAll",mixins:[Er],components:{},data(){return{checkAll:!1,isIndeterminate:!0,localOptAll:[]}},methods:{handleCheckAllChange(e){this.localVal=e?this.localOptAll:[],this.isIndeterminate=!1,this.handleChange()},handleCheckedCitiesChange(e){let o=e.length;this.checkAll=o===this.localOptAll.length,this.isIndeterminate=o>0&&o<this.localOptAll.length},_parseLocalOptDiy(){this.localOpt&&this.localOpt.length!==0&&this.localOpt.map(e=>{e.disabled||this.localOptAll.push(e.label)})}}},$r={class:"cv-checkbox-all"};function Dr(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-checkbox"),c=(0,t.resolveComponent)("el-checkbox-group");return(0,t.openBlock)(),(0,t.createElementBlock)("div",$r,[(0,t.createVNode)(s,{indeterminate:n.isIndeterminate,modelValue:n.checkAll,"onUpdate:modelValue":o[0]||(o[0]=d=>n.checkAll=d),onChange:l.handleCheckAllChange},{default:(0,t.withCtx)(()=>[...o[2]||(o[2]=[(0,t.createTextVNode)("全选",-1)])]),_:1},8,["indeterminate","modelValue","onChange"]),o[3]||(o[3]=(0,t.createElementVNode)("div",{style:{margin:"15px 0"}},null,-1)),(0,t.createVNode)(c,{modelValue:e.localVal,"onUpdate:modelValue":o[1]||(o[1]=d=>e.localVal=d),onChange:l.handleCheckedCitiesChange},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default",{},()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.localOpt,(d,u)=>((0,t.openBlock)(),(0,t.createBlock)(s,{value:d.value,key:u,onChange:e.handleChange,disabled:e.disabled||d.disabled},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(d.label),1)]),_:2},1032,["value","onChange","disabled"]))),128))])]),_:3},8,["modelValue","onChange"])])}var rt=y(xr,[["render",Dr]]),Tr={name:"cvCheckboxGroup"};function Lr(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-checkbox-group");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16)}var it=y(Tr,[["render",Lr]]);nt.install=function(e){e.component(nt.name,nt)};lt.install=function(e){e.component(lt.name,lt)};it.install=function(e){e.component(it.name,it)};rt.install=function(e){e.component(rt.name,rt)};function Ir(e,o,a){var r=a||{},n=r.noTrailing,l=n===void 0?!1:n,s=r.noLeading,c=s===void 0?!1:s,d=r.debounceMode,u=d===void 0?void 0:d,h,m=!1,v=0;function f(){h&&clearTimeout(h)}function C(w){var V=(w||{}).upcomingOnly,k=V===void 0?!1:V;f(),m=!k}function p(){for(var w=arguments.length,V=new Array(w),k=0;k<w;k++)V[k]=arguments[k];var B=this,N=Date.now()-v;if(m)return;function H(){v=Date.now(),o.apply(B,V)}function q(){h=void 0}!c&&u&&!h&&H(),f(),u===void 0&&N>e?c?(v=Date.now(),l||(h=setTimeout(u?q:H,e))):H():l!==!0&&(h=setTimeout(u?q:H,u===void 0?e-N:e))}return p.cancel=C,p}function ja(e,o,a){var r=(a||{}).atBegin;return Ir(e,o,{debounceMode:(r===void 0?!1:r)!==!1})}function Fr(e,o=!1){let a=document.createElement("link");a.setAttribute("rel","stylesheet"),a.setAttribute("type","text/css"),a.setAttribute("id",e),o?a.setAttribute("href",e+"?t="+new Date().getTime()):a.setAttribute("href",e),document.getElementById(e)||document.head.appendChild(a)}function st(e,o=!1,a=!0){return new Promise((r,n)=>{const l=document.createElement("script");e=e.replace(/([^:]\/)\/+/g,"$1"),l.id=e,l.type="text/javascript",o?l.src=e+"?t="+new Date().getTime():l.src=e,document.getElementById(e)&&a?r():(document.body.appendChild(l),l.onload=()=>{r()})})}function Pr(e){const o=e;try{const a=document.createElement("textarea");a.value=o,document.body.appendChild(a),a.select(),document.execCommand("Copy"),a.remove(),document.body.removeChild(a)}catch{navigator.clipboard.writeText(o).then(()=>{}).catch(r=>{})}(0,b.ElMessage)({message:"复制成功",type:"success"})}function Ar(e){if(/^\d{8}T\d{6}Z$/.test(e)){const o=e.replace(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/,"$1-$2-$3T$4:$5:$6Z");return new Date(o)}return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|([+-]\d{2}:\d{2}))?$/.test(e)?new Date(e):/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(e)?new Date(e.replace(" ","T")):new Date(e)}function Mr(e){var o=new Date,a=new Date(e),r=o-a,n=Math.floor(r/1e3),l=Math.floor(n/60),s=Math.floor(l/60);if(l<1)var c=n+"秒前";else if(s<1)var c=l+"分钟前";else if(s<24)var c=s+"小时前";else var c=a.toLocaleString();return c}function oe(e,...o){return o.reduce((a,r)=>Object.keys(r).reduce((n,l)=>{const s=r[l];return fo(s)?n[l]=oe(n[l]?n[l]:{},s):Ha(s)?n[l]=s.map((c,d)=>{if(fo(c)){const u=n[l]?n[l]:[];return oe(u[d]?u[d]:{},c)}else return c}):n[l]=s,n},a),e)}function Ra(e,o){const{[o[0]]:a,...r}=e;return Object.keys(e).reduce((n,l)=>(o.includes(l)||(n[l]=e[l]),n),{})}function fo(e){return Object.prototype.toString.call(e)==="[object Object]"}function Ha(e){return typeof Array.isArray=="function"?Array.isArray(e):Object.prototype.toString.call(e)==="[object Array]"}function he(e){return Ha(e)?e.length===0:fo(e)?Object.keys(e).length===0:e===""||e===void 0||e===null}function Ce(e,o){return he(e)?o:e}function zr(e){let o=["png","jpg","jpeg","gif","webp","svg"],a=e.lastIndexOf("."),r=e.substring(a+1);return o.indexOf(r.toLowerCase())!=-1}function Or(e){return e.startsWith("http://")||e.startsWith("https://")||e.startsWith("//")}function le(e){return e==null?"":String(e)}var jr=/([\:\-\_]+(.))/g,Rr=/^moz([A-Z])/,Hr=Number(document.documentMode),ua=function(e){return e.replace(jr,function(o,a,r,n){return n?r.toUpperCase():r}).replace(Rr,"Moz$1")};const Xf=(function(){return document.addEventListener?function(e,o,a){e&&o&&a&&e.addEventListener(o,a,!1)}:function(e,o,a){e&&o&&a&&e.attachEvent("on"+o,a)}})(),Jf=(function(){return document.removeEventListener?function(e,o,a){e&&o&&e.removeEventListener(o,a,!1)}:function(e,o,a){e&&o&&e.detachEvent("on"+o,a)}})(),e1=Hr<9?function(e,o){if(!e||!o)return null;o=ua(o),o==="float"&&(o="styleFloat");try{switch(o){case"opacity":try{return e.filters.item("alpha").opacity/100}catch{return 1}default:return e.style[o]||e.currentStyle?e.currentStyle[o]:null}}catch{return e.style[o]}}:function(e,o){if(!e||!o)return null;o=ua(o),o==="float"&&(o="cssFloat");try{var a=document.defaultView.getComputedStyle(e,"");return e.style[o]||a?a[o]:null}catch{return e.style[o]}};function Ur(e){return window.URL?window.URL.createObjectURL(e):window.webkitURL?window.webkitURL.createObjectURL(e):""}var Ua=(()=>{const e={svg:["image/svg+xml","image/svg"],jpg:["image/jpeg","image/jpg"],jpeg:["image/jpeg"],png:["image/png"],gif:["image/gif"],webp:["image/webp"],bmp:["image/bmp","image/x-bmp","image/x-ms-bmp"],ico:["image/x-icon","image/vnd.microsoft.icon"],tiff:["image/tiff","image/tif","image/x-tiff"],apng:["image/apng"],avif:["image/avif"],heic:["image/heic"],pdf:["application/pdf"],txt:["text/plain"],csv:["text/csv"],json:["application/json"],xml:["application/xml"],doc:["application/msword"],docx:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],xls:["application/vnd.ms-excel"],xlsx:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],ppt:["application/vnd.ms-powerpoint"],pptx:["application/vnd.openxmlformats-officedocument.presentationml.presentation"],zip:["application/zip"],rar:["application/x-rar-compressed"],"7z":["application/x-7z-compressed"],mp3:["audio/mpeg"],mp4:["video/mp4"],mov:["video/quicktime"],avi:["video/x-msvideo"],wav:["audio/wav"]},o={},a={};for(const[r,n]of Object.entries(e)){o[r]=n[0];for(const l of n)a[l]=r}return{extensionToMime:o,mimeToExtension:a}})();function Wr(e){if(!e)return"jpg";const o=e.toLowerCase().trim();return Ua.mimeToExtension[o]||"jpg"}function qr(e){if(!e)return"";const o=e.replace(/^\./,"").toLowerCase();return Ua.extensionToMime[o]||""}function Kr(){const e=new Date;return[e.getFullYear(),String(e.getMonth()+1).padStart(2,"0"),String(e.getDate()).padStart(2,"0"),String(e.getHours()).padStart(2,"0"),String(e.getMinutes()).padStart(2,"0"),String(e.getSeconds()).padStart(2,"0")].join("")+Math.random().toString(36).substring(2,10)}var Gr={name:"cvGeoCity",mixins:[],components:{},emits:["update:province","update:city","update:district","update:provinceCode","update:cityCode","update:districtCode"],props:{modelValue:{type:[String,Array,Number],default(){return[]}},province:{type:[String]},provinceCode:{type:[Number,String],default:""},city:{type:[String]},cityCode:{type:[Number,String],default:""},district:{type:[String]},districtCode:{type:[Number,String],default:""},cityHide:{type:Boolean,default:!1},districtHide:{type:Boolean,default:!1}},watch:{modelValue(e){},province(e){this.initProvince()},provinceCode(e){this.initProvince()},cityCode(e){this.initCity()},districtCode(e){this.initDistrict()}},data(){return{provinceCdnList:{},cityCdnList:{},districtCdnList:{},isCdnLoading:!0,provinceList:[],cityList:[],districtList:[],local1_code:"",local1_name:"",local2_code:"",local2_name:"",local3_code:"",local3_name:"",local1_flag:!1,local2_flag:!1,local3_flag:!1,hideMunicipality:!1,municipalities:["110000","120000","310000","500000","北京市","天津市","上海市","重庆市"]}},async mounted(){await st(this.CDN_URL_UI+"/dict/geo/province-kv-window.js"),await st(this.CDN_URL_UI+"/dict/geo/city-kv-window.js"),await st(this.CDN_URL_UI+"/dict/geo/district-kv-window.js"),await this.initLoad()},methods:{initLoad(){setTimeout(()=>{this.provinceCdnList=window.cdn__DictAreaProvince,this.cityCdnList=window.cdn__DictAreaCity,this.districtCdnList=window.cdn__DictAreaDistrict,this.local1_flag=!1,this.isCdnLoading=!1,this.getProvinces(),this.initProvince()},200)},initProvince(){if(!this.province&&!this.provinceCode)return!1;this.getProvinces();const e=this.provinceList.find(o=>this.province?o.provinceName===this.province:this.provinceCode&&o.provinceCode===this.provinceCode);e&&(this.local1_code=e.provinceCode,this.changeProvince(e.provinceCode)),this.initCity()},initCity(){if(!this.city&&!this.cityCode)return!1;const e=this.cityList.find(o=>this.city?o.cityName===this.city:this.cityCode&&o.cityCode===this.cityCode);e&&(this.local2_code=e.cityCode,this.changeCity(e.cityCode)),this.initDistrict()},initDistrict(){if(!this.district&&!this.districtCode)return!1;const e=this.districtList.find(o=>this.district?o.districtName===this.district:this.districtCode&&o.districtCode===this.districtCode);e&&this.changeDistrict(e.districtCode)},getProvinces(){if(!this.local1_flag&&typeof this.provinceCdnList=="object"){let e=[];for(let o in this.provinceCdnList)e.push({provinceCode:o,provinceName:this.provinceCdnList[o]});this.provinceList=e,this.local1_flag=!0}},changeProvince(e){this._getNeedCity(),this.local2_flag=!0,this.local2_code="",this.local2_name="",this.local3_code="",this.local3_name="",this.local1_code=e,this.local1_name=this.provinceList.find(o=>o.provinceCode===e)?.provinceName,this.handleChoose()},_getNeedCity(){let e=[],o=this.local1_code.substring(0,2);for(let a in this.cityCdnList)a.substring(0,2)==o&&e.push({cityCode:a,cityName:this.cityCdnList[a]});this.cityList=e},getCities(){this.local2_flag||this.provinceCode&&(this._getNeedCity(),this.local2_flag=!0)},changeCity(e){this._getNeedDistrict(),this.local3_flag=!0,this.local3_name="",this.local3_code="",this.local2_code=e,this.local2_name=this.cityList.find(o=>o.cityCode===e)?.cityName,this.handleChoose()},_getNeedDistrict(){let e=[],o=this.local2_code.substring(0,4);for(let a in this.districtCdnList)a.substring(0,4)==o&&e.push({districtCode:a,districtName:this.districtCdnList[a]});this.districtList=e},getDistrict(){this.local3_flag||this.local2_code&&this._getNeedDistrict()},changeDistrict(e){this.local3_code=e,this.local3_name=this.districtList.find(o=>o.districtCode===e)?.districtName,this.handleChoose()},handleChoose(){this.$emit("update:province",this.local1_name),this.$emit("update:provinceCode",this.local1_code),this.$emit("update:city",this.local2_name),this.$emit("update:cityCode",this.local2_code),this.$emit("update:district",this.local3_name),this.$emit("update:districtCode",this.local3_code)}}},Yr={class:"cv-geo-city"},Zr={key:0},Qr={key:1};function Xr(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-option"),c=(0,t.resolveComponent)("el-select"),d=(0,t.resolveDirective)("loading");return(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",Yr,[(0,t.createElementVNode)("div",null,[(0,t.createVNode)(c,{modelValue:n.local1_code,"onUpdate:modelValue":o[0]||(o[0]=u=>n.local1_code=u),onFocus:l.getProvinces,onChange:l.changeProvince,placeholder:"省",filterable:""},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.provinceList,(u,h)=>((0,t.openBlock)(),(0,t.createBlock)(s,{key:u.provinceCode,label:u.provinceName,value:u.provinceCode},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(u.provinceName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]),a.cityHide?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",Zr,[(0,t.createVNode)(c,{modelValue:n.local2_code,"onUpdate:modelValue":o[1]||(o[1]=u=>n.local2_code=u),onFocus:l.getCities,onChange:l.changeCity,placeholder:"市",filterable:""},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.cityList,(u,h)=>((0,t.openBlock)(),(0,t.createBlock)(s,{key:u.cityCode,label:u.cityName,value:u.cityCode},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(u.cityName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])])),!a.cityHide&&!a.districtHide?((0,t.openBlock)(),(0,t.createElementBlock)("div",Qr,[(0,t.createVNode)(c,{modelValue:n.local3_code,"onUpdate:modelValue":o[2]||(o[2]=u=>n.local3_code=u),onFocus:l.getDistrict,onChange:l.changeDistrict,placeholder:"区/县",filterable:""},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.districtList,(u,h)=>((0,t.openBlock)(),(0,t.createBlock)(s,{key:u.districtCode,label:u.districtName,value:u.districtCode},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(u.districtName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])])):(0,t.createCommentVNode)("",!0)])),[[d,n.isCdnLoading]])}var ct=y(Gr,[["render",Xr]]),Wa={computed:{componentName(){return this.$options.name}},methods:{_mergeAttrs(e){const o=this.$cvUiParams||{},a=e?o[e]||{}:{},r=o[this.componentName]||{},n=Object.assign({},a,r);return Object.assign({},n,this.$attrs)}}},Jr={name:"cvGeoMap",mixins:[Wa],emits:["update:address","update:latitude","update:longitude","update:name","update:city"],props:{title:{type:[String],default:"选择经纬度地点"},mapKey:{type:[String],default:""},mapSecret:{type:[String],default:""},mapType:{type:[String],default:"qq"},address:{type:[String]},name:{type:[String]},city:{type:[String]},latitude:{type:[Number,String]},longitude:{type:[Number,String]}},watch:{address(e){this.localAddress=e},latitude(e){this.localLatitude=e},longitude(e){this.localLongitude=e},name(e){this.localName=e},city(e){this.localCity=e}},computed:{localMapKey(){return this._mergeAttrs("geo").mapKey},localMapSecret(){return this._mergeAttrs("geo").mapSecret},mapSrc(){let e=this.localMapKey;if(this.mapType=="qq"){if(!this.localMapKey)return"";let o="https://apis.map.qq.com/tools/locpicker";return o+=`?search=1&type=1&key=${e}&referer=myapp`,this.latitude&&this.longitude&&(o+=`&coord=${this.latitude},${this.longitude}`),o}else if(this.mapType=="amap"){if(!this.localMapKey||!this.localMapSecret)return"";let o="https://m.amap.com/picker/";return o+=`?zoom=15&radius=1000&total=20&key=${e}&jscode=${localMapSecret}`,this.latitude&&this.longitude&&(o+=`&center=${this.longitude},${this.latitude}`),o}else return this.$message.info("目前不支持百度地图"),""}},data(){return{localMapShow:!1,localAddress:"",localLatitude:"",localLongitude:"",localName:"",localCity:""}},mounted(){this.initData()},methods:{initData(){let e=this;window.addEventListener("message",o=>{let a=o.data;a&&a.module=="locationPicker"&&(e.localAddress=a.poiaddress||"",e.localName=a.poiname||"",e.localCity=a.cityname||"",e.localLatitude=a.latlng.lat||"",e.localLongitude=a.latlng.lng||"")},!1)},handleMapClose(){this.localMapShow=!1},handleMapOpen(){this.localMapShow=!0},handleConfirm(){this.$emit("update:address",this.localAddress),this.$emit("update:longitude",this.localLongitude),this.$emit("update:latitude",this.localLatitude),this.$emit("update:name",this.localName),this.$emit("update:city",this.localCity),this.handleMapClose()},handleCopy(e){this.$cvCopy(e)}}},ei={class:"cv-geo-map__wrap"},ti={class:"cv-geo-map__box"},oi={style:{width:"100%",height:"510px"}},ai=["src"],ni={class:"cv-geo-map__info"},li={key:0,class:"cv-geo-map__address"},ri={key:1,class:"cv-geo-map__jwd"};function ii(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input"),c=(0,t.resolveComponent)("el-tooltip"),d=(0,t.resolveComponent)("el-button"),u=(0,t.resolveComponent)("el-scrollbar"),h=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,[(0,t.createElementVNode)("div",ei,[(0,t.createElementVNode)("div",ti,[(0,t.createVNode)(c,{class:"item",effect:"dark",content:"请点击查找位置选择位置",placement:"bottom"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{modelValue:n.localAddress,"onUpdate:modelValue":o[0]||(o[0]=m=>n.localAddress=m)},null,8,["modelValue"])]),_:1}),(0,t.createVNode)(d,{type:"primary",icon:"ElIconSearch",onClick:l.handleMapOpen},{default:(0,t.withCtx)(()=>[...o[5]||(o[5]=[(0,t.createTextVNode)("请查找位置",-1)])]),_:1},8,["onClick"])])]),(0,t.createVNode)(h,{modelValue:n.localMapShow,"onUpdate:modelValue":o[4]||(o[4]=m=>n.localMapShow=m),title:a.title,width:"520","before-close":l.handleMapClose},{footer:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",ni,[n.localAddress?((0,t.openBlock)(),(0,t.createElementBlock)("div",li,[o[6]||(o[6]=(0,t.createElementVNode)("span",{class:"cv-geo-map__label"},"已选:",-1)),(0,t.createVNode)(c,{class:"item",effect:"dark",content:"点击复制",placement:"bottom"},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("span",{class:"cv-geo-map__value",onClick:o[1]||(o[1]=m=>l.handleCopy(n.localAddress))},(0,t.toDisplayString)(n.localAddress),1)]),_:1})])):(0,t.createCommentVNode)("",!0),n.localAddress?((0,t.openBlock)(),(0,t.createElementBlock)("div",ri,[o[7]||(o[7]=(0,t.createElementVNode)("span",{class:"cv-geo-map__label"},"经度:",-1)),(0,t.createVNode)(c,{class:"item",effect:"dark",content:"点击复制",placement:"bottom"},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("span",{class:"cv-geo-map__value",onClick:o[2]||(o[2]=m=>l.handleCopy(n.localLongitude))},(0,t.toDisplayString)(n.localLongitude),1)]),_:1}),o[8]||(o[8]=(0,t.createElementVNode)("span",{class:"cv-geo-map__label"},"纬度:",-1)),(0,t.createVNode)(c,{class:"item",effect:"dark",content:"点击复制",placement:"bottom"},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("span",{class:"cv-geo-map__value",onClick:o[3]||(o[3]=m=>l.handleCopy(n.localLatitude))},(0,t.toDisplayString)(n.localLatitude),1)]),_:1})])):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("div",null,[(0,t.createVNode)(d,{onClick:l.handleMapClose},{default:(0,t.withCtx)(()=>[...o[9]||(o[9]=[(0,t.createTextVNode)("取消",-1)])]),_:1},8,["onClick"]),(0,t.createVNode)(d,{type:"primary",onClick:l.handleConfirm,disabled:!n.localAddress},{default:(0,t.withCtx)(()=>[...o[10]||(o[10]=[(0,t.createTextVNode)("确认选择",-1)])]),_:1},8,["onClick","disabled"])])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",oi,[(0,t.createVNode)(u,{style:{height:"510px"}},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("iframe",{id:"mapPage",width:"100%",height:"100%",style:{height:"500px"},frameborder:"0",src:l.mapSrc},null,8,ai)]),_:1})])]),_:1},8,["modelValue","title","before-close"])],64)}var dt=y(Jr,[["render",ii]]);ct.install=function(e){e.component(ct.name,ct)};dt.install=function(e){e.component(dt.name,dt)};var si={...b.ElOption,extends:b.ElOption,name:"cvSelectOpt"},ut=si,ci={name:"cvSelectBase",emits:["onChoose","change","update:modelValue"],props:{...b.ElSelect.props,modelValue:{type:[String,Array,Number],default(){return""}},emptyValues:{type:[Array],default:[null,void 0]},dataLists:{type:[Array],default(){return[]}},dataField:{type:[Object],default(){return{}}},dataDisabled:{type:[Array],default(){return[]}},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"}},watch:{modelValue(e){this.localVal=e},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(e){this.handleChange()}},data(){return{localVal:this.modelValue,localOpt:[]}},methods:{handleChoose(e,o){this.$emit("onChoose",e,o)},handleChange(){this.$emit("change",this.localVal),this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let e=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(r=>{e.push({label:r,value:r})}),this.localOpt=e;else{var o=this.dataField&&this.dataField.label||"label",a=this.dataField&&this.dataField.value||"value";this.dataLists.map(r=>{let n=r[o]===0?0:r[o]||"",l=r[a]===0?0:r[a]||"";if(l=l===0?0:l||n,this.dataDisabled.length>0)for(let s in this.dataDisabled)this.dataDisabled[s][a]==l&&(r.disabled=!0);e.push({label:n,value:l,disabled:r.disabled&&!0||!1}),(r.checked=="true"||r.checked==!0)&&(typeof this.localVal=="string"?this.localVal=l:typeof this.localVal=="object"&&this.localVal.push(l))}),this.localOpt=e}}}};function di(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-option"),c=(0,t.resolveComponent)("el-select");return(0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({class:"cv-select-base"},e.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>n.localVal=d),size:e.size,filterable:"",clearable:""}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default",{},()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.localOpt,(d,u)=>((0,t.openBlock)(),(0,t.createBlock)(s,{key:u,label:d.label,value:d.value,disabled:d.disabled,onClick:h=>l.handleChoose(d,u)},null,8,["label","value","disabled","onClick"]))),128))])]),_:3},16,["modelValue","size"])}var mt=y(ci,[["render",di]]),ui={name:"cvSelectTree",emits:["update:modelValue","change"],props:{...b.ElSelect.props,modelValue:{type:[String,Array,Number],default(){return""}},dataLists:{type:[Array],default(){return[]}},dataField:{type:[Object],default:()=>({value:"id",label:"title",children:"children"})},clearable:{type:Boolean,default:!0},accordion:{type:Boolean,default:!1},defaultExpandAll:{type:Boolean,default:!0},dataDisabled:{type:[Array],default(){return[]}},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"},showAllLevels:{type:Boolean,default:!0},showCheckbox:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},emitPath:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},refID:{type:[String],required:!1,default(){return"cvSelectTree-"+ +new Date+((Math.random()/1e4).toFixed(0)+"")}}},watch:{modelValue(){this.localVal=this.modelValue,this.initHandle()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(){this.handleChange()}},data(){return{localVal:"",localOpt:[],localTitle:"",defaultExpandedKey:[]}},computed:{props2(){return Object.assign(this.dataField,{emitPath:this.emitPath},{multiple:this.multiple})}},created(){},mounted(){this.localVal=this.modelValue,this.initHandle()},methods:{initHandle(){if(this.localVal){var e=this.$refs[this.refID+"tree"].getNode(this.localVal);e&&(this.localTitle=e.data[this.dataField.label],this.$refs[this.refID+"tree"].setCurrentKey(this.localVal),this.defaultExpandedKey=[this.localVal])}else this.clearHandle();this.initScroll()},initScroll(){this.$nextTick(()=>{let e=document.querySelectorAll(".cv-select-tree .el-scrollbar .el-select-dropdown__wrap")[0],o=document.querySelectorAll(".cv-select-tree .el-scrollbar .el-scrollbar__bar");e.style.cssText="margin: 0px; max-height: none; overflow: hidden;",o.forEach(a=>a.style.width=0)})},handleNodeClick(e,o,a){e.disabled||(this.localTitle=e[this.dataField.label],this.localVal=e[this.dataField.value],this.defaultExpandedKey=[],this.$refs[this.refID].blur())},clearHandle(){this.localTitle="",this.localVal="",this.defaultExpandedKey=[],this.clearSelected()},clearSelected(){document.querySelectorAll(`#${this.refID}tree .el-tree-node`).forEach(e=>e.classList.remove("is-current"))},handleChange(){this.$emit("change",this.localVal),this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let e=this.dataLists;this.dataField&&this.dataField.label;let o=this.dataField&&this.dataField.value||"value",a=this.dataField&&this.dataField.children||"children",r=this.dataDisabled;n(e);function n(l){for(let s in l)r.map(c=>{l[s][o]==c[o]&&(l[s].disabled=!0)}),l[s][a]&&n(l[s][a])}this.localOpt=e}}};function mi(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-tree"),c=(0,t.resolveComponent)("el-option"),d=(0,t.resolveComponent)("el-select");return(0,t.openBlock)(),(0,t.createBlock)(d,(0,t.mergeProps)(e.$props,{ref:a.refID,"popper-class":"cv-select-tree",modelValue:n.localTitle,onClear:l.clearHandle}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{value:n.localTitle,label:n.localTitle,class:"options"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{"highlight-current":"",id:a.refID+"tree",ref:a.refID+"tree",accordion:a.accordion,showCheckbox:a.showCheckbox,data:n.localOpt,props:a.dataField,"node-key":a.dataField.value,onNodeClick:l.handleNodeClick,"default-expand-all":a.defaultExpandAll},null,8,["id","accordion","showCheckbox","data","props","node-key","onNodeClick","default-expand-all"])]),_:1},8,["value","label"])]),_:1},16,["modelValue","onClear"])}var pt=y(ui,[["render",mi],["__scopeId","data-v-a62c37b7"]]);ut.install=function(e){e.component(ut.name,ut)};mt.install=function(e){e.component(mt.name,mt)};pt.install=function(e){e.component(pt.name,pt)};var pi={name:"cvCascaderBase",components:{},props:{...b.ElCascader.props,modelValue:{type:[String,Array,Number],default(){}},dataLists:{type:[Array],default(){return[]}},dataDisabled:{type:[Array],default(){return[]}},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"},showAllLevels:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},dataField:{type:[Object],default(){return{}}},emitPath:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(){this.handleChange(),this.handleInput()}},data(){return{localVal:this.modelValue,localOpt:[]}},computed:{props2(){return Object.assign(this.dataField,{emitPath:this.emitPath},{multiple:this.multiple})}},created(){},methods:{handleChange(){this.$emit("change",this.localVal)},handleInput(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let e=this.dataLists,o=this.dataField&&this.dataField.value||"value",a=this.dataDisabled;r(e);function r(n){for(let l in n)a.map(s=>{n[l][o]==s[o]&&(n[l].disabled=!0)}),n[l].children&&r(n[l].children)}this.localOpt=e},getCheckedNodes(){}}},hi={class:"cv-cascader-base block"};function gi(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-cascader");return(0,t.openBlock)(),(0,t.createElementBlock)("div",hi,[(0,t.createVNode)(s,(0,t.mergeProps)(e.$props,{props:l.props2,modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>n.localVal=c),options:n.localOpt,onChange:l.handleChange,onGetCheckedNodes:l.getCheckedNodes}),null,16,["props","modelValue","options","onChange","onGetCheckedNodes"])])}var ht=y(pi,[["render",gi]]);ht.install=function(e){e.component(ht.name,ht)};var qa={props:{...b.ElTimePicker.props,modelValue:{type:[String,Array,Number,Object,Date],default:null}},watch:{modelValue:{handler(){if(this.valueFormat=="timestamp"){if(Array.isArray(this.modelValue)){var e=this.modelValue.map(o=>{if(!isNaN(o)&&o.toString().length==10)return o*1e3});if(this.localVal&&this.localVal[0]==e[0]&&this.localVal[1]==e[1])return;this.localVal=e}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=this.modelValue*1e3&&(this.localVal=this.modelValue*1e3);return}this.localVal=this.modelValue},immediate:!0,deep:!0},localVal(){if(this.valueFormat=="timestamp"){var e;if(Array.isArray(this.localVal)){if(e=this.localVal.map(o=>{if(!isNaN(o)&&o.toString().length==13)return parseInt(o/1e3)}),this.modelValue&&e[0]==this.modelValue[0]&&e[1]==this.modelValue[1])return;this.$emit("update:modelValue",e)}else!isNaN(this.localVal)&&this.localVal.toString().length==13&&(e=parseInt(this.localVal/1e3),this.modelValue!=e&&this.$emit("update:modelValue",e));return}this.$emit("update:modelValue",this.localVal)}},data(){return{localVal:""}},created(){},methods:{}},fi={name:"cvTimeBase",mixins:[qa],props:{format:{type:String,default:"HH:mm:ss"},valueFormat:{type:String,default:"HH:mm:ss"},placeholder:{type:[String,Number],default:"选择时间"}}};function vi(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-time-picker");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({class:"cv-timePicker-base"},e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),format:a.format,"picker-options":{}}),null,16,["modelValue","format"])}var gt=y(fi,[["render",vi]]),yi={name:"cvTimeRange",mixins:[qa],props:{format:{type:String,default:"HH:mm:ss"},valueFormat:{type:String,default:"HH:mm:ss"},startPlaceholder:{type:[String,Number],default:"开始时间"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束时间"}}};function Ci(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-time-picker");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({class:"cv-timePicker-range"},e.$props,{"is-range":"",modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),format:a.format,"range-separator":a.rangeSeparator,"start-placeholder":a.startPlaceholder,"end-placeholder":a.endPlaceholder}),null,16,["modelValue","format","range-separator","start-placeholder","end-placeholder"])}var ft=y(yi,[["render",Ci]]),bi={name:"cvTimeSelect"};function ki(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-time-select");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({class:"cv-time-select"},e.$props),null,16)}var vt=y(bi,[["render",ki]]),yo={props:{...b.ElDatePicker.props,modelValue:{type:[String,Array,Number,Object,Date],default:null},pickerOptions:{type:Boolean,default:!1}},watch:{modelValue:{handler(){if(this.valueFormat=="timestamp"){if(Array.isArray(this.modelValue)){var e=this.modelValue.map(o=>{if(!isNaN(o)&&o.toString().length==10)return o*1e3});if(this.localVal&&this.localVal[0]==e[0]&&this.localVal[1]==e[1])return;this.localVal=e}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=this.modelValue*1e3&&(this.localVal=this.modelValue*1e3);return}this.localVal=this.modelValue},immediate:!0,deep:!0},localVal(){if(this.valueFormat=="timestamp"){var e;if(Array.isArray(this.localVal)){if(e=this.localVal.map(o=>{if(!isNaN(o)&&o.toString().length==13)return parseInt(o/1e3)}),this.modelValue&&e[0]==this.modelValue[0]&&e[1]==this.modelValue[1])return;this.$emit("update:modelValue",e)}else!isNaN(this.localVal)&&this.localVal.toString().length==13&&(e=parseInt(this.localVal/1e3),this.modelValue!=e&&this.$emit("update:modelValue",e));return}this.$emit("update:modelValue",this.localVal)}},data(){return{localVal:""}}},wi={name:"cvDateBase",mixins:[yo],props:{format:{type:String,default:"YYYY-MM-DD"},valueFormat:{type:String,default:"YYYY-MM-DD"},placeholder:{type:[String,Number],default:"选择日期"}},data(){return{localPickerOptions:{disabledDate(e){return e.getTime()>Date.now()},shortcuts:[{text:"今天",onClick(e){e.$emit("pick",new Date)}},{text:"昨天",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24),e.$emit("pick",o)}},{text:"一周前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*7),e.$emit("pick",o)}},{text:"一个月前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*30),e.$emit("pick",o)}},{text:"三个月前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*90),e.$emit("pick",o)}},{text:"六个月前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*180),e.$emit("pick",o)}},{text:"一年前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*365),e.$emit("pick",o)}}]}}}};function _i(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-date-picker");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),type:"date","value-format":a.valueFormat,placeholder:a.placeholder,"picker-options":e.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","placeholder","picker-options"])}var yt=y(wi,[["render",_i]]),Vi={name:"cvDateRange",mixins:[yo],props:{valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:[String,Number],default:"开始日期"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束日期"}},data(){return{localPickerOptions:{shortcuts:[{text:"今天",onClick(e){const o=new Date,a=new Date;e.$emit("pick",[a,o])}},{text:"昨天",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24),o.setTime(o.getTime()-3600*1e3*24),e.$emit("pick",[a,o])}},{text:"最近一周",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*7),e.$emit("pick",[a,o])}},{text:"最近一个月",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*30),e.$emit("pick",[a,o])}},{text:"最近三个月",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*90),e.$emit("pick",[a,o])}},{text:"最近六个月",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*180),e.$emit("pick",[a,o])}},{text:"最近一年",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*365),e.$emit("pick",[a,o])}}]}}}};function Bi(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-date-picker");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),type:"daterange","value-format":a.valueFormat,"range-separator":a.rangeSeparator,"start-placeholder":a.startPlaceholder,"end-placeholder":a.endPlaceholder,"picker-options":e.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","range-separator","start-placeholder","end-placeholder","picker-options"])}var Ct=y(Vi,[["render",Bi]]),Si={name:"cvDatetimeBase",mixins:[yo],props:{format:{type:String,default:"YYYY-MM-DD HH:mm:ss"},valueFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},placeholder:{type:[String,Number],default:"选择日期时间"}},data(){return{localPickerOptions:{disabledDate(e){return e.getTime()>Date.now()},shortcuts:[{text:"今天",onClick(e){e.$emit("pick",new Date)}},{text:"昨天",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24),e.$emit("pick",o)}},{text:"一周前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*7),e.$emit("pick",o)}},{text:"一个月前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*30),e.$emit("pick",o)}},{text:"三个月前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*90),e.$emit("pick",o)}},{text:"六个月前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*180),e.$emit("pick",o)}},{text:"一年前",onClick(e){const o=new Date;o.setTime(o.getTime()-3600*1e3*24*365),e.$emit("pick",o)}}]}}}};function Ni(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-date-picker");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),type:"datetime","value-format":a.valueFormat,placeholder:a.placeholder,"picker-options":e.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","placeholder","picker-options"])}var bt=y(Si,[["render",Ni]]),Ei={name:"cvDatetimeRange",mixins:[yo],props:{valueFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},startPlaceholder:{type:[String,Number],default:"开始日期"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束日期"}},data(){return{localPickerOptions:{shortcuts:[{text:"今天",onClick(e){const o=new Date,a=new Date;e.$emit("pick",[a,o])}},{text:"昨天",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24),o.setTime(o.getTime()-3600*1e3*24),e.$emit("pick",[a,o])}},{text:"最近一周",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*7),e.$emit("pick",[a,o])}},{text:"最近一个月",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*30),e.$emit("pick",[a,o])}},{text:"最近三个月",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*90),e.$emit("pick",[a,o])}},{text:"最近六个月",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*180),e.$emit("pick",[a,o])}},{text:"最近一年",onClick(e){const o=new Date,a=new Date;a.setTime(a.getTime()-3600*1e3*24*365),e.$emit("pick",[a,o])}}]}}}};function xi(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-date-picker");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{modelValue:e.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>e.localVal=c),type:"datetimerange","value-format":a.valueFormat,"range-separator":a.rangeSeparator,"start-placeholder":a.startPlaceholder,"end-placeholder":a.endPlaceholder,align:"right","picker-options":e.pickerOptions&&n.localPickerOptions}),null,16,["modelValue","value-format","range-separator","start-placeholder","end-placeholder","picker-options"])}var kt=y(Ei,[["render",xi]]),$i={name:"cvDatetimeScreen",props:{start:{type:String,default:null},end:{type:String,default:null},autoUpdate:{type:Boolean,default:!0}},emits:["update:start","update:end","change"],data(){return{defaultTime:[new Date(2e3,0,1,0,0,0),new Date(2e3,0,1,23,59,59)],internalValue:[this.start||"",this.end||""]}},watch:{start(e){(e===null||e==="")&&(this.end===null||this.end==="")?this.internalValue=[null,null]:this.internalValue[0]=e},end(e){(this.start===null||this.start==="")&&(e===null||e==="")?this.internalValue=[null,null]:this.internalValue[1]=e}},computed:{dateUtil(){return{getStartOfDay(e=new Date){const o=new Date(e);return o.setHours(0,0,0,0),o},getEndOfDay(e=new Date){const o=new Date(e);return o.setHours(23,59,59,999),o},getYesterday(){const e=new Date;return e.setDate(e.getDate()-1),e},getDaysAgo(e){const o=new Date;return o.setDate(o.getDate()-(e-1)),o},getFirstDayOfMonth(){const e=new Date;return e.setDate(1),e},getFirstDayOfYear(){const e=new Date;return e.setMonth(0,1),e}}},refinedShortcuts(){return[{text:"本日",value:()=>[this.dateUtil.getStartOfDay(),this.dateUtil.getEndOfDay()]},{text:"昨天",value:()=>{const e=this.dateUtil.getYesterday();return[this.dateUtil.getStartOfDay(e),this.dateUtil.getEndOfDay(e)]}},{text:"最近7天",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getDaysAgo(7)),this.dateUtil.getEndOfDay()]},{text:"最近30天",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getDaysAgo(30)),this.dateUtil.getEndOfDay()]},{text:"本月",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getFirstDayOfMonth()),this.dateUtil.getEndOfDay()]},{text:"本年",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getFirstDayOfYear()),this.dateUtil.getEndOfDay()]},{text:"全部",value:()=>[null,null]}]}},methods:{syncInternalValue(){(this.start===null||this.start==="")&&(this.end===null||this.end==="")?this.internalValue=[null,null]:this.internalValue=[this.start,this.end]},handleDateChange(e){e?(this.$emit("update:start",e[0]),this.$emit("update:end",e[1])):(this.$emit("update:start",null),this.$emit("update:end",null)),this.$emit("change",e)},handleCalendarChange(e){}},created(){this.syncInternalValue()}};function Di(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-date-picker");return(0,t.openBlock)(),(0,t.createBlock)(s,{modelValue:n.internalValue,"onUpdate:modelValue":o[0]||(o[0]=c=>n.internalValue=c),type:"datetimerange",shortcuts:l.refinedShortcuts,"range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"YYYY-MM-DD HH:mm:ss","default-time":n.defaultTime,onChange:l.handleDateChange,onCalendarChange:l.handleCalendarChange,clearable:"",class:"screen-date-picker"},null,8,["modelValue","shortcuts","default-time","onChange","onCalendarChange"])}var wt=y($i,[["render",Di]]);gt.install=function(e){e.component(gt.name,gt)};ft.install=function(e){e.component(ft.name,ft)};vt.install=function(e){e.component(vt.name,vt)};yt.install=function(e){e.component(yt.name,yt)};Ct.install=function(e){e.component(Ct.name,Ct)};bt.install=function(e){e.component(bt.name,bt)};kt.install=function(e){e.component(kt.name,kt)};wt.install=function(e){e.component(wt.name,wt)};var Ti={name:"cvSwitchBase",props:{...b.ElSwitch.props,activeColor:{type:[String],default:""},inactiveColor:{type:[String],default:""},disabled:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.$emit("update:modelValue",this.localVal)}},data(){return{localVal:this.modelValue}},created(){this.localVal=this.modelValue},methods:{}};function Li(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-switch");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>n.localVal=c)}),null,16,["modelValue"])}var _t=y(Ti,[["render",Li]]);_t.install=function(e){e.component(_t.name,_t)};var Ii={name:"cvCodeSms",mixins:[],components:{},props:{...b.ElInput.props,maxlength:{type:[Number,String],default:6},modelValue:{type:[Number,String],default:""},placeholder:{type:[Number,String],default:"请输入验证码"},disabled:{type:Boolean,default:!1},mobile:{type:[Number,String],default:""},mobileParam:{type:String,default:"mobile"},codeUrl:{type:String,default:""},codeSign:{type:Boolean,default:!1},apiFunc:{type:Function,default:null},waitTime:{type:[Number,String],default:60}},watch:{mobile(e){this.localMobile=e},modelValue(e){this.localVal=e}},data(){return{localVal:this.modelValue,localMobile:"",nextTime:0,diyPlaceholder:"短信验证码",btnDisabled:!1,btnText:"获取验证码",btnIntervalObj:null}},created(){this.localMobile=this.mobile},methods:{showDiyMsg(e){this.$message(e)},getSmsCode(){if(!this.localMobile){this.showDiyMsg("手机号不正确"),this.$emit("onGetSms",!1);return}if(!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.localMobile)){this.showDiyMsg("手机号格式不正确"),this.$emit("onGetSms",!1);return}if(!this.codeUrl&&!this.apiFunc){this.showDiyMsg("短信接口地址不能为空");return}this.btnDisabled=!0,!this.btnIntervalObj&&this.btnDisabled&&(this.btnText="请稍后...",this.apiFunc?this.apiFunc({postType:"sendSms",cto_sms_type:"alterMobile",sendCode:"发送验证码",[this.mobileParam]:this.localMobile}).then(e=>{let o=e;o.status==200?(this.showDiyMsg("发送成功!"),setTimeout(()=>{this.codeSign&&(this.diyPlaceholder="识别码:"+(o.data&&o.data.sign||"")),this.smsCodeWaitTime()},500)):(this.showDiyMsg("短信获取失败,请检查网络"),this.btnDisabled=!1,this.btnText="获取验证码")}).catch(e=>{this.btnDisabled=!1,this.btnText="获取验证码"}):(this.btnDisabled=!1,this.btnText="重新获取验证码"))},smsCodeWaitTime(){this.nextTime=Date.parse(new Date)/1e3+parseInt(this.waitTime),this.btnIntervalObj=setInterval(()=>{let e=this.nextTime-Date.parse(new Date)/1e3;e<=0?(clearInterval(this.btnIntervalObj),this.btnText="重新获取验证码",this.btnIntervalObj=0,this.btnDisabled=!1):(this.btnDisabled=!0,this.btnText=e.toString()+"s")},100)},updateInput(e){this.$emit("update:modelValue",this.localVal)}}};function Fi(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-button"),c=(0,t.resolveComponent)("el-input");return(0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)(e.$props,{modelValue:n.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>n.localVal=d),clearable:"",placeholder:n.diyPlaceholder,onInput:l.updateInput}),{append:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{onClick:l.getSmsCode,disabled:n.btnDisabled},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.btnText),1)]),_:1},8,["onClick","disabled"])]),_:1},16,["modelValue","placeholder","onInput"])}var Vt=y(Ii,[["render",Fi]]);Vt.install=function(e){e.component(Vt.name,Vt)};var Pi={props:{fileType:{type:[Array],default:[]},fileSize:{type:[Number],default:2},fileUnit:{type:[String],default:""},multiple:{type:[Boolean],default:!1},limit:{type:[Number],default:5}}},Ai={class:"cv-upload-tip-box"},Mi={key:0},zi={key:1};function Oi(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Ai,[o[0]||(o[0]=(0,t.createElementVNode)("span",null,"最多上传",-1)),(0,t.createElementVNode)("b",null,(0,t.toDisplayString)(a.limit),1),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(a.fileUnit),1),a.fileType.length?((0,t.openBlock)(),(0,t.createElementBlock)("b",Mi,(0,t.toDisplayString)(a.fileType.length?a.fileType.join("/"):""),1)):(0,t.createCommentVNode)("",!0),a.fileType.length?((0,t.openBlock)(),(0,t.createElementBlock)("span",zi,"格式")):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("span",null,"文件;且每"+(0,t.toDisplayString)(a.fileUnit)+"不超过",1),(0,t.createElementVNode)("b",null,(0,t.toDisplayString)(a.fileSize)+"MB",1)])}var ji=y(Pi,[["render",Oi]]),Co={inheritAttrs:!1,emits:["update:modelValue","update:initValue","delete","error","success"],components:{uploadTip:ji},mixins:[Wa],props:{multiple:{type:[Boolean],default:!1},limit:{type:[Number,String],default:1},drag:{type:Boolean,default:!1},httpRequest:{type:[Function],default:()=>{}},accept:String,beforeRemove:Function,upResponseFn:{type:[Function],default:null},signatureFn:{type:Function,default:null},signatureType:{type:[String],default:"aliyun_oss_type2"},signatureParam:{type:[Object],default:()=>({})}},data(){return{cropShow:!1,upIngPercent:0,upIngLoading:!1,upIngFileInfo:{}}},computed:{fileTypeStr(){return this.fileType.join(",")},tipAttr(){return{fileType:this.fileType||[],fileSize:this.fileSize||"",multiple:this?.multiple||!1,limit:this.limit?parseInt(this.limit):5}},mergeAttrs(){let e=this._mergeAttrs("upload");return this.$props.signatureType&&(e.signatureType=this.$props.signatureType),this.$props.signatureFn&&(e.signatureFn=this.$props.signatureFn),this.$props.signatureParam&&(e.signatureParam=this.$props.signatureParam),typeof e.upResponseFn!="function"&&(e.upResponseFn=null),Object.assign({},e,this.$attrs)}},methods:{_commonBeforeUpload(e){e.type;const o=e.name||"";e.size/1024/1024;const a=o.split(".").pop().toLowerCase(),r=this.fileType.join("、");return this.fileType.includes(a)?e>this.fileSize?(ExtendMessage.error(`文件大小不能超过 ${this.fileSize} MB`),!1):!0:(ExtendMessage.error(`文件格式错误,请上传类型 如:${r}格式文件`),!1)},_commonRemove(){return new Promise((e,o)=>{this.$confirm("提示",{title:"确定删除??",showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{e(!0)}).catch(()=>{o(!1)})})},initHttpRequest(){},initOnProgress(e){this.upIngPercent=Number(e.percentage.toFixed(0))},initOnSuccess(e,o){},initOnExceed(){this.$message.error(`最多上传${this.limit}个文件`)}}};function qo(e){let o=[],a=Object.prototype.toString.call(e);if(a==="[object String]")o.push(ma(e));else if(a==="[object Object]")e.name&&e.url&&o.push(e);else if(a==="[object Array]")for(let r in e){let n=e[r],l=Object.prototype.toString.call(n);l==="[object String]"?o.push(ma(n)):l==="[object Object]"&&n.name&&n.url&&o.push(n)}return o}function ma(e){let o=e.lastIndexOf("/"),a=e.substring(o+1,e.length),r="";return a.lastIndexOf(".")>-1&&(r=a.slice(a.lastIndexOf(".")+1),r="image/"+r),{name:a,url:e,type:r,status:"success"}}function te(e){return Math.pow(1024,e)}function pa(e){return e?e<te(1)?e+" B":e<te(2)?(e/te(1)).toFixed(2)+" KB":e<te(3)?(e/te(2)).toFixed(2)+" MB":e<te(4)?(e/te(3)).toFixed(2)+" GB":(e/te(4)).toFixed(2)+" TB":"-"}function Ri(e){if(!e)return!0;const o=e?.expiration_last;if(!o)return!0;const a=Ar(o),r=new Date;return isNaN(a.getTime())?!0:a.getTime()-r.getTime()<=6e4}async function ha(e,o){if(!e||typeof e!="function")return!1;let a=null;if(Ri(a)){let r=await e({...o});if(r&&r.data&&r.status==200)a=r.data||{};else throw b.ElMessage.error("获取STS令牌失败"),new Error(`获取STS令牌失败 ${r?.message}`)}return{...a,pass:!!a}}async function ga(e,o,a,r){e=e||"aliyun_oss_type2",r=r||{};const n=await ha(o,{upload_type:e,...a});if(!n.pass)return b.ElMessage.error("获取oss上传凭证异常");if(e=="oss_upload1"){const l={bucket:n.bucket,region:n.endpoint.split(".")[0],accessKeyId:n.accessKeyId,accessKeySecret:n.accessKeySecret,stsToken:n.securityToken,expiration:n.expiration,...r,refreshSTSToken:async()=>{const s=await ha(o);return{accessKeyId:s.accessKeyId,accessKeySecret:s.accessKeySecret,stsToken:s.securityToken}},refreshSTSTokenInterval:new Date(n.expiration)-new Date-6e4};return new OSS(l)}else if(e=="aliyun_oss_type2")return n;throw new Error("上传类型错误")}async function Ka(e,o,a){let r={},n=new FormData;n.append("success_action_status",o.success_action_status||"200"),n.append("policy",o.policy),n.append("signature",o.signature),n.append("x-oss-signature",o.signature),n.append("x-oss-signature-version","OSS4-HMAC-SHA256"),n.append("x-oss-credential",o.x_oss_credential),n.append("x-oss-date",o.x_oss_date),n.append("x-oss-security-token",o.security_token);let l=o.key;if(o.key||(l=o.dir+"/"+e.name),n.append("key",l),o.callback&&n.append("callback",o.callback),o.callback_var&&fo(o.callback_var))for(const s in o.callback_var)o.callback_var.hasOwnProperty(s)&&n.append(s,o.callback_var[s]);return n.append("file",e),fetch(o.host,{method:"POST",body:n,headers:r}).then(s=>{if(s.ok)return s.json()}).then(s=>{if(s&&s.success)return s.data}).catch(s=>{})}async function Ko(e,o,a,r){if(!a||typeof a!="function")return b.ElMessage.error("签名方法错误"),Promise.reject();try{let n=Kr(),l=Wr(e.type),s=`${n}.${l}`;const c=await a({upload_type:o,...r,save_extension:l}).then(d=>d.data||{}).catch(d=>(b.ElMessage.error("签名失败"),Promise.reject()));if(!c)return Promise.reject();if(c.name&&(s=`${c.name}.${l}`),e instanceof Blob&&(e=new File([e],s,{type:e.type,lastModified:Date.now()})),e)return await Ka(e,c)}catch{return Promise.reject()}}var Ga={};Ga.getData=e=>new Promise((o,a)=>{let r={};Hi(e).then(n=>{r.arrayBuffer=n,r.orientation=Ki(n),o(r)}).catch(n=>{a(n)})});function Hi(e){let o=null;return new Promise((a,r)=>{if(e.src)if(/^data\:/i.test(e.src))o=Wi(e.src),a(o);else if(/^blob\:/i.test(e.src)){var n=new FileReader;n.onload=function(s){o=s.target?.result??null,a(o)},Ui(e.src,function(s){n.readAsArrayBuffer(s)})}else{var l=new XMLHttpRequest;l.onload=function(){if(this.status==200||this.status===0)o=l.response,a(o);else throw"Could not load image";l=null},l.open("GET",e.src,!0),l.responseType="arraybuffer",l.send(null)}else r("img error")})}function Ui(e,o){var a=new XMLHttpRequest;a.open("GET",e,!0),a.responseType="blob",a.onload=function(){(this.status==200||this.status===0)&&o(this.response)},a.send()}function Wi(e){e=e.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var o=atob(e),a=o.length,r=new ArrayBuffer(a),n=new Uint8Array(r),l=0;l<a;l++)n[l]=o.charCodeAt(l);return r}function qi(e,o,a){var r="",n;for(n=o,a+=o;n<a;n++)r+=String.fromCharCode(e.getUint8(n));return r}function Ki(e){var o=new DataView(e),a=o.byteLength,r,n,l,s,c,d,u,h,m,v;if(o.getUint8(0)===255&&o.getUint8(1)===216)for(m=2;m<a;){if(o.getUint8(m)===255&&o.getUint8(m+1)===225){u=m;break}m++}if(u&&(n=u+4,l=u+10,qi(o,n,4)==="Exif"&&(d=o.getUint16(l),c=d===18761,(c||d===19789)&&o.getUint16(l+2,c)===42&&(s=o.getUint32(l+4,c),s>=8&&(h=l+s)))),h){for(a=o.getUint16(h,c),v=0;v<a;v++)if(m=h+v*12+2,o.getUint16(m,c)===274){m+=8,r=o.getUint16(m,c);break}}return r}var Gi=class{ctx;img;handle;constructor(){this.ctx=null,this.img=null,this.handle={1:e=>(e&&this.ctx&&this.img&&(e.width=this.img.width,e.height=this.img.height),e),2:e=>(e&&this.ctx&&this.img&&(e.width=this.img.width,e.height=this.img.height,this.ctx.translate(this.img.width,0),this.ctx.scale(-1,1)),e),3:e=>(e&&this.ctx&&this.img&&(e.width=this.img.width,e.height=this.img.height,this.ctx.translate(this.img.width/2,this.img.height/2),this.ctx.rotate(180*Math.PI/180),this.ctx.translate(-this.img.width/2,-this.img.height/2)),e),4:e=>(e&&this.ctx&&this.img&&(e.width=this.img.width,e.height=this.img.height,this.ctx.translate(0,this.img.height),this.ctx.scale(1,-1)),e),5:e=>(e&&this.ctx&&this.img&&(e.width=this.img.height,e.height=this.img.width,this.ctx.rotate(.5*Math.PI),this.ctx.scale(1,-1)),e),6:e=>(e&&this.ctx&&this.img&&(e.width=this.img.height,e.height=this.img.width,this.ctx.translate(this.img.height/2,this.img.width/2),this.ctx.rotate(90*Math.PI/180),this.ctx.translate(-this.img.width/2,-this.img.height/2)),e),7:e=>(e&&this.ctx&&this.img&&(e.width=this.img.height,e.height=this.img.width,this.ctx.rotate(.5*Math.PI),this.ctx.translate(this.img.width,-this.img.height),this.ctx.scale(-1,1)),e),8:e=>(e&&this.ctx&&this.img&&(e.width=this.img.height,e.height=this.img.width,this.ctx.translate(this.img.height/2,this.img.width/2),this.ctx.rotate(-90*Math.PI/180),this.ctx.translate(-this.img.width/2,-this.img.height/2)),e)}}render(e,o,a){if(this.ctx=o.getContext("2d"),this.img=e,this.handle[a]){const r=this.handle[a](o);return this.ctx=r.getContext("2d"),this.ctx.drawImage(this.img,0,0,this.img.width,this.img.height),this.ctx.restore(),r}else return o.width=e.width,o.height=e.height,this.ctx.drawImage(this.img,0,0,this.img.width,this.img.height),o}},Yi=(e,o,a)=>{let r="default";for(const l of Object.keys(fa))if(l===a){r=a;break}const n=fa[r];return n(e,o,a)},fa={contain:(e,o)=>{let a=1;const{width:r,height:n}={...e},l=o.width,s=o.height;return r>l&&(a=l/r),n*a>s&&(a=s/n),a},cover:(e,o)=>{let a=1;const{width:r,height:n}={...e},l=o.width,s=o.height;return a=l/r,n*a<s&&(a=s/n),a},default:(e,o,a)=>{let r=1;if(a==="original")return r;let{width:n,height:l}={...e};const s=o.width,c=o.height,d=a.split(" ");try{let u=d[0];if(u.search("px")!==-1&&(u=u.replace("px",""),n=parseFloat(u),r=n/e.width),u.search("%")!==-1&&(u=u.replace("%",""),n=parseFloat(u)/100*s,r=n/e.width),d.length===2&&u==="auto"){let h=d[1];h.search("px")!==-1&&(h=h.replace("px",""),l=parseFloat(h),r=l/e.height),h.search("%")!==-1&&(h=h.replace("%",""),l=parseFloat(h)/100*c,r=l/e.height)}}catch{r=1}return r}},Zi=new Gi,Uo=async e=>new Promise((o,a)=>{const r=new Image;r.onload=()=>o(r),r.onerror=a,r.src=e,e.substr(0,4)!=="data"&&(r.crossOrigin="")}),Qi=e=>Ga.getData(e),Xi=(e,o,a)=>o&&Zi.render(e,o,a),Ee=e=>{if(typeof navigator>"u")return["0","0","0"];const o=navigator.userAgent.split(" ");let a="",r=["0","0","0"];const n=new RegExp(e,"i");for(let l=0;l<o.length;l++)n.test(o[l])&&(a=o[l]);return a&&(r=a.split("/")[1].split(".")),r},Ji=e=>{if(Number(Ee("chrome")[0])>=81)return-1;if(Number(Ee("safari")[0])>=605){const a=Ee("version");if(Number(a[0])>13&&Number(a[1])>1)return-1}const o=typeof navigator<"u"?navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/):null;if(o){const a=o[1].split("_").map(r=>Number(r));return a[0]>13||a[0]>=13&&a[1]>=4||Number(Ee("Firefox")[0])>=97?-1:e}return e},es=(e,o,a)=>Yi(e,o,a),xe=(e,o)=>{const{scale:a,imgStyle:r,layoutStyle:n,rotate:l}=e,s={width:a*r.width,height:a*r.height};let c=(n.width-s.width)/2,d=(n.height-s.height)/2;o&&(c=o.x,d=o.y);const u=((s.width-r.width)/2+c)/a,h=((s.height-r.height)/2+d)/a;return{imgExhibitionStyle:{width:`${r.width}px`,height:`${r.height}px`,transform:`scale(${a}, ${a}) translate3d(${u}px, ${h}px, 0px) rotateZ(${l}deg)`},imgAxis:{x:c,y:d,scale:a,rotate:l}}},ts=(e,o,a)=>new Promise((r,n)=>{e.toBlob(l=>{if(l){r(l);return}n(new Error("canvas toBlob failed"))},`image/${o}`,a)}),os=async e=>e?/\.(gif|jpg|jpeg|png|bmp|GIF|JPG|PNG|WEBP|webp)$/.test(e.name)?new Promise((o,a)=>{const r=new FileReader;r.onload=n=>{let l="";const s=n.target;typeof s.result=="object"&&s.result?l=window.URL.createObjectURL(new Blob([s.result])):l=s.result,o(l)},r.onerror=a,r.readAsArrayBuffer(e)}):(alert("图片类型必须是.gif,jpeg,jpg,png,bmp,webp中的一种"),""):"",as=(e,o,a=0,r=1)=>{const n=document.createElement("canvas"),l=n.getContext("2d");let{width:s,height:c}=o,d=0,u=0,h=0;return s=s*r,c=c*r,n.width=s,n.height=c,a&&(h=Math.ceil(Math.sqrt(s*s+c*c)),n.width=h,n.height=h,l.translate(h/2,h/2),l.rotate(a*Math.PI/180),d=-h/2+(h-s)/2,u=-h/2+(h-c)/2),l.drawImage(e,d,u,s,c),l.restore(),n},va=async e=>{const{type:o="base64",url:a,imgLayout:r,imgAxis:n,cropAxis:l,cropLayout:s,outputType:c,outputSize:d=1,full:u=!0,cropping:h}=e,m=document.createElement("canvas"),v=m.getContext("2d");let f;try{f=await Uo(a)}catch{f=new Image}return new Promise((C,p)=>{try{const w=as(f,r,n.rotate,n.scale);let V=n.x-l.x,k=n.y-l.y,B=s.width,N=s.height;h||(B=w.width,N=w.height,V=0,k=0),n.rotate&&h&&(V-=(w.width-r.width*n.scale)/2,k-=(w.height-r.height*n.scale)/2);const H=u&&typeof window<"u"?Math.max(1,window.devicePixelRatio||1):1;if(m.width=Math.round(B*H),m.height=Math.round(N*H),v.scale(H,H),v.drawImage(w,V,k,w.width,w.height),v.restore(),o==="blob"){ts(m,c,d).then(C).catch(p);return}C(m.toDataURL(`image/${c}`,d))}catch(w){p(w)}})},ns=(e,o,a,r)=>{const n={left:0,right:0,top:0,bottom:0,scale:1},l=a.rotate*Math.PI/180,s=[{x:e.x,y:e.y},{x:e.x+o.width,y:e.y},{x:e.x+o.width,y:e.y+o.height},{x:e.x,y:e.y+o.height}].map(N=>To(N,-l)),c=Math.max(...s.map(N=>N.x))-Math.min(...s.map(N=>N.x)),d=Math.max(...s.map(N=>N.y))-Math.min(...s.map(N=>N.y)),u=Math.max(a.scale,c/r.width,d/r.height),h=r.width*u,m=r.height*u,v=h/2,f=m/2,C=Math.max(...s.map(N=>N.x-v)),p=Math.min(...s.map(N=>N.x+v)),w=Math.max(...s.map(N=>N.y-f)),V=Math.min(...s.map(N=>N.y+f)),k=To({x:a.x+v,y:a.y+f},-l),B=To({x:ya(k.x,C,p),y:ya(k.y,w,V)},l);return n.scale=u,n.left=B.x-v,n.right=B.x-v,n.top=B.y-f,n.bottom=B.y-f,n},ya=(e,o,a)=>Math.min(Math.max(e,o),a),To=(e,o)=>({x:e.x*Math.cos(o)-e.y*Math.sin(o),y:e.x*Math.sin(o)+e.y*Math.cos(o)}),Lo=(e,o,a,r)=>{let n="",l="";const s=ns(e,o,a,r),c=s.scale,d=.5;return a.x>s.left+d?n="left":a.x<s.right-d&&(n="right"),a.y>s.top+d?l="top":a.y<s.bottom-d&&(l="bottom"),{landscape:n,portrait:l,scale:c,boundary:s,imgAxis:a}},ls={easeInOut:(e,o,a,r)=>(e=e/r*2,e<1?a/2*e*e+o:-a/2*(--e*(e-2)-1)+o)},ye=(e,o,a,r)=>{if(a<=0||e===o)return r&&r(o),()=>0;let n=0;const l=Math.max(1,Math.ceil(a/17));let s=0;const c=()=>{const d=ls.easeInOut(n,e,o-e,l);n++,n<=l?(r&&r(d),s=requestAnimationFrame(c)):r&&r(o)};return c(),()=>s},Io=!1,Fo=.2,Ca="",rs=typeof navigator<"u"&&navigator.userAgent.indexOf("Firefox")>-1,Ya=typeof window<"u"&&(!!window.ActiveXObject||"ActiveXObject"in window),is=(e,o,a)=>{let r=e.deltaY||e.wheelDelta,n=o;rs&&(r=r*30),Ya&&(r=-r);const l=Fo/a.width*r;l<0&&(n+=Math.abs(l)),l>0&&o>Math.abs(l)&&(n-=Math.abs(l));const s=l<0?"add":"reduce";return s!==Ca&&(Ca=s,Fo=.2),Io||window.setTimeout(()=>{Io=!1,Fo+=.01},100),Io=!0,n},ss=(e,o)=>e*o,Po=typeof document<"u"&&"onwheel"in document.createElement("div")?"wheel":"mousewheel",ba=.2,Ao=100,cs=class{handlers;constructor(){this.handlers=new Map}addHandler(e,o){const a=this.handlers.get(e);let r=[];a&&(r=[...a]),r.push(o),this.handlers.set(e,r)}fire(e){const o=this.handlers.get(e.type);o&&o.forEach(a=>{a(e)})}removeHandler(e,o){const a=this.handlers.get(e);if(!a)return;let r=0;for(const n=a.length;r<n&&a[r]!==o;r++);a.splice(r,1),this.handlers.set(e,a)}},ka=typeof window<"u"&&"ontouchstart"in window,wa=typeof window<"u"&&"onmouseup"in window,_a=class{element;pre;watcher;touches;constructor(e){this.element=e,this.touches=null,this.pre={x:0,y:0},this.watcher=new cs}fire(e){this.watcher.fire(e)}getAxis(e){return{x:e.clientX,y:e.clientY}}getTouchPair(e){return e.length<2?null:[e[0],e[1]]}start(e){e.preventDefault(),e.which===1&&(this.pre=this.getAxis(e),this.fire({type:"down",event:e}),window.addEventListener("mousemove",this.move),window.addEventListener("mouseup",this.stop))}startTouch(e){const o=e.touches[0];if(!o)return;this.pre={x:o.clientX,y:o.clientY},this.fire({type:"down",event:e});const a=this.getTouchPair(e.touches);a?(this.touches=a,window.addEventListener("touchmove",this.scaleTouch,{passive:!1}),window.removeEventListener("touchmove",this.moveTouch)):(window.addEventListener("touchmove",this.moveTouch,{passive:!1}),window.removeEventListener("touchmove",this.scaleTouch)),window.addEventListener("touchend",this.stopTouch)}move(e){e.preventDefault();const o=this.getAxis(e);this.fire({type:"down-to-move",event:e,change:{x:o.x-this.pre.x,y:o.y-this.pre.y}}),this.pre=o}moveTouch(e){e.preventDefault();const o=e.touches[0];o&&(this.fire({type:"down-to-move",event:e,change:{x:o.clientX-this.pre.x,y:o.clientY-this.pre.y}}),this.pre={x:o.clientX,y:o.clientY})}getLen(e){return Math.sqrt(e.x*e.x+e.y*e.y)}getScale(e,o){const a={x:e[1].clientX-e[0].clientX,y:e[1].clientY-e[0].clientY},r={x:o[1].clientX-o[0].clientX,y:o[1].clientY-o[0].clientY};return this.getLen(a)/this.getLen(r)}scaleTouch(e){e.preventDefault();const o=this.getTouchPair(e.touches);!o||!this.touches||(this.fire({type:"down-to-scale",event:e,scale:this.getScale(o,this.touches)}),this.touches=o)}stop(e){this.fire({type:"up",event:e}),window.removeEventListener("mousemove",this.move),window.removeEventListener("mouseup",this.stop)}stopTouch(e){this.fire({type:"up",event:e}),this.touches=null,window.removeEventListener("touchmove",this.moveTouch),window.removeEventListener("touchmove",this.scaleTouch),window.removeEventListener("touchend",this.stopTouch)}on(e,o){this.watcher.addHandler(e,o),!(e!=="down-to-move"&&e!=="down-to-scale"&&e!=="up")&&(wa&&(this.start=this.start.bind(this),this.move=this.move.bind(this),this.stop=this.stop.bind(this),this.element.addEventListener("mousedown",this.start)),ka&&(this.startTouch=this.startTouch.bind(this),this.moveTouch=this.moveTouch.bind(this),this.scaleTouch=this.scaleTouch.bind(this),this.stopTouch=this.stopTouch.bind(this),this.element.addEventListener("touchstart",this.startTouch,{passive:!1})))}off(e,o){this.watcher.removeHandler(e,o),!(e!=="down-to-move"&&e!=="down-to-scale"&&e!=="up")&&(wa&&(this.element.removeEventListener("mousedown",this.start),window.removeEventListener("mousemove",this.move),window.removeEventListener("mouseup",this.stop)),ka&&(this.element.removeEventListener("touchstart",this.startTouch),window.removeEventListener("touchmove",this.moveTouch),window.removeEventListener("touchmove",this.scaleTouch),window.removeEventListener("touchend",this.stopTouch)))}},ds=(0,t.defineComponent)({name:"cropper-loading",props:{isVisible:{type:Boolean,default:!1}},render(){const{$slots:e}=this;return this.isVisible?(0,t.createVNode)("section",{class:"cropper-loading"},[e.default?e.default():(0,t.createVNode)("p",{class:"cropper-loading-spin"},[(0,t.createVNode)("i",null,[(0,t.createVNode)("svg",{viewBox:"0 0 1024 1024",focusable:"false","data-icon":"loading",width:"1.5em",height:"1.5em",fill:"currentColor","aria-hidden":"true"},[(0,t.createVNode)("path",{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 0 0-94.3-139.9 437.71 437.71 0 0 0-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"},null)])]),(0,t.createVNode)("span",null,null)])]):""}}),us={key:0,class:"cropper-box cropper-fade-in"},ms=["src"],ps=["src"],hs={key:2,class:"drag"},Go=(0,t.defineComponent)({__name:"vue-cropper",props:{img:{default:""},wrapper:{default:()=>({width:300,height:300})},cropLayout:{default:()=>({width:200,height:200})},color:{default:"#fff"},filter:{type:[Function,null],default:null},outputType:{default:"png"},outputSize:{default:1},full:{type:Boolean,default:!0},mode:{default:"cover"},cropColor:{default:"#fff"},defaultRotate:{default:0},centerBox:{type:Boolean,default:!1},centerWrapper:{type:Boolean,default:!1},centerBoxDelay:{default:Ao},centerWrapperDelay:{default:Ao}},emits:["img-load","img-upload","real-time","realTime"],setup(e,{expose:o,emit:a}){const r=e,n=(0,t.ref)(),l=(0,t.ref)(),s=(0,t.ref)(),c=a,d=(0,t.ref)(!1),u=(0,t.ref)("");let h=null;const m=(0,t.reactive)({imgLayout:{width:0,height:0},wrapLayout:{width:0,height:0},imgAxis:{x:0,y:0,scale:0,rotate:0},imgExhibitionStyle:{width:"",height:"",transform:""},cropAxis:{x:0,y:0},cropExhibitionStyle:{div:{},img:{}}}),v=(0,t.ref)(!1),f=(0,t.ref)(!0);let C=null,p=null;const w=(0,t.ref)(null),V=(0,t.ref)(!1),{img:k,filter:B,mode:N,defaultRotate:H,outputType:q,outputSize:re,full:ae,centerBox:Q,cropLayout:bo,centerWrapper:fe,centerBoxDelay:ko,centerWrapperDelay:wo}=(0,t.toRefs)(r);let ee=0;const we=g=>{if(typeof g=="number")return g;const _=Number.parseFloat(g);return Number.isFinite(_)?_:0},_e=g=>typeof g=="number"?`${g}px`:g,ve=(0,t.computed)(()=>({...r.wrapper,width:_e(r.wrapper.width),height:_e(r.wrapper.height)})),ne=(0,t.computed)(()=>({width:we(r.cropLayout.width),height:we(r.cropLayout.height)})),_o=()=>{if(!n.value)return;const g=Number.parseFloat((window.getComputedStyle(n.value).width||"").replace("px","")),_=Number.parseFloat((window.getComputedStyle(n.value).height||"").replace("px",""));Number.isFinite(g)&&Number.isFinite(_)&&(m.wrapLayout={width:g,height:_})},K=(0,t.computed)(()=>{const g=m.wrapLayout.width,_=m.wrapLayout.height,S=ne.value.width,O=ne.value.height;return{width:g>0?Math.min(S,g):S,height:_>0?Math.min(O,_):O}}),ie=(0,t.computed)(()=>{const g=m.wrapLayout.width,_=m.wrapLayout.height;return g<=0||_<=0?!0:K.value.width<g||K.value.height<_}),R=()=>Q.value?Math.max(0,ko.value):fe.value?Math.max(0,wo.value):Ao;(0,t.watch)(k,g=>{g&&g!==u.value&&Be(g)}),(0,t.watch)(u,g=>{g&&((0,t.nextTick)(()=>{fn()}),f.value&&ie.value&&(0,t.nextTick)(()=>{So()}))}),(0,t.watch)(f,g=>{g&&ie.value&&(0,t.nextTick)(()=>{So()})}),(0,t.watch)(B,()=>{d.value=!0,Be(k.value)}),(0,t.watch)(N,()=>{d.value=!0,Be(k.value)}),(0,t.watch)(H,g=>{Ne(g)}),(0,t.watch)(ve,async()=>{await(0,t.nextTick)(),_o(),u.value&&(f.value&&Eo({...m.cropAxis}),de({x:m.imgAxis.x,y:m.imgAxis.y}),Z())},{deep:!0,flush:"post"}),(0,t.watch)(ne,()=>{u.value&&(f.value&&Eo({...m.cropAxis}),Z())},{deep:!0}),(0,t.watch)(ie,g=>{if(u.value){if(g&&f.value){(0,t.nextTick)(()=>{So()});return}No()}},{flush:"post"}),(0,t.watch)(Q,g=>{g&&Z()}),(0,t.watch)(fe,g=>{g&&Z()});const z=g=>{c("img-load",g)},G=g=>{c("img-upload",g)},se=()=>{if(!u.value||!f.value)return null;const g=m.imgAxis.scale,_=`scale(${g}, ${g}) translate3d(${(m.imgLayout.width*(g-1)/2+(m.imgAxis.x-m.cropAxis.x))/g}px, ${(m.imgLayout.height*(g-1)/2+(m.imgAxis.y-m.cropAxis.y))/g}px, 0) rotateZ(${m.imgAxis.rotate}deg)`,S=K.value.width,O=K.value.height;return{w:S,h:O,url:u.value,img:{width:`${m.imgLayout.width}px`,height:`${m.imgLayout.height}px`,transform:_},html:`<div class="show-preview" style="width: ${S}px; height: ${O}px; overflow: hidden"><div style="width: ${S}px; height: ${O}px"><img src="${u.value}" style="width: ${m.imgLayout.width}px; height: ${m.imgLayout.height}px; transform: ${_}"></div></div>`}},Ve=()=>{const g=se();g&&(c("real-time",g),c("realTime",g))},ce=()=>{ee&&cancelAnimationFrame(ee),ee=requestAnimationFrame(()=>{ee=0,Ve()})},ea=g=>{g.preventDefault();const _=g.dataTransfer;v.value=!1,os(_.files[0]).then(S=>{S&&G(S)})},ta=g=>{g.preventDefault(),v.value=!0},oa=g=>{g.preventDefault(),v.value=!1},Be=async g=>{d.value=!0,u.value="",h=null;let _;try{_=await Uo(g),z({type:"success",message:"图片加载成功"})}catch(ue){return z({type:"error",message:`图片加载失败${ue}`}),d.value=!1,!1}let S={orientation:-1};try{S=await Qi(_)}catch{S.orientation=1}let O=S.orientation||-1;O=Ji(O);let W=document.createElement("canvas");try{W=await Xi(_,W,O)??W}catch{}h=W,un()},un=()=>{if(B.value){let g=h;g=B.value(g)??g,h=g}mn()},mn=()=>{if(h)try{h.toBlob(async g=>{if(g){URL.revokeObjectURL(u.value);const _=URL.createObjectURL(g);let S=1;try{S=await pn(_)}catch{}const O=xe({scale:S,imgStyle:{...m.imgLayout},layoutStyle:{...m.wrapLayout},rotate:H.value});m.imgExhibitionStyle=O.imgExhibitionStyle,m.imgAxis=O.imgAxis,u.value=_,f.value&&Eo(),Z(),ce(),d.value=!1}else u.value="",d.value=!1},`image/${q.value}`,1)}catch{d.value=!1}},pn=async g=>{let _;try{_=await Uo(g),z({type:"success",message:"图片加载成功"})}catch(O){return z({type:"error",message:`图片加载失败${O}`}),d.value=!1,1}const S={width:0,height:0};return n.value&&(S.width=Number((window.getComputedStyle(n.value).width||"").replace("px","")),S.height=Number((window.getComputedStyle(n.value).height||"").replace("px",""))),m.imgLayout={width:_.width,height:_.height},m.wrapLayout={...S},es({...m.imgLayout},S,N.value)},hn=()=>{Ya?window.addEventListener(Po,Vo):window.addEventListener(Po,Vo,{passive:!1})},gn=()=>{window.removeEventListener(Po,Vo)},Vo=g=>{g.preventDefault(),Bo(is(g,m.imgAxis.scale,m.imgLayout))};(0,t.onMounted)(()=>{r.img?Be(r.img):u.value="";const g=n.value;g.addEventListener("dragover",ta,!1),g.addEventListener("dragend",oa,!1),g.addEventListener("drop",ea,!1)}),(0,t.onUnmounted)(()=>{ee&&(cancelAnimationFrame(ee),ee=0),n.value?.removeEventListener("drop",ea,!1),n.value?.removeEventListener("dragover",ta,!1),n.value?.removeEventListener("dragend",oa,!1),na(),No()});const Bo=(g,_=!1)=>{const S={x:m.imgAxis.x,y:m.imgAxis.y};_||(S.x-=m.imgLayout.width*(g-m.imgAxis.scale)/2,S.y-=m.imgLayout.height*(g-m.imgAxis.scale)/2);const O=xe({scale:g,imgStyle:{...m.imgLayout},layoutStyle:{...m.wrapLayout},rotate:m.imgAxis.rotate},S);m.imgExhibitionStyle=O.imgExhibitionStyle,m.imgAxis=O.imgAxis,ce(),w.value!==null&&clearTimeout(w.value);const W=R();w.value=setTimeout(()=>{Z()},W)},aa=g=>{if(g.change){const _={x:g.change.x+m.imgAxis.x,y:g.change.y+m.imgAxis.y};if(Q.value){const S=Lo({...m.cropAxis},{...K.value},{...m.imgAxis},{...m.imgLayout});(S.landscape!==""||S.portrait!=="")&&(_.x=m.imgAxis.x+g.change.x*ba,_.y=m.imgAxis.y+g.change.y*ba)}de(_)}},de=g=>{const _=xe({scale:m.imgAxis.scale,imgStyle:{...m.imgLayout},layoutStyle:{...m.wrapLayout},rotate:m.imgAxis.rotate},g);m.imgExhibitionStyle=_.imgExhibitionStyle,m.imgAxis=_.imgAxis,ce()},Z=()=>{if(V.value=!1,!Q.value&&!fe.value)return;const g=R();let _;Q.value?_=Lo({...m.cropAxis},{...K.value},{...m.imgAxis},{...m.imgLayout}):_=Lo({x:0,y:0},{...m.wrapLayout},{...m.imgAxis},{...m.imgLayout}),m.imgAxis.scale<_.scale&&ye(m.imgAxis.scale,_.scale,g,S=>{Bo(S,!0)}),_.landscape==="left"&&ye(m.imgAxis.x,_.boundary.left,g,S=>{de({x:S,y:m.imgAxis.y})}),_.landscape==="right"&&ye(m.imgAxis.x,_.boundary.right,g,S=>{de({x:S,y:m.imgAxis.y})}),_.portrait==="top"&&ye(m.imgAxis.y,_.boundary.top,g,S=>{de({x:m.imgAxis.x,y:S})}),_.portrait==="bottom"&&ye(m.imgAxis.y,_.boundary.bottom,g,S=>{de({x:m.imgAxis.x,y:S})}),ce()},Se=g=>{V.value=!0,g.scale&&Bo(ss(g.scale,m.imgAxis.scale))},fn=()=>{na();const g=l.value;C=new _a(g),C.on("down-to-move",aa),C.on("down-to-scale",Se),C.on("up",Z)},na=()=>{C&&(C.off("down-to-move",aa),C.off("up",Z),C.off("down-to-scale",Se))},So=()=>{No();const g=s.value;g&&(p=new _a(g),p.on("down-to-move",la),p.on("down-to-scale",Se),p.on("up",Z),C=null)},No=()=>{p&&(p.off("down-to-move",la),p.off("down-to-scale",Se),p.off("up",Z),p=null)},Ne=(g,_=!0)=>{const{x:S,y:O,scale:W}=m.imgAxis,ue={x:S,y:O},ia=xe({scale:W,imgStyle:{...m.imgLayout},layoutStyle:{...m.wrapLayout},rotate:g},ue);m.imgExhibitionStyle=ia.imgExhibitionStyle,m.imgAxis=ia.imgAxis,ce(),_&&u.value&&Z()},vn=(g="base64")=>va({type:g,outputType:q.value,outputSize:re.value,full:ae.value,url:u.value,imgAxis:{...m.imgAxis},imgLayout:{...m.imgLayout},cropLayout:{...K.value},cropAxis:{...m.cropAxis},cropping:f.value}),yn=()=>va({type:"blob",outputType:q.value,outputSize:re.value,full:ae.value,url:u.value,imgAxis:{...m.imgAxis},imgLayout:{...m.imgLayout},cropLayout:{...K.value},cropAxis:{...m.cropAxis},cropping:f.value}),Eo=g=>{const{width:_,height:S}=m.wrapLayout;let O=ne.value.width,W=ne.value.height;_>0&&(O=Math.min(O,_)),S>0&&(W=Math.min(W,S));const ue={x:(_-O)/2,y:(S-W)/2};ra(g||ue)},la=g=>{!V.value&&g.change&&ra({x:g.change.x+m.cropAxis.x,y:g.change.y+m.cropAxis.y})},ra=g=>{const _=K.value.width,S=K.value.height,O=m.wrapLayout.width-_,W=m.wrapLayout.height-S;g.x<0&&(g.x=0),g.y<0&&(g.y=0),g.x>O&&(g.x=O),g.y>W&&(g.y=W),m.cropAxis=g,f.value=!0,ce()},Cn=()=>{Ne(m.imgAxis.rotate-90)},bn=()=>{Ne(m.imgAxis.rotate+90)},kn=()=>{Ne(0)},wn=()=>{const g=["cropper-drag-box"];return f.value&&g.push("cropper-modal"),g.join(" ")},_n=()=>{const g={width:`${K.value.width}px`,height:`${K.value.height}px`,transform:`translate3d(${m.cropAxis.x}px, ${m.cropAxis.y}px, 0)`};return m.cropExhibitionStyle.div=g,g},Vn=()=>{const g=m.imgAxis.scale,_=(m.imgLayout.width*(g-1)/2+(m.imgAxis.x-m.cropAxis.x))/g,S=(m.imgLayout.height*(g-1)/2+(m.imgAxis.y-m.cropAxis.y))/g,O={width:`${m.imgLayout.width}px`,height:`${m.imgLayout.height}px`,transform:`scale(${g}, ${g}) translate3d(${_}px, ${S}px, 0) rotateZ(${m.imgAxis.rotate}deg)`};return m.cropExhibitionStyle.img=O,O},Bn=(0,t.useSlots)();return o({getCropData:vn,getCropBlob:yn,rotateLeft:Cn,rotateRight:bn,rotateClear:kn}),(g,_)=>((0,t.openBlock)(),(0,t.createElementBlock)("section",{class:"vue-cropper",style:(0,t.normalizeStyle)(ve.value),ref_key:"cropperRef",ref:n,onMouseover:hn,onMouseout:gn},[u.value?((0,t.openBlock)(),(0,t.createElementBlock)("section",us,[(0,t.createElementVNode)("section",{class:"cropper-box-canvas",style:(0,t.normalizeStyle)(m.imgExhibitionStyle)},[(0,t.createElementVNode)("img",{src:u.value,alt:"cropper-next-vue"},null,8,ms)],4),(0,t.createElementVNode)("section",{class:(0,t.normalizeClass)(wn()),ref_key:"cropperImg",ref:l},null,2)])):(0,t.createCommentVNode)("",!0),f.value&&u.value&&ie.value?((0,t.openBlock)(),(0,t.createElementBlock)("section",{key:1,class:"cropper-crop-box cropper-fade-in",style:(0,t.normalizeStyle)(_n())},[(0,t.createElementVNode)("span",{class:"cropper-view-box",style:(0,t.normalizeStyle)({outlineColor:e.cropColor})},[(0,t.unref)(k)?((0,t.openBlock)(),(0,t.createElementBlock)("img",{key:0,src:u.value,style:(0,t.normalizeStyle)(Vn()),alt:"cropper-img"},null,12,ps)):(0,t.createCommentVNode)("",!0)],4),(0,t.createElementVNode)("span",{class:"cropper-face cropper-move",ref_key:"cropperBox",ref:s},null,512)],4)):(0,t.createCommentVNode)("",!0),v.value?((0,t.openBlock)(),(0,t.createElementBlock)("section",hs,[(0,t.renderSlot)(g.$slots,"drag",{},()=>[_[0]||(_[0]=(0,t.createElementVNode)("p",null,"拖动图片到此",-1))])])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)((0,t.unref)(ds),{"is-visible":d.value},(0,t.createSlots)({_:2},[(0,t.unref)(Bn).loading?{name:"default",fn:(0,t.withCtx)(()=>[(0,t.renderSlot)(g.$slots,"loading")]),key:"0"}:void 0]),1032,["is-visible"])],36))}}),gs={version:"0.1.1"},fs=function(e){e.component("VueCropper",Go)};typeof window<"u"&&(window.requestAnimationFrame||(window.requestAnimationFrame=e=>window.setTimeout(e,17)),window.cancelAnimationFrame||(window.cancelAnimationFrame=e=>{window.clearTimeout(e)}));var t1={version:gs.version,install:fs,VueCropper:Go},vs={class:"cv-upload-crop-box"},ys={class:"cv-upload-crop-left-box"},Cs={class:"cv-upload-crop-left-opt"},bs={class:"cv-upload-crop-left-opt2"},ks={class:"cv-upload-crop-left-opt2"},ws={class:"cv-upload-crop-right-box"},_s=["innerHTML"],Vs={props:{loading:{type:[Boolean],default:!1},modelValue:{type:[Boolean],default:!1},src:{type:[String],default:""},size:{type:[Number],default:120},title:{type:[String],default:"裁剪"}},emits:["update:modelValue","onSubmit","onClose"],data(){return{cropDialogVisible:!1,cropAutoCrop:!0,cropFixedBox:!0,cropOutputType:"png",cropPreviews:{},cropVisible:!1,cropBeforelImage:"",cropAfterImage:"",cropLocalWidth:this.size,cropLocalHeight:this.size}},watch:{modelValue(e){this.cropDialogVisible=e,this.cropInit()},src(e){this.cropInit()}},computed:{cropAttrs(){return{info:!0,autoCrop:this.cropAutoCrop,fixedBox:this.cropFixedBox,autoCropWidth:this.cropLocalWidth,autoCropHeight:this.cropLocalHeight,outputType:this.cropOutputType}}},mounted(){},methods:{cropInit(){this.cropBeforelImage=this.src||""},cropDialoClose(){this.cropBeforelImage="",this.cropPreviews="",this.cropVisible=!1,this.cropDialogVisible=!1,this.$emit("update:modelValue",!1),this.$emit("onClose",!1)},cropDialogOpened(){this.$nextTick(()=>{this.cropVisible=!0})},cropSubmit(){this._submit_blob()},_submit_blob(){this.$refs.cvAvatartCropper.getCropBlob(e=>{this.$emit("onSubmit",{file:e})})},_submit_base64(){this.$refs.cvAvatartCropper.getCropData(e=>{let o=new Image;o.src=e,o.onload=async()=>{imageCompress(o)}})},cropRotateRefresh(){},cropRotateLeft(){this.$refs.cvAvatartCropper.rotateLeft()},cropRotateRight(){this.$refs.cvAvatartCropper.rotateRight()},cropChangeScale(e){e=e||1,this.$refs.cvAvatartCropper.changeScale(e)},cropRealTime(e){this.cropPreviews=e}}},Bs=Object.assign(Vs,{__name:"UploadCrop",setup(e){return(o,a)=>{const r=(0,t.resolveComponent)("el-button"),n=(0,t.resolveComponent)("el-tooltip"),l=(0,t.resolveComponent)("el-input"),s=(0,t.resolveComponent)("el-dialog"),c=(0,t.resolveDirective)("loading");return(0,t.openBlock)(),(0,t.createBlock)(s,{title:e.title,modelValue:o.cropDialogVisible,"onUpdate:modelValue":a[7]||(a[7]=d=>o.cropDialogVisible=d),width:"800px","append-to-body":"",onOpened:o.cropDialogOpened,onClose:o.cropDialoClose},{footer:(0,t.withCtx)(()=>[(0,t.createVNode)(r,{type:"primary",onClick:o.cropSubmit,loading:e.loading,disabled:e.loading},{default:(0,t.withCtx)(()=>[...a[12]||(a[12]=[(0,t.createTextVNode)("提 交",-1)])]),_:1},8,["onClick","loading","disabled"])]),default:(0,t.withCtx)(()=>[(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",vs,[(0,t.createElementVNode)("div",ys,[o.cropVisible?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Go),(0,t.mergeProps)({key:0,ref:"cvAvatartCropper",img:o.cropBeforelImage},o.cropAttrs,{onRealTime:o.cropRealTime}),null,16,["img","onRealTime"])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",Cs,[(0,t.renderSlot)(o.$slots,"default"),(0,t.createVNode)(n,{effect:"dark",content:"重置",placement:"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(r,{icon:"ElIconRefresh",onClick:a[0]||(a[0]=d=>o.cropRotateRefresh())})]),_:1}),(0,t.createVNode)(n,{effect:"dark",content:"放大",placement:"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(r,{icon:"ElIconZoomIn",onClick:a[1]||(a[1]=d=>o.cropChangeScale(1))})]),_:1}),(0,t.createVNode)(n,{effect:"dark",content:"缩小",placement:"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(r,{icon:"ElIconZoomOut",onClick:a[2]||(a[2]=d=>o.cropChangeScale(-1))})]),_:1}),(0,t.createVNode)(n,{effect:"dark",content:"向左旋转",placement:"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(r,{icon:"ElIconRefreshLeft",onClick:a[3]||(a[3]=d=>o.cropRotateLeft())})]),_:1}),(0,t.createVNode)(n,{effect:"dark",content:"向右旋转",placement:"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(r,{icon:"ElIconRefreshRight",onClick:a[4]||(a[4]=d=>o.cropRotateRight())})]),_:1})]),(0,t.createElementVNode)("div",bs,[(0,t.createVNode)(l,{size:"small"},{prepend:(0,t.withCtx)(()=>[...a[8]||(a[8]=[(0,t.createTextVNode)("X 坐标",-1)])]),_:1}),(0,t.createVNode)(l,{size:"small"},{prepend:(0,t.withCtx)(()=>[...a[9]||(a[9]=[(0,t.createTextVNode)("Y 坐标",-1)])]),_:1})]),(0,t.createElementVNode)("div",ks,[(0,t.createVNode)(l,{size:"small",modelValue:o.cropLocalWidth,"onUpdate:modelValue":a[5]||(a[5]=d=>o.cropLocalWidth=d)},{prepend:(0,t.withCtx)(()=>[...a[10]||(a[10]=[(0,t.createTextVNode)("宽度",-1)])]),_:1},8,["modelValue"]),(0,t.createVNode)(l,{size:"small",modelValue:o.cropLocalHeight,"onUpdate:modelValue":a[6]||(a[6]=d=>o.cropLocalHeight=d)},{prepend:(0,t.withCtx)(()=>[...a[11]||(a[11]=[(0,t.createTextVNode)("高度",-1)])]),_:1},8,["modelValue"])])]),(0,t.createElementVNode)("div",ws,[(0,t.createElementVNode)("div",{class:"cv-upload-crop-preview",innerHTML:o.cropPreviews.html},null,8,_s)])])),[[c,e.loading]])]),_:3},8,["title","modelValue","onOpened","onClose"])}}}),Ss=Bs,Ns={title:"头像上传",name:"cvUploadAvatar",mixins:[Co],components:{UploadCrop:Ss},props:{modelValue:{type:[String],default:""},initValue:{type:[String],default:""},fileSize:{type:[Number],default:2},fileType:{type:[Array],default:()=>["png","jpg","jpeg","gif"]},showSize:{type:Number,default:120},crop:{type:[Boolean],default:!0},signatureParam:{type:[Object],default:()=>({save_sign:"avatar"})}},data(){return{localValue:"",localList:[],upAccept:"image/*"}},computed:{localRef(){return"cvUploadAvatar"+ +new Date+((Math.random()*1e3).toFixed(0)+"")},handlerAttr(){return{ref:this.localRef,action:"#",accept:this.upAccept,limit:1,multiple:!1,drag:!1,disabled:this.upIngLoading,showFileList:!1}},showStyle(){return{width:this.showSize+"px",height:this.showSize+"px",lineHeight:this.showSize+"px"}}},watch:{initValue(e){this._init_parse()}},mounted(){this._init_parse()},methods:{_init_parse(){this.localValue=this.initValue||""},cropDialogOpen(){this.cropShow=!0,this.$nextTick(()=>{this._init_parse()})},initBeforeUpload(e){if(!this._commonBeforeUpload(e))return this.upIngLoading=!1,!1;if(this.crop){const o=new FileReader;o.readAsDataURL(e),o.onload=()=>{this.localValue=o.result},this.$refs.cvUploadAvatar.clearFiles()}},async onHttpRequest(e){const{file:o}=e;this.upIngLoading=!0,await Ko(o,this.mergeAttrs.signatureType||null,this.mergeAttrs.signatureFn||null,this.mergeAttrs.signatureParam||{}).then(a=>{this.$nextTick(()=>{this.$emit("update:modelValue",a.full_path),this.$emit("update:initValue",a.cdn_full_path)}),b.ElMessage.success("上传成功"),this.upIngLoading=!1,this.cropShow=!1}).catch(()=>{this.upIngLoading=!1})}}},Es=["src"];function xs(e,o,a,r,n,l){const s=(0,t.resolveComponent)("upload-tip"),c=(0,t.resolveComponent)("cv-icons"),d=(0,t.resolveComponent)("el-button"),u=(0,t.resolveComponent)("el-tooltip"),h=(0,t.resolveComponent)("el-upload"),m=(0,t.resolveComponent)("upload-crop");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-upload-avatar-wrap",onClick:o[2]||(o[2]=(...v)=>l.cropDialogOpen&&l.cropDialogOpen(...v))},[a.initValue?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:"cv-upload-avatar-box cv-upload-avatar-empty",style:(0,t.normalizeStyle)(l.showStyle)},[...o[3]||(o[3]=[(0,t.createElementVNode)("div",{class:"cv-upload-avatar__text"},"上传头像",-1)])],4)),a.initValue?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"cv-upload-avatar-box",style:(0,t.normalizeStyle)(l.showStyle)},[(0,t.createElementVNode)("img",{class:"cv-upload-avatar__img",src:a.initValue},null,8,Es)],4)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(s,(0,t.mergeProps)(e.tipAttr,{fileUnit:"张",multiple:!1,limit:1}),null,16),a.crop?((0,t.openBlock)(),(0,t.createBlock)(m,{key:2,modelValue:e.cropShow,"onUpdate:modelValue":o[0]||(o[0]=v=>e.cropShow=v),title:"修改头像",size:a.showSize,onOnSubmit:l.onHttpRequest,onOnClose:o[1]||(o[1]=v=>e.upIngLoading=!1),loading:e.upIngLoading,src:n.localValue},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(h,(0,t.mergeProps)(l.handlerAttr,{"before-upload":l.initBeforeUpload,"http-request":e.initHttpRequest}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(u,{effect:"dark",content:"选择图片",placement:"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(d,{style:{"margin-right":"10px"},loading:e.upIngLoading,disabled:e.upIngLoading},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{type:"ElIconPlus",size:"14",style:{"margin-right":"10px"}}),o[4]||(o[4]=(0,t.createTextVNode)(" 选择 ",-1))]),_:1},8,["loading","disabled"])]),_:1})]),_:1},16,["before-upload","http-request"])]),_:1},8,["modelValue","size","onOnSubmit","loading","src"])):(0,t.createCommentVNode)("",!0)])}var Bt=y(Ns,[["render",xs]]);function be(e){return e?typeof e=="string"||typeof e=="number"?[e]:Object.prototype.toString.call(e)==="[object Object]"?[]:[...e]:[]}function Va(e,o){let a=[];Array.isArray(e)&&e.length>0&&a.push(...e),Array.isArray(o)&&o.length>0&&a.push(...o),typeof o=="string"&&a.push(o);let r=[];for(let n in a){let l=a[n],s=Object.prototype.toString.call(l);s==="[object String]"?r.push(l):s==="[object Object]"&&l.url&&r.push(l.url)}return r}var $s={title:"图片上传",name:"cvUploadImage",mixins:[Co],components:{},props:{modelValue:{type:[String,Number,Array,Object],default:""},initValue:{type:[String,Number,Array],default:()=>""},fileSize:{type:[Number],default:2},fileType:{type:[Array],default:()=>["png","jpg","jpeg","gif"]},showSize:{type:Number,default:150},showBig:{type:[Boolean],default:!1},crop:{type:[Boolean],default:!1},galleryLabel:{type:String,default:""},lazy:{type:Boolean,default:!0},drag:{type:Boolean,default:!1},signatureParam:{type:[Object],default:()=>({save_sign:"image"})}},data(){return{localValue:[],localList:[],previewShow:!1,previewTitle:"",previewUrl:"",upAccept:"image/*"}},computed:{localRef(){return"cvUploadImage"+ +new Date+((Math.random()*1e3).toFixed(0)+"")},handlerAttr(){return{ref:this.localRef,action:"#",accept:this.upAccept,limit:parseInt(this.limit),multiple:this.multiple,drag:!!this.drag,disabled:this.upIngLoading,showFileList:!1}},showUpload(){return!(this.localList.length>=this.limit)},showStyle(){let e=this.showSize+"px";return(this.showBig||this.drag)&&(e=this.showSize*2+"px"),{width:e,height:this.showSize+"px",lineHeight:this.showSize+"px"}}},watch:{modelValue(e){this._init_parse_value()},initValue(e){this._init_parse_list()}},mounted(){},methods:{_init_parse_value(){this.modelValue?typeof this.modelValue=="string"&&this.modelValue.includes(",")?this.localValue=be(String(this.modelValue).split(",").map(e=>e.trim())):this.localValue=be(this.modelValue):this.localValue=[]},_init_parse_list(){this.initValue?this.localList=qo(this.initValue):this.localList=[]},initOnChange(e,o){},initBeforeUpload(e){return this.upIngLoading=!0,this._commonBeforeUpload(e)?!0:(this.upIngLoading=!1,!1)},async initHttpRequest(e){const{file:o}=e;this.upIngLoading=!0,this.mergeAttrs.upResponseFn,await Ko(o,this.mergeAttrs.signatureType||null,this.mergeAttrs.signatureFn||null,this.mergeAttrs.signatureParam||{}).then(a=>{this.$nextTick(()=>{this.updateValue(a.filelog_id,a.cdn_full_path)}),b.ElMessage.success("上传成功"),this.upIngLoading=!1}).catch(()=>{this.upIngLoading=!1})},updateValue(e,o){if(this.multiple){let a=Va(this.localValue,e).join(",");this.$emit("update:modelValue",a)}else this.$emit("update:modelValue",e);if(this.multiple){let a=Va(this.localList,o);this.$emit("update:initValue",a)}else this.$emit("update:initValue",o)},handleItemPreview(e,o){e.raw,e.type.includes("image")?(this.previewTitle=e.name,this.previewUrl=e.url,this.previewShow=!0):window.open(e.url)},doRemove(e){this.multiple?(this.localValue.splice(e,1),this.localList.splice(e,1)):(this.localValue="",this.localList=[]),this.updateValue(null,null)},handleItemRemove(e,o){if(this.beforeRemove&&typeof this.beforeRemove=="function"){const a=this.multiple?this.localValue[o]:this.localValue,r=this.beforeRemove(a,this.localValue);r&&r.then?r.then(()=>{this.doRemove(o)},()=>{}):r!==!1&&this.doRemove(o)}else this.doRemove(o)},handleItemEdit(e,o){b.ElMessageBox.prompt("请输入文件地址","编辑",{confirmButtonText:"OK",cancelButtonText:"Cancel",inputValue:e.url||"",inputErrorMessage:"格式不正确"}).then(({value:a})=>{const r=a.split("/").pop(),n=r.split(".").pop().toLowerCase();if(!this.fileType.includes(n)){let c=this.fileType.join("、");return b.ElMessage.error(`文件格式错误,请填写类型,如:${c} 格式文件`),!1}const l=qr(n);if(!l)return b.ElMessage.error("文件格式错误"),!1;Or(a)||this.mergeAttrs?.baseDomain&&(a=this.mergeAttrs?.baseDomain+a);const s={name:r,status:"success",type:l,uid:Date.now(),url:a};this.localList[o]=s}).catch(()=>{})},handleItemCrop(e,o){}}},Ds={class:"cv-upload-image cv-upload-common"},Ts={class:"cv-upload-list-box el-upload-list el-upload-list--picture-card"},Ls=["tabindex"],Is={class:"el-upload-list__item-status-label"},Fs={class:"el-upload-list__item-actions"},Ps=["onClick"],As={class:"el-upload-list__item-delete"},Ms={class:"el-upload-list__item-delete"},zs=["onClick"],Os={style:{margin:"0 auto"}},js=["src"];function Rs(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-image"),c=(0,t.resolveComponent)("cv-icons"),d=(0,t.resolveComponent)("el-upload"),u=(0,t.resolveComponent)("upload-tip"),h=(0,t.resolveComponent)("el-dialog"),m=(0,t.resolveDirective)("loading");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Ds,[(0,t.createElementVNode)("div",Ts,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.localList,(v,f)=>((0,t.openBlock)(),(0,t.createElementBlock)("section",{class:"el-upload-list__item is-success",key:f,tabindex:f,style:(0,t.normalizeStyle)(l.showStyle)},[(0,t.createVNode)(s,{class:"el-upload-list__item-thumbnail",lazy:a.lazy,src:v.url,style:(0,t.normalizeStyle)(l.showStyle),fit:"contain"},null,8,["lazy","src","style"]),(0,t.createElementVNode)("label",Is,[(0,t.createVNode)(c,{type:"ElIconCheck",color:"#ffffff",size:"12"})]),(0,t.createElementVNode)("span",Fs,[(0,t.createElementVNode)("span",{class:"el-upload-list__item-preview",onClick:C=>l.handleItemPreview(v)},[(0,t.createVNode)(c,{type:"ElIconZoomIn",size:"20"})],8,Ps),(0,t.createElementVNode)("span",As,[(0,t.createVNode)(c,{type:"ElIconDelete",size:"20",onClick:C=>l.handleItemRemove(v,f)},null,8,["onClick"])]),(0,t.createElementVNode)("span",Ms,[(0,t.createVNode)(c,{type:"ElIconEdit",size:"20",onClick:C=>l.handleItemEdit(v,f)},null,8,["onClick"])]),a.crop?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:0,class:"el-upload-list__item-preview",onClick:C=>l.handleItemCrop(v)},[(0,t.createVNode)(c,{type:"ElIconCrop",size:"20"})],8,zs)):(0,t.createCommentVNode)("",!0)])],12,Ls))),128)),l.showUpload?((0,t.openBlock)(),(0,t.createBlock)(d,(0,t.mergeProps)({key:0,class:"cv-upload-common-handle"},l.handlerAttr,{"file-list":n.localList,"before-upload":l.initBeforeUpload,"http-request":l.initHttpRequest,"on-change":l.initOnChange,"on-exceed":e.initOnExceed,style:l.showStyle}),{default:(0,t.withCtx)(()=>[(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-upload-common__ing",style:(0,t.normalizeStyle)(l.showStyle)},[a.drag?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createVNode)(c,{type:"ElIconUpload",size:"24"}),o[1]||(o[1]=(0,t.createElementVNode)("div",{class:"el-upload__text"},[(0,t.createTextVNode)(" 将文件拖到此处,或 "),(0,t.createElementVNode)("em",null,"点击上传")],-1))],64)):((0,t.openBlock)(),(0,t.createBlock)(c,{key:1,type:"ElIconPlus",size:a.showSize/3},null,8,["size"]))],4)),[[m,e.upIngLoading]])]),_:1},16,["file-list","before-upload","http-request","on-change","on-exceed","style"])):(0,t.createCommentVNode)("",!0)]),(0,t.createVNode)(u,(0,t.mergeProps)(e.tipAttr,{fileUnit:"张"}),null,16),(0,t.createVNode)(h,{modelValue:n.previewShow,"onUpdate:modelValue":o[0]||(o[0]=v=>n.previewShow=v),title:n.previewTitle,"append-to-body":""},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Os,[(0,t.createElementVNode)("img",{width:"100%",src:n.previewUrl,style:{"max-width":"300px"}},null,8,js)])]),_:1},8,["modelValue","title"])])}var St=y($s,[["render",Rs]]),Hs={mdb:"access",accdb:"access",ai:"ai",html:"html",htm:"html",asp:"web",pdf:"pdf",psd:"photoshop",psb:"photoshop",mpo:"photoshop",eps:"photoshop",avi:"video",wmv:"video",rm:"video",rmvb:"video",mp4:"video","3gp":"video",asf:"video",mov:"video",m4v:"video",flv:"video",f4v:"video",mkv:"video",mts:"video",swf:"flash",ts:"video",mp3:"audio",wav:"audio",wma:"audio",ape:"audio",aac:"audio",zip:"zip",rar:"zip",gz:"zip","7z":"zip",z:"zip",bmp:"image",jpg:"image",jpeg:"image",png:"image",gif:"image",webp:"image",svg:"image",txt:"txt",rtf:"txt",xls:"excel",xlsx:"excel",xlsm:"excel",xltx:"excel",doc:"word",docx:"word",docm:"word",wps:"word",dotx:"word",dotm:"word",ppt:"powerpoint",pptx:"powerpoint",mdf:"db",db:"db",dbf:"db",wdb:"db",vue:"vue",php:"php",jar:"jar",ini:"ini",bat:"bat",config:"config",fla:"fla",eot:"font",otf:"font",fon:"font",font:"font",ttf:"font",ttc:"font",woff:"font",woff2:"font",js:"js",md:"markdown",one:"onenote",jsx:"reactjs",xfl:"xfl",file:"file",css:"css"};function Us(e){return`https://10ui.cn/ions/type/${Hs[e]}.svg`}var Mo=Us,Ws={name:"uploadList",props:{files:{type:Array,default(){return[]}},disabled:{type:Boolean,default:!1},isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0}},methods:{getExtension(e){return e.lastIndexOf(".")>-1&&Mo[e.slice(e.lastIndexOf(".")+1).toLowerCase()]||Mo.file},getSize(e){return e&&!isNaN(Number(e))?e:""},parsePercentage(e){return parseInt(e,10)},handleDownload(e){e.url},handleDelete(e,o){this.$confirm("确认删除该文件吗? ").then(()=>{this.$emit("remove",e,o)}).catch(()=>{})}}},qs=["src"],Ks={class:"cv-upload-list__item-content-action"};function Gs(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-link");return(0,t.openBlock)(),(0,t.createBlock)(t.TransitionGroup,{class:"cv-upload-file-list el-upload-list el-upload-list--text",name:"el-list",tag:"ul"},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.files,(c,d)=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:c.uid,class:"el-upload-list__item cv-upload-list__item-content"},[(0,t.createVNode)(s,{href:c.url,underline:!1,target:"_blank"},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("img",{src:l.getExtension(c.name),class:"el-upload-list__item-content-name-icon"},null,8,qs),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(c.name),1)]),_:2},1032,["href"]),(0,t.createElementVNode)("div",Ks,[(0,t.createVNode)(s,{underline:!1},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(l.getSize(c.size)),1)]),_:2},1024),a.isCanDownload?((0,t.openBlock)(),(0,t.createBlock)(s,{key:0,underline:!1,onClick:u=>l.handleDownload(c)},{default:(0,t.withCtx)(()=>[...o[0]||(o[0]=[(0,t.createTextVNode)("下载",-1)])]),_:1},8,["onClick"])):(0,t.createCommentVNode)("",!0),!a.disabled&&a.isCanDelete?((0,t.openBlock)(),(0,t.createBlock)(s,{key:1,underline:!1,onClick:u=>l.handleDelete(d,c),type:"danger"},{default:(0,t.withCtx)(()=>[...o[1]||(o[1]=[(0,t.createTextVNode)(" 删除 ",-1)])]),_:1},8,["onClick"])):(0,t.createCommentVNode)("",!0)])]))),128))]),_:1})}var Ys=y(Ws,[["render",Gs]]),Zs={title:"文件上传",inheritAttrs:!1,name:"cvUploadFile",mixins:[Co],components:{uploadList:Ys},props:{modelValue:{type:[String,Object,Array],default:""},initValue:{type:[String,Object,Array],default:""},fileSize:{type:[Number],default:5},fileType:{type:[Array],default:["txt","png","jpg","xlsx","xls"]},multiple:{type:[Boolean],default:!1},limit:{type:[Number],default:5},disabled:Boolean,isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0},isCanUploadSame:{type:Boolean,default:!0}},data(){return{localValue:[],localList:[]}},computed:{localRef(){return"cvUploadFile"+ +new Date+((Math.random()*1e3).toFixed(0)+"")},handlerAttr(){return{ref:this.localRef,action:"#",limit:parseInt(this.limit),multiple:this.multiple,drag:!1,disabled:this.upIngLoading,showFileList:!0}},list(){let e=1;return this.modelValue?(Array.isArray(this.modelValue)?this.modelValue:[this.modelValue]).map(o=>(typeof o=="string"&&(o={name:o,url:o}),o.uid=o.uid||new Date().getTime()+e++,o)):[]}},watch:{initValue(e){this._init_parse()}},mounted(){this._init_parse()},methods:{_init_parse(){this.initValue?this.localList=qo(this.initValue):this.localList=[]},initOnChange(e,o){this.localList=o},initBeforeUpload(e){return this._commonBeforeUpload(e)?!this.isCanUploadSame&&this.localList.some(o=>o.name+o.size===e.name+e.size)?(this.$message.error("此文件已上传!"),!1):!0:!1},upFileError(e){this.$message.error("上传失败, 请重试"),this.$emit("error",e)},upFileSuccess(e,o){this.upResponseFn&&typeof this.upResponseFn=="function"&&(e=this.upResponseFn(e,o,this.localList)),this.multiple?this.$emit("update:modelValue",[...this.localList,e]):this.$emit("update:modelValue",e),this.$emit("success",e,this.localList)},handleRemove(e,o){if(this.beforeRemove&&typeof this.beforeRemove=="function"){const a=this.beforeRemove(this.localList[o],this.localList);a&&a.then?a.then(()=>{this._do_remove(o)},()=>{}):a!==!1&&this._do_remove(o)}else this._do_remove(o)},_do_remove(e){if(this.$emit("remove",this.list[e],this.list),this.localList.splice(e,1),this.multiple){const o=[...this.list];o.splice(e,1),this.$emit("update:modelValue",o||[])}else this.$emit("update:modelValue",null)}}},Qs={class:"cv-upload-file"};function Xs(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-button"),c=(0,t.resolveComponent)("el-upload"),d=(0,t.resolveComponent)("upload-tip"),u=(0,t.resolveComponent)("upload-list");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Qs,[(0,t.createVNode)(c,(0,t.mergeProps)({class:"cv-upload-file-uploader"},l.handlerAttr,{"file-list":n.localList,"onUpdate:fileList":o[0]||(o[0]=h=>n.localList=h),"before-upload":l.initBeforeUpload,"on-change":l.initOnChange,"on-exceed":e.initOnExceed,"on-error":l.upFileError,"on-success":l.upFileSuccess}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{type:"primary",icon:"ElIconUpload"},{default:(0,t.withCtx)(()=>[...o[1]||(o[1]=[(0,t.createTextVNode)("上传文件",-1)])]),_:1})]),_:1},16,["file-list","before-upload","on-change","on-exceed","on-error","on-success"]),(0,t.createVNode)(d,(0,t.mergeProps)(e.tipAttr,{fileUnit:"个"}),null,16),(0,t.createVNode)(u,{disabled:a.disabled,files:l.list,isCanDelete:a.isCanDelete,isCanDownload:a.isCanDownload,onRemove:l.handleRemove},null,8,["disabled","files","isCanDelete","isCanDownload","onRemove"])])}var Nt=y(Zs,[["render",Xs]]),Js={title:"视频上传",name:"cvUploadVideo",mixins:[Co],components:{},props:{modelValue:{type:[String],default:""},initValue:{type:[String],default:""},fileSize:{type:[Number],default:10},fileType:{type:Array,default:["mp4","mp3"]},showSize:{type:Number,default:360},signatureParam:{type:[Object],default:()=>({save_sign:"video"})}},data(){return{localValue:"",localList:"",previewShow:!1,previewTitle:"",previewUrl:"",upAccept:"video/*"}},computed:{localRef(){return"cvUploadVideo"+ +new Date+((Math.random()*1e3).toFixed(0)+"")},handlerAttr(){return{ref:this.localRef,action:"#",accept:this.upAccept,limit:1,multiple:!1,drag:!0,disabled:this.upIngLoading,showFileList:!1}},showUpload(){return!this.localValue},showStyle(){return{width:this.showSize+"px",height:this.showSize/5*3+"px",lineHeight:this.showSize+"px"}}},watch:{modelValue(e){this._init_parse_value()},initValue(e){this._init_parse_list()}},mounted(){this._init_parse_value(),this._init_parse_list()},methods:{_init_parse_value(){this.modelValue?this.localValue=be(this.modelValue):this.localValue=""},_init_parse_list(){this.initValue?this.localList=qo(this.initValue):this.localList=""},initBeforeUpload(e){return this.upIngLoading=!0,this._commonBeforeUpload(e)?!0:(this.upIngLoading=!1,!1)},async initHttpRequest(e){const{file:o}=e;this.upIngLoading=!0,this.mergeAttrs.upResponseFn,await Ko(o,this.mergeAttrs.signatureType||null,this.mergeAttrs.signatureFn||null,this.mergeAttrs.signatureParam||{}).then(a=>{this.$nextTick(()=>{this.$emit("update:modelValue",a.full_path),this.$emit("update:initValue",a.cdn_full_path)}),ExtendMessage.success("上传成功"),this.upIngLoading=!1}).catch(()=>{this.upIngLoading=!1})},handleItemPreview(e,o){this.previewTitle=e.name,this.previewUrl=e.url,this.previewShow=!0},doRemove(e){this.localValue="",this.localList="",this.$emit("update:modelValue",""),this.$emit("update:initValue","")},handleItemRemove(e,o){if(this.beforeRemove&&typeof this.beforeRemove=="function"){const a=this.multiple?this.localValue[o]:this.localValue,r=this.beforeRemove(a,this.localValue);r&&r.then?r.then(()=>{this.doRemove(o)},()=>{}):r!==!1&&this.doRemove(o)}else this.doRemove(o)}}},ec={class:"cv-upload-video"},tc={class:"cv-upload-list-box el-upload-list el-upload-list--picture-card"},oc=["tabindex"],ac=["src"],nc={class:"el-upload-list__item-status-label"},lc={class:"el-upload-list__item-actions"},rc=["onClick"],ic={class:"el-upload-list__item-delete"},sc={class:"el-upload-list__item-delete"},cc={key:0,style:{width:"500px",height:"300px",margin:"0 auto"}},dc=["src"];function uc(e,o,a,r,n,l){const s=(0,t.resolveComponent)("cv-icons"),c=(0,t.resolveComponent)("el-progress"),d=(0,t.resolveComponent)("el-upload"),u=(0,t.resolveComponent)("upload-tip"),h=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createElementBlock)("div",ec,[(0,t.createElementVNode)("div",tc,[n.localList?((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,{key:0},(0,t.renderList)(n.localList,(m,v)=>((0,t.openBlock)(),(0,t.createElementBlock)("section",{class:"el-upload-list__item is-success",key:v,tabindex:v,style:(0,t.normalizeStyle)(l.showStyle)},[(0,t.createElementVNode)("video",{class:"el-upload-list__item-thumbnail",autoplay:!1,src:m.url,style:(0,t.normalizeStyle)(l.showStyle)}," 您的浏览器不支持视频播放 ",12,ac),(0,t.createElementVNode)("label",nc,[(0,t.createVNode)(s,{type:"ElIconCheck",color:"#ffffff",size:"12"})]),(0,t.createElementVNode)("span",lc,[(0,t.createElementVNode)("span",{class:"el-upload-list__item-preview",onClick:f=>l.handleItemPreview(m)},[(0,t.createVNode)(s,{type:"ElIconVideoPlay",size:"20"})],8,rc),(0,t.createElementVNode)("span",ic,[(0,t.createVNode)(s,{type:"ElIconDelete",size:"20",onClick:f=>l.handleItemRemove(m,v)},null,8,["onClick"])]),(0,t.createElementVNode)("span",sc,[(0,t.createVNode)(s,{type:"ElIconEdit",size:"20",onClick:f=>e.handleItemEdit(m,v)},null,8,["onClick"])])])],12,oc))),128)):(0,t.createCommentVNode)("",!0),l.showUpload?((0,t.openBlock)(),(0,t.createBlock)(d,(0,t.mergeProps)({key:1,class:"cv-upload-handler"},l.handlerAttr,{"before-upload":l.initBeforeUpload,"http-request":l.initHttpRequest,style:l.showStyle}),{default:(0,t.withCtx)(()=>[e.upIngPercent>0?((0,t.openBlock)(),(0,t.createBlock)(c,{key:0,percentage:e.upIngPercent,style:{"margin-top":"20px"},type:"circle"},null,8,["percentage"])):((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,class:"cv-upload-video__ing",style:(0,t.normalizeStyle)(l.showStyle)},[(0,t.createVNode)(s,{type:"ElIconUpload",size:"24"}),o[1]||(o[1]=(0,t.createElementVNode)("div",{class:"el-upload__text"},[(0,t.createTextVNode)(" 将视频拖到此处,或 "),(0,t.createElementVNode)("em",null,"点击上传")],-1))],4))]),_:1},16,["before-upload","http-request","style"])):(0,t.createCommentVNode)("",!0)]),(0,t.createVNode)(u,(0,t.mergeProps)(e.tipAttr,{fileUnit:"个",limit:1}),null,16),(0,t.createVNode)(h,{modelValue:n.previewShow,"onUpdate:modelValue":o[0]||(o[0]=m=>n.previewShow=m),title:n.previewTitle,"append-to-body":""},{default:(0,t.withCtx)(()=>[n.previewShow?((0,t.openBlock)(),(0,t.createElementBlock)("div",cc,[(0,t.createElementVNode)("video",{autoplay:!0,src:n.previewUrl,controls:"controls",style:{width:"500px",height:"300px"}}," 您的浏览器不支持视频播放 ",8,dc)])):(0,t.createCommentVNode)("",!0)]),_:1},8,["modelValue","title"])])}var Et=y(Js,[["render",uc]]),mc={emits:["get-unlist","on-close","on-update","on-delete"],props:{modelValue:{type:Array,default:()=>[]},model:{type:String,default:""},accept:{type:String,default:""},multiple:{type:Boolean,default:!1}},data(){return{audioInfo:{},file:null,fileList:[],fileHash:"",tempCheckpoint:null,uploadId:"",uploadStatus:null,showAudio:!1,percentage:0,uploadName:"",client:null,year:new Date().getFullYear(),uploadDisabled:!0,resumeDisabled:!0,pauseDisabled:!0,dialogVisible:!1,isDoing:!1,unList:[],fileMap:{},map_max_key:0,partSize:1024*1024,parallel:4,checkpoints:{}}},watch:{dialogVisible:{handler(e){e||(this.fileList=[],this.$refs.upload.uploadFiles=[])}},fileList:{handler(e){if(e.length){this.dialogVisible=!0;let o=[],a=[];e.forEach(r=>{r.raw.name.indexOf(".")===-1&&(r.errMsg="不支持此格式上传"),r.percentage===100?o.push(r):a.push(r)}),o.length===e.length?(this.pauseDisabled=!0,this.isDoing=!0):this.isDoing=!1,this.unList=a}},deep:!0}},mounted(){window.addEventListener("online",this.resumeUpload)},methods:{filterSize:pa,handleExceed(){this.$confirm("上传文件数量不能超过100个,请重新选择!","操作提示",{confirmButtonText:"确 定",cancelButtonText:"取 消",type:"warning"}).then(()=>{this.fileList=[],this.dialogVisible=!1}).catch(()=>{this.fileList=[]})},handleDeleteChangeFile(e){this.fileList.splice(e,1),this.fileList.length||(this.dialogVisible=!1)},fileTypeIcon(e){const{type:o}=e.raw,a=o.indexOf("video")!==-1,r=o.indexOf("image")!==-1,n=o.indexOf("audio")!==-1,l=o.indexOf("zip")!==-1,s=o.indexOf("wordprocessingml")!==-1,c=o.indexOf("pdf")!==-1,d=o.indexOf("text")!==-1,u=o.indexOf("sheet")!==-1;return a?"MP4":r?"JPG1":n?"mp3-1":l?"yasuo":s?"DOCX":c?"wenjianleixing-biaozhuntu-PDFwendang":d?"div-1":u?"excel1":"weizhiwenjian"},handleClose(){this.$emit("on-close"),this.isDoing?this.dialogVisible=!1:this.$confirm("正在上传文件,关闭后上传文件会丢失!是否继续?","操作提示",{confirmButtonText:"确 定",cancelButtonText:"取 消",type:"warning"}).then(()=>{this.$emit("get-unlist"),this.fileList.forEach(e=>{e.client&&e.percentage<100&&e.client.cancel()}),this.dialogVisible=!1}).catch(()=>{})},async handleBeforeUpload(e){},handleStopChangeFile(e,o){o.isPlay=!o.isPlay,this.fileList.splice(e,1,o),o.isPlay?this.resumeMultipartUpload(o):o.client.cancel()},async starUpload(){this.uploadDisabled=!0,this.pauseDisabled=!1,this.multipartUpload()},async multipartUpload(){if(!this.file){b.ElMessage.error("请选择文件");return}this.fileList.forEach(async e=>{e.isLoading=!0,await this.ossUploadHandle(e,this.fileList)})},async resumeUpload(){this.pauseDisabled=!1,this.uploadDisabled=!0,this.resumeDisabled=!0,await this.resumeMultipartUpload()},stopUpload(){this.resumeDisabled=!1,this.pauseDisabled=!0,this.fileList.forEach(e=>{e.client.cancel(),e.isPlay=!1})},async change(e,o){this.fileMap[e]=o,this.map_max_key=e},async handle_network_speed_change(e,o,a){e-this.map_max_key>=1e4&&(this.fileMap={});for(let r=e;r<=o;r++){const n=await this.fileMap[r];n?await this.change(r,n+a):await this.change(r,a)}},handle_network_speed(e,o,a){const r=e.rt/1e3,n=new Date(e.headers.date).getTime(),l=n-r;let s=parseInt(o/r);return a===0&&(s=0),s===0||this.handle_network_speed_change(l,n,s),s?pa(s):0},async resetUpload(e,o){JSON.stringify(e).indexOf("Error")!==-1&&(o.client&&o.client.cancel(),o.client=await ga(this.signatureType,this.apiFunc),await this.resumeMultipartUpload(o))},async resumeMultipartUpload(e){if(e){const{tempCheckpoint:o}=e;this.resumeUploadFile(e,o)}else Object.values(this.checkpoints).forEach(o=>{const{uploadId:a}=o,r=this.fileList.findIndex(l=>l.upload===a),n=this.fileList[r];this.resumeUploadFile(n,o)})},async resumeUploadFile(e,o){const{uploadId:a,file:r,name:n}=o;try{const{raw:l,percentage:s}=e;e.partSize=0,s<100&&l.name.indexOf(".")!==-1&&e.client.multipartUpload(a,r,{parallel:this.parallel,partSize:this.partSize,progress:async(c,d,u)=>{await this.onUploadProgress(e,c,d,u,n)},checkpoint:o}).then(()=>{delete this.checkpoints[o.uploadId],this.$emit("update:modelValue",this.fileList),this.resumeDisabled=!0,this.unList.length&&this.uploadDisabled&&(this.resumeDisabled=!1),this.onCreatePanFile(e)}).catch(async c=>{await this.resetUpload(c,e)})}catch{}},async onUploadProgress(e,o,a,r,n){a&&(this.checkpoints[a.uploadId]=a,e.speed=this.handle_network_speed(r,this.partSize,o),e.tempCheckpoint=a,e.abortCheckpoint=a,e.upload=a.uploadId),e.isPlay=!0,e.isPlay&&(e.isLoading=!1),e.uploadName=n,e.percentage=Number((o*100).toFixed(2))},async ossUploadHandle(e){let o={pass:!0,filePath:""};try{const{raw:a,percentage:r}=e,n=a,l=await ga(this.signatureType,this.apiFunc,{},{secure:!0});if(this.signatureType=="aliyun_oss_type1"){if(e.client=l,e.partSize=0,r<100&&a.name.indexOf(".")!==-1){const s=l.dir+n.name;await e.client.multipartUpload(s,n,{parallel:this.parallel,partSize:this.partSize,progress:async(c,d,u)=>{await this.onUploadProgress(e,c,d,u,s)}}).then(()=>{this.$emit("upload:modelValue",this.fileList),this.resumeDisabled=!0,this.onCreatePanFile(e),this.unList.length&&this.uploadDisabled&&(this.resumeDisabled=!1)}).catch(async c=>{})}}else this.signatureType=="aliyun_oss_type2"&&Ka(n,l)}catch(a){o={...a,pass:!1,filePath:""}}return o},getToday(){const e=new Date;return`${e.getFullYear()}${e.getMonth()+1}${e.getDate()}${e.getHours()}${e.getMinutes()}${e.getSeconds()}`},handleChange(e,o){o.forEach(a=>{a.client=null,a.isPlay=!1,a.isLoading=!1,a.abortCheckpoint=!1}),this.fileList=o,this.file=e.raw,this.uploadDisabled=!1,this.pauseDisabled=this.resumeDisabled=!0},handleDeleteFile(e){const o=e.indexOf(this.model),a=e.substring(o,e.length);this.$emit("on-delete"),this.fileList=[],b.ElMessage.success("删除成功")},async onCreatePanFile(e){let o=await this.getParams(e);this.$emit("on-update")},handleMediaRes(e){return{image:async function(o){return new Promise(a=>{var r=new FileReader;r.onload=function(n){var l=n.target.result,s=new Image;s.onload=function(){a({Width:this.width,Height:this.height})},s.src=l},r.readAsDataURL(o)})},audio:async function(o){return new Promise(a=>{var r=new FileReader;r.onload=function(n){var l=n.target.result,s=new Audio;s.onloadeddata=function(){const c=s.duration;a({Duration:c*1e3})},s.src=l},r.readAsDataURL(o)})},video:async function(o){return new Promise(a=>{var r=URL.createObjectURL(o);const n=document.createElement("video");n.src=r,n.onloadeddata=function(){a({CoverImg:"",Duration:this.duration*1e3,Width:this.videoWidth,Height:this.videoHeight})}})}}[e]},captureImage(e,o){return o=o||"3000 ",e+"?x-oss-process=video/snapshot,t_"+o+",f_jpg"},async getParams(e){const{type:o}=e.raw,a=o.indexOf("video")!==-1,r=o.indexOf("image")!==-1,n=o.indexOf("audio")!==-1;let l="";a?l="video":r?o.indexOf("adobe")===-1&&(l="image"):n&&(l="audio");let s;return(a||r||n)&&l&&(s=await this.handleMediaRes(l)(e.raw)),{ResTitle:e.name,ResDescribe:"",OssKey:e.uploadName,ContentType:o||"application/octet-stream",ContentLength:e.size,...s}}}},pc={name:"cvUploadOss",mixins:[mc]},hc={class:"oss-upload"},gc={class:"cv-upload-task-hd-title"},fc={class:"cv-upload-task-hd-num"},vc={class:"cv-upload-task-opts"},yc={class:"cv-upload-task-lists"},Cc={class:"cv-upload-task-item-name"},bc={class:"name"},kc={class:"file-name-item"},wc={key:0,class:"speed"},_c={key:1,class:"speed"},Vc={key:2,class:"success"},Bc={class:"total"},Sc={key:0,class:"name error"},Nc={class:"cv-upload-task-item-tool"},Ec=["onClick"],xc=["onClick"];function $c(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-button"),c=(0,t.resolveComponent)("el-upload"),d=(0,t.resolveComponent)("el-progress"),u=(0,t.resolveComponent)("cv-icons"),h=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createElementBlock)("div",hc,[(0,t.createVNode)(c,{ref:"upload",action:"","show-file-list":!1,multiple:"","on-change":e.handleChange,"before-upload":e.handleBeforeUpload,"auto-upload":!1,limit:100,"on-exceed":e.handleExceed,accept:e.accept},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{type:"primary",icon:"ElIconUpload",round:""},{default:(0,t.withCtx)(()=>[...o[1]||(o[1]=[(0,t.createTextVNode)("上 传",-1)])]),_:1})]),_:1},8,["on-change","before-upload","on-exceed","accept"]),(0,t.createVNode)(h,{modelValue:e.dialogVisible,"onUpdate:modelValue":o[0]||(o[0]=m=>e.dialogVisible=m),width:"650px",height:"500","destroy-on-close":"","close-on-click-modal":!1,"before-close":e.handleClose,style:{height:"500px"}},{header:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",gc,[o[2]||(o[2]=(0,t.createElementVNode)("span",null,"上传",-1)),(0,t.createElementVNode)("span",fc,(0,t.toDisplayString)(e.fileList.length-e.unList.length)+"/"+(0,t.toDisplayString)(e.fileList.length),1)])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",vc,[(0,t.createVNode)(s,{type:"primary",icon:"ElIconVideoPlay",disabled:e.uploadDisabled,onClick:e.starUpload},{default:(0,t.withCtx)(()=>[...o[3]||(o[3]=[(0,t.createTextVNode)("开始上传",-1)])]),_:1},8,["disabled","onClick"]),(0,t.createVNode)(s,{type:"success",icon:"ElIconRefreshRight",disabled:e.resumeDisabled,onClick:e.resumeUpload},{default:(0,t.withCtx)(()=>[...o[4]||(o[4]=[(0,t.createTextVNode)("继续",-1)])]),_:1},8,["disabled","onClick"]),(0,t.createVNode)(s,{type:"danger",icon:"ElIconVideoPause",disabled:e.pauseDisabled,onClick:e.stopUpload},{default:(0,t.withCtx)(()=>[...o[5]||(o[5]=[(0,t.createTextVNode)("暂停",-1)])]),_:1},8,["disabled","onClick"])]),(0,t.createElementVNode)("div",yc,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.fileList,(m,v)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-upload-task-item-box",key:v},[(0,t.createElementVNode)("div",Cc,[(0,t.createElementVNode)("div",bc,[(0,t.createElementVNode)("span",kc,(0,t.toDisplayString)(v+1)+"."+(0,t.toDisplayString)(m.name),1),m.isLoading&&!m.isPlay?((0,t.openBlock)(),(0,t.createElementBlock)("span",wc,"准备就绪")):(0,t.createCommentVNode)("",!0),m.isPlay&&m.percentage!==100?((0,t.openBlock)(),(0,t.createElementBlock)("span",_c,(0,t.toDisplayString)(m.speed)+"/s",1)):(0,t.createCommentVNode)("",!0),m.percentage===100?((0,t.openBlock)(),(0,t.createElementBlock)("span",Vc,"完成")):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",Bc,(0,t.toDisplayString)(e.filterSize(m.size)),1)]),m.errMsg?((0,t.openBlock)(),(0,t.createElementBlock)("span",Sc,(0,t.toDisplayString)(m.errMsg),1)):(0,t.createCommentVNode)("",!0),m.percentage<100&&!m.errMsg?((0,t.openBlock)(),(0,t.createBlock)(d,{key:1,percentage:m.percentage},null,8,["percentage"])):((0,t.openBlock)(),(0,t.createBlock)(d,{key:2,percentage:m.percentage,status:m.errMsg?"exception":"success"},null,8,["percentage","status"]))]),(0,t.createElementVNode)("div",Nc,[!m.percentage||0<m.percentage<100&&!m.isPlay?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:0,class:"icon delete",onClick:f=>e.handleDeleteChangeFile(v)},[(0,t.createVNode)(u,{type:"ElIconClose"})],8,Ec)):(0,t.createCommentVNode)("",!0),m.percentage&&m.percentage!==100?((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:1,class:(0,t.normalizeClass)(["icon",m.isPlay?"delete":"success"]),onClick:f=>e.handleStopChangeFile(v,m)},[m.isPlay?((0,t.openBlock)(),(0,t.createBlock)(u,{key:0,type:"ElIconVideoPause"})):((0,t.openBlock)(),(0,t.createBlock)(u,{key:1,type:"ElIconCaretRight"}))],10,xc)):(0,t.createCommentVNode)("",!0)])]))),128))])]),_:1},8,["modelValue","before-close"])])}var xt=y(pc,[["render",$c],["__scopeId","data-v-9c3ea43c"]]);Bt.install=function(e){e.component(Bt.name,Bt)};St.install=function(e){e.component(St.name,St)};Nt.install=function(e){e.component(Nt.name,Nt)};Et.install=function(e){e.component(Et.name,Et)};xt.install=function(e){e.component(xt.name,xt)};var Dc={name:"cvTabsJump",props:{tabPosition:{type:String,default:"top"}},provide(){return{addChildComponents:e=>{this.childComponents.push(e)},clearChildClass:()=>{this.childComponents.map(e=>{e.className=null})}}},data(){return{childComponents:[]}},computed:{tabPositionClass(){return this.tabPosition=="left"?"left":this.tabPosition=="right"?"right":this.tabPosition=="bottom"?"bottom":"top"}},created(){},mounted(){}},Tc={class:"tabs-header"};function Lc(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["cv-tabs-jump",l.tabPositionClass])},[(0,t.createElementVNode)("div",Tc,[(0,t.renderSlot)(e.$slots,"default")])],2)}var $t=y(Dc,[["render",Lc]]),Ic={name:"cvTabPane",emits:["click"],inject:["addChildComponents","clearChildClass"],data(){return{isshow:!0,className:null}},props:{label:{type:String,default:""},current:{type:Boolean,default:!1},name:{type:String}},mounted(){this.addChildComponents(this),this.initCurrent()},methods:{initCurrent(){this.current&&this.handleClick()},handleClick(){this.clearChildClass(),this.className="active",this.$emit("click")}}},Fc={key:1};function Pc(e,o,a,r,n,l){return(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["cv-tab-pane",n.className]),onClick:o[0]||(o[0]=(...s)=>l.handleClick&&l.handleClick(...s))},[e.$slots.label?(0,t.renderSlot)(e.$slots,"label",{key:0}):((0,t.openBlock)(),(0,t.createElementBlock)("span",Fc,(0,t.toDisplayString)(a.label),1))],2)),[[t.vShow,n.isshow]])}var Dt=y(Ic,[["render",Pc]]);$t.install=function(e){e.component($t.name,$t)};Dt.install=function(e){e.component(Dt.name,Dt)};var Ac={name:"cvDrawCaptcha",props:{modelValue:{type:[String,Number],default:"1234"},baseCode:{type:String,default:"1234567890ABCDEFGHGKMNPQRSTUVWXY"},fontSizeMin:{type:Number,default:25},fontSizeMax:{type:Number,default:30},backgroundColorMin:{type:Number,default:255},backgroundColorMax:{type:Number,default:255},colorMin:{type:Number,default:0},colorMax:{type:Number,default:160},lineColorMin:{type:Number,default:100},lineColorMax:{type:Number,default:255},dotColorMin:{type:Number,default:0},dotColorMax:{type:Number,default:255},contentWidth:{type:Number,default:112},contentHeight:{type:Number,default:31},refreshNum:{type:Number,default:1}},data(){return{localCode:""}},watch:{modelValue(e){this.localCode=e,this.drawPic()},refreshNum(){this.refreshCode(),this.drawPic()}},mounted(){this.modelValue==""&&(this.refreshCode(),this.drawPic())},created(){this.localCode=this.modelValue},methods:{refreshCode(){this.localCode="",this.makeCode(this.baseCode,4),this.$emit("update:modelValue",this.localCode)},makeCode(e,o){for(let a=0;a<o;a++)this.localCode+=this.baseCode[this.randomNum(0,this.baseCode.length)]},randomNum(e,o){return Math.floor(Math.random()*(o-e)+e)},randomColor(e,o){let a=this.randomNum(e,o),r=this.randomNum(e,o),n=this.randomNum(e,o);return"rgb("+a+","+r+","+n+")"},drawPic(){let e=document.getElementById("cv-draw-captcha").getContext("2d");e.textBaseline="bottom",e.fillStyle=this.randomColor(this.backgroundColorMin,this.backgroundColorMax),e.fillRect(0,0,this.contentWidth,this.contentHeight);for(let o=0;o<this.localCode.length;o++)this.drawText(e,this.localCode[o],o);this.drawLine(e),this.drawDot(e)},drawText(e,o,a){e.fillStyle=this.randomColor(this.colorMin,this.colorMax),e.font=this.randomNum(this.fontSizeMin,this.fontSizeMax)+"px SimHei";let r=(a+1)*(this.contentWidth/(this.localCode.length+1)),n=this.randomNum(this.fontSizeMax,this.contentHeight-5);var l=this.randomNum(-45,45);e.translate(r,n),e.rotate(l*Math.PI/180),e.fillText(o,0,0),e.rotate(-l*Math.PI/180),e.translate(-r,-n)},drawLine(e){for(let o=0;o<5;o++)e.strokeStyle=this.randomColor(this.lineColorMin,this.lineColorMax),e.beginPath(),e.moveTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),e.lineTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),e.stroke()},drawDot(e){for(let o=0;o<80;o++)e.fillStyle=this.randomColor(0,255),e.beginPath(),e.arc(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight),1,0,2*Math.PI),e.fill()}}},Mc={class:"cv-draw-captcha"},zc=["width","height"];function Oc(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",Mc,[(0,t.createElementVNode)("canvas",{id:"cv-draw-captcha",width:a.contentWidth,height:a.contentHeight,onClick:o[0]||(o[0]=(...s)=>l.refreshCode&&l.refreshCode(...s))},null,8,zc)])}var Tt=y(Ac,[["render",Oc]]),jc={name:"cvDrawQrcode",data(){return{}}};function Rc(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",null,"二维码")}var Lt=y(jc,[["render",Rc]]);Tt.install=function(e){e.component(Tt.name,Tt)};Lt.install=function(e){e.component(Lt.name,Lt)};var Hc={name:"cvTagBase",mixins:[],components:{},emits:["update:modelValue","exceed-max-length"],props:{...b.ElTag.props,modelValue:{type:[Array,String],default:()=>[]},closable:{type:Boolean,default:!1},disableTransitions:{type:Boolean,default:!1},effect:{type:String,default:"light"},color:{type:String,default:""},hit:{type:Boolean,default:!1},type:{type:[String],default:"primary"},size:{type:[String],default:"large"},disabled:{type:Boolean,default:!1},maxlength:{type:Number,default:3,validator:e=>e>0}},watch:{modelValue(e){this._init_parse_value()},localVal(e){this._parse_last()}},data(){return{localVal:""}},mounted(){this._init_parse_value()},methods:{_init_parse_value(){if(this.modelValue)if(typeof this.modelValue=="string"&&this.modelValue.includes(",")){const e=String(this.modelValue).split(",").map(o=>o.trim());this.localVal=be(e)}else this.localVal=be(this.modelValue)},_parse_last(){let e=this.localVal,o=e.join(",");this.$emit("update:modelValue",o),e.length>=this.maxlength&&this.$emit("exceed-max-length",e.length)},addTag(){this.disabled||this.localVal.length>=this.maxlength||(this.localVal.push("新标签"),this.$nextTick(()=>{let e=this.localVal.length,o=this.$refs[`newTag${e-1}`][0],a=document.createRange();a.selectNodeContents(o),window.getSelection().removeAllRanges(),window.getSelection().addRange(a),this._parse_last()}))},checkTag(e){if(this.disabled)return;let o=this.$refs[`newTag${e}`][0].innerText.trim();o.length==0?this.localVal.pop():this.localVal[e]=o,this._parse_last()},removeTag(e){this.disabled||(this.localVal.splice(e,1),this._parse_last())}}},Uc={class:"cv-tag-base"},Wc=["contenteditable","onKeyup","onBlur"],qc={key:1,class:"cv-tag-maxlength-hint"};function Kc(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-tag"),c=(0,t.resolveComponent)("cv-icons");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Uc,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.localVal,(d,u)=>((0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({class:"cv-tag-content"},{ref_for:!0},{closable:!a.disabled&&a.closable,disableTransitions:a.disableTransitions,effect:a.effect,type:a.type,color:a.color,hit:a.hit,size:a.size},{key:u,onClose:h=>l.removeTag(u),disabled:a.disabled}),{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",{class:"cv-tag-item",contenteditable:!a.disabled&&"plaintext-only",ref_for:!0,ref:`newTag${u}`,onKeyup:(0,t.withKeys)(h=>!a.disabled&&l.checkTag(u),["enter"]),onBlur:h=>!a.disabled&&l.checkTag(u)},(0,t.toDisplayString)(d),41,Wc)]),_:2},1040,["onClose","disabled"]))),128)),!a.disabled&&n.localVal.length<a.maxlength?((0,t.openBlock)(),(0,t.createBlock)(c,{key:0,type:"ElIconCirclePlus",size:"20",onClick:o[0]||(o[0]=d=>l.addTag())})):(0,t.createCommentVNode)("",!0),!a.disabled&&n.localVal.length>=a.maxlength?((0,t.openBlock)(),(0,t.createElementBlock)("span",qc,"已达到最大数量 ("+(0,t.toDisplayString)(a.maxlength)+")",1)):(0,t.createCommentVNode)("",!0)])}var It=y(Hc,[["render",Kc]]);It.install=function(e){e.component(It.name,It)};var Gc={name:"cvTransferTable",props:{modelValue:{type:[Array],default(){return[]}},showQuery:{type:Boolean,default:!1},showPagination:{type:Boolean,default:!1},paginationCallBack:{type:Function,default:function(){return new Promise((e,o)=>{try{e({total:0,data:null})}catch{o()}})}},titleTexts:{type:Array,default(){return["待选项","已选项"]}},buttonTexts:{type:Array,default(){return[]}},queryTexts:{type:Array,default(){return["查询","筛选"]}},leftColumns:{type:Array,default(){return[]}},rightColumns:{type:Array,default(){}},minHeight:{type:String,default:"300px"},maxHeight:{type:String,default:"500px"},tableRowKey:{type:Function,default(e){return e&&e&&e.id}}},data(){return{leftTableData:[],rightTableData:[],pageIndex:1,pageSize:20,totalSize:0,leftSelection:[],rightSelection:[],leftQueryCondition:{},rightQueryCondition:{},rightConditionTemp:void 0}},watch:{modelValue(e){this.rightTableData=e}},created(){this.rightTableData=this.modelValue,this.handlePaginationCallBack()},computed:{hasButtonTexts(){return this.buttonTexts.length===2},buttonClasses(){return["transfer-button",{"is-with-texts":this.hasButtonTexts}]},disabledLeftButton(){return!this.leftSelection.some(e=>!this.rightTableData.some(o=>this.checkObjectIsEqual(e,o)))},calcRightTableData(){if(this.showQuery&&this.rightConditionTemp){const e=Object.keys(this.rightConditionTemp);return this.rightTableData.filter(o=>e.some(a=>{const r=o[a],n=this.rightConditionTemp[a].trim();return r?String(r).indexOf(n)>-1:!0}))}return this.rightTableData}},methods:{handleLeftSelectionChange(e){this.leftSelection=e},handleRightSelectionChange(e){this.rightSelection=e},handleLeftRowClick(e){this.rightTableData.some(o=>this.checkObjectIsEqual(o,e))||this.$refs.leftTable.toggleRowSelection(e)},handleRightRowClick(e){this.$refs.rightTable.toggleRowSelection(e)},handleSizeChange(e){this.pageSize=e,this.handlePaginationCallBack()},handleCurrentChange(e){this.pageIndex=e,this.handlePaginationCallBack()},handlePaginationCallBack(){if(this.showPagination&&this.paginationCallBack){const e={pageIndex:this.pageIndex,pageSize:this.pageSize,...this.leftQueryCondition};this.paginationCallBack.call(null,e).then(o=>{o&&Array.isArray(o.data)&&(this.leftTableData=o.data,this.totalSize=o.total),this.$nextTick(()=>{this.leftTableData.forEach(a=>{const r=this.rightTableData.some(n=>this.checkObjectIsEqual(n,a));this.$refs.leftTable.toggleRowSelection(a,r)})})})}},handleRowStyle({row:e}){return this.rightTableData.some(o=>this.checkObjectIsEqual(o,e))?{color:"blue"}:{}},handleSelectable(e){return!this.rightTableData.some(o=>this.checkObjectIsEqual(o,e))},addToRight(){for(const e of this.leftSelection)this.rightTableData.some(o=>this.checkObjectIsEqual(o,e))||this.rightTableData.push(e);this.$emit("update:modelValue",this.rightTableData)},addToLeft(){this.rightSelection.forEach(e=>{const o=this.rightTableData.findIndex(a=>this.checkObjectIsEqual(a,e));if(o!==-1){this.rightTableData.splice(o,1);const a=this.leftTableData.find(r=>this.checkObjectIsEqual(r,e));a&&this.$refs.leftTable.toggleRowSelection(a,!1)}}),this.$emit("update:modelValue",this.rightTableData)},onLeftQuerySubmit(){this.handlePaginationCallBack()},onRightQuerySubmit(){this.rightConditionTemp=JSON.parse(JSON.stringify(this.rightQueryCondition))},checkObjectIsEqual(e,o){return this.tableRowKey(e)===this.tableRowKey(o)},clear(){this.rightTableData=[],this.$refs.leftTable.clearSelection();for(const e in this.leftQueryCondition)this.leftQueryCondition[e]=void 0;for(const e in this.rightQueryCondition)this.rightQueryCondition[e]=void 0;this.pageIndex=1,this.handlePaginationCallBack()}}},Yc={class:"cv-transfer-table"},Zc={class:"transfer-panel"},Qc={class:"transfer-panel-header"},Xc={key:0},Jc={style:{padding:"5px"}},ed={class:"transfer-buttons"},td={key:0,class:"button-text"},od={key:0,class:"button-text"},ad={class:"transfer-panel"},nd={class:"transfer-panel-header"},ld={key:0},rd={style:{padding:"5px"}};function id(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-button"),c=(0,t.resolveComponent)("el-form-item"),d=(0,t.resolveComponent)("el-form"),u=(0,t.resolveComponent)("el-table-column"),h=(0,t.resolveComponent)("el-table"),m=(0,t.resolveComponent)("el-pagination"),v=(0,t.resolveComponent)("cv-icons");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Yc,[(0,t.createElementVNode)("div",Zc,[(0,t.createElementVNode)("p",Qc,[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(a.titleTexts&&a.titleTexts[0]),1),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(n.leftSelection.length)+"/"+(0,t.toDisplayString)(n.leftTableData.length),1)]),a.showQuery?((0,t.openBlock)(),(0,t.createElementBlock)("div",Xc,[(0,t.createVNode)(d,{inline:!0,model:n.leftQueryCondition,class:"cv-transfer-form"},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"leftCondition",{scope:n.leftQueryCondition}),(0,t.createVNode)(c,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{type:"primary",onClick:o[0]||(o[0]=f=>l.onLeftQuerySubmit())},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(a.queryTexts[0]),1)]),_:1})]),_:1})]),_:3},8,["model"])])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(h,{ref:"leftTable","max-height":a.maxHeight,height:a.minHeight,data:n.leftTableData,"row-key":a.tableRowKey,"row-style":l.handleRowStyle,onRowClick:l.handleLeftRowClick,onSelectionChange:l.handleLeftSelectionChange,border:"",stripe:""},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(u,{width:"40px",type:"selection",selectable:l.handleSelectable},null,8,["selectable"]),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.leftColumns,f=>((0,t.openBlock)(),(0,t.createBlock)(u,{prop:f.id,key:f.id,label:f.label,width:f.width},{default:(0,t.withCtx)(C=>[(0,t.renderSlot)(e.$slots,"default",{scope:{row:C.row,col:f}},()=>[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(C.row[f.id]),1)])]),_:2},1032,["prop","label","width"]))),128))]),_:3},8,["max-height","height","data","row-key","row-style","onRowClick","onSelectionChange"]),(0,t.createElementVNode)("div",Jc,[a.showPagination?((0,t.openBlock)(),(0,t.createBlock)(m,{key:0,onSizeChange:l.handleSizeChange,onCurrentChange:l.handleCurrentChange,"current-page":n.pageIndex,"page-sizes":[10,20,50,100],"page-size":n.pageSize,"pager-count":5,total:n.totalSize,layout:"total, sizes, prev, pager, next"},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])):(0,t.createCommentVNode)("",!0)])]),(0,t.createElementVNode)("div",ed,[(0,t.createVNode)(s,{type:"primary",class:(0,t.normalizeClass)(l.buttonClasses),disabled:l.disabledLeftButton,onClick:l.addToRight},{default:(0,t.withCtx)(()=>[a.buttonTexts[0]!==void 0?((0,t.openBlock)(),(0,t.createElementBlock)("span",td,(0,t.toDisplayString)(a.buttonTexts[0]),1)):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(v,{type:"ElIconArrowRight"})]),_:1},8,["class","disabled","onClick"]),(0,t.createVNode)(s,{type:"primary",class:(0,t.normalizeClass)(l.buttonClasses),disabled:n.rightSelection.length===0,onClick:l.addToLeft},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(v,{type:"ElIconArrowLeft"}),a.buttonTexts[1]!==void 0?((0,t.openBlock)(),(0,t.createElementBlock)("span",od,(0,t.toDisplayString)(a.buttonTexts[1]),1)):(0,t.createCommentVNode)("",!0)]),_:1},8,["class","disabled","onClick"])]),(0,t.createElementVNode)("div",ad,[(0,t.createElementVNode)("p",nd,[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(a.titleTexts&&a.titleTexts[1]),1),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(n.rightSelection.length)+"/"+(0,t.toDisplayString)(n.rightTableData.length),1)]),a.showQuery?((0,t.openBlock)(),(0,t.createElementBlock)("div",ld,[(0,t.createVNode)(d,{inline:!0,model:n.rightQueryCondition,class:"cv-transfer-form"},{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"rightCondition",{scope:n.rightQueryCondition}),(0,t.createVNode)(c,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{type:"primary",onClick:o[1]||(o[1]=f=>l.onRightQuerySubmit())},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(a.queryTexts[1]),1)]),_:1})]),_:1})]),_:3},8,["model"])])):(0,t.createCommentVNode)("",!0),(0,t.createVNode)(h,{ref:"rightTable","max-height":a.maxHeight,height:a.minHeight,data:l.calcRightTableData,"row-key":a.tableRowKey,onRowClick:l.handleRightRowClick,onSelectionChange:l.handleRightSelectionChange,border:"",stripe:""},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(u,{width:"40px",type:"selection"}),((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.rightColumns||a.leftColumns,f=>((0,t.openBlock)(),(0,t.createBlock)(u,{prop:f.id,key:f.id,label:f.label,width:f.width},{default:(0,t.withCtx)(C=>[(0,t.renderSlot)(e.$slots,"default",{scope:{row:C.row,col:f}},()=>[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(C.row[f.id]),1)])]),_:2},1032,["prop","label","width"]))),128))]),_:3},8,["max-height","height","data","row-key","onRowClick","onSelectionChange"]),(0,t.createElementVNode)("div",rd,[a.showPagination?((0,t.openBlock)(),(0,t.createBlock)(m,{key:0,total:n.rightTableData.length,layout:"total"},null,8,["total"])):(0,t.createCommentVNode)("",!0)])])])}var Ft=y(Gc,[["render",id]]);Ft.install=function(e){e.component(Ft.name,Ft)};var Yo={provide(){return{pageCurr:this.loadConfigSetting.pageCurr||1,pageLimit:this.loadConfigSetting.pageLimit||10}},props:{...b.ElTable.props,modelValue:{type:[Array,Object],default(){return[]}},headerCellStyle:{type:[Function,Object],default:()=>({})}},data(){return{loadDataList:[]}},watch:{modelValue(e){this.loadDataList=e},loadDataList(e){this.$emit("update:modelValue",e)}},created(){this.loadDataList=this.modelValue},methods:{_getPageCurr(){return this.loadPageCurr},_getPageSize(){return this.loadPageLimit},handleCurrentChange(e){this.loadPageCurr=e,this.getData()},handleSizeChange(e){this.loadPageLimit=e,this.getData()}}},sd={name:"cvTableBase",mixins:[vo,Yo],props:{align:{type:String,default:"left"},showPagebreak:{type:[Boolean,String],default:!0},tablePagin:{type:Object,default(){return{}}},tableConfig:{type:Object,default(){return{}}},tableRefresh:{type:Number,default(){return 0}}},data(){return{paginationGroup:[10,20,30,50,100,200],paginationCount:7,searchData:{},tableConfDef:{}}},watch:{tableRefresh(e,o){this.initConfAll(),this.refresh()}},updated(){},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(e){this.$emit("selection-change",e)},initConfAll(){let e={};Object.assign(e,this.loadConfigDef,this.tableConfDef,this.tableConfig),this.loadPageCurr=e.pageCurr||1,this.loadPageLimit=e.pageLimit||this.paginationGroup[0],Object.assign(e.where,this.searchData),this.loadConfigSetting=e},searchSubmit(e){if(this.searchData=e||{},this.loadConfigSetting.isSkip){({...this.searchData});return}this.page=1,this.getData()},searchReset(e){e={},this.searchData={},this.page=1,this.getData()},refresh(e){this.getData()}}},cd={class:"cv-table-list"},dd={key:0,class:"cv-tablie-list-page page"};function ud(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-table"),c=(0,t.resolveComponent)("cv-icons"),d=(0,t.resolveComponent)("el-button"),u=(0,t.resolveComponent)("el-pagination"),h=(0,t.resolveDirective)("loading");return(0,t.openBlock)(),(0,t.createElementBlock)("div",cd,[(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{data:e.loadDataList,style:{width:"100%"},onSelectionChange:l.handleSelectionChange}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16,["data","onSelectionChange"])),[[h,e.loadDataLoading]]),a.showPagebreak?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",dd,[(0,t.createVNode)(d,{onClick:l.refresh,style:{float:"left",margin:"0 10px 0 0",padding:"5px 10px"}},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{type:"ElIconRefresh",size:"14"})]),_:1},8,["onClick"]),(0,t.createVNode)(u,{background:"",onSizeChange:e.handleSizeChange,onCurrentChange:e.handleCurrentChange,"pager-count":n.paginationCount,"page-sizes":n.paginationGroup,"current-page":e.loadPageCurr,"page-size":e.loadPageLimit,layout:"total, sizes, prev, pager, next, jumper",total:e.loadDataTotal},null,8,["onSizeChange","onCurrentChange","pager-count","page-sizes","current-page","page-size","total"])],512)),[[t.vShow,e.loadDataLoading===!1]]):(0,t.createCommentVNode)("",!0)])}var Pt=y(sd,[["render",ud]]),md={name:"cvTableTree",mixins:[vo,Yo],props:{tableConfig:{type:Object,default(){return{}}},tableRefresh:{type:Number,default(){return 0}}},data(){return{searchData:{},tableConfDef:{tablePrimary:"",childName:"children"},pager_count:7,page:1}},watch:{tableRefresh(e,o){this.refresh()}},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(e){this.$emit("selection-change",e)},initConfAll(){let e={};Object.assign(e,this.loadConfigDef,this.tableConfDef,this.tableConfig),Object.assign(e.where,this.searchData),this.loadConfigSetting=e},searchSubmit(e){if(this.searchData=e||{},this.loadConfigSetting.isSkip){({...this.searchData});return}this.page=1,this.getData()},searchReset(e){e={},this.searchData={},this.page=1,this.getData()},refresh(e){this.getData()}}},pd={class:"cv-table-tree"};function hd(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-table"),c=(0,t.resolveDirective)("loading");return(0,t.openBlock)(),(0,t.createElementBlock)("div",pd,[(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{data:e.loadDataList,style:{width:"100%"},onSelectionChange:l.handleSelectionChange,"row-key":e.loadConfigSetting.tablePrimary,"tree-props":{children:e.loadConfigSetting.childName,hasChildren:"hasChildren"}}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16,["data","onSelectionChange","row-key","tree-props"])),[[c,e.loadDataLoading]])])}var At=y(md,[["render",hd]]),gd={name:"cvTableEditor",mixins:[vo,Yo],props:{border:{type:[Boolean],default:!0},tableConfig:{type:[Array,Object],default(){return{}}}},data(){return{mergeRules:{},apiFunc:null,tableConfDef:{},cell_click_index:null,cell_click_label:""}},watch:{},created(){this.loadConfigSetting=Object.assign({},this.tableConfDef,this.tableConfig)},mounted(){},methods:{cell_click(e,o,a,r){switch(this.cell_click_index=e.index,this.cell_click_label=o.label,o.label){case"taskid":this.cell_click_index=e.index,this.cell_click_label=o.label;break;case"taskname":this.cell_click_index=e.index,this.cell_click_label=o.label;break;default:return}},handleChangeTData(e){}}},fd={class:"cv-table-editor"};function vd(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-table"),c=(0,t.resolveDirective)("loading");return(0,t.openBlock)(),(0,t.createElementBlock)("div",fd,[(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{data:e.loadDataList,style:{width:"100%"},"row-class-name":"cv-tbed-tr"}),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default")]),_:3},16,["data"])),[[c,e.loadDataLoading]])])}var Mt=y(gd,[["render",vd]]),yd={name:"cvTbColumnIndex",inject:{pageCurr:{default:1},pageLimit:{default:10}},props:{...b.ElTableColumn.props,fixed:{type:[String],default:"left"},align:{type:String,default:"center"},width:{type:[String,Number],default:55},continuity:{type:[Boolean,String],default:!1}},data(){return{}},created(){},methods:{indexMethod(e){return this.continuity&&this.pageCurr&&this.pageLimit?e+1+(this.pageCurr-1)*this.pageLimit:e+1}}};function Cd(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{type:"index",index:l.indexMethod}),null,16,["index"])}var zt=y(yd,[["render",Cd]]),bd={name:"cvTbColumnCheck",props:{...b.ElTableColumn.props,fixed:{type:[String],default:"left"},align:{type:[String],default:"center"},width:{type:[String,Number],default:55}},data(){return{}},created(){}};function kd(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{type:"selection"}),null,16)}var Ot=y(bd,[["render",kd]]),wd={name:"cvTbColumnText",props:{...b.ElTableColumn.props},data(){return{}},created(){},methods:{getContentText(e){let o=e.row[this.prop];return this.formatter&&(o=this.formatter(e.row,e.column)),o}}},_d={style:{display:"contents"}};function Vd(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(c=>[(0,t.createElementVNode)("div",_d,(0,t.toDisplayString)(c.row[e.prop]),1)]),_:1},16)}var jt=y(wd,[["render",Vd]]),Bd={name:"cvTbColumnImg",props:{...b.ElTableColumn.props,imgWidth:{type:[String,Number],default:null},imgHeight:{type:[String,Number],default:null}},data(){return{localImgWidth:"50px",localImgHeight:"50px",localImgArr:[],localImgOne:""}},created(){this.imgWidth&&(this.localImgWidth=this.imgWidth.indexOf("px")!==-1?this.imgWidth:this.imgWidth+"px"),this.imgHeight&&(this.localImgHeight=this.imgHeight.indexOf("px")!==-1?this.imgHeight:this.imgHeight+"px")},methods:{handleImgOne(e){let o=e[this.prop]||null;if(o){if(Object.prototype.toString.call(o)==="[object Array]")return o[0];if(Object.prototype.toString.call(o)==="[object String]")return o}},handleImgArr(e){let o=e[this.prop]||null;if(o){if(Object.prototype.toString.call(o)==="[object Array]")return o;if(Object.prototype.toString.call(o)==="[object String]")return[o]}},handleImgLeng(e){let o=e[this.prop]||null;if(o){if(Object.prototype.toString.call(o)==="[object Array]")return o.length;if(Object.prototype.toString.call(o)==="[object String]")return 1}else return 0}}},Sd={key:0,class:"cv-table-column-img-mark"},Nd={class:"cv-table-column-img-text"};function Ed(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-image"),c=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(c,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(d=>[(0,t.createElementVNode)("div",{class:"cv-table-column-img-box",style:(0,t.normalizeStyle)({width:n.localImgWidth,height:n.localImgHeight})},[(0,t.createVNode)(s,{style:(0,t.normalizeStyle)({width:n.localImgWidth,height:n.localImgHeight}),fit:"scale-down",lazy:"",src:l.handleImgOne(d.row),"preview-src-list":l.handleImgArr(d.row),"preview-teleported":!0},{error:(0,t.withCtx)(()=>[...o[0]||(o[0]=[(0,t.createElementVNode)("span",{class:"el-image__error cv-table-column-img-err"},[(0,t.createTextVNode)(" 暂无 "),(0,t.createElementVNode)("br"),(0,t.createTextVNode)(" 图片 ")],-1)])]),_:1},8,["style","src","preview-src-list"]),l.handleImgLeng(d.row)>1?((0,t.openBlock)(),(0,t.createElementBlock)("p",Sd,[(0,t.createElementVNode)("span",Nd,(0,t.toDisplayString)(l.handleImgLeng(d.row))+"张",1)])):(0,t.createCommentVNode)("",!0)],4)]),_:1},16)}var Rt=y(Bd,[["render",Ed]]),xd={name:"cvTbColumnOpt",props:{...b.ElTableColumn.props,fixed:{type:[String],default:"right"},label:{type:[String],default:"操作"}},data(){return{}},created(){}};function $d(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(c=>[(0,t.renderSlot)(e.$slots,"default",(0,t.normalizeProps)((0,t.guardReactiveProps)({row:c.row,$index:c.$index,scope:c})))]),_:3},16)}var Ht=y(xd,[["render",$d]]),Dd={name:"cvTbColumnBase",props:{...b.ElTableColumn.props,width:{type:[String,Number],default:""}},data(){return{}},created(){}};function Td(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(c=>[(0,t.renderSlot)(e.$slots,"default",(0,t.normalizeProps)((0,t.guardReactiveProps)({row:c.row,$index:c.$index,scope:c})))]),_:3},16)}var Ut=y(Dd,[["render",Td]]),Ld={name:"cvTbColumnExpand",props:{...b.ElTableColumn.props},data(){return{}},created(){}};function Id(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)(e.$props,{type:"expand"}),{default:(0,t.withCtx)(c=>[(0,t.renderSlot)(e.$slots,"default",(0,t.normalizeProps)((0,t.guardReactiveProps)({row:c.row,$index:c.$index,props:c})))]),_:3},16)}var Wt=y(Ld,[["render",Id]]),Fd={name:"cvTbColumnEnum",props:{...b.ElTableColumn.props,dataLists:{type:[Object,Array],default:()=>({})}},data(){return{}},created(){},methods:{dealTypeEnum(e){let o=Object.keys(this.dataLists);return e[this.prop]?this.dataLists[e[this.prop]]||"":this.dataLists[o[0]]||""}}};function Pd(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(c=>[(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(l.dealTypeEnum(c.row)),1)]),_:1},16)}var qt=y(Fd,[["render",Pd]]),Ad={name:"cvTbEditSearch",props:{...b.ElTableColumn.props,modelValue:{type:[String],default:""},align:{type:[String],default:"left"}},data(){return{isEditIndex:null,localVal:"",autocompleteAttr:{debounce:0},searchSett:{searchFunc:null,searchParam:{},searchMockData:null,searchField:{}},searchResList:[],searchCurrClass:"",searchCurrTbIndex:0,searchIsSelect:!1}},watch:{modelValue(e){},localVal(e){this.$emit("update:modelValue",e)}},directives:{edfocus:{mounted:e=>{}}},created(){},methods:{searchEdit(e,o){this.isEditIndex=o,this.$nextTick(()=>{this.$refs[`cv-tbce-autocomplete${o}`].focus()})},searchSave(e,o){this.isEditIndex=null},searchSelect(e,o,a){this.searchIsSelect=!0,this.localTableData[a]=Object.assign(this.localTableData[a],e),this.localTableData[a].row_num=1,e.row_attr?this.localTableData[a].row_name=e.row_name+`<br><span class="cv-tbce-showtext-attr">[ ${e.row_attr} ]</span>`:this.localTableData[a].row_name=e.row_name},searchFocus(e,o){this.searchCurrClass="cvtegac"+e,this.searchCurrTbIndex=e},searchBlur(e,o){this.searchIsSelect||(this.isEditIndex=null)},searchQuery(e,o){this.searchIsSelect=!1,this.searchResList=[];const a=this.searchSett;if(a.searchMockData!=null&&a.searchMockData){if(typeof a.searchMockData=="object"){const r=this.sortOutData(a.searchMockData);this.tableData=r,this.$message({message:r.msg||"",type:"warning",duration:1300})}this.$nextTick(()=>{this.tableLoading=!1})}else a.searchFunc&&typeof a.searchFunc=="function"&&a.searchFunc({page:1,pagesize:20,keyword:e,...a.searchParam}).then(r=>{this.searchResList=[...r.data],this.searchParseData(e,o)})},searchParseData(e,o){var a=[],r=[];const n=this.searchSett;if(this.searchResList.length>0){for(let l in this.searchResList){let s=this.searchResList[l];s.row_price=s[n.searchField.row_price],s.row_stock=s[n.searchField.row_stock],s.row_attr=s[n.searchField.row_attr],s.row_name=s[n.searchField.row_name],s.row_unit=s[n.searchField.row_unit],s.row_id=s[n.searchField.row_id],s.value=s.row_name,r.push(s)}a=r}clearTimeout(this.timeout),this.timeout=setTimeout(()=>{o(a)},600)},inputSearchFilter(e){return o=>o.value.toLowerCase().indexOf(e.toLowerCase())===0},searchIconClick(){this.isEditIndex=null}}},Md={class:"name"},zd={class:"addr"},Od={class:"addr"},jd={class:"droplist-item"},Rd={class:"name"},Hd={key:0,class:"attr"},Ud={class:"price"},Wd={class:"rest"},qd=["onClick"];function Kd(e,o,a,r,n,l){const s=(0,t.resolveComponent)("ElIconCircleClose"),c=(0,t.resolveComponent)("el-icon"),d=(0,t.resolveComponent)("el-autocomplete"),u=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(u,(0,t.mergeProps)(e.$props,{"class-name":"cv-table-editor-search-column"}),{default:(0,t.withCtx)(h=>[n.isEditIndex==h.$index?((0,t.openBlock)(),(0,t.createBlock)(d,(0,t.mergeProps)({key:0,ref:`cv-tbce-autocomplete${h.$index}`},n.autocompleteAttr,{modelValue:h.row[e.prop],"onUpdate:modelValue":m=>h.row[e.prop]=m,"popper-class":`cv-tbce-autocomplete cvtegac${h.$index}`,"fetch-suggestions":l.searchQuery,onSelect:m=>l.searchSelect(m,h.row,h.$index),onFocus:m=>l.searchFocus(h.$index,m),onBlur:m=>l.searchBlur(h.row,h.$index)}),{suffix:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{onClick:m=>l.searchIconClick(h.row,h.$index)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(s)]),_:1},8,["onClick"])]),default:(0,t.withCtx)(({item:m})=>[(0,t.renderSlot)(e.$slots,"default",{item:m},()=>[(0,t.createElementVNode)("div",Md,(0,t.toDisplayString)(m.row_name),1),(0,t.createElementVNode)("span",zd,"价格:"+(0,t.toDisplayString)(m.row_price),1),(0,t.createElementVNode)("span",Od,(0,t.toDisplayString)(m.row_rest),1),(0,t.createElementVNode)("div",jd,[(0,t.createElementVNode)("div",Rd,[(0,t.createTextVNode)((0,t.toDisplayString)(m.row_name)+" ",1),m.row_attr?((0,t.openBlock)(),(0,t.createElementBlock)("div",Hd,"[ "+(0,t.toDisplayString)(m.row_attr)+"]",1)):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("div",Ud,"¥ "+(0,t.toDisplayString)(m.row_price),1),(0,t.createElementVNode)("div",Wd,(0,t.toDisplayString)(m.attr_stock),1)])],!0)]),_:2},1040,["modelValue","onUpdate:modelValue","popper-class","fetch-suggestions","onSelect","onFocus","onBlur"])):((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:1,class:"showtext",onClick:m=>l.searchEdit(h.row,h.$index)},(0,t.toDisplayString)(h.row[e.prop]),9,qd))]),_:3},16)}var Kt=y(Ad,[["render",Kd],["__scopeId","data-v-2f76009a"]]),Gd={name:"cvTbEditOpt",props:{tableData:{type:[Array],default:()=>[]},...b.ElTableColumn.props,label:{type:[String],default:"操作"},align:{type:[String],default:"center"},width:{type:[String],default:"100"},fixed:{type:[String],default:"left"},btnAdd:{type:[Boolean,String],default:!0},btnDel:{type:[Boolean,String],default:!0}},data(){return{localTbData:[]}},watch:{tableData(e){this.localTbData=e}},created(){this.localTbData=this.tableData},methods:{optHdDelete(e,o){this.localTbData.splice(e,1),this.localTbData.length<1&&this.optHdAdd()},optHdAdd(){this.localTbData.push({})}}};function Yd(e,o,a,r,n,l){const s=(0,t.resolveComponent)("cv-icons"),c=(0,t.resolveComponent)("el-button"),d=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(d,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(u=>[a.btnAdd?((0,t.openBlock)(),(0,t.createBlock)(c,{key:0,plain:"",style:{padding:"5px",width:"26px",height:"26px"},onClick:o[0]||(o[0]=h=>l.optHdAdd())},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{type:"ElIconPlus"})]),_:1})):(0,t.createCommentVNode)("",!0),a.btnDel?((0,t.openBlock)(),(0,t.createBlock)(c,{key:1,plain:"",style:{padding:"5px",width:"26px",height:"26px"},onClick:h=>l.optHdDelete(u.$index,u.row)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{type:"ElIconClose"})]),_:1},8,["onClick"])):(0,t.createCommentVNode)("",!0)]),_:1},16)}var Gt=y(Gd,[["render",Yd]]),Zd={name:"cvTbEditText",props:{...b.ElTableColumn.props,width:{type:[String,Number],default:""},editAttr:{type:[Object],default:()=>({placeholder:"请输入"})},editClearable:{type:[Boolean],default:!0},editStyle:{type:[Object],default:()=>({"--el-input-border":0,"--el-input-border-radius":0,"--el-input-height":"36px"})},editClass:{type:[Object],default:()=>({})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}},toFixed:{type:[String,Number],default:""}},data(){return{currValue:"",isEditIndex:null,isErrIndex:[]}},directives:{edfocus:{mounted:e=>{e.querySelector("input").focus()},inserted:function(e){e.querySelector("input").focus()}}},created(){},methods:{textIsError(e){return this.isErrIndex&&this.isErrIndex[e]&&this.isErrIndex[e][this.prop]},textHdEdit(e,o){this.isEditIndex=o},textHdClear(e,o){},textHdSave(e,o){this.isEditIndex=null;let a=e[this.prop];if(this.toFixed!=""){let r=parseInt(this.toFixed);isNaN(a)||(e[this.prop]=parseFloat(a).toFixed(r))}else e[this.prop]=a}},render22(e,o){let a=this;return e("el-table-column",{props:{...this.$props},scopedSlots:{default:r=>{this.currValue=r.row[this.prop];let n=r.$index;return this.isEditIndex==n?e("el-input",{props:{style:this.editStyle,class:this.editClass},domProps:{value:this.currValue},props:{placeholder:this.placeholder,value:this.param},nativeOn:{keyup:l=>{l.keyCode===13&&(this.$emit("update:param",l.target.value),this.callback&&this.callback())}},on:{blur:l=>{this.$emit("update:param",l.target.value),this.callback&&this.callback()},input:function(l){a.currValue=l||l.target.value},blur:l=>{this.isEditIndex=null,a.currValue=l||l.target.value}}},this.currValue):e("span",{class:{showtext:!0},on:{click:()=>{this.isEditIndex=n}}},this.currValue)}}})}},Qd=["onClick"];function Xd(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-input"),c=(0,t.resolveComponent)("el-table-column"),d=(0,t.resolveDirective)("edfocus");return(0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)(e.$props,{"class-name":"cv-table-editor-text-column"}),{default:(0,t.withCtx)(u=>[n.isEditIndex==u.$index&&!a.editAttr.disabled?(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createBlock)(s,(0,t.mergeProps)({key:0},a.editAttr,{clearable:a.editClearable,style:a.editStyle,class:a.editClass,modelValue:u.row[e.prop],"onUpdate:modelValue":h=>u.row[e.prop]=h,onBlur:(0,t.withModifiers)(h=>l.textHdSave(u.row,u.$index),["prevent"]),onClear:h=>l.textHdClear(u.row,u.$index)}),null,16,["clearable","style","class","modelValue","onUpdate:modelValue","onBlur","onClear"])),[[d]]):((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:1,class:"showtext",onClick:h=>l.textHdEdit(u.row,u.$index)},(0,t.toDisplayString)(u.row[e.prop]),9,Qd))]),_:1},16)}var Yt=y(Zd,[["render",Xd]]),Jd={name:"cvTbEditRadio",props:{...b.ElTableColumn.props,editAttr:{type:[Object],default:()=>({})},editStyle:{type:[Object],default:()=>({})},editClass:{type:[Object],default:()=>({})},dataLists:{type:[Object,Array],default:()=>({})},dataField:{type:Object,default:()=>({label:"label",value:"value"})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}}},data(){return{}},created(){}};function eu(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-radio"),c=(0,t.resolveComponent)("el-radio-group"),d=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(d,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(u=>[(0,t.createVNode)(c,(0,t.mergeProps)({style:a.editStyle,class:a.editClass,modelValue:u.row[e.prop],"onUpdate:modelValue":h=>u.row[e.prop]=h},a.editAttr),{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.dataLists,(h,m)=>((0,t.openBlock)(),(0,t.createBlock)(s,{key:m,label:h[a.dataField.label],value:h[a.dataField.value]},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(h[a.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:1},16,["style","class","modelValue","onUpdate:modelValue"])]),_:1},16)}var Zt=y(Jd,[["render",eu]]),tu={name:"cvTbEditCheckbox",props:{...b.ElTableColumn.props,editAttr:{type:[Object],default:()=>({})},editStyle:{type:[Object],default:()=>({})},editClass:{type:[Object],default:()=>({})},dataLists:{type:[Object,Array],default:()=>({})},dataField:{type:Object,default:()=>({label:"label",value:"value"})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}}},data(){return{localVal:[]}},created(){},methods:{handleParseValue(e){this.localVal=[]}}};function ou(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-checkbox"),c=(0,t.resolveComponent)("el-checkbox-group"),d=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(d,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(u=>[u.row[e.prop]?((0,t.openBlock)(),(0,t.createBlock)(c,(0,t.mergeProps)({key:0,style:a.editStyle,class:a.editClass,modelValue:u.row[e.prop],"onUpdate:modelValue":h=>u.row[e.prop]=h},a.editAttr),{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.dataLists,(h,m)=>((0,t.openBlock)(),(0,t.createBlock)(s,{key:m,label:h[a.dataField.label],value:h[a.dataField.value]},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(h[a.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:1},16,["style","class","modelValue","onUpdate:modelValue"])):(0,t.createCommentVNode)("",!0)]),_:1},16)}var Qt=y(tu,[["render",ou]]),au={name:"cvTbEditSelect",props:{...b.ElTableColumn.props,editAttr:{type:[Object],default:()=>({})},editStyle:{type:[Object],default:()=>({})},editClass:{type:[Object],default:()=>({})},dataLists:{type:[Object,Array],default:()=>({})},dataField:{type:Object,default:()=>({label:"label",value:"value"})},editChange:{type:[Function],default:()=>{}},editFormatter:{type:[Function],default:()=>{}}},data(){return{}},created(){}};function nu(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-option"),c=(0,t.resolveComponent)("el-select"),d=(0,t.resolveComponent)("el-table-column");return(0,t.openBlock)(),(0,t.createBlock)(d,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(u=>[(0,t.createVNode)(c,(0,t.mergeProps)({style:a.editStyle,class:a.editClass,modelValue:u.row[e.prop],"onUpdate:modelValue":h=>u.row[e.prop]=h},a.editAttr),{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(a.dataLists,(h,m)=>((0,t.openBlock)(),(0,t.createBlock)(s,{key:m,label:h[a.dataField.label],value:h[a.dataField.value]},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(h[a.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:1},16,["style","class","modelValue","onUpdate:modelValue"])]),_:1},16)}var Xt=y(au,[["render",nu]]);Pt.install=function(e){e.component(Pt.name,Pt)};At.install=function(e){e.component(At.name,At)};Mt.install=function(e){e.component(Mt.name,Mt)};zt.install=function(e){e.component(zt.name,zt)};Ot.install=function(e){e.component(Ot.name,Ot)};jt.install=function(e){e.component(jt.name,jt)};Rt.install=function(e){e.component(Rt.name,Rt)};Ht.install=function(e){e.component(Ht.name,Ht)};Ut.install=function(e){e.component(Ut.name,Ut)};Wt.install=function(e){e.component(Wt.name,Wt)};qt.install=function(e){e.component(qt.name,qt)};Kt.install=function(e){e.component(Kt.name,Kt)};Gt.install=function(e){e.component(Gt.name,Gt)};Yt.install=function(e){e.component(Yt.name,Yt)};Zt.install=function(e){e.component(Zt.name,Zt)};Qt.install=function(e){e.component(Qt.name,Qt)};Xt.install=function(e){e.component(Xt.name,Xt)};var lu={},ru={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"};function iu(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",ru,[...o[0]||(o[0]=[(0,t.createElementVNode)("rect",{width:"12",height:"12",rx:"2",fill:"#86909C"},null,-1),(0,t.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.98095 5.49307L8.22012 3.25389C8.28521 3.18881 8.39074 3.18881 8.45582 3.25389L8.69153 3.4896C8.75661 3.55468 8.75661 3.66021 8.69153 3.7253L6.45235 5.96447L8.69153 8.20364C8.75661 8.26873 8.75661 8.37426 8.69153 8.43934L8.45582 8.67505C8.39074 8.74013 8.28521 8.74013 8.22012 8.67505L5.98095 6.43587L3.74178 8.67505C3.67669 8.74013 3.57116 8.74013 3.50608 8.67505L3.27037 8.43934C3.20529 8.37426 3.20529 8.26873 3.27037 8.20364L5.50954 5.96447L3.27037 3.7253C3.20529 3.66021 3.20529 3.55468 3.27037 3.4896L3.50608 3.25389C3.57116 3.18881 3.67669 3.18881 3.74178 3.25389L5.98095 5.49307Z",fill:"white"},null,-1)])])}var su=y(lu,[["render",iu]]),cu={},du={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"};function uu(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",du,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00002 0.666504C12.0501 0.666504 15.3334 3.94975 15.3334 7.99984C15.3334 12.0499 12.0501 15.3332 8.00002 15.3332C3.94993 15.3332 0.666687 12.0499 0.666687 7.99984C0.666687 3.94975 3.94993 0.666504 8.00002 0.666504ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM10.6667 5.66667V7.66667H9.33333V5.66667H10.6667ZM6.66667 5.66667V7.66667H5.33333V5.66667H6.66667ZM10.0767 9.33333H11.0495C11.1804 9.33333 11.2866 9.43951 11.2866 9.57048C11.2866 9.60754 11.2779 9.64409 11.2612 9.67718L11.244 9.71053C10.6294 10.8739 9.40726 11.6667 7.99998 11.6667C6.61523 11.6667 5.40977 10.8991 4.7859 9.76612L4.73786 9.67593C4.67845 9.56052 4.72385 9.4188 4.83926 9.35939C4.87253 9.34226 4.90941 9.33333 4.94683 9.33333H5.92347C6.02396 9.33332 6.11908 9.37865 6.18238 9.4567C6.26207 9.55496 6.32833 9.62955 6.38117 9.68046C6.80074 10.0847 7.37133 10.3333 7.99998 10.3333C8.63289 10.3333 9.20694 10.0814 9.62728 9.67224C9.67791 9.62296 9.74135 9.55121 9.8176 9.45698C9.88089 9.37877 9.97611 9.33333 10.0767 9.33333Z"},null,-1)])])}var mu=y(cu,[["render",uu]]),pu={},hu={class:"comment-common-icon"};function gu(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("i",hu,[...o[0]||(o[0]=[(0,t.createElementVNode)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},[(0,t.createElementVNode)("path",{d:"M4.88933 0.613974C4.92947 0.616946 4.96831 0.629568 5.00253 0.650767C6.67348 1.68589 7.55141 3.13884 7.63632 5.00962C7.947 5.00962 8.2245 4.65999 8.46882 3.96072L8.49487 3.88447C8.53862 3.75351 8.68025 3.68282 8.8112 3.72656C8.83398 3.73417 8.85554 3.74502 8.87522 3.75878C9.96316 4.5193 10.5048 5.50231 10.5 6.70782C10.4999 6.73762 10.4982 6.76675 10.495 6.7952C10.4985 6.86294 10.5 6.93131 10.5 7.00005C10.5 9.48533 8.48528 11.5 6 11.5C3.51472 11.5 1.5 9.48533 1.5 7.00005C1.5 6.90255 1.5031 6.80578 1.50921 6.70983C1.5062 6.70917 1.5031 6.70849 1.5 6.70782C1.50864 6.60849 1.52139 6.50994 1.53824 6.41219C1.54515 6.35775 1.55321 6.30373 1.56222 6.25003L1.57017 6.24983C1.7622 5.3813 2.28426 4.57601 3.13635 3.83394C4.00892 3.07405 4.50079 2.11523 4.61198 0.957499L4.62156 0.844839C4.63175 0.707146 4.75163 0.603784 4.88933 0.613974Z"})],-1)])])}var fu=y(pu,[["render",gu]]),vu={},yu={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"};function Cu(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",yu,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M14 1.3335C14.3514 1.3335 14.6394 1.60546 14.6648 1.95041L14.6666 2.00016V14.0002C14.6666 14.3516 14.3947 14.6396 14.0497 14.665L14 14.6668H1.99998C1.64853 14.6668 1.36059 14.3949 1.33514 14.0499L1.33331 14.0002V2.00016C1.33331 1.64871 1.60527 1.36077 1.95023 1.33532L1.99998 1.3335H14ZM13.3333 2.66618H2.66664V13.3328H13.3333V2.66618ZM11.9219 6.7879C11.9719 6.83791 12 6.90574 12 6.97647V11.7993C12 11.9098 11.9104 11.9993 11.8 11.9993H6.81615C6.7975 11.9993 6.77945 11.9968 6.76232 11.992L3.91042 11.9847C3.79996 11.9844 3.71063 11.8947 3.7109 11.7842C3.71102 11.7313 3.73209 11.6807 3.76948 11.6433L6.52468 8.88807C6.62882 8.78393 6.79766 8.78393 6.9018 8.88807L8.17297 10.1593L11.5447 6.7879C11.6489 6.68376 11.8177 6.68376 11.9219 6.7879ZM5.99997 3.99951V5.99951H3.99997V3.99951H5.99997Z"},null,-1)])])}var bu=y(vu,[["render",Cu]]),ku={},wu={class:"comment-common-icon"};function _u(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("i",wu,[...o[0]||(o[0]=[(0,t.createElementVNode)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[(0,t.createElementVNode)("path",{d:"M586.624 234.624a74.624 74.624 0 1 1-149.184 0 74.624 74.624 0 0 1 149.12 0z m0 554.624a74.624 74.624 0 1 1-149.248 0 74.624 74.624 0 0 1 149.248 0zM512 586.624a74.624 74.624 0 1 0 0-149.248 74.624 74.624 0 0 0 0 149.248z",fill:"currentColor"})],-1)])])}var Vu=y(ku,[["render",_u]]),Bu={},Su={class:"comment-common-icon",style:{color:"#1e80ff"}};function Nu(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("i",Su,[...o[0]||(o[0]=[(0,t.createElementVNode)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1534"},[(0,t.createElementVNode)("path",{d:"M668.928 166.912c-20.48-53.504-47.9744-84.7872-82.0224-94.9248-33.5872-10.0352-61.952 4.096-76.032 13.9776-27.5456 19.3536-41.216 49.664-50.0224 74.1376-3.3792 9.3184-6.4512 19.0976-9.216 27.9552l-2.6624 8.3968a227.8912 227.8912 0 0 1-10.3936 27.9552c-25.344 52.9408-47.4112 84.5312-66.7648 104.96-18.944 19.968-36.4544 30.464-55.1936 39.7824a45.3632 45.3632 0 0 0-25.088 40.5504l-0.1024 480.7168c0 24.9344 20.2752 45.2096 45.2096 45.2096h423.0656c21.7088 0 38.144-6.912 50.0224-16.9984a72.192 72.192 0 0 0 14.4896-16.896l0.2048-0.2048 0.0512-0.1536 0.8192-1.024 1.2288-1.8944c39.424-63.7952 66.7648-114.688 88.2176-175.616 24.4224-69.4784 36.8128-129.6896 42.0352-176.64 5.12-45.6704 3.7888-81.664-1.5872-101.376a77.9776 77.9776 0 0 0-45.568-52.3264 116.5824 116.5824 0 0 0-45.4144-8.6016l-192.8192-2.6624c28.1088-115.0976 10.0864-181.6064-2.4576-214.3744zM64.0512 413.9008a45.2096 45.2096 0 0 1 45.1584-47.36H176.128c24.9344 0 45.2096 20.2752 45.2096 45.2096v480.6144a45.2096 45.2096 0 0 1-45.2096 45.2096h-44.288a45.2096 45.2096 0 0 1-45.1584-43.0592L64 413.952z","p-id":"1535"})],-1)])])}var Eu=y(Bu,[["render",Nu]]),xu={},$u={class:"comment-common-icon"};function Du(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("i",$u,[...o[0]||(o[0]=[(0,t.createElementVNode)("svg",{t:"1650360973068",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1168",width:"200",height:"200"},[(0,t.createElementVNode)("path",{d:"M547.968 138.88c6.656-4.672 14.08-6.976 20.48-5.056 6.08 1.792 22.848 10.752 40.192 56.128 8.576 22.4 27.264 81.536-5.632 197.504a45.44 45.44 0 0 0 42.88 57.984l217.6 3.008h0.448a53.12 53.12 0 0 1 20.096 3.328 16.256 16.256 0 0 1 5.568 3.648 14.464 14.464 0 0 1 3.264 6.4c2.176 7.808 4.608 33.984-0.256 77.248-4.672 41.984-15.936 97.408-38.784 162.368-19.136 54.336-43.52 100.48-81.472 161.792a56.384 56.384 0 0 0-1.664 2.496l-0.128 0.128-1.408 2.112a7.872 7.872 0 0 1-1.28 1.472 3.84 3.84 0 0 1-1.28 0.64 20.48 20.48 0 0 1-6.848 0.96H356.032V421.44c19.712-10.624 40.704-24.576 62.592-47.616 25.472-26.88 51.008-64.768 78.208-121.6 5.568-11.584 9.856-24.384 13.632-36.032l3.072-9.856c2.688-8.448 5.184-16.384 8.064-24.32 8.064-22.4 16.128-36.032 26.368-43.136z m120.96 27.968c-20.48-53.44-48-84.736-81.984-94.912-33.6-9.984-61.952 4.16-76.032 14.08-27.584 19.264-41.28 49.6-50.048 74.048-3.392 9.344-6.464 19.2-9.216 27.968l-2.688 8.448a227.84 227.84 0 0 1-10.432 27.904c-25.28 52.928-47.36 84.544-66.752 104.96-18.944 19.968-36.48 30.464-55.168 39.808a45.376 45.376 0 0 0-25.088 40.576l-0.064 480.64c0 24.96 20.224 45.248 45.184 45.248h423.04c21.76 0 38.144-6.912 50.048-16.96a71.808 71.808 0 0 0 14.528-16.896l0.128-0.256 0.128-0.128 0.832-0.96 1.152-1.92c39.424-63.872 66.816-114.688 88.256-175.68a810.24 810.24 0 0 0 42.048-176.64c5.12-45.632 3.776-81.664-1.6-101.376a77.952 77.952 0 0 0-45.568-52.288 116.544 116.544 0 0 0-45.44-8.64l-192.768-2.688c28.096-115.072 10.048-181.568-2.496-214.336z m-604.864 247.04a45.184 45.184 0 0 1 45.12-47.296h67.008c24.96 0 45.184 20.288 45.184 45.248v480.64c0 24.96-20.224 45.12-45.184 45.12H131.84a45.184 45.184 0 0 1-45.12-43.072l-22.656-480.64z","p-id":"1169"})],-1)])])}var Tu=y(xu,[["render",Du]]),Lu={},Iu={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""};function Fu(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",Iu,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{"data-v-d6f79dbc":"","fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99976 7.93206L10.0656 3.86619C10.1633 3.76856 10.3215 3.76856 10.4192 3.86619L10.7727 4.21975C10.8704 4.31738 10.8704 4.47567 10.7727 4.5733L6.35331 8.99272C6.15805 9.18798 5.84147 9.18798 5.6462 8.99272L1.22679 4.5733C1.12916 4.47567 1.12916 4.31738 1.22679 4.21975L1.58034 3.86619C1.67797 3.76856 1.83626 3.76856 1.93389 3.86619L5.99976 7.93206Z"},null,-1)])])}var Pu=y(Lu,[["render",Fu]]),Au={},Mu={class:"comment-common-icon"};function zu(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("i",Mu,[...o[0]||(o[0]=[(0,t.createElementVNode)("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},[(0,t.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.99951 0.5C9.03708 0.5 11.4995 2.96243 11.4995 6C11.4995 9.03757 9.03708 11.5 5.99951 11.5C2.96195 11.5 0.499512 9.03757 0.499512 6C0.499512 2.96243 2.96195 0.5 5.99951 0.5ZM6.25 3.49988C6.38807 3.49988 6.5 3.61181 6.5 3.74988V5.49988H8.25C8.38807 5.49988 8.5 5.61181 8.5 5.74988V6.24988C8.5 6.38795 8.38807 6.49988 8.25 6.49988H5.75C5.61193 6.49988 5.5 6.38795 5.5 6.24988V3.74988C5.5 3.61181 5.61193 3.49988 5.75 3.49988H6.25Z"})],-1)])])}var Ou=y(Au,[["render",zu]]),ju={},Ru={class:"comment-common-icon"};function Hu(e,o){return(0,t.openBlock)(),(0,t.createElementBlock)("i",Ru,[...o[0]||(o[0]=[(0,t.createElementVNode)("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1320",width:"200",height:"200"},[(0,t.createElementVNode)("path",{d:"M147.264 647.296V220.928c0-49.536 40.128-89.728 89.6-89.728H793.6c49.536 0 89.728 40.192 89.728 89.728v426.368c0 49.536-40.128 89.728-89.6 89.728h-145.216a47.04 47.04 0 0 0-28.16 9.408l-194.56 145.792a3.392 3.392 0 0 1-5.12-1.984l-26.752-116.672a47.04 47.04 0 0 0-45.824-36.544H236.992a89.728 89.728 0 0 1-89.728-89.728zM236.864 64A156.928 156.928 0 0 0 80 220.928l0.064 426.368a156.928 156.928 0 0 0 156.928 156.928h94.976l23.232 101.312 0.064 0.448a70.592 70.592 0 0 0 109.696 40.832l190.208-142.592H793.6a156.928 156.928 0 0 0 156.928-156.928l-0.064-426.368A156.928 156.928 0 0 0 793.536 64H236.928z m69.44 442.496a65.344 65.344 0 1 0 0-130.752 65.344 65.344 0 0 0 0 130.752z m268.8-65.344a65.344 65.344 0 1 1-130.752 0 65.344 65.344 0 0 1 130.752 0z m138.368 65.344a65.344 65.344 0 1 0 0-130.752 65.344 65.344 0 0 0 0 130.752z","p-id":"1321"})],-1)])])}var Uu=y(ju,[["render",Hu]]),Wu={class:"cv-comment-emoji"},qu={class:"face-tooltip-head select-none"},Ku=["onClick"],Gu=["src"],Yu={class:"emoji-body select-none"},Zu={style:{padding:"0 5px"}},Qu=["onClick"],Xu={class:"emoji-btn select-none"},Ju={key:0},em=Object.assign({name:"CompInputEmoji"},{__name:"input-emoji",props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:"bottom"},emits:["addEmoji"],setup(e,{emit:o}){const a=e,r=(0,t.ref)(0),n=(0,t.ref)(0),l=(0,t.ref)(new Array(2)),{emojiList:s,faceList:c}=a.emoji;function d(h){switch(r.value=h,h){case 0:n.value=0;break;case 1:n.value=-50,l.value[1]=s[1];break}}function u(){l.value[0]=s[0]}return(h,m)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",Wu,[(0,t.createVNode)((0,t.unref)(b.ElPopover),{placement:e.placement,"popper-class":"emoji-popover",width:250,trigger:"click",onBeforeEnter:u},{reference:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Xu,[h.$slots.default?(0,t.renderSlot)(h.$slots,"default",{key:1},void 0,!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",Ju,[(0,t.createVNode)((0,t.unref)(mu)),m[0]||(m[0]=(0,t.createElementVNode)("span",null,"表情",-1))]))])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",qu,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(c),(v,f)=>((0,t.openBlock)(),(0,t.createElementBlock)("label",{key:f,class:(0,t.normalizeClass)(r.value==f?"active":""),onClick:C=>d(f)},[(0,t.createElementVNode)("img",{src:v,alt:""},null,8,Gu)],10,Ku))),128))]),(0,t.createElementVNode)("div",Yu,[(0,t.createElementVNode)("div",{class:"emjio-container",style:(0,t.normalizeStyle)({transform:`translateX(${n.value}%)`})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.value,(v,f)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:f,class:"emoji-wrapper"},[(0,t.createVNode)((0,t.unref)(b.ElScrollbar),null,{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Zu,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(v,(C,p)=>((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:p,class:"emoji-item",onClick:w=>h.$emit("addEmoji",p)},[(0,t.createVNode)((0,t.unref)(b.ElImage),{src:C,title:String(p),class:"emoji",style:{width:"24px",height:"24px",margin:"5px"},lazy:""},null,8,["src","title"])],8,Qu))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,["placement"])]))}}),tm=y(em,[["__scopeId","data-v-2fb59975"]]),om={class:"cv-comment-editor"},am=["placeholder","innerHTML"],nm=["src"],lm=["onClick"],rm={key:0,class:"cv-comment-editor__action"},im={__name:"input-box",props:{placeholder:"",contentBtn:"",parentId:"",reply:""},emits:["hide","close"],setup(e,{expose:o,emit:a}){const r=e,n=(0,t.ref)(""),l=(0,t.ref)(),s=(0,t.ref)(!1),c=(0,t.ref)(!1),d=(0,t.ref)(),u=(0,t.ref)(!0),h=(0,t.ref)(),m=(0,t.ref)(),v=(0,t.ref)([]),f=(0,t.ref)([]),C=(0,t.reactive)({imgLength:0}),p={minHeight:64},w=(0,t.ref)(),V=(0,t.ref)(!1),k=(0,t.ref)(),B=(0,t.computed)(()=>p.minHeight+"px"),N=(0,t.computed)(()=>p.minHeight==30?"4px 10px":"8px 12px"),H=a,{upload:q,submit:re,focus:ae}=(0,t.inject)("InjectInputBox"),Q=(0,t.inject)("InjectionEmojiApi");(0,t.watch)(()=>n.value,R=>{V.value||(l.value=R)});function bo(){re({content:r.reply?`回复 <span style="color: var(--cv-color-success-dark-2);">@${r.reply.user.username}:</span> ${n.value}`:n.value,parentId:Ce(r.parentId,null),reply:r.reply,files:f.value,clear:()=>{K(),H("close")}})}function fe(R){he(n.value)&&!C.imgLength&&(c.value=!1,H("hide",R))}function ko(R){V.value=!0,s.value=!0,c.value=!0,(0,t.nextTick)(()=>{h.value=document.querySelector("div[id^='el-popper-container']")}),ae()}function wo(R){w.value=window.getSelection()?.getRangeAt(0),d.value?.innerHTML||(s.value=!1),V.value=!1}function ee(R){const{innerHTML:z}=R?.target||R;n.value=z||"",he(n.value.replace(/&nbsp;|<br>| /g,""))?u.value=!0:u.value=!1}function we(R){let z=window.getSelection();z&&(z.removeAllRanges(),w.value||(ve(),w.value=z.getRangeAt(0)),w.value.deleteContents(),w.value.insertNode(w.value.createContextualFragment(R)),w.value.collapse(!1),z.addRange(w.value),n.value=d?.value?.innerHTML||"",he(n.value.replace(/&nbsp;|<br>| /g,""))?u.value=!0:u.value=!1)}function _e(){d.value&&(d.value.innerHTML="",n.value=d.value.innerHTML,s.value=!1)}function ve(){(0,t.nextTick)(()=>{d.value?.focus()})}function ne(R){R.ctrlKey&&R.key=="Enter"&&(he(n.value.replace(/&nbsp;|<br>| /g,""))?(0,b.ElMessage)({message:"内容不能为空",type:"info"}):bo())}function _o(R){v.value.length=0,f.value.length=0;const z=m.value?.files;if(C.imgLength=Ce(z?.length,0),z)for(let G=0;G<z.length;G++){let se=z[G].name,Ve=Ur(z[G]);f.value.push(z[G]),zr(se)?v.value.push(Ve):(0,b.ElMessage)({type:"warn",message:"请选择图片类型文件!",duration:2500})}}function K(){_e(),v.value.length=0,f.value=[],u.value=!0}function ie(R){v?.value?.splice(R,1)}return(0,t.onMounted)(()=>{d.value?.addEventListener("keyup",R=>{const z=R.target;z.innerHTML=="<br>"&&(z.innerHTML="")})}),o({focus:()=>ve()}),(R,z)=>(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",om,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["cv-comment-editor__box",{active:s.value,"input-active":c.value}])},[(0,t.createElementVNode)("div",{ref_key:"editorRef",ref:d,class:"rich-input",contenteditable:"true",placeholder:r.placeholder,onFocus:ko,onInput:ee,onBlur:wo,onKeydown:(0,t.withKeys)(ne,["enter"]),innerHTML:l.value,style:(0,t.normalizeStyle)({minHeight:B.value,padding:N.value})},null,44,am),(0,t.createElementVNode)("div",{ref_key:"imageRef",ref:k,class:"image-preview-box"},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(v.value,(G,se)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:se,class:"image-preview"},[(0,t.createElementVNode)("img",{src:G,alt:""},null,8,nm),(0,t.createElementVNode)("div",{class:"clean-btn",onClick:Ve=>ie(se)},[(0,t.createVNode)((0,t.unref)(su))],8,lm)]))),128))],512)],2),(0,t.createVNode)(t.Transition,{name:"fade"},{default:(0,t.withCtx)(()=>[c.value?((0,t.openBlock)(),(0,t.createElementBlock)("div",rm,[(0,t.createElementVNode)("div",null,[(0,t.createVNode)(tm,{emoji:(0,t.unref)(Q),onAddEmoji:z[0]||(z[0]=G=>we(G))},null,8,["emoji"]),(0,t.createElementVNode)("div",{class:"picture",onClick:z[1]||(z[1]=(...G)=>m.value?.click&&m.value?.click(...G))},[(0,t.createVNode)((0,t.unref)(bu)),z[2]||(z[2]=(0,t.createElementVNode)("span",null,"图片",-1)),(0,t.createElementVNode)("input",{id:"comment-upload",ref_key:"inputRef",ref:m,type:"file",multiple:"",onChange:_o},null,544)])]),(0,t.createElementVNode)("div",null,[z[3]||(z[3]=(0,t.createElementVNode)("span",{style:{"margin-right":"10px"}},[(0,t.createTextVNode)(" 文明上网理性发言,请遵守 "),(0,t.createElementVNode)("a",{href:"###",target:"_blank"},"《新闻评论服务协议》")],-1)),(0,t.createVNode)((0,t.unref)(b.ElButton),{type:"primary",disabled:u.value,onClick:bo},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(r.contentBtn),1)]),_:1},8,["disabled"])])])):(0,t.createCommentVNode)("",!0)]),_:1})])),[[(0,t.unref)(b.ClickOutside),fe,h.value]])}},Za=y(im,[["__scopeId","data-v-e3fd437e"]]),sm={class:"u-fold"},cm={class:"action-box select-none"},dm=Object.assign({name:"UFold"},{__name:"fold",props:{line:{type:[Number,String],default:5}},setup(e){(0,t.useCssVars)(c=>({v15491e60:a.value}));const o=e,a=(0,t.computed)(()=>{let c=Math.trunc(Number(o.line));return c>0?c:1}),r=(0,t.ref)(!0),n=(0,t.ref)(!1),l=(0,t.ref)();let s;return(0,t.onMounted)(()=>{s=new ResizeObserver(c=>{r.value&&l.value&&(n.value=l.value.offsetHeight<l.value.scrollHeight)}),s.observe(l.value)}),(0,t.onUnmounted)(()=>{s.disconnect()}),(c,d)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",sm,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["txt-box",{"over-hidden":r.value}])},[(0,t.createElementVNode)("div",{ref_key:"divBox",ref:l},[(0,t.renderSlot)(c.$slots,"default",{},void 0,!0)],512)],2),(0,t.createElementVNode)("div",cm,[n.value&&c.unfold?((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:0,class:"expand-btn",onClick:d[0]||(d[0]=u=>r.value=!r.value)},(0,t.toDisplayString)(r.value?"展开":"收起"),1)):(0,t.createCommentVNode)("",!0)])]))}}),um=y(dm,[["__scopeId","data-v-94334818"]]),mm={__name:"user-card",props:{uid:""},setup(e){const o=(0,t.ref)({}),{showInfo:a}=(0,t.inject)("InjectContentBox"),r=(0,t.inject)("InjectSlots"),n=()=>(0,t.h)("div",r.card(o.value));return(l,s)=>(0,t.unref)(r).card?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(b.ElPopover),{key:0,placement:"top",width:300,"show-after":300,onBeforeEnter:s[0]||(s[0]=()=>(0,t.unref)(a)(e.uid,c=>o.value=c))},{reference:(0,t.withCtx)(()=>[(0,t.renderSlot)(l.$slots,"default")]),default:(0,t.withCtx)(()=>[(0,t.createVNode)(n)]),_:3})):(0,t.renderSlot)(l.$slots,"default",{key:1})}},Ba=mm;function pm(e,o){return(0,t.getCurrentScope)()?((0,t.onScopeDispose)(e,o),!0):!1}var ke=typeof window<"u"&&typeof document<"u",o1=typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope,hm=Object.prototype.toString,gm=e=>hm.call(e)==="[object Object]";function fm(e){let o;function a(){return o||(o=e()),o}return a.reset=async()=>{const r=o;o=void 0,r&&await r},a}function zo(e){return Array.isArray(e)?e:[e]}function Qa(e){const o=Object.create(null);return(a=>o[a]||(o[a]=e(a)))}var vm=/\B([A-Z])/g,a1=Qa(e=>e.replace(vm,"-$1").toLowerCase()),ym=/-(\w)/g,n1=Qa(e=>e.replace(ym,(o,a)=>a?a.toUpperCase():""));function Cm(e,o,a={}){const{immediate:r=!0,immediateCallback:n=!1}=a,l=(0,t.shallowRef)(!1);let s;function c(){s&&(clearTimeout(s),s=void 0)}function d(){l.value=!1,c()}function u(...h){n&&e(),c(),l.value=!0,s=setTimeout(()=>{l.value=!1,s=void 0,e(...h)},(0,t.toValue)(o))}return r&&(l.value=!0,ke&&u()),pm(d),{isPending:(0,t.shallowReadonly)(l),start:u,stop:d}}function bm(e,o,a){return(0,t.watch)(e,o,{...a,immediate:!0})}var km=ke?window:void 0,l1=ke?window.document:void 0,Xa=ke?window.navigator:void 0,r1=ke?window.location:void 0;function wm(e){var o;const a=(0,t.toValue)(e);return(o=a?.$el)!==null&&o!==void 0?o:a}function Ja(...e){const o=(r,n,l,s)=>(r.addEventListener(n,l,s),()=>r.removeEventListener(n,l,s)),a=(0,t.computed)(()=>{const r=zo((0,t.toValue)(e[0])).filter(n=>n!=null);return r.every(n=>typeof n!="string")?r:void 0});return bm(()=>{var r,n;return[(r=(n=a.value)===null||n===void 0?void 0:n.map(l=>wm(l)))!==null&&r!==void 0?r:[km].filter(l=>l!=null),zo((0,t.toValue)(a.value?e[1]:e[0])),zo((0,t.unref)(a.value?e[2]:e[1])),(0,t.toValue)(a.value?e[3]:e[2])]},([r,n,l,s],c,d)=>{if(!r?.length||!n?.length||!l?.length)return;const u=gm(s)?{...s}:s,h=r.flatMap(m=>n.flatMap(v=>l.map(f=>o(m,v,f,u))));d(()=>{h.forEach(m=>m())})},{flush:"post"})}function _m(){const e=(0,t.shallowRef)(!1),o=(0,t.getCurrentInstance)();return o&&(0,t.onMounted)(()=>{e.value=!0},o),e}function en(e){const o=_m();return(0,t.computed)(()=>(o.value,!!e()))}function Sa(e,o={}){const{controls:a=!1,navigator:r=Xa}=o,n=en(()=>r&&"permissions"in r),l=(0,t.shallowRef)(),s=typeof e=="string"?{name:e}:e,c=(0,t.shallowRef)(),d=()=>{var h,m;c.value=(h=(m=l.value)===null||m===void 0?void 0:m.state)!==null&&h!==void 0?h:"prompt"};Ja(l,"change",d,{passive:!0});const u=fm(async()=>{if(n.value){if(!l.value)try{l.value=await r.permissions.query(s)}catch{l.value=void 0}finally{d()}if(a)return(0,t.toRaw)(l.value)}});return u(),a?{state:c,isSupported:n,query:u}:c}function Vm(e={}){const{navigator:o=Xa,read:a=!1,source:r,copiedDuring:n=1500,legacy:l=!1}=e,s=en(()=>o&&"clipboard"in o),c=Sa("clipboard-read"),d=Sa("clipboard-write"),u=(0,t.computed)(()=>s.value||l),h=(0,t.shallowRef)(""),m=(0,t.shallowRef)(!1),v=Cm(()=>m.value=!1,n,{immediate:!1});async function f(){let k=!(s.value&&V(c.value));if(!k)try{h.value=await o.clipboard.readText()}catch{k=!0}k&&(h.value=w())}u.value&&a&&Ja(["copy","cut"],f,{passive:!0});async function C(k=(0,t.toValue)(r)){if(u.value&&k!=null){let B=!(s.value&&V(d.value));if(!B)try{await o.clipboard.writeText(k)}catch{B=!0}B&&p(k),h.value=k,m.value=!0,v.start()}}function p(k){const B=document.createElement("textarea");B.value=k,B.style.position="absolute",B.style.opacity="0",B.setAttribute("readonly",""),document.body.appendChild(B),B.select(),document.execCommand("copy"),B.remove()}function w(){var k,B,N;return(k=(B=document)===null||B===void 0||(N=B.getSelection)===null||N===void 0||(N=N.call(B))===null||N===void 0?void 0:N.toString())!==null&&k!==void 0?k:""}function V(k){return k==="granted"||k==="prompt"}return{isSupported:u,text:(0,t.readonly)(h),copied:(0,t.readonly)(m),copy:C}}var i1=[{max:6e4,value:1e3,name:"second"},{max:276e4,value:6e4,name:"minute"},{max:72e6,value:36e5,name:"hour"},{max:5184e5,value:864e5,name:"day"},{max:24192e5,value:6048e5,name:"week"},{max:28512e6,value:2592e6,name:"month"},{max:Number.POSITIVE_INFINITY,value:31536e6,name:"year"}],Bm={class:"comment-list-actbox__right"},Sm={class:"operation-warp"},Nm={class:"dialog-footer"},Em={__name:"comment-operate",props:{data:{type:[Object],default:()=>({})}},setup(e){const{copy:o}=Vm(),a=(0,t.ref)(!1),r=(0,t.ref)({report_type:"",report_content:""}),n=e;function l(){let c=n.data||{};a.value=!1,(0,b.ElMessage)({type:"info",message:"举报成功: "+c.id})}function s(c){let d=n.data||{};switch(c){case"remove":setTimeout(()=>{commentRef.value?.remove(d)},200);break;case"report":a.value=!0;break;case"copy":o(d.content),(0,b.ElMessage)({type:"info",message:"复制成功"})}}return(c,d)=>{const u=(0,t.resolveComponent)("el-dropdown-item"),h=(0,t.resolveComponent)("el-dropdown-menu"),m=(0,t.resolveComponent)("el-dropdown"),v=(0,t.resolveComponent)("el-radio"),f=(0,t.resolveComponent)("el-radio-group"),C=(0,t.resolveComponent)("el-form-item"),p=(0,t.resolveComponent)("el-input"),w=(0,t.resolveComponent)("el-form"),V=(0,t.resolveComponent)("el-button"),k=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Bm,[(0,t.createVNode)(m,{trigger:"click",onCommand:d[0]||(d[0]=B=>s(B))},{dropdown:(0,t.withCtx)(()=>[(0,t.createVNode)(h,null,{default:(0,t.withCtx)(()=>[(0,t.createVNode)(u,{command:"report"},{default:(0,t.withCtx)(()=>[...d[5]||(d[5]=[(0,t.createTextVNode)("举报",-1)])]),_:1}),(0,t.createVNode)(u,{command:"remove"},{default:(0,t.withCtx)(()=>[...d[6]||(d[6]=[(0,t.createTextVNode)("删除",-1)])]),_:1}),(0,t.createVNode)(u,{divided:"",command:"copy"},{default:(0,t.withCtx)(()=>[...d[7]||(d[7]=[(0,t.createTextVNode)("复制",-1)])]),_:1})]),_:1})]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Sm,[(0,t.createVNode)((0,t.unref)(Vu))])]),_:1}),(0,t.createVNode)(k,{title:"举报",modelValue:a.value,"onUpdate:modelValue":d[4]||(d[4]=B=>a.value=B),width:"400px",style:{width:"90%","max-width":"400px"}},{footer:(0,t.withCtx)(()=>[(0,t.createElementVNode)("span",Nm,[(0,t.createVNode)(V,{onClick:d[3]||(d[3]=B=>a.value=!1)},{default:(0,t.withCtx)(()=>[...d[13]||(d[13]=[(0,t.createTextVNode)("取消",-1)])]),_:1}),(0,t.createVNode)(V,{type:"primary",onClick:l},{default:(0,t.withCtx)(()=>[...d[14]||(d[14]=[(0,t.createTextVNode)("提交",-1)])]),_:1})])]),default:(0,t.withCtx)(()=>[(0,t.createVNode)(w,{"label-position":"top"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(C,{label:"您为什么要举报此信息?"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(f,{modelValue:r.value.report_type,"onUpdate:modelValue":d[1]||(d[1]=B=>r.value.report_type=B)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(v,{value:"色情淫秽"},{default:(0,t.withCtx)(()=>[...d[8]||(d[8]=[(0,t.createTextVNode)("色情淫秽",-1)])]),_:1}),(0,t.createVNode)(v,{value:"骚扰谩骂"},{default:(0,t.withCtx)(()=>[...d[9]||(d[9]=[(0,t.createTextVNode)("骚扰谩骂",-1)])]),_:1}),(0,t.createVNode)(v,{value:"广告欺诈"},{default:(0,t.withCtx)(()=>[...d[10]||(d[10]=[(0,t.createTextVNode)("广告欺诈",-1)])]),_:1}),(0,t.createVNode)(v,{value:"反动"},{default:(0,t.withCtx)(()=>[...d[11]||(d[11]=[(0,t.createTextVNode)("反动",-1)])]),_:1}),(0,t.createVNode)(v,{value:"其他"},{default:(0,t.withCtx)(()=>[...d[12]||(d[12]=[(0,t.createTextVNode)("其他",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),(0,t.createVNode)(C,{label:"举报说明(可选):"},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(p,{type:"textarea",modelValue:r.value.report_content,"onUpdate:modelValue":d[2]||(d[2]=B=>r.value.report_content=B),maxlength:"200",placeholder:"描述恶意行为",rows:"3"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}},xm=Em,$m={class:"comment-sub"},Dm=["href"],Tm={class:"comment-primary"},Lm={class:"comment-main"},Im={key:1,class:"user-info"},Fm=["href"],Pm={class:"username"},Am={class:"name",style:{"max-width":"10em"}},Mm={blank:"true",class:"rank"},zm=["innerHTML"],Om={class:"address",style:{color:"#939393","font-size":"12px"}},jm={class:"time"},Rm={class:"content"},Hm=["innerHTML"],Um={class:"imgbox",style:{display:"flex"}},Wm={class:"comment-list-actbox select-none"},qm={class:"comment-list-actbox__left"},Km={key:2},Gm={class:"comment-list-actbox__right"},Ym={key:2},Zm={__name:"content-box",props:{reply:{type:[Boolean],default:!1},data:{type:[Object],default:()=>({})},id:{type:[String],default:""}},setup(e){const o=e,a=(0,t.reactive)({active:!1}),r=(0,t.ref)(),n=(0,t.ref)(),l=(0,t.computed)(()=>{let V=o.data.contentImg;return he(V)?[]:V?.split("||")}),{allEmoji:s}=(0,t.inject)("InjectionEmojiApi"),{like:c,user:d,relativeTime:u}=(0,t.inject)("InjectContentBox");function h(){a.active=!a.active,a.active&&(0,t.nextTick)(()=>{r.value?.focus()})}function m(V){const k=V.target;n.value?.contains(k)||(a.active=!1)}const v=(0,t.inject)("InjectSlots"),f=()=>(0,t.h)("div",v.info(o.data)),C=(V,k)=>(k=k.replace(/\[.+?\]/g,B=>{const N=V[B];return N?['<img src="',N,'" width="20" height="20" alt="',B,'" title="',B,'" style="margin: 0 1px; vertical-align: text-bottom"',"/>"].join(""):B}),k),p=(0,t.computed)(()=>C(s,o.data.content)),w=V=>{switch(V){case 1:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="831"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#8CDBF4" p-id="832"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="833"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m950.857143-365.714285l73.142857-73.142858v146.285715h-73.142857z m73.142857-73.142858h146.285715v146.285715h-146.285715z m0 146.285715h146.285715v438.857143h-146.285715z" fill="#FFFFFF"></path></svg>';case 2:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="765"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#6ECEFF" p-id="766"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="767"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m877.714286-438.857143h365.714286v146.285715h-365.714286z m219.428572 146.285715h146.285714v146.285714h-146.285714z m-219.428572 292.571428V512h146.285714v146.285714z" fill="#FFFFFF" p-id="768"></path><path d="M1097.142857 585.142857V438.857143h365.714286v146.285714z m0 73.142857h365.714286v146.285715h-365.714286z" fill="#FFFFFF"></path></svg>';case 3:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="799"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#599DFF" p-id="800"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="801"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m877.714286-438.857143h365.714286v146.285715h-365.714286z m219.428572 146.285715h146.285714v73.142857h-146.285714z m0 219.428571h146.285714v73.142857h-146.285714z m-146.285715-146.285714h292.571429v146.285714h-292.571429z m-73.142857 219.428571h365.714286v146.285715h-365.714286z" fill="#FFFFFF"></path></svg>';case 4:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="815"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#34D19B" p-id="816"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="817"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m975.213715-365.714285L1243.428571 219.428571v219.428572h-146.285714zM1097.142857 438.857143h146.285714v292.571428h-146.285714z m146.285714 146.285714h73.142858v146.285714h-73.142858z m0-365.714286h73.142858v146.285715h-73.142858z m73.142858 0h146.285714v585.142858h-146.285714z" fill="#FFFFFF"></path></svg>';case 5:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="782"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#FFA000" p-id="783"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="784"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m1097.142858-73.142857h146.285714v219.428572h-146.285714z m-219.428572-365.714286h365.714286v146.285715h-365.714286z m0 438.857143h219.428572v146.285715h-219.428572z m73.142857-219.428571h219.428572v146.285714h-219.428572z" fill="#FFFFFF" p-id="785"></path><path d="M1316.571429 438.857143h146.285714v146.285714h-146.285714z m-219.428572-73.142857h146.285714v219.428571h-146.285714z" fill="#FFFFFF"></path></svg>';case 6:return'<svg viewBox="0 0 1682 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="748"><path d="M219.428571 73.142857h1243.428572a146.285714 146.285714 0 0 1 146.285714 146.285714v585.142858a146.285714 146.285714 0 0 1-146.285714 146.285714H219.428571a146.285714 146.285714 0 0 1-146.285714-146.285714V219.428571a146.285714 146.285714 0 0 1 146.285714-146.285714z" fill="#F36262" p-id="749"></path><path d="M219.428571 292.571429h146.285715v512H219.428571z m365.714286 146.285714h146.285714l146.285715 365.714286h-146.285715z" fill="#FFFFFF" p-id="750"></path><path d="M1024 438.857143h-146.285714l-146.285715 365.714286h146.285715zM219.428571 658.285714h365.714286v146.285715H219.428571z m1097.142858-146.285714h146.285714v292.571429h-146.285714z m-73.142858-292.571429h146.285715v146.285715h-146.285715z m-146.285714 146.285715h146.285714v438.857143h-146.285714z" fill="#FFFFFF" p-id="751"></path><path d="M1243.428571 438.857143h219.428572v146.285714h-219.428572z m-48.786285-170.642286L1243.428571 219.428571v146.285715h-146.285714zM1243.428571 658.285714h146.285715v146.285715h-146.285715z" fill="#FFFFFF"></path></svg>';default:return""}};return(V,k)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["comment",{reply:o.reply}])},[(0,t.createElementVNode)("div",$m,[(0,t.createVNode)(Ba,{uid:(0,t.unref)(le)(e.data.uid)},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("a",{href:e.data.user.homeLink,target:"_blank",class:"no-underline",style:{display:"block"}},[(0,t.createVNode)((0,t.unref)(b.ElAvatar),{style:{"margin-top":"5px"},size:40,fit:"cover",src:e.data.user.avatar},{default:(0,t.withCtx)(()=>[...k[2]||(k[2]=[(0,t.createElementVNode)("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])]),_:1},8,["src"])],8,Dm)]),_:1},8,["uid"])]),(0,t.createElementVNode)("div",Tm,[(0,t.createElementVNode)("div",Lm,[(0,t.unref)(v).info?((0,t.openBlock)(),(0,t.createBlock)(f,{key:0})):((0,t.openBlock)(),(0,t.createElementBlock)("div",Im,[(0,t.createVNode)(Ba,{uid:(0,t.unref)(le)(e.data.uid)},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("a",{href:e.data.user.homeLink,target:"_blank",class:"no-underline",style:{display:"block"}},[(0,t.createElementVNode)("div",Pm,[(0,t.createElementVNode)("span",Am,(0,t.toDisplayString)(e.data.user.username),1),(0,t.createElementVNode)("span",Mm,[(0,t.createElementVNode)("i",{class:"comment-common-icon",style:{"font-size":"24px"},innerHTML:w(e.data.user.level)},null,8,zm)])])],8,Fm)]),_:1},8,["uid"]),(0,t.createElementVNode)("span",Om,"  "+(0,t.toDisplayString)(e.data.address),1),(0,t.createElementVNode)("time",jm,(0,t.toDisplayString)((0,t.unref)(u)?(0,t.unref)(Mr)(e.data.createTime):e.data.createTime),1)])),(0,t.createElementVNode)("div",Rm,[(0,t.createVNode)(um,{unfold:""},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",{innerHTML:p.value},null,8,Hm),(0,t.createElementVNode)("div",Um,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.value,(B,N)=>((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(b.ElImage),{key:N,src:B,style:{height:"72px",padding:"8px 4px"},lazy:"","preview-src-list":l.value,"initial-index":N},null,8,["src","preview-src-list","initial-index"]))),128))])]),_:1})]),(0,t.createElementVNode)("div",Wm,[(0,t.createElementVNode)("div",qm,[(0,t.createElementVNode)("div",{"data-tip":"点赞",class:"item",onClick:k[0]||(k[0]=B=>(0,t.unref)(c)((0,t.unref)(le)(e.data.id)))},[(0,t.unref)(d).likeIds.map(String).indexOf((0,t.unref)(le)(e.data.id))==-1?((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Tu),{key:0})):((0,t.openBlock)(),(0,t.createBlock)((0,t.unref)(Eu),{key:1})),e.data.likes!=0?((0,t.openBlock)(),(0,t.createElementBlock)("span",Km,(0,t.toDisplayString)(e.data.likes),1)):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("div",{"data-tip":"回复",ref_key:"btnRef",ref:n,class:(0,t.normalizeClass)(["item",{active:a.active}]),onClick:h},[(0,t.createVNode)((0,t.unref)(Uu)),(0,t.createElementVNode)("span",null,(0,t.toDisplayString)(a.active?"取消回复":"回复"),1)],2)]),(0,t.createElementVNode)("div",Gm,[(0,t.renderSlot)(V.$slots,"operate",{},()=>[(0,t.createVNode)(xm,{data:o.data},null,8,["data"])],!0)])]),a.active?((0,t.openBlock)(),(0,t.createElementBlock)("div",Ym,[(0,t.createVNode)(Za,{ref_key:"commentRef",ref:r,"parent-id":(0,t.unref)(le)(e.id),placeholder:`回复 @${e.data.user.username}...`,reply:e.data,"content-btn":"发布",style:{"margin-top":"12px"},onHide:m,onClose:k[1]||(k[1]=B=>a.active=!1)},null,8,["parent-id","placeholder","reply"])])):(0,t.createCommentVNode)("",!0)]),(0,t.renderSlot)(V.$slots,"default",{},void 0,!0)])],2))}},tn=y(Zm,[["__scopeId","data-v-cfe79df7"]]),Qm={key:0,class:"reply-box"},Xm={class:"reply-list"},Jm={key:0,class:"fetch-more"},ep={key:0},tp={key:1},op={key:0},ap={key:1,class:"fetch-more"},np={__name:"reply-box",props:{data:{type:[Array,Object],default:()=>null},id:{type:[String],default:""}},setup(e){const o=e,a=(0,t.reactive)({loading:!1,over:!1,pageNum:1,pageSize:5}),{replyPage:r,replyShowSize:n,comments:l,page:s}=(0,t.inject)("InjectReplyBox"),c=(0,t.computed)(()=>{let v={total:0,length:0,list:[]};if(o.data){let f=o.data.list.length;v={total:o.data.total,length:f,list:o.data.list}}if(!a.over){let f=v.list.slice(0,n);v.list=f}return s&&(v.list=v.list.slice(0,5)),v}),d=()=>{a.over=!0},u=v=>{l.value.forEach(f=>{f.id==o.id&&f.reply&&(f.reply=v)})},h=v=>{a.pageNum=v,r(o.id,v,a.pageSize,f=>u(f))},m=v=>{a.pageSize=v,r(o.id,a.pageNum,v,f=>u(f))};return(v,f)=>c.value.length>0?((0,t.openBlock)(),(0,t.createElementBlock)("div",Qm,[(0,t.createElementVNode)("div",Xm,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(c.value.list,(C,p)=>((0,t.openBlock)(),(0,t.createBlock)(tn,{id:e.id,key:p,data:C,reply:""},null,8,["id","data"]))),128)),c.value.length>(0,t.unref)(n)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Jm,[a.loading?((0,t.openBlock)(),(0,t.createElementBlock)("span",ep,"加载中...")):((0,t.openBlock)(),(0,t.createElementBlock)("div",tp,[a.over?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",op,[(0,t.createTextVNode)(" 共"+(0,t.toDisplayString)(c.value.total)+"条回复, ",1),(0,t.createElementVNode)("span",{class:"fetch-more-comment select-none",onClick:d},[f[0]||(f[0]=(0,t.createTextVNode)(" 点击查看 ",-1)),(0,t.createVNode)((0,t.unref)(Pu))])]))]))])):(0,t.createCommentVNode)("",!0),a.over&&(0,t.unref)(s)?((0,t.openBlock)(),(0,t.createElementBlock)("div",ap,[(0,t.createVNode)((0,t.unref)(b.ElPagination),{small:"","hide-on-single-page":"",layout:"total, prev, pager, next",total:c.value.total,"page-size":a.pageSize,onCurrentChange:h,onSizeChange:m},null,8,["total","page-size"])])):(0,t.createCommentVNode)("",!0)])])):(0,t.createCommentVNode)("",!0)}},lp=y(np,[["__scopeId","data-v-16e0a50b"]]),rp={key:0,class:"comment-list"},ip={__name:"comment-list",props:{data:{type:[Array,Object],default:()=>[]},total:{type:[Number],default:0},showSize:{type:[Number],default:0}},setup(e){return(o,a)=>e.data?((0,t.openBlock)(),(0,t.createElementBlock)("div",rp,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.data,(r,n)=>((0,t.openBlock)(),(0,t.createBlock)(tn,{id:(0,t.unref)(le)(r.id),key:n,data:r},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(lp,{id:(0,t.unref)(le)(r.id),data:r.reply},null,8,["id","data"])]),_:2},1032,["id","data"]))),128))])):(0,t.createCommentVNode)("",!0)}},sp=ip,cp={class:"cv-comment-base"},dp={class:"cv-comment-form"},up={class:"cv-comment-form__content"},mp={class:"cv-comment-form__avatar"},pp={class:"cv-comment-list-wrapper"},hp=Object.assign({name:"cvCommentBase"},{__name:"comment",props:{config:{},page:!1,upload:!1,relativeTime:!1},emits:["submit","like","replyPage","showInfo","focus"],setup(e,{expose:o,emit:a}){const r=e,{user:n,comments:l,showSize:s,replyShowSize:c,total:d}=(0,t.toRefs)(r.config),u=a,h=({content:C,parentId:p,reply:w,files:V,clear:k})=>{u("submit",{content:C,parentId:p,reply:w,files:V,finish:N=>{if(k(),p){let H=l.value.find(q=>q.id==p);if(H){let q=H.reply;q?(q.list.unshift(N),q.total++):H.reply={total:1,list:[N]}}}else l.value.unshift(N)}})};(0,t.provide)("InjectInputBox",{upload:r.upload,submit:h,focus:()=>u("focus")});const m=(C,p)=>{let w=null;l.value.forEach(V=>{V.id==C?w=V:w=V.reply?.list.find(k=>k.id==C),w&&(w.likes+=p)})},v=C=>{const p=r.config.user.likeIds;u("like",C,()=>{if(p.findIndex(w=>w==C)==-1)p.push(C),m(C,1);else{let w=p.findIndex(V=>V==C);w!=-1&&(p.splice(w,1),m(C,-1))}})};(0,t.provide)("InjectContentBox",{user:n,like:v,relativeTime:Ce(r.relativeTime,!1),showInfo:(C,p)=>u("showInfo",C,p)}),(0,t.provide)("InjectReplyBox",{page:r.page,replyPage:(C,p,w,V)=>{u("replyPage",{parentId:C,pageNum:p,pageSize:w,finish:V})},replyShowSize:Ce(c,3),comments:l});const f=C=>{const{parentId:p,id:w}=C;if(p){let V=l.value.find(k=>k.id==p)?.reply;if(V){let k=V.list.findIndex(B=>B.id==w);k!=-1&&(V.list.splice(k,1),V.total--)}}else{let V=l.value.findIndex(k=>k.id==w);V!=-1&&l.value.splice(V,1)}};return(0,t.provide)("InjectionEmojiApi",r.config.emoji),(0,t.provide)("InjectSlots",(0,t.useSlots)()),o({remove:f}),(C,p)=>{const w=(0,t.resolveComponent)("el-avatar");return(0,t.openBlock)(),(0,t.createElementBlock)("div",cp,[(0,t.createElementVNode)("div",dp,[p[1]||(p[1]=(0,t.createElementVNode)("div",{class:"cv-comment-form__header"},[(0,t.createElementVNode)("span",{class:"cv-comment-form__hdtitle"},"评论")],-1)),(0,t.createElementVNode)("div",up,[(0,t.createElementVNode)("div",mp,[(0,t.createVNode)(w,{size:40,src:e.config.user.avatar},{default:(0,t.withCtx)(()=>[...p[0]||(p[0]=[(0,t.createElementVNode)("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])]),_:1},8,["src"])]),(0,t.createVNode)(Za,{placeholder:"输入评论(Enter换行,Ctrl + Enter发送)","content-btn":"发表评论"})])]),(0,t.renderSlot)(C.$slots,"default",{},()=>[p[2]||(p[2]=(0,t.createElementVNode)("div",{class:"title"},"全部评论",-1))]),(0,t.createElementVNode)("div",pp,[(0,t.createVNode)(sp,{data:(0,t.unref)(l),total:(0,t.unref)(d),"show-size":(0,t.unref)(Ce)((0,t.unref)(s),5)},null,8,["data","total","show-size"])])])}}}),Jt=hp,gp={class:"comment-scroll"},fp=["infinite-scroll-disabled"],vp={class:"scroll-btn"},yp={key:1},Cp={key:2},bp=Object.assign({name:"cvCommentScroll"},{__name:"comment-scroll",props:{disable:{type:[Boolean],default:!1},show:{type:[Boolean],default:!1}},emits:["more"],setup(e,{emit:o}){const a=e,r=(0,t.ref)(!1),n=(0,t.ref)(!1),l=o,s=(0,t.computed)(()=>n.value&&a.disable),c=(0,t.computed)(()=>!n.value||r.value||s.value),d=ja(()=>{l("more"),r.value=!1},500),u=()=>{r.value=!0,d()};return(h,m)=>{const v=(0,t.resolveComponent)("el-link"),f=(0,t.resolveDirective)("infinite-scroll");return(0,t.openBlock)(),(0,t.createElementBlock)("div",gp,[(0,t.withDirectives)(((0,t.openBlock)(),(0,t.createElementBlock)("div",{"infinite-scroll-disabled":c.value,"infinite-scroll-distance":"2"},[(0,t.renderSlot)(h.$slots,"default"),(0,t.createElementVNode)("div",vp,[n.value?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createBlock)(v,{key:0,type:"primary",underline:"never",onClick:m[0]||(m[0]=C=>n.value=!n.value)},{default:(0,t.withCtx)(()=>[...m[1]||(m[1]=[(0,t.createTextVNode)("加载更多",-1)])]),_:1})),r.value?((0,t.openBlock)(),(0,t.createElementBlock)("p",yp,"加载中...")):(0,t.createCommentVNode)("",!0),s.value?((0,t.openBlock)(),(0,t.createElementBlock)("p",Cp,"没有更多了")):(0,t.createCommentVNode)("",!0)])],8,fp)),[[f,u]])])}}}),eo=bp,kp={class:"cv-comment-nav-wrap"},wp={class:"cv-comment-nav__sort"},_p=Object.assign({name:"cvCommentNav"},{__name:"comment-nav",props:{modelValue:!1},emits:["update:modelValue","sorted"],setup(e,{emit:o}){const a=e,r=o,n=(0,t.computed)({get(){return a.modelValue},set(l){r("update:modelValue",l),r("sorted",l)}});return(l,s)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",kp,[s[4]||(s[4]=(0,t.createElementVNode)("span",{class:"cv-comment-nav__title"},"全部评论",-1)),(0,t.createElementVNode)("div",wp,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["item select-none",{active:n.value}]),onClick:s[0]||(s[0]=c=>n.value=!0)},[(0,t.createVNode)((0,t.unref)(Ou)),s[2]||(s[2]=(0,t.createTextVNode)(" 最新 ",-1))],2),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["item select-none",{active:!n.value}]),onClick:s[1]||(s[1]=c=>n.value=!1)},[(0,t.createVNode)((0,t.unref)(fu)),s[3]||(s[3]=(0,t.createTextVNode)(" 最热 ",-1))],2)])]))}}),to=_p;Jt.install=function(e){e.component(Jt.name,Jt)};eo.install=function(e){e.component(eo.name,eo)};to.install=function(e){e.component(to.name,to)};var Vp={name:"cvIcons",props:{...b.ElIcon.prop,type:{type:[String],default:""},size:{type:[String,Number],default:12},name:{type:[String],default:""}},data(){return{}},computed:{style(){return{fontSize:isNaN(Number(this.size))?this.size+"px":this.size,color:props.color}}},created(){},methods:{}},Bp={key:0,"aria-hidden":"true"},Sp=["xlink:href"];function Np(e,o,a,r,n,l){const s=(0,t.resolveComponent)("el-icon");return(0,t.openBlock)(),(0,t.createBlock)(s,(0,t.normalizeProps)((0,t.guardReactiveProps)(e.$props)),{default:(0,t.withCtx)(()=>[(0,t.renderSlot)(e.$slots,"default",{},()=>[((0,t.openBlock)(),(0,t.createBlock)((0,t.resolveDynamicComponent)(a.type)))],!0),a.name?((0,t.openBlock)(),(0,t.createElementBlock)("svg",Bp,[(0,t.createElementVNode)("use",{"xlink:href":a.name},null,8,Sp)])):(0,t.createCommentVNode)("",!0)]),_:3},16)}var oo=y(Vp,[["render",Np],["__scopeId","data-v-3d601d08"]]),on={emits:["click"],props:{name:{type:String,required:!0,validator:e=>e.trim().length>0},size:{type:[Number,String],default:24},color:{type:String,default:"#333333"},hoverColor:{type:String,default:"currentColor"},hoverEffect:{type:Boolean,default:!1}},data(){return{iconType:"svg"}},computed:{maskIconUrl(){const e="https://10ui.cn/icons";let o=this.name||"",a="";o=o.replace(/([A-Z])/g,n=>`-${n.toLowerCase()}`),o=o.replace(/^-|-$/g,""),o=o.toLowerCase().trim();const r=/-(filled|bold)$/;if(r.test(o)){const n=o.match(r)[1],l=o.slice(0,o.lastIndexOf(`-${n}`));l?a=`${l.split("-").filter(s=>s.trim().length>0).join("/")}-${n}`:a=o}else o.includes("-")?a=o.split("-").filter(n=>n.trim().length>0).join("/"):a=o;switch(this.iconType?.toLowerCase()||"png"){case"svg":return`${e}/${a}.svg`;case"png":return`${e}/png/${a}.png`;default:return`${e}/png/${a}.png`}},iconSize(){return typeof this.size=="string"&&(this.size.includes("px")||this.size.includes("rpx"))?this.size:`${parseFloat(this.size)}px`},iconStyle(){const e={width:this.iconSize,height:this.iconSize,backgroundColor:this.color,WebkitMaskImage:`url(${this.maskIconUrl})`,maskImage:`url(${this.maskIconUrl})`,WebkitMaskSize:"contain",maskSize:"contain",WebkitMaskRepeat:"no-repeat",maskRepeat:"no-repeat",WebkitMaskPosition:"center",maskPosition:"center"};return this.hoverEffect&&(e.transition="background-color 0.2s ease"),e}}},Zo={name:"cvMaskSvg",mixins:[on]},Na=()=>{(0,t.useCssVars)(e=>({v2042f27c:e.hoverColor}))},Ea=Zo.setup;Zo.setup=Ea?(e,o)=>(Na(),Ea(e,o)):Na;function Ep(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-mask-icon",style:(0,t.normalizeStyle)(e.iconStyle),onTap:o[0]||(o[0]=s=>e.$emit("click",s))},null,36)}var ao=y(Zo,[["render",Ep],["__scopeId","data-v-590b4b89"]]),Qo={name:"cvMaskPng",mixins:[on],data(){return{iconType:"png"}}},xa=()=>{(0,t.useCssVars)(e=>({v6bb780e0:e.hoverColor}))},$a=Qo.setup;Qo.setup=$a?(e,o)=>(xa(),$a(e,o)):xa;function xp(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-mask-icon",style:(0,t.normalizeStyle)(e.iconStyle),onTap:o[0]||(o[0]=s=>e.$emit("click",s))},null,36)}var no=y(Qo,[["render",xp],["__scopeId","data-v-4f8ce869"]]);oo.install=function(e){e.component(oo.name,oo)};ao.install=function(e){e.component(ao.name,ao)};no.install=function(e){e.component(no.name,no)};var $p={class:"u-emoji"},Dp={class:"face-tooltip-head select-none"},Tp=["onClick"],Lp=["src"],Ip={class:"emoji-body select-none"},Fp={style:{padding:"0 5px"}},Pp=["onClick"],Ap={class:"emoji-btn select-none"},Mp={key:0},zp=Object.assign({name:"cvEmoji"},{__name:"emoji",props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:"bottom"},emits:["addEmoji"],setup(e,{emit:o}){const a=e,r=(0,t.ref)(0),n=(0,t.ref)(0),l=(0,t.ref)(new Array(2)),{emojiList:s,faceList:c}=a.emoji;function d(h){switch(r.value=h,h){case 0:n.value=0;break;case 1:n.value=-50,l.value[1]=s[1];break}}function u(){l.value[0]=s[0]}return(h,m)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",$p,[(0,t.createVNode)((0,t.unref)(b.ElPopover),{placement:e.placement,"popper-class":"emoji-popover",width:250,trigger:"click",onBeforeEnter:u},{reference:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Ap,[h.$slots.default?(0,t.renderSlot)(h.$slots,"default",{key:1},void 0,!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",Mp,[...m[0]||(m[0]=[(0,t.createElementVNode)("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},[(0,t.createElementVNode)("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M8.00002 0.666504C12.0501 0.666504 15.3334 3.94975 15.3334 7.99984C15.3334 12.0499 12.0501 15.3332 8.00002 15.3332C3.94993 15.3332 0.666687 12.0499 0.666687 7.99984C0.666687 3.94975 3.94993 0.666504 8.00002 0.666504ZM8 2C4.68629 2 2 4.68629 2 8C2 11.3137 4.68629 14 8 14C11.3137 14 14 11.3137 14 8C14 4.68629 11.3137 2 8 2ZM10.6667 5.66667V7.66667H9.33333V5.66667H10.6667ZM6.66667 5.66667V7.66667H5.33333V5.66667H6.66667ZM10.0767 9.33333H11.0495C11.1804 9.33333 11.2866 9.43951 11.2866 9.57048C11.2866 9.60754 11.2779 9.64409 11.2612 9.67718L11.244 9.71053C10.6294 10.8739 9.40726 11.6667 7.99998 11.6667C6.61523 11.6667 5.40977 10.8991 4.7859 9.76612L4.73786 9.67593C4.67845 9.56052 4.72385 9.4188 4.83926 9.35939C4.87253 9.34226 4.90941 9.33333 4.94683 9.33333H5.92347C6.02396 9.33332 6.11908 9.37865 6.18238 9.4567C6.26207 9.55496 6.32833 9.62955 6.38117 9.68046C6.80074 10.0847 7.37133 10.3333 7.99998 10.3333C8.63289 10.3333 9.20694 10.0814 9.62728 9.67224C9.67791 9.62296 9.74135 9.55121 9.8176 9.45698C9.88089 9.37877 9.97611 9.33333 10.0767 9.33333Z"})],-1),(0,t.createElementVNode)("span",null,"表情",-1)])]))])]),default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Dp,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(c),(v,f)=>((0,t.openBlock)(),(0,t.createElementBlock)("label",{key:f,class:(0,t.normalizeClass)(r.value==f?"active":""),onClick:C=>d(f)},[(0,t.createElementVNode)("img",{src:v,alt:""},null,8,Lp)],10,Tp))),128))]),(0,t.createElementVNode)("div",Ip,[(0,t.createElementVNode)("div",{class:"emjio-container",style:(0,t.normalizeStyle)({transform:`translateX(${n.value}%)`})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(l.value,(v,f)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:f,class:"emoji-wrapper"},[(0,t.createVNode)((0,t.unref)(b.ElScrollbar),null,{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Fp,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(v,(C,p)=>((0,t.openBlock)(),(0,t.createElementBlock)("span",{key:p,class:"emoji-item",onClick:w=>h.$emit("addEmoji",p)},[(0,t.createVNode)((0,t.unref)(b.ElImage),{src:C,title:String(p),class:"emoji",style:{width:"24px",height:"24px",margin:"5px"},lazy:""},null,8,["src","title"])],8,Pp))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,["placement"])]))}}),Op=y(zp,[["__scopeId","data-v-da53b6ed"]]),jp={class:"cv-chat-message"},Rp={class:"chat-list"},Hp={class:"content"},Up={key:0,class:"username"},Wp=["innerHTML"],qp={__name:"message",props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0}},setup(e,{expose:o}){const{allEmoji:a}=(0,t.inject)("InjectionEmojiApi"),r=(0,t.ref)();o({scroll:()=>{(0,t.nextTick)(()=>{const s=document.querySelector(".chat-item:last-child");r.value.setScrollTop(s.offsetTop)})}});const l=(s,c)=>(c=c.replace(/\[.+?\]/g,d=>{const u=s[d];return u?['<img src="',u,'" width="20" height="20" alt="',d,'" title="',d,'" style="margin: 0 1px; vertical-align: text-bottom"',"/>"].join(""):d}),c);return(s,c)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",jp,[(0,t.createVNode)((0,t.unref)(b.ElScrollbar),{ref_key:"scrollbarRef",ref:r},{default:(0,t.withCtx)(()=>[(0,t.createElementVNode)("div",Rp,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.data,(d,u)=>((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:u,class:(0,t.normalizeClass)([{self:e.userId==d.id},"chat-item"])},[(0,t.createElementVNode)("div",null,[(0,t.createVNode)((0,t.unref)(b.ElAvatar),null,{default:(0,t.withCtx)(()=>[...c[0]||(c[0]=[(0,t.createElementVNode)("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])]),_:1})]),(0,t.createElementVNode)("div",Hp,[e.userId!=d.id?((0,t.openBlock)(),(0,t.createElementBlock)("div",Up,(0,t.toDisplayString)(d.username),1)):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:"card-box",innerHTML:l((0,t.unref)(a),d.content)},null,8,Wp)]),c[1]||(c[1]=(0,t.createElementVNode)("div",{class:"date"},null,-1))],2))),128))])]),_:1},512)]))}},Kp=qp,Gp={class:"cv-chat-wrap"},Yp={class:"header"},Zp={id:"chat-footer",class:"footer"},Qp=Object.assign({name:"cvChat"},{__name:"chat",props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0},emoji:{type:[Object],default:()=>({})}},emits:["submit"],setup(e,{emit:o}){const a=e,r=(0,t.ref)(!1),n=(0,t.ref)(""),l=(0,t.ref)(),{data:s}=a,c=o,d=v=>{const{ctrlKey:f,key:C}=v;f&&C=="Enter"&&h()},u=()=>{n.value="",l.value.scroll()},h=()=>{let v=n.value;v.trim()?(v=v.replace(/\n/g,"<br/>"),c("submit",{clear:u,content:v})):(0,b.ElMessage)({type:"error",message:"内容不能为空"})},m=v=>{let f=document.getElementById("emojiInput"),C=f.selectionStart,p=f.selectionEnd,w=f.value;if(C===null||p===null)return;let V=w.substring(0,C)+v+w.substring(p);f.value=V,f.focus(),f.selectionStart=C+v.length,f.selectionEnd=C+v.length,n.value=V};return(0,t.provide)("InjectionEmojiApi",a.emoji),(v,f)=>{const C=(0,t.resolveComponent)("cvIcons");return(0,t.openBlock)(),(0,t.createElementBlock)("div",Gp,[(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)([{active:r.value},"chat-container translate"])},[(0,t.createElementVNode)("div",Yp,[(0,t.createVNode)(C,{size:"32"},{default:(0,t.withCtx)(()=>[...f[2]||(f[2]=[(0,t.createElementVNode)("svg",{viewBox:"0 0 1318 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[(0,t.createElementVNode)("path",{d:"M1318.502489 432.779052c0-231.790522-209.29842-419.704826-467.458992-419.704826s-467.56979 188.357498-467.56979 419.704826 209.409219 419.704826 467.56979 419.704826a512.110799 512.110799 0 0 0 183.482363-33.239559l93.292361 93.292361a25.816057 25.816057 0 0 0 44.319412-19.168145L1165.822116 742.350141C1259.336074 665.56676 1318.502489 555.433023 1318.502489 432.779052z",fill:"#612273","p-id":"10993"}),(0,t.createElementVNode)("path",{d:"M1034.304263 745.784895a509.673231 509.673231 0 0 1-183.482363 33.239559c-244.532352 0-445.077689-168.524562-465.353819-383.25211-1.107985 12.07704-1.883575 24.264878-1.883575 36.563514 0 231.790522 209.409219 419.704826 467.56979 419.704826a512.110799 512.110799 0 0 0 183.482363-33.239559l93.292361 93.292361a25.816057 25.816057 0 0 0 44.319411-19.168145 25.262064 25.262064 0 0 0-7.5343-17.284571zM1165.822116 669.223112l2.769964 70.689461C1260.44406 663.239991 1318.502489 553.992642 1318.502489 432.779052a366.632331 366.632331 0 0 0-1.883575-36.785111 403.971435 403.971435 0 0 1-150.796798 273.229171z",fill:"#612273",opacity:".2","p-id":"10994"}),(0,t.createElementVNode)("path",{d:"M383.25211 432.779052a383.141311 383.141311 0 0 1 41.881844-172.956503c-12.298637-0.997187-24.81887-1.661978-37.449903-1.661978C173.510496 258.160571 0 413.943302 0 606.178749c0 101.713049 48.97295 193.011037 126.421121 256.609392l-5.761524 148.470028a12.187838 12.187838 0 0 0 20.830124 9.08548l94.06795-93.957153A425.577148 425.577148 0 0 0 387.79485 954.196927a404.636226 404.636226 0 0 0 300.37481-128.304696c-177.831638-59.388011-304.91755-212.733175-304.91755-393.113179z",fill:"#EB3D72","p-id":"10995"}),(0,t.createElementVNode)("path",{d:"M342.256654 391.672798c0 117.557239 53.958883 223.59143 140.714132 299.71002a391.008007 391.008007 0 0 1-99.718676-258.603766 383.141311 383.141311 0 0 1 41.881844-172.956503c-12.298637-0.997187-24.81887-1.661978-37.449903-1.661978-7.091106 0-14.071413 0-21.05172 0.553993a375.939407 375.939407 0 0 0-24.375677 132.958234zM630.111231 802.181346a407.627786 407.627786 0 0 1-283.533434 110.798528 424.136767 424.136767 0 0 1-152.12638-27.699632l-71.686647 71.686648-2.105173 54.291279a12.187838 12.187838 0 0 0 20.830124 9.08548l94.06795-93.957153A425.577148 425.577148 0 0 0 387.79485 954.196927a404.636226 404.636226 0 0 0 300.37481-128.304696 486.294741 486.294741 0 0 1-58.058429-23.710885zM85.425665 821.792686l-5.761523-4.985934c1.883575 2.215971 3.656351 4.431941 5.650725 6.647911z",fill:"#EB3D72",opacity:".5","p-id":"10996"}),(0,t.createElementVNode)("path",{d:"M833.426531 332.395585c64.263147-10.193465 64.041549-66.479117 62.601169-75.342999s-15.400995-54.291279-59.942004-47.200173S799.078987 254.836615 799.078987 254.836615a28.475222 28.475222 0 1 0 56.174854-8.97468s6.315516 3.323956 8.30989 20.27613-11.966241 29.029214-35.455529 33.239559-88.638823-19.943735-104.039819-115.452067C709.110582 96.39472 781.57282 28.253625 838.966457 13.185025a55.399264 55.399264 0 0 0-64.041549-5.318329c-56.064055 35.123134-97.170309 109.579745-85.536464 182.817571 14.957801 93.846354 79.664142 151.904783 144.038087 141.711318zM203.980091 573.825579a53.072495 53.072495 0 0 0 33.90435-67.919498c-2.659165-6.537113-21.162519-38.225492-53.51569-25.040467a30.026401 30.026401 0 0 0-19.832936 40.773858 22.159706 22.159706 0 1 0 40.773858-16.619779s5.318329 1.329582 9.861069 13.739017-3.988747 24.043281-21.05172 31.023588-70.02467 0.553993-98.832288-68.695087C68.916685 417.599654 110.798528 353.558104 151.904783 332.395585a42.879031 42.879031 0 0 0-48.97295 7.423502 146.918849 146.918849 0 0 0-32.574767 152.458775c27.810431 68.141095 86.866046 100.605064 133.623025 81.547717z",fill:"#FED150","p-id":"10997"})],-1)])]),_:1}),f[3]||(f[3]=(0,t.createElementVNode)("div",{style:{"margin-left":"12px"}},[(0,t.createElementVNode)("div",null,"聊天室"),(0,t.createElementVNode)("div",{style:{"font-size":"12px"}},"当前2人在线")],-1))]),(0,t.createVNode)(Kp,{ref_key:"messageRef",ref:l,data:(0,t.unref)(s),"user-id":e.userId},null,8,["data","user-id"]),(0,t.createElementVNode)("div",Zp,[(0,t.createVNode)((0,t.unref)(b.ElInput),{id:"emojiInput",modelValue:n.value,"onUpdate:modelValue":f[0]||(f[0]=p=>n.value=p),type:"textarea",autosize:{minRows:1,maxRows:4},placeholder:"请输入内容",onKeydown:(0,t.withKeys)(d,["enter"])},null,8,["modelValue"]),(0,t.createVNode)(Op,{style:{margin:"0 8px 0"},emoji:e.emoji,placement:"top-end",onAddEmoji:m},{default:(0,t.withCtx)(()=>[...f[4]||(f[4]=[(0,t.createElementVNode)("svg",{width:"22",height:"22",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"7186"},[(0,t.createElementVNode)("path",{d:"M510.944 960c-247.04 0-448-200.96-448-448s200.992-448 448-448c247.008 0 448 200.96 448 448S757.984 960 510.944 960zM510.944 128c-211.744 0-384 172.256-384 384 0 211.744 172.256 384 384 384 211.744 0 384-172.256 384-384C894.944 300.256 722.688 128 510.944 128zM512 773.344c-89.184 0-171.904-40.32-226.912-110.624-10.88-13.92-8.448-34.016 5.472-44.896 13.888-10.912 34.016-8.48 44.928 5.472 42.784 54.688 107.136 86.048 176.512 86.048 70.112 0 134.88-31.904 177.664-87.552 10.784-14.016 30.848-16.672 44.864-5.888 14.016 10.784 16.672 30.88 5.888 44.864C685.408 732.32 602.144 773.344 512 773.344zM368 515.2c-26.528 0-48-21.472-48-48l0-64c0-26.528 21.472-48 48-48s48 21.472 48 48l0 64C416 493.696 394.496 515.2 368 515.2zM656 515.2c-26.496 0-48-21.472-48-48l0-64c0-26.528 21.504-48 48-48s48 21.472 48 48l0 64C704 493.696 682.496 515.2 656 515.2z","p-id":"7187"})],-1)])]),_:1},8,["emoji"]),(0,t.createVNode)(C,{size:"18",class:(0,t.normalizeClass)([{".cv-chat-wrap submit-btn":n.value.trim()!=""},"select-none cursor-pointer"]),style:{"padding-bottom":"5px"},onClick:h},{default:(0,t.withCtx)(()=>[...f[5]||(f[5]=[(0,t.createElementVNode)("svg",{viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15072"},[(0,t.createElementVNode)("path",{d:"M1008.00076 6.285714q18.857143 13.714286 15.428571 36.571429l-146.285714 877.714286q-2.857143 16.571429-18.285714 25.714286-8 4.571429-17.714286 4.571429-6.285714 0-13.714286-2.857143l-258.857143-105.714286-138.285714 168.571429q-10.285714 13.142857-28 13.142857-7.428571 0-12.571429-2.285714-10.857143-4-17.428571-13.428571t-6.571429-20.857143l0-199.428571 493.714286-605.142857-610.857143 528.571429-225.714286-92.571429q-21.142857-8-22.857143-31.428571-1.142857-22.857143 18.285714-33.714286l950.857143-548.571429q8.571429-5.142857 18.285714-5.142857 11.428571 0 20.571429 6.285714z","p-id":"15073"})],-1)])]),_:1},8,["class"])])],2),(0,t.createVNode)((0,t.unref)(b.ElButton),{class:"chat-btn",onClick:f[1]||(f[1]=p=>r.value=!r.value)},{default:(0,t.withCtx)(()=>[...f[6]||(f[6]=[(0,t.createTextVNode)("chat",-1)])]),_:1})])}}}),lo=y(Qp,[["__scopeId","data-v-c77a9347"]]);lo.install=function(e){e.component(lo.name,lo)};var Xp={key:0},Jp=Object.assign({name:"cvNoticeBar"},{__name:"notice-bar",props:{data:{type:[String,Array],default:()=>[]},vertical:{type:[Boolean],default:!1},suffixIcon:{type:[String],default:""},prefixIcon:{type:[String],default:""},size:{type:[Number],default:14},height:{type:[Number],default:40},delay:{type:[Number],default:1e3},spped:{type:[Number],default:100},color:{type:[String],default:"--color-warning"},background:{type:[String],default:"var(--color-warning-light-9)"}},setup(e){const o=e,{data:a,vertical:r,suffixIcon:n,prefixIcon:l,size:s,height:c,delay:d,spped:u,color:h,background:m}=o,v=(0,t.reactive)({boxWidth:0,textWidth:0,oneTime:0,twoTime:0,order:1}),f=(0,t.ref)({}),C=(0,t.ref)({style:{cssText:""}}),p=(0,t.computed)(()=>o.delay>2e3?o.delay:2e3),w=()=>{(0,t.nextTick)(()=>{v.boxWidth=f.value.offsetWidth,v.textWidth=C.value.offsetWidth,document.styleSheets[0].insertRule(`@keyframes oneAnimation {0% {left: 0px;} 100% {left: -${v.textWidth}px;}}`),document.styleSheets[0].insertRule(`@keyframes twoAnimation {0% {left: ${v.boxWidth}px;} 100% {left: -${v.textWidth}px;}}`),V(),setTimeout(()=>{k()},o.delay)})},V=()=>{v.oneTime=v.textWidth/o.spped,v.twoTime=(v.textWidth+v.boxWidth)/o.spped},k=()=>{v.order===1?(C.value?.style&&(C.value.style.cssText=`animation: oneAnimation ${v.oneTime}s linear; opactity: 1;}`),v.order=2):C.value?.style&&(C.value.style.cssText=`animation: twoAnimation ${v.twoTime}s linear infinite; opacity: 1;`)},B=()=>{C.value.addEventListener("animationend",()=>{k()},!1)};return(0,t.onMounted)(()=>{o.vertical||(w(),B())}),(N,H)=>{const q=(0,t.resolveComponent)("el-carousel-item"),re=(0,t.resolveComponent)("el-carousel"),ae=(0,t.resolveComponent)("cvIcons");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-notice-bar",style:(0,t.normalizeStyle)({background:(0,t.unref)(m),height:`${(0,t.unref)(c)}px`})},[(0,t.unref)(r)?((0,t.openBlock)(),(0,t.createElementBlock)("div",Xp,[(0,t.createVNode)(re,{height:"40px",direction:"vertical",autoplay:!0,"indicator-position":"none",interval:p.value},{default:(0,t.withCtx)(()=>[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)((0,t.unref)(a),Q=>((0,t.openBlock)(),(0,t.createBlock)(q,{key:Q},{default:(0,t.withCtx)(()=>[(0,t.createTextVNode)((0,t.toDisplayString)(Q),1)]),_:2},1024))),128))]),_:1},8,["interval"])])):((0,t.openBlock)(),(0,t.createElementBlock)("div",{key:1,style:(0,t.normalizeStyle)({color:(0,t.unref)(h),fontSize:`${(0,t.unref)(s)}px`}),class:"cv-notice-bar-wrap"},[(0,t.unref)(l)?((0,t.openBlock)(),(0,t.createBlock)(ae,{key:0,type:(0,t.unref)(l)},null,8,["type"])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{ref_key:"boxRef",ref:f,class:"text-box"},[(0,t.createElementVNode)("div",{ref_key:"textRef",ref:C,class:"text"},(0,t.toDisplayString)((0,t.unref)(a)),513)],512),(0,t.unref)(n)?((0,t.openBlock)(),(0,t.createBlock)(ae,{key:1,type:(0,t.unref)(n)},null,8,["type"])):(0,t.createCommentVNode)("",!0)],4))],4)}}}),ro=Jp;ro.install=function(e){e.component(ro.name,ro)};const eh=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[zn.basicSetup]});var Y={Change:"change",Update:"update",Focus:"focus",Blur:"blur",Ready:"ready",ModelUpdate:"update:modelValue"};const th=({onUpdate:e,onChange:o,onFocus:a,onBlur:r,...n})=>X.EditorState.create({doc:n.doc,selection:n.selection,extensions:[...Array.isArray(n.extensions)?n.extensions:[n.extensions],U.EditorView.updateListener.of(l=>{e(l),l.docChanged&&o(l.state.doc.toString(),l),l.focusChanged&&(l.view.hasFocus?a(l):r(l))})]}),pe=e=>{const o=new X.Compartment;return{compartment:o,run:r=>{o.get(e.state)?e.dispatch({effects:o.reconfigure(r)}):e.dispatch({effects:X.StateEffect.appendConfig.of(o.of(r))})}}},Da=(e,o)=>{const{compartment:a,run:r}=pe(e);return n=>{const l=a.get(e.state);r(n??l!==o?o:[])}},oh=e=>{const o=()=>e.state.doc.toString(),a=p=>{p!==o()&&e.dispatch({changes:{from:0,to:e.state.doc.length,insert:p}})},r=()=>e.focus(),{run:n}=pe(e),l=Da(e,[U.EditorView.editable.of(!1),X.EditorState.readOnly.of(!0)]),s=Da(e,U.keymap.of([On.indentWithTab])),{run:c}=pe(e),d=p=>{c([X.EditorState.tabSize.of(p),j.indentUnit.of(" ".repeat(p))])},{run:u}=pe(e),h=p=>{u([X.EditorState.phrases.of(p)])},{run:m}=pe(e),v=p=>{m((0,U.placeholder)(p))},{run:f}=pe(e);return{focus:r,getDoc:o,setDoc:a,reExtensions:n,toggleDisabled:l,toggleIndentWithTab:s,setTabSize:d,setPhrases:h,setPlaceholder:v,setStyle:(p={})=>{f(U.EditorView.theme({"&":{...p}}))}}};var ah=(0,t.defineComponent)({name:"VueCodemirror",props:{modelValue:{type:String,default:""},autofocus:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},indentWithTab:{type:Boolean,default:!1},tabSize:Number,placeholder:String,style:Object,autoDestroy:{type:Boolean,default:!1},phrases:Object,root:Object,extensions:Array,selection:Object},emits:{[Y.Change]:(e,o)=>!0,[Y.Update]:e=>!0,[Y.Focus]:e=>!0,[Y.Blur]:e=>!0,[Y.Ready]:e=>!0,[Y.ModelUpdate]:(e,o)=>!0},setup(e,o){const a=(0,t.shallowRef)(),r=(0,t.shallowRef)(),n=(0,t.shallowRef)(),l={...eh},s=(0,t.computed)(()=>{const c={};return Object.keys((0,t.toRaw)(e)).forEach(d=>{d!=="modelValue"&&(c[d]=e[d]??l[d])}),c});return(0,t.onMounted)(()=>{r.value=th({doc:e.modelValue,selection:s.value.selection,extensions:l.extensions??[],onFocus:d=>o.emit(Y.Focus,d),onBlur:d=>o.emit(Y.Blur,d),onUpdate:d=>o.emit(Y.Update,d),onChange:(d,u)=>{d!==e.modelValue&&(o.emit(Y.Change,d,u),o.emit(Y.ModelUpdate,d,u))}}),n.value=new U.EditorView({state:r.value,parent:a.value,root:s.value.root}),n.value.contentDOM.addEventListener("scroll",d=>{});const c=oh(n.value);(0,t.watch)(()=>e.modelValue,d=>{d!==c.getDoc()&&c.setDoc(d)}),(0,t.watch)(()=>e.extensions,d=>c.reExtensions(d||[]),{immediate:!0}),(0,t.watch)(()=>s.value.disabled,d=>c.toggleDisabled(d),{immediate:!0}),(0,t.watch)(()=>s.value.indentWithTab,d=>c.toggleIndentWithTab(d),{immediate:!0}),(0,t.watch)(()=>s.value.tabSize,d=>c.setTabSize(d),{immediate:!0}),(0,t.watch)(()=>s.value.phrases,d=>c.setPhrases(d||{}),{immediate:!0}),(0,t.watch)(()=>s.value.placeholder,d=>c.setPlaceholder(d),{immediate:!0}),(0,t.watch)(()=>s.value.style,d=>c.setStyle(d),{immediate:!0}),s.value.autofocus&&c.focus(),o.emit(Y.Ready,{state:r.value,view:n.value,container:a.value,editorTools:c})}),(0,t.onBeforeUnmount)(()=>{s.value.autoDestroy&&n.value&&n.value.destroy()}),()=>(0,t.h)("div",{class:"cv-editor-codemirror",ref:a})}}),nh="#e5c07b",Ta="#e06c75",lh="#56b6c2",rh="#ffffff",io="#abb2bf",Wo="#7d8799",ih="#61afef",sh="#98c379",La="#d19a66",ch="#c678dd",dh="#21252b",Ia="#2c313a",Fa="#282c34",Oo="#353a42",uh="#3E4451",Pa="#528bff",mh=U.EditorView.theme({"&":{color:io,backgroundColor:Fa},".cm-content":{caretColor:Pa},".cm-cursor, .cm-dropCursor":{borderLeftColor:Pa},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:uh},".cm-panels":{backgroundColor:dh,color:io},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Fa,color:Wo,border:"none"},".cm-activeLineGutter":{backgroundColor:Ia},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:Oo},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:Oo,borderBottomColor:Oo},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Ia,color:io}}},{dark:!0}),ph=j.HighlightStyle.define([{tag:i.tags.keyword,color:ch},{tag:[i.tags.name,i.tags.deleted,i.tags.character,i.tags.propertyName,i.tags.macroName],color:Ta},{tag:[i.tags.function(i.tags.variableName),i.tags.labelName],color:ih},{tag:[i.tags.color,i.tags.constant(i.tags.name),i.tags.standard(i.tags.name)],color:La},{tag:[i.tags.definition(i.tags.name),i.tags.separator],color:io},{tag:[i.tags.typeName,i.tags.className,i.tags.number,i.tags.changed,i.tags.annotation,i.tags.modifier,i.tags.self,i.tags.namespace],color:nh},{tag:[i.tags.operator,i.tags.operatorKeyword,i.tags.url,i.tags.escape,i.tags.regexp,i.tags.link,i.tags.special(i.tags.string)],color:lh},{tag:[i.tags.meta,i.tags.comment],color:Wo},{tag:i.tags.strong,fontWeight:"bold"},{tag:i.tags.emphasis,fontStyle:"italic"},{tag:i.tags.strikethrough,textDecoration:"line-through"},{tag:i.tags.link,color:Wo,textDecoration:"underline"},{tag:i.tags.heading,fontWeight:"bold",color:Ta},{tag:[i.tags.atom,i.tags.bool,i.tags.special(i.tags.variableName)],color:La},{tag:[i.tags.processingInstruction,i.tags.string,i.tags.inserted],color:sh},{tag:i.tags.invalid,color:rh}]),hh=[mh,(0,j.syntaxHighlighting)(ph)],E={name:"materialLight",dark:!1,background:"#FAFAFA",foreground:"#90A4AE",selection:"#80CBC440",cursor:"#272727",dropdownBackground:"#FAFAFA",dropdownBorder:"#00000010",activeLine:"#c2c2c222",lineNumber:"#CFD8DC",lineNumberActive:"#7E939E",matchingBracket:"#FAFAFA",keyword:"#7C4DFF",storage:"#7C4DFF",variable:"#90A4AE",parameter:"#90A4AE",function:"#6182B8",string:"#91B859",constant:"#F76D47",type:"#8796B0",class:"#FFB62C",number:"#F76D47",comment:"#90A4AE",heading:"#91B859",invalid:"#E53935",regexp:"#39ADB5"},gh=U.EditorView.theme({"&":{color:E.foreground,backgroundColor:E.background},".cm-content":{caretColor:E.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:E.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:E.selection},".cm-panels":{backgroundColor:E.dropdownBackground,color:E.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:E.dropdownBackground,outline:`1px solid ${E.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:E.selection},".cm-activeLine":{backgroundColor:E.activeLine},".cm-selectionMatch":{backgroundColor:E.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:E.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:E.background,color:E.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:E.background},".cm-lineNumbers .cm-gutterElement":{color:E.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:E.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:E.foreground},".cm-tooltip":{border:`1px solid ${E.dropdownBorder}`,backgroundColor:E.dropdownBackground,color:E.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:E.foreground,borderBottomColor:E.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:E.selection,color:E.foreground}}},{dark:E.dark}),fh=j.HighlightStyle.define([{tag:i.tags.keyword,color:E.keyword},{tag:[i.tags.name,i.tags.deleted,i.tags.character,i.tags.macroName],color:E.variable},{tag:[i.tags.propertyName],color:E.function},{tag:[i.tags.processingInstruction,i.tags.string,i.tags.inserted,i.tags.special(i.tags.string)],color:E.string},{tag:[i.tags.function(i.tags.variableName),i.tags.labelName],color:E.function},{tag:[i.tags.color,i.tags.constant(i.tags.name),i.tags.standard(i.tags.name)],color:E.constant},{tag:[i.tags.definition(i.tags.name),i.tags.separator],color:E.variable},{tag:[i.tags.className],color:E.class},{tag:[i.tags.number,i.tags.changed,i.tags.annotation,i.tags.modifier,i.tags.self,i.tags.namespace],color:E.number},{tag:[i.tags.typeName],color:E.type,fontStyle:E.type},{tag:[i.tags.operator,i.tags.operatorKeyword],color:E.keyword},{tag:[i.tags.url,i.tags.escape,i.tags.regexp,i.tags.link],color:E.regexp},{tag:[i.tags.meta,i.tags.comment],color:E.comment},{tag:i.tags.strong,fontWeight:"bold"},{tag:i.tags.emphasis,fontStyle:"italic"},{tag:i.tags.link,textDecoration:"underline"},{tag:i.tags.heading,fontWeight:"bold",color:E.heading},{tag:[i.tags.atom,i.tags.bool,i.tags.special(i.tags.variableName)],color:E.variable},{tag:i.tags.invalid,color:E.invalid},{tag:i.tags.strikethrough,textDecoration:"line-through"}]),vh=[gh,(0,j.syntaxHighlighting)(fh)],x={name:"materialDark",dark:!0,background:"#263238",foreground:"#EEFFFF",selection:"#80CBC420",cursor:"#FFCC00",dropdownBackground:"#263238",dropdownBorder:"#FFFFFF10",activeLine:"#4c616c22",lineNumber:"#37474F",lineNumberActive:"#607a86",matchingBracket:"#263238",keyword:"#C792EA",storage:"#C792EA",variable:"#EEFFFF",parameter:"#EEFFFF",function:"#82AAFF",string:"#C3E88D",constant:"#F78C6C",type:"#B2CCD6",class:"#FFCB6B",number:"#F78C6C",comment:"#546E7A",heading:"#C3E88D",invalid:"#FF5370",regexp:"#89DDFF"},yh=U.EditorView.theme({"&":{color:x.foreground,backgroundColor:x.background},".cm-content":{caretColor:x.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:x.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:x.selection},".cm-panels":{backgroundColor:x.dropdownBackground,color:x.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:x.dropdownBackground,outline:`1px solid ${x.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:x.selection},".cm-activeLine":{backgroundColor:x.activeLine},".cm-selectionMatch":{backgroundColor:x.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:x.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:x.background,color:x.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:x.background},".cm-lineNumbers .cm-gutterElement":{color:x.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:x.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:x.foreground},".cm-tooltip":{border:`1px solid ${x.dropdownBorder}`,backgroundColor:x.dropdownBackground,color:x.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:x.foreground,borderBottomColor:x.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:x.selection,color:x.foreground}}},{dark:x.dark}),Ch=j.HighlightStyle.define([{tag:i.tags.keyword,color:x.keyword},{tag:[i.tags.name,i.tags.deleted,i.tags.character,i.tags.macroName],color:x.variable},{tag:[i.tags.propertyName],color:x.function},{tag:[i.tags.processingInstruction,i.tags.string,i.tags.inserted,i.tags.special(i.tags.string)],color:x.string},{tag:[i.tags.function(i.tags.variableName),i.tags.labelName],color:x.function},{tag:[i.tags.color,i.tags.constant(i.tags.name),i.tags.standard(i.tags.name)],color:x.constant},{tag:[i.tags.definition(i.tags.name),i.tags.separator],color:x.variable},{tag:[i.tags.className],color:x.class},{tag:[i.tags.number,i.tags.changed,i.tags.annotation,i.tags.modifier,i.tags.self,i.tags.namespace],color:x.number},{tag:[i.tags.typeName],color:x.type,fontStyle:x.type},{tag:[i.tags.operator,i.tags.operatorKeyword],color:x.keyword},{tag:[i.tags.url,i.tags.escape,i.tags.regexp,i.tags.link],color:x.regexp},{tag:[i.tags.meta,i.tags.comment],color:x.comment},{tag:i.tags.strong,fontWeight:"bold"},{tag:i.tags.emphasis,fontStyle:"italic"},{tag:i.tags.link,textDecoration:"underline"},{tag:i.tags.heading,fontWeight:"bold",color:x.heading},{tag:[i.tags.atom,i.tags.bool,i.tags.special(i.tags.variableName)],color:x.variable},{tag:i.tags.invalid,color:x.invalid},{tag:i.tags.strikethrough,textDecoration:"line-through"}]),bh=[yh,(0,j.syntaxHighlighting)(Ch)],$={name:"solarizedLight",dark:!1,background:"#FDF6E3",foreground:"#586E75",selection:"#EEE8D5",cursor:"#657B83",dropdownBackground:"#FDF6E3",dropdownBorder:"#D3AF86",activeLine:"#d5bd5c22",lineNumber:"#586E75",lineNumberActive:"#567983",matchingBracket:"#EEE8D5",keyword:"#859900",storage:"#586E75",variable:"#268BD2",parameter:"#268BD2",function:"#268BD2",string:"#2AA198",constant:"#CB4B16",type:"#CB4B16",class:"#CB4B16",number:"#D33682",comment:"#93A1A1",heading:"#268BD2",invalid:"#DC322F",regexp:"#DC322F"},kh=U.EditorView.theme({"&":{color:$.foreground,backgroundColor:$.background},".cm-content":{caretColor:$.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:$.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:$.selection},".cm-panels":{backgroundColor:$.dropdownBackground,color:$.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:$.dropdownBackground,outline:`1px solid ${$.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:$.selection},".cm-activeLine":{backgroundColor:$.activeLine},".cm-selectionMatch":{backgroundColor:$.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:$.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:$.background,color:$.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:$.background},".cm-lineNumbers .cm-gutterElement":{color:$.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:$.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:$.foreground},".cm-tooltip":{border:`1px solid ${$.dropdownBorder}`,backgroundColor:$.dropdownBackground,color:$.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:$.foreground,borderBottomColor:$.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:$.selection,color:$.foreground}}},{dark:$.dark}),wh=j.HighlightStyle.define([{tag:i.tags.keyword,color:$.keyword},{tag:[i.tags.name,i.tags.deleted,i.tags.character,i.tags.macroName],color:$.variable},{tag:[i.tags.propertyName],color:$.function},{tag:[i.tags.processingInstruction,i.tags.string,i.tags.inserted,i.tags.special(i.tags.string)],color:$.string},{tag:[i.tags.function(i.tags.variableName),i.tags.labelName],color:$.function},{tag:[i.tags.color,i.tags.constant(i.tags.name),i.tags.standard(i.tags.name)],color:$.constant},{tag:[i.tags.definition(i.tags.name),i.tags.separator],color:$.variable},{tag:[i.tags.className],color:$.class},{tag:[i.tags.number,i.tags.changed,i.tags.annotation,i.tags.modifier,i.tags.self,i.tags.namespace],color:$.number},{tag:[i.tags.typeName],color:$.type,fontStyle:$.type},{tag:[i.tags.operator,i.tags.operatorKeyword],color:$.keyword},{tag:[i.tags.url,i.tags.escape,i.tags.regexp,i.tags.link],color:$.regexp},{tag:[i.tags.meta,i.tags.comment],color:$.comment},{tag:i.tags.strong,fontWeight:"bold"},{tag:i.tags.emphasis,fontStyle:"italic"},{tag:i.tags.link,textDecoration:"underline"},{tag:i.tags.heading,fontWeight:"bold",color:$.heading},{tag:[i.tags.atom,i.tags.bool,i.tags.special(i.tags.variableName)],color:$.variable},{tag:i.tags.invalid,color:$.invalid},{tag:i.tags.strikethrough,textDecoration:"line-through"}]),_h=[kh,(0,j.syntaxHighlighting)(wh)],D={name:"solarizedDark",dark:!0,background:"#002B36",foreground:"#93A1A1",selection:"#274642",cursor:"#D30102",dropdownBackground:"#002B36",dropdownBorder:"#2AA19899",activeLine:"#005b7022",lineNumber:"#93A1A1",lineNumberActive:"#949494",matchingBracket:"#073642",keyword:"#859900",storage:"#93A1A1",variable:"#268BD2",parameter:"#268BD2",function:"#268BD2",string:"#2AA198",constant:"#CB4B16",type:"#CB4B16",class:"#CB4B16",number:"#D33682",comment:"#586E75",heading:"#268BD2",invalid:"#DC322F",regexp:"#DC322F"},Vh=U.EditorView.theme({"&":{color:D.foreground,backgroundColor:D.background},".cm-content":{caretColor:D.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:D.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:D.selection},".cm-panels":{backgroundColor:D.dropdownBackground,color:D.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:D.dropdownBackground,outline:`1px solid ${D.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:D.selection},".cm-activeLine":{backgroundColor:D.activeLine},".cm-selectionMatch":{backgroundColor:D.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:D.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:D.background,color:D.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:D.background},".cm-lineNumbers .cm-gutterElement":{color:D.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:D.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:D.foreground},".cm-tooltip":{border:`1px solid ${D.dropdownBorder}`,backgroundColor:D.dropdownBackground,color:D.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:D.foreground,borderBottomColor:D.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:D.selection,color:D.foreground}}},{dark:D.dark}),Bh=j.HighlightStyle.define([{tag:i.tags.keyword,color:D.keyword},{tag:[i.tags.name,i.tags.deleted,i.tags.character,i.tags.macroName],color:D.variable},{tag:[i.tags.propertyName],color:D.function},{tag:[i.tags.processingInstruction,i.tags.string,i.tags.inserted,i.tags.special(i.tags.string)],color:D.string},{tag:[i.tags.function(i.tags.variableName),i.tags.labelName],color:D.function},{tag:[i.tags.color,i.tags.constant(i.tags.name),i.tags.standard(i.tags.name)],color:D.constant},{tag:[i.tags.definition(i.tags.name),i.tags.separator],color:D.variable},{tag:[i.tags.className],color:D.class},{tag:[i.tags.number,i.tags.changed,i.tags.annotation,i.tags.modifier,i.tags.self,i.tags.namespace],color:D.number},{tag:[i.tags.typeName],color:D.type,fontStyle:D.type},{tag:[i.tags.operator,i.tags.operatorKeyword],color:D.keyword},{tag:[i.tags.url,i.tags.escape,i.tags.regexp,i.tags.link],color:D.regexp},{tag:[i.tags.meta,i.tags.comment],color:D.comment},{tag:i.tags.strong,fontWeight:"bold"},{tag:i.tags.emphasis,fontStyle:"italic"},{tag:i.tags.link,textDecoration:"underline"},{tag:i.tags.heading,fontWeight:"bold",color:D.heading},{tag:[i.tags.atom,i.tags.bool,i.tags.special(i.tags.variableName)],color:D.variable},{tag:i.tags.invalid,color:D.invalid},{tag:i.tags.strikethrough,textDecoration:"line-through"}]),Sh=[Vh,(0,j.syntaxHighlighting)(Bh)],T={name:"dracula",dark:!0,background:"#282A36",foreground:"#F8F8F2",selection:"#44475A",cursor:"#F8F8F2",dropdownBackground:"#282A36",dropdownBorder:"#191A21",activeLine:"#53576c22",lineNumber:"#6272A4",lineNumberActive:"#F8F8F2",matchingBracket:"#44475A",keyword:"#FF79C6",storage:"#FF79C6",variable:"#F8F8F2",parameter:"#F8F8F2",function:"#50FA7B",string:"#F1FA8C",constant:"#BD93F9",type:"#8BE9FD",class:"#8BE9FD",number:"#BD93F9",comment:"#6272A4",heading:"#BD93F9",invalid:"#FF5555",regexp:"#F1FA8C"},Nh=U.EditorView.theme({"&":{color:T.foreground,backgroundColor:T.background},".cm-content":{caretColor:T.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:T.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:T.selection},".cm-panels":{backgroundColor:T.dropdownBackground,color:T.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:T.dropdownBackground,outline:`1px solid ${T.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:T.selection},".cm-activeLine":{backgroundColor:T.activeLine},".cm-selectionMatch":{backgroundColor:T.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:T.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:T.background,color:T.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:T.background},".cm-lineNumbers .cm-gutterElement":{color:T.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:T.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:T.foreground},".cm-tooltip":{border:`1px solid ${T.dropdownBorder}`,backgroundColor:T.dropdownBackground,color:T.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:T.foreground,borderBottomColor:T.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:T.selection,color:T.foreground}}},{dark:T.dark}),Eh=j.HighlightStyle.define([{tag:i.tags.keyword,color:T.keyword},{tag:[i.tags.name,i.tags.deleted,i.tags.character,i.tags.macroName],color:T.variable},{tag:[i.tags.propertyName],color:T.function},{tag:[i.tags.processingInstruction,i.tags.string,i.tags.inserted,i.tags.special(i.tags.string)],color:T.string},{tag:[i.tags.function(i.tags.variableName),i.tags.labelName],color:T.function},{tag:[i.tags.color,i.tags.constant(i.tags.name),i.tags.standard(i.tags.name)],color:T.constant},{tag:[i.tags.definition(i.tags.name),i.tags.separator],color:T.variable},{tag:[i.tags.className],color:T.class},{tag:[i.tags.number,i.tags.changed,i.tags.annotation,i.tags.modifier,i.tags.self,i.tags.namespace],color:T.number},{tag:[i.tags.typeName],color:T.type,fontStyle:T.type},{tag:[i.tags.operator,i.tags.operatorKeyword],color:T.keyword},{tag:[i.tags.url,i.tags.escape,i.tags.regexp,i.tags.link],color:T.regexp},{tag:[i.tags.meta,i.tags.comment],color:T.comment},{tag:i.tags.strong,fontWeight:"bold"},{tag:i.tags.emphasis,fontStyle:"italic"},{tag:i.tags.link,textDecoration:"underline"},{tag:i.tags.heading,fontWeight:"bold",color:T.heading},{tag:[i.tags.atom,i.tags.bool,i.tags.special(i.tags.variableName)],color:T.variable},{tag:i.tags.invalid,color:T.invalid},{tag:i.tags.strikethrough,textDecoration:"line-through"}]),xh=[Nh,(0,j.syntaxHighlighting)(Eh)],L={name:"githubLight",dark:!1,background:"#fff",foreground:"#444d56",selection:"#0366d625",cursor:"#044289",dropdownBackground:"#fff",dropdownBorder:"#e1e4e8",activeLine:"#c6c6c622",lineNumber:"#1b1f234d",lineNumberActive:"#24292e",matchingBracket:"#34d05840",keyword:"#d73a49",storage:"#d73a49",variable:"#e36209",parameter:"#24292e",function:"#005cc5",string:"#032f62",constant:"#005cc5",type:"#005cc5",class:"#6f42c1",number:"#005cc5",comment:"#6a737d",heading:"#005cc5",invalid:"#cb2431",regexp:"#032f62"},$h=U.EditorView.theme({"&":{color:L.foreground,backgroundColor:L.background},".cm-content":{caretColor:L.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:L.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:L.selection},".cm-panels":{backgroundColor:L.dropdownBackground,color:L.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:L.dropdownBackground,outline:`1px solid ${L.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:L.selection},".cm-activeLine":{backgroundColor:L.activeLine},".cm-selectionMatch":{backgroundColor:L.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:L.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:L.background,color:L.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:L.background},".cm-lineNumbers .cm-gutterElement":{color:L.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:L.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:L.foreground},".cm-tooltip":{border:`1px solid ${L.dropdownBorder}`,backgroundColor:L.dropdownBackground,color:L.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:L.foreground,borderBottomColor:L.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:L.selection,color:L.foreground}}},{dark:L.dark}),Dh=j.HighlightStyle.define([{tag:i.tags.keyword,color:L.keyword},{tag:[i.tags.name,i.tags.deleted,i.tags.character,i.tags.macroName],color:L.variable},{tag:[i.tags.propertyName],color:L.function},{tag:[i.tags.processingInstruction,i.tags.string,i.tags.inserted,i.tags.special(i.tags.string)],color:L.string},{tag:[i.tags.function(i.tags.variableName),i.tags.labelName],color:L.function},{tag:[i.tags.color,i.tags.constant(i.tags.name),i.tags.standard(i.tags.name)],color:L.constant},{tag:[i.tags.definition(i.tags.name),i.tags.separator],color:L.variable},{tag:[i.tags.className],color:L.class},{tag:[i.tags.number,i.tags.changed,i.tags.annotation,i.tags.modifier,i.tags.self,i.tags.namespace],color:L.number},{tag:[i.tags.typeName],color:L.type,fontStyle:L.type},{tag:[i.tags.operator,i.tags.operatorKeyword],color:L.keyword},{tag:[i.tags.url,i.tags.escape,i.tags.regexp,i.tags.link],color:L.regexp},{tag:[i.tags.meta,i.tags.comment],color:L.comment},{tag:i.tags.strong,fontWeight:"bold"},{tag:i.tags.emphasis,fontStyle:"italic"},{tag:i.tags.link,textDecoration:"underline"},{tag:i.tags.heading,fontWeight:"bold",color:L.heading},{tag:[i.tags.atom,i.tags.bool,i.tags.special(i.tags.variableName)],color:L.variable},{tag:i.tags.invalid,color:L.invalid},{tag:i.tags.strikethrough,textDecoration:"line-through"}]),Th=[$h,(0,j.syntaxHighlighting)(Dh)],I={name:"githubDark",dark:!0,background:"#24292e",foreground:"#d1d5da",selection:"#3392FF44",cursor:"#c8e1ff",dropdownBackground:"#24292e",dropdownBorder:"#1b1f23",activeLine:"#4d566022",lineNumber:"#444d56",lineNumberActive:"#e1e4e8",matchingBracket:"#17E5E650",keyword:"#f97583",storage:"#f97583",variable:"#ffab70",parameter:"#e1e4e8",function:"#79b8ff",string:"#9ecbff",constant:"#79b8ff",type:"#79b8ff",class:"#b392f0",number:"#79b8ff",comment:"#6a737d",heading:"#79b8ff",invalid:"#f97583",regexp:"#9ecbff"},Lh=U.EditorView.theme({"&":{color:I.foreground,backgroundColor:I.background},".cm-content":{caretColor:I.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:I.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:I.selection},".cm-panels":{backgroundColor:I.dropdownBackground,color:I.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:I.dropdownBackground,outline:`1px solid ${I.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:I.selection},".cm-activeLine":{backgroundColor:I.activeLine},".cm-selectionMatch":{backgroundColor:I.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:I.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:I.background,color:I.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:I.background},".cm-lineNumbers .cm-gutterElement":{color:I.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:I.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:I.foreground},".cm-tooltip":{border:`1px solid ${I.dropdownBorder}`,backgroundColor:I.dropdownBackground,color:I.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:I.foreground,borderBottomColor:I.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:I.selection,color:I.foreground}}},{dark:I.dark}),Ih=j.HighlightStyle.define([{tag:i.tags.keyword,color:I.keyword},{tag:[i.tags.name,i.tags.deleted,i.tags.character,i.tags.macroName],color:I.variable},{tag:[i.tags.propertyName],color:I.function},{tag:[i.tags.processingInstruction,i.tags.string,i.tags.inserted,i.tags.special(i.tags.string)],color:I.string},{tag:[i.tags.function(i.tags.variableName),i.tags.labelName],color:I.function},{tag:[i.tags.color,i.tags.constant(i.tags.name),i.tags.standard(i.tags.name)],color:I.constant},{tag:[i.tags.definition(i.tags.name),i.tags.separator],color:I.variable},{tag:[i.tags.className],color:I.class},{tag:[i.tags.number,i.tags.changed,i.tags.annotation,i.tags.modifier,i.tags.self,i.tags.namespace],color:I.number},{tag:[i.tags.typeName],color:I.type,fontStyle:I.type},{tag:[i.tags.operator,i.tags.operatorKeyword],color:I.keyword},{tag:[i.tags.url,i.tags.escape,i.tags.regexp,i.tags.link],color:I.regexp},{tag:[i.tags.meta,i.tags.comment],color:I.comment},{tag:i.tags.strong,fontWeight:"bold"},{tag:i.tags.emphasis,fontStyle:"italic"},{tag:i.tags.link,textDecoration:"underline"},{tag:i.tags.heading,fontWeight:"bold",color:I.heading},{tag:[i.tags.atom,i.tags.bool,i.tags.special(i.tags.variableName)],color:I.variable},{tag:i.tags.invalid,color:I.invalid},{tag:i.tags.strikethrough,textDecoration:"line-through"}]),Fh=[Lh,(0,j.syntaxHighlighting)(Ih)],F={name:"aura",dark:!0,background:"#21202e",foreground:"#edecee",selection:"#3d375e7f",cursor:"#a277ff",dropdownBackground:"#21202e",dropdownBorder:"#3b334b",activeLine:"#4d4b6622",lineNumber:"#a394f033",lineNumberActive:"#cdccce",matchingBracket:"#a394f033",keyword:"#a277ff",storage:"#a277ff",variable:"#edecee",parameter:"#edecee",function:"#ffca85",string:"#61ffca",constant:"#61ffca",type:"#82e2ff",class:"#82e2ff",number:"#61ffca",comment:"#6d6d6d",heading:"#a277ff",invalid:"#ff6767",regexp:"#61ffca"},Ph=U.EditorView.theme({"&":{color:F.foreground,backgroundColor:F.background},".cm-content":{caretColor:F.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:F.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:F.selection},".cm-panels":{backgroundColor:F.dropdownBackground,color:F.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:F.dropdownBackground,outline:`1px solid ${F.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:F.selection},".cm-activeLine":{backgroundColor:F.activeLine},".cm-selectionMatch":{backgroundColor:F.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:F.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:F.background,color:F.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:F.background},".cm-lineNumbers .cm-gutterElement":{color:F.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:F.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:F.foreground},".cm-tooltip":{border:`1px solid ${F.dropdownBorder}`,backgroundColor:F.dropdownBackground,color:F.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:F.foreground,borderBottomColor:F.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:F.selection,color:F.foreground}}},{dark:F.dark}),Ah=j.HighlightStyle.define([{tag:i.tags.keyword,color:F.keyword},{tag:[i.tags.name,i.tags.deleted,i.tags.character,i.tags.macroName],color:F.variable},{tag:[i.tags.propertyName],color:F.function},{tag:[i.tags.processingInstruction,i.tags.string,i.tags.inserted,i.tags.special(i.tags.string)],color:F.string},{tag:[i.tags.function(i.tags.variableName),i.tags.labelName],color:F.function},{tag:[i.tags.color,i.tags.constant(i.tags.name),i.tags.standard(i.tags.name)],color:F.constant},{tag:[i.tags.definition(i.tags.name),i.tags.separator],color:F.variable},{tag:[i.tags.className],color:F.class},{tag:[i.tags.number,i.tags.changed,i.tags.annotation,i.tags.modifier,i.tags.self,i.tags.namespace],color:F.number},{tag:[i.tags.typeName],color:F.type,fontStyle:F.type},{tag:[i.tags.operator,i.tags.operatorKeyword],color:F.keyword},{tag:[i.tags.url,i.tags.escape,i.tags.regexp,i.tags.link],color:F.regexp},{tag:[i.tags.meta,i.tags.comment],color:F.comment},{tag:i.tags.strong,fontWeight:"bold"},{tag:i.tags.emphasis,fontStyle:"italic"},{tag:i.tags.link,textDecoration:"underline"},{tag:i.tags.heading,fontWeight:"bold",color:F.heading},{tag:[i.tags.atom,i.tags.bool,i.tags.special(i.tags.variableName)],color:F.variable},{tag:i.tags.invalid,color:F.invalid},{tag:i.tags.strikethrough,textDecoration:"line-through"}]),Mh=[Ph,(0,j.syntaxHighlighting)(Ah)],P={name:"tokyoNight",dark:!0,background:"#1a1b26",foreground:"#787c99",selection:"#515c7e40",cursor:"#c0caf5",dropdownBackground:"#1a1b26",dropdownBorder:"#787c99",activeLine:"#43455c22",lineNumber:"#363b54",lineNumberActive:"#737aa2",matchingBracket:"#16161e",keyword:"#bb9af7",storage:"#bb9af7",variable:"#c0caf5",parameter:"#c0caf5",function:"#7aa2f7",string:"#9ece6a",constant:"#bb9af7",type:"#0db9d7",class:"#c0caf5",number:"#ff9e64",comment:"#444b6a",heading:"#89ddff",invalid:"#ff5370",regexp:"#b4f9f8"},zh=U.EditorView.theme({"&":{color:P.foreground,backgroundColor:P.background},".cm-content":{caretColor:P.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:P.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:P.selection},".cm-panels":{backgroundColor:P.dropdownBackground,color:P.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:P.dropdownBackground,outline:`1px solid ${P.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:P.selection},".cm-activeLine":{backgroundColor:P.activeLine},".cm-selectionMatch":{backgroundColor:P.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:P.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:P.background,color:P.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:P.background},".cm-lineNumbers .cm-gutterElement":{color:P.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:P.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:P.foreground},".cm-tooltip":{border:`1px solid ${P.dropdownBorder}`,backgroundColor:P.dropdownBackground,color:P.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:P.foreground,borderBottomColor:P.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:P.selection,color:P.foreground}}},{dark:P.dark}),Oh=j.HighlightStyle.define([{tag:i.tags.keyword,color:P.keyword},{tag:[i.tags.name,i.tags.deleted,i.tags.character,i.tags.macroName],color:P.variable},{tag:[i.tags.propertyName],color:P.function},{tag:[i.tags.processingInstruction,i.tags.string,i.tags.inserted,i.tags.special(i.tags.string)],color:P.string},{tag:[i.tags.function(i.tags.variableName),i.tags.labelName],color:P.function},{tag:[i.tags.color,i.tags.constant(i.tags.name),i.tags.standard(i.tags.name)],color:P.constant},{tag:[i.tags.definition(i.tags.name),i.tags.separator],color:P.variable},{tag:[i.tags.className],color:P.class},{tag:[i.tags.number,i.tags.changed,i.tags.annotation,i.tags.modifier,i.tags.self,i.tags.namespace],color:P.number},{tag:[i.tags.typeName],color:P.type,fontStyle:P.type},{tag:[i.tags.operator,i.tags.operatorKeyword],color:P.keyword},{tag:[i.tags.url,i.tags.escape,i.tags.regexp,i.tags.link],color:P.regexp},{tag:[i.tags.meta,i.tags.comment],color:P.comment},{tag:i.tags.strong,fontWeight:"bold"},{tag:i.tags.emphasis,fontStyle:"italic"},{tag:i.tags.link,textDecoration:"underline"},{tag:i.tags.heading,fontWeight:"bold",color:P.heading},{tag:[i.tags.atom,i.tags.bool,i.tags.special(i.tags.variableName)],color:P.variable},{tag:i.tags.invalid,color:P.invalid},{tag:i.tags.strikethrough,textDecoration:"line-through"}]),jh=[zh,(0,j.syntaxHighlighting)(Oh)],A={name:"tokyoNightStorm",dark:!0,background:"#24283b",foreground:"#7982a9",selection:"#6f7bb630",cursor:"#c0caf5",dropdownBackground:"#24283b",dropdownBorder:"#7982a9",activeLine:"#4d547722",lineNumber:"#3b4261",lineNumberActive:"#737aa2",matchingBracket:"#1f2335",keyword:"#bb9af7",storage:"#bb9af7",variable:"#c0caf5",parameter:"#c0caf5",function:"#7aa2f7",string:"#9ece6a",constant:"#bb9af7",type:"#2ac3de",class:"#c0caf5",number:"#ff9e64",comment:"#565f89",heading:"#89ddff",invalid:"#ff5370",regexp:"#b4f9f8"},Rh=U.EditorView.theme({"&":{color:A.foreground,backgroundColor:A.background},".cm-content":{caretColor:A.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:A.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:A.selection},".cm-panels":{backgroundColor:A.dropdownBackground,color:A.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:A.dropdownBackground,outline:`1px solid ${A.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:A.selection},".cm-activeLine":{backgroundColor:A.activeLine},".cm-selectionMatch":{backgroundColor:A.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:A.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:A.background,color:A.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:A.background},".cm-lineNumbers .cm-gutterElement":{color:A.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:A.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:A.foreground},".cm-tooltip":{border:`1px solid ${A.dropdownBorder}`,backgroundColor:A.dropdownBackground,color:A.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:A.foreground,borderBottomColor:A.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:A.selection,color:A.foreground}}},{dark:A.dark}),Hh=j.HighlightStyle.define([{tag:i.tags.keyword,color:A.keyword},{tag:[i.tags.name,i.tags.deleted,i.tags.character,i.tags.macroName],color:A.variable},{tag:[i.tags.propertyName],color:A.function},{tag:[i.tags.processingInstruction,i.tags.string,i.tags.inserted,i.tags.special(i.tags.string)],color:A.string},{tag:[i.tags.function(i.tags.variableName),i.tags.labelName],color:A.function},{tag:[i.tags.color,i.tags.constant(i.tags.name),i.tags.standard(i.tags.name)],color:A.constant},{tag:[i.tags.definition(i.tags.name),i.tags.separator],color:A.variable},{tag:[i.tags.className],color:A.class},{tag:[i.tags.number,i.tags.changed,i.tags.annotation,i.tags.modifier,i.tags.self,i.tags.namespace],color:A.number},{tag:[i.tags.typeName],color:A.type,fontStyle:A.type},{tag:[i.tags.operator,i.tags.operatorKeyword],color:A.keyword},{tag:[i.tags.url,i.tags.escape,i.tags.regexp,i.tags.link],color:A.regexp},{tag:[i.tags.meta,i.tags.comment],color:A.comment},{tag:i.tags.strong,fontWeight:"bold"},{tag:i.tags.emphasis,fontStyle:"italic"},{tag:i.tags.link,textDecoration:"underline"},{tag:i.tags.heading,fontWeight:"bold",color:A.heading},{tag:[i.tags.atom,i.tags.bool,i.tags.special(i.tags.variableName)],color:A.variable},{tag:i.tags.invalid,color:A.invalid},{tag:i.tags.strikethrough,textDecoration:"line-through"}]),Uh=[Rh,(0,j.syntaxHighlighting)(Hh)],M={name:"tokyoNightDay",dark:!1,background:"#e1e2e7",foreground:"#6a6f8e",selection:"#8591b840",cursor:"#3760bf",dropdownBackground:"#e1e2e7",dropdownBorder:"#6a6f8e",activeLine:"#a7aaba22",lineNumber:"#b3b6cd",lineNumberActive:"#68709a",matchingBracket:"#e9e9ec",keyword:"#9854f1",storage:"#9854f1",variable:"#3760bf",parameter:"#3760bf",function:"#2e7de9",string:"#587539",constant:"#9854f1",type:"#07879d",class:"#3760bf",number:"#b15c00",comment:"#9da3c2",heading:"#006a83",invalid:"#ff3e64",regexp:"#2e5857"},Wh=U.EditorView.theme({"&":{color:M.foreground,backgroundColor:M.background},".cm-content":{caretColor:M.cursor},".cm-cursor, .cm-dropCursor":{borderLeftColor:M.cursor},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:M.selection},".cm-panels":{backgroundColor:M.dropdownBackground,color:M.foreground},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:M.dropdownBackground,outline:`1px solid ${M.dropdownBorder}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:M.selection},".cm-activeLine":{backgroundColor:M.activeLine},".cm-selectionMatch":{backgroundColor:M.selection},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:M.matchingBracket,outline:"none"},".cm-gutters":{backgroundColor:M.background,color:M.foreground,border:"none"},".cm-activeLineGutter":{backgroundColor:M.background},".cm-lineNumbers .cm-gutterElement":{color:M.lineNumber},".cm-lineNumbers .cm-activeLineGutter":{color:M.lineNumberActive},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:M.foreground},".cm-tooltip":{border:`1px solid ${M.dropdownBorder}`,backgroundColor:M.dropdownBackground,color:M.foreground},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:M.foreground,borderBottomColor:M.foreground},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:M.selection,color:M.foreground}}},{dark:M.dark}),qh=j.HighlightStyle.define([{tag:i.tags.keyword,color:M.keyword},{tag:[i.tags.name,i.tags.deleted,i.tags.character,i.tags.macroName],color:M.variable},{tag:[i.tags.propertyName],color:M.function},{tag:[i.tags.processingInstruction,i.tags.string,i.tags.inserted,i.tags.special(i.tags.string)],color:M.string},{tag:[i.tags.function(i.tags.variableName),i.tags.labelName],color:M.function},{tag:[i.tags.color,i.tags.constant(i.tags.name),i.tags.standard(i.tags.name)],color:M.constant},{tag:[i.tags.definition(i.tags.name),i.tags.separator],color:M.variable},{tag:[i.tags.className],color:M.class},{tag:[i.tags.number,i.tags.changed,i.tags.annotation,i.tags.modifier,i.tags.self,i.tags.namespace],color:M.number},{tag:[i.tags.typeName],color:M.type,fontStyle:M.type},{tag:[i.tags.operator,i.tags.operatorKeyword],color:M.keyword},{tag:[i.tags.url,i.tags.escape,i.tags.regexp,i.tags.link],color:M.regexp},{tag:[i.tags.meta,i.tags.comment],color:M.comment},{tag:i.tags.strong,fontWeight:"bold"},{tag:i.tags.emphasis,fontStyle:"italic"},{tag:i.tags.link,textDecoration:"underline"},{tag:i.tags.heading,fontWeight:"bold",color:M.heading},{tag:[i.tags.atom,i.tags.bool,i.tags.special(i.tags.variableName)],color:M.variable},{tag:i.tags.invalid,color:M.invalid},{tag:i.tags.strikethrough,textDecoration:"line-through"}]),Kh=[Wh,(0,j.syntaxHighlighting)(qh)],Gh={disabled:!1,indentWithTab:!0,tabSize:4,autofocus:!1,placeholder:"input...",backgroundColor:"white",language:"markdown",theme:"oneDark",phrases:"en-us"},an={emits:["update:config"],components:{CodemirrorEditor:ah},data(){return{codemrrConfig:{...Gh},codemrrThemes:{oneDark:hh,materialLight:vh,materialDark:bh,solarizedLight:_h,solarizedDark:Sh,dracula:xh,githubLight:Th,githubDark:Fh,aura:Mh,tokyoNight:jh,tokyoNightStorm:Uh,tokyoNightDay:Kh},codemrrLanguages:{javascript:(0,ca.javascript)(),js:(0,ca.javascript)(),html:(0,jn.html)(),markdown:(0,Hn.markdown)(),json:(0,Rn.json)(),vue:(0,Un.vue)(),java:(0,qn.java)(),php:(0,Wn.php)(),python:(0,Kn.python)(),go:(0,Yn.go)(),mysql:(0,da.sql)(),sql:(0,da.sql)(),xml:(0,Gn.xml)(),css:(0,Zn.css)()},codemrrPhrases:{"Control character":"Steuerzeichen","Selection deleted":"Auswahl gelöscht","Folded lines":"Eingeklappte Zeilen","Unfolded lines":"Ausgeklappte Zeilen",to:"bis","folded code":"eingeklappter Code",unfold:"ausklappen","Fold line":"Zeile einklappen","Unfold line":"Zeile ausklappen","Go to line":"Springe zu Zeile",go:"OK",Find:"Suchen",Replace:"Ersetzen",next:"nächste",previous:"vorherige",all:"alle","match case":"groß/klein beachten","by word":"ganze Wörter",replace:"ersetzen","replace all":"alle ersetzen",close:"schließen","current match":"aktueller Treffer","replaced $ matches":"$ Treffer ersetzt","replaced match on line $":"Treffer on Zeile $ ersetzt","on line":"auf Zeile",Completions:"Vervollständigungen",Diagnostics:"Diagnosen","No diagnostics":"Keine Diagnosen"},editorViewInst:null,editorStateInst:null}},computed:{optionTheme(){let e=Object.keys(this.codemrrThemes);return["default"].concat(e)},optionPhrases(){return["en-us","de-de"]},optionLanguage(){return Object.keys(this.codemrrLanguages)},extensions(){const e=[];return e.push(this.codemrrLanguages[this.codemrrConfig.language]),this.codemrrThemes[this.codemrrConfig.theme]&&e.push(this.codemrrThemes[this.codemrrConfig.theme]),e},codemrrBind(){return{theme:this.codemrrConfig.theme,language:this.codemrrConfig.language,autofocus:this.codemrrConfig.autofocus,placeholder:this.codemrrConfig.placeholder,indentWithTab:this.codemrrConfig.indentWithTab,tabSize:this.codemrrConfig.tabSize,disabled:this.codemrrConfig.disabled,phrases:this.codemrrConfig.phrases==="en-us"?{}:this.codemrrPhrases}}},watch:{codemrrConfig(e){this.$emit("update:config",e)}}},ge={props:{editorID:{type:[String],required:!1,default(){return""}}},data(){return{editorRefEL:null}},computed:{editorRefID(){return this.editorID?this.editorID:this.$options.name+ +new Date+((Math.random()*1e3).toFixed(0)+"")}}};function nn(e,o){var a=document.createElement("a");if(a.setAttribute("href","data:text/plain;charset=UTF-8,"+encodeURIComponent(e)),a.setAttribute("download",o),a.style.display="none",document.createEvent){const r=document.createEvent("MouseEvents");r.initEvent("click",!0,!0),a.dispatchEvent(r)}else a.click()}function $e(e){return e<10?"0"+e:e}var Yh={undo:!1,redo:!1,strong:!0,italic:!0,overline:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,hr:!0,quote:!0,ul:!0,ol:!0,notChecked:!0,checked:!0,link:!0,table:!0,image:!0,uploadImage:!0,custom_image:!0,custom_uploadImage:!0,custom_uploadFile:!0,importmd:!0,exportmd:!0,code:!0,html_to_markdown:!0,split:!0,preview:!0,scrollSync:!0,save:!0,clear:!0,copy:!0,toc:!0,fullscreen:!0,theme:!0,backgroundColor:!1,language:!1,phrases:!1,disabled:!1,autofocus:!1,indentWithTab:!1},Zh={name:"SvgImgMap"},Qh={t:"1713021153946",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1924",width:"20",height:"20"};function Xh(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",Qh,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{d:"M659.456 786.432l-114.688-188.416c-4.10112-8.192-8.19712-12.28288-16.384-12.28288-4.096 0-8.19712 4.096-12.288 4.096l-57.344 57.344-61.44-90.11712c-4.096-8.192-8.192-12.28288-16.384-12.28288s-12.288 4.096-16.384 8.192l-151.552 225.28c0 4.096-4.096 8.192-4.096 12.288 0 12.28288 8.192 20.48 20.48 20.48h413.696c12.288 0 20.48-8.19712 20.48-20.48l-4.096-4.10112zM286.72 512c40.96 0 73.728-32.768 73.728-73.728S327.68 364.544 286.72 364.544s-73.728 32.768-73.728 73.728C208.896 479.232 245.76 512 286.72 512zM851.968 98.304H323.584c-40.96 0-73.728 32.768-73.728 73.728v20.48c0 12.288 8.192 20.48 20.48 20.48s16.384-12.288 16.384-20.48v-20.48c0-20.48 16.384-36.864 36.864-36.864h528.384c20.48 0 36.85888 16.384 36.85888 36.864v528.384c0 20.48-16.37888 36.864-36.85888 36.864h-20.48c-12.288 0-20.48 8.192-20.48 20.48s8.192 20.48 20.48 20.48h20.48c40.96 0 73.72288-32.768 73.72288-73.728v-532.48c0.00512-40.96-32.76288-73.728-73.72288-73.728z","p-id":"1925"},null,-1),(0,t.createElementVNode)("path",{d:"M700.416 249.856H172.032c-40.96 0-73.728 32.768-73.728 73.728v528.384c0 40.96 32.768 73.72288 73.728 73.72288h528.384c40.96 0 73.728-32.76288 73.728-73.72288V323.584c0-40.96-32.768-73.728-73.728-73.728z m36.864 602.112c0 20.48-16.384 36.85888-36.864 36.85888H172.032c-20.48 0-36.864-16.37888-36.864-36.85888V323.584c0-20.48 16.384-36.864 36.864-36.864h528.384c20.48 0 36.864 16.384 36.864 36.864v528.384z","p-id":"1926"},null,-1)])])}var Jh=y(Zh,[["render",Xh]]),e0={name:"SvgUploadFile"},t0={t:"1599285632421",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"45640",width:"17",height:"17"};function o0(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",t0,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{d:"M127.519 892.879v-763.34h655.448V514.69h63.612V81.831c0-8.783-7.12-15.903-15.903-15.903H79.81c-8.783 0-15.903 7.12-15.903 15.903v858.757c0 8.783 7.12 15.903 15.903 15.903h493.993v-63.612H127.519z","p-id":"45641"},null,-1),(0,t.createElementVNode)("path",{d:"M231.608 228.388h447.269V292H231.608zM231.608 384.409h447.269v63.612H231.608zM231.608 540.43h245.141v63.612H231.608zM231.608 696.451h245.141v63.612H231.608zM923.269 762.938L745.315 584.984c-3.545-3.545-8.34-5.074-12.966-4.596a15.931 15.931 0 0 0-9.848 4.616L544.586 762.918c-6.248 6.248-6.248 16.379 0 22.627l22.353 22.353c6.248 6.248 16.379 6.248 22.627 0l112.555-112.555v245.148c0 8.837 7.163 16 16 16h31.612c8.837 0 16-7.163 16-16V695.363l112.555 112.555c6.248 6.248 16.379 6.248 22.627 0l22.353-22.353c6.249-6.248 6.249-16.378 0.001-22.627z","p-id":"45642"},null,-1)])])}var a0=y(e0,[["render",o0]]),n0={name:"SvgToc"},l0={t:"1611551476626",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"4615",width:"22",height:"22"};function r0(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",l0,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{d:"M370.1 371.5h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.1-2.6 5.7-5.7 5.7z m333.5-7.6H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.2-2.7 5.7-5.8 5.7zM370.1 712.4h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.2-2.6 5.7-5.7 5.7z m333.5-7.5H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.1-2.7 5.7-5.8 5.7zM370.1 542.5h-49.6c-3.1 0-5.7-2.5-5.7-5.7v-49.6c0-3.1 2.5-5.7 5.7-5.7h49.6c3.1 0 5.7 2.5 5.7 5.7v49.6c0 3.1-2.6 5.7-5.7 5.7z m333.5-7.6H460.5c-3.1 0-5.7-2.5-5.7-5.7v-34.5c0-3.1 2.5-5.7 5.7-5.7h243.2c3.1 0 5.7 2.5 5.7 5.7v34.5c-0.1 3.2-2.7 5.7-5.8 5.7z","p-id":"4616"},null,-1),(0,t.createElementVNode)("path",{d:"M847.1 560.4V250.1s0-24.7-14-46.4c-10.8-16.8-30-31.8-64.2-31.8h-261c-0.2 0-0.3 0-0.5 0.1H255s-78.1 0-78.1 78.1l0.1 213.4V774s0 24.7 13.9 46.3c10.8 16.8 30 31.8 64.2 31.8h261.1c0.2 0 0.3 0 0.5-0.1H769s78.1 0 78.1-78.1l-0.1-213.4 0.1-0.1z m-39 213.6c-1.3 38.5-38.9 39-38.9 39h-514c-1.3-0.1-2.5-0.2-3.8-0.3-5.4-1.1-15.7-4.1-23.9-11.7-9-9.7-11.2-22.3-11.7-26.1v-0.7l0.1-524.2c1.3-38.5 38.9-39 38.9-39h514c1.3 0.1 2.5 0.2 3.7 0.3 5.4 1.1 15.7 4.1 23.9 11.7 9 9.7 11.2 22.2 11.7 26 0 0.2 0 0.5 0.1 0.7l-0.1 524.3z","p-id":"4617"},null,-1)])])}var i0=y(n0,[["render",r0]]),s0={name:"SvgCopy"},c0={t:"1713097613984",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"6856",width:"18",height:"18"};function d0(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",c0,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{d:"M857.373005 65.290005 469.604424 65.290005c-34.211173 0-62.044078 27.832905-62.044078 62.043055l0 10.340509-63.076594 0c-25.993001 0-48.228421 16.346293-57.001225 39.293935L166.626995 176.967504c-34.21015 0-62.043055 27.832905-62.043055 62.043055l0 657.655358c0 34.21015 27.832905 62.043055 62.043055 62.043055l550.115086 0c34.21015 0 62.043055-27.832905 62.043055-62.043055l0-49.634444 78.587869 0c34.21015 0 62.043055-27.832905 62.043055-62.043055L919.41606 127.33306C919.41606 93.122911 891.583155 65.290005 857.373005 65.290005zM344.483752 179.035606l194.402595 0c10.833743 0 19.646456 8.813736 19.646456 19.646456 0 10.833743-8.813736 19.646456-19.646456 19.646456L344.483752 218.328517c-10.833743 0-19.646456-8.813736-19.646456-19.646456C324.836273 187.849342 333.650009 179.035606 344.483752 179.035606zM737.423099 896.665917c0 11.402701-9.278317 20.681018-20.681018 20.681018L166.626995 917.346935c-11.403724 0-20.681018-9.278317-20.681018-20.681018L145.945977 239.010559c0-11.402701 9.277294-20.681018 20.681018-20.681018l120.111588 0c8.197706 24.02723 30.977525 41.362037 57.744145 41.362037l194.402595 0c26.767644 0 49.54644-17.334807 57.744145-41.362037l120.111588 0c11.402701 0 20.681018 9.278317 20.681018 20.681018L737.422076 896.665917zM878.054023 784.988418c0 11.402701-9.278317 20.681018-20.681018 20.681018l-78.587869 0L778.785136 239.010559c0-34.21015-27.832905-62.043055-62.043055-62.043055L595.886549 176.967504c-8.771781-22.947641-31.007201-39.293935-57.001225-39.293935l-89.963964 0L448.921359 127.33306c0-11.403724 9.278317-20.681018 20.683065-20.681018l387.768581 0c11.402701 0 20.681018 9.277294 20.681018 20.681018L878.054023 784.988418z","p-id":"6857"},null,-1),(0,t.createElementVNode)("path",{d:"M620.597347 334.252737 260.748652 334.252737c-11.422144 0-20.681018 9.259898-20.681018 20.681018s9.258874 20.681018 20.681018 20.681018l359.849718 0c11.42112 0 20.681018-9.259898 20.681018-20.681018S632.018467 334.252737 620.597347 334.252737z","p-id":"6858"},null,-1),(0,t.createElementVNode)("path",{d:"M620.597347 454.201619 260.748652 454.201619c-11.422144 0-20.681018 9.259898-20.681018 20.681018 0 11.42112 9.258874 20.681018 20.681018 20.681018l359.849718 0c11.42112 0 20.681018-9.259898 20.681018-20.681018C641.278365 463.46254 632.018467 454.201619 620.597347 454.201619z","p-id":"6859"},null,-1),(0,t.createElementVNode)("path",{d:"M440.673511 574.151525 260.748652 574.151525c-11.422144 0-20.681018 9.259898-20.681018 20.681018 0 11.42112 9.258874 20.681018 20.681018 20.681018l179.924859 0c11.42112 0 20.681018-9.259898 20.681018-20.681018C461.35453 583.411423 452.093609 574.151525 440.673511 574.151525z","p-id":"6860"},null,-1)])])}var u0=y(s0,[["render",d0]]),m0={name:"SvgLanguage"},p0={t:"1713109019954",class:"icon",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"13071",width:"18",height:"18"};function h0(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("svg",p0,[...o[0]||(o[0]=[(0,t.createElementVNode)("path",{d:"M200.313605 806.764028h487.993851v78.708685h-487.993851z",fill:"#6C7280","p-id":"13072"},null,-1),(0,t.createElementVNode)("path",{d:"M809.518832 136.166026H79.102229a78.708686 78.708686 0 0 0-78.708686 78.708686V944.504228a78.708686 78.708686 0 0 0 78.708686 78.708685h730.416603a78.708686 78.708686 0 0 0 78.708685-78.708685V214.874712a78.708686 78.708686 0 0 0-78.708685-78.708686z m0 848.479631V944.504228H79.102229V214.874712h730.416603V944.504228z","p-id":"13073"},null,-1),(0,t.createElementVNode)("path",{d:"M944.897771 0H171.978478v78.708686H944.897771v787.086856h78.708686V78.708686a78.708686 78.708686 0 0 0-78.708686-78.708686z","p-id":"13074"},null,-1),(0,t.createElementVNode)("path",{d:"M360.092237 609.205227h161.352805l44.863951 117.275941h58.244427l-157.417371-385.672559h-55.09608L263.280553 725.694081H315.228286z m57.45734-157.417372a487.206764 487.206764 0 0 0 20.464259-73.986164q8.657955 31.483474 27.548039 78.708686l40.14143 107.043812H375.046887z","p-id":"13075"},null,-1)])])}var g0=y(m0,[["render",h0]]),Xo={components:{SvgImgMap:Jh,SvgUploadFile:a0,SvgToc:i0,SvgCopy:u0,SvgLanguage:g0},emits:["on-action","on-act-copy","on-act-save","on-act-theme","on-act-custom","on-act-choose-image"],props:{exportFileName:{type:String,default:""},toolbars:{type:Object,default(){return{}}},isPreview:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1}},data(){return{actionThemeDropdown:!1,actionPhrasesDropdown:!1,actionLanguageDropdown:!1,actionBgColorDropdown:!1,actionSplit:!0,actionPreview:!1,actionScrollSync:!0,actionToc:!0,actionFullscreen:!1,actionHtmlDiaVisible:!1,actionHtmlText:""}},computed:{lastExpFileName(){let e=new Date,o=e.getFullYear(),a=e.getMonth()+1,r=e.getDate(),n=e.getHours(),l=e.getMinutes(),s=o+"-"+$e(a)+"-"+$e(r)+"_"+$e(n)+"-"+$e(l);return this.exportFileName||s},toolConfig(){const{toolbars:e={}}=this;return{...Yh,...e}}},created(){this.actionPreview=this.isPreview||!1},methods:{actionPhrasesSet(e){this.codemrrConfig.phrases=e,this.actionPhrasesDropdown=!1},actionLanguageSet(e){this.codemrrConfig.language=e,this.actionLanguageDropdown=!1},actionBgColorSet(e){this.codemrrConfig.backgroundColor=e,this.actionBgColorDropdown=!1},actionThemesSet(e){this.codemrrConfig.theme=e,this.actionThemeDropdown=!1,this.$emit("on-act-theme",e)},actionFullscreenSet(e){this.actionFullscreen=e;let o=this.$refs[this.editorWrapRefID];e?o.classList.add("fullscreen"):o.classList.remove("fullscreen"),this.actionCurrent("fullscreen",e)},actionChooseImage(){const e=document.createElement("input");e.type="file",e.accept="image/*",e.onchange=()=>{const o=e.files;o[0]&&(this.$emit("on-act-choose-image",o[0]),e.value="")},e.click()},actionInsBg(){const e=this.getLastPoint(),o=e.content||!1;o?this.insertContent("=="+o+"=="):(this.insertContent("===="),this.setCursor(e.line,e.ch+1))},actionUndo(){if(this.editorViewInst){const e=this.editorViewInst.state.behavior(X.EditorState.effect(X.EditorState.undo));this.editorViewInst.update([{changes:{from:0,to:e.doc.length,insert:e.doc},selection:X.EditorSelection.single(0)}])}},actionRedo(){this.editorViewInst&&this.editorViewInst.dispatch({...this.editorViewInst.state,effects:X.EditorState.redo()})},actionInsStrong(){const e=this.getLastPoint(),o=e.content||!1;let a="";o?(a="**"+o+"**",this.deleteContent(e.start,e.end),this.insertContent(e.start,a)):(a="****",this.insertContent(e.start,a)),this.setCursor(e.start+a.length,e.start+a.length)},actionInsItalic(){const e=this.getLastPoint(),o=e.content||!1;let a="";o?(a="*"+o+"*",this.deleteContent(e.start,e.end),this.insertContent(e.start,a)):(a="**",this.insertContent(e.start,a)),this.setCursor(e.start+a.length,e.start+a.length)},actionInsOverline(){const e=this.getLastPoint(),o=e.content||!1;let a="";o?(a="~~"+o+"~~",this.deleteContent(e.start,e.end),this.insertContent(e.start,a)):(a="~~~~",this.insertContent(e.start,a)),this.setCursor(e.start+a.length,e.start+a.length)},actionInsUnderline(){const e=this.getLastPoint(),o=e.content||!1;let a="";o?(a="<u>"+o+"</u>",this.deleteContent(e.start,e.end),this.insertContent(e.start,a)):(a="<u></u>",this.insertContent(e.start,a)),this.setCursor(e.start+a.length,e.start+a.length)},actionInsTitle(e){const o={1:"# ",2:"## ",3:"### ",4:"#### ",5:"##### ",6:"###### "}[e],a=this.getLastPoint(),r=a.content||!1;let n=`
8
2
  `+o+`标题
9
3
 
10
4
  `;r?r.startsWith("#")?this.insertContent(a.end+1,n):(n=`
@@ -29,12 +23,12 @@ row 2 col 1 | row 2 col 2
29
23
 
30
24
  `,this.insertContent(e.end,o),this.setCursor(e.start+o.length,e.start+o.length)},actionInsImage(){const e=this.getLastPoint();let o="";o=`
31
25
 
32
- ![图片](https://f.10yun.com/default/default.gif)`,this.insertContent(e.end,o),this.setCursor(e.start+o.length,e.start+o.length)},actionImportFile(e){const o=e.target.files[0];if(!o)return;const{type:a}=o;if(!["text/markdown","text/src"].includes(a))return;const r=new FileReader;r.readAsText(o,{encoding:"utf-8"}),r.onload=()=>{this.localVal=r.result},r.onerror=n=>{}},actionExportFile(){let e=".text";const o={java:".java",php:".php",css:".css",vue:".vue",go:".go",python:".py",json:".json",javascript:".js",js:".js",html:".html",markdown:".md"};this.language&&o[this.language]&&(e=o[this.language]),aa(this.localVal,this.lastExpFileName+e)},insertCode(){const e=this.getLastPoint(),o=e.content||!1;let a="";o?(a="\n```text\n"+o+"\n```\n",this.deleteContent(e.start,e.end),this.insertContent(e.start,a)):(a="\n```text\n\n```\n",this.insertContent(e.start,a)),this.setCursor(e.start+a.length,e.start+a.length)},actionSaveSet(){const{localVal:e,codemrrConfig:o,lastHtml:a}=this;this.$emit("on-act-save",{theme:o.theme||"",value:e||"",html:a||""})},actionCopySet(){this.$cvCopy(this.localVal),this.$emit("on-act-copy",this.localVal)},actionHtmlVisible(e){this.actionHtmlText="",e?this.actionHtmlDiaVisible=!0:this.actionHtmlDiaVisible=!1},actionHtmlToMD(){const e=this.getLastPoint();let o="";o=`
33
- `+(0,ao.default)(this.actionHtmlText),this.insertContent(e.end,o),this.setCursor(e.start+o.length,e.start+o.length),this.actionHtmlText="",this.actionHtmlDiaVisible=!1},actionCurrent(e,o){this.$emit("on-action",e,o)},actionCustom(e){this.$emit("on-act-custom",e)}}},Gm={name:"cvEditorCode",mixins:[oa,Q,uo],emits:["update:modelValue","on-ready"],props:{modelValue:{type:[String,Number],default:""},options:{type:[Object],default:()=>({autoRefresh:!0,autofocus:!1,lineNumbers:!0,tabSize:4,indentUnit:2,line:!0,styleActiveLine:!0})},toolbars:{type:[Object],default(){return{}}},language:{type:[String],default:""},theme:{type:[String],default:"oneDark"},readOnly:{type:[Boolean],default:!1},autoSave:{type:[Boolean],default:!1},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:600},bordered:{type:[Boolean],default:!0}},data(){return{localVal:"",heightMainPx:"",editorWrapRefEL:null}},watch:{localVal(e){this.$emit("update:modelValue",e)},modelValue(e){this.localVal!=e&&(this.localVal=e)},height(e){this.heightMainPx=this.getHeightMainPx()}},computed:{editorWrapRefID(){return this.editorRefID+"wrap"},heightTotalPx(){let e=""+this.height;return e.includes("%")||e.includes("px")?e:e+"px"},widthTotalPx(){let e=""+this.width;return e.includes("px")?e:e+"px"}},created(){this.localVal=this.modelValue,this.codemrrConfig.disabled=this.readOnly||!1},mounted(){this.heightMainPx=this.getHeightMainPx(),this.optionLanguage.includes(this.language)&&(this.codemrrConfig.language=this.language),this.optionTheme.includes(this.theme)&&(this.codemrrConfig.theme=this.theme)},destroyed(){},methods:{getHeightMainPx(){this.editorWrapRefEL=this.$refs[this.editorWrapRefID];const e=this.editorWrapRefEL.querySelector(".cv-editor-code-toolbar").offsetHeight;return e?this.heightTotalPx.includes("%")?`calc(100% - ${e}px - 2px)`:this.heightTotalPx.replace("px","")-e-2+"px":this.heightTotalPx},consoleLog(e,o){},initEditorReady(e){const{container:o,state:a,view:r}=e;this.editorStateInst=a,this.editorViewInst=r,this.listerenEvent(),this.$emit("on-ready")},listerenEvent(){}}},Zm={key:0,class:"cv-editor-code-toolbar","data-title":"头部工具栏"},Qm={class:"cv-editor-toolbars"},Jm={name:"导入文件",class:"import-file"},eh={name:"保存到本地"},th={key:1,class:"shift-theme",name:"主题"},oh=["onClick"],ah={class:"shift-theme",name:"语言"},nh=["onClick"],lh={class:"icon-svg"},rh={key:5,class:"segmentation"},ih=["name"],sh={title:"编辑器",class:"cv-editor-code-main"};function ch(e,o,a,r,n,l){const i=(0,t.resolveComponent)("SvgLanguage"),c=(0,t.resolveComponent)("SvgCopy"),d=(0,t.resolveComponent)("CodemirrorEditor");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{ref:l.editorWrapRefID,class:(0,t.normalizeClass)(["cv-editor-code-wrap cv-editor-vars",`${a.bordered?"border":""}`]),style:(0,t.normalizeStyle)({width:l.widthTotalPx,height:l.heightTotalPx})},[e.actionPreview?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",Zm,[(0,t.createElementVNode)("ul",Qm,[e.$slots.title?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)("li",null,[(0,t.renderSlot)(e.$slots,"title")]),o[16]||(o[16]=(0,t.createElementVNode)("li",{class:"segmentation"},[(0,t.createElementVNode)("div")],-1))],64)):(0,t.createCommentVNode)("",!0),(0,t.withDirectives)((0,t.createElementVNode)("li",Jm,[(0,t.createElementVNode)("span",{class:"iconfont icon-daoru",onClick:o[0]||(o[0]=(...u)=>e.actionImportFile&&e.actionImportFile(...u))}),(0,t.createElementVNode)("input",{type:"file",onChange:o[1]||(o[1]=u=>e.actionImportFile(u)),accept:"text/markdown"},null,32)],512),[[t.vShow,e.toolConfig.importmd]]),(0,t.withDirectives)((0,t.createElementVNode)("li",eh,[(0,t.createElementVNode)("span",{class:"iconfont icon-download",onClick:o[2]||(o[2]=(...u)=>e.actionExportFile&&e.actionExportFile(...u))})],512),[[t.vShow,e.toolConfig.exportmd]]),o[20]||(o[20]=(0,t.createElementVNode)("li",{class:"segmentation"},[(0,t.createElementVNode)("div")],-1)),e.toolConfig.theme?((0,t.openBlock)(),(0,t.createElementBlock)("li",th,[(0,t.createElementVNode)("span",{class:"iconfont icon-theme",onClick:o[3]||(o[3]=u=>e.actionThemeDropdown=!e.actionThemeDropdown)}),(0,t.createElementVNode)("ul",{class:(0,t.normalizeClass)({active:e.actionThemeDropdown}),onMouseleave:o[4]||(o[4]=u=>e.actionThemeDropdown=!1)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.optionTheme,u=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{onClick:m=>e.actionThemesSet(u)},(0,t.toDisplayString)(u),9,oh))),256))],34)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("li",ah,[(0,t.createElementVNode)("span",{class:"icon-svg",onClick:o[5]||(o[5]=u=>e.actionLanguageDropdown=!e.actionLanguageDropdown)},[(0,t.createVNode)(i)]),(0,t.createElementVNode)("ul",{class:(0,t.normalizeClass)({active:e.actionLanguageDropdown}),onMouseleave:o[6]||(o[6]=u=>e.actionLanguageDropdown=!1)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.optionLanguage,u=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{class:(0,t.normalizeClass)(u==a.language?"active":""),onClick:m=>e.actionLanguageSet(u)},(0,t.toDisplayString)(u),11,nh))),256))],34)]),o[21]||(o[21]=(0,t.createElementVNode)("li",{class:"empty"},null,-1)),e.toolConfig.copy?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:2,name:"复制",onClick:o[7]||(o[7]=(...u)=>e.actionCopySet&&e.actionCopySet(...u))},[(0,t.createElementVNode)("span",lh,[(0,t.createVNode)(c)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.clear?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:3,name:"清空",onClick:o[8]||(o[8]=u=>n.localVal="")},[...o[17]||(o[17]=[(0,t.createElementVNode)("span",{class:"iconfont icon-clear"},null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.save?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:4,name:"保存",onClick:o[9]||(o[9]=(...u)=>e.actionSaveSet&&e.actionSaveSet(...u))},[...o[18]||(o[18]=[(0,t.createElementVNode)("span",{class:"iconfont icon-save"},null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.fullscreen?((0,t.openBlock)(),(0,t.createElementBlock)("li",rh,[...o[19]||(o[19]=[(0,t.createElementVNode)("div",null,null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.fullscreen?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:6,name:e.actionFullscreen?"退出全屏":"全屏"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[10]||(o[10]=u=>e.actionFullscreenSet(!1)),class:"iconfont icon-quite"},null,512),[[t.vShow,e.actionFullscreen]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[11]||(o[11]=u=>e.actionFullscreenSet(!0)),class:"iconfont icon-fullscreen"},null,512),[[t.vShow,!e.actionFullscreen]])],8,ih)):(0,t.createCommentVNode)("",!0)])])),(0,t.createElementVNode)("div",sh,[(0,t.createVNode)(d,(0,t.mergeProps)(e.codemrrBind,{id:e.editorRefID,ref:e.editorRefID,style:{height:n.heightMainPx,backgroundColor:e.codemrrConfig.backgroundColor},extensions:e.extensions,modelValue:n.localVal,"onUpdate:modelValue":o[12]||(o[12]=u=>n.localVal=u),onReady:l.initEditorReady,onChange:o[13]||(o[13]=u=>l.consoleLog("change",u)),onFocus:o[14]||(o[14]=u=>l.consoleLog("focus",u)),onBlur:o[15]||(o[15]=u=>l.consoleLog("blur",u))}),null,16,["id","style","extensions","modelValue","onReady"])])],6)}var Ot=f(Gm,[["render",ch]]),dh={name:"cvEditorJson",components:{},mixins:[Q],props:{modelValue:{type:[Object,Array,Number,String,Boolean],default:""},mode:{type:[String],default:"text"},readOnly:{type:[Boolean],default:!1},options:{type:[Object],default:()=>({mode:"text"})},height:{type:String},plus:{type:Boolean,default:!0}},data(){return{editorInstance:null,style:{},max:!1,internalChange:!1,localVal:""}},watch:{modelValue:{handler(e){this.localVal!=e&&(this.localVal=e,this.updateVal(e))},deep:!0},max(e){this.$nextTick(()=>{this.initNewCreate()})},options:{handler(e){this.options&&this.options.mode&&this.editorInstance},deep:!0}},computed:{getHeight(){return this.height&&!this.max?{height:this.height}:{}}},async mounted(){this.initNewCreate()},updated(){this.editorInstance.updateProps({mode:this.mode,readOnly:this.readOnly})},beforeUnmount(){this.destroyView()},beforeDestroy(){this.destroyView()},methods:{async initNewCreate(){const{JSONEditor:e}=await import("https://10ui.cn/jsoneditor/vanilla-jsoneditor@0.22.0/standalone.js");this.editorInstance||(this.editorInstance=new e({target:this.$refs[this.editorRefID],props:{value:this.modelValue,mode:this.mode,readOnly:this.readOnly,...this.options,onChange:this.onChange}}),this.updateVal(this.modelValue))},onChange(){let e=null,o={};try{o=this.editorInstance.get()}catch(a){e=a}e?this.$emit("error",e):this.editorInstance&&(this.internalChange=!0,this.localVal=o,this.$emit("update:modelValue",this.localVal),this.$nextTick(()=>{this.internalChange=!1}))},updateVal(e){this.editorInstance&&e!==void 0&&!this.internalChange&&this.editorInstance.update({json:e})},isJSON(e){try{return JSON.parse(e),!0}catch{return!1}},destroyView(){this.editor&&(this.editorInstance.destroy(),this.editor=null)},handleChange(e){this.emitData||(this.emitData=Ho(400,o=>{this.$emit("update:modelValue",o)})),this.emitData(e)}}};function uh(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["cv-editor-json",{"max-box":n.max,"min-box":!n.max}]),style:(0,t.normalizeStyle)(l.getHeight)},[(0,t.createElementVNode)("div",{ref:e.editorRefID,class:"jsoneditor-box"},null,512),(0,t.createElementVNode)("a",{onClick:o[0]||(o[0]=i=>n.max=!n.max),class:"max-btn"})],6)}var Mt=f(dh,[["render",uh]]),ph={name:"EditorSlideUpload",props:{color:{type:String,default:"#1890ff"},accept:{type:[String],default:"image/jpeg,image/gif,image/png"},upName:{type:[String],default:""},upAction:{type:[String],default:""},upResponseFn:{type:[Function],default:()=>{}},upHeaders:{type:[Object],default:()=>{}},upData:{type:[Object],default:()=>{}}},data(){return{dialogVisible:!1,listObj:{},fileList:[],diyUpList:new FormData}},methods:{checkAllSuccess(){return Object.keys(this.listObj).every(e=>this.listObj[e].hasSuccess)},handleSubmit(){const e=Object.keys(this.listObj).map(o=>this.listObj[o]);if(!this.checkAllSuccess()){this.$message("请等待所有图片上传成功。如果出现网络问题,请刷新页面并重新上传!");return}this.$emit("successCBK",e),this.listObj={},this.fileList=[],this.dialogVisible=!1},handleSuccess(e,o){const a=o.uid,r=Object.keys(this.listObj);for(let n=0,l=r.length;n<l;n++)if(this.listObj[r[n]].uid===a){this.upResponseFn&&typeof this.upResponseFn=="function"?this.listObj[r[n]].url=this.upResponseFn(e):this.listObj[r[n]].url=e.files.file||"",this.listObj[r[n]].hasSuccess=!0;return}},handleRemove(e){const o=e.uid,a=Object.keys(this.listObj);for(let r=0,n=a.length;r<n;r++)if(this.listObj[a[r]].uid===o){delete this.listObj[a[r]];return}},beforeUpload(e){const o=this,a=window.URL||window.webkitURL,r=e.uid;return this.listObj[r]={},new Promise((n,l)=>{const i=new Image;i.src=a.createObjectURL(e),i.onload=function(){o.listObj[r]={hasSuccess:!1,uid:e.uid,width:this.width,height:this.height}},n(!0)})}}},mh={class:"cv-editor-upload-container"};function hh(e,o,a,r,n,l){const i=(0,t.resolveComponent)("cv-icons"),c=(0,t.resolveComponent)("el-button"),d=(0,t.resolveComponent)("el-upload"),u=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createElementBlock)("div",mh,[(0,t.createVNode)(c,{style:(0,t.normalizeStyle)({background:a.color,borderColor:a.color,fontSize:"16px"}),type:"primary",onClick:o[0]||(o[0]=m=>n.dialogVisible=!0)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(i,{type:"ElIconUpload",size:"16",style:{"margin-right":"5px"}}),o[2]||(o[2]=(0,t.createTextVNode)(" 上传 ",-1))]),_:1},8,["style"]),(0,t.createVNode)(u,{visible:n.dialogVisible},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(d,(0,t.mergeProps)({class:"editor-slide-upload"},{action:a.upAction,headers:a.upHeaders,data:a.upData,name:a.upName,multiple:!0,showFileList:!0,listType:"picture-card",autoUpload:!0},{"file-list":n.fileList,"on-remove":l.handleRemove,"on-success":l.handleSuccess,"before-upload":l.beforeUpload}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{type:"primary"},{default:(0,t.withCtx)(()=>[...o[3]||(o[3]=[(0,t.createTextVNode)("点击上传",-1)])]),_:1})]),_:1},16,["file-list","on-remove","on-success","before-upload"]),(0,t.createVNode)(c,{onClick:o[1]||(o[1]=m=>n.dialogVisible=!1)},{default:(0,t.withCtx)(()=>[...o[4]||(o[4]=[(0,t.createTextVNode)("取消",-1)])]),_:1}),(0,t.createVNode)(c,{type:"primary",onClick:l.handleSubmit},{default:(0,t.withCtx)(()=>[...o[5]||(o[5]=[(0,t.createTextVNode)("确定",-1)])]),_:1},8,["onClick"])]),_:1},8,["visible"])])}var gh=f(ph,[["render",hh],["__scopeId","data-v-befb1a3e"]]),fh=["advlist","anchor","autolink","autosave","code","codesample","directionality","emoticons","fullscreen","image","insertdatetime","link","lists","media","nonbreaking","pagebreak","preview","save","searchreplace","table","visualblocks","visualchars","wordcount"],vh=fh,Ch=["hr blockquote anchor pagebreak insertdatetime table emoticons | searchreplace preview code codesample | fullscreen | link media image ","inserttemplate undo redo | styles | removeformat subscript superscript forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist indent"],kh=Ch,K=[];function bh(){return window.tinymce}var yh=(e,o)=>{const a=document.getElementById(e),r=o||function(){};if(!a){const i=document.createElement("script");i.src=e,i.id=e,document.body.appendChild(i),K.push(r),("onload"in i?n:l)(i)}a&&r&&(bh()?r(null,a):K.push(r));function n(i){i.onload=function(){this.onerror=this.onload=null;for(const c of K)c(null,i);K=null},i.onerror=function(){this.onerror=this.onload=null,r(new Error("Failed to load "+e),i)}}function l(i){i.onreadystatechange=function(){if(!(this.readyState!=="complete"&&this.readyState!=="loaded")){this.onreadystatechange=null;for(const c of K)c(null,i);K=null}}}},wh=yh,_h="https://10ui.cn/tinymce/@7.0.0/tinymce.min.js",Vh={inheritAttrs:!1,name:"cvEditorTinymce",components:{EditorSlideUpload:gh},emits:["update:modelValue"],mixins:[Q],props:{modelValue:{type:String,default:""},toolbar:{type:Array,required:!1,default(){return[]}},menubar:{type:String,default:"file edit insert view format table"},height:{type:[Number,String],required:!1,default:360},width:{type:[Number,String],required:!1,default:"100%"},uploadAttr:{type:[Object],default:()=>({})}},data(){return{localVal:"",fullscreen:!1,languageTypeList:{en:"en",zh:"zh_CN",es:"es_MX",ja:"ja"}}},computed:{containerWidth(){const e=this.width;return/^[\d]+(\.[\d]+)?$/.test(e)?`${e}px`:e}},watch:{modelValue(e){this.localVal!=e&&(this.localVal=e,window.tinymce.get(this.editorRefID).setContent(e||""))}},created(){this.localVal=this.modelValue},mounted(){this.initLoad()},activated(){window.tinymce&&this.initTinymce()},deactivated(){this.destroyTinymce()},destroyed(){this.destroyTinymce()},methods:{initLoad(){wh(_h,e=>{if(e){this.$message.error(e.message);return}this.initTinymce()})},initTinymce(){const e=this;window.tinymce.init({selector:`#${this.editorRefID}`,license_key:"gpl",language:this.languageTypeList.zh,height:this.height,body_class:"panel-body ",object_resizing:!1,toolbar:this.toolbar.length>0?this.toolbar:kh,menubar:this.menubar,plugins:vh,end_container_on_empty_block:!0,powerpaste_word_import:"clean",code_dialog_height:450,code_dialog_width:1e3,advlist_bullet_styles:"square",advlist_number_styles:"default",editimage_cors_hosts:["www.tinymce.com","codepen.io"],link_default_target:"_blank",link_title:!1,nonbreaking_force_tab:!0,init_instance_callback:o=>{e.localVal&&o.setContent(e.localVal)},setup(o){o.on("FullscreenStateChanged",a=>{e.fullscreen=a.state}),o.on("input",a=>{e.localVal=o.getContent(),e.$emit("update:modelValue",e.localVal)})},convert_urls:!1,images_upload_handler(o,a,r,n){n(0),new FormData}})},destroyTinymce(){const e=window.tinymce.get(this.editorRefID);this.fullscreen&&e.execCommand("mceFullScreen"),e&&e.destroy()},setContent(e){window.tinymce.get(this.editorRefID).setContent(e)},getContent(){window.tinymce.get(this.editorRefID).getContent()},imageSuccessCBK(e){e.forEach(o=>window.tinymce.get(this.editorRefID).insertContent(`<img class="wscnph" src="${o.url}" >`))}}},Sh=["id"],Bh={class:"editor-custom-btn-container"};function Nh(e,o,a,r,n,l){const i=(0,t.resolveComponent)("EditorSlideUpload");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["cv-editor-tinymce tinymce-container",{fullscreen:n.fullscreen}]),style:(0,t.normalizeStyle)({width:l.containerWidth})},[(0,t.createElementVNode)("textarea",{id:e.editorRefID,class:"tinymce-textarea"},null,8,Sh),(0,t.createElementVNode)("div",Bh,[(0,t.createVNode)(i,(0,t.mergeProps)({color:"#1890ff",class:"editor-upload-btn",onSuccessCBK:l.imageSuccessCBK},a.uploadAttr),null,16,["onSuccessCBK"])])],6)}var zt=f(Vh,[["render",Nh],["__scopeId","data-v-8cbc5d06"]]),Eh={name:"cvEditorMarkdown",mixins:[oa,Q,uo],emits:["update:modelValue","on-ready","on-upload-image"],props:{modelValue:{type:[String,Number],default:""},options:{type:[Object],default:()=>({})},toolbars:{type:[Object],default(){return{}}},language:{type:[String],default:"markdown"},theme:{type:[String],default:"light"},readOnly:{type:[Boolean],default:!1},autoSave:{type:[Boolean],default:!1},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:600},bordered:{type:[Boolean],default:!0}},data(){return{lastPos:"",lastInsert:"",lastHtml:"",scrollSide:"",localVal:"",heightMainPx:"",editorWrapRefEL:null}},watch:{localVal(e){this.$emit("update:modelValue",e)},modelValue(e){this.localVal!=e&&(this.localVal=e)},height(e){this.heightMainPx=this.getHeightMainPx()}},computed:{editorWrapRefID(){return this.editorRefID+"wrap"},previewRefID(){return this.editorRefID+"preview"},heightTotalPx(){let e=""+this.height;return e.includes("%")||e.includes("px")?e:e+"px"},widthTotalPx(){let e=""+this.width;return e.includes("px")?e:e+"px"}},created(){this.localVal=this.modelValue,this.codemrrConfig.disabled=this.readOnly||!1},mounted(){this.heightMainPx=this.getHeightMainPx()},destroyed(){},methods:{getHeightMainPx(){this.editorWrapRefEL=this.$refs[this.editorWrapRefID];const e=this.editorWrapRefEL.querySelector(".cv-editor-markdown-toolbar").offsetHeight;return e?this.heightTotalPx.includes("%")?`calc(100% - ${e}px - 2px)`:this.heightTotalPx.replace("px","")-e-2+"px":this.heightTotalPx},consoleLog(e,o){},initEditorReady(e){const{container:o,state:a,view:r}=e;this.editorStateInst=a,this.editorViewInst=r,this.listerenEvent(),this.$emit("on-ready")},listerenEvent(){this.editorWrapRefEL=this.$refs[this.editorWrapRefID],this.editorWrapRefEL.querySelector(".cv-editor-markdown-main .cm-scroller").addEventListener("scroll",this.markdownScroll),this.editorWrapRefEL.querySelector(".cv-markdown-preview .markdown-preview").addEventListener("scroll",this.previewScroll)},handlePaste(e,o){const{clipboardData:a={}}=o,{types:r=[],items:n}=a;let l=null;for(let i=0;i<r.length;i++)if(r[i]==="Files"){l=n[i];break}if(l){const i=l.getAsFile();/image/gi.test(i.type)&&(this.$emit("on-upload-image",i),o.preventDefault())}},setCursor(e,o){this.editorViewInst.dispatch({selection:{anchor:e,head:o}}),this.editorViewInst.focus()},GetContent(){const e=this.editorViewState.selection.main.head,o=this.editorViewState.doc.lineAt(e).number,a=this.editorViewState.doc.line(o).text.trim();return a===""?!1:a},deleteContent(e,o){this.editorViewInst.dispatch({changes:{from:e,to:o}})},getLastPoint(){const e=this.editorViewInst.state.selection.main.head,o=this.editorViewInst.state.doc.lineAt(e).number,a=this.editorViewInst.state.doc.line(o).from,r=this.editorViewInst.state.doc.line(o).to,n=this.editorViewInst.state.doc.line(o).text;return this.lastPos||{line:o,start:a,end:r,content:n}},insertContent(e,o){this.getLastPoint(),this.editorViewInst.dispatch({changes:{from:e,insert:o}})},listerenKeyupEnter(e){const{lastInsert:o}=this;o&&(["-","- [ ]","- [x]"].includes(o.trim())?(e.preventDefault(),this.insertContent(`
26
+ ![图片](https://f.10yun.com/default/default.gif)`,this.insertContent(e.end,o),this.setCursor(e.start+o.length,e.start+o.length)},actionImportFile(e){const o=e.target.files[0];if(!o)return;const{type:a}=o;if(!["text/markdown","text/src"].includes(a))return;const r=new FileReader;r.readAsText(o,{encoding:"utf-8"}),r.onload=()=>{this.localVal=r.result},r.onerror=n=>{}},actionExportFile(){let e=".text";const o={java:".java",php:".php",css:".css",vue:".vue",go:".go",python:".py",json:".json",javascript:".js",js:".js",html:".html",markdown:".md"};this.language&&o[this.language]&&(e=o[this.language]),nn(this.localVal,this.lastExpFileName+e)},insertCode(){const e=this.getLastPoint(),o=e.content||!1;let a="";o?(a="\n```text\n"+o+"\n```\n",this.deleteContent(e.start,e.end),this.insertContent(e.start,a)):(a="\n```text\n\n```\n",this.insertContent(e.start,a)),this.setCursor(e.start+a.length,e.start+a.length)},actionSaveSet(){const{localVal:e,codemrrConfig:o,lastHtml:a}=this;this.$emit("on-act-save",{theme:o.theme||"",value:e||"",html:a||""})},actionCopySet(){this.$cvCopy(this.localVal),this.$emit("on-act-copy",this.localVal)},actionHtmlVisible(e){this.actionHtmlText="",e?this.actionHtmlDiaVisible=!0:this.actionHtmlDiaVisible=!1},actionHtmlToMD(){const e=this.getLastPoint();let o="";o=`
27
+ `+(0,Ho.default)(this.actionHtmlText),this.insertContent(e.end,o),this.setCursor(e.start+o.length,e.start+o.length),this.actionHtmlText="",this.actionHtmlDiaVisible=!1},actionCurrent(e,o){this.$emit("on-action",e,o)},actionCustom(e){this.$emit("on-act-custom",e)}}},f0={name:"cvEditorCode",mixins:[an,ge,Xo],emits:["update:modelValue","on-ready"],props:{modelValue:{type:[String,Number],default:""},options:{type:[Object],default:()=>({autoRefresh:!0,autofocus:!1,lineNumbers:!0,tabSize:4,indentUnit:2,line:!0,styleActiveLine:!0})},toolbars:{type:[Object],default(){return{}}},language:{type:[String],default:""},theme:{type:[String],default:"oneDark"},readOnly:{type:[Boolean],default:!1},autoSave:{type:[Boolean],default:!1},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:600},bordered:{type:[Boolean],default:!0}},data(){return{localVal:"",heightMainPx:"",editorWrapRefEL:null}},watch:{localVal(e){this.$emit("update:modelValue",e)},modelValue(e){this.localVal!=e&&(this.localVal=e)},height(e){this.heightMainPx=this.getHeightMainPx()}},computed:{editorWrapRefID(){return this.editorRefID+"wrap"},heightTotalPx(){let e=""+this.height;return e.includes("%")||e.includes("px")?e:e+"px"},widthTotalPx(){let e=""+this.width;return e.includes("px")?e:e+"px"}},created(){this.localVal=this.modelValue,this.codemrrConfig.disabled=this.readOnly||!1},mounted(){this.heightMainPx=this.getHeightMainPx(),this.optionLanguage.includes(this.language)&&(this.codemrrConfig.language=this.language),this.optionTheme.includes(this.theme)&&(this.codemrrConfig.theme=this.theme)},destroyed(){},methods:{getHeightMainPx(){this.editorWrapRefEL=this.$refs[this.editorWrapRefID];const e=this.editorWrapRefEL.querySelector(".cv-editor-code-toolbar").offsetHeight;return e?this.heightTotalPx.includes("%")?`calc(100% - ${e}px - 2px)`:this.heightTotalPx.replace("px","")-e-2+"px":this.heightTotalPx},consoleLog(e,o){},initEditorReady(e){const{container:o,state:a,view:r}=e;this.editorStateInst=a,this.editorViewInst=r,this.listerenEvent(),this.$emit("on-ready")},listerenEvent(){}}},v0={key:0,class:"cv-editor-code-toolbar","data-title":"头部工具栏"},y0={class:"cv-editor-toolbars"},C0={name:"导入文件",class:"import-file"},b0={name:"保存到本地"},k0={key:1,class:"shift-theme",name:"主题"},w0=["onClick"],_0={class:"shift-theme",name:"语言"},V0=["onClick"],B0={class:"icon-svg"},S0={key:5,class:"segmentation"},N0=["name"],E0={title:"编辑器",class:"cv-editor-code-main"};function x0(e,o,a,r,n,l){const s=(0,t.resolveComponent)("SvgLanguage"),c=(0,t.resolveComponent)("SvgCopy"),d=(0,t.resolveComponent)("CodemirrorEditor");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{ref:l.editorWrapRefID,class:(0,t.normalizeClass)(["cv-editor-code-wrap cv-editor-vars",`${a.bordered?"border":""}`]),style:(0,t.normalizeStyle)({width:l.widthTotalPx,height:l.heightTotalPx})},[e.actionPreview?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",v0,[(0,t.createElementVNode)("ul",y0,[e.$slots.title?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)("li",null,[(0,t.renderSlot)(e.$slots,"title")]),o[16]||(o[16]=(0,t.createElementVNode)("li",{class:"segmentation"},[(0,t.createElementVNode)("div")],-1))],64)):(0,t.createCommentVNode)("",!0),(0,t.withDirectives)((0,t.createElementVNode)("li",C0,[(0,t.createElementVNode)("span",{class:"iconfont icon-daoru",onClick:o[0]||(o[0]=(...u)=>e.actionImportFile&&e.actionImportFile(...u))}),(0,t.createElementVNode)("input",{type:"file",onChange:o[1]||(o[1]=u=>e.actionImportFile(u)),accept:"text/markdown"},null,32)],512),[[t.vShow,e.toolConfig.importmd]]),(0,t.withDirectives)((0,t.createElementVNode)("li",b0,[(0,t.createElementVNode)("span",{class:"iconfont icon-download",onClick:o[2]||(o[2]=(...u)=>e.actionExportFile&&e.actionExportFile(...u))})],512),[[t.vShow,e.toolConfig.exportmd]]),o[20]||(o[20]=(0,t.createElementVNode)("li",{class:"segmentation"},[(0,t.createElementVNode)("div")],-1)),e.toolConfig.theme?((0,t.openBlock)(),(0,t.createElementBlock)("li",k0,[(0,t.createElementVNode)("span",{class:"iconfont icon-theme",onClick:o[3]||(o[3]=u=>e.actionThemeDropdown=!e.actionThemeDropdown)}),(0,t.createElementVNode)("ul",{class:(0,t.normalizeClass)({active:e.actionThemeDropdown}),onMouseleave:o[4]||(o[4]=u=>e.actionThemeDropdown=!1)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.optionTheme,u=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{onClick:h=>e.actionThemesSet(u)},(0,t.toDisplayString)(u),9,w0))),256))],34)])):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("li",_0,[(0,t.createElementVNode)("span",{class:"icon-svg",onClick:o[5]||(o[5]=u=>e.actionLanguageDropdown=!e.actionLanguageDropdown)},[(0,t.createVNode)(s)]),(0,t.createElementVNode)("ul",{class:(0,t.normalizeClass)({active:e.actionLanguageDropdown}),onMouseleave:o[6]||(o[6]=u=>e.actionLanguageDropdown=!1)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.optionLanguage,u=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{class:(0,t.normalizeClass)(u==a.language?"active":""),onClick:h=>e.actionLanguageSet(u)},(0,t.toDisplayString)(u),11,V0))),256))],34)]),o[21]||(o[21]=(0,t.createElementVNode)("li",{class:"empty"},null,-1)),e.toolConfig.copy?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:2,name:"复制",onClick:o[7]||(o[7]=(...u)=>e.actionCopySet&&e.actionCopySet(...u))},[(0,t.createElementVNode)("span",B0,[(0,t.createVNode)(c)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.clear?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:3,name:"清空",onClick:o[8]||(o[8]=u=>n.localVal="")},[...o[17]||(o[17]=[(0,t.createElementVNode)("span",{class:"iconfont icon-clear"},null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.save?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:4,name:"保存",onClick:o[9]||(o[9]=(...u)=>e.actionSaveSet&&e.actionSaveSet(...u))},[...o[18]||(o[18]=[(0,t.createElementVNode)("span",{class:"iconfont icon-save"},null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.fullscreen?((0,t.openBlock)(),(0,t.createElementBlock)("li",S0,[...o[19]||(o[19]=[(0,t.createElementVNode)("div",null,null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.fullscreen?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:6,name:e.actionFullscreen?"退出全屏":"全屏"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[10]||(o[10]=u=>e.actionFullscreenSet(!1)),class:"iconfont icon-quite"},null,512),[[t.vShow,e.actionFullscreen]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[11]||(o[11]=u=>e.actionFullscreenSet(!0)),class:"iconfont icon-fullscreen"},null,512),[[t.vShow,!e.actionFullscreen]])],8,N0)):(0,t.createCommentVNode)("",!0)])])),(0,t.createElementVNode)("div",E0,[(0,t.createVNode)(d,(0,t.mergeProps)(e.codemrrBind,{id:e.editorRefID,ref:e.editorRefID,style:{height:n.heightMainPx,backgroundColor:e.codemrrConfig.backgroundColor},extensions:e.extensions,modelValue:n.localVal,"onUpdate:modelValue":o[12]||(o[12]=u=>n.localVal=u),onReady:l.initEditorReady,onChange:o[13]||(o[13]=u=>l.consoleLog("change",u)),onFocus:o[14]||(o[14]=u=>l.consoleLog("focus",u)),onBlur:o[15]||(o[15]=u=>l.consoleLog("blur",u))}),null,16,["id","style","extensions","modelValue","onReady"])])],6)}var so=y(f0,[["render",x0]]),$0={name:"cvEditorJson",components:{},mixins:[ge],props:{modelValue:{type:[Object,Array,Number,String,Boolean],default:""},mode:{type:[String],default:"text"},readOnly:{type:[Boolean],default:!1},options:{type:[Object],default:()=>({mode:"text"})},height:{type:String},plus:{type:Boolean,default:!0}},data(){return{editorInstance:null,style:{},max:!1,internalChange:!1,localVal:""}},watch:{modelValue:{handler(e){this.localVal!=e&&(this.localVal=e,this.updateVal(e))},deep:!0},max(e){this.$nextTick(()=>{this.initNewCreate()})},options:{handler(e){this.options&&this.options.mode&&this.editorInstance},deep:!0}},computed:{getHeight(){return this.height&&!this.max?{height:this.height}:{}}},async mounted(){this.initNewCreate()},updated(){this.editorInstance.updateProps({mode:this.mode,readOnly:this.readOnly})},beforeUnmount(){this.destroyView()},beforeDestroy(){this.destroyView()},methods:{async initNewCreate(){const{JSONEditor:e}=await import("https://10ui.cn/jsoneditor/vanilla-jsoneditor@0.22.0/standalone.js");this.editorInstance||(this.editorInstance=new e({target:this.$refs[this.editorRefID],props:{value:this.modelValue,mode:this.mode,readOnly:this.readOnly,...this.options,onChange:this.onChange}}),this.updateVal(this.modelValue))},onChange(){let e=null,o={};try{o=this.editorInstance.get()}catch(a){e=a}e?this.$emit("error",e):this.editorInstance&&(this.internalChange=!0,this.localVal=o,this.$emit("update:modelValue",this.localVal),this.$nextTick(()=>{this.internalChange=!1}))},updateVal(e){this.editorInstance&&e!==void 0&&!this.internalChange&&this.editorInstance.update({json:e})},isJSON(e){try{return JSON.parse(e),!0}catch{return!1}},destroyView(){this.editor&&(this.editorInstance.destroy(),this.editor=null)},handleChange(e){this.emitData||(this.emitData=ja(400,o=>{this.$emit("update:modelValue",o)})),this.emitData(e)}}};function D0(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["cv-editor-json",{"max-box":n.max,"min-box":!n.max}]),style:(0,t.normalizeStyle)(l.getHeight)},[(0,t.createElementVNode)("div",{ref:e.editorRefID,class:"jsoneditor-box"},null,512),(0,t.createElementVNode)("a",{onClick:o[0]||(o[0]=s=>n.max=!n.max),class:"max-btn"})],6)}var co=y($0,[["render",D0]]),T0={name:"EditorSlideUpload",props:{color:{type:String,default:"#1890ff"},accept:{type:[String],default:"image/jpeg,image/gif,image/png"},upName:{type:[String],default:""},upAction:{type:[String],default:""},upResponseFn:{type:[Function],default:()=>{}},upHeaders:{type:[Object],default:()=>{}},upData:{type:[Object],default:()=>{}}},data(){return{dialogVisible:!1,listObj:{},fileList:[],diyUpList:new FormData}},methods:{checkAllSuccess(){return Object.keys(this.listObj).every(e=>this.listObj[e].hasSuccess)},handleSubmit(){const e=Object.keys(this.listObj).map(o=>this.listObj[o]);if(!this.checkAllSuccess()){this.$message("请等待所有图片上传成功。如果出现网络问题,请刷新页面并重新上传!");return}this.$emit("successCBK",e),this.listObj={},this.fileList=[],this.dialogVisible=!1},handleSuccess(e,o){const a=o.uid,r=Object.keys(this.listObj);for(let n=0,l=r.length;n<l;n++)if(this.listObj[r[n]].uid===a){this.upResponseFn&&typeof this.upResponseFn=="function"?this.listObj[r[n]].url=this.upResponseFn(e):this.listObj[r[n]].url=e.files.file||"",this.listObj[r[n]].hasSuccess=!0;return}},handleRemove(e){const o=e.uid,a=Object.keys(this.listObj);for(let r=0,n=a.length;r<n;r++)if(this.listObj[a[r]].uid===o){delete this.listObj[a[r]];return}},beforeUpload(e){const o=this,a=window.URL||window.webkitURL,r=e.uid;return this.listObj[r]={},new Promise((n,l)=>{const s=new Image;s.src=a.createObjectURL(e),s.onload=function(){o.listObj[r]={hasSuccess:!1,uid:e.uid,width:this.width,height:this.height}},n(!0)})}}},L0={class:"cv-editor-upload-container"};function I0(e,o,a,r,n,l){const s=(0,t.resolveComponent)("cv-icons"),c=(0,t.resolveComponent)("el-button"),d=(0,t.resolveComponent)("el-upload"),u=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createElementBlock)("div",L0,[(0,t.createVNode)(c,{style:(0,t.normalizeStyle)({background:a.color,borderColor:a.color,fontSize:"16px"}),type:"primary",onClick:o[0]||(o[0]=h=>n.dialogVisible=!0)},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(s,{type:"ElIconUpload",size:"16",style:{"margin-right":"5px"}}),o[2]||(o[2]=(0,t.createTextVNode)(" 上传 ",-1))]),_:1},8,["style"]),(0,t.createVNode)(u,{visible:n.dialogVisible},{default:(0,t.withCtx)(()=>[(0,t.createVNode)(d,(0,t.mergeProps)({class:"editor-slide-upload"},{action:a.upAction,headers:a.upHeaders,data:a.upData,name:a.upName,multiple:!0,showFileList:!0,listType:"picture-card",autoUpload:!0},{"file-list":n.fileList,"on-remove":l.handleRemove,"on-success":l.handleSuccess,"before-upload":l.beforeUpload}),{default:(0,t.withCtx)(()=>[(0,t.createVNode)(c,{type:"primary"},{default:(0,t.withCtx)(()=>[...o[3]||(o[3]=[(0,t.createTextVNode)("点击上传",-1)])]),_:1})]),_:1},16,["file-list","on-remove","on-success","before-upload"]),(0,t.createVNode)(c,{onClick:o[1]||(o[1]=h=>n.dialogVisible=!1)},{default:(0,t.withCtx)(()=>[...o[4]||(o[4]=[(0,t.createTextVNode)("取消",-1)])]),_:1}),(0,t.createVNode)(c,{type:"primary",onClick:l.handleSubmit},{default:(0,t.withCtx)(()=>[...o[5]||(o[5]=[(0,t.createTextVNode)("确定",-1)])]),_:1},8,["onClick"])]),_:1},8,["visible"])])}var F0=y(T0,[["render",I0],["__scopeId","data-v-befb1a3e"]]),P0=["advlist","anchor","autolink","autosave","code","codesample","directionality","emoticons","fullscreen","image","insertdatetime","link","lists","media","nonbreaking","pagebreak","preview","save","searchreplace","table","visualblocks","visualchars","wordcount"],A0=P0,M0=["hr blockquote anchor pagebreak insertdatetime table emoticons | searchreplace preview code codesample | fullscreen | link media image ","inserttemplate undo redo | styles | removeformat subscript superscript forecolor backcolor bold italic underline strikethrough | alignleft aligncenter alignright alignjustify | bullist numlist indent"],z0=M0,me=[];function O0(){return window.tinymce}var j0=(e,o)=>{const a=document.getElementById(e),r=o||function(){};if(!a){const s=document.createElement("script");s.src=e,s.id=e,document.body.appendChild(s),me.push(r),("onload"in s?n:l)(s)}a&&r&&(O0()?r(null,a):me.push(r));function n(s){s.onload=function(){this.onerror=this.onload=null;for(const c of me)c(null,s);me=null},s.onerror=function(){this.onerror=this.onload=null,r(new Error("Failed to load "+e),s)}}function l(s){s.onreadystatechange=function(){if(!(this.readyState!=="complete"&&this.readyState!=="loaded")){this.onreadystatechange=null;for(const c of me)c(null,s);me=null}}}},R0=j0,H0="https://10ui.cn/tinymce/@7.0.0/tinymce.min.js",U0={inheritAttrs:!1,name:"cvEditorTinymce",components:{EditorSlideUpload:F0},emits:["update:modelValue"],mixins:[ge],props:{modelValue:{type:String,default:""},toolbar:{type:Array,required:!1,default(){return[]}},menubar:{type:String,default:"file edit insert view format table"},height:{type:[Number,String],required:!1,default:360},width:{type:[Number,String],required:!1,default:"100%"},uploadAttr:{type:[Object],default:()=>({})}},data(){return{localVal:"",fullscreen:!1,languageTypeList:{en:"en",zh:"zh_CN",es:"es_MX",ja:"ja"}}},computed:{containerWidth(){const e=this.width;return/^[\d]+(\.[\d]+)?$/.test(e)?`${e}px`:e}},watch:{modelValue(e){this.localVal!=e&&(this.localVal=e,window.tinymce.get(this.editorRefID).setContent(e||""))}},created(){this.localVal=this.modelValue},mounted(){this.initLoad()},activated(){window.tinymce&&this.initTinymce()},deactivated(){this.destroyTinymce()},destroyed(){this.destroyTinymce()},methods:{initLoad(){R0(H0,e=>{if(e){this.$message.error(e.message);return}this.initTinymce()})},initTinymce(){const e=this;window.tinymce.init({selector:`#${this.editorRefID}`,license_key:"gpl",language:this.languageTypeList.zh,height:this.height,body_class:"panel-body ",object_resizing:!1,toolbar:this.toolbar.length>0?this.toolbar:z0,menubar:this.menubar,plugins:A0,end_container_on_empty_block:!0,powerpaste_word_import:"clean",code_dialog_height:450,code_dialog_width:1e3,advlist_bullet_styles:"square",advlist_number_styles:"default",editimage_cors_hosts:["www.tinymce.com","codepen.io"],link_default_target:"_blank",link_title:!1,nonbreaking_force_tab:!0,init_instance_callback:o=>{e.localVal&&o.setContent(e.localVal)},setup(o){o.on("FullscreenStateChanged",a=>{e.fullscreen=a.state}),o.on("input",a=>{e.localVal=o.getContent(),e.$emit("update:modelValue",e.localVal)})},convert_urls:!1,images_upload_handler(o,a,r,n){n(0),new FormData}})},destroyTinymce(){const e=window.tinymce.get(this.editorRefID);this.fullscreen&&e.execCommand("mceFullScreen"),e&&e.destroy()},setContent(e){window.tinymce.get(this.editorRefID).setContent(e)},getContent(){window.tinymce.get(this.editorRefID).getContent()},imageSuccessCBK(e){e.forEach(o=>window.tinymce.get(this.editorRefID).insertContent(`<img class="wscnph" src="${o.url}" >`))}}},W0=["id"],q0={class:"editor-custom-btn-container"};function K0(e,o,a,r,n,l){const s=(0,t.resolveComponent)("EditorSlideUpload");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(["cv-editor-tinymce tinymce-container",{fullscreen:n.fullscreen}]),style:(0,t.normalizeStyle)({width:l.containerWidth})},[(0,t.createElementVNode)("textarea",{id:e.editorRefID,class:"tinymce-textarea"},null,8,W0),(0,t.createElementVNode)("div",q0,[(0,t.createVNode)(s,(0,t.mergeProps)({color:"#1890ff",class:"editor-upload-btn",onSuccessCBK:l.imageSuccessCBK},a.uploadAttr),null,16,["onSuccessCBK"])])],6)}var uo=y(U0,[["render",K0],["__scopeId","data-v-8cbc5d06"]]),G0={name:"cvEditorMarkdown",mixins:[an,ge,Xo],emits:["update:modelValue","on-ready","on-upload-image"],props:{modelValue:{type:[String,Number],default:""},options:{type:[Object],default:()=>({})},toolbars:{type:[Object],default(){return{}}},language:{type:[String],default:"markdown"},theme:{type:[String],default:"light"},readOnly:{type:[Boolean],default:!1},autoSave:{type:[Boolean],default:!1},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:600},bordered:{type:[Boolean],default:!0}},data(){return{lastPos:"",lastInsert:"",lastHtml:"",scrollSide:"",localVal:"",heightMainPx:"",editorWrapRefEL:null}},watch:{localVal(e){this.$emit("update:modelValue",e)},modelValue(e){this.localVal!=e&&(this.localVal=e)},height(e){this.heightMainPx=this.getHeightMainPx()}},computed:{editorWrapRefID(){return this.editorRefID+"wrap"},previewRefID(){return this.editorRefID+"preview"},heightTotalPx(){let e=""+this.height;return e.includes("%")||e.includes("px")?e:e+"px"},widthTotalPx(){let e=""+this.width;return e.includes("px")?e:e+"px"}},created(){this.localVal=this.modelValue,this.codemrrConfig.disabled=this.readOnly||!1},mounted(){this.heightMainPx=this.getHeightMainPx()},destroyed(){},methods:{getHeightMainPx(){this.editorWrapRefEL=this.$refs[this.editorWrapRefID];const e=this.editorWrapRefEL.querySelector(".cv-editor-markdown-toolbar").offsetHeight;return e?this.heightTotalPx.includes("%")?`calc(100% - ${e}px - 2px)`:this.heightTotalPx.replace("px","")-e-2+"px":this.heightTotalPx},consoleLog(e,o){},initEditorReady(e){const{container:o,state:a,view:r}=e;this.editorStateInst=a,this.editorViewInst=r,this.listerenEvent(),this.$emit("on-ready")},listerenEvent(){this.editorWrapRefEL=this.$refs[this.editorWrapRefID],this.editorWrapRefEL.querySelector(".cv-editor-markdown-main .cm-scroller").addEventListener("scroll",this.markdownScroll),this.editorWrapRefEL.querySelector(".cv-markdown-preview .markdown-preview").addEventListener("scroll",this.previewScroll)},handlePaste(e,o){const{clipboardData:a={}}=o,{types:r=[],items:n}=a;let l=null;for(let s=0;s<r.length;s++)if(r[s]==="Files"){l=n[s];break}if(l){const s=l.getAsFile();/image/gi.test(s.type)&&(this.$emit("on-upload-image",s),o.preventDefault())}},setCursor(e,o){this.editorViewInst.dispatch({selection:{anchor:e,head:o}}),this.editorViewInst.focus()},GetContent(){const e=this.editorViewState.selection.main.head,o=this.editorViewState.doc.lineAt(e).number,a=this.editorViewState.doc.line(o).text.trim();return a===""?!1:a},deleteContent(e,o){this.editorViewInst.dispatch({changes:{from:e,to:o}})},getLastPoint(){const e=this.editorViewInst.state.selection.main.head,o=this.editorViewInst.state.doc.lineAt(e).number,a=this.editorViewInst.state.doc.line(o).from,r=this.editorViewInst.state.doc.line(o).to,n=this.editorViewInst.state.doc.line(o).text;return this.lastPos||{line:o,start:a,end:r,content:n}},insertContent(e,o){this.getLastPoint(),this.editorViewInst.dispatch({changes:{from:e,insert:o}})},listerenKeyupEnter(e){const{lastInsert:o}=this;o&&(["-","- [ ]","- [x]"].includes(o.trim())?(e.preventDefault(),this.insertContent(`
34
28
  `+o)):/^\d+\.$/.test(o.trim())&&(e.preventDefault(),this.insertContent(`
35
29
  `+(parseInt(o,0)+1)+". ")))},listerenDelete(){setTimeout(()=>{const{editorViewInst:e}=this;e.isClean()||e.getValue().split(`
36
- `).pop()===""&&(this.lastInsert="")},20)},mousescrollSide(e){this.scrollSide=e},getScrollData(){const e=this.editorWrapRefEL.querySelector(".cv-editor-markdown-main .cm-scroller"),o=e.scrollHeight,a=e.scrollTop,r=this.editorWrapRefEL.querySelector(".cv-markdown-preview .markdown-preview");return{markdownRef:e,markdownScrollHeight:o,markdownScrollTop:a,previewRef:r,contentHeight:r.offsetHeight,previewScrollHeight:r.scrollHeight,previewScrollTop:r.scrollTop||0}},markdownScroll(){if(this.actionScrollSync&&this.scrollSide==="left"){const{markdownRef:e,markdownScrollHeight:o,markdownScrollTop:a,previewRef:r,contentHeight:n,previewScrollHeight:l,previewScrollTop:i}=this.getScrollData();r.scrollTop=parseInt(a/(o-n)*(l-n),0)}},previewScroll(){if(this.actionScrollSync&&this.scrollSide==="right"){const{markdownRef:e,markdownScrollHeight:o,markdownScrollTop:a,previewRef:r,contentHeight:n,previewScrollHeight:l,previewScrollTop:i}=this.getScrollData();e.scrollTop=parseInt(i/(l-n)*(o-n),0)}}}},$h={key:0,class:"cv-editor-markdown-toolbar","data-title":"头部工具栏"},xh={class:"cv-editor-toolbars"},Dh={key:1,name:"插入图片"},Th={key:2,name:"本地图片"},Ih={class:"icon-svg"},Lh={key:4,name:"上传图片"},Fh={key:5,name:"上传文件"},Ph={name:"导入文件",class:"import-file"},Oh={name:"保存到本地"},Mh={key:6,name:"代码块"},zh={key:7,class:"shift-theme",name:"主题"},Ah=["onClick"],Hh={key:8,class:"shift-theme",name:"背景颜色"},jh=["onClick"],Rh={key:9,class:"shift-theme",name:"phrases"},Uh=["onClick"],Wh=["name"],Yh=["name"],qh=["name"],Xh=["name"],Kh={key:15,name:"全屏编辑"},Gh={key:16,name:"分屏显示"},Zh={key:17,name:"预览"},Qh={key:18,class:"segmentation"},Jh={class:"icon-svg"},e0={key:22,class:"segmentation"},t0={key:23,name:"目录"},o0={key:24,class:"segmentation"},a0=["name"],n0={class:"cv-editor-toolbars"},l0={key:0,name:"撤销"},r0={key:2,name:"粗体"},i0={key:3,name:"斜体"},s0={key:4,name:"删除线"},c0={key:5,name:"下划线"},d0={key:6,name:"标题1"},u0={key:7,name:"标题2"},p0={key:8,name:"标题3"},m0={key:9,name:"标题4"},h0={key:10,name:"标题5"},g0={key:11,name:"标题6"},f0={key:12,name:"分割线"},v0={key:13,name:"引用"},C0={key:14,name:"无序列表"},k0={key:15,name:"有序列表"},b0={key:16,name:"未完成列表"},y0={key:17,name:"已完成列表"},w0={key:18,name:"链接"},_0={key:19,name:"表格"};function V0(e,o,a,r,n,l){const i=(0,t.resolveComponent)("SvgImgMap"),c=(0,t.resolveComponent)("SvgUploadFile"),d=(0,t.resolveComponent)("SvgCopy"),u=(0,t.resolveComponent)("SvgToc"),m=(0,t.resolveComponent)("CodemirrorEditor"),h=(0,t.resolveComponent)("cv-markdown-show"),g=(0,t.resolveComponent)("el-input"),v=(0,t.resolveComponent)("el-button"),C=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{ref:l.editorWrapRefID,class:(0,t.normalizeClass)(["cv-editor-markdown-wrap",`${a.bordered?"border":""}`]),style:(0,t.normalizeStyle)({width:l.widthTotalPx,height:l.heightTotalPx})},[e.actionPreview?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",$h,[(0,t.createElementVNode)("ul",xh,[e.$slots.title?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)("li",null,[(0,t.renderSlot)(e.$slots,"title",{},void 0,!0)]),o[65]||(o[65]=(0,t.createElementVNode)("li",{class:"segmentation"},[(0,t.createElementVNode)("div")],-1))],64)):(0,t.createCommentVNode)("",!0),e.toolConfig.image?((0,t.openBlock)(),(0,t.createElementBlock)("li",Dh,[(0,t.createElementVNode)("span",{onClick:o[0]||(o[0]=(...p)=>e.actionInsImage&&e.actionInsImage(...p)),class:"iconfont icon-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.uploadImage?((0,t.openBlock)(),(0,t.createElementBlock)("li",Th,[(0,t.createElementVNode)("span",{onClick:o[1]||(o[1]=(...p)=>e.actionChooseImage&&e.actionChooseImage(...p)),class:"iconfont icon-upload-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.custom_image?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:3,name:"图片空间",onClick:o[2]||(o[2]=p=>e.actionCustom("image-browse"))},[(0,t.createElementVNode)("span",Ih,[(0,t.createVNode)(i)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.custom_uploadImage?((0,t.openBlock)(),(0,t.createElementBlock)("li",Lh,[(0,t.createElementVNode)("span",{onClick:o[3]||(o[3]=p=>e.actionCustom("image-upload")),class:"iconfont icon-upload-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.custom_uploadFile?((0,t.openBlock)(),(0,t.createElementBlock)("li",Fh,[(0,t.createElementVNode)("span",{onClick:o[4]||(o[4]=p=>e.actionCustom("file-upload")),class:"icon-svg"},[(0,t.createVNode)(c)])])):(0,t.createCommentVNode)("",!0),(0,t.withDirectives)((0,t.createElementVNode)("li",Ph,[(0,t.createElementVNode)("span",{class:"iconfont icon-daoru",onClick:o[5]||(o[5]=(...p)=>e.actionImportFile&&e.actionImportFile(...p))}),(0,t.createElementVNode)("input",{type:"file",onChange:o[6]||(o[6]=p=>e.actionImportFile(p)),accept:"text/markdown"},null,32)],512),[[t.vShow,e.toolConfig.importmd]]),(0,t.withDirectives)((0,t.createElementVNode)("li",Oh,[(0,t.createElementVNode)("span",{class:"iconfont icon-download",onClick:o[7]||(o[7]=(...p)=>e.actionExportFile&&e.actionExportFile(...p))})],512),[[t.vShow,e.toolConfig.exportmd]]),o[72]||(o[72]=(0,t.createElementVNode)("li",{class:"segmentation"},[(0,t.createElementVNode)("div")],-1)),e.toolConfig.code?((0,t.openBlock)(),(0,t.createElementBlock)("li",Mh,[(0,t.createElementVNode)("span",{onClick:o[8]||(o[8]=(...p)=>e.insertCode&&e.insertCode(...p)),class:"iconfont icon-code"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.theme?((0,t.openBlock)(),(0,t.createElementBlock)("li",zh,[(0,t.createElementVNode)("span",{class:"iconfont icon-theme",onClick:o[9]||(o[9]=p=>e.actionThemeDropdown=!e.actionThemeDropdown)}),(0,t.createElementVNode)("ul",{class:(0,t.normalizeClass)({active:e.actionThemeDropdown}),onMouseleave:o[10]||(o[10]=p=>e.actionThemeDropdown=!1)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.optionTheme,p=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{onClick:y=>e.actionThemesSet(p)},(0,t.toDisplayString)(p),9,Ah))),256))],34)])):(0,t.createCommentVNode)("",!0),e.toolConfig.backgroundColor?((0,t.openBlock)(),(0,t.createElementBlock)("li",Hh,[(0,t.createElementVNode)("span",{class:"iconfont icon-theme",onClick:o[11]||(o[11]=p=>e.actionBgColorDropdown=!e.actionBgColorDropdown)}),(0,t.createElementVNode)("ul",{class:(0,t.normalizeClass)({active:e.actionBgColorDropdown}),onMouseleave:o[12]||(o[12]=p=>e.actionBgColorDropdown=!1)},[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(["red","black","yellow","lawngreen","blue","white"],p=>(0,t.createElementVNode)("li",{onClick:y=>e.actionBgColorSet(p)},(0,t.toDisplayString)(p),9,jh)),64))],34)])):(0,t.createCommentVNode)("",!0),e.toolConfig.phrases?((0,t.openBlock)(),(0,t.createElementBlock)("li",Rh,[(0,t.createElementVNode)("span",{class:"iconfont icon-theme",onClick:o[13]||(o[13]=p=>e.actionPhrasesDropdown=!e.actionPhrasesDropdown)}),(0,t.createElementVNode)("ul",{class:(0,t.normalizeClass)({active:e.actionPhrasesDropdown}),onMouseleave:o[14]||(o[14]=p=>e.actionPhrasesDropdown=!1)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.optionPhrases,p=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{onClick:y=>e.actionPhrasesSet(p)},(0,t.toDisplayString)(p),9,Uh))),256))],34)])):(0,t.createCommentVNode)("",!0),e.toolConfig.html_to_markdown?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:10,name:"html转markdown",onClick:o[15]||(o[15]=p=>e.actionHtmlVisible(!0))},[...o[66]||(o[66]=[(0,t.createElementVNode)("span",{style:{width:"auto","font-size":"12px !important",padding:"0px 6px",margin:"0 10px",border:"1px #e2e2e2 solid"}}," HTML2MD ",-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.disabled?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:11,name:e.codemrrConfig.disabled?"toggle disabled:开":"toggle disabled:关"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[16]||(o[16]=p=>e.codemrrConfig.disabled=!e.codemrrConfig.disabled),class:"iconfont icon-on"},null,512),[[t.vShow,e.codemrrConfig.disabled]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[17]||(o[17]=p=>e.codemrrConfig.disabled=!e.codemrrConfig.disabled),class:"iconfont icon-off"},null,512),[[t.vShow,!e.codemrrConfig.disabled]])],8,Wh)):(0,t.createCommentVNode)("",!0),e.toolConfig.autofocus?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:12,name:e.codemrrConfig.autofocus?"toggle autofocus:开":"toggle autofocus:关"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[18]||(o[18]=p=>e.codemrrConfig.autofocus=!e.codemrrConfig.autofocus),class:"iconfont icon-on"},null,512),[[t.vShow,e.codemrrConfig.autofocus]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[19]||(o[19]=p=>e.codemrrConfig.autofocus=!e.codemrrConfig.autofocus),class:"iconfont icon-off"},null,512),[[t.vShow,!e.codemrrConfig.autofocus]])],8,Yh)):(0,t.createCommentVNode)("",!0),e.toolConfig.indentWithTab?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:13,name:e.codemrrConfig.indentWithTab?"toggle indentWithTab:开":"toggle indentWithTab:关"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[20]||(o[20]=p=>e.codemrrConfig.indentWithTab=!e.codemrrConfig.indentWithTab),class:"iconfont icon-on"},null,512),[[t.vShow,e.codemrrConfig.indentWithTab]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[21]||(o[21]=p=>e.codemrrConfig.indentWithTab=!e.codemrrConfig.indentWithTab),class:"iconfont icon-off"},null,512),[[t.vShow,!e.codemrrConfig.indentWithTab]])],8,qh)):(0,t.createCommentVNode)("",!0),o[73]||(o[73]=(0,t.createElementVNode)("li",{class:"empty"},null,-1)),e.toolConfig.scrollSync?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:14,name:e.actionScrollSync?"同步滚动:开":"同步滚动:关"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[22]||(o[22]=p=>e.actionScrollSync=!e.actionScrollSync),class:"iconfont icon-on active"},null,512),[[t.vShow,e.actionScrollSync]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[23]||(o[23]=p=>e.actionScrollSync=!e.actionScrollSync),class:"iconfont icon-off"},null,512),[[t.vShow,!e.actionScrollSync]])],8,Xh)):(0,t.createCommentVNode)("",!0),e.toolConfig.split&&e.actionSplit?((0,t.openBlock)(),(0,t.createElementBlock)("li",Kh,[(0,t.createElementVNode)("span",{onClick:o[24]||(o[24]=p=>e.actionSplit=!1),class:"iconfont icon-md"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.split&&!e.actionSplit?((0,t.openBlock)(),(0,t.createElementBlock)("li",Gh,[(0,t.createElementVNode)("span",{onClick:o[25]||(o[25]=p=>e.actionSplit=!0),class:"iconfont icon-group"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.preview?((0,t.openBlock)(),(0,t.createElementBlock)("li",Zh,[(0,t.createElementVNode)("span",{onClick:o[26]||(o[26]=p=>e.actionPreview=!0),class:"iconfont icon-preview"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.copy||e.toolConfig.clear||e.toolConfig.save?((0,t.openBlock)(),(0,t.createElementBlock)("li",Qh,[...o[67]||(o[67]=[(0,t.createElementVNode)("div",null,null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.copy?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:19,name:"复制",onClick:o[27]||(o[27]=(...p)=>e.actionCopySet&&e.actionCopySet(...p))},[(0,t.createElementVNode)("span",Jh,[(0,t.createVNode)(d)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.clear?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:20,name:"清空",onClick:o[28]||(o[28]=p=>n.localVal="")},[...o[68]||(o[68]=[(0,t.createElementVNode)("span",{class:"iconfont icon-clear"},null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.save?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:21,name:"保存",onClick:o[29]||(o[29]=(...p)=>e.actionSaveSet&&e.actionSaveSet(...p))},[...o[69]||(o[69]=[(0,t.createElementVNode)("span",{class:"iconfont icon-save"},null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.toc?((0,t.openBlock)(),(0,t.createElementBlock)("li",e0,[...o[70]||(o[70]=[(0,t.createElementVNode)("div",null,null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.toc?((0,t.openBlock)(),(0,t.createElementBlock)("li",t0,[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[30]||(o[30]=p=>e.actionToc=!e.actionToc),class:"icon-svg active"},[(0,t.createVNode)(u)],512),[[t.vShow,e.actionToc]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[31]||(o[31]=p=>e.actionToc=!e.actionToc),class:"icon-svg"},[(0,t.createVNode)(u)],512),[[t.vShow,!e.actionToc]])])):(0,t.createCommentVNode)("",!0),e.toolConfig.fullscreen?((0,t.openBlock)(),(0,t.createElementBlock)("li",o0,[...o[71]||(o[71]=[(0,t.createElementVNode)("div",null,null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.fullscreen?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:25,name:e.actionFullscreen?"退出全屏":"全屏"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[32]||(o[32]=p=>e.actionFullscreenSet(!1)),class:"iconfont icon-quite"},null,512),[[t.vShow,e.actionFullscreen]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[33]||(o[33]=p=>e.actionFullscreenSet(!0)),class:"iconfont icon-fullscreen"},null,512),[[t.vShow,!e.actionFullscreen]])],8,a0)):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("ul",n0,[e.toolConfig.undo?((0,t.openBlock)(),(0,t.createElementBlock)("li",l0,[(0,t.createElementVNode)("span",{class:"iconfont icon-undo",onClick:o[34]||(o[34]=(...p)=>e.actionUndo&&e.actionUndo(...p))})])):(0,t.createCommentVNode)("",!0),e.toolConfig.redo?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:1,name:"重做",onClick:o[35]||(o[35]=(...p)=>e.actionRedo&&e.actionRedo(...p))},[...o[74]||(o[74]=[(0,t.createElementVNode)("span",{class:"iconfont icon-redo"},null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.strong?((0,t.openBlock)(),(0,t.createElementBlock)("li",r0,[(0,t.createElementVNode)("span",{onClick:o[36]||(o[36]=(...p)=>e.actionInsStrong&&e.actionInsStrong(...p)),class:"iconfont icon-bold"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.italic?((0,t.openBlock)(),(0,t.createElementBlock)("li",i0,[(0,t.createElementVNode)("span",{onClick:o[37]||(o[37]=(...p)=>e.actionInsItalic&&e.actionInsItalic(...p)),class:"iconfont icon-italic"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.overline?((0,t.openBlock)(),(0,t.createElementBlock)("li",s0,[(0,t.createElementVNode)("span",{onClick:o[38]||(o[38]=(...p)=>e.actionInsOverline&&e.actionInsOverline(...p)),class:"iconfont icon-overline"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.overline?((0,t.openBlock)(),(0,t.createElementBlock)("li",c0,[(0,t.createElementVNode)("span",{onClick:o[39]||(o[39]=(...p)=>e.actionInsUnderline&&e.actionInsUnderline(...p)),class:"iconfont icon-under-line"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.h1?((0,t.openBlock)(),(0,t.createElementBlock)("li",d0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[40]||(o[40]=p=>e.actionInsTitle(1))},"h1")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h2?((0,t.openBlock)(),(0,t.createElementBlock)("li",u0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[41]||(o[41]=p=>e.actionInsTitle(2))},"h2")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h3?((0,t.openBlock)(),(0,t.createElementBlock)("li",p0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[42]||(o[42]=p=>e.actionInsTitle(3))},"h3")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h4?((0,t.openBlock)(),(0,t.createElementBlock)("li",m0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[43]||(o[43]=p=>e.actionInsTitle(4))},"h4")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h5?((0,t.openBlock)(),(0,t.createElementBlock)("li",h0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[44]||(o[44]=p=>e.actionInsTitle(5))},"h5")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h6?((0,t.openBlock)(),(0,t.createElementBlock)("li",g0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[45]||(o[45]=p=>e.actionInsTitle(6))},"h6")])):(0,t.createCommentVNode)("",!0),e.toolConfig.hr?((0,t.openBlock)(),(0,t.createElementBlock)("li",f0,[(0,t.createElementVNode)("span",{onClick:o[46]||(o[46]=(...p)=>e.actionInsLine&&e.actionInsLine(...p)),class:"iconfont icon-horizontal"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.quote?((0,t.openBlock)(),(0,t.createElementBlock)("li",v0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[47]||(o[47]=(...p)=>e.actionInsQuote&&e.actionInsQuote(...p)),class:"iconfont icon-quote"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.ul?((0,t.openBlock)(),(0,t.createElementBlock)("li",C0,[(0,t.createElementVNode)("span",{onClick:o[48]||(o[48]=(...p)=>e.actionInsUl&&e.actionInsUl(...p)),class:"iconfont icon-ul"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.ol?((0,t.openBlock)(),(0,t.createElementBlock)("li",k0,[(0,t.createElementVNode)("span",{onClick:o[49]||(o[49]=(...p)=>e.actionInsOl&&e.actionInsOl(...p)),class:"iconfont icon-ol"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.notChecked?((0,t.openBlock)(),(0,t.createElementBlock)("li",b0,[(0,t.createElementVNode)("span",{onClick:o[50]||(o[50]=(...p)=>e.insertNotFinished&&e.insertNotFinished(...p)),class:"iconfont icon-checked-false"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.checked?((0,t.openBlock)(),(0,t.createElementBlock)("li",y0,[(0,t.createElementVNode)("span",{onClick:o[51]||(o[51]=(...p)=>e.insertFinished&&e.insertFinished(...p)),class:"iconfont icon-checked"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.link?((0,t.openBlock)(),(0,t.createElementBlock)("li",w0,[(0,t.createElementVNode)("span",{onClick:o[52]||(o[52]=(...p)=>e.actionInsLink&&e.actionInsLink(...p)),class:"iconfont icon-link"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.table?((0,t.openBlock)(),(0,t.createElementBlock)("li",_0,[(0,t.createElementVNode)("span",{onClick:o[53]||(o[53]=(...p)=>e.actionInsTable&&e.actionInsTable(...p)),class:"iconfont icon-table"})])):(0,t.createCommentVNode)("",!0)])])),(0,t.createElementVNode)("div",{title:"编辑器",class:"cv-editor-markdown-main",style:(0,t.normalizeStyle)({background:e.actionPreview?"#fff":""})},[(0,t.withDirectives)((0,t.createVNode)(m,(0,t.mergeProps)(e.codemrrBind,{id:e.editorRefID,ref:e.editorRefID,style:{height:n.heightMainPx,backgroundColor:e.codemrrConfig.backgroundColor},extensions:e.extensions,modelValue:n.localVal,"onUpdate:modelValue":o[54]||(o[54]=p=>n.localVal=p),onReady:l.initEditorReady,onChange:o[55]||(o[55]=p=>l.consoleLog("change",p)),onFocus:o[56]||(o[56]=p=>l.consoleLog("focus",p)),onBlur:o[57]||(o[57]=p=>l.consoleLog("blur",p)),onMouseenter:o[58]||(o[58]=p=>l.mousescrollSide("left"))}),null,16,["id","style","extensions","modelValue","onReady"]),[[t.vShow,!e.actionPreview]]),(0,t.withDirectives)((0,t.createVNode)(h,{html:n.lastHtml,"onUpdate:html":o[59]||(o[59]=p=>n.lastHtml=p),ref:l.previewRefID,editorID:l.previewRefID,modelValue:n.localVal,theme:e.codemrrConfig.theme||a.theme,language:a.language,tocShow:e.actionToc,style:(0,t.normalizeStyle)([{flex:"1",height:"100%","border-left":"1px solid #dedede","overflow-y":"auto"},{height:e.actionPreview?"":n.heightMainPx}]),onMouseenter:o[60]||(o[60]=p=>l.mousescrollSide("right"))},null,8,["html","editorID","modelValue","theme","language","tocShow","style"]),[[t.vShow,e.actionPreview?e.actionPreview:e.actionSplit]])],4),(0,t.withDirectives)((0,t.createElementVNode)("div",{title:"关闭预览按钮",class:"close-preview",onClick:o[61]||(o[61]=p=>e.actionPreview=!1)},[...o[75]||(o[75]=[(0,t.createElementVNode)("span",{class:"iconfont icon-close"},null,-1)])],512),[[t.vShow,e.actionPreview]]),(0,t.createVNode)(C,{modelValue:e.actionHtmlDiaVisible,"onUpdate:modelValue":o[64]||(o[64]=p=>e.actionHtmlDiaVisible=p),title:"html转markdown",width:"680","show-close":!1,"append-to-body":""},{footer:(0,t.withCtx)(()=>[(0,t.createVNode)(v,{onClick:o[63]||(o[63]=p=>e.actionHtmlVisible(!1))},{default:(0,t.withCtx)(()=>[...o[76]||(o[76]=[(0,t.createTextVNode)("取消",-1)])]),_:1}),(0,t.createVNode)(v,{type:"primary",onClick:e.actionHtmlToMD},{default:(0,t.withCtx)(()=>[...o[77]||(o[77]=[(0,t.createTextVNode)("转换成markdown",-1)])]),_:1},8,["onClick"])]),default:(0,t.withCtx)(()=>[(0,t.createVNode)(g,{type:"textarea",modelValue:e.actionHtmlText,"onUpdate:modelValue":o[62]||(o[62]=p=>e.actionHtmlText=p),rows:14,placeholder:"请输入html代码..."},null,8,["modelValue"])]),_:1},8,["modelValue"])],6)}var At=f(Eh,[["render",V0],["__scopeId","data-v-a76ecd6a"]]),re={add(e,o){const a=`toc${o}${++this.index}`,r={anchor:a,level:o,text:e},n=this.tocItems;return r.level<=5&&n.push(r),a},reset:function(){this.tocItems=[],this.index=0},tocItems:[],index:0};function S0(e){if(typeof e=="function"&&(e={highlight:e}),!e||typeof e.highlight!="function")throw new Error("Must provide highlight function");return typeof e.langPrefix!="string"&&(e.langPrefix="language-"),{async:!!e.async,walkTokens(o){if(o.type!=="code")return;const a=B0(o);if(e.async)return Promise.resolve(e.highlight(o.text,a)).then(Oo(o));const r=e.highlight(o.text,a);if(r instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");Oo(o)(r)},renderer:{code(o,a,r){const n=(a||"").match(/\S*/)[0],l=n?` class="${e.langPrefix}${zo(n)}"`:"";return o=o.replace(/\n$/,""),`<pre><code${l}>${r?o:zo(o,!0)}
37
- </code></pre>`}}}}function B0(e){return(e.lang||"").match(/\S*/)[0]}function Oo(e){return o=>{typeof o=="string"&&o!==e.text&&(e.escaped=!0,e.text=o)}}var na=/[&<>"']/,N0=new RegExp(na.source,"g"),la=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,E0=new RegExp(la.source,"g"),$0={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Mo=e=>$0[e];function zo(e,o){if(o){if(na.test(e))return e.replace(N0,Mo)}else if(la.test(e))return e.replace(E0,Mo);return e}var x0={name:"cvMarkdownShow",mixins:[Q],emits:["update:html","on-copy"],props:{html:{type:[String]},modelValue:{type:[String],default:""},markedOptions:{type:Object,default:()=>({})},theme:{type:String,default:"light"},language:{type:String,default:""},copyCode:{type:Boolean,default:!0},copyBtnText:{type:String,default:"复制代码"},tocShow:{type:[Boolean],default:!1}},watch:{modelValue(e){this.localVal=e||"",this.initNewCreate()},localHtml(e){this.$emit("update:html",e)}},data(){return{localVal:"",localHtml:"",previewImgModal:!1,previewImgSrc:"",previewImgMode:"",timeoutId:null,imgs:[],tocTrigger:!1,tocAction:"",tocLists:[]}},created(){this.localVal=this.modelValue||""},async mounted(){re.reset(),await $l(this.CDN_URL_UI+"/highlight.js/@11.8.0/styles/default.min.css"),await Oe(this.CDN_URL_UI+"/highlight.js/@11.8.0/highlight.min.js").then(()=>{setTimeout(()=>{hljs.highlightAll(),this.initNewCreate()},30)})},methods:{async initNewCreate(){const{Marked:e,Renderer:o}=await import("https://10ui.cn/marked/@12.0.1/marked.esm.js");o.prototype.heading=function(n,l,i,c){let d=re.add(n,l);return`<h${l} id="${i.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-")}" toc-id="${d}">${n}</h${l}>`};const a=new e(S0({langPrefix:"hljs language-",highlight(n,l){const i=hljs.getLanguage(l)?l:"plaintext";return hljs.highlight(n,{language:i}).value}}));a.use({gfm:!0,tables:!0,breaks:!1,pedantic:!1,smartLists:!0});let r=a.parse(this.localVal,{sanitize:!1,...this.markedOptions});r=r.replace(/href="/gi,'target="_blank" href="'),this.copyCode&&(r=r.replace(/<pre>/g,'<div class="code-block"><span class="copy-code">'+this.copyBtnText+"</span><pre>").replace(/<\/pre>/g,"</pre></div>")),/\[\[TOC\]\]/.test(r)&&(r=r.replace(/\[\[TOC\]\]/g,'<ul class="toc-anchor"></ul>')),this.localHtml=r,this.tocLists=re.tocItems,this.tocTrigger,re.reset(),this.addCopyListener(),this.addImageClickListener()},addCopyListener(){setTimeout(()=>{const e=document.querySelectorAll(".code-block .copy-code");this.btns=e;for(let o=0,a=e.length;o<a;o++)e[o].onclick=()=>{const r=e[o].parentNode.querySelectorAll("pre")[0].innerText;this.$cvCopy(r),this.$emit("on-copy",r)}},30)},addImageClickListener(){if(this.imgs.length>0)for(let e=0,o=this.imgs.length;e<o;e++)this.imgs[e].onclick=null;setTimeout(()=>{if(this.$refs[this.editorRefID]){this.imgs=this.$refs[this.editorRefID].querySelectorAll("img");for(let e=0,o=this.imgs.length;e<o;e++)this.imgs[e].onclick=()=>{const a=this.imgs[e].getAttribute("src");this.previewImage(a)}}},600)},previewImage(e){const o=new Image;o.src=e,o.onload=()=>{const a=o.naturalWidth;o.naturalHeight/a>1.4?this.previewImgMode="horizontal":this.previewImgMode="vertical",this.previewImgSrc=e,this.previewImgModal=!0}},handleScroll(){const e=this.$refs[this.editorRefID],o=e.querySelector(".markdown-preview"),a=o.querySelectorAll("h1,h2,h3,h4,h5");let r=null;if([...a].forEach(n=>{n.offsetTop-o.offsetTop<=o.scrollTop&&(r=n)}),r){this.tocAction=r.getAttribute("toc-id");const n=e.querySelector("ul.toc-anchor");if(n){const l=n.querySelector(`li[anchor="${this.tocAction}"]`);l&&(n.scrollTop=l.offsetTop-n.offsetTop-20)}}},tocClick(e){this.tocAction=e.anchor;const o=this.$refs[this.editorRefID].querySelector(".markdown-preview"),a=o.querySelector("h"+e.level+'[toc-id="'+this.tocAction+'"]');a&&o.scrollTo({top:a.offsetTop-o.offsetTop,behavior:"smooth"})},tocLevel(e,o){let a=9999;return typeof o>"u"&&(o=this.tocLists),o.forEach(({level:r})=>{a=Math.min(a,r)}),a===9999?e:e-(a-1)}}},D0=["id"],T0=["innerHTML"],I0={class:"toc-anchor"},L0=["anchor","onClick"],F0=["anchor","title"],P0=["src"];function O0(e,o,a,r,n,l){const i=(0,t.resolveComponent)("cv-icons");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-markdown-preview",id:e.editorRefID,ref:e.editorRefID,style:(0,t.normalizeStyle)([a.tocShow?"display:flex;":""])},[e.$slots.default?(0,t.renderSlot)(e.$slots,"default",{key:0},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.localHtml),1)]):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(`markdown-preview markdown-theme-base ${"markdown-theme-"+a.theme}`),onScroll:o[0]||(o[0]=(...c)=>l.handleScroll&&l.handleScroll(...c)),innerHTML:n.localHtml},null,42,T0),(0,t.withDirectives)((0,t.createElementVNode)("ul",I0,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.tocLists,c=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{class:"toc-anchor-item",anchor:c.anchor,key:c.anchor,onClick:d=>l.tocClick(c)},[(0,t.createElementVNode)("span",{class:(0,t.normalizeClass)(`toc-link-${l.tocLevel(c.level)}${n.tocAction==c.anchor?" toc-link-action":""}`),anchor:c.anchor,title:c.text},(0,t.toDisplayString)(c.text),11,F0)],8,L0))),128))],512),[[t.vShow,a.tocShow]]),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["preview-img",n.previewImgModal?"active":""])},[(0,t.createVNode)(i,{type:"ElIconClose",onClick:o[1]||(o[1]=c=>n.previewImgModal=!1)}),(0,t.createElementVNode)("img",{src:n.previewImgSrc,class:(0,t.normalizeClass)([n.previewImgMode]),alt:""},null,10,P0)],2)],12,D0)}var Ht=f(x0,[["render",O0]]),M0={methods:{toggleSlideDown(){this.slideDown=!this.slideDown},actionThemesSet(e){this.codemrrConfig.theme=e,this.actionThemeDropdown=!1,this.$emit("on-act-theme",e)},actionChooseImage(){const e=document.createElement("input");e.type="file",e.accept="image/*",e.onchange=()=>{const o=e.files;o[0]&&(this.$emit("on-act-choose-image",o[0]),e.value="")},e.click()},actionUndo(){},actionRedo(){},actionInsBg(){const e=this.getCursortPosition(),o=this.localVal.substring(e-1,e);this.insertContent("===="),o!==`
30
+ `).pop()===""&&(this.lastInsert="")},20)},mousescrollSide(e){this.scrollSide=e},getScrollData(){const e=this.editorWrapRefEL.querySelector(".cv-editor-markdown-main .cm-scroller"),o=e.scrollHeight,a=e.scrollTop,r=this.editorWrapRefEL.querySelector(".cv-markdown-preview .markdown-preview");return{markdownRef:e,markdownScrollHeight:o,markdownScrollTop:a,previewRef:r,contentHeight:r.offsetHeight,previewScrollHeight:r.scrollHeight,previewScrollTop:r.scrollTop||0}},markdownScroll(){if(this.actionScrollSync&&this.scrollSide==="left"){const{markdownRef:e,markdownScrollHeight:o,markdownScrollTop:a,previewRef:r,contentHeight:n,previewScrollHeight:l,previewScrollTop:s}=this.getScrollData();r.scrollTop=parseInt(a/(o-n)*(l-n),0)}},previewScroll(){if(this.actionScrollSync&&this.scrollSide==="right"){const{markdownRef:e,markdownScrollHeight:o,markdownScrollTop:a,previewRef:r,contentHeight:n,previewScrollHeight:l,previewScrollTop:s}=this.getScrollData();e.scrollTop=parseInt(s/(l-n)*(o-n),0)}}}},Y0={key:0,class:"cv-editor-markdown-toolbar","data-title":"头部工具栏"},Z0={class:"cv-editor-toolbars"},Q0={key:1,name:"插入图片"},X0={key:2,name:"本地图片"},J0={class:"icon-svg"},eg={key:4,name:"上传图片"},tg={key:5,name:"上传文件"},og={name:"导入文件",class:"import-file"},ag={name:"保存到本地"},ng={key:6,name:"代码块"},lg={key:7,class:"shift-theme",name:"主题"},rg=["onClick"],ig={key:8,class:"shift-theme",name:"背景颜色"},sg=["onClick"],cg={key:9,class:"shift-theme",name:"phrases"},dg=["onClick"],ug=["name"],mg=["name"],pg=["name"],hg=["name"],gg={key:15,name:"全屏编辑"},fg={key:16,name:"分屏显示"},vg={key:17,name:"预览"},yg={key:18,class:"segmentation"},Cg={class:"icon-svg"},bg={key:22,class:"segmentation"},kg={key:23,name:"目录"},wg={key:24,class:"segmentation"},_g=["name"],Vg={class:"cv-editor-toolbars"},Bg={key:0,name:"撤销"},Sg={key:2,name:"粗体"},Ng={key:3,name:"斜体"},Eg={key:4,name:"删除线"},xg={key:5,name:"下划线"},$g={key:6,name:"标题1"},Dg={key:7,name:"标题2"},Tg={key:8,name:"标题3"},Lg={key:9,name:"标题4"},Ig={key:10,name:"标题5"},Fg={key:11,name:"标题6"},Pg={key:12,name:"分割线"},Ag={key:13,name:"引用"},Mg={key:14,name:"无序列表"},zg={key:15,name:"有序列表"},Og={key:16,name:"未完成列表"},jg={key:17,name:"已完成列表"},Rg={key:18,name:"链接"},Hg={key:19,name:"表格"};function Ug(e,o,a,r,n,l){const s=(0,t.resolveComponent)("SvgImgMap"),c=(0,t.resolveComponent)("SvgUploadFile"),d=(0,t.resolveComponent)("SvgCopy"),u=(0,t.resolveComponent)("SvgToc"),h=(0,t.resolveComponent)("CodemirrorEditor"),m=(0,t.resolveComponent)("cv-markdown-show"),v=(0,t.resolveComponent)("el-input"),f=(0,t.resolveComponent)("el-button"),C=(0,t.resolveComponent)("el-dialog");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{ref:l.editorWrapRefID,class:(0,t.normalizeClass)(["cv-editor-markdown-wrap",`${a.bordered?"border":""}`]),style:(0,t.normalizeStyle)({width:l.widthTotalPx,height:l.heightTotalPx})},[e.actionPreview?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",Y0,[(0,t.createElementVNode)("ul",Z0,[e.$slots.title?((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,{key:0},[(0,t.createElementVNode)("li",null,[(0,t.renderSlot)(e.$slots,"title",{},void 0,!0)]),o[65]||(o[65]=(0,t.createElementVNode)("li",{class:"segmentation"},[(0,t.createElementVNode)("div")],-1))],64)):(0,t.createCommentVNode)("",!0),e.toolConfig.image?((0,t.openBlock)(),(0,t.createElementBlock)("li",Q0,[(0,t.createElementVNode)("span",{onClick:o[0]||(o[0]=(...p)=>e.actionInsImage&&e.actionInsImage(...p)),class:"iconfont icon-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.uploadImage?((0,t.openBlock)(),(0,t.createElementBlock)("li",X0,[(0,t.createElementVNode)("span",{onClick:o[1]||(o[1]=(...p)=>e.actionChooseImage&&e.actionChooseImage(...p)),class:"iconfont icon-upload-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.custom_image?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:3,name:"图片空间",onClick:o[2]||(o[2]=p=>e.actionCustom("image-browse"))},[(0,t.createElementVNode)("span",J0,[(0,t.createVNode)(s)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.custom_uploadImage?((0,t.openBlock)(),(0,t.createElementBlock)("li",eg,[(0,t.createElementVNode)("span",{onClick:o[3]||(o[3]=p=>e.actionCustom("image-upload")),class:"iconfont icon-upload-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.custom_uploadFile?((0,t.openBlock)(),(0,t.createElementBlock)("li",tg,[(0,t.createElementVNode)("span",{onClick:o[4]||(o[4]=p=>e.actionCustom("file-upload")),class:"icon-svg"},[(0,t.createVNode)(c)])])):(0,t.createCommentVNode)("",!0),(0,t.withDirectives)((0,t.createElementVNode)("li",og,[(0,t.createElementVNode)("span",{class:"iconfont icon-daoru",onClick:o[5]||(o[5]=(...p)=>e.actionImportFile&&e.actionImportFile(...p))}),(0,t.createElementVNode)("input",{type:"file",onChange:o[6]||(o[6]=p=>e.actionImportFile(p)),accept:"text/markdown"},null,32)],512),[[t.vShow,e.toolConfig.importmd]]),(0,t.withDirectives)((0,t.createElementVNode)("li",ag,[(0,t.createElementVNode)("span",{class:"iconfont icon-download",onClick:o[7]||(o[7]=(...p)=>e.actionExportFile&&e.actionExportFile(...p))})],512),[[t.vShow,e.toolConfig.exportmd]]),o[72]||(o[72]=(0,t.createElementVNode)("li",{class:"segmentation"},[(0,t.createElementVNode)("div")],-1)),e.toolConfig.code?((0,t.openBlock)(),(0,t.createElementBlock)("li",ng,[(0,t.createElementVNode)("span",{onClick:o[8]||(o[8]=(...p)=>e.insertCode&&e.insertCode(...p)),class:"iconfont icon-code"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.theme?((0,t.openBlock)(),(0,t.createElementBlock)("li",lg,[(0,t.createElementVNode)("span",{class:"iconfont icon-theme",onClick:o[9]||(o[9]=p=>e.actionThemeDropdown=!e.actionThemeDropdown)}),(0,t.createElementVNode)("ul",{class:(0,t.normalizeClass)({active:e.actionThemeDropdown}),onMouseleave:o[10]||(o[10]=p=>e.actionThemeDropdown=!1)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.optionTheme,p=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{onClick:w=>e.actionThemesSet(p)},(0,t.toDisplayString)(p),9,rg))),256))],34)])):(0,t.createCommentVNode)("",!0),e.toolConfig.backgroundColor?((0,t.openBlock)(),(0,t.createElementBlock)("li",ig,[(0,t.createElementVNode)("span",{class:"iconfont icon-theme",onClick:o[11]||(o[11]=p=>e.actionBgColorDropdown=!e.actionBgColorDropdown)}),(0,t.createElementVNode)("ul",{class:(0,t.normalizeClass)({active:e.actionBgColorDropdown}),onMouseleave:o[12]||(o[12]=p=>e.actionBgColorDropdown=!1)},[((0,t.openBlock)(),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(["red","black","yellow","lawngreen","blue","white"],p=>(0,t.createElementVNode)("li",{onClick:w=>e.actionBgColorSet(p)},(0,t.toDisplayString)(p),9,sg)),64))],34)])):(0,t.createCommentVNode)("",!0),e.toolConfig.phrases?((0,t.openBlock)(),(0,t.createElementBlock)("li",cg,[(0,t.createElementVNode)("span",{class:"iconfont icon-theme",onClick:o[13]||(o[13]=p=>e.actionPhrasesDropdown=!e.actionPhrasesDropdown)}),(0,t.createElementVNode)("ul",{class:(0,t.normalizeClass)({active:e.actionPhrasesDropdown}),onMouseleave:o[14]||(o[14]=p=>e.actionPhrasesDropdown=!1)},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(e.optionPhrases,p=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{onClick:w=>e.actionPhrasesSet(p)},(0,t.toDisplayString)(p),9,dg))),256))],34)])):(0,t.createCommentVNode)("",!0),e.toolConfig.html_to_markdown?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:10,name:"html转markdown",onClick:o[15]||(o[15]=p=>e.actionHtmlVisible(!0))},[...o[66]||(o[66]=[(0,t.createElementVNode)("span",{style:{width:"auto","font-size":"12px !important",padding:"0px 6px",margin:"0 10px",border:"1px #e2e2e2 solid"}}," HTML2MD ",-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.disabled?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:11,name:e.codemrrConfig.disabled?"toggle disabled:开":"toggle disabled:关"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[16]||(o[16]=p=>e.codemrrConfig.disabled=!e.codemrrConfig.disabled),class:"iconfont icon-on"},null,512),[[t.vShow,e.codemrrConfig.disabled]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[17]||(o[17]=p=>e.codemrrConfig.disabled=!e.codemrrConfig.disabled),class:"iconfont icon-off"},null,512),[[t.vShow,!e.codemrrConfig.disabled]])],8,ug)):(0,t.createCommentVNode)("",!0),e.toolConfig.autofocus?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:12,name:e.codemrrConfig.autofocus?"toggle autofocus:开":"toggle autofocus:关"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[18]||(o[18]=p=>e.codemrrConfig.autofocus=!e.codemrrConfig.autofocus),class:"iconfont icon-on"},null,512),[[t.vShow,e.codemrrConfig.autofocus]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[19]||(o[19]=p=>e.codemrrConfig.autofocus=!e.codemrrConfig.autofocus),class:"iconfont icon-off"},null,512),[[t.vShow,!e.codemrrConfig.autofocus]])],8,mg)):(0,t.createCommentVNode)("",!0),e.toolConfig.indentWithTab?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:13,name:e.codemrrConfig.indentWithTab?"toggle indentWithTab:开":"toggle indentWithTab:关"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[20]||(o[20]=p=>e.codemrrConfig.indentWithTab=!e.codemrrConfig.indentWithTab),class:"iconfont icon-on"},null,512),[[t.vShow,e.codemrrConfig.indentWithTab]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[21]||(o[21]=p=>e.codemrrConfig.indentWithTab=!e.codemrrConfig.indentWithTab),class:"iconfont icon-off"},null,512),[[t.vShow,!e.codemrrConfig.indentWithTab]])],8,pg)):(0,t.createCommentVNode)("",!0),o[73]||(o[73]=(0,t.createElementVNode)("li",{class:"empty"},null,-1)),e.toolConfig.scrollSync?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:14,name:e.actionScrollSync?"同步滚动:开":"同步滚动:关"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[22]||(o[22]=p=>e.actionScrollSync=!e.actionScrollSync),class:"iconfont icon-on active"},null,512),[[t.vShow,e.actionScrollSync]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[23]||(o[23]=p=>e.actionScrollSync=!e.actionScrollSync),class:"iconfont icon-off"},null,512),[[t.vShow,!e.actionScrollSync]])],8,hg)):(0,t.createCommentVNode)("",!0),e.toolConfig.split&&e.actionSplit?((0,t.openBlock)(),(0,t.createElementBlock)("li",gg,[(0,t.createElementVNode)("span",{onClick:o[24]||(o[24]=p=>e.actionSplit=!1),class:"iconfont icon-md"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.split&&!e.actionSplit?((0,t.openBlock)(),(0,t.createElementBlock)("li",fg,[(0,t.createElementVNode)("span",{onClick:o[25]||(o[25]=p=>e.actionSplit=!0),class:"iconfont icon-group"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.preview?((0,t.openBlock)(),(0,t.createElementBlock)("li",vg,[(0,t.createElementVNode)("span",{onClick:o[26]||(o[26]=p=>e.actionPreview=!0),class:"iconfont icon-preview"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.copy||e.toolConfig.clear||e.toolConfig.save?((0,t.openBlock)(),(0,t.createElementBlock)("li",yg,[...o[67]||(o[67]=[(0,t.createElementVNode)("div",null,null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.copy?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:19,name:"复制",onClick:o[27]||(o[27]=(...p)=>e.actionCopySet&&e.actionCopySet(...p))},[(0,t.createElementVNode)("span",Cg,[(0,t.createVNode)(d)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.clear?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:20,name:"清空",onClick:o[28]||(o[28]=p=>n.localVal="")},[...o[68]||(o[68]=[(0,t.createElementVNode)("span",{class:"iconfont icon-clear"},null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.save?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:21,name:"保存",onClick:o[29]||(o[29]=(...p)=>e.actionSaveSet&&e.actionSaveSet(...p))},[...o[69]||(o[69]=[(0,t.createElementVNode)("span",{class:"iconfont icon-save"},null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.toc?((0,t.openBlock)(),(0,t.createElementBlock)("li",bg,[...o[70]||(o[70]=[(0,t.createElementVNode)("div",null,null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.toc?((0,t.openBlock)(),(0,t.createElementBlock)("li",kg,[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[30]||(o[30]=p=>e.actionToc=!e.actionToc),class:"icon-svg active"},[(0,t.createVNode)(u)],512),[[t.vShow,e.actionToc]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[31]||(o[31]=p=>e.actionToc=!e.actionToc),class:"icon-svg"},[(0,t.createVNode)(u)],512),[[t.vShow,!e.actionToc]])])):(0,t.createCommentVNode)("",!0),e.toolConfig.fullscreen?((0,t.openBlock)(),(0,t.createElementBlock)("li",wg,[...o[71]||(o[71]=[(0,t.createElementVNode)("div",null,null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.fullscreen?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:25,name:e.actionFullscreen?"退出全屏":"全屏"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[32]||(o[32]=p=>e.actionFullscreenSet(!1)),class:"iconfont icon-quite"},null,512),[[t.vShow,e.actionFullscreen]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[33]||(o[33]=p=>e.actionFullscreenSet(!0)),class:"iconfont icon-fullscreen"},null,512),[[t.vShow,!e.actionFullscreen]])],8,_g)):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("ul",Vg,[e.toolConfig.undo?((0,t.openBlock)(),(0,t.createElementBlock)("li",Bg,[(0,t.createElementVNode)("span",{class:"iconfont icon-undo",onClick:o[34]||(o[34]=(...p)=>e.actionUndo&&e.actionUndo(...p))})])):(0,t.createCommentVNode)("",!0),e.toolConfig.redo?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:1,name:"重做",onClick:o[35]||(o[35]=(...p)=>e.actionRedo&&e.actionRedo(...p))},[...o[74]||(o[74]=[(0,t.createElementVNode)("span",{class:"iconfont icon-redo"},null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.strong?((0,t.openBlock)(),(0,t.createElementBlock)("li",Sg,[(0,t.createElementVNode)("span",{onClick:o[36]||(o[36]=(...p)=>e.actionInsStrong&&e.actionInsStrong(...p)),class:"iconfont icon-bold"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.italic?((0,t.openBlock)(),(0,t.createElementBlock)("li",Ng,[(0,t.createElementVNode)("span",{onClick:o[37]||(o[37]=(...p)=>e.actionInsItalic&&e.actionInsItalic(...p)),class:"iconfont icon-italic"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.overline?((0,t.openBlock)(),(0,t.createElementBlock)("li",Eg,[(0,t.createElementVNode)("span",{onClick:o[38]||(o[38]=(...p)=>e.actionInsOverline&&e.actionInsOverline(...p)),class:"iconfont icon-overline"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.overline?((0,t.openBlock)(),(0,t.createElementBlock)("li",xg,[(0,t.createElementVNode)("span",{onClick:o[39]||(o[39]=(...p)=>e.actionInsUnderline&&e.actionInsUnderline(...p)),class:"iconfont icon-under-line"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.h1?((0,t.openBlock)(),(0,t.createElementBlock)("li",$g,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[40]||(o[40]=p=>e.actionInsTitle(1))},"h1")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h2?((0,t.openBlock)(),(0,t.createElementBlock)("li",Dg,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[41]||(o[41]=p=>e.actionInsTitle(2))},"h2")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h3?((0,t.openBlock)(),(0,t.createElementBlock)("li",Tg,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[42]||(o[42]=p=>e.actionInsTitle(3))},"h3")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h4?((0,t.openBlock)(),(0,t.createElementBlock)("li",Lg,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[43]||(o[43]=p=>e.actionInsTitle(4))},"h4")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h5?((0,t.openBlock)(),(0,t.createElementBlock)("li",Ig,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[44]||(o[44]=p=>e.actionInsTitle(5))},"h5")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h6?((0,t.openBlock)(),(0,t.createElementBlock)("li",Fg,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[45]||(o[45]=p=>e.actionInsTitle(6))},"h6")])):(0,t.createCommentVNode)("",!0),e.toolConfig.hr?((0,t.openBlock)(),(0,t.createElementBlock)("li",Pg,[(0,t.createElementVNode)("span",{onClick:o[46]||(o[46]=(...p)=>e.actionInsLine&&e.actionInsLine(...p)),class:"iconfont icon-horizontal"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.quote?((0,t.openBlock)(),(0,t.createElementBlock)("li",Ag,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[47]||(o[47]=(...p)=>e.actionInsQuote&&e.actionInsQuote(...p)),class:"iconfont icon-quote"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.ul?((0,t.openBlock)(),(0,t.createElementBlock)("li",Mg,[(0,t.createElementVNode)("span",{onClick:o[48]||(o[48]=(...p)=>e.actionInsUl&&e.actionInsUl(...p)),class:"iconfont icon-ul"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.ol?((0,t.openBlock)(),(0,t.createElementBlock)("li",zg,[(0,t.createElementVNode)("span",{onClick:o[49]||(o[49]=(...p)=>e.actionInsOl&&e.actionInsOl(...p)),class:"iconfont icon-ol"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.notChecked?((0,t.openBlock)(),(0,t.createElementBlock)("li",Og,[(0,t.createElementVNode)("span",{onClick:o[50]||(o[50]=(...p)=>e.insertNotFinished&&e.insertNotFinished(...p)),class:"iconfont icon-checked-false"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.checked?((0,t.openBlock)(),(0,t.createElementBlock)("li",jg,[(0,t.createElementVNode)("span",{onClick:o[51]||(o[51]=(...p)=>e.insertFinished&&e.insertFinished(...p)),class:"iconfont icon-checked"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.link?((0,t.openBlock)(),(0,t.createElementBlock)("li",Rg,[(0,t.createElementVNode)("span",{onClick:o[52]||(o[52]=(...p)=>e.actionInsLink&&e.actionInsLink(...p)),class:"iconfont icon-link"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.table?((0,t.openBlock)(),(0,t.createElementBlock)("li",Hg,[(0,t.createElementVNode)("span",{onClick:o[53]||(o[53]=(...p)=>e.actionInsTable&&e.actionInsTable(...p)),class:"iconfont icon-table"})])):(0,t.createCommentVNode)("",!0)])])),(0,t.createElementVNode)("div",{title:"编辑器",class:"cv-editor-markdown-main",style:(0,t.normalizeStyle)({background:e.actionPreview?"#fff":""})},[(0,t.withDirectives)((0,t.createVNode)(h,(0,t.mergeProps)(e.codemrrBind,{id:e.editorRefID,ref:e.editorRefID,style:{height:n.heightMainPx,backgroundColor:e.codemrrConfig.backgroundColor},extensions:e.extensions,modelValue:n.localVal,"onUpdate:modelValue":o[54]||(o[54]=p=>n.localVal=p),onReady:l.initEditorReady,onChange:o[55]||(o[55]=p=>l.consoleLog("change",p)),onFocus:o[56]||(o[56]=p=>l.consoleLog("focus",p)),onBlur:o[57]||(o[57]=p=>l.consoleLog("blur",p)),onMouseenter:o[58]||(o[58]=p=>l.mousescrollSide("left"))}),null,16,["id","style","extensions","modelValue","onReady"]),[[t.vShow,!e.actionPreview]]),(0,t.withDirectives)((0,t.createVNode)(m,{html:n.lastHtml,"onUpdate:html":o[59]||(o[59]=p=>n.lastHtml=p),ref:l.previewRefID,editorID:l.previewRefID,modelValue:n.localVal,theme:e.codemrrConfig.theme||a.theme,language:a.language,tocShow:e.actionToc,style:(0,t.normalizeStyle)([{flex:"1",height:"100%","border-left":"1px solid #dedede","overflow-y":"auto"},{height:e.actionPreview?"":n.heightMainPx}]),onMouseenter:o[60]||(o[60]=p=>l.mousescrollSide("right"))},null,8,["html","editorID","modelValue","theme","language","tocShow","style"]),[[t.vShow,e.actionPreview?e.actionPreview:e.actionSplit]])],4),(0,t.withDirectives)((0,t.createElementVNode)("div",{title:"关闭预览按钮",class:"close-preview",onClick:o[61]||(o[61]=p=>e.actionPreview=!1)},[...o[75]||(o[75]=[(0,t.createElementVNode)("span",{class:"iconfont icon-close"},null,-1)])],512),[[t.vShow,e.actionPreview]]),(0,t.createVNode)(C,{modelValue:e.actionHtmlDiaVisible,"onUpdate:modelValue":o[64]||(o[64]=p=>e.actionHtmlDiaVisible=p),title:"html转markdown",width:"680","show-close":!1,"append-to-body":""},{footer:(0,t.withCtx)(()=>[(0,t.createVNode)(f,{onClick:o[63]||(o[63]=p=>e.actionHtmlVisible(!1))},{default:(0,t.withCtx)(()=>[...o[76]||(o[76]=[(0,t.createTextVNode)("取消",-1)])]),_:1}),(0,t.createVNode)(f,{type:"primary",onClick:e.actionHtmlToMD},{default:(0,t.withCtx)(()=>[...o[77]||(o[77]=[(0,t.createTextVNode)("转换成markdown",-1)])]),_:1},8,["onClick"])]),default:(0,t.withCtx)(()=>[(0,t.createVNode)(v,{type:"textarea",modelValue:e.actionHtmlText,"onUpdate:modelValue":o[62]||(o[62]=p=>e.actionHtmlText=p),rows:14,placeholder:"请输入html代码..."},null,8,["modelValue"])]),_:1},8,["modelValue"])],6)}var mo=y(G0,[["render",Ug],["__scopeId","data-v-a76ecd6a"]]),De={add(e,o){const a=`toc${o}${++this.index}`,r={anchor:a,level:o,text:e},n=this.tocItems;return r.level<=5&&n.push(r),a},reset:function(){this.tocItems=[],this.index=0},tocItems:[],index:0};function Wg(e){if(typeof e=="function"&&(e={highlight:e}),!e||typeof e.highlight!="function")throw new Error("Must provide highlight function");return typeof e.langPrefix!="string"&&(e.langPrefix="language-"),{async:!!e.async,walkTokens(o){if(o.type!=="code")return;const a=qg(o);if(e.async)return Promise.resolve(e.highlight(o.text,a)).then(Aa(o));const r=e.highlight(o.text,a);if(r instanceof Promise)throw new Error("markedHighlight is not set to async but the highlight function is async. Set the async option to true on markedHighlight to await the async highlight function.");Aa(o)(r)},renderer:{code(o,a,r){const n=(a||"").match(/\S*/)[0],l=n?` class="${e.langPrefix}${za(n)}"`:"";return o=o.replace(/\n$/,""),`<pre><code${l}>${r?o:za(o,!0)}
31
+ </code></pre>`}}}}function qg(e){return(e.lang||"").match(/\S*/)[0]}function Aa(e){return o=>{typeof o=="string"&&o!==e.text&&(e.escaped=!0,e.text=o)}}var ln=/[&<>"']/,Kg=new RegExp(ln.source,"g"),rn=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,Gg=new RegExp(rn.source,"g"),Yg={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},Ma=e=>Yg[e];function za(e,o){if(o){if(ln.test(e))return e.replace(Kg,Ma)}else if(rn.test(e))return e.replace(Gg,Ma);return e}var Zg={name:"cvMarkdownShow",mixins:[ge],emits:["update:html","on-copy"],props:{html:{type:[String]},modelValue:{type:[String],default:""},markedOptions:{type:Object,default:()=>({})},theme:{type:String,default:"light"},language:{type:String,default:""},copyCode:{type:Boolean,default:!0},copyBtnText:{type:String,default:"复制代码"},tocShow:{type:[Boolean],default:!1}},watch:{modelValue(e){this.localVal=e||"",this.initNewCreate()},localHtml(e){this.$emit("update:html",e)}},data(){return{localVal:"",localHtml:"",previewImgModal:!1,previewImgSrc:"",previewImgMode:"",timeoutId:null,imgs:[],tocTrigger:!1,tocAction:"",tocLists:[]}},created(){this.localVal=this.modelValue||""},async mounted(){De.reset(),await Fr(this.CDN_URL_UI+"/highlight.js/@11.8.0/styles/default.min.css"),await st(this.CDN_URL_UI+"/highlight.js/@11.8.0/highlight.min.js").then(()=>{setTimeout(()=>{hljs.highlightAll(),this.initNewCreate()},30)})},methods:{async initNewCreate(){const{Marked:e,Renderer:o}=await import("https://10ui.cn/marked/@12.0.1/marked.esm.js");o.prototype.heading=function(n,l,s,c){let d=De.add(n,l);return`<h${l} id="${s.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-")}" toc-id="${d}">${n}</h${l}>`};const a=new e(Wg({langPrefix:"hljs language-",highlight(n,l){const s=hljs.getLanguage(l)?l:"plaintext";return hljs.highlight(n,{language:s}).value}}));a.use({gfm:!0,tables:!0,breaks:!1,pedantic:!1,smartLists:!0});let r=a.parse(this.localVal,{sanitize:!1,...this.markedOptions});r=r.replace(/href="/gi,'target="_blank" href="'),this.copyCode&&(r=r.replace(/<pre>/g,'<div class="code-block"><span class="copy-code">'+this.copyBtnText+"</span><pre>").replace(/<\/pre>/g,"</pre></div>")),/\[\[TOC\]\]/.test(r)&&(r=r.replace(/\[\[TOC\]\]/g,'<ul class="toc-anchor"></ul>')),this.localHtml=r,this.tocLists=De.tocItems,this.tocTrigger,De.reset(),this.addCopyListener(),this.addImageClickListener()},addCopyListener(){setTimeout(()=>{const e=document.querySelectorAll(".code-block .copy-code");this.btns=e;for(let o=0,a=e.length;o<a;o++)e[o].onclick=()=>{const r=e[o].parentNode.querySelectorAll("pre")[0].innerText;this.$cvCopy(r),this.$emit("on-copy",r)}},30)},addImageClickListener(){if(this.imgs.length>0)for(let e=0,o=this.imgs.length;e<o;e++)this.imgs[e].onclick=null;setTimeout(()=>{if(this.$refs[this.editorRefID]){this.imgs=this.$refs[this.editorRefID].querySelectorAll("img");for(let e=0,o=this.imgs.length;e<o;e++)this.imgs[e].onclick=()=>{const a=this.imgs[e].getAttribute("src");this.previewImage(a)}}},600)},previewImage(e){const o=new Image;o.src=e,o.onload=()=>{const a=o.naturalWidth;o.naturalHeight/a>1.4?this.previewImgMode="horizontal":this.previewImgMode="vertical",this.previewImgSrc=e,this.previewImgModal=!0}},handleScroll(){const e=this.$refs[this.editorRefID],o=e.querySelector(".markdown-preview"),a=o.querySelectorAll("h1,h2,h3,h4,h5");let r=null;if([...a].forEach(n=>{n.offsetTop-o.offsetTop<=o.scrollTop&&(r=n)}),r){this.tocAction=r.getAttribute("toc-id");const n=e.querySelector("ul.toc-anchor");if(n){const l=n.querySelector(`li[anchor="${this.tocAction}"]`);l&&(n.scrollTop=l.offsetTop-n.offsetTop-20)}}},tocClick(e){this.tocAction=e.anchor;const o=this.$refs[this.editorRefID].querySelector(".markdown-preview"),a=o.querySelector("h"+e.level+'[toc-id="'+this.tocAction+'"]');a&&o.scrollTo({top:a.offsetTop-o.offsetTop,behavior:"smooth"})},tocLevel(e,o){let a=9999;return typeof o>"u"&&(o=this.tocLists),o.forEach(({level:r})=>{a=Math.min(a,r)}),a===9999?e:e-(a-1)}}},Qg=["id"],Xg=["innerHTML"],Jg={class:"toc-anchor"},ef=["anchor","onClick"],tf=["anchor","title"],of=["src"];function af(e,o,a,r,n,l){const s=(0,t.resolveComponent)("cv-icons");return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"cv-markdown-preview",id:e.editorRefID,ref:e.editorRefID,style:(0,t.normalizeStyle)([a.tocShow?"display:flex;":""])},[e.$slots.default?(0,t.renderSlot)(e.$slots,"default",{key:0},()=>[(0,t.createTextVNode)((0,t.toDisplayString)(n.localHtml),1)]):(0,t.createCommentVNode)("",!0),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(`markdown-preview markdown-theme-base ${"markdown-theme-"+a.theme}`),onScroll:o[0]||(o[0]=(...c)=>l.handleScroll&&l.handleScroll(...c)),innerHTML:n.localHtml},null,42,Xg),(0,t.withDirectives)((0,t.createElementVNode)("ul",Jg,[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.tocLists,c=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{class:"toc-anchor-item",anchor:c.anchor,key:c.anchor,onClick:d=>l.tocClick(c)},[(0,t.createElementVNode)("span",{class:(0,t.normalizeClass)(`toc-link-${l.tocLevel(c.level)}${n.tocAction==c.anchor?" toc-link-action":""}`),anchor:c.anchor,title:c.text},(0,t.toDisplayString)(c.text),11,tf)],8,ef))),128))],512),[[t.vShow,a.tocShow]]),(0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(["preview-img",n.previewImgModal?"active":""])},[(0,t.createVNode)(s,{type:"ElIconClose",onClick:o[1]||(o[1]=c=>n.previewImgModal=!1)}),(0,t.createElementVNode)("img",{src:n.previewImgSrc,class:(0,t.normalizeClass)([n.previewImgMode]),alt:""},null,10,of)],2)],12,Qg)}var po=y(Zg,[["render",af]]),nf={methods:{toggleSlideDown(){this.slideDown=!this.slideDown},actionThemesSet(e){this.codemrrConfig.theme=e,this.actionThemeDropdown=!1,this.$emit("on-act-theme",e)},actionChooseImage(){const e=document.createElement("input");e.type="file",e.accept="image/*",e.onchange=()=>{const o=e.files;o[0]&&(this.$emit("on-act-choose-image",o[0]),e.value="")},e.click()},actionUndo(){},actionRedo(){},actionInsBg(){const e=this.getCursortPosition(),o=this.localVal.substring(e-1,e);this.insertContent("===="),o!==`
38
32
  `&&this.localVal!==""?this.setCaretPosition(e+5):this.setCaretPosition(e+5)},actionInsStrong(){const e=this.getCursortPosition(),o=this.localVal.substring(e-1,e);this.insertContent("****"),o!==`
39
33
  `&&this.localVal!==""?this.setCaretPosition(e+2):this.setCaretPosition(e+2)},actionInsItalic(){const e=this.getCursortPosition(),o=this.localVal.substring(e-1,e);this.insertContent("**"),o!==`
40
34
  `&&this.localVal!==""?this.setCaretPosition(e+1):this.setCaretPosition(e+1)},actionInsOverline(){const e=this.getCursortPosition(),o=this.localVal.substring(e-1,e);this.insertContent("~~~~"),o!==`
@@ -50,9 +44,9 @@ row 1 col 1 | row 1 col 2
50
44
  row 2 col 1 | row 2 col 2
51
45
 
52
46
  `)},actionInsImage(){this.insertContent(`
53
- ![image](imgUrl)`)},actionImportFile(e){const o=e.target.files[0];if(!o)return;const{type:a}=o;if(!["text/markdown","text/src"].includes(a))return;const r=new FileReader;r.readAsText(o,{encoding:"utf-8"}),r.onload=()=>{this.localVal=r.result,e.target.value=""},r.onerror=n=>{}},actionExportFile(){aa(this.localVal,this.lastExpFileName+".md")},insertCode(){const e=this.getCursortPosition(),o=this.localVal.substring(e-1,e);this.insertContent("\n```\n\n```"),o!==`
54
- `&&this.localVal!==""?this.setCaretPosition(e+5):this.setCaretPosition(e+5)},actionSaveSet(){const{localVal:e,codemrrConfig:o,lastHtml:a}=this;this.$emit("on-act-save",{theme:o.theme||"",value:e||"",html:a||""})},actionCustom(e){this.$emit("on-act-custom",e)}}},z0={name:"cvMarkdownSimple",mixins:[Q,uo,M0],emits:["update:modelValue","on-ready"],props:{modelValue:{type:[String,Number],default:""},theme:{type:String,default:"light"},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:600},toolbars:{type:Object,default(){return{}}},bordered:{type:Boolean,default:!0},autoSave:{type:Boolean,default:!1},interval:{type:Number,default:1e4},markedOptions:{type:Object,default(){return{}}},copyCode:{type:Boolean,default:!0},copyBtnText:{type:String,default:"复制代码"},isCustomFullscreen:{type:Boolean,default:!1}},data(){return{localVal:"",timeoutId:null,indexLenth:1,html:"",fullscreen:!1,scrollSide:"",lastInsert:"",timerId:null,themeSlideDown:!1,scrolling:!0,textareaHeight:this.height}},destroyed(){clearInterval(this.timerId)},watch:{localVal(){clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{const{localVal:e}=this;let o=marked(e,{sanitize:!1,...this.markedOptions}).replace(/href="/gi,'target="_blank" href="');this.copyCode&&o!==""&&(o=o.replace(/<pre>/g,'<div class="code-block"><span class="copy-code">'+this.copyBtnText+"</span><pre>").replace(/<\/pre>/g,"</pre></div>")),this.html=o,this.indexLenth=this.localVal.split(`
47
+ ![image](imgUrl)`)},actionImportFile(e){const o=e.target.files[0];if(!o)return;const{type:a}=o;if(!["text/markdown","text/src"].includes(a))return;const r=new FileReader;r.readAsText(o,{encoding:"utf-8"}),r.onload=()=>{this.localVal=r.result,e.target.value=""},r.onerror=n=>{}},actionExportFile(){nn(this.localVal,this.lastExpFileName+".md")},insertCode(){const e=this.getCursortPosition(),o=this.localVal.substring(e-1,e);this.insertContent("\n```\n\n```"),o!==`
48
+ `&&this.localVal!==""?this.setCaretPosition(e+5):this.setCaretPosition(e+5)},actionSaveSet(){const{localVal:e,codemrrConfig:o,lastHtml:a}=this;this.$emit("on-act-save",{theme:o.theme||"",value:e||"",html:a||""})},actionCustom(e){this.$emit("on-act-custom",e)}}},lf={name:"cvMarkdownSimple",mixins:[ge,Xo,nf],emits:["update:modelValue","on-ready"],props:{modelValue:{type:[String,Number],default:""},theme:{type:String,default:"light"},width:{type:[Number,String],default:"auto"},height:{type:[Number,String],default:600},toolbars:{type:Object,default(){return{}}},bordered:{type:Boolean,default:!0},autoSave:{type:Boolean,default:!1},interval:{type:Number,default:1e4},markedOptions:{type:Object,default(){return{}}},copyCode:{type:Boolean,default:!0},copyBtnText:{type:String,default:"复制代码"},isCustomFullscreen:{type:Boolean,default:!1}},data(){return{localVal:"",timeoutId:null,indexLenth:1,html:"",fullscreen:!1,scrollSide:"",lastInsert:"",timerId:null,themeSlideDown:!1,scrolling:!0,textareaHeight:this.height}},destroyed(){clearInterval(this.timerId)},watch:{localVal(){clearTimeout(this.timeoutId),this.timeoutId=setTimeout(()=>{const{localVal:e}=this;let o=marked(e,{sanitize:!1,...this.markedOptions}).replace(/href="/gi,'target="_blank" href="');this.copyCode&&o!==""&&(o=o.replace(/<pre>/g,'<div class="code-block"><span class="copy-code">'+this.copyBtnText+"</span><pre>").replace(/<\/pre>/g,"</pre></div>")),this.html=o,this.indexLenth=this.localVal.split(`
55
49
  `).length,this.textareaHeight=this.indexLenth*22,this.addImageClickListener(),this.addCopyListener(),this.$emit("update:modelValue",e)},30)},modelValue(){this.localVal!==this.modelValue&&(this.localVal=this.modelValue)}},mounted(){this.init()},methods:{init(){this.localVal=this.modelValue,this.codemrrConfig.theme=this.theme,setTimeout(()=>{const e=this.$refs.textarea;e.focus(),e.addEventListener("keydown",o=>{o.keyCode===83&&(o.metaKey||o.ctrlKey)&&(o.preventDefault(),this.actionSaveSet())}),e.addEventListener("paste",this.handlePaste),this.autoSave&&(this.timerId=setInterval(()=>{this.actionSaveSet()},this.interval)),this.$emit("on-ready",{vm:this,insertContent:this.insertContent})},20)},insertContent(e){this.lastInsert=e;const o=this.getCursortPosition(),a=this.localVal.substring(o-1,o),r=this.localVal.substring(o-4,o);if(a!==`
56
50
  `&&this.localVal!==""&&r!==" "){const n=`
57
51
  `+e;this.insertAfterText(n)}else this.insertAfterText(e)},getCursortPosition(){const e=this.$refs.textarea;let o=0;if(document.selection){e.focus();let a=document.selection.createRange();a.moveStart("character",-this.localVal.length),o=a.text.length}else(e.selectionStart||parseInt(e.selectionStart,0)===0)&&(o=e.selectionStart);return o},insertAfterText(e){const o=this.$refs.textarea;let a;if(document.selection)o.focus(),a=document.selection.createRange(),a.text=e,o.focus();else if(o.selectionStart||parseInt(o.selectionStart,0)===0){const r=o.selectionStart,n=o.selectionEnd,l=o.scrollTop;o.value=o.value.substring(0,r)+e+o.value.substring(n,o.value.length),o.focus(),o.selectionStart=r+e.length,o.selectionEnd=r+e.length,o.scrollTop=l}else o.value+=e,o.focus();this.localVal=o.value},setCaretPosition(e){const o=this.$refs.textarea;if(o.setSelectionRange)o.focus(),o.setSelectionRange(e,e);else if(o.createTextRange){let a=o.createTextRange();a.collapse(!0),a.moveEnd("character",e),a.moveStart("character",e),a.select()}},tab(e){this.insertContent(" ",this),e.preventDefault?e.preventDefault():e.returnValue=!1},enter(){const{lastInsert:e}=this;["- ","1. ","- [ ] ","- [x] "].includes(e)&&this.insertContent(e)},onDelete(){const e=this.localVal.split(`
58
- `);e[e.length-1]===""&&(this.lastInsert="")},mousescrollSide(e){this.scrollSide=e},handlePaste(e){const{clipboardData:o={}}=e,{types:a=[],items:r}=o;let n=null;for(let l=0;l<a.length;l++)if(a[l]==="Files"){n=r[l];break}if(n){const l=n.getAsFile();/image/gi.test(l.type)&&(this.$emit("on-upload-image",l),this.$emit("on-paste-image",l),e.preventDefault())}},markdownScroll(){const{scrolling:e}=this;if(e&&this.scroll==="left"){const o=this.$refs.markdownEditor,a=this.$refs.preview,r=a.offsetHeight,n=o.scrollHeight,l=o.scrollTop,i=a.scrollHeight;a.scrollTop=parseInt(l/(n-r)*(i-r),0)}},previewScroll(){const{scrolling:e}=this;if(e&&this.scroll==="right"){const o=this.$refs.markdownEditor,a=this.$refs.preview,r=a.offsetHeight,n=o.scrollHeight,l=a.scrollHeight,i=a.scrollTop;o.scrollTop=parseInt(i/(l-r)*(n-r),0)}},mousescrollSide(e){this.scroll=e}}},A0={key:0,title:"头部工具栏"},H0={class:"cv-editor-toolbars"},j0={key:0,name:"粗体"},R0={key:1,name:"斜体"},U0={key:2,name:"删除线"},W0={key:3,name:"下划线"},Y0={key:4,name:"标题1"},q0={key:5,name:"标题2"},X0={key:6,name:"标题3"},K0={key:7,name:"标题4"},G0={key:8,name:"标题5"},Z0={key:9,name:"标题6"},Q0={key:10,name:"分割线"},J0={key:11,name:"引用"},eg={key:12,name:"无序列表"},tg={key:13,name:"有序列表"},og={key:14,name:"未完成列表"},ag={key:15,name:"已完成列表"},ng={key:16,name:"链接"},lg={key:17,name:"表格"},rg=["name"],ig={key:19,name:"全屏编辑"},sg={key:20,name:"分屏显示"},cg={key:21,name:"预览"},dg={class:"cv-editor-toolbars"},ug={key:0,name:"图片"},pg={key:1,name:"本地图片"},mg={key:2,name:"图片空间"},hg={key:3,name:"上传图片"},gg={key:4,name:"上传文件"},fg={key:5,class:"shift-theme",name:"代码块主题"},vg={name:"导入文件",class:"import-file"},Cg={name:"保存到本地"},kg={key:6,name:"全屏"},bg={key:7,name:"退出全屏"},yg=["innerHTML"];function wg(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(`markdown ${n.fullscreen?"fullscreen":""} ${a.bordered?"border":""}`),ref:"markdown",style:(0,t.normalizeStyle)({width:a.width+(typeof a.width=="string"?"":"px"),height:a.height+(typeof a.height=="string"?"":"px")})},[e.actionPreview?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",A0,[(0,t.createElementVNode)("ul",H0,[(0,t.createElementVNode)("li",null,[(0,t.renderSlot)(e.$slots,"title",{},void 0,!0)]),e.toolConfig.strong?((0,t.openBlock)(),(0,t.createElementBlock)("li",j0,[(0,t.createElementVNode)("span",{onClick:o[0]||(o[0]=(...i)=>e.actionInsStrong&&e.actionInsStrong(...i)),class:"iconfont icon-bold"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.italic?((0,t.openBlock)(),(0,t.createElementBlock)("li",R0,[(0,t.createElementVNode)("span",{onClick:o[1]||(o[1]=(...i)=>e.actionInsItalic&&e.actionInsItalic(...i)),class:"iconfont icon-italic"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.overline?((0,t.openBlock)(),(0,t.createElementBlock)("li",U0,[(0,t.createElementVNode)("span",{onClick:o[2]||(o[2]=(...i)=>e.actionInsOverline&&e.actionInsOverline(...i)),class:"iconfont icon-overline"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.overline?((0,t.openBlock)(),(0,t.createElementBlock)("li",W0,[(0,t.createElementVNode)("span",{onClick:o[3]||(o[3]=(...i)=>e.actionInsUnderline&&e.actionInsUnderline(...i)),class:"iconfont icon-under-line"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.h1?((0,t.openBlock)(),(0,t.createElementBlock)("li",Y0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[4]||(o[4]=i=>e.actionInsTitle(1))},"h1")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h2?((0,t.openBlock)(),(0,t.createElementBlock)("li",q0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[5]||(o[5]=i=>e.actionInsTitle(2))},"h2")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h3?((0,t.openBlock)(),(0,t.createElementBlock)("li",X0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[6]||(o[6]=i=>e.actionInsTitle(3))},"h3")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h4?((0,t.openBlock)(),(0,t.createElementBlock)("li",K0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[7]||(o[7]=i=>e.actionInsTitle(4))},"h4")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h5?((0,t.openBlock)(),(0,t.createElementBlock)("li",G0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[8]||(o[8]=i=>e.actionInsTitle(5))},"h5")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h6?((0,t.openBlock)(),(0,t.createElementBlock)("li",Z0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[9]||(o[9]=i=>e.actionInsTitle(6))},"h6")])):(0,t.createCommentVNode)("",!0),e.toolConfig.hr?((0,t.openBlock)(),(0,t.createElementBlock)("li",Q0,[(0,t.createElementVNode)("span",{onClick:o[10]||(o[10]=(...i)=>e.actionInsLine&&e.actionInsLine(...i)),class:"iconfont icon-horizontal"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.quote?((0,t.openBlock)(),(0,t.createElementBlock)("li",J0,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[11]||(o[11]=(...i)=>e.actionInsQuote&&e.actionInsQuote(...i)),class:"iconfont icon-quote"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.ul?((0,t.openBlock)(),(0,t.createElementBlock)("li",eg,[(0,t.createElementVNode)("span",{onClick:o[12]||(o[12]=(...i)=>e.actionInsUl&&e.actionInsUl(...i)),class:"iconfont icon-ul"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.ol?((0,t.openBlock)(),(0,t.createElementBlock)("li",tg,[(0,t.createElementVNode)("span",{onClick:o[13]||(o[13]=(...i)=>e.actionInsOl&&e.actionInsOl(...i)),class:"iconfont icon-ol"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.notChecked?((0,t.openBlock)(),(0,t.createElementBlock)("li",og,[(0,t.createElementVNode)("span",{onClick:o[14]||(o[14]=(...i)=>e.insertNotFinished&&e.insertNotFinished(...i)),class:"iconfont icon-checked-false"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.checked?((0,t.openBlock)(),(0,t.createElementBlock)("li",ag,[(0,t.createElementVNode)("span",{onClick:o[15]||(o[15]=(...i)=>e.insertFinished&&e.insertFinished(...i)),class:"iconfont icon-checked"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.link?((0,t.openBlock)(),(0,t.createElementBlock)("li",ng,[(0,t.createElementVNode)("span",{onClick:o[16]||(o[16]=(...i)=>e.actionInsLink&&e.actionInsLink(...i)),class:"iconfont icon-link"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.table?((0,t.openBlock)(),(0,t.createElementBlock)("li",lg,[(0,t.createElementVNode)("span",{onClick:o[17]||(o[17]=(...i)=>e.actionInsTable&&e.actionInsTable(...i)),class:"iconfont icon-table"})])):(0,t.createCommentVNode)("",!0),o[53]||(o[53]=(0,t.createElementVNode)("li",{class:"empty"},null,-1)),e.toolConfig.scrollSync?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:18,name:e.actionScrollSync?"同步滚动:开":"同步滚动:关"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[18]||(o[18]=i=>e.actionScrollSync=!e.actionScrollSync),class:"iconfont icon-on"},null,512),[[t.vShow,e.actionScrollSync]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[19]||(o[19]=i=>e.actionScrollSync=!e.actionScrollSync),class:"iconfont icon-off"},null,512),[[t.vShow,!e.actionScrollSync]])],8,rg)):(0,t.createCommentVNode)("",!0),e.toolConfig.split&&e.actionSplit?((0,t.openBlock)(),(0,t.createElementBlock)("li",ig,[(0,t.createElementVNode)("span",{onClick:o[20]||(o[20]=i=>e.actionSplit=!1),class:"iconfont icon-md"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.split&&!e.actionSplit?((0,t.openBlock)(),(0,t.createElementBlock)("li",sg,[(0,t.createElementVNode)("span",{onClick:o[21]||(o[21]=i=>e.actionSplit=!0),class:"iconfont icon-group"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.preview?((0,t.openBlock)(),(0,t.createElementBlock)("li",cg,[(0,t.createElementVNode)("span",{onClick:o[22]||(o[22]=i=>e.actionPreview=!0),class:"iconfont icon-preview"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.clear?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:22,name:"清空",onClick:o[23]||(o[23]=i=>n.localVal="")},[...o[51]||(o[51]=[(0,t.createElementVNode)("span",{class:"iconfont icon-clear"},null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.save?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:23,name:"保存",onClick:o[24]||(o[24]=(...i)=>e.actionSaveSet&&e.actionSaveSet(...i))},[...o[52]||(o[52]=[(0,t.createElementVNode)("span",{class:"iconfont icon-save"},null,-1)])])):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("ul",dg,[e.toolConfig.image?((0,t.openBlock)(),(0,t.createElementBlock)("li",ug,[(0,t.createElementVNode)("span",{onClick:o[25]||(o[25]=(...i)=>e.actionInsImage&&e.actionInsImage(...i)),class:"iconfont icon-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.uploadImage?((0,t.openBlock)(),(0,t.createElementBlock)("li",pg,[(0,t.createElementVNode)("span",{onClick:o[26]||(o[26]=(...i)=>e.actionChooseImage&&e.actionChooseImage(...i)),class:"iconfont icon-upload-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.custom_image?((0,t.openBlock)(),(0,t.createElementBlock)("li",mg,[(0,t.createElementVNode)("span",{onClick:o[27]||(o[27]=(...i)=>e.custom_actionInsImage&&e.custom_actionInsImage(...i)),class:"iconfont icon-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.custom_uploadImage?((0,t.openBlock)(),(0,t.createElementBlock)("li",hg,[(0,t.createElementVNode)("span",{onClick:o[28]||(o[28]=(...i)=>e.custom_chooseImage&&e.custom_chooseImage(...i)),class:"iconfont icon-upload-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.custom_uploadFile?((0,t.openBlock)(),(0,t.createElementBlock)("li",gg,[(0,t.createElementVNode)("span",{onClick:o[29]||(o[29]=(...i)=>e.custom_chooseFile&&e.custom_chooseFile(...i)),class:"iconfont icon-upload-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.theme?((0,t.openBlock)(),(0,t.createElementBlock)("li",fg,[(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("span",{class:"iconfont icon-theme",onClick:o[30]||(o[30]=i=>n.themeSlideDown=!n.themeSlideDown)}),(0,t.createElementVNode)("ul",{class:(0,t.normalizeClass)({active:n.themeSlideDown}),onMouseleave:o[35]||(o[35]=i=>n.themeSlideDown=!1)},[(0,t.createElementVNode)("li",{onClick:o[31]||(o[31]=i=>e.setThemes("light"))},"Light"),(0,t.createElementVNode)("li",{onClick:o[32]||(o[32]=i=>e.setThemes("dark"))},"VS Code"),(0,t.createElementVNode)("li",{onClick:o[33]||(o[33]=i=>e.setThemes("oneDark"))},"Atom OneDark"),(0,t.createElementVNode)("li",{onClick:o[34]||(o[34]=i=>e.setThemes("gitHub"))},"GitHub")],34)])])):(0,t.createCommentVNode)("",!0),(0,t.withDirectives)((0,t.createElementVNode)("li",vg,[(0,t.createElementVNode)("span",{class:"iconfont icon-daoru",onClick:o[36]||(o[36]=(...i)=>e.actionImportFile&&e.actionImportFile(...i))}),(0,t.createElementVNode)("input",{type:"file",onChange:o[37]||(o[37]=i=>e.actionImportFile(i)),accept:"text/markdown"},null,32)],512),[[t.vShow,e.toolConfig.importmd]]),(0,t.withDirectives)((0,t.createElementVNode)("li",Cg,[(0,t.createElementVNode)("span",{class:"iconfont icon-download",onClick:o[38]||(o[38]=(...i)=>e.actionExportFile&&e.actionExportFile(...i))})],512),[[t.vShow,e.toolConfig.exportmd]]),o[54]||(o[54]=(0,t.createElementVNode)("li",{class:"empty"},null,-1)),e.toolConfig.fullscreen&&!n.fullscreen?((0,t.openBlock)(),(0,t.createElementBlock)("li",kg,[(0,t.createElementVNode)("span",{onClick:o[39]||(o[39]=i=>n.fullscreen=!n.fullscreen),class:"iconfont icon-fullscreen"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.fullscreen&&n.fullscreen?((0,t.openBlock)(),(0,t.createElementBlock)("li",bg,[(0,t.createElementVNode)("span",{onClick:o[40]||(o[40]=i=>n.fullscreen=!n.fullscreen),class:"iconfont icon-quite"})])):(0,t.createCommentVNode)("",!0)])])),(0,t.withDirectives)((0,t.createElementVNode)("div",{title:"关闭预览按钮",class:"close-preview",onClick:o[41]||(o[41]=i=>e.actionPreview=!1)},[...o[55]||(o[55]=[(0,t.createElementVNode)("span",{class:"iconfont icon-close"},null,-1)])],512),[[t.vShow,e.actionPreview]]),(0,t.createElementVNode)("div",{title:"编辑器",class:"cv-editor-markdown-main",style:(0,t.normalizeStyle)({background:e.actionPreview?"#fff":""})},[(0,t.withDirectives)((0,t.createElementVNode)("div",{class:"markdown-editor",ref:"markdownEditor",onScroll:o[47]||(o[47]=(...i)=>l.markdownScroll&&l.markdownScroll(...i)),onMouseenter:o[48]||(o[48]=i=>l.mousescrollSide("markdown"))},[(0,t.createElementVNode)("ul",{class:"index",ref:"index",style:(0,t.normalizeStyle)({height:n.textareaHeight?`${n.textareaHeight}px`:"100%"})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.indexLenth,i=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:i},(0,t.toDisplayString)(i),1))),128))],4),(0,t.withDirectives)((0,t.createElementVNode)("textarea",{"onUpdate:modelValue":o[42]||(o[42]=i=>n.localVal=i),ref:"textarea",onKeydown:o[43]||(o[43]=(0,t.withKeys)((...i)=>l.tab&&l.tab(...i),["tab"])),onKeyup:[o[44]||(o[44]=(0,t.withKeys)((...i)=>l.enter&&l.enter(...i),["enter"])),o[45]||(o[45]=(0,t.withKeys)((...i)=>l.onDelete&&l.onDelete(...i),["delete"]))],onMouseenter:o[46]||(o[46]=i=>l.mousescrollSide("left")),style:(0,t.normalizeStyle)({height:n.textareaHeight?`${n.textareaHeight}px`:"100%"})},null,36),[[t.vModelText,n.localVal]])],544),[[t.vShow,!e.preview]]),(0,t.withDirectives)((0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(`markdown-preview ${"markdown-theme-"+e.codemrrConfig.theme}`),ref:"preview",onScroll:o[49]||(o[49]=(...i)=>l.previewScroll&&l.previewScroll(...i)),onMouseenter:o[50]||(o[50]=i=>l.mousescrollSide("right"))},[(0,t.createElementVNode)("div",{innerHTML:n.html,ref:"previewInner"},null,8,yg)],34),[[t.vShow,e.preview?e.preview:e.split]])],4)],6)}var jt=f(z0,[["render",wg],["__scopeId","data-v-36211c6f"]]),_g={name:"cvMarkdownNostyle",props:{modelValue:{type:String,default:""},initValue:{type:String,default:""}},data(){return{localHtml:"",localVal:""}},watch:{initValue(){this.initNewCreate()}},created(){this.localVal=this.initValue||""},async mounted(){this.initNewCreate()},methods:{async initNewCreate(){const{Marked:e,Renderer:o}=await import("https://10ui.cn/marked/@12.0.1/marked.esm.js");let a=new e().parser(this.localVal,{sanitize:!1});a=a.replace(/href="/gi,'target="_blank" href="'),this.localHtml=a}}},Vg=["innerHTML"];function Sg(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"markdown-preview-nostyle",innerHTML:n.localHtml},null,8,Vg)}var Rt=f(_g,[["render",Sg]]);At.install=function(e){e.component(At.name,At)};Ht.install=function(e){e.component(Ht.name,Ht)};jt.install=function(e){e.component(jt.name,jt)};Rt.install=function(e){e.component(Rt.name,Rt)};Ot.install=function(e){e.component(Ot.name,Ot)};Mt.install=function(e){e.component(Mt.name,Mt)};zt.install=function(e){e.component(zt.name,zt)};function to(e){return{text:"按钮",clickFn:null,type:"default",isHide:!1,order:2,...e}}var Bg=class{constructor(e,o){this.WinVue=e,this.vmCompObj=null,this.vmComponent=null,this.vmApp=null,this.dialogObj=null,this.boxShow=(0,t.ref)(!1),this.boxProps=(0,t.ref)({}),this.boxOptions=q({closeIsConfirm:!1,closeIsDestroy:!0,width:"40%",title:"默认标题"},o.diyOpts),this.boxProps.value=jo(this.boxOptions,["closeIsConfirm","closeIsDestroy"]),this.bodyComponent=o.component||"",this.bodyOptions=q({},o.props),this.bodyFunc=q({},o.onFunc);for(const a in this.bodyFunc)if(this.bodyFunc.hasOwnProperty(a)&&!a.startsWith("on")){const r="on"+a.charAt(0).toUpperCase()+a.slice(1);this.bodyFunc[r]=this.bodyFunc[a],delete this.bodyFunc[a]}this.defaultFunc={onOK:()=>{this.close()},onCancel:()=>{this.close()}},this._initVm()}_initVm(){var e=this;const o={data(){return{}},methods:{clearVm(){e.vmApp&&e.close()}},mounted(){},unmounted(){},render(){const n=(0,t.createVNode)(e.bodyComponent,{...e.bodyOptions,ref:"inner",onSetTitle(d){e.boxProps.value.title=d},onClose:()=>e.close(),...e.bodyFunc},{default:()=>""});let l={ok:to({text:"确定",type:"primary",order:0}),cancel:to({text:"取消",order:1})};Object.entries(l).forEach(([d,u])=>{if(["ok","cancel"].includes(d)){const m=d==="ok"?e.defaultFunc.onOK:e.defaultFunc.onCancel;u.clickFn=u.clickFn||m}else l[d]=to(u)}),(0,t.createVNode)("div",{},Object.values(l).filter(d=>!d.isHide).map(d=>(0,t.createVNode)(k.ElButton,{type:d.type,onClick:d.clickFn},d.text)));const i=function(d){e.close()},c=typeof e.boxOptions.beforeClose=="function"?e.boxOptions.beforeClose:i;return(0,t.createVNode)(k.ElDialog,{...e.boxProps.value,modelValue:e.boxShow.value,beforeClose:d=>{e.boxOptions.closeIsConfirm?k.ElMessageBox.confirm("确认关闭?","提示").then(u=>{c(i)}).catch(u=>{i()}):c(i)},onClosed2(d){e.close()},onClosed:e.close},{default:()=>n})}};this.vmComponent=o;const a=document.createElement("div");document.body.appendChild(a),this.vmTargetElement=a;const r=(0,t.createVNode)(o);r.appContext=this.WinVue._context,(0,t.render)(r,this.vmTargetElement),this.vmApp=r}close(){this.boxShow&&(this.boxShow.value=!1),this.vmTargetElement&&((0,t.render)(null,this.vmTargetElement),document.body.removeChild(this.vmTargetElement),this.vmApp=null)}show(){this.boxShow.value=!0}getInner(){return this.vmCompObj.$refs.inner}};function oo(e){return{text:"按钮",clickFn:null,type:"default",isHide:!1,order:2,...e}}var Ng=class{constructor(e,o){this.WinVue=e,this.vmCompObj=null,this.vmComponent=null,this.vmApp=null,this.dialogObj=null,this.boxShow=(0,t.ref)(!1),this.boxProps=(0,t.ref)({}),this.boxOptions=q({closeIsConfirm:!0,closeIsDestroy:!0,width:"40%",title:"默认标题"},o.diyOpts),this.boxProps.value=jo(this.boxOptions,["closeIsConfirm","closeIsDestroy"]),this.bodyComponent=o.component||"",this.bodyOptions=q({},o.props),this.bodyFunc=q({},o.onFunc);for(const a in this.bodyFunc)if(this.bodyFunc.hasOwnProperty(a)&&!a.startsWith("on")){const r="on"+a.charAt(0).toUpperCase()+a.slice(1);this.bodyFunc[r]=this.bodyFunc[a],delete this.bodyFunc[a]}this.defaultFunc={onOK:()=>{this.close()},onCancel:()=>{this.close()}},this._initVm()}_initVm(){var e=this;const o={data(){return{}},methods:{clearVm(){e.vmApp&&e.close()}},mounted(){},unmounted(){document.body.removeChild(e.vmTargetElement)},render(){const n=(0,t.createVNode)(e.bodyComponent,{...e.bodyOptions,ref:"inner",onSetTitle(d){e.boxProps.value.title=d},onClose:this.clearVm,...e.bodyFunc},{default:()=>""});let l={ok:oo({text:"确定",type:"primary",order:0}),cancel:oo({text:"取消",order:1})};Object.entries(l).forEach(([d,u])=>{if(["ok","cancel"].includes(d)){const m=d==="ok"?e.defaultFunc.onOK:e.defaultFunc.onCancel;u.clickFn=u.clickFn||m}else l[d]=oo(u)}),(0,t.createVNode)("div",{},Object.values(l).filter(d=>!d.isHide).map(d=>(0,t.createVNode)(k.ElButton,{type:d.type,onClick:d.clickFn},d.text)));const i=function(d){e.close()},c=typeof e.boxOptions.beforeClose=="function"?e.boxOptions.beforeClose:i;return(0,t.createVNode)(k.ElDrawer,{...e.boxProps.value,modelValue:e.boxShow.value,beforeClose:d=>{e.boxOptions.closeIsConfirm?k.ElMessageBox.confirm("确认关闭?","提示").then(u=>{c(i)}).catch(u=>{i()}):c(i)},onClosed2(d){this.clearVm()},onClosed:this.clearVm},{default:()=>n})}};this.vmComponent=o;const a=document.createElement("div");document.body.appendChild(a),this.vmTargetElement=a;const r=(0,t.createVNode)(o);r.appContext=this.WinVue._context,(0,t.render)(r,this.vmTargetElement),this.vmApp=r}close(){this.boxShow.value=!1,(0,t.render)(null,this.vmTargetElement)}show(){this.boxShow.value=!0}getInner(){return this.vmCompObj.$refs.inner}};function ra(e,o=null,a={},r={},n={}){const l=new Bg(e,{component:o,diyOpts:a,props:r,onFunc:n,onOK(){l.getInner(),l.close()},onCancel(){l.close()}});return l}function ia(e,o="",a={},r={},n=null){const l=new Ng(e,{component:o,diyOpts:{...a},props:r,onFunc:n,onOK(){l.getInner(),l.close()},onCancel(){l.close()}});return l}var sa=[ie,se,ce,de,ue,pe,me,he,ge,fe,hn,ve,Ce,ke,be,ye,we,Se,Be,_e,Ve,Ne,Ee,$e,Te,xe,De,Pe,Ie,Le,Fe,Ae,He,je,Re,Ue,We,Ye,qe,Xe,Ke,Ge,Ze,Qe,et,tt,ot,at,nt,ct,dt,Je,it,st,pt,ut,mt,wt,_t,Vt,St,Bt,Nt,ht,gt,ft,vt,Ct,kt,bt,yt,lt,rt,Me,ze,Et,$t,xt,Dt,Tt,It,Lt,Ft,Ot,Mt,zt,At,Ht,jt,Rt],po=function(e,o={}){sa.forEach(a=>{e.component(a.name,a)}),e.config.globalProperties.$cvUiParams={...o},e.config.globalProperties.$cvDialogRender=function(){return ra(e,...arguments)},e.config.globalProperties.$cvCopy=xl,e.config.globalProperties.$cvDrawerRender=function(){return ia(e,...arguments)},e.config.globalProperties.CDN_URL_UI="https://10ui.cn/"};typeof window<"u"&&window._vueApp_&&po(window._vueApp_);var Eg={version:"0.3.x",install:po},$g=Eg;exports.components=sa;exports.cvDialogRender=ra;exports.cvDrawerRender=ia;exports.default=$g;exports.install=po;
52
+ `);e[e.length-1]===""&&(this.lastInsert="")},mousescrollSide(e){this.scrollSide=e},handlePaste(e){const{clipboardData:o={}}=e,{types:a=[],items:r}=o;let n=null;for(let l=0;l<a.length;l++)if(a[l]==="Files"){n=r[l];break}if(n){const l=n.getAsFile();/image/gi.test(l.type)&&(this.$emit("on-upload-image",l),this.$emit("on-paste-image",l),e.preventDefault())}},markdownScroll(){const{scrolling:e}=this;if(e&&this.scroll==="left"){const o=this.$refs.markdownEditor,a=this.$refs.preview,r=a.offsetHeight,n=o.scrollHeight,l=o.scrollTop,s=a.scrollHeight;a.scrollTop=parseInt(l/(n-r)*(s-r),0)}},previewScroll(){const{scrolling:e}=this;if(e&&this.scroll==="right"){const o=this.$refs.markdownEditor,a=this.$refs.preview,r=a.offsetHeight,n=o.scrollHeight,l=a.scrollHeight,s=a.scrollTop;o.scrollTop=parseInt(s/(l-r)*(n-r),0)}},mousescrollSide(e){this.scroll=e}}},rf={key:0,title:"头部工具栏"},sf={class:"cv-editor-toolbars"},cf={key:0,name:"粗体"},df={key:1,name:"斜体"},uf={key:2,name:"删除线"},mf={key:3,name:"下划线"},pf={key:4,name:"标题1"},hf={key:5,name:"标题2"},gf={key:6,name:"标题3"},ff={key:7,name:"标题4"},vf={key:8,name:"标题5"},yf={key:9,name:"标题6"},Cf={key:10,name:"分割线"},bf={key:11,name:"引用"},kf={key:12,name:"无序列表"},wf={key:13,name:"有序列表"},_f={key:14,name:"未完成列表"},Vf={key:15,name:"已完成列表"},Bf={key:16,name:"链接"},Sf={key:17,name:"表格"},Nf=["name"],Ef={key:19,name:"全屏编辑"},xf={key:20,name:"分屏显示"},$f={key:21,name:"预览"},Df={class:"cv-editor-toolbars"},Tf={key:0,name:"图片"},Lf={key:1,name:"本地图片"},If={key:2,name:"图片空间"},Ff={key:3,name:"上传图片"},Pf={key:4,name:"上传文件"},Af={key:5,class:"shift-theme",name:"代码块主题"},Mf={name:"导入文件",class:"import-file"},zf={name:"保存到本地"},Of={key:6,name:"全屏"},jf={key:7,name:"退出全屏"},Rf=["innerHTML"];function Hf(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:(0,t.normalizeClass)(`markdown ${n.fullscreen?"fullscreen":""} ${a.bordered?"border":""}`),ref:"markdown",style:(0,t.normalizeStyle)({width:a.width+(typeof a.width=="string"?"":"px"),height:a.height+(typeof a.height=="string"?"":"px")})},[e.actionPreview?(0,t.createCommentVNode)("",!0):((0,t.openBlock)(),(0,t.createElementBlock)("div",rf,[(0,t.createElementVNode)("ul",sf,[(0,t.createElementVNode)("li",null,[(0,t.renderSlot)(e.$slots,"title",{},void 0,!0)]),e.toolConfig.strong?((0,t.openBlock)(),(0,t.createElementBlock)("li",cf,[(0,t.createElementVNode)("span",{onClick:o[0]||(o[0]=(...s)=>e.actionInsStrong&&e.actionInsStrong(...s)),class:"iconfont icon-bold"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.italic?((0,t.openBlock)(),(0,t.createElementBlock)("li",df,[(0,t.createElementVNode)("span",{onClick:o[1]||(o[1]=(...s)=>e.actionInsItalic&&e.actionInsItalic(...s)),class:"iconfont icon-italic"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.overline?((0,t.openBlock)(),(0,t.createElementBlock)("li",uf,[(0,t.createElementVNode)("span",{onClick:o[2]||(o[2]=(...s)=>e.actionInsOverline&&e.actionInsOverline(...s)),class:"iconfont icon-overline"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.overline?((0,t.openBlock)(),(0,t.createElementBlock)("li",mf,[(0,t.createElementVNode)("span",{onClick:o[3]||(o[3]=(...s)=>e.actionInsUnderline&&e.actionInsUnderline(...s)),class:"iconfont icon-under-line"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.h1?((0,t.openBlock)(),(0,t.createElementBlock)("li",pf,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[4]||(o[4]=s=>e.actionInsTitle(1))},"h1")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h2?((0,t.openBlock)(),(0,t.createElementBlock)("li",hf,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[5]||(o[5]=s=>e.actionInsTitle(2))},"h2")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h3?((0,t.openBlock)(),(0,t.createElementBlock)("li",gf,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[6]||(o[6]=s=>e.actionInsTitle(3))},"h3")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h4?((0,t.openBlock)(),(0,t.createElementBlock)("li",ff,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[7]||(o[7]=s=>e.actionInsTitle(4))},"h4")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h5?((0,t.openBlock)(),(0,t.createElementBlock)("li",vf,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[8]||(o[8]=s=>e.actionInsTitle(5))},"h5")])):(0,t.createCommentVNode)("",!0),e.toolConfig.h6?((0,t.openBlock)(),(0,t.createElementBlock)("li",yf,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[9]||(o[9]=s=>e.actionInsTitle(6))},"h6")])):(0,t.createCommentVNode)("",!0),e.toolConfig.hr?((0,t.openBlock)(),(0,t.createElementBlock)("li",Cf,[(0,t.createElementVNode)("span",{onClick:o[10]||(o[10]=(...s)=>e.actionInsLine&&e.actionInsLine(...s)),class:"iconfont icon-horizontal"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.quote?((0,t.openBlock)(),(0,t.createElementBlock)("li",bf,[(0,t.createElementVNode)("span",{style:{"font-size":"16px"},onClick:o[11]||(o[11]=(...s)=>e.actionInsQuote&&e.actionInsQuote(...s)),class:"iconfont icon-quote"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.ul?((0,t.openBlock)(),(0,t.createElementBlock)("li",kf,[(0,t.createElementVNode)("span",{onClick:o[12]||(o[12]=(...s)=>e.actionInsUl&&e.actionInsUl(...s)),class:"iconfont icon-ul"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.ol?((0,t.openBlock)(),(0,t.createElementBlock)("li",wf,[(0,t.createElementVNode)("span",{onClick:o[13]||(o[13]=(...s)=>e.actionInsOl&&e.actionInsOl(...s)),class:"iconfont icon-ol"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.notChecked?((0,t.openBlock)(),(0,t.createElementBlock)("li",_f,[(0,t.createElementVNode)("span",{onClick:o[14]||(o[14]=(...s)=>e.insertNotFinished&&e.insertNotFinished(...s)),class:"iconfont icon-checked-false"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.checked?((0,t.openBlock)(),(0,t.createElementBlock)("li",Vf,[(0,t.createElementVNode)("span",{onClick:o[15]||(o[15]=(...s)=>e.insertFinished&&e.insertFinished(...s)),class:"iconfont icon-checked"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.link?((0,t.openBlock)(),(0,t.createElementBlock)("li",Bf,[(0,t.createElementVNode)("span",{onClick:o[16]||(o[16]=(...s)=>e.actionInsLink&&e.actionInsLink(...s)),class:"iconfont icon-link"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.table?((0,t.openBlock)(),(0,t.createElementBlock)("li",Sf,[(0,t.createElementVNode)("span",{onClick:o[17]||(o[17]=(...s)=>e.actionInsTable&&e.actionInsTable(...s)),class:"iconfont icon-table"})])):(0,t.createCommentVNode)("",!0),o[53]||(o[53]=(0,t.createElementVNode)("li",{class:"empty"},null,-1)),e.toolConfig.scrollSync?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:18,name:e.actionScrollSync?"同步滚动:开":"同步滚动:关"},[(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[18]||(o[18]=s=>e.actionScrollSync=!e.actionScrollSync),class:"iconfont icon-on"},null,512),[[t.vShow,e.actionScrollSync]]),(0,t.withDirectives)((0,t.createElementVNode)("span",{onClick:o[19]||(o[19]=s=>e.actionScrollSync=!e.actionScrollSync),class:"iconfont icon-off"},null,512),[[t.vShow,!e.actionScrollSync]])],8,Nf)):(0,t.createCommentVNode)("",!0),e.toolConfig.split&&e.actionSplit?((0,t.openBlock)(),(0,t.createElementBlock)("li",Ef,[(0,t.createElementVNode)("span",{onClick:o[20]||(o[20]=s=>e.actionSplit=!1),class:"iconfont icon-md"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.split&&!e.actionSplit?((0,t.openBlock)(),(0,t.createElementBlock)("li",xf,[(0,t.createElementVNode)("span",{onClick:o[21]||(o[21]=s=>e.actionSplit=!0),class:"iconfont icon-group"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.preview?((0,t.openBlock)(),(0,t.createElementBlock)("li",$f,[(0,t.createElementVNode)("span",{onClick:o[22]||(o[22]=s=>e.actionPreview=!0),class:"iconfont icon-preview"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.clear?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:22,name:"清空",onClick:o[23]||(o[23]=s=>n.localVal="")},[...o[51]||(o[51]=[(0,t.createElementVNode)("span",{class:"iconfont icon-clear"},null,-1)])])):(0,t.createCommentVNode)("",!0),e.toolConfig.save?((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:23,name:"保存",onClick:o[24]||(o[24]=(...s)=>e.actionSaveSet&&e.actionSaveSet(...s))},[...o[52]||(o[52]=[(0,t.createElementVNode)("span",{class:"iconfont icon-save"},null,-1)])])):(0,t.createCommentVNode)("",!0)]),(0,t.createElementVNode)("ul",Df,[e.toolConfig.image?((0,t.openBlock)(),(0,t.createElementBlock)("li",Tf,[(0,t.createElementVNode)("span",{onClick:o[25]||(o[25]=(...s)=>e.actionInsImage&&e.actionInsImage(...s)),class:"iconfont icon-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.uploadImage?((0,t.openBlock)(),(0,t.createElementBlock)("li",Lf,[(0,t.createElementVNode)("span",{onClick:o[26]||(o[26]=(...s)=>e.actionChooseImage&&e.actionChooseImage(...s)),class:"iconfont icon-upload-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.custom_image?((0,t.openBlock)(),(0,t.createElementBlock)("li",If,[(0,t.createElementVNode)("span",{onClick:o[27]||(o[27]=(...s)=>e.custom_actionInsImage&&e.custom_actionInsImage(...s)),class:"iconfont icon-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.custom_uploadImage?((0,t.openBlock)(),(0,t.createElementBlock)("li",Ff,[(0,t.createElementVNode)("span",{onClick:o[28]||(o[28]=(...s)=>e.custom_chooseImage&&e.custom_chooseImage(...s)),class:"iconfont icon-upload-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.custom_uploadFile?((0,t.openBlock)(),(0,t.createElementBlock)("li",Pf,[(0,t.createElementVNode)("span",{onClick:o[29]||(o[29]=(...s)=>e.custom_chooseFile&&e.custom_chooseFile(...s)),class:"iconfont icon-upload-img"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.theme?((0,t.openBlock)(),(0,t.createElementBlock)("li",Af,[(0,t.createElementVNode)("div",null,[(0,t.createElementVNode)("span",{class:"iconfont icon-theme",onClick:o[30]||(o[30]=s=>n.themeSlideDown=!n.themeSlideDown)}),(0,t.createElementVNode)("ul",{class:(0,t.normalizeClass)({active:n.themeSlideDown}),onMouseleave:o[35]||(o[35]=s=>n.themeSlideDown=!1)},[(0,t.createElementVNode)("li",{onClick:o[31]||(o[31]=s=>e.setThemes("light"))},"Light"),(0,t.createElementVNode)("li",{onClick:o[32]||(o[32]=s=>e.setThemes("dark"))},"VS Code"),(0,t.createElementVNode)("li",{onClick:o[33]||(o[33]=s=>e.setThemes("oneDark"))},"Atom OneDark"),(0,t.createElementVNode)("li",{onClick:o[34]||(o[34]=s=>e.setThemes("gitHub"))},"GitHub")],34)])])):(0,t.createCommentVNode)("",!0),(0,t.withDirectives)((0,t.createElementVNode)("li",Mf,[(0,t.createElementVNode)("span",{class:"iconfont icon-daoru",onClick:o[36]||(o[36]=(...s)=>e.actionImportFile&&e.actionImportFile(...s))}),(0,t.createElementVNode)("input",{type:"file",onChange:o[37]||(o[37]=s=>e.actionImportFile(s)),accept:"text/markdown"},null,32)],512),[[t.vShow,e.toolConfig.importmd]]),(0,t.withDirectives)((0,t.createElementVNode)("li",zf,[(0,t.createElementVNode)("span",{class:"iconfont icon-download",onClick:o[38]||(o[38]=(...s)=>e.actionExportFile&&e.actionExportFile(...s))})],512),[[t.vShow,e.toolConfig.exportmd]]),o[54]||(o[54]=(0,t.createElementVNode)("li",{class:"empty"},null,-1)),e.toolConfig.fullscreen&&!n.fullscreen?((0,t.openBlock)(),(0,t.createElementBlock)("li",Of,[(0,t.createElementVNode)("span",{onClick:o[39]||(o[39]=s=>n.fullscreen=!n.fullscreen),class:"iconfont icon-fullscreen"})])):(0,t.createCommentVNode)("",!0),e.toolConfig.fullscreen&&n.fullscreen?((0,t.openBlock)(),(0,t.createElementBlock)("li",jf,[(0,t.createElementVNode)("span",{onClick:o[40]||(o[40]=s=>n.fullscreen=!n.fullscreen),class:"iconfont icon-quite"})])):(0,t.createCommentVNode)("",!0)])])),(0,t.withDirectives)((0,t.createElementVNode)("div",{title:"关闭预览按钮",class:"close-preview",onClick:o[41]||(o[41]=s=>e.actionPreview=!1)},[...o[55]||(o[55]=[(0,t.createElementVNode)("span",{class:"iconfont icon-close"},null,-1)])],512),[[t.vShow,e.actionPreview]]),(0,t.createElementVNode)("div",{title:"编辑器",class:"cv-editor-markdown-main",style:(0,t.normalizeStyle)({background:e.actionPreview?"#fff":""})},[(0,t.withDirectives)((0,t.createElementVNode)("div",{class:"markdown-editor",ref:"markdownEditor",onScroll:o[47]||(o[47]=(...s)=>l.markdownScroll&&l.markdownScroll(...s)),onMouseenter:o[48]||(o[48]=s=>l.mousescrollSide("markdown"))},[(0,t.createElementVNode)("ul",{class:"index",ref:"index",style:(0,t.normalizeStyle)({height:n.textareaHeight?`${n.textareaHeight}px`:"100%"})},[((0,t.openBlock)(!0),(0,t.createElementBlock)(t.Fragment,null,(0,t.renderList)(n.indexLenth,s=>((0,t.openBlock)(),(0,t.createElementBlock)("li",{key:s},(0,t.toDisplayString)(s),1))),128))],4),(0,t.withDirectives)((0,t.createElementVNode)("textarea",{"onUpdate:modelValue":o[42]||(o[42]=s=>n.localVal=s),ref:"textarea",onKeydown:o[43]||(o[43]=(0,t.withKeys)((...s)=>l.tab&&l.tab(...s),["tab"])),onKeyup:[o[44]||(o[44]=(0,t.withKeys)((...s)=>l.enter&&l.enter(...s),["enter"])),o[45]||(o[45]=(0,t.withKeys)((...s)=>l.onDelete&&l.onDelete(...s),["delete"]))],onMouseenter:o[46]||(o[46]=s=>l.mousescrollSide("left")),style:(0,t.normalizeStyle)({height:n.textareaHeight?`${n.textareaHeight}px`:"100%"})},null,36),[[t.vModelText,n.localVal]])],544),[[t.vShow,!e.preview]]),(0,t.withDirectives)((0,t.createElementVNode)("div",{class:(0,t.normalizeClass)(`markdown-preview ${"markdown-theme-"+e.codemrrConfig.theme}`),ref:"preview",onScroll:o[49]||(o[49]=(...s)=>l.previewScroll&&l.previewScroll(...s)),onMouseenter:o[50]||(o[50]=s=>l.mousescrollSide("right"))},[(0,t.createElementVNode)("div",{innerHTML:n.html,ref:"previewInner"},null,8,Rf)],34),[[t.vShow,e.preview?e.preview:e.split]])],4)],6)}var ho=y(lf,[["render",Hf],["__scopeId","data-v-36211c6f"]]),Uf={name:"cvMarkdownNostyle",props:{modelValue:{type:String,default:""},initValue:{type:String,default:""}},data(){return{localHtml:"",localVal:""}},watch:{initValue(){this.initNewCreate()}},created(){this.localVal=this.initValue||""},async mounted(){this.initNewCreate()},methods:{async initNewCreate(){const{Marked:e,Renderer:o}=await import("https://10ui.cn/marked/@12.0.1/marked.esm.js");let a=new e().parser(this.localVal,{sanitize:!1});a=a.replace(/href="/gi,'target="_blank" href="'),this.localHtml=a}}},Wf=["innerHTML"];function qf(e,o,a,r,n,l){return(0,t.openBlock)(),(0,t.createElementBlock)("div",{class:"markdown-preview-nostyle",innerHTML:n.localHtml},null,8,Wf)}var go=y(Uf,[["render",qf]]);mo.install=function(e){e.component(mo.name,mo)};po.install=function(e){e.component(po.name,po)};ho.install=function(e){e.component(ho.name,ho)};go.install=function(e){e.component(go.name,go)};so.install=function(e){e.component(so.name,so)};co.install=function(e){e.component(co.name,co)};uo.install=function(e){e.component(uo.name,uo)};function jo(e){return{text:"按钮",clickFn:null,type:"default",isHide:!1,order:2,...e}}var Kf=class{constructor(e,o){this.WinVue=e,this.vmCompObj=null,this.vmComponent=null,this.vmApp=null,this.dialogObj=null,this.boxShow=(0,t.ref)(!1),this.boxProps=(0,t.ref)({}),this.boxOptions=oe({closeIsConfirm:!1,closeIsDestroy:!0,width:"40%",title:"默认标题"},o.diyOpts),this.boxProps.value=Ra(this.boxOptions,["closeIsConfirm","closeIsDestroy"]),this.bodyComponent=o.component||"",this.bodyOptions=oe({},o.props),this.bodyFunc=oe({},o.onFunc);for(const a in this.bodyFunc)if(this.bodyFunc.hasOwnProperty(a)&&!a.startsWith("on")){const r="on"+a.charAt(0).toUpperCase()+a.slice(1);this.bodyFunc[r]=this.bodyFunc[a],delete this.bodyFunc[a]}this.defaultFunc={onOK:()=>{this.close()},onCancel:()=>{this.close()}},this._initVm()}_initVm(){var e=this;const o={data(){return{}},methods:{clearVm(){e.vmApp&&e.close()}},mounted(){},unmounted(){},render(){const n=(0,t.createVNode)(e.bodyComponent,{...e.bodyOptions,ref:"inner",onSetTitle(d){e.boxProps.value.title=d},onClose:()=>e.close(),...e.bodyFunc},{default:()=>""});let l={ok:jo({text:"确定",type:"primary",order:0}),cancel:jo({text:"取消",order:1})};Object.entries(l).forEach(([d,u])=>{if(["ok","cancel"].includes(d)){const h=d==="ok"?e.defaultFunc.onOK:e.defaultFunc.onCancel;u.clickFn=u.clickFn||h}else l[d]=jo(u)}),(0,t.createVNode)("div",{},Object.values(l).filter(d=>!d.isHide).map(d=>(0,t.createVNode)(b.ElButton,{type:d.type,onClick:d.clickFn},d.text)));const s=function(d){e.close()},c=typeof e.boxOptions.beforeClose=="function"?e.boxOptions.beforeClose:s;return(0,t.createVNode)(b.ElDialog,{...e.boxProps.value,modelValue:e.boxShow.value,beforeClose:d=>{e.boxOptions.closeIsConfirm?b.ElMessageBox.confirm("确认关闭?","提示").then(u=>{c(s)}).catch(u=>{s()}):c(s)},onClosed2(d){e.close()},onClosed:e.close},{default:()=>n})}};this.vmComponent=o;const a=document.createElement("div");document.body.appendChild(a),this.vmTargetElement=a;const r=(0,t.createVNode)(o);r.appContext=this.WinVue._context,(0,t.render)(r,this.vmTargetElement),this.vmApp=r}close(){this.boxShow&&(this.boxShow.value=!1),this.vmTargetElement&&((0,t.render)(null,this.vmTargetElement),document.body.removeChild(this.vmTargetElement),this.vmApp=null)}show(){this.boxShow.value=!0}getInner(){return this.vmCompObj.$refs.inner}};function Ro(e){return{text:"按钮",clickFn:null,type:"default",isHide:!1,order:2,...e}}var Gf=class{constructor(e,o){this.WinVue=e,this.vmCompObj=null,this.vmComponent=null,this.vmApp=null,this.dialogObj=null,this.boxShow=(0,t.ref)(!1),this.boxProps=(0,t.ref)({}),this.boxOptions=oe({closeIsConfirm:!0,closeIsDestroy:!0,width:"40%",title:"默认标题"},o.diyOpts),this.boxProps.value=Ra(this.boxOptions,["closeIsConfirm","closeIsDestroy"]),this.bodyComponent=o.component||"",this.bodyOptions=oe({},o.props),this.bodyFunc=oe({},o.onFunc);for(const a in this.bodyFunc)if(this.bodyFunc.hasOwnProperty(a)&&!a.startsWith("on")){const r="on"+a.charAt(0).toUpperCase()+a.slice(1);this.bodyFunc[r]=this.bodyFunc[a],delete this.bodyFunc[a]}this.defaultFunc={onOK:()=>{this.close()},onCancel:()=>{this.close()}},this._initVm()}_initVm(){var e=this;const o={data(){return{}},methods:{clearVm(){e.vmApp&&e.close()}},mounted(){},unmounted(){document.body.removeChild(e.vmTargetElement)},render(){const n=(0,t.createVNode)(e.bodyComponent,{...e.bodyOptions,ref:"inner",onSetTitle(d){e.boxProps.value.title=d},onClose:this.clearVm,...e.bodyFunc},{default:()=>""});let l={ok:Ro({text:"确定",type:"primary",order:0}),cancel:Ro({text:"取消",order:1})};Object.entries(l).forEach(([d,u])=>{if(["ok","cancel"].includes(d)){const h=d==="ok"?e.defaultFunc.onOK:e.defaultFunc.onCancel;u.clickFn=u.clickFn||h}else l[d]=Ro(u)}),(0,t.createVNode)("div",{},Object.values(l).filter(d=>!d.isHide).map(d=>(0,t.createVNode)(b.ElButton,{type:d.type,onClick:d.clickFn},d.text)));const s=function(d){e.close()},c=typeof e.boxOptions.beforeClose=="function"?e.boxOptions.beforeClose:s;return(0,t.createVNode)(b.ElDrawer,{...e.boxProps.value,modelValue:e.boxShow.value,beforeClose:d=>{e.boxOptions.closeIsConfirm?b.ElMessageBox.confirm("确认关闭?","提示").then(u=>{c(s)}).catch(u=>{s()}):c(s)},onClosed2(d){this.clearVm()},onClosed:this.clearVm},{default:()=>n})}};this.vmComponent=o;const a=document.createElement("div");document.body.appendChild(a),this.vmTargetElement=a;const r=(0,t.createVNode)(o);r.appContext=this.WinVue._context,(0,t.render)(r,this.vmTargetElement),this.vmApp=r}close(){this.boxShow.value=!1,(0,t.render)(null,this.vmTargetElement)}show(){this.boxShow.value=!0}getInner(){return this.vmCompObj.$refs.inner}};function sn(e,o=null,a={},r={},n={}){const l=new Kf(e,{component:o,diyOpts:a,props:r,onFunc:n,onOK(){l.getInner(),l.close()},onCancel(){l.close()}});return l}function cn(e,o="",a={},r={},n=null){const l=new Gf(e,{component:o,diyOpts:{...a},props:r,onFunc:n,onOK(){l.getInner(),l.close()},onCancel(){l.close()}});return l}var dn=[Te,Le,Ie,Fe,Pe,Ae,Me,ze,Oe,je,bl,Re,He,Ue,We,qe,Ke,Ze,Qe,Ge,Ye,Xe,Je,et,at,tt,ot,it,nt,lt,rt,ut,mt,pt,ht,gt,ft,vt,yt,Ct,bt,kt,wt,_t,Bt,St,Nt,Et,xt,It,Ft,Vt,Tt,Lt,At,Pt,Mt,Kt,Gt,Yt,Zt,Qt,Xt,zt,Ot,jt,Rt,Ht,Ut,Wt,qt,$t,Dt,ct,dt,Jt,eo,to,oo,ao,no,lo,ro,so,co,uo,mo,po,ho,go],Jo=function(e,o={}){dn.forEach(a=>{e.component(a.name,a)}),e.config.globalProperties.$cvUiParams={...o},e.config.globalProperties.$cvDialogRender=function(){return sn(e,...arguments)},e.config.globalProperties.$cvCopy=Pr,e.config.globalProperties.$cvDrawerRender=function(){return cn(e,...arguments)},e.config.globalProperties.CDN_URL_UI="https://10ui.cn/"};typeof window<"u"&&window._vueApp_&&Jo(window._vueApp_);var Yf={version:"0.3.x",install:Jo},Zf=Yf;exports.components=dn;exports.cvDialogRender=sn;exports.cvDrawerRender=cn;exports.default=Zf;exports.install=Jo;