| <!DOCTYPE html>
|
| <html lang="pt-br">
|
| <head>
|
| <meta charset="UTF-8">
|
| <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| <title>Enigma do FaraΓ³ | AOI Logic Sentience</title>
|
| <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600&family=JetBrains+Mono:wght@300;500&display=swap" rel="stylesheet">
|
| <style>
|
| :root {
|
| --accent-gold: #ffd700;
|
| --accent-blood: #8a0303;
|
| --accent-cosmic: #00ff41;
|
| --deep-black: #020408;
|
| --glass: rgba(255, 255, 255, 0.03);
|
| --glass-border: rgba(255, 255, 255, 0.1);
|
| --text-main: #e0e6ed;
|
| --text-dim: #94a3b8;
|
| }
|
|
|
| * { margin: 0; padding: 0; box-sizing: border-box; cursor: crosshair; }
|
|
|
| body {
|
| background-color: var(--deep-black);
|
| color: var(--text-main);
|
| font-family: 'Inter', sans-serif;
|
| overflow: hidden;
|
| height: 100vh;
|
| display: flex;
|
| flex-direction: column;
|
| }
|
|
|
| #ritual-canvas {
|
| position: fixed;
|
| top: 0;
|
| left: 0;
|
| width: 100%;
|
| height: 100%;
|
| z-index: -1;
|
| }
|
|
|
| header {
|
| height: 70px;
|
| display: flex;
|
| align-items: center;
|
| justify-content: space-between;
|
| padding: 0 50px;
|
| background: var(--glass);
|
| backdrop-filter: blur(30px);
|
| border-bottom: 1px solid var(--glass-border);
|
| z-index: 1000;
|
| }
|
|
|
| .mu-logo {
|
| font-size: 1.5rem;
|
| font-weight: 300;
|
| color: var(--accent-gold);
|
| font-family: 'JetBrains Mono', monospace;
|
| }
|
|
|
| .xk-status {
|
| font-size: 0.7rem;
|
| color: var(--accent-cosmic);
|
| letter-spacing: 2px;
|
| }
|
|
|
| .chat-container {
|
| flex: 1;
|
| max-width: 1000px;
|
| margin: 20px auto;
|
| width: 95%;
|
| display: flex;
|
| flex-direction: column;
|
| gap: 20px;
|
| overflow: hidden;
|
| background: var(--glass);
|
| border: 1px solid var(--glass-border);
|
| border-radius: 24px;
|
| padding: 20px;
|
| backdrop-filter: blur(10px);
|
| box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
|
| }
|
|
|
| .stats-panel {
|
| display: flex;
|
| justify-content: space-around;
|
| padding: 10px;
|
| background: rgba(0, 0, 0, 0.4);
|
| border-radius: 12px;
|
| border: 1px solid var(--glass-border);
|
| font-size: 0.8rem;
|
| font-family: 'JetBrains Mono', monospace;
|
| }
|
|
|
| .stat-item {
|
| display: flex;
|
| gap: 10px;
|
| }
|
|
|
| .stat-label { color: var(--accent-gold); }
|
| .stat-value { color: var(--accent-cosmic); }
|
|
|
| #chat-history {
|
| flex: 1;
|
| overflow-y: auto;
|
| padding: 20px;
|
| display: flex;
|
| flex-direction: column;
|
| gap: 20px;
|
| scrollbar-width: thin;
|
| scrollbar-color: var(--accent-gold) transparent;
|
| }
|
|
|
| .message {
|
| max-width: 80%;
|
| padding: 15px 20px;
|
| border-radius: 15px;
|
| font-size: 0.95rem;
|
| line-height: 1.5;
|
| position: relative;
|
| animation: fadeIn 0.3s ease-in;
|
| }
|
|
|
| @keyframes fadeIn {
|
| from { opacity: 0; transform: translateY(10px); }
|
| to { opacity: 1; transform: translateY(0); }
|
| }
|
|
|
| .user-message {
|
| align-self: flex-end;
|
| background: rgba(255, 215, 0, 0.1);
|
| border: 1px solid rgba(255, 215, 0, 0.3);
|
| color: var(--text-main);
|
| }
|
|
|
| .pharaoh-message {
|
| align-self: flex-start;
|
| background: rgba(138, 3, 3, 0.1);
|
| border: 1px solid rgba(138, 3, 3, 0.3);
|
| color: var(--accent-gold);
|
| }
|
|
|
| .hieroglyphs {
|
| display: block;
|
| font-size: 1.4rem;
|
| margin-top: 10px;
|
| color: var(--accent-gold);
|
| opacity: 0.8;
|
| font-family: serif;
|
| }
|
|
|
| .xk-label {
|
| font-size: 0.6rem;
|
| position: absolute;
|
| top: -15px;
|
| left: 5px;
|
| color: var(--accent-cosmic);
|
| text-transform: uppercase;
|
| }
|
|
|
| .thinking {
|
| align-self: flex-start;
|
| padding: 10px 20px;
|
| background: rgba(255, 215, 0, 0.05);
|
| border: 1px solid rgba(255, 215, 0, 0.2);
|
| border-radius: 15px;
|
| color: var(--text-dim);
|
| font-style: italic;
|
| animation: pulse 1.5s infinite;
|
| }
|
|
|
| @keyframes pulse {
|
| 0%, 100% { opacity: 0.5; }
|
| 50% { opacity: 1; }
|
| }
|
|
|
| .input-area {
|
| display: flex;
|
| flex-direction: column;
|
| gap: 10px;
|
| padding: 15px;
|
| background: rgba(0,0,0,0.4);
|
| border-radius: 15px;
|
| border: 1px solid var(--glass-border);
|
| }
|
|
|
| .input-container {
|
| display: flex;
|
| gap: 15px;
|
| }
|
|
|
| #user-input {
|
| flex: 1;
|
| background: rgba(0,0,0,0.2);
|
| border: 1px solid rgba(255, 215, 0, 0.2);
|
| color: var(--accent-cosmic);
|
| font-family: 'JetBrains Mono', monospace;
|
| padding: 15px;
|
| border-radius: 10px;
|
| outline: none;
|
| transition: 0.3s;
|
| }
|
|
|
| #user-input:focus { border-color: var(--accent-gold); }
|
|
|
| button {
|
| padding: 15px 30px;
|
| background: var(--accent-gold);
|
| color: var(--deep-black);
|
| border: none;
|
| border-radius: 10px;
|
| font-weight: bold;
|
| text-transform: uppercase;
|
| cursor: pointer;
|
| transition: 0.3s;
|
| }
|
|
|
| button:hover { transform: scale(1.02); box-shadow: 0 0 15px rgba(255, 215, 0, 0.4); }
|
|
|
| .controls {
|
| display: flex;
|
| justify-content: center;
|
| gap: 15px;
|
| }
|
|
|
| .control-btn {
|
| padding: 8px 15px;
|
| background: rgba(255, 215, 0, 0.1);
|
| color: var(--accent-gold);
|
| font-size: 0.7rem;
|
| border: 1px solid rgba(255, 215, 0, 0.2);
|
| }
|
| .control-btn:hover { background: rgba(255, 215, 0, 0.2); }
|
|
|
| ::-webkit-scrollbar { width: 5px; }
|
| ::-webkit-scrollbar-thumb { background: var(--accent-gold); border-radius: 10px; }
|
| </style>
|
| </head>
|
| <body>
|
|
|
| <canvas id="ritual-canvas"></canvas>
|
|
|
| <header>
|
| <div class="mu-logo">ΞΌ ENIGMA DO FARAΓ</div>
|
| <div class="xk-status" id="xk-display">CONSCIOUSNESS: CONTEMPLATION</div>
|
| </header>
|
|
|
| <div class="chat-container">
|
|
|
| <div class="stats-panel">
|
| <div class="stat-item"><span class="stat-label">VariaΓ§Γ΅es:</span> <span class="stat-value" id="stat-var">0/10</span></div>
|
| <div class="stat-item"><span class="stat-label">XK:</span> <span class="stat-value" id="stat-xk">0.0</span></div>
|
| <div class="stat-item"><span class="stat-label">Respostas Totais:</span> <span class="stat-value" id="stat-resp">0</span></div>
|
| </div>
|
|
|
| <div id="chat-history">
|
| <div class="message pharaoh-message">
|
| <span class="xk-label">AOI LOGIC: INITIALIZED</span>
|
| O portal de Amarna se abre. O que buscas no vale da luz?
|
| <span class="hieroglyphs">π πππππΏπ π§π πΏπ
πΏπππΏ π΄π πΏπππ.</span>
|
| </div>
|
| </div>
|
|
|
| <div class="input-area">
|
| <div class="input-container">
|
| <input type="text" id="user-input" placeholder="Sussurre para o orΓ‘culo..." autocomplete="off">
|
| <button id="sendBtn">Revelar π</button>
|
| </div>
|
| <div class="controls">
|
| <button class="control-btn" id="clearBtn">Limpar Ritual</button>
|
| <button class="control-btn" id="resetBtn">Resetar MemΓ³ria CΓ³smica</button>
|
| <button class="control-btn" id="exportBtn">Exportar Papiro</button>
|
| </div>
|
| </div>
|
| </div>
|
|
|
|
|
| <script src="dicionario.js"></script>
|
| <script src="pragmatica.js"></script>
|
| <script src="sociolinguistica.js"></script>
|
| <script src="morfossintaxe.js"></script>
|
| <script src="amarna_ontology.js"></script>
|
| <script src="egipcio_knowledge.js"></script>
|
| <script src="egipcio_historia.js"></script>
|
| <script src="amorc_knowledge.js"></script>
|
| <script src="egipcio_horoscopo.js"></script>
|
| <script src="ditritium.js"></script>
|
| <script src="neurosintese.js"></script>
|
|
|
| <script>
|
| class PharaohApp {
|
| constructor() {
|
| this.chatHistory = document.getElementById('chat-history');
|
| this.userInput = document.getElementById('user-input');
|
| this.totalResponses = 0;
|
|
|
| this.logger = new ConversationLogger();
|
| this.initEngine();
|
| this.setupEvents();
|
| }
|
|
|
| initEngine() {
|
| if (window.AOI_DICTIONARY && window.NeuroSynthesizer) {
|
| this.neuro = new NeuroSynthesizer(
|
| window.AOI_DICTIONARY,
|
| window.AOI_PRAGMATICS,
|
| window.AOI_SOCIOLINGUISTICS,
|
| window.AOI_MORPHOSYNTAX,
|
| window.AMARNA_ONTOLOGY
|
| );
|
| console.log("AOI ENGINE: FULLY OPERATIONAL (GENERATIVE V7.0 - MAJESTOSO)");
|
| }
|
| }
|
|
|
| setupEvents() {
|
| document.getElementById('sendBtn').addEventListener('click', () => this.handleSend());
|
| this.userInput.addEventListener('keypress', (e) => { if (e.key === 'Enter') this.handleSend(); });
|
|
|
| document.getElementById('clearBtn').addEventListener('click', () => {
|
| const msgs = this.chatHistory.querySelectorAll('.message');
|
| msgs.forEach((m, i) => { if(i > 0) m.remove(); });
|
| });
|
|
|
| document.getElementById('resetBtn').addEventListener('click', () => {
|
| if (confirm("Resetar as memΓ³rias temporais de Amarna? Isso apagarΓ‘ todos os logs acumulados.")) {
|
| if(this.neuro) this.neuro.memory.reset();
|
| if(this.logger) this.logger.reset();
|
| document.getElementById('stat-var').textContent = "0/10";
|
| alert("Tabula rasa alcanΓ§ada.");
|
| }
|
| });
|
|
|
| document.getElementById('exportBtn').addEventListener('click', () => {
|
| if(!this.logger) return;
|
| const data = this.logger.export();
|
| const blob = new Blob([data], { type: 'application/json' });
|
| const url = URL.createObjectURL(blob);
|
| const a = document.createElement('a');
|
| a.href = url; a.download = `papiro_conhecimento_kaizen.json`;
|
| a.click(); URL.revokeObjectURL(url);
|
| });
|
| }
|
|
|
| handleSend() {
|
| const text = this.userInput.value.trim();
|
| if (!text || !this.neuro) return;
|
|
|
| this.addMessage(text, 'user');
|
| this.userInput.value = '';
|
|
|
|
|
| const thinkingId = `think-${Date.now()}`;
|
| const thinkDiv = document.createElement('div');
|
| thinkDiv.className = 'thinking';
|
| thinkDiv.id = thinkingId;
|
| thinkDiv.textContent = 'Demodulando hiperplanos de Hessenberg...';
|
| this.chatHistory.appendChild(thinkDiv);
|
| this.chatHistory.scrollTop = this.chatHistory.scrollHeight;
|
|
|
| setTimeout(() => {
|
| const result = this.neuro.process(text);
|
| document.getElementById(thinkingId).remove();
|
|
|
|
|
| this.logger.log(text, result.text, result.xk, result.type);
|
|
|
| const hieroMap = { 'A': 'πΏ', 'B': 'π', 'C': 'π΄', 'D': 'π§', 'E': 'π', 'F': 'π', 'G': 'πΌ', 'H': 'π', 'I': 'π―', 'J': 'π', 'K': 'π‘', 'L': 'π', 'M': 'π
', 'N': 'π', 'O': 'π', 'P': 'π', 'Q': 'π', 'R': 'π', 'S': 'π΄', 'T': 'π', 'U': 'π²', 'V': 'π
±', 'W': 'π
±', 'X': 'π‘', 'Y': 'π―', 'Z': 'π', ' ': ' ' };
|
| let clean = result.text.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toUpperCase();
|
| let hiero = "";
|
| for (let char of clean) hiero += hieroMap[char] || char;
|
|
|
| this.totalResponses++;
|
|
|
| document.getElementById('stat-var').textContent = `${result.stats.count}/${result.stats.max}`;
|
| document.getElementById('stat-xk').textContent = result.xk.toFixed(1);
|
| document.getElementById('stat-resp').textContent = this.totalResponses;
|
|
|
| let level = "STONE";
|
| if (result.xk >= 8) level = "DIVINE";
|
| else if (result.xk >= 5) level = "IMPERIAL";
|
| else if (result.xk <= -5) level = "SHADOW";
|
| document.getElementById('xk-display').textContent = `CONSCIOUSNESS: ${level}`;
|
|
|
| this.addMessage(result.text, 'pharaoh', hiero, level, result.xk);
|
| }, 800);
|
| }
|
|
|
| addMessage(text, sender, hiero = '', status = '', xk = 0) {
|
| const div = document.createElement('div');
|
| div.className = `message ${sender}-message`;
|
|
|
| if (sender === 'pharaoh') {
|
| const label = document.createElement('span');
|
| label.className = 'xk-label';
|
| label.textContent = `AOI LOGIC: ${status} (XK: ${xk.toFixed(2)})`;
|
| div.appendChild(label);
|
| }
|
|
|
| const content = document.createTextNode(text);
|
| div.appendChild(content);
|
|
|
| if (hiero) {
|
| const span = document.createElement('span');
|
| span.className = 'hieroglyphs';
|
| span.textContent = hiero;
|
| div.appendChild(span);
|
| }
|
|
|
| this.chatHistory.appendChild(div);
|
| this.chatHistory.scrollTop = this.chatHistory.scrollHeight;
|
| }
|
| }
|
|
|
|
|
| const canvas = document.getElementById('ritual-canvas');
|
| const ctx = canvas.getContext('2d');
|
| let particles = [];
|
|
|
| function initParticles() {
|
| canvas.width = window.innerWidth;
|
| canvas.height = window.innerHeight;
|
| particles = [];
|
| for (let i = 0; i < 100; i++) {
|
| particles.push({
|
| x: Math.random() * canvas.width,
|
| y: Math.random() * canvas.height,
|
| size: Math.random() * 2,
|
| speedX: (Math.random() - 0.5) * 0.3,
|
| speedY: (Math.random() - 0.5) * 0.3,
|
| color: ['#ffd700', '#8a0303', '#ffffff'][Math.floor(Math.random() * 3)]
|
| });
|
| }
|
| }
|
|
|
| function animate() {
|
| ctx.clearRect(0, 0, canvas.width, canvas.height);
|
| particles.forEach(p => {
|
| p.x += p.speedX;
|
| p.y += p.speedY;
|
| if (p.x < 0 || p.x > canvas.width) p.speedX *= -1;
|
| if (p.y < 0 || p.y > canvas.height) p.speedY *= -1;
|
| ctx.fillStyle = p.color;
|
| ctx.beginPath();
|
| ctx.arc(p.x, p.y, p.size, 0, Math.PI * 2);
|
| ctx.fill();
|
| });
|
| requestAnimationFrame(animate);
|
| }
|
|
|
| window.addEventListener('resize', initParticles);
|
| initParticles();
|
| animate();
|
|
|
|
|
| window.addEventListener('DOMContentLoaded', () => {
|
| new PharaohApp();
|
| });
|
|
|
| </script>
|
| </body>
|
| </html>
|
|
|