const runtimeUrl = new URL('/cloud/runtime.js', location.origin); const assetVersion = new URL(import.meta.url).searchParams.get('v'); if (assetVersion) runtimeUrl.searchParams.set('v', assetVersion); const { bindPageCleanup, buy, byId, initializeSession, openCreate, readBootstrap, showError, } = await import(runtimeUrl.href); const i18n = globalThis.VenixUserCopy; export async function initialize() { try { const bootstrap = readBootstrap('deploy-bootstrap'); if (!await initializeSession('create', bootstrap?.user)) return; bindPageCleanup(); byId('create-form')?.addEventListener('submit', buy); await openCreate(bootstrap); } catch { showError('cloud-page-error', i18n.text('deploy.error.initialize')); } }