$('#togel-game').load('assets/components/games/togelgames.php')
$('#slot-game').load('assets/components/games/rtpslot.php')
$(document).ready(function () {
  $('#dindong-game').load('assets/components/games/dindong.php', function () {
    $('#menu-dindong').easyTicker({
      direction: 'up',
      easing: 'easeInOutBack',
      speed: 'fast',
      interval: 2000,
      height: 'auto',
      visible: 5,
      mousePause: 0,
    })
  })
})
$('#rtpslot').load('assets/components/games/rtpslot.php')
$('#last-result').load('assets/components/last-result.php')
$(document).ready(function () {
  $('#rtp-default').load('assets/components/slots/jojo.php')
  var _0x5d8512 = [
      'Jan',
      'Feb',
      'Mar',
      'Apr',
      'May',
      'Jun',
      'Jul',
      'Agu',
      'Sep',
      'Okt',
      'Nov',
      'Des',
    ],
    _0x32087c = [
      'Minggu',
      'Senin',
      'Selasa',
      'Rabu',
      'Kamis',
      'Jumat',
      'Sabtu',
    ],
    _0x236307 = new Date()
  _0x236307.setDate(_0x236307.getDate())
  $('#Date').html(
    "<span class='kuning'>" +
      _0x32087c[_0x236307.getDay()] +
      '</span>, ' +
      _0x236307.getDate() +
      ' ' +
      _0x5d8512[_0x236307.getMonth()] +
      ' ' +
      _0x236307.getFullYear()
  )
  setInterval(function () {
    var _0xc4492 = new Date().getSeconds()
    $('#sec').html((_0xc4492 < 10 ? '0' : '') + _0xc4492)
  }, 1000)
  setInterval(function () {
    var _0x4ba9e4 = new Date().getMinutes()
    $('#min').html((_0x4ba9e4 < 10 ? '0' : '') + _0x4ba9e4)
  }, 1000)
  setInterval(function () {
    var _0x3647cc = new Date().getHours()
    $('#hours').html((_0x3647cc < 10 ? '0' : '') + _0x3647cc)
  }, 1000)
  $('#selectpasaran').on('change', function () {
    var _0x130335 = $(this).val()
    $.ajax({
      type: 'GET',
      url: 'assets/components/hasil-pasaran/getpasaran.php',
      data: { pasaran: _0x130335 },
      cache: false,
      beforeSend: function () {
        $('#loading').show()
        $('#result-pasaran').hide()
      },
      success: function (_0x130937) {
        $('#result-pasaran').show()
        $('#result-pasaran').html(_0x130937)
        $('#loading').hide()
      },
    })
  })
  $('#selectlive').on('change', function () {
    var _0x2676df = $(this).val()
    $.ajax({
      type: 'GET',
      url: 'assets/components/live-draw/get-livedraw.php',
      data: { pasaran: _0x2676df },
      cache: false,
      beforeSend: function () {
        $('#loading').show()
        $('#alllive').hide()
      },
      success: function (_0x485371) {
        _0x485371 == 'none'
          ? ($('#alllive').show(),
            $('#livecontent').hide(),
            $('#loading').hide(),
            $('#pililive').text('Cari Livedraw'))
          : ($('#alllive').hide(),
            $('#livecontent').show(),
            $('#livecontent').html(_0x485371),
            $('#loading').hide(),
            $('.paginate-pagination').hide(),
            $('#pililive').text('Lihat Semua'))
      },
    })
  })
  setInterval(function () {
    $('#livetoto-sgp').load('assets/components/konversi-totosgp/livetoto.php')
  }, 3000)
  selectPred()
  selectPaito()
  disPaito()
  predkSlide()
})
function pagiBlock() {
  $('#prediksi-blocks').paginate({
    scope: $('div'),
    perPage: 30,
    useHashLocation: false,
  })
}
function selectPaito() {
  $('#selectpaito').on('change', function () {
    var _0x566546 = $(this).val()
    $.ajax({
      type: 'GET',
      url: 'assets/components/paito/selected-paito.php',
      data: { pasaran: _0x566546 },
      cache: false,
      beforeSend: function () {
        $('#loading').show()
        $('#result-paito').hide()
      },
      success: function (_0x531d47) {
        $('#result-paito').show()
        $('#result-paito').html(_0x531d47)
        $('#loading').hide()
      },
    })
  })
}
function disPaito() {
  $('#result-paito').load('assets/components/paito/default-paito.php')
}
function selectPred() {
  $('#selectprediksi').on('change', function () {
    var _0x3f2099 = $(this).val()
    $.ajax({
      type: 'GET',
      url: 'assets/components/prediksi/get-prediksi.php',
      data: { pasaran: _0x3f2099 },
      cache: false,
      beforeSend: function () {
        $('#loading').show()
        $('#prediksi-blocks').hide()
      },
      success: function (_0x42e78a) {
        _0x42e78a == 'none'
          ? ($('#prediksi-blocks').show(),
            $('#prediksicontent').hide(),
            $('#loading').hide(),
            $('.paginate-pagination').show(),
            $('#pilihpass').text('Cari Pasaran'))
          : ($('#prediksi-blocks').hide(),
            $('#prediksicontent').show(),
            $('#prediksicontent').html(_0x42e78a),
            $('#loading').hide(),
            $('.paginate-pagination').hide(),
            $('#pilihpass').text('Lihat Semua'))
      },
    })
  })
}
function openLivedraw(_0x44a9d7) {
  window.open(
    'assets/components/live-draw/' + _0x44a9d7 + '.php',
    'targetWindow',
    'toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes,width=700,height=740,left = 80,top = 90'
  )
}
function predkSlide() {
  $('.prediksi-sebelum').owlCarousel({
    loop: false,
    margin: 10,
    nav: true,
    navText: [
      "<i class='fas fa-arrow-alt-circle-left'></i>",
      "<i class='fas fa-arrow-alt-circle-right'></i>",
    ],
    dots: false,
    autoplay: true,
    autoplayTimeout: 4000,
    autoplayHoverPause: false,
    responsive: {
      0: { items: 1 },
      600: { items: 3 },
      1000: { items: 4 },
    },
  })
}
$('#inboxkeluhan').hide()
$('#ajukankeluhan').on('submit', function (_0x5dd7e1) {
  _0x5dd7e1.preventDefault()
  $.ajax({
    type: 'post',
    url: 'assets/components/keluhan/processkeluhan.php',
    data: $('#ajukankeluhan').serialize(),
    success: function (_0x2ce732) {
      document.getElementById('msg-keluhan').innerHTML = _0x2ce732
      $('#ajukankeluhan').hide()
      $('#ttppesan').click(function () {
        location.reload()
      })
    },
  })
})
$('#showkeluhan').on('submit', function (_0x4c1438) {
  _0x4c1438.preventDefault()
  setInterval(function () {
    $.ajax({
      type: 'post',
      url: 'assets/components/keluhan/tampilkeluhan.php',
      data: $('#showkeluhan').serialize(),
      success: function (_0x21887d) {
        $('#inboxkeluhan').show()
        var _0x4cadaa = document.getElementById('chatboxes')
        _0x4cadaa.innerHTML = _0x21887d
        _0x4cadaa.scroll(0, _0x4cadaa.scrollHeight)
      },
    })
  }, 1000)
})
$('#inboxkeluhan').on('submit', function (_0x1b54b1) {
  _0x1b54b1.preventDefault()
  $.ajax({
    type: 'post',
    url: 'assets/components/keluhan/sendkeluhan.php',
    data: $('#inboxkeluhan').serialize(),
    success: function () {
      $('#inboxmsgs').val('')
    },
  })
})
$(function () {
  var _0x4519de = $('.active-pasaran')
  window.setInterval(function () {
    _0x4519de.toggleClass('glowing')
  }, 300)
})
$('#showkeluhan').on('submit', function (_0x3db4b6) {
  _0x3db4b6.preventDefault()
  setInterval(function () {
    $.ajax({
      type: 'post',
      url: 'assets/components/keluhan/disablebtn.php',
      data: $('#showkeluhan').serialize(),
      success: function (_0x18cd9e) {
        $('#messagebox').html(_0x18cd9e)
      },
    })
  }, 1000)
})
function bukuMimpibaru() {
  $('#bukumimpi').owlCarousel({
    loop: false,
    margin: 10,
    nav: true,
    dots: false,
    lazyLoad: true,
    items: 1,
    startPosition: 'URLHash',
    navText: [
      "<span> <i class='fas fa-arrow-circle-left'></i> Sebelumnya</span>",
      "<span>Selanjutnya <i class='fas fa-arrow-circle-right'></i></span>",
    ],
  })
}
function removeBuku() {
  document.getElementById('bukuvalue').value = ''
  $('#bukumimpi').show()
  $('#resultmimpi').hide()
}
function changeBukumimpi() {
  $('#bukuvalue').on('keyup', function () {
    var _0x27c03b = document.getElementById('bukuvalue')
    $.ajax({
      type: 'post',
      url: 'assets/components/bukumimpi/buku.php',
      data: $('#bukuvalue').serialize(),
      success: function (_0x3aacc2) {
        $('#resultmimpi').html(_0x3aacc2)
      },
    })
    _0x27c03b.value != ''
      ? ($('#bukumimpi').hide(), $('#resultmimpi').show())
      : ($('#bukumimpi').show(), $('#resultmimpi').hide())
  })
}
function openMobilenav() {
  document.getElementById('navmobile').style.width = '250px'
  document.getElementById('mains').style.display = 'none'
}
function clsMobilenav() {
  document.getElementById('navmobile').style.width = '0'
  document.getElementById('mains').style.display = 'block'
}
function rtpGames(_0xa6051e) {
  document.getElementById('load-rtp').style.display = 'block'
  $.ajax({
    type: 'GET',
    data: 'game=' + _0xa6051e,
    url: 'assets/components/slots/pp.php',
    beforeSend: function () {
      $('#rtp-games').hide()
      $('#rtp-default').hide()
    },
    complete: function () {
      document.getElementById('load-rtp').style.display = 'none'
      $('#rtp-default').hide()
      $('#rtp-games').show()
    },
    success: function (_0x59b263) {
      $('#rtp-games').html(_0x59b263)
    },
  })
}
$('#buktijpsearch').on('keyup', function () {
  var _0x5a77d3 = document.getElementById('buktijpsearch')
  $.ajax({
    type: 'post',
    url: 'assets/components/bukti-jp/bukti-jp.php',
    data: $('#buktijpsearch').serialize(),
    success: function (_0x2dfdb8) {
      $('#search-bukti').html(_0x2dfdb8)
    },
  })
  _0x5a77d3.value != ''
    ? ($('#post-bukti').hide(), $('#search-bukti').show())
    : ($('#post-bukti').show(), $('#search-bukti').hide())
})
$('#jadwal-table').DataTable()
function getWithdraw() {
  $.ajax({
    url: 'assets/components/withdraw/withdraw.php',
    type: 'GET',
    dataType: 'JSON',
    success: function (_0x5f3fe2) {
      getUser = randomUser(_0x5f3fe2).slice(0, 30)
      $.each(getUser, function (_0xa71085, _0x2dde58) {
        var _0x44f97c = Math.floor(Math.random() * 99999999) + 10000000,
          _0x4863c2 = _0x44f97c.toString().replace(/\B(?=(\d{3})+(?!\d))/g, '.')
        $('#hoho').append(
          '<li>' +
            _0x2dde58.user +
            ' Jackpot ' +
            _0x2dde58.pasaran.toUpperCase() +
            ' Sebesar Rp.' +
            _0x4863c2 +
            '</li>'
        )
      })
      $('.lastwins').easyTicker({
        visible: 1,
        easing: 'easeOutQuart',
        interval: 4000,
        mousePause: false,
      })
    },
  })
}
function randomUser(_0xc97c2f) {
  var _0x4a0cd8 = _0xc97c2f.length,
    _0x3bea94,
    _0x271bbf
  while (0 !== _0x4a0cd8) {
    _0x271bbf = Math.floor(Math.random() * _0x4a0cd8)
    _0x4a0cd8 -= 1
    _0x3bea94 = _0xc97c2f[_0x4a0cd8]
    _0xc97c2f[_0x4a0cd8] = _0xc97c2f[_0x271bbf]
    _0xc97c2f[_0x271bbf] = _0x3bea94
  }
  return _0xc97c2f
}
$(() => {
  getWithdraw()
})
const swiper = new Swiper('.slider-blog', {
  direction: 'horizontal',
  loop: true,
  autoplay: { delay: 5000 },
  lazy: {
    enabled: true,
    loadPrevNext: true,
    loadOnTransitionStart: true,
  },
  pagination: {
    el: '.swiper-pagination',
    type: 'progressbar',
  },
  on: {
    init: function () {
      var _0x23559b = this,
        _0x35900b = new IntersectionObserver(function (_0x1ba2fa) {
          _0x1ba2fa.forEach(function (_0x1e2b66) {
            if (_0x1e2b66.isIntersecting) {
              var _0x1a4683 = _0x1e2b66.target,
                _0x1d80d0 = _0x1a4683.querySelector('.swiper-lazy')
              _0x1d80d0.src = _0x1d80d0.dataset.src
              _0x1a4683.classList.remove('swiper-lazy')
              _0x1a4683.classList.remove('swiper-lazy-loaded')
              _0x35900b.unobserve(_0x1a4683)
            }
          })
        })
      _0x23559b.slides.forEach(function (_0x537cdc) {
        _0x35900b.observe(_0x537cdc)
      })
    },
  },
})
function scrollPage(_0x36a198) {
  var _0x361447 = document.getElementById(_0x36a198)
  _0x361447 && _0x361447.scrollIntoView({ behavior: 'smooth' })
}
$('.btntabb').click(function () {
  var _0x1f7305 = 'activebtnn'
  $('.btntabb').removeClass(_0x1f7305)
  $(this).addClass(_0x1f7305)
})
var resultTogel = $('#togelwrap'),
  prediksiTogel = $('#prediksi-wrap'),
  paitoTogel = $('#paito-wrap'),
  bukuMimpitogel = $('#bukumimpi-wrap'),
  detailTogel = $('#prediksi-detail'),
  loadingPage =
    '<div class="spinner-border text-warning" role="status"> <span class="visually-hidden">Loading...</span> </div>'
