@optifye/dashboard-core 6.4.0 → 6.4.2

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.
package/dist/index.mjs CHANGED
@@ -14,9 +14,10 @@ import { noop, warning, invariant, progress, secondsToMilliseconds, milliseconds
14
14
  import { getValueTransition, hover, press, isPrimaryPointer, GroupPlaybackControls, setDragLock, supportsLinearEasing, attachTimeline, isGenerator, calcGeneratorDuration, isWaapiSupportedEasing, mapEasingToNativeEasing, maxGeneratorDuration, generateLinearEasing, isBezierDefinition } from 'motion-dom';
15
15
  import { BarChart as BarChart$1, CartesianGrid, XAxis, YAxis, Tooltip, Legend, Bar, LabelList, ResponsiveContainer, LineChart as LineChart$1, Line, PieChart, Pie, Cell, ReferenceLine, ComposedChart, Area, ScatterChart, Scatter } from 'recharts';
16
16
  import { Slot } from '@radix-ui/react-slot';
17
- import { Camera, ChevronDown, ChevronUp, Check, ShieldCheck, Star, Award, X, Coffee, Plus, Clock, ArrowLeft, Calendar, Save, Minus, ArrowDown, ArrowUp, ArrowLeftIcon, Settings2, CheckCircle2, Search, CheckCircle, AlertTriangle, Info, Share2, Trophy, Target, Download, User, XCircle, ChevronLeft, ChevronRight, AlertCircle, Sun, Moon, MessageSquare, Trash2, RefreshCw, Menu, Send, Copy, Edit2, UserCheck, LogOut, Package, Settings, LifeBuoy, EyeOff, Eye, Zap, UserCircle } from 'lucide-react';
17
+ import { Camera, ChevronDown, ChevronUp, Check, ShieldCheck, Star, Award, X, Coffee, Plus, ArrowLeft, Clock, Calendar, Save, Minus, ArrowDown, ArrowUp, Settings2, CheckCircle2, Search, CheckCircle, AlertTriangle, Info, Share2, Trophy, Target, Download, User, XCircle, ChevronLeft, ChevronRight, AlertCircle, Sun, Moon, MessageSquare, Trash2, RefreshCw, Menu, Send, Copy, Edit2, UserCheck, LogOut, Package, Settings, LifeBuoy, EyeOff, Eye, Zap, UserCircle } from 'lucide-react';
18
18
  import { DayPicker, useNavigation as useNavigation$1 } from 'react-day-picker';
19
- import { XMarkIcon, ArrowRightIcon, HomeIcon, TrophyIcon, ChartBarIcon, AdjustmentsHorizontalIcon, ClockIcon, CubeIcon, SparklesIcon, QuestionMarkCircleIcon, UserCircleIcon, ExclamationCircleIcon, EnvelopeIcon, DocumentTextIcon, Bars3Icon, ArrowLeftIcon as ArrowLeftIcon$1, CheckCircleIcon, ChatBubbleLeftRightIcon, XCircleIcon, InformationCircleIcon, ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/24/outline';
19
+ import { XMarkIcon, ArrowRightIcon, HomeIcon, TrophyIcon, ChartBarIcon, AdjustmentsHorizontalIcon, ClockIcon, CubeIcon, SparklesIcon, QuestionMarkCircleIcon, UserCircleIcon, ExclamationCircleIcon, EnvelopeIcon, DocumentTextIcon, ChevronUpIcon, ChevronDownIcon, Bars3Icon, CheckCircleIcon, ChatBubbleLeftRightIcon, XCircleIcon, InformationCircleIcon, ChevronLeftIcon, ChevronRightIcon } from '@heroicons/react/24/outline';
20
+ import { CheckIcon } from '@heroicons/react/24/solid';
20
21
  import html2canvas from 'html2canvas';
21
22
  import jsPDF, { jsPDF as jsPDF$1 } from 'jspdf';
22
23
  import * as SelectPrimitive from '@radix-ui/react-select';
@@ -2645,6 +2646,17 @@ var TicketHistoryService = class {
2645
2646
  }
2646
2647
  return data;
2647
2648
  }
2649
+ /**
2650
+ * Update ticket serviced status
2651
+ */
2652
+ static async updateTicketServicedStatus(ticketId, serviced) {
2653
+ const supabase = _getSupabaseInstance();
2654
+ const { data, error } = await supabase.from("support_ticket_history").update({ serviced, updated_at: (/* @__PURE__ */ new Date()).toISOString() }).eq("id", ticketId).select().single();
2655
+ if (error) {
2656
+ throw new Error(`Failed to update ticket serviced status: ${error.message}`);
2657
+ }
2658
+ return data;
2659
+ }
2648
2660
  };
2649
2661
 
2650
2662
  // src/lib/services/audioService.ts
