@flamingo-stack/openframe-frontend-core 0.0.665 → 0.0.666

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.
Files changed (109) hide show
  1. package/dist/{chunk-MNUR6PAJ.cjs → chunk-23XIOIGS.cjs} +392 -370
  2. package/dist/chunk-23XIOIGS.cjs.map +1 -0
  3. package/dist/{chunk-LCYYTWRF.cjs → chunk-2S44CUCH.cjs} +4 -4
  4. package/dist/{chunk-LCYYTWRF.cjs.map → chunk-2S44CUCH.cjs.map} +1 -1
  5. package/dist/{chunk-LXL3PZE2.cjs → chunk-7H7LYI4M.cjs} +10 -10
  6. package/dist/{chunk-LXL3PZE2.cjs.map → chunk-7H7LYI4M.cjs.map} +1 -1
  7. package/dist/{chunk-L4ZNA3NX.cjs → chunk-AAIL6J56.cjs} +3 -3
  8. package/dist/{chunk-L4ZNA3NX.cjs.map → chunk-AAIL6J56.cjs.map} +1 -1
  9. package/dist/{chunk-QR3NUFA5.js → chunk-CRDKQMTP.js} +2 -2
  10. package/dist/{chunk-77WMNQTE.js → chunk-CYPLD5F3.js} +3 -3
  11. package/dist/{chunk-BPKEDLGR.js → chunk-DDW7G6U7.js} +5 -5
  12. package/dist/{chunk-OLCI3UA5.js → chunk-EYCF3GGM.js} +6 -6
  13. package/dist/{chunk-Z2MJPTIB.js → chunk-HQHZZ3SL.js} +3 -3
  14. package/dist/{chunk-DNFC6RYF.js → chunk-ILAEMVAI.js} +2 -2
  15. package/dist/{chunk-3SS37SNM.cjs → chunk-IUNCGKFP.cjs} +10 -10
  16. package/dist/{chunk-3SS37SNM.cjs.map → chunk-IUNCGKFP.cjs.map} +1 -1
  17. package/dist/{chunk-OMTLCMQB.js → chunk-IWCYTHNG.js} +31 -9
  18. package/dist/chunk-IWCYTHNG.js.map +1 -0
  19. package/dist/{chunk-RT5JNTCN.js → chunk-JBRNIUYC.js} +3 -3
  20. package/dist/{chunk-FGQSSFP4.cjs → chunk-KDFSFVNX.cjs} +10 -10
  21. package/dist/{chunk-FGQSSFP4.cjs.map → chunk-KDFSFVNX.cjs.map} +1 -1
  22. package/dist/{chunk-XCACXPCM.cjs → chunk-L7QXTWI7.cjs} +22 -22
  23. package/dist/{chunk-XCACXPCM.cjs.map → chunk-L7QXTWI7.cjs.map} +1 -1
  24. package/dist/{chunk-CQJXOBWK.js → chunk-NIVLGQKS.js} +3 -3
  25. package/dist/{chunk-GDTFJ5QN.js → chunk-O5GV3WQO.js} +2 -2
  26. package/dist/{chunk-ZGPST26T.cjs → chunk-OPY4JNY2.cjs} +45 -45
  27. package/dist/{chunk-ZGPST26T.cjs.map → chunk-OPY4JNY2.cjs.map} +1 -1
  28. package/dist/{chunk-ZMZUF6FX.cjs → chunk-QSYYYL55.cjs} +3 -3
  29. package/dist/{chunk-ZMZUF6FX.cjs.map → chunk-QSYYYL55.cjs.map} +1 -1
  30. package/dist/{chunk-RM4S53GB.js → chunk-R6NU4QFR.js} +2 -2
  31. package/dist/{chunk-BKCPXDOE.js → chunk-SCRVQY42.js} +2 -2
  32. package/dist/{chunk-MBLACUCE.js → chunk-V3B37LQY.js} +5 -5
  33. package/dist/{chunk-JHAS6Y7P.js → chunk-VI35TSB2.js} +4 -4
  34. package/dist/{chunk-KBUYG5N6.cjs → chunk-VN2U4EBP.cjs} +33 -33
  35. package/dist/{chunk-KBUYG5N6.cjs.map → chunk-VN2U4EBP.cjs.map} +1 -1
  36. package/dist/{chunk-6W5N23LC.cjs → chunk-VUYRTI3Z.cjs} +26 -26
  37. package/dist/{chunk-6W5N23LC.cjs.map → chunk-VUYRTI3Z.cjs.map} +1 -1
  38. package/dist/{chunk-6FD7ZEBY.cjs → chunk-W2WEIVHT.cjs} +163 -163
  39. package/dist/{chunk-6FD7ZEBY.cjs.map → chunk-W2WEIVHT.cjs.map} +1 -1
  40. package/dist/{chunk-EMJAT6IK.cjs → chunk-WI5LLFA6.cjs} +15 -15
  41. package/dist/{chunk-EMJAT6IK.cjs.map → chunk-WI5LLFA6.cjs.map} +1 -1
  42. package/dist/{chunk-JHH7NETU.cjs → chunk-XMY2XTHG.cjs} +5 -5
  43. package/dist/{chunk-JHH7NETU.cjs.map → chunk-XMY2XTHG.cjs.map} +1 -1
  44. package/dist/{chunk-LTW2GWJ2.cjs → chunk-XSRIPH6U.cjs} +22 -22
  45. package/dist/{chunk-LTW2GWJ2.cjs.map → chunk-XSRIPH6U.cjs.map} +1 -1
  46. package/dist/{chunk-X32X52VN.cjs → chunk-YAF2JKAK.cjs} +71 -71
  47. package/dist/{chunk-X32X52VN.cjs.map → chunk-YAF2JKAK.cjs.map} +1 -1
  48. package/dist/{chunk-YRMKUDOE.js → chunk-YVMSA7LR.js} +5 -5
  49. package/dist/{chunk-O3GB7JFL.js → chunk-ZDGEJFDG.js} +3 -3
  50. package/dist/components/case-studies/index.cjs +14 -14
  51. package/dist/components/case-studies/index.js +3 -3
  52. package/dist/components/chat/chat-composer.d.ts +10 -1
  53. package/dist/components/chat/chat-composer.d.ts.map +1 -1
  54. package/dist/components/chat/chat-input.d.ts.map +1 -1
  55. package/dist/components/chat/embeddable-chat.d.ts +10 -0
  56. package/dist/components/chat/embeddable-chat.d.ts.map +1 -1
  57. package/dist/components/chat/index.cjs +2 -2
  58. package/dist/components/chat/index.js +1 -1
  59. package/dist/components/chat/types/component.types.d.ts +7 -0
  60. package/dist/components/chat/types/component.types.d.ts.map +1 -1
  61. package/dist/components/contact/index.cjs +4 -4
  62. package/dist/components/contact/index.js +3 -3
  63. package/dist/components/docs/index.cjs +7 -7
  64. package/dist/components/docs/index.js +6 -6
  65. package/dist/components/embeds/index.cjs +4 -4
  66. package/dist/components/embeds/index.js +3 -3
  67. package/dist/components/faq/index.cjs +4 -4
  68. package/dist/components/faq/index.js +3 -3
  69. package/dist/components/features/index.cjs +3 -3
  70. package/dist/components/features/index.js +2 -2
  71. package/dist/components/help-center-pages/index.cjs +23 -23
  72. package/dist/components/help-center-pages/index.js +14 -14
  73. package/dist/components/index.cjs +39 -39
  74. package/dist/components/index.js +13 -13
  75. package/dist/components/meeting-scheduler/index.cjs +24 -24
  76. package/dist/components/meeting-scheduler/index.js +2 -2
  77. package/dist/components/navigation/index.cjs +6 -6
  78. package/dist/components/navigation/index.js +5 -5
  79. package/dist/components/onboarding-guides/index.cjs +6 -6
  80. package/dist/components/onboarding-guides/index.js +5 -5
  81. package/dist/components/tickets/index.cjs +7 -7
  82. package/dist/components/tickets/index.js +6 -6
  83. package/dist/components/ui/index.cjs +3 -3
  84. package/dist/components/ui/index.js +2 -2
  85. package/dist/index.cjs +7 -7
  86. package/dist/index.js +6 -6
  87. package/package.json +1 -1
  88. package/src/components/chat/chat-composer.tsx +21 -5
  89. package/src/components/chat/chat-input.tsx +15 -3
  90. package/src/components/chat/embeddable-chat.tsx +16 -2
  91. package/src/components/chat/types/component.types.ts +7 -0
  92. package/src/stories/EmbeddableChat.stories.tsx +21 -0
  93. package/dist/chunk-MNUR6PAJ.cjs.map +0 -1
  94. package/dist/chunk-OMTLCMQB.js.map +0 -1
  95. /package/dist/{chunk-QR3NUFA5.js.map → chunk-CRDKQMTP.js.map} +0 -0
  96. /package/dist/{chunk-77WMNQTE.js.map → chunk-CYPLD5F3.js.map} +0 -0
  97. /package/dist/{chunk-BPKEDLGR.js.map → chunk-DDW7G6U7.js.map} +0 -0
  98. /package/dist/{chunk-OLCI3UA5.js.map → chunk-EYCF3GGM.js.map} +0 -0
  99. /package/dist/{chunk-Z2MJPTIB.js.map → chunk-HQHZZ3SL.js.map} +0 -0
  100. /package/dist/{chunk-DNFC6RYF.js.map → chunk-ILAEMVAI.js.map} +0 -0
  101. /package/dist/{chunk-RT5JNTCN.js.map → chunk-JBRNIUYC.js.map} +0 -0
  102. /package/dist/{chunk-CQJXOBWK.js.map → chunk-NIVLGQKS.js.map} +0 -0
  103. /package/dist/{chunk-GDTFJ5QN.js.map → chunk-O5GV3WQO.js.map} +0 -0
  104. /package/dist/{chunk-RM4S53GB.js.map → chunk-R6NU4QFR.js.map} +0 -0
  105. /package/dist/{chunk-BKCPXDOE.js.map → chunk-SCRVQY42.js.map} +0 -0
  106. /package/dist/{chunk-MBLACUCE.js.map → chunk-V3B37LQY.js.map} +0 -0
  107. /package/dist/{chunk-JHAS6Y7P.js.map → chunk-VI35TSB2.js.map} +0 -0
  108. /package/dist/{chunk-YRMKUDOE.js.map → chunk-YVMSA7LR.js.map} +0 -0
  109. /package/dist/{chunk-O3GB7JFL.js.map → chunk-ZDGEJFDG.js.map} +0 -0
@@ -6006,6 +6006,7 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
6006
6006
  placeholder = "Enter your Request...",
6007
6007
  reserveAvatarOffset: _reserveAvatarOffset,
6008
6008
  disabled = false,
6009
+ disabledPlaceholder = "Connection lost. Waiting to reconnect...",
6009
6010
  autoFocus = false,
6010
6011
  fullWidth = false,
6011
6012
  allowEmptySend = false,
@@ -6350,7 +6351,21 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
6350
6351
  children: [
6351
6352
  startIcon && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-6 shrink-0 items-center", children: startIcon }),
6352
6353
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { className: "relative min-w-0 flex-1", children: [
6353
- isEmpty && !showPreview && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "pointer-events-none absolute left-0 top-0 select-none text-ods-text-secondary text-h4", children: disabled ? "Connection lost. Waiting to reconnect..." : placeholder }),
6354
+ isEmpty && !showPreview && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6355
+ "span",
6356
+ {
6357
+ className: _chunkX7CEWD6Vcjs.cn.call(void 0,
6358
+ // One line, clipped with an ellipsis (Figma 954:28455): the
6359
+ // disabled copy is a sentence, and the panel's narrowest
6360
+ // width does not fit it — wrapped, it ran under the row.
6361
+ "pointer-events-none absolute left-0 top-0 w-full select-none truncate text-h4",
6362
+ // Disabled reads as disabled (Figma 954:28455): the copy says
6363
+ // why, and the colour says it is not an invitation to type.
6364
+ disabled ? "text-ods-text-disabled" : "text-ods-text-secondary"
6365
+ ),
6366
+ children: disabled ? disabledPlaceholder : placeholder
6367
+ }
6368
+ ),
6354
6369
  showPreview && /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
6355
6370
  "p",
