forked from Vanthink-UED/vue-core-image-upload
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
2 lines (2 loc) · 37.7 KB
/
index.js
1
2
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.VueCoreImageUpload=e():t.VueCoreImageUpload=e()}(this,function(){return function(t){function e(i){if(n[i])return n[i].exports;var o=n[i]={exports:{},id:i,loaded:!1};return t[i].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}([function(t,e,n){var i,o,r={};n(1),i=n(5),o=n(83),t.exports=i||{},t.exports.__esModule&&(t.exports=t.exports.default);var s="function"==typeof t.exports?t.exports.options||(t.exports.options={}):t.exports;o&&(s.template=o),s.computed||(s.computed={}),Object.keys(r).forEach(function(t){var e=r[t];s.computed[t]=function(){return e}})},function(t,e,n){var i=n(2);"string"==typeof i&&(i=[[t.id,i,""]]);n(4)(i,{});i.locals&&(t.exports=i.locals)},function(t,e,n){e=t.exports=n(3)(),e.push([t.id,'.g-core-image-upload-btn{position:relative;overflow:hidden}.g-core-image-upload-form{position:absolute;left:0;right:0;top:0;bottom:0;opacity:0}.g-core-image-upload-container{position:absolute;background:#111;z-index:900}.g-core-image-upload-modal{position:absolute;left:0;right:0;width:100%;height:100%;border:1px solid #ccc;z-index:899}.dropped{border:4px solid #ea6153}.g-core-image-corp-container{z-index:1900;position:fixed;left:0;right:0;top:0;bottom:0;background:rgba(0,0,0,.9);color:#f1f1f1}.g-core-image-corp-container .image-aside{overflow:hidden;position:absolute;right:30px;left:30px;top:60px;bottom:20px;text-align:center}.g-core-image-corp-container .image-aside img{max-width:100%;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.g-core-image-corp-container .info-aside{position:absolute;left:0;right:0;top:0;height:40px;padding-left:10px;padding-right:10px;background:#fefefe;color:#777}.g-core-image-corp-container .info-aside .image-corp-preview{position:relative;overflow:hidden;text-align:center;border:2px solid #ccc}.g-core-image-corp-container .info-aside .image-corp-preview.circled{border-radius:160px}.g-core-image-corp-container .info-aside .image-corp-preview img{width:100%}.g-core-image-corp-container .info-aside .config-info .image-details{width:100%;color:#999}.g-core-image-corp-container .info-aside .config-info .image-details td{border:none;line-height:24px}.g-core-image-corp-container .info-aside .config-info .image-details tr td:first-child{width:36%}.g-core-image-corp-container .info-aside .config-info .image-details tr td:last-child{color:#555}.g-core-image-corp-container .btn-groups{text-align:right;margin:5px 0 0}.g-core-image-corp-container .btn{display:inline-block;padding:0 15px;height:32px;margin-left:15px;background:#fff;border:1px solid #ccc;border-radius:2px;font-size:13px;color:#222;line-height:32px;-webkit-transition:all .1s ease-in;transition:all .1s ease-in}.g-core-image-corp-container .btn:hover{border:1px solid #777;box-shadow:0 1px 3px rgba(0,0,0,.05)},.g-core-image-corp-container .btn:active{background:#ddd}.g-core-image-corp-container .btn:disabled{background:#eee!important;border-color:#ccc;cursor:not-allowed}.g-core-image-corp-container .btn-upload{background:#27ae60;border-color:#27ae60;color:#fff}.g-core-image-corp-container .btn-upload:hover{background:#2dc26c;border-color:#27ae60;box-shadow:0 1px 3px rgba(0,0,0,.05)}.g-core-image-corp-container .g-crop-image-box,.g-core-image-corp-container .g-crop-image-box .g-crop-image-principal{position:relative}.g-core-image-corp-container .g-crop-image-box .select-recorte{position:absolute;background:#fff;opacity:.5;border:2px dashed #555;cursor:move}.g-core-image-corp-container .g-resize{z-index:90;position:absolute;bottom:1px;right:1px;width:20px;height:20px;cursor:se-resize}.g-core-image-corp-container .g-resize:after{content:"";display:block;position:absolute;background:#000;width:5px;height:5px;right:0;bottom:0}.g-core-image-corp-container .g-e-resize{cursor:e-resize;position:absolute;width:7px;right:-5px;top:0;height:100%}.g-core-image-corp-container .g-s-resize{position:absolute;cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}',""])},function(t,e){t.exports=function(){var t=[];return t.toString=function(){for(var t=[],e=0;e<this.length;e++){var n=this[e];n[2]?t.push("@media "+n[2]+"{"+n[1]+"}"):t.push(n[1])}return t.join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var i={},o=0;o<this.length;o++){var r=this[o][0];"number"==typeof r&&(i[r]=!0)}for(o=0;o<e.length;o++){var s=e[o];"number"==typeof s[0]&&i[s[0]]||(n&&!s[2]?s[2]=n:n&&(s[2]="("+s[2]+") and ("+n+")"),t.push(s))}},t}},function(t,e,n){function i(t,e){for(var n=0;n<t.length;n++){var i=t[n],o=f[i.id];if(o){o.refs++;for(var r=0;r<o.parts.length;r++)o.parts[r](i.parts[r]);for(;r<i.parts.length;r++)o.parts.push(c(i.parts[r],e))}else{for(var s=[],r=0;r<i.parts.length;r++)s.push(c(i.parts[r],e));f[i.id]={id:i.id,refs:1,parts:s}}}}function o(t){for(var e=[],n={},i=0;i<t.length;i++){var o=t[i],r=o[0],s=o[1],a=o[2],c=o[3],u={css:s,media:a,sourceMap:c};n[r]?n[r].parts.push(u):e.push(n[r]={id:r,parts:[u]})}return e}function r(t,e){var n=h(),i=m[m.length-1];if("top"===t.insertAt)i?i.nextSibling?n.insertBefore(e,i.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),m.push(e);else{if("bottom"!==t.insertAt)throw new Error("Invalid value for parameter 'insertAt'. Must be 'top' or 'bottom'.");n.appendChild(e)}}function s(t){t.parentNode.removeChild(t);var e=m.indexOf(t);e>=0&&m.splice(e,1)}function a(t){var e=document.createElement("style");return e.type="text/css",r(t,e),e}function c(t,e){var n,i,o;if(e.singleton){var r=A++;n=g||(g=a(e)),i=u.bind(null,n,r,!1),o=u.bind(null,n,r,!0)}else n=a(e),i=l.bind(null,n),o=function(){s(n)};return i(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;i(t=e)}else o()}}function u(t,e,n,i){var o=n?"":i.css;if(t.styleSheet)t.styleSheet.cssText=v(e,o);else{var r=document.createTextNode(o),s=t.childNodes;s[e]&&t.removeChild(s[e]),s.length?t.insertBefore(r,s[e]):t.appendChild(r)}}function l(t,e){var n=e.css,i=e.media,o=e.sourceMap;if(i&&t.setAttribute("media",i),o&&(n+="\n/*# sourceURL="+o.sources[0]+" */",n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(o))))+" */"),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}var f={},p=function(t){var e;return function(){return"undefined"==typeof e&&(e=t.apply(this,arguments)),e}},d=p(function(){return/msie [6-9]\b/.test(window.navigator.userAgent.toLowerCase())}),h=p(function(){return document.head||document.getElementsByTagName("head")[0]}),g=null,A=0,m=[];t.exports=function(t,e){e=e||{},"undefined"==typeof e.singleton&&(e.singleton=d()),"undefined"==typeof e.insertAt&&(e.insertAt="bottom");var n=o(t);return i(n,e),function(t){for(var r=[],s=0;s<n.length;s++){var a=n[s],c=f[a.id];c.refs--,r.push(c)}if(t){var u=o(t);i(u,e)}for(var s=0;s<r.length;s++){var c=r[s];if(0===c.refs){for(var l=0;l<c.parts.length;l++)c.parts[l]();delete f[c.id]}}}};var v=function(){var t=[];return function(e,n){return t[e]=n,t.filter(Boolean).join("\n")}}()},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(6),r=i(o),s=n(74),a=i(s),c=n(81),u=i(c),l=n(82),f=i(l),p="data:image/gif;base64,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";e.default={props:{url:{type:String},text:{type:String,default:"Upload Image"},class:{type:Array,default:function(){return[]}},extensions:{type:String,default:"png.jpg,jpeg,gif,svg,webp"},inputOfFile:{type:String,default:"files"},crop:{type:Boolean,default:!1},cropBtn:{type:Object,default:function(){return{ok:"Ok",cancel:"Cancel"}}},cropRatio:{type:String,default:"1:1"},maxFileSize:{type:Number,default:104857600},maxWidth:{type:Number},maxHeight:{type:Number},inputAccept:{type:String,default:"image/jpg,image/jpeg,image/png"},isXhr:{type:Boolean,default:!0},headers:{type:Object,default:function(){return{}}}},data:function(){return{files:[],hasImage:!1,options:this.props,uploading:!1,formID:(1e4*Math.random()+"").split(".")[0],image:{src:p,width:24,height:24}}},methods:{__dispatch:function(t,e){this.$emit&&this.$emit(t,e)},__find:function(t){var e=document.querySelector("#vciu-modal-"+this.formID);return e.querySelector(t)},change:function(t){var e=document.querySelector("#g-core-upload-input-"+this.formID).value.replace(/C:\\fakepath\\/i,""),n=e.substring(e.lastIndexOf(".")+1),i=this.extensions.split(",");if(i.length>1){var o=new RegExp("^["+i.join("|")+"]+$","i");if(!o.test(n))return this.__dispatch("errorHandle","TYPE ERROR")}if(t.target.files[0].size>this.maxFileSize){var r;return r=parseInt(this.maxFileSize/1024/1024)>0?(this.maxFileSize/1024/1024).toFixed(2)+"MB":parseInt(this.maxFileSize/1024)>0?(this.maxFileSize/1024).toFixed(2)+"kB":options.maxFileSize.toFixed(2)+"Byte",void this.errorHandle("FILE IS TOO LARGER MAX FILE IS "+r)}return this.files=t.target.files,this.crop?void this.__showImage():(this.__dispatch("imagechanged",this.files[0]),void this.tryAjaxUpload())},__showImage:function(){this.hasImage=!0,this.__readFiles()},__readFiles:function(){var t=new FileReader,e=this;t.onload=function(t){var n=t.target.result;e.__initImage(n)},t.readAsDataURL(this.files[0])},__initImage:function(t){var e=new Image,n=this;e.src=t,e.onload=function(){n.image.src=t,n.image.width=e.naturalWidth,n.image.height=e.naturalHeight,n.__reseyLayout(),n.__initCropBox()}},__initCropBox:function(){var t=document.querySelector("#vciu-modal-"+this.formID),e=t.querySelector(".select-recorte"),n=t.querySelector(".g-crop-image-principal"),i=parseInt(n.style.width),o=parseInt(n.style.height),r=this.cropRatio.split(":")[0],s=this.cropRatio.split(":")[1],a=i/100*80,c=a/r*s;e.style.cssText="width:"+a+"px;height: "+c+"px;left:"+(i-a)/2+"px;top:"+(o-c)/2+"px;",c>o&&(c=o/100*80,a=c*r/s,e.style.cssText="width:"+a+"px;height:"+c+"px;left:"+(i-a)/2+"px;top:"+(o-c)/2+"px")},__reseyLayout:function(){var t=window.innerHeight-80,e=window.innerWidth-60,n=this.image.width,i=this.image.height,o=n/i,r=e/t,s=document.querySelector("#vciu-modal-"+this.formID),a=s.querySelector(".g-crop-image-principal");o>r?(this.image.width=e,this.image.height=e/o,a.style.cssText="width:"+e+"px;height:"+e/o+"px;margin-top:"+(t-e/o)/2+"px"):(this.image.width=t*o,this.image.height=t,a.style.cssText="width:"+t*o+"px;height:"+t+"px;margin-left:"+(e-t*o)/2+"px;"),this.imgChangeRatio=n/this.image.width},doCrop:function(t){var e=t.target;e.value=e.value+"...",e.disabled=!0,"object"!==(0,r.default)(this.data)&&(this.data={});var n=this.__find(".select-recorte");this.data.request="crop",this.data.toCropImgX=parseInt(window.getComputedStyle(n).left)*this.imgChangeRatio,this.data.toCropImgY=parseInt(window.getComputedStyle(n).top)*this.imgChangeRatio,this.data.toCropImgW=parseInt(window.getComputedStyle(n).width)*this.imgChangeRatio,this.data.toCropImgH=parseInt(window.getComputedStyle(n).height)*this.imgChangeRatio,this.tryAjaxUpload(function(){e.value=e.value.replace("...",""),e.disabled=!1})},cancel:function(){this.hasImage=!1,this.files="",document.querySelector("#g-core-upload-input-"+this.formID).value=""},tryAjaxUpload:function(t){if(this.__dispatch("imageuploading",this.files[0]),!this.isXhr)return this.crop&&(this.hasImage=!1),"function"==typeof t&&t();for(var e=this,n=new FormData,i=0;i<this.files.length;i++)n.append(e.inputOfFile,this.files[i]);if("object"===(0,r.default)(this.data))for(var o in this.data)void 0!==this.data[o]&&n.append(o,this.data[o]);(0,f.default)("POST",this.url,this.headers,n,function(n){"function"==typeof t&&t(),e.uploading=!1,e.crop&&(e.hasImage=!1),e.__dispatch("imageuploaded",n)})},resize:function(t){t.stopPropagation();var e=t.target.parentElement,n=this.__find(".g-crop-image-principal");new u.default(e,n,this.cropRatio,t)},drag:function(t){t.preventDefault();var e=t.target,n=this.__find(".g-crop-image-principal");new a.default(e,n,t)}}}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}e.__esModule=!0;var o=n(7),r=i(o),s=n(58),a=i(s),c="function"==typeof a.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":typeof t};e.default="function"==typeof a.default&&"symbol"===c(r.default)?function(t){return"undefined"==typeof t?"undefined":c(t)}:function(t){return t&&"function"==typeof a.default&&t.constructor===a.default&&t!==a.default.prototype?"symbol":"undefined"==typeof t?"undefined":c(t)}},function(t,e,n){t.exports={default:n(8),__esModule:!0}},function(t,e,n){n(9),n(53),t.exports=n(57).f("iterator")},function(t,e,n){"use strict";var i=n(10)(!0);n(13)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})},function(t,e,n){var i=n(11),o=n(12);t.exports=function(t){return function(e,n){var r,s,a=String(o(e)),c=i(n),u=a.length;return c<0||c>=u?t?"":void 0:(r=a.charCodeAt(c),r<55296||r>56319||c+1===u||(s=a.charCodeAt(c+1))<56320||s>57343?t?a.charAt(c):r:t?a.slice(c,c+2):(r-55296<<10)+(s-56320)+65536)}}},function(t,e){var n=Math.ceil,i=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?i:n)(t)}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";var i=n(14),o=n(15),r=n(30),s=n(20),a=n(31),c=n(32),u=n(33),l=n(49),f=n(51),p=n(50)("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",g="keys",A="values",m=function(){return this};t.exports=function(t,e,n,v,y,x,w){u(n,e,v);var b,C,I,S=function(t){if(!d&&t in Q)return Q[t];switch(t){case g:return function(){return new n(this,t)};case A:return function(){return new n(this,t)}}return function(){return new n(this,t)}},E=e+" Iterator",B=y==A,O=!1,Q=t.prototype,k=Q[p]||Q[h]||y&&Q[y],M=k||S(y),D=y?B?S("entries"):M:void 0,j="Array"==e?Q.entries||k:k;if(j&&(I=f(j.call(new t)),I!==Object.prototype&&(l(I,E,!0),i||a(I,p)||s(I,p,m))),B&&k&&k.name!==A&&(O=!0,M=function(){return k.call(this)}),i&&!w||!d&&!O&&Q[p]||s(Q,p,M),c[e]=M,c[E]=m,y)if(b={values:B?M:S(A),keys:x?M:S(g),entries:D},w)for(C in b)C in Q||r(Q,C,b[C]);else o(o.P+o.F*(d||O),e,b);return b}},function(t,e){t.exports=!0},function(t,e,n){var i=n(16),o=n(17),r=n(18),s=n(20),a="prototype",c=function(t,e,n){var u,l,f,p=t&c.F,d=t&c.G,h=t&c.S,g=t&c.P,A=t&c.B,m=t&c.W,v=d?o:o[e]||(o[e]={}),y=v[a],x=d?i:h?i[e]:(i[e]||{})[a];d&&(n=e);for(u in n)l=!p&&x&&void 0!==x[u],l&&u in v||(f=l?x[u]:n[u],v[u]=d&&"function"!=typeof x[u]?n[u]:A&&l?r(f,i):m&&x[u]==f?function(t){var e=function(e,n,i){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,i)}return t.apply(this,arguments)};return e[a]=t[a],e}(f):g&&"function"==typeof f?r(Function.call,f):f,g&&((v.virtual||(v.virtual={}))[u]=f,t&c.R&&y&&!y[u]&&s(y,u,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n=t.exports={version:"2.4.0"};"number"==typeof __e&&(__e=n)},function(t,e,n){var i=n(19);t.exports=function(t,e,n){if(i(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,i){return t.call(e,n,i)};case 3:return function(n,i,o){return t.call(e,n,i,o)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e,n){var i=n(21),o=n(29);t.exports=n(25)?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var i=n(22),o=n(24),r=n(28),s=Object.defineProperty;e.f=n(25)?Object.defineProperty:function(t,e,n){if(i(t),e=r(e,!0),i(n),o)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var i=n(23);t.exports=function(t){if(!i(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){t.exports=!n(25)&&!n(26)(function(){return 7!=Object.defineProperty(n(27)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n){t.exports=!n(26)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var i=n(23),o=n(16).document,r=i(o)&&i(o.createElement);t.exports=function(t){return r?o.createElement(t):{}}},function(t,e,n){var i=n(23);t.exports=function(t,e){if(!i(t))return t;var n,o;if(e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;if("function"==typeof(n=t.valueOf)&&!i(o=n.call(t)))return o;if(!e&&"function"==typeof(n=t.toString)&&!i(o=n.call(t)))return o;throw TypeError("Can't convert object to primitive value")}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){t.exports=n(20)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e){t.exports={}},function(t,e,n){"use strict";var i=n(34),o=n(29),r=n(49),s={};n(20)(s,n(50)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=i(s,{next:o(1,n)}),r(t,e+" Iterator")}},function(t,e,n){var i=n(22),o=n(35),r=n(47),s=n(44)("IE_PROTO"),a=function(){},c="prototype",u=function(){var t,e=n(27)("iframe"),i=r.length,o="<",s=">";for(e.style.display="none",n(48).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(o+"script"+s+"document.F=Object"+o+"/script"+s),t.close(),u=t.F;i--;)delete u[c][r[i]];return u()};t.exports=Object.create||function(t,e){var n;return null!==t?(a[c]=i(t),n=new a,a[c]=null,n[s]=t):n=u(),void 0===e?n:o(n,e)}},function(t,e,n){var i=n(21),o=n(22),r=n(36);t.exports=n(25)?Object.defineProperties:function(t,e){o(t);for(var n,s=r(e),a=s.length,c=0;a>c;)i.f(t,n=s[c++],e[n]);return t}},function(t,e,n){var i=n(37),o=n(47);t.exports=Object.keys||function(t){return i(t,o)}},function(t,e,n){var i=n(31),o=n(38),r=n(41)(!1),s=n(44)("IE_PROTO");t.exports=function(t,e){var n,a=o(t),c=0,u=[];for(n in a)n!=s&&i(a,n)&&u.push(n);for(;e.length>c;)i(a,n=e[c++])&&(~r(u,n)||u.push(n));return u}},function(t,e,n){var i=n(39),o=n(12);t.exports=function(t){return i(o(t))}},function(t,e,n){var i=n(40);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==i(t)?t.split(""):Object(t)}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e,n){var i=n(38),o=n(42),r=n(43);t.exports=function(t){return function(e,n,s){var a,c=i(e),u=o(c.length),l=r(s,u);if(t&&n!=n){for(;u>l;)if(a=c[l++],a!=a)return!0}else for(;u>l;l++)if((t||l in c)&&c[l]===n)return t||l||0;return!t&&-1}}},function(t,e,n){var i=n(11),o=Math.min;t.exports=function(t){return t>0?o(i(t),9007199254740991):0}},function(t,e,n){var i=n(11),o=Math.max,r=Math.min;t.exports=function(t,e){return t=i(t),t<0?o(t+e,0):r(t,e)}},function(t,e,n){var i=n(45)("keys"),o=n(46);t.exports=function(t){return i[t]||(i[t]=o(t))}},function(t,e,n){var i=n(16),o="__core-js_shared__",r=i[o]||(i[o]={});t.exports=function(t){return r[t]||(r[t]={})}},function(t,e){var n=0,i=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+i).toString(36))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){t.exports=n(16).document&&document.documentElement},function(t,e,n){var i=n(21).f,o=n(31),r=n(50)("toStringTag");t.exports=function(t,e,n){t&&!o(t=n?t:t.prototype,r)&&i(t,r,{configurable:!0,value:e})}},function(t,e,n){var i=n(45)("wks"),o=n(46),r=n(16).Symbol,s="function"==typeof r,a=t.exports=function(t){return i[t]||(i[t]=s&&r[t]||(s?r:o)("Symbol."+t))};a.store=i},function(t,e,n){var i=n(31),o=n(52),r=n(44)("IE_PROTO"),s=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=o(t),i(t,r)?t[r]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?s:null}},function(t,e,n){var i=n(12);t.exports=function(t){return Object(i(t))}},function(t,e,n){n(54);for(var i=n(16),o=n(20),r=n(32),s=n(50)("toStringTag"),a=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],c=0;c<5;c++){var u=a[c],l=i[u],f=l&&l.prototype;f&&!f[s]&&o(f,s,u),r[u]=r.Array}},function(t,e,n){"use strict";var i=n(55),o=n(56),r=n(32),s=n(38);t.exports=n(13)(Array,"Array",function(t,e){this._t=s(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,o(1)):"keys"==e?o(0,n):"values"==e?o(0,t[n]):o(0,[n,t[n]])},"values"),r.Arguments=r.Array,i("keys"),i("values"),i("entries")},function(t,e){t.exports=function(){}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){e.f=n(50)},function(t,e,n){t.exports={default:n(59),__esModule:!0}},function(t,e,n){n(60),n(71),n(72),n(73),t.exports=n(17).Symbol},function(t,e,n){"use strict";var i=n(16),o=n(31),r=n(25),s=n(15),a=n(30),c=n(61).KEY,u=n(26),l=n(45),f=n(49),p=n(46),d=n(50),h=n(57),g=n(62),A=n(63),m=n(64),v=n(67),y=n(22),x=n(38),w=n(28),b=n(29),C=n(34),I=n(68),S=n(70),E=n(21),B=n(36),O=S.f,Q=E.f,k=I.f,M=i.Symbol,D=i.JSON,j=D&&D.stringify,_="prototype",L=d("_hidden"),R=d("toPrimitive"),N={}.propertyIsEnumerable,T=l("symbol-registry"),Y=l("symbols"),G=l("op-symbols"),H=Object[_],F="function"==typeof M,P=i.QObject,J=!P||!P[_]||!P[_].findChild,W=r&&u(function(){return 7!=C(Q({},"a",{get:function(){return Q(this,"a",{value:7}).a}})).a})?function(t,e,n){var i=O(H,e);i&&delete H[e],Q(t,e,n),i&&t!==H&&Q(H,e,i)}:Q,z=function(t){var e=Y[t]=C(M[_]);return e._k=t,e},q=F&&"symbol"==typeof M.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof M},K=function(t,e,n){return t===H&&K(G,e,n),y(t),e=w(e,!0),y(n),o(Y,e)?(n.enumerable?(o(t,L)&&t[L][e]&&(t[L][e]=!1),n=C(n,{enumerable:b(0,!1)})):(o(t,L)||Q(t,L,b(1,{})),t[L][e]=!0),W(t,e,n)):Q(t,e,n)},X=function(t,e){y(t);for(var n,i=m(e=x(e)),o=0,r=i.length;r>o;)K(t,n=i[o++],e[n]);return t},U=function(t,e){return void 0===e?C(t):X(C(t),e)},Z=function(t){var e=N.call(this,t=w(t,!0));return!(this===H&&o(Y,t)&&!o(G,t))&&(!(e||!o(this,t)||!o(Y,t)||o(this,L)&&this[L][t])||e)},V=function(t,e){if(t=x(t),e=w(e,!0),t!==H||!o(Y,e)||o(G,e)){var n=O(t,e);return!n||!o(Y,e)||o(t,L)&&t[L][e]||(n.enumerable=!0),n}},$=function(t){for(var e,n=k(x(t)),i=[],r=0;n.length>r;)o(Y,e=n[r++])||e==L||e==c||i.push(e);return i},tt=function(t){for(var e,n=t===H,i=k(n?G:x(t)),r=[],s=0;i.length>s;)!o(Y,e=i[s++])||n&&!o(H,e)||r.push(Y[e]);return r};F||(M=function(){if(this instanceof M)throw TypeError("Symbol is not a constructor!");var t=p(arguments.length>0?arguments[0]:void 0),e=function(n){this===H&&e.call(G,n),o(this,L)&&o(this[L],t)&&(this[L][t]=!1),W(this,t,b(1,n))};return r&&J&&W(H,t,{configurable:!0,set:e}),z(t)},a(M[_],"toString",function(){return this._k}),S.f=V,E.f=K,n(69).f=I.f=$,n(66).f=Z,n(65).f=tt,r&&!n(14)&&a(H,"propertyIsEnumerable",Z,!0),h.f=function(t){return z(d(t))}),s(s.G+s.W+s.F*!F,{Symbol:M});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)d(et[nt++]);for(var et=B(d.store),nt=0;et.length>nt;)g(et[nt++]);s(s.S+s.F*!F,"Symbol",{for:function(t){return o(T,t+="")?T[t]:T[t]=M(t)},keyFor:function(t){if(q(t))return A(T,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){J=!0},useSimple:function(){J=!1}}),s(s.S+s.F*!F,"Object",{create:U,defineProperty:K,defineProperties:X,getOwnPropertyDescriptor:V,getOwnPropertyNames:$,getOwnPropertySymbols:tt}),D&&s(s.S+s.F*(!F||u(function(){var t=M();return"[null]"!=j([t])||"{}"!=j({a:t})||"{}"!=j(Object(t))})),"JSON",{stringify:function(t){if(void 0!==t&&!q(t)){for(var e,n,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);return e=i[1],"function"==typeof e&&(n=e),!n&&v(e)||(e=function(t,e){if(n&&(e=n.call(this,t,e)),!q(e))return e}),i[1]=e,j.apply(D,i)}}}),M[_][R]||n(20)(M[_],R,M[_].valueOf),f(M,"Symbol"),f(Math,"Math",!0),f(i.JSON,"JSON",!0)},function(t,e,n){var i=n(46)("meta"),o=n(23),r=n(31),s=n(21).f,a=0,c=Object.isExtensible||function(){return!0},u=!n(26)(function(){return c(Object.preventExtensions({}))}),l=function(t){s(t,i,{value:{i:"O"+ ++a,w:{}}})},f=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!r(t,i)){if(!c(t))return"F";if(!e)return"E";l(t)}return t[i].i},p=function(t,e){if(!r(t,i)){if(!c(t))return!0;if(!e)return!1;l(t)}return t[i].w},d=function(t){return u&&h.NEED&&c(t)&&!r(t,i)&&l(t),t},h=t.exports={KEY:i,NEED:!1,fastKey:f,getWeak:p,onFreeze:d}},function(t,e,n){var i=n(16),o=n(17),r=n(14),s=n(57),a=n(21).f;t.exports=function(t){var e=o.Symbol||(o.Symbol=r?{}:i.Symbol||{});"_"==t.charAt(0)||t in e||a(e,t,{value:s.f(t)})}},function(t,e,n){var i=n(36),o=n(38);t.exports=function(t,e){for(var n,r=o(t),s=i(r),a=s.length,c=0;a>c;)if(r[n=s[c++]]===e)return n}},function(t,e,n){var i=n(36),o=n(65),r=n(66);t.exports=function(t){var e=i(t),n=o.f;if(n)for(var s,a=n(t),c=r.f,u=0;a.length>u;)c.call(t,s=a[u++])&&e.push(s);return e}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var i=n(40);t.exports=Array.isArray||function(t){return"Array"==i(t)}},function(t,e,n){var i=n(38),o=n(69).f,r={}.toString,s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],a=function(t){try{return o(t)}catch(t){return s.slice()}};t.exports.f=function(t){return s&&"[object Window]"==r.call(t)?a(t):o(i(t))}},function(t,e,n){var i=n(37),o=n(47).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},function(t,e,n){var i=n(66),o=n(29),r=n(38),s=n(28),a=n(31),c=n(24),u=Object.getOwnPropertyDescriptor;e.f=n(25)?u:function(t,e){if(t=r(t),e=s(e,!0),c)try{return u(t,e)}catch(t){}if(a(t,e))return o(!i.f.call(t,e),t[e])}},function(t,e){},function(t,e,n){n(62)("asyncIterator")},function(t,e,n){n(62)("observable")},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(75),r=i(o),s=n(76),a=i(s),c=n(80),u=i(c),l=u.default.isMobile,f=void 0,p=void 0,d=function(){function t(e,n,i){(0,r.default)(this,t);var o=this;return this.el=e,this.container=n,this.coor={x:(l?i.touches[0].clientX:i.clientX)-e.offsetLeft-e.parentElement.offsetLeft-document.getElementsByClassName("image-aside")[0].offsetLeft,y:(l?i.touches[0].clientY:i.clientY)-e.offsetTop-e.parentElement.offsetTop-document.getElementsByClassName("image-aside")[0].offsetTop,posX:l?i.touches[0].clientX:i.clientX,posy:l?i.touches[0].clientY:i.clientY,maxLeft:parseInt(this.container.style.width)-parseInt(this.el.style.width),maxTop:parseInt(this.container.style.height)-parseInt(this.el.style.height)},f=function(t){o.move(t)},p=function(t){o.stopMove(t)},l?(document.addEventListener("touchmove",f,!1),void document.addEventListener("touchend",p,!1)):(document.addEventListener("mousemove",f,!1),void document.addEventListener("mouseup",p,!1))}return(0,a.default)(t,[{key:"move",value:function(t){if(this.el){var e=l?t.changedTouches[0].clientX:t.clientX,n=l?t.changedTouches[0].clientY:t.clientY,i=e-this.el.parentElement.offsetLeft-document.getElementsByClassName("image-aside")[0].offsetLeft-this.coor.x,o=n-this.el.parentElement.offsetTop-document.getElementsByClassName("image-aside")[0].offsetTop-this.coor.y;i<=0&&(i=0),i>=this.coor.maxLeft&&(i=this.coor.maxLeft),o<=0&&(o=0),o>=this.coor.maxTop&&(o=this.coor.maxTop),this.el.style.left=i+"px",this.el.style.top=o+"px"}}},{key:"stopMove",value:function(){return this.el=null,l?(document.removeEventListener("touchmove",f,!1),void document.removeEventListener("touchend",p,!1)):(document.removeEventListener("mousemove",f,!1),void document.removeEventListener("mouseup",p,!1))}}]),t}();e.default=d},function(t,e){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{
default:t}}e.__esModule=!0;var o=n(77),r=i(o);e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,r.default)(t,i.key,i)}}return function(e,n,i){return n&&t(e.prototype,n),i&&t(e,i),e}}()},function(t,e,n){t.exports={default:n(78),__esModule:!0}},function(t,e,n){n(79);var i=n(17).Object;t.exports=function(t,e,n){return i.defineProperty(t,e,n)}},function(t,e,n){var i=n(15);i(i.S+i.F*!n(25),"Object",{defineProperty:n(21).f})},function(t,e){"use strict";t.exports={isMobile:/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}},function(t,e,n){"use strict";function i(t){return t&&t.__esModule?t:{default:t}}Object.defineProperty(e,"__esModule",{value:!0});var o=n(75),r=i(o),s=n(76),a=i(s),c=n(80),u=i(c),l=void 0,f=void 0,p=u.default.isMobile,d=document.body.offsetWidth,h=document.body.offsetHeight,g=function(){function t(e,n,i,o){(0,r.default)(this,t),o.stopPropagation();var s=this;this.coor={x:p?o.touches[0].clientX:o.clientX,y:p?o.touches[0].clientY:o.clientY,w:parseInt(window.getComputedStyle(e).width,10),h:parseInt(window.getComputedStyle(e).height,10)},this.splitX=i.split(":")[0],this.splitY=i.split(":")[1],this.el=e,this.container=n,l=function(t){s.drag(t)},f=function(t){s.stopDrag(t)},p&&(document.addEventListener("touchmove",l,!1),document.addEventListener("touchend",f,!1)),document.addEventListener("mousemove",l,!1),document.addEventListener("mouseup",f,!1)}return(0,a.default)(t,[{key:"drag",value:function(t){if(this.el){var e=document.querySelector(".g-crop-image-principal"),n=window.getComputedStyle(e).width,i=window.getComputedStyle(e).height,o=document.querySelector(".info-aside"),r=d-n,s=h-i-window.getComputedStyle(o).height,a=p?t.changedTouches[0].clientX:t.clientX,c=p?t.changedTouches[0].clientY:t.clientY;this.splitX>this.splitY?parseInt(a)<=r/2+n&&(parseInt(this.el.offsetWidth)>=n&&(this.el.style.width=window.getComputedStyle(e).width),this.el.style.width=this.coor.w+(p?t.changedTouches[0].clientX:t.clientX)-this.coor.x+"px",this.el.style.height=parseInt(this.el.offsetWidth)*(this.splitY/this.splitX)+"px",n>i?parseInt(this.el.offsetWidth)>=parseInt(window.getComputedStyle(e).height)&&(this.el.style.height=window.getComputedStyle(e).height,this.el.style.width=parseInt(window.getComputedStyle(e).height)*(this.splitX/this.splitY)+"px"):n<i?parseInt(this.el.offsetWidth)>=n&&(this.el.style.width=window.getComputedStyle(e).width,this.el.style.height=n*(this.splitY/this.splitX)+"px"):parseInt(this.el.offsetHeight)>=n&&(this.el.style.width=n,this.el.style.height=n*(this.splitY/this.splitX)+"px")):this.splitX<this.splitY?parseInt(c)<=s/2+i+window.getComputedStyle(o).height&&(this.el.style.height=this.coor.h+(p?t.changedTouches[0].clientY:t.clientY)-this.coor.y+"px",this.el.style.width=parseInt(this.el.style.height)*(this.splitX/this.splitY)+"px",n>i?parseInt(this.el.offsetHeight)>=i&&(this.el.style.height=i,this.el.style.width=i*(this.splitX/this.splitY)+"px"):n<i?parseInt(this.el.offsetWidth)>=n&&(this.el.style.width=n,this.el.style.height=n*(this.splitY/this.splitX)+"px"):parseInt(this.el.offsetWidth)>=n&&(this.el.style.width=n,this.el.style.height=n*(this.splitY/this.splitX)+"px")):parseInt(a)<=r/2+n&&(this.el.style.width=this.coor.w+(p?t.changedTouches[0].clientX:t.clientX)-this.coor.x+"px",this.el.style.height=this.el.style.width,n>i?parseInt(this.el.offsetHeight)>=i&&(this.el.style.height=i,this.el.style.width=i):n<i?parseInt(this.el.offsetWidth)>=n&&(this.el.style.width=n,this.el.style.height=n):parseInt(this.el.offsetWidth)>=n&&(this.el.style.width=this.el.style.height=n))}}},{key:"stopDrag",value:function(){this.el=null,p&&(document.removeEventListener("touchmove",l,!1),document.removeEventListener("touchend",f,!1)),document.removeEventListener("mousemove",l,!1),document.removeEventListener("mouseup",f,!1)}}]),t}();e.default=g},function(t,e){"use strict";t.exports=function(t,e,n,i,o,r){function s(t){for(var e={},n=/([a-z\-]+):\s?(.*);?/gi,i=void 0;i=n.exec(t);)e[i[1]]=i[2];return e}var a=new XMLHttpRequest,c=r||function(){console.error("AJAX ERROR!")},u=!1;"blob"===t&&(u=t,t="GET"),t=t.toUpperCase(),a.onload=function(){var e=a.response;try{e=JSON.parse(a.responseText)}catch(t){401===a.status&&(e=c("access_denied",a.statusText))}var n=s(a.getAllResponseHeaders());n.statusCode=a.status,o(e||("GET"===t?c("empty_response","Could not get resource"):{}),n)},a.onerror=function(){var t=a.responseText;try{t=JSON.parse(a.responseText)}catch(t){console.error(t)}o(t||c("access_denied","Could not get resource"))};var l=void 0;if("GET"===t||"DELETE"===t)i=null;else if(i&&"string"!=typeof i&&!(i instanceof FormData)&&!(i instanceof File)&&!(i instanceof Blob)){var f=new FormData;for(l in i)i.hasOwnProperty(l)&&(i[l]instanceof HTMLInputElement?"files"in i[l]&&i[l].files.length>0&&f.append(l,i[l].files[0]):i[l]instanceof Blob?f.append(l,i[l],i.name):f.append(l,i[l]));i=f}if(a.open(t,e,!0),u&&("responseType"in a?a.responseType=u:a.overrideMimeType("text/plain; charset=x-user-defined")),n)for(l in n)a.setRequestHeader(l,n[l]);return a.send(i),a}},function(t,e){t.exports=' <div class=g-core-image-upload-btn> {{text}} <form class=g-core-image-upload-form v-show=!hasImage method=post enctype=multipart/form-data action=/api2/common_user/cropHeadUrl style="display: block; cursor: pointer; position: absolute; left: 0px; top: 0px; width: 1242px; height: 61px; opacity: 0; margin: 0px; padding: 0px; overflow: hidden"> <input v-bind:disabled=uploading v-bind:id="\'g-core-upload-input-\' + formID" v-bind:name=inputOfFile type=file v-bind:accept=inputAccept v-on:change=change style="width: 100%; height: 100%"> </form> <div class=g-core-image-corp-container v-bind:id="\'vciu-modal-\' + formID" v-show=hasImage> <div class=image-aside> <div class=g-crop-image-box> <div class=g-crop-image-principal> <img v-bind:src=image.src v-bind:style="{ width:image.width + \'px\',height: image.height + \'px\' }"> <div class=select-recorte v-on:touchstart.self=drag v-on:mousedown.self=drag style=width:100px;height:100px> <div class=g-s-resize style="z-index: 90"></div> <div class=g-e-resize style="z-index: 90"></div> <div class=g-resize v-on:touchstart.self=resize v-on:mousedown.self=resize></div> </div> </div> </div> </div> <div class=info-aside> <p class=btn-groups> <button type=button v-on:click=doCrop class="btn btn-upload">{{cropBtn.ok}}</button> <button type=button v-on:click=cancel() class="btn btn-cancel">{{cropBtn.cancel}}</button> </p> </div> </div> </div> '}])});