2026-07-21 22:01:30 +00:00
// Module ID: 4789
// Function ID: 41646
2026-07-20 16:05:17 +00:00
// Name: getNameAndValue
// Dependencies: []
2026-07-21 22:01:30 +00:00
// Module 4789 (getNameAndValue)
2026-07-20 16:05:17 +00:00
function getNameAndValue ( byteLength , arg1 , arg2 , type ) {
arg1 = type ;
const items = [ ] ;
const importDefault = items ;
const items1 = [ ] ;
const dependencyMap = items1 ;
const items2 = [ ] ;
let tmp = closure _4 ;
const COMPRESSION _METHOD _NONE = arg1 ( dependencyMap [ 4 ] ) . COMPRESSION _METHOD _NONE ;
let dataView ;
let tmp3 = COMPRESSION _METHOD _NONE ;
if ( 0 < arg2 ) {
let tmp4 = COMPRESSION _METHOD _NONE ;
let num2 = 0 ;
tmp3 = COMPRESSION _METHOD _NONE ;
if ( arg1 < byteLength . byteLength ) {
while ( true ) {
let tmp5 = closure _5 ;
let tmp6 = tmp4 ;
let tmp7 = num2 ;
if ( tmp !== closure _5 ) {
let tmp16 = closure _8 ;
if ( tmp === closure _8 ) {
break ;
} else {
let uint8 = byteLength . getUint8 ( arg1 + num2 ) ;
if ( 0 === uint8 ) {
let tmp27 = moveToNextState ;
let tmp15 = moveToNextState ( type , tmp ) ;
let tmp9 = tmp4 ;
let sum = num2 ;
let tmp28 = uint8 ;
} else {
let tmp17 = closure _4 ;
if ( tmp === closure _4 ) {
let arr = items . push ( uint8 ) ;
tmp15 = tmp ;
tmp9 = tmp4 ;
sum = num2 ;
let tmp26 = uint8 ;
} else {
let tmp18 = closure _6 ;
if ( tmp === closure _6 ) {
arr = items1 . push ( uint8 ) ;
tmp15 = tmp ;
tmp9 = tmp4 ;
sum = num2 ;
let tmp24 = uint8 ;
} else {
let tmp19 = closure _7 ;
tmp15 = tmp ;
tmp9 = tmp4 ;
sum = num2 ;
let tmp20 = uint8 ;
if ( tmp === closure _7 ) {
let arr1 = items2 . push ( uint8 ) ;
tmp15 = tmp ;
tmp9 = tmp4 ;
sum = num2 ;
let tmp22 = uint8 ;
}
}
}
}
}
} else {
let tmp8 = getCompressionMethod ;
let obj = { type , dataView : byteLength , offset : arg1 + num2 } ;
tmp9 = getCompressionMethod ( obj ) ;
let tmp10 = arg1 ;
let tmp11 = dependencyMap ;
sum = num2 ;
if ( type === arg1 ( dependencyMap [ 5 ] ) . TYPE _ITXT ) {
let tmp13 = closure _9 ;
sum = num2 + closure _9 ;
}
let tmp14 = moveToNextState ;
tmp15 = moveToNextState ( type , tmp ) ;
}
num2 = sum + 1 ;
tmp3 = tmp9 ;
if ( num2 < arg2 ) {
tmp = tmp15 ;
tmp4 = tmp9 ;
tmp3 = tmp9 ;
}
}
const _DataView = DataView ;
const buffer = byteLength . buffer ;
dataView = new DataView ( buffer . slice ( arg1 + num2 , arg1 + arg2 ) ) ;
tmp3 = tmp4 ;
}
}
if ( tmp3 !== arg1 ( dependencyMap [ 4 ] ) . COMPRESSION _METHOD _NONE ) {
if ( ! arg4 ) {
return { } ;
}
}
if ( type === arg1 ( dependencyMap [ 5 ] ) . TYPE _TEXT ) {
let str = "latin1" ;
} else {
str = "utf-8" ;
}
const decompressResult = arg1 ( dependencyMap [ 4 ] ) . decompress ( dataView , tmp3 , str ) ;
if ( decompressResult instanceof Promise ) {
let catchPromise = decompressResult . then ( ( arg0 ) => callback ( arg0 , arg3 , items1 , items ) ) . catch ( ( ) => callback ( "<text using unknown compression>" . split ( "" ) , arg3 , items1 , items ) ) ;
const nextPromise = decompressResult . then ( ( arg0 ) => callback ( arg0 , arg3 , items1 , items ) ) ;
} else {
catchPromise = constructTag ( decompressResult , type , items1 , items ) ;
}
return catchPromise ;
}
function getCompressionMethod ( arg0 ) {
let dataView ;
let offset ;
let type ;
( { type , dataView , offset } = arg0 ) ;
if ( type === arg1 ( dependencyMap [ 5 ] ) . TYPE _ITXT ) {
if ( dataView . getUint8 ( offset ) === closure _10 ) {
return dataView . getUint8 ( offset + 1 ) ;
}
} else if ( type === arg1 ( dependencyMap [ 5 ] ) . TYPE _ZTXT ) {
return dataView . getUint8 ( offset ) ;
}
return arg1 ( dependencyMap [ 4 ] ) . COMPRESSION _METHOD _NONE ;
}
function moveToNextState ( type , arg1 ) {
if ( arg1 === closure _4 ) {
const items = [ arg1 ( dependencyMap [ 5 ] ) . TYPE _ITXT , arg1 ( dependencyMap [ 5 ] ) . TYPE _ZTXT ] ;
if ( items . includes ( type ) ) {
let tmp4 = closure _5 ;
}
return tmp4 ;
}
if ( arg1 === closure _5 ) {
type === arg1 ( dependencyMap [ 5 ] ) . TYPE _ITXT ? closure _6 : closure _8 ;
} else {
tmp4 = arg1 === closure _6 ? closure _7 : closure _8 ;
}
}
function constructTag ( decompressResult , type , items1 , items ) {
let stringFromDataView = decompressResult ;
if ( decompressResult instanceof DataView ) {
let obj = type ( dependencyMap [ 4 ] ) ;
stringFromDataView = obj . getStringFromDataView ( decompressResult , 0 , decompressResult . byteLength ) ;
}
obj = { name : getName ( type , items1 , items ) , value : stringFromDataView } ;
if ( type === type ( dependencyMap [ 5 ] ) . TYPE _ITXT ) {
stringFromDataView = getDescription ( decompressResult ) ;
}
obj . description = stringFromDataView ;
return obj ;
}
function getName ( arg0 , items , items ) {
const stringValueFromArray = items ( dependencyMap [ 4 ] ) . getStringValueFromArray ( items ) ;
let combined = stringValueFromArray ;
if ( arg0 !== items ( dependencyMap [ 5 ] ) . TYPE _TEXT ) {
combined = stringValueFromArray ;
if ( 0 !== items . length ) {
const _HermesInternal = HermesInternal ;
combined = "" + stringValueFromArray + " (" + items ( dependencyMap [ 4 ] ) . getStringValueFromArray ( items ) + ")" ;
const obj2 = items ( dependencyMap [ 4 ] ) ;
}
}
return combined ;
}
function getDescription ( arg0 ) {
return importDefault ( dependencyMap [ 6 ] ) . decode ( "UTF-8" , arg0 ) ;
}
function isExifGroupTag ( str , str2 ) {
let tmp = "raw profile type exif" === str . toLowerCase ( ) ;
if ( tmp ) {
tmp = "exif" === str2 . substring ( 1 , 5 ) ;
}
return tmp ;
}
function isIptcGroupTag ( str , str2 ) {
let tmp = "raw profile type iptc" === str . toLowerCase ( ) ;
if ( tmp ) {
tmp = "iptc" === str2 . substring ( 1 , 5 ) ;
}
return tmp ;
}
function decodeRawData ( arg0 ) {
let length ;
let sum ;
const replaced = arg0 . match ( /\n(exif|iptc)\n\s*\d+\n([\s\S]*)$/ ) [ 2 ] . replace ( /\n/g , "" ) ;
const arrayBuffer = new ArrayBuffer ( replaced . length / 2 ) ;
const dataView = new DataView ( arrayBuffer ) ;
let num = 0 ;
if ( 0 < replaced . length ) {
do {
let _parseInt = parseInt ;
sum = num + 2 ;
let setUint8Result = dataView . setUint8 ( num / 2 , parseInt ( replaced . substring ( num , sum ) , 16 ) ) ;
num = sum ;
length = replaced . length ;
} while ( sum < length ) ;
}
return dataView ;
}
let closure _3 = importDefault ( dependencyMap [ 0 ] ) ;
let closure _4 = "STATE_KEYWORD" ;
let closure _5 = "STATE_COMPRESSION" ;
let closure _6 = "STATE_LANG" ;
let closure _7 = "STATE_TRANSLATED_KEYWORD" ;
let closure _8 = "STATE_TEXT" ;
let closure _9 = 1 ;
let closure _10 = 1 ;
let closure _11 = 6 ;
export default {
read ( arg0 , arg1 , arg2 , arg3 ) {
let description ;
let name ;
let value ;
arg1 = arg3 ;
let obj = { } ;
const items = [ ] ;
let num = 0 ;
if ( 0 < arg1 . length ) {
do {
let arr2 = arg1 [ num ] ;
let tmp4 = closure _12 ;
let tmp5 = arg0 ;
let tmp6 = arg2 ;
let promise = closure _12 ( arg0 , arr2 . offset , arr2 . length , arr2 . type , arg2 ) ;
let _Promise = Promise ;
if ( promise instanceof Promise ) {
let arr = items . push ( promise . then ( ( description ) => {
let name ;
let value ;
( { name , value } = description ) ;
if ( callback ( closure _2 [ 1 ] ) . USE _EXIF ) {
if ( callback3 ( name , value ) ) {
let obj = { _ _exif : callback ( closure _2 [ 2 ] ) . read ( callback5 ( value ) , closure _11 , arg3 ) . tags } ;
return obj ;
}
}
if ( callback ( closure _2 [ 1 ] ) . USE _IPTC ) {
if ( callback4 ( name , value ) ) {
obj = { _ _iptc : callback ( closure _2 [ 3 ] ) . read ( callback5 ( value ) , 0 , arg3 ) } ;
return obj ;
}
}
if ( name ) {
if ( ! callback3 ( name , value ) ) {
if ( ! callback4 ( name , value ) ) {
obj = { value , description : description . description } ;
return callback2 ( { } , name , obj ) ;
}
}
}
} ) ) ;
let tmp7 = tmp ;
let tmp8 = tmp2 ;
let tmp9 = tmp3 ;
} else {
( { name , value , description } = promise ) ;
tmp7 = name ;
tmp8 = value ;
tmp9 = description ;
if ( name ) {
obj = { value , description } ;
obj [ name ] = obj ;
tmp7 = name ;
tmp8 = value ;
tmp9 = description ;
}
}
num = num + 1 ;
let tmp = tmp7 ;
let tmp2 = tmp8 ;
let tmp3 = tmp9 ;
} while ( num < arg1 . length ) ;
}
obj = { readTags : obj } ;
let allPromises ;
if ( items . length > 0 ) {
allPromises = Promise . all ( items ) ;
}
obj . readTagsPromise = allPromises ;
return obj ;
}
} ;