chunk-9049acdc.7b046abc.js 64 KB

1234567891011
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-9049acdc"],{"00ee":function(t,e,i){var o=i("b622"),n=o("toStringTag"),a={};a[n]="z",t.exports="[object z]"===String(a)},"0366":function(t,e,i){var o=i("1c0b");t.exports=function(t,e,i){if(o(t),void 0===e)return t;switch(i){case 0:return function(){return t.call(e)};case 1:return function(i){return t.call(e,i)};case 2:return function(i,o){return t.call(e,i,o)};case 3:return function(i,o,n){return t.call(e,i,o,n)}}return function(){return t.apply(e,arguments)}}},"0cfb":function(t,e,i){var o=i("83abf"),n=i("d039"),a=i("cc12");t.exports=!o&&!n((function(){return 7!=Object.defineProperty(a("div"),"a",{get:function(){return 7}}).a}))},"182d":function(t,e,i){var o=i("f8cd");t.exports=function(t,e){var i=o(t);if(i%e)throw RangeError("Wrong offset");return i}},"1c0b":function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},"1d80":function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},"2d00":function(t,e,i){var o,n,a=i("da84"),r=i("342f"),s=a.process,c=s&&s.versions,h=c&&c.v8;h?(o=h.split("."),n=o[0]<4?1:o[0]+o[1]):r&&(o=r.match(/Edge\/(\d+)/),(!o||o[1]>=74)&&(o=r.match(/Chrome\/(\d+)/),o&&(n=o[1]))),t.exports=n&&+n},"342f":function(t,e,i){var o=i("d066");t.exports=o("navigator","userAgent")||""},"3bbe":function(t,e,i){var o=i("861d");t.exports=function(t){if(!o(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},"3c5d":function(t,e,i){"use strict";var o=i("ebb5"),n=i("50c4"),a=i("182d"),r=i("7b0b"),s=i("d039"),c=o.aTypedArray,h=o.exportTypedArrayMethod,l=s((function(){new Int8Array(1).set({})}));h("set",(function(t){c(this);var e=a(arguments.length>1?arguments[1]:void 0,1),i=this.length,o=r(t),s=n(o.length),h=0;if(s+e>i)throw RangeError("Wrong length");while(h<s)this[e+h]=o[h++]}),l)},"428f":function(t,e,i){var o=i("da84");t.exports=o},"44ad":function(t,e,i){var o=i("d039"),n=i("c6b6"),a="".split;t.exports=o((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==n(t)?a.call(t,""):Object(t)}:Object},4930:function(t,e,i){var o=i("2d00"),n=i("d039");t.exports=!!Object.getOwnPropertySymbols&&!n((function(){var t=Symbol();return!String(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&o&&o<41}))},"50c4":function(t,e,i){var o=i("a691"),n=Math.min;t.exports=function(t){return t>0?n(o(t),9007199254740991):0}},5135:function(t,e,i){var o=i("7b0b"),n={}.hasOwnProperty;t.exports=Object.hasOwn||function(t,e){return n.call(o(t),e)}},5692:function(t,e,i){var o=i("c430"),n=i("c6cd");(t.exports=function(t,e){return n[t]||(n[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.15.2",mode:o?"pure":"global",copyright:"© 2021 Denis Pushkarev (zloirock.ru)"})},"5b11":function(t,e,i){"use strict";var o=i("7a23");function n(t,e,i,n,a,r){const s=Object(o["resolveComponent"])("ele-cropper"),c=Object(o["resolveComponent"])("a-modal"),h=Object(o["resolveComponent"])("locale-receiver");return Object(o["openBlock"])(),Object(o["createBlock"])(h,{"component-name":"ele"},{default:Object(o["withCtx"])(e=>[Object(o["createVNode"])(c,{visible:i.visible,title:i.title||e.cropper.title,width:i.width,centered:i.centered,closable:i.closable,"destroy-on-close":i.destroyOnClose,"force-render":i.forceRender,keyboard:i.keyboard,mask:i.mask,"mask-closable":i.maskClosable,"mask-style":i.maskStyle,"wrap-class-name":i.wrapClassName,"z-index":i.zIndex,"dialog-style":i.dialogStyle,"dialog-class":i.dialogClass,footer:null,"onUpdate:visible":r.updateVisible,onCancel:r.onClosed},{title:Object(o["withCtx"])(()=>[Object(o["renderSlot"])(t.$slots,"title")]),default:Object(o["withCtx"])(()=>[a.show?(Object(o["openBlock"])(),Object(o["createBlock"])(s,{key:0,src:i.src,"aspect-ratio":i.aspectRatio,"view-mode":i.viewMode,accept:i.accept,"drag-mode":i.dragMode,"initial-aspect-ratio":i.initialAspectRatio,"min-container-width":i.minContainerWidth,"min-container-height":i.minContainerHeight,"min-canvas-width":i.minCanvasWidth,"min-canvas-height":i.minCanvasHeight,"min-crop-box-width":i.minCropBoxWidth,"min-crop-box-height":i.minCropBoxHeight,"cropped-width":i.croppedWidth,"cropped-height":i.croppedHeight,"cropped-min-width":i.croppedMinWidth,"cropped-min-height":i.croppedMinHeight,"cropped-max-width":i.croppedMaxWidth,"cropped-max-height":i.croppedMaxHeight,"cropped-fill-color":i.croppedFillColor,"to-blob":i.toBlob,"image-smoothing-enabled":i.imageSmoothingEnabled,"image-smoothing-quality":i.imageSmoothingQuality,tools:i.tools,"show-preview":i.showPreview,"ok-text":i.okText,onDone:r.onDone},null,8,["src","aspect-ratio","view-mode","accept","drag-mode","initial-aspect-ratio","min-container-width","min-container-height","min-canvas-width","min-canvas-height","min-crop-box-width","min-crop-box-height","cropped-width","cropped-height","cropped-min-width","cropped-min-height","cropped-max-width","cropped-max-height","cropped-fill-color","to-blob","image-smoothing-enabled","image-smoothing-quality","tools","show-preview","ok-text","onDone"])):Object(o["createCommentVNode"])("",!0)]),_:2},1032,["visible","title","width","centered","closable","destroy-on-close","force-render","keyboard","mask","mask-closable","mask-style","wrap-class-name","z-index","dialog-style","dialog-class","onUpdate:visible","onCancel"])]),_:1})}var a=i("e5cd");const r={class:"ele-cropper"},s={class:"ele-cropper-group"},c={class:"ele-cropper-img-group"},h={key:0,class:"ele-cropper-tool"};function l(t,e,i,n,a,l){const p=Object(o["resolveComponent"])("zoom-in-outlined"),d=Object(o["resolveComponent"])("a-button"),u=Object(o["resolveComponent"])("zoom-out-outlined"),m=Object(o["resolveComponent"])("arrow-left-outlined"),f=Object(o["resolveComponent"])("arrow-right-outlined"),g=Object(o["resolveComponent"])("arrow-up-outlined"),b=Object(o["resolveComponent"])("arrow-down-outlined"),v=Object(o["resolveComponent"])("rotate-left-outlined"),y=Object(o["resolveComponent"])("rotate-right-outlined"),w=Object(o["resolveComponent"])("swap-outlined"),x=Object(o["resolveComponent"])("sync-outlined"),C=Object(o["resolveComponent"])("upload-outlined"),O=Object(o["resolveComponent"])("a-upload"),k=Object(o["resolveComponent"])("check-outlined"),j=Object(o["resolveComponent"])("a-button-group"),M=Object(o["resolveComponent"])("locale-receiver");return Object(o["openBlock"])(),Object(o["createBlock"])(M,{"component-name":"ele"},{default:Object(o["withCtx"])(t=>[Object(o["createVNode"])("div",r,[Object(o["createVNode"])("div",s,[Object(o["createVNode"])("div",c,[Object(o["createVNode"])("img",{ref:"eleCropperImg",src:a.imgSrc,style:{"max-width":"100%"},alt:""},null,8,["src"])]),i.showPreview?(Object(o["openBlock"])(),Object(o["createBlock"])("div",{key:0,ref:"eleCropperPreviews",style:l.pStyle,class:"ele-cropper-preview-group"},[Object(o["createVNode"])("div",{style:l.pItemStyle1,class:"ele-cropper-preview"},null,4),1===this.aspectRatio?(Object(o["openBlock"])(),Object(o["createBlock"])("div",{key:0,style:l.pItemStyle2,class:"ele-cropper-preview"},null,4)):Object(o["createCommentVNode"])("",!0),1!==this.aspectRatio?(Object(o["openBlock"])(),Object(o["createBlock"])("div",{key:1,style:l.pItemStyle3,class:"ele-cropper-preview"},null,4)):Object(o["createCommentVNode"])("",!0),1!==this.aspectRatio?(Object(o["openBlock"])(),Object(o["createBlock"])("div",{key:2,style:l.pItemStyle4,class:"ele-cropper-preview"},null,4)):Object(o["createCommentVNode"])("",!0)],4)):Object(o["createCommentVNode"])("",!0)]),i.tools?(Object(o["openBlock"])(),Object(o["createBlock"])("div",h,[(Object(o["openBlock"])(!0),Object(o["createBlock"])(o["Fragment"],null,Object(o["renderList"])(l.toolGroup,(e,n)=>(Object(o["openBlock"])(),Object(o["createBlock"])(j,{key:n,class:"ele-cropper-tool-item"},{default:Object(o["withCtx"])(()=>[(Object(o["openBlock"])(!0),Object(o["createBlock"])(o["Fragment"],null,Object(o["renderList"])(e,(e,n)=>(Object(o["openBlock"])(),Object(o["createBlock"])(o["Fragment"],null,["zoomIn"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(d,{key:n,onClick:l.onAction,title:t.cropper.zoomIn,"data-method":"zoom","data-option":"0.1",type:"primary",class:"ele-cropper-tool-btn"},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(p)]),_:2},1032,["onClick","title"])):"zoomOut"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(d,{key:n,onClick:l.onAction,title:t.cropper.zoomOut,"data-method":"zoom","data-option":"-0.1",type:"primary",class:"ele-cropper-tool-btn"},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(u)]),_:2},1032,["onClick","title"])):"moveL"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(d,{key:n,onClick:l.onAction,title:t.cropper.rotateLeft,"data-method":"move","data-option":"-10","data-option2":"0",type:"primary",class:"ele-cropper-tool-btn"},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(m)]),_:2},1032,["onClick","title"])):"moveR"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(d,{key:n,onClick:l.onAction,title:t.cropper.rotateRight,"data-method":"move","data-option":"10","data-option2":"0",type:"primary",class:"ele-cropper-tool-btn"},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(f)]),_:2},1032,["onClick","title"])):"moveT"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(d,{key:n,onClick:l.onAction,title:t.cropper.moveLeft,"data-method":"move","data-option":"0","data-option2":"-10",type:"primary",class:"ele-cropper-tool-btn"},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(g)]),_:2},1032,["onClick","title"])):"moveB"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(d,{key:n,onClick:l.onAction,title:t.cropper.moveRight,"data-method":"move","data-option":"0","data-option2":"10",type:"primary",class:"ele-cropper-tool-btn"},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(b)]),_:2},1032,["onClick","title"])):"rotateL"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(d,{key:n,onClick:l.onAction,title:t.cropper.moveUp,"data-method":"rotate","data-option":"-45",type:"primary",class:"ele-cropper-tool-btn"},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(v)]),_:2},1032,["onClick","title"])):"rotateR"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(d,{key:n,onClick:l.onAction,title:t.cropper.moveDown,"data-method":"rotate","data-option":"45",type:"primary",class:"ele-cropper-tool-btn"},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(y)]),_:2},1032,["onClick","title"])):"scaleX"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(d,{key:n,onClick:l.onAction,title:t.cropper.flipX,"data-method":"scaleX","data-option":"-1",type:"primary",class:"ele-cropper-tool-btn"},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(w)]),_:2},1032,["onClick","title"])):"scaleY"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(d,{key:n,onClick:l.onAction,title:t.cropper.flipY,"data-method":"scaleY","data-option":"-1",type:"primary",class:"ele-cropper-tool-btn"},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(w,{style:{transform:"rotate(90deg)"}})]),_:2},1032,["onClick","title"])):"reset"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(d,{key:n,onClick:l.onAction,title:t.cropper.reset,"data-method":"reset",type:"primary",class:"ele-cropper-tool-btn"},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(x)]),_:2},1032,["onClick","title"])):"upload"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(O,{key:n,"before-upload":l.onUpload,accept:i.accept,"show-upload-list":!1},{default:Object(o["withCtx"])(()=>[Object(o["createVNode"])(d,{title:t.cropper.upload,type:"primary",class:"ele-cropper-tool-btn",style:{"border-top-right-radius":"2px","border-bottom-right-radius":"2px"}},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(C)]),_:2},1032,["title"])]),_:2},1032,["before-upload","accept"])):"crop"===e?(Object(o["openBlock"])(),Object(o["createBlock"])(d,{key:n,onClick:l.onAction,type:"primary","data-method":"getCroppedCanvas","data-option":'{"maxWidth":4096,"maxHeight":4096}'},{icon:Object(o["withCtx"])(()=>[Object(o["createVNode"])(k)]),default:Object(o["withCtx"])(()=>[Object(o["createVNode"])("span",null,Object(o["toDisplayString"])(i.okText||t.cropper.ok),1)]),_:2},1032,["onClick"])):Object(o["createCommentVNode"])("",!0)],64))),256))]),_:2},1024))),128))])):Object(o["createCommentVNode"])("",!0)])]),_:1})}i("3c5d"),i("acef"),i("fa9e"),i("77d9");var p=i("bab4"),d=i.n(p),u=i("c124"),m=i("c4bc"),f=i("1cd4"),g=i("083e"),b=i("e180"),v=i("9af8"),y=i("1559"),w=i("0a52"),x=i("986c"),C=i("1e2c"),O=i("5f89"),k=i("434d"),j={name:"EleCropper",components:{LocaleReceiver:a["a"],ZoomInOutlined:u["a"],ZoomOutOutlined:m["a"],ArrowLeftOutlined:f["a"],ArrowRightOutlined:g["a"],ArrowUpOutlined:b["a"],ArrowDownOutlined:v["a"],RotateLeftOutlined:y["a"],RotateRightOutlined:w["a"],SwapOutlined:x["a"],SyncOutlined:C["a"],UploadOutlined:O["a"],CheckOutlined:k["a"]},props:{src:String,aspectRatio:{type:Number,default:1},viewMode:Number,dragMode:String,initialAspectRatio:Number,minContainerWidth:Number,minContainerHeight:Number,minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,croppedWidth:Number,croppedHeight:Number,croppedMinWidth:Number,croppedMinHeight:Number,croppedMaxWidth:Number,croppedMaxHeight:Number,croppedFillColor:Number,imageSmoothingEnabled:Boolean,imageSmoothingQuality:String,toBlob:Boolean,accept:{type:String,default:"image/*"},tools:{type:[Boolean,String],default:!0},showPreview:{type:Boolean,default:!0},okText:String},emits:["done"],data(){return{ins:null,imgSrc:"",imgType:"image/jpeg",previewWidth:120}},computed:{pStyle(){return`width: ${this.previewWidth+20}px;text-align: right;font-size: 0;`},pItemStyle1(){const t=this.previewWidth/(this.aspectRatio||1);return`width: ${this.previewWidth}px;height: ${t}px;`},pItemStyle2(){return this.pItemStyle1+"border-radius: 50%;margin-top: 10px;"},pItemStyle3(){const t=this.previewWidth/3*2-10,e=t/(this.aspectRatio||1);return`width: ${this.previewWidth}px;height: ${e}px;margin-top: 10px;`},pItemStyle4(){const t=this.previewWidth/3,e=t/(this.aspectRatio||1);return`width: ${this.previewWidth}px;height: ${e}px;margin: 10px 0 0 10px;`},toolGroup(){if("string"===typeof this.tools){let t=[];return this.tools.split("|").forEach(e=>{t.push(e.split(",").map(t=>t.trim()))}),t}return this.tools?[["zoomIn","zoomOut"],["moveL","moveR","moveT","moveB"],["rotateL","rotateR"],["scaleX","scaleY"],["reset","upload"],["crop"]]:[]}},mounted(){if(this.src&&0!==this.src.indexOf("data:image")&&(window.ActiveXObject||"ActiveXObject"in window)){let t=new window.XMLHttpRequest;t.open("GET",this.src,!0),t.responseType="arraybuffer",t.onload=()=>{if(-1===[200,201].indexOf(t.status))return void console.error("cropper",t);let e=new Uint8Array(t.response),i="";for(let t=0;t<e.byteLength;t++)i+=String.fromCharCode(e[t]);this.imgSrc="data:image/jpeg;base64,"+window.btoa(i),this.$nextTick(()=>{this.render()})},t.send()}else this.src?(this.imgSrc=this.src,this.$nextTick(()=>{this.render()})):this.render()},methods:{render(){this.ins&&this.ins.destroy();let t={aspectRatio:this.aspectRatio,viewMode:this.viewMode,dragMode:this.dragMode,initialAspectRatio:this.initialAspectRatio,minContainerWidth:this.minContainerWidth,minContainerHeight:this.minContainerHeight,minCanvasWidth:this.minCanvasWidth,minCanvasHeight:this.minCanvasHeight,minCropBoxWidth:this.minCropBoxWidth,minCropBoxHeight:this.minCropBoxHeight};this.showPreview&&(t.preview=this.$refs.eleCropperPreviews.children),this.ins=new d.a(this.$refs.eleCropperImg,t)},onAction(t){let e=this.getDataset(t.currentTarget,"method"),i=this.getDataset(t.currentTarget,"option"),o=this.getDataset(t.currentTarget,"option2");if(!this.ins||!e)return;let n,a=this.ins.cropped;switch(e){case"rotate":a&&this.viewMode>0&&this.in.clear();break;case"getCroppedCanvas":i=JSON.parse(i||"{}")||{},"image/jpeg"===this.imgType&&(i.fillColor="#fff"),i.width=this.croppedWidth,i.height=this.croppedHeight,i.minWidth=this.croppedMinWidth,i.minHeight=this.croppedMinHeight,i.maxWidth=this.croppedMaxWidth,i.maxHeight=this.croppedMaxHeight,i.fillColor=this.croppedFillColor,i.imageSmoothingEnabled=this.imageSmoothingEnabled,i.imageSmoothingQuality=this.imageSmoothingQuality;break}switch(n=this.ins[e](i,o),e){case"rotate":a&&this.viewMode>0&&this.ins.crop();break;case"scaleX":case"scaleY":this.setDataset(t.currentTarget,"option",-i);break;case"getCroppedCanvas":n?this.toBlob?n.toBlob(t=>{this.$emit("done",t)},this.imgType):this.$emit("done",n.toDataURL(this.imgType)):this.$message.error("裁剪失败");break}},onUpload(t){this.imgType=t.type;let e=new FileReader;return e.onload=t=>{this.ins.replace(t.target.result)},e.readAsDataURL(t),!1},getDataset(t,e){return t.dataset?t.dataset[e]:t.getAttribute("data-"+e)},setDataset(t,e,i){t.dataset?t.dataset[e]=i:t.setAttribute("data-"+e,i)}}},M=(i("699d"),i("6b0d")),B=i.n(M);const D=B()(j,[["render",l]]);var S=D;S.install=function(t){t.component(S.name,S)};var T=S,N={name:"EleCropperModal",components:{LocaleReceiver:a["a"],EleCropper:T},props:{visible:Boolean,src:String,aspectRatio:{type:Number,default:1},viewMode:Number,dragMode:String,initialAspectRatio:Number,minContainerWidth:Number,minContainerHeight:Number,minCanvasWidth:Number,minCanvasHeight:Number,minCropBoxWidth:Number,minCropBoxHeight:Number,croppedWidth:Number,croppedHeight:Number,croppedMinWidth:Number,croppedMinHeight:Number,croppedMaxWidth:Number,croppedMaxHeight:Number,croppedFillColor:Number,imageSmoothingEnabled:Boolean,imageSmoothingQuality:String,toBlob:Boolean,accept:{type:String,default:"image/*"},tools:{type:[Boolean,String],default:!0},showPreview:{type:Boolean,default:!0},okText:String,centered:Boolean,closable:{type:Boolean,default:!0},destroyOnClose:Boolean,forceRender:Boolean,keyboard:{type:Boolean,default:!0},mask:{type:Boolean,default:!0},maskClosable:{type:Boolean,default:!0},maskStyle:Object,title:String,width:{type:String,default:"680px"},wrapClassName:String,zIndex:{type:Number,default:1e3},dialogStyle:Object,dialogClass:String},emits:["done","open","closed","update:visible"],data(){return{show:!0}},mounted(){this.visible&&this.onOpen()},methods:{onDone(t){this.$emit("done",t)},updateVisible(t){this.$emit("update:visible",t)},onOpen(){this.show=!0,this.$emit("open")},onClosed(){this.destroyOnClose&&(this.show=!1),this.$emit("closed")}},watch:{visible(){this.visible?this.onOpen():this.onClosed()}}};const A=B()(N,[["render",n]]);var W=A;W.install=function(t){t.component(W.name,W)};e["a"]=W},"5c6c":function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"699d":function(t,e,i){"use strict";i("e679")},"69f3":function(t,e,i){var o,n,a,r=i("7f9a"),s=i("da84"),c=i("861d"),h=i("9112"),l=i("5135"),p=i("c6cd"),d=i("f772"),u=i("d012"),m="Object already initialized",f=s.WeakMap,g=function(t){return a(t)?n(t):o(t,{})},b=function(t){return function(e){var i;if(!c(e)||(i=n(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return i}};if(r||p.state){var v=p.state||(p.state=new f),y=v.get,w=v.has,x=v.set;o=function(t,e){if(w.call(v,t))throw new TypeError(m);return e.facade=t,x.call(v,t,e),e},n=function(t){return y.call(v,t)||{}},a=function(t){return w.call(v,t)}}else{var C=d("state");u[C]=!0,o=function(t,e){if(l(t,C))throw new TypeError(m);return e.facade=t,h(t,C,e),e},n=function(t){return l(t,C)?t[C]:{}},a=function(t){return l(t,C)}}t.exports={set:o,get:n,has:a,enforce:g,getterFor:b}},"6eeb":function(t,e,i){var o=i("da84"),n=i("9112"),a=i("5135"),r=i("ce4e"),s=i("8925"),c=i("69f3"),h=c.get,l=c.enforce,p=String(String).split("String");(t.exports=function(t,e,i,s){var c,h=!!s&&!!s.unsafe,d=!!s&&!!s.enumerable,u=!!s&&!!s.noTargetGet;"function"==typeof i&&("string"!=typeof e||a(i,"name")||n(i,"name",e),c=l(i),c.source||(c.source=p.join("string"==typeof e?e:""))),t!==o?(h?!u&&t[e]&&(d=!0):delete t[e],d?t[e]=i:n(t,e,i)):d?t[e]=i:r(e,i)})(Function.prototype,"toString",(function(){return"function"==typeof this&&h(this).source||s(this)}))},"77d9":function(t,e,i){"use strict";var o=i("ebb5"),n=i("a258").findLastIndex,a=o.aTypedArray,r=o.exportTypedArrayMethod;r("findLastIndex",(function(t){return n(a(this),t,arguments.length>1?arguments[1]:void 0)}))},"7b0b":function(t,e,i){var o=i("1d80");t.exports=function(t){return Object(o(t))}},"7f9a":function(t,e,i){var o=i("da84"),n=i("8925"),a=o.WeakMap;t.exports="function"===typeof a&&/native code/.test(n(a))},"825a":function(t,e,i){var o=i("861d");t.exports=function(t){if(!o(t))throw TypeError(String(t)+" is not an object");return t}},"83abf":function(t,e,i){var o=i("d039");t.exports=!o((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},"861d":function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},8925:function(t,e,i){var o=i("c6cd"),n=Function.toString;"function"!=typeof o.inspectSource&&(o.inspectSource=function(t){return n.call(t)}),t.exports=o.inspectSource},"90e3":function(t,e){var i=0,o=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++i+o).toString(36)}},9112:function(t,e,i){var o=i("83abf"),n=i("9bf2"),a=i("5c6c");t.exports=o?function(t,e,i){return n.f(t,e,a(1,i))}:function(t,e,i){return t[e]=i,t}},"9bf2":function(t,e,i){var o=i("83abf"),n=i("0cfb"),a=i("825a"),r=i("c04e"),s=Object.defineProperty;e.f=o?s:function(t,e,i){if(a(t),e=r(e,!0),a(i),n)try{return s(t,e,i)}catch(o){}if("get"in i||"set"in i)throw TypeError("Accessors not supported");return"value"in i&&(t[e]=i.value),t}},a258:function(t,e,i){var o=i("0366"),n=i("44ad"),a=i("7b0b"),r=i("50c4"),s=function(t){var e=6==t;return function(i,s,c){var h,l,p=a(i),d=n(p),u=o(s,c,3),m=r(d.length);while(m-- >0)if(h=d[m],l=u(h,m,p),l)switch(t){case 5:return h;case 6:return m}return e?-1:void 0}};t.exports={findLast:s(5),findLastIndex:s(6)}},a691:function(t,e){var i=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:i)(t)}},a981:function(t,e){t.exports="undefined"!==typeof ArrayBuffer&&"undefined"!==typeof DataView},acef:function(t,e,i){"use strict";var o=i("ebb5"),n=i("50c4"),a=i("a691"),r=o.aTypedArray,s=o.exportTypedArrayMethod;s("at",(function(t){var e=r(this),i=n(e.length),o=a(t),s=o>=0?o:i+o;return s<0||s>=i?void 0:e[s]}))},b622:function(t,e,i){var o=i("da84"),n=i("5692"),a=i("5135"),r=i("90e3"),s=i("4930"),c=i("fdbf"),h=n("wks"),l=o.Symbol,p=c?l:l&&l.withoutSetter||r;t.exports=function(t){return a(h,t)&&(s||"string"==typeof h[t])||(s&&a(l,t)?h[t]=l[t]:h[t]=p("Symbol."+t)),h[t]}},bab4:function(t,e,i){
  2. /*!
  3. * Cropper.js v1.5.13
  4. * https://fengyuanchen.github.io/cropperjs
  5. *
  6. * Copyright 2015-present Chen Fengyuan
  7. * Released under the MIT license
  8. *
  9. * Date: 2022-11-20T05:30:46.114Z
  10. */
  11. (function(e,i){t.exports=i()})(0,(function(){"use strict";function t(t,e){var i=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),i.push.apply(i,o)}return i}function e(e){for(var i=1;i<arguments.length;i++){var o=null!=arguments[i]?arguments[i]:{};i%2?t(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):t(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function n(t,e){for(var i=0;i<e.length;i++){var o=e[i];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(t,o.key,o)}}function a(t,e,i){return e&&n(t.prototype,e),i&&n(t,i),Object.defineProperty(t,"prototype",{writable:!1}),t}function r(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}function s(t){return c(t)||h(t)||l(t)||d()}function c(t){if(Array.isArray(t))return p(t)}function h(t){if("undefined"!==typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}function l(t,e){if(t){if("string"===typeof t)return p(t,e);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?p(t,e):void 0}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var i=0,o=new Array(e);i<e;i++)o[i]=t[i];return o}function d(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var u="undefined"!==typeof window&&"undefined"!==typeof window.document,m=u?window:{},f=!(!u||!m.document.documentElement)&&"ontouchstart"in m.document.documentElement,g=!!u&&"PointerEvent"in m,b="cropper",v="all",y="crop",w="move",x="zoom",C="e",O="w",k="s",j="n",M="ne",B="nw",D="se",S="sw",T="".concat(b,"-crop"),N="".concat(b,"-disabled"),A="".concat(b,"-hidden"),W="".concat(b,"-hide"),E="".concat(b,"-invisible"),R="".concat(b,"-modal"),H="".concat(b,"-move"),L="".concat(b,"Action"),z="".concat(b,"Preview"),I="crop",Y="move",X="none",P="crop",_="cropend",U="cropmove",V="cropstart",$="dblclick",F=f?"touchstart":"mousedown",q=f?"touchmove":"mousemove",Q=f?"touchend touchcancel":"mouseup",G=g?"pointerdown":F,Z=g?"pointermove":q,J=g?"pointerup pointercancel":Q,K="ready",tt="resize",et="wheel",it="zoom",ot="image/jpeg",nt=/^e|w|s|n|se|sw|ne|nw|all|crop|move|zoom$/,at=/^data:/,rt=/^data:image\/jpeg;base64,/,st=/^img|canvas$/i,ct=200,ht=100,lt={viewMode:0,dragMode:I,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:ct,minContainerHeight:ht,ready:null,cropstart:null,cropmove:null,cropend:null,crop:null,zoom:null},pt='<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>',dt=Number.isNaN||m.isNaN;function ut(t){return"number"===typeof t&&!dt(t)}var mt=function(t){return t>0&&t<1/0};function ft(t){return"undefined"===typeof t}function gt(t){return"object"===i(t)&&null!==t}var bt=Object.prototype.hasOwnProperty;function vt(t){if(!gt(t))return!1;try{var e=t.constructor,i=e.prototype;return e&&i&&bt.call(i,"isPrototypeOf")}catch(o){return!1}}function yt(t){return"function"===typeof t}var wt=Array.prototype.slice;function xt(t){return Array.from?Array.from(t):wt.call(t)}function Ct(t,e){return t&&yt(e)&&(Array.isArray(t)||ut(t.length)?xt(t).forEach((function(i,o){e.call(t,i,o,t)})):gt(t)&&Object.keys(t).forEach((function(i){e.call(t,t[i],i,t)}))),t}var Ot=Object.assign||function(t){for(var e=arguments.length,i=new Array(e>1?e-1:0),o=1;o<e;o++)i[o-1]=arguments[o];return gt(t)&&i.length>0&&i.forEach((function(e){gt(e)&&Object.keys(e).forEach((function(i){t[i]=e[i]}))})),t},kt=/\.\d*(?:0|9){12}\d*$/;function jt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1e11;return kt.test(t)?Math.round(t*e)/e:t}var Mt=/^width|height|left|top|marginLeft|marginTop$/;function Bt(t,e){var i=t.style;Ct(e,(function(t,e){Mt.test(e)&&ut(t)&&(t="".concat(t,"px")),i[e]=t}))}function Dt(t,e){return t.classList?t.classList.contains(e):t.className.indexOf(e)>-1}function St(t,e){if(e)if(ut(t.length))Ct(t,(function(t){St(t,e)}));else if(t.classList)t.classList.add(e);else{var i=t.className.trim();i?i.indexOf(e)<0&&(t.className="".concat(i," ").concat(e)):t.className=e}}function Tt(t,e){e&&(ut(t.length)?Ct(t,(function(t){Tt(t,e)})):t.classList?t.classList.remove(e):t.className.indexOf(e)>=0&&(t.className=t.className.replace(e,"")))}function Nt(t,e,i){e&&(ut(t.length)?Ct(t,(function(t){Nt(t,e,i)})):i?St(t,e):Tt(t,e))}var At=/([a-z\d])([A-Z])/g;function Wt(t){return t.replace(At,"$1-$2").toLowerCase()}function Et(t,e){return gt(t[e])?t[e]:t.dataset?t.dataset[e]:t.getAttribute("data-".concat(Wt(e)))}function Rt(t,e,i){gt(i)?t[e]=i:t.dataset?t.dataset[e]=i:t.setAttribute("data-".concat(Wt(e)),i)}function Ht(t,e){if(gt(t[e]))try{delete t[e]}catch(i){t[e]=void 0}else if(t.dataset)try{delete t.dataset[e]}catch(i){t.dataset[e]=void 0}else t.removeAttribute("data-".concat(Wt(e)))}var Lt=/\s\s*/,zt=function(){var t=!1;if(u){var e=!1,i=function(){},o=Object.defineProperty({},"once",{get:function(){return t=!0,e},set:function(t){e=t}});m.addEventListener("test",i,o),m.removeEventListener("test",i,o)}return t}();function It(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Lt).forEach((function(e){if(!zt){var a=t.listeners;a&&a[e]&&a[e][i]&&(n=a[e][i],delete a[e][i],0===Object.keys(a[e]).length&&delete a[e],0===Object.keys(a).length&&delete t.listeners)}t.removeEventListener(e,n,o)}))}function Yt(t,e,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},n=i;e.trim().split(Lt).forEach((function(e){if(o.once&&!zt){var a=t.listeners,r=void 0===a?{}:a;n=function(){delete r[e][i],t.removeEventListener(e,n,o);for(var a=arguments.length,s=new Array(a),c=0;c<a;c++)s[c]=arguments[c];i.apply(t,s)},r[e]||(r[e]={}),r[e][i]&&t.removeEventListener(e,r[e][i],o),r[e][i]=n,t.listeners=r}t.addEventListener(e,n,o)}))}function Xt(t,e,i){var o;return yt(Event)&&yt(CustomEvent)?o=new CustomEvent(e,{detail:i,bubbles:!0,cancelable:!0}):(o=document.createEvent("CustomEvent"),o.initCustomEvent(e,!0,!0,i)),t.dispatchEvent(o)}function Pt(t){var e=t.getBoundingClientRect();return{left:e.left+(window.pageXOffset-document.documentElement.clientLeft),top:e.top+(window.pageYOffset-document.documentElement.clientTop)}}var _t=m.location,Ut=/^(\w+:)\/\/([^:/?#]*):?(\d*)/i;function Vt(t){var e=t.match(Ut);return null!==e&&(e[1]!==_t.protocol||e[2]!==_t.hostname||e[3]!==_t.port)}function $t(t){var e="timestamp=".concat((new Date).getTime());return t+(-1===t.indexOf("?")?"?":"&")+e}function Ft(t){var e=t.rotate,i=t.scaleX,o=t.scaleY,n=t.translateX,a=t.translateY,r=[];ut(n)&&0!==n&&r.push("translateX(".concat(n,"px)")),ut(a)&&0!==a&&r.push("translateY(".concat(a,"px)")),ut(e)&&0!==e&&r.push("rotate(".concat(e,"deg)")),ut(i)&&1!==i&&r.push("scaleX(".concat(i,")")),ut(o)&&1!==o&&r.push("scaleY(".concat(o,")"));var s=r.length?r.join(" "):"none";return{WebkitTransform:s,msTransform:s,transform:s}}function qt(t){var i=e({},t),o=0;return Ct(t,(function(t,e){delete i[e],Ct(i,(function(e){var i=Math.abs(t.startX-e.startX),n=Math.abs(t.startY-e.startY),a=Math.abs(t.endX-e.endX),r=Math.abs(t.endY-e.endY),s=Math.sqrt(i*i+n*n),c=Math.sqrt(a*a+r*r),h=(c-s)/s;Math.abs(h)>Math.abs(o)&&(o=h)}))})),o}function Qt(t,i){var o=t.pageX,n=t.pageY,a={endX:o,endY:n};return i?a:e({startX:o,startY:n},a)}function Gt(t){var e=0,i=0,o=0;return Ct(t,(function(t){var n=t.startX,a=t.startY;e+=n,i+=a,o+=1})),e/=o,i/=o,{pageX:e,pageY:i}}function Zt(t){var e=t.aspectRatio,i=t.height,o=t.width,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"contain",a=mt(o),r=mt(i);if(a&&r){var s=i*e;"contain"===n&&s>o||"cover"===n&&s<o?i=o/e:o=i*e}else a?i=o/e:r&&(o=i*e);return{width:o,height:i}}function Jt(t){var e=t.width,i=t.height,o=t.degree;if(o=Math.abs(o)%180,90===o)return{width:i,height:e};var n=o%90*Math.PI/180,a=Math.sin(n),r=Math.cos(n),s=e*r+i*a,c=e*a+i*r;return o>90?{width:c,height:s}:{width:s,height:c}}function Kt(t,e,i,o){var n=e.aspectRatio,a=e.naturalWidth,r=e.naturalHeight,c=e.rotate,h=void 0===c?0:c,l=e.scaleX,p=void 0===l?1:l,d=e.scaleY,u=void 0===d?1:d,m=i.aspectRatio,f=i.naturalWidth,g=i.naturalHeight,b=o.fillColor,v=void 0===b?"transparent":b,y=o.imageSmoothingEnabled,w=void 0===y||y,x=o.imageSmoothingQuality,C=void 0===x?"low":x,O=o.maxWidth,k=void 0===O?1/0:O,j=o.maxHeight,M=void 0===j?1/0:j,B=o.minWidth,D=void 0===B?0:B,S=o.minHeight,T=void 0===S?0:S,N=document.createElement("canvas"),A=N.getContext("2d"),W=Zt({aspectRatio:m,width:k,height:M}),E=Zt({aspectRatio:m,width:D,height:T},"cover"),R=Math.min(W.width,Math.max(E.width,f)),H=Math.min(W.height,Math.max(E.height,g)),L=Zt({aspectRatio:n,width:k,height:M}),z=Zt({aspectRatio:n,width:D,height:T},"cover"),I=Math.min(L.width,Math.max(z.width,a)),Y=Math.min(L.height,Math.max(z.height,r)),X=[-I/2,-Y/2,I,Y];return N.width=jt(R),N.height=jt(H),A.fillStyle=v,A.fillRect(0,0,R,H),A.save(),A.translate(R/2,H/2),A.rotate(h*Math.PI/180),A.scale(p,u),A.imageSmoothingEnabled=w,A.imageSmoothingQuality=C,A.drawImage.apply(A,[t].concat(s(X.map((function(t){return Math.floor(jt(t))}))))),A.restore(),N}var te=String.fromCharCode;function ee(t,e,i){var o="";i+=e;for(var n=e;n<i;n+=1)o+=te(t.getUint8(n));return o}var ie=/^data:.*,/;function oe(t){var e=t.replace(ie,""),i=atob(e),o=new ArrayBuffer(i.length),n=new Uint8Array(o);return Ct(n,(function(t,e){n[e]=i.charCodeAt(e)})),o}function ne(t,e){var i=[],o=8192,n=new Uint8Array(t);while(n.length>0)i.push(te.apply(null,xt(n.subarray(0,o)))),n=n.subarray(o);return"data:".concat(e,";base64,").concat(btoa(i.join("")))}function ae(t){var e,i=new DataView(t);try{var o,n,a;if(255===i.getUint8(0)&&216===i.getUint8(1)){var r=i.byteLength,s=2;while(s+1<r){if(255===i.getUint8(s)&&225===i.getUint8(s+1)){n=s;break}s+=1}}if(n){var c=n+4,h=n+10;if("Exif"===ee(i,c,4)){var l=i.getUint16(h);if(o=18761===l,(o||19789===l)&&42===i.getUint16(h+2,o)){var p=i.getUint32(h+4,o);p>=8&&(a=h+p)}}}if(a){var d,u,m=i.getUint16(a,o);for(u=0;u<m;u+=1)if(d=a+12*u+2,274===i.getUint16(d,o)){d+=8,e=i.getUint16(d,o),i.setUint16(d,1,o);break}}}catch(f){e=1}return e}function re(t){var e=0,i=1,o=1;switch(t){case 2:i=-1;break;case 3:e=-180;break;case 4:o=-1;break;case 5:e=90,o=-1;break;case 6:e=90;break;case 7:e=90,i=-1;break;case 8:e=-90;break}return{rotate:e,scaleX:i,scaleY:o}}var se={render:function(){this.initContainer(),this.initCanvas(),this.initCropBox(),this.renderCanvas(),this.cropped&&this.renderCropBox()},initContainer:function(){var t=this.element,e=this.options,i=this.container,o=this.cropper,n=Number(e.minContainerWidth),a=Number(e.minContainerHeight);St(o,A),Tt(t,A);var r={width:Math.max(i.offsetWidth,n>=0?n:ct),height:Math.max(i.offsetHeight,a>=0?a:ht)};this.containerData=r,Bt(o,{width:r.width,height:r.height}),St(t,A),Tt(o,A)},initCanvas:function(){var t=this.containerData,e=this.imageData,i=this.options.viewMode,o=Math.abs(e.rotate)%180===90,n=o?e.naturalHeight:e.naturalWidth,a=o?e.naturalWidth:e.naturalHeight,r=n/a,s=t.width,c=t.height;t.height*r>t.width?3===i?s=t.height*r:c=t.width/r:3===i?c=t.width/r:s=t.height*r;var h={aspectRatio:r,naturalWidth:n,naturalHeight:a,width:s,height:c};this.canvasData=h,this.limited=1===i||2===i,this.limitCanvas(!0,!0),h.width=Math.min(Math.max(h.width,h.minWidth),h.maxWidth),h.height=Math.min(Math.max(h.height,h.minHeight),h.maxHeight),h.left=(t.width-h.width)/2,h.top=(t.height-h.height)/2,h.oldLeft=h.left,h.oldTop=h.top,this.initialCanvasData=Ot({},h)},limitCanvas:function(t,e){var i=this.options,o=this.containerData,n=this.canvasData,a=this.cropBoxData,r=i.viewMode,s=n.aspectRatio,c=this.cropped&&a;if(t){var h=Number(i.minCanvasWidth)||0,l=Number(i.minCanvasHeight)||0;r>1?(h=Math.max(h,o.width),l=Math.max(l,o.height),3===r&&(l*s>h?h=l*s:l=h/s)):r>0&&(h?h=Math.max(h,c?a.width:0):l?l=Math.max(l,c?a.height:0):c&&(h=a.width,l=a.height,l*s>h?h=l*s:l=h/s));var p=Zt({aspectRatio:s,width:h,height:l});h=p.width,l=p.height,n.minWidth=h,n.minHeight=l,n.maxWidth=1/0,n.maxHeight=1/0}if(e)if(r>(c?0:1)){var d=o.width-n.width,u=o.height-n.height;n.minLeft=Math.min(0,d),n.minTop=Math.min(0,u),n.maxLeft=Math.max(0,d),n.maxTop=Math.max(0,u),c&&this.limited&&(n.minLeft=Math.min(a.left,a.left+(a.width-n.width)),n.minTop=Math.min(a.top,a.top+(a.height-n.height)),n.maxLeft=a.left,n.maxTop=a.top,2===r&&(n.width>=o.width&&(n.minLeft=Math.min(0,d),n.maxLeft=Math.max(0,d)),n.height>=o.height&&(n.minTop=Math.min(0,u),n.maxTop=Math.max(0,u))))}else n.minLeft=-n.width,n.minTop=-n.height,n.maxLeft=o.width,n.maxTop=o.height},renderCanvas:function(t,e){var i=this.canvasData,o=this.imageData;if(e){var n=Jt({width:o.naturalWidth*Math.abs(o.scaleX||1),height:o.naturalHeight*Math.abs(o.scaleY||1),degree:o.rotate||0}),a=n.width,r=n.height,s=i.width*(a/i.naturalWidth),c=i.height*(r/i.naturalHeight);i.left-=(s-i.width)/2,i.top-=(c-i.height)/2,i.width=s,i.height=c,i.aspectRatio=a/r,i.naturalWidth=a,i.naturalHeight=r,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,Bt(this.canvas,Ot({width:i.width,height:i.height},Ft({translateX:i.left,translateY:i.top}))),this.renderImage(t),this.cropped&&this.limited&&this.limitCropBox(!0,!0)},renderImage:function(t){var e=this.canvasData,i=this.imageData,o=i.naturalWidth*(e.width/e.naturalWidth),n=i.naturalHeight*(e.height/e.naturalHeight);Ot(i,{width:o,height:n,left:(e.width-o)/2,top:(e.height-n)/2}),Bt(this.image,Ot({width:i.width,height:i.height},Ft(Ot({translateX:i.left,translateY:i.top},i)))),t&&this.output()},initCropBox:function(){var t=this.options,e=this.canvasData,i=t.aspectRatio||t.initialAspectRatio,o=Number(t.autoCropArea)||.8,n={width:e.width,height:e.height};i&&(e.height*i>e.width?n.height=n.width/i:n.width=n.height*i),this.cropBoxData=n,this.limitCropBox(!0,!0),n.width=Math.min(Math.max(n.width,n.minWidth),n.maxWidth),n.height=Math.min(Math.max(n.height,n.minHeight),n.maxHeight),n.width=Math.max(n.minWidth,n.width*o),n.height=Math.max(n.minHeight,n.height*o),n.left=e.left+(e.width-n.width)/2,n.top=e.top+(e.height-n.height)/2,n.oldLeft=n.left,n.oldTop=n.top,this.initialCropBoxData=Ot({},n)},limitCropBox:function(t,e){var i=this.options,o=this.containerData,n=this.canvasData,a=this.cropBoxData,r=this.limited,s=i.aspectRatio;if(t){var c=Number(i.minCropBoxWidth)||0,h=Number(i.minCropBoxHeight)||0,l=r?Math.min(o.width,n.width,n.width+n.left,o.width-n.left):o.width,p=r?Math.min(o.height,n.height,n.height+n.top,o.height-n.top):o.height;c=Math.min(c,o.width),h=Math.min(h,o.height),s&&(c&&h?h*s>c?h=c/s:c=h*s:c?h=c/s:h&&(c=h*s),p*s>l?p=l/s:l=p*s),a.minWidth=Math.min(c,l),a.minHeight=Math.min(h,p),a.maxWidth=l,a.maxHeight=p}e&&(r?(a.minLeft=Math.max(0,n.left),a.minTop=Math.max(0,n.top),a.maxLeft=Math.min(o.width,n.left+n.width)-a.width,a.maxTop=Math.min(o.height,n.top+n.height)-a.height):(a.minLeft=0,a.minTop=0,a.maxLeft=o.width-a.width,a.maxTop=o.height-a.height))},renderCropBox:function(){var t=this.options,e=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&&Rt(this.face,L,i.width>=e.width&&i.height>=e.height?w:v),Bt(this.cropBox,Ot({width:i.width,height:i.height},Ft({translateX:i.left,translateY:i.top}))),this.cropped&&this.limited&&this.limitCanvas(!0,!0),this.disabled||this.output()},output:function(){this.preview(),Xt(this.element,P,this.getData())}},ce={initPreview:function(){var t=this.element,e=this.crossOrigin,i=this.options.preview,o=e?this.crossOriginUrl:this.url,n=t.alt||"The image to preview",a=document.createElement("img");if(e&&(a.crossOrigin=e),a.src=o,a.alt=n,this.viewBox.appendChild(a),this.viewBoxImage=a,i){var r=i;"string"===typeof i?r=t.ownerDocument.querySelectorAll(i):i.querySelector&&(r=[i]),this.previews=r,Ct(r,(function(t){var i=document.createElement("img");Rt(t,z,{width:t.offsetWidth,height:t.offsetHeight,html:t.innerHTML}),e&&(i.crossOrigin=e),i.src=o,i.alt=n,i.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;"',t.innerHTML="",t.appendChild(i)}))}},resetPreview:function(){Ct(this.previews,(function(t){var e=Et(t,z);Bt(t,{width:e.width,height:e.height}),t.innerHTML=e.html,Ht(t,z)}))},preview:function(){var t=this.imageData,e=this.canvasData,i=this.cropBoxData,o=i.width,n=i.height,a=t.width,r=t.height,s=i.left-e.left-t.left,c=i.top-e.top-t.top;this.cropped&&!this.disabled&&(Bt(this.viewBoxImage,Ot({width:a,height:r},Ft(Ot({translateX:-s,translateY:-c},t)))),Ct(this.previews,(function(e){var i=Et(e,z),h=i.width,l=i.height,p=h,d=l,u=1;o&&(u=h/o,d=n*u),n&&d>l&&(u=l/n,p=o*u,d=l),Bt(e,{width:p,height:d}),Bt(e.getElementsByTagName("img")[0],Ot({width:a*u,height:r*u},Ft(Ot({translateX:-s*u,translateY:-c*u},t))))})))}},he={bind:function(){var t=this.element,e=this.options,i=this.cropper;yt(e.cropstart)&&Yt(t,V,e.cropstart),yt(e.cropmove)&&Yt(t,U,e.cropmove),yt(e.cropend)&&Yt(t,_,e.cropend),yt(e.crop)&&Yt(t,P,e.crop),yt(e.zoom)&&Yt(t,it,e.zoom),Yt(i,G,this.onCropStart=this.cropStart.bind(this)),e.zoomable&&e.zoomOnWheel&&Yt(i,et,this.onWheel=this.wheel.bind(this),{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&Yt(i,$,this.onDblclick=this.dblclick.bind(this)),Yt(t.ownerDocument,Z,this.onCropMove=this.cropMove.bind(this)),Yt(t.ownerDocument,J,this.onCropEnd=this.cropEnd.bind(this)),e.responsive&&Yt(window,tt,this.onResize=this.resize.bind(this))},unbind:function(){var t=this.element,e=this.options,i=this.cropper;yt(e.cropstart)&&It(t,V,e.cropstart),yt(e.cropmove)&&It(t,U,e.cropmove),yt(e.cropend)&&It(t,_,e.cropend),yt(e.crop)&&It(t,P,e.crop),yt(e.zoom)&&It(t,it,e.zoom),It(i,G,this.onCropStart),e.zoomable&&e.zoomOnWheel&&It(i,et,this.onWheel,{passive:!1,capture:!0}),e.toggleDragModeOnDblclick&&It(i,$,this.onDblclick),It(t.ownerDocument,Z,this.onCropMove),It(t.ownerDocument,J,this.onCropEnd),e.responsive&&It(window,tt,this.onResize)}},le={resize:function(){if(!this.disabled){var t,e,i=this.options,o=this.container,n=this.containerData,a=o.offsetWidth/n.width,r=o.offsetHeight/n.height,s=Math.abs(a-1)>Math.abs(r-1)?a:r;if(1!==s)i.restore&&(t=this.getCanvasData(),e=this.getCropBoxData()),this.render(),i.restore&&(this.setCanvasData(Ct(t,(function(e,i){t[i]=e*s}))),this.setCropBoxData(Ct(e,(function(t,i){e[i]=t*s}))))}},dblclick:function(){this.disabled||this.options.dragMode===X||this.setDragMode(Dt(this.dragBox,T)?Y:I)},wheel:function(t){var e=this,i=Number(this.options.wheelZoomRatio)||.1,o=1;this.disabled||(t.preventDefault(),this.wheeling||(this.wheeling=!0,setTimeout((function(){e.wheeling=!1}),50),t.deltaY?o=t.deltaY>0?1:-1:t.wheelDelta?o=-t.wheelDelta/120:t.detail&&(o=t.detail>0?1:-1),this.zoom(-o*i,t)))},cropStart:function(t){var e=t.buttons,i=t.button;if(!(this.disabled||("mousedown"===t.type||"pointerdown"===t.type&&"mouse"===t.pointerType)&&(ut(e)&&1!==e||ut(i)&&0!==i||t.ctrlKey))){var o,n=this.options,a=this.pointers;t.changedTouches?Ct(t.changedTouches,(function(t){a[t.identifier]=Qt(t)})):a[t.pointerId||0]=Qt(t),o=Object.keys(a).length>1&&n.zoomable&&n.zoomOnTouch?x:Et(t.target,L),nt.test(o)&&!1!==Xt(this.element,V,{originalEvent:t,action:o})&&(t.preventDefault(),this.action=o,this.cropping=!1,o===y&&(this.cropping=!0,St(this.dragBox,R)))}},cropMove:function(t){var e=this.action;if(!this.disabled&&e){var i=this.pointers;t.preventDefault(),!1!==Xt(this.element,U,{originalEvent:t,action:e})&&(t.changedTouches?Ct(t.changedTouches,(function(t){Ot(i[t.identifier]||{},Qt(t,!0))})):Ot(i[t.pointerId||0]||{},Qt(t,!0)),this.change(t))}},cropEnd:function(t){if(!this.disabled){var e=this.action,i=this.pointers;t.changedTouches?Ct(t.changedTouches,(function(t){delete i[t.identifier]})):delete i[t.pointerId||0],e&&(t.preventDefault(),Object.keys(i).length||(this.action=""),this.cropping&&(this.cropping=!1,Nt(this.dragBox,R,this.cropped&&this.options.modal)),Xt(this.element,_,{originalEvent:t,action:e}))}}},pe={change:function(t){var e,i=this.options,o=this.canvasData,n=this.containerData,a=this.cropBoxData,r=this.pointers,s=this.action,c=i.aspectRatio,h=a.left,l=a.top,p=a.width,d=a.height,u=h+p,m=l+d,f=0,g=0,b=n.width,T=n.height,N=!0;!c&&t.shiftKey&&(c=p&&d?p/d:1),this.limited&&(f=a.minLeft,g=a.minTop,b=f+Math.min(n.width,o.width,o.left+o.width),T=g+Math.min(n.height,o.height,o.top+o.height));var W=r[Object.keys(r)[0]],E={x:W.endX-W.startX,y:W.endY-W.startY},R=function(t){switch(t){case C:u+E.x>b&&(E.x=b-u);break;case O:h+E.x<f&&(E.x=f-h);break;case j:l+E.y<g&&(E.y=g-l);break;case k:m+E.y>T&&(E.y=T-m);break}};switch(s){case v:h+=E.x,l+=E.y;break;case C:if(E.x>=0&&(u>=b||c&&(l<=g||m>=T))){N=!1;break}R(C),p+=E.x,p<0&&(s=O,p=-p,h-=p),c&&(d=p/c,l+=(a.height-d)/2);break;case j:if(E.y<=0&&(l<=g||c&&(h<=f||u>=b))){N=!1;break}R(j),d-=E.y,l+=E.y,d<0&&(s=k,d=-d,l-=d),c&&(p=d*c,h+=(a.width-p)/2);break;case O:if(E.x<=0&&(h<=f||c&&(l<=g||m>=T))){N=!1;break}R(O),p-=E.x,h+=E.x,p<0&&(s=C,p=-p,h-=p),c&&(d=p/c,l+=(a.height-d)/2);break;case k:if(E.y>=0&&(m>=T||c&&(h<=f||u>=b))){N=!1;break}R(k),d+=E.y,d<0&&(s=j,d=-d,l-=d),c&&(p=d*c,h+=(a.width-p)/2);break;case M:if(c){if(E.y<=0&&(l<=g||u>=b)){N=!1;break}R(j),d-=E.y,l+=E.y,p=d*c}else R(j),R(C),E.x>=0?u<b?p+=E.x:E.y<=0&&l<=g&&(N=!1):p+=E.x,E.y<=0?l>g&&(d-=E.y,l+=E.y):(d-=E.y,l+=E.y);p<0&&d<0?(s=S,d=-d,p=-p,l-=d,h-=p):p<0?(s=B,p=-p,h-=p):d<0&&(s=D,d=-d,l-=d);break;case B:if(c){if(E.y<=0&&(l<=g||h<=f)){N=!1;break}R(j),d-=E.y,l+=E.y,p=d*c,h+=a.width-p}else R(j),R(O),E.x<=0?h>f?(p-=E.x,h+=E.x):E.y<=0&&l<=g&&(N=!1):(p-=E.x,h+=E.x),E.y<=0?l>g&&(d-=E.y,l+=E.y):(d-=E.y,l+=E.y);p<0&&d<0?(s=D,d=-d,p=-p,l-=d,h-=p):p<0?(s=M,p=-p,h-=p):d<0&&(s=S,d=-d,l-=d);break;case S:if(c){if(E.x<=0&&(h<=f||m>=T)){N=!1;break}R(O),p-=E.x,h+=E.x,d=p/c}else R(k),R(O),E.x<=0?h>f?(p-=E.x,h+=E.x):E.y>=0&&m>=T&&(N=!1):(p-=E.x,h+=E.x),E.y>=0?m<T&&(d+=E.y):d+=E.y;p<0&&d<0?(s=M,d=-d,p=-p,l-=d,h-=p):p<0?(s=D,p=-p,h-=p):d<0&&(s=B,d=-d,l-=d);break;case D:if(c){if(E.x>=0&&(u>=b||m>=T)){N=!1;break}R(C),p+=E.x,d=p/c}else R(k),R(C),E.x>=0?u<b?p+=E.x:E.y>=0&&m>=T&&(N=!1):p+=E.x,E.y>=0?m<T&&(d+=E.y):d+=E.y;p<0&&d<0?(s=B,d=-d,p=-p,l-=d,h-=p):p<0?(s=S,p=-p,h-=p):d<0&&(s=M,d=-d,l-=d);break;case w:this.move(E.x,E.y),N=!1;break;case x:this.zoom(qt(r),t),N=!1;break;case y:if(!E.x||!E.y){N=!1;break}e=Pt(this.cropper),h=W.startX-e.left,l=W.startY-e.top,p=a.minWidth,d=a.minHeight,E.x>0?s=E.y>0?D:M:E.x<0&&(h-=p,s=E.y>0?S:B),E.y<0&&(l-=d),this.cropped||(Tt(this.cropBox,A),this.cropped=!0,this.limited&&this.limitCropBox(!0,!0));break}N&&(a.width=p,a.height=d,a.left=h,a.top=l,this.action=s,this.renderCropBox()),Ct(r,(function(t){t.startX=t.endX,t.startY=t.endY}))}},de={crop:function(){return!this.ready||this.cropped||this.disabled||(this.cropped=!0,this.limitCropBox(!0,!0),this.options.modal&&St(this.dragBox,R),Tt(this.cropBox,A),this.setCropBoxData(this.initialCropBoxData)),this},reset:function(){return this.ready&&!this.disabled&&(this.imageData=Ot({},this.initialImageData),this.canvasData=Ot({},this.initialCanvasData),this.cropBoxData=Ot({},this.initialCropBoxData),this.renderCanvas(),this.cropped&&this.renderCropBox()),this},clear:function(){return this.cropped&&!this.disabled&&(Ot(this.cropBoxData,{left:0,top:0,width:0,height:0}),this.cropped=!1,this.renderCropBox(),this.limitCanvas(!0,!0),this.renderCanvas(),Tt(this.dragBox,R),St(this.cropBox,A)),this},replace:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return!this.disabled&&t&&(this.isImg&&(this.element.src=t),e?(this.url=t,this.image.src=t,this.ready&&(this.viewBoxImage.src=t,Ct(this.previews,(function(e){e.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,Tt(this.cropper,N)),this},disable:function(){return this.ready&&!this.disabled&&(this.disabled=!0,St(this.cropper,N)),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 e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,o=i.left,n=i.top;return this.moveTo(ft(t)?t:o+Number(t),ft(e)?e:n+Number(e))},moveTo:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.canvasData,o=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.movable&&(ut(t)&&(i.left=t,o=!0),ut(e)&&(i.top=e,o=!0),o&&this.renderCanvas(!0)),this},zoom:function(t,e){var i=this.canvasData;return t=Number(t),t=t<0?1/(1-t):1+t,this.zoomTo(i.width*t/i.naturalWidth,null,e)},zoomTo:function(t,e,i){var o=this.options,n=this.canvasData,a=n.width,r=n.height,s=n.naturalWidth,c=n.naturalHeight;if(t=Number(t),t>=0&&this.ready&&!this.disabled&&o.zoomable){var h=s*t,l=c*t;if(!1===Xt(this.element,it,{ratio:t,oldRatio:a/s,originalEvent:i}))return this;if(i){var p=this.pointers,d=Pt(this.cropper),u=p&&Object.keys(p).length?Gt(p):{pageX:i.pageX,pageY:i.pageY};n.left-=(h-a)*((u.pageX-d.left-n.left)/a),n.top-=(l-r)*((u.pageY-d.top-n.top)/r)}else vt(e)&&ut(e.x)&&ut(e.y)?(n.left-=(h-a)*((e.x-n.left)/a),n.top-=(l-r)*((e.y-n.top)/r)):(n.left-=(h-a)/2,n.top-=(l-r)/2);n.width=h,n.height=l,this.renderCanvas(!0)}return this},rotate:function(t){return this.rotateTo((this.imageData.rotate||0)+Number(t))},rotateTo:function(t){return t=Number(t),ut(t)&&this.ready&&!this.disabled&&this.options.rotatable&&(this.imageData.rotate=t%360,this.renderCanvas(!0,!0)),this},scaleX:function(t){var e=this.imageData.scaleY;return this.scale(t,ut(e)?e:1)},scaleY:function(t){var e=this.imageData.scaleX;return this.scale(ut(e)?e:1,t)},scale:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t,i=this.imageData,o=!1;return t=Number(t),e=Number(e),this.ready&&!this.disabled&&this.options.scalable&&(ut(t)&&(i.scaleX=t,o=!0),ut(e)&&(i.scaleY=e,o=!0),o&&this.renderCanvas(!0,!0)),this},getData:function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=this.options,o=this.imageData,n=this.canvasData,a=this.cropBoxData;if(this.ready&&this.cropped){t={x:a.left-n.left,y:a.top-n.top,width:a.width,height:a.height};var r=o.width/o.naturalWidth;if(Ct(t,(function(e,i){t[i]=e/r})),e){var s=Math.round(t.y+t.height),c=Math.round(t.x+t.width);t.x=Math.round(t.x),t.y=Math.round(t.y),t.width=c-t.x,t.height=s-t.y}}else t={x:0,y:0,width:0,height:0};return i.rotatable&&(t.rotate=o.rotate||0),i.scalable&&(t.scaleX=o.scaleX||1,t.scaleY=o.scaleY||1),t},setData:function(t){var e=this.options,i=this.imageData,o=this.canvasData,n={};if(this.ready&&!this.disabled&&vt(t)){var a=!1;e.rotatable&&ut(t.rotate)&&t.rotate!==i.rotate&&(i.rotate=t.rotate,a=!0),e.scalable&&(ut(t.scaleX)&&t.scaleX!==i.scaleX&&(i.scaleX=t.scaleX,a=!0),ut(t.scaleY)&&t.scaleY!==i.scaleY&&(i.scaleY=t.scaleY,a=!0)),a&&this.renderCanvas(!0,!0);var r=i.width/i.naturalWidth;ut(t.x)&&(n.left=t.x*r+o.left),ut(t.y)&&(n.top=t.y*r+o.top),ut(t.width)&&(n.width=t.width*r),ut(t.height)&&(n.height=t.height*r),this.setCropBoxData(n)}return this},getContainerData:function(){return this.ready?Ot({},this.containerData):{}},getImageData:function(){return this.sized?Ot({},this.imageData):{}},getCanvasData:function(){var t=this.canvasData,e={};return this.ready&&Ct(["left","top","width","height","naturalWidth","naturalHeight"],(function(i){e[i]=t[i]})),e},setCanvasData:function(t){var e=this.canvasData,i=e.aspectRatio;return this.ready&&!this.disabled&&vt(t)&&(ut(t.left)&&(e.left=t.left),ut(t.top)&&(e.top=t.top),ut(t.width)?(e.width=t.width,e.height=t.width/i):ut(t.height)&&(e.height=t.height,e.width=t.height*i),this.renderCanvas(!0)),this},getCropBoxData:function(){var t,e=this.cropBoxData;return this.ready&&this.cropped&&(t={left:e.left,top:e.top,width:e.width,height:e.height}),t||{}},setCropBoxData:function(t){var e,i,o=this.cropBoxData,n=this.options.aspectRatio;return this.ready&&this.cropped&&!this.disabled&&vt(t)&&(ut(t.left)&&(o.left=t.left),ut(t.top)&&(o.top=t.top),ut(t.width)&&t.width!==o.width&&(e=!0,o.width=t.width),ut(t.height)&&t.height!==o.height&&(i=!0,o.height=t.height),n&&(e?o.height=o.width/n:i&&(o.width=o.height*n)),this.renderCropBox()),this},getCroppedCanvas:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.ready||!window.HTMLCanvasElement)return null;var e=this.canvasData,i=Kt(this.image,this.imageData,e,t);if(!this.cropped)return i;var o=this.getData(),n=o.x,a=o.y,r=o.width,c=o.height,h=i.width/Math.floor(e.naturalWidth);1!==h&&(n*=h,a*=h,r*=h,c*=h);var l=r/c,p=Zt({aspectRatio:l,width:t.maxWidth||1/0,height:t.maxHeight||1/0}),d=Zt({aspectRatio:l,width:t.minWidth||0,height:t.minHeight||0},"cover"),u=Zt({aspectRatio:l,width:t.width||(1!==h?i.width:r),height:t.height||(1!==h?i.height:c)}),m=u.width,f=u.height;m=Math.min(p.width,Math.max(d.width,m)),f=Math.min(p.height,Math.max(d.height,f));var g=document.createElement("canvas"),b=g.getContext("2d");g.width=jt(m),g.height=jt(f),b.fillStyle=t.fillColor||"transparent",b.fillRect(0,0,m,f);var v=t.imageSmoothingEnabled,y=void 0===v||v,w=t.imageSmoothingQuality;b.imageSmoothingEnabled=y,w&&(b.imageSmoothingQuality=w);var x,C,O,k,j,M,B=i.width,D=i.height,S=n,T=a;S<=-r||S>B?(S=0,x=0,O=0,j=0):S<=0?(O=-S,S=0,x=Math.min(B,r+S),j=x):S<=B&&(O=0,x=Math.min(r,B-S),j=x),x<=0||T<=-c||T>D?(T=0,C=0,k=0,M=0):T<=0?(k=-T,T=0,C=Math.min(D,c+T),M=C):T<=D&&(k=0,C=Math.min(c,D-T),M=C);var N=[S,T,x,C];if(j>0&&M>0){var A=m/r;N.push(O*A,k*A,j*A,M*A)}return b.drawImage.apply(b,[i].concat(s(N.map((function(t){return Math.floor(jt(t))}))))),g},setAspectRatio:function(t){var e=this.options;return this.disabled||ft(t)||(e.aspectRatio=Math.max(0,t)||NaN,this.ready&&(this.initCropBox(),this.cropped&&this.renderCropBox())),this},setDragMode:function(t){var e=this.options,i=this.dragBox,o=this.face;if(this.ready&&!this.disabled){var n=t===I,a=e.movable&&t===Y;t=n||a?t:X,e.dragMode=t,Rt(i,L,t),Nt(i,T,n),Nt(i,H,a),e.cropBoxMovable||(Rt(o,L,t),Nt(o,T,n),Nt(o,H,a))}return this}},ue=m.Cropper,me=function(){function t(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o(this,t),!e||!st.test(e.tagName))throw new Error("The first argument is required and must be an <img> or <canvas> element.");this.element=e,this.options=Ot({},lt,vt(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 a(t,[{key:"init",value:function(){var t,e=this.element,i=e.tagName.toLowerCase();if(!e[b]){if(e[b]=this,"img"===i){if(this.isImg=!0,t=e.getAttribute("src")||"",this.originalUrl=t,!t)return;t=e.src}else"canvas"===i&&window.HTMLCanvasElement&&(t=e.toDataURL());this.load(t)}}},{key:"load",value:function(t){var e=this;if(t){this.url=t,this.imageData={};var i=this.element,o=this.options;if(o.rotatable||o.scalable||(o.checkOrientation=!1),o.checkOrientation&&window.ArrayBuffer)if(at.test(t))rt.test(t)?this.read(oe(t)):this.clone();else{var n=new XMLHttpRequest,a=this.clone.bind(this);this.reloading=!0,this.xhr=n,n.onabort=a,n.onerror=a,n.ontimeout=a,n.onprogress=function(){n.getResponseHeader("content-type")!==ot&&n.abort()},n.onload=function(){e.read(n.response)},n.onloadend=function(){e.reloading=!1,e.xhr=null},o.checkCrossOrigin&&Vt(t)&&i.crossOrigin&&(t=$t(t)),n.open("GET",t,!0),n.responseType="arraybuffer",n.withCredentials="use-credentials"===i.crossOrigin,n.send()}else this.clone()}}},{key:"read",value:function(t){var e=this.options,i=this.imageData,o=ae(t),n=0,a=1,r=1;if(o>1){this.url=ne(t,ot);var s=re(o);n=s.rotate,a=s.scaleX,r=s.scaleY}e.rotatable&&(i.rotate=n),e.scalable&&(i.scaleX=a,i.scaleY=r),this.clone()}},{key:"clone",value:function(){var t=this.element,e=this.url,i=t.crossOrigin,o=e;this.options.checkCrossOrigin&&Vt(e)&&(i||(i="anonymous"),o=$t(e)),this.crossOrigin=i,this.crossOriginUrl=o;var n=document.createElement("img");i&&(n.crossOrigin=i),n.src=o||e,n.alt=t.alt||"The image to crop",this.image=n,n.onload=this.start.bind(this),n.onerror=this.stop.bind(this),St(n,W),t.parentNode.insertBefore(n,t.nextSibling)}},{key:"start",value:function(){var t=this,e=this.image;e.onload=null,e.onerror=null,this.sizing=!0;var i=m.navigator&&/(?:iPad|iPhone|iPod).*?AppleWebKit/i.test(m.navigator.userAgent),o=function(e,i){Ot(t.imageData,{naturalWidth:e,naturalHeight:i,aspectRatio:e/i}),t.initialImageData=Ot({},t.imageData),t.sizing=!1,t.sized=!0,t.build()};if(!e.naturalWidth||i){var n=document.createElement("img"),a=document.body||document.documentElement;this.sizingImage=n,n.onload=function(){o(n.width,n.height),i||a.removeChild(n)},n.src=e.src,i||(n.style.cssText="left:0;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;opacity:0;position:absolute;top:0;z-index:-1;",a.appendChild(n))}else o(e.naturalWidth,e.naturalHeight)}},{key:"stop",value:function(){var t=this.image;t.onload=null,t.onerror=null,t.parentNode.removeChild(t),this.image=null}},{key:"build",value:function(){if(this.sized&&!this.ready){var t=this.element,e=this.options,i=this.image,o=t.parentNode,n=document.createElement("div");n.innerHTML=pt;var a=n.querySelector(".".concat(b,"-container")),r=a.querySelector(".".concat(b,"-canvas")),s=a.querySelector(".".concat(b,"-drag-box")),c=a.querySelector(".".concat(b,"-crop-box")),h=c.querySelector(".".concat(b,"-face"));this.container=o,this.cropper=a,this.canvas=r,this.dragBox=s,this.cropBox=c,this.viewBox=a.querySelector(".".concat(b,"-view-box")),this.face=h,r.appendChild(i),St(t,A),o.insertBefore(a,t.nextSibling),Tt(i,W),this.initPreview(),this.bind(),e.initialAspectRatio=Math.max(0,e.initialAspectRatio)||NaN,e.aspectRatio=Math.max(0,e.aspectRatio)||NaN,e.viewMode=Math.max(0,Math.min(3,Math.round(e.viewMode)))||0,St(c,A),e.guides||St(c.getElementsByClassName("".concat(b,"-dashed")),A),e.center||St(c.getElementsByClassName("".concat(b,"-center")),A),e.background&&St(a,"".concat(b,"-bg")),e.highlight||St(h,E),e.cropBoxMovable&&(St(h,H),Rt(h,L,v)),e.cropBoxResizable||(St(c.getElementsByClassName("".concat(b,"-line")),A),St(c.getElementsByClassName("".concat(b,"-point")),A)),this.render(),this.ready=!0,this.setDragMode(e.dragMode),e.autoCrop&&this.crop(),this.setData(e.data),yt(e.ready)&&Yt(t,K,e.ready,{once:!0}),Xt(t,K)}}},{key:"unbuild",value:function(){if(this.ready){this.ready=!1,this.unbind(),this.resetPreview();var t=this.cropper.parentNode;t&&t.removeChild(this.cropper),Tt(this.element,A)}}},{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=ue,t}},{key:"setDefaults",value:function(t){Ot(lt,vt(t)&&t)}}]),t}();return Ot(me.prototype,se,ce,he,le,pe,de),me}))},c04e:function(t,e,i){var o=i("861d");t.exports=function(t,e){if(!o(t))return t;var i,n;if(e&&"function"==typeof(i=t.toString)&&!o(n=i.call(t)))return n;if("function"==typeof(i=t.valueOf)&&!o(n=i.call(t)))return n;if(!e&&"function"==typeof(i=t.toString)&&!o(n=i.call(t)))return n;throw TypeError("Can't convert object to primitive value")}},c430:function(t,e){t.exports=!1},c6b6:function(t,e){var i={}.toString;t.exports=function(t){return i.call(t).slice(8,-1)}},c6cd:function(t,e,i){var o=i("da84"),n=i("ce4e"),a="__core-js_shared__",r=o[a]||n(a,{});t.exports=r},cc12:function(t,e,i){var o=i("da84"),n=i("861d"),a=o.document,r=n(a)&&n(a.createElement);t.exports=function(t){return r?a.createElement(t):{}}},ce4e:function(t,e,i){var o=i("da84"),n=i("9112");t.exports=function(t,e){try{n(o,t,e)}catch(i){o[t]=e}return e}},d012:function(t,e){t.exports={}},d039:function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},d066:function(t,e,i){var o=i("428f"),n=i("da84"),a=function(t){return"function"==typeof t?t:void 0};t.exports=function(t,e){return arguments.length<2?a(o[t])||a(n[t]):o[t]&&o[t][e]||n[t]&&n[t][e]}},d2bb:function(t,e,i){var o=i("825a"),n=i("3bbe");t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,i={};try{t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set,t.call(i,[]),e=i instanceof Array}catch(a){}return function(i,a){return o(i),n(a),e?t.call(i,a):i.__proto__=a,i}}():void 0)},da84:function(t,e,i){(function(e){var i=function(t){return t&&t.Math==Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof e&&e)||function(){return this}()||Function("return this")()}).call(this,i("c8ba"))},e163:function(t,e,i){var o=i("5135"),n=i("7b0b"),a=i("f772"),r=i("e177"),s=a("IE_PROTO"),c=Object.prototype;t.exports=r?Object.getPrototypeOf:function(t){return t=n(t),o(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?c:null}},e177:function(t,e,i){var o=i("d039");t.exports=!o((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},e679:function(t,e,i){},ebb5:function(t,e,i){"use strict";var o,n=i("a981"),a=i("83abf"),r=i("da84"),s=i("861d"),c=i("5135"),h=i("f5df"),l=i("9112"),p=i("6eeb"),d=i("9bf2").f,u=i("e163"),m=i("d2bb"),f=i("b622"),g=i("90e3"),b=r.Int8Array,v=b&&b.prototype,y=r.Uint8ClampedArray,w=y&&y.prototype,x=b&&u(b),C=v&&u(v),O=Object.prototype,k=O.isPrototypeOf,j=f("toStringTag"),M=g("TYPED_ARRAY_TAG"),B=n&&!!m&&"Opera"!==h(r.opera),D=!1,S={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},T={BigInt64Array:8,BigUint64Array:8},N=function(t){if(!s(t))return!1;var e=h(t);return"DataView"===e||c(S,e)||c(T,e)},A=function(t){if(!s(t))return!1;var e=h(t);return c(S,e)||c(T,e)},W=function(t){if(A(t))return t;throw TypeError("Target is not a typed array")},E=function(t){if(m){if(k.call(x,t))return t}else for(var e in S)if(c(S,o)){var i=r[e];if(i&&(t===i||k.call(i,t)))return t}throw TypeError("Target is not a typed array constructor")},R=function(t,e,i){if(a){if(i)for(var o in S){var n=r[o];if(n&&c(n.prototype,t))try{delete n.prototype[t]}catch(s){}}C[t]&&!i||p(C,t,i?e:B&&v[t]||e)}},H=function(t,e,i){var o,n;if(a){if(m){if(i)for(o in S)if(n=r[o],n&&c(n,t))try{delete n[t]}catch(s){}if(x[t]&&!i)return;try{return p(x,t,i?e:B&&x[t]||e)}catch(s){}}for(o in S)n=r[o],!n||n[t]&&!i||p(n,t,e)}};for(o in S)r[o]||(B=!1);if((!B||"function"!=typeof x||x===Function.prototype)&&(x=function(){throw TypeError("Incorrect invocation")},B))for(o in S)r[o]&&m(r[o],x);if((!B||!C||C===O)&&(C=x.prototype,B))for(o in S)r[o]&&m(r[o].prototype,C);if(B&&u(w)!==C&&m(w,C),a&&!c(C,j))for(o in D=!0,d(C,j,{get:function(){return s(this)?this[M]:void 0}}),S)r[o]&&l(r[o],M,o);t.exports={NATIVE_ARRAY_BUFFER_VIEWS:B,TYPED_ARRAY_TAG:D&&M,aTypedArray:W,aTypedArrayConstructor:E,exportTypedArrayMethod:R,exportTypedArrayStaticMethod:H,isView:N,isTypedArray:A,TypedArray:x,TypedArrayPrototype:C}},f5df:function(t,e,i){var o=i("00ee"),n=i("c6b6"),a=i("b622"),r=a("toStringTag"),s="Arguments"==n(function(){return arguments}()),c=function(t,e){try{return t[e]}catch(i){}};t.exports=o?n:function(t){var e,i,o;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(i=c(e=Object(t),r))?i:s?n(e):"Object"==(o=n(e))&&"function"==typeof e.callee?"Arguments":o}},f772:function(t,e,i){var o=i("5692"),n=i("90e3"),a=o("keys");t.exports=function(t){return a[t]||(a[t]=n(t))}},f8cd:function(t,e,i){var o=i("a691");t.exports=function(t){var e=o(t);if(e<0)throw RangeError("The argument can't be less than 0");return e}},fa9e:function(t,e,i){"use strict";var o=i("ebb5"),n=i("a258").findLast,a=o.aTypedArray,r=o.exportTypedArrayMethod;r("findLast",(function(t){return n(a(this),t,arguments.length>1?arguments[1]:void 0)}))},fdbf:function(t,e,i){var o=i("4930");t.exports=o&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}}]);