/*! * * filerobot-image-editor v3.12.16 * https://github.com/scaleflex/filerobot-image-editor * * Copyright (c) 2019 scaleflex * Released under the MIT license * * Date: 2021-03-05T06:48:26.826Z * */!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="https://cdn.scaleflex.it/plugins/filerobot-image-editor/3.12.16/",n(n.s=69)}([function(e,t,n){"use strict";e.exports=n(27)},function(e,t,n){"use strict";(function(e){n.d(t,"a",(function(){return ke}));var r=n(7),o=n(2),i=n.n(o),a=(n(14),n(15)),s=n(16),l=n(11),c=n(10),u=n.n(c);function f(){return(f=Object.assign||function(e){for(var t=1;t1?t-1:0),r=1;r0?" Additional arguments: "+n.join(", "):""))}var S=function(e){var t=document.head,n=e||t,r=document.createElement("style"),o=function(e){for(var t=e.childNodes,n=t.length;n>=0;n--){var r=t[n];if(r&&1===r.nodeType&&r.hasAttribute(y))return r}}(n),i=void 0!==o?o.nextSibling:null;r.setAttribute(y,"active"),r.setAttribute("data-styled-version","5.1.1");var a=k();return a&&r.setAttribute("nonce",a),n.insertBefore(r,i),r},j=function(){function e(e){var t=this.element=S(e);t.appendChild(document.createTextNode("")),this.sheet=function(e){if(e.sheet)return e.sheet;for(var t=document.styleSheets,n=0,r=t.length;n=0){var n=document.createTextNode(t),r=this.nodes[e];return this.element.insertBefore(n,r||null),this.length++,!0}return!1},t.deleteRule=function(e){this.element.removeChild(this.nodes[e]),this.length--},t.getRule=function(e){return e=this.groupSizes.length){for(var n=this.groupSizes,r=n.length,o=r;e>=o;)(o<<=1)<0&&O(16,""+e);this.groupSizes=new Uint32Array(o),this.groupSizes.set(n),this.length=o;for(var i=r;i=this.length||0===this.groupSizes[e])return t;for(var n=this.groupSizes[e],r=this.indexOfGroup(e),o=r+n,i=r;i=D&&(D=t+1),P.set(e,t),R.set(t,e)},I="style["+y+'][data-styled-version="5.1.1"]',z=new RegExp("^"+y+'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)'),L=function(e,t,n){for(var r,o=n.split(","),i=0,a=o.length;i0&&(c+=e+",")})),r+=""+s+l+'{content:"'+c+'"}/*!sc*/\n'}}}return r}(this)},e}(),H=function(e,t){for(var n=t.length;n;)e=33*e^t.charCodeAt(--n);return e},W=function(e){return H(5381,e)};var Y=/^\s*\/\/.*$/gm;function V(e){var t,n,r,o=void 0===e?g:e,i=o.options,s=void 0===i?g:i,l=o.plugins,c=void 0===l?h:l,u=new a.a(s),f=[],p=function(e){function t(t){if(t)try{e(t+"}")}catch(e){}}return function(n,r,o,i,a,s,l,c,u,f){switch(n){case 1:if(0===u&&64===r.charCodeAt(0))return e(r+";"),"";break;case 2:if(0===c)return r+"/*|*/";break;case 3:switch(c){case 102:case 112:return e(o[0]+r),"";default:return r+(0===f?"/*|*/":"")}case-2:r.split("/*|*/}").forEach(t)}}}((function(e){f.push(e)})),d=function(e,r,o){return r>0&&-1!==o.slice(0,r).indexOf(n)&&o.slice(r-n.length,r)!==n?"."+t:e};function m(e,o,i,a){void 0===a&&(a="&");var s=e.replace(Y,""),l=o&&i?i+" "+o+" { "+s+" }":s;return t=a,n=o,r=new RegExp("\\"+n+"\\b","g"),u(i||!o?"":o,l)}return u.use([].concat(c,[function(e,t,o){2===e&&o.length&&o[0].lastIndexOf(n)>0&&(o[0]=o[0].replace(r,d))},p,function(e){if(-2===e){var t=f;return f=[],t}}])),m.hash=c.length?c.reduce((function(e,t){return t.name||O(15),H(e,t.name)}),5381).toString():"",m}var q=i.a.createContext(),X=(q.Consumer,i.a.createContext()),$=(X.Consumer,new U),K=V();function Q(){return Object(o.useContext)(q)||$}function Z(){return Object(o.useContext)(X)||K}var G=function(){function e(e,t){var n=this;this.inject=function(e){e.hasNameForId(n.id,n.name)||e.insertRules(n.id,n.name,K.apply(void 0,n.stringifyArgs))},this.toString=function(){return O(12,String(n.name))},this.name=e,this.id="sc-keyframes-"+e,this.stringifyArgs=t}return e.prototype.getName=function(){return this.name},e}(),J=/([A-Z])/g,ee=/^ms-/;function te(e){return e.replace(J,"-$1").toLowerCase().replace(ee,"-ms-")}var ne=function(e){return null==e||!1===e||""===e},re=function e(t,n){var r=[];return Object.keys(t).forEach((function(n){if(!ne(t[n])){if(d(t[n]))return r.push.apply(r,e(t[n],n)),r;if(m(t[n]))return r.push(te(n)+":",t[n],";"),r;r.push(te(n)+": "+(o=n,(null==(i=t[n])||"boolean"==typeof i||""===i?"":"number"!=typeof i||0===i||o in s.a?String(i).trim():i+"px")+";"))}var o,i;return r})),n?[n+" {"].concat(r,["}"]):r};function oe(e,t,n){if(Array.isArray(e)){for(var r,o=[],i=0,a=e.length;i1?t-1:0),r=1;r1?t-1:0),r=1;r25?39:97))};function pe(e){var t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=fe(t%52)+n;return(fe(t%52)+n).replace(ue,"$1-$2")}function de(e){for(var t=0;t>>0);if(!t.hasNameForId(r,i)){var a=n(o,"."+i,void 0,r);t.insertRules(r,i,a)}return this.staticRulesId=i,i}for(var s=this.rules.length,l=H(this.baseHash,n.hash),c="",u=0;u>>0);if(!t.hasNameForId(r,h)){var g=n(c,"."+h,void 0,r);t.insertRules(r,h,g)}return h},e}(),ge=(new Set,function(e,t,n){return void 0===n&&(n=g),e.theme!==n.theme&&e.theme||t||n.theme}),me=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,be=/(^-|-$)/g;function ve(e){return e.replace(me,"-").replace(be,"")}function ye(e){return"string"==typeof e&&!0}var we=function(e){return pe(W(e)>>>0)};var xe=i.a.createContext();xe.Consumer;function ke(e){var t=Object(o.useContext)(xe),n=Object(o.useMemo)((function(){return function(e,t){return e?m(e)?e(t):Array.isArray(e)||"object"!=typeof e?O(8):t?f({},t,{},e):e:O(14)}(e.theme,t)}),[e.theme,t]);return e.children?i.a.createElement(xe.Provider,{value:n},e.children):null}var Oe={};function Se(e,t,n){var r=e.attrs,i=e.componentStyle,a=e.defaultProps,s=e.foldedComponentIds,c=e.shouldForwardProp,u=e.styledComponentId,p=e.target;Object(o.useDebugValue)(u);var d=function(e,t,n){void 0===e&&(e=g);var r=f({},t,{theme:e}),o={};return n.forEach((function(e){var t,n,i,a=e;for(t in m(a)&&(a=a(r)),a)r[t]=o[t]="className"===t?(n=o[t],i=a[t],n&&i?n+" "+i:n||i):a[t]})),[r,o]}(ge(t,Object(o.useContext)(xe),a)||g,t,r),h=d[0],b=d[1],v=function(e,t,n,r){var i=Q(),a=Z(),s=e.isStatic&&!t?e.generateAndInjectStyles(g,i,a):e.generateAndInjectStyles(n,i,a);return Object(o.useDebugValue)(s),s}(i,r.length>0,h),y=n,w=b.$as||t.$as||b.as||t.as||p,x=ye(w),k=b!==t?f({},t,{},b):t,O=c||x&&l.a,S={};for(var j in k)"$"!==j[0]&&"as"!==j&&("forwardedAs"===j?S.as=k[j]:O&&!O(j,l.a)||(S[j]=k[j]));return t.style&&b.style!==t.style&&(S.style=f({},t.style,{},b.style)),S.className=Array.prototype.concat(s,u,v!==u?v:null,t.className,b.className).filter(Boolean).join(" "),S.ref=y,Object(o.createElement)(w,S)}function je(e,t,n){var r=v(e),o=!ye(e),a=t.displayName,s=void 0===a?function(e){return ye(e)?"styled."+e:"Styled("+b(e)+")"}(e):a,l=t.componentId,c=void 0===l?function(e,t){var n="string"!=typeof e?"sc":ve(e);Oe[n]=(Oe[n]||0)+1;var r=n+"-"+we(n+Oe[n]);return t?t+"-"+r:r}(t.displayName,t.parentComponentId):l,p=t.attrs,d=void 0===p?h:p,g=t.displayName&&t.componentId?ve(t.displayName)+"-"+t.componentId:t.componentId||c,m=r&&e.attrs?Array.prototype.concat(e.attrs,d).filter(Boolean):d,y=t.shouldForwardProp;r&&e.shouldForwardProp&&(y=y?function(n,r){return e.shouldForwardProp(n,r)&&t.shouldForwardProp(n,r)}:e.shouldForwardProp);var w,x=new he(r?e.componentStyle.rules.concat(n):n,g),k=function(e,t){return Se(w,e,t)};return k.displayName=s,(w=i.a.forwardRef(k)).attrs=m,w.componentStyle=x,w.displayName=s,w.shouldForwardProp=y,w.foldedComponentIds=r?Array.prototype.concat(e.foldedComponentIds,e.styledComponentId):h,w.styledComponentId=g,w.target=r?e.target:e,w.withComponent=function(e){var r=t.componentId,o=function(e,t){if(null==e)return{};var n,r,o={},i=Object.keys(e);for(r=0;r=0||(o[n]=e[n]);return o}(t,["componentId"]),i=r&&r+"-"+(ye(e)?e:ve(b(e)));return je(e,f({},o,{attrs:m,componentId:i}),n)},Object.defineProperty(w,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(t){this._foldedDefaultProps=r?ce({},e.defaultProps,t):t}}),w.toString=function(){return"."+w.styledComponentId},o&&u()(w,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,self:!0,styledComponentId:!0,target:!0,withComponent:!0}),w}var Ce=function(e){return function e(t,n,o){if(void 0===o&&(o=g),!Object(r.isValidElementType)(n))return O(1,String(n));var i=function(){return t(n,o,ie.apply(void 0,arguments))};return i.withConfig=function(r){return e(t,n,f({},o,{},r))},i.attrs=function(r){return e(t,n,f({},o,{attrs:Array.prototype.concat(o.attrs,r).filter(Boolean)}))},i}(je,e)};["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","marquee","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","title","tr","track","u","ul","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"].forEach((function(e){Ce[e]=Ce(e)}));t.b=Ce}).call(this,n(12))},function(e,t,n){"use strict";e.exports=n(23)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n1?n-1:0),o=1;o255?255:e}},{key:"copyAttributes",value:function(e,t,n){return null==n&&(n={}),function(){for(var r=[],o=0,i=Array.from(e.attributes);oe?d():!0!==t&&(o=setTimeout(r?h:d,void 0===r?e-p:e)))}return"boolean"!=typeof t&&(r=n,n=t,t=void 0),l.cancel=function(){s(),i=!0},l}e.debounce=function(e,n,r){return void 0===r?t(e,n,!1):t(e,r,!1!==n)},e.throttle=t,Object.defineProperty(e,"__esModule",{value:!0})}(t)},function(e,t,n){"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE){0;try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}}(),e.exports=n(22)},function(e,t,n){"use strict";e.exports=n(26)},function(e,t,n){"use strict";function r(e,t){for(var n=0;n1)for(var n=1;nr&&(r=(t=t.trim()).charCodeAt(0)),r){case 38:return t.replace(g,"$1"+e.trim());case 58:return e.trim()+t.replace(g,"$1"+e.trim());default:if(0<1*n&&0l.charCodeAt(8))break;case 115:a=a.replace(l,"-webkit-"+l)+";"+a;break;case 207:case 102:a=a.replace(l,"-webkit-"+(102s.charCodeAt(0)&&(s=s.trim()),s=[s],0d)&&(N=(H=H.replace(" ",":")).length),0>2]|=e[o]<>2]|=n<>2]|=(192|n>>6)<>2]|=(128|63&n)<=57344?(a[r>>2]|=(224|n>>12)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<>2]|=(240|n>>18)<>2]|=(128|n>>12&63)<>2]|=(128|n>>6&63)<>2]|=(128|63&n)<=64?(this.block=a[16],this.start=r-64,this.hash(),this.hashed=!0):this.start=r}return this.bytes>4294967295&&(this.hBytes+=this.bytes/4294967296<<0,this.bytes=this.bytes%4294967296),this}},Sha1.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var e=this.blocks,t=this.lastByteIndex;e[16]=this.block,e[t>>2]|=EXTRA[3&t],this.block=e[16],t>=56&&(this.hashed||this.hash(),e[0]=this.block,e[16]=e[1]=e[2]=e[3]=e[4]=e[5]=e[6]=e[7]=e[8]=e[9]=e[10]=e[11]=e[12]=e[13]=e[14]=e[15]=0),e[14]=this.hBytes<<3|this.bytes>>>29,e[15]=this.bytes<<3,this.hash()}},Sha1.prototype.hash=function(){var e,t,n=this.h0,r=this.h1,o=this.h2,i=this.h3,a=this.h4,s=this.blocks;for(e=16;e<80;++e)t=s[e-3]^s[e-8]^s[e-14]^s[e-16],s[e]=t<<1|t>>>31;for(e=0;e<20;e+=5)n=(t=(r=(t=(o=(t=(i=(t=(a=(t=n<<5|n>>>27)+(r&o|~r&i)+a+1518500249+s[e]<<0)<<5|a>>>27)+(n&(r=r<<30|r>>>2)|~n&o)+i+1518500249+s[e+1]<<0)<<5|i>>>27)+(a&(n=n<<30|n>>>2)|~a&r)+o+1518500249+s[e+2]<<0)<<5|o>>>27)+(i&(a=a<<30|a>>>2)|~i&n)+r+1518500249+s[e+3]<<0)<<5|r>>>27)+(o&(i=i<<30|i>>>2)|~o&a)+n+1518500249+s[e+4]<<0,o=o<<30|o>>>2;for(;e<40;e+=5)n=(t=(r=(t=(o=(t=(i=(t=(a=(t=n<<5|n>>>27)+(r^o^i)+a+1859775393+s[e]<<0)<<5|a>>>27)+(n^(r=r<<30|r>>>2)^o)+i+1859775393+s[e+1]<<0)<<5|i>>>27)+(a^(n=n<<30|n>>>2)^r)+o+1859775393+s[e+2]<<0)<<5|o>>>27)+(i^(a=a<<30|a>>>2)^n)+r+1859775393+s[e+3]<<0)<<5|r>>>27)+(o^(i=i<<30|i>>>2)^a)+n+1859775393+s[e+4]<<0,o=o<<30|o>>>2;for(;e<60;e+=5)n=(t=(r=(t=(o=(t=(i=(t=(a=(t=n<<5|n>>>27)+(r&o|r&i|o&i)+a-1894007588+s[e]<<0)<<5|a>>>27)+(n&(r=r<<30|r>>>2)|n&o|r&o)+i-1894007588+s[e+1]<<0)<<5|i>>>27)+(a&(n=n<<30|n>>>2)|a&r|n&r)+o-1894007588+s[e+2]<<0)<<5|o>>>27)+(i&(a=a<<30|a>>>2)|i&n|a&n)+r-1894007588+s[e+3]<<0)<<5|r>>>27)+(o&(i=i<<30|i>>>2)|o&a|i&a)+n-1894007588+s[e+4]<<0,o=o<<30|o>>>2;for(;e<80;e+=5)n=(t=(r=(t=(o=(t=(i=(t=(a=(t=n<<5|n>>>27)+(r^o^i)+a-899497514+s[e]<<0)<<5|a>>>27)+(n^(r=r<<30|r>>>2)^o)+i-899497514+s[e+1]<<0)<<5|i>>>27)+(a^(n=n<<30|n>>>2)^r)+o-899497514+s[e+2]<<0)<<5|o>>>27)+(i^(a=a<<30|a>>>2)^n)+r-899497514+s[e+3]<<0)<<5|r>>>27)+(o^(i=i<<30|i>>>2)^a)+n-899497514+s[e+4]<<0,o=o<<30|o>>>2;this.h0=this.h0+n<<0,this.h1=this.h1+r<<0,this.h2=this.h2+o<<0,this.h3=this.h3+i<<0,this.h4=this.h4+a<<0},Sha1.prototype.hex=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4;return HEX_CHARS[e>>28&15]+HEX_CHARS[e>>24&15]+HEX_CHARS[e>>20&15]+HEX_CHARS[e>>16&15]+HEX_CHARS[e>>12&15]+HEX_CHARS[e>>8&15]+HEX_CHARS[e>>4&15]+HEX_CHARS[15&e]+HEX_CHARS[t>>28&15]+HEX_CHARS[t>>24&15]+HEX_CHARS[t>>20&15]+HEX_CHARS[t>>16&15]+HEX_CHARS[t>>12&15]+HEX_CHARS[t>>8&15]+HEX_CHARS[t>>4&15]+HEX_CHARS[15&t]+HEX_CHARS[n>>28&15]+HEX_CHARS[n>>24&15]+HEX_CHARS[n>>20&15]+HEX_CHARS[n>>16&15]+HEX_CHARS[n>>12&15]+HEX_CHARS[n>>8&15]+HEX_CHARS[n>>4&15]+HEX_CHARS[15&n]+HEX_CHARS[r>>28&15]+HEX_CHARS[r>>24&15]+HEX_CHARS[r>>20&15]+HEX_CHARS[r>>16&15]+HEX_CHARS[r>>12&15]+HEX_CHARS[r>>8&15]+HEX_CHARS[r>>4&15]+HEX_CHARS[15&r]+HEX_CHARS[o>>28&15]+HEX_CHARS[o>>24&15]+HEX_CHARS[o>>20&15]+HEX_CHARS[o>>16&15]+HEX_CHARS[o>>12&15]+HEX_CHARS[o>>8&15]+HEX_CHARS[o>>4&15]+HEX_CHARS[15&o]},Sha1.prototype.toString=Sha1.prototype.hex,Sha1.prototype.digest=function(){this.finalize();var e=this.h0,t=this.h1,n=this.h2,r=this.h3,o=this.h4;return[e>>24&255,e>>16&255,e>>8&255,255&e,t>>24&255,t>>16&255,t>>8&255,255&t,n>>24&255,n>>16&255,n>>8&255,255&n,r>>24&255,r>>16&255,r>>8&255,255&r,o>>24&255,o>>16&255,o>>8&255,255&o]},Sha1.prototype.array=Sha1.prototype.digest,Sha1.prototype.arrayBuffer=function(){this.finalize();var e=new ArrayBuffer(20),t=new DataView(e);return t.setUint32(0,this.h0),t.setUint32(4,this.h1),t.setUint32(8,this.h2),t.setUint32(12,this.h3),t.setUint32(16,this.h4),e};var exports=createMethod();COMMON_JS?module.exports=exports:(root.sha1=exports,AMD&&(__WEBPACK_AMD_DEFINE_RESULT__=function(){return exports}.call(exports,__webpack_require__,exports,module),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__)))}()}).call(this,__webpack_require__(12),__webpack_require__(13))},function(e,t,n){ /*! * Cropper.js v1.5.7 * https://fengyuanchen.github.io/cropperjs * * Copyright 2015-present Chen Fengyuan * Released under the MIT license * * Date: 2020-05-23T05:23:00.081Z */ e.exports=function(){"use strict";function e(t){return(e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(t)}function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var n=0;ne.length)&&(t=e.length);for(var n=0,r=new Array(t);n0&&e<1/0};function I(e){return void 0===e}function z(t){return"object"===e(t)&&null!==t}var L=Object.prototype.hasOwnProperty;function B(e){if(!z(e))return!1;try{var t=e.constructor,n=t.prototype;return t&&n&&L.call(n,"isPrototypeOf")}catch(e){return!1}}function N(e){return"function"==typeof e}var F=Array.prototype.slice;function U(e){return Array.from?Array.from(e):F.call(e)}function H(e,t){return e&&N(t)&&(Array.isArray(e)||A(e.length)?U(e).forEach((function(n,r){t.call(e,n,r,e)})):z(e)&&Object.keys(e).forEach((function(n){t.call(e,e[n],n,e)}))),e}var W=Object.assign||function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r0&&n.forEach((function(t){z(t)&&Object.keys(t).forEach((function(n){e[n]=t[n]}))})),e},Y=/\.\d*(?:0|9){12}\d*$/;function V(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return Y.test(e)?Math.round(e*t)/t:e}var q=/^width|height|left|top|marginLeft|marginTop$/;function X(e,t){var n=e.style;H(t,(function(e,t){q.test(t)&&A(e)&&(e="".concat(e,"px")),n[t]=e}))}function $(e,t){if(t)if(A(e.length))H(e,(function(e){$(e,t)}));else if(e.classList)e.classList.add(t);else{var n=e.className.trim();n?n.indexOf(t)<0&&(e.className="".concat(n," ").concat(t)):e.className=t}}function K(e,t){t&&(A(e.length)?H(e,(function(e){K(e,t)})):e.classList?e.classList.remove(t):e.className.indexOf(t)>=0&&(e.className=e.className.replace(t,"")))}function Q(e,t,n){t&&(A(e.length)?H(e,(function(e){Q(e,t,n)})):n?$(e,t):K(e,t))}var Z=/([a-z\d])([A-Z])/g;function G(e){return e.replace(Z,"$1-$2").toLowerCase()}function J(e,t){return z(e[t])?e[t]:e.dataset?e.dataset[t]:e.getAttribute("data-".concat(G(t)))}function ee(e,t,n){z(n)?e[t]=n:e.dataset?e.dataset[t]=n:e.setAttribute("data-".concat(G(t)),n)}var te=/\s\s*/,ne=function(){var e=!1;if(l){var t=!1,n=function(){},r=Object.defineProperty({},"once",{get:function(){return e=!0,t},set:function(e){t=e}});c.addEventListener("test",n,r),c.removeEventListener("test",n,r)}return e}();function re(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n;t.trim().split(te).forEach((function(t){if(!ne){var i=e.listeners;i&&i[t]&&i[t][n]&&(o=i[t][n],delete i[t][n],0===Object.keys(i[t]).length&&delete i[t],0===Object.keys(i).length&&delete e.listeners)}e.removeEventListener(t,o,r)}))}function oe(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=n;t.trim().split(te).forEach((function(t){if(r.once&&!ne){var i=e.listeners,a=void 0===i?{}:i;o=function(){delete a[t][n],e.removeEventListener(t,o,r);for(var i=arguments.length,s=new Array(i),l=0;l1&&void 0!==arguments[1]?arguments[1]:"contain",i=T(r),a=T(n);if(i&&a){var s=n*t;"contain"===o&&s>r||"cover"===o&&s=8&&(i=l+u)}}}if(i){var f,p,d=n.getUint16(i,r);for(p=0;pe.width?3===n?s=e.height*a:l=e.width/a:3===n?l=e.width/a:s=e.height*a;var c={aspectRatio:a,naturalWidth:o,naturalHeight:i,width:s,height:l};c.left=(e.width-s)/2,c.top=(e.height-l)/2,c.oldLeft=c.left,c.oldTop=c.top,this.canvasData=c,this.limited=1===n||2===n,this.limitCanvas(!0,!0),this.initialImageData=W({},t),this.initialCanvasData=W({},c)},limitCanvas:function(e,t){var n=this.options,r=this.containerData,o=this.canvasData,i=this.cropBoxData,a=n.viewMode,s=o.aspectRatio,l=this.cropped&&i;if(e){var c=Number(n.minCanvasWidth)||0,u=Number(n.minCanvasHeight)||0;a>1?(c=Math.max(c,r.width),u=Math.max(u,r.height),3===a&&(u*s>c?c=u*s:u=c/s)):a>0&&(c?c=Math.max(c,l?i.width:0):u?u=Math.max(u,l?i.height:0):l&&(c=i.width,(u=i.height)*s>c?c=u*s:u=c/s));var f=de({aspectRatio:s,width:c,height:u});c=f.width,u=f.height,o.minWidth=c,o.minHeight=u,o.maxWidth=1/0,o.maxHeight=1/0}if(t)if(a>(l?0:1)){var p=r.width-o.width,d=r.height-o.height;o.minLeft=Math.min(0,p),o.minTop=Math.min(0,d),o.maxLeft=Math.max(0,p),o.maxTop=Math.max(0,d),l&&this.limited&&(o.minLeft=Math.min(i.left,i.left+(i.width-o.width)),o.minTop=Math.min(i.top,i.top+(i.height-o.height)),o.maxLeft=i.left,o.maxTop=i.top,2===a&&(o.width>=r.width&&(o.minLeft=Math.min(0,p),o.maxLeft=Math.max(0,p)),o.height>=r.height&&(o.minTop=Math.min(0,d),o.maxTop=Math.max(0,d))))}else o.minLeft=-o.width,o.minTop=-o.height,o.maxLeft=r.width,o.maxTop=r.height},renderCanvas:function(e,t){var n=this.canvasData,r=this.imageData;if(t){var o=function(e){var t=e.width,n=e.height,r=e.degree;if(90==(r=Math.abs(r)%180))return{width:n,height:t};var o=r%90*Math.PI/180,i=Math.sin(o),a=Math.cos(o),s=t*a+n*i,l=t*i+n*a;return r>90?{width:l,height:s}:{width:s,height:l}}({width:r.naturalWidth*Math.abs(r.scaleX||1),height:r.naturalHeight*Math.abs(r.scaleY||1),degree:r.rotate||0}),i=o.width,a=o.height,s=n.width*(i/n.naturalWidth),l=n.height*(a/n.naturalHeight);n.left-=(s-n.width)/2,n.top-=(l-n.height)/2,n.width=s,n.height=l,n.aspectRatio=i/a,n.naturalWidth=i,n.naturalHeight=a,this.limitCanvas(!0,!1)}(n.width>n.maxWidth||n.widthn.maxHeight||n.heightt.width?o.height=o.width/n:o.width=o.height*n),this.cropBoxData=o,this.limitCropBox(!0,!0),o.width=Math.min(Math.max(o.width,o.minWidth),o.maxWidth),o.height=Math.min(Math.max(o.height,o.minHeight),o.maxHeight),o.width=Math.max(o.minWidth,o.width*r),o.height=Math.max(o.minHeight,o.height*r),o.left=t.left+(t.width-o.width)/2,o.top=t.top+(t.height-o.height)/2,o.oldLeft=o.left,o.oldTop=o.top,this.initialCropBoxData=W({},o)},limitCropBox:function(e,t){var n=this.options,r=this.containerData,o=this.canvasData,i=this.cropBoxData,a=this.limited,s=n.aspectRatio;if(e){var l=Number(n.minCropBoxWidth)||0,c=Number(n.minCropBoxHeight)||0,u=a?Math.min(r.width,o.width,o.width+o.left,r.width-o.left):r.width,f=a?Math.min(r.height,o.height,o.height+o.top,r.height-o.top):r.height;l=Math.min(l,r.width),c=Math.min(c,r.height),s&&(l&&c?c*s>l?c=l/s:l=c*s:l?c=l/s:c&&(l=c*s),f*s>u?f=u/s:u=f*s),i.minWidth=Math.min(l,u),i.minHeight=Math.min(c,f),i.maxWidth=u,i.maxHeight=f}t&&(a?(i.minLeft=Math.max(0,o.left),i.minTop=Math.max(0,o.top),i.maxLeft=Math.min(r.width,o.left+o.width)-i.width,i.maxTop=Math.min(r.height,o.top+o.height)-i.height):(i.minLeft=0,i.minTop=0,i.maxLeft=r.width-i.width,i.maxTop=r.height-i.height))},renderCropBox:function(){var e=this.options,t=this.containerData,n=this.cropBoxData;(n.width>n.maxWidth||n.widthn.maxHeight||n.height=t.width&&n.height>=t.height?"move":"all"),X(this.cropBox,W({width:n.width,height:n.height},fe({translateX:n.left,translateY:n.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ie(this.element,"crop",this.getData())}},ye={initPreview:function(){var e=this.element,t=this.crossOrigin,n=this.options.preview,r=t?this.crossOriginUrl:this.url,o=e.alt||"The image to preview",i=document.createElement("img");if(t&&(i.crossOrigin=t),i.src=r,i.alt=o,this.viewBox.appendChild(i),this.viewBoxImage=i,n){var a=n;"string"==typeof n?a=e.ownerDocument.querySelectorAll(n):n.querySelector&&(a=[n]),this.previews=a,H(a,(function(e){var n=document.createElement("img");ee(e,w,{width:e.offsetWidth,height:e.offsetHeight,html:e.innerHTML}),t&&(n.crossOrigin=t),n.src=r,n.alt=o,n.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;"',e.innerHTML="",e.appendChild(n)}))}},resetPreview:function(){H(this.previews,(function(e){var t=J(e,w);X(e,{width:t.width,height:t.height}),e.innerHTML=t.html,function(e,t){if(z(e[t]))try{delete e[t]}catch(n){e[t]=void 0}else if(e.dataset)try{delete e.dataset[t]}catch(n){e.dataset[t]=void 0}else e.removeAttribute("data-".concat(G(t)))}(e,w)}))},preview:function(){var e=this.imageData,t=this.canvasData,n=this.cropBoxData,r=n.width,o=n.height,i=e.width,a=e.height,s=n.left-t.left-e.left,l=n.top-t.top-e.top;this.cropped&&!this.disabled&&(X(this.viewBoxImage,W({width:i,height:a},fe(W({translateX:-s,translateY:-l},e)))),H(this.previews,(function(t){var n=J(t,w),c=n.width,u=n.height,f=c,p=u,d=1;r&&(p=o*(d=c/r)),o&&p>u&&(f=r*(d=u/o),p=u),X(t,{width:f,height:p}),X(t.getElementsByTagName("img")[0],W({width:i*d,height:a*d},fe(W({translateX:-s*d,translateY:-l*d},e))))})))}},we={bind:function(){var e=this.element,t=this.options,n=this.cropper;N(t.cropstart)&&oe(e,"cropstart",t.cropstart),N(t.cropmove)&&oe(e,"cropmove",t.cropmove),N(t.cropend)&&oe(e,"cropend",t.cropend),N(t.crop)&&oe(e,"crop",t.crop),N(t.zoom)&&oe(e,"zoom",t.zoom),oe(n,S,this.onCropStart=this.cropStart.bind(this)),t.zoomable&&t.zoomOnWheel&&oe(n,"wheel",this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&oe(n,"dblclick",this.onDblclick=this.dblclick.bind(this)),oe(e.ownerDocument,j,this.onCropMove=this.cropMove.bind(this)),oe(e.ownerDocument,C,this.onCropEnd=this.cropEnd.bind(this)),t.responsive&&oe(window,"resize",this.onResize=this.resize.bind(this))},unbind:function(){var e=this.element,t=this.options,n=this.cropper;N(t.cropstart)&&re(e,"cropstart",t.cropstart),N(t.cropmove)&&re(e,"cropmove",t.cropmove),N(t.cropend)&&re(e,"cropend",t.cropend),N(t.crop)&&re(e,"crop",t.crop),N(t.zoom)&&re(e,"zoom",t.zoom),re(n,S,this.onCropStart),t.zoomable&&t.zoomOnWheel&&re(n,"wheel",this.onWheel,{passive:!1,capture:!0}),t.toggleDragModeOnDblclick&&re(n,"dblclick",this.onDblclick),re(e.ownerDocument,j,this.onCropMove),re(e.ownerDocument,C,this.onCropEnd),t.responsive&&re(window,"resize",this.onResize)}},xe={resize:function(){if(!this.disabled){var e,t,n=this.options,r=this.container,o=this.containerData,i=r.offsetWidth/o.width;1===i&&r.offsetHeight===o.height||(n.restore&&(e=this.getCanvasData(),t=this.getCropBoxData()),this.render(),n.restore&&(this.setCanvasData(H(e,(function(t,n){e[n]=t*i}))),this.setCropBoxData(H(t,(function(e,n){t[n]=e*i})))))}},dblclick:function(){var e,t;this.disabled||"none"===this.options.dragMode||this.setDragMode((e=this.dragBox,t=p,(e.classList?e.classList.contains(t):e.className.indexOf(t)>-1)?"move":"crop"))},wheel:function(e){var t=this,n=Number(this.options.wheelZoomRatio)||.1,r=1;this.disabled||(e.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){t.wheeling=!1}),50),e.deltaY?r=e.deltaY>0?1:-1:e.wheelDelta?r=-e.wheelDelta/120:e.detail&&(r=e.detail>0?1:-1),this.zoom(-r*n,e)))},cropStart:function(e){var t=e.buttons,n=e.button;if(!(this.disabled||("mousedown"===e.type||"pointerdown"===e.type&&"mouse"===e.pointerType)&&(A(t)&&1!==t||A(n)&&0!==n||e.ctrlKey))){var r,o=this.options,i=this.pointers;e.changedTouches?H(e.changedTouches,(function(e){i[e.identifier]=pe(e)})):i[e.pointerId||0]=pe(e),r=Object.keys(i).length>1&&o.zoomable&&o.zoomOnTouch?"zoom":J(e.target,y),_.test(r)&&!1!==ie(this.element,"cropstart",{originalEvent:e,action:r})&&(e.preventDefault(),this.action=r,this.cropping=!1,"crop"===r&&(this.cropping=!0,$(this.dragBox,b)))}},cropMove:function(e){var t=this.action;if(!this.disabled&&t){var n=this.pointers;e.preventDefault(),!1!==ie(this.element,"cropmove",{originalEvent:e,action:t})&&(e.changedTouches?H(e.changedTouches,(function(e){W(n[e.identifier]||{},pe(e,!0))})):W(n[e.pointerId||0]||{},pe(e,!0)),this.change(e))}},cropEnd:function(e){if(!this.disabled){var t=this.action,n=this.pointers;e.changedTouches?H(e.changedTouches,(function(e){delete n[e.identifier]})):delete n[e.pointerId||0],t&&(e.preventDefault(),Object.keys(n).length||(this.action=""),this.cropping&&(this.cropping=!1,Q(this.dragBox,b,this.cropped&&this.options.modal)),ie(this.element,"cropend",{originalEvent:e,action:t}))}}},ke={change:function(e){var t,n=this.options,r=this.canvasData,o=this.containerData,a=this.cropBoxData,s=this.pointers,l=this.action,c=n.aspectRatio,u=a.left,f=a.top,p=a.width,d=a.height,g=u+p,m=f+d,b=0,v=0,y=o.width,w=o.height,x=!0;!c&&e.shiftKey&&(c=p&&d?p/d:1),this.limited&&(b=a.minLeft,v=a.minTop,y=b+Math.min(o.width,r.width,r.left+r.width),w=v+Math.min(o.height,r.height,r.top+r.height));var k=s[Object.keys(s)[0]],O={x:k.endX-k.startX,y:k.endY-k.startY},S=function(e){switch(e){case"e":g+O.x>y&&(O.x=y-g);break;case"w":u+O.xw&&(O.y=w-m)}};switch(l){case"all":u+=O.x,f+=O.y;break;case"e":if(O.x>=0&&(g>=y||c&&(f<=v||m>=w))){x=!1;break}S("e"),(p+=O.x)<0&&(l="w",u-=p=-p),c&&(d=p/c,f+=(a.height-d)/2);break;case"n":if(O.y<=0&&(f<=v||c&&(u<=b||g>=y))){x=!1;break}S("n"),d-=O.y,f+=O.y,d<0&&(l="s",f-=d=-d),c&&(p=d*c,u+=(a.width-p)/2);break;case"w":if(O.x<=0&&(u<=b||c&&(f<=v||m>=w))){x=!1;break}S("w"),p-=O.x,u+=O.x,p<0&&(l="e",u-=p=-p),c&&(d=p/c,f+=(a.height-d)/2);break;case"s":if(O.y>=0&&(m>=w||c&&(u<=b||g>=y))){x=!1;break}S("s"),(d+=O.y)<0&&(l="n",f-=d=-d),c&&(p=d*c,u+=(a.width-p)/2);break;case"ne":if(c){if(O.y<=0&&(f<=v||g>=y)){x=!1;break}S("n"),d-=O.y,f+=O.y,p=d*c}else S("n"),S("e"),O.x>=0?gv&&(d-=O.y,f+=O.y):(d-=O.y,f+=O.y);p<0&&d<0?(l="sw",f-=d=-d,u-=p=-p):p<0?(l="nw",u-=p=-p):d<0&&(l="se",f-=d=-d);break;case"nw":if(c){if(O.y<=0&&(f<=v||u<=b)){x=!1;break}S("n"),d-=O.y,f+=O.y,p=d*c,u+=a.width-p}else S("n"),S("w"),O.x<=0?u>b?(p-=O.x,u+=O.x):O.y<=0&&f<=v&&(x=!1):(p-=O.x,u+=O.x),O.y<=0?f>v&&(d-=O.y,f+=O.y):(d-=O.y,f+=O.y);p<0&&d<0?(l="se",f-=d=-d,u-=p=-p):p<0?(l="ne",u-=p=-p):d<0&&(l="sw",f-=d=-d);break;case"sw":if(c){if(O.x<=0&&(u<=b||m>=w)){x=!1;break}S("w"),p-=O.x,u+=O.x,d=p/c}else S("s"),S("w"),O.x<=0?u>b?(p-=O.x,u+=O.x):O.y>=0&&m>=w&&(x=!1):(p-=O.x,u+=O.x),O.y>=0?m=0&&(g>=y||m>=w)){x=!1;break}S("e"),d=(p+=O.x)/c}else S("s"),S("e"),O.x>=0?g=0&&m>=w&&(x=!1):p+=O.x,O.y>=0?m0?l=O.y>0?"se":"ne":O.x<0&&(u-=p,l=O.y>0?"sw":"nw"),O.y<0&&(f-=d),this.cropped||(K(this.cropBox,h),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0))}x&&(a.width=p,a.height=d,a.left=u,a.top=f,this.action=l,this.renderCropBox()),H(s,(function(e){e.startX=e.endX,e.startY=e.endY}))}},Oe={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&$(this.dragBox,b),K(this.cropBox,h),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=W({},this.initialImageData),this.canvasData=W({},this.initialCanvasData),this.cropBoxData=W({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(W(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),K(this.dragBox,b),$(this.cropBox,h)),this},replace:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&e&&(this.isImg&&(this.element.src=e),t?(this.url=e,this.image.src=e,this.ready&&(this.viewBoxImage.src=e,H(this.previews,(function(t){t.getElementsByTagName("img")[0].src=e})))):(this.isImg&&(this.replaced=!0),this.options.data=null,this.uncreate(),this.load(e))),this},enable:function(){return this.ready&&this.disabled&&(this.disabled=!1,K(this.cropper,d)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,$(this.cropper,d)),this},destroy:function(){var e=this.element;return e.cropper?(e.cropper=void 0,this.isImg&&this.replaced&&(e.src=this.originalUrl),this.uncreate(),this):this},move:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=n.left,o=n.top;return this.moveTo(I(e)?e:r+Number(e),I(t)?t:o+Number(t))},moveTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.canvasData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.movable&&(A(e)&&(n.left=e,r=!0),A(t)&&(n.top=t,r=!0),r&&this.renderCanvas(!0)),this},zoom:function(e,t){var n=this.canvasData;return e=(e=Number(e))<0?1/(1-e):1+e,this.zoomTo(n.width*e/n.naturalWidth,null,t)},zoomTo:function(e,t,n){var r=this.options,o=this.canvasData,i=o.width,a=o.height,s=o.naturalWidth,l=o.naturalHeight;if((e=Number(e))>=0&&this.ready&&!this.disabled&&r.zoomable){var c=s*e,u=l*e;if(!1===ie(this.element,"zoom",{ratio:e,oldRatio:i/s,originalEvent:n}))return this;if(n){var f=this.pointers,p=ae(this.cropper),d=f&&Object.keys(f).length?function(e){var t=0,n=0,r=0;return H(e,(function(e){var o=e.startX,i=e.startY;t+=o,n+=i,r+=1})),{pageX:t/=r,pageY:n/=r}}(f):{pageX:n.pageX,pageY:n.pageY};o.left-=(c-i)*((d.pageX-p.left-o.left)/i),o.top-=(u-a)*((d.pageY-p.top-o.top)/a)}else B(t)&&A(t.x)&&A(t.y)?(o.left-=(c-i)*((t.x-o.left)/i),o.top-=(u-a)*((t.y-o.top)/a)):(o.left-=(c-i)/2,o.top-=(u-a)/2);o.width=c,o.height=u,this.renderCanvas(!0)}return this},rotate:function(e){return this.rotateTo((this.imageData.rotate||0)+Number(e))},rotateTo:function(e){return A(e=Number(e))&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=e%360,this.renderCanvas(!0,!0)),this},scaleX:function(e){var t=this.imageData.scaleY;return this.scale(e,A(t)?t:1)},scaleY:function(e){var t=this.imageData.scaleX;return this.scale(A(t)?t:1,e)},scale:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e,n=this.imageData,r=!1;return e=Number(e),t=Number(t),this.ready&&!this.disabled&&this.options.scalable&&(A(e)&&(n.scaleX=e,r=!0),A(t)&&(n.scaleY=t,r=!0),r&&this.renderCanvas(!0,!0)),this},getData:function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],n=this.options,r=this.imageData,o=this.canvasData,i=this.cropBoxData;if(this.ready&&this.cropped){e={x:i.left-o.left,y:i.top-o.top,width:i.width,height:i.height};var a=r.width/r.naturalWidth;if(H(e,(function(t,n){e[n]=t/a})),t){var s=Math.round(e.y+e.height),l=Math.round(e.x+e.width);e.x=Math.round(e.x),e.y=Math.round(e.y),e.width=l-e.x,e.height=s-e.y}}else e={x:0,y:0,width:0,height:0};return n.rotatable&&(e.rotate=r.rotate||0),n.scalable&&(e.scaleX=r.scaleX||1,e.scaleY=r.scaleY||1),e},setData:function(e){var t=this.options,n=this.imageData,r=this.canvasData,o={};if(this.ready&&!this.disabled&&B(e)){var i=!1;t.rotatable&&A(e.rotate)&&e.rotate!==n.rotate&&(n.rotate=e.rotate,i=!0),t.scalable&&(A(e.scaleX)&&e.scaleX!==n.scaleX&&(n.scaleX=e.scaleX,i=!0),A(e.scaleY)&&e.scaleY!==n.scaleY&&(n.scaleY=e.scaleY,i=!0)),i&&this.renderCanvas(!0,!0);var a=n.width/n.naturalWidth;A(e.x)&&(o.left=e.x*a+r.left),A(e.y)&&(o.top=e.y*a+r.top),A(e.width)&&(o.width=e.width*a),A(e.height)&&(o.height=e.height*a),this.setCropBoxData(o)}return this},getContainerData:function(){return this.ready?W({},this.containerData):{}},getImageData:function(){return this.sized?W({},this.imageData):{}},getCanvasData:function(){var e=this.canvasData,t={};return this.ready&&H(["left","top","width","height","naturalWidth","naturalHeight"],(function(n){t[n]=e[n]})),t},setCanvasData:function(e){var t=this.canvasData,n=t.aspectRatio;return this.ready&&!this.disabled&&B(e)&&(A(e.left)&&(t.left=e.left),A(e.top)&&(t.top=e.top),A(e.width)?(t.width=e.width,t.height=e.width/n):A(e.height)&&(t.height=e.height,t.width=e.height*n),this.renderCanvas(!0)),this},getCropBoxData:function(){var e,t=this.cropBoxData;return this.ready&&this.cropped&&(e={left:t.left,top:t.top,width:t.width,height:t.height}),e||{}},setCropBoxData:function(e){var t,n,r=this.cropBoxData,o=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&B(e)&&(A(e.left)&&(r.left=e.left),A(e.top)&&(r.top=e.top),A(e.width)&&e.width!==r.width&&(t=!0,r.width=e.width),A(e.height)&&e.height!==r.height&&(n=!0,r.height=e.height),o&&(t?r.height=r.width/o:n&&(r.width=r.height*o)),this.renderCropBox()),this},getCroppedCanvas:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var t=this.canvasData,n=he(this.image,this.imageData,t,e);if(!this.cropped)return n;var r=this.getData(),o=r.x,i=r.y,s=r.width,l=r.height,c=n.width/Math.floor(t.naturalWidth);1!==c&&(o*=c,i*=c,s*=c,l*=c);var u=s/l,f=de({aspectRatio:u,width:e.maxWidth||1/0,height:e.maxHeight||1/0}),p=de({aspectRatio:u,width:e.minWidth||0,height:e.minHeight||0},"cover"),d=de({aspectRatio:u,width:e.width||(1!==c?n.width:s),height:e.height||(1!==c?n.height:l)}),h=d.width,g=d.height;h=Math.min(f.width,Math.max(p.width,h)),g=Math.min(f.height,Math.max(p.height,g));var m=document.createElement("canvas"),b=m.getContext("2d");m.width=V(h),m.height=V(g),b.fillStyle=e.fillColor||"transparent",b.fillRect(0,0,h,g);var v=e.imageSmoothingEnabled,y=void 0===v||v,w=e.imageSmoothingQuality;b.imageSmoothingEnabled=y,w&&(b.imageSmoothingQuality=w);var x,k,O,S,j,C,_=n.width,E=n.height,P=o,R=i;P<=-s||P>_?(P=0,x=0,O=0,j=0):P<=0?(O=-P,P=0,j=x=Math.min(_,s+P)):P<=_&&(O=0,j=x=Math.min(s,_-P)),x<=0||R<=-l||R>E?(R=0,k=0,S=0,C=0):R<=0?(S=-R,R=0,C=k=Math.min(E,l+R)):R<=E&&(S=0,C=k=Math.min(l,E-R));var D=[P,R,x,k];if(j>0&&C>0){var M=h/s;D.push(O*M,S*M,j*M,C*M)}return b.drawImage.apply(b,[n].concat(a(D.map((function(e){return Math.floor(V(e))}))))),m},setAspectRatio:function(e){var t=this.options;return this.disabled||I(e)||(t.aspectRatio=Math.max(0,e)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(e){var t=this.options,n=this.dragBox,r=this.face;if(this.ready&&!this.disabled){var o="crop"===e,i=t.movable&&"move"===e;e=o||i?e:"none",t.dragMode=e,ee(n,y,e),Q(n,p,o),Q(n,v,i),t.cropBoxMovable||(ee(r,y,e),Q(r,p,o),Q(r,v,i))}return this}},Se=c.Cropper,je=function(){function e(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t(this,e),!n||!R.test(n.tagName))throw new Error("The first argument is required and must be an or element.");this.element=n,this.options=W({},D,B(r)&&r),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()}var r,o,i;return r=e,i=[{key:"noConflict",value:function(){return window.Cropper=Se,e}},{key:"setDefaults",value:function(e){W(D,B(e)&&e)}}],(o=[{key:"init",value:function(){var e,t=this.element,n=t.tagName.toLowerCase();if(!t.cropper){if(t.cropper=this,"img"===n){if(this.isImg=!0,e=t.getAttribute("src")||"",this.originalUrl=e,!e)return;e=t.src}else"canvas"===n&&window.HTMLCanvasElement&&(e=t.toDataURL());this.load(e)}}},{key:"load",value:function(e){var t=this;if(e){this.url=e,this.imageData={};var n=this.element,r=this.options;if(r.rotatable||r.scalable||(r.checkOrientation=!1),r.checkOrientation&&window.ArrayBuffer)if(E.test(e))P.test(e)?this.read((o=e.replace(me,""),i=atob(o),a=new ArrayBuffer(i.length),H(s=new Uint8Array(a),(function(e,t){s[t]=i.charCodeAt(t)})),a)):this.clone();else{var o,i,a,s,l=new XMLHttpRequest,c=this.clone.bind(this);this.reloading=!0,this.xhr=l,l.onabort=c,l.onerror=c,l.ontimeout=c,l.onprogress=function(){"image/jpeg"!==l.getResponseHeader("content-type")&&l.abort()},l.onload=function(){t.read(l.response)},l.onloadend=function(){t.reloading=!1,t.xhr=null},r.checkCrossOrigin&&ce(e)&&n.crossOrigin&&(e=ue(e)),l.open("GET",e),l.responseType="arraybuffer",l.withCredentials="use-credentials"===n.crossOrigin,l.send()}else this.clone()}}},{key:"read",value:function(e){var t=this.options,n=this.imageData,r=be(e),o=0,i=1,a=1;if(r>1){this.url=function(e,t){for(var n=[],r=new Uint8Array(e);r.length>0;)n.push(ge.apply(null,U(r.subarray(0,8192)))),r=r.subarray(8192);return"data:".concat(t,";base64,").concat(btoa(n.join("")))}(e,"image/jpeg");var s=function(e){var t=0,n=1,r=1;switch(e){case 2:n=-1;break;case 3:t=-180;break;case 4:r=-1;break;case 5:t=90,r=-1;break;case 6:t=90;break;case 7:t=90,n=-1;break;case 8:t=-90}return{rotate:t,scaleX:n,scaleY:r}}(r);o=s.rotate,i=s.scaleX,a=s.scaleY}t.rotatable&&(n.rotate=o),t.scalable&&(n.scaleX=i,n.scaleY=a),this.clone()}},{key:"clone",value:function(){var e=this.element,t=this.url,n=e.crossOrigin,r=t;this.options.checkCrossOrigin&&ce(t)&&(n||(n="anonymous"),r=ue(t)),this.crossOrigin=n,this.crossOriginUrl=r;var o=document.createElement("img");n&&(o.crossOrigin=n),o.src=r||t,o.alt=e.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),$(o,g),e.parentNode.insertBefore(o,e.nextSibling)}},{key:"start",value:function(){var e=this,t=this.image;t.onload=null,t.onerror=null,this.sizing=!0;var n=c.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(c.navigator.userAgent),r=function(t,n){W(e.imageData,{naturalWidth:t,naturalHeight:n,aspectRatio:t/n}),e.sizing=!1,e.sized=!0,e.build()};if(!t.naturalWidth||n){var o=document.createElement("img"),i=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){r(o.width,o.height),n||i.removeChild(o)},o.src=t.src,n||(o.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;",i.appendChild(o))}else r(t.naturalWidth,t.naturalHeight)}},{key:"stop",value:function(){var e=this.image;e.onload=null,e.onerror=null,e.parentNode.removeChild(e),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var e=this.element,t=this.options,n=this.image,r=e.parentNode,o=document.createElement("div");o.innerHTML='
';var i=o.querySelector(".".concat("cropper","-container")),a=i.querySelector(".".concat("cropper","-canvas")),s=i.querySelector(".".concat("cropper","-drag-box")),l=i.querySelector(".".concat("cropper","-crop-box")),c=l.querySelector(".".concat("cropper","-face"));this.container=r,this.cropper=i,this.canvas=a,this.dragBox=s,this.cropBox=l,this.viewBox=i.querySelector(".".concat("cropper","-view-box")),this.face=c,a.appendChild(n),$(e,h),r.insertBefore(i,e.nextSibling),this.isImg||K(n,g),this.initPreview(),this.bind(),t.initialAspectRatio=Math.max(0,t.initialAspectRatio)||NaN,t.aspectRatio=Math.max(0,t.aspectRatio)||NaN,t.viewMode=Math.max(0,Math.min(3,Math.round(t.viewMode)))||0,$(l,h),t.guides||$(l.getElementsByClassName("".concat("cropper","-dashed")),h),t.center||$(l.getElementsByClassName("".concat("cropper","-center")),h),t.background&&$(i,"".concat("cropper","-bg")),t.highlight||$(c,m),t.cropBoxMovable&&($(c,v),ee(c,y,"all")),t.cropBoxResizable||($(l.getElementsByClassName("".concat("cropper","-line")),h),$(l.getElementsByClassName("".concat("cropper","-point")),h)),this.render(),this.ready=!0,this.setDragMode(t.dragMode),t.autoCrop&&this.crop(),this.setData(t.data),N(t.ready)&&oe(e,"ready",t.ready,{once:!0}),ie(e,"ready")}}},{key:"unbuild",value:function(){this.ready&&(this.ready=!1,this.unbind(),this.resetPreview(),this.cropper.parentNode.removeChild(this.cropper),K(this.element,h))}},{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()}}])&&n(r.prototype,o),i&&n(r,i),e}();return W(je.prototype,ve,ye,we,xe,ke,Oe),je}()},function(e,t,n){"use strict";const r=n(32),o=new Set(["jpg","png","gif","webp","flif","cr2","tif","bmp","jxr","psd","ico","bpg","jp2","jpm","jpx","heic","cur","dcm"]),i=e=>{const t=r(e);return o.has(t&&t.ext)?t:null};e.exports=i,e.exports.default=i,Object.defineProperty(i,"minimumBytes",{value:r.minimumBytes})},function(e,t,n){"use strict";function r(e,t){for(var n=0;ns;l?a++:a--){var c=a*o,u=c+(a===e.Blocks-1?i:o);if(Caman.NodeJS){var f=Fiber((function(){return t.call(n,a,c,u)})).run();r.push(n.blockFinished(f))}else r.push(setTimeout(function(e,r,o){return function(){return t.call(n,e,r,o)}}(a,c,u),0))}return r}()}},{key:"executeFilter",value:function(){return Caman.Event.trigger(this.c,"processStart",this.currentJob),this.currentJob.type===Caman.Filter.Type.Single?this.eachBlock(this.renderBlock):this.eachBlock(this.renderKernel)}},{key:"executePlugin",value:function(){return o.a.debug("Executing plugin ".concat(this.currentJob.plugin)),Caman.Plugin.execute(this.c,this.currentJob.plugin,this.currentJob.args),o.a.debug("Plugin ".concat(this.currentJob.plugin," finished!")),this.processNext()}},{key:"renderBlock",value:function(t,n,i){o.a.debug("Block #".concat(t," - Filter: ").concat(this.currentJob.name,", Start: ").concat(n,", End: ").concat(i)),Caman.Event.trigger(this.c,"blockStarted",{blockNum:t,totalBlocks:e.Blocks,startPixel:n,endPixel:i});var a=new Caman.Pixel;a.setContext(this.c);for(var s=n,l=i;s=b;v?m++:m--)for(var y=f,w=-f,x=f<=w;x?y<=w:y>=w;x?y++:y--){var k=p.getPixelRelative(m,y);u[3*g]=k.r,u[3*g+1]=k.g,u[3*g+2]=k.b,g++}var O=this.processKernel(l,u,a,i);this.modPixelData[d]=r.b.clampRGB(O.r),this.modPixelData[d+1]=r.b.clampRGB(O.g),this.modPixelData[d+2]=r.b.clampRGB(O.b),this.modPixelData[d+3]=this.c.pixelData[d+3]}return this.blockFinished(e)}},{key:"blockFinished",value:function(t){if(t>=0&&o.a.debug("Block #".concat(t," finished! Filter: ").concat(this.currentJob.name)),this.blocksDone++,Caman.Event.trigger(this.c,"blockFinished",{blockNum:t,blocksFinished:this.blocksDone,totalBlocks:e.Blocks}),this.blocksDone===e.Blocks){if(this.currentJob.type===Caman.Filter.Type.Kernel)for(var n=0,r=this.c.pixelData.length,i=0<=r;i?nr;i?n++:n--)this.c.pixelData[n]=this.modPixelData[n];return t>=0&&o.a.debug("Filter ".concat(this.currentJob.name," finished!")),Caman.Event.trigger(this.c,"processComplete",this.currentJob),this.processNext()}}},{key:"processKernel",value:function(e,t,n,r){for(var o={r:0,g:0,b:0},i=0,a=e.length,s=0<=a;s?ia;s?i++:i--)o.r+=e[i]*t[3*i],o.g+=e[i]*t[3*i+1],o.b+=e[i]*t[3*i+2];return o.r=o.r/n+r,o.g=o.g/n+r,o.b=o.b/n+r,o}},{key:"loadOverlay",value:function(e,t){var n=this,r=new Image;r.onload=function(){return e.context.drawImage(r,0,0,n.c.dimensions.width,n.c.dimensions.height),e.imageData=e.context.getImageData(0,0,n.c.dimensions.width,n.c.dimensions.height),e.pixelData=e.imageData.data,n.c.pixelData=e.pixelData,n.processNext()};var o=Caman.IO.remoteCheck(t);return r.src=null!=o?o:t}},{key:"loadLayerMask",value:function(e,t){var n=this,r=new Image;r.onload=function(){var t=document.createElement("canvas");t.width=n.c.dimensions.width,t.height=n.c.dimensions.height;var o=t.getContext("2d");o.drawImage(r,0,0,n.c.dimensions.width,n.c.dimensions.height);var i=o.getImageData(0,0,n.c.dimensions.width,n.c.dimensions.height);return e.maskData=i.data,n.processNext()};var o=Caman.IO.remoteCheck(t);return r.src=null!=o?o:t}}])&&i(t.prototype,n),a&&i(t,a),e}();a.initClass(),t.a=a},function(e,t,n){"use strict"; /** @license React v17.0.1 * react-dom.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */var r=n(2),o=n(9),i=n(24);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n