6356
6371
  {
@@ -6368,7 +6383,7 @@ var ChatInput = _react.forwardRef.call(void 0, (allProps, ref) => {
6368
6383
  "data-editor": true,
6369
6384
  role: "textbox",
6370
6385
  "aria-multiline": "true",
6371
- "aria-label": typeof placeholder === "string" ? placeholder : "Message",
6386
+ "aria-label": disabled ? disabledPlaceholder : typeof placeholder === "string" ? placeholder : "Message",
6372
6387
  contentEditable: !disabled,
6373
6388
  suppressContentEditableWarning: true,
6374
6389
  spellCheck: true,
@@ -11307,6 +11322,7 @@ ModelDisplaySkeleton.displayName = "ModelDisplaySkeleton";
11307
11322
 
11308
11323
  function ChatComposer({
11309
11324
  archived = false,
11325
+ lock = null,
11310
11326
  inputRef,
11311
11327
  onSend,
11312
11328
  onStop,
@@ -11334,6 +11350,7 @@ function ChatComposer({
11334
11350
  previewText
11335
11351
  }) {
11336
11352
  const contextEnabled = !!contextPicker && !archived;
11353
+ const locked = lock != null;
11337
11354
  const selected = _nullishCoalesce(selectedContextItems, () => ( []));
11338
11355
  const memory = _nullishCoalesce(contextMemoryItems, () => ( []));
11339
11356
  const entityTypes = _optionalChain([contextPicker, 'optionalAccess', _207 => _207.entityTypes]);
@@ -11351,11 +11368,13 @@ function ChatComposer({
11351
11368
  onStop,
11352
11369
  sending,
11353
11370
  placeholder,
11371
+ disabled: locked,
11372
+ disabledPlaceholder: _optionalChain([lock, 'optionalAccess', _208 => _208.placeholder]),
11354
11373
  previewText,
11355
11374
  fullWidth: true,
11356
11375
  className: "px-0",
11357
11376
  reserveAvatarOffset: false,
11358
- autoFocus,
11377
+ autoFocus: locked ? false : autoFocus,
11359
11378
  slashCommands,
11360
11379
  onMentionQueryChange: contextEnabled ? onMentionQueryChange : void 0,
11361
11380
  onValueChange: contextEnabled ? onValueChange : void 0,
@@ -11363,17 +11382,17 @@ function ChatComposer({
11363
11382
  startIcon: contextEnabled ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
11364
11383
  ChatComposerPlusMenu,
11365
11384
  {
11366
- onToggle: () => contextPickerOpen ? _optionalChain([onCloseContextPicker, 'optionalCall', _208 => _208()]) : _optionalChain([onOpenContextPicker, 'optionalCall', _209 => _209()]),
11385
+ onToggle: () => contextPickerOpen ? _optionalChain([onCloseContextPicker, 'optionalCall', _209 => _209()]) : _optionalChain([onOpenContextPicker, 'optionalCall', _210 => _210()]),
11367
11386
  open: contextPickerOpen,
11368
- disabled: attachmentsDisabled,
11387
+ disabled: attachmentsDisabled || locked,
11369
11388
  dropdown: contextPicker ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
11370
11389
  ChatContextPicker,
11371
11390
  {
11372
11391
  open: contextPickerOpen,
11373
11392
  config: contextPicker,
11374
11393
  selectedItems: selected,
11375
- onToggleItem: (item) => _optionalChain([onToggleContextItem, 'optionalCall', _210 => _210(item)]),
11376
- onClose: () => _optionalChain([onCloseContextPicker, 'optionalCall', _211 => _211()]),
11394
+ onToggleItem: (item) => _optionalChain([onToggleContextItem, 'optionalCall', _211 => _211(item)]),
11395
+ onClose: () => _optionalChain([onCloseContextPicker, 'optionalCall', _212 => _212()]),
11377
11396
  mentionQuery
11378
11397
  }
11379
11398
  ) : void 0
@@ -11411,7 +11430,7 @@ function ChatComposer({
11411
11430
  items: memory,
11412
11431
  onRemove: onRemoveContextMemoryItem,
11413
11432
  resolveIcon: resolveContextIcon,
11414
- disabled: sending,
11433
+ disabled: sending || locked,
11415
11434
  className: "rounded-t-md"
11416
11435
  }
11417
11436
  ),
@@ -11421,7 +11440,7 @@ function ChatComposer({
11421
11440
  items: selected,
11422
11441
  onRemove: onRemoveContextItem,
11423
11442
  resolveIcon: resolveContextIcon,
11424
- disabled: sending,
11443
+ disabled: sending || locked,
11425
11444
  className: _chunkX7CEWD6Vcjs.cn.call(void 0,
11426
11445
  "border-b border-ods-border bg-ods-bg p-2",
11427
11446
  // Only the TOP strip rounds into the card corner.
@@ -11439,7 +11458,7 @@ function ChatComposer({
11439
11458
  attachmentsEnabled: true,
11440
11459
  attachmentsCount,
11441
11460
  onAddFiles,
11442
- disabled: attachmentsDisabled
11461
+ disabled: attachmentsDisabled || locked
11443
11462
  }
11444
11463
  ),
11445
11464
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "div", { className: "min-w-0 flex-1", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ModelDisplay, { ...model }) })
@@ -11564,8 +11583,8 @@ ChatSidebarSkeleton.displayName = "ChatSidebarSkeleton";
11564
11583
  var DialogListItem = _react.forwardRef.call(void 0,
11565
11584
  ({ className, dialog, isActive, onDialogSelect, onClick, ...props }, ref) => {
11566
11585
  const handleClick = (e) => {
11567
- _optionalChain([onDialogSelect, 'optionalCall', _212 => _212(dialog.id)]);
11568
- _optionalChain([onClick, 'optionalCall', _213 => _213(e)]);
11586
+ _optionalChain([onDialogSelect, 'optionalCall', _213 => _213(dialog.id)]);
11587
+ _optionalChain([onClick, 'optionalCall', _214 => _214(e)]);
11569
11588
  };
11570
11589
  const formatTimestamp = (timestamp) => {
11571
11590
  return _chunkODB2AEUWcjs.formatDateWithTimezone.call(void 0, timestamp, _chunkODB2AEUWcjs.VIEWER_TIMEZONE, "numericDateTime24h");
@@ -11638,7 +11657,7 @@ var ChatSidebar = _react.forwardRef.call(void 0,
11638
11657
  (entries) => {
11639
11658
  const [entry] = entries;
11640
11659
  if (entry.isIntersecting && !isFetchingRef.current) {
11641
- _optionalChain([onLoadMoreRef, 'access', _214 => _214.current, 'optionalCall', _215 => _215()]);
11660
+ _optionalChain([onLoadMoreRef, 'access', _215 => _215.current, 'optionalCall', _216 => _216()]);
11642
11661
  }
11643
11662
  },
11644
11663
  { root: scrollContainer, rootMargin: "100px", threshold: 0.1 }
@@ -11766,7 +11785,7 @@ function isForeignOriginHref(href) {
11766
11785
  function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
11767
11786
  const isNewTab = runtime ? _chunkODB2AEUWcjs.computeIsNewTab.call(void 0, runtime, href, _nullishCoalesce(targetPlatform, () => ( null))) : false;
11768
11787
  if (isNewTab) {
11769
- if (_optionalChain([runtime, 'optionalAccess', _216 => _216.navigation, 'access', _217 => _217.openExternal])) runtime.navigation.openExternal(href);
11788
+ if (_optionalChain([runtime, 'optionalAccess', _217 => _217.navigation, 'access', _218 => _218.openExternal])) runtime.navigation.openExternal(href);
11770
11789
  else window.open(href, "_blank", NEW_TAB_FEATURES);
11771
11790
  return;
11772
11791
  }
@@ -11774,7 +11793,7 @@ function runNavigation(runtime, href, path, targetPlatform, fallbackNavigate) {
11774
11793
  if (target.includes("#") && _chunkTLLJIGTPcjs.navigateSamePageHash.call(void 0, target, { headerOffset: _chunkTLLJIGTPcjs.STICKY_HEADER_OFFSET_PX })) {
11775
11794
  return;
11776
11795
  }
11777
- const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _218 => _218.navigation, 'access', _219 => _219.navigate, 'optionalCall', _220 => _220({ href, path, targetPlatform })]), () => ( false));
11796
+ const handled = _nullishCoalesce(_optionalChain([runtime, 'optionalAccess', _219 => _219.navigation, 'access', _220 => _220.navigate, 'optionalCall', _221 => _221({ href, path, targetPlatform })]), () => ( false));
11778
11797
  if (!handled) {
11779
11798
  if (fallbackNavigate) fallbackNavigate(target);
11780
11799
  else window.location.assign(target);
@@ -11833,7 +11852,7 @@ function NavLinkAnchorViaRuntime({
11833
11852
  targetPlatform,
11834
11853
  fallbackNavigate: router.push
11835
11854
  });
11836
- if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess', _221 => _221.closeChat])) panel.closeChat();
11855
+ if (handled && !isNewTab && _optionalChain([panel, 'optionalAccess', _222 => _222.closeChat])) panel.closeChat();
11837
11856
  };
11838
11857
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "a", { href: resolvedHref, ..._chunkODB2AEUWcjs.newTabAnchorAttrs.call(void 0, isNewTab), onClick, className, children });
11839
11858
  }
@@ -11960,11 +11979,11 @@ var DEFAULT_CAPTIONS_PATH = "/api/captions";
11960
11979
  function getCaptionsUrl(entityType, entityId, srtContent, options) {
11961
11980
  if (!srtContent) return void 0;
11962
11981
  const hash = `${srtContent.length}-${srtContent.slice(0, 8).replace(/\s/g, "")}`;
11963
- const variant = _optionalChain([options, 'optionalAccess', _222 => _222.variant]) ? `&variant=${options.variant}` : "";
11982
+ const variant = _optionalChain([options, 'optionalAccess', _223 => _223.variant]) ? `&variant=${options.variant}` : "";
11964
11983
  return `${DEFAULT_CAPTIONS_PATH}/${entityType}/${entityId}?v=${hash}${variant}`;
11965
11984
  }
11966
11985
  function resolveCaptionsBase(endpoints) {
11967
- return _optionalChain([endpoints, 'optionalAccess', _223 => _223.captionsUrlPrefix]) || DEFAULT_CAPTIONS_PATH;
11986
+ return _optionalChain([endpoints, 'optionalAccess', _224 => _224.captionsUrlPrefix]) || DEFAULT_CAPTIONS_PATH;
11968
11987
  }
11969
11988
  function rebaseCaptionsUrl(endpoints, url) {
11970
11989
  if (!url || !url.startsWith(`${DEFAULT_CAPTIONS_PATH}/`)) return url;
@@ -12074,7 +12093,7 @@ TabsContent.displayName = TabsPrimitive.Content.displayName;
12074
12093
  // src/components/features/use-captions.ts
12075
12094
 
12076
12095
  function useCaptions() {
12077
- const endpoints = _nullishCoalesce(_optionalChain([_chunkU2YLMFJKcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _224 => _224.endpoints]), () => ( null));
12096
+ const endpoints = _nullishCoalesce(_optionalChain([_chunkU2YLMFJKcjs.useChatRuntime.call(void 0, ), 'optionalAccess', _225 => _225.endpoints]), () => ( null));
12078
12097
  return _react.useMemo.call(void 0,
12079
12098
  () => ({
12080
12099
  forEntity: (entityType, entity) => getEntityCaptionUrls(endpoints, entityType, entity),
@@ -12103,11 +12122,11 @@ function fetchPriorityProp(priority) {
12103
12122
  var ENTER_FULLSCREEN_REQUEST = "mediaenterfullscreenrequest";
12104
12123
  function isIosAppShell() {
12105
12124
  const capacitor = globalThis.Capacitor;
12106
- return _optionalChain([capacitor, 'optionalAccess', _225 => _225.isNativePlatform, 'optionalCall', _226 => _226()]) === true && _optionalChain([capacitor, 'access', _227 => _227.getPlatform, 'optionalCall', _228 => _228()]) === "ios";
12125
+ return _optionalChain([capacitor, 'optionalAccess', _226 => _226.isNativePlatform, 'optionalCall', _227 => _227()]) === true && _optionalChain([capacitor, 'access', _228 => _228.getPlatform, 'optionalCall', _229 => _229()]) === "ios";
12107
12126
  }
12108
12127
  function nativeVideoElement(player) {
12109
12128
  const media = player.media;
12110
- const element = _nullishCoalesce(_optionalChain([media, 'optionalAccess', _229 => _229.nativeEl]), () => ( media));
12129
+ const element = _nullishCoalesce(_optionalChain([media, 'optionalAccess', _230 => _230.nativeEl]), () => ( media));
12111
12130
  return element instanceof HTMLVideoElement ? element : null;
12112
12131
  }
12113
12132
  function useIosNativeVideoFullscreen(playerRef) {
@@ -12117,7 +12136,7 @@ function useIosNativeVideoFullscreen(playerRef) {
12117
12136
  if (!(player instanceof EventTarget)) return void 0;
12118
12137
  const takeOver = (event) => {
12119
12138
  const video = nativeVideoElement(player);
12120
- if (!_optionalChain([video, 'optionalAccess', _230 => _230.webkitSupportsFullscreen]) || typeof video.webkitEnterFullscreen !== "function") return;
12139
+ if (!_optionalChain([video, 'optionalAccess', _231 => _231.webkitSupportsFullscreen]) || typeof video.webkitEnterFullscreen !== "function") return;
12121
12140
  event.stopImmediatePropagation();
12122
12141
  video.webkitEnterFullscreen();
12123
12142
  };
@@ -12151,11 +12170,11 @@ function toMuxPreviewUrl(url, maxResolution = "720p") {
12151
12170
  function saveDataEnabled() {
12152
12171
  if (typeof navigator === "undefined") return false;
12153
12172
  const conn = navigator.connection;
12154
- return _optionalChain([conn, 'optionalAccess', _231 => _231.saveData]) === true;
12173
+ return _optionalChain([conn, 'optionalAccess', _232 => _232.saveData]) === true;
12155
12174
  }
12156
12175
  function useVideoOriginPreconnect({ supabaseStorageOrigin } = {}) {
12157
12176
  const runtime = _chunkU2YLMFJKcjs.useChatRuntime.call(void 0, );
12158
- const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _232 => _232.endpoints, 'access', _233 => _233.supabaseStorageOrigin])));
12177
+ const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _233 => _233.endpoints, 'access', _234 => _234.supabaseStorageOrigin])));
12159
12178
  try {
12160
12179
  _reactdom2.default.preconnect(MUX_STREAM_ORIGIN, { crossOrigin: "anonymous" });
12161
12180
  _reactdom2.default.preconnect(MUX_IMAGE_ORIGIN, { crossOrigin: "anonymous" });
@@ -12174,7 +12193,7 @@ function useVideoWarmup({
12174
12193
  nearMargin = "1000px"
12175
12194
  } = {}) {
12176
12195
  const runtime = _chunkU2YLMFJKcjs.useChatRuntime.call(void 0, );
12177
- const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _234 => _234.endpoints, 'access', _235 => _235.supabaseStorageOrigin])));
12196
+ const resolvedOrigin = _nullishCoalesce(supabaseStorageOrigin, () => ( _optionalChain([runtime, 'optionalAccess', _235 => _235.endpoints, 'access', _236 => _236.supabaseStorageOrigin])));
12178
12197
  useVideoOriginPreconnect({ supabaseStorageOrigin: resolvedOrigin });
12179
12198
  const { ref, isNear } = _chunkTLLJIGTPcjs.useNearViewport.call(void 0, nearMargin);
12180
12199
  _react.useEffect.call(void 0, () => {
@@ -12276,7 +12295,7 @@ if (typeof document !== "undefined") {
12276
12295
  }
12277
12296
  if (typeof window !== "undefined") {
12278
12297
  const w = window;
12279
- if (!_optionalChain([w, 'access', _236 => _236.chrome, 'optionalAccess', _237 => _237.cast])) {
12298
+ if (!_optionalChain([w, 'access', _237 => _237.chrome, 'optionalAccess', _238 => _238.cast])) {
12280
12299
  w.chrome = { ..._nullishCoalesce(w.chrome, () => ( {})), cast: { isAvailable: false } };
12281
12300
  }
12282
12301
  }
@@ -12532,7 +12551,7 @@ function FilePlayer({
12532
12551
  const clearPerfListener = _react.useCallback.call(void 0, () => {
12533
12552
  if (perfListenerRef.current) {
12534
12553
  try {
12535
- _optionalChain([hoverPlayerRef, 'access', _238 => _238.current, 'optionalAccess', _239 => _239.removeEventListener, 'optionalCall', _240 => _240("playing", perfListenerRef.current)]);
12554
+ _optionalChain([hoverPlayerRef, 'access', _239 => _239.current, 'optionalAccess', _240 => _240.removeEventListener, 'optionalCall', _241 => _241("playing", perfListenerRef.current)]);
12536
12555
  } catch (e21) {
12537
12556
  }
12538
12557
  perfListenerRef.current = null;
@@ -12567,7 +12586,7 @@ function FilePlayer({
12567
12586
  };
12568
12587
  perfListenerRef.current = onPlaying;
12569
12588
  try {
12570
- _optionalChain([el, 'access', _241 => _241.addEventListener, 'optionalCall', _242 => _242("playing", onPlaying)]);
12589
+ _optionalChain([el, 'access', _242 => _242.addEventListener, 'optionalCall', _243 => _243("playing", onPlaying)]);
12571
12590
  } catch (e22) {
12572
12591
  }
12573
12592
  }
@@ -12575,12 +12594,12 @@ function FilePlayer({
12575
12594
  el.volume = 0.5;
12576
12595
  if (userHasInteracted) {
12577
12596
  el.muted = mutedIntentRef.current;
12578
- _optionalChain([el, 'access', _243 => _243.play, 'optionalCall', _244 => _244(), 'optionalAccess', _245 => _245.catch, 'optionalCall', _246 => _246((err) => {
12579
- const name = _optionalChain([err, 'optionalAccess', _247 => _247.name]);
12597
+ _optionalChain([el, 'access', _244 => _244.play, 'optionalCall', _245 => _245(), 'optionalAccess', _246 => _246.catch, 'optionalCall', _247 => _247((err) => {
12598
+ const name = _optionalChain([err, 'optionalAccess', _248 => _248.name]);
12580
12599
  if (name === "NotAllowedError" && hoverActiveRef.current && generation === hoverGenerationRef.current) {
12581
12600
  try {
12582
12601
  el.muted = true;
12583
- _optionalChain([el, 'access', _248 => _248.play, 'optionalCall', _249 => _249(), 'optionalAccess', _250 => _250.catch, 'optionalCall', _251 => _251(() => {
12602
+ _optionalChain([el, 'access', _249 => _249.play, 'optionalCall', _250 => _250(), 'optionalAccess', _251 => _251.catch, 'optionalCall', _252 => _252(() => {
12584
12603
  if (hoverActiveRef.current && generation === hoverGenerationRef.current) {
12585
12604
  setMutedFallbackBlocked(true);
12586
12605
  }
@@ -12592,7 +12611,7 @@ function FilePlayer({
12592
12611
  })]);
12593
12612
  } else {
12594
12613
  el.muted = true;
12595
- _optionalChain([el, 'access', _252 => _252.play, 'optionalCall', _253 => _253(), 'optionalAccess', _254 => _254.catch, 'optionalCall', _255 => _255(() => {
12614
+ _optionalChain([el, 'access', _253 => _253.play, 'optionalCall', _254 => _254(), 'optionalAccess', _255 => _255.catch, 'optionalCall', _256 => _256(() => {
12596
12615
  if (hoverActiveRef.current && generation === hoverGenerationRef.current) {
12597
12616
  setMutedFallbackBlocked(true);
12598
12617
  }
@@ -12622,7 +12641,7 @@ function FilePlayer({
12622
12641
  clearActivationWaiter();
12623
12642
  clearPerfListener();
12624
12643
  try {
12625
- _optionalChain([hoverPlayerRef, 'access', _256 => _256.current, 'optionalAccess', _257 => _257.pause, 'optionalCall', _258 => _258()]);
12644
+ _optionalChain([hoverPlayerRef, 'access', _257 => _257.current, 'optionalAccess', _258 => _258.pause, 'optionalCall', _259 => _259()]);
12626
12645
  } catch (e26) {
12627
12646
  }
12628
12647
  }, [clearActivationWaiter, clearPerfListener]);
@@ -12634,7 +12653,7 @@ function FilePlayer({
12634
12653
  if (el) {
12635
12654
  el.muted = false;
12636
12655
  el.volume = 0.5;
12637
- _optionalChain([el, 'access', _259 => _259.play, 'optionalCall', _260 => _260(), 'optionalAccess', _261 => _261.catch, 'optionalCall', _262 => _262(() => {
12656
+ _optionalChain([el, 'access', _260 => _260.play, 'optionalCall', _261 => _261(), 'optionalAccess', _262 => _262.catch, 'optionalCall', _263 => _263(() => {
12638
12657
  })]);
12639
12658
  }
12640
12659
  } catch (e27) {
@@ -12654,7 +12673,7 @@ function FilePlayer({
12654
12673
  onMutedFallbackChangeRef.current = onMutedFallbackChange;
12655
12674
  });
12656
12675
  _react.useEffect.call(void 0, () => {
12657
- _optionalChain([onMutedFallbackChangeRef, 'access', _263 => _263.current, 'optionalCall', _264 => _264({
12676
+ _optionalChain([onMutedFallbackChangeRef, 'access', _264 => _264.current, 'optionalCall', _265 => _265({
12658
12677
  muted: hoverMutedFallback,
12659
12678
  blocked: hoverMutedFallback && mutedFallbackBlocked
12660
12679
  })]);
@@ -12673,7 +12692,7 @@ function FilePlayer({
12673
12692
  if (autoPlay) {
12674
12693
  const reportBlocked = () => setMutedFallbackBlocked(true);
12675
12694
  try {
12676
- _optionalChain([mutedEl, 'access', _265 => _265.play, 'optionalCall', _266 => _266(), 'optionalAccess', _267 => _267.catch, 'optionalCall', _268 => _268(reportBlocked)]);
12695
+ _optionalChain([mutedEl, 'access', _266 => _266.play, 'optionalCall', _267 => _267(), 'optionalAccess', _268 => _268.catch, 'optionalCall', _269 => _269(reportBlocked)]);
12677
12696
  } catch (e29) {
12678
12697
  reportBlocked();
12679
12698
  }
@@ -12687,12 +12706,12 @@ function FilePlayer({
12687
12706
  try {
12688
12707
  el.muted = false;
12689
12708
  el.volume = typeof el.volume === "number" ? el.volume : 1;
12690
- _optionalChain([el, 'access', _269 => _269.play, 'optionalCall', _270 => _270(), 'optionalAccess', _271 => _271.catch, 'optionalCall', _272 => _272((err) => {
12691
- const name = _optionalChain([err, 'optionalAccess', _273 => _273.name]);
12709
+ _optionalChain([el, 'access', _270 => _270.play, 'optionalCall', _271 => _271(), 'optionalAccess', _272 => _272.catch, 'optionalCall', _273 => _273((err) => {
12710
+ const name = _optionalChain([err, 'optionalAccess', _274 => _274.name]);
12692
12711
  if (name !== "NotAllowedError") return;
12693
12712
  try {
12694
12713
  el.muted = true;
12695
- _optionalChain([el, 'access', _274 => _274.play, 'optionalCall', _275 => _275(), 'optionalAccess', _276 => _276.catch, 'optionalCall', _277 => _277(() => {
12714
+ _optionalChain([el, 'access', _275 => _275.play, 'optionalCall', _276 => _276(), 'optionalAccess', _277 => _277.catch, 'optionalCall', _278 => _278(() => {
12696
12715
  setMutedFallbackBlocked(true);
12697
12716
  setHoverMutedFallback(true);
12698
12717
  })]);
@@ -12708,7 +12727,7 @@ function FilePlayer({
12708
12727
  }, [autoPlayUnmuted, startMuted, autoPlay]);
12709
12728
  _react.useEffect.call(void 0, () => {
12710
12729
  const el = hoverPlayerRef.current;
12711
- if (!_optionalChain([el, 'optionalAccess', _278 => _278.addEventListener])) return void 0;
12730
+ if (!_optionalChain([el, 'optionalAccess', _279 => _279.addEventListener])) return void 0;
12712
12731
  const onVolumeChange = () => {
12713
12732
  if (el.muted === false) {
12714
12733
  setMutedFallbackBlocked(false);
@@ -12721,14 +12740,14 @@ function FilePlayer({
12721
12740
  }
12722
12741
  return () => {
12723
12742
  try {
12724
- _optionalChain([el, 'access', _279 => _279.removeEventListener, 'optionalCall', _280 => _280("volumechange", onVolumeChange)]);
12743
+ _optionalChain([el, 'access', _280 => _280.removeEventListener, 'optionalCall', _281 => _281("volumechange", onVolumeChange)]);
12725
12744
  } catch (e33) {
12726
12745
  }
12727
12746
  };
12728
12747
  }, []);
12729
12748
  _react.useEffect.call(void 0, () => {
12730
12749
  const el = hoverPlayerRef.current;
12731
- if (!_optionalChain([el, 'optionalAccess', _281 => _281.addEventListener])) return void 0;
12750
+ if (!_optionalChain([el, 'optionalAccess', _282 => _282.addEventListener])) return void 0;
12732
12751
  const onPlaying = () => setMutedFallbackBlocked(false);
12733
12752
  try {
12734
12753
  el.addEventListener("playing", onPlaying);
@@ -12736,7 +12755,7 @@ function FilePlayer({
12736
12755
  }
12737
12756
  return () => {
12738
12757
  try {
12739
- _optionalChain([el, 'access', _282 => _282.removeEventListener, 'optionalCall', _283 => _283("playing", onPlaying)]);
12758
+ _optionalChain([el, 'access', _283 => _283.removeEventListener, 'optionalCall', _284 => _284("playing", onPlaying)]);
12740
12759
  } catch (e35) {
12741
12760
  }
12742
12761
  };
@@ -12747,15 +12766,15 @@ function FilePlayer({
12747
12766
  });
12748
12767
  _react.useEffect.call(void 0, () => {
12749
12768
  const el = hoverPlayerRef.current;
12750
- if (!_optionalChain([el, 'optionalAccess', _284 => _284.addEventListener])) return void 0;
12751
- const handler = () => _optionalChain([onEndedRef, 'access', _285 => _285.current, 'optionalCall', _286 => _286()]);
12769
+ if (!_optionalChain([el, 'optionalAccess', _285 => _285.addEventListener])) return void 0;
12770
+ const handler = () => _optionalChain([onEndedRef, 'access', _286 => _286.current, 'optionalCall', _287 => _287()]);
12752
12771
  try {
12753
12772
  el.addEventListener("ended", handler);
12754
12773
  } catch (e36) {
12755
12774
  }
12756
12775
  return () => {
12757
12776
  try {
12758
- _optionalChain([el, 'access', _287 => _287.removeEventListener, 'optionalCall', _288 => _288("ended", handler)]);
12777
+ _optionalChain([el, 'access', _288 => _288.removeEventListener, 'optionalCall', _289 => _289("ended", handler)]);
12759
12778
  } catch (e37) {
12760
12779
  }
12761
12780
  };
@@ -12764,19 +12783,19 @@ function FilePlayer({
12764
12783
  _react.useImperativeHandle.call(void 0,
12765
12784
  playerHandleRef,
12766
12785
  () => ({
12767
- getCurrentTime: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _289 => _289.current, 'optionalAccess', _290 => _290.currentTime]), () => ( 0)),
12786
+ getCurrentTime: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _290 => _290.current, 'optionalAccess', _291 => _291.currentTime]), () => ( 0)),
12768
12787
  getDuration: () => {
12769
- const d = _optionalChain([hoverPlayerRef, 'access', _291 => _291.current, 'optionalAccess', _292 => _292.duration]);
12788
+ const d = _optionalChain([hoverPlayerRef, 'access', _292 => _292.current, 'optionalAccess', _293 => _293.duration]);
12770
12789
  return typeof d === "number" && isFinite(d) ? d : 0;
12771
12790
  },
12772
- getPaused: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _293 => _293.current, 'optionalAccess', _294 => _294.paused]), () => ( true)),
12773
- getMuted: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _295 => _295.current, 'optionalAccess', _296 => _296.muted]), () => ( false)),
12791
+ getPaused: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _294 => _294.current, 'optionalAccess', _295 => _295.paused]), () => ( true)),
12792
+ getMuted: () => _nullishCoalesce(_optionalChain([hoverPlayerRef, 'access', _296 => _296.current, 'optionalAccess', _297 => _297.muted]), () => ( false)),
12774
12793
  play: async () => {
12775
- await _optionalChain([hoverPlayerRef, 'access', _297 => _297.current, 'optionalAccess', _298 => _298.play, 'optionalCall', _299 => _299()]);
12794
+ await _optionalChain([hoverPlayerRef, 'access', _298 => _298.current, 'optionalAccess', _299 => _299.play, 'optionalCall', _300 => _300()]);
12776
12795
  },
12777
12796
  pause: () => {
12778
12797
  try {
12779
- _optionalChain([hoverPlayerRef, 'access', _300 => _300.current, 'optionalAccess', _301 => _301.pause, 'optionalCall', _302 => _302()]);
12798
+ _optionalChain([hoverPlayerRef, 'access', _301 => _301.current, 'optionalAccess', _302 => _302.pause, 'optionalCall', _303 => _303()]);
12780
12799
  } catch (e38) {
12781
12800
  }
12782
12801
  },
@@ -12843,10 +12862,10 @@ function FilePlayer({
12843
12862
  if (!el) return;
12844
12863
  const resumeAt = typeof el.currentTime === "number" ? el.currentTime : 0;
12845
12864
  try {
12846
- _optionalChain([el, 'access', _303 => _303.load, 'optionalCall', _304 => _304()]);
12865
+ _optionalChain([el, 'access', _304 => _304.load, 'optionalCall', _305 => _305()]);
12847
12866
  if (resumeAt > 0 && el.addEventListener && el.removeEventListener) {
12848
12867
  const seekBack = () => {
12849
- _optionalChain([el, 'access', _305 => _305.removeEventListener, 'optionalCall', _306 => _306("loadedmetadata", seekBack)]);
12868
+ _optionalChain([el, 'access', _306 => _306.removeEventListener, 'optionalCall', _307 => _307("loadedmetadata", seekBack)]);
12850
12869
  try {
12851
12870
  el.currentTime = resumeAt;
12852
12871
  } catch (e40) {
@@ -12854,7 +12873,7 @@ function FilePlayer({
12854
12873
  };
12855
12874
  el.addEventListener("loadedmetadata", seekBack);
12856
12875
  }
12857
- _optionalChain([el, 'access', _307 => _307.play, 'optionalCall', _308 => _308(), 'optionalAccess', _309 => _309.catch, 'optionalCall', _310 => _310(() => {
12876
+ _optionalChain([el, 'access', _308 => _308.play, 'optionalCall', _309 => _309(), 'optionalAccess', _310 => _310.catch, 'optionalCall', _311 => _311(() => {
12858
12877
  })]);
12859
12878
  } catch (e41) {
12860
12879
  }
@@ -13013,7 +13032,7 @@ function YouTubeFacadeInner({
13013
13032
  const iframe = iframeRef.current;
13014
13033
  if (!iframe) return void 0;
13015
13034
  function subscribe2() {
13016
- _optionalChain([iframe, 'optionalAccess', _311 => _311.contentWindow, 'optionalAccess', _312 => _312.postMessage, 'call', _313 => _313('{"event":"listening"}', YT_NOCOOKIE_ORIGIN)]);
13035
+ _optionalChain([iframe, 'optionalAccess', _312 => _312.contentWindow, 'optionalAccess', _313 => _313.postMessage, 'call', _314 => _314('{"event":"listening"}', YT_NOCOOKIE_ORIGIN)]);
13017
13036
  }
13018
13037
  iframe.addEventListener("load", subscribe2);
13019
13038
  subscribe2();
@@ -13034,13 +13053,13 @@ function YouTubeFacadeInner({
13034
13053
  return;
13035
13054
  }
13036
13055
  if (payload.event !== "infoDelivery") return;
13037
- const state = _optionalChain([payload, 'access', _314 => _314.info, 'optionalAccess', _315 => _315.playerState]);
13056
+ const state = _optionalChain([payload, 'access', _315 => _315.info, 'optionalAccess', _316 => _316.playerState]);
13038
13057
  if (typeof state !== "number") return;
13039
13058
  if (state === YT_STATE_PLAYING) {
13040
13059
  if (blurTimer !== null) return;
13041
13060
  blurTimer = setTimeout(() => {
13042
13061
  blurTimer = null;
13043
- _optionalChain([iframeRef, 'access', _316 => _316.current, 'optionalAccess', _317 => _317.blur, 'call', _318 => _318()]);
13062
+ _optionalChain([iframeRef, 'access', _317 => _317.current, 'optionalAccess', _318 => _318.blur, 'call', _319 => _319()]);
13044
13063
  }, YT_PLAYING_BLUR_DELAY_MS);
13045
13064
  return;
13046
13065
  }
@@ -13061,7 +13080,7 @@ function YouTubeFacadeInner({
13061
13080
  prevSuspendedRef.current = Boolean(suspended);
13062
13081
  if (!activated) return;
13063
13082
  if (suspended && !wasSuspended) {
13064
- _optionalChain([iframeRef, 'access', _319 => _319.current, 'optionalAccess', _320 => _320.contentWindow, 'optionalAccess', _321 => _321.postMessage, 'call', _322 => _322(
13083
+ _optionalChain([iframeRef, 'access', _320 => _320.current, 'optionalAccess', _321 => _321.contentWindow, 'optionalAccess', _322 => _322.postMessage, 'call', _323 => _323(
13065
13084
  '{"event":"command","func":"pauseVideo","args":[]}',
13066
13085
  YT_NOCOOKIE_ORIGIN
13067
13086
  )]);
@@ -13315,7 +13334,7 @@ function CardsStrip(props) {
13315
13334
  _react.useEffect.call(void 0, () => {
13316
13335
  const el = wrapperRef.current;
13317
13336
  if (!el || typeof IntersectionObserver === "undefined") return void 0;
13318
- const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access', _323 => _323[0], 'optionalAccess', _324 => _324.isIntersecting]), () => ( true))), {
13337
+ const io = new IntersectionObserver((entries) => setNearViewport(_nullishCoalesce(_optionalChain([entries, 'access', _324 => _324[0], 'optionalAccess', _325 => _325.isIntersecting]), () => ( true))), {
13319
13338
  rootMargin: "200px"
13320
13339
  });
13321
13340
  io.observe(el);
@@ -13337,9 +13356,9 @@ function CardsStrip(props) {
13337
13356
  const p = hoverPointerRef.current;
13338
13357
  if (!p.inside) return;
13339
13358
  const el = typeof document !== "undefined" ? document.elementFromPoint(p.x, p.y) : null;
13340
- const cardEl = _optionalChain([el, 'optionalAccess', _325 => _325.closest, 'optionalCall', _326 => _326("[data-strip-card-key]")]);
13341
- const scoped = cardEl && _optionalChain([scrollerRef, 'access', _327 => _327.current, 'optionalAccess', _328 => _328.contains, 'call', _329 => _329(cardEl)]) ? cardEl : null;
13342
- const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess', _330 => _330.getAttribute, 'call', _331 => _331("data-strip-card-key")]), () => ( null));
13359
+ const cardEl = _optionalChain([el, 'optionalAccess', _326 => _326.closest, 'optionalCall', _327 => _327("[data-strip-card-key]")]);
13360
+ const scoped = cardEl && _optionalChain([scrollerRef, 'access', _328 => _328.current, 'optionalAccess', _329 => _329.contains, 'call', _330 => _330(cardEl)]) ? cardEl : null;
13361
+ const key = _nullishCoalesce(_optionalChain([scoped, 'optionalAccess', _331 => _331.getAttribute, 'call', _332 => _332("data-strip-card-key")]), () => ( null));
13343
13362
  const current = activeKeyRef.current;
13344
13363
  if (key === current) return;
13345
13364
  if (current !== null) deactivate(current);
@@ -13377,7 +13396,7 @@ function CardsStrip(props) {
13377
13396
  }, [syncHoverToPointer]);
13378
13397
  const seamBuffer = _react.useCallback.call(void 0, () => {
13379
13398
  const half = singleCopyWidthRef.current;
13380
- const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access', _332 => _332.current, 'optionalAccess', _333 => _333.clientWidth]), () => ( 0));
13399
+ const viewport = _nullishCoalesce(_optionalChain([scrollerRef, 'access', _333 => _333.current, 'optionalAccess', _334 => _334.clientWidth]), () => ( 0));
13381
13400
  return Math.max(0, Math.min(200, half / 4, half - viewport - TRACK_GAP_PX - 1));
13382
13401
  }, []);
13383
13402
  const { posRef: marqueePosRef, glideBy } = _chunkTLLJIGTPcjs.useMarqueeEngine.call(void 0, {
@@ -13393,7 +13412,7 @@ function CardsStrip(props) {
13393
13412
  const scroller = scrollerRef.current;
13394
13413
  if (scroller) scroller.scrollLeft = pos;
13395
13414
  },
13396
- readBack: () => _nullishCoalesce(_optionalChain([scrollerRef, 'access', _334 => _334.current, 'optionalAccess', _335 => _335.scrollLeft]), () => ( 0)),
13415
+ readBack: () => _nullishCoalesce(_optionalChain([scrollerRef, 'access', _335 => _335.current, 'optionalAccess', _336 => _336.scrollLeft]), () => ( 0)),
13397
13416
  onAfterFrame: syncHoverIfScrolled
13398
13417
  });
13399
13418
  const [mountedIdx, setMountedIdx] = _react.useState.call(void 0, () => /* @__PURE__ */ new Set());
@@ -13441,11 +13460,11 @@ function CardsStrip(props) {
13441
13460
  fn = (el) => {
13442
13461
  if (!el) return void 0;
13443
13462
  cardElIdxRef.current.set(el, idx);
13444
- _optionalChain([cardObserverRef, 'access', _336 => _336.current, 'optionalAccess', _337 => _337.observe, 'call', _338 => _338(el)]);
13463
+ _optionalChain([cardObserverRef, 'access', _337 => _337.current, 'optionalAccess', _338 => _338.observe, 'call', _339 => _339(el)]);
13445
13464
  return () => {
13446
13465
  cardElIdxRef.current.delete(el);
13447
13466
  cardElNearRef.current.delete(el);
13448
- _optionalChain([cardObserverRef, 'access', _339 => _339.current, 'optionalAccess', _340 => _340.unobserve, 'call', _341 => _341(el)]);
13467
+ _optionalChain([cardObserverRef, 'access', _340 => _340.current, 'optionalAccess', _341 => _341.unobserve, 'call', _342 => _342(el)]);
13449
13468
  };
13450
13469
  };
13451
13470
  cardRefFns.set(idx, fn);
@@ -13464,7 +13483,7 @@ function CardsStrip(props) {
13464
13483
  const track = trackRef.current;
13465
13484
  if (!scroller || !track) return;
13466
13485
  const firstCard = track.firstElementChild;
13467
- const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess', _342 => _342.offsetWidth]), () => ( 320))) + TRACK_GAP_PX;
13486
+ const step = (_nullishCoalesce(_optionalChain([firstCard, 'optionalAccess', _343 => _343.offsetWidth]), () => ( 320))) + TRACK_GAP_PX;
13468
13487
  chevronSuppressUntilRef.current = performance.now() + CHEVRON_SUPPRESS_MS;
13469
13488
  if (marqueeActiveRef.current) {
13470
13489
  glideBy(dir * step);
@@ -13521,7 +13540,7 @@ function CardsStrip(props) {
13521
13540
  {
13522
13541
  ref: (node) => {
13523
13542
  wrapperRef.current = node;
13524
- _optionalChain([rootRef, 'optionalCall', _343 => _343(node)]);
13543
+ _optionalChain([rootRef, 'optionalCall', _344 => _344(node)]);
13525
13544
  },
13526
13545
  className: _chunkX7CEWD6Vcjs.cn.call(void 0, "flex w-full min-w-0 flex-col gap-6", className),
13527
13546
  children: [
@@ -13633,7 +13652,7 @@ function VideoHoverPreviewSurface({
13633
13652
  if (gateControlled) return void 0;
13634
13653
  const el = rootElRef.current;
13635
13654
  if (!el || typeof IntersectionObserver === "undefined") return void 0;
13636
- const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access', _344 => _344[0], 'optionalAccess', _345 => _345.isIntersecting]), () => ( false))), {
13655
+ const io = new IntersectionObserver((entries) => setIsNear(_nullishCoalesce(_optionalChain([entries, 'access', _345 => _345[0], 'optionalAccess', _346 => _346.isIntersecting]), () => ( false))), {
13637
13656
  rootMargin: _chunkTLLJIGTPcjs.NEAR_VIEWPORT_ROOT_MARGIN
13638
13657
  });
13639
13658
  io.observe(el);
@@ -13778,7 +13797,7 @@ function VideoBitesStrip({
13778
13797
  const filtered = filterPublished ? bites.filter((b) => b.published) : [...bites];
13779
13798
  return filtered.sort(sortComparator);
13780
13799
  }, [bites, filterPublished, sortComparator]);
13781
- const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access', _346 => _346[0], 'optionalAccess', _347 => _347.url]) || null });
13800
+ const warmup = useVideoWarmup({ videoUrl: _optionalChain([items, 'access', _347 => _347[0], 'optionalAccess', _348 => _348.url]) || null });
13782
13801
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
13783
13802
  CardsStrip,
13784
13803
  {
@@ -13845,8 +13864,8 @@ function VideoBiteCard({
13845
13864
  const controlled = active !== void 0;
13846
13865
  const [selfActive, setSelfActive] = _react.useState.call(void 0, false);
13847
13866
  const isActive = controlled ? !!active : selfActive;
13848
- const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall', _348 => _348(key)]) : setSelfActive(true);
13849
- const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall', _349 => _349(key)]) : setSelfActive(false);
13867
+ const activate = () => controlled ? _optionalChain([onActivate, 'optionalCall', _349 => _349(key)]) : setSelfActive(true);
13868
+ const deactivate = () => controlled ? _optionalChain([onDeactivate, 'optionalCall', _350 => _350(key)]) : setSelfActive(false);
13850
13869
  const titleInputRef = _react.useRef.call(void 0, null);
13851
13870
  _chunkTLLJIGTPcjs.useIsomorphicLayoutEffect.call(void 0, () => {
13852
13871
  const el = titleInputRef.current;
@@ -13856,7 +13875,7 @@ function VideoBiteCard({
13856
13875
  });
13857
13876
  const navigate = () => {
13858
13877
  if (bite.onNavigate) bite.onNavigate();
13859
- else _optionalChain([onBiteNavigate, 'optionalCall', _350 => _350(bite, index)]);
13878
+ else _optionalChain([onBiteNavigate, 'optionalCall', _351 => _351(bite, index)]);
13860
13879
  };
13861
13880
  const handlePointerEnter = () => {
13862
13881
  if (!isTouch) activate();
@@ -13881,9 +13900,9 @@ function VideoBiteCard({
13881
13900
  placeholder: "Title (optional)",
13882
13901
  "aria-label": "Bite title",
13883
13902
  rows: 1,
13884
- onChange: (e) => _optionalChain([onTitleChange, 'optionalCall', _351 => _351(e.target.value)]),
13903
+ onChange: (e) => _optionalChain([onTitleChange, 'optionalCall', _352 => _352(e.target.value)]),
13885
13904
  ref: titleInputRef,
13886
- onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall', _352 => _352(e.target.value)]),
13905
+ onBlur: (e) => _optionalChain([onTitleCommit, 'optionalCall', _353 => _353(e.target.value)]),
13887
13906
  onClick: (e) => e.stopPropagation(),
13888
13907
  className: _chunkX7CEWD6Vcjs.cn.call(void 0,
13889
13908
  titleClass,
@@ -13960,7 +13979,7 @@ function VideoBiteCard({
13960
13979
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
13961
13980
  "div",
13962
13981
  {
13963
- ref: (node) => _optionalChain([rootRef, 'optionalCall', _353 => _353(node)]),
13982
+ ref: (node) => _optionalChain([rootRef, 'optionalCall', _354 => _354(node)]),
13964
13983
  "aria-hidden": isClone || void 0,
13965
13984
  "data-strip-card-key": key,
13966
13985
  className: _chunkX7CEWD6Vcjs.cn.call(void 0,
@@ -14015,8 +14034,8 @@ function EntityVideoSection({
14015
14034
  const hasHighlight = !!highlightVideoUrl;
14016
14035
  const hasVideo = hasFullVideo || hasHighlight;
14017
14036
  const derivedCaptions = captionsEntity ? captions.forEntityId(captionsEntity.type, captionsEntity.id) : null;
14018
- const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _354 => _354.captionsUrl])));
14019
- const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _355 => _355.highlightCaptionsUrl])));
14037
+ const captionsUrl = _nullishCoalesce(captionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _355 => _355.captionsUrl])));
14038
+ const highlightCaptionsUrl = _nullishCoalesce(highlightCaptionsUrlProp, () => ( _optionalChain([derivedCaptions, 'optionalAccess', _356 => _356.highlightCaptionsUrl])));
14020
14039
  if (!hasVideo && !videoSummary && (!videoBites || videoBites.length === 0)) {
14021
14040
  return null;
14022
14041
  }
@@ -14535,7 +14554,7 @@ function DataRoomDocCard({ item, className, badgeText, anchorProps }) {
14535
14554
  ] }) : null,
14536
14555
  item.preview ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex min-w-0", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "line-clamp-2 whitespace-pre-wrap break-words text-ods-text-secondary text-h6", children: item.preview }) }) : null
14537
14556
  ] }),
14538
- _optionalChain([anchorProps, 'optionalAccess', _356 => _356.href]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-3.5 w-3.5" }) }) : null
14557
+ _optionalChain([anchorProps, 'optionalAccess', _357 => _357.href]) ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "flex h-5 shrink-0 items-center self-start text-ods-text-secondary", children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.ExternalLink, { className: "h-3.5 w-3.5" }) }) : null
14539
14558
  ] });
14540
14559
  if (!anchorProps) {
14541
14560
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: `${_chunkODB2AEUWcjs.COMPACT_CARD_OUTER_STATIC} ${_nullishCoalesce(className, () => ( ""))}`, "aria-label": "No link available", children: body });
@@ -14563,7 +14582,7 @@ function DataRoomDocCardSkeleton({ className }) {
14563
14582
 
14564
14583
 
14565
14584
  function CampaignCardAdmin({ campaign, className, anchorProps }) {
14566
- const goalsCount = _optionalChain([campaign, 'access', _357 => _357.goals, 'optionalAccess', _358 => _358.length]) || 0;
14585
+ const goalsCount = _optionalChain([campaign, 'access', _358 => _358.goals, 'optionalAccess', _359 => _359.length]) || 0;
14567
14586
  const innerChildren = /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment, { children: [
14568
14587
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: _chunkODB2AEUWcjs.COMPACT_CARD_ICON_SLOT, children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _lucidereact.Megaphone, { className: "h-5 w-5" }) }),
14569
14588
  /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "span", { className: _chunkODB2AEUWcjs.COMPACT_CARD_TEXT_COL, children: [
@@ -14857,7 +14876,7 @@ function pickFetchedCardHref({
14857
14876
  itemHref,
14858
14877
  allowComposed
14859
14878
  }) {
14860
- if (_optionalChain([composed, 'optionalAccess', _359 => _359.hostOverride])) {
14879
+ if (_optionalChain([composed, 'optionalAccess', _360 => _360.hostOverride])) {
14861
14880
  return { source: "hostOverride", href: composed.href, targetPlatform: composed.targetPlatform };
14862
14881
  }
14863
14882
  if (itemHref) return { source: "item", href: itemHref };
@@ -15131,7 +15150,7 @@ function byKey(key) {
15131
15150
  return PLATFORM_DOMAINS.find((e) => e.key === key);
15132
15151
  }
15133
15152
  function envOverrideFor(key) {
15134
- const envVar = _optionalChain([byKey, 'call', _360 => _360(key), 'optionalAccess', _361 => _361.envVar]);
15153
+ const envVar = _optionalChain([byKey, 'call', _361 => _361(key), 'optionalAccess', _362 => _362.envVar]);
15135
15154
  if (!envVar) return null;
15136
15155
  return ENV_OVERRIDES[envVar] || null;
15137
15156
  }
@@ -15141,7 +15160,7 @@ function ensureScheme(url) {
15141
15160
  return `https://${trimmed.replace(/^\/+/, "")}`;
15142
15161
  }
15143
15162
  function getPlatformProductionUrl(platform) {
15144
- const resolved = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(envOverrideFor(platform), () => ( _optionalChain([byKey, 'call', _362 => _362(platform), 'optionalAccess', _363 => _363.defaultUrl]))), () => ( envOverrideFor("flamingo"))), () => ( "https://www.flamingo.run"));
15163
+ const resolved = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(envOverrideFor(platform), () => ( _optionalChain([byKey, 'call', _363 => _363(platform), 'optionalAccess', _364 => _364.defaultUrl]))), () => ( envOverrideFor("flamingo"))), () => ( "https://www.flamingo.run"));
15145
15164
  return ensureScheme(resolved);
15146
15165
  }
15147
15166
  function getPlatformUrl(platform, options = {}) {
@@ -15150,7 +15169,7 @@ function getPlatformUrl(platform, options = {}) {
15150
15169
  }
15151
15170
  function getDeploymentUrl(options) {
15152
15171
  if (typeof window !== "undefined") return window.location.origin;
15153
- const configured = _optionalChain([options, 'access', _364 => _364.configuredUrl, 'optionalAccess', _365 => _365.trim, 'call', _366 => _366()]);
15172
+ const configured = _optionalChain([options, 'access', _365 => _365.configuredUrl, 'optionalAccess', _366 => _366.trim, 'call', _367 => _367()]);
15154
15173
  if (configured) return ensureScheme(configured).replace(/\/+$/, "");
15155
15174
  if (process.env.VERCEL_ENV === "preview" && process.env.VERCEL_URL) {
15156
15175
  return ensureScheme(process.env.VERCEL_URL).replace(/\/+$/, "");
@@ -15172,7 +15191,7 @@ function getRequestOrigin(headers, options) {
15172
15191
  const host = headers.get("host");
15173
15192
  if (!host) return getDeploymentUrl(options);
15174
15193
  const local = LOCAL_HOSTNAME.test(host.replace(/:\d+$/, ""));
15175
- const proto = _optionalChain([headers, 'access', _367 => _367.get, 'call', _368 => _368("x-forwarded-proto"), 'optionalAccess', _369 => _369.split, 'call', _370 => _370(","), 'access', _371 => _371[0], 'access', _372 => _372.trim, 'call', _373 => _373()]) || (local ? "http" : "https");
15194
+ const proto = _optionalChain([headers, 'access', _368 => _368.get, 'call', _369 => _369("x-forwarded-proto"), 'optionalAccess', _370 => _370.split, 'call', _371 => _371(","), 'access', _372 => _372[0], 'access', _373 => _373.trim, 'call', _374 => _374()]) || (local ? "http" : "https");
15176
15195
  return `${proto}://${host}`;
15177
15196
  }
15178
15197
  function resolveRedirectTarget(origin, target) {
@@ -15201,7 +15220,7 @@ function toRegistrableBaseDomain(host) {
15201
15220
  return void 0;
15202
15221
  }
15203
15222
  function aliasHostsOf(key) {
15204
- return _nullishCoalesce(_optionalChain([byKey, 'call', _374 => _374(key), 'optionalAccess', _375 => _375.aliasHostnames]), () => ( []));
15223
+ return _nullishCoalesce(_optionalChain([byKey, 'call', _375 => _375(key), 'optionalAccess', _376 => _376.aliasHostnames]), () => ( []));
15205
15224
  }
15206
15225
  function hostsForEntry(entry, opts) {
15207
15226
  const resolved = hostOf(getPlatformProductionUrl(entry.key));
@@ -15260,13 +15279,13 @@ function recordCountLabel(count) {
15260
15279
  }
15261
15280
  function buildGroupedSource(spec) {
15262
15281
  const first = spec.rows[0];
15263
- const externalUrl = _nullishCoalesce(spec.externalUrl, () => ( _optionalChain([first, 'optionalAccess', _376 => _376.externalUrl])));
15264
- const targetPlatform = spec.targetPlatform !== void 0 ? spec.targetPlatform : _optionalChain([first, 'optionalAccess', _377 => _377.targetPlatform]);
15282
+ const externalUrl = _nullishCoalesce(spec.externalUrl, () => ( _optionalChain([first, 'optionalAccess', _377 => _377.externalUrl])));
15283
+ const targetPlatform = spec.targetPlatform !== void 0 ? spec.targetPlatform : _optionalChain([first, 'optionalAccess', _378 => _378.targetPlatform]);
15265
15284
  return {
15266
15285
  index: spec.index,
15267
15286
  name: `${getSourceLabel(spec.sourceRepo)} ${recordCountLabel(spec.rows.length)}`,
15268
- path: _nullishCoalesce(_optionalChain([first, 'optionalAccess', _378 => _378.path]), () => ( "")),
15269
- documentType: _nullishCoalesce(_optionalChain([first, 'optionalAccess', _379 => _379.documentType]), () => ( "")),
15287
+ path: _nullishCoalesce(_optionalChain([first, 'optionalAccess', _379 => _379.path]), () => ( "")),
15288
+ documentType: _nullishCoalesce(_optionalChain([first, 'optionalAccess', _380 => _380.documentType]), () => ( "")),
15270
15289
  ...externalUrl ? { externalUrl } : {},
15271
15290
  targetPlatform: _nullishCoalesce(targetPlatform, () => ( null)),
15272
15291
  sourceRepo: spec.sourceRepo,
@@ -15335,7 +15354,7 @@ function groupSourcesByTable(sources2) {
15335
15354
  index: source.index,
15336
15355
  sourceRepo: source.sourceRepo,
15337
15356
  rows: uniqueRows(members.flatMap(rowsOf)),
15338
- ..._optionalChain([serverChip, 'optionalAccess', _380 => _380.externalUrl]) ? { externalUrl: serverChip.externalUrl } : {},
15357
+ ..._optionalChain([serverChip, 'optionalAccess', _381 => _381.externalUrl]) ? { externalUrl: serverChip.externalUrl } : {},
15339
15358
  ...serverChip && serverChip.targetPlatform !== void 0 ? { targetPlatform: serverChip.targetPlatform } : {}
15340
15359
  })
15341
15360
  );
@@ -15385,7 +15404,7 @@ function resolveSourceRowCTA(row, ctx = {}) {
15385
15404
  if (row.path && shouldFallbackToPathNav(row) && !row.externalUrl) {
15386
15405
  const safePath = sanitizePath(row.path);
15387
15406
  if (safePath) {
15388
- const docTarget = row.documentType ? _optionalChain([ctx, 'access', _381 => _381.docPlatformTargets, 'optionalAccess', _382 => _382[row.documentType]]) : void 0;
15407
+ const docTarget = row.documentType ? _optionalChain([ctx, 'access', _382 => _382.docPlatformTargets, 'optionalAccess', _383 => _383[row.documentType]]) : void 0;
15389
15408
  if (docTarget) {
15390
15409
  const seg = docTarget.basePath.split("/").filter(Boolean).join("/");
15391
15410
  const base = `${getPlatformUrl(docTarget.platform)}${seg ? `/${seg}` : ""}/`;
@@ -15528,8 +15547,8 @@ function cardMenuGroups(href, discuss, openDetails, externalLink) {
15528
15547
  if (href) {
15529
15548
  items.push({
15530
15549
  id: "open-details",
15531
- label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _383 => _383.label]), () => ( "Open Details")),
15532
- icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _384 => _384.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.EyeIcon, { size: 20 }))),
15550
+ label: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _384 => _384.label]), () => ( "Open Details")),
15551
+ icon: _nullishCoalesce(_optionalChain([openDetails, 'optionalAccess', _385 => _385.icon]), () => ( /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.EyeIcon, { size: 20 }))),
15533
15552
  // Main row → open the entity (same tab, soft Link nav).
15534
15553
  href,
15535
15554
  // Trailing 40px ↗ side-button → open in a new tab.
@@ -15589,18 +15608,18 @@ function itemVideoMetadata(item) {
15589
15608
  for (const v of vals) if (typeof v === "string" && v.length > 0) return v;
15590
15609
  return void 0;
15591
15610
  };
15592
- const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess', _385 => _385.metadata]), () => ( {}));
15611
+ const m = _nullishCoalesce(_optionalChain([item, 'optionalAccess', _386 => _386.metadata]), () => ( {}));
15593
15612
  const out = {};
15594
- const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess', _386 => _386.custom_video_url]), _optionalChain([item, 'optionalAccess', _387 => _387.main_video_url]));
15595
- const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess', _388 => _388.youtube_url]), _optionalChain([item, 'optionalAccess', _389 => _389.testimonial_video_url]));
15596
- const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess', _390 => _390.highlight_video_url]));
15613
+ const videoUrl = pick(m.videoUrl, _optionalChain([item, 'optionalAccess', _387 => _387.custom_video_url]), _optionalChain([item, 'optionalAccess', _388 => _388.main_video_url]));
15614
+ const youtubeUrl = pick(m.youtubeUrl, _optionalChain([item, 'optionalAccess', _389 => _389.youtube_url]), _optionalChain([item, 'optionalAccess', _390 => _390.testimonial_video_url]));
15615
+ const highlightVideoUrl = pick(m.highlightVideoUrl, _optionalChain([item, 'optionalAccess', _391 => _391.highlight_video_url]));
15597
15616
  const videoPoster = pick(
15598
15617
  m.videoPoster,
15599
- _optionalChain([item, 'optionalAccess', _391 => _391.main_video_thumbnail]),
15600
- _optionalChain([item, 'optionalAccess', _392 => _392.highlight_video_thumbnail]),
15601
- _optionalChain([item, 'optionalAccess', _393 => _393.featured_image])
15618
+ _optionalChain([item, 'optionalAccess', _392 => _392.main_video_thumbnail]),
15619
+ _optionalChain([item, 'optionalAccess', _393 => _393.highlight_video_thumbnail]),
15620
+ _optionalChain([item, 'optionalAccess', _394 => _394.featured_image])
15602
15621
  );
15603
- const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess', _394 => _394.highlight_video_thumbnail]));
15622
+ const highlightVideoPoster = pick(m.highlightVideoPoster, _optionalChain([item, 'optionalAccess', _395 => _395.highlight_video_thumbnail]));
15604
15623
  if (videoUrl) out.videoUrl = videoUrl;
15605
15624
  if (youtubeUrl) out.youtubeUrl = youtubeUrl;
15606
15625
  if (highlightVideoUrl) out.highlightVideoUrl = highlightVideoUrl;
@@ -15630,15 +15649,15 @@ function fetchedItemDisplayRef(item, chatRef) {
15630
15649
  }
15631
15650
  function fetchedFaqDisplayRef(item, chatRef) {
15632
15651
  const it = item;
15633
- const answer = typeof _optionalChain([it, 'optionalAccess', _395 => _395.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
15652
+ const answer = typeof _optionalChain([it, 'optionalAccess', _396 => _396.answer]) === "string" && it.answer.trim().length > 0 ? it.answer.trim() : null;
15634
15653
  return {
15635
15654
  type: "faq",
15636
15655
  id: chatRef.id,
15637
15656
  sourceRepo: chatRef.sourceRepo,
15638
- title: typeof _optionalChain([it, 'optionalAccess', _396 => _396.question]) === "string" && it.question ? it.question : chatRef.id,
15657
+ title: typeof _optionalChain([it, 'optionalAccess', _397 => _397.question]) === "string" && it.question ? it.question : chatRef.id,
15639
15658
  url: _nullishCoalesce(chatRef.url, () => ( null)),
15640
15659
  ...answer ? { preview: answer.length > 400 ? `${answer.slice(0, 397)}\u2026` : answer } : {},
15641
- metadata: typeof _optionalChain([it, 'optionalAccess', _397 => _397.section]) === "string" && it.section ? { section: it.section } : {}
15660
+ metadata: typeof _optionalChain([it, 'optionalAccess', _398 => _398.section]) === "string" && it.section ? { section: it.section } : {}
15642
15661
  };
15643
15662
  }
15644
15663
  function HubspotTicketChatCard({
@@ -15646,8 +15665,8 @@ function HubspotTicketChatCard({
15646
15665
  isNewTab,
15647
15666
  discuss
15648
15667
  }) {
15649
- const status = typeof _optionalChain([chatRef, 'access', _398 => _398.metadata, 'optionalAccess', _399 => _399.status]) === "string" ? chatRef.metadata.status : void 0;
15650
- const statusLabel = typeof _optionalChain([chatRef, 'access', _400 => _400.metadata, 'optionalAccess', _401 => _401.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
15668
+ const status = typeof _optionalChain([chatRef, 'access', _399 => _399.metadata, 'optionalAccess', _400 => _400.status]) === "string" ? chatRef.metadata.status : void 0;
15669
+ const statusLabel = typeof _optionalChain([chatRef, 'access', _401 => _401.metadata, 'optionalAccess', _402 => _402.statusLabel]) === "string" ? chatRef.metadata.statusLabel : void 0;
15651
15670
  const statusText = _nullishCoalesce(statusLabel, () => ( formatStatusToken(status)));
15652
15671
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15653
15672
  MingoInfoCard,
@@ -15670,7 +15689,7 @@ function FaqChatCard({
15670
15689
  isNewTab,
15671
15690
  discuss
15672
15691
  }) {
15673
- const section = typeof _optionalChain([chatRef, 'access', _402 => _402.metadata, 'optionalAccess', _403 => _403.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
15692
+ const section = typeof _optionalChain([chatRef, 'access', _403 => _403.metadata, 'optionalAccess', _404 => _404.section]) === "string" ? chatRef.metadata.section.trim() : void 0;
15674
15693
  const statusLabel = section && section.length > 0 ? section : "FAQ";
15675
15694
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15676
15695
  MingoInfoCard,
@@ -15690,7 +15709,7 @@ function SlackChatCard({
15690
15709
  isNewTab,
15691
15710
  discuss
15692
15711
  }) {
15693
- const channelName = typeof _optionalChain([chatRef, 'access', _404 => _404.metadata, 'optionalAccess', _405 => _405.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
15712
+ const channelName = typeof _optionalChain([chatRef, 'access', _405 => _405.metadata, 'optionalAccess', _406 => _406.channelName]) === "string" ? chatRef.metadata.channelName.trim() : void 0;
15694
15713
  const channelPretty = channelName ? channelName.startsWith("#") ? channelName : `#${channelName}` : void 0;
15695
15714
  const title = channelPretty ? `${chatRef.title} \xB7 ${channelPretty}` : chatRef.title;
15696
15715
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
@@ -15748,7 +15767,7 @@ function GenericFinancialChatCard({
15748
15767
  isNewTab,
15749
15768
  discuss
15750
15769
  }) {
15751
- const subtitle = typeof _optionalChain([chatRef, 'access', _406 => _406.metadata, 'optionalAccess', _407 => _407.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
15770
+ const subtitle = typeof _optionalChain([chatRef, 'access', _407 => _407.metadata, 'optionalAccess', _408 => _408.subtitle]) === "string" ? chatRef.metadata.subtitle : void 0;
15752
15771
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15753
15772
  MingoInfoCard,
15754
15773
  {
@@ -15817,12 +15836,12 @@ function ProductReleaseChatCard({
15817
15836
  discuss
15818
15837
  }) {
15819
15838
  const releaseProps = buildProps(item);
15820
- const status = _optionalChain([item, 'optionalAccess', _408 => _408.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
15839
+ const status = _optionalChain([item, 'optionalAccess', _409 => _409.version]) ? { label: String(item.version), variant: "grey" } : { label: "Release", variant: "grey" };
15821
15840
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15822
15841
  EntityMingoCard,
15823
15842
  {
15824
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _409 => _409.title]), () => ( "")),
15825
- description: _optionalChain([item, 'optionalAccess', _410 => _410.summary]) || releaseProps.formattedDate || void 0,
15843
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _410 => _410.title]), () => ( "")),
15844
+ description: _optionalChain([item, 'optionalAccess', _411 => _411.summary]) || releaseProps.formattedDate || void 0,
15826
15845
  cover: releaseProps.coverImage || void 0,
15827
15846
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.Rocket02Icon, { size: 24 }),
15828
15847
  status,
@@ -15839,17 +15858,17 @@ function CampaignChatCard({
15839
15858
  isNewTab,
15840
15859
  discuss
15841
15860
  }) {
15842
- const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _411 => _411.goals])) ? item.goals.length : 0;
15861
+ const goalsCount = Array.isArray(_optionalChain([item, 'optionalAccess', _412 => _412.goals])) ? item.goals.length : 0;
15843
15862
  const meta = [
15844
- _optionalChain([item, 'optionalAccess', _412 => _412.start_date]) ? _chunkODB2AEUWcjs.formatDateShort.call(void 0, item.start_date) : null,
15863
+ _optionalChain([item, 'optionalAccess', _413 => _413.start_date]) ? _chunkODB2AEUWcjs.formatDateShort.call(void 0, item.start_date) : null,
15845
15864
  goalsCount > 0 ? `${goalsCount} goal${goalsCount !== 1 ? "s" : ""}` : null,
15846
15865
  "Marketing campaign"
15847
15866
  ].filter(Boolean).join(" \xB7 ");
15848
15867
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15849
15868
  EntityMingoCard,
15850
15869
  {
15851
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _413 => _413.name]), () => ( "")),
15852
- description: meta || _optionalChain([item, 'optionalAccess', _414 => _414.description]) || void 0,
15870
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _414 => _414.name]), () => ( "")),
15871
+ description: meta || _optionalChain([item, 'optionalAccess', _415 => _415.description]) || void 0,
15853
15872
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.Megaphone01Icon, { size: 24 }),
15854
15873
  chatRef,
15855
15874
  isNewTab,
@@ -15904,14 +15923,14 @@ function BlogChatCard({
15904
15923
  hasEmbeddedVideo,
15905
15924
  discuss
15906
15925
  }) {
15907
- const category = Array.isArray(_optionalChain([item, 'optionalAccess', _415 => _415.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _416 => _416.categories, 'access', _417 => _417.find, 'call', _418 => _418((c) => _optionalChain([c, 'optionalAccess', _419 => _419.name])), 'optionalAccess', _420 => _420.name]), () => ( void 0)) : void 0;
15926
+ const category = Array.isArray(_optionalChain([item, 'optionalAccess', _416 => _416.categories])) ? _nullishCoalesce(_optionalChain([item, 'access', _417 => _417.categories, 'access', _418 => _418.find, 'call', _419 => _419((c) => _optionalChain([c, 'optionalAccess', _420 => _420.name])), 'optionalAccess', _421 => _421.name]), () => ( void 0)) : void 0;
15908
15927
  const status = hasEmbeddedVideo ? { label: "Video", variant: "primary" } : category ? { label: category, variant: "grey" } : void 0;
15909
15928
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15910
15929
  EntityMingoCard,
15911
15930
  {
15912
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _421 => _421.title]), () => ( "")),
15913
- description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _422 => _422.summary]), () => ( void 0)),
15914
- cover: entityCover(_optionalChain([item, 'optionalAccess', _423 => _423.featured_image]), ogPlaceholder),
15931
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _422 => _422.title]), () => ( "")),
15932
+ description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _423 => _423.summary]), () => ( void 0)),
15933
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _424 => _424.featured_image]), ogPlaceholder),
15915
15934
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.NewspaperIcon, { size: 24 }),
15916
15935
  status,
15917
15936
  chatRef,
@@ -15928,13 +15947,13 @@ function CaseStudyChatCard({
15928
15947
  ogPlaceholder,
15929
15948
  discuss
15930
15949
  }) {
15931
- const meta = [_optionalChain([item, 'optionalAccess', _424 => _424.msp, 'optionalAccess', _425 => _425.name]), _optionalChain([item, 'optionalAccess', _426 => _426.user, 'optionalAccess', _427 => _427.full_name])].filter(Boolean).join(" \xB7 ");
15950
+ const meta = [_optionalChain([item, 'optionalAccess', _425 => _425.msp, 'optionalAccess', _426 => _426.name]), _optionalChain([item, 'optionalAccess', _427 => _427.user, 'optionalAccess', _428 => _428.full_name])].filter(Boolean).join(" \xB7 ");
15932
15951
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15933
15952
  EntityMingoCard,
15934
15953
  {
15935
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _428 => _428.title]), () => ( "")),
15936
- description: _optionalChain([item, 'optionalAccess', _429 => _429.summary]) || meta || void 0,
15937
- cover: entityCover(_optionalChain([item, 'optionalAccess', _430 => _430.featured_image]), ogPlaceholder),
15954
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _429 => _429.title]), () => ( "")),
15955
+ description: _optionalChain([item, 'optionalAccess', _430 => _430.summary]) || meta || void 0,
15956
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _431 => _431.featured_image]), ogPlaceholder),
15938
15957
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.TrophyIcon, { size: 24 }),
15939
15958
  status: { label: "Case study", variant: "grey" },
15940
15959
  chatRef,
@@ -15951,13 +15970,13 @@ function CustomerInterviewChatCard({
15951
15970
  ogPlaceholder,
15952
15971
  discuss
15953
15972
  }) {
15954
- const meta = [_optionalChain([item, 'optionalAccess', _431 => _431.user, 'optionalAccess', _432 => _432.full_name]), _optionalChain([item, 'optionalAccess', _433 => _433.msp, 'optionalAccess', _434 => _434.name])].filter(Boolean).join(" \xB7 ");
15973
+ const meta = [_optionalChain([item, 'optionalAccess', _432 => _432.user, 'optionalAccess', _433 => _433.full_name]), _optionalChain([item, 'optionalAccess', _434 => _434.msp, 'optionalAccess', _435 => _435.name])].filter(Boolean).join(" \xB7 ");
15955
15974
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15956
15975
  EntityMingoCard,
15957
15976
  {
15958
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _435 => _435.title]), () => ( "")),
15959
- description: _optionalChain([item, 'optionalAccess', _436 => _436.video_summary]) || meta || void 0,
15960
- cover: entityCover(_optionalChain([item, 'optionalAccess', _437 => _437.featured_image]), ogPlaceholder),
15977
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _436 => _436.title]), () => ( "")),
15978
+ description: _optionalChain([item, 'optionalAccess', _437 => _437.video_summary]) || meta || void 0,
15979
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _438 => _438.featured_image]), ogPlaceholder),
15961
15980
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.MicrophoneIcon, { size: 24 }),
15962
15981
  status: { label: "Interview", variant: "grey" },
15963
15982
  chatRef,
@@ -15974,13 +15993,13 @@ function InvestorUpdateChatCard({
15974
15993
  ogPlaceholder,
15975
15994
  discuss
15976
15995
  }) {
15977
- const title = _optionalChain([item, 'optionalAccess', _438 => _438.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _439 => _439.update_number]), () => ( "?"))}`;
15996
+ const title = _optionalChain([item, 'optionalAccess', _439 => _439.title]) || `Update #${_nullishCoalesce(_optionalChain([item, 'optionalAccess', _440 => _440.update_number]), () => ( "?"))}`;
15978
15997
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
15979
15998
  EntityMingoCard,
15980
15999
  {
15981
16000
  title,
15982
- description: _optionalChain([item, 'optionalAccess', _440 => _440.strategic_update]) || _optionalChain([item, 'optionalAccess', _441 => _441.content]) || _chunkODB2AEUWcjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _442 => _442.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _443 => _443.period_end]), () => ( null))) || void 0,
15983
- cover: entityCover(_optionalChain([item, 'optionalAccess', _444 => _444.featured_image]), ogPlaceholder),
16001
+ description: _optionalChain([item, 'optionalAccess', _441 => _441.strategic_update]) || _optionalChain([item, 'optionalAccess', _442 => _442.content]) || _chunkODB2AEUWcjs.formatInvestorUpdatePeriod.call(void 0, _nullishCoalesce(_optionalChain([item, 'optionalAccess', _443 => _443.period_start]), () => ( null)), _nullishCoalesce(_optionalChain([item, 'optionalAccess', _444 => _444.period_end]), () => ( null))) || void 0,
16002
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _445 => _445.featured_image]), ogPlaceholder),
15984
16003
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.PresentationLineIcon, { size: 24 }),
15985
16004
  status: { label: "Investor update", variant: "grey" },
15986
16005
  chatRef,
@@ -15997,12 +16016,12 @@ function OnboardingGuideChatCard({
15997
16016
  ogPlaceholder,
15998
16017
  discuss
15999
16018
  }) {
16000
- const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _445 => _445.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _446 => _446.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _447 => _447.og_image_url]), ogPlaceholder)));
16019
+ const cover = _nullishCoalesce(_nullishCoalesce(entityCover(_optionalChain([item, 'optionalAccess', _446 => _446.featured_image])), () => ( entityCover(_optionalChain([item, 'optionalAccess', _447 => _447.main_video_thumbnail])))), () => ( entityCover(_optionalChain([item, 'optionalAccess', _448 => _448.og_image_url]), ogPlaceholder)));
16001
16020
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16002
16021
  EntityMingoCard,
16003
16022
  {
16004
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _448 => _448.title]), () => ( "")),
16005
- description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _449 => _449.summary]), () => ( _optionalChain([item, 'optionalAccess', _450 => _450.description]))), () => ( void 0)),
16023
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _449 => _449.title]), () => ( "")),
16024
+ description: _nullishCoalesce(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _450 => _450.summary]), () => ( _optionalChain([item, 'optionalAccess', _451 => _451.description]))), () => ( void 0)),
16006
16025
  cover,
16007
16026
  fallbackIcon: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.CompassIcon, { size: 24 }),
16008
16027
  status: { label: "Guide", variant: "grey" },
@@ -16027,9 +16046,9 @@ function ProgramChatCard({
16027
16046
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16028
16047
  EntityMingoCard,
16029
16048
  {
16030
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _451 => _451.title]), () => ( "")),
16031
- description: meta || _optionalChain([item, 'optionalAccess', _452 => _452.description]) || void 0,
16032
- cover: entityCover(_optionalChain([item, 'optionalAccess', _453 => _453.cover_url]), ogPlaceholder),
16049
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _452 => _452.title]), () => ( "")),
16050
+ description: meta || _optionalChain([item, 'optionalAccess', _453 => _453.description]) || void 0,
16051
+ cover: entityCover(_optionalChain([item, 'optionalAccess', _454 => _454.cover_url]), ogPlaceholder),
16033
16052
  fallbackIcon: icon,
16034
16053
  status: { label, variant: "grey" },
16035
16054
  chatRef,
@@ -16046,10 +16065,10 @@ function RoadmapChatCard({
16046
16065
  cardType,
16047
16066
  discuss
16048
16067
  }) {
16049
- const logoUrl = typeof _optionalChain([item, 'optionalAccess', _454 => _454.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
16050
- const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _455 => _455.customItemId]) != null;
16068
+ const logoUrl = typeof _optionalChain([item, 'optionalAccess', _455 => _455.icon]) === "string" && item.icon.startsWith("http") ? item.icon : void 0;
16069
+ const useTypeIcon = cardType === "internal_task" || !logoUrl && _optionalChain([item, 'optionalAccess', _456 => _456.customItemId]) != null;
16051
16070
  const defaultIcon = cardType === "delivery_item" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.TruckFastIcon, { size: 24 }) : cardType === "internal_task" ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.CheckSquareIcon, { size: 24 }) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkYRTMAXLEcjs.MapIcon, { size: 24 });
16052
- const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkODB2AEUWcjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _456 => _456.customItemId]), className: "size-6" }) : logoUrl ? (
16071
+ const icon = useTypeIcon ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkODB2AEUWcjs.TaskTypeIcon, { customItemId: _optionalChain([item, 'optionalAccess', _457 => _457.customItemId]), className: "size-6" }) : logoUrl ? (
16053
16072
  // Contained (not full-bleed) so the integration logo keeps its aspect
16054
16073
  // ratio inside the bordered icon box — matches RoadmapCard.
16055
16074
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkWLSFBRT5cjs.next_image_default, { src: logoUrl, alt: "", className: "size-6 object-contain", width: 24, height: 24, unoptimized: true })
@@ -16060,10 +16079,10 @@ function RoadmapChatCard({
16060
16079
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16061
16080
  EntityMingoCard,
16062
16081
  {
16063
- title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _457 => _457.title]), () => ( "")),
16064
- description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _458 => _458.description]), () => ( void 0)),
16082
+ title: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _458 => _458.title]), () => ( "")),
16083
+ description: _nullishCoalesce(_optionalChain([item, 'optionalAccess', _459 => _459.description]), () => ( void 0)),
16065
16084
  fallbackIcon: icon,
16066
- status: statusPill(_optionalChain([item, 'optionalAccess', _459 => _459.status])),
16085
+ status: statusPill(_optionalChain([item, 'optionalAccess', _460 => _460.status])),
16067
16086
  chatRef,
16068
16087
  isNewTab,
16069
16088
  discuss,
@@ -16079,7 +16098,7 @@ function refHydratedEntry(docType, label, renderRef) {
16079
16098
  bareInline: true,
16080
16099
  contentRefType: docType,
16081
16100
  noComposedHref: true,
16082
- fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _460 => _460.url]), () => ( null)),
16101
+ fallbackHref: (item) => _nullishCoalesce(_optionalChain([item, 'optionalAccess', _461 => _461.url]), () => ( null)),
16083
16102
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
16084
16103
  render: (item, chatRef, opts) => renderRef(fetchedItemDisplayRef(item, chatRef), opts)
16085
16104
  };
@@ -16151,8 +16170,8 @@ function refGlyphRegistryEntries() {
16151
16170
  title: displayRef.title,
16152
16171
  description: _nullishCoalesce(displayRef.preview, () => ( void 0)),
16153
16172
  cover: entityCover(
16154
- _optionalChain([displayRef, 'access', _461 => _461.metadata, 'optionalAccess', _462 => _462.videoPoster]),
16155
- _nullishCoalesce(_optionalChain([opts, 'access', _463 => _463.extras, 'optionalAccess', _464 => _464.buildOgPlaceholderUrl, 'optionalCall', _465 => _465(_nullishCoalesce(displayRef.title, () => ( "")))]), () => ( null))
16173
+ _optionalChain([displayRef, 'access', _462 => _462.metadata, 'optionalAccess', _463 => _463.videoPoster]),
16174
+ _nullishCoalesce(_optionalChain([opts, 'access', _464 => _464.extras, 'optionalAccess', _465 => _465.buildOgPlaceholderUrl, 'optionalCall', _466 => _466(_nullishCoalesce(displayRef.title, () => ( "")))]), () => ( null))
16156
16175
  ),
16157
16176
  fallbackIcon: cfg.icon(),
16158
16177
  status: { label: cfg.label, variant: "grey" },
@@ -16167,9 +16186,9 @@ function refGlyphRegistryEntries() {
16167
16186
  }
16168
16187
  function fetchedEmployeeEntryDisplayRef(item, chatRef) {
16169
16188
  const it = item;
16170
- const title = typeof _optionalChain([it, 'optionalAccess', _466 => _466.title]) === "string" && it.title.trim().length > 0 ? it.title.trim() : chatRef.title;
16171
- const author = typeof _optionalChain([it, 'optionalAccess', _467 => _467.author, 'optionalAccess', _468 => _468.full_name]) === "string" ? it.author.full_name.trim() : "";
16172
- const summary = typeof _optionalChain([it, 'optionalAccess', _469 => _469.summary]) === "string" ? it.summary.trim() : "";
16189
+ const title = typeof _optionalChain([it, 'optionalAccess', _467 => _467.title]) === "string" && it.title.trim().length > 0 ? it.title.trim() : chatRef.title;
16190
+ const author = typeof _optionalChain([it, 'optionalAccess', _468 => _468.author, 'optionalAccess', _469 => _469.full_name]) === "string" ? it.author.full_name.trim() : "";
16191
+ const summary = typeof _optionalChain([it, 'optionalAccess', _470 => _470.summary]) === "string" ? it.summary.trim() : "";
16173
16192
  const preview = [author, summary].filter((x) => x.length > 0).join(" \xB7 ");
16174
16193
  return { ...chatRef, title, preview: preview.length > 0 ? preview : chatRef.preview };
16175
16194
  }
@@ -16221,7 +16240,7 @@ function programRegistryEntries() {
16221
16240
  discuss: opts.discuss,
16222
16241
  configKey: cfg.configKey,
16223
16242
  label: cfg.configKey.charAt(0).toUpperCase() + cfg.configKey.slice(1),
16224
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _470 => _470.extras, 'optionalAccess', _471 => _471.buildOgPlaceholderUrl, 'optionalCall', _472 => _472(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _473 => _473.title]), () => ( "")))]), () => ( null))
16243
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _471 => _471.extras, 'optionalAccess', _472 => _472.buildOgPlaceholderUrl, 'optionalCall', _473 => _473(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _474 => _474.title]), () => ( "")))]), () => ( null))
16225
16244
  }
16226
16245
  )
16227
16246
  }));
@@ -16242,7 +16261,7 @@ var ROADMAP_CARD_CONFIGS = {
16242
16261
  // The card's destination IS the ClickUp deep link, derived from the
16243
16262
  // task id post-fetch (the refs frame used to carry it).
16244
16263
  noComposedHref: true,
16245
- fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _474 => _474.id]) != null ? clickupTaskUrl(String(item.id)) : null
16264
+ fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _475 => _475.id]) != null ? clickupTaskUrl(String(item.id)) : null
16246
16265
  }
16247
16266
  };
16248
16267
  function roadmapRegistryEntries() {
@@ -16284,8 +16303,8 @@ var CHAT_CARD_REGISTRY = {
16284
16303
  DeletedDataCard,
16285
16304
  {
16286
16305
  title: chatRef.title && chatRef.title !== chatRef.id ? chatRef.title : null,
16287
- entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _475 => _475.metadata, 'optionalAccess', _476 => _476.entity_label]), () => ( null)),
16288
- recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _477 => _477.metadata, 'optionalAccess', _478 => _478.recovery_note]), () => ( null))
16306
+ entityLabel: _nullishCoalesce(_optionalChain([chatRef, 'access', _476 => _476.metadata, 'optionalAccess', _477 => _477.entity_label]), () => ( null)),
16307
+ recoveryNote: _nullishCoalesce(_optionalChain([chatRef, 'access', _478 => _478.metadata, 'optionalAccess', _479 => _479.recovery_note]), () => ( null))
16289
16308
  }
16290
16309
  )
16291
16310
  },
@@ -16302,7 +16321,7 @@ var CHAT_CARD_REGISTRY = {
16302
16321
  bareInline: true,
16303
16322
  contentRefType: "faq",
16304
16323
  noComposedHref: true,
16305
- fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _479 => _479.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
16324
+ fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _480 => _480.id]) != null ? `/faqs#${faqItemAnchor(item.id)}` : null,
16306
16325
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, MingoInfoCardSkeleton, {}),
16307
16326
  render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, FaqChatCard, { chatRef: fetchedFaqDisplayRef(item, chatRef), isNewTab: opts.isNewTab, discuss: opts.discuss })
16308
16327
  },
@@ -16336,8 +16355,8 @@ var CHAT_CARD_REGISTRY = {
16336
16355
  chatRef,
16337
16356
  isNewTab: opts.isNewTab,
16338
16357
  discuss: opts.discuss,
16339
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _480 => _480.extras, 'optionalAccess', _481 => _481.buildOgPlaceholderUrl, 'optionalCall', _482 => _482(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _483 => _483.title]), () => ( "")))]), () => ( null)),
16340
- hasEmbeddedVideo: _optionalChain([chatRef, 'access', _484 => _484.metadata, 'optionalAccess', _485 => _485.hasEmbeddedVideo]) === true
16358
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _481 => _481.extras, 'optionalAccess', _482 => _482.buildOgPlaceholderUrl, 'optionalCall', _483 => _483(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _484 => _484.title]), () => ( "")))]), () => ( null)),
16359
+ hasEmbeddedVideo: _optionalChain([chatRef, 'access', _485 => _485.metadata, 'optionalAccess', _486 => _486.hasEmbeddedVideo]) === true
16341
16360
  }
