Files
jaidaken f09734b0ee
Some checks failed
Python Linting / Run Ruff (push) Has been cancelled
Python Linting / Run Pylint (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.10, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.11, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-stable (12.1, , linux, 3.12, [self-hosted Linux], stable) (push) Has been cancelled
Full Comfy CI Workflow Runs / test-unix-nightly (12.1, , linux, 3.11, [self-hosted Linux], nightly) (push) Has been cancelled
Execution Tests / test (macos-latest) (push) Has been cancelled
Execution Tests / test (ubuntu-latest) (push) Has been cancelled
Execution Tests / test (windows-latest) (push) Has been cancelled
Test server launches without errors / test (push) Has been cancelled
Unit Tests / test (macos-latest) (push) Has been cancelled
Unit Tests / test (ubuntu-latest) (push) Has been cancelled
Unit Tests / test (windows-2022) (push) Has been cancelled
Add custom nodes, Civitai loras (LFS), and vast.ai setup script
Includes 30 custom nodes committed directly, 7 Civitai-exclusive
loras stored via Git LFS, and a setup script that installs all
dependencies and downloads HuggingFace-hosted models on vast.ai.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-09 00:56:42 +00:00

3 lines
34 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
// Transpiled from https://github.com/mattiasw/ExifReader v4.26.2
export let ExifReader;!function(){"use strict";var e={d:function(n,t){for(var r in t)e.o(t,r)&&!e.o(n,r)&&Object.defineProperty(n,r,{enumerable:1,get:t[r]})},o:function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},r:function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:1})}},n={};function t(e,n,t){for(var r=[],i=0;i<t&&n+i<e.byteLength;i++)r.push(e.getUint8(n+i));return r.map((function(e){return String.fromCharCode(e)})).join("")}function r(){for(var e=1;e<arguments.length;e++)for(var n in arguments[e])arguments[0][n]=arguments[e][n];return arguments[0]}function i(e){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i(e)}function o(e){var n=function(e){if("object"!=i(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=i(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==i(n)?n:n+""}e.r(n),e.d(n,{default:function(){return ye},errors:function(){return ve},load:function(){return be},loadView:function(){return we}});var a=function(){return e=function e(n){if(function(e,n){if(!(e instanceof n))throw new TypeError("Cannot call a class as a function")}(this,e),function(e){return"object"!==i(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}(n))throw Error("DataView: Passed buffer type is unsupported.");this.buffer=n,this.byteLength=this.buffer.length},(n=[{key:"getUint8",value:function(e){return this.buffer.readUInt8(e)}},{key:"getUint16",value:function(e,n){return n?this.buffer.readUInt16LE(e):this.buffer.readUInt16BE(e)}},{key:"getUint32",value:function(e,n){return n?this.buffer.readUInt32LE(e):this.buffer.readUInt32BE(e)}},{key:"getInt32",value:function(e,n){return n?this.buffer.readInt32LE(e):this.buffer.readInt32BE(e)}}])&&function(e,n){for(var t=0;t<n.length;t++){var r=n[t];r.enumerable=r.enumerable||0,r.configurable=1,"value"in r&&(r.writable=1),Object.defineProperty(e,o(r.key),r)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:0}),e;var e,n}();function u(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}function c(e){if(e.length>=8){var n=u(e.slice(0,8));if("ASCII\0\0\0"===n)return u(e.slice(8));if("JIS\0\0\0\0\0"===n)return"[JIS encoded text]";if("UNICODE\0"===n)return"[Unicode encoded text]";if("\0\0\0\0\0\0\0\0"===n)return"[Undefined encoding]"}return"Undefined"}function f(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}var s=2,d=65496,l=2,m=4,p=2,g=10,h=65472,S=65474,y=65476,v=65499,b=65501,P=65498,w=65504,C=65505,A=65519,I=65534,U=65535,T="Exif";function R(e,n){var r=T.length;return e.getUint16(n)===C&&t(e,n+m,r)===T&&0===e.getUint8(n+m+r)}function k(e,n){var t=e.getUint16(n);return t>=w&&t<=A||t===I||t===h||t===S||t===y||t===v||t===b||t===P}function M(e,n){return e.getUint16(n)===U}var x={parseAppMarkers:function(e,n){if(function(e){return!!e&&e.byteLength>=s&&e.getUint16(0)===d}(e))return D(function(e){for(var n,t,r=l;r+m+5<=e.byteLength;){if(R(e,r))n=e.getUint16(r+p),t=r+g;else{if(!k(e,r)){if(M(e,r)){r++;continue}break}n=e.getUint16(r+p)}r+=p+n}return{hasAppMarkers:r>l,fileDataOffset:void 0,jfifDataOffset:void 0,tiffHeaderOffset:t,iptcDataOffset:void 0,xmpChunks:void 0,iccChunks:void 0,mpfDataOffset:void 0}}(e),"jpeg","JPEG");if(function(e){return!!e&&"RIFF"===t(e,0,4)&&"WEBP"===t(e,8,4)}(e))return D(function(e){for(var n,r,i=12,o=0;i+8<e.byteLength;){var a=t(e,i,4),u=e.getUint32(i+4,1);"EXIF"===a?(o=1,n="Exif\0\0"===t(e,i+8,6)?i+8+6:i+8):"VP8X"===a&&(o=1,r=i+8),i+=8+(u%2==0?u:u+1)}return{hasAppMarkers:o,tiffHeaderOffset:n,xmpChunks:void 0,iccChunks:void 0,vp8xChunkOffset:r}}(e),"webp","WebP");throw Error("Invalid image format")}};function D(e,n,t){return r({},e,{fileType:{value:n,description:t}})}var F=18761,O=F,L={ApertureValue:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)},ColorSpace:function(e){return 1===e?"sRGB":65535===e?"Uncalibrated":"Unknown"},ComponentsConfiguration:function(e){return e.map((function(e){return 49===e?"Y":50===e?"Cb":51===e?"Cr":52===e?"R":53===e?"G":54===e?"B":void 0})).join("")},Contrast:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"},CustomRendered:function(e){return 0===e?"Normal process":1===e?"Custom process":"Unknown"},ExposureMode:function(e){return 0===e?"Auto exposure":1===e?"Manual exposure":2===e?"Auto bracket":"Unknown"},ExposureProgram:function(e){return 0===e?"Undefined":1===e?"Manual":2===e?"Normal program":3===e?"Aperture priority":4===e?"Shutter priority":5===e?"Creative program":6===e?"Action program":7===e?"Portrait mode":8===e?"Landscape mode":9===e?"Bulb":"Unknown"},ExposureTime:function(e){if(e[0]/e[1]>.25){var n=e[0]/e[1];return Number.isInteger(n)?""+n:n.toFixed(1)}return 0!==e[0]?"1/".concat(Math.round(e[1]/e[0])):"0/".concat(e[1])},FNumber:function(e){return"f/".concat(e[0]/e[1])},FocalLength:function(e){return e[0]/e[1]+" mm"},FocalPlaneResolutionUnit:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"},LightSource:function(e){return 1===e?"Daylight":2===e?"Fluorescent":3===e?"Tungsten (incandescent light)":4===e?"Flash":9===e?"Fine weather":10===e?"Cloudy weather":11===e?"Shade":12===e?"Daylight fluorescent (D 5700 7100K)":13===e?"Day white fluorescent (N 4600 5400K)":14===e?"Cool white fluorescent (W 3900 4500K)":15===e?"White fluorescent (WW 3200 3700K)":17===e?"Standard light A":18===e?"Standard light B":19===e?"Standard light C":20===e?"D55":21===e?"D65":22===e?"D75":23===e?"D50":24===e?"ISO studio tungsten":255===e?"Other light source":"Unknown"},MeteringMode:function(e){return 1===e?"Average":2===e?"CenterWeightedAverage":3===e?"Spot":4===e?"MultiSpot":5===e?"Pattern":6===e?"Partial":255===e?"Other":"Unknown"},ResolutionUnit:function(e){return 2===e?"inches":3===e?"centimeters":"Unknown"},Saturation:function(e){return 0===e?"Normal":1===e?"Low saturation":2===e?"High saturation":"Unknown"},SceneCaptureType:function(e){return 0===e?"Standard":1===e?"Landscape":2===e?"Portrait":3===e?"Night scene":"Unknown"},Sharpness:function(e){return 0===e?"Normal":1===e?"Soft":2===e?"Hard":"Unknown"},ShutterSpeedValue:function(e){var n=Math.pow(2,e[0]/e[1]);return n<=1?"".concat(Math.round(1/n)):"1/".concat(Math.round(n))},WhiteBalance:function(e){return 0===e?"Auto white balance":1===e?"Manual white balance":"Unknown"},XResolution:function(e){return""+Math.round(e[0]/e[1])},YResolution:function(e){return""+Math.round(e[0]/e[1])}},E={11:"ProcessingSoftware",254:{name:"SubfileType",description:function(e){return{0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image",3:"Single page of multi-page reduced-resolution image",4:"Transparency mask",5:"Transparency mask of reduced-resolution image",6:"Transparency mask of multi-page image",7:"Transparency mask of reduced-resolution multi-page image",65537:"Alternate reduced-resolution image",4294967295:"Invalid"}[e]||"Unknown"}},255:{name:"OldSubfileType",description:function(e){return{0:"Full-resolution image",1:"Reduced-resolution image",2:"Single page of multi-page image"}[e]||"Unknown"}},256:"ImageWidth",257:"ImageLength",258:"BitsPerSample",259:"Compression",262:"PhotometricInterpretation",263:{name:"Thresholding",description:function(e){return{1:"No dithering or halftoning",2:"Ordered dither or halfton",3:"Randomized dither"}[e]||"Unknown"}},264:"CellWidth",265:"CellLength",266:{name:"FillOrder",description:function(e){return{1:"Normal",2:"Reversed"}[e]||"Unknown"}},269:"DocumentName",270:"ImageDescription",271:"Make",272:"Model",273:"StripOffsets",274:{name:"Orientation",description:function(e){return 1===e?"top-left":2===e?"top-right":3===e?"bottom-right":4===e?"bottom-left":5===e?"left-top":6===e?"right-top":7===e?"right-bottom":8===e?"left-bottom":"Undefined"}},277:"SamplesPerPixel",278:"RowsPerStrip",279:"StripByteCounts",280:"MinSampleValue",281:"MaxSampleValue",282:{name:"XResolution",description:L.XResolution},283:{name:"YResolution",description:L.YResolution},284:"PlanarConfiguration",285:"PageName",286:{name:"XPosition",description:function(e){return""+Math.round(e[0]/e[1])}},287:{name:"YPosition",description:function(e){return""+Math.round(e[0]/e[1])}},290:{name:"GrayResponseUnit",description:function(e){return{1:"0.1",2:"0.001",3:"0.0001",4:"1e-05",5:"1e-06"}[e]||"Unknown"}},296:{name:"ResolutionUnit",description:L.ResolutionUnit},297:"PageNumber",301:"TransferFunction",305:"Software",306:"DateTime",315:"Artist",316:"HostComputer",317:"Predictor",318:{name:"WhitePoint",description:function(e){return e.map((function(e){return"".concat(e[0],"/").concat(e[1])})).join(", ")}},319:{name:"PrimaryChromaticities",description:function(e){return e.map((function(e){return"".concat(e[0],"/").concat(e[1])})).join(", ")}},321:"HalftoneHints",322:"TileWidth",323:"TileLength",330:"A100DataOffset",332:{name:"InkSet",description:function(e){return{1:"CMYK",2:"Not CMYK"}[e]||"Unknown"}},337:"TargetPrinter",338:{name:"ExtraSamples",description:function(e){return{0:"Unspecified",1:"Associated Alpha",2:"Unassociated Alpha"}[e]||"Unknown"}},339:{name:"SampleFormat",description:function(e){var n={1:"Unsigned",2:"Signed",3:"Float",4:"Undefined",5:"Complex int",6:"Complex float"};return Array.isArray(e)?e.map((function(e){return n[e]||"Unknown"})).join(", "):"Unknown"}},513:"JPEGInterchangeFormat",514:"JPEGInterchangeFormatLength",529:{name:"YCbCrCoefficients",description:function(e){return e.map((function(e){return""+e[0]/e[1]})).join("/")}},530:"YCbCrSubSampling",531:{name:"YCbCrPositioning",description:function(e){return 1===e?"centered":2===e?"co-sited":"undefined "+e}},532:{name:"ReferenceBlackWhite",description:function(e){return e.map((function(e){return""+e[0]/e[1]})).join(", ")}},700:"ApplicationNotes",18246:"Rating",18249:"RatingPercent",33432:{name:"Copyright",description:function(e){return e.join("; ")}},33550:"PixelScale",33723:"IPTC-NAA",33920:"IntergraphMatrix",33922:"ModelTiePoint",34118:"SEMInfo",34264:"ModelTransform",34377:"PhotoshopSettings",34665:"Exif IFD Pointer",34675:"ICC_Profile",34735:"GeoTiffDirectory",34736:"GeoTiffDoubleParams",34737:"GeoTiffAsciiParams",34853:"GPS Info IFD Pointer",40091:{name:"XPTitle",description:G},40092:{name:"XPComment",description:G},40093:{name:"XPAuthor",description:G},40094:{name:"XPKeywords",description:G},40095:{name:"XPSubject",description:G},42112:"GDALMetadata",42113:"GDALNoData",50341:"PrintIM",50707:"DNGBackwardVersion",50708:"UniqueCameraModel",50709:"LocalizedCameraModel",50721:"ColorMatrix1",50722:"ColorMatrix2",50723:"CameraCalibration1",50724:"CameraCalibration2",50725:"ReductionMatrix1",50726:"ReductionMatrix2",50727:"AnalogBalance",50728:"AsShotNeutral",50729:"AsShotWhiteXY",50730:"BaselineExposure",50731:"BaselineNoise",50732:"BaselineSharpness",50734:"LinearResponseLimit",50735:"CameraSerialNumber",50736:"DNGLensInfo",50739:"ShadowScale",50741:{name:"MakerNoteSafety",description:function(e){return{0:"Unsafe",1:"Safe"}[e]||"Unknown"}},50778:{name:"CalibrationIlluminant1",description:L.LightSource},50779:{name:"CalibrationIlluminant2",description:L.LightSource},50781:"RawDataUniqueID",50827:"OriginalRawFileName",50828:"OriginalRawFileData",50831:"AsShotICCProfile",50832:"AsShotPreProfileMatrix",50833:"CurrentICCProfile",50834:"CurrentPreProfileMatrix",50879:"ColorimetricReference",50885:"SRawType",50898:"PanasonicTitle",50899:"PanasonicTitle2",50931:"CameraCalibrationSig",50932:"ProfileCalibrationSig",50933:"ProfileIFD",50934:"AsShotProfileName",50936:"ProfileName",50937:"ProfileHueSatMapDims",50938:"ProfileHueSatMapData1",50939:"ProfileHueSatMapData2",50940:"ProfileToneCurve",50941:{name:"ProfileEmbedPolicy",description:function(e){return{0:"Allow Copying",1:"Embed if Used",2:"Never Embed",3:"No Restrictions"}[e]||"Unknown"}},50942:"ProfileCopyright",50964:"ForwardMatrix1",50965:"ForwardMatrix2",50966:"PreviewApplicationName",50967:"PreviewApplicationVersion",50968:"PreviewSettingsName",50969:"PreviewSettingsDigest",50970:{name:"PreviewColorSpace",description:function(e){return{1:"Gray Gamma 2.2",2:"sRGB",3:"Adobe RGB",4:"ProPhoto RGB"}[e]||"Unknown"}},50971:"PreviewDateTime",50972:"RawImageDigest",50973:"OriginalRawFileDigest",50981:"ProfileLookTableDims",50982:"ProfileLookTableData",51043:"TimeCodes",51044:"FrameRate",51058:"TStop",51081:"ReelName",51089:"OriginalDefaultFinalSize",51090:"OriginalBestQualitySize",51091:"OriginalDefaultCropSize",51105:"CameraLabel",51107:{name:"ProfileHueSatMapEncoding",description:function(e){return{0:"Linear",1:"sRGB"}[e]||"Unknown"}},51108:{name:"ProfileLookTableEncoding",description:function(e){return{0:"Linear",1:"sRGB"}[e]||"Unknown"}},51109:"BaselineExposureOffset",51110:{name:"DefaultBlackRender",description:function(e){return{0:"Auto",1:"None"}[e]||"Unknown"}},51111:"NewRawImageDigest",51112:"RawToPreviewGain"};function G(e){return new TextDecoder("utf-16").decode(new Uint8Array(e)).replace(/\u0000+$/,"")}function N(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}function B(e,n){(null==n||n>e.length)&&(n=e.length);for(var t=0,r=Array(n);t<n;t++)r[t]=e[t];return r}var j={0:{name:"GPSVersionID",description:function(e){return 2===e[0]&&2===e[1]&&0===e[2]&&0===e[3]?"Version 2.2":"Unknown"}},1:{name:"GPSLatitudeRef",description:function(e){var n=e.join("");return"N"===n?"North latitude":"S"===n?"South latitude":"Unknown"}},2:{name:"GPSLatitude",description:f},3:{name:"GPSLongitudeRef",description:function(e){var n=e.join("");return"E"===n?"East longitude":"W"===n?"West longitude":"Unknown"}},4:{name:"GPSLongitude",description:f},5:{name:"GPSAltitudeRef",description:function(e){return 0===e?"Sea level":1===e?"Sea level reference (negative value)":"Unknown"}},6:{name:"GPSAltitude",description:function(e){return e[0]/e[1]+" m"}},7:{name:"GPSTimeStamp",description:function(e){return e.map((function(e){var n,t=function(e){if(Array.isArray(e))return e}(n=e)||function(e){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,r,i,o,a=[],u=1,c=0;try{for(i=(n=n.call(e)).next,!2;!(u=(t=i.call(n)).done)&&(a.push(t.value),2!==a.length);u=1);}catch(e){c=1,r=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(n)||function(e){if(e){if("string"==typeof e)return B(e,2);var n={}.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)?B(e,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0]/t[1];return/^\d(\.|$)/.test("".concat(r))?"0".concat(r):r})).join(":")}},8:"GPSSatellites",9:{name:"GPSStatus",description:function(e){var n=e.join("");return"A"===n?"Measurement in progress":"V"===n?"Measurement Interoperability":"Unknown"}},10:{name:"GPSMeasureMode",description:function(e){var n=e.join("");return"2"===n?"2-dimensional measurement":"3"===n?"3-dimensional measurement":"Unknown"}},11:"GPSDOP",12:{name:"GPSSpeedRef",description:function(e){var n=e.join("");return"K"===n?"Kilometers per hour":"M"===n?"Miles per hour":"N"===n?"Knots":"Unknown"}},13:"GPSSpeed",14:{name:"GPSTrackRef",description:function(e){var n=e.join("");return"T"===n?"True direction":"M"===n?"Magnetic direction":"Unknown"}},15:"GPSTrack",16:{name:"GPSImgDirectionRef",description:function(e){var n=e.join("");return"T"===n?"True direction":"M"===n?"Magnetic direction":"Unknown"}},17:"GPSImgDirection",18:"GPSMapDatum",19:{name:"GPSDestLatitudeRef",description:function(e){var n=e.join("");return"N"===n?"North latitude":"S"===n?"South latitude":"Unknown"}},20:{name:"GPSDestLatitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},21:{name:"GPSDestLongitudeRef",description:function(e){var n=e.join("");return"E"===n?"East longitude":"W"===n?"West longitude":"Unknown"}},22:{name:"GPSDestLongitude",description:function(e){return e[0][0]/e[0][1]+e[1][0]/e[1][1]/60+e[2][0]/e[2][1]/3600}},23:{name:"GPSDestBearingRef",description:function(e){var n=e.join("");return"T"===n?"True direction":"M"===n?"Magnetic direction":"Unknown"}},24:"GPSDestBearing",25:{name:"GPSDestDistanceRef",description:function(e){var n=e.join("");return"K"===n?"Kilometers":"M"===n?"Miles":"N"===n?"Knots":"Unknown"}},26:"GPSDestDistance",27:{name:"GPSProcessingMethod",description:c},28:{name:"GPSAreaInformation",description:c},29:"GPSDateStamp",30:{name:"GPSDifferential",description:function(e){return 0===e?"Measurement without differential correction":1===e?"Differential correction applied":"Unknown"}},31:"GPSHPositioningError"},z={1:"InteroperabilityIndex",2:{name:"InteroperabilityVersion",description:function(e){return u(e)}},4096:"RelatedImageFileFormat",4097:"RelatedImageWidth",4098:"RelatedImageHeight"};function H(e){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},H(e)}function V(e,n,t){return(n=function(e){var n=function(e){if("object"!=H(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var t=n.call(e,"string");if("object"!=H(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return e+""}(e);return"symbol"==H(n)?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:1,configurable:1,writable:1}):e[n]=t,e}var W=r({},E,{33434:{name:"ExposureTime",description:L.ExposureTime},33437:{name:"FNumber",description:L.FNumber},34850:{name:"ExposureProgram",description:L.ExposureProgram},34852:"SpectralSensitivity",34855:"ISOSpeedRatings",34856:{name:"OECF",description:function(){return"[Raw OECF table data]"}},34858:"TimeZoneOffset",34859:"SelfTimerMode",34864:{name:"SensitivityType",description:function(e){return{1:"Standard Output Sensitivity",2:"Recommended Exposure Index",3:"ISO Speed",4:"Standard Output Sensitivity and Recommended Exposure Index",5:"Standard Output Sensitivity and ISO Speed",6:"Recommended Exposure Index and ISO Speed",7:"Standard Output Sensitivity, Recommended Exposure Index and ISO Speed"}[e]||"Unknown"}},34865:"StandardOutputSensitivity",34866:"RecommendedExposureIndex",34867:"ISOSpeed",34868:"ISOSpeedLatitudeyyy",34869:"ISOSpeedLatitudezzz",36864:{name:"ExifVersion",description:function(e){return u(e)}},36867:"DateTimeOriginal",36868:"DateTimeDigitized",36873:"GooglePlusUploadCode",36880:"OffsetTime",36881:"OffsetTimeOriginal",36882:"OffsetTimeDigitized",37121:{name:"ComponentsConfiguration",description:L.ComponentsConfiguration},37122:"CompressedBitsPerPixel",37377:{name:"ShutterSpeedValue",description:L.ShutterSpeedValue},37378:{name:"ApertureValue",description:L.ApertureValue},37379:"BrightnessValue",37380:"ExposureBiasValue",37381:{name:"MaxApertureValue",description:function(e){return Math.pow(Math.sqrt(2),e[0]/e[1]).toFixed(2)}},37382:{name:"SubjectDistance",description:function(e){return e[0]/e[1]+" m"}},37383:{name:"MeteringMode",description:L.MeteringMode},37384:{name:"LightSource",description:L.LightSource},37385:{name:"Flash",description:function(e){return 0===e?"Flash did not fire":1===e?"Flash fired":5===e?"Strobe return light not detected":7===e?"Strobe return light detected":9===e?"Flash fired, compulsory flash mode":13===e?"Flash fired, compulsory flash mode, return light not detected":15===e?"Flash fired, compulsory flash mode, return light detected":16===e?"Flash did not fire, compulsory flash mode":24===e?"Flash did not fire, auto mode":25===e?"Flash fired, auto mode":29===e?"Flash fired, auto mode, return light not detected":31===e?"Flash fired, auto mode, return light detected":32===e?"No flash function":65===e?"Flash fired, red-eye reduction mode":69===e?"Flash fired, red-eye reduction mode, return light not detected":71===e?"Flash fired, red-eye reduction mode, return light detected":73===e?"Flash fired, compulsory flash mode, red-eye reduction mode":77===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected":79===e?"Flash fired, compulsory flash mode, red-eye reduction mode, return light detected":89===e?"Flash fired, auto mode, red-eye reduction mode":93===e?"Flash fired, auto mode, return light not detected, red-eye reduction mode":95===e?"Flash fired, auto mode, return light detected, red-eye reduction mode":"Unknown"}},37386:{name:"FocalLength",description:L.FocalLength},37393:"ImageNumber",37394:{name:"SecurityClassification",description:function(e){return{C:"Confidential",R:"Restricted",S:"Secret",T:"Top Secret",U:"Unclassified"}[e]||"Unknown"}},37395:"ImageHistory",37396:{name:"SubjectArea",description:function(e){return 2===e.length?"Location; X: ".concat(e[0],", Y: ").concat(e[1]):3===e.length?"Circle; X: ".concat(e[0],", Y: ").concat(e[1],", diameter: ").concat(e[2]):4===e.length?"Rectangle; X: ".concat(e[0],", Y: ").concat(e[1],", width: ").concat(e[2],", height: ").concat(e[3]):"Unknown"}},37500:{name:"MakerNote",description:function(){return"[Raw maker note data]"}},37510:{name:"UserComment",description:c},37520:"SubSecTime",37521:"SubSecTimeOriginal",37522:"SubSecTimeDigitized",37724:"ImageSourceData",37888:{name:"AmbientTemperature",description:function(e){return e[0]/e[1]+" °C"}},37889:{name:"Humidity",description:function(e){return e[0]/e[1]+" %"}},37890:{name:"Pressure",description:function(e){return e[0]/e[1]+" hPa"}},37891:{name:"WaterDepth",description:function(e){return e[0]/e[1]+" m"}},37892:{name:"Acceleration",description:function(e){return e[0]/e[1]+" mGal"}},37893:{name:"CameraElevationAngle",description:function(e){return e[0]/e[1]+" °"}},40960:{name:"FlashpixVersion",description:function(e){return e.map((function(e){return String.fromCharCode(e)})).join("")}},40961:{name:"ColorSpace",description:L.ColorSpace},40962:"PixelXDimension",40963:"PixelYDimension",40964:"RelatedSoundFile",40965:"Interoperability IFD Pointer",41483:"FlashEnergy",41484:{name:"SpatialFrequencyResponse",description:function(){return"[Raw SFR table data]"}},41486:"FocalPlaneXResolution",41487:"FocalPlaneYResolution",41488:{name:"FocalPlaneResolutionUnit",description:L.FocalPlaneResolutionUnit},41492:{name:"SubjectLocation",description:function(e){var n,t=function(e){if(Array.isArray(e))return e}(n=e)||function(e){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var t,r,i,o,a=[],u=1,c=0;try{for(i=(n=n.call(e)).next,!2;!(u=(t=i.call(n)).done)&&(a.push(t.value),2!==a.length);u=1);}catch(e){c=1,r=e}finally{try{if(!u&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw r}}return a}}(n)||function(e){if(e){if("string"==typeof e)return N(e,2);var n={}.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)?N(e,2):void 0}}(n)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),r=t[0],i=t[1];return"X: ".concat(r,", Y: ").concat(i)}},41493:"ExposureIndex",41495:{name:"SensingMethod",description:function(e){return 1===e?"Undefined":2===e?"One-chip color area sensor":3===e?"Two-chip color area sensor":4===e?"Three-chip color area sensor":5===e?"Color sequential area sensor":7===e?"Trilinear sensor":8===e?"Color sequential linear sensor":"Unknown"}},41728:{name:"FileSource",description:function(e){return 3===e?"DSC":"Unknown"}},41729:{name:"SceneType",description:function(e){return 1===e?"A directly photographed image":"Unknown"}},41730:{name:"CFAPattern",description:function(){return"[Raw CFA pattern table data]"}},41985:{name:"CustomRendered",description:L.CustomRendered},41986:{name:"ExposureMode",description:L.ExposureMode},41987:{name:"WhiteBalance",description:L.WhiteBalance},41988:{name:"DigitalZoomRatio",description:function(e){return 0===e[0]?"Digital zoom was not used":""+e[0]/e[1]}},41989:{name:"FocalLengthIn35mmFilm",description:function(e){return 0===e?"Unknown":e}},41990:{name:"SceneCaptureType",description:L.SceneCaptureType},41991:{name:"GainControl",description:function(e){return 0===e?"None":1===e?"Low gain up":2===e?"High gain up":3===e?"Low gain down":4===e?"High gain down":"Unknown"}},41992:{name:"Contrast",description:L.Contrast},41993:{name:"Saturation",description:L.Saturation},41994:{name:"Sharpness",description:L.Sharpness},41995:{name:"DeviceSettingDescription",description:function(){return"[Raw device settings table data]"}},41996:{name:"SubjectDistanceRange",description:function(e){return 1===e?"Macro":2===e?"Close view":3===e?"Distant view":"Unknown"}},42016:"ImageUniqueID",42032:"CameraOwnerName",42033:"BodySerialNumber",42034:{name:"LensSpecification",description:function(e){var n=parseFloat((e[0][0]/e[0][1]).toFixed(5)),t=parseFloat((e[1][0]/e[1][1]).toFixed(5)),r="".concat(n,"-").concat(t," mm");if(0===e[3][1])return"".concat(r," f/?");var i=1/(e[2][1]/e[2][1]/(e[3][0]/e[3][1]));return"".concat(r," f/").concat(parseFloat(i.toFixed(5)))}},42035:"LensMake",42036:"LensModel",42037:"LensSerialNumber",42080:{name:"CompositeImage",description:function(e){return{1:"Not a Composite Image",2:"General Composite Image",3:"Composite Image Captured While Shooting"}[e]||"Unknown"}},42081:"SourceImageNumberOfCompositeImage",42082:"SourceExposureTimesOfCompositeImage",42240:"Gamma",59932:"Padding",59933:"OffsetSchema",65e3:"OwnerName",65001:"SerialNumber",65002:"Lens",65100:"RawFile",65101:"Converter",65102:"WhiteBalance",65105:"Exposure",65106:"Shadows",65107:"Brightness",65108:"Contrast",65109:"Saturation",65110:"Sharpness",65111:"Smoothness",65112:"MoireFilter"}),Y="exif",X="interoperability",K=V(V(V(V(V(V(V({},"0th",W),"1st",E),Y,W),"gps",j),X,z),"mpf",{}),"canon",{}),q={1:1,2:1,3:2,4:4,5:8,7:1,9:4,10:8,13:4},_={BYTE:1,ASCII:2,SHORT:3,LONG:4,RATIONAL:5,UNDEFINED:7,SLONG:9,SRATIONAL:10,IFD:13},J={getAsciiValue:function(e){return e.map((function(e){return String.fromCharCode(e)}))},getByteAt:$,getAsciiAt:function(e,n){return e.getUint8(n)},getShortAt:function(e,n,t){return e.getUint16(n,t===O)},getLongAt:Z,getRationalAt:function(e,n,t){return[Z(e,n,t),Z(e,n+4,t)]},getUndefinedAt:function(e,n){return $(e,n)},getSlongAt:Q,getSrationalAt:function(e,n,t){return[Q(e,n,t),Q(e,n+4,t)]},getIfdPointerAt:function(e,n,t){return Z(e,n,t)},typeSizes:q,tagTypes:_,getTypeSize:function(e){if(void 0===_[e])throw Error("No such type found.");return q[_[e]]}};function $(e,n){return e.getUint8(n)}function Z(e,n,t){return e.getUint32(n,t===O)}function Q(e,n,t){return e.getInt32(n,t===O)}var ee={1:J.getByteAt,2:J.getAsciiAt,3:J.getShortAt,4:J.getLongAt,5:J.getRationalAt,7:J.getUndefinedAt,9:J.getSlongAt,10:J.getSrationalAt,13:J.getIfdPointerAt};function ne(e,n,t,r,i,o){var a=J.getTypeSize("SHORT"),u={},c=function(e,n,t){return n+J.getTypeSize("SHORT")<=e.byteLength?J.getShortAt(e,n,t):0}(e,r,i);r+=a;for(var f=0;f<c&&!(r+12>e.byteLength);f++){var s=te(e,n,t,r,i,o);void 0!==s&&(u[s.name]={id:s.id,value:s.value,description:s.description},"MakerNote"===s.name&&(u[s.name].__offset=s.__offset)),r+=12}return u}function te(e,n,t,r,i,o){var a,u,c=J.getTypeSize("SHORT"),f=c+J.getTypeSize("SHORT"),s=f+J.getTypeSize("LONG"),d=J.getShortAt(e,r,i),l=J.getShortAt(e,r+c,i),m=J.getLongAt(e,r+f,i);if(void 0!==J.typeSizes[l]&&(o||void 0!==K[n][d])){a=function(e,n){return J.typeSizes[e]*n<=J.getTypeSize("LONG")}(l,m)?re(e,u=r+s,l,m,i):function(e,n,t,r,i){return n+t+J.typeSizes[r]*i<=e.byteLength}(e,t,u=J.getLongAt(e,r+s,i),l,m)?re(e,t+u,l,m,i,33723===d):"<faulty value>",l===J.tagTypes.ASCII&&(a=function(e){try{return e.map((function(e){return decodeURIComponent(escape(e))}))}catch(n){return e}}(a=function(e){for(var n=[],t=0,r=0;r<e.length;r++)"\0"!==e[r]?(void 0===n[t]&&(n[t]=""),n[t]+=e[r]):t++;return n}(a)));var p="undefined-".concat(d),g=a;if(void 0!==K[n][d])if(void 0!==K[n][d].name&&void 0!==K[n][d].description){p=K[n][d].name;try{g=K[n][d].description(a)}catch(e){g=ie(a)}}else l===J.tagTypes.RATIONAL||l===J.tagTypes.SRATIONAL?(p=K[n][d],g=""+a[0]/a[1]):(p=K[n][d],g=ie(a));return{id:d,name:p,value:a,description:g,__offset:u}}}function re(e,n,t,r,i){var o=[];arguments.length>5&&void 0!==arguments[5]&&arguments[5]&&(r*=J.typeSizes[t],t=J.tagTypes.BYTE);for(var a=0;a<r;a++)o.push(ee[t](e,n,i)),n+=J.typeSizes[t];return t===J.tagTypes.ASCII?o=J.getAsciiValue(o):1===o.length&&(o=o[0]),o}function ie(e){return e instanceof Array?e.join(", "):e}var oe="Exif IFD Pointer",ae="GPS Info IFD Pointer",ue="Interoperability IFD Pointer",ce={read:function(e,n,t){var r=function(e,n){if(e.getUint16(n)===F)return F;if(19789===e.getUint16(n))return 19789;throw Error("Illegal byte order value. Faulty image.")}(e,n),i=function(e,n,t,r){return ne(e,"0th",n,function(e,n,t){return n+J.getLongAt(e,n+4,t)}(e,n,t),t,r)}(e,n,r,t);return{tags:i=de(i=se(i=fe(i,e,n,r,t),e,n,r,t),e,n,r,t),byteOrder:r}}};function fe(e,n,t,i,o){return void 0!==e[oe]?r(e,ne(n,Y,t,t+e[oe].value,i,o)):e}function se(e,n,t,i,o){return void 0!==e[ae]?r(e,ne(n,"gps",t,t+e[ae].value,i,o)):e}function de(e,n,t,i,o){return void 0!==e[ue]?r(e,ne(n,X,t,t+e[ue].value,i,o)):e}var le={read:function(e,n){var t={},r=J.getByteAt(e,n);return t.Alpha=function(e){var n=16&e;return{value:n?1:0,description:n?"Yes":"No"}}(r),t.Animation=function(e){var n=2&e;return{value:n?1:0,description:n?"Yes":"No"}}(r),t.ImageWidth=ge(e,n+me),t.ImageHeight=ge(e,n+pe),t}},me=4,pe=7;function ge(e,n){var t=J.getByteAt(e,n)+256*J.getByteAt(e,n+1)+65536*J.getByteAt(e,n+2)+1;return{value:t,description:t+"px"}}function he(e){this.name="MetadataMissingError",this.message=e||"No Exif data",this.stack=Error().stack}he.prototype=Error();var Se={MetadataMissingError:he},ye={load:be,loadView:we,errors:Se},ve=Se;function be(e){var n,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return function(e){return"string"==typeof e}(e)?(t.async=1,function(e,n){return/^\w+:\/\//.test(e)?"undefined"!=typeof fetch?function(e){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length,t={method:"GET"};return Number.isInteger(n)&&n>=0&&(t.headers={range:"bytes=0-".concat(n-1)}),fetch(e,t).then((function(e){return e.arrayBuffer()}))}(e,n):function(e){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length;return new Promise((function(t,r){var i={};Number.isInteger(n)&&n>=0&&(i.headers={range:"bytes=0-".concat(n-1)});var o=function(e){return/^https:\/\//.test(e)?require("https").get:require("http").get}(e);o(e,i,(function(e){if(e.statusCode>=200&&e.statusCode<=299){var n=[];e.on("data",(function(e){return n.push(Buffer.from(e))})),e.on("error",(function(e){return r(e)})),e.on("end",(function(){return t(Buffer.concat(n))}))}else r("Could not fetch file: ".concat(e.statusCode," ").concat(e.statusMessage)),e.resume()})).on("error",(function(e){return r(e)}))}))}(e,n):function(e){return/^data:[^;,]*(;base64)?,/.test(e)}(e)?Promise.resolve(function(e){var n=e.substring(e.indexOf(",")+1);if(-1!==e.indexOf(";base64")){if("undefined"!=typeof atob)return Uint8Array.from(atob(n),(function(e){return e.charCodeAt(0)})).buffer;if("undefined"==typeof Buffer)return;return"undefined"!=typeof Buffer.from?Buffer.from(n,"base64"):new Buffer(n,"base64")}var t=decodeURIComponent(n);return"undefined"!=typeof Buffer?"undefined"!=typeof Buffer.from?Buffer.from(t):new Buffer(t):Uint8Array.from(t,(function(e){return e.charCodeAt(0)})).buffer}(e)):function(e){var n=(arguments.length>1&&void 0!==arguments[1]?arguments[1]:{}).length;return new Promise((function(t,r){var i=function(){try{return require("fs")}catch(e){return}}();i.open(e,(function(o,a){o?r(o):i.stat(e,(function(o,u){if(o)r(o);else{var c=Math.min(u.size,void 0!==n?n:u.size),f=Buffer.alloc(c),s={buffer:f,length:c};i.read(a,s,(function(n){n?r(n):i.close(a,(function(n){n&&console.warn("Could not close file ".concat(e,":"),n),t(f)}))}))}}))}))}))}(e,n)}(e,t).then((function(e){return Pe(e,t)}))):function(e){return"undefined"!=typeof File&&e instanceof File}(e)?(t.async=1,(n=e,new Promise((function(e,t){var r=new FileReader;r.onload=function(n){return e(n.target.result)},r.onerror=function(){return t(r.error)},r.readAsArrayBuffer(n)}))).then((function(e){return Pe(e,t)}))):Pe(e,t)}function Pe(e,n){return function(e){try{return Buffer.isBuffer(e)}catch(e){return 0}}(e)&&(e=new Uint8Array(e).buffer),we(function(e){try{return new DataView(e)}catch(n){return new a(e)}}(e),n)}function we(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{expanded:0,async:0,includeUnknown:0},t=n.expanded,i=void 0===t?0:t,o=n.async,a=void 0===o?0:o,u=n.includeUnknown,c=void 0===u?0:u,s=0,d={},l=x.parseAppMarkers(e,a),m=l.fileType,p=(l.fileDataOffset,l.jfifDataOffset,l.tiffHeaderOffset),g=(l.iptcDataOffset,l.xmpChunks,l.iccChunks,l.mpfDataOffset,l.pngHeaderOffset,l.pngTextChunks,l.pngChunkOffsets,l.vp8xChunkOffset);if(l.gifHeaderOffset,function(e){return void 0!==e}(p)){s=1;var h=ce.read(e,p,c),S=h.tags;h.byteOrder,S.Thumbnail&&(d.Thumbnail=S.Thumbnail,delete S.Thumbnail),i?(d.exif=S,function(e){if(e.exif){if(e.exif.GPSLatitude&&e.exif.GPSLatitudeRef)try{e.gps=e.gps||{},e.gps.Latitude=f(e.exif.GPSLatitude.value),"S"===e.exif.GPSLatitudeRef.value.join("")&&(e.gps.Latitude=-e.gps.Latitude)}catch(e){}if(e.exif.GPSLongitude&&e.exif.GPSLongitudeRef)try{e.gps=e.gps||{},e.gps.Longitude=f(e.exif.GPSLongitude.value),"W"===e.exif.GPSLongitudeRef.value.join("")&&(e.gps.Longitude=-e.gps.Longitude)}catch(e){}if(e.exif.GPSAltitude&&e.exif.GPSAltitudeRef)try{e.gps=e.gps||{},e.gps.Altitude=e.exif.GPSAltitude.value[0]/e.exif.GPSAltitude.value[1],1===e.exif.GPSAltitudeRef.value&&(e.gps.Altitude=-e.gps.Altitude)}catch(e){}}}(d)):d=r({},d,S),S.MakerNote&&delete S.MakerNote.__offset}if(function(e){return void 0!==e}(g)){s=1;var y=le.read(e,g);i?d.riff=d.riff?r({},d.riff,y):y:d=r({},d,y)}if(delete d.Thumbnail,m&&(i?(d.file||(d.file={}),d.file.FileType=m):d.FileType=m,s=1),!s)throw new Se.MetadataMissingError;return a?Promise.all([]).then((function(){return d})):d}ExifReader=n}();
//# sourceMappingURL=exif-reader.js.map