1"use strict"; 2(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([["default-src_app_services_photo_photo_service_ts"],{ 3 4/***/ 61665: 5/*!*************************************************!*\ 6 !*** ./src/app/services/photo/photo.service.ts ***! 7 \*************************************************/ 8/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 9 10__webpack_require__.r(__webpack_exports__); 11/* harmony export */ __webpack_require__.d(__webpack_exports__, { 12/* harmony export */ PhotoService: () => (/* binding */ PhotoService) 13/* harmony export */ }); 14/* harmony import */ var C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 89204); 15/* harmony import */ var tslib__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! tslib */ 24398); 16/* harmony import */ var _angular_core__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! @angular/core */ 37580); 17/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @capacitor/core */ 14070); 18/* harmony import */ var _capacitor_camera__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @capacitor/camera */ 54982); 19/* harmony import */ var _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! @capacitor/filesystem */ 63474); 20/* harmony import */ var _ionic_angular__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! @ionic/angular */ 5995); 21/* harmony import */ var _storage_storage_service__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ../storage/storage.service */ 85217); 22/* harmony import */ var rxjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! rxjs */ 33119); 23/* harmony import */ var exifr__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! exifr */ 34394); 24 25 26 27 28 29 30 31 32 33 34let PhotoService = class PhotoService { 35 constructor(platform, storageService) { 36 this.storageService = storageService; 37 this.uploadedImageForProfilePhoto = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); 38 this.uploadedImageForPaymentAttachment = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); 39 this.uploadedImageForLogin = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); 40 this.uploadedImageForCreateStudent = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); 41 this.uploadedImageForCreateSchool = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); 42 this.uploadedImageForDrivingSchool = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); 43 this.uploadedImageForDrivingSchoolLogo = new rxjs__WEBPACK_IMPORTED_MODULE_6__.Subject(); 44 this.PHOTO_STORAGE = 'photos'; 45 this.convertBlobToBase64 = blob => new Promise((resolve, reject) => { 46 const reader = new FileReader(); 47 reader.onerror = reject; 48 reader.onload = () => { 49 resolve(reader.result); 50 }; 51 reader.readAsDataURL(blob); 52 }); 53 this.platform = platform; 54 } 55 addNewToGallery(type) { 56 var _this = this; 57 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 58 _this.PHOTO_STORAGE = type; 59 // Take a photo 60 const capturedPhoto = yield _capacitor_camera__WEBPACK_IMPORTED_MODULE_2__.Camera.getPhoto({ 61 resultType: _capacitor_camera__WEBPACK_IMPORTED_MODULE_2__.CameraResultType.Uri, 62 source: _capacitor_camera__WEBPACK_IMPORTED_MODULE_2__.CameraSource.Camera, 63 quality: 100, 64 width: 1080, 65 height: 1080, 66 allowEditing: true, 67 correctOrientation: true, 68 webUseInput: false 69 }); 70 const savedImageFile = yield _this.savePicture(capturedPhoto); 71 //console.log(capturedPhoto.exif); 72 const exitfrData = yield exifr__WEBPACK_IMPORTED_MODULE_5__["default"].parse(savedImageFile.webviewPath, true); 73 var imgDate; 74 if (exitfrData.CreateDate === undefined || exitfrData.CreateDate === null) { 75 imgDate = null; 76 savedImageFile.validImage = true; 77 //console.log("No Date Image", exitfrData); 78 } else { 79 imgDate = exitfrData.CreateDate; 80 var now = new Date(); 81 var logs = new Date(imgDate); 82 var diffMs = (new Date(now).getTime() - new Date(logs).getTime()) / 60000; 83 if (diffMs > 60) { 84 savedImageFile.base64Data = null; 85 savedImageFile.blob = null; 86 savedImageFile.filepath = null; 87 savedImageFile.webviewPath = null; 88 savedImageFile.validImage = false;
89 //console.log("Invalid Image - old photo", exitfrData); 90 } else { 91 savedImageFile.validImage = true; 92 //console.log("Valid Image - new photo", exitfrData); 93 } 94 } 95 if (type == 'student_photo') { 96 _this.uploadedImageForProfilePhoto.next(savedImageFile); 97 } 98 if (type == 'payment_attachment') { 99 _this.uploadedImageForPaymentAttachment.next(savedImageFile); 100 } 101 if (type == 'login') { 102 _this.uploadedImageForLogin.next(savedImageFile); 103 } 104 if (type == 'createStudent') { 105 _this.uploadedImageForCreateStudent.next(savedImageFile); 106 } 107 if (type == 'createSchool') { 108 _this.uploadedImageForCreateSchool.next(savedImageFile); 109 } 110 if (type == 'school_payment_attachment') { 111 _this.uploadedImageForDrivingSchool.next(savedImageFile); 112 } 113 if (type == 'company_photo') { 114 _this.uploadedImageForDrivingSchoolLogo.next(savedImageFile); 115 } 116 //this.storageService.remove(this.PHOTO_STORAGE); 117 //this.storageService.set(this.PHOTO_STORAGE, JSON.stringify(savedImageFile)); 118 })(); 119 } 120 savePicture(cameraPhoto) { 121 var _this2 = this; 122 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 123 // Convert photo to base64 format, required by Filesystem API to save 124 const base64Data = yield _this2.readAsBase64(cameraPhoto); 125 const imageData = yield cameraPhoto.exif; 126 // Write the file to the data directory 127 const fileName = new Date().getTime() + '.jpeg'; 128 const blobData = yield _this2.readAsBlob(cameraPhoto, fileName); 129 const savedFile = yield _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_3__.Filesystem.writeFile({ 130 path: fileName, 131 data: base64Data, 132 directory: _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_3__.Directory.Data 133 }); 134 // Use webPath to display the new image instead of base64 since it's 135 // already loaded into memory 136 if (_this2.platform.is('hybrid')) { 137 // Display the new image by rewriting the 'file://' path to HTTP 138 // Details: https://ionicframework.com/docs/building/webview#file-protocol 139 return { 140 filepath: savedFile.uri, 141 webviewPath: _capacitor_core__WEBPACK_IMPORTED_MODULE_1__.Capacitor.convertFileSrc(savedFile.uri), 142 blob: blobData, 143 base64Data: base64Data, 144 validImage: null 145 }; 146 } else { 147 // Use webPath to display the new image instead of base64 since it's 148 // already loaded into memory 149 return { 150 filepath: fileName, 151 webviewPath: cameraPhoto.webPath, 152 blob: blobData, 153 base64Data: base64Data, 154 validImage: null 155 }; 156 } 157 })(); 158 } 159 readAsBlob(cameraPhoto, fileName) { 160 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 161 // Fetch the photo, read as a blob, then convert to base64 format 162 const response = yield fetch(cameraPhoto.webPath); 163 const blob = yield response.blob(); 164 var file = new File([blob], fileName, { 165 type: blob.type, 166 lastModified: new Date().getTime() 167 }); 168 return file; 169 })(); 170 } 171 removePhotoFromFileSystem(file) { 172 var photo = { 173 path: file, 174 directory: _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_3__.Directory.Data 175 }; 176 _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_3__.Filesystem.deleteFile(photo); 177 } 178 removeAllPhotos() { 179 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 180 const info = yield _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_3__.Filesystem.stat({ 181 path: '', 182 directory: _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_3__.Directory.Data 183 }); 184 //console.log('Stat Info: ', info); 185 })(); 186 } 187 readAsBase64(cameraPhoto) { 188 var _this3 = this; 189 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 190 // Fetch the photo, read as a blob, then convert to base64 format 191 const response = yield fetch(cameraPhoto.webPath); 192 const blob = yield response.blob(); 193 return yield _this3.convertBlobToBase64(blob); 194 })(); 195 } 196 loadSaved(storagePhoto) { 197 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 198 const readFile = yield _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_3__.Filesystem.readFile({ 199 path: storagePhoto.filepath, 200 directory: _capacitor_filesystem__WEBPACK_IMPORTED_MODULE_3__.Directory.Data 201 }); 202 return storagePhoto.webviewPath = `data:image/jpeg;base64,${readFile.data}`; 203 })(); 204 } 205 static #_ = this.ctorParameters = () => [{ 206 type: _ionic_angular__WEBPACK_IMPORTED_MODULE_7__.Platform 207 }, { 208 type: _storage_storage_service__WEBPACK_IMPORTED_MODULE_4__.StorageService 209 }]; 210}; 211PhotoService = (0,tslib__WEBPACK_IMPORTED_MODULE_8__.__decorate)([(0,_angular_core__WEBPACK_IMPORTED_MODULE_9__.Injectable)({ 212 providedIn: 'root' 213})], PhotoService); 214 215
216/***/ }), 217 218/***/ 96984: 219/*!****************************************************************!*\ 220 !*** ./node_modules/@capacitor/camera/dist/esm/definitions.js ***! 221 \****************************************************************/ 222/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 223 224__webpack_require__.r(__webpack_exports__); 225/* harmony export */ __webpack_require__.d(__webpack_exports__, { 226/* harmony export */ CameraDirection: () => (/* binding */ CameraDirection), 227/* harmony export */ CameraResultType: () => (/* binding */ CameraResultType), 228/* harmony export */ CameraSource: () => (/* binding */ CameraSource) 229/* harmony export */ }); 230var CameraSource; 231(function (CameraSource) { 232 /** 233 * Prompts the user to select either the photo album or take a photo. 234 */ 235 CameraSource["Prompt"] = "PROMPT"; 236 /** 237 * Take a new photo using the camera. 238 */ 239 CameraSource["Camera"] = "CAMERA"; 240 /** 241 * Pick an existing photo fron the gallery or photo album. 242 */ 243 CameraSource["Photos"] = "PHOTOS"; 244})(CameraSource || (CameraSource = {})); 245var CameraDirection; 246(function (CameraDirection) { 247 CameraDirection["Rear"] = "REAR"; 248 CameraDirection["Front"] = "FRONT"; 249})(CameraDirection || (CameraDirection = {})); 250var CameraResultType; 251(function (CameraResultType) { 252 CameraResultType["Uri"] = "uri"; 253 CameraResultType["Base64"] = "base64"; 254 CameraResultType["DataUrl"] = "dataUrl"; 255})(CameraResultType || (CameraResultType = {})); 256 257/***/ }), 258 259/***/ 54982: 260/*!**********************************************************!*\ 261 !*** ./node_modules/@capacitor/camera/dist/esm/index.js ***! 262 \**********************************************************/ 263/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { 264 265__webpack_require__.r(__webpack_exports__); 266/* harmony export */ __webpack_require__.d(__webpack_exports__, { 267/* harmony export */ Camera: () => (/* binding */ Camera), 268/* harmony export */ CameraDirection: () => (/* reexport safe */ _definitions__WEBPACK_IMPORTED_MODULE_1__.CameraDirection), 269/* harmony export */ CameraResultType: () => (/* reexport safe */ _definitions__WEBPACK_IMPORTED_MODULE_1__.CameraResultType), 270/* harmony export */ CameraSource: () => (/* reexport safe */ _definitions__WEBPACK_IMPORTED_MODULE_1__.CameraSource) 271/* harmony export */ }); 272/* harmony import */ var _capacitor_core__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @capacitor/core */ 14070); 273/* harmony import */ var _definitions__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./definitions */ 96984); 274 275const Camera = (0,_capacitor_core__WEBPACK_IMPORTED_MODULE_0__.registerPlugin)('Camera', { 276 web: () => __webpack_require__.e(/*! import() */ "node_modules_capacitor_camera_dist_esm_web_js").then(__webpack_require__.bind(__webpack_require__, /*! ./web */ 8436)).then(m => new m.CameraWeb()) 277}); 278 279 280 281/***/ }), 282 283/***/ 34394: 284/*!**********************************************!*\ 285 !*** ./node_modules/exifr/dist/full.esm.mjs ***! 286 \**********************************************/ 287/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => { 288 289__webpack_require__.r(__webpack_exports__); 290/* harmony export */ __webpack_require__.d(__webpack_exports__, { 291/* harmony export */ Exifr: () => (/* binding */ te), 292/* harmony export */ Options: () => (/* binding */ q), 293/* harmony export */ allFormatters: () => (/* binding */ X), 294/* harmony export */ chunkedProps: () => (/* binding */ G), 295/* harmony export */ createDictionary: () => (/* binding */ U), 296/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__), 297/* harmony export */ extendDictionary: () => (/* binding */ F), 298/* harmony export */ fetchUrlAsArrayBuffer: () => (/* binding */ M), 299/* harmony export */ fileParsers: () => (/* binding */ w), 300/* harmony export */ fileReaders: () => (/* binding */ A), 301/* harmony export */ gps: () => (/* binding */ Se), 302/* harmony export */ gpsOnlyOptions: () => (/* binding */ me), 303/* harmony export */ inheritables: () => (/* binding */ K), 304/* harmony export */ orientation: () => (/* binding */ Pe), 305/* harmony export */ orientationOnlyOptions: () => (/* binding */ Ie), 306/* harmony export */ otherSegments: () => (/* binding */ V), 307/* harmony export */ parse: () => (/* binding */ ie), 308/* harmony export */ readBlobAsArrayBuffer: () => (/* binding */ R), 309/* harmony export */ rotateCanvas: () => (/* binding */ we), 310/* harmony export */ rotateCss: () => (/* binding */ Te), 311/* harmony export */ rotation: () => (/* binding */ Ae), 312/* harmony export */ rotations: () => (/* binding */ ke), 313/* harmony export */ segmentParsers: () => (/* binding */ T), 314/* harmony export */ segments: () => (/* binding */ z), 315/* harmony export */ segmentsAndBlocks: () => (/* binding */ j), 316/* harmony export */ sidecar: () => (/* binding */ st), 317/* harmony export */ tagKeys: () => (/* binding */ E), 318/* harmony export */ tagRevivers: () => (/* binding */ N), 319/* harmony export */ tagValues: () => (/* binding */ B), 320/* harmony export */ thumbnail: () => (/* binding */ ye), 321/* harmony export */ thumbnailOnlyOptions: () => (/* binding */ Ce), 322/* harmony export */ thumbnailUrl: () => (/* binding */ be), 323/* harmony export */ tiffBlocks: () => (/* binding */ H), 324/* harmony export */ tiffExtractables: () => (/* binding */ W) 325/* harmony export */ }); 326/* harmony import */ var C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js */ 89204); 327 328var e = "undefined" != typeof self ? self : global; 329const t = "undefined" != typeof navigator, 330 i = t && "undefined" == typeof HTMLImageElement, 331 n = !("undefined" == typeof global || "undefined" == typeof process || !process.versions || !process.versions.node), 332 s = e.Buffer, 333 r = e.BigInt, 334 a = !!s, 335 o = e => e; 336function l(e, t = o) { 337 if (n) try { 338 return "function" == typeof require ? Promise.resolve(t(require(e))) : import( /* webpackIgnore: true */e).then(t); 339 } catch (t) { 340 console.warn(`Couldn't load ${e}`); 341 } 342} 343let h = e.fetch; 344const u = e => h = e; 345if (!e.fetch) { 346 const e = l("http", e => e), 347 t = l("https", e => e), 348 i = (n, { 349 headers: s 350 } = {}) => new Promise( /*#__PURE__*/function () { 351 var _ref = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (r, a) { 352 let { 353 port: o, 354 hostname: l, 355 pathname: h,
356 protocol: u, 357 search: c 358 } = new URL(n); 359 const f = { 360 method: "GET", 361 hostname: l, 362 path: encodeURI(h) + c, 363 headers: s 364 }; 365 "" !== o && (f.port = Number(o)); 366 const d = ("https:" === u ? yield t : yield e).request(f, e => { 367 if (301 === e.statusCode || 302 === e.statusCode) { 368 let t = new URL(e.headers.location, n).toString(); 369 return i(t, { 370 headers: s 371 }).then(r).catch(a); 372 } 373 r({ 374 status: e.statusCode, 375 arrayBuffer: () => new Promise(t => { 376 let i = []; 377 e.on("data", e => i.push(e)), e.on("end", () => t(Buffer.concat(i))); 378 }) 379 }); 380 }); 381 d.on("error", a), d.end(); 382 }); 383 return function (_x, _x2) { 384 return _ref.apply(this, arguments); 385 }; 386 }()); 387 u(i); 388} 389function c(e, t, i) { 390 return t in e ? Object.defineProperty(e, t, { 391 value: i, 392 enumerable: !0, 393 configurable: !0, 394 writable: !0 395 }) : e[t] = i, e; 396} 397const f = e => p(e) ? void 0 : e, 398 d = e => void 0 !== e; 399function p(e) { 400 return void 0 === e || (e instanceof Map ? 0 === e.size : 0 === Object.values(e).filter(d).length); 401} 402function g(e) { 403 let t = new Error(e); 404 throw delete t.stack, t; 405} 406function m(e) { 407 return "" === (e = function (e) { 408 for (; e.endsWith("\0");) e = e.slice(0, -1); 409 return e; 410 }(e).trim()) ? void 0 : e; 411} 412function S(e) { 413 let t = function (e) { 414 let t = 0; 415 return e.ifd0.enabled && (t += 1024), e.exif.enabled && (t += 2048), e.makerNote && (t += 2048), e.userComment && (t += 1024), e.gps.enabled && (t += 512), e.interop.enabled && (t += 100), e.ifd1.enabled && (t += 1024), t + 2048; 416 }(e); 417 return e.jfif.enabled && (t += 50), e.xmp.enabled && (t += 2e4), e.iptc.enabled && (t += 14e3), e.icc.enabled && (t += 6e3), t; 418} 419const C = e => String.fromCharCode.apply(null, e), 420 y = "undefined" != typeof TextDecoder ? new TextDecoder("utf-8") : void 0; 421function b(e) { 422 return y ? y.decode(e) : a ? Buffer.from(e).toString("utf8") : decodeURIComponent(escape(C(e))); 423} 424class I { 425 static from(e, t) { 426 return e instanceof this && e.le === t ? e : new I(e, void 0, void 0, t); 427 } 428 constructor(e, t = 0, i, n) { 429 if ("boolean" == typeof n && (this.le = n), Array.isArray(e) && (e = new Uint8Array(e)), 0 === e) this.byteOffset = 0, this.byteLength = 0;else if (e instanceof ArrayBuffer) { 430 void 0 === i && (i = e.byteLength - t); 431 let n = new DataView(e, t, i); 432 this._swapDataView(n); 433 } else if (e instanceof Uint8Array || e instanceof DataView || e instanceof I) { 434 void 0 === i && (i = e.byteLength - t), (t += e.byteOffset) + i > e.byteOffset + e.byteLength && g("Creating view outside of available memory in ArrayBuffer"); 435 let n = new DataView(e.buffer, t, i); 436 this._swapDataView(n); 437 } else if ("number" == typeof e) { 438 let t = new DataView(new ArrayBuffer(e)); 439 this._swapDataView(t); 440 } else g("Invalid input argument for BufferView: " + e); 441 } 442 _swapArrayBuffer(e) { 443 this._swapDataView(new DataView(e)); 444 } 445 _swapBuffer(e) { 446 this._swapDataView(new DataView(e.buffer, e.byteOffset, e.byteLength)); 447 } 448 _swapDataView(e) { 449 this.dataView = e, this.buffer = e.buffer, this.byteOffset = e.byteOffset, this.byteLength = e.byteLength; 450 } 451 _lengthToEnd(e) { 452 return this.byteLength - e; 453 } 454 set(e, t, i = I) { 455 return e instanceof DataView || e instanceof I ? e = new Uint8Array(e.buffer, e.byteOffset, e.byteLength) : e instanceof ArrayBuffer && (e = new Uint8Array(e)), e instanceof Uint8Array || g("BufferView.set(): Invalid data argument."), this.toUint8().set(e, t), new i(this, t, e.byteLength); 456 } 457 subarray(e, t) { 458 return t = t || this._lengthToEnd(e), new I(this, e, t); 459 } 460 toUint8() { 461 return new Uint8Array(this.buffer, this.byteOffset, this.byteLength); 462 } 463 getUint8Array(e, t) { 464 return new Uint8Array(this.buffer, this.byteOffset + e, t); 465 } 466 getString(e = 0, t = this.byteLength) { 467 return b(this.getUint8Array(e, t)); 468 } 469 getLatin1String(e = 0, t = this.byteLength) { 470 let i = this.getUint8Array(e, t); 471 return C(i); 472 } 473 getUnicodeString(e = 0, t = this.byteLength) { 474 const i = []; 475 for (let n = 0; n < t && e + n < this.byteLength; n += 2) i.push(this.getUint16(e + n)); 476 return C(i); 477 } 478 getInt8(e) { 479 return this.dataView.getInt8(e); 480 } 481 getUint8(e) { 482 return this.dataView.getUint8(e); 483 } 484 getInt16(e, t = this.le) { 485 return this.dataView.getInt16(e, t); 486 } 487 getInt32(e, t = this.le) { 488 return this.dataView.getInt32(e, t); 489 } 490 getUint16(e, t = this.le) { 491 return this.dataView.getUint16(e, t); 492 } 493 getUint32(e, t = this.le) { 494 return this.dataView.getUint32(e, t); 495 } 496 getFloat32(e, t = this.le) { 497 return this.dataView.getFloat32(e, t); 498 } 499 getFloat64(e, t = this.le) { 500 return this.dataView.getFloat64(e, t); 501 } 502 getFloat(e, t = this.le) { 503 return this.dataView.getFloat32(e, t); 504 } 505 getDouble(e, t = this.le) { 506 return this.dataView.getFloat64(e, t); 507 } 508 getUintBytes(e, t, i) { 509 switch (t) { 510 case 1: 511 return this.getUint8(e, i); 512 case 2: 513 return this.getUint16(e, i); 514 case 4: 515 return this.getUint32(e, i); 516 case 8: 517 return this.getUint64 && this.getUint64(e, i); 518 } 519 } 520 getUint(e, t, i) { 521 switch (t) { 522 case 8: 523 return this.getUint8(e, i); 524 case 16: 525 return this.getUint16(e, i); 526 case 32: 527 return this.getUint32(e, i); 528 case 64: 529 return this.getUint64 && this.getUint64(e, i); 530 } 531 } 532 toString(e) { 533 return this.dataView.toString(e, this.constructor.name); 534 } 535 ensureChunk() {} 536} 537function P(e, t) { 538 g(`${e} '${t}' was not loaded, try using full build of exifr.`); 539} 540class k extends Map { 541 constructor(e) { 542 super(), this.kind = e; 543 } 544 get(e, t) { 545 return this.has(e) || P(this.kind, e), t && (e in t || function (e, t) { 546 g(`Unknown ${e} '${t}'.`); 547 }(this.kind, e), t[e].enabled || P(this.kind, e)), super.get(e); 548 } 549 keyList() { 550 return Array.from(this.keys()); 551 } 552} 553var w = new k("file parser"), 554 T = new k("segment parser"), 555 A = new k("file reader"); 556function D(e, n) { 557 return "string" == typeof e ? O(e, n) : t && !i && e instanceof HTMLImageElement ? O(e.src, n) : e instanceof Uint8Array || e instanceof ArrayBuffer || e instanceof DataView ? new I(e) : t && e instanceof Blob ? x(e, n, "blob", R) : void g("Invalid input argument"); 558} 559function O(e, i) { 560 return (s = e).startsWith("data:") || s.length > 1e4 ? v(e, i, "base64") : n && e.includes("://") ? x(e, i, "url", M) : n ? v(e, i, "fs") : t ? x(e, i, "url", M) : void g("Invalid input argument"); 561 var s; 562} 563function x(_x3, _x4, _x5, _x6) { 564 return _x7.apply(this, arguments); 565} 566function _x7() { 567 _x7 = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (e, t, i, n) { 568 return A.has(i) ? v(e, t, i) : n ? function () { 569 var _ref4 = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (e, t) { 570 let i = yield t(e); 571 return new I(i); 572 }); 573 return function (_x26, _x27) { 574 return _ref4.apply(this, arguments); 575 }; 576 }()(e, n) : void g(`Parser ${i} is not loaded`); 577 }); 578 return _x7.apply(this, arguments); 579} 580function v(_x8, _x9, _x10) { 581 return _v.apply(this, arguments); 582} 583function _v() { 584 _v = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (e, t, i) { 585 let n = new (A.get(i))(e, t); 586 return yield n.read(), n; 587 }); 588 return _v.apply(this, arguments); 589} 590const M = e => h(e).then(e => e.arrayBuffer()), 591 R = e => new Promise((t, i) => { 592 let n = new FileReader(); 593 n.onloadend = () => t(n.result || new ArrayBuffer()), n.onerror = i, n.readAsArrayBuffer(e); 594 }); 595class L extends Map { 596 get tagKeys() { 597 return this.allKeys || (this.allKeys = Array.from(this.keys())), this.allKeys; 598 } 599 get tagValues() { 600 return this.allValues || (this.allValues = Array.from(this.values())
600), this.allValues; 601 } 602} 603function U(e, t, i) { 604 let n = new L(); 605 for (let [e, t] of i) n.set(e, t); 606 if (Array.isArray(t)) for (let i of t) e.set(i, n);else e.set(t, n); 607 return n; 608} 609function F(e, t, i) { 610 let n, 611 s = e.get(t); 612 for (n of i) s.set(n[0], n[1]); 613} 614const E = new Map(), 615 B = new Map(), 616 N = new Map(), 617 G = ["chunked", "firstChunkSize", "firstChunkSizeNode", "firstChunkSizeBrowser", "chunkSize", "chunkLimit"], 618 V = ["jfif", "xmp", "icc", "iptc", "ihdr"], 619 z = ["tiff", ...V], 620 H = ["ifd0", "ifd1", "exif", "gps", "interop"], 621 j = [...z, ...H], 622 W = ["makerNote", "userComment"], 623 K = ["translateKeys", "translateValues", "reviveValues", "multiSegment"], 624 X = [...K, "sanitize", "mergeOutput", "silentErrors"]; 625class _ { 626 get translate() { 627 return this.translateKeys || this.translateValues || this.reviveValues; 628 } 629} 630class Y extends _ { 631 get needed() { 632 return this.enabled || this.deps.size > 0; 633 } 634 constructor(e, t, i, n) { 635 if (super(), c(this, "enabled", !1), c(this, "skip", new Set()), c(this, "pick", new Set()), c(this, "deps", new Set()), c(this, "translateKeys", !1), c(this, "translateValues", !1), c(this, "reviveValues", !1), this.key = e, this.enabled = t, this.parse = this.enabled, this.applyInheritables(n), this.canBeFiltered = H.includes(e), this.canBeFiltered && (this.dict = E.get(e)), void 0 !== i) if (Array.isArray(i)) this.parse = this.enabled = !0, this.canBeFiltered && i.length > 0 && this.translateTagSet(i, this.pick);else if ("object" == typeof i) { 636 if (this.enabled = !0, this.parse = !1 !== i.parse, this.canBeFiltered) { 637 let { 638 pick: e, 639 skip: t 640 } = i; 641 e && e.length > 0 && this.translateTagSet(e, this.pick), t && t.length > 0 && this.translateTagSet(t, this.skip); 642 } 643 this.applyInheritables(i); 644 } else !0 === i || !1 === i ? this.parse = this.enabled = i : g(`Invalid options argument: ${i}`); 645 } 646 applyInheritables(e) { 647 let t, i; 648 for (t of K) i = e[t], void 0 !== i && (this[t] = i); 649 } 650 translateTagSet(e, t) { 651 if (this.dict) { 652 let i, 653 n, 654 { 655 tagKeys: s, 656 tagValues: r 657 } = this.dict; 658 for (i of e) "string" == typeof i ? (n = r.indexOf(i), -1 === n && (n = s.indexOf(Number(i))), -1 !== n && t.add(Number(s[n]))) : t.add(i); 659 } else for (let i of e) t.add(i); 660 } 661 finalizeFilters() { 662 !this.enabled && this.deps.size > 0 ? (this.enabled = !0, ee(this.pick, this.deps)) : this.enabled && this.pick.size > 0 && ee(this.pick, this.deps); 663 } 664} 665var $ = { 666 jfif: !1, 667 tiff: !0, 668 xmp: !1, 669 icc: !1, 670 iptc: !1, 671 ifd0: !0, 672 ifd1: !1, 673 exif: !0, 674 gps: !0, 675 interop: !1, 676 ihdr: void 0, 677 makerNote: !1, 678 userComment: !1, 679 multiSegment: !1, 680 skip: [], 681 pick: [], 682 translateKeys: !0, 683 translateValues: !0, 684 reviveValues: !0, 685 sanitize: !0, 686 mergeOutput: !0, 687 silentErrors: !0, 688 chunked: !0, 689 firstChunkSize: void 0, 690 firstChunkSizeNode: 512, 691 firstChunkSizeBrowser: 65536, 692 chunkSize: 65536, 693 chunkLimit: 5 694 }, 695 J = new Map(); 696class q extends _ { 697 static useCached(e) { 698 let t = J.get(e); 699 return void 0 !== t || (t = new this(e), J.set(e, t)), t; 700 } 701 constructor(e) { 702 super(), !0 === e ? this.setupFromTrue() : void 0 === e ? this.setupFromUndefined() : Array.isArray(e) ? this.setupFromArray(e) : "object" == typeof e ? this.setupFromObject(e) : g(`Invalid options argument ${e}`), void 0 === this.firstChunkSize && (this.firstChunkSize = t ? this.firstChunkSizeBrowser : this.firstChunkSizeNode), this.mergeOutput && (this.ifd1.enabled = !1), this.filterNestedSegmentTags(), this.traverseTiffDependencyTree(), this.checkLoadedPlugins(); 703 } 704 setupFromUndefined() { 705 let e; 706 for (e of G) this[e] = $[e]; 707 for (e of X) this[e] = $[e]; 708 for (e of W) this[e] = $[e]; 709 for (e of j) this[e] = new Y(e, $[e], void 0, this); 710 } 711 setupFromTrue() { 712 let e; 713 for (e of G) this[e] = $[e]; 714 for (e of X) this[e] = $[e]; 715 for (e of W) this[e] = !0; 716 for (e of j) this[e] = new Y(e, !0, void 0, this); 717 } 718 setupFromArray(e) { 719 let t; 720 for (t of G) this[t] = $[t]; 721 for (t of X) this[t] = $[t]; 722 for (t of W) this[t] = $[t]; 723 for (t of j) this[t] = new Y(t, !1, void 0, this); 724 this.setupGlobalFilters(e, void 0, H); 725 } 726 setupFromObject(e) { 727 let t; 728 for (t of (H.ifd0 = H.ifd0 || H.image, H.ifd1 = H.ifd1 || H.thumbnail, Object.assign(this, e), G)) this[t] = Z(e[t], $[t]); 729 for (t of X) this[t] = Z(e[t], $[t]); 730 for (t of W) this[t] = Z(e[t], $[t]); 731 for (t of z) this[t] = new Y(t, $[t], e[t], this); 732 for (t of H) this[t] = new Y(t, $[t], e[t], this.tiff); 733 this.setupGlobalFilters(e.pick, e.skip, H, j), !0 === e.tiff ? this.batchEnableWithBool(H, !0) : !1 === e.tiff ? this.batchEnableWithUserValue(H, e) : Array.isArray(e.tiff) ? this.setupGlobalFilters(e.tiff, void 0, H) : "object" == typeof e.tiff && this.setupGlobalFilters(e.tiff.pick, e.tiff.skip, H); 734 } 735 batchEnableWithBool(e, t) { 736 for (let i of e) this[i].enabled = t; 737 } 738 batchEnableWithUserValue(e, t) { 739 for (let i of e) { 740 let e = t[i]; 741 this[i].enabled = !1 !== e && void 0 !== e; 742 } 743 } 744 setupGlobalFilters(e, t, i, n = i) { 745 if (e && e.length) { 746 for (let e of n) this[e].enabled = !1; 747 let t = Q(e, i); 748 for (let [e, i] of t) ee(this[e].pick, i), this[e].enabled = !0; 749 } else if (t && t.length) { 750 let e = Q(t, i); 751 for (let [t, i] of e) ee(this[t].skip, i); 752 } 753 } 754 filterNestedSegmentTags() { 755 let { 756 ifd0: e, 757 exif: t, 758 xmp: i, 759 iptc: n, 760 icc: s 761 } = this; 762 this.makerNote ? t.deps.add(37500) : t.skip.add(37500), this.userComment ? t.deps.add(37510) : t.skip.add(37510), i.enabled || e.skip.add(700), n.enabled || e.skip.add(33723), s.enabled || e.skip.add(34675); 763 } 764 traverseTiffDependencyTree() { 765 let { 766 ifd0: e, 767 exif: t, 768 gps: i, 769 interop: n 770 } = this; 771 n.needed && (t.deps.add(40965), e.deps.add(40965)), t.needed && e.deps.add(34665), i.needed && e.deps.add(34853), this.tiff.enabled = H.some(e => !0 === this[e].enabled) || this.makerNote || this.userComment; 772 for (let e of H) this[e].finalizeFilters(); 773 } 774 get onlyTiff() { 775 return !V.map(e => this[e].enabled).some(e => !0 === e) && this.tiff.enabled; 776 } 777 checkLoadedPlugins() { 778 for (let e of z) this[e].enabled && !T.has(e) && P("segment parser", e); 779 } 780} 781function Q(e, t) { 782 let i, 783 n, 784 s, 785 r, 786 a = []; 787 for (s of t) { 788 for (r of (i = E.get(s), n = [], i)) (e.includes(r[0]) || e.includes(r[1])
788) && n.push(r[0]); 789 n.length && a.push([s, n]); 790 } 791 return a; 792} 793function Z(e, t) { 794 return void 0 !== e ? e : void 0 !== t ? t : void 0; 795} 796function ee(e, t) { 797 for (let i of t) e.add(i); 798} 799c(q, "default", $); 800class te { 801 constructor(e) { 802 c(this, "parsers", {}), c(this, "output", {}), c(this, "errors", []), c(this, "pushToErrors", e => this.errors.push(e)), this.options = q.useCached(e); 803 } 804 read(e) { 805 var _this = this; 806 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 807 _this.file = yield D(e, _this.options); 808 })(); 809 } 810 setup() { 811 if (this.fileParser) return; 812 let { 813 file: e 814 } = this, 815 t = e.getUint16(0); 816 for (let [i, n] of w) if (n.canHandle(e, t)) return this.fileParser = new n(this.options, this.file, this.parsers), e[i] = !0; 817 this.file.close && this.file.close(), g("Unknown file format"); 818 } 819 parse() { 820 var _this2 = this; 821 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 822 let { 823 output: e, 824 errors: t 825 } = _this2; 826 return _this2.setup(), _this2.options.silentErrors ? (yield _this2.executeParsers().catch(_this2.pushToErrors), t.push(..._this2.fileParser.errors)) : yield _this2.executeParsers(), _this2.file.close && _this2.file.close(), _this2.options.silentErrors && t.length > 0 && (e.errors = t), f(e); 827 })(); 828 } 829 executeParsers() { 830 var _this3 = this; 831 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 832 let { 833 output: e 834 } = _this3; 835 yield _this3.fileParser.parse(); 836 let t = Object.values(_this3.parsers).map( /*#__PURE__*/function () { 837 var _ref2 = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (t) { 838 let i = yield t.parse(); 839 t.assignToOutput(e, i); 840 }); 841 return function (_x11) { 842 return _ref2.apply(this, arguments); 843 }; 844 }()); 845 _this3.options.silentErrors && (t = t.map(e => e.catch(_this3.pushToErrors))), yield Promise.all(t); 846 })(); 847 } 848 extractThumbnail() { 849 var _this4 = this; 850 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 851 _this4.setup(); 852 let { 853 options: e, 854 file: t 855 } = _this4, 856 i = T.get("tiff", e); 857 var n; 858 if (t.tiff ? n = { 859 start: 0, 860 type: "tiff" 861 } : t.jpeg && (n = yield _this4.fileParser.getOrFindSegment("tiff")), void 0 === n) return; 862 let s = yield _this4.fileParser.ensureSegmentChunk(n), 863 r = _this4.parsers.tiff = new i(s, e, t), 864 a = yield r.extractThumbnail(); 865 return t.close && t.close(), a; 866 })(); 867 } 868} 869function ie(_x12, _x13) { 870 return _ie.apply(this, arguments); 871} 872function _ie() { 873 _ie = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (e, t) { 874 let i = new te(t); 875 return yield i.read(e), i.parse(); 876 }); 877 return _ie.apply(this, arguments); 878} 879var ne = Object.freeze({ 880 __proto__: null, 881 parse: ie, 882 Exifr: te, 883 fileParsers: w, 884 segmentParsers: T, 885 fileReaders: A, 886 tagKeys: E, 887 tagValues: B, 888 tagRevivers: N, 889 createDictionary: U, 890 extendDictionary: F, 891 fetchUrlAsArrayBuffer: M, 892 readBlobAsArrayBuffer: R, 893 chunkedProps: G, 894 otherSegments: V, 895 segments: z, 896 tiffBlocks: H, 897 segmentsAndBlocks: j, 898 tiffExtractables: W, 899 inheritables: K, 900 allFormatters: X, 901 Options: q 902}); 903class se { 904 constructor(e, t, i) { 905 var _this5 = this; 906 c(this, "errors", []), c(this, "ensureSegmentChunk", /*#__PURE__*/function () { 907 var _ref3 = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (e) { 908 let t = e.start, 909 i = e.size || 65536; 910 if (_this5.file.chunked) { 911 if (_this5.file.available(t, i)) e.chunk = _this5.file.subarray(t, i);else try { 912 e.chunk = yield _this5.file.readChunk(t, i); 913 } catch (t) { 914 g(`Couldn't read segment: ${JSON.stringify(e)}. ${t.message}`); 915 } 916 } else _this5.file.byteLength > t + i ? e.chunk = _this5.file.subarray(t, i) : void 0 === e.size ? e.chunk = _this5.file.subarray(t) : g("Segment unreachable: " + JSON.stringify(e)); 917 return e.chunk; 918 }); 919 return function (_x14) { 920 return _ref3.apply(this, arguments); 921 }; 922 }()), this.extendOptions && this.extendOptions(e), this.options = e, this.file = t, this.parsers = i; 923 } 924 injectSegment(e, t) { 925 this.options[e].enabled && this.createParser(e, t); 926 } 927 createParser(e, t) { 928 let i = new (T.get(e))(t, this.options, this.file); 929 return this.parsers[e] = i; 930 } 931 createParsers(e) { 932 for (let t of e) { 933 let { 934 type: e, 935 chunk: i 936 } = t, 937 n = this.options[e]; 938 if (n && n.enabled) { 939 let t = this.parsers[e]; 940 t && t.append || t || this.createParser(e, i); 941 } 942 } 943 } 944 readSegments(e) { 945 var _this6 = this; 946 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 947 let t = e.map(_this6.ensureSegmentChunk); 948 yield Promise.all(t); 949 })(); 950 } 951} 952class re { 953 static findPosition(e, t) { 954 let i = e.getUint16(t + 2) + 2, 955 n = "function" == typeof this.headerLength ? this.headerLength(e, t, i) : this.headerLength, 956 s = t + n, 957 r = i - n; 958 return { 959 offset: t, 960 length: i, 961 headerLength: n, 962 start: s, 963 size: r, 964 end: s + r 965 }; 966 } 967 static parse(e, t = {}) { 968 return new this(e, new q({ 969 [this.type]: t 970 }), e).parse(); 971 } 972 normalizeInput(e) { 973 return e instanceof I ? e : new I(e); 974 } 975 constructor(e, t = {}, i) { 976 c(this, "errors", []), c(this, "raw", new Map()), c(this, "handleError", e => { 977 if (!this.options.silentErrors) throw e; 978 this.errors.push(e.message); 979 }), this.chunk = this.normalizeInput(e), this.file = i, this.type = this.constructor.type, this.globalOptions = this.options = t, this.localOptions = t[this.type], this.canTranslate = this.localOptions && this.localOptions.translate; 980 } 981 translate() { 982 this.canTranslate && (this.translated = this.translateBlock(this.raw, this.type)); 983 } 984 get output() { 985 return this.translated ? this.translated : this.raw ? Object.fromEntries(this.raw) : void 0; 986 } 987 translateBlock(e, t) { 988 let i = N.get(t), 989 n = B.get(t), 990 s = E.get(t), 991 r = this.options[t], 992 a = r.reviveValues && !!i, 993 o = r.translateValues && !!n, 994 l = r.translateKeys && !!s, 995 h = {}; 996 for (let [t, r] of e) a && i.has(t) ? r = i.get(t)(r) : o && n.has(t) && (r = this.translateValue(r, n.get(t))), l && s.has(t) && (t = s.get(t) || t), h[t] = r; 997 return h; 998 } 999 translateValue(e, t) { 1000 return t[e] || t.DEFAULT || e; 1001 } 1002 assignToOutput(e, t) { 1003 this.assignObjectToOutput(e, this.constructor.type, t); 1004 } 1005 assignObjectToOutput(e, t, i) { 1006 if (this.globalOptions.mergeOutput) return Object.assign(e, i); 1007 e[t] ? Object.assign(e[t], i) : e[t] = i; 1008 } 1009} 1010c(re, "headerLength", 4), c(re, "type", void 0), c(re, "multiSegment", !1), c(re, "canHandle", () => !1); 1011function ae(e) { 1012 return 192 === e || 194 === e || 196 === e || 219 === e || 221 === e || 218 === e || 254 === e; 1013} 1014function oe(e) { 1015 return e >= 224 && e <= 239; 1016} 1017function le(e, t, i) { 1018 for (let [n, s] of T) if (s.canHandle(e, t, i)) return n; 1019} 1020class he extends se { 1021 constructor(...e) { 1022 super(...e), c(this, "appSegments", []), c(this, "jpegSegments", []), c(this, "unknownSegments", []); 1023 } 1024 static canHandle(e, t) { 1025 return 65496 === t; 1026 } 1027 parse() { 1028 var _this7 = this; 1029 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1030 yield _this7.findAppSegments(), yield _this7.readSegments(_this7.appSegments), _this7.mergeMultiSegments(), _this7.createParsers(_this7.mergedAppSegments || _this7.appSegments); 1031 })(); 1032 } 1033 setupSegmentFinderArgs(e) { 1034 !0 === e ? (this.findAll = !0, this.wanted = new Set(T.keyList())) : (e = void 0 === e ? T.keyList().filter(e => this.options[e].enabled) : e.filter(e => this.options[e].enabled && T.has(e)), this.findAll = !1, this.remaining = new Set(e), this.wanted = new Set(e)), this.unfinishedMultiSegment = !1; 1035 } 1036 findAppSegments(e = 0, t) { 1037 var _this8 = this; 1038 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1039 _this8.setupSegmentFinderArgs(t); 1040 let { 1041 file: i, 1042 findAll: n, 1043 wanted: s, 1044 remaining: r 1045 } = _this8; 1046 if (!n && _this8.file.chunked && (n = Array.from(s).some(e => { 1047 let t = T.get(e), 1048 i = _this8.options[e]; 1049 return t.multiSegment && i.multiSegment; 1050 }), n && (yield _this8.file.readWhole())), e = _this8.findAppSegmentsInRange(e, i.byteLength), !_this8.options.onlyTiff && i.chunked) { 1051 let t = !1; 1052 for (; r.size > 0 && !t && (i.canReadNextChunk || _this8.unfinishedMultiSegment);) { 1053 let { 1054 nextChunkOffset: n 1055 } = i, 1056 s = _this8.appSegments.some(e => !_this8.file.available(e.offset || e.start, e.length || e.size)); 1057 if (t = e > n && !s ? !(yield i.readNextChunk(e)) : !(yield i.readNextChunk(n)), void 0 === (e = _this8.findAppSegmentsInRange(e, i.byteLength))) return; 1058 } 1059 } 1060 })(); 1061 } 1062 findAppSegmentsInRange(e, t) { 1063 t -= 2; 1064 let i, 1065 n, 1066 s, 1067 r, 1068 a, 1069 o, 1070 { 1071 file: l, 1072 findAll: h, 1073 wanted: u, 1074 remaining: c, 1075 options: f 1076 } = this; 1077 for (; e < t; e++) if (255 === l.getUint8(e)) if (i = l.getUint8(e + 1), oe(i)) { 1078 if (n = l.getUint16(e + 2), s = le(l, e, n), s && u.has(s) && (r = T.get(s), a = r.findPosition(l, e), o = f[s], a.type = s, this.appSegments.push(a), !h && (r.multiSegment && o.multiSegment ? (this.unfinishedMultiSegment = a.chunkNumber < a.chunkCount, this.unfinishedMultiSegment || c.delete(s)) : c.delete(s), 0 === c.size))) break; 1079 f.recordUnknownSegments && (a = re.findPosition(l, e), a.marker = i, this.unknownSegments.push(a)), e += n + 1; 1080 } else if (ae(i)) { 1081 if (n = l.getUint16(e + 2), 218 === i && !1 !== f.stopAfterSos) return; 1082 f.recordJpegSegments && this.jpegSegments.push({ 1083 offset: e, 1084 length: n, 1085 marker: i 1086 }), e += n + 1; 1087 } 1088 return e; 1089 } 1090 mergeMultiSegments() { 1091 if (!this.appSegments.some(e => e.multiSegment)) return; 1092 let e = function (e, t) { 1093 let i, 1094 n, 1095 s, 1096 r = new Map(); 1097 for (let a = 0; a < e.length; a++) i = e[a], n = i[t], r.has(n) ? s = r.get(n) : r.set(n, s = []), s.push(i); 1098 return Array.from(r); 1099 }(this.appSegments, "type"); 1100 this.mergedAppSegments = e.map(([e, t]) => { 1101 let i = T.get(e, this.options); 1102 if (i.handleMultiSegments) { 1103 return { 1104 type: e, 1105 chunk: i.handleMultiSegments(t) 1106 }; 1107 } 1108 return t[0]; 1109 }); 1110 } 1111 getSegment(e) { 1112 return this.appSegments.find(t => t.type === e); 1113 } 1114 getOrFindSegment(e) { 1115 var _this9 = this; 1116 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1117 let t = _this9.getSegment(e); 1118 return void 0 === t && (yield _this9.findAppSegments(0, [e]), t = _this9.getSegment(e)), t; 1119 })(); 1120 } 1121} 1122c(he, "type", "jpeg"), w.set("jpeg", he); 1123const ue = [void 0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, 4]; 1124class ce extends re { 1125 parseHeader() { 1126 var e = this.chunk.getUint16(); 1127 18761 === e ? this.le = !0 : 19789 === e && (this.le = !1), this.chunk.le = this.le, this.headerParsed = !0; 1128 } 1129 parseTags(e, t, i = new Map()) { 1130 let { 1131 pick: n, 1132 skip: s 1133 } = this.options[t]; 1134 n = new Set(n); 1135 let r = n.size > 0, 1136 a = 0 === s.size, 1137 o = this.chunk.getUint16(e);
1138 e += 2; 1139 for (let l = 0; l < o; l++) { 1140 let o = this.chunk.getUint16(e); 1141 if (r) { 1142 if (n.has(o) && (i.set(o, this.parseTag(e, o, t)), n.delete(o), 0 === n.size)) break; 1143 } else !a && s.has(o) || i.set(o, this.parseTag(e, o, t)); 1144 e += 12; 1145 } 1146 return i; 1147 } 1148 parseTag(e, t, i) { 1149 let { 1150 chunk: n 1151 } = this, 1152 s = n.getUint16(e + 2), 1153 r = n.getUint32(e + 4), 1154 a = ue[s]; 1155 if (a * r <= 4 ? e += 8 : e = n.getUint32(e + 8), (s < 1 || s > 13) && g(`Invalid TIFF value type. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${s}, offset ${e}`), e > n.byteLength && g(`Invalid TIFF value offset. block: ${i.toUpperCase()}, tag: ${t.toString(16)}, type: ${s}, offset ${e} is outside of chunk size ${n.byteLength}`), 1 === s) return n.getUint8Array(e, r); 1156 if (2 === s) return m(n.getString(e, r)); 1157 if (7 === s) return n.getUint8Array(e, r); 1158 if (1 === r) return this.parseTagValue(s, e); 1159 { 1160 let t = new (function (e) { 1161 switch (e) { 1162 case 1: 1163 return Uint8Array; 1164 case 3: 1165 return Uint16Array; 1166 case 4: 1167 return Uint32Array; 1168 case 5: 1169 return Array; 1170 case 6: 1171 return Int8Array; 1172 case 8: 1173 return Int16Array; 1174 case 9: 1175 return Int32Array; 1176 case 10: 1177 return Array; 1178 case 11: 1179 return Float32Array; 1180 case 12: 1181 return Float64Array; 1182 default: 1183 return Array; 1184 } 1185 }(s))(r), 1186 i = a; 1187 for (let n = 0; n < r; n++) t[n] = this.parseTagValue(s, e), e += i; 1188 return t; 1189 } 1190 } 1191 parseTagValue(e, t) { 1192 let { 1193 chunk: i 1194 } = this; 1195 switch (e) { 1196 case 1: 1197 return i.getUint8(t); 1198 case 3: 1199 return i.getUint16(t); 1200 case 4: 1201 return i.getUint32(t); 1202 case 5: 1203 return i.getUint32(t) / i.getUint32(t + 4); 1204 case 6: 1205 return i.getInt8(t); 1206 case 8: 1207 return i.getInt16(t); 1208 case 9: 1209 return i.getInt32(t); 1210 case 10: 1211 return i.getInt32(t) / i.getInt32(t + 4); 1212 case 11: 1213 return i.getFloat(t); 1214 case 12: 1215 return i.getDouble(t); 1216 case 13: 1217 return i.getUint32(t); 1218 default: 1219 g(`Invalid tiff type ${e}`); 1220 } 1221 } 1222} 1223class fe extends ce { 1224 static canHandle(e, t) { 1225 return 225 === e.getUint8(t + 1) && 1165519206 === e.getUint32(t + 4) && 0 === e.getUint16(t + 8); 1226 } 1227 parse() { 1228 var _this10 = this; 1229 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1230 _this10.parseHeader(); 1231 let { 1232 options: e 1233 } = _this10; 1234 return e.ifd0.enabled && (yield _this10.parseIfd0Block()), e.exif.enabled && (yield _this10.safeParse("parseExifBlock")), e.gps.enabled && (yield _this10.safeParse("parseGpsBlock")), e.interop.enabled && (yield _this10.safeParse("parseInteropBlock")), e.ifd1.enabled && (yield _this10.safeParse("parseThumbnailBlock")), _this10.createOutput(); 1235 })(); 1236 } 1237 safeParse(e) { 1238 let t = this[e](); 1239 return void 0 !== t.catch && (t = t.catch(this.handleError)), t; 1240 } 1241 findIfd0Offset() { 1242 void 0 === this.ifd0Offset && (this.ifd0Offset = this.chunk.getUint32(4)); 1243 } 1244 findIfd1Offset() { 1245 if (void 0 === this.ifd1Offset) { 1246 this.findIfd0Offset(); 1247 let e = this.chunk.getUint16(this.ifd0Offset), 1248 t = this.ifd0Offset + 2 + 12 * e; 1249 this.ifd1Offset = this.chunk.getUint32(t); 1250 } 1251 } 1252 parseBlock(e, t) { 1253 let i = new Map(); 1254 return this[t] = i, this.parseTags(e, t, i), i; 1255 } 1256 parseIfd0Block() { 1257 var _this11 = this; 1258 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1259 if (_this11.ifd0) return; 1260 let { 1261 file: e 1262 } = _this11; 1263 _this11.findIfd0Offset(), _this11.ifd0Offset < 8 && g("Malformed EXIF data"), !e.chunked && _this11.ifd0Offset > e.byteLength && g(`IFD0 offset points to outside of file.\nthis.ifd0Offset: ${_this11.ifd0Offset}, file.byteLength: ${e.byteLength}`), e.tiff && (yield e.ensureChunk(_this11.ifd0Offset, S(_this11.options))); 1264 let t = _this11.parseBlock(_this11.ifd0Offset, "ifd0"); 1265 return 0 !== t.size ? (_this11.exifOffset = t.get(34665), _this11.interopOffset = t.get(40965), _this11.gpsOffset = t.get(34853), _this11.xmp = t.get(700), _this11.iptc = t.get(33723), _this11.icc = t.get(34675), _this11.options.sanitize && (t.delete(34665), t.delete(40965), t.delete(34853), t.delete(700), t.delete(33723), t.delete(34675)), t) : void 0; 1266 })(); 1267 } 1268 parseExifBlock() { 1269 var _this12 = this; 1270 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1271 if (_this12.exif) return; 1272 if (_this12.ifd0 || (yield _this12.parseIfd0Block()), void 0 === _this12.exifOffset) return; 1273 _this12.file.tiff && (yield _this12.file.ensureChunk(_this12.exifOffset, S(_this12.options))); 1274 let e = _this12.parseBlock(_this12.exifOffset, "exif"); 1275 return _this12.interopOffset || (_this12.interopOffset = e.get(40965)), _this12.makerNote = e.get(37500), _this12.userComment = e.get(37510), _this12.options.sanitize && (e.delete(40965), e.delete(37500), e.delete(37510)), _this12.unpack(e, 41728), _this12.unpack(e, 41729), e; 1276 })(); 1277 } 1278 unpack(e, t) { 1279 let i = e.get(t); 1280 i && 1 === i.length && e.set(t, i[0]); 1281 } 1282 parseGpsBlock() { 1283 var _this13 = this; 1284 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1285 if (_this13.gps) return; 1286 if (_this13.ifd0 || (yield _this13.parseIfd0Block()), void 0 === _this13.gpsOffset) return; 1287 let e = _this13.parseBlock(_this13.gpsOffset, "gps"); 1288 return e && e.has(2) && e.has(4) && (e.set("latitude", de(...e.get(2), e.get(1))), e.set("longitude", de(...e.get(4), e.get(3)))), e; 1289 })(); 1290 } 1291 parseInteropBlock() { 1292 var _this14 = this; 1293 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1294 if (!_this14.interop && (_this14.ifd0 || (yield _this14.parseIfd0Block()), void 0 !== _this14.interopOffset || _this14.exif || (yield _this14.parseExifBlock()), void 0 !== _this14.interopOffset)) return _this14.parseBlock(_this14.interopOffset, "interop"); 1295 })(); 1296 } 1297 parseThumbnailBlock(e = !1) { 1298 var _this15 = this; 1299 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1300 if (!_this15.ifd1 && !_this15.ifd1Parsed && (!_this15.options.mergeOutput || e)) return _this15.findIfd1Offset(), _this15.ifd1Offset > 0 && (_this15.parseBlock(_this15.ifd1Offset, "ifd1"), _this15.ifd1Parsed = !0), _this15.ifd1; 1301 })(); 1302 } 1303 extractThumbnail() { 1304 var _this16 = this; 1305 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1306 if (_this16.headerParsed || _this16.parseHeader(), _this16.ifd1Parsed || (yield _this16.parseThumbnailBlock(!0)), void 0 === _this16.ifd1) return; 1307 let e = _this16.ifd1.get(513), 1308 t = _this16.ifd1.get(514); 1309 return _this16.chunk.getUint8Array(e, t); 1310 })(); 1311 } 1312 get image() { 1313 return this.ifd0; 1314 } 1315 get thumbnail() { 1316 return this.ifd1; 1317 } 1318 createOutput() { 1319 let e, 1320 t, 1321 i, 1322 n = {}; 1323 for (t of H) if (e = this[t], !p(e)) if (i = this.canTranslate ? this.translateBlock(e, t) : Object.fromEntries(e), this.options.mergeOutput) { 1324 if ("ifd1" === t) continue; 1325 Object.assign(n, i); 1326 } else n[t] = i; 1327 return this.makerNote && (n.makerNote = this.makerNote), this.userComment && (n.userComment = this.userComment), n; 1328 } 1329 assignToOutput(e, t) { 1330 if (this.globalOptions.mergeOutput) Object.assign(e, t);else for (let [i, n] of Object.entries(t)) this.assignObjectToOutput(e, i, n); 1331 } 1332} 1333function de(e, t, i, n) { 1334 var s = e + t / 60 + i / 3600; 1335 return "S" !== n && "W" !== n || (s *= -1), s; 1336} 1337c(fe, "type", "tiff"), c(fe, "headerLength", 10), T.set("tiff", fe); 1338var pe = Object.freeze({ 1339 __proto__: null, 1340 default: ne, 1341 Exifr: te, 1342 fileParsers: w, 1343 segmentParsers: T, 1344 fileReaders: A, 1345 tagKeys: E, 1346 tagValues: B, 1347 tagRevivers: N, 1348 createDictionary: U, 1349 extendDictionary: F, 1350 fetchUrlAsArrayBuffer: M, 1351 readBlobAsArrayBuffer: R,
1352 chunkedProps: G, 1353 otherSegments: V, 1354 segments: z, 1355 tiffBlocks: H, 1356 segmentsAndBlocks: j, 1357 tiffExtractables: W, 1358 inheritables: K, 1359 allFormatters: X, 1360 Options: q, 1361 parse: ie 1362}); 1363const ge = { 1364 ifd0: !1, 1365 ifd1: !1, 1366 exif: !1, 1367 gps: !1, 1368 interop: !1, 1369 sanitize: !1, 1370 reviveValues: !0, 1371 translateKeys: !1, 1372 translateValues: !1, 1373 mergeOutput: !1 1374 }, 1375 me = Object.assign({}, ge, { 1376 firstChunkSize: 4e4, 1377 gps: [1, 2, 3, 4] 1378 }); 1379function Se(_x15) { 1380 return _Se.apply(this, arguments); 1381} 1382function _Se() { 1383 _Se = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (e) { 1384 let t = new te(me); 1385 yield t.read(e); 1386 let i = yield t.parse(); 1387 if (i && i.gps) { 1388 let { 1389 latitude: e, 1390 longitude: t 1391 } = i.gps; 1392 return { 1393 latitude: e, 1394 longitude: t 1395 }; 1396 } 1397 }); 1398 return _Se.apply(this, arguments); 1399} 1400const Ce = Object.assign({}, ge, { 1401 tiff: !1, 1402 ifd1: !0, 1403 mergeOutput: !1 1404}); 1405function ye(_x16) { 1406 return _ye.apply(this, arguments); 1407} 1408function _ye() { 1409 _ye = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (e) { 1410 let t = new te(Ce); 1411 yield t.read(e); 1412 let i = yield t.extractThumbnail(); 1413 return i && a ? s.from(i) : i; 1414 }); 1415 return _ye.apply(this, arguments); 1416} 1417function be(_x17) { 1418 return _be.apply(this, arguments); 1419} 1420function _be() { 1421 _be = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (e) { 1422 let t = yield this.thumbnail(e); 1423 if (void 0 !== t) { 1424 let e = new Blob([t]); 1425 return URL.createObjectURL(e); 1426 } 1427 }); 1428 return _be.apply(this, arguments); 1429} 1430const Ie = Object.assign({}, ge, { 1431 firstChunkSize: 4e4, 1432 ifd0: [274] 1433}); 1434function Pe(_x18) { 1435 return _Pe.apply(this, arguments); 1436} 1437function _Pe() { 1438 _Pe = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (e) { 1439 let t = new te(Ie); 1440 yield t.read(e); 1441 let i = yield t.parse(); 1442 if (i && i.ifd0) return i.ifd0[274]; 1443 }); 1444 return _Pe.apply(this, arguments); 1445} 1446const ke = Object.freeze({ 1447 1: { 1448 dimensionSwapped: !1, 1449 scaleX: 1, 1450 scaleY: 1, 1451 deg: 0, 1452 rad: 0 1453 }, 1454 2: { 1455 dimensionSwapped: !1, 1456 scaleX: -1, 1457 scaleY: 1, 1458 deg: 0, 1459 rad: 0 1460 }, 1461 3: { 1462 dimensionSwapped: !1, 1463 scaleX: 1, 1464 scaleY: 1, 1465 deg: 180, 1466 rad: 180 * Math.PI / 180 1467 }, 1468 4: { 1469 dimensionSwapped: !1, 1470 scaleX: -1, 1471 scaleY: 1, 1472 deg: 180, 1473 rad: 180 * Math.PI / 180 1474 }, 1475 5: { 1476 dimensionSwapped: !0, 1477 scaleX: 1, 1478 scaleY: -1, 1479 deg: 90, 1480 rad: 90 * Math.PI / 180 1481 }, 1482 6: { 1483 dimensionSwapped: !0, 1484 scaleX: 1, 1485 scaleY: 1, 1486 deg: 90, 1487 rad: 90 * Math.PI / 180 1488 }, 1489 7: { 1490 dimensionSwapped: !0, 1491 scaleX: 1, 1492 scaleY: -1, 1493 deg: 270, 1494 rad: 270 * Math.PI / 180 1495 }, 1496 8: { 1497 dimensionSwapped: !0, 1498 scaleX: 1, 1499 scaleY: 1, 1500 deg: 270, 1501 rad: 270 * Math.PI / 180 1502 } 1503}); 1504let we = !0, 1505 Te = !0; 1506if ("object" == typeof navigator) { 1507 let e = navigator.userAgent; 1508 if (e.includes("iPad") || e.includes("iPhone")) { 1509 let t = e.match(/OS (\d+)_(\d+)/); 1510 if (t) { 1511 let [, e, i] = t, 1512 n = Number(e) + .1 * Number(i); 1513 we = n < 13.4, Te = !1; 1514 } 1515 } else if (e.includes("OS X 10")) { 1516 let [, t] = e.match(/OS X 10[_.](\d+)/); 1517 we = Te = Number(t) < 15; 1518 } 1519 if (e.includes("Chrome/")) { 1520 let [, t] = e.match(/Chrome\/(\d+)/); 1521 we = Te = Number(t) < 81; 1522 } else if (e.includes("Firefox/")) { 1523 let [, t] = e.match(/Firefox\/(\d+)/); 1524 we = Te = Number(t) < 77; 1525 } 1526} 1527function Ae(_x19) { 1528 return _Ae.apply(this, arguments); 1529} 1530function _Ae() { 1531 _Ae = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (e) { 1532 let t = yield Pe(e); 1533 return Object.assign({ 1534 canvas: we, 1535 css: Te 1536 }, ke[t]); 1537 }); 1538 return _Ae.apply(this, arguments); 1539} 1540class De extends I { 1541 constructor(...e) { 1542 super(...e), c(this, "ranges", new Oe()), 0 !== this.byteLength && this.ranges.add(0, this.byteLength); 1543 } 1544 _tryExtend(e, t, i) { 1545 if (0 === e && 0 === this.byteLength && i) { 1546 let e = new DataView(i.buffer || i, i.byteOffset, i.byteLength); 1547 this._swapDataView(e); 1548 } else { 1549 let i = e + t; 1550 if (i > this.byteLength) { 1551 let { 1552 dataView: e 1553 } = this._extend(i); 1554 this._swapDataView(e); 1555 } 1556 } 1557 } 1558 _extend(e) { 1559 let t; 1560 t = a ? s.allocUnsafe(e) : new Uint8Array(e); 1561 let i = new DataView(t.buffer, t.byteOffset, t.byteLength); 1562 return t.set(new Uint8Array(this.buffer, this.byteOffset, this.byteLength), 0), { 1563 uintView: t, 1564 dataView: i 1565 }; 1566 } 1567 subarray(e, t, i = !1) { 1568 return t = t || this._lengthToEnd(e), i && this._tryExtend(e, t), this.ranges.add(e, t), super.subarray(e, t); 1569 } 1570 set(e, t, i = !1) { 1571 i && this._tryExtend(t, e.byteLength, e); 1572 let n = super.set(e, t); 1573 return this.ranges.add(t, n.byteLength), n; 1574 } 1575 ensureChunk(e, t) { 1576 var _this17 = this; 1577 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1578 _this17.chunked && (_this17.ranges.available(e, t) || (yield _this17.readChunk(e, t))); 1579 })(); 1580 } 1581 available(e, t) { 1582 return this.ranges.available(e, t); 1583 } 1584} 1585class Oe { 1586 constructor() { 1587 c(this, "list", []); 1588 } 1589 get length() { 1590 return this.list.length; 1591 } 1592 add(e, t, i = 0) { 1593 let n = e + t, 1594 s = this.list.filter(t => xe(e, t.offset, n) || xe(e, t.end, n)); 1595 if (s.length > 0) { 1596 e = Math.min(e, ...s.map(e => e.offset)), n = Math.max(n, ...s.map(e => e.end)), t = n - e; 1597 let i = s.shift(); 1598 i.offset = e, i.length = t, i.end = n, this.list = this.list.filter(e => !s.includes(e)); 1599 } else this.list.push({ 1600 offset: e, 1601 length: t, 1602 end: n 1603 }); 1604 } 1605 available(e, t) { 1606 let i = e + t; 1607 return this.list.some(t => t.offset <= e && i <= t.end); 1608 } 1609} 1610function xe(e, t, i) { 1611 return e <= t && t <= i; 1612} 1613class ve extends De { 1614 constructor(e, t) { 1615 super(0), c(this, "chunksRead", 0), this.input = e, this.options = t; 1616 } 1617 readWhole() { 1618 var _this18 = this; 1619 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1620 _this18.chunked = !1, yield _this18.readChunk(_this18.nextChunkOffset); 1621 })(); 1622 }
1623 readChunked() { 1624 var _this19 = this; 1625 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1626 _this19.chunked = !0, yield _this19.readChunk(0, _this19.options.firstChunkSize); 1627 })(); 1628 } 1629 readNextChunk(e = this.nextChunkOffset) { 1630 var _this20 = this; 1631 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1632 if (_this20.fullyRead) return _this20.chunksRead++, !1; 1633 let t = _this20.options.chunkSize, 1634 i = yield _this20.readChunk(e, t); 1635 return !!i && i.byteLength === t; 1636 })(); 1637 } 1638 readChunk(e, t) { 1639 var _this21 = this; 1640 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1641 if (_this21.chunksRead++, 0 !== (t = _this21.safeWrapAddress(e, t))) return _this21._readChunk(e, t); 1642 })(); 1643 } 1644 safeWrapAddress(e, t) { 1645 return void 0 !== this.size && e + t > this.size ? Math.max(0, this.size - e) : t; 1646 } 1647 get nextChunkOffset() { 1648 if (0 !== this.ranges.list.length) return this.ranges.list[0].length; 1649 } 1650 get canReadNextChunk() { 1651 return this.chunksRead < this.options.chunkLimit; 1652 } 1653 get fullyRead() { 1654 return void 0 !== this.size && this.nextChunkOffset === this.size; 1655 } 1656 read() { 1657 return this.options.chunked ? this.readChunked() : this.readWhole(); 1658 } 1659 close() {} 1660} 1661A.set("blob", class extends ve { 1662 readWhole() { 1663 var _this22 = this; 1664 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1665 _this22.chunked = !1; 1666 let e = yield R(_this22.input); 1667 _this22._swapArrayBuffer(e); 1668 })(); 1669 } 1670 readChunked() { 1671 return this.chunked = !0, this.size = this.input.size, super.readChunked(); 1672 } 1673 _readChunk(e, t) { 1674 var _this23 = this; 1675 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1676 let i = t ? e + t : void 0, 1677 n = _this23.input.slice(e, i), 1678 s = yield R(n); 1679 return _this23.set(s, e, !0); 1680 })(); 1681 } 1682}); 1683var Me = Object.freeze({ 1684 __proto__: null, 1685 default: pe, 1686 Exifr: te, 1687 fileParsers: w, 1688 segmentParsers: T, 1689 fileReaders: A, 1690 tagKeys: E, 1691 tagValues: B, 1692 tagRevivers: N, 1693 createDictionary: U, 1694 extendDictionary: F, 1695 fetchUrlAsArrayBuffer: M, 1696 readBlobAsArrayBuffer: R, 1697 chunkedProps: G, 1698 otherSegments: V, 1699 segments: z, 1700 tiffBlocks: H, 1701 segmentsAndBlocks: j, 1702 tiffExtractables: W, 1703 inheritables: K, 1704 allFormatters: X, 1705 Options: q, 1706 parse: ie, 1707 gpsOnlyOptions: me, 1708 gps: Se, 1709 thumbnailOnlyOptions: Ce, 1710 thumbnail: ye, 1711 thumbnailUrl: be, 1712 orientationOnlyOptions: Ie, 1713 orientation: Pe, 1714 rotations: ke, 1715 get rotateCanvas() { 1716 return we; 1717 }, 1718 get rotateCss() { 1719 return Te; 1720 }, 1721 rotation: Ae 1722}); 1723A.set("url", class extends ve { 1724 readWhole() { 1725 var _this24 = this; 1726 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1727 _this24.chunked = !1; 1728 let e = yield M(_this24.input); 1729 e instanceof ArrayBuffer ? _this24._swapArrayBuffer(e) : e instanceof Uint8Array && _this24._swapBuffer(e); 1730 })(); 1731 } 1732 _readChunk(e, t) { 1733 var _this25 = this; 1734 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1735 let i = t ? e + t - 1 : void 0, 1736 n = _this25.options.httpHeaders || {}; 1737 (e || i) && (n.range = `bytes=${[e, i].join("-")}`); 1738 let s = yield h(_this25.input, { 1739 headers: n 1740 }), 1741 r = yield s.arrayBuffer(), 1742 a = r.byteLength; 1743 if (416 !== s.status) return a !== t && (_this25.size = e + a), _this25.set(r, e, !0); 1744 })(); 1745 } 1746}); 1747I.prototype.getUint64 = function (e) { 1748 let t = this.getUint32(e), 1749 i = this.getUint32(e + 4); 1750 return t < 1048575 ? t << 32 | i : void 0 !== typeof r ? (console.warn("Using BigInt because of type 64uint but JS can only handle 53b numbers."), r(t) << r(32) | r(i)) : void g("Trying to read 64b value but JS can only handle 53b numbers."); 1751}; 1752class Re extends se { 1753 parseBoxes(e = 0) { 1754 let t = []; 1755 for (; e < this.file.byteLength - 4;) { 1756 let i = this.parseBoxHead(e); 1757 if (t.push(i), 0 === i.length) break; 1758 e += i.length; 1759 } 1760 return t; 1761 } 1762 parseSubBoxes(e) { 1763 e.boxes = this.parseBoxes(e.start); 1764 } 1765 findBox(e, t) { 1766 return void 0 === e.boxes && this.parseSubBoxes(e), e.boxes.find(e => e.kind === t); 1767 } 1768 parseBoxHead(e) { 1769 let t = this.file.getUint32(e), 1770 i = this.file.getString(e + 4, 4), 1771 n = e + 8; 1772 return 1 === t && (t = this.file.getUint64(e + 8), n += 8), { 1773 offset: e, 1774 length: t, 1775 kind: i, 1776 start: n 1777 }; 1778 } 1779 parseBoxFullHead(e) { 1780 if (void 0 !== e.version) return; 1781 let t = this.file.getUint32(e.start);
1782 e.version = t >> 24, e.start += 4; 1783 } 1784} 1785class Le extends Re { 1786 static canHandle(e, t) { 1787 if (0 !== t) return !1; 1788 let i = e.getUint16(2); 1789 if (i > 50) return !1; 1790 let n = 16, 1791 s = []; 1792 for (; n < i;) s.push(e.getString(n, 4)), n += 4; 1793 return s.includes(this.type); 1794 } 1795 parse() { 1796 var _this26 = this; 1797 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1798 let e = _this26.file.getUint32(0), 1799 t = _this26.parseBoxHead(e); 1800 for (; "meta" !== t.kind;) e += t.length, yield _this26.file.ensureChunk(e, 16), t = _this26.parseBoxHead(e); 1801 yield _this26.file.ensureChunk(t.offset, t.length), _this26.parseBoxFullHead(t), _this26.parseSubBoxes(t), _this26.options.icc.enabled && (yield _this26.findIcc(t)), _this26.options.tiff.enabled && (yield _this26.findExif(t)); 1802 })(); 1803 } 1804 registerSegment(e, t, i) { 1805 var _this27 = this; 1806 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1807 yield _this27.file.ensureChunk(t, i); 1808 let n = _this27.file.subarray(t, i); 1809 _this27.createParser(e, n); 1810 })(); 1811 } 1812 findIcc(e) { 1813 var _this28 = this; 1814 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1815 let t = _this28.findBox(e, "iprp"); 1816 if (void 0 === t) return; 1817 let i = _this28.findBox(t, "ipco"); 1818 if (void 0 === i) return; 1819 let n = _this28.findBox(i, "colr"); 1820 void 0 !== n && (yield _this28.registerSegment("icc", n.offset + 12, n.length)); 1821 })(); 1822 } 1823 findExif(e) { 1824 var _this29 = this; 1825 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 1826 let t = _this29.findBox(e, "iinf"); 1827 if (void 0 === t) return; 1828 let i = _this29.findBox(e, "iloc"); 1829 if (void 0 === i) return; 1830 let n = _this29.findExifLocIdInIinf(t), 1831 s = _this29.findExtentInIloc(i, n); 1832 if (void 0 === s) return; 1833 let [r, a] = s; 1834 yield _this29.file.ensureChunk(r, a); 1835 let o = 4 + _this29.file.getUint32(r); 1836 r += o, a -= o, yield _this29.registerSegment("tiff", r, a); 1837 })(); 1838 } 1839 findExifLocIdInIinf(e) { 1840 this.parseBoxFullHead(e); 1841 let t, 1842 i, 1843 n, 1844 s, 1845 r = e.start, 1846 a = this.file.getUint16(r); 1847 for (r += 2; a--;) { 1848 if (t = this.parseBoxHead(r), this.parseBoxFullHead(t), i = t.start, t.version >= 2 && (n = 3 === t.version ? 4 : 2, s = this.file.getString(i + n + 2, 4), "Exif" === s)) return this.file.getUintBytes(i, n); 1849 r += t.length; 1850 } 1851 } 1852 get8bits(e) { 1853 let t = this.file.getUint8(e); 1854 return [t >> 4, 15 & t]; 1855 } 1856 findExtentInIloc(e, t) { 1857 this.parseBoxFullHead(e); 1858 let i = e.start, 1859 [n, s] = this.get8bits(i++), 1860 [r, a] = this.get8bits(i++), 1861 o = 2 === e.version ? 4 : 2, 1862 l = 1 === e.version || 2 === e.version ? 2 : 0, 1863 h = a + n + s, 1864 u = 2 === e.version ? 4 : 2, 1865 c = this.file.getUintBytes(i, u); 1866 for (i += u; c--;) { 1867 let e = this.file.getUintBytes(i, o); 1868 i += o + l + 2 + r; 1869 let u = this.file.getUint16(i); 1870 if (i += 2, e === t) return u > 1 && console.warn("ILOC box has more than one extent but we're only processing one\nPlease create an issue at https://github.com/MikeKovarik/exifr with this file"), [this.file.getUintBytes(i + a, n), this.file.getUintBytes(i + a + n, s)]; 1871 i += u * h; 1872 } 1873 } 1874} 1875class Ue extends Le {} 1876c(Ue, "type", "heic"); 1877class Fe extends Le {} 1878c(Fe, "type", "avif"), w.set("heic", Ue), w.set("avif", Fe), U(E, ["ifd0", "ifd1"], [[256, "ImageWidth"], [257, "ImageHeight"], [258, "BitsPerSample"], [259, "Compression"], [262, "PhotometricInterpretation"], [270, "ImageDescription"], [271, "Make"], [272, "Model"], [273, "StripOffsets"], [274, "Orientation"], [277, "SamplesPerPixel"], [278, "RowsPerStrip"], [279, "StripByteCounts"], [282, "XResolution"], [283, "YResolution"], [284, "PlanarConfiguration"], [296, "ResolutionUnit"], [301, "TransferFunction"], [305, "Software"], [306, "ModifyDate"], [315, "Artist"], [316, "HostComputer"], [317, "Predictor"], [318, "WhitePoint"], [319, "PrimaryChromaticities"], [513, "ThumbnailOffset"], [514, "ThumbnailLength"], [529, "YCbCrCoefficients"], [530, "YCbCrSubSampling"], [531, "YCbCrPositioning"], [532, "ReferenceBlackWhite"], [700, "ApplicationNotes"], [33432, "Copyright"], [33723, "IPTC"], [34665, "ExifIFD"], [34675, "ICC"], [34853, "GpsIFD"], [330, "
vendor: 13,968 bytes, lines 1878-2212
1878SubIFD"], [40965, "InteropIFD"], [40091, "XPTitle"], [40092, "XPComment"], [40093, "XPAuthor"], [40094, "XPKeywords"], [40095, "XPSubject"]]), U(E, "exif", [[33434, "ExposureTime"], [33437, "FNumber"], [34850, "ExposureProgram"], [34852, "SpectralSensitivity"], [34855, "ISO"], [34858, "TimeZoneOffset"], [34859, "SelfTimerMode"], [34864, "SensitivityType"], [34865, "StandardOutputSensitivity"], [34866, "RecommendedExposureIndex"], [34867, "ISOSpeed"], [34868, "ISOSpeedLatitudeyyy"], [34869, "ISOSpeedLatitudezzz"], [36864, "ExifVersion"], [36867, "DateTimeOriginal"], [36868, "CreateDate"], [36873, "GooglePlusUploadCode"], [36880, "OffsetTime"], [36881, "OffsetTimeOriginal"], [36882, "OffsetTimeDigitized"], [37121, "ComponentsConfiguration"], [37122, "CompressedBitsPerPixel"], [37377, "ShutterSpeedValue"], [37378, "ApertureValue"], [37379, "BrightnessValue"], [37380, "ExposureCompensation"], [37381, "MaxApertureValue"], [37382, "SubjectDistance"], [37383, "MeteringMode"], [37384, "LightSource"], [37385, "Flash"], [37386, "FocalLength"], [37393, "ImageNumber"], [37394, "SecurityClassification"], [37395, "ImageHistory"], [37396, "SubjectArea"], [37500, "MakerNote"], [37510, "UserComment"], [37520, "SubSecTime"], [37521, "SubSecTimeOriginal"], [37522, "SubSecTimeDigitized"], [37888, "AmbientTemperature"], [37889, "Humidity"], [37890, "Pressure"], [37891, "WaterDepth"], [37892, "Acceleration"], [37893, "CameraElevationAngle"], [40960, "FlashpixVersion"], [40961, "ColorSpace"], [40962, "ExifImageWidth"], [40963, "ExifImageHeight"], [40964, "RelatedSoundFile"], [41483, "FlashEnergy"], [41486, "FocalPlaneXResolution"], [41487, "FocalPlaneYResolution"], [41488, "FocalPlaneResolutionUnit"], [41492, "SubjectLocation"], [41493, "ExposureIndex"], [41495, "SensingMethod"], [41728, "FileSource"], [41729, "SceneType"], [41730, "CFAPattern"], [41985, "CustomRendered"], [41986, "ExposureMode"], [41987, "WhiteBalance"], [41988, "DigitalZoomRatio"], [41989, "FocalLengthIn35mmFormat"], [41990, "SceneCaptureType"], [41991, "GainControl"], [41992, "Contrast"], [41993, "Saturation"], [41994, "Sharpness"], [41996, "SubjectDistanceRange"], [42016, "ImageUniqueID"], [42032, "OwnerName"], [42033, "SerialNumber"], [42034, "LensInfo"], [42035, "LensMake"], [42036, "LensModel"], [42037, "LensSerialNumber"], [42080, "CompositeImage"], [42081, "CompositeImageCount"], [42082, "CompositeImageExposureTimes"], [42240, "Gamma"], [59932, "Padding"], [59933, "OffsetSchema"], [65e3, "OwnerName"], [65001, "SerialNumber"], [65002, "Lens"], [65100, "RawFile"], [65101, "Converter"], [65102, "WhiteBalance"], [65105, "Exposure"], [65106, "Shadows"], [65107, "Brightness"], [65108, "Contrast"], [65109, "Saturation"], [65110, "Sharpness"], [65111, "Smoothness"], [65112, "MoireFilter"], [40965, "InteropIFD"]]), U(E, "gps", [[0, "GPSVersionID"], [1, "GPSLatitudeRef"], [2, "GPSLatitude"], [3, "GPSLongitudeRef"], [4, "GPSLongitude"], [5, "GPSAltitudeRef"], [6, "GPSAltitude"], [7, "GPSTimeStamp"], [8, "GPSSatellites"], [9, "GPSStatus"], [10, "GPSMeasureMode"], [11, "GPSDOP"], [12, "GPSSpeedRef"], [13, "GPSSpeed"], [14, "GPSTrackRef"], [15, "GPSTrack"], [16, "GPSImgDirectionRef"], [17, "GPSImgDirection"], [18, "GPSMapDatum"], [19, "GPSDestLatitudeRef"], [20, "GPSDestLatitude"], [21, "GPSDestLongitudeRef"], [22, "GPSDestLongitude"], [23, "GPSDestBearingRef"], [24, "GPSDestBearing"], [25, "GPSDestDistanceRef"], [26, "GPSDestDistance"], [27, "GPSProcessingMethod"], [28, "GPSAreaInformation"], [29, "GPSDateStamp"], [30, "GPSDifferential"], [31, "GPSHPositioningError"]]), U(B, ["ifd0", "ifd1"], [[274, { 1879 1: "Horizontal (normal)", 1880 2: "Mirror horizontal", 1881 3: "Rotate 180", 1882 4: "Mirror vertical", 1883 5: "Mirror horizontal and rotate 270 CW", 1884 6: "Rotate 90 CW", 1885 7: "Mirror horizontal and rotate 90 CW", 1886 8: "Rotate 270 CW" 1887}], [296, { 1888 1: "None", 1889 2: "inches", 1890 3: "cm" 1891}]]); 1892let Ee = U(B, "exif", [[34850, { 1893 0: "Not defined", 1894 1: "Manual", 1895 2: "Normal program", 1896 3: "Aperture priority", 1897 4: "Shutter priority", 1898 5: "Creative program", 1899 6: "Action program", 1900 7: "Portrait mode", 1901 8: "Landscape mode" 1902}], [37121, { 1903 0: "-", 1904 1: "Y", 1905 2: "Cb", 1906 3: "Cr", 1907 4: "R", 1908 5: "G", 1909 6: "B" 1910}], [37383, { 1911 0: "Unknown", 1912 1: "Average", 1913 2: "CenterWeightedAverage", 1914 3: "Spot", 1915 4: "MultiSpot", 1916 5: "Pattern", 1917 6: "Partial", 1918 255: "Other" 1919}], [37384, { 1920 0: "Unknown", 1921 1: "Daylight", 1922 2: "Fluorescent", 1923 3: "Tungsten (incandescent light)", 1924 4: "Flash", 1925 9: "Fine weather", 1926 10: "Cloudy weather", 1927 11: "Shade", 1928 12: "Daylight fluorescent (D 5700 - 7100K)", 1929 13: "Day white fluorescent (N 4600 - 5400K)", 1930 14: "Cool white fluorescent (W 3900 - 4500K)", 1931 15: "White fluorescent (WW 3200 - 3700K)", 1932 17: "Standard light A", 1933 18: "Standard light B", 1934 19: "Standard light C", 1935 20: "D55", 1936 21: "D65", 1937 22: "D75", 1938 23: "D50", 1939 24: "ISO studio tungsten", 1940 255: "Other" 1941}], [37385, { 1942 0: "Flash did not fire", 1943 1: "Flash fired", 1944 5: "Strobe return light not detected", 1945 7: "Strobe return light detected", 1946 9: "Flash fired, compulsory flash mode", 1947 13: "Flash fired, compulsory flash mode, return light not detected", 1948 15: "Flash fired, compulsory flash mode, return light detected", 1949 16: "Flash did not fire, compulsory flash mode", 1950 24: "Flash did not fire, auto mode", 1951 25: "Flash fired, auto mode", 1952 29: "Flash fired, auto mode, return light not detected", 1953 31: "Flash fired, auto mode, return light detected", 1954 32: "No flash function", 1955 65: "Flash fired, red-eye reduction mode", 1956 69: "Flash fired, red-eye reduction mode, return light not detected", 1957 71: "Flash fired, red-eye reduction mode, return light detected", 1958 73: "Flash fired, compulsory flash mode, red-eye reduction mode", 1959 77: "Flash fired, compulsory flash mode, red-eye reduction mode, return light not detected", 1960 79: "Flash fired, compulsory flash mode, red-eye reduction mode, return light detected", 1961 89: "Flash fired, auto mode, red-eye reduction mode", 1962 93: "Flash fired, auto mode, return light not detected, red-eye reduction mode", 1963 95: "Flash fired, auto mode, return light detected, red-eye reduction mode" 1964}], [41495, { 1965 1: "Not defined", 1966 2: "One-chip color area sensor", 1967 3: "Two-chip color area sensor", 1968 4: "Three-chip color area sensor", 1969 5: "Color sequential area sensor", 1970 7: "Trilinear sensor", 1971 8: "Color sequential linear sensor" 1972}], [41728, { 1973 1: "Film Scanner", 1974 2: "Reflection Print Scanner", 1975 3: "Digital Camera" 1976}], [41729, { 1977 1: "Directly photographed" 1978}], [41985, { 1979 0: "Normal", 1980 1: "Custom", 1981 2: "HDR (no original saved)", 1982 3: "HDR (original saved)", 1983 4: "Original (for HDR)", 1984 6: "Panorama", 1985 7: "Portrait HDR", 1986 8: "Portrait" 1987}], [41986, { 1988 0: "Auto", 1989 1: "Manual", 1990 2: "Auto bracket" 1991}], [41987, { 1992 0: "Auto", 1993 1: "Manual" 1994}], [41990, { 1995 0: "Standard", 1996 1: "Landscape", 1997 2: "Portrait", 1998 3: "Night", 1999 4: "Other" 2000}], [41991, { 2001 0: "None", 2002 1: "Low gain up", 2003 2: "High gain up", 2004 3: "Low gain down", 2005 4: "High gain down" 2006}], [41996, { 2007 0: "Unknown", 2008 1: "Macro", 2009 2: "Close", 2010 3: "Distant" 2011}], [42080, { 2012 0: "Unknown", 2013 1: "Not a Composite Image", 2014 2: "General Composite Image", 2015 3: "Composite Image Captured While Shooting" 2016}]]); 2017const Be = { 2018 1: "No absolute unit of measurement", 2019 2: "Inch", 2020 3: "Centimeter" 2021}; 2022Ee.set(37392, Be), Ee.set(41488, Be); 2023const Ne = { 2024 0: "Normal", 2025 1: "Low", 2026 2: "High" 2027}; 2028function Ge(e) { 2029 return "object" == typeof e && void 0 !== e.length ? e[0] : e; 2030} 2031function Ve(e) { 2032 let t = Array.from(e).slice(1); 2033 return t[1] > 15 && (t = t.map(e => String.fromCharCode(e))), "0" !== t[2] && 0 !== t[2] || t.pop(), t.join("."); 2034} 2035function ze(e) { 2036 if ("string" == typeof e) { 2037 var [t, i, n, s, r, a] = e.trim().split(/[-: ]/g).map(Number), 2038 o = new Date(t, i - 1, n); 2039 return Number.isNaN(s) || Number.isNaN(r) || Number.isNaN(a) || (o.setHours(s), o.setMinutes(r), o.setSeconds(a)), Number.isNaN(+o) ? e : o; 2040 } 2041} 2042function He(e) { 2043 if ("string" == typeof e) return e; 2044 let t = []; 2045 if (0 === e[1] && 0 === e[e.length - 1]) for (let i = 0; i < e.length; i += 2) t.push(je(e[i + 1], e[i]));else for (let i = 0; i < e.length; i += 2) t.push(je(e[i], e[i + 1])); 2046 return m(String.fromCodePoint(...t)); 2047} 2048function je(e, t) { 2049 return e << 8 | t; 2050} 2051Ee.set(41992, Ne), Ee.set(41993, Ne), Ee.set(41994, Ne), U(N, ["ifd0", "ifd1"], [[50827, function (e) { 2052 return "string" != typeof e ? b(e) : e; 2053}], [306, ze], [40091, He], [40092, He], [40093, He], [40094, He], [40095, He]]), U(N, "exif", [[40960, Ve], [36864, Ve], [36867, ze], [36868, ze], [40962, Ge], [40963, Ge]]), U(N, "gps", [[0, e => Array.from(e).join(".")], [7, e => Array.from(e).join(":")]]); 2054class We extends re { 2055 static canHandle(e, t) { 2056 return 225 === e.getUint8(t + 1) && 1752462448 === e.getUint32(t + 4) && "http://ns.adobe.com/" === e.getString(t + 4, "http://ns.adobe.com/".length); 2057 } 2058 static headerLength(e, t) { 2059 return "http://ns.adobe.com/xmp/extension/" === e.getString(t + 4, "http://ns.adobe.com/xmp/extension/".length) ? 79 : 4 + "http://ns.adobe.com/xap/1.0/".length + 1; 2060 } 2061 static findPosition(e, t) { 2062 let i = super.findPosition(e, t); 2063 return i.multiSegment = i.extended = 79 === i.headerLength, i.multiSegment ? (i.chunkCount = e.getUint8(t + 72), i.chunkNumber = e.getUint8(t + 76), 0 !== e.getUint8(t + 77) && i.chunkNumber++) : (i.chunkCount = 1 / 0, i.chunkNumber = -1), i; 2064 } 2065 static handleMultiSegments(e) { 2066 return e.map(e => e.chunk.getString()).join(""); 2067 } 2068 normalizeInput(e) { 2069 return "string" == typeof e ? e : I.from(e).getString(); 2070 } 2071 parse(e = this.chunk) { 2072 if (!this.localOptions.parse) return e; 2073 e = function (e) { 2074 let t = {}, 2075 i = {}; 2076 for (let e of Ze) t[e] = [], i[e] = 0; 2077 return e.replace(et, (e, n, s) => { 2078 if ("<" === n) { 2079 let n = ++i[s]; 2080 return t[s].push(n), `${e}#${n}`; 2081 } 2082 return `${e}#${t[s].pop()}`; 2083 }); 2084 }(e); 2085 let t = Xe.findAll(e, "rdf", "Description"); 2086 0 === t.length && t.push(new Xe("rdf", "Description", void 0, e)); 2087 let i, 2088 n = {}; 2089 for (let e of t) for (let t of e.properties) i = Je(t.ns, n), _e(t, i); 2090 return function (e) { 2091 let t; 2092 for (let i in e) t = e[i] = f(e[i]), void 0 === t && delete e[i]; 2093 return f(e); 2094 }(n); 2095 } 2096 assignToOutput(e, t) { 2097 if (this.localOptions.parse) for (let [i, n] of Object.entries(t)) switch (i) { 2098 case "tiff": 2099 this.assignObjectToOutput(e, "ifd0", n); 2100 break; 2101 case "exif": 2102 this.assignObjectToOutput(e, "exif", n); 2103 break; 2104 case "xmlns": 2105 break; 2106 default: 2107 this.assignObjectToOutput(e, i, n); 2108 } else e.xmp = t; 2109 } 2110} 2111c(We, "type", "xmp"), c(We, "multiSegment", !0), T.set("xmp", We); 2112class Ke { 2113 static findAll(e) { 2114 return qe(e, /([a-zA-Z0-9-]+):([a-zA-Z0-9-]+)=("[^"]*"|'[^']*')/gm).map(Ke.unpackMatch); 2115 } 2116 static unpackMatch(e) { 2117 let t = e[1], 2118 i = e[2], 2119 n = e[3].slice(1, -1); 2120 return n = Qe(n), new Ke(t, i, n); 2121 } 2122 constructor(e, t, i) { 2123 this.ns = e, this.name = t, this.value = i; 2124 } 2125 serialize() { 2126 return this.value; 2127 } 2128} 2129class Xe { 2130 static findAll(e, t, i) { 2131 if (void 0 !== t || void 0 !== i) { 2132 t = t || "[\\w\\d-]+", i = i || "[\\w\\d-]+"; 2133 var n = new RegExp(`<(${t}):(${i})(#\\d+)?((\\s+?[\\w\\d-:]+=("[^"]*"|'[^']*'))*\\s*)(\\/>|>([\\s\\S]*?)<\\/\\1:\\2\\3>)`, "gm"); 2134 } else n = /<([\w\d-]+):([\w\d-]+)(#\d+)?((\s+?[\w\d-:]+=("[^"]*"|'[^']*'))*\s*)(\/>|>([\s\S]*?)<\/\1:\2\3>)/gm; 2135 return qe(e, n).map(Xe.unpackMatch); 2136 } 2137 static unpackMatch(e) { 2138 let t = e[1], 2139 i = e[2], 2140 n = e[4], 2141 s = e[8]; 2142 return new Xe(t, i, n, s); 2143 } 2144 constructor(e, t, i, n) { 2145 this.ns = e, this.name = t, this.attrString = i, this.innerXml = n, this.attrs = Ke.findAll(i), this.children = Xe.findAll(n), this.value = 0 === this.children.length ? Qe(n) : void 0, this.properties = [...this.attrs, ...this.children]; 2146 } 2147 get isPrimitive() { 2148 return void 0 !== this.value && 0 === this.attrs.length && 0 === this.children.length; 2149 } 2150 get isListContainer() { 2151 return 1 === this.children.length && this.children[0].isList; 2152 } 2153 get isList() { 2154 let { 2155 ns: e, 2156 name: t 2157 } = this; 2158 return "rdf" === e && ("Seq" === t || "Bag" === t || "Alt" === t); 2159 } 2160 get isListItem() { 2161 return "rdf" === this.ns && "li" === this.name; 2162 } 2163 serialize() { 2164 if (0 === this.properties.length && void 0 === this.value) return; 2165 if (this.isPrimitive) return this.value; 2166 if (this.isListContainer) return this.children[0].serialize(); 2167 if (this.isList) return $e(this.children.map(Ye)); 2168 if (this.isListItem && 1 === this.children.length && 0 === this.attrs.length) return this.children[0].serialize(); 2169 let e = {}; 2170 for (let t of this.properties) _e(t, e); 2171 return void 0 !== this.value && (e.value = this.value), f(e); 2172 } 2173} 2174function _e(e, t) { 2175 let i = e.serialize(); 2176 void 0 !== i && (t[e.name] = i); 2177} 2178var Ye = e => e.serialize(), 2179 $e = e => 1 === e.length ? e[0] : e, 2180 Je = (e, t) => t[e] ? t[e] : t[e] = {}; 2181function qe(e, t) { 2182 let i, 2183 n = []; 2184 if (!e) return n; 2185 for (; null !== (i = t.exec(e));) n.push(i); 2186 return n; 2187} 2188function Qe(e) { 2189 if (function (e) { 2190 return null == e || "null" === e || "undefined" === e || "" === e || "" === e.trim(); 2191 }(e)) return; 2192 let t = Number(e); 2193 if (!Number.isNaN(t)) return t; 2194 let i = e.toLowerCase(); 2195 return "true" === i || "false" !== i && e.trim(); 2196} 2197const Ze = ["rdf:li", "rdf:Seq", "rdf:Bag", "rdf:Alt", "rdf:Description"], 2198 et = new RegExp(`(<|\\/)(${Ze.join("|")})`, "g"); 2199var tt = Object.freeze({ 2200 __proto__: null, 2201 default: Me, 2202 Exifr: te, 2203 fileParsers: w, 2204 segmentParsers: T, 2205 fileReaders: A, 2206 tagKeys: E, 2207 tagValues: B, 2208 tagRevivers: N, 2209 createDictionary: U, 2210 extendDictionary: F, 2211 fetchUrlAsArrayBuffer: M, 2212 readBlobAsArrayBuffer: R,
2213 chunkedProps: G, 2214 otherSegments: V, 2215 segments: z, 2216 tiffBlocks: H, 2217 segmentsAndBlocks: j, 2218 tiffExtractables: W, 2219 inheritables: K, 2220 allFormatters: X, 2221 Options: q, 2222 parse: ie, 2223 gpsOnlyOptions: me, 2224 gps: Se, 2225 thumbnailOnlyOptions: Ce, 2226 thumbnail: ye, 2227 thumbnailUrl: be, 2228 orientationOnlyOptions: Ie, 2229 orientation: Pe, 2230 rotations: ke, 2231 get rotateCanvas() { 2232 return we; 2233 }, 2234 get rotateCss() { 2235 return Te; 2236 }, 2237 rotation: Ae 2238}); 2239const it = ["xmp", "icc", "iptc", "tiff"], 2240 nt = () => {}; 2241function st(_x20, _x21, _x22) { 2242 return _st.apply(this, arguments); 2243} 2244function _st() { 2245 _st = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (e, t, i) { 2246 let n = new q(t); 2247 n.chunked = !1, void 0 === i && "string" == typeof e && (i = function (e) { 2248 let t = e.toLowerCase().split(".").pop(); 2249 if (function (e) { 2250 return "exif" === e || "tiff" === e || "tif" === e; 2251 }(t)) return "tiff"; 2252 if (it.includes(t)) return t; 2253 }(e)); 2254 let s = yield D(e, n); 2255 if (i) { 2256 if (it.includes(i)) return rt(i, s, n); 2257 g("Invalid segment type"); 2258 } else { 2259 if (function (e) { 2260 let t = e.getString(0, 50).trim(); 2261 return t.includes("<?xpacket") || t.includes("<x:"); 2262 }(s)) return rt("xmp", s, n); 2263 for (let [e] of T) { 2264 if (!it.includes(e)) continue; 2265 let t = yield rt(e, s, n).catch(nt); 2266 if (t) return t; 2267 } 2268 g("Unknown file format"); 2269 } 2270 }); 2271 return _st.apply(this, arguments); 2272} 2273function rt(_x23, _x24, _x25) { 2274 return _rt.apply(this, arguments); 2275} 2276function _rt() { 2277 _rt = (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* (e, t, i) { 2278 let n = i[e]; 2279 return n.enabled = !0, n.parse = !0, T.get(e).parse(t, n); 2280 }); 2281 return _rt.apply(this, arguments); 2282} 2283let at = l("fs", e => e.promises); 2284A.set("fs", class extends ve { 2285 readWhole() { 2286 var _this30 = this; 2287 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 2288 _this30.chunked = !1, _this30.fs = yield at; 2289 let e = yield _this30.fs.readFile(_this30.input); 2290 _this30._swapBuffer(e); 2291 })(); 2292 } 2293 readChunked() { 2294 var _this31 = this; 2295 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 2296 _this31.chunked = !0, _this31.fs = yield at, yield _this31.open(), yield _this31.readChunk(0, _this31.options.firstChunkSize); 2297 })(); 2298 } 2299 open() { 2300 var _this32 = this; 2301 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 2302 void 0 === _this32.fh && (_this32.fh = yield _this32.fs.open(_this32.input, "r"), _this32.size = (yield _this32.fh.stat(_this32.input)).size); 2303 })(); 2304 } 2305 _readChunk(e, t) { 2306 var _this33 = this; 2307 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 2308 void 0 === _this33.fh && (yield _this33.open()), e + t > _this33.size && (t = _this33.size - e); 2309 var i = _this33.subarray(e, t, !0); 2310 return yield _this33.fh.read(i.dataView, 0, t, e), i; 2311 })(); 2312 } 2313 close() { 2314 var _this34 = this; 2315 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 2316 if (_this34.fh) { 2317 let e = _this34.fh; 2318 _this34.fh = void 0, yield e.close(); 2319 } 2320 })(); 2321 } 2322}); 2323A.set("base64", class extends ve { 2324 constructor(...e) { 2325 super(...e), this.input = this.input.replace(/^data:([^;]+);base64,/gim, ""), this.size = this.input.length / 4 * 3, this.input.endsWith("==") ? this.size -= 2 : this.input.endsWith("=") && (this.size -= 1); 2326 } 2327 _readChunk(e, t) { 2328 var _this35 = this; 2329 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 2330 let i, 2331 n, 2332 r = _this35.input; 2333 void 0 === e ? (e = 0, i = 0, n = 0) : (i = 4 * Math.floor(e / 3), n = e - i / 4 * 3), void 0 === t && (t = _this35.size); 2334 let o = e + t, 2335 l = i + 4 * Math.ceil(o / 3); 2336 r = r.slice(i, l); 2337 let h = Math.min(t, _this35.size - e); 2338 if (a) { 2339 let t = s.from(r, "base64").slice(n, n + h); 2340 return _this35.set(t, e, !0); 2341 } 2342 { 2343 let t = _this35.subarray(e, h, !0), 2344 i = atob(r), 2345 s = t.toUint8(); 2346 for (let e = 0; e < h;
2346 e++) s[e] = i.charCodeAt(n + e); 2347 return t; 2348 } 2349 })(); 2350 } 2351}); 2352class ot extends se { 2353 static canHandle(e, t) { 2354 return 18761 === t || 19789 === t; 2355 } 2356 extendOptions(e) { 2357 let { 2358 ifd0: t, 2359 xmp: i, 2360 iptc: n, 2361 icc: s 2362 } = e; 2363 i.enabled && t.deps.add(700), n.enabled && t.deps.add(33723), s.enabled && t.deps.add(34675), t.finalizeFilters(); 2364 } 2365 parse() { 2366 var _this36 = this; 2367 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 2368 let { 2369 tiff: e, 2370 xmp: t, 2371 iptc: i, 2372 icc: n 2373 } = _this36.options; 2374 if (e.enabled || t.enabled || i.enabled || n.enabled) { 2375 let e = Math.max(S(_this36.options), _this36.options.chunkSize); 2376 yield _this36.file.ensureChunk(0, e), _this36.createParser("tiff", _this36.file), _this36.parsers.tiff.parseHeader(), yield _this36.parsers.tiff.parseIfd0Block(), _this36.adaptTiffPropAsSegment("xmp"), _this36.adaptTiffPropAsSegment("iptc"), _this36.adaptTiffPropAsSegment("icc"); 2377 } 2378 })(); 2379 } 2380 adaptTiffPropAsSegment(e) { 2381 if (this.parsers.tiff[e]) { 2382 let t = this.parsers.tiff[e]; 2383 this.injectSegment(e, t); 2384 } 2385 } 2386} 2387c(ot, "type", "tiff"), w.set("tiff", ot); 2388let lt = l("zlib"); 2389const ht = ["ihdr", "iccp", "text", "itxt", "exif"]; 2390class ut extends se { 2391 constructor(...e) { 2392 super(...e), c(this, "catchError", e => this.errors.push(e)), c(this, "metaChunks", []), c(this, "unknownChunks", []); 2393 } 2394 static canHandle(e, t) { 2395 return 35152 === t && 2303741511 === e.getUint32(0) && 218765834 === e.getUint32(4); 2396 } 2397 parse() { 2398 var _this37 = this; 2399 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 2400 let { 2401 file: e 2402 } = _this37; 2403 yield _this37.findPngChunksInRange("‰PNG\r\n�\n".length, e.byteLength), yield _this37.readSegments(_this37.metaChunks), _this37.findIhdr(), _this37.parseTextChunks(), yield _this37.findExif().catch(_this37.catchError), yield _this37.findXmp().catch(_this37.catchError), yield _this37.findIcc().catch(_this37.catchError); 2404 })(); 2405 } 2406 findPngChunksInRange(e, t) { 2407 var _this38 = this; 2408 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 2409 let { 2410 file: i 2411 } = _this38; 2412 for (; e < t;) { 2413 let t = i.getUint32(e), 2414 n = i.getUint32(e + 4), 2415 s = i.getString(e + 4, 4).toLowerCase(), 2416 r = t + 4 + 4 + 4, 2417 a = { 2418 type: s, 2419 offset: e, 2420 length: r, 2421 start: e + 4 + 4, 2422 size: t, 2423 marker: n 2424 }; 2425 ht.includes(s) ? _this38.metaChunks.push(a) : _this38.unknownChunks.push(a), e += r; 2426 } 2427 })(); 2428 } 2429 parseTextChunks() { 2430 let e = this.metaChunks.filter(e => "text" === e.type); 2431 for (let t of e) { 2432 let [e, i] = this.file.getString(t.start, t.size).split("\0"); 2433 this.injectKeyValToIhdr(e, i); 2434 } 2435 } 2436 injectKeyValToIhdr(e, t) { 2437 let i = this.parsers.ihdr; 2438 i && i.raw.set(e, t); 2439 } 2440 findIhdr() { 2441 let e = this.metaChunks.find(e => "ihdr" === e.type); 2442 e && !1 !== this.options.ihdr.enabled && this.createParser("ihdr", e.chunk); 2443 } 2444 findExif() { 2445 var _this39 = this; 2446 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 2447 let e = _this39.metaChunks.find(e => "exif" === e.type); 2448 e && _this39.injectSegment("tiff", e.chunk); 2449 })(); 2450 } 2451 findXmp() { 2452 var _this40 = this; 2453 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 2454 let e = _this40.metaChunks.filter(e => "itxt" === e.type); 2455 for (let t of e) { 2456 "XML:com.adobe.xmp" === t.chunk.getString(0, "XML:com.adobe.xmp".length) && _this40.injectSegment("xmp", t.chunk); 2457 } 2458 })(); 2459 } 2460 findIcc() { 2461 var _this41 = this; 2462 return (0,C_Users_admin_Downloads_saferoadsph_saferoadsph_ui_mysql_node_modules_babel_runtime_helpers_esm_asyncToGenerator_js__WEBPACK_IMPORTED_MODULE_0__["default"])(function* () { 2463 let e = _this41.metaChunks.find(e => "iccp" === e.type); 2464 if (!e) return; 2465 let { 2466 chunk: t 2467 } = e, 2468 i = t.getUint8Array(0, 81), 2469 s = 0; 2470 for (; s < 80 && 0 !== i[s];) s++; 2471 let r = s + 2, 2472 a = t.getString(0, s); 2473 if (_this41.injectKeyValToIhdr("ProfileName", a), n) { 2474 let e = yield lt, 2475 i = t.getUint8Array(r); 2476 i = e.inflateSync(i), _this41.injectSegment("icc", i); 2477 } 2478 })(); 2479 } 2480} 2481c(ut, "type", "png"), w.set("png", ut), U(E, "interop", [[1, "InteropIndex"], [2, "InteropVersion"], [4096, "RelatedImageFileFormat"], [4097, "RelatedImageWidth"], [4098, "RelatedImageHeight"]]), F(E, "ifd0", [[11, "ProcessingSoftw
2481are"], [254, "SubfileType"], [255, "OldSubfileType"], [263, "Thresholding"], [264, "CellWidth"], [265, "CellLength"], [266, "FillOrder"], [269, "DocumentName"], [280, "MinSampleValue"], [281, "MaxSampleValue"], [285, "PageName"], [286, "XPosition"], [287, "YPosition"], [290, "GrayResponseUnit"], [297, "PageNumber"], [321, "HalftoneHints"], [322, "TileWidth"], [323, "TileLength"], [332, "InkSet"], [337, "TargetPrinter"], [18246, "Rating"], [18249, "RatingPercent"], [33550, "PixelScale"], [34264, "ModelTransform"], [34377, "PhotoshopSettings"], [50706, "DNGVersion"], [50707, "DNGBackwardVersion"], [50708, "UniqueCameraModel"], [50709, "LocalizedCameraModel"], [50736, "DNGLensInfo"], [50739, "ShadowScale"], [50740, "DNGPrivateData"], [33920, "IntergraphMatrix"], [33922, "ModelTiePoint"], [34118, "SEMInfo"], [34735, "GeoTiffDirectory"], [34736, "GeoTiffDoubleParams"], [34737, "GeoTiffAsciiParams"], [50341, "PrintIM"], [50721, "ColorMatrix1"], [50722, "ColorMatrix2"], [50723, "CameraCalibration1"], [50724, "CameraCalibration2"], [50725, "ReductionMatrix1"], [50726, "ReductionMatrix2"], [50727, "AnalogBalance"], [50728, "AsShotNeutral"], [50729, "AsShotWhiteXY"], [50730, "BaselineExposure"], [50731, "BaselineNoise"], [50732, "BaselineSharpness"], [50734, "LinearResponseLimit"], [50735, "CameraSerialNumber"], [50741, "MakerNoteSafety"], [50778, "CalibrationIlluminant1"], [50779, "CalibrationIlluminant2"], [50781, "RawDataUniqueID"], [50827, "OriginalRawFileName"], [50828, "OriginalRawFileData"], [50831, "AsShotICCProfile"], [50832, "AsShotPreProfileMatrix"], [50833, "CurrentICCProfile"], [50834, "CurrentPreProfileMatrix"], [50879, "ColorimetricReference"], [50885, "SRawType"], [50898, "PanasonicTitle"], [50899, "PanasonicTitle2"], [50931, "CameraCalibrationSig"], [50932, "ProfileCalibrationSig"], [50933, "ProfileIFD"], [50934, "AsShotProfileName"], [50936, "ProfileName"], [50937, "ProfileHueSatMapDims"], [50938, "ProfileHueSatMapData1"], [50939, "ProfileHueSatMapData2"], [50940, "ProfileToneCurve"], [50941, "ProfileEmbedPolicy"], [50942, "ProfileCopyright"], [50964, "ForwardMatrix1"], [50965, "ForwardMatrix2"], [50966, "PreviewApplicationName"], [50967, "PreviewApplicationVersion"], [50968, "PreviewSettingsName"], [50969, "PreviewSettingsDigest"], [50970, "PreviewColorSpace"], [50971, "PreviewDateTime"], [50972, "RawImageDigest"], [50973, "OriginalRawFileDigest"], [50981, "ProfileLookTableDims"], [50982, "ProfileLookTableData"], [51043, "TimeCodes"], [51044, "FrameRate"], [51058, "TStop"], [51081, "ReelName"], [51089, "OriginalDefaultFinalSize"], [51090, "OriginalBestQualitySize"], [51091, "OriginalDefaultCropSize"], [51105, "CameraLabel"], [51107, "ProfileHueSatMapEncoding"], [51108, "ProfileLookTableEncoding"], [51109, "BaselineExposureOffset"], [51110, "DefaultBlackRender"], [51111, "NewRawImageDigest"], [51112, "RawToPreviewGain"]]); 2482let ct = [[273, "StripOffsets"], [279, "StripByteCounts"], [288, "FreeOffsets"], [289, "FreeByteCounts"], [291, "GrayResponseCurve"], [292, "T4Options"], [293, "T6Options"], [300, "ColorResponseUnit"], [320, "ColorMap"], [324, "TileOffsets"], [325, "TileByteCounts"], [326, "BadFaxLines"], [327, "CleanFaxData"], [328, "ConsecutiveBadFaxLines"], [330, "SubIFD"], [333, "InkNames"], [334, "NumberofInks"], [336, "DotRange"], [338, "ExtraSamples"], [339, "SampleFormat"], [340, "SMinSampleValue"], [341, "SMaxSampleValue"], [342, "TransferRange"], [343, "ClipPath"], [344, "XClipPathUnits"], [345, "YClipPathUnits"], [346, "Indexed"], [347, "JPEGTables"], [351, "OPIProxy"], [400, "GlobalParametersIFD"], [401, "ProfileType"], [402, "FaxProfile"], [403, "CodingMethods"], [404, "VersionYear"], [405, "ModeNumber"], [433, "Decode"], [434, "DefaultImageColor"], [435, "T82Options"], [437, "JPEGTables"], [512, "JPEGProc"], [515, "JPEGRestartInterval"], [517, "JPEGLosslessPredictors"], [518, "JPEGPointTransforms"], [519, "JPEGQTables"], [520, "JPEGDCTables"], [521, "JPEGACTables"], [559, "StripRowCounts"], [999, "USPTOMiscellaneous"], [18247, "XP_DIP_XML"], [18248, "StitchInfo"], [28672, "SonyRawFileType"], [28688, "SonyToneCurve"], [28721, "VignettingCorrection"], [28722, "VignettingCorrParams"], [28724, "ChromaticAberrationCorrection"], [28725, "ChromaticAberrationCorrParams"], [28726, "DistortionCorrection"], [28727, "DistortionCorrParams"], [29895, "SonyCropTopLeft"], [29896, "SonyCropSize"], [32781, "ImageID"], [32931, "WangTag1"], [32932, "WangAnnotation"], [32933, "WangTag3"], [32934, "WangTag4"], [32953, "ImageReferencePoints"], [32954, "RegionXformTackPoint"], [32955, "WarpQuadrilateral"], [32956, "AffineTransformMat"], [32995, "Matteing"], [32996, "DataType"], [32997, "ImageDepth"], [32998, "TileDepth"], [33300, "ImageFullWidth"], [33301, "ImageFullHeight"], [33302, "TextureFormat"], [33303, "WrapModes"], [33304, "FovCot"], [33305, "MatrixWorldToScreen"], [33306, "MatrixWorldToCamera"], [33405, "Model2"], [33421, "CFARepeatPatternDim"], [33422, "CFAPattern2"], [33423, "BatteryLevel"], [33424, "KodakIFD"], [33445, "MDFileTag"], [33446, "MDScalePixel"], [33447, "MDColorTable"], [33448, "MDLabName"], [33449, "MDSampleInfo"], [33450, "MDPrepDate"], [33451, "MDPrepTime"], [33452, "MDFileUnits"], [33589, "AdventScale"], [33590, "AdventRevision"], [33628, "UIC1Tag"], [33629, "UIC2Tag"], [33630, "UIC3Tag"], [33631, "UIC4Tag"], [33918, "IntergraphPacketData"], [33919, "IntergraphFlagRegisters"], [33921, "INGRReserved"], [34016, "Site"], [34017, "ColorSequence"], [34018, "IT8Header"], [34019, "RasterPadding"], [34020, "BitsPerRunLength"], [34021, "BitsPerExtendedRunLength"], [34022, "ColorTable"], [34023, "ImageColorIndicator"], [34024, "Backgroun
2482dColorIndicator"], [34025, "ImageColorValue"], [34026, "BackgroundColorValue"], [34027, "PixelIntensityRange"], [34028, "TransparencyIndicator"], [34029, "ColorCharacterization"], [34030, "HCUsage"], [34031, "TrapIndicator"], [34032, "CMYKEquivalent"], [34152, "AFCP_IPTC"], [34232, "PixelMagicJBIGOptions"], [34263, "JPLCartoIFD"], [34306, "WB_GRGBLevels"], [34310, "LeafData"], [34687, "TIFF_FXExtensions"], [34688, "MultiProfiles"], [34689, "SharedData"], [34690, "T88Options"], [34732, "ImageLayer"], [34750, "JBIGOptions"], [34856, "Opto-ElectricConvFactor"], [34857, "Interlace"], [34908, "FaxRecvParams"], [34909, "FaxSubAddress"], [34910, "FaxRecvTime"], [34929, "FedexEDR"], [34954, "LeafSubIFD"], [37387, "FlashEnergy"], [37388, "SpatialFrequencyResponse"], [37389, "Noise"], [37390, "FocalPlaneXResolution"], [37391, "FocalPlaneYResolution"], [37392, "FocalPlaneResolutionUnit"], [37397, "ExposureIndex"], [37398, "TIFF-EPStandardID"], [37399, "SensingMethod"], [37434, "CIP3DataFile"], [37435, "CIP3Sheet"], [37436, "CIP3Side"], [37439, "StoNits"], [37679, "MSDocumentText"], [37680, "MSPropertySetStorage"], [37681, "MSDocumentTextPosition"], [37724, "ImageSourceData"], [40965, "InteropIFD"], [40976, "SamsungRawPointersOffset"], [40977, "SamsungRawPointersLength"], [41217, "SamsungRawByteOrder"], [41218, "SamsungRawUnknown"], [41484, "SpatialFrequencyResponse"], [41485, "Noise"], [41489, "ImageNumber"], [41490, "SecurityClassification"], [41491, "ImageHistory"], [41494, "TIFF-EPStandardID"], [41995, "DeviceSettingDescription"], [42112, "GDALMetadata"], [42113, "GDALNoData"], [44992, "ExpandSoftware"], [44993, "ExpandLens"], [44994, "ExpandFilm"], [44995, "ExpandFilterLens"], [44996, "ExpandScanner"], [44997, "ExpandFlashLamp"], [46275, "HasselbladRawImage"], [48129, "PixelFormat"], [48130, "Transformation"], [48131, "Uncompressed"], [48132, "ImageType"], [48256, "ImageWidth"], [48257, "ImageHeight"], [48258, "WidthResolution"], [48259, "HeightResolution"], [48320, "ImageOffset"], [48321, "ImageByteCount"], [48322, "AlphaOffset"], [48323, "AlphaByteCount"], [48324, "ImageDataDiscard"], [48325, "AlphaDataDiscard"], [50215, "OceScanjobDesc"], [50216, "OceApplicationSelector"], [50217, "OceIDNumber"], [50218, "OceImageLogic"], [50255, "Annotations"], [50459, "HasselbladExif"], [50547, "OriginalFileName"], [50560, "USPTOOriginalContentType"], [50656, "CR2CFAPattern"], [50710, "CFAPlaneColor"], [50711, "CFALayout"], [50712, "LinearizationTable"], [50713, "BlackLevelRepeatDim"], [50714, "BlackLevel"], [50715, "BlackLevelDeltaH"], [50716, "BlackLevelDeltaV"], [50717, "WhiteLevel"], [50718, "DefaultScale"], [50719, "DefaultCropOrigin"], [50720, "DefaultCropSize"], [50733, "BayerGreenSplit"], [50737, "ChromaBlurRadius"], [50738, "AntiAliasStrength"], [50752, "RawImageSegmentation"], [50780, "BestQualityScale"], [50784, "AliasLayerMetadata"], [50829, "ActiveArea"], [50830, "MaskedAreas"], [50935, "NoiseReductionApplied"], [50974, "SubTileBlockSize"], [50975, "RowInterleaveFactor"], [51008, "OpcodeList1"], [51009, "OpcodeList2"], [51022, "OpcodeList3"], [51041, "NoiseProfile"], [51114, "CacheVersion"], [51125, "DefaultUserCrop"], [51157, "NikonNEFInfo"], [65024, "KdcIFD"]]; 2483F(E, "ifd0", ct), F(E, "exif", ct), U(B, "gps", [[23, { 2484 M: "Magnetic North", 2485 T: "True North" 2486}], [25, { 2487 K: "Kilometers", 2488 M: "Miles", 2489 N: "Nautical Miles" 2490}]]); 2491class ft extends re { 2492 static canHandle(e, t) { 2493 return 224 === e.getUint8(t + 1) && 1246120262 === e.getUint32(t + 4) && 0 === e.getUint8(t + 8); 2494 } 2495 parse() { 2496 return this.parseTags(), this.translate(), this.output; 2497 } 2498 parseTags() { 2499 this.raw = new Map([[0, this.chunk.getUint16(0)], [2, this.chunk.getUint8(2)], [3, this.chunk.getUint16(3)], [5, this.chunk.getUint16(5)], [7, this.chunk.getUint8(7)], [8, this.chunk.getUint8(8)]]); 2500 } 2501} 2502c(ft, "type", "jfif"), c(ft, "headerLength", 9), T.set("jfif", ft), U(E, "jfif", [[0, "JFIFVersion"], [2, "ResolutionUnit"], [3, "XResolution"], [5, "YResolution"], [7, "ThumbnailWidth"], [8, "ThumbnailHeight"]]); 2503class dt extends re { 2504 parse() { 2505 return this.parseTags(), this.translate(), this.output; 2506 } 2507 parseTags() { 2508 this.raw = new Map([[0, this.chunk.getUint32(0)], [4, this.chunk.getUint32(4)], [8, this.chunk.getUint8(8)], [9, this.chunk.getUint8(9)], [10, this.chunk.getUint8(10)], [11, this.chunk.getUint8(11)], [12, this.chunk.getUint8(12)], ...Array.from(this.raw)]); 2509 } 2510} 2511c(dt, "type", "ihdr"), T.set("ihdr", dt), U(E, "ihdr", [[0, "ImageWidth"], [4, "ImageHeight"], [8, "BitDepth"], [9, "ColorType"], [10, "Compression"], [11, "Filter"], [12, "Interlace"]]), U(B, "ihdr", [[9, { 2512 0: "Grayscale", 2513 2: "RGB", 2514 3: "Palette", 2515 4: "Grayscale with Alpha", 2516 6: "RGB with Alpha", 2517 DEFAULT: "Unknown" 2518}], [10, { 2519 0: "Deflate/Inflate", 2520 DEFAULT: "Unknown" 2521}], [11, {
2522 0: "Adaptive", 2523 DEFAULT: "Unknown" 2524}], [12, { 2525 0: "Noninterlaced", 2526 1: "Adam7 Interlace", 2527 DEFAULT: "Unknown" 2528}]]); 2529class pt extends re { 2530 static canHandle(e, t) { 2531 return 226 === e.getUint8(t + 1) && 1229144927 === e.getUint32(t + 4); 2532 } 2533 static findPosition(e, t) { 2534 let i = super.findPosition(e, t); 2535 return i.chunkNumber = e.getUint8(t + 16), i.chunkCount = e.getUint8(t + 17), i.multiSegment = i.chunkCount > 1, i; 2536 } 2537 static handleMultiSegments(e) { 2538 return function (e) { 2539 let t = function (e) { 2540 let t = e[0].constructor, 2541 i = 0; 2542 for (let t of e) i += t.length; 2543 let n = new t(i), 2544 s = 0; 2545 for (let t of e) n.set(t, s), s += t.length; 2546 return n; 2547 }(e.map(e => e.chunk.toUint8())); 2548 return new I(t); 2549 }(e); 2550 } 2551 parse() { 2552 return this.raw = new Map(), this.parseHeader(), this.parseTags(), this.translate(), this.output; 2553 } 2554 parseHeader() { 2555 let { 2556 raw: e 2557 } = this; 2558 this.chunk.byteLength < 84 && g("ICC header is too short"); 2559 for (let [t, i] of Object.entries(gt)) { 2560 t = parseInt(t, 10); 2561 let n = i(this.chunk, t); 2562 "\0\0\0\0" !== n && e.set(t, n); 2563 } 2564 } 2565 parseTags() { 2566 let e, 2567 t, 2568 i, 2569 n, 2570 s, 2571 { 2572 raw: r 2573 } = this, 2574 a = this.chunk.getUint32(128), 2575 o = 132, 2576 l = this.chunk.byteLength; 2577 for (; a--;) { 2578 if (e = this.chunk.getString(o, 4), t = this.chunk.getUint32(o + 4), i = this.chunk.getUint32(o + 8), n = this.chunk.getString(t, 4), t + i > l) return void console.warn("reached the end of the first ICC chunk. Enable options.tiff.multiSegment to read all ICC segments."); 2579 s = this.parseTag(n, t, i), void 0 !== s && "\0\0\0\0" !== s && r.set(e, s), o += 12; 2580 } 2581 } 2582 parseTag(e, t, i) { 2583 switch (e) { 2584 case "desc": 2585 return this.parseDesc(t); 2586 case "mluc": 2587 return this.parseMluc(t); 2588 case "text": 2589 return this.parseText(t, i); 2590 case "sig ": 2591 return this.parseSig(t); 2592 } 2593 if (!(t + i > this.chunk.byteLength)) return this.chunk.getUint8Array(t, i); 2594 } 2595 parseDesc(e) { 2596 let t = this.chunk.getUint32(e + 8) - 1; 2597 return m(this.chunk.getString(e + 12, t)); 2598 } 2599 parseText(e, t) { 2600 return m(this.chunk.getString(e + 8, t - 8)); 2601 } 2602 parseSig(e) { 2603 return m(this.chunk.getString(e + 8, 4)); 2604 } 2605 parseMluc(e) { 2606 let { 2607 chunk: t 2608 } = this, 2609 i = t.getUint32(e + 8), 2610 n = t.getUint32(e + 12), 2611 s = e + 16, 2612 r = []; 2613 for (let a = 0; a < i; a++) { 2614 let i = t.getString(s + 0, 2), 2615 a = t.getString(s + 2, 2), 2616 o = t.getUint32(s + 4), 2617 l = t.getUint32(s + 8) + e, 2618 h = m(t.getUnicodeString(l, o)); 2619 r.push({ 2620 lang: i, 2621 country: a, 2622 text: h 2623 }), s += n; 2624 } 2625 return 1 === i ? r[0].text : r; 2626 } 2627 translateValue(e, t) { 2628 return "string" == typeof e ? t[e] || t[e.toLowerCase()] || e : t[e] || e; 2629 } 2630} 2631c(pt, "type", "icc"), c(pt, "multiSegment", !0), c(pt, "headerLength", 18); 2632const gt = { 2633 4: mt, 2634 8: function (e, t) { 2635 return [e.getUint8(t), e.getUint8(t + 1) >> 4, e.getUint8(t + 1) % 16].map(e => e.toString(10)).join("."); 2636 }, 2637 12: mt, 2638 16: mt, 2639 20: mt, 2640 24: function (e, t) { 2641 const i = e.getUint16(t), 2642 n = e.getUint16(t + 2) - 1, 2643 s = e.getUint16(t + 4), 2644 r = e.getUint16(t + 6), 2645 a = e.getUint16(t + 8), 2646 o = e.getUint16(t + 10); 2647 return new Date(Date.UTC(i, n, s, r, a, o)); 2648 }, 2649 36: mt, 2650 40: mt, 2651 48: mt, 2652 52: mt, 2653 64: (e, t) => e.getUint32(t), 2654 80: mt 2655}; 2656function mt(e, t) { 2657 return m(e.getString(t, 4)); 2658} 2659T.set("icc", pt), U(E, "icc", [[4, "ProfileCMMType"], [8, "ProfileVersion"], [12, "ProfileClass"], [16, "ColorSpaceData"], [20, "ProfileConnectionSpace"], [24, "ProfileDateTime"], [36, "ProfileFileSignature"], [40, "PrimaryPlatform"], [44, "CMMFlags"], [48, "DeviceManufacturer"], [52, "DeviceModel"], [56, "DeviceAttributes"], [64, "RenderingIntent"], [68, "ConnectionSpaceIlluminant"], [80, "ProfileCreator"], [84, "ProfileID"], ["Header", "ProfileHeader"], ["MS00", "WCSProfiles"], ["bTRC", "BlueTRC"], ["bXYZ", "BlueMatrixColumn"], ["bfd", "UCRBG"], ["bkpt", "MediaBlackPoint"], ["calt", "CalibrationDateTime"], ["chad", "ChromaticAdaptation"], ["chrm", "Chromaticity"], ["ciis", "ColorimetricIntentImageState"], ["clot", "ColorantTableOut"], ["clro", "ColorantOrder"], ["clrt", "ColorantTable"], ["cprt", "ProfileCopyright"], ["crdi", "CRDInfo"], ["desc", "ProfileDescription"], ["devs", "DeviceSettings"], ["dmdd", "DeviceModelDesc"], ["dmnd", "DeviceMfgDesc"], ["dscm", "ProfileDescriptionML"], ["fpce", "FocalPlaneColorimetryEstimates"], ["gTRC", "GreenTRC"], ["gXYZ", "GreenMatrixColumn"], ["gamt", "Gamut"], ["kTRC", "GrayTRC"], ["lumi", "Luminance"], ["meas", "Measurement"], ["meta", "Metadata"], ["mmod", "MakeAndModel"], ["ncl2", "NamedColor2"], ["ncol", "NamedColor"], ["n
2659din", "NativeDisplayInfo"], ["pre0", "Preview0"], ["pre1", "Preview1"], ["pre2", "Preview2"], ["ps2i", "PS2RenderingIntent"], ["ps2s", "PostScript2CSA"], ["psd0", "PostScript2CRD0"], ["psd1", "PostScript2CRD1"], ["psd2", "PostScript2CRD2"], ["psd3", "PostScript2CRD3"], ["pseq", "ProfileSequenceDesc"], ["psid", "ProfileSequenceIdentifier"], ["psvm", "PS2CRDVMSize"], ["rTRC", "RedTRC"], ["rXYZ", "RedMatrixColumn"], ["resp", "OutputResponse"], ["rhoc", "ReflectionHardcopyOrigColorimetry"], ["rig0", "PerceptualRenderingIntentGamut"], ["rig2", "SaturationRenderingIntentGamut"], ["rpoc", "ReflectionPrintOutputColorimetry"], ["sape", "SceneAppearanceEstimates"], ["scoe", "SceneColorimetryEstimates"], ["scrd", "ScreeningDesc"], ["scrn", "Screening"], ["targ", "CharTarget"], ["tech", "Technology"], ["vcgt", "VideoCardGamma"], ["view", "ViewingConditions"], ["vued", "ViewingCondDesc"], ["wtpt", "MediaWhitePoint"]]); 2660const St = { 2661 "4d2p": "Erdt Systems", 2662 AAMA: "Aamazing Technologies", 2663 ACER: "Acer", 2664 ACLT: "Acolyte Color Research", 2665 ACTI: "Actix Sytems", 2666 ADAR: "Adara Technology", 2667 ADBE: "Adobe", 2668 ADI: "ADI Systems", 2669 AGFA: "Agfa Graphics", 2670 ALMD: "Alps Electric", 2671 ALPS: "Alps Electric", 2672 ALWN: "Alwan Color Expertise", 2673 AMTI: "Amiable Technologies", 2674 AOC: "AOC International", 2675 APAG: "Apago", 2676 APPL: "Apple Computer", 2677 AST: "AST", 2678 "AT&T": "AT&T", 2679 BAEL: "BARBIERI electronic", 2680 BRCO: "Barco NV", 2681 BRKP: "Breakpoint", 2682 BROT: "Brother", 2683 BULL: "Bull", 2684 BUS: "Bus Computer Systems", 2685 "C-IT": "C-Itoh", 2686 CAMR: "Intel", 2687 CANO: "Canon", 2688 CARR: "Carroll Touch", 2689 CASI: "Casio", 2690 CBUS: "Colorbus PL", 2691 CEL: "Crossfield", 2692 CELx: "Crossfield", 2693 CGS: "CGS Publishing Technologies International", 2694 CHM: "Rochester Robotics", 2695 CIGL: "Colour Imaging Group, London", 2696 CITI: "Citizen", 2697 CL00: "Candela", 2698 CLIQ: "Color IQ", 2699 CMCO: "Chromaco", 2700 CMiX: "CHROMiX", 2701 COLO: "Colorgraphic Communications", 2702 COMP: "Compaq", 2703 COMp: "Compeq/Focus Technology", 2704 CONR: "Conrac Display Products", 2705 CORD: "Cordata Technologies", 2706 CPQ: "Compaq", 2707 CPRO: "ColorPro", 2708 CRN: "Cornerstone", 2709 CTX: "CTX International", 2710 CVIS: "ColorVision", 2711 CWC: "Fujitsu Laboratories", 2712 DARI: "Darius Technology", 2713 DATA: "Dataproducts", 2714 DCP: "Dry Creek Photo", 2715 DCRC: "Digital Contents Resource Center, Chung-Ang University", 2716 DELL: "Dell Computer", 2717 DIC: "Dainippon Ink and Chemicals", 2718 DICO: "Diconix", 2719 DIGI: "Digital", 2720 "DL&C": "Digital Light & Color", 2721 DPLG: "Doppelganger", 2722 DS: "Dainippon Screen", 2723 DSOL: "DOOSOL", 2724 DUPN: "DuPont", 2725 EPSO: "Epson", 2726 ESKO: "Esko-Graphics", 2727 ETRI: "Electronics and Telecommunications Research Institute", 2728 EVER: "Everex Systems", 2729 EXAC: "ExactCODE", 2730 Eizo: "Eizo", 2731 FALC: "Falco Data Products", 2732 FF: "Fuji Photo Film", 2733 FFEI: "FujiFilm Electronic Imaging", 2734 FNRD: "Fnord Software", 2735 FORA: "Fora", 2736 FORE: "Forefront Technology", 2737 FP: "Fujitsu", 2738 FPA: "WayTech Development", 2739 FUJI: "Fujitsu", 2740 FX: "Fuji Xerox", 2741 GCC: "GCC Technologies", 2742 GGSL: "Global Graphics Software", 2743 GMB: "Gretagmacbeth", 2744 GMG: "GMG", 2745 GOLD: "GoldStar Technology", 2746 GOOG: "Google", 2747 GPRT: "Giantprint", 2748 GTMB: "Gretagmacbeth", 2749 GVC: "WayTech Development", 2750 GW2K: "Sony", 2751 HCI: "HCI", 2752 HDM: "Heidelberger Druckmaschinen", 2753 HERM: "Hermes", 2754 HITA: "Hitachi America", 2755 HP: "Hewlett-Packard", 2756 HTC: "Hitachi", 2757 HiTi: "HiTi Digital", 2758 IBM: "IBM", 2759 IDNT: "Scitex", 2760 IEC: "Hewlett-Packard", 2761 IIYA: "Iiyama North America", 2762 IKEG: "Ikegami Electronics", 2763 IMAG: "Image Systems", 2764 IMI: "Ingram Micro", 2765 INTC: "Intel", 2766 INTL: "N/A (INTL)", 2767 INTR: "Intra Electronics", 2768 IOCO: "Iocomm International Technology", 2769 IPS: "InfoPrint Solutions Company", 2770 IRIS: "Scitex", 2771 ISL: "Ichikawa Soft Laboratory", 2772 ITNL: "N/A (ITNL)", 2773 IVM: "IVM", 2774 IWAT: "Iwatsu Electric", 2775 Idnt: "Scitex", 2776 Inca: "Inca Digital Printers", 2777 Iris: "Scitex", 2778 JPEG: "Joint Photographic Experts Group", 2779 JSFT: "Jetsoft Development", 2780 JVC: "JVC Information Products", 2781 KART: "Scitex", 2782 KFC: "KFC Computek Components", 2783 KLH: "KLH Computers", 2784 KMHD: "Konica Minolta", 2785 KNCA: "Konica", 2786 KODA: "Kodak", 2787 KYOC: "Kyocera", 2788 Kart: "Scitex", 2789 LCAG: "Leica", 2790 LCCD: "Leeds Colour", 2791 LDAK: "Left Dakota", 2792 LEAD: "Leading Technology", 2793 LEXM: "Lexmark International", 2794 LINK: "Link Computer", 2795 LINO: "Linotronic", 2796 LITE: "Lite-On", 2797 Leaf: "Leaf", 2798 Lino: "Linotronic", 2799 MAGC: "Mag Computronic", 2800 MAGI: "MAG Innovision", 2801 MANN: "Mannesmann", 2802 MICN: "Micron Technology", 2803 MICR: "Microtek", 2804 MICV: "Microvitec", 2805 MINO: "Minolta", 2806 MITS: "Mitsubishi Electronics America", 2807 MITs: "Mitsuba", 2808 MNLT: "Minolta", 2809 MODG: "Modgraph", 2810 MONI: "Monitronix", 2811 MONS: "Monaco Systems", 2812 MORS: "Morse Technology", 2813 MOTI: "Motive Systems", 2814 MSFT: "Microsoft", 2815 MUTO: "MUTOH INDUSTRIES", 2816 Mits: "Mitsubishi Electric", 2817 NANA: "NANAO", 2818 NEC: "NEC", 2819 NEXP: "NexPress Solutions", 2820 NISS: "Nissei Sangyo America", 2821 NKON: "Nikon", 2822 NONE: "none", 2823 OCE: "Oce Technologies", 2824 OCEC: "OceColor", 2825 OKI: "Oki", 2826 OKID: "Okidata", 2827 OKIP: "Okidata", 2828 OLIV: "Olivetti", 2829 OLYM: "Olympus", 2830 ONYX: "Onyx Graphics", 2831 OPTI: "Optiquest", 2832 PACK: "Packard Bell", 2833 PANA: "Matsushita Electric Industrial", 2834 PANT: "Pantone", 2835 PBN: "Packard Bell", 2836 PFU: "PFU", 2837 PHIL: "Philips Consumer Electronics", 2838 PNTX: "HOYA", 2839 POne: "Phase One A/S", 2840 PREM: "Premier Computer Innovations", 2841 PRIN: "Princeton Graphic Systems", 2842 PRIP: "Princeton Publishing Labs", 2843 QLUX: "Hong Kong", 2844 QMS: "QMS", 2845 QPCD: "QPcard AB", 2846 QUAD: "QuadLaser", 2847 QUME: "Qume", 2848 RADI: "Radius", 2849 RDDx: "Integrated Color Solutions", 2850 RDG: "Roland DG", 2851 REDM: "REDMS Group", 2852 RELI: "Relisys", 2853 RGMS: "Rolf Gierling Multitools", 2854 RICO: "Ricoh", 2855 RNLD: "Edmund Ronald", 2856 ROYA: "Royal", 2857 RPC: "Ricoh Printing Systems", 2858 RTL: "Royal Information Electronics", 2859 SAMP: "Sampo", 2860 SAMS: "Samsung", 2861 SANT: "Jaime Santana Pomares", 2862 SCIT: "Scitex", 2863 SCRN: "Dainippon Screen", 2864 SDP: "Scitex", 2865 SEC: "Samsung", 2866 SEIK: "Seiko Instruments", 2867 SEIk: "Seikosha",
vendor: 5,363 bytes, lines 2868-3015
2868 SGUY: "ScanGuy.com", 2869 SHAR: "Sharp Laboratories", 2870 SICC: "International Color Consortium", 2871 SONY: "Sony", 2872 SPCL: "SpectraCal", 2873 STAR: "Star", 2874 STC: "Sampo Technology", 2875 Scit: "Scitex", 2876 Sdp: "Scitex", 2877 Sony: "Sony", 2878 TALO: "Talon Technology", 2879 TAND: "Tandy", 2880 TATU: "Tatung", 2881 TAXA: "TAXAN America", 2882 TDS: "Tokyo Denshi Sekei", 2883 TECO: "TECO Information Systems", 2884 TEGR: "Tegra", 2885 TEKT: "Tektronix", 2886 TI: "Texas Instruments", 2887 TMKR: "TypeMaker", 2888 TOSB: "Toshiba", 2889 TOSH: "Toshiba", 2890 TOTK: "TOTOKU ELECTRIC", 2891 TRIU: "Triumph", 2892 TSBT: "Toshiba", 2893 TTX: "TTX Computer Products", 2894 TVM: "TVM Professional Monitor", 2895 TW: "TW Casper", 2896 ULSX: "Ulead Systems", 2897 UNIS: "Unisys", 2898 UTZF: "Utz Fehlau & Sohn", 2899 VARI: "Varityper", 2900 VIEW: "Viewsonic", 2901 VISL: "Visual communication", 2902 VIVO: "Vivo Mobile Communication", 2903 WANG: "Wang", 2904 WLBR: "Wilbur Imaging", 2905 WTG2: "Ware To Go", 2906 WYSE: "WYSE Technology", 2907 XERX: "Xerox", 2908 XRIT: "X-Rite", 2909 ZRAN: "Zoran", 2910 Zebr: "Zebra Technologies", 2911 appl: "Apple Computer", 2912 bICC: "basICColor", 2913 berg: "bergdesign", 2914 ceyd: "Integrated Color Solutions", 2915 clsp: "MacDermid ColorSpan", 2916 ds: "Dainippon Screen", 2917 dupn: "DuPont", 2918 ffei: "FujiFilm Electronic Imaging", 2919 flux: "FluxData", 2920 iris: "Scitex", 2921 kart: "Scitex", 2922 lcms: "Little CMS", 2923 lino: "Linotronic", 2924 none: "none", 2925 ob4d: "Erdt Systems", 2926 obic: "Medigraph", 2927 quby: "Qubyx Sarl", 2928 scit: "Scitex", 2929 scrn: "Dainippon Screen", 2930 sdp: "Scitex", 2931 siwi: "SIWI GRAFIKA", 2932 yxym: "YxyMaster" 2933 }, 2934 Ct = { 2935 scnr: "Scanner", 2936 mntr: "Monitor", 2937 prtr: "Printer", 2938 link: "Device Link", 2939 abst: "Abstract", 2940 spac: "Color Space Conversion Profile", 2941 nmcl: "Named Color", 2942 cenc: "ColorEncodingSpace profile", 2943 mid: "MultiplexIdentification profile", 2944 mlnk: "MultiplexLink profile", 2945 mvis: "MultiplexVisualization profile", 2946 nkpf: "Nikon Input Device Profile (NON-STANDARD!)" 2947 }; 2948U(B, "icc", [[4, St], [12, Ct], [40, Object.assign({}, St, Ct)], [48, St], [80, St], [64, { 2949 0: "Perceptual", 2950 1: "Relative Colorimetric", 2951 2: "Saturation", 2952 3: "Absolute Colorimetric" 2953}], ["tech", { 2954 amd: "Active Matrix Display", 2955 crt: "Cathode Ray Tube Display", 2956 kpcd: "Photo CD", 2957 pmd: "Passive Matrix Display", 2958 dcam: "Digital Camera", 2959 dcpj: "Digital Cinema Projector", 2960 dmpc: "Digital Motion Picture Camera", 2961 dsub: "Dye Sublimation Printer", 2962 epho: "Electrophotographic Printer", 2963 esta: "Electrostatic Printer", 2964 flex: "Flexography", 2965 fprn: "Film Writer", 2966 fscn: "Film Scanner", 2967 grav: "Gravure", 2968 ijet: "Ink Jet Printer", 2969 imgs: "Photo Image Setter", 2970 mpfr: "Motion Picture Film Recorder", 2971 mpfs: "Motion Picture Film Scanner", 2972 offs: "Offset Lithography", 2973 pjtv: "Projection Television", 2974 rpho: "Photographic Paper Printer", 2975 rscn: "Reflective Scanner", 2976 silk: "Silkscreen", 2977 twax: "Thermal Wax Printer", 2978 vidc: "Video Camera", 2979 vidm: "Video Monitor" 2980}]]); 2981class yt extends re { 2982 static canHandle(e, t, i) { 2983 return 237 === e.getUint8(t + 1) && "Photoshop" === e.getString(t + 4, 9) && void 0 !== this.containsIptc8bim(e, t, i); 2984 } 2985 static headerLength(e, t, i) { 2986 let n, 2987 s = this.containsIptc8bim(e, t, i); 2988 if (void 0 !== s) return n = e.getUint8(t + s + 7), n % 2 != 0 && (n += 1), 0 === n && (n = 4), s + 8 + n; 2989 } 2990 static containsIptc8bim(e, t, i) { 2991 for (let n = 0; n < i; n++) if (this.isIptcSegmentHead(e, t + n)) return n; 2992 } 2993 static isIptcSegmentHead(e, t) { 2994 return 56 === e.getUint8(t) && 943868237 === e.getUint32(t) && 1028 === e.getUint16(t + 4); 2995 } 2996 parse() { 2997 let { 2998 raw: e 2999 } = this, 3000 t = this.chunk.byteLength - 1, 3001 i = !1; 3002 for (let n = 0; n < t; n++) if (28 === this.chunk.getUint8(n) && 2 === this.chunk.getUint8(n + 1)) { 3003 i = !0; 3004 let t = this.chunk.getUint16(n + 3), 3005 s = this.chunk.getUint8(n + 2), 3006 r = this.chunk.getLatin1String(n + 5, t); 3007 e.set(s, this.pluralizeValue(e.get(s), r)), n += 4 + t; 3008 } else if (i) break; 3009 return this.translate(), this.output; 3010 } 3011 pluralizeValue(e, t) { 3012 return void 0 !== e ? e instanceof Array ? (e.push(t), e) : [e, t] : t; 3013 } 3014} 3015c(yt, "type", "iptc"), c(yt, "translateValues", !1), c(yt, "reviveValues", !1), T.set("iptc", yt), U(E, "iptc", [[0, "ApplicationRecordVersion"], [3, "ObjectTypeReference"], [4, "ObjectAttributeReference"], [5, "ObjectName"], [7, "EditStatus"], [8, "EditorialUpdate"], [10, "Urgency"], [12, "SubjectReference"], [15, "Category"], [20, "SupplementalCategories"], [22, "FixtureIdentifier"], [25, "Keywords"], [26, "ContentLocationCode"], [27, "ContentLocationName"], [30, "ReleaseDate"], [35, "ReleaseTime"], [37, "ExpirationDate"], [38, "ExpirationTime"], [40, "SpecialInstructions"], [42, "ActionAdvised"], [45, "ReferenceService"], [47, "ReferenceDate"], [50, "ReferenceNumber"], [55, "DateCreated"], [60, "TimeCreated"], [62, "DigitalCreationDate"], [63, "DigitalCreationTime"], [65, "OriginatingProgram"], [70, "ProgramVersion"], [75, "ObjectCycle"], [80, "Byline"], [85, "BylineTitle"], [90, "City"], [92, "Sublocation"], [95, "State"], [100, "CountryCode"], [101, "Country"], [103, "OriginalTransmissionReference"], [105, "Headline"], [110, "Credit"], [115, "
3015Source"], [116, "CopyrightNotice"], [118, "Contact"], [120, "Caption"], [121, "LocalCaption"], [122, "Writer"], [125, "RasterizedCaption"], [130, "ImageType"], [131, "ImageOrientation"], [135, "LanguageIdentifier"], [150, "AudioType"], [151, "AudioSamplingRate"], [152, "AudioSamplingResolution"], [153, "AudioDuration"], [154, "AudioOutcue"], [184, "JobID"], [185, "MasterDocumentID"], [186, "ShortDocumentID"], [187, "UniqueDocumentID"], [188, "OwnerID"], [200, "ObjectPreviewFileFormat"], [201, "ObjectPreviewFileVersion"], [202, "ObjectPreviewData"], [221, "Prefs"], [225, "ClassifyState"], [228, "SimilarityIndex"], [230, "DocumentNotes"], [231, "DocumentHistory"], [232, "ExifCameraInfo"], [255, "CatalogSets"]]), U(B, "iptc", [[10, { 3016 0: "0 (reserved)", 3017 1: "1 (most urgent)", 3018 2: "2", 3019 3: "3", 3020 4: "4", 3021 5: "5 (normal urgency)", 3022 6: "6", 3023 7: "7", 3024 8: "8 (least urgent)", 3025 9: "9 (user-defined priority)" 3026}], [75, { 3027 a: "Morning", 3028 b: "Both Morning and Evening", 3029 p: "Evening" 3030}], [131, { 3031 L: "Landscape", 3032 P: "Portrait", 3033 S: "Square" 3034}]]); 3035/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (tt); 3036 3037 3038/***/ }) 3039 3040}]); 3041//# sourceMappingURL=default-src_app_services_photo_photo_service_ts.js.map
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.