16342
16361
  )
16343
16362
  },
@@ -16353,7 +16372,7 @@ var CHAT_CARD_REGISTRY = {
16353
16372
  chatRef,
16354
16373
  isNewTab: opts.isNewTab,
16355
16374
  discuss: opts.discuss,
16356
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _486 => _486.extras, 'optionalAccess', _487 => _487.buildOgPlaceholderUrl, 'optionalCall', _488 => _488(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _489 => _489.title]), () => ( "")))]), () => ( null))
16375
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _487 => _487.extras, 'optionalAccess', _488 => _488.buildOgPlaceholderUrl, 'optionalCall', _489 => _489(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _490 => _490.title]), () => ( "")))]), () => ( null))
16357
16376
  }
16358
16377
  )
16359
16378
  },
@@ -16369,7 +16388,7 @@ var CHAT_CARD_REGISTRY = {
16369
16388
  chatRef,
16370
16389
  isNewTab: opts.isNewTab,
16371
16390
  discuss: opts.discuss,
16372
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _490 => _490.extras, 'optionalAccess', _491 => _491.buildOgPlaceholderUrl, 'optionalCall', _492 => _492(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _493 => _493.title]), () => ( "")))]), () => ( null))
16391
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _491 => _491.extras, 'optionalAccess', _492 => _492.buildOgPlaceholderUrl, 'optionalCall', _493 => _493(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _494 => _494.title]), () => ( "")))]), () => ( null))
16373
16392
  }
