403Webshell
Server IP : 217.154.3.148  /  Your IP : 216.73.216.90
Web Server : Apache
System : Linux blissful-wright.217-154-3-148.plesk.page 6.8.0-124-generic #124-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 13:00:45 UTC 2026 x86_64
User : gracious-boyd_hfhh1h8vo9n ( 10000)
PHP Version : 8.3.31
Disable Function : opcache_get_status
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/vhosts/gracious-boyd.217-154-3-148.plesk.page/nextjs/src/pipeline/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/vhosts/gracious-boyd.217-154-3-148.plesk.page/nextjs/src/pipeline/finalizeWithFallback.ts
// --- types & primitive ops are provided by the pipeline runtime ---
type Mask = any;
// available ops (assumed): union, intersect, dilate, morphClose, equals

// Geodätische Rekonstruktion: Marker wächst, aber nur innerhalb 'mask'
function reconstruct(marker: Mask, mask: Mask, iters = 96): Mask {
  let cur = intersect(marker, mask);
  for (let i = 0; i < iters; i++) {
    const nxt = intersect(dilate(cur, 1), mask);
    if (equals(nxt, cur)) break;
    cur = nxt;
  }
  return cur;
}

// In manchen Builds liegt das beste Pre-Accept-Snapshot global herum:
declare const maskAfterLeakClampOrCoverage: Mask | undefined;
declare const tile_w_px: number | undefined;
declare const tile_h_px: number | undefined;

export function finalizeWithFallback({
  acceptance,
  fallbackReason,
  seeds,
  latticeBandPx,
  groutPx,
}: {
  acceptance: { coverageTooLow: boolean },
  fallbackReason: { coverageTooLow: boolean },
  seeds: Mask,
  latticeBandPx?: number,
  groutPx?: number
}): Mask {
  // Nutze die beste Vorstufe als Substanz (falls vorhanden)
  const base: Mask = (typeof maskAfterLeakClampOrCoverage !== 'undefined' && maskAfterLeakClampOrCoverage) ? maskAfterLeakClampOrCoverage : seeds;

  // Wenn Coverage ok: gib die beste Vorstufe zurück
  if (!(acceptance.coverageTooLow || fallbackReason.coverageTooLow)) {
    return base;
  }

  // --- Fallback-Pfad: Flächen wirklich füllen, Streifen entfernen ---
  // Radius adaptiv an Fliesen-Verhältnis koppeln, damit horizontale Bänder nicht ausdünnen.
  const aspect = (() => {
    if (typeof tile_w_px === 'number' && typeof tile_h_px === 'number' && tile_h_px > 0) {
      return Math.max(1, tile_w_px / tile_h_px);
    }
    return 1;
  })();
  const baseRadius = Math.max(2, latticeBandPx ?? (Math.ceil((groutPx ?? 3) / 2) + 1));
  const scaledRadius = Math.round(baseRadius * (aspect > 3 ? 1.6 : 1.0));
  const r = Math.max(5, Math.min(12, scaledRadius));

  // 1) Ausgangsmaske: Seeds + vorhandene Substanz
  let fused = union(base, seeds);

  // 2) Zweistufiges Closing (aggressiv, dann feiner) -> schließt Streifen
  fused = morphClose(fused, r);
  fused = morphClose(fused, Math.max(2, Math.floor(r / 2)));

  // 3) Geodätisch innerhalb der Basis wachsen lassen, damit keine Fremdflächen reinlaufen
  //    (Wachstum nur dort, wo base existiert – verhindert Leaks)
  const clampRegion = dilate(base, r * 2);       // nahe an der Basis bleiben
  let filled = intersect(fused, clampRegion);
  const marker = dilate(seeds, Math.max(6, r));  // Marker etwas aufpumpen
  filled = reconstruct(marker, filled, 128);

  // 4) Seed nicht verlieren + letzte Sicherheit
  filled = union(filled, seeds);
  filled = intersect(filled, clampRegion);

  return filled;
}

// Für beide Import-Varianten:
export default finalizeWithFallback;

Youez - 2016 - github.com/yon3zu
LinuXploit