Rocky_Mountain_Vending/.pnpm-store/v10/files/d2/3593c3d6680e4345348e0a879ab189e6a3d6d7ec0b517f1fba4a8bb6b515818e0ac84346a9e8dab9cac6e6387a4595196c2083b57a3e8d9ab6a14c2aecedc4
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

40 lines
1.3 KiB
Text

/**
* @license
* Copyright 2018 Google LLC
* SPDX-License-Identifier: Apache-2.0
*/
import {makeComputedArtifact} from '../computed-artifact.js';
import {NavigationMetric} from './navigation-metric.js';
import {LanternSpeedIndex} from './lantern-speed-index.js';
import {Speedline} from '../speedline.js';
class SpeedIndex extends NavigationMetric {
/**
* @param {LH.Artifacts.NavigationMetricComputationData} data
* @param {LH.Artifacts.ComputedContext} context
* @return {Promise<LH.Artifacts.LanternMetric>}
*/
static computeSimulatedMetric(data, context) {
const metricData = NavigationMetric.getMetricComputationInput(data);
return LanternSpeedIndex.request(metricData, context);
}
/**
* @param {LH.Artifacts.NavigationMetricComputationData} data
* @param {LH.Artifacts.ComputedContext} context
* @return {Promise<LH.Artifacts.Metric>}
*/
static async computeObservedMetric(data, context) {
const speedline = await Speedline.request(data.trace, context);
const timing = Math.round(speedline.speedIndex);
const timestamp = (timing + speedline.beginning) * 1000;
return Promise.resolve({timing, timestamp});
}
}
const SpeedIndexComputed = makeComputedArtifact(
SpeedIndex,
['devtoolsLog', 'gatherContext', 'settings', 'simulator', 'trace', 'URL', 'SourceMaps']
);
export {SpeedIndexComputed as SpeedIndex};