16374
16393
  )
16375
16394
  },
@@ -16379,7 +16398,7 @@ var CHAT_CARD_REGISTRY = {
16379
16398
  bareInline: true,
16380
16399
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _chunkODB2AEUWcjs.ProductReleaseCardSkeleton, { size: "sm" }),
16381
16400
  render: (item, chatRef, opts) => {
16382
- const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _494 => _494.extras, 'optionalAccess', _495 => _495.buildProductReleaseCardProps]), () => ( _chunkODB2AEUWcjs.defaultBuildProductReleaseCardProps));
16401
+ const builder = _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _495 => _495.extras, 'optionalAccess', _496 => _496.buildProductReleaseCardProps]), () => ( _chunkODB2AEUWcjs.defaultBuildProductReleaseCardProps));
16383
16402
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16384
16403
  ProductReleaseChatCard,
16385
16404
  {
@@ -16405,7 +16424,7 @@ var CHAT_CARD_REGISTRY = {
16405
16424
  chatRef,
16406
16425
  isNewTab: opts.isNewTab,
16407
16426
  discuss: opts.discuss,
16408
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _496 => _496.extras, 'optionalAccess', _497 => _497.buildOgPlaceholderUrl, 'optionalCall', _498 => _498(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _499 => _499.title]), () => ( "")))]), () => ( null))
16427
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _497 => _497.extras, 'optionalAccess', _498 => _498.buildOgPlaceholderUrl, 'optionalCall', _499 => _499(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _500 => _500.title]), () => ( "")))]), () => ( null))
16409
16428
  }
16410
16429
  )
16411
16430
  },
@@ -16423,7 +16442,7 @@ var CHAT_CARD_REGISTRY = {
16423
16442
  chatRef,
16424
16443
  isNewTab: opts.isNewTab,
16425
16444
  discuss: opts.discuss,
16426
- ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _500 => _500.extras, 'optionalAccess', _501 => _501.buildOgPlaceholderUrl, 'optionalCall', _502 => _502(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _503 => _503.title]), () => ( "")))]), () => ( null))
16445
+ ogPlaceholder: _nullishCoalesce(_optionalChain([opts, 'optionalAccess', _501 => _501.extras, 'optionalAccess', _502 => _502.buildOgPlaceholderUrl, 'optionalCall', _503 => _503(_nullishCoalesce(_optionalChain([item, 'optionalAccess', _504 => _504.title]), () => ( "")))]), () => ( null))
16427
16446
  }
16428
16447
  )
16429
16448
  },
@@ -16434,13 +16453,13 @@ var CHAT_CARD_REGISTRY = {
16434
16453
  skeleton: () => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignCardAdminSkeleton, {}),
16435
16454
  // No public viewer — synthesize the hub-internal admin URL post-fetch
16436
16455
  // so the wrapper + isNewTab computation see the actual destination.
16437
- fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _504 => _504.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
16456
+ fallbackHref: (item) => _optionalChain([item, 'optionalAccess', _505 => _505.id]) ? `/admin/campaigns/${encodeURIComponent(String(item.id))}` : null,
16438
16457
  render: (item, chatRef, opts) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CampaignChatCard, { item, chatRef, isNewTab: opts.isNewTab, discuss: opts.discuss })
16439
16458
  },
16440
16459
  ...roadmapRegistryEntries()
16441
16460
  };
16442
16461
  function chatCardLabel(docType) {
16443
- return _optionalChain([CHAT_CARD_REGISTRY, 'access', _505 => _505[docType], 'optionalAccess', _506 => _506.label]);
16462
+ return _optionalChain([CHAT_CARD_REGISTRY, 'access', _506 => _506[docType], 'optionalAccess', _507 => _507.label]);
16444
16463
  }
16445
16464
  function ChatCardNavWrap({
16446
16465
  href,
@@ -16456,13 +16475,13 @@ function ChatCardNavWrap({
16456
16475
  if (!href) return;
16457
16476
  const targetEl = e.target;
16458
16477
  const host = e.currentTarget;
16459
- if (!_optionalChain([host, 'optionalAccess', _507 => _507.contains, 'call', _508 => _508(targetEl)])) return;
16460
- if (_optionalChain([targetEl, 'optionalAccess', _509 => _509.closest, 'optionalCall', _510 => _510("button")])) return;
16461
- if (!_optionalChain([targetEl, 'optionalAccess', _511 => _511.closest, 'optionalCall', _512 => _512("a")])) return;
16478
+ if (!_optionalChain([host, 'optionalAccess', _508 => _508.contains, 'call', _509 => _509(targetEl)])) return;
16479
+ if (_optionalChain([targetEl, 'optionalAccess', _510 => _510.closest, 'optionalCall', _511 => _511("button")])) return;
16480
+ if (!_optionalChain([targetEl, 'optionalAccess', _512 => _512.closest, 'optionalCall', _513 => _513("a")])) return;
16462
16481
  const handled = executeNavigation({ event: e, runtime, href, path, targetPlatform, fallbackNavigate: router.push });
16463
16482
  if (!handled) return;
16464
16483
  e.stopPropagation();
16465
- if (!isNewTab && _optionalChain([panel, 'optionalAccess', _513 => _513.closeChat])) panel.closeChat();
16484
+ if (!isNewTab && _optionalChain([panel, 'optionalAccess', _514 => _514.closeChat])) panel.closeChat();
16466
16485
  };
16467
16486
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { className: "contents", onClickCapture, children });
16468
16487
  }
@@ -16484,7 +16503,7 @@ function ChatCardLoader({
16484
16503
  title: chatRef.title,
16485
16504
  externalUrl: chatRef.url,
16486
16505
  targetPlatform: chatRef.targetPlatform,
16487
- path: typeof _optionalChain([chatRef, 'access', _514 => _514.metadata, 'optionalAccess', _515 => _515.path]) === "string" ? chatRef.metadata.path : null
16506
+ path: typeof _optionalChain([chatRef, 'access', _515 => _515.metadata, 'optionalAccess', _516 => _516.path]) === "string" ? chatRef.metadata.path : null
16488
16507
  },
16489
16508
  sourceRowCtxFromRuntime(runtime, { baseRoute, chipBasePlatform })
16490
16509
  );
@@ -16498,11 +16517,11 @@ function ChatCardLoader({
16498
16517
  const entry = CHAT_CARD_REGISTRY[resolvedChatRef.type];
16499
16518
  const fetchEntry = entry && entry.contentRefType ? entry : null;
16500
16519
  const { item, isLoading, isError, isFetched } = useChatCardItem(
16501
- _nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _516 => _516.contentRefType]), () => ( "")),
16520
+ _nullishCoalesce(_optionalChain([fetchEntry, 'optionalAccess', _517 => _517.contentRefType]), () => ( "")),
16502
16521
  fetchEntry ? resolvedChatRef.id : ""
16503
16522
  );
16504
16523
  if (!entry) return null;
16505
- const composedHref = _optionalChain([fetchEntry, 'optionalAccess', _517 => _517.contentRefType]) && !resolvedChatRef.url && item ? resolveFetchedCardHref({
16524
+ const composedHref = _optionalChain([fetchEntry, 'optionalAccess', _518 => _518.contentRefType]) && !resolvedChatRef.url && item ? resolveFetchedCardHref({
16506
16525
  contentRefType: fetchEntry.contentRefType,
16507
16526
  id: resolvedChatRef.id,
16508
16527
  item,
@@ -16510,7 +16529,7 @@ function ChatCardLoader({
16510
16529
  }) : null;
16511
16530
  const hrefChoice = fetchEntry && !resolvedChatRef.url && item ? pickFetchedCardHref({
16512
16531
  composed: composedHref,
16513
- itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _518 => _518.fallbackHref, 'optionalCall', _519 => _519(item)]), () => ( null)),
16532
+ itemHref: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _519 => _519.fallbackHref, 'optionalCall', _520 => _520(item)]), () => ( null)),
16514
16533
  allowComposed: !fetchEntry.noComposedHref
16515
16534
  }) : null;
16516
16535
  const hrefResolvedChatRef = hrefChoice ? {
@@ -16544,7 +16563,7 @@ function ChatCardLoader({
16544
16563
  isNewTab,
16545
16564
  discuss
16546
16565
  };
16547
- const path = typeof _optionalChain([finalChatRef, 'access', _520 => _520.metadata, 'optionalAccess', _521 => _521.path]) === "string" ? finalChatRef.metadata.path : null;
16566
+ const path = typeof _optionalChain([finalChatRef, 'access', _521 => _521.metadata, 'optionalAccess', _522 => _522.path]) === "string" ? finalChatRef.metadata.path : null;
16548
16567
  const navWrap = (children) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
16549
16568
  ChatCardNavWrap,
16550
16569
  {
@@ -16568,7 +16587,7 @@ function ChatCardLoader({
16568
16587
  if (!fetchEntry) {
16569
16588
  return finish(entry.render(void 0, finalChatRef, renderOpts));
16570
16589
  }
16571
- if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _522 => _522.skeleton, 'optionalCall', _523 => _523()]), () => ( null)) });
16590
+ if (isLoading) return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, _jsxruntime.Fragment, { children: _nullishCoalesce(_optionalChain([fetchEntry, 'access', _523 => _523.skeleton, 'optionalCall', _524 => _524()]), () => ( null)) });
16572
16591
  if (!item) {
16573
16592
  if (isError) {
16574
16593
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, CardLoadFailure, { label: entry.label, id: finalChatRef.id, detail: "Failed to load" });
@@ -16931,7 +16950,7 @@ function useChunkCatchup({
16931
16950
  if (catchupRun.current === run) {
16932
16951
  if (currentDialogId !== dialogIdRef.current) {
16933
16952
  catchupRun.current = null;
16934
- if (_optionalChain([pendingCatchupRef, 'access', _524 => _524.current, 'optionalAccess', _525 => _525.dialogId]) === currentDialogId) {
16953
+ if (_optionalChain([pendingCatchupRef, 'access', _525 => _525.current, 'optionalAccess', _526 => _526.dialogId]) === currentDialogId) {
16935
16954
  pendingCatchupRef.current = null;
16936
16955
  }
16937
16956
  } else {
@@ -16942,7 +16961,7 @@ function useChunkCatchup({
16942
16961
  if (pending.dialogId === currentDialogId) {
16943
16962
  rearmForQueuedCatchup();
16944
16963
  try {
16945
- await _optionalChain([catchUpChunksRef, 'access', _526 => _526.current, 'optionalCall', _527 => _527(pending.fromSequenceId)]);
16964
+ await _optionalChain([catchUpChunksRef, 'access', _527 => _527.current, 'optionalCall', _528 => _528(pending.fromSequenceId)]);
16946
16965
  } catch (rerunError) {
16947
16966
  console.error("Queued catch-up re-run failed:", rerunError);
16948
16967
  }
@@ -17009,7 +17028,7 @@ function useChunkCatchup({
17009
17028
 
17010
17029
  var EMPTY_FRAME = { messages: [], phase: "idle", typing: false, delayMs: 0 };
17011
17030
  function prefersReducedMotion() {
17012
- return typeof window !== "undefined" && _optionalChain([window, 'access', _528 => _528.matchMedia, 'optionalCall', _529 => _529("(prefers-reduced-motion: reduce)"), 'access', _530 => _530.matches]) === true;
17031
+ return typeof window !== "undefined" && _optionalChain([window, 'access', _529 => _529.matchMedia, 'optionalCall', _530 => _530("(prefers-reduced-motion: reduce)"), 'access', _531 => _531.matches]) === true;
17013
17032
  }
17014
17033
  function useScriptedStream(frames, resetKey, enabled = true) {
17015
17034
  const [index, setIndex] = _react.useState.call(void 0, 0);
@@ -17020,7 +17039,7 @@ function useScriptedStream(frames, resetKey, enabled = true) {
17020
17039
  setIndex(0);
17021
17040
  }
17022
17041
  _react.useEffect.call(void 0, () => {
17023
- const mq = _optionalChain([window, 'access', _531 => _531.matchMedia, 'optionalCall', _532 => _532("(prefers-reduced-motion: reduce)")]);
17042
+ const mq = _optionalChain([window, 'access', _532 => _532.matchMedia, 'optionalCall', _533 => _533("(prefers-reduced-motion: reduce)")]);
17024
17043
  const sync = () => setReducedMotion(mq ? mq.matches : prefersReducedMotion());
17025
17044
  sync();
17026
17045
  if (!mq) return void 0;
@@ -17163,7 +17182,7 @@ function useJetStreamDialogSubscription({
17163
17182
  const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
17164
17183
  conn: sharedConn,
17165
17184
  wsUrl,
17166
- onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _533 => _533.current, 'optionalCall', _534 => _534()]),
17185
+ onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _534 => _534.current, 'optionalCall', _535 => _535()]),
17167
17186
  backoff: reconnectionBackoffRef.current,
17168
17187
  getFreshUrl: () => getNatsWsUrlRef.current(),
17169
17188
  // JetStream emits 'error' for protocol-level failures (e.g. -ERR Permissions
@@ -17178,7 +17197,7 @@ function useJetStreamDialogSubscription({
17178
17197
  setReconnectionCount((c) => c + 1);
17179
17198
  }
17180
17199
  hadConnectionBeforeRef.current = true;
17181
- _optionalChain([onConnectRef, 'access', _535 => _535.current, 'optionalCall', _536 => _536()]);
17200
+ _optionalChain([onConnectRef, 'access', _536 => _536.current, 'optionalCall', _537 => _537()]);
17182
17201
  }
17183
17202
  if (status === "error") {
17184
17203
  console.warn("[JetStream] NATS protocol error:", evt.data);
@@ -17188,7 +17207,7 @@ function useJetStreamDialogSubscription({
17188
17207
  setIsConnected(false);
17189
17208
  setIsSubscribed(false);
17190
17209
  tearDownSubscription();
17191
- _optionalChain([onDisconnectRef, 'access', _537 => _537.current, 'optionalCall', _538 => _538()]);
17210
+ _optionalChain([onDisconnectRef, 'access', _538 => _538.current, 'optionalCall', _539 => _539()]);
17192
17211
  }
17193
17212
  }
17194
17213
  });
@@ -17314,7 +17333,7 @@ function useJetStreamDialogSubscription({
17314
17333
  }
17315
17334
  subscriptionRef.current = handle;
17316
17335
  setIsSubscribed(true);
17317
- _optionalChain([onSubscribedRef, 'access', _539 => _539.current, 'optionalCall', _540 => _540()]);
17336
+ _optionalChain([onSubscribedRef, 'access', _540 => _540.current, 'optionalCall', _541 => _541()]);
17318
17337
  } catch (e52) {
17319
17338
  if (!cancelled) {
17320
17339
  setIsSubscribed(false);
@@ -17430,20 +17449,20 @@ function useNatsDialogSubscription({
17430
17449
  const tearDownSubscriptions = () => {
17431
17450
  subscriptionRefs.current.forEach((sub) => {
17432
17451
  try {
17433
- _optionalChain([sub, 'optionalAccess', _541 => _541.unsubscribe, 'call', _542 => _542()]);
17452
+ _optionalChain([sub, 'optionalAccess', _542 => _542.unsubscribe, 'call', _543 => _543()]);
17434
17453
  } catch (e54) {
17435
17454
  }
17436
17455
  });
17437
17456
  subscriptionRefs.current.clear();
17438
17457
  lastSubscribedDialogIdRef.current = null;
17439
- _optionalChain([abortControllerRef, 'access', _543 => _543.current, 'optionalAccess', _544 => _544.abort, 'call', _545 => _545()]);
17458
+ _optionalChain([abortControllerRef, 'access', _544 => _544.current, 'optionalAccess', _545 => _545.abort, 'call', _546 => _546()]);
17440
17459
  abortControllerRef.current = null;
17441
17460
  };
17442
17461
  const isDisconnectStatus = (status) => status === "closed" || status === "disconnected";
17443
17462
  const lifecycle = _chunkI5JVSFNVcjs.startConnectionLifecycle.call(void 0, {
17444
17463
  conn: sharedConn,
17445
17464
  wsUrl,
17446
- onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _546 => _546.current, 'optionalCall', _547 => _547()]),
17465
+ onBeforeReconnect: () => _optionalChain([onBeforeReconnectRef, 'access', _547 => _547.current, 'optionalCall', _548 => _548()]),
17447
17466
  backoff: reconnectionBackoffRef.current,
17448
17467
  getFreshUrl: () => getNatsWsUrlRef.current(),
17449
17468
  shouldRetryOn: isDisconnectStatus,
@@ -17454,7 +17473,7 @@ function useNatsDialogSubscription({
17454
17473
  setReconnectionCount((c) => c + 1);
17455
17474
  }
17456
17475
  hadConnectionBeforeRef.current = true;
17457
- _optionalChain([onConnectRef, 'access', _548 => _548.current, 'optionalCall', _549 => _549()]);
17476
+ _optionalChain([onConnectRef, 'access', _549 => _549.current, 'optionalCall', _550 => _550()]);
17458
17477
  }
17459
17478
  if (status === "error") {
17460
17479
  console.warn("[NATS] protocol error:", evt.data);
@@ -17464,7 +17483,7 @@ function useNatsDialogSubscription({
17464
17483
  setIsConnected(false);
17465
17484
  setIsSubscribed(false);
17466
17485
  tearDownSubscriptions();
17467
- _optionalChain([onDisconnectRef, 'access', _550 => _550.current, 'optionalCall', _551 => _551()]);
17486
+ _optionalChain([onDisconnectRef, 'access', _551 => _551.current, 'optionalCall', _552 => _552()]);
17468
17487
  }
17469
17488
  }
17470
17489
  });
@@ -17495,13 +17514,13 @@ function useNatsDialogSubscription({
17495
17514
  setIsSubscribed(false);
17496
17515
  subscriptionRefs.current.forEach((sub) => {
17497
17516
  try {
17498
- _optionalChain([sub, 'optionalAccess', _552 => _552.unsubscribe, 'call', _553 => _553()]);
17517
+ _optionalChain([sub, 'optionalAccess', _553 => _553.unsubscribe, 'call', _554 => _554()]);
17499
17518
  } catch (e55) {
17500
17519
  }
17501
17520
  });
17502
17521
  subscriptionRefs.current.clear();
17503
17522
  lastSubscribedDialogIdRef.current = null;
17504
- _optionalChain([abortControllerRef, 'access', _554 => _554.current, 'optionalAccess', _555 => _555.abort, 'call', _556 => _556()]);
17523
+ _optionalChain([abortControllerRef, 'access', _555 => _555.current, 'optionalAccess', _556 => _556.abort, 'call', _557 => _557()]);
17505
17524
  abortControllerRef.current = null;
17506
17525
  }
17507
17526
  return void 0;
@@ -17513,12 +17532,12 @@ function useNatsDialogSubscription({
17513
17532
  if (subscriptionRefs.current.size > 0) {
17514
17533
  subscriptionRefs.current.forEach((sub) => {
17515
17534
  try {
17516
- _optionalChain([sub, 'optionalAccess', _557 => _557.unsubscribe, 'call', _558 => _558()]);
17535
+ _optionalChain([sub, 'optionalAccess', _558 => _558.unsubscribe, 'call', _559 => _559()]);
17517
17536
  } catch (e56) {
17518
17537
  }
17519
17538
  });
17520
17539
  subscriptionRefs.current.clear();
17521
- _optionalChain([abortControllerRef, 'access', _559 => _559.current, 'optionalAccess', _560 => _560.abort, 'call', _561 => _561()]);
17540
+ _optionalChain([abortControllerRef, 'access', _560 => _560.current, 'optionalAccess', _561 => _561.abort, 'call', _562 => _562()]);
17522
17541
  }
17523
17542
  abortControllerRef.current = new AbortController();
17524
17543
  const abort = abortControllerRef.current;
@@ -17548,7 +17567,7 @@ function useNatsDialogSubscription({
17548
17567
  });
17549
17568
  lastSubscribedDialogIdRef.current = dialogId;
17550
17569
  setIsSubscribed(true);
17551
- _optionalChain([onSubscribedRef, 'access', _562 => _562.current, 'optionalCall', _563 => _563()]);
17570
+ _optionalChain([onSubscribedRef, 'access', _563 => _563.current, 'optionalCall', _564 => _564()]);
17552
17571
  };
17553
17572
  if (isConnectedRef.current) {
17554
17573
  createSubscriptions();
@@ -17559,7 +17578,7 @@ function useNatsDialogSubscription({
17559
17578
  abort.abort();
17560
17579
  subscriptions.forEach((sub) => {
17561
17580
  try {
17562
- _optionalChain([sub, 'optionalAccess', _564 => _564.unsubscribe, 'call', _565 => _565()]);
17581
+ _optionalChain([sub, 'optionalAccess', _565 => _565.unsubscribe, 'call', _566 => _566()]);
17563
17582
  } catch (e58) {
17564
17583
  }
17565
17584
  });
@@ -17598,7 +17617,7 @@ function useNatsDialogSubscription({
17598
17617
  });
17599
17618
  lastSubscribedDialogIdRef.current = currentDialogId;
17600
17619
  setIsSubscribed(true);
17601
- _optionalChain([onSubscribedRef, 'access', _566 => _566.current, 'optionalCall', _567 => _567()]);
17620
+ _optionalChain([onSubscribedRef, 'access', _567 => _567.current, 'optionalCall', _568 => _568()]);
17602
17621
  } else if (subscriptionRefs.current.size > 0) {
17603
17622
  setIsSubscribed(true);
17604
17623
  }
@@ -17606,10 +17625,10 @@ function useNatsDialogSubscription({
17606
17625
  return { isConnected, isSubscribed, reconnectionCount };
17607
17626
  }
17608
17627
  function buildNatsWsUrl(apiBaseUrl, options) {
17609
- const path = _optionalChain([options, 'optionalAccess', _568 => _568.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
17628
+ const path = _optionalChain([options, 'optionalAccess', _569 => _569.source]) === "dashboard" ? "/ws/nats-api" : "/ws/nats";
17610
17629
  const u = new URL(path, apiBaseUrl);
17611
17630
  u.protocol = u.protocol === "https:" ? "wss:" : "ws:";
17612
- if (_optionalChain([options, 'optionalAccess', _569 => _569.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _570 => _570.token])) {
17631
+ if (_optionalChain([options, 'optionalAccess', _570 => _570.includeAuthParam]) && _optionalChain([options, 'optionalAccess', _571 => _571.token])) {
17613
17632
  u.searchParams.set("authorization", options.token);
17614
17633
  }
17615
17634
  return u.toString();
@@ -17627,7 +17646,7 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
17627
17646
  const data = await res.json();
17628
17647
  return _nullishCoalesce(data.commands, () => ( []));
17629
17648
  } catch (err) {
17630
- if (_optionalChain([err, 'optionalAccess', _571 => _571.name]) === "AbortError") throw err;
17649
+ if (_optionalChain([err, 'optionalAccess', _572 => _572.name]) === "AbortError") throw err;
17631
17650
  console.warn("[chat] slash-commands fetch failed, showing none:", err);
17632
17651
  return [];
17633
17652
  }
@@ -17635,8 +17654,8 @@ async function fetchSlashCommands(prefix, signal, commandsUrl) {
17635
17654
  var NO_COMMANDS = [];
17636
17655
  function useSlashCommands(prefix, commandsUrl) {
17637
17656
  const [answered, setAnswered] = _react.useState.call(void 0, null);
17638
- const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _572 => _572.prefix]) === prefix ? answered.commands : NO_COMMANDS;
17639
- const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _573 => _573.prefix]) !== prefix;
17657
+ const commands = prefix != null && _optionalChain([answered, 'optionalAccess', _573 => _573.prefix]) === prefix ? answered.commands : NO_COMMANDS;
17658
+ const loading = prefix != null && _optionalChain([answered, 'optionalAccess', _574 => _574.prefix]) !== prefix;
17640
17659
  _react.useEffect.call(void 0, () => {
17641
17660
  if (prefix == null) return void 0;
17642
17661
  let cancelled = false;
@@ -17646,7 +17665,7 @@ function useSlashCommands(prefix, commandsUrl) {
17646
17665
  const next = await fetchSlashCommands(prefix, ctrl.signal, commandsUrl);
17647
17666
  if (!cancelled) setAnswered({ prefix, commands: next });
17648
17667
  } catch (err) {
17649
- if (!cancelled && _optionalChain([err, 'optionalAccess', _574 => _574.name]) !== "AbortError") {
17668
+ if (!cancelled && _optionalChain([err, 'optionalAccess', _575 => _575.name]) !== "AbortError") {
17650
17669
  console.warn("[use-slash-commands] fetch failed:", err);
17651
17670
  setAnswered({ prefix, commands: NO_COMMANDS });
17652
17671
  }
@@ -17669,7 +17688,7 @@ function useSlashCommandRegistry(commandsUrl, options) {
17669
17688
  const query = _reactquery.useQuery.call(void 0, {
17670
17689
  queryKey: ["chat-slash-commands", commandsUrl],
17671
17690
  queryFn: ({ signal }) => fetchSlashCommands("", signal, commandsUrl),
17672
- enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _575 => _575.enabled]), () => ( true)),
17691
+ enabled: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _576 => _576.enabled]), () => ( true)),
17673
17692
  staleTime: Infinity,
17674
17693
  gcTime: Infinity,
17675
17694
  // The commands registry is non-critical chrome — a failure degrades to an
@@ -17708,21 +17727,21 @@ async function fetchEmptyStateConfig(signal, emptyStateUrl) {
17708
17727
  }
17709
17728
  const data = await res.json();
17710
17729
  return {
17711
- name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _576 => _576.name]), () => ( null)),
17712
- icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _577 => _577.icon]), () => ( null)),
17713
- greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _578 => _578.greeting]), () => ( null)),
17714
- enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _579 => _579.enabledRagTableIds]), () => ( [])),
17715
- quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _580 => _580.quickActions]), () => ( [])),
17716
- suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _581 => _581.suggestedQueries]), () => ( []))
17730
+ name: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _577 => _577.name]), () => ( null)),
17731
+ icon: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _578 => _578.icon]), () => ( null)),
17732
+ greeting: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _579 => _579.greeting]), () => ( null)),
17733
+ enabledRagTableIds: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _580 => _580.enabledRagTableIds]), () => ( [])),
17734
+ quickActions: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _581 => _581.quickActions]), () => ( [])),
17735
+ suggestedQueries: _nullishCoalesce(_optionalChain([data, 'optionalAccess', _582 => _582.suggestedQueries]), () => ( []))
17717
17736
  };
