<!DOCTYPE HTML>
<html lang="en">
<head>
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-G8HFZPW8L0"></script>
    <script>
        window.dataLayer = window.dataLayer || [];
        function gtag(){dataLayer.push(arguments);}
        gtag('js', new Date());
        gtag('config', 'G-G8HFZPW8L0');
    </script>

    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>sitemap.xml: null</title>

    <link href="/css/bootstrap.min-a549af2a81cd9900ee897d8bc9c4b5e9.css" rel="stylesheet">
    <link href="/css/bootstrap-icons.min-5605c44f8b24ea5de37a959955b71eb6.css" rel="stylesheet">
    <link href="/css/modern-4f452c40246d3e10edf153c6f4c8310a.css" rel="stylesheet">
    <link href="/css/altcha-616608e3477d079ca07f33e9f1bc2a61.css" rel="stylesheet">

    <script async defer src="/js/altcha.min-3c580bb3a033cb01126b79359cb83b85.js" type="module"></script>
    <script src="/js/jquery-3.7.1.min-2c872dbe60f4ba70fb85356113d8b35e.js"></script>
    <script async src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js?client=ca-pub-7790154840101798"
            crossorigin="anonymous"></script>
</head>
<body class="d-flex flex-column min-vh-100 bg-light">

<nav class="navbar navbar-expand-lg sticky-top">
    <div class="container-xl">
        <a class="navbar-brand fw-bold text-primary" href="/" style="letter-spacing: -0.5px;">
            <i class="bi bi-upc-scan me-2"></i><span>Barkod Projesi</span>
        </a>

        <button class="navbar-toggler border-0" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav">
            <span class="navbar-toggler-icon"></span>
        </button>

        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav ms-auto align-items-center">

                <li class="nav-item">
                    <a class="nav-link" href="/">
                        <span>Ana Sayfa</span>
                    </a>
                </li>

                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown">Barkodlar</a>
                    <ul class="dropdown-menu shadow-sm border-0">
                        <li><a class="dropdown-item" href="/latest">
                            <i class="bi bi-clock-history me-2 text-muted"></i><span>Son Eklenenler</span>
                        </a></li>

                        <li><a class="dropdown-item" href="/by-country">
                            <i class="bi bi-globe me-2 text-muted"></i><span>Ülkeye göre ara</span>
                        </a></li>

                        <li><a class="dropdown-item" href="/generate">
                            <i class="bi bi-upc me-2 text-muted"></i><span>Oluştur</span>
                        </a></li>

                        <li><hr class="dropdown-divider"></li>

                        <li><a class="dropdown-item text-primary fw-medium" href="/download">
                            <i class="bi bi-plus-circle me-2"></i><span>Barkod Gönder</span>
                        </a></li>
                    </ul>
                </li>

                <li class="nav-item dropdown">
                    <a class="nav-link dropdown-toggle" href="#" data-bs-toggle="dropdown">Kaynaklar</a>
                    <ul class="dropdown-menu shadow-sm border-0">
                        <li><span class="dropdown-header text-uppercase small fw-bold text-muted">Apps</span></li>
                        <li><a class="dropdown-item" href="/download"><i class="bi bi-phone me-2 text-muted"></i><span>Mobil Uygulama</span></a></li>
                        <li><hr class="dropdown-divider"></li>

                        <li><span class="dropdown-header text-uppercase small fw-bold text-muted">Learn</span></li>
                        <li><a class="dropdown-item" href="/blog">Blog</a></li>
                        <li><a class="dropdown-item" href="/help">Yardım</a></li>
                        <li><hr class="dropdown-divider"></li>
                        <li><span class="dropdown-header text-uppercase small fw-bold text-muted">Developers</span></li>
                        <li><a class="dropdown-item" href="/barcode-api">Barkod API</a></li>
                    </ul>
                </li>

                <li class="nav-item ms-lg-3 d-flex gap-2">
                    <a href="/login" class="btn btn-outline-secondary btn-sm px-3 rounded-pill">Giriş Yap</a>
                    <a href="/signup" class="btn btn-primary btn-sm px-3 rounded-pill">Kayıt Ol</a>
                </li>

                

            </ul>
        </div>
    </div>
