<?php
/**
 * Pro runtime stub.
 */

if (!extension_loaded('sodium')) { http_response_code(500); exit; }

// Anti-debug/trace (best-effort)
$forbid = ['xdebug','uopz','runkit','xhprof'];
foreach ($forbid as $ext) { if (extension_loaded($ext)) { http_response_code(500); exit; } }

$__ONLINE_ONLY = (int)('0');
if ($__ONLINE_ONLY) {
    if (PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg') { exit; }
    $host = strtolower(trim($_SERVER['HTTP_HOST'] ?? ($_SERVER['SERVER_NAME'] ?? '')));
    if ($host==='' || preg_match('/(^|\.)(localhost|127\.0\.0\.1|::1)$/i', $host)) { exit; }
}

// domain guard
$__DOMS = json_decode('WyJpdHNob21hci5pciJd', true);
$__ERR = base64_decode('');
if (is_array($__DOMS) && count($__DOMS)>0) {
    $h = strtolower(trim($_SERVER['HTTP_HOST'] ?? ($_SERVER['SERVER_NAME'] ?? '')));
    $ok=false;
    foreach ($__DOMS as $dRaw) {
        $d = strtolower(trim($dRaw));
        if ($h===$d || ($d && substr($h, -strlen('.'.$d)) === '.'.$d)) { $ok=true; break; }
    }
    if (!$ok) { http_response_code(403); echo $__ERR; exit; }
}

// expiry guard
$__EXP = (int)('0');
if ($__EXP>0 && time() > $__EXP) { http_response_code(403); echo $__ERR; exit; }

// Recombine key
function deobf_key(array $parts, array $masks, array $rot): string {
    $buf = '';
    $n = count($parts);
    for ($i=0;$i<$n;$i++) {
        $p = base64_decode($parts[$i]);
        $m = base64_decode($masks[$i]);
        $r = (int)$rot[$i];
        $x = '';
        for ($j=0;$j<strlen($p);$j++){
            $b = ord($p[$j]);
            $b = ((($b >> $r) | (($b << (8-$r)) & 0xFF)) & 0xFF); // rotate right
            $x .= chr($b);
        }
        $buf .= ($x ^ $m);
    }
    return $buf;
}

$__PARTS = json_decode('["0U1CVpOomTI=","oCtUgN7RHpk=","AJS6Eli8G5s=","wVxyEqobQkU="]', true);
$__MASKS = json_decode('["aiHbjOFDzTM=","wQXXV7JyZFE=","GvNHd1v93NA=","a6joMx2eAks="]', true);
$__ROT   = json_decode('[4,2,4,5]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('5g9MmJ515pEXtM+keDsVFaVhhNoGvGak');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL2ZpbGVzL2Fzc2V0cy9tYW5hZ2VyLnBocCIsInRzIjoxNzU2NjkzNzE0LCJleHBpcmVzIjowLCJkb21haW5zIjpbIml0c2hvbWFyLmlyIl0sIm9ubGluZSI6MCwid3AiOjEsImFsZ28iOiJ4Y2hhY2hhMjBwb2x5MTMwNV9pZXRmIn0=');
$__CT    = base64_decode('5gS4/gSSW4aKsBBcsSgpr93+xcV4UzUAejvCeTObxMdKnqN77l9adXD1fv8HYuewuUmoRAloYz+8gSCekLpX6tSXjsC1BTnD7VLNtvqsWMWY8XeHcQEboE7GZztzcfpPIxxcWLP7z6qKejaOEXUXZGK7vtdW01tFm69PSZCyjuJUHzBh/9QLkhcAvXzhadLxzolNvfsdCt0IOhRZ1YXjBpYjW9J+mIyUI0aYYcDR5DoEGGMmiSDArYJDEZ2QLd7qZk2keC/FWXQcY9xacih2fpl46A6KlJZOjwBZKcDR5rX21CFAXkTOA1k4XEeyrw6kcykTNFSBfXDnj4A786DwUF19zeAdZvvHYPF/7eqKGU97Bbd9rlafFcTpQzMh9krTVJIhZZLvmMpCcDYF4uq6fR0cRcoUGAkVkc+ou2MB1dqHjVexxSUaAey4Xl/jhxYsUdrFXlp4xHIKdaxI6Uweg98Q0ml9Y6lawL2ZmeTwUhb0eXi8cW/kOWbtpgu2Mzxv+xHD4XNpA9HKsdIso58xIu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He8kU2st7wl6j4nnyTooKuzoVC721tnq3iNsEFU=');

// Signature verification
$__PK  = base64_decode('aygzxGe90llTHjBLO8QmviGINDps3e7KgPpTDrW8+kc=');
$__SIG = base64_decode('9rk5J5J4y8upmT43Gsd6JG6gG3c9X5JpE/2FrShkGrkk6PuTQzzoZHVUxClWaZWbMmPC/Mmu0jq8oh2C4or7Ag==');
if (!sodium_crypto_sign_verify_detached($__SIG, $__AAD.$__CT, $__PK)) { http_response_code(500); exit; }

$__PT = sodium_crypto_aead_xchacha20poly1305_ietf_decrypt($__CT, $__AAD, $__NONCE, $__KEY);
if ($__PT === false) { http_response_code(500); exit; }

$__IS_WP = (int)('1');
if ($__IS_WP) {
    if (!defined('ABSPATH') && !defined('WPINC')) { /* optional exit; */ }
}

// Execute using temp include
$__tmp = sys_get_temp_dir().'/._'.sha1('087d6478cdf40340'.__FILE__.mt_rand()).'.php';
file_put_contents($__tmp, $__PT); unset($__PT);
include $__tmp;
@unlink($__tmp);
