/** * we-cropper v1.3.9 * (c) 2020 dlhandsome * @license MIT */ !function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.WeCropper=e()}(this,function(){"use strict";var t=void 0,e=["touchstarted","touchmoved","touchended"];function r(n){for(var o=[],t=arguments.length-1;0>18&63)+d.charAt(r>>12&63)+d.charAt(r>>6&63)+d.charAt(63&r);return 2==a?(e=t.charCodeAt(c)<<8,n=t.charCodeAt(++c),i+=d.charAt((r=e+n)>>10)+d.charAt(r>>4&63)+d.charAt(r<<2&63)+"="):1==a&&(r=t.charCodeAt(c),i+=d.charAt(r>>2)+d.charAt(r<<4&63)+"=="),i},decode:function(t){var e=(t=String(t).replace(c,"")).length;e%4==0&&(e=(t=t.replace(/==?$/,"")).length),(e%4==1||/[^+a-zA-Z0-9/]/.test(t))&&s("Invalid character: the string to be decoded is not correctly encoded.");for(var n,o,r=0,a="",i=-1;++i>(-2*r&6)));return a},version:"0.1.0"};if(e&&!e.nodeType)if(n)n.exports=a;else for(var i in a)a.hasOwnProperty(i)&&(e[i]=a[i]);else t.base64=a}(f)});function x(t){var e="";if("string"==typeof t)e=t;else for(var n=0;n>8&255,r>>16&255,r>>24&255,0,0,0,0,54,0,0,0],i=[40,0,0,0,255&e,e>>8&255,e>>16&255,e>>24&255,255&n,n>>8&255,n>>16&255,n>>24&255,1,0,24,0,0,0,0,0,255&o,o>>8&255,o>>16&255,o>>24&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=(4-3*e%4)%4,u=t.data,s="",d=e<<2,h=n,f=String.fromCharCode;do{for(var l=d*(h-1),g="",p=0;p=h&&(p.newScale=h),p.scaleWidth=Math.round(p.newScale*p.baseWidth),p.scaleHeight=Math.round(p.newScale*p.baseHeight);var l=Math.round(p.touchX1-p.scaleWidth/2),g=Math.round(p.touchY1-p.scaleHeight/2);p.outsideBound(l,g),p.updateCanvas()},p.__xtouchEnd=function(){p.oldScale=p.newScale,p.rectX=p.imgLeft,p.rectY=p.imgTop})},C});