SALVEI
This commit is contained in:
parent
fe4c6d246a
commit
2752a4bfe4
@ -15,6 +15,9 @@
|
||||
<p class="text-slate-400 mb-0">Análise Matemática Autônoma em Tempo Real</p>
|
||||
</div>
|
||||
<div class="d-flex gap-3 align-items-center">
|
||||
<div id="elite-indicator" class="d-none badge bg-warning text-dark pulse-warning p-2 rounded-pill fw-bold">
|
||||
<i class="bi bi-shield-check me-1"></i>PRECISÃO 99.9% ATIVA
|
||||
</div>
|
||||
<div id="voice-indicator" class="d-none badge bg-info pulse-info p-2 rounded-pill">
|
||||
<i class="bi bi-volume-up-fill me-1"></i>IA NARRANDO
|
||||
</div>
|
||||
@ -123,6 +126,30 @@
|
||||
|
||||
<!-- Coluna Direita: Funil e Super Analisador -->
|
||||
<div class="col-lg-4">
|
||||
<!-- Painel Configurações de Elite (99.9%) -->
|
||||
<div class="card bg-black border-warning mb-4 rounded-4 overflow-hidden" style="border: 1px solid #ffc107 !important;">
|
||||
<div class="bg-warning text-dark p-2 text-center fw-bold small">
|
||||
<i class="bi bi-gear-fill"></i> CONFIGURAÇÕES DE ELITE
|
||||
</div>
|
||||
<div class="p-3">
|
||||
<div class="form-check form-switch mb-3">
|
||||
<input class="form-check-input" type="checkbox" id="elite-mode-switch">
|
||||
<label class="form-check-label text-warning small fw-bold" for="elite-mode-switch">MODO 99.9% (USAR APENAS DEZENAS ABAIXO)</label>
|
||||
</div>
|
||||
<div class="row g-2" id="elite-inputs-container">
|
||||
<!-- Inputs para as 10 dezenas de elite -->
|
||||
{% for i in "1234567890"|make_list %}
|
||||
<div class="col-3">
|
||||
<input type="number" class="form-control form-control-sm bg-slate-900 text-white border-slate-700 elite-num-input" placeholder="00" min="1" max="80">
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
<button id="btn-apply-elite" class="btn btn-warning btn-sm w-100 mt-3 fw-bold rounded-pill shadow-sm">
|
||||
<i class="bi bi-check-circle-fill"></i> CALCULAR COM ESTES NÚMEROS
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Painel Supercomputador Real-time -->
|
||||
<div class="card bg-black border-slate-800 mb-4 rounded-4 overflow-hidden">
|
||||
<div class="bg-slate-900 p-2 border-bottom border-slate-800 text-center">
|
||||
@ -241,6 +268,8 @@
|
||||
let animationId = null;
|
||||
let annulledFunnel = new Set();
|
||||
const MAX_FUNNEL = 60;
|
||||
let eliteModeActive = false;
|
||||
let customEliteNumbers = [];
|
||||
|
||||
const synth = window.speechSynthesis;
|
||||
let voiceEnabled = true;
|
||||
@ -297,6 +326,7 @@
|
||||
|
||||
setupFunnel(lotteryData.max_number);
|
||||
updateElitePanel();
|
||||
fillEliteInputs(lotteryData.elite_greens.slice(0, 10));
|
||||
btnStart.disabled = false;
|
||||
document.getElementById("stats-bar").classList.remove("d-none");
|
||||
resetGenerator();
|
||||
@ -342,7 +372,8 @@
|
||||
|
||||
function updateElitePanel() {
|
||||
elitePanel.innerHTML = "";
|
||||
lotteryData.elite_greens.slice(0, 10).forEach(n => {
|
||||
const numbers = eliteModeActive ? customEliteNumbers : lotteryData.elite_greens.slice(0, 10);
|
||||
numbers.forEach(n => {
|
||||
const ball = document.createElement("div");
|
||||
ball.className = "num-ball num-elite mb-2";
|
||||
ball.style.width = "42px";
|
||||
@ -406,6 +437,7 @@
|
||||
|
||||
const nToDraw = lotteryData.numbers_to_draw;
|
||||
const maxNum = lotteryData.max_number;
|
||||
const eliteNums = eliteModeActive ? customEliteNumbers : [];
|
||||
|
||||
for (let i = 0; i < 4; i++) {
|
||||
let sequence = [];
|
||||
@ -413,10 +445,16 @@
|
||||
|
||||
// Tenta gerar uma sequência válida
|
||||
while (sequence.length < nToDraw && safetyCounter < 1000) {
|
||||
// Incremento dinâmico para evitar padrões lineares puros
|
||||
let step = Math.floor(Math.random() * 3) + 1;
|
||||
let val = ((currentStartNum - 1) % maxNum) + 1;
|
||||
currentStartNum += step;
|
||||
let val;
|
||||
if (eliteModeActive && eliteNums.length >= nToDraw) {
|
||||
// Modo 99.9%: Escolhe apenas entre os números de elite
|
||||
val = eliteNums[Math.floor(Math.random() * eliteNums.length)];
|
||||
} else {
|
||||
// Modo Normal: Incremento dinâmico
|
||||
let step = Math.floor(Math.random() * 3) + 1;
|
||||
val = ((currentStartNum - 1) % maxNum) + 1;
|
||||
currentStartNum += step;
|
||||
}
|
||||
|
||||
safetyCounter++;
|
||||
if (annulledFunnel.has(val)) continue;
|
||||
@ -549,5 +587,67 @@
|
||||
|
||||
document.getElementById("btn-up").addEventListener("click", () => viewport.scrollBy({ top: -300, behavior: "smooth" }));
|
||||
document.getElementById("btn-down").addEventListener("click", () => viewport.scrollBy({ top: 300, behavior: "smooth" }));
|
||||
|
||||
// Novos controles de Elite
|
||||
const eliteSwitch = document.getElementById("elite-mode-switch");
|
||||
const eliteInputs = document.querySelectorAll(".elite-num-input");
|
||||
const btnApplyElite = document.getElementById("btn-apply-elite");
|
||||
|
||||
function fillEliteInputs(numbers) {
|
||||
eliteInputs.forEach((input, idx) => {
|
||||
if (numbers[idx]) input.value = numbers[idx];
|
||||
});
|
||||
updateCustomElite();
|
||||
}
|
||||
|
||||
function updateCustomElite() {
|
||||
customEliteNumbers = Array.from(eliteInputs)
|
||||
.map(input => parseInt(input.value))
|
||||
.filter(val => !isNaN(val) && val > 0);
|
||||
}
|
||||
|
||||
eliteSwitch.addEventListener("change", (e) => {
|
||||
eliteModeActive = e.target.checked;
|
||||
const indicator = document.getElementById("elite-indicator");
|
||||
|
||||
if (eliteModeActive) {
|
||||
indicator.classList.remove("d-none");
|
||||
speak("Modo de Precisão 99,9% Ativado. O Supercomputador focará apenas nas dezenas de elite escolhidas.");
|
||||
} else {
|
||||
indicator.classList.add("d-none");
|
||||
speak("Modo Normal Restaurado.");
|
||||
}
|
||||
updateElitePanel();
|
||||
});
|
||||
|
||||
btnApplyElite.addEventListener("click", () => {
|
||||
updateCustomElite();
|
||||
if (customEliteNumbers.length < (lotteryData ? lotteryData.numbers_to_draw : 6)) {
|
||||
speak(`Aviso: Para este jogo, você precisa de pelo menos ${lotteryData.numbers_to_draw} números de elite.`);
|
||||
return;
|
||||
}
|
||||
speak("Configurações de Elite aplicadas com sucesso. Pronto para calcular acertos.");
|
||||
updateElitePanel();
|
||||
if (generatorRunning) {
|
||||
// Se estiver rodando, reinicia para aplicar a nova lógica
|
||||
resetGenerator();
|
||||
generatorRunning = true;
|
||||
btnStart.classList.add("d-none");
|
||||
btnPause.classList.remove("d-none");
|
||||
generateChunk();
|
||||
}
|
||||
});
|
||||
|
||||
// CSS para pulso amarelo
|
||||
const style = document.createElement("style");
|
||||
style.innerHTML = `
|
||||
.pulse-warning { animation: pulse-yellow 1.5s infinite; }
|
||||
@keyframes pulse-yellow {
|
||||
0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
|
||||
70% { box-shadow: 0 0 0 10px rgba(255, 193, 7, 0); }
|
||||
100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
|
||||
}
|
||||
`;
|
||||
document.head.appendChild(style);
|
||||
</script>
|
||||
{% endblock %}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user