You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

3 lines
35 KiB

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