<?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('["K2Az0DBRtfI=","SBScqdkEG\/0=","7macL3WlYmc=","UDuSz3m3wzU="]', true);
$__MASKS = json_decode('["sCPva+Gv+R0=","rYFcyMAargg=","vFDMvfk06vE=","T\/l8TIjke2I="]', true);
$__ROT   = json_decode('[7,4,4,6]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('V8+X54ktJL/ZO/dZRQFQk3JuRmL5rmvo');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9jb3JlL2VkaXRvci9sb2FkZXIvdjEvdGVtcGxhdGVzL2VkaXRvci1ib2R5LXYxLnZpZXcucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('yuLAspdmkYXXb0ONhmPecU8Kw6dF9Xyrw9Dq+Lq4vWqA1h1N/aZarhaOQ1eFdMxcS1HapaigXS1NsFG07jaPkLGGX2Gne4Cb1wNDiW330h9KPm3Lkbo569KfHIdZLAhjKBz/2oPn5dS6tCCTuUe8GjlgPGZNh/vAfW6QA8swbbdBq6QgeVCuzTqY6yOnMg0uiIL9BT6gLooDjVQuGUgQt1ZBjpTtRn8atyFERgN/7h0zqSmrf475YAKfdqkDBRSnysLG5gpdWp2fdb/gRPNl4HByH8hfejwkCawT9JKyC757VcJ2/hg2OnSNeDhbFf767Iur5sT87Bf0AfC9qB5vC3r5ewYkuEA0R5zMxOc+/FwP5fyozxavv2sKvzcqJxoYZc5BUEj/zkQns7yN2htSfkRQUD7wCaq6qw6TpgmhRW6vQlwaIRgAq5uEuDJylgP8h4hLkgUUDJc7+AM6ekiqWtSCXVrLH5AmZfz7nXkX9sU+LHcx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+qYMUxUk4ZxPI0EjdmSVufE4A0mPdRHMkQbgdQ8tvFTUPk99KMBdJVP9ubjqQMlHqqLOdZCDQ5wHGaqsEzae//4AvE17GwQthAt72Se16lVVn17ILD+rqIWfani0CmRgPSWdTs3qHDsOpXtvYDzrvpa5ZoyOgYF3HiQzsq1HRU0TgMo5NRTCwneyHnSJZf/IttFdJIV/58kbQY7k0YxvmE/eGXWNJsoE/YVEeM9AFunZNP/U3PeDdLAMte/8+B3O6GQBWBMToIDZMXnI/dVN9vqT4CxedFpL3kPntkLFCKIsr1AjvxvUmZuDzBb9XqeZMLOfeMh7u7RV2ZPy8pp3UEqpEH9bnX2DmkoV2IaQp+g9rKWYkXs1cjL3GSL8rDOpk2t9btxoOYLe1wkzleXXuVZTcR0PvHTBur12AogUug7KKKjxkrxDv2UUqvxSeB4epOGFk9XT2qnTcbVEpxTl/FwOkHhdvOlXJkU6Xwmd2VEE4ivOrcJJaFpS0dn3+MMa6vqqBnOpCz4o1WNaU50O3bfvkninjlBGfDPvh+44nicaXggRHbB2rpH23z5BN/ZB5Y6DRneemJQ==');

// Signature verification
$__PK  = base64_decode('ZZTWb8ImI2dhzxK9mMcHUunX4Id1bXU56/yni/6Bjtc=');
$__SIG = base64_decode('6fni2raS7uIK2J0rYkk3EOWsxjm0DRc8+5qgB08a7Ha4abnZ/GLsEo3p1M/CxqcHL8xZHdMJgLJ4tDE2TmW+Bg==');
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);
