PageSourceSearch

https://tools.fthux.com/_nuxt/B4sMj4TV.js

js fthux.com collected 2026-09-24 14:13:35 UTC 120,625 bytes, 3 lines download raw bytes

1import{W as gi,d as mi,u as yi,b as Si,c as Ci,e as xi,f as bi,r as H,g as M,o as F,h as st,i as S,q as vi,t as U,l as W,y as je,w as Be,z as Ot,k as Ue,F as ot,A as lt,B as Pi,H as wi,G as ki,s as Ii,M as Di}from"./DzfUrCz9.js";import{P as Ai}from"./aBXGcoLX.js";var Ze=typeof self<"u"?self:global;const Ve=typeof navigator<"u",Ti=Ve&&typeof HTMLImageElement>"u",Je=!(typeof global>"u"||typeof process>"u"||!process.versions||!process.versions.node),et=Ze.Buffer,ze=Ze.BigInt,tt=!!et,Ri=n=>n;function Ye(n,e=Ri){if(Je)try{return typeof require=="function"?Promise.resolve(e(require(n))):import(n).then(e)}catch{console.warn(`Couldn't load ${n}`)}}let xt=Ze.fetch;const Li=n=>xt=n;if(!Ze.fetch){const n=Ye("http",(i=>i)),e=Ye("https",(i=>i)),t=(i,{headers:a}={})=>new Promise((async(r,h)=>{let{port:c,hostname:m,pathname:x,protocol:P,search:A}=new URL(i);const L={method:"GET",hostname:m,path:encodeURI(x)+A,headers:a};c!==""&&(L.port=Number(c));const C=(P==="https:"?await e:await n).request(L,(k=>{if(k.statusCode===301||k.statusCode===302){let B=new URL(k.headers.location,i).toString();return t(B,{headers:a}).then(r).catch(h)}r({status:k.statusCode,arrayBuffer:()=>new Promise((B=>{let re=[];k.on("data",(Ie=>re.push(Ie))),k.on("end",(()=>B(Buffer.concat(re))))}))})}));C.on("error",h),C.end()}));Li(t)}function b(n,e,t){return e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}const $e=n=>Qt(n)?void 0:n,Oi=n=>n!==void 0;function Qt(n){return n===void 0||(n instanceof Map?n.size===0:Object.values(n).filter(Oi).length===0)}function j(n){let e=new Error(n);throw delete e.stack,e}function Se(n){return(n=(function(e){for(;e.endsWith("\0");)e=e.slice(0,-1);return e})(n).trim())===""?void 0:n}function gt(n){let e=(function(t){let i=0;return t.ifd0.enabled&&(i+=1024),t.exif.enabled&&(i+=2048),t.makerNote&&(i+=2048),t.userComment&&(i+=1024),t.gps.enabled&&(i+=512),t.interop.enabled&&(i+=100),t.ifd1.enabled&&(i+=1024),i+2048})(n);return n.jfif.enabled&&(e+=50),n.xmp.enabled&&(e+=2e4),n.iptc.enabled&&(e+=14e3),n.icc.enabled&&(e+=6e3),e}const mt=n=>String.fromCharCode.apply(null,n),Mt=typeof TextDecoder<"u"?new TextDecoder("utf-8"):void 0;function Zt(n){return Mt?Mt.decode(n):tt?Buffer.from(n).toString("utf8"):decodeURIComponent(escape(mt(n)))}class Y{static from(e,t){return e instanceof this&&e.le===t?e:new Y(e,void 0,void 0,t)}constructor(e,t=0,i,a){if(typeof a=="boolean"&&(this.le=a),Array.isArray(e)&&(e=new Uint8Array(e)),e===0)this.byteOffset=0,this.byteLength=0;else if(e instanceof ArrayBuffer){i===void 0&&(i=e.byteLength-t);let r=new DataView(e,t,i);this._swapDataView(r)}else if(e instanceof Uint8Array||e instanceof DataView||e instanceof Y){i===void 0&&(i=e.byteLength-t),(t+=e.byteOffset)+i>e.byteOffset+e.byteLength&&j("Creating view outside of available memory in ArrayBuffer");let r=new DataView(e.buffer,t,i);this._swapDataView(r)}else if(typeof e=="number"){let r=new DataView(new ArrayBuffer(e));this._swapDataView(r)}else j("Invalid input argument for BufferView: "+e)}_swapArrayBuffer(e){this._swapDataView(new DataView(e))}_swapBuffer(e){this._swapDataView(new DataView(e.buffer,e.byteOffset,e.byteLength))}_swapDataView(e){this.dataView=e,this.buffer=e.buffer,this.byteOffset=e.byteOffset,this.byteLength=e.byteLength}_lengthToEnd(e){return this.byteLength-e}set(e,t,i=Y){return e instanceof DataView||e instanceof Y?e=new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e instanceof ArrayBuffer&&(e=new Uint8Array(e)),e instanceof Uint8Array||j("BufferView.set(): Invalid data argument."),this.toUint8().set(e,t),new i(this,t,e.byteLength)}subarray(e,t){return t=t||this._lengthToEnd(e),new Y(this,e,t)}toUint8(){return new Uint8Array(this.buffer,this.byteOffset,this.byteLength)}getUint8Array(e,t){return new Uint8Array(this.buffer,this.byteOffset+e,t)}getString(e=0,t=this.byteLength){return Zt(this.getUint8Array(e,t))}getLatin1String(e=0,t=this.byteLength){let i=this.getUint8Array(e,t);return mt(i)}getUnicodeString(e=0,t=this.byteLength){const i=[];for(let a=0;a<t&&e+a<this.byteLength;a+=2)i.push(this.getUint16(e+a));return mt(i)}getInt8(e){return this.dataView.getInt8(e)}getUint8(e){return this.dataView.getUint8(e)}getInt16(e,t=this.le){return this.dataView.getInt16(e,t)}getInt32(e,t=this.le){return this.dataView.getInt32(e,t)}getUint16(e,t=this.le){return this.dataView.getUint16(e,t)}getUint32(e,t=this.le){return this.dataView.getUint32(e,t)}getFloat32(e,t=this.le){return this.dataView.getFloat32(e,t)}getFloat64(e,t=this.le){return this.dataView.getFloat64(e,t)}
1getFloat(e,t=this.le){return this.dataView.getFloat32(e,t)}getDouble(e,t=this.le){return this.dataView.getFloat64(e,t)}getUintBytes(e,t,i){switch(t){case 1:return this.getUint8(e,i);case 2:return this.getUint16(e,i);case 4:return this.getUint32(e,i);case 8:return this.getUint64&&this.getUint64(e,i)}}getUint(e,t,i){switch(t){case 8:return this.getUint8(e,i);case 16:return this.getUint16(e,i);case 32:return this.getUint32(e,i);case 64:return this.getUint64&&this.getUint64(e,i)}}toString(e){return this.dataView.toString(e,this.constructor.name)}ensureChunk(){}}function yt(n,e){j(`${n} '${e}' was not loaded, try using full build of exifr.`)}class bt extends Map{constructor(e){super(),this.kind=e}get(e,t){return this.has(e)||yt(this.kind,e),t&&(e in t||(function(i,a){j(`Unknown ${i} '${a}'.`)})(this.kind,e),t[e].enabled||yt(this.kind,e)),super.get(e)}keyList(){return Array.from(this.keys())}}var ne=new bt("file parser"),V=new bt("segment parser"),ae=new bt("file reader");function Mi(n,e){return typeof n=="string"?Ft(n,e):Ve&&!Ti&&n instanceof HTMLImageElement?Ft(n.src,e):n instanceof Uint8Array||n instanceof ArrayBuffer||n instanceof DataView?new Y(n):Ve&&n instanceof Blob?St(n,e,"blob",ve):void j("Invalid input argument")}function Ft(n,e){return(t=n).startsWith("data:")||t.length>1e4?Ct(n,e,"base64"):Je&&n.includes("://")?St(n,e,"url",be):Je?Ct(n,e,"fs"):Ve?St(n,e,"url",be):void j("Invalid input argument");var t}async function St(n,e,t,i){return ae.has(t)?Ct(n,e,t):i?(async function(a,r){let h=await r(a);return new Y(h)})(n,i):void j(`Parser ${t} is not loaded`)}async function Ct(n,e,t){let i=new(ae.get(t))(n,e);return await i.read(),i}const be=n=>xt(n).then((e=>e.arrayBuffer())),ve=n=>new Promise(((e,t)=>{let i=new FileReader;i.onloadend=()=>e(i.result||new ArrayBuffer),i.onerror=t,i.readAsArrayBuffer(n)}));class Fi extends Map{get tagKeys(){return this.allKeys||(this.allKeys=Array.from(this.keys())),this.allKeys}get tagValues(){return this.allValues||(this.allValues=Array.from(this.values())),this.allValues}}function _(n,e,t){let i=new Fi;for(let[a,r]of t)i.set(a,r);if(Array.isArray(e))for(let a of e)n.set(a,i);else n.set(e,i);return i}function Pe(n,e,t){let i,a=n.get(e);for(i of t)a.set(i[0],i[1])}const z=new Map,te=new Map,pe=new Map,ue=["chunked","firstChunkSize","firstChunkSizeNode","firstChunkSizeBrowser","chunkSize","chunkLimit"],Ae=["jfif","xmp","icc","iptc","ihdr"],we=["tiff",...Ae],G=["ifd0","ifd1","exif","gps","interop"],ce=[...we,...G],fe=["makerNote","userComment"],Te=["translateKeys","translateValues","reviveValues","multiSegment"],de=[...Te,"sanitize","mergeOutput","silentErrors"];class ei{get translate(){return this.translateKeys||this.translateValues||this.reviveValues}}class Ge extends ei{get needed(){return this.enabled||this.deps.size>0}constructor(e,t,i,a){if(super(),b(this,"enabled",!1),b(this,"skip",new Set),b(this,"pick",
1new Set),b(this,"deps",new Set),b(this,"translateKeys",!1),b(this,"translateValues",!1),b(this,"reviveValues",!1),this.key=e,this.enabled=t,this.parse=this.enabled,this.applyInheritables(a),this.canBeFiltered=G.includes(e),this.canBeFiltered&&(this.dict=z.get(e)),i!==void 0)if(Array.isArray(i))this.parse=this.enabled=!0,this.canBeFiltered&&i.length>0&&this.translateTagSet(i,this.pick);else if(typeof i=="object"){if(this.enabled=!0,this.parse=i.parse!==!1,this.canBeFiltered){let{pick:r,skip:h}=i;r&&r.length>0&&this.translateTagSet(r,this.pick),h&&h.length>0&&this.translateTagSet(h,this.skip)}this.applyInheritables(i)}else i===!0||i===!1?this.parse=this.enabled=i:j(`Invalid options argument: ${i}`)}applyInheritables(e){let t,i;for(t of Te)i=e[t],i!==void 0&&(this[t]=i)}translateTagSet(e,t){if(this.dict){let i,a,{tagKeys:r,tagValues:h}=this.dict;for(i of e)typeof i=="string"?(a=h.indexOf(i),a===-1&&(a=r.indexOf(Number(i))),a!==-1&&t.add(Number(r[a]))):t.add(i)}else for(let i of e)t.add(i)}finalizeFilters(){!this.enabled&&this.deps.size>0?(this.enabled=!0,qe(this.pick,this.deps)):this.enabled&&this.pick.size>0&&qe(this.pick,this.deps)}}var X={jfif:!1,tiff:!0,xmp:!1,icc:!1,iptc:!1,ifd0:!0,ifd1:!1,exif:!0,gps:!0,interop:!1,ihdr:void 0,makerNote:!1,userComment:!1,multiSegment:!1,skip:[],pick:[],translateKeys:!0,translateValues:!0,reviveValues:!0,sanitize:!0,mergeOutput:!0,silentErrors:!0,chunked:!0,firstChunkSize:void 0,firstChunkSizeNode:512,firstChunkSizeBrowser:65536,chunkSize:65536,chunkLimit:5},Et=new Map;class ke extends ei{static useCached(e){let t=Et.get(e);return t!==void 0||(t=new this(e),Et.set(e,t)),t}constructor(e){super(),e===!0?this.setupFromTrue():e===void 0?this.setupFromUndefined():Array.isArray(e)?this.setupFromArray(e):typeof e=="object"?this.setupFromObject(e):j(`Invalid options argument ${e}`),this.firstChunkSize===void 0&&(this.firstChunkSize=Ve?this.firstChunkSizeBrowser:this.firstChunkSizeNode),this.mergeOutput&&(this.ifd1.enabled=!1),this.filterNestedSegmentTags(),this.traverseTiffDependencyTree(),this.checkLoadedPlugins()}setupFromUndefined(){let e;for(e of ue)this[e]=X[e];for(e of de)this[e]=X[e];for(e of fe)this[e]=X[e];for(e of ce)this[e]=new Ge(e,X[e],void 0,this)}setupFromTrue(){let e;for(e of ue)this[e]=X[e];for(e of de)this[e]=X[e];for(e of fe)this[e]=!0;for(e of ce)this[e]=new Ge(e,!0,void 0,this)}setupFromArray(e){let t;for(t of ue)this[t]=X[t];for(t of de)this[t]=X[t];for(t of fe)this[t]=X[t];for(t of ce)this[t]=new Ge(t,!1,void 0,this);this.setupGlobalFilters(e,void 0,G)}setupFromObject(e){let t;for(t of(G.ifd0=G.ifd0||G.image,G.ifd1=G.ifd1||G.thumbnail,Object.assign(this,e),ue))this[t]=ht(e[t],X[t]);for(t of de)this[t]=ht(e[t],X[t]);for(t of fe)this[t]=ht(e[t],X[t]);for(t of we)this[t]=new Ge(t,X[t],e[t],this);for(t of G)this[t]=new Ge(t,X[t],e[t],this.tiff);this.setupGlobalFilters(e.pick,e.skip,G,ce),e.tiff===!0?this.batchEnableWithBool(G,!0):e.tiff===!1?this.batchEnableWithUserValue(G,e):Array.isArray(e.tiff)?this.setupGlobalFilters(e.tiff,void 0,G):typeof e.tiff=="object"&&this.setupGlobalFilters(e.tiff.pick,e.tiff.skip,G)}batchEnableWithBool(e,t){for(let i of e)this[i].enabled=t}batchEnableWithUserValue(e,t){for(let i of e){let a=t[i];this[i].enabled=a!==!1&&a!==void 0}}setupGlobalFilters(e,t,i,a=i){if(e&&e.length){for(let h of a)this[h].enabled=!1;let r=Bt(e,i);for(let[h,c]of r)qe(this[h].pick,c),this[h].enabled=!0}else if(t&&t.length){let r=Bt(t,i);for(let[h,c]of r)qe(this[h].skip,c)}}filterNestedSegmentTags(){let{ifd0:e,exif:t,xmp:i,iptc:a,icc:r}=this;this.makerNote?t.deps.add(37500):t.skip.add(37500),this.userComment?t.deps.add(37510):t.skip.add(37510),i.enabled||e.skip.add(700),a.enabled||e.skip.add(33723),r.enabled||e.skip.add(34675)}traverseTiffDependencyTree(){let{ifd0:e,exif:t,gps:i,interop:a}=this;a.needed&&(t.deps.add(40965),e.deps.add(40965)),t.needed&&e.deps.add(34665),i.needed&&e.deps.add(34853),this.tiff.enabled=G.some((r=>this[r].enabled===!0))||this.makerNote||this.userComment;for(let r of G)this[r].finalizeFilters()}get onlyTiff(){return!Ae.map((e=>this[e].enabled)).some((e=>e===!0))&&this.tiff.enabled}checkLoadedPlugins(){for(let e of we)this[e].enabled&&!V.has(e)&&yt("segment parser",e)}}function Bt(n,e){let t,i,a,r,h=[];for(a of e){for(r of(t=z.get(a),i=[],t))(n.includes(r[0])||n.includes(r[1])
1)&&i.push(r[0]);i.length&&h.push([a,i])}return h}function ht(n,e){return n!==void 0?n:e!==void 0?e:void 0}function qe(n,e){for(let t of e)n.add(t)}b(ke,"default",X);class ge{constructor(e){b(this,"parsers",{}),b(this,"output",{}),b(this,"errors",[]),b(this,"pushToErrors",(t=>this.errors.push(t))),this.options=ke.useCached(e)}async read(e){this.file=await Mi(e,this.options)}setup(){if(this.fileParser)return;let{file:e}=this,t=e.getUint16(0);for(let[i,a]of ne)if(a.canHandle(e,t))return this.fileParser=new a(this.options,this.file,this.parsers),e[i]=!0;this.file.close&&this.file.close(),j("Unknown file format")}async parse(){let{output:e,errors:t}=this;return this.setup(),this.options.silentErrors?(await this.executeParsers().catch(this.pushToErrors),t.push(...this.fileParser.errors)):await this.executeParsers(),this.file.close&&this.file.close(),this.options.silentErrors&&t.length>0&&(e.errors=t),$e(e)}async executeParsers(){let{output:e}=this;await this.fileParser.parse();let t=Object.values(this.parsers).map((async i=>{let a=await i.parse();i.assignToOutput(e,a)}));this.options.silentErrors&&(t=t.map((i=>i.catch(this.pushToErrors)))),await Promise.all(t)}async extractThumbnail(){this.setup();let{options:e,file:t}=this,i=V.get("tiff",e);var a;if(t.tiff?a={start:0,type:"tiff"}:t.jpeg&&(a=await this.fileParser.getOrFindSegment("tiff")),a===void 0)return;let r=await this.fileParser.ensureSegmentChunk(a),h=this.parsers.tiff=new i(r,e,t),c=await h.extractThumbnail();return t.close&&t.close(),c}}async function it(n,e){let t=new ge(e);return await t.read(n),t.parse()}var Ei=Object.freeze({__proto__:null,parse:it,Exifr:ge,fileParsers:ne,segmentParsers:V,fileReaders:ae,tagKeys:z,tagValues:te,tagRevivers:pe,createDictionary:_,extendDictionary:Pe,fetchUrlAsArrayBuffer:be,readBlobAsArrayBuffer:ve,chunkedProps:ue,otherSegments:Ae,segments:we,tiffBlocks:G,segmentsAndBlocks:ce,tiffExtractables:fe,inheritables:Te,allFormatters:de,Options:ke});class nt{constructor(e,t,i){b(this,"errors",[]),b(this,"ensureSegmentChunk",(async a=>{let r=a.start,h=a.size||65536;if(this.file.chunked)if(this.file.available(r,h))a.chunk=this.file.subarray(r,h);else try{a.chunk=await this.file.readChunk(r,h)}catch(c){j(`Couldn't read segment: ${JSON.stringify(a)}. ${c.message}`)}else this.file.byteLength>r+h?a.chunk=this.file.subarray(r,h):a.size===void 0?a.chunk=this.file.subarray(r):j("Segment unreachable: "+JSON.stringify(a));return a.chunk})),this.extendOptions&&this.extendOptions(e),this.options=e,this.file=t,this.parsers=i}injectSegment(e,t){this.options[e].enabled&&this.createParser(e,t)}createParser(e,t){let i=new(V.get(e))(t,this.options,this.file);return this.parsers[e]=i}createParsers(e){for(let t of e){let{type:i,chunk:a}=t,r=this.options[i];if(r&&r.enabled){let h=this.parsers[i];h&&h.append||h||this.createParser(i,a)}}}async readSegments(e){let t=e.map(this.ensureSegmentChunk);await Promise.all(t)}}class ee{static findPosition(e,t){let i=e.getUint16(t+2)+2,a=typeof this.headerLength=="function"?this.headerLength(e,t,i):this.headerLength,r=t+a,h=i-a;return{offset:t,length:i,headerLength:a,start:r,size:h,end:r+h}}static parse(e,t={}){return new this(e,new ke({[this.type]:t}),e).parse()}normalizeInput(e){return e instanceof Y?e:new Y(e)}constructor(e,t={},i){b(this,"errors",[]),b(this,"raw",new Map),b(this,"handleError",(a=>{if(!this.options.silentErrors)throw a;this.errors.push(a.message)})),this.chunk=this.normalizeInput(e),this.file=i,this.type=this.constructor.type,this.globalOptions=this.options=t,this.localOptions=t[this.type],this.canTranslate=this.localOptions&&this.localOptions.translate}translate(){this.canTranslate&&(this.translated=this.translateBlock(this.raw,this.type))}get output(){return this.translated?this.translated:this.raw?Object.fromEntries(this.raw):void 0}translateBlock(e,t){let i=pe.get(t),a=te.get(t),r=z.get(t),h=this.options[t],c=h.reviveValues&&!!i,m=h.translateValues&&!!a,x=h.translateKeys&&!!r,P={};for(let[A,L]of e)c&&i.has(A)?L=i.get(A)(L):m&&a.has(A)&&(L=this.translateValue(L,a.get(A))),x&&r.has(A)&&(A=r.get(A)||A),P[A]=L;return P}translateValue(e,t){return t[e]||t.DEFAULT||e}assignToOutput(e,t){this.assignObjectToOutput(e,this.constructor.type,t)}assignObjectToOutput(e,t,i){if(this.globalOptions.mergeOutput)return Object.assign(e,i);e[t]?Object.assign(e[t],i):e[t]=i}}b(ee,"headerLength",4),b(ee,"type",void 0),b(ee,"multiSegment",!1),b(ee,"canHandle",(()=>!1));function Bi(n){return n===192||n===194||n===196||n===219||n===221||n===218||n===254}function Ui(n){return n>=224&&n<=239}function Gi(n,e,t){for(let[i,a]of V)if(a.canHandle(n,e,t))return i}class Ut extends nt{constructor(...e){super(...e),b(this,"appSegments",[]),b(this,"jpegSegments",[]),b(this,"unknownSegments",[])}static canHandle(e,t){return t===65496}async parse(){await this.findAppSegments(),await this.readSegments(this.appSegments),this.mergeMultiSegments(),this.createParsers(this.mergedAppSegments||this.appSegments)}setupSegmentFinderArgs(e){e===!0?(this.findAll=!0,this.wanted=new Set(V.keyList())):(e=e===void 0?V.keyList().filter((t=>this.options[t].enabled)):e.filter((t=>this.options[t].enabled&&V.has(t))),this.findAll=!1,this.remaining=new Set(e),this.wanted=new Set(e)),this.unfinishedMultiSegment=!1}async findAppSegments(e=0,t){this.setupSegmentFinderArgs(t);let{file:i,findAll:a,wanted:r,remaining:h}=this;if(!a&&this.file.chunked&&(a=Array.from(r).some((c=>{let m=V.get(c),x=this.options[c];return m.multiSegment&&x.multiSegment})),a&&await this.file.readWhole()),e=this.findAppSegmentsInRange(e,i.byteLength),!this.options.onlyTiff&&i.chunked){let c=!1;for(;h.size>0&&!c&&(i.canReadNextChunk||this.unfinishedMultiSegment);){let{nextChunkOffset:m}=i,x=this.appSegments.some((P=>!this.file.available(P.offset||P.start,P.length||P.size)));if(c=e>m&&!x?!await i.readNextChunk(e):!await i.readNextChunk(m),(e=this.findAppSegmentsInRange(e,i.byteLength))===void 0)return}}}findAppSegmentsInRange(e,t){t-=2;let i,a,r,h,c,m,{file:x,findAll:P,wanted:A,remaining:L,options:C}=this;for(;e<t;e++)if(x.getUint8(e)===255){if(i=x.getUint8(e+1),Ui(i)){if(a=x.getUint16(e+2),r=Gi(x,e,a),r&&A.has(r)&&(h=V.get(r),c=h.findPosition(x,e),m=C[r],c.type=r,this.appSegments.push(c),!P&&(h.multiSegment&&m.multiSegment?(this.unfinishedMultiSegment=c.chunkNumber<c.chunkCount,this.unfinishedMultiSegment||L.delete(r)):L.delete(r),L.size===0)))break;C.recordUnknownSegments&&(c=ee.findPosition(x,e),c.marker=i,this.unknownSegments.push(c)),e+=a+1}else if(Bi(i)){if(a=x.getUint16(e+2),i===218&&C.stopAfterSos!==!1)return;C.recordJpegSegments&&this.jpegSegments.push({offset:e,length:a,marker:i}),e+=a+1}}return e}mergeMultiSegments(){if(!this.appSegments.some((t=>t.multiSegment)))return;let e=(function(t,i){let a,r,h,c=new Map;for(let m=0;m<t.length;m++)a=t[m],r=a[i],c.has(r)?h=c.get(r):c.set(r,h=[]),h.push(a);return Array.from(c)})(this.appSegments,"type");this.mergedAppSegments=e.map((([t,i])=>{let a=V.get(t,this.options);return a.handleMultiSegments?{type:t,chunk:a.handleMultiSegments(i)}:i[0]}))}getSegment(e){return this.appSegments.find((t=>t.type===e))}async getOrFindSegment(e){let t=this.getSegment(e);return t===void 0&&(await this.findAppSegments(0,[e]),t=this.getSegment(e)),t}}b(Ut,"type","jpeg"),ne.set("jpeg",Ut);const Ni=[void 0,1,1,2,4,8,1,1,2,4,8,4,8,4];class _i extends ee{parseHeader(){var e=this.chunk.getUint16();e===18761?this.le=!0:e===19789&&(this.le=!1),this.chunk.le=this.le,this.headerParsed=!0}parseTags(e,t,i=new Map){let{pick:a,skip:r}=this.options[t];
1a=new Set(a);let h=a.size>0,c=r.size===0,m=this.chunk.getUint16(e);e+=2;for(let x=0;x<m;x++){let P=this.chunk.getUint16(e);if(h){if(a.has(P)&&(i.set(P,this.parseTag(e,P,t)),a.delete(P),a.size===0))break}else!c&&r.has(P)||i.set(P,this.parseTag(e,P,t));e+=12}return i}parseTag(e,t,i){let{chunk:a}=this,r=a.getUint16(e+2),h=a.getUint32(e+4),c=Ni[r];if(c*h<=4?e+=8:e=a.getUint32(e+8),(r<1||r>13)&&j(`Invalid TIFF value type. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${r}, offset ${e}`),e>a.byteLength&&j(`Invalid TIFF value offset. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${r}, offset ${e} is outside of chunk size ${a.byteLength}`),r===1)return a.getUint8Array(e,h);if(r===2)return Se(a.getString(e,h));if(r===7)return a.getUint8Array(e,h);if(h===1)return this.parseTagValue(r,e);{let m=new((function(P){switch(P){case 1:return Uint8Array;case 3:return Uint16Array;case 4:return Uint32Array;case 5:return Array;case 6:return Int8Array;case 8:return Int16Array;case 9:return Int32Array;case 10:return Array;case 11:return Float32Array;case 12:return Float64Array;default:return Array}})(r))(h),x=c;for(let P=0;P<h;P++)m[P]=this.parseTagValue(r,e),e+=x;return m}}parseTagValue(e,t){let{chunk:i}=this;switch(e){case 1:return i.getUint8(t);case 3:return i.getUint16(t);case 4:return i.getUint32(t);case 5:return i.getUint32(t)/i.getUint32(t+4);case 6:return i.getInt8(t);case 8:return i.getInt16(t);case 9:return i.getInt32(t);case 10:return i.getInt32(t)/i.getInt32(t+4);case 11:return i.getFloat(t);case 12:return i.getDouble(t);case 13:return i.getUint32(t);default:j(`Invalid tiff type ${e}`)}}}class ut extends _i{static canHandle(e,t){return e.getUint8(t+1)===225&&e.getUint32(t+4)===1165519206&&e.getUint16(t+8)===0}async parse(){this.parseHeader();let{options:e}=this;return e.ifd0.enabled&&await this.parseIfd0Block(),e.exif.enabled&&await this.safeParse("parseExifBlock"),e.gps.enabled&&await this.safeParse("parseGpsBlock"),e.interop.enabled&&await this.safeParse("parseInteropBlock"),e.ifd1.enabled&&await this.safeParse("parseThumbnailBlock"),this.createOutput()}safeParse(e){let t=this[e]();return t.catch!==void 0&&(t=t.catch(this.handleError)),t}findIfd0Offset(){this.ifd0Offset===void 0&&(this.ifd0Offset=this.chunk.getUint32(4))}findIfd1Offset(){if(this.ifd1Offset===void 0){this.findIfd0Offset();let e=this.chunk.getUint16(this.ifd0Offset),t=this.ifd0Offset+2+12*e;this.ifd1Offset=this.chunk.getUint32(t)}}parseBlock(e,t){let i=new Map;return this[t]=i,this.parseTags(e,t,i),i}async parseIfd0Block(){if(this.ifd0)return;let{file:e}=this;this.findIfd0Offset(),this.ifd0Offset<8&&j("Malformed EXIF data"),!e.chunked&&this.ifd0Offset>e.byteLength&&j(`IFD0 offset points to outside of file.
2this.ifd0Offset: ${this.ifd0Offset}, file.byteLength: ${e.byteLength}`),e.tiff&&await e.ensureChunk(this.ifd0Offset,gt(this.options));let t=this.parseBlock(this.ifd0Offset,"ifd0");return t.size!==0?(this.exifOffset=t.get(34665),this.interopOffset=t.get(40965),this.gpsOffset=t.get(34853),this.xmp=t.get(700),this.iptc=t.get(33723),this.icc=t.get(34675),this.options.sanitize&&(t.delete(34665),t.delete(40965),t.delete(34853),t.delete(700),t.delete(33723),t.delete(34675)),t):void 0}async parseExifBlock(){if(this.exif||(this.ifd0||await this.parseIfd0Block(),this.exifOffset===void 0))return;this.file.tiff&&await this.file.ensureChunk(this.exifOffset,gt(this.options));let e=this.parseBlock(this.exifOffset,"exif");return this.interopOffset||(this.interopOffset=e.get(40965)),this.makerNote=e.get(37500),this.userComment=e.get(37510),this.options.sanitize&&(e.delete(40965),e.delete(37500),e.delete(37510)),this.unpack(e,41728),this.unpack(e,41729),e}unpack(e,t){let i=e.get(t);i&&i.length===1&&e.set(t,i[0])}async parseGpsBlock(){if(this.gps||(this.ifd0||await this.parseIfd0Block(),this.gpsOffset===void 0))return;let e=this.parseBlock(this.gpsOffset,"gps");return e&&e.has(2)&&e.has(4)&&(e.set("latitude",Gt(...e.get(2),e.get(1))),e.set("longitude",Gt(...e.get(4),e.get(3)))),e}async parseInteropBlock(){if(!this.interop&&(this.ifd0||await this.parseIfd0Block(),this.interopOffset!==void 0||this.exif||await this.parseExifBlock(),this.interopOffset!==void 0))return this.parseBlock(this.interopOffset,"interop")}async parseThumbnailBlock(e=!1){if(!this.ifd1&&!this.ifd1Parsed&&(!this.options.mergeOutput||e))return this.findIfd1Offset(),this.ifd1Offset>0&&(this.parseBlock(this.ifd1Offset,"ifd1"),this.ifd1Parsed=!0),this.ifd1}async extractThumbnail(){if(this.headerParsed||this.parseHeader(),this.ifd1Parsed||await this.parseThumbnailBlock(!0),this.ifd1===void 0)return;let e=this.ifd1.get(513),t=this.ifd1.get(514);return this.chunk.getUint8Array(e,t)}get image(){return this.ifd0}get thumbnail(){return this.ifd1}createOutput(){let e,t,i,a={};for(t of G)if(e=this[t],!Qt(e))if(i=this.canTranslate?this.translateBlock(e,t):Object.fromEntries(e),this.options.mergeOutput){if(t==="ifd1")continue;Object.assign(a,i)}else a[t]=i;return this.makerNote&&(a.makerNote=this.makerNote),this.userComment&&(a.userComment=this.userComment),a}assignToOutput(e,t){if(this.globalOptions.mergeOutput)Object.assign(e,t);else for(let[i,a]of Object.entries(t))this.assignObjectToOutput(e,i,a)}}function Gt(n,e,t,i){var a=n+e/60+t/3600;return i!=="S"&&i!=="W"||(a*=-1),a}b(ut,"type","tiff"),b(ut,"headerLength",10),V.set("tiff",ut);
2var Vi=Object.freeze({__proto__:null,default:Ei,Exifr:ge,fileParsers:ne,segmentParsers:V,fileReaders:ae,tagKeys:z,tagValues:te,tagRevivers:pe,createDictionary:_,extendDictionary:Pe,fetchUrlAsArrayBuffer:be,readBlobAsArrayBuffer:ve,chunkedProps:ue,otherSegments:Ae,segments:we,tiffBlocks:G,segmentsAndBlocks:ce,tiffExtractables:fe,inheritables:Te,allFormatters:de,Options:ke,parse:it});const vt={ifd0:!1,ifd1:!1,exif:!1,gps:!1,interop:!1,sanitize:!1,reviveValues:!0,translateKeys:!1,translateValues:!1,mergeOutput:!1},Pt=Object.assign({},vt,{firstChunkSize:4e4,gps:[1,2,3,4]});async function ti(n){let e=new ge(Pt);await e.read(n);let t=await e.parse();if(t&&t.gps){let{latitude:i,longitude:a}=t.gps;return{latitude:i,longitude:a}}}const wt=Object.assign({},vt,{tiff:!1,ifd1:!0,mergeOutput:!1});async function ii(n){let e=new ge(wt);await e.read(n);let t=await e.extractThumbnail();return t&&tt?et.from(t):t}async function ni(n){let e=await this.thumbnail(n);if(e!==void 0){let t=new Blob([e]);return URL.createObjectURL(t)}}const kt=Object.assign({},vt,{firstChunkSize:4e4,ifd0:[274]});async function It(n){let e=new ge(kt);await e.read(n);let t=await e.parse();if(t&&t.ifd0)return t.ifd0[274]}const Dt=Object.freeze({1:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:0,rad:0},2:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:0,rad:0},3:{dimensionSwapped:!1,scaleX:1,scaleY:1,deg:180,rad:180*Math.PI/180},4:{dimensionSwapped:!1,scaleX:-1,scaleY:1,deg:180,rad:180*Math.PI/180},5:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:90,rad:90*Math.PI/180},6:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:90,rad:90*Math.PI/180},7:{dimensionSwapped:!0,scaleX:1,scaleY:-1,deg:270,rad:270*Math.PI/180},8:{dimensionSwapped:!0,scaleX:1,scaleY:1,deg:270,rad:270*Math.PI/180}});let Ce=!0,xe=!0;if(typeof navigator=="object"){let n=navigator.userAgent;if(n.includes("iPad")||n.includes("iPhone")){let e=n.match(/OS (\d+)_(\d+)/);if(e){let[,t,i]=e;Ce=Number(t)+.1*Number(i)<13.4,xe=!1}}else if(n.includes("OS X 10")){let[,e]=n.match(/OS X 10[_.](\d+)/);Ce=xe=Number(e)<15}if(n.includes("Chrome/")){let[,e]=n.match(/Chrome\/(\d+)/);Ce=xe=Number(e)<81}else if(n.includes("Firefox/")){let[,e]=n.match(/Firefox\/(\d+)/);Ce=xe=Number(e)<77}}async function ai(n){let e=await It(n);return Object.assign({canvas:Ce,css:xe},Dt[e])}class ji extends Y{constructor(...e){super(...e),b(this,"ranges",new zi),this.byteLength!==0&&this.ranges.add(0,this.byteLength)}_tryExtend(e,t,i){if(e===0&&this.byteLength===0&&i){let a=new DataView(i.buffer||i,i.byteOffset,i.byteLength);this._swapDataView(a)}else{let a=e+t;if(a>this.byteLength){let{dataView:r}=this._extend(a);this._swapDataView(r)}}}_extend(e){let t;t=tt?et.allocUnsafe(e):new Uint8Array(e);let i=new DataView(t.buffer,t.byteOffset,t.byteLength);return t.set(new Uint8Array(this.buffer,this.byteOffset,this.byteLength),0),{uintView:t,dataView:i}}subarray(e,t,i=!1){return t=t||this._lengthToEnd(e),i&&this._tryExtend(e,t),this.ranges.add(e,t),super.subarray(e,t)}set(e,t,i=!1){i&&this._tryExtend(t,e.byteLength,e);let a=super.set(e,t);return this.ranges.add(t,a.byteLength),a}async ensureChunk(e,t){this.chunked&&(this.ranges.available(e,t)||await this.readChunk(e,t))}available(e,t){return this.ranges.available(e,t)}}class zi{constructor(){b(this,"list",[])}get length(){return this.list.length}add(e,t,i=0){let a=e+t,r=this.list.filter((h=>Nt(e,h.offset,a)||Nt(e,h.end,a)));if(r.length>0){e=Math.min(e,...r.map((c=>c.offset))),a=Math.max(a,...r.map((c=>c.end))),t=a-e;let h=r.shift();h.offset=e,h.length=t,h.end=a,this.list=this.list.filter((c=>!r.includes(c)))}else this.list.push({offset:e,length:t,end:a})}available(e,t){let i=e+t;return this.list.some((a=>a.offset<=e&&i<=a.end))}}function Nt(n,e,t){return n<=e&&e<=t}class at extends ji{constructor(e,t){super(0),b(this,"chunksRead",0),this.input=e,this.options=t}async readWhole(){this.chunked=!1,await this.readChunk(this.nextChunkOffset)}async readChunked(){this.chunked=!0,await this.readChunk(0,this.options.firstChunkSize)}async readNextChunk(e=this.nextChunkOffset){if(this.fullyRead)return this.chunksRead++,!1;let t=this.options.chunkSize,i=await this.readChunk(e,t);return!!i&&i.byteLength===t}async readChunk(e,t){if(this.chunksRead++,(t=this.safeWrapAddress(e,t))!==0)return this._readChunk(e,t)}safeWrapAddress(e,t){return this.size!==void 0&&e+t>this.size?Math.max(0,this.size-e):t}get nextChunkOffset(){if(this.ranges.list.length!==0)return this.ranges.list[0].length}get canReadNextChunk(){return this.chunksRead<this.options.chunkLimit}get fullyRead(){return this.size!==void 0&&this.nextChunkOffset===this.size}read(){return this.options.chunked?this.readChunked():this.readWhole()}close(){}}ae.set("blob",class extends at{async readWhole(){this.chunked=!1;let n=await ve(this.input);this._swapArrayBuffer(n)}readChunked(){return this.chunked=!0,this.size=this.input.size,super.readChunked()}
2async _readChunk(n,e){let t=e?n+e:void 0,i=this.input.slice(n,t),a=await ve(i);return this.set(a,n,!0)}});var Hi=Object.freeze({__proto__:null,default:Vi,Exifr:ge,fileParsers:ne,segmentParsers:V,fileReaders:ae,tagKeys:z,tagValues:te,tagRevivers:pe,createDictionary:_,extendDictionary:Pe,fetchUrlAsArrayBuffer:be,readBlobAsArrayBuffer:ve,chunkedProps:ue,otherSegments:Ae,segments:we,tiffBlocks:G,segmentsAndBlocks:ce,tiffExtractables:fe,inheritables:Te,allFormatters:de,Options:ke,parse:it,gpsOnlyOptions:Pt,gps:ti,thumbnailOnlyOptions:wt,thumbnail:ii,thumbnailUrl:ni,orientationOnlyOptions:kt,orientation:It,rotations:Dt,get rotateCanvas(){return Ce},get rotateCss(){return xe},rotation:ai});ae.set("url",class extends at{async readWhole(){this.chunked=!1;let n=await be(this.input);n instanceof ArrayBuffer?this._swapArrayBuffer(n):n instanceof Uint8Array&&this._swapBuffer(n)}async _readChunk(n,e){let t=e?n+e-1:void 0,i=this.options.httpHeaders||{};(n||t)&&(i.range=`bytes=${[n,t].join("-")}`);let a=await xt(this.input,{headers:i}),r=await a.arrayBuffer(),h=r.byteLength;if(a.status!==416)return h!==e&&(this.size=n+h),this.set(r,n,!0)}});Y.prototype.getUint64=function(n){let e=this.getUint32(n),t=this.getUint32(n+4);return e<1048575?e<<32|t:typeof ze!==void 0?(console.warn("Using BigInt because of type 64uint but JS can only handle 53b numbers."),ze(e)<<ze(32)|ze(t)):void j("Trying to read 64b value but JS can only handle 53b numbers.")};class Wi extends nt{parseBoxes(e=0){let t=[];for(;e<this.file.byteLength-4;){let i=this.parseBoxHead(e);if(t.push(i),i.length===0)break;e+=i.length}return t}parseSubBoxes(e){e.boxes=this.parseBoxes(e.start)}findBox(e,t){return e.boxes===void 0&&this.parseSubBoxes(e),e.boxes.find((i=>i.kind===t))}parseBoxHead(e){let t=this.file.getUint32(e),i=this.file.getString(e+4,4),a=e+8;return t===1&&(t=this.file.getUint64(e+8),a+=8),{offset:e,length:t,kind:i,start:a}}parseBoxFullHead(e){if(e.version!==void 0)return;let t=this.file.getUint32(e.start);e.version=t>>24,e.start+=4}}class ri extends Wi{static canHandle(e,t){if(t!==0)return!1;let i=e.getUint16(2);if(i>50)return!1;let a=16,r=[];for(;a<i;)r.push(e.getString(a,4)),a+=4;return r.includes(this.type)}async parse(){let e=this.file.getUint32(0),t=this.parseBoxHead(e);for(;t.kind!=="meta";)e+=t.length,await this.file.ensureChunk(e,16),t=this.parseBoxHead(e);await this.file.ensureChunk(t.offset,t.length),this.parseBoxFullHead(t),this.parseSubBoxes(t),this.options.icc.enabled&&await this.findIcc(t),this.options.tiff.enabled&&await this.findExif(t)}async registerSegment(e,t,i){await this.file.ensureChunk(t,i);let a=this.file.subarray(t,i);this.createParser(e,a)}async findIcc(e){let t=this.findBox(e,"iprp");if(t===void 0)return;let i=this.findBox(t,"ipco");if(i===void 0)return;let a=this.findBox(i,"colr");a!==void 0&&await this.registerSegment("icc",a.offset+12,a.length)}async findExif(e){let t=this.findBox(e,"iinf");if(t===void 0)return;let i=this.findBox(e,"iloc");if(i===void 0)return;let a=this.findExifLocIdInIinf(t),r=this.findExtentInIloc(i,a);if(r===void 0)return;let[h,c]=r;await this.file.ensureChunk(h,c);let m=4+this.file.getUint32(h);h+=m,c-=m,await this.registerSegment("tiff",h,c)}findExifLocIdInIinf(e){this.parseBoxFullHead(e);let t,i,a,r,h=e.start,c=this.file.getUint16(h);for(h+=2;c--;){if(t=this.parseBoxHead(h),this.parseBoxFullHead(t),i=t.start,t.version>=2&&(a=t.version===3?4:2,r=this.file.getString(i+a+2,4),r==="Exif"))return this.file.getUintBytes(i,a);h+=t.length}}get8bits(e){let t=this.file.getUint8(e);return[t>>4,15&t]}findExtentInIloc(e,t){this.parseBoxFullHead(e);let i=e.start,[a,r]=this.get8bits(i++),[h,c]=this.get8bits(i++),m=e.version===2?4:2,x=e.version===1||e.version===2?2:0,P=c+a+r,A=e.version===2?4:2,L=this.file.getUintBytes(i,A);for(i+=A;L--;){let C=this.file.getUintBytes(i,m);i+=m+x+2+h;let k=this.file.getUint16(i);if(i+=2,C===t)return k>1&&console.warn(`ILOC box has more than one extent but we're only processing one
3Please create an issue at https://github.com/MikeKovarik/exifr with this file`),[this.file.getUintBytes(i+c,a),this.file.getUintBytes(i+c+a,r)];i+=k*P}}}class si extends ri{}b(si,"type","heic");class _t extends ri{}b(_t,"type","avif"),ne.set("heic",si),ne.set("avif",_t),_(z,["ifd0","ifd1"],[[256,"ImageWidth"],[257,"ImageHeight"],[258,"BitsPerSample"],[259,"Compression"],[262,"PhotometricInterpretation"],[270,"ImageDescription"],[271,"Make"],[272,"Model"],[273,"StripOffsets"],[274,"Orientation"],[277,"SamplesPerPixel"],[278,"RowsPerStrip"],[279,"StripByteCounts"],[282,"XResolution"],[283,"YResolution"],[284,"PlanarConfiguration"],[296,"ResolutionUnit"],[301,"TransferFunction"],[305,"Software"],[306,"ModifyDate"],[315,"Artist"],[316,"HostComputer"],[317,"Predictor"],[318,"WhitePoint"],[319,"PrimaryChromaticities"],[513,"ThumbnailOffset"],[514,"ThumbnailLength"],[529,"YCbCrCoefficients"],[530,"YCbCrSubSampling"],[531,"YCbCrPositioning"],[532,"ReferenceBlackWhite"],[700,"ApplicationNotes"],[33432,"Copyright"],[33723,"IPTC"],[34665,"ExifIFD"],[34675,"ICC"],[34853,"GpsIFD"],[330,"SubIFD"],[40965,"InteropIFD"],[40091,"XPTitle"],[40092,"XPComment"],[40093,"XPAuthor"],[40094,"XPKeywords"],[40095,"XPSubject"]]),_(z,"exif",[[33434,"ExposureTime"],[33437,"FNumber"],[34850,"ExposureProgram"],[34852,"SpectralSensitivity"],[34855,"ISO"],[34858,"TimeZoneOffset"],[34859,"SelfTimerMode"],[34864,"SensitivityType"],[34865,"StandardOutputSensitivity"],[34866,"RecommendedExposureIndex"],[34867,"ISOSpeed"],[34868,"ISOSpeedLatitudeyyy"],[34869,"ISOSpeedLatitudezzz"],[36864,"ExifVersion"],[36867,"DateTimeOriginal"],[36868,"CreateDate"],[36873,"GooglePlusUploadCode"],[36880,"OffsetTime"],[36881,"OffsetTimeOriginal"],[36882,"OffsetTimeDigitized"],[37121,"ComponentsConfiguration"],[37122,"CompressedBitsPerPixel"],[37377,"ShutterSpeedValue"],[37378,"ApertureValue"],[37379,"BrightnessValue"],[3738
30,"ExposureCompensation"],[37381,"MaxApertureValue"],[37382,"SubjectDistance"],[37383,"MeteringMode"],[37384,"LightSource"],[37385,"Flash"],[37386,"FocalLength"],[37393,"ImageNumber"],[37394,"SecurityClassification"],[37395,"ImageHistory"],[37396,"SubjectArea"],[37500,"MakerNote"],[37510,"UserComment"],[37520,"SubSecTime"],[37521,"SubSecTimeOriginal"],[37522,"SubSecTimeDigitized"],[37888,"AmbientTemperature"],[37889,"Humidity"],[37890,"Pressure"],[37891,"WaterDepth"],[37892,"Acceleration"],[37893,"CameraElevationAngle"],[40960,"FlashpixVersion"],[40961,"ColorSpace"],[40962,"ExifImageWidth"],[40963,"ExifImageHeight"],[40964,"RelatedSoundFile"],[41483,"FlashEnergy"],[41486,"FocalPlaneXResolution"],[41487,"FocalPlaneYResolution"],[41488,"FocalPlaneResolutionUnit"],[41492,"SubjectLocation"],[41493,"ExposureIndex"],[41495,"SensingMethod"],[41728,"FileSource"],[41729,"SceneType"],[41730,"CFAPattern"],[41985,"CustomRendered"],[41986,"ExposureMode"],[41987,"WhiteBalance"],[41988,"DigitalZoomRatio"],[41989,"FocalLengthIn35mmFormat"],[41990,"SceneCaptureType"],[41991,"GainControl"],[41992,"Contrast"],[41993,"Saturation"],[41994,"Sharpness"],[41996,"SubjectDistanceRange"],[42016,"ImageUniqueID"],[42032,"OwnerName"],[42033,"SerialNumber"],[42034,"LensInfo"],[42035,"LensMake"],[42036,"LensModel"],[42037,"LensSerialNumber"],[42080,"CompositeImage"],[42081,"CompositeImageCount"],[42082,"CompositeImageExposureTimes"],[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"],[40965,"InteropIFD"]]),_(z,"gps",[[0,"GPSVersionID"],[1,"GPSLatitudeRef"],[2,"GPSLatitude"],[3,"GPSLongitudeRef"],[4,"GPSLongitude"],[5,"GPSAltitudeRef"],[6,"GPSAltitude"],[7,"GPSTimeStamp"],[8,"GPSSatellites"],[9,"GPSStatus"],[10,"GPSMeasureMode"],[11,"GPSDOP"],[12,"GPSSpeedRef"],[13,"GPSSpeed"],[14,"GPSTrackRef"],[15,"GPSTrack"],[16,"GPSImgDirectionRef"],[17,"GPSImgDirection"],[18,"GPSMapDatum"],[19,"GPSDestLatitudeRef"],[20,"GPSDestLatitude"],[21,"GPSDestLongitudeRef"],[22,"GPSDestLongitude"],[23,"GPSDestBearingRef"],[24,"GPSDestBearing"],[25,"GPSDestDistanceRef"],[26,"GPSDestDistance"],[27,"GPSProcessingMethod"],[28,"GPSAreaInformation"],[29,"GPSDateStamp"],[30,"GPSDifferential"],[31,"GPSHPositioningError"]]),_(te,["ifd0","ifd1"],[[274,{1:"Horizontal (normal)",2:"Mirror horizontal",3:"Rotate 180",4:"Mirror vertical",5:"Mirror horizontal and rotate 270 CW",6:"Rotate 90 CW",7:"Mirror horizontal and rotate 90 CW",8:"Rotate 270 CW"}],[296,{1:"None",2:"inches",3:"cm"}]]);let _e=_(te,"exif",[[34850,{0:"Not defined",1:"Manual",2:"Normal program",3:"Aperture priority",4:"Shutter priority",5:"Creative program",6:"Action program",7:"Portrait mode",8:"Landscape mode"}],[37121,{0:"-",1:"Y",2:"Cb",3:"Cr",4:"R",5:"G",6:"B"}],[37383,{0:"Unknown",1:"Average",2:"CenterWeightedAverage",3:"Spot",4:"MultiSpot",5:"Pattern",6:"Partial",255:"Other"}],[37384,{0:"Unknown",1:"Daylight",2:"Fluorescent",3:"Tungsten (incandescent light)",4:"Flash",9:"Fine weather",10:"Cloudy weather",11:"Shade",12:"Daylight fluorescent (D 5700 - 7100K)",13:"Day white fluorescent (N 4600 - 5400K)",14:"Cool white fluorescent (W 3900 - 4500K)",15:"White fluorescent (WW 3200 - 3700K)",17:"Standard light A",18:"Standard light B",19:"Standard light C",20:"D55",21:"D65",22:"D75",23:"D50",24:"ISO studio tungsten",255:"Other"}],[37385,{0:"Flash did not fire",1:"Flash fired",5:"Strobe return light not detected",7:"Strobe return light detected",9:"Flash fired, compulsory flash mode",13:"Flash fired, compulsory flash mode, return light not detected",15:"Flash fired, compulsory flash mode, return light detected",16:"Flash did not fire, compulsory flash mode",24:"Flash did not fire, auto mode",25:"Flash fired, auto mode",29:"Flash fired, auto mode, return light not detected",31:"Flash fired, auto mode, return light detected",32:"No flash function",65:"Flash fired, red-eye reduction mode",69:"Flas
3h fired, red-eye reduction mode, return light not detected",71:"Flash fired, red-eye reduction mode, return light detected",73:"Flash fired, compulsory flash mode, red-eye reduction mode",77:"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected",79:"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected",89:"Flash fired, auto mode, red-eye reduction mode",93:"Flash fired, auto mode, return light not detected, red-eye reduction mode",95:"Flash fired, auto mode, return light detected, red-eye reduction mode"}],[41495,{1:"Not defined",2:"One-chip color area sensor",3:"Two-chip color area sensor",4:"Three-chip color area sensor",5:"Color sequential area sensor",7:"Trilinear sensor",8:"Color sequential linear sensor"}],[41728,{1:"Film Scanner",2:"Reflection Print Scanner",3:"Digital Camera"}],[41729,{1:"Directly photographed"}],[41985,{0:"Normal",1:"Custom",2:"HDR (no original saved)",3:"HDR (original saved)",4:"Original (for HDR)",6:"Panorama",7:"Portrait HDR",8:"Portrait"}],[41986,{0:"Auto",1:"Manual",2:"Auto bracket"}],[41987,{0:"Auto",1:"Manual"}],[41990,{0:"Standard",1:"Landscape",2:"Portrait",3:"Night",4:"Other"}],[41991,{0:"None",1:"Low gain up",2:"High gain up",3:"Low gain down",4:"High gain down"}],[41996,{0:"Unknown",1:"Macro",2:"Close",3:"Distant"}],[42080,{0:"Unknown",1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}]]);const Vt={1:"No absolute unit of measurement",2:"Inch",3:"Centimeter"};_e.set(37392,Vt),_e.set(41488,Vt);const ct={0:"Normal",1:"Low",2:"High"};function jt(n){return typeof n=="object"&&n.length!==void 0?n[0]:n}function zt(n){let e=Array.from(n).slice(1);return e[1]>15&&(e=e.map((t=>String.fromCharCode(t)))),e[2]!=="0"&&e[2]!==0||e.pop(),e.join(".")}function ft(n){if(typeof n=="string"){var[e,t,i,a,r,h]=n.trim().split(/[-: ]/g).map(Number),c=new Date(e,t-1,i);return Number.isNaN(a)||Number.isNaN(r)||Number.isNaN(h)||(c.setHours(a),c.setMinutes(r),c.setSeconds(h)),Number.isNaN(+c)?n:c}}function Ne(n){if(typeof n=="string")return n;let e=[];
3if(n[1]===0&&n[n.length-1]===0)for(let t=0;t<n.length;t+=2)e.push(Ht(n[t+1],n[t]));else for(let t=0;t<n.length;t+=2)e.push(Ht(n[t],n[t+1]));return Se(String.fromCodePoint(...e))}function Ht(n,e){return n<<8|e}_e.set(41992,ct),_e.set(41993,ct),_e.set(41994,ct),_(pe,["ifd0","ifd1"],[[50827,function(n){return typeof n!="string"?Zt(n):n}],[306,ft],[40091,Ne],[40092,Ne],[40093,Ne],[40094,Ne],[40095,Ne]]),_(pe,"exif",[[40960,zt],[36864,zt],[36867,ft],[36868,ft],[40962,jt],[40963,jt]]),_(pe,"gps",[[0,n=>Array.from(n).join(".")],[7,n=>Array.from(n).join(":")]]);class dt extends ee{static canHandle(e,t){return e.getUint8(t+1)===225&&e.getUint32(t+4)===1752462448&&e.getString(t+4,20)==="http://ns.adobe.com/"}static headerLength(e,t){return e.getString(t+4,34)==="http://ns.adobe.com/xmp/extension/"?79:33}static findPosition(e,t){let i=super.findPosition(e,t);return i.multiSegment=i.extended=i.headerLength===79,i.multiSegment?(i.chunkCount=e.getUint8(t+72),i.chunkNumber=e.getUint8(t+76),e.getUint8(t+77)!==0&&i.chunkNumber++):(i.chunkCount=1/0,i.chunkNumber=-1),i}static handleMultiSegments(e){return e.map((t=>t.chunk.getString())).join("")}normalizeInput(e){return typeof e=="string"?e:Y.from(e).getString()}parse(e=this.chunk){if(!this.localOptions.parse)return e;e=(function(r){let h={},c={};for(let m of ui)h[m]=[],c[m]=0;return r.replace(Yi,((m,x,P)=>{if(x==="<"){let A=++c[P];return h[P].push(A),`${m}#${A}`}return`${m}#${h[P].pop()}`}))})(e);let t=De.findAll(e,"rdf","Description");t.length===0&&t.push(new De("rdf","Description",void 0,e));let i,a={};for(let r of t)for(let h of r.properties)i=Ji(h.ns,a),oi(h,i);return(function(r){let h;for(let c in r)h=r[c]=$e(r[c]),h===void 0&&delete r[c];return $e(r)})(a)}assignToOutput(e,t){if(this.localOptions.parse)for(let[i,a]of Object.entries(t))switch(i){case"tiff":this.assignObjectToOutput(e,"ifd0",a);break;case"exif":this.assignObjectToOutput(e,"exif",a);break;case"xmlns":break;default:this.assignObjectToOutput(e,i,a)}else e.xmp=t}}b(dt,"type","xmp"),b(dt,"multiSegment",!0),V.set("xmp",dt);class Qe{static findAll(e){return li(e,/([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(Qe.unpackMatch)}static unpackMatch(e){let t=e[1],i=e[2],a=e[3].slice(1,-1);return a=hi(a),new Qe(t,i,a)}constructor(e,t,i){this.ns=e,this.name=t,this.value=i}serialize(){return this.value}}class De{static findAll(e,t,i){if(t!==void 0||i!==void 0){t=t||"[\\w\\d-]+",i=i||"[\\w\\d-]+";var a=new RegExp(`<(${t}):(${i})(#\\d+)?((\\s+?[\\w\\d-:]+=("[^"]*"|'[^']*'))*\\s*)(\\/>|>([\\s\\S]*?)<\\/\\1:\\2\\3>)`,"gm")}else a=/<([\w\d-]+):([\w\d-]+)(#\d+)?((\s+?[\w\d-:]+=("[^"]*"|'[^']*'))*\s*)(\/>|>([\s\S]*?)<\/\1:\2\3>)/gm;return li(e,a).map(De.unpackMatch)}static unpackMatch(e){let t=e[1],i=e[2],a=e[4],r=e[8];return new De(t,i,a,r)}constructor(e,t,i,a){this.ns=e,this.name=t,this.attrString=i,this.innerXml=a,this.attrs=Qe.findAll(i),this.children=De.findAll(a),this.value=this.children.length===0?hi(a):void 0,this.properties=[...this.attrs,...this.children]}get isPrimitive(){return this.value!==void 0&&this.attrs.length===0&&this.children.length===0}get isListContainer(){return this.children.length===1&&this.children[0].isList}get isList(){let{ns:e,name:t}=this;return e==="rdf"&&(t==="Seq"||t==="Bag"||t==="Alt")}get isListItem(){return this.ns==="rdf"&&this.name==="li"}serialize(){if(this.properties.length===0&&this.value===void 0)return;if(this.isPrimitive)return this.value;if(this.isListContainer)return this.children[0].serialize();if(this.isList)return Ki(this.children.map(Xi));if(this.isListItem&&this.children.length===1&&this.attrs.length===0)return this.children[0].serialize();let e={};for(let t of this.properties)oi(t,e);return this.value!==void 0&&(e.value=this.value),$e(e)}}function oi(n,e){let t=n.serialize();t!==void 0&&(e[n.name]=t)}var Xi=n=>n.serialize(),Ki=n=>n.length===1?n[0]:n,Ji=(n,e)=>e[n]?e[n]:e[n]={};function li(n,e){let t,i=[];if(!n)return i;for(;(t=e.exec(n))!==null;)i.push(t);return i}function hi(n){if((function(i){return i==null||i==="null"||i==="undefined"||i===""||i.trim()===""})(n))return;let e=Number(n);if(!Number.isNaN(e))return e;let t=n.toLowerCase();return t==="true"||t!=="false"&&n.trim()}const ui=["rdf:li","rdf:Seq","rdf:Bag","rdf:Alt","rdf:Description"],Yi=new RegExp(`(<|\\/)(${ui.join("|")})`,"g");var $i=Object.freeze({__proto__:null,default:Hi,Exifr:ge,fileParsers:ne,segmentParsers:V,fileReaders:ae,tagKeys:z,tagValues:te,tagRevivers:pe,createDictionary:_,extendDictionary:Pe,fetchUrlAsArrayBuffer:be,readBlobAsArrayBuffer:ve,chunkedProps:ue,otherSegments:Ae,segments:we,tiffBlocks:G,segmentsAndBlocks:ce,tiffExtractables:fe,inheritables:Te,allFormatters:de,Options:ke,parse:it,gpsOnlyOptions:Pt,gps:ti,thumbnailOnlyOptions:wt,thumbnail:ii,thumbnailUrl:ni,orientationOnlyOptions:kt,orientation:It,rotations:Dt,get rotateCanvas(){return Ce},get rotateCss(){return xe},rotation:ai});let Wt=Ye("fs",(n=>n.promises));ae.set("fs",class extends at{async readWhole(){this.chunked=!1,this.fs=await Wt;let n=await this.fs.readFile(this.input);this._swapBuffer(n)}async readChunked(){this.chunked=!0,this.fs=await Wt,await this.open(),await this.readChunk(0,this.options.firstChunkSize)}async open(){this.fh===void 0&&(this.fh=await this.fs.open(this.input,"r"),this.size=(await this.fh.stat(this.input)).size)}
3async _readChunk(n,e){this.fh===void 0&&await this.open(),n+e>this.size&&(e=this.size-n);var t=this.subarray(n,e,!0);return await this.fh.read(t.dataView,0,e,n),t}async close(){if(this.fh){let n=this.fh;this.fh=void 0,await n.close()}}});ae.set("base64",class extends at{constructor(...n){super(...n),this.input=this.input.replace(/^data:([^;]+);base64,/gim,""),this.size=this.input.length/4*3,this.input.endsWith("==")?this.size-=2:this.input.endsWith("=")&&(this.size-=1)}async _readChunk(n,e){let t,i,a=this.input;n===void 0?(n=0,t=0,i=0):(t=4*Math.floor(n/3),i=n-t/4*3),e===void 0&&(e=this.size);let r=n+e,h=t+4*Math.ceil(r/3);a=a.slice(t,h);let c=Math.min(e,this.size-n);if(tt){let m=et.from(a,"base64").slice(i,i+c);return this.set(m,n,!0)}{let m=this.subarray(n,c,!0),x=atob(a),P=m.toUint8();for(let A=0;A<c;A++)P[A]=x.charCodeAt(i+A);return m}}});class Xt extends nt{static canHandle(e,t){return t===18761||t===19789}extendOptions(e){let{ifd0:t,xmp:i,iptc:a,icc:r}=e;i.enabled&&t.deps.add(700),a.enabled&&t.deps.add(33723),r.enabled&&t.deps.add(34675),t.finalizeFilters()}async parse(){let{tiff:e,xmp:t,iptc:i,icc:a}=this.options;if(e.enabled||t.enabled||i.enabled||a.enabled){let r=Math.max(gt(this.options),this.options.chunkSize);await this.file.ensureChunk(0,r),this.createParser("tiff",this.file),this.parsers.tiff.parseHeader(),await this.parsers.tiff.parseIfd0Block(),this.adaptTiffPropAsSegment("xmp"),this.adaptTiffPropAsSegment("iptc"),this.adaptTiffPropAsSegment("icc")}}adaptTiffPropAsSegment(e){if(this.parsers.tiff[e]){let t=this.parsers.tiff[e];this.injectSegment(e,t)}}}b(Xt,"type","tiff"),ne.set("tiff",Xt);let qi=Ye("zlib");const Qi=["ihdr","iccp","text","itxt","exif"];class Kt extends nt{constructor(...e){super(...e),b(this,"catchError",(t=>this.errors.push(t))),b(this,"metaChunks",[]),b(this,"unknownChunks",[])}static canHandle(e,t){return t===35152&&e.getUint32(0)===2303741511&&e.getUint32(4)===218765834}async parse(){let{file:e}=this;await this.findPngChunksInRange(8,e.byteLength),await this.readSegments(this.metaChunks),this.findIhdr(),this.parseTextChunks(),await this.findExif().catch(this.catchError),await this.findXmp().catch(this.catchError),await this.findIcc().catch(this.catchError)}async findPngChunksInRange(e,t){let{file:i}=this;for(;e<t;){let a=i.getUint32(e),r=i.getUint32(e+4),h=i.getString(e+4,4).toLowerCase(),c=a+4+4+4,m={type:h,offset:e,length:c,start:e+4+4,size:a,marker:r};Qi.includes(h)?this.metaChunks.push(m):this.unknownChunks.push(m),e+=c}}parseTextChunks(){let e=this.metaChunks.filter((t=>t.type==="text"));for(let t of e){let[i,a]=this.file.getString(t.start,t.size).split("\0");this.injectKeyValToIhdr(i,a)}}injectKeyValToIhdr(e,t){let i=this.parsers.ihdr;i&&i.raw.set(e,t)}findIhdr(){let e=this.metaChunks.find((t=>t.type==="ihdr"));e&&this.options.ihdr.enabled!==!1&&this.createParser("ihdr",e.chunk)}async findExif(){let e=this.metaChunks.find((t=>t.type==="exif"));e&&this.injectSegment("tiff",e.chunk)}async findXmp(){let e=this.metaChunks.filter((t=>t.type==="itxt"));for(let t of e)t.chunk.getString(0,17)==="XML:com.adobe.xmp"&&this.injectSegment("xmp",t.chunk)}async findIcc(){let e=this.metaChunks.find((c=>c.type==="iccp"));if(!e)return;let{chunk:t}=e,i=t.getUint8Array(0,81),a=0;for(;a<80&&i[a]!==0;)a++;let r=a+2,h=t.getString(0,a);if(this.injectKeyValToIhdr("ProfileName",h),Je){let c=await qi,m=t.getUint8Array(r);m=c.inflateSync(m),this.injectSegment("icc",m)}}}b(Kt,"type","png"),ne.set("png",Kt),_(z,"interop",[[1,"InteropIndex"],[2,"InteropVersion"],[4096,"RelatedImageFileFormat"],[4097,"RelatedImageWidth"],[4098,"RelatedImageHeight"]]),Pe(z,"ifd0",[[11,"ProcessingSoftware"],[254,"SubfileType"],[255,"OldSubfileType"],[263,"Thresholding"],[264,"CellWidth"],[265,"CellLength"],[266,"FillOrder"],[269,"DocumentName"],[280,"MinSampleValue"],[281,"MaxSampleValue"],[285,"PageName"],[286,"XPosition"],[287,"YPosition"],[290,"GrayResponseUnit"],[297,"PageNumber"],[321,"HalftoneHints"],[322,"TileWidth"],[323,"TileLength"],[332,"InkSet"],[337,"TargetPrinter"],[18246,"Rating"],[18249,"RatingPercent"],[33550,"PixelScale"],[34264,"ModelTransform"],[34377,"PhotoshopSettings"],[50706,"DNGVersion"],[50707,"DNGBackwardVersion"],[50708,"UniqueCameraModel"],[50709,"LocalizedCameraModel"],[50736,"DNGLensInfo"],[50739,"ShadowScale"],[50740,"DNGPrivateData"],[33920,"IntergraphMatrix"],[33922,"ModelTiePoint"],[34118,"SEMInfo"],[34735,"GeoTiffDirectory"],[34736,"GeoTiffDoubleParams"],[34737,"GeoTiffAsciiParams"],[50341,"PrintIM"],[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"],[50741,"MakerNoteSafety"],[50778,"CalibrationIlluminant1"],[50779,"CalibrationIlluminant2"],[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,"ProfileEmbedPol
3icy"],[50942,"ProfileCopyright"],[50964,"ForwardMatrix1"],[50965,"ForwardMatrix2"],[50966,"PreviewApplicationName"],[50967,"PreviewApplicationVersion"],[50968,"PreviewSettingsName"],[50969,"PreviewSettingsDigest"],[50970,"PreviewColorSpace"],[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,"ProfileHueSatMapEncoding"],[51108,"ProfileLookTableEncoding"],[51109,"BaselineExposureOffset"],[51110,"DefaultBlackRender"],[51111,"NewRawImageDigest"],[51112,"RawToPreviewGain"]]);let Jt=[[273,"StripOffsets"],[279,"StripByteCounts"],[288,"FreeOffsets"],[289,"FreeByteCounts"],[291,"GrayResponseCurve"],[292,"T4Options"],[293,"T6Options"],[300,"ColorResponseUnit"],[320,"ColorMap"],[324,"TileOffsets"],[325,"TileByteCounts"],[326,"BadFaxLines"],[327,"CleanFaxData"],[328,"ConsecutiveBadFaxLines"],[330,"SubIFD"],[333,"InkNames"],[334,"NumberofInks"],[336,"DotRange"],[338,"ExtraSamples"],[339,"SampleFormat"],[340,"SMinSampleValue"],[341,"SMaxSampleValue"],[342,"TransferRange"],[343,"ClipPath"],[344,"XClipPathUnits"],[345,"YClipPathUnits"],[346,"Indexed"],[347,"JPEGTables"],[351,"OPIProxy"],[400,"GlobalParametersIFD"],[401,"ProfileType"],[402,"FaxProfile"],[403,"CodingMethods"],[404,"VersionYear"],[405,"ModeNumber"],[433,"Decode"],[434,"DefaultImageColor"],[435,"T82Options"],[437,"JPEGTables"],[512,"JPEGProc"],[515,"JPEGRestartInterval"],[517,"JPEGLosslessPredictors"],[518,"JPEGPointTransforms"],[519,"JPEGQTables"],[520,"JPEGDCTables"],[521,"JPEGACTables"],[559,"StripRowCounts"],[999,"USPTOMiscellaneous"],[18247,"XP_DIP_XML"],[18248,"StitchInfo"],[28672,"SonyRawFileType"],[28688,"SonyToneCurve"],[28721,"VignettingCorrection"],[28722,"VignettingCorrParams"],[28724,"ChromaticAberrationCorrection"],[28725,"ChromaticAberrationCorrParams"],[28726,"DistortionCorrection"],[28727,"DistortionCorrParams"],[29895,"SonyCropTopLeft"],[29896,"SonyCropSize"],[32781,"ImageID"],[32931,"WangTag1"],[32932,"WangAnnotation"],[32933,"WangTag3"],[32934,"WangTag4"],[32953,"ImageReferencePoints"],[32954,"RegionXformTackPoint"],[32955,"WarpQuadrilateral"],[32956,"AffineTransformMat"],[32995,"Matteing"],[32996,"DataType"],[32997,"ImageDepth"],[32998,"TileDepth"],[33300,"ImageFullWidth"],[33301,"ImageFullHeight"],[33302,"TextureFormat"],[33303,"WrapModes"],[33304,"FovCot"],[33305,"MatrixWorldToScreen"],[33306,"MatrixWorldToCamera"],[33405,"Model2"],[33421,"CFARepeatPatternDim"],[33422,"CFAPattern2"],[33423,"BatteryLevel"],[33424,"KodakIFD"],[33445,"MDFileTag"],[33446,"MDScalePixel"],[33447,"MDColorTable"],[33448,"MDLabName"],[33449,"MDSampleInfo"],[33450,"MDPrepDate"],[33451,"MDPrepTime"],[33452,"MDFileUnits"],[33589,"AdventScale"],[33590,"AdventRevision"],[33628,"UIC1Tag"],[33629,"UIC2Tag"],[33630,"UIC3Tag"],[33631,"UIC4Tag"],[33918,"IntergraphPacketData"],[33919,"IntergraphFlagRegisters"],[33921,"INGRReserved"],[34016,"Site"],[34017,"ColorSequence"],[34018,"IT8Header"],[34019,"RasterPadding"],[34020,"BitsPerRunLength"],[34021,"BitsPerExtendedRunLength"],[34022,"ColorTable"],[34023,"ImageColorIndicator"],[34024,"BackgroundColorIndicator"],[34025,"ImageColorValue"],[34026,"BackgroundColorValue"],[34027,"PixelIntensityRange"],[34028,"TransparencyIndicator"],[34029,"ColorCharacterization"],[34030,"HCUsage"],[34031,"TrapIndicator"],[34032,"CMYKEquivalent"],[34152,"AFCP_IPTC"],[34232,"PixelMagicJBIGOptions"],[34263,"JPLCartoIFD"],[34306,"WB_GRGBLevels"],[34310,"LeafData"],[34687,"TIFF_FXExtensions"],[34688,"MultiProfiles"],[34689,"SharedData"],[34690,"T88Options"],[34732,"ImageLayer"],[34750,"JBIGOptions"],[34856,"Opto-ElectricConvFactor"],[34857,"Interlace"],[34908,"FaxRecvParams"],[34909,"FaxSubAddress"],[34910,"FaxRecvTime"],[34929,"FedexEDR"],[34954,"LeafSubIFD"],[37387,"FlashEnergy"],[37388,"SpatialFrequencyResponse"],[37389,"Noise"],[37390,"FocalPlaneXResolution"],[37391,"FocalPlaneYResolution"],[37392,"FocalPlaneResolutionUnit"],[37397,"ExposureIndex"],[37398,"TIFF-EPStandardID"],[37399,"SensingMethod"],[37434,"CIP3DataFile"],[37435,"CIP3Sheet"],[37436,"C
3IP3Side"],[37439,"StoNits"],[37679,"MSDocumentText"],[37680,"MSPropertySetStorage"],[37681,"MSDocumentTextPosition"],[37724,"ImageSourceData"],[40965,"InteropIFD"],[40976,"SamsungRawPointersOffset"],[40977,"SamsungRawPointersLength"],[41217,"SamsungRawByteOrder"],[41218,"SamsungRawUnknown"],[41484,"SpatialFrequencyResponse"],[41485,"Noise"],[41489,"ImageNumber"],[41490,"SecurityClassification"],[41491,"ImageHistory"],[41494,"TIFF-EPStandardID"],[41995,"DeviceSettingDescription"],[42112,"GDALMetadata"],[42113,"GDALNoData"],[44992,"ExpandSoftware"],[44993,"ExpandLens"],[44994,"ExpandFilm"],[44995,"ExpandFilterLens"],[44996,"ExpandScanner"],[44997,"ExpandFlashLamp"],[46275,"HasselbladRawImage"],[48129,"PixelFormat"],[48130,"Transformation"],[48131,"Uncompressed"],[48132,"ImageType"],[48256,"ImageWidth"],[48257,"ImageHeight"],[48258,"WidthResolution"],[48259,"HeightResolution"],[48320,"ImageOffset"],[48321,"ImageByteCount"],[48322,"AlphaOffset"],[48323,"AlphaByteCount"],[48324,"ImageDataDiscard"],[48325,"AlphaDataDiscard"],[50215,"OceScanjobDesc"],[50216,"OceApplicationSelector"],[50217,"OceIDNumber"],[50218,"OceImageLogic"],[50255,"Annotations"],[50459,"HasselbladExif"],[50547,"OriginalFileName"],[50560,"USPTOOriginalContentType"],[50656,"CR2CFAPattern"],[50710,"CFAPlaneColor"],[50711,"CFALayout"],[50712,"LinearizationTable"],[50713,"BlackLevelRepeatDim"],[50714,"BlackLevel"],[50715,"BlackLevelDeltaH"],[50716,"BlackLevelDeltaV"],[50717,"WhiteLevel"],[50718,"DefaultScale"],[50719,"DefaultCropOrigin"],[50720,"DefaultCropSize"],[50733,"BayerGreenSplit"],[50737,"ChromaBlurRadius"],[50738,"AntiAliasStrength"],[50752,"RawImageSegmentation"],[50780,"BestQualityScale"],[50784,"AliasLayerMetadata"],[50829,"ActiveArea"],[50830,"MaskedAreas"],[50935,"NoiseReductionApplied"],[50974,"SubTileBlockSize"],[50975,"RowInterleaveFactor"],[51008,"OpcodeList1"],[51009,"OpcodeList2"],[51022,"OpcodeList3"],[51041,"NoiseProfile"],[51114,"CacheVersion"],[51125,"DefaultUserCrop"],[51157,"NikonNEFInfo"],[65024,"KdcIFD"]];Pe(z,"ifd0",Jt),Pe(z,"exif",Jt),_(te,"gps",[[23,{M:"Magnetic North",T:"True North"}],[25,{K:"Kilometers",M:"Miles",N:"Nautical Miles"}]]);class pt extends ee{static canHandle(e,t){return e.getUint8(t+1)===224&&e.getUint32(t+4)===1246120262&&e.getUint8(t+8)===0}parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint16(0)],[2,this.chunk.getUint8(2)],[3,this.chunk.getUint16(3)],[5,this.chunk.getUint16(5)],[7,this.chunk.getUint8(7)],[8,this.chunk.getUint8(8)]])}}b(pt,"type","jfif"),b(pt,"headerLength",9),V.set("jfif",pt),_(z,"jfif",[[0,"JFIFVersion"],[2,"ResolutionUnit"],[3,"XResolution"],[5,"YResolution"],[7,"ThumbnailWidth"],[8,"ThumbnailHeight"]]);class Yt extends ee{parse(){return this.parseTags(),this.translate(),this.output}parseTags(){this.raw=new Map([[0,this.chunk.getUint32(0)],[4,this.chunk.getUint32(4)],[8,this.chunk.getUint8(8)],[9,this.chunk.getUint8(9)],[10,this.chunk.getUint8(10)],[11,this.chunk.getUint8(11)],[12,this.chunk.getUint8(12)],...Array.from(this.raw)])}}b(Yt,"type","ihdr"),V.set("ihdr",Yt),_(z,"ihdr",[[0,"ImageWidth"],[4,"ImageHeight"],[8,"BitDepth"],[9,"ColorType"],[10,"Compression"],[11,"Filter"],[12,"Interlace"]]),_(te,"ihdr",[[9,{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha",DEFAULT:"Unknown"}],[10,{0:"Deflate/Inflate",DEFAULT:"Unknown"}],[11,{0:"Adaptive",DEFAULT:"Unknown"}],[12,{0:"Noninterlaced",1:"Adam7 Interlace",DEFAULT:"Unknown"}]]);class Ke extends ee{static canHandle(e,t){return e.getUint8(t+1)===226&&e.getUint32(t+4)===1229144927}static findPosition(e,t){let i=super.findPosition(e,t);return i.chunkNumber=e.getUint8(t+16),i.chunkCount=e.getUint8(t+17),i.multiSegment=i.chunkCount>1,i}static handleMultiSegments(e){return(function(t){let i=(function(a){let r=a[0].constructor,h=0;for(let x of a)h+=x.length;let c=new r(h),m=0;for(let x of a)c.set(x,m),m+=x.length;return c})(t.map((a=>a.chunk.toUint8())));return new Y(i)})(e)}parse(){return this.raw=new Map,this.parseHeader(),this.parseTags(),this.translate(),this.output}parseHeader(){let{raw:e}=this;this.chunk.byteLength<84&&j("ICC header is too short");for(let[t,i]of Object.entries(Zi)){t=parseInt(t,10);let a=i(this.chunk,t);a!=="\0\0\0\0"&&e.set(t,a)}}
3parseTags(){let e,t,i,a,r,{raw:h}=this,c=this.chunk.getUint32(128),m=132,x=this.chunk.byteLength;for(;c--;){if(e=this.chunk.getString(m,4),t=this.chunk.getUint32(m+4),i=this.chunk.getUint32(m+8),a=this.chunk.getString(t,4),t+i>x)return void console.warn("reached the end of the first ICC chunk. Enable options.tiff.multiSegment to read all ICC segments.");r=this.parseTag(a,t,i),r!==void 0&&r!=="\0\0\0\0"&&h.set(e,r),m+=12}}parseTag(e,t,i){switch(e){case"desc":return this.parseDesc(t);case"mluc":return this.parseMluc(t);case"text":return this.parseText(t,i);case"sig ":return this.parseSig(t)}if(!(t+i>this.chunk.byteLength))return this.chunk.getUint8Array(t,i)}parseDesc(e){let t=this.chunk.getUint32(e+8)-1;return Se(this.chunk.getString(e+12,t))}parseText(e,t){return Se(this.chunk.getString(e+8,t-8))}parseSig(e){return Se(this.chunk.getString(e+8,4))}parseMluc(e){let{chunk:t}=this,i=t.getUint32(e+8),a=t.getUint32(e+12),r=e+16,h=[];for(let c=0;c<i;c++){let m=t.getString(r+0,2),x=t.getString(r+2,2),P=t.getUint32(r+4),A=t.getUint32(r+8)+e,L=Se(t.getUnicodeString(A,P));h.push({lang:m,country:x,text:L}),r+=a}return i===1?h[0].text:h}translateValue(e,t){return typeof e=="string"?t[e]||t[e.toLowerCase()]||e:t[e]||e}}b(Ke,"type","icc"),b(Ke,"multiSegment",!0),b(Ke,"headerLength",18);const Zi={4:oe,8:function(n,e){return[n.getUint8(e),n.getUint8(e+1)>>4,n.getUint8(e+1)%16].map((t=>t.toString(10))).join(".")},12:oe,16:oe,20:oe,24:function(n,e){const t=n.getUint16(e),i=n.getUint16(e+2)-1,a=n.getUint16(e+4),r=n.getUint16(e+6),h=n.getUint16(e+8),c=n.getUint16(e+10);return new Date(Date.UTC(t,i,a,r,h,c))},36:oe,40:oe,48:oe,52:oe,64:(n,e)=>n.getUint32(e),80:oe};function oe(n,e){return Se(n.getString(e,4))}V.set("icc",Ke),_(z,"icc",[[4,"ProfileCMMType"],[8,"ProfileVersion"],[12,"ProfileClass"],[16,"ColorSpaceData"],[20,"ProfileConnectionSpace"],[24,"ProfileDateTime"],[36,"ProfileFileSignature"],[40,"PrimaryPlatform"],[44,"CMMFlags"],[48,"DeviceManufacturer"],[52,"DeviceModel"],[56,"DeviceAttributes"],[64,"RenderingIntent"],[68,"ConnectionSpaceIlluminant"],[80,"ProfileCreator"],[84,"ProfileID"],["Header","ProfileHeader"],["MS00","WCSProfiles"],["bTRC","BlueTRC"],["bXYZ","BlueMatrixColumn"],["bfd","UCRBG"],["bkpt","MediaBlackPoint"],["calt","CalibrationDateTime"],["chad","ChromaticAdaptation"],["chrm","Chromaticity"],["ciis","ColorimetricIntentImageState"],["clot","ColorantTableOut"],["clro","ColorantOrder"],["clrt","ColorantTable"],["cprt","ProfileCopyright"],["crdi","CRDInfo"],["desc","ProfileDescription"],["devs","DeviceSettings"],["dmdd","DeviceModelDesc"],["dmnd","DeviceMfgDesc"],["dscm","ProfileDescriptionML"],["fpce","FocalPlaneColorimetryEstimates"],["gTRC","GreenTRC"],["gXYZ","GreenMatrixColumn"],["gamt","Gamut"],["kTRC","GrayTRC"],["lumi","Luminance"],["meas","Measurement"],["meta","Metadata"],["mmod","MakeAndModel"],["ncl2","NamedColor2"],["ncol","NamedColor"],["ndin","NativeDisplayInfo"],["pre0","Preview0"],["pre1","Preview1"],["pre2","Preview2"],["ps2i","PS2RenderingIntent"],["ps2s","PostScript2CSA"],["psd0","PostScript2CRD0"],["psd1","PostScript2CRD1"],["psd2","PostScript2CRD2"],["psd3","PostScript2CRD3"],["pseq","ProfileSequenceDesc"],["psid","ProfileSequenceIdentifier"],["psvm","PS2CRDVMSize"],["rTRC","RedTRC"],["rXYZ","RedMatrixColumn"],["resp","OutputResponse"],["rhoc","ReflectionHardcopyOrigColorimetry"],["rig0","PerceptualRenderingIntentGamut"],["rig2","SaturationRenderingIntentGamut"],["rpoc","ReflectionPrintOutputColorimetry"],["sape","SceneAppearanceEstimates"],["scoe","SceneColorimetryEstimates"],["scrd","ScreeningDesc"],["scrn","Screening"],["targ","CharTarget"],["tech","Technology"],["vcgt","VideoCardGamma"],["view","ViewingConditions"],["vued","ViewingCondDesc"],["wtpt","MediaWhitePoint"]]);const He={"4d2p":"Erdt Systems",AAMA:"Aamazing Technologies",ACER:"Acer",ACLT:"Acolyte Color Research",ACTI:"Actix Sytems",ADAR:"Adara Technology",ADBE:"Adobe",ADI:"ADI Systems",AGFA:"Agfa Graphics",ALMD:"Alps Electric",ALPS:"Alps Electric",ALWN:"Alwan Color Expertise",AMTI:"Amiable Technologies",AOC:"AOC International",APAG:"Apago",APPL:"Apple Computer",AST:"AST","AT&T":"AT&T",BAEL:"BARBIERI electronic",BRCO:"Barco NV",BRKP:"Breakpoint",BROT:"Brother",BULL:"Bull",BUS:"Bus Computer Systems","C-IT":"C-Itoh",CAMR:"Intel",CANO:"Canon",CARR:"Carroll Touch",CASI:"Casio",CBUS:"Colorbus PL",CEL:"Crossfield",CELx:"Crossfield",CGS:"CGS Publishing Technologies International",CHM:"Rochester Robotics",CIGL:"Colour Imaging Group, London",CITI:"Citizen",CL00:"Candela",CLIQ:"Color IQ",CMCO:"Chromaco",CMiX:"CHROMiX",COLO:"Colorgraphic Communications",COMP:"Compaq",COMp:"Compeq/Focus Technology",CONR:"Conrac Dis
3play Products",CORD:"Cordata Technologies",CPQ:"Compaq",CPRO:"ColorPro",CRN:"Cornerstone",CTX:"CTX International",CVIS:"ColorVision",CWC:"Fujitsu Laboratories",DARI:"Darius Technology",DATA:"Dataproducts",DCP:"Dry Creek Photo",DCRC:"Digital Contents Resource Center, Chung-Ang University",DELL:"Dell Computer",DIC:"Dainippon Ink and Chemicals",DICO:"Diconix",DIGI:"Digital","DL&C":"Digital Light & Color",DPLG:"Doppelganger",DS:"Dainippon Screen",DSOL:"DOOSOL",DUPN:"DuPont",EPSO:"Epson",ESKO:"Esko-Graphics",ETRI:"Electronics and Telecommunications Research Institute",EVER:"Everex Systems",EXAC:"ExactCODE",Eizo:"Eizo",FALC:"Falco Data Products",FF:"Fuji Photo Film",FFEI:"FujiFilm Electronic Imaging",FNRD:"Fnord Software",FORA:"Fora",FORE:"Forefront Technology",FP:"Fujitsu",FPA:"WayTech Development",FUJI:"Fujitsu",FX:"Fuji Xerox",GCC:"GCC Technologies",GGSL:"Global Graphics Software",GMB:"Gretagmacbeth",GMG:"GMG",GOLD:"GoldStar Technology",GOOG:"Google",GPRT:"Giantprint",GTMB:"Gretagmacbeth",GVC:"WayTech Development",GW2K:"Sony",HCI:"HCI",HDM:"Heidelberger Druckmaschinen",HERM:"Hermes",HITA:"Hitachi America",HP:"Hewlett-Packard",HTC:"Hitachi",HiTi:"HiTi Digital",IBM:"IBM",IDNT:"Scitex",IEC:"Hewlett-Packard",IIYA:"Iiyama North America",IKEG:"Ikegami Electronics",IMAG:"Image Systems",IMI:"Ingram Micro",INTC:"Intel",INTL:"N/A (INTL)",INTR:"Intra Electronics",IOCO:"Iocomm International Technology",IPS:"InfoPrint Solutions Company",IRIS:"Scitex",ISL:"Ichikawa Soft Laboratory",ITNL:"N/A (ITNL)",IVM:"IVM",IWAT:"Iwatsu Electric",Idnt:"Scitex",Inca:"Inca Digital Printers",Iris:"Scitex",JPEG:"Joint Photographic Experts Group",JSFT:"Jetsoft Development",JVC:"JVC Information Products",KART:"Scitex",KFC:"KFC Computek Components",KLH:"KLH Computers",KMHD:"Konica Minolta",KNCA:"Konica",KODA:"Kodak",KYOC:"Kyocera",Kart:"Scitex",LCAG:"Leica",LCCD:"Leeds Colour",LDAK:"Left Dakota",LEAD:"Leading Technology",LEXM:"Lexmark International",LINK:"Link Computer",LINO:"Linotronic",LITE:"Lite-On",Leaf:"Leaf",Lino:"Linotronic",MAGC:"Mag Computronic",MAGI:"MAG Innovision",MANN:"Mannesmann",MICN:"Micron Technology",MICR:"Microtek",MICV:"Microvitec",MINO:"Minolta",MITS:"Mitsubishi Electronics America",MITs:"Mitsuba",MNLT:"Minolta",MODG:"Modgraph",MONI:"Monitronix",MONS:"Monaco Systems",MORS:"Morse Technology",MOTI:"Motive Systems",MSFT:"Microsoft",MUTO:"MUTOH INDUSTRIES",Mits:"Mitsubishi Electric",NANA:"NANAO",NEC:"NEC",NEXP:"NexPress Solutions",NISS:"Nissei Sangyo America",NKON:"Nikon",NONE:"none",OCE:"Oce Technologies",OCEC:"OceColor",OKI:"Oki",OKID:"Okidata",OKIP:"Okidata",OLIV:"Olivetti",OLYM:"Olympus",ONYX:"Onyx Graphics",OPTI:"Optiquest",PACK:"Packard Bell",PANA:"Matsushita Electric Industrial",PANT:"Pantone",PBN:"Packard Bell",PFU:"PFU",PHIL:"Philips Consumer Electronics",PNTX:"HOYA",POne:"Phase One A/S",PREM:"Premier Computer Innovations",PRIN:"Princeton Graphic Systems",PRIP:"Princeton Publishing Labs",QLUX:"Hong Kong",QMS:"QMS",QPCD:"QPcard AB",QUAD:"QuadLaser",QUME:"Qume",RADI:"Radius",RDDx:"Integrated Color Solutions",RDG:"Roland DG",REDM:"REDMS Group",RELI:"Relisys",RGMS:"Rolf Gierling Multitools",RICO:"Ricoh",RNLD:"Edmund Ronald",ROYA:"Royal",RPC:"Ricoh Printing Systems",RTL:"Royal Information Electronics",SAMP:"Sampo",SAMS:"Samsung",SANT:"Jaime Santana Pomares",SCIT:"Scitex",SCRN:"Dainippon Screen",SDP:"Scitex",SEC:"Samsung",SEIK:"Seiko Instruments",SEIk:"Seikosha",SGUY:"ScanGuy.com",SHAR:"Sharp Laboratories",SICC:"International Color Consortium",SONY:"Sony",SPCL:"SpectraCal",STAR:"Star",STC:"Sampo Technology",Scit:"Scitex",Sdp:"Scitex",Sony:"Sony",TALO:"Talon Technology",TAND:"Tandy",TATU:"Tatung",TAXA:"TAXAN America",TDS:"Tokyo Denshi Sekei",TECO:"TECO Information Systems",TEGR:"Tegra",TEKT:"Tektronix",TI:"Texas Instruments",TMKR:"TypeMaker",TOSB:"Toshiba",TOSH:"Toshiba",TOTK:"TOTOKU ELECTRIC",TRIU:"Triumph",TSBT:"Toshiba",TTX:"TTX Computer Products",TVM:"TVM Professional Monitor",TW:"TW Casper",ULSX:"Ulead Systems",UNIS:"Unisys",UTZF:"Utz Fehlau & Sohn",VARI:"Varityper",VIEW:"Viewsonic",VISL:"Visual communication",VIVO:"Vivo Mobile Communication",WANG:"Wang",WLBR:"Wilbur Imaging",WTG2:"Ware To Go",WYSE:"WYSE Technology",XERX:"Xerox",XRIT:"X-Rite",ZRAN:"Zoran",Zebr:"Zebra Technologies",appl:"Apple Computer",bICC:"basICColor",berg:"bergde
3sign",ceyd:"Integrated Color Solutions",clsp:"MacDermid ColorSpan",ds:"Dainippon Screen",dupn:"DuPont",ffei:"FujiFilm Electronic Imaging",flux:"FluxData",iris:"Scitex",kart:"Scitex",lcms:"Little CMS",lino:"Linotronic",none:"none",ob4d:"Erdt Systems",obic:"Medigraph",quby:"Qubyx Sarl",scit:"Scitex",scrn:"Dainippon Screen",sdp:"Scitex",siwi:"SIWI GRAFIKA",yxym:"YxyMaster"},$t={scnr:"Scanner",mntr:"Monitor",prtr:"Printer",link:"Device Link",abst:"Abstract",spac:"Color Space Conversion Profile",nmcl:"Named Color",cenc:"ColorEncodingSpace profile",mid:"MultiplexIdentification profile",mlnk:"MultiplexLink profile",mvis:"MultiplexVisualization profile",nkpf:"Nikon Input Device Profile (NON-STANDARD!)"};_(te,"icc",[[4,He],[12,$t],[40,Object.assign({},He,$t)],[48,He],[80,He],[64,{0:"Perceptual",1:"Relative Colorimetric",2:"Saturation",3:"Absolute Colorimetric"}],["tech",{amd:"Active Matrix Display",crt:"Cathode Ray Tube Display",kpcd:"Photo CD",pmd:"Passive Matrix Display",dcam:"Digital Camera",dcpj:"Digital Cinema Projector",dmpc:"Digital Motion Picture Camera",dsub:"Dye Sublimation Printer",epho:"Electrophotographic Printer",esta:"Electrostatic Printer",flex:"Flexography",fprn:"Film Writer",fscn:"Film Scanner",grav:"Gravure",ijet:"Ink Jet Printer",imgs:"Photo Image Setter",mpfr:"Motion Picture Film Recorder",mpfs:"Motion Picture Film Scanner",offs:"Offset Lithography",pjtv:"Projection Television",rpho:"Photographic Paper Printer",rscn:"Reflective Scanner",silk:"Silkscreen",twax:"Thermal Wax Printer",vidc:"Video Camera",vidm:"Video Monitor"}]]);class We extends ee{static canHandle(e,t,i){return e.getUint8(t+1)===237&&e.getString(t+4,9)==="Photoshop"&&this.containsIptc8bim(e,t,i)!==void 0}static headerLength(e,t,i){let a,r=this.containsIptc8bim(e,t,i);if(r!==void 0)return a=e.getUint8(t+r+7),a%2!=0&&(a+=1),a===0&&(a=4),r+8+a}static containsIptc8bim(e,t,i){for(let a=0;a<i;a++)if(this.isIptcSegmentHead(e,t+a))return a}static isIptcSegmentHead(e,t){return e.getUint8(t)===56&&e.getUint32(t)===943868237&&e.getUint16(t+4)===1028}parse(){let{raw:e}=this,t=this.chunk.byteLength-1,i=!1;for(let a=0;a<t;a++)if(this.chunk.getUint8(a)===28&&this.chunk.getUint8(a+1)===2){i=!0;let r=this.chunk.getUint16(a+3),h=this.chunk.getUint8(a+2),c=this.chunk.getLatin1String(a+5,r);e.set(h,this.pluralizeValue(e.get(h),c)),a+=4+r}else if(i)break;return this.translate(),this.output}pluralizeValue(e,t){return e!==void 0?e instanceof Array?(e.push(t),e):[e,t]:t}}b(We,"type","iptc"),b(We,"translateValues",!1),b(We,"reviveValues",!1),V.set("iptc",We),_(z,"iptc",[[0,"ApplicationRecordVersion"],[3,"ObjectTypeReference"],[4,"ObjectAttributeReference"],[5,"ObjectName"],[7,"EditStatus"],[8,"EditorialUpdate"],[10,"Urgency"],[12,"SubjectReference"],[15,"Category"],[20,"SupplementalCategories"],[22,"FixtureIdentifier"],[25,"Keywords"],[26,"ContentLocationCode"],[27,"ContentLocationName"],[30,"ReleaseDate"],[35,"ReleaseTime"],[37,"ExpirationDate"],[38,"ExpirationTime"],[40,"SpecialInstructions"],[42,"ActionAdvised"],[45,"ReferenceService"],[47,"ReferenceDate"],[50,"ReferenceNumber"],[55,"DateCreated"],[60,"TimeCreated"],[62,"DigitalCreationDate"],[63,"DigitalCreationTime"],[65,"OriginatingProgram"],[70,"ProgramVersion"],[75,"ObjectCycle"],[80,"Byline"],[85,"BylineTitle"],[90,"City"],[92,"Sublocation"],[95,"State"],[100,"CountryCode"],[101,"Country"],[103,"OriginalTransmissionReference"],[105,"Headline"],[110,"Credit"],[115,"Source"],[116,"CopyrightNotice"],[118,"Contact"],[120,"Caption"],[121,"LocalCaption"],[122,"Writer"],[125,"RasterizedCaption"],[130,"ImageType"],[131,"ImageOrientation"],[135,"LanguageIdentifier"],[150,"AudioType"],[151,"AudioSamplingRate"],[152,"AudioSamplingResolution"],[153,"AudioDuration"],[154,"AudioOutcue"],[184,"JobID"],[185,"MasterDocumentID"],[186,"ShortDocumentID"],[187,"UniqueDocumentID"],[188,"OwnerID"],[200,"ObjectPreviewFileFormat"],[201,"ObjectPreviewFileVersion"],[202,"ObjectPreviewData"],[221,"Prefs"],[225,"ClassifyState"],[228,"SimilarityIndex"],[230,"DocumentNotes"],[231,"DocumentHistory"],[232,"ExifCameraInfo"],[255,"CatalogSets"]]),_(te,"iptc",[[10,{0:"0 (reserved)",1:"1 (most urgent)",2:"2",3:"3",4:"4",5:"5 (normal urgency)",6:"6",7:"7",8:"8 (least urgent)",9:"9 (user-defined priority)"}],[75,{a:"Morning",b:"Both Morning and Evening",p:"Evening"}],[131,{L:"Landscape",P:"Portrait",S:"Square"}]]);var Xe={exports:{}},qt;function en(){return qt||(qt=1,(function(n,e){(function(){var t={};t.version="1.0.4",t.remove=function(s){var o=!1;if(s.slice(0,2)!="ÿØ")if(s.slice(0,23)=="data:image/jpeg;base64,"||s.slice(0,22)=="data:image/jpg;base64,")s=L(s.split(",")[1]),o=!0;else throw new Error("Given data is not jpeg.");var l=re(s),f=l.filter(function(u){return!(u.slice(0,2)=="ÿá"&&u.slice(4,10)=="Exif\0\0")}),d=f.join("");return o&&(d="data:image/jpeg;base64,"+A(d)),d},t.insert=function(s,o){var l=!1;if(s.slice(0,6)!="Exif\0\0")throw new Error("Given data is not exif.");if(o.slice(0,2)!="ÿØ")if(o.slice(0,23)=="data:image/jpeg;base64,"||o.slice(0,22)=="data:image/jpg;base64,")o=L(o.split(",")[1]),l=!0;else throw new Error("Given data is not jpeg.");var f="ÿá"+C(">H",[s.length+2])+s,d=re(o),u=rt(d,f);return l&&(u="data:image/jpeg;base64,"+A(u)),u},t.load=function(s){var o;if(typeof s=="string")if(s.slice(0,2)=="ÿØ")o=s;else if(s.slice(0,23)=="data:image/jpeg;base64,"||s.slice(0,22)=="data:image/jpg;base64,")o=L(s.split(",")[1]);else if(s.slice(0,4)=="Exif")o=s.slice(6);else throw new Error("'load' gots invalid file data.");else throw new Error("'load' gots invalid type argument.");var l={"0th":{},Exif:{},GPS:{},Interop:{},"1st":{},thumbnail:null},f=new P(o);if(f.tiftag===null)return l;f.tiftag.slice(0,2)=="II"?f.endian_mark="<":f.endian_mark=">";var d=k(f.endian_mark+"L",f.tiftag.slice(4,8))[0];l["0th"]=f.get_ifd(d,"0th");var u=l["0th"].first_ifd_pointer;if(delete l["0th"].first_ifd_pointer,34665 in l["0th"]&&(d=l["0th"][34665],l.Exif=f.get_ifd(d,"Exif")),34853 in l["0th"]&&(d=l["0th"][34853],l.GPS=f.get_ifd(d,"GPS")),40965 in l.Exif&&(d=l.Exif[40965],l.Interop=f.get_ifd(d,"Interop")),u!="\0\0\0\0"&&(d=k(f.endian_mark+"L",u)[0],l["1st"]=f.get_ifd(d,"1st"),513 in l["1st"]&&514 in l["1st"])){var g=l["1st"][513]+l["1st"][514],I=f.tiftag.slice(l["1st"][513],g);l.thumbnail=I}return l},t.dump=function(s){var o=8,l=i(s),f="Exif\0\0MM\0*\0\0\0\b",d=!1,u=!1,g=!1,I=!1,w,v,R,T,le;"0th"in l?w=l["0th"]:w={},"Exif"in l&&Object.keys(l.Exif).length||"Interop"in l&&Object.keys(l.Interop).length?(w[34665]=1,d=!0,v=l.Exif,"Interop"in l&&Object.keys(l.Interop).length?(v[40965]=1,g=!0,R=l.Interop):Object.keys(v).indexOf(t.ExifIFD.InteroperabilityTag.toString())>-1&&delete v[40965]):Object.keys(w).indexOf(t.ImageIFD.ExifTag.toString())>-1&&delete w[34665],"GPS"in l&&Object.keys(l.GPS).length?(w[t.ImageIFD.GPSTag]=1,u=!0,T=l.GPS):Object.keys(w).indexOf(t.ImageIFD.GPSTag.toString())>-1&&delete w[t.ImageIFD.GPSTag],"1st"in l&&"thumbnail"in l&&l.thumbnail!=null&&(I=!0,l["1st"][513]=1,l["1st"][514]=1,le=l["1st"]);var y=x(w,"0th",0),p=y[0].length+d*12+u*12+4+y[1].length,D,E="",O=0,N,K="",J=0,Re,ye="",se=0,$,ie="",Z;if(d&&(D=x(v,"Exif",p),O=D[0].length+g*12+D[1].length),u&&(N=x(T,"GPS",p+O),K=N.join(""),J=K.length),g){var q=p+O+J;Re=x(R,"Interop",q),ye=Re.join(""),se=ye.length}if(I){var q=p+O+J+se;if($=x(le,"1st",q),Z=a(l.thumbnail),Z.length>64e3)throw new Error("Given thumbnail is too large. max 64kB")}var At="",Tt="",Rt="",Lt="\0\0\0\0";if(d){var he=o+p,Le=C(">L",[he]),Oe=34665,Me=C(">H",[Oe]),Fe=C(">H",[me.Long]),Ee=C(">L",[1]);At=Me+Fe+Ee+Le}if(u){var he=o+p+O,Le=C(">L",[he]),Oe=34853,Me=C(">H",[Oe]),Fe=C(">H",[me.Long]),Ee=C(">L",[1]);Tt=Me+Fe+Ee+Le}if(g){var he=o+p+O+J,Le=C(">L",[he]),Oe=40965,Me=C(">H",[Oe]),Fe=C(">H",[me.Long]),Ee=C(">L",[1]);Rt=Me+Fe+Ee+Le}if(I){var he=o+p+O+J+se;Lt=C(">L",[he]);var ci=he+$[0].length+24+4+$[1].length,fi="��\0�\0\0\0�"+C(">L",[ci]),di="��\0�\0\0\0�"+C(">L",[Z.length]);ie=$[0]+fi+di+"\0\0\0\0"+$[1]+Z}var pi=y[0]+At+Tt+Lt+y[1];
3return d&&(E=D[0]+Rt+D[1]),f+pi+E+K+ye+ie};function i(s){return JSON.parse(JSON.stringify(s))}function a(s){for(var o=re(s);"ÿà"<=o[1].slice(0,2)&&o[1].slice(0,2)<="ÿï";)o=[o[0]].concat(o.slice(2));return o.join("")}function r(s){return C(">"+B("B",s.length),s)}function h(s){return C(">"+B("H",s.length),s)}function c(s){return C(">"+B("L",s.length),s)}function m(s,o,l){var f="",d="",u,g,I,w;if(o=="Byte")u=s.length,u<=4?d=r(s)+B("\0",4-u):(d=C(">L",[l]),f=r(s));else if(o=="Short")u=s.length,u<=2?d=h(s)+B("\0\0",2-u):(d=C(">L",[l]),f=h(s));else if(o=="Long")u=s.length,u<=1?d=c(s):(d=C(">L",[l]),f=c(s));else if(o=="Ascii")g=s+"\0",u=g.length,u>4?(d=C(">L",[l]),f=g):d=g+B("\0",4-u);else if(o=="Rational"){if(typeof s[0]=="number")u=1,I=s[0],w=s[1],g=C(">L",[I])+C(">L",[w]);else{u=s.length,g="";for(var v=0;v<u;v++)I=s[v][0],w=s[v][1],g+=C(">L",[I])+C(">L",[w])}d=C(">L",[l]),f=g}else if(o=="SRational"){if(typeof s[0]=="number")u=1,I=s[0],w=s[1],g=C(">l",[I])+C(">l",[w]);else{u=s.length,g="";for(var v=0;v<u;v++)I=s[v][0],w=s[v][1],g+=C(">l",[I])+C(">l",[w])}d=C(">L",[l]),f=g}else o=="Undefined"&&(u=s.length,u>4?(d=C(">L",[l]),f=s):d=s+B("\0",4-u));var R=C(">L",[u]);return[R,d,f]}function x(s,o,l){var f=8,d=Object.keys(s).length,u=C(">H",[d]),g;["0th","1st"].indexOf(o)>-1?g=2+d*12+4:g=2+d*12;var I="",w="",v;for(var v in s)if(typeof v=="string"&&(v=parseInt(v)),!(o=="0th"&&[34665,34853].indexOf(v)>-1)){{if(o=="Exif"&&v==40965)continue;if(o=="1st"&&[513,514].indexOf(v)>-1)continue}var R=s[v],T=C(">H",[v]),le=Q[o][v].type,y=C(">H",[me[le]]);typeof R=="number"&&(R=[R]);var p=f+g+l+w.length,D=m(R,le,p),E=D[0],O=D[1],N=D[2];I+=T+y+E+O,w+=N}return[u+I,w]}function P(s){var o,l;if(s.slice(0,2)=="ÿØ")o=re(s),l=Ie(o),l?this.tiftag=l.slice(10):this.tiftag=null;else if(["II","MM"].indexOf(s.slice(0,2))>-1)this.tiftag=s;else if(s.slice(0,4)=="Exif")this.tiftag=s.slice(6);else throw new Error("Given file is neither JPEG nor TIFF.")}if(P.prototype={get_ifd:function(s,o){var l={},f=k(this.endian_mark+"H",this.tiftag.slice(s,s+2))[0],d=s+2,u;["0th","1st"].indexOf(o)>-1?u="Image":u=o;for(var g=0;g<f;g++){s=d+12*g;var I=k(this.endian_mark+"H",this.tiftag.slice(s,s+2))[0],w=k(this.endian_mark+"H",this.tiftag.slice(s+2,s+4))[0],v=k(this.endian_mark+"L",this.tiftag.slice(s+4,s+8))[0],R=this.tiftag.slice(s+8,s+12),T=[w,v,R];I in Q[u]&&(l[I]=this.convert_value(T))}return o=="0th"&&(s=d+12*f,l.first_ifd_pointer=this.tiftag.slice(s,s+4)),l},convert_value:function(s){var o=null,l=s[0],f=s[1],d=s[2],u;if(l==1)f>4?(u=k(this.endian_mark+"L",d)[0],o=k(this.endian_mark+B("B",f),this.tiftag.slice(u,u+f))):o=k(this.endian_mark+B("B",f),d.slice(0,f));else if(l==2)f>4?(u=k(this.endian_mark+"L",d)[0],o=this.tiftag.slice(u,u+f-1)):o=d.slice(0,f-1);else if(l==3)f>2?(u=k(this.endian_mark+"L",d)[0],o=k(this.endian_mark+B("H",f),this.tiftag.slice(u,u+f*2))):o=k(this.endian_mark+B("H",f),d.slice(0,f*2));else if(l==4)f>1?(u=k(this.endian_mark+"L",d)[0],o=k(this.endian_mark+B("L",f),this.tiftag.slice(u,u+f*4))):o=k(this.endian_mark+B("L",f),d);else if(l==5)if(u=k(this.endian_mark+"L",d)[0],f>1){o=[];for(var g=0;g<f;g++)o.push([k(this.endian_mark+"L",this.tiftag.slice(u+g*8,u+4+g*8))[0],k(this.endian_mark+"L",this.tiftag.slice(u+4+g*8,u+8+g*8))[0]])}else o=[k(this.endian_mark+"L",this.tiftag.slice(u,u+4))[0],k(this.endian_mark+"L",this.tiftag.slice(u+4,u+8))[0]];else if(l==7)f>4?(u=k(this.endian_mark+"L",d)[0],o=this.tiftag.slice(u,u+f)):o=d.slice(0,f);else if(l==9)f>1?(u=k(this.endian_mark+"L",d)[0],o=k(this.endian_mark+B("l",f),this.tiftag.slice(u,u+f*4))):o=k(this.endian_mark+B("l",f),d);else if(l==10)if(u=k(this.endian_mark+"L",d)[0],f>1){o=[];for(var g=0;g<f;g++)o.push([k(this.endian_mark+"l",this.tiftag.slice(u+g*8,u+4+g*8))[0],k(this.endian_mark+"l",this.tiftag.slice(u+4+g*8,u+8+g*8))[0]])}else o=[k(this.endian_mark+"l",this.tiftag.slice(u,u+4))[0],k(this.endian_mark+"l",this.tiftag.slice(u+4,u+8))[0]];else throw new Error("Exif might be wrong. Got incorrect value type to decode. type:"+l);return o instanceof Array&&o.length==1?o[0]:o}},typeof window<"u"&&typeof window.btoa=="function")var A=window.btoa;if(typeof A>"u")var A=function(o){for(var l="",f,d,u,g,I,w,v,R=0,T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
3+/=";R<o.length;)f=o.charCodeAt(R++),d=o.charCodeAt(R++),u=o.charCodeAt(R++),g=f>>2,I=(f&3)<<4|d>>4,w=(d&15)<<2|u>>6,v=u&63,isNaN(d)?w=v=64:isNaN(u)&&(v=64),l=l+T.charAt(g)+T.charAt(I)+T.charAt(w)+T.charAt(v);return l};if(typeof window<"u"&&typeof window.atob=="function")var L=window.atob;if(typeof L>"u")var L=function(o){var l="",f,d,u,g,I,w,v,R=0,T="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";for(o=o.replace(/[^A-Za-z0-9\+\/\=]/g,"");R<o.length;)g=T.indexOf(o.charAt(R++)),I=T.indexOf(o.charAt(R++)),w=T.indexOf(o.charAt(R++)),v=T.indexOf(o.charAt(R++)),f=g<<2|I>>4,d=(I&15)<<4|w>>2,u=(w&3)<<6|v,l=l+String.fromCharCode(f),w!=64&&(l=l+String.fromCharCode(d)),v!=64&&(l=l+String.fromCharCode(u));return l};function C(s,o){if(!(o instanceof Array))throw new Error("'pack' error. Got invalid type argument.");if(s.length-1!=o.length)throw new Error("'pack' error. "+(s.length-1)+" marks, "+o.length+" elements.");var l;if(s[0]=="<")l=!0;else if(s[0]==">")l=!1;else throw new Error("");for(var f="",d=1,u=null,g=null,I=null;g=s[d];){if(g.toLowerCase()=="b"){if(u=o[d-1],g=="b"&&u<0&&(u+=256),u>255||u<0)throw new Error("'pack' error.");I=String.fromCharCode(u)}else if(g=="H"){if(u=o[d-1],u>65535||u<0)throw new Error("'pack' error.");I=String.fromCharCode(Math.floor(u%65536/256))+String.fromCharCode(u%256),l&&(I=I.split("").reverse().join(""))}else if(g.toLowerCase()=="l"){if(u=o[d-1],g=="l"&&u<0&&(u+=4294967296),u>4294967295||u<0)throw new Error("'pack' error.");I=String.fromCharCode(Math.floor(u/16777216))+String.fromCharCode(Math.floor(u%16777216/65536))+String.fromCharCode(Math.floor(u%65536/256))+String.fromCharCode(u%256),l&&(I=I.split("").reverse().join(""))}else throw new Error("'pack' error.");f+=I,d+=1}return f}function k(s,o){if(typeof o!="string")throw new Error("'unpack' error. Got invalid type argument.");for(var l=0,f=1;f<s.length;f++)if(s[f].toLowerCase()=="b")l+=1;else if(s[f].toLowerCase()=="h")l+=2;else if(s[f].toLowerCase()=="l")l+=4;else throw new Error("'unpack' error. Got invalid mark.");if(l!=o.length)throw new Error("'unpack' error. Mismatch between symbol and string length. "+l+":"+o.length);var d;if(s[0]=="<")d=!0;else if(s[0]==">")d=!1;else throw new Error("'unpack' error.");for(var u=[],g=0,I=1,w=null,v=null,R=null,T="";v=s[I];){if(v.toLowerCase()=="b")R=1,T=o.slice(g,g+R),w=T.charCodeAt(0),v=="b"&&w>=128&&(w-=256);else if(v=="H")R=2,T=o.slice(g,g+R),d&&(T=T.split("").reverse().join("")),w=T.charCodeAt(0)*256+T.charCodeAt(1);else if(v.toLowerCase()=="l")R=4,T=o.slice(g,g+R),d&&(T=T.split("").reverse().join("")),w=T.charCodeAt(0)*16777216+T.charCodeAt(1)*65536+T.charCodeAt(2)*256+T.charCodeAt(3),v=="l"&&w>=2147483648&&(w-=4294967296);else throw new Error("'unpack' error. "+v);u.push(w),g+=R,I+=1}return u}function B(s,o){for(var l="",f=0;f<o;f++)l+=s;return l}function re(s){if(s.slice(0,2)!="ÿØ")throw new Error("Given data isn't JPEG.");for(var o=2,l=["ÿØ"];;){if(s.slice(o,o+2)=="ÿÚ"){l.push(s.slice(o));break}else{var f=k(">H",s.slice(o+2,o+4))[0],d=o+f+2;l.push(s.slice(o,d)),o=d}if(o>=s.length)throw new Error("Wrong JPEG data.")}return l}function Ie(s){for(var o,l=0;l<s.length;l++)if(o=s[l],o.slice(0,2)=="ÿá"&&o.slice(4,10)=="Exif\0\0")return o;return null}function rt(s,o){var l=!1,f=[];return s.forEach(function(d,u){d.slice(0,2)=="ÿá"&&d.slice(4,10)=="Exif\0\0"&&(l?f.unshift(u):(s[u]=o,l=!0))}),f.forEach(function(d){s.splice(d,1)}),!l&&o&&(s=[s[0],o].concat(s.slice(1))),s.join("")}var me={Byte:1,Ascii:2,Short:3,Long:4,Rational:5,Undefined:7,SLong:9,SRational:10},Q={Image:{11:{name:"ProcessingSoftware",type:"Ascii"},254:{name:"NewSubfileType",type:"Long"},255:{name:"SubfileType",type:"Short"},256:{name:"ImageWidth",type:"Long"},257:{name:"ImageLength",type:"Long"},258:{name:"BitsPerSample",type:"Short"},259:{name:"Compression",type:"Short"},262:{name:"PhotometricInterpretation",type:"Short"},263:{name:"Threshholding",type:"Short"},264:{name:"CellWidth",type:"Short"},265:{name:"CellLength",type:"Short"},266:{name:"FillOrder",type:"Short"},269:{name:"DocumentName",type:"Ascii"},270:{name:"ImageDescription",type:"Ascii"},271:{name:"Make",type:"Ascii"},272:{name:"Model",type:"Ascii"},273:{name:"StripOffsets",type:"Long"},274:{name:"Orientation",type:"Short"},277:{name:"SamplesPerPixel",type:"Short"},278:{name:"RowsPerStrip",type:"Long"},279:{name:"StripByteCounts",type:"Long"},282:{name:"XResolution",type:"Rational"},283:{name:"YResolution",type:"Rational"},284:{name:"PlanarConfiguration",type:"Short"},290:{name:"GrayResponseUnit",type:"Short"},291:{name:"GrayResponseCurve",type:"Short"},292:{name:"T4Options",type:"Long"},293:{name:"T6Options",type:"Long"},296:{name:"ResolutionUnit",type:"Short"},301:{name:"TransferFunction",type:"Short"},305:{name:"Software",type:"Ascii"},306:{name:"DateTime",type:"Ascii"},315:{name:"Artist",type:"Ascii"},316:{name:"HostComputer",type:"Ascii"},317:{name:"Predictor",type:"Short"},318:{name:"WhitePoint",type:"Rational"},319:{name:"PrimaryChromaticities",type:"Rational"},320:{name:"ColorMap",type:"Short"},321:{name:"HalftoneHints",type:"Short"},322:{name:"TileWidth",type:"Short"},323:{name:"TileLength",type:"Short"},324:{name:"TileOffsets",type:"Short"},325:{name:"TileByteCounts",type:"Short"},330:{name:"SubIFDs",type:"Long"},332:{name:"InkSet",type:"Short"},333:{name:"InkNames",type:"Ascii"},334:{name:"NumberOfInks",type:"Short"},336:{name:"DotRange",type:"Byte"},337:{name:"TargetPrinter",type:"Ascii"},338:{name:"ExtraSamples",type:"Short"},339:{name:"SampleFormat",type:"Short"},340:{name:"SMinSampleValue",type:"Short"},341:{name:"SMaxSampleValue",type:"Short"},342:{name:"TransferRange",type:"Short"},343:{name:"ClipPath",type:"Byte"},344:{name:"XClipPathUnits",type:"Long"},345:{name:"YClipPathUnits",type:"Long"},346:{name:"Indexed",type:"Short"},347:{name:"JPEGTables",type:"Undefined"},351:{name:"OPIProxy",type:"Short"},512:{name:"JPEGProc",type:"Long"},513:{name:"JPEGInterchangeFormat",type:"Long"},514:{name:"JPEGInterchangeFormatLength",type:"Long"},515:{name:"JPEGRestartInterval",type:"Short"},517:{name:"JPEGLosslessPredictors",type:"Short"},518:{name:"JPEGPointTransforms",type:"Short"},519:{name:"JPEGQTables",type:"Long"},520:{name:"JPEGDCTables",type:"Long"},521:{name:"JPEGACTables",type:"Long"},529:{name:"YCbCrCoefficients",type:"Rational"},530:{name:"YCbCrSubSampling",type:"Short"},531:{name:"YCbCrPositioning",type:"Short"},532:{name:"ReferenceBlackWhite",type:"Rational"},700:{name:"XMLPacket",type:"Byte"},18246:{name:"Rating",type:"Short"}
3,18249:{name:"RatingPercent",type:"Short"},32781:{name:"ImageID",type:"Ascii"},33421:{name:"CFARepeatPatternDim",type:"Short"},33422:{name:"CFAPattern",type:"Byte"},33423:{name:"BatteryLevel",type:"Rational"},33432:{name:"Copyright",type:"Ascii"},33434:{name:"ExposureTime",type:"Rational"},34377:{name:"ImageResources",type:"Byte"},34665:{name:"ExifTag",type:"Long"},34675:{name:"InterColorProfile",type:"Undefined"},34853:{name:"GPSTag",type:"Long"},34857:{name:"Interlace",type:"Short"},34858:{name:"TimeZoneOffset",type:"Long"},34859:{name:"SelfTimerMode",type:"Short"},37387:{name:"FlashEnergy",type:"Rational"},37388:{name:"SpatialFrequencyResponse",type:"Undefined"},37389:{name:"Noise",type:"Undefined"},37390:{name:"FocalPlaneXResolution",type:"Rational"},37391:{name:"FocalPlaneYResolution",type:"Rational"},37392:{name:"FocalPlaneResolutionUnit",type:"Short"},37393:{name:"ImageNumber",type:"Long"},37394:{name:"SecurityClassification",type:"Ascii"},37395:{name:"ImageHistory",type:"Ascii"},37397:{name:"ExposureIndex",type:"Rational"},37398:{name:"TIFFEPStandardID",type:"Byte"},37399:{name:"SensingMethod",type:"Short"},40091:{name:"XPTitle",type:"Byte"},40092:{name:"XPComment",type:"Byte"},40093:{name:"XPAuthor",type:"Byte"},40094:{name:"XPKeywords",type:"Byte"},40095:{name:"XPSubject",type:"Byte"},50341:{name:"PrintImageMatching",type:"Undefined"},50706:{name:"DNGVersion",type:"Byte"},50707:{name:"DNGBackwardVersion",type:"Byte"},50708:{name:"UniqueCameraModel",type:"Ascii"},50709:{name:"LocalizedCameraModel",type:"Byte"},50710:{name:"CFAPlaneColor",type:"Byte"},50711:{name:"CFALayout",type:"Short"},50712:{name:"LinearizationTable",type:"Short"},50713:{name:"BlackLevelRepeatDim",type:"Short"},50714:{name:"BlackLevel",type:"Rational"},50715:{name:"BlackLevelDeltaH",type:"SRational"},50716:{name:"BlackLevelDeltaV",type:"SRational"},50717:{name:"WhiteLevel",type:"Short"},50718:{name:"DefaultScale",type:"Rational"},50719:{name:"DefaultCropOrigin",type:"Short"},50720:{name:"DefaultCropSize",type:"Short"},50721:{name:"ColorMatrix1",type:"SRational"},50722:{name:"ColorMatrix2",type:"SRational"},50723:{name:"CameraCalibration1",type:"SRational"},50724:{name:"CameraCalibration2",type:"SRational"},50725:{name:"ReductionMatrix1",type:"SRational"},50726:{name:"ReductionMatrix2",type:"SRational"},50727:{name:"AnalogBalance",type:"Rational"},50728:{name:"AsShotNeutral",type:"Short"},50729:{name:"AsShotWhiteXY",type:"Rational"},50730:{name:"BaselineExposure",type:"SRational"},50731:{name:"BaselineNoise",type:"Rational"},50732:{name:"BaselineSharpness",type:"Rational"},50733:{name:"BayerGreenSplit",type:"Long"},50734:{name:"LinearResponseLimit",type:"Rational"},50735:{name:"CameraSerialNumber",type:"Ascii"},50736:{name:"LensInfo",type:"Rational"},50737:{name:"ChromaBlurRadius",type:"Rational"},50738:{name:"AntiAliasStrength",type:"Rational"},50739:{name:"ShadowScale",type:"SRational"},50740:{name:"DNGPrivateData",type:"Byte"},50741:{name:"MakerNoteSafety",type:"Short"},50778:{name:"CalibrationIlluminant1",type:"Short"},50779:{name:"CalibrationIlluminant2",type:"Short"},50780:{name:"BestQualityScale",type:"Rational"},50781:{name:"RawDataUniqueID",type:"Byte"},50827:{name:"OriginalRawFileName",type:"Byte"},50828:{name:"OriginalRawFileData",type:"Undefined"},50829:{name:"ActiveArea",type:"Short"},50830:{name:"MaskedAreas",type:"Short"},50831:{name:"AsShotICCProfile",type:"Undefined"},50832:{name:"AsShotPreProfileMatrix",type:"SRational"},50833:{name:"CurrentICCProfile",type:"Undefined"},50834:{name:"CurrentPreProfileMatrix",type:"SRational"},50879:{name:"ColorimetricReference",type:"Short"},50931:{name:"CameraCalibrationSignature",type:"Byte"},50932:{name:"ProfileCalibrationSignature",type:"Byte"},50934:{name:"AsShotProfileName",type:"Byte"},50935:{name:"NoiseReductionApplied",type:"Rational"},50936:{name:"ProfileName",type:"Byte"},50937:{name:"ProfileHueSatMapDims",type:"Long"},50938:{name:"ProfileHueSatMapData1",type:"Float"},50939:{name:"ProfileHueSatMapData2",type:"Float"},50940:{name:"ProfileToneCurve",type:"Float"}
3,50941:{name:"ProfileEmbedPolicy",type:"Long"},50942:{name:"ProfileCopyright",type:"Byte"},50964:{name:"ForwardMatrix1",type:"SRational"},50965:{name:"ForwardMatrix2",type:"SRational"},50966:{name:"PreviewApplicationName",type:"Byte"},50967:{name:"PreviewApplicationVersion",type:"Byte"},50968:{name:"PreviewSettingsName",type:"Byte"},50969:{name:"PreviewSettingsDigest",type:"Byte"},50970:{name:"PreviewColorSpace",type:"Long"},50971:{name:"PreviewDateTime",type:"Ascii"},50972:{name:"RawImageDigest",type:"Undefined"},50973:{name:"OriginalRawFileDigest",type:"Undefined"},50974:{name:"SubTileBlockSize",type:"Long"},50975:{name:"RowInterleaveFactor",type:"Long"},50981:{name:"ProfileLookTableDims",type:"Long"},50982:{name:"ProfileLookTableData",type:"Float"},51008:{name:"OpcodeList1",type:"Undefined"},51009:{name:"OpcodeList2",type:"Undefined"},51022:{name:"OpcodeList3",type:"Undefined"}},Exif:{33434:{name:"ExposureTime",type:"Rational"},33437:{name:"FNumber",type:"Rational"},34850:{name:"ExposureProgram",type:"Short"},34852:{name:"SpectralSensitivity",type:"Ascii"},34855:{name:"ISOSpeedRatings",type:"Short"},34856:{name:"OECF",type:"Undefined"},34864:{name:"SensitivityType",type:"Short"},34865:{name:"StandardOutputSensitivity",type:"Long"},34866:{name:"RecommendedExposureIndex",type:"Long"},34867:{name:"ISOSpeed",type:"Long"},34868:{name:"ISOSpeedLatitudeyyy",type:"Long"},34869:{name:"ISOSpeedLatitudezzz",type:"Long"},36864:{name:"ExifVersion",type:"Undefined"},36867:{name:"DateTimeOriginal",type:"Ascii"},36868:{name:"DateTimeDigitized",type:"Ascii"},37121:{name:"ComponentsConfiguration",type:"Undefined"},37122:{name:"CompressedBitsPerPixel",type:"Rational"},37377:{name:"ShutterSpeedValue",type:"SRational"},37378:{name:"ApertureValue",type:"Rational"},37379:{name:"BrightnessValue",type:"SRational"},37380:{name:"ExposureBiasValue",type:"SRational"},37381:{name:"MaxApertureValue",type:"Rational"},37382:{name:"SubjectDistance",type:"Rational"},37383:{name:"MeteringMode",type:"Short"},37384:{name:"LightSource",type:"Short"},37385:{name:"Flash",type:"Short"},37386:{name:"FocalLength",type:"Rational"},37396:{name:"SubjectArea",type:"Short"},37500:{name:"MakerNote",type:"Undefined"},37510:{name:"UserComment",type:"Ascii"},37520:{name:"SubSecTime",type:"Ascii"},37521:{name:"SubSecTimeOriginal",type:"Ascii"},37522:{name:"SubSecTimeDigitized",type:"Ascii"},40960:{name:"FlashpixVersion",type:"Undefined"},40961:{name:"ColorSpace",type:"Short"},40962:{name:"PixelXDimension",type:"Long"},40963:{name:"PixelYDimension",type:"Long"},40964:{name:"RelatedSoundFile",type:"Ascii"},40965:{name:"InteroperabilityTag",type:"Long"},41483:{name:"FlashEnergy",type:"Rational"},41484:{name:"SpatialFrequencyResponse",type:"Undefined"},41486:{name:"FocalPlaneXResolution",type:"Rational"},41487:{name:"FocalPlaneYResolution",type:"Rational"},41488:{name:"FocalPlaneResolutionUnit",type:"Short"},41492:{name:"SubjectLocation",type:"Short"},41493:{name:"ExposureIndex",type:"Rational"},41495:{name:"SensingMethod",type:"Short"},41728:{name:"FileSource",type:"Undefined"},41729:{name:"SceneType",type:"Undefined"},41730:{name:"CFAPattern",type:"Undefined"},41985:{name:"CustomRendered",type:"Short"},41986:{name:"ExposureMode",type:"Short"},41987:{name:"WhiteBalance",type:"Short"},41988:{name:"DigitalZoomRatio",type:"Rational"},41989:{name:"FocalLengthIn35mmFilm",type:"Short"},41990:{name:"SceneCaptureType",type:"Short"},41991:{name:"GainControl",type:"Short"},41992:{name:"Contrast",type:"Short"},41993:{name:"Saturation",type:"Short"},41994:{name:"Sharpness",type:"Short"},41995:{name:"DeviceSettingDescription",type:"Undefined"},41996:{name:"SubjectDistanceRange",type:"Short"},42016:{name:"ImageUniqueID",type:"Ascii"},42032:{name:"CameraOwnerName",type:"Ascii"},42033:{name:"BodySerialNumber",type:"Ascii"},42034:{name:"LensSpecification",type:"Rational"},42035:{name:"LensMake",type:"Ascii"},42036:{name:"LensModel",type:"Ascii"},42037:{name:"LensSerialNumber",type:"Ascii"},42240:{name:"Gamma",type:"Rational"}},GPS:{0:{name:"GPSVersionID",type:"Byte"},1:{name:"GPSLatitudeRef",type:"Ascii"},2:{name:"GPSLatitude",type:"Rational"},3:{name:"GPSLongitudeRef",type:"Ascii"},4:{name:"GPSLongitude",type:"Rational"},5:{name:"GPSAltitudeRef",type:"Byte"},6:{name:"GPSAltitude",type:"Rational"},7:{name:"GPSTimeStamp",type:"Rational"},8:{name:"GPSSatellites",type:"Ascii"},9:{name:"GPSStatus",type:"Ascii"},10:{name:"GPSMeasureMode",type:"Ascii"},11:{name:"GPSDOP",type:"Rational"},12:{name:"GPSSpeedRef",type:"Ascii"},13:{name:"GPSSpeed",type:"Rational"},14:{name:"GPSTrackRef",type:"Ascii"},15:{name:"GPSTrack",type:"Rational"},16:{name:"GPSImgDirectionRef",type:"Ascii"}
3,17:{name:"GPSImgDirection",type:"Rational"},18:{name:"GPSMapDatum",type:"Ascii"},19:{name:"GPSDestLatitudeRef",type:"Ascii"},20:{name:"GPSDestLatitude",type:"Rational"},21:{name:"GPSDestLongitudeRef",type:"Ascii"},22:{name:"GPSDestLongitude",type:"Rational"},23:{name:"GPSDestBearingRef",type:"Ascii"},24:{name:"GPSDestBearing",type:"Rational"},25:{name:"GPSDestDistanceRef",type:"Ascii"},26:{name:"GPSDestDistance",type:"Rational"},27:{name:"GPSProcessingMethod",type:"Undefined"},28:{name:"GPSAreaInformation",type:"Undefined"},29:{name:"GPSDateStamp",type:"Ascii"},30:{name:"GPSDifferential",type:"Short"},31:{name:"GPSHPositioningError",type:"Rational"}},Interop:{1:{name:"InteroperabilityIndex",type:"Ascii"}}};Q["0th"]=Q.Image,Q["1st"]=Q.Image,t.TAGS=Q,t.ImageIFD={ProcessingSoftware:11,NewSubfileType:254,SubfileType:255,ImageWidth:256,ImageLength:257,BitsPerSample:258,Compression:259,PhotometricInterpretation:262,Threshholding:263,CellWidth:264,CellLength:265,FillOrder:266,DocumentName:269,ImageDescription:270,Make:271,Model:272,StripOffsets:273,Orientation:274,SamplesPerPixel:277,RowsPerStrip:278,StripByteCounts:279,XResolution:282,YResolution:283,PlanarConfiguration:284,GrayResponseUnit:290,GrayResponseCurve:291,T4Options:292,T6Options:293,ResolutionUnit:296,TransferFunction:301,Software:305,DateTime:306,Artist:315,HostComputer:316,Predictor:317,WhitePoint:318,PrimaryChromaticities:319,ColorMap:320,HalftoneHints:321,TileWidth:322,TileLength:323,TileOffsets:324,TileByteCounts:325,SubIFDs:330,InkSet:332,InkNames:333,NumberOfInks:334,DotRange:336,TargetPrinter:337,ExtraSamples:338,SampleFormat:339,SMinSampleValue:340,SMaxSampleValue:341,TransferRange:342,ClipPath:343,XClipPathUnits:344,YClipPathUnits:345,Indexed:346,JPEGTables:347,OPIProxy:351,JPEGProc:512,JPEGInterchangeFormat:513,JPEGInterchangeFormatLength:514,JPEGRestartInterval:515,JPEGLosslessPredictors:517,JPEGPointTransforms:518,JPEGQTables:519,JPEGDCTables:520,JPEGACTables:521,YCbCrCoefficients:529,YCbCrSubSampling:530,YCbCrPositioning:531,ReferenceBlackWhite:532,XMLPacket:700,Rating:18246,RatingPercent:18249,ImageID:32781,CFARepeatPatternDim:33421,CFAPattern:33422,BatteryLevel:33423,Copyright:33432,ExposureTime:33434,ImageResources:34377,ExifTag:34665,InterColorProfile:34675,GPSTag:34853,Interlace:34857,TimeZoneOffset:34858,SelfTimerMode:34859,FlashEnergy:37387,SpatialFrequencyResponse:37388,Noise:37389,FocalPlaneXResolution:37390,FocalPlaneYResolution:37391,FocalPlaneResolutionUnit:37392,ImageNumber:37393,SecurityClassification:37394,ImageHistory:37395,ExposureIndex:37397,TIFFEPStandardID:37398,SensingMethod:37399,XPTitle:40091,XPComment:40092,XPAuthor:40093,XPKeywords:40094,XPSubject:40095,PrintImageMatching:50341,DNGVersion:50706,DNGBackwardVersion:50707,UniqueCameraModel:50708,LocalizedCameraModel:50709,CFAPlaneColor:50710,CFALayout:50711,LinearizationTable:50712,BlackLevelRepeatDim:50713,BlackLevel:50714,BlackLevelDeltaH:50715,BlackLevelDeltaV:50716,WhiteLevel:50717,DefaultScale:50718,DefaultCropOrigin:50719,DefaultCropSize:50720,ColorMatrix1:50721,ColorMatrix2:50722,CameraCalibration1:50723,CameraCalibration2:50724,ReductionMatrix1:50725,ReductionMatrix2:50726,AnalogBalance:50727,AsShotNeutral:50728,AsShotWhiteXY:50729,BaselineExposure:50730,BaselineNoise:50731,BaselineSharpness:50732,BayerGreenSplit:50733,LinearResponseLimit:50734,CameraSerialNumber:50735,LensInfo:50736,ChromaBlurRadius:50737,AntiAliasStrength:50738,ShadowScale:50739,DNGPrivateData:50740,MakerNoteSafety:50741,CalibrationIlluminant1:50778,CalibrationIlluminant2:50779,BestQualityScale:50780,RawDataUniqueID:50781,OriginalRawFileName:50827,OriginalRawFileData:50828,ActiveArea:50829,MaskedAreas:50830,AsShotICCProfile:50831,AsShotPreProfileMatrix:50832,CurrentICCProfile:50833,CurrentPreProfileMatrix:50834,ColorimetricReference:50879,CameraCalibrationSignature:50931,ProfileCalibrationSignature:50932,AsShotProfileName:50934,NoiseReductionApplied:50935,ProfileName:50936,ProfileHueSatMapDims:50937,ProfileHueSatMapData1:50938,ProfileHueSatMapData2:50939,ProfileToneCurve:50940,ProfileEmbedPolicy:50941,ProfileCopyright:50942,ForwardMatrix1:50964,ForwardMatrix2:50965,PreviewApplicationName:50966,PreviewApplicationVersion:50967,PreviewSettingsName:50968,PreviewSettingsDigest:50969,PreviewColorSpace:50970,PreviewDateTime:50971,RawImageDigest:50972,OriginalRawFileDigest:50973,SubTileBlockSize:50974,RowInterleaveFactor:50975,ProfileLookTableDims:50981,ProfileLookTableData:50982,OpcodeList1:51008,OpcodeList2:51009,OpcodeList3:51022,NoiseProfile:51041},t.ExifIFD={ExposureTime:33434,FNumber:33437,ExposureProgram:34850,SpectralSensitivity:34852,ISOSpeedRatings:34855,OECF:34856,SensitivityType:34864,StandardOutputSensitivity:34865,RecommendedExposureIndex:34866,ISOSpeed:34867,ISOSpeedLatitudeyyy:34868,ISOSpeedLatitudezzz:34869,ExifVersion:36864,DateTimeOriginal:36867,DateTimeDigitized:36868,ComponentsConfiguration:37121,CompressedBitsPerPixel:37122,ShutterSpeedValue:37377,ApertureValue:37378,BrightnessValue:37379,ExposureBiasValue:37380,MaxApertureValue:37381,SubjectDistance:37382,MeteringMode:37383,LightSource:37384,Flash:37385,FocalLength:37386,SubjectArea:37396,MakerNote:37500,UserComment:37510,SubSecTime:37520,SubSecTimeOriginal:37521,SubSecTimeDigitized:37522,FlashpixVersion:40960,ColorSpace:40961,PixelXDimension:40962,PixelYDimension:40963,RelatedSoundFile:40964,InteroperabilityTag:40965,FlashEnergy:41483,SpatialFrequencyResponse:41484,FocalPlaneXResolution:41486,FocalPlaneYResolution:41487,FocalPlaneResolutionUnit:41488,SubjectLocation:41492,ExposureIndex:41493,SensingMethod:41495,FileSource:41728,SceneType:41729,CFAPattern:41730,CustomRendered:41985,ExposureMode:41986,WhiteBalance:41987,DigitalZoomRatio:41988,FocalLengthIn35mmFilm:41989,SceneCaptureType:41990,GainControl:41991,Contrast:41992,Saturation:41993,Sharpness:41994,DeviceSettingDescription:41995,SubjectDistanceRange:41996,ImageUniqueID:42016,CameraOwnerName:42032,BodySerialNumber:42033,LensSpecification:42034,LensMake:42035,LensModel:42036,LensSerialNumber:42037,Gamma:42240},t.GPSIFD={GPSVersionID:0,GPSLatitudeRef:1,GPSLatitude:2,GPSLongitudeRef:3,GPSLongitude:4,GPSAltitudeRef:5,GPSAltitude:6,GPSTimeStamp:7,GPSSatellites:8,GPSStatus:9,GPSMeasureMode:10,GPSDOP:11,GPSSpeedRef:12,GPSSpeed:13,GPSTrackRef:14,GPSTrack:15,GPSImgDirectionRef:16,GPSImgDirection:17,GPSMapDatum:18,GPSDestLatitudeRef:19,GPSDestLatitude:20,GPSDestLongitudeRef:21,GPSDestLongitude:22,GPSDestBearingRef:23,GPSDestBearing:24,GPSDestDistanceRef:25,GPSDestDistance:26,GPSProcessingMethod:27,GPSAreaInformation:28,GPSDateStamp:29,GPSDifferential:30,GPSHPositioningError:31},t.InteropIFD={InteroperabilityIndex:1},t.GPSHelper={degToDmsRational:function(s){var o=Math.abs(s),l=o%1*60,f=l%1*60,d=Math.floor(o),u=Math.floor(l),g=Math.round(f*100);return[[d,1],[u,1],[g,100]]},dmsRationalToDeg:function(s,o){var l=o==="S"||o==="W"?-1:1,f=s[0][0]/s[0][1]+s[1][0]/s[1][1]/60+s[2][0]/s[2][1]/3600;return f*l}},n.exports&&(e=n.exports=t),e.piexif=t})()})(Xe,Xe.exports)),Xe.exports}var tn=en();const nn=gi(tn),an={class:"min-h-screen bg-slate-50 font-sans text-slate-900 flex flex-col"},rn={class:"flex-grow w-full max-w-7xl mx-auto px-4 py-12 sm:px-6 lg:px-8 relative z-10 pb-20"},sn={class:"text-center mb-12"},on={class:"text-3xl md:text-4xl font-black text-slate-900 mb-4 tracking-tight"},ln={class:"text-lg text-slate-600 max-w-2xl mx-auto leading-relaxed"}
3,hn={key:0,class:"max-w-3xl mx-auto animate-fade-in-up"},un={class:"text-2xl font-bold text-slate-900 mb-2"},cn={class:"text-slate-500 font-medium"},fn={key:0,class:"mt-4 p-4 bg-red-50 text-red-600 rounded-xl text-center font-bold"},dn={key:1,class:"flex flex-col lg:flex-row gap-8 animate-fade-in-up"},pn={class:"w-full lg:w-1/3 space-y-6"},gn={class:"bg-white p-4 rounded-2xl shadow-sm border border-slate-100"},mn=["src"],yn={class:"mt-4 flex flex-col gap-2"},Sn={class:"font-bold text-slate-800 truncate"},Cn={class:"text-xs text-slate-500 font-mono"},xn={key:0},bn={key:0,class:"mt-2 text-xs text-slate-500 font-mono space-y-1"},vn={class:"font-bold"},Pn={class:"grid grid-cols-1 gap-4"},wn=["disabled"],kn={key:0,class:"w-5 h-5 animate-spin",fill:"none",viewBox:"0 0 24 24"},In={key:1,class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Dn=["disabled"],An={key:0,class:"w-5 h-5 text-emerald-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Tn={key:1,class:"w-5 h-5 group-hover:scale-110 transition-transform",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Rn={class:"w-full lg:w-2/3"},Ln={key:0,class:"h-64 flex flex-col items-center justify-center text-slate-400 bg-white rounded-2xl border border-slate-100"},On={class:"font-bold"},Mn={key:1,class:"h-64 flex flex-col items-center justify-center text-slate-400 bg-white rounded-2xl border border-slate-100"},Fn={class:"font-bold"},En={key:2,class:"space-y-6"},Bn=["onClick"],Un={class:"font-bold text-slate-800 text-lg"},Gn={class:"text-xs font-mono bg-white px-2 py-1 rounded border border-slate-200 text-slate-500"},Nn=["onClick","title"],_n={key:0,class:"w-5 h-5 text-emerald-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Vn={key:1,class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},jn={class:"divide-y divide-slate-50"},zn=["title"],Hn={class:"px-6 py-3 font-medium text-slate-800 break-all border-l border-slate-50 flex items-center"},Wn={class:"flex items-center justify-center pr-2 opacity-0 group-hover/row:opacity-100 transition-opacity"},Xn=["onClick","title"],Kn={key:0,class:"w-4 h-4 text-emerald-500",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Jn={key:1,class:"w-4 h-4",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},Yn=mi({__name:"exif",setup(n){const{t:e}=yi(),t=Si();Ci({title:()=>e("exif.title"),ogTitle:()=>e("exif.title"),description:()=>e("exif.desc"),ogDescription:()=>e("exif.desc"),ogImage:t.site.ogImage,twitterCard:"summary_large_image"}),xi({script:[{type:"application/ld+json",innerHTML:bi(()=>JSON.stringify({"@context":t.site.schema.context,"@graph":[{"@type":"WebSite",name:t.site.name,url:t.site.url,description:e("homepage.desc")},{"@type":"SoftwareApplication",name:e("exif.title"),url:`${t.site.url}/exif`,image:`${t.site.url}/images/thumbnails/exif.jpg`,thumbnailUrl:`${t.site.url}/images/thumbnails/exif.jpg`,description:e("exif.desc"),applicationCategory:"UtilitiesApplication",operatingSystem:"Any",aggregateRating:{"@type":"AggregateRating",ratingValue:"4.8",ratingCount:"120",bestRating:"5",worstRating:"1"}}]}))}]});const i=H(null),a=H(null),r=H(null);H(null);const h=H(!1),c=H(!1),m=H(null),x=H(!1),P=H(null),A=H(null),L=H(null),C=H(!1),k=y=>y instanceof Date?y.toLocaleString():typeof y=="number"?Math.round(y*1e4)/1e4+"":Array.isArray(y)?y.length>0&&typeof y[0]=="number"&&y.length>4?`[Array(${y.length})]`:y.join(", "):typeof y=="object"&&y!==null?JSON.stringify(y):String(y),B=async y=>{if(!y.type.startsWith("image/")){m.value=e("exif.dropzone.error");return}me(),i.value=y,a.value=URL.createObjectURL(y);const p=new Image;p.onload=()=>{A.value=`${p.naturalWidth} x ${p.naturalHeight} px`},p.src=a.value,h.value=!0,m.value=null;try{console.log("Starting EXIF analysis for:",y.name,y.type);const D=await $i.parse(y,{tiff:!0,xmp:!0,icc:!0,iptc:!0,ifd0:!0,ifd1:!0,exif:!0,gps:!0,interop:!0,ihdr:!0,grouped:!0,mergeOutput:!1});if(console.log("Parsed EXIF Data:",D),D){const E={},O=se=>{for(const $ in D){const ie=D[$];for(const Z of se)if(ie&&ie[Z]!==void 0)return ie[Z]}},N=O(["BitDepth","BitsPerSample"]);N!==void 0&&(E["Bit Depth"]=N);const K=O(["ColorType","PhotometricInterpretation"]);K!==void 0&&(E["Color Type"]=K);const J=O(["Compression"]);J!==void 0&&(E.Compression=J),L.value=Object.keys(E).length>0?E:null;const Re=["ifd0","exif","gps","interop","ifd1","icc","xmp","iptc"],ye={};for(const se in D){if(!Re.includes(se.toLowerCase()))continue;const $=D[se];if(!$||Object.keys($).length===0)continue;const ie={};for(const Z in $){const q=$[Z];Z!=="MakerNote"&&(q instanceof Uint8Array||q instanceof ArrayBuffer||q&&q.type==="Buffer"||Array.isArray(q)&&q.length>20&&typeof q[0]=="number"||(ie[Z]=q))}Object.keys(ie).length>0&&(ye[se]=ie)}r.value=Object.keys(ye).length>0?ye:null}else console.log("No EXIF data returned."),r.value=null}catch(D){console.error("EXIF parsing failed:",D),m.value="Failed to parse image. It might be corrupted or format not supported."}finally{h.value=!1}},re=async()=>
3{if(i.value){c.value=!0,console.log("Removing EXIF data...");try{if(i.value.type==="image/jpeg"||i.value.type==="image/jpg"){const y=new FileReader;y.onload=p=>{const D=p.target?.result;if(D){try{const E=nn.remove(D);P.value=E,x.value=!0,console.log("JPEG EXIF removed successfully.")}catch(E){console.error("Piexif failed, falling back to canvas",E),Ie()}c.value=!1}},y.readAsDataURL(i.value)}else Ie()}catch(y){console.error("Removal failed:",y),m.value="Failed to remove EXIF.",c.value=!1}}},Ie=()=>{if(!a.value||!i.value)return;const y=new Image;y.onload=()=>{const p=document.createElement("canvas");p.width=y.width,p.height=y.height;const D=p.getContext("2d");if(!D)return;D.drawImage(y,0,0);const E=p.toDataURL(i.value?.type||"image/png");P.value=E,x.value=!0,c.value=!1,console.log("Canvas EXIF strip complete.")},y.src=a.value},rt=()=>{if(!P.value)return;const y=document.createElement("a"),p=i.value?.name.split(".").pop(),D=i.value?.name.replace(`.${p}`,"")+"_clean."+(p||"jpg");y.download=D,y.href=P.value,y.click()},me=()=>{a.value&&URL.revokeObjectURL(a.value),i.value=null,a.value=null,r.value=null,m.value=null,x.value=!1,P.value=null,A.value=null},Q=H(200),s=H(!1),o=H(null),l=H({}),f=H(null),d=y=>{l.value[y]=!l.value[y]},u=async(y,p)=>{try{await navigator.clipboard.writeText(y),f.value=p,setTimeout(()=>{f.value===p&&(f.value=null)},2e3)}catch(D){console.error("Failed to copy:",D)}},g=(y,p)=>{const D=JSON.stringify({[y]:p},null,2);u(D,y)},I=()=>{if(!r.value)return;const y={...L.value&&{"Basic Info":L.value},...r.value},p=JSON.stringify(y,null,2);u(p,"all")},w=(y,p,D)=>{D.stopPropagation();const E=JSON.stringify(p,null,2);u(E,`group-${y}`)},v=()=>{o.value?.click()},R=y=>{s.value=!0;const p=y.clientX,D=Q.value,E=N=>{if(!s.value)return;const K=N.clientX-p;Q.value=Math.max(100,Math.min(600,D+K))},O=()=>{s.value=!1,window.removeEventListener("mousemove",E),window.removeEventListener("mouseup",O),document.body.style.cursor="",document.body.style.userSelect=""};window.addEventListener("mousemove",E),window.addEventListener("mouseup",O),document.body.style.cursor="col-resize",document.body.style.userSelect="none"},T=y=>{C.value=!1;const p=y.dataTransfer?.files[0];p&&B(p)},le=y=>{const p=y.target,D=p.files?.[0];D&&B(D),p.value=""};return(y,p)=>{const D=vi,E=Ii;return F(),M("div",an,[st(D),st(Ai,{image:"/images/banners/exif.jpg",alt:"EXIF Tool Banner"}),S("div",rn,[S("div",sn,[S("h1",on,U(W(e)("exif.title")),1),S("p",ln,U(W(e)("exif.subtitle")),1)]),i.value?(F(),M("div",dn,[S("div",pn,[S("div",gn,[S("img",{src:a.value,class:"w-full h-auto rounded-xl bg-slate-100"},null,8,mn),S("div",yn,[S("h3",Sn,U(i.value.name),1),S("p",Cn,[Ue(U((i.value.size/1024/1024).toFixed(2))+" MB • "+U(i.value.type)+" ",1),A.value?(F(),M("span",xn,"• "+U(A.value),1)):je("",!0)]),L.value?(F(),M("div",bn,[(F(!0),M(ot,null,lt(L.value,(O,N)=>(F(),M("div",{key:N},[S("span",vn,U(N)+":",1),Ue(" "+U(O),1)]))),128))])):je("",!0)])]),S("div",Pn,[S("button",{onClick:re,disabled:c.value||x.value||!r.value,class:"py-4 px-6 bg-slate-900 text-white font-bold rounded-xl shadow-lg shadow-slate-900/10 hover:bg-slate-800 transition-all active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed flex items-center justify-center gap-2"},[c.value?(F(),M("svg",kn,[...p[4]||(p[4]=[S("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"},null,-1),S("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"},null,-1)])])):(F(),M("svg",In,[...p[5]||(p[5]=[S("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16"},null,-1)])])),Ue(" "+U(x.value?W(e)("exif.status.removed"):W(e)("exif.actions.remove")),1)],8,wn),x.value?(F(),M("button",{key:0,onClick:rt,class:"py-4 px-6 bg-emerald-500 text-white font-bold rounded-xl shadow-lg shadow-emerald-500/20 hover:bg-emerald-600 transition-all active:scale-95 flex items-center justify-center gap-2 animate-bounce-short"},[p[6]||(p[6]=S("svg",{class:"w-5 h-5",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[S("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-4l-4 4m0 0l-4-4m4 4V4"})],-1)),Ue(" "+U(W(e)("exif.actions.download")),1)])):je("",!0),S("button",{onClick:v,class:"py-3 px-6 bg-white border-2 border-slate-100 text-slate-600 font-bold rounded-xl hover:bg-slate-50 transition-all"},U(W(e)("exif.actions.reset")),1),S("button",{onClick:I,disabled:!r.value,class:"py-3 px-6 bg-white border-2 border-slate-100 text-slate-600 font-bold rounded-xl hover:bg-slate-50 transition-all flex items-center justify-center gap-2 group disabled:opacity-50 disabled:cursor-not-allowed"},[f.value==="all"?(F(),M("svg",An,[...p[7]||(p[7]=[S("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])):(F(),M("svg",Tn,[...p[8]||(p[8]=[S("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"},null,-1)])])),Ue(" "+U(f.value==="all"?W(e)("exif.actions.copied_all"):W(e)("exif.actions.copy_all")),1)],8,Dn),S("button",{onClick:me,class:"py-3 px-6 bg-red-50 text-red-600 font-bold rounded-xl hover:bg-red-100 transition-all"},U(W(e)("exif.actions.clear")),1),S("input",{ref_key:"fileInputRef",ref:o,type:"file",accept:"image/*",class:"hidden",onChange:le},null,544)])]),S("div",Rn,[h.value?(F(),M("div",Ln,[p[9]||(p[9]=S("svg",{class:"w-10 h-10 animate-spin mb
3-4 text-blue-500",fill:"none",viewBox:"0 0 24 24"},[S("circle",{class:"opacity-25",cx:"12",cy:"12",r:"10",stroke:"currentColor","stroke-width":"4"}),S("path",{class:"opacity-75",fill:"currentColor",d:"M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"})],-1)),S("p",On,U(W(e)("exif.status.analyzing")),1)])):r.value?(F(),M("div",En,[(F(!0),M(ot,null,lt(r.value,(O,N)=>(F(),M("div",{key:N,class:"bg-white rounded-2xl shadow-sm border border-slate-100 overflow-hidden transition-all duration-300"},[S("div",{onClick:K=>d(String(N)),class:"px-6 py-4 bg-slate-50 border-b border-slate-100 flex items-center gap-2 cursor-pointer hover:bg-slate-100 transition-colors select-none group/header"},[(F(),M("svg",{class:Ot(["w-5 h-5 text-slate-400 transition-transform duration-300",{"-rotate-90":l.value[N]}]),fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[...p[11]||(p[11]=[S("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M19 9l-7 7-7-7"},null,-1)])],2)),p[14]||(p[14]=S("span",{class:"w-2 h-6 bg-blue-500 rounded-full"},null,-1)),S("h3",Un,U(W(e)(`exif.groups.${N}`)||N.toUpperCase()),1),S("span",Gn,U(Object.keys(O).length)+" TAGS ",1),S("button",{onClick:K=>w(String(N),O,K),class:"ml-auto p-2 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors opacity-0 group-hover/header:opacity-100",title:W(e)("exif.actions.copy_group")},[f.value===`group-${N}`?(F(),M("svg",_n,[...p[12]||(p[12]=[S("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])):(F(),M("svg",Vn,[...p[13]||(p[13]=[S("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"},null,-1)])]))],8,Nn)],8,Bn),Pi(S("div",jn,[(F(!0),M(ot,null,lt(O,(K,J)=>(F(),M("div",{key:J,class:"grid hover:bg-slate-50/50 transition-colors group/row text-sm relative",style:ki({gridTemplateColumns:`${Q.value}px 4px 1fr 40px`})},[S("div",{class:"px-6 py-3 font-bold text-slate-500 truncate",title:String(J)},U(J),9,zn),S("div",{class:"cursor-col-resize hover:bg-blue-400 active:bg-blue-600 transition-colors bg-transparent opacity-0 group-hover/row:opacity-100",onMousedown:Be(R,["prevent"])},null,32),S("div",Hn,U(k(K)),1),S("div",Wn,[S("button",{onClick:Re=>g(String(J),K),class:"p-1.5 text-slate-400 hover:text-blue-600 hover:bg-blue-50 rounded-lg transition-colors",title:W(e)("exif.actions.copy")},[f.value===String(J)?(F(),M("svg",Kn,[...p[15]||(p[15]=[S("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M5 13l4 4L19 7"},null,-1)])])):(F(),M("svg",Jn,[...p[16]||(p[16]=[S("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z"},null,-1)])]))],8,Xn)])],4))),128))],512),[[wi,!l.value[N]]])]))),128))])):(F(),M("div",Mn,[p[10]||(p[10]=S("svg",{class:"w-12 h-12 mb-4 opacity-50",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[S("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"})],-1)),S("p",Fn,U(W(e)("exif.status.no_data")),1)]))])])):(F(),M("div",hn,[S("div",{class:"relative group cursor-pointer",onDragenter:p[0]||(p[0]=Be(O=>C.value=!0,["prevent"])),onDragover:p[1]||(p[1]=Be(O=>C.value=!0,["prevent"])),onDragleave:p[2]||(p[2]=Be(O=>C.value=!1,["prevent"])),onDrop:Be(T,["prevent"])},[S("input",{type:"file",accept:"image/*",class:"absolute inset-0 w-full h-full opacity-0 cursor-pointer z-10",onChange:le},null,32),S("div",{class:Ot(["bg-white border-2 border-dashed rounded-3xl p-16 text-center transition-all duration-300 shadow-sm",[C.value?"border-blue-500 bg-blue-50 scale-[0.99] shadow-inner":"border-slate-200 hover:border-slate-300 hover:bg-slate-50 hover:shadow-md"]])},[p[3]||(p[3]=S("div",{class:"w-20 h-20 bg-blue-100/50 text-blue-600 rounded-3xl flex items-center justify-center mx-auto mb-8 group-hover:scale-110 transition-transform duration-300 group-hover:rotate-3"},[S("svg",{class:"w-10 h-10",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24"},[S("path",{"stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"2",d:"M4 16l4.586-4.586a2 2 0 012.828 0L16 16m-2-2l1.586-1.586a2 2 0 012.828 0L20 14m-6-6h.01M6 20h12a2 2 0 002-2V6a2 2 0 00-2-2H6a2 2 0 00-2 2v12a2 2 0 002 2z"})])],-1)),S("h3",un,U(W(e)("exif.dropzone.title")),1),S("p",cn,U(W(e)("exif.dropzone.subtitle")),1)],2)],32),m.value?(F(),M("div",fn,U(m.value),1)):je("",!0)]))]),st(E)])}}}),Qn=Di(Yn,[["__scopeId","data-v-124c289c"]]);export{Qn as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.