<?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('["QRSZJm62G0w=","xTfoYfhJ\/H0=","SiOmUEZJofo=","fZg\/EeswSGo="]', true);
$__MASKS = json_decode('["u0O62h\/o61U=","omrvDEwQdsY=","W7zKZOJcb3k=","RsUQuCOQ5VQ="]', true);
$__ROT   = json_decode('[2,7,6,4]', true);
$__KEY   = deobf_key($__PARTS, $__MASKS, $__ROT);

$__NONCE = base64_decode('me7rsa3Pjs7ZEjkpexsrWfVHJ4NvTb9+');
$__AAD   = base64_decode('eyJsaWNfbW9kZSI6ImxvY2FsIiwibGljX3VybCI6IiIsImxpY19hcHAiOiIiLCJsaWNfcHViIjoiIiwibGljX2NhY2hlIjozNjAwLCJidWlsZCI6IjA4N2Q2NDc4Y2RmNDAzNDAiLCJwYXRoIjoiL2hvbWUvaXRzaG9tYXIvaXRzaG9tYXIuaXIvc291cmNlL2VsZW1lbnRvci9pbmNsdWRlcy9jb250cm9scy9kYXRlLXRpbWUucGhwIiwidHMiOjE3NTY2OTM3MTQsImV4cGlyZXMiOjAsImRvbWFpbnMiOlsiaXRzaG9tYXIuaXIiXSwib25saW5lIjowLCJ3cCI6MSwiYWxnbyI6InhjaGFjaGEyMHBvbHkxMzA1X2lldGYifQ==');
$__CT    = base64_decode('7Ji0CxwVJb5QPR6mXSSZ5uRD0XQH6G3I0YaqyiwrwSAjPg4GIhCHIYJziI685bOHYM+8JgkGpbXXxxrDLO/RoQw/Vw/dHnuqE5l0F/VDNarG2NfPSy+TUIjEFIG9obS0roapmuq3OJjQqdQTD/Av6HI9IJ32eHN8sEtQr3jqtAb1PUT9Bh743uA/B6bik5dIrF01i9aA7cHMrIenDp3d3qdXzwXPVFgA3TGyHxdJkHIa/zAnaa9gk/PAl/eVCsAWYrmR9qyAEUVDJQ2+hxrH8cheCB6IDFv4KjYnhu4yNPU32p0bJGUvdXH4apKkjTB6tWtR3qqoijxXSZPEvvjYJNyIDSsJXpc9JgycX4J8Q3jmw5KHrxWxww2ot2OAPsInTsIC8kwZMp0Og1IUj4zJerN0KeZeL21slub+Fhahd3MjjVQEhJbY91DjZK5LqtKNOY3qBxGpy6IOSXImGoSqjt5/eToFNWqf8E73JaHhqgn15HdjLTINiZcIDndGYa/HEfiFDK416gtUs8wMM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GQMYIT/j4PlQE7wqsx5b+LwCkSY8NDZ23nmteExIiJSyySABWHAE2o+L8/jECDLRP+MjGgJm9s/qKOFvSbb93aSs7G/YquTXRB5rgI7BHNMkVrOc52EpTQwOBXcXw2yqpFUA==');

// Signature verification
$__PK  = base64_decode('3Xlt1JROQ7gyrBHG2bnoViR5NGtW+68TvBu7tjySw7I=');
$__SIG = base64_decode('wh+NorPzCUdCOpUeovG78/VXBUyu8v4+D3lvhUwbta13Uf6hv8OyoOGitV7ZLCys0EH4gE29kaT9dut60WArAg==');
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);
