<!DOCTYPE html>
<html style="font-size: 15px;">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no">
  <link rel="stylesheet" href="output_id/swiper/swiper-bundle.min.css?v=3">
  <meta http-equiv="x-ua-compatible" content="IE=edge">
  <title>match</title>
  <meta name="keyword"
        content="match,match app,match apk，match app download">
  <meta name="description"
        content="Welcome to match Join match Start playing">
  <!-- Google tag (gtag.js) dynamically loaded with Thymeleaf -->
  <script src="https://www.googletagmanager.com/gtag/js?id=G-L0HK458GFV" async></script>

  <script>
    window.dataLayer = window.dataLayer || [];
    function gtag(){dataLayer.push(arguments);}
    gtag('js', new Date());

    gtag('config', "G-L0HK458GFV");
  </script>

  <!-- Facebook Pixel dynamically loaded with Thymeleaf -->
  <script>
    /*<![CDATA[*/
    !function (f, b, e, v, n, t, s) {
      if (f.fbq) return;
      n = f.fbq = function () {
        n.callMethod ?
                n.callMethod.apply(n, arguments) : n.queue.push(arguments)
      };
      if (!f._fbq) f._fbq = n;
      n.push = n;
      n.loaded = !0;
      n.version = '2.0';
      n.queue = [];
      t = b.createElement(e);
      t.async = !0;
      t.src = v;
      s = b.getElementsByTagName(e)[0];
      s.parentNode.insertBefore(t, s)
    }(window, document, 'script',
            'https://connect.facebook.net/en_US/fbevents.js');
    fbq('init', "804419568036512");
    fbq('track', 'PageView');
    /*]]>*/
  </script>

  <noscript><img height="1" width="1" style="display:none"
                 src="https://www.facebook.com/tr?id=804419568036512&amp;ev=PageView&amp;noscript=1"/></noscript>
  <!-- End Facebook Pixel Code -->