17718
17737
  } catch (err) {
17719
- if (_optionalChain([err, 'optionalAccess', _582 => _582.name]) === "AbortError") throw err;
17738
+ if (_optionalChain([err, 'optionalAccess', _583 => _583.name]) === "AbortError") throw err;
17720
17739
  console.warn("[chat] empty-state config fetch failed, using neutral defaults:", err);
17721
17740
  return EMPTY_STATE_FALLBACK;
17722
17741
  }
17723
17742
  }
17724
17743
  function useEmptyStateConfig(emptyStateUrl, options) {
17725
- const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _583 => _583.enabled]), () => ( true))) && !!emptyStateUrl;
17744
+ const enabled = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _584 => _584.enabled]), () => ( true))) && !!emptyStateUrl;
17726
17745
  const query = _reactquery.useQuery.call(void 0, {
17727
17746
  queryKey: ["chat-empty-state", emptyStateUrl],
17728
17747
  queryFn: ({ signal }) => fetchEmptyStateConfig(signal, emptyStateUrl),
@@ -17751,7 +17770,7 @@ var CHAT_ATTACHMENT_MAX_SIZE_BYTES = 25 * 1024 * 1024;
17751
17770
  var STORAGE_CACHE_CONTROL_IMMUTABLE = "public, max-age=31536000, immutable";
17752
17771
  function uploadWithProgress(url, file, token, onProgress, signal) {
17753
17772
  return new Promise((resolve, reject) => {
17754
- if (_optionalChain([signal, 'optionalAccess', _584 => _584.aborted])) {
17773
+ if (_optionalChain([signal, 'optionalAccess', _585 => _585.aborted])) {
17755
17774
  reject(new Error("Upload cancelled"));
17756
17775
  return;
17757
17776
  }
@@ -17793,7 +17812,7 @@ function uploadWithProgress(url, file, token, onProgress, signal) {
17793
17812
  const handleSignalAbort = () => {
17794
17813
  xhr.abort();
17795
17814
  };
17796
- _optionalChain([signal, 'optionalAccess', _585 => _585.addEventListener, 'call', _586 => _586("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
17815
+ _optionalChain([signal, 'optionalAccess', _586 => _586.addEventListener, 'call', _587 => _587("abort", handleSignalAbort, { once: true, signal: listeners.signal })]);
17797
17816
  xhr.upload.addEventListener("progress", handleProgress, { signal: listeners.signal });
17798
17817
  xhr.addEventListener("load", handleLoad, { signal: listeners.signal });
17799
17818
  xhr.addEventListener("error", handleError, { signal: listeners.signal });
@@ -17837,10 +17856,10 @@ function useChatAttachments() {
17837
17856
  try {
17838
17857
  sniffed = await _filetype.fileTypeFromBlob.call(void 0, att.file);
17839
17858
  } catch (err) {
17840
- if (_optionalChain([ctrl, 'optionalAccess', _587 => _587.signal, 'access', _588 => _588.aborted])) return;
17859
+ if (_optionalChain([ctrl, 'optionalAccess', _588 => _588.signal, 'access', _589 => _589.aborted])) return;
17841
17860
  throw new Error(`Could not read file content: ${err instanceof Error ? err.message : String(err)}`);
17842
17861
  }
17843
- if (_optionalChain([ctrl, 'optionalAccess', _589 => _589.signal, 'access', _590 => _590.aborted])) return;
17862
+ if (_optionalChain([ctrl, 'optionalAccess', _590 => _590.signal, 'access', _591 => _591.aborted])) return;
17844
17863
  if (!sniffed) {
17845
17864
  throw new Error("Unrecognized file format");
17846
17865
  }
@@ -17854,7 +17873,7 @@ function useChatAttachments() {
17854
17873
  const urlResp = await _chunkXOGD2AMEcjs.embedAuthedFetch.call(void 0, uploadUrlEndpoint, {
17855
17874
  method: "POST",
17856
17875
  headers: { "Content-Type": "application/json" },
17857
- signal: _optionalChain([ctrl, 'optionalAccess', _591 => _591.signal]),
17876
+ signal: _optionalChain([ctrl, 'optionalAccess', _592 => _592.signal]),
17858
17877
  body: JSON.stringify({
17859
17878
  fileName: att.file.name,
17860
17879
  // Pass the SNIFFED MIME (not `file.type`, which can be a
@@ -17883,9 +17902,9 @@ function useChatAttachments() {
17883
17902
  (pct) => {
17884
17903
  updateOne(att.id, { progress: pct });
17885
17904
  },
17886
- _optionalChain([ctrl, 'optionalAccess', _592 => _592.signal])
17905
+ _optionalChain([ctrl, 'optionalAccess', _593 => _593.signal])
17887
17906
  );
17888
- if (_optionalChain([ctrl, 'optionalAccess', _593 => _593.signal, 'access', _594 => _594.aborted])) return;
17907
+ if (_optionalChain([ctrl, 'optionalAccess', _594 => _594.signal, 'access', _595 => _595.aborted])) return;
17889
17908
  updateOne(att.id, {
17890
17909
  status: "ready",
17891
17910
  progress: 100,
@@ -17893,7 +17912,7 @@ function useChatAttachments() {
17893
17912
  viewToken: mintData.viewToken
17894
17913
  });
17895
17914
  } catch (err) {
17896
- if (_optionalChain([ctrl, 'optionalAccess', _595 => _595.signal, 'access', _596 => _596.aborted])) return;
17915
+ if (_optionalChain([ctrl, 'optionalAccess', _596 => _596.signal, 'access', _597 => _597.aborted])) return;
17897
17916
  const message = err instanceof Error ? err.message : String(err);
17898
17917
  updateOne(att.id, { status: "error", progress: 0, errorMessage: message });
17899
17918
  } finally {
@@ -18042,11 +18061,11 @@ var ANON_DEFAULTS = {
18042
18061
  function useResolveChatIdentity(enabled) {
18043
18062
  const runtime = _chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, );
18044
18063
  const url = runtime.endpoints.identityUrl;
18045
- const proxyEmail = _nullishCoalesce(_optionalChain([_chunkXOGD2AMEcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _597 => _597.email]), () => ( null));
18064
+ const proxyEmail = _nullishCoalesce(_optionalChain([_chunkXOGD2AMEcjs.getEmbedProxyAuth.call(void 0, ), 'optionalAccess', _598 => _598.email]), () => ( null));
18046
18065
  const requestKey = enabled ? `${url}\0${_nullishCoalesce(proxyEmail, () => ( ""))}` : null;
18047
18066
  const [resolved, setResolved] = _react.useState.call(void 0, null);
18048
- const data = _optionalChain([resolved, 'optionalAccess', _598 => _598.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
18049
- const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _599 => _599.key]) !== requestKey;
18067
+ const data = _optionalChain([resolved, 'optionalAccess', _599 => _599.key]) === requestKey ? resolved.data : ANON_DEFAULTS;
18068
+ const isLoading = requestKey !== null && _optionalChain([resolved, 'optionalAccess', _600 => _600.key]) !== requestKey;
18050
18069
  _react.useEffect.call(void 0, () => {
18051
18070
  if (requestKey === null) return void 0;
18052
18071
  let cancelled = false;
@@ -18193,7 +18212,7 @@ function useChat({
18193
18212
  onMessagesChangeRef.current = onMessagesChange;
18194
18213
  });
18195
18214
  _react.useEffect.call(void 0, () => {
18196
- _optionalChain([onMessagesChangeRef, 'access', _600 => _600.current, 'optionalCall', _601 => _601(messages)]);
18215
+ _optionalChain([onMessagesChangeRef, 'access', _601 => _601.current, 'optionalCall', _602 => _602(messages)]);
18197
18216
  }, [messages]);
18198
18217
  const {
18199
18218
  streamMessage,
@@ -18230,7 +18249,7 @@ function useChat({
18230
18249
  name: "You",
18231
18250
  content: text2,
18232
18251
  timestamp: /* @__PURE__ */ new Date(),
18233
- ..._optionalChain([options, 'optionalAccess', _602 => _602.hidden]) ? { hidden: true } : {}
18252
+ ..._optionalChain([options, 'optionalAccess', _603 => _603.hidden]) ? { hidden: true } : {}
18234
18253
  };
18235
18254
  addMessage(userMessage);
18236
18255
  setIsTyping(true);
@@ -18444,7 +18463,7 @@ function buildConfirmToolBody(request) {
18444
18463
  async function readServerErrorMessage(response) {
18445
18464
  try {
18446
18465
  const body = await response.json();
18447
- if (typeof _optionalChain([body, 'optionalAccess', _603 => _603.error]) === "string" && body.error.length > 0) return body.error;
18466
+ if (typeof _optionalChain([body, 'optionalAccess', _604 => _604.error]) === "string" && body.error.length > 0) return body.error;
18448
18467
  } catch (e60) {
18449
18468
  }
18450
18469
  return null;
@@ -18751,7 +18770,7 @@ function youtubeVideoId(value) {
18751
18770
  const hostname = parsed.hostname.toLowerCase();
18752
18771
  const isYoutubeHost = hostname === "youtu.be" || hostname === "youtube.com" || hostname.endsWith(".youtube.com");
18753
18772
  if (!isYoutubeHost) return void 0;
18754
- const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access', _604 => _604.exec, 'call', _605 => _605(parsed.pathname), 'optionalAccess', _606 => _606[1]]);
18773
+ const fromPath = hostname === "youtu.be" ? parsed.pathname.split("/").filter(Boolean)[0] : _optionalChain([/^\/(?:embed|v|shorts)\/([A-Za-z0-9_-]{11})(?:\/|$)/, 'access', _605 => _605.exec, 'call', _606 => _606(parsed.pathname), 'optionalAccess', _607 => _607[1]]);
18755
18774
  const id = _nullishCoalesce(_nullishCoalesce(fromPath, () => ( parsed.searchParams.get("v"))), () => ( void 0));
18756
18775
  return id && YOUTUBE_ID.test(id) ? id : void 0;
18757
18776
  }
@@ -18870,11 +18889,11 @@ function cards(value, decodedSources) {
18870
18889
  {
18871
18890
  type,
18872
18891
  id,
18873
- title: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _607 => _607.name]), () => ( id)),
18874
- url: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _608 => _608.externalUrl]), () => ( null)),
18875
- ..._optionalChain([source, 'optionalAccess', _609 => _609.sourceRepo]) ? { sourceRepo: source.sourceRepo } : {},
18876
- ..._optionalChain([source, 'optionalAccess', _610 => _610.targetPlatform]) !== void 0 ? { targetPlatform: source.targetPlatform } : {},
18877
- ..._optionalChain([source, 'optionalAccess', _611 => _611.path]) ? { metadata: { path: source.path } } : {}
18892
+ title: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _608 => _608.name]), () => ( id)),
18893
+ url: _nullishCoalesce(_optionalChain([source, 'optionalAccess', _609 => _609.externalUrl]), () => ( null)),
18894
+ ..._optionalChain([source, 'optionalAccess', _610 => _610.sourceRepo]) ? { sourceRepo: source.sourceRepo } : {},
18895
+ ..._optionalChain([source, 'optionalAccess', _611 => _611.targetPlatform]) !== void 0 ? { targetPlatform: source.targetPlatform } : {},
18896
+ ..._optionalChain([source, 'optionalAccess', _612 => _612.path]) ? { metadata: { path: source.path } } : {}
18878
18897
  }
18879
18898
  ];
18880
18899
  });
@@ -18900,11 +18919,11 @@ function sourceMetadataEvent(payload) {
18900
18919
  }
18901
18920
  function mergeSourceMetadata(previous, event) {
18902
18921
  const byIndex = /* @__PURE__ */ new Map();
18903
- for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _612 => _612.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
18922
+ for (const source of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _613 => _613.sources]), () => ( [])), ..._nullishCoalesce(event.sources, () => ( []))]) {
18904
18923
  if (!byIndex.has(source.index)) byIndex.set(source.index, source);
18905
18924
  }
18906
18925
  const byIdentity = /* @__PURE__ */ new Map();
18907
- for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _613 => _613.refs]), () => ( [])), ..._nullishCoalesce(event.refs, () => ( []))]) {
18926
+ for (const ref of [..._nullishCoalesce(_optionalChain([previous, 'optionalAccess', _614 => _614.refs]), () => ( [])), ..._nullishCoalesce(event.refs, () => ( []))]) {
18908
18927
  const identity = `${ref.type}:${ref.id}`;
18909
18928
  if (!byIdentity.has(identity)) byIdentity.set(identity, ref);
18910
18929
  }
@@ -18990,9 +19009,9 @@ function appendToTrailingAssistant(prev, segments) {
18990
19009
  for (const seg of segments) {
18991
19010
  const tail = merged[merged.length - 1];
18992
19011
  const key = upsertKey(seg);
18993
- if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _614 => _614.type]) === "text") {
19012
+ if (seg.type === "text" && _optionalChain([tail, 'optionalAccess', _615 => _615.type]) === "text") {
18994
19013
  merged[merged.length - 1] = { type: "text", text: tail.text + seg.text };
18995
- } else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _615 => _615.type]) === "thinking") {
19014
+ } else if (seg.type === "thinking" && _optionalChain([tail, 'optionalAccess', _616 => _616.type]) === "thinking") {
18996
19015
  merged[merged.length - 1] = { type: "thinking", text: tail.text + seg.text };
18997
19016
  } else if (key) {
18998
19017
  let idx = merged.findIndex((m) => upsertKey(m) === key);
@@ -19033,7 +19052,7 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
19033
19052
  }
19034
19053
  if (s.type !== "approval_batch") return s;
19035
19054
  const isAnchor = s.data.approvalRequestId === requestId;
19036
- const hasRow = _optionalChain([s, 'access', _616 => _616.data, 'access', _617 => _617.toolCalls, 'optionalAccess', _618 => _618.some, 'call', _619 => _619((c) => c.toolExecutionRequestId === requestId)]);
19055
+ const hasRow = _optionalChain([s, 'access', _617 => _617.data, 'access', _618 => _618.toolCalls, 'optionalAccess', _619 => _619.some, 'call', _620 => _620((c) => c.toolExecutionRequestId === requestId)]);
19037
19056
  if (!isAnchor && !hasRow) return s;
19038
19057
  const nextResolvedBy = _nullishCoalesce(resolvedByName, () => ( s.resolvedByName));
19039
19058
  const nextExecutions = hasRow ? {
@@ -19055,8 +19074,8 @@ function applyApprovalStatusToSegment(s, requestId, status, resolvedByName) {
19055
19074
  };
19056
19075
  }
19057
19076
  function nextBatchExecution(prevExec, toolData) {
19058
- if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _620 => _620.status]) === "done") return null;
19059
- return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _621 => _621.result]), success: _optionalChain([prevExec, 'optionalAccess', _622 => _622.success]) };
19077
+ if (toolData.type === "EXECUTING_TOOL" && _optionalChain([prevExec, 'optionalAccess', _621 => _621.status]) === "done") return null;
19078
+ return toolData.type === "EXECUTED_TOOL" ? { status: "done", result: toolData.result, success: toolData.success } : { status: "executing", result: _optionalChain([prevExec, 'optionalAccess', _622 => _622.result]), success: _optionalChain([prevExec, 'optionalAccess', _623 => _623.success]) };
19060
19079
  }
19061
19080
  function withBatchExecution(seg, execId, state) {
19062
19081
  return {
@@ -19073,11 +19092,11 @@ function projectBatchStatusToMessages(prev, anchorId, status) {
19073
19092
  }
19074
19093
  function projectBatchRowFailureToMessages(prev, rowRequestId) {
19075
19094
  return mapSegments(prev, (s) => {
19076
- if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _623 => _623.data, 'access', _624 => _624.toolCalls, 'optionalAccess', _625 => _625.some, 'call', _626 => _626((c) => c.toolExecutionRequestId === rowRequestId)])) {
19095
+ if (s.type !== "approval_batch" || !_optionalChain([s, 'access', _624 => _624.data, 'access', _625 => _625.toolCalls, 'optionalAccess', _626 => _626.some, 'call', _627 => _627((c) => c.toolExecutionRequestId === rowRequestId)])) {
19077
19096
  return s;
19078
19097
  }
19079
- const existing = _optionalChain([s, 'access', _627 => _627.data, 'access', _628 => _628.executions, 'optionalAccess', _629 => _629[rowRequestId]]);
19080
- if (_optionalChain([existing, 'optionalAccess', _630 => _630.status]) === "done") return s;
19098
+ const existing = _optionalChain([s, 'access', _628 => _628.data, 'access', _629 => _629.executions, 'optionalAccess', _630 => _630[rowRequestId]]);
19099
+ if (_optionalChain([existing, 'optionalAccess', _631 => _631.status]) === "done") return s;
19081
19100
  return withBatchExecution(s, rowRequestId, { status: "done", success: false });
19082
19101
  });
19083
19102
  }
@@ -19113,7 +19132,7 @@ function mergeToolExecutionIfPresent(prev, segment) {
19113
19132
  for (let j = message.segments.length - 1; j >= 0; j--) {
19114
19133
  const seg = message.segments[j];
19115
19134
  if (execId && seg.type === "approval_batch" && seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId)) {
19116
- const prevExec = _optionalChain([seg, 'access', _631 => _631.data, 'access', _632 => _632.executions, 'optionalAccess', _633 => _633[execId]]);
19135
+ const prevExec = _optionalChain([seg, 'access', _632 => _632.data, 'access', _633 => _633.executions, 'optionalAccess', _634 => _634[execId]]);
19117
19136
  const nextExec = nextBatchExecution(prevExec, toolData);
19118
19137
  if (nextExec === null) return prev;
19119
19138
  if (sameExecutionState(prevExec, nextExec)) return prev;
@@ -19286,9 +19305,9 @@ var MessageSegmentAccumulator = class {
19286
19305
  type: "tool_execution",
19287
19306
  data: {
19288
19307
  ...toolData,
19289
- toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _634 => _634.data, 'access', _635 => _635.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _636 => _636.toolTitle]))),
19290
- toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _637 => _637.data, 'access', _638 => _638.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _639 => _639.toolExplanation]))),
19291
- parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _640 => _640.parameters])
19308
+ toolTitle: _nullishCoalesce(_nullishCoalesce(toolData.toolTitle, () => ( _optionalChain([existingExecuting, 'optionalAccess', _635 => _635.data, 'access', _636 => _636.toolTitle]))), () => ( _optionalChain([executingTool, 'optionalAccess', _637 => _637.toolTitle]))),
19309
+ toolExplanation: _nullishCoalesce(_nullishCoalesce(toolData.toolExplanation, () => ( _optionalChain([existingExecuting, 'optionalAccess', _638 => _638.data, 'access', _639 => _639.toolExplanation]))), () => ( _optionalChain([executingTool, 'optionalAccess', _640 => _640.toolExplanation]))),
19310
+ parameters: toolData.parameters || _optionalChain([executingTool, 'optionalAccess', _641 => _641.parameters])
19292
19311
  }
19293
19312
  };
19294
19313
  if (existingIndex !== -1) {
@@ -19312,7 +19331,7 @@ var MessageSegmentAccumulator = class {
19312
19331
  if (seg.type !== "approval_batch") return seg;
19313
19332
  const hasCall = seg.data.toolCalls.some((c) => c.toolExecutionRequestId === execId);
19314
19333
  if (!hasCall) return seg;
19315
- const prev = _optionalChain([seg, 'access', _641 => _641.data, 'access', _642 => _642.executions, 'optionalAccess', _643 => _643[execId]]);
19334
+ const prev = _optionalChain([seg, 'access', _642 => _642.data, 'access', _643 => _643.executions, 'optionalAccess', _644 => _644[execId]]);
19316
19335
  const next = nextBatchExecution(prev, toolData);
19317
19336
  matched = true;
19318
19337
  if (next === null) return seg;
@@ -19446,8 +19465,8 @@ var MessageSegmentAccumulator = class {
19446
19465
  requestId,
19447
19466
  {
19448
19467
  ...pendingApproval,
19449
- command: _optionalChain([pendingApproval, 'optionalAccess', _644 => _644.command]) || "",
19450
- approvalType: _optionalChain([pendingApproval, 'optionalAccess', _645 => _645.approvalType]) || approvalType
19468
+ command: _optionalChain([pendingApproval, 'optionalAccess', _645 => _645.command]) || "",
19469
+ approvalType: _optionalChain([pendingApproval, 'optionalAccess', _646 => _646.approvalType]) || approvalType
19451
19470
  },
19452
19471
  status
19453
19472
  );
@@ -19472,9 +19491,9 @@ var MessageSegmentAccumulator = class {
19472
19491
  type: "escalation_offer",
19473
19492
  // The resolved chunk carries no text/origin — a redelivered offer must
19474
19493
  // not blank the card the PENDING chunk already painted.
19475
- data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess', _646 => _646.data, 'access', _647 => _647.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _648 => _648.data, 'access', _649 => _649.origin]))) },
19494
+ data: { offerId, text: text2 || _optionalChain([existing, 'optionalAccess', _647 => _647.data, 'access', _648 => _648.text]) || "", origin: _nullishCoalesce(origin, () => ( _optionalChain([existing, 'optionalAccess', _649 => _649.data, 'access', _650 => _650.origin]))) },
19476
19495
  status,
19477
- resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _650 => _650.resolvedByName]))),
19496
+ resolvedByName: _nullishCoalesce(resolvedByName, () => ( _optionalChain([existing, 'optionalAccess', _651 => _651.resolvedByName]))),
19478
19497
  onApprove: this.callbacks.onEscalationApprove,
19479
19498
  onReject: this.callbacks.onEscalationReject
19480
19499
  };
@@ -19799,7 +19818,7 @@ function createChatStreamReducer(options = {}) {
19799
19818
  let stateCache = null;
19800
19819
  function invalidate() {
19801
19820
  stateCache = null;
19802
- _optionalChain([onChange, 'optionalCall', _651 => _651()]);
19821
+ _optionalChain([onChange, 'optionalCall', _652 => _652()]);
19803
19822
  }
19804
19823
  function getState() {
19805
19824
  if (!stateCache) {
@@ -19815,7 +19834,7 @@ function createChatStreamReducer(options = {}) {
19815
19834
  return stateCache;
19816
19835
  }
19817
19836
  function emit(name, ...args) {
19818
- _optionalChain([onEffect, 'optionalCall', _652 => _652({ name, args })]);
19837
+ _optionalChain([onEffect, 'optionalCall', _653 => _653({ name, args })]);
19819
19838
  }
19820
19839
  function setMessagesInternal(next) {
19821
19840
  if (next !== messages) {
@@ -19858,12 +19877,12 @@ function createChatStreamReducer(options = {}) {
19858
19877
  return stampTrailingAssistantSourceMetadata(stampTrailingAssistantSeq(next, seq));
19859
19878
  }
19860
19879
  function applySegmentsToState(segments, meta) {
19861
- const seq = _optionalChain([meta, 'optionalAccess', _653 => _653.streamSeq]);
19862
- if (_optionalChain([meta, 'optionalAccess', _654 => _654.append]) && meta.isCompacting) {
19880
+ const seq = _optionalChain([meta, 'optionalAccess', _654 => _654.streamSeq]);
19881
+ if (_optionalChain([meta, 'optionalAccess', _655 => _655.append]) && meta.isCompacting) {
19863
19882
  setMessagesInternal(commitTrailingAssistant(upsertTrailingCompaction(messages, segments), seq));
19864
19883
  return;
19865
19884
  }
19866
- if (_optionalChain([meta, 'optionalAccess', _655 => _655.append])) {
19885
+ if (_optionalChain([meta, 'optionalAccess', _656 => _656.append])) {
19867
19886
  setMessagesInternal(commitTrailingAssistant(appendToTrailingAssistant(messages, segments), seq));
19868
19887
  return;
19869
19888
  }
@@ -19875,7 +19894,7 @@ function createChatStreamReducer(options = {}) {
19875
19894
  adoptTrailingAssistant = false;
19876
19895
  const last = messages[messages.length - 1];
19877
19896
  if (!last || last.role !== "assistant" || adoptTail) return;
19878
- const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _656 => _656.segments, 'optionalAccess', _657 => _657.length]), () => ( 0))) > 0 || last.content !== "";
19897
+ const hasContent = (_nullishCoalesce(_optionalChain([last, 'access', _657 => _657.segments, 'optionalAccess', _658 => _658.length]), () => ( 0))) > 0 || last.content !== "";
19879
19898
  if (!hasContent) return;
19880
19899
  setMessagesInternal([...messages, { id: nextId("assistant"), role: "assistant", content: "", segments: [] }]);
19881
19900
  }
@@ -20094,13 +20113,13 @@ function createChatStreamReducer(options = {}) {
20094
20113
  const summary = required ? getCommandText(required) : `Batch of ${toolCalls.length} tool calls`;
20095
20114
  pendingEscalated.set(requestId, {
20096
20115
  command: summary,
20097
- explanation: _optionalChain([required, 'optionalAccess', _658 => _658.toolExplanation]),
20116
+ explanation: _optionalChain([required, 'optionalAccess', _659 => _659.toolExplanation]),
20098
20117
  approvalType,
20099
20118
  toolCalls
20100
20119
  });
20101
20120
  emit("onEscalatedApproval", requestId, {
20102
20121
  command: summary,
20103
- explanation: _optionalChain([required, 'optionalAccess', _659 => _659.toolExplanation]),
20122
+ explanation: _optionalChain([required, 'optionalAccess', _660 => _660.toolExplanation]),
20104
20123
  approvalType
20105
20124
  });
20106
20125
  break;
@@ -20484,7 +20503,7 @@ function createChatStreamReducer(options = {}) {
20484
20503
  const resolveBatch = (status, confirm) => async () => {
20485
20504
  setMessagesInternal(projectBatchStatusToMessages(messages, anchorId, status));
20486
20505
  for (const id of ids) {
20487
- const ok = await _optionalChain([confirm, 'optionalCall', _660 => _660(id)]);
20506
+ const ok = await _optionalChain([confirm, 'optionalCall', _661 => _661(id)]);
20488
20507
  if (ok === false) {
20489
20508
  setMessagesInternal(projectBatchRowFailureToMessages(messages, id));
20490
20509
  }
@@ -20620,8 +20639,8 @@ function createChatStreamReducer(options = {}) {
20620
20639
  }
20621
20640
  }
20622
20641
  }
20623
- hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _661 => _661.resumed]), () => ( messages.length > 0)));
20624
- if (_optionalChain([extras, 'optionalAccess', _662 => _662.agentBusy])) agentBusyState();
20642
+ hasEverStreamed = hasEverStreamed || (_nullishCoalesce(_optionalChain([extras, 'optionalAccess', _662 => _662.resumed]), () => ( messages.length > 0)));
20643
+ if (_optionalChain([extras, 'optionalAccess', _663 => _663.agentBusy])) agentBusyState();
20625
20644
  invalidate();
20626
20645
  }
20627
20646
  return {
@@ -20706,7 +20725,7 @@ function createChatStreamReducer(options = {}) {
20706
20725
  },
20707
20726
  endSseTurn() {
20708
20727
  const last = messages[messages.length - 1];
20709
- if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _663 => _663.segments, 'optionalAccess', _664 => _664.length]), () => ( 0))) === 0 && last.content === "") {
20728
+ if (last && last.role === "assistant" && (_nullishCoalesce(_optionalChain([last, 'access', _664 => _664.segments, 'optionalAccess', _665 => _665.length]), () => ( 0))) === 0 && last.content === "") {
20710
20729
  messages = messages.slice(0, -1);
20711
20730
  }
20712
20731
  sseCurrentText = "";
@@ -20859,10 +20878,10 @@ function createChatDialogStore(options = {}) {
20859
20878
  if (onEvict) {
20860
20879
  const sep = key.indexOf(KEY_SEP);
20861
20880
  onEvict(key.slice(0, sep), key.slice(sep + 1), {
20862
- messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _665 => _665.state, 'access', _666 => _666.messages]), () => ( EMPTY_STATE.messages)),
20863
- approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _667 => _667.state, 'access', _668 => _668.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
20864
- lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _669 => _669.getLastAppliedSeq, 'call', _670 => _670()]), () => ( Number.NEGATIVE_INFINITY)),
20865
- pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _671 => _671.getPendingEchoes, 'call', _672 => _672()]), () => ( EMPTY_PENDING_ECHOES))
20881
+ messages: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _666 => _666.state, 'access', _667 => _667.messages]), () => ( EMPTY_STATE.messages)),
20882
+ approvalStatuses: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _668 => _668.state, 'access', _669 => _669.approvalStatuses]), () => ( EMPTY_STATE.approvalStatuses)),
20883
+ lastAppliedSeq: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _670 => _670.getLastAppliedSeq, 'call', _671 => _671()]), () => ( Number.NEGATIVE_INFINITY)),
20884
+ pendingEchoes: _nullishCoalesce(_optionalChain([dropped, 'optionalAccess', _672 => _672.getPendingEchoes, 'call', _673 => _673()]), () => ( EMPTY_PENDING_ECHOES))
20866
20885
  });
