@10yun/cv-pc-ui 0.3.59 → 0.3.60
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 +1 -1
- package/lib/cv-ui.js +1 -1
- package/package.json +1 -1
package/lib/cv-ui.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var cn=Object.create;var na=Object.defineProperty;var dn=Object.getOwnPropertyDescriptor;var pn=Object.getOwnPropertyNames;var hn=Object.getPrototypeOf,mn=Object.prototype.hasOwnProperty;var un=(t,o,a,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of pn(o))!mn.call(t,l)&&l!==a&&na(t,l,{get:()=>o[l],enumerable:!(i=dn(o,l))||i.enumerable});return t};var no=(t,o,a)=>(a=t!=null?cn(hn(t)):{},un(o||!t||!t.__esModule?na(a,"default",{value:t,enumerable:!0}):a,t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("element-plus"),e=require("vue"),gn=require("codemirror"),T=require("@codemirror/state"),B=require("@codemirror/view"),fn=require("@codemirror/commands"),x=require("@codemirror/language"),s=require("@lezer/highlight"),ia=require("@codemirror/lang-javascript"),Cn=require("@codemirror/lang-html"),vn=require("@codemirror/lang-json"),yn=require("@codemirror/lang-markdown"),kn=require("@codemirror/lang-vue"),bn=require("@codemirror/lang-php"),wn=require("@codemirror/lang-java"),ra=require("@codemirror/lang-sql"),Vn=require("@codemirror/lang-python"),xn=require("@codemirror/lang-xml"),Sn=require("@codemirror/lang-go"),Nn=require("@codemirror/lang-css"),Bn=require("html-to-md"),v=(t,o)=>{const a=t.__vccOpts||t;for(const[i,l]of o)a[i]=l;return a},ve=v({name:"cvBadge",extends:{ExtendBadge:k.ElBadge},props:{...k.ElBadge.props},created(){},computed:{isShow(){return!this.value||!(this.value>0)}},data:()=>({})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-badge");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{hidden:n.isShow}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["hidden"])}]]);ve.install=function(t){t.component(ve.name,ve)};const ye=v({name:"cvRow",props:{gutter:{type:[Number,String],default:0},type:{type:[String],default:""},justify:{type:[String],default:"start"},align:{type:[String],default:"top"},tag:{type:[String],default:"div"}},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-row");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-row"},{type:a.type,justify:a.justify,align:a.align,tag:a.tag},{gutter:parseInt(a.gutter)}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["gutter"])}]]),ke=v({name:"cvCol",props:{span:{type:[Number,String],default:24},offset:{type:[Number,String],default:0}},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-col");return e.openBlock(),e.createBlock(r,{class:"cv-col",span:parseInt(a.span),offset:parseInt(a.offset)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["span","offset"])}]]);ye.install=function(t){t.component(ye.name,ye)},ke.install=function(t){t.component(ke.name,ke)};const be=v({name:"cvBtnBase",emits:["click"],props:{...k.ElButton.props,autoLoading:{type:Boolean,default:!1},svg:{type:[String],default:""}},data:()=>({loadingStatus:!1}),computed:{filteredProps(){const{autoLoading:t,...o}=this.$props;return o},hasDefaultContent(){const t=this.$slots.default?.();return t&&t.length>0}},methods:{handleClick(t){this.autoLoading&&(this.loadingStatus=!0);try{this.$emit("click",()=>{this.loadingStatus=!1})}catch(o){throw this.loadingStatus=!1,o}}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("cv-mask-svg"),c=e.resolveComponent("el-button");return t.$slots.default||n.hasDefaultContent?(e.openBlock(),e.createBlock(c,e.mergeProps({key:0,class:"cv-btn"},n.filteredProps,{loading:l.loadingStatus,onClick:n.handleClick}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:2},[a.svg?{name:"icon",fn:e.withCtx(()=>[e.createVNode(r,{name:a.svg,size:"14",color:"#fff"},null,8,["name"])]),key:"0"}:void 0]),1040,["loading","onClick"])):(e.openBlock(),e.createBlock(c,e.mergeProps({key:1,class:"cv-btn"},n.filteredProps,{loading:l.loadingStatus,onClick:n.handleClick}),e.createSlots({_:2},[a.svg?{name:"icon",fn:e.withCtx(()=>[e.createVNode(r,{name:a.svg,size:"14",color:"#fff"},null,8,["name"])]),key:"0"}:void 0]),1040,["loading","onClick"]))}]]),we=v({name:"cvBtnText",emits:["click"],props:{...k.ElButton.props,autoLoading:{type:Boolean,default:!1}},data:()=>({loadingStatus:!1}),methods:{handleClick(){this.autoLoading&&(this.loadingStatus=!0),this.$emit("click",()=>{this.loadingStatus=!1})}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-btn"},t.$props,{link:"",loading:l.loadingStatus,onClick:n.handleClick}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["loading","onClick"])}]]);be.install=function(t){t.component(be.name,be)},we.install=function(t){t.component(we.name,we)};const Ve=v({name:"cvAutocompleteBase",props:{...k.ElAutocomplete.props},data:()=>({localVal:"",loadingStatus:!1}),created(){},methods:{async querySearchAsync(t,o){}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-autocomplete");return e.openBlock(),e.createBlock(r,e.mergeProps({modelValue:l.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>l.localVal=c)},t.$props,{"fetch-suggestions":n.querySearchAsync}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["modelValue","fetch-suggestions"])}]]),oo={props:{compConfig:{},dataParse:{type:[Function],default:()=>null}},data:()=>({searchData:{},loadDataLoading:!1,loadDataList:[],loadDataTotal:0,loadPageCurr:1,loadPageLimit:10,loadConfigSetting:{},loadConfigDef:{pageCurr:1,pageLimit:10,isSkip:!1,url:null,apiFunc:null,mockData:null,where:{},response:{statusName:"status",statusCode:200,msgName:"msg",countName:"total",dataName:"data"},request:{pageName:"page",limitName:"pagesize"}}}),methods:{loadEnding(){this.loadDataLoading=!1,this.$nextTick(()=>{this.loadDataLoading=!1})},loadGetData(){if(this.loadDataLoading=!0,this.loadConfigSetting.apiFunc&&typeof this.loadConfigSetting.apiFunc=="function"){const t=this.loadConfigSetting;let o={...t.where};o[t.request.pageName]=this.loadPageCurr,o[t.request.limitName]=this.loadPageLimit,o=Object.assign(o,this.searchData),this.loadConfigSetting.apiFunc(o).then(a=>{this.loadPageCurr=o[t.request.pageName],this.loadEnding();let i=this.sortOutData(a);if(i.status!=t.response.statusCode)return void ExtendMessage({message:i.msg,type:"error",duration:1300});if(i.data.length===0)return void ExtendMessage({message:"没有更多数据了",type:"warning",duration:1300});let l=i[t.response.dataName]||[];this.dataParse&&typeof this.dataParse=="function"&&(l=this.dataParse.call(null,l)),this.loadDataList.push(...l),this.loadDataTotal=i[t.response.countName]||0}).catch(a=>{this.loadEnding()})}else this.loadDataList.length>0&&(this.loadDataTotal=this.loadDataList.length),this.loadEnding()},sortOutData(t){let o=this.loadConfigSetting.response,a={},i=[],l=[];a.status=t[o.statusName],a.msg=t[o.msgName],a.total=t[o.countName],i=t[o.dataName];for(let n in i)l[n]=i[n];return a.data=l,a}}},xe=v({name:"cvAutocompleteLoad",mixins:[oo],emits:["update:modelValue","input"],props:{...k.ElAutocomplete.props,modelValue:{type:[String,Object,Number],default:()=>({})},placeholder:{type:[String],default:"请输入内容"},popperClass:{type:[String],default:"cv-autocomplete-load"},clearable:{type:[Boolean],default:!0},triggerOnFocus:!1,debounce:500,refID:{type:[String],required:!1,default:()=>"cvAutocompleteLoad-"+ +new Date+(Math.random()/1e4).toFixed(0)},compConfig:{type:[Object],default:()=>({})}},data:()=>({localVal:"",searchList:[],compConfigDef:{searchField:["value"]},timeout:null,loadingMore:!1}),directives:{loadmore:{mounted(t,o){const a=((l,n)=>{let r=null;return function(...c){r&&clearTimeout(r),r=setTimeout(()=>{l.apply(this,c)},n)}})(l=>{const{scrollTop:n,scrollHeight:r,clientHeight:c}=l.target;r-(n+c)<10&&!o.instance.loading&&o.value()},200),i=new MutationObserver(()=>{const l=t.querySelector(".el-autocomplete-suggestion__wrap");l&&!t.__scrollHandler__&&(l.addEventListener("scroll",a),t.__scrollHandler__=a,i.disconnect())});i.observe(t,{childList:!0,subtree:!0})},beforeUnmount(t){if(t.__scrollHandler__){const o=t.querySelector(".el-autocomplete-suggestion__wrap");o&&o.removeEventListener("scroll",t.__scrollHandler__),delete t.__scrollHandler__}}}},created(){this.initConfAll(),this.getData()},methods:{initConfAll(){let t={};Object.assign(t,this.loadConfigDef,this.compConfigDef,this.compConfig),this.loadPageCurr=t.pageCurr||1,this.loadPageLimit=t.pageLimit||10,Object.assign(t.where,this.searchData),this.loadConfigSetting=t},getMoreData(){if(!(this.loadingMore||this.loadDataList.length>=this.loadDataTotal))try{this.loadingMore=!0,this.loadPageCurr++,this.loadGetData()}finally{this.loadingMore=!1}},getData(){this.loadPageCurr=1,this.loadDataList=[],this.loadGetData()},async querySearchAsync(t,o){this.loadPageCurr=1,this.loadDataLoading=!0;var a=this.loadDataList||[];let i=[];const l=this.loadConfigSetting.searchField||["value"];if(i=(t=t.toLowerCase())?a.filter(this.createFilter(t,l)):a,i.length>0)o(i.map(n=>({...n,is_last_tip:!1}))),this.lookFlag=!0;else try{this.loadDataList.length<this.loadDataTotal&&this.loadPageCurr++,this.searchData.keyword=t,this.loadDataList=[],await this.loadGetData();const n=this.loadDataList.map(r=>({...r,is_last_tip:!1}));n.push({is_last_tip:!0}),o(n)}catch{}finally{this.lookFlag=!0}},createFilter:(t,o)=>a=>o.some(i=>(a[i]+"").toLowerCase().indexOf(t)!==-1),handleChange(t){},handleSelect(t){this.$emit("update:modelValue",t)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("cv-icons"),c=e.resolveComponent("el-autocomplete"),d=e.resolveDirective("loadmore");return e.withDirectives((e.openBlock(),e.createElementBlock("div",null,[e.createVNode(c,e.mergeProps(t.$props,{modelValue:l.localVal,"onUpdate:modelValue":o[1]||(o[1]=p=>l.localVal=p),"fetch-suggestions":n.querySearchAsync,onChange:n.handleChange,onSelect:n.handleSelect,teleported:!1,"popper-append-to-body":!1}),{load:e.withCtx(()=>[...o[2]||(o[2]=[])]),default:e.withCtx(({item:p})=>[p.is_last_tip?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"default",e.normalizeProps(e.mergeProps({key:0},{item:p}))),p.is_last_tip?(e.openBlock(),e.createElementBlock("div",{key:1,class:"cv-autocomolete-nodata",onClick:o[0]||(o[0]=e.withModifiers((...h)=>n.getData&&n.getData(...h),["stop"])),disabled:""},[o[3]||(o[3]=e.createTextVNode(" 没有更多数据了 ",-1)),e.createVNode(r,{type:"ElIconRefreshLeft"}),o[4]||(o[4]=e.createTextVNode(" 刷新按钮 ",-1))])):e.createCommentVNode("",!0)]),_:3},16,["modelValue","fetch-suggestions","onChange","onSelect"])])),[[d,n.getMoreData]])}]]);Ve.install=function(t){t.component(Ve.name,Ve)},xe.install=function(t){t.component(xe.name,xe)};const Se=v({...k.ElForm,name:"cvFormBase",extends:k.ElForm,provide(){return{elForm:this}},props:{...k.ElForm.props,labelWidth:{type:[String,Number],default:"auto"},labelPosition:{type:String,default:"right"}},watch:{model(){}},data:()=>({})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-form-base"},{...t.$props,...t.$attrs},e.toHandlers(t.$attrs)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),Ne=v({name:"cvFormInline",provide(){return{elForm:this}},props:{...k.ElForm.props},watch:{},data:()=>({form:{}})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-form-base"},t.$props,e.toHandlers(t.$attrs),{inline:!0}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),En={name:"cvFormItem",extends:k.ElFormItem,props:{...k.ElFormItem.props},data:()=>({localLabelWidth:"",localError:""}),created(){},methods:{}},Dn={key:0,class:"cv-form-item__tip"},Be=v(En,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-form-item");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps({...t.$props,...t.$attrs})),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default"),t.$slots.tip?(e.openBlock(),e.createElementBlock("div",Dn,[e.renderSlot(t.$slots,"tip")])):e.createCommentVNode("",!0)]),_:3},16)}]]);Se.install=function(t){t.component(Se.name,Se)},Ne.install=function(t){t.component(Ne.name,Ne)},Be.install=function(t){t.component(Be.name,Be)};const I={extends:k.ElInput,emits:["update:modelValue","change"],props:{...k.ElInput.props,modelValue:{type:[Number,String],default:""},placeholder:{type:[Number,String],default:""},disabled:{type:Boolean,default:!1}},watch:{modelValue(t){this.localVal=t},localVal(){this.handleChange(),this.handleInput()}},data(){return{localVal:this.modelValue,localRules:[]}},created(){},methods:{handleChange(){this.$emit("change",this.localVal)},handleInput(){this.$emit("update:modelValue",this.localVal)},handleBlur(){this._isCheckValue()},_showError(t){this.localError=t||"请输入正确的"+this.label},_diyValidate(){},_isCheckValue(){const o=this?.rules.split("|");this.localError="";for(let a in o){let i=o[a].split(":"),l=i[0]||"",n=i[1]||"";switch(l){case"require":if(this.localVal=="")return void this._showError(this.label+"不能为空");break;case"max":if(this.localVal.length>n)return void this._showError(this.label+"最大长度不超过"+n);break;case"min":if(this.localVal.length<n)return void this._showError(this.label+"最小长度不小于"+n);break;default:this._diyValidate(l)}}}}},_n=v({name:"cvInputText",mixins:[I],props:{},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"text"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.prepend?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Ee=v({name:"cvInputMobile",mixins:[I],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"number",oninput:"if(value.length>11)value=value.slice(0,11)"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入11位大陆手机号",clearable:""}),e.createSlots({prepend:e.withCtx(()=>[o[1]||(o[1]=e.createTextVNode("+86",-1))]),_:2},[t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"0"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),De=v({name:"cvInputEmail",mixins:[I],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"text"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入邮箱",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),_e=v({name:"cvInputPassword",mixins:[I],components:{},props:{showPassword:{type:Boolean,default:!1}},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"password"},{disabled:t.disabled,showPassword:a.showPassword},{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入密码",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Te=v({name:"cvInputNumber",mixins:[I],props:{},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-number",type:"number"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入整数",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Ie=v({name:"cvInputIdcard",mixins:[I],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"text",oninput:"if(value.length>18)value=value.slice(0,18)"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入身份证",clearable:"",maxlength:"18"}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Le=v({name:"cvInputDigit",mixins:[I],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"number"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Fe=v({name:"cvTextarea",mixins:[I],props:{rows:{type:[Number,String],default:3},autosize:{type:[Boolean,Object],default:!1}},data:()=>({}),computed:{lastRow(){return parseInt(this.rows)}},created(){},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"textarea"},{disabled:t.disabled,rows:n.lastRow,autosize:a.autosize},{rows:n.lastRow,modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入内容",clearable:""}),null,16,["rows","modelValue","onInput","placeholder"])}]]),Tn={name:"cvTextareaBtn",mixins:[I],components:{},props:{rows:{type:[Number,String],default:3},btnText:{type:[Number,String],default:""},btnIcon:{type:[String],default:""},autosize:{type:[Boolean,Object],default:!1}},data:()=>({}),computed:{lastRow(){return parseInt(this.rows)}},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},In={class:"cv-textab-group"},Ln={class:"cv-textab-group__append"},Fn={class:"cv-textab_slot-wrap"},$e=v(Tn,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input"),c=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",In,[e.createVNode(r,e.mergeProps({type:"textarea"},{disabled:t.disabled,rows:n.lastRow,autosize:a.autosize},{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>t.localVal=d),onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入内容",clearable:""}),null,16,["modelValue","onInput","placeholder"]),e.createElementVNode("div",Ln,[e.createElementVNode("div",Fn,[e.renderSlot(t.$slots,"default",{},()=>[e.createVNode(c,{class:"cv-textab_slotbtn",type:"primary",size:t.size,onClick:n.onSubmit},{default:e.withCtx(()=>[a.btnIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(a.btnIcon),style:{"margin-right":"5px"}},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(a.btnText),1)]),_:1},8,["size","onClick"])])])])])}]]),$n={class:"cv-input-group"},On={class:"cv-input-group__append"},Oe=v({name:"cvInputBtn",mixins:[I],emits:["btnClick"],components:{},props:{btnText:{type:[Number,String],default:"确定"},btnIcon:{type:[String],default:""}},data:()=>({}),methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input"),c=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",$n,[e.createVNode(r,e.mergeProps({type:"text"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>t.localVal=d),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入",clearable:""}),null,16,["modelValue","onChange","onInput","placeholder"]),e.createElementVNode("div",On,[e.renderSlot(t.$slots,"default",{},()=>[e.createVNode(c,{class:"cv-input-btn__slotbtn",type:"primary",size:t.size,onClick:n.onSubmit},{default:e.withCtx(()=>[a.btnIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(a.btnIcon),style:{"margin-right":"5px"}},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(a.btnText),1)]),_:1},8,["size","onClick"])])])])}]]),io=v({data:()=>({formData:{}})},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div")}]]);Ee.install=function(t){t.component(Ee.name,Ee)},De.install=function(t){t.component(De.name,De)},_e.install=function(t){t.component(_e.name,_e)},Te.install=function(t){t.component(Te.name,Te)},Ie.install=function(t){t.component(Ie.name,Ie)},Le.install=function(t){t.component(Le.name,Le)},Fe.install=function(t){t.component(Fe.name,Fe)},$e.install=function(t){t.component($e.name,$e)},Oe.install=function(t){t.component(Oe.name,Oe)},io.install=function(t){t.component(io.name,io)};const ze=v({name:"cvInputCounter",extends:k.ElInputNumber,props:{},watch:{modelValue(){this.localVal=this.modelValue}},data:()=>({localVal:0}),created(){},methods:{handleChange(t){this.$emit("update:modelValue",this.localVal)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input-number");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{modelValue:l.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>l.localVal=c),onChange:n.handleChange,step:t.step}),null,16,["modelValue","onChange","step"])}]]);ze.install=function(t){t.component(ze.name,ze)};const zn={class:"cv-show-text"},Mn=["innerHTML"],Me=v({name:"cvShowText",mixins:[],components:{},props:{text:{type:[Number,String,Object],default:""}},data:()=>({}),created(){},methods:{}},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",zn,[a.text?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:a.text},null,8,Mn)):e.createCommentVNode("",!0),a.text?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"default",{key:1})])}]]),Pn={class:"cv-show-image"},Pe=v({name:"cvShowImage",mixins:[],components:{},props:{url:{type:[String,Array,Object],default:""},width:{type:[String],default:"100px"},height:{type:[String],default:"100px"}},data:()=>({localUrl:""}),watch:{url:{handler(){this.localUrl=typeof this.url=="string"?[this.url]:this.url},immediate:!0,deep:!0}},created(){},methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock("div",Pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.localUrl,(c,d)=>(e.openBlock(),e.createBlock(r,{style:e.normalizeStyle("width:"+a.width+"; height:"+a.height+"; margin-right:10px"),key:d,src:c,"preview-src-list":l.localUrl},null,8,["style","src","preview-src-list"]))),128))])}]]),He=v({name:"cvShowTip",props:{borderColor:{type:[String],default:"#50bfff"},bgColor:{type:[String],default:"#ecf8ff"}},data:()=>({backgroundColor:"#ecf8ff",borderLeft:"5px solid #50bfff"}),created(){this.borderLeft=`5px solid ${this.borderColor}`,this.backgroundColor=`${this.bgColor}`},methods:{}},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",{class:"cv-show-tip",style:e.normalizeStyle({backgroundColor:this.backgroundColor,borderLeft:this.borderLeft})},[e.renderSlot(t.$slots,"default")],4)}]]),Hn={name:"cv-gallery-dialog",props:{type:String,title:String,sources:Array,sliceSingle:{type:Boolean,default:!1},carouselAttrs:Object},data:()=>({isShowCarousel:!1,sourceTitle:"",initialIndex:0,isShowPreview:!1}),methods:{startPreview(t){this.isShowPreview=!0,this.initialIndex=t,this.sourceTitle=this.sources[t].title},handleCarouselChange(t){this.sources[t]&&this.sources[t].title?this.sourceTitle=this.sources[t].title:this.sourceTitle=""}}},An=["src"],jn={key:0,class:"cv-gallery-iframe embed-responsive embed-responsive-16by9"},Rn=["src"],Un=["src"],Wn=["src"],Yn={name:"gallery",components:{GalleryDialog:v(Hn,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-carousel-item"),c=e.resolveComponent("el-carousel"),d=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(d,{visible:l.isShowPreview,"append-to-body":"",onOpen:o[0]||(o[0]=p=>l.isShowCarousel=!0),onClosed:o[1]||(o[1]=p=>l.isShowCarousel=!1),style:{"text-align":"center"}},{header:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.sourceTitle||a.title),1)]),default:e.withCtx(()=>[a.type==="video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.isShowPreview?(e.openBlock(),e.createElementBlock("video",{key:0,src:a.sources[l.initialIndex].src,autoplay:"autoplay",class:"cv-gallery-video",controls:"controls",width:"100%"},null,8,An)):e.createCommentVNode("",!0)],64)):a.type==="iframe"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.isShowPreview?(e.openBlock(),e.createElementBlock("div",jn,[e.createElementVNode("iframe",{src:a.sources[l.initialIndex].src,allowfullscreen:"true",border:"0",frameborder:"no",framespacing:"0",scrolling:"no"},null,8,Rn)])):e.createCommentVNode("",!0)],64)):a.type==="image"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[a.sliceSingle&&a.sources[l.initialIndex]||a.sources.length===1?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.sources[l.initialIndex].src,class:"cv-gallery-image"},null,8,Un)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.isShowCarousel?(e.openBlock(),e.createBlock(c,e.mergeProps({key:0,"initial-index":l.initialIndex,onChange:n.handleCarouselChange,"indicator-position":"outside"},a.carouselAttrs),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.sources,(p,h)=>(e.openBlock(),e.createBlock(r,{key:h},{default:e.withCtx(()=>[e.createElementVNode("img",{src:p.src,class:"cv-gallery-image"},null,8,Wn)]),_:2},1024))),128))]),_:1},16,["initial-index","onChange"])):e.createCommentVNode("",!0)],64))],64)):e.createCommentVNode("",!0)]),_:1},8,["visible"])}]])},props:{type:{type:String,default:"image",validator:t=>["image","video","iframe"].includes(t)},size:Number,width:Number,height:Number,lazy:{type:Boolean,default:!1},source:[String,Array,Object],thumbSuffix:{type:String,default:""},thumbStyle:Object,carouselAttrs:Object,title:String,sliceSingle:{type:Boolean,default:!1}},data:()=>({}),computed:{computedStyle(){let t=this.width||this.size,o=this.height||this.size;return this.type==="iframe"&&(t=t?t+"px":"360px",o=o?o+"px":"auto"),Object.assign({},{width:t,height:o,display:"block"},this.thumbStyle)},thumbs(){return this.computedSources.map(t=>t.thumb)},computedSources(){const t=this.source;if(typeof t=="string")return[this.getStringSource(t)];if(t instanceof Array){const o=[];return t.forEach(a=>{a instanceof Object?o.push(this.getObjectSource(a)):typeof a=="string"&&o.push(this.getStringSource(a))}),o}return t instanceof Object?[this.getObjectSource(t)]:[]}},methods:{handlePreview(t){this.$refs.dialog.startPreview(t)},getStringSource(t){let o=t;return this.type==="image"&&this.thumbSuffix&&(o+=this.thumbSuffix),{type:this.type,src:t,thumb:o}},getObjectSource(t){return t.type=t.thumb?"image":this.type,t.thumb=t.thumb||t.src,t}}},qn={key:0,class:"cv-gallery"},Xn={class:"el-upload-list el-upload-list--picture-card"},Kn=["src"],Gn={class:"el-upload-list__item-actions"},Zn=["onClick"],ro=v(Yn,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("cv-icons"),c=e.resolveComponent("GalleryDialog");return a.source?(e.openBlock(),e.createElementBlock("div",qn,[e.createElementVNode("div",Xn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.computedSources,(d,p)=>(e.openBlock(),e.createElementBlock("li",{key:p,class:"el-upload-list__item"},[e.createElementVNode("div",{style:e.normalizeStyle(n.computedStyle),class:"cv-gallery-iframe embed-responsive embed-responsive-16by9"},[e.createElementVNode("iframe",{src:d.thumb,allowfullscreen:"true",border:"0",frameborder:"no",framespacing:"0",scrolling:"no"},null,8,Kn)],4),e.createElementVNode("span",Gn,[e.createElementVNode("span",{onClick:h=>n.handlePreview(p,d)},[e.createVNode(r,{type:"ElIconVideoPlay",size:"20"})],8,Zn),e.renderSlot(t.$slots,"action",e.mergeProps({ref_for:!0},{source:d,index:p}))])]))),128))]),e.createVNode(c,{carouselAttrs:a.carouselAttrs,sliceSingle:a.sliceSingle,sources:n.computedSources,title:a.title,type:a.type,ref:"dialog"},null,8,["carouselAttrs","sliceSingle","sources","title","type"])])):e.createCommentVNode("",!0)}]]);Me.install=function(t){t.component(Me.name,Me)},Pe.install=function(t){t.component(Pe.name,Pe)},He.install=function(t){t.component(He.name,He)},ro.install=function(t){t.component(ro.name,ro)};const Ae=v({name:"cvRadioOptBase"},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-radio");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),je=v({name:"cvRadioOptBtn"},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-radio-button");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),Re=v({name:"cvRadioGroup"},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]);Ae.install=function(t){t.component(Ae.name,Ae)},je.install=function(t){t.component(je.name,je)},Re.install=function(t){t.component(Re.name,Re)};const Ue=v({name:"cvCheckboxOptBase",extends:k.ElCheckbox},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-checkbox");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),We=v({name:"cvCheckboxOptBtn",extends:k.ElCheckboxButton,props:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-checkbox-button");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),Qn={props:{...k.ElCheckboxGroup.props,modelValue:{type:[Array],default:()=>[]},dataLists:{type:Array,default:()=>[]},dataField:{type:[Object],default:()=>({})},disabled:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.handleChange()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0}},data(){return{localVal:this.modelValue,localOpt:[]}},created(){this.handleChange(),this._parseLocalOpt()},methods:{handleChange(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(i=>{t.push({label:i,value:i})}),this.localOpt=t;else{var o=this.dataField&&this.dataField.label||"label",a=this.dataField&&this.dataField.value||"value";this.dataLists.map(i=>{let l=i[o]===0?0:i[o]||"",n=i[a]===0?0:i[a]||"";n=n===0?0:n||l,t.push({label:l,value:n,disabled:!!i.disabled}),i.checked!="true"&&i.checked!=1||(typeof this.localVal=="string"?this.localVal=n:typeof this.localVal!="array"&&typeof this.localVal!="object"||this.localVal.push(n))}),this.localOpt=t}this._parseLocalOptDiy()},_parseLocalOptDiy(){}}},Jn={class:"cv-checkbox-all"},Ye=v({name:"cvCheckboxAll",mixins:[Qn],components:{},data:()=>({checkAll:!1,isIndeterminate:!0,localOptAll:[]}),methods:{handleCheckAllChange(t){this.localVal=t?this.localOptAll:[],this.isIndeterminate=!1,this.handleChange()},handleCheckedCitiesChange(t){let o=t.length;this.checkAll=o===this.localOptAll.length,this.isIndeterminate=o>0&&o<this.localOptAll.length},_parseLocalOptDiy(){this.localOpt&&this.localOpt.length!==0&&this.localOpt.map(t=>{t.disabled||this.localOptAll.push(t.label)})}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-checkbox"),c=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Jn,[e.createVNode(r,{indeterminate:l.isIndeterminate,modelValue:l.checkAll,"onUpdate:modelValue":o[0]||(o[0]=d=>l.checkAll=d),onChange:n.handleCheckAllChange},{default:e.withCtx(()=>[...o[2]||(o[2]=[e.createTextVNode("全选",-1)])]),_:1},8,["indeterminate","modelValue","onChange"]),o[3]||(o[3]=e.createElementVNode("div",{style:{margin:"15px 0"}},null,-1)),e.createVNode(c,{modelValue:t.localVal,"onUpdate:modelValue":o[1]||(o[1]=d=>t.localVal=d),onChange:n.handleCheckedCitiesChange},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.localOpt,(d,p)=>(e.openBlock(),e.createBlock(r,{value:d.value,key:p,onChange:t.handleChange,disabled:t.disabled||d.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:2},1032,["value","onChange","disabled"]))),128))])]),_:3},8,["modelValue","onChange"])])}]]),qe=v({name:"cvCheckboxGroup"},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]);function $l(t,o,a){var i={}.atBegin;return(function(l,n,r){var c,d=r||{},p=d.noTrailing,h=p!==void 0&&p,u=d.noLeading,m=u!==void 0&&u,f=d.debounceMode,C=f===void 0?void 0:f,g=!1,y=0;function b(){c&&clearTimeout(c)}function w(){for(var V=arguments.length,N=new Array(V),E=0;E<V;E++)N[E]=arguments[E];var L=this,q=Date.now()-y;function G(){y=Date.now(),n.apply(L,N)}function le(){c=void 0}g||(m||!C||c||G(),b(),C===void 0&&q>l?m?(y=Date.now(),h||(c=setTimeout(C?le:G,l))):G():h!==!0&&(c=setTimeout(C?le:G,C===void 0?l-q:l)))}return w.cancel=function(V){var N=(V||{}).upcomingOnly,E=N!==void 0&&N;b(),g=!E},w})(t,o,{debounceMode:(i!==void 0&&i)!==!1})}function Xe(t,o=!1,a=!0){return new Promise((i,l)=>{const n=document.createElement("script");t=t.replace(/([^:]\/)\/+/g,"$1"),n.id=t,n.type="text/javascript",n.src=o?t+"?t="+new Date().getTime():t,document.getElementById(t)&&a?i():(document.body.appendChild(n),n.onload=()=>{i()})})}function ei(t){const o=t;try{const a=document.createElement("textarea");a.value=o,document.body.appendChild(a),a.select(),document.execCommand("Copy"),a.remove(),document.body.removeChild(a)}catch{navigator.clipboard.writeText(o).then(()=>{}).catch(i=>{})}k.ElMessage({message:"复制成功",type:"success"})}function ti(t){var o=new Date,a=new Date(t),i=o-a,l=Math.floor(i/1e3),n=Math.floor(l/60),r=Math.floor(n/60);if(n<1)var c=l+"秒前";else r<1?c=n+"分钟前":r<24?c=r+"小时前":c=a.toLocaleString();return c}function Y(t,...o){return o.reduce((a,i)=>Object.keys(i).reduce((l,n)=>{const r=i[n];return to(r)?l[n]=Y(l[n]?l[n]:{},r):zl(r)?l[n]=r.map((c,d)=>{if(to(c)){const p=l[n]?l[n]:[];return Y(p[d]?p[d]:{},c)}return c}):l[n]=r,l},a),t)}function Ol(t,o){const{[o[0]]:a,...i}=t;return Object.keys(t).reduce((l,n)=>(o.includes(n)||(l[n]=t[n]),l),{})}function to(t){return Object.prototype.toString.call(t)==="[object Object]"}function zl(t){return typeof Array.isArray=="function"?Array.isArray(t):Object.prototype.toString.call(t)==="[object Array]"}function ee(t){return zl(t)?t.length===0:to(t)?Object.keys(t).length===0:t===""||t==null}function oe(t,o){return ee(t)?o:t}function oi(t){let o=t.lastIndexOf("."),a=t.substring(o+1);return["png","jpg","jpeg","gif","webp","svg"].indexOf(a.toLowerCase())!=-1}function K(t){return t==null?"":String(t)}function ai(t){return window.URL?window.URL.createObjectURL(t):window.webkitURL?window.webkitURL.createObjectURL(t):""}Ue.install=function(t){t.component(Ue.name,Ue)},We.install=function(t){t.component(We.name,We)},qe.install=function(t){t.component(qe.name,qe)},Ye.install=function(t){t.component(Ye.name,Ye)};const Ml=(()=>{const t={svg:["image/svg+xml","image/svg"],jpg:["image/jpeg","image/jpg"],jpeg:["image/jpeg"],png:["image/png"],gif:["image/gif"],webp:["image/webp"],bmp:["image/bmp","image/x-bmp","image/x-ms-bmp"],ico:["image/x-icon","image/vnd.microsoft.icon"],tiff:["image/tiff","image/tif","image/x-tiff"],apng:["image/apng"],avif:["image/avif"],heic:["image/heic"],pdf:["application/pdf"],txt:["text/plain"],csv:["text/csv"],json:["application/json"],xml:["application/xml"],doc:["application/msword"],docx:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],xls:["application/vnd.ms-excel"],xlsx:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],ppt:["application/vnd.ms-powerpoint"],pptx:["application/vnd.openxmlformats-officedocument.presentationml.presentation"],zip:["application/zip"],rar:["application/x-rar-compressed"],"7z":["application/x-7z-compressed"],mp3:["audio/mpeg"],mp4:["video/mp4"],mov:["video/quicktime"],avi:["video/x-msvideo"],wav:["audio/wav"]},o={},a={};for(const[i,l]of Object.entries(t)){o[i]=l[0];for(const n of l)a[n]=i}return{extensionToMime:o,mimeToExtension:a}})(),li={name:"cvGeoCity",mixins:[],components:{},emits:["update:province","update:city","update:district","update:provinceCode","update:cityCode","update:districtCode"],props:{modelValue:{type:[String,Array,Number],default:()=>[]},province:{type:[String]},provinceCode:{type:[Number,String],default:""},city:{type:[String]},cityCode:{type:[Number,String],default:""},district:{type:[String]},districtCode:{type:[Number,String],default:""},cityHide:{type:Boolean,default:!1},districtHide:{type:Boolean,default:!1}},watch:{modelValue(t){},province(t){this.initProvince()},provinceCode(t){this.initProvince()},cityCode(t){this.initCity()},districtCode(t){this.initDistrict()}},data:()=>({provinceCdnList:{},cityCdnList:{},districtCdnList:{},isCdnLoading:!0,provinceList:[],cityList:[],districtList:[],local1_code:"",local1_name:"",local2_code:"",local2_name:"",local3_code:"",local3_name:"",local1_flag:!1,local2_flag:!1,local3_flag:!1,hideMunicipality:!1,municipalities:["110000","120000","310000","500000","北京市","天津市","上海市","重庆市"]}),async mounted(){await Xe(this.CDN_URL_UI+"/dict/geo/province-kv-window.js"),await Xe(this.CDN_URL_UI+"/dict/geo/city-kv-window.js"),await Xe(this.CDN_URL_UI+"/dict/geo/district-kv-window.js"),await this.initLoad()},methods:{initLoad(){setTimeout(()=>{this.provinceCdnList=window.cdn__DictAreaProvince,this.cityCdnList=window.cdn__DictAreaCity,this.districtCdnList=window.cdn__DictAreaDistrict,this.local1_flag=!1,this.isCdnLoading=!1,this.getProvinces(),this.initProvince()},200)},initProvince(){if(!this.province&&!this.provinceCode)return!1;this.getProvinces();const t=this.provinceList.find(o=>this.province?o.provinceName===this.province:this.provinceCode&&o.provinceCode===this.provinceCode);t&&(this.local1_code=t.provinceCode,this.changeProvince(t.provinceCode)),this.initCity()},initCity(){if(!this.city&&!this.cityCode)return!1;const t=this.cityList.find(o=>this.city?o.cityName===this.city:this.cityCode&&o.cityCode===this.cityCode);t&&(this.local2_code=t.cityCode,this.changeCity(t.cityCode)),this.initDistrict()},initDistrict(){if(!this.district&&!this.districtCode)return!1;const t=this.districtList.find(o=>this.district?o.districtName===this.district:this.districtCode&&o.districtCode===this.districtCode);t&&this.changeDistrict(t.districtCode)},getProvinces(){if(!this.local1_flag&&typeof this.provinceCdnList=="object"){let t=[];for(let o in this.provinceCdnList)t.push({provinceCode:o,provinceName:this.provinceCdnList[o]});this.provinceList=t,this.local1_flag=!0}},changeProvince(t){this._getNeedCity(),this.local2_flag=!0,this.local2_code="",this.local2_name="",this.local3_code="",this.local3_name="",this.local1_code=t,this.local1_name=this.provinceList.find(o=>o.provinceCode===t)?.provinceName,this.handleChoose()},_getNeedCity(){let t=[],o=this.local1_code.substring(0,2);for(let a in this.cityCdnList)a.substring(0,2)==o&&t.push({cityCode:a,cityName:this.cityCdnList[a]});this.cityList=t},getCities(){this.local2_flag||this.provinceCode&&(this._getNeedCity(),this.local2_flag=!0)},changeCity(t){this._getNeedDistrict(),this.local3_flag=!0,this.local3_name="",this.local3_code="",this.local2_code=t,this.local2_name=this.cityList.find(o=>o.cityCode===t)?.cityName,this.handleChoose()},_getNeedDistrict(){let t=[],o=this.local2_code.substring(0,4);for(let a in this.districtCdnList)a.substring(0,4)==o&&t.push({districtCode:a,districtName:this.districtCdnList[a]});this.districtList=t},getDistrict(){this.local3_flag||this.local2_code&&this._getNeedDistrict()},changeDistrict(t){this.local3_code=t,this.local3_name=this.districtList.find(o=>o.districtCode===t)?.districtName,this.handleChoose()},handleChoose(){this.$emit("update:province",this.local1_name),this.$emit("update:provinceCode",this.local1_code),this.$emit("update:city",this.local2_name),this.$emit("update:cityCode",this.local2_code),this.$emit("update:district",this.local3_name),this.$emit("update:districtCode",this.local3_code)}}},ni={class:"cv-geo-city"},ii={key:0},ri={key:1},Ke=v(li,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-option"),c=e.resolveComponent("el-select"),d=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",ni,[e.createElementVNode("div",null,[e.createVNode(c,{modelValue:l.local1_code,"onUpdate:modelValue":o[0]||(o[0]=p=>l.local1_code=p),onFocus:n.getProvinces,onChange:n.changeProvince,placeholder:"省",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.provinceList,(p,h)=>(e.openBlock(),e.createBlock(r,{key:p.provinceCode,label:p.provinceName,value:p.provinceCode},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.provinceName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]),a.cityHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ii,[e.createVNode(c,{modelValue:l.local2_code,"onUpdate:modelValue":o[1]||(o[1]=p=>l.local2_code=p),onFocus:n.getCities,onChange:n.changeCity,placeholder:"市",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.cityList,(p,h)=>(e.openBlock(),e.createBlock(r,{key:p.cityCode,label:p.cityName,value:p.cityCode},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.cityName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])])),a.cityHide||a.districtHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ri,[e.createVNode(c,{modelValue:l.local3_code,"onUpdate:modelValue":o[2]||(o[2]=p=>l.local3_code=p),onFocus:n.getDistrict,onChange:n.changeDistrict,placeholder:"区/县",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.districtList,(p,h)=>(e.openBlock(),e.createBlock(r,{key:p.districtCode,label:p.districtName,value:p.districtCode},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.districtName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]))])),[[d,l.isCdnLoading]])}]]),Pl={computed:{componentName(){return this.$options.name}},methods:{_mergeAttrs(t){const o=this.$cvUiParams||{},a=t&&o[t]||{},i=o[this.componentName]||{},l=Object.assign({},a,i);return Object.assign({},l,this.$attrs)}}},si={class:"cv-geo-map__wrap"},ci={class:"cv-geo-map__box"},di={style:{width:"100%",height:"510px"}},pi=["src"],hi={class:"cv-geo-map__info"},mi={key:0,class:"cv-geo-map__address"},ui={key:1,class:"cv-geo-map__jwd"},Ge=v({name:"cvGeoMap",mixins:[Pl],emits:["update:address","update:latitude","update:longitude","update:name","update:city"],props:{title:{type:[String],default:"选择经纬度地点"},mapKey:{type:[String],default:""},mapSecret:{type:[String],default:""},mapType:{type:[String],default:"qq"},address:{type:[String]},name:{type:[String]},city:{type:[String]},latitude:{type:[Number,String]},longitude:{type:[Number,String]}},watch:{address(t){this.localAddress=t},latitude(t){this.localLatitude=t},longitude(t){this.localLongitude=t},name(t){this.localName=t},city(t){this.localCity=t}},computed:{localMapKey(){return this._mergeAttrs("geo").mapKey},localMapSecret(){return this._mergeAttrs("geo").mapSecret},mapSrc(){let t=this.localMapKey;if(this.mapType=="qq"){if(!this.localMapKey)return"";let o="https://apis.map.qq.com/tools/locpicker";return o+=`?search=1&type=1&key=${t}&referer=myapp`,this.latitude&&this.longitude&&(o+=`&coord=${this.latitude},${this.longitude}`),o}if(this.mapType=="amap"){if(!this.localMapKey||!this.localMapSecret)return"";let o="https://m.amap.com/picker/";return o+=`?zoom=15&radius=1000&total=20&key=${t}&jscode=${localMapSecret}`,this.latitude&&this.longitude&&(o+=`¢er=${this.longitude},${this.latitude}`),o}return this.$message.info("目前不支持百度地图"),""}},data:()=>({localMapShow:!1,localAddress:"",localLatitude:"",localLongitude:"",localName:"",localCity:""}),mounted(){this.initData()},methods:{initData(){let t=this;window.addEventListener("message",o=>{let a=o.data;a&&a.module=="locationPicker"&&(t.localAddress=a.poiaddress||"",t.localName=a.poiname||"",t.localCity=a.cityname||"",t.localLatitude=a.latlng.lat||"",t.localLongitude=a.latlng.lng||"")},!1)},handleMapClose(){this.localMapShow=!1},handleMapOpen(){this.localMapShow=!0},handleConfirm(){this.$emit("update:address",this.localAddress),this.$emit("update:longitude",this.localLongitude),this.$emit("update:latitude",this.localLatitude),this.$emit("update:name",this.localName),this.$emit("update:city",this.localCity),this.handleMapClose()},handleCopy(t){this.$cvCopy(t)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input"),c=e.resolveComponent("el-tooltip"),d=e.resolveComponent("el-button"),p=e.resolveComponent("el-scrollbar"),h=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",si,[e.createElementVNode("div",ci,[e.createVNode(c,{class:"item",effect:"dark",content:"请点击查找位置选择位置",placement:"bottom"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:l.localAddress,"onUpdate:modelValue":o[0]||(o[0]=u=>l.localAddress=u)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{type:"primary",icon:"ElIconSearch",onClick:n.handleMapOpen},{default:e.withCtx(()=>[...o[5]||(o[5]=[e.createTextVNode("请查找位置",-1)])]),_:1},8,["onClick"])])]),e.createVNode(h,{modelValue:l.localMapShow,"onUpdate:modelValue":o[4]||(o[4]=u=>l.localMapShow=u),title:a.title,width:"520","before-close":n.handleMapClose},{footer:e.withCtx(()=>[e.createElementVNode("div",hi,[l.localAddress?(e.openBlock(),e.createElementBlock("div",mi,[o[6]||(o[6]=e.createElementVNode("span",{class:"cv-geo-map__label"},"已选:",-1)),e.createVNode(c,{class:"item",effect:"dark",content:"点击复制",placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"cv-geo-map__value",onClick:o[1]||(o[1]=u=>n.handleCopy(l.localAddress))},e.toDisplayString(l.localAddress),1)]),_:1})])):e.createCommentVNode("",!0),l.localAddress?(e.openBlock(),e.createElementBlock("div",ui,[o[7]||(o[7]=e.createElementVNode("span",{class:"cv-geo-map__label"},"经度:",-1)),e.createVNode(c,{class:"item",effect:"dark",content:"点击复制",placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"cv-geo-map__value",onClick:o[2]||(o[2]=u=>n.handleCopy(l.localLongitude))},e.toDisplayString(l.localLongitude),1)]),_:1}),o[8]||(o[8]=e.createElementVNode("span",{class:"cv-geo-map__label"},"纬度:",-1)),e.createVNode(c,{class:"item",effect:"dark",content:"点击复制",placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"cv-geo-map__value",onClick:o[3]||(o[3]=u=>n.handleCopy(l.localLatitude))},e.toDisplayString(l.localLatitude),1)]),_:1})])):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.createVNode(d,{onClick:n.handleMapClose},{default:e.withCtx(()=>[...o[9]||(o[9]=[e.createTextVNode("取消",-1)])]),_:1},8,["onClick"]),e.createVNode(d,{type:"primary",onClick:n.handleConfirm,disabled:!l.localAddress},{default:e.withCtx(()=>[...o[10]||(o[10]=[e.createTextVNode("确认选择",-1)])]),_:1},8,["onClick","disabled"])])]),default:e.withCtx(()=>[e.createElementVNode("div",di,[e.createVNode(p,{style:{height:"510px"}},{default:e.withCtx(()=>[e.createElementVNode("iframe",{id:"mapPage",width:"100%",height:"100%",style:{height:"500px"},frameborder:"0",src:n.mapSrc},null,8,pi)]),_:1})])]),_:1},8,["modelValue","title","before-close"])],64)}]]);Ke.install=function(t){t.component(Ke.name,Ke)},Ge.install=function(t){t.component(Ge.name,Ge)};const Ze={...k.ElOption,extends:k.ElOption,name:"cvSelectOpt"},Qe=v({name:"cvSelectBase",emits:["onChoose","change","update:modelValue"],props:{...k.ElSelect.props,modelValue:{type:[String,Array,Number],default:()=>""},emptyValues:{type:[Array],default:[null,void 0]},dataLists:{type:[Array],default:()=>[]},dataField:{type:[Object],default:()=>({})},dataDisabled:{type:[Array],default:()=>[]},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"}},watch:{modelValue(t){this.localVal=t},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(t){this.handleChange()}},data(){return{localVal:this.modelValue,localOpt:[]}},methods:{handleChoose(t,o){this.$emit("onChoose",t,o)},handleChange(){this.$emit("change",this.localVal),this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(i=>{t.push({label:i,value:i})}),this.localOpt=t;else{var o=this.dataField&&this.dataField.label||"label",a=this.dataField&&this.dataField.value||"value";this.dataLists.map(i=>{let l=i[o]===0?0:i[o]||"",n=i[a]===0?0:i[a]||"";if(n=n===0?0:n||l,this.dataDisabled.length>0)for(let r in this.dataDisabled)this.dataDisabled[r][a]==n&&(i.disabled=!0);t.push({label:l,value:n,disabled:!!i.disabled}),i.checked!="true"&&i.checked!=1||(typeof this.localVal=="string"?this.localVal=n:typeof this.localVal!="array"&&typeof this.localVal!="object"||this.localVal.push(n))}),this.localOpt=t}}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-option"),c=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-select-base"},t.$props,{modelValue:l.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>l.localVal=d),size:t.size,filterable:"",clearable:""}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.localOpt,(d,p)=>(e.openBlock(),e.createBlock(r,{key:p,label:d.label,value:d.value,disabled:d.disabled,onClick:h=>n.handleChoose(d,p)},null,8,["label","value","disabled","onClick"]))),128))])]),_:3},16,["modelValue","size"])}]]),Je=v({name:"cvSelectTree",emits:["update:modelValue","change"],props:{...k.ElSelect.props,modelValue:{type:[String,Array,Number],default:()=>""},dataLists:{type:[Array],default:()=>[]},dataField:{type:[Object],default:()=>({value:"id",label:"title",children:"children"})},clearable:{type:Boolean,default:!0},accordion:{type:Boolean,default:!1},defaultExpandAll:{type:Boolean,default:!0},dataDisabled:{type:[Array],default:()=>[]},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"},showAllLevels:{type:Boolean,default:!0},showCheckbox:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},emitPath:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},refID:{type:[String],required:!1,default:()=>"cvSelectTree-"+ +new Date+(Math.random()/1e4).toFixed(0)}},watch:{modelValue(){this.localVal=this.modelValue,this.initHandle()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(){this.handleChange()}},data:()=>({localVal:"",localOpt:[],localTitle:"",defaultExpandedKey:[]}),computed:{props2(){return Object.assign(this.dataField,{emitPath:this.emitPath},{multiple:this.multiple})}},created(){},mounted(){this.localVal=this.modelValue,this.initHandle()},methods:{initHandle(){if(this.localVal){var t=this.$refs[this.refID+"tree"].getNode(this.localVal);t&&(this.localTitle=t.data[this.dataField.label],this.$refs[this.refID+"tree"].setCurrentKey(this.localVal),this.defaultExpandedKey=[this.localVal])}else this.clearHandle();this.initScroll()},initScroll(){this.$nextTick(()=>{let t=document.querySelectorAll(".cv-select-tree .el-scrollbar .el-select-dropdown__wrap")[0],o=document.querySelectorAll(".cv-select-tree .el-scrollbar .el-scrollbar__bar");t.style.cssText="margin: 0px; max-height: none; overflow: hidden;",o.forEach(a=>a.style.width=0)})},handleNodeClick(t,o,a){t.disabled||(this.localTitle=t[this.dataField.label],this.localVal=t[this.dataField.value],this.defaultExpandedKey=[],this.$refs[this.refID].blur())},clearHandle(){this.localTitle="",this.localVal="",this.defaultExpandedKey=[],this.clearSelected()},clearSelected(){document.querySelectorAll(`#${this.refID}tree .el-tree-node`).forEach(t=>t.classList.remove("is-current"))},handleChange(){this.$emit("change",this.localVal),this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=this.dataLists;this.dataField&&this.dataField.label;let o=this.dataField&&this.dataField.value||"value",a=this.dataField&&this.dataField.children||"children",i=this.dataDisabled;(function l(n){for(let r in n)i.map(c=>{n[r][o]==c[o]&&(n[r].disabled=!0)}),n[r][a]&&l(n[r][a])})(t),this.localOpt=t}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-tree"),c=e.resolveComponent("el-option"),d=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(d,e.mergeProps(t.$props,{ref:a.refID,"popper-class":"cv-select-tree",modelValue:l.localTitle,onClear:n.clearHandle}),{default:e.withCtx(()=>[e.createVNode(c,{value:l.localTitle,label:l.localTitle,class:"options"},{default:e.withCtx(()=>[e.createVNode(r,{"highlight-current":"",id:a.refID+"tree",ref:a.refID+"tree",accordion:a.accordion,showCheckbox:a.showCheckbox,data:l.localOpt,props:a.dataField,"node-key":a.dataField.value,onNodeClick:n.handleNodeClick,"default-expand-all":a.defaultExpandAll},null,8,["id","accordion","showCheckbox","data","props","node-key","onNodeClick","default-expand-all"])]),_:1},8,["value","label"])]),_:1},16,["modelValue","onClear"])}]]);Ze.install=function(t){t.component(Ze.name,Ze)},Qe.install=function(t){t.component(Qe.name,Qe)},Je.install=function(t){t.component(Je.name,Je)};const gi={name:"cvCascaderBase",components:{},props:{...k.ElCascader.props,modelValue:{type:[String,Array,Number],default(){}},dataLists:{type:[Array],default:()=>[]},dataDisabled:{type:[Array],default:()=>[]},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"},showAllLevels:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},dataField:{type:[Object],default:()=>({})},emitPath:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(){this.handleChange(),this.handleInput()}},data(){return{localVal:this.modelValue,localOpt:[]}},computed:{props2(){return Object.assign(this.dataField,{emitPath:this.emitPath},{multiple:this.multiple})}},created(){},methods:{handleChange(){this.$emit("change",this.localVal)},handleInput(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=this.dataLists,o=this.dataField&&this.dataField.value||"value",a=this.dataDisabled;(function i(l){for(let n in l)a.map(r=>{l[n][o]==r[o]&&(l[n].disabled=!0)}),l[n].children&&i(l[n].children)})(t),this.localOpt=t},getCheckedNodes(){}}},fi={class:"cv-cascader-base block"},et=v(gi,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-cascader");return e.openBlock(),e.createElementBlock("div",fi,[e.createVNode(r,e.mergeProps(t.$props,{props:n.props2,modelValue:l.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>l.localVal=c),options:l.localOpt,onChange:n.handleChange,onGetCheckedNodes:n.getCheckedNodes}),null,16,["props","modelValue","options","onChange","onGetCheckedNodes"])])}]]);et.install=function(t){t.component(et.name,et)};const Hl={props:{...k.ElTimePicker.props,modelValue:{type:[String,Array,Number,Object,Date],default:null}},watch:{modelValue:{handler(){if(this.valueFormat!="timestamp")this.localVal=this.modelValue;else if(Array.isArray(this.modelValue)){var t;if(t=this.modelValue.map(o=>{if(!isNaN(o)&&o.toString().length==10)return 1e3*o}),this.localVal&&this.localVal[0]==t[0]&&this.localVal[1]==t[1])return;this.localVal=t}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=1e3*this.modelValue&&(this.localVal=1e3*this.modelValue)},immediate:!0,deep:!0},localVal(){var t;if(this.valueFormat!="timestamp")this.$emit("update:modelValue",this.localVal);else if(Array.isArray(this.localVal)){if(t=this.localVal.map(o=>{if(!isNaN(o)&&o.toString().length==13)return parseInt(o/1e3)}),this.modelValue&&t[0]==this.modelValue[0]&&t[1]==this.modelValue[1])return;this.$emit("update:modelValue",t)}else isNaN(this.localVal)||this.localVal.toString().length!=13||(t=parseInt(this.localVal/1e3),this.modelValue!=t&&this.$emit("update:modelValue",t))}},data:()=>({localVal:""}),created(){},methods:{}},tt=v({name:"cvTimeBase",mixins:[Hl],props:{format:{type:String,default:"HH:mm:ss"},valueFormat:{type:String,default:"HH:mm:ss"},placeholder:{type:[String,Number],default:"选择时间"}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-time-picker");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-timePicker-base"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),format:a.format,"picker-options":{}}),null,16,["modelValue","format"])}]]),ot=v({name:"cvTimeRange",mixins:[Hl],props:{format:{type:String,default:"HH:mm:ss"},valueFormat:{type:String,default:"HH:mm:ss"},startPlaceholder:{type:[String,Number],default:"开始时间"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束时间"}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-time-picker");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-timePicker-range"},t.$props,{"is-range":"",modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),format:a.format,"range-separator":a.rangeSeparator,"start-placeholder":a.startPlaceholder,"end-placeholder":a.endPlaceholder}),null,16,["modelValue","format","range-separator","start-placeholder","end-placeholder"])}]]),at=v({name:"cvTimeSelect"},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-time-select");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-time-select"},t.$props),null,16)}]]),ao={props:{...k.ElDatePicker.props,modelValue:{type:[String,Array,Number,Object,Date],default:null},pickerOptions:{type:Boolean,default:!1}},watch:{modelValue:{handler(){if(this.valueFormat!="timestamp")this.localVal=this.modelValue;else if(Array.isArray(this.modelValue)){var t;if(t=this.modelValue.map(o=>{if(!isNaN(o)&&o.toString().length==10)return 1e3*o}),this.localVal&&this.localVal[0]==t[0]&&this.localVal[1]==t[1])return;this.localVal=t}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=1e3*this.modelValue&&(this.localVal=1e3*this.modelValue)},immediate:!0,deep:!0},localVal(){var t;if(this.valueFormat!="timestamp")this.$emit("update:modelValue",this.localVal);else if(Array.isArray(this.localVal)){if(t=this.localVal.map(o=>{if(!isNaN(o)&&o.toString().length==13)return parseInt(o/1e3)}),this.modelValue&&t[0]==this.modelValue[0]&&t[1]==this.modelValue[1])return;this.$emit("update:modelValue",t)}else isNaN(this.localVal)||this.localVal.toString().length!=13||(t=parseInt(this.localVal/1e3),this.modelValue!=t&&this.$emit("update:modelValue",t))}},data:()=>({localVal:""})},lt=v({name:"cvDateBase",mixins:[ao],props:{format:{type:String,default:"YYYY-MM-DD"},valueFormat:{type:String,default:"YYYY-MM-DD"},placeholder:{type:[String,Number],default:"选择日期"}},data:()=>({localPickerOptions:{disabledDate:t=>t.getTime()>Date.now(),shortcuts:[{text:"今天",onClick(t){t.$emit("pick",new Date)}},{text:"昨天",onClick(t){const o=new Date;o.setTime(o.getTime()-864e5),t.$emit("pick",o)}},{text:"一周前",onClick(t){const o=new Date;o.setTime(o.getTime()-6048e5),t.$emit("pick",o)}},{text:"一个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-2592e6),t.$emit("pick",o)}},{text:"三个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-7776e6),t.$emit("pick",o)}},{text:"六个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-15552e6),t.$emit("pick",o)}},{text:"一年前",onClick(t){const o=new Date;o.setTime(o.getTime()-31536e6),t.$emit("pick",o)}}]}})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),type:"date","value-format":a.valueFormat,placeholder:a.placeholder,"picker-options":t.pickerOptions&&l.localPickerOptions}),null,16,["modelValue","value-format","placeholder","picker-options"])}]]),nt=v({name:"cvDateRange",mixins:[ao],props:{valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:[String,Number],default:"开始日期"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束日期"}},data:()=>({localPickerOptions:{shortcuts:[{text:"今天",onClick(t){const o=new Date,a=new Date;t.$emit("pick",[a,o])}},{text:"昨天",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-864e5),o.setTime(o.getTime()-864e5),t.$emit("pick",[a,o])}},{text:"最近一周",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,o])}},{text:"最近一个月",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,o])}},{text:"最近三个月",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,o])}},{text:"最近六个月",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-15552e6),t.$emit("pick",[a,o])}},{text:"最近一年",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-31536e6),t.$emit("pick",[a,o])}}]}})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),type:"daterange","value-format":a.valueFormat,"range-separator":a.rangeSeparator,"start-placeholder":a.startPlaceholder,"end-placeholder":a.endPlaceholder,"picker-options":t.pickerOptions&&l.localPickerOptions}),null,16,["modelValue","value-format","range-separator","start-placeholder","end-placeholder","picker-options"])}]]),it=v({name:"cvDatetimeBase",mixins:[ao],props:{format:{type:String,default:"YYYY-MM-DD HH:mm:ss"},valueFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},placeholder:{type:[String,Number],default:"选择日期时间"}},data:()=>({localPickerOptions:{disabledDate:t=>t.getTime()>Date.now(),shortcuts:[{text:"今天",onClick(t){t.$emit("pick",new Date)}},{text:"昨天",onClick(t){const o=new Date;o.setTime(o.getTime()-864e5),t.$emit("pick",o)}},{text:"一周前",onClick(t){const o=new Date;o.setTime(o.getTime()-6048e5),t.$emit("pick",o)}},{text:"一个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-2592e6),t.$emit("pick",o)}},{text:"三个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-7776e6),t.$emit("pick",o)}},{text:"六个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-15552e6),t.$emit("pick",o)}},{text:"一年前",onClick(t){const o=new Date;o.setTime(o.getTime()-31536e6),t.$emit("pick",o)}}]}})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),type:"datetime","value-format":a.valueFormat,placeholder:a.placeholder,"picker-options":t.pickerOptions&&l.localPickerOptions}),null,16,["modelValue","value-format","placeholder","picker-options"])}]]),rt=v({name:"cvDatetimeRange",mixins:[ao],props:{valueFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},startPlaceholder:{type:[String,Number],default:"开始日期"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束日期"}},data:()=>({localPickerOptions:{shortcuts:[{text:"今天",onClick(t){const o=new Date,a=new Date;t.$emit("pick",[a,o])}},{text:"昨天",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-864e5),o.setTime(o.getTime()-864e5),t.$emit("pick",[a,o])}},{text:"最近一周",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,o])}},{text:"最近一个月",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,o])}},{text:"最近三个月",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,o])}},{text:"最近六个月",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-15552e6),t.$emit("pick",[a,o])}},{text:"最近一年",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-31536e6),t.$emit("pick",[a,o])}}]}})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),type:"datetimerange","value-format":a.valueFormat,"range-separator":a.rangeSeparator,"start-placeholder":a.startPlaceholder,"end-placeholder":a.endPlaceholder,align:"right","picker-options":t.pickerOptions&&l.localPickerOptions}),null,16,["modelValue","value-format","range-separator","start-placeholder","end-placeholder","picker-options"])}]]),st=v({name:"cvDatetimeScreen",props:{start:{type:String,default:null},end:{type:String,default:null},autoUpdate:{type:Boolean,default:!0}},emits:["update:start","update:end","change"],data(){return{defaultTime:[new Date(2e3,0,1,0,0,0),new Date(2e3,0,1,23,59,59)],internalValue:[this.start||"",this.end||""]}},watch:{start(t){t!==null&&t!==""||this.end!==null&&this.end!==""?this.internalValue[0]=t:this.internalValue=[null,null]},end(t){this.start!==null&&this.start!==""||t!==null&&t!==""?this.internalValue[1]=t:this.internalValue=[null,null]}},computed:{dateUtil:()=>({getStartOfDay(t=new Date){const o=new Date(t);return o.setHours(0,0,0,0),o},getEndOfDay(t=new Date){const o=new Date(t);return o.setHours(23,59,59,999),o},getYesterday(){const t=new Date;return t.setDate(t.getDate()-1),t},getDaysAgo(t){const o=new Date;return o.setDate(o.getDate()-(t-1)),o},getFirstDayOfMonth(){const t=new Date;return t.setDate(1),t},getFirstDayOfYear(){const t=new Date;return t.setMonth(0,1),t}}),refinedShortcuts(){return[{text:"本日",value:()=>[this.dateUtil.getStartOfDay(),this.dateUtil.getEndOfDay()]},{text:"昨天",value:()=>{const t=this.dateUtil.getYesterday();return[this.dateUtil.getStartOfDay(t),this.dateUtil.getEndOfDay(t)]}},{text:"最近7天",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getDaysAgo(7)),this.dateUtil.getEndOfDay()]},{text:"最近30天",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getDaysAgo(30)),this.dateUtil.getEndOfDay()]},{text:"本月",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getFirstDayOfMonth()),this.dateUtil.getEndOfDay()]},{text:"本年",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getFirstDayOfYear()),this.dateUtil.getEndOfDay()]},{text:"全部",value:()=>[null,null]}]}},methods:{syncInternalValue(){this.start!==null&&this.start!==""||this.end!==null&&this.end!==""?this.internalValue=[this.start,this.end]:this.internalValue=[null,null]},handleDateChange(t){t?(this.$emit("update:start",t[0]),this.$emit("update:end",t[1])):(this.$emit("update:start",null),this.$emit("update:end",null)),this.$emit("change",t)},handleCalendarChange(t){}},created(){this.syncInternalValue()}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(r,{modelValue:l.internalValue,"onUpdate:modelValue":o[0]||(o[0]=c=>l.internalValue=c),type:"datetimerange",shortcuts:n.refinedShortcuts,"range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"YYYY-MM-DD HH:mm:ss","default-time":l.defaultTime,onChange:n.handleDateChange,onCalendarChange:n.handleCalendarChange,clearable:"",class:"screen-date-picker"},null,8,["modelValue","shortcuts","default-time","onChange","onCalendarChange"])}]]);tt.install=function(t){t.component(tt.name,tt)},ot.install=function(t){t.component(ot.name,ot)},at.install=function(t){t.component(at.name,at)},lt.install=function(t){t.component(lt.name,lt)},nt.install=function(t){t.component(nt.name,nt)},it.install=function(t){t.component(it.name,it)},rt.install=function(t){t.component(rt.name,rt)},st.install=function(t){t.component(st.name,st)};const ct=v({name:"cvSwitchBase",props:{...k.ElSwitch.props,activeColor:{type:[String],default:""},inactiveColor:{type:[String],default:""},disabled:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.$emit("update:modelValue",this.localVal)}},data(){return{localVal:this.modelValue}},created(){this.localVal=this.modelValue},methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-switch");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{modelValue:l.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>l.localVal=c)}),null,16,["modelValue"])}]]);ct.install=function(t){t.component(ct.name,ct)};const dt=v({name:"cvCodeSms",mixins:[],components:{},props:{...k.ElInput.props,maxlength:{type:[Number,String],default:6},modelValue:{type:[Number,String],default:""},placeholder:{type:[Number,String],default:"请输入验证码"},disabled:{type:Boolean,default:!1},mobile:{type:[Number,String],default:""},mobileParam:{type:String,default:"mobile"},codeUrl:{type:String,default:""},codeSign:{type:Boolean,default:!1},apiFunc:{type:Function,default:null},waitTime:{type:[Number,String],default:60}},watch:{mobile(t){this.localMobile=t},modelValue(t){this.localVal=t}},data(){return{localVal:this.modelValue,localMobile:"",nextTime:0,diyPlaceholder:"短信验证码",btnDisabled:!1,btnText:"获取验证码",btnIntervalObj:null}},created(){this.localMobile=this.mobile},methods:{showDiyMsg(t){this.$message(t)},getSmsCode(){if(!this.localMobile)return this.showDiyMsg("手机号不正确"),void this.$emit("onGetSms",!1);if(!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.localMobile))return this.showDiyMsg("手机号格式不正确"),void this.$emit("onGetSms",!1);this.codeUrl||this.apiFunc?(this.btnDisabled=!0,this.btnIntervalObj||this.btnDisabled&&(this.btnText="请稍后...",this.apiFunc?this.apiFunc({postType:"sendSms",cto_sms_type:"alterMobile",sendCode:"发送验证码",[this.mobileParam]:this.localMobile}).then(t=>{let o=t;o.status==200?(this.showDiyMsg("发送成功!"),setTimeout(()=>{if(this.codeSign){let a=o.data&&o.data.sign||"";this.diyPlaceholder="识别码:"+a}this.smsCodeWaitTime()},500)):(this.showDiyMsg("短信获取失败,请检查网络"),this.btnDisabled=!1,this.btnText="获取验证码")}).catch(t=>{this.btnDisabled=!1,this.btnText="获取验证码"}):(this.btnDisabled=!1,this.btnText="重新获取验证码"))):this.showDiyMsg("短信接口地址不能为空")},smsCodeWaitTime(){this.nextTime=Date.parse(new Date)/1e3+parseInt(this.waitTime),this.btnIntervalObj=setInterval(()=>{let t=this.nextTime-Date.parse(new Date)/1e3;t<=0?(clearInterval(this.btnIntervalObj),this.btnText="重新获取验证码",this.btnIntervalObj=0,this.btnDisabled=!1):(this.btnDisabled=!0,this.btnText=t.toString()+"s")},100)},updateInput(t){this.$emit("update:modelValue",this.localVal)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-button"),c=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{modelValue:l.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>l.localVal=d),clearable:"",placeholder:l.diyPlaceholder,onInput:n.updateInput}),{append:e.withCtx(()=>[e.createVNode(r,{onClick:n.getSmsCode,disabled:l.btnDisabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.btnText),1)]),_:1},8,["onClick","disabled"])]),_:1},16,["modelValue","placeholder","onInput"])}]]);dt.install=function(t){t.component(dt.name,dt)};const Ci={props:{fileType:{type:[Array],default:[]},fileSize:{type:[Number],default:2},fileUnit:{type:[String],default:""},multiple:{type:[Boolean],default:!1},limit:{type:[Number],default:5}}},vi={class:"cv-upload-tip-box"},yi={key:0},ki={key:1},lo={inheritAttrs:!1,emits:["update:modelValue","update:initValue","delete","error","success"],components:{uploadTip:v(Ci,[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",vi,[o[0]||(o[0]=e.createElementVNode("span",null,"最多上传",-1)),e.createElementVNode("b",null,e.toDisplayString(a.limit),1),e.createElementVNode("span",null,e.toDisplayString(a.fileUnit),1),a.fileType.length?(e.openBlock(),e.createElementBlock("b",yi,e.toDisplayString(a.fileType.length?a.fileType.join("/"):""),1)):e.createCommentVNode("",!0),a.fileType.length?(e.openBlock(),e.createElementBlock("span",ki,"格式")):e.createCommentVNode("",!0),e.createElementVNode("span",null,"文件;且每"+e.toDisplayString(a.fileUnit)+"不超过",1),e.createElementVNode("b",null,e.toDisplayString(a.fileSize)+"MB",1)])}]])},mixins:[Pl],props:{multiple:{type:[Boolean],default:!1},limit:{type:[Number,String],default:1},drag:{type:Boolean,default:!1},httpRequest:{type:[Function],default:()=>{}},accept:String,beforeRemove:Function,upResponseFn:{type:[Function],default:null},signatureFn:{type:Function,default:null},signatureType:{type:[String],default:"aliyun_oss_type2"},signatureParam:{type:[Object],default:()=>({})}},data:()=>({cropShow:!1,upIngPercent:0,upIngLoading:!1,upIngFileInfo:{}}),computed:{fileTypeStr(){return this.fileType.join(",")},tipAttr(){return{fileType:this.fileType||[],fileSize:this.fileSize||"",multiple:this?.multiple||!1,limit:this.limit?parseInt(this.limit):5}},mergeAttrs(){let t=this._mergeAttrs("upload");return this.$props.signatureType&&(t.signatureType=this.$props.signatureType),this.$props.signatureFn&&(t.signatureFn=this.$props.signatureFn),this.$props.signatureParam&&(t.signatureParam=this.$props.signatureParam),typeof t.upResponseFn!="function"&&(t.upResponseFn=null),Object.assign({},t,this.$attrs)}},methods:{_commonBeforeUpload(t){t.type;const o=t.name||"";t.size;const a=o.split(".").pop().toLowerCase(),i=this.fileType.join("、");return this.fileType.includes(a)?!(t>this.fileSize)||(ExtendMessage.error(`文件大小不能超过 ${this.fileSize} MB`),!1):(ExtendMessage.error(`文件格式错误,请上传类型 如:${i}格式文件`),!1)},_commonRemove(){return new Promise((t,o)=>{this.$confirm("提示",{title:"确定删除??",showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t(!0)}).catch(()=>{o(!1)})})},initHttpRequest(){},initOnProgress(t){this.upIngPercent=Number(t.percentage.toFixed(0))},initOnSuccess(t,o){},initOnExceed(){this.$message.error(`最多上传${this.limit}个文件`)}}};function Xo(t){let o=[],a=Object.prototype.toString.call(t);if(a==="[object String]")o.push(sa(t));else if(a==="[object Object]")t.name&&t.url&&o.push(t);else if(a==="[object Array]")for(let i in t){let l=t[i],n=Object.prototype.toString.call(l);n==="[object String]"?o.push(sa(l)):n==="[object Object]"&&l.name&&l.url&&o.push(l)}return o}function sa(t){let o=t.lastIndexOf("/"),a=t.substring(o+1,t.length),i="";return a.lastIndexOf(".")>-1&&(i=a.slice(a.lastIndexOf(".")+1),i="image/"+i),{name:a,url:t,type:i,status:"success"}}function F(t){return Math.pow(1024,t)}function ca(t){return t?t<F(1)?t+" B":t<F(2)?(t/F(1)).toFixed(2)+" KB":t<F(3)?(t/F(2)).toFixed(2)+" MB":t<F(4)?(t/F(3)).toFixed(2)+" GB":(t/F(4)).toFixed(2)+" TB":"-"}function bi(t){if(!t)return!0;const o=t?.expiration_last;if(!o)return!0;const a=(function(l){if(/^\d{8}T\d{6}Z$/.test(l)){const n=l.replace(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/,"$1-$2-$3T$4:$5:$6Z");return new Date(n)}return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|([+-]\d{2}:\d{2}))?$/.test(l)?new Date(l):/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(l)?new Date(l.replace(" ","T")):new Date(l)})(o),i=new Date;return!!isNaN(a.getTime())||a.getTime()-i.getTime()<=6e4}async function da(t,o){if(!t||typeof t!="function")return!1;let a=null;if(bi(a)){let i=await t({...o});if(!i||!i.data||i.status!=200)throw k.ElMessage.error("获取STS令牌失败"),new Error(`获取STS令牌失败 ${i?.message}`);a=i.data||{}}return{...a,pass:!!a}}async function pa(t,o,a,i){t=t||"aliyun_oss_type2",i=i||{};const l=await da(o,{upload_type:t,...a});if(!l.pass)return k.ElMessage.error("获取oss上传凭证异常");if(t=="oss_upload1"){const n={bucket:l.bucket,region:l.endpoint.split(".")[0],accessKeyId:l.accessKeyId,accessKeySecret:l.accessKeySecret,stsToken:l.securityToken,expiration:l.expiration,...i,refreshSTSToken:async()=>{const r=await da(o);return{accessKeyId:r.accessKeyId,accessKeySecret:r.accessKeySecret,stsToken:r.securityToken}},refreshSTSTokenInterval:new Date(l.expiration)-new Date-6e4};return new OSS(n)}if(t=="aliyun_oss_type2")return l;throw new Error("上传类型错误")}async function Al(t,o,a){let i=new FormData;i.append("success_action_status",o.success_action_status||"200"),i.append("policy",o.policy),i.append("signature",o.signature),i.append("x-oss-signature",o.signature),i.append("x-oss-signature-version","OSS4-HMAC-SHA256"),i.append("x-oss-credential",o.x_oss_credential),i.append("x-oss-date",o.x_oss_date),i.append("x-oss-security-token",o.security_token);let l=o.key;if(o.key||(l=o.dir+"/"+t.name),i.append("key",l),o.callback&&i.append("callback",o.callback),o.callback_var&&to(o.callback_var))for(const n in o.callback_var)o.callback_var.hasOwnProperty(n)&&i.append(n,o.callback_var[n]);return i.append("file",t),fetch(o.host,{method:"POST",body:i,headers:{}}).then(n=>{if(n.ok)return n.json()}).then(n=>{if(n&&n.success)return n.data}).catch(n=>{})}async function Ko(t,o,a,i){if(!a||typeof a!="function")return k.ElMessage.error("签名方法错误"),Promise.reject();try{let l=(function(){const d=new Date;return[d.getFullYear(),String(d.getMonth()+1).padStart(2,"0"),String(d.getDate()).padStart(2,"0"),String(d.getHours()).padStart(2,"0"),String(d.getMinutes()).padStart(2,"0"),String(d.getSeconds()).padStart(2,"0")].join("")+Math.random().toString(36).substring(2,10)})(),n=(function(d){if(!d)return"jpg";const p=d.toLowerCase().trim();return Ml.mimeToExtension[p]||"jpg"})(t.type),r=`${l}.${n}`;const c=await a({upload_type:o,...i,save_extension:n}).then(d=>d.data||{}).catch(d=>(k.ElMessage.error("签名失败"),Promise.reject()));if(!c)return Promise.reject();if(c.name&&(r=`${c.name}.${n}`),t instanceof Blob&&(t=new File([t],r,{type:t.type,lastModified:Date.now()})),t)return await Al(t,c)}catch{return Promise.reject()}}const jl={};jl.getData=t=>new Promise((o,a)=>{let i={};(function(l){let n=null;return new Promise((r,c)=>{if(l.src)if(/^data\:/i.test(l.src))n=(function(h,u){u=u||h.match(/^data\:([^\;]+)\;base64,/im)[1]||"",h=h.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var m=atob(h),f=m.length%2==0?m.length:m.length+1,C=new ArrayBuffer(f),g=new Uint16Array(C),y=0;y<f;y++)g[y]=m.charCodeAt(y);return C})(l.src),r(n);else if(/^blob\:/i.test(l.src)){var d=new FileReader;d.onload=function(h){n=h.target.result,r(n)},(function(h,u){var m=new XMLHttpRequest;m.open("GET",h,!0),m.responseType="blob",m.onload=function(f){(this.status==200||this.status===0)&&u(this.response)},m.send()})(l.src,function(h){d.readAsArrayBuffer(h)})}else{var p=new XMLHttpRequest;p.onload=function(){if(this.status!=200&&this.status!==0)throw"Could not load image";n=p.response,r(n),p=null},p.open("GET",l.src,!0),p.responseType="arraybuffer",p.send(null)}else c("img error")})})(t).then(l=>{i.arrayBuffer=l;try{i.orientation=(function(n){var r,c,d,p,h,u,m,f,C,g,y=new DataView(n),b=y.byteLength;if(y.getUint8(0)===255&&y.getUint8(1)===216)for(C=2;C<b;){if(y.getUint8(C)===255&&y.getUint8(C+1)===225){m=C;break}C++}if(m&&(c=m+4,d=m+10,(function(w,V,N){var E,L="";for(E=V,N+=V;E<N;E++)L+=String.fromCharCode(w.getUint8(E));return L})(y,c,4)==="Exif"&&(u=y.getUint16(d),((h=u===18761)||u===19789)&&y.getUint16(d+2,h)===42&&(p=y.getUint32(d+4,h),p>=8&&(f=d+p)))),f){for(b=y.getUint16(f,h),g=0;g<b;g++)if(C=f+12*g+2,y.getUint16(C,h)===274){C+=8,r=y.getUint16(C,h);break}}return r})(l)}catch{i.orientation=-1}o(i)}).catch(l=>{a(l)})});const wi=(t,o)=>{const a=t.__vccOpts||t;for(const[i,l]of o)a[i]=l;return a},Vi=e.defineComponent({data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0,imgIsQqualCrop:!1}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:()=>[1,1]},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:()=>10,validator:function(t){return Array.isArray(t)?Number(t[0])>=0&&Number(t[1])>=0:Number(t)>=0}},fillColor:{type:String,default:""}},computed:{cropInfo(){let t={};if(t.top=this.cropOffsertY>21?"-21px":"0px",t.width=this.cropW>0?this.cropW:0,t.height=this.cropH>0?this.cropH:0,this.infoTrue){let o=1;this.high&&!this.full&&(o=window.devicePixelRatio),this.enlarge!==1&!this.full&&(o=Math.abs(Number(this.enlarge))),t.width=t.width*o,t.height=t.height*o,this.full&&(t.width=t.width/this.scale,t.height=t.height/this.scale)}return t.width=t.width.toFixed(0),t.height=t.height.toFixed(0),t},isIE:()=>!!window.ActiveXObject||"ActiveXObject"in window,passive(){return this.isIE?null:{passive:!1}},isRotateRightOrLeft(){return[1,-1,3,-3].includes(this.rotate)}},watch:{img(){this.checkedImg()},imgs(t){t!==""&&this.reload()},cropW(){this.showPreview()},cropH(){this.showPreview()},cropOffsertX(){this.showPreview()},cropOffsertY(){this.showPreview()},scale(t,o){this.showPreview()},x(){this.showPreview()},y(){this.showPreview()},autoCrop(t){t&&this.goAutoCrop()},autoCropWidth(){this.autoCrop&&this.goAutoCrop()},autoCropHeight(){this.autoCrop&&this.goAutoCrop()},mode(){this.checkedImg()},rotate(){this.showPreview(),(this.autoCrop||this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion(t){var o=navigator.userAgent.split(" "),a="";let i=0;const l=new RegExp(t,"i");for(var n=0;n<o.length;n++)l.test(o[n])&&(a=o[n]);return i=a?a.split("/")[1].split("."):["0","0","0"],i},checkOrientationImage(t,o,a,i){if(this.getVersion("chrome")[0]>=81)o=-1;else if(this.getVersion("safari")[0]>=605){const r=this.getVersion("version");r[0]>13&&r[1]>1&&(o=-1)}else{const r=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(r){let c=r[1];c=c.split("_"),(c[0]>13||c[0]>=13&&c[1]>=4)&&(o=-1)}}let l=document.createElement("canvas"),n=l.getContext("2d");switch(n.save(),o){case 2:l.width=a,l.height=i,n.translate(a,0),n.scale(-1,1);break;case 3:l.width=a,l.height=i,n.translate(a/2,i/2),n.rotate(180*Math.PI/180),n.translate(-a/2,-i/2);break;case 4:l.width=a,l.height=i,n.translate(0,i),n.scale(1,-1);break;case 5:l.height=a,l.width=i,n.rotate(.5*Math.PI),n.scale(1,-1);break;case 6:l.width=i,l.height=a,n.translate(i/2,a/2),n.rotate(90*Math.PI/180),n.translate(-a/2,-i/2);break;case 7:l.height=a,l.width=i,n.rotate(.5*Math.PI),n.translate(a,-i),n.scale(-1,1);break;case 8:l.height=a,l.width=i,n.translate(i/2,a/2),n.rotate(-90*Math.PI/180),n.translate(-a/2,-i/2);break;default:l.width=a,l.height=i}n.drawImage(t,0,0,a,i),n.restore(),l.toBlob(r=>{let c=URL.createObjectURL(r);URL.revokeObjectURL(this.imgs),this.imgs=c},"image/"+this.outputType,1)},checkedImg(){if(this.img===null||this.img==="")return this.imgs="",void this.clearCrop();this.loading=!0,this.scale=1,this.rotate=0,this.imgIsQqualCrop=!1,this.clearCrop();let t=new Image;if(t.onload=()=>{if(this.img==="")return this.$emit("img-load",new Error("图片不能为空")),!1;let a=t.width,i=t.height;jl.getData(t).then(l=>{this.orientation=l.orientation||1;let n=Number(this.maxImgSize);!this.orientation&&a<n&i<n?this.imgs=this.img:(a>n&&(i=i/a*n,a=n),i>n&&(a=a/i*n,i=n),this.checkOrientationImage(t,this.orientation,a,i))}).catch(l=>{this.$emit("img-load","error"),this.$emit("img-load-error",l)})},t.onerror=a=>{this.$emit("img-load","error"),this.$emit("img-load-error",a)},this.img.substr(0,4)!=="data"&&(t.crossOrigin=""),this.isIE){var o=new XMLHttpRequest;o.onload=function(){var a=URL.createObjectURL(this.response);t.src=a},o.open("GET",this.img,!0),o.responseType="blob",o.send()}else t.src=this.img},startMove(t){if(t.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in t?t.clientX:t.touches[0].clientX)-this.x,this.moveY=("clientY"in t?t.clientY:t.touches[0].clientY)-this.y,t.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),t.touches.length==2&&(this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=t.offsetX?t.offsetX:t.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=t.offsetY?t.offsetY:t.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale(t){t.preventDefault();let o=this.scale;var a=this.touches[0].clientX,i=this.touches[0].clientY,l=t.touches[0].clientX,n=t.touches[0].clientY,r=this.touches[1].clientX,c=this.touches[1].clientY,d=t.touches[1].clientX,p=t.touches[1].clientY,h=Math.sqrt(Math.pow(a-r,2)+Math.pow(i-c,2)),u=Math.sqrt(Math.pow(l-d,2)+Math.pow(n-p,2))-h,m=1,f=(m=(m=m/this.trueWidth>m/this.trueHeight?m/this.trueHeight:m/this.trueWidth)>.1?.1:m)*u;if(!this.touchNow){if(this.touchNow=!0,u>0?o+=Math.abs(f):u<0&&o>Math.abs(f)&&(o-=Math.abs(f)),this.touches=t.touches,setTimeout(()=>{this.touchNow=!1},8),!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o}},cancelTouchScale(t){window.removeEventListener("touchmove",this.touchScale)},moveImg(t){if(t.preventDefault(),t.touches&&t.touches.length===2)return this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;let o,a,i="clientX"in t?t.clientX:t.touches[0].clientX,l="clientY"in t?t.clientY:t.touches[0].clientY;o=i-this.moveX,a=l-this.moveY,this.$nextTick(()=>{if(this.centerBox){let n,r,c,d,p=this.getImgAxis(o,a,this.scale),h=this.getCropAxis(),u=this.trueHeight*this.scale,m=this.trueWidth*this.scale;switch(this.rotate){case 1:case-1:case 3:case-3:n=this.cropOffsertX-this.trueWidth*(1-this.scale)/2+(u-m)/2,r=this.cropOffsertY-this.trueHeight*(1-this.scale)/2+(m-u)/2,c=n-u+this.cropW,d=r-m+this.cropH;break;default:n=this.cropOffsertX-this.trueWidth*(1-this.scale)/2,r=this.cropOffsertY-this.trueHeight*(1-this.scale)/2,c=n-m+this.cropW,d=r-u+this.cropH}p.x1>=h.x1&&(o=n),p.y1>=h.y1&&(a=r),p.x2<=h.x2&&(o=c),p.y2<=h.y2&&(a=d)}this.x=o,this.y=a,this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})})},leaveImg(t){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize(t){t.preventDefault();let o=this.scale;var a=t.deltaY||t.wheelDelta;a=navigator.userAgent.indexOf("Firefox")>0?30*a:a,this.isIE&&(a=-a);var i=this.coe,l=(i=i/this.trueWidth>i/this.trueHeight?i/this.trueHeight:i/this.trueWidth)*a;l<0?o+=Math.abs(l):o>Math.abs(l)&&(o-=Math.abs(l));let n=l<0?"add":"reduce";if(n!==this.coeStatus&&(this.coeStatus=n,this.coe=.2),this.scaling||(this.scalingSet=setTimeout(()=>{this.scaling=!1,this.coe=this.coe+=.01},50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o},changeScale(t){let o=this.scale;t=t||1;var a=20;if((t*=a=a/this.trueWidth>a/this.trueHeight?a/this.trueHeight:a/this.trueWidth)>0?o+=Math.abs(t):o>Math.abs(t)&&(o-=Math.abs(t)),!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o},createCrop(t){t.preventDefault();var o="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,a="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;this.$nextTick(()=>{var i=o-this.cropX,l=a-this.cropY;if(i>0?(this.cropW=i+this.cropChangeX>this.w?this.w-this.cropChangeX:i,this.cropOffsertX=this.cropChangeX):(this.cropW=this.w-this.cropChangeX+Math.abs(i)>this.w?this.cropChangeX:Math.abs(i),this.cropOffsertX=this.cropChangeX+i>0?this.cropChangeX+i:0),this.fixed){var n=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];n+this.cropOffsertY>this.h?(this.cropH=this.h-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],this.cropOffsertX=i>0?this.cropChangeX:this.cropChangeX-this.cropW):this.cropH=n,this.cropOffsertY=this.cropOffsertY}else l>0?(this.cropH=l+this.cropChangeY>this.h?this.h-this.cropChangeY:l,this.cropOffsertY=this.cropChangeY):(this.cropH=this.h-this.cropChangeY+Math.abs(l)>this.h?this.cropChangeY:Math.abs(l),this.cropOffsertY=this.cropChangeY+l>0?this.cropChangeY+l:0)})},changeCropSize(t,o,a,i,l){t.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=o,this.canChangeY=a,this.changeCropTypeX=i,this.changeCropTypeY=l,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow(t){t.preventDefault();var o="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,a="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;let i=this.w,l=this.h,n=0,r=0;if(this.centerBox){let p=this.getImgAxis(),h=p.x2,u=p.y2;n=p.x1>0?p.x1:0,r=p.y1>0?p.y1:0,i>h&&(i=h),l>u&&(l=u)}const[c,d]=this.checkCropLimitSize();this.$nextTick(()=>{var p=o-this.cropX,h=a-this.cropY;if(this.canChangeX&&(this.changeCropTypeX===1?this.cropOldW-p<c?(this.cropW=c,this.cropOffsertX=this.cropOldW+this.cropChangeX-n-c):this.cropOldW-p>0?(this.cropW=i-this.cropChangeX-p<=i-n?this.cropOldW-p:this.cropOldW+this.cropChangeX-n,this.cropOffsertX=i-this.cropChangeX-p<=i-n?this.cropChangeX+p:n):(this.cropW=Math.abs(p)+this.cropChangeX<=i?Math.abs(p)-this.cropOldW:i-this.cropOldW-this.cropChangeX,this.cropOffsertX=this.cropChangeX+this.cropOldW):this.changeCropTypeX===2&&(this.cropOldW+p<c?this.cropW=c:this.cropOldW+p>0?(this.cropW=this.cropOldW+p+this.cropOffsertX<=i?this.cropOldW+p:i-this.cropOffsertX,this.cropOffsertX=this.cropChangeX):(this.cropW=i-this.cropChangeX+Math.abs(p+this.cropOldW)<=i-n?Math.abs(p+this.cropOldW):this.cropChangeX-n,this.cropOffsertX=i-this.cropChangeX+Math.abs(p+this.cropOldW)<=i-n?this.cropChangeX-Math.abs(p+this.cropOldW):n))),this.canChangeY&&(this.changeCropTypeY===1?this.cropOldH-h<d?(this.cropH=d,this.cropOffsertY=this.cropOldH+this.cropChangeY-r-d):this.cropOldH-h>0?(this.cropH=l-this.cropChangeY-h<=l-r?this.cropOldH-h:this.cropOldH+this.cropChangeY-r,this.cropOffsertY=l-this.cropChangeY-h<=l-r?this.cropChangeY+h:r):(this.cropH=Math.abs(h)+this.cropChangeY<=l?Math.abs(h)-this.cropOldH:l-this.cropOldH-this.cropChangeY,this.cropOffsertY=this.cropChangeY+this.cropOldH):this.changeCropTypeY===2&&(this.cropOldH+h<d?this.cropH=d:this.cropOldH+h>0?(this.cropH=this.cropOldH+h+this.cropOffsertY<=l?this.cropOldH+h:l-this.cropOffsertY,this.cropOffsertY=this.cropChangeY):(this.cropH=l-this.cropChangeY+Math.abs(h+this.cropOldH)<=l-r?Math.abs(h+this.cropOldH):this.cropChangeY-r,this.cropOffsertY=l-this.cropChangeY+Math.abs(h+this.cropOldH)<=l-r?this.cropChangeY-Math.abs(h+this.cropOldH):r))),this.canChangeX&&this.fixed){var u=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];u<d?(this.cropH=d,this.cropW=this.fixedNumber[0]*d/this.fixedNumber[1],this.changeCropTypeX===1&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):u+this.cropOffsertY>l?(this.cropH=l-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],this.changeCropTypeX===1&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):this.cropH=u}if(this.canChangeY&&this.fixed){var m=this.cropH/this.fixedNumber[1]*this.fixedNumber[0];m<c?(this.cropW=c,this.cropH=this.fixedNumber[1]*c/this.fixedNumber[0],this.cropOffsertY=this.cropOldH+this.cropChangeY-this.cropH):m+this.cropOffsertX>i?(this.cropW=i-this.cropOffsertX,this.cropH=this.cropW/this.fixedNumber[0]*this.fixedNumber[1]):this.cropW=m}})},checkCropLimitSize(){let{cropW:t,cropH:o,limitMinSize:a}=this,i=new Array;return i=Array.isArray(a)?a:[a,a],t=parseFloat(i[0]),o=parseFloat(i[1]),[t,o]},changeCropEnd(t){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},calculateSize(t,o,a,i,l,n){const r=t/o;let c=l,d=n;return c<a&&(c=a,d=Math.ceil(c/r)),d<i&&(d=i,c=Math.ceil(d*r),c<a&&(c=a,d=Math.ceil(c/r))),c<l&&(c=l,d=Math.ceil(c/r)),d<n&&(d=n,c=Math.ceil(d*r)),{width:c,height:d}},endCrop(){this.cropW===0&&this.cropH===0&&(this.cropping=!1);let[t,o]=this.checkCropLimitSize();const{width:a,height:i}=this.fixed?this.calculateSize(this.fixedNumber[0],this.fixedNumber[1],t,o,this.cropW,this.cropH):{width:t,height:o};a>this.cropW&&(this.cropW=a,this.cropOffsertX+a>this.w&&(this.cropOffsertX=this.w-a)),i>this.cropH&&(this.cropH=i,this.cropOffsertY+i>this.h&&(this.cropOffsertY=this.h-i)),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop(){this.crop=!0},stopCrop(){this.crop=!1},clearCrop(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove(t){if(t.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(t),!1;if(t.touches&&t.touches.length===2)return this.crop=!1,this.startMove(t),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);let o,a,i="clientX"in t?t.clientX:t.touches[0].clientX,l="clientY"in t?t.clientY:t.touches[0].clientY;o=i-this.cropOffsertX,a=l-this.cropOffsertY,this.cropX=o,this.cropY=a,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop(t,o){let a=0,i=0;t&&(t.preventDefault(),a="clientX"in t?t.clientX:t.touches[0].clientX,i="clientY"in t?t.clientY:t.touches[0].clientY),this.$nextTick(()=>{let l,n,r=a-this.cropX,c=i-this.cropY;if(o&&(r=this.cropOffsertX,c=this.cropOffsertY),l=r<=0?0:r+this.cropW>this.w?this.w-this.cropW:r,n=c<=0?0:c+this.cropH>this.h?this.h-this.cropH:c,this.centerBox){let d=this.getImgAxis();l<=d.x1&&(l=d.x1),l+this.cropW>d.x2&&(l=d.x2-this.cropW),n<=d.y1&&(n=d.y1),n+this.cropH>d.y2&&(n=d.y2-this.cropH)}this.cropOffsertX=l,this.cropOffsertY=n,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})})},getImgAxis(t,o,a){t=t||this.x,o=o||this.y,a=a||this.scale;let i={x1:0,x2:0,y1:0,y2:0},l=this.trueWidth*a,n=this.trueHeight*a;switch(this.rotate){case 0:i.x1=t+this.trueWidth*(1-a)/2,i.x2=i.x1+this.trueWidth*a,i.y1=o+this.trueHeight*(1-a)/2,i.y2=i.y1+this.trueHeight*a;break;case 1:case-1:case 3:case-3:i.x1=t+this.trueWidth*(1-a)/2+(l-n)/2,i.x2=i.x1+this.trueHeight*a,i.y1=o+this.trueHeight*(1-a)/2+(n-l)/2,i.y2=i.y1+this.trueWidth*a;break;default:i.x1=t+this.trueWidth*(1-a)/2,i.x2=i.x1+this.trueWidth*a,i.y1=o+this.trueHeight*(1-a)/2,i.y2=i.y1+this.trueHeight*a}return i},getCropAxis(){let t={x1:0,x2:0,y1:0,y2:0};return t.x1=this.cropOffsertX,t.x2=t.x1+this.cropW,t.y1=this.cropOffsertY,t.y2=t.y1+this.cropH,t},leaveCrop(t){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked(t){let o=document.createElement("canvas"),a=o.getContext("2d"),i=new Image,l=this.rotate,n=this.trueWidth,r=this.trueHeight,c=this.cropOffsertX,d=this.cropOffsertY;i.onload=()=>{if(this.cropW!==0){let u=1;this.high&!this.full&&(u=window.devicePixelRatio),this.enlarge!==1&!this.full&&(u=Math.abs(Number(this.enlarge)));let m=this.cropW*u,f=this.cropH*u,C=n*this.scale*u,g=r*this.scale*u,y=(this.x-c+this.trueWidth*(1-this.scale)/2)*u,b=(this.y-d+this.trueHeight*(1-this.scale)/2)*u;switch(h(m,f),a.save(),l){case 0:this.full?(h(m/this.scale,f/this.scale),a.drawImage(i,y/this.scale,b/this.scale,C/this.scale,g/this.scale)):a.drawImage(i,y,b,C,g);break;case 1:case-3:this.full?(h(m/this.scale,f/this.scale),y=y/this.scale+(C/this.scale-g/this.scale)/2,b=b/this.scale+(g/this.scale-C/this.scale)/2,a.rotate(90*l*Math.PI/180),a.drawImage(i,b,-y-g/this.scale,C/this.scale,g/this.scale)):(y+=(C-g)/2,b+=(g-C)/2,a.rotate(90*l*Math.PI/180),a.drawImage(i,b,-y-g,C,g));break;case 2:case-2:this.full?(h(m/this.scale,f/this.scale),a.rotate(90*l*Math.PI/180),y/=this.scale,b/=this.scale,a.drawImage(i,-y-C/this.scale,-b-g/this.scale,C/this.scale,g/this.scale)):(a.rotate(90*l*Math.PI/180),a.drawImage(i,-y-C,-b-g,C,g));break;case 3:case-1:this.full?(h(m/this.scale,f/this.scale),y=y/this.scale+(C/this.scale-g/this.scale)/2,b=b/this.scale+(g/this.scale-C/this.scale)/2,a.rotate(90*l*Math.PI/180),a.drawImage(i,-b-C/this.scale,y,C/this.scale,g/this.scale)):(y+=(C-g)/2,b+=(g-C)/2,a.rotate(90*l*Math.PI/180),a.drawImage(i,-b-C,y,C,g));break;default:this.full?(h(m/this.scale,f/this.scale),a.drawImage(i,y/this.scale,b/this.scale,C/this.scale,g/this.scale)):a.drawImage(i,y,b,C,g)}a.restore()}else{let u=n*this.scale,m=r*this.scale;switch(a.save(),l){case 0:h(u,m),a.drawImage(i,0,0,u,m);break;case 1:case-3:h(m,u),a.rotate(90*l*Math.PI/180),a.drawImage(i,0,-m,u,m);break;case 2:case-2:h(u,m),a.rotate(90*l*Math.PI/180),a.drawImage(i,-u,-m,u,m);break;case 3:case-1:h(m,u),a.rotate(90*l*Math.PI/180),a.drawImage(i,-u,0,u,m);break;default:h(u,m),a.drawImage(i,0,0,u,m)}a.restore()}t(o)},this.img.substr(0,4)!=="data"&&(i.crossOrigin="Anonymous"),i.src=this.imgs;const p=this.fillColor;function h(u,m){o.width=Math.round(u),o.height=Math.round(m),p&&(a.fillStyle=p,a.fillRect(0,0,o.width,o.height))}},getCropData(t){this.getCropChecked(o=>{t(o.toDataURL("image/"+this.outputType,this.outputSize))})},getCropBlob(t){this.getCropChecked(o=>{o.toBlob(a=>t(a),"image/"+this.outputType,this.outputSize)})},showPreview(){if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout(()=>{this.isCanShow=!0},16);let t=this.cropW,o=this.cropH,a=this.scale;var i={};i.div={width:`${t}px`,height:`${o}px`};let l=(this.x-this.cropOffsertX)/a,n=(this.y-this.cropOffsertY)/a;i.w=t,i.h=o,i.url=this.imgs,i.img={width:`${this.trueWidth}px`,height:`${this.trueHeight}px`,transform:`scale(${a})translate3d(${l}px, ${n}px, 0px)rotateZ(${90*this.rotate}deg)`},i.html=`
|
|
1
|
+
"use strict";var cn=Object.create;var na=Object.defineProperty;var dn=Object.getOwnPropertyDescriptor;var pn=Object.getOwnPropertyNames;var hn=Object.getPrototypeOf,mn=Object.prototype.hasOwnProperty;var un=(t,o,a,i)=>{if(o&&typeof o=="object"||typeof o=="function")for(let l of pn(o))!mn.call(t,l)&&l!==a&&na(t,l,{get:()=>o[l],enumerable:!(i=dn(o,l))||i.enumerable});return t};var no=(t,o,a)=>(a=t!=null?cn(hn(t)):{},un(o||!t||!t.__esModule?na(a,"default",{value:t,enumerable:!0}):a,t));Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const k=require("element-plus"),e=require("vue"),gn=require("codemirror"),T=require("@codemirror/state"),B=require("@codemirror/view"),fn=require("@codemirror/commands"),x=require("@codemirror/language"),s=require("@lezer/highlight"),ia=require("@codemirror/lang-javascript"),Cn=require("@codemirror/lang-html"),vn=require("@codemirror/lang-json"),yn=require("@codemirror/lang-markdown"),kn=require("@codemirror/lang-vue"),bn=require("@codemirror/lang-php"),wn=require("@codemirror/lang-java"),ra=require("@codemirror/lang-sql"),Vn=require("@codemirror/lang-python"),xn=require("@codemirror/lang-xml"),Sn=require("@codemirror/lang-go"),Nn=require("@codemirror/lang-css"),Bn=require("html-to-md"),v=(t,o)=>{const a=t.__vccOpts||t;for(const[i,l]of o)a[i]=l;return a},ve=v({name:"cvBadge",extends:{ExtendBadge:k.ElBadge},props:{...k.ElBadge.props},created(){},computed:{isShow(){return!this.value||!(this.value>0)}},data:()=>({})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-badge");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{hidden:n.isShow}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["hidden"])}]]);ve.install=function(t){t.component(ve.name,ve)};const ye=v({name:"cvRow",props:{gutter:{type:[Number,String],default:0},type:{type:[String],default:""},justify:{type:[String],default:"start"},align:{type:[String],default:"top"},tag:{type:[String],default:"div"}},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-row");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-row"},{type:a.type,justify:a.justify,align:a.align,tag:a.tag},{gutter:parseInt(a.gutter)}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["gutter"])}]]),ke=v({name:"cvCol",props:{span:{type:[Number,String],default:24},offset:{type:[Number,String],default:0}},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-col");return e.openBlock(),e.createBlock(r,{class:"cv-col",span:parseInt(a.span),offset:parseInt(a.offset)},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},8,["span","offset"])}]]);ye.install=function(t){t.component(ye.name,ye)},ke.install=function(t){t.component(ke.name,ke)};const be=v({name:"cvBtnBase",emits:["click"],props:{...k.ElButton.props,autoLoading:{type:Boolean,default:!1},svg:{type:[String],default:""}},data:()=>({loadingStatus:!1}),computed:{filteredProps(){const{autoLoading:t,...o}=this.$props;return o},hasDefaultContent(){const t=this.$slots.default?.();return t&&t.length>0}},methods:{handleClick(t){this.autoLoading&&(this.loadingStatus=!0);try{this.$emit("click",()=>{this.loadingStatus=!1})}catch(o){throw this.loadingStatus=!1,o}}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("cv-mask-svg"),c=e.resolveComponent("el-button");return t.$slots.default||n.hasDefaultContent?(e.openBlock(),e.createBlock(c,e.mergeProps({key:0,class:"cv-btn"},n.filteredProps,{loading:l.loadingStatus,onClick:n.handleClick}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:2},[a.svg?{name:"icon",fn:e.withCtx(()=>[e.createVNode(r,{name:a.svg,size:"14",color:"currentColor"},null,8,["name"])]),key:"0"}:void 0]),1040,["loading","onClick"])):(e.openBlock(),e.createBlock(c,e.mergeProps({key:1,class:"cv-btn"},n.filteredProps,{loading:l.loadingStatus,onClick:n.handleClick}),e.createSlots({_:2},[a.svg?{name:"icon",fn:e.withCtx(()=>[e.createVNode(r,{name:a.svg,size:"14",color:"currentColor"},null,8,["name"])]),key:"0"}:void 0]),1040,["loading","onClick"]))}]]),we=v({name:"cvBtnText",emits:["click"],props:{...k.ElButton.props,autoLoading:{type:Boolean,default:!1}},data:()=>({loadingStatus:!1}),methods:{handleClick(){this.autoLoading&&(this.loadingStatus=!0),this.$emit("click",()=>{this.loadingStatus=!1})}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-button");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-btn"},t.$props,{link:"",loading:l.loadingStatus,onClick:n.handleClick}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["loading","onClick"])}]]);be.install=function(t){t.component(be.name,be)},we.install=function(t){t.component(we.name,we)};const Ve=v({name:"cvAutocompleteBase",props:{...k.ElAutocomplete.props},data:()=>({localVal:"",loadingStatus:!1}),created(){},methods:{async querySearchAsync(t,o){}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-autocomplete");return e.openBlock(),e.createBlock(r,e.mergeProps({modelValue:l.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>l.localVal=c)},t.$props,{"fetch-suggestions":n.querySearchAsync}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16,["modelValue","fetch-suggestions"])}]]),oo={props:{compConfig:{},dataParse:{type:[Function],default:()=>null}},data:()=>({searchData:{},loadDataLoading:!1,loadDataList:[],loadDataTotal:0,loadPageCurr:1,loadPageLimit:10,loadConfigSetting:{},loadConfigDef:{pageCurr:1,pageLimit:10,isSkip:!1,url:null,apiFunc:null,mockData:null,where:{},response:{statusName:"status",statusCode:200,msgName:"msg",countName:"total",dataName:"data"},request:{pageName:"page",limitName:"pagesize"}}}),methods:{loadEnding(){this.loadDataLoading=!1,this.$nextTick(()=>{this.loadDataLoading=!1})},loadGetData(){if(this.loadDataLoading=!0,this.loadConfigSetting.apiFunc&&typeof this.loadConfigSetting.apiFunc=="function"){const t=this.loadConfigSetting;let o={...t.where};o[t.request.pageName]=this.loadPageCurr,o[t.request.limitName]=this.loadPageLimit,o=Object.assign(o,this.searchData),this.loadConfigSetting.apiFunc(o).then(a=>{this.loadPageCurr=o[t.request.pageName],this.loadEnding();let i=this.sortOutData(a);if(i.status!=t.response.statusCode)return void ExtendMessage({message:i.msg,type:"error",duration:1300});if(i.data.length===0)return void ExtendMessage({message:"没有更多数据了",type:"warning",duration:1300});let l=i[t.response.dataName]||[];this.dataParse&&typeof this.dataParse=="function"&&(l=this.dataParse.call(null,l)),this.loadDataList.push(...l),this.loadDataTotal=i[t.response.countName]||0}).catch(a=>{this.loadEnding()})}else this.loadDataList.length>0&&(this.loadDataTotal=this.loadDataList.length),this.loadEnding()},sortOutData(t){let o=this.loadConfigSetting.response,a={},i=[],l=[];a.status=t[o.statusName],a.msg=t[o.msgName],a.total=t[o.countName],i=t[o.dataName];for(let n in i)l[n]=i[n];return a.data=l,a}}},xe=v({name:"cvAutocompleteLoad",mixins:[oo],emits:["update:modelValue","input"],props:{...k.ElAutocomplete.props,modelValue:{type:[String,Object,Number],default:()=>({})},placeholder:{type:[String],default:"请输入内容"},popperClass:{type:[String],default:"cv-autocomplete-load"},clearable:{type:[Boolean],default:!0},triggerOnFocus:!1,debounce:500,refID:{type:[String],required:!1,default:()=>"cvAutocompleteLoad-"+ +new Date+(Math.random()/1e4).toFixed(0)},compConfig:{type:[Object],default:()=>({})}},data:()=>({localVal:"",searchList:[],compConfigDef:{searchField:["value"]},timeout:null,loadingMore:!1}),directives:{loadmore:{mounted(t,o){const a=((l,n)=>{let r=null;return function(...c){r&&clearTimeout(r),r=setTimeout(()=>{l.apply(this,c)},n)}})(l=>{const{scrollTop:n,scrollHeight:r,clientHeight:c}=l.target;r-(n+c)<10&&!o.instance.loading&&o.value()},200),i=new MutationObserver(()=>{const l=t.querySelector(".el-autocomplete-suggestion__wrap");l&&!t.__scrollHandler__&&(l.addEventListener("scroll",a),t.__scrollHandler__=a,i.disconnect())});i.observe(t,{childList:!0,subtree:!0})},beforeUnmount(t){if(t.__scrollHandler__){const o=t.querySelector(".el-autocomplete-suggestion__wrap");o&&o.removeEventListener("scroll",t.__scrollHandler__),delete t.__scrollHandler__}}}},created(){this.initConfAll(),this.getData()},methods:{initConfAll(){let t={};Object.assign(t,this.loadConfigDef,this.compConfigDef,this.compConfig),this.loadPageCurr=t.pageCurr||1,this.loadPageLimit=t.pageLimit||10,Object.assign(t.where,this.searchData),this.loadConfigSetting=t},getMoreData(){if(!(this.loadingMore||this.loadDataList.length>=this.loadDataTotal))try{this.loadingMore=!0,this.loadPageCurr++,this.loadGetData()}finally{this.loadingMore=!1}},getData(){this.loadPageCurr=1,this.loadDataList=[],this.loadGetData()},async querySearchAsync(t,o){this.loadPageCurr=1,this.loadDataLoading=!0;var a=this.loadDataList||[];let i=[];const l=this.loadConfigSetting.searchField||["value"];if(i=(t=t.toLowerCase())?a.filter(this.createFilter(t,l)):a,i.length>0)o(i.map(n=>({...n,is_last_tip:!1}))),this.lookFlag=!0;else try{this.loadDataList.length<this.loadDataTotal&&this.loadPageCurr++,this.searchData.keyword=t,this.loadDataList=[],await this.loadGetData();const n=this.loadDataList.map(r=>({...r,is_last_tip:!1}));n.push({is_last_tip:!0}),o(n)}catch{}finally{this.lookFlag=!0}},createFilter:(t,o)=>a=>o.some(i=>(a[i]+"").toLowerCase().indexOf(t)!==-1),handleChange(t){},handleSelect(t){this.$emit("update:modelValue",t)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("cv-icons"),c=e.resolveComponent("el-autocomplete"),d=e.resolveDirective("loadmore");return e.withDirectives((e.openBlock(),e.createElementBlock("div",null,[e.createVNode(c,e.mergeProps(t.$props,{modelValue:l.localVal,"onUpdate:modelValue":o[1]||(o[1]=p=>l.localVal=p),"fetch-suggestions":n.querySearchAsync,onChange:n.handleChange,onSelect:n.handleSelect,teleported:!1,"popper-append-to-body":!1}),{load:e.withCtx(()=>[...o[2]||(o[2]=[])]),default:e.withCtx(({item:p})=>[p.is_last_tip?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"default",e.normalizeProps(e.mergeProps({key:0},{item:p}))),p.is_last_tip?(e.openBlock(),e.createElementBlock("div",{key:1,class:"cv-autocomolete-nodata",onClick:o[0]||(o[0]=e.withModifiers((...h)=>n.getData&&n.getData(...h),["stop"])),disabled:""},[o[3]||(o[3]=e.createTextVNode(" 没有更多数据了 ",-1)),e.createVNode(r,{type:"ElIconRefreshLeft"}),o[4]||(o[4]=e.createTextVNode(" 刷新按钮 ",-1))])):e.createCommentVNode("",!0)]),_:3},16,["modelValue","fetch-suggestions","onChange","onSelect"])])),[[d,n.getMoreData]])}]]);Ve.install=function(t){t.component(Ve.name,Ve)},xe.install=function(t){t.component(xe.name,xe)};const Se=v({...k.ElForm,name:"cvFormBase",extends:k.ElForm,provide(){return{elForm:this}},props:{...k.ElForm.props,labelWidth:{type:[String,Number],default:"auto"},labelPosition:{type:String,default:"right"}},watch:{model(){}},data:()=>({})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-form-base"},{...t.$props,...t.$attrs},e.toHandlers(t.$attrs)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),Ne=v({name:"cvFormInline",provide(){return{elForm:this}},props:{...k.ElForm.props},watch:{},data:()=>({form:{}})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-form");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-form-base"},t.$props,e.toHandlers(t.$attrs),{inline:!0}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),En={name:"cvFormItem",extends:k.ElFormItem,props:{...k.ElFormItem.props},data:()=>({localLabelWidth:"",localError:""}),created(){},methods:{}},Dn={key:0,class:"cv-form-item__tip"},Be=v(En,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-form-item");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps({...t.$props,...t.$attrs})),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default"),t.$slots.tip?(e.openBlock(),e.createElementBlock("div",Dn,[e.renderSlot(t.$slots,"tip")])):e.createCommentVNode("",!0)]),_:3},16)}]]);Se.install=function(t){t.component(Se.name,Se)},Ne.install=function(t){t.component(Ne.name,Ne)},Be.install=function(t){t.component(Be.name,Be)};const I={extends:k.ElInput,emits:["update:modelValue","change"],props:{...k.ElInput.props,modelValue:{type:[Number,String],default:""},placeholder:{type:[Number,String],default:""},disabled:{type:Boolean,default:!1}},watch:{modelValue(t){this.localVal=t},localVal(){this.handleChange(),this.handleInput()}},data(){return{localVal:this.modelValue,localRules:[]}},created(){},methods:{handleChange(){this.$emit("change",this.localVal)},handleInput(){this.$emit("update:modelValue",this.localVal)},handleBlur(){this._isCheckValue()},_showError(t){this.localError=t||"请输入正确的"+this.label},_diyValidate(){},_isCheckValue(){const o=this?.rules.split("|");this.localError="";for(let a in o){let i=o[a].split(":"),l=i[0]||"",n=i[1]||"";switch(l){case"require":if(this.localVal=="")return void this._showError(this.label+"不能为空");break;case"max":if(this.localVal.length>n)return void this._showError(this.label+"最大长度不超过"+n);break;case"min":if(this.localVal.length<n)return void this._showError(this.label+"最小长度不小于"+n);break;default:this._diyValidate(l)}}}}},_n=v({name:"cvInputText",mixins:[I],props:{},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"text"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.prepend?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Ee=v({name:"cvInputMobile",mixins:[I],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"number",oninput:"if(value.length>11)value=value.slice(0,11)"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入11位大陆手机号",clearable:""}),e.createSlots({prepend:e.withCtx(()=>[o[1]||(o[1]=e.createTextVNode("+86",-1))]),_:2},[t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"0"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),De=v({name:"cvInputEmail",mixins:[I],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"text"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入邮箱",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),_e=v({name:"cvInputPassword",mixins:[I],components:{},props:{showPassword:{type:Boolean,default:!1}},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"password"},{disabled:t.disabled,showPassword:a.showPassword},{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入密码",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Te=v({name:"cvInputNumber",mixins:[I],props:{},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-number",type:"number"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入整数",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Ie=v({name:"cvInputIdcard",mixins:[I],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"text",oninput:"if(value.length>18)value=value.slice(0,18)"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入身份证",clearable:"",maxlength:"18"}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Le=v({name:"cvInputDigit",mixins:[I],components:{},props:{},data:()=>({}),methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"number"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入",clearable:""}),e.createSlots({_:2},[t.$slots.prepend?{name:"prepend",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"prepend")]),key:"0"}:void 0,t.$slots.append?{name:"append",fn:e.withCtx(()=>[e.renderSlot(t.$slots,"append")]),key:"1"}:void 0]),1040,["modelValue","onChange","onInput","placeholder"])}]]),Fe=v({name:"cvTextarea",mixins:[I],props:{rows:{type:[Number,String],default:3},autosize:{type:[Boolean,Object],default:!1}},data:()=>({}),computed:{lastRow(){return parseInt(this.rows)}},created(){},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(r,e.mergeProps({type:"textarea"},{disabled:t.disabled,rows:n.lastRow,autosize:a.autosize},{rows:n.lastRow,modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入内容",clearable:""}),null,16,["rows","modelValue","onInput","placeholder"])}]]),Tn={name:"cvTextareaBtn",mixins:[I],components:{},props:{rows:{type:[Number,String],default:3},btnText:{type:[Number,String],default:""},btnIcon:{type:[String],default:""},autosize:{type:[Boolean,Object],default:!1}},data:()=>({}),computed:{lastRow(){return parseInt(this.rows)}},methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},In={class:"cv-textab-group"},Ln={class:"cv-textab-group__append"},Fn={class:"cv-textab_slot-wrap"},$e=v(Tn,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input"),c=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",In,[e.createVNode(r,e.mergeProps({type:"textarea"},{disabled:t.disabled,rows:n.lastRow,autosize:a.autosize},{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>t.localVal=d),onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入内容",clearable:""}),null,16,["modelValue","onInput","placeholder"]),e.createElementVNode("div",Ln,[e.createElementVNode("div",Fn,[e.renderSlot(t.$slots,"default",{},()=>[e.createVNode(c,{class:"cv-textab_slotbtn",type:"primary",size:t.size,onClick:n.onSubmit},{default:e.withCtx(()=>[a.btnIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(a.btnIcon),style:{"margin-right":"5px"}},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(a.btnText),1)]),_:1},8,["size","onClick"])])])])])}]]),$n={class:"cv-input-group"},On={class:"cv-input-group__append"},Oe=v({name:"cvInputBtn",mixins:[I],emits:["btnClick"],components:{},props:{btnText:{type:[Number,String],default:"确定"},btnIcon:{type:[String],default:""}},data:()=>({}),methods:{onSubmit(){this.$emit("btnClick",this.localVal)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input"),c=e.resolveComponent("el-button");return e.openBlock(),e.createElementBlock("div",$n,[e.createVNode(r,e.mergeProps({type:"text"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>t.localVal=d),onChange:t.handleChange,onInput:t.handleInput,placeholder:t.placeholder?t.placeholder:"请输入",clearable:""}),null,16,["modelValue","onChange","onInput","placeholder"]),e.createElementVNode("div",On,[e.renderSlot(t.$slots,"default",{},()=>[e.createVNode(c,{class:"cv-input-btn__slotbtn",type:"primary",size:t.size,onClick:n.onSubmit},{default:e.withCtx(()=>[a.btnIcon?(e.openBlock(),e.createElementBlock("i",{key:0,class:e.normalizeClass(a.btnIcon),style:{"margin-right":"5px"}},null,2)):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(a.btnText),1)]),_:1},8,["size","onClick"])])])])}]]),io=v({data:()=>({formData:{}})},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div")}]]);Ee.install=function(t){t.component(Ee.name,Ee)},De.install=function(t){t.component(De.name,De)},_e.install=function(t){t.component(_e.name,_e)},Te.install=function(t){t.component(Te.name,Te)},Ie.install=function(t){t.component(Ie.name,Ie)},Le.install=function(t){t.component(Le.name,Le)},Fe.install=function(t){t.component(Fe.name,Fe)},$e.install=function(t){t.component($e.name,$e)},Oe.install=function(t){t.component(Oe.name,Oe)},io.install=function(t){t.component(io.name,io)};const ze=v({name:"cvInputCounter",extends:k.ElInputNumber,props:{},watch:{modelValue(){this.localVal=this.modelValue}},data:()=>({localVal:0}),created(){},methods:{handleChange(t){this.$emit("update:modelValue",this.localVal)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input-number");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{modelValue:l.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>l.localVal=c),onChange:n.handleChange,step:t.step}),null,16,["modelValue","onChange","step"])}]]);ze.install=function(t){t.component(ze.name,ze)};const zn={class:"cv-show-text"},Mn=["innerHTML"],Me=v({name:"cvShowText",mixins:[],components:{},props:{text:{type:[Number,String,Object],default:""}},data:()=>({}),created(){},methods:{}},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",zn,[a.text?(e.openBlock(),e.createElementBlock("div",{key:0,innerHTML:a.text},null,8,Mn)):e.createCommentVNode("",!0),a.text?e.createCommentVNode("",!0):e.renderSlot(t.$slots,"default",{key:1})])}]]),Pn={class:"cv-show-image"},Pe=v({name:"cvShowImage",mixins:[],components:{},props:{url:{type:[String,Array,Object],default:""},width:{type:[String],default:"100px"},height:{type:[String],default:"100px"}},data:()=>({localUrl:""}),watch:{url:{handler(){this.localUrl=typeof this.url=="string"?[this.url]:this.url},immediate:!0,deep:!0}},created(){},methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-image");return e.openBlock(),e.createElementBlock("div",Pn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.localUrl,(c,d)=>(e.openBlock(),e.createBlock(r,{style:e.normalizeStyle("width:"+a.width+"; height:"+a.height+"; margin-right:10px"),key:d,src:c,"preview-src-list":l.localUrl},null,8,["style","src","preview-src-list"]))),128))])}]]),He=v({name:"cvShowTip",props:{borderColor:{type:[String],default:"#50bfff"},bgColor:{type:[String],default:"#ecf8ff"}},data:()=>({backgroundColor:"#ecf8ff",borderLeft:"5px solid #50bfff"}),created(){this.borderLeft=`5px solid ${this.borderColor}`,this.backgroundColor=`${this.bgColor}`},methods:{}},[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",{class:"cv-show-tip",style:e.normalizeStyle({backgroundColor:this.backgroundColor,borderLeft:this.borderLeft})},[e.renderSlot(t.$slots,"default")],4)}]]),Hn={name:"cv-gallery-dialog",props:{type:String,title:String,sources:Array,sliceSingle:{type:Boolean,default:!1},carouselAttrs:Object},data:()=>({isShowCarousel:!1,sourceTitle:"",initialIndex:0,isShowPreview:!1}),methods:{startPreview(t){this.isShowPreview=!0,this.initialIndex=t,this.sourceTitle=this.sources[t].title},handleCarouselChange(t){this.sources[t]&&this.sources[t].title?this.sourceTitle=this.sources[t].title:this.sourceTitle=""}}},An=["src"],jn={key:0,class:"cv-gallery-iframe embed-responsive embed-responsive-16by9"},Rn=["src"],Un=["src"],Wn=["src"],Yn={name:"gallery",components:{GalleryDialog:v(Hn,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-carousel-item"),c=e.resolveComponent("el-carousel"),d=e.resolveComponent("el-dialog");return e.openBlock(),e.createBlock(d,{visible:l.isShowPreview,"append-to-body":"",onOpen:o[0]||(o[0]=p=>l.isShowCarousel=!0),onClosed:o[1]||(o[1]=p=>l.isShowCarousel=!1),style:{"text-align":"center"}},{header:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.sourceTitle||a.title),1)]),default:e.withCtx(()=>[a.type==="video"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[l.isShowPreview?(e.openBlock(),e.createElementBlock("video",{key:0,src:a.sources[l.initialIndex].src,autoplay:"autoplay",class:"cv-gallery-video",controls:"controls",width:"100%"},null,8,An)):e.createCommentVNode("",!0)],64)):a.type==="iframe"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.isShowPreview?(e.openBlock(),e.createElementBlock("div",jn,[e.createElementVNode("iframe",{src:a.sources[l.initialIndex].src,allowfullscreen:"true",border:"0",frameborder:"no",framespacing:"0",scrolling:"no"},null,8,Rn)])):e.createCommentVNode("",!0)],64)):a.type==="image"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[a.sliceSingle&&a.sources[l.initialIndex]||a.sources.length===1?(e.openBlock(),e.createElementBlock("img",{key:0,src:a.sources[l.initialIndex].src,class:"cv-gallery-image"},null,8,Un)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[l.isShowCarousel?(e.openBlock(),e.createBlock(c,e.mergeProps({key:0,"initial-index":l.initialIndex,onChange:n.handleCarouselChange,"indicator-position":"outside"},a.carouselAttrs),{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.sources,(p,h)=>(e.openBlock(),e.createBlock(r,{key:h},{default:e.withCtx(()=>[e.createElementVNode("img",{src:p.src,class:"cv-gallery-image"},null,8,Wn)]),_:2},1024))),128))]),_:1},16,["initial-index","onChange"])):e.createCommentVNode("",!0)],64))],64)):e.createCommentVNode("",!0)]),_:1},8,["visible"])}]])},props:{type:{type:String,default:"image",validator:t=>["image","video","iframe"].includes(t)},size:Number,width:Number,height:Number,lazy:{type:Boolean,default:!1},source:[String,Array,Object],thumbSuffix:{type:String,default:""},thumbStyle:Object,carouselAttrs:Object,title:String,sliceSingle:{type:Boolean,default:!1}},data:()=>({}),computed:{computedStyle(){let t=this.width||this.size,o=this.height||this.size;return this.type==="iframe"&&(t=t?t+"px":"360px",o=o?o+"px":"auto"),Object.assign({},{width:t,height:o,display:"block"},this.thumbStyle)},thumbs(){return this.computedSources.map(t=>t.thumb)},computedSources(){const t=this.source;if(typeof t=="string")return[this.getStringSource(t)];if(t instanceof Array){const o=[];return t.forEach(a=>{a instanceof Object?o.push(this.getObjectSource(a)):typeof a=="string"&&o.push(this.getStringSource(a))}),o}return t instanceof Object?[this.getObjectSource(t)]:[]}},methods:{handlePreview(t){this.$refs.dialog.startPreview(t)},getStringSource(t){let o=t;return this.type==="image"&&this.thumbSuffix&&(o+=this.thumbSuffix),{type:this.type,src:t,thumb:o}},getObjectSource(t){return t.type=t.thumb?"image":this.type,t.thumb=t.thumb||t.src,t}}},qn={key:0,class:"cv-gallery"},Xn={class:"el-upload-list el-upload-list--picture-card"},Kn=["src"],Gn={class:"el-upload-list__item-actions"},Zn=["onClick"],ro=v(Yn,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("cv-icons"),c=e.resolveComponent("GalleryDialog");return a.source?(e.openBlock(),e.createElementBlock("div",qn,[e.createElementVNode("div",Xn,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(n.computedSources,(d,p)=>(e.openBlock(),e.createElementBlock("li",{key:p,class:"el-upload-list__item"},[e.createElementVNode("div",{style:e.normalizeStyle(n.computedStyle),class:"cv-gallery-iframe embed-responsive embed-responsive-16by9"},[e.createElementVNode("iframe",{src:d.thumb,allowfullscreen:"true",border:"0",frameborder:"no",framespacing:"0",scrolling:"no"},null,8,Kn)],4),e.createElementVNode("span",Gn,[e.createElementVNode("span",{onClick:h=>n.handlePreview(p,d)},[e.createVNode(r,{type:"ElIconVideoPlay",size:"20"})],8,Zn),e.renderSlot(t.$slots,"action",e.mergeProps({ref_for:!0},{source:d,index:p}))])]))),128))]),e.createVNode(c,{carouselAttrs:a.carouselAttrs,sliceSingle:a.sliceSingle,sources:n.computedSources,title:a.title,type:a.type,ref:"dialog"},null,8,["carouselAttrs","sliceSingle","sources","title","type"])])):e.createCommentVNode("",!0)}]]);Me.install=function(t){t.component(Me.name,Me)},Pe.install=function(t){t.component(Pe.name,Pe)},He.install=function(t){t.component(He.name,He)},ro.install=function(t){t.component(ro.name,ro)};const Ae=v({name:"cvRadioOptBase"},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-radio");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),je=v({name:"cvRadioOptBtn"},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-radio-button");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),Re=v({name:"cvRadioGroup"},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-radio-group");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]);Ae.install=function(t){t.component(Ae.name,Ae)},je.install=function(t){t.component(je.name,je)},Re.install=function(t){t.component(Re.name,Re)};const Ue=v({name:"cvCheckboxOptBase",extends:k.ElCheckbox},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-checkbox");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),We=v({name:"cvCheckboxOptBtn",extends:k.ElCheckboxButton,props:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-checkbox-button");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]),Qn={props:{...k.ElCheckboxGroup.props,modelValue:{type:[Array],default:()=>[]},dataLists:{type:Array,default:()=>[]},dataField:{type:[Object],default:()=>({})},disabled:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.handleChange()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0}},data(){return{localVal:this.modelValue,localOpt:[]}},created(){this.handleChange(),this._parseLocalOpt()},methods:{handleChange(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(i=>{t.push({label:i,value:i})}),this.localOpt=t;else{var o=this.dataField&&this.dataField.label||"label",a=this.dataField&&this.dataField.value||"value";this.dataLists.map(i=>{let l=i[o]===0?0:i[o]||"",n=i[a]===0?0:i[a]||"";n=n===0?0:n||l,t.push({label:l,value:n,disabled:!!i.disabled}),i.checked!="true"&&i.checked!=1||(typeof this.localVal=="string"?this.localVal=n:typeof this.localVal!="array"&&typeof this.localVal!="object"||this.localVal.push(n))}),this.localOpt=t}this._parseLocalOptDiy()},_parseLocalOptDiy(){}}},Jn={class:"cv-checkbox-all"},Ye=v({name:"cvCheckboxAll",mixins:[Qn],components:{},data:()=>({checkAll:!1,isIndeterminate:!0,localOptAll:[]}),methods:{handleCheckAllChange(t){this.localVal=t?this.localOptAll:[],this.isIndeterminate=!1,this.handleChange()},handleCheckedCitiesChange(t){let o=t.length;this.checkAll=o===this.localOptAll.length,this.isIndeterminate=o>0&&o<this.localOptAll.length},_parseLocalOptDiy(){this.localOpt&&this.localOpt.length!==0&&this.localOpt.map(t=>{t.disabled||this.localOptAll.push(t.label)})}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-checkbox"),c=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createElementBlock("div",Jn,[e.createVNode(r,{indeterminate:l.isIndeterminate,modelValue:l.checkAll,"onUpdate:modelValue":o[0]||(o[0]=d=>l.checkAll=d),onChange:n.handleCheckAllChange},{default:e.withCtx(()=>[...o[2]||(o[2]=[e.createTextVNode("全选",-1)])]),_:1},8,["indeterminate","modelValue","onChange"]),o[3]||(o[3]=e.createElementVNode("div",{style:{margin:"15px 0"}},null,-1)),e.createVNode(c,{modelValue:t.localVal,"onUpdate:modelValue":o[1]||(o[1]=d=>t.localVal=d),onChange:n.handleCheckedCitiesChange},{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.localOpt,(d,p)=>(e.openBlock(),e.createBlock(r,{value:d.value,key:p,onChange:t.handleChange,disabled:t.disabled||d.disabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.label),1)]),_:2},1032,["value","onChange","disabled"]))),128))])]),_:3},8,["modelValue","onChange"])])}]]),qe=v({name:"cvCheckboxGroup"},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-checkbox-group");return e.openBlock(),e.createBlock(r,e.normalizeProps(e.guardReactiveProps(t.$props)),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default")]),_:3},16)}]]);function $l(t,o,a){var i={}.atBegin;return(function(l,n,r){var c,d=r||{},p=d.noTrailing,h=p!==void 0&&p,u=d.noLeading,m=u!==void 0&&u,f=d.debounceMode,C=f===void 0?void 0:f,g=!1,y=0;function b(){c&&clearTimeout(c)}function w(){for(var V=arguments.length,N=new Array(V),E=0;E<V;E++)N[E]=arguments[E];var L=this,q=Date.now()-y;function G(){y=Date.now(),n.apply(L,N)}function le(){c=void 0}g||(m||!C||c||G(),b(),C===void 0&&q>l?m?(y=Date.now(),h||(c=setTimeout(C?le:G,l))):G():h!==!0&&(c=setTimeout(C?le:G,C===void 0?l-q:l)))}return w.cancel=function(V){var N=(V||{}).upcomingOnly,E=N!==void 0&&N;b(),g=!E},w})(t,o,{debounceMode:(i!==void 0&&i)!==!1})}function Xe(t,o=!1,a=!0){return new Promise((i,l)=>{const n=document.createElement("script");t=t.replace(/([^:]\/)\/+/g,"$1"),n.id=t,n.type="text/javascript",n.src=o?t+"?t="+new Date().getTime():t,document.getElementById(t)&&a?i():(document.body.appendChild(n),n.onload=()=>{i()})})}function ei(t){const o=t;try{const a=document.createElement("textarea");a.value=o,document.body.appendChild(a),a.select(),document.execCommand("Copy"),a.remove(),document.body.removeChild(a)}catch{navigator.clipboard.writeText(o).then(()=>{}).catch(i=>{})}k.ElMessage({message:"复制成功",type:"success"})}function ti(t){var o=new Date,a=new Date(t),i=o-a,l=Math.floor(i/1e3),n=Math.floor(l/60),r=Math.floor(n/60);if(n<1)var c=l+"秒前";else r<1?c=n+"分钟前":r<24?c=r+"小时前":c=a.toLocaleString();return c}function Y(t,...o){return o.reduce((a,i)=>Object.keys(i).reduce((l,n)=>{const r=i[n];return to(r)?l[n]=Y(l[n]?l[n]:{},r):zl(r)?l[n]=r.map((c,d)=>{if(to(c)){const p=l[n]?l[n]:[];return Y(p[d]?p[d]:{},c)}return c}):l[n]=r,l},a),t)}function Ol(t,o){const{[o[0]]:a,...i}=t;return Object.keys(t).reduce((l,n)=>(o.includes(n)||(l[n]=t[n]),l),{})}function to(t){return Object.prototype.toString.call(t)==="[object Object]"}function zl(t){return typeof Array.isArray=="function"?Array.isArray(t):Object.prototype.toString.call(t)==="[object Array]"}function ee(t){return zl(t)?t.length===0:to(t)?Object.keys(t).length===0:t===""||t==null}function oe(t,o){return ee(t)?o:t}function oi(t){let o=t.lastIndexOf("."),a=t.substring(o+1);return["png","jpg","jpeg","gif","webp","svg"].indexOf(a.toLowerCase())!=-1}function K(t){return t==null?"":String(t)}function ai(t){return window.URL?window.URL.createObjectURL(t):window.webkitURL?window.webkitURL.createObjectURL(t):""}Ue.install=function(t){t.component(Ue.name,Ue)},We.install=function(t){t.component(We.name,We)},qe.install=function(t){t.component(qe.name,qe)},Ye.install=function(t){t.component(Ye.name,Ye)};const Ml=(()=>{const t={svg:["image/svg+xml","image/svg"],jpg:["image/jpeg","image/jpg"],jpeg:["image/jpeg"],png:["image/png"],gif:["image/gif"],webp:["image/webp"],bmp:["image/bmp","image/x-bmp","image/x-ms-bmp"],ico:["image/x-icon","image/vnd.microsoft.icon"],tiff:["image/tiff","image/tif","image/x-tiff"],apng:["image/apng"],avif:["image/avif"],heic:["image/heic"],pdf:["application/pdf"],txt:["text/plain"],csv:["text/csv"],json:["application/json"],xml:["application/xml"],doc:["application/msword"],docx:["application/vnd.openxmlformats-officedocument.wordprocessingml.document"],xls:["application/vnd.ms-excel"],xlsx:["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],ppt:["application/vnd.ms-powerpoint"],pptx:["application/vnd.openxmlformats-officedocument.presentationml.presentation"],zip:["application/zip"],rar:["application/x-rar-compressed"],"7z":["application/x-7z-compressed"],mp3:["audio/mpeg"],mp4:["video/mp4"],mov:["video/quicktime"],avi:["video/x-msvideo"],wav:["audio/wav"]},o={},a={};for(const[i,l]of Object.entries(t)){o[i]=l[0];for(const n of l)a[n]=i}return{extensionToMime:o,mimeToExtension:a}})(),li={name:"cvGeoCity",mixins:[],components:{},emits:["update:province","update:city","update:district","update:provinceCode","update:cityCode","update:districtCode"],props:{modelValue:{type:[String,Array,Number],default:()=>[]},province:{type:[String]},provinceCode:{type:[Number,String],default:""},city:{type:[String]},cityCode:{type:[Number,String],default:""},district:{type:[String]},districtCode:{type:[Number,String],default:""},cityHide:{type:Boolean,default:!1},districtHide:{type:Boolean,default:!1}},watch:{modelValue(t){},province(t){this.initProvince()},provinceCode(t){this.initProvince()},cityCode(t){this.initCity()},districtCode(t){this.initDistrict()}},data:()=>({provinceCdnList:{},cityCdnList:{},districtCdnList:{},isCdnLoading:!0,provinceList:[],cityList:[],districtList:[],local1_code:"",local1_name:"",local2_code:"",local2_name:"",local3_code:"",local3_name:"",local1_flag:!1,local2_flag:!1,local3_flag:!1,hideMunicipality:!1,municipalities:["110000","120000","310000","500000","北京市","天津市","上海市","重庆市"]}),async mounted(){await Xe(this.CDN_URL_UI+"/dict/geo/province-kv-window.js"),await Xe(this.CDN_URL_UI+"/dict/geo/city-kv-window.js"),await Xe(this.CDN_URL_UI+"/dict/geo/district-kv-window.js"),await this.initLoad()},methods:{initLoad(){setTimeout(()=>{this.provinceCdnList=window.cdn__DictAreaProvince,this.cityCdnList=window.cdn__DictAreaCity,this.districtCdnList=window.cdn__DictAreaDistrict,this.local1_flag=!1,this.isCdnLoading=!1,this.getProvinces(),this.initProvince()},200)},initProvince(){if(!this.province&&!this.provinceCode)return!1;this.getProvinces();const t=this.provinceList.find(o=>this.province?o.provinceName===this.province:this.provinceCode&&o.provinceCode===this.provinceCode);t&&(this.local1_code=t.provinceCode,this.changeProvince(t.provinceCode)),this.initCity()},initCity(){if(!this.city&&!this.cityCode)return!1;const t=this.cityList.find(o=>this.city?o.cityName===this.city:this.cityCode&&o.cityCode===this.cityCode);t&&(this.local2_code=t.cityCode,this.changeCity(t.cityCode)),this.initDistrict()},initDistrict(){if(!this.district&&!this.districtCode)return!1;const t=this.districtList.find(o=>this.district?o.districtName===this.district:this.districtCode&&o.districtCode===this.districtCode);t&&this.changeDistrict(t.districtCode)},getProvinces(){if(!this.local1_flag&&typeof this.provinceCdnList=="object"){let t=[];for(let o in this.provinceCdnList)t.push({provinceCode:o,provinceName:this.provinceCdnList[o]});this.provinceList=t,this.local1_flag=!0}},changeProvince(t){this._getNeedCity(),this.local2_flag=!0,this.local2_code="",this.local2_name="",this.local3_code="",this.local3_name="",this.local1_code=t,this.local1_name=this.provinceList.find(o=>o.provinceCode===t)?.provinceName,this.handleChoose()},_getNeedCity(){let t=[],o=this.local1_code.substring(0,2);for(let a in this.cityCdnList)a.substring(0,2)==o&&t.push({cityCode:a,cityName:this.cityCdnList[a]});this.cityList=t},getCities(){this.local2_flag||this.provinceCode&&(this._getNeedCity(),this.local2_flag=!0)},changeCity(t){this._getNeedDistrict(),this.local3_flag=!0,this.local3_name="",this.local3_code="",this.local2_code=t,this.local2_name=this.cityList.find(o=>o.cityCode===t)?.cityName,this.handleChoose()},_getNeedDistrict(){let t=[],o=this.local2_code.substring(0,4);for(let a in this.districtCdnList)a.substring(0,4)==o&&t.push({districtCode:a,districtName:this.districtCdnList[a]});this.districtList=t},getDistrict(){this.local3_flag||this.local2_code&&this._getNeedDistrict()},changeDistrict(t){this.local3_code=t,this.local3_name=this.districtList.find(o=>o.districtCode===t)?.districtName,this.handleChoose()},handleChoose(){this.$emit("update:province",this.local1_name),this.$emit("update:provinceCode",this.local1_code),this.$emit("update:city",this.local2_name),this.$emit("update:cityCode",this.local2_code),this.$emit("update:district",this.local3_name),this.$emit("update:districtCode",this.local3_code)}}},ni={class:"cv-geo-city"},ii={key:0},ri={key:1},Ke=v(li,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-option"),c=e.resolveComponent("el-select"),d=e.resolveDirective("loading");return e.withDirectives((e.openBlock(),e.createElementBlock("div",ni,[e.createElementVNode("div",null,[e.createVNode(c,{modelValue:l.local1_code,"onUpdate:modelValue":o[0]||(o[0]=p=>l.local1_code=p),onFocus:n.getProvinces,onChange:n.changeProvince,placeholder:"省",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.provinceList,(p,h)=>(e.openBlock(),e.createBlock(r,{key:p.provinceCode,label:p.provinceName,value:p.provinceCode},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.provinceName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]),a.cityHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ii,[e.createVNode(c,{modelValue:l.local2_code,"onUpdate:modelValue":o[1]||(o[1]=p=>l.local2_code=p),onFocus:n.getCities,onChange:n.changeCity,placeholder:"市",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.cityList,(p,h)=>(e.openBlock(),e.createBlock(r,{key:p.cityCode,label:p.cityName,value:p.cityCode},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.cityName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])])),a.cityHide||a.districtHide?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ri,[e.createVNode(c,{modelValue:l.local3_code,"onUpdate:modelValue":o[2]||(o[2]=p=>l.local3_code=p),onFocus:n.getDistrict,onChange:n.changeDistrict,placeholder:"区/县",filterable:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.districtList,(p,h)=>(e.openBlock(),e.createBlock(r,{key:p.districtCode,label:p.districtName,value:p.districtCode},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.districtName),1)]),_:2},1032,["label","value"]))),128))]),_:1},8,["modelValue","onFocus","onChange"])]))])),[[d,l.isCdnLoading]])}]]),Pl={computed:{componentName(){return this.$options.name}},methods:{_mergeAttrs(t){const o=this.$cvUiParams||{},a=t&&o[t]||{},i=o[this.componentName]||{},l=Object.assign({},a,i);return Object.assign({},l,this.$attrs)}}},si={class:"cv-geo-map__wrap"},ci={class:"cv-geo-map__box"},di={style:{width:"100%",height:"510px"}},pi=["src"],hi={class:"cv-geo-map__info"},mi={key:0,class:"cv-geo-map__address"},ui={key:1,class:"cv-geo-map__jwd"},Ge=v({name:"cvGeoMap",mixins:[Pl],emits:["update:address","update:latitude","update:longitude","update:name","update:city"],props:{title:{type:[String],default:"选择经纬度地点"},mapKey:{type:[String],default:""},mapSecret:{type:[String],default:""},mapType:{type:[String],default:"qq"},address:{type:[String]},name:{type:[String]},city:{type:[String]},latitude:{type:[Number,String]},longitude:{type:[Number,String]}},watch:{address(t){this.localAddress=t},latitude(t){this.localLatitude=t},longitude(t){this.localLongitude=t},name(t){this.localName=t},city(t){this.localCity=t}},computed:{localMapKey(){return this._mergeAttrs("geo").mapKey},localMapSecret(){return this._mergeAttrs("geo").mapSecret},mapSrc(){let t=this.localMapKey;if(this.mapType=="qq"){if(!this.localMapKey)return"";let o="https://apis.map.qq.com/tools/locpicker";return o+=`?search=1&type=1&key=${t}&referer=myapp`,this.latitude&&this.longitude&&(o+=`&coord=${this.latitude},${this.longitude}`),o}if(this.mapType=="amap"){if(!this.localMapKey||!this.localMapSecret)return"";let o="https://m.amap.com/picker/";return o+=`?zoom=15&radius=1000&total=20&key=${t}&jscode=${localMapSecret}`,this.latitude&&this.longitude&&(o+=`¢er=${this.longitude},${this.latitude}`),o}return this.$message.info("目前不支持百度地图"),""}},data:()=>({localMapShow:!1,localAddress:"",localLatitude:"",localLongitude:"",localName:"",localCity:""}),mounted(){this.initData()},methods:{initData(){let t=this;window.addEventListener("message",o=>{let a=o.data;a&&a.module=="locationPicker"&&(t.localAddress=a.poiaddress||"",t.localName=a.poiname||"",t.localCity=a.cityname||"",t.localLatitude=a.latlng.lat||"",t.localLongitude=a.latlng.lng||"")},!1)},handleMapClose(){this.localMapShow=!1},handleMapOpen(){this.localMapShow=!0},handleConfirm(){this.$emit("update:address",this.localAddress),this.$emit("update:longitude",this.localLongitude),this.$emit("update:latitude",this.localLatitude),this.$emit("update:name",this.localName),this.$emit("update:city",this.localCity),this.handleMapClose()},handleCopy(t){this.$cvCopy(t)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-input"),c=e.resolveComponent("el-tooltip"),d=e.resolveComponent("el-button"),p=e.resolveComponent("el-scrollbar"),h=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("div",si,[e.createElementVNode("div",ci,[e.createVNode(c,{class:"item",effect:"dark",content:"请点击查找位置选择位置",placement:"bottom"},{default:e.withCtx(()=>[e.createVNode(r,{modelValue:l.localAddress,"onUpdate:modelValue":o[0]||(o[0]=u=>l.localAddress=u)},null,8,["modelValue"])]),_:1}),e.createVNode(d,{type:"primary",icon:"ElIconSearch",onClick:n.handleMapOpen},{default:e.withCtx(()=>[...o[5]||(o[5]=[e.createTextVNode("请查找位置",-1)])]),_:1},8,["onClick"])])]),e.createVNode(h,{modelValue:l.localMapShow,"onUpdate:modelValue":o[4]||(o[4]=u=>l.localMapShow=u),title:a.title,width:"520","before-close":n.handleMapClose},{footer:e.withCtx(()=>[e.createElementVNode("div",hi,[l.localAddress?(e.openBlock(),e.createElementBlock("div",mi,[o[6]||(o[6]=e.createElementVNode("span",{class:"cv-geo-map__label"},"已选:",-1)),e.createVNode(c,{class:"item",effect:"dark",content:"点击复制",placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"cv-geo-map__value",onClick:o[1]||(o[1]=u=>n.handleCopy(l.localAddress))},e.toDisplayString(l.localAddress),1)]),_:1})])):e.createCommentVNode("",!0),l.localAddress?(e.openBlock(),e.createElementBlock("div",ui,[o[7]||(o[7]=e.createElementVNode("span",{class:"cv-geo-map__label"},"经度:",-1)),e.createVNode(c,{class:"item",effect:"dark",content:"点击复制",placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"cv-geo-map__value",onClick:o[2]||(o[2]=u=>n.handleCopy(l.localLongitude))},e.toDisplayString(l.localLongitude),1)]),_:1}),o[8]||(o[8]=e.createElementVNode("span",{class:"cv-geo-map__label"},"纬度:",-1)),e.createVNode(c,{class:"item",effect:"dark",content:"点击复制",placement:"bottom"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"cv-geo-map__value",onClick:o[3]||(o[3]=u=>n.handleCopy(l.localLatitude))},e.toDisplayString(l.localLatitude),1)]),_:1})])):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.createVNode(d,{onClick:n.handleMapClose},{default:e.withCtx(()=>[...o[9]||(o[9]=[e.createTextVNode("取消",-1)])]),_:1},8,["onClick"]),e.createVNode(d,{type:"primary",onClick:n.handleConfirm,disabled:!l.localAddress},{default:e.withCtx(()=>[...o[10]||(o[10]=[e.createTextVNode("确认选择",-1)])]),_:1},8,["onClick","disabled"])])]),default:e.withCtx(()=>[e.createElementVNode("div",di,[e.createVNode(p,{style:{height:"510px"}},{default:e.withCtx(()=>[e.createElementVNode("iframe",{id:"mapPage",width:"100%",height:"100%",style:{height:"500px"},frameborder:"0",src:n.mapSrc},null,8,pi)]),_:1})])]),_:1},8,["modelValue","title","before-close"])],64)}]]);Ke.install=function(t){t.component(Ke.name,Ke)},Ge.install=function(t){t.component(Ge.name,Ge)};const Ze={...k.ElOption,extends:k.ElOption,name:"cvSelectOpt"},Qe=v({name:"cvSelectBase",emits:["onChoose","change","update:modelValue"],props:{...k.ElSelect.props,modelValue:{type:[String,Array,Number],default:()=>""},emptyValues:{type:[Array],default:[null,void 0]},dataLists:{type:[Array],default:()=>[]},dataField:{type:[Object],default:()=>({})},dataDisabled:{type:[Array],default:()=>[]},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"}},watch:{modelValue(t){this.localVal=t},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(t){this.handleChange()}},data(){return{localVal:this.modelValue,localOpt:[]}},methods:{handleChoose(t,o){this.$emit("onChoose",t,o)},handleChange(){this.$emit("change",this.localVal),this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=[];if(this.dataLists&&this.dataLists.length!==0)if(typeof this.dataLists[0]=="string")this.dataLists.map(i=>{t.push({label:i,value:i})}),this.localOpt=t;else{var o=this.dataField&&this.dataField.label||"label",a=this.dataField&&this.dataField.value||"value";this.dataLists.map(i=>{let l=i[o]===0?0:i[o]||"",n=i[a]===0?0:i[a]||"";if(n=n===0?0:n||l,this.dataDisabled.length>0)for(let r in this.dataDisabled)this.dataDisabled[r][a]==n&&(i.disabled=!0);t.push({label:l,value:n,disabled:!!i.disabled}),i.checked!="true"&&i.checked!=1||(typeof this.localVal=="string"?this.localVal=n:typeof this.localVal!="array"&&typeof this.localVal!="object"||this.localVal.push(n))}),this.localOpt=t}}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-option"),c=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(c,e.mergeProps({class:"cv-select-base"},t.$props,{modelValue:l.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>l.localVal=d),size:t.size,filterable:"",clearable:""}),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{},()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.localOpt,(d,p)=>(e.openBlock(),e.createBlock(r,{key:p,label:d.label,value:d.value,disabled:d.disabled,onClick:h=>n.handleChoose(d,p)},null,8,["label","value","disabled","onClick"]))),128))])]),_:3},16,["modelValue","size"])}]]),Je=v({name:"cvSelectTree",emits:["update:modelValue","change"],props:{...k.ElSelect.props,modelValue:{type:[String,Array,Number],default:()=>""},dataLists:{type:[Array],default:()=>[]},dataField:{type:[Object],default:()=>({value:"id",label:"title",children:"children"})},clearable:{type:Boolean,default:!0},accordion:{type:Boolean,default:!1},defaultExpandAll:{type:Boolean,default:!0},dataDisabled:{type:[Array],default:()=>[]},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"},showAllLevels:{type:Boolean,default:!0},showCheckbox:{type:Boolean,default:!1},filterable:{type:Boolean,default:!0},emitPath:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},refID:{type:[String],required:!1,default:()=>"cvSelectTree-"+ +new Date+(Math.random()/1e4).toFixed(0)}},watch:{modelValue(){this.localVal=this.modelValue,this.initHandle()},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(){this.handleChange()}},data:()=>({localVal:"",localOpt:[],localTitle:"",defaultExpandedKey:[]}),computed:{props2(){return Object.assign(this.dataField,{emitPath:this.emitPath},{multiple:this.multiple})}},created(){},mounted(){this.localVal=this.modelValue,this.initHandle()},methods:{initHandle(){if(this.localVal){var t=this.$refs[this.refID+"tree"].getNode(this.localVal);t&&(this.localTitle=t.data[this.dataField.label],this.$refs[this.refID+"tree"].setCurrentKey(this.localVal),this.defaultExpandedKey=[this.localVal])}else this.clearHandle();this.initScroll()},initScroll(){this.$nextTick(()=>{let t=document.querySelectorAll(".cv-select-tree .el-scrollbar .el-select-dropdown__wrap")[0],o=document.querySelectorAll(".cv-select-tree .el-scrollbar .el-scrollbar__bar");t.style.cssText="margin: 0px; max-height: none; overflow: hidden;",o.forEach(a=>a.style.width=0)})},handleNodeClick(t,o,a){t.disabled||(this.localTitle=t[this.dataField.label],this.localVal=t[this.dataField.value],this.defaultExpandedKey=[],this.$refs[this.refID].blur())},clearHandle(){this.localTitle="",this.localVal="",this.defaultExpandedKey=[],this.clearSelected()},clearSelected(){document.querySelectorAll(`#${this.refID}tree .el-tree-node`).forEach(t=>t.classList.remove("is-current"))},handleChange(){this.$emit("change",this.localVal),this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=this.dataLists;this.dataField&&this.dataField.label;let o=this.dataField&&this.dataField.value||"value",a=this.dataField&&this.dataField.children||"children",i=this.dataDisabled;(function l(n){for(let r in n)i.map(c=>{n[r][o]==c[o]&&(n[r].disabled=!0)}),n[r][a]&&l(n[r][a])})(t),this.localOpt=t}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-tree"),c=e.resolveComponent("el-option"),d=e.resolveComponent("el-select");return e.openBlock(),e.createBlock(d,e.mergeProps(t.$props,{ref:a.refID,"popper-class":"cv-select-tree",modelValue:l.localTitle,onClear:n.clearHandle}),{default:e.withCtx(()=>[e.createVNode(c,{value:l.localTitle,label:l.localTitle,class:"options"},{default:e.withCtx(()=>[e.createVNode(r,{"highlight-current":"",id:a.refID+"tree",ref:a.refID+"tree",accordion:a.accordion,showCheckbox:a.showCheckbox,data:l.localOpt,props:a.dataField,"node-key":a.dataField.value,onNodeClick:n.handleNodeClick,"default-expand-all":a.defaultExpandAll},null,8,["id","accordion","showCheckbox","data","props","node-key","onNodeClick","default-expand-all"])]),_:1},8,["value","label"])]),_:1},16,["modelValue","onClear"])}]]);Ze.install=function(t){t.component(Ze.name,Ze)},Qe.install=function(t){t.component(Qe.name,Qe)},Je.install=function(t){t.component(Je.name,Je)};const gi={name:"cvCascaderBase",components:{},props:{...k.ElCascader.props,modelValue:{type:[String,Array,Number],default(){}},dataLists:{type:[Array],default:()=>[]},dataDisabled:{type:[Array],default:()=>[]},disabled:{type:Boolean,default:!1},placeholder:{type:[String,Number],default:"请选择"},showAllLevels:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},dataField:{type:[Object],default:()=>({})},emitPath:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},dataLists:{handler(){this._parseLocalOpt()},immediate:!0,deep:!0},localVal(){this.handleChange(),this.handleInput()}},data(){return{localVal:this.modelValue,localOpt:[]}},computed:{props2(){return Object.assign(this.dataField,{emitPath:this.emitPath},{multiple:this.multiple})}},created(){},methods:{handleChange(){this.$emit("change",this.localVal)},handleInput(){this.$emit("update:modelValue",this.localVal)},_parseLocalOpt(){let t=this.dataLists,o=this.dataField&&this.dataField.value||"value",a=this.dataDisabled;(function i(l){for(let n in l)a.map(r=>{l[n][o]==r[o]&&(l[n].disabled=!0)}),l[n].children&&i(l[n].children)})(t),this.localOpt=t},getCheckedNodes(){}}},fi={class:"cv-cascader-base block"},et=v(gi,[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-cascader");return e.openBlock(),e.createElementBlock("div",fi,[e.createVNode(r,e.mergeProps(t.$props,{props:n.props2,modelValue:l.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>l.localVal=c),options:l.localOpt,onChange:n.handleChange,onGetCheckedNodes:n.getCheckedNodes}),null,16,["props","modelValue","options","onChange","onGetCheckedNodes"])])}]]);et.install=function(t){t.component(et.name,et)};const Hl={props:{...k.ElTimePicker.props,modelValue:{type:[String,Array,Number,Object,Date],default:null}},watch:{modelValue:{handler(){if(this.valueFormat!="timestamp")this.localVal=this.modelValue;else if(Array.isArray(this.modelValue)){var t;if(t=this.modelValue.map(o=>{if(!isNaN(o)&&o.toString().length==10)return 1e3*o}),this.localVal&&this.localVal[0]==t[0]&&this.localVal[1]==t[1])return;this.localVal=t}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=1e3*this.modelValue&&(this.localVal=1e3*this.modelValue)},immediate:!0,deep:!0},localVal(){var t;if(this.valueFormat!="timestamp")this.$emit("update:modelValue",this.localVal);else if(Array.isArray(this.localVal)){if(t=this.localVal.map(o=>{if(!isNaN(o)&&o.toString().length==13)return parseInt(o/1e3)}),this.modelValue&&t[0]==this.modelValue[0]&&t[1]==this.modelValue[1])return;this.$emit("update:modelValue",t)}else isNaN(this.localVal)||this.localVal.toString().length!=13||(t=parseInt(this.localVal/1e3),this.modelValue!=t&&this.$emit("update:modelValue",t))}},data:()=>({localVal:""}),created(){},methods:{}},tt=v({name:"cvTimeBase",mixins:[Hl],props:{format:{type:String,default:"HH:mm:ss"},valueFormat:{type:String,default:"HH:mm:ss"},placeholder:{type:[String,Number],default:"选择时间"}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-time-picker");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-timePicker-base"},t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),format:a.format,"picker-options":{}}),null,16,["modelValue","format"])}]]),ot=v({name:"cvTimeRange",mixins:[Hl],props:{format:{type:String,default:"HH:mm:ss"},valueFormat:{type:String,default:"HH:mm:ss"},startPlaceholder:{type:[String,Number],default:"开始时间"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束时间"}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-time-picker");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-timePicker-range"},t.$props,{"is-range":"",modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),format:a.format,"range-separator":a.rangeSeparator,"start-placeholder":a.startPlaceholder,"end-placeholder":a.endPlaceholder}),null,16,["modelValue","format","range-separator","start-placeholder","end-placeholder"])}]]),at=v({name:"cvTimeSelect"},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-time-select");return e.openBlock(),e.createBlock(r,e.mergeProps({class:"cv-time-select"},t.$props),null,16)}]]),ao={props:{...k.ElDatePicker.props,modelValue:{type:[String,Array,Number,Object,Date],default:null},pickerOptions:{type:Boolean,default:!1}},watch:{modelValue:{handler(){if(this.valueFormat!="timestamp")this.localVal=this.modelValue;else if(Array.isArray(this.modelValue)){var t;if(t=this.modelValue.map(o=>{if(!isNaN(o)&&o.toString().length==10)return 1e3*o}),this.localVal&&this.localVal[0]==t[0]&&this.localVal[1]==t[1])return;this.localVal=t}else this.modelValue&&this.modelValue.toString().length==10&&this.localVal!=1e3*this.modelValue&&(this.localVal=1e3*this.modelValue)},immediate:!0,deep:!0},localVal(){var t;if(this.valueFormat!="timestamp")this.$emit("update:modelValue",this.localVal);else if(Array.isArray(this.localVal)){if(t=this.localVal.map(o=>{if(!isNaN(o)&&o.toString().length==13)return parseInt(o/1e3)}),this.modelValue&&t[0]==this.modelValue[0]&&t[1]==this.modelValue[1])return;this.$emit("update:modelValue",t)}else isNaN(this.localVal)||this.localVal.toString().length!=13||(t=parseInt(this.localVal/1e3),this.modelValue!=t&&this.$emit("update:modelValue",t))}},data:()=>({localVal:""})},lt=v({name:"cvDateBase",mixins:[ao],props:{format:{type:String,default:"YYYY-MM-DD"},valueFormat:{type:String,default:"YYYY-MM-DD"},placeholder:{type:[String,Number],default:"选择日期"}},data:()=>({localPickerOptions:{disabledDate:t=>t.getTime()>Date.now(),shortcuts:[{text:"今天",onClick(t){t.$emit("pick",new Date)}},{text:"昨天",onClick(t){const o=new Date;o.setTime(o.getTime()-864e5),t.$emit("pick",o)}},{text:"一周前",onClick(t){const o=new Date;o.setTime(o.getTime()-6048e5),t.$emit("pick",o)}},{text:"一个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-2592e6),t.$emit("pick",o)}},{text:"三个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-7776e6),t.$emit("pick",o)}},{text:"六个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-15552e6),t.$emit("pick",o)}},{text:"一年前",onClick(t){const o=new Date;o.setTime(o.getTime()-31536e6),t.$emit("pick",o)}}]}})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),type:"date","value-format":a.valueFormat,placeholder:a.placeholder,"picker-options":t.pickerOptions&&l.localPickerOptions}),null,16,["modelValue","value-format","placeholder","picker-options"])}]]),nt=v({name:"cvDateRange",mixins:[ao],props:{valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:[String,Number],default:"开始日期"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束日期"}},data:()=>({localPickerOptions:{shortcuts:[{text:"今天",onClick(t){const o=new Date,a=new Date;t.$emit("pick",[a,o])}},{text:"昨天",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-864e5),o.setTime(o.getTime()-864e5),t.$emit("pick",[a,o])}},{text:"最近一周",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,o])}},{text:"最近一个月",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,o])}},{text:"最近三个月",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,o])}},{text:"最近六个月",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-15552e6),t.$emit("pick",[a,o])}},{text:"最近一年",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-31536e6),t.$emit("pick",[a,o])}}]}})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),type:"daterange","value-format":a.valueFormat,"range-separator":a.rangeSeparator,"start-placeholder":a.startPlaceholder,"end-placeholder":a.endPlaceholder,"picker-options":t.pickerOptions&&l.localPickerOptions}),null,16,["modelValue","value-format","range-separator","start-placeholder","end-placeholder","picker-options"])}]]),it=v({name:"cvDatetimeBase",mixins:[ao],props:{format:{type:String,default:"YYYY-MM-DD HH:mm:ss"},valueFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},placeholder:{type:[String,Number],default:"选择日期时间"}},data:()=>({localPickerOptions:{disabledDate:t=>t.getTime()>Date.now(),shortcuts:[{text:"今天",onClick(t){t.$emit("pick",new Date)}},{text:"昨天",onClick(t){const o=new Date;o.setTime(o.getTime()-864e5),t.$emit("pick",o)}},{text:"一周前",onClick(t){const o=new Date;o.setTime(o.getTime()-6048e5),t.$emit("pick",o)}},{text:"一个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-2592e6),t.$emit("pick",o)}},{text:"三个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-7776e6),t.$emit("pick",o)}},{text:"六个月前",onClick(t){const o=new Date;o.setTime(o.getTime()-15552e6),t.$emit("pick",o)}},{text:"一年前",onClick(t){const o=new Date;o.setTime(o.getTime()-31536e6),t.$emit("pick",o)}}]}})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),type:"datetime","value-format":a.valueFormat,placeholder:a.placeholder,"picker-options":t.pickerOptions&&l.localPickerOptions}),null,16,["modelValue","value-format","placeholder","picker-options"])}]]),rt=v({name:"cvDatetimeRange",mixins:[ao],props:{valueFormat:{type:String,default:"YYYY-MM-DD HH:mm:ss"},startPlaceholder:{type:[String,Number],default:"开始日期"},rangeSeparator:{type:[String,Number],default:"至"},endPlaceholder:{type:[String,Number],default:"结束日期"}},data:()=>({localPickerOptions:{shortcuts:[{text:"今天",onClick(t){const o=new Date,a=new Date;t.$emit("pick",[a,o])}},{text:"昨天",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-864e5),o.setTime(o.getTime()-864e5),t.$emit("pick",[a,o])}},{text:"最近一周",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-6048e5),t.$emit("pick",[a,o])}},{text:"最近一个月",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-2592e6),t.$emit("pick",[a,o])}},{text:"最近三个月",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-7776e6),t.$emit("pick",[a,o])}},{text:"最近六个月",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-15552e6),t.$emit("pick",[a,o])}},{text:"最近一年",onClick(t){const o=new Date,a=new Date;a.setTime(a.getTime()-31536e6),t.$emit("pick",[a,o])}}]}})},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{modelValue:t.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>t.localVal=c),type:"datetimerange","value-format":a.valueFormat,"range-separator":a.rangeSeparator,"start-placeholder":a.startPlaceholder,"end-placeholder":a.endPlaceholder,align:"right","picker-options":t.pickerOptions&&l.localPickerOptions}),null,16,["modelValue","value-format","range-separator","start-placeholder","end-placeholder","picker-options"])}]]),st=v({name:"cvDatetimeScreen",props:{start:{type:String,default:null},end:{type:String,default:null},autoUpdate:{type:Boolean,default:!0}},emits:["update:start","update:end","change"],data(){return{defaultTime:[new Date(2e3,0,1,0,0,0),new Date(2e3,0,1,23,59,59)],internalValue:[this.start||"",this.end||""]}},watch:{start(t){t!==null&&t!==""||this.end!==null&&this.end!==""?this.internalValue[0]=t:this.internalValue=[null,null]},end(t){this.start!==null&&this.start!==""||t!==null&&t!==""?this.internalValue[1]=t:this.internalValue=[null,null]}},computed:{dateUtil:()=>({getStartOfDay(t=new Date){const o=new Date(t);return o.setHours(0,0,0,0),o},getEndOfDay(t=new Date){const o=new Date(t);return o.setHours(23,59,59,999),o},getYesterday(){const t=new Date;return t.setDate(t.getDate()-1),t},getDaysAgo(t){const o=new Date;return o.setDate(o.getDate()-(t-1)),o},getFirstDayOfMonth(){const t=new Date;return t.setDate(1),t},getFirstDayOfYear(){const t=new Date;return t.setMonth(0,1),t}}),refinedShortcuts(){return[{text:"本日",value:()=>[this.dateUtil.getStartOfDay(),this.dateUtil.getEndOfDay()]},{text:"昨天",value:()=>{const t=this.dateUtil.getYesterday();return[this.dateUtil.getStartOfDay(t),this.dateUtil.getEndOfDay(t)]}},{text:"最近7天",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getDaysAgo(7)),this.dateUtil.getEndOfDay()]},{text:"最近30天",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getDaysAgo(30)),this.dateUtil.getEndOfDay()]},{text:"本月",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getFirstDayOfMonth()),this.dateUtil.getEndOfDay()]},{text:"本年",value:()=>[this.dateUtil.getStartOfDay(this.dateUtil.getFirstDayOfYear()),this.dateUtil.getEndOfDay()]},{text:"全部",value:()=>[null,null]}]}},methods:{syncInternalValue(){this.start!==null&&this.start!==""||this.end!==null&&this.end!==""?this.internalValue=[this.start,this.end]:this.internalValue=[null,null]},handleDateChange(t){t?(this.$emit("update:start",t[0]),this.$emit("update:end",t[1])):(this.$emit("update:start",null),this.$emit("update:end",null)),this.$emit("change",t)},handleCalendarChange(t){}},created(){this.syncInternalValue()}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-date-picker");return e.openBlock(),e.createBlock(r,{modelValue:l.internalValue,"onUpdate:modelValue":o[0]||(o[0]=c=>l.internalValue=c),type:"datetimerange",shortcuts:n.refinedShortcuts,"range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间","value-format":"YYYY-MM-DD HH:mm:ss","default-time":l.defaultTime,onChange:n.handleDateChange,onCalendarChange:n.handleCalendarChange,clearable:"",class:"screen-date-picker"},null,8,["modelValue","shortcuts","default-time","onChange","onCalendarChange"])}]]);tt.install=function(t){t.component(tt.name,tt)},ot.install=function(t){t.component(ot.name,ot)},at.install=function(t){t.component(at.name,at)},lt.install=function(t){t.component(lt.name,lt)},nt.install=function(t){t.component(nt.name,nt)},it.install=function(t){t.component(it.name,it)},rt.install=function(t){t.component(rt.name,rt)},st.install=function(t){t.component(st.name,st)};const ct=v({name:"cvSwitchBase",props:{...k.ElSwitch.props,activeColor:{type:[String],default:""},inactiveColor:{type:[String],default:""},disabled:{type:Boolean,default:!1}},watch:{modelValue(){this.localVal=this.modelValue},localVal(){this.$emit("update:modelValue",this.localVal)}},data(){return{localVal:this.modelValue}},created(){this.localVal=this.modelValue},methods:{}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-switch");return e.openBlock(),e.createBlock(r,e.mergeProps(t.$props,{modelValue:l.localVal,"onUpdate:modelValue":o[0]||(o[0]=c=>l.localVal=c)}),null,16,["modelValue"])}]]);ct.install=function(t){t.component(ct.name,ct)};const dt=v({name:"cvCodeSms",mixins:[],components:{},props:{...k.ElInput.props,maxlength:{type:[Number,String],default:6},modelValue:{type:[Number,String],default:""},placeholder:{type:[Number,String],default:"请输入验证码"},disabled:{type:Boolean,default:!1},mobile:{type:[Number,String],default:""},mobileParam:{type:String,default:"mobile"},codeUrl:{type:String,default:""},codeSign:{type:Boolean,default:!1},apiFunc:{type:Function,default:null},waitTime:{type:[Number,String],default:60}},watch:{mobile(t){this.localMobile=t},modelValue(t){this.localVal=t}},data(){return{localVal:this.modelValue,localMobile:"",nextTime:0,diyPlaceholder:"短信验证码",btnDisabled:!1,btnText:"获取验证码",btnIntervalObj:null}},created(){this.localMobile=this.mobile},methods:{showDiyMsg(t){this.$message(t)},getSmsCode(){if(!this.localMobile)return this.showDiyMsg("手机号不正确"),void this.$emit("onGetSms",!1);if(!/^[1][3,4,5,6,7,8,9][0-9]{9}$/.test(this.localMobile))return this.showDiyMsg("手机号格式不正确"),void this.$emit("onGetSms",!1);this.codeUrl||this.apiFunc?(this.btnDisabled=!0,this.btnIntervalObj||this.btnDisabled&&(this.btnText="请稍后...",this.apiFunc?this.apiFunc({postType:"sendSms",cto_sms_type:"alterMobile",sendCode:"发送验证码",[this.mobileParam]:this.localMobile}).then(t=>{let o=t;o.status==200?(this.showDiyMsg("发送成功!"),setTimeout(()=>{if(this.codeSign){let a=o.data&&o.data.sign||"";this.diyPlaceholder="识别码:"+a}this.smsCodeWaitTime()},500)):(this.showDiyMsg("短信获取失败,请检查网络"),this.btnDisabled=!1,this.btnText="获取验证码")}).catch(t=>{this.btnDisabled=!1,this.btnText="获取验证码"}):(this.btnDisabled=!1,this.btnText="重新获取验证码"))):this.showDiyMsg("短信接口地址不能为空")},smsCodeWaitTime(){this.nextTime=Date.parse(new Date)/1e3+parseInt(this.waitTime),this.btnIntervalObj=setInterval(()=>{let t=this.nextTime-Date.parse(new Date)/1e3;t<=0?(clearInterval(this.btnIntervalObj),this.btnText="重新获取验证码",this.btnIntervalObj=0,this.btnDisabled=!1):(this.btnDisabled=!0,this.btnText=t.toString()+"s")},100)},updateInput(t){this.$emit("update:modelValue",this.localVal)}}},[["render",function(t,o,a,i,l,n){const r=e.resolveComponent("el-button"),c=e.resolveComponent("el-input");return e.openBlock(),e.createBlock(c,e.mergeProps(t.$props,{modelValue:l.localVal,"onUpdate:modelValue":o[0]||(o[0]=d=>l.localVal=d),clearable:"",placeholder:l.diyPlaceholder,onInput:n.updateInput}),{append:e.withCtx(()=>[e.createVNode(r,{onClick:n.getSmsCode,disabled:l.btnDisabled},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.btnText),1)]),_:1},8,["onClick","disabled"])]),_:1},16,["modelValue","placeholder","onInput"])}]]);dt.install=function(t){t.component(dt.name,dt)};const Ci={props:{fileType:{type:[Array],default:[]},fileSize:{type:[Number],default:2},fileUnit:{type:[String],default:""},multiple:{type:[Boolean],default:!1},limit:{type:[Number],default:5}}},vi={class:"cv-upload-tip-box"},yi={key:0},ki={key:1},lo={inheritAttrs:!1,emits:["update:modelValue","update:initValue","delete","error","success"],components:{uploadTip:v(Ci,[["render",function(t,o,a,i,l,n){return e.openBlock(),e.createElementBlock("div",vi,[o[0]||(o[0]=e.createElementVNode("span",null,"最多上传",-1)),e.createElementVNode("b",null,e.toDisplayString(a.limit),1),e.createElementVNode("span",null,e.toDisplayString(a.fileUnit),1),a.fileType.length?(e.openBlock(),e.createElementBlock("b",yi,e.toDisplayString(a.fileType.length?a.fileType.join("/"):""),1)):e.createCommentVNode("",!0),a.fileType.length?(e.openBlock(),e.createElementBlock("span",ki,"格式")):e.createCommentVNode("",!0),e.createElementVNode("span",null,"文件;且每"+e.toDisplayString(a.fileUnit)+"不超过",1),e.createElementVNode("b",null,e.toDisplayString(a.fileSize)+"MB",1)])}]])},mixins:[Pl],props:{multiple:{type:[Boolean],default:!1},limit:{type:[Number,String],default:1},drag:{type:Boolean,default:!1},httpRequest:{type:[Function],default:()=>{}},accept:String,beforeRemove:Function,upResponseFn:{type:[Function],default:null},signatureFn:{type:Function,default:null},signatureType:{type:[String],default:"aliyun_oss_type2"},signatureParam:{type:[Object],default:()=>({})}},data:()=>({cropShow:!1,upIngPercent:0,upIngLoading:!1,upIngFileInfo:{}}),computed:{fileTypeStr(){return this.fileType.join(",")},tipAttr(){return{fileType:this.fileType||[],fileSize:this.fileSize||"",multiple:this?.multiple||!1,limit:this.limit?parseInt(this.limit):5}},mergeAttrs(){let t=this._mergeAttrs("upload");return this.$props.signatureType&&(t.signatureType=this.$props.signatureType),this.$props.signatureFn&&(t.signatureFn=this.$props.signatureFn),this.$props.signatureParam&&(t.signatureParam=this.$props.signatureParam),typeof t.upResponseFn!="function"&&(t.upResponseFn=null),Object.assign({},t,this.$attrs)}},methods:{_commonBeforeUpload(t){t.type;const o=t.name||"";t.size;const a=o.split(".").pop().toLowerCase(),i=this.fileType.join("、");return this.fileType.includes(a)?!(t>this.fileSize)||(ExtendMessage.error(`文件大小不能超过 ${this.fileSize} MB`),!1):(ExtendMessage.error(`文件格式错误,请上传类型 如:${i}格式文件`),!1)},_commonRemove(){return new Promise((t,o)=>{this.$confirm("提示",{title:"确定删除??",showCancelButton:!0,confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(()=>{t(!0)}).catch(()=>{o(!1)})})},initHttpRequest(){},initOnProgress(t){this.upIngPercent=Number(t.percentage.toFixed(0))},initOnSuccess(t,o){},initOnExceed(){this.$message.error(`最多上传${this.limit}个文件`)}}};function Xo(t){let o=[],a=Object.prototype.toString.call(t);if(a==="[object String]")o.push(sa(t));else if(a==="[object Object]")t.name&&t.url&&o.push(t);else if(a==="[object Array]")for(let i in t){let l=t[i],n=Object.prototype.toString.call(l);n==="[object String]"?o.push(sa(l)):n==="[object Object]"&&l.name&&l.url&&o.push(l)}return o}function sa(t){let o=t.lastIndexOf("/"),a=t.substring(o+1,t.length),i="";return a.lastIndexOf(".")>-1&&(i=a.slice(a.lastIndexOf(".")+1),i="image/"+i),{name:a,url:t,type:i,status:"success"}}function F(t){return Math.pow(1024,t)}function ca(t){return t?t<F(1)?t+" B":t<F(2)?(t/F(1)).toFixed(2)+" KB":t<F(3)?(t/F(2)).toFixed(2)+" MB":t<F(4)?(t/F(3)).toFixed(2)+" GB":(t/F(4)).toFixed(2)+" TB":"-"}function bi(t){if(!t)return!0;const o=t?.expiration_last;if(!o)return!0;const a=(function(l){if(/^\d{8}T\d{6}Z$/.test(l)){const n=l.replace(/^(\d{4})(\d{2})(\d{2})T(\d{2})(\d{2})(\d{2})Z$/,"$1-$2-$3T$4:$5:$6Z");return new Date(n)}return/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(Z|([+-]\d{2}:\d{2}))?$/.test(l)?new Date(l):/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/.test(l)?new Date(l.replace(" ","T")):new Date(l)})(o),i=new Date;return!!isNaN(a.getTime())||a.getTime()-i.getTime()<=6e4}async function da(t,o){if(!t||typeof t!="function")return!1;let a=null;if(bi(a)){let i=await t({...o});if(!i||!i.data||i.status!=200)throw k.ElMessage.error("获取STS令牌失败"),new Error(`获取STS令牌失败 ${i?.message}`);a=i.data||{}}return{...a,pass:!!a}}async function pa(t,o,a,i){t=t||"aliyun_oss_type2",i=i||{};const l=await da(o,{upload_type:t,...a});if(!l.pass)return k.ElMessage.error("获取oss上传凭证异常");if(t=="oss_upload1"){const n={bucket:l.bucket,region:l.endpoint.split(".")[0],accessKeyId:l.accessKeyId,accessKeySecret:l.accessKeySecret,stsToken:l.securityToken,expiration:l.expiration,...i,refreshSTSToken:async()=>{const r=await da(o);return{accessKeyId:r.accessKeyId,accessKeySecret:r.accessKeySecret,stsToken:r.securityToken}},refreshSTSTokenInterval:new Date(l.expiration)-new Date-6e4};return new OSS(n)}if(t=="aliyun_oss_type2")return l;throw new Error("上传类型错误")}async function Al(t,o,a){let i=new FormData;i.append("success_action_status",o.success_action_status||"200"),i.append("policy",o.policy),i.append("signature",o.signature),i.append("x-oss-signature",o.signature),i.append("x-oss-signature-version","OSS4-HMAC-SHA256"),i.append("x-oss-credential",o.x_oss_credential),i.append("x-oss-date",o.x_oss_date),i.append("x-oss-security-token",o.security_token);let l=o.key;if(o.key||(l=o.dir+"/"+t.name),i.append("key",l),o.callback&&i.append("callback",o.callback),o.callback_var&&to(o.callback_var))for(const n in o.callback_var)o.callback_var.hasOwnProperty(n)&&i.append(n,o.callback_var[n]);return i.append("file",t),fetch(o.host,{method:"POST",body:i,headers:{}}).then(n=>{if(n.ok)return n.json()}).then(n=>{if(n&&n.success)return n.data}).catch(n=>{})}async function Ko(t,o,a,i){if(!a||typeof a!="function")return k.ElMessage.error("签名方法错误"),Promise.reject();try{let l=(function(){const d=new Date;return[d.getFullYear(),String(d.getMonth()+1).padStart(2,"0"),String(d.getDate()).padStart(2,"0"),String(d.getHours()).padStart(2,"0"),String(d.getMinutes()).padStart(2,"0"),String(d.getSeconds()).padStart(2,"0")].join("")+Math.random().toString(36).substring(2,10)})(),n=(function(d){if(!d)return"jpg";const p=d.toLowerCase().trim();return Ml.mimeToExtension[p]||"jpg"})(t.type),r=`${l}.${n}`;const c=await a({upload_type:o,...i,save_extension:n}).then(d=>d.data||{}).catch(d=>(k.ElMessage.error("签名失败"),Promise.reject()));if(!c)return Promise.reject();if(c.name&&(r=`${c.name}.${n}`),t instanceof Blob&&(t=new File([t],r,{type:t.type,lastModified:Date.now()})),t)return await Al(t,c)}catch{return Promise.reject()}}const jl={};jl.getData=t=>new Promise((o,a)=>{let i={};(function(l){let n=null;return new Promise((r,c)=>{if(l.src)if(/^data\:/i.test(l.src))n=(function(h,u){u=u||h.match(/^data\:([^\;]+)\;base64,/im)[1]||"",h=h.replace(/^data\:([^\;]+)\;base64,/gim,"");for(var m=atob(h),f=m.length%2==0?m.length:m.length+1,C=new ArrayBuffer(f),g=new Uint16Array(C),y=0;y<f;y++)g[y]=m.charCodeAt(y);return C})(l.src),r(n);else if(/^blob\:/i.test(l.src)){var d=new FileReader;d.onload=function(h){n=h.target.result,r(n)},(function(h,u){var m=new XMLHttpRequest;m.open("GET",h,!0),m.responseType="blob",m.onload=function(f){(this.status==200||this.status===0)&&u(this.response)},m.send()})(l.src,function(h){d.readAsArrayBuffer(h)})}else{var p=new XMLHttpRequest;p.onload=function(){if(this.status!=200&&this.status!==0)throw"Could not load image";n=p.response,r(n),p=null},p.open("GET",l.src,!0),p.responseType="arraybuffer",p.send(null)}else c("img error")})})(t).then(l=>{i.arrayBuffer=l;try{i.orientation=(function(n){var r,c,d,p,h,u,m,f,C,g,y=new DataView(n),b=y.byteLength;if(y.getUint8(0)===255&&y.getUint8(1)===216)for(C=2;C<b;){if(y.getUint8(C)===255&&y.getUint8(C+1)===225){m=C;break}C++}if(m&&(c=m+4,d=m+10,(function(w,V,N){var E,L="";for(E=V,N+=V;E<N;E++)L+=String.fromCharCode(w.getUint8(E));return L})(y,c,4)==="Exif"&&(u=y.getUint16(d),((h=u===18761)||u===19789)&&y.getUint16(d+2,h)===42&&(p=y.getUint32(d+4,h),p>=8&&(f=d+p)))),f){for(b=y.getUint16(f,h),g=0;g<b;g++)if(C=f+12*g+2,y.getUint16(C,h)===274){C+=8,r=y.getUint16(C,h);break}}return r})(l)}catch{i.orientation=-1}o(i)}).catch(l=>{a(l)})});const wi=(t,o)=>{const a=t.__vccOpts||t;for(const[i,l]of o)a[i]=l;return a},Vi=e.defineComponent({data:function(){return{w:0,h:0,scale:1,x:0,y:0,loading:!0,trueWidth:0,trueHeight:0,move:!0,moveX:0,moveY:0,crop:!1,cropping:!1,cropW:0,cropH:0,cropOldW:0,cropOldH:0,canChangeX:!1,canChangeY:!1,changeCropTypeX:1,changeCropTypeY:1,cropX:0,cropY:0,cropChangeX:0,cropChangeY:0,cropOffsertX:0,cropOffsertY:0,support:"",touches:[],touchNow:!1,rotate:0,isIos:!1,orientation:0,imgs:"",coe:.2,scaling:!1,scalingSet:"",coeStatus:"",isCanShow:!0,imgIsQqualCrop:!1}},props:{img:{type:[String,Blob,null,File],default:""},outputSize:{type:Number,default:1},outputType:{type:String,default:"jpeg"},info:{type:Boolean,default:!0},canScale:{type:Boolean,default:!0},autoCrop:{type:Boolean,default:!1},autoCropWidth:{type:[Number,String],default:0},autoCropHeight:{type:[Number,String],default:0},fixed:{type:Boolean,default:!1},fixedNumber:{type:Array,default:()=>[1,1]},fixedBox:{type:Boolean,default:!1},full:{type:Boolean,default:!1},canMove:{type:Boolean,default:!0},canMoveBox:{type:Boolean,default:!0},original:{type:Boolean,default:!1},centerBox:{type:Boolean,default:!1},high:{type:Boolean,default:!0},infoTrue:{type:Boolean,default:!1},maxImgSize:{type:[Number,String],default:2e3},enlarge:{type:[Number,String],default:1},preW:{type:[Number,String],default:0},mode:{type:String,default:"contain"},limitMinSize:{type:[Number,Array,String],default:()=>10,validator:function(t){return Array.isArray(t)?Number(t[0])>=0&&Number(t[1])>=0:Number(t)>=0}},fillColor:{type:String,default:""}},computed:{cropInfo(){let t={};if(t.top=this.cropOffsertY>21?"-21px":"0px",t.width=this.cropW>0?this.cropW:0,t.height=this.cropH>0?this.cropH:0,this.infoTrue){let o=1;this.high&&!this.full&&(o=window.devicePixelRatio),this.enlarge!==1&!this.full&&(o=Math.abs(Number(this.enlarge))),t.width=t.width*o,t.height=t.height*o,this.full&&(t.width=t.width/this.scale,t.height=t.height/this.scale)}return t.width=t.width.toFixed(0),t.height=t.height.toFixed(0),t},isIE:()=>!!window.ActiveXObject||"ActiveXObject"in window,passive(){return this.isIE?null:{passive:!1}},isRotateRightOrLeft(){return[1,-1,3,-3].includes(this.rotate)}},watch:{img(){this.checkedImg()},imgs(t){t!==""&&this.reload()},cropW(){this.showPreview()},cropH(){this.showPreview()},cropOffsertX(){this.showPreview()},cropOffsertY(){this.showPreview()},scale(t,o){this.showPreview()},x(){this.showPreview()},y(){this.showPreview()},autoCrop(t){t&&this.goAutoCrop()},autoCropWidth(){this.autoCrop&&this.goAutoCrop()},autoCropHeight(){this.autoCrop&&this.goAutoCrop()},mode(){this.checkedImg()},rotate(){this.showPreview(),(this.autoCrop||this.cropW>0||this.cropH>0)&&this.goAutoCrop(this.cropW,this.cropH)}},methods:{getVersion(t){var o=navigator.userAgent.split(" "),a="";let i=0;const l=new RegExp(t,"i");for(var n=0;n<o.length;n++)l.test(o[n])&&(a=o[n]);return i=a?a.split("/")[1].split("."):["0","0","0"],i},checkOrientationImage(t,o,a,i){if(this.getVersion("chrome")[0]>=81)o=-1;else if(this.getVersion("safari")[0]>=605){const r=this.getVersion("version");r[0]>13&&r[1]>1&&(o=-1)}else{const r=navigator.userAgent.toLowerCase().match(/cpu iphone os (.*?) like mac os/);if(r){let c=r[1];c=c.split("_"),(c[0]>13||c[0]>=13&&c[1]>=4)&&(o=-1)}}let l=document.createElement("canvas"),n=l.getContext("2d");switch(n.save(),o){case 2:l.width=a,l.height=i,n.translate(a,0),n.scale(-1,1);break;case 3:l.width=a,l.height=i,n.translate(a/2,i/2),n.rotate(180*Math.PI/180),n.translate(-a/2,-i/2);break;case 4:l.width=a,l.height=i,n.translate(0,i),n.scale(1,-1);break;case 5:l.height=a,l.width=i,n.rotate(.5*Math.PI),n.scale(1,-1);break;case 6:l.width=i,l.height=a,n.translate(i/2,a/2),n.rotate(90*Math.PI/180),n.translate(-a/2,-i/2);break;case 7:l.height=a,l.width=i,n.rotate(.5*Math.PI),n.translate(a,-i),n.scale(-1,1);break;case 8:l.height=a,l.width=i,n.translate(i/2,a/2),n.rotate(-90*Math.PI/180),n.translate(-a/2,-i/2);break;default:l.width=a,l.height=i}n.drawImage(t,0,0,a,i),n.restore(),l.toBlob(r=>{let c=URL.createObjectURL(r);URL.revokeObjectURL(this.imgs),this.imgs=c},"image/"+this.outputType,1)},checkedImg(){if(this.img===null||this.img==="")return this.imgs="",void this.clearCrop();this.loading=!0,this.scale=1,this.rotate=0,this.imgIsQqualCrop=!1,this.clearCrop();let t=new Image;if(t.onload=()=>{if(this.img==="")return this.$emit("img-load",new Error("图片不能为空")),!1;let a=t.width,i=t.height;jl.getData(t).then(l=>{this.orientation=l.orientation||1;let n=Number(this.maxImgSize);!this.orientation&&a<n&i<n?this.imgs=this.img:(a>n&&(i=i/a*n,a=n),i>n&&(a=a/i*n,i=n),this.checkOrientationImage(t,this.orientation,a,i))}).catch(l=>{this.$emit("img-load","error"),this.$emit("img-load-error",l)})},t.onerror=a=>{this.$emit("img-load","error"),this.$emit("img-load-error",a)},this.img.substr(0,4)!=="data"&&(t.crossOrigin=""),this.isIE){var o=new XMLHttpRequest;o.onload=function(){var a=URL.createObjectURL(this.response);t.src=a},o.open("GET",this.img,!0),o.responseType="blob",o.send()}else t.src=this.img},startMove(t){if(t.preventDefault(),this.move&&!this.crop){if(!this.canMove)return!1;this.moveX=("clientX"in t?t.clientX:t.touches[0].clientX)-this.x,this.moveY=("clientY"in t?t.clientY:t.touches[0].clientY)-this.y,t.touches?(window.addEventListener("touchmove",this.moveImg),window.addEventListener("touchend",this.leaveImg),t.touches.length==2&&(this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale))):(window.addEventListener("mousemove",this.moveImg),window.addEventListener("mouseup",this.leaveImg)),this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})}else this.cropping=!0,window.addEventListener("mousemove",this.createCrop),window.addEventListener("mouseup",this.endCrop),window.addEventListener("touchmove",this.createCrop),window.addEventListener("touchend",this.endCrop),this.cropOffsertX=t.offsetX?t.offsetX:t.touches[0].pageX-this.$refs.cropper.offsetLeft,this.cropOffsertY=t.offsetY?t.offsetY:t.touches[0].pageY-this.$refs.cropper.offsetTop,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.cropW=0,this.cropH=0},touchScale(t){t.preventDefault();let o=this.scale;var a=this.touches[0].clientX,i=this.touches[0].clientY,l=t.touches[0].clientX,n=t.touches[0].clientY,r=this.touches[1].clientX,c=this.touches[1].clientY,d=t.touches[1].clientX,p=t.touches[1].clientY,h=Math.sqrt(Math.pow(a-r,2)+Math.pow(i-c,2)),u=Math.sqrt(Math.pow(l-d,2)+Math.pow(n-p,2))-h,m=1,f=(m=(m=m/this.trueWidth>m/this.trueHeight?m/this.trueHeight:m/this.trueWidth)>.1?.1:m)*u;if(!this.touchNow){if(this.touchNow=!0,u>0?o+=Math.abs(f):u<0&&o>Math.abs(f)&&(o-=Math.abs(f)),this.touches=t.touches,setTimeout(()=>{this.touchNow=!1},8),!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o}},cancelTouchScale(t){window.removeEventListener("touchmove",this.touchScale)},moveImg(t){if(t.preventDefault(),t.touches&&t.touches.length===2)return this.touches=t.touches,window.addEventListener("touchmove",this.touchScale),window.addEventListener("touchend",this.cancelTouchScale),window.removeEventListener("touchmove",this.moveImg),!1;let o,a,i="clientX"in t?t.clientX:t.touches[0].clientX,l="clientY"in t?t.clientY:t.touches[0].clientY;o=i-this.moveX,a=l-this.moveY,this.$nextTick(()=>{if(this.centerBox){let n,r,c,d,p=this.getImgAxis(o,a,this.scale),h=this.getCropAxis(),u=this.trueHeight*this.scale,m=this.trueWidth*this.scale;switch(this.rotate){case 1:case-1:case 3:case-3:n=this.cropOffsertX-this.trueWidth*(1-this.scale)/2+(u-m)/2,r=this.cropOffsertY-this.trueHeight*(1-this.scale)/2+(m-u)/2,c=n-u+this.cropW,d=r-m+this.cropH;break;default:n=this.cropOffsertX-this.trueWidth*(1-this.scale)/2,r=this.cropOffsertY-this.trueHeight*(1-this.scale)/2,c=n-m+this.cropW,d=r-u+this.cropH}p.x1>=h.x1&&(o=n),p.y1>=h.y1&&(a=r),p.x2<=h.x2&&(o=c),p.y2<=h.y2&&(a=d)}this.x=o,this.y=a,this.$emit("img-moving",{moving:!0,axis:this.getImgAxis()})})},leaveImg(t){window.removeEventListener("mousemove",this.moveImg),window.removeEventListener("touchmove",this.moveImg),window.removeEventListener("mouseup",this.leaveImg),window.removeEventListener("touchend",this.leaveImg),this.$emit("img-moving",{moving:!1,axis:this.getImgAxis()})},scaleImg(){this.canScale&&window.addEventListener(this.support,this.changeSize,this.passive)},cancelScale(){this.canScale&&window.removeEventListener(this.support,this.changeSize)},changeSize(t){t.preventDefault();let o=this.scale;var a=t.deltaY||t.wheelDelta;a=navigator.userAgent.indexOf("Firefox")>0?30*a:a,this.isIE&&(a=-a);var i=this.coe,l=(i=i/this.trueWidth>i/this.trueHeight?i/this.trueHeight:i/this.trueWidth)*a;l<0?o+=Math.abs(l):o>Math.abs(l)&&(o-=Math.abs(l));let n=l<0?"add":"reduce";if(n!==this.coeStatus&&(this.coeStatus=n,this.coe=.2),this.scaling||(this.scalingSet=setTimeout(()=>{this.scaling=!1,this.coe=this.coe+=.01},50)),this.scaling=!0,!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o},changeScale(t){let o=this.scale;t=t||1;var a=20;if((t*=a=a/this.trueWidth>a/this.trueHeight?a/this.trueHeight:a/this.trueWidth)>0?o+=Math.abs(t):o>Math.abs(t)&&(o-=Math.abs(t)),!this.checkoutImgAxis(this.x,this.y,o))return!1;this.scale=o},createCrop(t){t.preventDefault();var o="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,a="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;this.$nextTick(()=>{var i=o-this.cropX,l=a-this.cropY;if(i>0?(this.cropW=i+this.cropChangeX>this.w?this.w-this.cropChangeX:i,this.cropOffsertX=this.cropChangeX):(this.cropW=this.w-this.cropChangeX+Math.abs(i)>this.w?this.cropChangeX:Math.abs(i),this.cropOffsertX=this.cropChangeX+i>0?this.cropChangeX+i:0),this.fixed){var n=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];n+this.cropOffsertY>this.h?(this.cropH=this.h-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],this.cropOffsertX=i>0?this.cropChangeX:this.cropChangeX-this.cropW):this.cropH=n,this.cropOffsertY=this.cropOffsertY}else l>0?(this.cropH=l+this.cropChangeY>this.h?this.h-this.cropChangeY:l,this.cropOffsertY=this.cropChangeY):(this.cropH=this.h-this.cropChangeY+Math.abs(l)>this.h?this.cropChangeY:Math.abs(l),this.cropOffsertY=this.cropChangeY+l>0?this.cropChangeY+l:0)})},changeCropSize(t,o,a,i,l){t.preventDefault(),window.addEventListener("mousemove",this.changeCropNow),window.addEventListener("mouseup",this.changeCropEnd),window.addEventListener("touchmove",this.changeCropNow),window.addEventListener("touchend",this.changeCropEnd),this.canChangeX=o,this.canChangeY=a,this.changeCropTypeX=i,this.changeCropTypeY=l,this.cropX="clientX"in t?t.clientX:t.touches[0].clientX,this.cropY="clientY"in t?t.clientY:t.touches[0].clientY,this.cropOldW=this.cropW,this.cropOldH=this.cropH,this.cropChangeX=this.cropOffsertX,this.cropChangeY=this.cropOffsertY,this.fixed&&this.canChangeX&&this.canChangeY&&(this.canChangeY=0),this.$emit("change-crop-size",{width:this.cropW,height:this.cropH})},changeCropNow(t){t.preventDefault();var o="clientX"in t?t.clientX:t.touches?t.touches[0].clientX:0,a="clientY"in t?t.clientY:t.touches?t.touches[0].clientY:0;let i=this.w,l=this.h,n=0,r=0;if(this.centerBox){let p=this.getImgAxis(),h=p.x2,u=p.y2;n=p.x1>0?p.x1:0,r=p.y1>0?p.y1:0,i>h&&(i=h),l>u&&(l=u)}const[c,d]=this.checkCropLimitSize();this.$nextTick(()=>{var p=o-this.cropX,h=a-this.cropY;if(this.canChangeX&&(this.changeCropTypeX===1?this.cropOldW-p<c?(this.cropW=c,this.cropOffsertX=this.cropOldW+this.cropChangeX-n-c):this.cropOldW-p>0?(this.cropW=i-this.cropChangeX-p<=i-n?this.cropOldW-p:this.cropOldW+this.cropChangeX-n,this.cropOffsertX=i-this.cropChangeX-p<=i-n?this.cropChangeX+p:n):(this.cropW=Math.abs(p)+this.cropChangeX<=i?Math.abs(p)-this.cropOldW:i-this.cropOldW-this.cropChangeX,this.cropOffsertX=this.cropChangeX+this.cropOldW):this.changeCropTypeX===2&&(this.cropOldW+p<c?this.cropW=c:this.cropOldW+p>0?(this.cropW=this.cropOldW+p+this.cropOffsertX<=i?this.cropOldW+p:i-this.cropOffsertX,this.cropOffsertX=this.cropChangeX):(this.cropW=i-this.cropChangeX+Math.abs(p+this.cropOldW)<=i-n?Math.abs(p+this.cropOldW):this.cropChangeX-n,this.cropOffsertX=i-this.cropChangeX+Math.abs(p+this.cropOldW)<=i-n?this.cropChangeX-Math.abs(p+this.cropOldW):n))),this.canChangeY&&(this.changeCropTypeY===1?this.cropOldH-h<d?(this.cropH=d,this.cropOffsertY=this.cropOldH+this.cropChangeY-r-d):this.cropOldH-h>0?(this.cropH=l-this.cropChangeY-h<=l-r?this.cropOldH-h:this.cropOldH+this.cropChangeY-r,this.cropOffsertY=l-this.cropChangeY-h<=l-r?this.cropChangeY+h:r):(this.cropH=Math.abs(h)+this.cropChangeY<=l?Math.abs(h)-this.cropOldH:l-this.cropOldH-this.cropChangeY,this.cropOffsertY=this.cropChangeY+this.cropOldH):this.changeCropTypeY===2&&(this.cropOldH+h<d?this.cropH=d:this.cropOldH+h>0?(this.cropH=this.cropOldH+h+this.cropOffsertY<=l?this.cropOldH+h:l-this.cropOffsertY,this.cropOffsertY=this.cropChangeY):(this.cropH=l-this.cropChangeY+Math.abs(h+this.cropOldH)<=l-r?Math.abs(h+this.cropOldH):this.cropChangeY-r,this.cropOffsertY=l-this.cropChangeY+Math.abs(h+this.cropOldH)<=l-r?this.cropChangeY-Math.abs(h+this.cropOldH):r))),this.canChangeX&&this.fixed){var u=this.cropW/this.fixedNumber[0]*this.fixedNumber[1];u<d?(this.cropH=d,this.cropW=this.fixedNumber[0]*d/this.fixedNumber[1],this.changeCropTypeX===1&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):u+this.cropOffsertY>l?(this.cropH=l-this.cropOffsertY,this.cropW=this.cropH/this.fixedNumber[1]*this.fixedNumber[0],this.changeCropTypeX===1&&(this.cropOffsertX=this.cropChangeX+(this.cropOldW-this.cropW))):this.cropH=u}if(this.canChangeY&&this.fixed){var m=this.cropH/this.fixedNumber[1]*this.fixedNumber[0];m<c?(this.cropW=c,this.cropH=this.fixedNumber[1]*c/this.fixedNumber[0],this.cropOffsertY=this.cropOldH+this.cropChangeY-this.cropH):m+this.cropOffsertX>i?(this.cropW=i-this.cropOffsertX,this.cropH=this.cropW/this.fixedNumber[0]*this.fixedNumber[1]):this.cropW=m}})},checkCropLimitSize(){let{cropW:t,cropH:o,limitMinSize:a}=this,i=new Array;return i=Array.isArray(a)?a:[a,a],t=parseFloat(i[0]),o=parseFloat(i[1]),[t,o]},changeCropEnd(t){window.removeEventListener("mousemove",this.changeCropNow),window.removeEventListener("mouseup",this.changeCropEnd),window.removeEventListener("touchmove",this.changeCropNow),window.removeEventListener("touchend",this.changeCropEnd)},calculateSize(t,o,a,i,l,n){const r=t/o;let c=l,d=n;return c<a&&(c=a,d=Math.ceil(c/r)),d<i&&(d=i,c=Math.ceil(d*r),c<a&&(c=a,d=Math.ceil(c/r))),c<l&&(c=l,d=Math.ceil(c/r)),d<n&&(d=n,c=Math.ceil(d*r)),{width:c,height:d}},endCrop(){this.cropW===0&&this.cropH===0&&(this.cropping=!1);let[t,o]=this.checkCropLimitSize();const{width:a,height:i}=this.fixed?this.calculateSize(this.fixedNumber[0],this.fixedNumber[1],t,o,this.cropW,this.cropH):{width:t,height:o};a>this.cropW&&(this.cropW=a,this.cropOffsertX+a>this.w&&(this.cropOffsertX=this.w-a)),i>this.cropH&&(this.cropH=i,this.cropOffsertY+i>this.h&&(this.cropOffsertY=this.h-i)),window.removeEventListener("mousemove",this.createCrop),window.removeEventListener("mouseup",this.endCrop),window.removeEventListener("touchmove",this.createCrop),window.removeEventListener("touchend",this.endCrop)},startCrop(){this.crop=!0},stopCrop(){this.crop=!1},clearCrop(){this.cropping=!1,this.cropW=0,this.cropH=0},cropMove(t){if(t.preventDefault(),!this.canMoveBox)return this.crop=!1,this.startMove(t),!1;if(t.touches&&t.touches.length===2)return this.crop=!1,this.startMove(t),this.leaveCrop(),!1;window.addEventListener("mousemove",this.moveCrop),window.addEventListener("mouseup",this.leaveCrop),window.addEventListener("touchmove",this.moveCrop),window.addEventListener("touchend",this.leaveCrop);let o,a,i="clientX"in t?t.clientX:t.touches[0].clientX,l="clientY"in t?t.clientY:t.touches[0].clientY;o=i-this.cropOffsertX,a=l-this.cropOffsertY,this.cropX=o,this.cropY=a,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})},moveCrop(t,o){let a=0,i=0;t&&(t.preventDefault(),a="clientX"in t?t.clientX:t.touches[0].clientX,i="clientY"in t?t.clientY:t.touches[0].clientY),this.$nextTick(()=>{let l,n,r=a-this.cropX,c=i-this.cropY;if(o&&(r=this.cropOffsertX,c=this.cropOffsertY),l=r<=0?0:r+this.cropW>this.w?this.w-this.cropW:r,n=c<=0?0:c+this.cropH>this.h?this.h-this.cropH:c,this.centerBox){let d=this.getImgAxis();l<=d.x1&&(l=d.x1),l+this.cropW>d.x2&&(l=d.x2-this.cropW),n<=d.y1&&(n=d.y1),n+this.cropH>d.y2&&(n=d.y2-this.cropH)}this.cropOffsertX=l,this.cropOffsertY=n,this.$emit("crop-moving",{moving:!0,axis:this.getCropAxis()})})},getImgAxis(t,o,a){t=t||this.x,o=o||this.y,a=a||this.scale;let i={x1:0,x2:0,y1:0,y2:0},l=this.trueWidth*a,n=this.trueHeight*a;switch(this.rotate){case 0:i.x1=t+this.trueWidth*(1-a)/2,i.x2=i.x1+this.trueWidth*a,i.y1=o+this.trueHeight*(1-a)/2,i.y2=i.y1+this.trueHeight*a;break;case 1:case-1:case 3:case-3:i.x1=t+this.trueWidth*(1-a)/2+(l-n)/2,i.x2=i.x1+this.trueHeight*a,i.y1=o+this.trueHeight*(1-a)/2+(n-l)/2,i.y2=i.y1+this.trueWidth*a;break;default:i.x1=t+this.trueWidth*(1-a)/2,i.x2=i.x1+this.trueWidth*a,i.y1=o+this.trueHeight*(1-a)/2,i.y2=i.y1+this.trueHeight*a}return i},getCropAxis(){let t={x1:0,x2:0,y1:0,y2:0};return t.x1=this.cropOffsertX,t.x2=t.x1+this.cropW,t.y1=this.cropOffsertY,t.y2=t.y1+this.cropH,t},leaveCrop(t){window.removeEventListener("mousemove",this.moveCrop),window.removeEventListener("mouseup",this.leaveCrop),window.removeEventListener("touchmove",this.moveCrop),window.removeEventListener("touchend",this.leaveCrop),this.$emit("crop-moving",{moving:!1,axis:this.getCropAxis()})},getCropChecked(t){let o=document.createElement("canvas"),a=o.getContext("2d"),i=new Image,l=this.rotate,n=this.trueWidth,r=this.trueHeight,c=this.cropOffsertX,d=this.cropOffsertY;i.onload=()=>{if(this.cropW!==0){let u=1;this.high&!this.full&&(u=window.devicePixelRatio),this.enlarge!==1&!this.full&&(u=Math.abs(Number(this.enlarge)));let m=this.cropW*u,f=this.cropH*u,C=n*this.scale*u,g=r*this.scale*u,y=(this.x-c+this.trueWidth*(1-this.scale)/2)*u,b=(this.y-d+this.trueHeight*(1-this.scale)/2)*u;switch(h(m,f),a.save(),l){case 0:this.full?(h(m/this.scale,f/this.scale),a.drawImage(i,y/this.scale,b/this.scale,C/this.scale,g/this.scale)):a.drawImage(i,y,b,C,g);break;case 1:case-3:this.full?(h(m/this.scale,f/this.scale),y=y/this.scale+(C/this.scale-g/this.scale)/2,b=b/this.scale+(g/this.scale-C/this.scale)/2,a.rotate(90*l*Math.PI/180),a.drawImage(i,b,-y-g/this.scale,C/this.scale,g/this.scale)):(y+=(C-g)/2,b+=(g-C)/2,a.rotate(90*l*Math.PI/180),a.drawImage(i,b,-y-g,C,g));break;case 2:case-2:this.full?(h(m/this.scale,f/this.scale),a.rotate(90*l*Math.PI/180),y/=this.scale,b/=this.scale,a.drawImage(i,-y-C/this.scale,-b-g/this.scale,C/this.scale,g/this.scale)):(a.rotate(90*l*Math.PI/180),a.drawImage(i,-y-C,-b-g,C,g));break;case 3:case-1:this.full?(h(m/this.scale,f/this.scale),y=y/this.scale+(C/this.scale-g/this.scale)/2,b=b/this.scale+(g/this.scale-C/this.scale)/2,a.rotate(90*l*Math.PI/180),a.drawImage(i,-b-C/this.scale,y,C/this.scale,g/this.scale)):(y+=(C-g)/2,b+=(g-C)/2,a.rotate(90*l*Math.PI/180),a.drawImage(i,-b-C,y,C,g));break;default:this.full?(h(m/this.scale,f/this.scale),a.drawImage(i,y/this.scale,b/this.scale,C/this.scale,g/this.scale)):a.drawImage(i,y,b,C,g)}a.restore()}else{let u=n*this.scale,m=r*this.scale;switch(a.save(),l){case 0:h(u,m),a.drawImage(i,0,0,u,m);break;case 1:case-3:h(m,u),a.rotate(90*l*Math.PI/180),a.drawImage(i,0,-m,u,m);break;case 2:case-2:h(u,m),a.rotate(90*l*Math.PI/180),a.drawImage(i,-u,-m,u,m);break;case 3:case-1:h(m,u),a.rotate(90*l*Math.PI/180),a.drawImage(i,-u,0,u,m);break;default:h(u,m),a.drawImage(i,0,0,u,m)}a.restore()}t(o)},this.img.substr(0,4)!=="data"&&(i.crossOrigin="Anonymous"),i.src=this.imgs;const p=this.fillColor;function h(u,m){o.width=Math.round(u),o.height=Math.round(m),p&&(a.fillStyle=p,a.fillRect(0,0,o.width,o.height))}},getCropData(t){this.getCropChecked(o=>{t(o.toDataURL("image/"+this.outputType,this.outputSize))})},getCropBlob(t){this.getCropChecked(o=>{o.toBlob(a=>t(a),"image/"+this.outputType,this.outputSize)})},showPreview(){if(!this.isCanShow)return!1;this.isCanShow=!1,setTimeout(()=>{this.isCanShow=!0},16);let t=this.cropW,o=this.cropH,a=this.scale;var i={};i.div={width:`${t}px`,height:`${o}px`};let l=(this.x-this.cropOffsertX)/a,n=(this.y-this.cropOffsertY)/a;i.w=t,i.h=o,i.url=this.imgs,i.img={width:`${this.trueWidth}px`,height:`${this.trueHeight}px`,transform:`scale(${a})translate3d(${l}px, ${n}px, 0px)rotateZ(${90*this.rotate}deg)`},i.html=`
|
|
2
2
|
<div class="show-preview" style="width: ${i.w}px; height: ${i.h}px,; overflow: hidden">
|
|
3
3
|
<div style="width: ${t}px; height: ${o}px">
|
|
4
4
|
<img src=${i.url} style="width: ${this.trueWidth}px; height: ${this.trueHeight}px; transform:
|
package/lib/cv-ui.js
CHANGED
|
@@ -62,7 +62,7 @@ const at = S({ name: "cvBtnBase", emits: ["click"], props: { ...Fe.props, autoLo
|
|
|
62
62
|
}
|
|
63
63
|
} } }, [["render", function(e, t, o, l, a, i) {
|
|
64
64
|
const n = C("cv-mask-svg"), c = C("el-button");
|
|
65
|
-
return e.$slots.default || i.hasDefaultContent ? (d(), V(c, O({ key: 0, class: "cv-btn" }, i.filteredProps, { loading: a.loadingStatus, onClick: i.handleClick }), le({ default: v(() => [L(e.$slots, "default")]), _: 2 }, [o.svg ? { name: "icon", fn: v(() => [y(n, { name: o.svg, size: "14", color: "
|
|
65
|
+
return e.$slots.default || i.hasDefaultContent ? (d(), V(c, O({ key: 0, class: "cv-btn" }, i.filteredProps, { loading: a.loadingStatus, onClick: i.handleClick }), le({ default: v(() => [L(e.$slots, "default")]), _: 2 }, [o.svg ? { name: "icon", fn: v(() => [y(n, { name: o.svg, size: "14", color: "currentColor" }, null, 8, ["name"])]), key: "0" } : void 0]), 1040, ["loading", "onClick"])) : (d(), V(c, O({ key: 1, class: "cv-btn" }, i.filteredProps, { loading: a.loadingStatus, onClick: i.handleClick }), le({ _: 2 }, [o.svg ? { name: "icon", fn: v(() => [y(n, { name: o.svg, size: "14", color: "currentColor" }, null, 8, ["name"])]), key: "0" } : void 0]), 1040, ["loading", "onClick"]));
|
|
66
66
|
}]]), it = S({ name: "cvBtnText", emits: ["click"], props: { ...Fe.props, autoLoading: { type: Boolean, default: !1 } }, data: () => ({ loadingStatus: !1 }), methods: { handleClick() {
|
|
67
67
|
this.autoLoading && (this.loadingStatus = !0), this.$emit("click", () => {
|
|
68
68
|
this.loadingStatus = !1;
|