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.
20 lines
88 KiB
20 lines
88 KiB
var Ni=Object.defineProperty;var Li=(t,a,i)=>a in t?Ni(t,a,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[a]=i;var A=(t,a,i)=>Li(t,typeof a!="symbol"?a+"":a,i);import{U as Ri,r as $t,W as qi,al as Wi,i as P,E as Hi,C as Si,V as _i,f as Ii,a as Pi,b as Xi,am as Yi,_ as Ui,g as yt,x as R,h as q,j as B,l as kt,w as $i}from"./index-BLqts8WY.js";import{aP as Vi}from"./index-MyY_xqVN.js";/*!
|
|
* Cropper.js v1.6.1
|
|
* https://fengyuanchen.github.io/cropperjs
|
|
*
|
|
* Copyright 2015-present Chen Fengyuan
|
|
* Released under the MIT license
|
|
*
|
|
* Date: 2023-09-17T03:44:19.860Z
|
|
*/function Vt(t,a){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);a&&(n=n.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),i.push.apply(i,n)}return i}function mi(t){for(var a=1;a<arguments.length;a++){var i=arguments[a]!=null?arguments[a]:{};a%2?Vt(Object(i),!0).forEach(function(n){Gi(t,n,i[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(i)):Vt(Object(i)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(i,n))})}return t}function Mt(t){"@babel/helpers - typeof";return Mt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(a){return typeof a}:function(a){return a&&typeof Symbol=="function"&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a},Mt(t)}function Fi(t,a){if(!(t instanceof a))throw new TypeError("Cannot call a class as a function")}function Ft(t,a){for(var i=0;i<a.length;i++){var n=a[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ui(n.key),n)}}function Qi(t,a,i){return Ft(t.prototype,a),Ft(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function Gi(t,a,i){return a=ui(a),a in t?Object.defineProperty(t,a,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[a]=i,t}function hi(t){return Zi(t)||Ki(t)||Ji(t)||ta()}function Zi(t){if(Array.isArray(t))return Ct(t)}function Ki(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function Ji(t,a){if(t){if(typeof t=="string")return Ct(t,a);var i=Object.prototype.toString.call(t).slice(8,-1);if(i==="Object"&&t.constructor&&(i=t.constructor.name),i==="Map"||i==="Set")return Array.from(t);if(i==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return Ct(t,a)}}function Ct(t,a){(a==null||a>t.length)&&(a=t.length);for(var i=0,n=new Array(a);i<a;i++)n[i]=t[i];return n}function ta(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ia(t,a){if(typeof t!="object"||t===null)return t;var i=t[Symbol.toPrimitive];if(i!==void 0){var n=i.call(t,a||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(a==="string"?String:Number)(t)}function ui(t){var a=ia(t,"string");return typeof a=="symbol"?a:String(a)}var gt=typeof window<"u"&&typeof window.document<"u",_=gt?window:{},qt=gt&&_.document.documentElement?"ontouchstart"in _.document.documentElement:!1,Wt=gt?"PointerEvent"in _:!1,b="cropper",Ht="all",vi="crop",fi="move",gi="zoom",K="e",J="w",it="s",$="n",pt="ne",st="nw",rt="se",lt="sw",Dt="".concat(b,"-crop"),Qt="".concat(b,"-disabled"),N="".concat(b,"-hidden"),Gt="".concat(b,"-hide"),aa="".concat(b,"-invisible"),ft="".concat(b,"-modal"),Bt="".concat(b,"-move"),dt="".concat(b,"Action"),ut="".concat(b,"Preview"),St="crop",xi="move",bi="none",At="crop",Et="cropend",Ot="cropmove",Tt="cropstart",Zt="dblclick",ea=qt?"touchstart":"mousedown",na=qt?"touchmove":"mousemove",oa=qt?"touchend touchcancel":"mouseup",Kt=Wt?"pointerdown":ea,Jt=Wt?"pointermove":na,ti=Wt?"pointerup pointercancel":oa,ii="ready",ai="resize",ei="wheel",Nt="zoom",ni="image/jpeg",pa=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,sa=/^data:/,ra=/^data:image\/jpeg;base64,/,la=/^img|canvas$/i,wi=200,yi=100,oi={viewMode:0,dragMode:St,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:wi,minContainerHeight:yi,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},ca='<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>',da=Number.isNaN||_.isNaN;function v(t){return typeof t=="number"&&!da(t)}var pi=function(t){return t>0&&t<1/0};function jt(t){return typeof t>"u"}function tt(t){return Mt(t)==="object"&&t!==null}var ma=Object.prototype.hasOwnProperty;function at(t){if(!tt(t))return!1;try{var a=t.constructor,i=a.prototype;return a&&i&&ma.call(i,"isPrototypeOf")}catch{return!1}}function T(t){return typeof t=="function"}var ha=Array.prototype.slice;function ki(t){return Array.from?Array.from(t):ha.call(t)}function z(t,a){return t&&T(a)&&(Array.isArray(t)||v(t.length)?ki(t).forEach(function(i,n){a.call(t,i,n,t)}):tt(t)&&Object.keys(t).forEach(function(i){a.call(t,t[i],i,t)})),t}var w=Object.assign||function(t){for(var a=arguments.length,i=new Array(a>1?a-1:0),n=1;n<a;n++)i[n-1]=arguments[n];return tt(t)&&i.length>0&&i.forEach(function(e){tt(e)&&Object.keys(e).forEach(function(o){t[o]=e[o]})}),t},ua=/\.\d*(?:0|9){12}\d*$/;function nt(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1e11;return ua.test(t)?Math.round(t*a)/a:t}var va=/^width|height|left|top|marginLeft|marginTop$/;function V(t,a){var i=t.style;z(a,function(n,e){va.test(e)&&v(n)&&(n="".concat(n,"px")),i[e]=n})}function fa(t,a){return t.classList?t.classList.contains(a):t.className.indexOf(a)>-1}function M(t,a){if(a){if(v(t.length)){z(t,function(n){M(n,a)});return}if(t.classList){t.classList.add(a);return}var i=t.className.trim();i?i.indexOf(a)<0&&(t.className="".concat(i," ").concat(a)):t.className=a}}function S(t,a){if(a){if(v(t.length)){z(t,function(i){S(i,a)});return}if(t.classList){t.classList.remove(a);return}t.className.indexOf(a)>=0&&(t.className=t.className.replace(a,""))}}function et(t,a,i){if(a){if(v(t.length)){z(t,function(n){et(n,a,i)});return}i?M(t,a):S(t,a)}}var ga=/([a-z\d])([A-Z])/g;function _t(t){return t.replace(ga,"$1-$2").toLowerCase()}function Lt(t,a){return tt(t[a])?t[a]:t.dataset?t.dataset[a]:t.getAttribute("data-".concat(_t(a)))}function mt(t,a,i){tt(i)?t[a]=i:t.dataset?t.dataset[a]=i:t.setAttribute("data-".concat(_t(a)),i)}function xa(t,a){if(tt(t[a]))try{delete t[a]}catch{t[a]=void 0}else if(t.dataset)try{delete t.dataset[a]}catch{t.dataset[a]=void 0}else t.removeAttribute("data-".concat(_t(a)))}var ji=/\s\s*/,zi=function(){var t=!1;if(gt){var a=!1,i=function(){},n=Object.defineProperty({},"once",{get:function(){return t=!0,a},set:function(e){a=e}});_.addEventListener("test",i,n),_.removeEventListener("test",i,n)}return t}();function W(t,a,i){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},e=i;a.trim().split(ji).forEach(function(o){if(!zi){var p=t.listeners;p&&p[o]&&p[o][i]&&(e=p[o][i],delete p[o][i],Object.keys(p[o]).length===0&&delete p[o],Object.keys(p).length===0&&delete t.listeners)}t.removeEventListener(o,e,n)})}function L(t,a,i){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:{},e=i;a.trim().split(ji).forEach(function(o){if(n.once&&!zi){var p=t.listeners,l=p===void 0?{}:p;e=function(){delete l[o][i],t.removeEventListener(o,e,n);for(var c=arguments.length,s=new Array(c),r=0;r<c;r++)s[r]=arguments[r];i.apply(t,s)},l[o]||(l[o]={}),l[o][i]&&t.removeEventListener(o,l[o][i],n),l[o][i]=e,t.listeners=l}t.addEventListener(o,e,n)})}function ot(t,a,i){var n;return T(Event)&&T(CustomEvent)?n=new CustomEvent(a,{detail:i,bubbles:!0,cancelable:!0}):(n=document.createEvent("CustomEvent"),n.initCustomEvent(a,!0,!0,i)),t.dispatchEvent(n)}function Mi(t){var a=t.getBoundingClientRect();return{left:a.left+(window.pageXOffset-document.documentElement.clientLeft),top:a.top+(window.pageYOffset-document.documentElement.clientTop)}}var zt=_.location,ba=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function si(t){var a=t.match(ba);return a!==null&&(a[1]!==zt.protocol||a[2]!==zt.hostname||a[3]!==zt.port)}function ri(t){var a="timestamp=".concat(new Date().getTime());return t+(t.indexOf("?")===-1?"?":"&")+a}function ct(t){var a=t.rotate,i=t.scaleX,n=t.scaleY,e=t.translateX,o=t.translateY,p=[];v(e)&&e!==0&&p.push("translateX(".concat(e,"px)")),v(o)&&o!==0&&p.push("translateY(".concat(o,"px)")),v(a)&&a!==0&&p.push("rotate(".concat(a,"deg)")),v(i)&&i!==1&&p.push("scaleX(".concat(i,")")),v(n)&&n!==1&&p.push("scaleY(".concat(n,")"));var l=p.length?p.join(" "):"none";return{WebkitTransform:l,msTransform:l,transform:l}}function wa(t){var a=mi({},t),i=0;return z(t,function(n,e){delete a[e],z(a,function(o){var p=Math.abs(n.startX-o.startX),l=Math.abs(n.startY-o.startY),c=Math.abs(n.endX-o.endX),s=Math.abs(n.endY-o.endY),r=Math.sqrt(p*p+l*l),d=Math.sqrt(c*c+s*s),u=(d-r)/r;Math.abs(u)>Math.abs(i)&&(i=u)})}),i}function vt(t,a){var i=t.pageX,n=t.pageY,e={endX:i,endY:n};return a?e:mi({startX:i,startY:n},e)}function ya(t){var a=0,i=0,n=0;return z(t,function(e){var o=e.startX,p=e.startY;a+=o,i+=p,n+=1}),a/=n,i/=n,{pageX:a,pageY:i}}function F(t){var a=t.aspectRatio,i=t.height,n=t.width,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"contain",o=pi(n),p=pi(i);if(o&&p){var l=i*a;e==="contain"&&l>n||e==="cover"&&l<n?i=n/a:n=i*a}else o?i=n/a:p&&(n=i*a);return{width:n,height:i}}function ka(t){var a=t.width,i=t.height,n=t.degree;if(n=Math.abs(n)%180,n===90)return{width:i,height:a};var e=n%90*Math.PI/180,o=Math.sin(e),p=Math.cos(e),l=a*p+i*o,c=a*o+i*p;return n>90?{width:c,height:l}:{width:l,height:c}}function ja(t,a,i,n){var e=a.aspectRatio,o=a.naturalWidth,p=a.naturalHeight,l=a.rotate,c=l===void 0?0:l,s=a.scaleX,r=s===void 0?1:s,d=a.scaleY,u=d===void 0?1:d,h=i.aspectRatio,x=i.naturalWidth,g=i.naturalHeight,k=n.fillColor,C=k===void 0?"transparent":k,y=n.imageSmoothingEnabled,X=y===void 0?!0:y,O=n.imageSmoothingQuality,m=O===void 0?"low":O,f=n.maxWidth,j=f===void 0?1/0:f,H=n.maxHeight,I=H===void 0?1/0:H,Q=n.minWidth,G=Q===void 0?0:Q,Y=n.minHeight,U=Y===void 0?0:Y,Z=document.createElement("canvas"),D=Z.getContext("2d"),ht=F({aspectRatio:h,width:j,height:I}),It=F({aspectRatio:h,width:G,height:U},"cover"),bt=Math.min(ht.width,Math.max(It.width,x)),wt=Math.min(ht.height,Math.max(It.height,g)),Pt=F({aspectRatio:e,width:j,height:I}),Xt=F({aspectRatio:e,width:G,height:U},"cover"),Yt=Math.min(Pt.width,Math.max(Xt.width,o)),Ut=Math.min(Pt.height,Math.max(Xt.height,p)),Oi=[-Yt/2,-Ut/2,Yt,Ut];return Z.width=nt(bt),Z.height=nt(wt),D.fillStyle=C,D.fillRect(0,0,bt,wt),D.save(),D.translate(bt/2,wt/2),D.rotate(c*Math.PI/180),D.scale(r,u),D.imageSmoothingEnabled=X,D.imageSmoothingQuality=m,D.drawImage.apply(D,[t].concat(hi(Oi.map(function(Ti){return Math.floor(nt(Ti))})))),D.restore(),Z}var Ci=String.fromCharCode;function za(t,a,i){var n="";i+=a;for(var e=a;e<i;e+=1)n+=Ci(t.getUint8(e));return n}var Ma=/^data:.*,/;function Ca(t){var a=t.replace(Ma,""),i=atob(a),n=new ArrayBuffer(i.length),e=new Uint8Array(n);return z(e,function(o,p){e[p]=i.charCodeAt(p)}),n}function Da(t,a){for(var i=[],n=8192,e=new Uint8Array(t);e.length>0;)i.push(Ci.apply(null,ki(e.subarray(0,n)))),e=e.subarray(n);return"data:".concat(a,";base64,").concat(btoa(i.join("")))}function Ba(t){var a=new DataView(t),i;try{var n,e,o;if(a.getUint8(0)===255&&a.getUint8(1)===216)for(var p=a.byteLength,l=2;l+1<p;){if(a.getUint8(l)===255&&a.getUint8(l+1)===225){e=l;break}l+=1}if(e){var c=e+4,s=e+10;if(za(a,c,4)==="Exif"){var r=a.getUint16(s);if(n=r===18761,(n||r===19789)&&a.getUint16(s+2,n)===42){var d=a.getUint32(s+4,n);d>=8&&(o=s+d)}}}if(o){var u=a.getUint16(o,n),h,x;for(x=0;x<u;x+=1)if(h=o+x*12+2,a.getUint16(h,n)===274){h+=8,i=a.getUint16(h,n),a.setUint16(h,1,n);break}}}catch{i=1}return i}function Aa(t){var a=0,i=1,n=1;switch(t){case 2:i=-1;break;case 3:a=-180;break;case 4:n=-1;break;case 5:a=90,n=-1;break;case 6:a=90;break;case 7:a=90,i=-1;break;case 8:a=-90;break}return{rotate:a,scaleX:i,scaleY:n}}var Ea={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,a=this.options,i=this.container,n=this.cropper,e=Number(a.minContainerWidth),o=Number(a.minContainerHeight);M(n,N),S(t,N);var p={width:Math.max(i.offsetWidth,e>=0?e:wi),height:Math.max(i.offsetHeight,o>=0?o:yi)};this.containerData=p,V(n,{width:p.width,height:p.height}),M(t,N),S(n,N)},initCanvas:function(){var t=this.containerData,a=this.imageData,i=this.options.viewMode,n=Math.abs(a.rotate)%180===90,e=n?a.naturalHeight:a.naturalWidth,o=n?a.naturalWidth:a.naturalHeight,p=e/o,l=t.width,c=t.height;t.height*p>t.width?i===3?l=t.height*p:c=t.width/p:i===3?c=t.width/p:l=t.height*p;var s={aspectRatio:p,naturalWidth:e,naturalHeight:o,width:l,height:c};this.canvasData=s,this.limited=i===1||i===2,this.limitCanvas(!0,!0),s.width=Math.min(Math.max(s.width,s.minWidth),s.maxWidth),s.height=Math.min(Math.max(s.height,s.minHeight),s.maxHeight),s.left=(t.width-s.width)/2,s.top=(t.height-s.height)/2,s.oldLeft=s.left,s.oldTop=s.top,this.initialCanvasData=w({},s)},limitCanvas:function(t,a){var i=this.options,n=this.containerData,e=this.canvasData,o=this.cropBoxData,p=i.viewMode,l=e.aspectRatio,c=this.cropped&&o;if(t){var s=Number(i.minCanvasWidth)||0,r=Number(i.minCanvasHeight)||0;p>1?(s=Math.max(s,n.width),r=Math.max(r,n.height),p===3&&(r*l>s?s=r*l:r=s/l)):p>0&&(s?s=Math.max(s,c?o.width:0):r?r=Math.max(r,c?o.height:0):c&&(s=o.width,r=o.height,r*l>s?s=r*l:r=s/l));var d=F({aspectRatio:l,width:s,height:r});s=d.width,r=d.height,e.minWidth=s,e.minHeight=r,e.maxWidth=1/0,e.maxHeight=1/0}if(a)if(p>(c?0:1)){var u=n.width-e.width,h=n.height-e.height;e.minLeft=Math.min(0,u),e.minTop=Math.min(0,h),e.maxLeft=Math.max(0,u),e.maxTop=Math.max(0,h),c&&this.limited&&(e.minLeft=Math.min(o.left,o.left+(o.width-e.width)),e.minTop=Math.min(o.top,o.top+(o.height-e.height)),e.maxLeft=o.left,e.maxTop=o.top,p===2&&(e.width>=n.width&&(e.minLeft=Math.min(0,u),e.maxLeft=Math.max(0,u)),e.height>=n.height&&(e.minTop=Math.min(0,h),e.maxTop=Math.max(0,h))))}else e.minLeft=-e.width,e.minTop=-e.height,e.maxLeft=n.width,e.maxTop=n.height},renderCanvas:function(t,a){var i=this.canvasData,n=this.imageData;if(a){var e=ka({width:n.naturalWidth*Math.abs(n.scaleX||1),height:n.naturalHeight*Math.abs(n.scaleY||1),degree:n.rotate||0}),o=e.width,p=e.height,l=i.width*(o/i.naturalWidth),c=i.height*(p/i.naturalHeight);i.left-=(l-i.width)/2,i.top-=(c-i.height)/2,i.width=l,i.height=c,i.aspectRatio=o/p,i.naturalWidth=o,i.naturalHeight=p,this.limitCanvas(!0,!1)}(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),this.limitCanvas(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,V(this.canvas,w({width:i.width,height:i.height},ct({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var a=this.canvasData,i=this.imageData,n=i.naturalWidth*(a.width/a.naturalWidth),e=i.naturalHeight*(a.height/a.naturalHeight);w(i,{width:n,height:e,left:(a.width-n)/2,top:(a.height-e)/2}),V(this.image,w({width:i.width,height:i.height},ct(w({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,a=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,n=Number(t.autoCropArea)||.8,e={width:a.width,height:a.height};i&&(a.height*i>a.width?e.height=e.width/i:e.width=e.height*i),this.cropBoxData=e,this.limitCropBox(!0,!0),e.width=Math.min(Math.max(e.width,e.minWidth),e.maxWidth),e.height=Math.min(Math.max(e.height,e.minHeight),e.maxHeight),e.width=Math.max(e.minWidth,e.width*n),e.height=Math.max(e.minHeight,e.height*n),e.left=a.left+(a.width-e.width)/2,e.top=a.top+(a.height-e.height)/2,e.oldLeft=e.left,e.oldTop=e.top,this.initialCropBoxData=w({},e)},limitCropBox:function(t,a){var i=this.options,n=this.containerData,e=this.canvasData,o=this.cropBoxData,p=this.limited,l=i.aspectRatio;if(t){var c=Number(i.minCropBoxWidth)||0,s=Number(i.minCropBoxHeight)||0,r=p?Math.min(n.width,e.width,e.width+e.left,n.width-e.left):n.width,d=p?Math.min(n.height,e.height,e.height+e.top,n.height-e.top):n.height;c=Math.min(c,n.width),s=Math.min(s,n.height),l&&(c&&s?s*l>c?s=c/l:c=s*l:c?s=c/l:s&&(c=s*l),d*l>r?d=r/l:r=d*l),o.minWidth=Math.min(c,r),o.minHeight=Math.min(s,d),o.maxWidth=r,o.maxHeight=d}a&&(p?(o.minLeft=Math.max(0,e.left),o.minTop=Math.max(0,e.top),o.maxLeft=Math.min(n.width,e.left+e.width)-o.width,o.maxTop=Math.min(n.height,e.top+e.height)-o.height):(o.minLeft=0,o.minTop=0,o.maxLeft=n.width-o.width,o.maxTop=n.height-o.height))},renderCropBox:function(){var t=this.options,a=this.containerData,i=this.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),this.limitCropBox(!1,!0),i.left=Math.min(Math.max(i.left,i.minLeft),i.maxLeft),i.top=Math.min(Math.max(i.top,i.minTop),i.maxTop),i.oldLeft=i.left,i.oldTop=i.top,t.movable&&t.cropBoxMovable&&mt(this.face,dt,i.width>=a.width&&i.height>=a.height?fi:Ht),V(this.cropBox,w({width:i.width,height:i.height},ct({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),ot(this.element,At,this.getData())}},Oa={initPreview:function(){var t=this.element,a=this.crossOrigin,i=this.options.preview,n=a?this.crossOriginUrl:this.url,e=t.alt||"The image to preview",o=document.createElement("img");if(a&&(o.crossOrigin=a),o.src=n,o.alt=e,this.viewBox.appendChild(o),this.viewBoxImage=o,!!i){var p=i;typeof i=="string"?p=t.ownerDocument.querySelectorAll(i):i.querySelector&&(p=[i]),this.previews=p,z(p,function(l){var c=document.createElement("img");mt(l,ut,{width:l.offsetWidth,height:l.offsetHeight,html:l.innerHTML}),a&&(c.crossOrigin=a),c.src=n,c.alt=e,c.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;"',l.innerHTML="",l.appendChild(c)})}},resetPreview:function(){z(this.previews,function(t){var a=Lt(t,ut);V(t,{width:a.width,height:a.height}),t.innerHTML=a.html,xa(t,ut)})},preview:function(){var t=this.imageData,a=this.canvasData,i=this.cropBoxData,n=i.width,e=i.height,o=t.width,p=t.height,l=i.left-a.left-t.left,c=i.top-a.top-t.top;!this.cropped||this.disabled||(V(this.viewBoxImage,w({width:o,height:p},ct(w({translateX:-l,translateY:-c},t)))),z(this.previews,function(s){var r=Lt(s,ut),d=r.width,u=r.height,h=d,x=u,g=1;n&&(g=d/n,x=e*g),e&&x>u&&(g=u/e,h=n*g,x=u),V(s,{width:h,height:x}),V(s.getElementsByTagName("img")[0],w({width:o*g,height:p*g},ct(w({translateX:-l*g,translateY:-c*g},t))))}))}},Ta={bind:function(){var t=this.element,a=this.options,i=this.cropper;T(a.cropstart)&&L(t,Tt,a.cropstart),T(a.cropmove)&&L(t,Ot,a.cropmove),T(a.cropend)&&L(t,Et,a.cropend),T(a.crop)&&L(t,At,a.crop),T(a.zoom)&&L(t,Nt,a.zoom),L(i,Kt,this.onCropStart=this.cropStart.bind(this)),a.zoomable&&a.zoomOnWheel&&L(i,ei,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&L(i,Zt,this.onDblclick=this.dblclick.bind(this)),L(t.ownerDocument,Jt,this.onCropMove=this.cropMove.bind(this)),L(t.ownerDocument,ti,this.onCropEnd=this.cropEnd.bind(this)),a.responsive&&L(window,ai,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,a=this.options,i=this.cropper;T(a.cropstart)&&W(t,Tt,a.cropstart),T(a.cropmove)&&W(t,Ot,a.cropmove),T(a.cropend)&&W(t,Et,a.cropend),T(a.crop)&&W(t,At,a.crop),T(a.zoom)&&W(t,Nt,a.zoom),W(i,Kt,this.onCropStart),a.zoomable&&a.zoomOnWheel&&W(i,ei,this.onWheel,{passive:!1,capture:!0}),a.toggleDragModeOnDblclick&&W(i,Zt,this.onDblclick),W(t.ownerDocument,Jt,this.onCropMove),W(t.ownerDocument,ti,this.onCropEnd),a.responsive&&W(window,ai,this.onResize)}},Na={resize:function(){if(!this.disabled){var t=this.options,a=this.container,i=this.containerData,n=a.offsetWidth/i.width,e=a.offsetHeight/i.height,o=Math.abs(n-1)>Math.abs(e-1)?n:e;if(o!==1){var p,l;t.restore&&(p=this.getCanvasData(),l=this.getCropBoxData()),this.render(),t.restore&&(this.setCanvasData(z(p,function(c,s){p[s]=c*o})),this.setCropBoxData(z(l,function(c,s){l[s]=c*o})))}}},dblclick:function(){this.disabled||this.options.dragMode===bi||this.setDragMode(fa(this.dragBox,Dt)?xi:St)},wheel:function(t){var a=this,i=Number(this.options.wheelZoomRatio)||.1,n=1;this.disabled||(t.preventDefault(),!this.wheeling&&(this.wheeling=!0,setTimeout(function(){a.wheeling=!1},50),t.deltaY?n=t.deltaY>0?1:-1:t.wheelDelta?n=-t.wheelDelta/120:t.detail&&(n=t.detail>0?1:-1),this.zoom(-n*i,t)))},cropStart:function(t){var a=t.buttons,i=t.button;if(!(this.disabled||(t.type==="mousedown"||t.type==="pointerdown"&&t.pointerType==="mouse")&&(v(a)&&a!==1||v(i)&&i!==0||t.ctrlKey))){var n=this.options,e=this.pointers,o;t.changedTouches?z(t.changedTouches,function(p){e[p.identifier]=vt(p)}):e[t.pointerId||0]=vt(t),Object.keys(e).length>1&&n.zoomable&&n.zoomOnTouch?o=gi:o=Lt(t.target,dt),pa.test(o)&&ot(this.element,Tt,{originalEvent:t,action:o})!==!1&&(t.preventDefault(),this.action=o,this.cropping=!1,o===vi&&(this.cropping=!0,M(this.dragBox,ft)))}},cropMove:function(t){var a=this.action;if(!(this.disabled||!a)){var i=this.pointers;t.preventDefault(),ot(this.element,Ot,{originalEvent:t,action:a})!==!1&&(t.changedTouches?z(t.changedTouches,function(n){w(i[n.identifier]||{},vt(n,!0))}):w(i[t.pointerId||0]||{},vt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var a=this.action,i=this.pointers;t.changedTouches?z(t.changedTouches,function(n){delete i[n.identifier]}):delete i[t.pointerId||0],a&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,et(this.dragBox,ft,this.cropped&&this.options.modal)),ot(this.element,Et,{originalEvent:t,action:a}))}}},La={change:function(t){var a=this.options,i=this.canvasData,n=this.containerData,e=this.cropBoxData,o=this.pointers,p=this.action,l=a.aspectRatio,c=e.left,s=e.top,r=e.width,d=e.height,u=c+r,h=s+d,x=0,g=0,k=n.width,C=n.height,y=!0,X;!l&&t.shiftKey&&(l=r&&d?r/d:1),this.limited&&(x=e.minLeft,g=e.minTop,k=x+Math.min(n.width,i.width,i.left+i.width),C=g+Math.min(n.height,i.height,i.top+i.height));var O=o[Object.keys(o)[0]],m={x:O.endX-O.startX,y:O.endY-O.startY},f=function(j){switch(j){case K:u+m.x>k&&(m.x=k-u);break;case J:c+m.x<x&&(m.x=x-c);break;case $:s+m.y<g&&(m.y=g-s);break;case it:h+m.y>C&&(m.y=C-h);break}};switch(p){case Ht:c+=m.x,s+=m.y;break;case K:if(m.x>=0&&(u>=k||l&&(s<=g||h>=C))){y=!1;break}f(K),r+=m.x,r<0&&(p=J,r=-r,c-=r),l&&(d=r/l,s+=(e.height-d)/2);break;case $:if(m.y<=0&&(s<=g||l&&(c<=x||u>=k))){y=!1;break}f($),d-=m.y,s+=m.y,d<0&&(p=it,d=-d,s-=d),l&&(r=d*l,c+=(e.width-r)/2);break;case J:if(m.x<=0&&(c<=x||l&&(s<=g||h>=C))){y=!1;break}f(J),r-=m.x,c+=m.x,r<0&&(p=K,r=-r,c-=r),l&&(d=r/l,s+=(e.height-d)/2);break;case it:if(m.y>=0&&(h>=C||l&&(c<=x||u>=k))){y=!1;break}f(it),d+=m.y,d<0&&(p=$,d=-d,s-=d),l&&(r=d*l,c+=(e.width-r)/2);break;case pt:if(l){if(m.y<=0&&(s<=g||u>=k)){y=!1;break}f($),d-=m.y,s+=m.y,r=d*l}else f($),f(K),m.x>=0?u<k?r+=m.x:m.y<=0&&s<=g&&(y=!1):r+=m.x,m.y<=0?s>g&&(d-=m.y,s+=m.y):(d-=m.y,s+=m.y);r<0&&d<0?(p=lt,d=-d,r=-r,s-=d,c-=r):r<0?(p=st,r=-r,c-=r):d<0&&(p=rt,d=-d,s-=d);break;case st:if(l){if(m.y<=0&&(s<=g||c<=x)){y=!1;break}f($),d-=m.y,s+=m.y,r=d*l,c+=e.width-r}else f($),f(J),m.x<=0?c>x?(r-=m.x,c+=m.x):m.y<=0&&s<=g&&(y=!1):(r-=m.x,c+=m.x),m.y<=0?s>g&&(d-=m.y,s+=m.y):(d-=m.y,s+=m.y);r<0&&d<0?(p=rt,d=-d,r=-r,s-=d,c-=r):r<0?(p=pt,r=-r,c-=r):d<0&&(p=lt,d=-d,s-=d);break;case lt:if(l){if(m.x<=0&&(c<=x||h>=C)){y=!1;break}f(J),r-=m.x,c+=m.x,d=r/l}else f(it),f(J),m.x<=0?c>x?(r-=m.x,c+=m.x):m.y>=0&&h>=C&&(y=!1):(r-=m.x,c+=m.x),m.y>=0?h<C&&(d+=m.y):d+=m.y;r<0&&d<0?(p=pt,d=-d,r=-r,s-=d,c-=r):r<0?(p=rt,r=-r,c-=r):d<0&&(p=st,d=-d,s-=d);break;case rt:if(l){if(m.x>=0&&(u>=k||h>=C)){y=!1;break}f(K),r+=m.x,d=r/l}else f(it),f(K),m.x>=0?u<k?r+=m.x:m.y>=0&&h>=C&&(y=!1):r+=m.x,m.y>=0?h<C&&(d+=m.y):d+=m.y;r<0&&d<0?(p=st,d=-d,r=-r,s-=d,c-=r):r<0?(p=lt,r=-r,c-=r):d<0&&(p=pt,d=-d,s-=d);break;case fi:this.move(m.x,m.y),y=!1;break;case gi:this.zoom(wa(o),t),y=!1;break;case vi:if(!m.x||!m.y){y=!1;break}X=Mi(this.cropper),c=O.startX-X.left,s=O.startY-X.top,r=e.minWidth,d=e.minHeight,m.x>0?p=m.y>0?rt:pt:m.x<0&&(c-=r,p=m.y>0?lt:st),m.y<0&&(s-=d),this.cropped||(S(this.cropBox,N),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}y&&(e.width=r,e.height=d,e.left=c,e.top=s,this.action=p,this.renderCropBox()),z(o,function(j){j.startX=j.endX,j.startY=j.endY})}},Ra={crop:function(){return this.ready&&!this.cropped&&!this.disabled&&(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&M(this.dragBox,ft),S(this.cropBox,N),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(),S(this.dragBox,ft),M(this.cropBox,N)),this},replace:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return!this.disabled&&t&&(this.isImg&&(this.element.src=t),a?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,z(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,S(this.cropper,Qt)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,M(this.cropper,Qt)),this},destroy:function(){var t=this.element;return t[b]?(t[b]=void 0,this.isImg&&this.replaced&&(t.src=this.originalUrl),this.uncreate(),this):this},move:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=i.left,e=i.top;return this.moveTo(jt(t)?t:n+Number(t),jt(a)?a:e+Number(a))},moveTo:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.canvasData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.movable&&(v(t)&&(i.left=t,n=!0),v(a)&&(i.top=a,n=!0),n&&this.renderCanvas(!0)),this},zoom:function(t,a){var i=this.canvasData;return t=Number(t),t<0?t=1/(1-t):t=1+t,this.zoomTo(i.width*t/i.naturalWidth,null,a)},zoomTo:function(t,a,i){var n=this.options,e=this.canvasData,o=e.width,p=e.height,l=e.naturalWidth,c=e.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&n.zoomable){var s=l*t,r=c*t;if(ot(this.element,Nt,{ratio:t,oldRatio:o/l,originalEvent:i})===!1)return this;if(i){var d=this.pointers,u=Mi(this.cropper),h=d&&Object.keys(d).length?ya(d):{pageX:i.pageX,pageY:i.pageY};e.left-=(s-o)*((h.pageX-u.left-e.left)/o),e.top-=(r-p)*((h.pageY-u.top-e.top)/p)}else at(a)&&v(a.x)&&v(a.y)?(e.left-=(s-o)*((a.x-e.left)/o),e.top-=(r-p)*((a.y-e.top)/p)):(e.left-=(s-o)/2,e.top-=(r-p)/2);e.width=s,e.height=r,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),v(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var a=this.imageData.scaleY;return this.scale(t,v(a)?a:1)},scaleY:function(t){var a=this.imageData.scaleX;return this.scale(v(a)?a:1,t)},scale:function(t){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:t,i=this.imageData,n=!1;return t=Number(t),a=Number(a),this.ready&&!this.disabled&&this.options.scalable&&(v(t)&&(i.scaleX=t,n=!0),v(a)&&(i.scaleY=a,n=!0),n&&this.renderCanvas(!0,!0)),this},getData:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,a=this.options,i=this.imageData,n=this.canvasData,e=this.cropBoxData,o;if(this.ready&&this.cropped){o={x:e.left-n.left,y:e.top-n.top,width:e.width,height:e.height};var p=i.width/i.naturalWidth;if(z(o,function(s,r){o[r]=s/p}),t){var l=Math.round(o.y+o.height),c=Math.round(o.x+o.width);o.x=Math.round(o.x),o.y=Math.round(o.y),o.width=c-o.x,o.height=l-o.y}}else o={x:0,y:0,width:0,height:0};return a.rotatable&&(o.rotate=i.rotate||0),a.scalable&&(o.scaleX=i.scaleX||1,o.scaleY=i.scaleY||1),o},setData:function(t){var a=this.options,i=this.imageData,n=this.canvasData,e={};if(this.ready&&!this.disabled&&at(t)){var o=!1;a.rotatable&&v(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,o=!0),a.scalable&&(v(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,o=!0),v(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,o=!0)),o&&this.renderCanvas(!0,!0);var p=i.width/i.naturalWidth;v(t.x)&&(e.left=t.x*p+n.left),v(t.y)&&(e.top=t.y*p+n.top),v(t.width)&&(e.width=t.width*p),v(t.height)&&(e.height=t.height*p),this.setCropBoxData(e)}return this},getContainerData:function(){return this.ready?w({},this.containerData):{}},getImageData:function(){return this.sized?w({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,a={};return this.ready&&z(["left","top","width","height","naturalWidth","naturalHeight"],function(i){a[i]=t[i]}),a},setCanvasData:function(t){var a=this.canvasData,i=a.aspectRatio;return this.ready&&!this.disabled&&at(t)&&(v(t.left)&&(a.left=t.left),v(t.top)&&(a.top=t.top),v(t.width)?(a.width=t.width,a.height=t.width/i):v(t.height)&&(a.height=t.height,a.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t=this.cropBoxData,a;return this.ready&&this.cropped&&(a={left:t.left,top:t.top,width:t.width,height:t.height}),a||{}},setCropBoxData:function(t){var a=this.cropBoxData,i=this.options.aspectRatio,n,e;return this.ready&&this.cropped&&!this.disabled&&at(t)&&(v(t.left)&&(a.left=t.left),v(t.top)&&(a.top=t.top),v(t.width)&&t.width!==a.width&&(n=!0,a.width=t.width),v(t.height)&&t.height!==a.height&&(e=!0,a.height=t.height),i&&(n?a.height=a.width/i:e&&(a.width=a.height*i)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var a=this.canvasData,i=ja(this.image,this.imageData,a,t);if(!this.cropped)return i;var n=this.getData(t.rounded),e=n.x,o=n.y,p=n.width,l=n.height,c=i.width/Math.floor(a.naturalWidth);c!==1&&(e*=c,o*=c,p*=c,l*=c);var s=p/l,r=F({aspectRatio:s,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=F({aspectRatio:s,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=F({aspectRatio:s,width:t.width||(c!==1?i.width:p),height:t.height||(c!==1?i.height:l)}),h=u.width,x=u.height;h=Math.min(r.width,Math.max(d.width,h)),x=Math.min(r.height,Math.max(d.height,x));var g=document.createElement("canvas"),k=g.getContext("2d");g.width=nt(h),g.height=nt(x),k.fillStyle=t.fillColor||"transparent",k.fillRect(0,0,h,x);var C=t.imageSmoothingEnabled,y=C===void 0?!0:C,X=t.imageSmoothingQuality;k.imageSmoothingEnabled=y,X&&(k.imageSmoothingQuality=X);var O=i.width,m=i.height,f=e,j=o,H,I,Q,G,Y,U;f<=-p||f>O?(f=0,H=0,Q=0,Y=0):f<=0?(Q=-f,f=0,H=Math.min(O,p+f),Y=H):f<=O&&(Q=0,H=Math.min(p,O-f),Y=H),H<=0||j<=-l||j>m?(j=0,I=0,G=0,U=0):j<=0?(G=-j,j=0,I=Math.min(m,l+j),U=I):j<=m&&(G=0,I=Math.min(l,m-j),U=I);var Z=[f,j,H,I];if(Y>0&&U>0){var D=h/p;Z.push(Q*D,G*D,Y*D,U*D)}return k.drawImage.apply(k,[i].concat(hi(Z.map(function(ht){return Math.floor(nt(ht))})))),g},setAspectRatio:function(t){var a=this.options;return!this.disabled&&!jt(t)&&(a.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var a=this.options,i=this.dragBox,n=this.face;if(this.ready&&!this.disabled){var e=t===St,o=a.movable&&t===xi;t=e||o?t:bi,a.dragMode=t,mt(i,dt,t),et(i,Dt,e),et(i,Bt,o),a.cropBoxMovable||(mt(n,dt,t),et(n,Dt,e),et(n,Bt,o))}return this}},qa=_.Cropper,Di=function(){function t(a){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(Fi(this,t),!a||!la.test(a.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=a,this.options=w({},oi,at(i)&&i),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()}return Qi(t,[{key:"init",value:function(){var a=this.element,i=a.tagName.toLowerCase(),n;if(!a[b]){if(a[b]=this,i==="img"){if(this.isImg=!0,n=a.getAttribute("src")||"",this.originalUrl=n,!n)return;n=a.src}else i==="canvas"&&window.HTMLCanvasElement&&(n=a.toDataURL());this.load(n)}}},{key:"load",value:function(a){var i=this;if(a){this.url=a,this.imageData={};var n=this.element,e=this.options;if(!e.rotatable&&!e.scalable&&(e.checkOrientation=!1),!e.checkOrientation||!window.ArrayBuffer){this.clone();return}if(sa.test(a)){ra.test(a)?this.read(Ca(a)):this.clone();return}var o=new XMLHttpRequest,p=this.clone.bind(this);this.reloading=!0,this.xhr=o,o.onabort=p,o.onerror=p,o.ontimeout=p,o.onprogress=function(){o.getResponseHeader("content-type")!==ni&&o.abort()},o.onload=function(){i.read(o.response)},o.onloadend=function(){i.reloading=!1,i.xhr=null},e.checkCrossOrigin&&si(a)&&n.crossOrigin&&(a=ri(a)),o.open("GET",a,!0),o.responseType="arraybuffer",o.withCredentials=n.crossOrigin==="use-credentials",o.send()}}},{key:"read",value:function(a){var i=this.options,n=this.imageData,e=Ba(a),o=0,p=1,l=1;if(e>1){this.url=Da(a,ni);var c=Aa(e);o=c.rotate,p=c.scaleX,l=c.scaleY}i.rotatable&&(n.rotate=o),i.scalable&&(n.scaleX=p,n.scaleY=l),this.clone()}},{key:"clone",value:function(){var a=this.element,i=this.url,n=a.crossOrigin,e=i;this.options.checkCrossOrigin&&si(i)&&(n||(n="anonymous"),e=ri(i)),this.crossOrigin=n,this.crossOriginUrl=e;var o=document.createElement("img");n&&(o.crossOrigin=n),o.src=e||i,o.alt=a.alt||"The image to crop",this.image=o,o.onload=this.start.bind(this),o.onerror=this.stop.bind(this),M(o,Gt),a.parentNode.insertBefore(o,a.nextSibling)}},{key:"start",value:function(){var a=this,i=this.image;i.onload=null,i.onerror=null,this.sizing=!0;var n=_.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(_.navigator.userAgent),e=function(l,c){w(a.imageData,{naturalWidth:l,naturalHeight:c,aspectRatio:l/c}),a.initialImageData=w({},a.imageData),a.sizing=!1,a.sized=!0,a.build()};if(i.naturalWidth&&!n){e(i.naturalWidth,i.naturalHeight);return}var o=document.createElement("img"),p=document.body||document.documentElement;this.sizingImage=o,o.onload=function(){e(o.width,o.height),n||p.removeChild(o)},o.src=i.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;",p.appendChild(o))}},{key:"stop",value:function(){var a=this.image;a.onload=null,a.onerror=null,a.parentNode.removeChild(a),this.image=null}},{key:"build",value:function(){if(!(!this.sized||this.ready)){var a=this.element,i=this.options,n=this.image,e=a.parentNode,o=document.createElement("div");o.innerHTML=ca;var p=o.querySelector(".".concat(b,"-container")),l=p.querySelector(".".concat(b,"-canvas")),c=p.querySelector(".".concat(b,"-drag-box")),s=p.querySelector(".".concat(b,"-crop-box")),r=s.querySelector(".".concat(b,"-face"));this.container=e,this.cropper=p,this.canvas=l,this.dragBox=c,this.cropBox=s,this.viewBox=p.querySelector(".".concat(b,"-view-box")),this.face=r,l.appendChild(n),M(a,N),e.insertBefore(p,a.nextSibling),S(n,Gt),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,M(s,N),i.guides||M(s.getElementsByClassName("".concat(b,"-dashed")),N),i.center||M(s.getElementsByClassName("".concat(b,"-center")),N),i.background&&M(p,"".concat(b,"-bg")),i.highlight||M(r,aa),i.cropBoxMovable&&(M(r,Bt),mt(r,dt,Ht)),i.cropBoxResizable||(M(s.getElementsByClassName("".concat(b,"-line")),N),M(s.getElementsByClassName("".concat(b,"-point")),N)),this.render(),this.ready=!0,this.setDragMode(i.dragMode),i.autoCrop&&this.crop(),this.setData(i.data),T(i.ready)&&L(a,ii,i.ready,{once:!0}),ot(a,ii)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var a=this.cropper.parentNode;a&&a.removeChild(this.cropper),S(this.element,N)}}},{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()}}],[{key:"noConflict",value:function(){return window.Cropper=qa,t}},{key:"setDefaults",value:function(a){w(oi,at(a)&&a)}}]),t}();w(Di.prototype,Ea,Oa,Ta,Na,La,Ra);function Wa(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function xt(){this._types=Object.create(null),this._extensions=Object.create(null);for(let t=0;t<arguments.length;t++)this.define(arguments[t]);this.define=this.define.bind(this),this.getType=this.getType.bind(this),this.getExtension=this.getExtension.bind(this)}xt.prototype.define=function(t,a){for(let i in t){let n=t[i].map(function(e){return e.toLowerCase()});i=i.toLowerCase();for(let e=0;e<n.length;e++){const o=n[e];if(o[0]!=="*"){if(!a&&o in this._types)throw new Error('Attempt to change mapping for "'+o+'" extension from "'+this._types[o]+'" to "'+i+'". Pass `force=true` to allow this, otherwise remove "'+o+'" from the list of extensions for "'+i+'".');this._types[o]=i}}if(a||!this._extensions[i]){const e=n[0];this._extensions[i]=e[0]!=="*"?e:e.substr(1)}}};xt.prototype.getType=function(t){t=String(t);let a=t.replace(/^.*[/\\]/,"").toLowerCase(),i=a.replace(/^.*\./,"").toLowerCase(),n=a.length<t.length;return(i.length<a.length-1||!n)&&this._types[i]||null};xt.prototype.getExtension=function(t){return t=/^\s*([^;\s]*)/.test(t)&&RegExp.$1,t&&this._extensions[t.toLowerCase()]||null};var Ha=xt,Sa={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomdeleted+xml":["atomdeleted"],"application/atomsvc+xml":["atomsvc"],"application/atsc-dwd+xml":["dwd"],"application/atsc-held+xml":["held"],"application/atsc-rsat+xml":["rsat"],"application/bdoc":["bdoc"],"application/calendar+xml":["xcs"],"application/ccxml+xml":["ccxml"],"application/cdfx+xml":["cdfx"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["es","ecma"],"application/emma+xml":["emma"],"application/emotionml+xml":["emotionml"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/express":["exp"],"application/fdt+xml":["fdt"],"application/font-tdpfr":["pfr"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hjson":["hjson"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/its+xml":["its"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lgr+xml":["lgr"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mmt-aei+xml":["maei"],"application/mmt-usd+xml":["musd"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/n-quads":["nq"],"application/n-triples":["nt"],"application/node":["cjs"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/p2p-overlay+xml":["relo"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/provenance+xml":["provx"],"application/pskc+xml":["pskcxml"],"application/raml+yaml":["raml"],"application/rdf+xml":["rdf","owl"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/route-apd+xml":["rapd"],"application/route-s-tsid+xml":["sls"],"application/route-usd+xml":["rusd"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/senml+xml":["senmlx"],"application/sensml+xml":["sensmlx"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/sieve":["siv","sieve"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/swid+xml":["swidtag"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/toml":["toml"],"application/trig":["trig"],"application/ttml+xml":["ttml"],"application/ubjson":["ubj"],"application/urc-ressheet+xml":["rsheet"],"application/urc-targetdesc+xml":["td"],"application/voicexml+xml":["vxml"],"application/wasm":["wasm"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-att+xml":["xav"],"application/xcap-caps+xml":["xca"],"application/xcap-diff+xml":["xdf"],"application/xcap-el+xml":["xel"],"application/xcap-ns+xml":["xns"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xliff+xml":["xlf"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["*xsl","xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":["*3gpp"],"audio/adpcm":["adp"],"audio/amr":["amr"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mobile-xmf":["mxmf"],"audio/mp3":["*mp3"],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx","opus"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":["*wav"],"audio/webm":["weba"],"audio/xm":["xm"],"font/collection":["ttc"],"font/otf":["otf"],"font/ttf":["ttf"],"font/woff":["woff"],"font/woff2":["woff2"],"image/aces":["exr"],"image/apng":["apng"],"image/avif":["avif"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/dicom-rle":["drle"],"image/emf":["emf"],"image/fits":["fits"],"image/g3fax":["g3"],"image/gif":["gif"],"image/heic":["heic"],"image/heic-sequence":["heics"],"image/heif":["heif"],"image/heif-sequence":["heifs"],"image/hej2k":["hej2"],"image/hsj2":["hsj2"],"image/ief":["ief"],"image/jls":["jls"],"image/jp2":["jp2","jpg2"],"image/jpeg":["jpeg","jpg","jpe"],"image/jph":["jph"],"image/jphc":["jhc"],"image/jpm":["jpm"],"image/jpx":["jpx","jpf"],"image/jxr":["jxr"],"image/jxra":["jxra"],"image/jxrs":["jxrs"],"image/jxs":["jxs"],"image/jxsc":["jxsc"],"image/jxsi":["jxsi"],"image/jxss":["jxss"],"image/ktx":["ktx"],"image/ktx2":["ktx2"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/t38":["t38"],"image/tiff":["tif","tiff"],"image/tiff-fx":["tfx"],"image/webp":["webp"],"image/wmf":["wmf"],"message/disposition-notification":["disposition-notification"],"message/global":["u8msg"],"message/global-delivery-status":["u8dsn"],"message/global-disposition-notification":["u8mdn"],"message/global-headers":["u8hdr"],"message/rfc822":["eml","mime"],"model/3mf":["3mf"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/mtl":["mtl"],"model/obj":["obj"],"model/step+xml":["stpx"],"model/step+zip":["stpz"],"model/step-xml+zip":["stpxz"],"model/stl":["stl"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["*x3db","x3dbz"],"model/x3d+fastinfoset":["x3db"],"model/x3d+vrml":["*x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"model/x3d-vrml":["x3dv"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/mdx":["mdx"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":["*rtf"],"text/sgml":["sgml","sgm"],"text/shex":["shex"],"text/slim":["slim","slm"],"text/spdx":["spdx"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":["*xml"],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/iso.segment":["m4s"],"video/jpeg":["jpgv"],"video/jpm":["*jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]},_a={"application/prs.cww":["cww"],"application/vnd.1000minds.decision-model+xml":["1km"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.keynote":["key"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.numbers":["numbers"],"application/vnd.apple.pages":["pages"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.balsamiq.bmml+xml":["bmml"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.citationstyles.style+xml":["csl"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dbf":["dbf"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mapbox-vector-tile":["mvt"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["*stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.ac+xml":["*ac"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openblox.game+xml":["obgx"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openstreetmap.data+xml":["osm"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.rar":["rar"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.software602.filler.form+xml":["fo"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.syncml.dmddf+xml":["ddf"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":["*dmg"],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":["*bdoc"],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["*deb","udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":["*iso"],"application/x-iwork-keynote-sffkey":["*key"],"application/x-iwork-numbers-sffnumbers":["*numbers"],"application/x-iwork-pages-sffpages":["*pages"],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-keepass2":["kdbx"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":["*exe"],"application/x-msdownload":["*exe","*dll","com","bat","*msi"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["*wmf","*wmz","*emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":["*prc","*pdb"],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["*rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["*obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["*xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":["*m4a"],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":["*ra"],"audio/x-wav":["*wav"],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/prs.pti":["pti"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.airzip.accelerator.azv":["azv"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":["*sub"],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.microsoft.icon":["ico"],"image/vnd.ms-dds":["dds"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.pco.b16":["b16"],"image/vnd.tencent.tap":["tap"],"image/vnd.valve.source.texture":["vtf"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/vnd.zbrush.pcx":["pcx"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["*ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":["*bmp"],"image/x-pcx":["*pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"message/vnd.wfa.wsc":["wsc"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.opengex":["ogex"],"model/vnd.parasolid.transmit.binary":["x_b"],"model/vnd.parasolid.transmit.text":["x_t"],"model/vnd.sap.vds":["vds"],"model/vnd.usdz+zip":["usdz"],"model/vnd.valve.source.compiled-map":["bsp"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":["*org"],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]};let Ia=Ha;var Pa=new Ia(Sa,_a);const Xa=Wa(Pa);function Ya(t){return Object.prototype.toString.call(t).slice(8,-1).toLowerCase()}function Bi(t){return Ya(t)==="object"}const Ai=typeof window<"u";Ai&&navigator.userAgent.toLowerCase();function Ua(t){return t.startsWith("data")&&t.includes("base64")?t.split(",")[0].replace(/data:(.*);base64/,"$1"):Xa.getType(t)||""}function Ei({type:t,id:a,resource:i}){return new Promise((n,e)=>{if(!Ai||document.querySelector(a)){e();return}function o(p){p.addEventListener("load",n),p.addEventListener("error",e),p.addEventListener("abort",e)}switch(t){case"js":{const p=document.createElement("script");p.async=!0,p.src=i,o(p),document.head.appendChild(p);break}case"css":{const p=document.createElement("link");p.id=a,p.rel="stylesheet",p.href=i,o(p),document.head.appendChild(p);break}case"style":{const p=document.createElement("style");p.id=a,o(p),document.head.appendChild(p),p.appendChild(document.createTextNode(i));break}}})}function li({mode:t,dataURI:a}){return t==="round"?"image/png":Ua(a)}function ci(t){const a=document.createElement("canvas"),i=a.getContext("2d");if(!i)return a;const{width:n,height:e}=t;return a.width=n,a.height=e,i.imageSmoothingEnabled=!0,i.drawImage(t,0,0,n,e),i.globalCompositeOperation="destination-in",i.beginPath(),i.arc(n/2,e/2,Math.min(n,e)/2,0,2*Math.PI,!0),i.fill(),a}function di(t,a={}){if(!Bi(t))return a;const{mode:i,width:n,height:e}=t;switch(i){case"fixedSize":case"round":{a.width=n,a.height=e;break}}return a}const $a={img:{type:String,required:!0,default:""},boxStyle:{type:Object,required:!1,default:()=>({})},options:{type:Object,required:!1,default:()=>({})},presetMode:{type:Object,required:!1,default:()=>({})}},Va=`/*!
|
|
* Cropper.js v1.6.1
|
|
* https://fengyuanchen.github.io/cropperjs
|
|
*
|
|
* Copyright 2015-present Chen Fengyuan
|
|
* Released under the MIT license
|
|
*
|
|
* Date: 2023-09-17T03:44:17.565Z
|
|
*/.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-wrap-box,.cropper-canvas,.cropper-drag-box,.cropper-crop-box,.cropper-modal{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-wrap-box,.cropper-canvas{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:calc(100% / 3);left:0;top:calc(100% / 3);width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:calc(100% / 3);top:0;width:calc(100% / 3)}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:before,.cropper-center:after{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width: 768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width: 992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width: 1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed}
|
|
`,Fa=`.vue--picture-cropper__wrap{width:100%;height:100%;margin:0}.vue--picture-cropper__img{display:block;width:auto;height:auto;max-width:100%;max-height:100%}.vue--picture-cropper__wrap-round .cropper-view-box,.vue--picture-cropper__wrap-round .cropper-face{border-radius:50%}
|
|
`;Ei({type:"style",id:"cropperjs",resource:Va}).catch(t=>{console.log(t)});Ei({type:"style",id:"vue-picture-cropper",resource:Fa}).catch(t=>{console.log(t)});let E;const Qa=Ri({name:"VuePictureCropper",props:$a,setup(t){const a=$t(),i=$t("");async function n(){await Hi();const s=window.setInterval(()=>{if(a.value)try{E=new Di(a.value,t.options),window.clearInterval(s),o(),i.value=li({mode:t.presetMode.mode,dataURI:t.img}),a.value.addEventListener("ready",()=>{e()})}catch(r){console.log(r)}},10)}function e(){if(!Bi(t.presetMode))return;const{mode:s,width:r,height:d}=t.presetMode;switch(s){case"fixedSize":case"round":{E.setCropBoxData({width:r,height:d});break}}}function o(){E.getDataURL=p,E.getBlob=l,E.getFile=c}function p(s={}){s=di(t.presetMode,s);try{let r=E.getCroppedCanvas(s);return t.presetMode.mode==="round"&&(r=ci(r)),r.toDataURL(i.value)}catch{return""}}async function l(s={}){return s=di(t.presetMode,s),new Promise(r=>{try{let d=E.getCroppedCanvas(s);t.presetMode.mode==="round"&&(d=ci(d)),d.toBlob(u=>{r(u)},i.value)}catch{r(null)}})}async function c(s={}){const{fileName:r}=s,d=i.value.replace(/image\//,""),u=r?`${r}.${d}`:`cropped-${Date.now()}.${d}`,h=await l(s);return h?new File([h],u,{type:i.value}):null}return qi(()=>t.img,async()=>{if(!E){await n();return}try{E.replace(t.img),i.value=li({mode:t.presetMode.mode,dataURI:t.img}),o()}catch(s){console.log(s)}},{immediate:!0}),Wi(()=>{E&&(E.destroy(),E=null)}),()=>P("div",{class:`vue--picture-cropper__wrap ${t.presetMode.mode==="round"?"vue--picture-cropper__wrap-round":""}`,style:t.boxStyle},[P("img",{ref:a,class:"vue--picture-cropper__img",src:t.img},null)])}});var Ga=Object.defineProperty,Za=Object.getOwnPropertyDescriptor,Ka=(t,a,i,n)=>{for(var e=n>1?void 0:n?Za(a,i):a,o=t.length-1,p;o>=0;o--)(p=t[o])&&(e=(n?p(a,i,e):p(e))||e);return n&&e&&Ga(a,i,e),e};let Rt=class extends _i{constructor(){super(...arguments);A(this,"$notify");A(this,"activeDeviceNumber",0);A(this,"activeDid","");A(this,"blob");A(this,"claimType","");A(this,"crop",!1);A(this,"fileName");A(this,"mirror",!1);A(this,"numDevices",0);A(this,"setImageCallback",()=>{});A(this,"showRetry",!0);A(this,"uploading",!1);A(this,"visible",!1);A(this,"URL",window.URL||window.webkitURL)}async mounted(){try{const i=await Ii();this.activeDid=i.activeDid||""}catch(i){console.error("Error retrieving settings from database:",i),this.$notify({group:"alert",type:"danger",title:"Error",text:i.message||"There was an error retrieving your settings."},-1)}}open(i,n,e,o,p){this.visible=!0,this.claimType=n,this.crop=!!e;const l=document.querySelector("#QuickNav");l&&(l.style.display="none"),this.setImageCallback=i,o?(this.blob=o,this.fileName=p,this.showRetry=!1):(this.blob=void 0,this.fileName=void 0,this.showRetry=!0)}close(){this.visible=!1;const i=document.querySelector("#QuickNav");i&&(i.style.display=""),this.blob=void 0}async cameraStarted(){const i=this.$refs.camera;if(i){this.numDevices=(await i.devices(["videoinput"])).length,this.mirror=i.facingMode==="user";const n=i.currentDeviceID(),e=await i.devices(["videoinput"]);this.activeDeviceNumber=e.findIndex(o=>o.deviceId===n)}}async switchCamera(){const i=this.$refs.camera;this.activeDeviceNumber=(this.activeDeviceNumber+1)%this.numDevices;const n=await(i==null?void 0:i.devices(["videoinput"]));await(i==null?void 0:i.changeCamera(n[this.activeDeviceNumber].deviceId))}async takeImage(){var c,s,r,d,u,h;const i=this.$refs.camera;let n=(c=i==null?void 0:i.resolution)==null?void 0:c.height,e=(s=i==null?void 0:i.resolution)==null?void 0:s.width;const o=e/n,p=window.innerWidth/window.innerHeight;o>1&&p<1?(n=(r=i==null?void 0:i.resolution)==null?void 0:r.width,e=(d=i==null?void 0:i.resolution)==null?void 0:d.height):o<1&&p>1&&(n=(u=i==null?void 0:i.resolution)==null?void 0:u.width,e=(h=i==null?void 0:i.resolution)==null?void 0:h.height);const l=e/n;if(l<p?(n=window.innerHeight/2,e=n*l):(e=window.innerWidth/2,n=e/l),this.blob=await(i==null?void 0:i.snapshot({height:n,width:e}))||void 0,this.fileName="snapshot.png",!this.blob){this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error taking the picture. Please try again."},5e3);return}}createBlobURL(i){return URL.createObjectURL(i)}async retryImage(){this.blob=void 0}async uploadImage(){this.uploading=!0,this.crop&&(this.blob=await(E==null?void 0:E.getBlob())||void 0);const n={Authorization:"Bearer "+await Vi(this.activeDid)},e=new FormData;if(!this.blob){this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error finding the picture. Please try again."},5e3),this.uploading=!1;return}e.append("image",this.blob,this.fileName||"snapshot.png"),e.append("claimType",this.claimType);try{const o=await Pi.post(Xi+"/image",e,{headers:n});this.uploading=!1,this.close(),this.setImageCallback(o.data.url)}catch(o){console.error("Error uploading the image",o),this.$notify({group:"alert",type:"danger",title:"Error",text:"There was an error saving the picture."},5e3),this.uploading=!1,this.blob=void 0}}swapMirrorClass(){this.mirror=!this.mirror,this.mirror?this.$refs.cameraContainer.classList.add("mirror-video"):this.$refs.cameraContainer.classList.remove("mirror-video")}};Rt=Ka([Si({components:{Camera:Yi,VuePictureCropper:Qa}})],Rt);const Ja={key:0,class:"dialog-overlay z-[60]"},te={class:"dialog relative"},ie={class:"text-lg text-center font-light relative z-50"},ae={id:"ViewHeading",class:"text-center font-bold absolute top-0 left-0 right-0 px-4 py-0.5 bg-black/50 text-white leading-none"},ee={key:0},ne={key:1},oe={key:2},pe={key:0,class:"flex justify-center"},se={key:1},re={key:0},le={key:1},ce={class:"flex justify-center"},de=["src"],me={class:"absolute bottom-[1rem] left-[1rem] px-2 py-1"},he={key:2,class:"absolute bottom-[1rem] right-[1rem] px-2 py-1"},ue={key:2,ref:"cameraContainer"},ve={class:"absolute portrait:bottom-0 portrait:left-0 portrait:right-0 portrait:pb-2 landscape:right-0 landscape:top-0 landscape:bottom-0 landscape:pr-4 flex landscape:flex-row justify-center items-center"},fe={class:"absolute portrait:bottom-2 portrait:right-16 landscape:right-0 landscape:bottom-16 landscape:pr-4 flex justify-center items-center"},ge={key:0,class:"absolute bottom-2 right-4"};function xe(t,a,i,n,e,o){const p=yt("fa"),l=yt("VuePictureCropper"),c=yt("camera");return t.visible?(R(),q("div",Ja,[B("div",te,[B("div",ie,[B("div",ae,[t.uploading?(R(),q("span",ee," Uploading... ")):t.blob?(R(),q("span",ne," Look Good? ")):(R(),q("span",oe,' Say "Cheese"! '))]),B("div",{class:"text-lg text-center px-2 py-0.5 leading-none absolute right-0 top-0 text-white",onClick:a[0]||(a[0]=s=>t.close())},[P(p,{icon:"xmark",class:"w-[1em]"})])]),t.uploading?(R(),q("div",pe,[P(p,{icon:"spinner",class:"fa-spin fa-3x text-center block px-12 py-12"})])):t.blob?(R(),q("div",se,[t.crop?(R(),q("div",re,[P(l,{boxStyle:{backgroundColor:"#f8f8f8",margin:"auto"},img:t.createBlobURL(t.blob),options:{viewMode:1,dragMode:"crop",aspectRatio:9/9},class:"max-h-[90vh] max-w-[90vw] object-contain"},null,8,["img"])])):(R(),q("div",le,[B("div",ce,[B("img",{src:t.createBlobURL(t.blob),class:"mt-2 rounded max-h-[90vh] max-w-[90vw] object-contain"},null,8,de)])])),B("div",me,[B("button",{onClick:a[1]||(a[1]=(...s)=>t.uploadImage&&t.uploadImage(...s)),class:"bg-gradient-to-b from-blue-400 to-blue-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white py-1 px-2 rounded-md"},a[7]||(a[7]=[B("span",null,"Upload",-1)]))]),t.showRetry?(R(),q("div",he,[B("button",{onClick:a[2]||(a[2]=(...s)=>t.retryImage&&t.retryImage(...s)),class:"bg-gradient-to-b from-slate-400 to-slate-700 shadow-[inset_0_-1px_0_0_rgba(0,0,0,0.5)] text-white py-1 px-2 rounded-md"},a[8]||(a[8]=[B("span",null,"Retry",-1)]))])):kt("",!0)])):(R(),q("div",ue,[P(c,{facingMode:"environment",autoplay:"",ref:"camera",onStarted:a[6]||(a[6]=s=>t.cameraStarted())},{default:$i(()=>[B("div",ve,[B("button",{onClick:a[3]||(a[3]=s=>t.takeImage()),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold p-3 rounded-full text-2xl leading-none"},[P(p,{icon:"camera",class:"w-[1em]"})])]),B("div",fe,[B("button",{onClick:a[4]||(a[4]=s=>t.swapMirrorClass()),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold p-3 rounded-full text-2xl leading-none"},[P(p,{icon:"left-right",class:"w-[1em]"})])]),t.numDevices>1?(R(),q("div",ge,[B("button",{onClick:a[5]||(a[5]=s=>t.switchCamera()),class:"bg-blue-500 hover:bg-blue-700 text-white font-bold p-3 rounded-full text-2xl leading-none"},[P(p,{icon:"rotate",class:"w-[1em]"})])])):kt("",!0)]),_:1},512)],512))])])):kt("",!0)}const je=Ui(Rt,[["render",xe]]);export{je as P};
|
|
|