(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f7b22d7a"],{"0894":function(t,e,i){"use strict";i("7e18")},"0c65":function(t,e,i){},"349a":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAGY0lEQVR4Xu1ba2wUVRT+zkALKFV+oGnEd4oaQJ4S7MygTYyPYgLRWERNjMUYXwFf0Qh/xBDRGCMIGjEmoInGBxrxBcofwd2ZWvlB5REfNATUSEF+gNRQCjvHnNkt7S6zOzO7e+8u4E2atpk795zzzbnnfnPOGYLiwaZ5PgzjDnjeFSAaCeC8E7+Z5X+A6ACAv8Hc/9swfoPnfUKuu1+liqRi8YzRLQBawDwdREZRcpg9ECUAfKwKjLICwLZ9L5jvB9F1RRkcdhPz92B+m1z3vbCpUa+XBQC2rJkAXgDRuKiCS5y3DZ63gFz36xLXQUkAsG1PA/MyEF1bqiJF3u8glXqG2trcIu8vDgCeMqUGQ4cuBdGjxQou633Mr+Pgwadox47euOvG9gC27cv9oARMiStM8fwfkUrdQ21tnXHkxAKATXMWDEMC0PA4QrTNZT4M5lZy3U+jyowEADc1DcWxY69UjcuHWSdbwvMkNhwJmxoKgO/yzF+AaGzYYlV2fRtSqdvDtkQUAGS/C6k59QbzR+Q4cwopXhAAtqxnQfTiqWf5AI2ZF5DjvJTPhrwAsGneBKL1RdPYakEtTadvpWTymyCVAgFg254AoZ1E51SLHSXpwXwIzE3kuh256+QDYCuAq0sSWujm+npg3jxg9Oj0rJ07gRUrgK4uZSLlgZLjXB8KAJvmHBjGB8o0EeNXrQLq6rJFHD4MzJ2rFoRU6jZqa1s7UHCWBzBgwLaFSV2mDIAlS4Dp04OXTySAhQuViQbzT3CcyQR4fUKyATDN+2AYq9VpAGD9emB4HiK5dy8we7ZS8fA8YYrvnAQANzQMQX39z0qfvkiVp1xo5POO8sGyC11dY6iz86gsecID2LIeB9HS8snJs9Lq1UBDQ/DFzk6gtVW5CmB+ghxnWTYAtv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ili0agBNbQr4n6u19AIbxNICLilGiiHt2gfll1NS8GyXQlXwKRFWQTbMVRHeB6Mao98SY1wPm78C8hly3bP3MJXtAkAGZ7XGDfKkBQCj1hTEMHTj1TwDr4HnrwLwhyldgceUoASBXCTbNcSAaA0AaMeTnYr8pgzndmEG0B8DvkGAG9P29g1x3e1yD4s7/D/0NdcvDAtjjAAAAAElFTkSuQmCC"},"365c":function(t,e,i){"use strict";i.d(e,"d",(function(){return a})),i.d(e,"a",(function(){return s})),i.d(e,"b",(function(){return o})),i.d(e,"c",(function(){return r}));var n=i("b775");function a(t){return Object(n["a"])("/skl/cas/getTicket","get",t)}function s(t){return Object(n["a"])("/skl/cas/getAppid","get",t)}function o(t){return Object(n["a"])("/skl/cas/getSignature","get",t)}function r(t){return Object(n["a"])("skl/cas/getSignaturet","get",t)}},"3b24":function(t,e,i){t.exports=i.p+"img/code.78d03d9d.png"},4465:function(t,e,i){"use strict";i("e2c9")},"4a13":function(t,e,i){t.exports=i.p+"img/location_grey.bfb0593d.png"},"4a37":function(t,e,i){"use strict";i("0c65")},"5bb1":function(t,e,i){},"60d8":function(t,e){t.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAIyklEQVR4Xu1bbXBU5RV+zk02X0AQDRCTJoRO0WQXB4vtILRqslsiwWmYOg217QzTTLOhWqXaKkXrjGGollFHEe0gWSiV2qGmtRWsILFZQrCo/VAUdhPEgSSEEEgK+SCfm72n894QGjZ39967ezfZdvr+yY+cj+c8+957zvuecwlRXoWfbZnlH4r7JgM3ECONCTMBpBHTTCZOE+6JqYOJ2wF0EKOdCR0EfBqX4P9D9RfuPR9NiBQN4yNBx5cwuISA2wCSwvPDMgOHCKiKFhmmElDgda0i4PsE3B5ewKG1GKgjhqvG5nzVLPumEFDQUFlMMj1JwHyzgGlQcVSG9OgBa9lbkfqLiIACz9ZFEkmbANwaKZBw9JnxV0i81p1XfjgcfeX9E47iLbzVklovPS8BPwxH32wdZn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YUWPDD+sz/ZUqIVvNDX3AFXnDCTvX7bYwA2mHVqNHsTiVMeEVfU5Do3gEjX+Uo/AZfRii/EJD92gUi9YW92VDrtMbifIZUY/ZLMMAECT76n8maJ8CcCBT/w6wRuhpjS45NQXJPr/MSovbAIEE4K23ZO8V0YvI8YPyZCulHHZsgz4xwRPRd3bcIvq9NX9YZjM2wCRp2J74mkPp+TQI+AkBUOCMM6jJOA/LQ/JeEVPS+6iLOAXoB2j6sUhG8TsFSvjl45BgbAfAAgkdtNm2eOeAeoBaA8Hp0DDslPdzGwnAjBe2ghGGBGCwF7ZWDvQOr0aj1fgekldFQuKgQEgsj3bptPLFtBJAYx5hAjG4Q5BFYGMxjUROBmGdQEoEkCmv0gT621TP8AsNHIL8v/G+0OYgQlyaFAAAAAAElFTkSuQmCC"},"6b56":function(t,e,i){"use strict";i("c60a")},"7e18":function(t,e,i){},"85ca":function(t,e,i){"use strict";i.r(e);var n=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"pages"},[i("section",[i("div",{staticClass:"just-spa"},[i("div",{staticClass:"al-cen"},[i("div",{staticClass:"type center f-wrap f-shr",class:{bg_blue:0===t.signDetail.signType,bg_orange:1===t.signDetail.signType,bg_green:2===t.signDetail.signType,bg_red:3===t.signDetail.signType,bg_yellow:4===t.signDetail.signType,bg_violet:5===t.signDetail.signType}},[t._v(" "+t._s(0===t.signDetail.signType?"活动":1===t.signDetail.signType?"返校":2===t.signDetail.signType?"疫情打卡":3===t.signDetail.signType?"团建":4===t.signDetail.signType?"班会":5===t.signDetail.signType?"自定义":"")+" "),1===t.signDetail.frequencyType?i("div",{staticClass:"loop_far"}):t._e()]),i("div",[i("p",{staticClass:"title"},[t._v(t._s(t.signDetail.theme))]),i("p",{staticClass:"info al-cen"},[t._v(" "+t._s(0===t.signDetail.signMode?"定位签到":1===t.signDetail.signMode?"二维码签到":2===t.signDetail.signMode?"拍照签到":"")+" ")])])]),i("div",{staticClass:"tag center f-shr",class:{tag_green:3==t.signDetail.recordState,tag_red:4==t.signDetail.recordState}},[t._v(" "+t._s(3==t.signDetail.recordState?"进行中":4==t.signDetail.recordState?"未开始":"")+" ")])]),i("div",{staticClass:"infos"},[i("span",{staticClass:"left_info"},[t._v("创建人：")]),i("span",[t._v(t._s(t.signDetail.userName))])]),i("div",{staticClass:"infos"},[i("span",{staticClass:"left_info"},[t._v("签到开始时间：")]),i("span",[t._v(t._s(t.signDetail.startDate))])]),i("div",{staticClass:"infos"},[i("span",{staticClass:"left_info"},[t._v("签到结束时间：")]),i("span",[t._v(t._s(t.signDetail.endDate))])])]),0===t.signDetail.signMode&&0===t.signDetail.isPhoto?i("location",{attrs:{id:t.signDetail.id,signCondition:t.signDetail.signCondition,signId:t.signDetail.signId}}):t._e(),1===t.signDetail.signMode?i("code-sign",{attrs:{id:t.signDetail.id,signId:t.signDetail.signId}}):t._e(),0===t.signDetail.signMode&&1===t.signDetail.isPhoto?i("photo-location-sign",{attrs:{id:t.signDetail.id,list:t.signDetail.photoRequireList,signCondition:t.signDetail.signCondition,signId:t.signDetail.signId}}):t._e(),2===t.signDetail.signMode?i("photo-sign",{attrs:{id:t.signDetail.id,list:t.signDetail.photoRequireList,signCondition:t.signDetail.signCondition,signId:t.signDetail.signId}}):t._e()],1)},a=[],s=i("5880"),o=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pages"},[n("van-overlay",{staticClass:"center",attrs:{show:t.show}},[n("van-loading",{attrs:{type:"spinner",color:"#1989fa","text-color":"#0094ff",vertical:""}},[t._v("正在获取位置信息...")])],1),n("div",{directives:[{name:"show",rawName:"v-show",value:!0===t.location,expression:"location === true"}],staticClass:"main center"},[n("img",{staticClass:"image",attrs:{src:i("eab0"),alt:""},on:{click:function(e){return t.confimSign()}}}),n("div",{staticClass:"center content"},[n("img",{staticClass:"icon",attrs:{src:i("60d8"),alt:""}}),n("p",{staticClass:"info"},[t._v("当前所在位置："+t._s(t.place))])])]),n("div",{directives:[{name:"show",rawName:"v-show",value:!1===t.location,expression:"location === false"}],staticClass:"main center"},[n("img",{staticClass:"image",attrs:{src:i("4a13"),alt:""}}),n("div",{staticClass:"center content"},[n("img",{staticClass:"icon",attrs:{src:i("349a"),alt:""}}),n("span",{staticClass:"info"},[t._v("未进入考勤位置范围")]),n("span",{staticClass:"refresh",on:{click:function(e){return t.refresh()}}},[t._v("重新定位")])])])],1)},r=[],c=i("922c"),l=i("365c"),d=i("3089"),g={methods:{checkApp(){return new Promise((t,e)=>{const i=window.navigator.userAgent.toLowerCase();"micromessenger"==i.match(/MicroMessenger/i)&&"wxwork"==i.match(/wxwork/i)||"micromessenger"==i.match(/micromessenger/i)?t():e()})},checkQX(t){return new Promise((e,i)=>{wx.checkJsApi({jsApiList:t,success:function(t){e(t)},fail:function(t){i(t)}})})},getQX(t){const e=parseInt((new Date).getTime())+"",i=window.location.href.split("#")[0];return new Promise((n,a)=>{Object(l["c"])({noncestr:"sklzjnu",timestamp:e,url:i}).then(i=>{wx.config({beta:!0,debug:!1,appId:i.corpid,timestamp:e,nonceStr:"sklzjnu",signature:i.sign,jsApiList:t}),n()})})},readySuccess(){return new Promise((t,e)=>{wx.ready((function(){t()})),wx.error((function(t){d["Toast"].fail("未获取企业微信定位权限！"),e(t)}))})},getWechatLocation(){return new Promise((t,e)=>{wx.getLocation({type:"gcj02",success:function(e){const i={lat:e.latitude,lng:e.longitude};t(i)},fail:function(t){d["Toast"].fail("获取企业微信定位失败！"),e(t)}})})}}},u=i("cebe"),h=i.n(u),f={name:"",props:{id:String,signCondition:Number,signId:String},mixins:[g],data(){return{location:!0,show:!1,latitude:"",longitude:"",place:""}},computed:{...Object(s["mapGetters"])(["signDetail"])},mounted(){this.getWechatPlace()},methods:{getWechatPlace(){this.$toast.loading({message:"正在获取位置信息...",forbidClick:!0,duration:0}),this.checkApp().then(()=>{this.getQX(["getLocation"]).then(()=>{this.readySuccess().then(()=>{this.getWechatLocation().then(t=>{this.longitude=t.lng,this.latitude=t.lat,this.getAdress(t)})})})}).catch(()=>{this.getPlace()})},getPlace(){const t=this;AMap.plugin("AMap.Geolocation",(function(){var e=new AMap.Geolocation({enableHighAccuracy:!0,timeout:1e4,zoomToAccuracy:!1});function i(e){t.latitude=e.position.lat,t.longitude=e.position.lng,t.getAdress(e.position)}function n(){t.$toast.clear(),t.$dialog.alert({title:"提示",message:"无法获取到位置信息，请检查是否已开启GPS定位权限！",confirmButtonText:"知道了",confirmButtonColor:"#2e6cf6"}).then(()=>{})}e.getCurrentPosition(),AMap.event.addListener(e,"complete",i),AMap.event.addListener(e,"error",n)}))},confimSign(){Object(c["a"])({latitude:this.latitude,longitude:this.longitude,location:this.place,signDetailId:this.id,signMode:0,signCondition:this.signCondition,signId:this.signId}).then(t=>{200===t.code?this.$dialog.alert({title:"提示",message:t.message,confirmButtonText:"知道了",confirmButtonColor:"#2e6cf6"}).then(()=>{this.$router.back()}):this.$dialog.alert({title:"提示",message:t.message,confirmButtonText:"知道了",confirmButtonColor:"#2e6cf6"}).then(()=>{this.location=!1})})},getAdress(t){const e=t.lng+","+t.lat;h.a.get("https://restapi.amap.com/v3/geocode/regeo?parameters",{params:{key:"d62eb870c13f97a61bf5f2b65e385c32",location:e}}).then(t=>{this.location=!0,this.place=t.data.regeocode.formatted_address,this.$toast.clear()}).catch(()=>{this.$toast.clear()})},refresh(){this.getWechatPlace()}},beforeDestroy(){this.$toast.clear()}},m=f,p=(i("0894"),i("2877")),w=Object(p["a"])(m,o,r,!1,null,"a18afd46",null),b=w.exports,v=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pages"},[n("van-uploader",{ref:"QRVal",attrs:{capture:"camera",accept:"image/jpg,image/png, image/jpeg","before-read":t.beforeRead,"after-read":t.handleChange}},[n("div",{staticClass:"main center"},[n("img",{staticClass:"image",attrs:{src:i("3b24"),alt:""},on:{click:function(e){return t.signClick()}}})])])],1)},A=[],C=i("ba9f"),y=i("5c8e"),D={name:"",components:{},data(){return{location:!1}},computed:{...Object(s["mapGetters"])(["signDetail"])},watch:{},mounted(){},methods:{handleChange(t){const e=this.getFileUrl(t.file);let i=new y["a"];this.$toast.loading({message:"正在解析二维码...",forbidClick:!0,duration:0}),i.decodeFromImage(e).then(t=>{if(t){const e=t.data.split(",")[0].split(":")[1],i={signDetailId:e,signMode:1};this.$refs.QRVal.value="",Object(c["a"])(i).then(t=>{const{message:e}=t;this.$toast.clear(),this.$dialog.alert({title:"提示",message:e,confirmButtonText:"知道了",confirmButtonColor:"#2e6cf6"}).then(()=>{this.$router.back()})}).catch(()=>{})}else this.$toast.clear(),this.$toast({message:"二维码解析失败",type:"fail"})})},beforeRead(t){return new Promise((e,i)=>{C["compressAccurately"](t,200).then(i=>{i=new File([i],t.name,{type:i.type,lastModified:Date.now()}),e(i)})})},blobToFile(t,e){return t.lastModifiedDate=new Date,t.name=e,t},getFileUrl(t){let e=null;return void 0!=window.createObjectURL?e=window.createObjectURL(t):void 0!=window.URL?e=window.URL.createObjectURL(t):void 0!=window.webkitURL&&(e=window.webkitURL.createObjectURL(t)),e},signClick(){this.$refs.QRVal.click()},refresh(){this.location=!0}},beforeDestroy(){this.$toast.clear()}},k=D,j=(i("97a2"),Object(p["a"])(k,v,A,!1,null,"150f671f",null)),L=j.exports,P=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"pages"},[n("div",{staticClass:"photo"},[n("van-uploader",{attrs:{capture:"camera","max-count":"3","before-read":t.beforeRead,"after-read":t.afterRead,delete:t.beforeDel},model:{value:t.fileList,callback:function(e){t.fileList=e},expression:"fileList"}})],1),t.list?n("div",{staticClass:"tips al-cen"},[t._v("签到拍照要求："+t._s(t.list.toString("、")))]):t._e(),n("div",{directives:[{name:"show",rawName:"v-show",value:!0===t.location,expression:"location === true"}],staticClass:"main center"},[n("img",{staticClass:"image",attrs:{src:i("eab0"),alt:""},on:{click:function(e){return t.confimSign()}}}),n("div",{staticClass:"center content"},[n("img",{staticClass:"icon",attrs:{src:i("60d8"),alt:""}}),n("span",{staticClass:"info"},[t._v("当前所在位置："+t._s(t.place))])])]),n("div",{directives:[{name:"show",rawName:"v-show",value:!1===t.location,expression:"location === false"}],staticClass:"main center"},[n("img",{staticClass:"image",attrs:{src:i("4a13"),alt:""}}),n("div",{staticClass:"center content2"},[n("img",{staticClass:"icon",attrs:{src:i("349a"),alt:""}}),n("span",{staticClass:"info"},[t._v("未进入考勤位置范围")]),n("span",{staticClass:"refresh",on:{click:function(e){return t.refresh()}}},[t._v("重新定位")])])])])},B=[],E=i("8be0"),I={name:"",props:{id:String,signCondition:Number,signId:String,list:Array},mixins:[g,E["a"]],data(){return{fileList:[],uploadFileList:[],latitude:"",longitude:"",location:!0,place:""}},computed:{...Object(s["mapGetters"])(["signDetail"])},mounted(){this.getWechatPlace()},methods:{getWechatPlace(){this.$toast.loading({message:"正在获取位置信息...",forbidClick:!0,duration:0}),this.checkApp().then(()=>{this.getQX(["getLocation"]).then(()=>{this.readySuccess().then(()=>{this.getWechatLocation().then(t=>{this.longitude=t.lng,this.latitude=t.lat,this.getAdress(t)})})})}).catch(()=>{this.getPlace()})},getPlace(){const t=this;AMap.plugin("AMap.Geolocation",(function(){var e=new AMap.Geolocation({enableHighAccuracy:!0,timeout:1e4,zoomToAccuracy:!1});function i(e){t.latitude=e.position.lat,t.longitude=e.position.lng,t.getAdress(e.position)}function n(){t.$toast.clear(),t.$dialog.alert({title:"提示",message:"无法获取到位置信息，请检查是否已开启GPS定位权限！",confirmButtonText:"知道了",confirmButtonColor:"#2e6cf6"}).then(()=>{})}e.getCurrentPosition(),AMap.event.addListener(e,"complete",i),AMap.event.addListener(e,"error",n)}))},confimSign(){0!==this.uploadFileList.length?Object(c["a"])({attList:this.uploadFileList,latitude:this.latitude,longitude:this.longitude,location:this.place,signDetailId:this.id,signMode:0,signCondition:this.signCondition,signId:this.signId}).then(t=>{200===t.code?this.$dialog.alert({title:"提示",message:t.message,confirmButtonText:"知道了",confirmButtonColor:"#2e6cf6"}).then(()=>{this.$router.back()}):this.$dialog.alert({title:"提示",message:t.message,confirmButtonText:"知道了",confirmButtonColor:"#2e6cf6"}).then(()=>{this.location=!1})}):this.$toast("请拍摄现场图片")},beforeRead(t){return this.$toast.loading({message:"正在上传照片...",forbidClick:!0,duration:0}),new Promise((e,i)=>{C["compressAccurately"](t,900).then(i=>{i=new File([i],t.name,{type:i.type,lastModified:Date.now()}),e(i)})})},afterRead(t){this.fileUploadNew(t.file).then(t=>{this.$toast.clear();const e=this.uploadFileList.findIndex(e=>e.key===t.key);-1===e&&this.uploadFileList.push(t.data)})},beforeDel(t,e){return this.uploadFileList.splice(e),!0},getAdress(t){const e=t.lng+","+t.lat;h.a.get("https://restapi.amap.com/v3/geocode/regeo?parameters",{params:{key:"4ec62c0257dac128c7ac90cd194c7d47",location:e}}).then(t=>{this.location=!0,this.$toast.clear(),this.place=t.data.regeocode.formatted_address}).catch(()=>{this.$toast.clear()})},refresh(){this.getWechatPlace()}},beforeDestroy(){this.$toast.clear()}},S=I,x=(i("4465"),Object(p["a"])(S,P,B,!1,null,"1ec24442",null)),M=x.exports,R=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"pages"},[i("div",{staticClass:"photo"},[i("van-uploader",{attrs:{capture:"camera","max-count":"3","before-read":t.beforeRead,"after-read":t.afterRead,delete:t.beforeDel},model:{value:t.fileList,callback:function(e){t.fileList=e},expression:"fileList"}})],1),t.list?i("div",{staticClass:"tips al-cen"},[t._v("签到拍照要求："+t._s(t.list.toString("、")))]):t._e(),i("div",{staticClass:"center footer"},[i("div",{staticClass:"center button",on:{click:function(e){return t.confimSign()}}},[t._v("签到")])])])},U=[],F={name:"",props:{id:String,signCondition:Number,signId:String,list:Array},mixins:[E["a"]],data(){return{fileList:[],uploadFileList:[]}},computed:{...Object(s["mapGetters"])(["signDetail"])},watch:{},mounted(){},methods:{confimSign(){0!==this.uploadFileList.length?Object(c["a"])({attList:this.uploadFileList,signDetailId:this.id,signMode:2,signId:this.signId}).then(t=>{200===t.code?this.$dialog.alert({title:"提示",message:t.message,confirmButtonText:"知道了",confirmButtonColor:"#2e6cf6"}).then(()=>{this.$router.back()}):this.$dialog.alert({title:"提示",message:t.message,confirmButtonText:"知道了",confirmButtonColor:"#2e6cf6"}).then(()=>{})}):this.$toast("请拍摄现场图片")},beforeRead(t){return this.$toast.loading({message:"正在上传照片...",forbidClick:!0,duration:0}),new Promise((e,i)=>{C["compressAccurately"](t,900).then(i=>{i=new File([i],t.name,{type:i.type,lastModified:Date.now()}),e(i)})})},afterRead(t){this.fileUploadNew(t.file).then(t=>{this.$toast.clear();const e=this.uploadFileList.findIndex(e=>e.key===t.key);-1===e&&this.uploadFileList.push(t.data)})},beforeDel(t,e){return this.uploadFileList.splice(e),!0}},beforeDestroy(){this.$toast.clear()}},T=F,G=(i("4a37"),Object(p["a"])(T,R,U,!1,null,"6e94a60d",null)),N=G.exports,z={name:"",components:{location:b,photoLocationSign:M,codeSign:L,photoSign:N},data(){return{}},computed:{...Object(s["mapGetters"])(["signDetail"])}},Q=z,X=(i("6b56"),Object(p["a"])(Q,n,a,!1,null,"17c19612",null));e["default"]=X.exports},"8be0":function(t,e,i){"use strict";var n=i("3191");e["a"]={methods:{fileUploadNew(t){let e=new FormData;return e.append("multipartFile",t),new Promise((t,i)=>{Object(n["e"])(e).then(e=>{t(e)}).catch(t=>{i(t)})})}}}},"97a2":function(t,e,i){"use strict";i("5bb1")},ba9f:function(t,e,i){t.exports=i("c229")},c229:function(t,e,i){!function(e,i){t.exports=i()}(0,(function(){return function(t){var e={};function i(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,i),a.l=!0,a.exports}return i.m=t,i.c=e,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},i.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.t=function(t,e){if(1&e&&(t=i(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(i.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)i.d(n,a,function(e){return t[e]}.bind(null,a));return n},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i(i.s=0)}([function(t,e,i){"use strict";var n;function a(t){return["image/png","image/jpeg","image/gif"].some(e=>e===t)}i.r(e),i.d(e,"canvastoDataURL",(function(){return o})),i.d(e,"canvastoFile",(function(){return r})),i.d(e,"dataURLtoFile",(function(){return l})),i.d(e,"dataURLtoImage",(function(){return d})),i.d(e,"downloadFile",(function(){return g})),i.d(e,"filetoDataURL",(function(){return u})),i.d(e,"imagetoCanvas",(function(){return f})),i.d(e,"urltoBlob",(function(){return m})),i.d(e,"urltoImage",(function(){return p})),i.d(e,"compress",(function(){return b})),i.d(e,"compressAccurately",(function(){return v})),i.d(e,"EImageType",(function(){return n})),function(t){t.PNG="image/png",t.JPEG="image/jpeg",t.GIF="image/gif"}(n||(n={}));var s=function(t,e,i,n){return new(i||(i=Promise))((function(a,s){function o(t){try{c(n.next(t))}catch(t){s(t)}}function r(t){try{c(n.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,r)}c((n=n.apply(t,e||[])).next())}))};function o(t,e=.92,i=n.JPEG){return s(this,void 0,void 0,(function*(){return a(i)||(i=n.JPEG),t.toDataURL(i,e)}))}function r(t,e=.92,i=n.JPEG){return new Promise(n=>t.toBlob(t=>n(t),i,e))}var c=function(t,e,i,n){return new(i||(i=Promise))((function(a,s){function o(t){try{c(n.next(t))}catch(t){s(t)}}function r(t){try{c(n.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,r)}c((n=n.apply(t,e||[])).next())}))};function l(t,e){return c(this,void 0,void 0,(function*(){const i=t.split(",");let n=i[0].match(/:(.*?);/)[1];const s=atob(i[1]);let o=s.length;const r=new Uint8Array(o);for(;o--;)r[o]=s.charCodeAt(o);return a(e)&&(n=e),new Blob([r],{type:n})}))}function d(t){return new Promise((e,i)=>{const n=new Image;n.onload=()=>e(n),n.onerror=()=>i(new Error("dataURLtoImage(): dataURL is illegal")),n.src=t})}function g(t,e){const i=document.createElement("a");i.href=window.URL.createObjectURL(t),i.download=e||Date.now().toString(36),document.body.appendChild(i);const n=document.createEvent("MouseEvents");n.initEvent("click",!1,!1),i.dispatchEvent(n),document.body.removeChild(i)}function u(t){return new Promise(e=>{const i=new FileReader;i.onloadend=t=>e(t.target.result),i.readAsDataURL(t)})}var h=function(t,e,i,n){return new(i||(i=Promise))((function(a,s){function o(t){try{c(n.next(t))}catch(t){s(t)}}function r(t){try{c(n.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,r)}c((n=n.apply(t,e||[])).next())}))};function f(t,e={}){return h(this,void 0,void 0,(function*(){const i=Object.assign({},e),n=document.createElement("canvas"),a=n.getContext("2d");let s,o;for(const t in i)Object.prototype.hasOwnProperty.call(i,t)&&(i[t]=Number(i[t]));if(i.scale){const e=i.scale>0&&i.scale<10?i.scale:1;o=t.width*e,s=t.height*e}else o=i.width||i.height*t.width/t.height||t.width,s=i.height||i.width*t.height/t.width||t.height;switch([5,6,7,8].some(t=>t===i.orientation)?(n.height=o,n.width=s):(n.height=s,n.width=o),i.orientation){case 3:a.rotate(180*Math.PI/180),a.drawImage(t,-n.width,-n.height,n.width,n.height);break;case 6:a.rotate(90*Math.PI/180),a.drawImage(t,0,-n.width,n.height,n.width);break;case 8:a.rotate(270*Math.PI/180),a.drawImage(t,-n.height,0,n.height,n.width);break;case 2:a.translate(n.width,0),a.scale(-1,1),a.drawImage(t,0,0,n.width,n.height);break;case 4:a.translate(n.width,0),a.scale(-1,1),a.rotate(180*Math.PI/180),a.drawImage(t,-n.width,-n.height,n.width,n.height);break;case 5:a.translate(n.width,0),a.scale(-1,1),a.rotate(90*Math.PI/180),a.drawImage(t,0,-n.width,n.height,n.width);break;case 7:a.translate(n.width,0),a.scale(-1,1),a.rotate(270*Math.PI/180),a.drawImage(t,-n.height,0,n.height,n.width);break;default:a.drawImage(t,0,0,n.width,n.height)}return n}))}function m(t){return fetch(t).then(t=>t.blob())}function p(t){return new Promise((e,i)=>{const n=new Image;n.onload=()=>e(n),n.onerror=()=>i(new Error("urltoImage(): Image failed to load, please check the image URL")),n.src=t})}var w=function(t,e,i,n){return new(i||(i=Promise))((function(a,s){function o(t){try{c(n.next(t))}catch(t){s(t)}}function r(t){try{c(n.throw(t))}catch(t){s(t)}}function c(t){var e;t.done?a(t.value):(e=t.value,e instanceof i?e:new i((function(t){t(e)}))).then(o,r)}c((n=n.apply(t,e||[])).next())}))};function b(t,e={}){return w(this,void 0,void 0,(function*(){if(!(t instanceof Blob))throw new Error("compress(): First arg must be a Blob object or a File object.");if("object"!=typeof e&&(e=Object.assign({quality:e})),e.quality=Number(e.quality),Number.isNaN(e.quality))return t;const i=yield u(t);let s=i.split(",")[0].match(/:(.*?);/)[1],r=n.JPEG;a(e.type)&&(r=e.type,s=e.type);const c=yield d(i),g=yield f(c,Object.assign({},e)),h=yield o(g,e.quality,r),m=yield l(h,s);return m.size>t.size?t:m}))}function v(t,e={}){return w(this,void 0,void 0,(function*(){if(!(t instanceof Blob))throw new Error("compressAccurately(): First arg must be a Blob object or a File object.");if("object"!=typeof e&&(e=Object.assign({size:e})),e.size=Number(e.size),Number.isNaN(e.size))return t;if(1024*e.size>t.size)return t;e.accuracy=Number(e.accuracy),(!e.accuracy||e.accuracy<.8||e.accuracy>.99)&&(e.accuracy=.95);const i=e.size*(2-e.accuracy)*1024,s=1024*e.size,r=e.size*e.accuracy*1024,c=yield u(t);let g=c.split(",")[0].match(/:(.*?);/)[1],h=n.JPEG;a(e.type)&&(h=e.type,g=e.type);const m=yield d(c),p=yield f(m,Object.assign({},e));let w,b=.5;const v=[null,null];for(let t=1;t<=7;t++){w=yield o(p,b,h);const e=.75*w.length;if(7===t){(i<e||r>e)&&(w=[w,...v].filter(t=>t).sort((t,e)=>Math.abs(.75*t.length-s)-Math.abs(.75*e.length-s))[0]);break}if(i<e)v[1]=w,b-=Math.pow(.5,t+1);else{if(!(r>e))break;v[0]=w,b+=Math.pow(.5,t+1)}}const A=yield l(w,g);return A.size>t.size?t:A}))}}])}))},c60a:function(t,e,i){},e2c9:function(t,e,i){},eab0:function(t,e,i){t.exports=i.p+"img/location.4f38616f.png"}}]);