@10yun/cv-pc-ui 0.3.60 → 0.3.61

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
@@ -4,7 +4,7 @@
4
4
  <img src=${i.url} style="width: ${this.trueWidth}px; height: ${this.trueHeight}px; transform:
5
5
  scale(${a})translate3d(${l}px, ${n}px, 0px)rotateZ(${90*this.rotate}deg)">
6
6
  </div>
7
- </div>`,this.$emit("real-time",i)},reload(){let t=new Image;t.onload=()=>{this.w=parseFloat(window.getComputedStyle(this.$refs.cropper).width),this.h=parseFloat(window.getComputedStyle(this.$refs.cropper).height),this.trueWidth=t.width,this.trueHeight=t.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)})},t.onerror=()=>{this.$emit("img-load","error")},t.src=this.imgs},checkedMode(){let t=1,o=this.trueWidth,a=this.trueHeight;const i=this.mode.split(" ");switch(i[0]){case"contain":this.trueWidth>this.w&&(t=this.w/this.trueWidth),this.trueHeight*t>this.h&&(t=this.h/this.trueHeight);break;case"cover":o=this.w,t=o/this.trueWidth,a*=t,a<this.h&&(a=this.h,t=a/this.trueHeight);break;default:try{let l=i[0];if(l.search("px")!==-1){l=l.replace("px",""),o=parseFloat(l);const n=o/this.trueWidth;let r=1,c=i[1];c.search("px")!==-1&&(c=c.replace("px",""),a=parseFloat(c),r=a/this.trueHeight),t=Math.min(n,r)}if(l.search("%")!==-1&&(l=l.replace("%",""),o=parseFloat(l)/100*this.w,t=o/this.trueWidth),i.length===2&&l==="auto"){let n=i[1];n.search("px")!==-1&&(n=n.replace("px",""),a=parseFloat(n),t=a/this.trueHeight),n.search("%")!==-1&&(n=n.replace("%",""),a=parseFloat(n)/100*this.h,t=a/this.trueHeight)}}catch{t=1}}return t},goAutoCrop(t,o){if(this.imgs===""||this.imgs===null)return;this.clearCrop(),this.cropping=!0;let a=this.w,i=this.h;if(this.centerBox){const r=Math.abs(this.rotate)%2>0;let c=(r?this.trueHeight:this.trueWidth)*this.scale,d=(r?this.trueWidth:this.trueHeight)*this.scale;a=c<a?c:a,i=d<i?d:i}var l=t||parseFloat(this.autoCropWidth),n=o||parseFloat(this.autoCropHeight);(l===0||n===0)&&(l=.8*a,n=.8*i),l=l>a?a:l,n=n>i?i:n,this.fixed&&(n=l/this.fixedNumber[0]*this.fixedNumber[1]),n>this.h&&(l=(n=this.h)/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(l,n)},changeCrop(t,o){if(this.centerBox){let a=this.getImgAxis();t>a.x2-a.x1&&(o=(t=a.x2-a.x1)/this.fixedNumber[0]*this.fixedNumber[1]),o>a.y2-a.y1&&(t=(o=a.y2-a.y1)/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=t,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(t,o,a){t=t||this.x,o=o||this.y,a=a||this.scale;let i=!0;if(this.centerBox){let l=this.getImgAxis(t,o,a),n=this.getCropAxis();l.x1>=n.x1&&(i=!1),l.x2<=n.x2&&(i=!1),l.y1>=n.y1&&(i=!1),l.y2<=n.y2&&(i=!1),i||this.changeImgScale(l,n,a)}return i},changeImgScale(t,o,a){let i=this.trueWidth,l=this.trueHeight,n=i*a,r=l*a;if(n>=this.cropW&&r>=this.cropH)this.scale=a;else{const c=this.cropW/i,d=this.cropH/l,p=this.cropH<=l*c?c:d;this.scale=p,n=i*p,r=l*p}this.imgIsQqualCrop||(t.x1>=o.x1&&(this.isRotateRightOrLeft?this.x=o.x1-(i-n)/2-(n-r)/2:this.x=o.x1-(i-n)/2),t.x2<=o.x2&&(this.isRotateRightOrLeft?this.x=o.x1-(i-n)/2-(n-r)/2-r+this.cropW:this.x=o.x2-(i-n)/2-n),t.y1>=o.y1&&(this.isRotateRightOrLeft?this.y=o.y1-(l-r)/2-(r-n)/2:this.y=o.y1-(l-r)/2),t.y2<=o.y2&&(this.isRotateRightOrLeft?this.y=o.y2-(l-r)/2-(r-n)/2-n:this.y=o.y2-(l-r)/2-r)),(n<this.cropW||r<this.cropH)&&(this.imgIsQqualCrop=!0)}},mounted(){this.support="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";let t=this;var o=navigator.userAgent;this.isIOS=!!o.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(a,i,l){for(var n=atob(this.toDataURL(i,l).split(",")[1]),r=n.length,c=new Uint8Array(r),d=0;d<r;d++)c[d]=n.charCodeAt(d);a(new Blob([c],{type:t.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()}}),xi={key:0,class:"cropper-box"},Si=["src"],Ni={class:"cropper-view-box"},Bi=["src"],Ei={key:1},Di={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:wi(Vi,[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",{class:"vue-cropper",ref:"cropper",onMouseover:o[28]||(o[28]=(...r)=>t.scaleImg&&t.scaleImg(...r)),onMouseout:o[29]||(o[29]=(...r)=>t.cancelScale&&t.cancelScale(...r))},[t.imgs?(e.openBlock(),e.createElementBlock("div",xi,[e.withDirectives(e.createElementVNode("div",{class:"cropper-box-canvas",style:e.normalizeStyle({width:t.trueWidth+"px",height:t.trueHeight+"px",transform:"scale("+t.scale+","+t.scale+") translate3d("+t.x/t.scale+"px,"+t.y/t.scale+"px,0)rotateZ("+90*t.rotate+"deg)"})},[e.createElementVNode("img",{src:t.imgs,alt:"cropper-img",ref:"cropperImg"},null,8,Si)],4),[[e.vShow,!t.loading]])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["cropper-drag-box",{"cropper-move":t.move&&!t.crop,"cropper-crop":t.crop,"cropper-modal":t.cropping}]),onMousedown:o[0]||(o[0]=(...r)=>t.startMove&&t.startMove(...r)),onTouchstart:o[1]||(o[1]=(...r)=>t.startMove&&t.startMove(...r))},null,34),e.withDirectives(e.createElementVNode("div",{class:"cropper-crop-box",style:e.normalizeStyle({width:t.cropW+"px",height:t.cropH+"px",transform:"translate3d("+t.cropOffsertX+"px,"+t.cropOffsertY+"px,0)"})},[e.createElementVNode("span",Ni,[e.createElementVNode("img",{style:e.normalizeStyle({width:t.trueWidth+"px",height:t.trueHeight+"px",transform:"scale("+t.scale+","+t.scale+") translate3d("+(t.x-t.cropOffsertX)/t.scale+"px,"+(t.y-t.cropOffsertY)/t.scale+"px,0)rotateZ("+90*t.rotate+"deg)"}),src:t.imgs,alt:"cropper-img"},null,12,Bi)]),e.createElementVNode("span",{class:"cropper-face cropper-move",onMousedown:o[2]||(o[2]=(...r)=>t.cropMove&&t.cropMove(...r)),onTouchstart:o[3]||(o[3]=(...r)=>t.cropMove&&t.cropMove(...r))},null,32),t.info?(e.openBlock(),e.createElementBlock("span",{key:0,class:"crop-info",style:e.normalizeStyle({top:t.cropInfo.top})},e.toDisplayString(t.cropInfo.width)+" × "+e.toDisplayString(t.cropInfo.height),5)):e.createCommentVNode("",!0),t.fixedBox?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Ei,[e.createElementVNode("span",{class:"crop-line line-w",onMousedown:o[4]||(o[4]=r=>t.changeCropSize(r,!1,!0,0,1)),onTouchstart:o[5]||(o[5]=r=>t.changeCropSize(r,!1,!0,0,1))},null,32),e.createElementVNode("span",{class:"crop-line line-a",onMousedown:o[6]||(o[6]=r=>t.changeCropSize(r,!0,!1,1,0)),onTouchstart:o[7]||(o[7]=r=>t.changeCropSize(r,!0,!1,1,0))},null,32),e.createElementVNode("span",{class:"crop-line line-s",onMousedown:o[8]||(o[8]=r=>t.changeCropSize(r,!1,!0,0,2)),onTouchstart:o[9]||(o[9]=r=>t.changeCropSize(r,!1,!0,0,2))},null,32),e.createElementVNode("span",{class:"crop-line line-d",onMousedown:o[10]||(o[10]=r=>t.changeCropSize(r,!0,!1,2,0)),onTouchstart:o[11]||(o[11]=r=>t.changeCropSize(r,!0,!1,2,0))},null,32),e.createElementVNode("span",{class:"crop-point point1",onMousedown:o[12]||(o[12]=r=>t.changeCropSize(r,!0,!0,1,1)),onTouchstart:o[13]||(o[13]=r=>t.changeCropSize(r,!0,!0,1,1))},null,32),e.createElementVNode("span",{class:"crop-point point2",onMousedown:o[14]||(o[14]=r=>t.changeCropSize(r,!1,!0,0,1)),onTouchstart:o[15]||(o[15]=r=>t.changeCropSize(r,!1,!0,0,1))},null,32),e.createElementVNode("span",{class:"crop-point point3",onMousedown:o[16]||(o[16]=r=>t.changeCropSize(r,!0,!0,2,1)),onTouchstart:o[17]||(o[17]=r=>t.changeCropSize(r,!0,!0,2,1))},null,32),e.createElementVNode("span",{class:"crop-point point4",onMousedown:o[18]||(o[18]=r=>t.changeCropSize(r,!0,!1,1,0)),onTouchstart:o[19]||(o[19]=r=>t.changeCropSize(r,!0,!1,1,0))},null,32),e.createElementVNode("span",{class:"crop-point point5",onMousedown:o[20]||(o[20]=r=>t.changeCropSize(r,!0,!1,2,0)),onTouchstart:o[21]||(o[21]=r=>t.changeCropSize(r,!0,!1,2,0))},null,32),e.createElementVNode("span",{class:"crop-point point6",onMousedown:o[22]||(o[22]=r=>t.changeCropSize(r,!0,!0,1,2)),onTouchstart:o[23]||(o[23]=r=>t.changeCropSize(r,!0,!0,1,2))},null,32),e.createElementVNode("span",{class:"crop-point point7",onMousedown:o[24]||(o[24]=r=>t.changeCropSize(r,!1,!0,0,2)),onTouchstart:o[25]||(o[25]=r=>t.changeCropSize(r,!1,!0,0,2))},null,32),e.createElementVNode("span",{class:"crop-point point8",onMousedown:o[26]||(o[26]=r=>t.changeCropSize(r,!0,!0,2,2)),onTouchstart:o[27]||(o[27]=r=>t.changeCropSize(r,!0,!0,2,2))},null,32)]))],4),[[e.vShow,t.cropping]])],544)}],["__scopeId","data-v-a742df44"]])},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(t){this.cropDialogVisible=t,this.cropInit()},src(t){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(t=>{this.$emit("onSubmit",{file:t})})},_submit_base64(){this.$refs.cvAvatartCropper.getCropData(t=>{let o=new Image;o.src=t,o.onload=async()=>{imageCompress(o)}})},cropRotateRefresh(){},cropRotateLeft(){this.$refs.cvAvatartCropper.rotateLeft()},cropRotateRight(){this.$refs.cvAvatartCropper.rotateRight()},cropChangeScale(t){t=t||1,this.$refs.cvAvatartCropper.changeScale(t)},cropRealTime(t){this.cropPreviews=t}}},_i={class:"cv-upload-crop-box"},Ti={class:"cv-upload-crop-left-box"},Ii={class:"cv-upload-crop-left-opt"},Li={class:"cv-upload-crop-left-opt2"},Fi={class:"cv-upload-crop-left-opt2"},$i={class:"cv-upload-crop-right-box"},Oi=["innerHTML"],zi={title:"头像上传",name:"cvUploadAvatar",mixins:[lo],components:{UploadCrop:v(Di,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("vue-cropper"),c=e.resolveComponent("el-button"),d=e.resolveComponent("el-tooltip"),p=e.resolveComponent("el-input"),h=e.resolveComponent("el-dialog"),u=e.resolveDirective("loading");return e.openBlock(),e.createBlock(h,{title:a.title,modelValue:l.cropDialogVisible,"onUpdate:modelValue":o[7]||(o[7]=m=>l.cropDialogVisible=m),width:"800px","append-to-body":"",onOpened:n.cropDialogOpened,onClose:n.cropDialoClose},{footer:e.withCtx(()=>[e.createVNode(c,{type:"primary",onClick:n.cropSubmit,loading:a.loading,disabled:a.loading},{default:e.withCtx(()=>[...o[12]||(o[12]=[e.createTextVNode("提 交",-1)])]),_:1},8,["onClick","loading","disabled"])]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",_i,[e.createElementVNode("div",Ti,[l.cropVisible?(e.openBlock(),e.createBlock(r,e.mergeProps({key:0,ref:"cvAvatartCropper",img:l.cropBeforelImage},n.cropAttrs,{onRealTime:n.cropRealTime}),null,16,["img","onRealTime"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ii,[e.renderSlot(t.$slots,"default"),e.createVNode(d,{effect:"dark",content:"重置",placement:"top"},{default:e.withCtx(()=>[e.createVNode(c,{icon:"ElIconRefresh",onClick:o[0]||(o[0]=m=>n.cropRotateRefresh())})]),_:1}),e.createVNode(d,{effect:"dark",content:"放大",placement:"top"},{default:e.withCtx(()=>[e.createVNode(c,{icon:"ElIconZoomIn",onClick:o[1]||(o[1]=m=>n.cropChangeScale(1))})]),_:1}),e.createVNode(d,{effect:"dark",content:"缩小",placement:"top"},{default:e.withCtx(()=>[e.createVNode(c,{icon:"ElIconZoomOut",onClick:o[2]||(o[2]=m=>n.cropChangeScale(-1))})]),_:1}),e.createVNode(d,{effect:"dark",content:"向左旋转",placement:"top"},{default:e.withCtx(()=>[e.createVNode(c,{icon:"ElIconRefreshLeft",onClick:o[3]||(o[3]=m=>n.cropRotateLeft())})]),_:1}),e.createVNode(d,{effect:"dark",content:"向右旋转",placement:"top"},{default:e.withCtx(()=>[e.createVNode(c,{icon:"ElIconRefreshRight",onClick:o[4]||(o[4]=m=>n.cropRotateRight())})]),_:1})]),e.createElementVNode("div",Li,[e.createVNode(p,{size:"small"},{prepend:e.withCtx(()=>[...o[8]||(o[8]=[e.createTextVNode("X 坐标",-1)])]),_:1}),e.createVNode(p,{size:"small"},{prepend:e.withCtx(()=>[...o[9]||(o[9]=[e.createTextVNode("Y 坐标",-1)])]),_:1})]),e.createElementVNode("div",Fi,[e.createVNode(p,{size:"small",modelValue:l.cropLocalWidth,"onUpdate:modelValue":o[5]||(o[5]=m=>l.cropLocalWidth=m)},{prepend:e.withCtx(()=>[...o[10]||(o[10]=[e.createTextVNode("宽度",-1)])]),_:1},8,["modelValue"]),e.createVNode(p,{size:"small",modelValue:l.cropLocalHeight,"onUpdate:modelValue":o[6]||(o[6]=m=>l.cropLocalHeight=m)},{prepend:e.withCtx(()=>[...o[11]||(o[11]=[e.createTextVNode("高度",-1)])]),_:1},8,["modelValue"])])]),e.createElementVNode("div",$i,[e.createElementVNode("div",{class:"cv-upload-crop-preview",innerHTML:l.cropPreviews.html},null,8,Oi)])])),[[u,a.loading]])]),_:3},8,["title","modelValue","onOpened","onClose"])}]])},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:()=>({localValue:"",localList:[],upAccept:"image/*"}),computed:{localRef:()=>"cvUploadAvatar"+ +new Date+(1e3*Math.random()).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(t){this._init_parse()}},mounted(){this._init_parse()},methods:{_init_parse(){this.localValue=this.initValue||""},cropDialogOpen(){this.cropShow=!0,this.$nextTick(()=>{this._init_parse()})},initBeforeUpload(t){if(!this._commonBeforeUpload(t))return this.upIngLoading=!1,!1;if(this.crop){const o=new FileReader;o.readAsDataURL(t),o.onload=()=>{this.localValue=o.result},this.$refs.cvUploadAvatar.clearFiles()}},async onHttpRequest(t){const{file:o}=t;this.upIngLoading=!0;const a=this.mergeAttrs.signatureType||null,i=this.mergeAttrs.signatureFn||null,l=this.mergeAttrs.signatureParam||{};await Ko(o,a,i,l).then(n=>{this.$nextTick(()=>{this.$emit("update:modelValue",n.full_path),this.$emit("update:initValue",n.cdn_full_path)}),k.ElMessage.success("上传成功"),this.upIngLoading=!1,this.cropShow=!1}).catch(()=>{this.upIngLoading=!1})}}},Mi=["src"],pt=v(zi,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("upload-tip"),c=e.resolveComponent("cv-icons"),d=e.resolveComponent("el-button"),p=e.resolveComponent("el-tooltip"),h=e.resolveComponent("el-upload"),u=e.resolveComponent("upload-crop");return e.openBlock(),e.createElementBlock("div",{class:"cv-upload-avatar-wrap",onClick:o[2]||(o[2]=(...m)=>n.cropDialogOpen&&n.cropDialogOpen(...m))},[a.initValue?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"cv-upload-avatar-box cv-upload-avatar-empty",style:e.normalizeStyle(n.showStyle)},[...o[3]||(o[3]=[e.createElementVNode("div",{class:"cv-upload-avatar__text"},"上传头像",-1)])],4)),a.initValue?(e.openBlock(),e.createElementBlock("div",{key:1,class:"cv-upload-avatar-box",style:e.normalizeStyle(n.showStyle)},[e.createElementVNode("img",{class:"cv-upload-avatar__img",src:a.initValue},null,8,Mi)],4)):e.createCommentVNode("",!0),e.createVNode(r,e.mergeProps(t.tipAttr,{fileUnit:"张",multiple:!1,limit:1}),null,16),a.crop?(e.openBlock(),e.createBlock(u,{key:2,modelValue:t.cropShow,"onUpdate:modelValue":o[0]||(o[0]=m=>t.cropShow=m),title:"修改头像",size:a.showSize,onOnSubmit:n.onHttpRequest,onOnClose:o[1]||(o[1]=m=>t.upIngLoading=!1),loading:t.upIngLoading,src:l.localValue},{default:e.withCtx(()=>[e.createVNode(h,e.mergeProps(n.handlerAttr,{"before-upload":n.initBeforeUpload,"http-request":t.initHttpRequest}),{default:e.withCtx(()=>[e.createVNode(p,{effect:"dark",content:"选择图片",placement:"top"},{default:e.withCtx(()=>[e.createVNode(d,{style:{"margin-right":"10px"},loading:t.upIngLoading,disabled:t.upIngLoading},{default:e.withCtx(()=>[e.createVNode(c,{type:"ElIconPlus",size:"14",style:{"margin-right":"10px"}}),o[4]||(o[4]=e.createTextVNode(" 选择 ",-1))]),_:1},8,["loading","disabled"])]),_:1})]),_:1},16,["before-upload","http-request"])]),_:1},8,["modelValue","size","onOnSubmit","loading","src"])):e.createCommentVNode("",!0)])}]]);function ae(t){return t?typeof t=="string"||typeof t=="number"?[t]:Object.prototype.toString.call(t)==="[object Object]"?[]:[...t]:[]}function ha(t,o){let a=[];Array.isArray(t)&&t.length>0&&a.push(...t),Array.isArray(o)&&o.length>0&&a.push(...o),typeof o=="string"&&a.push(o);let i=[];for(let l in a){let n=a[l],r=Object.prototype.toString.call(n);r==="[object String]"?i.push(n):r==="[object Object]"&&n.url&&i.push(n.url)}return i}const Pi={title:"图片上传",name:"cvUploadImage",mixins:[lo],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:()=>({localValue:[],localList:[],previewShow:!1,previewTitle:"",previewUrl:"",upAccept:"image/*"}),computed:{localRef:()=>"cvUploadImage"+ +new Date+(1e3*Math.random()).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 t=this.showSize+"px";return(this.showBig||this.drag)&&(t=2*this.showSize+"px"),{width:t,height:this.showSize+"px",lineHeight:this.showSize+"px"}}},watch:{modelValue(t){this._init_parse_value()},initValue(t){this._init_parse_list()}},mounted(){},methods:{_init_parse_value(){if(this.modelValue)if(typeof this.modelValue=="string"&&this.modelValue.includes(",")){const t=String(this.modelValue).split(",").map(o=>o.trim());this.localValue=ae(t)}else this.localValue=ae(this.modelValue);else this.localValue=[]},_init_parse_list(){this.initValue?this.localList=Xo(this.initValue):this.localList=[]},initOnChange(t,o){},initBeforeUpload(t){return this.upIngLoading=!0,!!this._commonBeforeUpload(t)||(this.upIngLoading=!1,!1)},async initHttpRequest(t){const{file:o}=t;this.upIngLoading=!0,this.mergeAttrs.upResponseFn;const a=this.mergeAttrs.signatureType||null,i=this.mergeAttrs.signatureFn||null,l=this.mergeAttrs.signatureParam||{};await Ko(o,a,i,l).then(n=>{this.$nextTick(()=>{this.updateValue(n.filelog_id,n.cdn_full_path)}),k.ElMessage.success("上传成功"),this.upIngLoading=!1}).catch(()=>{this.upIngLoading=!1})},updateValue(t,o){if(this.multiple){let a=ha(this.localValue,t).join(",");this.$emit("update:modelValue",a)}else this.$emit("update:modelValue",t);if(this.multiple){let a=ha(this.localList,o);this.$emit("update:initValue",a)}else this.$emit("update:initValue",o)},handleItemPreview(t,o){t.raw,t.type.includes("image")?(this.previewTitle=t.name,this.previewUrl=t.url,this.previewShow=!0):window.open(t.url)},doRemove(t){this.multiple?(this.localValue.splice(t,1),this.localList.splice(t,1)):(this.localValue="",this.localList=[]),this.updateValue(null,null)},handleItemRemove(t,o){if(this.beforeRemove&&typeof this.beforeRemove=="function"){const a=this.multiple?this.localValue[o]:this.localValue,i=this.beforeRemove(a,this.localValue);i&&i.then?i.then(()=>{this.doRemove(o)},()=>{}):i!==!1&&this.doRemove(o)}else this.doRemove(o)},handleItemEdit(t,o){k.ElMessageBox.prompt("请输入文件地址","编辑",{confirmButtonText:"OK",cancelButtonText:"Cancel",inputValue:t.url||"",inputErrorMessage:"格式不正确"}).then(({value:a})=>{const i=a.split("/").pop(),l=i.split(".").pop().toLowerCase();if(!this.fileType.includes(l)){let d=this.fileType.join("、");return k.ElMessage.error(`文件格式错误,请填写类型,如:${d} 格式文件`),!1}const n=(function(d){if(!d)return"";const p=d.replace(/^\./,"").toLowerCase();return Ml.extensionToMime[p]||""})(l);if(!n)return k.ElMessage.error("文件格式错误"),!1;var r;(r=a).startsWith("http://")||r.startsWith("https://")||r.startsWith("//")||this.mergeAttrs?.baseDomain&&(a=this.mergeAttrs?.baseDomain+a);const c={name:i,status:"success",type:n,uid:Date.now(),url:a};this.localList[o]=c}).catch(()=>{})},handleItemCrop(t,o){}}},Hi={class:"cv-upload-image cv-upload-common"},Ai={class:"cv-upload-list-box el-upload-list el-upload-list--picture-card"},ji=["tabindex"],Ri={class:"el-upload-list__item-status-label"},Ui={class:"el-upload-list__item-actions"},Wi=["onClick"],Yi={class:"el-upload-list__item-delete"},qi={class:"el-upload-list__item-delete"},Xi=["onClick"],Ki={style:{margin:"0 auto"}},Gi=["src"],ht=v(Pi,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-image"),c=e.resolveComponent("cv-icons"),d=e.resolveComponent("el-upload"),p=e.resolveComponent("upload-tip"),h=e.resolveComponent("el-dialog"),u=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Hi,[e.createElementVNode("div",Ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.localList,(m,f)=>(e.openBlock(),e.createElementBlock("section",{class:"el-upload-list__item is-success",key:f,tabindex:f,style:e.normalizeStyle(n.showStyle)},[e.createVNode(r,{class:"el-upload-list__item-thumbnail",lazy:a.lazy,src:m.url,style:e.normalizeStyle(n.showStyle),fit:"contain"},null,8,["lazy","src","style"]),e.createElementVNode("label",Ri,[e.createVNode(c,{type:"ElIconCheck",color:"#ffffff",size:"12"})]),e.createElementVNode("span",Ui,[e.createElementVNode("span",{class:"el-upload-list__item-preview",onClick:C=>n.handleItemPreview(m)},[e.createVNode(c,{type:"ElIconZoomIn",size:"20"})],8,Wi),e.createElementVNode("span",Yi,[e.createVNode(c,{type:"ElIconDelete",size:"20",onClick:C=>n.handleItemRemove(m,f)},null,8,["onClick"])]),e.createElementVNode("span",qi,[e.createVNode(c,{type:"ElIconEdit",size:"20",onClick:C=>n.handleItemEdit(m,f)},null,8,["onClick"])]),a.crop?(e.openBlock(),e.createElementBlock("span",{key:0,class:"el-upload-list__item-preview",onClick:C=>n.handleItemCrop(m)},[e.createVNode(c,{type:"ElIconCrop",size:"20"})],8,Xi)):e.createCommentVNode("",!0)])],12,ji))),128)),n.showUpload?(e.openBlock(),e.createBlock(d,e.mergeProps({key:0,class:"cv-upload-common-handle"},n.handlerAttr,{"file-list":l.localList,"before-upload":n.initBeforeUpload,"http-request":n.initHttpRequest,"on-change":n.initOnChange,"on-exceed":t.initOnExceed,style:n.showStyle}),{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"cv-upload-common__ing",style:e.normalizeStyle(n.showStyle)},[a.drag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(c,{type:"ElIconUpload",size:"24"}),o[1]||(o[1]=e.createElementVNode("div",{class:"el-upload__text"},[e.createTextVNode(" 将文件拖到此处,或 "),e.createElementVNode("em",null,"点击上传")],-1))],64)):(e.openBlock(),e.createBlock(c,{key:1,type:"ElIconPlus",size:a.showSize/3},null,8,["size"]))],4)),[[u,t.upIngLoading]])]),_:1},16,["file-list","before-upload","http-request","on-change","on-exceed","style"])):e.createCommentVNode("",!0)]),e.createVNode(p,e.mergeProps(t.tipAttr,{fileUnit:"张"}),null,16),e.createVNode(h,{modelValue:l.previewShow,"onUpdate:modelValue":o[0]||(o[0]=m=>l.previewShow=m),title:l.previewTitle,"append-to-body":""},{default:e.withCtx(()=>[e.createElementVNode("div",Ki,[e.createElementVNode("img",{width:"100%",src:l.previewUrl,style:{"max-width":"300px"}},null,8,Gi)])]),_:1},8,["modelValue","title"])])}]]),Zi={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 so(t){return`https://10ui.cn/default/icon_ext/${Zi[t]}.svg`}const Qi={name:"uploadList",props:{files:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0}},methods:{getExtension(t){return t.lastIndexOf(".")>-1&&so[t.slice(t.lastIndexOf(".")+1).toLowerCase()]||so.file},getSize:t=>t&&!isNaN(Number(t))?t:"",parsePercentage:t=>parseInt(t,10),handleDownload(t){t.url},handleDelete(t,o){this.$confirm("确认删除该文件吗? ").then(()=>{this.$emit("remove",t,o)}).catch(()=>{})}}},Ji=["src"],er={class:"cv-upload-list__item-content-action"},tr={title:"文件上传",inheritAttrs:!1,name:"cvUploadFile",mixins:[lo],components:{uploadList:v(Qi,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-link");return e.openBlock(),e.createBlock(e.TransitionGroup,{class:"cv-upload-file-list el-upload-list el-upload-list--text",name:"el-list",tag:"ul"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.files,(c,d)=>(e.openBlock(),e.createElementBlock("li",{key:c.uid,class:"el-upload-list__item cv-upload-list__item-content"},[e.createVNode(r,{href:c.url,underline:!1,target:"_blank"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:n.getExtension(c.name),class:"el-upload-list__item-content-name-icon"},null,8,Ji),e.createElementVNode("span",null,e.toDisplayString(c.name),1)]),_:2},1032,["href"]),e.createElementVNode("div",er,[e.createVNode(r,{underline:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.getSize(c.size)),1)]),_:2},1024),a.isCanDownload?(e.openBlock(),e.createBlock(r,{key:0,underline:!1,onClick:p=>n.handleDownload(c)},{default:e.withCtx(()=>[...o[0]||(o[0]=[e.createTextVNode("下载",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),!a.disabled&&a.isCanDelete?(e.openBlock(),e.createBlock(r,{key:1,underline:!1,onClick:p=>n.handleDelete(d,c),type:"danger"},{default:e.withCtx(()=>[...o[1]||(o[1]=[e.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])]))),128))]),_:1})}]])},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:()=>({localValue:[],localList:[]}),computed:{localRef:()=>"cvUploadFile"+ +new Date+(1e3*Math.random()).toFixed(0),handlerAttr(){return{ref:this.localRef,action:"#",limit:parseInt(this.limit),multiple:this.multiple,drag:!1,disabled:this.upIngLoading,showFileList:!0}},list(){let t=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()+t++,o)):[]}},watch:{initValue(t){this._init_parse()}},mounted(){this._init_parse()},methods:{_init_parse(){this.initValue?this.localList=Xo(this.initValue):this.localList=[]},initOnChange(t,o){this.localList=o},initBeforeUpload(t){return this._commonBeforeUpload(t)?!this.isCanUploadSame&&this.localList.some(o=>o.name+o.size===t.name+t.size)?(this.$message.error("此文件已上传!"),!1):!0:!1},upFileError(t){this.$message.error("上传失败, 请重试"),this.$emit("error",t)},upFileSuccess(t,o){this.upResponseFn&&typeof this.upResponseFn=="function"&&(t=this.upResponseFn(t,o,this.localList)),this.multiple?this.$emit("update:modelValue",[...this.localList,t]):this.$emit("update:modelValue",t),this.$emit("success",t,this.localList)},handleRemove(t,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(t){if(this.$emit("remove",this.list[t],this.list),this.localList.splice(t,1),this.multiple){const o=[...this.list];o.splice(t,1),this.$emit("update:modelValue",o||[])}else this.$emit("update:modelValue",null)}}},or={class:"cv-upload-file"},mt=v(tr,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-button"),c=e.resolveComponent("el-upload"),d=e.resolveComponent("upload-tip"),p=e.resolveComponent("upload-list");return e.openBlock(),e.createElementBlock("div",or,[e.createVNode(c,e.mergeProps({class:"cv-upload-file-uploader"},n.handlerAttr,{"file-list":l.localList,"onUpdate:fileList":o[0]||(o[0]=h=>l.localList=h),"before-upload":n.initBeforeUpload,"on-change":n.initOnChange,"on-exceed":t.initOnExceed,"on-error":n.upFileError,"on-success":n.upFileSuccess}),{default:e.withCtx(()=>[e.createVNode(r,{type:"primary",icon:"ElIconUpload"},{default:e.withCtx(()=>[...o[1]||(o[1]=[e.createTextVNode("上传文件",-1)])]),_:1})]),_:1},16,["file-list","before-upload","on-change","on-exceed","on-error","on-success"]),e.createVNode(d,e.mergeProps(t.tipAttr,{fileUnit:"个"}),null,16),e.createVNode(p,{disabled:a.disabled,files:n.list,isCanDelete:a.isCanDelete,isCanDownload:a.isCanDownload,onRemove:n.handleRemove},null,8,["disabled","files","isCanDelete","isCanDownload","onRemove"])])}]]),ar={class:"cv-upload-video"},lr={class:"cv-upload-list-box el-upload-list el-upload-list--picture-card"},nr=["tabindex"],ir=["src"],rr={class:"el-upload-list__item-status-label"},sr={class:"el-upload-list__item-actions"},cr=["onClick"],dr={class:"el-upload-list__item-delete"},pr={class:"el-upload-list__item-delete"},hr={key:0,style:{width:"500px",height:"300px",margin:"0 auto"}},mr=["src"],ut=v({title:"视频上传",name:"cvUploadVideo",mixins:[lo],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:()=>({localValue:"",localList:"",previewShow:!1,previewTitle:"",previewUrl:"",upAccept:"video/*"}),computed:{localRef:()=>"cvUploadVideo"+ +new Date+(1e3*Math.random()).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(t){this._init_parse_value()},initValue(t){this._init_parse_list()}},mounted(){this._init_parse_value(),this._init_parse_list()},methods:{_init_parse_value(){this.modelValue?this.localValue=ae(this.modelValue):this.localValue=""},_init_parse_list(){this.initValue?this.localList=Xo(this.initValue):this.localList=""},initBeforeUpload(t){return this.upIngLoading=!0,!!this._commonBeforeUpload(t)||(this.upIngLoading=!1,!1)},async initHttpRequest(t){const{file:o}=t;this.upIngLoading=!0,this.mergeAttrs.upResponseFn;const a=this.mergeAttrs.signatureType||null,i=this.mergeAttrs.signatureFn||null,l=this.mergeAttrs.signatureParam||{};await Ko(o,a,i,l).then(n=>{this.$nextTick(()=>{this.$emit("update:modelValue",n.full_path),this.$emit("update:initValue",n.cdn_full_path)}),ExtendMessage.success("上传成功"),this.upIngLoading=!1}).catch(()=>{this.upIngLoading=!1})},handleItemPreview(t,o){this.previewTitle=t.name,this.previewUrl=t.url,this.previewShow=!0},doRemove(t){this.localValue="",this.localList="",this.$emit("update:modelValue",""),this.$emit("update:initValue","")},handleItemRemove(t,o){if(this.beforeRemove&&typeof this.beforeRemove=="function"){const a=this.multiple?this.localValue[o]:this.localValue,i=this.beforeRemove(a,this.localValue);i&&i.then?i.then(()=>{this.doRemove(o)},()=>{}):i!==!1&&this.doRemove(o)}else this.doRemove(o)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("cv-icons"),c=e.resolveComponent("el-progress"),d=e.resolveComponent("el-upload"),p=e.resolveComponent("upload-tip"),h=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",ar,[e.createElementVNode("div",lr,[l.localList?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.localList,(u,m)=>(e.openBlock(),e.createElementBlock("section",{class:"el-upload-list__item is-success",key:m,tabindex:m,style:e.normalizeStyle(n.showStyle)},[e.createElementVNode("video",{class:"el-upload-list__item-thumbnail",autoplay:!1,src:u.url,style:e.normalizeStyle(n.showStyle)}," 您的浏览器不支持视频播放 ",12,ir),e.createElementVNode("label",rr,[e.createVNode(r,{type:"ElIconCheck",color:"#ffffff",size:"12"})]),e.createElementVNode("span",sr,[e.createElementVNode("span",{class:"el-upload-list__item-preview",onClick:f=>n.handleItemPreview(u)},[e.createVNode(r,{type:"ElIconVideoPlay",size:"20"})],8,cr),e.createElementVNode("span",dr,[e.createVNode(r,{type:"ElIconDelete",size:"20",onClick:f=>n.handleItemRemove(u,m)},null,8,["onClick"])]),e.createElementVNode("span",pr,[e.createVNode(r,{type:"ElIconEdit",size:"20",onClick:f=>t.handleItemEdit(u,m)},null,8,["onClick"])])])],12,nr))),128)):e.createCommentVNode("",!0),n.showUpload?(e.openBlock(),e.createBlock(d,e.mergeProps({key:1,class:"cv-upload-handler"},n.handlerAttr,{"before-upload":n.initBeforeUpload,"http-request":n.initHttpRequest,style:n.showStyle}),{default:e.withCtx(()=>[t.upIngPercent>0?(e.openBlock(),e.createBlock(c,{key:0,percentage:t.upIngPercent,style:{"margin-top":"20px"},type:"circle"},null,8,["percentage"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"cv-upload-video__ing",style:e.normalizeStyle(n.showStyle)},[e.createVNode(r,{type:"ElIconUpload",size:"24"}),o[1]||(o[1]=e.createElementVNode("div",{class:"el-upload__text"},[e.createTextVNode(" 将视频拖到此处,或 "),e.createElementVNode("em",null,"点击上传")],-1))],4))]),_:1},16,["before-upload","http-request","style"])):e.createCommentVNode("",!0)]),e.createVNode(p,e.mergeProps(t.tipAttr,{fileUnit:"个",limit:1}),null,16),e.createVNode(h,{modelValue:l.previewShow,"onUpdate:modelValue":o[0]||(o[0]=u=>l.previewShow=u),title:l.previewTitle,"append-to-body":""},{default:e.withCtx(()=>[l.previewShow?(e.openBlock(),e.createElementBlock("div",hr,[e.createElementVNode("video",{autoplay:!0,src:l.previewUrl,controls:"controls",style:{width:"500px",height:"300px"}}," 您的浏览器不支持视频播放 ",8,mr)])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])])}]]),ur={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:()=>({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:1048576,parallel:4,checkpoints:{}}),watch:{dialogVisible:{handler(t){t||(this.fileList=[],this.$refs.upload.uploadFiles=[])}},fileList:{handler(t){if(t.length){this.dialogVisible=!0;let o=[],a=[];t.forEach(i=>{i.raw.name.indexOf(".")===-1&&(i.errMsg="不支持此格式上传"),i.percentage===100?o.push(i):a.push(i)}),o.length===t.length?(this.pauseDisabled=!0,this.isDoing=!0):this.isDoing=!1,this.unList=a}},deep:!0}},mounted(){window.addEventListener("online",this.resumeUpload)},methods:{filterSize:ca,handleExceed(){this.$confirm("上传文件数量不能超过100个,请重新选择!","操作提示",{confirmButtonText:"确 定",cancelButtonText:"取 消",type:"warning"}).then(()=>{this.fileList=[],this.dialogVisible=!1}).catch(()=>{this.fileList=[]})},handleDeleteChangeFile(t){this.fileList.splice(t,1),this.fileList.length||(this.dialogVisible=!1)},fileTypeIcon(t){const{type:o}=t.raw,a=o.indexOf("video")!==-1,i=o.indexOf("image")!==-1,l=o.indexOf("audio")!==-1,n=o.indexOf("zip")!==-1,r=o.indexOf("wordprocessingml")!==-1,c=o.indexOf("pdf")!==-1,d=o.indexOf("text")!==-1,p=o.indexOf("sheet")!==-1;return a?"MP4":i?"JPG1":l?"mp3-1":n?"yasuo":r?"DOCX":c?"wenjianleixing-biaozhuntu-PDFwendang":d?"div-1":p?"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(t=>{t.client&&t.percentage<100&&t.client.cancel()}),this.dialogVisible=!1}).catch(()=>{})},async handleBeforeUpload(t){},handleStopChangeFile(t,o){o.isPlay=!o.isPlay,this.fileList.splice(t,1,o),o.isPlay?this.resumeMultipartUpload(o):o.client.cancel()},async starUpload(){this.uploadDisabled=!0,this.pauseDisabled=!1,this.multipartUpload()},async multipartUpload(){this.file?this.fileList.forEach(async t=>{t.isLoading=!0,await this.ossUploadHandle(t,this.fileList)}):k.ElMessage.error("请选择文件")},async resumeUpload(){this.pauseDisabled=!1,this.uploadDisabled=!0,this.resumeDisabled=!0,await this.resumeMultipartUpload()},stopUpload(){this.resumeDisabled=!1,this.pauseDisabled=!0,this.fileList.forEach(t=>{t.client.cancel(),t.isPlay=!1})},async change(t,o){this.fileMap[t]=o,this.map_max_key=t},async handle_network_speed_change(t,o,a){t-this.map_max_key>=1e4&&(this.fileMap={});for(let i=t;i<=o;i++){const l=await this.fileMap[i];l?await this.change(i,l+a):await this.change(i,a)}},handle_network_speed(t,o,a){const i=t.rt/1e3,l=new Date(t.headers.date).getTime(),n=l-i;let r=parseInt(o/i);return a===0&&(r=0),r===0||this.handle_network_speed_change(n,l,r),r?ca(r):0},async resetUpload(t,o){JSON.stringify(t).indexOf("Error")!==-1&&(o.client&&o.client.cancel(),o.client=await pa(this.signatureType,this.apiFunc),await this.resumeMultipartUpload(o))},async resumeMultipartUpload(t){if(t){const{tempCheckpoint:o}=t;this.resumeUploadFile(t,o)}else Object.values(this.checkpoints).forEach(o=>{const{uploadId:a}=o,i=this.fileList.findIndex(n=>n.upload===a),l=this.fileList[i];this.resumeUploadFile(l,o)})},async resumeUploadFile(t,o){const{uploadId:a,file:i,name:l}=o;try{const{raw:n,percentage:r}=t;t.partSize=0,r<100&&n.name.indexOf(".")!==-1&&t.client.multipartUpload(a,i,{parallel:this.parallel,partSize:this.partSize,progress:async(c,d,p)=>{await this.onUploadProgress(t,c,d,p,l)},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(t)}).catch(async c=>{await this.resetUpload(c,t)})}catch{}},async onUploadProgress(t,o,a,i,l){a&&(this.checkpoints[a.uploadId]=a,t.speed=this.handle_network_speed(i,this.partSize,o),t.tempCheckpoint=a,t.abortCheckpoint=a,t.upload=a.uploadId),t.isPlay=!0,t.isPlay&&(t.isLoading=!1),t.uploadName=l,t.percentage=Number((100*o).toFixed(2))},async ossUploadHandle(t){let o={pass:!0,filePath:""};try{const{raw:a,percentage:i}=t,l=a,n=await pa(this.signatureType,this.apiFunc,{},{secure:!0});if(this.signatureType=="aliyun_oss_type1"){if(t.client=n,t.partSize=0,i<100&&a.name.indexOf(".")!==-1){const r=n.dir+l.name;await t.client.multipartUpload(r,l,{parallel:this.parallel,partSize:this.partSize,progress:async(c,d,p)=>{await this.onUploadProgress(t,c,d,p,r)}}).then(()=>{this.$emit("upload:modelValue",this.fileList),this.resumeDisabled=!0,this.onCreatePanFile(t),this.unList.length&&this.uploadDisabled&&(this.resumeDisabled=!1)}).catch(async c=>{})}}else this.signatureType=="aliyun_oss_type2"&&Al(l,n)}catch(a){o={...a,pass:!1,filePath:""}}return o},getToday(){const t=new Date;return`${t.getFullYear()}${t.getMonth()+1}${t.getDate()}${t.getHours()}${t.getMinutes()}${t.getSeconds()}`},handleChange(t,o){o.forEach(a=>{a.client=null,a.isPlay=!1,a.isLoading=!1,a.abortCheckpoint=!1}),this.fileList=o,this.file=t.raw,this.uploadDisabled=!1,this.pauseDisabled=this.resumeDisabled=!0},handleDeleteFile(t){const o=t.indexOf(this.model);t.substring(o,t.length),this.$emit("on-delete"),this.fileList=[],k.ElMessage.success("删除成功")},async onCreatePanFile(t){await this.getParams(t),this.$emit("on-update")},handleMediaRes:t=>({image:async function(o){return new Promise(a=>{var i=new FileReader;i.onload=function(l){var n=l.target.result,r=new Image;r.onload=function(){a({Width:this.width,Height:this.height})},r.src=n},i.readAsDataURL(o)})},audio:async function(o){return new Promise(a=>{var i=new FileReader;i.onload=function(l){var n=l.target.result,r=new Audio;r.onloadeddata=function(){const c=r.duration;a({Duration:1e3*c})},r.src=n},i.readAsDataURL(o)})},video:async function(o){return new Promise(a=>{var i=URL.createObjectURL(o);const l=document.createElement("video");l.src=i,l.onloadeddata=function(){a({CoverImg:"",Duration:1e3*this.duration,Width:this.videoWidth,Height:this.videoHeight})}})}})[t],captureImage:(t,o)=>t+"?x-oss-process=video/snapshot,t_"+(o=o||"3000 ")+",f_jpg",async getParams(t){const{type:o}=t.raw,a=o.indexOf("video")!==-1,i=o.indexOf("image")!==-1,l=o.indexOf("audio")!==-1;let n,r="";return a?r="video":i?o.indexOf("adobe")===-1&&(r="image"):l&&(r="audio"),(a||i||l)&&r&&(n=await this.handleMediaRes(r)(t.raw)),{ResTitle:t.name,ResDescribe:"",OssKey:t.uploadName,ContentType:o||"application/octet-stream",ContentLength:t.size,...n}}}},gr={class:"oss-upload"},fr={class:"cv-upload-task-hd-title"},Cr={class:"cv-upload-task-hd-num"},vr={class:"cv-upload-task-opts"},yr={class:"cv-upload-task-lists"},kr={class:"cv-upload-task-item-name"},br={class:"name"},wr={class:"file-name-item"},Vr={key:0,class:"speed"},xr={key:1,class:"speed"},Sr={key:2,class:"success"},Nr={class:"total"},Br={key:0,class:"name error"},Er={class:"cv-upload-task-item-tool"},Dr=["onClick"],_r=["onClick"],gt=v({name:"cvUploadOss",mixins:[ur]},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-button"),c=e.resolveComponent("el-upload"),d=e.resolveComponent("el-progress"),p=e.resolveComponent("cv-icons"),h=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",gr,[e.createVNode(c,{ref:"upload",action:"","show-file-list":!1,multiple:"","on-change":t.handleChange,"before-upload":t.handleBeforeUpload,"auto-upload":!1,limit:100,"on-exceed":t.handleExceed,accept:t.accept},{default:e.withCtx(()=>[e.createVNode(r,{type:"primary",icon:"ElIconUpload",round:""},{default:e.withCtx(()=>[...o[1]||(o[1]=[e.createTextVNode("上 传",-1)])]),_:1})]),_:1},8,["on-change","before-upload","on-exceed","accept"]),e.createVNode(h,{modelValue:t.dialogVisible,"onUpdate:modelValue":o[0]||(o[0]=u=>t.dialogVisible=u),width:"650px",height:"500","destroy-on-close":"","close-on-click-modal":!1,"before-close":t.handleClose,style:{height:"500px"}},{header:e.withCtx(()=>[e.createElementVNode("div",fr,[o[2]||(o[2]=e.createElementVNode("span",null,"上传",-1)),e.createElementVNode("span",Cr,e.toDisplayString(t.fileList.length-t.unList.length)+"/"+e.toDisplayString(t.fileList.length),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",vr,[e.createVNode(r,{type:"primary",icon:"ElIconVideoPlay",disabled:t.uploadDisabled,onClick:t.starUpload},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode("开始上传",-1)])]),_:1},8,["disabled","onClick"]),e.createVNode(r,{type:"success",icon:"ElIconRefreshRight",disabled:t.resumeDisabled,onClick:t.resumeUpload},{default:e.withCtx(()=>[...o[4]||(o[4]=[e.createTextVNode("继续",-1)])]),_:1},8,["disabled","onClick"]),e.createVNode(r,{type:"danger",icon:"ElIconVideoPause",disabled:t.pauseDisabled,onClick:t.stopUpload},{default:e.withCtx(()=>[...o[5]||(o[5]=[e.createTextVNode("暂停",-1)])]),_:1},8,["disabled","onClick"])]),e.createElementVNode("div",yr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fileList,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"cv-upload-task-item-box",key:m},[e.createElementVNode("div",kr,[e.createElementVNode("div",br,[e.createElementVNode("span",wr,e.toDisplayString(m+1)+"."+e.toDisplayString(u.name),1),u.isLoading&&!u.isPlay?(e.openBlock(),e.createElementBlock("span",Vr,"准备就绪")):e.createCommentVNode("",!0),u.isPlay&&u.percentage!==100?(e.openBlock(),e.createElementBlock("span",xr,e.toDisplayString(u.speed)+"/s",1)):e.createCommentVNode("",!0),u.percentage===100?(e.openBlock(),e.createElementBlock("span",Sr,"完成")):e.createCommentVNode("",!0),e.createElementVNode("div",Nr,e.toDisplayString(t.filterSize(u.size)),1)]),u.errMsg?(e.openBlock(),e.createElementBlock("span",Br,e.toDisplayString(u.errMsg),1)):e.createCommentVNode("",!0),u.percentage<100&&!u.errMsg?(e.openBlock(),e.createBlock(d,{key:1,percentage:u.percentage},null,8,["percentage"])):(e.openBlock(),e.createBlock(d,{key:2,percentage:u.percentage,status:u.errMsg?"exception":"success"},null,8,["percentage","status"]))]),e.createElementVNode("div",Er,[!u.percentage||0<u.percentage<100&&!u.isPlay?(e.openBlock(),e.createElementBlock("span",{key:0,class:"icon delete",onClick:f=>t.handleDeleteChangeFile(m)},[e.createVNode(p,{type:"ElIconClose"})],8,Dr)):e.createCommentVNode("",!0),u.percentage&&u.percentage!==100?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["icon",u.isPlay?"delete":"success"]),onClick:f=>t.handleStopChangeFile(m,u)},[u.isPlay?(e.openBlock(),e.createBlock(p,{key:0,type:"ElIconVideoPause"})):(e.openBlock(),e.createBlock(p,{key:1,type:"ElIconCaretRight"}))],10,_r)):e.createCommentVNode("",!0)])]))),128))])]),_:1},8,["modelValue","before-close"])])}],["__scopeId","data-v-9c3ea43c"]]);pt.install=function(t){t.component(pt.name,pt)},ht.install=function(t){t.component(ht.name,ht)},mt.install=function(t){t.component(mt.name,mt)},ut.install=function(t){t.component(ut.name,ut)},gt.install=function(t){t.component(gt.name,gt)};const Tr={class:"tabs-header"},ft=v({name:"cvTabsJump",props:{tabPosition:{type:String,default:"top"}},provide(){return{addChildComponents:t=>{this.childComponents.push(t)},clearChildClass:()=>{this.childComponents.map(t=>{t.className=null})}}},data:()=>({childComponents:[]}),computed:{tabPositionClass(){return this.tabPosition=="left"?"left":this.tabPosition=="right"?"right":this.tabPosition=="bottom"?"bottom":"top"}},created(){},mounted(){}},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cv-tabs-jump",n.tabPositionClass])},[e.createElementVNode("div",Tr,[e.renderSlot(t.$slots,"default")])],2)}]]),Ir={name:"cvTabPane",emits:["click"],inject:["addChildComponents","clearChildClass"],data:()=>({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")}}},Lr={key:1},Ct=v(Ir,[["render",function(t,o,a,i,l,n){return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cv-tab-pane",l.className]),onClick:o[0]||(o[0]=(...r)=>n.handleClick&&n.handleClick(...r))},[t.$slots.label?e.renderSlot(t.$slots,"label",{key:0}):(e.openBlock(),e.createElementBlock("span",Lr,e.toDisplayString(a.label),1))],2)),[[e.vShow,l.isshow]])}]]);ft.install=function(t){t.component(ft.name,ft)},Ct.install=function(t){t.component(Ct.name,Ct)};const Fr={class:"cv-draw-captcha"},$r=["width","height"],vt=v({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:()=>({localCode:""}),watch:{modelValue(t){this.localCode=t,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(t,o){for(let a=0;a<o;a++)this.localCode+=this.baseCode[this.randomNum(0,this.baseCode.length)]},randomNum:(t,o)=>Math.floor(Math.random()*(o-t)+t),randomColor(t,o){return"rgb("+this.randomNum(t,o)+","+this.randomNum(t,o)+","+this.randomNum(t,o)+")"},drawPic(){let t=document.getElementById("cv-draw-captcha").getContext("2d");t.textBaseline="bottom",t.fillStyle=this.randomColor(this.backgroundColorMin,this.backgroundColorMax),t.fillRect(0,0,this.contentWidth,this.contentHeight);for(let o=0;o<this.localCode.length;o++)this.drawText(t,this.localCode[o],o);this.drawLine(t),this.drawDot(t)},drawText(t,o,a){t.fillStyle=this.randomColor(this.colorMin,this.colorMax),t.font=this.randomNum(this.fontSizeMin,this.fontSizeMax)+"px SimHei";let i=(a+1)*(this.contentWidth/(this.localCode.length+1)),l=this.randomNum(this.fontSizeMax,this.contentHeight-5);var n=this.randomNum(-45,45);t.translate(i,l),t.rotate(n*Math.PI/180),t.fillText(o,0,0),t.rotate(-n*Math.PI/180),t.translate(-i,-l)},drawLine(t){for(let o=0;o<5;o++)t.strokeStyle=this.randomColor(this.lineColorMin,this.lineColorMax),t.beginPath(),t.moveTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),t.lineTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),t.stroke()},drawDot(t){for(let o=0;o<80;o++)t.fillStyle=this.randomColor(0,255),t.beginPath(),t.arc(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight),1,0,2*Math.PI),t.fill()}}},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",Fr,[e.createElementVNode("canvas",{id:"cv-draw-captcha",width:a.contentWidth,height:a.contentHeight,onClick:o[0]||(o[0]=(...r)=>n.refreshCode&&n.refreshCode(...r))},null,8,$r)])}]]),yt=v({name:"cvDrawQrcode",data:()=>({})},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",null,"二维码")}]]);vt.install=function(t){t.component(vt.name,vt)},yt.install=function(t){t.component(yt.name,yt)};const Or={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:t=>t>0}},watch:{modelValue(t){this._init_parse_value()},localVal(t){this._parse_last()}},data:()=>({localVal:""}),mounted(){this._init_parse_value()},methods:{_init_parse_value(){if(this.modelValue)if(typeof this.modelValue=="string"&&this.modelValue.includes(",")){const t=String(this.modelValue).split(",").map(o=>o.trim());this.localVal=ae(t)}else this.localVal=ae(this.modelValue)},_parse_last(){let t=this.localVal,o=t.join(",");this.$emit("update:modelValue",o),t.length>=this.maxlength&&this.$emit("exceed-max-length",t.length)},addTag(){this.disabled||this.localVal.length>=this.maxlength||(this.localVal.push("新标签"),this.$nextTick(()=>{let t=this.localVal.length,o=this.$refs["newTag"+(t-1)][0],a=document.createRange();a.selectNodeContents(o),window.getSelection().removeAllRanges(),window.getSelection().addRange(a),this._parse_last()}))},checkTag(t){if(this.disabled)return;let o=this.$refs[`newTag${t}`][0].innerText.trim();o.length==0?this.localVal.pop():this.localVal[t]=o,this._parse_last()},removeTag(t){this.disabled||(this.localVal.splice(t,1),this._parse_last())}}},zr={class:"cv-tag-base"},Mr=["contenteditable","onKeyup","onBlur"],Pr={key:1,class:"cv-tag-maxlength-hint"},kt=v(Or,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-tag"),c=e.resolveComponent("cv-icons");return e.openBlock(),e.createElementBlock("div",zr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.localVal,(d,p)=>(e.openBlock(),e.createBlock(r,e.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:p,onClose:h=>n.removeTag(p),disabled:a.disabled}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:"cv-tag-item",contenteditable:!a.disabled&&"plaintext-only",ref_for:!0,ref:`newTag${p}`,onKeyup:e.withKeys(h=>!a.disabled&&n.checkTag(p),["enter"]),onBlur:h=>!a.disabled&&n.checkTag(p)},e.toDisplayString(d),41,Mr)]),_:2},1040,["onClose","disabled"]))),128)),!a.disabled&&l.localVal.length<a.maxlength?(e.openBlock(),e.createBlock(c,{key:0,type:"ElIconCirclePlus",size:"20",onClick:o[0]||(o[0]=d=>n.addTag())})):e.createCommentVNode("",!0),!a.disabled&&l.localVal.length>=a.maxlength?(e.openBlock(),e.createElementBlock("span",Pr,"已达到最大数量 ("+e.toDisplayString(a.maxlength)+")",1)):e.createCommentVNode("",!0)])}]]);kt.install=function(t){t.component(kt.name,kt)};const Hr={name:"cvTransferTable",props:{modelValue:{type:[Array],default:()=>[]},showQuery:{type:Boolean,default:!1},showPagination:{type:Boolean,default:!1},paginationCallBack:{type:Function,default:function(){return new Promise((t,o)=>{try{t({total:0,data:null})}catch{o()}})}},titleTexts:{type:Array,default:()=>["待选项","已选项"]},buttonTexts:{type:Array,default:()=>[]},queryTexts:{type:Array,default:()=>["查询","筛选"]},leftColumns:{type:Array,default:()=>[]},rightColumns:{type:Array,default(){}},minHeight:{type:String,default:"300px"},maxHeight:{type:String,default:"500px"},tableRowKey:{type:Function,default:t=>t&&t&&t.id}},data:()=>({leftTableData:[],rightTableData:[],pageIndex:1,pageSize:20,totalSize:0,leftSelection:[],rightSelection:[],leftQueryCondition:{},rightQueryCondition:{},rightConditionTemp:void 0}),watch:{modelValue(t){this.rightTableData=t}},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(t=>!this.rightTableData.some(o=>this.checkObjectIsEqual(t,o)))},calcRightTableData(){if(this.showQuery&&this.rightConditionTemp){const t=Object.keys(this.rightConditionTemp);return this.rightTableData.filter(o=>t.some(a=>{const i=o[a],l=this.rightConditionTemp[a].trim();return!i||String(i).indexOf(l)>-1}))}return this.rightTableData}},methods:{handleLeftSelectionChange(t){this.leftSelection=t},handleRightSelectionChange(t){this.rightSelection=t},handleLeftRowClick(t){this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))||this.$refs.leftTable.toggleRowSelection(t)},handleRightRowClick(t){this.$refs.rightTable.toggleRowSelection(t)},handleSizeChange(t){this.pageSize=t,this.handlePaginationCallBack()},handleCurrentChange(t){this.pageIndex=t,this.handlePaginationCallBack()},handlePaginationCallBack(){if(this.showPagination&&this.paginationCallBack){const t={pageIndex:this.pageIndex,pageSize:this.pageSize,...this.leftQueryCondition};this.paginationCallBack.call(null,t).then(o=>{o&&Array.isArray(o.data)&&(this.leftTableData=o.data,this.totalSize=o.total),this.$nextTick(()=>{this.leftTableData.forEach(a=>{const i=this.rightTableData.some(l=>this.checkObjectIsEqual(l,a));this.$refs.leftTable.toggleRowSelection(a,i)})})})}},handleRowStyle({row:t}){return this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))?{color:"blue"}:{}},handleSelectable(t){return!this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))},addToRight(){for(const t of this.leftSelection)this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))||this.rightTableData.push(t);this.$emit("update:modelValue",this.rightTableData)},addToLeft(){this.rightSelection.forEach(t=>{const o=this.rightTableData.findIndex(a=>this.checkObjectIsEqual(a,t));if(o!==-1){this.rightTableData.splice(o,1);const a=this.leftTableData.find(i=>this.checkObjectIsEqual(i,t));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(t,o){return this.tableRowKey(t)===this.tableRowKey(o)},clear(){this.rightTableData=[],this.$refs.leftTable.clearSelection();for(const t in this.leftQueryCondition)this.leftQueryCondition[t]=void 0;for(const t in this.rightQueryCondition)this.rightQueryCondition[t]=void 0;this.pageIndex=1,this.handlePaginationCallBack()}}},Ar={class:"cv-transfer-table"},jr={class:"transfer-panel"},Rr={class:"transfer-panel-header"},Ur={key:0},Wr={style:{padding:"5px"}},Yr={class:"transfer-buttons"},qr={key:0,class:"button-text"},Xr={key:0,class:"button-text"},Kr={class:"transfer-panel"},Gr={class:"transfer-panel-header"},Zr={key:0},Qr={style:{padding:"5px"}},bt=v(Hr,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-button"),c=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-form"),p=e.resolveComponent("el-table-column"),h=e.resolveComponent("el-table"),u=e.resolveComponent("el-pagination"),m=e.resolveComponent("cv-icons");return e.openBlock(),e.createElementBlock("div",Ar,[e.createElementVNode("div",jr,[e.createElementVNode("p",Rr,[e.createElementVNode("span",null,e.toDisplayString(a.titleTexts&&a.titleTexts[0]),1),e.createElementVNode("span",null,e.toDisplayString(l.leftSelection.length)+"/"+e.toDisplayString(l.leftTableData.length),1)]),a.showQuery?(e.openBlock(),e.createElementBlock("div",Ur,[e.createVNode(d,{inline:!0,model:l.leftQueryCondition,class:"cv-transfer-form"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"leftCondition",{scope:l.leftQueryCondition}),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(r,{type:"primary",onClick:o[0]||(o[0]=f=>n.onLeftQuerySubmit())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.queryTexts[0]),1)]),_:1})]),_:1})]),_:3},8,["model"])])):e.createCommentVNode("",!0),e.createVNode(h,{ref:"leftTable","max-height":a.maxHeight,height:a.minHeight,data:l.leftTableData,"row-key":a.tableRowKey,"row-style":n.handleRowStyle,onRowClick:n.handleLeftRowClick,onSelectionChange:n.handleLeftSelectionChange,border:"",stripe:""},{default:e.withCtx(()=>[e.createVNode(p,{width:"40px",type:"selection",selectable:n.handleSelectable},null,8,["selectable"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.leftColumns,f=>(e.openBlock(),e.createBlock(p,{prop:f.id,key:f.id,label:f.label,width:f.width},{default:e.withCtx(C=>[e.renderSlot(t.$slots,"default",{scope:{row:C.row,col:f}},()=>[e.createElementVNode("span",null,e.toDisplayString(C.row[f.id]),1)])]),_:2},1032,["prop","label","width"]))),128))]),_:3},8,["max-height","height","data","row-key","row-style","onRowClick","onSelectionChange"]),e.createElementVNode("div",Wr,[a.showPagination?(e.openBlock(),e.createBlock(u,{key:0,onSizeChange:n.handleSizeChange,onCurrentChange:n.handleCurrentChange,"current-page":l.pageIndex,"page-sizes":[10,20,50,100],"page-size":l.pageSize,"pager-count":5,total:l.totalSize,layout:"total, sizes, prev, pager, next"},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Yr,[e.createVNode(r,{type:"primary",class:e.normalizeClass(n.buttonClasses),disabled:n.disabledLeftButton,onClick:n.addToRight},{default:e.withCtx(()=>[a.buttonTexts[0]!==void 0?(e.openBlock(),e.createElementBlock("span",qr,e.toDisplayString(a.buttonTexts[0]),1)):e.createCommentVNode("",!0),e.createVNode(m,{type:"ElIconArrowRight"})]),_:1},8,["class","disabled","onClick"]),e.createVNode(r,{type:"primary",class:e.normalizeClass(n.buttonClasses),disabled:l.rightSelection.length===0,onClick:n.addToLeft},{default:e.withCtx(()=>[e.createVNode(m,{type:"ElIconArrowLeft"}),a.buttonTexts[1]!==void 0?(e.openBlock(),e.createElementBlock("span",Xr,e.toDisplayString(a.buttonTexts[1]),1)):e.createCommentVNode("",!0)]),_:1},8,["class","disabled","onClick"])]),e.createElementVNode("div",Kr,[e.createElementVNode("p",Gr,[e.createElementVNode("span",null,e.toDisplayString(a.titleTexts&&a.titleTexts[1]),1),e.createElementVNode("span",null,e.toDisplayString(l.rightSelection.length)+"/"+e.toDisplayString(l.rightTableData.length),1)]),a.showQuery?(e.openBlock(),e.createElementBlock("div",Zr,[e.createVNode(d,{inline:!0,model:l.rightQueryCondition,class:"cv-transfer-form"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"rightCondition",{scope:l.rightQueryCondition}),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(r,{type:"primary",onClick:o[1]||(o[1]=f=>n.onRightQuerySubmit())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.queryTexts[1]),1)]),_:1})]),_:1})]),_:3},8,["model"])])):e.createCommentVNode("",!0),e.createVNode(h,{ref:"rightTable","max-height":a.maxHeight,height:a.minHeight,data:n.calcRightTableData,"row-key":a.tableRowKey,onRowClick:n.handleRightRowClick,onSelectionChange:n.handleRightSelectionChange,border:"",stripe:""},{default:e.withCtx(()=>[e.createVNode(p,{width:"40px",type:"selection"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.rightColumns||a.leftColumns,f=>(e.openBlock(),e.createBlock(p,{prop:f.id,key:f.id,label:f.label,width:f.width},{default:e.withCtx(C=>[e.renderSlot(t.$slots,"default",{scope:{row:C.row,col:f}},()=>[e.createElementVNode("span",null,e.toDisplayString(C.row[f.id]),1)])]),_:2},1032,["prop","label","width"]))),128))]),_:3},8,["max-height","height","data","row-key","onRowClick","onSelectionChange"]),e.createElementVNode("div",Qr,[a.showPagination?(e.openBlock(),e.createBlock(u,{key:0,total:l.rightTableData.length,layout:"total"},null,8,["total"])):e.createCommentVNode("",!0)])])])}]]);bt.install=function(t){t.component(bt.name,bt)};const Go={provide(){return{pageCurr:this.loadConfigSetting.pageCurr||1,pageLimit:this.loadConfigSetting.pageLimit||10}},props:{...k.ElTable.props,modelValue:{type:[Array,Object],default:()=>[]},headerCellStyle:{type:[Function,Object],default:()=>({})}},data:()=>({loadDataList:[]}),watch:{modelValue(t){this.loadDataList=t},loadDataList(t){this.$emit("update:modelValue",t)}},created(){this.loadDataList=this.modelValue},methods:{_getPageCurr(){return this.loadPageCurr},_getPageSize(){return this.loadPageLimit},handleCurrentChange(t){this.loadPageCurr=t,this.getData()},handleSizeChange(t){this.loadPageLimit=t,this.getData()}}},Jr={name:"cvTableBase",mixins:[oo,Go],props:{align:{type:String,default:"left"},showPagebreak:{type:[Boolean,String],default:!0},tablePagin:{type:Object,default:()=>({})},tableConfig:{type:Object,default:()=>({})},tableRefresh:{type:Number,default:()=>0}},data:()=>({paginationGroup:[10,20,30,50,100,200],paginationCount:7,searchData:{},tableConfDef:{}}),watch:{tableRefresh(t,o){this.initConfAll(),this.refresh()}},updated(){},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(t){this.$emit("selection-change",t)},initConfAll(){let t={};Object.assign(t,this.loadConfigDef,this.tableConfDef,this.tableConfig),this.loadPageCurr=t.pageCurr||1,this.loadPageLimit=t.pageLimit||this.paginationGroup[0],Object.assign(t.where,this.searchData),this.loadConfigSetting=t},searchSubmit(t){this.searchData=t||{},this.loadConfigSetting.isSkip?this.searchData:(this.page=1,this.getData())},searchReset(t){this.searchData={},this.page=1,this.getData()},refresh(t){this.getData()}}},es={class:"cv-table-list"},ts={key:0,class:"cv-tablie-list-page page"},wt=v(Jr,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table"),c=e.resolveComponent("cv-icons"),d=e.resolveComponent("el-button"),p=e.resolveComponent("el-pagination"),h=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",es,[e.withDirectives((e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{data:t.loadDataList,style:{width:"100%"},onSelectionChange:n.handleSelectionChange}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["data","onSelectionChange"])),[[h,t.loadDataLoading]]),a.showPagebreak?e.withDirectives((e.openBlock(),e.createElementBlock("div",ts,[e.createVNode(d,{onClick:n.refresh,style:{float:"left",margin:"0 10px 0 0",padding:"5px 10px"}},{default:e.withCtx(()=>[e.createVNode(c,{type:"ElIconRefresh",size:"14"})]),_:1},8,["onClick"]),e.createVNode(p,{background:"",onSizeChange:t.handleSizeChange,onCurrentChange:t.handleCurrentChange,"pager-count":l.paginationCount,"page-sizes":l.paginationGroup,"current-page":t.loadPageCurr,"page-size":t.loadPageLimit,layout:"total, sizes, prev, pager, next, jumper",total:t.loadDataTotal},null,8,["onSizeChange","onCurrentChange","pager-count","page-sizes","current-page","page-size","total"])],512)),[[e.vShow,t.loadDataLoading===!1]]):e.createCommentVNode("",!0)])}]]),os={class:"cv-table-tree"},Vt=v({name:"cvTableTree",mixins:[oo,Go],props:{tableConfig:{type:Object,default:()=>({})},tableRefresh:{type:Number,default:()=>0}},data:()=>({searchData:{},tableConfDef:{tablePrimary:"",childName:"children"},pager_count:7,page:1}),watch:{tableRefresh(t,o){this.refresh()}},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(t){this.$emit("selection-change",t)},initConfAll(){let t={};Object.assign(t,this.loadConfigDef,this.tableConfDef,this.tableConfig),Object.assign(t.where,this.searchData),this.loadConfigSetting=t},searchSubmit(t){this.searchData=t||{},this.loadConfigSetting.isSkip?this.searchData:(this.page=1,this.getData())},searchReset(t){this.searchData={},this.page=1,this.getData()},refresh(t){this.getData()}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table"),c=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",os,[e.withDirectives((e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{data:t.loadDataList,style:{width:"100%"},onSelectionChange:n.handleSelectionChange,"row-key":t.loadConfigSetting.tablePrimary,"tree-props":{children:t.loadConfigSetting.childName,hasChildren:"hasChildren"}}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["data","onSelectionChange","row-key","tree-props"])),[[c,t.loadDataLoading]])])}]]),as={name:"cvTableEditor",mixins:[oo,Go],props:{border:{type:[Boolean],default:!0},tableConfig:{type:[Array,Object],default:()=>({})}},data:()=>({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(t,o,a,i){switch(this.cell_click_index=t.index,this.cell_click_label=o.label,o.label){case"taskid":case"taskname":this.cell_click_index=t.index,this.cell_click_label=o.label;break;default:return}},handleChangeTData(t){}}},ls={class:"cv-table-editor"},xt=v(as,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table"),c=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",ls,[e.withDirectives((e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{data:t.loadDataList,style:{width:"100%"},"row-class-name":"cv-tbed-tr"}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["data"])),[[c,t.loadDataLoading]])])}]]),St=v({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:()=>({}),created(){},methods:{indexMethod(t){return this.continuity&&this.pageCurr&&this.pageLimit?t+1+(this.pageCurr-1)*this.pageLimit:t+1}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{type:"index",index:n.indexMethod}),null,16,["index"])}]]),Nt=v({name:"cvTbColumnCheck",props:{...k.ElTableColumn.props,fixed:{type:[String],default:"left"},align:{type:[String],default:"center"},width:{type:[String,Number],default:55}},data:()=>({}),created(){}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{type:"selection"}),null,16)}]]),ns={name:"cvTbColumnText",props:{...k.ElTableColumn.props},data:()=>({}),created(){},methods:{getContentText(t){let o=t.row[this.prop];return this.formatter&&(o=this.formatter(t.row,t.column)),o}}},is={style:{display:"contents"}},Bt=v(ns,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(c=>[e.createElementVNode("div",is,e.toDisplayString(c.row[t.prop]),1)]),_:1},16)}]]),rs={name:"cvTbColumnImg",props:{...k.ElTableColumn.props,imgWidth:{type:[String,Number],default:null},imgHeight:{type:[String,Number],default:null}},data:()=>({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(t){let o=t[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(t){let o=t[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(t){let o=t[this.prop]||null;return o?Object.prototype.toString.call(o)==="[object Array]"?o.length:Object.prototype.toString.call(o)==="[object String]"?1:void 0:0}}},ss={key:0,class:"cv-table-column-img-mark"},cs={class:"cv-table-column-img-text"},Et=v(rs,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-image"),c=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(d=>[e.createElementVNode("div",{class:"cv-table-column-img-box",style:e.normalizeStyle({width:l.localImgWidth,height:l.localImgHeight})},[e.createVNode(r,{style:e.normalizeStyle({width:l.localImgWidth,height:l.localImgHeight}),fit:"scale-down",lazy:"",src:n.handleImgOne(d.row),"preview-src-list":n.handleImgArr(d.row),"preview-teleported":!0},{error:e.withCtx(()=>[...o[0]||(o[0]=[e.createElementVNode("span",{class:"el-image__error cv-table-column-img-err"},[e.createTextVNode(" 暂无 "),e.createElementVNode("br"),e.createTextVNode(" 图片 ")],-1)])]),_:1},8,["style","src","preview-src-list"]),n.handleImgLeng(d.row)>1?(e.openBlock(),e.createElementBlock("p",ss,[e.createElementVNode("span",cs,e.toDisplayString(n.handleImgLeng(d.row))+"张",1)])):e.createCommentVNode("",!0)],4)]),_:1},16)}]]),Dt=v({name:"cvTbColumnOpt",props:{...k.ElTableColumn.props,fixed:{type:[String],default:"right"},label:{type:[String],default:"操作"}},data:()=>({}),created(){}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(c=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({row:c.row,$index:c.$index,scope:c})))]),_:3},16)}]]),_t=v({name:"cvTbColumnBase",props:{...k.ElTableColumn.props,width:{type:[String,Number],default:""}},data:()=>({}),created(){}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(c=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({row:c.row,$index:c.$index,scope:c})))]),_:3},16)}]]),Tt=v({name:"cvTbColumnExpand",props:{...k.ElTableColumn.props},data:()=>({}),created(){}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{type:"expand"}),{default:e.withCtx(c=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({row:c.row,$index:c.$index,props:c})))]),_:3},16)}]]),It=v({name:"cvTbColumnEnum",props:{...k.ElTableColumn.props,dataLists:{type:[Object,Array],default:()=>({})}},data:()=>({}),created(){},methods:{dealTypeEnum(t){let o=Object.keys(this.dataLists);return t[this.prop]?this.dataLists[t[this.prop]]||"":this.dataLists[o[0]]||""}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(c=>[e.createElementVNode("span",null,e.toDisplayString(n.dealTypeEnum(c.row)),1)]),_:1},16)}]]),ds={name:"cvTbEditSearch",props:{...k.ElTableColumn.props,modelValue:{type:[String],default:""},align:{type:[String],default:"left"}},data:()=>({isEditIndex:null,localVal:"",autocompleteAttr:{debounce:0},searchSett:{searchFunc:null,searchParam:{},searchMockData:null,searchField:{}},searchResList:[],searchCurrClass:"",searchCurrTbIndex:0,searchIsSelect:!1}),watch:{modelValue(t){},localVal(t){this.$emit("update:modelValue",t)}},directives:{edfocus:{mounted:t=>{}}},created(){},methods:{searchEdit(t,o){this.isEditIndex=o,this.$nextTick(()=>{this.$refs[`cv-tbce-autocomplete${o}`].focus()})},searchSave(t,o){this.isEditIndex=null},searchSelect(t,o,a){this.searchIsSelect=!0,this.localTableData[a]=Object.assign(this.localTableData[a],t),this.localTableData[a].row_num=1,t.row_attr?this.localTableData[a].row_name=t.row_name+`<br><span class="cv-tbce-showtext-attr">[ ${t.row_attr} ]</span>`:this.localTableData[a].row_name=t.row_name},searchFocus(t,o){this.searchCurrClass="cvtegac"+t,this.searchCurrTbIndex=t},searchBlur(t,o){this.searchIsSelect||(this.isEditIndex=null)},searchQuery(t,o){this.searchIsSelect=!1,this.searchResList=[];const a=this.searchSett;if(a.searchMockData!=null&&a.searchMockData){if(!(typeof a.searchMockData!="Array"&&typeof a.searchMockData!="object")){const i=this.sortOutData(a.searchMockData);this.tableData=i,this.$message({message:i.msg||"",type:"warning",duration:1300})}this.$nextTick(()=>{this.tableLoading=!1})}else a.searchFunc&&typeof a.searchFunc=="function"&&a.searchFunc({page:1,pagesize:20,keyword:t,...a.searchParam}).then(i=>{this.searchResList=[...i.data],this.searchParseData(t,o)})},searchParseData(t,o){var a=[],i=[];const l=this.searchSett;if(this.searchResList.length>0){for(let n in this.searchResList){let r=this.searchResList[n];const c=l.searchField.row_price;r.row_price=r[c];const d=l.searchField.row_stock;r.row_stock=r[d];const p=l.searchField.row_attr;r.row_attr=r[p];const h=l.searchField.row_name;r.row_name=r[h];const u=l.searchField.row_unit;r.row_unit=r[u];const m=l.searchField.row_id;r.row_id=r[m],r.value=r.row_name,i.push(r)}a=i}clearTimeout(this.timeout),this.timeout=setTimeout(()=>{o(a)},600)},inputSearchFilter:t=>o=>o.value.toLowerCase().indexOf(t.toLowerCase())===0,searchIconClick(){this.isEditIndex=null}}},ps={class:"name"},hs={class:"addr"},ms={class:"addr"},us={class:"droplist-item"},gs={class:"name"},fs={key:0,class:"attr"},Cs={class:"price"},vs={class:"rest"},ys=["onClick"],Lt=v(ds,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("ElIconCircleClose"),c=e.resolveComponent("el-icon"),d=e.resolveComponent("el-autocomplete"),p=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(p,e.mergeProps(t.$props,{"class-name":"cv-table-editor-search-column"}),{default:e.withCtx(h=>[l.isEditIndex==h.$index?(e.openBlock(),e.createBlock(d,e.mergeProps({key:0,ref:`cv-tbce-autocomplete${h.$index}`},l.autocompleteAttr,{modelValue:h.row[t.prop],"onUpdate:modelValue":u=>h.row[t.prop]=u,"popper-class":`cv-tbce-autocomplete cvtegac${h.$index}`,"fetch-suggestions":n.searchQuery,onSelect:u=>n.searchSelect(u,h.row,h.$index),onFocus:u=>n.searchFocus(h.$index,u),onBlur:u=>n.searchBlur(h.row,h.$index)}),{suffix:e.withCtx(()=>[e.createVNode(c,{onClick:u=>n.searchIconClick(h.row,h.$index)},{default:e.withCtx(()=>[e.createVNode(r)]),_:1},8,["onClick"])]),default:e.withCtx(({item:u})=>[e.renderSlot(t.$slots,"default",{item:u},()=>[e.createElementVNode("div",ps,e.toDisplayString(u.row_name),1),e.createElementVNode("span",hs,"价格:"+e.toDisplayString(u.row_price),1),e.createElementVNode("span",ms,e.toDisplayString(u.row_rest),1),e.createElementVNode("div",us,[e.createElementVNode("div",gs,[e.createTextVNode(e.toDisplayString(u.row_name)+" ",1),u.row_attr?(e.openBlock(),e.createElementBlock("div",fs,"[ "+e.toDisplayString(u.row_attr)+"]",1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Cs,"¥ "+e.toDisplayString(u.row_price),1),e.createElementVNode("div",vs,e.toDisplayString(u.attr_stock),1)])])]),_:2},1040,["modelValue","onUpdate:modelValue","popper-class","fetch-suggestions","onSelect","onFocus","onBlur"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:"showtext",onClick:u=>n.searchEdit(h.row,h.$index)},e.toDisplayString(h.row[t.prop]),9,ys))]),_:3},16)}]]),Ft=v({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:()=>({localTbData:[]}),watch:{tableData(t){this.localTbData=t}},created(){this.localTbData=this.tableData},methods:{optHdDelete(t,o){this.localTbData.splice(t,1),this.localTbData.length<1&&this.optHdAdd()},optHdAdd(){this.localTbData.push({})}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("cv-icons"),c=e.resolveComponent("el-button"),d=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(d,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(p=>[a.btnAdd?(e.openBlock(),e.createBlock(c,{key:0,plain:"",style:{padding:"5px",width:"26px",height:"26px"},onClick:o[0]||(o[0]=h=>n.optHdAdd())},{default:e.withCtx(()=>[e.createVNode(r,{type:"ElIconPlus"})]),_:1})):e.createCommentVNode("",!0),a.btnDel?(e.openBlock(),e.createBlock(c,{key:1,plain:"",style:{padding:"5px",width:"26px",height:"26px"},onClick:h=>n.optHdDelete(p.$index,p.row)},{default:e.withCtx(()=>[e.createVNode(r,{type:"ElIconClose"})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:1},16)}]]),ks={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:()=>({currValue:"",isEditIndex:null,isErrIndex:[]}),directives:{edfocus:{mounted:t=>{t.querySelector("input").focus()},inserted:function(t){t.querySelector("input").focus()}}},created(){},methods:{textIsError(t){return this.isErrIndex&&this.isErrIndex[t]&&this.isErrIndex[t][this.prop]},textHdEdit(t,o){this.isEditIndex=o},textHdClear(t,o){},textHdSave(t,o){this.isEditIndex=null;let a=t[this.prop];if(this.toFixed!=""){let i=parseInt(this.toFixed);isNaN(a)||(t[this.prop]=parseFloat(a).toFixed(i))}else t[this.prop]=a}},render22(t,o){let a=this;return t("el-table-column",{props:{...this.$props},scopedSlots:{default:i=>{this.currValue=i.row[this.prop];let l=i.$index;return this.isEditIndex==l?t("el-input",{props:{style:this.editStyle,class:this.editClass},domProps:{value:this.currValue},props:{placeholder:this.placeholder,value:this.param},nativeOn:{keyup:n=>{n.keyCode===13&&(this.$emit("update:param",n.target.value),this.callback&&this.callback())}},on:{blur:n=>{this.$emit("update:param",n.target.value),this.callback&&this.callback()},input:function(n){a.currValue=n||n.target.value},blur:n=>{this.isEditIndex=null,a.currValue=n||n.target.value}}},this.currValue):t("span",{class:{showtext:!0},on:{click:()=>{this.isEditIndex=l}}},this.currValue)}}})}},bs=["onClick"],$t=v(ks,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input"),c=e.resolveComponent("el-table-column"),d=e.resolveDirective("edfocus");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{"class-name":"cv-table-editor-text-column"}),{default:e.withCtx(p=>[l.isEditIndex!=p.$index||a.editAttr.disabled?(e.openBlock(),e.createElementBlock("span",{key:1,class:"showtext",onClick:h=>n.textHdEdit(p.row,p.$index)},e.toDisplayString(p.row[t.prop]),9,bs)):e.withDirectives((e.openBlock(),e.createBlock(r,e.mergeProps({key:0},a.editAttr,{clearable:a.editClearable,style:a.editStyle,class:a.editClass,modelValue:p.row[t.prop],"onUpdate:modelValue":h=>p.row[t.prop]=h,onBlur:e.withModifiers(h=>n.textHdSave(p.row,p.$index),["prevent"]),onClear:h=>n.textHdClear(p.row,p.$index)}),null,16,["clearable","style","class","modelValue","onUpdate:modelValue","onBlur","onClear"])),[[d]])]),_:1},16)}]]),Ot=v({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:()=>({}),created(){}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-radio"),c=e.resolveComponent("el-radio-group"),d=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(d,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(p=>[e.createVNode(c,e.mergeProps({style:a.editStyle,class:a.editClass,modelValue:p.row[t.prop],"onUpdate:modelValue":h=>p.row[t.prop]=h},a.editAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataLists,(h,u)=>(e.openBlock(),e.createBlock(r,{key:u,label:h[a.dataField.label],value:h[a.dataField.value]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h[a.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:1},16,["style","class","modelValue","onUpdate:modelValue"])]),_:1},16)}]]),zt=v({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:()=>({localVal:[]}),created(){},methods:{handleParseValue(t){this.localVal=[]}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-checkbox"),c=e.resolveComponent("el-checkbox-group"),d=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(d,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(p=>[p.row[t.prop]?(e.openBlock(),e.createBlock(c,e.mergeProps({key:0,style:a.editStyle,class:a.editClass,modelValue:p.row[t.prop],"onUpdate:modelValue":h=>p.row[t.prop]=h},a.editAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataLists,(h,u)=>(e.openBlock(),e.createBlock(r,{key:u,label:h[a.dataField.label],value:h[a.dataField.value]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h[a.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:1},16,["style","class","modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:1},16)}]]),Mt=v({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:()=>({}),created(){}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-option"),c=e.resolveComponent("el-select"),d=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(d,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(p=>[e.createVNode(c,e.mergeProps({style:a.editStyle,class:a.editClass,modelValue:p.row[t.prop],"onUpdate:modelValue":h=>p.row[t.prop]=h},a.editAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataLists,(h,u)=>(e.openBlock(),e.createBlock(r,{key:u,label:h[a.dataField.label],value:h[a.dataField.value]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h[a.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:1},16,["style","class","modelValue","onUpdate:modelValue"])]),_:1},16)}]]);wt.install=function(t){t.component(wt.name,wt)},Vt.install=function(t){t.component(Vt.name,Vt)},xt.install=function(t){t.component(xt.name,xt)},St.install=function(t){t.component(St.name,St)},Nt.install=function(t){t.component(Nt.name,Nt)},Bt.install=function(t){t.component(Bt.name,Bt)},Et.install=function(t){t.component(Et.name,Et)},Dt.install=function(t){t.component(Dt.name,Dt)},_t.install=function(t){t.component(_t.name,_t)},Tt.install=function(t){t.component(Tt.name,Tt)},It.install=function(t){t.component(It.name,It)},Lt.install=function(t){t.component(Lt.name,Lt)},Ft.install=function(t){t.component(Ft.name,Ft)},$t.install=function(t){t.component($t.name,$t)},Ot.install=function(t){t.component(Ot.name,Ot)},zt.install=function(t){t.component(zt.name,zt)},Mt.install=function(t){t.component(Mt.name,Mt)};const ws={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Vs=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",ws,[...o[0]||(o[0]=[e.createElementVNode("rect",{width:"12",height:"12",rx:"2",fill:"#86909C"},null,-1),e.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)])])}]]),xs={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},Ss=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",xs,[...o[0]||(o[0]=[e.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)])])}]]),Ns={class:"comment-common-icon"},Bs=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Ns,[...o[0]||(o[0]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},[e.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)])])}]]),Es={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},Ds=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",Es,[...o[0]||(o[0]=[e.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)])])}]]),_s={class:"comment-common-icon"},Ts=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",_s,[...o[0]||(o[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.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)])])}]]),Is={class:"comment-common-icon",style:{color:"#1e80ff"}},Ls=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Is,[...o[0]||(o[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1534"},[e.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)])])}]]),Fs={class:"comment-common-icon"},$s=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Fs,[...o[0]||(o[0]=[e.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"},[e.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)])])}]]),Os={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},zs=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",Os,[...o[0]||(o[0]=[e.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)])])}]]),Ms={class:"comment-common-icon"},Ps=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Ms,[...o[0]||(o[0]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},[e.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)])])}]]),Hs={class:"comment-common-icon"},As=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Hs,[...o[0]||(o[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1320",width:"200",height:"200"},[e.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)])])}]]),js={class:"cv-comment-emoji"},Rs={class:"face-tooltip-head select-none"},Us=["onClick"],Ws=["src"],Ys={class:"emoji-body select-none"},qs={style:{padding:"0 5px"}},Xs=["onClick"],Ks={class:"emoji-btn select-none"},Gs={key:0},Zs=v(Object.assign({name:"CompInputEmoji"},{__name:"input-emoji",props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:"bottom"},emits:["addEmoji"],setup(t,{emit:o}){const a=t,i=e.ref(0),l=e.ref(0),n=e.ref(new Array(2)),{emojiList:r,faceList:c}=a.emoji;function d(){n.value[0]=r[0]}return(p,h)=>(e.openBlock(),e.createElementBlock("div",js,[e.createVNode(e.unref(k.ElPopover),{placement:t.placement,"popper-class":"emoji-popover",width:250,trigger:"click",onBeforeEnter:d},{reference:e.withCtx(()=>[e.createElementVNode("div",Ks,[p.$slots.default?e.renderSlot(p.$slots,"default",{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",Gs,[e.createVNode(e.unref(Ss)),h[0]||(h[0]=e.createElementVNode("span",null,"表情",-1))]))])]),default:e.withCtx(()=>[e.createElementVNode("div",Rs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(u,m)=>(e.openBlock(),e.createElementBlock("label",{key:m,class:e.normalizeClass(i.value==m?"active":""),onClick:f=>(function(C){switch(i.value=C,C){case 0:l.value=0;break;case 1:l.value=-50,n.value[1]=r[1]}})(m)},[e.createElementVNode("img",{src:u,alt:""},null,8,Ws)],10,Us))),128))]),e.createElementVNode("div",Ys,[e.createElementVNode("div",{class:"emjio-container",style:e.normalizeStyle({transform:`translateX(${l.value}%)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(u,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"emoji-wrapper"},[e.createVNode(e.unref(k.ElScrollbar),null,{default:e.withCtx(()=>[e.createElementVNode("div",qs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u,(f,C)=>(e.openBlock(),e.createElementBlock("span",{key:C,class:"emoji-item",onClick:g=>p.$emit("addEmoji",C)},[e.createVNode(e.unref(k.ElImage),{src:f,title:String(C),class:"emoji",style:{width:"24px",height:"24px",margin:"5px"},lazy:""},null,8,["src","title"])],8,Xs))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,["placement"])]))}}),[["__scopeId","data-v-2fb59975"]]),Qs={class:"cv-comment-editor"},Js=["placeholder","innerHTML"],ec=["src"],tc=["onClick"],oc={key:0,class:"cv-comment-editor__action"},ac={__name:"input-box",props:{placeholder:"",contentBtn:"",parentId:"",reply:""},emits:["hide","close"],setup(t,{expose:o,emit:a}){const i=t,l=e.ref(""),n=e.ref(),r=e.ref(!1),c=e.ref(!1),d=e.ref(),p=e.ref(!0),h=e.ref(),u=e.ref(),m=e.ref([]),f=e.ref([]),C=e.reactive({imgLength:0}),g=64,y=e.ref(),b=e.ref(!1),w=e.ref(),V=e.computed(()=>g+"px"),N=e.computed(()=>"8px 12px"),E=a,{upload:L,submit:q,focus:G}=e.inject("InjectInputBox"),le=e.inject("InjectionEmojiApi");function oa(){q({content:i.reply?`回复 <span style="color: var(--cv-color-success-dark-2);">@${i.reply.user.username}:</span> ${l.value}`:l.value,parentId:oe(i.parentId,null),reply:i.reply,files:f.value,clear:()=>{d.value&&(d.value.innerHTML="",l.value=d.value.innerHTML,r.value=!1),m.value.length=0,f.value=[],p.value=!0,E("close")}})}function on(D){ee(l.value)&&!C.imgLength&&(c.value=!1,E("hide",D))}function an(D){b.value=!0,r.value=!0,c.value=!0,e.nextTick(()=>{h.value=document.querySelector("div[id^='el-popper-container']")}),G()}function ln(D){y.value=window.getSelection()?.getRangeAt(0),d.value?.innerHTML||(r.value=!1),b.value=!1}function nn(D){const{innerHTML:S}=D?.target||D;l.value=S||"",ee(l.value.replace(/&nbsp;|<br>| /g,""))?p.value=!0:p.value=!1}function aa(){e.nextTick(()=>{d.value?.focus()})}function rn(D){D.ctrlKey&&D.key=="Enter"&&(ee(l.value.replace(/&nbsp;|<br>| /g,""))?k.ElMessage({message:"内容不能为空",type:"info"}):oa())}function sn(D){m.value.length=0,f.value.length=0;const S=u.value?.files;if(C.imgLength=oe(S?.length,0),S)for(let _=0;_<S.length;_++){let Z=S[_].name,X=ai(S[_]);f.value.push(S[_]),oi(Z)?m.value.push(X):k.ElMessage({type:"warn",message:"请选择图片类型文件!",duration:2500})}}return e.watch(()=>l.value,D=>{b.value||(n.value=D)}),e.onMounted(()=>{d.value?.addEventListener("keyup",D=>{const S=D.target;S.innerHTML=="<br>"&&(S.innerHTML="")})}),o({focus:()=>aa()}),(D,S)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",Qs,[e.createElementVNode("div",{class:e.normalizeClass(["cv-comment-editor__box",{active:r.value,"input-active":c.value}])},[e.createElementVNode("div",{ref_key:"editorRef",ref:d,class:"rich-input",contenteditable:"true",placeholder:i.placeholder,onFocus:an,onInput:nn,onBlur:ln,onKeydown:e.withKeys(rn,["enter"]),innerHTML:n.value,style:e.normalizeStyle({minHeight:V.value,padding:N.value})},null,44,Js),e.createElementVNode("div",{ref_key:"imageRef",ref:w,class:"image-preview-box"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(_,Z)=>(e.openBlock(),e.createElementBlock("div",{key:Z,class:"image-preview"},[e.createElementVNode("img",{src:_,alt:""},null,8,ec),e.createElementVNode("div",{class:"clean-btn",onClick:X=>{return la=Z,void m?.value?.splice(la,1);var la}},[e.createVNode(e.unref(Vs))],8,tc)]))),128))],512)],2),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",oc,[e.createElementVNode("div",null,[e.createVNode(Zs,{emoji:e.unref(le),onAddEmoji:S[0]||(S[0]=_=>(function(Z){let X=window.getSelection();X&&(X.removeAllRanges(),y.value||(aa(),y.value=X.getRangeAt(0)),y.value.deleteContents(),y.value.insertNode(y.value.createContextualFragment(Z)),y.value.collapse(!1),X.addRange(y.value),l.value=d?.value?.innerHTML||"",ee(l.value.replace(/&nbsp;|<br>| /g,""))?p.value=!0:p.value=!1)})(_))},null,8,["emoji"]),e.createElementVNode("div",{class:"picture",onClick:S[1]||(S[1]=(..._)=>u.value?.click&&u.value?.click(..._))},[e.createVNode(e.unref(Ds)),S[2]||(S[2]=e.createElementVNode("span",null,"图片",-1)),e.createElementVNode("input",{id:"comment-upload",ref_key:"inputRef",ref:u,type:"file",multiple:"",onChange:sn},null,544)])]),e.createElementVNode("div",null,[S[3]||(S[3]=e.createElementVNode("span",{style:{"margin-right":"10px"}},[e.createTextVNode(" 文明上网理性发言,请遵守 "),e.createElementVNode("a",{href:"###",target:"_blank"},"《新闻评论服务协议》")],-1)),e.createVNode(e.unref(k.ElButton),{type:"primary",disabled:p.value,onClick:oa},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.contentBtn),1)]),_:1},8,["disabled"])])])):e.createCommentVNode("",!0)]),_:1})])),[[e.unref(k.ClickOutside),on,h.value]])}},Rl=v(ac,[["__scopeId","data-v-e3fd437e"]]),lc={class:"u-fold"},nc={class:"action-box select-none"},ic=v(Object.assign({name:"UFold"},{__name:"fold",props:{line:{type:[Number,String],default:5}},setup(t){e.useCssVars(c=>({v15491e60:a.value}));const o=t,a=e.computed(()=>{let c=Math.trunc(Number(o.line));return c>0?c:1}),i=e.ref(!0),l=e.ref(!1),n=e.ref();let r;return e.onMounted(()=>{r=new ResizeObserver(c=>{i.value&&n.value&&(l.value=n.value.offsetHeight<n.value.scrollHeight)}),r.observe(n.value)}),e.onUnmounted(()=>{r.disconnect()}),(c,d)=>(e.openBlock(),e.createElementBlock("div",lc,[e.createElementVNode("div",{class:e.normalizeClass(["txt-box",{"over-hidden":i.value}])},[e.createElementVNode("div",{ref_key:"divBox",ref:n},[e.renderSlot(c.$slots,"default",{},void 0,!0)],512)],2),e.createElementVNode("div",nc,[l.value&&c.unfold?(e.openBlock(),e.createElementBlock("div",{key:0,class:"expand-btn",onClick:d[0]||(d[0]=p=>i.value=!i.value)},e.toDisplayString(i.value?"展开":"收起"),1)):e.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-94334818"]]),ma={__name:"user-card",props:{uid:""},setup(t){const o=e.ref({}),{showInfo:a}=e.inject("InjectContentBox"),i=e.inject("InjectSlots"),l=()=>e.h("div",i.card(o.value));return(n,r)=>e.unref(i).card?(e.openBlock(),e.createBlock(e.unref(k.ElPopover),{key:0,placement:"top",width:300,"show-after":300,onBeforeEnter:r[0]||(r[0]=()=>e.unref(a)(t.uid,c=>o.value=c))},{reference:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),default:e.withCtx(()=>[e.createVNode(l)]),_:3})):e.renderSlot(n.$slots,"default",{key:1})}},Zo=typeof window<"u"&&typeof document<"u";const rc=Object.prototype.toString;function co(t){return Array.isArray(t)?t:[t]}function sc(t,o,a={}){const{immediate:i=!0,immediateCallback:l=!1}=a,n=e.shallowRef(!1);let r;function c(){r&&(clearTimeout(r),r=void 0)}function d(){n.value=!1,c()}function p(...m){l&&t(),c(),n.value=!0,r=setTimeout(()=>{n.value=!1,r=void 0,t(...m)},e.toValue(o))}var h,u;return i&&(n.value=!0,Zo&&p()),h=d,e.getCurrentScope()&&e.onScopeDispose(h,u),{isPending:e.shallowReadonly(n),start:p,stop:d}}const cc=Zo?window:void 0,Ul=Zo?window.navigator:void 0;function Wl(...t){const o=e.computed(()=>{const n=co(e.toValue(t[0])).filter(r=>r!=null);return n.every(r=>typeof r!="string")?n:void 0});return a=()=>{var n,r;return[(n=(r=o.value)===null||r===void 0?void 0:r.map(c=>(function(d){var p;const h=e.toValue(d);return(p=h?.$el)!==null&&p!==void 0?p:h})(c)))!==null&&n!==void 0?n:[cc].filter(c=>c!=null),co(e.toValue(o.value?t[1]:t[0])),co(e.unref(o.value?t[2]:t[1])),e.toValue(o.value?t[3]:t[2])]},i=([n,r,c,d],p,h)=>{if(!n?.length||!r?.length||!c?.length)return;const u=(m=d,rc.call(m)==="[object Object]"?{...d}:d);var m;const f=n.flatMap(C=>r.flatMap(g=>c.map(y=>((b,w,V,N)=>(b.addEventListener(w,V,N),()=>b.removeEventListener(w,V,N)))(C,g,y,u))));h(()=>{f.forEach(C=>C())})},l={flush:"post"},e.watch(a,i,{...l,immediate:!0});var a,i,l}function Yl(t){const o=(function(){const a=e.shallowRef(!1),i=e.getCurrentInstance();return i&&e.onMounted(()=>{a.value=!0},i),a})();return e.computed(()=>(o.value,!!t()))}function ua(t,o={}){const{controls:a=!1,navigator:i=Ul}=o,l=Yl(()=>i&&"permissions"in i),n=e.shallowRef(),r=typeof t=="string"?{name:t}:t,c=e.shallowRef(),d=()=>{var h,u;c.value=(h=(u=n.value)===null||u===void 0?void 0:u.state)!==null&&h!==void 0?h:"prompt"};Wl(n,"change",d,{passive:!0});const p=(function(h){let u;function m(){return u||(u=h()),u}return m.reset=async()=>{const f=u;u=void 0,f&&await f},m})(async()=>{if(l.value){if(!n.value)try{n.value=await i.permissions.query(r)}catch{n.value=void 0}finally{d()}return a?e.toRaw(n.value):void 0}});return p(),a?{state:c,isSupported:l,query:p}:c}function dc(t={}){const{navigator:o=Ul,read:a=!1,source:i,copiedDuring:l=1500,legacy:n=!1}=t,r=Yl(()=>o&&"clipboard"in o),c=ua("clipboard-read"),d=ua("clipboard-write"),p=e.computed(()=>r.value||n),h=e.shallowRef(""),u=e.shallowRef(!1),m=sc(()=>u.value=!1,l,{immediate:!1});function f(C){return C==="granted"||C==="prompt"}return p.value&&a&&Wl(["copy","cut"],async function(){let C=!(r.value&&f(c.value));if(!C)try{h.value=await o.clipboard.readText()}catch{C=!0}var g,y,b;C&&(h.value=(g=(y=document)===null||y===void 0||(b=y.getSelection)===null||b===void 0||(b=b.call(y))===null||b===void 0?void 0:b.toString())!==null&&g!==void 0?g:"")},{passive:!0}),{isSupported:p,text:e.readonly(h),copied:e.readonly(u),copy:async function(C=e.toValue(i)){if(p.value&&C!=null){let g=!(r.value&&f(d.value));if(!g)try{await o.clipboard.writeText(C)}catch{g=!0}g&&(function(y){const b=document.createElement("textarea");b.value=y,b.style.position="absolute",b.style.opacity="0",b.setAttribute("readonly",""),document.body.appendChild(b),b.select(),document.execCommand("copy"),b.remove()})(C),h.value=C,u.value=!0,m.start()}}}}const pc={class:"comment-list-actbox__right"},hc={class:"operation-warp"},mc={class:"dialog-footer"},uc={__name:"comment-operate",props:{data:{type:[Object],default:()=>({})}},setup(t){const{copy:o}=dc(),a=e.ref(!1),i=e.ref({report_type:"",report_content:""}),l=t;function n(){let r=l.data||{};a.value=!1,k.ElMessage({type:"info",message:"举报成功: "+r.id})}return(r,c)=>{const d=e.resolveComponent("el-dropdown-item"),p=e.resolveComponent("el-dropdown-menu"),h=e.resolveComponent("el-dropdown"),u=e.resolveComponent("el-radio"),m=e.resolveComponent("el-radio-group"),f=e.resolveComponent("el-form-item"),C=e.resolveComponent("el-input"),g=e.resolveComponent("el-form"),y=e.resolveComponent("el-button"),b=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",pc,[e.createVNode(h,{trigger:"click",onCommand:c[0]||(c[0]=w=>(function(V){let N=l.data||{};switch(V){case"remove":setTimeout(()=>{commentRef.value?.remove(N)},200);break;case"report":a.value=!0;break;case"copy":o(N.content),k.ElMessage({type:"info",message:"复制成功"})}})(w))},{dropdown:e.withCtx(()=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(d,{command:"report"},{default:e.withCtx(()=>[...c[5]||(c[5]=[e.createTextVNode("举报",-1)])]),_:1}),e.createVNode(d,{command:"remove"},{default:e.withCtx(()=>[...c[6]||(c[6]=[e.createTextVNode("删除",-1)])]),_:1}),e.createVNode(d,{divided:"",command:"copy"},{default:e.withCtx(()=>[...c[7]||(c[7]=[e.createTextVNode("复制",-1)])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",hc,[e.createVNode(e.unref(Ts))])]),_:1}),e.createVNode(b,{title:"举报",modelValue:a.value,"onUpdate:modelValue":c[4]||(c[4]=w=>a.value=w),width:"400px",style:{width:"90%","max-width":"400px"}},{footer:e.withCtx(()=>[e.createElementVNode("span",mc,[e.createVNode(y,{onClick:c[3]||(c[3]=w=>a.value=!1)},{default:e.withCtx(()=>[...c[13]||(c[13]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(y,{type:"primary",onClick:n},{default:e.withCtx(()=>[...c[14]||(c[14]=[e.createTextVNode("提交",-1)])]),_:1})])]),default:e.withCtx(()=>[e.createVNode(g,{"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(f,{label:"您为什么要举报此信息?"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:i.value.report_type,"onUpdate:modelValue":c[1]||(c[1]=w=>i.value.report_type=w)},{default:e.withCtx(()=>[e.createVNode(u,{value:"色情淫秽"},{default:e.withCtx(()=>[...c[8]||(c[8]=[e.createTextVNode("色情淫秽",-1)])]),_:1}),e.createVNode(u,{value:"骚扰谩骂"},{default:e.withCtx(()=>[...c[9]||(c[9]=[e.createTextVNode("骚扰谩骂",-1)])]),_:1}),e.createVNode(u,{value:"广告欺诈"},{default:e.withCtx(()=>[...c[10]||(c[10]=[e.createTextVNode("广告欺诈",-1)])]),_:1}),e.createVNode(u,{value:"反动"},{default:e.withCtx(()=>[...c[11]||(c[11]=[e.createTextVNode("反动",-1)])]),_:1}),e.createVNode(u,{value:"其他"},{default:e.withCtx(()=>[...c[12]||(c[12]=[e.createTextVNode("其他",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(f,{label:"举报说明(可选):"},{default:e.withCtx(()=>[e.createVNode(C,{type:"textarea",modelValue:i.value.report_content,"onUpdate:modelValue":c[2]||(c[2]=w=>i.value.report_content=w),maxlength:"200",placeholder:"描述恶意行为",rows:"3"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}},gc={class:"comment-sub"},fc=["href"],Cc={class:"comment-primary"},vc={class:"comment-main"},yc={key:1,class:"user-info"},kc=["href"],bc={class:"username"},wc={class:"name",style:{"max-width":"10em"}},Vc={blank:"true",class:"rank"},xc=["innerHTML"],Sc={class:"address",style:{color:"#939393","font-size":"12px"}},Nc={class:"time"},Bc={class:"content"},Ec=["innerHTML"],Dc={class:"imgbox",style:{display:"flex"}},_c={class:"comment-list-actbox select-none"},Tc={class:"comment-list-actbox__left"},Ic={key:2},Lc={class:"comment-list-actbox__right"},Fc={key:2},$c={__name:"content-box",props:{reply:{type:[Boolean],default:!1},data:{type:[Object],default:()=>({})},id:{type:[String],default:""}},setup(t){const o=t,a=e.reactive({active:!1}),i=e.ref(),l=e.ref(),n=e.computed(()=>{let y=o.data.contentImg;return ee(y)?[]:y?.split("||")}),{allEmoji:r}=e.inject("InjectionEmojiApi"),{like:c,user:d,relativeTime:p}=e.inject("InjectContentBox");function h(){a.active=!a.active,a.active&&e.nextTick(()=>{i.value?.focus()})}function u(y){const b=y.target;l.value?.contains(b)||(a.active=!1)}const m=e.inject("InjectSlots"),f=()=>e.h("div",m.info(o.data)),C=e.computed(()=>((y,b)=>b.replace(/\[.+?\]/g,w=>{const V=y[w];return V?['<img src="',V,'" width="20" height="20" alt="',w,'" title="',w,'" style="margin: 0 1px; vertical-align: text-bottom"',"/>"].join(""):w}))(r,o.data.content)),g=y=>{switch(y){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(y,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["comment",{reply:o.reply}])},[e.createElementVNode("div",gc,[e.createVNode(ma,{uid:e.unref(K)(t.data.uid)},{default:e.withCtx(()=>[e.createElementVNode("a",{href:t.data.user.homeLink,target:"_blank",class:"no-underline",style:{display:"block"}},[e.createVNode(e.unref(k.ElAvatar),{style:{"margin-top":"5px"},size:40,fit:"cover",src:t.data.user.avatar},{default:e.withCtx(()=>[...b[2]||(b[2]=[e.createElementVNode("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])]),_:1},8,["src"])],8,fc)]),_:1},8,["uid"])]),e.createElementVNode("div",Cc,[e.createElementVNode("div",vc,[e.unref(m).info?(e.openBlock(),e.createBlock(f,{key:0})):(e.openBlock(),e.createElementBlock("div",yc,[e.createVNode(ma,{uid:e.unref(K)(t.data.uid)},{default:e.withCtx(()=>[e.createElementVNode("a",{href:t.data.user.homeLink,target:"_blank",class:"no-underline",style:{display:"block"}},[e.createElementVNode("div",bc,[e.createElementVNode("span",wc,e.toDisplayString(t.data.user.username),1),e.createElementVNode("span",Vc,[e.createElementVNode("i",{class:"comment-common-icon",style:{"font-size":"24px"},innerHTML:g(t.data.user.level)},null,8,xc)])])],8,kc)]),_:1},8,["uid"]),e.createElementVNode("span",Sc,"  "+e.toDisplayString(t.data.address),1),e.createElementVNode("time",Nc,e.toDisplayString(e.unref(p)?e.unref(ti)(t.data.createTime):t.data.createTime),1)])),e.createElementVNode("div",Bc,[e.createVNode(ic,{unfold:""},{default:e.withCtx(()=>[e.createElementVNode("div",{innerHTML:C.value},null,8,Ec),e.createElementVNode("div",Dc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(w,V)=>(e.openBlock(),e.createBlock(e.unref(k.ElImage),{key:V,src:w,style:{height:"72px",padding:"8px 4px"},lazy:"","preview-src-list":n.value,"initial-index":V},null,8,["src","preview-src-list","initial-index"]))),128))])]),_:1})]),e.createElementVNode("div",_c,[e.createElementVNode("div",Tc,[e.createElementVNode("div",{"data-tip":"点赞",class:"item",onClick:b[0]||(b[0]=w=>e.unref(c)(e.unref(K)(t.data.id)))},[e.unref(d).likeIds.map(String).indexOf(e.unref(K)(t.data.id))==-1?(e.openBlock(),e.createBlock(e.unref($s),{key:0})):(e.openBlock(),e.createBlock(e.unref(Ls),{key:1})),t.data.likes!=0?(e.openBlock(),e.createElementBlock("span",Ic,e.toDisplayString(t.data.likes),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{"data-tip":"回复",ref_key:"btnRef",ref:l,class:e.normalizeClass(["item",{active:a.active}]),onClick:h},[e.createVNode(e.unref(As)),e.createElementVNode("span",null,e.toDisplayString(a.active?"取消回复":"回复"),1)],2)]),e.createElementVNode("div",Lc,[e.renderSlot(y.$slots,"operate",{},()=>[e.createVNode(uc,{data:o.data},null,8,["data"])],!0)])]),a.active?(e.openBlock(),e.createElementBlock("div",Fc,[e.createVNode(Rl,{ref_key:"commentRef",ref:i,"parent-id":e.unref(K)(t.id),placeholder:`回复 @${t.data.user.username}...`,reply:t.data,"content-btn":"发布",style:{"margin-top":"12px"},onHide:u,onClose:b[1]||(b[1]=w=>a.active=!1)},null,8,["parent-id","placeholder","reply"])])):e.createCommentVNode("",!0)]),e.renderSlot(y.$slots,"default",{},void 0,!0)])],2))}},ql=v($c,[["__scopeId","data-v-cfe79df7"]]),Oc={key:0,class:"reply-box"},zc={class:"reply-list"},Mc={key:0,class:"fetch-more"},Pc={key:0},Hc={key:1},Ac={key:0},jc={key:1,class:"fetch-more"},Rc={__name:"reply-box",props:{data:{type:[Array,Object],default:()=>null},id:{type:[String],default:""}},setup(t){const o=t,a=e.reactive({loading:!1,over:!1,pageNum:1,pageSize:5}),{replyPage:i,replyShowSize:l,comments:n,page:r}=e.inject("InjectReplyBox"),c=e.computed(()=>{let m={total:0,length:0,list:[]};if(o.data){let f=o.data.list.length;m={total:o.data.total,length:f,list:o.data.list}}if(!a.over){let f=m.list.slice(0,l);m.list=f}return r&&(m.list=m.list.slice(0,5)),m}),d=()=>{a.over=!0},p=m=>{n.value.forEach(f=>{f.id==o.id&&f.reply&&(f.reply=m)})},h=m=>{a.pageNum=m,i(o.id,m,a.pageSize,f=>p(f))},u=m=>{a.pageSize=m,i(o.id,a.pageNum,m,f=>p(f))};return(m,f)=>c.value.length>0?(e.openBlock(),e.createElementBlock("div",Oc,[e.createElementVNode("div",zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.list,(C,g)=>(e.openBlock(),e.createBlock(ql,{id:t.id,key:g,data:C,reply:""},null,8,["id","data"]))),128)),c.value.length>e.unref(l)?(e.openBlock(),e.createElementBlock("div",Mc,[a.loading?(e.openBlock(),e.createElementBlock("span",Pc,"加载中...")):(e.openBlock(),e.createElementBlock("div",Hc,[a.over?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ac,[e.createTextVNode(" 共"+e.toDisplayString(c.value.total)+"条回复, ",1),e.createElementVNode("span",{class:"fetch-more-comment select-none",onClick:d},[f[0]||(f[0]=e.createTextVNode(" 点击查看 ",-1)),e.createVNode(e.unref(zs))])]))]))])):e.createCommentVNode("",!0),a.over&&e.unref(r)?(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(e.unref(k.ElPagination),{small:"","hide-on-single-page":"",layout:"total, prev, pager, next",total:c.value.total,"page-size":a.pageSize,onCurrentChange:h,onSizeChange:u},null,8,["total","page-size"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)}},Uc=v(Rc,[["__scopeId","data-v-16e0a50b"]]),Wc={key:0,class:"comment-list"},Yc={__name:"comment-list",props:{data:{type:[Array,Object],default:()=>[]},total:{type:[Number],default:0},showSize:{type:[Number],default:0}},setup:t=>(o,a)=>t.data?(e.openBlock(),e.createElementBlock("div",Wc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,(i,l)=>(e.openBlock(),e.createBlock(ql,{id:e.unref(K)(i.id),key:l,data:i},{default:e.withCtx(()=>[e.createVNode(Uc,{id:e.unref(K)(i.id),data:i.reply},null,8,["id","data"])]),_:2},1032,["id","data"]))),128))])):e.createCommentVNode("",!0)},qc={class:"cv-comment-base"},Xc={class:"cv-comment-form"},Kc={class:"cv-comment-form__content"},Gc={class:"cv-comment-form__avatar"},Zc={class:"cv-comment-list-wrapper"},Pt=Object.assign({name:"cvCommentBase"},{__name:"comment",props:{config:{},page:!1,upload:!1,relativeTime:!1},emits:["submit","like","replyPage","showInfo","focus"],setup(t,{expose:o,emit:a}){const i=t,{user:l,comments:n,showSize:r,replyShowSize:c,total:d}=e.toRefs(i.config),p=a,h={upload:i.upload,submit:({content:m,parentId:f,reply:C,files:g,clear:y})=>{p("submit",{content:m,parentId:f,reply:C,files:g,finish:b=>{if(y(),f){let w=n.value.find(V=>V.id==f);if(w){let V=w.reply;V?(V.list.unshift(b),V.total++):w.reply={total:1,list:[b]}}}else n.value.unshift(b)}})},focus:()=>p("focus")};e.provide("InjectInputBox",h);const u=(m,f)=>{let C=null;n.value.forEach(g=>{C=g.id==m?g:g.reply?.list.find(y=>y.id==m),C&&(C.likes+=f)})};return e.provide("InjectContentBox",{user:l,like:m=>{const f=i.config.user.likeIds;p("like",m,()=>{if(f.findIndex(C=>C==m)==-1)f.push(m),u(m,1);else{let C=f.findIndex(g=>g==m);C!=-1&&(f.splice(C,1),u(m,-1))}})},relativeTime:oe(i.relativeTime,!1),showInfo:(m,f)=>p("showInfo",m,f)}),e.provide("InjectReplyBox",{page:i.page,replyPage:(m,f,C,g)=>{p("replyPage",{parentId:m,pageNum:f,pageSize:C,finish:g})},replyShowSize:oe(c,3),comments:n}),e.provide("InjectionEmojiApi",i.config.emoji),e.provide("InjectSlots",e.useSlots()),o({remove:m=>{const{parentId:f,id:C}=m;if(f){let g=n.value.find(b=>b.id==f),y=g?.reply;if(y){let b=y.list.findIndex(w=>w.id==C);b!=-1&&(y.list.splice(b,1),y.total--)}}else{let g=n.value.findIndex(y=>y.id==C);g!=-1&&n.value.splice(g,1)}}}),(m,f)=>{const C=e.resolveComponent("el-avatar");return e.openBlock(),e.createElementBlock("div",qc,[e.createElementVNode("div",Xc,[f[1]||(f[1]=e.createElementVNode("div",{class:"cv-comment-form__header"},[e.createElementVNode("span",{class:"cv-comment-form__hdtitle"},"评论")],-1)),e.createElementVNode("div",Kc,[e.createElementVNode("div",Gc,[e.createVNode(C,{size:40,src:t.config.user.avatar},{default:e.withCtx(()=>[...f[0]||(f[0]=[e.createElementVNode("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])]),_:1},8,["src"])]),e.createVNode(Rl,{placeholder:"输入评论(Enter换行,Ctrl + Enter发送)","content-btn":"发表评论"})])]),e.renderSlot(m.$slots,"default",{},()=>[f[2]||(f[2]=e.createElementVNode("div",{class:"title"},"全部评论",-1))]),e.createElementVNode("div",Zc,[e.createVNode(Yc,{data:e.unref(n),total:e.unref(d),"show-size":e.unref(oe)(e.unref(r),5)},null,8,["data","total","show-size"])])])}}}),Qc={class:"comment-scroll"},Jc=["infinite-scroll-disabled"],ed={class:"scroll-btn"},td={key:1},od={key:2},Ht=Object.assign({name:"cvCommentScroll"},{__name:"comment-scroll",props:{disable:{type:[Boolean],default:!1},show:{type:[Boolean],default:!1}},emits:["more"],setup(t,{emit:o}){const a=t,i=e.ref(!1),l=e.ref(!1),n=o,r=e.computed(()=>l.value&&a.disable),c=e.computed(()=>!l.value||i.value||r.value),d=$l(()=>{n("more"),i.value=!1},500),p=()=>{i.value=!0,d()};return(h,u)=>{const m=e.resolveComponent("el-link"),f=e.resolveDirective("infinite-scroll");return e.openBlock(),e.createElementBlock("div",Qc,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{"infinite-scroll-disabled":c.value,"infinite-scroll-distance":"2"},[e.renderSlot(h.$slots,"default"),e.createElementVNode("div",ed,[l.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,{key:0,type:"primary",underline:"never",onClick:u[0]||(u[0]=C=>l.value=!l.value)},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("加载更多",-1)])]),_:1})),i.value?(e.openBlock(),e.createElementBlock("p",td,"加载中...")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("p",od,"没有更多了")):e.createCommentVNode("",!0)])],8,Jc)),[[f,p]])])}}}),ad={class:"cv-comment-nav-wrap"},ld={class:"cv-comment-nav__sort"},At=Object.assign({name:"cvCommentNav"},{__name:"comment-nav",props:{modelValue:!1},emits:["update:modelValue","sorted"],setup(t,{emit:o}){const a=t,i=o,l=e.computed({get:()=>a.modelValue,set(n){i("update:modelValue",n),i("sorted",n)}});return(n,r)=>(e.openBlock(),e.createElementBlock("div",ad,[r[4]||(r[4]=e.createElementVNode("span",{class:"cv-comment-nav__title"},"全部评论",-1)),e.createElementVNode("div",ld,[e.createElementVNode("div",{class:e.normalizeClass(["item select-none",{active:l.value}]),onClick:r[0]||(r[0]=c=>l.value=!0)},[e.createVNode(e.unref(Ps)),r[2]||(r[2]=e.createTextVNode(" 最新 ",-1))],2),e.createElementVNode("div",{class:e.normalizeClass(["item select-none",{active:!l.value}]),onClick:r[1]||(r[1]=c=>l.value=!1)},[e.createVNode(e.unref(Bs)),r[3]||(r[3]=e.createTextVNode(" 最热 ",-1))],2)])]))}});Pt.install=function(t){t.component(Pt.name,Pt)},Ht.install=function(t){t.component(Ht.name,Ht)},At.install=function(t){t.component(At.name,At)};const nd={name:"cvIcons",props:{...k.ElIcon.prop,type:{type:[String],default:""},size:{type:[String,Number],default:12},name:{type:[String],default:""}},data:()=>({}),computed:{style(){return{fontSize:isNaN(Number(this.size))?this.size+"px":this.size,color:props.color}}},created(){},methods:{}},id={key:0,"aria-hidden":"true"},rd=["xlink:href"],jt=v(nd,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.type)))]),a.name?(e.openBlock(),e.createElementBlock("svg",id,[e.createElementVNode("use",{"xlink:href":a.name},null,8,rd)])):e.createCommentVNode("",!0)]),_:3},16)}]]),Xl={emits:["click"],props:{name:{type:String,required:!0,validator:t=>t.trim().length>0},size:{type:[Number,String],default:24},color:{type:String,default:"#333333"},hoverColor:{type:String,default:""},hoverEffect:{type:Boolean,default:!1}},data:()=>({iconType:"svg"}),computed:{maskIconUrl(){const t="https://10ui.cn/icons";let o=this.name||"",a="";if(o=o.replace(/([A-Z])/g,i=>`-${i.toLowerCase()}`),o=o.replace(/^-|-$/g,""),o=o.toLowerCase().trim(),/-filled$/.test(o)){const i=o.slice(0,o.lastIndexOf("-filled"));i?a=`${i.split("-").filter(l=>l.trim().length>0).join("/")}-filled`:a=o}else o.includes("-")?a=o.split("-").filter(i=>i.trim().length>0).join("/"):a=o;return(this.iconType?.toLowerCase()||"png")==="svg"?`${t}/${a}.svg`:`${t}/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 t={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&&(t.transition="background-color 0.2s ease"),t}}},Qo={name:"cvMaskSvg",mixins:[Xl]},ga=()=>{e.useCssVars(t=>({v2042f27c:t.hoverColor}))},fa=Qo.setup;Qo.setup=fa?(t,o)=>(ga(),fa(t,o)):ga;const Rt=v(Qo,[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",{class:"cv-mask-icon",style:e.normalizeStyle(t.iconStyle),onTap:o[0]||(o[0]=r=>t.$emit("click",r))},null,36)}],["__scopeId","data-v-590b4b89"]]),Jo={name:"cvMaskPng",mixins:[Xl],data:()=>({iconType:"png"})},Ca=()=>{e.useCssVars(t=>({v6bb780e0:t.hoverColor}))},va=Jo.setup;Jo.setup=va?(t,o)=>(Ca(),va(t,o)):Ca;const Ut=v(Jo,[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",{class:"cv-mask-icon",style:e.normalizeStyle(t.iconStyle),onTap:o[0]||(o[0]=r=>t.$emit("click",r))},null,36)}],["__scopeId","data-v-4f8ce869"]]);jt.install=function(t){t.component(jt.name,jt)},Rt.install=function(t){t.component(Rt.name,Rt)},Ut.install=function(t){t.component(Ut.name,Ut)};const sd={class:"u-emoji"},cd={class:"face-tooltip-head select-none"},dd=["onClick"],pd=["src"],hd={class:"emoji-body select-none"},md={style:{padding:"0 5px"}},ud=["onClick"],gd={class:"emoji-btn select-none"},fd={key:0},Cd=v(Object.assign({name:"cvEmoji"},{__name:"emoji",props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:"bottom"},emits:["addEmoji"],setup(t,{emit:o}){const a=t,i=e.ref(0),l=e.ref(0),n=e.ref(new Array(2)),{emojiList:r,faceList:c}=a.emoji;function d(){n.value[0]=r[0]}return(p,h)=>(e.openBlock(),e.createElementBlock("div",sd,[e.createVNode(e.unref(k.ElPopover),{placement:t.placement,"popper-class":"emoji-popover",width:250,trigger:"click",onBeforeEnter:d},{reference:e.withCtx(()=>[e.createElementVNode("div",gd,[p.$slots.default?e.renderSlot(p.$slots,"default",{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",fd,[...h[0]||(h[0]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},[e.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),e.createElementVNode("span",null,"表情",-1)])]))])]),default:e.withCtx(()=>[e.createElementVNode("div",cd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(u,m)=>(e.openBlock(),e.createElementBlock("label",{key:m,class:e.normalizeClass(i.value==m?"active":""),onClick:f=>(function(C){switch(i.value=C,C){case 0:l.value=0;break;case 1:l.value=-50,n.value[1]=r[1]}})(m)},[e.createElementVNode("img",{src:u,alt:""},null,8,pd)],10,dd))),128))]),e.createElementVNode("div",hd,[e.createElementVNode("div",{class:"emjio-container",style:e.normalizeStyle({transform:`translateX(${l.value}%)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(u,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"emoji-wrapper"},[e.createVNode(e.unref(k.ElScrollbar),null,{default:e.withCtx(()=>[e.createElementVNode("div",md,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u,(f,C)=>(e.openBlock(),e.createElementBlock("span",{key:C,class:"emoji-item",onClick:g=>p.$emit("addEmoji",C)},[e.createVNode(e.unref(k.ElImage),{src:f,title:String(C),class:"emoji",style:{width:"24px",height:"24px",margin:"5px"},lazy:""},null,8,["src","title"])],8,ud))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,["placement"])]))}}),[["__scopeId","data-v-da53b6ed"]]),vd={class:"cv-chat-message"},yd={class:"chat-list"},kd={class:"content"},bd={key:0,class:"username"},wd=["innerHTML"],Vd={__name:"message",props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0}},setup(t,{expose:o}){const{allEmoji:a}=e.inject("InjectionEmojiApi"),i=e.ref();o({scroll:()=>{e.nextTick(()=>{const n=document.querySelector(".chat-item:last-child");i.value.setScrollTop(n.offsetTop)})}});const l=(n,r)=>r=r.replace(/\[.+?\]/g,c=>{const d=n[c];return d?['<img src="',d,'" width="20" height="20" alt="',c,'" title="',c,'" style="margin: 0 1px; vertical-align: text-bottom"',"/>"].join(""):c});return(n,r)=>(e.openBlock(),e.createElementBlock("div",vd,[e.createVNode(e.unref(k.ElScrollbar),{ref_key:"scrollbarRef",ref:i},{default:e.withCtx(()=>[e.createElementVNode("div",yd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:e.normalizeClass([{self:t.userId==c.id},"chat-item"])},[e.createElementVNode("div",null,[e.createVNode(e.unref(k.ElAvatar),null,{default:e.withCtx(()=>[...r[0]||(r[0]=[e.createElementVNode("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])]),_:1})]),e.createElementVNode("div",kd,[t.userId!=c.id?(e.openBlock(),e.createElementBlock("div",bd,e.toDisplayString(c.username),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"card-box",innerHTML:l(e.unref(a),c.content)},null,8,wd)]),r[1]||(r[1]=e.createElementVNode("div",{class:"date"},null,-1))],2))),128))])]),_:1},512)]))}},xd={class:"cv-chat-wrap"},Sd={class:"header"},Nd={id:"chat-footer",class:"footer"},Wt=Object.assign({name:"cvChat"},{__name:"chat",props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0},emoji:{type:[Object],default:()=>({})}},emits:["submit"],setup(t,{emit:o}){const a=t,i=e.ref(!1),l=e.ref(""),n=e.ref(),{data:r}=a,c=o,d=m=>{const{ctrlKey:f,key:C}=m;f&&C=="Enter"&&h()},p=()=>{l.value="",n.value.scroll()},h=()=>{let m=l.value;m.trim()?(m=m.replace(/\n/g,"<br/>"),c("submit",{clear:p,content:m})):k.ElMessage({type:"error",message:"内容不能为空"})},u=m=>{let f=document.getElementById("emojiInput"),C=f.selectionStart,g=f.selectionEnd,y=f.value;if(C===null||g===null)return;let b=y.substring(0,C)+m+y.substring(g);f.value=b,f.focus(),f.selectionStart=C+m.length,f.selectionEnd=C+m.length,l.value=b};return e.provide("InjectionEmojiApi",a.emoji),(m,f)=>{const C=e.resolveComponent("cvIcons");return e.openBlock(),e.createElementBlock("div",xd,[e.createElementVNode("div",{class:e.normalizeClass([{active:i.value},"chat-container translate"])},[e.createElementVNode("div",Sd,[e.createVNode(C,{size:"32"},{default:e.withCtx(()=>[...f[2]||(f[2]=[e.createElementVNode("svg",{viewBox:"0 0 1318 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.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"}),e.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"}),e.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"}),e.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"}),e.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]=e.createElementVNode("div",{style:{"margin-left":"12px"}},[e.createElementVNode("div",null,"聊天室"),e.createElementVNode("div",{style:{"font-size":"12px"}},"当前2人在线")],-1))]),e.createVNode(Vd,{ref_key:"messageRef",ref:n,data:e.unref(r),"user-id":t.userId},null,8,["data","user-id"]),e.createElementVNode("div",Nd,[e.createVNode(e.unref(k.ElInput),{id:"emojiInput",modelValue:l.value,"onUpdate:modelValue":f[0]||(f[0]=g=>l.value=g),type:"textarea",autosize:{minRows:1,maxRows:4},placeholder:"请输入内容",onKeydown:e.withKeys(d,["enter"])},null,8,["modelValue"]),e.createVNode(Cd,{style:{margin:"0 8px 0"},emoji:t.emoji,placement:"top-end",onAddEmoji:u},{default:e.withCtx(()=>[...f[4]||(f[4]=[e.createElementVNode("svg",{width:"22",height:"22",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"7186"},[e.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"]),e.createVNode(C,{size:"18",class:e.normalizeClass([{".cv-chat-wrap submit-btn":l.value.trim()!=""},"select-none cursor-pointer"]),style:{"padding-bottom":"5px"},onClick:h},{default:e.withCtx(()=>[...f[5]||(f[5]=[e.createElementVNode("svg",{viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15072"},[e.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),e.createVNode(e.unref(k.ElButton),{class:"chat-btn",onClick:f[1]||(f[1]=g=>i.value=!i.value)},{default:e.withCtx(()=>[...f[6]||(f[6]=[e.createTextVNode("chat",-1)])]),_:1})])}}});Wt.install=function(t){t.component(Wt.name,Wt)};const Bd={key:0},Yt=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(t){const o=t,{data:a,vertical:i,suffixIcon:l,prefixIcon:n,size:r,height:c,delay:d,spped:p,color:h,background:u}=o,m=e.reactive({boxWidth:0,textWidth:0,oneTime:0,twoTime:0,order:1}),f=e.ref({}),C=e.ref({style:{cssText:""}}),g=e.computed(()=>o.delay>2e3?o.delay:2e3),y=()=>{m.oneTime=m.textWidth/o.spped,m.twoTime=(m.textWidth+m.boxWidth)/o.spped},b=()=>{m.order===1?(C.value?.style&&(C.value.style.cssText=`animation: oneAnimation ${m.oneTime}s linear; opactity: 1;}`),m.order=2):C.value?.style&&(C.value.style.cssText=`animation: twoAnimation ${m.twoTime}s linear infinite; opacity: 1;`)};return e.onMounted(()=>{o.vertical||(e.nextTick(()=>{m.boxWidth=f.value.offsetWidth,m.textWidth=C.value.offsetWidth,document.styleSheets[0].insertRule(`@keyframes oneAnimation {0% {left: 0px;} 100% {left: -${m.textWidth}px;}}`),document.styleSheets[0].insertRule(`@keyframes twoAnimation {0% {left: ${m.boxWidth}px;} 100% {left: -${m.textWidth}px;}}`),y(),setTimeout(()=>{b()},o.delay)}),C.value.addEventListener("animationend",()=>{b()},!1))}),(w,V)=>{const N=e.resolveComponent("el-carousel-item"),E=e.resolveComponent("el-carousel"),L=e.resolveComponent("cvIcons");return e.openBlock(),e.createElementBlock("div",{class:"cv-notice-bar",style:e.normalizeStyle({background:e.unref(u),height:`${e.unref(c)}px`})},[e.unref(i)?(e.openBlock(),e.createElementBlock("div",Bd,[e.createVNode(E,{height:"40px",direction:"vertical",autoplay:!0,"indicator-position":"none",interval:g.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),q=>(e.openBlock(),e.createBlock(N,{key:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(q),1)]),_:2},1024))),128))]),_:1},8,["interval"])])):(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle({color:e.unref(h),fontSize:`${e.unref(r)}px`}),class:"cv-notice-bar-wrap"},[e.unref(n)?(e.openBlock(),e.createBlock(L,{key:0,type:e.unref(n)},null,8,["type"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"boxRef",ref:f,class:"text-box"},[e.createElementVNode("div",{ref_key:"textRef",ref:C,class:"text"},e.toDisplayString(e.unref(a)),513)],512),e.unref(l)?(e.openBlock(),e.createBlock(L,{key:1,type:e.unref(l)},null,8,["type"])):e.createCommentVNode("",!0)],4))],4)}}});Yt.install=function(t){t.component(Yt.name,Yt)};const Ed=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[gn.basicSetup]}),ya="change",ka="update",ba="focus",wa="blur",Va="ready",xa="update:modelValue",Dd=({onUpdate:t,onChange:o,onFocus:a,onBlur:i,...l})=>T.EditorState.create({doc:l.doc,selection:l.selection,extensions:[...Array.isArray(l.extensions)?l.extensions:[l.extensions],B.EditorView.updateListener.of(n=>{t(n),n.docChanged&&o(n.state.doc.toString(),n),n.focusChanged&&(n.view.hasFocus?a(n):i(n))})]}),J=t=>{const o=new T.Compartment;return{compartment:o,run:a=>{o.get(t.state)?t.dispatch({effects:o.reconfigure(a)}):t.dispatch({effects:T.StateEffect.appendConfig.of(o.of(a))})}}},Sa=(t,o)=>{const{compartment:a,run:i}=J(t);return l=>{const n=a.get(t.state);i(l??n!==o?o:[])}},_d=t=>{const o=()=>t.state.doc.toString(),{run:a}=J(t),i=Sa(t,[B.EditorView.editable.of(!1),T.EditorState.readOnly.of(!0)]),l=Sa(t,B.keymap.of([fn.indentWithTab])),{run:n}=J(t),{run:r}=J(t),{run:c}=J(t),{run:d}=J(t);return{focus:()=>t.focus(),getDoc:o,setDoc:p=>{p!==o()&&t.dispatch({changes:{from:0,to:t.state.doc.length,insert:p}})},reExtensions:a,toggleDisabled:i,toggleIndentWithTab:l,setTabSize:p=>{n([T.EditorState.tabSize.of(p),x.indentUnit.of(" ".repeat(p))])},setPhrases:p=>{r([T.EditorState.phrases.of(p)])},setPlaceholder:p=>{c(B.placeholder(p))},setStyle:(p={})=>{d(B.EditorView.theme({"&":{...p}}))}}},Td=e.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:{[ya]:(t,o)=>!0,[ka]:t=>!0,[ba]:t=>!0,[wa]:t=>!0,[Va]:t=>!0,[xa]:(t,o)=>!0},setup(t,o){const a=e.shallowRef(),i=e.shallowRef(),l=e.shallowRef(),n={...Ed},r=e.computed(()=>{const c={};return Object.keys(e.toRaw(t)).forEach(d=>{d!=="modelValue"&&(c[d]=t[d]??n[d])}),c});return e.onMounted(()=>{i.value=Dd({doc:t.modelValue,selection:r.value.selection,extensions:n.extensions??[],onFocus:d=>o.emit(ba,d),onBlur:d=>o.emit(wa,d),onUpdate:d=>o.emit(ka,d),onChange:(d,p)=>{d!==t.modelValue&&(o.emit(ya,d,p),o.emit(xa,d,p))}}),l.value=new B.EditorView({state:i.value,parent:a.value,root:r.value.root}),l.value.contentDOM.addEventListener("scroll",d=>{});const c=_d(l.value);e.watch(()=>t.modelValue,d=>{d!==c.getDoc()&&c.setDoc(d)}),e.watch(()=>t.extensions,d=>c.reExtensions(d||[]),{immediate:!0}),e.watch(()=>r.value.disabled,d=>c.toggleDisabled(d),{immediate:!0}),e.watch(()=>r.value.indentWithTab,d=>c.toggleIndentWithTab(d),{immediate:!0}),e.watch(()=>r.value.tabSize,d=>c.setTabSize(d),{immediate:!0}),e.watch(()=>r.value.phrases,d=>c.setPhrases(d||{}),{immediate:!0}),e.watch(()=>r.value.placeholder,d=>c.setPlaceholder(d),{immediate:!0}),e.watch(()=>r.value.style,d=>c.setStyle(d),{immediate:!0}),r.value.autofocus&&c.focus(),o.emit(Va,{state:i.value,view:l.value,container:a.value,editorTools:c})}),e.onBeforeUnmount(()=>{r.value.autoDestroy&&l.value&&l.value.destroy()}),()=>e.h("div",{class:"cv-editor-codemirror",ref:a})}}),Na="#e06c75",qt="#abb2bf",qo="#7d8799",Ba="#d19a66",Ea="#2c313a",Da="#282c34",po="#353a42",_a="#528bff",Id=B.EditorView.theme({"&":{color:qt,backgroundColor:Da},".cm-content":{caretColor:_a},".cm-cursor, .cm-dropCursor":{borderLeftColor:_a},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:qt},".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:Da,color:qo,border:"none"},".cm-activeLineGutter":{backgroundColor:Ea},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:po},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:po,borderBottomColor:po},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Ea,color:qt}}},{dark:!0}),Ld=x.HighlightStyle.define([{tag:s.tags.keyword,color:"#c678dd"},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.propertyName,s.tags.macroName],color:Na},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:"#61afef"},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Ba},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:qt},{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:"#e5c07b"},{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:"#56b6c2"},{tag:[s.tags.meta,s.tags.comment],color:qo},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.strikethrough,textDecoration:"line-through"},{tag:s.tags.link,color:qo,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:Na},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Ba},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted],color:"#98c379"},{tag:s.tags.invalid,color:"#ffffff"}]),Fd=[Id,x.syntaxHighlighting(Ld)],$d=!1,ho="#FAFAFA",$="#90A4AE",ne="#80CBC440",Ta="#272727",mo="#FAFAFA",Ia="#00000010",Od="#c2c2c222",zd="#CFD8DC",Md="#7E939E",Pd="#FAFAFA",La="#7C4DFF",uo="#90A4AE",Fa="#6182B8",Hd="#91B859",Ad="#F76D47",$a="#8796B0",jd="#FFB62C",Rd="#F76D47",Ud="#90A4AE",Wd="#91B859",Yd="#E53935",qd="#39ADB5",Xd=B.EditorView.theme({"&":{color:$,backgroundColor:ho},".cm-content":{caretColor:Ta},".cm-cursor, .cm-dropCursor":{borderLeftColor:Ta},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ne},".cm-panels":{backgroundColor:mo,color:$},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:mo,outline:`1px solid ${Ia}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ne},".cm-activeLine":{backgroundColor:Od},".cm-selectionMatch":{backgroundColor:ne},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Pd,outline:"none"},".cm-gutters":{backgroundColor:ho,color:$,border:"none"},".cm-activeLineGutter":{backgroundColor:ho},".cm-lineNumbers .cm-gutterElement":{color:zd},".cm-lineNumbers .cm-activeLineGutter":{color:Md},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:$},".cm-tooltip":{border:`1px solid ${Ia}`,backgroundColor:mo,color:$},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:$,borderBottomColor:$},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ne,color:$}}},{dark:$d}),Kd=x.HighlightStyle.define([{tag:s.tags.keyword,color:La},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:uo},{tag:[s.tags.propertyName],color:Fa},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:Hd},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:Fa},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Ad},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:uo},{tag:[s.tags.className],color:jd},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:Rd},{tag:[s.tags.typeName],color:$a,fontStyle:$a},{tag:[s.tags.operator,s.tags.operatorKeyword],color:La},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:qd},{tag:[s.tags.meta,s.tags.comment],color:Ud},{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:Wd},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:uo},{tag:s.tags.invalid,color:Yd},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Gd=[Xd,x.syntaxHighlighting(Kd)],Zd=!0,go="#263238",O="#EEFFFF",ie="#80CBC420",Oa="#FFCC00",fo="#263238",za="#FFFFFF10",Qd="#4c616c22",Jd="#37474F",ep="#607a86",tp="#263238",Ma="#C792EA",Co="#EEFFFF",Pa="#82AAFF",op="#C3E88D",ap="#F78C6C",Ha="#B2CCD6",lp="#FFCB6B",np="#F78C6C",ip="#546E7A",rp="#C3E88D",sp="#FF5370",cp="#89DDFF",dp=B.EditorView.theme({"&":{color:O,backgroundColor:go},".cm-content":{caretColor:Oa},".cm-cursor, .cm-dropCursor":{borderLeftColor:Oa},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ie},".cm-panels":{backgroundColor:fo,color:O},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:fo,outline:`1px solid ${za}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ie},".cm-activeLine":{backgroundColor:Qd},".cm-selectionMatch":{backgroundColor:ie},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:tp,outline:"none"},".cm-gutters":{backgroundColor:go,color:O,border:"none"},".cm-activeLineGutter":{backgroundColor:go},".cm-lineNumbers .cm-gutterElement":{color:Jd},".cm-lineNumbers .cm-activeLineGutter":{color:ep},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:O},".cm-tooltip":{border:`1px solid ${za}`,backgroundColor:fo,color:O},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:O,borderBottomColor:O},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ie,color:O}}},{dark:Zd}),pp=x.HighlightStyle.define([{tag:s.tags.keyword,color:Ma},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Co},{tag:[s.tags.propertyName],color:Pa},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:op},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:Pa},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:ap},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Co},{tag:[s.tags.className],color:lp},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:np},{tag:[s.tags.typeName],color:Ha,fontStyle:Ha},{tag:[s.tags.operator,s.tags.operatorKeyword],color:Ma},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:cp},{tag:[s.tags.meta,s.tags.comment],color:ip},{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:rp},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Co},{tag:s.tags.invalid,color:sp},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),hp=[dp,x.syntaxHighlighting(pp)],mp=!1,vo="#FDF6E3",z="#586E75",re="#EEE8D5",Aa="#657B83",yo="#FDF6E3",ja="#D3AF86",up="#d5bd5c22",gp="#586E75",fp="#567983",Cp="#EEE8D5",Ra="#859900",ko="#268BD2",Ua="#268BD2",vp="#2AA198",yp="#CB4B16",Wa="#CB4B16",kp="#CB4B16",bp="#D33682",wp="#93A1A1",Vp="#268BD2",xp="#DC322F",Sp="#DC322F",Np=B.EditorView.theme({"&":{color:z,backgroundColor:vo},".cm-content":{caretColor:Aa},".cm-cursor, .cm-dropCursor":{borderLeftColor:Aa},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:re},".cm-panels":{backgroundColor:yo,color:z},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:yo,outline:`1px solid ${ja}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:re},".cm-activeLine":{backgroundColor:up},".cm-selectionMatch":{backgroundColor:re},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Cp,outline:"none"},".cm-gutters":{backgroundColor:vo,color:z,border:"none"},".cm-activeLineGutter":{backgroundColor:vo},".cm-lineNumbers .cm-gutterElement":{color:gp},".cm-lineNumbers .cm-activeLineGutter":{color:fp},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:z},".cm-tooltip":{border:`1px solid ${ja}`,backgroundColor:yo,color:z},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:z,borderBottomColor:z},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:re,color:z}}},{dark:mp}),Bp=x.HighlightStyle.define([{tag:s.tags.keyword,color:Ra},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:ko},{tag:[s.tags.propertyName],color:Ua},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:vp},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:Ua},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:yp},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:ko},{tag:[s.tags.className],color:kp},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:bp},{tag:[s.tags.typeName],color:Wa,fontStyle:Wa},{tag:[s.tags.operator,s.tags.operatorKeyword],color:Ra},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:Sp},{tag:[s.tags.meta,s.tags.comment],color:wp},{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:Vp},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:ko},{tag:s.tags.invalid,color:xp},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Ep=[Np,x.syntaxHighlighting(Bp)],Dp=!0,bo="#002B36",M="#93A1A1",se="#274642",Ya="#D30102",wo="#002B36",qa="#2AA19899",_p="#005b7022",Tp="#93A1A1",Ip="#949494",Lp="#073642",Xa="#859900",Vo="#268BD2",Ka="#268BD2",Fp="#2AA198",$p="#CB4B16",Ga="#CB4B16",Op="#CB4B16",zp="#D33682",Mp="#586E75",Pp="#268BD2",Hp="#DC322F",Ap="#DC322F",jp=B.EditorView.theme({"&":{color:M,backgroundColor:bo},".cm-content":{caretColor:Ya},".cm-cursor, .cm-dropCursor":{borderLeftColor:Ya},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:se},".cm-panels":{backgroundColor:wo,color:M},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:wo,outline:`1px solid ${qa}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:se},".cm-activeLine":{backgroundColor:_p},".cm-selectionMatch":{backgroundColor:se},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Lp,outline:"none"},".cm-gutters":{backgroundColor:bo,color:M,border:"none"},".cm-activeLineGutter":{backgroundColor:bo},".cm-lineNumbers .cm-gutterElement":{color:Tp},".cm-lineNumbers .cm-activeLineGutter":{color:Ip},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:M},".cm-tooltip":{border:`1px solid ${qa}`,backgroundColor:wo,color:M},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:M,borderBottomColor:M},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:se,color:M}}},{dark:Dp}),Rp=x.HighlightStyle.define([{tag:s.tags.keyword,color:Xa},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Vo},{tag:[s.tags.propertyName],color:Ka},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:Fp},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:Ka},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:$p},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Vo},{tag:[s.tags.className],color:Op},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:zp},{tag:[s.tags.typeName],color:Ga,fontStyle:Ga},{tag:[s.tags.operator,s.tags.operatorKeyword],color:Xa},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:Ap},{tag:[s.tags.meta,s.tags.comment],color:Mp},{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:Pp},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Vo},{tag:s.tags.invalid,color:Hp},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Up=[jp,x.syntaxHighlighting(Rp)],Wp=!0,xo="#282A36",P="#F8F8F2",ce="#44475A",Za="#F8F8F2",So="#282A36",Qa="#191A21",Yp="#53576c22",qp="#6272A4",Xp="#F8F8F2",Kp="#44475A",Ja="#FF79C6",No="#F8F8F2",el="#50FA7B",Gp="#F1FA8C",Zp="#BD93F9",tl="#8BE9FD",Qp="#8BE9FD",Jp="#BD93F9",eh="#6272A4",th="#BD93F9",oh="#FF5555",ah="#F1FA8C",lh=B.EditorView.theme({"&":{color:P,backgroundColor:xo},".cm-content":{caretColor:Za},".cm-cursor, .cm-dropCursor":{borderLeftColor:Za},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ce},".cm-panels":{backgroundColor:So,color:P},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:So,outline:`1px solid ${Qa}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ce},".cm-activeLine":{backgroundColor:Yp},".cm-selectionMatch":{backgroundColor:ce},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Kp,outline:"none"},".cm-gutters":{backgroundColor:xo,color:P,border:"none"},".cm-activeLineGutter":{backgroundColor:xo},".cm-lineNumbers .cm-gutterElement":{color:qp},".cm-lineNumbers .cm-activeLineGutter":{color:Xp},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:P},".cm-tooltip":{border:`1px solid ${Qa}`,backgroundColor:So,color:P},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:P,borderBottomColor:P},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ce,color:P}}},{dark:Wp}),nh=x.HighlightStyle.define([{tag:s.tags.keyword,color:Ja},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:No},{tag:[s.tags.propertyName],color:el},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:Gp},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:el},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Zp},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:No},{tag:[s.tags.className],color:Qp},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:Jp},{tag:[s.tags.typeName],color:tl,fontStyle:tl},{tag:[s.tags.operator,s.tags.operatorKeyword],color:Ja},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:ah},{tag:[s.tags.meta,s.tags.comment],color:eh},{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:th},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:No},{tag:s.tags.invalid,color:oh},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),ih=[lh,x.syntaxHighlighting(nh)],rh=!1,Bo="#fff",H="#444d56",de="#0366d625",ol="#044289",Eo="#fff",al="#e1e4e8",sh="#c6c6c622",ch="#1b1f234d",dh="#24292e",ph="#34d05840",ll="#d73a49",Do="#e36209",nl="#005cc5",hh="#032f62",mh="#005cc5",il="#005cc5",uh="#6f42c1",gh="#005cc5",fh="#6a737d",Ch="#005cc5",vh="#cb2431",yh="#032f62",kh=B.EditorView.theme({"&":{color:H,backgroundColor:Bo},".cm-content":{caretColor:ol},".cm-cursor, .cm-dropCursor":{borderLeftColor:ol},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:de},".cm-panels":{backgroundColor:Eo,color:H},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Eo,outline:`1px solid ${al}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:de},".cm-activeLine":{backgroundColor:sh},".cm-selectionMatch":{backgroundColor:de},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:ph,outline:"none"},".cm-gutters":{backgroundColor:Bo,color:H,border:"none"},".cm-activeLineGutter":{backgroundColor:Bo},".cm-lineNumbers .cm-gutterElement":{color:ch},".cm-lineNumbers .cm-activeLineGutter":{color:dh},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:H},".cm-tooltip":{border:`1px solid ${al}`,backgroundColor:Eo,color:H},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:H,borderBottomColor:H},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:de,color:H}}},{dark:rh}),bh=x.HighlightStyle.define([{tag:s.tags.keyword,color:ll},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Do},{tag:[s.tags.propertyName],color:nl},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:hh},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:nl},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:mh},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Do},{tag:[s.tags.className],color:uh},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:gh},{tag:[s.tags.typeName],color:il,fontStyle:il},{tag:[s.tags.operator,s.tags.operatorKeyword],color:ll},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:yh},{tag:[s.tags.meta,s.tags.comment],color:fh},{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:Ch},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Do},{tag:s.tags.invalid,color:vh},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),wh=[kh,x.syntaxHighlighting(bh)],Vh=!0,_o="#24292e",A="#d1d5da",pe="#3392FF44",rl="#c8e1ff",To="#24292e",sl="#1b1f23",xh="#4d566022",Sh="#444d56",Nh="#e1e4e8",Bh="#17E5E650",cl="#f97583",Io="#ffab70",dl="#79b8ff",Eh="#9ecbff",Dh="#79b8ff",pl="#79b8ff",_h="#b392f0",Th="#79b8ff",Ih="#6a737d",Lh="#79b8ff",Fh="#f97583",$h="#9ecbff",Oh=B.EditorView.theme({"&":{color:A,backgroundColor:_o},".cm-content":{caretColor:rl},".cm-cursor, .cm-dropCursor":{borderLeftColor:rl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:pe},".cm-panels":{backgroundColor:To,color:A},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:To,outline:`1px solid ${sl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:pe},".cm-activeLine":{backgroundColor:xh},".cm-selectionMatch":{backgroundColor:pe},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Bh,outline:"none"},".cm-gutters":{backgroundColor:_o,color:A,border:"none"},".cm-activeLineGutter":{backgroundColor:_o},".cm-lineNumbers .cm-gutterElement":{color:Sh},".cm-lineNumbers .cm-activeLineGutter":{color:Nh},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:A},".cm-tooltip":{border:`1px solid ${sl}`,backgroundColor:To,color:A},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:A,borderBottomColor:A},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:pe,color:A}}},{dark:Vh}),zh=x.HighlightStyle.define([{tag:s.tags.keyword,color:cl},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Io},{tag:[s.tags.propertyName],color:dl},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:Eh},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:dl},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Dh},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Io},{tag:[s.tags.className],color:_h},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:Th},{tag:[s.tags.typeName],color:pl,fontStyle:pl},{tag:[s.tags.operator,s.tags.operatorKeyword],color:cl},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:$h},{tag:[s.tags.meta,s.tags.comment],color:Ih},{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:Lh},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Io},{tag:s.tags.invalid,color:Fh},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Mh=[Oh,x.syntaxHighlighting(zh)],Ph=!0,Lo="#21202e",j="#edecee",he="#3d375e7f",hl="#a277ff",Fo="#21202e",ml="#3b334b",Hh="#4d4b6622",Ah="#a394f033",jh="#cdccce",Rh="#a394f033",ul="#a277ff",$o="#edecee",gl="#ffca85",Uh="#61ffca",Wh="#61ffca",fl="#82e2ff",Yh="#82e2ff",qh="#61ffca",Xh="#6d6d6d",Kh="#a277ff",Gh="#ff6767",Zh="#61ffca",Qh=B.EditorView.theme({"&":{color:j,backgroundColor:Lo},".cm-content":{caretColor:hl},".cm-cursor, .cm-dropCursor":{borderLeftColor:hl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:he},".cm-panels":{backgroundColor:Fo,color:j},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Fo,outline:`1px solid ${ml}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:he},".cm-activeLine":{backgroundColor:Hh},".cm-selectionMatch":{backgroundColor:he},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Rh,outline:"none"},".cm-gutters":{backgroundColor:Lo,color:j,border:"none"},".cm-activeLineGutter":{backgroundColor:Lo},".cm-lineNumbers .cm-gutterElement":{color:Ah},".cm-lineNumbers .cm-activeLineGutter":{color:jh},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:j},".cm-tooltip":{border:`1px solid ${ml}`,backgroundColor:Fo,color:j},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:j,borderBottomColor:j},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:he,color:j}}},{dark:Ph}),Jh=x.HighlightStyle.define([{tag:s.tags.keyword,color:ul},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:$o},{tag:[s.tags.propertyName],color:gl},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:Uh},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:gl},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Wh},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:$o},{tag:[s.tags.className],color:Yh},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:qh},{tag:[s.tags.typeName],color:fl,fontStyle:fl},{tag:[s.tags.operator,s.tags.operatorKeyword],color:ul},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:Zh},{tag:[s.tags.meta,s.tags.comment],color:Xh},{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:Kh},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:$o},{tag:s.tags.invalid,color:Gh},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),em=[Qh,x.syntaxHighlighting(Jh)],tm=!0,Oo="#1a1b26",R="#787c99",me="#515c7e40",Cl="#c0caf5",zo="#1a1b26",vl="#787c99",om="#43455c22",am="#363b54",lm="#737aa2",nm="#16161e",yl="#bb9af7",Mo="#c0caf5",kl="#7aa2f7",im="#9ece6a",rm="#bb9af7",bl="#0db9d7",sm="#c0caf5",cm="#ff9e64",dm="#444b6a",pm="#89ddff",hm="#ff5370",mm="#b4f9f8",um=B.EditorView.theme({"&":{color:R,backgroundColor:Oo},".cm-content":{caretColor:Cl},".cm-cursor, .cm-dropCursor":{borderLeftColor:Cl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:me},".cm-panels":{backgroundColor:zo,color:R},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:zo,outline:`1px solid ${vl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:me},".cm-activeLine":{backgroundColor:om},".cm-selectionMatch":{backgroundColor:me},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:nm,outline:"none"},".cm-gutters":{backgroundColor:Oo,color:R,border:"none"},".cm-activeLineGutter":{backgroundColor:Oo},".cm-lineNumbers .cm-gutterElement":{color:am},".cm-lineNumbers .cm-activeLineGutter":{color:lm},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:R},".cm-tooltip":{border:`1px solid ${vl}`,backgroundColor:zo,color:R},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:R,borderBottomColor:R},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:me,color:R}}},{dark:tm}),gm=x.HighlightStyle.define([{tag:s.tags.keyword,color:yl},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Mo},{tag:[s.tags.propertyName],color:kl},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:im},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:kl},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:rm},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Mo},{tag:[s.tags.className],color:sm},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:cm},{tag:[s.tags.typeName],color:bl,fontStyle:bl},{tag:[s.tags.operator,s.tags.operatorKeyword],color:yl},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:mm},{tag:[s.tags.meta,s.tags.comment],color:dm},{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:pm},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Mo},{tag:s.tags.invalid,color:hm},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),fm=[um,x.syntaxHighlighting(gm)],Cm=!0,Po="#24283b",U="#7982a9",ue="#6f7bb630",wl="#c0caf5",Ho="#24283b",Vl="#7982a9",vm="#4d547722",ym="#3b4261",km="#737aa2",bm="#1f2335",xl="#bb9af7",Ao="#c0caf5",Sl="#7aa2f7",wm="#9ece6a",Vm="#bb9af7",Nl="#2ac3de",xm="#c0caf5",Sm="#ff9e64",Nm="#565f89",Bm="#89ddff",Em="#ff5370",Dm="#b4f9f8",_m=B.EditorView.theme({"&":{color:U,backgroundColor:Po},".cm-content":{caretColor:wl},".cm-cursor, .cm-dropCursor":{borderLeftColor:wl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ue},".cm-panels":{backgroundColor:Ho,color:U},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Ho,outline:`1px solid ${Vl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ue},".cm-activeLine":{backgroundColor:vm},".cm-selectionMatch":{backgroundColor:ue},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:bm,outline:"none"},".cm-gutters":{backgroundColor:Po,color:U,border:"none"},".cm-activeLineGutter":{backgroundColor:Po},".cm-lineNumbers .cm-gutterElement":{color:ym},".cm-lineNumbers .cm-activeLineGutter":{color:km},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:U},".cm-tooltip":{border:`1px solid ${Vl}`,backgroundColor:Ho,color:U},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:U,borderBottomColor:U},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ue,color:U}}},{dark:Cm}),Tm=x.HighlightStyle.define([{tag:s.tags.keyword,color:xl},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Ao},{tag:[s.tags.propertyName],color:Sl},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:wm},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:Sl},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Vm},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Ao},{tag:[s.tags.className],color:xm},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:Sm},{tag:[s.tags.typeName],color:Nl,fontStyle:Nl},{tag:[s.tags.operator,s.tags.operatorKeyword],color:xl},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:Dm},{tag:[s.tags.meta,s.tags.comment],color:Nm},{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:Bm},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Ao},{tag:s.tags.invalid,color:Em},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Im=[_m,x.syntaxHighlighting(Tm)],Lm=!1,jo="#e1e2e7",W="#6a6f8e",ge="#8591b840",Bl="#3760bf",Ro="#e1e2e7",El="#6a6f8e",Fm="#a7aaba22",$m="#b3b6cd",Om="#68709a",zm="#e9e9ec",Dl="#9854f1",Uo="#3760bf",_l="#2e7de9",Mm="#587539",Pm="#9854f1",Tl="#07879d",Hm="#3760bf",Am="#b15c00",jm="#9da3c2",Rm="#006a83",Um="#ff3e64",Wm="#2e5857",Ym=B.EditorView.theme({"&":{color:W,backgroundColor:jo},".cm-content":{caretColor:Bl},".cm-cursor, .cm-dropCursor":{borderLeftColor:Bl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ge},".cm-panels":{backgroundColor:Ro,color:W},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Ro,outline:`1px solid ${El}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ge},".cm-activeLine":{backgroundColor:Fm},".cm-selectionMatch":{backgroundColor:ge},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:zm,outline:"none"},".cm-gutters":{backgroundColor:jo,color:W,border:"none"},".cm-activeLineGutter":{backgroundColor:jo},".cm-lineNumbers .cm-gutterElement":{color:$m},".cm-lineNumbers .cm-activeLineGutter":{color:Om},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:W},".cm-tooltip":{border:`1px solid ${El}`,backgroundColor:Ro,color:W},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:W,borderBottomColor:W},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ge,color:W}}},{dark:Lm}),qm=x.HighlightStyle.define([{tag:s.tags.keyword,color:Dl},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Uo},{tag:[s.tags.propertyName],color:_l},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:Mm},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:_l},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Pm},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Uo},{tag:[s.tags.className],color:Hm},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:Am},{tag:[s.tags.typeName],color:Tl,fontStyle:Tl},{tag:[s.tags.operator,s.tags.operatorKeyword],color:Dl},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:Wm},{tag:[s.tags.meta,s.tags.comment],color:jm},{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:Rm},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Uo},{tag:s.tags.invalid,color:Um},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Xm=[Ym,x.syntaxHighlighting(qm)],Km={disabled:!1,indentWithTab:!0,tabSize:4,autofocus:!1,placeholder:"input...",backgroundColor:"white",language:"markdown",theme:"oneDark",phrases:"en-us"},Kl={emits:["update:config"],components:{CodemirrorEditor:Td},data:()=>({codemrrConfig:{...Km},codemrrThemes:{oneDark:Fd,materialLight:Gd,materialDark:hp,solarizedLight:Ep,solarizedDark:Up,dracula:ih,githubLight:wh,githubDark:Mh,aura:em,tokyoNight:fm,tokyoNightStorm:Im,tokyoNightDay:Xm},codemrrLanguages:{javascript:ia.javascript(),js:ia.javascript(),html:Cn.html(),markdown:yn.markdown(),json:vn.json(),vue:kn.vue(),java:wn.java(),php:bn.php(),python:Vn.python(),go:Sn.go(),mysql:ra.sql(),sql:ra.sql(),xml:xn.xml(),css:Nn.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 t=Object.keys(this.codemrrThemes);return["default"].concat(t)},optionPhrases:()=>["en-us","de-de"],optionLanguage(){return Object.keys(this.codemrrLanguages)},extensions(){const t=[];return t.push(this.codemrrLanguages[this.codemrrConfig.language]),this.codemrrThemes[this.codemrrConfig.theme]&&t.push(this.codemrrThemes[this.codemrrConfig.theme]),t},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(t){this.$emit("update:config",t)}}},te={props:{editorID:{type:[String],required:!1,default:()=>""}},data:()=>({editorRefEL:null}),computed:{editorRefID(){return this.editorID?this.editorID:this.$options.name+ +new Date+((1e3*Math.random()).toFixed(0)+"")}}};function Gl(t,o){var a=document.createElement("a");if(a.setAttribute("href","data:text/plain;charset=UTF-8,"+encodeURIComponent(t)),a.setAttribute("download",o),a.style.display="none",document.createEvent){const i=document.createEvent("MouseEvents");i.initEvent("click",!0,!0),a.dispatchEvent(i)}else a.click()}function fe(t){return t<10?"0"+t:t}const Gm={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},Zm={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"},Qm={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"},Jm={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"},eu={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"},tu={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"},ea={components:{SvgImgMap:v({name:"SvgImgMap"},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("svg",Zm,[...o[0]||(o[0]=[e.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),e.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)])])}]]),SvgUploadFile:v({name:"SvgUploadFile"},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("svg",Qm,[...o[0]||(o[0]=[e.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),e.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)])])}]]),SvgToc:v({name:"SvgToc"},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("svg",Jm,[...o[0]||(o[0]=[e.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),e.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)])])}]]),SvgCopy:v({name:"SvgCopy"},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("svg",eu,[...o[0]||(o[0]=[e.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),e.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),e.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),e.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)])])}]]),SvgLanguage:v({name:"SvgLanguage"},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("svg",tu,[...o[0]||(o[0]=[e.createElementVNode("path",{d:"M200.313605 806.764028h487.993851v78.708685h-487.993851z",fill:"#6C7280","p-id":"13072"},null,-1),e.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),e.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),e.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)])])}]])},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:()=>({})},isPreview:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1}},data:()=>({actionThemeDropdown:!1,actionPhrasesDropdown:!1,actionLanguageDropdown:!1,actionBgColorDropdown:!1,actionSplit:!0,actionPreview:!1,actionScrollSync:!0,actionToc:!0,actionFullscreen:!1,actionHtmlDiaVisible:!1,actionHtmlText:""}),computed:{lastExpFileName(){let t=new Date,o=t.getFullYear(),a=t.getMonth()+1,i=t.getDate(),l=t.getHours(),n=t.getMinutes(),r=o+"-"+fe(a)+"-"+fe(i)+"_"+fe(l)+"-"+fe(n);return this.exportFileName||r},toolConfig(){const{toolbars:t={}}=this;return{...Gm,...t}}},created(){this.actionPreview=this.isPreview||!1},methods:{actionPhrasesSet(t){this.codemrrConfig.phrases=t,this.actionPhrasesDropdown=!1},actionLanguageSet(t){this.codemrrConfig.language=t,this.actionLanguageDropdown=!1},actionBgColorSet(t){this.codemrrConfig.backgroundColor=t,this.actionBgColorDropdown=!1},actionThemesSet(t){this.codemrrConfig.theme=t,this.actionThemeDropdown=!1,this.$emit("on-act-theme",t)},actionFullscreenSet(t){this.actionFullscreen=t;let o=this.$refs[this.editorWrapRefID];t?o.classList.add("fullscreen"):o.classList.remove("fullscreen"),this.actionCurrent("fullscreen",t)},actionChooseImage(){const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=()=>{const o=t.files;o[0]&&(this.$emit("on-act-choose-image",o[0]),t.value="")},t.click()},actionInsBg(){const t=this.getLastPoint(),o=t.content||!1;o?this.insertContent("=="+o+"=="):(this.insertContent("===="),this.setCursor(t.line,t.ch+1))},actionUndo(){if(this.editorViewInst){const t=this.editorViewInst.state.behavior(T.EditorState.effect(T.EditorState.undo));this.editorViewInst.update([{changes:{from:0,to:t.doc.length,insert:t.doc},selection:T.EditorSelection.single(0)}])}},actionRedo(){this.editorViewInst&&this.editorViewInst.dispatch({...this.editorViewInst.state,effects:T.EditorState.redo()})},actionInsStrong(){const t=this.getLastPoint(),o=t.content||!1;let a="";o?(a="**"+o+"**",this.deleteContent(t.start,t.end),this.insertContent(t.start,a)):(a="****",this.insertContent(t.start,a)),this.setCursor(t.start+a.length,t.start+a.length)},actionInsItalic(){const t=this.getLastPoint(),o=t.content||!1;let a="";o?(a="*"+o+"*",this.deleteContent(t.start,t.end),this.insertContent(t.start,a)):(a="**",this.insertContent(t.start,a)),this.setCursor(t.start+a.length,t.start+a.length)},actionInsOverline(){const t=this.getLastPoint(),o=t.content||!1;let a="";o?(a="~~"+o+"~~",this.deleteContent(t.start,t.end),this.insertContent(t.start,a)):(a="~~~~",this.insertContent(t.start,a)),this.setCursor(t.start+a.length,t.start+a.length)},actionInsUnderline(){const t=this.getLastPoint(),o=t.content||!1;let a="";o?(a="<u>"+o+"</u>",this.deleteContent(t.start,t.end),this.insertContent(t.start,a)):(a="<u></u>",this.insertContent(t.start,a)),this.setCursor(t.start+a.length,t.start+a.length)},actionInsTitle(t){const o={1:"# ",2:"## ",3:"### ",4:"#### ",5:"##### ",6:"###### "}[t],a=this.getLastPoint(),i=a.content||!1;let l=`
7
+ </div>`,this.$emit("real-time",i)},reload(){let t=new Image;t.onload=()=>{this.w=parseFloat(window.getComputedStyle(this.$refs.cropper).width),this.h=parseFloat(window.getComputedStyle(this.$refs.cropper).height),this.trueWidth=t.width,this.trueHeight=t.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)})},t.onerror=()=>{this.$emit("img-load","error")},t.src=this.imgs},checkedMode(){let t=1,o=this.trueWidth,a=this.trueHeight;const i=this.mode.split(" ");switch(i[0]){case"contain":this.trueWidth>this.w&&(t=this.w/this.trueWidth),this.trueHeight*t>this.h&&(t=this.h/this.trueHeight);break;case"cover":o=this.w,t=o/this.trueWidth,a*=t,a<this.h&&(a=this.h,t=a/this.trueHeight);break;default:try{let l=i[0];if(l.search("px")!==-1){l=l.replace("px",""),o=parseFloat(l);const n=o/this.trueWidth;let r=1,c=i[1];c.search("px")!==-1&&(c=c.replace("px",""),a=parseFloat(c),r=a/this.trueHeight),t=Math.min(n,r)}if(l.search("%")!==-1&&(l=l.replace("%",""),o=parseFloat(l)/100*this.w,t=o/this.trueWidth),i.length===2&&l==="auto"){let n=i[1];n.search("px")!==-1&&(n=n.replace("px",""),a=parseFloat(n),t=a/this.trueHeight),n.search("%")!==-1&&(n=n.replace("%",""),a=parseFloat(n)/100*this.h,t=a/this.trueHeight)}}catch{t=1}}return t},goAutoCrop(t,o){if(this.imgs===""||this.imgs===null)return;this.clearCrop(),this.cropping=!0;let a=this.w,i=this.h;if(this.centerBox){const r=Math.abs(this.rotate)%2>0;let c=(r?this.trueHeight:this.trueWidth)*this.scale,d=(r?this.trueWidth:this.trueHeight)*this.scale;a=c<a?c:a,i=d<i?d:i}var l=t||parseFloat(this.autoCropWidth),n=o||parseFloat(this.autoCropHeight);(l===0||n===0)&&(l=.8*a,n=.8*i),l=l>a?a:l,n=n>i?i:n,this.fixed&&(n=l/this.fixedNumber[0]*this.fixedNumber[1]),n>this.h&&(l=(n=this.h)/this.fixedNumber[1]*this.fixedNumber[0]),this.changeCrop(l,n)},changeCrop(t,o){if(this.centerBox){let a=this.getImgAxis();t>a.x2-a.x1&&(o=(t=a.x2-a.x1)/this.fixedNumber[0]*this.fixedNumber[1]),o>a.y2-a.y1&&(t=(o=a.y2-a.y1)/this.fixedNumber[1]*this.fixedNumber[0])}this.cropW=t,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(t,o,a){t=t||this.x,o=o||this.y,a=a||this.scale;let i=!0;if(this.centerBox){let l=this.getImgAxis(t,o,a),n=this.getCropAxis();l.x1>=n.x1&&(i=!1),l.x2<=n.x2&&(i=!1),l.y1>=n.y1&&(i=!1),l.y2<=n.y2&&(i=!1),i||this.changeImgScale(l,n,a)}return i},changeImgScale(t,o,a){let i=this.trueWidth,l=this.trueHeight,n=i*a,r=l*a;if(n>=this.cropW&&r>=this.cropH)this.scale=a;else{const c=this.cropW/i,d=this.cropH/l,p=this.cropH<=l*c?c:d;this.scale=p,n=i*p,r=l*p}this.imgIsQqualCrop||(t.x1>=o.x1&&(this.isRotateRightOrLeft?this.x=o.x1-(i-n)/2-(n-r)/2:this.x=o.x1-(i-n)/2),t.x2<=o.x2&&(this.isRotateRightOrLeft?this.x=o.x1-(i-n)/2-(n-r)/2-r+this.cropW:this.x=o.x2-(i-n)/2-n),t.y1>=o.y1&&(this.isRotateRightOrLeft?this.y=o.y1-(l-r)/2-(r-n)/2:this.y=o.y1-(l-r)/2),t.y2<=o.y2&&(this.isRotateRightOrLeft?this.y=o.y2-(l-r)/2-(r-n)/2-n:this.y=o.y2-(l-r)/2-r)),(n<this.cropW||r<this.cropH)&&(this.imgIsQqualCrop=!0)}},mounted(){this.support="onwheel"in document.createElement("div")?"wheel":document.onmousewheel!==void 0?"mousewheel":"DOMMouseScroll";let t=this;var o=navigator.userAgent;this.isIOS=!!o.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/),HTMLCanvasElement.prototype.toBlob||Object.defineProperty(HTMLCanvasElement.prototype,"toBlob",{value:function(a,i,l){for(var n=atob(this.toDataURL(i,l).split(",")[1]),r=n.length,c=new Uint8Array(r),d=0;d<r;d++)c[d]=n.charCodeAt(d);a(new Blob([c],{type:t.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()}}),xi={key:0,class:"cropper-box"},Si=["src"],Ni={class:"cropper-view-box"},Bi=["src"],Ei={key:1},Di={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:wi(Vi,[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",{class:"vue-cropper",ref:"cropper",onMouseover:o[28]||(o[28]=(...r)=>t.scaleImg&&t.scaleImg(...r)),onMouseout:o[29]||(o[29]=(...r)=>t.cancelScale&&t.cancelScale(...r))},[t.imgs?(e.openBlock(),e.createElementBlock("div",xi,[e.withDirectives(e.createElementVNode("div",{class:"cropper-box-canvas",style:e.normalizeStyle({width:t.trueWidth+"px",height:t.trueHeight+"px",transform:"scale("+t.scale+","+t.scale+") translate3d("+t.x/t.scale+"px,"+t.y/t.scale+"px,0)rotateZ("+90*t.rotate+"deg)"})},[e.createElementVNode("img",{src:t.imgs,alt:"cropper-img",ref:"cropperImg"},null,8,Si)],4),[[e.vShow,!t.loading]])])):e.createCommentVNode("",!0),e.createElementVNode("div",{class:e.normalizeClass(["cropper-drag-box",{"cropper-move":t.move&&!t.crop,"cropper-crop":t.crop,"cropper-modal":t.cropping}]),onMousedown:o[0]||(o[0]=(...r)=>t.startMove&&t.startMove(...r)),onTouchstart:o[1]||(o[1]=(...r)=>t.startMove&&t.startMove(...r))},null,34),e.withDirectives(e.createElementVNode("div",{class:"cropper-crop-box",style:e.normalizeStyle({width:t.cropW+"px",height:t.cropH+"px",transform:"translate3d("+t.cropOffsertX+"px,"+t.cropOffsertY+"px,0)"})},[e.createElementVNode("span",Ni,[e.createElementVNode("img",{style:e.normalizeStyle({width:t.trueWidth+"px",height:t.trueHeight+"px",transform:"scale("+t.scale+","+t.scale+") translate3d("+(t.x-t.cropOffsertX)/t.scale+"px,"+(t.y-t.cropOffsertY)/t.scale+"px,0)rotateZ("+90*t.rotate+"deg)"}),src:t.imgs,alt:"cropper-img"},null,12,Bi)]),e.createElementVNode("span",{class:"cropper-face cropper-move",onMousedown:o[2]||(o[2]=(...r)=>t.cropMove&&t.cropMove(...r)),onTouchstart:o[3]||(o[3]=(...r)=>t.cropMove&&t.cropMove(...r))},null,32),t.info?(e.openBlock(),e.createElementBlock("span",{key:0,class:"crop-info",style:e.normalizeStyle({top:t.cropInfo.top})},e.toDisplayString(t.cropInfo.width)+" × "+e.toDisplayString(t.cropInfo.height),5)):e.createCommentVNode("",!0),t.fixedBox?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("span",Ei,[e.createElementVNode("span",{class:"crop-line line-w",onMousedown:o[4]||(o[4]=r=>t.changeCropSize(r,!1,!0,0,1)),onTouchstart:o[5]||(o[5]=r=>t.changeCropSize(r,!1,!0,0,1))},null,32),e.createElementVNode("span",{class:"crop-line line-a",onMousedown:o[6]||(o[6]=r=>t.changeCropSize(r,!0,!1,1,0)),onTouchstart:o[7]||(o[7]=r=>t.changeCropSize(r,!0,!1,1,0))},null,32),e.createElementVNode("span",{class:"crop-line line-s",onMousedown:o[8]||(o[8]=r=>t.changeCropSize(r,!1,!0,0,2)),onTouchstart:o[9]||(o[9]=r=>t.changeCropSize(r,!1,!0,0,2))},null,32),e.createElementVNode("span",{class:"crop-line line-d",onMousedown:o[10]||(o[10]=r=>t.changeCropSize(r,!0,!1,2,0)),onTouchstart:o[11]||(o[11]=r=>t.changeCropSize(r,!0,!1,2,0))},null,32),e.createElementVNode("span",{class:"crop-point point1",onMousedown:o[12]||(o[12]=r=>t.changeCropSize(r,!0,!0,1,1)),onTouchstart:o[13]||(o[13]=r=>t.changeCropSize(r,!0,!0,1,1))},null,32),e.createElementVNode("span",{class:"crop-point point2",onMousedown:o[14]||(o[14]=r=>t.changeCropSize(r,!1,!0,0,1)),onTouchstart:o[15]||(o[15]=r=>t.changeCropSize(r,!1,!0,0,1))},null,32),e.createElementVNode("span",{class:"crop-point point3",onMousedown:o[16]||(o[16]=r=>t.changeCropSize(r,!0,!0,2,1)),onTouchstart:o[17]||(o[17]=r=>t.changeCropSize(r,!0,!0,2,1))},null,32),e.createElementVNode("span",{class:"crop-point point4",onMousedown:o[18]||(o[18]=r=>t.changeCropSize(r,!0,!1,1,0)),onTouchstart:o[19]||(o[19]=r=>t.changeCropSize(r,!0,!1,1,0))},null,32),e.createElementVNode("span",{class:"crop-point point5",onMousedown:o[20]||(o[20]=r=>t.changeCropSize(r,!0,!1,2,0)),onTouchstart:o[21]||(o[21]=r=>t.changeCropSize(r,!0,!1,2,0))},null,32),e.createElementVNode("span",{class:"crop-point point6",onMousedown:o[22]||(o[22]=r=>t.changeCropSize(r,!0,!0,1,2)),onTouchstart:o[23]||(o[23]=r=>t.changeCropSize(r,!0,!0,1,2))},null,32),e.createElementVNode("span",{class:"crop-point point7",onMousedown:o[24]||(o[24]=r=>t.changeCropSize(r,!1,!0,0,2)),onTouchstart:o[25]||(o[25]=r=>t.changeCropSize(r,!1,!0,0,2))},null,32),e.createElementVNode("span",{class:"crop-point point8",onMousedown:o[26]||(o[26]=r=>t.changeCropSize(r,!0,!0,2,2)),onTouchstart:o[27]||(o[27]=r=>t.changeCropSize(r,!0,!0,2,2))},null,32)]))],4),[[e.vShow,t.cropping]])],544)}],["__scopeId","data-v-a742df44"]])},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(t){this.cropDialogVisible=t,this.cropInit()},src(t){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(t=>{this.$emit("onSubmit",{file:t})})},_submit_base64(){this.$refs.cvAvatartCropper.getCropData(t=>{let o=new Image;o.src=t,o.onload=async()=>{imageCompress(o)}})},cropRotateRefresh(){},cropRotateLeft(){this.$refs.cvAvatartCropper.rotateLeft()},cropRotateRight(){this.$refs.cvAvatartCropper.rotateRight()},cropChangeScale(t){t=t||1,this.$refs.cvAvatartCropper.changeScale(t)},cropRealTime(t){this.cropPreviews=t}}},_i={class:"cv-upload-crop-box"},Ti={class:"cv-upload-crop-left-box"},Ii={class:"cv-upload-crop-left-opt"},Li={class:"cv-upload-crop-left-opt2"},Fi={class:"cv-upload-crop-left-opt2"},$i={class:"cv-upload-crop-right-box"},Oi=["innerHTML"],zi={title:"头像上传",name:"cvUploadAvatar",mixins:[lo],components:{UploadCrop:v(Di,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("vue-cropper"),c=e.resolveComponent("el-button"),d=e.resolveComponent("el-tooltip"),p=e.resolveComponent("el-input"),h=e.resolveComponent("el-dialog"),u=e.resolveDirective("loading");return e.openBlock(),e.createBlock(h,{title:a.title,modelValue:l.cropDialogVisible,"onUpdate:modelValue":o[7]||(o[7]=m=>l.cropDialogVisible=m),width:"800px","append-to-body":"",onOpened:n.cropDialogOpened,onClose:n.cropDialoClose},{footer:e.withCtx(()=>[e.createVNode(c,{type:"primary",onClick:n.cropSubmit,loading:a.loading,disabled:a.loading},{default:e.withCtx(()=>[...o[12]||(o[12]=[e.createTextVNode("提 交",-1)])]),_:1},8,["onClick","loading","disabled"])]),default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",_i,[e.createElementVNode("div",Ti,[l.cropVisible?(e.openBlock(),e.createBlock(r,e.mergeProps({key:0,ref:"cvAvatartCropper",img:l.cropBeforelImage},n.cropAttrs,{onRealTime:n.cropRealTime}),null,16,["img","onRealTime"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ii,[e.renderSlot(t.$slots,"default"),e.createVNode(d,{effect:"dark",content:"重置",placement:"top"},{default:e.withCtx(()=>[e.createVNode(c,{icon:"ElIconRefresh",onClick:o[0]||(o[0]=m=>n.cropRotateRefresh())})]),_:1}),e.createVNode(d,{effect:"dark",content:"放大",placement:"top"},{default:e.withCtx(()=>[e.createVNode(c,{icon:"ElIconZoomIn",onClick:o[1]||(o[1]=m=>n.cropChangeScale(1))})]),_:1}),e.createVNode(d,{effect:"dark",content:"缩小",placement:"top"},{default:e.withCtx(()=>[e.createVNode(c,{icon:"ElIconZoomOut",onClick:o[2]||(o[2]=m=>n.cropChangeScale(-1))})]),_:1}),e.createVNode(d,{effect:"dark",content:"向左旋转",placement:"top"},{default:e.withCtx(()=>[e.createVNode(c,{icon:"ElIconRefreshLeft",onClick:o[3]||(o[3]=m=>n.cropRotateLeft())})]),_:1}),e.createVNode(d,{effect:"dark",content:"向右旋转",placement:"top"},{default:e.withCtx(()=>[e.createVNode(c,{icon:"ElIconRefreshRight",onClick:o[4]||(o[4]=m=>n.cropRotateRight())})]),_:1})]),e.createElementVNode("div",Li,[e.createVNode(p,{size:"small"},{prepend:e.withCtx(()=>[...o[8]||(o[8]=[e.createTextVNode("X 坐标",-1)])]),_:1}),e.createVNode(p,{size:"small"},{prepend:e.withCtx(()=>[...o[9]||(o[9]=[e.createTextVNode("Y 坐标",-1)])]),_:1})]),e.createElementVNode("div",Fi,[e.createVNode(p,{size:"small",modelValue:l.cropLocalWidth,"onUpdate:modelValue":o[5]||(o[5]=m=>l.cropLocalWidth=m)},{prepend:e.withCtx(()=>[...o[10]||(o[10]=[e.createTextVNode("宽度",-1)])]),_:1},8,["modelValue"]),e.createVNode(p,{size:"small",modelValue:l.cropLocalHeight,"onUpdate:modelValue":o[6]||(o[6]=m=>l.cropLocalHeight=m)},{prepend:e.withCtx(()=>[...o[11]||(o[11]=[e.createTextVNode("高度",-1)])]),_:1},8,["modelValue"])])]),e.createElementVNode("div",$i,[e.createElementVNode("div",{class:"cv-upload-crop-preview",innerHTML:l.cropPreviews.html},null,8,Oi)])])),[[u,a.loading]])]),_:3},8,["title","modelValue","onOpened","onClose"])}]])},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:()=>({localValue:"",localList:[],upAccept:"image/*"}),computed:{localRef:()=>"cvUploadAvatar"+ +new Date+(1e3*Math.random()).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(t){this._init_parse()}},mounted(){this._init_parse()},methods:{_init_parse(){this.localValue=this.initValue||""},cropDialogOpen(){this.cropShow=!0,this.$nextTick(()=>{this._init_parse()})},initBeforeUpload(t){if(!this._commonBeforeUpload(t))return this.upIngLoading=!1,!1;if(this.crop){const o=new FileReader;o.readAsDataURL(t),o.onload=()=>{this.localValue=o.result},this.$refs.cvUploadAvatar.clearFiles()}},async onHttpRequest(t){const{file:o}=t;this.upIngLoading=!0;const a=this.mergeAttrs.signatureType||null,i=this.mergeAttrs.signatureFn||null,l=this.mergeAttrs.signatureParam||{};await Ko(o,a,i,l).then(n=>{this.$nextTick(()=>{this.$emit("update:modelValue",n.full_path),this.$emit("update:initValue",n.cdn_full_path)}),k.ElMessage.success("上传成功"),this.upIngLoading=!1,this.cropShow=!1}).catch(()=>{this.upIngLoading=!1})}}},Mi=["src"],pt=v(zi,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("upload-tip"),c=e.resolveComponent("cv-icons"),d=e.resolveComponent("el-button"),p=e.resolveComponent("el-tooltip"),h=e.resolveComponent("el-upload"),u=e.resolveComponent("upload-crop");return e.openBlock(),e.createElementBlock("div",{class:"cv-upload-avatar-wrap",onClick:o[2]||(o[2]=(...m)=>n.cropDialogOpen&&n.cropDialogOpen(...m))},[a.initValue?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",{key:0,class:"cv-upload-avatar-box cv-upload-avatar-empty",style:e.normalizeStyle(n.showStyle)},[...o[3]||(o[3]=[e.createElementVNode("div",{class:"cv-upload-avatar__text"},"上传头像",-1)])],4)),a.initValue?(e.openBlock(),e.createElementBlock("div",{key:1,class:"cv-upload-avatar-box",style:e.normalizeStyle(n.showStyle)},[e.createElementVNode("img",{class:"cv-upload-avatar__img",src:a.initValue},null,8,Mi)],4)):e.createCommentVNode("",!0),e.createVNode(r,e.mergeProps(t.tipAttr,{fileUnit:"张",multiple:!1,limit:1}),null,16),a.crop?(e.openBlock(),e.createBlock(u,{key:2,modelValue:t.cropShow,"onUpdate:modelValue":o[0]||(o[0]=m=>t.cropShow=m),title:"修改头像",size:a.showSize,onOnSubmit:n.onHttpRequest,onOnClose:o[1]||(o[1]=m=>t.upIngLoading=!1),loading:t.upIngLoading,src:l.localValue},{default:e.withCtx(()=>[e.createVNode(h,e.mergeProps(n.handlerAttr,{"before-upload":n.initBeforeUpload,"http-request":t.initHttpRequest}),{default:e.withCtx(()=>[e.createVNode(p,{effect:"dark",content:"选择图片",placement:"top"},{default:e.withCtx(()=>[e.createVNode(d,{style:{"margin-right":"10px"},loading:t.upIngLoading,disabled:t.upIngLoading},{default:e.withCtx(()=>[e.createVNode(c,{type:"ElIconPlus",size:"14",style:{"margin-right":"10px"}}),o[4]||(o[4]=e.createTextVNode(" 选择 ",-1))]),_:1},8,["loading","disabled"])]),_:1})]),_:1},16,["before-upload","http-request"])]),_:1},8,["modelValue","size","onOnSubmit","loading","src"])):e.createCommentVNode("",!0)])}]]);function ae(t){return t?typeof t=="string"||typeof t=="number"?[t]:Object.prototype.toString.call(t)==="[object Object]"?[]:[...t]:[]}function ha(t,o){let a=[];Array.isArray(t)&&t.length>0&&a.push(...t),Array.isArray(o)&&o.length>0&&a.push(...o),typeof o=="string"&&a.push(o);let i=[];for(let l in a){let n=a[l],r=Object.prototype.toString.call(n);r==="[object String]"?i.push(n):r==="[object Object]"&&n.url&&i.push(n.url)}return i}const Pi={title:"图片上传",name:"cvUploadImage",mixins:[lo],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:()=>({localValue:[],localList:[],previewShow:!1,previewTitle:"",previewUrl:"",upAccept:"image/*"}),computed:{localRef:()=>"cvUploadImage"+ +new Date+(1e3*Math.random()).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 t=this.showSize+"px";return(this.showBig||this.drag)&&(t=2*this.showSize+"px"),{width:t,height:this.showSize+"px",lineHeight:this.showSize+"px"}}},watch:{modelValue(t){this._init_parse_value()},initValue(t){this._init_parse_list()}},mounted(){},methods:{_init_parse_value(){if(this.modelValue)if(typeof this.modelValue=="string"&&this.modelValue.includes(",")){const t=String(this.modelValue).split(",").map(o=>o.trim());this.localValue=ae(t)}else this.localValue=ae(this.modelValue);else this.localValue=[]},_init_parse_list(){this.initValue?this.localList=Xo(this.initValue):this.localList=[]},initOnChange(t,o){},initBeforeUpload(t){return this.upIngLoading=!0,!!this._commonBeforeUpload(t)||(this.upIngLoading=!1,!1)},async initHttpRequest(t){const{file:o}=t;this.upIngLoading=!0,this.mergeAttrs.upResponseFn;const a=this.mergeAttrs.signatureType||null,i=this.mergeAttrs.signatureFn||null,l=this.mergeAttrs.signatureParam||{};await Ko(o,a,i,l).then(n=>{this.$nextTick(()=>{this.updateValue(n.filelog_id,n.cdn_full_path)}),k.ElMessage.success("上传成功"),this.upIngLoading=!1}).catch(()=>{this.upIngLoading=!1})},updateValue(t,o){if(this.multiple){let a=ha(this.localValue,t).join(",");this.$emit("update:modelValue",a)}else this.$emit("update:modelValue",t);if(this.multiple){let a=ha(this.localList,o);this.$emit("update:initValue",a)}else this.$emit("update:initValue",o)},handleItemPreview(t,o){t.raw,t.type.includes("image")?(this.previewTitle=t.name,this.previewUrl=t.url,this.previewShow=!0):window.open(t.url)},doRemove(t){this.multiple?(this.localValue.splice(t,1),this.localList.splice(t,1)):(this.localValue="",this.localList=[]),this.updateValue(null,null)},handleItemRemove(t,o){if(this.beforeRemove&&typeof this.beforeRemove=="function"){const a=this.multiple?this.localValue[o]:this.localValue,i=this.beforeRemove(a,this.localValue);i&&i.then?i.then(()=>{this.doRemove(o)},()=>{}):i!==!1&&this.doRemove(o)}else this.doRemove(o)},handleItemEdit(t,o){k.ElMessageBox.prompt("请输入文件地址","编辑",{confirmButtonText:"OK",cancelButtonText:"Cancel",inputValue:t.url||"",inputErrorMessage:"格式不正确"}).then(({value:a})=>{const i=a.split("/").pop(),l=i.split(".").pop().toLowerCase();if(!this.fileType.includes(l)){let d=this.fileType.join("、");return k.ElMessage.error(`文件格式错误,请填写类型,如:${d} 格式文件`),!1}const n=(function(d){if(!d)return"";const p=d.replace(/^\./,"").toLowerCase();return Ml.extensionToMime[p]||""})(l);if(!n)return k.ElMessage.error("文件格式错误"),!1;var r;(r=a).startsWith("http://")||r.startsWith("https://")||r.startsWith("//")||this.mergeAttrs?.baseDomain&&(a=this.mergeAttrs?.baseDomain+a);const c={name:i,status:"success",type:n,uid:Date.now(),url:a};this.localList[o]=c}).catch(()=>{})},handleItemCrop(t,o){}}},Hi={class:"cv-upload-image cv-upload-common"},Ai={class:"cv-upload-list-box el-upload-list el-upload-list--picture-card"},ji=["tabindex"],Ri={class:"el-upload-list__item-status-label"},Ui={class:"el-upload-list__item-actions"},Wi=["onClick"],Yi={class:"el-upload-list__item-delete"},qi={class:"el-upload-list__item-delete"},Xi=["onClick"],Ki={style:{margin:"0 auto"}},Gi=["src"],ht=v(Pi,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-image"),c=e.resolveComponent("cv-icons"),d=e.resolveComponent("el-upload"),p=e.resolveComponent("upload-tip"),h=e.resolveComponent("el-dialog"),u=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",Hi,[e.createElementVNode("div",Ai,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.localList,(m,f)=>(e.openBlock(),e.createElementBlock("section",{class:"el-upload-list__item is-success",key:f,tabindex:f,style:e.normalizeStyle(n.showStyle)},[e.createVNode(r,{class:"el-upload-list__item-thumbnail",lazy:a.lazy,src:m.url,style:e.normalizeStyle(n.showStyle),fit:"contain"},null,8,["lazy","src","style"]),e.createElementVNode("label",Ri,[e.createVNode(c,{type:"ElIconCheck",color:"#ffffff",size:"12"})]),e.createElementVNode("span",Ui,[e.createElementVNode("span",{class:"el-upload-list__item-preview",onClick:C=>n.handleItemPreview(m)},[e.createVNode(c,{type:"ElIconZoomIn",size:"20"})],8,Wi),e.createElementVNode("span",Yi,[e.createVNode(c,{type:"ElIconDelete",size:"20",onClick:C=>n.handleItemRemove(m,f)},null,8,["onClick"])]),e.createElementVNode("span",qi,[e.createVNode(c,{type:"ElIconEdit",size:"20",onClick:C=>n.handleItemEdit(m,f)},null,8,["onClick"])]),a.crop?(e.openBlock(),e.createElementBlock("span",{key:0,class:"el-upload-list__item-preview",onClick:C=>n.handleItemCrop(m)},[e.createVNode(c,{type:"ElIconCrop",size:"20"})],8,Xi)):e.createCommentVNode("",!0)])],12,ji))),128)),n.showUpload?(e.openBlock(),e.createBlock(d,e.mergeProps({key:0,class:"cv-upload-common-handle"},n.handlerAttr,{"file-list":l.localList,"before-upload":n.initBeforeUpload,"http-request":n.initHttpRequest,"on-change":n.initOnChange,"on-exceed":t.initOnExceed,style:n.showStyle}),{default:e.withCtx(()=>[e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:"cv-upload-common__ing",style:e.normalizeStyle(n.showStyle)},[a.drag?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(c,{type:"ElIconUpload",size:"24"}),o[1]||(o[1]=e.createElementVNode("div",{class:"el-upload__text"},[e.createTextVNode(" 将文件拖到此处,或 "),e.createElementVNode("em",null,"点击上传")],-1))],64)):(e.openBlock(),e.createBlock(c,{key:1,type:"ElIconPlus",size:a.showSize/3},null,8,["size"]))],4)),[[u,t.upIngLoading]])]),_:1},16,["file-list","before-upload","http-request","on-change","on-exceed","style"])):e.createCommentVNode("",!0)]),e.createVNode(p,e.mergeProps(t.tipAttr,{fileUnit:"张"}),null,16),e.createVNode(h,{modelValue:l.previewShow,"onUpdate:modelValue":o[0]||(o[0]=m=>l.previewShow=m),title:l.previewTitle,"append-to-body":""},{default:e.withCtx(()=>[e.createElementVNode("div",Ki,[e.createElementVNode("img",{width:"100%",src:l.previewUrl,style:{"max-width":"300px"}},null,8,Gi)])]),_:1},8,["modelValue","title"])])}]]),Zi={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 so(t){return`https://10ui.cn/default/icon_ext/${Zi[t]}.svg`}const Qi={name:"uploadList",props:{files:{type:Array,default:()=>[]},disabled:{type:Boolean,default:!1},isCanDownload:{type:Boolean,default:!0},isCanDelete:{type:Boolean,default:!0}},methods:{getExtension(t){return t.lastIndexOf(".")>-1&&so[t.slice(t.lastIndexOf(".")+1).toLowerCase()]||so.file},getSize:t=>t&&!isNaN(Number(t))?t:"",parsePercentage:t=>parseInt(t,10),handleDownload(t){t.url},handleDelete(t,o){this.$confirm("确认删除该文件吗? ").then(()=>{this.$emit("remove",t,o)}).catch(()=>{})}}},Ji=["src"],er={class:"cv-upload-list__item-content-action"},tr={title:"文件上传",inheritAttrs:!1,name:"cvUploadFile",mixins:[lo],components:{uploadList:v(Qi,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-link");return e.openBlock(),e.createBlock(e.TransitionGroup,{class:"cv-upload-file-list el-upload-list el-upload-list--text",name:"el-list",tag:"ul"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.files,(c,d)=>(e.openBlock(),e.createElementBlock("li",{key:c.uid,class:"el-upload-list__item cv-upload-list__item-content"},[e.createVNode(r,{href:c.url,underline:!1,target:"_blank"},{default:e.withCtx(()=>[e.createElementVNode("img",{src:n.getExtension(c.name),class:"el-upload-list__item-content-name-icon"},null,8,Ji),e.createElementVNode("span",null,e.toDisplayString(c.name),1)]),_:2},1032,["href"]),e.createElementVNode("div",er,[e.createVNode(r,{underline:!1},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(n.getSize(c.size)),1)]),_:2},1024),a.isCanDownload?(e.openBlock(),e.createBlock(r,{key:0,underline:!1,onClick:p=>n.handleDownload(c)},{default:e.withCtx(()=>[...o[0]||(o[0]=[e.createTextVNode("下载",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0),!a.disabled&&a.isCanDelete?(e.openBlock(),e.createBlock(r,{key:1,underline:!1,onClick:p=>n.handleDelete(d,c),type:"danger"},{default:e.withCtx(()=>[...o[1]||(o[1]=[e.createTextVNode(" 删除 ",-1)])]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])]))),128))]),_:1})}]])},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:()=>({localValue:[],localList:[]}),computed:{localRef:()=>"cvUploadFile"+ +new Date+(1e3*Math.random()).toFixed(0),handlerAttr(){return{ref:this.localRef,action:"#",limit:parseInt(this.limit),multiple:this.multiple,drag:!1,disabled:this.upIngLoading,showFileList:!0}},list(){let t=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()+t++,o)):[]}},watch:{initValue(t){this._init_parse()}},mounted(){this._init_parse()},methods:{_init_parse(){this.initValue?this.localList=Xo(this.initValue):this.localList=[]},initOnChange(t,o){this.localList=o},initBeforeUpload(t){return this._commonBeforeUpload(t)?!this.isCanUploadSame&&this.localList.some(o=>o.name+o.size===t.name+t.size)?(this.$message.error("此文件已上传!"),!1):!0:!1},upFileError(t){this.$message.error("上传失败, 请重试"),this.$emit("error",t)},upFileSuccess(t,o){this.upResponseFn&&typeof this.upResponseFn=="function"&&(t=this.upResponseFn(t,o,this.localList)),this.multiple?this.$emit("update:modelValue",[...this.localList,t]):this.$emit("update:modelValue",t),this.$emit("success",t,this.localList)},handleRemove(t,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(t){if(this.$emit("remove",this.list[t],this.list),this.localList.splice(t,1),this.multiple){const o=[...this.list];o.splice(t,1),this.$emit("update:modelValue",o||[])}else this.$emit("update:modelValue",null)}}},or={class:"cv-upload-file"},mt=v(tr,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-button"),c=e.resolveComponent("el-upload"),d=e.resolveComponent("upload-tip"),p=e.resolveComponent("upload-list");return e.openBlock(),e.createElementBlock("div",or,[e.createVNode(c,e.mergeProps({class:"cv-upload-file-uploader"},n.handlerAttr,{"file-list":l.localList,"onUpdate:fileList":o[0]||(o[0]=h=>l.localList=h),"before-upload":n.initBeforeUpload,"on-change":n.initOnChange,"on-exceed":t.initOnExceed,"on-error":n.upFileError,"on-success":n.upFileSuccess}),{default:e.withCtx(()=>[e.createVNode(r,{type:"primary",icon:"ElIconUpload"},{default:e.withCtx(()=>[...o[1]||(o[1]=[e.createTextVNode("上传文件",-1)])]),_:1})]),_:1},16,["file-list","before-upload","on-change","on-exceed","on-error","on-success"]),e.createVNode(d,e.mergeProps(t.tipAttr,{fileUnit:"个"}),null,16),e.createVNode(p,{disabled:a.disabled,files:n.list,isCanDelete:a.isCanDelete,isCanDownload:a.isCanDownload,onRemove:n.handleRemove},null,8,["disabled","files","isCanDelete","isCanDownload","onRemove"])])}]]),ar={class:"cv-upload-video"},lr={class:"cv-upload-list-box el-upload-list el-upload-list--picture-card"},nr=["tabindex"],ir=["src"],rr={class:"el-upload-list__item-status-label"},sr={class:"el-upload-list__item-actions"},cr=["onClick"],dr={class:"el-upload-list__item-delete"},pr={class:"el-upload-list__item-delete"},hr={key:0,style:{width:"500px",height:"300px",margin:"0 auto"}},mr=["src"],ut=v({title:"视频上传",name:"cvUploadVideo",mixins:[lo],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:()=>({localValue:"",localList:"",previewShow:!1,previewTitle:"",previewUrl:"",upAccept:"video/*"}),computed:{localRef:()=>"cvUploadVideo"+ +new Date+(1e3*Math.random()).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(t){this._init_parse_value()},initValue(t){this._init_parse_list()}},mounted(){this._init_parse_value(),this._init_parse_list()},methods:{_init_parse_value(){this.modelValue?this.localValue=ae(this.modelValue):this.localValue=""},_init_parse_list(){this.initValue?this.localList=Xo(this.initValue):this.localList=""},initBeforeUpload(t){return this.upIngLoading=!0,!!this._commonBeforeUpload(t)||(this.upIngLoading=!1,!1)},async initHttpRequest(t){const{file:o}=t;this.upIngLoading=!0,this.mergeAttrs.upResponseFn;const a=this.mergeAttrs.signatureType||null,i=this.mergeAttrs.signatureFn||null,l=this.mergeAttrs.signatureParam||{};await Ko(o,a,i,l).then(n=>{this.$nextTick(()=>{this.$emit("update:modelValue",n.full_path),this.$emit("update:initValue",n.cdn_full_path)}),ExtendMessage.success("上传成功"),this.upIngLoading=!1}).catch(()=>{this.upIngLoading=!1})},handleItemPreview(t,o){this.previewTitle=t.name,this.previewUrl=t.url,this.previewShow=!0},doRemove(t){this.localValue="",this.localList="",this.$emit("update:modelValue",""),this.$emit("update:initValue","")},handleItemRemove(t,o){if(this.beforeRemove&&typeof this.beforeRemove=="function"){const a=this.multiple?this.localValue[o]:this.localValue,i=this.beforeRemove(a,this.localValue);i&&i.then?i.then(()=>{this.doRemove(o)},()=>{}):i!==!1&&this.doRemove(o)}else this.doRemove(o)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("cv-icons"),c=e.resolveComponent("el-progress"),d=e.resolveComponent("el-upload"),p=e.resolveComponent("upload-tip"),h=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",ar,[e.createElementVNode("div",lr,[l.localList?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(l.localList,(u,m)=>(e.openBlock(),e.createElementBlock("section",{class:"el-upload-list__item is-success",key:m,tabindex:m,style:e.normalizeStyle(n.showStyle)},[e.createElementVNode("video",{class:"el-upload-list__item-thumbnail",autoplay:!1,src:u.url,style:e.normalizeStyle(n.showStyle)}," 您的浏览器不支持视频播放 ",12,ir),e.createElementVNode("label",rr,[e.createVNode(r,{type:"ElIconCheck",color:"#ffffff",size:"12"})]),e.createElementVNode("span",sr,[e.createElementVNode("span",{class:"el-upload-list__item-preview",onClick:f=>n.handleItemPreview(u)},[e.createVNode(r,{type:"ElIconVideoPlay",size:"20"})],8,cr),e.createElementVNode("span",dr,[e.createVNode(r,{type:"ElIconDelete",size:"20",onClick:f=>n.handleItemRemove(u,m)},null,8,["onClick"])]),e.createElementVNode("span",pr,[e.createVNode(r,{type:"ElIconEdit",size:"20",onClick:f=>t.handleItemEdit(u,m)},null,8,["onClick"])])])],12,nr))),128)):e.createCommentVNode("",!0),n.showUpload?(e.openBlock(),e.createBlock(d,e.mergeProps({key:1,class:"cv-upload-handler"},n.handlerAttr,{"before-upload":n.initBeforeUpload,"http-request":n.initHttpRequest,style:n.showStyle}),{default:e.withCtx(()=>[t.upIngPercent>0?(e.openBlock(),e.createBlock(c,{key:0,percentage:t.upIngPercent,style:{"margin-top":"20px"},type:"circle"},null,8,["percentage"])):(e.openBlock(),e.createElementBlock("div",{key:1,class:"cv-upload-video__ing",style:e.normalizeStyle(n.showStyle)},[e.createVNode(r,{type:"ElIconUpload",size:"24"}),o[1]||(o[1]=e.createElementVNode("div",{class:"el-upload__text"},[e.createTextVNode(" 将视频拖到此处,或 "),e.createElementVNode("em",null,"点击上传")],-1))],4))]),_:1},16,["before-upload","http-request","style"])):e.createCommentVNode("",!0)]),e.createVNode(p,e.mergeProps(t.tipAttr,{fileUnit:"个",limit:1}),null,16),e.createVNode(h,{modelValue:l.previewShow,"onUpdate:modelValue":o[0]||(o[0]=u=>l.previewShow=u),title:l.previewTitle,"append-to-body":""},{default:e.withCtx(()=>[l.previewShow?(e.openBlock(),e.createElementBlock("div",hr,[e.createElementVNode("video",{autoplay:!0,src:l.previewUrl,controls:"controls",style:{width:"500px",height:"300px"}}," 您的浏览器不支持视频播放 ",8,mr)])):e.createCommentVNode("",!0)]),_:1},8,["modelValue","title"])])}]]),ur={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:()=>({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:1048576,parallel:4,checkpoints:{}}),watch:{dialogVisible:{handler(t){t||(this.fileList=[],this.$refs.upload.uploadFiles=[])}},fileList:{handler(t){if(t.length){this.dialogVisible=!0;let o=[],a=[];t.forEach(i=>{i.raw.name.indexOf(".")===-1&&(i.errMsg="不支持此格式上传"),i.percentage===100?o.push(i):a.push(i)}),o.length===t.length?(this.pauseDisabled=!0,this.isDoing=!0):this.isDoing=!1,this.unList=a}},deep:!0}},mounted(){window.addEventListener("online",this.resumeUpload)},methods:{filterSize:ca,handleExceed(){this.$confirm("上传文件数量不能超过100个,请重新选择!","操作提示",{confirmButtonText:"确 定",cancelButtonText:"取 消",type:"warning"}).then(()=>{this.fileList=[],this.dialogVisible=!1}).catch(()=>{this.fileList=[]})},handleDeleteChangeFile(t){this.fileList.splice(t,1),this.fileList.length||(this.dialogVisible=!1)},fileTypeIcon(t){const{type:o}=t.raw,a=o.indexOf("video")!==-1,i=o.indexOf("image")!==-1,l=o.indexOf("audio")!==-1,n=o.indexOf("zip")!==-1,r=o.indexOf("wordprocessingml")!==-1,c=o.indexOf("pdf")!==-1,d=o.indexOf("text")!==-1,p=o.indexOf("sheet")!==-1;return a?"MP4":i?"JPG1":l?"mp3-1":n?"yasuo":r?"DOCX":c?"wenjianleixing-biaozhuntu-PDFwendang":d?"div-1":p?"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(t=>{t.client&&t.percentage<100&&t.client.cancel()}),this.dialogVisible=!1}).catch(()=>{})},async handleBeforeUpload(t){},handleStopChangeFile(t,o){o.isPlay=!o.isPlay,this.fileList.splice(t,1,o),o.isPlay?this.resumeMultipartUpload(o):o.client.cancel()},async starUpload(){this.uploadDisabled=!0,this.pauseDisabled=!1,this.multipartUpload()},async multipartUpload(){this.file?this.fileList.forEach(async t=>{t.isLoading=!0,await this.ossUploadHandle(t,this.fileList)}):k.ElMessage.error("请选择文件")},async resumeUpload(){this.pauseDisabled=!1,this.uploadDisabled=!0,this.resumeDisabled=!0,await this.resumeMultipartUpload()},stopUpload(){this.resumeDisabled=!1,this.pauseDisabled=!0,this.fileList.forEach(t=>{t.client.cancel(),t.isPlay=!1})},async change(t,o){this.fileMap[t]=o,this.map_max_key=t},async handle_network_speed_change(t,o,a){t-this.map_max_key>=1e4&&(this.fileMap={});for(let i=t;i<=o;i++){const l=await this.fileMap[i];l?await this.change(i,l+a):await this.change(i,a)}},handle_network_speed(t,o,a){const i=t.rt/1e3,l=new Date(t.headers.date).getTime(),n=l-i;let r=parseInt(o/i);return a===0&&(r=0),r===0||this.handle_network_speed_change(n,l,r),r?ca(r):0},async resetUpload(t,o){JSON.stringify(t).indexOf("Error")!==-1&&(o.client&&o.client.cancel(),o.client=await pa(this.signatureType,this.apiFunc),await this.resumeMultipartUpload(o))},async resumeMultipartUpload(t){if(t){const{tempCheckpoint:o}=t;this.resumeUploadFile(t,o)}else Object.values(this.checkpoints).forEach(o=>{const{uploadId:a}=o,i=this.fileList.findIndex(n=>n.upload===a),l=this.fileList[i];this.resumeUploadFile(l,o)})},async resumeUploadFile(t,o){const{uploadId:a,file:i,name:l}=o;try{const{raw:n,percentage:r}=t;t.partSize=0,r<100&&n.name.indexOf(".")!==-1&&t.client.multipartUpload(a,i,{parallel:this.parallel,partSize:this.partSize,progress:async(c,d,p)=>{await this.onUploadProgress(t,c,d,p,l)},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(t)}).catch(async c=>{await this.resetUpload(c,t)})}catch{}},async onUploadProgress(t,o,a,i,l){a&&(this.checkpoints[a.uploadId]=a,t.speed=this.handle_network_speed(i,this.partSize,o),t.tempCheckpoint=a,t.abortCheckpoint=a,t.upload=a.uploadId),t.isPlay=!0,t.isPlay&&(t.isLoading=!1),t.uploadName=l,t.percentage=Number((100*o).toFixed(2))},async ossUploadHandle(t){let o={pass:!0,filePath:""};try{const{raw:a,percentage:i}=t,l=a,n=await pa(this.signatureType,this.apiFunc,{},{secure:!0});if(this.signatureType=="aliyun_oss_type1"){if(t.client=n,t.partSize=0,i<100&&a.name.indexOf(".")!==-1){const r=n.dir+l.name;await t.client.multipartUpload(r,l,{parallel:this.parallel,partSize:this.partSize,progress:async(c,d,p)=>{await this.onUploadProgress(t,c,d,p,r)}}).then(()=>{this.$emit("upload:modelValue",this.fileList),this.resumeDisabled=!0,this.onCreatePanFile(t),this.unList.length&&this.uploadDisabled&&(this.resumeDisabled=!1)}).catch(async c=>{})}}else this.signatureType=="aliyun_oss_type2"&&Al(l,n)}catch(a){o={...a,pass:!1,filePath:""}}return o},getToday(){const t=new Date;return`${t.getFullYear()}${t.getMonth()+1}${t.getDate()}${t.getHours()}${t.getMinutes()}${t.getSeconds()}`},handleChange(t,o){o.forEach(a=>{a.client=null,a.isPlay=!1,a.isLoading=!1,a.abortCheckpoint=!1}),this.fileList=o,this.file=t.raw,this.uploadDisabled=!1,this.pauseDisabled=this.resumeDisabled=!0},handleDeleteFile(t){const o=t.indexOf(this.model);t.substring(o,t.length),this.$emit("on-delete"),this.fileList=[],k.ElMessage.success("删除成功")},async onCreatePanFile(t){await this.getParams(t),this.$emit("on-update")},handleMediaRes:t=>({image:async function(o){return new Promise(a=>{var i=new FileReader;i.onload=function(l){var n=l.target.result,r=new Image;r.onload=function(){a({Width:this.width,Height:this.height})},r.src=n},i.readAsDataURL(o)})},audio:async function(o){return new Promise(a=>{var i=new FileReader;i.onload=function(l){var n=l.target.result,r=new Audio;r.onloadeddata=function(){const c=r.duration;a({Duration:1e3*c})},r.src=n},i.readAsDataURL(o)})},video:async function(o){return new Promise(a=>{var i=URL.createObjectURL(o);const l=document.createElement("video");l.src=i,l.onloadeddata=function(){a({CoverImg:"",Duration:1e3*this.duration,Width:this.videoWidth,Height:this.videoHeight})}})}})[t],captureImage:(t,o)=>t+"?x-oss-process=video/snapshot,t_"+(o=o||"3000 ")+",f_jpg",async getParams(t){const{type:o}=t.raw,a=o.indexOf("video")!==-1,i=o.indexOf("image")!==-1,l=o.indexOf("audio")!==-1;let n,r="";return a?r="video":i?o.indexOf("adobe")===-1&&(r="image"):l&&(r="audio"),(a||i||l)&&r&&(n=await this.handleMediaRes(r)(t.raw)),{ResTitle:t.name,ResDescribe:"",OssKey:t.uploadName,ContentType:o||"application/octet-stream",ContentLength:t.size,...n}}}},gr={class:"oss-upload"},fr={class:"cv-upload-task-hd-title"},Cr={class:"cv-upload-task-hd-num"},vr={class:"cv-upload-task-opts"},yr={class:"cv-upload-task-lists"},kr={class:"cv-upload-task-item-name"},br={class:"name"},wr={class:"file-name-item"},Vr={key:0,class:"speed"},xr={key:1,class:"speed"},Sr={key:2,class:"success"},Nr={class:"total"},Br={key:0,class:"name error"},Er={class:"cv-upload-task-item-tool"},Dr=["onClick"],_r=["onClick"],gt=v({name:"cvUploadOss",mixins:[ur]},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-button"),c=e.resolveComponent("el-upload"),d=e.resolveComponent("el-progress"),p=e.resolveComponent("cv-icons"),h=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",gr,[e.createVNode(c,{ref:"upload",action:"","show-file-list":!1,multiple:"","on-change":t.handleChange,"before-upload":t.handleBeforeUpload,"auto-upload":!1,limit:100,"on-exceed":t.handleExceed,accept:t.accept},{default:e.withCtx(()=>[e.createVNode(r,{type:"primary",icon:"ElIconUpload",round:""},{default:e.withCtx(()=>[...o[1]||(o[1]=[e.createTextVNode("上 传",-1)])]),_:1})]),_:1},8,["on-change","before-upload","on-exceed","accept"]),e.createVNode(h,{modelValue:t.dialogVisible,"onUpdate:modelValue":o[0]||(o[0]=u=>t.dialogVisible=u),width:"650px",height:"500","destroy-on-close":"","close-on-click-modal":!1,"before-close":t.handleClose,style:{height:"500px"}},{header:e.withCtx(()=>[e.createElementVNode("div",fr,[o[2]||(o[2]=e.createElementVNode("span",null,"上传",-1)),e.createElementVNode("span",Cr,e.toDisplayString(t.fileList.length-t.unList.length)+"/"+e.toDisplayString(t.fileList.length),1)])]),default:e.withCtx(()=>[e.createElementVNode("div",vr,[e.createVNode(r,{type:"primary",icon:"ElIconVideoPlay",disabled:t.uploadDisabled,onClick:t.starUpload},{default:e.withCtx(()=>[...o[3]||(o[3]=[e.createTextVNode("开始上传",-1)])]),_:1},8,["disabled","onClick"]),e.createVNode(r,{type:"success",icon:"ElIconRefreshRight",disabled:t.resumeDisabled,onClick:t.resumeUpload},{default:e.withCtx(()=>[...o[4]||(o[4]=[e.createTextVNode("继续",-1)])]),_:1},8,["disabled","onClick"]),e.createVNode(r,{type:"danger",icon:"ElIconVideoPause",disabled:t.pauseDisabled,onClick:t.stopUpload},{default:e.withCtx(()=>[...o[5]||(o[5]=[e.createTextVNode("暂停",-1)])]),_:1},8,["disabled","onClick"])]),e.createElementVNode("div",yr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fileList,(u,m)=>(e.openBlock(),e.createElementBlock("div",{class:"cv-upload-task-item-box",key:m},[e.createElementVNode("div",kr,[e.createElementVNode("div",br,[e.createElementVNode("span",wr,e.toDisplayString(m+1)+"."+e.toDisplayString(u.name),1),u.isLoading&&!u.isPlay?(e.openBlock(),e.createElementBlock("span",Vr,"准备就绪")):e.createCommentVNode("",!0),u.isPlay&&u.percentage!==100?(e.openBlock(),e.createElementBlock("span",xr,e.toDisplayString(u.speed)+"/s",1)):e.createCommentVNode("",!0),u.percentage===100?(e.openBlock(),e.createElementBlock("span",Sr,"完成")):e.createCommentVNode("",!0),e.createElementVNode("div",Nr,e.toDisplayString(t.filterSize(u.size)),1)]),u.errMsg?(e.openBlock(),e.createElementBlock("span",Br,e.toDisplayString(u.errMsg),1)):e.createCommentVNode("",!0),u.percentage<100&&!u.errMsg?(e.openBlock(),e.createBlock(d,{key:1,percentage:u.percentage},null,8,["percentage"])):(e.openBlock(),e.createBlock(d,{key:2,percentage:u.percentage,status:u.errMsg?"exception":"success"},null,8,["percentage","status"]))]),e.createElementVNode("div",Er,[!u.percentage||0<u.percentage<100&&!u.isPlay?(e.openBlock(),e.createElementBlock("span",{key:0,class:"icon delete",onClick:f=>t.handleDeleteChangeFile(m)},[e.createVNode(p,{type:"ElIconClose"})],8,Dr)):e.createCommentVNode("",!0),u.percentage&&u.percentage!==100?(e.openBlock(),e.createElementBlock("span",{key:1,class:e.normalizeClass(["icon",u.isPlay?"delete":"success"]),onClick:f=>t.handleStopChangeFile(m,u)},[u.isPlay?(e.openBlock(),e.createBlock(p,{key:0,type:"ElIconVideoPause"})):(e.openBlock(),e.createBlock(p,{key:1,type:"ElIconCaretRight"}))],10,_r)):e.createCommentVNode("",!0)])]))),128))])]),_:1},8,["modelValue","before-close"])])}],["__scopeId","data-v-9c3ea43c"]]);pt.install=function(t){t.component(pt.name,pt)},ht.install=function(t){t.component(ht.name,ht)},mt.install=function(t){t.component(mt.name,mt)},ut.install=function(t){t.component(ut.name,ut)},gt.install=function(t){t.component(gt.name,gt)};const Tr={class:"tabs-header"},ft=v({name:"cvTabsJump",props:{tabPosition:{type:String,default:"top"}},provide(){return{addChildComponents:t=>{this.childComponents.push(t)},clearChildClass:()=>{this.childComponents.map(t=>{t.className=null})}}},data:()=>({childComponents:[]}),computed:{tabPositionClass(){return this.tabPosition=="left"?"left":this.tabPosition=="right"?"right":this.tabPosition=="bottom"?"bottom":"top"}},created(){},mounted(){}},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cv-tabs-jump",n.tabPositionClass])},[e.createElementVNode("div",Tr,[e.renderSlot(t.$slots,"default")])],2)}]]),Ir={name:"cvTabPane",emits:["click"],inject:["addChildComponents","clearChildClass"],data:()=>({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")}}},Lr={key:1},Ct=v(Ir,[["render",function(t,o,a,i,l,n){return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["cv-tab-pane",l.className]),onClick:o[0]||(o[0]=(...r)=>n.handleClick&&n.handleClick(...r))},[t.$slots.label?e.renderSlot(t.$slots,"label",{key:0}):(e.openBlock(),e.createElementBlock("span",Lr,e.toDisplayString(a.label),1))],2)),[[e.vShow,l.isshow]])}]]);ft.install=function(t){t.component(ft.name,ft)},Ct.install=function(t){t.component(Ct.name,Ct)};const Fr={class:"cv-draw-captcha"},$r=["width","height"],vt=v({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:()=>({localCode:""}),watch:{modelValue(t){this.localCode=t,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(t,o){for(let a=0;a<o;a++)this.localCode+=this.baseCode[this.randomNum(0,this.baseCode.length)]},randomNum:(t,o)=>Math.floor(Math.random()*(o-t)+t),randomColor(t,o){return"rgb("+this.randomNum(t,o)+","+this.randomNum(t,o)+","+this.randomNum(t,o)+")"},drawPic(){let t=document.getElementById("cv-draw-captcha").getContext("2d");t.textBaseline="bottom",t.fillStyle=this.randomColor(this.backgroundColorMin,this.backgroundColorMax),t.fillRect(0,0,this.contentWidth,this.contentHeight);for(let o=0;o<this.localCode.length;o++)this.drawText(t,this.localCode[o],o);this.drawLine(t),this.drawDot(t)},drawText(t,o,a){t.fillStyle=this.randomColor(this.colorMin,this.colorMax),t.font=this.randomNum(this.fontSizeMin,this.fontSizeMax)+"px SimHei";let i=(a+1)*(this.contentWidth/(this.localCode.length+1)),l=this.randomNum(this.fontSizeMax,this.contentHeight-5);var n=this.randomNum(-45,45);t.translate(i,l),t.rotate(n*Math.PI/180),t.fillText(o,0,0),t.rotate(-n*Math.PI/180),t.translate(-i,-l)},drawLine(t){for(let o=0;o<5;o++)t.strokeStyle=this.randomColor(this.lineColorMin,this.lineColorMax),t.beginPath(),t.moveTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),t.lineTo(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight)),t.stroke()},drawDot(t){for(let o=0;o<80;o++)t.fillStyle=this.randomColor(0,255),t.beginPath(),t.arc(this.randomNum(0,this.contentWidth),this.randomNum(0,this.contentHeight),1,0,2*Math.PI),t.fill()}}},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",Fr,[e.createElementVNode("canvas",{id:"cv-draw-captcha",width:a.contentWidth,height:a.contentHeight,onClick:o[0]||(o[0]=(...r)=>n.refreshCode&&n.refreshCode(...r))},null,8,$r)])}]]),yt=v({name:"cvDrawQrcode",data:()=>({})},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",null,"二维码")}]]);vt.install=function(t){t.component(vt.name,vt)},yt.install=function(t){t.component(yt.name,yt)};const Or={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:t=>t>0}},watch:{modelValue(t){this._init_parse_value()},localVal(t){this._parse_last()}},data:()=>({localVal:""}),mounted(){this._init_parse_value()},methods:{_init_parse_value(){if(this.modelValue)if(typeof this.modelValue=="string"&&this.modelValue.includes(",")){const t=String(this.modelValue).split(",").map(o=>o.trim());this.localVal=ae(t)}else this.localVal=ae(this.modelValue)},_parse_last(){let t=this.localVal,o=t.join(",");this.$emit("update:modelValue",o),t.length>=this.maxlength&&this.$emit("exceed-max-length",t.length)},addTag(){this.disabled||this.localVal.length>=this.maxlength||(this.localVal.push("新标签"),this.$nextTick(()=>{let t=this.localVal.length,o=this.$refs["newTag"+(t-1)][0],a=document.createRange();a.selectNodeContents(o),window.getSelection().removeAllRanges(),window.getSelection().addRange(a),this._parse_last()}))},checkTag(t){if(this.disabled)return;let o=this.$refs[`newTag${t}`][0].innerText.trim();o.length==0?this.localVal.pop():this.localVal[t]=o,this._parse_last()},removeTag(t){this.disabled||(this.localVal.splice(t,1),this._parse_last())}}},zr={class:"cv-tag-base"},Mr=["contenteditable","onKeyup","onBlur"],Pr={key:1,class:"cv-tag-maxlength-hint"},kt=v(Or,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-tag"),c=e.resolveComponent("cv-icons");return e.openBlock(),e.createElementBlock("div",zr,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.localVal,(d,p)=>(e.openBlock(),e.createBlock(r,e.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:p,onClose:h=>n.removeTag(p),disabled:a.disabled}),{default:e.withCtx(()=>[e.createElementVNode("div",{class:"cv-tag-item",contenteditable:!a.disabled&&"plaintext-only",ref_for:!0,ref:`newTag${p}`,onKeyup:e.withKeys(h=>!a.disabled&&n.checkTag(p),["enter"]),onBlur:h=>!a.disabled&&n.checkTag(p)},e.toDisplayString(d),41,Mr)]),_:2},1040,["onClose","disabled"]))),128)),!a.disabled&&l.localVal.length<a.maxlength?(e.openBlock(),e.createBlock(c,{key:0,type:"ElIconCirclePlus",size:"20",onClick:o[0]||(o[0]=d=>n.addTag())})):e.createCommentVNode("",!0),!a.disabled&&l.localVal.length>=a.maxlength?(e.openBlock(),e.createElementBlock("span",Pr,"已达到最大数量 ("+e.toDisplayString(a.maxlength)+")",1)):e.createCommentVNode("",!0)])}]]);kt.install=function(t){t.component(kt.name,kt)};const Hr={name:"cvTransferTable",props:{modelValue:{type:[Array],default:()=>[]},showQuery:{type:Boolean,default:!1},showPagination:{type:Boolean,default:!1},paginationCallBack:{type:Function,default:function(){return new Promise((t,o)=>{try{t({total:0,data:null})}catch{o()}})}},titleTexts:{type:Array,default:()=>["待选项","已选项"]},buttonTexts:{type:Array,default:()=>[]},queryTexts:{type:Array,default:()=>["查询","筛选"]},leftColumns:{type:Array,default:()=>[]},rightColumns:{type:Array,default(){}},minHeight:{type:String,default:"300px"},maxHeight:{type:String,default:"500px"},tableRowKey:{type:Function,default:t=>t&&t&&t.id}},data:()=>({leftTableData:[],rightTableData:[],pageIndex:1,pageSize:20,totalSize:0,leftSelection:[],rightSelection:[],leftQueryCondition:{},rightQueryCondition:{},rightConditionTemp:void 0}),watch:{modelValue(t){this.rightTableData=t}},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(t=>!this.rightTableData.some(o=>this.checkObjectIsEqual(t,o)))},calcRightTableData(){if(this.showQuery&&this.rightConditionTemp){const t=Object.keys(this.rightConditionTemp);return this.rightTableData.filter(o=>t.some(a=>{const i=o[a],l=this.rightConditionTemp[a].trim();return!i||String(i).indexOf(l)>-1}))}return this.rightTableData}},methods:{handleLeftSelectionChange(t){this.leftSelection=t},handleRightSelectionChange(t){this.rightSelection=t},handleLeftRowClick(t){this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))||this.$refs.leftTable.toggleRowSelection(t)},handleRightRowClick(t){this.$refs.rightTable.toggleRowSelection(t)},handleSizeChange(t){this.pageSize=t,this.handlePaginationCallBack()},handleCurrentChange(t){this.pageIndex=t,this.handlePaginationCallBack()},handlePaginationCallBack(){if(this.showPagination&&this.paginationCallBack){const t={pageIndex:this.pageIndex,pageSize:this.pageSize,...this.leftQueryCondition};this.paginationCallBack.call(null,t).then(o=>{o&&Array.isArray(o.data)&&(this.leftTableData=o.data,this.totalSize=o.total),this.$nextTick(()=>{this.leftTableData.forEach(a=>{const i=this.rightTableData.some(l=>this.checkObjectIsEqual(l,a));this.$refs.leftTable.toggleRowSelection(a,i)})})})}},handleRowStyle({row:t}){return this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))?{color:"blue"}:{}},handleSelectable(t){return!this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))},addToRight(){for(const t of this.leftSelection)this.rightTableData.some(o=>this.checkObjectIsEqual(o,t))||this.rightTableData.push(t);this.$emit("update:modelValue",this.rightTableData)},addToLeft(){this.rightSelection.forEach(t=>{const o=this.rightTableData.findIndex(a=>this.checkObjectIsEqual(a,t));if(o!==-1){this.rightTableData.splice(o,1);const a=this.leftTableData.find(i=>this.checkObjectIsEqual(i,t));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(t,o){return this.tableRowKey(t)===this.tableRowKey(o)},clear(){this.rightTableData=[],this.$refs.leftTable.clearSelection();for(const t in this.leftQueryCondition)this.leftQueryCondition[t]=void 0;for(const t in this.rightQueryCondition)this.rightQueryCondition[t]=void 0;this.pageIndex=1,this.handlePaginationCallBack()}}},Ar={class:"cv-transfer-table"},jr={class:"transfer-panel"},Rr={class:"transfer-panel-header"},Ur={key:0},Wr={style:{padding:"5px"}},Yr={class:"transfer-buttons"},qr={key:0,class:"button-text"},Xr={key:0,class:"button-text"},Kr={class:"transfer-panel"},Gr={class:"transfer-panel-header"},Zr={key:0},Qr={style:{padding:"5px"}},bt=v(Hr,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-button"),c=e.resolveComponent("el-form-item"),d=e.resolveComponent("el-form"),p=e.resolveComponent("el-table-column"),h=e.resolveComponent("el-table"),u=e.resolveComponent("el-pagination"),m=e.resolveComponent("cv-icons");return e.openBlock(),e.createElementBlock("div",Ar,[e.createElementVNode("div",jr,[e.createElementVNode("p",Rr,[e.createElementVNode("span",null,e.toDisplayString(a.titleTexts&&a.titleTexts[0]),1),e.createElementVNode("span",null,e.toDisplayString(l.leftSelection.length)+"/"+e.toDisplayString(l.leftTableData.length),1)]),a.showQuery?(e.openBlock(),e.createElementBlock("div",Ur,[e.createVNode(d,{inline:!0,model:l.leftQueryCondition,class:"cv-transfer-form"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"leftCondition",{scope:l.leftQueryCondition}),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(r,{type:"primary",onClick:o[0]||(o[0]=f=>n.onLeftQuerySubmit())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.queryTexts[0]),1)]),_:1})]),_:1})]),_:3},8,["model"])])):e.createCommentVNode("",!0),e.createVNode(h,{ref:"leftTable","max-height":a.maxHeight,height:a.minHeight,data:l.leftTableData,"row-key":a.tableRowKey,"row-style":n.handleRowStyle,onRowClick:n.handleLeftRowClick,onSelectionChange:n.handleLeftSelectionChange,border:"",stripe:""},{default:e.withCtx(()=>[e.createVNode(p,{width:"40px",type:"selection",selectable:n.handleSelectable},null,8,["selectable"]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.leftColumns,f=>(e.openBlock(),e.createBlock(p,{prop:f.id,key:f.id,label:f.label,width:f.width},{default:e.withCtx(C=>[e.renderSlot(t.$slots,"default",{scope:{row:C.row,col:f}},()=>[e.createElementVNode("span",null,e.toDisplayString(C.row[f.id]),1)])]),_:2},1032,["prop","label","width"]))),128))]),_:3},8,["max-height","height","data","row-key","row-style","onRowClick","onSelectionChange"]),e.createElementVNode("div",Wr,[a.showPagination?(e.openBlock(),e.createBlock(u,{key:0,onSizeChange:n.handleSizeChange,onCurrentChange:n.handleCurrentChange,"current-page":l.pageIndex,"page-sizes":[10,20,50,100],"page-size":l.pageSize,"pager-count":5,total:l.totalSize,layout:"total, sizes, prev, pager, next"},null,8,["onSizeChange","onCurrentChange","current-page","page-size","total"])):e.createCommentVNode("",!0)])]),e.createElementVNode("div",Yr,[e.createVNode(r,{type:"primary",class:e.normalizeClass(n.buttonClasses),disabled:n.disabledLeftButton,onClick:n.addToRight},{default:e.withCtx(()=>[a.buttonTexts[0]!==void 0?(e.openBlock(),e.createElementBlock("span",qr,e.toDisplayString(a.buttonTexts[0]),1)):e.createCommentVNode("",!0),e.createVNode(m,{type:"ElIconArrowRight"})]),_:1},8,["class","disabled","onClick"]),e.createVNode(r,{type:"primary",class:e.normalizeClass(n.buttonClasses),disabled:l.rightSelection.length===0,onClick:n.addToLeft},{default:e.withCtx(()=>[e.createVNode(m,{type:"ElIconArrowLeft"}),a.buttonTexts[1]!==void 0?(e.openBlock(),e.createElementBlock("span",Xr,e.toDisplayString(a.buttonTexts[1]),1)):e.createCommentVNode("",!0)]),_:1},8,["class","disabled","onClick"])]),e.createElementVNode("div",Kr,[e.createElementVNode("p",Gr,[e.createElementVNode("span",null,e.toDisplayString(a.titleTexts&&a.titleTexts[1]),1),e.createElementVNode("span",null,e.toDisplayString(l.rightSelection.length)+"/"+e.toDisplayString(l.rightTableData.length),1)]),a.showQuery?(e.openBlock(),e.createElementBlock("div",Zr,[e.createVNode(d,{inline:!0,model:l.rightQueryCondition,class:"cv-transfer-form"},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"rightCondition",{scope:l.rightQueryCondition}),e.createVNode(c,null,{default:e.withCtx(()=>[e.createVNode(r,{type:"primary",onClick:o[1]||(o[1]=f=>n.onRightQuerySubmit())},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.queryTexts[1]),1)]),_:1})]),_:1})]),_:3},8,["model"])])):e.createCommentVNode("",!0),e.createVNode(h,{ref:"rightTable","max-height":a.maxHeight,height:a.minHeight,data:n.calcRightTableData,"row-key":a.tableRowKey,onRowClick:n.handleRightRowClick,onSelectionChange:n.handleRightSelectionChange,border:"",stripe:""},{default:e.withCtx(()=>[e.createVNode(p,{width:"40px",type:"selection"}),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.rightColumns||a.leftColumns,f=>(e.openBlock(),e.createBlock(p,{prop:f.id,key:f.id,label:f.label,width:f.width},{default:e.withCtx(C=>[e.renderSlot(t.$slots,"default",{scope:{row:C.row,col:f}},()=>[e.createElementVNode("span",null,e.toDisplayString(C.row[f.id]),1)])]),_:2},1032,["prop","label","width"]))),128))]),_:3},8,["max-height","height","data","row-key","onRowClick","onSelectionChange"]),e.createElementVNode("div",Qr,[a.showPagination?(e.openBlock(),e.createBlock(u,{key:0,total:l.rightTableData.length,layout:"total"},null,8,["total"])):e.createCommentVNode("",!0)])])])}]]);bt.install=function(t){t.component(bt.name,bt)};const Go={provide(){return{pageCurr:this.loadConfigSetting.pageCurr||1,pageLimit:this.loadConfigSetting.pageLimit||10}},props:{...k.ElTable.props,modelValue:{type:[Array,Object],default:()=>[]},headerCellStyle:{type:[Function,Object],default:()=>({})}},data:()=>({loadDataList:[]}),watch:{modelValue(t){this.loadDataList=t},loadDataList(t){this.$emit("update:modelValue",t)}},created(){this.loadDataList=this.modelValue},methods:{_getPageCurr(){return this.loadPageCurr},_getPageSize(){return this.loadPageLimit},handleCurrentChange(t){this.loadPageCurr=t,this.getData()},handleSizeChange(t){this.loadPageLimit=t,this.getData()}}},Jr={name:"cvTableBase",mixins:[oo,Go],props:{align:{type:String,default:"left"},showPagebreak:{type:[Boolean,String],default:!0},tablePagin:{type:Object,default:()=>({})},tableConfig:{type:Object,default:()=>({})},tableRefresh:{type:Number,default:()=>0}},data:()=>({paginationGroup:[10,20,30,50,100,200],paginationCount:7,searchData:{},tableConfDef:{}}),watch:{tableRefresh(t,o){this.initConfAll(),this.refresh()}},updated(){},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(t){this.$emit("selection-change",t)},initConfAll(){let t={};Object.assign(t,this.loadConfigDef,this.tableConfDef,this.tableConfig),this.loadPageCurr=t.pageCurr||1,this.loadPageLimit=t.pageLimit||this.paginationGroup[0],Object.assign(t.where,this.searchData),this.loadConfigSetting=t},searchSubmit(t){this.searchData=t||{},this.loadConfigSetting.isSkip?this.searchData:(this.page=1,this.getData())},searchReset(t){this.searchData={},this.page=1,this.getData()},refresh(t){this.getData()}}},es={class:"cv-table-list"},ts={key:0,class:"cv-tablie-list-page page"},wt=v(Jr,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table"),c=e.resolveComponent("cv-icons"),d=e.resolveComponent("el-button"),p=e.resolveComponent("el-pagination"),h=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",es,[e.withDirectives((e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{data:t.loadDataList,style:{width:"100%"},onSelectionChange:n.handleSelectionChange}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["data","onSelectionChange"])),[[h,t.loadDataLoading]]),a.showPagebreak?e.withDirectives((e.openBlock(),e.createElementBlock("div",ts,[e.createVNode(d,{onClick:n.refresh,style:{float:"left",margin:"0 10px 0 0",padding:"5px 10px"}},{default:e.withCtx(()=>[e.createVNode(c,{type:"ElIconRefresh",size:"14"})]),_:1},8,["onClick"]),e.createVNode(p,{background:"",onSizeChange:t.handleSizeChange,onCurrentChange:t.handleCurrentChange,"pager-count":l.paginationCount,"page-sizes":l.paginationGroup,"current-page":t.loadPageCurr,"page-size":t.loadPageLimit,layout:"total, sizes, prev, pager, next, jumper",total:t.loadDataTotal},null,8,["onSizeChange","onCurrentChange","pager-count","page-sizes","current-page","page-size","total"])],512)),[[e.vShow,t.loadDataLoading===!1]]):e.createCommentVNode("",!0)])}]]),os={class:"cv-table-tree"},Vt=v({name:"cvTableTree",mixins:[oo,Go],props:{tableConfig:{type:Object,default:()=>({})},tableRefresh:{type:Number,default:()=>0}},data:()=>({searchData:{},tableConfDef:{tablePrimary:"",childName:"children"},pager_count:7,page:1}),watch:{tableRefresh(t,o){this.refresh()}},created(){this.initConfAll(),this.getData()},mounted(){},methods:{getData(){this.loadDataList=[],this.loadGetData()},handleSelectionChange(t){this.$emit("selection-change",t)},initConfAll(){let t={};Object.assign(t,this.loadConfigDef,this.tableConfDef,this.tableConfig),Object.assign(t.where,this.searchData),this.loadConfigSetting=t},searchSubmit(t){this.searchData=t||{},this.loadConfigSetting.isSkip?this.searchData:(this.page=1,this.getData())},searchReset(t){this.searchData={},this.page=1,this.getData()},refresh(t){this.getData()}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table"),c=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",os,[e.withDirectives((e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{data:t.loadDataList,style:{width:"100%"},onSelectionChange:n.handleSelectionChange,"row-key":t.loadConfigSetting.tablePrimary,"tree-props":{children:t.loadConfigSetting.childName,hasChildren:"hasChildren"}}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["data","onSelectionChange","row-key","tree-props"])),[[c,t.loadDataLoading]])])}]]),as={name:"cvTableEditor",mixins:[oo,Go],props:{border:{type:[Boolean],default:!0},tableConfig:{type:[Array,Object],default:()=>({})}},data:()=>({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(t,o,a,i){switch(this.cell_click_index=t.index,this.cell_click_label=o.label,o.label){case"taskid":case"taskname":this.cell_click_index=t.index,this.cell_click_label=o.label;break;default:return}},handleChangeTData(t){}}},ls={class:"cv-table-editor"},xt=v(as,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table"),c=e.resolveDirective("loading");return e.openBlock(),e.createElementBlock("div",ls,[e.withDirectives((e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{data:t.loadDataList,style:{width:"100%"},"row-class-name":"cv-tbed-tr"}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["data"])),[[c,t.loadDataLoading]])])}]]),St=v({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:()=>({}),created(){},methods:{indexMethod(t){return this.continuity&&this.pageCurr&&this.pageLimit?t+1+(this.pageCurr-1)*this.pageLimit:t+1}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{type:"index",index:n.indexMethod}),null,16,["index"])}]]),Nt=v({name:"cvTbColumnCheck",props:{...k.ElTableColumn.props,fixed:{type:[String],default:"left"},align:{type:[String],default:"center"},width:{type:[String,Number],default:55}},data:()=>({}),created(){}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{type:"selection"}),null,16)}]]),ns={name:"cvTbColumnText",props:{...k.ElTableColumn.props},data:()=>({}),created(){},methods:{getContentText(t){let o=t.row[this.prop];return this.formatter&&(o=this.formatter(t.row,t.column)),o}}},is={style:{display:"contents"}},Bt=v(ns,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(c=>[e.createElementVNode("div",is,e.toDisplayString(c.row[t.prop]),1)]),_:1},16)}]]),rs={name:"cvTbColumnImg",props:{...k.ElTableColumn.props,imgWidth:{type:[String,Number],default:null},imgHeight:{type:[String,Number],default:null}},data:()=>({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(t){let o=t[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(t){let o=t[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(t){let o=t[this.prop]||null;return o?Object.prototype.toString.call(o)==="[object Array]"?o.length:Object.prototype.toString.call(o)==="[object String]"?1:void 0:0}}},ss={key:0,class:"cv-table-column-img-mark"},cs={class:"cv-table-column-img-text"},Et=v(rs,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-image"),c=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(c,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(d=>[e.createElementVNode("div",{class:"cv-table-column-img-box",style:e.normalizeStyle({width:l.localImgWidth,height:l.localImgHeight})},[e.createVNode(r,{style:e.normalizeStyle({width:l.localImgWidth,height:l.localImgHeight}),fit:"scale-down",lazy:"",src:n.handleImgOne(d.row),"preview-src-list":n.handleImgArr(d.row),"preview-teleported":!0},{error:e.withCtx(()=>[...o[0]||(o[0]=[e.createElementVNode("span",{class:"el-image__error cv-table-column-img-err"},[e.createTextVNode(" 暂无 "),e.createElementVNode("br"),e.createTextVNode(" 图片 ")],-1)])]),_:1},8,["style","src","preview-src-list"]),n.handleImgLeng(d.row)>1?(e.openBlock(),e.createElementBlock("p",ss,[e.createElementVNode("span",cs,e.toDisplayString(n.handleImgLeng(d.row))+"张",1)])):e.createCommentVNode("",!0)],4)]),_:1},16)}]]),Dt=v({name:"cvTbColumnOpt",props:{...k.ElTableColumn.props,fixed:{type:[String],default:"right"},label:{type:[String],default:"操作"}},data:()=>({}),created(){}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(c=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({row:c.row,$index:c.$index,scope:c})))]),_:3},16)}]]),_t=v({name:"cvTbColumnBase",props:{...k.ElTableColumn.props,width:{type:[String,Number],default:""}},data:()=>({}),created(){}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(c=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({row:c.row,$index:c.$index,scope:c})))]),_:3},16)}]]),Tt=v({name:"cvTbColumnExpand",props:{...k.ElTableColumn.props},data:()=>({}),created(){}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{type:"expand"}),{default:e.withCtx(c=>[e.renderSlot(t.$slots,"default",e.normalizeProps(e.guardReactiveProps({row:c.row,$index:c.$index,props:c})))]),_:3},16)}]]),It=v({name:"cvTbColumnEnum",props:{...k.ElTableColumn.props,dataLists:{type:[Object,Array],default:()=>({})}},data:()=>({}),created(){},methods:{dealTypeEnum(t){let o=Object.keys(this.dataLists);return t[this.prop]?this.dataLists[t[this.prop]]||"":this.dataLists[o[0]]||""}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(c=>[e.createElementVNode("span",null,e.toDisplayString(n.dealTypeEnum(c.row)),1)]),_:1},16)}]]),ds={name:"cvTbEditSearch",props:{...k.ElTableColumn.props,modelValue:{type:[String],default:""},align:{type:[String],default:"left"}},data:()=>({isEditIndex:null,localVal:"",autocompleteAttr:{debounce:0},searchSett:{searchFunc:null,searchParam:{},searchMockData:null,searchField:{}},searchResList:[],searchCurrClass:"",searchCurrTbIndex:0,searchIsSelect:!1}),watch:{modelValue(t){},localVal(t){this.$emit("update:modelValue",t)}},directives:{edfocus:{mounted:t=>{}}},created(){},methods:{searchEdit(t,o){this.isEditIndex=o,this.$nextTick(()=>{this.$refs[`cv-tbce-autocomplete${o}`].focus()})},searchSave(t,o){this.isEditIndex=null},searchSelect(t,o,a){this.searchIsSelect=!0,this.localTableData[a]=Object.assign(this.localTableData[a],t),this.localTableData[a].row_num=1,t.row_attr?this.localTableData[a].row_name=t.row_name+`<br><span class="cv-tbce-showtext-attr">[ ${t.row_attr} ]</span>`:this.localTableData[a].row_name=t.row_name},searchFocus(t,o){this.searchCurrClass="cvtegac"+t,this.searchCurrTbIndex=t},searchBlur(t,o){this.searchIsSelect||(this.isEditIndex=null)},searchQuery(t,o){this.searchIsSelect=!1,this.searchResList=[];const a=this.searchSett;if(a.searchMockData!=null&&a.searchMockData){if(!(typeof a.searchMockData!="Array"&&typeof a.searchMockData!="object")){const i=this.sortOutData(a.searchMockData);this.tableData=i,this.$message({message:i.msg||"",type:"warning",duration:1300})}this.$nextTick(()=>{this.tableLoading=!1})}else a.searchFunc&&typeof a.searchFunc=="function"&&a.searchFunc({page:1,pagesize:20,keyword:t,...a.searchParam}).then(i=>{this.searchResList=[...i.data],this.searchParseData(t,o)})},searchParseData(t,o){var a=[],i=[];const l=this.searchSett;if(this.searchResList.length>0){for(let n in this.searchResList){let r=this.searchResList[n];const c=l.searchField.row_price;r.row_price=r[c];const d=l.searchField.row_stock;r.row_stock=r[d];const p=l.searchField.row_attr;r.row_attr=r[p];const h=l.searchField.row_name;r.row_name=r[h];const u=l.searchField.row_unit;r.row_unit=r[u];const m=l.searchField.row_id;r.row_id=r[m],r.value=r.row_name,i.push(r)}a=i}clearTimeout(this.timeout),this.timeout=setTimeout(()=>{o(a)},600)},inputSearchFilter:t=>o=>o.value.toLowerCase().indexOf(t.toLowerCase())===0,searchIconClick(){this.isEditIndex=null}}},ps={class:"name"},hs={class:"addr"},ms={class:"addr"},us={class:"droplist-item"},gs={class:"name"},fs={key:0,class:"attr"},Cs={class:"price"},vs={class:"rest"},ys=["onClick"],Lt=v(ds,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("ElIconCircleClose"),c=e.resolveComponent("el-icon"),d=e.resolveComponent("el-autocomplete"),p=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(p,e.mergeProps(t.$props,{"class-name":"cv-table-editor-search-column"}),{default:e.withCtx(h=>[l.isEditIndex==h.$index?(e.openBlock(),e.createBlock(d,e.mergeProps({key:0,ref:`cv-tbce-autocomplete${h.$index}`},l.autocompleteAttr,{modelValue:h.row[t.prop],"onUpdate:modelValue":u=>h.row[t.prop]=u,"popper-class":`cv-tbce-autocomplete cvtegac${h.$index}`,"fetch-suggestions":n.searchQuery,onSelect:u=>n.searchSelect(u,h.row,h.$index),onFocus:u=>n.searchFocus(h.$index,u),onBlur:u=>n.searchBlur(h.row,h.$index)}),{suffix:e.withCtx(()=>[e.createVNode(c,{onClick:u=>n.searchIconClick(h.row,h.$index)},{default:e.withCtx(()=>[e.createVNode(r)]),_:1},8,["onClick"])]),default:e.withCtx(({item:u})=>[e.renderSlot(t.$slots,"default",{item:u},()=>[e.createElementVNode("div",ps,e.toDisplayString(u.row_name),1),e.createElementVNode("span",hs,"价格:"+e.toDisplayString(u.row_price),1),e.createElementVNode("span",ms,e.toDisplayString(u.row_rest),1),e.createElementVNode("div",us,[e.createElementVNode("div",gs,[e.createTextVNode(e.toDisplayString(u.row_name)+" ",1),u.row_attr?(e.openBlock(),e.createElementBlock("div",fs,"[ "+e.toDisplayString(u.row_attr)+"]",1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",Cs,"¥ "+e.toDisplayString(u.row_price),1),e.createElementVNode("div",vs,e.toDisplayString(u.attr_stock),1)])])]),_:2},1040,["modelValue","onUpdate:modelValue","popper-class","fetch-suggestions","onSelect","onFocus","onBlur"])):(e.openBlock(),e.createElementBlock("span",{key:1,class:"showtext",onClick:u=>n.searchEdit(h.row,h.$index)},e.toDisplayString(h.row[t.prop]),9,ys))]),_:3},16)}]]),Ft=v({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:()=>({localTbData:[]}),watch:{tableData(t){this.localTbData=t}},created(){this.localTbData=this.tableData},methods:{optHdDelete(t,o){this.localTbData.splice(t,1),this.localTbData.length<1&&this.optHdAdd()},optHdAdd(){this.localTbData.push({})}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("cv-icons"),c=e.resolveComponent("el-button"),d=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(d,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(p=>[a.btnAdd?(e.openBlock(),e.createBlock(c,{key:0,plain:"",style:{padding:"5px",width:"26px",height:"26px"},onClick:o[0]||(o[0]=h=>n.optHdAdd())},{default:e.withCtx(()=>[e.createVNode(r,{type:"ElIconPlus"})]),_:1})):e.createCommentVNode("",!0),a.btnDel?(e.openBlock(),e.createBlock(c,{key:1,plain:"",style:{padding:"5px",width:"26px",height:"26px"},onClick:h=>n.optHdDelete(p.$index,p.row)},{default:e.withCtx(()=>[e.createVNode(r,{type:"ElIconClose"})]),_:1},8,["onClick"])):e.createCommentVNode("",!0)]),_:1},16)}]]),ks={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:()=>({currValue:"",isEditIndex:null,isErrIndex:[]}),directives:{edfocus:{mounted:t=>{t.querySelector("input").focus()},inserted:function(t){t.querySelector("input").focus()}}},created(){},methods:{textIsError(t){return this.isErrIndex&&this.isErrIndex[t]&&this.isErrIndex[t][this.prop]},textHdEdit(t,o){this.isEditIndex=o},textHdClear(t,o){},textHdSave(t,o){this.isEditIndex=null;let a=t[this.prop];if(this.toFixed!=""){let i=parseInt(this.toFixed);isNaN(a)||(t[this.prop]=parseFloat(a).toFixed(i))}else t[this.prop]=a}},render22(t,o){let a=this;return t("el-table-column",{props:{...this.$props},scopedSlots:{default:i=>{this.currValue=i.row[this.prop];let l=i.$index;return this.isEditIndex==l?t("el-input",{props:{style:this.editStyle,class:this.editClass},domProps:{value:this.currValue},props:{placeholder:this.placeholder,value:this.param},nativeOn:{keyup:n=>{n.keyCode===13&&(this.$emit("update:param",n.target.value),this.callback&&this.callback())}},on:{blur:n=>{this.$emit("update:param",n.target.value),this.callback&&this.callback()},input:function(n){a.currValue=n||n.target.value},blur:n=>{this.isEditIndex=null,a.currValue=n||n.target.value}}},this.currValue):t("span",{class:{showtext:!0},on:{click:()=>{this.isEditIndex=l}}},this.currValue)}}})}},bs=["onClick"],$t=v(ks,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input"),c=e.resolveComponent("el-table-column"),d=e.resolveDirective("edfocus");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{"class-name":"cv-table-editor-text-column"}),{default:e.withCtx(p=>[l.isEditIndex!=p.$index||a.editAttr.disabled?(e.openBlock(),e.createElementBlock("span",{key:1,class:"showtext",onClick:h=>n.textHdEdit(p.row,p.$index)},e.toDisplayString(p.row[t.prop]),9,bs)):e.withDirectives((e.openBlock(),e.createBlock(r,e.mergeProps({key:0},a.editAttr,{clearable:a.editClearable,style:a.editStyle,class:a.editClass,modelValue:p.row[t.prop],"onUpdate:modelValue":h=>p.row[t.prop]=h,onBlur:e.withModifiers(h=>n.textHdSave(p.row,p.$index),["prevent"]),onClear:h=>n.textHdClear(p.row,p.$index)}),null,16,["clearable","style","class","modelValue","onUpdate:modelValue","onBlur","onClear"])),[[d]])]),_:1},16)}]]),Ot=v({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:()=>({}),created(){}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-radio"),c=e.resolveComponent("el-radio-group"),d=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(d,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(p=>[e.createVNode(c,e.mergeProps({style:a.editStyle,class:a.editClass,modelValue:p.row[t.prop],"onUpdate:modelValue":h=>p.row[t.prop]=h},a.editAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataLists,(h,u)=>(e.openBlock(),e.createBlock(r,{key:u,label:h[a.dataField.label],value:h[a.dataField.value]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h[a.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:1},16,["style","class","modelValue","onUpdate:modelValue"])]),_:1},16)}]]),zt=v({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:()=>({localVal:[]}),created(){},methods:{handleParseValue(t){this.localVal=[]}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-checkbox"),c=e.resolveComponent("el-checkbox-group"),d=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(d,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(p=>[p.row[t.prop]?(e.openBlock(),e.createBlock(c,e.mergeProps({key:0,style:a.editStyle,class:a.editClass,modelValue:p.row[t.prop],"onUpdate:modelValue":h=>p.row[t.prop]=h},a.editAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataLists,(h,u)=>(e.openBlock(),e.createBlock(r,{key:u,label:h[a.dataField.label],value:h[a.dataField.value]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h[a.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:1},16,["style","class","modelValue","onUpdate:modelValue"])):e.createCommentVNode("",!0)]),_:1},16)}]]),Mt=v({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:()=>({}),created(){}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-option"),c=e.resolveComponent("el-select"),d=e.resolveComponent("el-table-column");return e.openBlock(),e.createBlock(d,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(p=>[e.createVNode(c,e.mergeProps({style:a.editStyle,class:a.editClass,modelValue:p.row[t.prop],"onUpdate:modelValue":h=>p.row[t.prop]=h},a.editAttr),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.dataLists,(h,u)=>(e.openBlock(),e.createBlock(r,{key:u,label:h[a.dataField.label],value:h[a.dataField.value]},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(h[a.dataField.label]),1)]),_:2},1032,["label","value"]))),128))]),_:1},16,["style","class","modelValue","onUpdate:modelValue"])]),_:1},16)}]]);wt.install=function(t){t.component(wt.name,wt)},Vt.install=function(t){t.component(Vt.name,Vt)},xt.install=function(t){t.component(xt.name,xt)},St.install=function(t){t.component(St.name,St)},Nt.install=function(t){t.component(Nt.name,Nt)},Bt.install=function(t){t.component(Bt.name,Bt)},Et.install=function(t){t.component(Et.name,Et)},Dt.install=function(t){t.component(Dt.name,Dt)},_t.install=function(t){t.component(_t.name,_t)},Tt.install=function(t){t.component(Tt.name,Tt)},It.install=function(t){t.component(It.name,It)},Lt.install=function(t){t.component(Lt.name,Lt)},Ft.install=function(t){t.component(Ft.name,Ft)},$t.install=function(t){t.component($t.name,$t)},Ot.install=function(t){t.component(Ot.name,Ot)},zt.install=function(t){t.component(zt.name,zt)},Mt.install=function(t){t.component(Mt.name,Mt)};const ws={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg"},Vs=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",ws,[...o[0]||(o[0]=[e.createElementVNode("rect",{width:"12",height:"12",rx:"2",fill:"#86909C"},null,-1),e.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)])])}]]),xs={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},Ss=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",xs,[...o[0]||(o[0]=[e.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)])])}]]),Ns={class:"comment-common-icon"},Bs=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Ns,[...o[0]||(o[0]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},[e.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)])])}]]),Es={width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},Ds=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",Es,[...o[0]||(o[0]=[e.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)])])}]]),_s={class:"comment-common-icon"},Ts=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",_s,[...o[0]||(o[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.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)])])}]]),Is={class:"comment-common-icon",style:{color:"#1e80ff"}},Ls=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Is,[...o[0]||(o[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1534"},[e.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)])])}]]),Fs={class:"comment-common-icon"},$s=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Fs,[...o[0]||(o[0]=[e.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"},[e.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)])])}]]),Os={width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},zs=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("svg",Os,[...o[0]||(o[0]=[e.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)])])}]]),Ms={class:"comment-common-icon"},Ps=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Ms,[...o[0]||(o[0]=[e.createElementVNode("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:""},[e.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)])])}]]),Hs={class:"comment-common-icon"},As=v({},[["render",function(t,o){return e.openBlock(),e.createElementBlock("i",Hs,[...o[0]||(o[0]=[e.createElementVNode("svg",{viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"1320",width:"200",height:"200"},[e.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)])])}]]),js={class:"cv-comment-emoji"},Rs={class:"face-tooltip-head select-none"},Us=["onClick"],Ws=["src"],Ys={class:"emoji-body select-none"},qs={style:{padding:"0 5px"}},Xs=["onClick"],Ks={class:"emoji-btn select-none"},Gs={key:0},Zs=v(Object.assign({name:"CompInputEmoji"},{__name:"input-emoji",props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:"bottom"},emits:["addEmoji"],setup(t,{emit:o}){const a=t,i=e.ref(0),l=e.ref(0),n=e.ref(new Array(2)),{emojiList:r,faceList:c}=a.emoji;function d(){n.value[0]=r[0]}return(p,h)=>(e.openBlock(),e.createElementBlock("div",js,[e.createVNode(e.unref(k.ElPopover),{placement:t.placement,"popper-class":"emoji-popover",width:250,trigger:"click",onBeforeEnter:d},{reference:e.withCtx(()=>[e.createElementVNode("div",Ks,[p.$slots.default?e.renderSlot(p.$slots,"default",{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",Gs,[e.createVNode(e.unref(Ss)),h[0]||(h[0]=e.createElementVNode("span",null,"表情",-1))]))])]),default:e.withCtx(()=>[e.createElementVNode("div",Rs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(u,m)=>(e.openBlock(),e.createElementBlock("label",{key:m,class:e.normalizeClass(i.value==m?"active":""),onClick:f=>(function(C){switch(i.value=C,C){case 0:l.value=0;break;case 1:l.value=-50,n.value[1]=r[1]}})(m)},[e.createElementVNode("img",{src:u,alt:""},null,8,Ws)],10,Us))),128))]),e.createElementVNode("div",Ys,[e.createElementVNode("div",{class:"emjio-container",style:e.normalizeStyle({transform:`translateX(${l.value}%)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(u,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"emoji-wrapper"},[e.createVNode(e.unref(k.ElScrollbar),null,{default:e.withCtx(()=>[e.createElementVNode("div",qs,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u,(f,C)=>(e.openBlock(),e.createElementBlock("span",{key:C,class:"emoji-item",onClick:g=>p.$emit("addEmoji",C)},[e.createVNode(e.unref(k.ElImage),{src:f,title:String(C),class:"emoji",style:{width:"24px",height:"24px",margin:"5px"},lazy:""},null,8,["src","title"])],8,Xs))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,["placement"])]))}}),[["__scopeId","data-v-2fb59975"]]),Qs={class:"cv-comment-editor"},Js=["placeholder","innerHTML"],ec=["src"],tc=["onClick"],oc={key:0,class:"cv-comment-editor__action"},ac={__name:"input-box",props:{placeholder:"",contentBtn:"",parentId:"",reply:""},emits:["hide","close"],setup(t,{expose:o,emit:a}){const i=t,l=e.ref(""),n=e.ref(),r=e.ref(!1),c=e.ref(!1),d=e.ref(),p=e.ref(!0),h=e.ref(),u=e.ref(),m=e.ref([]),f=e.ref([]),C=e.reactive({imgLength:0}),g=64,y=e.ref(),b=e.ref(!1),w=e.ref(),V=e.computed(()=>g+"px"),N=e.computed(()=>"8px 12px"),E=a,{upload:L,submit:q,focus:G}=e.inject("InjectInputBox"),le=e.inject("InjectionEmojiApi");function oa(){q({content:i.reply?`回复 <span style="color: var(--cv-color-success-dark-2);">@${i.reply.user.username}:</span> ${l.value}`:l.value,parentId:oe(i.parentId,null),reply:i.reply,files:f.value,clear:()=>{d.value&&(d.value.innerHTML="",l.value=d.value.innerHTML,r.value=!1),m.value.length=0,f.value=[],p.value=!0,E("close")}})}function on(D){ee(l.value)&&!C.imgLength&&(c.value=!1,E("hide",D))}function an(D){b.value=!0,r.value=!0,c.value=!0,e.nextTick(()=>{h.value=document.querySelector("div[id^='el-popper-container']")}),G()}function ln(D){y.value=window.getSelection()?.getRangeAt(0),d.value?.innerHTML||(r.value=!1),b.value=!1}function nn(D){const{innerHTML:S}=D?.target||D;l.value=S||"",ee(l.value.replace(/&nbsp;|<br>| /g,""))?p.value=!0:p.value=!1}function aa(){e.nextTick(()=>{d.value?.focus()})}function rn(D){D.ctrlKey&&D.key=="Enter"&&(ee(l.value.replace(/&nbsp;|<br>| /g,""))?k.ElMessage({message:"内容不能为空",type:"info"}):oa())}function sn(D){m.value.length=0,f.value.length=0;const S=u.value?.files;if(C.imgLength=oe(S?.length,0),S)for(let _=0;_<S.length;_++){let Z=S[_].name,X=ai(S[_]);f.value.push(S[_]),oi(Z)?m.value.push(X):k.ElMessage({type:"warn",message:"请选择图片类型文件!",duration:2500})}}return e.watch(()=>l.value,D=>{b.value||(n.value=D)}),e.onMounted(()=>{d.value?.addEventListener("keyup",D=>{const S=D.target;S.innerHTML=="<br>"&&(S.innerHTML="")})}),o({focus:()=>aa()}),(D,S)=>e.withDirectives((e.openBlock(),e.createElementBlock("div",Qs,[e.createElementVNode("div",{class:e.normalizeClass(["cv-comment-editor__box",{active:r.value,"input-active":c.value}])},[e.createElementVNode("div",{ref_key:"editorRef",ref:d,class:"rich-input",contenteditable:"true",placeholder:i.placeholder,onFocus:an,onInput:nn,onBlur:ln,onKeydown:e.withKeys(rn,["enter"]),innerHTML:n.value,style:e.normalizeStyle({minHeight:V.value,padding:N.value})},null,44,Js),e.createElementVNode("div",{ref_key:"imageRef",ref:w,class:"image-preview-box"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m.value,(_,Z)=>(e.openBlock(),e.createElementBlock("div",{key:Z,class:"image-preview"},[e.createElementVNode("img",{src:_,alt:""},null,8,ec),e.createElementVNode("div",{class:"clean-btn",onClick:X=>{return la=Z,void m?.value?.splice(la,1);var la}},[e.createVNode(e.unref(Vs))],8,tc)]))),128))],512)],2),e.createVNode(e.Transition,{name:"fade"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",oc,[e.createElementVNode("div",null,[e.createVNode(Zs,{emoji:e.unref(le),onAddEmoji:S[0]||(S[0]=_=>(function(Z){let X=window.getSelection();X&&(X.removeAllRanges(),y.value||(aa(),y.value=X.getRangeAt(0)),y.value.deleteContents(),y.value.insertNode(y.value.createContextualFragment(Z)),y.value.collapse(!1),X.addRange(y.value),l.value=d?.value?.innerHTML||"",ee(l.value.replace(/&nbsp;|<br>| /g,""))?p.value=!0:p.value=!1)})(_))},null,8,["emoji"]),e.createElementVNode("div",{class:"picture",onClick:S[1]||(S[1]=(..._)=>u.value?.click&&u.value?.click(..._))},[e.createVNode(e.unref(Ds)),S[2]||(S[2]=e.createElementVNode("span",null,"图片",-1)),e.createElementVNode("input",{id:"comment-upload",ref_key:"inputRef",ref:u,type:"file",multiple:"",onChange:sn},null,544)])]),e.createElementVNode("div",null,[S[3]||(S[3]=e.createElementVNode("span",{style:{"margin-right":"10px"}},[e.createTextVNode(" 文明上网理性发言,请遵守 "),e.createElementVNode("a",{href:"###",target:"_blank"},"《新闻评论服务协议》")],-1)),e.createVNode(e.unref(k.ElButton),{type:"primary",disabled:p.value,onClick:oa},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.contentBtn),1)]),_:1},8,["disabled"])])])):e.createCommentVNode("",!0)]),_:1})])),[[e.unref(k.ClickOutside),on,h.value]])}},Rl=v(ac,[["__scopeId","data-v-e3fd437e"]]),lc={class:"u-fold"},nc={class:"action-box select-none"},ic=v(Object.assign({name:"UFold"},{__name:"fold",props:{line:{type:[Number,String],default:5}},setup(t){e.useCssVars(c=>({v15491e60:a.value}));const o=t,a=e.computed(()=>{let c=Math.trunc(Number(o.line));return c>0?c:1}),i=e.ref(!0),l=e.ref(!1),n=e.ref();let r;return e.onMounted(()=>{r=new ResizeObserver(c=>{i.value&&n.value&&(l.value=n.value.offsetHeight<n.value.scrollHeight)}),r.observe(n.value)}),e.onUnmounted(()=>{r.disconnect()}),(c,d)=>(e.openBlock(),e.createElementBlock("div",lc,[e.createElementVNode("div",{class:e.normalizeClass(["txt-box",{"over-hidden":i.value}])},[e.createElementVNode("div",{ref_key:"divBox",ref:n},[e.renderSlot(c.$slots,"default",{},void 0,!0)],512)],2),e.createElementVNode("div",nc,[l.value&&c.unfold?(e.openBlock(),e.createElementBlock("div",{key:0,class:"expand-btn",onClick:d[0]||(d[0]=p=>i.value=!i.value)},e.toDisplayString(i.value?"展开":"收起"),1)):e.createCommentVNode("",!0)])]))}}),[["__scopeId","data-v-94334818"]]),ma={__name:"user-card",props:{uid:""},setup(t){const o=e.ref({}),{showInfo:a}=e.inject("InjectContentBox"),i=e.inject("InjectSlots"),l=()=>e.h("div",i.card(o.value));return(n,r)=>e.unref(i).card?(e.openBlock(),e.createBlock(e.unref(k.ElPopover),{key:0,placement:"top",width:300,"show-after":300,onBeforeEnter:r[0]||(r[0]=()=>e.unref(a)(t.uid,c=>o.value=c))},{reference:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),default:e.withCtx(()=>[e.createVNode(l)]),_:3})):e.renderSlot(n.$slots,"default",{key:1})}},Zo=typeof window<"u"&&typeof document<"u";const rc=Object.prototype.toString;function co(t){return Array.isArray(t)?t:[t]}function sc(t,o,a={}){const{immediate:i=!0,immediateCallback:l=!1}=a,n=e.shallowRef(!1);let r;function c(){r&&(clearTimeout(r),r=void 0)}function d(){n.value=!1,c()}function p(...m){l&&t(),c(),n.value=!0,r=setTimeout(()=>{n.value=!1,r=void 0,t(...m)},e.toValue(o))}var h,u;return i&&(n.value=!0,Zo&&p()),h=d,e.getCurrentScope()&&e.onScopeDispose(h,u),{isPending:e.shallowReadonly(n),start:p,stop:d}}const cc=Zo?window:void 0,Ul=Zo?window.navigator:void 0;function Wl(...t){const o=e.computed(()=>{const n=co(e.toValue(t[0])).filter(r=>r!=null);return n.every(r=>typeof r!="string")?n:void 0});return a=()=>{var n,r;return[(n=(r=o.value)===null||r===void 0?void 0:r.map(c=>(function(d){var p;const h=e.toValue(d);return(p=h?.$el)!==null&&p!==void 0?p:h})(c)))!==null&&n!==void 0?n:[cc].filter(c=>c!=null),co(e.toValue(o.value?t[1]:t[0])),co(e.unref(o.value?t[2]:t[1])),e.toValue(o.value?t[3]:t[2])]},i=([n,r,c,d],p,h)=>{if(!n?.length||!r?.length||!c?.length)return;const u=(m=d,rc.call(m)==="[object Object]"?{...d}:d);var m;const f=n.flatMap(C=>r.flatMap(g=>c.map(y=>((b,w,V,N)=>(b.addEventListener(w,V,N),()=>b.removeEventListener(w,V,N)))(C,g,y,u))));h(()=>{f.forEach(C=>C())})},l={flush:"post"},e.watch(a,i,{...l,immediate:!0});var a,i,l}function Yl(t){const o=(function(){const a=e.shallowRef(!1),i=e.getCurrentInstance();return i&&e.onMounted(()=>{a.value=!0},i),a})();return e.computed(()=>(o.value,!!t()))}function ua(t,o={}){const{controls:a=!1,navigator:i=Ul}=o,l=Yl(()=>i&&"permissions"in i),n=e.shallowRef(),r=typeof t=="string"?{name:t}:t,c=e.shallowRef(),d=()=>{var h,u;c.value=(h=(u=n.value)===null||u===void 0?void 0:u.state)!==null&&h!==void 0?h:"prompt"};Wl(n,"change",d,{passive:!0});const p=(function(h){let u;function m(){return u||(u=h()),u}return m.reset=async()=>{const f=u;u=void 0,f&&await f},m})(async()=>{if(l.value){if(!n.value)try{n.value=await i.permissions.query(r)}catch{n.value=void 0}finally{d()}return a?e.toRaw(n.value):void 0}});return p(),a?{state:c,isSupported:l,query:p}:c}function dc(t={}){const{navigator:o=Ul,read:a=!1,source:i,copiedDuring:l=1500,legacy:n=!1}=t,r=Yl(()=>o&&"clipboard"in o),c=ua("clipboard-read"),d=ua("clipboard-write"),p=e.computed(()=>r.value||n),h=e.shallowRef(""),u=e.shallowRef(!1),m=sc(()=>u.value=!1,l,{immediate:!1});function f(C){return C==="granted"||C==="prompt"}return p.value&&a&&Wl(["copy","cut"],async function(){let C=!(r.value&&f(c.value));if(!C)try{h.value=await o.clipboard.readText()}catch{C=!0}var g,y,b;C&&(h.value=(g=(y=document)===null||y===void 0||(b=y.getSelection)===null||b===void 0||(b=b.call(y))===null||b===void 0?void 0:b.toString())!==null&&g!==void 0?g:"")},{passive:!0}),{isSupported:p,text:e.readonly(h),copied:e.readonly(u),copy:async function(C=e.toValue(i)){if(p.value&&C!=null){let g=!(r.value&&f(d.value));if(!g)try{await o.clipboard.writeText(C)}catch{g=!0}g&&(function(y){const b=document.createElement("textarea");b.value=y,b.style.position="absolute",b.style.opacity="0",b.setAttribute("readonly",""),document.body.appendChild(b),b.select(),document.execCommand("copy"),b.remove()})(C),h.value=C,u.value=!0,m.start()}}}}const pc={class:"comment-list-actbox__right"},hc={class:"operation-warp"},mc={class:"dialog-footer"},uc={__name:"comment-operate",props:{data:{type:[Object],default:()=>({})}},setup(t){const{copy:o}=dc(),a=e.ref(!1),i=e.ref({report_type:"",report_content:""}),l=t;function n(){let r=l.data||{};a.value=!1,k.ElMessage({type:"info",message:"举报成功: "+r.id})}return(r,c)=>{const d=e.resolveComponent("el-dropdown-item"),p=e.resolveComponent("el-dropdown-menu"),h=e.resolveComponent("el-dropdown"),u=e.resolveComponent("el-radio"),m=e.resolveComponent("el-radio-group"),f=e.resolveComponent("el-form-item"),C=e.resolveComponent("el-input"),g=e.resolveComponent("el-form"),y=e.resolveComponent("el-button"),b=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",pc,[e.createVNode(h,{trigger:"click",onCommand:c[0]||(c[0]=w=>(function(V){let N=l.data||{};switch(V){case"remove":setTimeout(()=>{commentRef.value?.remove(N)},200);break;case"report":a.value=!0;break;case"copy":o(N.content),k.ElMessage({type:"info",message:"复制成功"})}})(w))},{dropdown:e.withCtx(()=>[e.createVNode(p,null,{default:e.withCtx(()=>[e.createVNode(d,{command:"report"},{default:e.withCtx(()=>[...c[5]||(c[5]=[e.createTextVNode("举报",-1)])]),_:1}),e.createVNode(d,{command:"remove"},{default:e.withCtx(()=>[...c[6]||(c[6]=[e.createTextVNode("删除",-1)])]),_:1}),e.createVNode(d,{divided:"",command:"copy"},{default:e.withCtx(()=>[...c[7]||(c[7]=[e.createTextVNode("复制",-1)])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",hc,[e.createVNode(e.unref(Ts))])]),_:1}),e.createVNode(b,{title:"举报",modelValue:a.value,"onUpdate:modelValue":c[4]||(c[4]=w=>a.value=w),width:"400px",style:{width:"90%","max-width":"400px"}},{footer:e.withCtx(()=>[e.createElementVNode("span",mc,[e.createVNode(y,{onClick:c[3]||(c[3]=w=>a.value=!1)},{default:e.withCtx(()=>[...c[13]||(c[13]=[e.createTextVNode("取消",-1)])]),_:1}),e.createVNode(y,{type:"primary",onClick:n},{default:e.withCtx(()=>[...c[14]||(c[14]=[e.createTextVNode("提交",-1)])]),_:1})])]),default:e.withCtx(()=>[e.createVNode(g,{"label-position":"top"},{default:e.withCtx(()=>[e.createVNode(f,{label:"您为什么要举报此信息?"},{default:e.withCtx(()=>[e.createVNode(m,{modelValue:i.value.report_type,"onUpdate:modelValue":c[1]||(c[1]=w=>i.value.report_type=w)},{default:e.withCtx(()=>[e.createVNode(u,{value:"色情淫秽"},{default:e.withCtx(()=>[...c[8]||(c[8]=[e.createTextVNode("色情淫秽",-1)])]),_:1}),e.createVNode(u,{value:"骚扰谩骂"},{default:e.withCtx(()=>[...c[9]||(c[9]=[e.createTextVNode("骚扰谩骂",-1)])]),_:1}),e.createVNode(u,{value:"广告欺诈"},{default:e.withCtx(()=>[...c[10]||(c[10]=[e.createTextVNode("广告欺诈",-1)])]),_:1}),e.createVNode(u,{value:"反动"},{default:e.withCtx(()=>[...c[11]||(c[11]=[e.createTextVNode("反动",-1)])]),_:1}),e.createVNode(u,{value:"其他"},{default:e.withCtx(()=>[...c[12]||(c[12]=[e.createTextVNode("其他",-1)])]),_:1})]),_:1},8,["modelValue"])]),_:1}),e.createVNode(f,{label:"举报说明(可选):"},{default:e.withCtx(()=>[e.createVNode(C,{type:"textarea",modelValue:i.value.report_content,"onUpdate:modelValue":c[2]||(c[2]=w=>i.value.report_content=w),maxlength:"200",placeholder:"描述恶意行为",rows:"3"},null,8,["modelValue"])]),_:1})]),_:1})]),_:1},8,["modelValue"])])}}},gc={class:"comment-sub"},fc=["href"],Cc={class:"comment-primary"},vc={class:"comment-main"},yc={key:1,class:"user-info"},kc=["href"],bc={class:"username"},wc={class:"name",style:{"max-width":"10em"}},Vc={blank:"true",class:"rank"},xc=["innerHTML"],Sc={class:"address",style:{color:"#939393","font-size":"12px"}},Nc={class:"time"},Bc={class:"content"},Ec=["innerHTML"],Dc={class:"imgbox",style:{display:"flex"}},_c={class:"comment-list-actbox select-none"},Tc={class:"comment-list-actbox__left"},Ic={key:2},Lc={class:"comment-list-actbox__right"},Fc={key:2},$c={__name:"content-box",props:{reply:{type:[Boolean],default:!1},data:{type:[Object],default:()=>({})},id:{type:[String],default:""}},setup(t){const o=t,a=e.reactive({active:!1}),i=e.ref(),l=e.ref(),n=e.computed(()=>{let y=o.data.contentImg;return ee(y)?[]:y?.split("||")}),{allEmoji:r}=e.inject("InjectionEmojiApi"),{like:c,user:d,relativeTime:p}=e.inject("InjectContentBox");function h(){a.active=!a.active,a.active&&e.nextTick(()=>{i.value?.focus()})}function u(y){const b=y.target;l.value?.contains(b)||(a.active=!1)}const m=e.inject("InjectSlots"),f=()=>e.h("div",m.info(o.data)),C=e.computed(()=>((y,b)=>b.replace(/\[.+?\]/g,w=>{const V=y[w];return V?['<img src="',V,'" width="20" height="20" alt="',w,'" title="',w,'" style="margin: 0 1px; vertical-align: text-bottom"',"/>"].join(""):w}))(r,o.data.content)),g=y=>{switch(y){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(y,b)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["comment",{reply:o.reply}])},[e.createElementVNode("div",gc,[e.createVNode(ma,{uid:e.unref(K)(t.data.uid)},{default:e.withCtx(()=>[e.createElementVNode("a",{href:t.data.user.homeLink,target:"_blank",class:"no-underline",style:{display:"block"}},[e.createVNode(e.unref(k.ElAvatar),{style:{"margin-top":"5px"},size:40,fit:"cover",src:t.data.user.avatar},{default:e.withCtx(()=>[...b[2]||(b[2]=[e.createElementVNode("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])]),_:1},8,["src"])],8,fc)]),_:1},8,["uid"])]),e.createElementVNode("div",Cc,[e.createElementVNode("div",vc,[e.unref(m).info?(e.openBlock(),e.createBlock(f,{key:0})):(e.openBlock(),e.createElementBlock("div",yc,[e.createVNode(ma,{uid:e.unref(K)(t.data.uid)},{default:e.withCtx(()=>[e.createElementVNode("a",{href:t.data.user.homeLink,target:"_blank",class:"no-underline",style:{display:"block"}},[e.createElementVNode("div",bc,[e.createElementVNode("span",wc,e.toDisplayString(t.data.user.username),1),e.createElementVNode("span",Vc,[e.createElementVNode("i",{class:"comment-common-icon",style:{"font-size":"24px"},innerHTML:g(t.data.user.level)},null,8,xc)])])],8,kc)]),_:1},8,["uid"]),e.createElementVNode("span",Sc,"  "+e.toDisplayString(t.data.address),1),e.createElementVNode("time",Nc,e.toDisplayString(e.unref(p)?e.unref(ti)(t.data.createTime):t.data.createTime),1)])),e.createElementVNode("div",Bc,[e.createVNode(ic,{unfold:""},{default:e.withCtx(()=>[e.createElementVNode("div",{innerHTML:C.value},null,8,Ec),e.createElementVNode("div",Dc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(w,V)=>(e.openBlock(),e.createBlock(e.unref(k.ElImage),{key:V,src:w,style:{height:"72px",padding:"8px 4px"},lazy:"","preview-src-list":n.value,"initial-index":V},null,8,["src","preview-src-list","initial-index"]))),128))])]),_:1})]),e.createElementVNode("div",_c,[e.createElementVNode("div",Tc,[e.createElementVNode("div",{"data-tip":"点赞",class:"item",onClick:b[0]||(b[0]=w=>e.unref(c)(e.unref(K)(t.data.id)))},[e.unref(d).likeIds.map(String).indexOf(e.unref(K)(t.data.id))==-1?(e.openBlock(),e.createBlock(e.unref($s),{key:0})):(e.openBlock(),e.createBlock(e.unref(Ls),{key:1})),t.data.likes!=0?(e.openBlock(),e.createElementBlock("span",Ic,e.toDisplayString(t.data.likes),1)):e.createCommentVNode("",!0)]),e.createElementVNode("div",{"data-tip":"回复",ref_key:"btnRef",ref:l,class:e.normalizeClass(["item",{active:a.active}]),onClick:h},[e.createVNode(e.unref(As)),e.createElementVNode("span",null,e.toDisplayString(a.active?"取消回复":"回复"),1)],2)]),e.createElementVNode("div",Lc,[e.renderSlot(y.$slots,"operate",{},()=>[e.createVNode(uc,{data:o.data},null,8,["data"])],!0)])]),a.active?(e.openBlock(),e.createElementBlock("div",Fc,[e.createVNode(Rl,{ref_key:"commentRef",ref:i,"parent-id":e.unref(K)(t.id),placeholder:`回复 @${t.data.user.username}...`,reply:t.data,"content-btn":"发布",style:{"margin-top":"12px"},onHide:u,onClose:b[1]||(b[1]=w=>a.active=!1)},null,8,["parent-id","placeholder","reply"])])):e.createCommentVNode("",!0)]),e.renderSlot(y.$slots,"default",{},void 0,!0)])],2))}},ql=v($c,[["__scopeId","data-v-cfe79df7"]]),Oc={key:0,class:"reply-box"},zc={class:"reply-list"},Mc={key:0,class:"fetch-more"},Pc={key:0},Hc={key:1},Ac={key:0},jc={key:1,class:"fetch-more"},Rc={__name:"reply-box",props:{data:{type:[Array,Object],default:()=>null},id:{type:[String],default:""}},setup(t){const o=t,a=e.reactive({loading:!1,over:!1,pageNum:1,pageSize:5}),{replyPage:i,replyShowSize:l,comments:n,page:r}=e.inject("InjectReplyBox"),c=e.computed(()=>{let m={total:0,length:0,list:[]};if(o.data){let f=o.data.list.length;m={total:o.data.total,length:f,list:o.data.list}}if(!a.over){let f=m.list.slice(0,l);m.list=f}return r&&(m.list=m.list.slice(0,5)),m}),d=()=>{a.over=!0},p=m=>{n.value.forEach(f=>{f.id==o.id&&f.reply&&(f.reply=m)})},h=m=>{a.pageNum=m,i(o.id,m,a.pageSize,f=>p(f))},u=m=>{a.pageSize=m,i(o.id,a.pageNum,m,f=>p(f))};return(m,f)=>c.value.length>0?(e.openBlock(),e.createElementBlock("div",Oc,[e.createElementVNode("div",zc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.value.list,(C,g)=>(e.openBlock(),e.createBlock(ql,{id:t.id,key:g,data:C,reply:""},null,8,["id","data"]))),128)),c.value.length>e.unref(l)?(e.openBlock(),e.createElementBlock("div",Mc,[a.loading?(e.openBlock(),e.createElementBlock("span",Pc,"加载中...")):(e.openBlock(),e.createElementBlock("div",Hc,[a.over?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",Ac,[e.createTextVNode(" 共"+e.toDisplayString(c.value.total)+"条回复, ",1),e.createElementVNode("span",{class:"fetch-more-comment select-none",onClick:d},[f[0]||(f[0]=e.createTextVNode(" 点击查看 ",-1)),e.createVNode(e.unref(zs))])]))]))])):e.createCommentVNode("",!0),a.over&&e.unref(r)?(e.openBlock(),e.createElementBlock("div",jc,[e.createVNode(e.unref(k.ElPagination),{small:"","hide-on-single-page":"",layout:"total, prev, pager, next",total:c.value.total,"page-size":a.pageSize,onCurrentChange:h,onSizeChange:u},null,8,["total","page-size"])])):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0)}},Uc=v(Rc,[["__scopeId","data-v-16e0a50b"]]),Wc={key:0,class:"comment-list"},Yc={__name:"comment-list",props:{data:{type:[Array,Object],default:()=>[]},total:{type:[Number],default:0},showSize:{type:[Number],default:0}},setup:t=>(o,a)=>t.data?(e.openBlock(),e.createElementBlock("div",Wc,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,(i,l)=>(e.openBlock(),e.createBlock(ql,{id:e.unref(K)(i.id),key:l,data:i},{default:e.withCtx(()=>[e.createVNode(Uc,{id:e.unref(K)(i.id),data:i.reply},null,8,["id","data"])]),_:2},1032,["id","data"]))),128))])):e.createCommentVNode("",!0)},qc={class:"cv-comment-base"},Xc={class:"cv-comment-form"},Kc={class:"cv-comment-form__content"},Gc={class:"cv-comment-form__avatar"},Zc={class:"cv-comment-list-wrapper"},Pt=Object.assign({name:"cvCommentBase"},{__name:"comment",props:{config:{},page:!1,upload:!1,relativeTime:!1},emits:["submit","like","replyPage","showInfo","focus"],setup(t,{expose:o,emit:a}){const i=t,{user:l,comments:n,showSize:r,replyShowSize:c,total:d}=e.toRefs(i.config),p=a,h={upload:i.upload,submit:({content:m,parentId:f,reply:C,files:g,clear:y})=>{p("submit",{content:m,parentId:f,reply:C,files:g,finish:b=>{if(y(),f){let w=n.value.find(V=>V.id==f);if(w){let V=w.reply;V?(V.list.unshift(b),V.total++):w.reply={total:1,list:[b]}}}else n.value.unshift(b)}})},focus:()=>p("focus")};e.provide("InjectInputBox",h);const u=(m,f)=>{let C=null;n.value.forEach(g=>{C=g.id==m?g:g.reply?.list.find(y=>y.id==m),C&&(C.likes+=f)})};return e.provide("InjectContentBox",{user:l,like:m=>{const f=i.config.user.likeIds;p("like",m,()=>{if(f.findIndex(C=>C==m)==-1)f.push(m),u(m,1);else{let C=f.findIndex(g=>g==m);C!=-1&&(f.splice(C,1),u(m,-1))}})},relativeTime:oe(i.relativeTime,!1),showInfo:(m,f)=>p("showInfo",m,f)}),e.provide("InjectReplyBox",{page:i.page,replyPage:(m,f,C,g)=>{p("replyPage",{parentId:m,pageNum:f,pageSize:C,finish:g})},replyShowSize:oe(c,3),comments:n}),e.provide("InjectionEmojiApi",i.config.emoji),e.provide("InjectSlots",e.useSlots()),o({remove:m=>{const{parentId:f,id:C}=m;if(f){let g=n.value.find(b=>b.id==f),y=g?.reply;if(y){let b=y.list.findIndex(w=>w.id==C);b!=-1&&(y.list.splice(b,1),y.total--)}}else{let g=n.value.findIndex(y=>y.id==C);g!=-1&&n.value.splice(g,1)}}}),(m,f)=>{const C=e.resolveComponent("el-avatar");return e.openBlock(),e.createElementBlock("div",qc,[e.createElementVNode("div",Xc,[f[1]||(f[1]=e.createElementVNode("div",{class:"cv-comment-form__header"},[e.createElementVNode("span",{class:"cv-comment-form__hdtitle"},"评论")],-1)),e.createElementVNode("div",Kc,[e.createElementVNode("div",Gc,[e.createVNode(C,{size:40,src:t.config.user.avatar},{default:e.withCtx(()=>[...f[0]||(f[0]=[e.createElementVNode("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])]),_:1},8,["src"])]),e.createVNode(Rl,{placeholder:"输入评论(Enter换行,Ctrl + Enter发送)","content-btn":"发表评论"})])]),e.renderSlot(m.$slots,"default",{},()=>[f[2]||(f[2]=e.createElementVNode("div",{class:"title"},"全部评论",-1))]),e.createElementVNode("div",Zc,[e.createVNode(Yc,{data:e.unref(n),total:e.unref(d),"show-size":e.unref(oe)(e.unref(r),5)},null,8,["data","total","show-size"])])])}}}),Qc={class:"comment-scroll"},Jc=["infinite-scroll-disabled"],ed={class:"scroll-btn"},td={key:1},od={key:2},Ht=Object.assign({name:"cvCommentScroll"},{__name:"comment-scroll",props:{disable:{type:[Boolean],default:!1},show:{type:[Boolean],default:!1}},emits:["more"],setup(t,{emit:o}){const a=t,i=e.ref(!1),l=e.ref(!1),n=o,r=e.computed(()=>l.value&&a.disable),c=e.computed(()=>!l.value||i.value||r.value),d=$l(()=>{n("more"),i.value=!1},500),p=()=>{i.value=!0,d()};return(h,u)=>{const m=e.resolveComponent("el-link"),f=e.resolveDirective("infinite-scroll");return e.openBlock(),e.createElementBlock("div",Qc,[e.withDirectives((e.openBlock(),e.createElementBlock("div",{"infinite-scroll-disabled":c.value,"infinite-scroll-distance":"2"},[e.renderSlot(h.$slots,"default"),e.createElementVNode("div",ed,[l.value?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(m,{key:0,type:"primary",underline:"never",onClick:u[0]||(u[0]=C=>l.value=!l.value)},{default:e.withCtx(()=>[...u[1]||(u[1]=[e.createTextVNode("加载更多",-1)])]),_:1})),i.value?(e.openBlock(),e.createElementBlock("p",td,"加载中...")):e.createCommentVNode("",!0),r.value?(e.openBlock(),e.createElementBlock("p",od,"没有更多了")):e.createCommentVNode("",!0)])],8,Jc)),[[f,p]])])}}}),ad={class:"cv-comment-nav-wrap"},ld={class:"cv-comment-nav__sort"},At=Object.assign({name:"cvCommentNav"},{__name:"comment-nav",props:{modelValue:!1},emits:["update:modelValue","sorted"],setup(t,{emit:o}){const a=t,i=o,l=e.computed({get:()=>a.modelValue,set(n){i("update:modelValue",n),i("sorted",n)}});return(n,r)=>(e.openBlock(),e.createElementBlock("div",ad,[r[4]||(r[4]=e.createElementVNode("span",{class:"cv-comment-nav__title"},"全部评论",-1)),e.createElementVNode("div",ld,[e.createElementVNode("div",{class:e.normalizeClass(["item select-none",{active:l.value}]),onClick:r[0]||(r[0]=c=>l.value=!0)},[e.createVNode(e.unref(Ps)),r[2]||(r[2]=e.createTextVNode(" 最新 ",-1))],2),e.createElementVNode("div",{class:e.normalizeClass(["item select-none",{active:!l.value}]),onClick:r[1]||(r[1]=c=>l.value=!1)},[e.createVNode(e.unref(Bs)),r[3]||(r[3]=e.createTextVNode(" 最热 ",-1))],2)])]))}});Pt.install=function(t){t.component(Pt.name,Pt)},Ht.install=function(t){t.component(Ht.name,Ht)},At.install=function(t){t.component(At.name,At)};const nd={name:"cvIcons",props:{...k.ElIcon.prop,type:{type:[String],default:""},size:{type:[String,Number],default:12},name:{type:[String],default:""}},data:()=>({}),computed:{style(){return{fontSize:isNaN(Number(this.size))?this.size+"px":this.size,color:props.color}}},created(){},methods:{}},id={key:0,"aria-hidden":"true"},rd=["xlink:href"],jt=v(nd,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-icon");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(a.type)))]),a.name?(e.openBlock(),e.createElementBlock("svg",id,[e.createElementVNode("use",{"xlink:href":a.name},null,8,rd)])):e.createCommentVNode("",!0)]),_:3},16)}]]),Xl={emits:["click"],props:{name:{type:String,required:!0,validator:t=>t.trim().length>0},size:{type:[Number,String],default:24},color:{type:String,default:"#333333"},hoverColor:{type:String,default:""},hoverEffect:{type:Boolean,default:!1}},data:()=>({iconType:"svg"}),computed:{maskIconUrl(){const t="https://10ui.cn/icons";let o=this.name||"",a="";o=o.replace(/([A-Z])/g,l=>`-${l.toLowerCase()}`),o=o.replace(/^-|-$/g,""),o=o.toLowerCase().trim();const i=/-(filled|bold)$/;if(i.test(o)){const l=o.match(i)[1],n=o.slice(0,o.lastIndexOf(`-${l}`));n?a=`${n.split("-").filter(r=>r.trim().length>0).join("/")}-${l}`:a=o}else o.includes("-")?a=o.split("-").filter(l=>l.trim().length>0).join("/"):a=o;return(this.iconType?.toLowerCase()||"png")==="svg"?`${t}/${a}.svg`:`${t}/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 t={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&&(t.transition="background-color 0.2s ease"),t}}},Qo={name:"cvMaskSvg",mixins:[Xl]},ga=()=>{e.useCssVars(t=>({v2042f27c:t.hoverColor}))},fa=Qo.setup;Qo.setup=fa?(t,o)=>(ga(),fa(t,o)):ga;const Rt=v(Qo,[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",{class:"cv-mask-icon",style:e.normalizeStyle(t.iconStyle),onTap:o[0]||(o[0]=r=>t.$emit("click",r))},null,36)}],["__scopeId","data-v-590b4b89"]]),Jo={name:"cvMaskPng",mixins:[Xl],data:()=>({iconType:"png"})},Ca=()=>{e.useCssVars(t=>({v6bb780e0:t.hoverColor}))},va=Jo.setup;Jo.setup=va?(t,o)=>(Ca(),va(t,o)):Ca;const Ut=v(Jo,[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",{class:"cv-mask-icon",style:e.normalizeStyle(t.iconStyle),onTap:o[0]||(o[0]=r=>t.$emit("click",r))},null,36)}],["__scopeId","data-v-4f8ce869"]]);jt.install=function(t){t.component(jt.name,jt)},Rt.install=function(t){t.component(Rt.name,Rt)},Ut.install=function(t){t.component(Ut.name,Ut)};const sd={class:"u-emoji"},cd={class:"face-tooltip-head select-none"},dd=["onClick"],pd=["src"],hd={class:"emoji-body select-none"},md={style:{padding:"0 5px"}},ud=["onClick"],gd={class:"emoji-btn select-none"},fd={key:0},Cd=v(Object.assign({name:"cvEmoji"},{__name:"emoji",props:{emoji:{faceList:[],emojiList:[],allEmoji:{}},placement:"bottom"},emits:["addEmoji"],setup(t,{emit:o}){const a=t,i=e.ref(0),l=e.ref(0),n=e.ref(new Array(2)),{emojiList:r,faceList:c}=a.emoji;function d(){n.value[0]=r[0]}return(p,h)=>(e.openBlock(),e.createElementBlock("div",sd,[e.createVNode(e.unref(k.ElPopover),{placement:t.placement,"popper-class":"emoji-popover",width:250,trigger:"click",onBeforeEnter:d},{reference:e.withCtx(()=>[e.createElementVNode("div",gd,[p.$slots.default?e.renderSlot(p.$slots,"default",{key:1},void 0,!0):(e.openBlock(),e.createElementBlock("div",fd,[...h[0]||(h[0]=[e.createElementVNode("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",class:"icon"},[e.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),e.createElementVNode("span",null,"表情",-1)])]))])]),default:e.withCtx(()=>[e.createElementVNode("div",cd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(c),(u,m)=>(e.openBlock(),e.createElementBlock("label",{key:m,class:e.normalizeClass(i.value==m?"active":""),onClick:f=>(function(C){switch(i.value=C,C){case 0:l.value=0;break;case 1:l.value=-50,n.value[1]=r[1]}})(m)},[e.createElementVNode("img",{src:u,alt:""},null,8,pd)],10,dd))),128))]),e.createElementVNode("div",hd,[e.createElementVNode("div",{class:"emjio-container",style:e.normalizeStyle({transform:`translateX(${l.value}%)`})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.value,(u,m)=>(e.openBlock(),e.createElementBlock("div",{key:m,class:"emoji-wrapper"},[e.createVNode(e.unref(k.ElScrollbar),null,{default:e.withCtx(()=>[e.createElementVNode("div",md,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(u,(f,C)=>(e.openBlock(),e.createElementBlock("span",{key:C,class:"emoji-item",onClick:g=>p.$emit("addEmoji",C)},[e.createVNode(e.unref(k.ElImage),{src:f,title:String(C),class:"emoji",style:{width:"24px",height:"24px",margin:"5px"},lazy:""},null,8,["src","title"])],8,ud))),128))])]),_:2},1024)]))),128))],4)])]),_:3},8,["placement"])]))}}),[["__scopeId","data-v-da53b6ed"]]),vd={class:"cv-chat-message"},yd={class:"chat-list"},kd={class:"content"},bd={key:0,class:"username"},wd=["innerHTML"],Vd={__name:"message",props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0}},setup(t,{expose:o}){const{allEmoji:a}=e.inject("InjectionEmojiApi"),i=e.ref();o({scroll:()=>{e.nextTick(()=>{const n=document.querySelector(".chat-item:last-child");i.value.setScrollTop(n.offsetTop)})}});const l=(n,r)=>r=r.replace(/\[.+?\]/g,c=>{const d=n[c];return d?['<img src="',d,'" width="20" height="20" alt="',c,'" title="',c,'" style="margin: 0 1px; vertical-align: text-bottom"',"/>"].join(""):c});return(n,r)=>(e.openBlock(),e.createElementBlock("div",vd,[e.createVNode(e.unref(k.ElScrollbar),{ref_key:"scrollbarRef",ref:i},{default:e.withCtx(()=>[e.createElementVNode("div",yd,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.data,(c,d)=>(e.openBlock(),e.createElementBlock("div",{key:d,class:e.normalizeClass([{self:t.userId==c.id},"chat-item"])},[e.createElementVNode("div",null,[e.createVNode(e.unref(k.ElAvatar),null,{default:e.withCtx(()=>[...r[0]||(r[0]=[e.createElementVNode("img",{src:"https://cube.elemecdn.com/e/fd/0fc7d20532fdaf769a25683617711png.png"},null,-1)])]),_:1})]),e.createElementVNode("div",kd,[t.userId!=c.id?(e.openBlock(),e.createElementBlock("div",bd,e.toDisplayString(c.username),1)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"card-box",innerHTML:l(e.unref(a),c.content)},null,8,wd)]),r[1]||(r[1]=e.createElementVNode("div",{class:"date"},null,-1))],2))),128))])]),_:1},512)]))}},xd={class:"cv-chat-wrap"},Sd={class:"header"},Nd={id:"chat-footer",class:"footer"},Wt=Object.assign({name:"cvChat"},{__name:"chat",props:{data:{type:[Array],default:()=>[]},userId:{type:[Number],default:0},emoji:{type:[Object],default:()=>({})}},emits:["submit"],setup(t,{emit:o}){const a=t,i=e.ref(!1),l=e.ref(""),n=e.ref(),{data:r}=a,c=o,d=m=>{const{ctrlKey:f,key:C}=m;f&&C=="Enter"&&h()},p=()=>{l.value="",n.value.scroll()},h=()=>{let m=l.value;m.trim()?(m=m.replace(/\n/g,"<br/>"),c("submit",{clear:p,content:m})):k.ElMessage({type:"error",message:"内容不能为空"})},u=m=>{let f=document.getElementById("emojiInput"),C=f.selectionStart,g=f.selectionEnd,y=f.value;if(C===null||g===null)return;let b=y.substring(0,C)+m+y.substring(g);f.value=b,f.focus(),f.selectionStart=C+m.length,f.selectionEnd=C+m.length,l.value=b};return e.provide("InjectionEmojiApi",a.emoji),(m,f)=>{const C=e.resolveComponent("cvIcons");return e.openBlock(),e.createElementBlock("div",xd,[e.createElementVNode("div",{class:e.normalizeClass([{active:i.value},"chat-container translate"])},[e.createElementVNode("div",Sd,[e.createVNode(C,{size:"32"},{default:e.withCtx(()=>[...f[2]||(f[2]=[e.createElementVNode("svg",{viewBox:"0 0 1318 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg"},[e.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"}),e.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"}),e.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"}),e.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"}),e.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]=e.createElementVNode("div",{style:{"margin-left":"12px"}},[e.createElementVNode("div",null,"聊天室"),e.createElementVNode("div",{style:{"font-size":"12px"}},"当前2人在线")],-1))]),e.createVNode(Vd,{ref_key:"messageRef",ref:n,data:e.unref(r),"user-id":t.userId},null,8,["data","user-id"]),e.createElementVNode("div",Nd,[e.createVNode(e.unref(k.ElInput),{id:"emojiInput",modelValue:l.value,"onUpdate:modelValue":f[0]||(f[0]=g=>l.value=g),type:"textarea",autosize:{minRows:1,maxRows:4},placeholder:"请输入内容",onKeydown:e.withKeys(d,["enter"])},null,8,["modelValue"]),e.createVNode(Cd,{style:{margin:"0 8px 0"},emoji:t.emoji,placement:"top-end",onAddEmoji:u},{default:e.withCtx(()=>[...f[4]||(f[4]=[e.createElementVNode("svg",{width:"22",height:"22",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"7186"},[e.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"]),e.createVNode(C,{size:"18",class:e.normalizeClass([{".cv-chat-wrap submit-btn":l.value.trim()!=""},"select-none cursor-pointer"]),style:{"padding-bottom":"5px"},onClick:h},{default:e.withCtx(()=>[...f[5]||(f[5]=[e.createElementVNode("svg",{viewBox:"0 0 1025 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"15072"},[e.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),e.createVNode(e.unref(k.ElButton),{class:"chat-btn",onClick:f[1]||(f[1]=g=>i.value=!i.value)},{default:e.withCtx(()=>[...f[6]||(f[6]=[e.createTextVNode("chat",-1)])]),_:1})])}}});Wt.install=function(t){t.component(Wt.name,Wt)};const Bd={key:0},Yt=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(t){const o=t,{data:a,vertical:i,suffixIcon:l,prefixIcon:n,size:r,height:c,delay:d,spped:p,color:h,background:u}=o,m=e.reactive({boxWidth:0,textWidth:0,oneTime:0,twoTime:0,order:1}),f=e.ref({}),C=e.ref({style:{cssText:""}}),g=e.computed(()=>o.delay>2e3?o.delay:2e3),y=()=>{m.oneTime=m.textWidth/o.spped,m.twoTime=(m.textWidth+m.boxWidth)/o.spped},b=()=>{m.order===1?(C.value?.style&&(C.value.style.cssText=`animation: oneAnimation ${m.oneTime}s linear; opactity: 1;}`),m.order=2):C.value?.style&&(C.value.style.cssText=`animation: twoAnimation ${m.twoTime}s linear infinite; opacity: 1;`)};return e.onMounted(()=>{o.vertical||(e.nextTick(()=>{m.boxWidth=f.value.offsetWidth,m.textWidth=C.value.offsetWidth,document.styleSheets[0].insertRule(`@keyframes oneAnimation {0% {left: 0px;} 100% {left: -${m.textWidth}px;}}`),document.styleSheets[0].insertRule(`@keyframes twoAnimation {0% {left: ${m.boxWidth}px;} 100% {left: -${m.textWidth}px;}}`),y(),setTimeout(()=>{b()},o.delay)}),C.value.addEventListener("animationend",()=>{b()},!1))}),(w,V)=>{const N=e.resolveComponent("el-carousel-item"),E=e.resolveComponent("el-carousel"),L=e.resolveComponent("cvIcons");return e.openBlock(),e.createElementBlock("div",{class:"cv-notice-bar",style:e.normalizeStyle({background:e.unref(u),height:`${e.unref(c)}px`})},[e.unref(i)?(e.openBlock(),e.createElementBlock("div",Bd,[e.createVNode(E,{height:"40px",direction:"vertical",autoplay:!0,"indicator-position":"none",interval:g.value},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(a),q=>(e.openBlock(),e.createBlock(N,{key:q},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(q),1)]),_:2},1024))),128))]),_:1},8,["interval"])])):(e.openBlock(),e.createElementBlock("div",{key:1,style:e.normalizeStyle({color:e.unref(h),fontSize:`${e.unref(r)}px`}),class:"cv-notice-bar-wrap"},[e.unref(n)?(e.openBlock(),e.createBlock(L,{key:0,type:e.unref(n)},null,8,["type"])):e.createCommentVNode("",!0),e.createElementVNode("div",{ref_key:"boxRef",ref:f,class:"text-box"},[e.createElementVNode("div",{ref_key:"textRef",ref:C,class:"text"},e.toDisplayString(e.unref(a)),513)],512),e.unref(l)?(e.openBlock(),e.createBlock(L,{key:1,type:e.unref(l)},null,8,["type"])):e.createCommentVNode("",!0)],4))],4)}}});Yt.install=function(t){t.component(Yt.name,Yt)};const Ed=Object.freeze({autofocus:!1,disabled:!1,indentWithTab:!0,tabSize:2,placeholder:"",autoDestroy:!0,extensions:[gn.basicSetup]}),ya="change",ka="update",ba="focus",wa="blur",Va="ready",xa="update:modelValue",Dd=({onUpdate:t,onChange:o,onFocus:a,onBlur:i,...l})=>T.EditorState.create({doc:l.doc,selection:l.selection,extensions:[...Array.isArray(l.extensions)?l.extensions:[l.extensions],B.EditorView.updateListener.of(n=>{t(n),n.docChanged&&o(n.state.doc.toString(),n),n.focusChanged&&(n.view.hasFocus?a(n):i(n))})]}),J=t=>{const o=new T.Compartment;return{compartment:o,run:a=>{o.get(t.state)?t.dispatch({effects:o.reconfigure(a)}):t.dispatch({effects:T.StateEffect.appendConfig.of(o.of(a))})}}},Sa=(t,o)=>{const{compartment:a,run:i}=J(t);return l=>{const n=a.get(t.state);i(l??n!==o?o:[])}},_d=t=>{const o=()=>t.state.doc.toString(),{run:a}=J(t),i=Sa(t,[B.EditorView.editable.of(!1),T.EditorState.readOnly.of(!0)]),l=Sa(t,B.keymap.of([fn.indentWithTab])),{run:n}=J(t),{run:r}=J(t),{run:c}=J(t),{run:d}=J(t);return{focus:()=>t.focus(),getDoc:o,setDoc:p=>{p!==o()&&t.dispatch({changes:{from:0,to:t.state.doc.length,insert:p}})},reExtensions:a,toggleDisabled:i,toggleIndentWithTab:l,setTabSize:p=>{n([T.EditorState.tabSize.of(p),x.indentUnit.of(" ".repeat(p))])},setPhrases:p=>{r([T.EditorState.phrases.of(p)])},setPlaceholder:p=>{c(B.placeholder(p))},setStyle:(p={})=>{d(B.EditorView.theme({"&":{...p}}))}}},Td=e.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:{[ya]:(t,o)=>!0,[ka]:t=>!0,[ba]:t=>!0,[wa]:t=>!0,[Va]:t=>!0,[xa]:(t,o)=>!0},setup(t,o){const a=e.shallowRef(),i=e.shallowRef(),l=e.shallowRef(),n={...Ed},r=e.computed(()=>{const c={};return Object.keys(e.toRaw(t)).forEach(d=>{d!=="modelValue"&&(c[d]=t[d]??n[d])}),c});return e.onMounted(()=>{i.value=Dd({doc:t.modelValue,selection:r.value.selection,extensions:n.extensions??[],onFocus:d=>o.emit(ba,d),onBlur:d=>o.emit(wa,d),onUpdate:d=>o.emit(ka,d),onChange:(d,p)=>{d!==t.modelValue&&(o.emit(ya,d,p),o.emit(xa,d,p))}}),l.value=new B.EditorView({state:i.value,parent:a.value,root:r.value.root}),l.value.contentDOM.addEventListener("scroll",d=>{});const c=_d(l.value);e.watch(()=>t.modelValue,d=>{d!==c.getDoc()&&c.setDoc(d)}),e.watch(()=>t.extensions,d=>c.reExtensions(d||[]),{immediate:!0}),e.watch(()=>r.value.disabled,d=>c.toggleDisabled(d),{immediate:!0}),e.watch(()=>r.value.indentWithTab,d=>c.toggleIndentWithTab(d),{immediate:!0}),e.watch(()=>r.value.tabSize,d=>c.setTabSize(d),{immediate:!0}),e.watch(()=>r.value.phrases,d=>c.setPhrases(d||{}),{immediate:!0}),e.watch(()=>r.value.placeholder,d=>c.setPlaceholder(d),{immediate:!0}),e.watch(()=>r.value.style,d=>c.setStyle(d),{immediate:!0}),r.value.autofocus&&c.focus(),o.emit(Va,{state:i.value,view:l.value,container:a.value,editorTools:c})}),e.onBeforeUnmount(()=>{r.value.autoDestroy&&l.value&&l.value.destroy()}),()=>e.h("div",{class:"cv-editor-codemirror",ref:a})}}),Na="#e06c75",qt="#abb2bf",qo="#7d8799",Ba="#d19a66",Ea="#2c313a",Da="#282c34",po="#353a42",_a="#528bff",Id=B.EditorView.theme({"&":{color:qt,backgroundColor:Da},".cm-content":{caretColor:_a},".cm-cursor, .cm-dropCursor":{borderLeftColor:_a},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:"#3E4451"},".cm-panels":{backgroundColor:"#21252b",color:qt},".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:Da,color:qo,border:"none"},".cm-activeLineGutter":{backgroundColor:Ea},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:po},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:po,borderBottomColor:po},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Ea,color:qt}}},{dark:!0}),Ld=x.HighlightStyle.define([{tag:s.tags.keyword,color:"#c678dd"},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.propertyName,s.tags.macroName],color:Na},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:"#61afef"},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Ba},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:qt},{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:"#e5c07b"},{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:"#56b6c2"},{tag:[s.tags.meta,s.tags.comment],color:qo},{tag:s.tags.strong,fontWeight:"bold"},{tag:s.tags.emphasis,fontStyle:"italic"},{tag:s.tags.strikethrough,textDecoration:"line-through"},{tag:s.tags.link,color:qo,textDecoration:"underline"},{tag:s.tags.heading,fontWeight:"bold",color:Na},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Ba},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted],color:"#98c379"},{tag:s.tags.invalid,color:"#ffffff"}]),Fd=[Id,x.syntaxHighlighting(Ld)],$d=!1,ho="#FAFAFA",$="#90A4AE",ne="#80CBC440",Ta="#272727",mo="#FAFAFA",Ia="#00000010",Od="#c2c2c222",zd="#CFD8DC",Md="#7E939E",Pd="#FAFAFA",La="#7C4DFF",uo="#90A4AE",Fa="#6182B8",Hd="#91B859",Ad="#F76D47",$a="#8796B0",jd="#FFB62C",Rd="#F76D47",Ud="#90A4AE",Wd="#91B859",Yd="#E53935",qd="#39ADB5",Xd=B.EditorView.theme({"&":{color:$,backgroundColor:ho},".cm-content":{caretColor:Ta},".cm-cursor, .cm-dropCursor":{borderLeftColor:Ta},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ne},".cm-panels":{backgroundColor:mo,color:$},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:mo,outline:`1px solid ${Ia}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ne},".cm-activeLine":{backgroundColor:Od},".cm-selectionMatch":{backgroundColor:ne},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Pd,outline:"none"},".cm-gutters":{backgroundColor:ho,color:$,border:"none"},".cm-activeLineGutter":{backgroundColor:ho},".cm-lineNumbers .cm-gutterElement":{color:zd},".cm-lineNumbers .cm-activeLineGutter":{color:Md},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:$},".cm-tooltip":{border:`1px solid ${Ia}`,backgroundColor:mo,color:$},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:$,borderBottomColor:$},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ne,color:$}}},{dark:$d}),Kd=x.HighlightStyle.define([{tag:s.tags.keyword,color:La},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:uo},{tag:[s.tags.propertyName],color:Fa},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:Hd},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:Fa},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Ad},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:uo},{tag:[s.tags.className],color:jd},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:Rd},{tag:[s.tags.typeName],color:$a,fontStyle:$a},{tag:[s.tags.operator,s.tags.operatorKeyword],color:La},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:qd},{tag:[s.tags.meta,s.tags.comment],color:Ud},{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:Wd},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:uo},{tag:s.tags.invalid,color:Yd},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Gd=[Xd,x.syntaxHighlighting(Kd)],Zd=!0,go="#263238",O="#EEFFFF",ie="#80CBC420",Oa="#FFCC00",fo="#263238",za="#FFFFFF10",Qd="#4c616c22",Jd="#37474F",ep="#607a86",tp="#263238",Ma="#C792EA",Co="#EEFFFF",Pa="#82AAFF",op="#C3E88D",ap="#F78C6C",Ha="#B2CCD6",lp="#FFCB6B",np="#F78C6C",ip="#546E7A",rp="#C3E88D",sp="#FF5370",cp="#89DDFF",dp=B.EditorView.theme({"&":{color:O,backgroundColor:go},".cm-content":{caretColor:Oa},".cm-cursor, .cm-dropCursor":{borderLeftColor:Oa},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ie},".cm-panels":{backgroundColor:fo,color:O},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:fo,outline:`1px solid ${za}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ie},".cm-activeLine":{backgroundColor:Qd},".cm-selectionMatch":{backgroundColor:ie},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:tp,outline:"none"},".cm-gutters":{backgroundColor:go,color:O,border:"none"},".cm-activeLineGutter":{backgroundColor:go},".cm-lineNumbers .cm-gutterElement":{color:Jd},".cm-lineNumbers .cm-activeLineGutter":{color:ep},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:O},".cm-tooltip":{border:`1px solid ${za}`,backgroundColor:fo,color:O},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:O,borderBottomColor:O},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ie,color:O}}},{dark:Zd}),pp=x.HighlightStyle.define([{tag:s.tags.keyword,color:Ma},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Co},{tag:[s.tags.propertyName],color:Pa},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:op},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:Pa},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:ap},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Co},{tag:[s.tags.className],color:lp},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:np},{tag:[s.tags.typeName],color:Ha,fontStyle:Ha},{tag:[s.tags.operator,s.tags.operatorKeyword],color:Ma},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:cp},{tag:[s.tags.meta,s.tags.comment],color:ip},{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:rp},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Co},{tag:s.tags.invalid,color:sp},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),hp=[dp,x.syntaxHighlighting(pp)],mp=!1,vo="#FDF6E3",z="#586E75",re="#EEE8D5",Aa="#657B83",yo="#FDF6E3",ja="#D3AF86",up="#d5bd5c22",gp="#586E75",fp="#567983",Cp="#EEE8D5",Ra="#859900",ko="#268BD2",Ua="#268BD2",vp="#2AA198",yp="#CB4B16",Wa="#CB4B16",kp="#CB4B16",bp="#D33682",wp="#93A1A1",Vp="#268BD2",xp="#DC322F",Sp="#DC322F",Np=B.EditorView.theme({"&":{color:z,backgroundColor:vo},".cm-content":{caretColor:Aa},".cm-cursor, .cm-dropCursor":{borderLeftColor:Aa},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:re},".cm-panels":{backgroundColor:yo,color:z},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:yo,outline:`1px solid ${ja}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:re},".cm-activeLine":{backgroundColor:up},".cm-selectionMatch":{backgroundColor:re},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Cp,outline:"none"},".cm-gutters":{backgroundColor:vo,color:z,border:"none"},".cm-activeLineGutter":{backgroundColor:vo},".cm-lineNumbers .cm-gutterElement":{color:gp},".cm-lineNumbers .cm-activeLineGutter":{color:fp},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:z},".cm-tooltip":{border:`1px solid ${ja}`,backgroundColor:yo,color:z},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:z,borderBottomColor:z},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:re,color:z}}},{dark:mp}),Bp=x.HighlightStyle.define([{tag:s.tags.keyword,color:Ra},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:ko},{tag:[s.tags.propertyName],color:Ua},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:vp},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:Ua},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:yp},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:ko},{tag:[s.tags.className],color:kp},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:bp},{tag:[s.tags.typeName],color:Wa,fontStyle:Wa},{tag:[s.tags.operator,s.tags.operatorKeyword],color:Ra},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:Sp},{tag:[s.tags.meta,s.tags.comment],color:wp},{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:Vp},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:ko},{tag:s.tags.invalid,color:xp},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Ep=[Np,x.syntaxHighlighting(Bp)],Dp=!0,bo="#002B36",M="#93A1A1",se="#274642",Ya="#D30102",wo="#002B36",qa="#2AA19899",_p="#005b7022",Tp="#93A1A1",Ip="#949494",Lp="#073642",Xa="#859900",Vo="#268BD2",Ka="#268BD2",Fp="#2AA198",$p="#CB4B16",Ga="#CB4B16",Op="#CB4B16",zp="#D33682",Mp="#586E75",Pp="#268BD2",Hp="#DC322F",Ap="#DC322F",jp=B.EditorView.theme({"&":{color:M,backgroundColor:bo},".cm-content":{caretColor:Ya},".cm-cursor, .cm-dropCursor":{borderLeftColor:Ya},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:se},".cm-panels":{backgroundColor:wo,color:M},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:wo,outline:`1px solid ${qa}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:se},".cm-activeLine":{backgroundColor:_p},".cm-selectionMatch":{backgroundColor:se},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Lp,outline:"none"},".cm-gutters":{backgroundColor:bo,color:M,border:"none"},".cm-activeLineGutter":{backgroundColor:bo},".cm-lineNumbers .cm-gutterElement":{color:Tp},".cm-lineNumbers .cm-activeLineGutter":{color:Ip},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:M},".cm-tooltip":{border:`1px solid ${qa}`,backgroundColor:wo,color:M},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:M,borderBottomColor:M},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:se,color:M}}},{dark:Dp}),Rp=x.HighlightStyle.define([{tag:s.tags.keyword,color:Xa},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Vo},{tag:[s.tags.propertyName],color:Ka},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:Fp},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:Ka},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:$p},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Vo},{tag:[s.tags.className],color:Op},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:zp},{tag:[s.tags.typeName],color:Ga,fontStyle:Ga},{tag:[s.tags.operator,s.tags.operatorKeyword],color:Xa},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:Ap},{tag:[s.tags.meta,s.tags.comment],color:Mp},{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:Pp},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Vo},{tag:s.tags.invalid,color:Hp},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Up=[jp,x.syntaxHighlighting(Rp)],Wp=!0,xo="#282A36",P="#F8F8F2",ce="#44475A",Za="#F8F8F2",So="#282A36",Qa="#191A21",Yp="#53576c22",qp="#6272A4",Xp="#F8F8F2",Kp="#44475A",Ja="#FF79C6",No="#F8F8F2",el="#50FA7B",Gp="#F1FA8C",Zp="#BD93F9",tl="#8BE9FD",Qp="#8BE9FD",Jp="#BD93F9",eh="#6272A4",th="#BD93F9",oh="#FF5555",ah="#F1FA8C",lh=B.EditorView.theme({"&":{color:P,backgroundColor:xo},".cm-content":{caretColor:Za},".cm-cursor, .cm-dropCursor":{borderLeftColor:Za},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ce},".cm-panels":{backgroundColor:So,color:P},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:So,outline:`1px solid ${Qa}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ce},".cm-activeLine":{backgroundColor:Yp},".cm-selectionMatch":{backgroundColor:ce},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Kp,outline:"none"},".cm-gutters":{backgroundColor:xo,color:P,border:"none"},".cm-activeLineGutter":{backgroundColor:xo},".cm-lineNumbers .cm-gutterElement":{color:qp},".cm-lineNumbers .cm-activeLineGutter":{color:Xp},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:P},".cm-tooltip":{border:`1px solid ${Qa}`,backgroundColor:So,color:P},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:P,borderBottomColor:P},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ce,color:P}}},{dark:Wp}),nh=x.HighlightStyle.define([{tag:s.tags.keyword,color:Ja},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:No},{tag:[s.tags.propertyName],color:el},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:Gp},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:el},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Zp},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:No},{tag:[s.tags.className],color:Qp},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:Jp},{tag:[s.tags.typeName],color:tl,fontStyle:tl},{tag:[s.tags.operator,s.tags.operatorKeyword],color:Ja},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:ah},{tag:[s.tags.meta,s.tags.comment],color:eh},{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:th},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:No},{tag:s.tags.invalid,color:oh},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),ih=[lh,x.syntaxHighlighting(nh)],rh=!1,Bo="#fff",H="#444d56",de="#0366d625",ol="#044289",Eo="#fff",al="#e1e4e8",sh="#c6c6c622",ch="#1b1f234d",dh="#24292e",ph="#34d05840",ll="#d73a49",Do="#e36209",nl="#005cc5",hh="#032f62",mh="#005cc5",il="#005cc5",uh="#6f42c1",gh="#005cc5",fh="#6a737d",Ch="#005cc5",vh="#cb2431",yh="#032f62",kh=B.EditorView.theme({"&":{color:H,backgroundColor:Bo},".cm-content":{caretColor:ol},".cm-cursor, .cm-dropCursor":{borderLeftColor:ol},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:de},".cm-panels":{backgroundColor:Eo,color:H},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Eo,outline:`1px solid ${al}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:de},".cm-activeLine":{backgroundColor:sh},".cm-selectionMatch":{backgroundColor:de},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:ph,outline:"none"},".cm-gutters":{backgroundColor:Bo,color:H,border:"none"},".cm-activeLineGutter":{backgroundColor:Bo},".cm-lineNumbers .cm-gutterElement":{color:ch},".cm-lineNumbers .cm-activeLineGutter":{color:dh},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:H},".cm-tooltip":{border:`1px solid ${al}`,backgroundColor:Eo,color:H},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:H,borderBottomColor:H},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:de,color:H}}},{dark:rh}),bh=x.HighlightStyle.define([{tag:s.tags.keyword,color:ll},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Do},{tag:[s.tags.propertyName],color:nl},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:hh},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:nl},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:mh},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Do},{tag:[s.tags.className],color:uh},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:gh},{tag:[s.tags.typeName],color:il,fontStyle:il},{tag:[s.tags.operator,s.tags.operatorKeyword],color:ll},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:yh},{tag:[s.tags.meta,s.tags.comment],color:fh},{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:Ch},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Do},{tag:s.tags.invalid,color:vh},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),wh=[kh,x.syntaxHighlighting(bh)],Vh=!0,_o="#24292e",A="#d1d5da",pe="#3392FF44",rl="#c8e1ff",To="#24292e",sl="#1b1f23",xh="#4d566022",Sh="#444d56",Nh="#e1e4e8",Bh="#17E5E650",cl="#f97583",Io="#ffab70",dl="#79b8ff",Eh="#9ecbff",Dh="#79b8ff",pl="#79b8ff",_h="#b392f0",Th="#79b8ff",Ih="#6a737d",Lh="#79b8ff",Fh="#f97583",$h="#9ecbff",Oh=B.EditorView.theme({"&":{color:A,backgroundColor:_o},".cm-content":{caretColor:rl},".cm-cursor, .cm-dropCursor":{borderLeftColor:rl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:pe},".cm-panels":{backgroundColor:To,color:A},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:To,outline:`1px solid ${sl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:pe},".cm-activeLine":{backgroundColor:xh},".cm-selectionMatch":{backgroundColor:pe},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Bh,outline:"none"},".cm-gutters":{backgroundColor:_o,color:A,border:"none"},".cm-activeLineGutter":{backgroundColor:_o},".cm-lineNumbers .cm-gutterElement":{color:Sh},".cm-lineNumbers .cm-activeLineGutter":{color:Nh},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:A},".cm-tooltip":{border:`1px solid ${sl}`,backgroundColor:To,color:A},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:A,borderBottomColor:A},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:pe,color:A}}},{dark:Vh}),zh=x.HighlightStyle.define([{tag:s.tags.keyword,color:cl},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Io},{tag:[s.tags.propertyName],color:dl},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:Eh},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:dl},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Dh},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Io},{tag:[s.tags.className],color:_h},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:Th},{tag:[s.tags.typeName],color:pl,fontStyle:pl},{tag:[s.tags.operator,s.tags.operatorKeyword],color:cl},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:$h},{tag:[s.tags.meta,s.tags.comment],color:Ih},{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:Lh},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Io},{tag:s.tags.invalid,color:Fh},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Mh=[Oh,x.syntaxHighlighting(zh)],Ph=!0,Lo="#21202e",j="#edecee",he="#3d375e7f",hl="#a277ff",Fo="#21202e",ml="#3b334b",Hh="#4d4b6622",Ah="#a394f033",jh="#cdccce",Rh="#a394f033",ul="#a277ff",$o="#edecee",gl="#ffca85",Uh="#61ffca",Wh="#61ffca",fl="#82e2ff",Yh="#82e2ff",qh="#61ffca",Xh="#6d6d6d",Kh="#a277ff",Gh="#ff6767",Zh="#61ffca",Qh=B.EditorView.theme({"&":{color:j,backgroundColor:Lo},".cm-content":{caretColor:hl},".cm-cursor, .cm-dropCursor":{borderLeftColor:hl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:he},".cm-panels":{backgroundColor:Fo,color:j},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Fo,outline:`1px solid ${ml}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:he},".cm-activeLine":{backgroundColor:Hh},".cm-selectionMatch":{backgroundColor:he},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:Rh,outline:"none"},".cm-gutters":{backgroundColor:Lo,color:j,border:"none"},".cm-activeLineGutter":{backgroundColor:Lo},".cm-lineNumbers .cm-gutterElement":{color:Ah},".cm-lineNumbers .cm-activeLineGutter":{color:jh},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:j},".cm-tooltip":{border:`1px solid ${ml}`,backgroundColor:Fo,color:j},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:j,borderBottomColor:j},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:he,color:j}}},{dark:Ph}),Jh=x.HighlightStyle.define([{tag:s.tags.keyword,color:ul},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:$o},{tag:[s.tags.propertyName],color:gl},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:Uh},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:gl},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Wh},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:$o},{tag:[s.tags.className],color:Yh},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:qh},{tag:[s.tags.typeName],color:fl,fontStyle:fl},{tag:[s.tags.operator,s.tags.operatorKeyword],color:ul},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:Zh},{tag:[s.tags.meta,s.tags.comment],color:Xh},{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:Kh},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:$o},{tag:s.tags.invalid,color:Gh},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),em=[Qh,x.syntaxHighlighting(Jh)],tm=!0,Oo="#1a1b26",R="#787c99",me="#515c7e40",Cl="#c0caf5",zo="#1a1b26",vl="#787c99",om="#43455c22",am="#363b54",lm="#737aa2",nm="#16161e",yl="#bb9af7",Mo="#c0caf5",kl="#7aa2f7",im="#9ece6a",rm="#bb9af7",bl="#0db9d7",sm="#c0caf5",cm="#ff9e64",dm="#444b6a",pm="#89ddff",hm="#ff5370",mm="#b4f9f8",um=B.EditorView.theme({"&":{color:R,backgroundColor:Oo},".cm-content":{caretColor:Cl},".cm-cursor, .cm-dropCursor":{borderLeftColor:Cl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:me},".cm-panels":{backgroundColor:zo,color:R},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:zo,outline:`1px solid ${vl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:me},".cm-activeLine":{backgroundColor:om},".cm-selectionMatch":{backgroundColor:me},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:nm,outline:"none"},".cm-gutters":{backgroundColor:Oo,color:R,border:"none"},".cm-activeLineGutter":{backgroundColor:Oo},".cm-lineNumbers .cm-gutterElement":{color:am},".cm-lineNumbers .cm-activeLineGutter":{color:lm},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:R},".cm-tooltip":{border:`1px solid ${vl}`,backgroundColor:zo,color:R},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:R,borderBottomColor:R},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:me,color:R}}},{dark:tm}),gm=x.HighlightStyle.define([{tag:s.tags.keyword,color:yl},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Mo},{tag:[s.tags.propertyName],color:kl},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:im},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:kl},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:rm},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Mo},{tag:[s.tags.className],color:sm},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:cm},{tag:[s.tags.typeName],color:bl,fontStyle:bl},{tag:[s.tags.operator,s.tags.operatorKeyword],color:yl},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:mm},{tag:[s.tags.meta,s.tags.comment],color:dm},{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:pm},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Mo},{tag:s.tags.invalid,color:hm},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),fm=[um,x.syntaxHighlighting(gm)],Cm=!0,Po="#24283b",U="#7982a9",ue="#6f7bb630",wl="#c0caf5",Ho="#24283b",Vl="#7982a9",vm="#4d547722",ym="#3b4261",km="#737aa2",bm="#1f2335",xl="#bb9af7",Ao="#c0caf5",Sl="#7aa2f7",wm="#9ece6a",Vm="#bb9af7",Nl="#2ac3de",xm="#c0caf5",Sm="#ff9e64",Nm="#565f89",Bm="#89ddff",Em="#ff5370",Dm="#b4f9f8",_m=B.EditorView.theme({"&":{color:U,backgroundColor:Po},".cm-content":{caretColor:wl},".cm-cursor, .cm-dropCursor":{borderLeftColor:wl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ue},".cm-panels":{backgroundColor:Ho,color:U},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Ho,outline:`1px solid ${Vl}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ue},".cm-activeLine":{backgroundColor:vm},".cm-selectionMatch":{backgroundColor:ue},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:bm,outline:"none"},".cm-gutters":{backgroundColor:Po,color:U,border:"none"},".cm-activeLineGutter":{backgroundColor:Po},".cm-lineNumbers .cm-gutterElement":{color:ym},".cm-lineNumbers .cm-activeLineGutter":{color:km},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:U},".cm-tooltip":{border:`1px solid ${Vl}`,backgroundColor:Ho,color:U},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:U,borderBottomColor:U},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ue,color:U}}},{dark:Cm}),Tm=x.HighlightStyle.define([{tag:s.tags.keyword,color:xl},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Ao},{tag:[s.tags.propertyName],color:Sl},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:wm},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:Sl},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Vm},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Ao},{tag:[s.tags.className],color:xm},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:Sm},{tag:[s.tags.typeName],color:Nl,fontStyle:Nl},{tag:[s.tags.operator,s.tags.operatorKeyword],color:xl},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:Dm},{tag:[s.tags.meta,s.tags.comment],color:Nm},{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:Bm},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Ao},{tag:s.tags.invalid,color:Em},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Im=[_m,x.syntaxHighlighting(Tm)],Lm=!1,jo="#e1e2e7",W="#6a6f8e",ge="#8591b840",Bl="#3760bf",Ro="#e1e2e7",El="#6a6f8e",Fm="#a7aaba22",$m="#b3b6cd",Om="#68709a",zm="#e9e9ec",Dl="#9854f1",Uo="#3760bf",_l="#2e7de9",Mm="#587539",Pm="#9854f1",Tl="#07879d",Hm="#3760bf",Am="#b15c00",jm="#9da3c2",Rm="#006a83",Um="#ff3e64",Wm="#2e5857",Ym=B.EditorView.theme({"&":{color:W,backgroundColor:jo},".cm-content":{caretColor:Bl},".cm-cursor, .cm-dropCursor":{borderLeftColor:Bl},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:ge},".cm-panels":{backgroundColor:Ro,color:W},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:Ro,outline:`1px solid ${El}`},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:ge},".cm-activeLine":{backgroundColor:Fm},".cm-selectionMatch":{backgroundColor:ge},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:zm,outline:"none"},".cm-gutters":{backgroundColor:jo,color:W,border:"none"},".cm-activeLineGutter":{backgroundColor:jo},".cm-lineNumbers .cm-gutterElement":{color:$m},".cm-lineNumbers .cm-activeLineGutter":{color:Om},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:W},".cm-tooltip":{border:`1px solid ${El}`,backgroundColor:Ro,color:W},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:W,borderBottomColor:W},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:ge,color:W}}},{dark:Lm}),qm=x.HighlightStyle.define([{tag:s.tags.keyword,color:Dl},{tag:[s.tags.name,s.tags.deleted,s.tags.character,s.tags.macroName],color:Uo},{tag:[s.tags.propertyName],color:_l},{tag:[s.tags.processingInstruction,s.tags.string,s.tags.inserted,s.tags.special(s.tags.string)],color:Mm},{tag:[s.tags.function(s.tags.variableName),s.tags.labelName],color:_l},{tag:[s.tags.color,s.tags.constant(s.tags.name),s.tags.standard(s.tags.name)],color:Pm},{tag:[s.tags.definition(s.tags.name),s.tags.separator],color:Uo},{tag:[s.tags.className],color:Hm},{tag:[s.tags.number,s.tags.changed,s.tags.annotation,s.tags.modifier,s.tags.self,s.tags.namespace],color:Am},{tag:[s.tags.typeName],color:Tl,fontStyle:Tl},{tag:[s.tags.operator,s.tags.operatorKeyword],color:Dl},{tag:[s.tags.url,s.tags.escape,s.tags.regexp,s.tags.link],color:Wm},{tag:[s.tags.meta,s.tags.comment],color:jm},{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:Rm},{tag:[s.tags.atom,s.tags.bool,s.tags.special(s.tags.variableName)],color:Uo},{tag:s.tags.invalid,color:Um},{tag:s.tags.strikethrough,textDecoration:"line-through"}]),Xm=[Ym,x.syntaxHighlighting(qm)],Km={disabled:!1,indentWithTab:!0,tabSize:4,autofocus:!1,placeholder:"input...",backgroundColor:"white",language:"markdown",theme:"oneDark",phrases:"en-us"},Kl={emits:["update:config"],components:{CodemirrorEditor:Td},data:()=>({codemrrConfig:{...Km},codemrrThemes:{oneDark:Fd,materialLight:Gd,materialDark:hp,solarizedLight:Ep,solarizedDark:Up,dracula:ih,githubLight:wh,githubDark:Mh,aura:em,tokyoNight:fm,tokyoNightStorm:Im,tokyoNightDay:Xm},codemrrLanguages:{javascript:ia.javascript(),js:ia.javascript(),html:Cn.html(),markdown:yn.markdown(),json:vn.json(),vue:kn.vue(),java:wn.java(),php:bn.php(),python:Vn.python(),go:Sn.go(),mysql:ra.sql(),sql:ra.sql(),xml:xn.xml(),css:Nn.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 t=Object.keys(this.codemrrThemes);return["default"].concat(t)},optionPhrases:()=>["en-us","de-de"],optionLanguage(){return Object.keys(this.codemrrLanguages)},extensions(){const t=[];return t.push(this.codemrrLanguages[this.codemrrConfig.language]),this.codemrrThemes[this.codemrrConfig.theme]&&t.push(this.codemrrThemes[this.codemrrConfig.theme]),t},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(t){this.$emit("update:config",t)}}},te={props:{editorID:{type:[String],required:!1,default:()=>""}},data:()=>({editorRefEL:null}),computed:{editorRefID(){return this.editorID?this.editorID:this.$options.name+ +new Date+((1e3*Math.random()).toFixed(0)+"")}}};function Gl(t,o){var a=document.createElement("a");if(a.setAttribute("href","data:text/plain;charset=UTF-8,"+encodeURIComponent(t)),a.setAttribute("download",o),a.style.display="none",document.createEvent){const i=document.createEvent("MouseEvents");i.initEvent("click",!0,!0),a.dispatchEvent(i)}else a.click()}function fe(t){return t<10?"0"+t:t}const Gm={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},Zm={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"},Qm={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"},Jm={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"},eu={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"},tu={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"},ea={components:{SvgImgMap:v({name:"SvgImgMap"},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("svg",Zm,[...o[0]||(o[0]=[e.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),e.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)])])}]]),SvgUploadFile:v({name:"SvgUploadFile"},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("svg",Qm,[...o[0]||(o[0]=[e.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),e.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)])])}]]),SvgToc:v({name:"SvgToc"},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("svg",Jm,[...o[0]||(o[0]=[e.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),e.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)])])}]]),SvgCopy:v({name:"SvgCopy"},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("svg",eu,[...o[0]||(o[0]=[e.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),e.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),e.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),e.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)])])}]]),SvgLanguage:v({name:"SvgLanguage"},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("svg",tu,[...o[0]||(o[0]=[e.createElementVNode("path",{d:"M200.313605 806.764028h487.993851v78.708685h-487.993851z",fill:"#6C7280","p-id":"13072"},null,-1),e.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),e.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),e.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)])])}]])},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:()=>({})},isPreview:{type:Boolean,default:!1},isFullscreen:{type:Boolean,default:!1}},data:()=>({actionThemeDropdown:!1,actionPhrasesDropdown:!1,actionLanguageDropdown:!1,actionBgColorDropdown:!1,actionSplit:!0,actionPreview:!1,actionScrollSync:!0,actionToc:!0,actionFullscreen:!1,actionHtmlDiaVisible:!1,actionHtmlText:""}),computed:{lastExpFileName(){let t=new Date,o=t.getFullYear(),a=t.getMonth()+1,i=t.getDate(),l=t.getHours(),n=t.getMinutes(),r=o+"-"+fe(a)+"-"+fe(i)+"_"+fe(l)+"-"+fe(n);return this.exportFileName||r},toolConfig(){const{toolbars:t={}}=this;return{...Gm,...t}}},created(){this.actionPreview=this.isPreview||!1},methods:{actionPhrasesSet(t){this.codemrrConfig.phrases=t,this.actionPhrasesDropdown=!1},actionLanguageSet(t){this.codemrrConfig.language=t,this.actionLanguageDropdown=!1},actionBgColorSet(t){this.codemrrConfig.backgroundColor=t,this.actionBgColorDropdown=!1},actionThemesSet(t){this.codemrrConfig.theme=t,this.actionThemeDropdown=!1,this.$emit("on-act-theme",t)},actionFullscreenSet(t){this.actionFullscreen=t;let o=this.$refs[this.editorWrapRefID];t?o.classList.add("fullscreen"):o.classList.remove("fullscreen"),this.actionCurrent("fullscreen",t)},actionChooseImage(){const t=document.createElement("input");t.type="file",t.accept="image/*",t.onchange=()=>{const o=t.files;o[0]&&(this.$emit("on-act-choose-image",o[0]),t.value="")},t.click()},actionInsBg(){const t=this.getLastPoint(),o=t.content||!1;o?this.insertContent("=="+o+"=="):(this.insertContent("===="),this.setCursor(t.line,t.ch+1))},actionUndo(){if(this.editorViewInst){const t=this.editorViewInst.state.behavior(T.EditorState.effect(T.EditorState.undo));this.editorViewInst.update([{changes:{from:0,to:t.doc.length,insert:t.doc},selection:T.EditorSelection.single(0)}])}},actionRedo(){this.editorViewInst&&this.editorViewInst.dispatch({...this.editorViewInst.state,effects:T.EditorState.redo()})},actionInsStrong(){const t=this.getLastPoint(),o=t.content||!1;let a="";o?(a="**"+o+"**",this.deleteContent(t.start,t.end),this.insertContent(t.start,a)):(a="****",this.insertContent(t.start,a)),this.setCursor(t.start+a.length,t.start+a.length)},actionInsItalic(){const t=this.getLastPoint(),o=t.content||!1;let a="";o?(a="*"+o+"*",this.deleteContent(t.start,t.end),this.insertContent(t.start,a)):(a="**",this.insertContent(t.start,a)),this.setCursor(t.start+a.length,t.start+a.length)},actionInsOverline(){const t=this.getLastPoint(),o=t.content||!1;let a="";o?(a="~~"+o+"~~",this.deleteContent(t.start,t.end),this.insertContent(t.start,a)):(a="~~~~",this.insertContent(t.start,a)),this.setCursor(t.start+a.length,t.start+a.length)},actionInsUnderline(){const t=this.getLastPoint(),o=t.content||!1;let a="";o?(a="<u>"+o+"</u>",this.deleteContent(t.start,t.end),this.insertContent(t.start,a)):(a="<u></u>",this.insertContent(t.start,a)),this.setCursor(t.start+a.length,t.start+a.length)},actionInsTitle(t){const o={1:"# ",2:"## ",3:"### ",4:"#### ",5:"##### ",6:"###### "}[t],a=this.getLastPoint(),i=a.content||!1;let l=`
8
8
  `+o+`标题
9
9
 
10
10
  `;i?i.startsWith("#")?this.insertContent(a.end+1,l):(l=`
package/lib/cv-ui.js CHANGED
@@ -2912,10 +2912,12 @@ const Th = { name: "cvIcons", props: { ...yn.prop, type: { type: [String], defau
2912
2912
  }]]), Xl = { 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: "" }, hoverEffect: { type: Boolean, default: !1 } }, data: () => ({ iconType: "svg" }), computed: { maskIconUrl() {
2913
2913
  const e = "https://10ui.cn/icons";
2914
2914
  let t = this.name || "", o = "";
2915
- if (t = t.replace(/([A-Z])/g, (l) => `-${l.toLowerCase()}`), t = t.replace(/^-|-$/g, ""), t = t.toLowerCase().trim(), /-filled$/.test(t)) {
2916
- const l = t.slice(0, t.lastIndexOf("-filled"));
2917
- l ? o = `${l.split("-").filter((a) => a.trim().length > 0).join("/")}-filled` : o = t;
2918
- } else t.includes("-") ? o = t.split("-").filter((l) => l.trim().length > 0).join("/") : o = t;
2915
+ t = t.replace(/([A-Z])/g, (a) => `-${a.toLowerCase()}`), t = t.replace(/^-|-$/g, ""), t = t.toLowerCase().trim();
2916
+ const l = /-(filled|bold)$/;
2917
+ if (l.test(t)) {
2918
+ const a = t.match(l)[1], i = t.slice(0, t.lastIndexOf(`-${a}`));
2919
+ i ? o = `${i.split("-").filter((n) => n.trim().length > 0).join("/")}-${a}` : o = t;
2920
+ } else t.includes("-") ? o = t.split("-").filter((a) => a.trim().length > 0).join("/") : o = t;
2919
2921
  return (this.iconType?.toLowerCase() || "png") === "svg" ? `${e}/${o}.svg` : `${e}/png/${o}.png`;
2920
2922
  }, iconSize() {
2921
2923
  return typeof this.size == "string" && (this.size.includes("px") || this.size.includes("rpx")) ? this.size : `${parseFloat(this.size)}px`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@10yun/cv-pc-ui",
3
- "version": "0.3.60",
3
+ "version": "0.3.61",
4
4
  "description": "cvjs-pc-ui组件",
5
5
  "author": "10yun",
6
6
  "private": false,