PageSourceSearch

https://docs-frameright-io.netlify.app/assets/js/7338.f96744e4.js

js docs-frameright-io.netlify.app collected 2026-10-03 10:41:04 UTC 93,428 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkframeright_docs=self.webpackChunkframeright_docs||[]).push([[7338],{9846:(e,t,n)=>{var r,i=(r=n(2948))&&"object"==typeof r&&"default"in r?r.default:r,o=n(5324);function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var s=function(){function e(){this.id="",this.names=[],this.shape="",this.unit=""}var t=e.prototype;return t.matches=function(e,t){return this._matchesShapeFilter(e)&&this._matchesRoleFilter(t)},t._matchesShapeFilter=function(e){return"any"===e||this.shape===e},t._matchesRoleFilter=function(t){if("any"===t)return!0;if("crop"===t)for(var n,r=function(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(n)return(n=n.call(e)).next.bind(n);if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return a(e,void 0);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?a(e,void 0):void 0}}(e))){n&&(e=n);var r=0;return function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(this.roles||[]);!(n=r()).done;)if(e._CROP_XML_ROLES.includes(n.value))return!0;return!1},e}();s._CROP_XML_ROLES=["cropping","recommended cropping","landscape format cropping","portrait format cropping","square format cropping","http://cv.iptc.org/newscodes/imageregionrole/cropping","http://cv.iptc.org/newscodes/imageregionrole/recomCropping","http://cv.iptc.org/newscodes/imageregionrole/landscapeCropping","http://cv.iptc.org/newscodes/imageregionrole/portraitCropping","http://cv.iptc.org/newscodes/imageregionrole/squareCropping"];var u=function(){function e(e){this._size=null,this._buffer=e;try{var t=i.load(this._buffer,{expanded:!0});this._xmpMetadata=t.xmp||{}}catch(e){this._xmpMetadata={}}}var t=e.prototype;return t.getIdcMetadata=function(e,t,n){var r,i=this;void 0===e&&(e="any"),void 0===t&&(t="any"),void 0===n&&(n=!0);var o=[];return Array.isArray(null==(r=this._xmpMetadata.ImageRegion)?void 0:r.value)?(this._xmpMetadata.ImageRegion.value.forEach((function(r){var a=i._xmpRegionToImageRegion(r);if(a.matches(e,t)){if(n)switch(delete a.types,delete a.roles,"relative"===a.unit&&(delete a.imageWidth,delete a.imageHeight),a.shape){case"rectangle":delete a.radius,delete a.vertices;break;case"circle":delete a.width,delete a.height,delete a.vertices;break;case"polygon":delete a.x,delete a.y,delete a.width,delete a.height,delete a.radius}o.push(a)}})),o):o},t.getXmpMetadata=function(){return this._xmpMetadata},t.getSize=function(){if(this._size)return this._size;var e=new Uint8Array(this._buffer),t=o.imageSize(e);return this._size={width:t.width||0,height:t.height||0},this._size},e._xmpEntityOrConceptsToStringArray=function(t){var n=[],r=t.value;return Array.isArray(r)?r.forEach((function(t){n.push.apply(n,e._xmpEntityOrConceptToStringArray(t))})):"Bag"in r&&n.push.apply(n,e._xmpEntityOrConceptToStringArray(r.Bag.value)),n},e._xmpEntityOrConceptToStringArray=function(t){var n=[];return"Name"in t&&n.push.apply(n,e._xmpAltOrBagToStringArray(t.Name)),"Identifier"in t&&n.push.apply(n,e._xmpAltOrBagToStringArray(t.Identifier)),n},e._xmpAltOrBagToStringArray=function(e){var t=[];return Array.isArray(e.value)&&e.value.forEach((function(e){"string"==typeof e.value&&t.push(e.value)})),t},e._xmpStringToNumber=function(e){if("string"==typeof e.value)return parseFloat(e.value)},t._xmpRegionToImageRegion=function(t){var n=new s,r="rId"in t?t.rId.value:"";if("string"==typeof r&&(n.id=r),"Name"in t&&(n.names=e._xmpAltOrBagToStringArray(t.Name)),"rCtype"in t&&(n.types=e._xmpEntityOrConceptsToStringArray(t.rCtype)),"rRole"in t&&(n.roles=e._xmpEntityOrConceptsToStringArray(t.rRole)),"RegionBoundary"in t){var i=t.RegionBoundary.value;if("rbShape"in i){var o=i.rbShape.value;"string"==typeof o&&(n.shape=o)}if("rbUnit"in i){var a=i.rbUnit.value;"string"==typeof a&&(n.unit=a)}if("rbX"in i&&(n.x=e._xmpStringToNumber(i.rbX)),"rbY"in i&&(n.y=e._xmpStringToNumber(i.rbY)),"rbW"in i&&(n.width=e._xmpStringToNumber(i.rbW)),"rbH"in i&&(n.height=e._xmpStringToNumber(i.rbH)),"rbRx"in 
1i&&(n.radius=e._xmpStringToNumber(i.rbRx)),"rbVertices"in i){var u=i.rbVertices.value;Array.isArray(u)&&u.forEach((function(t){var r,i;"rbX"in t&&(r=e._xmpStringToNumber(t.rbX)),"rbY"in t&&(i=e._xmpStringToNumber(t.rbY)),void 0!==r&&void 0!==i&&(Array.isArray(n.vertices)||(n.vertices=[]),n.vertices.push({x:r,y:i}))}))}}if("RegionDefinitionId"in t){var c=t.RegionDefinitionId.value;"string"==typeof c&&(n.idcRegionDefinitionId=c)}if("RegionName"in t){var d=t.RegionName.value;"string"==typeof d&&(n.idcRegionDefinitionName=d)}var f=this.getSize();return n.imageWidth=f.width,n.imageHeight=f.height,n},e}();t.Parser=u},1053:(e,t,n)=>{e.exports=n(9846)},3905:(e,t,n)=>{n.d(t,{Zo:()=>d,kt:()=>g});var r=n(7294);function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var u=r.createContext({}),c=function(e){var t=r.useContext(u),n=t;return e&&(n="function"==typeof e?e(t):a(a({},t),e)),n},d=function(e){var t=c(e.components);return r.createElement(u.Provider,{value:t},e.children)},f="mdxType",l={inlineCode:"code",wrapper:function(e){var t=e.children;return r.createElement(r.Fragment,{},t)}},p=r.forwardRef((function(e,t){var n=e.components,i=e.mdxType,o=e.originalType,u=e.parentName,d=s(e,["components","mdxType","originalType","parentName"]),f=c(n),p=i,g=f["".concat(u,".").concat(p)]||f[p]||l[p]||o;return n?r.createElement(g,a(a({ref:t},d),{},{components:n})):r.createElement(g,a({ref:t},d))}));function g(e,t){var n=arguments,i=t&&t.mdxType;if("string"==typeof e||i){var o=n.length,a=new Array(o);a[0]=p;var s={};for(var u in t)hasOwnProperty.call(t,u)&&(s[u]=t[u]);s.originalType=e,s[f]="string"==typeof e?e:i,a[1]=s;for(var c=2;c<o;c++)a[c]=n[c];return r.createElement.apply(null,a)}return r.createElement.apply(null,n)}p.displayName="MDXCreateElement"},2948:(e,t,n)=>{n.r(t),n.d(t,{default:()=>Jr,errors:()=>Yr,load:()=>Kr,loadView:()=>Zr});class r{constructor(e){if(function(e){return"object"!=typeof e||void 0===e.length||void 0===e.readUInt8||void 0===e.readUInt16LE||void 0===e.readUInt16BE||void 0===e.readUInt32LE||void 0===e.readUInt32BE||void 0===e.readInt32LE||void 0===e.readInt32BE}(e))throw new Error("DataView: Passed buffer type is unsupported.");this.buffer=e,this.byteLength=this.buffer.length}getUint8(e){return this.buffer.readUInt8(e)}getUint16(e,t){return t?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}getUint32(e,t){return t?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}getInt32(e,t){return t?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}}function i(e,t,n){try{return new DataView(e,t,n)}catch(i){return new r(e,t,n)}}function o(e,t,n){const r=[];for(let i=0;i<n&&t+i<e.byteLength;i++)r.push(e.getUint8(t+i));return u(r)}function a(e,t,n){const r=[];for(let i=0;i<n&&t+i<e.byteLength;i+=2)r.push(e.getUint16(t+i));return 0===r[r.length-1]&&r.pop(),u(r)}function s(e,t){const n=e.getUint8(t);return[n,o(e,t+1,n)]}function u(e){return e.map((e=>String.fromCharCode(e))).join("")}function c(){for(let e=1;e<arguments.length;e++)for(const t in arguments[e])arguments[0][t]=arguments[e][t];return arguments[0]}function d(e,t,n){let r=!1;Object.defineProperty(e,t,{get:()=>(r||(r=!0,Object.defineProperty(e,t,{configurable:!0,enumerable:!0,value:n.apply(e),writable:!0})),e[t]),configurable:!0,enumerable:!0})}function f(e){return"undefined"!=typeof btoa?"string"==typeof e?btoa(e):btoa(Array.prototype.reduce.call(new Uint8Array(e),((e,t)=>e+String.fromCharCode(t)),"")):"undefined"!=typeof Buffer?void 0!==Buffer.from?Buffer.from(e).toString("base64"):new Buffer(e).toString("base64"):void 0}function l(e,t){return new Array(t+1).join(e)}const p={USE_FILE:!0,USE_JFIF:!0,USE_PNG_FILE:!0,USE_EXIF:!0,USE_IPTC:!0,USE_XMP:!0,USE_ICC:!0,USE_MPF:!0,USE_PHOTOSHOP:!0,USE_THUMBNAIL:!0,USE_TIFF:!0,USE_JPEG:!0,USE_PNG:!0,USE_HEIC:!0,USE_WEBP:!0,USE_GIF:!0};function g(e){return e.map((e=>String.fromCharCode(e))).join("")}function m(e){if(e.length>=8){const t=g(e.slice(0,8));if("ASCII\0\0\0"===t)return g(e.slice(8));if("JIS\0\0\0\0\0"===t)return"[JIS encoded text]";if("UNICODE\0"===t)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===t)return"[Undefined encoding]"}return"Undefined"}function h(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}const S=18761,y=19789,v={BIG_ENDIAN:y,LITTLE_ENDIAN:S,getByteOrder:function(e,t){if(e.getUint16(t)===S)return S;if(e.getUint16(t)===y)return y;throw new Error("Illegal byte order value. Faulty image.")}};const I={isTiffFile:function(e){return!!e&&e.byteLength>=4&&function(e){const t=42,n=2,r=e.getUint16(0)===v.LITTLE_ENDIAN;return e.getUint16(n,r)===t}(e)},findTiffOffsets:function(){if(p.USE_EXIF)return{hasAppMarkers:!0,tiffHeaderOffset:0};return{}}};const b={isJpegFile:function(e){return!!e&&e.byteLength>=U&&e.getUint16(0)===E},findJpegOffsets:function(e){let t,n,r,i,o,a,s,u,c,d=P;for(;d+C+5<=e.byteLength;){if(p.USE_FILE&&ne(e,d))n=d+w;else if(p.USE_FILE&&re(e,d))r=d+w;else if(p.USE_JFIF&&ae(e,d))t=e.getUint16(d+w),i=d+A;else if(p.USE_EXIF&&se(e,d))t=e.getUint16(d+w),o=d+T;else if(p.USE_XMP&&ue(e,d))s||(s=[]),t=e.getUint16(d+w),s.push(de(d,t));else if(p.USE_XMP&&ce(e,d))s||(s=[]),t=e.getUint16(d+w),s.push(fe(d,t));else if(p.USE_IPTC&&le(e,d))t=e.getUint16(d+w),a=d+F;else if(p.USE_ICC&&ie(e,d)){t=e.getUint16(d+w);const n=d+M,r=t-(M-w),i=e.getUint8(d+N),o=e.getUint8(d+R);u||(u=[]),u.push({offset:n,length:r,chunkNumber:i,chunksTotal:o})}else if(p.USE_MPF&&oe(e,d))t=e.getUint16(d+w),c=d+L;else{if(!pe(e,d)){if(ge(e,d)){d++;continue}break}t=e.getUint16(d+w)}d+=w+t}return{hasAppMarkers:d>P,fileDataOffset:n||r,jfifDataOffset:i,tiffHeaderOffset:o,iptcDataOffset:a,xmpChunks:s,iccChunks:u,mpfDataOffset:c}}},U=2,E=65496,P=2,C=4,w=2,A=2,T=10,F=18,O=33,x=79,M=18,L=8,D="ICC_PROFILE\0",N=C+D.length,R=N+1,_="MPF\0",k=65472,B=6
15474,G=65476,j=65499,H=65501,z=65498,$=65504,W=65505,V=65506,X=65517,J=65519,Y=65534,K=65535,q="JFIF",Z="Exif",Q="http://ns.adobe.com/xap/1.0/\0",ee="http://ns.adobe.com/xmp/extension/\0",te="Photoshop 3.0";function ne(e,t){return e.getUint16(t)===k}function re(e,t){return e.getUint16(t)===B}function ie(e,t){const n=D.length;return e.getUint16(t)===V&&o(e,t+C,n)===D}function oe(e,t){const n=_.length;return e.getUint16(t)===V&&o(e,t+C,n)===_}function ae(e,t){const n=Z.length;return e.getUint16(t)===$&&o(e,t+C,n)===q&&0===e.getUint8(t+C+n)}function se(e,t){const n=Z.length;return e.getUint16(t)===W&&o(e,t+C,n)===Z&&0===e.getUint8(t+C+n)}function ue(e,t){return e.getUint16(t)===W&&function(e,t){const n=Q.length;return o(e,t+C,n)===Q}(e,t)}function ce(e,t){return e.getUint16(t)===W&&function(e,t){const n=ee.length;return o(e,t+C,n)===ee}(e,t)}function de(e,t){return{dataOffset:e+O,length:t-(O-w)}}function fe(e,t){return{dataOffset:e+x,length:t-(x-w)}}function le(e,t){const n=te.length;return e.getUint16(t)===X&&o(e,t+C,n)===te&&0===e.getUint8(t+C+n)}function pe(e,t){const n=e.getUint16(t);return n>=$&&n<=J||n===Y||n===k||n===B||n===G||n===j||n===H||n===z}function ge(e,t){return e.getUint16(t)===K}const me={isPngFile:function(e){return!!e&&o(e,0,he.length)===he},findPngOffsets:function(e){const t={hasAppMarkers:!1};let n=he.length;for(;n+Se+ye<=e.byteLength;){if(p.USE_PNG_FILE&&Te(e,n))t.hasAppMarkers=!0,t.pngHeaderOffset=n+be;else if(p.USE_XMP&&Fe(e,n)){const r=Le(e,n);void 0!==r&&(t.hasAppMarkers=!0,t.xmpChunks=[{dataOffset:r,length:e.getUint32(n+ve)-(r-(n+be))}])}else if(Oe(e,n)){t.hasAppMarkers=!0;const r=o(e,n+Ie,ye);t.pngTextChunks||(t.pngTextChunks=[]),t.pngTextChunks.push({length:e.getUint32(n+ve),type:r,offset:n+be})}else xe(e,n)?(t.hasAppMarkers=!0,t.tiffHeaderOffset=n+be):Me(e,n)&&(t.hasAppMarkers=!0,t.pngChunkOffsets||(t.pngChunkOffsets=[]),t.pngChunkOffsets.push(n+ve));n+=e.getUint32(n+ve)+Se+ye+4}return t}},he="\x89PNG\r\n\x1a\n",Se=4,ye=4,ve=0,Ie=Se,be=Se+ye,Ue="XML:com.adobe.xmp\0",Ee="tEXt",Pe="iTXt",Ce="pHYs",we="tIME",Ae="eXIf";function Te(e,t){return"IHDR"===o(e,t+Ie,ye)}function Fe(e,t){return"iTXt"===o(e,t+Ie,ye)&&o(e,t+be,Ue.length)===Ue}function Oe(e,t){const n=o(e,t+Ie,ye);return"tEXt"===n||"iTXt"===n}function xe(e,t){return o(e,t+Ie,ye)===Ae}function Me(e,t){const n=[Ce,we],r=o(e,t+Ie,ye);return n.includes(r)}function Le(e,t){t+=be+Ue.length+1+1;let n=0;for(;n<2&&t<e.byteLength;)0===e.getUint8(t)&&n++,t++;if(!(n<2))return t}const De={isHeicFile:function(e){if(!e)return!1;const t="ftyp",n=o(e,8,4);return o(e,4,4)===t&&-1!==["heic","heix","hevc","hevx","heim","heis","hevm","hevs","mif1"].indexOf(n)},findHeicOffsets:function(e){if(p.USE_EXIF||p.USE_ICC){const{offset:t,length:n}=function(e){const t=4,n=4,r=8,i=4;let a=0;for(;a+t+n<=e.byteLength;){const t=Ne(e,a);if(t>=r){if("meta"===o(e,a+i,n))return{offset:a,length:t}}a+=t}return{offset:void 0,length:0}}(e);if(void 0===t)return{hasAppMarkers:!1};const r=Math.min(t+n,e.byteLength),{exifItemOffset:i,ilocOffset:a,colrOffset:s}=function(e,t,n){const r=4,i=-4,a={ilocOffset:void 0,exifItemOffset:void 0,colrOffset:void 0};for(;t+r<=n&&(!a.ilocOffset||!a.exifItemOffset||!a.colrOffset);){const n=o(e,t,r);p.USE_EXIF&&"iloc"===n?a.ilocOffset=t:p.USE_EXIF&&"Exif"===n?a.exifItemOffset=t+i:p.USE_ICC&&"colr"===n&&(a.colrOffset=t+i),t++}return a}(e,t,r),u=function(e,t,n,r){const i=2,o=12,a=8,s=4,u=4,c=16;if(!n||!t||t+i>r)return;const d=e.getUint16(t);n+=o;for(;n+c<=r;){if(e.getUint16(n)===d){const t=e.getUint32(n+a);if(t+s<=e.byteLength){return t+(e.getUint32(t)+u)}}n+=c}return}(e,i,a,r),c=function(e,t,n){const r=8,i=4,a=12;if(!t||t+a>n)return;const s=o(e,t+r,i);if("prof"!==s&&"rICC"!==s)return;return[{offset:t+a,length:Ne(e,t)-a,chunkNumber:1,chunksTotal:1}]}(e,s,r);return{hasAppMarkers:void 0!==u||void 0!==c,tiffHeaderOffset:u,iccChunks:c}}return{hasAppMarkers:!1}}};function Ne(e,t){const n=e.getUint32(t);return function(e){return 0===e}(n)?e.byteLength-t:function(e){return 1===e}(n)&&function(e,t){const n=8;return 0===e.getUint32(t+n)}(e,t)?e.getUint32(t+12):n}const Re={isWebpFile:function(e){const t="RIFF",n="WEBP";return!!e&&o(e,0,4)===t&&o(e,8,4)===n},findOffsets:function(e){const t="Exif\0\0";let n,r,i,a,s=12,u=!1;for(;s+8<e.byteLength;){const c=o(e,s,4),d=e.getUint32(s+4,!0);p.USE_EXIF&&"EXIF"===c?(u=!0,n=o(e,s+8,6)===t?s+8+6:s+8):p.USE_XMP&&"XMP "===c?(u=!0,r=[{dataOffset:s+8,length:d}]):p.USE_ICC&&"ICCP"===c?(u=!0,i=[{offset:s+8,length:d,chunkNumber:1,chunksTotal:1}]):"VP8X"===c&&(u=!0,a=s+8),s+=8+(d%2==0?d:d+1)}return{hasAppMarkers:u,tiffHeaderOffset:n,xmpChunks:r,iccChunks:i,vp8xChunkOffset:a}}};const _e={isGifFile:function(e){return!!e&&Be.includes(o(e,0,ke))},findOffsets:function(){return{gifHeaderOffset:0}}},ke=6,Be=["GIF87a","GIF89a"];const Ge={parseAppMarkers:function(e){if(p.USE_TIFF&&I.isTiffFile(e))return je(I.findTiffOffsets(),"tiff","TIFF");if(p.USE_JPEG&&b.isJpegFile(e))return je(b.findJpegOffsets(e),"jpeg","JPEG");if(p.USE_PNG&&me.isPngFile(e))return je(me.findPngOffsets(e),"png","PNG");if(p.USE_HEIC&&De.isHeicFile(e))return je(De.findHeicOffsets(e),"heic","HEIC");if(p.USE_WEBP&&Re.isWebpFile(e))return je(Re.findOffsets(e),"webp","WebP");if(p.USE_GIF&&_e.isGifFile(e))return je(_e.findOffsets(e),"gif","GIF");throw new Error("Invalid image format")}};function je(e,t,n){return c({},e,{fileType:{value:t,description:n}})}const He={ApertureValue:e=>Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2),ColorSpace:e=>1===e?"sRGB":65535===e?"Uncalibrated":"Unknown",ComponentsConfiguration:e=>e.map((e=>49===e?"Y":50===e?"Cb":51===e?"Cr":52===e?"R":53===e?"G":54===e?"B":void 0)).join(""),Contrast:e=>0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown",CustomRendered:e=>0===e?"Normal process":1===e?"Custom process":"Unknown",ExposureMode:e=>0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown",ExposureProgram:e=>0===e?"Undefined":1===e?"Manual":2===e?"Normal program":3===e?"Aperture priority":4===e?"Shutter priority":5===e?"Creative program":6===e?"Action program":7===e?"Portrait mode":8===e?"Landscape mode":9===e?"Bulb":"Unknown",ExposureTime:e=>e[0]>=e[1]?`${Math.round(e[0]/e[1])}`:0!==e[0]?`1/${Math.round(e[1]/e[0])}`:`0/${e[1]}`,FNumber:e=>"f/"+e[0]/e[1],FocalLength:e=>e[0]/e[1]+" mm",FocalPlaneResolutionUnit:e=>2===e?"inches":3===e?"centimeters":"Unknown",LightSource:e=>1===e?"Daylight":2===e?"Fluorescent":3===e?"Tungsten (incandescent light)":4===e?"Flash":9===e?"Fine weather":10===e?"Cloudy weather":11===e?"Shade":12===e?"Daylight fluorescent (D 5700 \u2013 7100K)":13===e?"Day white fluorescent (N 4600 \u2013 5400K)":14===e?"Cool white fluorescent (W 3900 \u2013 4500K)":15===e?"White fluorescent (WW 3200 \u2013 3700K)":17===e?"Standard light A":18===e?"Standard light B":19===e?"Standard light C":20===e?"D55":21===e?"D65":22===e?"D75":23===e?"D50":24===e?"ISO studio tungsten":255===e?"Other light source":"Unknown",MeteringMode:e=>1===e?"Average":2===e?"CenterWeightedAverage":3===e?"Spot":4===e?"MultiSpot":5===e?"Pattern":6===e?"Partial":255===e?"Other":"Unknown",ResolutionUnit:e=>2===e?"inches":3===e?"centimeters":"Unknown",Saturation:e=>0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown",SceneCaptureType:e=>0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown",Sharpness:e=>0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown",ShutterSpeedValue(e){const t=Math.pow(2,e[0]/e[1]);return t<=1?`${Math.round(1/t)}`:`1/${Math.round(t)}`},WhiteBalance:e=>0===e?"Auto white balance":1===e?"Manual white balance":"Unknown",XResolution:e=>""+Math.round(e[0]/e[1]),YResolution:e=>""+Math.round(e[0]/e[1])}
1,ze={11:"ProcessingSoftware",254:{name:"SubfileType",description:e=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[e]||"Unknown")},255:{name:"OldSubfileType",description:e=>({0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[e]||"Unknown")},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:e=>({1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[e]||"Unknown")},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:e=>({1:"Normal",2:"Reversed"}[e]||"Unknown")},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:e=>1===e?"top-left":2===e?"top-right":3===e?"bottom-right":4===e?"bottom-left":5===e?"left-top":6===e?"right-top":7===e?"right-bottom":8===e?"left-bottom":"Undefined"},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:He.XResolution},283:{name:"YResolution",description:He.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:e=>""+Math.round(e[0]/e[1])},287:{name:"YPosition",description:e=>""+Math.round(e[0]/e[1])},290:{name:"GrayResponseUnit",description:e=>({1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[e]||"Unknown")},296:{name:"ResolutionUnit",description:He.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:e=>e.map((e=>`${e[0]}/${e[1]}`)).join(", ")},319:{name:"PrimaryChromaticities",description:e=>e.map((e=>`${e[0]}/${e[1]}`)).join(", ")},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:e=>({1:"CMYK",2:"Not CMYK"}[e]||"Unknown")},337:"TargetPrinter",338:{name:"ExtraSamples",description:e=>({0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[e]||"Unknown")},339:{name:"SampleFormat",description:e=>{const t={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(e)?e.map((e=>t[e]||"Unknown")).join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:e=>e.map((e=>""+e[0]/e[1])).join("/")},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:e=>1===e?"centered":2===e?"co-sited":"undefined "+e},532:{name:"ReferenceBlackWhite",description:e=>e.map((e=>""+e[0]/e[1])).join(", ")},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:e=>e.join("; ")},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:"XPTitle",40092:"XPComment",40093:"XPAuthor",40094:"XPKeywords",40095:"XPSubject",42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:e=>({0:"Unsafe",1:"Safe"}[e]||"Unknown")},50778:{name:"CalibrationIlluminant1",description:He.LightSource},50779:{name:"CalibrationIlluminant2",description:He.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"C
1olorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:e=>({0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[e]||"Unknown")},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:e=>({1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[e]||"Unknown")},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:e=>({0:"Linear",1:"sRGB"}[e]||"Unknown")},51108:{name:"ProfileLookTableEncoding",description:e=>({0:"Linear",1:"sRGB"}[e]||"Unknown")},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:e=>({0:"Auto",1:"None"}[e]||"Unknown")},51111:"NewRawImageDigest",51112:"RawToPreviewGain"},$e={0:{name:"GPSVersionID",description:e=>2===e[0]&&2===e[1]&&0===e[2]&&0===e[3]?"Version 2.2":"Unknown"},1:{name:"GPSLatitudeRef",description:e=>{const t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:h},3:{name:"GPSLongitudeRef",description:e=>{const t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:h},5:{name:"GPSAltitudeRef",description:e=>0===e?"Sea level":1===e?"Sea level reference (negative value)":"Unknown"},6:{name:"GPSAltitude",description:e=>e[0]/e[1]+" m"},7:{name:"GPSTimeStamp",description:e=>e.map((([e,t])=>{const n=e/t;return/^\d(\.|$)/.test(`${n}`)?`0${n}`:n})).join(":")},8:"GPSSatellites",9:{name:"GPSStatus",description:e=>{const t=e.join("");return"A"===t?"Measurement in progress":"V"===t?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:e=>{const t=e.join("");return"2"===t?"2-dimensional measurement":"3"===t?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:e=>{const t=e.join("");return"K"===t?"Kilometers per hour":"M"===t?"Miles per hour":"N"===t?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:e=>{const t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:e=>{const t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:e=>{const t=e.join("");return"N"===t?"North latitude":"S"===t?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:e=>e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600},21:{name:"GPSDestLongitudeRef",description:e=>{const t=e.join("");return"E"===t?"East longitude":"W"===t?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:e=>e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600},23:{name:"GPSDestBearingRef",description:e=>{const t=e.join("");return"T"===t?"True direction":"M"===t?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:e=>{const t=e.join("");return"K"===t?"Kilometers":"M"===t?"Miles":"N"===t?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:m},28:{name:"GPSAreaInformation",description:m},29:"GPSDateStamp",30:{name:"GPSDifferential",description:e=>0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"},31:"GPSHPositioningError"},We={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:e=>g(e)},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"},Ve={45056:{name:"MPFVersion",description:e=>g(e)},45057:"NumberOfImages",45058:"MPEntry",45059:"ImageUIDList",45060:"TotalFrames"},Xe=c({},ze,{33434:{name:"ExposureTime",description:He.ExposureTime},33437:{name:"FNumber",description:He.FNumber},34850:{name:"ExposureProgram",description:He.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:()=>"[Raw OECF table data]"},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:e=>({1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[e]||"Unknown")},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:e=>g(e)},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:He.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:He.ShutterSpeedValue},37378:{name:"ApertureValue",description:He.ApertureValue}
1,37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:e=>Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)},37382:{name:"SubjectDistance",description:e=>e[0]/e[1]+" m"},37383:{name:"MeteringMode",description:He.MeteringMode},37384:{name:"LightSource",description:He.LightSource},37385:{name:"Flash",description:e=>0===e?"Flash did not fire":1===e?"Flash fired":5===e?"Strobe return light not detected":7===e?"Strobe return light detected":9===e?"Flash fired, compulsory flash mode":13===e?"Flash fired, compulsory flash mode, return light not detected":15===e?"Flash fired, compulsory flash mode, return light detected":16===e?"Flash did not fire, compulsory flash mode":24===e?"Flash did not fire, auto mode":25===e?"Flash fired, auto mode":29===e?"Flash fired, auto mode, return light not detected":31===e?"Flash fired, auto mode, return light detected":32===e?"No flash function":65===e?"Flash fired, red-eye reduction mode":69===e?"Flash fired, red-eye reduction mode, return light not detected":71===e?"Flash fired, red-eye reduction mode, return light detected":73===e?"Flash fired, compulsory flash mode, red-eye reduction mode":77===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===e?"Flash fired, auto mode, red-eye reduction mode":93===e?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===e?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"},37386:{name:"FocalLength",description:He.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:e=>({C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[e]||"Unknown")},37395:"ImageHistory",37396:{name:"SubjectArea",description:e=>2===e.length?`Location; X: ${e[0]}, Y: ${e[1]}`:3===e.length?`Circle; X: ${e[0]}, Y: ${e[1]}, diameter: ${e[2]}`:4===e.length?`Rectangle; X: ${e[0]}, Y: ${e[1]}, width: ${e[2]}, height: ${e[3]}`:"Unknown"},37500:{name:"MakerNote",description:()=>"[Raw maker note data]"},37510:{name:"UserComment",description:m},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:e=>e[0]/e[1]+" \xb0C"},37889:{name:"Humidity",description:e=>e[0]/e[1]+" %"},37890:{name:"Pressure",description:e=>e[0]/e[1]+" hPa"},37891:{name:"WaterDepth",description:e=>e[0]/e[1]+" m"},37892:{name:"Acceleration",description:e=>e[0]/e[1]+" mGal"},37893:{name:"CameraElevationAngle",description:e=>e[0]/e[1]+" \xb0"},40960:{name:"FlashpixVersion",description:e=>e.map((e=>String.fromCharCode(e))).join("")},40961:{name:"ColorSpace",description:He.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:()=>"[Raw SFR table data]"},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:He.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:([e,t])=>`X: ${e}, Y: ${t}`},41493:"ExposureIndex",41495:{name:"SensingMethod",description:e=>1===e?"Undefined":2===e?"One-chip color area sensor":3===e?"Two-chip color area sensor":4===e?"Three-chip color area sensor":5===e?"Color sequential area sensor":7===e?"Trilinear sensor":8===e?"Color sequential linear sensor":"Unknown"},41728:{name:"FileSource",description:e=>3===e?"DSC":"Unknown"},41729:{name:"SceneType",description:e=>1===e?"A directly photographed image":"Unknown"},41730:{name:"CFAPattern",description:()=>"[Raw CFA pattern table data]"},41985:{name:"CustomRendered",description:He.CustomRendered},41986:{name:"ExposureMode",description:He.ExposureMode},41987:{name:"WhiteBalance",description:He.WhiteBalance},41988:{name:"DigitalZoomRatio",description:e=>0===e[0]?"Digital zoom was not used":""+e[0]/e[1]},41989:{name:"FocalLengthIn35mmFilm",description:e=>0===e?"Unknown":e},41990:{name:"SceneCaptureType",description:He.SceneCaptureType},41991:{name:"GainControl",description:e=>0===e?"None":1===e?"Low gain up":2===e?"High gain up":3===e?"Low gain down":4===e?"High gain down":"Unknown"},41992:{name:"Contrast",description:He.Contrast},41993:{name:"Saturation",description:He.Saturation},41994:{name:"Sharpness",description:He.Sharpness},41995:{name:"DeviceSettingDescription",description:()=>"[Raw device settings table data]"},41996:{name:"SubjectDistanceRange",description:e=>1===e?"Macro":2===e?"Close view":3===e?"Distant view":"Unknown"},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:e=>{const t=`${e[0][0]/e[0][1]}-${e[1][0]/e[1][1]} mm`;return 0===e[3][1]?`${t} f/?`:`${t}
1 f/${1/(e[2][1]/e[2][1]/(e[3][0]/e[3][1]))}`}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:e=>({1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[e]||"Unknown")},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"}),Je="0th",Ye="1st",Ke="exif",qe="gps",Ze="interoperability",Qe={[Je]:Xe,[Ye]:ze,[Ke]:Xe,[qe]:$e,[Ze]:We,mpf:p.USE_MPF?Ve:{}},et={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},tt={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},nt={getAsciiValue:function(e){return e.map((e=>String.fromCharCode(e)))},getByteAt:rt,getAsciiAt:function(e,t){return e.getUint8(t)},getShortAt:function(e,t,n){return e.getUint16(t,n===v.LITTLE_ENDIAN)},getLongAt:it,getRationalAt:function(e,t,n){return[it(e,t,n),it(e,t+4,n)]},getUndefinedAt:function(e,t){return rt(e,t)},getSlongAt:ot,getSrationalAt:function(e,t,n){return[ot(e,t,n),ot(e,t+4,n)]},getIfdPointerAt:function(e,t,n){return it(e,t,n)},typeSizes:et,tagTypes:tt,getTypeSize:function(e){if(void 0===tt[e])throw new Error("No such type found.");return et[tt[e]]}};function rt(e,t){return e.getUint8(t)}function it(e,t,n){return e.getUint32(t,n===v.LITTLE_ENDIAN)}function ot(e,t,n){return e.getInt32(t,n===v.LITTLE_ENDIAN)}const at={1:nt.getByteAt,2:nt.getAsciiAt,3:nt.getShortAt,4:nt.getLongAt,5:nt.getRationalAt,7:nt.getUndefinedAt,9:nt.getSlongAt,10:nt.getSrationalAt,13:nt.getIfdPointerAt};function st(e,t,n){return t+nt.getLongAt(e,t+4,n)}function ut(e,t,n,r,i,o){const a=nt.getTypeSize("SHORT"),s={},u=function(e,t,n){if(t+nt.getTypeSize("SHORT")<=e.byteLength)return nt.getShortAt(e,t,n);return 0}(e,r,i);r+=a;for(let c=0;c<u&&!(r+12>e.byteLength);c++){const a=ct(e,t,n,r,i,o);void 0!==a&&(s[a.name]={id:a.id,value:a.value,description:a.description}),r+=12}if(p.USE_THUMBNAIL&&r<e.byteLength-nt.getTypeSize("LONG")){const o=nt.getLongAt(e,r,i);
10!==o&&t===Je&&(s.Thumbnail=ut(e,Ye,n,n+o,i,!0))}return s}function ct(e,t,n,r,i,o){const a=nt.getTypeSize("SHORT"),s=a+nt.getTypeSize("SHORT"),u=s+nt.getTypeSize("LONG"),c=nt.getShortAt(e,r,i),d=nt.getShortAt(e,r+a,i),f=nt.getLongAt(e,r+s,i);let l;if(void 0===nt.typeSizes[d]||!o&&void 0===Qe[t][c])return;if(function(e,t){return nt.typeSizes[e]*t<=nt.getTypeSize("LONG")}(d,f))l=dt(e,r+u,d,f,i);else{const t=nt.getLongAt(e,r+u,i);if(function(e,t,n,r,i){return t+n+nt.typeSizes[r]*i<=e.byteLength}(e,n,t,d,f)){l=dt(e,n+t,d,f,i,33723===c)}else l="<faulty value>"}d===nt.tagTypes.ASCII&&(l=function(e){const t=[];let n=0;for(let r=0;r<e.length;r++)"\0"!==e[r]?(void 0===t[n]&&(t[n]=""),t[n]+=e[r]):n++;return t}(l),l=function(e){try{return e.map((e=>decodeURIComponent(escape(e))))}catch(t){return e}}(l));let p=`undefined-${c}`,g=l;if(void 0!==Qe[t][c])if(void 0!==Qe[t][c].name&&void 0!==Qe[t][c].description){p=Qe[t][c].name;try{g=Qe[t][c].description(l)}catch(m){g=ft(l)}}else d===nt.tagTypes.RATIONAL||d===nt.tagTypes.SRATIONAL?(p=Qe[t][c],g=""+l[0]/l[1]):(p=Qe[t][c],g=ft(l));return{id:c,name:p,value:l,description:g}}function dt(e,t,n,r,i,o=!1){let a=[];o&&(r*=nt.typeSizes[n],n=nt.tagTypes.BYTE);for(let s=0;s<r;s++)a.push(at[n](e,t,i)),t+=nt.typeSizes[n];return n===nt.tagTypes.ASCII?a=nt.getAsciiValue(a):1===a.length&&(a=a[0]),a}function ft(e){return e instanceof Array?e.join(", "):e}const lt="Exif IFD Pointer",pt="GPS Info IFD Pointer",gt="Interoperability IFD Pointer",mt={read:function(e,t,n){const r=v.getByteOrder(e,t);let i=function(e,t,n,r){return ut(e,Je,t,st(e,t,n),n,r)}(e,t,r,n);return i=ht(i,e,t,r,n),i=St(i,e,t,r,n),i=yt(i,e,t,r,n),i}};function ht(e,t,n,r,i){return void 0!==e[lt]?c(e,ut(t,Ke,n,n+e[lt].value,r,i)):e}function St(e,t,n,r,i){return void 0!==e[pt]?c(e,ut(t,qe,n,n+e[pt].value,r,i)):e}function yt(e,t,n,r,i){return void 0!==e[gt]?c(e,ut(t,Ze,n,n+e[gt].value,r,i)):e}const vt={read:function(e,t,n){const r=v.getByteOrder(e,t),i=ut(e,"mpf",t,st(e,t,r),r,n);return function(e,t,n,r){if(!n.MPEntry)return n;const i=[];for(let o=0;o<Math.ceil(n.MPEntry.value.length/It);o++){i[o]={};const a=bt(n.MPEntry.value,o*It,nt.getTypeSize("LONG"),r);i[o].ImageFlags=Ut(a),i[o].ImageFormat=Et(a),i[o].ImageType=Pt(a);const s=bt(n.MPEntry.value,o*It+4,nt.getTypeSize("LONG"),r);i[o].ImageSize={value:s,description:""+s};const u=Ct(o,n.MPEntry,r,t);i[o].ImageOffset={value:u,description:""+u};const c=bt(n.MPEntry.value,o*It+12,nt.getTypeSize("SHORT"),r);i[o].DependentImage1EntryNumber={value:c,description:""+c};const l=bt(n.MPEntry.value,o*It+14,nt.getTypeSize("SHORT"),r);i[o].DependentImage2EntryNumber={value:l,description:""+l},i[o].image=e.buffer.slice(u,u+s),d(i[o],"base64",(function(){return f(this.image)}))}return n.Images=i,n}(e,t,i,r)}},It=16;function bt(e,t,n,r){if(r===v.LITTLE_ENDIAN){let r=0;for(let i=0;i<n;i++)r+=e[t+i]<<8*i;return r}let i=0;for(let o=0;o<n;o++)i+=e[t+o]<<8*(n-1-o);return i}function Ut(e){const t=[e>>31&1,e>>30&1,e>>29&1],n=[];return t[0]&&n.push("Dependent Parent Image"),t[1]&&n.push("Dependent Child Image"),t[2]&&n.push("Representative Image"),{value:t,description:n.join(", ")||"None"}}function Et(e){const t=e>>24&7;return{value:t,description:0===t?"JPEG":"Unknown"}}function Pt(e){const t=16777215&e;return{value:t,description:{196608:"Baseline MP Primary Image",65537:"Large Thumbnail (VGA equivalent)",65538:"Large Thumbnail (Full HD equivalent)",131073:"Multi-Frame Image (Panorama)",131074:"Multi-Frame Image (Disparity)",131075:"Multi-Frame Image (Multi-Angle)",0:"Undefined"}[t]||"Unknown"}}function Ct(e,t,n,r){return function(e){return 0===e}(e)?0:bt(t.value,e*It+8,nt.getTypeSize("LONG"),n)+r}const wt={read:function(e,t){const n=function(e,t){return nt.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=7;if(r+1>n)return;const i=nt.getByteAt(e,t+r);return{value:i,description:""+i}}(e,t,n);return{"Bits Per Sample":At(e,t,n),"Image Height":Tt(e,t,n),"Image Width":Ft(e,t,n),"Color Components":r,Subsampling:r&&Ot(e,t,r.value,n)}}};function At(e,t,n){if(3>n)return;const r=nt.getByteAt(e,t+2);return{value:r,description:""+r}}function Tt(e,t,n){if(5>n)return;const r=nt.getShortAt(e,t+3);return{value:r,description:`${r}px`}}function Ft(e,t,n){if(7>n)return;const r=nt.getShortAt(e,t+5);return{value:r,description:`${r}px`}}function Ot(e,t,n,r){if(8+3*n>r)return;const i=[];for(let o=0;o<n;o++){const n=t+8+3*o;i.push([nt.getByteAt(e,n),nt.getByteAt(e,n+1),nt.getByteAt(e,n+2)])}return{value:i,description:i.length>1?xt(i)+Mt(i):""}}function xt(e){const t={1:"Y",2:"Cb",3:"Cr",4:"I",5:"Q"};return e.map((e=>t[e[0]])).join("")}function Mt(e){const t={17:"4:4:4 (1 1)",18:"4:4:0 (1 2)",20:"4:4:1 (1 4)",33:"4:2:2 (2 1)",34:"4:2:0 (2 2)",36:"4:2:1 (2 4)",65:"4:1:1 (4 1)",66:"4:1:0 (4 2)"};return 0===e.length||void 0===e[0][1]||void 0===t[e[0][1]]?"":t[e[0][1]]}const Lt={read:function(e,t){const n=function(e,t){return nt.getShortAt(e,t)}(e,t),r=function(e,t,n){const r=14;if(r+1>n)return;const i=nt.getByteAt(e,t+r);return{value:i,description:`${i}px`}}(e,t,n),i=function(e,t,n){const r=15;if(r+1>n)return;const i=nt.getByteAt(e,t+r);return{value:i,description:`${i}px`}}(e,t,n),o={"JFIF Version":Dt(e,t,n),"Resolution Unit":Nt(e,t,n),XResolution:_t(e,t,n),YResolution:kt(e,t,n),"JFIF Thumbnail Width":r,"JFIF Thumbnail Height":i};if(void 0!==r&&void 0!==i){const a=function(e,t,n,r){const i=16;if(0===n||i+n>r)return;const o=e.buffer.slice(t+i,t+i+n);return{value:o,description:"<24-bit RGB pixel data>"}}
1(e,t,3*r.value*i.value,n);a&&(o["JFIF Thumbnail"]=a)}for(const a in o)void 0===o[a]&&delete o[a];return o}};function Dt(e,t,n){if(9>n)return;const r=nt.getByteAt(e,t+7),i=nt.getByteAt(e,t+7+1);return{value:256*r+i,description:r+"."+i}}function Nt(e,t,n){if(10>n)return;const r=nt.getByteAt(e,t+9);return{value:r,description:Rt(r)}}function Rt(e){return 0===e?"None":1===e?"inches":2===e?"cm":"Unknown"}function _t(e,t,n){if(12>n)return;const r=nt.getShortAt(e,t+10);return{value:r,description:""+r}}function kt(e,t,n){if(14>n)return;const r=nt.getShortAt(e,t+12);return{value:r,description:""+r}}const Bt={iptc:{256:{name:"Model Version",description:e=>((e[0]<<8)+e[1]).toString()},261:{name:"Destination",repeatable:!0},276:{name:"File Format",description:e=>((e[0]<<8)+e[1]).toString()},278:{name:"File Format Version",description:e=>((e[0]<<8)+e[1]).toString()},286:"Service Identifier",296:"Envelope Number",306:"Product ID",316:"Envelope Priority",326:{name:"Date Sent",description:Gt},336:{name:"Time Sent",description:jt},346:{name:"Coded Character Set",description:Ht,encoding_name:Ht},356:"UNO",376:{name:"ARM Identifier",description:e=>((e[0]<<8)+e[1]).toString()},378:{name:"ARM Version",description:e=>((e[0]<<8)+e[1]).toString()},512:{name:"Record Version",description:e=>((e[0]<<8)+e[1]).toString()},515:"Object Type Reference",516:"Object Attribute Reference",517:"Object Name",519:"Edit Status",520:{name:"Editorial Update",description:e=>"01"===g(e)?"Additional Language":"Unknown"},522:"Urgency",524:{name:"Subject Reference",repeatable:!0,description:e=>{const t=g(e).split(":");return t[2]+(t[3]?"/"+t[3]:"")+(t[4]?"/"+t[4]:"")}},527:"Category",532:{name:"Supplemental Category",repeatable:!0},534:"Fixture Identifier",537:{name:"Keywords",repeatable:!0},538:{name:"Content Location Code",repeatable:!0},539:{name:"Content Location Name",repeatable:!0},542:"Release Date",547:"Release Time",549:"Expiration Date",550:"Expiration Time",552:"Special Instructions",554:{name:"Action Advised",description:e=>{const t=g(e);return"01"===t?"Object Kill":"02"===t?"Object Replace":"03"===t?"Object Append":"04"===t?"Object Reference":"Unknown"}},557:{name:"Reference Service",repeatable:!0},559:{name:"Reference Date",repeatable:!0},562:{name:"Reference Number",repeatable:!0},567:{name:"Date Created",description:Gt},572:{name:"Time Created",description:jt},574:{name:"Digital Creation Date",description:Gt},575:{name:"Digital Creation Time",description:jt},577:"Originating Program",582:"Program Version",587:{name:"Object Cycle",description:e=>{const t=g(e);return"a"===t?"morning":"p"===t?"evening":"b"===t?"both":"Unknown"}},592:{name:"By-line",repeatable:!0},597:{name:"By-line Title",repeatable:!0},602:"City",604:"Sub-location",607:"Province/State",612:"Country/Primary Location Code",613:"Country/Primary Location Name",615:"Original Transmission Reference",617:"Headline",622:"Credit",627:"Source",628:"Copyright Notice",630:{name:"Contact",repeatable:!0},632:"Caption/Abstract",634:{name:"Writer/Editor",repeatable:!0},637:{name:"Rasterized Caption",description:e=>e},642:"Image Type",643:{name:"Image Orientation",description:e=>{const t=g(e);return"P"===t?"Portrait":"L"===t?"Landscape":"S"===t?"Square":"Unknown"}},647:"Language Identifier",662:{name:"Audio Type",description:e=>{const t=g(e),n=t.charAt(0),r=t.charAt(1);let i="";return"1"===n?i+="Mono":"2"===n&&(i+="Stereo"),"A"===r?i+=", actuality":"C"===r?i+=", question and answer session":"M"===r?i+=", music, transmitted by itself":"Q"===r?i+=", response to a question":"R"===r?i+=", raw sound":"S"===r?i+=", scener":"V"===r?i+=", voicer":"W"===r&&(i+=", wrap"),""!==i?i:t}},663:{name:"Audio Sampling Rate",description:e=>parseInt(g(e),10)+" Hz"},664:{name:"Audio Sampling Resolution",description:e=>{const t=parseInt(g(e),10);return t+(1===t?" bit":" bits")}},665:{name:"Audio Duration",description:e=>{const t=g(e);return t.length>=6?t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2):t}},666:"Audio Outcue",698:"Short Document ID",699:"Unique Document ID",700:"Owner ID",712:{name:e=>2===e.length?"ObjectData Preview File Format":"Record 2 destination",description:e=>{if(2===e.length){const t=(e[0]<<8)+e[1];return 0===t?"No ObjectData":1===t?"IPTC-NAA Digital Newsphoto Parameter Record":2===t?"IPTC7901 Recommended Message Format":3===t?"Tagged Image File Format (Adobe/Aldus Image data)":4===t?"Illustrator (Adobe Graphics data)":5===t?"AppleSingle (Apple Computer Inc)":6===t?"NAA 89-3 (ANPA 1312)":7===t?"MacBinary II":8===t?"IPTC Unstructured Character Oriented File Format (UCOFF)":9===t?"United Press International ANPA 1312 variant":10===t?"United Press International Down-Load Message":11===t?"JPEG File Interchange (JFIF)":12===t?"Photo-CD Image-Pac (Eastman K
1odak)":13===t?"Microsoft Bit Mapped Graphics File [*.BMP]":14===t?"Digital Audio File [*.WAV] (Microsoft & Creative Labs)":15===t?"Audio plus Moving Video [*.AVI] (Microsoft)":16===t?"PC DOS/Windows Executable Files [*.COM][*.EXE]":17===t?"Compressed Binary File [*.ZIP] (PKWare Inc)":18===t?"Audio Interchange File Format AIFF (Apple Computer Inc)":19===t?"RIFF Wave (Microsoft Corporation)":20===t?"Freehand (Macromedia/Aldus)":21===t?'Hypertext Markup Language "HTML" (The Internet Society)':22===t?"MPEG 2 Audio Layer 2 (Musicom), ISO/IEC":23===t?"MPEG 2 Audio Layer 3, ISO/IEC":24===t?"Portable Document File (*.PDF) Adobe":25===t?"News Industry Text Format (NITF)":26===t?"Tape Archive (*.TAR)":27===t?"Tidningarnas Telegrambyr\xe5 NITF version (TTNITF DTD)":28===t?"Ritzaus Bureau NITF version (RBNITF DTD)":29===t?"Corel Draw [*.CDR]":`Unknown format ${t}`}return g(e)}},713:{name:"ObjectData Preview File Format Version",description:(e,t)=>{const n={"00":{"00":"1"},"01":{"01":"1","02":"2","03":"3","04":"4"},"02":{"04":"4"},"03":{"01":"5.0","02":"6.0"},"04":{"01":"1.40"},"05":{"01":"2"},"06":{"01":"1"},11:{"01":"1.02"},20:{"01":"3.1","02":"4.0","03":"5.0","04":"5.5"},21:{"02":"2.0"}},r=g(e);if(t["ObjectData Preview File Format"]){const e=g(t["ObjectData Preview File Format"].value);if(n[e]&&n[e][r])return n[e][r]}return r}},714:"ObjectData Preview Data",1802:{name:"Size Mode",description:e=>e[0].toString()},1812:{name:"Max Subfile Size",description:e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1882:{name:"ObjectData Size Announced",description:e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}},1887:{name:"Maximum ObjectData Size",description:e=>{let t=0;for(let n=0;n<e.length;n++)t=(t<<8)+e[n];return t.toString()}}}};function Gt(e){const t=g(e);return t.length>=8?t.substr(0,4)+"-"+t.substr(4,2)+"-"+t.substr(6,2):t}function jt(e){const t=g(e);let n=t;return t.length>=6&&(n=t.substr(0,2)+":"+t.substr(2,2)+":"+t.substr(4,2),11===t.length&&(n+=t.substr(6,1)+t.substr(7,2)+":"+t.substr(9,2))),n}function Ht(e){const t=g(e);return"\x1b%G"===t?"UTF-8":"\x1b%5"===t?"Windows-1252":"\x1b%/G"===t?"UTF-8 Level 1":"\x1b%/H"===t?"UTF-8 Level 2":"\x1b%/I"===t?"UTF-8 Level 3":"\x1b/A"===t?"ISO-8859-1":"\x1b/B"===t?"ISO-8859-2":"\x1b/C"===t?"ISO-8859-3":"\x1b/D"===t?"ISO-8859-4":"\x1b/@"===t?"ISO-8859-5":"\x1b/G"===t?"ISO-8859-6":"\x1b/F"===t?"ISO-8859-7":"\x1b/H"===t?"ISO-8859-8":"Unknown"}const zt={get:function(){if("undefined"!=typeof TextDecoder)return TextDecoder;return}};const $t={decode:function(e,t){const n=zt.get();if(void 0!==n&&void 0!==e)try{return new n(e).decode(Uint8Array.from(t))}catch(r){}return function(e){try{return decodeURIComponent(escape(e))}catch(r){return e}}(t.map((e=>String.fromCharCode(e))).join(""))},TAG_HEADER_SIZE:5};const Wt=943868237,Vt=4,Xt=Vt+8,Jt=1028,Yt=5,Kt={read:function(e,t,n){try{if(Array.isArray(e))return en(new DataView(Uint8Array.from(e).buffer),{size:e.length},0,n);const{naaBlock:r,dataOffset:i}=function(e,t){for(;t+Xt<=e.byteLength;){const n=qt(e,t);if(Zt(n))return{naaBlock:n,dataOffset:t+Xt};
1t+=Xt+n.size+Qt(n)}throw new Error("No IPTC NAA resource block.")}(e,t);return en(e,r,i,n)}catch(r){return{}}}};function qt(e,t){if(e.getUint32(t,!1)!==Wt)throw new Error("Not an IPTC resource block.");return{type:e.getUint16(t+Vt),size:e.getUint16(t+10)}}function Zt(e){return e.type===Jt}function Qt(e){return e.size%2!=0?1:0}function en(e,t,n,r){const i={};let o;const a=n+t.size;for(;n<a&&n<e.byteLength;){const{tag:t,tagSize:a}=tn(e,n,i,o,r);if(null===t)break;t&&("encoding"in t&&(o=t.encoding),void 0===i[t.name]||void 0===t.repeatable?i[t.name]={id:t.id,value:t.value,description:t.description}:(i[t.name]instanceof Array||(i[t.name]=[{id:i[t.name].id,value:i[t.name].value,description:i[t.name].description}]),i[t.name].push({id:t.id,value:t.value,description:t.description}))),n+=Yt+a}return i}function tn(e,t,n,r,i){if(function(e,t){const n=28;return e.getUint8(t)!==n}(e,t))return{tag:null,tagSize:0};const o=e.getUint16(t+1),a=e.getUint16(t+3);if(!i&&!Bt.iptc[o])return{tag:void 0,tagSize:a};const s=function(e,t,n){const r=[];for(let i=0;i<n;i++)r.push(e.getUint8(t+i));return r}(e,t+Yt,a),u={id:o,name:nn(Bt.iptc[o],o,s),value:s,description:rn(Bt.iptc[o],s,n,r)};return function(e){return Bt.iptc[e]&&Bt.iptc[e].repeatable}(o)&&(u.repeatable=!0),function(e){return Bt.iptc[e]&&void 0!==Bt.iptc[e].encoding_name}(o)&&(u.encoding=Bt.iptc[o].encoding_name(s)),{tag:u,tagSize:a}}function nn(e,t,n){return e?function(e){return"string"==typeof e}(e)?e:function(e){return"function"==typeof e.name}(e)?e.name(n):e.name:`undefined-${t}`}function rn(e,t,n,r){if(function(e){return e&&void 0!==e.description}(e))try{return e.description(t,n)}catch(i){}return function(e,t){return e&&t instanceof Array}(e,t)?$t.decode(r,t):t}const on={"tiff:Orientation":e=>"1"===e?"Horizontal (normal)":"2"===e?"Mirror horizontal":"3"===e?"Rotate 180":"4"===e?"Mirror vertical":"5"===e?"Mirror horizontal and rotate 270 CW":"6"===e?"Rotate 90 CW":"7"===e?"Mirror horizontal and rotate 90 CW":"8"===e?"Rotate 270 CW":e,"tiff:ResolutionUnit":e=>He.ResolutionUnit(parseInt(e,10)),"tiff:XResolution":e=>an(He.XResolution,e),"tiff:YResolution":e=>an(He.YResolution,e),"exif:ApertureValue":e=>an(He.ApertureValue,e),"exif:GPSLatitude":un,"exif:GPSLongitude":un,"exif:FNumber":e=>an(He.FNumber,e),"exif:FocalLength":e=>an(He.FocalLength,e),"exif:FocalPlaneResolutionUnit":e=>He.FocalPlaneResolutionUnit(parseInt(e,10)),"exif:ColorSpace":e=>He.ColorSpace(function(e){if("0x"===e.substring(0,2))return parseInt(e.substring(2),16);return parseInt(e,10)}(e)),"exif:ComponentsConfiguration"(e,t){if(/^\d, \d, \d, \d$/.test(t)){const e=t.split(", ").map((e=>e.charCodeAt(0)));return He.ComponentsConfiguration(e)}return t},"exif:Contrast":e=>He.Contrast(parseInt(e,10)),"exif:CustomRendered":e=>He.CustomRendered(parseInt(e,10)),"exif:ExposureMode":e=>He.ExposureMode(parseInt(e,10)),"exif:ExposureProgram":e=>He.ExposureProgram(parseInt(e,10)),"exif:ExposureTime":e=>sn(e)?He.ExposureTime(e.split("/").map((e=>parseInt(e,10)))):e,"exif:MeteringMode":e=>He.MeteringMode(parseInt(e,10)),"exif:Saturation":e=>He.Saturation(parseInt(e,10)),"exif:SceneCaptureType":e=>He.SceneCaptureType(parseInt(e,10)),"exif:Sharpness":e=>He.Sharpness(parseInt(e,10)),"exif:ShutterSpeedValue":e=>an(He.ShutterSpeedValue,e),"exif:WhiteBalance":e=>He.WhiteBalance(parseInt(e,10))};function an(e,t){return sn(t)?e(t.split("/")):t}function sn(e){return/^-?\d+\/-?\d+$/.test(e)}function un(e){const[t,n]=e.split(",");if(void 0!==t&&void 0!==n){const e=parseFloat(t),r=parseFloat(n),i=n.charAt(n.length-1);if(!Number.isNaN(e)&&!Number.isNaN(r))return""+(e+r/60)+i}return e}const cn={get:function(){if("undefined"!=typeof DOMParser)return new DOMParser;try{return new(require("@xmldom/xmldom").DOMParser)({errorHandler:{error:()=>{throw new Error("Faulty XML")}}})}catch(e){return}}};const dn={read:function(e,t){const n={};if("string"==typeof e)return ln(n,e),n;const[r,i]=function(e,t){if(0===t.length)return[];const n=[fn(e,t.slice(0,1))];t.length>1&&n.push(fn(e,t.slice(1)));return n}(e,t),o=ln(n,r);if(i){const r=ln(n,i);o||r||(delete n._raw,ln(n,fn(e,t)))}return n}};function fn(e,t){const n=t.reduce(((e,t)=>
1e+t.length),0),r=new Uint8Array(n);let i=0;for(let o=0;o<t.length;o++){const n=t[o],a=e.buffer.slice(n.dataOffset,n.dataOffset+n.length);r.set(new Uint8Array(a),i),i+=n.length}return new DataView(r.buffer)}function ln(e,t){try{const{doc:n,raw:r}=function(e){const t=cn.get();if(!t)throw console.warn("Warning: DOMParser is not available. It is needed to be able to parse XMP tags."),new Error;const n="string"==typeof e?e:o(e,0,e.byteLength),r=t.parseFromString((i=n,i.replace(/^.+(<\?xpacket begin)/,"$1").replace(/(<\?xpacket end=".*"\?>).+$/,"$1")),"application/xml");var i;if("parsererror"===r.documentElement.nodeName)throw new Error(r.documentElement.textContent);return{doc:r,raw:n}}(t);e._raw=(e._raw||"")+r;return c(e,hn(gn(pn(n),!0))),!0}catch(n){return!1}}function pn(e){for(let t=0;t<e.childNodes.length;t++){if("x:xmpmeta"===e.childNodes[t].tagName)return pn(e.childNodes[t]);if("rdf:RDF"===e.childNodes[t].tagName)return e.childNodes[t]}throw new Error}function gn(e,t=!1){const n=function(e){const t=[];for(let n=0;n<e.childNodes.length;n++)t.push(e.childNodes[n]);return t}(e);return 1===(r=n).length&&"#text"===r[0].nodeName?t?{}:function(e){return e.nodeValue}(n[0]):function(e){const t={};return e.forEach((e=>{if(function(e){return e.nodeName&&"#text"!==e.nodeName}(e)){const n=function(e){return{attributes:mn(e),value:gn(e)}}(e);void 0!==t[e.nodeName]?(Array.isArray(t[e.nodeName])||(t[e.nodeName]=[t[e.nodeName]]),t[e.nodeName].push(n)):t[e.nodeName]=n}})),t}(n);var r}function mn(e){const t={};for(let n=0;n<e.attributes.length;n++)t[e.attributes[n].nodeName]=decodeURIComponent(escape(e.attributes[n].value));return t}function hn(e){const t={};if("string"==typeof e)return e;for(const n in e){let r=e[n];Array.isArray(r)||(r=[r]),r.forEach((e=>{c(t,Sn(e.attributes)),"object"==typeof e.value&&c(t,En(e.value))}))}return t}function Sn(e){const t={};for(const r in e)try{yn(r)&&(t[In(r)]={value:e[r],attributes:{},description:bn(e[r],r)})}catch(n){}return t}function yn(e){return"rdf:parseType"!==e&&!vn(e)}function vn(e){return"xmlns"===e.split(":")[0]}function In(e){return/^MicrosoftPhoto(_\d+_)?:Rating$/i.test(e)?"RatingPercent":e.split(":")[1]}function bn(e,t=void 0){if(Array.isArray(e)){const n=function(e){return e.map((e=>void 0!==e.value?bn(e.value):bn(e))).join(", ")}(e);return t&&"function"==typeof on[t]?on[t](e,n):n}if("object"==typeof e)return function(e){const t=[];for(const n in e)t.push(`${Un(n)}: ${bn(e[n].value)}`);return t.join("; ")}(e);try{return t&&"function"==typeof on[t]?on[t](e):decodeURIComponent(escape(e))}catch(n){return e}}function Un(e){return"CiAdrCity"===e?"CreatorCity":"CiAdrCtry"===e?"CreatorCountry":"CiAdrExtadr"===e?"CreatorAddress":"CiAdrPcode"===e?"CreatorPostalCode":"CiAdrRegion"===e?"CreatorRegion":"CiEmailWork"===e?"CreatorWorkEmail":"CiTelWork"===e?"CreatorWorkPhone":"CiUrlWork"===e?"CreatorWorkUrl":e}function En(e){const t={};for(const r in e)try{vn(r)||(t[In(r)]=Pn(e[r],r))}catch(n){}return t}function Pn(e,t){return function(e){return Array.isArray(e)}(e)?function(e,t){return Ln(e[e.length-1],t)}(e,t):function(e){return"Resource"===e.attributes["rdf:parseType"]&&"string"==typeof e.value&&""===e.value.trim()}(e)?{value:"",attributes:{},description:""}:Cn(e)?wn(e,t):Tn(e)?Fn(e,t):On(e)?xn(e,t):function(e){return void 0!==Mn(e.value)}(e)?function(e,t){let n=Mn(e.value).value["rdf:li"];const r=An(e),i=[];void 0===n?n=[]:Array.isArray(n)||(n=[n]);return n.forEach((e=>{i.push(function(e){if(Cn(e))return wn(e);if(Tn(e))return Fn(e).value;if(On(e))return xn(e).value;return Ln(e)}(e))})),{value:i,attributes:r,description:bn(i,t)}}(e,t):Ln(e,t)}function Cn(e){return"Resource"===e.attributes["rdf:parseType"]&&void 0!==e.value["rdf:value"]||void 0!==e.value["rdf:Description"]&&void 0!==e.value["rdf:Description"].value["rdf:value"]}function wn(e,t){const n=An(e);void 0!==e.value["rdf:Description"]&&(e=e.value["rdf:Description"]),c(n,An(e),function(e){const t={};for(const n in e.value)"rdf:value"===n||vn(n)||(t[In(n)]=e.value[n].value);return t}(e));const r=function(e){return Dn(e.value["rdf:value"])||e.value["rdf:value"].value}(e);return{value:r,attributes:n,description:bn(r,t)}}function An(e){const t={};for(const n in e.attributes)"rdf:parseType"===n||"rdf:resource"===n||vn(n)||(t[In(n)]=e.attributes[n]);return t}function Tn(e){return"Resource"===e.attributes["rdf:parseType"]||void 0!==e.value["rdf:Description"]&&void 0===e.value["rdf:Description"].value["rdf:value"]}function Fn(e,t){const n={value:{},attributes:{}};return void 0!==e.value["rdf:Description"]&&(c(n.value,Sn(e.value["rdf:Description"].attributes)),c(n.attributes,An(e)),e=e.value["rdf:Description"]),c(n.value,En(e.value)),n.description=bn(n.value,t),n}function On(e){return 0===Object.keys(e.value).length&&void 0===e.attributes["xml:lang"]&&void 0===e.attributes["rdf:resource"]}function xn(e,t){const n=Sn(e.attributes);return{value:n,attributes:{},description:bn(n,t)}}function Mn(e){return e["rdf:Bag"]||e["rdf:Seq"]||e["rdf:Alt"]}function Ln(e,t){const n=Dn(e)||hn(e.value);return{value:n,attributes:An(e),description:bn(n,t)}}function Dn(e){return e.attributes&&e.attributes["rdf:resource"]}const Nn={2e3:{name:"PathInformation",description:function(e){const t={},n=[];for(let r=0;r<e.byteLength;r+=26){const i=nt.getShortAt(e,r);Rn[i]&&(t[i]||(t[i]=Rn[i].description),n.push({type:i,path:Rn[i].path(e,r+2)}))}return JSON.stringify({types:t,paths:n})}},2999:{name:"ClippingPathName",description(e){const[,t]=s(e,0);return t}}};const Rn={[0]:{description:"Closed subpath length",path:(e,t)=>[nt.getShortAt(e,t)]},[1]:{description:"Closed subpath Bezier knot, linked",path:_n},[2]:{description:"Closed subpath Bezier knot, unlinked",path:_n},[3]:{description:"Open subpath length",path:(e,t)=>[nt.getShortAt(e,t)]},[4]:{description:"Open subpath Bezier knot, linked",path:_n},[5]:{description:"Open subpath Bezier knot, unlinked",path:_n},[6]:{description:"Path fill rule",path:()=>[]},[8]:{description:"Initial fill rule",path:(e,t)=>[nt.getShortAt(e,t)]},[7]:{description:"Clipboard",path:function(e,t){return[[Bn(e,t,8),Bn(e,t+4,8),Bn(e,t+8,8),Bn(e,t+12,8)],Bn(e,t+16,8)]}}};function _n(e,t){const n=[];for(let r=0;r<24;r+=8)n.push(kn(e,t+r));return n}function kn(e,t){const n=Bn(e,t,8);return[Bn(e,t+4,8),n]}function Bn(e,t,n){const r=nt.getLongAt(e,t),i=r>>>31==0?1:-1,o=(2130706432&r)>>>32-n,a=r&parseInt(l("1",32-n),2);return i*function(e,t){return parseInt(e.replace(".",""),t)/Math.pow(t,(e.split(".")[1]||"").length)}(o.toString(2)+"."+(s=a.toString(2),l("0",32-n-s.length)+s),2);var s}const Gn={read:function(e,t){const n=i(new Uint8Array(e).buffer),r={};let a=0;for(;a<e.length;){const e=o(n,a,$n);a+=$n;const u=nt.getShortAt(n,a);a+=Hn;const{tagName:c,tagNameSize:d}=Wn(n,a);a+=d;const f=nt.getLongAt(n,a);if(a+=zn,e===jn){const e=i(n.buffer,a,f),d={id:u,value:o(e,0,f)};if(Nn[u]){try{d.description=Nn[u].description(e)}catch(s){d.description="<no description formatter>"}r[c||Nn[u].name]=d}else t&&(r[`undefined-${u}`]=d)}a+=f+f%2}return r}},jn="8BIM",Hn=2,zn=4,$n=jn.length;function Wn(e,t){const[n,r]=s(e,t);return{tagName:r,tagNameSize:1+n+(n%2==0?1:0)}}const Vn={desc:{name:"ICC Description"},cprt:{name:"ICC Copyright"},dmdd:{name:"ICC Device Model Description"},vued:{name:"ICC Viewing Conditions Description"},dmnd:{name:"ICC Device Manufacturer for Display"},tech:{name:"Technology"}},Xn={4:{name:"Preferred CMM type",value:(e,t)=>
1o(e,t,4),description:e=>null!==e?Jn(e):""},8:{name:"Profile Version",value:(e,t)=>e.getUint8(t).toString(10)+"."+(e.getUint8(t+1)>>4).toString(10)+"."+(e.getUint8(t+1)%16).toString(10)},12:{name:"Profile/Device class",value:(e,t)=>o(e,t,4),description:e=>{switch(e.toLowerCase()){case"scnr":return"Input Device profile";case"mntr":return"Display Device profile";case"prtr":return"Output Device profile";case"link":return"DeviceLink profile";case"abst":return"Abstract profile";case"spac":return"ColorSpace profile";case"nmcl":return"NamedColor profile";case"cenc":return"ColorEncodingSpace profile";case"mid ":return"MultiplexIdentification profile";case"mlnk":return"MultiplexLink profile";case"mvis":return"MultiplexVisualization profile";default:return e}}},16:{name:"Color Space",value:(e,t)=>o(e,t,4)},20:{name:"Connection Space",value:(e,t)=>o(e,t,4)},24:{name:"ICC Profile Date",value:(e,t)=>function(e,t){const n=e.getUint16(t),r=e.getUint16(t+2)-1,i=e.getUint16(t+4),o=e.getUint16(t+6),a=e.getUint16(t+8),s=e.getUint16(t+10);return new Date(Date.UTC(n,r,i,o,a,s))}(e,t).toISOString()},36:{name:"ICC Signature",value:(e,t)=>{return n=e.buffer.slice(t,t+4),String.fromCharCode.apply(null,new Uint8Array(n));var n}},40:{name:"Primary Platform",value:(e,t)=>o(e,t,4),description:e=>Jn(e)},48:{name:"Device Manufacturer",value:(e,t)=>o(e,t,4),description:e=>Jn(e)},52:{name:"Device Model Number",value:(e,t)=>o(e,t,4)},64:{name:"Rendering Intent",value:(e,t)=>e.getUint32(t),description:e=>{switch(e){case 0:return"Perceptual";case 1:return"Relative Colorimetric";case 2:return"Saturation";case 3:return"Absolute Colorimetric";default:return e}}},80:{name:"Profile Creator",value:(e,t)=>o(e,t,4)}};function Jn(e){switch(e.toLowerCase()){case"appl":return"Apple";case"adbe":return"Adobe";case"msft":return"Microsoft";case"sunw":return"Sun Microsystems";case"sgi":return"Silicon Graphics";case"tgnt":return"Taligent";default:return e}}const Yn={read:function(e,t){try{const n=t.reduce(((e,t)=>e+t.length),0),r=new Uint8Array(n);let i=0;const s=function(e){if(Array.isArray(e))return new DataView(Uint8Array.from(e).buffer).buffer;return e.buffer}(e);for(let e=1;e<=t.length;e++){const n=t.find((t=>t.chunkNumber===e));if(!n)throw new Error(`ICC chunk ${e} not found`);const o=s.slice(n.offset,n.offset+n.length),a=new Uint8Array(o);r.set(a,i),i+=a.length}return function(e){const t=e.buffer,n=e.getUint32();if(e.byteLength!==n)throw new Error("ICC profile length not matching");if(e.length<Kn)throw new Error("ICC profile too short");const r={},i=Object.keys(Xn);for(let o=0;o<i.length;o++){const t=i[o],n=Xn[t],a=n.value(e,parseInt(t,10));let s=a;n.description&&(s=n.description(a)),r[n.name]={value:a,description:s}}const s=or(t.slice(36,40));if(s!==Zn)throw new Error("ICC profile: missing signature");if(function(e){return e.length<qn+4}(t))return r;const u=e.getUint32(128);let c=132;for(let d=0;d<u;d++){if(ir(t,c))return r;const n=o(e,c,4),i=e.getUint32(c+4),s=e.getUint32(c+8);if(i>t.length)return r;const u=o(e,i,4);if(u===Qn){const o=e.getUint32(i+8);if(o>s)return r;ar(r,n,or(t.slice(i+12,i+o+11)))}else if(u===er){const t=e.getUint32(i+8),s=e.getUint32(i+12);let u=i+16;const c=[];for(let n=0;n<t;n++){const t=o(e,u+0,2),n=o(e,u+2,2),r=e.getUint32(u+4),d=e.getUint32(u+8),f=a(e,i+d,r);c.push({languageCode:t,countryCode:n,text:f}),u+=s}if(1===t)ar(r,n,c[0].text);else{const e={};for(let t=0;t<c.length;t++)e[`${c[t].languageCode}-${c[t].countryCode}`]=c[t].text;ar(r,n,e)}}else if(u===tr){ar(r,n,or(t.slice(i+8,i+s-7)))}else if(u===nr){ar(r,n,or(t.slice(i+8,i+12)))}c+=12}return r}(new DataView(r.buffer))}catch(n){return{}}}},Kn=84,qn=128,Zn="acsp",Qn="desc",er="mluc",tr="text",nr="sig ",rr=12;function ir(e,t){return e.length<t+rr}function or(e){return String.fromCharCode.apply(null,new Uint8Array(e))}function ar(e,t,n){Vn[t]?e[Vn[t].name]={value:n,description:n}:e[t]={value:n,description:n}}const sr={read:function(e,t){return{"Image Width":ur(e,t),"Image Height":cr(e,t),"Bit Depth":dr(e,t),"Color Type":fr(e,t),Compression:lr(e,t),Filter:pr(e,t),Interlace:gr(e,t)}}};function ur(e,t){if(t+0+4>e.byteLength)return;const n=nt.getLongAt(e,t);return{value:n,description:`${n}px`}}function cr(e,t){if(t+4+4>e.byteLength)return;const n=nt.getLongAt(e,t+4);return{value:n,description:`${n}px`}}function dr(e,t){if(t+8+1>e.byteLength)return;const n=nt.getByteAt(e,t+8);return{value:n,description:`${n}`}}function fr(e,t){if(t+9+1>e.byteLength)return;const n=nt.getByteAt(e,t+9);return{value:n,description:{0:"Grayscale",2:"RGB",3:"Palette",4:"Grayscale with Alpha",6:"RGB with Alpha"}[n]||"Unknown"}}function lr(e,t){if(t+10+1>e.byteLength)return;const n=nt.getByteAt(e,t+10);return{value:n,description:0===n?"Deflate/Inflate":"Unknown"}}function pr(e,t){if(t+11+1>e.byteLength)return;const n=nt.getByteAt(e,t+11);return{value:n,description:0===n?"Adaptive":"Unknown"}}function gr(e,t){if(t+12+1>e.byteLength)return;const n=nt.getByteAt(e,t+12);return{value:n,description:{0:"Noninterlaced",1:"Adam7 Interlace"}[n]||"Unknown"}}const mr={read:function(e,t){return t.reduce(((t,{offset:n,length:r,type:i})=>{const{name:o,value:a,description:s}=function(e,t,n,r){const i=[],o=[],a=[],s=[];let c=hr;for(let u=0;u<n&&t+u<e.byteLength;u++){if(c===Sr){if(0!==e.getUint8(t+u))return{};u+=br,c=Ur(r,c)}const n=e.getUint8(t+u);0===n?c=Ur(r,c):c===hr?i.push(n):c===yr?o.push(n):c===vr?a.push(n):s.push(n)}const d=u(s);return{name:Er(r,o,i),value:d,description:r===Pe?$t.decode("UTF-8",s):d}}(e,n,r,i);return o&&(t[o]={value:a,description:s}),t}),{})}},hr="STATE_KEYWORD",Sr="STATE_COMPRESSION",yr="STATE_LANG",vr="STATE_TRANSLATED_KEYWORD",Ir="STATE_TEXT",br=2;function Ur(e,t){return t===hr&&e===Pe?Sr:t===Sr?yr:t===yr?vr:Ir}function Er(e,t,n){const r=u(n);if(e===Ee||0===t.length)return r;return`${r} (${u(t)})`}const Pr={read:function(e,t){const n={};for(let r=0;r<t.length;r++){const i=nt.getLongAt(e,t[r]+ve),a=o(e,t[r]+Ie,ye);a===Ce?(n["Pixels Per Unit X"]=Cr(e,t[r],i),n["Pixels Per Unit Y"]=wr(e,t[r],i),n["Pixel Units"]=Ar(e,t[r],i)):a===we&&(n["Modify Date"]=Tr(e,t[r],i))}return n}};function Cr(e,t,n){if(!Fr(e,t,n,0,4))return;const r=nt.getLongAt(e,t+be+0);return{value:r,description:""+r}}function wr(e,t,n){if(!Fr(e,t,n,4,4))return;const r=nt.getLongAt(e,t+be+4);return{value:r,description:""+r}}function Ar(e,t,n){if(!Fr(e,t,n,8,1))return;const r=nt.getByteAt(e,t+be+8);return{value:r,description:1===r?"meters":"Unknown"}}function Tr(e,t,n){if(!Fr(e,t,n,0,7))return;const r=nt.getShortAt(e,t+be),i=nt.getByteAt(e,t+be+2),o=nt.getByteAt(e,t+be+3),a=nt.getByteAt(e,t+be+4),s=nt.getByteAt(e,t+be+5),u=nt.getByteAt(e,t+be+6);return{value:[r,i,o,a,s,u],description:`${Or(r,4)}-${Or(i,2)}-${Or(o,2)} ${Or(a,2)}:${Or(s,2)}:${Or(u,2)}`}}function Fr(e,t,n,r,i){return r+i<=n&&t+be+r+i<=e.byteLength}function Or(e,t){return`${"0".repeat(t-(""+e).length)}${e}`}const xr={read:function(e,t){const n={},r=nt.getByteAt(e,t);return n.Alpha=Dr(r),n.Animation=Nr(r),n.ImageWidth=Rr(e,t+Mr),n.ImageHeight=Rr(e,t+Lr),n}},Mr=4,Lr=7;function Dr(e){const t=16&e;return{value:t?1:0,description:t?"Yes":"No"}}function Nr(e){const t=2&e;return{value:t?1:0,description:t?"Yes":"No"}}function Rr(e,t){const n=nt.getByteAt(e,t)+256*nt.getByteAt(e,t+1)+65536*nt.getByteAt(e,t+2)+1;return{value:n,description:n+"px"}}const _r={read:function(e){return{"GIF Version":kr(e),"Image Width":Br(e),"Image Height":Gr(e),"Global Color Map":jr(e),"Bits Per Pixel":zr(e),"Color Resolution Depth":Hr(e)}}};function kr(e){if(6>e.byteLength)return;const t=o(e,3,3);return{value:t,description:t}}function Br(e){if(8>e.byteLength)return;const t=e.getUint16(6,!0);return{value:t,description:`${t}px`}}function Gr(e){if(10>e.byteLength)return;const t=e.getUint16(8,!0);return{value:t,description:`${t}px`}}function jr(e){if(11>e.byteLength)return;const t=(128&e.getUint8(10))>>>7;return{value:t,description:1===t?"Yes":"No"}}function Hr(e){if(11>e.byteLength)return;const t=1+((112&e.getUint8(10))>>>4);return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}function zr(e){if(11>e.byteLength)return;const t=1+(7&e.getUint8(10));return{value:t,description:`${t} ${1===t?"bit":"bits"}`}}const $r=[6,7,99],Wr={get:function(e,t,n){if(r=t,r&&(void 0===r.Compression||$r.includes(r.Compression.value))&&r.JPEGInterchangeFormat&&r.JPEGInterchangeFormat.value&&r.JPEGInterchangeFormatLength&&r.JPEGInterchangeFormatLength.value){t.type="image/jpeg";const r=n+t.JPEGInterchangeFormat.value;t.image=e.buffer.slice(r,r+t.JPEGInterchangeFormatLength.value),d(t,"base64",(function(){return f(this.image)}))}var r;return t}};function Vr(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=(new Error).stack}Vr.prototype=new Error;const Xr={MetadataMissingError:Vr},Jr={load:Kr,loadView:Zr,errors:Xr},Yr=Xr;function Kr(e,t){return function(e){return"string"==typeof e}(e)?function(e,t){if(/^\w+:\/\//.test(e))return"undefined"!=typeof fetch?function(e,{length:t}={}){const n={method:"GET"};Number.isInteger(t)&&t>=0&&(n.headers={range:"bytes=0-"+(t-1)});
1return fetch(e,n).then((e=>e.arrayBuffer()))}(e,t):function(e,{length:t}={}){return new Promise(((n,r)=>{const i={};Number.isInteger(t)&&t>=0&&(i.headers={range:"bytes=0-"+(t-1)});const o=function(e){if(/^https:\/\//.test(e))return require("https").get;return require("http").get}(e);o(e,i,(e=>{if(e.statusCode>=200&&e.statusCode<=299){const t=[];e.on("data",(e=>t.push(Buffer.from(e)))),e.on("error",(e=>r(e))),e.on("end",(()=>n(Buffer.concat(t))))}else r(`Could not fetch file: ${e.statusCode} ${e.statusMessage}`),e.resume()})).on("error",(e=>r(e)))}))}(e,t);if(function(e){return/^data:[^;,]*(;base64)?,/.test(e)}(e))return Promise.resolve(function(e){const t=e.substring(e.indexOf(",")+1);if(-1!==e.indexOf(";base64")){if("undefined"!=typeof atob)return Uint8Array.from(atob(t),(e=>e.charCodeAt(0))).buffer;if("undefined"==typeof Buffer)return;return void 0!==Buffer.from?Buffer.from(t,"base64"):new Buffer(t,"base64")}const n=decodeURIComponent(t);return"undefined"!=typeof Buffer?void 0!==Buffer.from?Buffer.from(n):new Buffer(n):Uint8Array.from(n,(e=>e.charCodeAt(0))).buffer}(e));return function(e,{length:t}={}){return new Promise(((n,r)=>{const i=function(){try{return require("fs")}catch(e){return}}();i.open(e,((o,a)=>{o?r(o):i.stat(e,((o,s)=>{if(o)r(o);else{const o=Math.min(s.size,void 0!==t?t:s.size),u=Buffer.alloc(o),c={buffer:u,length:o};i.read(a,c,(t=>{t?r(t):i.close(a,(t=>{t&&console.warn(`Could not close file ${e}:`,t),n(u)}))}))}}))}))}))}(e,t)}(e,t).then((e=>qr(e,t))):function(e){return"undefined"!=typeof window&&"undefined"!=typeof File&&e instanceof File}(e)?(n=e,new Promise(((e,t)=>{const r=new FileReader;r.onload=t=>e(t.target.result),r.onerror=()=>t(r.error),r.readAsArrayBuffer(n)}))).then((e=>qr(e,t))):qr(e,t);var n}function qr(e,t){return function(e){try{return Buffer.isBuffer(e)}catch(t){return!1}}(e)&&(e=new Uint8Array(e).buffer),Zr(function(e){try{return new DataView(e)}catch(t){return new r(e)}}(e),t)}function Zr(e,{expanded:t=!1,includeUnknown:n=!1}={expanded:!1,includeUnknown:!1}){let r=!1,i={};const{fileType:o,fileDataOffset:a,jfifDataOffset:s,tiffHeaderOffset:d,iptcDataOffset:f,xmpChunks:l,iccChunks:g,mpfDataOffset:m,pngHeaderOffset:S,pngTextChunks:y,pngChunkOffsets:v,vp8xChunkOffset:I,gifHeaderOffset:b}=Ge.parseAppMarkers(e);if(p.USE_JPEG&&p.USE_FILE&&function(e){return void 0!==e}(a)){r=!0;const n=wt.read(e,a);t?i.file=n:i=c({},i,n)}if(p.USE_JPEG&&p.USE_JFIF&&function(e){return void 0!==e}(s)){r=!0;const n=Lt.read(e,s);t?i.jfif=n:i=c({},i,n)}if(p.USE_EXIF&&function(e){return void 0!==e}(d)){r=!0;const o=mt.read(e,d,n);if(o.Thumbnail&&(i.Thumbnail=o.Thumbnail,delete o.Thumbnail),t?(i.exif=o,function(e){if(e.exif){if(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef)try{e.gps=e.gps||{},e.gps.Latitude=h(e.exif.GPSLatitude.value),"S"===e.exif.GPSLatitudeRef.value.join("")&&(e.gps.Latitude=-e.gps.Latitude)}catch(t){}if(e.exif.GPSLongitude&&e.exif.GPSLongitudeRef)try{e.gps=e.gps||{},e.gps.Longitude=h(e.exif.GPSLongitude.value),"W"===e.exif.GPSLongitudeRef.value.join("")&&(e.gps.Longitude=-e.gps.Longitude)}catch(t){}if(e.exif.GPSAltitude&&e.exif.GPSAltitudeRef)try{e.gps=e.gps||{},e.gps.Altitude=e.exif.GPSAltitude.value[0]/e.exif.GPSAltitude.value[1],1===e.exif.GPSAltitudeRef.value&&(e.gps.Altitude=-e.gps.Altitude)}catch(t){}}}(i)):i=c({},i,o),p.USE_TIFF&&p.USE_IPTC&&o["IPTC-NAA"]&&!Qr(f)){const e=Kt.read(o["IPTC-NAA"].value,0,n);t?i.iptc=e:i=c({},i,e)}if(p.USE_TIFF&&p.USE_XMP&&o.ApplicationNotes&&!ei(l)){const e=dn.read(u(o.ApplicationNotes.value));t?i.xmp=e:(delete e._raw,i=c({},i,e))}if(p.USE_PHOTOSHOP&&o.ImageSourceData){const e=Gn.read(o.PhotoshopSettings.value,n);t?i.photoshop=e:i=c({},i,e)}if(p.USE_TIFF&&p.USE_ICC&&o.ICC_Profile&&!ti(g)){const e=Yn.read(o.ICC_Profile.value,[{offset:0,length:o.ICC_Profile.value.length,chunkNumber:1,chunksTotal:1}]);t?i.icc=e:i=c({},i,e)}}if(p.USE_JPEG&&p.USE_IPTC&&Qr(f)){r=!0;const o=Kt.read(e,f,n);t?i.iptc=o:i=c({},i,o)}if(p.USE_XMP&&ei(l)){r=!0;const n=dn.read(e,l);t?i.xmp=n:(delete n._raw,i=c({},i,n))}if((p.USE_JPEG||p.USE_WEBP)&&p.USE_ICC&&ti(g)){r=!0;const n=Yn.read(e,g);t?i.icc=n:i=c({},i,n)}if(p.USE_MPF&&function(e){return void 0!==e}(m)){r=!0;const o=vt.read(e,m,n);t?i.mpf=o:i=c({},i,o)}if(p.USE_PNG&&p.USE_PNG_FILE&&void 0!==S){r=!0;const n=sr.read(e,S);t?(i.png=i.png?c({},i.png,n):n,i.pngFile=n):i=c({},i,n)}if(p.USE_PNG&&function(e){return void 0!==e}(y)){r=!0;const n=mr.read(e,y);t?(i.png=i.png?c({},i.png,n):n,i.pngText=n):i=c({},i,n)}if(p.USE_PNG&&function(e){return void 0!==e}(v)){r=!0;const n=Pr.read(e,v);t?i.png=i.png?c({},i.png,n):n:i=c({},i,n)}if(p.USE_WEBP&&function(e){return void 0!==e}(I)){r=!0;const n=xr.read(e,I);t?i.riff=i.riff?c({},i.riff,n):n:i=c({},i,n)}if(p.USE_GIF&&function(e){return void 0!==e}(b)){r=!0;const n=_r.read(e,b);t?i.gif=i.gif?c({},i.gif,n):n:i=c({},i,n)}const U=(p.USE_JPEG||p.USE_WEBP)&&p.USE_EXIF&&p.USE_THUMBNAIL&&Wr.get(e,i.Thumbnail,d);if(U?(r=!0,i.Thumbnail=U):delete i.Thumbnail,o&&(t?(i.file||(i.file={}
1),i.file.FileType=o):i.FileType=o),!r)throw new Xr.MetadataMissingError;return i}function Qr(e){return void 0!==e}function ei(e){return Array.isArray(e)&&e.length>0}function ti(e){return Array.isArray(e)&&e.length>0}},4585:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.detector=void 0;const r=n(2539),i=new Map([[56,"psd"],[66,"bmp"],[68,"dds"],[71,"gif"],[73,"tiff"],[77,"tiff"],[82,"webp"],[105,"icns"],[137,"png"],[255,"jpg"]]);t.detector=function(e){const t=e[0],n=i.get(t);return n&&r.typeHandlers.get(n).validate(e)?n:r.types.find((t=>r.typeHandlers.get(t).validate(e)))}},5324:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.disableTypes=t.imageSize=t.types=void 0;var r=n(2539);Object.defineProperty(t,"types",{enumerable:!0,get:function(){return r.types}});var i=n(1208);Object.defineProperty(t,"imageSize",{enumerable:!0,get:function(){return i.lookup}}),Object.defineProperty(t,"disableTypes",{enumerable:!0,get:function(){return i.disableTypes}})},1208:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.disableTypes=t.lookup=void 0;const r=n(2539),i=n(4585),o={disabledTypes:[]};t.lookup=function(e){const t=(0,i.detector)(e);if(void 0!==t){if(o.disabledTypes.indexOf(t)>-1)throw new TypeError("disabled file type: "+t);const n=r.typeHandlers.get(t).calculate(e);if(void 0!==n)return n.type=n.type??t,n}throw new TypeError("unsupported file type: "+t)};t.disableTypes=e=>{o.disabledTypes=e}},4040:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BMP=void 0;const r=n(5762);t.BMP={validate:e=>"BM"===(0,r.toUTF8String)(e,0,2),calculate:e=>({height:Math.abs((0,r.readInt32LE)(e,22)),width:(0,r.readUInt32LE)(e,18)})}},8863:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CUR=void 0;const r=n(2763),i=n(5762);t.CUR={validate(e){const t=(0,i.readUInt16LE)(e,0),n=(0,i.readUInt16LE)(e,4);if(0!==t||0===n)return!1;return 2===(0,i.readUInt16LE)(e,2)},calculate:e=>r.ICO.calculate(e)}},2956:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DDS=void 0;const r=n(5762);t.DDS={validate:e=>542327876===(0,r.readUInt32LE)(e,0),calculate:e=>({height:(0,r.readUInt32LE)(e,12),width:(0,r.readUInt32LE)(e,16)})}},2928:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GIF=void 0;const r=n(5762),i=/^GIF8[79]a/;t.GIF={validate:e=>i.test((0,r.toUTF8String)(e,0,6)),calculate:e=>({height:(0,r.readUInt16LE)(e,8),width:(0,r.readUInt16LE)(e,6)})}},6178:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HEIF=void 0;const r=n(5762),i={avif:"avif",mif1:"heif",msf1:"heif",heic:"heic",heix:"heic",hevc:"heic",hevx:"heic"};t.HEIF={validate(e){const t=(0,r.toUTF8String)(e,4,8),n=(0,r.toUTF8String)(e,8,12);return"ftyp"===t&&n in i},calculate(e){const t=(0,r.findBox)(e,"meta",0),n=t&&(0,r.findBox
1)(e,"iprp",t.offset+12),i=n&&(0,r.findBox)(e,"ipco",n.offset+8),o=i&&(0,r.findBox)(e,"ispe",i.offset+8);if(o)return{height:(0,r.readUInt32BE)(e,o.offset+16),width:(0,r.readUInt32BE)(e,o.offset+12),type:(0,r.toUTF8String)(e,8,12)};throw new TypeError("Invalid HEIF, no size found")}}},9663:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ICNS=void 0;const r=n(5762),i={ICON:32,"ICN#":32,"icm#":16,icm4:16,icm8:16,"ics#":16,ics4:16,ics8:16,is32:16,s8mk:16,icp4:16,icl4:32,icl8:32,il32:32,l8mk:32,icp5:32,ic11:32,ich4:48,ich8:48,ih32:48,h8mk:48,icp6:64,ic12:32,it32:128,t8mk:128,ic07:128,ic08:256,ic13:256,ic09:512,ic14:512,ic10:1024};function o(e,t){const n=t+4;return[(0,r.toUTF8String)(e,t,n),(0,r.readUInt32BE)(e,n)]}function a(e){const t=i[e];return{width:t,height:t,type:e}}t.ICNS={validate:e=>"icns"===(0,r.toUTF8String)(e,0,4),calculate(e){const t=e.length,n=(0,r.readUInt32BE)(e,4);let i=8,s=o(e,i),u=a(s[0]);if(i+=s[1],i===n)return u;const c={height:u.height,images:[u],width:u.width};for(;i<n&&i<t;)s=o(e,i),u=a(s[0]),i+=s[1],c.images.push(u);return c}}},2763:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ICO=void 0;const r=n(5762);function i(e,t){const n=e[t];return 0===n?256:n}function o(e,t){const n=6+16*t;return{height:i(e,n+1),width:i(e,n)}}t.ICO={validate(e){const t=(0,r.readUInt16LE)(e,0),n=(0,r.readUInt16LE)(e,4);if(0!==t||0===n)return!1;return 1===(0,r.readUInt16LE)(e,2)},calculate(e){const t=(0,r.readUInt16LE)(e,4),n=o(e,0);if(1===t)return n;const i=[n];for(let r=1;r<t;r+=1)i.push(o(e,r));return{height:n.height,images:i,width:n.width}}}},2539:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.types=t.typeHandlers=void 0;const r=n(4040),i=n(8863),o=n(2956),a=n(2928),s=n(6178),u=n(9663),c=n(2763),d=n(2924),f=n(457),l=n(6662),p=n(3161),g=n(6386),m=n(2399),h=n(8470),S=n(734),y=n(8692),v=n(2741),I=n(6618);t.typeHandlers=new Map([["bmp",r.BMP],["cur",i.CUR],["dds",o.DDS],["gif",a.GIF],["heif",s.HEIF],["icns",u.ICNS],["ico",c.ICO],["j2c",d.J2C],["jp2",f.JP2],["jpg",l.JPG],["ktx",p.KTX],["png",g.PNG],["pnm",m.PNM],["psd",h.PSD],["svg",S.SVG],["tga",y.TGA],["tiff",v.TIFF],["webp",I.WEBP]]),t.types=Array.from(t.typeHandlers.keys())},2924:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.J2C=void 0;const r=n(5762);t.J2C={validate:e=>"ff4fff51"===(0,r.toHexString)(e,0,4),calculate:e=>({height:(0,r.readUInt32BE)(e,12),width:(0,r.readUInt32BE)(e,8)})}},457:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JP2=void 0;const r=n(5762);t.JP2={validate(e){if(1783636e3!==(0,r.readUInt32BE)(e,4)||(0,r.readUInt32BE)(e,0)<1)return!1;const t=(0,r.findBox)(e,"ftyp",0);return!!t&&1718909296===(0,r.readUInt32BE)(e,t.offset+4)},calculate(e){const t=(0,r.findBox)(e,"jp2h",0),n=t&&(0,r.findBox
1)(e,"ihdr",t.offset+8);if(n)return{height:(0,r.readUInt32BE)(e,n.offset+8),width:(0,r.readUInt32BE)(e,n.offset+12)};throw new TypeError("Unsupported JPEG 2000 format")}}},6662:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JPG=void 0;const r=n(5762),i=6,o=12,a=2;function s(e){return"45786966"===(0,r.toHexString)(e,2,6)}function u(e,t){return{height:(0,r.readUInt16BE)(e,t),width:(0,r.readUInt16BE)(e,t+2)}}function c(e,t){const n=e.slice(2,t),s=(0,r.toHexString)(n,i,i+2),u="4d4d"===s;if(u||"4949"===s)return function(e,t){const n=i+8,s=(0,r.readUInt)(e,16,n,t);for(let i=0;i<s;i++){const s=n+a+i*o,u=s+o;if(s>e.length)return;const c=e.slice(s,u);if(274===(0,r.readUInt)(c,16,0,t)){if(3!==(0,r.readUInt)(c,16,2,t))return;if(1!==(0,r.readUInt)(c,32,4,t))return;return(0,r.readUInt)(c,16,8,t)}}}(n,u)}function d(e,t){if(t>e.length)throw new TypeError("Corrupt JPG, exceeded buffer limits")}t.JPG={validate:e=>"ffd8"===(0,r.toHexString)(e,0,2),calculate(e){let t,n;for(e=e.slice(4);e.length;){const i=(0,r.readUInt16BE)(e,0);if(255===e[i]){if(s(e)&&(t=c(e,i)),d(e,i),n=e[i+1],192===n||193===n||194===n){const n=u(e,i+5);return t?{height:n.height,orientation:t,width:n.width}:n}e=e.slice(i+2)}else e=e.slice(1)}throw new TypeError("Invalid JPG, no size found")}}},3161:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KTX=void 0;const r=n(5762);t.KTX={validate:e=>{const t=(0,r.toUTF8String)(e,1,7);return["KTX 11","KTX 20"].includes(t)},calculate:e=>{const t=49===e[5]?"ktx":"ktx2",n="ktx"===t?36:20;return{height:(0,r.readUInt32LE)(e,n+4),width:(0,r.readUInt32LE)(e,n),type:t}}}},6386:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PNG=void 0;const r=n(5762),i="CgBI";t.PNG={validate(e){if("PNG\r\n\x1a\n"===(0,r.toUTF8String)(e,1,8)){let t=(0,r.toUTF8String)(e,12,16);if(t===i&&(t=(0,r.toUTF8String)(e,28,32)),"IHDR"!==t)throw new TypeError("Invalid PNG");return!0}return!1},calculate:e=>(0,r.toUTF8String)(e,12,16)===i?{height:(0,r.readUInt32BE)(e,36),width:(0,r.readUInt32BE)(e,32)}:{height:(0,r.readUInt32BE)(e,20),width:(0,r.readUInt32BE)(e,16)}}},2399:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PNM=void 0;const r=n(5762),i={P1:"pbm/ascii",P2:"pgm/ascii",P3:"ppm/ascii",P4:"pbm",P5:"pgm",P6:"ppm",P7:"pam",PF:"pfm"},o={default:e=>{let t=[];for(;e.length>0;){const n=e.shift();if("#"!==n[0]){t=n.split(" ");break}}if(2===t.length)return{height:parseInt(t[1],10),width:parseInt(t[0],10)};throw new TypeError("Invalid PNM")},pam:e=>{const t={};for(;e.length>0;){const n=e.shift();if(n.length>16||n.charCodeAt(0)>128)continue;const[r,i]=n.split(" ");if(r&&i&&(t[r.toLowerCase()]=parseInt(i,10)),t.height&&t.width)break}if(t.height&&t.width)return{height:t.height,width:t.width};throw new TypeError("Invalid PAM")}};t.PNM={validate:e=>(0,r.toUTF8String)(e,0,2)in i,calculate(e){const t=(0,r.toUTF8String)(e,0,2),n=i[t],a=(0,r.toUTF8String)(e,3).split(/[\r\n]+/);return(o[n]||o.default)(a)}}},8470:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PSD=void 0;const r=n(5762);t.PSD={validate:e=>"8BPS"===(0,r.toUTF8String)(e,0,4),calculate:e=>({height:(0,r.readUInt32BE)(e,14),width:(0,r.readUInt32BE)(e,18)})}},734:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SVG=void 0;const r=n(5762),i=/<svg\s([^>"']|"[^"]*"|'[^']*')*>/,o={height:/\sheight=(['"])([^%]+?)\1/,root:i,viewbox:/\sviewBox=(['"])(.+?)\1/i,width:/\swidth=(['"])([^%]+?)\1/},a=2.54,s={in:96,cm:96/a,em:16,ex:8,m:96/a*100,mm:96/a/10,pc:96/72/12,pt:96/72,px:1},u=new RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(s).join("|")})?$`);function c(e){const t=u.exec(e);if(t)return Math.round(Number(t[1])*(s[t[2]]||1))}function d(e){const t=e.split(" ");return{height:c(t[3]),width:c(t[2])}}t.SVG={validate:e=>i.test((0,r.toUTF8String)(e,0,1e3)),calculate(e){const t=(0,r.toUTF8String)(e).match(o.root);if(t){const e=function(e){const t=e.match(o.width),n=e.match(o.height),r=e.match(o.viewbox);return{height:n&&c(n[2]),viewbox:r&&d(r[2]),width:t&&c(t[2])}}(t[0]);if(e.width&&e.height)return function(e){return{height:e.height,width:e.width}}(e);if(e.viewbox)return function(e,t){const n=t.width/t.height;return e.width?{height:Math.floor(e.width/n),width:e.width}:e.height?{height:e.height,width:Math.floor(e.height*n)}:{height:t.height,width:t.width}}(e,e.viewbox)}throw new TypeError("Invalid SVG")}}},8692:(e,t,n)=>
1{Object.defineProperty(t,"__esModule",{value:!0}),t.TGA=void 0;const r=n(5762);t.TGA={validate:e=>0===(0,r.readUInt16LE)(e,0)&&0===(0,r.readUInt16LE)(e,4),calculate:e=>({height:(0,r.readUInt16LE)(e,14),width:(0,r.readUInt16LE)(e,12)})}},2741:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TIFF=void 0;const r=n(5762);function i(e,t){const n=(0,r.readUInt)(e,16,8,t);return((0,r.readUInt)(e,16,10,t)<<16)+n}function o(e){if(e.length>24)return e.slice(12)}const a=["49492a00","4d4d002a"];t.TIFF={validate:e=>a.includes((0,r.toHexString)(e,0,4)),calculate(e){const t="BE"===function(e){const t=(0,r.toUTF8String)(e,0,2);return"II"===t?"LE":"MM"===t?"BE":void 0}(e),n=function(e,t){const n=(0,r.readUInt)(e,32,4,t);return e.slice(n+2)}(e,t),a=function(e,t){const n={};let a=e;for(;a&&a.length;){const e=(0,r.readUInt)(a,16,0,t),s=(0,r.readUInt)(a,16,2,t),u=(0,r.readUInt)(a,32,4,t);if(0===e)break;1!==u||3!==s&&4!==s||(n[e]=i(a,t)),a=o(a)}return n}(n,t),s=a[256],u=a[257];if(!s||!u)throw new TypeError("Invalid Tiff. Missing tags");return{height:u,width:s}}}},5762:(e,t)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.findBox=t.readUInt=t.readUInt32LE=t.readUInt32BE=t.readInt32LE=t.readUInt24LE=t.readUInt16LE=t.readUInt16BE=t.readInt16LE=t.toHexString=t.toUTF8String=void 0;const n=new TextDecoder;t.toUTF8String=(e,t=0,r=e.length)=>n.decode(e.slice(t,r));t.toHexString=(e,t=0,n=e.length)=>e.slice(t,n).reduce(((e,t)=>e+("0"+t.toString(16)).slice(-2)),"");t.readInt16LE=(e,t=0)=>{const n=e[t]+256*e[t+1];return n|131070*(32768&n)};t.readUInt16BE=(e,t=0)=>256*e[t]+e[t+1];t.readUInt16LE=(e,t=0)=>e[t]+256*e[t+1];t.readUInt24LE=(e,t=0)=>e[t]+256*e[t+1]+65536*e[t+2];t.readInt32LE=(e,t=0)=>e[t]+256*e[t+1]+65536*e[t+2]+(e[t+3]<<24);t.readUInt32BE=(e,t=0)=>e[t]*2**24+65536*e[t+1]+256*e[t+2]+e[t+3];t.readUInt32LE=(e,t=0)=>e[t]+256*e[t+1]+65536*e[t+2]+e[t+3]*2**24;const r={readUInt16BE:t.readUInt16BE,readUInt16LE:t.readUInt16LE,readUInt32BE:t.readUInt32BE,readUInt32LE:t.readUInt32LE};function i(e,n){if(e.length-n<4)return;const r=(0,t.readUInt32BE)(e,n);return e.length-n<r?void 0:{name:(0,t.toUTF8String)(e,4+n,8+n),offset:n,size:r}}t.readUInt=function(e,t,n,i){return n=n||0,r["readUInt"+t+(i?"BE":"LE")](e,n)},t.findBox=function(e,t,n){for(;n<e.length;){const r=i(e,n);if(!r)break;if(r.name===t)return r;n+=r.size}}},6618:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WEBP=void 0;const r=n(5762);t.WEBP={validate(e){const t="RIFF"===(0,r.toUTF8String)(e,0,4),n="WEBP"===(0,r.toUTF8String)(e,8,12),i="VP8"===(0,r.toUTF8String)(e,12,15);return t&&n&&i},calculate(e){const t=(0,r.toUTF8String)(e,12,16);if(e=e.slice(20,30),"VP8X"===t){const t=e[0];if(0==(192&t)&&0==(1&t))return function(e){return{height:1+(0,r.readUInt24LE)(e,7),width:1+(0,r.readUInt24LE)(e,4)}}(e);throw new TypeError("Invalid WebP")}if("VP8 "===t&&47!==e[0])return function(e){return{height:16383&(0,r.readInt16LE)(e,8),width:16383&(0,r.readInt16LE)(e,6)}}(e);const n=(0,r.toHexString)(e,3,6);if("VP8L"===t&&"9d012a"!==n)return function(e){return{height:1+((15&e[4])<<10|e[3]<<2|(192&e[2])>>6),width:1+((63&e[2])<<8|e[1])}}(e);throw new TypeError("Invalid WebP")}}},6019:(e,t,n)=>{n.d(t,{Y:()=>S});function r(e,t,n,r){return new(n||(n=Promise))((function(i,o){function a(e){try{u(r.next(e))}catch(t){o(t)}}function s(e){try{u(r.throw(e))}catch(t){o(t)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))}Object.create;Object.create;const i={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let o;const a=new Uint8Array(16);function s(){if(!o&&(o="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!o))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return o(a)}const u=[];for(let C=0;C<256;++C)u.push((C+256).toString(16).slice(1));function c(e,t=0){return(u[e[t+0]]+u[e[t+1]]+u[e[t+2]]+u[e[t+3]]+"-"+u[e[t+4]]+u[e[t+5]]+"-"+u[e[t+6]]+u[e[t+7]]+"-"+u[e[t+8]]+u[e[t+9]]+"-"+u[e[t+10]]+u[e[t+11]]+u[e[t+12]]+u[e[t+13]]+u[e[t+14]]+u[e[t+15]]).toLowerCase()}const d=function(e,t,n){if(i.randomUUID&&!t&&!e)return i.randomUUID();const r=(e=e||{}).random||(e.rng||s)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(let e=0;e<16;++e)t[n+e]=r[e];return t}return c(r)};var f=n(7294),l=n(1053);const p="undefined"==typeof window,g=!p;let m=!1;try{m=void 0!==process.env.JEST_WORKER_ID}catch(P){}g&&!m&&n.e(6969).then(n.bind(n,6969));let h=null;function S({children:e,"data-debug":t=!1}){E(t,"Rendering...");const n=e||[],[i]=f.useState((()=>d())),o=f.useRef(null),[a,s]=f.useState(new Map);!function(e,t,n){E(n,"Initializing image regions map..."),f.Children.forEac
1h(t,(t=>{E(n,"Initializing image regions map for child:",t);const r=v(t);if(r)if(e.get(r.src))E(n,"Found image regions in state for",r.src);else{let t="";p&&(r.pathOnServer?"none"!==r.pathOnServer&&(E(n,"Reading image regions on disk for",r.src),t=function(e,t){if(!h)return U("fs module not available, can't read image regions from disk."),"";let n="";try{E(t,"Reading image regions from",e),n=y(h.readFileSync(e)),E(t,"Found image regions:",n)}catch(e){U("Error while reading image regions from disk:",e)}return n}(r.pathOnServer,n)):U("Missing data-path-on-server attribute for",r.src,", can't read image regions from disk. You probably want to read https://docs.frameright.io/react/ssr")),e.set(r.src,t)}}))}(a,n,t);let u=0;const c=f.Children.map(n,(e=>{const n=v(e);if(!n)return e;++u;const r={is:"image-display-control",class:`${e.props.class||""} ${e.props.className||""}`.trim(),ref:o,"data-idc-uuid":i,suppressHydrationWarning:!0,"data-src-prop":n.src};p&&(r["data-path-on-server"]=void 0);const s=a.get(n.src);s&&(r["data-image-regions"]=s);const c=f.cloneElement(e,r);return E(t,"Rendering extended child:",c),c}));return f.useEffect((()=>{!function(e,t,n,i){r(this,void 0,void 0,(function*(){E(i,"Populating image regions map if needed...");const r=new Map;for(const e of function(e){const t=e.current;if(t){const e=t.dataset.idcUuid;if(e){const n=t.parentElement;if(n)return Array.from(n.querySelectorAll('[data-idc-uuid="'+e+'"]'))}}return[]}(n)){const t=v(e);if(t){E(i,"Reading image regions from DOM for",t.src,"...");const n=e.dataset.imageRegions;n&&r.set(t.src,n)}}let o=!1;for(const[t,n]of e)if(!n){const n=r.get(t);if(n)E(i,"Populating image regions from DOM for",t),e.set(t,n);else{let n;E(i,"Image regions not found in DOM for",t,", fetching...");try{const e=yield fetch(t);n=yield e.arrayBuffer()}catch(r){U("Error fetching image:",r);continue}if(e.get(t)){E(i,"Image regions for",t,"already populated meanwhile, aborting.");continue}yield I(i);const a=y(n);a&&(E(i,"Populating image regions from metadata for",t),e.set(t,a),o=!0)}}o?(E(i,"Updating image regions map in state."),t(new Map(e))):E(i,"Image regions map in state is up-to-date."),E(i,"Image regions map in state:",e)}))}(a,s,o,t),function(e){const t=e.current;if(t){const e=t.parentElement;e&&!e.dataset.idcParent&&U("Parent element of <ImageDisplayControl> doesn't have a 'data-idc-parent' attribute. You probably want to read https://docs.frameright.io/react/attributes#parent-dom-elements-attributes")}}(o)}),[a,o,t,u]),f.createElement(f.Fragment,null,c)}function y(e){const t=new l.Parser(e).getIdcMetadata("rectangle","crop");return JSON.stringify(t)}function v(e){var t,n;if(!function(e){var t;return"props"in e?!!e.props.src:"attributes"in e&&!!(null===(t=e.attributes.getNamedItem("src"))||void 0===t?void 0:t.value)}(e))return null;let r=null;if("props"in e){if("string"==typeof e.props.src)r={src:e.props.src};else{if(!("src"in e.props.src))return U("Unknown src= attribute format: ",e.props.src),null;r={src:e.props.src.src},"pathOnServer"in e.props.src&&(r.pathOnServer=e.props.src.pathOnServer)}e.props["data-path-on-server"]&&(r.pathOnServer=e.props["data-path-on-server"])}else r={src:(null===(t=e.attributes.getNamedItem("data-src-prop"))||void 0===t?void 0:t.value)||(null===(n=e.attributes.getNamedItem("src"))||void 0===n?void 0:n.value)||e.src};return r}function I(e){return r(this,void 0,void 0,(function*(){for(const t of[100,200,500,1e3,1e3]){if(h||g)return void E(e,"All imports have resolved.");E(e,"Waiting for imports to resolve..."),yield new Promise((e=>setTimeout(e,t)))}U("Some imports are still missing, image regions will not be available.")}))}g||(require?h=require("fs"):n.e(7417).then(n.t.bind(n,7757,19)).then((e=>{h=e})));const b="[idc]";function U(...e){console.warn(b,"[warn]",...e)}function E(e,...t){e&&console.log(b,"[debug]",...t)}}}]);

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.