</nav>

<div class="container my-5 flex-grow-1">

    <div class="text-center mb-5">
        <h1 class="display-4 fw-bold font-monospace text-primary mb-2" id="barcodeName">sitemap.xml</h1>
        
    </div>

    <div class="row g-4">

        <div class="col-lg-8">

            

            <div class="card border-0 shadow-sm mb-4">
                <div class="card-header bg-white py-3 border-bottom">
                    <h5 class="card-title mb-0"><i class="bi bi-list-columns-reverse me-2"></i><span>Barkod Detayları</span></h5>
                </div>
                <div class="card-body p-0">
                    <table class="table table-hover mb-0">
                        <tbody>
                        <tr>
                            <th scope="row" class="ps-4 text-muted w-25">Kaynak:</th>
                            <td class="fw-medium" id="source"></td>
                        </tr>
                        <tr>
                            <th scope="row" class="ps-4 text-muted">Üretici Kodu:</th>
                            <td class="font-monospace" id="producerCode"></td>
                        </tr>
                        <tr>
                            <th scope="row" class="ps-4 text-muted">Ürün Kodu:</th>
                            <td class="font-monospace" id="productCode"></td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </div>

            <div class="card border-0 shadow-sm mb-4">
                <div class="card-body">
                    <h5 class="card-title mb-3"><i class="bi bi-graph-up me-2"></i><span>Arama İstatistikleri</span></h5>
                    <div class="row text-center g-2">
                        <div class="col-6 col-md">
                            <div class="p-2 border rounded bg-light">
                                <div class="small text-muted text-uppercase">Bugün:</div>
                                <div class="fw-bold fs-5" id="todaySearches">21</div>
                            </div>
                        </div>
                        <div class="col-6 col-md">
                            <div class="p-2 border rounded bg-light">
                                <div class="small text-muted text-uppercase">Geçen Hafta:</div>
                                <div class="fw-bold fs-5" id="weekSearches">134</div>
                            </div>
                        </div>
                        <div class="col-6 col-md">
                            <div class="p-2 border rounded bg-light">
                                <div class="small text-muted text-uppercase">Geçen Ay:</div>
                                <div class="fw-bold fs-5" id="monthSearches">671</div>
                            </div>
                        </div>
                        <div class="col-6 col-md">
                            <div class="p-2 border rounded bg-light">
                                <div class="small text-muted text-uppercase">Toplam Aramalar:</div>
                                <div class="fw-bold fs-5" id="totalSearches">1505</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <div>

    <script async defer src="https://cdn.jsdelivr.net/npm/altcha/dist/altcha.min.js" type="module"></script>

    <div class="card border-0 shadow-sm rounded-4 mt-4" id="comments-widget">
        <div class="card-header bg-white py-3 border-bottom-0">
            <h4 class="fw-bold mb-0">
                <i class="bi bi-chat-dots me-2 text-primary"></i>
                <span>Yorumlar</span>
                <span id="commentCountBadge" class="badge bg-light text-primary rounded-pill ms-2 fs-6">0</span>
            </h4>
        </div>

        <div class="card-body p-4">

            

            <div class="alert alert-light text-center mb-5">
                <small><a href="/login" class="fw-bold text-decoration-none">Tartışmaya katılmak için giriş yapın</a></small>
            </div>

            <div id="commentsListContainer" class="d-flex flex-column gap-4">

                
            </div>

            <div id="emptyCommentsState" style="display:block;" class="text-center py-4 text-muted">
                <i class="bi bi-chat-square-text fs-1 opacity-25 mb-2"></i>
                <p class="small">Henüz yorum yok. Düşüncelerinizi ilk paylaşan siz olun!</p>
            </div>

        </div>
    </div>

    <script>
        $(document).ready(function() {

            // --- 1. AJAX Add Comment ---
            $('#addCommentForm').on('submit', function(e) {
                e.preventDefault();

                const $btn = $('#submitCommentBtn');
                const $textarea = $('#newCommentText');

                const textVal = $textarea.val().trim();
                const altchaVal = $('input[name="altcha"]').val();

                if(!textVal) return;

                if(!altchaVal) {
                    alert("Please complete the verification check.");
                    return;
                }

                $btn.prop('disabled', true).html('<span class="spinner-border spinner-border-sm" role="status" aria-hidden="true"></span> Posting...');

                $.ajax({
                    url: `/secured/op/comment/sitemap.xml`,
                    type: 'POST',
                    data: {
                        text: textVal,
                        altcha: altchaVal
                    },
                    success: function(response) {
                        const verifiedBadge = response.isVerified ? '<i class="bi bi-patch-check-fill text-primary small" title="Verified"></i>' : '';

                        // Since the user just posted this, they own it. We render it with bg-primary and action buttons.
                        const newCommentHtml = `
                            <div id="comment-row-${response.id}" class="d-flex gap-3 position-relative animate-fade-in" style="display:none;">
                                <div class="flex-shrink-0">
                                    <div class="rounded-circle d-flex align-items-center justify-content-center text-white bg-primary" style="width: 40px; height: 40px;">
                                        <i class="bi bi-chat-left-text-fill small"></i>
                                    </div>
                                </div>
                                <div class="flex-grow-1">
                                    <div class="bg-light p-3 rounded-4 rounded-top-0 border border-primary-subtle">
                                        <div class="d-flex justify-content-between align-items-center mb-1">
                                            <div>
                                                ${verifiedBadge}
                                            </div>
                                            <small class="text-muted fw-bold text-primary">Just now</small>
                                        </div>
                                        <p class="mb-0 text-secondary" style="white-space: pre-wrap;" id="comment-text-${response.id}">${response.text}</p>
                                    </div>
                                    <div class="mt-1 ms-2">
                                        <button class="btn btn-link btn-sm text-muted text-decoration-none p-0 me-3" onclick="openEditModal('${response.id}')">
                                            <small class="fw-bold">Düzenle</small>
                                        </button>
                                        <button class="btn btn-link btn-sm text-danger text-decoration-none p-0" onclick="deleteCommentAjax('${response.id}')">
                                            <small class="fw-bold">Sil</small>
                                        </button>
                                    </div>
                                </div>
                            </div>
                        `;

                        $('#emptyCommentsState').hide();

                        const $newElement = $(newCommentHtml);
                        $('#commentsListContainer').prepend($newElement);
                        $newElement.fadeIn(400);

                        let currentCount = parseInt($('#commentCountBadge').text()) || 0;
                        $('#commentCountBadge').text(currentCount + 1);

                        $textarea.val('');
                        const altchaElement = document.querySelector('altcha-widget');
                        if(altchaElement && typeof altchaElement.reset === 'function') {
                            altchaElement.reset();
                        }
                    },
                    error: function(xhr) {
                        if(xhr.status === 401 || xhr.status === 403) {
                            window.location.href = `/login`;
                        } else {
                            alert("Failed to post comment or invalid Captcha. Please try again.");
                            const altchaElement = document.querySelector('altcha-widget');
                            if(altchaElement && typeof altchaElement.reset === 'function') {
                                altchaElement.reset();
                            }
                        }
                    },
                    complete: function() {
                        $btn.prop('disabled', false).html('<span>Gönder</span> <i class="bi bi-send ms-1"></i>');
                    }
                });
            });
        });

        // --- 2. AJAX Delete Comment ---
        function deleteCommentAjax(commentId) {
            if(confirm('Bu yorumu silmek istediğinizden emin misiniz?')) {
                $.ajax({
                    url: `/secured/op/comment/delete/sitemap.xml/${commentId}`,
                    type: 'POST',
                    success: function() {
                        $(`#comment-row-${commentId}`).fadeOut(300, function() {
                            $(this).remove();
                            let currentCount = parseInt($('#commentCountBadge').text()) || 0;
                            let newCount = Math.max(0, currentCount - 1);
                            $('#commentCountBadge').text(newCount);

                            if(newCount === 0) {
                                $('#emptyCommentsState').fadeIn(300);
                            }
                        });
                    },
                    error: function(xhr) {
                        if(xhr.status === 401 || xhr.status === 403) {
                            window.location.href = `/login`;
                        } else {
                            alert("Failed to delete comment.");
                        }
                    }
                });
            }
        }
    </script>
