



<

window._RestockRocketConfig.host = 'https://app.restockrocket.io' const SETTINGS_CACHE_DURATION = 15 * 60 * 1000; // 15 minutes in milliseconds const LIQUID_CACHE_MAX_AGE = 2 * 60 * 60; // 2 hours in seconds // Calculate Liquid cache freshness once at initialization const liquidRenderedAt = window._RestockRocketConfig.liquidRenderedAt; // Validate timestamp and calculate cache age if (!liquidRenderedAt || typeof liquidRenderedAt !== 'number' || isNaN(liquidRenderedAt)) { console.debug('STOQ - Invalid or missing liquidRenderedAt timestamp, assuming fresh'); window._RestockRocketConfig.isLiquidCacheFresh = true; } else { const now = Math.floor(Date.now() / 1000); // Current time in seconds const liquidCacheAge = now - liquidRenderedAt; // Age in seconds // Handle client clock ahead of server if (liquidCacheAge span class="visually-hidden">Hire Genesis Croix de Fer 20 (Flat Handlebars)
0) { console.debug(`STOQ - Client clock appears ahead of server by ${Math.abs(Math.round(liquidCacheAge / 60))} minutes, assuming cache fresh`); >
} else { console.debug(`STOQ - no scripts enabled for ${window._RestockRocketConfig.pageType}`); } // Dispatch custom event when app is loaded // Cart selling plan updates will be triggered by stoq:preorder-api-ready event const appLoadedEvent = new CustomEvent('stoq:loaded', { detail: { pageType: window._RestockRocketConfig.pageType, enabled: settings.enable_app, settings: settings, preorderEnabled: settings.preorder_enabled } }); console.debug('STOQ - dispatching app loaded event'); window.dispatchEvent(appLoadedEvent); } } >
>
>