;/*!node_modules/cropperjs/dist/cropper.js*/
amis.define("54728a0",(function(t,e,a,i){
/*!
   * Cropper.js v1.0.0-rc.3
   * https://github.com/fengyuanchen/cropperjs
   *
   * Copyright (c) 2017 Fengyuan Chen
   * Released under the MIT license
   *
   * Date: 2017-07-07T12:56:42.462Z
   */var o,n;o=this,n=function(){"use strict";var t={viewMode:0,dragMode:"crop",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},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},a=function(){function t(t,e){for(var a=0;a<e.length;a++){var i=e[a];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}return function(e,a,i){return a&&t(e.prototype,a),i&&t(e,i),e}}(),i=/^data:.*,/,o=/([a-z\d])([A-Z])/g,n=/^(https?:)\/\/([^:/?#]+):?(\d*)/i,r=/\s+/,h=/^(width|height|left|top|marginLeft|marginTop)$/,c=/^\s+(.*)\s+$/,s="undefined"!=typeof window?window.navigator:null,l=s&&/(Macintosh|iPhone|iPod|iPad).*AppleWebKit/i.test(s.userAgent),d=Object.prototype,p=d.toString,u=d.hasOwnProperty,m=(Array.prototype.slice,String.fromCharCode);function g(t){return p.call(t).slice(8,-1).toLowerCase()}function f(t){return"number"==typeof t&&!isNaN(t)}function v(t){return void 0===t}function w(t){return"object"===(void 0===t?"undefined":e(t))&&null!==t}function b(t){if(!w(t))return!1;try{var e=t.constructor,a=e.prototype;return e&&a&&u.call(a,"isPrototypeOf")}catch(t){return!1}}function x(t){return"function"===g(t)}function y(t){return"string"==typeof t&&(t=t.trim?t.trim():t.replace(c,"$1")),t}function M(t,e){if(t&&x(e)){var a=void 0;if(o=t,(Array.isArray?Array.isArray(o):"array"===g(o))||f(t.length)){var i=t.length;for(a=0;a<i&&!1!==e.call(t,t[a],a,t);a++);}else w(t)&&Object.keys(t).forEach((function(a){e.call(t,t[a],a,t)}))}var o;return t}function C(t){for(var e=arguments.length,a=Array(e>1?e-1:0),i=1;i<e;i++)a[i-1]=arguments[i];if(w(t)&&a.length>0){if(Object.assign)return Object.assign.apply(Object,[t].concat(a));a.forEach((function(e){w(e)&&Object.keys(e).forEach((function(a){t[a]=e[a]}))}))}return t}function D(t,e){for(var a=arguments.length,i=Array(a>2?a-2:0),o=2;o<a;o++)i[o-2]=arguments[o];return function(){for(var a=arguments.length,o=Array(a),n=0;n<a;n++)o[n]=arguments[n];return t.apply(e,i.concat(o))}}function B(t,e){var a=t.style;M(e,(function(t,e){h.test(e)&&f(t)&&(t+="px"),a[e]=t}))}function k(t,e){if(e)if(f(t.length))M(t,(function(t){k(t,e)}));else if(t.classList)t.classList.add(e);else{var a=y(t.className);a?a.indexOf(e)<0&&(t.className=a+" "+e):t.className=e}}function T(t,e){e&&(f(t.length)?M(t,(function(t){T(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function L(t,e,a){e&&(f(t.length)?M(t,(function(t){L(t,e,a)})):a?k(t,e):T(t,e))}function W(t){return t.replace(o,"$1-$2").toLowerCase()}function E(t,e){return w(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-"+W(e))}function X(t,e,a){w(a)?t[e]=a:t.dataset?t.dataset[e]=a:t.setAttribute("data-"+W(e),a)}function Y(t,e){if(w(t[e]))delete t[e];else if(t.dataset)try{delete t.dataset[e]}catch(a){t.dataset[e]=null}else t.removeAttribute("data-"+W(e))}function H(t,e,a){var i=y(e).split(r);i.length>1?M(i,(function(e){H(t,e,a)})):t.removeEventListener?t.removeEventListener(e,a,!1):t.detachEvent&&t.detachEvent("on"+e,a)}function N(t,e,a,i){var o=y(e).split(r),n=a;o.length>1?M(o,(function(e){N(t,e,a)})):(i&&(a=function(){for(var i=arguments.length,o=Array(i),r=0;r<i;r++)o[r]=arguments[r];return H(t,e,a),n.apply(t,o)}),t.addEventListener?t.addEventListener(e,a,!1):t.attachEvent&&t.attachEvent("on"+e,a))}function O(t,e,a){if(t.dispatchEvent){var i=void 0;return x(Event)&&x(CustomEvent)?i=v(a)?new Event(e,{bubbles:!0,cancelable:!0}):new CustomEvent(e,{detail:a,bubbles:!0,cancelable:!0}):v(a)?(i=document.createEvent("Event")).initEvent(e,!0,!0):(i=document.createEvent("CustomEvent")).initCustomEvent(e,!0,!0,a),t.dispatchEvent(i)}return!t.fireEvent||t.fireEvent("on"+e)}function S(t){var e=t||window.event;if(e.target||(e.target=e.srcElement||document),!f(e.pageX)&&f(e.clientX)){var a=t.target.ownerDocument||document,i=a.documentElement,o=a.body;e.pageX=e.clientX+((i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0)),e.pageY=e.clientY+((i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0))}return e}function z(t){var e=document.documentElement,a=t.getBoundingClientRect();return{left:a.left+((window.scrollX||e&&e.scrollLeft||0)-(e&&e.clientLeft||0)),top:a.top+((window.scrollY||e&&e.scrollTop||0)-(e&&e.clientTop||0))}}function R(t,e){return t.getElementsByTagName(e)}function A(t,e){return t.getElementsByClassName?t.getElementsByClassName(e):t.querySelectorAll("."+e)}function I(t){return document.createElement(t)}function U(t,e){t.appendChild(e)}function j(t){t.parentNode&&t.parentNode.removeChild(t)}function P(t){var e=t.match(n);return e&&(e[1]!==location.protocol||e[2]!==location.hostname||e[3]!==location.port)}function q(t){var e="timestamp="+(new Date).getTime();return t+(-1===t.indexOf("?")?"?":"&")+e}function Q(t){var e=[],a=t.translateX,i=t.translateY,o=t.rotate,n=t.scaleX,r=t.scaleY;f(a)&&0!==a&&e.push("translateX("+a+"px)"),f(i)&&0!==i&&e.push("translateY("+i+"px)"),f(o)&&0!==o&&e.push("rotate("+o+"deg)"),f(n)&&1!==n&&e.push("scaleX("+n+")"),f(r)&&1!==r&&e.push("scaleY("+r+")");var h=e.length?e.join(" "):"none";return{WebkitTransform:h,msTransform:h,transform:h}}function $(t,e){var a=Math.abs(t.degree)%180,i=(a>90?180-a:a)*Math.PI/180,o=Math.sin(i),n=Math.cos(i),r=t.width,h=t.height,c=t.aspectRatio,s=void 0,l=void 0;return e?l=(s=r/(n+o/c))/c:(s=r*n+h*o,l=r*o+h*n),{width:s,height:l}}function Z(t,e,a){var i=I("canvas"),o=i.getContext("2d"),n=0,r=0,h=e.naturalWidth,c=e.naturalHeight,s=e.rotate,l=e.scaleX,d=e.scaleY,p=f(l)&&f(d)&&(1!==l||1!==d),u=f(s)&&0!==s,m=u||p,g=h*Math.abs(l||1),v=c*Math.abs(d||1),w=void 0,b=void 0,x=void 0;return p&&(w=g/2,b=v/2),u&&(w=(g=(x=$({width:g,height:v,degree:s})).width)/2,b=(v=x.height)/2),i.width=g,i.height=v,a.fillColor&&(o.fillStyle=a.fillColor,o.fillRect(0,0,g,v)),m&&(n=-h/2,r=-c/2,o.save(),o.translate(w,b)),u&&o.rotate(s*Math.PI/180),p&&o.scale(l,d),o.imageSmoothingEnabled=!!a.imageSmoothingEnabled,a.imageSmoothingQuality&&(o.imageSmoothingQuality=a.imageSmoothingQuality),o.drawImage(t,Math.floor(n),Math.floor(r),Math.floor(h),Math.floor(c)),m&&o.restore(),i}function K(t){var e=new DataView(t),a=e.byteLength,i=void 0,o=void 0,n=void 0,r=void 0,h=void 0,c=void 0,s=void 0,d=void 0,p=void 0;if(255===e.getUint8(0)&&216===e.getUint8(1))for(d=2;d<a;){if(255===e.getUint8(d)&&225===e.getUint8(d+1)){c=d;break}d++}if(c&&(o=c+10,"Exif"===function(t,e,a){var i="",o=e;for(a+=e;o<a;o++)i+=m(t.getUint8(o));return i}(e,c+4,4)&&((r=18761===(h=e.getUint16(o)))||19789===h)&&42===e.getUint16(o+2,r)&&(n=e.getUint32(o+4,r))>=8&&(s=o+n)),s)for(a=e.getUint16(s,r),p=0;p<a;p++)if(d=s+12*p+2,274===e.getUint16(d,r)){d+=8,i=e.getUint16(d,r),l&&e.setUint16(d,1,r);break}return i}var V={render:function(){var t=this;t.initContainer(),t.initCanvas(),t.initCropBox(),t.renderCanvas(),t.cropped&&t.renderCropBox()},initContainer:function(){var t,e=this,a=e.options,i=e.element,o=e.container,n=e.cropper,r="cropper-hidden";k(n,r),T(i,r),e.containerData=t={width:Math.max(o.offsetWidth,Number(a.minContainerWidth)||200),height:Math.max(o.offsetHeight,Number(a.minContainerHeight)||100)},B(n,{width:t.width,height:t.height}),k(i,r),T(n,r)},initCanvas:function(){var t=this,e=t.options.viewMode,a=t.containerData,i=t.imageData,o=Math.abs(i.rotate)%180==90,n=o?i.naturalHeight:i.naturalWidth,r=o?i.naturalWidth:i.naturalHeight,h=n/r,c=a.width,s=a.height;a.height*h>a.width?3===e?c=a.height*h:s=a.width/h:3===e?s=a.width/h:c=a.height*h;var l={naturalWidth:n,naturalHeight:r,aspectRatio:h,width:c,height:s};l.oldLeft=l.left=(a.width-c)/2,l.oldTop=l.top=(a.height-s)/2,t.canvasData=l,t.limited=1===e||2===e,t.limitCanvas(!0,!0),t.initialImageData=C({},i),t.initialCanvasData=C({},l)},limitCanvas:function(t,e){var a=this,i=a.options,o=i.viewMode,n=a.containerData,r=a.canvasData,h=r.aspectRatio,c=a.cropBoxData,s=a.cropped&&c;if(t){var l=Number(i.minCanvasWidth)||0,d=Number(i.minCanvasHeight)||0;o>1?(l=Math.max(l,n.width),d=Math.max(d,n.height),3===o&&(d*h>l?l=d*h:d=l/h)):o>0&&(l?l=Math.max(l,s?c.width:0):d?d=Math.max(d,s?c.height:0):s&&(l=c.width,(d=c.height)*h>l?l=d*h:d=l/h)),l&&d?d*h>l?d=l/h:l=d*h:l?d=l/h:d&&(l=d*h),r.minWidth=l,r.minHeight=d,r.maxWidth=1/0,r.maxHeight=1/0}if(e)if(o){var p=n.width-r.width,u=n.height-r.height;r.minLeft=Math.min(0,p),r.minTop=Math.min(0,u),r.maxLeft=Math.max(0,p),r.maxTop=Math.max(0,u),s&&a.limited&&(r.minLeft=Math.min(c.left,c.left+(c.width-r.width)),r.minTop=Math.min(c.top,c.top+(c.height-r.height)),r.maxLeft=c.left,r.maxTop=c.top,2===o&&(r.width>=n.width&&(r.minLeft=Math.min(0,p),r.maxLeft=Math.max(0,p)),r.height>=n.height&&(r.minTop=Math.min(0,u),r.maxTop=Math.max(0,u))))}else r.minLeft=-r.width,r.minTop=-r.height,r.maxLeft=n.width,r.maxTop=n.height},renderCanvas:function(t){var e=this,a=e.canvasData,i=e.imageData,o=i.rotate;if(e.rotated){e.rotated=!1;var n=$({width:i.width,height:i.height,degree:o}),r=n.width/n.height,h=1===i.aspectRatio;if(h||r!==a.aspectRatio){if(a.left-=(n.width-a.width)/2,a.top-=(n.height-a.height)/2,a.width=n.width,a.height=n.height,a.aspectRatio=r,a.naturalWidth=i.naturalWidth,a.naturalHeight=i.naturalHeight,h&&o%90||o%180){var c=$({width:i.naturalWidth,height:i.naturalHeight,degree:o});a.naturalWidth=c.width,a.naturalHeight=c.height}e.limitCanvas(!0,!1)}}(a.width>a.maxWidth||a.width<a.minWidth)&&(a.left=a.oldLeft),(a.height>a.maxHeight||a.height<a.minHeight)&&(a.top=a.oldTop),a.width=Math.min(Math.max(a.width,a.minWidth),a.maxWidth),a.height=Math.min(Math.max(a.height,a.minHeight),a.maxHeight),e.limitCanvas(!1,!0),a.oldLeft=a.left=Math.min(Math.max(a.left,a.minLeft),a.maxLeft),a.oldTop=a.top=Math.min(Math.max(a.top,a.minTop),a.maxTop),B(e.canvas,C({width:a.width,height:a.height},Q({translateX:a.left,translateY:a.top}))),e.renderImage(),e.cropped&&e.limited&&e.limitCropBox(!0,!0),t&&e.output()},renderImage:function(t){var e=this,a=e.canvasData,i=e.imageData,o=void 0,n=void 0,r=void 0,h=void 0;i.rotate&&(o={width:r=(n=$({width:a.width,height:a.height,degree:i.rotate,aspectRatio:i.aspectRatio},!0)).width,height:h=n.height,left:(a.width-r)/2,top:(a.height-h)/2}),C(i,o||{width:a.width,height:a.height,left:0,top:0}),B(e.image,C({width:i.width,height:i.height},Q(C({translateX:i.left,translateY:i.top},i)))),t&&e.output()},initCropBox:function(){var t=this,e=t.options,a=e.aspectRatio,i=Number(e.autoCropArea)||.8,o=t.canvasData,n={width:o.width,height:o.height};a&&(o.height*a>o.width?n.height=n.width/a:n.width=n.height*a),t.cropBoxData=n,t.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*i),n.height=Math.max(n.minHeight,n.height*i),n.oldLeft=n.left=o.left+(o.width-n.width)/2,n.oldTop=n.top=o.top+(o.height-n.height)/2,t.initialCropBoxData=C({},n)},limitCropBox:function(t,e){var a=this,i=a.options,o=i.aspectRatio,n=a.containerData,r=a.canvasData,h=a.cropBoxData,c=a.limited;if(t){var s=Number(i.minCropBoxWidth)||0,l=Number(i.minCropBoxHeight)||0,d=Math.min(n.width,c?r.width:n.width),p=Math.min(n.height,c?r.height:n.height);s=Math.min(s,n.width),l=Math.min(l,n.height),o&&(s&&l?l*o>s?l=s/o:s=l*o:s?l=s/o:l&&(s=l*o),p*o>d?p=d/o:d=p*o),h.minWidth=Math.min(s,d),h.minHeight=Math.min(l,p),h.maxWidth=d,h.maxHeight=p}e&&(c?(h.minLeft=Math.max(0,r.left),h.minTop=Math.max(0,r.top),h.maxLeft=Math.min(n.width,r.left+r.width)-h.width,h.maxTop=Math.min(n.height,r.top+r.height)-h.height):(h.minLeft=0,h.minTop=0,h.maxLeft=n.width-h.width,h.maxTop=n.height-h.height))},renderCropBox:function(){var t=this,e=t.options,a=t.containerData,i=t.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),t.limitCropBox(!1,!0),i.oldLeft=i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.oldTop=i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),e.movable&&e.cropBoxMovable&&X(t.face,"action",i.width===a.width&&i.height===a.height?"move":"all"),B(t.cropBox,C({width:i.width,height:i.height},Q({translateX:i.left,translateY:i.top}))),t.cropped&&t.limited&&t.limitCanvas(!0,!0),t.disabled||t.output()},output:function(){var t=this;t.preview(),t.complete&&O(t.element,"crop",t.getData())}},F="preview",G={initPreview:function(){var t=this,e=t.options.preview,a=I("img"),i=t.crossOrigin,o=i?t.crossOriginUrl:t.url;if(i&&(a.crossOrigin=i),a.src=o,U(t.viewBox,a),t.image2=a,e){var n=e.querySelector?[e]:document.querySelectorAll(e);t.previews=n,M(n,(function(t){var e=I("img");X(t,F,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),i&&(e.crossOrigin=i),e.src=o,e.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;"',function(t){for(;t.firstChild;)t.removeChild(t.firstChild)}(t),U(t,e)}))}},resetPreview:function(){M(this.previews,(function(t){var e=E(t,F);B(t,{width:e.width,height:e.height}),t.innerHTML=e.html,Y(t,F)}))},preview:function(){var t=this,e=t.imageData,a=t.canvasData,i=t.cropBoxData,o=i.width,n=i.height,r=e.width,h=e.height,c=i.left-a.left-e.left,s=i.top-a.top-e.top;t.cropped&&!t.disabled&&(B(t.image2,C({width:r,height:h},Q(C({translateX:-c,translateY:-s},e)))),M(t.previews,(function(t){var a=E(t,F),i=a.width,l=a.height,d=i,p=l,u=1;o&&(p=n*(u=i/o)),n&&p>l&&(d=o*(u=l/n),p=l),B(t,{width:d,height:p}),B(R(t,"img")[0],C({width:r*u,height:h*u},Q(C({translateX:-c*u,translateY:-s*u},e))))})))}},J="undefined"!=typeof window?window.PointerEvent:null,_=J?"pointerdown":"touchstart mousedown",tt=J?"pointermove":"touchmove mousemove",et=J?" pointerup pointercancel":"touchend touchcancel mouseup",at="wheel mousewheel DOMMouseScroll",it="dblclick",ot="resize",nt="cropstart",rt="cropmove",ht="cropend",ct="crop",st="zoom",lt={bind:function(){var t=this,e=t.options,a=t.element,i=t.cropper;x(e.cropstart)&&N(a,nt,e.cropstart),x(e.cropmove)&&N(a,rt,e.cropmove),x(e.cropend)&&N(a,ht,e.cropend),x(e.crop)&&N(a,ct,e.crop),x(e.zoom)&&N(a,st,e.zoom),N(i,_,t.onCropStart=D(t.cropStart,t)),e.zoomable&&e.zoomOnWheel&&N(i,at,t.onWheel=D(t.wheel,t)),e.toggleDragModeOnDblclick&&N(i,it,t.onDblclick=D(t.dblclick,t)),N(document,tt,t.onCropMove=D(t.cropMove,t)),N(document,et,t.onCropEnd=D(t.cropEnd,t)),e.responsive&&N(window,ot,t.onResize=D(t.resize,t))},unbind:function(){var t=this,e=t.options,a=t.element,i=t.cropper;x(e.cropstart)&&H(a,nt,e.cropstart),x(e.cropmove)&&H(a,rt,e.cropmove),x(e.cropend)&&H(a,ht,e.cropend),x(e.crop)&&H(a,ct,e.crop),x(e.zoom)&&H(a,st,e.zoom),H(i,_,t.onCropStart),e.zoomable&&e.zoomOnWheel&&H(i,at,t.onWheel),e.toggleDragModeOnDblclick&&H(i,it,t.onDblclick),H(document,tt,t.onCropMove),H(document,et,t.onCropEnd),e.responsive&&H(window,ot,t.onResize)}},dt=/^(e|w|s|n|se|sw|ne|nw|all|crop|move|zoom)$/;function pt(t,e){var a=t.pageX,i=t.pageY,o={endX:a,endY:i};return e?o:C({startX:a,startY:i},o)}var ut={resize:function(){var t=this,e=t.options,a=t.container,i=t.containerData,o=Number(e.minContainerWidth)||200,n=Number(e.minContainerHeight)||100;if(!t.disabled&&i.width!==o&&i.height!==n){var r,h,c=a.offsetWidth/i.width;1===c&&a.offsetHeight===i.height||(r=void 0,h=void 0,e.restore&&(r=t.getCanvasData(),h=t.getCropBoxData()),t.render(),e.restore&&(t.setCanvasData(M(r,(function(t,e){r[e]=t*c}))),t.setCropBoxData(M(h,(function(t,e){h[e]=t*c})))))}},dblclick:function(){var t,e,a=this;a.disabled||"none"===a.options.dragMode||a.setDragMode((t=a.dragBox,e="cropper-crop",(t.classList?t.classList.contains(e):t.className.indexOf(e)>-1)?"move":"crop"))},wheel:function(t){var e=this,a=S(t),i=Number(e.options.wheelZoomRatio)||.1,o=1;e.disabled||(a.preventDefault(),e.wheeling||(e.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),a.deltaY?o=a.deltaY>0?1:-1:a.wheelDelta?o=-a.wheelDelta/120:a.detail&&(o=a.detail>0?1:-1),e.zoom(-o*i,a)))},cropStart:function(t){var e=this;if(!e.disabled){var a=e.options,i=e.pointers,o=S(t),n=void 0;o.changedTouches?M(o.changedTouches,(function(t){i[t.identifier]=pt(t)})):i[o.pointerId||0]=pt(o),n=Object.keys(i).length>1&&a.zoomable&&a.zoomOnTouch?"zoom":E(o.target,"action"),dt.test(n)&&!1!==O(e.element,"cropstart",{originalEvent:o,action:n})&&(o.preventDefault(),e.action=n,e.cropping=!1,"crop"===n&&(e.cropping=!0,k(e.dragBox,"cropper-modal")))}},cropMove:function(t){var e=this,a=e.action;if(!e.disabled&&a){var i=e.pointers,o=S(t);o.preventDefault(),!1!==O(e.element,"cropmove",{originalEvent:o,action:a})&&(o.changedTouches?M(o.changedTouches,(function(t){C(i[t.identifier],pt(t,!0))})):C(i[o.pointerId||0],pt(o,!0)),e.change(o))}},cropEnd:function(t){var e=this;if(!e.disabled){var a=e.action,i=e.pointers,o=S(t);o.changedTouches?M(o.changedTouches,(function(t){delete i[t.identifier]})):delete i[o.pointerId||0],a&&(o.preventDefault(),Object.keys(i).length||(e.action=""),e.cropping&&(e.cropping=!1,L(e.dragBox,"cropper-modal",e.cropped&&this.options.modal)),O(e.element,"cropend",{originalEvent:o,action:a}))}}},mt="se",gt="sw",ft="ne",vt="nw",wt={change:function(t){var e=this,a=e.options,i=e.containerData,o=e.canvasData,n=e.cropBoxData,r=a.aspectRatio,h=e.action,c=n.width,s=n.height,l=n.left,d=n.top,p=l+c,u=d+s,m=0,g=0,f=i.width,v=i.height,w=!0,b=void 0;!r&&t.shiftKey&&(r=c&&s?c/s:1),e.limited&&(m=n.minLeft,g=n.minTop,f=m+Math.min(i.width,o.width,o.left+o.width),v=g+Math.min(i.height,o.height,o.top+o.height));var x=e.pointers,y=x[Object.keys(x)[0]],D={x:y.endX-y.startX,y:y.endY-y.startY};switch(r&&(D.X=D.y*r,D.Y=D.x/r),h){case"all":l+=D.x,d+=D.y;break;case"e":if(D.x>=0&&(p>=f||r&&(d<=g||u>=v))){w=!1;break}c+=D.x,r&&(s=c/r,d-=D.Y/2),c<0&&(h="w",c=0);break;case"n":if(D.y<=0&&(d<=g||r&&(l<=m||p>=f))){w=!1;break}s-=D.y,d+=D.y,r&&(c=s*r,l+=D.X/2),s<0&&(h="s",s=0);break;case"w":if(D.x<=0&&(l<=m||r&&(d<=g||u>=v))){w=!1;break}c-=D.x,l+=D.x,r&&(s=c/r,d+=D.Y/2),c<0&&(h="e",c=0);break;case"s":if(D.y>=0&&(u>=v||r&&(l<=m||p>=f))){w=!1;break}s+=D.y,r&&(c=s*r,l-=D.X/2),s<0&&(h="n",s=0);break;case ft:if(r){if(D.y<=0&&(d<=g||p>=f)){w=!1;break}s-=D.y,d+=D.y,c=s*r}else D.x>=0?p<f?c+=D.x:D.y<=0&&d<=g&&(w=!1):c+=D.x,D.y<=0?d>g&&(s-=D.y,d+=D.y):(s-=D.y,d+=D.y);c<0&&s<0?(h=gt,s=0,c=0):c<0?(h=vt,c=0):s<0&&(h=mt,s=0);break;case vt:if(r){if(D.y<=0&&(d<=g||l<=m)){w=!1;break}s-=D.y,d+=D.y,c=s*r,l+=D.X}else D.x<=0?l>m?(c-=D.x,l+=D.x):D.y<=0&&d<=g&&(w=!1):(c-=D.x,l+=D.x),D.y<=0?d>g&&(s-=D.y,d+=D.y):(s-=D.y,d+=D.y);c<0&&s<0?(h=mt,s=0,c=0):c<0?(h=ft,c=0):s<0&&(h=gt,s=0);break;case gt:if(r){if(D.x<=0&&(l<=m||u>=v)){w=!1;break}c-=D.x,l+=D.x,s=c/r}else D.x<=0?l>m?(c-=D.x,l+=D.x):D.y>=0&&u>=v&&(w=!1):(c-=D.x,l+=D.x),D.y>=0?u<v&&(s+=D.y):s+=D.y;c<0&&s<0?(h=ft,s=0,c=0):c<0?(h=mt,c=0):s<0&&(h=vt,s=0);break;case mt:if(r){if(D.x>=0&&(p>=f||u>=v)){w=!1;break}s=(c+=D.x)/r}else D.x>=0?p<f?c+=D.x:D.y>=0&&u>=v&&(w=!1):c+=D.x,D.y>=0?u<v&&(s+=D.y):s+=D.y;c<0&&s<0?(h=vt,s=0,c=0):c<0?(h=gt,c=0):s<0&&(h=ft,s=0);break;case"move":e.move(D.x,D.y),w=!1;break;case"zoom":e.zoom(function(t){var e=C({},t),a=[];return M(t,(function(t,i){delete e[i],M(e,(function(e){var i=Math.abs(t.startX-e.startX),o=Math.abs(t.startY-e.startY),n=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),h=Math.sqrt(i*i+o*o),c=(Math.sqrt(n*n+r*r)-h)/h;a.push(c)}))})),a.sort((function(t,e){return Math.abs(t)<Math.abs(e)})),a[0]}(x),t),w=!1;break;case"crop":if(!D.x||!D.y){w=!1;break}b=z(e.cropper),l=y.startX-b.left,d=y.startY-b.top,c=n.minWidth,s=n.minHeight,D.x>0?h=D.y>0?mt:ft:D.x<0&&(l-=c,h=D.y>0?gt:vt),D.y<0&&(d-=s),e.cropped||(T(e.cropBox,"cropper-hidden"),e.cropped=!0,e.limited&&e.limitCropBox(!0,!0))}w&&(n.width=c,n.height=s,n.left=l,n.top=d,e.action=h,e.renderCropBox()),M(x,(function(t){t.startX=t.endX,t.startY=t.endY}))}},bt={crop:function(){var t=this;return t.ready&&!t.disabled&&(t.cropped||(t.cropped=!0,t.limitCropBox(!0,!0),t.options.modal&&k(t.dragBox,"cropper-modal"),T(t.cropBox,"cropper-hidden")),t.setCropBoxData(t.initialCropBoxData)),t},reset:function(){var t=this;return t.ready&&!t.disabled&&(t.imageData=C({},t.initialImageData),t.canvasData=C({},t.initialCanvasData),t.cropBoxData=C({},t.initialCropBoxData),t.renderCanvas(),t.cropped&&t.renderCropBox()),t},clear:function(){var t=this;return t.cropped&&!t.disabled&&(C(t.cropBoxData,{left:0,top:0,width:0,height:0}),t.cropped=!1,t.renderCropBox(),t.limitCanvas(),t.renderCanvas(),T(t.dragBox,"cropper-modal"),k(t.cropBox,"cropper-hidden")),t},replace:function(t,e){var a=this;return!a.disabled&&t&&(a.isImg&&(a.element.src=t),e?(a.url=t,a.image.src=t,a.ready&&(a.image2.src=t,M(a.previews,(function(e){R(e,"img")[0].src=t})))):(a.isImg&&(a.replaced=!0),a.options.data=null,a.load(t))),a},enable:function(){var t=this;return t.ready&&(t.disabled=!1,T(t.cropper,"cropper-disabled")),t},disable:function(){var t=this;return t.ready&&(t.disabled=!0,k(t.cropper,"cropper-disabled")),t},destroy:function(){var t=this,e=t.element,a=t.image;return t.loaded?(t.isImg&&t.replaced&&(e.src=t.originalUrl),t.unbuild(),T(e,"cropper-hidden")):t.isImg?H(e,"load",t.onStart):a&&j(a),Y(e,"cropper"),t},move:function(t,e){var a=this.canvasData;return this.moveTo(v(t)?t:a.left+Number(t),v(e)?e:a.top+Number(e))},moveTo:function(t,e){var a=this,i=a.canvasData,o=!1;return v(e)&&(e=t),t=Number(t),e=Number(e),a.ready&&!a.disabled&&a.options.movable&&(f(t)&&(i.left=t,o=!0),f(e)&&(i.top=e,o=!0),o&&a.renderCanvas(!0)),a},zoom:function(t,e){var a=this.canvasData;return t=(t=Number(t))<0?1/(1-t):1+t,this.zoomTo(a.width*t/a.naturalWidth,e)},zoomTo:function(t,e){var a=this,i=a.options,o=a.canvasData,n=o.width,r=o.height,h=o.naturalWidth,c=o.naturalHeight;if((t=Number(t))>=0&&a.ready&&!a.disabled&&i.zoomable){var s=h*t,l=c*t;if(!1===O(a.element,"zoom",{originalEvent:e,oldRatio:n/h,ratio:s/h}))return a;if(e){var d=a.pointers,p=z(a.cropper),u=d&&Object.keys(d).length?function(t){var e=0,a=0,i=0;return M(t,(function(t){var o=t.startX,n=t.startY;e+=o,a+=n,i+=1})),{pageX:e/=i,pageY:a/=i}}(d):{pageX:e.pageX,pageY:e.pageY};o.left-=(s-n)*((u.pageX-p.left-o.left)/n),o.top-=(l-r)*((u.pageY-p.top-o.top)/r)}else o.left-=(s-n)/2,o.top-=(l-r)/2;o.width=s,o.height=l,a.renderCanvas(!0)}return a},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){var e=this;return f(t=Number(t))&&e.ready&&!e.disabled&&e.options.rotatable&&(e.imageData.rotate=t%360,e.rotated=!0,e.renderCanvas(!0)),e},scale:function(t,e){var a=this,i=a.imageData,o=!1;return v(e)&&(e=t),t=Number(t),e=Number(e),a.ready&&!a.disabled&&a.options.scalable&&(f(t)&&(i.scaleX=t,o=!0),f(e)&&(i.scaleY=e,o=!0),o&&a.renderImage(!0)),a},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,f(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(f(e)?e:1,t)},getData:function(t){var e=this,a=e.options,i=e.imageData,o=e.canvasData,n=e.cropBoxData,r=void 0,h=void 0;return e.ready&&e.cropped?(h={x:n.left-o.left,y:n.top-o.top,width:n.width,height:n.height},r=i.width/i.naturalWidth,M(h,(function(e,a){e/=r,h[a]=t?Math.round(e):e}))):h={x:0,y:0,width:0,height:0},a.rotatable&&(h.rotate=i.rotate||0),a.scalable&&(h.scaleX=i.scaleX||1,h.scaleY=i.scaleY||1),h},setData:function(t){var e=this,a=e.options,i=e.imageData,o=e.canvasData,n={},r=void 0,h=void 0,c=void 0;return x(t)&&(t=t.call(e.element)),e.ready&&!e.disabled&&b(t)&&(a.rotatable&&f(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,e.rotated=r=!0),a.scalable&&(f(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,h=!0),f(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,h=!0)),r?e.renderCanvas():h&&e.renderImage(),c=i.width/i.naturalWidth,f(t.x)&&(n.left=t.x*c+o.left),f(t.y)&&(n.top=t.y*c+o.top),f(t.width)&&(n.width=t.width*c),f(t.height)&&(n.height=t.height*c),e.setCropBoxData(n)),e},getContainerData:function(){return this.ready?this.containerData:{}},getImageData:function(){return this.loaded?this.imageData:{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&M(["left","top","width","height","naturalWidth","naturalHeight"],(function(a){e[a]=t[a]})),e},setCanvasData:function(t){var e=this,a=e.canvasData,i=a.aspectRatio;return x(t)&&(t=t.call(e.element)),e.ready&&!e.disabled&&b(t)&&(f(t.left)&&(a.left=t.left),f(t.top)&&(a.top=t.top),f(t.width)?(a.width=t.width,a.height=t.width/i):f(t.height)&&(a.height=t.height,a.width=t.height*i),e.renderCanvas(!0)),e},getCropBoxData:function(){var t=this,e=t.cropBoxData,a=void 0;return t.ready&&t.cropped&&(a={left:e.left,top:e.top,width:e.width,height:e.height}),a||{}},setCropBoxData:function(t){var e=this,a=e.cropBoxData,i=e.options.aspectRatio,o=void 0,n=void 0;return x(t)&&(t=t.call(e.element)),e.ready&&e.cropped&&!e.disabled&&b(t)&&(f(t.left)&&(a.left=t.left),f(t.top)&&(a.top=t.top),f(t.width)&&t.width!==a.width&&(o=!0,a.width=t.width),f(t.height)&&t.height!==a.height&&(n=!0,a.height=t.height),i&&(o?a.height=a.width/i:n&&(a.width=a.height*i)),e.renderCropBox()),e},getCroppedCanvas:function(t){var e=this;if(!e.ready||!window.HTMLCanvasElement)return null;if(b(t)||(t={}),!e.cropped)return Z(e.image,e.imageData,t);var a=e.getData(),i=a.width,o=a.height,n=i/o,r=void 0,h=void 0,c=void 0;b(t)&&(r=t.width,h=t.height,r?(h=r/n,c=r/i):h&&(r=h*n,c=h/o));var s=Math.floor(r||i),l=Math.floor(h||o),d=I("canvas"),p=d.getContext("2d");d.width=s,d.height=l,t.fillColor&&(p.fillStyle=t.fillColor,p.fillRect(0,0,s,l));var u,m,g,f,v,w,x,y,M,C,D,B,k,T=(u=Z(e.image,e.imageData,t),m=u.width,g=u.height,f=e.canvasData,v=[u],w=a.x+f.naturalWidth*(Math.abs(a.scaleX||1)-1)/2,x=a.y+f.naturalHeight*(Math.abs(a.scaleY||1)-1)/2,y=void 0,M=void 0,C=void 0,D=void 0,B=void 0,k=void 0,w<=-i||w>m?w=y=C=B=0:w<=0?(C=-w,w=0,y=B=Math.min(m,i+w)):w<=m&&(C=0,y=B=Math.min(i,m-w)),y<=0||x<=-o||x>g?x=M=D=k=0:x<=0?(D=-x,x=0,M=k=Math.min(g,o+x)):x<=g&&(D=0,M=k=Math.min(o,g-x)),v.push(Math.floor(w),Math.floor(x),Math.floor(y),Math.floor(M)),c&&(C*=c,D*=c,B*=c,k*=c),B>0&&k>0&&v.push(Math.floor(C),Math.floor(D),Math.floor(B),Math.floor(k)),v);return p.imageSmoothingEnabled=!!t.imageSmoothingEnabled,t.imageSmoothingQuality&&(p.imageSmoothingQuality=t.imageSmoothingQuality),p.drawImage.apply(p,function(t){if(Array.isArray(t)){for(var e=0,a=Array(t.length);e<t.length;e++)a[e]=t[e];return a}return Array.from(t)}(T)),d},setAspectRatio:function(t){var e=this,a=e.options;return e.disabled||v(t)||(a.aspectRatio=Math.max(0,t)||NaN,e.ready&&(e.initCropBox(),e.cropped&&e.renderCropBox())),e},setDragMode:function(t){var e=this,a=e.options,i=e.dragBox,o=e.face,n=void 0,r=void 0;return e.loaded&&!e.disabled&&(n="crop"===t,r=a.movable&&"move"===t,X(i,"action",t=n||r?t:"none"),L(i,"cropper-crop",n),L(i,"cropper-move",r),a.cropBoxMovable||(X(o,"action",t),L(o,"cropper-crop",n),L(o,"cropper-move",r))),e}},xt="cropper",yt="cropper-hidden",Mt="error",Ct="load",Dt="ready",Bt=/^data:/,kt=/^data:image\/jpeg;base64,/,Tt=void 0,Lt=function(){function e(a,i){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var o=this;o.element=a,o.options=C({},t,b(i)&&i),o.loaded=!1,o.ready=!1,o.complete=!1,o.rotated=!1,o.cropped=!1,o.disabled=!1,o.replaced=!1,o.limited=!1,o.wheeling=!1,o.isImg=!1,o.originalUrl="",o.canvasData=null,o.cropBoxData=null,o.previews=null,o.pointers={},o.init()}return a(e,[{key:"init",value:function(){var t=this,e=t.element,a=e.tagName.toLowerCase(),i=void 0;if(!E(e,xt)){if(X(e,xt,t),"img"===a){if(t.isImg=!0,t.originalUrl=i=e.getAttribute("src"),!i)return;i=e.src}else"canvas"===a&&window.HTMLCanvasElement&&(i=e.toDataURL());t.load(i)}}},{key:"load",value:function(t){var e=this,a=e.options,o=e.element;if(t)if(e.url=t,e.imageData={},a.checkOrientation&&window.ArrayBuffer)if(Bt.test(t))kt.test(t)?e.read(function(t){var e=t.replace(i,""),a=atob(e),o=a.length,n=new ArrayBuffer(o),r=new Uint8Array(n),h=void 0;for(h=0;h<o;h++)r[h]=a.charCodeAt(h);return n}(t)):e.clone();else{var n=new XMLHttpRequest;n.onerror=n.onabort=function(){e.clone()},n.onload=function(){e.read(n.response)},a.checkCrossOrigin&&P(t)&&o.crossOrigin&&(t=q(t)),n.open("get",t),n.responseType="arraybuffer",n.withCredentials="use-credentials"===o.crossOrigin,n.send()}else e.clone()}},{key:"read",value:function(t){var e=this,a=e.options,i=K(t),o=e.imageData,n=0,r=1,h=1;if(i>1)switch(e.url=function(t){var e=new Uint8Array(t),a=e.length,i="",o=void 0;for(o=0;o<a;o++)i+=m(e[o]);return"data:image/jpeg;base64,"+btoa(i)}(t),i){case 2:r=-1;break;case 3:n=-180;break;case 4:h=-1;break;case 5:n=90,h=-1;break;case 6:n=90;break;case 7:n=90,r=-1;break;case 8:n=-90}a.rotatable&&(o.rotate=n),a.scalable&&(o.scaleX=r,o.scaleY=h),e.clone()}},{key:"clone",value:function(){var t,e,a=this,i=a.element,o=a.url,n=void 0,r=void 0;a.options.checkCrossOrigin&&P(o)&&((n=i.crossOrigin)?r=o:(n="anonymous",r=q(o))),a.crossOrigin=n,a.crossOriginUrl=r;var h=I("img");n&&(h.crossOrigin=n),h.src=r||o,a.image=h,a.onStart=t=D(a.start,a),a.onStop=e=D(a.stop,a),a.isImg?i.complete?a.start():N(i,Ct,t):(N(h,Ct,t),N(h,Mt,e),k(h,"cropper-hide"),i.parentNode.insertBefore(h,i.nextSibling))}},{key:"start",value:function(t){var e=this,a=e.isImg?e.element:e.image;t&&(H(a,Ct,e.onStart),H(a,Mt,e.onStop)),function(t,e){if(!t.naturalWidth||l){var a=I("img");a.onload=function(){e(this.width,this.height)},a.src=t.src}else e(t.naturalWidth,t.naturalHeight)}(a,(function(t,a){C(e.imageData,{naturalWidth:t,naturalHeight:a,aspectRatio:t/a}),e.loaded=!0,e.build()}))}},{key:"stop",value:function(){var t=this,e=t.image;H(e,Ct,t.onStart),H(e,Mt,t.onStop),j(e),t.image=null}},{key:"build",value:function(){var t,e,a,i,o,n=this,r=n.options,h=n.element,c=n.image,s=void 0;if(n.loaded){n.ready&&n.unbuild();var l=I("div");l.innerHTML='<div class="cropper-container"><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-action="e"></span><span class="cropper-line line-n" data-action="n"></span><span class="cropper-line line-w" data-action="w"></span><span class="cropper-line line-s" data-action="s"></span><span class="cropper-point point-e" data-action="e"></span><span class="cropper-point point-n" data-action="n"></span><span class="cropper-point point-w" data-action="w"></span><span class="cropper-point point-s" data-action="s"></span><span class="cropper-point point-ne" data-action="ne"></span><span class="cropper-point point-nw" data-action="nw"></span><span class="cropper-point point-sw" data-action="sw"></span><span class="cropper-point point-se" data-action="se"></span></div></div>',n.container=s=h.parentNode,n.cropper=t=A(l,"cropper-container")[0],n.canvas=e=A(t,"cropper-canvas")[0],n.dragBox=a=A(t,"cropper-drag-box")[0],n.cropBox=i=A(t,"cropper-crop-box")[0],n.viewBox=A(t,"cropper-view-box")[0],n.face=o=A(i,"cropper-face")[0],U(e,c),k(h,yt),s.insertBefore(t,h.nextSibling),n.isImg||T(c,"cropper-hide"),n.initPreview(),n.bind(),r.aspectRatio=Math.max(0,r.aspectRatio)||NaN,r.viewMode=Math.max(0,Math.min(3,Math.round(r.viewMode)))||0,n.cropped=r.autoCrop,r.autoCrop?r.modal&&k(a,"cropper-modal"):k(i,yt),r.guides||k(A(i,"cropper-dashed"),yt),r.center||k(A(i,"cropper-center"),yt),r.background&&k(t,"cropper-bg"),r.highlight||k(o,"cropper-invisible"),r.cropBoxMovable&&(k(o,"cropper-move"),X(o,"action","all")),r.cropBoxResizable||(k(A(i,"cropper-line"),yt),k(A(i,"cropper-point"),yt)),n.setDragMode(r.dragMode),n.render(),n.ready=!0,n.setData(r.data),n.completing=setTimeout((function(){x(r.ready)&&N(h,Dt,r.ready,!0),O(h,Dt),O(h,"crop",n.getData()),n.complete=!0}),0)}}},{key:"unbuild",value:function(){var t=this;t.ready&&(t.complete||clearTimeout(t.completing),t.ready=!1,t.complete=!1,t.initialImageData=null,t.initialCanvasData=null,t.initialCropBoxData=null,t.containerData=null,t.canvasData=null,t.cropBoxData=null,t.unbind(),t.resetPreview(),t.previews=null,t.viewBox=null,t.cropBox=null,t.dragBox=null,t.canvas=null,t.container=null,j(t.cropper),t.cropper=null)}}],[{key:"noConflict",value:function(){return window.Cropper=Tt,e}},{key:"setDefaults",value:function(e){C(t,b(e)&&e)}}]),e}();return C(Lt.prototype,V),C(Lt.prototype,G),C(Lt.prototype,lt),C(Lt.prototype,ut),C(Lt.prototype,wt),C(Lt.prototype,bt),"undefined"!=typeof window&&(Tt=window.Cropper,window.Cropper=Lt),Lt},"object"==typeof e&&void 0!==a?a.exports=n():"function"==typeof i&&i.amd?i(n):o.Cropper=n()}));
;/*!node_modules/react-cropper/dist/react-cropper.js*/
amis.define("8b115c8",(function(e,t,o,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var o=arguments[t];for(var r in o)Object.prototype.hasOwnProperty.call(o,r)&&(e[r]=o[r])}return e},n=function(){function e(e,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(t,o,r){return o&&e(t.prototype,o),r&&e(t,r),t}}(),u=e("7edccec"),i=c(u),l=c(e("adc82d6")),s=c(e("54728a0"));function c(e){return e&&e.__esModule?e:{default:e}}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function f(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}var d=["dragMode","aspectRatio","data","crop","viewMode","preview","responsive","restore","checkCrossOrigin","checkOrientation","modal","guides","center","highlight","background","autoCrop","autoCropArea","movable","rotatable","scalable","zoomable","zoomOnTouch","zoomOnWheel","wheelZoomRation","cropBoxMovable","cropBoxResizable","toggleDragModeOnDblclick","minContainerWidth","minContainerHeight","minCanvasWidth","minCanvasHeight","minCropBoxWidth","minCropBoxHeight","ready","cropstart","cropmove","cropend","zoom"],h=d.slice(4),m=function(e){function t(){return p(this,t),f(this,(t.__proto__||Object.getPrototypeOf(t)).apply(this,arguments))}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),n(t,[{key:"componentDidMount",value:function(){var e=this,t=Object.keys(this.props).filter((function(e){return-1!==d.indexOf(e)})).reduce((function(t,o){return a({},t,(r={},n=o,u=e.props[o],n in r?Object.defineProperty(r,n,{value:u,enumerable:!0,configurable:!0,writable:!0}):r[n]=u,r));var r,n,u}),{});this.cropper=new s.default(this.img,t)}},{key:"componentWillReceiveProps",value:function(e){var t=this;e.src!==this.props.src&&this.cropper.reset().clear().replace(e.src),e.aspectRatio!==this.props.aspectRatio&&this.setAspectRatio(e.aspectRatio),e.data!==this.props.data&&this.setData(e.data),e.dragMode!==this.props.dragMode&&this.setDragMode(e.dragMode),e.cropBoxData!==this.props.cropBoxData&&this.setCropBoxData(e.cropBoxData),e.canvasData!==this.props.canvasData&&this.setCanvasData(e.canvasData),e.moveTo!==this.props.moveTo&&(e.moveTo.length>1?this.moveTo(e.moveTo[0],e.moveTo[1]):this.moveTo(e.moveTo[0])),e.zoomTo!==this.props.zoomTo&&this.zoomTo(e.zoomTo),e.rotateTo!==this.props.rotateTo&&this.rotateTo(e.rotateTo),e.scaleX!==this.props.scaleX&&this.scaleX(e.scaleX),e.scaleY!==this.props.scaleY&&this.scaleY(e.scaleY),e.enable!==this.props.enable&&(e.enable?this.enable():this.disable()),Object.keys(e).forEach((function(o){var r=e[o]!==t.props[o],a=-1!==h.indexOf(o);if("function"==typeof e[o]&&"function"==typeof t.props[o]&&(r=e[o].toString()!==t.props[o].toString()),r&&a)throw new Error("prop: "+o+" can't be change after componentDidMount")}))}},{key:"componentWillUnmount",value:function(){this.img&&(this.cropper.destroy(),delete this.img,delete this.cropper)}},{key:"setDragMode",value:function(e){return this.cropper.setDragMode(e)}},{key:"setAspectRatio",value:function(e){return this.cropper.setAspectRatio(e)}},{key:"getCroppedCanvas",value:function(e){return this.cropper.getCroppedCanvas(e)}},{key:"setCropBoxData",value:function(e){return this.cropper.setCropBoxData(e)}},{key:"getCropBoxData",value:function(){return this.cropper.getCropBoxData()}},{key:"setCanvasData",value:function(e){return this.cropper.setCanvasData(e)}},{key:"getCanvasData",value:function(){return this.cropper.getCanvasData()}},{key:"getImageData",value:function(){return this.cropper.getImageData()}},{key:"getContainerData",value:function(){return this.cropper.getContainerData()}},{key:"setData",value:function(e){return this.cropper.setData(e)}},{key:"getData",value:function(e){return this.cropper.getData(e)}},{key:"crop",value:function(){return this.cropper.crop()}},{key:"move",value:function(e,t){return this.cropper.move(e,t)}},{key:"moveTo",value:function(e,t){return this.cropper.moveTo(e,t)}},{key:"zoom",value:function(e){return this.cropper.zoom(e)}},{key:"zoomTo",value:function(e){return this.cropper.zoomTo(e)}},{key:"rotate",value:function(e){return this.cropper.rotate(e)}},{key:"rotateTo",value:function(e){return this.cropper.rotateTo(e)}},{key:"enable",value:function(){return this.cropper.enable()}},{key:"disable",value:function(){return this.cropper.disable()}},{key:"reset",value:function(){return this.cropper.reset()}},{key:"clear",value:function(){return this.cropper.clear()}},{key:"replace",value:function(e,t){return this.cropper.replace(e,t)}},{key:"scale",value:function(e,t){return this.cropper.scale(e,t)}},{key:"scaleX",value:function(e){return this.cropper.scaleX(e)}},{key:"scaleY",value:function(e){return this.cropper.scaleY(e)}},{key:"render",value:function(){var e=this,t=this.props,o=t.src,r=t.alt,a=t.crossOrigin;return i.default.createElement("div",{src:null,crossOrigin:null,alt:null,style:this.props.style,className:this.props.className},i.default.createElement("img",{crossOrigin:a,ref:function(t){e.img=t},src:o,alt:void 0===r?"picture":r,style:{opacity:0}}))}}]),t}(u.Component);m.propTypes={style:l.default.object,className:l.default.string,crossOrigin:l.default.string,src:l.default.string,alt:l.default.string,aspectRatio:l.default.number,dragMode:l.default.oneOf(["crop","move","none"]),data:l.default.shape({x:l.default.number,y:l.default.number,width:l.default.number,height:l.default.number,rotate:l.default.number,scaleX:l.default.number,scaleY:l.default.number}),scaleX:l.default.number,scaleY:l.default.number,enable:l.default.bool,cropBoxData:l.default.shape({left:l.default.number,top:l.default.number,width:l.default.number,height:l.default.number}),canvasData:l.default.shape({left:l.default.number,top:l.default.number,width:l.default.number,height:l.default.number}),zoomTo:l.default.number,moveTo:l.default.arrayOf(l.default.number),rotateTo:l.default.number,viewMode:l.default.oneOf([0,1,2,3]),preview:l.default.string,responsive:l.default.bool,restore:l.default.bool,checkCrossOrigin:l.default.bool,checkOrientation:l.default.bool,modal:l.default.bool,guides:l.default.bool,center:l.default.bool,highlight:l.default.bool,background:l.default.bool,autoCrop:l.default.bool,autoCropArea:l.default.number,movable:l.default.bool,rotatable:l.default.bool,scalable:l.default.bool,zoomable:l.default.bool,zoomOnTouch:l.default.bool,zoomOnWheel:l.default.bool,wheelZoomRation:l.default.number,cropBoxMovable:l.default.bool,cropBoxResizable:l.default.bool,toggleDragModeOnDblclick:l.default.bool,minContainerWidth:l.default.number,minContainerHeight:l.default.number,minCanvasWidth:l.default.number,minCanvasHeight:l.default.number,minCropBoxWidth:l.default.number,minCropBoxHeight:l.default.number,ready:l.default.func,cropstart:l.default.func,cropmove:l.default.func,cropend:l.default.func,crop:l.default.func,zoom:l.default.func},m.defaultProps={src:null,dragMode:"crop",data:null,scaleX:1,scaleY:1,enable:!0,zoomTo:1,rotateTo:0},t.default=m}));