/*! For license information please see 682.cc3d5e37bf8fc09ac3e6.min.js.LICENSE.txt */
(self.webpackChunkwhitelabel=self.webpackChunkwhitelabel||[]).push([[682],{9682:function(t,e,i){!function(t){"use strict";function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function n(t,e,i){return e&&a(t.prototype,e),i&&a(t,i),t}function o(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function r(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,a)}return i}function h(t){for(var e=1;e<arguments.length;e++){var i=null!=arguments[e]?arguments[e]:{};e%2?r(i,!0).forEach((function(e){o(t,e,i[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):r(i).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(i,e))}))}return t}function s(t){return c(t)||l(t)||d()}function c(t){if(Array.isArray(t)){for(var e=0,i=new Array(t.length);e<t.length;e++)i[e]=t[e];return i}}function l(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance")}t=t&&t.hasOwnProperty("default")?t.default:t;var p="undefined"!=typeof window&&void 0!==window.document,u=p?window:{},m=!!p&&"ontouchstart"in u.document.documentElement,g=!!p&&"PointerEvent"in u,f="cropper",v="all",w="crop",b="move",y="zoom",x="e",M="w",C="s",D="n",k="ne",B="nw",O="se",T="sw",E="".concat(f,"-crop"),W="".concat(f,"-disabled"),N="".concat(f,"-hidden"),H="".concat(f,"-hide"),L="".concat(f,"-invisible"),z="".concat(f,"-modal"),Y="".concat(f,"-move"),X="".concat(f,"Action"),R="".concat(f,"Preview"),A="crop",S="move",j="none",P="crop",I="cropend",U="cropmove",q="cropstart",$="dblclick",Q=m?"touchstart":"mousedown",K=m?"touchmove":"mousemove",Z=m?"touchend touchcancel":"mouseup",F=g?"pointerdown":Q,G=g?"pointermove":K,V=g?"pointerup pointercancel":Z,J="ready",_="resize",tt="wheel",et="zoom",it="image/jpeg",at=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,nt=/^data:/,ot=/^data:image\/jpeg;base64,/,rt=/^img|canvas$/i,ht=200,st=100,ct={viewMode:0,dragMode:A,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:200,minContainerHeight:100,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},lt='<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>',dt=Number.isNaN||u.isNaN;function pt(t){return"number"==typeof t&&!dt(t)}var ut=function(t){return t>0&&t<1/0};function mt(t){return void 0===t}function gt(t){return"object"===e(t)&&null!==t}var ft=Object.prototype.hasOwnProperty;function vt(t){if(!gt(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&ft.call(i,"isPrototypeOf")}catch(t){return!1}}function wt(t){return"function"==typeof t}var bt=Array.prototype.slice;function yt(t){return Array.from?Array.from(t):bt.call(t)}function xt(t,e){return t&&wt(e)&&(Array.isArray(t)||pt(t.length)?yt(t).forEach((function(i,a){e.call(t,i,a,t)})):gt(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var Mt=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),a=1;a<e;a++)i[a-1]=arguments[a];return gt(t)&&i.length>0&&i.forEach((function(e){gt(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},Ct=/\.\d*(?:0|9){12}\d*$/;function Dt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Ct.test(t)?Math.round(t*e)/e:t}var kt=/^width|height|left|top|marginLeft|marginTop$/;function Bt(t,e){var i=t.style;xt(e,(function(t,e){kt.test(e)&&pt(t)&&(t="".concat(t,"px")),i[e]=t}))}function Ot(t,e){return t.classList?t.classList.contains(e):t.className.indexOf(e)>-1}function Tt(t,e){if(e)if(pt(t.length))xt(t,(function(t){Tt(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function Et(t,e){e&&(pt(t.length)?xt(t,(function(t){Et(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function Wt(t,e,i){e&&(pt(t.length)?xt(t,(function(t){Wt(t,e,i)})):i?Tt(t,e):Et(t,e))}var Nt=/([a-z\d])([A-Z])/g;function Ht(t){return t.replace(Nt,"$1-$2").toLowerCase()}function Lt(t,e){return gt(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Ht(e)))}function zt(t,e,i){gt(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(Ht(e)),i)}function Yt(t,e){if(gt(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(Ht(e)))}var Xt=/\s\s*/,Rt=function(){var t=!1;if(p){var e=!1,i=function(){},a=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});u.addEventListener("test",i,a),u.removeEventListener("test",i,a)}return t}();function At(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Xt).forEach((function(e){if(!Rt){var o=t.listeners;o&&o[e]&&o[e][i]&&(n=o[e][i],delete o[e][i],0===Object.keys(o[e]).length&&delete o[e],0===Object.keys(o).length&&delete t.listeners)}t.removeEventListener(e,n,a)}))}function St(t,e,i){var a=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Xt).forEach((function(e){if(a.once&&!Rt){var o=t.listeners,r=void 0===o?{}:o;n=function(){delete r[e][i],t.removeEventListener(e,n,a);for(var o=arguments.length,h=new Array(o),s=0;s<o;s++)h[s]=arguments[s];i.apply(t,h)},r[e]||(r[e]={}),r[e][i]&&t.removeEventListener(e,r[e][i],a),r[e][i]=n,t.listeners=r}t.addEventListener(e,n,a)}))}function jt(t,e,i){var a;return wt(Event)&&wt(CustomEvent)?a=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(a=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,i),t.dispatchEvent(a)}function Pt(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var It=u.location,Ut=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function qt(t){var e=t.match(Ut);return null!==e&&(e[1]!==It.protocol||e[2]!==It.hostname||e[3]!==It.port)}function $t(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Qt(t){var e=t.rotate,i=t.scaleX,a=t.scaleY,n=t.translateX,o=t.translateY,r=[];pt(n)&&0!==n&&r.push("translateX(".concat(n,"px)")),pt(o)&&0!==o&&r.push("translateY(".concat(o,"px)")),pt(e)&&0!==e&&r.push("rotate(".concat(e,"deg)")),pt(i)&&1!==i&&r.push("scaleX(".concat(i,")")),pt(a)&&1!==a&&r.push("scaleY(".concat(a,")"));var h=r.length?r.join(" "):"none";return{WebkitTransform:h,msTransform:h,transform:h}}function Kt(t){var e=h({},t),i=[];return xt(t,(function(t,a){delete e[a],xt(e,(function(e){var a=Math.abs(t.startX-e.startX),n=Math.abs(t.startY-e.startY),o=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),h=Math.sqrt(a*a+n*n),s=(Math.sqrt(o*o+r*r)-h)/h;i.push(s)}))})),i.sort((function(t,e){return Math.abs(t)<Math.abs(e)})),i[0]}function Zt(t,e){var i=t.pageX,a=t.pageY,n={endX:i,endY:a};return e?n:h({startX:i,startY:a},n)}function Ft(t){var e=0,i=0,a=0;return xt(t,(function(t){var n=t.startX,o=t.startY;e+=n,i+=o,a+=1})),{pageX:e/=a,pageY:i/=a}}function Gt(t){var e=t.aspectRatio,i=t.height,a=t.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",o=ut(a),r=ut(i);if(o&&r){var h=i*e;"contain"===n&&h>a||"cover"===n&&h<a?i=a/e:a=i*e}else o?i=a/e:r&&(a=i*e);return{width:a,height:i}}function Vt(t){var e=t.width,i=t.height,a=t.degree;if(90==(a=Math.abs(a)%180))return{width:i,height:e};var n=a%90*Math.PI/180,o=Math.sin(n),r=Math.cos(n),h=e*r+i*o,s=e*o+i*r;return a>90?{width:s,height:h}:{width:h,height:s}}function Jt(t,e,i,a){var n=e.aspectRatio,o=e.naturalWidth,r=e.naturalHeight,h=e.rotate,c=void 0===h?0:h,l=e.scaleX,d=void 0===l?1:l,p=e.scaleY,u=void 0===p?1:p,m=i.aspectRatio,g=i.naturalWidth,f=i.naturalHeight,v=a.fillColor,w=void 0===v?"transparent":v,b=a.imageSmoothingEnabled,y=void 0===b||b,x=a.imageSmoothingQuality,M=void 0===x?"low":x,C=a.maxWidth,D=void 0===C?1/0:C,k=a.maxHeight,B=void 0===k?1/0:k,O=a.minWidth,T=void 0===O?0:O,E=a.minHeight,W=void 0===E?0:E,N=document.createElement("canvas"),H=N.getContext("2d"),L=Gt({aspectRatio:m,width:D,height:B}),z=Gt({aspectRatio:m,width:T,height:W},"cover"),Y=Math.min(L.width,Math.max(z.width,g)),X=Math.min(L.height,Math.max(z.height,f)),R=Gt({aspectRatio:n,width:D,height:B}),A=Gt({aspectRatio:n,width:T,height:W},"cover"),S=Math.min(R.width,Math.max(A.width,o)),j=Math.min(R.height,Math.max(A.height,r)),P=[-S/2,-j/2,S,j];return N.width=Dt(Y),N.height=Dt(X),H.fillStyle=w,H.fillRect(0,0,Y,X),H.save(),H.translate(Y/2,X/2),H.rotate(c*Math.PI/180),H.scale(d,u),H.imageSmoothingEnabled=y,H.imageSmoothingQuality=M,H.drawImage.apply(H,[t].concat(s(P.map((function(t){return Math.floor(Dt(t))}))))),H.restore(),N}var _t=String.fromCharCode;function te(t,e,i){var a="";i+=e;for(var n=e;n<i;n+=1)a+=_t(t.getUint8(n));return a}var ee=/^data:.*,/;function ie(t){var e=t.replace(ee,""),i=atob(e),a=new ArrayBuffer(i.length),n=new Uint8Array(a);return xt(n,(function(t,e){n[e]=i.charCodeAt(e)})),a}function ae(t,e){for(var i=[],a=8192,n=new Uint8Array(t);n.length>0;)i.push(_t.apply(null,yt(n.subarray(0,a)))),n=n.subarray(a);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}function ne(t){var e,i=new DataView(t);try{var a,n,o;if(255===i.getUint8(0)&&216===i.getUint8(1))for(var r=i.byteLength,h=2;h+1<r;){if(255===i.getUint8(h)&&225===i.getUint8(h+1)){n=h;break}h+=1}if(n){var s=n+10;if("Exif"===te(i,n+4,4)){var c=i.getUint16(s);if(((a=18761===c)||19789===c)&&42===i.getUint16(s+2,a)){var l=i.getUint32(s+4,a);l>=8&&(o=s+l)}}}if(o){var d,p,u=i.getUint16(o,a);for(p=0;p<u;p+=1)if(d=o+12*p+2,274===i.getUint16(d,a)){d+=8,e=i.getUint16(d,a),i.setUint16(d,1,a);break}}}catch(t){e=1}return e}function oe(t){var e=0,i=1,a=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:a=-1;break;case 5:e=90,a=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90}return{rotate:e,scaleX:i,scaleY:a}}var re={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,a=this.cropper;Tt(a,N),Et(t,N);var n={width:Math.max(i.offsetWidth,Number(e.minContainerWidth)||200),height:Math.max(i.offsetHeight,Number(e.minContainerHeight)||100)};this.containerData=n,Bt(a,{width:n.width,height:n.height}),Tt(t,N),Et(a,N)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,a=Math.abs(e.rotate)%180==90,n=a?e.naturalHeight:e.naturalWidth,o=a?e.naturalWidth:e.naturalHeight,r=n/o,h=t.width,s=t.height;t.height*r>t.width?3===i?h=t.height*r:s=t.width/r:3===i?s=t.width/r:h=t.height*r;var c={aspectRatio:r,naturalWidth:n,naturalHeight:o,width:h,height:s};c.left=(t.width-h)/2,c.top=(t.height-s)/2,c.oldLeft=c.left,c.oldTop=c.top,this.canvasData=c,this.limited=1===i||2===i,this.limitCanvas(!0,!0),this.initialImageData=Mt({},e),this.initialCanvasData=Mt({},c)},limitCanvas:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=i.viewMode,h=n.aspectRatio,s=this.cropped&&o;if(t){var c=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;r>1?(c=Math.max(c,a.width),l=Math.max(l,a.height),3===r&&(l*h>c?c=l*h:l=c/h)):r>0&&(c?c=Math.max(c,s?o.width:0):l?l=Math.max(l,s?o.height:0):s&&(c=o.width,(l=o.height)*h>c?c=l*h:l=c/h));var d=Gt({aspectRatio:h,width:c,height:l});c=d.width,l=d.height,n.minWidth=c,n.minHeight=l,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(r>(s?0:1)){var p=a.width-n.width,u=a.height-n.height;n.minLeft=Math.min(0,p),n.minTop=Math.min(0,u),n.maxLeft=Math.max(0,p),n.maxTop=Math.max(0,u),s&&this.limited&&(n.minLeft=Math.min(o.left,o.left+(o.width-n.width)),n.minTop=Math.min(o.top,o.top+(o.height-n.height)),n.maxLeft=o.left,n.maxTop=o.top,2===r&&(n.width>=a.width&&(n.minLeft=Math.min(0,p),n.maxLeft=Math.max(0,p)),n.height>=a.height&&(n.minTop=Math.min(0,u),n.maxTop=Math.max(0,u))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=a.width,n.maxTop=a.height},renderCanvas:function(t,e){var i=this.canvasData,a=this.imageData;if(e){var n=Vt({width:a.naturalWidth*Math.abs(a.scaleX||1),height:a.naturalHeight*Math.abs(a.scaleY||1),degree:a.rotate||0}),o=n.width,r=n.height,h=i.width*(o/i.naturalWidth),s=i.height*(r/i.naturalHeight);i.left-=(h-i.width)/2,i.top-=(s-i.height)/2,i.width=h,i.height=s,i.aspectRatio=o/r,i.naturalWidth=o,i.naturalHeight=r,this.limitCanvas(!0,!1)}(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,Bt(this.canvas,Mt({width:i.width,height:i.height},Qt({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,a=i.naturalWidth*(e.width/e.naturalWidth),n=i.naturalHeight*(e.height/e.naturalHeight);Mt(i,{width:a,height:n,left:(e.width-a)/2,top:(e.height-n)/2}),Bt(this.image,Mt({width:i.width,height:i.height},Qt(Mt({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,a=Number(t.autoCropArea)||.8,n={width:e.width,height:e.height};i&&(e.height*i>e.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*a),n.height=Math.max(n.minHeight,n.height*a),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=Mt({},n)},limitCropBox:function(t,e){var i=this.options,a=this.containerData,n=this.canvasData,o=this.cropBoxData,r=this.limited,h=i.aspectRatio;if(t){var s=Number(i.minCropBoxWidth)||0,c=Number(i.minCropBoxHeight)||0,l=r?Math.min(a.width,n.width,n.width+n.left,a.width-n.left):a.width,d=r?Math.min(a.height,n.height,n.height+n.top,a.height-n.top):a.height;s=Math.min(s,a.width),c=Math.min(c,a.height),h&&(s&&c?c*h>s?c=s/h:s=c*h:s?c=s/h:c&&(s=c*h),d*h>l?d=l/h:l=d*h),o.minWidth=Math.min(s,l),o.minHeight=Math.min(c,d),o.maxWidth=l,o.maxHeight=d}e&&(r?(o.minLeft=Math.max(0,n.left),o.minTop=Math.max(0,n.top),o.maxLeft=Math.min(a.width,n.left+n.width)-o.width,o.maxTop=Math.min(a.height,n.top+n.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=a.width-o.width,o.maxTop=a.height-o.height))},renderCropBox:function(){var t=this.options,e=this.containerData,i=this.cropBoxData;(i.width>i.maxWidth||i.width<i.minWidth)&&(i.left=i.oldLeft),(i.height>i.maxHeight||i.height<i.minHeight)&&(i.top=i.oldTop),i.width=Math.min(Math.max(i.width,i.minWidth),i.maxWidth),i.height=Math.min(Math.max(i.height,i.minHeight),i.maxHeight),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&zt(this.face,X,i.width>=e.width&&i.height>=e.height?b:v),Bt(this.cropBox,Mt({width:i.width,height:i.height},Qt({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),jt(this.element,P,this.getData())}},he={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,a=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",o=document.createElement("img");if(e&&(o.crossOrigin=e),o.src=a,o.alt=n,this.viewBox.appendChild(o),this.viewBoxImage=o,i){var r=i;"string"==typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,xt(r,(function(t){var i=document.createElement("img");zt(t,R,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=a,i.alt=n,i.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;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){xt(this.previews,(function(t){var e=Lt(t,R);Bt(t,{width:e.width,height:e.height}),t.innerHTML=e.html,Yt(t,R)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,a=i.width,n=i.height,o=t.width,r=t.height,h=i.left-e.left-t.left,s=i.top-e.top-t.top;this.cropped&&!this.disabled&&(Bt(this.viewBoxImage,Mt({width:o,height:r},Qt(Mt({translateX:-h,translateY:-s},t)))),xt(this.previews,(function(e){var i=Lt(e,R),c=i.width,l=i.height,d=c,p=l,u=1;a&&(p=n*(u=c/a)),n&&p>l&&(d=a*(u=l/n),p=l),Bt(e,{width:d,height:p}),Bt(e.getElementsByTagName("img")[0],Mt({width:o*u,height:r*u},Qt(Mt({translateX:-h*u,translateY:-s*u},t))))})))}},se={bind:function(){var t=this.element,e=this.options,i=this.cropper;wt(e.cropstart)&&St(t,q,e.cropstart),wt(e.cropmove)&&St(t,U,e.cropmove),wt(e.cropend)&&St(t,I,e.cropend),wt(e.crop)&&St(t,P,e.crop),wt(e.zoom)&&St(t,et,e.zoom),St(i,F,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&St(i,tt,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&St(i,$,this.onDblclick=this.dblclick.bind(this)),St(t.ownerDocument,G,this.onCropMove=this.cropMove.bind(this)),St(t.ownerDocument,V,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&St(window,_,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;wt(e.cropstart)&&At(t,q,e.cropstart),wt(e.cropmove)&&At(t,U,e.cropmove),wt(e.cropend)&&At(t,I,e.cropend),wt(e.crop)&&At(t,P,e.crop),wt(e.zoom)&&At(t,et,e.zoom),At(i,F,this.onCropStart),e.zoomable&&e.zoomOnWheel&&At(i,tt,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&At(i,$,this.onDblclick),At(t.ownerDocument,G,this.onCropMove),At(t.ownerDocument,V,this.onCropEnd),e.responsive&&At(window,_,this.onResize)}},ce={resize:function(){var t=this.options,e=this.container,i=this.containerData,a=Number(t.minContainerWidth)||ht,n=Number(t.minContainerHeight)||st;if(!(this.disabled||i.width<=a||i.height<=n)){var o,r,h=e.offsetWidth/i.width;1===h&&e.offsetHeight===i.height||(t.restore&&(o=this.getCanvasData(),r=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(xt(o,(function(t,e){o[e]=t*h}))),this.setCropBoxData(xt(r,(function(t,e){r[e]=t*h})))))}},dblclick:function(){this.disabled||this.options.dragMode===j||this.setDragMode(Ot(this.dragBox,E)?S:A)},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,a=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?a=t.deltaY>0?1:-1:t.wheelDelta?a=-t.wheelDelta/120:t.detail&&(a=t.detail>0?1:-1),this.zoom(-a*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(pt(e)&&1!==e||pt(i)&&0!==i||t.ctrlKey))){var a,n=this.options,o=this.pointers;t.changedTouches?xt(t.changedTouches,(function(t){o[t.identifier]=Zt(t)})):o[t.pointerId||0]=Zt(t),a=Object.keys(o).length>1&&n.zoomable&&n.zoomOnTouch?y:Lt(t.target,X),at.test(a)&&!1!==jt(this.element,q,{originalEvent:t,action:a})&&(t.preventDefault(),this.action=a,this.cropping=!1,a===w&&(this.cropping=!0,Tt(this.dragBox,z)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==jt(this.element,U,{originalEvent:t,action:e})&&(t.changedTouches?xt(t.changedTouches,(function(t){Mt(i[t.identifier]||{},Zt(t,!0))})):Mt(i[t.pointerId||0]||{},Zt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?xt(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,Wt(this.dragBox,z,this.cropped&&this.options.modal)),jt(this.element,I,{originalEvent:t,action:e}))}}},le={change:function(t){var e,i=this.options,a=this.canvasData,n=this.containerData,o=this.cropBoxData,r=this.pointers,h=this.action,s=i.aspectRatio,c=o.left,l=o.top,d=o.width,p=o.height,u=c+d,m=l+p,g=0,f=0,E=n.width,W=n.height,H=!0;!s&&t.shiftKey&&(s=d&&p?d/p:1),this.limited&&(g=o.minLeft,f=o.minTop,E=g+Math.min(n.width,a.width,a.left+a.width),W=f+Math.min(n.height,a.height,a.top+a.height));var L=r[Object.keys(r)[0]],z={x:L.endX-L.startX,y:L.endY-L.startY},Y=function(t){switch(t){case x:u+z.x>E&&(z.x=E-u);break;case M:c+z.x<g&&(z.x=g-c);break;case D:l+z.y<f&&(z.y=f-l);break;case C:m+z.y>W&&(z.y=W-m)}};switch(h){case v:c+=z.x,l+=z.y;break;case x:if(z.x>=0&&(u>=E||s&&(l<=f||m>=W))){H=!1;break}Y(x),(d+=z.x)<0&&(h=M,c-=d=-d),s&&(p=d/s,l+=(o.height-p)/2);break;case D:if(z.y<=0&&(l<=f||s&&(c<=g||u>=E))){H=!1;break}Y(D),p-=z.y,l+=z.y,p<0&&(h=C,l-=p=-p),s&&(d=p*s,c+=(o.width-d)/2);break;case M:if(z.x<=0&&(c<=g||s&&(l<=f||m>=W))){H=!1;break}Y(M),d-=z.x,c+=z.x,d<0&&(h=x,c-=d=-d),s&&(p=d/s,l+=(o.height-p)/2);break;case C:if(z.y>=0&&(m>=W||s&&(c<=g||u>=E))){H=!1;break}Y(C),(p+=z.y)<0&&(h=D,l-=p=-p),s&&(d=p*s,c+=(o.width-d)/2);break;case k:if(s){if(z.y<=0&&(l<=f||u>=E)){H=!1;break}Y(D),p-=z.y,l+=z.y,d=p*s}else Y(D),Y(x),z.x>=0?u<E?d+=z.x:z.y<=0&&l<=f&&(H=!1):d+=z.x,z.y<=0?l>f&&(p-=z.y,l+=z.y):(p-=z.y,l+=z.y);d<0&&p<0?(h=T,l-=p=-p,c-=d=-d):d<0?(h=B,c-=d=-d):p<0&&(h=O,l-=p=-p);break;case B:if(s){if(z.y<=0&&(l<=f||c<=g)){H=!1;break}Y(D),p-=z.y,l+=z.y,d=p*s,c+=o.width-d}else Y(D),Y(M),z.x<=0?c>g?(d-=z.x,c+=z.x):z.y<=0&&l<=f&&(H=!1):(d-=z.x,c+=z.x),z.y<=0?l>f&&(p-=z.y,l+=z.y):(p-=z.y,l+=z.y);d<0&&p<0?(h=O,l-=p=-p,c-=d=-d):d<0?(h=k,c-=d=-d):p<0&&(h=T,l-=p=-p);break;case T:if(s){if(z.x<=0&&(c<=g||m>=W)){H=!1;break}Y(M),d-=z.x,c+=z.x,p=d/s}else Y(C),Y(M),z.x<=0?c>g?(d-=z.x,c+=z.x):z.y>=0&&m>=W&&(H=!1):(d-=z.x,c+=z.x),z.y>=0?m<W&&(p+=z.y):p+=z.y;d<0&&p<0?(h=k,l-=p=-p,c-=d=-d):d<0?(h=O,c-=d=-d):p<0&&(h=B,l-=p=-p);break;case O:if(s){if(z.x>=0&&(u>=E||m>=W)){H=!1;break}Y(x),p=(d+=z.x)/s}else Y(C),Y(x),z.x>=0?u<E?d+=z.x:z.y>=0&&m>=W&&(H=!1):d+=z.x,z.y>=0?m<W&&(p+=z.y):p+=z.y;d<0&&p<0?(h=B,l-=p=-p,c-=d=-d):d<0?(h=T,c-=d=-d):p<0&&(h=k,l-=p=-p);break;case b:this.move(z.x,z.y),H=!1;break;case y:this.zoom(Kt(r),t),H=!1;break;case w:if(!z.x||!z.y){H=!1;break}e=Pt(this.cropper),c=L.startX-e.left,l=L.startY-e.top,d=o.minWidth,p=o.minHeight,z.x>0?h=z.y>0?O:k:z.x<0&&(c-=d,h=z.y>0?T:B),z.y<0&&(l-=p),this.cropped||(Et(this.cropBox,N),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}H&&(o.width=d,o.height=p,o.left=c,o.top=l,this.action=h,this.renderCropBox()),xt(r,(function(t){t.startX=t.endX,t.startY=t.endY}))}},de={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&Tt(this.dragBox,z),Et(this.cropBox,N),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Mt({},this.initialImageData),this.canvasData=Mt({},this.initialCanvasData),this.cropBoxData=Mt({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Mt(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Et(this.dragBox,z),Tt(this.cropBox,N)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,xt(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,Et(this.cropper,W)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,Tt(this.cropper,W)),this},destroy:function(){var t=this.element;return t[f]?(t[f]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=i.left,n=i.top;return this.moveTo(mt(t)?t:a+Number(t),mt(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(pt(t)&&(i.left=t,a=!0),pt(e)&&(i.top=e,a=!0),a&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var a=this.options,n=this.canvasData,o=n.width,r=n.height,h=n.naturalWidth,s=n.naturalHeight;if((t=Number(t))>=0&&this.ready&&!this.disabled&&a.zoomable){var c=h*t,l=s*t;if(!1===jt(this.element,et,{ratio:t,oldRatio:o/h,originalEvent:i}))return this;if(i){var d=this.pointers,p=Pt(this.cropper),u=d&&Object.keys(d).length?Ft(d):{pageX:i.pageX,pageY:i.pageY};n.left-=(c-o)*((u.pageX-p.left-n.left)/o),n.top-=(l-r)*((u.pageY-p.top-n.top)/r)}else vt(e)&&pt(e.x)&&pt(e.y)?(n.left-=(c-o)*((e.x-n.left)/o),n.top-=(l-r)*((e.y-n.top)/r)):(n.left-=(c-o)/2,n.top-=(l-r)/2);n.width=c,n.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return pt(t=Number(t))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,pt(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(pt(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,a=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(pt(t)&&(i.scaleX=t,a=!0),pt(e)&&(i.scaleY=e,a=!0),a&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,a=this.imageData,n=this.canvasData,o=this.cropBoxData;if(this.ready&&this.cropped){t={x:o.left-n.left,y:o.top-n.top,width:o.width,height:o.height};var r=a.width/a.naturalWidth;if(xt(t,(function(e,i){t[i]=e/r})),e){var h=Math.round(t.y+t.height),s=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=s-t.x,t.height=h-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=a.rotate||0),i.scalable&&(t.scaleX=a.scaleX||1,t.scaleY=a.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,a=this.canvasData,n={};if(this.ready&&!this.disabled&&vt(t)){var o=!1;e.rotatable&&pt(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),e.scalable&&(pt(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),pt(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;pt(t.x)&&(n.left=t.x*r+a.left),pt(t.y)&&(n.top=t.y*r+a.top),pt(t.width)&&(n.width=t.width*r),pt(t.height)&&(n.height=t.height*r),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?Mt({},this.containerData):{}},getImageData:function(){return this.sized?Mt({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&xt(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&vt(t)&&(pt(t.left)&&(e.left=t.left),pt(t.top)&&(e.top=t.top),pt(t.width)?(e.width=t.width,e.height=t.width/i):pt(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,a=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&vt(t)&&(pt(t.left)&&(a.left=t.left),pt(t.top)&&(a.top=t.top),pt(t.width)&&t.width!==a.width&&(e=!0,a.width=t.width),pt(t.height)&&t.height!==a.height&&(i=!0,a.height=t.height),n&&(e?a.height=a.width/n:i&&(a.width=a.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=Jt(this.image,this.imageData,e,t);if(!this.cropped)return i;var a=this.getData(),n=a.x,o=a.y,r=a.width,h=a.height,c=i.width/Math.floor(e.naturalWidth);1!==c&&(n*=c,o*=c,r*=c,h*=c);var l=r/h,d=Gt({aspectRatio:l,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),p=Gt({aspectRatio:l,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=Gt({aspectRatio:l,width:t.width||(1!==c?i.width:r),height:t.height||(1!==c?i.height:h)}),m=u.width,g=u.height;m=Math.min(d.width,Math.max(p.width,m)),g=Math.min(d.height,Math.max(p.height,g));var f=document.createElement("canvas"),v=f.getContext("2d");f.width=Dt(m),f.height=Dt(g),v.fillStyle=t.fillColor||"transparent",v.fillRect(0,0,m,g);var w=t.imageSmoothingEnabled,b=void 0===w||w,y=t.imageSmoothingQuality;v.imageSmoothingEnabled=b,y&&(v.imageSmoothingQuality=y);var x,M,C,D,k,B,O=i.width,T=i.height,E=n,W=o;E<=-r||E>O?(E=0,x=0,C=0,k=0):E<=0?(C=-E,E=0,k=x=Math.min(O,r+E)):E<=O&&(C=0,k=x=Math.min(r,O-E)),x<=0||W<=-h||W>T?(W=0,M=0,D=0,B=0):W<=0?(D=-W,W=0,B=M=Math.min(T,h+W)):W<=T&&(D=0,B=M=Math.min(h,T-W));var N=[E,W,x,M];if(k>0&&B>0){var H=m/r;N.push(C*H,D*H,k*H,B*H)}return v.drawImage.apply(v,[i].concat(s(N.map((function(t){return Math.floor(Dt(t))}))))),f},setAspectRatio:function(t){var e=this.options;return this.disabled||mt(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,a=this.face;if(this.ready&&!this.disabled){var n=t===A,o=e.movable&&t===S;t=n||o?t:j,e.dragMode=t,zt(i,X,t),Wt(i,E,n),Wt(i,Y,o),e.cropBoxMovable||(zt(a,X,t),Wt(a,E,n),Wt(a,Y,o))}return this}},pe=u.Cropper,ue=function(){function t(e){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(i(this,t),!e||!rt.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=Mt({},ct,vt(a)&&a),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 n(t,[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[f]){if(e[f]=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,a=this.options;if(a.rotatable||a.scalable||(a.checkOrientation=!1),a.checkOrientation&&window.ArrayBuffer)if(nt.test(t))ot.test(t)?this.read(ie(t)):this.clone();else{var n=new XMLHttpRequest,o=this.clone.bind(this);this.reloading=!0,this.xhr=n,n.onabort=o,n.onerror=o,n.ontimeout=o,n.onprogress=function(){n.getResponseHeader("content-type")!==it&&n.abort()},n.onload=function(){e.read(n.response)},n.onloadend=function(){e.reloading=!1,e.xhr=null},a.checkCrossOrigin&&qt(t)&&i.crossOrigin&&(t=$t(t)),n.open("GET",t),n.responseType="arraybuffer",n.withCredentials="use-credentials"===i.crossOrigin,n.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,a=ne(t),n=0,o=1,r=1;if(a>1){this.url=ae(t,it);var h=oe(a);n=h.rotate,o=h.scaleX,r=h.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=o,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,a=e;this.options.checkCrossOrigin&&qt(e)&&(i||(i="anonymous"),a=$t(e)),this.crossOrigin=i,this.crossOriginUrl=a;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=a||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),Tt(n,H),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=u.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(u.navigator.userAgent),a=function(e,i){Mt(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),o=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){a(n.width,n.height),i||o.removeChild(n)},n.src=e.src,i||(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;",o.appendChild(n))}else a(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,a=t.parentNode,n=document.createElement("div");n.innerHTML=lt;var o=n.querySelector(".".concat(f,"-container")),r=o.querySelector(".".concat(f,"-canvas")),h=o.querySelector(".".concat(f,"-drag-box")),s=o.querySelector(".".concat(f,"-crop-box")),c=s.querySelector(".".concat(f,"-face"));this.container=a,this.cropper=o,this.canvas=r,this.dragBox=h,this.cropBox=s,this.viewBox=o.querySelector(".".concat(f,"-view-box")),this.face=c,r.appendChild(i),Tt(t,N),a.insertBefore(o,t.nextSibling),this.isImg||Et(i,H),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,Tt(s,N),e.guides||Tt(s.getElementsByClassName("".concat(f,"-dashed")),N),e.center||Tt(s.getElementsByClassName("".concat(f,"-center")),N),e.background&&Tt(o,"".concat(f,"-bg")),e.highlight||Tt(c,L),e.cropBoxMovable&&(Tt(c,Y),zt(c,X,v)),e.cropBoxResizable||(Tt(s.getElementsByClassName("".concat(f,"-line")),N),Tt(s.getElementsByClassName("".concat(f,"-point")),N)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),wt(e.ready)&&St(t,J,e.ready,{once:!0}),jt(t,J)}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),Et(this.element,N))}},{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=pe,t}},{key:"setDefaults",value:function(t){Mt(ct,vt(t)&&t)}}]),t}();if(Mt(ue.prototype,re,he,se,ce,le,de),t.fn){var me=t.fn.cropper,ge="cropper";t.fn.cropper=function(e){for(var i=arguments.length,a=new Array(i>1?i-1:0),n=1;n<i;n++)a[n-1]=arguments[n];var o;return this.each((function(i,n){var r=t(n),h="destroy"===e,s=r.data(ge);if(!s){if(h)return;var c=t.extend({},r.data(),t.isPlainObject(e)&&e);s=new ue(n,c),r.data(ge,s)}if("string"==typeof e){var l=s[e];t.isFunction(l)&&((o=l.apply(s,a))===s&&(o=void 0),h&&r.removeData(ge))}})),void 0!==o?o:this},t.fn.cropper.Constructor=ue,t.fn.cropper.setDefaults=ue.setDefaults,t.fn.cropper.noConflict=function(){return t.fn.cropper=me,this}}}(i(4692))}}]);