-
Notifications
You must be signed in to change notification settings - Fork 0
/
exif-reader.js
2 lines (2 loc) · 58.9 KB
/
exif-reader.js
1
2
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ExifReader=t():e.ExifReader=t()}("undefined"!=typeof self?self:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=1)}([function(module,__webpack_exports__,__webpack_require__){"use strict";function get(){if("undefined"!=typeof DOMParser)return DOMParser;try{return eval("require")("xmldom").DOMParser}catch(e){return}}__webpack_exports__.a={get:get}},function(e,t,n){"use strict";function r(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i,!1));return o(r)}function i(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i+=2)r.push(e.getUint16(t+i));return o(r)}function o(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function a(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];for(var i=0,o=n;i<o.length;i++){var a=o[i];for(var u in a)e[u]=a[u]}return e}function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function c(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.r(t),n.d(t,"errors",(function(){return Et})),n.d(t,"load",(function(){return Gt})),n.d(t,"loadView",(function(){return zt}));var f=function(){function e(t){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e){return"object"!==u(e)||void 0===e.length||void 0===e.readUInt8||void 0===e.readUInt16LE||void 0===e.readUInt16BE||void 0===e.readUInt32LE||void 0===e.readUInt32BE||void 0===e.readInt32LE||void 0===e.readInt32BE}(t))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=t,this.byteLength=this.buffer.length}var t,n,r;return t=e,(n=[{key:"getUint8",value:function(e){return this.buffer.readUInt8(e)}},{key:"getUint16",value:function(e,t){return t?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}},{key:"getUint32",value:function(e,t){return t?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}},{key:"getInt32",value:function(e,t){return t?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}}])&&c(t.prototype,n),r&&c(t,r),e}();var s=!0,l=!0,d=!0,p=!0,m=!0,g=!0,v=!0,h=!0,y=!0,S=!0,b=!0,C={BIG_ENDIAN:19789,LITTLE_ENDIAN:18761,getByteOrder:function(e,t){if(18761===e.getUint16(t))return 18761;if(19789===e.getUint16(t))return 19789;throw new Error("Illegal byte order value. Faulty image.")}};var A={isTiffFile:function(e){return e.byteLength>=4&&function(e){var t=e.getUint16(0)===C.LITTLE_ENDIAN;return 42===e.getUint16(2,t)}(e)},findTiffOffsets:function(){if(d)return{hasAppMarkers:!0,tiffHeaderOffset:0};return{}}};var I={isJpegFile:function(e){return e.byteLength>=2&&65496===e.getUint16(0,!1)},findJpegOffsets:function(e){var t,n,r,i,o,a,u,c=2;for(;c+4+5<=e.byteLength;){if(s&&U(e,c))n=c+2;else if(s&&D(e,c))r=c+2;else if(d&&T(e,c))t=e.getUint16(c+2,!1),i=c+10;else if(m&&M(e,c))a||(a=[]),t=e.getUint16(c+2,!1),a.push(x(c,t));else if(m&&F(e,c))a||(a=[]),t=e.getUint16(c+2,!1),a.push(L(c,t));else if(p&&N(e,c))t=e.getUint16(c+2,!1),o=c+18;else if(g&&O(e,c)){t=e.getUint16(c+2,!1);var f=c+18,l=t-16,v=e.getUint8(c+w,!1),h=e.getUint8(c+P,!1);u||(u=[]),u.push({offset:f,length:l,chunkNumber:v,chunksTotal:h})}else{if(!k(e,c))break;t=e.getUint16(c+2,!1)}c+=2+t}return{hasAppMarkers:c>2,fileDataOffset:n||r,tiffHeaderOffset:i,iptcDataOffset:o,xmpChunks:a,iccChunks:u}}},w=4+"ICC_PROFILE\0".length,P=w+1;function U(e,t){return 65472===e.getUint16(t,!1)}function D(e,t){return 65474===e.getUint16(t,!1)}function O(e,t){var n="ICC_PROFILE\0".length;return 65506===e.getUint16(t,!1)&&"ICC_PROFILE\0"===r(e,t+4,n)}function T(e,t){var n="Exif".length;return 65505===e.getUint16(t,!1)&&"Exif"===r(e,t+4,n)&&0===e.getUint8(t+4+n,!1)}function M(e,t){return 65505===e.getUint16(t,!1)&&function(e,t){return"http://ns.adobe.com/xap/1.0/\0"===r(e,t+4,"http://ns.adobe.com/xap/1.0/\0".length)}(e,t)}function F(e,t){return 65505===e.getUint16(t,!1)&&function(e,t){return"http://ns.adobe.com/xmp/extension/\0"===r(e,t+4,"http://ns.adobe.com/xmp/extension/\0".length)}(e,t)}function x(e,t){return{dataOffset:e+33,length:t-31}}function L(e,t){return{dataOffset:e+79,length:t-77}}function N(e,t){var n="Photoshop 3.0".length;return 65517===e.getUint16(t,!1)&&"Photoshop 3.0"===r(e,t+4,n)&&0===e.getUint8(t+4+n,!1)}function k(e,t){var n=e.getUint16(t,!1);return n>=65504&&n<=65519||65534===n||65472===n||65474===n||65476===n||65499===n||65501===n||65498===n}var R={isPngFile:function(e){return"PNG\r\n\n"===r(e,0,"PNG\r\n\n".length)},findPngOffsets:function(e){var t={hasAppMarkers:!1},n="PNG\r\n\n".length;for(;n+4+4<=e.byteLength;){if(l&&E(e,n))t.hasAppMarkers=!0,t.pngHeaderOffset=n+8;else if(m&&G(e,n)){var r=j(e,n);void 0!==r&&(t.hasAppMarkers=!0,t.xmpChunks=[{dataOffset:r,length:e.getUint32(n+0)-(r-(n+8))}])}n+=e.getUint32(n+0)+4+4+4}return t}};function E(e,t){return"IHDR"===r(e,t+4,4)}function G(e,t){return"iTXt"===r(e,t+4,4)&&"XML:com.adobe.xmp\0"===r(e,t+8,"XML:com.adobe.xmp\0".length)}function j(e,t){t+=8+"XML:com.adobe.xmp\0".length+1+1;for(var n=0;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}var B={isHeicFile:function(e){var t=r(e,4+"ftyp".length,4);return"ftyp"===r(e,4,"ftyp".length)&&-1!==["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"].indexOf(t)},findHeicOffsets:function(e){if(d){var t=function(e){var t=0;for(;t+4+4<=e.byteLength;){var n=z(e,t);if(n>=8)if("meta"===r(e,t+4,4))return{offset:t,length:n};t+=n}return{offset:void 0,length:0}}(e),n=t.offset,i=t.length;if(void 0===n)return{hasAppMarkers:!1};var o=Math.min(n+i,e.byteLength),a=function(e,t,n){var i={exifItemOffset:void 0,ilocOffset:void 0};for(;t+4<=n&&(!i.exifItemOffset||!i.ilocOffset);)"Exif"===r(e,t,4)?i.exifItemOffset=t+-4:"iloc"===r(e,t,4)&&(i.ilocOffset=t),t++;return i}(e,n,o),u=a.exifItemOffset,c=a.ilocOffset;if(void 0===u||void 0===c)return{hasAppMarkers:!1};var f=function(e,t,n,r){if(t+2>r)return;var i=e.getUint16(t);n+=12;for(;n+16<=r;){if(e.getUint16(n)===i){var o=e.getUint32(n+8);if(o+4<=e.byteLength){var a=e.getUint32(o);return o+(a+4)}}n+=16}return}(e,u,c,o);return{hasAppMarkers:void 0!==f,tiffHeaderOffset:f}}return{hasAppMarkers:!1}}};function z(e,t){var n=e.getUint32(t);return function(e){return 0===e}(n)?e.byteLength-t:function(e){return 1===e}(n)&&function(e,t){return 0===e.getUint32(t+8)}(e,t)?e.getUint32(t+12):n}var H={parseAppMarkers:function(e){if(h&&A.isTiffFile(e))return A.findTiffOffsets();if(y&&I.isJpegFile(e))return I.findJpegOffsets(e);if(S&&R.isPngFile(e))return R.findPngOffsets(e);if(b&&B.isHeicFile(e))return B.findHeicOffsets(e);throw new Error("Invalid image format")}};var W={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},V={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},_={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:X,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===C.LITTLE_ENDIAN)},getLongAt:Y,getRationalAt:function(e,t,n){return[Y(e,t,n),Y(e,t+4,n)]},getUndefinedAt:function(e,t){return X(e,t)},getSlongAt:K,getSrationalAt:function(e,t,n){return[K(e,t,n),K(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return Y(e,t,n)},typeSizes:W,tagTypes:V,getTypeSize:function(e){if(void 0===V[e])throw new Error("No such type found.");return W[V[e]]}};function X(e,t){return e.getUint8(t)}function Y(e,t,n){return e.getUint32(t,n===C.LITTLE_ENDIAN)}function K(e,t,n){return e.getInt32(t,n===C.LITTLE_ENDIAN)}var J={LightSource:function(e){return 1===e?"Daylight":2===e?"Fluorescent":3===e?"Tungsten (incandescent light)":4===e?"Flash":9===e?"Fine weather":10===e?"Cloudy weather":11===e?"Shade":12===e?"Daylight fluorescent (D 5700 – 7100K)":13===e?"Day white fluorescent (N 4600 – 5400K)":14===e?"Cool white fluorescent (W 3900 – 4500K)":15===e?"White fluorescent (WW 3200 – 3700K)":17===e?"Standard light A":18===e?"Standard light B":19===e?"Standard light C":20===e?"D55":21===e?"D65":22===e?"D75":23===e?"D50":24===e?"ISO studio tungsten":255===e?"Other light source":"Unknown"}};function q(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function $(e){if(e.length>=8){var t=q(e.slice(0,8));if("ASCII\0\0\0"===t)return q(e.slice(8));if("JIS\0\0\0\0\0"===t)return"[JIS encoded text]";if("UNICODE\0"===t)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===t)return"[Undefined encoding]"}return"Undefined"}function Z(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return Q(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Q(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Q(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function ee(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return te(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return te(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ne={0:{name:"GPSVersionID",description:function(e){return 2===e[0]&&2===e[1]&&0===e[2]&&0===e[3]?"Version 2.2":"Unknown"}},1:{name:"GPSLatitudeRef",description:function(e){var t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},3:{name:"GPSLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},5:{name:"GPSAltitudeRef",description:function(e){return 0===e?"Sea level":1===e?"Sea level reference (negative value)":"Unknown"}},6:{name:"GPSAltitude",description:function(e){return e[0]/e[1]+" m"}},7:{name:"GPSTimeStamp",description:function(e){return e.map((function(e){var t=ee(e,2),n=t[0]/t[1];return/^\d(\.|$)/.test("".concat(n))?"0".concat(n):n})).join(":")}},8:"GPSSatellites",9:{name:"GPSStatus",description:function(e){var t=e.join("");return"A"===t?"Measurement in progress":"V"===t?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:function(e){var t=e.join("");return"2"===t?"2-dimensional measurement":"3"===t?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:function(e){var t=e.join("");return"K"===t?"Kilometers per hour":"M"===t?"Miles per hour":"N"===t?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:function(e){var t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:function(e){var t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:function(e){var t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},21:{name:"GPSDestLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},23:{name:"GPSDestBearingRef",description:function(e){var t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:function(e){var t=e.join("");return"K"===t?"Kilometers":"M"===t?"Miles":"N"===t?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:$},28:{name:"GPSAreaInformation",description:$},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},re={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:function(e){return q(e)}},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},ie=a({},{11:"ProcessingSoftware",254:{name:"SubfileType",description:function(e){return{0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[e]||"Unknown"}},255:{name:"OldSubfileType",description:function(e){return{0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[e]||"Unknown"}},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:function(e){return{1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[e]||"Unknown"}},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:function(e){return{1:"Normal",2:"Reversed"}[e]||"Unknown"}},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:function(e){return 1===e?"top-left":2===e?"top-right":3===e?"bottom-right":4===e?"bottom-left":5===e?"left-top":6===e?"right-top":7===e?"right-bottom":8===e?"left-bottom":"Undefined"}},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:function(e){return""+Math.round(e[0]/e[1])}},283:{name:"YResolution",description:function(e){return""+Math.round(e[0]/e[1])}},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:function(e){return""+Math.round(e[0]/e[1])}},287:{name:"YPosition",description:function(e){return""+Math.round(e[0]/e[1])}},290:{name:"GrayResponseUnit",description:function(e){return{1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[e]||"Unknown"}},296:{name:"ResolutionUnit",description:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"}},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:function(e){return e.map((function(e){return"".concat(e[0],"/").concat(e[1])})).join(", ")}},319:{name:"PrimaryChromaticities",description:function(e){return e.map((function(e){return"".concat(e[0],"/").concat(e[1])})).join(", ")}},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:function(e){return{1:"CMYK",2:"Not CMYK"}[e]||"Unknown"}},337:"TargetPrinter",338:{name:"ExtraSamples",description:function(e){return{0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[e]||"Unknown"}},339:{name:"SampleFormat",description:function(e){var t={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(e)?e.map((function(e){return t[e]||"Unknown"})).join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:function(e){return e.map((function(e){return""+e[0]/e[1]})).join("/")}},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:function(e){return 1===e?"centered":2===e?"co-sited":"undefined "+e}},532:{name:"ReferenceBlackWhite",description:function(e){return e.map((function(e){return""+e[0]/e[1]})).join(", ")}},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:function(e){return e.join("; ")}},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:"XPTitle",40092:"XPComment",40093:"XPAuthor",40094:"XPKeywords",40095:"XPSubject",42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:function(e){return{0:"Unsafe",1:"Safe"}[e]||"Unknown"}},50778:{name:"CalibrationIlluminant1",description:J.LightSource},50779:{name:"CalibrationIlluminant2",description:J.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:function(e){return{0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[e]||"Unknown"}},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:function(e){return{1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[e]||"Unknown"}},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:function(e){return{0:"Linear",1:"sRGB"}[e]||"Unknown"}},51108:{name:"ProfileLookTableEncoding",description:function(e){return{0:"Linear",1:"sRGB"}[e]||"Unknown"}},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:function(e){return{0:"Auto",1:"None"}[e]||"Unknown"}},51111:"NewRawImageDigest",51112:"RawToPreviewGain"},{33434:{name:"ExposureTime",description:function(e){return 0!==e[0]?"1/".concat(Math.round(e[1]/e[0])):"0/".concat(e[1])}},33437:{name:"FNumber",description:function(e){return"f/".concat(e[0]/e[1])}},34850:{name:"ExposureProgram",description:function(e){return 0===e?"Undefined":1===e?"Manual":2===e?"Normal program":3===e?"Aperture priority":4===e?"Shutter priority":5===e?"Creative program":6===e?"Action program":7===e?"Portrait mode":8===e?"Landscape mode":9===e?"Bulb":"Unknown"}},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:function(){return"[Raw OECF table data]"}},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:function(e){return{1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[e]||"Unknown"}},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:function(e){return q(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:function(e){return e.map((function(e){return 49===e?"Y":50===e?"Cb":51===e?"Cr":52===e?"R":53===e?"G":54===e?"B":void 0})).join("")}},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:function(e){return"1/".concat(Math.round(Math.pow(2,e[0]/e[1])))}},37378:{name:"ApertureValue",description:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)}},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)}},37382:{name:"SubjectDistance",description:function(e){return e[0]/e[1]+" m"}},37383:{name:"MeteringMode",description:function(e){return 1===e?"Average":2===e?"CenterWeightedAverage":3===e?"Spot":4===e?"MultiSpot":5===e?"Pattern":6===e?"Partial":255===e?"Other":"Unknown"}},37384:{name:"LightSource",description:J.LightSource},37385:{name:"Flash",description:function(e){return 0===e?"Flash did not fire":1===e?"Flash fired":5===e?"Strobe return light not detected":7===e?"Strobe return light detected":9===e?"Flash fired, compulsory flash mode":13===e?"Flash fired, compulsory flash mode, return light not detected":15===e?"Flash fired, compulsory flash mode, return light detected":16===e?"Flash did not fire, compulsory flash mode":24===e?"Flash did not fire, auto mode":25===e?"Flash fired, auto mode":29===e?"Flash fired, auto mode, return light not detected":31===e?"Flash fired, auto mode, return light detected":32===e?"No flash function":65===e?"Flash fired, red-eye reduction mode":69===e?"Flash fired, red-eye reduction mode, return light not detected":71===e?"Flash fired, red-eye reduction mode, return light detected":73===e?"Flash fired, compulsory flash mode, red-eye reduction mode":77===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===e?"Flash fired, auto mode, red-eye reduction mode":93===e?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===e?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"}},37386:{name:"FocalLength",description:function(e){return e[0]/e[1]+" mm"}},37393:"ImageNumber",37394:{name:"SecurityClassification",description:function(e){return{C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[e]||"Unknown"}},37395:"ImageHistory",37396:{name:"SubjectArea",description:function(e){return 2===e.length?"Location; X: ".concat(e[0],", Y: ").concat(e[1]):3===e.length?"Circle; X: ".concat(e[0],", Y: ").concat(e[1],", diameter: ").concat(e[2]):4===e.length?"Rectangle; X: ".concat(e[0],", Y: ").concat(e[1],", width: ").concat(e[2],", height: ").concat(e[3]):"Unknown"}},37500:{name:"MakerNote",description:function(){return"[Raw maker note data]"}},37510:{name:"UserComment",description:$},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37888:{name:"AmbientTemperature",description:function(e){return e[0]/e[1]+" °C"}},37889:{name:"Humidity",description:function(e){return e[0]/e[1]+" %"}},37890:{name:"Pressure",description:function(e){return e[0]/e[1]+" hPa"}},37891:{name:"WaterDepth",description:function(e){return e[0]/e[1]+" m"}},37892:{name:"Acceleration",description:function(e){return e[0]/e[1]+" mGal"}},37893:{name:"CameraElevationAngle",description:function(e){return e[0]/e[1]+" °"}},40960:{name:"FlashpixVersion",description:function(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}},40961:{name:"ColorSpace",description:function(e){return 1===e?"sRGB":65535===e?"Uncalibrated":"Unknown"}},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:function(){return"[Raw SFR table data]"}},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"}},41492:{name:"SubjectLocation",description:function(e){var t=Z(e,2),n=t[0],r=t[1];return"X: ".concat(n,", Y: ").concat(r)}},41493:"ExposureIndex",41495:{name:"SensingMethod",description:function(e){return 1===e?"Undefined":2===e?"One-chip color area sensor":3===e?"Two-chip color area sensor":4===e?"Three-chip color area sensor":5===e?"Color sequential area sensor":7===e?"Trilinear sensor":8===e?"Color sequential linear sensor":"Unknown"}},41728:{name:"FileSource",description:function(e){return 3===e?"DSC":"Unknown"}},41729:{name:"SceneType",description:function(e){return 1===e?"A directly photographed image":"Unknown"}},41730:{name:"CFAPattern",description:function(){return"[Raw CFA pattern table data]"}},41985:{name:"CustomRendered",description:function(e){return 0===e?"Normal process":1===e?"Custom process":"Unknown"}},41986:{name:"ExposureMode",description:function(e){return 0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown"}},41987:{name:"WhiteBalance",description:function(e){return 0===e?"Auto white balance":1===e?"Manual white balance":"Unknown"}},41988:{name:"DigitalZoomRatio",description:function(e){return 0===e[0]?"Digital zoom was not used":""+e[0]/e[1]}},41989:{name:"FocalLengthIn35mmFilm",description:function(e){return 0===e?"Unknown":e}},41990:{name:"SceneCaptureType",description:function(e){return 0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown"}},41991:{name:"GainControl",description:function(e){return 0===e?"None":1===e?"Low gain up":2===e?"High gain up":3===e?"Low gain down":4===e?"High gain down":"Unknown"}},41992:{name:"Contrast",description:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"}},41993:{name:"Saturation",description:function(e){return 0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown"}},41994:{name:"Sharpness",description:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"}},41995:{name:"DeviceSettingDescription",description:function(){return"[Raw device settings table data]"}},41996:{name:"SubjectDistanceRange",description:function(e){return 1===e?"Macro":2===e?"Close view":3===e?"Distant view":"Unknown"}},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:function(e){var t="".concat(e[0][0]/e[0][1],"-").concat(e[1][0]/e[1][1]," mm");return 0===e[3][1]?"".concat(t," f/?"):"".concat(t," f/").concat(1/(e[2][1]/e[2][1]/(e[3][0]/e[3][1])))}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:function(e){return{1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[e]||"Unknown"}},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"}),oe={"0th":ie,exif:ie,gps:ne,interoperability:re};function ae(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return ue(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return ue(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function ue(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var ce={1:_.getByteAt,2:_.getAsciiAt,3:_.getShortAt,4:_.getLongAt,5:_.getRationalAt,7:_.getUndefinedAt,9:_.getSlongAt,10:_.getSrationalAt,13:_.getIfdPointerAt},fe={read:function(e,t){var n=C.getByteOrder(e,t),r=function(e,t,n){return pe(e,"0th",t,function(e,t,n){return t+_.getLongAt(e,t+4,n)}(e,t,n),n)}(e,t,n);return r=de(r=le(r=se(r,e,t,n),e,t,n),e,t,n)}};function se(e,t,n,r){return void 0!==e["Exif IFD Pointer"]?a(e,pe(t,"exif",n,n+e["Exif IFD Pointer"].value,r)):e}function le(e,t,n,r){return void 0!==e["GPS Info IFD Pointer"]?a(e,pe(t,"gps",n,n+e["GPS Info IFD Pointer"].value,r)):e}function de(e,t,n,r){return void 0!==e["Interoperability IFD Pointer"]?a(e,pe(t,"interoperability",n,n+e["Interoperability IFD Pointer"].value,r)):e}function pe(e,t,n,r,i){var o=_.getTypeSize("SHORT"),a={},u=function(e,t,n){if(t+_.getTypeSize("SHORT")<=e.byteLength)return _.getShortAt(e,t,n);return 0}(e,r,i);r+=o;for(var c=0;c<u&&!(r+12>e.byteLength);c++){var f=me(e,t,n,r,i);void 0!==f&&(a[f.name]={id:f.id,value:f.value,description:f.description}),r+=12}if(r<e.byteLength-_.getTypeSize("LONG")){var s=_.getLongAt(e,r,i);0!==s&&(a.Thumbnail=pe(e,t,n,n+s,i))}return a}function me(e,t,n,r,i){var o,a=_.getTypeSize("SHORT"),u=a+_.getTypeSize("SHORT"),c=u+_.getTypeSize("LONG"),f=_.getShortAt(e,r,i),s=_.getShortAt(e,r+a,i),l=_.getLongAt(e,r+u,i);if(void 0!==_.typeSizes[s]){if(function(e,t){return _.typeSizes[e]*t<=_.getTypeSize("LONG")}(s,l))o=ge(e,r+c,s,l,i);else{var d=_.getLongAt(e,r+c,i);if(function(e,t,n,r,i){return t+n+_.typeSizes[r]*i<=e.byteLength}(e,n,d,s,l))o=ge(e,n+d,s,l,i,33723===f);else o="<faulty value>"}if(s===_.tagTypes.ASCII&&(o=function(e){try{return e.map((function(e){return decodeURIComponent(escape(e))}))}catch(t){return e}}(o=function(e){var t,n=[],r=0,i=ae(e);try{for(i.s();!(t=i.n()).done;){var o=t.value;"\0"!==o?(void 0===n[r]&&(n[r]=""),n[r]+=o):r++}}catch(e){i.e(e)}finally{i.f()}return n}(o))),void 0!==oe[t][f]){var p,m;if(void 0!==oe[t][f].name&&void 0!==oe[t][f].description){p=oe[t][f].name;try{m=oe[t][f].description(o)}catch(e){m=ve(o)}}else s===_.tagTypes.RATIONAL||s===_.tagTypes.SRATIONAL?(p=oe[t][f],m=""+o[0]/o[1]):(p=oe[t][f],m=ve(o));return{id:f,name:p,value:o,description:m}}return{id:f,name:"undefined-".concat(f),value:o,description:o}}}function ge(e,t,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=[];o&&(r*=_.typeSizes[n],n=_.tagTypes.BYTE);for(var u=0;u<r;u++)a.push(ce[n](e,t,i)),t+=_.typeSizes[n];return n===_.tagTypes.ASCII?a=_.getAsciiValue(a):1===a.length&&(a=a[0]),a}function ve(e){return e instanceof Array?e.join(", "):e}var he={read:function(e,t){var n=function(e,t){return _.getShortAt(e,t)}(e,t),r=function(e,t,n){if(8>n)return;var r=_.getByteAt(e,t+7);return{value:r,description:""+r}}(e,t,n);return{"Bits Per Sample":ye(e,t,n),"Image Height":Se(e,t,n),"Image Width":be(e,t,n),"Color Components":r,Subsampling:r&&Ce(e,t,r.value,n)}}};function ye(e,t,n){if(!(3>n)){var r=_.getByteAt(e,t+2);return{value:r,description:""+r}}}function Se(e,t,n){if(!(5>n)){var r=_.getShortAt(e,t+3);return{value:r,description:"".concat(r,"px")}}}function be(e,t,n){if(!(7>n)){var r=_.getShortAt(e,t+5);return{value:r,description:"".concat(r,"px")}}}function Ce(e,t,n,r){if(!(8+3*n>r)){for(var i=[],o=0;o<n;o++){var a=t+8+3*o;i.push([_.getByteAt(e,a),_.getByteAt(e,a+1),_.getByteAt(e,a+2)])}return{value:i,description:i.length>1?Ae(i)+Ie(i):""}}}function Ae(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((function(e){return t[e[0]]})).join("")}function Ie(e){var t={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===e.length||void 0===e[0][1]||void 0===t[e[0][1]]?"":t[e[0][1]]}var we={iptc:{256:{name:"Model Version",description:function(e){return((e[0]<<8)+e[1]).toString()}},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:function(e){return((e[0]<<8)+e[1]).toString()}},278:{name:"File Format Version",description:function(e){return((e[0]<<8)+e[1]).toString()}},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:Pe},336:{name:"Time Sent",description:Ue},346:{name:"Coded Character Set",description:De,encoding_name:De},356:"UNO",376:{name:"ARM Identifier",description:function(e){return((e[0]<<8)+e[1]).toString()}},378:{name:"ARM Version",description:function(e){return((e[0]<<8)+e[1]).toString()}},512:{name:"Record Version",description:function(e){return((e[0]<<8)+e[1]).toString()}},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:function(e){return"01"===q(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:function(e){var t=q(e).split(":");return t[2]+(t[3]?"/"+t[3]:"")+(t[4]?"/"+t[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:function(e){var t=q(e);return"01"===t?"Object Kill":"02"===t?"Object Replace":"03"===t?"Object Append":"04"===t?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:Pe},572:{name:"Time Created",description:Ue},574:{name:"Digital Creation Date",description:Pe},575:{name:"Digital Creation Time",description:Ue},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var t=q(e);return"a"===t?"morning":"p"===t?"evening":"b"===t?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:function(e){return e}},642:"Image Type",643:{name:"Image Orientation",description:function(e){var t=q(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var t=q(e),n=t.charAt(0),r=t.charAt(1),i="";return"1"===n?i+="Mono":"2"===n&&(i+="Stereo"),"A"===r?i+=", actuality":"C"===r?i+=", question and answer session":"M"===r?i+=", music, transmitted by itself":"Q"===r?i+=", response to a question":"R"===r?i+=", raw sound":"S"===r?i+=", scener":"V"===r?i+=", voicer":"W"===r&&(i+=", wrap"),""!==i?i:t}},663:{name:"Audio Sampling Rate",description:function(e){return parseInt(q(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var t=parseInt(q(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var t=q(e);return t.length>=6?t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2):t}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:function(e){return 2===e.length?"ObjectData Preview File Format":"Record 2 destination"},description:function(e){if(2===e.length){var t=(e[0]<<8)+e[1];return 0===t?"No ObjectData":1===t?"IPTC-NAA Digital Newsphoto Parameter Record":2===t?"IPTC7901 Recommended Message Format":3===t?"Tagged Image File Format (Adobe/Aldus Image data)":4===t?"Illustrator (Adobe Graphics data)":5===t?"AppleSingle (Apple Computer Inc)":6===t?"NAA 89-3 (ANPA 1312)":7===t?"MacBinary II":8===t?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===t?"United Press International ANPA 1312 variant":10===t?"United Press International Down-Load Message":11===t?"JPEG File Interchange (JFIF)":12===t?"Photo-CD Image-Pac (Eastman Kodak)":13===t?"Microsoft Bit Mapped Graphics File [*.BMP]":14===t?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===t?"Audio plus Moving Video [*.AVI] (Microsoft)":16===t?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===t?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===t?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===t?"RIFF Wave (Microsoft Corporation)":20===t?"Freehand (Macromedia/Aldus)":21===t?'Hypertext Markup Language "HTML" (The Internet Society)':22===t?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===t?"MPEG 2 Audio Layer 3, ISO/IEC":24===t?"Portable Document File (*.PDF) Adobe":25===t?"News Industry Text Format (NITF)":26===t?"Tape Archive (*.TAR)":27===t?"Tidningarnas Telegrambyrå NITF version (TTNITF DTD)":28===t?"Ritzaus Bureau NITF version (RBNITF DTD)":29===t?"Corel Draw [*.CDR]":"Unknown format ".concat(t)}return q(e)}},713:{name:"ObjectData Preview File Format Version",description:function(e,t){var n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},r=q(e);if(t["ObjectData Preview File Format"]){var i=q(t["ObjectData Preview File Format"].value);if(n[i]&&n[i][r])return n[i][r]}return r}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:function(e){return e[0].toString()}},1812:{name:"Max Subfile Size",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1882:{name:"ObjectData Size Announced",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1887:{name:"Maximum ObjectData Size",description:function(e){for(var t=0,n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}}}};function Pe(e){var t=q(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function Ue(e){var t=q(e),n=t;return t.length>=6&&(n=t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2),11===t.length&&(n+=t.substr(6,1)+t.substr(7,2)+":"+t.substr(9,2))),n}function De(e){var t=q(e);return"%G"===t?"UTF-8":"%5"===t?"Windows-1252":"%/G"===t?"UTF-8 Level 1":"%/H"===t?"UTF-8 Level 2":"%/I"===t?"UTF-8 Level 3":"/A"===t?"ISO-8859-1":"/B"===t?"ISO-8859-2":"/C"===t?"ISO-8859-3":"/D"===t?"ISO-8859-4":"/@"===t?"ISO-8859-5":"/G"===t?"ISO-8859-6":"/F"===t?"ISO-8859-7":"/H"===t?"ISO-8859-8":"Unknown"}var Oe={get:function(){if("undefined"!=typeof TextDecoder)return TextDecoder;return}};var Te={decode:function(e,t){var n=Oe.get();if(void 0!==n&&void 0!==e)try{return new n(e).decode(Uint8Array.from(t))}catch(e){}return function(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}(t.map((function(e){return String.fromCharCode(e)})).join(""))},TAG_HEADER_SIZE:5};var Me={read:function(e,t){try{if(Array.isArray(e))return Ne(new DataView(Uint8Array.from(e).buffer),{size:e.length},0);var n=function(e,t){for(;t+12<=e.byteLength;){var n=Fe(e,t);if(xe(n))return{naaBlock:n,dataOffset:t+12};t+=12+n.size+Le(n)}throw new Error("No IPTC NAA resource block.")}(e,t),r=n.naaBlock,i=n.dataOffset;return Ne(e,r,i)}catch(e){return{}}}};function Fe(e,t){if(943868237!==e.getUint32(t,!1))throw new Error("Not an IPTC resource block.");return{type:e.getUint16(t+4,!1),size:e.getUint16(t+10,!1)}}function xe(e){return 1028===e.type}function Le(e){return e.size%2!=0?1:0}function Ne(e,t,n){for(var r={},i=void 0,o=n+t.size;n<o&&n<e.byteLength;){var a=ke(e,n,r,i),u=a.tag,c=a.tagSize;if(null===u)break;"encoding"in u&&(i=u.encoding),void 0===r[u.name]||void 0===u.repeatable?r[u.name]={id:u.id,value:u.value,description:u.description}:(r[u.name]instanceof Array||(r[u.name]=[{id:r[u.name].id,value:r[u.name].value,description:r[u.name].description}]),r[u.name].push({id:u.id,value:u.value,description:u.description})),n+=5+c}return r}function ke(e,t,n,r){if(function(e,t){return 28!==e.getUint8(t)}(e,t))return{tag:null,tagSize:0};var i=e.getUint16(t+1,!1),o=e.getUint16(t+3,!1),a=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+5,o),u={id:i,name:Re(we.iptc[i],i,a),value:a,description:Ee(we.iptc[i],a,n,r)};return function(e){return we.iptc[e]&&we.iptc[e].repeatable}(i)&&(u.repeatable=!0),function(e){return we.iptc[e]&&void 0!==we.iptc[e].encoding_name}(i)&&(u.encoding=we.iptc[i].encoding_name(a)),{tag:u,tagSize:o}}function Re(e,t,n){return e?function(e){return"string"==typeof e}(e)?e:function(e){return"function"==typeof e.name}(e)?e.name(n):e.name:"undefined-".concat(t)}function Ee(e,t,n,r){if(function(e){return e&&void 0!==e.description}(e))try{return e.description(t,n)}catch(e){}return function(e,t){return e&&t instanceof Array}(e,t)?Te.decode(r,t):t}function Ge(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(e)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,u=e[Symbol.iterator]();!(r=(a=u.next()).done)&&(n.push(a.value),!t||n.length!==t);r=!0);}catch(e){i=!0,o=e}finally{try{r||null==u.return||u.return()}finally{if(i)throw o}}return n}(e,t)||function(e,t){if(!e)return;if("string"==typeof e)return je(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return je(e,t)}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function je(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Be={"tiff:Orientation":function(e){return"1"===e?"Horizontal (normal)":"2"===e?"Mirror horizontal":"3"===e?"Rotate 180":"4"===e?"Mirror vertical":"5"===e?"Mirror horizontal and rotate 270 CW":"6"===e?"Rotate 90 CW":"7"===e?"Mirror horizontal and rotate 90 CW":"8"===e?"Rotate 270 CW":e},"exif:GPSLatitude":ze,"exif:GPSLongitude":ze};function ze(e){var t=Ge(e.split(","),2),n=t[0],r=t[1];if(void 0!==n&&void 0!==r){var i=parseFloat(n),o=parseFloat(r),a=r.charAt(r.length-1);if(!Number.isNaN(i)&&!Number.isNaN(o))return""+(i+o/60)+a}return e}var He=n(0);function We(e){return(We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function Ve(e){if("undefined"==typeof Symbol||null==e[Symbol.iterator]){if(Array.isArray(e)||(e=function(e,t){if(!e)return;if("string"==typeof e)return _e(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(n);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _e(e,t)}(e))){var t=0,n=function(){};return{s:n,n:function(){return t>=e.length?{done:!0}:{done:!1,value:e[t++]}},e:function(e){throw e},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,i,o=!0,a=!1;return{s:function(){r=e[Symbol.iterator]()},n:function(){var e=r.next();return o=e.done,e},e:function(e){a=!0,i=e},f:function(){try{o||null==r.return||r.return()}finally{if(a)throw i}}}}function _e(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var Xe={read:function(e,t){if("string"==typeof e)return Ke({},e);return function(e,t){if(0===t.length)return[];var n=[Ye(e,t.slice(0,1))];t.length>1&&n.push(Ye(e,t.slice(1)));return n}(e,t).reduce(Ke,{})}};function Ye(e,t){var n,r=t.reduce((function(e,t){return e+t.length}),0),i=new Uint8Array(r),o=0,a=Ve(t);try{for(a.s();!(n=a.n()).done;){var u=n.value,c=e.buffer.slice(u.dataOffset,u.dataOffset+u.length);i.set(new Uint8Array(c),o),o+=u.length}}catch(e){a.e(e)}finally{a.f()}return new DataView(i.buffer)}function Ke(e,t){try{return a(e,tt(Je(function e(t){for(var n=0;n<t.childNodes.length;n++){if("x:xmpmeta"===t.childNodes[n].tagName)return e(t.childNodes[n]);if("rdf:RDF"===t.childNodes[n].tagName)return t.childNodes[n]}throw new Error}(function(e){var t=He.a.get();if(!t)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;var n=new t,i="string"==typeof e?e:r(e,0,e.byteLength),o=n.parseFromString((a=i,a.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")),"application/xml");var a;if("parsererror"===o.documentElement.nodeName)throw new Error(o.documentElement.textContent);return o}(t)),!0)))}catch(t){return e}}function Je(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=qe(e);return $e(n)?t?{}:Ze(n[0]):Qe(n)}function qe(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t}function $e(e){return 1===e.length&&"#text"===e[0].nodeName}function Ze(e){return e.nodeValue}function Qe(e){var t={};return e.forEach((function(e){if(function(e){return e.nodeName&&"#text"!==e.nodeName}(e)){var n=function(e){return{attributes:et(e),value:Je(e)}}(e);void 0!==t[e.nodeName]?(Array.isArray(t[e.nodeName])||(t[e.nodeName]=[t[e.nodeName]]),t[e.nodeName].push(n)):t[e.nodeName]=n}})),t}function et(e){for(var t={},n=0;n<e.attributes.length;n++)t[e.attributes[n].nodeName]=decodeURIComponent(escape(e.attributes[n].value));return t}function tt(e){var t={};if("string"==typeof e)return e;for(var n in e){var r=e[n];Array.isArray(r)||(r=[r]),r.forEach((function(e){a(t,nt(e.attributes)),"object"===We(e.value)&&a(t,st(e.value))}))}return t}function nt(e){var t={};for(var n in e)rt(n)&&(t[ot(n)]={value:e[n],attributes:{},description:at(e[n],n)});return t}function rt(e){return"rdf:parseType"!==e&&!it(e)}function it(e){return"xmlns"===e.split(":")[0]}function ot(e){return e.split(":")[1]}function at(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Array.isArray(e))return ut(e);if("object"===We(e))return ct(e);try{return t&&"function"==typeof Be[t]?Be[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function ut(e){return e.map((function(e){return void 0!==e.value?at(e.value):at(e)})).join(", ")}function ct(e){var t=[];for(var n in e)t.push("".concat(ft(n),": ").concat(e[n].value));return t.join("; ")}function ft(e){return"CiAdrCity"===e?"CreatorCity":"CiAdrCtry"===e?"CreatorCountry":"CiAdrExtadr"===e?"CreatorAddress":"CiAdrPcode"===e?"CreatorPostalCode":"CiAdrRegion"===e?"CreatorRegion":"CiEmailWork"===e?"CreatorWorkEmail":"CiTelWork"===e?"CreatorWorkPhone":"CiUrlWork"===e?"CreatorWorkUrl":e}function st(e){var t={};for(var n in e)it(n)||(t[ot(n)]=lt(e[n],n));return t}function lt(e,t){return dt(e)?pt(e,t):function(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}(e)?function(e,t){var n={value:{},attributes:{}};void 0!==e.value["rdf:Description"]&&(a(n.value,nt(e.value["rdf:Description"].attributes)),a(n.attributes,mt(e)),e=e.value["rdf:Description"]);return a(n.value,st(e.value)),n.description=at(n.value,t),n}(e,t):function(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["rdf:resource"]}(e)?function(e,t){var n=nt(e.attributes);return{value:n,attributes:{},description:at(n,t)}}(e,t):function(e){return void 0!==gt(e.value)}(e)?function(e,t){var n=gt(e.value).value["rdf:li"],r=mt(e),i=[];void 0===n?n=[]:Array.isArray(n)||(n=[n]);return n.forEach((function(e){i.push(function(e){if(dt(e))return pt(e);if(function(e){return"Resource"===e.attributes["rdf:parseType"]}(e))return st(e.value);return{value:e.value,attributes:mt(e),description:at(e.value)}}(e))})),{value:i,attributes:r,description:at(i,t)}}(e,t):function(e,t){var n=vt(e)||tt(e.value);return{value:n,attributes:mt(e),description:at(n,t)}}(e,t)}function dt(e){return"Resource"===e.attributes["rdf:parseType"]&&void 0!==e.value["rdf:value"]||void 0!==e.value["rdf:Description"]&&void 0!==e.value["rdf:Description"].value["rdf:value"]}function pt(e,t){var n=mt(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),a(n,mt(e),function(e){var t={};for(var n in e.value)"rdf:value"===n||it(n)||(t[ot(n)]=e.value[n].value);return t}(e));var r=function(e){return vt(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:at(r,t)}}function mt(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||it(n)||(t[ot(n)]=e.attributes[n]);return t}function gt(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function vt(e){return e.attributes&&e.attributes["rdf:resource"]}var ht={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},yt={4:{name:"Preferred CMM type",value:function(e,t){return r(e,t,4)},description:function(e){return null!==e?St(e):""}},8:{name:"Profile Version",value:function(e,t){return e.getUint8(t).toString(10)+"."+(e.getUint8(t+1)>>4).toString(10)+"."+(e.getUint8(t+1)%16).toString(10)}},12:{name:"Profile/Device class",value:function(e,t){return r(e,t,4)},description:function(e){switch(e.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return e}}},16:{name:"Color Space",value:function(e,t){return r(e,t,4)}},20:{name:"Connection Space",value:function(e,t){return r(e,t,4)}},24:{name:"ICC Profile Date",value:function(e,t){return function(e,t){var n=e.getUint16(t),r=e.getUint16(t+2)-1,i=e.getUint16(t+4),o=e.getUint16(t+6),a=e.getUint16(t+8),u=e.getUint16(t+10);return new Date(Date.UTC(n,r,i,o,a,u))}(e,t).toISOString()}},36:{name:"ICC Signature",value:function(e,t){return n=e.buffer.slice(t,t+4),String.fromCharCode.apply(null,new Uint8Array(n));var n}},40:{name:"Primary Platform",value:function(e,t){return r(e,t,4)},description:function(e){return St(e)}},48:{name:"Device Manufacturer",value:function(e,t){return r(e,t,4)},description:function(e){return St(e)}},52:{name:"Device Model Number",value:function(e,t){return r(e,t,4)}},64:{name:"Rendering Intent",value:function(e,t){return e.getUint32(t)},description:function(e){switch(e){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return e}}},80:{name:"Profile Creator",value:function(e,t){return r(e,t,4)}}};function St(e){switch(e.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return e}}var bt={read:function(e,t){try{for(var n=t.reduce((function(e,t){return e+t.length}),0),o=new Uint8Array(n),a=0,u=e.buffer,c=function(e){var n=t.find((function(t){return t.chunkNumber===e}));if(!n)throw new Error("ICC chunk ".concat(e," not found"));var r=u.slice(n.offset,n.offset+n.length),i=new Uint8Array(r);o.set(i,a),a+=i.length},f=1;f<=t.length;f++)c(f);return function(e){var t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw new Error("ICC profile length not matching");if(e.length<84)throw new Error("ICC profile too short");for(var o={},a=0,u=Object.keys(yt);a<u.length;a++){var c=u[a],f=yt[c],s=f.value(e,parseInt(c,10)),l=s;f.description&&(l=f.description(s)),o[f.name]={value:s,description:l}}if("acsp"!==At(t.slice(36,40)))throw new Error("ICC profile: missing signature");if(function(e){return e.length<132}(t))return o;for(var d=e.getUint32(128),p=132,m=0;m<d;m++){if(Ct(t,p))return o;var g=r(e,p,4),v=e.getUint32(p+4),h=e.getUint32(p+8);if(v>t.length)return o;var y=r(e,v,4);if("desc"===y){var S=e.getUint32(v+8);if(S>h)return o;var b=At(t.slice(v+12,v+S+11));It(o,g,b)}else if("mluc"===y){for(var C=e.getUint32(v+8),A=e.getUint32(v+12),I=v+16,w=[],P=0;P<C;P++){var U=r(e,I+0,2),D=r(e,I+2,2),O=e.getUint32(I+4),T=e.getUint32(I+8),M=i(e,v+T,O);w.push({languageCode:U,countryCode:D,text:M}),I+=A}if(1===C)It(o,g,w[0].text);else{for(var F={},x=0;x<w.length;x++)F["".concat(w[x].languageCode,"-").concat(w[x].countryCode)]=w[x].text;It(o,g,F)}}else if("text"===y){var L=At(t.slice(v+8,v+h-7));It(o,g,L)}else if("sig "===y){var N=At(t.slice(v+8,v+12));It(o,g,N)}p+=12}return o}(new DataView(o.buffer))}catch(e){return{}}}};function Ct(e,t){return e.length<t+12}function At(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function It(e,t,n){ht[t]?e[ht[t].name]={value:n,description:n}:e[t]={value:n,description:n}}var wt={read:function(e,t){return{"Image Width":Pt(e,t),"Image Height":Ut(e,t),"Bit Depth":Dt(e,t),"Color Type":Ot(e,t),Compression:Tt(e,t),Filter:Mt(e,t),Interlace:Ft(e,t)}}};function Pt(e,t){if(!(t+0+4>e.byteLength)){var n=_.getLongAt(e,t);return{value:n,description:"".concat(n,"px")}}}function Ut(e,t){if(!(t+4+4>e.byteLength)){var n=_.getLongAt(e,t+4);return{value:n,description:"".concat(n,"px")}}}function Dt(e,t){if(!(t+8+1>e.byteLength)){var n=_.getByteAt(e,t+8);return{value:n,description:"".concat(n)}}}function Ot(e,t){if(!(t+9+1>e.byteLength)){var n=_.getByteAt(e,t+9);return{value:n,description:{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"}[n]||"Unknown"}}}function Tt(e,t){if(!(t+10+1>e.byteLength)){var n=_.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}}function Mt(e,t){if(!(t+11+1>e.byteLength)){var n=_.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}}function Ft(e,t){if(!(t+12+1>e.byteLength)){var n=_.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}}function xt(e){return(xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var Lt={get:function(e,t,n){if(c=t,c&&(void 0===c.Compression||6===c.Compression.value)&&c.JPEGInterchangeFormat&&c.JPEGInterchangeFormat.value&&c.JPEGInterchangeFormatLength&&c.JPEGInterchangeFormatLength.value){t.type="image/jpeg";var r=n+t.JPEGInterchangeFormat.value;t.image=e.buffer.slice(r,r+t.JPEGInterchangeFormatLength.value),i=t,o="base64",a=function(){return e=this.image,"undefined"!=typeof btoa?btoa(Array.prototype.reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),"")):"undefined"!=typeof Buffer?void 0!==xt(Buffer.from)?Buffer.from(e).toString("base64"):new Buffer(e).toString("base64"):void 0;var e},u=!1,Object.defineProperty(i,o,{get:function(){return u||(u=!0,Object.defineProperty(i,o,{configurable:!0,enumerable:!0,value:a.apply(i),writable:!0})),i[o]},configurable:!0,enumerable:!0})}var i,o,a,u;var c;return t}};function Nt(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=(new Error).stack}Nt.prototype=new Error;var kt={MetadataMissingError:Nt};function Rt(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}t.default={load:Gt,loadView:zt,errors:kt};var Et=kt;function Gt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:!1};return jt(e)&&(e=new Uint8Array(e).buffer),zt(Bt(e),t)}function jt(e){try{return Buffer.isBuffer(e)}catch(e){return!1}}function Bt(e){try{return new DataView(e)}catch(t){return new f(e)}}function zt(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:!1},n=!1,r={},i=H.parseAppMarkers(e),u=i.fileDataOffset,c=i.tiffHeaderOffset,f=i.iptcDataOffset,b=i.xmpChunks,C=i.iccChunks,A=i.pngHeaderOffset;if(y&&s&&Ht(u)){n=!0;var I=he.read(e,u);t.expanded?r.file=I:r=a({},r,I)}if(d&&Wt(c)){n=!0;var w=fe.read(e,c),P=w.Thumbnail,U=Rt(w,["Thumbnail"]);if(t.expanded?r.exif=U:r=a({},r,U),P&&(r.Thumbnail=P),h&&p&&U["IPTC-NAA"]&&!Vt(f)){var D=Me.read(U["IPTC-NAA"].value,0);t.expanded?r.iptc=D:r=a({},r,D)}if(h&&m&&U.ApplicationNotes&&!_t(b)){var O=Xe.read(o(U.ApplicationNotes.value));t.expanded?r.xmp=O:r=a({},r,O)}}if(y&&p&&Vt(f)){n=!0;var T=Me.read(e,f);t.expanded?r.iptc=T:r=a({},r,T)}if(m&&_t(b)){n=!0;var M=Xe.read(e,b);t.expanded?r.xmp=M:r=a({},r,M)}if(y&&g&&Xt(C)){n=!0;var F=bt.read(e,C);t.expanded?r.icc=F:r=a({},r,F)}if(S&&l&&Yt(A)){n=!0;var x=wt.read(e,A);t.expanded?r.pngFile=x:r=a({},r,x)}var L=y&&d&&v&&Lt.get(e,r.Thumbnail,c);if(L&&(r.Thumbnail=L,n=!0),!n)throw new kt.MetadataMissingError;return r}function Ht(e){return void 0!==e}function Wt(e){return void 0!==e}function Vt(e){return void 0!==e}function _t(e){return Array.isArray(e)&&e.length>0}function Xt(e){return Array.isArray(e)&&e.length>0}function Yt(e){return void 0!==e}}])}));
//# sourceMappingURL=exif-reader.js.map