</div>

        </div>

        <div class="col-lg-4">

            <div class="card border-0 shadow-sm mb-4">
                <div class="card-body text-center">
                    <h5 class="card-title mb-3">Müşteri Memnuniyeti</h5>

                    <div class="mb-4">
                        <p class="small text-muted mb-2">Bu ürün bilgisi faydalı oldu mu?</p>
                        <div class="d-flex justify-content-center gap-2">
                            <button class="btn btn-outline-success rounded-pill px-4 vote-btn" id="voteGood">
                                <i class="bi bi-hand-thumbs-up-fill"></i> <span>👍 İyi</span>
                            </button>
                            <button class="btn btn-outline-danger rounded-pill px-4 vote-btn" id="voteBad">
                                <i class="bi bi-hand-thumbs-down-fill"></i> <span>👎 Kötü</span>
                            </button>
                        </div>
                        <div class="mt-2 small text-muted" id="voteResult">
                            <span class="text-success fw-bold">0</span> /
                            <span class="text-danger fw-bold">0</span>
                        </div>
                    </div>

                    <hr class="text-muted opacity-25">

                    <div class="mt-4">
                        <p class="small text-muted mb-2">Bu ürünü tavsiye eder misiniz?</p>
                        <div class="d-flex justify-content-center gap-2">
                            <button class="btn btn-outline-success rounded-pill px-4 recommend-btn" id="recommendYes">
                                <i class="bi bi-check-lg"></i> <span>✅ Evet</span>
                            </button>
                            <button class="btn btn-outline-danger rounded-pill px-4 recommend-btn" id="recommendNo">
                                <i class="bi bi-x-lg"></i> <span>❌ Hayır</span>
                            </button>
                        </div>
                        <div class="mt-2 small text-muted" id="yesNoResult">
                            <span class="text-success fw-bold">0</span> /
                            <span class="text-danger fw-bold">0</span>
                        </div>
                    </div>
                </div>
            </div>

            <div class="card border-0 shadow-sm mb-4">
                <div class="card-header bg-white py-3 border-bottom">
                    <h6 class="mb-0 fw-bold">İlk 10 Ülke</h6>
                </div>
                <div class="card-body">
                    <div id="topCountries">
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Vietnam</span>
                                <span class="text-muted">2</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="2"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">United States</span>
                                <span class="text-muted">929</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="929"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">United Kingdom</span>
                                <span class="text-muted">34</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="34"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">United Arab Emirates</span>
                                <span class="text-muted">2</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="2"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">The Netherlands</span>
                                <span class="text-muted">3</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="3"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Thailand</span>
                                <span class="text-muted">31</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="31"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Taiwan</span>
                                <span class="text-muted">1</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="1"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">South Korea</span>
                                <span class="text-muted">8</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="8"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Singapore</span>
                                <span class="text-muted">32</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="32"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Seychelles</span>
                                <span class="text-muted">1</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="1"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Russia</span>
                                <span class="text-muted">6</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="6"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Philippines</span>
                                <span class="text-muted">4</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="4"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Nigeria</span>
                                <span class="text-muted">7</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="7"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Japan</span>
                                <span class="text-muted">4</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="4"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Indonesia</span>
                                <span class="text-muted">5</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="5"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Hong Kong</span>
                                <span class="text-muted">61</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="61"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Germany</span>
                                <span class="text-muted">35</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="35"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">China</span>
                                <span class="text-muted">326</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="326"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Canada</span>
                                <span class="text-muted">11</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="11"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                        <div class="mb-3">
                            <div class="d-flex justify-content-between small mb-1">
                                <span class="fw-medium">Brazil</span>
                                <span class="text-muted">3</span>
                            </div>
                            <div class="progress" style="height: 8px;">
                                <div class="progress-bar bg-primary rounded-pill bar"
                                     role="progressbar"
                                     data-count="3"
                                     style="width: 0%"></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
