Refresh the storefront and autoplay pack demos

Cache allowlisted official media so the in-game browser can load it locally. Match the official catalog snapshot and start pack demos muted and looping on entry.
This commit is contained in:
N0VAN0M4LY committed 2026-11-27 00:43:50 +08:00
1 parent 81e3add520
commit aa272fc82b
14 files changed
+645 -140

No files matched your search

@@ -39,11 +39,13 @@ export interface LogNotes {
readonly redactedRequestBody?: string;
readonly requestText?: string;
readonly responseText?: string;
/** Public media bytes can already be recovered from the local media cache. */
readonly omitResponseBody?: boolean;
}
/** A Gaijin service emulated by the local service (one protocol-layer module each). */
export interface Service {
readonly name: string;
accepts(request: ServiceRequest): boolean;
handle(request: ServiceRequest): ServiceResponse;
handle(request: ServiceRequest): ServiceResponse | Promise<ServiceResponse>;
}
@@ -20,21 +20,23 @@ export type ConnectionNumbers = (socket: Socket) => number;
export function createHttpServer(router: Router, log: TrafficLog, connectionOf: ConnectionNumbers): Server {
const server = createServer({ requestTimeout: 0, headersTimeout: 0, keepAliveTimeout: 0 }, (incoming, outgoing) => {
readBody(incoming).then(
void readBody(incoming).then(
(body) => respond(incoming, outgoing, body),
() => outgoing.writeHead(413).end(),
);
() => { outgoing.writeHead(413).end(); },
).catch((error: Error) => outgoing.destroy(error));
});
function respond(incoming: IncomingMessage, outgoing: ServerResponse, body: Buffer): void {
async function respond(incoming: IncomingMessage, outgoing: ServerResponse, body: Buffer): Promise<void> {
const target = parseRequestTarget(incoming.url ?? '/', incoming.headers.host);
if (target.originalHost === undefined && target.path === HEALTH_PATH) {
outgoing.writeHead(200, { 'content-type': 'application/json' }).end(JSON.stringify({ app: 'wto-local-service', pid: process.pid }));
return;
}
const request: ServiceRequest = { method: incoming.method ?? 'GET', ...target, headers: incoming.headers, body };
const { service, response } = router.route(request);
log.exchange(request, service, response, connectionOf(incoming.socket));
const connection = connectionOf(incoming.socket);
const { service, response } = await router.route(request);
if (outgoing.destroyed) return;
log.exchange(request, service, response, connection);
outgoing.writeHead(response.status, response.headers ?? {});
outgoing.end(response.body ?? '');
}
+2 -2
View File
@@ -16,13 +16,13 @@ export class Router {
this.#services = services;
}
route(request: ServiceRequest): RoutedResponse {
async route(request: ServiceRequest): Promise<RoutedResponse> {
const service = this.#services.find((candidate) => candidate.accepts(request));
if (!service) {
return { service: 'none', response: { status: 404, body: 'no local service for this request', logNotes: { unhandled: true } } };
}
try {
return { service: service.name, response: service.handle(request) };
return { service: service.name, response: await service.handle(request) };
} catch (error) {
const message = error instanceof Error ? error.stack ?? error.message : String(error);
return { service: service.name, response: { status: 500, body: 'local service error', logNotes: { summary: 'ERROR', responseText: message } } };
+23 -13
View File
@@ -7,15 +7,15 @@ const T = {
premiumOff: '未开通', premiumLeft: '剩余 {days} 天',
tabPacks: '高级载具', tabEagles: '金鹰', tabPremium: '高级账户', tabRedeem: '兑换码',
search: '搜索礼包或载具', allCountries: '所有国家', allRanks: '所有等级', rank: '{rank} 级',
sort: '商品排序', sortBest: '默认排序', sortPriceAsc: '价格从低到高', sortPriceDesc: '价格从高到低',
sort: '商品排序', sortBest: '最畅销', sortNewest: '最新上架', sortPriceAsc: '价格从低到高', sortPriceDesc: '价格从高到低',
containsEagles: '{n} 金鹰', containsSilver: '{n} 银狮', containsPremium: '{days} 天高级账户',
buy: '购买', freeBuy: '老福爷付过了', owned: '已拥有', pickAccount: '请先选择账号',
redeem: '兑换', codePlaceholder: '输入兑换码', empty: '没有符合条件的商品',
featured: '推荐礼包', viewPack: '查看礼包', related: '更多推荐', packPrice: '礼包价格',
featured: '推荐礼包', bestSeller: '畅销', viewPack: '查看礼包', related: '更多推荐', packPrice: '礼包价格',
includes: '礼包内容', back: '返回目录', bonusTitle: '高级载具权益',
bonusText: '驾驶高级载具可在战斗中获得额外的研发点和银狮。',
footer: '购买后关闭商城窗口,机库会自动刷新。',
gallery: '礼包媒体', cover: '封面', screenshot: '截图 {index}', screenshotPending: '官方截图尚未加载', previousMedia: '上一项', nextMedia: '下一项',
gallery: '礼包媒体', cover: '封面', screenshot: '截图 {index}', screenshotLoading: '正在加载官方截图…', screenshotUnavailable: '官方截图暂不可用,当前显示游戏载具图。', previousMedia: '上一项', nextMedia: '下一项',
video: '演示视频', videoNumber: '演示视频 {index}', playVideo: '播放演示',
videoLoading: '正在加载演示视频…', videoUnavailable: '暂时无法播放官方视频,可以继续浏览其他素材。',
cart: '购物车', addCart: '加入购物车', inCart: '已在购物车', confirmPurchase: '确认购买',
@@ -29,15 +29,15 @@ const T = {
premiumOff: 'Inactive', premiumLeft: '{days} days left',
tabPacks: 'Premium vehicles', tabEagles: 'Golden Eagles', tabPremium: 'Premium account', tabRedeem: 'Redeem code',
search: 'Search packs or vehicles', allCountries: 'All nations', allRanks: 'All ranks', rank: 'Rank {rank}',
sort: 'Sort products', sortBest: 'Default order', sortPriceAsc: 'Price: low to high', sortPriceDesc: 'Price: high to low',
sort: 'Sort products', sortBest: 'Top sellers', sortNewest: 'Newest', sortPriceAsc: 'Price: low to high', sortPriceDesc: 'Price: high to low',
containsEagles: '{n} Golden Eagles', containsSilver: '{n} Silver Lions', containsPremium: '{days} days of Premium Account',
buy: 'Buy', freeBuy: '老福爷付过了', owned: 'Owned', pickAccount: 'Pick an account first',
redeem: 'Redeem', codePlaceholder: 'Enter a code', empty: 'Nothing matches the filters',
featured: 'Featured packs', viewPack: 'View pack', related: 'Explore other packs', packPrice: 'Pack price',
featured: 'Featured packs', bestSeller: 'Top seller', viewPack: 'View pack', related: 'Explore other packs', packPrice: 'Pack price',
includes: 'Pack contents', back: 'Back to catalog', bonusTitle: 'Premium bonuses',
bonusText: 'Premium vehicles earn extra research points and Silver Lions in battle.',
footer: 'Close the store window after buying to refresh the hangar.',
gallery: 'Pack media', cover: 'Cover', screenshot: 'Screenshot {index}', screenshotPending: 'Official screenshot has not loaded', previousMedia: 'Previous item', nextMedia: 'Next item',
gallery: 'Pack media', cover: 'Cover', screenshot: 'Screenshot {index}', screenshotLoading: 'Loading official screenshot…', screenshotUnavailable: 'The official screenshot is unavailable. Showing game artwork.', previousMedia: 'Previous item', nextMedia: 'Next item',
video: 'Demo video', videoNumber: 'Demo video {index}', playVideo: 'Play demo',
videoLoading: 'Loading demo video…', videoUnavailable: 'The official video is unavailable. You can still browse the other media.',
cart: 'Cart', addCart: 'Add to cart', inCart: 'In cart', confirmPurchase: 'Confirm purchase',
@@ -156,14 +156,24 @@ function renderCatalog() {
$('packFilters').hidden = !isPacks;
const sort = $('sortSelect').value;
const filtered = $('countryFilter').value || $('rankFilter').value || $('searchInput').value.trim();
renderFeatured($('featured'), isPacks && !filtered && sort === 'best' ? state.products : [], openProduct);
const items = state.products.filter((p) => p.kind === currentTab && (!isPacks || matchesPack(p)));
if (isPacks && sort === 'priceAsc') items.sort((a, b) => a.gjnCostCents - b.gjnCostCents);
if (isPacks && sort === 'priceDesc') items.sort((a, b) => b.gjnCostCents - a.gjnCostCents);
const grid = $('grid');
grid.replaceChildren(...items.map((item) => productCard(item, checkout, openProduct)));
if (!items.length) grid.append(makeElement('p', 'empty', t('empty')));
if (isPacks) sortPacks(items, sort);
const cards = items.map((item) => productCard(item, checkout, openProduct));
if (isPacks && !filtered && sort === 'best' && items.length) {
const featured = items.find((item) => item.id === 'wto_pack_f-4s') || items[0];
cards.unshift(featuredBanner(featured, openProduct));
}
if (!cards.length) cards.push(makeElement('p', 'empty', t('empty')));
$('grid').replaceChildren(...cards);
}
function sortPacks(items, mode) {
const ids = WtoUi.storeOrder(mode === 'newest' ? 'newest' : 'best');
const positions = new Map(ids.map((id, index) => [id, index]));
items.sort((a, b) => (positions.get(a.id) ?? ids.length) - (positions.get(b.id) ?? ids.length));
if (mode === 'priceAsc') items.sort((a, b) => a.gjnCostCents - b.gjnCostCents);
if (mode === 'priceDesc') items.sort((a, b) => b.gjnCostCents - a.gjnCostCents);
}
function openProduct(product) {
+55 -16
View File
@@ -1,4 +1,4 @@
// Image gallery and on-demand playback for public demo clips.
// Images and demo clips for pack details.
'use strict';
const galleryPlayers = new WeakMap();
@@ -18,7 +18,7 @@ function galleryItems(product) {
sources,
}));
screenshots.forEach((url, index) => {
entries.push({ label: t('screenshot', { index: index + 1 }), image: () => WtoUi.tieredImg([url], [], ''), screenshot: true });
entries.push({ label: t('screenshot', { index: index + 1 }), screenshot: url });
});
entries.push({ label: t('cover'), image: cover });
if (product.vehicles && (videos.length || screenshots.length || product.vehicles.length > 1)) {
@@ -29,11 +29,17 @@ function galleryItems(product) {
return entries;
}
function playStoreClip(stage, sources, poster, onReady, onUnavailable) {
function playStoreClip(stage, sources, poster, autoplay, onReady, onUnavailable) {
galleryPlayers.get(stage)?.();
const video = document.createElement('video');
video.controls = true;
video.playsInline = true;
if (autoplay) {
video.autoplay = true;
video.defaultMuted = true;
video.muted = true;
video.loop = true;
}
if (poster) video.poster = poster;
const playable = sources.filter((url) => video.canPlayType(/\.webm(?:$|\?)/i.test(url) ? 'video/webm' : 'video/mp4'));
let nextSource = 0;
@@ -58,7 +64,7 @@ function playStoreClip(stage, sources, poster, onReady, onUnavailable) {
return;
}
video.src = url;
timer = setTimeout(attempt, 5500);
timer = setTimeout(attempt, 23_000);
void video.play().catch(() => {});
}
@@ -72,18 +78,21 @@ function playStoreClip(stage, sources, poster, onReady, onUnavailable) {
attempt();
}
function appendGalleryImage(container, item, placeholder) {
const image = item.image();
if (item.screenshot && !image.naturalWidth) {
const pending = makeElement('span', 'media-placeholder', placeholder);
image.addEventListener('load', () => pending.remove(), { once: true });
container.append(pending);
}
function appendScreenshot(container, item, loaded, eager = false) {
const image = makeElement('img', 'gallery-screenshot');
image.alt = eager ? item.label : '';
image.loading = eager ? 'eager' : 'lazy';
image.onload = () => {
image.classList.add('ready');
loaded(true);
};
image.onerror = () => loaded(false);
image.src = item.screenshot;
container.append(image);
return image;
}
function mountStoreGallery(root, product) {
function mountStoreGallery(root, product, autoplay) {
const items = galleryItems(product);
root.innerHTML = '<div class="media-stage"></div><div class="media-navigation"><button type="button">‹</button>'
+ '<div class="media-thumbs"></div><button type="button">›</button></div>'
@@ -100,21 +109,43 @@ function mountStoreGallery(root, product) {
function showImage(item, showPlay) {
stage.replaceChildren();
const image = appendGalleryImage(stage, item, t('screenshotPending'));
if (item.screenshot) {
showScreenshot(item);
return;
}
const image = item.image();
image.loading = 'eager';
image.alt = item.label;
stage.append(image);
if (!showPlay) return;
const play = storeButton('media-play', '▶ ' + t('playVideo'));
play.onclick = () => playItem(item);
stage.append(play);
}
function playItem(item) {
function showScreenshot(item) {
const gameArt = WtoUi.tieredImg([], productArtwork(product), '');
gameArt.loading = 'eager';
stage.append(gameArt);
status.textContent = t('screenshotLoading');
status.hidden = false;
const image = appendScreenshot(stage, item, (ok) => {
if (image.parentNode !== stage) return;
if (ok) {
gameArt.remove();
status.hidden = true;
} else {
status.textContent = t('screenshotUnavailable');
}
}, true);
}
function playItem(item, autoplay = false) {
const image = stage.querySelector('img');
const poster = image?.currentSrc || image?.getAttribute('src');
status.textContent = t('videoLoading');
status.hidden = false;
playStoreClip(stage, item.sources, poster, () => { status.hidden = true; }, () => {
playStoreClip(stage, item.sources, poster, autoplay, () => { status.hidden = true; }, () => {
showImage(item, true);
status.textContent = t('videoUnavailable');
status.hidden = false;
@@ -144,7 +175,13 @@ function mountStoreGallery(root, product) {
button.setAttribute('aria-label', item.label);
button.setAttribute('aria-pressed', 'false');
button.title = item.label;
appendGalleryImage(button, item, item.label);
if (item.screenshot) {
const label = makeElement('span', 'media-placeholder', item.label);
button.append(label);
appendScreenshot(button, item, (ok) => { if (ok) label.remove(); });
} else {
button.append(item.image());
}
if (item.sources) button.append(makeElement('span', 'thumb-play', '▶'));
button.onclick = () => select(index, true);
return button;
@@ -162,4 +199,6 @@ function mountStoreGallery(root, product) {
};
nav.hidden = caption.hidden = items.length === 1;
select(0, false, false);
const initial = items[0];
if (autoplay && initial.sources) playItem(initial, true);
}
@@ -51,12 +51,12 @@
<input id="searchInput" type="search" data-label="search" />
<select id="sortSelect" data-label="sort">
<option value="best" data-t="sortBest"></option>
<option value="newest" data-t="sortNewest"></option>
<option value="priceAsc" data-t="sortPriceAsc"></option>
<option value="priceDesc" data-t="sortPriceDesc"></option>
</select>
</div>
</div>
<section class="featured" id="featured" hidden></section>
<div class="grid" id="grid"></div>
</section>
<section class="detail" id="detail" hidden></section>
@@ -1,16 +1,16 @@
.detail { padding: 23px 0 42px; }
.detail-head { margin-bottom: 17px; }
.detail-head h1 { margin: 6px 0 8px; font-size: clamp(28px, 4.1vw, 45px); line-height: 1.15; }
.detail { padding: 18px 0 38px; }
.detail-head { margin-bottom: 14px; }
.detail-head h1 { margin: 5px 0 7px; font-size: clamp(27px, 3.5vw, 41px); line-height: 1.14; overflow-wrap: anywhere; }
.detail-meta:empty { display: none; }
.back { padding: 2px 0; border: 0; background: transparent; color: var(--accent); font-weight: 600; }
.back:hover { text-decoration: underline; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(270px, 1fr); gap: 22px; align-items: start; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 2.25fr) minmax(250px, 1fr); gap: 20px; align-items: start; }
.detail-main, .detail-grid > aside { min-width: 0; }
.gallery {
padding: 8px;
border: 1px solid var(--line);
border-radius: 10px;
background: #18252e;
min-width: 0;
padding-bottom: 5px;
border-bottom: 1px solid var(--line);
}
.media-stage {
position: relative;
@@ -18,24 +18,26 @@
place-items: center;
aspect-ratio: 16 / 9;
overflow: hidden;
border-radius: 5px;
background: radial-gradient(ellipse, #314c5c, #101a22);
border-radius: 4px;
background: radial-gradient(ellipse, #405368, #182632);
}
.media-stage img, .media-stage video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.media-stage video { background: #000; }
.gallery-screenshot { visibility: hidden; }
.gallery-screenshot.ready { visibility: visible; }
.media-placeholder { color: var(--muted); text-align: center; }
.media-thumb .media-placeholder { position: absolute; inset: 0; display: grid; place-items: center; padding: 3px; font-size: 12px; }
.media-play {
position: relative;
min-height: 44px;
padding: 8px 18px;
border: 1px solid #b6f1e8;
border-radius: 22px;
background: #10292bea;
color: #cff8f1;
border: 1px solid #e0bf82;
border-radius: 18px;
background: #251f1be8;
color: #ffe9bd;
font-weight: 700;
}
.media-play:hover { background: #1c4d4e; }
.media-play:hover { background: #463527; }
.media-navigation { display: grid; grid-template-columns: 34px minmax(0, 1fr) 34px; align-items: stretch; gap: 6px; margin-top: 8px; }
.media-navigation > button {
padding: 0;
@@ -58,7 +60,7 @@
border-radius: 5px;
background: #283b48;
}
.media-thumb[aria-pressed="true"] { border-color: var(--accent); }
.media-thumb[aria-pressed="true"] { border-color: var(--gold); }
.media-thumb:focus-visible { outline-offset: -4px; }
.media-thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.thumb-play {
@@ -71,15 +73,15 @@
height: 28px;
padding-left: 2px;
border-radius: 50%;
background: #112f32dc;
color: var(--accent-hover);
background: #382d22ec;
color: var(--gold);
transform: translate(-50%, -50%);
}
.media-caption { display: flex; justify-content: space-between; gap: 8px; padding: 7px 3px 0; color: var(--muted); font-size: 13px; }
.media-position { white-space: nowrap; }
.media-status { margin: 8px 3px 2px; color: #ffd5b3; font-size: 13px; }
.buy-panel { padding: 18px 18px 15px; border: 1px solid var(--line); border-top: 2px solid #679d93; border-radius: 9px; background: var(--surface); }
.buy-panel { padding: 17px 17px 15px; border: 1px solid #546371; border-top: 2px solid #c0a570; border-radius: 5px; background: linear-gradient(#303c49, #23303d); }
.detail-price { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 5px 10px; padding-bottom: 14px; color: var(--muted); }
.detail-price strong { color: var(--gold); font-size: 25px; }
.detail-actions { display: grid; gap: 9px; }
@@ -103,8 +105,8 @@
margin-top: 18px;
padding: 25px 26px;
border: 1px solid #e1c38d;
border-radius: 9px;
background: linear-gradient(108deg, #e4cd98, #d1aa62 62%, #9b713c);
border-radius: 5px;
background: linear-gradient(108deg, #e6cf9b, #d7b474 62%, #a17948);
color: #2e2214;
}
.bonus-art {
@@ -124,7 +126,9 @@
.bonus-copy h2 { margin: 0 0 6px; font-size: clamp(21px, 3vw, 29px); }
.bonus-copy p { margin: 0; font-size: 15px; font-weight: 550; }
@media (max-width: 800px) {
@media (max-width: 760px) {
.detail-grid { grid-template-columns: minmax(0, 1fr); }
.detail-main { display: contents; }
.detail-grid > aside { grid-row: 2; }
.bonus { margin-top: 0; }
}
@@ -61,6 +61,9 @@ function productCard(product, checkout, openProduct) {
const open = storeButton('product-open');
const art = makeElement('span', 'product-art');
art.append(productImage(product));
if (WtoUi.storeOrder('bestSellers').includes(product.id)) {
art.append(makeElement('span', 'product-badge', t('bestSeller')));
}
const info = makeElement('span', 'product-info');
info.append(makeElement('span', 'product-title', WtoUi.text(product.title)));
if (product.unitName) {
@@ -90,14 +93,7 @@ function recommendationTile(product, openProduct) {
return tile;
}
function renderFeatured(root, products, openProduct) {
const [lead, ...more] = recommendedPacks(products);
root.hidden = !lead;
if (!lead) {
root.replaceChildren();
return;
}
root.setAttribute('aria-label', t('featured'));
function featuredBanner(lead, openProduct) {
const hero = storeButton('featured-hero');
const { screenshots } = WtoUi.storeMedia(lead.id);
const image = screenshots.length ? productScreenshot(lead, screenshots[0]) : productImage(lead);
@@ -111,12 +107,12 @@ function renderFeatured(root, products, openProduct) {
);
hero.append(image, copy);
hero.onclick = () => openProduct(lead);
const tiles = makeElement('div', 'recommendation-list');
tiles.append(...more.map((product) => recommendationTile(product, openProduct)));
root.replaceChildren(hero, tiles);
return hero;
}
function renderPackDetail(root, product, checkout, products, openProduct, backToCatalog) {
const autoplay = !root.firstElementChild || root.dataset.productId !== product.id;
root.dataset.productId = product.id;
root.innerHTML = '<header class="detail-head"><button type="button" class="back"></button><h1 tabindex="-1"></h1><div class="detail-meta"></div></header>'
+ '<div class="detail-grid"><div class="detail-main"><section class="gallery"></section><section class="bonus" hidden></section></div>'
+ '<aside><div class="buy-panel"><div class="detail-price"></div><div class="detail-actions"></div><div class="includes"></div></div>'
@@ -126,7 +122,7 @@ function renderPackDetail(root, product, checkout, products, openProduct, backTo
back.onclick = backToCatalog;
root.querySelector('h1').textContent = WtoUi.text(product.title);
if (product.unitName) root.querySelector('.detail-meta').append(vehicleMeta(product));
mountStoreGallery(root.querySelector('.gallery'), product);
mountStoreGallery(root.querySelector('.gallery'), product, autoplay);
const price = root.querySelector('.detail-price');
price.append(makeElement('span', '', t('packPrice')), makeElement('strong', '', storePrice(product.gjnCostCents)));
+68 -57
View File
@@ -1,14 +1,14 @@
:root {
color-scheme: dark;
--background: #111b23;
--surface: #1c2933;
--surface-raised: #243541;
--line: #344753;
--text: #f1f4f4;
--muted: #b4c1c8;
--accent: #83dfcf;
--accent-hover: #adf1e4;
--gold: #e6c681;
--background: #222d39;
--surface: #303e4d;
--surface-raised: #3c4b5a;
--line: #4a5b6a;
--text: #f2f4f7;
--muted: #bac7d2;
--accent: #78d6e3;
--accent-hover: #afeef5;
--gold: #f0d396;
--font: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
}
@@ -17,7 +17,7 @@
html, body { margin: 0; }
body {
min-height: 100vh;
background: radial-gradient(ellipse at 45% 0, #263845, var(--background) 540px);
background: radial-gradient(ellipse at 50% 0, #455463, var(--background) 620px);
color: var(--text);
font: 15px/1.45 var(--font);
}
@@ -29,15 +29,16 @@ button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible
outline-offset: 3px;
}
a { color: var(--accent); text-decoration: none; }
.page { width: min(1280px, calc(100% - 64px)); margin: 0 auto; }
.page { width: min(1248px, calc(100% - 56px)); margin: 0 auto; }
.store-header {
min-height: 76px;
min-height: 52px;
display: flex;
align-items: center;
justify-content: space-between;
gap: 20px;
padding: 12px 0;
padding: 8px 12px;
background: #141e29;
}
.store-brand {
display: inline-flex;
@@ -46,17 +47,17 @@ a { color: var(--accent); text-decoration: none; }
padding: 0;
border: 0;
background: transparent;
font-size: 19px;
font-size: 17px;
font-weight: 650;
white-space: nowrap;
}
.store-mark {
display: grid;
place-items: center;
width: 38px;
height: 38px;
width: 31px;
height: 31px;
border: 1px solid #b99c65;
border-radius: 9px;
border-radius: 5px;
background: #352e23;
color: var(--gold);
font-size: 14px;
@@ -67,11 +68,13 @@ a { color: var(--accent); text-decoration: none; }
align-items: center;
justify-content: flex-end;
flex-wrap: wrap;
gap: 8px 16px;
min-width: 0;
gap: 6px 12px;
color: var(--muted);
font-size: 13px;
}
.balance { white-space: nowrap; }
.account-strip select { max-width: min(230px, 100%); }
.balance b { margin-left: 3px; color: var(--text); font-weight: 600; }
.account-strip select, .filters select, .filters input, .redeem-row input {
min-height: 38px;
@@ -82,11 +85,11 @@ a { color: var(--accent); text-decoration: none; }
color: var(--text);
}
.store-nav { display: flex; justify-content: space-between; gap: 10px 20px; border-bottom: 1px solid var(--line); }
.store-nav { display: flex; justify-content: space-between; gap: 8px 16px; padding: 0 3px; border-bottom: 1px solid var(--line); }
.tabs, .store-links { display: flex; align-items: center; gap: 8px; }
.tabs { flex-wrap: wrap; }
.tabs button {
min-height: 48px;
min-height: 56px;
padding: 0 13px;
border: 0;
border-bottom: 2px solid transparent;
@@ -96,25 +99,25 @@ a { color: var(--accent); text-decoration: none; }
}
.tabs button:hover, .tabs button[aria-pressed="true"] { color: var(--accent); }
.tabs button[aria-pressed="true"] { border-color: var(--accent); }
.store-links { gap: 16px; padding-bottom: 6px; white-space: nowrap; }
.store-links { gap: 15px; white-space: nowrap; }
.cart-link {
min-height: 38px;
display: inline-flex;
align-items: center;
gap: 9px;
padding: 4px 10px;
border: 1px solid #518477;
border-radius: 6px;
background: #233e40;
border: 1px solid #5c8b9b;
border-radius: 4px;
background: #283e4e;
color: var(--accent-hover);
font-weight: 650;
}
.cart-link:hover:not(:disabled) { background: #305453; }
.cart-link:hover:not(:disabled) { background: #35566a; }
.cart-link b {
min-width: 22px;
padding: 1px 5px;
border-radius: 12px;
background: #132a2c;
background: #172c3a;
text-align: center;
font-size: 12px;
}
@@ -139,23 +142,24 @@ a { color: var(--accent); text-decoration: none; }
box-shadow: 8px 0 currentColor;
}
.catalog-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px 20px; padding: 24px 0 18px; }
.catalog-head h1, .redeem h1 { margin: 0; font-size: clamp(25px, 3vw, 34px); line-height: 1.2; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.filters input { width: clamp(150px, 21vw, 245px); }
.catalog-head { display: grid; gap: 11px; padding: 18px 0; }
.catalog-head h1, .redeem h1 { margin: 0; font-size: clamp(24px, 3vw, 32px); line-height: 1.2; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 7px 0; border-block: 1px solid var(--line); font-size: 13px; }
.filters input { width: clamp(130px, 22vw, 270px); }
.filters input::placeholder { color: var(--muted); }
.filters #sortSelect { margin-left: auto; }
.featured { display: grid; grid-template-columns: minmax(0, 2.15fr) minmax(0, 1fr); gap: 14px; margin-bottom: 24px; }
.featured-hero {
position: relative;
min-height: 260px;
grid-column: span 2;
min-height: 275px;
display: flex;
align-items: flex-end;
overflow: hidden;
padding: 24px;
border: 1px solid #617987;
border-radius: 10px;
background: #263c4a;
border-radius: 5px;
background: #2b4051;
text-align: left;
isolation: isolate;
}
@@ -165,16 +169,14 @@ a { color: var(--accent); text-decoration: none; }
position: absolute;
z-index: -1;
inset: 0;
background: linear-gradient(88deg, #111e29ee 3%, #14212cbb 34%, transparent 76%),
linear-gradient(0deg, #101c26cc, transparent 66%);
background: linear-gradient(86deg, #131c2be8 4%, #263344aa 36%, transparent 75%),
linear-gradient(0deg, #101a27dc, transparent 64%);
}
.featured-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.featured-label { color: var(--gold); font-size: 13px; font-weight: 650; }
.featured-title { max-width: 540px; font-size: clamp(25px, 3.4vw, 42px); line-height: 1.13; overflow-wrap: anywhere; }
.featured-link { margin-top: 6px; color: var(--accent-hover); font-weight: 650; }
.featured-hero:hover .featured-link { text-decoration: underline; }
.recommendation-list { display: grid; grid-auto-rows: 1fr; gap: 9px; }
.recommendation-list:empty { display: none; }
.recommendation-tile {
display: grid;
grid-template-columns: min(38%, 132px) minmax(0, 1fr);
@@ -184,7 +186,7 @@ a { color: var(--accent); text-decoration: none; }
padding: 0 12px 0 0;
overflow: hidden;
border: 1px solid var(--line);
border-radius: 8px;
border-radius: 5px;
background: var(--surface);
text-align: left;
}
@@ -193,20 +195,22 @@ a { color: var(--accent); text-decoration: none; }
.recommendation-copy { display: grid; gap: 4px; padding: 5px 0; overflow-wrap: anywhere; }
.recommendation-copy > span { color: var(--gold); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; padding-bottom: 38px; }
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; padding-bottom: 38px; }
.product-card {
display: flex;
flex-direction: column;
min-width: 0;
overflow: hidden;
border: 1px solid var(--line);
border-radius: 8px;
border-radius: 5px;
background: var(--surface);
}
.product-card:hover { border-color: #627e89; }
.product-open { display: block; width: 100%; padding: 0; border: 0; background: transparent; text-align: left; }
.product-open:focus-visible { outline-offset: -3px; }
.product-art { display: block; aspect-ratio: 2 / 1; background: radial-gradient(ellipse, #3b5563, #253947); }
.product-art { position: relative; display: block; aspect-ratio: 16 / 9; background: radial-gradient(ellipse, #465866, #293b4a); }
.product-art::after { content: ""; position: absolute; inset: auto 0 0; height: 24%; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.product-badge { position: absolute; z-index: 1; top: 10px; left: 10px; padding: 3px 8px; border: 1px solid #b28f5a; border-radius: 4px; background: #362f28f2; color: var(--gold); font-size: 12px; font-weight: 650; }
.product-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
.product-info { display: grid; gap: 6px; padding: 12px 13px 8px; }
.product-title { font-size: 17px; font-weight: 650; line-height: 1.25; overflow-wrap: anywhere; }
@@ -214,12 +218,12 @@ a { color: var(--accent); text-decoration: none; }
.product-meta img { width: 25px; height: 16px; object-fit: contain; }
.product-meta .rank { padding: 1px 6px; border-radius: 4px; background: #ffffff13; color: var(--text); white-space: nowrap; }
.product-rewards { color: var(--muted); font-size: 12px; }
.card-price { margin-top: auto; padding: 10px 13px; color: var(--gold); font-size: 19px; font-weight: 650; }
.card-price { margin-top: auto; padding: 10px 13px; color: var(--gold); font-size: 19px; font-weight: 650; text-align: right; }
.card-actions { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr); border-top: 1px solid var(--line); }
.card-actions button { min-height: 41px; padding: 6px; border: 0; background: transparent; font-size: 14px; font-weight: 600; }
.card-actions .card-buy { color: var(--accent); border-right: 1px solid var(--line); }
.card-actions .card-add { color: var(--text); }
.card-actions button:hover:not(:disabled), .card-actions .in-cart { background: #2a4649; }
.card-actions .card-buy { color: var(--gold); border-right: 1px solid var(--line); }
.card-actions .card-add { color: #e6edf0; }
.card-actions button:hover:not(:disabled), .card-actions .in-cart { background: #415365; }
.empty { grid-column: 1 / -1; color: var(--muted); }
.btn-main, .btn-outline {
@@ -229,10 +233,10 @@ a { color: var(--accent); text-decoration: none; }
border-radius: 6px;
font-weight: 650;
}
.btn-main { background: var(--accent); color: #172925; }
.btn-main:hover:not(:disabled) { background: var(--accent-hover); }
.btn-outline { border-color: #697c85; background: transparent; color: var(--text); }
.btn-outline:hover:not(:disabled), .btn-outline.in-cart { background: #2b4549; }
.btn-main { border-color: #c47359; background: linear-gradient(#ad513c, #923e30); color: #fff; }
.btn-main:hover:not(:disabled) { background: linear-gradient(#bc5f47, #a24937); }
.btn-outline { border-color: #bca674; background: transparent; color: var(--gold); }
.btn-outline:hover:not(:disabled), .btn-outline.in-cart { background: #3b4c5a; }
.notice { display: none; margin: 14px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 5px; }
.notice.ok { display: block; background: #18362f; color: #b4eed9; }
@@ -248,14 +252,21 @@ a { color: var(--accent); text-decoration: none; }
.grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 730px) {
.store-header, .store-nav { flex-wrap: wrap; }
@media (max-width: 880px) {
.store-header { flex-wrap: wrap; gap: 7px 16px; }
.account-strip { justify-content: flex-start; }
.featured { grid-template-columns: minmax(0, 1fr); }
.recommendation-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
}
@media (max-width: 390px) {
.grid, .recommendation-list { grid-template-columns: minmax(0, 1fr); }
@media (max-width: 730px) {
.store-nav { flex-wrap: wrap; }
.store-links { padding-bottom: 7px; }
.featured-hero { min-height: 215px; }
.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 410px) {
.page { width: calc(100% - 24px); }
.grid { grid-template-columns: minmax(0, 1fr); }
.featured-hero { grid-column: 1; }
.filters #sortSelect { margin-left: 0; }
}
@@ -42,7 +42,7 @@ export class TrafficLog {
const files = {
request: this.#writeBody(id, 'req.bin', notes.redactedRequestBody ?? request.body),
requestText: this.#writeBody(id, 'req.txt', notes.requestText),
response: this.#writeBody(id, 'resp.bin', response.body),
response: notes.omitResponseBody ? null : this.#writeBody(id, 'resp.bin', response.body),
responseText: this.#writeBody(id, 'resp.txt', notes.responseText),
};
this.#append({
@@ -0,0 +1,156 @@
/** Fetch and cache only public media named in the bundled store manifest. */
import { existsSync, readFileSync } from 'node:fs';
import { join } from 'node:path';
import type { ServiceResponse } from '../server/exchange.ts';
import { writeFileAtomic } from '../storage/atomic-file.ts';
export const STORE_MEDIA_PREFIX = 'store-media/';
const CDN = 'https://static-store.gaijin.net/';
const MANIFEST = new URL('./web/official-store-media.json', import.meta.url);
const CONTENT_TYPES: Readonly<Record<string, string>> = {
jpg: 'image/jpeg', webm: 'video/webm', mp4: 'video/mp4',
};
interface StoreMediaEntry {
readonly cover: string;
readonly screenshots?: readonly string[];
readonly videos?: readonly string[];
}
function knownAssets(): ReadonlyMap<string, string> {
const { byProduct } = JSON.parse(readFileSync(MANIFEST, 'utf8')) as { byProduct: Record<string, StoreMediaEntry> };
const assets = new Map<string, string>();
for (const entry of Object.values(byProduct)) {
for (const path of [entry.cover, ...entry.screenshots ?? [], ...entry.videos ?? []]) {
const type = CONTENT_TYPES[path.slice(path.lastIndexOf('.') + 1)];
if (type && /^(?:img\/|video\/)[a-z0-9/_-]+\.(?:jpg|mp4|webm)$/i.test(path)) assets.set(path, type);
}
}
return assets;
}
export class StoreMediaCache {
readonly #assets = knownAssets();
readonly #packFolder: string;
readonly #cacheFolder: string;
readonly #pending = new Map<string, Promise<Buffer | undefined>>();
readonly #retryAfter = new Map<string, number>();
constructor(dataFolder: string) {
this.#packFolder = join(dataFolder, 'asset-pack', new URL(CDN).hostname);
this.#cacheFolder = join(dataFolder, 'cache', 'store-media');
}
async serve(path: string, range: string | undefined): Promise<ServiceResponse> {
const type = this.#assets.get(path);
if (!type) return { status: 404, logNotes: { summary: 'unknown store media' } };
const cachedPath = join(this.#cacheFolder, path);
const bytes = readCached(join(this.#packFolder, path)) ?? readCached(cachedPath)
?? await this.#downloadOnce(path, type, cachedPath);
const logNotes = { summary: 'store media: ' + path, omitResponseBody: true };
if (!bytes) {
return { status: 503, headers: { 'cache-control': 'no-store' }, logNotes: { ...logNotes, summary: 'store media unavailable: ' + path } };
}
const headers = { 'content-type': type, 'cache-control': 'public, max-age=86400', 'accept-ranges': 'bytes' };
if (!range) return { status: 200, headers: { ...headers, 'content-length': String(bytes.length) }, body: bytes, logNotes };
const span = parseRange(range, bytes.length);
if (!span) return { status: 416, headers: { ...headers, 'content-range': `bytes */${bytes.length}` }, logNotes };
const [first, last] = span;
const body = bytes.subarray(first, last + 1);
return {
status: 206,
headers: { ...headers, 'content-range': `bytes ${first}-${last}/${bytes.length}`, 'content-length': String(body.length) },
body,
logNotes,
};
}
async #downloadOnce(path: string, type: string, cachedPath: string): Promise<Buffer | undefined> {
if ((this.#retryAfter.get(path) ?? 0) > Date.now()) return undefined;
const pending = this.#pending.get(path);
if (pending) return pending;
const work = downloadAsset(path, type).then((bytes) => {
if (bytes) {
this.#retryAfter.delete(path);
try { writeFileAtomic(cachedPath, bytes); } catch { /* The response is usable even if the disk cache is unavailable. */ }
} else {
this.#retryAfter.set(path, Date.now() + 30_000);
}
return bytes;
}).finally(() => { this.#pending.delete(path); });
this.#pending.set(path, work);
return work;
}
}
function readCached(path: string): Buffer | undefined {
if (!existsSync(path)) return undefined;
try {
const bytes = readFileSync(path);
return bytes.length ? bytes : undefined;
} catch {
return undefined;
}
}
async function downloadAsset(path: string, type: string): Promise<Buffer | undefined> {
const video = type.startsWith('video/');
const signal = AbortSignal.timeout(video ? 20_000 : 7_500);
for (let attempt = 0; attempt < 2 && !signal.aborted; attempt++) {
try {
const response = await fetch(new URL(path, CDN), { signal, redirect: 'error' });
if (response.ok && response.headers.get('content-type')?.split(';', 1)[0] === type) {
return await readMediaBody(response, (video ? 64 : 8) * 1024 * 1024);
}
await response.body?.cancel();
if (response.status < 500) return undefined;
} catch {
// Retry a transient connection error within the original time limit.
}
}
return undefined;
}
async function readMediaBody(response: Response, limit: number): Promise<Buffer | undefined> {
const reader = response.body?.getReader();
if (!reader) return undefined;
try {
if (Number(response.headers.get('content-length')) > limit) {
await reader.cancel();
return undefined;
}
const chunks: Uint8Array[] = [];
let bytes = 0;
for (;;) {
const { done, value } = await reader.read();
if (done) return bytes ? Buffer.concat(chunks, bytes) : undefined;
bytes += value.length;
if (bytes > limit) {
await reader.cancel();
return undefined;
}
chunks.push(value);
}
} finally {
reader.releaseLock();
}
}
function parseRange(range: string, size: number): readonly [number, number] | undefined {
const match = /^bytes=(\d*)-(\d*)$/.exec(range);
if (!match || (!match[1] && !match[2])) return undefined;
if (!match[1]) {
const count = Number(match[2]);
return Number.isSafeInteger(count) && count > 0 ? [Math.max(0, size - count), size - 1] : undefined;
}
const from = Number(match[1]);
const to = match[2] ? Number(match[2]) : size - 1;
if (!Number.isSafeInteger(from) || !Number.isSafeInteger(to) || from >= size || to < from) return undefined;
return [from, Math.min(to, size - 1)];
}
@@ -8,11 +8,12 @@
* vehicle/<vehicle>.svg the game's silhouette icon of a vehicle (web-icons dataset)
* flag/<country>.svg the game's country flag (web-icons dataset)
* official-store-media.json public store cover, screenshot and video paths by product
* store-media/<path> cached public store media from the manifest
* art/<kind>/<key> game artwork for vehicles, products and coupons
* asset-pack/<path> the player's own optional copy of official images, made by
* asset-pack-cli.ts into <data folder>/asset-pack/
* Icons and names come from the player's game files at start-up; nothing of Gaijin's is shipped.
* Image order on the pages: asset pack → official site (when reachable) → game files.
* Store media prefers the asset pack and the service cache before fetching the public file.
*/
import { existsSync, readFileSync } from 'node:fs';
import { resolve, sep } from 'node:path';
@@ -20,6 +21,7 @@ import type { WebIcons } from '../game-data/datasets/web-icons.ts';
import type { UiLabels } from '../game-data/datasets/ui-labels.ts';
import type { Service, ServiceRequest, ServiceResponse } from '../server/exchange.ts';
import type { GameArtwork } from './game-artwork.ts';
import { StoreMediaCache, STORE_MEDIA_PREFIX } from './store-media-cache.ts';
import { contentResponse, createStaticWebSite, notFound } from './web-helpers.ts';
const PREFIX = '/_wto/ui/';
@@ -35,21 +37,24 @@ export class WebUiService implements Service {
readonly #labels: string;
readonly #packDir: string;
readonly #artwork: GameArtwork;
readonly #storeMedia: StoreMediaCache;
constructor(icons: WebIcons, labels: UiLabels, dataFolder: string, artwork: GameArtwork) {
this.#icons = icons;
this.#labels = JSON.stringify(labels);
this.#packDir = resolve(dataFolder, 'asset-pack');
this.#artwork = artwork;
this.#storeMedia = new StoreMediaCache(dataFolder);
}
accepts(request: ServiceRequest): boolean {
return request.originalHost === undefined && request.method === 'GET' && request.path.startsWith(PREFIX);
}
handle(request: ServiceRequest): ServiceResponse {
handle(request: ServiceRequest): ServiceResponse | Promise<ServiceResponse> {
const subPath = request.path.slice(PREFIX.length);
if (subPath === 'labels.json') return contentResponse(subPath, this.#labels, 'web ui: labels');
if (subPath.startsWith(STORE_MEDIA_PREFIX)) return this.#storeMedia.serve(subPath.slice(STORE_MEDIA_PREFIX.length), request.headers.range);
if (subPath.startsWith(PACK_PREFIX)) return this.#packFile(subPath.slice(PACK_PREFIX.length));
const art = ART_PATH.exec(subPath);
if (art) return this.#gamePicture(art[1]!, art[2]!);
@@ -103,8 +103,9 @@ const WtoUi = (() => {
}
const ASSET_PACK = '/_wto/ui/asset-pack/';
const STORE_MEDIA = '/_wto/ui/store-media/';
let officialImages = { base: '', byKey: {} };
let officialStore = { base: '', byProduct: {} };
let officialStore = { byProduct: {}, catalogOrder: {} };
let packIndex = new Set();
async function mediaJson(url, fallback) {
@@ -128,7 +129,7 @@ const WtoUi = (() => {
packIndex = new Set(Array.isArray(index) ? index : []);
}
function publicImageAvailable(url) {
function imageAvailable(url) {
return new Promise((resolve) => {
const probe = new Image();
const finish = (available) => {
@@ -137,7 +138,7 @@ const WtoUi = (() => {
if (!available) probe.removeAttribute('src');
resolve(available);
};
const timer = setTimeout(() => finish(false), 2500);
const timer = setTimeout(() => finish(false), url.startsWith(STORE_MEDIA) ? 8500 : 2500);
probe.crossOrigin = 'anonymous';
probe.referrerPolicy = 'no-referrer';
probe.onload = () => finish(true);
@@ -149,7 +150,7 @@ const WtoUi = (() => {
async function preferPublicImage(img, urls) {
for (const url of urls) {
if (!img.isConnected) return;
const ready = await publicImageAvailable(url);
const ready = await imageAvailable(url);
if (ready && img.isConnected) {
const previous = img.getAttribute('src');
img.onload = null;
@@ -165,7 +166,7 @@ const WtoUi = (() => {
}
}
/** Use downloaded art first and show game art while attempting the public URL. */
/** Use packed art first and show game art while attempting an official source. */
function tieredImg(urls, fallbacks, className) {
const img = document.createElement('img');
img.className = className;
@@ -215,10 +216,14 @@ const WtoUi = (() => {
return tieredImg([officialUrl(key)], [artworkUrl(kind, key)], className);
}
function storeOrder(mode) {
return officialStore.catalogOrder?.[mode] || [];
}
function storeMedia(productId) {
const entry = officialStore.byProduct[productId];
if (!entry) return { cover: '', screenshots: [], videos: [] };
const url = (path) => officialStore.base + path;
const url = (path) => path ? STORE_MEDIA + path : '';
const clips = new Map();
for (const path of entry.videos || []) {
const name = path.replace(/\.(webm|mp4)$/i, '');
@@ -231,6 +236,6 @@ const WtoUi = (() => {
return {
lang, query, text, tr, num, gjn, escapeHtml, label, getJson, postJson, loadLabels, iconImg, savedAccount, saveAccount,
clearSavedAccount, fillAccountSelect, pageLink, showNotice, loadImageSources, artworkUrl, vehicleUrls, vehicleImg, itemImg, storeMedia, tieredImg,
clearSavedAccount, fillAccountSelect, pageLink, showNotice, loadImageSources, artworkUrl, vehicleUrls, vehicleImg, itemImg, storeMedia, storeOrder, tieredImg,
};
})();
@@ -1,5 +1,280 @@
{
"base": "https://static-store.gaijin.net/",
"catalogOrder": {
"capturedOn": "2026-11-26",
"best": [
"wto_pack_fa_18d_late",
"wto_pack_us_stingray_2",
"wto_pack_f-4s",
"wto_pack_a_10a_early",
"wto_pack_fa_18c_early",
"wto_pack_fr_leopard_2a4nl_les",
"wto_pack_su_30mkk",
"wto_pack_us_t58",
"wto_pack_ussr_bmpt_72",
"wto_pack_cn_ztz_96b",
"wto_pack_saab_jas39_pre_serie",
"wto_pack_f_16a_block_10_netz_mod",
"wto_pack_germ_pzkpfw_VI_ausf_b_tiger_IIh_sla",
"wto_pack_sw_cv_90105_tml",
"wto_pack_fr_somua_sm",
"wto_pack_su_30mk2v_venezuela",
"wto_pack_germ_flakpanzer_IV_Ostwind_2_net",
"wto_pack_germ_pzkpfw_VI_ausf_h1_tiger_east",
"wto_pack_germ_pzkpfw_VI_ausf_h1_tiger_west",
"wto_pack_two_fronts",
"wto_pack_mig_29_9_12_sniper",
"wto_pack_f_14d",
"wto_pack_us_t29",
"wto_pack_us_m1_abrams_kvt",
"wto_pack_germ_leopard_a1a1_120",
"wto_pack_germ_battleship_gneisenau_380mm",
"wto_pack_ussr_t_72av_turms",
"wto_pack_uk_challenger_1_mk_3_gulf",
"wto_pack_uk_olifant_optimering",
"wto_pack_saab_ja37di_f21",
"wto_pack_f_16am_block_20_mlu_netherlands",
"wto_pack_jp_battleship_nagato",
"wto_pack_su_25k",
"wto_pack_mig-21_bis_lazur",
"wto_pack_mirage_f1c_200",
"wto_pack_f_2a_adtw",
"wto_pack_germ_marder_clovis",
"wto_pack_su_25tm",
"wto_pack_ka_50",
"wto_pack_f-5c",
"wto_pack_ussr_is_6",
"wto_pack_ussr_is_2m_kit_4rank",
"wto_pack_ussr_m53_59_kit_4rank",
"wto_pack_ussr_t_44_kit_4rank",
"wto_pack_us_m1a1_hc_usmc_sm",
"wto_pack_us_m1a1_hc_usmc",
"wto_pack_tornado_ids_de_wtd61",
"wto_pack_wyvern_s4",
"wto_pack_alpha_jet_a_jabog41",
"wto_pack_p-51d-20-na",
"wto_pack_ussr_battlecruiser_sevastopol",
"wto_pack_j_22m1a",
"wto_pack_fa_18c_switzerland",
"wto_pack_germ_leopard_2a4m_can_sm",
"wto_pack_ussr_t_80ue1_sm",
"wto_pack_ussr_t_80ue1",
"wto_pack_ia_58a_pucara",
"wto_pack_germ_schutzenpanzer_puma_vjtf_mod",
"wto_pack_l_39za",
"wto_pack_sw_k9_vidar",
"wto_pack_hell_on_wheels",
"wto_pack_us_m18_hellcat_kit_3rank",
"wto_pack_us_m4a3e8_76w_sherman_kit_3rank",
"wto_pack_us_skink_aa_kit_3rank",
"wto_pack_us_rdf_lt",
"wto_pack_ussr_object_120",
"wto_pack_arado_234b_2_mt",
"wto_pack_jp_type_90b_sm",
"wto_pack_cf_188a_canada",
"wto_pack_sw_strv121b_christian2",
"wto_pack_germ_erprobungstrager_3_achs_turm",
"wto_pack_jp_type_61_mod",
"wto_pack_in_may_45",
"wto_pack_ussr_is_1_kit_3rank",
"wto_pack_ussr_sdkfz_251_21_kit_3rank",
"wto_pack_ussr_t_34_85_zis_53_kit_3rank",
"wto_pack_echoes_of_overlord",
"wto_pack_uk_a30_sp_avenger_kit_3rank",
"wto_pack_uk_crusader_aa_mk_2_kit_3rank",
"wto_pack_uk_sherman_vc_firefly_kit_3rank",
"wto_pack_germ_leopard_2a4m_can",
"wto_pack_uk_challenger_2_megatron_sm",
"wto_pack_germ_leopard_2a4_pzbtl_123",
"wto_pack_mig_23ml",
"wto_pack_jp_type_90b_camo",
"wto_pack_us_m60a1_rise_mod",
"wto_pack_rah_66",
"wto_pack_it_c1_ariete_certezza",
"wto_pack_ussr_bmd_4m",
"wto_pack_il_merkava_mk_3_raam_segol",
"wto_pack_us_battleship_colorado_class_maryland",
"wto_pack_uk_battleship_duke_of_york",
"wto_pack_cn_plz_45",
"wto_pack_hawk_t1a",
"wto_pack_ussr_t_55_am",
"wto_pack_saab_ajs37_early",
"wto_pack_cn_al_khalid_1",
"wto_pack_q_5d",
"wto_pack_a_7e_greece",
"wto_pack_cn_mbt2000_sm",
"wto_pack_uk_battleship_nelson",
"wto_pack_jp_type_16_mod",
"wto_pack_fr_battleship_richelieu_class_jean_bart",
"wto_pack_tiger_had_spain",
"wto_pack_germ_pzkpfw_38t_Aufklarungspanzer",
"wto_pack_germany_beginners",
"wto_pack_ju-87r-2_snake",
"wto_pack_p-36a_rasmussen",
"wto_pack_us_m3a1_stuart_usmc",
"wto_pack_us_starter",
"wto_pack_it_battleship_giulio_cesare",
"wto_pack_chinese_starter",
"wto_pack_cn_m3a3_stuart_1st_ptg",
"wto_pack_p-40c_china",
"wto_pack_i-153_m62_zhukovskiy",
"wto_pack_ussr_starter",
"wto_pack_ussr_t_126sp",
"wto_pack_fr_b1_ter",
"wto_pack_french_starter",
"wto_pack_p-40f-5_france_ep",
"wto_pack_british_starter",
"wto_pack_spitfiremkiia_ep",
"wto_pack_uk_crusader_mk_2_the_saint",
"wto_pack_fokker_d21_mod20",
"wto_pack_sw_strv_m41_s1",
"wto_pack_swedish_starter",
"wto_pack_japanese_starter",
"wto_pack_jp_type_1_chi_he_5th_regiment",
"wto_pack_ki_44_1_ep",
"wto_pack_it_m14_41_47_40",
"wto_pack_italian_starter",
"wto_pack_re_2001_serie1_ep"
],
"newest": [
"wto_pack_fa_18d_late",
"wto_pack_q_5d",
"wto_pack_saab_jas39_pre_serie",
"wto_pack_uk_olifant_optimering",
"wto_pack_us_stingray_2",
"wto_pack_uk_battleship_duke_of_york",
"wto_pack_cn_plz_45",
"wto_pack_ussr_is_2m_kit_4rank",
"wto_pack_ussr_m53_59_kit_4rank",
"wto_pack_ussr_t_44_kit_4rank",
"wto_pack_it_battleship_giulio_cesare",
"wto_pack_a_7e_greece",
"wto_pack_hawk_t1a",
"wto_pack_arado_234b_2_mt",
"wto_pack_saab_ajs37_early",
"wto_pack_ia_58a_pucara",
"wto_pack_j_22m1a",
"wto_pack_f_16am_block_20_mlu_netherlands",
"wto_pack_f_14d",
"wto_pack_germ_schutzenpanzer_puma_vjtf_mod",
"wto_pack_us_m60a1_rise_mod",
"wto_pack_jp_type_90b_sm",
"wto_pack_cn_mbt2000_sm",
"wto_pack_uk_challenger_2_megatron_sm",
"wto_pack_cn_ztz_96b",
"wto_pack_alpha_jet_a_jabog41",
"wto_pack_jp_type_61_mod",
"wto_pack_su_30mkk",
"wto_pack_ussr_bmpt_72",
"wto_pack_fr_battleship_richelieu_class_jean_bart",
"wto_pack_ussr_t_80ue1_sm",
"wto_pack_us_m1a1_hc_usmc_sm",
"wto_pack_germ_leopard_2a4m_can_sm",
"wto_pack_jp_battleship_nagato",
"wto_pack_su_30mk2v_venezuela",
"wto_pack_us_t58",
"wto_pack_cf_188a_canada",
"wto_pack_uk_battleship_nelson",
"wto_pack_us_battleship_colorado_class_maryland",
"wto_pack_f_2a_adtw",
"wto_pack_fr_leopard_2a4nl_les",
"wto_pack_in_may_45",
"wto_pack_ussr_is_1_kit_3rank",
"wto_pack_ussr_sdkfz_251_21_kit_3rank",
"wto_pack_ussr_t_34_85_zis_53_kit_3rank",
"wto_pack_hell_on_wheels",
"wto_pack_us_m18_hellcat_kit_3rank",
"wto_pack_us_m4a3e8_76w_sherman_kit_3rank",
"wto_pack_us_skink_aa_kit_3rank",
"wto_pack_echoes_of_overlord",
"wto_pack_uk_a30_sp_avenger_kit_3rank",
"wto_pack_uk_crusader_aa_mk_2_kit_3rank",
"wto_pack_uk_sherman_vc_firefly_kit_3rank",
"wto_pack_rah_66",
"wto_pack_mig_29_9_12_sniper",
"wto_pack_l_39za",
"wto_pack_fa_18c_switzerland",
"wto_pack_ussr_battlecruiser_sevastopol",
"wto_pack_germ_battleship_gneisenau_380mm",
"wto_pack_fa_18c_early",
"wto_pack_it_c1_ariete_certezza",
"wto_pack_f_16a_block_10_netz_mod",
"wto_pack_germ_marder_clovis",
"wto_pack_tiger_had_spain",
"wto_pack_ussr_bmd_4m",
"wto_pack_us_rdf_lt",
"wto_pack_germ_flakpanzer_IV_Ostwind_2_net",
"wto_pack_germ_pzkpfw_VI_ausf_h1_tiger_east",
"wto_pack_germ_pzkpfw_VI_ausf_h1_tiger_west",
"wto_pack_two_fronts",
"wto_pack_saab_ja37di_f21",
"wto_pack_cn_al_khalid_1",
"wto_pack_ussr_t_80ue1",
"wto_pack_germ_leopard_2a4m_can",
"wto_pack_il_merkava_mk_3_raam_segol",
"wto_pack_sw_strv121b_christian2",
"wto_pack_jp_type_90b_camo",
"wto_pack_tornado_ids_de_wtd61",
"wto_pack_us_m1a1_hc_usmc",
"wto_pack_sw_k9_vidar",
"wto_pack_us_m1_abrams_kvt",
"wto_pack_su_25tm",
"wto_pack_f-4s",
"wto_pack_jp_type_16_mod",
"wto_pack_mirage_f1c_200",
"wto_pack_mig_23ml",
"wto_pack_mig-21_bis_lazur",
"wto_pack_su_25k",
"wto_pack_germ_pzkpfw_38t_Aufklarungspanzer",
"wto_pack_germany_beginners",
"wto_pack_ju-87r-2_snake",
"wto_pack_germ_leopard_2a4_pzbtl_123",
"wto_pack_uk_challenger_1_mk_3_gulf",
"wto_pack_germ_erprobungstrager_3_achs_turm",
"wto_pack_a_10a_early",
"wto_pack_chinese_starter",
"wto_pack_cn_m3a3_stuart_1st_ptg",
"wto_pack_p-40c_china",
"wto_pack_f-5c",
"wto_pack_fokker_d21_mod20",
"wto_pack_sw_strv_m41_s1",
"wto_pack_swedish_starter",
"wto_pack_ussr_t_72av_turms",
"wto_pack_fr_b1_ter",
"wto_pack_french_starter",
"wto_pack_p-40f-5_france_ep",
"wto_pack_fr_somua_sm",
"wto_pack_british_starter",
"wto_pack_spitfiremkiia_ep",
"wto_pack_uk_crusader_mk_2_the_saint",
"wto_pack_japanese_starter",
"wto_pack_jp_type_1_chi_he_5th_regiment",
"wto_pack_ki_44_1_ep",
"wto_pack_it_m14_41_47_40",
"wto_pack_italian_starter",
"wto_pack_re_2001_serie1_ep",
"wto_pack_sw_cv_90105_tml",
"wto_pack_i-153_m62_zhukovskiy",
"wto_pack_ussr_starter",
"wto_pack_ussr_t_126sp",
"wto_pack_ka_50",
"wto_pack_p-36a_rasmussen",
"wto_pack_us_m3a1_stuart_usmc",
"wto_pack_us_starter",
"wto_pack_ussr_t_55_am",
"wto_pack_germ_leopard_a1a1_120",
"wto_pack_ussr_object_120",
"wto_pack_ussr_is_6",
"wto_pack_wyvern_s4",
"wto_pack_us_t29",
"wto_pack_germ_pzkpfw_VI_ausf_b_tiger_IIh_sla",
"wto_pack_p-51d-20-na"
],
"bestSellers": [
"wto_pack_fa_18d_late",
"wto_pack_us_stingray_2"
]
},
"byProduct": {
"eagles1000": {
"cover": "img/items/668B1208-EF1B-42BD-B9E1-F540B6EB89CD.jpg",