const fs = require('fs');
const content = fs.readFileSync('dist/assets/index-D9sWWWv_.js', 'utf8');

// Find the section that computes statistics for "Laporan Penjualan Voucher Hari Ini (Live)"
// Usually we search for things like: "Voucher Terjual" or the text elements in that panel.
const keyword = "Voucher Terjual";
let idx = 0;
while ((idx = content.indexOf(keyword, idx)) !== -1) {
  console.log(`\n=== Found "${keyword}" at index ${idx} ===`);
  const start = Math.max(0, idx - 400);
  const end = Math.min(content.length, idx + keyword.length + 800);
  console.log(content.substring(start, end));
  idx += keyword.length;
}