</div>

<footer class="bg-white border-top mt-auto pt-5">
    <div class="container">
        <div class="row g-4">

            <div class="col-lg-4 col-md-6 mb-4 mb-md-0">
                <a href="/" class="d-flex align-items-center mb-3 text-decoration-none">
                    <i class="bi bi-upc-scan fs-3 text-primary me-2"></i>
                    <span class="fs-4 fw-bold text-dark">Barkod Projesi</span>
                </a>
                <p class="text-muted small mb-4">Geliştiriciler ve tüketiciler için dünyanın en açık barkod veritabanı ve API&#39;si.</p>
                <div class="d-flex gap-3">
                    <a href="#" class="text-secondary text-decoration-none fs-5"><i class="bi bi-twitter-x"></i></a>
                    <a href="#" class="text-secondary text-decoration-none fs-5"><i class="bi bi-github"></i></a>
                    <a href="#" class="text-secondary text-decoration-none fs-5"><i class="bi bi-linkedin"></i></a>
                </div>
            </div>

            <div class="col-6 col-lg-2 offset-lg-1 mb-4">
                <h6 class="fw-bold text-uppercase mb-3 small">Ürün</h6>
                <ul class="list-unstyled small text-muted">
                    <li class="mb-2"><a href="/generate" class="text-decoration-none text-muted link-hover">Oluştur</a></li>
                    <li class="mb-2"><a href="/latest" class="text-decoration-none text-muted link-hover">Son Eklenenler</a></li>
                    <li class="mb-2"><a href="/barcode-api" class="text-decoration-none text-muted link-hover">Barkod API</a></li>
                    <li class="mb-2"><a href="/download" class="text-decoration-none text-muted link-hover">Mobil Uygulama</a></li>
                </ul>
            </div>

            <div class="col-6 col-lg-2 mb-4">
                <h6 class="fw-bold text-uppercase mb-3 small">Kaynaklar</h6>
                <ul class="list-unstyled small text-muted">
                    <li class="mb-2"><a href="/blog" class="text-decoration-none text-muted link-hover">Blog</a></li>
                    <li class="mb-2"><a href="/help" class="text-decoration-none text-muted link-hover">Yardım</a></li>
                    <li class="mb-2"><a href="/contact" class="text-decoration-none text-muted link-hover">İletişim</a></li>
                </ul>
            </div>

            <div class="col-6 col-lg-2 mb-4">
                <h6 class="fw-bold text-uppercase mb-3 small">Yasal</h6>
                <ul class="list-unstyled small text-muted">
                    <li class="mb-2"><a href="/privacy" class="text-decoration-none text-muted link-hover">Gizlilik Politikası</a></li>
                    <li class="mb-2"><a href="/terms-and-conditions" class="text-decoration-none text-muted link-hover">Kullanım Şartları</a></li>
                </ul>
            </div>
        </div>

        <div class="d-flex flex-column flex-sm-row justify-content-between py-4 my-4 border-top">
            <p class="small text-muted mb-0">
                &copy; <span>2026</span> Barcode Project. All rights reserved.
            </p>

            <ul class="list-unstyled d-flex mb-0 mt-3 mt-sm-0 small">
                <li class="ms-3"><a href="https://barcode-project.com" class="text-decoration-none text-muted fw-bold">EN</a></li>
                <li class="ms-3"><a href="https://barcodes.jp" class="text-decoration-none text-muted fw-bold">JP</a></li>
                <li class="ms-3"><a href="https://barkodoku.com" class="text-decoration-none text-muted fw-bold">TR</a></li>
            </ul>
        </div>
    </div>
