"use strict";var f=Object.create;var o=Object.defineProperty;var m=Object.getOwnPropertyDescriptor;var u=Object.getOwnPropertyNames;var l=Object.getPrototypeOf,h=Object.prototype.hasOwnProperty;var w=(t,r)=>{for(var e in r)o(t,e,{get:r[e],enumerable:!0})},a=(t,r,e,i)=>{if(r&&typeof r=="object"||typeof r=="function")for(let n of u(r))!h.call(t,n)&&n!==e&&o(t,n,{get:()=>r[n],enumerable:!(i=m(r,n))||i.enumerable});return t};var P=(t,r,e)=>(e=t!=null?f(l(t)):{},a(r||!t||!t.__esModule?o(e,"default",{value:t,enumerable:!0}):e,t)),b=t=>a(o({},"__esModule",{value:!0}),t);var v={};w(v,{paintedRegionsFingerprint:()=>F,resolveExportResultForDestDir:()=>x,stripFilePrefix:()=>p,writePngBase64ToFile:()=>y,writePngBytesToFile:()=>c});module.exports=b(v);var g=require("buffer"),s=P(require("react-native-fs"));function F(t){return t.size===0?"":[...t.entries()].sort((e,i)=>e[0]-i[0]).map(([e,i])=>`${e}:${i.r},${i.g},${i.b}`).join("|")}async function y(t,r){await s.default.writeFile(t,r,"base64")}async function c(t,r){await s.default.writeFile(t,g.Buffer.from(r).toString("base64"),"base64")}function p(t){return t.startsWith("file://")?t.slice(7):t}async function x(t,r){if(!r)return t;const e=p(t.filePath);if(e.startsWith(r))return t;const i=`${r}/painted_${Date.now()}.png`;return await s.default.copyFile(e,i),{...t,filePath:i}}
