svoydom/public/assets/plugins/cropperjs/cropper.min.js

10 lines
36 KiB
JavaScript
Raw Permalink Normal View History

2023-05-17 09:57:20 +03:00
/*!
* Cropper.js v1.5.13
* https://fengyuanchen.github.io/cropperjs
*
* Copyright 2015-present Chen Fengyuan
* Released under the MIT license
*
* Date: 2022-11-20T05:30:46.114Z
*/
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).Cropper=e()}(this,function(){"use strict";function C(e,t){var i,a=Object.keys(e);return Object.getOwnPropertySymbols&&(i=Object.getOwnPropertySymbols(e),t&&(i=i.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),a.push.apply(a,i)),a}function S(a){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach(function(t){var e,i;e=a,i=n[t=t],t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach(function(t){Object.defineProperty(a,t,Object.getOwnPropertyDescriptor(n,t))})}return a}function D(t){return(D="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})(t)}function A(t,e){for(var i=0;i<e.length;i++){var a=e[i];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,a.key,a)}}function j(t){return function(t){if(Array.isArray(t))return a(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){var i;if(t)return"string"==typeof t?a(t,e):"Map"===(i="Object"===(i=Object.prototype.toString.call(t).slice(8,-1))&&t.constructor?t.constructor.name:i)||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?a(t,e):void 0}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,a=new Array(e);i<e;i++)a[i]=t[i];return a}var t="undefined"!=typeof window&&void 0!==window.document,h=t?window:{},e=!(!t||!h.document.documentElement)&&"ontouchstart"in h.document.documentElement,i=t&&"PointerEvent"in h,c="cropper",P="all",I="crop",U="move",q="zoom",B="e",k="w",O="s",T="n",E="ne",W="nw",H="se",N="sw",$="".concat(c,"-crop"),Q="".concat(c,"-disabled"),L="".concat(c,"-hidden"),K="".concat(c,"-hide"),Z="".concat(c,"-invisible"),n="".concat(c,"-modal"),G="".concat(c,"-move"),d="".concat(c,"Action"),m="".concat(c,"Preview"),V="crop",F="move",J="none",_="crop",tt="cropend",et="cropmove",it="cropstart",at="dblclick",nt=i?"pointerdown":e?"touchstart":"mousedown",ot=i?"pointermove":e?"touchmove":"mousemove",ht=i?"pointerup pointercancel":e?"touchend touchcancel":"mouseup",rt="zoom",st="image/jpeg",ct=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,dt=/^data:/,lt=/^data:image\/jpeg;base64,/,pt=/^img|canvas$/i,mt={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},ut=Number.isNaN||h.isNaN;function p(t){return"number"==typeof t&&!ut(t)}function gt(t){return 0<t&&t<1/0}function ft(t){return void 0===t}function o(t){return"object"===D(t)&&null!==t}var vt=Object.prototype.hasOwnProperty;function u(t){if(!o(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&vt.call(i,"isPrototypeOf")}catch(t){return!1}}function l(t){return"function"==typeof t}var wt=Array.prototype.slice;function bt(t){return Array.from?Array.from(t):wt.call(t)}function z(i,a){return i&&l(a)&&(Array.isArray(i)||p(i.length)?bt(i).forEach(function(t,e){a.call(i,t,e,i)}):