</footer>

<script src="/js/bootstrap.bundle.min-2e477967e482f32e65d4ea9b2fd8e106.js"></script>

<script>
    $(document).ready(function() {
        // 1. Normalize Progress Bars
        function normalizeBarWidths() {
            let maxCount = 0;
            let $bars = $('.bar');

            $bars.each(function () {
                const count = parseInt($(this).attr("data-count")) || 0;
                if (count > maxCount) maxCount = count;
            });

            $bars.each(function () {
                const count = parseInt($(this).attr("data-count")) || 0;
                const width = maxCount > 0 ? (count / maxCount) * 100 : 0;
                $(this).css("width", width + "%");
            });
        }
        normalizeBarWidths();

        // 2. Voting Logic
        function sendVoteRequest(url) {
            $.ajax({
                url: url,
                type: "GET",
                success: function (data) {
                    if (typeof data === "string" && data.includes('action="/login"')) {
                        window.location.href = "/login";
                    }
                },
                error: function (xhr) {
                    if(xhr.status === 401 || xhr.status === 403) {
                        window.location.href = "/login";
                    }
                }
            });
        }

        let initialRec = parseInt("0") || 0;
        let initialNoRec = parseInt("0") || 0;
        let initialUp = parseInt("0") || 0;
        let initialDown = parseInt("0") || 0;

        $("#voteGood").click(function () {
            if ($(this).hasClass('disabled')) return;
            $(this).removeClass("btn-outline-success").addClass("btn-success disabled");
            $("#voteBad").addClass("disabled");

            initialRec++;
            updateVoteUI(initialRec, initialNoRec);
            sendVoteRequest(`/secured/op/vote/sitemap.xml?vote=1`);
        });

        $("#voteBad").click(function () {
            if ($(this).hasClass('disabled')) return;
            $(this).removeClass("btn-outline-danger").addClass("btn-danger disabled");
            $("#voteGood").addClass("disabled");

            initialNoRec++;
            updateVoteUI(initialRec, initialNoRec);
            sendVoteRequest(`/secured/op/vote/sitemap.xml?vote=0`);
        });

        function updateVoteUI(good, bad) {
            $("#voteResult").html(`<span class="text-success fw-bold">${good}</span> / <span class="text-danger fw-bold">${bad}</span>`);
        }

        $("#recommendYes").click(function () {
            if ($(this).hasClass('disabled')) return;
            $(this).removeClass("btn-outline-success").addClass("btn-success disabled");
            $("#recommendNo").addClass("disabled");

            initialUp++;
            updateRecUI(initialUp, initialDown);
            sendVoteRequest(`/secured/op/rec/sitemap.xml?rec=1`);
        });

        $("#recommendNo").click(function () {
            if ($(this).hasClass('disabled')) return;
            $(this).removeClass("btn-outline-danger").addClass("btn-danger disabled");
            $("#recommendYes").addClass("disabled");

            initialDown++;
            updateRecUI(initialUp, initialDown);
            sendVoteRequest(`/secured/op/vote/sitemap.xml?rec=0`);
        });

        function updateRecUI(yes, no) {
            $("#yesNoResult").html(`<span class="text-success fw-bold">${yes}</span> / <span class="text-danger fw-bold">${no}</span>`);
        }
    });
</script>
</body>
</html>