@@ -3829,7 +3841,12 @@ var S3ClipsService = class {
3829
3841
  */
3830
3842
  async listS3Clips(params) {
3831
3843
  const { workspaceId, date, shiftId, maxKeys } = params;
3844
+ if (!isValidShiftId(shiftId)) {
3845
+ console.error(`[S3ClipsService] Invalid shift ID: ${shiftId}. Must be 0 (day) or 1 (night)`);
3846
+ return [];
3847
+ }
3832
3848
  const prefix = `sop_violations/${workspaceId}/${date}/${shiftId}/`;
3849
+ console.log(`[S3ClipsService] Listing clips for workspace: ${workspaceId}, date: ${date}, shift: ${shiftId}`);
3833
3850
  const deduplicationKey = `list-s3-clips:${prefix}:${maxKeys || "all"}`;
3834
3851
  return this.requestCache.deduplicate(
3835
3852
  deduplicationKey,
@@ -4010,6 +4027,10 @@ var S3ClipsService = class {
4010
4027
  return sopConfig.default;
4011
4028
  }
4012
4029
  async getClipCounts(workspaceId, date, shiftId, buildIndex) {
4030
+ if (!isValidShiftId(shiftId)) {
4031
+ console.error(`[S3ClipsService] getClipCounts - Invalid shift ID: ${shiftId}. Must be 0 (day) or 1 (night)`);
4032
+ return buildIndex ? { counts: {}, videoIndex: { byCategory: /* @__PURE__ */ new Map(), allVideos: [], counts: {}, workspaceId, date, shiftId: "0", lastUpdated: /* @__PURE__ */ new Date() } } : {};
4033
+ }
4013
4034
  const deduplicationKey = `clip-counts:${workspaceId}:${date}:${shiftId}:${buildIndex ? "with-index" : "counts-only"}`;
4014
4035
  return this.requestCache.deduplicate(
4015
4036
  deduplicationKey,
@@ -4021,10 +4042,7 @@ var S3ClipsService = class {
4021
4042
  * Internal implementation of clip counts fetching
4022
4043
  */
4023
4044
  async executeGetClipCounts(workspaceId, date, shiftId, buildIndex) {
4024
- if (buildIndex) {
4025
- this.isIndexBuilding = true;
4026
- console.log(`[S3ClipsService] Starting index building - metadata fetching disabled`);
4027
- }
4045
+ const effectiveBuildIndex = false;
4028
4046
  try {
4029
4047
  const basePrefix = `sop_violations/${workspaceId}/${date}/${shiftId}/`;
4030
4048
  const counts = { total: 0 };
@@ -4039,9 +4057,10 @@ var S3ClipsService = class {
4039
4057
  "cycle_completion",
4040
4058
  "bottleneck"
4041
4059
  ];
4042
- console.log(`[S3ClipsService] ${buildIndex ? "Building video index and counting" : "Fast counting"} clips for ${workspaceId} on ${date}, shift ${shiftId}`);
4060
+ const shiftName = shiftId === 0 || shiftId === "0" ? "Day" : "Night";
4061
+ console.log(`[S3ClipsService] Fast counting clips for ${workspaceId} on ${date}, shift ${shiftId} (${shiftName} Shift)`);
4043
4062
  const startTime = performance.now();
4044
- const videoIndex = buildIndex ? {
4063
+ const videoIndex = effectiveBuildIndex ? {
4045
4064
  byCategory: /* @__PURE__ */ new Map(),
4046
4065
  allVideos: [],
4047
4066
  counts: {},
@@ -4055,53 +4074,7 @@ var S3ClipsService = class {
4055
4074
  const categoryPrefix = `${basePrefix}${category}/videos/`;
4056
4075
  const categoryVideos = [];
4057
4076
  try {
4058
- if (buildIndex) {
4059
- const command = new ListObjectsV2Command({
4060
- Bucket: this.config.s3Config.bucketName,
4061
- Prefix: categoryPrefix,
4062
- MaxKeys: 1e3
4063
- });
4064
- let continuationToken;
4065
- do {
4066
- if (continuationToken) {
4067
- command.input.ContinuationToken = continuationToken;
4068
- }
4069
- const response = await this.s3Client.send(command);
4070
- if (response.Contents) {
4071
- for (const obj of response.Contents) {
4072
- if (obj.Key && obj.Key.endsWith("playlist.m3u8")) {
4073
- if (obj.Key.includes("missed_qchecks")) {
4074
- continue;
4075
- }
4076
- const s3Uri = `s3://${this.config.s3Config.bucketName}/${obj.Key}`;
4077
- const sopCategories = this.getSOPCategories(workspaceId);
4078
- const parsedInfo = parseS3Uri(s3Uri, sopCategories);
4079
- const belongsToCategory = parsedInfo && (parsedInfo.type === category || // Handle specific mismatches between folder names and parsed types
4080
- category === "cycle_completion" && parsedInfo.type === "cycle_completion" || category === "sop_deviation" && parsedInfo.type === "missing_quality_check" || category === "missing_quality_check" && parsedInfo.type === "missing_quality_check" || category === "idle_time" && parsedInfo.type === "low_value" || category === "low_value" && parsedInfo.type === "low_value");
4081
- if (belongsToCategory) {
4082
- const videoEntry = {
4083
- uri: s3Uri,
4084
- category: parsedInfo.type,
4085
- // Use the parsed type, not the folder name
4086
- timestamp: parsedInfo.timestamp,
4087
- videoId: `${workspaceId}-${parsedInfo.timestamp}`,
4088
- workspaceId,
4089
- date,
4090
- shiftId: shiftId.toString()
4091
- };
4092
- categoryVideos.push(videoEntry);
4093
- }
4094
- }
4095
- }
4096
- }
4097
- continuationToken = response.NextContinuationToken;
4098
- } while (continuationToken);
4099
- categoryVideos.sort((a, b) => b.timestamp.localeCompare(a.timestamp));
4100
- if (categoryVideos.length > 0) {
4101
- console.log(`[S3ClipsService] Found ${categoryVideos.length} videos for category '${category}' (parsed types: ${[...new Set(categoryVideos.map((v) => v.category))].join(", ")})`);
4102
- }
4103
- return { category, count: categoryVideos.length, videos: categoryVideos };
4104
- } else {
4077
+ if (effectiveBuildIndex) ; else {
4105
4078
  const command = new ListObjectsV2Command({
4106
4079
  Bucket: this.config.s3Config.bucketName,
4107
4080
  Prefix: categoryPrefix,
@@ -4131,41 +4104,14 @@ var S3ClipsService = class {
4131
4104
  for (const { category, count, videos } of results) {
4132
4105
  counts[category] = count;
4133
4106
  counts.total += count;
4134
- if (buildIndex && videoIndex && videos) {
4135
- if (videos.length > 0) {
4136
- const parsedType = videos[0].category;
4137
- videoIndex.byCategory.set(parsedType, videos);
4138
- console.log(`[S3ClipsService] Indexed ${videos.length} videos under parsed type '${parsedType}'`);
4139
- if (category !== parsedType) {
4140
- videoIndex.byCategory.set(category, videos);
4141
- console.log(`[S3ClipsService] Created alias: S3 folder '${category}' -> parsed type '${parsedType}' (${videos.length} videos)`);
4142
- }
4143
- }
4144
- videoIndex.allVideos.push(...videos);
4145
- }
4146
- }
4147
- if (buildIndex && videoIndex) {
4148
- videoIndex.allVideos.sort((a, b) => b.timestamp.localeCompare(a.timestamp));
4149
- videoIndex.counts = { ...counts };
4107
+ if (effectiveBuildIndex && videoIndex && videos) ;
4150
4108
  }
4109
+ if (effectiveBuildIndex && videoIndex) ;
4151
4110
  const elapsed = performance.now() - startTime;
4152
- console.log(`[S3ClipsService] ${buildIndex ? "Video index and counts" : "Clip counts"} completed in ${elapsed.toFixed(2)}ms - Total: ${counts.total}`);
4153
- if (buildIndex && videoIndex) {
4154
- console.log(`[S3ClipsService] Final video index summary:`);
4155
- console.log(` - VideoIndex ID: ${videoIndex._debugId}`);
4156
- console.log(` - Total videos in allVideos: ${videoIndex.allVideos.length}`);
4157
- console.log(` - Categories in byCategory Map: ${Array.from(videoIndex.byCategory.keys()).join(", ")}`);
4158
- for (const [cat, vids] of videoIndex.byCategory.entries()) {
4159
- console.log(` - '${cat}': ${vids.length} videos`);
4160
- }
4161
- return { counts, videoIndex };
4162
- }
4111
+ console.log(`[S3ClipsService] Clip counts completed in ${elapsed.toFixed(2)}ms - Total: ${counts.total}`);
4112
+ if (effectiveBuildIndex && videoIndex) ;
4163
4113
  return counts;
4164
4114
  } finally {
4165
- if (buildIndex) {
4166
- this.isIndexBuilding = false;
4167
- console.log(`[S3ClipsService] Index building complete - metadata fetching re-enabled`);
4168
- }
4169
4115
  }
4170
4116
  }
4171
4117
  async getClipCountsCacheFirst(workspaceId, date, shiftId, buildIndex) {
@@ -4186,6 +4132,10 @@ var S3ClipsService = class {
4186
4132
  * Get first clip for a specific category with deduplication
4187
4133
  */
4188
4134
  async getFirstClipForCategory(workspaceId, date, shiftId, category) {
4135
+ if (!isValidShiftId(shiftId)) {
4136
+ console.error(`[S3ClipsService] getFirstClipForCategory - Invalid shift ID: ${shiftId}. Must be 0 (day) or 1 (night)`);
4137
+ return null;
4138
+ }
4189
4139
  const deduplicationKey = `first-clip:${workspaceId}:${date}:${shiftId}:${category}`;
4190
4140
  return this.requestCache.deduplicate(
4191
4141
  deduplicationKey,
@@ -4493,6 +4443,75 @@ var S3ClipsService = class {
4493
4443
  }
4494
4444
  return videos;
4495
4445
  }
4446
+ /**
4447
+ * Get a page of videos for a specific category using efficient pagination
4448
+ * This method replaces the need for full video indexing
4449
+ * @param workspaceId - Workspace ID
4450
+ * @param date - Date in YYYY-MM-DD format
4451
+ * @param shiftId - Shift ID (0 for day, 1 for night)
4452
+ * @param category - Category to fetch videos from
4453
+ * @param pageSize - Number of videos to fetch per page (default 5)
4454
+ * @param startAfter - Optional key to start after for pagination
4455
+ * @returns Page of videos with continuation token
4456
+ */
4457
+ async getVideosPage(workspaceId, date, shiftId, category, pageSize = 5, startAfter) {
4458
+ if (!isValidShiftId(shiftId)) {
4459
+ console.error(`[S3ClipsService] getVideosPage - Invalid shift ID: ${shiftId}`);
4460
+ return { videos: [], hasMore: false };
4461
+ }
4462
+ const categoryPrefix = `sop_violations/${workspaceId}/${date}/${shiftId}/${category}/videos/`;
4463
+ const deduplicationKey = `videos-page:${categoryPrefix}:${pageSize}:${startAfter || "first"}`;
4464
+ return this.requestCache.deduplicate(
4465
+ deduplicationKey,
4466
+ async () => {
4467
+ try {
4468
+ console.log(`[S3ClipsService] Fetching page of ${pageSize} videos for category '${category}'`);
4469
+ const command = new ListObjectsV2Command({
4470
+ Bucket: this.config.s3Config.bucketName,
4471
+ Prefix: categoryPrefix,
4472
+ MaxKeys: pageSize * 10,
4473
+ // Fetch extra to account for non-playlist files
4474
+ StartAfter: startAfter
4475
+ });
4476
+ const response = await this.s3Client.send(command);
4477
+ const videos = [];
4478
+ if (response.Contents) {
4479
+ const sopCategories = this.getSOPCategories(workspaceId);
4480
+ for (const obj of response.Contents) {
4481
+ if (videos.length >= pageSize) break;
4482
+ if (obj.Key && obj.Key.endsWith("playlist.m3u8")) {
4483
+ if (obj.Key.includes("missed_qchecks")) continue;
4484
+ const s3Uri = `s3://${this.config.s3Config.bucketName}/${obj.Key}`;
4485
+ const parsedInfo = parseS3Uri(s3Uri, sopCategories);
4486
+ if (parsedInfo) {
4487
+ const cloudfrontUrl = this.s3UriToCloudfront(s3Uri);
4488
+ videos.push({
4489
+ id: `${workspaceId}-${date}-${shiftId}-${category}-${videos.length}`,
4490
+ src: cloudfrontUrl,
4491
+ ...parsedInfo,
4492
+ originalUri: s3Uri
4493
+ });
4494
+ }
4495
+ }
4496
+ }
4497
+ const lastKey = response.Contents[response.Contents.length - 1]?.Key;
4498
+ const hasMore = !!response.IsTruncated || response.Contents.length === pageSize * 10;
4499
+ console.log(`[S3ClipsService] Fetched ${videos.length} videos, hasMore: ${hasMore}`);
4500
+ return {
4501
+ videos,
4502
+ nextToken: hasMore ? lastKey : void 0,
4503
+ hasMore
4504
+ };
4505
+ }
4506
+ return { videos: [], hasMore: false };
4507
+ } catch (error) {
4508
+ console.error(`[S3ClipsService] Error fetching videos page:`, error);
4509
+ return { videos: [], hasMore: false };
4510
+ }
4511
+ },
4512
+ "VideosPage"
4513
+ );
4514
+ }
4496
4515
  /**
4497
4516
  * Cleanup method for proper resource management
4498
4517
  */
@@ -8421,6 +8440,16 @@ function useTicketHistory(companyId) {
8421
8440
  throw err;
8422
8441
  }
8423
8442
  }, [refreshTickets]);
8443
+ const updateTicketServicedStatus = useCallback(async (ticketId, serviced) => {
8444
+ setError(null);
8445
+ try {
8446
+ await TicketHistoryService.updateTicketServicedStatus(ticketId, serviced);
8447
+ await refreshTickets();
8448
+ } catch (err) {
8449
+ setError(err instanceof Error ? err.message : "Failed to update ticket serviced status");
8450
+ throw err;
8451
+ }
8452
+ }, [refreshTickets]);
8424
8453
  useEffect(() => {
8425
8454
  if (companyId) {
8426
8455
  refreshTickets();
@@ -8432,7 +8461,8 @@ function useTicketHistory(companyId) {
8432
8461
  error,
8433
8462
  createTicket,
8434
8463
  refreshTickets,
8435
- updateTicketStatus
8464
+ updateTicketStatus,
8465
+ updateTicketServicedStatus
8436
8466
  };
8437
8467
  }
8438
8468
 
@@ -11584,7 +11614,8 @@ var usePrefetchClipCounts = ({
11584
11614
  date,
11585
11615
  shift,
11586
11616
  enabled = true,
11587
- buildIndex = true,
11617
+ buildIndex = false,
11618
+ // Default to false for cost efficiency
11588
11619
  subscriberId
11589
11620
  }) => {
11590
11621
  const dashboardConfig = useDashboardConfig();
@@ -11593,7 +11624,18 @@ var usePrefetchClipCounts = ({
11593
11624
  }, [subscriberId]);
11594
11625
  const prefetchParams = useMemo(() => {
11595
11626
  const operationalDate = date || getOperationalDate();
11596
- const shiftStr = shift?.toString() || "0";
11627
+ let shiftStr;
11628
+ if (shift !== void 0 && shift !== null) {
11629
+ shiftStr = shift.toString();
11630
+ console.log(`[usePrefetchClipCounts] Using provided shift: ${shiftStr} for date: ${operationalDate}`);
11631
+ } else if (date) {
11632
+ shiftStr = "0";
11633
+ console.log(`[usePrefetchClipCounts] No shift provided for historical date ${date}, defaulting to day shift (0)`);
11634
+ } else {
11635
+ const currentShift = getCurrentShift2();
11636
+ shiftStr = currentShift.shiftId.toString();
11637
+ console.log(`[usePrefetchClipCounts] Using current operational shift: ${shiftStr} (${currentShift.shiftName})`);
11638
+ }
11597
11639
  return {
11598
11640
  workspaceId: workspaceId || "",
11599
11641
  date: operationalDate,
@@ -11661,12 +11703,12 @@ var usePrefetchClipCounts = ({
11661
11703
  }
11662
11704
  },
11663
11705
  onRenderReady: (key, newData) => {
11664
- console.log(`[usePrefetchClipCounts] Render ready with ${Object.values(newData.counts).reduce((sum, count) => sum + count, 0)} total clips`);
11706
+ console.log(`[usePrefetchClipCounts] Render ready with ${Object.values(newData.counts || {}).reduce((sum, count) => sum + count, 0)} total clips`);
11665
11707
  setData(newData);
11666
11708
  setError(null);
11667
11709
  },
11668
11710
  onFullyIndexed: (key, newData) => {
11669
- console.log(`[usePrefetchClipCounts] Fully indexed with ${newData.videoIndex.allVideos.length} videos`);
11711
+ console.log(`[usePrefetchClipCounts] Fully indexed with ${newData.videoIndex?.allVideos?.length || 0} videos`);
11670
11712
  setData(newData);
11671
11713
  setError(null);
11672
11714
  },
@@ -23259,8 +23301,7 @@ var ISTTimer = memo(() => {
23259
23301
  return /* @__PURE__ */ jsx(
23260
23302
  TimeDisplay2,
23261
23303
  {
23262
- variant: "minimal",
23263
- className: "text-sm font-medium text-gray-700"
23304
+ variant: "minimal"
23264
23305
  }
23265
23306
  );
23266
23307
  });
@@ -23292,6 +23333,7 @@ var CardFooter2 = (props) => {
23292
23333
  };
23293
23334
  var TicketHistory = ({ companyId }) => {
23294
23335
  const { tickets, loading, error } = useTicketHistory(companyId);
23336
+ const [expandedTickets, setExpandedTickets] = useState(/* @__PURE__ */ new Set());
23295
23337
  const getCategoryIcon = (category) => {
23296
23338
  switch (category) {
23297
23339
  case "general":
@@ -23348,6 +23390,23 @@ var TicketHistory = ({ companyId }) => {
23348
23390
  return "text-gray-600 bg-gray-50";
23349
23391
  }
23350
23392
  };
23393
+ const toggleTicketExpansion = (ticketId) => {
23394
+ setExpandedTickets((prev) => {
23395
+ const newSet = new Set(prev);
23396
+ if (newSet.has(ticketId)) {
23397
+ newSet.delete(ticketId);
23398
+ } else {
23399
+ newSet.add(ticketId);
23400
+ }
23401
+ return newSet;
23402
+ });
23403
+ };
23404
+ const isTicketExpanded = (ticketId) => {
23405
+ return expandedTickets.has(ticketId);
23406
+ };
23407
+ const shouldShowExpandButton = (description) => {
23408
+ return description.length > 100 || description.includes("\n");
23409
+ };
23351
23410
  if (loading) {
23352
23411
  return /* @__PURE__ */ jsxs(Card2, { className: "h-full", children: [
23353
23412
  /* @__PURE__ */ jsx(CardHeader2, { children: /* @__PURE__ */ jsx(CardTitle2, { className: "text-lg font-semibold text-gray-800", children: "History of Tickets" }) }),
@@ -23388,12 +23447,14 @@ var TicketHistory = ({ companyId }) => {
23388
23447
  tickets.map((ticket, index) => {
23389
23448
  const CategoryIcon = getCategoryIcon(ticket.category);
23390
23449
  const StatusIcon = getStatusIcon(ticket.status);
23450
+ const isExpanded = isTicketExpanded(ticket.id);
23451
+ const showExpandButton = shouldShowExpandButton(ticket.description);
23391
23452
  return /* @__PURE__ */ jsxs(
23392
23453
  motion.div,
23393
23454
  {
23394
23455
  initial: { opacity: 0, y: 10 },
23395
23456
  animate: { opacity: 1, y: 0 },
23396
- className: `border-b border-gray-100 p-4 hover:bg-gray-50 transition-colors cursor-pointer ${index === 0 ? "border-t-0" : ""}`,
23457
+ className: `border-b border-gray-100 p-4 hover:bg-gray-50 transition-colors ${index === 0 ? "border-t-0" : ""}`,
23397
23458
  children: [
23398
23459
  /* @__PURE__ */ jsx("div", { className: "flex items-start justify-between mb-2", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 flex-1 min-w-0", children: [
23399
23460
  /* @__PURE__ */ jsx("div", { className: "p-1 bg-gray-100 rounded", children: /* @__PURE__ */ jsx(CategoryIcon, { className: "h-3 w-3 text-gray-600" }) }),
@@ -23404,9 +23465,42 @@ var TicketHistory = ({ companyId }) => {
23404
23465
  /* @__PURE__ */ jsx(StatusIcon, { className: "h-2.5 w-2.5 mr-1" }),
23405
23466
  ticket.status === "submitted" ? "New" : ticket.status.replace("_", " ")
23406
23467
  ] }),
23407
- /* @__PURE__ */ jsx("span", { className: `inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${getPriorityColor(ticket.priority)}`, children: ticket.priority === "normal" ? "Standard" : ticket.priority })
23468
+ /* @__PURE__ */ jsx("span", { className: `inline-flex items-center px-2 py-1 rounded-full text-xs font-medium ${getPriorityColor(ticket.priority)}`, children: ticket.priority === "normal" ? "Standard" : ticket.priority }),
23469
+ ticket.serviced && /* @__PURE__ */ jsxs("span", { className: "inline-flex items-center px-2 py-1 rounded-full text-xs font-medium text-green-700 bg-green-100 border border-green-200", children: [
23470
+ /* @__PURE__ */ jsx(CheckIcon, { className: "h-2.5 w-2.5 mr-1" }),
23471
+ "Serviced"
23472
+ ] })
23473
+ ] }),
23474
+ /* @__PURE__ */ jsxs("div", { className: "mb-3", children: [
23475
+ /* @__PURE__ */ jsx(AnimatePresence, { mode: "wait", children: /* @__PURE__ */ jsx(
23476
+ motion.div,
23477
+ {
23478
+ initial: { opacity: 0 },
23479
+ animate: { opacity: 1 },
23480
+ exit: { opacity: 0 },
23481
+ transition: { duration: 0.2 },
23482
+ children: /* @__PURE__ */ jsx("p", { className: `text-xs text-gray-600 leading-relaxed whitespace-pre-wrap ${!isExpanded && showExpandButton ? "line-clamp-2" : ""}`, children: ticket.description })
23483
+ },
23484
+ isExpanded ? "expanded" : "collapsed"
23485
+ ) }),
23486
+ showExpandButton && /* @__PURE__ */ jsx(
23487
+ "button",
23488
+ {
23489
+ onClick: (e) => {
23490
+ e.stopPropagation();
23491
+ toggleTicketExpansion(ticket.id);
23492
+ },
23493
+ className: "mt-2 flex items-center gap-1 text-xs text-blue-600 hover:text-blue-700 font-medium transition-colors",
23494
+ children: isExpanded ? /* @__PURE__ */ jsxs(Fragment, { children: [
23495
+ /* @__PURE__ */ jsx(ChevronUpIcon, { className: "h-3 w-3" }),
23496
+ "Show less"
23497
+ ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
23498
+ /* @__PURE__ */ jsx(ChevronDownIcon, { className: "h-3 w-3" }),
23499
+ "Show more"
23500
+ ] })
23501
+ }
23502
+ )
23408
23503
  ] }),
23409
- /* @__PURE__ */ jsx("p", { className: "text-xs text-gray-600 mb-3 line-clamp-2 leading-relaxed", children: ticket.description }),
23410
23504
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-xs", children: [
23411
23505
  /* @__PURE__ */ jsx("span", { className: "text-gray-500 capitalize font-medium", children: ticket.category }),
23412
23506
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-1 text-gray-500", children: [
@@ -26179,6 +26273,127 @@ var VideoPlayer = React19__default.forwardRef(({
26179
26273
  ] });
26180
26274
  });
26181
26275
  VideoPlayer.displayName = "VideoPlayer";
26276
+ var BackButton = ({
26277
+ onClick,
26278
+ text = "Back",
26279
+ className,
26280
+ size = "default",
26281
+ disabled = false,
26282
+ "aria-label": ariaLabel
26283
+ }) => {
26284
+ const sizeClasses = {
26285
+ sm: {
26286
+ container: "gap-1 px-2 py-1.5",
26287
+ icon: "w-3.5 h-3.5",
26288
+ text: "text-xs"
26289
+ },
26290
+ default: {
26291
+ container: "gap-2 px-3 py-2",
26292
+ icon: "w-4 h-4",
26293
+ text: "text-sm"
26294
+ },
26295
+ lg: {
26296
+ container: "gap-2 px-4 py-2.5",
26297
+ icon: "w-5 h-5",
26298
+ text: "text-base"
26299
+ }
26300
+ };
26301
+ const currentSize = sizeClasses[size];
26302
+ return /* @__PURE__ */ jsxs(
26303
+ "button",
26304
+ {
26305
+ onClick,
26306
+ disabled,
26307
+ "aria-label": ariaLabel || `${text} button`,
26308
+ className: cn(
26309
+ // Base styles
26310
+ "flex items-center font-medium rounded-lg transition-all duration-200",
26311
+ // Size-specific styles
26312
+ currentSize.container,
26313
+ // Color and interaction styles
26314
+ disabled ? "text-gray-400 cursor-not-allowed" : "text-gray-600 hover:text-gray-900 hover:bg-gray-50 active:bg-gray-100",
26315
+ // Focus styles for accessibility
26316
+ "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2",
26317
+ className
26318
+ ),
26319
+ children: [
26320
+ /* @__PURE__ */ jsx(
26321
+ ArrowLeft,
26322
+ {
26323
+ className: cn(
26324
+ "flex-shrink-0",
26325
+ currentSize.icon,
26326
+ disabled && "opacity-50"
26327
+ )
26328
+ }
26329
+ ),
26330
+ /* @__PURE__ */ jsx("span", { className: cn(
26331
+ "font-medium select-none",
26332
+ currentSize.text,
26333
+ disabled && "opacity-50"
26334
+ ), children: text })
26335
+ ]
26336
+ }
26337
+ );
26338
+ };
26339
+ var BackButtonMinimal = ({
26340
+ onClick,
26341
+ text = "Back",
26342
+ className,
26343
+ size = "default",
26344
+ disabled = false,
26345
+ "aria-label": ariaLabel
26346
+ }) => {
26347
+ const sizeClasses = {
26348
+ sm: {
26349
+ icon: "w-3.5 h-3.5",
26350
+ text: "text-xs ml-1"
26351
+ },
26352
+ default: {
26353
+ icon: "w-4 h-4",
26354
+ text: "text-sm ml-2"
26355
+ },
26356
+ lg: {
26357
+ icon: "w-5 h-5",
26358
+ text: "text-base ml-2"
26359
+ }
26360
+ };
26361
+ const currentSize = sizeClasses[size];
26362
+ return /* @__PURE__ */ jsxs(
26363
+ "button",
26364
+ {
26365
+ onClick,
26366
+ disabled,
26367
+ "aria-label": ariaLabel || `${text} button`,
26368
+ className: cn(
26369
+ // Base styles - minimal padding for tight spaces
26370
+ "flex items-center transition-colors duration-200",
26371
+ // Color and interaction styles
26372
+ disabled ? "text-gray-400 cursor-not-allowed" : "text-gray-600 hover:text-gray-900",
26373
+ // Focus styles for accessibility
26374
+ "focus:outline-none focus:ring-2 focus:ring-blue-500 focus:ring-offset-2 rounded",
26375
+ className
26376
+ ),
26377
+ children: [
26378
+ /* @__PURE__ */ jsx(
26379
+ ArrowLeft,
26380
+ {
26381
+ className: cn(
26382
+ "flex-shrink-0",
26383
+ currentSize.icon,
26384
+ disabled && "opacity-50"
26385
+ )
26386
+ }
26387
+ ),
26388
+ /* @__PURE__ */ jsx("span", { className: cn(
26389
+ "font-medium select-none",
26390
+ currentSize.text,
26391
+ disabled && "opacity-50"
26392
+ ), children: text })
26393
+ ]
26394
+ }
26395
+ );
26396
+ };
26182
26397
  var BottlenecksContent = ({
26183
26398
  workspaceId,
26184
26399
  workspaceName,
@@ -26198,7 +26413,6 @@ var BottlenecksContent = ({
26198
26413
  const videoRef = useRef(null);
26199
26414
  const timestampFilterRef = useRef(null);
26200
26415
  const initialFilter = sopCategories && sopCategories.length > 0 ? sopCategories[0].id : "low_value";
26201
- const videoIndexRef = useRef(null);
26202
26416
  const currentIndexRef = useRef(0);
26203
26417
  const activeFilterRef = useRef(initialFilter);
26204
26418
  const isMountedRef = useRef(true);
@@ -26216,15 +26430,6 @@ var BottlenecksContent = ({
26216
26430
  const [isNavigating, setIsNavigating] = useState(false);
26217
26431
  const [error, setError] = useState(null);
26218
26432
  const [clipCounts, setClipCounts] = useState({});
26219
- const [videoIndex, setVideoIndex] = useState(null);
26220
- const updateVideoIndex = useCallback((newIndex) => {
26221
- console.log(`[BottlenecksContent] Updating video index - ID: ${newIndex?._debugId || "NO_ID"}, total videos: ${newIndex?.allVideos.length || 0}, categories: ${newIndex?.byCategory.size || 0}`);
26222
- if (newIndex) {
26223
- console.log(`[BottlenecksContent] VideoIndex categories: [${Array.from(newIndex.byCategory.keys()).join(", ")}]`);
26224
- }
26225
- setVideoIndex(newIndex);
26226
- videoIndexRef.current = newIndex;
26227
- }, []);
26228
26433
  const updateActiveFilter = useCallback((newFilter) => {
26229
26434
  console.log(`[BottlenecksContent] Updating active filter: ${activeFilterRef.current} -> ${newFilter}`);
26230
26435
  setActiveFilter(newFilter);
@@ -26260,6 +26465,21 @@ var BottlenecksContent = ({
26260
26465
  }
26261
26466
  return videoPrefetchManager.getS3Service(dashboardConfig);
26262
26467
  }, [dashboardConfig]);
26468
+ const effectiveShift = useMemo(() => {
26469
+ if (shift !== void 0 && shift !== null) {
26470
+ const shiftStr = shift.toString();
26471
+ console.log(`[BottlenecksContent] Using provided shift: ${shiftStr} for date: ${date}`);
26472
+ return shiftStr;
26473
+ }
26474
+ if (date) {
26475
+ console.log(`[BottlenecksContent] No shift provided for historical date ${date}, defaulting to day shift (0)`);
26476
+ return "0";
26477
+ } else {
26478
+ const currentShift = getCurrentShift2();
26479
+ console.log(`[BottlenecksContent] Using current operational shift: ${currentShift.shiftId} (${currentShift.shiftName})`);
26480
+ return currentShift.shiftId.toString();
26481
+ }
26482
+ }, [shift, date]);
26263
26483
  const {
26264
26484
  data: prefetchData,
26265
26485
  isFullyIndexed,
@@ -26268,9 +26488,10 @@ var BottlenecksContent = ({
26268
26488
  } = usePrefetchClipCounts({
26269
26489
  workspaceId,
26270
26490
  date: date || getOperationalDate(),
26271
- shift: shift?.toString() || "0",
26491
+ shift: effectiveShift,
26272
26492
  enabled: !!workspaceId && !!s3ClipsService,
26273
- buildIndex: true
26493
+ buildIndex: false
26494
+ // Disabled to reduce S3 costs - use pagination instead
26274
26495
  });
26275
26496
  const fetchClipCounts = useCallback(async () => {
26276
26497
  if (!workspaceId || !s3ClipsService || !dashboardConfig?.s3Config || !isMountedRef.current) return;
@@ -26282,14 +26503,13 @@ var BottlenecksContent = ({
26282
26503
  fetchInProgressRef.current.add(operationKey);
26283
26504
  try {
26284
26505
  const operationalDate = date || getOperationalDate();
26285
- const shiftStr = shift?.toString() || "0";
26506
+ const shiftStr = effectiveShift;
26286
26507
  console.log(`[BottlenecksContent] Fetching clip counts directly for ${workspaceId}`);
26287
26508
  const cacheKey = `clip-counts:${workspaceId}:${operationalDate}:${shiftStr}`;
26288
26509
  const cachedResult = await smartVideoCache.getClipCounts(cacheKey);
26289
26510
  if (cachedResult) {
26290
26511
  console.log(`[BottlenecksContent] Using cached clip counts`);
26291
26512
  updateClipCounts(cachedResult.counts);
26292
- updateVideoIndex(cachedResult.videoIndex);
26293
26513
  setIsLoading(false);
26294
26514
  setHasInitialLoad(true);
26295
26515
  return;
@@ -26298,19 +26518,13 @@ var BottlenecksContent = ({
26298
26518
  const fullResult = await s3ClipsService.getClipCounts(
26299
26519
  workspaceId,
26300
26520
  operationalDate,
26301
- shiftStr,
26302
- true
26303
- // Build index
26521
+ shiftStr
26522
+ // Don't build index - use pagination for cost efficiency
26304
26523
  );
26305
- if (fullResult && "counts" in fullResult && "videoIndex" in fullResult) {
26306
- updateClipCounts(fullResult.counts);
26307
- updateVideoIndex(fullResult.videoIndex);
26308
- await smartVideoCache.setClipCounts(cacheKey, fullResult, 5);
26309
- console.log(`[BottlenecksContent] Fetched and cached clip counts with ${fullResult.videoIndex.allVideos.length} videos`);
26310
- } else if (fullResult) {
26524
+ if (fullResult) {
26311
26525
  const counts = fullResult;
26312
26526
  updateClipCounts(counts);
26313
- console.log(`[BottlenecksContent] Fetched clip counts (no video index)`);
26527
+ console.log(`[BottlenecksContent] Fetched and cached clip counts`);
26314
26528
  }
26315
26529
  setIsLoading(false);
26316
26530
  setHasInitialLoad(true);
@@ -26323,7 +26537,7 @@ var BottlenecksContent = ({
26323
26537
  } finally {
26324
26538
  fetchInProgressRef.current.delete(operationKey);
26325
26539
  }
26326
- }, [workspaceId, date, s3ClipsService, shift, dashboardConfig, updateClipCounts, updateVideoIndex]);
26540
+ }, [workspaceId, date, s3ClipsService, effectiveShift, dashboardConfig, updateClipCounts]);
26327
26541
  const loadingCategoryRef = useRef(null);
26328
26542
  const videoRetryCountRef = useRef(0);
26329
26543
  const loadingVideosRef = useRef(/* @__PURE__ */ new Set());
@@ -26331,7 +26545,6 @@ var BottlenecksContent = ({
26331
26545
  const ensureVideosLoaded = useCallback(async (centerIndex) => {
26332
26546
  if (!s3ClipsService || !workspaceId || !isMountedRef.current) return;
26333
26547
  const currentFilter = activeFilterRef.current;
26334
- const currentVideoIndex = videoIndexRef.current;
26335
26548
  let effectiveFilter = currentFilter;
26336
26549
  if (sopCategories && sopCategories.length > 0) {
26337
26550
  const category = sopCategories.find((cat) => cat.id === currentFilter);
@@ -26358,20 +26571,9 @@ var BottlenecksContent = ({
26358
26571
  const loadPromises = indicesToLoad.map(async (index) => {
26359
26572
  try {
26360
26573
  let video = null;
26361
- if (currentVideoIndex && currentVideoIndex.byCategory && currentVideoIndex.allVideos.length > 0) {
26362
- video = await s3ClipsService.getVideoFromIndex(
26363
- currentVideoIndex,
26364
- effectiveFilter,
26365
- index,
26366
- true,
26367
- // includeCycleTime - OK for preloading
26368
- false
26369
- // includeMetadata - NO metadata during bulk preloading to prevent flooding
26370
- );
26371
- }
26372
26574
  if (!video) {
26373
26575
  const operationalDate = date || getOperationalDate();
26374
- const shiftStr = shift?.toString() || "0";
26576
+ const shiftStr = effectiveShift;
26375
26577
  video = await s3ClipsService.getClipByIndex(
26376
26578
  workspaceId,
26377
26579
  operationalDate,
@@ -26404,7 +26606,7 @@ var BottlenecksContent = ({
26404
26606
  Promise.all(loadPromises).catch((err) => {
26405
26607
  console.warn("[ensureVideosLoaded] Some videos failed to preload:", err);
26406
26608
  });
26407
- }, [s3ClipsService, workspaceId, clipCounts, sopCategories, date, shift]);
26609
+ }, [s3ClipsService, workspaceId, clipCounts, sopCategories, date, effectiveShift]);
26408
26610
  const loadFirstVideoForCategory = useCallback(async (category) => {
26409
26611
  if (!workspaceId || !s3ClipsService || !isMountedRef.current) return;
26410
26612
  const targetCategory = category || activeFilterRef.current;
@@ -26420,13 +26622,12 @@ var BottlenecksContent = ({
26420
26622
  }
26421
26623
  try {
26422
26624
  const operationalDate = date || getOperationalDate();
26423
- const shiftStr = shift?.toString() || "0";
26424
- if (!clipCounts[targetCategory] && !videoIndex) {
26625
+ const shiftStr = effectiveShift;
26626
+ if (!clipCounts[targetCategory]) {
26425
26627
  const cacheKey = `clip-counts:${workspaceId}:${operationalDate}:${shiftStr}`;
26426
26628
  const cachedResult = await smartVideoCache.getClipCounts(cacheKey);
26427
26629
  if (cachedResult && cachedResult.counts[targetCategory] > 0) {
26428
26630
  updateClipCounts(cachedResult.counts);
26429
- updateVideoIndex(cachedResult.videoIndex);
26430
26631
  setHasInitialLoad(true);
26431
26632
  console.log(`[BottlenecksContent] Used cached data for loadFirstVideoForCategory - ${targetCategory}`);
26432
26633
  }
@@ -26458,11 +26659,14 @@ var BottlenecksContent = ({
26458
26659
  } catch (directError) {
26459
26660
  console.warn(`[BottlenecksContent] Direct S3 loading failed, trying video index:`, directError);
26460
26661
  }
26461
- const currentVideoIndex = videoIndexRef.current;
26462
- if (clipCounts[targetCategory] > 0 && currentVideoIndex && currentVideoIndex.allVideos.length > 0) {
26662
+ if (clipCounts[targetCategory] > 0) {
26463
26663
  try {
26464
- const firstVideo = await s3ClipsService.getVideoFromIndex(
26465
- currentVideoIndex,
26664
+ const operationalDate2 = date || getOperationalDate();
26665
+ const shiftStr2 = effectiveShift;
26666
+ const firstVideo = await s3ClipsService.getClipByIndex(
26667
+ workspaceId,
26668
+ operationalDate2,
26669
+ shiftStr2,
26466
26670
  targetCategory,
26467
26671
  0,
26468
26672
  // First video (index 0)
@@ -26502,25 +26706,22 @@ var BottlenecksContent = ({
26502
26706
  loadingCategoryRef.current = null;
26503
26707
  fetchInProgressRef.current.delete(operationKey);
26504
26708
  }
26505
- }, [workspaceId, date, s3ClipsService, clipCounts, videoIndex, shift, updateClipCounts, updateVideoIndex]);
26709
+ }, [workspaceId, date, s3ClipsService, clipCounts, effectiveShift, updateClipCounts]);
26506
26710
  useEffect(() => {
26507
26711
  if (s3ClipsService && !prefetchData) {
26508
26712
  fetchClipCounts();
26509
26713
  }
26510
- }, [workspaceId, date, shift, s3ClipsService, fetchClipCounts, updateClipCounts, updateVideoIndex, prefetchData]);
26714
+ }, [workspaceId, date, effectiveShift, s3ClipsService, fetchClipCounts, updateClipCounts, prefetchData]);
26511
26715
  useEffect(() => {
26512
- if (prefetchData) {
26513
- console.log(`[BottlenecksContent] Received prefetch update - status: ${prefetchStatus}, videos: ${prefetchData.videoIndex.allVideos.length}, ID: ${prefetchData.videoIndex._debugId || "NO_ID"}`);
26716
+ if (prefetchData && prefetchData.counts) {
26717
+ console.log(`[BottlenecksContent] Received prefetch update - status: ${prefetchStatus}`);
26514
26718
  updateClipCounts(prefetchData.counts);
26515
- if (prefetchData.videoIndex.allVideos.length > 0) {
26516
- updateVideoIndex(prefetchData.videoIndex);
26517
- }
26518
- if (!hasInitialLoad && prefetchData.videoIndex.allVideos.length > 0) {
26719
+ if (!hasInitialLoad) {
26519
26720
  setIsLoading(false);
26520
26721
  setHasInitialLoad(true);
26521
26722
  }
26522
26723
  }
26523
- }, [prefetchData, prefetchStatus, updateClipCounts, updateVideoIndex, hasInitialLoad]);
26724
+ }, [prefetchData, prefetchStatus, updateClipCounts, hasInitialLoad]);
26524
26725
  useEffect(() => {
26525
26726
  if (s3ClipsService && clipCounts[activeFilter] > 0) {
26526
26727
  const hasVideosForCurrentFilter = allVideos.some((video) => {
@@ -26560,7 +26761,7 @@ var BottlenecksContent = ({
26560
26761
  setIsCategoryLoading(false);
26561
26762
  }
26562
26763
  }
26563
- }, [activeFilter, s3ClipsService, videoIndex, clipCounts, loadFirstVideoForCategory, allVideos, sopCategories]);
26764
+ }, [activeFilter, s3ClipsService, clipCounts, loadFirstVideoForCategory, allVideos, sopCategories]);
26564
26765
  useEffect(() => {
26565
26766
  if (previousFilterRef.current !== activeFilter) {
26566
26767
  console.log(`Filter changed from ${previousFilterRef.current} to ${activeFilter} - resetting to first video`);
@@ -26676,25 +26877,9 @@ var BottlenecksContent = ({
26676
26877
  }
26677
26878
  try {
26678
26879
  let video = null;
26679
- const currentVideoIndex = videoIndexRef.current;
26680
- if (currentVideoIndex && currentVideoIndex.byCategory && currentVideoIndex.allVideos.length > 0 && s3ClipsService) {
26681
- console.log(`[BottlenecksContent] Using video index for navigation - ID: ${currentVideoIndex._debugId || "NO_ID"}, total categories: ${currentVideoIndex.byCategory.size}, total videos: ${currentVideoIndex.allVideos.length}, filter: ${currentFilter}`);
26682
- console.log(`[BottlenecksContent] VideoIndex categories in handleNext: [${Array.from(currentVideoIndex.byCategory.keys()).join(", ")}]`);
26683
- video = await s3ClipsService.getVideoFromIndex(
26684
- currentVideoIndex,
26685
- effectiveFilter,
26686
- nextIndex,
26687
- true,
26688
- // includeCycleTime
26689
- false
26690
- // includeMetadata - DON'T fetch metadata during navigation to prevent flooding!
26691
- );
26692
- } else {
26693
- console.warn(`[BottlenecksContent] Video index not ready for navigation: ID: ${currentVideoIndex?._debugId || "NO_ID"}, byCategory exists = ${!!currentVideoIndex?.byCategory}, allVideos = ${currentVideoIndex?.allVideos?.length || 0}`);
26694
- }
26695
- if (!video && s3ClipsService) {
26880
+ if (s3ClipsService) {
26696
26881
  const operationalDate = date || getOperationalDate();
26697
- const shiftStr = shift?.toString() || "0";
26882
+ const shiftStr = effectiveShift;
26698
26883
  video = await s3ClipsService.getClipByIndex(
26699
26884
  workspaceId,
26700
26885
  operationalDate,
@@ -26730,7 +26915,7 @@ var BottlenecksContent = ({
26730
26915
  }
26731
26916
  }
26732
26917
  }
26733
- }, [clipCounts, filteredVideos.length, s3ClipsService, workspaceId, date, shift]);
26918
+ }, [clipCounts, filteredVideos.length, s3ClipsService, workspaceId, date, effectiveShift]);
26734
26919
  const handlePrevious = useCallback(() => {
26735
26920
  if (!isMountedRef.current) return;
26736
26921
  const currentIdx = currentIndexRef.current;
@@ -30750,16 +30935,13 @@ var AIAgentView = () => {
30750
30935
  } }),
30751
30936
  /* @__PURE__ */ jsxs("div", { className: `flex-1 flex flex-col h-screen transition-all duration-300 ${isSidebarOpen ? "mr-80" : "mr-0"}`, children: [
30752
30937
  /* @__PURE__ */ jsx("header", { className: "flex-shrink-0 bg-white px-8 py-6 shadow-sm border-b border-gray-200/80 sticky top-0 z-10", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between relative", children: [
30753
- /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxs(
30754
- "button",
30938
+ /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
30939
+ BackButtonMinimal,
30755
30940
  {
30756
30941
  onClick: () => navigate("/"),
30757
- className: "flex items-center text-gray-600 hover:text-gray-900",
30758
- "aria-label": "Go back",
30759
- children: [
30760
- /* @__PURE__ */ jsx(ArrowLeft, { className: "h-5 w-5" }),
30761
- /* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
30762
- ]
30942
+ text: "Back",
30943
+ size: "default",
30944
+ "aria-label": "Navigate back to dashboard"
30763
30945
  }
30764
30946
  ) }),
30765
30947
  /* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto", children: [
@@ -31428,15 +31610,13 @@ var HelpView = ({
31428
31610
  transition: { duration: 0.3 },
31429
31611
  children: /* @__PURE__ */ jsxs("div", { className: "flex flex-col", children: [
31430
31612
  /* @__PURE__ */ jsx("div", { className: "bg-white px-8 py-6 shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between relative", children: [
31431
- /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxs(
31432
- "button",
31613
+ /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
31614
+ BackButtonMinimal,
31433
31615
  {
31434
31616
  onClick: handleBackClick,
31435
- className: "flex items-center text-gray-600 hover:text-gray-900",
31436
- children: [
31437
- /* @__PURE__ */ jsx(ArrowLeftIcon$1, { className: "h-5 w-5" }),
31438
- /* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
31439
- ]
31617
+ text: "Back",
31618
+ size: "default",
31619
+ "aria-label": "Navigate back to dashboard"
31440
31620
  }
31441
31621
  ) }),
31442
31622
  /* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto", children: [
@@ -31466,10 +31646,7 @@ var HelpView = ({
31466
31646
  /* @__PURE__ */ jsx("div", { className: "xl:col-span-3 order-1", children: /* @__PURE__ */ jsxs(Card2, { className: "shadow-lg border-gray-200 bg-white", children: [
31467
31647
  /* @__PURE__ */ jsx(CardHeader2, { className: "bg-gradient-to-r from-blue-50 to-indigo-50 border-b border-gray-100 p-4 sm:p-6", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
31468
31648
  /* @__PURE__ */ jsx("div", { className: "p-1.5 sm:p-2 bg-blue-100 rounded-lg", children: /* @__PURE__ */ jsx(DocumentTextIcon, { className: "h-4 w-4 sm:h-5 sm:w-5 text-blue-600" }) }),
31469
- /* @__PURE__ */ jsxs("div", { children: [
31470
- /* @__PURE__ */ jsx(CardTitle2, { className: "text-lg sm:text-xl font-bold text-gray-900", children: "Submit Support Request" }),
31471
- /* @__PURE__ */ jsx("p", { className: "text-xs sm:text-sm text-gray-600 mt-1", children: "Direct line to our engineering team \u2022 Avg. response time: <30 minutes" })
31472
- ] })
31649
+ /* @__PURE__ */ jsx("div", { children: /* @__PURE__ */ jsx(CardTitle2, { className: "text-lg sm:text-xl font-bold text-gray-900", children: "Submit Support Request" }) })
31473
31650
  ] }) }),
31474
31651
  /* @__PURE__ */ jsx(CardContent2, { className: "p-4 sm:p-6", children: /* @__PURE__ */ jsxs("form", { onSubmit: handleSubmit, className: "space-y-4 sm:space-y-5", children: [
31475
31652
  /* @__PURE__ */ jsxs("div", { className: "space-y-4 sm:space-y-5", children: [
@@ -32563,17 +32740,15 @@ var KPIDetailView = ({
32563
32740
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
32564
32741
  /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "px-4 py-3", children: [
32565
32742
  /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
32566
- /* @__PURE__ */ jsxs(
32567
- "div",
32743
+ /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
32744
+ BackButtonMinimal,
32568
32745
  {
32569
32746
  onClick: handleBackClick,
32570
- className: "absolute left-0 flex items-center text-gray-600 hover:text-gray-900 cursor-pointer",
32571
- children: [
32572
- /* @__PURE__ */ jsx(ArrowLeftIcon$1, { className: "h-5 w-5" }),
32573
- /* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
32574
- ]
32747
+ text: "Back",
32748
+ size: "default",
32749
+ "aria-label": "Navigate back to previous page"
32575
32750
  }
32576
- ),
32751
+ ) }),
32577
32752
  /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
32578
32753
  /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: lineInfo?.line_name || "Line" }),
32579
32754
  /* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
@@ -32935,17 +33110,15 @@ var KPIsOverviewView = ({
32935
33110
  if (error) {
32936
33111
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
32937
33112
  /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
32938
- /* @__PURE__ */ jsxs(
32939
- "div",
33113
+ /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
33114
+ BackButtonMinimal,
32940
33115
  {
32941
33116
  onClick: handleBackClick,
32942
- className: "absolute left-0 flex items-center text-gray-600 hover:text-gray-900 cursor-pointer",
32943
- children: [
32944
- /* @__PURE__ */ jsx(ArrowLeftIcon$1, { className: "h-5 w-5" }),
32945
- /* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
32946
- ]
33117
+ text: "Back",
33118
+ size: "default",
33119
+ "aria-label": "Navigate back to previous page"
32947
33120
  }
32948
- ),
33121
+ ) }),
32949
33122
  /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
32950
33123
  /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shop-floor overview" }),
32951
33124
  /* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
@@ -32957,17 +33130,15 @@ var KPIsOverviewView = ({
32957
33130
  if (lines.length === 0) {
32958
33131
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
32959
33132
  /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsx("div", { className: "px-4 py-3", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
32960
- /* @__PURE__ */ jsxs(
32961
- "div",
33133
+ /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
33134
+ BackButtonMinimal,
32962
33135
  {
32963
33136
  onClick: handleBackClick,
32964
- className: "absolute left-0 flex items-center text-gray-600 hover:text-gray-900 cursor-pointer",
32965
- children: [
32966
- /* @__PURE__ */ jsx(ArrowLeftIcon$1, { className: "h-5 w-5" }),
32967
- /* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
32968
- ]
33137
+ text: "Back",
33138
+ size: "default",
33139
+ "aria-label": "Navigate back to previous page"
32969
33140
  }
32970
- ),
33141
+ ) }),
32971
33142
  /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
32972
33143
  /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shop-floor overview" }),
32973
33144
  /* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
@@ -32982,17 +33153,15 @@ var KPIsOverviewView = ({
32982
33153
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-gray-50 flex flex-col", children: [
32983
33154
  /* @__PURE__ */ jsx("header", { className: "sticky top-0 z-10 bg-white border-b flex-shrink-0", children: /* @__PURE__ */ jsxs("div", { className: "px-4 py-3", children: [
32984
33155
  /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
32985
- /* @__PURE__ */ jsxs(
32986
- "div",
33156
+ /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
33157
+ BackButtonMinimal,
32987
33158
  {
32988
33159
  onClick: handleBackClick,
32989
- className: "absolute left-0 flex items-center text-gray-600 hover:text-gray-900 cursor-pointer",
32990
- children: [
32991
- /* @__PURE__ */ jsx(ArrowLeftIcon$1, { className: "h-5 w-5" }),
32992
- /* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
32993
- ]
33160
+ text: "Back",
33161
+ size: "default",
33162
+ "aria-label": "Navigate back to previous page"
32994
33163
  }
32995
- ),
33164
+ ) }),
32996
33165
  /* @__PURE__ */ jsx("div", { className: "flex-1 flex justify-center", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-3", children: [
32997
33166
  /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shop-floor overview" }),
32998
33167
  /* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
@@ -33276,18 +33445,13 @@ var LeaderboardDetailView = memo(({
33276
33445
  return /* @__PURE__ */ jsxs("div", { className: `min-h-screen bg-slate-50 flex flex-col ${className}`, children: [
33277
33446
  /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-20 bg-white shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxs("div", { className: "px-3 sm:px-8 py-2 sm:py-2.5", children: [
33278
33447
  /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between", children: [
33279
- /* @__PURE__ */ jsx("div", { className: "w-auto sm:w-32", children: /* @__PURE__ */ jsxs(
33280
- "button",
33448
+ /* @__PURE__ */ jsx("div", { className: "w-auto sm:w-32", children: /* @__PURE__ */ jsx(
33449
+ BackButtonMinimal,
33281
33450
  {
33282
33451
  onClick: handleBackClick,
33283
- className: "flex items-center gap-1 sm:gap-2 px-2 sm:px-3 py-1.5 sm:py-2 text-gray-600 hover:text-gray-900 transition-colors",
33284
- children: [
33285
- /* @__PURE__ */ jsxs("svg", { className: "w-4 h-4", xmlns: "http://www.w3.org/2000/svg", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round", children: [
33286
- /* @__PURE__ */ jsx("path", { d: "M19 12H5" }),
33287
- /* @__PURE__ */ jsx("polyline", { points: "12 19 5 12 12 5" })
33288
- ] }),
33289
- /* @__PURE__ */ jsx("span", { className: "text-xs sm:text-sm font-medium", children: "Back" })
33290
- ]
33452
+ text: "Back",
33453
+ size: "default",
33454
+ "aria-label": "Navigate back to previous page"
33291
33455
  }
33292
33456
  ) }),
33293
33457
  /* @__PURE__ */ jsxs("div", { className: "flex items-center gap-2 sm:gap-3", children: [
@@ -34348,18 +34512,15 @@ var ShiftsView = ({
34348
34512
  }, [lineConfigs, supabase, showToast]);
34349
34513
  return /* @__PURE__ */ jsxs("div", { className: `min-h-screen bg-slate-50 ${className}`, children: [
34350
34514
  /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 bg-white border-b border-gray-200/80 shadow-sm", children: /* @__PURE__ */ jsx("div", { className: "px-4 sm:px-8 py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
34351
- /* @__PURE__ */ jsxs(
34352
- "button",
34515
+ /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
34516
+ BackButtonMinimal,
34353
34517
  {
34354
34518
  onClick: () => onBackClick ? onBackClick() : window.history.back(),
34355
- className: "absolute left-0 flex items-center gap-2 text-gray-600 hover:text-gray-900 transition-colors",
34356
- "aria-label": "Go back",
34357
- children: [
34358
- /* @__PURE__ */ jsx(ArrowLeft, { className: "w-5 h-5" }),
34359
- /* @__PURE__ */ jsx("span", { className: "text-sm font-medium", children: "Back" })
34360
- ]
34519
+ text: "Back",
34520
+ size: "default",
34521
+ "aria-label": "Navigate back to previous page"
34361
34522
  }
34362
- ),
34523
+ ) }),
34363
34524
  /* @__PURE__ */ jsxs("div", { className: "flex-1 flex flex-col items-center", children: [
34364
34525
  /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "Shift Management" }),
34365
34526
  /* @__PURE__ */ jsx("p", { className: "text-sm text-gray-500 mt-1", children: "Configure day and night shift timings and breaks for each production line" })
@@ -35268,15 +35429,13 @@ var TargetsViewUI = ({
35268
35429
  }
35269
35430
  return /* @__PURE__ */ jsxs("main", { className: "min-h-screen flex-1 bg-gray-50", children: [
35270
35431
  /* @__PURE__ */ jsx("div", { className: "bg-white px-8 py-6 shadow-sm border-b border-gray-200/80", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between relative", children: [
35271
- /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsxs(
35272
- "button",
35432
+ /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
35433
+ BackButtonMinimal,
35273
35434
  {
35274
35435
  onClick: onBack,
35275
- className: "flex items-center text-gray-600 hover:text-gray-900",
35276
- children: [
35277
- /* @__PURE__ */ jsx(ArrowLeftIcon, { className: "h-5 w-5" }),
35278
- /* @__PURE__ */ jsx("span", { className: "ml-2", children: "Back" })
35279
- ]
35436
+ text: "Back",
35437
+ size: "default",
35438
+ "aria-label": "Navigate back to previous page"
35280
35439
  }
35281
35440
  ) }),
35282
35441
  /* @__PURE__ */ jsx("div", { className: "absolute right-0", children: /* @__PURE__ */ jsxs(
@@ -36593,15 +36752,13 @@ var WorkspaceDetailView = ({
36593
36752
  "Error: ",
36594
36753
  error.message
36595
36754
  ] }),
36596
- /* @__PURE__ */ jsxs(
36597
- "button",
36755
+ /* @__PURE__ */ jsx(
36756
+ BackButton,
36598
36757
  {
36599
36758
  onClick: () => onNavigate && onNavigate("/"),
36600
- className: "inline-flex items-center text-gray-600 hover:text-gray-900",
36601
- children: [
36602
- /* @__PURE__ */ jsx(ArrowLeft, { className: "w-5 h-5 mr-2" }),
36603
- "Return to Dashboard"
36604
- ]
36759
+ text: "Return to Dashboard",
36760
+ size: "default",
36761
+ "aria-label": "Return to dashboard"
36605
36762
  }
36606
36763
  )
36607
36764
  ] });
@@ -36609,15 +36766,13 @@ var WorkspaceDetailView = ({
36609
36766
  if (!workspace) {
36610
36767
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen p-8 bg-slate-50", children: [
36611
36768
  /* @__PURE__ */ jsx("div", { className: "mb-4 text-xl text-gray-600", children: "Workspace not found" }),
36612
- /* @__PURE__ */ jsxs(
36613
- "button",
36769
+ /* @__PURE__ */ jsx(
36770
+ BackButton,
36614
36771
  {
36615
36772
  onClick: () => onNavigate && onNavigate("/"),
36616
- className: "inline-flex items-center text-gray-600 hover:text-gray-900",
36617
- children: [
36618
- /* @__PURE__ */ jsx(ArrowLeft, { className: "w-5 h-5 mr-2" }),
36619
- "Return to Dashboard"
36620
- ]
36773
+ text: "Return to Dashboard",
36774
+ size: "default",
36775
+ "aria-label": "Return to dashboard"
36621
36776
  }
36622
36777
  )
36623
36778
  ] });
@@ -36632,17 +36787,15 @@ var WorkspaceDetailView = ({
36632
36787
  /* @__PURE__ */ jsxs("div", { className: "min-h-screen w-full flex flex-col bg-slate-50", children: [
36633
36788
  /* @__PURE__ */ jsxs("header", { className: "sticky top-0 z-10 px-2 sm:px-2.5 lg:px-3 py-1.5 sm:py-2 lg:py-3 flex flex-col shadow-sm bg-white", children: [
36634
36789
  /* @__PURE__ */ jsxs("div", { className: "relative flex items-center", children: [
36635
- /* @__PURE__ */ jsxs(
36636
- "button",
36790
+ /* @__PURE__ */ jsx("div", { className: "absolute left-0 z-10", children: /* @__PURE__ */ jsx(
36791
+ BackButtonMinimal,
36637
36792
  {
36638
36793
  onClick: handleBackNavigation,
36639
- className: "absolute left-0 flex items-center text-gray-600 hover:text-gray-900 z-10",
36640
- children: [
36641
- /* @__PURE__ */ jsx(ArrowLeft, { className: "w-3 h-3 sm:w-3.5 lg:w-4 sm:h-3.5 lg:h-4 mr-1" }),
36642
- /* @__PURE__ */ jsx("span", { className: "text-sm sm:text-sm lg:text-base", children: previousView === "line_monthly_history" ? "Back to Line History" : returnUrl && returnUrl.includes("monthly_history") ? "Back to Line History" : returnUrl && returnUrl.includes("/kpis/") ? "Back to KPIs" : returnUrl && returnUrl.includes("/leaderboard/") ? "Back to Leaderboard" : date || shift ? "Back to Monthly History" : "Back" })
36643
- ]
36794
+ text: previousView === "line_monthly_history" ? "Back to Line History" : returnUrl && returnUrl.includes("monthly_history") ? "Back to Line History" : returnUrl && returnUrl.includes("/kpis/") ? "Back to KPIs" : returnUrl && returnUrl.includes("/leaderboard/") ? "Back to Leaderboard" : date || shift ? "Back to Monthly History" : "Back",
36795
+ size: "default",
36796
+ "aria-label": "Navigate back to previous page"
36644
36797
  }
36645
- ),
36798
+ ) }),
36646
36799
  /* @__PURE__ */ jsxs("div", { className: "absolute left-1/2 transform -translate-x-1/2 flex items-center gap-3", children: [
36647
36800
  /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: formattedWorkspaceName }),
36648
36801
  /* @__PURE__ */ jsx("div", { className: "h-2 w-2 rounded-full bg-green-500 animate-pulse ring-2 ring-green-500/30 ring-offset-1" })
@@ -37150,17 +37303,15 @@ var SKUManagementView = () => {
37150
37303
  }
37151
37304
  return /* @__PURE__ */ jsxs("div", { className: "min-h-screen bg-slate-50", children: [
37152
37305
  /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 bg-white border-b border-gray-200/80 shadow-sm", children: /* @__PURE__ */ jsx("div", { className: "px-4 sm:px-8 py-4", children: /* @__PURE__ */ jsxs("div", { className: "flex items-center relative", children: [
37153
- /* @__PURE__ */ jsxs(
37154
- "button",
37306
+ /* @__PURE__ */ jsx("div", { className: "absolute left-0", children: /* @__PURE__ */ jsx(
37307
+ BackButtonMinimal,
37155
37308
  {
37156
37309
  onClick: handleBack,
37157
- className: "absolute left-0 flex items-center gap-2 text-gray-600 hover:text-gray-900 transition-colors",
37158
- children: [
37159
- /* @__PURE__ */ jsx(ArrowLeft, { className: "h-5 w-5" }),
37160
- /* @__PURE__ */ jsx("span", { children: "Back" })
37161
- ]
37310
+ text: "Back",
37311
+ size: "default",
37312
+ "aria-label": "Navigate back to previous page"
37162
37313
  }
37163
- ),
37314
+ ) }),
37164
37315
  /* @__PURE__ */ jsxs("div", { className: "flex-1 text-center mx-auto", children: [
37165
37316
  /* @__PURE__ */ jsx("h1", { className: "text-3xl font-semibold text-gray-900", children: "SKU Management" }),
37166
37317
  /* @__PURE__ */ jsx("p", { className: "mt-1 text-sm text-gray-500", children: "Manage Stock Keeping Units (SKUs) for production planning" })
@@ -37667,4 +37818,4 @@ var streamProxyConfig = {
37667
37818
  }
37668
37819
  };
37669
37820
 
37670
- export { ACTION_NAMES, AIAgentView_default as AIAgentView, AudioService, AuthCallback, AuthCallbackView_default as AuthCallbackView, AuthProvider, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedShiftsView, AuthenticatedTargetsView, BarChart, BaseHistoryCalendar, BottlenecksContent, BreakNotificationPopup, CachePrefetchStatus, Card2 as Card, CardContent2 as CardContent, CardDescription2 as CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle2 as CardTitle, CongratulationsOverlay, CycleTimeChart, CycleTimeOverTimeChart, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, DashboardHeader, DashboardLayout, DashboardOverridesProvider, DashboardProvider, DateDisplay_default as DateDisplay, DateTimeDisplay, DebugAuth, DebugAuthView_default as DebugAuthView, EmptyStateMessage, EncouragementOverlay, FactoryView_default as FactoryView, GaugeChart, GridComponentsPlaceholder, HamburgerButton, Header, HelpView_default as HelpView, HomeView_default as HomeView, HourlyOutputChart2 as HourlyOutputChart, ISTTimer_default as ISTTimer, KPICard, KPIDetailView_default as KPIDetailView, KPIGrid, KPIHeader, KPISection, KPIsOverviewView_default as KPIsOverviewView, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, LeaderboardDetailView_default as LeaderboardDetailView, Legend6 as Legend, LineChart, LineHistoryCalendar, LineMonthlyHistory, LineMonthlyPdfGenerator, LinePdfExportButton, LinePdfGenerator, LineWhatsAppShareButton, LiveTimer, LoadingInline, LoadingOverlay_default as LoadingOverlay, LoadingPage_default as LoadingPage, LoadingSkeleton, LoadingState, LoginPage, LoginView_default as LoginView, MainLayout, MetricCard_default as MetricCard, NoWorkspaceData, OptifyeAgentClient, OptifyeLogoLoader_default as OptifyeLogoLoader, OutputProgressChart, PageHeader, PieChart4 as PieChart, PrefetchConfigurationError, PrefetchError, PrefetchEvents, PrefetchStatus, PrefetchTimeoutError, ProfileView_default as ProfileView, RegistryProvider, S3Service, SKUManagementView, SOPComplianceChart, SSEChatClient, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, ShiftDisplay_default as ShiftDisplay, ShiftsView_default as ShiftsView, SideNavBar, SingleVideoStream_default as SingleVideoStream, Skeleton, SubscriptionManager, SubscriptionManagerProvider, SupabaseProvider, TargetWorkspaceGrid, TargetsView_default as TargetsView, ThreadSidebar, TicketHistory_default as TicketHistory, TicketHistoryService, TimeDisplay_default as TimeDisplay, TimePickerDropdown, VideoCard, VideoGridView, VideoPlayer, VideoPreloader, WORKSPACE_POSITIONS, WhatsAppShareButton, WorkspaceCard, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, apiUtils, authCoreService, authOTPService, authRateLimitService, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearWorkspaceDisplayNamesCache, cn, createStreamProxyHandler, createSupabaseClient, createThrottledReload, dashboardService, deleteThread, forceRefreshWorkspaceDisplayNames, formatDateInZone, formatDateTimeInZone, formatISTDate, formatIdleTime, formatTimeInZone, fromUrlFriendlyName, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAnonClient, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentTimeInZone, getDashboardHeaderTimeInZone, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getOperationalDate, getS3SignedUrl, getS3VideoSrc, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getSubscriptionManager, getThreadMessages, getUserThreads, getUserThreadsPaginated, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, identifyCoreUser, initializeCoreMixpanel, isLegacyConfiguration, isPrefetchError, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, mergeWithDefaultConfig, migrateLegacyConfiguration, optifyeAgentClient, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSubscriptionManager, s3VideoPreloader, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, updateThreadTitle, useActiveBreaks, useAllWorkspaceMetrics, useAnalyticsConfig, useAudioService, useAuth, useAuthConfig, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useHourEndTimer, useHourlyTargetAchievements, useHourlyTargetMisses, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineWorkspaceMetrics, useMessages, useMetrics, useNavigation, useOverrides, usePageOverride, usePrefetchClipCounts, useRealtimeLineMetrics, useRegistry, useSKUs, useShiftConfig, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useTargets, useTheme, useThemeConfig, useThreads, useTicketHistory, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, videoPrefetchManager, videoPreloader, whatsappService, withAuth, withRegistry, workspaceService };
37821
+ export { ACTION_NAMES, AIAgentView_default as AIAgentView, AudioService, AuthCallback, AuthCallbackView_default as AuthCallbackView, AuthProvider, AuthenticatedFactoryView, AuthenticatedHelpView, AuthenticatedHomeView, AuthenticatedShiftsView, AuthenticatedTargetsView, BackButton, BackButtonMinimal, BarChart, BaseHistoryCalendar, BottlenecksContent, BreakNotificationPopup, CachePrefetchStatus, Card2 as Card, CardContent2 as CardContent, CardDescription2 as CardDescription, CardFooter2 as CardFooter, CardHeader2 as CardHeader, CardTitle2 as CardTitle, CongratulationsOverlay, CycleTimeChart, CycleTimeOverTimeChart, DEFAULT_ANALYTICS_CONFIG, DEFAULT_AUTH_CONFIG, DEFAULT_CONFIG, DEFAULT_DATABASE_CONFIG, DEFAULT_DATE_TIME_CONFIG, DEFAULT_ENDPOINTS_CONFIG, DEFAULT_ENTITY_CONFIG, DEFAULT_SHIFT_CONFIG, DEFAULT_THEME_CONFIG, DEFAULT_VIDEO_CONFIG, DEFAULT_WORKSPACE_CONFIG, DEFAULT_WORKSPACE_POSITIONS, DashboardHeader, DashboardLayout, DashboardOverridesProvider, DashboardProvider, DateDisplay_default as DateDisplay, DateTimeDisplay, DebugAuth, DebugAuthView_default as DebugAuthView, EmptyStateMessage, EncouragementOverlay, FactoryView_default as FactoryView, GaugeChart, GridComponentsPlaceholder, HamburgerButton, Header, HelpView_default as HelpView, HomeView_default as HomeView, HourlyOutputChart2 as HourlyOutputChart, ISTTimer_default as ISTTimer, KPICard, KPIDetailView_default as KPIDetailView, KPIGrid, KPIHeader, KPISection, KPIsOverviewView_default as KPIsOverviewView, LINE_1_UUID, LINE_2_UUID, LargeOutputProgressChart, LeaderboardDetailView_default as LeaderboardDetailView, Legend6 as Legend, LineChart, LineHistoryCalendar, LineMonthlyHistory, LineMonthlyPdfGenerator, LinePdfExportButton, LinePdfGenerator, LineWhatsAppShareButton, LiveTimer, LoadingInline, LoadingOverlay_default as LoadingOverlay, LoadingPage_default as LoadingPage, LoadingSkeleton, LoadingState, LoginPage, LoginView_default as LoginView, MainLayout, MetricCard_default as MetricCard, NoWorkspaceData, OptifyeAgentClient, OptifyeLogoLoader_default as OptifyeLogoLoader, OutputProgressChart, PageHeader, PieChart4 as PieChart, PrefetchConfigurationError, PrefetchError, PrefetchEvents, PrefetchStatus, PrefetchTimeoutError, ProfileView_default as ProfileView, RegistryProvider, S3Service, SKUManagementView, SOPComplianceChart, SSEChatClient, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, ShiftDisplay_default as ShiftDisplay, ShiftsView_default as ShiftsView, SideNavBar, SingleVideoStream_default as SingleVideoStream, Skeleton, SubscriptionManager, SubscriptionManagerProvider, SupabaseProvider, TargetWorkspaceGrid, TargetsView_default as TargetsView, ThreadSidebar, TicketHistory_default as TicketHistory, TicketHistoryService, TimeDisplay_default as TimeDisplay, TimePickerDropdown, VideoCard, VideoGridView, VideoPlayer, VideoPreloader, WORKSPACE_POSITIONS, WhatsAppShareButton, WorkspaceCard, WorkspaceDetailView_default as WorkspaceDetailView, WorkspaceDisplayNameExample, WorkspaceGrid, WorkspaceGridItem, WorkspaceHistoryCalendar, WorkspaceMetricCards, WorkspaceMonthlyDataFetcher, WorkspaceMonthlyPdfGenerator, WorkspacePdfExportButton, WorkspacePdfGenerator, WorkspaceWhatsAppShareButton, actionService, apiUtils, authCoreService, authOTPService, authRateLimitService, checkRateLimit2 as checkRateLimit, clearAllRateLimits2 as clearAllRateLimits, clearRateLimit2 as clearRateLimit, clearS3VideoCache, clearS3VideoFromCache, clearWorkspaceDisplayNamesCache, cn, createStreamProxyHandler, createSupabaseClient, createThrottledReload, dashboardService, deleteThread, forceRefreshWorkspaceDisplayNames, formatDateInZone, formatDateTimeInZone, formatISTDate, formatIdleTime, formatTimeInZone, fromUrlFriendlyName, getAllLineDisplayNames, getAllThreadMessages, getAllWorkspaceDisplayNamesAsync, getAnonClient, getCameraNumber, getCompanyMetricsTableName, getConfigurableShortWorkspaceDisplayName, getConfigurableWorkspaceDisplayName, getConfiguredLineIds, getCoreSessionRecordingProperties, getCoreSessionReplayUrl, getCurrentShift, getCurrentTimeInZone, getDashboardHeaderTimeInZone, getDaysDifferenceInZone, getDefaultCameraStreamUrl, getDefaultLineId, getDefaultTabForWorkspace, getLineDisplayName, getManufacturingInsights, getMetricsTablePrefix, getOperationalDate, getS3SignedUrl, getS3VideoSrc, getShortWorkspaceDisplayName, getShortWorkspaceDisplayNameAsync, getStoredWorkspaceMappings, getSubscriptionManager, getThreadMessages, getUserThreads, getUserThreadsPaginated, getWorkspaceDisplayName, getWorkspaceDisplayNameAsync, getWorkspaceDisplayNamesMap, getWorkspaceFromUrl, getWorkspaceNavigationParams, identifyCoreUser, initializeCoreMixpanel, isLegacyConfiguration, isPrefetchError, isTransitionPeriod, isUrlPermanentlyFailed, isValidFactoryViewConfiguration, isValidLineInfoPayload, isValidPrefetchParams, isValidPrefetchStatus, isValidWorkspaceDetailedMetricsPayload, isValidWorkspaceMetricsPayload, isWorkspaceDisplayNamesLoaded, isWorkspaceDisplayNamesLoading, mergeWithDefaultConfig, migrateLegacyConfiguration, optifyeAgentClient, preInitializeWorkspaceDisplayNames, preloadS3Video, preloadS3VideoUrl, preloadS3VideosUrl, preloadVideoUrl, preloadVideosUrl, qualityService, realtimeService, refreshWorkspaceDisplayNames, resetCoreMixpanel, resetFailedUrl, resetSubscriptionManager, s3VideoPreloader, skuService, startCoreSessionRecording, stopCoreSessionRecording, storeWorkspaceMapping, streamProxyConfig, throttledReloadDashboard, toUrlFriendlyName, trackCoreEvent, trackCorePageView, updateThreadTitle, useActiveBreaks, useAllWorkspaceMetrics, useAnalyticsConfig, useAudioService, useAuth, useAuthConfig, useComponentOverride, useCustomConfig, useDashboardConfig, useDashboardMetrics, useDatabaseConfig, useDateFormatter, useDateTimeConfig, useEndpointsConfig, useEntityConfig, useFactoryOverviewMetrics, useFeatureFlags, useFormatNumber, useHistoricWorkspaceMetrics, useHlsStream, useHlsStreamWithCropping, useHookOverride, useHourEndTimer, useHourlyTargetAchievements, useHourlyTargetMisses, useLeaderboardMetrics, useLineDetailedMetrics, useLineKPIs, useLineMetrics, useLineWorkspaceMetrics, useMessages, useMetrics, useNavigation, useOverrides, usePageOverride, usePrefetchClipCounts, useRealtimeLineMetrics, useRegistry, useSKUs, useShiftConfig, useShifts, useSubscriptionManager, useSubscriptionManagerSafe, useSupabase, useSupabaseClient, useTargets, useTheme, useThemeConfig, useThreads, useTicketHistory, useVideoConfig, useWorkspaceConfig, useWorkspaceDetailedMetrics, useWorkspaceDisplayName, useWorkspaceDisplayNames, useWorkspaceDisplayNamesMap, useWorkspaceMetrics, useWorkspaceNavigation, useWorkspaceOperators, videoPrefetchManager, videoPreloader, whatsappService, withAuth, withRegistry, workspaceService };