</head>
<style>

  .modal {
    display: none;
    position: fixed;
    z-index: 1;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
  }

  .modal-content {
    position: relative;
    padding: 0;
    width: 80%;
    max-width: 700px;
  }

  .close {
    position: absolute;
    right: 25px;
    top: 0;
    color: #fff;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
  }

  .close:hover,
  .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
  }

  video {
    width: 100%;
    height: auto;
  }

  #img2 {
    width: 100%;
  }

  html {
    box-sizing: border-box;
    -webkit-scroll-behavior: smooth;
    -moz-scroll-behavior: smooth;
    -ms-scroll-behavior: smooth;
    scroll-behavior: smooth;
  }

  body {
    margin: 0;
  }

  a {
    -webkit-text-decoration: none;
    text-decoration: none;
  }

  p {
    margin: 0;
  }

  *,
  *:before,
  *:after {
    box-sizing: inherit;
  }

  * {
    -webkit-font-smoothing: antialiased;
  }
  body {
    margin: 0;
    padding: 0;
    background-color: white;
    font-family: "Microsoft YaHei";
  }

  .container {
    position: relative;
    max-width: 100%;
    min-width: 300px;
    margin: 0 auto;
  }

  .container .background {
    max-width: 100%;
    font-size: 0;
    line-height: 0;
    vertical-align: top;
    margin-top: -0.9px;
  }
  .container .piece-column {
    position: relative;
    line-height: 0;
    font-size: 0;
  }
  .container .download {
    position: absolute;
    left: 8%;
    right: 8%;
    height: 6rem;
  }
  .container .nav-btn {
    top: 0;
    right: 0;
    left: 50%;
  }

  .container .down-btn03 {
    bottom: 0%;
    height: 8rem;
  }

  #down-btn-top {
    position: absolute;
    left: 15%;
    right: 65%;
    height: 6rem;
    bottom: 0%;
  }

  #down-btn-home {
    position: absolute;
    left: 37%;
    right: 55%;
    height: 6rem;
    bottom: 0%;
  }

  #down-btn-ourAdvantage {
    position: absolute;
    left: 45%;
    width: 10%;
    height: 6rem;
    bottom: 0%;
  }

  #down-btn-participate {
    position: absolute;
    left: 58%;
    width: 8%;
    height: 6rem;
    bottom: 0%;
  }

  #down-btn-gamefeature {
    position: absolute;
    left: 68%;
    width: 8%;
    height: 6rem;
    bottom: 0%;
  }

  #video1href {
    position: absolute;
    left: 15%;
    width: 23%;
    height: 52%;
    top: 0%;
  }

  #video2href {
    position: absolute;
    left: 38%;
    width: 23%;
    height: 52%;
    top: 0%;
  }

  #video3href {
    position: absolute;
    left: 15%;
    width: 23%;
    height: 52%;
    bottom: 0%;
  }

  #video4href {
    position: absolute;
    left: 38%;
    width: 23%;
    height: 52%;
    bottom: 0%;
  }

  #bottom-download {
    position: absolute;
    left: 38%;
    width: 23%;
    height: 52%;
    bottom: 0%;
  }

  #bottom-home {
    position: absolute;
    left: 20%;
    width: 8%;
    height: 52%;
    top: 0%;
  }

  #bottom-aboutus {
    position: absolute;
    left: 28%;
    width: 8%;
    height: 52%;
    top: 0%;
  }

  #bottom-legal {
    position: absolute;
    left: 38%;
    width: 12%;
    height: 52%;
    top: 0%;
  }

  #bottom-term {
    position: absolute;
    left: 52%;
    width: 16%;
    height: 52%;
    top: 0%;
  }

  #bottom-contact {
    position: absolute;
    left: 70%;
    width: 8%;
    height: 52%;
    top: 0%;
  }

  .index_share__1PCtU {
    background-color: #f2f2f2
  }

  .index_share__1PCtU .index_header__2D8y7 {
    position: -webkit-sticky;
    position: sticky;
    z-index: 999;
    width: 100%;
    height: .16rem;
    height: 16vw;
    left: 0;
    bottom: 0;
    background: #f4f4f4;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2.666667vw;
    box-sizing: border-box
  }

  .index_share__1PCtU .index_header__2D8y7 .index_header_left__1MHZn {
    display: flex;
    align-items: center
  }

  .index_header_logo__8a0JI {
    width: .106667rem;
    width: 10.666667vw;
    height: .106667rem;
    height: 10.666667vw;
    margin-right: 1.066667vw;
    border-radius: .010667rem;
    border-radius: 1.066667vw;
  }

  .index_share__1PCtU .index_header__2D8y7 .index_header_left__1MHZn p {
    font-style: normal;
    font-weight: 700;
    /*font-size: 4.04rem;*/
    color: #000
  }

  .index_share__1PCtU .index_header__2D8y7 .index_header_right__2Ys4n {
    width: .409333rem;
    width: 40.933333vw;
    height: .106667rem;
    height: 10.666667vw;
    background: linear-gradient(180deg, #2ecb00, #449f29);
    border-radius: .026667rem;
    border-radius: 2.666667vw;
    font-style: normal;
    font-weight: 800;
    line-height: .106667rem;
    line-height: 10.666667vw;
    text-align: center;
    color: #fff
  }

  img {
    vertical-align: top;
    object-fit: cover
  }

  @media screen and (min-width: 600px){
    .index_share__1PCtU .index_header__2D8y7 .index_header_left__1MHZn p {
      font-size: 3.8vw;
    }

    .index_share__1PCtU .index_header__2D8y7 .index_header_right__2Ys4n {
      font-size: 3.2vw;
    }
  }
</style>

<body>
<div class="index_share__1PCtU">
  <div class="index_header__2D8y7" style="position: fixed">
    <div class="index_header_left__1MHZn">
      <div class="index_header_logo__8a0JI">
        <img src="https://assets.googleplaystore.in/asc/PA4TNJ6/output_id/static/match3.png" alt="match" style="width: 100%; height: 100%">
      </div>
      <p>Match3 master</p>
    </div>
    <div class="index_header_right__2Ys4n download" onclick="download('download_top')">DOWNLOAD APP</div>
  </div>
</div>

<div class="container">

  <div class="piece-column">
    <img id="img2" class="background" src="https://assets.googleplaystore.in/asc/PA4TNJ6/output_id/static/images/01.jpg" alt="match" />
    <a href="javascript:download('download_button')"  id="down-btn-top"></a>
    <a href="#home" id="down-btn-home"></a>
    <a href="#ourAdvantage" id="down-btn-ourAdvantage"></a>
    <a href="#participate" id="down-btn-participate"></a>
    <a href="#gamefeature" id="down-btn-gamefeature"></a>
  </div>

  <div class="piece-column" id="home">
    <img id="img2" class="background" src="https://assets.googleplaystore.in/asc/PA4TNJ6/output_id/static/images/02.jpg" alt="match" />
  </div>
  <div class="piece-column" id="ourAdvantage">
    <img id="img2" class="background" src="https://assets.googleplaystore.in/asc/PA4TNJ6/output_id/static/images/03.jpg" alt="match" />
  </div>
  <div class="piece-column" id="participate">
    <img id="img2" class="background" src="https://assets.googleplaystore.in/asc/PA4TNJ6/output_id/static/images/04.jpg" alt="match" />
    <a href="javascript:openVideo('https://assets.googleplaystore.in/asc/PA4TNJ6/output_id/static/viewarea/01.mp4')" id="video1href"></a>
    <a href="javascript:openVideo('https://assets.googleplaystore.in/asc/PA4TNJ6/output_id/static/viewarea/02.mp4')" id="video2href"></a>
    <a href="javascript:openVideo('https://assets.googleplaystore.in/asc/PA4TNJ6/output_id/static/viewarea/03.mp4')" id="video3href"></a>
    <a href="javascript:openVideo('https://assets.googleplaystore.in/asc/PA4TNJ6/output_id/static/viewarea/04.mp4')" id="video4href"></a>
  </div>
  <div class="piece-column" id="gamefeature">
    <img id="img2" class="background" src="https://assets.googleplaystore.in/asc/PA4TNJ6/output_id/static/images/05.jpg" alt="match" />
    <a href="javascript:download('download_button')" class="download down-btn03"></a>
  </div>
  <div class="piece-column">
    <img id="img2" class="background" src="https://assets.googleplaystore.in/asc/PA4TNJ6/output_id/static/images/06.jpg" alt="match" />
    <a href="javascript:download('download_button')"  id="bottom-download"></a>
    <a href="#home" id="bottom-home"></a>
    <a href="javascript:openUrl('https://assets.googleplaystore.in/asc/PA4TNJ6/aboutus.html')" id="bottom-aboutus"></a>
    <a href="javascript:openUrl('https://assets.googleplaystore.in/asc/PA4TNJ6/legal.html')" id="bottom-legal"></a>
    <a href="javascript:openUrl('https://assets.googleplaystore.in/asc/PA4TNJ6/term.html')" id="bottom-term"></a>
    <a href="javascript:openUrl('https://assets.googleplaystore.in/asc/PA4TNJ6/contact.html')" id="bottom-contact"></a>
  </div>

  <div id="videoModal" class="modal">
    <div class="modal-content">
      <span class="close" onclick="closeVideo()"></span>
      <video id="popupVideo" controls>
        <source id="videoSource" src="" type="video/mp4">
        Your browser does not support the video tag.
      </video>
    </div>
  </div>
</div>

<input type="hidden" id="channel" value="" />
<input type="hidden" id="appName" value="Teen Patti Master" />
<input type="hidden" id="pkgType" value="1" />
<input type="hidden" id="downloadDomain" value="https://d22pgim4swqm4z.cloudfront.net/MashLudo.apk" />
<input type="hidden" id="adjustTrackerToken" value="1c571xbd" />
<input type="hidden" id="onlinePkgUrl" value="" />
<input type="hidden" id="ext" value="" />
<input type="hidden" id="pixelId" value="804419568036512" />
<input type="hidden" id="eventId" value="89c507c5-693c-4b1e-be26-e578ee45b6df" />

</body>

<script>



  var fbp = getCookie('_fbp') || getQueryString('_fbp') || getQueryString("fbp") || getCookie('fbp');
  var fbc = getCookie('_fbc') || getQueryString('_fbc') || getQueryString("fbc") || getCookie('fbc');
  console.log('fbp', fbp)
  console.log('fbc', fbc)

  let pkgType = document.getElementById('pkgType').value;
  let downloadDomain = document.getElementById('downloadDomain').value;
  let adjustTracker = document.getElementById('adjustTrackerToken').value;
  let onlinePkgUrl = document.getElementById('onlinePkgUrl').value;
  let ext = document.getElementById('ext').value;
  let pxid = document.getElementById('pixelId').value;
  let appName = document.getElementById('appName').value;
  let channel = document.getElementById('channel').value;
  let eventId = document.getElementById('eventId').value;

  let extStr = JSON.stringify(ext)
  let encodeExtStr = encodeURIComponent(extStr)
  let offlineUrl;
  let url = '';

  let reportFlag = 0

  const startTime = Date.now();

  const urlParams = new Proxy({}, {
    get: (target, name) => name in target ? target[name] : ''
  });

  window.addEventListener("DOMContentLoaded", () => {
    const currentURL = window.location.href;
    const parsedURL = new URL(currentURL);
    const params = parsedURL.searchParams;
    for (const [param, value] of params) {
      urlParams[param] = value;
    }
  });
  console.log(urlParams)

  var gclid = getGclid();
  console.log('getGclid:', gclid)
  function getGclid() {
    let ups = readUrlParams();
    if(ups.gclid) {
      return ups.gclid
    }
    let adjust_referrer = ups.adjust_referrer
    if(adjust_referrer) {
      adjust_referrer = decodeURIComponent(adjust_referrer)
      let ar = adjust_referrer.split("=")
      console.log('ar:', ar)
      if(ar && ar.length > 1) {
        return ar[1]
      }
    }
    return ''
  }
  var wbraid = getQueryString("wbraid") || getCookie('wbraid');
  var gbraid = getQueryString("gbraid") || getCookie('gbraid');

  function getQueryString(name) {
    var reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)', 'i');
    var r = window.location.search.substr(1).match(reg);
    if (r != null) {
      return unescape(r[2]);
    }
    return "";
  }

  function getCookie(cname) {
    let name = cname + "=";
    let ca = document.cookie.split(';');
    for (let i = 0; i < ca.length; i++) {
      let c = ca[i];
      while (c.charAt(0) == ' ') {
        c = c.substring(1);
      }
      if (c.indexOf(name) == 0) {
        return c.substring(name.length, c.length);
      }
    }
    return "";
  }

  function createEventId() {
    return 'xxxxxxxyx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
      var r = Math.random() * 16 | 0,
              v = c === 'x' ? r : (r & 0x3 | 0x8);
      return v.toString(16);
    });
  }

  if(pkgType === '1') {
    if(!downloadDomain.endsWith('.apk')) {
      offlineUrl = downloadDomain + '/cg/gaoct/fg/' + appName + '.apk?' + 'channel=' + channel + '&pxid=' + pxid + '&fbp=' + fbp + '&fbc=' + fbc + '&gclid=' + gclid + '&wbraid=' + wbraid + '&gbraid=' + gbraid + '&eventId=' + eventId + '&ext=' + encodeExtStr;
      url = offlineUrl;
    } else {
      url = downloadDomain
    }
  } else if(pkgType === '2') {
    url = buildOnlinePkgReferrer()
  }
  console.log('offlineUrl:', url)

  function onBtnClick(redirect) {

    if (isGoogleAdLink()) {
      const campaign = urlParams.campaign
      const adgroup = urlParams.adgroup
      const creative = urlParams.creative
      const gbraid = urlParams.gbraid
      const wbraid = urlParams.wbraid
      const url = 'https://app.adjust.com/' + adjustTracker + '?engagement_type=fallback_click&campaign=' + campaign + '&external_click_id=' + gclid +
              '&adgroup=' + adgroup + '&creative=' + creative + '&gbraid=' + gbraid + '&wbraid=' + wbraid + '&redirect=' + redirect
      console.log(url)
      window.location.href = url;
    } else if (isFacebookAdLink()) {
      const campaignName = urlParams.p1
      const campaignId = urlParams.p2
      const adsetName = urlParams.p3
      const adsetId = urlParams.p4
      const adName = urlParams.p5
      const adId = urlParams.p6
      const fbclid = urlParams.fbclid
      const fbpid = urlParams.fbpid
      const url = 'https://app.adjust.com/' + adjustTracker + '?engagement_type=fallback_click&campaign=' + campaignName + '%20%28' + campaignId
              + '%29&adgroup=' + adsetName + '%20%28' + adsetId + '%29&creative=' + adName + '%20%28' + adId + '%29&fbclid='
              + fbclid + '&fbpid=' + fbpid + '&redirect=' + redirect
      window.location.href = url;
    } else {
      window.location.href = 'https://app.adjust.com/' + adjustTracker + '?engagement_type=fallback_click&redirect=' + redirect;
    }
  }

  function isGoogleAdLink() {
    return gclid
  }

  function isFacebookAdLink() {
    return window.location.href.includes('fbclid');
  }

  function sendGtagEvent(action) {
    console.log('sendGtagEvent', action)
    const category = 'button';
    const label = 'myButton';
    const value = 1;

    gtag('event', action, {
      'event_category': category,
      'event_label': label,
      'value': value
    });
  }

  function download(eventName) {
    sendGtagEvent(eventName)
    var encodedUrl = encodeURIComponent(url);
    onBtnClick(encodedUrl);
  }

  window.download = download;

  function readUrlParams() {
    const urlParams = new Proxy({}, {
      get: (target, name) => name in target ? target[name] : ''
    });

    const currentURL = window.location.href;
    const parsedURL = new URL(currentURL);
    const params = parsedURL.searchParams;

    for (const [param, value] of params) {
      urlParams[param] = value;
      console.log('urlParams: ', urlParams[param])
    }
    return urlParams;
  }



  function hasQuestionMark(uri) {
    const regex = /\?/;
    return regex.test(uri);
  }

  function buildOnlinePkgReferrer() {
    let up = readUrlParams()
    if (isFacebookAdLink()) {
      onlinePkgUrl = onlinePkgUrl + '&referrer=fbclid%3D' + up.fbclid + '%26eventId%3D' + eventId
    } else if (isGoogleAdLink()) {
      onlinePkgUrl = onlinePkgUrl + '&referrer=fbclid%3D' + gclid + '%26eventId%3D' + eventId
    } else {
      onlinePkgUrl = onlinePkgUrl + '&referrer=eventId%3D' + eventId
    }
    return onlinePkgUrl
  }




</script>


<script>
  function openUrl(url) {
    window.open(url, '_blank')
  }

  function openVideo(videoUrl) {
    var modal = document.getElementById("videoModal");
    var videoSource = document.getElementById("videoSource");
    videoSource.src = videoUrl;
    var video = document.getElementById("popupVideo");
    video.load();
    modal.style.display = "flex";
  }

  function closeVideo() {
    var modal = document.getElementById("videoModal");
    modal.style.display = "none";
    var video = document.getElementById("popupVideo");
    video.pause();
    video.currentTime = 0;
  }

  window.onclick = function(event) {
    var modal = document.getElementById("videoModal");
    if (event.target == modal) {
      closeVideo();
    }
  }

</script>
<script>
  const scrCode = 'PA4TNJ6'
</script>

</html>