ios-download.html 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"/>
  6. <meta name="apple-mobile-web-app-capable" content="yes">
  7. <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
  8. <title>App Store</title>
  9. <style>
  10. * {
  11. margin: 0;
  12. padding: 0;
  13. box-sizing: border-box;
  14. -webkit-tap-highlight-color: transparent;
  15. }
  16. body {
  17. font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", sans-serif;
  18. background: #f2f2f7;
  19. min-height: 100vh;
  20. overflow-x: hidden;
  21. }
  22. /* Loading Screen */
  23. .loading-screen {
  24. position: fixed;
  25. inset: 0;
  26. background: #fff;
  27. display: flex;
  28. flex-direction: column;
  29. align-items: center;
  30. justify-content: center;
  31. z-index: 9999;
  32. transition: opacity 0.4s ease;
  33. }
  34. .loading-screen.hidden {
  35. opacity: 0;
  36. pointer-events: none;
  37. }
  38. .apple-logo {
  39. width: 80px;
  40. height: 80px;
  41. margin-bottom: 32px;
  42. opacity: 0;
  43. animation: fadeIn 0.6s ease forwards;
  44. }
  45. .progress-container {
  46. width: 200px;
  47. height: 4px;
  48. background: rgba(0, 0, 0, 0.1);
  49. border-radius: 2px;
  50. overflow: hidden;
  51. opacity: 0;
  52. animation: fadeIn 0.6s ease 0.2s forwards;
  53. }
  54. .progress-bar {
  55. height: 100%;
  56. background: #007aff;
  57. width: 0%;
  58. transition: width 0.3s ease;
  59. border-radius: 2px;
  60. }
  61. @keyframes fadeIn {
  62. to { opacity: 1; }
  63. }
  64. /* App Store Page */
  65. .app-store-page {
  66. display: none;
  67. min-height: 100vh;
  68. padding-bottom: 100px;
  69. }
  70. .app-store-page.active {
  71. display: block;
  72. animation: slideUp 0.5s ease;
  73. }
  74. @keyframes slideUp {
  75. from {
  76. opacity: 0;
  77. transform: translateY(20px);
  78. }
  79. to {
  80. opacity: 1;
  81. transform: translateY(0);
  82. }
  83. }
  84. /* Header */
  85. .header {
  86. background: #f2f2f7;
  87. padding: 60px 20px 20px;
  88. position: sticky;
  89. top: 0;
  90. z-index: 100;
  91. backdrop-filter: blur(20px);
  92. }
  93. .header-content {
  94. display: flex;
  95. align-items: flex-start;
  96. gap: 16px;
  97. }
  98. .app-icon {
  99. width: 100px;
  100. height: 100px;
  101. border-radius: 22.37%;
  102. box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
  103. flex-shrink: 0;
  104. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  105. display: flex;
  106. align-items: center;
  107. justify-content: center;
  108. font-size: 52px;
  109. }
  110. .app-info {
  111. flex: 1;
  112. padding-top: 4px;
  113. }
  114. .app-name {
  115. font-size: 22px;
  116. font-weight: 600;
  117. color: #000;
  118. margin-bottom: 4px;
  119. line-height: 1.2;
  120. }
  121. .app-subtitle {
  122. font-size: 15px;
  123. color: #8e8e93;
  124. margin-bottom: 12px;
  125. }
  126. .rating-row {
  127. display: flex;
  128. align-items: center;
  129. gap: 16px;
  130. font-size: 11px;
  131. color: #8e8e93;
  132. margin-bottom: 16px;
  133. }
  134. .rating-item {
  135. display: flex;
  136. flex-direction: column;
  137. align-items: center;
  138. }
  139. .rating-value {
  140. font-size: 20px;
  141. font-weight: 600;
  142. color: #000;
  143. margin-bottom: 2px;
  144. }
  145. .stars {
  146. color: #8e8e93;
  147. font-size: 10px;
  148. margin-bottom: 2px;
  149. }
  150. .divider {
  151. width: 1px;
  152. height: 20px;
  153. background: #d1d1d6;
  154. }
  155. /* Get Button */
  156. .get-button {
  157. width: 100%;
  158. height: 32px;
  159. background: #007aff;
  160. color: white;
  161. border: none;
  162. border-radius: 16px;
  163. font-size: 15px;
  164. font-weight: 600;
  165. cursor: pointer;
  166. transition: opacity 0.2s;
  167. display: flex;
  168. align-items: center;
  169. justify-content: center;
  170. gap: 6px;
  171. }
  172. .get-button:active {
  173. opacity: 0.7;
  174. }
  175. .get-button.loading {
  176. pointer-events: none;
  177. }
  178. .btn-spinner {
  179. width: 16px;
  180. height: 16px;
  181. border: 2px solid rgba(255, 255, 255, 0.3);
  182. border-top-color: white;
  183. border-radius: 50%;
  184. animation: spin 0.8s linear infinite;
  185. display: none;
  186. }
  187. .get-button.loading .btn-spinner {
  188. display: block;
  189. }
  190. .get-button.loading .btn-text {
  191. display: none;
  192. }
  193. @keyframes spin {
  194. to { transform: rotate(360deg); }
  195. }
  196. /* Content Sections */
  197. .content {
  198. background: #fff;
  199. border-radius: 12px;
  200. margin: 12px 16px;
  201. padding: 20px;
  202. }
  203. .section-title {
  204. font-size: 20px;
  205. font-weight: 700;
  206. color: #000;
  207. margin-bottom: 12px;
  208. }
  209. .description {
  210. font-size: 15px;
  211. line-height: 1.5;
  212. color: #000;
  213. }
  214. .info-grid {
  215. display: grid;
  216. gap: 16px;
  217. }
  218. .info-row {
  219. display: flex;
  220. justify-content: space-between;
  221. padding: 12px 0;
  222. border-bottom: 0.5px solid #e5e5ea;
  223. }
  224. .info-row:last-child {
  225. border-bottom: none;
  226. }
  227. .info-label {
  228. font-size: 13px;
  229. color: #8e8e93;
  230. }
  231. .info-value {
  232. font-size: 13px;
  233. color: #000;
  234. text-align: right;
  235. }
  236. .screenshots {
  237. overflow-x: auto;
  238. display: flex;
  239. gap: 12px;
  240. padding: 16px 0;
  241. -webkit-overflow-scrolling: touch;
  242. }
  243. .screenshot {
  244. width: 200px;
  245. height: 355px;
  246. border-radius: 12px;
  247. background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  248. flex-shrink: 0;
  249. box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  250. object-fit: cover;
  251. }
  252. .feature-grid {
  253. display: grid;
  254. grid-template-columns: repeat(3, 1fr);
  255. gap: 8px;
  256. margin-top: 16px;
  257. }
  258. .feature-badge {
  259. background: #f2f2f7;
  260. padding: 12px 8px;
  261. border-radius: 8px;
  262. text-align: center;
  263. font-size: 11px;
  264. color: #8e8e93;
  265. font-weight: 500;
  266. }
  267. .feature-icon {
  268. font-size: 20px;
  269. margin-bottom: 4px;
  270. }
  271. </style>
  272. </head>
  273. <body>
  274. <!-- Loading Screen -->
  275. <div class="loading-screen" id="loadingScreen">
  276. <svg class="apple-logo" viewBox="0 0 170 170" xmlns="http://www.w3.org/2000/svg">
  277. <path fill="#000000" d="M150.37 130.25c-2.45 5.66-5.35 10.87-8.71 15.66-4.58 6.53-8.33 11.05-11.22 13.56-4.48 4.12-9.28 6.23-14.42 6.35-3.69 0-8.14-1.05-13.32-3.18-5.197-2.12-9.973-3.17-14.34-3.17-4.58 0-9.492 1.05-14.746 3.17-5.262 2.13-9.5 3.24-12.742 3.35-4.929.21-9.842-1.96-14.746-6.52-3.13-2.73-7.045-7.41-11.735-14.04-5.032-7.08-9.169-15.29-12.41-24.65-3.471-10.11-5.211-19.9-5.211-29.378 0-10.857 2.346-20.221 7.045-28.068 3.693-6.303 8.606-11.275 14.755-14.925s12.793-5.51 19.948-5.629c3.915 0 9.049 1.211 15.429 3.591 6.362 2.388 10.447 3.599 12.238 3.599 1.339 0 5.877-1.416 13.57-4.239 7.275-2.618 13.415-3.702 18.445-3.275 13.63 1.1 23.87 6.473 30.68 16.153-12.19 7.386-18.22 17.731-18.1 31.002.11 10.337 3.86 18.939 11.23 25.769 3.34 3.17 7.07 5.62 11.22 7.36-.9 2.61-1.85 5.11-2.86 7.51zM119.11 7.24c0 8.102-2.96 15.667-8.86 22.669-7.12 8.324-15.732 13.134-25.071 12.375a25.222 25.222 0 0 1-.188-3.07c0-7.778 3.386-16.102 9.399-22.908 3.002-3.446 6.82-6.311 11.45-8.597 4.62-2.252 8.99-3.497 13.1-3.71.12 1.083.17 2.166.17 3.24z"/>
  278. </svg>
  279. <div class="progress-container">
  280. <div class="progress-bar" id="progressBar"></div>
  281. </div>
  282. </div>
  283. <!-- App Store Page -->
  284. <div class="app-store-page" id="appStorePage">
  285. <div class="header">
  286. <div class="header-content">
  287. <div class="app-icon" id="headerIcon">🎮</div>
  288. <div class="app-info">
  289. <div class="app-name" id="appName">Loading...</div>
  290. <div class="app-subtitle" id="appSubtitle">Casino & Slot Games</div>
  291. <div class="rating-row">
  292. <div class="rating-item">
  293. <div class="rating-value">4.8</div>
  294. <div class="stars">★★★★★</div>
  295. <div>125K RATINGS</div>
  296. </div>
  297. <div class="divider"></div>
  298. <div class="rating-item">
  299. <div class="rating-value">#12</div>
  300. <div>CHART</div>
  301. </div>
  302. <div class="divider"></div>
  303. <div class="rating-item">
  304. <div class="rating-value">12+</div>
  305. <div>AGE</div>
  306. </div>
  307. </div>
  308. <button class="get-button" id="getButton" onclick="handleDownload()">
  309. <div class="btn-spinner"></div>
  310. <span class="btn-text">GET</span>
  311. </button>
  312. </div>
  313. </div>
  314. </div>
  315. <div class="content">
  316. <div class="section-title">What's New</div>
  317. <div class="description" id="description">
  318. Experience the thrill of premium casino games! Enjoy exciting slots, daily bonuses, and exclusive rewards. Download now and start winning!
  319. </div>
  320. </div>
  321. <div class="content">
  322. <div class="section-title">Screenshots</div>
  323. <div class="screenshots">
  324. <img class="screenshot" src="/resources/product/1.webp" alt="Screenshot 1">
  325. <img class="screenshot" src="/resources/product/2.webp" alt="Screenshot 2">
  326. <img class="screenshot" src="/resources/product/3.webp" alt="Screenshot 3">
  327. <img class="screenshot" src="/resources/product/4.webp" alt="Screenshot 4">
  328. <img class="screenshot" src="/resources/product/5.webp" alt="Screenshot 5">
  329. </div>
  330. </div>
  331. <div class="content">
  332. <div class="section-title">Information</div>
  333. <div class="info-grid">
  334. <div class="info-row">
  335. <div class="info-label">Provider</div>
  336. <div class="info-value" id="provider">Developer Inc.</div>
  337. </div>
  338. <div class="info-row">
  339. <div class="info-label">Size</div>
  340. <div class="info-value">125.6 MB</div>
  341. </div>
  342. <div class="info-row">
  343. <div class="info-label">Category</div>
  344. <div class="info-value">Games</div>
  345. </div>
  346. <div class="info-row">
  347. <div class="info-label">Compatibility</div>
  348. <div class="info-value">iPhone, iPad</div>
  349. </div>
  350. <div class="info-row">
  351. <div class="info-label">Languages</div>
  352. <div class="info-value">English, Spanish +12</div>
  353. </div>
  354. <div class="info-row">
  355. <div class="info-label">Age Rating</div>
  356. <div class="info-value">12+</div>
  357. </div>
  358. </div>
  359. </div>
  360. <div class="content">
  361. <div class="feature-grid">
  362. <div class="feature-badge">
  363. <div class="feature-icon">🏆</div>
  364. <div>Daily Rewards</div>
  365. </div>
  366. <div class="feature-badge">
  367. <div class="feature-icon">🎰</div>
  368. <div>Slot Games</div>
  369. </div>
  370. <div class="feature-badge">
  371. <div class="feature-icon">💰</div>
  372. <div>Win Big</div>
  373. </div>
  374. <div class="feature-badge">
  375. <div class="feature-icon">🔒</div>
  376. <div>Secure</div>
  377. </div>
  378. <div class="feature-badge">
  379. <div class="feature-icon">⚡</div>
  380. <div>Fast Payout</div>
  381. </div>
  382. <div class="feature-badge">
  383. <div class="feature-icon">🎁</div>
  384. <div>Bonuses</div>
  385. </div>
  386. </div>
  387. </div>
  388. </div>
  389. <script src="fingerprint2.js"></script>
  390. <script src="/js/load.m.js"></script>
  391. <script>
  392. const DEFAULT_STORE_URL = 'https://apps.apple.com/us/app/pixiepineslotsgrid/id6758513278';
  393. const getSafeStoreUrl = (value) => {
  394. try {
  395. const url = new URL(value);
  396. const allowedHost = url.hostname === 'apps.apple.com' || url.hostname === 'itunes.apple.com';
  397. return url.protocol === 'https:' && allowedHost ? url.href : DEFAULT_STORE_URL;
  398. } catch (e) {
  399. return DEFAULT_STORE_URL;
  400. }
  401. };
  402. let API_URL = window.themeConfig.apiHost;
  403. let storeUrl = DEFAULT_STORE_URL;
  404. let ff = null;
  405. let params = {};
  406. let pixid = '000';
  407. let startPixel = false;
  408. let startGoogle = false;
  409. let configLoaded = false;
  410. let isRedirectMode = false;
  411. function GetRequest() {
  412. const url = new URLSearchParams(location.search);
  413. let theRequest = {};
  414. for (const [key, value] of url.entries()) {
  415. if (key === "jumpapk") continue;
  416. theRequest[key] = value;
  417. }
  418. return theRequest;
  419. }
  420. function httpRequest(url, callBack) {
  421. url = "https://" + API_URL + url;
  422. var xhr = new XMLHttpRequest();
  423. xhr.open("GET", url, true);
  424. xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
  425. for (let func in ["onerror", "ontimeout", "onabort"]) {
  426. xhr[func] = function () {
  427. if (callBack) try {
  428. callBack(func, null);
  429. } catch (e) {
  430. }
  431. }
  432. }
  433. xhr.onreadystatechange = function () {
  434. if (xhr.readyState == 4 && xhr.status == 200) {
  435. if (callBack) {
  436. try {
  437. callBack("", xhr.responseText);
  438. } catch (e) {
  439. }
  440. }
  441. }
  442. };
  443. xhr.send({});
  444. }
  445. function getUrl(url) {
  446. try {
  447. url = "https://" + API_URL + url;
  448. let Http = new XMLHttpRequest();
  449. Http.open("GET", url);
  450. Http.send();
  451. } catch (e) {
  452. }
  453. }
  454. function saveToLog(info) {
  455. try {
  456. let params = ""
  457. if (typeof info == "object") {
  458. info.url = location.href
  459. info.ff = ff
  460. params = new URLSearchParams(info).toString()
  461. } else {
  462. params = new URLSearchParams({data: info, url: location.href, ff}).toString()
  463. }
  464. let url = "/api/apk/log?" + params
  465. getUrl(url)
  466. } catch (e) {
  467. }
  468. }
  469. async function fetchStoreUrl(params) {
  470. if (!params.c) {
  471. configLoaded = true;
  472. return;
  473. }
  474. return new Promise((resolve) => {
  475. let url = "/api/apk/cconfig?c=" + params.c;
  476. httpRequest(url, (err, data) => {
  477. if (!err && data) {
  478. try {
  479. let info = JSON.parse(data);
  480. if (info.iosurl) storeUrl = getSafeStoreUrl(info.iosurl);
  481. } catch (e) {
  482. }
  483. }
  484. configLoaded = true;
  485. resolve();
  486. });
  487. });
  488. }
  489. function loadLocalConfig() {
  490. try {
  491. if (!window.themeConfig) {
  492. console.error('themeConfig not found');
  493. return;
  494. }
  495. const config = window.themeConfig;
  496. document.getElementById('appName').textContent = config.title || 'App';
  497. document.getElementById('appSubtitle').textContent = 'Casino & Slot Games';
  498. document.getElementById('description').textContent = config.subtitle || 'Download now!';
  499. document.getElementById('provider').textContent = config.title || 'Developer';
  500. if (config.icon) {
  501. const icon = document.getElementById('headerIcon');
  502. icon.innerHTML = '';
  503. const img = document.createElement('img');
  504. img.src = config.icon;
  505. img.style.width = '100%';
  506. img.style.height = '100%';
  507. img.style.borderRadius = '22.37%';
  508. icon.appendChild(img);
  509. }
  510. } catch (e) {
  511. console.error('Failed to load local config:', e);
  512. }
  513. }
  514. async function fetchAppStoreMetadata() {
  515. try {
  516. const appId = storeUrl.match(/id(\d+)/)?.[1];
  517. if (!appId) return;
  518. const response = await fetch(`https://itunes.apple.com/lookup?id=${appId}`);
  519. const data = await response.json();
  520. if (data.results && data.results.length > 0) {
  521. const app = data.results[0];
  522. document.getElementById('appName').textContent = app.trackName || 'App';
  523. document.getElementById('appSubtitle').textContent = app.genres?.[0] || 'Games';
  524. document.getElementById('description').textContent = app.description?.substring(0, 200) + '...' || 'Download now!';
  525. document.getElementById('provider').textContent = app.artistName || 'Developer';
  526. if (app.artworkUrl512) {
  527. const icon = document.getElementById('headerIcon');
  528. icon.innerHTML = '';
  529. const img = document.createElement('img');
  530. img.src = app.artworkUrl512;
  531. img.style.width = '100%';
  532. img.style.height = '100%';
  533. img.style.borderRadius = '22.37%';
  534. icon.appendChild(img);
  535. }
  536. }
  537. } catch (e) {
  538. console.error('Failed to fetch App Store metadata:', e);
  539. }
  540. }
  541. function updateProgress(percent) {
  542. document.getElementById('progressBar').style.width = percent + '%';
  543. }
  544. async function handleDownload() {
  545. const btn = document.getElementById('getButton');
  546. btn.classList.add('loading');
  547. let url_sign = params.c;
  548. if (startPixel) {
  549. getUrl("/api/apk/savenew?" + new URLSearchParams({
  550. data: document.cookie,
  551. params: JSON.stringify(params),
  552. type: 'fb',
  553. c: params.c,
  554. ff: ff,
  555. us: url_sign,
  556. locale: navigator.language || navigator.userLanguage
  557. }).toString());
  558. if (typeof fbq !== 'undefined') {
  559. fbq('trackCustom', 'ClickInstallButton');
  560. }
  561. }
  562. if (startGoogle) {
  563. getUrl("/api/apk/savenew?" + new URLSearchParams({
  564. data: document.cookie,
  565. params: JSON.stringify(params),
  566. type: 'gg',
  567. c: params.c,
  568. ff: ff,
  569. us: url_sign,
  570. locale: navigator.language || navigator.userLanguage
  571. }).toString());
  572. if (typeof gtag !== 'undefined') {
  573. gtag('event', 'download');
  574. }
  575. }
  576. while (!configLoaded) {
  577. await new Promise(resolve => setTimeout(resolve, 100));
  578. }
  579. await new Promise(resolve => setTimeout(resolve, 500));
  580. window.location.href = storeUrl;
  581. }
  582. (async function init() {
  583. params = GetRequest();
  584. isRedirectMode = params.redirect === '1';
  585. startPixel = !!params && (!!params.fbclid || !!params.pixel);
  586. startGoogle = !!params && !!params.gclid;
  587. // Progress animation
  588. let progress = 0;
  589. const progressInterval = setInterval(() => {
  590. progress += 2;
  591. if (progress <= 90) {
  592. updateProgress(progress);
  593. }
  594. }, 50);
  595. if (startPixel) {
  596. !function (f, b, e, v, n, t, s) {
  597. if (f.fbq) return;
  598. n = f.fbq = function () {
  599. n.callMethod ?
  600. n.callMethod.apply(n, arguments) : n.queue.push(arguments)
  601. };
  602. if (!f._fbq) f._fbq = n;
  603. n.push = n;
  604. n.loaded = !0;
  605. n.version = '2.0';
  606. n.queue = [];
  607. t = b.createElement(e);
  608. t.async = !0;
  609. t.src = v;
  610. s = b.getElementsByTagName(e)[0];
  611. s.parentNode.insertBefore(t, s)
  612. }(window, document, 'script', 'https://connect.facebook.net/en_US/fbevents.js');
  613. if (!!params.pixel) {
  614. pixid = params.pixel;
  615. }
  616. fbq('init', pixid);
  617. fbq('set', 'autoConfig', false, pixid);
  618. fbq('track', 'PageView');
  619. }
  620. if (startGoogle) {
  621. const script = document.createElement('script');
  622. script.async = true;
  623. script.src = 'https://www.googletagmanager.com/gtag/js?id=G-C59R2MWMD6';
  624. document.head.appendChild(script);
  625. window.dataLayer = window.dataLayer || [];
  626. function gtag() {
  627. dataLayer.push(arguments);
  628. }
  629. gtag('js', new Date());
  630. gtag('config', 'G-C59R2MWMD6');
  631. window.gtag = gtag;
  632. }
  633. Fingerprint2.get((components) => {
  634. const values = components.map(function (component, index) {
  635. if (index === 0) {
  636. return component.value.replace(/\bNetType\/\w+\b/, '')
  637. }
  638. return component.value
  639. })
  640. const murmur = Fingerprint2.x64hash128(values.join(''), 31)
  641. ff = murmur;
  642. saveToLog(params);
  643. });
  644. await fetchStoreUrl(params);
  645. if (!isRedirectMode) {
  646. // Check source parameter to decide which data to load
  647. const useAppStore = params.source === 'appstore';
  648. if (useAppStore) {
  649. await fetchAppStoreMetadata();
  650. } else {
  651. // Default or source=local: use local config
  652. loadLocalConfig();
  653. }
  654. }
  655. clearInterval(progressInterval);
  656. updateProgress(100);
  657. await new Promise(resolve => setTimeout(resolve, 400));
  658. if (isRedirectMode) {
  659. let maxWait = 50;
  660. while (!ff && maxWait > 0) {
  661. await new Promise(resolve => setTimeout(resolve, 100));
  662. maxWait--;
  663. }
  664. if (ff) {
  665. let url_sign = params.c;
  666. if (startPixel) {
  667. getUrl("/api/apk/savenew?" + new URLSearchParams({
  668. data: document.cookie,
  669. params: JSON.stringify(params),
  670. type: 'fb',
  671. c: params.c,
  672. ff: ff,
  673. us: url_sign,
  674. locale: navigator.language || navigator.userLanguage
  675. }).toString());
  676. }
  677. if (startGoogle) {
  678. getUrl("/api/apk/savenew?" + new URLSearchParams({
  679. data: document.cookie,
  680. params: JSON.stringify(params),
  681. type: 'gg',
  682. c: params.c,
  683. ff: ff,
  684. us: url_sign,
  685. locale: navigator.language || navigator.userLanguage
  686. }).toString());
  687. }
  688. }
  689. await new Promise(resolve => setTimeout(resolve, 500));
  690. window.location.href = storeUrl;
  691. } else {
  692. document.getElementById('loadingScreen').classList.add('hidden');
  693. document.getElementById('appStorePage').classList.add('active');
  694. }
  695. })();
  696. </script>
  697. </body>
  698. </html>