vue-image-upload-resize
Version:
A simple Vue.js component for client-side image upload with resizing
7 lines • 56.2 kB
JavaScript
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["vue-image-upload-resize"]=e():t["vue-image-upload-resize"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s="fb15")}({"01f9":function(t,e,n){"use strict";var r=n("2d00"),i=n("5ca1"),o=n("2aba"),a=n("32e9"),c=n("84f2"),u=n("41a0"),s=n("7f20"),f=n("38fd"),l=n("2b4c")("iterator"),d=!([].keys&&"next"in[].keys()),h="@@iterator",p="keys",g="values",v=function(){return this};t.exports=function(t,e,n,m,y,b,w){u(n,e,m);var S,x,I,F=function(t){if(!d&&t in A)return A[t];switch(t){case p:return function(){return new n(this,t)};case g:return function(){return new n(this,t)}}return function(){return new n(this,t)}},P=e+" Iterator",C=y==g,E=!1,A=t.prototype,U=A[l]||A[h]||y&&A[y],R=U||F(y),T=y?C?F("entries"):R:void 0,_="Array"==e&&A.entries||U;if(_&&(I=f(_.call(new t)),I!==Object.prototype&&I.next&&(s(I,P,!0),r||"function"==typeof I[l]||a(I,l,v))),C&&U&&U.name!==g&&(E=!0,R=function(){return U.call(this)}),r&&!w||!d&&!E&&A[l]||a(A,l,R),c[e]=R,c[P]=v,y)if(S={values:C?R:F(g),keys:b?R:F(p),entries:T},w)for(x in S)x in A||o(A,x,S[x]);else i(i.P+i.F*(d||E),e,S);return S}},"02f4":function(t,e,n){var r=n("4588"),i=n("be13");t.exports=function(t){return function(e,n){var o,a,c=String(i(e)),u=r(n),s=c.length;return u<0||u>=s?t?"":void 0:(o=c.charCodeAt(u),o<55296||o>56319||u+1===s||(a=c.charCodeAt(u+1))<56320||a>57343?t?c.charAt(u):o:t?c.slice(u,u+2):a-56320+(o-55296<<10)+65536)}}},"0390":function(t,e,n){"use strict";var r=n("02f4")(!0);t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},"09fa":function(t,e,n){var r=n("4588"),i=n("9def");t.exports=function(t){if(void 0===t)return 0;var e=r(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},"0a49":function(t,e,n){var r=n("9b43"),i=n("626a"),o=n("4bf8"),a=n("9def"),c=n("cd1c");t.exports=function(t,e){var n=1==t,u=2==t,s=3==t,f=4==t,l=6==t,d=5==t||l,h=e||c;return function(e,c,p){for(var g,v,m=o(e),y=i(m),b=r(c,p,3),w=a(y.length),S=0,x=n?h(e,w):u?h(e,0):void 0;w>S;S++)if((d||S in y)&&(g=y[S],v=b(g,S,m),t))if(n)x[S]=v;else if(v)switch(t){case 3:return!0;case 5:return g;case 6:return S;case 2:x.push(g)}else if(f)return!1;return l?-1:s||f?f:x}}},"0bfb":function(t,e,n){"use strict";var r=n("cb7c");t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},"0d58":function(t,e,n){var r=n("ce10"),i=n("e11e");t.exports=Object.keys||function(t){return r(t,i)}},"0f88":function(t,e,n){var r,i=n("7726"),o=n("32e9"),a=n("ca5a"),c=a("typed_array"),u=a("view"),s=!(!i.ArrayBuffer||!i.DataView),f=s,l=0,d=9,h="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");while(l<d)(r=i[h[l++]])?(o(r.prototype,c,!0),o(r.prototype,u,!0)):f=!1;t.exports={ABV:s,CONSTR:f,TYPED:c,VIEW:u}},1169:function(t,e,n){var r=n("2d95");t.exports=Array.isArray||function(t){return"Array"==r(t)}},"11e9":function(t,e,n){var r=n("52a7"),i=n("4630"),o=n("6821"),a=n("6a99"),c=n("69a8"),u=n("c69a"),s=Object.getOwnPropertyDescriptor;e.f=n("9e1e")?s:function(t,e){if(t=o(t),e=a(e,!0),u)try{return s(t,e)}catch(n){}if(c(t,e))return i(!r.f.call(t,e),t[e])}},1495:function(t,e,n){var r=n("86cc"),i=n("cb7c"),o=n("0d58");t.exports=n("9e1e")?Object.defineProperties:function(t,e){i(t);var n,a=o(e),c=a.length,u=0;while(c>u)r.f(t,n=a[u++],e[n]);return t}},"20d0":function(t,e,n){var r;(function(i){"use strict";var o=i.HTMLCanvasElement&&i.HTMLCanvasElement.prototype,a=i.Blob&&function(){try{return Boolean(new Blob)}catch(t){return!1}}(),c=a&&i.Uint8Array&&function(){try{return 100===new Blob([new Uint8Array(100)]).size}catch(t){return!1}}(),u=i.BlobBuilder||i.WebKitBlobBuilder||i.MozBlobBuilder||i.MSBlobBuilder,s=/^data:((.*?)(;charset=.*?)?)(;base64)?,/,f=(a||u)&&i.atob&&i.ArrayBuffer&&i.Uint8Array&&function(t){var e,n,r,i,o,f,l,d,h;if(e=t.match(s),!e)throw new Error("invalid data URI");for(n=e[2]?e[1]:"text/plain"+(e[3]||";charset=US-ASCII"),r=!!e[4],i=t.slice(e[0].length),o=r?atob(i):decodeURIComponent(i),f=new ArrayBuffer(o.length),l=new Uint8Array(f),d=0;d<o.length;d+=1)l[d]=o.charCodeAt(d);return a?new Blob([c?l:f],{type:n}):(h=new u,h.append(f),h.getBlob(n))};i.HTMLCanvasElement&&!o.toBlob&&(o.mozGetAsFile?o.toBlob=function(t,e,n){var r=this;setTimeout((function(){n&&o.toDataURL&&f?t(f(r.toDataURL(e,n))):t(r.mozGetAsFile("blob",e))}))}:o.toDataURL&&f&&(o.toBlob=function(t,e,n){var r=this;setTimeout((function(){t(f(r.toDataURL(e,n)))}))})),r=function(){return f}.call(e,n,e,t),void 0===r||(t.exports=r)})(window)},"214f":function(t,e,n){"use strict";n("b0c5");var r=n("2aba"),i=n("32e9"),o=n("79e5"),a=n("be13"),c=n("2b4c"),u=n("520a"),s=c("species"),f=!o((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")})),l=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var d=c(t),h=!o((function(){var e={};return e[d]=function(){return 7},7!=""[t](e)})),p=h?!o((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[s]=function(){return n}),n[d](""),!e})):void 0;if(!h||!p||"replace"===t&&!f||"split"===t&&!l){var g=/./[d],v=n(a,d,""[t],(function(t,e,n,r,i){return e.exec===u?h&&!i?{done:!0,value:g.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}})),m=v[0],y=v[1];r(String.prototype,t,m),i(RegExp.prototype,d,2==e?function(t,e){return y.call(t,this,e)}:function(t){return y.call(t,this)})}}},"230e":function(t,e,n){var r=n("d3f4"),i=n("7726").document,o=r(i)&&r(i.createElement);t.exports=function(t){return o?i.createElement(t):{}}},"23c6":function(t,e,n){var r=n("2d95"),i=n("2b4c")("toStringTag"),o="Arguments"==r(function(){return arguments}()),a=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,c;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=a(e=Object(t),i))?n:o?r(e):"Object"==(c=r(e))&&"function"==typeof e.callee?"Arguments":c}},"27ee":function(t,e,n){var r=n("23c6"),i=n("2b4c")("iterator"),o=n("84f2");t.exports=n("8378").getIteratorMethod=function(t){if(void 0!=t)return t[i]||t["@@iterator"]||o[r(t)]}},"28a5":function(t,e,n){"use strict";var r=n("aae3"),i=n("cb7c"),o=n("ebd6"),a=n("0390"),c=n("9def"),u=n("5f1b"),s=n("520a"),f=n("79e5"),l=Math.min,d=[].push,h="split",p="length",g="lastIndex",v=4294967295,m=!f((function(){RegExp(v,"y")}));n("214f")("split",2,(function(t,e,n,f){var y;return y="c"=="abbc"[h](/(b)*/)[1]||4!="test"[h](/(?:)/,-1)[p]||2!="ab"[h](/(?:ab)*/)[p]||4!="."[h](/(.?)(.?)/)[p]||"."[h](/()()/)[p]>1||""[h](/.?/)[p]?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!r(t))return n.call(i,t,e);var o,a,c,u=[],f=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),l=0,h=void 0===e?v:e>>>0,m=new RegExp(t.source,f+"g");while(o=s.call(m,i)){if(a=m[g],a>l&&(u.push(i.slice(l,o.index)),o[p]>1&&o.index<i[p]&&d.apply(u,o.slice(1)),c=o[0][p],l=a,u[p]>=h))break;m[g]===o.index&&m[g]++}return l===i[p]?!c&&m.test("")||u.push(""):u.push(i.slice(l)),u[p]>h?u.slice(0,h):u}:"0"[h](void 0,0)[p]?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,r){var i=t(this),o=void 0==n?void 0:n[e];return void 0!==o?o.call(n,i,r):y.call(String(i),n,r)},function(t,e){var r=f(y,t,this,e,y!==n);if(r.done)return r.value;var s=i(t),d=String(this),h=o(s,RegExp),p=s.unicode,g=(s.ignoreCase?"i":"")+(s.multiline?"m":"")+(s.unicode?"u":"")+(m?"y":"g"),b=new h(m?s:"^(?:"+s.source+")",g),w=void 0===e?v:e>>>0;if(0===w)return[];if(0===d.length)return null===u(b,d)?[d]:[];var S=0,x=0,I=[];while(x<d.length){b.lastIndex=m?x:0;var F,P=u(b,m?d:d.slice(x));if(null===P||(F=l(c(b.lastIndex+(m?0:x)),d.length))===S)x=a(d,x,p);else{if(I.push(d.slice(S,x)),I.length===w)return I;for(var C=1;C<=P.length-1;C++)if(I.push(P[C]),I.length===w)return I;x=S=F}}return I.push(d.slice(S)),I}]}))},"2aba":function(t,e,n){var r=n("7726"),i=n("32e9"),o=n("69a8"),a=n("ca5a")("src"),c=n("fa5b"),u="toString",s=(""+c).split(u);n("8378").inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,c){var u="function"==typeof n;u&&(o(n,"name")||i(n,"name",e)),t[e]!==n&&(u&&(o(n,a)||i(n,a,t[e]?""+t[e]:s.join(String(e)))),t===r?t[e]=n:c?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,u,(function(){return"function"==typeof this&&this[a]||c.call(this)}))},"2aeb":function(t,e,n){var r=n("cb7c"),i=n("1495"),o=n("e11e"),a=n("613b")("IE_PROTO"),c=function(){},u="prototype",s=function(){var t,e=n("230e")("iframe"),r=o.length,i="<",a=">";e.style.display="none",n("fab2").appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write(i+"script"+a+"document.F=Object"+i+"/script"+a),t.close(),s=t.F;while(r--)delete s[u][o[r]];return s()};t.exports=Object.create||function(t,e){var n;return null!==t?(c[u]=r(t),n=new c,c[u]=null,n[a]=t):n=s(),void 0===e?n:i(n,e)}},"2af9":function(t,e,n){"use strict";(function(t){n.d(e,"b",(function(){return i}));var r=n("324b");
/*!
* vue-image-upload-resize
* Based on ImageUploader (c) Ross Turner (https://github.com/rossturner/HTML5-ImageUploader)
* Adapted by (c) 2018 Svale Fossåskaret (http://kartoteket.as/team/svale.html / @Fossesvale)
* @license MIT.
*/function i(t){i.installed||(i.installed=!0,t.component("ImageUploader",r["a"]))}var o={install:i},a=null;"undefined"!==typeof window?a=window.Vue:"undefined"!==typeof t&&(a=t.Vue),a&&a.use(o),r["a"].install=i,e["a"]=r["a"]}).call(this,n("c8ba"))},"2b4c":function(t,e,n){var r=n("5537")("wks"),i=n("ca5a"),o=n("7726").Symbol,a="function"==typeof o,c=t.exports=function(t){return r[t]||(r[t]=a&&o[t]||(a?o:i)("Symbol."+t))};c.store=r},"2d00":function(t,e){t.exports=!1},"2d95":function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},"2fdb":function(t,e,n){"use strict";var r=n("5ca1"),i=n("d2c8"),o="includes";r(r.P+r.F*n("5147")(o),"String",{includes:function(t){return!!~i(this,t,o).indexOf(t,arguments.length>1?arguments[1]:void 0)}})},"324b":function(t,e,n){"use strict";var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("img",{directives:[{name:"show",rawName:"v-show",value:t.imagePreview,expression:"imagePreview"}],staticClass:"img-preview",attrs:{src:t.imagePreview,width:"400"}}),n("input",{class:t.className,attrs:{id:t.id,type:"file",accept:t.accept,capture:t.capture},on:{change:t.uploadFile}}),t._t("upload-label")],2)},i=[],o=(n("7f7f"),n("ac6a"),n("cadf"),n("456d"),n("6762"),n("2fdb"),n("28a5"),n("c5f6"),n("34ef"),n("a481"),!1),a={36864:"ExifVersion",40960:"FlashpixVersion",40961:"ColorSpace",40962:"PixelXDimension",40963:"PixelYDimension",37121:"ComponentsConfiguration",37122:"CompressedBitsPerPixel",37500:"MakerNote",37510:"UserComment",40964:"RelatedSoundFile",36867:"DateTimeOriginal",36868:"DateTimeDigitized",37520:"SubsecTime",37521:"SubsecTimeOriginal",37522:"SubsecTimeDigitized",33434:"ExposureTime",33437:"FNumber",34850:"ExposureProgram",34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:"OECF",37377:"ShutterSpeedValue",37378:"ApertureValue",37379:"BrightnessValue",37380:"ExposureBias",37381:"MaxApertureValue",37382:"SubjectDistance",37383:"MeteringMode",37384:"LightSource",37385:"Flash",37396:"SubjectArea",37386:"FocalLength",41483:"FlashEnergy",41484:"SpatialFrequencyResponse",41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:"FocalPlaneResolutionUnit",41492:"SubjectLocation",41493:"ExposureIndex",41495:"SensingMethod",41728:"FileSource",41729:"SceneType",41730:"CFAPattern",41985:"CustomRendered",41986:"ExposureMode",41987:"WhiteBalance",41988:"DigitalZoomRation",41989:"FocalLengthIn35mmFilm",41990:"SceneCaptureType",41991:"GainControl",41992:"Contrast",41993:"Saturation",41994:"Sharpness",41995:"DeviceSettingDescription",41996:"SubjectDistanceRange",40965:"InteroperabilityIFDPointer",42016:"ImageUniqueID"},c={256:"ImageWidth",257:"ImageHeight",34665:"ExifIFDPointer",34853:"GPSInfoIFDPointer",40965:"InteroperabilityIFDPointer",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",274:"Orientation",277:"SamplesPerPixel",284:"PlanarConfiguration",530:"YCbCrSubSampling",531:"YCbCrPositioning",282:"XResolution",283:"YResolution",296:"ResolutionUnit",273:"StripOffsets",278:"RowsPerStrip",279:"StripByteCounts",513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",301:"TransferFunction",318:"WhitePoint",319:"PrimaryChromaticities",529:"YCbCrCoefficients",532:"ReferenceBlackWhite",306:"DateTime",270:"ImageDescription",271:"Make",272:"Model",305:"Software",315:"Artist",33432:"Copyright"},u={0:"GPSVersionID",1:"GPSLatitudeRef",2:"GPSLatitude",3:"GPSLongitudeRef",4:"GPSLongitude",5:"GPSAltitudeRef",6:"GPSAltitude",7:"GPSTimeStamp",8:"GPSSatellites",9:"GPSStatus",10:"GPSMeasureMode",11:"GPSDOP",12:"GPSSpeedRef",13:"GPSSpeed",14:"GPSTrackRef",15:"GPSTrack",16:"GPSImgDirectionRef",17:"GPSImgDirection",18:"GPSMapDatum",19:"GPSDestLatitudeRef",20:"GPSDestLatitude",21:"GPSDestLongitudeRef",22:"GPSDestLongitude",23:"GPSDestBearingRef",24:"GPSDestBearing",25:"GPSDestDistanceRef",26:"GPSDestDistance",27:"GPSProcessingMethod",28:"GPSAreaInformation",29:"GPSDateStamp",30:"GPSDifferential"},s={256:"ImageWidth",257:"ImageHeight",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",273:"StripOffsets",274:"Orientation",277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",282:"XResolution",283:"YResolution",284:"PlanarConfiguration",296:"ResolutionUnit",513:"JpegIFOffset",514:"JpegIFByteCount",529:"YCbCrCoefficients",530:"YCbCrSubSampling",531:"YCbCrPositioning",532:"ReferenceBlackWhite"},f={ExposureProgram:{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"},MeteringMode:{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"},LightSource:{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"},Flash:{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flash fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"},SensingMethod:{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"},SceneCaptureType:{0:"Standard",1:"Landscape",2:"Portrait",3:"Night scene"},SceneType:{1:"Directly photographed"},CustomRendered:{0:"Normal process",1:"Custom process"},WhiteBalance:{0:"Auto white balance",1:"Manual white balance"},GainControl:{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"},Contrast:{0:"Normal",1:"Soft",2:"Hard"},Saturation:{0:"Normal",1:"Low saturation",2:"High saturation"},Sharpness:{0:"Normal",1:"Soft",2:"Hard"},SubjectDistanceRange:{0:"Unknown",1:"Macro",2:"Close view",3:"Distant view"},FileSource:{3:"DSC"},Components:{0:"",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}},l={120:"caption",110:"credit",25:"keywords",55:"dateCreated",80:"byline",85:"bylineTitle",122:"captionWriter",105:"headline",116:"copyright",15:"category"};function d(t){return!!t.exifdata}function h(t){t=t.replace(/^data:([^;]+);base64,/gim,"");for(var e=atob(t),n=e.length,r=new ArrayBuffer(n),i=new Uint8Array(r),o=0;o<n;o++)i[o]=e.charCodeAt(o);return r}function p(t,e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200!=this.status&&0!==this.status||e(this.response)},n.send()}function g(t,e){function n(n){var r=v(n);t.exifdata=r||{};var i=m(n);t.iptcdata=i||{},e&&e.call(t)}if(t.src)if(/^data:/i.test(t.src)){var r=h(t.src);n(r)}else if(/^blob:/i.test(t.src)){var i=new FileReader;i.onload=function(t){n(t.target.result)},p(t.src,(function(t){i.readAsArrayBuffer(t)}))}else{var a=new XMLHttpRequest;a.onload=function(){if(200!=this.status&&0!==this.status)throw"Could not load image";n(a.response),a=null},a.open("GET",t.src,!0),a.responseType="arraybuffer",a.send(null)}else self.FileReader&&(t instanceof self.Blob||t instanceof self.File)&&(i=new FileReader,i.onload=function(t){o&&console.log("Got file of length "+t.target.result.byteLength),n(t.target.result)},i.readAsArrayBuffer(t))}function v(t){var e=new DataView(t);if(o&&console.log("Got file of length "+t.byteLength),255!=e.getUint8(0)||216!=e.getUint8(1))return o&&console.log("Not a valid JPEG"),!1;var n,r=2,i=t.byteLength;while(r<i){if(255!=e.getUint8(r))return o&&console.log("Not a valid marker at offset "+r+", found: "+e.getUint8(r)),!1;if(n=e.getUint8(r+1),o&&console.log(n),225==n)return o&&console.log("Found 0xFFE1 marker"),F(e,r+4,e.getUint16(r+2)-2);r+=2+e.getUint16(r+2)}}function m(t){var e=new DataView(t);if(o&&console.log("Got file of length "+t.byteLength),255!=e.getUint8(0)||216!=e.getUint8(1))return o&&console.log("Not a valid JPEG"),!1;var n=2,r=t.byteLength,i=function(t,e){return 56===t.getUint8(e)&&66===t.getUint8(e+1)&&73===t.getUint8(e+2)&&77===t.getUint8(e+3)&&4===t.getUint8(e+4)&&4===t.getUint8(e+5)};while(n<r){if(i(e,n)){var a=e.getUint8(n+7);a%2!==0&&(a+=1),0===a&&(a=4);var c=n+8+a,u=e.getUint16(n+6+a);return y(t,c,u)}n++}}function y(t,e,n){var r,i,o,a,c=new DataView(t),u={},s=e;while(s<e+n)28===c.getUint8(s)&&2===c.getUint8(s+1)&&(a=c.getUint8(s+2),a in l&&(o=c.getInt16(s+3),i=l[a],r=I(c,s+5,o),u.hasOwnProperty(i)?u[i]instanceof Array?u[i].push(r):u[i]=[u[i],r]:u[i]=r)),s++;return u}function b(t,e,n,r,i){var a,c,u,s=t.getUint16(n,!i),f={};for(u=0;u<s;u++)a=n+12*u+2,c=r[t.getUint16(a,!i)],!c&&o&&console.log("Unknown tag: "+t.getUint16(a,!i)),f[c]=w(t,a,e,n,i);return f}function w(t,e,n,r,i){var o,a,c,u,s,f,l=t.getUint16(e+2,!i),d=t.getUint32(e+4,!i),h=t.getUint32(e+8,!i)+n;switch(l){case 1:case 7:if(1==d)return t.getUint8(e+8,!i);for(o=d>4?h:e+8,a=[],u=0;u<d;u++)a[u]=t.getUint8(o+u);return a;case 2:return o=d>4?h:e+8,I(t,o,d-1);case 3:if(1==d)return t.getUint16(e+8,!i);for(o=d>2?h:e+8,a=[],u=0;u<d;u++)a[u]=t.getUint16(o+2*u,!i);return a;case 4:if(1==d)return t.getUint32(e+8,!i);for(a=[],u=0;u<d;u++)a[u]=t.getUint32(h+4*u,!i);return a;case 5:if(1==d)return s=t.getUint32(h,!i),f=t.getUint32(h+4,!i),c=new Number(s/f),c.numerator=s,c.denominator=f,c;for(a=[],u=0;u<d;u++)s=t.getUint32(h+8*u,!i),f=t.getUint32(h+4+8*u,!i),a[u]=new Number(s/f),a[u].numerator=s,a[u].denominator=f;return a;case 9:if(1==d)return t.getInt32(e+8,!i);for(a=[],u=0;u<d;u++)a[u]=t.getInt32(h+4*u,!i);return a;case 10:if(1==d)return t.getInt32(h,!i)/t.getInt32(h+4,!i);for(a=[],u=0;u<d;u++)a[u]=t.getInt32(h+8*u,!i)/t.getInt32(h+4+8*u,!i);return a}}function S(t,e,n){var r=t.getUint16(e,!n);return t.getUint32(e+2+12*r,!n)}function x(t,e,n,r){var i=S(t,e+n,r);if(!i)return{};if(i>t.byteLength)return{};var o=b(t,e,e+i,s,r);if(o["Compression"])switch(o["Compression"]){case 6:if(o.JpegIFOffset&&o.JpegIFByteCount){var a=e+o.JpegIFOffset,c=o.JpegIFByteCount;o["blob"]=new Blob([new Uint8Array(t.buffer,a,c)],{type:"image/jpeg"})}break;case 1:console.warn("Thumbnail image format is TIFF, which is not implemented.");break;default:console.warn("Unknown thumbnail image format '%s'",o["Compression"])}else 2==o["PhotometricInterpretation"]&&console.warn("Thumbnail image format is RGB, which is not implemented.");return o}function I(t,e,n){for(var r="",i=e;i<e+n;i++)r+=String.fromCharCode(t.getUint8(i));return r}function F(t,e){if("Exif"!=I(t,e,4))return o&&console.log("Not valid EXIF data! "+I(t,e,4)),!1;var n,r,i,s,l,d=e+6;if(18761==t.getUint16(d))n=!1;else{if(19789!=t.getUint16(d))return o&&console.log("Not valid TIFF data! (no 0x4949 or 0x4D4D)"),!1;n=!0}if(42!=t.getUint16(d+2,!n))return o&&console.log("Not valid TIFF data! (no 0x002A)"),!1;var h=t.getUint32(d+4,!n);if(h<8)return o&&console.log("Not valid TIFF data! (First offset less than 8)",t.getUint32(d+4,!n)),!1;if(r=b(t,d,d+h,c,n),r.ExifIFDPointer)for(i in s=b(t,d,d+r.ExifIFDPointer,a,n),s){switch(i){case"LightSource":case"Flash":case"MeteringMode":case"ExposureProgram":case"SensingMethod":case"SceneCaptureType":case"SceneType":case"CustomRendered":case"WhiteBalance":case"GainControl":case"Contrast":case"Saturation":case"Sharpness":case"SubjectDistanceRange":case"FileSource":s[i]=f[i][s[i]];break;case"ExifVersion":case"FlashpixVersion":s[i]=String.fromCharCode(s[i][0],s[i][1],s[i][2],s[i][3]);break;case"ComponentsConfiguration":s[i]=f.Components[s[i][0]]+f.Components[s[i][1]]+f.Components[s[i][2]]+f.Components[s[i][3]];break}r[i]=s[i]}if(r.GPSInfoIFDPointer)for(i in l=b(t,d,d+r.GPSInfoIFDPointer,u,n),l){switch(i){case"GPSVersionID":l[i]=l[i][0]+"."+l[i][1]+"."+l[i][2]+"."+l[i][3];break}r[i]=l[i]}return r["thumbnail"]=x(t,d,h,n),r}var P={getData:function(t,e){return!((self.Image&&t instanceof self.Image||self.HTMLImageElement&&t instanceof self.HTMLImageElement)&&!t.complete)&&(d(t)?e&&e.call(t):g(t,e),!0)},getTag:function(t,e){if(d(t))return t.exifdata[e]}},C=P,E=n("20d0"),A=n.n(E),U={name:"image-uploader",props:{id:{type:String,default:"fileInput"},maxWidth:{type:Number,default:1024},maxHeight:{type:Number,default:1024},maxSize:{type:Number,default:null},quality:{type:Number,default:1},scaleRatio:{type:Number,default:null},autoRotate:{type:Boolean,default:!1},preview:{type:Boolean,default:!0},outputFormat:{type:String,default:"string"},className:{type:[String,Array],default:"fileinput"},capture:{type:[String,Boolean],default:!1},accept:{type:String,default:"image/*"},doNotResize:{type:[String,Array],default:function(){return[]}},debug:{type:Number,default:0}},data:function(){return{imagePreview:null,currentFile:{},dimensions:{},exifData:{}}},methods:{uploadFile:function(t){var e=t.target.files&&t.target.files.length?t.target.files[0]:null;e&&(this.emitLoad(),this.handleFile(e))},emitEvent:function(t){this.log("emitEvent() is called with output:",2,t),this.$emit("input",t),this.$emit("change",t)},emitLoad:function(){this.$emit("onUpload")},emitComplete:function(){this.$emit("onComplete")},handleFile:function(t){this.log("handleFile() is called with file:",2,t),this.currentFile=t;var e=t.type.split("/"),n="image"===e[0],r="string"===typeof this.doNotResize?[this.doNotResize]:this.doNotResize;if(!n||r.includes("*")||r.includes(e[1]))this.log("No Resize, return file directly"),this.emitEvent(t),this.emitComplete();else{var i=this,o=document.createElement("img"),a=new window.FileReader;a.onload=function(t){i.log("reader.onload() is triggered",2),o.src=t.target.result,o.onload=function(){i.log("img.onload() is triggered",2),C.getData(o,(function(){i.exifData=this.exifdata,0===Object.keys(i.exifData).length&&i.log("ImageUploader: exif data found and extracted",2)})),i.scaleImage(o,i.exifData.Orientation)}},a.readAsDataURL(t)}},scaleImage:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.log("scaleImage() is called",2);var n=document.createElement("canvas");n.width=t.width,n.height=t.height;var r=n.getContext("2d");if(r.save(),this.autoRotate&&e>1){this.log("ImageUploader: rotating image as per EXIF orientation tag = "+e);var i=n.width,o=n.style.width,a=n.height,c=n.style.height;switch(e>4&&(n.width=a,n.style.width=c,n.height=i,n.style.height=o),e){case 2:r.translate(i,0),r.scale(-1,1);break;case 3:r.translate(i,a),r.rotate(Math.PI);break;case 4:r.translate(0,a),r.scale(1,-1);break;case 5:r.rotate(.5*Math.PI),r.scale(1,-1);break;case 6:r.rotate(.5*Math.PI),r.translate(0,-a);break;case 7:r.rotate(.5*Math.PI),r.translate(i,-a),r.scale(-1,1);break;case 8:r.rotate(-.5*Math.PI),r.translate(-i,0);break}}r.drawImage(t,0,0),r.restore();var u=n.width/n.height,s=Math.min(this.maxWidth,u*this.maxHeight);if(this.maxSize>0&&this.maxSize<n.width*n.height/1e6){var f=Math.floor(1e3*Math.sqrt(this.maxSize*u));s=s>0?Math.min(s,f):f}this.scaleRatio&&(s=Math.min(s,Math.floor(this.scaleRatio*n.width))),this.dimensions.orgWidth=n.width,this.dimensions.orgHeight=n.height,this.dimensions.width=s,this.dimensions.height=Math.floor(s/u),this.log("ImageUploader: original image size = "+n.width+" X "+n.height),this.log("ImageUploader: scaled image size = "+s+" X "+Math.floor(s/u)),s<=0&&(s=1,console.warning("ImageUploader: image size is too small"));while(n.width>=2*s)n=this.getHalfScaleCanvas(n);n.width>s&&(n=this.scaleCanvasWithAlgorithm(n,s));var l="image/jpeg"===this.currentFile.type?this.quality:1,d=n.toDataURL(this.currentFile.type,l);"function"===typeof this.onScale&&this.onScale(d),this.log("New ImageData is ready",2),this.preview&&(this.imagePreview=d),this.emitEvent(this.formatOutput(d)),this.emitComplete()},scaleCanvasWithAlgorithm:function(t,e){var n=document.createElement("canvas"),r=e/t.width;n.width=t.width*r,n.height=t.height*r;var i=t.getContext("2d").getImageData(0,0,t.width,t.height),o=n.getContext("2d").createImageData(n.width,n.height);return this.applyBilinearInterpolation(i,o,r),n.getContext("2d").putImageData(o,0,0),n},applyBilinearInterpolation:function(t,e,n){function r(t,e,n,r,i,o){var a=1-i,c=1-o;return t*a*c+e*i*c+n*a*o+r*i*o}var i,o,a,c,u,s,f,l,d,h,p,g,v,m,y,b,w,S,x;for(i=0;i<e.height;++i)for(a=i/n,c=Math.floor(a),u=Math.ceil(a)>t.height-1?t.height-1:Math.ceil(a),o=0;o<e.width;++o)s=o/n,f=Math.floor(s),l=Math.ceil(s)>t.width-1?t.width-1:Math.ceil(s),d=4*(o+e.width*i),h=4*(f+t.width*c),p=4*(l+t.width*c),g=4*(f+t.width*u),v=4*(l+t.width*u),m=s-f,y=a-c,b=r(t.data[h],t.data[p],t.data[g],t.data[v],m,y),e.data[d]=b,w=r(t.data[h+1],t.data[p+1],t.data[g+1],t.data[v+1],m,y),e.data[d+1]=w,S=r(t.data[h+2],t.data[p+2],t.data[g+2],t.data[v+2],m,y),e.data[d+2]=S,x=r(t.data[h+3],t.data[p+3],t.data[g+3],t.data[v+3],m,y),e.data[d+3]=x},getHalfScaleCanvas:function(t){var e=document.createElement("canvas");return e.width=t.width/2,e.height=t.height/2,e.getContext("2d").drawImage(t,0,0,e.width,e.height),e},formatOutput:function(t){if(this.log("ImageUploader: outputFormat: "+this.outputFormat),"file"===this.outputFormat)return this.currentFile;if("blob"===this.outputFormat)return"undefined"===typeof A.a?(console.warn('Missing library! blueimp-canvas-to-blob.js must be loaded to output as "blob"'),console.warn("Falling back to default base64 dataUrl"),t):A()(t);var e={name:this.currentFile.name,type:this.currentFile.type,newWidth:this.dimensions.width,newHeight:this.dimensions.height,orgWidth:this.dimensions.orgWidth,orgHeight:this.dimensions.orgHeight,aspectRatio:Math.round(this.dimensions.width/this.dimensions.height*100)/100,modifiedTimestamp:this.currentFile.lastModified,modifiedDate:this.currentFile.lastModifiedDate};if("info"===this.outputFormat)return e;if("verbose"===this.outputFormat){var n={dataUrl:t,info:e,exif:Object.keys(this.exifData).length>0?this.exifData:null};return n}return t},log:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;this.debug>=e&&(console.info(t),n&&console.info(n))}},created:function(){this.log("Initialised ImageUploader")}},R=U;function T(t,e,n,r,i,o,a,c){var u,s="function"===typeof t?t.options:t;if(e&&(s.render=e,s.staticRenderFns=n,s._compiled=!0),r&&(s.functional=!0),o&&(s._scopeId="data-v-"+o),a?(u=function(t){t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext,t||"undefined"===typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(a)},s._ssrRegister=u):i&&(u=c?function(){i.call(this,this.$root.$options.shadowRoot)}:i),u)if(s.functional){s._injectStyles=u;var f=s.render;s.render=function(t,e){return u.call(e),f(t,e)}}else{var l=s.beforeCreate;s.beforeCreate=l?[].concat(l,u):[u]}return{exports:t,options:s}}var _=T(R,r,i,!1,null,null,null);e["a"]=_.exports},"32e9":function(t,e,n){var r=n("86cc"),i=n("4630");t.exports=n("9e1e")?function(t,e,n){return r.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},"33a4":function(t,e,n){var r=n("84f2"),i=n("2b4c")("iterator"),o=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||o[i]===t)}},"34ef":function(t,e,n){n("ec30")("Uint8",1,(function(t){return function(e,n,r){return t(this,e,n,r)}}))},"36bd":function(t,e,n){"use strict";var r=n("4bf8"),i=n("77f1"),o=n("9def");t.exports=function(t){var e=r(this),n=o(e.length),a=arguments.length,c=i(a>1?arguments[1]:void 0,n),u=a>2?arguments[2]:void 0,s=void 0===u?n:i(u,n);while(s>c)e[c++]=t;return e}},"38fd":function(t,e,n){var r=n("69a8"),i=n("4bf8"),o=n("613b")("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),r(t,o)?t[o]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},"41a0":function(t,e,n){"use strict";var r=n("2aeb"),i=n("4630"),o=n("7f20"),a={};n("32e9")(a,n("2b4c")("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=r(a,{next:i(1,n)}),o(t,e+" Iterator")}},"456d":function(t,e,n){var r=n("4bf8"),i=n("0d58");n("5eda")("keys",(function(){return function(t){return i(r(t))}}))},4588:function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},4630:function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},"4bf8":function(t,e,n){var r=n("be13");t.exports=function(t){return Object(r(t))}},5147:function(t,e,n){var r=n("2b4c")("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,!"/./"[t](e)}catch(i){}}return!0}},"520a":function(t,e,n){"use strict";var r=n("0bfb"),i=RegExp.prototype.exec,o=String.prototype.replace,a=i,c="lastIndex",u=function(){var t=/a/,e=/b*/g;return i.call(t,"a"),i.call(e,"a"),0!==t[c]||0!==e[c]}(),s=void 0!==/()??/.exec("")[1],f=u||s;f&&(a=function(t){var e,n,a,f,l=this;return s&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),u&&(e=l[c]),a=i.call(l,t),u&&a&&(l[c]=l.global?a.index+a[0].length:e),s&&a&&a.length>1&&o.call(a[0],n,(function(){for(f=1;f<arguments.length-2;f++)void 0===arguments[f]&&(a[f]=void 0)})),a}),t.exports=a},"52a7":function(t,e){e.f={}.propertyIsEnumerable},5537:function(t,e,n){var r=n("8378"),i=n("7726"),o="__core-js_shared__",a=i[o]||(i[o]={});(t.exports=function(t,e){return a[t]||(a[t]=void 0!==e?e:{})})("versions",[]).push({version:r.version,mode:n("2d00")?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},"5ca1":function(t,e,n){var r=n("7726"),i=n("8378"),o=n("32e9"),a=n("2aba"),c=n("9b43"),u="prototype",s=function(t,e,n){var f,l,d,h,p=t&s.F,g=t&s.G,v=t&s.S,m=t&s.P,y=t&s.B,b=g?r:v?r[e]||(r[e]={}):(r[e]||{})[u],w=g?i:i[e]||(i[e]={}),S=w[u]||(w[u]={});for(f in g&&(n=e),n)l=!p&&b&&void 0!==b[f],d=(l?b:n)[f],h=y&&l?c(d,r):m&&"function"==typeof d?c(Function.call,d):d,b&&a(b,f,d,t&s.U),w[f]!=d&&o(w,f,h),m&&S[f]!=d&&(S[f]=d)};r.core=i,s.F=1,s.G=2,s.S=4,s.P=8,s.B=16,s.W=32,s.U=64,s.R=128,t.exports=s},"5cc5":function(t,e,n){var r=n("2b4c")("iterator"),i=!1;try{var o=[7][r]();o["return"]=function(){i=!0},Array.from(o,(function(){throw 2}))}catch(a){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o=[7],c=o[r]();c.next=function(){return{done:n=!0}},o[r]=function(){return c},t(o)}catch(a){}return n}},"5dbc":function(t,e,n){var r=n("d3f4"),i=n("8b97").set;t.exports=function(t,e,n){var o,a=e.constructor;return a!==n&&"function"==typeof a&&(o=a.prototype)!==n.prototype&&r(o)&&i&&i(t,o),t}},"5eda":function(t,e,n){var r=n("5ca1"),i=n("8378"),o=n("79e5");t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),r(r.S+r.F*o((function(){n(1)})),"Object",a)}},"5f1b":function(t,e,n){"use strict";var r=n("23c6"),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"===typeof n){var o=n.call(t,e);if("object"!==typeof o)throw new TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},"613b":function(t,e,n){var r=n("5537")("keys"),i=n("ca5a");t.exports=function(t){return r[t]||(r[t]=i(t))}},"626a":function(t,e,n){var r=n("2d95");t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==r(t)?t.split(""):Object(t)}},6762:function(t,e,n){"use strict";var r=n("5ca1"),i=n("c366")(!0);r(r.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n("9c6c")("includes")},6821:function(t,e,n){var r=n("626a"),i=n("be13");t.exports=function(t){return r(i(t))}},"69a8":function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},"6a99":function(t,e,n){var r=n("d3f4");t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},7726: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)},"77f1":function(t,e,n){var r=n("4588"),i=Math.max,o=Math.min;t.exports=function(t,e){return t=r(t),t<0?i(t+e,0):o(t,e)}},"79e5":function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},"7a56":function(t,e,n){"use strict";var r=n("7726"),i=n("86cc"),o=n("9e1e"),a=n("2b4c")("species");t.exports=function(t){var e=r[t];o&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},"7f20":function(t,e,n){var r=n("86cc").f,i=n("69a8"),o=n("2b4c")("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},"7f7f":function(t,e,n){var r=n("86cc").f,i=Function.prototype,o=/^\s*function ([^ (]*)/,a="name";a in i||n("9e1e")&&r(i,a,{configurable:!0,get:function(){try{return(""+this).match(o)[1]}catch(t){return""}}})},8378:function(t,e){var n=t.exports={version:"2.6.11"};"number"==typeof __e&&(__e=n)},"84f2":function(t,e){t.exports={}},"86cc":function(t,e,n){var r=n("cb7c"),i=n("c69a"),o=n("6a99"),a=Object.defineProperty;e.f=n("9e1e")?Object.defineProperty:function(t,e,n){if(r(t),e=o(e,!0),r(n),i)try{return a(t,e,n)}catch(c){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},"8b97":function(t,e,n){var r=n("d3f4"),i=n("cb7c"),o=function(t,e){if(i(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n("9b43")(Function.call,n("11e9").f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(i){e=!0}return function(t,n){return o(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:o}},9093:function(t,e,n){var r=n("ce10"),i=n("e11e").concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},"9b43":function(t,e,n){var r=n("d8e8");t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},"9c6c":function(t,e,n){var r=n("2b4c")("unscopables"),i=Array.prototype;void 0==i[r]&&n("32e9")(i,r,{}),t.exports=function(t){i[r][t]=!0}},"9def":function(t,e,n){var r=n("4588"),i=Math.min;t.exports=function(t){return t>0?i(r(t),9007199254740991):0}},"9e1e":function(t,e,n){t.exports=!n("79e5")((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},a481:function(t,e,n){"use strict";var r=n("cb7c"),i=n("4bf8"),o=n("9def"),a=n("4588"),c=n("0390"),u=n("5f1b"),s=Math.max,f=Math.min,l=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g,p=function(t){return void 0===t?t:String(t)};n("214f")("replace",2,(function(t,e,n,g){return[function(r,i){var o=t(this),a=void 0==r?void 0:r[e];return void 0!==a?a.call(r,o,i):n.call(String(o),r,i)},function(t,e){var i=g(n,t,this,e);if(i.done)return i.value;var l=r(t),d=String(this),h="function"===typeof e;h||(e=String(e));var m=l.global;if(m){var y=l.unicode;l.lastIndex=0}var b=[];while(1){var w=u(l,d);if(null===w)break;if(b.push(w),!m)break;var S=String(w[0]);""===S&&(l.lastIndex=c(d,o(l.lastIndex),y))}for(var x="",I=0,F=0;F<b.length;F++){w=b[F];for(var P=String(w[0]),C=s(f(a(w.index),d.length),0),E=[],A=1;A<w.length;A++)E.push(p(w[A]));var U=w.groups;if(h){var R=[P].concat(E,C,d);void 0!==U&&R.push(U);var T=String(e.apply(void 0,R))}else T=v(P,d,C,E,U,e);C>=I&&(x+=d.slice(I,C)+T,I=C+P.length)}return x+d.slice(I)}];function v(t,e,r,o,a,c){var u=r+t.length,s=o.length,f=h;return void 0!==a&&(a=i(a),f=d),n.call(c,f,(function(n,i){var c;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,r);case"'":return e.slice(u);case"<":c=a[i.slice(1,-1)];break;default:var f=+i;if(0===f)return n;if(f>s){var d=l(f/10);return 0===d?n:d<=s?void 0===o[d-1]?i.charAt(1):o[d-1]+i.charAt(1):n}c=o[f-1]}return void 0===c?"":c}))}}))},aa77:function(t,e,n){var r=n("5ca1"),i=n("be13"),o=n("79e5"),a=n("fdef"),c="["+a+"]",u="
",s=RegExp("^"+c+c+"*"),f=RegExp(c+c+"*$"),l=function(t,e,n){var i={},c=o((function(){return!!a[t]()||u[t]()!=u})),s=i[t]=c?e(d):a[t];n&&(i[n]=s),r(r.P+r.F*c,"String",i)},d=l.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(s,"")),2&e&&(t=t.replace(f,"")),t};t.exports=l},aae3:function(t,e,n){var r=n("d3f4"),i=n("2d95"),o=n("2b4c")("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},ac6a:function(t,e,n){for(var r=n("cadf"),i=n("0d58"),o=n("2aba"),a=n("7726"),c=n("32e9"),u=n("84f2"),s=n("2b4c"),f=s("iterator"),l=s("toStringTag"),d=u.Array,h={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},p=i(h),g=0;g<p.length;g++){var v,m=p[g],y=h[m],b=a[m],w=b&&b.prototype;if(w&&(w[f]||c(w,f,d),w[l]||c(w,l,m),u[m]=d,y))for(v in r)w[v]||o(w,v,r[v],!0)}},b0c5:function(t,e,n){"use strict";var r=n("520a");n("5ca1")({target:"RegExp",proto:!0,forced:r!==/./.exec},{exec:r})},ba92:function(t,e,n){"use strict";var r=n("4bf8"),i=n("77f1"),o=n("9def");t.exports=[].copyWithin||function(t,e){var n=r(this),a=o(n.length),c=i(t,a),u=i(e,a),s=arguments.length>2?arguments[2]:void 0,f=Math.min((void 0===s?a:i(s,a))-u,a-c),l=1;u<c&&c<u+f&&(l=-1,u+=f-1,c+=f-1);while(f-- >0)u in n?n[c]=n[u]:delete n[c],c+=l,u+=l;return n}},be13:function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},c366:function(t,e,n){var r=n("6821"),i=n("9def"),o=n("77f1");t.exports=function(t){return function(e,n,a){var c,u=r(e),s=i(u.length),f=o(a,s);if(t&&n!=n){while(s>f)if(c=u[f++],c!=c)return!0}else for(;s>f;f++)if((t||f in u)&&u[f]===n)return t||f||0;return!t&&-1}}},c5f6:function(t,e,n){"use strict";var r=n("7726"),i=n("69a8"),o=n("2d95"),a=n("5dbc"),c=n("6a99"),u=n("79e5"),s=n("9093").f,f=n("11e9").f,l=n("86cc").f,d=n("aa77").trim,h="Number",p=r[h],g=p,v=p.prototype,m=o(n("2aeb")(v))==h,y="trim"in String.prototype,b=function(t){var e=c(t,!1);if("string"==typeof e&&e.length>2){e=y?e.trim():d(e,3);var n,r,i,o=e.charCodeAt(0);if(43===o||45===o){if(n=e.charCodeAt(2),88===n||120===n)return NaN}else if(48===o){switch(e.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+e}for(var a,u=e.slice(2),s=0,f=u.length;s<f;s++)if(a=u.charCodeAt(s),a<48||a>i)return NaN;return parseInt(u,r)}}return+e};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof p&&(m?u((function(){v.valueOf.call(n)})):o(n)!=h)?a(new g(b(e)),n,p):b(e)};for(var w,S=n("9e1e")?s(g):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;S.length>x;x++)i(g,w=S[x])&&!i(p,w)&&l(p,w,f(g,w));p.prototype=v,v.constructor=p,n("2aba")(r,h,p)}},c69a:function(t,e,n){t.exports=!n("9e1e")&&!n("79e5")((function(){return 7!=Object.defineProperty(n("230e")("div"),"a",{get:function(){return 7}}).a}))},c8ba:function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(r){"object"===typeof window&&(n=window)}t.exports=n},ca5a:function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},cadf:function(t,e,n){"use strict";var r=n("9c6c"),i=n("d53b"),o=n("84f2"),a=n("6821");t.exports=n("01f9")(Array,"Array",(function(t,e){this._t=a(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,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),o.Arguments=o.Array,r("keys"),r("values"),r("entries")},cb7c:function(t,e,n){var r=n("d3f4");t.exports=function(t){if(!r(t))throw TypeError(t+" is not an object!");return t}},cd1c:function(t,e,n){var r=n("e853");t.exports=function(t,e){return new(r(t))(e)}},ce10:function(t,e,n){var r=n("69a8"),i=n("6821"),o=n("c366")(!1),a=n("613b")("IE_PROTO");t.exports=function(t,e){var n,c=i(t),u=0,s=[];for(n in c)n!=a&&r(c,n)&&s.push(n);while(e.length>u)r(c,n=e[u++])&&(~o(s,n)||s.push(n));return s}},d2c8:function(t,e,n){var r=n("aae3"),i=n("be13");t.exports=function(t,e,n){if(r(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},d3f4:function(t,e){t.exports=function(t){return"object"===typeof t?null!==t:"function"===typeof t}},d53b:function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},d8e8:function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},dcbc:function(t,e,n){var r=n("2aba");t.exports=function(t,e,n){for(var i in e)r(t,i,e[i],n);return t}},e11e:function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},e853:function(t,e,n){var r=n("d3f4"),i=n("1169"),o=n("2b4c")("species");t.exports=function(t){var e;return i(t)&&(e=t.constructor,"function"!=typeof e||e!==Array&&!i(e.prototype)||(e=void 0),r(e)&&(e=e[o],null===e&&(e=void 0))),void 0===e?Array:e}},ebd6:function(t,e,n){var r=n("cb7c"),i=n("d8e8"),o=n("2b4c")("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||void 0==(n=r(a)[o])?e:i(n)}},ec30:function(t,e,n){"use strict";if(n("9e1e")){var r=n("2d00"),i=n("7726"),o=n("79e5"),a=n("5ca1"),c=n("0f88"),u=n("ed0b"),s=n("9b43"),f=n("f605"),l=n("4630"),d=n("32e9"),h=n("dcbc"),p=n("4588"),g=n("9def"),v=n("09fa"),m=n("77f1"),y=n("6a99"),b=n("69a8"),w=n("23c6"),S=n("d3f4"),x=n("4bf8"),I=n("33a4"),F=n("2aeb"),P=n("38fd"),C=n("9093").f,E=n("27ee"),A=n("ca5a"),U=n("2b4c"),R=n("0a49"),T=n("c366"),_=n("ebd6"),M=n("cadf"),D=n("84f2"),O=n("5cc5"),L=n("7a56"),N=n("36bd"),B=n("ba92"),G=n("86cc"),j=n("11e9"),k=G.f,V=j.f,W=i.RangeError,H=i.TypeError,z=i.Uint8Array,$="ArrayBuffer",Y="Shared"+$,X="BYTES_PER_ELEMENT",q="prototype",J=Array[q],K=u.ArrayBuffer,Z=u.DataView,Q=R(0),tt=R(2),et=R(3),nt=R(4),rt=R(5),it=R(6),ot=T(!0),at=T(!1),ct=M.values,ut=M.keys,st=M.entries,ft=J.lastIndexOf,lt=J.reduce,dt=J.reduceRight,ht=J.join,pt=J.sort,gt=J.slice,vt=J.toString,mt=J.toLocaleString,yt=U("iterator"),bt=U("toStringTag"),wt=A("typed_constructor"),St=A("def_constructor"),xt=c.CONSTR,It=c.TYPED,Ft=c.VIEW,Pt="Wrong length!",Ct=R(1,(function(t,e){return Tt(_(t,t[St]),e)})),Et=o((function(){return 1===new z(new Uint16Array([1]).buffer)[0]})),At=!!z&&!!z[q].set&&o((function(){new z(1).set({})})),Ut=function(t,e){var n=p(t);if(n<0||n%e)throw W("Wrong offset!");return n},Rt=function(t){if(S(t)&&It in t)return t;throw H(t+" is not a typed array!")},Tt=function(t,e){if(!(S(t)&&wt in t))throw H("It is not a typed array constructor!");return new t(e)},_t=function(t,e){return Mt(_(t,t[St]),e)},Mt=function(t,e){var n=0,r=e.length,i=Tt(t,r);while(r>n)i[n]=e[n++];return i},Dt=function(t,e,n){k(t,e,{get:function(){return this._d[n]}})},Ot=function(t){var e,n,r,i,o,a,c=x(t),u=arguments.length,f=u>1?arguments[1]:void 0,l=void 0!==f,d=E(c);if(void 0!=d&&!I(d)){for(a=d.call(c),r=[],e=0;!(o=a.next()).done;e++)r.push(o.value);c=r}for(l&&u>2&&(f=s(f,arguments[2],2)),e=0,n=g(c.length),i=Tt(this,n);n>e;e++)i[e]=l?f(c[e],e):c[e];return i},Lt=function(){var t=0,e=arguments.length,n=Tt(this,e);while(e>t)n[t]=arguments[t++];return n},Nt=!!z&&o((function(){mt.call(new z(1))})),Bt=function(){return mt.apply(Nt?gt.call(Rt(this)):Rt(this),arguments)},Gt={copyWithin:function(t,e){return B.call(Rt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return nt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return N.apply(Rt(this),arguments)},filter:function(t){return _t(this,tt(Rt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return rt(Rt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return it(Rt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Q(Rt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return at(Rt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return ot(Rt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ht.apply(Rt(this),arguments)},lastIndexOf:function(t){return ft.apply(Rt(this),arguments)},map:function(t){return Ct(Rt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return lt.apply(Rt(this),arguments)},reduceRight:function(t){return dt.apply(Rt(this),arguments)},reverse:function(){var t,e=this,n=Rt(e).length,r=Math.floor(n/2),i=0;while(i<r)t=e[i],e[i++]=e[--n],e[n]=t;return e},some:function(t){return et(Rt(this),t,arguments.length>1?arguments[1]:void 0)},sort:function(t){return pt.call(Rt(this),t)},subarray:function(t,e){var n=Rt(this),r=n.length,i=m(t,r);return new(_(n,n[St]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,g((void 0===e?r:m(e,r))-i))}},jt=function(t,e){return _t(this,gt.call(Rt(this),t,e))},kt=function(t){Rt(this);var e=Ut(arguments[1],1),n=this.length,r=x(t),i=g(r.length),o=0;if(i+e>n)throw W(Pt);while(o<i)this[e+o]=r[o++]},Vt={entries:function(){return st.call(Rt(this))},keys:function(){return ut.call(Rt(this))},values:function(){return ct.call(Rt(this))}},Wt=function(t,e){return S(t)&&t[It]&&"symbol"!=typeof e&&e in t&&String(+e)==String(e)},Ht=function(t,e){return Wt(t,e=y(e,!0))?l(2,t[e]):V(t,e)},zt=function(t,e,n){return!(Wt(t,e=y(e,!0))&&S(n)&&b(n,"value"))||b(n,"get")||b(n,"set")||n.configurable||b(n,"writable")&&!n.writable||b(n,"enumerable")&&!n.enumerable?k(t,e,n):(t[e]=n.value,t)};xt||(j.f=Ht,G.f=zt),a(a.S+a.F*!xt,"Object",{getOwnPropertyDescriptor:Ht,defineProperty:zt}),o((function(){vt.call({})}))&&(vt=mt=function(){return ht.call(this)});var $t=h({},Gt);h($t,Vt),d($t,yt,Vt.values),h($t,{slice:jt,set:kt,constructor:function(){},toString:vt,toLocaleString:Bt}),Dt($t,"buffer","b"),Dt($t,"byteOffset","o"),Dt($t,"byteLength","l"),Dt($t,"length","e"),k($t,bt,{get:function(){return this[It]}}),t.exports=function(t,e,n,u){u=!!u;var s=t+(u?"Clamped":"")+"Array",l="get"+t,h="set"+t,p=i[s],m=p||{},y=p&&P(p),b=!p||!c.ABV,x={},I=p&&p[q],E=function(t,n){var r=t._d;return r.v[l](n*e+r.o,Et)},A=fu