20867
20886
  }
20868
20887
  }
@@ -20872,12 +20891,12 @@ function createChatDialogStore(options = {}) {
20872
20891
  const key = keyOf(dialogId, side);
20873
20892
  let reducer = reducers.get(key);
20874
20893
  if (!reducer) {
20875
- const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _673 => _673(dialogId, side)]), () => ( {}));
20894
+ const base = _nullishCoalesce(_optionalChain([(_nullishCoalesce(createOptions, () => ( defaultCreateOptions))), 'optionalCall', _674 => _674(dialogId, side)]), () => ( {}));
20876
20895
  const userOnChange = base.onChange;
20877
20896
  reducer = createChatStreamReducer({
20878
20897
  ...base,
20879
20898
  onChange: () => {
20880
- _optionalChain([userOnChange, 'optionalCall', _674 => _674()]);
20899
+ _optionalChain([userOnChange, 'optionalCall', _675 => _675()]);
20881
20900
  notify();
20882
20901
  }
20883
20902
  });
@@ -20922,7 +20941,7 @@ function createChatDialogStore(options = {}) {
20922
20941
  };
20923
20942
  }
20924
20943
  function getSnapshot2(dialogId, side = DEFAULT_DIALOG_SIDE) {
20925
- return _nullishCoalesce(_optionalChain([reducers, 'access', _675 => _675.get, 'call', _676 => _676(keyOf(dialogId, side)), 'optionalAccess', _677 => _677.state]), () => ( EMPTY_STATE));
20944
+ return _nullishCoalesce(_optionalChain([reducers, 'access', _676 => _676.get, 'call', _677 => _677(keyOf(dialogId, side)), 'optionalAccess', _678 => _678.state]), () => ( EMPTY_STATE));
20926
20945
  }
20927
20946
  function getServerSnapshot2() {
20928
20947
  return EMPTY_STATE;
@@ -21014,7 +21033,7 @@ function createDeltaBatcher({
21014
21033
  pending = [];
21015
21034
  const key = pendingKey;
21016
21035
  for (const delta of batch) applyOne(delta, key);
21017
- _optionalChain([onFlushed, 'optionalCall', _678 => _678(batch.length)]);
21036
+ _optionalChain([onFlushed, 'optionalCall', _679 => _679(batch.length)]);
21018
21037
  }
21019
21038
  function schedule() {
21020
21039
  if (raf !== null || timer !== null) return;
@@ -21038,7 +21057,7 @@ function createDeltaBatcher({
21038
21057
  }
21039
21058
  if (!isDeltaEvent(event)) return false;
21040
21059
  const tail = pending[pending.length - 1];
21041
- const seqAdvances = _optionalChain([tail, 'optionalAccess', _679 => _679.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
21060
+ const seqAdvances = _optionalChain([tail, 'optionalAccess', _680 => _680.seq]) == null ? event.seq == null : event.seq != null && event.seq > tail.seq;
21042
21061
  if (tail && seqAdvances && tail.type === event.type && (tail.type !== "text-delta" || tail.leading === event.leading)) {
21043
21062
  pending[pending.length - 1] = {
21044
21063
  ...tail,
@@ -21069,7 +21088,7 @@ function useChatStreamReducer({
21069
21088
  side = DEFAULT_DIALOG_SIDE,
21070
21089
  createReducerOptions
21071
21090
  }) {
21072
- const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _680 => _680()]), () => ( {})));
21091
+ const reducer = store.getReducer(dialogId, side, () => _nullishCoalesce(_optionalChain([createReducerOptions, 'optionalCall', _681 => _681()]), () => ( {})));
21073
21092
  const getSnapshot2 = _react.useCallback.call(void 0, () => store.getSnapshot(dialogId, side), [store, dialogId, side]);
21074
21093
  const getServerSnapshot2 = _react.useCallback.call(void 0, () => store.getServerSnapshot(), [store]);
21075
21094
  const subscribe2 = _react.useCallback.call(void 0, (listener) => store.subscribe(listener), [store]);
@@ -21108,7 +21127,7 @@ var STORAGE_KEY = "conversation";
21108
21127
  var namespaceFor = (source) => {
21109
21128
  const base = `mingo-chat-${source}`;
21110
21129
  const auth = _chunkXOGD2AMEcjs.getEmbedProxyAuth.call(void 0, );
21111
- return _optionalChain([auth, 'optionalAccess', _681 => _681.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
21130
+ return _optionalChain([auth, 'optionalAccess', _682 => _682.email]) ? `${base}-u-${encodeURIComponent(auth.email.toLowerCase())}` : base;
21112
21131
  };
21113
21132
  function createChatConversationStorage(source) {
21114
21133
  return _chunkXOGD2AMEcjs.createLocalStorageAdapter.call(void 0, {
@@ -21220,7 +21239,7 @@ function formatSingularLookupInvocation(cmdId, value) {
21220
21239
  return safe ? `/${cmdId} "${safe}"` : `/${cmdId}`;
21221
21240
  }
21222
21241
  function extractEntityIdFilter(override, expectedTableId) {
21223
- const f = _optionalChain([override, 'optionalAccess', _682 => _682.entityIdFilter]);
21242
+ const f = _optionalChain([override, 'optionalAccess', _683 => _683.entityIdFilter]);
21224
21243
  if (!f) return null;
21225
21244
  const tableId = typeof f.tableId === "string" ? f.tableId : "";
21226
21245
  const id = typeof f.id === "string" ? f.id : "";
@@ -21259,7 +21278,7 @@ var AUTO_CONTINUATION_DIRECTIVE_PREFIX = "[internal-auto-continuation]";
21259
21278
  function buildAutoContinuationDirective(toolName, opts = {}) {
21260
21279
  const ticketRef = opts.ticketId ? ` (ticket #${opts.ticketId})` : "";
21261
21280
  const ticketHash = opts.ticketId ? ` #${opts.ticketId}` : "";
21262
- const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _683 => _683.status, 'optionalAccess', _684 => _684.toUpperCase, 'call', _685 => _685()]) === "CLOSED";
21281
+ const isClose = toolName === "update_ticket" && _optionalChain([opts, 'access', _684 => _684.status, 'optionalAccess', _685 => _685.toUpperCase, 'call', _686 => _686()]) === "CLOSED";
21263
21282
  if (toolName === "create_ticket") {
21264
21283
  return `${AUTO_CONTINUATION_DIRECTIVE_PREFIX} The user just approved create_ticket${ticketRef}. Per ticket-protocol \xA71a, ask 2-4 SHORT, issue-specific diagnostic follow-up questions tailored to the symptom they reported in their original message. When they answer, propose an update_ticket with content_addendum carrying a clean Q&A digest. Do NOT call any tool in this turn \u2014 just write the questions as prose.`;
21265
21284
  }
@@ -21309,7 +21328,7 @@ function useChatHistoryHydration({
21309
21328
  if (cancelled) return;
21310
21329
  if (rows.length === 0) {
21311
21330
  const found = isRecord(body) ? body.found : void 0;
21312
- if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _686 => _686(conversationId)]);
21331
+ if (found === false) _optionalChain([onOrphanedConversation, 'optionalCall', _687 => _687(conversationId)]);
21313
21332
  return;
21314
21333
  }
21315
21334
  const hydrated = [];
@@ -21453,7 +21472,7 @@ function useManagedDialogList({
21453
21472
  try {
21454
21473
  await deleteDialogCallback(id);
21455
21474
  removeLocal(id);
21456
- _optionalChain([onDialogRemovedRef, 'access', _687 => _687.current, 'optionalCall', _688 => _688(id, "deleted")]);
21475
+ _optionalChain([onDialogRemovedRef, 'access', _688 => _688.current, 'optionalCall', _689 => _689(id, "deleted")]);
21457
21476
  } catch (err) {
21458
21477
  console.error(`${logTag} deleteDialog failed:`, err);
21459
21478
  throw err;
@@ -21464,7 +21483,7 @@ function useManagedDialogList({
21464
21483
  const renameDialog = _react.useCallback.call(void 0,
21465
21484
  async (id, title) => {
21466
21485
  if (!renameDialogCallback) return;
21467
- const previous = _optionalChain([dialogsRef, 'access', _689 => _689.current, 'access', _690 => _690.find, 'call', _691 => _691((d) => d.id === id), 'optionalAccess', _692 => _692.title]);
21486
+ const previous = _optionalChain([dialogsRef, 'access', _690 => _690.current, 'access', _691 => _691.find, 'call', _692 => _692((d) => d.id === id), 'optionalAccess', _693 => _693.title]);
21468
21487
  setDialogs((prev) => prev.map((d) => d.id === id ? { ...d, title } : d));
21469
21488
  try {
21470
21489
  await renameDialogCallback(id, title);
@@ -21483,7 +21502,7 @@ function useManagedDialogList({
21483
21502
  try {
21484
21503
  await archiveDialogCallback(id);
21485
21504
  removeLocal(id);
21486
- _optionalChain([onDialogRemovedRef, 'access', _693 => _693.current, 'optionalCall', _694 => _694(id, "archived")]);
21505
+ _optionalChain([onDialogRemovedRef, 'access', _694 => _694.current, 'optionalCall', _695 => _695(id, "archived")]);
21487
21506
  } catch (err) {
21488
21507
  console.error(`${logTag} archiveDialog failed:`, err);
21489
21508
  throw err;
@@ -21575,7 +21594,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21575
21594
  const { active = true } = runtimeOptions;
21576
21595
  const runtime = _chunkU2YLMFJKcjs.useRequiredChatRuntime.call(void 0, );
21577
21596
  const source = runtime.source || DEFAULT_CHAT_SOURCE;
21578
- const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _695 => _695.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
21597
+ const tableIdForDocumentType = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _696 => _696.tableIdForDocumentType]), () => ( defaultTableIdForDocumentType));
21579
21598
  const sendMessageRef = _react.useRef.call(void 0,
21580
21599
  () => Promise.resolve(true)
21581
21600
  );
@@ -21611,7 +21630,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21611
21630
  if (!restoredConversationRef.current) {
21612
21631
  restoredConversationRef.current = true;
21613
21632
  pruneStaleChatConversationStorage(source);
21614
- conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _696 => _696.load, 'call', _697 => _697(), 'optionalAccess', _698 => _698.conversationId]), () => ( null));
21633
+ conversationIdRef.current = _nullishCoalesce(_optionalChain([conversationStorage, 'access', _697 => _697.load, 'call', _698 => _698(), 'optionalAccess', _699 => _699.conversationId]), () => ( null));
21615
21634
  }
21616
21635
  const [conversationId, setConversationId] = _react.useState.call(void 0, () => conversationIdRef.current);
21617
21636
  const commitConversationId = _react.useCallback.call(void 0,
@@ -21702,7 +21721,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21702
21721
  const abortControllerRef = _react.useRef.call(void 0, null);
21703
21722
  const switchConversation = _react.useCallback.call(void 0,
21704
21723
  (id) => {
21705
- _optionalChain([abortControllerRef, 'access', _699 => _699.current, 'optionalAccess', _700 => _700.abort, 'call', _701 => _701()]);
21724
+ _optionalChain([abortControllerRef, 'access', _700 => _700.current, 'optionalAccess', _701 => _701.abort, 'call', _702 => _702()]);
21706
21725
  flushDeltas();
21707
21726
  mutate((r) => r.reset());
21708
21727
  hydrationSendCountRef.current = 0;
@@ -21739,8 +21758,8 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21739
21758
  } = useManagedDialogList({
21740
21759
  autoLoad: active,
21741
21760
  fetchDialogs: fetchActiveDialogs,
21742
- renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _702 => _702.renameDialog]),
21743
- archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _703 => _703.archiveDialog]),
21761
+ renameDialog: _optionalChain([conversationsApi, 'optionalAccess', _703 => _703.renameDialog]),
21762
+ archiveDialog: _optionalChain([conversationsApi, 'optionalAccess', _704 => _704.archiveDialog]),
21744
21763
  pageSize: 20,
21745
21764
  search: conversationsApi ? dialogSearch : void 0,
21746
21765
  logTag: "[useSseChatAdapter]",
@@ -21804,7 +21823,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21804
21823
  const serverMessage = await readServerErrorMessage(response);
21805
21824
  throw new Error(_nullishCoalesce(serverMessage, () => ( `Chat request failed: ${response.status}`)));
21806
21825
  }
21807
- const reader = _optionalChain([response, 'access', _704 => _704.body, 'optionalAccess', _705 => _705.getReader, 'call', _706 => _706()]);
21826
+ const reader = _optionalChain([response, 'access', _705 => _705.body, 'optionalAccess', _706 => _706.getReader, 'call', _707 => _707()]);
21808
21827
  if (!reader) throw new Error("No response body");
21809
21828
  const frameDecoder = createSseFrameDecoder();
21810
21829
  let finished = false;
@@ -21833,7 +21852,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21833
21852
  }
21834
21853
  return true;
21835
21854
  } catch (err) {
21836
- if (_optionalChain([err, 'optionalAccess', _707 => _707.name]) === "AbortError" || ctrl.signal.aborted) {
21855
+ if (_optionalChain([err, 'optionalAccess', _708 => _708.name]) === "AbortError" || ctrl.signal.aborted) {
21837
21856
  return true;
21838
21857
  }
21839
21858
  flushDeltas();
@@ -21869,7 +21888,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21869
21888
  );
21870
21889
  sendMessageRef.current = sendMessage;
21871
21890
  const stopMessage = _react.useCallback.call(void 0, () => {
21872
- _optionalChain([abortControllerRef, 'access', _708 => _708.current, 'optionalAccess', _709 => _709.abort, 'call', _710 => _710()]);
21891
+ _optionalChain([abortControllerRef, 'access', _709 => _709.current, 'optionalAccess', _710 => _710.abort, 'call', _711 => _711()]);
21873
21892
  flushDeltas();
21874
21893
  mutate((r) => r.setPhase("idle"));
21875
21894
  }, [mutate, flushDeltas]);
@@ -21905,7 +21924,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21905
21924
  let sendIdx = -1;
21906
21925
  return state.messages.map((m) => {
21907
21926
  const segments = m.segments;
21908
- const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _711 => _711.filter, 'call', _712 => _712((s) => s.type === "text"), 'access', _713 => _713.map, 'call', _714 => _714((s) => s.text), 'access', _715 => _715.join, 'call', _716 => _716("")]), () => ( ""));
21927
+ const content = typeof m.content === "string" && !segments ? m.content : _nullishCoalesce(_optionalChain([segments, 'optionalAccess', _712 => _712.filter, 'call', _713 => _713((s) => s.type === "text"), 'access', _714 => _714.map, 'call', _715 => _715((s) => s.text), 'access', _716 => _716.join, 'call', _717 => _717("")]), () => ( ""));
21909
21928
  let sources2;
21910
21929
  let scrollAnchor;
21911
21930
  if (m.role === "user" && !m.hidden) {
@@ -21914,7 +21933,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21914
21933
  if (m.role === "assistant") {
21915
21934
  const lookupIdx = sendIdx >= 0 ? sendIdx : 0;
21916
21935
  sources2 = sourcesMap.get(lookupIdx);
21917
- scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _717 => _717.get, 'call', _718 => _718(lookupIdx), 'optionalAccess', _719 => _719.scrollAnchor]), () => ( void 0));
21936
+ scrollAnchor = _nullishCoalesce(_optionalChain([meta, 'access', _718 => _718.get, 'call', _719 => _719(lookupIdx), 'optionalAccess', _720 => _720.scrollAnchor]), () => ( void 0));
21918
21937
  }
21919
21938
  return {
21920
21939
  id: m.id,
@@ -21941,7 +21960,7 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21941
21960
  );
21942
21961
  return;
21943
21962
  }
21944
- const refSlug = typeof _optionalChain([reference, 'access', _720 => _720.metadata, 'optionalAccess', _721 => _721.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
21963
+ const refSlug = typeof _optionalChain([reference, 'access', _721 => _721.metadata, 'optionalAccess', _722 => _722.slug]) === "string" && reference.metadata.slug.length > 0 ? reference.metadata.slug : "";
21945
21964
  const queryValue = refSlug || sanitizeTitleForChat(reference.title) || reference.id;
21946
21965
  const escaped = queryValue.replace(/\\/g, "\\\\").replace(/"/g, '\\"');
21947
21966
  const text2 = `/${cmdId} display "${escaped}"`;
@@ -21987,18 +22006,18 @@ function useSseChatAdapter(options, runtimeOptions = {}) {
21987
22006
  /** True while the mount-time rebuild from the server transcript runs. */
21988
22007
  isHydratingHistory,
21989
22008
  /** Provider key for the lib's `<ModelDisplay>` icon. */
21990
- currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _722 => _722.provider]), () => ( null)),
21991
- currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _723 => _723.modelLabel]), () => ( null)),
21992
- currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _724 => _724.contextWindowMaxTokens]), () => ( null)),
22009
+ currentProvider: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _723 => _723.provider]), () => ( null)),
22010
+ currentModelLabel: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _724 => _724.modelLabel]), () => ( null)),
22011
+ currentContextWindowMaxTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _725 => _725.contextWindowMaxTokens]), () => ( null)),
21993
22012
  /** Input tokens (known after server's message_start frame; null until). */
21994
- currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _725 => _725.inputTokens]), () => ( null)),
22013
+ currentInputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _726 => _726.inputTokens]), () => ( null)),
21995
22014
  /** Output tokens (known only after server's trailing usage frame). */
21996
- currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _726 => _726.outputTokens]), () => ( null)),
22015
+ currentOutputTokens: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _727 => _727.outputTokens]), () => ( null)),
21997
22016
  /** Cache hit % (read / total-input × 100). null during streaming. */
21998
- currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _727 => _727.cacheHitRatePct]), () => ( null)),
22017
+ currentCacheHitRatePct: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _728 => _728.cacheHitRatePct]), () => ( null)),
21999
22018
  /** Cross-call usage breakdown (Haiku rewriter/classifier/summarizer
22000
22019
  * token counts). null until the trailing usage frame lands. */
22001
- currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _728 => _728.breakdown]), () => ( null)),
22020
+ currentUsageBreakdown: _nullishCoalesce(_optionalChain([latestMeta, 'optionalAccess', _729 => _729.breakdown]), () => ( null)),
22002
22021
  // ─── Dialog management ───────────────────────────────────────────────
22003
22022
  // With `chatConversationsUrl` the server transcript store IS the dialog
22004
22023
  // list (shared `useManagedDialogList`); selecting a row re-hydrates through
@@ -22253,7 +22272,7 @@ function decodeNatsChunk(chunk) {
22253
22272
  userId: typeof data.userId === "string" ? data.userId : void 0,
22254
22273
  // Wire shape carries no label; fall back to the id (parity with
22255
22274
  // the history path in `process-historical-messages.ts`).
22256
- contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _729 => _729.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _730 => _730.id]) === "string").map((it) => ({
22275
+ contextItems: Array.isArray(data.contextItems) ? data.contextItems.filter((it) => typeof _optionalChain([it, 'optionalAccess', _730 => _730.type]) === "string" && typeof _optionalChain([it, 'optionalAccess', _731 => _731.id]) === "string").map((it) => ({
22257
22276
  type: it.type,
22258
22277
  id: it.id,
22259
22278
  label: it.id
@@ -22344,7 +22363,7 @@ function extractIncompleteMessageState(lastMessage) {
22344
22363
  }
22345
22364
  break;
22346
22365
  case "approval_batch": {
22347
- const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _731 => _731.data, 'access', _732 => _732.executions, 'optionalAccess', _733 => _733[c.toolExecutionRequestId], 'optionalAccess', _734 => _734.status]) === "done");
22366
+ const allDone = !!segment.data.executions && segment.data.toolCalls.every((c) => _optionalChain([segment, 'access', _732 => _732.data, 'access', _733 => _733.executions, 'optionalAccess', _734 => _734[c.toolExecutionRequestId], 'optionalAccess', _735 => _735.status]) === "done");
22348
22367
  if (segment.status !== "rejected" && !allDone) {
22349
22368
  hasIncompleteState = true;
22350
22369
  }
@@ -22406,11 +22425,11 @@ function extractIncompleteMessageState(lastMessage) {
22406
22425
  function extractIncompleteTailState(messages) {
22407
22426
  if (!messages || messages.length === 0) return void 0;
22408
22427
  let start = messages.length;
22409
- while (start > 0 && _optionalChain([messages, 'access', _735 => _735[start - 1], 'optionalAccess', _736 => _736.role]) === "assistant") start -= 1;
22428
+ while (start > 0 && _optionalChain([messages, 'access', _736 => _736[start - 1], 'optionalAccess', _737 => _737.role]) === "assistant") start -= 1;
22410
22429
  if (start === messages.length) return void 0;
22411
22430
  const segments = [];
22412
22431
  for (let i = start; i < messages.length; i += 1) {
22413
- const content = _optionalChain([messages, 'access', _737 => _737[i], 'optionalAccess', _738 => _738.content]);
22432
+ const content = _optionalChain([messages, 'access', _738 => _738[i], 'optionalAccess', _739 => _739.content]);
22414
22433
  if (Array.isArray(content)) segments.push(...content);
22415
22434
  }
22416
22435
  if (segments.length === 0) return void 0;
@@ -22423,15 +22442,15 @@ function extractIncompleteTailState(messages) {
22423
22442
 
22424
22443
  // src/components/chat/utils/process-historical-messages.ts
22425
22444
  function getOwnerDisplayName(owner) {
22426
- if (_optionalChain([owner, 'optionalAccess', _739 => _739.type]) === OWNER_TYPE.ADMIN && owner.user) {
22445
+ if (_optionalChain([owner, 'optionalAccess', _740 => _740.type]) === OWNER_TYPE.ADMIN && owner.user) {
22427
22446
  const { firstName, lastName } = owner.user;
22428
22447
  const name = [firstName, lastName].filter(Boolean).join(" ");
22429
22448
  if (name) return name;
22430
22449
  }
22431
- return _optionalChain([owner, 'optionalAccess', _740 => _740.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
22450
+ return _optionalChain([owner, 'optionalAccess', _741 => _741.type]) === OWNER_TYPE.ADMIN ? "Admin" : "You";
22432
22451
  }
22433
22452
  function getOwnerAvatar(owner) {
22434
- return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _741 => _741.user, 'optionalAccess', _742 => _742.image, 'optionalAccess', _743 => _743.imageUrl]), () => ( void 0));
22453
+ return _nullishCoalesce(_optionalChain([owner, 'optionalAccess', _742 => _742.user, 'optionalAccess', _743 => _743.image, 'optionalAccess', _744 => _744.imageUrl]), () => ( void 0));
22435
22454
  }
22436
22455
  function pushStandaloneMessages(processedMessages, msg, messageDataArray) {
22437
22456
  messageDataArray.forEach((data) => {
@@ -22621,7 +22640,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
22621
22640
  event.offerId,
22622
22641
  event.text,
22623
22642
  event.origin,
22624
- _nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _744 => _744[event.offerId]]), () => ( "pending"))
22643
+ _nullishCoalesce(_optionalChain([escalationOfferStates, 'optionalAccess', _745 => _745[event.offerId]]), () => ( "pending"))
22625
22644
  );
22626
22645
  break;
22627
22646
  case "ticket-escalated":
@@ -22655,7 +22674,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
22655
22674
  );
22656
22675
  break;
22657
22676
  case "escalation-offer-resolved":
22658
- _optionalChain([offerResolutions, 'optionalAccess', _745 => _745.set, 'call', _746 => _746(event.offerId, {
22677
+ _optionalChain([offerResolutions, 'optionalAccess', _746 => _746.set, 'call', _747 => _747(event.offerId, {
22659
22678
  status: event.status,
22660
22679
  resolvedByName: event.resolvedByName
22661
22680
  })]);
@@ -22719,7 +22738,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
22719
22738
  }
22720
22739
  }
22721
22740
  } else {
22722
- _optionalChain([escalatedApprovals, 'optionalAccess', _747 => _747.set, 'call', _748 => _748(event.requestId, {
22741
+ _optionalChain([escalatedApprovals, 'optionalAccess', _748 => _748.set, 'call', _749 => _749(event.requestId, {
22723
22742
  command: event.command || "",
22724
22743
  explanation: event.explanation,
22725
22744
  approvalType,
@@ -22734,8 +22753,8 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
22734
22753
  const existingStatus = approvalStatuses[requestId];
22735
22754
  const status = existingStatus || event.status;
22736
22755
  const resolvedByName = event.resolvedByName;
22737
- const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _749 => _749.get, 'call', _750 => _750(requestId)]);
22738
- if (_optionalChain([escalatedData, 'optionalAccess', _751 => _751.toolCalls]) && escalatedData.toolCalls.length > 0) {
22756
+ const escalatedData = _optionalChain([escalatedApprovals, 'optionalAccess', _750 => _750.get, 'call', _751 => _751(requestId)]);
22757
+ if (_optionalChain([escalatedData, 'optionalAccess', _752 => _752.toolCalls]) && escalatedData.toolCalls.length > 0) {
22739
22758
  if (batchApprovalsEnabled) {
22740
22759
  accumulator.addApprovalBatch(
22741
22760
  requestId,
@@ -22757,7 +22776,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
22757
22776
  );
22758
22777
  }
22759
22778
  }
22760
- _optionalChain([escalatedApprovals, 'optionalAccess', _752 => _752.delete, 'call', _753 => _753(requestId)]);
22779
+ _optionalChain([escalatedApprovals, 'optionalAccess', _753 => _753.delete, 'call', _754 => _754(requestId)]);
22761
22780
  break;
22762
22781
  }
22763
22782
  if (escalatedData) {
@@ -22766,7 +22785,7 @@ function applyHistoryEvent(event, accumulator, approvalStatuses, options, escala
22766
22785
  explanation: escalatedData.explanation,
22767
22786
  approvalType: escalatedData.approvalType
22768
22787
  });
22769
- _optionalChain([escalatedApprovals, 'optionalAccess', _754 => _754.delete, 'call', _755 => _755(requestId)]);
22788
+ _optionalChain([escalatedApprovals, 'optionalAccess', _755 => _755.delete, 'call', _756 => _756(requestId)]);
22770
22789
  }
22771
22790
  const before = accumulator.getSegments();
22772
22791
  const after = accumulator.updateApprovalStatus(requestId, status, resolvedByName);
@@ -22858,14 +22877,14 @@ function processHistoricalMessages(messages, options = {}) {
22858
22877
  pushStandaloneMessages(processedMessages, msg, messageDataArray);
22859
22878
  return;
22860
22879
  }
22861
- const isUserMessage = _optionalChain([msg, 'access', _756 => _756.owner, 'optionalAccess', _757 => _757.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _758 => _758.owner, 'optionalAccess', _759 => _759.type]) === OWNER_TYPE.ADMIN;
22880
+ const isUserMessage = _optionalChain([msg, 'access', _757 => _757.owner, 'optionalAccess', _758 => _758.type]) === OWNER_TYPE.CLIENT || _optionalChain([msg, 'access', _759 => _759.owner, 'optionalAccess', _760 => _760.type]) === OWNER_TYPE.ADMIN;
22862
22881
  if (isUserMessage) {
22863
22882
  flushAssistantMessage();
22864
- const userAuthorType = _optionalChain([msg, 'access', _760 => _760.owner, 'optionalAccess', _761 => _761.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
22883
+ const userAuthorType = _optionalChain([msg, 'access', _761 => _761.owner, 'optionalAccess', _762 => _762.type]) === OWNER_TYPE.ADMIN ? "admin" : "user";
22865
22884
  messageDataArray.forEach((data) => {
22866
22885
  if (data.type === MESSAGE_TYPE.TEXT && "text" in data && data.text) {
22867
22886
  const rawContext = data.contextItems;
22868
- const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _762 => _762.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _763 => _763.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
22887
+ const contextItems = Array.isArray(rawContext) ? rawContext.filter((c) => typeof _optionalChain([c, 'optionalAccess', _763 => _763.type]) === "string" && typeof _optionalChain([c, 'optionalAccess', _764 => _764.id]) === "string").map((c) => ({ type: c.type, id: c.id, label: c.id })) : void 0;
22869
22888
  processedMessages.push({
22870
22889
  id: msg.id,
22871
22890
  role: "user",
@@ -22912,7 +22931,7 @@ function processHistoricalMessages(messages, options = {}) {
22912
22931
  });
22913
22932
  const nextMsg = messages[index + 1];
22914
22933
  const isLastMessage = index === messages.length - 1;
22915
- const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _764 => _764.owner, 'optionalAccess', _765 => _765.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _766 => _766.owner, 'optionalAccess', _767 => _767.type]) === OWNER_TYPE.ADMIN);
22934
+ const nextIsFromUser = nextMsg && (_optionalChain([nextMsg, 'access', _765 => _765.owner, 'optionalAccess', _766 => _766.type]) === OWNER_TYPE.CLIENT || _optionalChain([nextMsg, 'access', _767 => _767.owner, 'optionalAccess', _768 => _768.type]) === OWNER_TYPE.ADMIN);
22916
22935
  if (isLastMessage || nextIsFromUser) {
22917
22936
  flushAssistantMessage();
22918
22937
  }
@@ -23295,7 +23314,7 @@ function useNatsChatAdapter(config, options = {}) {
23295
23314
  const connectionState = !active || !dialogId ? "connected" : connectedForDialog === dialogId ? "connected" : "connecting";
23296
23315
  const sendMessage = _react.useCallback.call(void 0,
23297
23316
  async (text2, sendOptions) => {
23298
- const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _768 => _768.hidden]), () => ( false));
23317
+ const hidden = _nullishCoalesce(_optionalChain([sendOptions, 'optionalAccess', _769 => _769.hidden]), () => ( false));
23299
23318
  mutate((r) => r.pushOptimisticSend(text2, hidden));
23300
23319
  await publishUserMessage(text2, { hidden, dialogId });
23301
23320
  },
@@ -23388,11 +23407,11 @@ function useNatsChatAdapter(config, options = {}) {
23388
23407
  // Tokens: live `token_usage` frame / dialog snapshot (`dialogTokenUsage`).
23389
23408
  // contextWindow uses the dialog's `contextSize` (the "X / Y" denominator,
23390
23409
  // matching the /mingo page). cacheHitRate/breakdown are SSE-only → null.
23391
- currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _769 => _769.provider]), () => ( modelProvider)), () => ( null)),
23392
- currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _770 => _770.modelLabel]), () => ( modelLabel)), () => ( null)),
23393
- currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _771 => _771.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _772 => _772.contextWindowMaxTokens]))), () => ( null)),
23394
- currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _773 => _773.inputTokensSize]), () => ( null)),
23395
- currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _774 => _774.outputTokensSize]), () => ( null)),
23410
+ currentProvider: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _770 => _770.provider]), () => ( modelProvider)), () => ( null)),
23411
+ currentModelLabel: _nullishCoalesce(_nullishCoalesce(_optionalChain([liveModel, 'optionalAccess', _771 => _771.modelLabel]), () => ( modelLabel)), () => ( null)),
23412
+ currentContextWindowMaxTokens: _nullishCoalesce(_nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _772 => _772.contextSize]), () => ( _optionalChain([liveModel, 'optionalAccess', _773 => _773.contextWindowMaxTokens]))), () => ( null)),
23413
+ currentInputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _774 => _774.inputTokensSize]), () => ( null)),
23414
+ currentOutputTokens: _nullishCoalesce(_optionalChain([dialogTokenUsage, 'optionalAccess', _775 => _775.outputTokensSize]), () => ( null)),
23396
23415
  currentCacheHitRatePct: null,
