@bitcobblers/wod-wiki-ui 0.50.2190 → 0.51.2192

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3643,35 +3643,50 @@ var OUTPUT_TYPE_DOT = {
3643
3643
  compiler: "bg-muted-foreground/40",
3644
3644
  analytics: "bg-type-analytics shadow-type-analytics/50"
3645
3645
  };
3646
+ var EFFORT_TYPES = /* @__PURE__ */ new Set(["effort", "text", "action", "label"]);
3647
+ var LOAD_TYPES = /* @__PURE__ */ new Set([
3648
+ "resistance",
3649
+ "intensity",
3650
+ "load",
3651
+ "volume",
3652
+ "work",
3653
+ "power",
3654
+ "calculated",
3655
+ "totalwork",
3656
+ "totalvolume",
3657
+ "tis",
3658
+ "sessionload",
3659
+ "session-load",
3660
+ "calc.metminutes",
3661
+ "metminutes",
3662
+ "totalmetminutes"
3663
+ ]);
3664
+ var ROUND_TYPES = /* @__PURE__ */ new Set(["rounds", "current-round", "increment"]);
3665
+ var DURATION_TYPES = /* @__PURE__ */ new Set(["duration", "time", "elapsed"]);
3666
+ var HINT_TYPES = /* @__PURE__ */ new Set(["hint", "custom", "system", "sound", "lap", "group", "diagnostic"]);
3646
3667
  function extractMetricsByCategory(metrics) {
3647
- if (!metrics) {
3648
- return { efforts: [], reps: [], loads: [], rounds: [], durations: [], distances: [], hints: [] };
3649
- }
3650
- const list = Array.from(metrics);
3651
- return {
3652
- efforts: list.filter((m) => {
3653
- const t = String(m.type).toLowerCase();
3654
- return t === "effort" || t === "text" || t === "action" || t === "label";
3655
- }),
3656
- reps: list.filter((m) => String(m.type).toLowerCase() === "rep"),
3657
- loads: list.filter((m) => {
3658
- const t = String(m.type).toLowerCase();
3659
- return t === "resistance" || t === "intensity" || t === "load" || t === "volume";
3660
- }),
3661
- rounds: list.filter((m) => {
3662
- const t = String(m.type).toLowerCase();
3663
- return t === "rounds" || t === "current-round" || t === "increment";
3664
- }),
3665
- durations: list.filter((m) => {
3666
- const t = String(m.type).toLowerCase();
3667
- return t === "duration" || t === "time" || t === "elapsed";
3668
- }),
3669
- distances: list.filter((m) => String(m.type).toLowerCase() === "distance"),
3670
- hints: list.filter((m) => {
3671
- const t = String(m.type).toLowerCase();
3672
- return t === "hint" || t === "custom" || t === "system" || t === "sound" || t === "lap" || t === "group";
3673
- })
3668
+ const result = {
3669
+ efforts: [],
3670
+ reps: [],
3671
+ loads: [],
3672
+ rounds: [],
3673
+ durations: [],
3674
+ distances: [],
3675
+ hints: []
3674
3676
  };
3677
+ if (!metrics) return result;
3678
+ for (const m of metrics) {
3679
+ const t = String(m.type).toLowerCase();
3680
+ if (EFFORT_TYPES.has(t)) result.efforts.push(m);
3681
+ else if (t === "rep") result.reps.push(m);
3682
+ else if (LOAD_TYPES.has(t)) result.loads.push(m);
3683
+ else if (ROUND_TYPES.has(t)) result.rounds.push(m);
3684
+ else if (DURATION_TYPES.has(t)) result.durations.push(m);
3685
+ else if (t === "distance") result.distances.push(m);
3686
+ else if (HINT_TYPES.has(t) || typeof m.value !== "number") result.hints.push(m);
3687
+ else result.loads.push(m);
3688
+ }
3689
+ return result;
3675
3690
  }
3676
3691
  var DEFAULT_PRIMARY_FILTER = "type:segment";
3677
3692
  var DEFAULT_OUTPUT_FILTERS = [
@@ -13769,5 +13784,5 @@ function editorPreset(optionsOrDialect = "markdown") {
13769
13784
  }
13770
13785
 
13771
13786
  export { AGG_OPTIONS, CANONICAL_BLOCK_TYPES, CLAUSE_META, ComposerRegistry, DEFAULT_DIAGNOSTICS_DEBOUNCE_MS, DEFAULT_OUTPUT_FILTERS, DEFAULT_PRIMARY_FILTER, DefaultFrontmatterWidget, EditorDialog, GROUPBY_OPTIONS, GoalRings, KIND_OPTIONS, METRIC_OPTIONS, MULTI_VALUE_TYPES, MetricBadge, OUTPUT_TYPE_CLASS, OUTPUT_TYPE_DOT, OutputFilterPills, OutputStatementsTable, PLANE_OPTIONS, ProposedMetricBadge, QueryBlockView, QueryValue, ROLLUP_OPTIONS, RowsResultsChrome, RowsTable, SERIES_COLORS, SOURCE_OPTIONS, SUGGESTION_BINDINGS, StackedBar, TARGET_OPTIONS, TIME_OPTIONS, TONE_CLASS, TokenSlotPill, TopList, UNIT_OPTIONS, WHERE_AGGREGATORS, WHERE_METRICS, WidgetChart, WidgetProblemBadge, WqlBars, WqlComposer, WqlDiagnosticsStrip, WqlEmptyState, WqlQueryInspectorModal, WqlTable, WqlTimeseries, ZoneDistribution, activeCursorSection, addRuntimePanel, autocompleteTooltipTheme, blockTypesFromBlocks, canonicalSuggestionItems, cn, compactNumber, composerRegistry, configureOverlayActions, createExecutorDocumentHost, cursorFocusExtension, customCompletionSources, dateRangeSlot, dispatchAddRuntimePanel, dispatchExpandRuntimePanel, dispatchGutterHighlights, dispatchRemoveRuntimePanel, editQueryClause, editingWidgetsField, editorPreset, editorTheme, embedPreviewDecorations, expandRuntimePanel, extractBlockQueries, extractMetricsByCategory, fenceCompletion, findQueryBlockSection, findWorkoutErrors, forceSectionParse, formatClockTime, formatMMSS, formatTimestamp, frontmatterDetailed, frontmatterPreview, frontmatterPreviewField, frontmatterReferenceIndex, frontmatterSource, frontmatterSuggestions, frontmatterVisibility, getClauseMeta, getCursorFocusState, getOverlayActions, getSuggestionBinding, gutterHighlightsField, gutterUnified, handleFenceAutoWrap, hashCode, inlineButtonDecoration, invalidateSuggestions, lineIdsExtension, linkOpen, linkPreview, loadSuggestions, markdownSyntaxHiding, markdownTablePreview, matchFilterTypeahead, mergeSeries, mergeSuggestionItems, mergeTagSuggestions, navigationFacet, nestedCompletion, nestedCompletionOptions, normalizeOutputFilter, notebookSlugsFromBlocks, outputToRunResult, patchBlockQuery, presentBadges, previewDecorations, queryBlockPreview, readSessionRpe, referenceIndexReload, registeredSectionWidgets, removeRuntimePanel, resolveCodeLanguage, resolveQueryDraft, runtimePanelField, saveBlockQuerySource, sectionAtPos, sectionField, sectionGeometry, sectionIdentity, sectionIdentityHistory, sectionMove, sectionRestore, sectionSaved, sessionQueryInsert, sessionQueryWql, setFrontmatterDetailed, setFrontmatterSource, setGutterHighlights, setSuggestionBinding, smartIncrement, summarizeAggregate, summarizeFind, summarizePipeline, tagsFromStaticBlocks, toChartResult, toggleWidgetEdit, tooltipTimestamp, urlAtPos, useChartShape, useComposerSlots, useSuggestions, useVisualViewportRect, useWqlStageCounts, widgetBlockPreview, wodAutoWrap, wodAutocompletion, wodCompletionSource, wodEditorKeymap, wodLinter, wodOverlayPanel, workoutLintSource, wqlToPills, wrapInTimeFence };
13772
- //# sourceMappingURL=chunk-GM2PO7LK.mjs.map
13773
- //# sourceMappingURL=chunk-GM2PO7LK.mjs.map
13787
+ //# sourceMappingURL=chunk-EUVKOZZI.mjs.map
13788
+ //# sourceMappingURL=chunk-EUVKOZZI.mjs.map