exifreader 4.35.0 → 4.36.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
- !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()}(Object("undefined"!=typeof self?self:this),(function(){return function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:1,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:1})}},t={};function n(e){return n="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},n(e)}function r(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==n(t)?t:t+""}e.r(t),e.d(t,{default:function(){return Gi},errors:function(){return ji},load:function(){return zi},loadView:function(){return Hi}});var i=function(){return e=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"!==n(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 Error("DataView: Passed buffer type is unsupported.");this.buffer=t,this.byteLength=this.buffer.length},(t=[{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)}}])&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||0,i.configurable=1,"value"in i&&(i.writable=1),Object.defineProperty(e,r(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:0}),e;var e,t}();function o(e,t,n){try{return new DataView(e,t,n)}catch(r){return new i(e,t,n)}}function a(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return s(r)}function u(e,t){for(var n=[],r=0;t+r<e.byteLength;){var i=e.getUint8(t+r);if(0===i)break;n.push(i),r++}return s(n)}function c(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i+=2)r.push(e.getUint16(t+i));return 0===r[r.length-1]&&r.pop(),s(r)}function f(e,t){var n=e.getUint8(t);return[n,a(e,t+1,n)]}function s(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function l(){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function d(e,t,n){var r=0;Object.defineProperty(e,t,{get:function(){return r||(r=1,Object.defineProperty(e,t,{configurable:1,enumerable:1,value:n.apply(e),writable:1})),e[t]},configurable:1,enumerable:1})}function p(e){return"undefined"!=typeof btoa?"string"==typeof e?btoa(e):btoa(Array.prototype.reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),"")):"undefined"!=typeof Buffer?"undefined"!=typeof Buffer.from?Buffer.from(e).toString("base64"):new Buffer(e).toString("base64"):void 0}function m(e,t){return Array(t+1).join(e)}var g=void 0;function v(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"string";if(0===t&&"function"==typeof DecompressionStream){var i=new DecompressionStream("deflate"),o=new Blob([e]).stream().pipeThrough(i);return"dataview"===r?new Response(o).arrayBuffer().then((function(e){return new DataView(e)})):new Response(o).arrayBuffer().then((function(e){return new TextDecoder(n).decode(e)}))}return void 0!==t?Promise.reject("Unknown compression method ".concat(t,".")):e}var h={USE_FILE:1,USE_JFIF:1,USE_PNG_FILE:1,USE_EXIF:1,USE_IPTC:1,USE_XMP:1,USE_ICC:1,USE_MPF:1,USE_PHOTOSHOP:1,USE_THUMBNAIL:1,USE_TIFF:1,USE_JPEG:1,USE_PNG:1,USE_HEIC:1,USE_AVIF:1,USE_WEBP:1,USE_GIF:1,USE_MAKER_NOTES:1};function y(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function S(e){if(e.length>=8){var t=y(e.slice(0,8));if("ASCII\0\0\0"===t)return y(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 b(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}var I=18761,C=19789,U=I,A=function(e,t){if(e.getUint16(t)===I)return I;if(e.getUint16(t)===C)return C;throw Error("Illegal byte order value. Faulty image.")},P=2,E=65496,w=2,x=4,T=2,F=2,O=10,M=18,R=33,N=79,k=18,L=8,D="ICC_PROFILE\0",_=x+D.length,B=_+1,G="MPF\0",j=65472,z=65474,V=65476,H=65499,W=65501,X=65498,Y=65504,J=65505,K=65506,q=65517,$=65519,Z=65534,Q=65535,ee="JFIF",te="Exif",ne="http://ns.adobe.com/xap/1.0/\0",re="http://ns.adobe.com/xmp/extension/\0",ie="Photoshop 3.0";function oe(e,t){return e.getUint16(t)===j}function ae(e,t){return e.getUint16(t)===z}function ue(e,t){var n=D.length;return e.getUint16(t)===K&&a(e,t+x,n)===D}function ce(e,t){var n=G.length;return e.getUint16(t)===K&&a(e,t+x,n)===G}function fe(e,t){var n=ee.length;return e.getUint16(t)===Y&&a(e,t+x,n)===ee&&0===e.getUint8(t+x+n)}function se(e,t){var n=te.length;return e.getUint16(t)===J&&a(e,t+x,n)===te&&0===e.getUint8(t+x+n)}function le(e,t){return e.getUint16(t)===J&&function(e,t){var n=ne.length;return a(e,t+x,n)===ne}(e,t)}function de(e,t){return e.getUint16(t)===J&&function(e,t){var n=re.length;return a(e,t+x,n)===re}(e,t)}function pe(e,t){return{dataOffset:e+R,length:t-(R-T)}}function me(e,t){return{dataOffset:e+N,length:t-(N-T)}}function ge(e,t){var n=ie.length;return e.getUint16(t)===q&&a(e,t+x,n)===ie&&0===e.getUint8(t+x+n)}function ve(e,t){var n=e.getUint16(t);return n>=Y&&n<=$||n===Z||n===j||n===z||n===V||n===H||n===W||n===X}function he(e,t){return e.getUint16(t)===Q}function ye(e,t,n,r){var i=function(e,t,n){try{if(t+8>n)return;var r=e.getUint16(t+0),i=r===U;if(!i&&19789!==r)return;if(42!==e.getUint16(t+2,i))return;var o=t+e.getUint32(t+4,i);if(o+2>n)return;var a=e.getUint16(o,i);return{ifdEntries:a,isValid:o+(2+12*a+4)<=n&&a>0}}catch(e){return}}(e,r,t+T+n);if(!i)return 0;var o=Number.isInteger(i.ifdEntries)?i.ifdEntries:0;return(i.isValid?1e9:0)+1e6*o+n}var Se="‰PNG\r\n\n",be=4,Ie=4,Ce=0,Ue=be,Ae=be+Ie,Pe="XML:com.adobe.xmp\0",Ee="tEXt",we="iTXt",xe="zTXt",Te="pHYs",Fe="tIME",Oe="eXIf",Me="iCCP";function Re(e,t){return"IHDR"===a(e,t+Ue,Ie)}function Ne(e,t){return a(e,t+Ue,Ie)===we&&a(e,t+Ae,Pe.length)===Pe}function ke(e,t,n){var r=a(e,t+Ue,Ie);return r===Ee||r===we||r===xe&&n}function Le(e,t){return a(e,t+Ue,Ie)===Oe}function De(e,t){return a(e,t+Ue,Ie)===Me}function _e(e,t){var n=[Te,Fe],r=a(e,t+Ue,Ie);return n.includes(r)}function Be(e,t){t+=Ae+Pe.length+1+1;for(var n=0;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function Ge(e,t){var n=u(e,t);return t+=n.length+1,{profileName:n,compressionMethod:e.getUint8(t),compressedProfileOffset:t+=1}}function je(e,t,n,r,i,o,a,u){if(void 0===u)return[];for(var c=[],f=n.items,s=0;s<u;s++){var l={extents:[]};l.itemId=ze(e,f,t),f+=r.item.itemId,l.constructionMethod=1===t||2===t?15&e.getUint16(f):void 0,f+=r.item.constructionMethod,l.dataReferenceIndex=e.getUint16(f),f+=r.item.dataReferenceIndex,l.baseOffset=He(e,f,r.item.baseOffset),f+=r.item.baseOffset,l.extentCount=e.getUint16(f),f+=r.item.extentCount;for(var d=0;d<l.extentCount;d++){var p={};p.extentIndex=Ve(e,t,f,a),f+=r.item.extent.extentIndex,p.extentOffset=He(e,f,i),f+=r.item.extent.extentOffset,p.extentLength=He(e,f,o),f+=r.item.extent.extentLength,l.extents.push(p)}c.push(l)}return c}function ze(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}function Ve(e,t,n,r){if((1===t||2===t)&&r>0)return He(e,n,r)}function He(e,t,n){return 4===n?e.getUint32(t):8===n?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),function(e,t){return e.getUint32(t+4)}(e,t)):0}var We=1165519206,Xe=1835625829;function Ye(e,t){var n=function(e,t){var n=e.getUint32(t);return function(e){return 0===e}(n)?{length:e.byteLength-t,contentOffset:t+4+4}:function(e){return 1===e}(n)&&function(e,t){return 0===e.getUint32(t+8)}(e,t)?{length:e.getUint32(t+12),contentOffset:t+4+4+8}:{length:n,contentOffset:t+4+4}}(e,t),r=n.length,i=n.contentOffset;if(!(r<8)){var o=e.getUint32(t+4);if(1718909296===o)return function(e,t,n){return{type:"ftyp",majorBrand:a(e,t,4),length:n}}(e,i,r);if(1768977008===o)return function(e,t,n,r){return{type:"iprp",subBoxes:$e(e,n,r-(n-t)),length:r}}(e,t,i,r);if(1768973167===o)return function(e,t,n,r){return{type:"ipco",properties:$e(e,n,r-(n-t)),length:r}}(e,t,i,r);if(1668246642===o)return function(e,t,n){return{type:"colr",icc:qe(e,t),length:n}}(e,i,r);var c=e.getUint8(i);return 1835365473===o?function(e,t,n,r){return{type:"meta",subBoxes:$e(e,n+3,r-(n+3-t)),length:r}}(e,t,i+1,r):1768714083===o?function(e,t,n,r){var i=function(e,t){var n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};e<2?(n.itemCount=2,n.item.itemId=2):2===e&&(n.itemCount=4,n.item.itemId=4),n.item.constructionMethod=1===e||2===e?2:0;var r={offsetSize:t,lengthSize:t,baseOffsetSize:t+1,indexSize:t+1};return r.itemCount=t+2,r.items=r.itemCount+n.itemCount,r.item={itemId:0},r.item.constructionMethod=r.item.itemId+n.item.itemId,r.item.dataReferenceIndex=r.item.constructionMethod+n.item.constructionMethod,{offsets:r,sizes:n}}(t,n+3),o=i.offsets,a=i.sizes,u=e.getUint8(o.offsetSize)>>4;a.item.extent.extentOffset=u;var c=15&e.getUint8(o.lengthSize);a.item.extent.extentLength=c;var f=e.getUint8(o.baseOffsetSize)>>4;a.item.baseOffset=f;var s=function(e,t,n){if(1===n||2===n)return 15&e.getUint8(t)}(e,o.indexSize,t);a.item.extent.extentIndex=void 0!==s?s:0;var l=function(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}(e,o.itemCount,t);return{type:"iloc",items:je(e,t,o,a,u,c,s,l),length:r}}(e,c,i+1,r):1768517222===o?function(e,t,n,r,i){var o=function(e,t){var n={entryCount:t+3},r={};return r.entryCount=0===e?2:4,n.itemInfos=n.entryCount+r.entryCount,{offsets:n}}(n,r),a=o.offsets;return{type:"iinf",itemInfos:$e(e,a.itemInfos,i-(a.itemInfos-t)),length:i}}(e,t,c,i+1,r):1768842853===o?function(e,t,n,r,i){r+=3;var o={type:"infe",length:i};return 0!==n&&1!==n||(o.itemId=e.getUint16(r),r+=2,o.itemProtectionIndex=e.getUint16(r),r+=2,o.itemName=u(e,r),r+=o.itemName.length+1),n>=2&&(2===n?(o.itemId=e.getUint16(r),r+=2):3===n&&(o.itemId=e.getUint32(r),r+=4),o.itemProtectionIndex=e.getUint16(r),r+=2,o.itemType=e.getUint32(r),r+=4,o.itemName=u(e,r),r+=o.itemName.length+1,o.itemType===Xe?(o.contentType=u(e,r),t+i>(r+=o.contentType.length+1)&&(o.contentEncoding=u(e,r),r+=o.contentEncoding.length+1)):1970432288===o.itemType&&(o.itemUri=u(e,r),r+=o.itemUri.length+1)),o}(e,t,c,i+1,r):{type:void 0,length:r}}}function Je(e){if(h.USE_EXIF||h.USE_XMP||h.USE_ICC){var t={},n=function(e){for(var t=0;t+4+4<=e.byteLength;){var n=Ye(e,t);if(void 0===n)break;if("meta"===n.type)return n;t+=n.length}}(e);return n?(h.USE_EXIF&&(t.tiffHeaderOffset=function(e,t){try{var n=function(e){return e.subBoxes.find((function(e){return"iinf"===e.type})).itemInfos.find((function(e){return e.itemType===We}))}(t).itemId,r=Ke(t,n);return function(e,t){return t+4+e.getUint32(t)}(e,r.baseOffset+r.extents[0].extentOffset)}catch(e){return}}(e,n)),h.USE_XMP&&(t.xmpChunks=function(e){try{var t=function(e){return e.subBoxes.find((function(e){return"iinf"===e.type})).itemInfos.find((function(e){return e.itemType===Xe&&"application/rdf+xml"===e.contentType}))}(e).itemId,n=Ke(e,t),r=Ke(e,t).extents[0];return[{dataOffset:n.baseOffset+r.extentOffset,length:r.extentLength}]}catch(e){return}}(n)),h.USE_ICC&&(t.iccChunks=function(e){try{var t=e.subBoxes.find((function(e){return"iprp"===e.type})).subBoxes.find((function(e){return"ipco"===e.type})).properties.find((function(e){return"colr"===e.type})).icc;if(t)return[t]}catch(e){}}(n)),t.hasAppMarkers=void 0!==t.tiffHeaderOffset||void 0!==t.xmpChunks||void 0!==t.iccChunks,t):{hasAppMarkers:0}}return{}}function Ke(e,t){return e.subBoxes.find((function(e){return"iloc"===e.type})).items.find((function(e){return e.itemId===t}))}function qe(e,t){var n=a(e,t,4);if("prof"===n||"rICC"===n)return{offset:t+4,length:e.getUint32(t+4),chunkNumber:1,chunksTotal:1}}function $e(e,t,n){for(var r=[We,Xe],i=[],o=t;o<t+n;){var a=Ye(e,o);if(void 0===a)break;void 0===a.type||void 0!==a.itemType&&-1===r.indexOf(a.itemType)||i.push(a),o+=a.length}return i}var Ze=6,Qe=["GIF87a","GIF89a"],et=0,tt="<?xpacket begin",nt={parseAppMarkers:function(e,t){if(h.USE_TIFF&&function(e){return!!e&&e.byteLength>=4&&function(e){var t=e.getUint16(0)===U;return 42===e.getUint16(2,t)}(e)}(e))return rt(h.USE_EXIF?{hasAppMarkers:1,tiffHeaderOffset:0}:{},"tiff","TIFF");if(h.USE_JPEG&&function(e){return!!e&&e.byteLength>=P&&e.getUint16(0)===E}(e))return rt(function(e){for(var t,n,r,i,o,a,u,c,f,s,l,d,p,m=w,g=0;m+x+5<=e.byteLength;){if(h.USE_FILE&&oe(e,m))t=e.getUint16(m+T),n=m+T;else if(h.USE_FILE&&ae(e,m))t=e.getUint16(m+T),r=m+T;else if(h.USE_JFIF&&fe(e,m))t=e.getUint16(m+T),i=m+F;else if(h.USE_EXIF&&se(e,m)){t=e.getUint16(m+T),g++;var v=m+O;if(1===g)l=v,d=m,p=t;else if(2===g){s=ye(e,d,p,l);var y=ye(e,m,t,v);y>s&&(s=y,l=v,d=m,p=t)}else{var S=ye(e,m,t,v);S>s&&(s=S,l=v,d=m,p=t)}o=l}else if(h.USE_XMP&&le(e,m))u||(u=[]),t=e.getUint16(m+T),u.push(pe(m,t));else if(h.USE_XMP&&de(e,m))u||(u=[]),t=e.getUint16(m+T),u.push(me(m,t));else if(h.USE_IPTC&&ge(e,m))t=e.getUint16(m+T),a=m+M;else if(h.USE_ICC&&ue(e,m)){t=e.getUint16(m+T);var b=m+k,I=t-(k-T),C=e.getUint8(m+_),U=e.getUint8(m+B);c||(c=[]),c.push({offset:b,length:I,chunkNumber:C,chunksTotal:U})}else if(h.USE_MPF&&ce(e,m))t=e.getUint16(m+T),f=m+L;else{if(!ve(e,m)){if(he(e,m)){m++;continue}break}t=e.getUint16(m+T)}m+=T+t}return g>1&&function(e){"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("ExifReader: Found ".concat(e," Exif segments (APP1). ")+"Will pick the best candidate segment.")}(g),{hasAppMarkers:m>w,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:u,iccChunks:c,mpfDataOffset:f}}(e),"jpeg","JPEG");if(h.USE_PNG&&function(e){return!!e&&a(e,0,Se.length)===Se}(e))return rt(function(e,t){for(var n={hasAppMarkers:0},r=Se.length;r+be+Ie<=e.byteLength;){if(h.USE_PNG_FILE&&Re(e,r))n.hasAppMarkers=1,n.pngHeaderOffset=r+Ae;else if(h.USE_XMP&&Ne(e,r)){var i=Be(e,r);void 0!==i&&(n.hasAppMarkers=1,n.xmpChunks=[{dataOffset:i,length:e.getUint32(r+Ce)-(i-(r+Ae))}])}else if(ke(e,r,t)){n.hasAppMarkers=1;var o=a(e,r+Ue,Ie);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:e.getUint32(r+Ce),type:o,offset:r+Ae})}else if(Le(e,r))n.hasAppMarkers=1,n.tiffHeaderOffset=r+Ae;else if(h.USE_ICC&&t&&De(e,r)){n.hasAppMarkers=1;var u=e.getUint32(r+Ce),c=r+Ae,f=Ge(e,c),s=f.profileName,l=f.compressionMethod,d=f.compressedProfileOffset;n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:d,length:u-(d-c),chunkNumber:1,chunksTotal:1,profileName:s,compressionMethod:l})}else _e(e,r)&&(n.hasAppMarkers=1,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(r+Ce));r+=e.getUint32(r+Ce)+be+Ie+4}return n}(e,t),"png","PNG");if(h.USE_HEIC&&function(e){if(!e)return 0;try{var t=Ye(e,0);return t&&-1!==["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"].indexOf(t.majorBrand)}catch(e){return 0}}(e))return rt(function(e){return Je(e)}(e),"heic","HEIC");if(h.USE_AVIF&&function(e){if(!e)return 0;try{var t=Ye(e,0);return t&&"avif"===t.majorBrand}catch(e){return 0}}(e))return rt(function(e){return Je(e)}(e),"avif","AVIF");if(h.USE_WEBP&&function(e){return!!e&&"RIFF"===a(e,0,4)&&"WEBP"===a(e,8,4)}(e))return rt(function(e){for(var t,n,r,i,o=12,u=0;o+8<e.byteLength;){var c=a(e,o,4),f=e.getUint32(o+4,1);h.USE_EXIF&&"EXIF"===c?(u=1,t="Exif\0\0"===a(e,o+8,6)?o+8+6:o+8):h.USE_XMP&&"XMP "===c?(u=1,n=[{dataOffset:o+8,length:f}]):h.USE_ICC&&"ICCP"===c?(u=1,r=[{offset:o+8,length:f,chunkNumber:1,chunksTotal:1}]):"VP8X"===c&&(u=1,i=o+8),o+=8+(f%2==0?f:f+1)}return{hasAppMarkers:u,tiffHeaderOffset:t,xmpChunks:n,iccChunks:r,vp8xChunkOffset:i}}(e),"webp","WebP");if(h.USE_GIF&&function(e){return!!e&&Qe.includes(a(e,0,Ze))}(e))return rt({gifHeaderOffset:0},"gif","GIF");if(h.USE_XMP&&function(e){return!!e&&a(e,et,tt.length)===tt}(e))return rt(function(e){var t=[];return t.push({dataOffset:et,length:e.byteLength}),{xmpChunks:t}}(e),"xml","XML");throw Error("Invalid image format")}};function rt(e,t,n){return l({},e,{fileType:{value:t,description:n}})}var it={ApertureValue:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)},ColorSpace:function(e){return 1===e?"sRGB":65535===e?"Uncalibrated":"Unknown"},ComponentsConfiguration: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("")},Contrast:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"},CustomRendered:function(e){return 0===e?"Normal process":1===e?"Custom process":"Unknown"},ExposureMode:function(e){return 0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown"},ExposureProgram: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"},ExposureTime:function(e){if(e[0]/e[1]>.25){var t=e[0]/e[1];return Number.isInteger(t)?""+t:t.toFixed(1)}return 0!==e[0]?"1/".concat(Math.round(e[1]/e[0])):"0/".concat(e[1])},FNumber:function(e){return"f/".concat(Number(e[0]/e[1]).toFixed(1))},FocalLength:function(e){return e[0]/e[1]+" mm"},FocalPlaneResolutionUnit:function(e){return 2===e?"inches":3===e?"centimeters":4===e?"millimeters":"Unknown"},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"},MeteringMode: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"},ResolutionUnit:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"},Saturation:function(e){return 0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown"},FocalLengthIn35mmFilm:function(e){return 0===e?"Unknown":e+" mm"},SceneCaptureType:function(e){return 0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown"},Sharpness:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"},ShutterSpeedValue:function(e){var t=Math.pow(2,e[0]/e[1]);return t<=1?"".concat(Math.round(1/t)):"1/".concat(Math.round(t))},WhiteBalance:function(e){return 0===e?"Auto white balance":1===e?"Manual white balance":"Unknown"},XResolution:function(e){return""+Math.round(e[0]/e[1])},YResolution:function(e){return""+Math.round(e[0]/e[1])}},ot={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:it.XResolution},283:{name:"YResolution",description:it.YResolution},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:it.ResolutionUnit},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:{name:"XPTitle",description:at},40092:{name:"XPComment",description:at},40093:{name:"XPAuthor",description:at},40094:{name:"XPKeywords",description:at},40095:{name:"XPSubject",description:at},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:it.LightSource},50779:{name:"CalibrationIlluminant2",description:it.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"};function at(e){return new TextDecoder("utf-16").decode(new Uint8Array(e)).replace(/\u0000+$/,"")}function ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ct(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ft={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:b},3:{name:"GPSLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:b},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,n=function(e){if(Array.isArray(e))return e}(t=e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,c=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){c=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return ct(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ct(e,2):void 0}}(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.")}(),r=n[0]/n[1];return/^\d(\.|$)/.test("".concat(r))?"0".concat(r):r})).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:S},28:{name:"GPSAreaInformation",description:S},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},st={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:function(e){return y(e)}},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},lt={45056:{name:"MPFVersion",description:function(e){return y(e)}},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"};function dt(e){return dt="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},dt(e)}function pt(e,t,n){return(t=function(e){var t=function(e){if("object"!=dt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==dt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}var mt=l({},ot,{33434:{name:"ExposureTime",description:it.ExposureTime},33437:{name:"FNumber",description:it.FNumber},34850:{name:"ExposureProgram",description:it.ExposureProgram},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 y(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:it.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:it.ShutterSpeedValue},37378:{name:"ApertureValue",description:it.ApertureValue},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:it.MeteringMode},37384:{name:"LightSource",description:it.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:it.FocalLength},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:S},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",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:it.ColorSpace},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:it.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,c=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){c=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return ut(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ut(e,2):void 0}}(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.")}(),r=n[0],i=n[1];return"X: ".concat(r,", Y: ").concat(i)}},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:it.CustomRendered},41986:{name:"ExposureMode",description:it.ExposureMode},41987:{name:"WhiteBalance",description:it.WhiteBalance},41988:{name:"DigitalZoomRatio",description:function(e){return 0===e[0]?"Digital zoom was not used":""+e[0]/e[1]}},41989:{name:"FocalLengthIn35mmFilm",description:it.FocalLengthIn35mmFilm},41990:{name:"SceneCaptureType",description:it.SceneCaptureType},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:it.Contrast},41993:{name:"Saturation",description:it.Saturation},41994:{name:"Sharpness",description:it.Sharpness},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=parseFloat((e[0][0]/e[0][1]).toFixed(5)),n=parseFloat((e[1][0]/e[1][1]).toFixed(5)),r="".concat(t,"-").concat(n," mm");if(0===e[3][1])return"".concat(r," f/?");var i=1/(e[2][1]/e[2][1]/(e[3][0]/e[3][1]));return"".concat(r," f/").concat(parseFloat(i.toFixed(5)))}},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"}),gt="0th",vt="exif",ht="interoperability",yt="canon",St="pentax",bt=pt(pt(pt(pt(pt(pt(pt(pt({},gt,mt),"1st",ot),vt,mt),"gps",ft),ht,st),"mpf",h.USE_MPF?lt:{}),yt,h.USE_MAKER_NOTES?{4:{name:"ShotInfo",description:function(e){return e}}}:{}),St,h.USE_MAKER_NOTES?{0:{name:"PentaxVersion",description:function(e){return e.join(".")}},5:"PentaxModelID",555:"LevelInfo"}:{}),It={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},Ct={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},Ut={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:At,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===U)},getLongAt:Pt,getRationalAt:function(e,t,n){return[Pt(e,t,n),Pt(e,t+4,n)]},getUndefinedAt:function(e,t){return At(e,t)},getSlongAt:Et,getSrationalAt:function(e,t,n){return[Et(e,t,n),Et(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return Pt(e,t,n)},typeSizes:It,tagTypes:Ct,getTypeSize:function(e){if(void 0===Ct[e])throw Error("No such type found.");return It[Ct[e]]}};function At(e,t){return e.getUint8(t)}function Pt(e,t,n){return e.getUint32(t,n===U)}function Et(e,t,n){return e.getInt32(t,n===U)}var wt={1:Ut.getByteAt,2:Ut.getAsciiAt,3:Ut.getShortAt,4:Ut.getLongAt,5:Ut.getRationalAt,7:Ut.getUndefinedAt,9:Ut.getSlongAt,10:Ut.getSrationalAt,13:Ut.getIfdPointerAt};function xt(e,t,n){return t+Ut.getLongAt(e,t+4,n)}function Tt(e,t,n,r,i,o){var a,u,c=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,f=Ut.getTypeSize("SHORT"),s={},l=function(e,t,n){return t+Ut.getTypeSize("SHORT")<=e.byteLength?Ut.getShortAt(e,t,n):0}(e,r,i);r+=f;for(var d=0;d<l&&!(r+12>e.byteLength);d++){var p=Ft(e,t,n,r,i,o);void 0!==p&&(s[p.name]={id:p.id,value:p.value,description:p.description},c&&(s[p.name].computed=(a=p.tagType,u=p.value,a===Ut.tagTypes.ASCII?Array.isArray(u)&&1===u.length?u[0]:u:a===Ut.tagTypes.RATIONAL||a===Ut.tagTypes.SRATIONAL?function(e){return Array.isArray(e)&&2===e.length?"number"==typeof e[0]&&"number"==typeof e[1]:0}(u)?Rt(u):Array.isArray(u)?u.map((function(e){return Rt(e)})):u:u)),("MakerNote"===p.name||t===St&&"LevelInfo"===p.name)&&(s[p.name].__offset=p.__offset)),r+=12}if(h.USE_THUMBNAIL&&r<e.byteLength-Ut.getTypeSize("LONG")){var m=Ut.getLongAt(e,r,i);0!==m&&t===gt&&(s.Thumbnail=Tt(e,"1st",n,n+m,i,o,c))}return s}function Ft(e,t,n,r,i,o){var a,u,c=Ut.getTypeSize("SHORT"),f=c+Ut.getTypeSize("SHORT"),s=f+Ut.getTypeSize("LONG"),l=Ut.getShortAt(e,r,i),d=Ut.getShortAt(e,r+c,i),p=Ut.getLongAt(e,r+f,i);if(void 0!==Ut.typeSizes[d]&&(o||void 0!==bt[t][l])){a=function(e,t){return Ut.typeSizes[e]*t<=Ut.getTypeSize("LONG")}(d,p)?Ot(e,u=r+s,d,p,i):function(e,t,n,r,i){return t+n+Ut.typeSizes[r]*i<=e.byteLength}(e,n,u=Ut.getLongAt(e,r+s,i),d,p)?Ot(e,n+u,d,p,i,33723===l):"<faulty value>",d===Ut.tagTypes.ASCII&&(a=function(e){try{return e.map((function(e){return decodeURIComponent(escape(e))}))}catch(t){return e}}(a=function(e){for(var t=[],n=0,r=0;r<e.length;r++)"\0"!==e[r]?(void 0===t[n]&&(t[n]=""),t[n]+=e[r]):n++;return t}(a)));var m="undefined-".concat(l),g=a;if(void 0!==bt[t][l])if(void 0!==bt[t][l].name&&void 0!==bt[t][l].description){m=bt[t][l].name;try{g=bt[t][l].description(a)}catch(e){g=Mt(a)}}else d===Ut.tagTypes.RATIONAL||d===Ut.tagTypes.SRATIONAL?(m=bt[t][l],g=""+a[0]/a[1]):(m=bt[t][l],g=Mt(a));return{id:l,name:m,value:a,description:g,tagType:d,__offset:u}}}function Ot(e,t,n,r,i){var o=[];arguments.length>5&&void 0!==arguments[5]&&arguments[5]&&(r*=Ut.typeSizes[n],n=Ut.tagTypes.BYTE);for(var a=0;a<r;a++)o.push(wt[n](e,t,i)),t+=Ut.typeSizes[n];return n===Ut.tagTypes.ASCII?o=Ut.getAsciiValue(o):1===o.length&&(o=o[0]),o}function Mt(e){return e instanceof Array?e.join(", "):e}function Rt(e){if(!Array.isArray(e)||2!==e.length)return e;var t=e[0],n=e[1];return Number.isFinite(t)&&Number.isFinite(n)?0===n?null:t/n:e}var Nt="Exif IFD Pointer",kt="GPS Info IFD Pointer",Lt="Interoperability IFD Pointer",Dt={read:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=A(e,t),o=function(e,t,n,r,i){return Tt(e,gt,t,xt(e,t,n),n,r,i)}(e,t,i,n,r);return{tags:o=Gt(o=Bt(o=_t(o,e,t,i,n,r),e,t,i,n,r),e,t,i,n,r),byteOrder:i}}};function _t(e,t,n,r,i,o){return void 0!==e[Nt]?l(e,Tt(t,vt,n,n+e[Nt].value,r,i,o)):e}function Bt(e,t,n,r,i,o){return void 0!==e[kt]?l(e,Tt(t,"gps",n,n+e[kt].value,r,i,o)):e}function Gt(e,t,n,r,i,o){return void 0!==e[Lt]?l(e,Tt(t,ht,n,n+e[Lt].value,r,i,o)):e}var jt={read:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=A(e,t);return function(e,t,n,r){if(!n.MPEntry)return n;for(var i=[],o=0;o<Math.ceil(n.MPEntry.value.length/zt);o++){i[o]={};var a=Vt(n.MPEntry.value,o*zt,Ut.getTypeSize("LONG"),r);i[o].ImageFlags=Ht(a),i[o].ImageFormat=Wt(a),i[o].ImageType=Xt(a);var u=Vt(n.MPEntry.value,o*zt+4,Ut.getTypeSize("LONG"),r);i[o].ImageSize={value:u,description:""+u};var c=Yt(o,n.MPEntry,r,t);i[o].ImageOffset={value:c,description:""+c};var f=Vt(n.MPEntry.value,o*zt+12,Ut.getTypeSize("SHORT"),r);i[o].DependentImage1EntryNumber={value:f,description:""+f};var s=Vt(n.MPEntry.value,o*zt+14,Ut.getTypeSize("SHORT"),r);i[o].DependentImage2EntryNumber={value:s,description:""+s},i[o].image=e.buffer.slice(c,c+u),d(i[o],"base64",(function(){return p(this.image)}))}return n.Images=i,n}(e,t,Tt(e,"mpf",t,xt(e,t,i),i,n,r),i)}},zt=16;function Vt(e,t,n,r){if(r===U){for(var i=0,o=0;o<n;o++)i+=e[t+o]<<8*o;return i}for(var a=0,u=0;u<n;u++)a+=e[t+u]<<8*(n-1-u);return a}function Ht(e){var t=[e>>31&1,e>>30&1,e>>29&1],n=[];return t[0]&&n.push("Dependent Parent Image"),t[1]&&n.push("Dependent Child Image"),t[2]&&n.push("Representative Image"),{value:t,description:n.join(", ")||"None"}}function Wt(e){var t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function Xt(e){var t=16777215&e;return{value:t,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[t]||"Unknown"}}function Yt(e,t,n,r){return function(e){return 0===e}(e)?0:Vt(t.value,e*zt+8,Ut.getTypeSize("LONG"),n)+r}var Jt={read:function(e,t){var n=function(e,t){return Ut.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(8>n)){var r=Ut.getByteAt(e,t+7);return{value:r,description:""+r}}}(e,t,n);return{"Bits Per Sample":Kt(e,t,n),"Image Height":qt(e,t,n),"Image Width":$t(e,t,n),"Color Components":r,Subsampling:r&&Zt(e,t,r.value,n)}}};function Kt(e,t,n){if(!(3>n)){var r=Ut.getByteAt(e,t+2);return{value:r,description:""+r}}}function qt(e,t,n){if(!(5>n)){var r=Ut.getShortAt(e,t+3);return{value:r,description:"".concat(r,"px")}}}function $t(e,t,n){if(!(7>n)){var r=Ut.getShortAt(e,t+5);return{value:r,description:"".concat(r,"px")}}}function Zt(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([Ut.getByteAt(e,a),Ut.getByteAt(e,a+1),Ut.getByteAt(e,a+2)])}return{value:i,description:i.length>1?Qt(i)+en(i):""}}}function Qt(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((function(e){return t[e[0]]})).join("")}function en(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 tn={read:function(e,t){var n=function(e,t){return Ut.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(15>n)){var r=Ut.getByteAt(e,t+14);return{value:r,description:"".concat(r,"px")}}}(e,t,n),i=function(e,t,n){if(!(16>n)){var r=Ut.getByteAt(e,t+15);return{value:r,description:"".concat(r,"px")}}}(e,t,n),o={"JFIF Version":nn(e,t,n),"Resolution Unit":rn(e,t,n),XResolution:an(e,t,n),YResolution:un(e,t,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":i};if(void 0!==r&&void 0!==i){var a=function(e,t,n,r){if(!(0===n||16+n>r))return{value:e.buffer.slice(t+16,t+16+n),description:"<24-bit RGB pixel data>"}}(e,t,3*r.value*i.value,n);a&&(o["JFIF Thumbnail"]=a)}for(var u in o)void 0===o[u]&&delete o[u];return o}};function nn(e,t,n){if(!(9>n)){var r=Ut.getByteAt(e,t+7),i=Ut.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}}function rn(e,t,n){if(!(10>n)){var r=Ut.getByteAt(e,t+9);return{value:r,description:on(r)}}}function on(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function an(e,t,n){if(!(12>n)){var r=Ut.getShortAt(e,t+10);return{value:r,description:""+r}}}function un(e,t,n){if(!(14>n)){var r=Ut.getShortAt(e,t+12);return{value:r,description:""+r}}}var cn={iptc:{256:{name:"Model Version",description:function(e){return""+((e[0]<<8)+e[1])}},261:{name:"Destination",repeatable:1},276:{name:"File Format",description:function(e){return""+((e[0]<<8)+e[1])}},278:{name:"File Format Version",description:function(e){return""+((e[0]<<8)+e[1])}},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:fn},336:{name:"Time Sent",description:sn},346:{name:"Coded Character Set",description:ln,encoding_name:ln},356:"UNO",376:{name:"ARM Identifier",description:function(e){return""+((e[0]<<8)+e[1])}},378:{name:"ARM Version",description:function(e){return""+((e[0]<<8)+e[1])}},512:{name:"Record Version",description:function(e){return""+((e[0]<<8)+e[1])}},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:function(e){return"01"===y(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:1,description:function(e){var t=y(e).split(":");return t[2]+(t[3]?"/"+t[3]:"")+(t[4]?"/"+t[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:1},534:"Fixture Identifier",537:{name:"Keywords",repeatable:1},538:{name:"Content Location Code",repeatable:1},539:{name:"Content Location Name",repeatable:1},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:function(e){var t=y(e);return"01"===t?"Object Kill":"02"===t?"Object Replace":"03"===t?"Object Append":"04"===t?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:1},559:{name:"Reference Date",repeatable:1},562:{name:"Reference Number",repeatable:1},567:{name:"Date Created",description:fn},572:{name:"Time Created",description:sn},574:{name:"Digital Creation Date",description:fn},575:{name:"Digital Creation Time",description:sn},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var t=y(e);return"a"===t?"morning":"p"===t?"evening":"b"===t?"both":"Unknown"}},592:{name:"By-line",repeatable:1},597:{name:"By-line Title",repeatable:1},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:1},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:1},637:{name:"Rasterized Caption",description:function(e){return e}},642:"Image Type",643:{name:"Image Orientation",description:function(e){var t=y(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var t=y(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(y(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var t=parseInt(y(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var t=y(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 y(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=y(e);if(t["ObjectData Preview File Format"]){var i=y(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 fn(e){var t=y(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function sn(e){var t=y(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 ln(e){var t=y(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 dn=function(e,t){var n=function(){if("undefined"!=typeof TextDecoder)return TextDecoder}();if("undefined"!=typeof n&&void 0!==e)try{return new n(e).decode(t instanceof DataView?t.buffer: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(""))},pn={read:function(e,t,n){try{if(Array.isArray(e))return hn(new DataView(Uint8Array.from(e).buffer),{size:e.length},0,n);var r=function(e,t){for(;t+12<=e.byteLength;){var n=mn(e,t);if(gn(n))return{naaBlock:n,dataOffset:t+n.headerSize};t+=n.headerSize+n.size+vn(n)}throw Error("No IPTC NAA resource block.")}(e,t);return hn(e,r.naaBlock,r.dataOffset,n)}catch(e){return{}}}};function mn(e,t){if(943868237!==e.getUint32(t,0))throw Error("Not an IPTC resource block.");var n=e.getUint8(t+4+2),r=(n%2==0?n+1:n)+1;return{headerSize:6+r+4,type:e.getUint16(t+4),size:e.getUint32(t+4+2+r)}}function gn(e){return 1028===e.type}function vn(e){return e.size%2!=0?1:0}function hn(e,t,n,r){for(var i={},o=void 0,a=n+t.size;n<a&&n<e.byteLength;){var u=yn(e,n,i,o,r),c=u.tag,f=u.tagSize;if(null===c)break;c&&("encoding"in c&&(o=c.encoding),void 0===i[c.name]||void 0===c.repeatable?i[c.name]={id:c.id,value:c.value,description:c.description}:(i[c.name]instanceof Array||(i[c.name]=[{id:i[c.name].id,value:i[c.name].value,description:i[c.name].description}]),i[c.name].push({id:c.id,value:c.value,description:c.description}))),n+=5+f}return i}function yn(e,t,n,r,i){if(function(e,t){return 28!==e.getUint8(t)}(e,t))return{tag:null,tagSize:0};var o=e.getUint16(t+1),a=e.getUint16(t+3);if(!i&&!cn.iptc[o])return{tag:void 0,tagSize:a};var u=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+5,a),c={id:o,name:Sn(cn.iptc[o],o,u),value:u,description:bn(cn.iptc[o],u,n,r)};return function(e){return cn.iptc[e]&&cn.iptc[e].repeatable}(o)&&(c.repeatable=1),function(e){return cn.iptc[e]&&void 0!==cn.iptc[e].encoding_name}(o)&&(c.encoding=cn.iptc[o].encoding_name(u)),{tag:c,tagSize:a}}function Sn(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 bn(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)?dn(r,t):t}function In(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Cn={"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},"tiff:ResolutionUnit":function(e){return it.ResolutionUnit(parseInt(e,10))},"tiff:XResolution":function(e){return Un(it.XResolution,e)},"tiff:YResolution":function(e){return Un(it.YResolution,e)},"exif:ApertureValue":function(e){return Un(it.ApertureValue,e)},"exif:GPSLatitude":Pn,"exif:GPSLongitude":Pn,"exif:FNumber":function(e){return Un(it.FNumber,e)},"exif:FocalLength":function(e){return Un(it.FocalLength,e)},"exif:FocalPlaneResolutionUnit":function(e){return it.FocalPlaneResolutionUnit(parseInt(e,10))},"exif:ColorSpace":function(e){return it.ColorSpace(function(e){return"0x"===e.substring(0,2)?parseInt(e.substring(2),16):parseInt(e,10)}(e))},"exif:ComponentsConfiguration":function(e,t){if(/^\d, \d, \d, \d$/.test(t)){var n=t.split(", ").map((function(e){return e.charCodeAt(0)}));return it.ComponentsConfiguration(n)}return t},"exif:Contrast":function(e){return it.Contrast(parseInt(e,10))},"exif:CustomRendered":function(e){return it.CustomRendered(parseInt(e,10))},"exif:ExposureMode":function(e){return it.ExposureMode(parseInt(e,10))},"exif:ExposureProgram":function(e){return it.ExposureProgram(parseInt(e,10))},"exif:ExposureTime":function(e){return An(e)?it.ExposureTime(e.split("/").map((function(e){return parseInt(e,10)}))):e},"exif:MeteringMode":function(e){return it.MeteringMode(parseInt(e,10))},"exif:Saturation":function(e){return it.Saturation(parseInt(e,10))},"exif:SceneCaptureType":function(e){return it.SceneCaptureType(parseInt(e,10))},"exif:Sharpness":function(e){return it.Sharpness(parseInt(e,10))},"exif:ShutterSpeedValue":function(e){return Un(it.ShutterSpeedValue,e)},"exif:WhiteBalance":function(e){return it.WhiteBalance(parseInt(e,10))}};function Un(e,t){return An(t)?e(t.split("/")):t}function An(e){return/^-?\d+\/-?\d+$/.test(e)}function Pn(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(","))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,c=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){c=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return In(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?In(e,2):void 0}}(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.")}(),r=n[0],i=n[1];if(void 0!==r&&void 0!==i){var o=parseFloat(r),a=parseFloat(i),u=i.charAt(i.length-1);if(!Number.isNaN(o)&&!Number.isNaN(a))return""+(o+a/60)+u}return e}var En={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};function wn(e){return wn="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},wn(e)}function xn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Tn(e){var t="function"==typeof Map?new Map:void 0;return Tn=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Fn())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&On(i,n.prototype),i}(e,arguments,Mn(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:0,writable:1,configurable:1}}),On(n,e)},Tn(e)}function Fn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Fn=function(){return!!e})()}function On(e,t){return On=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},On(e,t)}function Mn(e){return Mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Mn(e)}var Rn={read:function(e,t,n){var r={};if("string"==typeof e)return Ln(r,e,n),r;var i,o=(i=function(e,t){if(0===t.length)return[];var n=[kn(e,t.slice(0,1))];return t.length>1&&n.push(kn(e,t.slice(1))),n}(e,t),function(e){if(Array.isArray(e))return e}(i)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,c=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){c=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(i)||function(e){if(e){if("string"==typeof e)return xn(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?xn(e,2):void 0}}(i)||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.")}()),a=o[0],u=o[1],c=Ln(r,a,n);if(u){var f=Ln(r,u,n);c||f||(delete r._raw,Ln(r,kn(e,t),n))}return r}},Nn=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Mn(t),function(e,t){if(t&&("object"==wn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Fn()?Reflect.construct(t,n||[],Mn(e).constructor):t.apply(e,n))}(this,t,[e])).name="ParseError",n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:1,configurable:1}}),Object.defineProperty(e,"prototype",{writable:0}),t&&On(e,t)}(t,e),Object.defineProperty(n=t,"prototype",{writable:0}),n;var n}(Tn(Error));function kn(e,t){for(var n=t.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),i=0,o=0;o<t.length;o++){var a=t[o],u=e.buffer.slice(a.dataOffset,a.dataOffset+a.length);r.set(new Uint8Array(u),i),i+=a.length}return new DataView(r.buffer)}function Ln(e,t,n){try{var r=function(e,t){var n=function(e){if(e)return e;if("undefined"!=typeof DOMParser)return new DOMParser;try{var t=require("@xmldom/xmldom");return new(0,t.DOMParser)({onError:t.onErrorStopParsing})}catch(e){return}}(t);if(!n)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),Error();var r="string"==typeof e?e:a(e,0,e.byteLength);return{doc:Dn(n,r.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")),raw:r}}(t,n),i=r.doc,o=r.raw;return e._raw=(e._raw||"")+o,l(e,jn(Bn(_n(i),1))),1}catch(e){return 0}}function Dn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;try{var r=e.parseFromString(t,"application/xml"),i=r.getElementsByTagName("parsererror");if(i.length>0)throw new Nn(i[0].textContent);return r}catch(r){if("ParseError"===r.name&&function(e){for(var t=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd",/Namespace prefix .+ is not defined/],n=0;n<t.length;n++)if(RegExp(t[n]).test(e.message))return 1;return 0}(r)&&!n)return Dn(e,function(e){var t=e.match(/<([A-Za-z_][A-Za-z0-9._-]*)([^>]*)>/);if(!t)return e;var n=t[1],r=function(e){for(var t,n=[],r=/xmlns:([\w-]+)=["'][^"']+["']/g;null!==(t=r.exec(e));)-1===n.indexOf(t[1])&&n.push(t[1]);return n}(e),i=function(e){for(var t,n=[],r=/\b([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*\b/g;null!==(t=r.exec(e));){var i=t[1];"xmlns"!==i&&"xml"!==i&&-1===n.indexOf(i)&&n.push(i)}return n}(e).filter((function(e){return-1===r.indexOf(e)}));return 0===i.length?e:function(e,t,n){var r=RegExp("<"+t+"([^>]*)>");return e.replace(r,"<"+t+"$1"+n+">")}(e,n,function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=En[r]||"http://fallback.namespace/"+r;t.push(" xmlns:"+r+'="'+i+'"')}return t.join("")}(i))}(t),1);throw r}}function _n(e){for(var t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return _n(e.childNodes[t]);if("rdf:RDF"===e.childNodes[t].tagName)return e.childNodes[t]}throw Error()}function Bn(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=function(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t}(e);return 1===(t=r).length&&"#text"===t[0].nodeName?n?{}:function(e){return e.nodeValue}(r[0]):function(e){var t={};return e.forEach((function(e){if(function(e){return e.nodeName&&"#text"!==e.nodeName}(e)){var n=function(e){return{attributes:Gn(e),value:Bn(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}(r)}function Gn(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 jn(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){l(t,zn(e.attributes)),"object"===wn(e.value)&&l(t,Jn(e.value))}))}return t}function zn(e){var t={};for(var n in e)try{Vn(n)&&(t[Wn(n)]={value:e[n],attributes:{},description:Xn(e[n],n)})}catch(e){}return t}function Vn(e){return"rdf:parseType"!==e&&!Hn(e)}function Hn(e){return"xmlns"===e.split(":")[0]}function Wn(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function Xn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Array.isArray(e)){var n=function(e){return e.map((function(e){return void 0!==e.value?Xn(e.value):Xn(e)})).join(", ")}(e);return t&&"function"==typeof Cn[t]?Cn[t](e,n):n}if("object"===wn(e))return function(e){var t=[];for(var n in e)t.push("".concat(Yn(n),": ").concat(Xn(e[n].value)));return t.join("; ")}(e);try{return t&&"function"==typeof Cn[t]?Cn[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function Yn(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 Jn(e){var t={};for(var n in e)try{Hn(n)||(t[Wn(n)]=Kn(e[n],n))}catch(e){}return t}function Kn(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return ir(e[e.length-1],t)}(e,t):function(e){return"Resource"===e.attributes["rdf:parseType"]&&"string"==typeof e.value&&""===e.value.trim()}(e)?{value:"",attributes:{},description:""}:qn(e)?$n(e,t):Qn(e)?er(e,t):tr(e)?nr(e,t):function(e){return void 0!==rr(e.value)}(e)?function(e,t){var n=rr(e.value).value["rdf:li"],r=Zn(e),i=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach((function(e){i.push(function(e){return qn(e)?$n(e):Qn(e)?er(e).value:tr(e)?nr(e).value:ir(e)}(e))})),{value:i,attributes:r,description:Xn(i,t)}}(e,t):ir(e,t)}function qn(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 $n(e,t){var n=Zn(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),l(n,Zn(e),function(e){var t={};for(var n in e.value)"rdf:value"===n||Hn(n)||(t[Wn(n)]=e.value[n].value);return t}(e));var r=function(e){return or(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:Xn(r,t)}}function Zn(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||Hn(n)||(t[Wn(n)]=e.attributes[n]);return t}function Qn(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function er(e,t){var n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(l(n.value,zn(e.value["rdf:Description"].attributes)),l(n.attributes,Zn(e)),e=e.value["rdf:Description"]),l(n.value,Jn(e.value)),n.description=Xn(n.value,t),n}function tr(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function nr(e,t){var n=zn(e.attributes);return{value:n,attributes:{},description:Xn(n,t)}}function rr(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function ir(e,t){var n=or(e)||jn(e.value);return{value:n,attributes:Zn(e),description:Xn(n,t)}}function or(e){return e.attributes&&e.attributes["rdf:resource"]}function ar(e){return ar="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},ar(e)}function ur(e,t,n){return(t=function(e){var t=function(e){if("object"!=ar(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=ar(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==ar(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}function cr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var fr={2e3:{name:"PathInformation",description:function(e){for(var t={},n=[],r=0;r<e.byteLength;r+=26){var i=Ut.getShortAt(e,r);sr[i]&&(t[i]||(t[i]=sr[i].description),n.push({type:i,path:sr[i].path(e,r+2)}))}return JSON.stringify({types:t,paths:n})}},2999:{name:"ClippingPathName",description:function(e){return(t=f(e,0),function(e){if(Array.isArray(e))return e}(t)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,c=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){c=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return cr(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?cr(e,2):void 0}}(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.")}())[1];var t}}},sr=ur(ur(ur(ur(ur(ur(ur(ur(ur({},0,{description:"Closed subpath length",path:function(e,t){return[Ut.getShortAt(e,t)]}}),1,{description:"Closed subpath Bezier knot, linked",path:lr}),2,{description:"Closed subpath Bezier knot, unlinked",path:lr}),3,{description:"Open subpath length",path:function(e,t){return[Ut.getShortAt(e,t)]}}),4,{description:"Open subpath Bezier knot, linked",path:lr}),5,{description:"Open subpath Bezier knot, unlinked",path:lr}),6,{description:"Path fill rule",path:function(){return[]}}),8,{description:"Initial fill rule",path:function(e,t){return[Ut.getShortAt(e,t)]}}),7,{description:"Clipboard",path:function(e,t){return[[pr(e,t,8),pr(e,t+4,8),pr(e,t+8,8),pr(e,t+12,8)],pr(e,t+16,8)]}});function lr(e,t){for(var n=[],r=0;r<24;r+=8)n.push(dr(e,t+r));return n}function dr(e,t){var n=pr(e,t,8);return[pr(e,t+4,8),n]}function pr(e,t,n){var r,i=Ut.getLongAt(e,t),o=i>>>31==0?1:-1,a=(2130706432&i)>>>32-n,u=i&parseInt(m("1",32-n),2);return o*function(e){return parseInt(e.replace(".",""),2)/Math.pow(2,(e.split(".")[1]||"").length)}(a.toString(2)+"."+(m("0",32-n-(r=u.toString(2)).length)+r))}function mr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var gr={read:function(e,t){for(var n=o(new Uint8Array(e).buffer),r={},i=0;i<e.length;){var u=a(n,i,Sr);i+=Sr;var c=Ut.getShortAt(n,i),f=br(n,i+=hr),s=f.tagName;i+=f.tagNameSize;var l=Ut.getLongAt(n,i);if(i+=yr,u===vr){var d=o(n.buffer,i,l),p={id:c,value:a(d,0,l)};if(fr[c]){try{p.description=fr[c].description(d)}catch(e){p.description="<no description formatter>"}r[s||fr[c].name]=p}else t&&(r["undefined-".concat(c)]=p)}i+=l+l%2}return r}},vr="8BIM",hr=2,yr=4,Sr=vr.length;function br(e,t){var n,r=function(e){if(Array.isArray(e))return e}(n=f(e,t))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,c=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){c=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(n)||function(e){if(e){if("string"==typeof e)return mr(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?mr(e,2):void 0}}(n)||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.")}(),i=r[0];return{tagName:r[1],tagNameSize:1+i+(i%2==0?1:0)}}var Ir={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"}},Cr={4:{name:"Preferred CMM type",value:function(e,t){return a(e,t,4)},description:function(e){return null!==e?Ur(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 a(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 a(e,t,4)}},20:{name:"Connection Space",value:function(e,t){return a(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 a(e,t,4)},description:function(e){return Ur(e)}},48:{name:"Device Manufacturer",value:function(e,t){return a(e,t,4)},description:function(e){return Ur(e)}},52:{name:"Device Model Number",value:function(e,t){return a(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 a(e,t,4)}}};function Ur(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 Ar={read:function(e,t,n){return n&&t[0].compressionMethod!==g?function(e,t){return 0!==t[0].compressionMethod?{}:v(new DataView(e.buffer.slice(t[0].offset,t[0].offset+t[0].length)),t[0].compressionMethod,"utf-8","dataview").then(Nr).catch((function(){return{}}))}(e,t):function(e,t){try{for(var n=t.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),i=0,o=function(e){return Array.isArray(e)?new DataView(Uint8Array.from(e).buffer).buffer:e.buffer}(e),a=function(e){var n=t.find((function(t){return t.chunkNumber===e}));if(!n)throw Error("ICC chunk ".concat(e," not found"));var a=o.slice(n.offset,n.offset+n.length),u=new Uint8Array(a);r.set(u,i),i+=u.length},u=1;u<=t.length;u++)a(u);return Nr(new DataView(r.buffer))}catch(e){return{}}}(e,t)}},Pr=84,Er=128,wr="acsp",xr="desc",Tr="mluc",Fr="text",Or="sig ",Mr=12;function Rr(e,t){return e.length<t+Mr}function Nr(e){var t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw Error("ICC profile length not matching");if(e.byteLength<Pr)throw Error("ICC profile too short");for(var r={},i=Object.keys(Cr),o=0;o<i.length;o++){var u=i[o],f=Cr[u],s=f.value(e,parseInt(u,10)),l=s;f.description&&(l=f.description(s)),r[f.name]={value:s,description:l}}if(kr(t.slice(36,40))!==wr)throw Error("ICC profile: missing signature");if(function(e){return e.length<Er+4}(t))return r;for(var d=e.getUint32(128),p=132,m=0;m<d;m++){if(Rr(t,p))return r;var g=a(e,p,4),v=e.getUint32(p+4),h=e.getUint32(p+8);if(v>t.length)return r;var y=a(e,v,4);if(y===xr){var S=e.getUint32(v+8);if(S>h)return r;Lr(r,g,kr(t.slice(v+12,v+S+11)))}else if(y===Tr){for(var b=e.getUint32(v+8),I=e.getUint32(v+12),C=v+16,U=[],A=0;A<b;A++){var P=a(e,C+0,2),E=a(e,C+2,2),w=e.getUint32(C+4),x=e.getUint32(C+8),T=c(e,v+x,w);U.push({languageCode:P,countryCode:E,text:T}),C+=I}if(1===b)Lr(r,g,U[0].text);else{for(var F={},O=0;O<U.length;O++)F["".concat(U[O].languageCode,"-").concat(U[O].countryCode)]=U[O].text;Lr(r,g,F)}}else y===Fr?Lr(r,g,kr(t.slice(v+8,v+h-7))):y===Or&&Lr(r,g,kr(t.slice(v+8,v+12)));p+=12}return r}function kr(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function Lr(e,t,n){Ir[t]?e[Ir[t].name]={value:n,description:n}:e[t]={value:n,description:n}}var Dr={read:function(e,t,n,r,i){var o=Tt(e,yt,t,t+n,r,i,arguments.length>5&&void 0!==arguments[5]?arguments[5]:0);return o.ShotInfo&&delete(o=l({},o,function(e){var t,n={};return void 0!==e[27]&&(n.AutoRotate={value:e[27],description:(t=e[27],0===t?"None":1===t?"Rotate 90 CW":2===t?"Rotate 180":3===t?"Rotate 270 CW":"Unknown")}),n}(o.ShotInfo.value))).ShotInfo,o},SHOT_INFO_AUTO_ROTATE:27},_r={K3_III:78420},Br={CAMERA_ORIENTATION:1,ROLL_ANGLE:3,PITCH_ANGLE:5},Gr={read:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=A(e,t+n+8),a=t+n,u=Tt(e,St,a,a+10,o,r,i);return function(e){return e.PentaxModelID&&e.PentaxModelID.value===_r.K3_III&&e.LevelInfo}(u)&&(u=l({},u,function(e,t,n){var r={};if(t+7>e.byteLength)return r;var i,o=e.getInt8(t+Br.CAMERA_ORIENTATION);r.CameraOrientation={value:o,description:(i=o,0===i?"Horizontal (normal)":1===i?"Rotate 270 CW":2===i?"Rotate 180":3===i?"Rotate 90 CW":4===i?"Upwards":5===i?"Downwards":"Unknown")};var a=e.getInt16(t+Br.ROLL_ANGLE,n===U);r.RollAngle={value:a,description:jr(a)};var u=e.getInt16(t+Br.PITCH_ANGLE,n===U);return r.PitchAngle={value:u,description:zr(u)},r}(e,a+u.LevelInfo.__offset,o)),delete u.LevelInfo),u},PENTAX_IFD_OFFSET:10,MODEL_ID:_r,LIK3III:Br};function jr(e){return""+-.5*e}function zr(e){return""+-.5*e}var Vr={read:function(e,t){return{"Image Width":Hr(e,t),"Image Height":Wr(e,t),"Bit Depth":Xr(e,t),"Color Type":Yr(e,t),Compression:Jr(e,t),Filter:Kr(e,t),Interlace:qr(e,t)}}};function Hr(e,t){if(!(t+0+4>e.byteLength)){var n=Ut.getLongAt(e,t);return{value:n,description:"".concat(n,"px")}}}function Wr(e,t){if(!(t+4+4>e.byteLength)){var n=Ut.getLongAt(e,t+4);return{value:n,description:"".concat(n,"px")}}}function Xr(e,t){if(!(t+8+1>e.byteLength)){var n=Ut.getByteAt(e,t+8);return{value:n,description:"".concat(n)}}}function Yr(e,t){if(!(t+9+1>e.byteLength)){var n=Ut.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 Jr(e,t){if(!(t+10+1>e.byteLength)){var n=Ut.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}}function Kr(e,t){if(!(t+11+1>e.byteLength)){var n=Ut.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}}function qr(e,t){if(!(t+12+1>e.byteLength)){var n=Ut.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}}function $r(e){return $r="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},$r(e)}var Zr={read:function(e,t,n,r){for(var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o={},a=[],u=0;u<t.length;u++){var c=t[u],f=ui(e,c.offset,c.length,c.type,n);if(f instanceof Promise)a.push(f.then((function(e){var t,n,o,a=e.name,u=e.value,c=e.description;try{if(h.USE_EXIF&&pi(a,u))return{__exif:Dt.read(gi(u),ai,r,i).tags};if(h.USE_IPTC&&mi(a,u))return{__iptc:pn.read(gi(u),0,r)};if(a&&!pi(a,u)&&!mi(a,u))return t={},o={value:u,description:c},(n=function(e){var t=function(e){if("object"!=$r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=$r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==$r(t)?t:t+""}(n=a))in t?Object.defineProperty(t,n,{value:o,enumerable:1,configurable:1,writable:1}):t[n]=o,t}catch(e){}return{}})));else{var s=f.name,l=f.value,d=f.description;s&&(o[s]={value:l,description:d})}}return{readTags:o,readTagsPromise:a.length>0?Promise.all(a):void 0}}},Qr="STATE_KEYWORD",ei="STATE_COMPRESSION",ti="STATE_LANG",ni="STATE_TRANSLATED_KEYWORD",ri="STATE_TEXT",ii=1,oi=1,ai=6;function ui(e,t,n,r,i){for(var o,a=[],u=[],c=[],f=Qr,s=g,l=0;l<n&&t+l<e.byteLength;l++)if(f!==ei){if(f===ri){o=new DataView(e.buffer.slice(t+l,t+n));break}var d=e.getUint8(t+l);0===d?f=fi(r,f):f===Qr?a.push(d):f===ti?u.push(d):f===ni&&c.push(d)}else s=ci({type:r,dataView:e,offset:t+l}),r===we&&(l+=ii),f=fi(r,f);if(s!==g&&!i)return{};var p=v(o,s,function(e){return e===Ee||e===xe?"latin1":"utf-8"}(r));return p instanceof Promise?p.then((function(e){return si(e,r,u,a)})).catch((function(){return si("<text using unknown compression>".split(""),r,u,a)})):si(p,r,u,a)}function ci(e){var t=e.type,n=e.dataView,r=e.offset;if(t===we){if(n.getUint8(r)===oi)return n.getUint8(r+1)}else if(t===xe)return n.getUint8(r);return g}function fi(e,t){return t===Qr&&[we,xe].includes(e)?ei:t===ei?e===we?ti:ri:t===ti?ni:ri}function si(e,t,n,r){var i=function(e){return e instanceof DataView?a(e,0,e.byteLength):e}(e);return{name:li(t,n,r),value:i,description:t===we?di(e):i}}function li(e,t,n){var r=s(n);if(e===Ee||0===t.length)return r;var i=s(t);return"".concat(r," (").concat(i,")")}function di(e){return dn("UTF-8",e)}function pi(e,t){return"raw profile type exif"===e.toLowerCase()&&"exif"===t.substring(1,5)}function mi(e,t){return"raw profile type iptc"===e.toLowerCase()&&"iptc"===t.substring(1,5)}function gi(e){return function(e){for(var t=new DataView(new ArrayBuffer(e.length/2)),n=0;n<e.length;n+=2)t.setUint8(n/2,parseInt(e.substring(n,n+2),16));return t}(e.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/)[2].replace(/\n/g,""))}var vi={read:function(e,t){for(var n={},r=0;r<t.length;r++){var i=Ut.getLongAt(e,t[r]+Ce),o=a(e,t[r]+Ue,Ie);o===Te?(n["Pixels Per Unit X"]=hi(e,t[r],i),n["Pixels Per Unit Y"]=yi(e,t[r],i),n["Pixel Units"]=Si(e,t[r],i)):o===Fe&&(n["Modify Date"]=bi(e,t[r],i))}return n}};function hi(e,t,n){if(Ii(e,t,n,0,4)){var r=Ut.getLongAt(e,t+Ae+0);return{value:r,description:""+r}}}function yi(e,t,n){if(Ii(e,t,n,4,4)){var r=Ut.getLongAt(e,t+Ae+4);return{value:r,description:""+r}}}function Si(e,t,n){if(Ii(e,t,n,8,1)){var r=Ut.getByteAt(e,t+Ae+8);return{value:r,description:1===r?"meters":"Unknown"}}}function bi(e,t,n){if(Ii(e,t,n,0,7)){var r=Ut.getShortAt(e,t+Ae),i=Ut.getByteAt(e,t+Ae+2),o=Ut.getByteAt(e,t+Ae+3),a=Ut.getByteAt(e,t+Ae+4),u=Ut.getByteAt(e,t+Ae+5),c=Ut.getByteAt(e,t+Ae+6);return{value:[r,i,o,a,u,c],description:"".concat(Ci(r,4),"-").concat(Ci(i,2),"-").concat(Ci(o,2)," ").concat(Ci(a,2),":").concat(Ci(u,2),":").concat(Ci(c,2))}}}function Ii(e,t,n,r,i){return r+i<=n&&t+Ae+r+i<=e.byteLength}function Ci(e,t){return"".concat("0".repeat(t-(""+e).length)).concat(e)}var Ui={read:function(e,t){var n={},r=Ut.getByteAt(e,t);return n.Alpha=function(e){var t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}(r),n.Animation=function(e){var t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}(r),n.ImageWidth=Ei(e,t+Ai),n.ImageHeight=Ei(e,t+Pi),n}},Ai=4,Pi=7;function Ei(e,t){var n=Ut.getByteAt(e,t)+256*Ut.getByteAt(e,t+1)+65536*Ut.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var wi={read:function(e){return{"GIF Version":xi(e),"Image Width":Ti(e),"Image Height":Fi(e),"Global Color Map":Oi(e),"Bits Per Pixel":Ri(e),"Color Resolution Depth":Mi(e)}}};function xi(e){if(!(6>e.byteLength)){var t=a(e,3,3);return{value:t,description:t}}}function Ti(e){if(!(8>e.byteLength)){var t=e.getUint16(6,1);return{value:t,description:"".concat(t,"px")}}}function Fi(e){if(!(10>e.byteLength)){var t=e.getUint16(8,1);return{value:t,description:"".concat(t,"px")}}}function Oi(e){if(!(11>e.byteLength)){var t=(128&e.getUint8(10))>>>7;return{value:t,description:1===t?"Yes":"No"}}}function Mi(e){if(!(11>e.byteLength)){var t=1+((112&e.getUint8(10))>>>4);return{value:t,description:"".concat(t," ").concat(1===t?"bit":"bits")}}}function Ri(e){if(!(11>e.byteLength)){var t=1+(7&e.getUint8(10));return{value:t,description:"".concat(t," ").concat(1===t?"bit":"bits")}}}var Ni=[6,7,99],ki={get:function(e,t,n){if((i=t)&&(void 0===i.Compression||Ni.includes(i.Compression.value))&&i.JPEGInterchangeFormat&&i.JPEGInterchangeFormat.value&&i.JPEGInterchangeFormatLength&&i.JPEGInterchangeFormatLength.value){t.type="image/jpeg";var r=n+t.JPEGInterchangeFormat.value;t.image=e.buffer.slice(r,r+t.JPEGInterchangeFormatLength.value),d(t,"base64",(function(){return p(this.image)}))}var i;return t}},Li={get:function(e,t){var n={},r=0,i=Di(e,"exif","FocalLength",t),o=Di(e,"exif","FocalPlaneXResolution",t),a=Di(e,"exif","FocalPlaneYResolution",t),u=Di(e,"exif","FocalPlaneResolutionUnit",t),c=Di(e,"file","Image Width",t),f=Di(e,"file","Image Height",t),s=Di(e,"exif","FocalLengthIn35mmFilm",t)||function(e,t,n,r,i,o){if(e&&t&&n&&r&&i&&o)try{var a;switch(n){case 2:a=25.4;break;case 3:a=10;break;case 4:a=1;break;default:return}var u=e[0]/e[1]*a,c=i/(t[0]/t[1]*a),f=Math.sqrt(Math.pow(r/u,2)+Math.pow(c,2));return o[0]/o[1]*(43.27/f)}catch(e){}}(o,a,u,c,f,i);s&&(n.FocalLength35efl={value:s,description:it.FocalLengthIn35mmFilm(s)},r=1);var l=function(e,t){if(e&&t)try{var n=t/(e[0]/e[1]);return{value:n,description:n.toFixed(1)}}catch(e){}}(i,s);l&&(n.ScaleFactorTo35mmEquivalent=l,r=1);var d=function(e){if(e)try{var t=2*Math.atan(36/(2*e))*(180/Math.PI);return{value:t,description:t.toFixed(1)+" deg"}}catch(e){}}(s);if(d&&(n.FieldOfView=d,r=1),r)return n}};function Di(e,t,n,r){return r&&e[t]&&e[t][n]?e[t][n].value:!r&&e[n]?e[n].value:void 0}function _i(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=Error().stack}_i.prototype=Error();var Bi={MetadataMissingError:_i},Gi={load:zi,loadView:Hi,errors:Bi},ji=Bi;function zi(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){return"string"==typeof e}(e)?(i.async=1,function(e,t){return/^\w+:\/\//.test(e)?"undefined"!=typeof fetch?function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length,n={method:"GET"};return Number.isInteger(t)&&t>=0&&(n.headers={range:"bytes=0-".concat(t-1)}),fetch(e,n).then((function(e){return e.arrayBuffer()}))}(e,t):function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length;return new Promise((function(n,r){var i={};Number.isInteger(t)&&t>=0&&(i.headers={range:"bytes=0-".concat(t-1)});var o=function(e){return/^https:\/\//.test(e)?require("https").get:require("http").get}(e);o(e,i,(function(e){if(e.statusCode>=200&&e.statusCode<=299){var t=[];e.on("data",(function(e){return t.push(Buffer.from(e))})),e.on("error",(function(e){return r(e)})),e.on("end",(function(){return n(Buffer.concat(t))}))}else r("Could not fetch file: ".concat(e.statusCode," ").concat(e.statusMessage)),e.resume()})).on("error",(function(e){return r(e)}))}))}(e,t):function(e){return/^data:[^;,]*(;base64)?,/.test(e)}(e)?Promise.resolve(function(e){var t=e.substring(e.indexOf(",")+1);if(-1!==e.indexOf(";base64")){if("undefined"!=typeof atob)return Uint8Array.from(atob(t),(function(e){return e.charCodeAt(0)})).buffer;if("undefined"==typeof Buffer)return;return"undefined"!=typeof Buffer.from?Buffer.from(t,"base64"):new Buffer(t,"base64")}var n=decodeURIComponent(t);return"undefined"!=typeof Buffer?"undefined"!=typeof Buffer.from?Buffer.from(n):new Buffer(n):Uint8Array.from(n,(function(e){return e.charCodeAt(0)})).buffer}(e)):function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length;return new Promise((function(n,r){var i=function(){try{return require("fs")}catch(e){return}}();i.open(e,(function(o,a){o?r(o):i.stat(e,(function(o,u){if(o)r(o);else{var c=Math.min(u.size,void 0!==t?t:u.size),f=Buffer.alloc(c),s={buffer:f,length:c};i.read(a,s,(function(t){t?r(t):i.close(a,(function(t){t&&console.warn("Could not close file ".concat(e,":"),t),n(f)}))}))}}))}))}))}(e,t)}(e,i).then((function(e){return Vi(e,i)}))):function(e){return"undefined"!=typeof File&&e instanceof File}(e)?(i.async=1,(t=e,n=i,r=n.length,new Promise((function(e,n){var i=new FileReader;i.onload=function(t){return e(t.target.result)},i.onerror=function(){return n(i.error)},Number.isInteger(r)&&r>=0&&void 0!==t.slice?i.readAsArrayBuffer(t.slice(0,r)):i.readAsArrayBuffer(t)}))).then((function(e){return Vi(e,i)}))):Vi(e,i)}function Vi(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return 0}}(e)&&(e=new Uint8Array(e).buffer),Hi(function(e){try{return new DataView(e)}catch(t){return new i(e)}}(e),t)}function Hi(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0,async:0,computed:0,includeUnknown:0,domParser:void 0},n=t.expanded,r=void 0===n?0:n,i=t.async,o=void 0===i?0:i,a=t.computed,u=void 0===a?0:a,c=t.includeUnknown,f=void 0===c?0:c,d=t.domParser,p=void 0===d?void 0:d,m=0,g={},v=[],y=nt.parseAppMarkers(e,o),S=y.fileType,I=y.fileDataOffset,C=y.jfifDataOffset,U=y.tiffHeaderOffset,A=y.iptcDataOffset,P=y.xmpChunks,E=y.iccChunks,w=y.mpfDataOffset,x=y.pngHeaderOffset,T=y.pngTextChunks,F=y.pngChunkOffsets,O=y.vp8xChunkOffset,M=y.gifHeaderOffset;if(h.USE_JPEG&&h.USE_FILE&&function(e){return void 0!==e}(I)){m=1;var R=Jt.read(e,I);r?g.file=R:g=l({},g,R)}if(h.USE_JPEG&&h.USE_JFIF&&function(e){return void 0!==e}(C)){m=1;var N=tn.read(e,C);r?g.jfif=N:g=l({},g,N)}if(h.USE_EXIF&&function(e){return void 0!==e}(U)){m=1;var k=Dt.read(e,U,f,u),L=k.tags,D=k.byteOrder;if(L.Thumbnail&&(g.Thumbnail=L.Thumbnail,delete L.Thumbnail),r?(g.exif=L,function(e){if(e.exif){if(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef)try{e.gps=e.gps||{},e.gps.Latitude=b(e.exif.GPSLatitude.value),"S"===e.exif.GPSLatitudeRef.value.join("")&&(e.gps.Latitude=-e.gps.Latitude)}catch(e){}if(e.exif.GPSLongitude&&e.exif.GPSLongitudeRef)try{e.gps=e.gps||{},e.gps.Longitude=b(e.exif.GPSLongitude.value),"W"===e.exif.GPSLongitudeRef.value.join("")&&(e.gps.Longitude=-e.gps.Longitude)}catch(e){}if(e.exif.GPSAltitude&&e.exif.GPSAltitudeRef)try{e.gps=e.gps||{},e.gps.Altitude=e.exif.GPSAltitude.value[0]/e.exif.GPSAltitude.value[1],1===e.exif.GPSAltitudeRef.value&&(e.gps.Altitude=-e.gps.Altitude)}catch(e){}}}(g)):g=l({},g,L),h.USE_TIFF&&h.USE_IPTC&&L["IPTC-NAA"]&&!Wi(A)){var _=pn.read(L["IPTC-NAA"].value,0,f);r?g.iptc=_:g=l({},g,_)}if(h.USE_TIFF&&h.USE_XMP&&L.ApplicationNotes&&!Xi(P)){var B=Rn.read(s(L.ApplicationNotes.value),void 0,p);r?g.xmp=B:(delete B._raw,g=l({},g,B))}if(h.USE_PHOTOSHOP&&L.ImageSourceData&&L.PhotoshopSettings){var G=gr.read(L.PhotoshopSettings.value,f);r?g.photoshop=G:g=l({},g,G)}if(h.USE_TIFF&&h.USE_ICC&&L.ICC_Profile&&!Yi(E)){var j=Ar.read(L.ICC_Profile.value,[{offset:0,length:L.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);r?g.icc=j:g=l({},g,j)}if(h.USE_MAKER_NOTES&&L.MakerNote)if(function(e){return e.Make&&e.Make.value&&Array.isArray(e.Make.value)&&"Canon"===e.Make.value[0]&&e.MakerNote&&e.MakerNote.__offset}(L)){var z=Dr.read(e,U,L.MakerNote.__offset,D,f,u);r?g.makerNotes=z:g=l({},g,z)}else if(function(e){return e.MakerNote.value.length>7&&"PENTAX "===s(e.MakerNote.value.slice(0,7))&&e.MakerNote.__offset}(L)){var V=Gr.read(e,U,L.MakerNote.__offset,f,u);r?g.makerNotes=V:g=l({},g,V)}L.MakerNote&&delete L.MakerNote.__offset}if(h.USE_JPEG&&h.USE_IPTC&&Wi(A)){m=1;var H=pn.read(e,A,f);r?g.iptc=H:g=l({},g,H)}if(h.USE_XMP&&Xi(P)){m=1;var W=Rn.read(e,P,p);r?g.xmp=W:(delete W._raw,g=l({},g,W))}if((h.USE_JPEG||h.USE_WEBP)&&h.USE_ICC&&Yi(E)){m=1;var X=Ar.read(e,E,o);X instanceof Promise?v.push(X.then(re)):re(X)}if(h.USE_MPF&&function(e){return void 0!==e}(w)){m=1;var Y=jt.read(e,w,f,u);r?g.mpf=Y:g=l({},g,Y)}if(h.USE_PNG&&h.USE_PNG_FILE&&void 0!==x){m=1;var J=Vr.read(e,x);r?(g.png=g.png?l({},g.png,J):J,g.pngFile=J):g=l({},g,J)}if(h.USE_PNG&&function(e){return void 0!==e}(T)){m=1;var K=Zr.read(e,T,o,f,u),q=K.readTags,$=K.readTagsPromise;ie(q),$&&v.push($.then((function(e){return e.forEach(ie)})))}if(h.USE_PNG&&function(e){return void 0!==e}(F)){m=1;var Z=vi.read(e,F);r?g.png=g.png?l({},g.png,Z):Z:g=l({},g,Z)}if(h.USE_WEBP&&function(e){return void 0!==e}(O)){m=1;var Q=Ui.read(e,O);r?g.riff=g.riff?l({},g.riff,Q):Q:g=l({},g,Q)}if(h.USE_GIF&&function(e){return void 0!==e}(M)){m=1;var ee=wi.read(e,M);r?g.gif=g.gif?l({},g.gif,ee):ee:g=l({},g,ee)}var te=Li.get(g,r);te&&(r?g.composite=te:g=l({},g,te));var ne=(h.USE_JPEG||h.USE_WEBP)&&h.USE_EXIF&&h.USE_THUMBNAIL&&ki.get(e,g.Thumbnail,U);if(ne?(m=1,g.Thumbnail=ne):delete g.Thumbnail,S&&(r?(g.file||(g.file={}),g.file.FileType=S):g.FileType=S,m=1),!m)throw new Bi.MetadataMissingError;return o?Promise.all(v).then((function(){return g})):g;function re(e){r?g.icc=e:g=l({},g,e)}function ie(e){if(r){for(var t=0,n=["exif","iptc"];t<n.length;t++){var i=n[t],o="__".concat(i);e[o]&&(g[i]=g[i]?l({},g.exif,e[o]):e[o],delete e[o])}g.png=g.png?l({},g.png,e):e,g.pngText=g.pngText?l({},g.png,e):e}else delete(g=l({},g,e.__exif?e.__exif:{},e.__iptc?e.__iptc:{},e)).__exif,delete g.__iptc}}function Wi(e){return void 0!==e}function Xi(e){return Array.isArray(e)&&e.length>0}function Yi(e){return Array.isArray(e)&&e.length>0}return t}()}));
1
+ !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()}(Object("undefined"!=typeof self?self:this),(function(){return function(){"use strict";var e={d:function(t,n){for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:1,get:n[r]})},o:function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:1})}},t={};function n(e){return n="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},n(e)}function r(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==n(t)?t:t+""}e.r(t),e.d(t,{default:function(){return ao},errors:function(){return uo},load:function(){return fo},loadView:function(){return so}});var i=function(){return e=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"!==n(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 Error("DataView: Passed buffer type is unsupported.");this.buffer=t,this.byteLength=this.buffer.length},(t=[{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)}}])&&function(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||0,i.configurable=1,"value"in i&&(i.writable=1),Object.defineProperty(e,r(i.key),i)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:0}),e;var e,t}();function o(e,t,n){try{return new DataView(e,t,n)}catch(r){return new i(e,t,n)}}function a(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return s(r)}function u(e,t){for(var n=[],r=0;t+r<e.byteLength;){var i=e.getUint8(t+r);if(0===i)break;n.push(i),r++}return s(n)}function f(e,t,n){for(var r=[],i=0;i<n&&t+i<e.byteLength;i+=2)r.push(e.getUint16(t+i));return 0===r[r.length-1]&&r.pop(),s(r)}function c(e,t){var n=e.getUint8(t);return[n,a(e,t+1,n)]}function s(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function l(){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function d(e,t,n){var r=0;Object.defineProperty(e,t,{get:function(){return r||(r=1,Object.defineProperty(e,t,{configurable:1,enumerable:1,value:n.apply(e),writable:1})),e[t]},configurable:1,enumerable:1})}function p(e){return"undefined"!=typeof btoa?"string"==typeof e?btoa(e):btoa(Array.prototype.reduce.call(new Uint8Array(e),(function(e,t){return e+String.fromCharCode(t)}),"")):"undefined"!=typeof Buffer?"undefined"!=typeof Buffer.from?Buffer.from(e).toString("base64"):new Buffer(e).toString("base64"):void 0}function g(e,t){return Array(t+1).join(e)}var m=void 0;function h(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:"string";if(0===t&&"function"==typeof DecompressionStream){var i=new DecompressionStream("deflate"),o=new Blob([e]).stream().pipeThrough(i);return"dataview"===r?new Response(o).arrayBuffer().then((function(e){return new DataView(e)})):new Response(o).arrayBuffer().then((function(e){return new TextDecoder(n).decode(e)}))}if(void 0!==t)return Promise.reject("Unknown compression method ".concat(t,"."));if("string"===r)try{return new TextDecoder(n).decode(e)}catch(t){var a=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);return Array.from(a,(function(e){return String.fromCharCode(e)})).join("")}return e}var v={USE_FILE:1,USE_JFIF:1,USE_PNG_FILE:1,USE_EXIF:1,USE_IPTC:1,USE_XMP:1,USE_ICC:1,USE_MPF:1,USE_PHOTOSHOP:1,USE_THUMBNAIL:1,USE_TIFF:1,USE_JPEG:1,USE_PNG:1,USE_HEIC:1,USE_AVIF:1,USE_WEBP:1,USE_GIF:1,USE_MAKER_NOTES:1};function y(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function b(e){if(e.length>=8){var t=y(e.slice(0,8));if("ASCII\0\0\0"===t)return y(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 S(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}var I=18761,P=19789,A=I,C=function(e,t){if(e.getUint16(t)===I)return I;if(e.getUint16(t)===P)return P;throw Error("Illegal byte order value. Faulty image.")},T=2,x=65496,U=2,E=4,w=2,F=2,O=10,R=18,M=33,N=79,G=18,k=8,L="ICC_PROFILE\0",D=E+L.length,_=D+1,j="MPF\0",B=65472,z=65474,V=65476,H=65499,W=65501,X=65498,K=65504,J=65505,Y=65506,q=65517,$=65519,Z=65534,Q=65535,ee="JFIF",te="Exif",ne="http://ns.adobe.com/xap/1.0/\0",re="http://ns.adobe.com/xmp/extension/\0",ie="Photoshop 3.0";function oe(e,t){return e.getUint16(t)===B}function ae(e,t){return e.getUint16(t)===z}function ue(e,t){var n=L.length;return e.getUint16(t)===Y&&a(e,t+E,n)===L}function fe(e,t){var n=j.length;return e.getUint16(t)===Y&&a(e,t+E,n)===j}function ce(e,t){var n=ee.length;return e.getUint16(t)===K&&a(e,t+E,n)===ee&&0===e.getUint8(t+E+n)}function se(e,t){var n=te.length;return e.getUint16(t)===J&&a(e,t+E,n)===te&&0===e.getUint8(t+E+n)}function le(e,t){return e.getUint16(t)===J&&function(e,t){var n=ne.length;return a(e,t+E,n)===ne}(e,t)}function de(e,t){return e.getUint16(t)===J&&function(e,t){var n=re.length;return a(e,t+E,n)===re}(e,t)}function pe(e,t){return{dataOffset:e+M,length:t-(M-w)}}function ge(e,t){return{dataOffset:e+N,length:t-(N-w)}}function me(e,t){var n=ie.length;return e.getUint16(t)===q&&a(e,t+E,n)===ie&&0===e.getUint8(t+E+n)}function he(e,t){var n=e.getUint16(t);return n>=K&&n<=$||n===Z||n===B||n===z||n===V||n===H||n===W||n===X}function ve(e,t){return e.getUint16(t)===Q}function ye(e,t,n,r){var i=function(e,t,n){try{if(t+8>n)return;var r=e.getUint16(t+0),i=r===A;if(!i&&19789!==r)return;if(42!==e.getUint16(t+2,i))return;var o=t+e.getUint32(t+4,i);if(o+2>n)return;var a=e.getUint16(o,i);return{ifdEntries:a,isValid:o+(2+12*a+4)<=n&&a>0}}catch(e){return}}(e,r,t+w+n);if(!i)return 0;var o=Number.isInteger(i.ifdEntries)?i.ifdEntries:0;return(i.isValid?1e9:0)+1e6*o+n}var be="‰PNG\r\n\n",Se=4,Ie=4,Pe=0,Ae=Se,Ce=Se+Ie,Te="XML:com.adobe.xmp\0",xe="tEXt",Ue="iTXt",Ee="zTXt",we="pHYs",Fe="tIME",Oe="eXIf",Re="iCCP";function Me(e,t){return"IHDR"===a(e,t+Ae,Ie)}function Ne(e,t){return a(e,t+Ae,Ie)===Ue&&a(e,t+Ce,Te.length)===Te}function Ge(e,t,n){var r=a(e,t+Ae,Ie);return r===xe||r===Ue||r===Ee&&n}function ke(e,t){return a(e,t+Ae,Ie)===Oe}function Le(e,t){return a(e,t+Ae,Ie)===Re}function De(e,t){var n=[we,Fe],r=a(e,t+Ae,Ie);return n.includes(r)}function _e(e,t){t+=Ce+Te.length+1+1;for(var n=0;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}function je(e,t){var n=u(e,t);return t+=n.length+1,{profileName:n,compressionMethod:e.getUint8(t),compressedProfileOffset:t+=1}}function Be(e,t,n,r,i,o,a,u){if(void 0===u)return[];for(var f=[],c=n.items,s=0;s<u;s++){var l={extents:[]};l.itemId=ze(e,c,t),c+=r.item.itemId,l.constructionMethod=1===t||2===t?15&e.getUint16(c):void 0,c+=r.item.constructionMethod,l.dataReferenceIndex=e.getUint16(c),c+=r.item.dataReferenceIndex,l.baseOffset=He(e,c,r.item.baseOffset),c+=r.item.baseOffset,l.extentCount=e.getUint16(c),c+=r.item.extentCount;for(var d=0;d<l.extentCount;d++){var p={};p.extentIndex=Ve(e,t,c,a),c+=r.item.extent.extentIndex,p.extentOffset=He(e,c,i),c+=r.item.extent.extentOffset,p.extentLength=He(e,c,o),c+=r.item.extent.extentLength,l.extents.push(p)}f.push(l)}return f}function ze(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}function Ve(e,t,n,r){if((1===t||2===t)&&r>0)return He(e,n,r)}function He(e,t,n){return 4===n?e.getUint32(t):8===n?(console.warn("This file uses an 8-bit offset which is currently not supported by ExifReader. Contact the maintainer to get it fixed."),function(e,t){return e.getUint32(t+4)}(e,t)):0}var We=1165519206,Xe=1835625829;function Ke(e,t){var n=function(e,t){var n=e.getUint32(t);return function(e){return 0===e}(n)?{length:e.byteLength-t,contentOffset:t+4+4}:function(e){return 1===e}(n)&&function(e,t){return 0===e.getUint32(t+8)}(e,t)?{length:e.getUint32(t+12),contentOffset:t+4+4+8}:{length:n,contentOffset:t+4+4}}(e,t),r=n.length,i=n.contentOffset;if(!(r<8)){var o=e.getUint32(t+4);if(1718909296===o)return function(e,t,n){return{type:"ftyp",majorBrand:a(e,t,4),length:n}}(e,i,r);if(1768977008===o)return function(e,t,n,r){return{type:"iprp",subBoxes:$e(e,n,r-(n-t)),length:r}}(e,t,i,r);if(1768973167===o)return function(e,t,n,r){return{type:"ipco",properties:$e(e,n,r-(n-t)),length:r}}(e,t,i,r);if(1668246642===o)return function(e,t,n){return{type:"colr",icc:qe(e,t),length:n}}(e,i,r);var f=e.getUint8(i);return 1835365473===o?function(e,t,n,r){return{type:"meta",subBoxes:$e(e,n+3,r-(n+3-t)),length:r}}(e,t,i+1,r):1768714083===o?function(e,t,n,r){var i=function(e,t){var n={item:{dataReferenceIndex:2,extentCount:2,extent:{}}};e<2?(n.itemCount=2,n.item.itemId=2):2===e&&(n.itemCount=4,n.item.itemId=4),n.item.constructionMethod=1===e||2===e?2:0;var r={offsetSize:t,lengthSize:t,baseOffsetSize:t+1,indexSize:t+1};return r.itemCount=t+2,r.items=r.itemCount+n.itemCount,r.item={itemId:0},r.item.constructionMethod=r.item.itemId+n.item.itemId,r.item.dataReferenceIndex=r.item.constructionMethod+n.item.constructionMethod,{offsets:r,sizes:n}}(t,n+3),o=i.offsets,a=i.sizes,u=e.getUint8(o.offsetSize)>>4;a.item.extent.extentOffset=u;var f=15&e.getUint8(o.lengthSize);a.item.extent.extentLength=f;var c=e.getUint8(o.baseOffsetSize)>>4;a.item.baseOffset=c;var s=function(e,t,n){if(1===n||2===n)return 15&e.getUint8(t)}(e,o.indexSize,t);a.item.extent.extentIndex=void 0!==s?s:0;var l=function(e,t,n){return n<2?e.getUint16(t):2===n?e.getUint32(t):void 0}(e,o.itemCount,t);return{type:"iloc",items:Be(e,t,o,a,u,f,s,l),length:r}}(e,f,i+1,r):1768517222===o?function(e,t,n,r,i){var o=function(e,t){var n={entryCount:t+3},r={};return r.entryCount=0===e?2:4,n.itemInfos=n.entryCount+r.entryCount,{offsets:n}}(n,r),a=o.offsets;return{type:"iinf",itemInfos:$e(e,a.itemInfos,i-(a.itemInfos-t)),length:i}}(e,t,f,i+1,r):1768842853===o?function(e,t,n,r,i){r+=3;var o={type:"infe",length:i};return 0!==n&&1!==n||(o.itemId=e.getUint16(r),r+=2,o.itemProtectionIndex=e.getUint16(r),r+=2,o.itemName=u(e,r),r+=o.itemName.length+1),n>=2&&(2===n?(o.itemId=e.getUint16(r),r+=2):3===n&&(o.itemId=e.getUint32(r),r+=4),o.itemProtectionIndex=e.getUint16(r),r+=2,o.itemType=e.getUint32(r),r+=4,o.itemName=u(e,r),r+=o.itemName.length+1,o.itemType===Xe?(o.contentType=u(e,r),t+i>(r+=o.contentType.length+1)&&(o.contentEncoding=u(e,r),r+=o.contentEncoding.length+1)):1970432288===o.itemType&&(o.itemUri=u(e,r),r+=o.itemUri.length+1)),o}(e,t,f,i+1,r):{type:void 0,length:r}}}function Je(e){if(v.USE_EXIF||v.USE_XMP||v.USE_ICC){var t={},n=function(e){for(var t=0;t+4+4<=e.byteLength;){var n=Ke(e,t);if(void 0===n)break;if("meta"===n.type)return n;t+=n.length}}(e);return n?(v.USE_EXIF&&(t.tiffHeaderOffset=function(e,t){try{var n=function(e){return e.subBoxes.find((function(e){return"iinf"===e.type})).itemInfos.find((function(e){return e.itemType===We}))}(t).itemId,r=Ye(t,n);return function(e,t){return t+4+e.getUint32(t)}(e,r.baseOffset+r.extents[0].extentOffset)}catch(e){return}}(e,n)),v.USE_XMP&&(t.xmpChunks=function(e){try{var t=function(e){return e.subBoxes.find((function(e){return"iinf"===e.type})).itemInfos.find((function(e){return e.itemType===Xe&&"application/rdf+xml"===e.contentType}))}(e).itemId,n=Ye(e,t),r=Ye(e,t).extents[0];return[{dataOffset:n.baseOffset+r.extentOffset,length:r.extentLength}]}catch(e){return}}(n)),v.USE_ICC&&(t.iccChunks=function(e){try{var t=e.subBoxes.find((function(e){return"iprp"===e.type})).subBoxes.find((function(e){return"ipco"===e.type})).properties.find((function(e){return"colr"===e.type})).icc;if(t)return[t]}catch(e){}}(n)),t.hasAppMarkers=void 0!==t.tiffHeaderOffset||void 0!==t.xmpChunks||void 0!==t.iccChunks,t):{hasAppMarkers:0}}return{}}function Ye(e,t){return e.subBoxes.find((function(e){return"iloc"===e.type})).items.find((function(e){return e.itemId===t}))}function qe(e,t){var n=a(e,t,4);if("prof"===n||"rICC"===n)return{offset:t+4,length:e.getUint32(t+4),chunkNumber:1,chunksTotal:1}}function $e(e,t,n){for(var r=[We,Xe],i=[],o=t;o<t+n;){var a=Ke(e,o);if(void 0===a)break;void 0===a.type||void 0!==a.itemType&&-1===r.indexOf(a.itemType)||i.push(a),o+=a.length}return i}var Ze=6,Qe=["GIF87a","GIF89a"],et=0,tt="<?xpacket begin",nt={parseAppMarkers:function(e,t){if(v.USE_TIFF&&function(e){return!!e&&e.byteLength>=4&&function(e){var t=e.getUint16(0)===A;return 42===e.getUint16(2,t)}(e)}(e))return rt(v.USE_EXIF?{hasAppMarkers:1,tiffHeaderOffset:0}:{},"tiff","TIFF");if(v.USE_JPEG&&function(e){return!!e&&e.byteLength>=T&&e.getUint16(0)===x}(e))return rt(function(e){for(var t,n,r,i,o,a,u,f,c,s,l,d,p,g=U,m=0;g+E+5<=e.byteLength;){if(v.USE_FILE&&oe(e,g))t=e.getUint16(g+w),n=g+w;else if(v.USE_FILE&&ae(e,g))t=e.getUint16(g+w),r=g+w;else if(v.USE_JFIF&&ce(e,g))t=e.getUint16(g+w),i=g+F;else if(v.USE_EXIF&&se(e,g)){t=e.getUint16(g+w),m++;var h=g+O;if(1===m)l=h,d=g,p=t;else if(2===m){s=ye(e,d,p,l);var y=ye(e,g,t,h);y>s&&(s=y,l=h,d=g,p=t)}else{var b=ye(e,g,t,h);b>s&&(s=b,l=h,d=g,p=t)}o=l}else if(v.USE_XMP&&le(e,g))u||(u=[]),t=e.getUint16(g+w),u.push(pe(g,t));else if(v.USE_XMP&&de(e,g))u||(u=[]),t=e.getUint16(g+w),u.push(ge(g,t));else if(v.USE_IPTC&&me(e,g))t=e.getUint16(g+w),a=g+R;else if(v.USE_ICC&&ue(e,g)){t=e.getUint16(g+w);var S=g+G,I=t-(G-w),P=e.getUint8(g+D),A=e.getUint8(g+_);f||(f=[]),f.push({offset:S,length:I,chunkNumber:P,chunksTotal:A})}else if(v.USE_MPF&&fe(e,g))t=e.getUint16(g+w),c=g+k;else{if(!he(e,g)){if(ve(e,g)){g++;continue}break}t=e.getUint16(g+w)}g+=w+t}return m>1&&function(e){"undefined"!=typeof console&&"function"==typeof console.warn&&console.warn("ExifReader: Found ".concat(e," Exif segments (APP1). ")+"Will pick the best candidate segment.")}(m),{hasAppMarkers:g>U,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:u,iccChunks:f,mpfDataOffset:c}}(e),"jpeg","JPEG");if(v.USE_PNG&&function(e){return!!e&&a(e,0,be.length)===be}(e))return rt(function(e,t){for(var n={hasAppMarkers:0},r=be.length;r+Se+Ie<=e.byteLength;){if(v.USE_PNG_FILE&&Me(e,r))n.hasAppMarkers=1,n.pngHeaderOffset=r+Ce;else if(v.USE_XMP&&Ne(e,r)){var i=_e(e,r);void 0!==i&&(n.hasAppMarkers=1,n.xmpChunks=[{dataOffset:i,length:e.getUint32(r+Pe)-(i-(r+Ce))}])}else if(Ge(e,r,t)){n.hasAppMarkers=1;var o=a(e,r+Ae,Ie);n.pngTextChunks||(n.pngTextChunks=[]),n.pngTextChunks.push({length:e.getUint32(r+Pe),type:o,offset:r+Ce})}else if(ke(e,r))n.hasAppMarkers=1,n.tiffHeaderOffset=r+Ce;else if(v.USE_ICC&&t&&Le(e,r)){n.hasAppMarkers=1;var u=e.getUint32(r+Pe),f=r+Ce,c=je(e,f),s=c.profileName,l=c.compressionMethod,d=c.compressedProfileOffset;n.iccChunks||(n.iccChunks=[]),n.iccChunks.push({offset:d,length:u-(d-f),chunkNumber:1,chunksTotal:1,profileName:s,compressionMethod:l})}else De(e,r)&&(n.hasAppMarkers=1,n.pngChunkOffsets||(n.pngChunkOffsets=[]),n.pngChunkOffsets.push(r+Pe));r+=e.getUint32(r+Pe)+Se+Ie+4}return n}(e,t),"png","PNG");if(v.USE_HEIC&&function(e){if(!e)return 0;try{var t=Ke(e,0);return t&&-1!==["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"].indexOf(t.majorBrand)}catch(e){return 0}}(e))return rt(function(e){return Je(e)}(e),"heic","HEIC");if(v.USE_AVIF&&function(e){if(!e)return 0;try{var t=Ke(e,0);return t&&"avif"===t.majorBrand}catch(e){return 0}}(e))return rt(function(e){return Je(e)}(e),"avif","AVIF");if(v.USE_WEBP&&function(e){return!!e&&"RIFF"===a(e,0,4)&&"WEBP"===a(e,8,4)}(e))return rt(function(e){for(var t,n,r,i,o=12,u=0;o+8<e.byteLength;){var f=a(e,o,4),c=e.getUint32(o+4,1);v.USE_EXIF&&"EXIF"===f?(u=1,t="Exif\0\0"===a(e,o+8,6)?o+8+6:o+8):v.USE_XMP&&"XMP "===f?(u=1,n=[{dataOffset:o+8,length:c}]):v.USE_ICC&&"ICCP"===f?(u=1,r=[{offset:o+8,length:c,chunkNumber:1,chunksTotal:1}]):"VP8X"===f&&(u=1,i=o+8),o+=8+(c%2==0?c:c+1)}return{hasAppMarkers:u,tiffHeaderOffset:t,xmpChunks:n,iccChunks:r,vp8xChunkOffset:i}}(e),"webp","WebP");if(v.USE_GIF&&function(e){return!!e&&Qe.includes(a(e,0,Ze))}(e))return rt({gifHeaderOffset:0},"gif","GIF");if(v.USE_XMP&&function(e){return!!e&&a(e,et,tt.length)===tt}(e))return rt(function(e){var t=[];return t.push({dataOffset:et,length:e.byteLength}),{xmpChunks:t}}(e),"xml","XML");throw Error("Invalid image format")}};function rt(e,t,n){return l({},e,{fileType:{value:t,description:n}})}var it={ApertureValue:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)},ColorSpace:function(e){return 1===e?"sRGB":65535===e?"Uncalibrated":"Unknown"},ComponentsConfiguration: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("")},Contrast:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"},CustomRendered:function(e){return 0===e?"Normal process":1===e?"Custom process":"Unknown"},ExposureMode:function(e){return 0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown"},ExposureProgram: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"},ExposureTime:function(e){if(e[0]/e[1]>.25){var t=e[0]/e[1];return Number.isInteger(t)?""+t:t.toFixed(1)}return 0!==e[0]?"1/".concat(Math.round(e[1]/e[0])):"0/".concat(e[1])},FNumber:function(e){return"f/".concat(Number(e[0]/e[1]).toFixed(1))},FocalLength:function(e){return e[0]/e[1]+" mm"},FocalPlaneResolutionUnit:function(e){return 2===e?"inches":3===e?"centimeters":4===e?"millimeters":"Unknown"},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"},MeteringMode: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"},ResolutionUnit:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"},Saturation:function(e){return 0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown"},FocalLengthIn35mmFilm:function(e){return 0===e?"Unknown":e+" mm"},SceneCaptureType:function(e){return 0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown"},Sharpness:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"},ShutterSpeedValue:function(e){var t=Math.pow(2,e[0]/e[1]);return t<=1?"".concat(Math.round(1/t)):"1/".concat(Math.round(t))},WhiteBalance:function(e){return 0===e?"Auto white balance":1===e?"Manual white balance":"Unknown"},XResolution:function(e){return""+Math.round(e[0]/e[1])},YResolution:function(e){return""+Math.round(e[0]/e[1])}},ot={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:it.XResolution},283:{name:"YResolution",description:it.YResolution},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:it.ResolutionUnit},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:{name:"XPTitle",description:at},40092:{name:"XPComment",description:at},40093:{name:"XPAuthor",description:at},40094:{name:"XPKeywords",description:at},40095:{name:"XPSubject",description:at},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:it.LightSource},50779:{name:"CalibrationIlluminant2",description:it.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"};function at(e){return new TextDecoder("utf-16").decode(new Uint8Array(e)).replace(/\u0000+$/,"")}function ut(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function ft(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var ct={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:S},3:{name:"GPSLongitudeRef",description:function(e){var t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:S},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,n=function(e){if(Array.isArray(e))return e}(t=e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,f=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){f=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(f)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return ft(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ft(e,2):void 0}}(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.")}(),r=n[0]/n[1];return/^\d(\.|$)/.test("".concat(r))?"0".concat(r):r})).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:b},28:{name:"GPSAreaInformation",description:b},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},st={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:function(e){return y(e)}},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},lt={45056:{name:"MPFVersion",description:function(e){return y(e)}},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"};function dt(e){return dt="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},dt(e)}function pt(e,t,n){return(t=function(e){var t=function(e){if("object"!=dt(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=dt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==dt(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}var gt=l({},ot,{33434:{name:"ExposureTime",description:it.ExposureTime},33437:{name:"FNumber",description:it.FNumber},34850:{name:"ExposureProgram",description:it.ExposureProgram},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 y(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:it.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:it.ShutterSpeedValue},37378:{name:"ApertureValue",description:it.ApertureValue},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:it.MeteringMode},37384:{name:"LightSource",description:it.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:it.FocalLength},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:b},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",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:it.ColorSpace},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:it.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:function(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,f=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){f=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(f)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return ut(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?ut(e,2):void 0}}(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.")}(),r=n[0],i=n[1];return"X: ".concat(r,", Y: ").concat(i)}},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:it.CustomRendered},41986:{name:"ExposureMode",description:it.ExposureMode},41987:{name:"WhiteBalance",description:it.WhiteBalance},41988:{name:"DigitalZoomRatio",description:function(e){return 0===e[0]?"Digital zoom was not used":""+e[0]/e[1]}},41989:{name:"FocalLengthIn35mmFilm",description:it.FocalLengthIn35mmFilm},41990:{name:"SceneCaptureType",description:it.SceneCaptureType},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:it.Contrast},41993:{name:"Saturation",description:it.Saturation},41994:{name:"Sharpness",description:it.Sharpness},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=parseFloat((e[0][0]/e[0][1]).toFixed(5)),n=parseFloat((e[1][0]/e[1][1]).toFixed(5)),r="".concat(t,"-").concat(n," mm");if(0===e[3][1])return"".concat(r," f/?");var i=1/(e[2][1]/e[2][1]/(e[3][0]/e[3][1]));return"".concat(r," f/").concat(parseFloat(i.toFixed(5)))}},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"}),mt="0th",ht="exif",vt="interoperability",yt="canon",bt="pentax",St=pt(pt(pt(pt(pt(pt(pt(pt({},mt,gt),"1st",ot),ht,gt),"gps",ct),vt,st),"mpf",v.USE_MPF?lt:{}),yt,v.USE_MAKER_NOTES?{4:{name:"ShotInfo",description:function(e){return e}}}:{}),bt,v.USE_MAKER_NOTES?{0:{name:"PentaxVersion",description:function(e){return e.join(".")}},5:"PentaxModelID",555:"LevelInfo"}:{}),It={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},Pt={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},At={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:Ct,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===A)},getLongAt:Tt,getRationalAt:function(e,t,n){return[Tt(e,t,n),Tt(e,t+4,n)]},getUndefinedAt:function(e,t){return Ct(e,t)},getSlongAt:xt,getSrationalAt:function(e,t,n){return[xt(e,t,n),xt(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return Tt(e,t,n)},typeSizes:It,tagTypes:Pt,getTypeSize:function(e){if(void 0===Pt[e])throw Error("No such type found.");return It[Pt[e]]}};function Ct(e,t){return e.getUint8(t)}function Tt(e,t,n){return e.getUint32(t,n===A)}function xt(e,t,n){return e.getInt32(t,n===A)}var Ut={exif:1,iptc:1,photoshop:1,mpf:1,makerNotes:1},Et={exif:1,iptc:1,xmp:1,icc:1,photoshop:1,makerNotes:1,mpf:1,file:1,jfif:1,png:1,riff:1,gif:1,gps:1,composite:1,thumbnail:1},wt={exifIfdPointer:"Exif IFD Pointer",gpsInfoIfdPointer:"GPS Info IFD Pointer",interoperabilityIfdPointer:"Interoperability IFD Pointer"},Ft={thumbnail:["JPEGInterchangeFormat","JPEGInterchangeFormatLength"],iptc:["IPTC-NAA"],xmp:["ApplicationNotes"],icc:["ICC_Profile"],photoshop:["ImageSourceData","PhotoshopSettings"],makerNotes:["MakerNote","Make"],gps:["GPSLatitude","GPSLatitudeRef","GPSLongitude","GPSLongitudeRef","GPSAltitude","GPSAltitudeRef"]},Ot={file:["Image Width","Image Height"],exif:["FocalLength","FocalPlaneXResolution","FocalPlaneYResolution","FocalPlaneResolutionUnit","FocalLengthIn35mmFilm"]};function Rt(e){return 1==e?1:Array.isArray(e)&&e.length>0}function Mt(){return{isActive:0,shouldReturnGroup:e,shouldParseGroup:e,shouldReturnTag:e,shouldParseTag:e};function e(){return 1}}var Nt=Mt();function Gt(e){var t=e.groupKey,n=e.hasIncludeTags,r=e.hasIncludeEntry,i=e.includeTags,o=e.shouldParseExif,a=e.shouldParseFile;return n?r?"thumbnail"===t&&Array.isArray(i[t])?1:i[t]:"exif"===t&&o||"file"===t&&a?[]:void 0:1}function kt(e){var t=e.groupKey,n=e.hasIncludeTags,r=e.hasIncludeEntry,i=e.shouldParseExif,o=e.shouldParseFile,a=e.exifIncludeDependencies,u=e.fileIncludeDependencies;return n?"exif"===t&&(i||r&&Object.keys(a).length>0)?a:"file"===t&&o?u:Object.create(null):Object.create(null)}function Lt(e,t){if(!e||!Object.prototype.hasOwnProperty.call(e,t))return 0;var n=e[t];return 1==n?1:Array.isArray(n)&&n.length>0}function Dt(e){var t,n,r=e.groupKey,i=e.includeValue,o=e.excludeValue,a=e.extraIncludeNames,u=!!Ut[r],f={includeAll:0,includeNames:void 0,includeIds:void 0,excludeAll:0,excludeNames:void 0,excludeIds:void 0};if(1==i)f.includeAll=1;else if(Array.isArray(i)){f.includeNames=Object.create(null),u&&(f.includeIds=Object.create(null));for(var c=0;c<i.length;c++)t=f,"number"==typeof(n=i[c])&&t.includeIds?t.includeIds[n+""]=1:"string"==typeof n&&(t.includeNames[n.toLowerCase()]=1);for(var s in a)f.includeNames[s.toLowerCase()]=1}else if(a&&Object.keys(a).length>0)for(var l in f.includeNames=Object.create(null),a)f.includeNames[l.toLowerCase()]=1;if(1==o)return f.excludeAll=1,f;if(Array.isArray(o)){f.excludeNames=Object.create(null),u&&(f.excludeIds=Object.create(null));for(var d=0;d<o.length;d++)p(f,o[d])}return f;function p(e,t){"number"==typeof t&&e.excludeIds?e.excludeIds[t+""]=1:"string"==typeof t&&(e.excludeNames[t.toLowerCase()]=1)}}function _t(e,t,n){return e.excludeAll?0:e.includeAll?!jt(e,t,n):e.includeNames||e.includeIds?function(e,t,n){return void 0!==n&&e.includeIds&&e.includeIds[n+""]||t&&e.includeNames&&e.includeNames[(t+"").toLowerCase()]?1:0}(e,t,n)?!jt(e,t,n):0:!jt(e,t,n)}function jt(e,t,n){return void 0!==n&&e.excludeIds&&e.excludeIds[n+""]||t&&e.excludeNames&&e.excludeNames[(t+"").toLowerCase()]?1:0}var Bt={1:At.getByteAt,2:At.getAsciiAt,3:At.getShortAt,4:At.getLongAt,5:At.getRationalAt,7:At.getUndefinedAt,9:At.getSlongAt,10:At.getSrationalAt,13:At.getIfdPointerAt};function zt(e,t,n){return t+At.getLongAt(e,t+4,n)}function Vt(e,t,n,r,i,o){var a,u,f=arguments.length>6&&void 0!==arguments[6]?arguments[6]:0,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:Nt,s=arguments.length>8&&void 0!==arguments[8]?arguments[8]:"exif",l=At.getTypeSize("SHORT"),d={},p=function(e,t,n){return t+At.getTypeSize("SHORT")<=e.byteLength?At.getShortAt(e,t,n):0}(e,r,i);r+=l;for(var g=0;g<p&&!(r+12>e.byteLength);g++){var m=Ht(e,t,n,r,i,o,c,s);void 0!==m&&(d[m.name]={id:m.id,value:m.value,description:m.description},f&&(d[m.name].computed=(a=m.tagType,u=m.value,a===At.tagTypes.ASCII?Array.isArray(u)&&1===u.length?u[0]:u:a===At.tagTypes.RATIONAL||a===At.tagTypes.SRATIONAL?function(e){return Array.isArray(e)&&2===e.length?"number"==typeof e[0]&&"number"==typeof e[1]:0}(u)?Kt(u):Array.isArray(u)?u.map((function(e){return Kt(e)})):u:u)),("MakerNote"===m.name||t===bt&&"LevelInfo"===m.name)&&(d[m.name].__offset=m.__offset)),r+=12}if(v.USE_THUMBNAIL&&r<e.byteLength-At.getTypeSize("LONG")){var h=At.getLongAt(e,r,i);0!==h&&t===mt&&c.shouldParseGroup("thumbnail")&&(d.Thumbnail=Vt(e,"1st",n,n+h,i,o,f,c,"thumbnail"))}return d}function Ht(e,t,n,r,i){var o,a,u=arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,f=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Nt,c=arguments.length>7&&void 0!==arguments[7]?arguments[7]:"exif",s=At.getTypeSize("SHORT"),l=s+At.getTypeSize("SHORT"),d=l+At.getTypeSize("LONG"),p=At.getShortAt(e,r,i),g=At.getShortAt(e,r+s,i),m=At.getLongAt(e,r+l,i);if(void 0!==At.typeSizes[g]&&(u||void 0!==St[t][p])){var h=function(e,t){if(void 0!==St[e][t]){if("string"==typeof St[e][t])return St[e][t];if(St[e][t].name)return St[e][t].name}return"undefined-".concat(t)}(t,p);if(f.shouldParseTag(c,h,p)){o=function(e,t){return At.typeSizes[e]*t<=At.getTypeSize("LONG")}(g,m)?Wt(e,a=r+d,g,m,i):function(e,t,n,r,i){return t+n+At.typeSizes[r]*i<=e.byteLength}(e,n,a=At.getLongAt(e,r+d,i),g,m)?Wt(e,n+a,g,m,i,33723===p):"<faulty value>",g===At.tagTypes.ASCII&&(o=function(e){try{return e.map((function(e){return decodeURIComponent(escape(e))}))}catch(t){return e}}(o=function(e){for(var t=[],n=0,r=0;r<e.length;r++)"\0"!==e[r]?(void 0===t[n]&&(t[n]=""),t[n]+=e[r]):n++;return t}(o)));var v=o;if(void 0!==St[t][p])if(void 0!==St[t][p].name&&void 0!==St[t][p].description)try{v=St[t][p].description(o)}catch(e){v=Xt(o)}else v=g===At.tagTypes.RATIONAL||g===At.tagTypes.SRATIONAL?""+o[0]/o[1]:Xt(o);return{id:p,name:h,value:o,description:v,tagType:g,__offset:a}}}}function Wt(e,t,n,r,i){var o=[];arguments.length>5&&void 0!==arguments[5]&&arguments[5]&&(r*=At.typeSizes[n],n=At.tagTypes.BYTE);for(var a=0;a<r;a++)o.push(Bt[n](e,t,i)),t+=At.typeSizes[n];return n===At.tagTypes.ASCII?o=At.getAsciiValue(o):1===o.length&&(o=o[0]),o}function Xt(e){return e instanceof Array?e.join(", "):e}function Kt(e){if(!Array.isArray(e)||2!==e.length)return e;var t=e[0],n=e[1];return Number.isFinite(t)&&Number.isFinite(n)?0===n?null:t/n:e}var Jt="Exif IFD Pointer",Yt="GPS Info IFD Pointer",qt="Interoperability IFD Pointer",$t={read:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,o=C(e,t),a=function(e,t,n,r,i,o){return Vt(e,mt,t,zt(e,t,n),n,r,i,o,"exif")}(e,t,o,n,r,i);return{tags:a=en(a=Qt(a=Zt(a,e,t,o,n,r,i),e,t,o,n,r,i),e,t,o,n,r,i),byteOrder:o}}};function Zt(e,t,n,r,i,o,a){return void 0!==e[Jt]?l(e,Vt(t,ht,n,n+e[Jt].value,r,i,o,a,"exif")):e}function Qt(e,t,n,r,i,o,a){return void 0!==e[Yt]?l(e,Vt(t,"gps",n,n+e[Yt].value,r,i,o,a,"exif")):e}function en(e,t,n,r,i,o,a){return void 0!==e[qt]?l(e,Vt(t,vt,n,n+e[qt].value,r,i,o,a,"exif")):e}var tn={read:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:void 0,o=C(e,t);return function(e,t,n,r){if(!n.MPEntry)return n;for(var i=[],o=0;o<Math.ceil(n.MPEntry.value.length/nn);o++){i[o]={};var a=rn(n.MPEntry.value,o*nn,At.getTypeSize("LONG"),r);i[o].ImageFlags=on(a),i[o].ImageFormat=an(a),i[o].ImageType=un(a);var u=rn(n.MPEntry.value,o*nn+4,At.getTypeSize("LONG"),r);i[o].ImageSize={value:u,description:""+u};var f=fn(o,n.MPEntry,r,t);i[o].ImageOffset={value:f,description:""+f};var c=rn(n.MPEntry.value,o*nn+12,At.getTypeSize("SHORT"),r);i[o].DependentImage1EntryNumber={value:c,description:""+c};var s=rn(n.MPEntry.value,o*nn+14,At.getTypeSize("SHORT"),r);i[o].DependentImage2EntryNumber={value:s,description:""+s},i[o].image=e.buffer.slice(f,f+u),d(i[o],"base64",(function(){return p(this.image)}))}return n.Images=i,n}(e,t,Vt(e,"mpf",t,zt(e,t,o),o,n,r,i,"mpf"),o)}},nn=16;function rn(e,t,n,r){if(r===A){for(var i=0,o=0;o<n;o++)i+=e[t+o]<<8*o;return i}for(var a=0,u=0;u<n;u++)a+=e[t+u]<<8*(n-1-u);return a}function on(e){var t=[e>>31&1,e>>30&1,e>>29&1],n=[];return t[0]&&n.push("Dependent Parent Image"),t[1]&&n.push("Dependent Child Image"),t[2]&&n.push("Representative Image"),{value:t,description:n.join(", ")||"None"}}function an(e){var t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function un(e){var t=16777215&e;return{value:t,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[t]||"Unknown"}}function fn(e,t,n,r){return function(e){return 0===e}(e)?0:rn(t.value,e*nn+8,At.getTypeSize("LONG"),n)+r}var cn={read:function(e,t){var n=function(e,t){return At.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(8>n)){var r=At.getByteAt(e,t+7);return{value:r,description:""+r}}}(e,t,n);return{"Bits Per Sample":sn(e,t,n),"Image Height":ln(e,t,n),"Image Width":dn(e,t,n),"Color Components":r,Subsampling:r&&pn(e,t,r.value,n)}}};function sn(e,t,n){if(!(3>n)){var r=At.getByteAt(e,t+2);return{value:r,description:""+r}}}function ln(e,t,n){if(!(5>n)){var r=At.getShortAt(e,t+3);return{value:r,description:"".concat(r,"px")}}}function dn(e,t,n){if(!(7>n)){var r=At.getShortAt(e,t+5);return{value:r,description:"".concat(r,"px")}}}function pn(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([At.getByteAt(e,a),At.getByteAt(e,a+1),At.getByteAt(e,a+2)])}return{value:i,description:i.length>1?gn(i)+mn(i):""}}}function gn(e){var t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((function(e){return t[e[0]]})).join("")}function mn(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 hn={read:function(e,t){var n=function(e,t){return At.getShortAt(e,t)}(e,t),r=function(e,t,n){if(!(15>n)){var r=At.getByteAt(e,t+14);return{value:r,description:"".concat(r,"px")}}}(e,t,n),i=function(e,t,n){if(!(16>n)){var r=At.getByteAt(e,t+15);return{value:r,description:"".concat(r,"px")}}}(e,t,n),o={"JFIF Version":vn(e,t,n),"Resolution Unit":yn(e,t,n),XResolution:Sn(e,t,n),YResolution:In(e,t,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":i};if(void 0!==r&&void 0!==i){var a=function(e,t,n,r){if(!(0===n||16+n>r))return{value:e.buffer.slice(t+16,t+16+n),description:"<24-bit RGB pixel data>"}}(e,t,3*r.value*i.value,n);a&&(o["JFIF Thumbnail"]=a)}for(var u in o)void 0===o[u]&&delete o[u];return o}};function vn(e,t,n){if(!(9>n)){var r=At.getByteAt(e,t+7),i=At.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}}function yn(e,t,n){if(!(10>n)){var r=At.getByteAt(e,t+9);return{value:r,description:bn(r)}}}function bn(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function Sn(e,t,n){if(!(12>n)){var r=At.getShortAt(e,t+10);return{value:r,description:""+r}}}function In(e,t,n){if(!(14>n)){var r=At.getShortAt(e,t+12);return{value:r,description:""+r}}}var Pn={iptc:{256:{name:"Model Version",description:function(e){return""+((e[0]<<8)+e[1])}},261:{name:"Destination",repeatable:1},276:{name:"File Format",description:function(e){return""+((e[0]<<8)+e[1])}},278:{name:"File Format Version",description:function(e){return""+((e[0]<<8)+e[1])}},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:An},336:{name:"Time Sent",description:Cn},346:{name:"Coded Character Set",description:Tn,encoding_name:Tn},356:"UNO",376:{name:"ARM Identifier",description:function(e){return""+((e[0]<<8)+e[1])}},378:{name:"ARM Version",description:function(e){return""+((e[0]<<8)+e[1])}},512:{name:"Record Version",description:function(e){return""+((e[0]<<8)+e[1])}},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:function(e){return"01"===y(e)?"Additional Language":"Unknown"}},522:"Urgency",524:{name:"Subject Reference",repeatable:1,description:function(e){var t=y(e).split(":");return t[2]+(t[3]?"/"+t[3]:"")+(t[4]?"/"+t[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:1},534:"Fixture Identifier",537:{name:"Keywords",repeatable:1},538:{name:"Content Location Code",repeatable:1},539:{name:"Content Location Name",repeatable:1},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:function(e){var t=y(e);return"01"===t?"Object Kill":"02"===t?"Object Replace":"03"===t?"Object Append":"04"===t?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:1},559:{name:"Reference Date",repeatable:1},562:{name:"Reference Number",repeatable:1},567:{name:"Date Created",description:An},572:{name:"Time Created",description:Cn},574:{name:"Digital Creation Date",description:An},575:{name:"Digital Creation Time",description:Cn},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:function(e){var t=y(e);return"a"===t?"morning":"p"===t?"evening":"b"===t?"both":"Unknown"}},592:{name:"By-line",repeatable:1},597:{name:"By-line Title",repeatable:1},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:1},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:1},637:{name:"Rasterized Caption",description:function(e){return e}},642:"Image Type",643:{name:"Image Orientation",description:function(e){var t=y(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:function(e){var t=y(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(y(e),10)+" Hz"}},664:{name:"Audio Sampling Resolution",description:function(e){var t=parseInt(y(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:function(e){var t=y(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 y(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=y(e);if(t["ObjectData Preview File Format"]){var i=y(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 An(e){var t=y(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function Cn(e){var t=y(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 Tn(e){var t=y(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 xn=function(e,t){if("string"==typeof t)return Un(t);var n=function(){if("undefined"!=typeof TextDecoder)return TextDecoder}();if("undefined"!=typeof n&&void 0!==e)try{return new n(e).decode(t instanceof DataView?t.buffer:Uint8Array.from(t))}catch(e){}return Un(t.map((function(e){return String.fromCharCode(e)})).join(""))};function Un(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}var En={read:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Nt;try{if(Array.isArray(e))return Rn(new DataView(Uint8Array.from(e).buffer),{size:e.length},0,n,r);var i=function(e,t){for(;t+12<=e.byteLength;){var n=wn(e,t);if(Fn(n))return{naaBlock:n,dataOffset:t+n.headerSize};t+=n.headerSize+n.size+On(n)}throw Error("No IPTC NAA resource block.")}(e,t);return Rn(e,i.naaBlock,i.dataOffset,n,r)}catch(e){return{}}}};function wn(e,t){if(943868237!==e.getUint32(t,0))throw Error("Not an IPTC resource block.");var n=e.getUint8(t+4+2),r=(n%2==0?n+1:n)+1;return{headerSize:6+r+4,type:e.getUint16(t+4),size:e.getUint32(t+4+2+r)}}function Fn(e){return 1028===e.type}function On(e){return e.size%2!=0?1:0}function Rn(e,t,n,r,i){for(var o={},a=void 0,u=n+t.size;n<u&&n<e.byteLength;){var f=Mn(e,n,o,a,r,i),c=f.tag,s=f.tagSize;if(null===c)break;c&&("encoding"in c&&(a=c.encoding),void 0===o[c.name]||void 0===c.repeatable?o[c.name]={id:c.id,value:c.value,description:c.description}:(o[c.name]instanceof Array||(o[c.name]=[{id:o[c.name].id,value:o[c.name].value,description:o[c.name].description}]),o[c.name].push({id:c.id,value:c.value,description:c.description}))),n+=5+s}return o}function Mn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Nt;if(function(e,t){return 28!==e.getUint8(t)}(e,t))return{tag:null,tagSize:0};var a=e.getUint16(t+1),u=e.getUint16(t+3);if(!i&&!Pn.iptc[a])return{tag:void 0,tagSize:u};if(!o.shouldParseTag("iptc",function(e,t){var n=Pn.iptc[e];return n?"string"==typeof n?n:n&&"string"==typeof n.name?n.name:void 0:t?"undefined-".concat(e):void 0}(a,i),a))return{tag:void 0,tagSize:u};var f=function(e,t,n){for(var r=[],i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+5,u),c={id:a,name:Nn(Pn.iptc[a],a,f),value:f,description:Gn(Pn.iptc[a],f,n,r)};return function(e){return Pn.iptc[e]&&Pn.iptc[e].repeatable}(a)&&(c.repeatable=1),function(e){return Pn.iptc[e]&&void 0!==Pn.iptc[e].encoding_name}(a)&&(c.encoding=Pn.iptc[a].encoding_name(f)),{tag:c,tagSize:u}}function Nn(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 Gn(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)?xn(r,t):t}function kn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Ln={"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},"tiff:ResolutionUnit":function(e){return it.ResolutionUnit(parseInt(e,10))},"tiff:XResolution":function(e){return Dn(it.XResolution,e)},"tiff:YResolution":function(e){return Dn(it.YResolution,e)},"exif:ApertureValue":function(e){return Dn(it.ApertureValue,e)},"exif:GPSLatitude":jn,"exif:GPSLongitude":jn,"exif:FNumber":function(e){return Dn(it.FNumber,e)},"exif:FocalLength":function(e){return Dn(it.FocalLength,e)},"exif:FocalPlaneResolutionUnit":function(e){return it.FocalPlaneResolutionUnit(parseInt(e,10))},"exif:ColorSpace":function(e){return it.ColorSpace(function(e){return"0x"===e.substring(0,2)?parseInt(e.substring(2),16):parseInt(e,10)}(e))},"exif:ComponentsConfiguration":function(e,t){if(/^\d, \d, \d, \d$/.test(t)){var n=t.split(", ").map((function(e){return e.charCodeAt(0)}));return it.ComponentsConfiguration(n)}return t},"exif:Contrast":function(e){return it.Contrast(parseInt(e,10))},"exif:CustomRendered":function(e){return it.CustomRendered(parseInt(e,10))},"exif:ExposureMode":function(e){return it.ExposureMode(parseInt(e,10))},"exif:ExposureProgram":function(e){return it.ExposureProgram(parseInt(e,10))},"exif:ExposureTime":function(e){return _n(e)?it.ExposureTime(e.split("/").map((function(e){return parseInt(e,10)}))):e},"exif:MeteringMode":function(e){return it.MeteringMode(parseInt(e,10))},"exif:Saturation":function(e){return it.Saturation(parseInt(e,10))},"exif:SceneCaptureType":function(e){return it.SceneCaptureType(parseInt(e,10))},"exif:Sharpness":function(e){return it.Sharpness(parseInt(e,10))},"exif:ShutterSpeedValue":function(e){return Dn(it.ShutterSpeedValue,e)},"exif:WhiteBalance":function(e){return it.WhiteBalance(parseInt(e,10))}};function Dn(e,t){return _n(t)?e(t.split("/")):t}function _n(e){return/^-?\d+\/-?\d+$/.test(e)}function jn(e){var t,n=function(e){if(Array.isArray(e))return e}(t=e.split(","))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,f=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){f=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(f)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return kn(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?kn(e,2):void 0}}(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.")}(),r=n[0],i=n[1];if(void 0!==r&&void 0!==i){var o=parseFloat(r),a=parseFloat(i),u=i.charAt(i.length-1);if(!Number.isNaN(o)&&!Number.isNaN(a))return""+(o+a/60)+u}return e}var Bn={xmp:"http://ns.adobe.com/xap/1.0/",tiff:"http://ns.adobe.com/tiff/1.0/",exif:"http://ns.adobe.com/exif/1.0/",dc:"http://purl.org/dc/elements/1.1/",xmpMM:"http://ns.adobe.com/xap/1.0/mm/",stEvt:"http://ns.adobe.com/xap/1.0/sType/ResourceEvent#",stRef:"http://ns.adobe.com/xap/1.0/sType/ResourceRef#",photoshop:"http://ns.adobe.com/photoshop/1.0/"};function zn(e){return zn="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},zn(e)}function Vn(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}function Hn(e){var t="function"==typeof Map?new Map:void 0;return Hn=function(e){if(null===e||!function(e){try{return-1!==Function.toString.call(e).indexOf("[native code]")}catch(t){return"function"==typeof e}}(e))return e;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return function(e,t,n){if(Wn())return Reflect.construct.apply(null,arguments);var r=[null];r.push.apply(r,t);var i=new(e.bind.apply(e,r));return n&&Xn(i,n.prototype),i}(e,arguments,Kn(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:0,writable:1,configurable:1}}),Xn(n,e)},Hn(e)}function Wn(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(Wn=function(){return!!e})()}function Xn(e,t){return Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Xn(e,t)}function Kn(e){return Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Kn(e)}var Jn={read:function(e,t,n){var r={};if("string"==typeof e)return $n(r,e,n),r;var i,o=(i=function(e,t){if(0===t.length)return[];var n=[qn(e,t.slice(0,1))];return t.length>1&&n.push(qn(e,t.slice(1))),n}(e,t),function(e){if(Array.isArray(e))return e}(i)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,f=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){f=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(f)throw r}}return a}}(i)||function(e){if(e){if("string"==typeof e)return Vn(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Vn(e,2):void 0}}(i)||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.")}()),a=o[0],u=o[1],f=$n(r,a,n);if(u){var c=$n(r,u,n);f||c||(delete r._raw,$n(r,qn(e,t),n))}return r}},Yn=function(e){function t(e){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,n){return t=Kn(t),function(e,t){if(t&&("object"==zn(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,Wn()?Reflect.construct(t,n||[],Kn(e).constructor):t.apply(e,n))}(this,t,[e])).name="ParseError",n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:1,configurable:1}}),Object.defineProperty(e,"prototype",{writable:0}),t&&Xn(e,t)}(t,e),Object.defineProperty(n=t,"prototype",{writable:0}),n;var n}(Hn(Error));function qn(e,t){for(var n=t.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),i=0,o=0;o<t.length;o++){var a=t[o],u=e.buffer.slice(a.dataOffset,a.dataOffset+a.length);r.set(new Uint8Array(u),i),i+=a.length}return new DataView(r.buffer)}function $n(e,t,n){try{var r=function(e,t){var n=function(e){if(e)return e;if("undefined"!=typeof DOMParser)return new DOMParser;try{var t=require("@xmldom/xmldom");return new(0,t.DOMParser)({onError:t.onErrorStopParsing})}catch(e){return}}(t);if(!n)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),Error();var r="string"==typeof e?e:a(e,0,e.byteLength);return{doc:Zn(n,r.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")),raw:r}}(t,n),i=r.doc,o=r.raw;return e._raw=(e._raw||"")+o,l(e,nr(er(Qn(i),1))),1}catch(e){return 0}}function Zn(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;try{var r=e.parseFromString(t,"application/xml"),i=r.getElementsByTagName("parsererror");if(i.length>0)throw new Yn(i[0].textContent);return r}catch(r){if("ParseError"===r.name&&function(e){for(var t=["prefix is non-null and namespace is null","prefix not bound to a namespace","prefix inte bundet till en namnrymd",/Namespace prefix .+ is not defined/],n=0;n<t.length;n++)if(RegExp(t[n]).test(e.message))return 1;return 0}(r)&&!n)return Zn(e,function(e){var t=e.match(/<([A-Za-z_][A-Za-z0-9._-]*)([^>]*)>/);if(!t)return e;var n=t[1],r=function(e){for(var t,n=[],r=/xmlns:([\w-]+)=["'][^"']+["']/g;null!==(t=r.exec(e));)-1===n.indexOf(t[1])&&n.push(t[1]);return n}(e),i=function(e){for(var t,n=[],r=/\b([A-Za-z_][A-Za-z0-9._-]*):[A-Za-z_][A-Za-z0-9._-]*\b/g;null!==(t=r.exec(e));){var i=t[1];"xmlns"!==i&&"xml"!==i&&-1===n.indexOf(i)&&n.push(i)}return n}(e).filter((function(e){return-1===r.indexOf(e)}));return 0===i.length?e:function(e,t,n){var r=RegExp("<"+t+"([^>]*)>");return e.replace(r,"<"+t+"$1"+n+">")}(e,n,function(e){for(var t=[],n=0;n<e.length;n++){var r=e[n],i=Bn[r]||"http://fallback.namespace/"+r;t.push(" xmlns:"+r+'="'+i+'"')}return t.join("")}(i))}(t),1);throw r}}function Qn(e){for(var t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return Qn(e.childNodes[t]);if("rdf:RDF"===e.childNodes[t].tagName)return e.childNodes[t]}throw Error()}function er(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=function(e){for(var t=[],n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t}(e);return 1===(t=r).length&&"#text"===t[0].nodeName?n?{}:function(e){return e.nodeValue}(r[0]):function(e){var t={};return e.forEach((function(e){if(function(e){return e.nodeName&&"#text"!==e.nodeName}(e)){var n=function(e){return{attributes:tr(e),value:er(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}(r)}function tr(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 nr(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){l(t,rr(e.attributes)),"object"===zn(e.value)&&l(t,cr(e.value))}))}return t}function rr(e){var t={};for(var n in e)try{ir(n)&&(t[ar(n)]={value:e[n],attributes:{},description:ur(e[n],n)})}catch(e){}return t}function ir(e){return"rdf:parseType"!==e&&!or(e)}function or(e){return"xmlns"===e.split(":")[0]}function ar(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function ur(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;if(Array.isArray(e)){var n=function(e){return e.map((function(e){return void 0!==e.value?ur(e.value):ur(e)})).join(", ")}(e);return t&&"function"==typeof Ln[t]?Ln[t](e,n):n}if("object"===zn(e))return function(e){var t=[];for(var n in e)t.push("".concat(fr(n),": ").concat(ur(e[n].value)));return t.join("; ")}(e);try{return t&&"function"==typeof Ln[t]?Ln[t](e):decodeURIComponent(escape(e))}catch(t){return e}}function fr(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 cr(e){var t={};for(var n in e)try{or(n)||(t[ar(n)]=sr(e[n],n))}catch(e){}return t}function sr(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return br(e[e.length-1],t)}(e,t):function(e){return"Resource"===e.attributes["rdf:parseType"]&&"string"==typeof e.value&&""===e.value.trim()}(e)?{value:"",attributes:{},description:""}:lr(e)?dr(e,t):gr(e)?mr(e,t):hr(e)?vr(e,t):function(e){return void 0!==yr(e.value)}(e)?function(e,t){var n=yr(e.value).value["rdf:li"],r=pr(e),i=[];return void 0===n?n=[]:Array.isArray(n)||(n=[n]),n.forEach((function(e){i.push(function(e){return lr(e)?dr(e):gr(e)?mr(e).value:hr(e)?vr(e).value:br(e)}(e))})),{value:i,attributes:r,description:ur(i,t)}}(e,t):br(e,t)}function lr(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 dr(e,t){var n=pr(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),l(n,pr(e),function(e){var t={};for(var n in e.value)"rdf:value"===n||or(n)||(t[ar(n)]=e.value[n].value);return t}(e));var r=function(e){return Sr(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:ur(r,t)}}function pr(e){var t={};for(var n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||or(n)||(t[ar(n)]=e.attributes[n]);return t}function gr(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function mr(e,t){var n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(l(n.value,rr(e.value["rdf:Description"].attributes)),l(n.attributes,pr(e)),e=e.value["rdf:Description"]),l(n.value,cr(e.value)),n.description=ur(n.value,t),n}function hr(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function vr(e,t){var n=rr(e.attributes);return{value:n,attributes:{},description:ur(n,t)}}function yr(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function br(e,t){var n=Sr(e)||nr(e.value);return{value:n,attributes:pr(e),description:ur(n,t)}}function Sr(e){return e.attributes&&e.attributes["rdf:resource"]}function Ir(e){return Ir="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},Ir(e)}function Pr(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ir(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ir(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==Ir(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:1,configurable:1,writable:1}):e[t]=n,e}function Ar(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Cr={2e3:{name:"PathInformation",description:function(e){for(var t={},n=[],r=0;r<e.byteLength;r+=26){var i=At.getShortAt(e,r);Tr[i]&&(t[i]||(t[i]=Tr[i].description),n.push({type:i,path:Tr[i].path(e,r+2)}))}return JSON.stringify({types:t,paths:n})}},2999:{name:"ClippingPathName",description:function(e){return(t=c(e,0),function(e){if(Array.isArray(e))return e}(t)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,f=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){f=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(f)throw r}}return a}}(t)||function(e){if(e){if("string"==typeof e)return Ar(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?Ar(e,2):void 0}}(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.")}())[1];var t}}},Tr=Pr(Pr(Pr(Pr(Pr(Pr(Pr(Pr(Pr({},0,{description:"Closed subpath length",path:function(e,t){return[At.getShortAt(e,t)]}}),1,{description:"Closed subpath Bezier knot, linked",path:xr}),2,{description:"Closed subpath Bezier knot, unlinked",path:xr}),3,{description:"Open subpath length",path:function(e,t){return[At.getShortAt(e,t)]}}),4,{description:"Open subpath Bezier knot, linked",path:xr}),5,{description:"Open subpath Bezier knot, unlinked",path:xr}),6,{description:"Path fill rule",path:function(){return[]}}),8,{description:"Initial fill rule",path:function(e,t){return[At.getShortAt(e,t)]}}),7,{description:"Clipboard",path:function(e,t){return[[Er(e,t,8),Er(e,t+4,8),Er(e,t+8,8),Er(e,t+12,8)],Er(e,t+16,8)]}});function xr(e,t){for(var n=[],r=0;r<24;r+=8)n.push(Ur(e,t+r));return n}function Ur(e,t){var n=Er(e,t,8);return[Er(e,t+4,8),n]}function Er(e,t,n){var r,i=At.getLongAt(e,t),o=i>>>31==0?1:-1,a=(2130706432&i)>>>32-n,u=i&parseInt(g("1",32-n),2);return o*function(e){return parseInt(e.replace(".",""),2)/Math.pow(2,(e.split(".")[1]||"").length)}(a.toString(2)+"."+(g("0",32-n-(r=u.toString(2)).length)+r))}function wr(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=Array(t);n<t;n++)r[n]=e[n];return r}var Fr={read:function(e,t){for(var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Nt,r=o(new Uint8Array(e).buffer),i={},u=0;u<e.length;){var f=a(r,u,Nr);u+=Nr;var c=At.getShortAt(r,u),s=kr(r,u+=Rr),l=s.tagName;u+=s.tagNameSize;var d=At.getLongAt(r,u);if(u+=Mr,f===Or){var p=Gr(c,l,t);if(!n.shouldParseTag("photoshop",p,c)){u+=d+d%2;continue}var g=o(r.buffer,u,d),m={id:c,value:a(g,0,d)};if(Cr[c]){try{m.description=Cr[c].description(g)}catch(e){m.description="<no description formatter>"}i[l||Cr[c].name]=m}else t&&(i["undefined-".concat(c)]=m)}u+=d+d%2}return i}},Or="8BIM",Rr=2,Mr=4,Nr=Or.length;function Gr(e,t,n){return t||(Cr[e]&&Cr[e].name?Cr[e].name:n?"undefined-".concat(e):void 0)}function kr(e,t){var n,r=function(e){if(Array.isArray(e))return e}(n=c(e,t))||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,a=[],u=1,f=0;try{for(i=(t=t.call(e)).next,!2;!(u=(n=i.call(t)).done)&&(a.push(n.value),2!==a.length);u=1);}catch(e){f=1,r=e}finally{try{if(!u&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(f)throw r}}return a}}(n)||function(e){if(e){if("string"==typeof e)return wr(e,2);var t={}.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?wr(e,2):void 0}}(n)||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.")}(),i=r[0];return{tagName:r[1],tagNameSize:1+i+(i%2==0?1:0)}}var Lr={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"}},Dr={4:{name:"Preferred CMM type",value:function(e,t){return a(e,t,4)},description:function(e){return null!==e?_r(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 a(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 a(e,t,4)}},20:{name:"Connection Space",value:function(e,t){return a(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 a(e,t,4)},description:function(e){return _r(e)}},48:{name:"Device Manufacturer",value:function(e,t){return a(e,t,4)},description:function(e){return _r(e)}},52:{name:"Device Model Number",value:function(e,t){return a(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 a(e,t,4)}}};function _r(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 jr={read:function(e,t,n){return n&&t[0].compressionMethod!==m?function(e,t){return 0!==t[0].compressionMethod?{}:h(new DataView(e.buffer.slice(t[0].offset,t[0].offset+t[0].length)),t[0].compressionMethod,"utf-8","dataview").then(qr).catch((function(){return{}}))}(e,t):function(e,t){try{for(var n=t.reduce((function(e,t){return e+t.length}),0),r=new Uint8Array(n),i=0,o=function(e){return Array.isArray(e)?new DataView(Uint8Array.from(e).buffer).buffer:e.buffer}(e),a=function(e){var n=t.find((function(t){return t.chunkNumber===e}));if(!n)throw Error("ICC chunk ".concat(e," not found"));var a=o.slice(n.offset,n.offset+n.length),u=new Uint8Array(a);r.set(u,i),i+=u.length},u=1;u<=t.length;u++)a(u);return qr(new DataView(r.buffer))}catch(e){return{}}}(e,t)}},Br=84,zr=128,Vr="acsp",Hr="desc",Wr="mluc",Xr="text",Kr="sig ",Jr=12;function Yr(e,t){return e.length<t+Jr}function qr(e){var t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw Error("ICC profile length not matching");if(e.byteLength<Br)throw Error("ICC profile too short");for(var r={},i=Object.keys(Dr),o=0;o<i.length;o++){var u=i[o],c=Dr[u],s=c.value(e,parseInt(u,10)),l=s;c.description&&(l=c.description(s)),r[c.name]={value:s,description:l}}if($r(t.slice(36,40))!==Vr)throw Error("ICC profile: missing signature");if(function(e){return e.length<zr+4}(t))return r;for(var d=e.getUint32(128),p=132,g=0;g<d;g++){if(Yr(t,p))return r;var m=a(e,p,4),h=e.getUint32(p+4),v=e.getUint32(p+8);if(h>t.length)return r;var y=a(e,h,4);if(y===Hr){var b=e.getUint32(h+8);if(b>v)return r;Zr(r,m,$r(t.slice(h+12,h+b+11)))}else if(y===Wr){for(var S=e.getUint32(h+8),I=e.getUint32(h+12),P=h+16,A=[],C=0;C<S;C++){var T=a(e,P+0,2),x=a(e,P+2,2),U=e.getUint32(P+4),E=e.getUint32(P+8),w=f(e,h+E,U);A.push({languageCode:T,countryCode:x,text:w}),P+=I}if(1===S)Zr(r,m,A[0].text);else{for(var F={},O=0;O<A.length;O++)F["".concat(A[O].languageCode,"-").concat(A[O].countryCode)]=A[O].text;Zr(r,m,F)}}else y===Xr?Zr(r,m,$r(t.slice(h+8,h+v-7))):y===Kr&&Zr(r,m,$r(t.slice(h+8,h+12)));p+=12}return r}function $r(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function Zr(e,t,n){Lr[t]?e[Lr[t].name]={value:n,description:n}:e[t]={value:n,description:n}}var Qr={read:function(e,t,n,r,i){var o=Vt(e,yt,t,t+n,r,i,arguments.length>5&&void 0!==arguments[5]?arguments[5]:0,arguments.length>6&&void 0!==arguments[6]?arguments[6]:void 0,"makerNotes");return o.ShotInfo&&delete(o=l({},o,function(e){var t,n={};return void 0!==e[27]&&(n.AutoRotate={value:e[27],description:(t=e[27],0===t?"None":1===t?"Rotate 90 CW":2===t?"Rotate 180":3===t?"Rotate 270 CW":"Unknown")}),n}(o.ShotInfo.value))).ShotInfo,o},SHOT_INFO_AUTO_ROTATE:27},ei={K3_III:78420},ti={CAMERA_ORIENTATION:1,ROLL_ANGLE:3,PITCH_ANGLE:5},ni={read:function(e,t,n,r){var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:void 0,a=C(e,t+n+8),u=t+n,f=Vt(e,bt,u,u+10,a,r,i,o,"makerNotes");return function(e){return e.PentaxModelID&&e.PentaxModelID.value===ei.K3_III&&e.LevelInfo}(f)&&(f=l({},f,function(e,t,n){var r={};if(t+7>e.byteLength)return r;var i,o=e.getInt8(t+ti.CAMERA_ORIENTATION);r.CameraOrientation={value:o,description:(i=o,0===i?"Horizontal (normal)":1===i?"Rotate 270 CW":2===i?"Rotate 180":3===i?"Rotate 90 CW":4===i?"Upwards":5===i?"Downwards":"Unknown")};var a=e.getInt16(t+ti.ROLL_ANGLE,n===A);r.RollAngle={value:a,description:ri(a)};var u=e.getInt16(t+ti.PITCH_ANGLE,n===A);return r.PitchAngle={value:u,description:ii(u)},r}(e,u+f.LevelInfo.__offset,a)),delete f.LevelInfo),f},PENTAX_IFD_OFFSET:10,MODEL_ID:ei,LIK3III:ti};function ri(e){return""+-.5*e}function ii(e){return""+-.5*e}var oi={read:function(e,t){return{"Image Width":ai(e,t),"Image Height":ui(e,t),"Bit Depth":fi(e,t),"Color Type":ci(e,t),Compression:si(e,t),Filter:li(e,t),Interlace:di(e,t)}}};function ai(e,t){if(!(t+0+4>e.byteLength)){var n=At.getLongAt(e,t);return{value:n,description:"".concat(n,"px")}}}function ui(e,t){if(!(t+4+4>e.byteLength)){var n=At.getLongAt(e,t+4);return{value:n,description:"".concat(n,"px")}}}function fi(e,t){if(!(t+8+1>e.byteLength)){var n=At.getByteAt(e,t+8);return{value:n,description:"".concat(n)}}}function ci(e,t){if(!(t+9+1>e.byteLength)){var n=At.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 si(e,t){if(!(t+10+1>e.byteLength)){var n=At.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}}function li(e,t){if(!(t+11+1>e.byteLength)){var n=At.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}}function di(e,t){if(!(t+12+1>e.byteLength)){var n=At.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}}function pi(e){return pi="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},pi(e)}var gi={read:function(e,t,n,r){for(var i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0,o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:Nt,a={},u=[],f=0;f<t.length;f++){var c=t[f],s=Ai(e,c.offset,c.length,c.type,n);if(s instanceof Promise)u.push(s.then((function(e){var t,n,a,u=e.name,f=e.value,c=e.description;try{if(v.USE_EXIF&&wi(u,f))return o.shouldParseGroup("exif")?{__exif:$t.read(Oi(f),Pi,r,i,o).tags}:{};if(v.USE_IPTC&&Fi(u,f))return o.shouldParseGroup("iptc")?{__iptc:En.read(Oi(f),0,r,o)}:{};if(u&&!wi(u,f)&&!Fi(u,f))return o.shouldParseGroup("png")?(t={},a={value:f,description:c},(n=function(e){var t=function(e){if("object"!=pi(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=pi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==pi(t)?t:t+""}(n=u))in t?Object.defineProperty(t,n,{value:a,enumerable:1,configurable:1,writable:1}):t[n]=a,t):{}}catch(e){}return{}})));else{var l=s.name,d=s.value,p=s.description;l&&o.shouldParseGroup("png")&&(a[l]={value:d,description:p})}}return{readTags:a,readTagsPromise:u.length>0?Promise.all(u):void 0}}},mi="STATE_KEYWORD",hi="STATE_COMPRESSION",vi="STATE_LANG",yi="STATE_TRANSLATED_KEYWORD",bi="STATE_TEXT",Si=1,Ii=1,Pi=6;function Ai(e,t,n,r,i){for(var o,a=[],u=[],f=[],c=mi,s=m,l=0;l<n&&t+l<e.byteLength;l++)if(c!==hi){if(c===bi){o=new DataView(e.buffer.slice(t+l,t+n));break}var d=e.getUint8(t+l);0===d?c=Ti(r,c):c===mi?a.push(d):c===vi?u.push(d):c===yi&&f.push(d)}else s=Ci({type:r,dataView:e,offset:t+l}),r===Ue&&(l+=Si),c=Ti(r,c);if(s!==m&&!i)return{};var p=h(o,s,function(e){return e===xe||e===Ee?"latin1":"utf-8"}(r));return p instanceof Promise?p.then((function(e){return xi(e,r,u,a)})).catch((function(){return xi("<text using unknown compression>".split(""),r,u,a)})):xi(p,r,u,a)}function Ci(e){var t=e.type,n=e.dataView,r=e.offset;if(t===Ue){if(n.getUint8(r)===Ii)return n.getUint8(r+1)}else if(t===Ee)return n.getUint8(r);return m}function Ti(e,t){return t===mi&&[Ue,Ee].includes(e)?hi:t===hi?e===Ue?vi:bi:t===vi?yi:bi}function xi(e,t,n,r){var i=function(e){return e instanceof DataView?a(e,0,e.byteLength):e}(e);return{name:Ui(t,n,r),value:i,description:t===Ue?Ei(e):i}}function Ui(e,t,n){var r=s(n);if(e===xe||0===t.length)return r;var i=s(t);return"".concat(r," (").concat(i,")")}function Ei(e){return xn("UTF-8",e)}function wi(e,t){return"raw profile type exif"===e.toLowerCase()&&"exif"===t.substring(1,5)}function Fi(e,t){return"raw profile type iptc"===e.toLowerCase()&&"iptc"===t.substring(1,5)}function Oi(e){return function(e){for(var t=new DataView(new ArrayBuffer(e.length/2)),n=0;n<e.length;n+=2)t.setUint8(n/2,parseInt(e.substring(n,n+2),16));return t}(e.match(/\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/)[2].replace(/\n/g,""))}var Ri={read:function(e,t){for(var n={},r=0;r<t.length;r++){var i=At.getLongAt(e,t[r]+Pe),o=a(e,t[r]+Ae,Ie);o===we?(n["Pixels Per Unit X"]=Mi(e,t[r],i),n["Pixels Per Unit Y"]=Ni(e,t[r],i),n["Pixel Units"]=Gi(e,t[r],i)):o===Fe&&(n["Modify Date"]=ki(e,t[r],i))}return n}};function Mi(e,t,n){if(Li(e,t,n,0,4)){var r=At.getLongAt(e,t+Ce+0);return{value:r,description:""+r}}}function Ni(e,t,n){if(Li(e,t,n,4,4)){var r=At.getLongAt(e,t+Ce+4);return{value:r,description:""+r}}}function Gi(e,t,n){if(Li(e,t,n,8,1)){var r=At.getByteAt(e,t+Ce+8);return{value:r,description:1===r?"meters":"Unknown"}}}function ki(e,t,n){if(Li(e,t,n,0,7)){var r=At.getShortAt(e,t+Ce),i=At.getByteAt(e,t+Ce+2),o=At.getByteAt(e,t+Ce+3),a=At.getByteAt(e,t+Ce+4),u=At.getByteAt(e,t+Ce+5),f=At.getByteAt(e,t+Ce+6);return{value:[r,i,o,a,u,f],description:"".concat(Di(r,4),"-").concat(Di(i,2),"-").concat(Di(o,2)," ").concat(Di(a,2),":").concat(Di(u,2),":").concat(Di(f,2))}}}function Li(e,t,n,r,i){return r+i<=n&&t+Ce+r+i<=e.byteLength}function Di(e,t){return"".concat("0".repeat(t-(""+e).length)).concat(e)}var _i={read:function(e,t){var n={},r=At.getByteAt(e,t);return n.Alpha=function(e){var t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}(r),n.Animation=function(e){var t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}(r),n.ImageWidth=zi(e,t+ji),n.ImageHeight=zi(e,t+Bi),n}},ji=4,Bi=7;function zi(e,t){var n=At.getByteAt(e,t)+256*At.getByteAt(e,t+1)+65536*At.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}var Vi={read:function(e){return{"GIF Version":Hi(e),"Image Width":Wi(e),"Image Height":Xi(e),"Global Color Map":Ki(e),"Bits Per Pixel":Yi(e),"Color Resolution Depth":Ji(e)}}};function Hi(e){if(!(6>e.byteLength)){var t=a(e,3,3);return{value:t,description:t}}}function Wi(e){if(!(8>e.byteLength)){var t=e.getUint16(6,1);return{value:t,description:"".concat(t,"px")}}}function Xi(e){if(!(10>e.byteLength)){var t=e.getUint16(8,1);return{value:t,description:"".concat(t,"px")}}}function Ki(e){if(!(11>e.byteLength)){var t=(128&e.getUint8(10))>>>7;return{value:t,description:1===t?"Yes":"No"}}}function Ji(e){if(!(11>e.byteLength)){var t=1+((112&e.getUint8(10))>>>4);return{value:t,description:"".concat(t," ").concat(1===t?"bit":"bits")}}}function Yi(e){if(!(11>e.byteLength)){var t=1+(7&e.getUint8(10));return{value:t,description:"".concat(t," ").concat(1===t?"bit":"bits")}}}var qi=[6,7,99],$i={get:function(e,t,n){if((i=t)&&(void 0===i.Compression||qi.includes(i.Compression.value))&&i.JPEGInterchangeFormat&&i.JPEGInterchangeFormat.value&&i.JPEGInterchangeFormatLength&&i.JPEGInterchangeFormatLength.value){t.type="image/jpeg";var r=n+t.JPEGInterchangeFormat.value;t.image=e.buffer.slice(r,r+t.JPEGInterchangeFormatLength.value),d(t,"base64",(function(){return p(this.image)}))}var i;return t}},Zi={get:function(e,t){var n={},r=0,i=Qi(e,"exif","FocalLength",t),o=Qi(e,"exif","FocalPlaneXResolution",t),a=Qi(e,"exif","FocalPlaneYResolution",t),u=Qi(e,"exif","FocalPlaneResolutionUnit",t),f=Qi(e,"file","Image Width",t),c=Qi(e,"file","Image Height",t),s=Qi(e,"exif","FocalLengthIn35mmFilm",t)||function(e,t,n,r,i,o){if(e&&t&&n&&r&&i&&o)try{var a;switch(n){case 2:a=25.4;break;case 3:a=10;break;case 4:a=1;break;default:return}var u=e[0]/e[1]*a,f=i/(t[0]/t[1]*a),c=Math.sqrt(Math.pow(r/u,2)+Math.pow(f,2));return o[0]/o[1]*(43.27/c)}catch(e){}}(o,a,u,f,c,i);s&&(n.FocalLength35efl={value:s,description:it.FocalLengthIn35mmFilm(s)},r=1);var l=function(e,t){if(e&&t)try{var n=t/(e[0]/e[1]);return{value:n,description:n.toFixed(1)}}catch(e){}}(i,s);l&&(n.ScaleFactorTo35mmEquivalent=l,r=1);var d=function(e){if(e)try{var t=2*Math.atan(36/(2*e))*(180/Math.PI);return{value:t,description:t.toFixed(1)+" deg"}}catch(e){}}(s);if(d&&(n.FieldOfView=d,r=1),r)return n}};function Qi(e,t,n,r){return r&&e[t]&&e[t][n]?e[t][n].value:!r&&e[n]?e[n].value:void 0}function eo(e){for(var t=e.mergeSteps,n=e.deferredResults,r=e.parsedGroups,i=e.expanded,o=e.tagFilter,a=e.dataView,u=e.tiffHeaderOffset,f=e.fileType,c=e.pngTextChunks,s=e.pngTextIsAsync,l=e.thumbnailIfdTags,d=e.deps,p={},g=0;g<t.length;g++)p=to({step:t[g],deferredResults:n,parsedGroups:r,expanded:i,tagFilter:o,dataView:a,tiffHeaderOffset:u,fileType:f,thumbnailIfdTags:l,tags:p,deps:d});return i&&s&&o.shouldReturnGroup("png")&&p.png&&(p.pngText=d.objectAssign({},p.png)),i&&o.shouldReturnGroup("png")&&d.hasPngTextData(c)&&p.png&&!p.pngText&&(p.pngText=d.objectAssign({},p.png)),p}function to(e){var t=e.step,n=e.deferredResults,r=e.parsedGroups,i=e.expanded,o=e.tagFilter,a=e.dataView,u=e.tiffHeaderOffset,f=e.fileType,c=e.thumbnailIfdTags,s=e.tags,l=e.deps;if("mergeGroupAssign"===t.type){var d=l.filterTagsForReturn(t.groupKey,t.parsedTags,o);return no(s,t.groupKey,d,i,l)}if("mergeGroupMerge"===t.type){var p=l.filterTagsForReturn(t.groupKey,t.parsedTags,o);return function(e,t,n,r,i){return r?(e[t]?e[t]=i.objectAssign({},e[t],n):e[t]=n,e):i.objectAssign({},e,n)}(s,t.groupKey,p,i,l)}if("mergeXmpGroupAssign"===t.type){var g=l.filterTagsForReturn("xmp",t.parsedTags,o);if(i)return s.xmp=g,s;var m=l.objectAssign({},g);return delete m._raw,l.objectAssign({},s,m)}if("mergeIccDeferred"===t.type){var h=n[t.deferredKey],v=l.filterTagsForParse("icc",h,o);return r.icc=v,o.shouldReturnGroup("icc")?no(s,"icc",l.filterTagsForReturn("icc",v,o),i,l):s}if("mergePngFile"===t.type){var y=l.filterTagsForReturn("png",t.parsedTags,o);return o.shouldReturnGroup("png")?i?(s.png=s.png?l.objectAssign({},s.png,y):y,s.pngFile=y,s):l.objectAssign({},s,y):s}if("mergePngChunk"===t.type){var b=l.filterTagsForReturn("png",t.parsedTags,o);return o.shouldReturnGroup("png")?i?(s.png=s.png?l.objectAssign({},s.png,b):b,s):l.objectAssign({},s,b):s}if("processPngTextReadTags"===t.type)return ro({readTags:t.readTags,parsedGroups:r,expanded:i,tagFilter:o,tags:s,deps:l});if("processPngTextReadTagsDeferredList"===t.type){for(var S=n[t.deferredKey]||[],I=0;I<S.length;I++)s=ro({readTags:S[I],parsedGroups:r,expanded:i,tagFilter:o,tags:s,deps:l});return s}if("gps"===t.type){if(i&&o.shouldReturnGroup("gps")&&r.exif){var P=l.getGpsGroupFromExifTags(r.exif);if(P){var A=l.filterTagsForReturn("gps",P,o);s.gps=A}}return s}if("composite"===t.type){if(!o.shouldReturnGroup("composite"))return s;var C=s,T=i;o.isActive&&(C={exif:r.exif,file:r.file},T=1);var x=l.Composite.get(C,T);return x?no(s,"composite",l.filterTagsForReturn("composite",x,o),i,l):s}if("thumbnail"===t.type){if(!o.shouldReturnGroup("thumbnail")||!o.shouldReturnTag("thumbnail","Thumbnail"))return delete s.Thumbnail,s;if(!c)return s;var U=c?l.filterTagsForParse("thumbnail",c,o):void 0;U&&(r.thumbnail=U);var E=(l.Constants.USE_JPEG||l.Constants.USE_WEBP)&&l.Constants.USE_EXIF&&l.Constants.USE_THUMBNAIL&&l.Thumbnail.get(a,U,u);return E?s.Thumbnail=E:delete s.Thumbnail,s}return"fileType"===t.type?(f&&o.shouldReturnGroup("file")&&o.shouldReturnTag("file","FileType")&&(i?(s.file||(s.file={}),s.file.FileType=f):s.FileType=f),s):s}function no(e,t,n,r,i){return r?(e[t]=n,e):i.objectAssign({},e,n)}function ro(e){var t=e.readTags,n=e.parsedGroups,r=e.expanded,i=e.tagFilter,o=e.tags,a=e.deps,u=t.__exif,f=t.__iptc;if(delete t.__exif,delete t.__iptc,u){var c=a.filterTagsForParse("exif",u,i);if(n.exif=n.exif?a.objectAssign({},n.exif,c):c,i.shouldReturnGroup("exif")){var s=a.filterTagsForReturn("exif",c,i);r?o.exif=o.exif?a.objectAssign({},o.exif,s):s:o=a.objectAssign({},o,s)}}if(f){var l=a.filterTagsForParse("iptc",f,i);if(n.iptc=n.iptc?a.objectAssign({},n.iptc,l):l,i.shouldReturnGroup("iptc")){var d=a.filterTagsForReturn("iptc",l,i);r?o.iptc=o.iptc?a.objectAssign({},o.iptc,d):d:o=a.objectAssign({},o,d)}}if(i.shouldReturnGroup("png")){var p=a.filterTagsForParse("png",t,i),g=a.filterTagsForReturn("png",p,i);n.pngText=p,r?(o.png=o.png?a.objectAssign({},o.png,g):g,g&&Object.keys(g).length>0&&(o.pngText=o.pngText?a.objectAssign({},o.pngText,g):g)):o=a.objectAssign({},o,g)}return o}function io(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=Error().stack}io.prototype=Error();var oo={MetadataMissingError:io},ao={load:fo,loadView:so,errors:oo},uo=oo;function fo(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(e){return"string"==typeof e}(e)){if(i.async=1,"undefined"==typeof Promise)throw Error("Promise is required when async mode is enabled.");return function(e,t){return/^\w+:\/\//.test(e)?"undefined"!=typeof fetch?function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length,n={method:"GET"};return Number.isInteger(t)&&t>=0&&(n.headers={range:"bytes=0-".concat(t-1)}),fetch(e,n).then((function(e){return e.arrayBuffer()}))}(e,t):function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length;return new Promise((function(n,r){var i={};Number.isInteger(t)&&t>=0&&(i.headers={range:"bytes=0-".concat(t-1)});var o=function(e){return/^https:\/\//.test(e)?require("https").get:require("http").get}(e);o(e,i,(function(e){if(e.statusCode>=200&&e.statusCode<=299){var t=[];e.on("data",(function(e){return t.push(Buffer.from(e))})),e.on("error",(function(e){return r(e)})),e.on("end",(function(){return n(Buffer.concat(t))}))}else r("Could not fetch file: ".concat(e.statusCode," ").concat(e.statusMessage)),e.resume()})).on("error",(function(e){return r(e)}))}))}(e,t):function(e){return/^data:[^;,]*(;base64)?,/.test(e)}(e)?Promise.resolve(function(e){var t=e.substring(e.indexOf(",")+1);if(-1!==e.indexOf(";base64")){if("undefined"!=typeof atob)return Uint8Array.from(atob(t),(function(e){return e.charCodeAt(0)})).buffer;if("undefined"==typeof Buffer)return;return"undefined"!=typeof Buffer.from?Buffer.from(t,"base64"):new Buffer(t,"base64")}var n=decodeURIComponent(t);return"undefined"!=typeof Buffer?"undefined"!=typeof Buffer.from?Buffer.from(n):new Buffer(n):Uint8Array.from(n,(function(e){return e.charCodeAt(0)})).buffer}(e)):function(e){var t=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length;return new Promise((function(n,r){var i=function(){try{return require("fs")}catch(e){return}}();i.open(e,(function(o,a){o?r(o):i.stat(e,(function(o,u){if(o)r(o);else{var f=Math.min(u.size,void 0!==t?t:u.size),c=Buffer.alloc(f),s={buffer:c,length:f};i.read(a,s,(function(t){t?r(t):i.close(a,(function(t){t&&console.warn("Could not close file ".concat(e,":"),t),n(c)}))}))}}))}))}))}(e,t)}(e,i).then((function(e){return co(e,i)}))}if(function(e){return"undefined"!=typeof File&&e instanceof File}(e)){if(i.async=1,"undefined"==typeof Promise)throw Error("Promise is required when async mode is enabled.");return(t=e,n=i,r=n.length,new Promise((function(e,n){var i=new FileReader;i.onload=function(t){return e(t.target.result)},i.onerror=function(){return n(i.error)},Number.isInteger(r)&&r>=0&&void 0!==t.slice?i.readAsArrayBuffer(t.slice(0,r)):i.readAsArrayBuffer(t)}))).then((function(e){return co(e,i)}))}return co(e,i)}function co(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(e){return 0}}(e)&&(e=new Uint8Array(e).buffer),so(function(e){try{return new DataView(e)}catch(t){return new i(e)}}(e),t)}function so(e){var t,n,r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0,async:0,computed:0,includeUnknown:0,domParser:void 0,includeTags:void 0,excludeTags:void 0},o=i.expanded,a=void 0===o?0:o,u=i.async,f=void 0===u?0:u,c=i.computed,d=void 0===c?0:c,p=i.includeUnknown,g=void 0===p?0:p,m=i.domParser,h=void 0===m?void 0:m,y=i.includeTags,b=void 0===y?void 0:y,S=i.excludeTags,I=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.includeTags,n=e.excludeTags,r=!!t,i=!!n,o=r||i,a=Object.create(null),u=Object.create(null),f=Object.create(null);if(!o)return Mt();var c=r&&(Lt(t,"iptc")||Lt(t,"xmp")||Lt(t,"icc")||Lt(t,"photoshop")||Lt(t,"makerNotes")||Lt(t,"thumbnail")||Lt(t,"gps")||Lt(t,"composite")),s=r&&Lt(t,"composite"),l=Object.create(null);r&&(l=function(e){var t=function(e){var t=Object.create(null);if(!e)return t;for(var n in Array.isArray(e.exif)&&e.exif.length>0&&(t[wt.exifIfdPointer]=1,function(e,t){for(var n=0;n<t.length;n++){var r=t[n];if("string"==typeof r){var i=r.toLowerCase();0===i.indexOf("gps")&&(e[wt.gpsInfoIfdPointer]=1),0!==i.indexOf("interoperability")&&0!==i.indexOf("relatedimage")||(e[wt.interoperabilityIfdPointer]=1)}}}(t,e.exif)),Ft)if(Rt(e[n])){for(var r=Ft[n],i=0;i<r.length;i++)t[r[i]]=1;t[wt.exifIfdPointer]=1}return Rt(e.gps)&&(t[wt.gpsInfoIfdPointer]=1,t[wt.exifIfdPointer]=1),t}(e);return Lt(e,"composite")&&function(e,t){for(var n=0;n<t.length;n++)e[t[n]]=1}(t,Ot.exif),t}(t));var d,p=Object.create(null);for(var g in r&&s&&(p=function(e){for(var t=Object.create(null),n=0;n<e.length;n++)t[e[n].toLowerCase()]=1;return t}(Ot.file)),Et){var m=r&&Object.prototype.hasOwnProperty.call(t,g),h=void 0;i&&Object.prototype.hasOwnProperty.call(n,g)&&!m&&(h=n[g]);var v=Dt({groupKey:g,includeValue:m?t[g]:void 0,excludeValue:h,extraIncludeNames:Object.create(null)});a[g]=r?m:1,m&&(d=t[g],Array.isArray(d)&&0===d.length)&&(a[g]=0),v.excludeAll&&(a[g]=0),u[g]=v;var y=Dt({groupKey:g,includeValue:Gt({groupKey:g,hasIncludeTags:r,hasIncludeEntry:m,includeTags:t,shouldParseExif:c,shouldParseFile:s}),excludeValue:h,extraIncludeNames:kt({groupKey:g,hasIncludeTags:r,hasIncludeEntry:m,shouldParseExif:c,shouldParseFile:s,exifIncludeDependencies:l,fileIncludeDependencies:p})});f[g]=y}return{isActive:o,shouldReturnGroup:b,shouldParseGroup:S,shouldReturnTag:function(e,t,n){return Et[e]?b(e)?_t(u[e],t,n):0:1},shouldParseTag:function(e,t,n){return Et[e]?S(e)?_t(f[e],t,n):0:1}};function b(e){return Et[e]?!!a[e]:1}function S(e){return Et[e]?b(e)?1:"exif"===e?c:"file"===e?s:0:1}}({includeTags:b,excludeTags:void 0===S?void 0:S}),P=Object.create(null),A=[],C=Object.create(null),T=[],x=0,U=void 0,E=void 0,w=nt.parseAppMarkers(e,f),F=w.fileType,O=w.fileDataOffset,R=w.jfifDataOffset,M=w.tiffHeaderOffset,N=w.iptcDataOffset,G=w.xmpChunks,k=w.iccChunks,L=w.mpfDataOffset,D=w.pngHeaderOffset,_=w.pngTextChunks,j=w.pngChunkOffsets,B=w.vp8xChunkOffset,z=w.gifHeaderOffset,V=function(e){var t=e.fileDataOffset,n=e.jfifDataOffset,r=e.tiffHeaderOffset,i=e.iptcDataOffset,o=e.xmpChunks,a=e.iccChunks,u=e.mpfDataOffset,f=e.pngHeaderOffset,c=e.pngTextChunks,s=e.pngChunkOffsets,l=e.vp8xChunkOffset,d=e.gifHeaderOffset;return!!e.fileType||v.USE_JPEG&&v.USE_FILE&&ho(t)||v.USE_JPEG&&v.USE_JFIF&&vo(n)||v.USE_EXIF&&yo(r)||v.USE_JPEG&&v.USE_IPTC&&bo(i)||v.USE_XMP&&So(o)||(v.USE_JPEG||v.USE_WEBP)&&v.USE_ICC&&Io(a)||v.USE_MPF&&Po(u)||v.USE_PNG&&v.USE_PNG_FILE&&Ao(f)||v.USE_PNG&&Co(c)||v.USE_PNG&&To(s)||v.USE_WEBP&&xo(l)||v.USE_GIF&&Uo(d)}({fileType:F,fileDataOffset:O,jfifDataOffset:R,tiffHeaderOffset:M,iptcDataOffset:N,xmpChunks:G,iccChunks:k,mpfDataOffset:L,pngHeaderOffset:D,pngTextChunks:_,pngChunkOffsets:j,vp8xChunkOffset:B,gifHeaderOffset:z});if(v.USE_JPEG&&v.USE_FILE&&ho(O)&&I.shouldParseGroup("file")&&(!(r=b)||1==r.composite||Array.isArray(r.composite)&&r.composite.length>0||!r.file||1==r.file||!Array.isArray(r.file)||1!==r.file.length||"FileType"!==r.file[0])){var H=lo("file",cn.read(e,O),I);P.file=H,I.shouldReturnGroup("file")&&A.push({type:"mergeGroupAssign",groupKey:"file",parsedTags:H})}if(v.USE_JPEG&&v.USE_JFIF&&vo(R)&&I.shouldParseGroup("jfif")){var W=lo("jfif",hn.read(e,R),I);P.jfif=W,I.shouldReturnGroup("jfif")&&A.push({type:"mergeGroupAssign",groupKey:"jfif",parsedTags:W})}if(v.USE_EXIF&&yo(M)&&I.shouldParseGroup("exif")){var X=$t.read(e,M,g,d,I),K=X.tags,J=X.byteOrder;K.Thumbnail&&(U=K.Thumbnail,delete K.Thumbnail);var Y=lo("exif",K,I);if(P.exif=Y,v.USE_TIFF&&v.USE_IPTC&&Y["IPTC-NAA"]&&!bo(N)&&I.shouldParseGroup("iptc")){var q=lo("iptc",En.read(Y["IPTC-NAA"].value,0,g,I),I);P.iptc=q,I.shouldReturnGroup("iptc")&&A.push({type:"mergeGroupAssign",groupKey:"iptc",parsedTags:q})}if(v.USE_TIFF&&v.USE_XMP&&Y.ApplicationNotes&&!So(G)&&I.shouldParseGroup("xmp")){var $=lo("xmp",Jn.read(s(Y.ApplicationNotes.value),void 0,h),I);if(P.xmp=$,I.shouldReturnGroup("xmp")){var Z={type:"mergeXmpGroupAssign",parsedTags:$};a?A.push(Z):E=Z}}if(v.USE_PHOTOSHOP&&Y.ImageSourceData&&Y.PhotoshopSettings&&I.shouldParseGroup("photoshop")){var Q=lo("photoshop",Fr.read(Y.PhotoshopSettings.value,g,I),I);P.photoshop=Q,I.shouldReturnGroup("photoshop")&&A.push({type:"mergeGroupAssign",groupKey:"photoshop",parsedTags:Q})}if(v.USE_TIFF&&v.USE_ICC&&Y.ICC_Profile&&!Io(k)&&I.shouldParseGroup("icc")){var ee=lo("icc",jr.read(Y.ICC_Profile.value,[{offset:0,length:Y.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]),I);P.icc=ee,I.shouldReturnGroup("icc")&&A.push({type:"mergeGroupAssign",groupKey:"icc",parsedTags:ee})}if(v.USE_MAKER_NOTES&&Y.MakerNote&&I.shouldParseGroup("makerNotes"))if((t=Y).Make&&t.Make.value&&Array.isArray(t.Make.value)&&"Canon"===t.Make.value[0]&&t.MakerNote&&t.MakerNote.__offset){var te=Qr.read(e,M,Y.MakerNote.__offset,J,g,d,I);P.makerNotes=te,I.shouldReturnGroup("makerNotes")&&A.push({type:"mergeGroupAssign",groupKey:"makerNotes",parsedTags:te})}else if(function(e){return e.MakerNote.value.length>7&&"PENTAX "===s(e.MakerNote.value.slice(0,7))&&e.MakerNote.__offset}(Y)){var ne=ni.read(e,M,Y.MakerNote.__offset,g,d,I);P.makerNotes=ne,I.shouldReturnGroup("makerNotes")&&A.push({type:"mergeGroupAssign",groupKey:"makerNotes",parsedTags:ne})}Y.MakerNote&&delete Y.MakerNote.__offset,I.shouldReturnGroup("exif")&&A.push({type:"mergeGroupAssign",groupKey:"exif",parsedTags:Y}),!a&&E&&(A.push(E),E=void 0)}if(v.USE_JPEG&&v.USE_IPTC&&bo(N)&&I.shouldParseGroup("iptc")){var re=lo("iptc",En.read(e,N,g,I),I);P.iptc=re,I.shouldReturnGroup("iptc")&&A.push({type:"mergeGroupAssign",groupKey:"iptc",parsedTags:re})}if(v.USE_XMP&&So(G)&&I.shouldParseGroup("xmp")){var ie=lo("xmp",Jn.read(e,G,h),I);P.xmp=ie,I.shouldReturnGroup("xmp")&&A.push({type:"mergeXmpGroupAssign",parsedTags:ie})}if((v.USE_JPEG||v.USE_WEBP)&&v.USE_ICC&&Io(k)&&I.shouldParseGroup("icc")){var oe=jr.read(e,k,f);if((n=oe)&&"function"==typeof n.then){if(!f)throw Error("Promise is required when async mode is enabled.");T.push(oe.then((function(e){C.iccApp=e}))),A.push({type:"mergeIccDeferred",deferredKey:"iccApp"})}else{var ae=lo("icc",oe,I);P.icc=ae,I.shouldReturnGroup("icc")&&A.push({type:"mergeGroupAssign",groupKey:"icc",parsedTags:ae})}}if(v.USE_MPF&&Po(L)&&I.shouldParseGroup("mpf")){var ue=lo("mpf",tn.read(e,L,g,d,I),I);P.mpf=ue,I.shouldReturnGroup("mpf")&&A.push({type:"mergeGroupAssign",groupKey:"mpf",parsedTags:ue})}if(v.USE_PNG&&v.USE_PNG_FILE&&Ao(D)&&I.shouldParseGroup("png")){var fe=lo("png",oi.read(e,D),I);P.pngFile=fe,I.shouldReturnGroup("png")&&A.push({type:"mergePngFile",parsedTags:fe})}if(v.USE_PNG&&Co(_)&&(I.shouldParseGroup("png")||I.shouldParseGroup("exif")||I.shouldParseGroup("iptc"))){var ce=gi.read(e,_,f,g,d,I),se=ce.readTags,le=ce.readTagsPromise;x=!!le,A.push({type:"processPngTextReadTags",readTags:se}),le&&(T.push(le.then((function(e){C.pngTextTagList=e}))),A.push({type:"processPngTextReadTagsDeferredList",deferredKey:"pngTextTagList"}))}if(v.USE_PNG&&To(j)&&I.shouldParseGroup("png")){var de=lo("png",Ri.read(e,j),I);P.pngChunk=de,I.shouldReturnGroup("png")&&A.push({type:"mergePngChunk",parsedTags:de})}if(v.USE_WEBP&&xo(B)&&I.shouldParseGroup("riff")){var pe=lo("riff",_i.read(e,B),I);P.riff=pe,I.shouldReturnGroup("riff")&&A.push({type:"mergeGroupMerge",groupKey:"riff",parsedTags:pe})}if(v.USE_GIF&&Uo(z)&&I.shouldParseGroup("gif")){var ge=lo("gif",Vi.read(e,z),I);P.gif=ge,I.shouldReturnGroup("gif")&&A.push({type:"mergeGroupMerge",groupKey:"gif",parsedTags:ge})}if(A.push({type:"gps"}),A.push({type:"composite"}),A.push({type:"thumbnail"}),A.push({type:"fileType"}),!V)throw new oo.MetadataMissingError;var me={objectAssign:l,hasPngTextData:Co,filterTagsForParse:lo,filterTagsForReturn:po,getGpsGroupFromExifTags:mo,Constants:v,Composite:Zi,Thumbnail:$i};if(f){if("undefined"==typeof Promise)throw Error("Promise is required when async mode is enabled.");return Promise.all(T).then((function(){return eo({mergeSteps:A,deferredResults:C,parsedGroups:P,expanded:a,tagFilter:I,dataView:e,tiffHeaderOffset:M,fileType:F,pngTextChunks:_,pngTextIsAsync:x,thumbnailIfdTags:U,deps:me})}))}return eo({mergeSteps:A,deferredResults:C,parsedGroups:P,expanded:a,tagFilter:I,dataView:e,tiffHeaderOffset:M,fileType:F,pngTextChunks:_,pngTextIsAsync:x,thumbnailIfdTags:U,deps:me})}function lo(e,t,n){return n.isActive?go(e,t,n.shouldParseTag):t}function po(e,t,n){return n.isActive?go(e,t,n.shouldReturnTag):t}function go(e,t,n){if(!t)return t;var r={};for(var i in t){var o=t[i];n(e,i,a(o))&&(r[i]=o)}return r;function a(e){if(e){if(Array.isArray(e)){if(0===e.length)return;return e[0].id}return e.id}}}function mo(e){var t=void 0;if(e.GPSLatitude&&e.GPSLatitudeRef){t=t||{};try{t.Latitude=S(e.GPSLatitude.value),"S"===e.GPSLatitudeRef.value.join("")&&(t.Latitude=-t.Latitude)}catch(e){}}if(e.GPSLongitude&&e.GPSLongitudeRef){t=t||{};try{t.Longitude=S(e.GPSLongitude.value),"W"===e.GPSLongitudeRef.value.join("")&&(t.Longitude=-t.Longitude)}catch(e){}}if(e.GPSAltitude&&e.GPSAltitudeRef){t=t||{};try{t.Altitude=e.GPSAltitude.value[0]/e.GPSAltitude.value[1],1===e.GPSAltitudeRef.value&&(t.Altitude=-t.Altitude)}catch(e){}}if(t)return t}function ho(e){return void 0!==e}function vo(e){return void 0!==e}function yo(e){return void 0!==e}function bo(e){return void 0!==e}function So(e){return Array.isArray(e)&&e.length>0}function Io(e){return Array.isArray(e)&&e.length>0}function Po(e){return void 0!==e}function Ao(e){return void 0!==e}function Co(e){return Array.isArray(e)&&e.length>0}function To(e){return void 0!==e}function xo(e){return void 0!==e}function Uo(e){return void 0!==e}return t}()}));
2
2
  //# sourceMappingURL=exif-reader.js.map