23397
23416
  currentUsageBreakdown: null,
23398
23417
  // Dialog management
@@ -23514,7 +23533,7 @@ function useUnifiedChat(options) {
23514
23533
  []
23515
23534
  );
23516
23535
  const displayRefForward = _react.useCallback.call(void 0,
23517
- (ref) => _optionalChain([activeStateRef, 'access', _775 => _775.current, 'access', _776 => _776.displayRef, 'optionalCall', _777 => _777(ref)]),
23536
+ (ref) => _optionalChain([activeStateRef, 'access', _776 => _776.current, 'access', _777 => _777.displayRef, 'optionalCall', _778 => _778(ref)]),
23518
23537
  []
23519
23538
  );
23520
23539
  const displayRef = activeState.displayRef ? displayRefForward : void 0;
@@ -23524,7 +23543,7 @@ function useUnifiedChat(options) {
23524
23543
  const renameDialog = _react.useCallback.call(void 0, (id, title) => activeStateRef.current.renameDialog(id, title), []);
23525
23544
  const archiveDialog = _react.useCallback.call(void 0, (id) => activeStateRef.current.archiveDialog(id), []);
23526
23545
  const loadMoreDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreDialogs(), []);
23527
- const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _778 => _778.current, 'access', _779 => _779.setDialogScope, 'optionalCall', _780 => _780(scope)]), []);
23546
+ const setDialogScope = _react.useCallback.call(void 0, (scope) => _optionalChain([activeStateRef, 'access', _779 => _779.current, 'access', _780 => _780.setDialogScope, 'optionalCall', _781 => _781(scope)]), []);
23528
23547
  const reloadDialogs = _react.useCallback.call(void 0, () => activeStateRef.current.reloadDialogs(), []);
23529
23548
  const loadMoreMessages = _react.useCallback.call(void 0, () => activeStateRef.current.loadMoreMessages(), []);
23530
23549
  const approveRequest = _react.useCallback.call(void 0, (requestId) => activeStateRef.current.approveRequest(requestId), []);
@@ -23632,19 +23651,19 @@ function turnRequestKeys(content) {
23632
23651
  if (!Array.isArray(content)) return keys;
23633
23652
  for (const seg of content) {
23634
23653
  if (seg.type === "tool_execution") {
23635
- const id = _optionalChain([seg, 'access', _781 => _781.data, 'optionalAccess', _782 => _782.toolExecutionRequestId]);
23654
+ const id = _optionalChain([seg, 'access', _782 => _782.data, 'optionalAccess', _783 => _783.toolExecutionRequestId]);
23636
23655
  if (id) keys.add(id);
23637
23656
  } else if (seg.type === "approval_request") {
23638
- const id = _optionalChain([seg, 'access', _783 => _783.data, 'optionalAccess', _784 => _784.requestId]);
23657
+ const id = _optionalChain([seg, 'access', _784 => _784.data, 'optionalAccess', _785 => _785.requestId]);
23639
23658
  if (id) keys.add(id);
23640
23659
  } else if (seg.type === "escalation_offer") {
23641
- const id = _optionalChain([seg, 'access', _785 => _785.data, 'optionalAccess', _786 => _786.offerId]);
23660
+ const id = _optionalChain([seg, 'access', _786 => _786.data, 'optionalAccess', _787 => _787.offerId]);
23642
23661
  if (id) keys.add(id);
23643
23662
  } else if (seg.type === "approval_batch") {
23644
23663
  const data = seg.data;
23645
- if (_optionalChain([data, 'optionalAccess', _787 => _787.approvalRequestId])) keys.add(data.approvalRequestId);
23646
- for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _788 => _788.toolCalls]), () => ( []))) {
23647
- if (_optionalChain([call, 'optionalAccess', _789 => _789.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
23664
+ if (_optionalChain([data, 'optionalAccess', _788 => _788.approvalRequestId])) keys.add(data.approvalRequestId);
23665
+ for (const call of _nullishCoalesce(_optionalChain([data, 'optionalAccess', _789 => _789.toolCalls]), () => ( []))) {
23666
+ if (_optionalChain([call, 'optionalAccess', _790 => _790.toolExecutionRequestId])) keys.add(call.toolExecutionRequestId);
23648
23667
  }
23649
23668
  }
23650
23669
  }
@@ -23729,18 +23748,18 @@ function mergeHistoryWithRealtime(input) {
23729
23748
  }
23730
23749
  }
23731
23750
  const trailing = processedHistory[processedHistory.length - 1];
23732
- const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _790 => _790.role]) === "assistant" ? trailing : null;
23733
- const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _791 => _791.content, 'access', _792 => _792.find, 'call', _793 => _793((s) => s.type === "approval_batch"), 'optionalAccess', _794 => _794.data, 'optionalAccess', _795 => _795.approvalRequestId]), () => ( null)) : null;
23751
+ const historyTrailingAssistant = _optionalChain([trailing, 'optionalAccess', _791 => _791.role]) === "assistant" ? trailing : null;
23752
+ const historyBatchId = historyTrailingAssistant && Array.isArray(historyTrailingAssistant.content) ? _nullishCoalesce(_optionalChain([historyTrailingAssistant, 'access', _792 => _792.content, 'access', _793 => _793.find, 'call', _794 => _794((s) => s.type === "approval_batch"), 'optionalAccess', _795 => _795.data, 'optionalAccess', _796 => _796.approvalRequestId]), () => ( null)) : null;
23734
23753
  let processedToUse = processedHistory;
23735
23754
  const pinnedSyntheticIds = /* @__PURE__ */ new Set();
23736
23755
  const droppedSyntheticIds = /* @__PURE__ */ new Set();
23737
23756
  if (historyBatchId) {
23738
23757
  const batchTwins = existingMessages.filter(
23739
- (m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _796 => _796.data, 'optionalAccess', _797 => _797.approvalRequestId]) === historyBatchId)
23758
+ (m) => m.role === "assistant" && Array.isArray(m.content) && m.content.some((s) => s.type === "approval_batch" && _optionalChain([s, 'access', _797 => _797.data, 'optionalAccess', _798 => _798.approvalRequestId]) === historyBatchId)
23740
23759
  );
23741
23760
  const existingWithSameBatch = _nullishCoalesce(batchTwins.find((m) => m.id === streamingMessageId), () => ( batchTwins[batchTwins.length - 1]));
23742
23761
  if (existingWithSameBatch && Array.isArray(existingWithSameBatch.content)) {
23743
- const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _798 => _798.content])) ? historyTrailingAssistant.content.length : 0;
23762
+ const histSize = Array.isArray(_optionalChain([historyTrailingAssistant, 'optionalAccess', _799 => _799.content])) ? historyTrailingAssistant.content.length : 0;
23744
23763
  const realtimeSize = existingWithSameBatch.content.length;
23745
23764
  if (existingWithSameBatch.id === streamingMessageId || realtimeSize > histSize) {
23746
23765
  processedToUse = processedHistory.slice(0, -1);
@@ -23773,9 +23792,9 @@ function mergeHistoryWithRealtime(input) {
23773
23792
  const trailingAssistantText = lastProcessed && lastProcessed.role === "assistant" ? assistantAnswerText(lastProcessed.content) : "";
23774
23793
  const windowSignals = collectTwinSignals(processedToUse);
23775
23794
  const seenUserSyntheticByContent = /* @__PURE__ */ new Map();
23776
- const isInWindow = (m) => processedIds.has(m.id) || (_nullishCoalesce(_optionalChain([rawHistoryIds, 'optionalAccess', _799 => _799.has, 'call', _800 => _800(m.id)]), () => ( false)));
23795
+ const isInWindow = (m) => processedIds.has(m.id) || (_nullishCoalesce(_optionalChain([rawHistoryIds, 'optionalAccess', _800 => _800.has, 'call', _801 => _801(m.id)]), () => ( false)));
23777
23796
  const firstWindowIndex = existingMessages.findIndex(isInWindow);
23778
- const isPersistedOlder = (m) => !isClientMintedId(m.id) && (_nullishCoalesce(_optionalChain([m, 'access', _801 => _801.timestamp, 'optionalAccess', _802 => _802.getTime, 'call', _803 => _803()]), () => ( 0))) <= historyFetchedAt;
23797
+ const isPersistedOlder = (m) => !isClientMintedId(m.id) && (_nullishCoalesce(_optionalChain([m, 'access', _802 => _802.timestamp, 'optionalAccess', _803 => _803.getTime, 'call', _804 => _804()]), () => ( 0))) <= historyFetchedAt;
23779
23798
  let lastOlderPersistedIndex = -1;
23780
23799
  if (firstWindowIndex < 0) {
23781
23800
  for (const [index, m] of existingMessages.entries()) {
@@ -23793,7 +23812,7 @@ function mergeHistoryWithRealtime(input) {
23793
23812
  } else if (pm.role === "assistant") {
23794
23813
  windowHasUnstampedAssistant = true;
23795
23814
  }
23796
- const time = _optionalChain([pm, 'access', _804 => _804.timestamp, 'optionalAccess', _805 => _805.getTime, 'call', _806 => _806()]);
23815
+ const time = _optionalChain([pm, 'access', _805 => _805.timestamp, 'optionalAccess', _806 => _806.getTime, 'call', _807 => _807()]);
23797
23816
  if (typeof time === "number" && time < windowMinTime) windowMinTime = time;
23798
23817
  }
23799
23818
  const threadHasClientMintedRow = existingMessages.some((m) => isClientMintedId(m.id));
@@ -23811,14 +23830,14 @@ function mergeHistoryWithRealtime(input) {
23811
23830
  const verdict = twinVerdict(windowSignals, m);
23812
23831
  return verdict === "unknown" ? !seqCanMislead(m) : verdict === "distinct";
23813
23832
  }
23814
- const time = _optionalChain([m, 'access', _807 => _807.timestamp, 'optionalAccess', _808 => _808.getTime, 'call', _809 => _809()]);
23833
+ const time = _optionalChain([m, 'access', _808 => _808.timestamp, 'optionalAccess', _809 => _809.getTime, 'call', _810 => _810()]);
23815
23834
  if (typeof time !== "number" || time > historyFetchedAt) return false;
23816
23835
  if (!Number.isFinite(windowMinTime) || time >= windowMinTime) return false;
23817
23836
  return twinVerdict(windowSignals, m) === "distinct";
23818
23837
  };
23819
23838
  const keepRealtime = (m) => {
23820
23839
  if (m.role === "user" && isOptimisticId(m.id) && typeof m.content === "string") {
23821
- const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _810 => _810.timestamp, 'optionalAccess', _811 => _811.getTime, 'call', _812 => _812()]), () => ( 0))) <= historyFetchedAt;
23840
+ const canBeInSnapshot = (_nullishCoalesce(_optionalChain([m, 'access', _811 => _811.timestamp, 'optionalAccess', _812 => _812.getTime, 'call', _813 => _813()]), () => ( 0))) <= historyFetchedAt;
23822
23841
  return !(canBeInSnapshot && windowSignals.userContents.has(userTwinKey(m)));
23823
23842
  }
23824
23843
  if (isSyntheticRealtimeId(m.id) && m.id !== streamingMessageId) {
@@ -23843,7 +23862,7 @@ function mergeHistoryWithRealtime(input) {
23843
23862
  } else if (typeof m.streamSeq === "number") {
23844
23863
  covered = historyMaxStreamSeq > 0 && historyMaxStreamSeq >= m.streamSeq;
23845
23864
  } else {
23846
- covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _813 => _813.timestamp, 'optionalAccess', _814 => _814.getTime, 'call', _815 => _815()]), () => ( 0))) <= historyFetchedAt;
23865
+ covered = historyCoversRealtime !== null ? historyCoversRealtime : (_nullishCoalesce(_optionalChain([m, 'access', _814 => _814.timestamp, 'optionalAccess', _815 => _815.getTime, 'call', _816 => _816()]), () => ( 0))) <= historyFetchedAt;
23847
23866
  }
23848
23867
  if (covered) return false;
23849
23868
  }
@@ -23952,7 +23971,7 @@ function normalizeHistoricalMessageData(md) {
23952
23971
  function isHistoricalUserTurn(m) {
23953
23972
  return !!m.owner;
23954
23973
  }
23955
- var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _816 => _816.type]) === "TEXT" && typeof d.text === "string";
23974
+ var isTextSegment = (d) => _optionalChain([d, 'optionalAccess', _817 => _817.type]) === "TEXT" && typeof d.text === "string";
23956
23975
  var THINK_MS = 550;
23957
23976
  var TOKEN_MS = 55;
23958
23977
  var USER_MS = 480;
@@ -24585,7 +24604,7 @@ function useChatDialogManager({
24585
24604
  const handleConfirmRestore = _react.useCallback.call(void 0, async () => {
24586
24605
  if (restoreTarget) {
24587
24606
  try {
24588
- await _optionalChain([unarchiveDialog, 'optionalCall', _817 => _817(restoreTarget.id)]);
24607
+ await _optionalChain([unarchiveDialog, 'optionalCall', _818 => _818(restoreTarget.id)]);
24589
24608
  } catch (err) {
24590
24609
  console.error("[useChatDialogManager] unarchive failed:", err);
24591
24610
  return;
@@ -25040,6 +25059,7 @@ function EmbeddableChatInner({
25040
25059
  defaultOpen,
25041
25060
  showInternalTrigger = true,
25042
25061
  previewMode = false,
25062
+ composerLock = null,
25043
25063
  extras,
25044
25064
  tableIdForDocumentType,
25045
25065
  modes,
@@ -25135,7 +25155,7 @@ function EmbeddableChatInner({
25135
25155
  }),
25136
25156
  [commandsUrl]
25137
25157
  );
25138
- const headerUserName = _optionalChain([identityUser, 'optionalAccess', _818 => _818.name, 'optionalAccess', _819 => _819.trim, 'call', _820 => _820()]) || [_optionalChain([identityUser, 'optionalAccess', _821 => _821.firstName]), _optionalChain([identityUser, 'optionalAccess', _822 => _822.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _823 => _823.trim, 'call', _824 => _824()]) || void 0;
25158
+ const headerUserName = _optionalChain([identityUser, 'optionalAccess', _819 => _819.name, 'optionalAccess', _820 => _820.trim, 'call', _821 => _821()]) || [_optionalChain([identityUser, 'optionalAccess', _822 => _822.firstName]), _optionalChain([identityUser, 'optionalAccess', _823 => _823.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([userDisplayName, 'optionalAccess', _824 => _824.trim, 'call', _825 => _825()]) || void 0;
25139
25159
  const effectiveModes = _react.useMemo.call(void 0, () => {
25140
25160
  if (modes) return modes;
25141
25161
  const guideOptions = tableIdForDocumentType ? { tableIdForDocumentType } : {};
@@ -25150,7 +25170,7 @@ function EmbeddableChatInner({
25150
25170
  if (controlledActiveMode === void 0) {
25151
25171
  setUncontrolledActiveMode(next);
25152
25172
  }
25153
- _optionalChain([onActiveModeChange, 'optionalCall', _825 => _825(next)]);
25173
+ _optionalChain([onActiveModeChange, 'optionalCall', _826 => _826(next)]);
25154
25174
  },
25155
25175
  [controlledActiveMode, onActiveModeChange]
25156
25176
  );
@@ -25177,7 +25197,7 @@ function EmbeddableChatInner({
25177
25197
  );
25178
25198
  const effectiveAssistantName = emptyStateConfig.name;
25179
25199
  const effectiveAssistantIcon = emptyStateConfig.icon;
25180
- const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _826 => _826.title]) === "string" ? guideWelcome.title : null)));
25200
+ const headerAssistantName = _nullishCoalesce(effectiveAssistantName, () => ( (typeof _optionalChain([guideWelcome, 'optionalAccess', _827 => _827.title]) === "string" ? guideWelcome.title : null)));
25181
25201
  const {
25182
25202
  messages: rawMessages,
25183
25203
  isLoading: chatLoading,
@@ -25220,8 +25240,8 @@ function EmbeddableChatInner({
25220
25240
  const mingoCaps = _react.useMemo.call(void 0,
25221
25241
  () => ({
25222
25242
  ...dialogCapabilities,
25223
- canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _827 => _827.canRename]), () => ( false)),
25224
- canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _828 => _828.canArchive]), () => ( false))
25243
+ canRename: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _828 => _828.canRename]), () => ( false)),
25244
+ canArchive: _nullishCoalesce(_optionalChain([dialogCapabilities, 'optionalAccess', _829 => _829.canArchive]), () => ( false))
25225
25245
  }),
25226
25246
  [dialogCapabilities]
25227
25247
  );
@@ -25236,7 +25256,7 @@ function EmbeddableChatInner({
25236
25256
  void sendMessage(guidePendingPrompt).catch((err) => {
25237
25257
  console.error("[EmbeddableChat] guide launcher prompt failed:", err);
25238
25258
  });
25239
- _optionalChain([onGuidePromptConsumed, 'optionalCall', _829 => _829()]);
25259
+ _optionalChain([onGuidePromptConsumed, 'optionalCall', _830 => _830()]);
25240
25260
  }, [guidePendingPrompt, activeMode, sendMessage, onGuidePromptConsumed]);
25241
25261
  const {
25242
25262
  attachments: stagedAttachments,
@@ -25247,7 +25267,7 @@ function EmbeddableChatInner({
25247
25267
  clear: clearAttachments
25248
25268
  } = useChatAttachments();
25249
25269
  const { panelRef: galleryPanelRef, modal: galleryModal } = useChatAttachmentImageGallery();
25250
- const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _830 => _830.maxItems]), () => ( 10));
25270
+ const contextMaxItems = _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _831 => _831.maxItems]), () => ( 10));
25251
25271
  const contextPickerForMode = activeMode === "mingo" ? contextPicker : void 0;
25252
25272
  const [contextItems, setContextItems] = _react.useState.call(void 0, NO_CONTEXT_ITEMS);
25253
25273
  const [contextPickerOpen, setContextPickerOpen] = _react.useState.call(void 0, false);
@@ -25268,10 +25288,10 @@ function EmbeddableChatInner({
25268
25288
  }, [activeDialogId, activeMode]);
