diff --git a/es/upload/index.js b/es/upload/index.js index 1d3e96b..bee3f33 100644 --- a/es/upload/index.js +++ b/es/upload/index.js @@ -74,7 +74,7 @@ const _sfc_main = defineComponent({ return new Promise((resolve, reject) => { var options = { file, - quality: 0.6, + quality: props.quality, mimeType: "image/jpeg", maxWidth: 2e3, maxHeight: 2e3, @@ -194,7 +194,12 @@ const _sfc_main = defineComponent({ if (Array.isArray(files) && files.length > 0) { for (let i = 0; i < files.length; i++) { let _file = files[i]; - let f = await imgcomp(_file); + let f; + if (props.quality) { + f = await imgcomp(_file); + } else { + f = _file; + } formData.append(props.field + "[" + i + "]", f); } } diff --git a/lib/index.js b/lib/index.js index 1a7496e..2f93c10 100644 --- a/lib/index.js +++ b/lib/index.js @@ -48982,7 +48982,7 @@ const _sfc_main$7 = defineComponent({ return new Promise((resolve, reject) => { var options = { file, - quality: 0.6, + quality: props.quality, mimeType: "image/jpeg", maxWidth: 2e3, maxHeight: 2e3, @@ -49102,7 +49102,12 @@ const _sfc_main$7 = defineComponent({ if (Array.isArray(files) && files.length > 0) { for (let i = 0; i < files.length; i++) { let _file = files[i]; - let f = await imgcomp(_file); + let f; + if (props.quality) { + f = await imgcomp(_file); + } else { + f = _file; + } formData.append(props.field + "[" + i + "]", f); } } diff --git a/src/component/upload/index.vue b/src/component/upload/index.vue index d52b074..dd2fe97 100644 --- a/src/component/upload/index.vue +++ b/src/component/upload/index.vue @@ -79,11 +79,11 @@ export interface UploadProps { quality?: number; } -function imgcomp(file: any) { +function imgcomp(file: any): Promise { return new Promise((resolve, reject) => { var options = { file: file, - quality: 0.6, + quality: props.quality, mimeType: "image/jpeg", maxWidth: 2000, maxHeight: 2000, @@ -252,7 +252,12 @@ const localUploadTransaction = async (option: localUploadTransaction) => { if (Array.isArray(files) && files.length > 0) { for (let i = 0; i < files.length; i++) { let _file = files[i]; - let f = await imgcomp(_file); + let f: File | Blob; + if (props.quality) { + f = await imgcomp(_file); + } else { + f = _file; + } formData.append(props.field + "[" + i + "]", f); } } @@ -482,10 +487,10 @@ onUnmounted(() => {

{{ dragText }}

diff --git a/umd/index.js b/umd/index.js index cb5f0fe..19efe4b 100644 --- a/umd/index.js +++ b/umd/index.js @@ -236,7 +236,7 @@ EOD`}return{to_workbook:i,to_sheet:N,from_sheet:z}}(),fc=function(){function M(n * * Date: 2021-06-12T08:00:17.411Z */function ey(M,e){var N=Object.keys(M);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(M);e&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(M,t).enumerable})),N.push.apply(N,i)}return N}function Dy(M){for(var e=1;eM.length)&&(e=M.length);for(var N=0,i=new Array(e);N
',gv=Number.isNaN||HD.isNaN;function wN(M){return typeof M=="number"&&!gv(M)}var Ey=function(e){return e>0&&e<1/0};function o4(M){return typeof M=="undefined"}function Ki(M){return Xz(M)==="object"&&M!==null}var nv=Object.prototype.hasOwnProperty;function pt(M){if(!Ki(M))return!1;try{var e=M.constructor,N=e.prototype;return e&&N&&nv.call(N,"isPrototypeOf")}catch{return!1}}function Ke(M){return typeof M=="function"}var Tv=Array.prototype.slice;function xy(M){return Array.from?Array.from(M):Tv.call(M)}function De(M,e){return M&&Ke(e)&&(Array.isArray(M)||wN(M.length)?xy(M).forEach(function(N,i){e.call(M,N,i,M)}):Ki(M)&&Object.keys(M).forEach(function(N){e.call(M,M[N],N,M)})),M}var GN=Object.assign||function(e){for(var N=arguments.length,i=new Array(N>1?N-1:0),t=1;t0&&i.forEach(function(j){Ki(j)&&Object.keys(j).forEach(function(z){e[z]=j[z]})}),e},cv=/\.\d*(?:0|9){12}\d*$/;function ht(M){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return cv.test(M)?Math.round(M*e)/e:M}var sv=/^width|height|left|top|marginLeft|marginTop$/;function Qi(M,e){var N=M.style;De(e,function(i,t){sv.test(t)&&wN(i)&&(i="".concat(i,"px")),N[t]=i})}function yv(M,e){return M.classList?M.classList.contains(e):M.className.indexOf(e)>-1}function Te(M,e){if(!!e){if(wN(M.length)){De(M,function(i){Te(i,e)});return}if(M.classList){M.classList.add(e);return}var N=M.className.trim();N?N.indexOf(e)<0&&(M.className="".concat(N," ").concat(e)):M.className=e}}function ZD(M,e){if(!!e){if(wN(M.length)){De(M,function(N){ZD(N,e)});return}if(M.classList){M.classList.remove(e);return}M.className.indexOf(e)>=0&&(M.className=M.className.replace(e,""))}}function mt(M,e,N){if(!!e){if(wN(M.length)){De(M,function(i){mt(i,e,N)});return}N?Te(M,e):ZD(M,e)}}var Lv=/([a-z\d])([A-Z])/g;function l4(M){return M.replace(Lv,"$1-$2").toLowerCase()}function I4(M,e){return Ki(M[e])?M[e]:M.dataset?M.dataset[e]:M.getAttribute("data-".concat(l4(e)))}function fj(M,e,N){Ki(N)?M[e]=N:M.dataset?M.dataset[e]=N:M.setAttribute("data-".concat(l4(e)),N)}function ov(M,e){if(Ki(M[e]))try{delete M[e]}catch{M[e]=void 0}else if(M.dataset)try{delete M.dataset[e]}catch{M.dataset[e]=void 0}else M.removeAttribute("data-".concat(l4(e)))}var Qy=/\s\s*/,Yy=function(){var M=!1;if(Jz){var e=!1,N=function(){},i=Object.defineProperty({},"once",{get:function(){return M=!0,e},set:function(j){e=j}});HD.addEventListener("test",N,i),HD.removeEventListener("test",N,i)}return M}();function pD(M,e,N){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},t=N;e.trim().split(Qy).forEach(function(j){if(!Yy){var z=M.listeners;z&&z[j]&&z[j][N]&&(t=z[j][N],delete z[j][N],Object.keys(z[j]).length===0&&delete z[j],Object.keys(z).length===0&&delete M.listeners)}M.removeEventListener(j,t,i)})}function lD(M,e,N){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},t=N;e.trim().split(Qy).forEach(function(j){if(i.once&&!Yy){var z=M.listeners,u=z===void 0?{}:z;t=function(){delete u[j][N],M.removeEventListener(j,t,i);for(var r=arguments.length,g=new Array(r),n=0;nMath.abs(N)&&(N=T)})}),N}function qz(M,e){var N=M.pageX,i=M.pageY,t={endX:N,endY:i};return e?t:Dy({startX:N,startY:i},t)}function Ov(M){var e=0,N=0,i=0;return De(M,function(t){var j=t.startX,z=t.startY;e+=j,N+=z,i+=1}),e/=i,N/=i,{pageX:e,pageY:N}}function Yi(M){var e=M.aspectRatio,N=M.height,i=M.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",j=Ey(i),z=Ey(N);if(j&&z){var u=N*e;t==="contain"&&u>i||t==="cover"&&u90?{width:a,height:u}:{width:u,height:a}}function Av(M,e,N,i){var t=e.aspectRatio,j=e.naturalWidth,z=e.naturalHeight,u=e.rotate,a=u===void 0?0:u,r=e.scaleX,g=r===void 0?1:r,n=e.scaleY,T=n===void 0?1:n,s=N.aspectRatio,o=N.naturalWidth,y=N.naturalHeight,l=i.fillColor,L=l===void 0?"transparent":l,I=i.imageSmoothingEnabled,w=I===void 0?!0:I,A=i.imageSmoothingQuality,k=A===void 0?"low":A,Q=i.maxWidth,E=Q===void 0?1/0:Q,f=i.maxHeight,C=f===void 0?1/0:f,P=i.minWidth,J=P===void 0?0:P,q=i.minHeight,MM=q===void 0?0:q,jM=document.createElement("canvas"),uM=jM.getContext("2d"),H=Yi({aspectRatio:s,width:E,height:C}),m=Yi({aspectRatio:s,width:J,height:MM},"cover"),rM=Math.min(H.width,Math.max(m.width,o)),NM=Math.min(H.height,Math.max(m.height,y)),zM=Yi({aspectRatio:t,width:E,height:C}),TM=Yi({aspectRatio:t,width:J,height:MM},"cover"),cM=Math.min(zM.width,Math.max(TM.width,j)),OM=Math.min(zM.height,Math.max(TM.height,z)),EM=[-cM/2,-OM/2,cM,OM];return jM.width=ht(rM),jM.height=ht(NM),uM.fillStyle=L,uM.fillRect(0,0,rM,NM),uM.save(),uM.translate(rM/2,NM/2),uM.rotate(a*Math.PI/180),uM.scale(g,T),uM.imageSmoothingEnabled=w,uM.imageSmoothingQuality=k,uM.drawImage.apply(uM,[M].concat(ty(EM.map(function(eM){return Math.floor(ht(eM))})))),uM.restore(),jM}var Cy=String.fromCharCode;function Ev(M,e,N){var i="";N+=e;for(var t=e;t0;)N.push(Cy.apply(null,xy(t.subarray(0,i)))),t=t.subarray(i);return"data:".concat(e,";base64,").concat(btoa(N.join("")))}function kv(M){var e=new DataView(M),N;try{var i,t,j;if(e.getUint8(0)===255&&e.getUint8(1)===216)for(var z=e.byteLength,u=2;u+1=8&&(j=r+n)}}}if(j){var T=e.getUint16(j,i),s,o;for(o=0;o=0?j:Oy),height:Math.max(i.offsetHeight,z>=0?z:wy)};this.containerData=u,Qi(t,{width:u.width,height:u.height}),Te(e,$e),ZD(t,$e)},initCanvas:function(){var e=this.containerData,N=this.imageData,i=this.options.viewMode,t=Math.abs(N.rotate)%180===90,j=t?N.naturalHeight:N.naturalWidth,z=t?N.naturalWidth:N.naturalHeight,u=j/z,a=e.width,r=e.height;e.height*u>e.width?i===3?a=e.height*u:r=e.width/u:i===3?r=e.width/u:a=e.height*u;var g={aspectRatio:u,naturalWidth:j,naturalHeight:z,width:a,height:r};this.canvasData=g,this.limited=i===1||i===2,this.limitCanvas(!0,!0),g.width=Math.min(Math.max(g.width,g.minWidth),g.maxWidth),g.height=Math.min(Math.max(g.height,g.minHeight),g.maxHeight),g.left=(e.width-g.width)/2,g.top=(e.height-g.height)/2,g.oldLeft=g.left,g.oldTop=g.top,this.initialCanvasData=GN({},g)},limitCanvas:function(e,N){var i=this.options,t=this.containerData,j=this.canvasData,z=this.cropBoxData,u=i.viewMode,a=j.aspectRatio,r=this.cropped&&z;if(e){var g=Number(i.minCanvasWidth)||0,n=Number(i.minCanvasHeight)||0;u>1?(g=Math.max(g,t.width),n=Math.max(n,t.height),u===3&&(n*a>g?g=n*a:n=g/a)):u>0&&(g?g=Math.max(g,r?z.width:0):n?n=Math.max(n,r?z.height:0):r&&(g=z.width,n=z.height,n*a>g?g=n*a:n=g/a));var T=Yi({aspectRatio:a,width:g,height:n});g=T.width,n=T.height,j.minWidth=g,j.minHeight=n,j.maxWidth=1/0,j.maxHeight=1/0}if(N)if(u>(r?0:1)){var s=t.width-j.width,o=t.height-j.height;j.minLeft=Math.min(0,s),j.minTop=Math.min(0,o),j.maxLeft=Math.max(0,s),j.maxTop=Math.max(0,o),r&&this.limited&&(j.minLeft=Math.min(z.left,z.left+(z.width-j.width)),j.minTop=Math.min(z.top,z.top+(z.height-j.height)),j.maxLeft=z.left,j.maxTop=z.top,u===2&&(j.width>=t.width&&(j.minLeft=Math.min(0,s),j.maxLeft=Math.max(0,s)),j.height>=t.height&&(j.minTop=Math.min(0,o),j.maxTop=Math.max(0,o))))}else j.minLeft=-j.width,j.minTop=-j.height,j.maxLeft=t.width,j.maxTop=t.height},renderCanvas:function(e,N){var i=this.canvasData,t=this.imageData;if(N){var j=wv({width:t.naturalWidth*Math.abs(t.scaleX||1),height:t.naturalHeight*Math.abs(t.scaleY||1),degree:t.rotate||0}),z=j.width,u=j.height,a=i.width*(z/i.naturalWidth),r=i.height*(u/i.naturalHeight);i.left-=(a-i.width)/2,i.top-=(r-i.height)/2,i.width=a,i.height=r,i.aspectRatio=z/u,i.naturalWidth=z,i.naturalHeight=u,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heightN.width?j.height=j.width/i:j.width=j.height*i),this.cropBoxData=j,this.limitCropBox(!0,!0),j.width=Math.min(Math.max(j.width,j.minWidth),j.maxWidth),j.height=Math.min(Math.max(j.height,j.minHeight),j.maxHeight),j.width=Math.max(j.minWidth,j.width*t),j.height=Math.max(j.minHeight,j.height*t),j.left=N.left+(N.width-j.width)/2,j.top=N.top+(N.height-j.height)/2,j.oldLeft=j.left,j.oldTop=j.top,this.initialCropBoxData=GN({},j)},limitCropBox:function(e,N){var i=this.options,t=this.containerData,j=this.canvasData,z=this.cropBoxData,u=this.limited,a=i.aspectRatio;if(e){var r=Number(i.minCropBoxWidth)||0,g=Number(i.minCropBoxHeight)||0,n=u?Math.min(t.width,j.width,j.width+j.left,t.width-j.left):t.width,T=u?Math.min(t.height,j.height,j.height+j.top,t.height-j.top):t.height;r=Math.min(r,t.width),g=Math.min(g,t.height),a&&(r&&g?g*a>r?g=r/a:r=g*a:r?g=r/a:g&&(r=g*a),T*a>n?T=n/a:n=T*a),z.minWidth=Math.min(r,n),z.minHeight=Math.min(g,T),z.maxWidth=n,z.maxHeight=T}N&&(u?(z.minLeft=Math.max(0,j.left),z.minTop=Math.max(0,j.top),z.maxLeft=Math.min(t.width,j.left+j.width)-z.width,z.maxTop=Math.min(t.height,j.top+j.height)-z.height):(z.minLeft=0,z.minTop=0,z.maxLeft=t.width-z.width,z.maxTop=t.height-z.height))},renderCropBox:function(){var e=this.options,N=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.widthi.maxHeight||i.height=N.width&&i.height>=N.height?zy:a4),Qi(this.cropBox,GN({width:i.width,height:i.height},dj({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Bt(this.element,T4,this.getData())}},Cv={initPreview:function(){var e=this.element,N=this.crossOrigin,i=this.options.preview,t=N?this.crossOriginUrl:this.url,j=e.alt||"The image to preview",z=document.createElement("img");if(N&&(z.crossOrigin=N),z.src=t,z.alt=j,this.viewBox.appendChild(z),this.viewBoxImage=z,!!i){var u=i;typeof i=="string"?u=e.ownerDocument.querySelectorAll(i):i.querySelector&&(u=[i]),this.previews=u,De(u,function(a){var r=document.createElement("img");fj(a,Kz,{width:a.offsetWidth,height:a.offsetHeight,html:a.innerHTML}),N&&(r.crossOrigin=N),r.src=t,r.alt=j,r.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',a.innerHTML="",a.appendChild(r)})}},resetPreview:function(){De(this.previews,function(e){var N=I4(e,Kz);Qi(e,{width:N.width,height:N.height}),e.innerHTML=N.html,ov(e,Kz)})},preview:function(){var e=this.imageData,N=this.canvasData,i=this.cropBoxData,t=i.width,j=i.height,z=e.width,u=e.height,a=i.left-N.left-e.left,r=i.top-N.top-e.top;!this.cropped||this.disabled||(Qi(this.viewBoxImage,GN({width:z,height:u},dj(GN({translateX:-a,translateY:-r},e)))),De(this.previews,function(g){var n=I4(g,Kz),T=n.width,s=n.height,o=T,y=s,l=1;t&&(l=T/t,y=j*l),j&&y>s&&(l=s/j,o=t*l,y=s),Qi(g,{width:o,height:y}),Qi(g.getElementsByTagName("img")[0],GN({width:z*l,height:u*l},dj(GN({translateX:-a*l,translateY:-r*l},e))))}))}},Uv={bind:function(){var e=this.element,N=this.options,i=this.cropper;Ke(N.cropstart)&&lD(e,y4,N.cropstart),Ke(N.cropmove)&&lD(e,s4,N.cropmove),Ke(N.cropend)&&lD(e,c4,N.cropend),Ke(N.crop)&&lD(e,T4,N.crop),Ke(N.zoom)&&lD(e,L4,N.zoom),lD(i,cy,this.onCropStart=this.cropStart.bind(this)),N.zoomable&&N.zoomOnWheel&&lD(i,ly,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),N.toggleDragModeOnDblclick&&lD(i,Ty,this.onDblclick=this.dblclick.bind(this)),lD(e.ownerDocument,sy,this.onCropMove=this.cropMove.bind(this)),lD(e.ownerDocument,yy,this.onCropEnd=this.cropEnd.bind(this)),N.responsive&&lD(window,oy,this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,N=this.options,i=this.cropper;Ke(N.cropstart)&&pD(e,y4,N.cropstart),Ke(N.cropmove)&&pD(e,s4,N.cropmove),Ke(N.cropend)&&pD(e,c4,N.cropend),Ke(N.crop)&&pD(e,T4,N.crop),Ke(N.zoom)&&pD(e,L4,N.zoom),pD(i,cy,this.onCropStart),N.zoomable&&N.zoomOnWheel&&pD(i,ly,this.onWheel,{passive:!1,capture:!0}),N.toggleDragModeOnDblclick&&pD(i,Ty,this.onDblclick),pD(e.ownerDocument,sy,this.onCropMove),pD(e.ownerDocument,yy,this.onCropEnd),N.responsive&&pD(window,oy,this.onResize)}},Sv={resize:function(){if(!this.disabled){var e=this.options,N=this.container,i=this.containerData,t=N.offsetWidth/i.width,j=N.offsetHeight/i.height,z=Math.abs(t-1)>Math.abs(j-1)?t:j;if(z!==1){var u,a;e.restore&&(u=this.getCanvasData(),a=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(De(u,function(r,g){u[g]=r*z})),this.setCropBoxData(De(a,function(r,g){a[g]=r*z})))}}},dblclick:function(){this.disabled||this.options.dragMode===ny||this.setDragMode(yv(this.dragBox,r4)?gy:n4)},wheel:function(e){var N=this,i=Number(this.options.wheelZoomRatio)||.1,t=1;this.disabled||(e.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){N.wheeling=!1},50),e.deltaY?t=e.deltaY>0?1:-1:e.wheelDelta?t=-e.wheelDelta/120:e.detail&&(t=e.detail>0?1:-1),this.zoom(-t*i,e)))},cropStart:function(e){var N=e.buttons,i=e.button;if(!(this.disabled||(e.type==="mousedown"||e.type==="pointerdown"&&e.pointerType==="mouse")&&(wN(N)&&N!==1||wN(i)&&i!==0||e.ctrlKey))){var t=this.options,j=this.pointers,z;e.changedTouches?De(e.changedTouches,function(u){j[u.identifier]=qz(u)}):j[e.pointerId||0]=qz(e),Object.keys(j).length>1&&t.zoomable&&t.zoomOnTouch?z=uy:z=I4(e.target,kj),!!jv.test(z)&&Bt(this.element,y4,{originalEvent:e,action:z})!==!1&&(e.preventDefault(),this.action=z,this.cropping=!1,z===jy&&(this.cropping=!0,Te(this.dragBox,$z)))}},cropMove:function(e){var N=this.action;if(!(this.disabled||!N)){var i=this.pointers;e.preventDefault(),Bt(this.element,s4,{originalEvent:e,action:N})!==!1&&(e.changedTouches?De(e.changedTouches,function(t){GN(i[t.identifier]||{},qz(t,!0))}):GN(i[e.pointerId||0]||{},qz(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var N=this.action,i=this.pointers;e.changedTouches?De(e.changedTouches,function(t){delete i[t.identifier]}):delete i[e.pointerId||0],N&&(e.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,mt(this.dragBox,$z,this.cropped&&this.options.modal)),Bt(this.element,c4,{originalEvent:e,action:N}))}}},pv={change:function(e){var N=this.options,i=this.canvasData,t=this.containerData,j=this.cropBoxData,z=this.pointers,u=this.action,a=N.aspectRatio,r=j.left,g=j.top,n=j.width,T=j.height,s=r+n,o=g+T,y=0,l=0,L=t.width,I=t.height,w=!0,A;!a&&e.shiftKey&&(a=n&&T?n/T:1),this.limited&&(y=j.minLeft,l=j.minTop,L=y+Math.min(t.width,i.width,i.left+i.width),I=l+Math.min(t.height,i.height,i.top+i.height));var k=z[Object.keys(z)[0]],Q={x:k.endX-k.startX,y:k.endY-k.startY},E=function(C){switch(C){case Ji:s+Q.x>L&&(Q.x=L-s);break;case $i:r+Q.xI&&(Q.y=I-o);break}};switch(u){case a4:r+=Q.x,g+=Q.y;break;case Ji:if(Q.x>=0&&(s>=L||a&&(g<=l||o>=I))){w=!1;break}E(Ji),n+=Q.x,n<0&&(u=$i,n=-n,r-=n),a&&(T=n/a,g+=(j.height-T)/2);break;case xi:if(Q.y<=0&&(g<=l||a&&(r<=y||s>=L))){w=!1;break}E(xi),T-=Q.y,g+=Q.y,T<0&&(u=St,T=-T,g-=T),a&&(n=T*a,r+=(j.width-n)/2);break;case $i:if(Q.x<=0&&(r<=y||a&&(g<=l||o>=I))){w=!1;break}E($i),n-=Q.x,r+=Q.x,n<0&&(u=Ji,n=-n,r-=n),a&&(T=n/a,g+=(j.height-T)/2);break;case St:if(Q.y>=0&&(o>=I||a&&(r<=y||s>=L))){w=!1;break}E(St),T+=Q.y,T<0&&(u=xi,T=-T,g-=T),a&&(n=T*a,r+=(j.width-n)/2);break;case Ej:if(a){if(Q.y<=0&&(g<=l||s>=L)){w=!1;break}E(xi),T-=Q.y,g+=Q.y,n=T*a}else E(xi),E(Ji),Q.x>=0?sl&&(T-=Q.y,g+=Q.y):(T-=Q.y,g+=Q.y);n<0&&T<0?(u=Yj,T=-T,n=-n,g-=T,r-=n):n<0?(u=xj,n=-n,r-=n):T<0&&(u=Qj,T=-T,g-=T);break;case xj:if(a){if(Q.y<=0&&(g<=l||r<=y)){w=!1;break}E(xi),T-=Q.y,g+=Q.y,n=T*a,r+=j.width-n}else E(xi),E($i),Q.x<=0?r>y?(n-=Q.x,r+=Q.x):Q.y<=0&&g<=l&&(w=!1):(n-=Q.x,r+=Q.x),Q.y<=0?g>l&&(T-=Q.y,g+=Q.y):(T-=Q.y,g+=Q.y);n<0&&T<0?(u=Qj,T=-T,n=-n,g-=T,r-=n):n<0?(u=Ej,n=-n,r-=n):T<0&&(u=Yj,T=-T,g-=T);break;case Yj:if(a){if(Q.x<=0&&(r<=y||o>=I)){w=!1;break}E($i),n-=Q.x,r+=Q.x,T=n/a}else E(St),E($i),Q.x<=0?r>y?(n-=Q.x,r+=Q.x):Q.y>=0&&o>=I&&(w=!1):(n-=Q.x,r+=Q.x),Q.y>=0?o=0&&(s>=L||o>=I)){w=!1;break}E(Ji),n+=Q.x,T=n/a}else E(St),E(Ji),Q.x>=0?s=0&&o>=I&&(w=!1):n+=Q.x,Q.y>=0?o0?u=Q.y>0?Qj:Ej:Q.x<0&&(r-=n,u=Q.y>0?Yj:xj),Q.y<0&&(g-=T),this.cropped||(ZD(this.cropBox,$e),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}w&&(j.width=n,j.height=T,j.left=r,j.top=g,this.action=u,this.renderCropBox()),De(z,function(f){f.startX=f.endX,f.startY=f.endY})}},hv={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Te(this.dragBox,$z),ZD(this.cropBox,$e),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=GN({},this.initialImageData),this.canvasData=GN({},this.initialCanvasData),this.cropBoxData=GN({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(GN(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),ZD(this.dragBox,$z),Te(this.cropBox,$e)),this},replace:function(e){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&e&&(this.isImg&&(this.element.src=e),N?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,De(this.previews,function(i){i.getElementsByTagName("img")[0].src=e}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,ZD(this.cropper,ay)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Te(this.cropper,ay)),this},destroy:function(){var e=this.element;return e[RN]?(e[RN]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,i=this.canvasData,t=i.left,j=i.top;return this.moveTo(o4(e)?e:t+Number(e),o4(N)?N:j+Number(N))},moveTo:function(e){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,i=this.canvasData,t=!1;return e=Number(e),N=Number(N),this.ready&&!this.disabled&&this.options.movable&&(wN(e)&&(i.left=e,t=!0),wN(N)&&(i.top=N,t=!0),t&&this.renderCanvas(!0)),this},zoom:function(e,N){var i=this.canvasData;return e=Number(e),e<0?e=1/(1-e):e=1+e,this.zoomTo(i.width*e/i.naturalWidth,null,N)},zoomTo:function(e,N,i){var t=this.options,j=this.canvasData,z=j.width,u=j.height,a=j.naturalWidth,r=j.naturalHeight;if(e=Number(e),e>=0&&this.ready&&!this.disabled&&t.zoomable){var g=a*e,n=r*e;if(Bt(this.element,L4,{ratio:e,oldRatio:z/a,originalEvent:i})===!1)return this;if(i){var T=this.pointers,s=ky(this.cropper),o=T&&Object.keys(T).length?Ov(T):{pageX:i.pageX,pageY:i.pageY};j.left-=(g-z)*((o.pageX-s.left-j.left)/z),j.top-=(n-u)*((o.pageY-s.top-j.top)/u)}else pt(N)&&wN(N.x)&&wN(N.y)?(j.left-=(g-z)*((N.x-j.left)/z),j.top-=(n-u)*((N.y-j.top)/u)):(j.left-=(g-z)/2,j.top-=(n-u)/2);j.width=g,j.height=n,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return e=Number(e),wN(e)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var N=this.imageData.scaleY;return this.scale(e,wN(N)?N:1)},scaleY:function(e){var N=this.imageData.scaleX;return this.scale(wN(N)?N:1,e)},scale:function(e){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,i=this.imageData,t=!1;return e=Number(e),N=Number(N),this.ready&&!this.disabled&&this.options.scalable&&(wN(e)&&(i.scaleX=e,t=!0),wN(N)&&(i.scaleY=N,t=!0),t&&this.renderCanvas(!0,!0)),this},getData:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,N=this.options,i=this.imageData,t=this.canvasData,j=this.cropBoxData,z;if(this.ready&&this.cropped){z={x:j.left-t.left,y:j.top-t.top,width:j.width,height:j.height};var u=i.width/i.naturalWidth;if(De(z,function(g,n){z[n]=g/u}),e){var a=Math.round(z.y+z.height),r=Math.round(z.x+z.width);z.x=Math.round(z.x),z.y=Math.round(z.y),z.width=r-z.x,z.height=a-z.y}}else z={x:0,y:0,width:0,height:0};return N.rotatable&&(z.rotate=i.rotate||0),N.scalable&&(z.scaleX=i.scaleX||1,z.scaleY=i.scaleY||1),z},setData:function(e){var N=this.options,i=this.imageData,t=this.canvasData,j={};if(this.ready&&!this.disabled&&pt(e)){var z=!1;N.rotatable&&wN(e.rotate)&&e.rotate!==i.rotate&&(i.rotate=e.rotate,z=!0),N.scalable&&(wN(e.scaleX)&&e.scaleX!==i.scaleX&&(i.scaleX=e.scaleX,z=!0),wN(e.scaleY)&&e.scaleY!==i.scaleY&&(i.scaleY=e.scaleY,z=!0)),z&&this.renderCanvas(!0,!0);var u=i.width/i.naturalWidth;wN(e.x)&&(j.left=e.x*u+t.left),wN(e.y)&&(j.top=e.y*u+t.top),wN(e.width)&&(j.width=e.width*u),wN(e.height)&&(j.height=e.height*u),this.setCropBoxData(j)}return this},getContainerData:function(){return this.ready?GN({},this.containerData):{}},getImageData:function(){return this.sized?GN({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,N={};return this.ready&&De(["left","top","width","height","naturalWidth","naturalHeight"],function(i){N[i]=e[i]}),N},setCanvasData:function(e){var N=this.canvasData,i=N.aspectRatio;return this.ready&&!this.disabled&&pt(e)&&(wN(e.left)&&(N.left=e.left),wN(e.top)&&(N.top=e.top),wN(e.width)?(N.width=e.width,N.height=e.width/i):wN(e.height)&&(N.height=e.height,N.width=e.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var e=this.cropBoxData,N;return this.ready&&this.cropped&&(N={left:e.left,top:e.top,width:e.width,height:e.height}),N||{}},setCropBoxData:function(e){var N=this.cropBoxData,i=this.options.aspectRatio,t,j;return this.ready&&this.cropped&&!this.disabled&&pt(e)&&(wN(e.left)&&(N.left=e.left),wN(e.top)&&(N.top=e.top),wN(e.width)&&e.width!==N.width&&(t=!0,N.width=e.width),wN(e.height)&&e.height!==N.height&&(j=!0,N.height=e.height),i&&(t?N.height=N.width/i:j&&(N.width=N.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var N=this.canvasData,i=Av(this.image,this.imageData,N,e);if(!this.cropped)return i;var t=this.getData(),j=t.x,z=t.y,u=t.width,a=t.height,r=i.width/Math.floor(N.naturalWidth);r!==1&&(j*=r,z*=r,u*=r,a*=r);var g=u/a,n=Yi({aspectRatio:g,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),T=Yi({aspectRatio:g,width:e.minWidth||0,height:e.minHeight||0},"cover"),s=Yi({aspectRatio:g,width:e.width||(r!==1?i.width:u),height:e.height||(r!==1?i.height:a)}),o=s.width,y=s.height;o=Math.min(n.width,Math.max(T.width,o)),y=Math.min(n.height,Math.max(T.height,y));var l=document.createElement("canvas"),L=l.getContext("2d");l.width=ht(o),l.height=ht(y),L.fillStyle=e.fillColor||"transparent",L.fillRect(0,0,o,y);var I=e.imageSmoothingEnabled,w=I===void 0?!0:I,A=e.imageSmoothingQuality;L.imageSmoothingEnabled=w,A&&(L.imageSmoothingQuality=A);var k=i.width,Q=i.height,E=j,f=z,C,P,J,q,MM,jM;E<=-u||E>k?(E=0,C=0,J=0,MM=0):E<=0?(J=-E,E=0,C=Math.min(k,u+E),MM=C):E<=k&&(J=0,C=Math.min(u,k-E),MM=C),C<=0||f<=-a||f>Q?(f=0,P=0,q=0,jM=0):f<=0?(q=-f,f=0,P=Math.min(Q,a+f),jM=P):f<=Q&&(q=0,P=Math.min(a,Q-f),jM=P);var uM=[E,f,C,P];if(MM>0&&jM>0){var H=o/u;uM.push(J*H,q*H,MM*H,jM*H)}return L.drawImage.apply(L,[i].concat(ty(uM.map(function(m){return Math.floor(ht(m))})))),l},setAspectRatio:function(e){var N=this.options;return!this.disabled&&!o4(e)&&(N.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var N=this.options,i=this.dragBox,t=this.face;if(this.ready&&!this.disabled){var j=e===n4,z=N.movable&&e===gy;e=j||z?e:ny,N.dragMode=e,fj(i,kj,e),mt(i,r4,j),mt(i,g4,z),N.cropBoxMovable||(fj(t,kj,e),mt(t,r4,j),mt(t,g4,z))}return this}},mv=HD.Cropper,Uy=function(){function M(e){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Xb(this,M),!e||!av.test(e.tagName))throw new Error("The first argument is required and must be an or element.");this.element=e,this.options=GN({},Ay,pt(N)&&N),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Jb(M,[{key:"init",value:function(){var N=this.element,i=N.tagName.toLowerCase(),t;if(!N[RN]){if(N[RN]=this,i==="img"){if(this.isImg=!0,t=N.getAttribute("src")||"",this.originalUrl=t,!t)return;t=N.src}else i==="canvas"&&window.HTMLCanvasElement&&(t=N.toDataURL());this.load(t)}}},{key:"load",value:function(N){var i=this;if(!!N){this.url=N,this.imageData={};var t=this.element,j=this.options;if(!j.rotatable&&!j.scalable&&(j.checkOrientation=!1),!j.checkOrientation||!window.ArrayBuffer){this.clone();return}if(zv.test(N)){uv.test(N)?this.read(Qv(N)):this.clone();return}var z=new XMLHttpRequest,u=this.clone.bind(this);this.reloading=!0,this.xhr=z,z.onabort=u,z.onerror=u,z.ontimeout=u,z.onprogress=function(){z.getResponseHeader("content-type")!==Iy&&z.abort()},z.onload=function(){i.read(z.response)},z.onloadend=function(){i.reloading=!1,i.xhr=null},j.checkCrossOrigin&&fy(N)&&t.crossOrigin&&(N=dy(N)),z.open("GET",N,!0),z.responseType="arraybuffer",z.withCredentials=t.crossOrigin==="use-credentials",z.send()}}},{key:"read",value:function(N){var i=this.options,t=this.imageData,j=kv(N),z=0,u=1,a=1;if(j>1){this.url=Yv(N,Iy);var r=fv(j);z=r.rotate,u=r.scaleX,a=r.scaleY}i.rotatable&&(t.rotate=z),i.scalable&&(t.scaleX=u,t.scaleY=a),this.clone()}},{key:"clone",value:function(){var N=this.element,i=this.url,t=N.crossOrigin,j=i;this.options.checkCrossOrigin&&fy(i)&&(t||(t="anonymous"),j=dy(i)),this.crossOrigin=t,this.crossOriginUrl=j;var z=document.createElement("img");t&&(z.crossOrigin=t),z.src=j||i,z.alt=N.alt||"The image to crop",this.image=z,z.onload=this.start.bind(this),z.onerror=this.stop.bind(this),Te(z,ry),N.parentNode.insertBefore(z,N.nextSibling)}},{key:"start",value:function(){var N=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var t=HD.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(HD.navigator.userAgent),j=function(r,g){GN(N.imageData,{naturalWidth:r,naturalHeight:g,aspectRatio:r/g}),N.initialImageData=GN({},N.imageData),N.sizing=!1,N.sized=!0,N.build()};if(i.naturalWidth&&!t){j(i.naturalWidth,i.naturalHeight);return}var z=document.createElement("img"),u=document.body||document.documentElement;this.sizingImage=z,z.onload=function(){j(z.width,z.height),t||u.removeChild(z)},z.src=i.src,t||(z.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",u.appendChild(z))}},{key:"stop",value:function(){var N=this.image;N.onload=null,N.onerror=null,N.parentNode.removeChild(N),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var N=this.element,i=this.options,t=this.image,j=N.parentNode,z=document.createElement("div");z.innerHTML=rv;var u=z.querySelector(".".concat(RN,"-container")),a=u.querySelector(".".concat(RN,"-canvas")),r=u.querySelector(".".concat(RN,"-drag-box")),g=u.querySelector(".".concat(RN,"-crop-box")),n=g.querySelector(".".concat(RN,"-face"));this.container=j,this.cropper=u,this.canvas=a,this.dragBox=r,this.cropBox=g,this.viewBox=u.querySelector(".".concat(RN,"-view-box")),this.face=n,a.appendChild(t),Te(N,$e),j.insertBefore(u,N.nextSibling),this.isImg||ZD(t,ry),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,Te(g,$e),i.guides||Te(g.getElementsByClassName("".concat(RN,"-dashed")),$e),i.center||Te(g.getElementsByClassName("".concat(RN,"-center")),$e),i.background&&Te(u,"".concat(RN,"-bg")),i.highlight||Te(n,ev),i.cropBoxMovable&&(Te(n,g4),fj(n,kj,a4)),i.cropBoxResizable||(Te(g.getElementsByClassName("".concat(RN,"-line")),$e),Te(g.getElementsByClassName("".concat(RN,"-point")),$e)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),Ke(i.ready)&&lD(N,Ly,i.ready,{once:!0}),Bt(N,Ly)}}},{key:"unbuild",value:function(){!this.ready||(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),ZD(this.element,$e))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=mv,M}},{key:"setDefaults",value:function(N){GN(Ay,pt(N)&&N)}}]),M}();GN(Uy.prototype,dv,Cv,Uv,Sv,pv,hv);const Bv=["name","field","multiple","accept","disabled"],bv={key:0},vv=["onClick"],Fv=["onClick"],_v=D.createElementVNode("i",{class:"layui-icon"},"\uE67C",-1),Pv=D.createElementVNode("div",{class:"layui-hide",id:"uploadDemoView"},[D.createElementVNode("hr"),D.createElementVNode("img",{src:"",alt:"\u4E0A\u4F20\u6210\u529F\u540E\u6E32\u67D3",style:{"max-width":"196px"}})],-1),Rv=["src","id"],Gv={name:"LayUpload"},Wv=D.defineComponent({...Gv,props:{url:null,data:null,headers:null,acceptMime:{default:"MIME_type"},field:{default:"file"},size:{default:0},multiple:{type:Boolean,default:!1},number:{default:0},drag:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disabledPreview:{type:Boolean,default:!1},cut:{type:Boolean,default:!1},cutOptions:{default:void 0},text:null,dragText:null,modelValue:{default:null},auto:{type:Boolean,default:!0},sizeOutMsg:null,quality:null},emits:["choose","chooseAfter","before","done","error","cutdone","cutcancel","update:modelValue"],setup(M,{emit:e}){const N=M;function i(d){return new Promise((Z,h)=>{var R={file:d,quality:.6,mimeType:"image/jpeg",maxWidth:2e3,maxHeight:2e3,convertSize:1/0,loose:!0,redressOrientation:!0,success:function(p){Z(p)}};new Zb(R)})}const t=()=>{if(q){let Z=q.getCroppedCanvas().toDataURL('"image/png"'),h=new Date().valueOf(),R=C.value[0];e("cutdone",Object.assign({currentTimeStamp:h,cutResult:Z,orginal:R}));let p=H(Z);if(!N.auto){e("update:modelValue",[p]),u();return}TM([p]),D.nextTick(()=>z())}else m(y.value)},j=()=>{let d=new Date().valueOf();e("cutcancel",Object.assign({currentTimeStamp:d})),D.nextTick(()=>z())},z=()=>{C.value=[],P.value=[],jM.value=!1,J.value.value="",q=null},u=()=>{C.value=[],P.value=[],jM.value=!1,q=null},{t:a}=eD(),r=D.computed(()=>N.text?N.text:a("upload.text")),g=D.computed(()=>N.dragText?N.dragText:a("upload.dragText")),n=D.computed(()=>a("upload.defaultErrorMsg")),T=D.computed(()=>a("upload.urlErrorMsg")),s=D.computed(()=>a("upload.numberErrorMsg")),o=D.computed(()=>a("upload.occurFileSizeErrorMsg")),y=D.computed(()=>a("upload.cutInitErrorMsg")),l=D.computed(()=>a("upload.uploadSuccess")),L=D.computed(()=>a("upload.startUploadMsg")),I=D.computed(()=>a("upload.cannotSupportCutMsg")),w=D.computed(()=>a("upload.title")),A=D.computed(()=>a("upload.confirmBtn")),k=D.computed(()=>a("upload.cancelBtn"));let Q=D.computed(()=>({type:"component",title:w.value,shade:!0,shadeClose:!0,area:["640px","640px"],btn:[{text:A.value,callback:t},{text:k.value,callback:j}]}));const E=D.useSlots();E.default&&E.default(),D.getCurrentInstance(),D.watch(()=>N.modelValue,()=>{N.modelValue||z()});const f=D.ref(!1),C=D.ref([]),P=D.ref([]),J=BA("orgFileInput");let q=null,MM;N.cutOptions&&N.cutOptions.layerOption?MM=D.computed(()=>Object.assign(Q,N.cutOptions.layerOption)):MM=D.computed(()=>Q.value);const jM=D.ref(!1),uM=async d=>{const{url:Z,files:h}=d;let R=new FormData;if(Z.length<=5){m(T.value);return}if(Array.isArray(h)&&h.length>0)for(let G=0;G{rM({url:Z,formData:R},function(){clearTimeout(p)})},200)},H=d=>{let Z=d.split(","),h="";Z.length>0&&(h=Z[0].match(/:(.*?);/)[1]);let R=atob(Z[1]),p=R.length,G=new Uint8Array(p);for(;p--;)G[p]=R.charCodeAt(p);return new Blob([G],{type:h})},m=d=>{let Z=new Date().valueOf(),h=d||n;h=`${h}`,console.warn(h),oe.msg(h,{icon:2,time:1e3},function(R){}),e("error",Object.assign({currentTimeStamp:Z,msg:h}))},rM=(d,Z)=>{let h=new XMLHttpRequest,R=d.url,p=d.formData;const G=Z;if(h.onreadystatechange=function(){let gM=new Date().valueOf();if(h.readyState===1){if(h.status>=200&&h.status<=300||h.status===304||h.status==0){let DM=L.value;e("before",Object.assign({currentTimeStamp:gM,msg:DM,...d}))}}else if(h.readyState===4){let DM=h.responseText?h.responseText:l;if(h.status>=200&&h.status<=300||h.status===304||h.status==0){let wM=h.responseText;e("done",{currentTimeStamp:gM,msg:DM,data:wM})}}},h.open("post",R,!0),N.headers)for(let gM in N.headers)h.setRequestHeader(gM,N.headers[gM]);else h.setRequestHeader("Accept","application/json, text/javascript");let iM=new Date().valueOf();e("before",Object.assign(d,iM)),h.send(p),G&&typeof G=="function"&&G(),z()},NM=(d,Z)=>{const h=new FileReader;h.onloadend=function(R){Z(R.target.result)},h.readAsDataURL(d)},zM=d=>{d.preventDefault();const Z=[...d.target.files||d.dataTransfer.files];if(N.multiple&&N.number!=0&&N.numberN.size*1024){m(N.sizeOutMsg||o.value);return}}for(let p of Z)C.value.push(p),NM(p,function(G){P.value.push(G)});let h=N.cut&&N.acceptMime.indexOf("image")!=-1&&N.multiple==!1,R=N.cut&&N.acceptMime.indexOf("image")!=-1&&N.multiple==!0;if(h)jM.value=!0,setTimeout(()=>{let p=document.getElementsByClassName("_lay_upload_img");if(p&&p.length>0){let G=p[0];q=new Uy(G,{aspectRatio:16/9})}else z()},200);else{if(R&&console.warn(I.value),!N.auto){e("update:modelValue",Z);return}TM(Z)}},TM=d=>{let Z=new Date().valueOf(),h=l;N.url?uM({url:N.url,files:d}):(e("done",{currentTimeStamp:Z,msg:h,data:d}),z())},cM=()=>{let d=J.value;d&&d.click()},OM=()=>{let d=new Date().valueOf();e("choose",d)},EM=D.ref();function eM(d){d.stopPropagation(),d.preventDefault()}function nM(d){d.stopPropagation(),d.preventDefault()}return D.onMounted(()=>{D.nextTick(()=>{EM.value&&(EM.value.addEventListener("dragenter",eM,!1),EM.value.addEventListener("dragover",nM,!1),EM.value.addEventListener("drop",zM,!1))})}),D.onUnmounted(()=>{EM.value&&(EM.value.removeEventListener("dragenter"),EM.value.removeEventListener("dragover"),EM.value.removeEventListener("drop"))}),(d,Z)=>(D.openBlock(),D.createElementBlock("div",{class:D.normalizeClass(["layui-upload layui-upload-wrap",M.disabledPreview?"layui-upload-file-disabled":""])},[D.createElementVNode("input",{type:"file",class:"layui-upload-file",ref_key:"orgFileInput",ref:J,name:M.field,field:M.field,multiple:M.multiple,accept:M.acceptMime,disabled:M.disabled,onClick:OM,onChange:zM},null,40,Bv),M.drag?(D.openBlock(),D.createElementBlock("div",{key:1,ref_key:"dragRef",ref:EM,class:D.normalizeClass(["layui-upload-drag",M.disabled?"layui-upload-drag-disable":f.value?"layui-upload-drag-draging":""]),onClick:D.withModifiers(cM,["stop"])},[_v,D.createElementVNode("p",null,D.toDisplayString(D.unref(g)),1),Pv],10,Fv)):(D.openBlock(),D.createElementBlock("div",bv,[D.createElementVNode("div",{class:"layui-upload-btn-box",onClick:D.withModifiers(cM,["stop"])},[D.unref(E).default?D.renderSlot(d.$slots,"default",{key:0,disabled:M.disabled}):(D.openBlock(),D.createBlock(nt,{key:1,type:"primary",disabled:M.disabled},{default:D.withCtx(()=>[D.createTextVNode(D.toDisplayString(D.unref(r)),1)]),_:1},8,["disabled"]))],8,vv)])),D.createVNode(D.unref(Hj),{modelValue:jM.value,"onUpdate:modelValue":Z[0]||(Z[0]=h=>jM.value=h),title:D.unref(MM).title,move:D.unref(MM).move,resize:D.unref(MM).resize,shade:D.unref(MM).shade,shadeClose:D.unref(MM).shadeClose,shadeOpacity:D.unref(MM).shadeOpacity,zIndex:D.unref(MM).zIndex,btnAlign:D.unref(MM).btnAlign,area:D.unref(MM).area,anim:D.unref(MM).anim,isOutAnim:D.unref(MM).isOutAnim,btn:D.unref(MM).btn,onClose:z},{default:D.withCtx(()=>[(D.openBlock(!0),D.createElementBlock(D.Fragment,null,D.renderList(P.value,(h,R)=>(D.openBlock(),D.createElementBlock("div",{class:"copper-container",key:`file${R}`},[D.createElementVNode("img",{src:h,id:`_lay_upload_img${R}`,class:"_lay_upload_img"},null,8,Rv)]))),128))]),_:1},8,["modelValue","title","move","resize","shade","shadeClose","shadeOpacity","zIndex","btnAlign","area","anim","isOutAnim","btn"]),D.createElementVNode("div",{class:D.normalizeClass(["layui-upload-list",M.disabledPreview?"layui-upload-list-disabled":""])},[D.renderSlot(d.$slots,"preview")],2)],2))}}),Sy=JM(Wv);var Y_=(()=>`.layui-water-ripples-container{position:relative;display:inline-block}.layui-water-ripples-container .layui-slot-container{position:relative;z-index:2}.layui-water-ripples-container .layui-out-ripples{position:absolute;left:0;top:0;height:100%;opacity:1;z-index:1;pointer-events:none}.layui-water-ripples-container .layui-animate-once--out{animation:ripple-effect 1s forwards}.layui-water-ripples-container .layui-animate-always--out{animation:ripple-effect 1s infinite}@keyframes ripple-effect{0%{box-shadow:0 0 0 0 var(--layui-ripple-color);opacity:.4}to{box-shadow:0 0 0 var(--layui-spread-width) var(--layui-ripple-color);opacity:0}}.layui-water-ripples-container .layui-inset-ripples{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);opacity:1;width:0px;height:0px;background:var(--layui-ripple-color);pointer-events:none}@keyframes size-effect{0%{width:0px;height:0px;opacity:.8}to{width:var(--layui-spread-size);height:var(--layui-spread-size);opacity:0}}.layui-water-ripples-container .layui-animate-once--inset{animation:size-effect 1s forwards}.layui-water-ripples-container .layui-animate-always--inset{animation:size-effect 1s infinite} +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Jz=typeof window!="undefined"&&typeof window.document!="undefined",HD=Jz?window:{},z4=Jz&&HD.document.documentElement?"ontouchstart"in HD.document.documentElement:!1,u4=Jz?"PointerEvent"in HD:!1,RN="cropper",a4="all",jy="crop",zy="move",uy="zoom",Ji="e",$i="w",St="s",xi="n",Ej="ne",xj="nw",Qj="se",Yj="sw",r4="".concat(RN,"-crop"),ay="".concat(RN,"-disabled"),$e="".concat(RN,"-hidden"),ry="".concat(RN,"-hide"),ev="".concat(RN,"-invisible"),$z="".concat(RN,"-modal"),g4="".concat(RN,"-move"),kj="".concat(RN,"Action"),Kz="".concat(RN,"Preview"),n4="crop",gy="move",ny="none",T4="crop",c4="cropend",s4="cropmove",y4="cropstart",Ty="dblclick",Dv=z4?"touchstart":"mousedown",iv=z4?"touchmove":"mousemove",tv=z4?"touchend touchcancel":"mouseup",cy=u4?"pointerdown":Dv,sy=u4?"pointermove":iv,yy=u4?"pointerup pointercancel":tv,Ly="ready",oy="resize",ly="wheel",L4="zoom",Iy="image/jpeg",jv=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,zv=/^data:/,uv=/^data:image\/jpeg;base64,/,av=/^img|canvas$/i,Oy=200,wy=100,Ay={viewMode:0,dragMode:n4,initialAspectRatio:NaN,aspectRatio:NaN,data:null,preview:"",responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,modal:!0,guides:!0,center:!0,highlight:!0,background:!0,autoCrop:!0,autoCropArea:.8,movable:!0,rotatable:!0,scalable:!0,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,wheelZoomRatio:.1,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,minCanvasWidth:0,minCanvasHeight:0,minCropBoxWidth:0,minCropBoxHeight:0,minContainerWidth:Oy,minContainerHeight:wy,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},rv='
',gv=Number.isNaN||HD.isNaN;function wN(M){return typeof M=="number"&&!gv(M)}var Ey=function(e){return e>0&&e<1/0};function o4(M){return typeof M=="undefined"}function Ki(M){return Xz(M)==="object"&&M!==null}var nv=Object.prototype.hasOwnProperty;function pt(M){if(!Ki(M))return!1;try{var e=M.constructor,N=e.prototype;return e&&N&&nv.call(N,"isPrototypeOf")}catch{return!1}}function Ke(M){return typeof M=="function"}var Tv=Array.prototype.slice;function xy(M){return Array.from?Array.from(M):Tv.call(M)}function De(M,e){return M&&Ke(e)&&(Array.isArray(M)||wN(M.length)?xy(M).forEach(function(N,i){e.call(M,N,i,M)}):Ki(M)&&Object.keys(M).forEach(function(N){e.call(M,M[N],N,M)})),M}var GN=Object.assign||function(e){for(var N=arguments.length,i=new Array(N>1?N-1:0),t=1;t0&&i.forEach(function(j){Ki(j)&&Object.keys(j).forEach(function(z){e[z]=j[z]})}),e},cv=/\.\d*(?:0|9){12}\d*$/;function ht(M){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return cv.test(M)?Math.round(M*e)/e:M}var sv=/^width|height|left|top|marginLeft|marginTop$/;function Qi(M,e){var N=M.style;De(e,function(i,t){sv.test(t)&&wN(i)&&(i="".concat(i,"px")),N[t]=i})}function yv(M,e){return M.classList?M.classList.contains(e):M.className.indexOf(e)>-1}function Te(M,e){if(!!e){if(wN(M.length)){De(M,function(i){Te(i,e)});return}if(M.classList){M.classList.add(e);return}var N=M.className.trim();N?N.indexOf(e)<0&&(M.className="".concat(N," ").concat(e)):M.className=e}}function ZD(M,e){if(!!e){if(wN(M.length)){De(M,function(N){ZD(N,e)});return}if(M.classList){M.classList.remove(e);return}M.className.indexOf(e)>=0&&(M.className=M.className.replace(e,""))}}function mt(M,e,N){if(!!e){if(wN(M.length)){De(M,function(i){mt(i,e,N)});return}N?Te(M,e):ZD(M,e)}}var Lv=/([a-z\d])([A-Z])/g;function l4(M){return M.replace(Lv,"$1-$2").toLowerCase()}function I4(M,e){return Ki(M[e])?M[e]:M.dataset?M.dataset[e]:M.getAttribute("data-".concat(l4(e)))}function fj(M,e,N){Ki(N)?M[e]=N:M.dataset?M.dataset[e]=N:M.setAttribute("data-".concat(l4(e)),N)}function ov(M,e){if(Ki(M[e]))try{delete M[e]}catch{M[e]=void 0}else if(M.dataset)try{delete M.dataset[e]}catch{M.dataset[e]=void 0}else M.removeAttribute("data-".concat(l4(e)))}var Qy=/\s\s*/,Yy=function(){var M=!1;if(Jz){var e=!1,N=function(){},i=Object.defineProperty({},"once",{get:function(){return M=!0,e},set:function(j){e=j}});HD.addEventListener("test",N,i),HD.removeEventListener("test",N,i)}return M}();function pD(M,e,N){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},t=N;e.trim().split(Qy).forEach(function(j){if(!Yy){var z=M.listeners;z&&z[j]&&z[j][N]&&(t=z[j][N],delete z[j][N],Object.keys(z[j]).length===0&&delete z[j],Object.keys(z).length===0&&delete M.listeners)}M.removeEventListener(j,t,i)})}function lD(M,e,N){var i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},t=N;e.trim().split(Qy).forEach(function(j){if(i.once&&!Yy){var z=M.listeners,u=z===void 0?{}:z;t=function(){delete u[j][N],M.removeEventListener(j,t,i);for(var r=arguments.length,g=new Array(r),n=0;nMath.abs(N)&&(N=T)})}),N}function qz(M,e){var N=M.pageX,i=M.pageY,t={endX:N,endY:i};return e?t:Dy({startX:N,startY:i},t)}function Ov(M){var e=0,N=0,i=0;return De(M,function(t){var j=t.startX,z=t.startY;e+=j,N+=z,i+=1}),e/=i,N/=i,{pageX:e,pageY:N}}function Yi(M){var e=M.aspectRatio,N=M.height,i=M.width,t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",j=Ey(i),z=Ey(N);if(j&&z){var u=N*e;t==="contain"&&u>i||t==="cover"&&u90?{width:a,height:u}:{width:u,height:a}}function Av(M,e,N,i){var t=e.aspectRatio,j=e.naturalWidth,z=e.naturalHeight,u=e.rotate,a=u===void 0?0:u,r=e.scaleX,g=r===void 0?1:r,n=e.scaleY,T=n===void 0?1:n,s=N.aspectRatio,o=N.naturalWidth,y=N.naturalHeight,l=i.fillColor,L=l===void 0?"transparent":l,I=i.imageSmoothingEnabled,w=I===void 0?!0:I,A=i.imageSmoothingQuality,k=A===void 0?"low":A,Q=i.maxWidth,E=Q===void 0?1/0:Q,f=i.maxHeight,C=f===void 0?1/0:f,P=i.minWidth,J=P===void 0?0:P,q=i.minHeight,MM=q===void 0?0:q,jM=document.createElement("canvas"),uM=jM.getContext("2d"),H=Yi({aspectRatio:s,width:E,height:C}),m=Yi({aspectRatio:s,width:J,height:MM},"cover"),rM=Math.min(H.width,Math.max(m.width,o)),NM=Math.min(H.height,Math.max(m.height,y)),zM=Yi({aspectRatio:t,width:E,height:C}),TM=Yi({aspectRatio:t,width:J,height:MM},"cover"),cM=Math.min(zM.width,Math.max(TM.width,j)),OM=Math.min(zM.height,Math.max(TM.height,z)),EM=[-cM/2,-OM/2,cM,OM];return jM.width=ht(rM),jM.height=ht(NM),uM.fillStyle=L,uM.fillRect(0,0,rM,NM),uM.save(),uM.translate(rM/2,NM/2),uM.rotate(a*Math.PI/180),uM.scale(g,T),uM.imageSmoothingEnabled=w,uM.imageSmoothingQuality=k,uM.drawImage.apply(uM,[M].concat(ty(EM.map(function(eM){return Math.floor(ht(eM))})))),uM.restore(),jM}var Cy=String.fromCharCode;function Ev(M,e,N){var i="";N+=e;for(var t=e;t0;)N.push(Cy.apply(null,xy(t.subarray(0,i)))),t=t.subarray(i);return"data:".concat(e,";base64,").concat(btoa(N.join("")))}function kv(M){var e=new DataView(M),N;try{var i,t,j;if(e.getUint8(0)===255&&e.getUint8(1)===216)for(var z=e.byteLength,u=2;u+1=8&&(j=r+n)}}}if(j){var T=e.getUint16(j,i),s,o;for(o=0;o=0?j:Oy),height:Math.max(i.offsetHeight,z>=0?z:wy)};this.containerData=u,Qi(t,{width:u.width,height:u.height}),Te(e,$e),ZD(t,$e)},initCanvas:function(){var e=this.containerData,N=this.imageData,i=this.options.viewMode,t=Math.abs(N.rotate)%180===90,j=t?N.naturalHeight:N.naturalWidth,z=t?N.naturalWidth:N.naturalHeight,u=j/z,a=e.width,r=e.height;e.height*u>e.width?i===3?a=e.height*u:r=e.width/u:i===3?r=e.width/u:a=e.height*u;var g={aspectRatio:u,naturalWidth:j,naturalHeight:z,width:a,height:r};this.canvasData=g,this.limited=i===1||i===2,this.limitCanvas(!0,!0),g.width=Math.min(Math.max(g.width,g.minWidth),g.maxWidth),g.height=Math.min(Math.max(g.height,g.minHeight),g.maxHeight),g.left=(e.width-g.width)/2,g.top=(e.height-g.height)/2,g.oldLeft=g.left,g.oldTop=g.top,this.initialCanvasData=GN({},g)},limitCanvas:function(e,N){var i=this.options,t=this.containerData,j=this.canvasData,z=this.cropBoxData,u=i.viewMode,a=j.aspectRatio,r=this.cropped&&z;if(e){var g=Number(i.minCanvasWidth)||0,n=Number(i.minCanvasHeight)||0;u>1?(g=Math.max(g,t.width),n=Math.max(n,t.height),u===3&&(n*a>g?g=n*a:n=g/a)):u>0&&(g?g=Math.max(g,r?z.width:0):n?n=Math.max(n,r?z.height:0):r&&(g=z.width,n=z.height,n*a>g?g=n*a:n=g/a));var T=Yi({aspectRatio:a,width:g,height:n});g=T.width,n=T.height,j.minWidth=g,j.minHeight=n,j.maxWidth=1/0,j.maxHeight=1/0}if(N)if(u>(r?0:1)){var s=t.width-j.width,o=t.height-j.height;j.minLeft=Math.min(0,s),j.minTop=Math.min(0,o),j.maxLeft=Math.max(0,s),j.maxTop=Math.max(0,o),r&&this.limited&&(j.minLeft=Math.min(z.left,z.left+(z.width-j.width)),j.minTop=Math.min(z.top,z.top+(z.height-j.height)),j.maxLeft=z.left,j.maxTop=z.top,u===2&&(j.width>=t.width&&(j.minLeft=Math.min(0,s),j.maxLeft=Math.max(0,s)),j.height>=t.height&&(j.minTop=Math.min(0,o),j.maxTop=Math.max(0,o))))}else j.minLeft=-j.width,j.minTop=-j.height,j.maxLeft=t.width,j.maxTop=t.height},renderCanvas:function(e,N){var i=this.canvasData,t=this.imageData;if(N){var j=wv({width:t.naturalWidth*Math.abs(t.scaleX||1),height:t.naturalHeight*Math.abs(t.scaleY||1),degree:t.rotate||0}),z=j.width,u=j.height,a=i.width*(z/i.naturalWidth),r=i.height*(u/i.naturalHeight);i.left-=(a-i.width)/2,i.top-=(r-i.height)/2,i.width=a,i.height=r,i.aspectRatio=z/u,i.naturalWidth=z,i.naturalHeight=u,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.widthi.maxHeight||i.heightN.width?j.height=j.width/i:j.width=j.height*i),this.cropBoxData=j,this.limitCropBox(!0,!0),j.width=Math.min(Math.max(j.width,j.minWidth),j.maxWidth),j.height=Math.min(Math.max(j.height,j.minHeight),j.maxHeight),j.width=Math.max(j.minWidth,j.width*t),j.height=Math.max(j.minHeight,j.height*t),j.left=N.left+(N.width-j.width)/2,j.top=N.top+(N.height-j.height)/2,j.oldLeft=j.left,j.oldTop=j.top,this.initialCropBoxData=GN({},j)},limitCropBox:function(e,N){var i=this.options,t=this.containerData,j=this.canvasData,z=this.cropBoxData,u=this.limited,a=i.aspectRatio;if(e){var r=Number(i.minCropBoxWidth)||0,g=Number(i.minCropBoxHeight)||0,n=u?Math.min(t.width,j.width,j.width+j.left,t.width-j.left):t.width,T=u?Math.min(t.height,j.height,j.height+j.top,t.height-j.top):t.height;r=Math.min(r,t.width),g=Math.min(g,t.height),a&&(r&&g?g*a>r?g=r/a:r=g*a:r?g=r/a:g&&(r=g*a),T*a>n?T=n/a:n=T*a),z.minWidth=Math.min(r,n),z.minHeight=Math.min(g,T),z.maxWidth=n,z.maxHeight=T}N&&(u?(z.minLeft=Math.max(0,j.left),z.minTop=Math.max(0,j.top),z.maxLeft=Math.min(t.width,j.left+j.width)-z.width,z.maxTop=Math.min(t.height,j.top+j.height)-z.height):(z.minLeft=0,z.minTop=0,z.maxLeft=t.width-z.width,z.maxTop=t.height-z.height))},renderCropBox:function(){var e=this.options,N=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.widthi.maxHeight||i.height=N.width&&i.height>=N.height?zy:a4),Qi(this.cropBox,GN({width:i.width,height:i.height},dj({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Bt(this.element,T4,this.getData())}},Cv={initPreview:function(){var e=this.element,N=this.crossOrigin,i=this.options.preview,t=N?this.crossOriginUrl:this.url,j=e.alt||"The image to preview",z=document.createElement("img");if(N&&(z.crossOrigin=N),z.src=t,z.alt=j,this.viewBox.appendChild(z),this.viewBoxImage=z,!!i){var u=i;typeof i=="string"?u=e.ownerDocument.querySelectorAll(i):i.querySelector&&(u=[i]),this.previews=u,De(u,function(a){var r=document.createElement("img");fj(a,Kz,{width:a.offsetWidth,height:a.offsetHeight,html:a.innerHTML}),N&&(r.crossOrigin=N),r.src=t,r.alt=j,r.style.cssText='display:block;width:100%;height:auto;min-width:0!important;min-height:0!important;max-width:none!important;max-height:none!important;image-orientation:0deg!important;"',a.innerHTML="",a.appendChild(r)})}},resetPreview:function(){De(this.previews,function(e){var N=I4(e,Kz);Qi(e,{width:N.width,height:N.height}),e.innerHTML=N.html,ov(e,Kz)})},preview:function(){var e=this.imageData,N=this.canvasData,i=this.cropBoxData,t=i.width,j=i.height,z=e.width,u=e.height,a=i.left-N.left-e.left,r=i.top-N.top-e.top;!this.cropped||this.disabled||(Qi(this.viewBoxImage,GN({width:z,height:u},dj(GN({translateX:-a,translateY:-r},e)))),De(this.previews,function(g){var n=I4(g,Kz),T=n.width,s=n.height,o=T,y=s,l=1;t&&(l=T/t,y=j*l),j&&y>s&&(l=s/j,o=t*l,y=s),Qi(g,{width:o,height:y}),Qi(g.getElementsByTagName("img")[0],GN({width:z*l,height:u*l},dj(GN({translateX:-a*l,translateY:-r*l},e))))}))}},Uv={bind:function(){var e=this.element,N=this.options,i=this.cropper;Ke(N.cropstart)&&lD(e,y4,N.cropstart),Ke(N.cropmove)&&lD(e,s4,N.cropmove),Ke(N.cropend)&&lD(e,c4,N.cropend),Ke(N.crop)&&lD(e,T4,N.crop),Ke(N.zoom)&&lD(e,L4,N.zoom),lD(i,cy,this.onCropStart=this.cropStart.bind(this)),N.zoomable&&N.zoomOnWheel&&lD(i,ly,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),N.toggleDragModeOnDblclick&&lD(i,Ty,this.onDblclick=this.dblclick.bind(this)),lD(e.ownerDocument,sy,this.onCropMove=this.cropMove.bind(this)),lD(e.ownerDocument,yy,this.onCropEnd=this.cropEnd.bind(this)),N.responsive&&lD(window,oy,this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,N=this.options,i=this.cropper;Ke(N.cropstart)&&pD(e,y4,N.cropstart),Ke(N.cropmove)&&pD(e,s4,N.cropmove),Ke(N.cropend)&&pD(e,c4,N.cropend),Ke(N.crop)&&pD(e,T4,N.crop),Ke(N.zoom)&&pD(e,L4,N.zoom),pD(i,cy,this.onCropStart),N.zoomable&&N.zoomOnWheel&&pD(i,ly,this.onWheel,{passive:!1,capture:!0}),N.toggleDragModeOnDblclick&&pD(i,Ty,this.onDblclick),pD(e.ownerDocument,sy,this.onCropMove),pD(e.ownerDocument,yy,this.onCropEnd),N.responsive&&pD(window,oy,this.onResize)}},Sv={resize:function(){if(!this.disabled){var e=this.options,N=this.container,i=this.containerData,t=N.offsetWidth/i.width,j=N.offsetHeight/i.height,z=Math.abs(t-1)>Math.abs(j-1)?t:j;if(z!==1){var u,a;e.restore&&(u=this.getCanvasData(),a=this.getCropBoxData()),this.render(),e.restore&&(this.setCanvasData(De(u,function(r,g){u[g]=r*z})),this.setCropBoxData(De(a,function(r,g){a[g]=r*z})))}}},dblclick:function(){this.disabled||this.options.dragMode===ny||this.setDragMode(yv(this.dragBox,r4)?gy:n4)},wheel:function(e){var N=this,i=Number(this.options.wheelZoomRatio)||.1,t=1;this.disabled||(e.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){N.wheeling=!1},50),e.deltaY?t=e.deltaY>0?1:-1:e.wheelDelta?t=-e.wheelDelta/120:e.detail&&(t=e.detail>0?1:-1),this.zoom(-t*i,e)))},cropStart:function(e){var N=e.buttons,i=e.button;if(!(this.disabled||(e.type==="mousedown"||e.type==="pointerdown"&&e.pointerType==="mouse")&&(wN(N)&&N!==1||wN(i)&&i!==0||e.ctrlKey))){var t=this.options,j=this.pointers,z;e.changedTouches?De(e.changedTouches,function(u){j[u.identifier]=qz(u)}):j[e.pointerId||0]=qz(e),Object.keys(j).length>1&&t.zoomable&&t.zoomOnTouch?z=uy:z=I4(e.target,kj),!!jv.test(z)&&Bt(this.element,y4,{originalEvent:e,action:z})!==!1&&(e.preventDefault(),this.action=z,this.cropping=!1,z===jy&&(this.cropping=!0,Te(this.dragBox,$z)))}},cropMove:function(e){var N=this.action;if(!(this.disabled||!N)){var i=this.pointers;e.preventDefault(),Bt(this.element,s4,{originalEvent:e,action:N})!==!1&&(e.changedTouches?De(e.changedTouches,function(t){GN(i[t.identifier]||{},qz(t,!0))}):GN(i[e.pointerId||0]||{},qz(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var N=this.action,i=this.pointers;e.changedTouches?De(e.changedTouches,function(t){delete i[t.identifier]}):delete i[e.pointerId||0],N&&(e.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,mt(this.dragBox,$z,this.cropped&&this.options.modal)),Bt(this.element,c4,{originalEvent:e,action:N}))}}},pv={change:function(e){var N=this.options,i=this.canvasData,t=this.containerData,j=this.cropBoxData,z=this.pointers,u=this.action,a=N.aspectRatio,r=j.left,g=j.top,n=j.width,T=j.height,s=r+n,o=g+T,y=0,l=0,L=t.width,I=t.height,w=!0,A;!a&&e.shiftKey&&(a=n&&T?n/T:1),this.limited&&(y=j.minLeft,l=j.minTop,L=y+Math.min(t.width,i.width,i.left+i.width),I=l+Math.min(t.height,i.height,i.top+i.height));var k=z[Object.keys(z)[0]],Q={x:k.endX-k.startX,y:k.endY-k.startY},E=function(C){switch(C){case Ji:s+Q.x>L&&(Q.x=L-s);break;case $i:r+Q.xI&&(Q.y=I-o);break}};switch(u){case a4:r+=Q.x,g+=Q.y;break;case Ji:if(Q.x>=0&&(s>=L||a&&(g<=l||o>=I))){w=!1;break}E(Ji),n+=Q.x,n<0&&(u=$i,n=-n,r-=n),a&&(T=n/a,g+=(j.height-T)/2);break;case xi:if(Q.y<=0&&(g<=l||a&&(r<=y||s>=L))){w=!1;break}E(xi),T-=Q.y,g+=Q.y,T<0&&(u=St,T=-T,g-=T),a&&(n=T*a,r+=(j.width-n)/2);break;case $i:if(Q.x<=0&&(r<=y||a&&(g<=l||o>=I))){w=!1;break}E($i),n-=Q.x,r+=Q.x,n<0&&(u=Ji,n=-n,r-=n),a&&(T=n/a,g+=(j.height-T)/2);break;case St:if(Q.y>=0&&(o>=I||a&&(r<=y||s>=L))){w=!1;break}E(St),T+=Q.y,T<0&&(u=xi,T=-T,g-=T),a&&(n=T*a,r+=(j.width-n)/2);break;case Ej:if(a){if(Q.y<=0&&(g<=l||s>=L)){w=!1;break}E(xi),T-=Q.y,g+=Q.y,n=T*a}else E(xi),E(Ji),Q.x>=0?sl&&(T-=Q.y,g+=Q.y):(T-=Q.y,g+=Q.y);n<0&&T<0?(u=Yj,T=-T,n=-n,g-=T,r-=n):n<0?(u=xj,n=-n,r-=n):T<0&&(u=Qj,T=-T,g-=T);break;case xj:if(a){if(Q.y<=0&&(g<=l||r<=y)){w=!1;break}E(xi),T-=Q.y,g+=Q.y,n=T*a,r+=j.width-n}else E(xi),E($i),Q.x<=0?r>y?(n-=Q.x,r+=Q.x):Q.y<=0&&g<=l&&(w=!1):(n-=Q.x,r+=Q.x),Q.y<=0?g>l&&(T-=Q.y,g+=Q.y):(T-=Q.y,g+=Q.y);n<0&&T<0?(u=Qj,T=-T,n=-n,g-=T,r-=n):n<0?(u=Ej,n=-n,r-=n):T<0&&(u=Yj,T=-T,g-=T);break;case Yj:if(a){if(Q.x<=0&&(r<=y||o>=I)){w=!1;break}E($i),n-=Q.x,r+=Q.x,T=n/a}else E(St),E($i),Q.x<=0?r>y?(n-=Q.x,r+=Q.x):Q.y>=0&&o>=I&&(w=!1):(n-=Q.x,r+=Q.x),Q.y>=0?o=0&&(s>=L||o>=I)){w=!1;break}E(Ji),n+=Q.x,T=n/a}else E(St),E(Ji),Q.x>=0?s=0&&o>=I&&(w=!1):n+=Q.x,Q.y>=0?o0?u=Q.y>0?Qj:Ej:Q.x<0&&(r-=n,u=Q.y>0?Yj:xj),Q.y<0&&(g-=T),this.cropped||(ZD(this.cropBox,$e),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}w&&(j.width=n,j.height=T,j.left=r,j.top=g,this.action=u,this.renderCropBox()),De(z,function(f){f.startX=f.endX,f.startY=f.endY})}},hv={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Te(this.dragBox,$z),ZD(this.cropBox,$e),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=GN({},this.initialImageData),this.canvasData=GN({},this.initialCanvasData),this.cropBoxData=GN({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(GN(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),ZD(this.dragBox,$z),Te(this.cropBox,$e)),this},replace:function(e){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&e&&(this.isImg&&(this.element.src=e),N?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,De(this.previews,function(i){i.getElementsByTagName("img")[0].src=e}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,ZD(this.cropper,ay)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Te(this.cropper,ay)),this},destroy:function(){var e=this.element;return e[RN]?(e[RN]=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,i=this.canvasData,t=i.left,j=i.top;return this.moveTo(o4(e)?e:t+Number(e),o4(N)?N:j+Number(N))},moveTo:function(e){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,i=this.canvasData,t=!1;return e=Number(e),N=Number(N),this.ready&&!this.disabled&&this.options.movable&&(wN(e)&&(i.left=e,t=!0),wN(N)&&(i.top=N,t=!0),t&&this.renderCanvas(!0)),this},zoom:function(e,N){var i=this.canvasData;return e=Number(e),e<0?e=1/(1-e):e=1+e,this.zoomTo(i.width*e/i.naturalWidth,null,N)},zoomTo:function(e,N,i){var t=this.options,j=this.canvasData,z=j.width,u=j.height,a=j.naturalWidth,r=j.naturalHeight;if(e=Number(e),e>=0&&this.ready&&!this.disabled&&t.zoomable){var g=a*e,n=r*e;if(Bt(this.element,L4,{ratio:e,oldRatio:z/a,originalEvent:i})===!1)return this;if(i){var T=this.pointers,s=ky(this.cropper),o=T&&Object.keys(T).length?Ov(T):{pageX:i.pageX,pageY:i.pageY};j.left-=(g-z)*((o.pageX-s.left-j.left)/z),j.top-=(n-u)*((o.pageY-s.top-j.top)/u)}else pt(N)&&wN(N.x)&&wN(N.y)?(j.left-=(g-z)*((N.x-j.left)/z),j.top-=(n-u)*((N.y-j.top)/u)):(j.left-=(g-z)/2,j.top-=(n-u)/2);j.width=g,j.height=n,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return e=Number(e),wN(e)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var N=this.imageData.scaleY;return this.scale(e,wN(N)?N:1)},scaleY:function(e){var N=this.imageData.scaleX;return this.scale(wN(N)?N:1,e)},scale:function(e){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:e,i=this.imageData,t=!1;return e=Number(e),N=Number(N),this.ready&&!this.disabled&&this.options.scalable&&(wN(e)&&(i.scaleX=e,t=!0),wN(N)&&(i.scaleY=N,t=!0),t&&this.renderCanvas(!0,!0)),this},getData:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,N=this.options,i=this.imageData,t=this.canvasData,j=this.cropBoxData,z;if(this.ready&&this.cropped){z={x:j.left-t.left,y:j.top-t.top,width:j.width,height:j.height};var u=i.width/i.naturalWidth;if(De(z,function(g,n){z[n]=g/u}),e){var a=Math.round(z.y+z.height),r=Math.round(z.x+z.width);z.x=Math.round(z.x),z.y=Math.round(z.y),z.width=r-z.x,z.height=a-z.y}}else z={x:0,y:0,width:0,height:0};return N.rotatable&&(z.rotate=i.rotate||0),N.scalable&&(z.scaleX=i.scaleX||1,z.scaleY=i.scaleY||1),z},setData:function(e){var N=this.options,i=this.imageData,t=this.canvasData,j={};if(this.ready&&!this.disabled&&pt(e)){var z=!1;N.rotatable&&wN(e.rotate)&&e.rotate!==i.rotate&&(i.rotate=e.rotate,z=!0),N.scalable&&(wN(e.scaleX)&&e.scaleX!==i.scaleX&&(i.scaleX=e.scaleX,z=!0),wN(e.scaleY)&&e.scaleY!==i.scaleY&&(i.scaleY=e.scaleY,z=!0)),z&&this.renderCanvas(!0,!0);var u=i.width/i.naturalWidth;wN(e.x)&&(j.left=e.x*u+t.left),wN(e.y)&&(j.top=e.y*u+t.top),wN(e.width)&&(j.width=e.width*u),wN(e.height)&&(j.height=e.height*u),this.setCropBoxData(j)}return this},getContainerData:function(){return this.ready?GN({},this.containerData):{}},getImageData:function(){return this.sized?GN({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,N={};return this.ready&&De(["left","top","width","height","naturalWidth","naturalHeight"],function(i){N[i]=e[i]}),N},setCanvasData:function(e){var N=this.canvasData,i=N.aspectRatio;return this.ready&&!this.disabled&&pt(e)&&(wN(e.left)&&(N.left=e.left),wN(e.top)&&(N.top=e.top),wN(e.width)?(N.width=e.width,N.height=e.width/i):wN(e.height)&&(N.height=e.height,N.width=e.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var e=this.cropBoxData,N;return this.ready&&this.cropped&&(N={left:e.left,top:e.top,width:e.width,height:e.height}),N||{}},setCropBoxData:function(e){var N=this.cropBoxData,i=this.options.aspectRatio,t,j;return this.ready&&this.cropped&&!this.disabled&&pt(e)&&(wN(e.left)&&(N.left=e.left),wN(e.top)&&(N.top=e.top),wN(e.width)&&e.width!==N.width&&(t=!0,N.width=e.width),wN(e.height)&&e.height!==N.height&&(j=!0,N.height=e.height),i&&(t?N.height=N.width/i:j&&(N.width=N.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var N=this.canvasData,i=Av(this.image,this.imageData,N,e);if(!this.cropped)return i;var t=this.getData(),j=t.x,z=t.y,u=t.width,a=t.height,r=i.width/Math.floor(N.naturalWidth);r!==1&&(j*=r,z*=r,u*=r,a*=r);var g=u/a,n=Yi({aspectRatio:g,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),T=Yi({aspectRatio:g,width:e.minWidth||0,height:e.minHeight||0},"cover"),s=Yi({aspectRatio:g,width:e.width||(r!==1?i.width:u),height:e.height||(r!==1?i.height:a)}),o=s.width,y=s.height;o=Math.min(n.width,Math.max(T.width,o)),y=Math.min(n.height,Math.max(T.height,y));var l=document.createElement("canvas"),L=l.getContext("2d");l.width=ht(o),l.height=ht(y),L.fillStyle=e.fillColor||"transparent",L.fillRect(0,0,o,y);var I=e.imageSmoothingEnabled,w=I===void 0?!0:I,A=e.imageSmoothingQuality;L.imageSmoothingEnabled=w,A&&(L.imageSmoothingQuality=A);var k=i.width,Q=i.height,E=j,f=z,C,P,J,q,MM,jM;E<=-u||E>k?(E=0,C=0,J=0,MM=0):E<=0?(J=-E,E=0,C=Math.min(k,u+E),MM=C):E<=k&&(J=0,C=Math.min(u,k-E),MM=C),C<=0||f<=-a||f>Q?(f=0,P=0,q=0,jM=0):f<=0?(q=-f,f=0,P=Math.min(Q,a+f),jM=P):f<=Q&&(q=0,P=Math.min(a,Q-f),jM=P);var uM=[E,f,C,P];if(MM>0&&jM>0){var H=o/u;uM.push(J*H,q*H,MM*H,jM*H)}return L.drawImage.apply(L,[i].concat(ty(uM.map(function(m){return Math.floor(ht(m))})))),l},setAspectRatio:function(e){var N=this.options;return!this.disabled&&!o4(e)&&(N.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var N=this.options,i=this.dragBox,t=this.face;if(this.ready&&!this.disabled){var j=e===n4,z=N.movable&&e===gy;e=j||z?e:ny,N.dragMode=e,fj(i,kj,e),mt(i,r4,j),mt(i,g4,z),N.cropBoxMovable||(fj(t,kj,e),mt(t,r4,j),mt(t,g4,z))}return this}},mv=HD.Cropper,Uy=function(){function M(e){var N=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Xb(this,M),!e||!av.test(e.tagName))throw new Error("The first argument is required and must be an or element.");this.element=e,this.options=GN({},Ay,pt(N)&&N),this.cropped=!1,this.disabled=!1,this.pointers={},this.ready=!1,this.reloading=!1,this.replaced=!1,this.sized=!1,this.sizing=!1,this.init()}return Jb(M,[{key:"init",value:function(){var N=this.element,i=N.tagName.toLowerCase(),t;if(!N[RN]){if(N[RN]=this,i==="img"){if(this.isImg=!0,t=N.getAttribute("src")||"",this.originalUrl=t,!t)return;t=N.src}else i==="canvas"&&window.HTMLCanvasElement&&(t=N.toDataURL());this.load(t)}}},{key:"load",value:function(N){var i=this;if(!!N){this.url=N,this.imageData={};var t=this.element,j=this.options;if(!j.rotatable&&!j.scalable&&(j.checkOrientation=!1),!j.checkOrientation||!window.ArrayBuffer){this.clone();return}if(zv.test(N)){uv.test(N)?this.read(Qv(N)):this.clone();return}var z=new XMLHttpRequest,u=this.clone.bind(this);this.reloading=!0,this.xhr=z,z.onabort=u,z.onerror=u,z.ontimeout=u,z.onprogress=function(){z.getResponseHeader("content-type")!==Iy&&z.abort()},z.onload=function(){i.read(z.response)},z.onloadend=function(){i.reloading=!1,i.xhr=null},j.checkCrossOrigin&&fy(N)&&t.crossOrigin&&(N=dy(N)),z.open("GET",N,!0),z.responseType="arraybuffer",z.withCredentials=t.crossOrigin==="use-credentials",z.send()}}},{key:"read",value:function(N){var i=this.options,t=this.imageData,j=kv(N),z=0,u=1,a=1;if(j>1){this.url=Yv(N,Iy);var r=fv(j);z=r.rotate,u=r.scaleX,a=r.scaleY}i.rotatable&&(t.rotate=z),i.scalable&&(t.scaleX=u,t.scaleY=a),this.clone()}},{key:"clone",value:function(){var N=this.element,i=this.url,t=N.crossOrigin,j=i;this.options.checkCrossOrigin&&fy(i)&&(t||(t="anonymous"),j=dy(i)),this.crossOrigin=t,this.crossOriginUrl=j;var z=document.createElement("img");t&&(z.crossOrigin=t),z.src=j||i,z.alt=N.alt||"The image to crop",this.image=z,z.onload=this.start.bind(this),z.onerror=this.stop.bind(this),Te(z,ry),N.parentNode.insertBefore(z,N.nextSibling)}},{key:"start",value:function(){var N=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var t=HD.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(HD.navigator.userAgent),j=function(r,g){GN(N.imageData,{naturalWidth:r,naturalHeight:g,aspectRatio:r/g}),N.initialImageData=GN({},N.imageData),N.sizing=!1,N.sized=!0,N.build()};if(i.naturalWidth&&!t){j(i.naturalWidth,i.naturalHeight);return}var z=document.createElement("img"),u=document.body||document.documentElement;this.sizingImage=z,z.onload=function(){j(z.width,z.height),t||u.removeChild(z)},z.src=i.src,t||(z.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",u.appendChild(z))}},{key:"stop",value:function(){var N=this.image;N.onload=null,N.onerror=null,N.parentNode.removeChild(N),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var N=this.element,i=this.options,t=this.image,j=N.parentNode,z=document.createElement("div");z.innerHTML=rv;var u=z.querySelector(".".concat(RN,"-container")),a=u.querySelector(".".concat(RN,"-canvas")),r=u.querySelector(".".concat(RN,"-drag-box")),g=u.querySelector(".".concat(RN,"-crop-box")),n=g.querySelector(".".concat(RN,"-face"));this.container=j,this.cropper=u,this.canvas=a,this.dragBox=r,this.cropBox=g,this.viewBox=u.querySelector(".".concat(RN,"-view-box")),this.face=n,a.appendChild(t),Te(N,$e),j.insertBefore(u,N.nextSibling),this.isImg||ZD(t,ry),this.initPreview(),this.bind(),i.initialAspectRatio=Math.max(0,i.initialAspectRatio)||NaN,i.aspectRatio=Math.max(0,i.aspectRatio)||NaN,i.viewMode=Math.max(0,Math.min(3,Math.round(i.viewMode)))||0,Te(g,$e),i.guides||Te(g.getElementsByClassName("".concat(RN,"-dashed")),$e),i.center||Te(g.getElementsByClassName("".concat(RN,"-center")),$e),i.background&&Te(u,"".concat(RN,"-bg")),i.highlight||Te(n,ev),i.cropBoxMovable&&(Te(n,g4),fj(n,kj,a4)),i.cropBoxResizable||(Te(g.getElementsByClassName("".concat(RN,"-line")),$e),Te(g.getElementsByClassName("".concat(RN,"-point")),$e)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),Ke(i.ready)&&lD(N,Ly,i.ready,{once:!0}),Bt(N,Ly)}}},{key:"unbuild",value:function(){!this.ready||(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),ZD(this.element,$e))}},{key:"uncreate",value:function(){this.ready?(this.unbuild(),this.ready=!1,this.cropped=!1):this.sizing?(this.sizingImage.onload=null,this.sizing=!1,this.sized=!1):this.reloading?(this.xhr.onabort=null,this.xhr.abort()):this.image&&this.stop()}}],[{key:"noConflict",value:function(){return window.Cropper=mv,M}},{key:"setDefaults",value:function(N){GN(Ay,pt(N)&&N)}}]),M}();GN(Uy.prototype,dv,Cv,Uv,Sv,pv,hv);const Bv=["name","field","multiple","accept","disabled"],bv={key:0},vv=["onClick"],Fv=["onClick"],_v=D.createElementVNode("i",{class:"layui-icon"},"\uE67C",-1),Pv=D.createElementVNode("div",{class:"layui-hide",id:"uploadDemoView"},[D.createElementVNode("hr"),D.createElementVNode("img",{src:"",alt:"\u4E0A\u4F20\u6210\u529F\u540E\u6E32\u67D3",style:{"max-width":"196px"}})],-1),Rv=["src","id"],Gv={name:"LayUpload"},Wv=D.defineComponent({...Gv,props:{url:null,data:null,headers:null,acceptMime:{default:"MIME_type"},field:{default:"file"},size:{default:0},multiple:{type:Boolean,default:!1},number:{default:0},drag:{type:Boolean,default:!1},disabled:{type:Boolean,default:!1},disabledPreview:{type:Boolean,default:!1},cut:{type:Boolean,default:!1},cutOptions:{default:void 0},text:null,dragText:null,modelValue:{default:null},auto:{type:Boolean,default:!0},sizeOutMsg:null,quality:null},emits:["choose","chooseAfter","before","done","error","cutdone","cutcancel","update:modelValue"],setup(M,{emit:e}){const N=M;function i(d){return new Promise((Z,h)=>{var R={file:d,quality:N.quality,mimeType:"image/jpeg",maxWidth:2e3,maxHeight:2e3,convertSize:1/0,loose:!0,redressOrientation:!0,success:function(p){Z(p)}};new Zb(R)})}const t=()=>{if(q){let Z=q.getCroppedCanvas().toDataURL('"image/png"'),h=new Date().valueOf(),R=C.value[0];e("cutdone",Object.assign({currentTimeStamp:h,cutResult:Z,orginal:R}));let p=H(Z);if(!N.auto){e("update:modelValue",[p]),u();return}TM([p]),D.nextTick(()=>z())}else m(y.value)},j=()=>{let d=new Date().valueOf();e("cutcancel",Object.assign({currentTimeStamp:d})),D.nextTick(()=>z())},z=()=>{C.value=[],P.value=[],jM.value=!1,J.value.value="",q=null},u=()=>{C.value=[],P.value=[],jM.value=!1,q=null},{t:a}=eD(),r=D.computed(()=>N.text?N.text:a("upload.text")),g=D.computed(()=>N.dragText?N.dragText:a("upload.dragText")),n=D.computed(()=>a("upload.defaultErrorMsg")),T=D.computed(()=>a("upload.urlErrorMsg")),s=D.computed(()=>a("upload.numberErrorMsg")),o=D.computed(()=>a("upload.occurFileSizeErrorMsg")),y=D.computed(()=>a("upload.cutInitErrorMsg")),l=D.computed(()=>a("upload.uploadSuccess")),L=D.computed(()=>a("upload.startUploadMsg")),I=D.computed(()=>a("upload.cannotSupportCutMsg")),w=D.computed(()=>a("upload.title")),A=D.computed(()=>a("upload.confirmBtn")),k=D.computed(()=>a("upload.cancelBtn"));let Q=D.computed(()=>({type:"component",title:w.value,shade:!0,shadeClose:!0,area:["640px","640px"],btn:[{text:A.value,callback:t},{text:k.value,callback:j}]}));const E=D.useSlots();E.default&&E.default(),D.getCurrentInstance(),D.watch(()=>N.modelValue,()=>{N.modelValue||z()});const f=D.ref(!1),C=D.ref([]),P=D.ref([]),J=BA("orgFileInput");let q=null,MM;N.cutOptions&&N.cutOptions.layerOption?MM=D.computed(()=>Object.assign(Q,N.cutOptions.layerOption)):MM=D.computed(()=>Q.value);const jM=D.ref(!1),uM=async d=>{const{url:Z,files:h}=d;let R=new FormData;if(Z.length<=5){m(T.value);return}if(Array.isArray(h)&&h.length>0)for(let G=0;G{rM({url:Z,formData:R},function(){clearTimeout(p)})},200)},H=d=>{let Z=d.split(","),h="";Z.length>0&&(h=Z[0].match(/:(.*?);/)[1]);let R=atob(Z[1]),p=R.length,G=new Uint8Array(p);for(;p--;)G[p]=R.charCodeAt(p);return new Blob([G],{type:h})},m=d=>{let Z=new Date().valueOf(),h=d||n;h=`${h}`,console.warn(h),oe.msg(h,{icon:2,time:1e3},function(R){}),e("error",Object.assign({currentTimeStamp:Z,msg:h}))},rM=(d,Z)=>{let h=new XMLHttpRequest,R=d.url,p=d.formData;const G=Z;if(h.onreadystatechange=function(){let gM=new Date().valueOf();if(h.readyState===1){if(h.status>=200&&h.status<=300||h.status===304||h.status==0){let DM=L.value;e("before",Object.assign({currentTimeStamp:gM,msg:DM,...d}))}}else if(h.readyState===4){let DM=h.responseText?h.responseText:l;if(h.status>=200&&h.status<=300||h.status===304||h.status==0){let wM=h.responseText;e("done",{currentTimeStamp:gM,msg:DM,data:wM})}}},h.open("post",R,!0),N.headers)for(let gM in N.headers)h.setRequestHeader(gM,N.headers[gM]);else h.setRequestHeader("Accept","application/json, text/javascript");let iM=new Date().valueOf();e("before",Object.assign(d,iM)),h.send(p),G&&typeof G=="function"&&G(),z()},NM=(d,Z)=>{const h=new FileReader;h.onloadend=function(R){Z(R.target.result)},h.readAsDataURL(d)},zM=d=>{d.preventDefault();const Z=[...d.target.files||d.dataTransfer.files];if(N.multiple&&N.number!=0&&N.numberN.size*1024){m(N.sizeOutMsg||o.value);return}}for(let p of Z)C.value.push(p),NM(p,function(G){P.value.push(G)});let h=N.cut&&N.acceptMime.indexOf("image")!=-1&&N.multiple==!1,R=N.cut&&N.acceptMime.indexOf("image")!=-1&&N.multiple==!0;if(h)jM.value=!0,setTimeout(()=>{let p=document.getElementsByClassName("_lay_upload_img");if(p&&p.length>0){let G=p[0];q=new Uy(G,{aspectRatio:16/9})}else z()},200);else{if(R&&console.warn(I.value),!N.auto){e("update:modelValue",Z);return}TM(Z)}},TM=d=>{let Z=new Date().valueOf(),h=l;N.url?uM({url:N.url,files:d}):(e("done",{currentTimeStamp:Z,msg:h,data:d}),z())},cM=()=>{let d=J.value;d&&d.click()},OM=()=>{let d=new Date().valueOf();e("choose",d)},EM=D.ref();function eM(d){d.stopPropagation(),d.preventDefault()}function nM(d){d.stopPropagation(),d.preventDefault()}return D.onMounted(()=>{D.nextTick(()=>{EM.value&&(EM.value.addEventListener("dragenter",eM,!1),EM.value.addEventListener("dragover",nM,!1),EM.value.addEventListener("drop",zM,!1))})}),D.onUnmounted(()=>{EM.value&&(EM.value.removeEventListener("dragenter"),EM.value.removeEventListener("dragover"),EM.value.removeEventListener("drop"))}),(d,Z)=>(D.openBlock(),D.createElementBlock("div",{class:D.normalizeClass(["layui-upload layui-upload-wrap",M.disabledPreview?"layui-upload-file-disabled":""])},[D.createElementVNode("input",{type:"file",class:"layui-upload-file",ref_key:"orgFileInput",ref:J,name:M.field,field:M.field,multiple:M.multiple,accept:M.acceptMime,disabled:M.disabled,onClick:OM,onChange:zM},null,40,Bv),M.drag?(D.openBlock(),D.createElementBlock("div",{key:1,ref_key:"dragRef",ref:EM,class:D.normalizeClass(["layui-upload-drag",M.disabled?"layui-upload-drag-disable":f.value?"layui-upload-drag-draging":""]),onClick:D.withModifiers(cM,["stop"])},[_v,D.createElementVNode("p",null,D.toDisplayString(D.unref(g)),1),Pv],10,Fv)):(D.openBlock(),D.createElementBlock("div",bv,[D.createElementVNode("div",{class:"layui-upload-btn-box",onClick:D.withModifiers(cM,["stop"])},[D.unref(E).default?D.renderSlot(d.$slots,"default",{key:0,disabled:M.disabled}):(D.openBlock(),D.createBlock(nt,{key:1,type:"primary",disabled:M.disabled},{default:D.withCtx(()=>[D.createTextVNode(D.toDisplayString(D.unref(r)),1)]),_:1},8,["disabled"]))],8,vv)])),D.createVNode(D.unref(Hj),{modelValue:jM.value,"onUpdate:modelValue":Z[0]||(Z[0]=h=>jM.value=h),title:D.unref(MM).title,move:D.unref(MM).move,resize:D.unref(MM).resize,shade:D.unref(MM).shade,shadeClose:D.unref(MM).shadeClose,shadeOpacity:D.unref(MM).shadeOpacity,zIndex:D.unref(MM).zIndex,btnAlign:D.unref(MM).btnAlign,area:D.unref(MM).area,anim:D.unref(MM).anim,isOutAnim:D.unref(MM).isOutAnim,btn:D.unref(MM).btn,onClose:z},{default:D.withCtx(()=>[(D.openBlock(!0),D.createElementBlock(D.Fragment,null,D.renderList(P.value,(h,R)=>(D.openBlock(),D.createElementBlock("div",{class:"copper-container",key:`file${R}`},[D.createElementVNode("img",{src:h,id:`_lay_upload_img${R}`,class:"_lay_upload_img"},null,8,Rv)]))),128))]),_:1},8,["modelValue","title","move","resize","shade","shadeClose","shadeOpacity","zIndex","btnAlign","area","anim","isOutAnim","btn"]),D.createElementVNode("div",{class:D.normalizeClass(["layui-upload-list",M.disabledPreview?"layui-upload-list-disabled":""])},[D.renderSlot(d.$slots,"preview")],2)],2))}}),Sy=JM(Wv);var Y_=(()=>`.layui-water-ripples-container{position:relative;display:inline-block}.layui-water-ripples-container .layui-slot-container{position:relative;z-index:2}.layui-water-ripples-container .layui-out-ripples{position:absolute;left:0;top:0;height:100%;opacity:1;z-index:1;pointer-events:none}.layui-water-ripples-container .layui-animate-once--out{animation:ripple-effect 1s forwards}.layui-water-ripples-container .layui-animate-always--out{animation:ripple-effect 1s infinite}@keyframes ripple-effect{0%{box-shadow:0 0 0 0 var(--layui-ripple-color);opacity:.4}to{box-shadow:0 0 0 var(--layui-spread-width) var(--layui-ripple-color);opacity:0}}.layui-water-ripples-container .layui-inset-ripples{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);opacity:1;width:0px;height:0px;background:var(--layui-ripple-color);pointer-events:none}@keyframes size-effect{0%{width:0px;height:0px;opacity:.8}to{width:var(--layui-spread-size);height:var(--layui-spread-size);opacity:0}}.layui-water-ripples-container .layui-animate-once--inset{animation:size-effect 1s forwards}.layui-water-ripples-container .layui-animate-always--inset{animation:size-effect 1s infinite} `)();const Vv={name:"LayRipple"},Hv=D.defineComponent({...Vv,props:{type:{default:"inset"},color:{default:"currentColor"},borderRadius:{default:"0"},spreadWidth:{default:"6px"},spreadSize:null,trigger:{default:"click"},center:{type:Boolean,default:!1}},setup(M){const e=M,N=D.ref(!1),i=D.ref("0px"),t=D.ref(null),j=D.ref(null),z=D.computed(()=>e.type==="out"),u=D.ref(void 0),a=D.ref(void 0),r=function(n){if(N.value=!0,e.type==="inset"&&!e.spreadSize&&!e.center){const s=n.currentTarget.getBoundingClientRect(),o=n.clientX-s.left,y=n.clientY-s.top,l=Math.max(o,s.width-o),L=Math.max(y,s.height-y);u.value=o+"px",a.value=y+"px",i.value=Math.sqrt(l**2+L**2)*2+"px"}},g=function(){let n=j.value,T=t.value;!n||!T||(e.type=="out"?T.style.width=n.clientWidth+"px":(n.style.overflow="hidden",!e.spreadSize||e.center?i.value=n.clientWidth*1.1+"px":i.value=e.spreadSize),T.addEventListener("animationend",()=>{N.value=!1},!1))};return D.onMounted(()=>{g()}),D.watch(()=>e.trigger,n=>N.value=n==="always",{immediate:!0}),(n,T)=>(D.openBlock(),D.createElementBlock("div",D.mergeProps({class:"layui-water-ripples-container",ref_key:"waterRipplesContainerRefEl",ref:j},{[D.toHandlerKey(M.trigger)]:r}),[D.createElementVNode("div",{ref_key:"ripplesRefEl",ref:t,class:D.normalizeClass({"layui-out-ripples":D.unref(z),"layui-inset-ripples":M.type=="inset","layui-animate-always--out":N.value&&M.trigger=="always"&&M.type=="out","layui-animate-once--out":N.value&&(M.trigger=="mouseenter"||M.trigger=="click")&&M.type=="out","layui-animate-always--inset":N.value&&M.trigger=="always"&&M.type=="inset","layui-animate-once--inset":N.value&&(M.trigger=="mouseenter"||M.trigger=="click")&&M.type=="inset"}),style:D.normalizeStyle({borderRadius:D.unref(z)?M.borderRadius:"50%",left:u.value,top:a.value,"--layui-ripple-color":M.color,"--layui-spread-width":M.spreadWidth,"--layui-spread-size":i.value})},null,6),D.renderSlot(n.$slots,"default")],16))}}),py=JM(Hv);var k_=(()=>`.layui-carousel{position:relative;left:0;top:0;background-color:#f8f8f8}.layui-carousel>[carousel-item]{position:relative;width:100%;height:100%;overflow:hidden}.layui-carousel>[carousel-item]:before{position:absolute;content:"\\e63d";left:50%;top:50%;width:100px;line-height:20px;margin:-10px 0 0 -50px;text-align:center;color:var(--global-neutral-color-8);font-family:layui-icon!important;font-size:30px;font-style:normal;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.layui-carousel>[carousel-item]>*{position:absolute;left:0;top:0;width:100%;height:100%;background-color:#f8f8f8;transition-duration:.3s;-webkit-transition-duration:.3s;overflow:hidden;visibility:hidden}.layui-carousel-updown>*{-webkit-transition:.3s ease-in-out up;transition:.3s ease-in-out up}.layui-carousel-arrow{display:none\\ ;opacity:0;position:absolute;left:10px;top:50%;margin-top:-18px;width:36px;height:36px;line-height:36px;text-align:center;font-size:20px;border:0;border-radius:50%;background-color:#0003;color:#fff;-webkit-transition-duration:.3s;transition-duration:.3s;cursor:pointer}.layui-carousel-arrow[lay-type=add]{left:auto!important;right:10px}.layui-carousel:hover .layui-carousel-arrow[lay-type=add],.layui-carousel[lay-arrow=always] .layui-carousel-arrow[lay-type=add]{right:20px}.layui-carousel[lay-arrow=always] .layui-carousel-arrow{opacity:1;left:20px}.layui-carousel[lay-arrow=none] .layui-carousel-arrow{display:none}.layui-carousel-arrow:hover,.layui-carousel-ind ul:hover{background-color:#00000059}.layui-carousel:hover .layui-carousel-arrow{display:block\\ ;opacity:1;left:20px}.layui-carousel-ind{position:relative;top:-35px;width:100%;line-height:0!important;text-align:center;font-size:0}.layui-carousel[lay-indicator=outside]{margin-bottom:30px}.layui-carousel[lay-indicator=outside] .layui-carousel-ind{top:10px}.layui-carousel[lay-indicator=outside] .layui-carousel-ind ul{background-color:#00000080}.layui-carousel[lay-indicator=none] .layui-carousel-ind{display:none}.layui-carousel-ind ul{display:inline-block;padding:5px;background-color:#0003;border-radius:10px;-webkit-transition-duration:.3s;transition-duration:.3s}.layui-carousel-ind li{display:inline-block;width:10px;height:10px;margin:0 3px;font-size:14px;background-color:var(--global-neutral-color-3);background-color:#ffffff80;border-radius:50%;cursor:pointer;-webkit-transition-duration:.3s;transition-duration:.3s}.layui-carousel-ind li:hover{background-color:#ffffffb3}.layui-carousel-ind li.layui-this{background-color:#fff}.layui-carousel>[carousel-item]>.layui-carousel-next,.layui-carousel>[carousel-item]>.layui-carousel-prev,.layui-carousel>[carousel-item]>.layui-this{display:block}.layui-carousel>[carousel-item]>.layui-this{left:0}.layui-carousel>[carousel-item]>.layui-carousel-prev{left:-100%}.layui-carousel>[carousel-item]>.layui-carousel-next{left:100%}.layui-carousel>[carousel-item]>.layui-carousel-next.layui-carousel-left,.layui-carousel>[carousel-item]>.layui-carousel-prev.layui-carousel-right{left:0}.layui-carousel>[carousel-item]>.layui-this.layui-carousel-left{left:-100%}.layui-carousel>[carousel-item]>.layui-this.layui-carousel-right{left:100%}.layui-carousel[lay-anim=updown] .layui-carousel-arrow{left:50%!important;top:20px;margin:0 0 0 -18px}.layui-carousel[lay-anim=updown]>[carousel-item]>*,.layui-carousel[lay-anim=fade]>[carousel-item]>*{left:0!important}.layui-carousel[lay-anim=updown] .layui-carousel-arrow[lay-type=add]{top:auto!important;bottom:20px}.layui-carousel[lay-anim=updown] .layui-carousel-ind{position:absolute;top:50%;right:20px;width:auto;height:auto;transform:translateY(-50%)}.layui-carousel[lay-anim=updown] .layui-carousel-ind ul{padding:3px 5px}.layui-carousel[lay-anim=updown] .layui-carousel-ind li{display:block;margin:6px 0}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-this{top:0}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-prev{top:-100%}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-next{top:100%}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-next.layui-carousel-left,.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-carousel-prev.layui-carousel-right{top:0}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-this.layui-carousel-left{top:-100%}.layui-carousel[lay-anim=updown]>[carousel-item]>.layui-this.layui-carousel-right{top:100%}.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-next,.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-prev{opacity:0}.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-next.layui-carousel-left,.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-carousel-prev.layui-carousel-right{opacity:1}.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-this.layui-carousel-left,.layui-carousel[lay-anim=fade]>[carousel-item]>.layui-this.layui-carousel-right{opacity:0}.layui-notice-bar{padding:0 15px;border-radius:4px}.layui-notice-bar .layui-notice-bar-warp{display:flex;align-items:center;width:100%;height:inherit}.layui-notice-bar .layui-notice-bar-warp .layui-notice-bar-warp-text-box{flex:1;height:inherit;display:flex;align-items:center;overflow:hidden;position:relative}.layui-notice-bar .layui-notice-bar-warp .layui-notice-bar-warp-text-box .layui-notice-bar-warp-text{white-space:nowrap;position:absolute;left:0}@keyframes around1{0%{left:0}to{left:calc(0px - var(--textWidth--))}}@keyframes around2{0%{left:calc(var(--textWidth--))}to{left:0}}.layui-notice-bar .layui-notice-bar-warp .layui-notice-bar-warp-text-box .layui-notice-bar-warp-slot{width:100%;white-space:nowrap}.layui-notice-bar .layui-notice-bar-warp .layui-notice-bar-warp-text-box .layui-notice-bar-warp-slot .layui-carousel>[carousel-item] *{display:flex;align-items:center}.layui-notice-bar .layui-notice-bar-warp .layui-notice-bar-warp-left-icon{width:24px;font-size:inherit!important}.layui-notice-bar .layui-notice-bar-warp .layui-notice-bar-warp-right-icon{width:24px;text-align:right;font-size:inherit!important}.layui-notice-bar .layui-notice-bar-warp .layui-notice-bar-warp-right-icon:hover{cursor:pointer} `)();const Zv={key:1,class:"layui-notice-bar-warp-slot"},Xv={name:"LayNoticeBar"},Jv=D.defineComponent({...Xv,props:{mode:null,text:{default:""},textlist:{default:()=>[]},color:{default:()=>"var(--color-warning)"},background:{default:()=>"var(--color-warning-light-9)"},size:{default:14},height:{default:40},delay:{default:1},speed:{default:100},scrollable:{type:Boolean,default:!1},leftIcon:null,rightIcon:null},emits:["close","link"],setup(M,{emit:e}){var s;const N=M,i=D.ref(),t=D.ref(),j=D.ref((s=N.textlist[0])==null?void 0:s.id),z=D.reactive({order:1,oneTime:0,twoTime:0,warpOWidth:0,textOWidth:0,isMode:!1,height:40});var u;const a=()=>{D.nextTick(()=>{z.warpOWidth=i.value.offsetWidth,z.textOWidth=t.value.offsetWidth,r(),u=setTimeout(()=>{g()},N.delay*1e3)})};D.onUnmounted(()=>{clearInterval(u),u=null});const r=()=>{z.oneTime=z.textOWidth/N.speed,z.twoTime=(z.textOWidth+z.warpOWidth)/N.speed},g=()=>{z.order===1?(t.value.style.cssText=`animation: around1 ${z.oneTime}s linear; opactity: 1;`,z.order=2):(t.value.style.cssText=`animation: around2 ${z.twoTime}s linear ; opactity: 1;`,z.order=1)},n=()=>{t.value.addEventListener("animationend",()=>{g()},!1)},T=()=>{if(!N.mode)return!1;N.mode==="closeable"?(z.isMode=!0,e("close")):N.mode==="link"&&e("link")};return D.onMounted(()=>{if(N.scrollable)return!1;a(),n()}),(o,y)=>D.withDirectives((D.openBlock(),D.createElementBlock("div",{class:"layui-notice-bar",style:D.normalizeStyle({background:M.background,height:`${M.height}px`})},[D.createElementVNode("div",{class:"layui-notice-bar-warp",style:D.normalizeStyle({color:M.color,"font-size":`${M.size}px`})},[M.leftIcon?(D.openBlock(),D.createBlock(D.unref(tM),{key:0,class:"layui-notice-bar-warp-left-icon",type:M.leftIcon},null,8,["type"])):D.createCommentVNode("",!0),D.createElementVNode("div",{class:"layui-notice-bar-warp-text-box",ref_key:"noticeBarWarpRef",ref:i,style:D.normalizeStyle("--textWidth--:"+M.text.length+"em")},[M.scrollable?(D.openBlock(),D.createElementBlock("div",Zv,[D.createVNode(Cs,{modelValue:j.value,"onUpdate:modelValue":y[0]||(y[0]=l=>j.value=l),indicator:"none",anim:"updown",arrow:"none",style:{height:"40px"}},{default:D.withCtx(()=>[(D.openBlock(!0),D.createElementBlock(D.Fragment,null,D.renderList(M.textlist,l=>(D.openBlock(),D.createBlock(M4,{key:l.id,id:l.id,class:"layui-anim layui-anim-up"},{default:D.withCtx(()=>[D.createTextVNode(D.toDisplayString(l.text),1)]),_:2},1032,["id"]))),128))]),_:1},8,["modelValue"])])):(D.openBlock(),D.createElementBlock("div",{key:0,class:"layui-notice-bar-warp-text",ref_key:"noticeBarTextRef",ref:t},D.toDisplayString(M.text),513))],4),M.rightIcon?(D.openBlock(),D.createBlock(D.unref(tM),{key:1,type:M.rightIcon,class:"layui-notice-bar-warp-right-icon",onClick:T},null,8,["type"])):D.createCommentVNode("",!0)],4)],4)),[[D.vShow,!z.isMode]])}}),hy=JM(Jv);var f_=(()=>`.lay-page-header{display:flex;line-height:24px}.lay-page-header__left{display:flex;cursor:pointer;margin-right:40px;position:relative;color:var(--global-neutral-color-8)}.lay-page-header__left:after{content:"";position:absolute;width:1px;height:16px;right:-20px;top:50%;transform:translateY(-50%);background-color:var(--global-neutral-color-8)}.lay-page-header__left:hover .layui-icon-return,.lay-page-header__left:hover .lay-page-header__title{color:var(--global-checked-color)!important}.lay-page-header__left .layui-icon-return{font-size:14px;margin-right:6px;align-self:center}.lay-page-header__title{font-size:14px}.lay-page-header__content{font-size:18px;color:#393d49} `)();const $v={class:"lay-page-header"},Kv={class:"lay-page-header__title"},qv={class:"lay-page-header__content"},M6={name:"LayPageHeader"},N6=D.defineComponent({...M6,props:{content:{default:""},backText:{default:"\u8FD4\u56DE"},backIcon:{default:"layui-icon-return"}},emits:["back"],setup(M,{emit:e}){const N=D.useSlots(),i=D.getCurrentInstance(),t=EI(i,"backIcon");return(j,z)=>(D.openBlock(),D.createElementBlock("div",$v,[D.createElementVNode("div",{class:"lay-page-header__left",onClick:z[0]||(z[0]=u=>e("back"))},[D.renderSlot(j.$slots,D.unref(t),{},()=>[D.createElementVNode("i",{class:D.normalizeClass(["layui-icon",[M.backIcon]])},null,2)]),D.createElementVNode("div",Kv,D.toDisplayString(M.backText),1)]),D.createElementVNode("div",qv,[D.unref(N).default?D.renderSlot(j.$slots,"default",{key:0}):(D.openBlock(),D.createElementBlock(D.Fragment,{key:1},[D.createTextVNode(D.toDisplayString(M.content),1)],64))])]))}}),my=JM(N6);var d_=(()=>`:root{--input-border-radius: var(--global-border-radius);--input-border-color: var(--global-neutral-color-3)}.layui-input{width:100%;height:38px;line-height:38px;border-width:1px;border-style:solid;border-color:var(--input-border-color);border-radius:var(--input-border-radius);display:inline-flex}.layui-input input{height:38px;line-height:38px;background-color:#fff;color:#000000d9;padding-left:10px;display:inline-block;border:none;height:100%;width:100%}.layui-input-append{background-color:#fafafa;border-left:1px solid var(--input-border-color);display:flex;padding:0 15px;flex:none;align-items:center}.layui-input-prepend{background-color:#fafafa;border-right:1px solid var(--input-border-color);display:flex;padding:0 15px;flex:none;align-items:center}.layui-input-wrapper{width:100%;display:inline-flex;border:none}.layui-input:hover,.layui-input:focus-within{border-color:#d2d2d2}.layui-input-clear,.layui-input-prefix,.layui-input-suffix,.layui-input-password{background-color:#fff}.layui-input-clear,.layui-input-password,.layui-input-prefix,.layui-input-suffix{display:flex;flex:none;align-items:center;padding:0 10px}.layui-input-has-prefix input{padding:0}.layui-input-clear,.layui-input-password{color:#00000073}.layui-input-clear:hover{opacity:.6}.layui-input input::-webkit-input-placeholder{line-height:1.3}.layui-input input::-ms-reveal{display:none}.layui-input-disabled{border-color:var(--input-border-color)!important}.layui-input-disabled{opacity:.6}.layui-input-disabled,.layui-input-disabled *{cursor:not-allowed!important}.layui-input[size=lg]{height:44px}.layui-input[size=lg] .layui-input{height:44px;line-height:44px}.layui-input[size=md]{height:38px}.layui-input[size=md] .layui-input{height:38px;line-height:38px}.layui-input[size=sm]{height:32px}.layui-input[size=sm] .layui-input{height:32px;line-height:32px}.layui-input[size=xs]{height:26px}.layui-input[size=xs] .layui-input{height:26px;line-height:26px}.layui-cascader{display:inline-block}.layui-cascader[size=lg]{height:44px;width:260px}.layui-cascader[size=lg] .layui-input{height:44px;line-height:44px}.layui-cascader[size=md]{height:38px;width:220px}.layui-cascader[size=md] .layui-input{height:38px;line-height:38px}.layui-cascader[size=sm]{height:32px;width:180px}.layui-cascader[size=sm] .layui-input{height:32px;line-height:32px}.layui-cascader[size=xs]{height:26px;width:140px}.layui-cascader[size=xs] .layui-input{height:26px;line-height:26px}.layui-cascader .layui-input-suffix{padding-right:10px}.layui-cascader .layui-icon-triangle-d{transition:all .3s ease-in-out;transform:rotate(0);color:var(--global-neutral-color-8)}.layui-cascader-opend .layui-icon-triangle-d{transform:rotate(180deg)}.layui-cascader .layui-cascader-panel{box-sizing:border-box;border-radius:2px;line-height:26px;color:#000c;font-size:14px;white-space:nowrap;display:inline-flex}.layui-cascader-menu{display:inline-block;border-right:1px solid var(--global-neutral-color-3)}.layui-cascader-menu:last-child{border-right:none}.layui-cascader-menu-item{min-width:130px;padding:5px 9px 5px 15px;box-sizing:border-box;transition:all .1s ease-in-out;display:flex;justify-content:space-between;align-items:center;min-height:35px}.layui-cascader-menu-item:hover,.layui-cascader-selected{background-color:var(--global-checked-color);color:#fff}.layui-cascader-menu-item .layui-icon-right{margin-left:10px}.layui-cascader-disabled,.layui-cascader-disabled *{cursor:not-allowed!important}