vue-pure-admin/dist/static/js/index-oabxNiy7.js
2024-03-21 22:48:37 +08:00

11 lines
52 KiB
JavaScript

var Ne=Object.defineProperty,Se=Object.defineProperties;var Ae=Object.getOwnPropertyDescriptors;var Ut=Object.getOwnPropertySymbols;var Le=Object.prototype.hasOwnProperty,Be=Object.prototype.propertyIsEnumerable;var jt=(a,t,i)=>t in a?Ne(a,t,{enumerable:!0,configurable:!0,writable:!0,value:i}):a[t]=i,ht=(a,t)=>{for(var i in t||(t={}))Le.call(t,i)&&jt(a,i,t[i]);if(Ut)for(var i of Ut(t))Be.call(t,i)&&jt(a,i,t[i]);return a},Gt=(a,t)=>Se(a,Ae(t));var qt=(a,t,i)=>new Promise((e,o)=>{var r=d=>{try{s(i.next(d))}catch(l){o(l)}},n=d=>{try{s(i.throw(d))}catch(l){o(l)}},s=d=>d.done?e(d.value):Promise.resolve(d.value).then(r,n);s((i=i.apply(a,t)).next())});import{e as Y,x as W,g as z,cZ as Ie,d as Ft,r as F,c as mt,o as ke,a as He,c_ as ze,u as $e,c$ as Pe,m as L,z as H,Y as Xe,d0 as Ye,d1 as We,d2 as Ve,d3 as Ue,d4 as je,cM as Ge,v as S,D as qe,a3 as Fe,X as Ze}from"./index-BAaep8yZ.js";/*!
* Cropper.js v1.6.1
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2023-09-17T03:44:19.860Z
*/function Zt(a,t){var i=Object.keys(a);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(a);t&&(e=e.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),i.push.apply(i,e)}return i}function ue(a){for(var t=1;t<arguments.length;t++){var i=arguments[t]!=null?arguments[t]:{};t%2?Zt(Object(i),!0).forEach(function(e){Je(a,e,i[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(i)):Zt(Object(i)).forEach(function(e){Object.defineProperty(a,e,Object.getOwnPropertyDescriptor(i,e))})}return a}function Et(a){"@babel/helpers - typeof";return Et=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(a)}function Ke(a,t){if(!(a instanceof t))throw new TypeError("Cannot call a class as a function")}function Kt(a,t){for(var i=0;i<t.length;i++){var e=t[i];e.enumerable=e.enumerable||!1,e.configurable=!0,"value"in e&&(e.writable=!0),Object.defineProperty(a,fe(e.key),e)}}function Qe(a,t,i){return t&&Kt(a.prototype,t),i&&Kt(a,i),Object.defineProperty(a,"prototype",{writable:!1}),a}function Je(a,t,i){return t=fe(t),t in a?Object.defineProperty(a,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):a[t]=i,a}function pe(a){return ti(a)||ei(a)||ii(a)||ai()}function ti(a){if(Array.isArray(a))return Tt(a)}function ei(a){if(typeof Symbol!="undefined"&&a[Symbol.iterator]!=null||a["@@iterator"]!=null)return Array.from(a)}function ii(a,t){if(a){if(typeof a=="string")return Tt(a,t);var i=Object.prototype.toString.call(a).slice(8,-1);if(i==="Object"&&a.constructor&&(i=a.constructor.name),i==="Map"||i==="Set")return Array.from(a);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Tt(a,t)}}function Tt(a,t){(t==null||t>a.length)&&(t=a.length);for(var i=0,e=new Array(t);i<t;i++)e[i]=a[i];return e}function ai(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ri(a,t){if(typeof a!="object"||a===null)return a;var i=a[Symbol.toPrimitive];if(i!==void 0){var e=i.call(a,t||"default");if(typeof e!="object")return e;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(a)}function fe(a){var t=ri(a,"string");return typeof t=="symbol"?t:String(t)}var xt=typeof window!="undefined"&&typeof window.document!="undefined",q=xt?window:{},kt=xt&&q.document.documentElement?"ontouchstart"in q.document.documentElement:!1,Ht=xt?"PointerEvent"in q:!1,E="cropper",zt="all",ge="crop",ve="move",me="zoom",tt="e",et="w",at="s",Z="n",ct="ne",lt="nw",dt="se",ut="sw",Ot="".concat(E,"-crop"),Qt="".concat(E,"-disabled"),X="".concat(E,"-hidden"),Jt="".concat(E,"-hide"),ni="".concat(E,"-invisible"),yt="".concat(E,"-modal"),Rt="".concat(E,"-move"),ft="".concat(E,"Action"),wt="".concat(E,"Preview"),$t="crop",we="move",be="none",Nt="crop",St="cropend",At="cropmove",Lt="cropstart",te="dblclick",oi=kt?"touchstart":"mousedown",si=kt?"touchmove":"mousemove",hi=kt?"touchend touchcancel":"mouseup",ee=Ht?"pointerdown":oi,ie=Ht?"pointermove":si,ae=Ht?"pointerup pointercancel":hi,re="ready",ne="resize",oe="wheel",Bt="zoom",se="image/jpeg",ci=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,li=/^data:/,di=/^data:image\/jpeg;base64,/,ui=/^img|canvas$/i,ye=200,xe=100,he={viewMode:0,dragMode:$t,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:ye,minContainerHeight:xe,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},pi='<div class="cropper-container" touch-action="none"><div class="cropper-wrap-box"><div class="cropper-canvas"></div></div><div class="cropper-drag-box"></div><div class="cropper-crop-box"><span class="cropper-view-box"></span><span class="cropper-dashed dashed-h"></span><span class="cropper-dashed dashed-v"></span><span class="cropper-center"></span><span class="cropper-face"></span><span class="cropper-line line-e" data-cropper-action="e"></span><span class="cropper-line line-n" data-cropper-action="n"></span><span class="cropper-line line-w" data-cropper-action="w"></span><span class="cropper-line line-s" data-cropper-action="s"></span><span class="cropper-point point-e" data-cropper-action="e"></span><span class="cropper-point point-n" data-cropper-action="n"></span><span class="cropper-point point-w" data-cropper-action="w"></span><span class="cropper-point point-s" data-cropper-action="s"></span><span class="cropper-point point-ne" data-cropper-action="ne"></span><span class="cropper-point point-nw" data-cropper-action="nw"></span><span class="cropper-point point-sw" data-cropper-action="sw"></span><span class="cropper-point point-se" data-cropper-action="se"></span></div></div>',fi=Number.isNaN||q.isNaN;function m(a){return typeof a=="number"&&!fi(a)}var ce=function(t){return t>0&&t<1/0};function _t(a){return typeof a=="undefined"}function it(a){return Et(a)==="object"&&a!==null}var gi=Object.prototype.hasOwnProperty;function rt(a){if(!it(a))return!1;try{var t=a.constructor,i=t.prototype;return t&&i&&gi.call(i,"isPrototypeOf")}catch(e){return!1}}function P(a){return typeof a=="function"}var vi=Array.prototype.slice;function De(a){return Array.from?Array.from(a):vi.call(a)}function A(a,t){return a&&P(t)&&(Array.isArray(a)||m(a.length)?De(a).forEach(function(i,e){t.call(a,i,e,a)}):it(a)&&Object.keys(a).forEach(function(i){t.call(a,a[i],i,a)})),a}var T=Object.assign||function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),o=1;o<i;o++)e[o-1]=arguments[o];return it(t)&&e.length>0&&e.forEach(function(r){it(r)&&Object.keys(r).forEach(function(n){t[n]=r[n]})}),t},mi=/\.\d*(?:0|9){12}\d*$/;function ot(a){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return mi.test(a)?Math.round(a*t)/t:a}var wi=/^width|height|left|top|marginLeft|marginTop$/;function K(a,t){var i=a.style;A(t,function(e,o){wi.test(o)&&m(e)&&(e="".concat(e,"px")),i[o]=e})}function bi(a,t){return a.classList?a.classList.contains(t):a.className.indexOf(t)>-1}function B(a,t){if(t){if(m(a.length)){A(a,function(e){B(e,t)});return}if(a.classList){a.classList.add(t);return}var i=a.className.trim();i?i.indexOf(t)<0&&(a.className="".concat(i," ").concat(t)):a.className=t}}function G(a,t){if(t){if(m(a.length)){A(a,function(i){G(i,t)});return}if(a.classList){a.classList.remove(t);return}a.className.indexOf(t)>=0&&(a.className=a.className.replace(t,""))}}function nt(a,t,i){if(t){if(m(a.length)){A(a,function(e){nt(e,t,i)});return}i?B(a,t):G(a,t)}}var yi=/([a-z\d])([A-Z])/g;function Pt(a){return a.replace(yi,"$1-$2").toLowerCase()}function It(a,t){return it(a[t])?a[t]:a.dataset?a.dataset[t]:a.getAttribute("data-".concat(Pt(t)))}function gt(a,t,i){it(i)?a[t]=i:a.dataset?a.dataset[t]=i:a.setAttribute("data-".concat(Pt(t)),i)}function xi(a,t){if(it(a[t]))try{delete a[t]}catch(i){a[t]=void 0}else if(a.dataset)try{delete a.dataset[t]}catch(i){a.dataset[t]=void 0}else a.removeAttribute("data-".concat(Pt(t)))}var Me=/\s\s*/,_e=function(){var a=!1;if(xt){var t=!1,i=function(){},e=Object.defineProperty({},"once",{get:function(){return a=!0,t},set:function(r){t=r}});q.addEventListener("test",i,e),q.removeEventListener("test",i,e)}return a}();function j(a,t,i){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=i;t.trim().split(Me).forEach(function(r){if(!_e){var n=a.listeners;n&&n[r]&&n[r][i]&&(o=n[r][i],delete n[r][i],Object.keys(n[r]).length===0&&delete n[r],Object.keys(n).length===0&&delete a.listeners)}a.removeEventListener(r,o,e)})}function U(a,t,i){var e=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},o=i;t.trim().split(Me).forEach(function(r){if(e.once&&!_e){var n=a.listeners,s=n===void 0?{}:n;o=function(){delete s[r][i],a.removeEventListener(r,o,e);for(var l=arguments.length,h=new Array(l),c=0;c<l;c++)h[c]=arguments[c];i.apply(a,h)},s[r]||(s[r]={}),s[r][i]&&a.removeEventListener(r,s[r][i],e),s[r][i]=o,a.listeners=s}a.addEventListener(r,o,e)})}function st(a,t,i){var e;return P(Event)&&P(CustomEvent)?e=new CustomEvent(t,{detail:i,bubbles:!0,cancelable:!0}):(e=document.createEvent("CustomEvent"),e.initCustomEvent(t,!0,!0,i)),a.dispatchEvent(e)}function Ce(a){var t=a.getBoundingClientRect();return{left:t.left+(window.pageXOffset-document.documentElement.clientLeft),top:t.top+(window.pageYOffset-document.documentElement.clientTop)}}var Ct=q.location,Di=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function le(a){var t=a.match(Di);return t!==null&&(t[1]!==Ct.protocol||t[2]!==Ct.hostname||t[3]!==Ct.port)}function de(a){var t="timestamp=".concat(new Date().getTime());return a+(a.indexOf("?")===-1?"?":"&")+t}function pt(a){var t=a.rotate,i=a.scaleX,e=a.scaleY,o=a.translateX,r=a.translateY,n=[];m(o)&&o!==0&&n.push("translateX(".concat(o,"px)")),m(r)&&r!==0&&n.push("translateY(".concat(r,"px)")),m(t)&&t!==0&&n.push("rotate(".concat(t,"deg)")),m(i)&&i!==1&&n.push("scaleX(".concat(i,")")),m(e)&&e!==1&&n.push("scaleY(".concat(e,")"));var s=n.length?n.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function Mi(a){var t=ue({},a),i=0;return A(a,function(e,o){delete t[o],A(t,function(r){var n=Math.abs(e.startX-r.startX),s=Math.abs(e.startY-r.startY),d=Math.abs(e.endX-r.endX),l=Math.abs(e.endY-r.endY),h=Math.sqrt(n*n+s*s),c=Math.sqrt(d*d+l*l),u=(c-h)/h;Math.abs(u)>Math.abs(i)&&(i=u)})}),i}function bt(a,t){var i=a.pageX,e=a.pageY,o={endX:i,endY:e};return t?o:ue({startX:i,startY:e},o)}function _i(a){var t=0,i=0,e=0;return A(a,function(o){var r=o.startX,n=o.startY;t+=r,i+=n,e+=1}),t/=e,i/=e,{pageX:t,pageY:i}}function Q(a){var t=a.aspectRatio,i=a.height,e=a.width,o=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",r=ce(e),n=ce(i);if(r&&n){var s=i*t;o==="contain"&&s>e||o==="cover"&&s<e?i=e/t:e=i*t}else r?i=e/t:n&&(e=i*t);return{width:e,height:i}}function Ci(a){var t=a.width,i=a.height,e=a.degree;if(e=Math.abs(e)%180,e===90)return{width:i,height:t};var o=e%90*Math.PI/180,r=Math.sin(o),n=Math.cos(o),s=t*n+i*r,d=t*r+i*n;return e>90?{width:d,height:s}:{width:s,height:d}}function Ei(a,t,i,e){var o=t.aspectRatio,r=t.naturalWidth,n=t.naturalHeight,s=t.rotate,d=s===void 0?0:s,l=t.scaleX,h=l===void 0?1:l,c=t.scaleY,u=c===void 0?1:c,g=i.aspectRatio,v=i.naturalWidth,D=i.naturalHeight,f=e.fillColor,O=f===void 0?"transparent":f,R=e.imageSmoothingEnabled,C=R===void 0?!0:R,V=e.imageSmoothingQuality,k=V===void 0?"low":V,p=e.maxWidth,b=p===void 0?1/0:p,N=e.maxHeight,$=N===void 0?1/0:N,w=e.minWidth,y=w===void 0?0:w,x=e.minHeight,_=x===void 0?0:x,M=document.createElement("canvas"),I=M.getContext("2d"),J=Q({aspectRatio:g,width:b,height:$}),vt=Q({aspectRatio:g,width:y,height:_},"cover"),Dt=Math.min(J.width,Math.max(vt.width,v)),Mt=Math.min(J.height,Math.max(vt.height,D)),Xt=Q({aspectRatio:o,width:b,height:$}),Yt=Q({aspectRatio:o,width:y,height:_},"cover"),Wt=Math.min(Xt.width,Math.max(Yt.width,r)),Vt=Math.min(Xt.height,Math.max(Yt.height,n)),Oe=[-Wt/2,-Vt/2,Wt,Vt];return M.width=ot(Dt),M.height=ot(Mt),I.fillStyle=O,I.fillRect(0,0,Dt,Mt),I.save(),I.translate(Dt/2,Mt/2),I.rotate(d*Math.PI/180),I.scale(h,u),I.imageSmoothingEnabled=C,I.imageSmoothingQuality=k,I.drawImage.apply(I,[a].concat(pe(Oe.map(function(Re){return Math.floor(ot(Re))})))),I.restore(),M}var Ee=String.fromCharCode;function Ti(a,t,i){var e="";i+=t;for(var o=t;o<i;o+=1)e+=Ee(a.getUint8(o));return e}var Oi=/^data:.*,/;function Ri(a){var t=a.replace(Oi,""),i=atob(t),e=new ArrayBuffer(i.length),o=new Uint8Array(e);return A(o,function(r,n){o[n]=i.charCodeAt(n)}),e}function Ni(a,t){for(var i=[],e=8192,o=new Uint8Array(a);o.length>0;)i.push(Ee.apply(null,De(o.subarray(0,e)))),o=o.subarray(e);return"data:".concat(t,";base64,").concat(btoa(i.join("")))}function Si(a){var t=new DataView(a),i;try{var e,o,r;if(t.getUint8(0)===255&&t.getUint8(1)===216)for(var n=t.byteLength,s=2;s+1<n;){if(t.getUint8(s)===255&&t.getUint8(s+1)===225){o=s;break}s+=1}if(o){var d=o+4,l=o+10;if(Ti(t,d,4)==="Exif"){var h=t.getUint16(l);if(e=h===18761,(e||h===19789)&&t.getUint16(l+2,e)===42){var c=t.getUint32(l+4,e);c>=8&&(r=l+c)}}}if(r){var u=t.getUint16(r,e),g,v;for(v=0;v<u;v+=1)if(g=r+v*12+2,t.getUint16(g,e)===274){g+=8,i=t.getUint16(g,e),t.setUint16(g,1,e);break}}}catch(D){i=1}return i}function Ai(a){var t=0,i=1,e=1;switch(a){case 2:i=-1;break;case 3:t=-180;break;case 4:e=-1;break;case 5:t=90,e=-1;break;case 6:t=90;break;case 7:t=90,i=-1;break;case 8:t=-90;break}return{rotate:t,scaleX:i,scaleY:e}}var Li={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,i=this.options,e=this.container,o=this.cropper,r=Number(i.minContainerWidth),n=Number(i.minContainerHeight);B(o,X),G(t,X);var s={width:Math.max(e.offsetWidth,r>=0?r:ye),height:Math.max(e.offsetHeight,n>=0?n:xe)};this.containerData=s,K(o,{width:s.width,height:s.height}),B(t,X),G(o,X)},initCanvas:function(){var t=this.containerData,i=this.imageData,e=this.options.viewMode,o=Math.abs(i.rotate)%180===90,r=o?i.naturalHeight:i.naturalWidth,n=o?i.naturalWidth:i.naturalHeight,s=r/n,d=t.width,l=t.height;t.height*s>t.width?e===3?d=t.height*s:l=t.width/s:e===3?l=t.width/s:d=t.height*s;var h={aspectRatio:s,naturalWidth:r,naturalHeight:n,width:d,height:l};this.canvasData=h,this.limited=e===1||e===2,this.limitCanvas(!0,!0),h.width=Math.min(Math.max(h.width,h.minWidth),h.maxWidth),h.height=Math.min(Math.max(h.height,h.minHeight),h.maxHeight),h.left=(t.width-h.width)/2,h.top=(t.height-h.height)/2,h.oldLeft=h.left,h.oldTop=h.top,this.initialCanvasData=T({},h)},limitCanvas:function(t,i){var e=this.options,o=this.containerData,r=this.canvasData,n=this.cropBoxData,s=e.viewMode,d=r.aspectRatio,l=this.cropped&&n;if(t){var h=Number(e.minCanvasWidth)||0,c=Number(e.minCanvasHeight)||0;s>1?(h=Math.max(h,o.width),c=Math.max(c,o.height),s===3&&(c*d>h?h=c*d:c=h/d)):s>0&&(h?h=Math.max(h,l?n.width:0):c?c=Math.max(c,l?n.height:0):l&&(h=n.width,c=n.height,c*d>h?h=c*d:c=h/d));var u=Q({aspectRatio:d,width:h,height:c});h=u.width,c=u.height,r.minWidth=h,r.minHeight=c,r.maxWidth=1/0,r.maxHeight=1/0}if(i)if(s>(l?0:1)){var g=o.width-r.width,v=o.height-r.height;r.minLeft=Math.min(0,g),r.minTop=Math.min(0,v),r.maxLeft=Math.max(0,g),r.maxTop=Math.max(0,v),l&&this.limited&&(r.minLeft=Math.min(n.left,n.left+(n.width-r.width)),r.minTop=Math.min(n.top,n.top+(n.height-r.height)),r.maxLeft=n.left,r.maxTop=n.top,s===2&&(r.width>=o.width&&(r.minLeft=Math.min(0,g),r.maxLeft=Math.max(0,g)),r.height>=o.height&&(r.minTop=Math.min(0,v),r.maxTop=Math.max(0,v))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=o.width,r.maxTop=o.height},renderCanvas:function(t,i){var e=this.canvasData,o=this.imageData;if(i){var r=Ci({width:o.naturalWidth*Math.abs(o.scaleX||1),height:o.naturalHeight*Math.abs(o.scaleY||1),degree:o.rotate||0}),n=r.width,s=r.height,d=e.width*(n/e.naturalWidth),l=e.height*(s/e.naturalHeight);e.left-=(d-e.width)/2,e.top-=(l-e.height)/2,e.width=d,e.height=l,e.aspectRatio=n/s,e.naturalWidth=n,e.naturalHeight=s,this.limitCanvas(!0,!1)}(e.width>e.maxWidth||e.width<e.minWidth)&&(e.left=e.oldLeft),(e.height>e.maxHeight||e.height<e.minHeight)&&(e.top=e.oldTop),e.width=Math.min(Math.max(e.width,e.minWidth),e.maxWidth),e.height=Math.min(Math.max(e.height,e.minHeight),e.maxHeight),this.limitCanvas(!1,!0),e.left=Math.min(Math.max(e.left,e.minLeft),e.maxLeft),e.top=Math.min(Math.max(e.top,e.minTop),e.maxTop),e.oldLeft=e.left,e.oldTop=e.top,K(this.canvas,T({width:e.width,height:e.height},pt({translateX:e.left,translateY:e.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var i=this.canvasData,e=this.imageData,o=e.naturalWidth*(i.width/i.naturalWidth),r=e.naturalHeight*(i.height/i.naturalHeight);T(e,{width:o,height:r,left:(i.width-o)/2,top:(i.height-r)/2}),K(this.image,T({width:e.width,height:e.height},pt(T({translateX:e.left,translateY:e.top},e)))),t&&this.output()},initCropBox:function(){var t=this.options,i=this.canvasData,e=t.aspectRatio||t.initialAspectRatio,o=Number(t.autoCropArea)||.8,r={width:i.width,height:i.height};e&&(i.height*e>i.width?r.height=r.width/e:r.width=r.height*e),this.cropBoxData=r,this.limitCropBox(!0,!0),r.width=Math.min(Math.max(r.width,r.minWidth),r.maxWidth),r.height=Math.min(Math.max(r.height,r.minHeight),r.maxHeight),r.width=Math.max(r.minWidth,r.width*o),r.height=Math.max(r.minHeight,r.height*o),r.left=i.left+(i.width-r.width)/2,r.top=i.top+(i.height-r.height)/2,r.oldLeft=r.left,r.oldTop=r.top,this.initialCropBoxData=T({},r)},limitCropBox:function(t,i){var e=this.options,o=this.containerData,r=this.canvasData,n=this.cropBoxData,s=this.limited,d=e.aspectRatio;if(t){var l=Number(e.minCropBoxWidth)||0,h=Number(e.minCropBoxHeight)||0,c=s?Math.min(o.width,r.width,r.width+r.left,o.width-r.left):o.width,u=s?Math.min(o.height,r.height,r.height+r.top,o.height-r.top):o.height;l=Math.min(l,o.width),h=Math.min(h,o.height),d&&(l&&h?h*d>l?h=l/d:l=h*d:l?h=l/d:h&&(l=h*d),u*d>c?u=c/d:c=u*d),n.minWidth=Math.min(l,c),n.minHeight=Math.min(h,u),n.maxWidth=c,n.maxHeight=u}i&&(s?(n.minLeft=Math.max(0,r.left),n.minTop=Math.max(0,r.top),n.maxLeft=Math.min(o.width,r.left+r.width)-n.width,n.maxTop=Math.min(o.height,r.top+r.height)-n.height):(n.minLeft=0,n.minTop=0,n.maxLeft=o.width-n.width,n.maxTop=o.height-n.height))},renderCropBox:function(){var t=this.options,i=this.containerData,e=this.cropBoxData;(e.width>e.maxWidth||e.width<e.minWidth)&&(e.left=e.oldLeft),(e.height>e.maxHeight||e.height<e.minHeight)&&(e.top=e.oldTop),e.width=Math.min(Math.max(e.width,e.minWidth),e.maxWidth),e.height=Math.min(Math.max(e.height,e.minHeight),e.maxHeight),this.limitCropBox(!1,!0),e.left=Math.min(Math.max(e.left,e.minLeft),e.maxLeft),e.top=Math.min(Math.max(e.top,e.minTop),e.maxTop),e.oldLeft=e.left,e.oldTop=e.top,t.movable&&t.cropBoxMovable&&gt(this.face,ft,e.width>=i.width&&e.height>=i.height?ve:zt),K(this.cropBox,T({width:e.width,height:e.height},pt({translateX:e.left,translateY:e.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),st(this.element,Nt,this.getData())}},Bi={initPreview:function(){var t=this.element,i=this.crossOrigin,e=this.options.preview,o=i?this.crossOriginUrl:this.url,r=t.alt||"The image to preview",n=document.createElement("img");if(i&&(n.crossOrigin=i),n.src=o,n.alt=r,this.viewBox.appendChild(n),this.viewBoxImage=n,!!e){var s=e;typeof e=="string"?s=t.ownerDocument.querySelectorAll(e):e.querySelector&&(s=[e]),this.previews=s,A(s,function(d){var l=document.createElement("img");gt(d,wt,{width:d.offsetWidth,height:d.offsetHeight,html:d.innerHTML}),i&&(l.crossOrigin=i),l.src=o,l.alt=r,l.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;"',d.innerHTML="",d.appendChild(l)})}},resetPreview:function(){A(this.previews,function(t){var i=It(t,wt);K(t,{width:i.width,height:i.height}),t.innerHTML=i.html,xi(t,wt)})},preview:function(){var t=this.imageData,i=this.canvasData,e=this.cropBoxData,o=e.width,r=e.height,n=t.width,s=t.height,d=e.left-i.left-t.left,l=e.top-i.top-t.top;!this.cropped||this.disabled||(K(this.viewBoxImage,T({width:n,height:s},pt(T({translateX:-d,translateY:-l},t)))),A(this.previews,function(h){var c=It(h,wt),u=c.width,g=c.height,v=u,D=g,f=1;o&&(f=u/o,D=r*f),r&&D>g&&(f=g/r,v=o*f,D=g),K(h,{width:v,height:D}),K(h.getElementsByTagName("img")[0],T({width:n*f,height:s*f},pt(T({translateX:-d*f,translateY:-l*f},t))))}))}},Ii={bind:function(){var t=this.element,i=this.options,e=this.cropper;P(i.cropstart)&&U(t,Lt,i.cropstart),P(i.cropmove)&&U(t,At,i.cropmove),P(i.cropend)&&U(t,St,i.cropend),P(i.crop)&&U(t,Nt,i.crop),P(i.zoom)&&U(t,Bt,i.zoom),U(e,ee,this.onCropStart=this.cropStart.bind(this)),i.zoomable&&i.zoomOnWheel&&U(e,oe,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&U(e,te,this.onDblclick=this.dblclick.bind(this)),U(t.ownerDocument,ie,this.onCropMove=this.cropMove.bind(this)),U(t.ownerDocument,ae,this.onCropEnd=this.cropEnd.bind(this)),i.responsive&&U(window,ne,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,i=this.options,e=this.cropper;P(i.cropstart)&&j(t,Lt,i.cropstart),P(i.cropmove)&&j(t,At,i.cropmove),P(i.cropend)&&j(t,St,i.cropend),P(i.crop)&&j(t,Nt,i.crop),P(i.zoom)&&j(t,Bt,i.zoom),j(e,ee,this.onCropStart),i.zoomable&&i.zoomOnWheel&&j(e,oe,this.onWheel,{passive:!1,capture:!0}),i.toggleDragModeOnDblclick&&j(e,te,this.onDblclick),j(t.ownerDocument,ie,this.onCropMove),j(t.ownerDocument,ae,this.onCropEnd),i.responsive&&j(window,ne,this.onResize)}},ki={resize:function(){if(!this.disabled){var t=this.options,i=this.container,e=this.containerData,o=i.offsetWidth/e.width,r=i.offsetHeight/e.height,n=Math.abs(o-1)>Math.abs(r-1)?o:r;if(n!==1){var s,d;t.restore&&(s=this.getCanvasData(),d=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(A(s,function(l,h){s[h]=l*n})),this.setCropBoxData(A(d,function(l,h){d[h]=l*n})))}}},dblclick:function(){this.disabled||this.options.dragMode===be||this.setDragMode(bi(this.dragBox,Ot)?we:$t)},wheel:function(t){var i=this,e=Number(this.options.wheelZoomRatio)||.1,o=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){i.wheeling=!1},50),t.deltaY?o=t.deltaY>0?1:-1:t.wheelDelta?o=-t.wheelDelta/120:t.detail&&(o=t.detail>0?1:-1),this.zoom(-o*e,t)))},cropStart:function(t){var i=t.buttons,e=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(m(i)&&i!==1||m(e)&&e!==0||t.ctrlKey))){var o=this.options,r=this.pointers,n;t.changedTouches?A(t.changedTouches,function(s){r[s.identifier]=bt(s)}):r[t.pointerId||0]=bt(t),Object.keys(r).length>1&&o.zoomable&&o.zoomOnTouch?n=me:n=It(t.target,ft),ci.test(n)&&st(this.element,Lt,{originalEvent:t,action:n})!==!1&&(t.preventDefault(),this.action=n,this.cropping=!1,n===ge&&(this.cropping=!0,B(this.dragBox,yt)))}},cropMove:function(t){var i=this.action;if(!(this.disabled||!i)){var e=this.pointers;t.preventDefault(),st(this.element,At,{originalEvent:t,action:i})!==!1&&(t.changedTouches?A(t.changedTouches,function(o){T(e[o.identifier]||{},bt(o,!0))}):T(e[t.pointerId||0]||{},bt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var i=this.action,e=this.pointers;t.changedTouches?A(t.changedTouches,function(o){delete e[o.identifier]}):delete e[t.pointerId||0],i&&(t.preventDefault(),Object.keys(e).length||(this.action=""),this.cropping&&(this.cropping=!1,nt(this.dragBox,yt,this.cropped&&this.options.modal)),st(this.element,St,{originalEvent:t,action:i}))}}},Hi={change:function(t){var i=this.options,e=this.canvasData,o=this.containerData,r=this.cropBoxData,n=this.pointers,s=this.action,d=i.aspectRatio,l=r.left,h=r.top,c=r.width,u=r.height,g=l+c,v=h+u,D=0,f=0,O=o.width,R=o.height,C=!0,V;!d&&t.shiftKey&&(d=c&&u?c/u:1),this.limited&&(D=r.minLeft,f=r.minTop,O=D+Math.min(o.width,e.width,e.left+e.width),R=f+Math.min(o.height,e.height,e.top+e.height));var k=n[Object.keys(n)[0]],p={x:k.endX-k.startX,y:k.endY-k.startY},b=function($){switch($){case tt:g+p.x>O&&(p.x=O-g);break;case et:l+p.x<D&&(p.x=D-l);break;case Z:h+p.y<f&&(p.y=f-h);break;case at:v+p.y>R&&(p.y=R-v);break}};switch(s){case zt:l+=p.x,h+=p.y;break;case tt:if(p.x>=0&&(g>=O||d&&(h<=f||v>=R))){C=!1;break}b(tt),c+=p.x,c<0&&(s=et,c=-c,l-=c),d&&(u=c/d,h+=(r.height-u)/2);break;case Z:if(p.y<=0&&(h<=f||d&&(l<=D||g>=O))){C=!1;break}b(Z),u-=p.y,h+=p.y,u<0&&(s=at,u=-u,h-=u),d&&(c=u*d,l+=(r.width-c)/2);break;case et:if(p.x<=0&&(l<=D||d&&(h<=f||v>=R))){C=!1;break}b(et),c-=p.x,l+=p.x,c<0&&(s=tt,c=-c,l-=c),d&&(u=c/d,h+=(r.height-u)/2);break;case at:if(p.y>=0&&(v>=R||d&&(l<=D||g>=O))){C=!1;break}b(at),u+=p.y,u<0&&(s=Z,u=-u,h-=u),d&&(c=u*d,l+=(r.width-c)/2);break;case ct:if(d){if(p.y<=0&&(h<=f||g>=O)){C=!1;break}b(Z),u-=p.y,h+=p.y,c=u*d}else b(Z),b(tt),p.x>=0?g<O?c+=p.x:p.y<=0&&h<=f&&(C=!1):c+=p.x,p.y<=0?h>f&&(u-=p.y,h+=p.y):(u-=p.y,h+=p.y);c<0&&u<0?(s=ut,u=-u,c=-c,h-=u,l-=c):c<0?(s=lt,c=-c,l-=c):u<0&&(s=dt,u=-u,h-=u);break;case lt:if(d){if(p.y<=0&&(h<=f||l<=D)){C=!1;break}b(Z),u-=p.y,h+=p.y,c=u*d,l+=r.width-c}else b(Z),b(et),p.x<=0?l>D?(c-=p.x,l+=p.x):p.y<=0&&h<=f&&(C=!1):(c-=p.x,l+=p.x),p.y<=0?h>f&&(u-=p.y,h+=p.y):(u-=p.y,h+=p.y);c<0&&u<0?(s=dt,u=-u,c=-c,h-=u,l-=c):c<0?(s=ct,c=-c,l-=c):u<0&&(s=ut,u=-u,h-=u);break;case ut:if(d){if(p.x<=0&&(l<=D||v>=R)){C=!1;break}b(et),c-=p.x,l+=p.x,u=c/d}else b(at),b(et),p.x<=0?l>D?(c-=p.x,l+=p.x):p.y>=0&&v>=R&&(C=!1):(c-=p.x,l+=p.x),p.y>=0?v<R&&(u+=p.y):u+=p.y;c<0&&u<0?(s=ct,u=-u,c=-c,h-=u,l-=c):c<0?(s=dt,c=-c,l-=c):u<0&&(s=lt,u=-u,h-=u);break;case dt:if(d){if(p.x>=0&&(g>=O||v>=R)){C=!1;break}b(tt),c+=p.x,u=c/d}else b(at),b(tt),p.x>=0?g<O?c+=p.x:p.y>=0&&v>=R&&(C=!1):c+=p.x,p.y>=0?v<R&&(u+=p.y):u+=p.y;c<0&&u<0?(s=lt,u=-u,c=-c,h-=u,l-=c):c<0?(s=ut,c=-c,l-=c):u<0&&(s=ct,u=-u,h-=u);break;case ve:this.move(p.x,p.y),C=!1;break;case me:this.zoom(Mi(n),t),C=!1;break;case ge:if(!p.x||!p.y){C=!1;break}V=Ce(this.cropper),l=k.startX-V.left,h=k.startY-V.top,c=r.minWidth,u=r.minHeight,p.x>0?s=p.y>0?dt:ct:p.x<0&&(l-=c,s=p.y>0?ut:lt),p.y<0&&(h-=u),this.cropped||(G(this.cropBox,X),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}C&&(r.width=c,r.height=u,r.left=l,r.top=h,this.action=s,this.renderCropBox()),A(n,function(N){N.startX=N.endX,N.startY=N.endY})}},zi={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&B(this.dragBox,yt),G(this.cropBox,X),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=T({},this.initialImageData),this.canvasData=T({},this.initialCanvasData),this.cropBoxData=T({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(T(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),G(this.dragBox,yt),B(this.cropBox,X)),this},replace:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),i?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,A(this.previews,function(e){e.getElementsByTagName("img")[0].src=t}))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(t))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,G(this.cropper,Qt)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,B(this.cropper,Qt)),this},destroy:function(){var t=this.element;return t[E]?(t[E]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,e=this.canvasData,o=e.left,r=e.top;return this.moveTo(_t(t)?t:o+Number(t),_t(i)?i:r+Number(i))},moveTo:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,e=this.canvasData,o=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.movable&&(m(t)&&(e.left=t,o=!0),m(i)&&(e.top=i,o=!0),o&&this.renderCanvas(!0)),this},zoom:function(t,i){var e=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(e.width*t/e.naturalWidth,null,i)},zoomTo:function(t,i,e){var o=this.options,r=this.canvasData,n=r.width,s=r.height,d=r.naturalWidth,l=r.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&o.zoomable){var h=d*t,c=l*t;if(st(this.element,Bt,{ratio:t,oldRatio:n/d,originalEvent:e})===!1)return this;if(e){var u=this.pointers,g=Ce(this.cropper),v=u&&Object.keys(u).length?_i(u):{pageX:e.pageX,pageY:e.pageY};r.left-=(h-n)*((v.pageX-g.left-r.left)/n),r.top-=(c-s)*((v.pageY-g.top-r.top)/s)}else rt(i)&&m(i.x)&&m(i.y)?(r.left-=(h-n)*((i.x-r.left)/n),r.top-=(c-s)*((i.y-r.top)/s)):(r.left-=(h-n)/2,r.top-=(c-s)/2);r.width=h,r.height=c,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),m(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var i=this.imageData.scaleY;return this.scale(t,m(i)?i:1)},scaleY:function(t){var i=this.imageData.scaleX;return this.scale(m(i)?i:1,t)},scale:function(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,e=this.imageData,o=!1;return t=Number(t),i=Number(i),this.ready&&!this.disabled&&this.options.scalable&&(m(t)&&(e.scaleX=t,o=!0),m(i)&&(e.scaleY=i,o=!0),o&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,i=this.options,e=this.imageData,o=this.canvasData,r=this.cropBoxData,n;if(this.ready&&this.cropped){n={x:r.left-o.left,y:r.top-o.top,width:r.width,height:r.height};var s=e.width/e.naturalWidth;if(A(n,function(h,c){n[c]=h/s}),t){var d=Math.round(n.y+n.height),l=Math.round(n.x+n.width);n.x=Math.round(n.x),n.y=Math.round(n.y),n.width=l-n.x,n.height=d-n.y}}else n={x:0,y:0,width:0,height:0};return i.rotatable&&(n.rotate=e.rotate||0),i.scalable&&(n.scaleX=e.scaleX||1,n.scaleY=e.scaleY||1),n},setData:function(t){var i=this.options,e=this.imageData,o=this.canvasData,r={};if(this.ready&&!this.disabled&&rt(t)){var n=!1;i.rotatable&&m(t.rotate)&&t.rotate!==e.rotate&&(e.rotate=t.rotate,n=!0),i.scalable&&(m(t.scaleX)&&t.scaleX!==e.scaleX&&(e.scaleX=t.scaleX,n=!0),m(t.scaleY)&&t.scaleY!==e.scaleY&&(e.scaleY=t.scaleY,n=!0)),n&&this.renderCanvas(!0,!0);var s=e.width/e.naturalWidth;m(t.x)&&(r.left=t.x*s+o.left),m(t.y)&&(r.top=t.y*s+o.top),m(t.width)&&(r.width=t.width*s),m(t.height)&&(r.height=t.height*s),this.setCropBoxData(r)}return this},getContainerData:function(){return this.ready?T({},this.containerData):{}},getImageData:function(){return this.sized?T({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,i={};return this.ready&&A(["left","top","width","height","naturalWidth","naturalHeight"],function(e){i[e]=t[e]}),i},setCanvasData:function(t){var i=this.canvasData,e=i.aspectRatio;return this.ready&&!this.disabled&&rt(t)&&(m(t.left)&&(i.left=t.left),m(t.top)&&(i.top=t.top),m(t.width)?(i.width=t.width,i.height=t.width/e):m(t.height)&&(i.height=t.height,i.width=t.height*e),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,i;return this.ready&&this.cropped&&(i={left:t.left,top:t.top,width:t.width,height:t.height}),i||{}},setCropBoxData:function(t){var i=this.cropBoxData,e=this.options.aspectRatio,o,r;return this.ready&&this.cropped&&!this.disabled&&rt(t)&&(m(t.left)&&(i.left=t.left),m(t.top)&&(i.top=t.top),m(t.width)&&t.width!==i.width&&(o=!0,i.width=t.width),m(t.height)&&t.height!==i.height&&(r=!0,i.height=t.height),e&&(o?i.height=i.width/e:r&&(i.width=i.height*e)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var i=this.canvasData,e=Ei(this.image,this.imageData,i,t);if(!this.cropped)return e;var o=this.getData(t.rounded),r=o.x,n=o.y,s=o.width,d=o.height,l=e.width/Math.floor(i.naturalWidth);l!==1&&(r*=l,n*=l,s*=l,d*=l);var h=s/d,c=Q({aspectRatio:h,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),u=Q({aspectRatio:h,width:t.minWidth||0,height:t.minHeight||0},"cover"),g=Q({aspectRatio:h,width:t.width||(l!==1?e.width:s),height:t.height||(l!==1?e.height:d)}),v=g.width,D=g.height;v=Math.min(c.width,Math.max(u.width,v)),D=Math.min(c.height,Math.max(u.height,D));var f=document.createElement("canvas"),O=f.getContext("2d");f.width=ot(v),f.height=ot(D),O.fillStyle=t.fillColor||"transparent",O.fillRect(0,0,v,D);var R=t.imageSmoothingEnabled,C=R===void 0?!0:R,V=t.imageSmoothingQuality;O.imageSmoothingEnabled=C,V&&(O.imageSmoothingQuality=V);var k=e.width,p=e.height,b=r,N=n,$,w,y,x,_,M;b<=-s||b>k?(b=0,$=0,y=0,_=0):b<=0?(y=-b,b=0,$=Math.min(k,s+b),_=$):b<=k&&(y=0,$=Math.min(s,k-b),_=$),$<=0||N<=-d||N>p?(N=0,w=0,x=0,M=0):N<=0?(x=-N,N=0,w=Math.min(p,d+N),M=w):N<=p&&(x=0,w=Math.min(d,p-N),M=w);var I=[b,N,$,w];if(_>0&&M>0){var J=v/s;I.push(y*J,x*J,_*J,M*J)}return O.drawImage.apply(O,[e].concat(pe(I.map(function(vt){return Math.floor(ot(vt))})))),f},setAspectRatio:function(t){var i=this.options;return!this.disabled&&!_t(t)&&(i.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var i=this.options,e=this.dragBox,o=this.face;if(this.ready&&!this.disabled){var r=t===$t,n=i.movable&&t===we;t=r||n?t:be,i.dragMode=t,gt(e,ft,t),nt(e,Ot,r),nt(e,Rt,n),i.cropBoxMovable||(gt(o,ft,t),nt(o,Ot,r),nt(o,Rt,n))}return this}},$i=q.Cropper,Te=function(){function a(t){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Ke(this,a),!t||!ui.test(t.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=t,this.options=T({},he,rt(i)&&i),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 Qe(a,[{key:"init",value:function(){var i=this.element,e=i.tagName.toLowerCase(),o;if(!i[E]){if(i[E]=this,e==="img"){if(this.isImg=!0,o=i.getAttribute("src")||"",this.originalUrl=o,!o)return;o=i.src}else e==="canvas"&&window.HTMLCanvasElement&&(o=i.toDataURL());this.load(o)}}},{key:"load",value:function(i){var e=this;if(i){this.url=i,this.imageData={};var o=this.element,r=this.options;if(!r.rotatable&&!r.scalable&&(r.checkOrientation=!1),!r.checkOrientation||!window.ArrayBuffer){this.clone();return}if(li.test(i)){di.test(i)?this.read(Ri(i)):this.clone();return}var n=new XMLHttpRequest,s=this.clone.bind(this);this.reloading=!0,this.xhr=n,n.onabort=s,n.onerror=s,n.ontimeout=s,n.onprogress=function(){n.getResponseHeader("content-type")!==se&&n.abort()},n.onload=function(){e.read(n.response)},n.onloadend=function(){e.reloading=!1,e.xhr=null},r.checkCrossOrigin&&le(i)&&o.crossOrigin&&(i=de(i)),n.open("GET",i,!0),n.responseType="arraybuffer",n.withCredentials=o.crossOrigin==="use-credentials",n.send()}}},{key:"read",value:function(i){var e=this.options,o=this.imageData,r=Si(i),n=0,s=1,d=1;if(r>1){this.url=Ni(i,se);var l=Ai(r);n=l.rotate,s=l.scaleX,d=l.scaleY}e.rotatable&&(o.rotate=n),e.scalable&&(o.scaleX=s,o.scaleY=d),this.clone()}},{key:"clone",value:function(){var i=this.element,e=this.url,o=i.crossOrigin,r=e;this.options.checkCrossOrigin&&le(e)&&(o||(o="anonymous"),r=de(e)),this.crossOrigin=o,this.crossOriginUrl=r;var n=document.createElement("img");o&&(n.crossOrigin=o),n.src=r||e,n.alt=i.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),B(n,Jt),i.parentNode.insertBefore(n,i.nextSibling)}},{key:"start",value:function(){var i=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var o=q.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(q.navigator.userAgent),r=function(l,h){T(i.imageData,{naturalWidth:l,naturalHeight:h,aspectRatio:l/h}),i.initialImageData=T({},i.imageData),i.sizing=!1,i.sized=!0,i.build()};if(e.naturalWidth&&!o){r(e.naturalWidth,e.naturalHeight);return}var n=document.createElement("img"),s=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){r(n.width,n.height),o||s.removeChild(n)},n.src=e.src,o||(n.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;",s.appendChild(n))}},{key:"stop",value:function(){var i=this.image;i.onload=null,i.onerror=null,i.parentNode.removeChild(i),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var i=this.element,e=this.options,o=this.image,r=i.parentNode,n=document.createElement("div");n.innerHTML=pi;var s=n.querySelector(".".concat(E,"-container")),d=s.querySelector(".".concat(E,"-canvas")),l=s.querySelector(".".concat(E,"-drag-box")),h=s.querySelector(".".concat(E,"-crop-box")),c=h.querySelector(".".concat(E,"-face"));this.container=r,this.cropper=s,this.canvas=d,this.dragBox=l,this.cropBox=h,this.viewBox=s.querySelector(".".concat(E,"-view-box")),this.face=c,d.appendChild(o),B(i,X),r.insertBefore(s,i.nextSibling),G(o,Jt),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,B(h,X),e.guides||B(h.getElementsByClassName("".concat(E,"-dashed")),X),e.center||B(h.getElementsByClassName("".concat(E,"-center")),X),e.background&&B(s,"".concat(E,"-bg")),e.highlight||B(c,ni),e.cropBoxMovable&&(B(c,Rt),gt(c,ft,zt)),e.cropBoxResizable||(B(h.getElementsByClassName("".concat(E,"-line")),X),B(h.getElementsByClassName("".concat(E,"-point")),X)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),P(e.ready)&&U(i,re,e.ready,{once:!0}),st(i,re)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var i=this.cropper.parentNode;i&&i.removeChild(this.cropper),G(this.element,X)}}},{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=$i,a}},{key:"setDefaults",value:function(i){T(he,rt(i)&&i)}}]),a}();T(Te.prototype,Li,Bi,Ii,ki,Hi,zi);const Pi={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Xi=z("path",{fill:"currentColor",d:"M168 504.2c1-43.7 10-86.1 26.9-126 17.3-41 42.1-77.7 73.7-109.4S337 212.3 378 195c42.4-17.9 87.4-27 133.9-27s91.5 9.1 133.8 27A341.5 341.5 0 0 1 755 268.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 0 0 3 14.1l175.7 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c0-6.7-7.7-10.5-12.9-6.3l-56.4 44.1C765.8 155.1 646.2 92 511.8 92 282.7 92 96.3 275.6 92 503.8a8 8 0 0 0 8 8.2h60c4.4 0 7.9-3.5 8-7.8m756 7.8h-60c-4.4 0-7.9 3.5-8 7.8-1 43.7-10 86.1-26.9 126-17.3 41-42.1 77.8-73.7 109.4A342.45 342.45 0 0 1 512.1 856a342.24 342.24 0 0 1-243.2-100.8c-9.9-9.9-19.2-20.4-27.8-31.4l60.2-47a8 8 0 0 0-3-14.1l-175.7-43c-5-1.2-9.9 2.6-9.9 7.7l-.7 181c0 6.7 7.7 10.5 12.9 6.3l56.4-44.1C258.2 868.9 377.8 932 512.2 932c229.2 0 415.5-183.7 419.8-411.8a8 8 0 0 0-8-8.2"},null,-1),Yi=[Xi];function Wi(a,t){return Y(),W("svg",Pi,[...Yi])}const Vi={render:Wi},Ui={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},ji=z("path",{fill:"currentColor",d:"M400 317.7h73.9V656c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V317.7H624c6.7 0 10.4-7.7 6.3-12.9L518.3 163a8 8 0 0 0-12.6 0l-112 141.7c-4.1 5.3-.4 13 6.3 13M878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8"},null,-1),Gi=[ji];function qi(a,t){return Y(),W("svg",Ui,[...Gi])}const Fi={render:qi},Zi={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"},Ki=z("path",{d:"m296.992 216.992-272 272L3.008 512l21.984 23.008 272 272 46.016-46.016L126.016 544h772L680.992 760.992l46.016 46.016 272-272L1020.992 512l-21.984-23.008-272-272-46.048 46.048L898.016 480h-772l216.96-216.992z"},null,-1),Qi=[Ki];function Ji(a,t){return Y(),W("svg",Zi,[...Qi])}const ta={render:Ji},ea={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"},ia=z("path",{d:"m512 67.008-23.008 21.984-256 256 46.048 46.048L480 190.016v644L279.008 632.96l-46.048 46.08 256 256 23.008 21.984 23.008-21.984 256-256-46.016-46.016L544 834.016v-644l200.992 200.96 46.016-45.984-256-256z"},null,-1),aa=[ia];function ra(a,t){return Y(),W("svg",ea,[...aa])}const na={render:ra},oa={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},sa=z("path",{fill:"currentColor",d:"M868 545.5 536.1 163a31.96 31.96 0 0 0-48.3 0L156 545.5a7.97 7.97 0 0 0 6 13.2h81c4.6 0 9-2 12.1-5.5L474 300.9V864c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V300.9l218.9 252.3c3 3.5 7.4 5.5 12.1 5.5h81c6.8 0 10.5-8 6-13.2"},null,-1),ha=[sa];function ca(a,t){return Y(),W("svg",oa,[...ha])}const la={render:ca},da={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",class:"icon",viewBox:"0 0 1024 1024"},ua=Ie('<path d="M956.8 988.8H585.6c-16 0-25.6-9.6-25.6-28.8V576c0-16 9.6-28.8 25.6-28.8h371.2c16 0 25.6 9.6 25.6 28.8v384c0 16-9.6 28.8-25.6 28.8M608 937.6h326.4V598.4H608zm-121.6 44.8C262.4 982.4 144 848 144 595.2c0-19.2 9.6-28.8 25.6-28.8s25.6 12.8 25.6 28.8c0 220.8 96 326.4 288 326.4 16 0 25.6 12.8 25.6 28.8s-6.4 32-22.4 32"></path><path d="M262.4 694.4c-6.4 0-9.6-3.2-16-6.4L160 601.6c-9.6-9.6-9.6-22.4 0-28.8s22.4-9.6 28.8 0l86.4 86.4c9.6 9.6 9.6 22.4 0 28.8-3.2 3.2-6.4 6.4-12.8 6.4"></path><path d="M86.4 694.4c-6.4 0-9.6-3.2-16-6.4-9.6-9.6-9.6-22.4 0-28.8l86.4-86.4c9.6-9.6 22.4-9.6 28.8 0 9.6 9.6 9.6 22.4 0 28.8L99.2 688c-3.2 3.2-6.4 6.4-12.8 6.4m790.4-249.6c-16 0-28.8-12.8-28.8-32 0-224-99.2-336-300.8-336-16 0-28.8-12.8-28.8-32s9.6-32 28.8-32c233.6 0 355.2 137.6 355.2 396.8 0 22.4-9.6 35.2-25.6 35.2"></path><path d="M876.8 448c-6.4 0-9.6-3.2-16-6.4l-86.4-86.4c-9.6-9.6-9.6-22.4 0-28.8s22.4-9.6 28.8 0l86.4 86.4c9.6 9.6 9.6 22.4 0 28.8 0 3.2-6.4 6.4-12.8 6.4"></path><path d="M876.8 448c-6.4 0-9.6-3.2-16-6.4-9.6-9.6-9.6-22.4 0-28.8l86.4-86.4c9.6-9.6 22.4-9.6 28.8 0s9.6 22.4 0 28.8l-86.4 86.4c-3.2 3.2-6.4 6.4-12.8 6.4M288 524.8C156.8 524.8 48 416 48 278.4S156.8 35.2 288 35.2 528 144 528 281.6 419.2 524.8 288 524.8m-3.2-432c-99.2 0-179.2 83.2-179.2 185.6S185.6 464 284.8 464 464 380.8 464 278.4 384 92.8 284.8 92.8"></path>',5),pa=[ua];function fa(a,t){return Y(),W("svg",da,[...pa])}const ga={render:fa},va={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},ma=z("path",{fill:"currentColor",d:"M862 465.3h-81c-4.6 0-9 2-12.1 5.5L550 723.1V160c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v563.1L255.1 470.8c-3-3.5-7.4-5.5-12.1-5.5h-81c-6.8 0-10.5 8.1-6 13.2L487.9 861a31.96 31.96 0 0 0 48.3 0L868 478.5c4.5-5.2.8-13.2-6-13.2"},null,-1),wa=[ma];function ba(a,t){return Y(),W("svg",va,[...wa])}const ya={render:ba},xa={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Da=z("path",{fill:"currentColor",d:"M872 474H286.9l350.2-304c5.6-4.9 2.2-14-5.2-14h-88.5c-3.9 0-7.6 1.4-10.5 3.9L155 487.8a31.96 31.96 0 0 0 0 48.3L535.1 866c1.5 1.3 3.3 2 5.2 2h91.5c7.4 0 10.8-9.2 5.2-14L286.9 550H872c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8"},null,-1),Ma=[Da];function _a(a,t){return Y(),W("svg",xa,[...Ma])}const Ca={render:_a},Ea={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Ta=z("path",{fill:"currentColor",d:"M505.7 661a8 8 0 0 0 12.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8"},null,-1),Oa=[Ta];function Ra(a,t){return Y(),W("svg",Ea,[...Oa])}const Na={render:Ra},Sa={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Aa=z("path",{fill:"currentColor",d:"M869 487.8 491.2 159.9c-2.9-2.5-6.6-3.9-10.5-3.9h-88.5c-7.4 0-10.8 9.2-5.2 14l350.2 304H152c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h585.1L386.9 854c-5.6 4.9-2.2 14 5.2 14h91.5c1.9 0 3.8-.7 5.2-2L869 536.2a32.07 32.07 0 0 0 0-48.4"},null,-1),La=[Aa];function Ba(a,t){return Y(),W("svg",Sa,[...La])}const Ia={render:Ba},ka={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Ha=z("path",{fill:"currentColor",d:"M672 418H144c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32m-44 402H188V494h440z"},null,-1),za=z("path",{fill:"currentColor",d:"M819.3 328.5c-78.8-100.7-196-153.6-314.6-154.2l-.2-64c0-6.5-7.6-10.1-12.6-6.1l-128 101c-4 3.1-3.9 9.1 0 12.3L492 318.6c5.1 4 12.7.4 12.6-6.1v-63.9c12.9.1 25.9.9 38.8 2.5 42.1 5.2 82.1 18.2 119 38.7 38.1 21.2 71.2 49.7 98.4 84.3 27.1 34.7 46.7 73.7 58.1 115.8 11 40.7 14 82.7 8.9 124.8-.7 5.4-1.4 10.8-2.4 16.1h74.9c14.8-103.6-11.3-213-81-302.3"},null,-1),$a=[Ha,za];function Pa(a,t){return Y(),W("svg",ka,[...$a])}const Xa={render:Pa},Ya={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},Wa=z("path",{fill:"currentColor",d:"M637 443H519V309c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v134H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h118v134c0 4.4 3.6 8 8 8h60c4.4 0 8-3.6 8-8V519h118c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8m284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11M696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430"},null,-1),Va=[Wa];function Ua(a,t){return Y(),W("svg",Ya,[...Va])}const ja={render:Ua},Ga={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},qa=z("path",{fill:"currentColor",d:"M480.5 251.2c13-1.6 25.9-2.4 38.8-2.5v63.9c0 6.5 7.5 10.1 12.6 6.1L660 217.6c4-3.2 4-9.2 0-12.3l-128-101c-5.1-4-12.6-.4-12.6 6.1l-.2 64c-118.6.5-235.8 53.4-314.6 154.2-69.6 89.2-95.7 198.6-81.1 302.4h74.9c-.9-5.3-1.7-10.7-2.4-16.1-5.1-42.1-2.1-84.1 8.9-124.8 11.4-42.2 31-81.1 58.1-115.8 27.2-34.7 60.3-63.2 98.4-84.3 37-20.6 76.9-33.6 119.1-38.8"},null,-1),Fa=z("path",{fill:"currentColor",d:"M880 418H352c-17.7 0-32 14.3-32 32v414c0 17.7 14.3 32 32 32h528c17.7 0 32-14.3 32-32V450c0-17.7-14.3-32-32-32m-44 402H396V494h440z"},null,-1),Za=[qa,Fa];function Ka(a,t){return Y(),W("svg",Ga,[...Za])}const Qa={render:Ka},Ja={xmlns:"http://www.w3.org/2000/svg",width:"32",height:"32",viewBox:"0 0 1024 1024"},tr=z("path",{fill:"currentColor",d:"M637 443H325c-4.4 0-8 3.6-8 8v60c0 4.4 3.6 8 8 8h312c4.4 0 8-3.6 8-8v-60c0-4.4-3.6-8-8-8m284 424L775 721c122.1-148.9 113.6-369.5-26-509-148-148.1-388.4-148.1-537 0-148.1 148.6-148.1 389 0 537 139.5 139.6 360.1 148.1 509 26l146 146c3.2 2.8 8.3 2.8 11 0l43-43c2.8-2.7 2.8-7.8 0-11M696 696c-118.8 118.7-311.2 118.7-430 0-118.7-118.8-118.7-311.2 0-430 118.8-118.7 311.2-118.7 430 0 118.7 118.8 118.7 311.2 0 430"},null,-1),er=[tr];function ir(a,t){return Y(),W("svg",Ja,[...er])}const ar={render:ir},rr={aspectRatio:1,zoomable:!0,zoomOnTouch:!0,zoomOnWheel:!0,cropBoxMovable:!0,cropBoxResizable:!0,toggleDragModeOnDblclick:!0,autoCrop:!0,background:!0,highlight:!0,center:!0,responsive:!0,restore:!0,checkCrossOrigin:!0,checkOrientation:!0,scalable:!0,modal:!0,guides:!0,movable:!0,rotatable:!0},nr={src:{type:String,required:!0},alt:{type:String},circled:{type:Boolean,default:!1},isClose:{type:Boolean,default:!0},realTimePreview:{type:Boolean,default:!0},height:{type:[String,Number],default:"360px"},crossorigin:{type:String,default:void 0},imageStyle:{type:Object,default:()=>({})},options:{type:Object,default:()=>({})}},or=Ft({name:"ReCropper",props:nr,setup(a,{attrs:t,emit:i}){const e=F(),o=F(),r=F(),n=F(a.circled),s=F(a.isClose),d=F(a.src),l=F(!1),h=F();let c=1,u=1;const g=Xe(C,80),v=mt(()=>ht({height:a.height,maxWidth:"100%"},a.imageStyle)),D=mt(()=>[t.class,{"re-circled":n.value}]),f=mt(()=>["p-[6px]","h-[30px]","w-[30px]","outline-none","rounded-[4px]","cursor-pointer","hover:bg-[rgba(0,0,0,0.06)]"]),O=mt(()=>({height:`${a.height}`.replace(/px/,"")+"px"}));ke(R),He(()=>{var w;(w=r.value)==null||w.destroy(),l.value=!1,r.value=null,h.value="",c=1,u=1}),ze(e,()=>p("reset"));function R(){return qt(this,null,function*(){const w=$e(o);w&&(r.value=new Te(w,ht(Gt(ht({},rr),{ready:()=>{l.value=!0,C(),Pe(400).then(()=>i("readied",r.value))},crop(){g()},zoom(){g()},cropmove(){g()}}),a.options)))})}function C(){a.realTimePreview&&V()}function V(){if(!r.value)return;(n.value?k():r.value.getCroppedCanvas()).toBlob(y=>{if(!y)return;const x=new FileReader;x.readAsDataURL(y),x.onloadend=_=>{var M;!((M=_.target)!=null&&M.result)||!y||(h.value=_.target.result,i("cropper",{base64:_.target.result,blob:y,info:ht({size:y.size},r.value.getData())}))},x.onerror=()=>{i("error")}})}function k(){const w=r.value.getCroppedCanvas(),y=document.createElement("canvas"),x=y.getContext("2d"),_=w.width,M=w.height;return y.width=_,y.height=M,x.imageSmoothingEnabled=!0,x.drawImage(w,0,0,_,M),x.globalCompositeOperation="destination-in",x.beginPath(),x.arc(_/2,M/2,Math.min(_,M)/2,0,2*Math.PI,!0),x.fill(),y}function p(w,y){var x,_,M,I;w==="scaleX"&&(c=y=c===-1?1:-1),w==="scaleY"&&(u=y=u===-1?1:-1),y&&Ve(y)?(_=(x=r.value)==null?void 0:x[w])==null||_.call(x,...y):(I=(M=r.value)==null?void 0:M[w])==null||I.call(M,y)}function b(w){const y=new FileReader;return y.readAsDataURL(w),d.value="",y.onload=x=>{var _;d.value=(_=x.target)==null?void 0:_.result},y.onloadend=()=>{R()},!1}const N=Ft({directives:{tippy:Ue,longpress:je},setup(){return()=>L("div",{class:"flex flex-wrap w-[60px] justify-between"},[L(Ge,{accept:"image/*","show-file-list":!1,"before-upload":b},{default:()=>[H(L(Fi,{class:f.value},null),[[S("tippy"),{content:"上传",placement:"left-start"}]])]}),H(L(Na,{class:f.value,onClick:()=>qe(h.value,"cropping.png")},null),[[S("tippy"),{content:"下载",placement:"right-start"}]]),H(L(ga,{class:f.value,onClick:()=>{n.value=!n.value,C()}},null),[[S("tippy"),{content:"圆形、矩形裁剪",placement:"left-start"}]]),H(L(Vi,{class:f.value,onClick:()=>p("reset")},null),[[S("tippy"),{content:"重置",placement:"right-start"}]]),H(L(la,{class:f.value},null),[[S("tippy"),{content:"上移(可长按)",placement:"left-start"}],[S("longpress"),()=>p("move",[0,-10]),"0:100"]]),H(L(ya,{class:f.value},null),[[S("tippy"),{content:"下移(可长按)",placement:"right-start"}],[S("longpress"),()=>p("move",[0,10]),"0:100"]]),H(L(Ca,{class:f.value},null),[[S("tippy"),{content:"左移(可长按)",placement:"left-start"}],[S("longpress"),()=>p("move",[-10,0]),"0:100"]]),H(L(Ia,{class:f.value},null),[[S("tippy"),{content:"右移(可长按)",placement:"right-start"}],[S("longpress"),()=>p("move",[10,0]),"0:100"]]),H(L(ta,{class:f.value,onClick:()=>p("scaleX",-1)},null),[[S("tippy"),{content:"水平翻转",placement:"left-start"}]]),H(L(na,{class:f.value,onClick:()=>p("scaleY",-1)},null),[[S("tippy"),{content:"垂直翻转",placement:"right-start"}]]),H(L(Xa,{class:f.value,onClick:()=>p("rotate",-45)},null),[[S("tippy"),{content:"逆时针旋转",placement:"left-start"}]]),H(L(Qa,{class:f.value,onClick:()=>p("rotate",45)},null),[[S("tippy"),{content:"顺时针旋转",placement:"right-start"}]]),H(L(ja,{class:f.value},null),[[S("tippy"),{content:"放大(可长按)",placement:"left-start"}],[S("longpress"),()=>p("zoom",.1),"0:100"]]),H(L(ar,{class:f.value},null),[[S("tippy"),{content:"缩小(可长按)",placement:"right-start"}],[S("longpress"),()=>p("zoom",-.1),"0:100"]])])}});function $(w){w.preventDefault();const{show:y,setProps:x,destroy:_,state:M}=Ye(e,{content:N,arrow:!1,theme:"light",trigger:"manual",interactive:!0,appendTo:"parent",placement:"bottom-end"});if(x({getReferenceClientRect:()=>({width:0,height:0,top:w.clientY,bottom:w.clientY,left:w.clientX,right:w.clientX})}),y(),s.value){if(!M.value.isShown&&!M.value.isVisible)return;We(e,"click",_)}}return{inSrc:d,props:a,imgElRef:o,tippyElRef:e,getClass:D,getWrapperStyle:O,getImageStyle:v,isReady:l,croppered:V,onContextmenu:$}},render(){const{inSrc:a,isReady:t,getClass:i,getImageStyle:e,onContextmenu:o,getWrapperStyle:r}=this,{alt:n,crossorigin:s}=this.props;return a?L("div",{ref:"tippyElRef",class:i,style:r,onContextmenu:d=>o(d)},[H(L("img",{ref:"imgElRef",style:e,src:a,alt:n,crossorigin:s},null),[[Fe,t]])]):null}}),cr=Ze(or);export{cr as R};