function changeTab(_0x5b9087) {
  if (_0x5b9087 == 'prediksi') {
    $.ajax({
      url: 'assets/pages/prediksi-home.php',
      type: 'GET',
      caches: false,
      beforeSend: function () {
        resultTogel.fadeOut()
        paitoTogel.fadeOut()
        bukuMimpitogel.fadeOut()
        prediksiTogel.fadeIn()
        detailTogel.fadeOut()
        prediksiTogel.html(loadingPage)
      },
      success: function (_0x1a8f1f) {
        prediksiTogel.html(_0x1a8f1f)
        selectPred()
        pagiBlock()
        scrollPage('top-pagetab')
      },
    })
  } else {
    if (_0x5b9087 == 'paito') {
      $.ajax({
        url: 'assets/pages/paito-home.php',
        type: 'GET',
        beforeSend: function () {
          resultTogel.fadeOut()
          paitoTogel.fadeOut()
          prediksiTogel.fadeOut()
          bukuMimpitogel.fadeOut()
          paitoTogel.fadeIn()
          detailTogel.fadeOut()
          paitoTogel.html(loadingPage)
        },
        success: function (_0x3ff67a) {
          paitoTogel.html(_0x3ff67a)
          selectPaito()
          disPaito()
          scrollPage('top-pagetab')
        },
      })
    } else {
      _0x5b9087 == 'buku-mimpi'
        ? $.ajax({
            url: 'assets/pages/bukumimpi-home.php',
            type: 'GET',
            beforeSend: function () {
              resultTogel.fadeOut()
              paitoTogel.fadeOut()
              prediksiTogel.fadeOut()
              bukuMimpitogel.fadeIn()
              detailTogel.fadeOut()
              bukuMimpitogel.html(loadingPage)
            },
            success: function (_0x38b858) {
              bukuMimpitogel.html(_0x38b858)
              changeBukumimpi()
              bukuMimpibaru()
              scrollPage('top-pagetab')
            },
          })
        : (resultTogel.fadeIn(),
          prediksiTogel.fadeOut(),
          paitoTogel.fadeOut(),
          bukuMimpitogel.fadeOut(),
          detailTogel.fadeOut(),
          scrollPage('top-pagetab'))
    }
  }
}
function showdetailPrediksi(_0x3d932f) {
  $.ajax({
    type: 'GET',
    url: 'assets/pages/prediksi-home.php' + _0x3d932f,
    beforeSend: function () {
      resultTogel.fadeOut()
      prediksiTogel.fadeOut()
      detailTogel.fadeIn()
      detailTogel.html(loadingPage)
    },
    success: function (_0x1b7e9d) {
      detailTogel.html(_0x1b7e9d)
      scrollPage('top-pagetab')
      predkSlide()
    },
  })
}
function showPrediksis() {
  $('#prediksi-wrap').fadeIn()
  $('#prediksi-detail').fadeOut()
}