25269
25289
  const mentionMarkerByType = _react.useMemo.call(void 0, () => {
25270
25290
  const m = /* @__PURE__ */ new Map();
25271
- for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _831 => _831.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
25291
+ for (const t of _nullishCoalesce(_optionalChain([contextPicker, 'optionalAccess', _832 => _832.entityTypes]), () => ( []))) if (t.marker) m.set(t.type, t.marker);
25272
25292
  return m;
25273
- }, [_optionalChain([contextPicker, 'optionalAccess', _832 => _832.entityTypes])]);
25274
- const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _833 => _833.entityTypes]);
25293
+ }, [_optionalChain([contextPicker, 'optionalAccess', _833 => _833.entityTypes])]);
25294
+ const contextEntityTypes = _optionalChain([contextPicker, 'optionalAccess', _834 => _834.entityTypes]);
25275
25295
  const resolveContextIcon = _react.useMemo.call(void 0, () => {
25276
25296
  const byType = /* @__PURE__ */ new Map();
25277
25297
  for (const t of _nullishCoalesce(contextEntityTypes, () => ( []))) byType.set(t.type, t.icon);
@@ -25283,7 +25303,7 @@ function EmbeddableChatInner({
25283
25303
  if (mentionActiveRef.current) {
25284
25304
  if (contextItems.some((p) => `${p.type}:${p.id}` === key)) return;
25285
25305
  if (contextItems.length >= contextMaxItems) return;
25286
- _optionalChain([chatInputRef, 'access', _834 => _834.current, 'optionalAccess', _835 => _835.commitMention, 'call', _836 => _836(mentionTokenOf(key, mentionMarkerByType), {
25306
+ _optionalChain([chatInputRef, 'access', _835 => _835.current, 'optionalAccess', _836 => _836.commitMention, 'call', _837 => _837(mentionTokenOf(key, mentionMarkerByType), {
25287
25307
  label: item.label,
25288
25308
  icon: resolveContextIcon(item)
25289
25309
  })]);
@@ -25306,9 +25326,9 @@ function EmbeddableChatInner({
25306
25326
  setContextItems((prev) => prev.filter((p) => `${p.type}:${p.id}` !== key));
25307
25327
  if (mentionKeysRef.current.has(key)) {
25308
25328
  mentionKeysRef.current.delete(key);
25309
- const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _837 => _837.current, 'optionalAccess', _838 => _838.getValue, 'call', _839 => _839()]), () => ( ""));
25329
+ const cur = _nullishCoalesce(_optionalChain([chatInputRef, 'access', _838 => _838.current, 'optionalAccess', _839 => _839.getValue, 'call', _840 => _840()]), () => ( ""));
25310
25330
  const next = cur.replace(`@${mentionTokenOf(key, mentionMarkerByType)}`, "").replace(/\s{2,}/g, " ").trimStart();
25311
- _optionalChain([chatInputRef, 'access', _840 => _840.current, 'optionalAccess', _841 => _841.setValue, 'call', _842 => _842(next)]);
25331
+ _optionalChain([chatInputRef, 'access', _841 => _841.current, 'optionalAccess', _842 => _842.setValue, 'call', _843 => _843(next)]);
25312
25332
  }
25313
25333
  },
25314
25334
  [mentionMarkerByType]
@@ -25330,7 +25350,7 @@ function EmbeddableChatInner({
25330
25350
  }, []);
25331
25351
  const closeContextPicker = _react.useCallback.call(void 0, () => {
25332
25352
  if (mentionActiveRef.current) {
25333
- _optionalChain([chatInputRef, 'access', _843 => _843.current, 'optionalAccess', _844 => _844.removeMentionTrigger, 'call', _845 => _845()]);
25353
+ _optionalChain([chatInputRef, 'access', _844 => _844.current, 'optionalAccess', _845 => _845.removeMentionTrigger, 'call', _846 => _846()]);
25334
25354
  }
25335
25355
  setContextPickerOpen(false);
25336
25356
  setMentionQuery(null);
@@ -25364,8 +25384,8 @@ function EmbeddableChatInner({
25364
25384
  [effectiveAssistantIcon]
25365
25385
  );
25366
25386
  const [timestampCache] = _react.useState.call(void 0, () => /* @__PURE__ */ new Map());
25367
- const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _846 => _846.firstName]), _optionalChain([identityUser, 'optionalAccess', _847 => _847.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _848 => _848.name, 'optionalAccess', _849 => _849.trim, 'call', _850 => _850()]) || void 0 : void 0;
25368
- const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _851 => _851.avatarUrl, 'optionalAccess', _852 => _852.trim, 'call', _853 => _853()]) || void 0 : void 0;
25387
+ const guideUserName = activeMode === "guide" ? [_optionalChain([identityUser, 'optionalAccess', _847 => _847.firstName]), _optionalChain([identityUser, 'optionalAccess', _848 => _848.lastName])].filter(Boolean).join(" ").trim() || _optionalChain([identityUser, 'optionalAccess', _849 => _849.name, 'optionalAccess', _850 => _850.trim, 'call', _851 => _851()]) || void 0 : void 0;
25388
+ const guideUserAvatar = activeMode === "guide" ? _optionalChain([identityUser, 'optionalAccess', _852 => _852.avatarUrl, 'optionalAccess', _853 => _853.trim, 'call', _854 => _854()]) || void 0 : void 0;
25369
25389
  const messages = _react.useMemo.call(void 0, () => {
25370
25390
  const options = { userName: guideUserName, userAvatar: guideUserAvatar, timestampCache };
25371
25391
  const mapped = rawMessages.map((m) => mapHostMessage(m, options));
@@ -25374,6 +25394,7 @@ function EmbeddableChatInner({
25374
25394
  }, [rawMessages, guideUserName, guideUserAvatar, timestampCache]);
25375
25395
  const handleSend = _react.useCallback.call(void 0,
25376
25396
  (text2) => {
25397
+ if (composerLock) return;
25377
25398
  let augmentedText = text2;
25378
25399
  if (readyAttachments.length > 0) {
25379
25400
  const markdown = readyAttachments.map((att) => formatChatAttachmentMarkdownForBubble(att, viewUrlPrefix)).join("");
@@ -25392,7 +25413,7 @@ function EmbeddableChatInner({
25392
25413
  setContextItems([]);
25393
25414
  }
25394
25415
  },
25395
- [sendMessage, readyAttachments, viewUrlPrefix, clearAttachments, contextItems]
25416
+ [composerLock, sendMessage, readyAttachments, viewUrlPrefix, clearAttachments, contextItems]
25396
25417
  );
25397
25418
  const handleAskSelect = _react.useCallback.call(void 0,
25398
25419
  (label) => {
@@ -25539,7 +25560,7 @@ function EmbeddableChatInner({
25539
25560
  _react.useEffect.call(void 0, () => {
25540
25561
  if (!panelBoundary || typeof ResizeObserver === "undefined") return void 0;
25541
25562
  const ro = new ResizeObserver((entries) => {
25542
- const w = _optionalChain([entries, 'access', _854 => _854[0], 'optionalAccess', _855 => _855.contentRect, 'optionalAccess', _856 => _856.width]);
25563
+ const w = _optionalChain([entries, 'access', _855 => _855[0], 'optionalAccess', _856 => _856.contentRect, 'optionalAccess', _857 => _857.width]);
25543
25564
  if (typeof w === "number") setPanelWidth(w);
25544
25565
  });
25545
25566
  ro.observe(panelBoundary);
@@ -25583,18 +25604,18 @@ function EmbeddableChatInner({
25583
25604
  const stackedListView = isMingoMode && !hasConversation && !archiveOpen && !wideMingo && !composeOpen && !emptyListSkipped;
25584
25605
  const headerShowBack = hasConversation || guideCanReturnToMingo;
25585
25606
  const freshConversationTitle = isGuideEmpty ? _nullishCoalesce(headerAssistantName, () => ( "Mingo Guide")) : "New Chat";
25586
- const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _857 => _857.title]) || freshConversationTitle : isGuideEmpty ? freshConversationTitle : "Current Chats";
25607
+ const headerTitle = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _858 => _858.title]) || freshConversationTitle : isGuideEmpty ? freshConversationTitle : "Current Chats";
25587
25608
  const headerBackAriaLabel = hasConversation ? isViewingArchived ? "Back to archive" : "Back" : "Back to Mingo";
25588
25609
  const headerOnBack = hasConversation ? handleBack : () => handleActiveModeChange("mingo");
25589
25610
  const headerOnRestore = isViewingArchived && unarchiveDialog && activeDialog ? () => setRestoreTarget(activeDialog) : void 0;
25590
25611
  const headerOnRename = activeDialogId && activeDialog && mingoCaps.canRename ? () => setRenameTarget(activeDialog) : void 0;
25591
25612
  const headerOnArchive = activeDialogId && activeDialog && mingoCaps.canArchive ? () => setArchiveTarget(activeDialog) : void 0;
25592
- const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _858 => _858.onCopyLink, 'optionalCall', _859 => _859(activeDialog)]) : void 0;
25593
- const headerOnCompact = activeDialogId && activeDialog && mingoCaps.compactDialog ? () => _optionalChain([mingoCaps, 'access', _860 => _860.compactDialog, 'optionalCall', _861 => _861(activeDialog)]) : void 0;
25613
+ const headerOnCopyLink = activeDialogId && activeDialog && mingoCaps.onCopyLink ? () => _optionalChain([mingoCaps, 'access', _859 => _859.onCopyLink, 'optionalCall', _860 => _860(activeDialog)]) : void 0;
25614
+ const headerOnCompact = activeDialogId && activeDialog && mingoCaps.compactDialog ? () => _optionalChain([mingoCaps, 'access', _861 => _861.compactDialog, 'optionalCall', _862 => _862(activeDialog)]) : void 0;
25594
25615
  const headerOnOpenArchive = fetchArchivedDialogs ? openArchive : void 0;
25595
- const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _862 => _862.owner]) : void 0;
25596
- const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _863 => _863.name, 'optionalAccess', _864 => _864.trim, 'call', _865 => _865()]) || headerUserName;
25597
- const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _866 => _866.avatarUrl, 'optionalAccess', _867 => _867.trim, 'call', _868 => _868()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _869 => _869.avatarUrl, 'optionalAccess', _870 => _870.trim, 'call', _871 => _871()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _872 => _872.trim, 'call', _873 => _873()]) || void 0;
25616
+ const headerOwner = hasConversation ? _optionalChain([activeDialog, 'optionalAccess', _863 => _863.owner]) : void 0;
25617
+ const headerPersonName = _optionalChain([headerOwner, 'optionalAccess', _864 => _864.name, 'optionalAccess', _865 => _865.trim, 'call', _866 => _866()]) || headerUserName;
25618
+ const headerPersonAvatarUrl = headerOwner ? _optionalChain([headerOwner, 'access', _867 => _867.avatarUrl, 'optionalAccess', _868 => _868.trim, 'call', _869 => _869()]) || void 0 : _optionalChain([identityUser, 'optionalAccess', _870 => _870.avatarUrl, 'optionalAccess', _871 => _871.trim, 'call', _872 => _872()]) || _optionalChain([userAvatarUrl, 'optionalAccess', _873 => _873.trim, 'call', _874 => _874()]) || void 0;
25598
25619
  const headerAvatar = headerPersonName || headerPersonAvatarUrl ? { name: headerPersonName, avatarUrl: headerPersonAvatarUrl } : void 0;
25599
25620
  const handleNewChat = _react.useCallback.call(void 0, () => {
25600
25621
  resetToNewChat();
@@ -25946,9 +25967,9 @@ function EmbeddableChatInner({
25946
25967
  subtitle: _nullishCoalesce(effectiveGreeting, () => ( void 0)),
25947
25968
  subtitleLoading: emptyStateLoading,
25948
25969
  ...guideWelcome,
25949
- title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _874 => _874.title]))),
25950
- icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _875 => _875.icon]))),
25951
- quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _876 => _876.quickActions]), () => ( guideSuggestedActions)),
25970
+ title: _nullishCoalesce(effectiveAssistantName, () => ( _optionalChain([guideWelcome, 'optionalAccess', _875 => _875.title]))),
25971
+ icon: _nullishCoalesce(effectiveAssistantIcon, () => ( _optionalChain([guideWelcome, 'optionalAccess', _876 => _876.icon]))),
25972
+ quickActions: agentConfigUrl && guideSuggestedActions.length > 0 ? guideSuggestedActions : _nullishCoalesce(_optionalChain([guideWelcome, 'optionalAccess', _877 => _877.quickActions]), () => ( guideSuggestedActions)),
25952
25973
  onQuickAction: (action) => {
25953
25974
  setQuickActionPreview(null);
25954
25975
  handleSend(_nullishCoalesce(action.prompt, () => ( action.label)));
@@ -26006,6 +26027,7 @@ function EmbeddableChatInner({
26006
26027
  ChatComposer,
26007
26028
  {
26008
26029
  archived: isViewingArchived,
26030
+ lock: composerLock,
26009
26031
  inputRef: chatInputRef,
26010
26032
  onSend: handleSend,
26011
26033
  onStop: stopMessage,
@@ -26022,8 +26044,8 @@ function EmbeddableChatInner({
26022
26044
  selectedContextItems: contextItems,
26023
26045
  onToggleContextItem: toggleContextItem,
26024
26046
  onRemoveContextItem: removeContextItem,
26025
- contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _877 => _877.items]),
26026
- onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _878 => _878.onRemove]),
26047
+ contextMemoryItems: _optionalChain([contextMemory, 'optionalAccess', _878 => _878.items]),
26048
+ onRemoveContextMemoryItem: _optionalChain([contextMemory, 'optionalAccess', _879 => _879.onRemove]),
26027
26049
  contextPickerOpen,
26028
26050
  onOpenContextPicker: openContextPicker,
26029
26051
  onCloseContextPicker: closeContextPicker,
@@ -26507,4 +26529,4 @@ function EmbeddableChatInner({
26507
26529
 
26508
26530
 
26509
26531
  exports.FloatingTooltip = FloatingTooltip; exports.tagVariants = tagVariants; exports.Tag = Tag; exports.formatTicketRelativeTime = formatTicketRelativeTime; exports.formatTicketFullTimestamp = formatTicketFullTimestamp; exports.formatRelativeTime = formatRelativeTime; exports.formatAbsoluteDate = formatAbsoluteDate; exports.formatDateTime = formatDateTime; exports.getDetailedTimeDifference = getDetailedTimeDifference; exports.isToday = isToday; exports.isWithinMinutes = isWithinMinutes; exports.createUTCTimestamp = createUTCTimestamp; exports.DESIGN_PALETTE = DESIGN_PALETTE; exports.getContrastRatio = getContrastRatio; exports.pickReadableTextColor = pickReadableTextColor; exports.extractDominantColor = extractDominantColor; exports.getBestContrastColor = getBestContrastColor; exports.analyzeImageColor = analyzeImageColor; exports.extractImageEdgeColorAsync = extractImageEdgeColorAsync; exports.getCurrentPlatform = getCurrentPlatform; exports.switchPlatformTheme = switchPlatformTheme; exports.getSemanticColor = getSemanticColor; exports.getPlatformConfig = getPlatformConfig; exports.usePlatformColors = usePlatformColors; exports.getReadableTextColor = getReadableTextColor; exports.HEX_PATTERN = HEX_PATTERN; exports.hexToRgb = hexToRgb2; exports.rgbToHex = rgbToHex; exports.deriveHoverColor = deriveHoverColor; exports.deriveActiveColor = deriveActiveColor; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.ActionsMenu = ActionsMenu; exports.ActionsMenuDropdown = ActionsMenuDropdown; exports.ColorSwatch = ColorSwatch; exports.TooltipProvider = TooltipProvider; exports.Tooltip = Tooltip; exports.TooltipTrigger = TooltipTrigger; exports.TooltipContent = TooltipContent; exports.resolveTicketStatus = resolveTicketStatus; exports.getTicketStatusConfig = getTicketStatusConfig; exports.getTicketStatusTag = getTicketStatusTag; exports.kindToCanonicalStatus = kindToCanonicalStatus; exports.usesCanonicalStatusStyle = usesCanonicalStatusStyle; exports.resolveStatusTagProps = resolveStatusTagProps; exports.TicketStatusTag = TicketStatusTag; exports.useScrollFade = useScrollFade; exports.ScrollFadeOverlay = ScrollFadeOverlay; exports.ScrollShadow = ScrollShadow; exports.Modal = Modal; exports.ModalContent = ModalContent; exports.ModalTwoColumn = ModalTwoColumn; exports.ModalHeader = ModalHeader; exports.ModalTitle = ModalTitle; exports.ModalFooter = ModalFooter; exports.OVERLAY_BACKDROP_CLASS = OVERLAY_BACKDROP_CLASS; exports.Drawer = Drawer; exports.DrawerTrigger = DrawerTrigger; exports.DrawerClose = DrawerClose; exports.DrawerPortal = DrawerPortal; exports.DrawerOverlay = DrawerOverlay; exports.DrawerContent = DrawerContent; exports.DrawerHeader = DrawerHeader; exports.DrawerTitle = DrawerTitle; exports.DrawerDescription = DrawerDescription; exports.DrawerBody = DrawerBody; exports.DrawerFooter = DrawerFooter; exports.Tabs = Tabs; exports.TabsList = TabsList; exports.TabsTrigger = TabsTrigger; exports.TabsContent = TabsContent; exports.stripInlineMarkdown = stripInlineMarkdown; exports.markdownToPlainText = markdownToPlainText; exports.buildHeadingIdMap = buildHeadingIdMap; exports.useHeadingIdMap = useHeadingIdMap; exports.extractText = extractText; exports.useIsHydrated = useIsHydrated; exports.MermaidDiagram = MermaidDiagram; exports.hasRenderableSrc = hasRenderableSrc; exports.buildStandardLeafRenderers = buildStandardLeafRenderers; exports.SAFE_HTML_TAGS = SAFE_HTML_TAGS; exports.SVG_TAGS = SVG_TAGS; exports.buildEffectiveTagSet = buildEffectiveTagSet; exports.buildSanitizeSchema = buildSanitizeSchema; exports.rehypeStripUnsafe = rehypeStripUnsafe; exports.escapeUnknownHtmlTags = escapeUnknownHtmlTags; exports.cardAwareUrlTransform = cardAwareUrlTransform; exports.splitStreamingBlocks = splitStreamingBlocks; exports.completeStreamingTail = completeStreamingTail; exports.TEXT_SIZE_PRESETS = TEXT_SIZE_PRESETS; exports.resolveTextSizeConfig = resolveTextSizeConfig; exports.NO_BROKEN_LINKS = NO_BROKEN_LINKS; exports.MarkdownEngine = MarkdownEngine; exports.SimpleMarkdownRenderer = SimpleMarkdownRenderer; exports.fetchPriorityProp = fetchPriorityProp; exports.MUX_STREAM_ORIGIN = MUX_STREAM_ORIGIN; exports.MUX_IMAGE_ORIGIN = MUX_IMAGE_ORIGIN; exports.saveDataEnabled = saveDataEnabled; exports.useVideoOriginPreconnect = useVideoOriginPreconnect; exports.useVideoWarmup = useVideoWarmup; exports.VideoPlayBadge = VideoPlayBadge; exports.VideoUnmuteGlyph = VideoUnmuteGlyph; exports.extractYouTubeId = extractYouTubeId; exports.VIDEO_PLAYBACK_FAILED_EVENT = VIDEO_PLAYBACK_FAILED_EVENT; exports.Video = Video2; exports.HoverDropdown = HoverDropdown; exports.ExpandChevron = ExpandChevron; exports.useCollapsible = useCollapsible; exports.getCommandText = getCommandText; exports.ArgRow = ArgRow; exports.ResultBlock = ResultBlock; exports.CommandBlock = CommandBlock; exports.ApprovalStatusTag = ApprovalStatusTag; exports.ApprovalBatchMessage = ApprovalBatchMessage; exports.ApprovalRequestMessage = ApprovalRequestMessage; exports.EscalationOfferMessage = EscalationOfferMessage; exports.formatTime = formatTime; exports.AiAssistantInfo = AiAssistantInfo; exports.TicketEscalatedMessage = TicketEscalatedMessage; exports.MESSAGE_TYPE = MESSAGE_TYPE; exports.SCROLL_ANCHOR = SCROLL_ANCHOR; exports.TICKET_EVENT_KIND = TICKET_EVENT_KIND; exports.TicketEventMessage = TicketEventMessage; exports.ContextCompactionDisplay = ContextCompactionDisplay; exports.ThinkingDisplay = ThinkingDisplay; exports.AskDisplay = AskDisplay; exports.ErrorMessageDisplay = ErrorMessageDisplay; exports.MspOrganizationCard = MspOrganizationCard; exports.MspOrganizationCardSkeleton = MspOrganizationCardSkeleton; exports.ChatContainer = ChatContainer; exports.ChatHeader = ChatHeader; exports.ChatContent = ChatContent; exports.ChatFooter = ChatFooter; exports.ChatTypingIndicator = ChatTypingIndicator; exports.MingoOnboardingCard = MingoOnboardingCard; exports.ICON_REGISTRY = ICON_REGISTRY; exports.normalizeIconKey = normalizeIconKey; exports.getIconComponent = getIconComponent; exports.getDynamicIcon = getDynamicIcon; exports.ICON_ALIASES = ICON_ALIASES; exports.resolveIcon = resolveIcon; exports.ICON_OPTIONS = ICON_OPTIONS; exports.SlashCommandSuggestions = SlashCommandSuggestions; exports.ChatInput = ChatInput; exports.CONTEXT_ROW_CLASS = CONTEXT_ROW_CLASS; exports.CONTEXT_ICON_CLASS = CONTEXT_ICON_CLASS; exports.CONTEXT_LABEL_CLASS = CONTEXT_LABEL_CLASS; exports.CONTEXT_BACK_CLASS = CONTEXT_BACK_CLASS; exports.CONTEXT_STATE_CLASS = CONTEXT_STATE_CLASS; exports.ContextMenuRow = ContextMenuRow; exports.ContextItemsSkeleton = ContextItemsSkeleton; exports.ContextItemsList = ContextItemsList; exports.ContextErrorBoundary = ContextErrorBoundary; exports.CHAT_CONTEXT_ITEMS_DEFAULT_MAX = CHAT_CONTEXT_ITEMS_DEFAULT_MAX; exports.ChatComposerPlusMenu = ChatComposerPlusMenu; exports.ChatContextPicker = ChatContextPicker; exports.ChatContextChipStrip = ChatContextChipStrip; exports.BlockCard = BlockCard; exports.remarkCardLinks = remarkCardLinks; exports.remarkMentionChips = remarkMentionChips; exports.ToolExecutionDisplay = ToolExecutionDisplay; exports.MemoizedChatMessageEnhanced = MemoizedChatMessageEnhanced; exports.ChatMessageSkeleton = ChatMessageSkeleton; exports.ChatMessageListSkeleton = ChatMessageListSkeleton; exports.ChatMessageList = ChatMessageList; exports.useProxiedImageUrl = useProxiedImageUrl; exports.ChatMessageRow = ChatMessageRow; exports.ChatMessageRowSkeleton = ChatMessageRowSkeleton; exports.FAE_AVATAR_DATA_URI = FAE_AVATAR_DATA_URI; exports.AgentMark = AgentMark; exports.EntityIcon = EntityIcon; exports.getAgentAccent = getAgentAccent; exports.accentFromIdentityIcon = accentFromIdentityIcon; exports.isQuickActionIconSpec = isQuickActionIconSpec; exports.renderQuickActionIcon = renderQuickActionIcon; exports.QuickActionChipSkeleton = QuickActionChipSkeleton; exports.QuickActionChipButton = QuickActionChipButton; exports.QuickActionChipFromData = QuickActionChipFromData; exports.useMarqueeSync = useMarqueeSync; exports.getMarqueeTrackOffset = getMarqueeTrackOffset; exports.getMarqueeAppliedOffset = getMarqueeAppliedOffset; exports.getMarqueeCloneTwin = getMarqueeCloneTwin; exports.MarqueeWallFades = MarqueeWallFades; exports.MarqueeWall = MarqueeWall; exports.WALL_SKELETON_LABEL_CH = WALL_SKELETON_LABEL_CH; exports.interleave = interleave; exports.QuickActionWall = QuickActionWall; exports.QuickActionMarquee = QuickActionMarquee; exports.ChatTicketItem = ChatTicketItem; exports.ChatTicketList = ChatTicketList; exports.MingoOnboardingCardSkeleton = MingoOnboardingCardSkeleton; exports.MingoOnboardingListSkeleton = MingoOnboardingListSkeleton; exports.MingoChatHistorySkeleton = MingoChatHistorySkeleton; exports.MingoChatHistory = MingoChatHistory; exports.MingoWelcome = MingoWelcome; exports.GuideWelcome = GuideWelcome; exports.GuideModeBanner = GuideModeBanner; exports.TabSelector = TabSelector; exports.MingoHistoryRail = MingoHistoryRail; exports.RenameChatModal = RenameChatModal; exports.ArchiveChatModal = ArchiveChatModal; exports.UnarchiveChatModal = UnarchiveChatModal; exports.ChatDialogModals = ChatDialogModals; exports.ChatHeaderIconButton = ChatHeaderIconButton; exports.ChatHeaderSearchField = ChatHeaderSearchField; exports.ChatPanelHeader = ChatPanelHeader; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX = CHAT_ATTACHMENT_VIEW_URL_PREFIX; exports.CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM = CHAT_ATTACHMENT_VIEW_TOKEN_QUERY_PARAM; exports.ANTHROPIC_SUPPORTED_IMAGE_MIME = ANTHROPIC_SUPPORTED_IMAGE_MIME; exports.buildChatAttachmentViewUrl = buildChatAttachmentViewUrl; exports.escapeMarkdownInline = escapeMarkdownInline; exports.formatChatAttachmentMarkdownForBubble = formatChatAttachmentMarkdownForBubble; exports.CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED = CHAT_ATTACHMENT_VIEW_URL_PREFIX_REGEX_ESCAPED; exports.CHAT_ATTACHMENT_MARKDOWN_PATTERN = CHAT_ATTACHMENT_MARKDOWN_PATTERN; exports.stripChatAttachmentMarkdown = stripChatAttachmentMarkdown; exports.CHAT_ATTACHMENT_MIME_TYPES = CHAT_ATTACHMENT_MIME_TYPES; exports.CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER = CHAT_ATTACHMENT_CONCURRENT_UPLOADS_PER_USER; exports.ChatAttachmentAddButton = ChatAttachmentAddButton; exports.ChatAttachmentChipStrip = ChatAttachmentChipStrip; exports.ChatContextMemoryBar = ChatContextMemoryBar; exports.HoverCard = HoverCard; exports.HoverCardTrigger = HoverCardTrigger; exports.HoverCardContent = HoverCardContent; exports.ModelDisplay = ModelDisplay; exports.ModelDisplaySkeleton = ModelDisplaySkeleton; exports.ChatComposer = ChatComposer; exports.ChatArchivePage = ChatArchivePage; exports.DialogListItem = DialogListItem; exports.ChatSidebar = ChatSidebar; exports.NEW_TAB_FEATURES = NEW_TAB_FEATURES; exports.isModifierClick = isModifierClick; exports.stripSameOriginToPath = stripSameOriginToPath; exports.resolveExternalNavigation = resolveExternalNavigation; exports.executeNavigation = executeNavigation; exports.executeNavigationImperative = executeNavigationImperative; exports.handleChatNavClick = handleChatNavClick; exports.NavLinkAnchorViaRuntime = NavLinkAnchorViaRuntime; exports.SourceActionButton = SourceActionButton; exports.ADMIN_CONTENT_CARD_GRID_CLASS = ADMIN_CONTENT_CARD_GRID_CLASS; exports.AdminContentCardSkeleton = AdminContentCardSkeleton; exports.AdminContentCardGrid = AdminContentCardGrid; exports.getCaptionsUrl = getCaptionsUrl; exports.rebaseCaptionsUrl = rebaseCaptionsUrl; exports.buildCaptionsUrl = buildCaptionsUrl; exports.getEntityCaptionUrls = getEntityCaptionUrls; exports.getEntityCaptionUrlsById = getEntityCaptionUrlsById; exports.captionsEntityTypeForDocType = captionsEntityTypeForDocType; exports.PAGE_HEADING_CLASS = PAGE_HEADING_CLASS; exports.SECTION_HEADING_CLASS = SECTION_HEADING_CLASS; exports.PageHeading = PageHeading; exports.useCaptions = useCaptions; exports.UserDisplay = UserDisplay; exports.CardHitLayer = CardHitLayer; exports.STRIP_CELL_MAX_WIDTH = STRIP_CELL_MAX_WIDTH; exports.CardsStrip = CardsStrip; exports.VideoHoverPreviewSurface = VideoHoverPreviewSurface; exports.RATIO_GRID_CLASS = RATIO_GRID_CLASS; exports.RATIO_TO_CSS_ASPECT = RATIO_TO_CSS_ASPECT; exports.RatioTabs = RatioTabs; exports.detectAspectRatio = detectAspectRatio; exports.ratioToCategory = ratioToCategory; exports.groupByAspectRatio = groupByAspectRatio; exports.VideoBitesStrip = VideoBitesStrip; exports.VideoBiteCard = VideoBiteCard; exports.EntityVideoSection = EntityVideoSection; exports.ChatVideoEntityCard = ChatVideoEntityCard; exports.GitHubActivityCard = GitHubActivityCard; exports.GitHubActivityCardSkeleton = GitHubActivityCardSkeleton; exports.SlackMessageCard = SlackMessageCard; exports.SlackMessageCardSkeleton = SlackMessageCardSkeleton; exports.HubspotTicketCard = HubspotTicketCard; exports.HubspotTicketCardSkeleton = HubspotTicketCardSkeleton; exports.DataRoomDocCard = DataRoomDocCard; exports.DataRoomDocCardSkeleton = DataRoomDocCardSkeleton; exports.CampaignCardAdmin = CampaignCardAdmin; exports.CampaignCardAdminSkeleton = CampaignCardAdminSkeleton; exports.GenericEntityCard = GenericEntityCard; exports.GenericEntityCardSkeleton = GenericEntityCardSkeleton; exports.faqSectionSlug = faqSectionSlug; exports.faqItemAnchor = faqItemAnchor; exports.parseFaqHash = parseFaqHash; exports.useChatCardItem = useChatCardItem; exports.clickupTaskUrl = clickupTaskUrl; exports.readFetchedCardTitle = readFetchedCardTitle; exports.resolveFetchedCardHref = resolveFetchedCardHref; exports.SOURCE_ICON_NAMES = SOURCE_ICON_NAMES; exports.getSourceIconName = getSourceIconName; exports.SOURCE_LABELS_BY_TABLE = SOURCE_LABELS_BY_TABLE; exports.getSourceLabel = getSourceLabel; exports.DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID = DEFAULT_DOCUMENT_TYPE_TO_TABLE_ID; exports.defaultTableIdForDocumentType = defaultTableIdForDocumentType; exports.byKey = byKey; exports.getPlatformProductionUrl = getPlatformProductionUrl; exports.getPlatformUrl = getPlatformUrl; exports.getDeploymentUrl = getDeploymentUrl; exports.isLocalUrl = isLocalUrl; exports.getRequestOrigin = getRequestOrigin; exports.resolveRedirectTarget = resolveRedirectTarget; exports.getAllPlatformBaseDomains = getAllPlatformBaseDomains; exports.DOC_TABLE_TYPES = DOC_TABLE_TYPES; exports.groupsByTable = groupsByTable; exports.recordCountLabel = recordCountLabel; exports.buildGroupedSource = buildGroupedSource; exports.groupSourcesByTable = groupSourcesByTable; exports.formatCitationIndices = formatCitationIndices; exports.resolveSourceRowCTA = resolveSourceRowCTA; exports.resolveSourceIcon = resolveSourceIcon; exports.chatCardLabel = chatCardLabel; exports.ChatCardLoader = ChatCardLoader; exports.renderChatInlineEntityCard = renderChatInlineEntityCard; exports.CHAT_TYPE = CHAT_TYPE; exports.OWNER_TYPE = OWNER_TYPE; exports.MESSAGE_ROLE = MESSAGE_ROLE; exports.ASSISTANT_TYPE = ASSISTANT_TYPE; exports.AUTHOR_TYPE = AUTHOR_TYPE; exports.APPROVAL_STATUS = APPROVAL_STATUS; exports.APPROVAL_BLOCK_VARIANT = APPROVAL_BLOCK_VARIANT; exports.CONNECTION_STATUS = CONNECTION_STATUS; exports.isStructuredContent = isStructuredContent; exports.normalizeContent = normalizeContent2; exports.NETWORK_CONFIG = NETWORK_CONFIG; exports.EMPTY_DIALOG_CAPABILITIES = EMPTY_DIALOG_CAPABILITIES; exports.useChunkCatchup = useChunkCatchup; exports.useScriptedStream = useScriptedStream; exports.RESYNC_AFTER_HIDDEN_MS = RESYNC_AFTER_HIDDEN_MS; exports.useJetStreamDialogSubscription = useJetStreamDialogSubscription; exports.useNatsDialogSubscription = useNatsDialogSubscription; exports.buildNatsWsUrl = buildNatsWsUrl; exports.fetchSlashCommands = fetchSlashCommands; exports.useSlashCommands = useSlashCommands; exports.useSlashCommandRegistry = useSlashCommandRegistry; exports.fetchEmptyStateConfig = fetchEmptyStateConfig; exports.useEmptyStateConfig = useEmptyStateConfig; exports.useChatAttachments = useChatAttachments; exports.useChatAttachmentImageGallery = useChatAttachmentImageGallery; exports.ChatIdentityProvider = ChatIdentityProvider; exports.useChatIdentity = useChatIdentity; exports.useCloseOnNavigation = useCloseOnNavigation; exports.useSSE = useSSE; exports.useChat = useChat; exports.approvalDisplaysInline = approvalDisplaysInline; exports.appendToTrailingAssistant = appendToTrailingAssistant; exports.upsertTrailingCompaction = upsertTrailingCompaction; exports.applyToolExecutionToMessages = applyToolExecutionToMessages; exports.MessageSegmentAccumulator = MessageSegmentAccumulator; exports.createMessageSegmentAccumulator = createMessageSegmentAccumulator; exports.SCROLL_ANCHOR_WIRE_KEY = SCROLL_ANCHOR_WIRE_KEY; exports.parseScrollAnchor = parseScrollAnchor; exports.createEmptyTurnMeta = createEmptyTurnMeta; exports.createChatStreamReducer = createChatStreamReducer; exports.DEFAULT_DIALOG_SIDE = DEFAULT_DIALOG_SIDE; exports.DEFAULT_MAX_REDUCERS = DEFAULT_MAX_REDUCERS; exports.MAX_PENDING_RETAIN_KEYS = MAX_PENDING_RETAIN_KEYS; exports.createChatDialogStore = createChatDialogStore; exports.createDeltaBatcher = createDeltaBatcher; exports.useChatStreamReducer = useChatStreamReducer; exports.createChatConversationsApi = createChatConversationsApi; exports.parseWireCommandOverride = parseWireCommandOverride; exports.sanitizeTitleForChat = sanitizeTitleForChat; exports.formatSingularLookupInvocation = formatSingularLookupInvocation; exports.extractEntityIdFilter = extractEntityIdFilter; exports.buildDiscussAddendum = buildDiscussAddendum; exports.buildDiscussPrompt = buildDiscussPrompt; exports.AUTO_CONTINUATION_DIRECTIVE_PREFIX = AUTO_CONTINUATION_DIRECTIVE_PREFIX; exports.buildAutoContinuationDirective = buildAutoContinuationDirective; exports.useManagedDialogList = useManagedDialogList; exports.useSseChatAdapter = useSseChatAdapter; exports.extractIncompleteMessageState = extractIncompleteMessageState; exports.extractIncompleteTailState = extractIncompleteTailState; exports.decodeHistoricalMessageData = decodeHistoricalMessageData; exports.processHistoricalMessages = processHistoricalMessages; exports.extractErrorMessages = extractErrorMessages; exports.processHistoricalMessagesWithErrors = processHistoricalMessagesWithErrors; exports.mapProcessedToUnified = mapProcessedToUnified; exports.historicalToUnified = historicalToUnified; exports.useNatsChatAdapter = useNatsChatAdapter; exports.useStableShallow = useStableShallow; exports.useUnifiedChat = useUnifiedChat; exports.SYNTHETIC_REALTIME_ID_PREFIXES = SYNTHETIC_REALTIME_ID_PREFIXES; exports.flattenMessagePagesChronological = flattenMessagePagesChronological; exports.maxPersistedStreamSeq = maxPersistedStreamSeq; exports.mergeHistoryWithRealtime = mergeHistoryWithRealtime; exports.computeHistoryPrepend = computeHistoryPrepend; exports.CHIP_ACTION_BUTTON_CLASS = CHIP_ACTION_BUTTON_CLASS; exports.chatChipClass = chatChipClass; exports.flattenAssistantContent = flattenAssistantContent; exports.normalizeHistoricalMessageData = normalizeHistoricalMessageData; exports.isHistoricalUserTurn = isHistoricalUserTurn; exports.buildStreamFrames = buildStreamFrames; exports.EmbeddableChat = EmbeddableChat;
26510
- //# sourceMappingURL=chunk-MNUR6PAJ.cjs.map
26532
+ //# sourceMappingURL=chunk-23XIOIGS.cjs.map