@viswa-test/test-citation 0.0.194 → 0.0.196

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 (108) hide show
  1. package/README.md +290 -0
  2. package/dist/cjs/features/CognitiveCompare/CitationRenderer.js +1 -1
  3. package/dist/cjs/features/CognitiveCompare/CognitiveCompare.js +1 -1
  4. package/dist/cjs/features/ManageRemainders/AssigneeCalendarView.js +2 -0
  5. package/dist/cjs/features/ManageRemainders/AssigneeCalendarView.js.map +1 -0
  6. package/dist/cjs/features/ManageRemainders/ManageRemainder.module.css.js +2 -0
  7. package/dist/cjs/features/ManageRemainders/ManageRemainder.module.css.js.map +1 -0
  8. package/dist/cjs/features/ManageRemainders/ManageReminders.js +2 -0
  9. package/dist/cjs/features/ManageRemainders/ManageReminders.js.map +1 -0
  10. package/dist/cjs/features/ManageRemainders/ReminderFrequencyAutocomplete.js +2 -0
  11. package/dist/cjs/features/ManageRemainders/ReminderFrequencyAutocomplete.js.map +1 -0
  12. package/dist/cjs/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  13. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  14. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  15. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  16. package/dist/cjs/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
  17. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  18. package/dist/cjs/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  19. package/dist/cjs/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +2 -0
  20. package/dist/cjs/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js.map +1 -0
  21. package/dist/cjs/features/RequirementAI/components/segment/Segment.js +1 -1
  22. package/dist/cjs/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  23. package/dist/cjs/features/RequirementAI/components/segment/segment.module.css.js +1 -1
  24. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  25. package/dist/cjs/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  26. package/dist/cjs/features/UserStoryImport/UserStoryPicker.js +1 -1
  27. package/dist/cjs/features/UserStoryImport/components/TypeDropdown.js +1 -1
  28. package/dist/cjs/features/UserStoryImport/components/UserStoryCard.js +1 -1
  29. package/dist/cjs/index.js +1 -1
  30. package/dist/features/CognitiveCompare/CitationRenderer.js +1 -1
  31. package/dist/features/CognitiveCompare/CognitiveCompare.js +1 -1
  32. package/dist/features/ManageRemainders/AssigneeCalendarView.js +2 -0
  33. package/dist/features/ManageRemainders/AssigneeCalendarView.js.map +1 -0
  34. package/dist/features/ManageRemainders/ManageRemainder.module.css.js +2 -0
  35. package/dist/features/ManageRemainders/ManageRemainder.module.css.js.map +1 -0
  36. package/dist/features/ManageRemainders/ManageReminders.js +2 -0
  37. package/dist/features/ManageRemainders/ManageReminders.js.map +1 -0
  38. package/dist/features/ManageRemainders/ReminderFrequencyAutocomplete.js +2 -0
  39. package/dist/features/ManageRemainders/ReminderFrequencyAutocomplete.js.map +1 -0
  40. package/dist/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.js +1 -1
  41. package/dist/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.js +1 -1
  42. package/dist/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.js +1 -1
  43. package/dist/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.js +1 -1
  44. package/dist/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.js +1 -1
  45. package/dist/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.js +1 -1
  46. package/dist/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.js +1 -1
  47. package/dist/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js +2 -0
  48. package/dist/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.js.map +1 -0
  49. package/dist/features/RequirementAI/components/segment/Segment.js +1 -1
  50. package/dist/features/RequirementAI/components/segment/SegmentWrapper.js +1 -1
  51. package/dist/features/RequirementAI/components/segment/segment.module.css.js +1 -1
  52. package/dist/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.js +1 -1
  53. package/dist/features/RequirementAI/components/userstory-with-citation/components/InlineUpdatedComponent.js +1 -1
  54. package/dist/features/UserStoryImport/UserStoryPicker.js +1 -1
  55. package/dist/features/UserStoryImport/components/TypeDropdown.js +1 -1
  56. package/dist/features/UserStoryImport/components/UserStoryCard.js +1 -1
  57. package/dist/index.js +1 -1
  58. package/dist/types/src/CommonConstants/CommonConstants.d.ts +9214 -0
  59. package/dist/types/src/CommonConstants/CommonConstants.d.ts.map +1 -1
  60. package/dist/types/src/features/CognitiveCompare/CitationRenderer.d.ts.map +1 -1
  61. package/dist/types/src/features/CognitiveCompare/CognitiveCompare.d.ts.map +1 -1
  62. package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts +0 -1
  63. package/dist/types/src/features/CognitiveCompare/hooks/useCompareLayout.d.ts.map +1 -1
  64. package/dist/types/src/features/ManageRemainders/AssigneeCalendarView.d.ts +19 -0
  65. package/dist/types/src/features/ManageRemainders/AssigneeCalendarView.d.ts.map +1 -0
  66. package/dist/types/src/features/ManageRemainders/ManageRemainderUsage.d.ts +2 -0
  67. package/dist/types/src/features/ManageRemainders/ManageRemainderUsage.d.ts.map +1 -0
  68. package/dist/types/src/features/ManageRemainders/ManageReminders.d.ts +49 -0
  69. package/dist/types/src/features/ManageRemainders/ManageReminders.d.ts.map +1 -0
  70. package/dist/types/src/features/ManageRemainders/ReminderFrequencyAutocomplete.d.ts +17 -0
  71. package/dist/types/src/features/ManageRemainders/ReminderFrequencyAutocomplete.d.ts.map +1 -0
  72. package/dist/types/src/features/ManageRemainders/types/type.d.ts +79 -0
  73. package/dist/types/src/features/ManageRemainders/types/type.d.ts.map +1 -0
  74. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts +13 -1
  75. package/dist/types/src/features/RequirementAI/components/UserStoryCard/CognitiveComponents/CognitiveComponent.d.ts.map +1 -1
  76. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts +18 -4
  77. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/DeviationSummary.d.ts.map +1 -1
  78. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.d.ts +6 -1
  79. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/IterateComponent.d.ts.map +1 -1
  80. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts +5 -1
  81. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/RedlineStatusCard.d.ts.map +1 -1
  82. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.d.ts +4 -1
  83. package/dist/types/src/features/RequirementAI/components/UserStoryCard/Popups/ToneToggle.d.ts.map +1 -1
  84. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasonMarkdownWrapper.d.ts.map +1 -1
  85. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.d.ts +3 -1
  86. package/dist/types/src/features/RequirementAI/components/ai-reasoning/AiReasoningCitation.d.ts.map +1 -1
  87. package/dist/types/src/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.d.ts +11 -0
  88. package/dist/types/src/features/RequirementAI/components/ai-reasoning/ScannedCitationRenderer.d.ts.map +1 -0
  89. package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts +0 -1
  90. package/dist/types/src/features/RequirementAI/components/segment/Segment.d.ts.map +1 -1
  91. package/dist/types/src/features/RequirementAI/components/segment/SegmentWrapper.d.ts.map +1 -1
  92. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts +3 -1
  93. package/dist/types/src/features/RequirementAI/components/userstory-with-citation/UserStoryWithCitation.d.ts.map +1 -1
  94. package/dist/types/src/features/RequirementAI/interfaces/citation.interface.d.ts +37 -0
  95. package/dist/types/src/features/RequirementAI/interfaces/citation.interface.d.ts.map +1 -1
  96. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts +3 -0
  97. package/dist/types/src/features/RequirementAI/types/aiReasoning.type.d.ts.map +1 -1
  98. package/dist/types/src/features/UserStoryImport/UserStoryPicker.context.d.ts +1 -0
  99. package/dist/types/src/features/UserStoryImport/UserStoryPicker.context.d.ts.map +1 -1
  100. package/dist/types/src/features/UserStoryImport/UserStoryPicker.d.ts +1 -1
  101. package/dist/types/src/features/UserStoryImport/UserStoryPicker.d.ts.map +1 -1
  102. package/dist/types/src/features/UserStoryImport/UserStoryPicker.types.d.ts +1 -0
  103. package/dist/types/src/features/UserStoryImport/UserStoryPicker.types.d.ts.map +1 -1
  104. package/dist/types/src/features/UserStoryImport/components/TypeDropdown.d.ts.map +1 -1
  105. package/dist/types/src/features/UserStoryImport/components/UserStoryCard.d.ts.map +1 -1
  106. package/dist/types/src/index.d.ts +1 -0
  107. package/dist/types/src/index.d.ts.map +1 -1
  108. package/package.json +15 -8
@@ -0,0 +1,2 @@
1
+ var e={mrContainer:"ManageRemainder-module_mrContainer__kVgxT",mrSectionBox:"ManageRemainder-module_mrSectionBox__bEDtY",mrSectionHeader:"ManageRemainder-module_mrSectionHeader__5k1HQ",mrSectionHeaderContent:"ManageRemainder-module_mrSectionHeaderContent__eKJWh",mrSectionHeaderLeft:"ManageRemainder-module_mrSectionHeaderLeft__I-hzD",mrSectionHeaderRight:"ManageRemainder-module_mrSectionHeaderRight__W-BY3",mrSectionTitleWrapper:"ManageRemainder-module_mrSectionTitleWrapper__NA6i-",mrSectionTitleIcon:"ManageRemainder-module_mrSectionTitleIcon__6pWZz",mrSectionTitle:"ManageRemainder-module_mrSectionTitle__BPAU2",mrSectionDescription:"ManageRemainder-module_mrSectionDescription__HdkjC",mrIconSmall:"ManageRemainder-module_mrIconSmall__kbiWd",mrIconInfo:"ManageRemainder-module_mrIconInfo__U8Ylz",mrIconArrow:"ManageRemainder-module_mrIconArrow__wMp9q",mrIconAction:"ManageRemainder-module_mrIconAction__l9uVi",mrIconPreview:"ManageRemainder-module_mrIconPreview__oYo84",mrIconCalendar:"ManageRemainder-module_mrIconCalendar__2gaaf",mrIconChevronToggle:"ManageRemainder-module_mrIconChevronToggle__LjUy1",mrIconDropdown:"ManageRemainder-module_mrIconDropdown__-heGj",mrIconSuccess:"ManageRemainder-module_mrIconSuccess__EMJrR",mrChevronButton:"ManageRemainder-module_mrChevronButton__QKLsI",mrChevronIcon:"ManageRemainder-module_mrChevronIcon__CxLkq",mrChevronRotated:"ManageRemainder-module_mrChevronRotated__NL7Ho",mrSuccessMessage:"ManageRemainder-module_mrSuccessMessage__4N0gO",mrSuccessIcon:"ManageRemainder-module_mrSuccessIcon__PsybU",mrSuccessIconInner:"ManageRemainder-module_mrSuccessIconInner__yEl8-",mrSuccessText:"ManageRemainder-module_mrSuccessText__-hXJh",mrSuccessTitle:"ManageRemainder-module_mrSuccessTitle__Zakof",mrSuccessDescription:"ManageRemainder-module_mrSuccessDescription__-r7A8",mrHiddenSection:"ManageRemainder-module_mrHiddenSection__c67oj",mrRecipientsSection:"ManageRemainder-module_mrRecipientsSection__L0f1k",mrRecipientsLabel:"ManageRemainder-module_mrRecipientsLabel__Escta",mrRecipientsGrid:"ManageRemainder-module_mrRecipientsGrid__-7giX",mrRecipientItem:"ManageRemainder-module_mrRecipientItem__C0uw5",mrRecipientInfo:"ManageRemainder-module_mrRecipientInfo__djuEp",mrRecipientAvatar:"ManageRemainder-module_mrRecipientAvatar__g6YDo",mrRecipientName:"ManageRemainder-module_mrRecipientName__gFCJU",mrCheckboxUnchecked:"ManageRemainder-module_mrCheckboxUnchecked__j0wYE",mrCheckboxChecked:"ManageRemainder-module_mrCheckboxChecked__TowNb",mrCheckboxIcon:"ManageRemainder-module_mrCheckboxIcon__RVL-V",mrActionsSection:"ManageRemainder-module_mrActionsSection__in30u",mrActionButton:"ManageRemainder-module_mrActionButton__x9IEC",mrActionButtonSecondary:"ManageRemainder-module_mrActionButtonSecondary__GBvpQ",mrActionButtonPrimary:"ManageRemainder-module_mrActionButtonPrimary__vRNbF",mrMainContent:"ManageRemainder-module_mrMainContent__2gAUU",mrEscalationContainer:"ManageRemainder-module_mrEscalationContainer__V4PfB",mrEscalationHeaderWrapper:"ManageRemainder-module_mrEscalationHeaderWrapper__vOg2K",mrEscalationHeader:"ManageRemainder-module_mrEscalationHeader__sV-tw",mrEscalationTitleWrapper:"ManageRemainder-module_mrEscalationTitleWrapper__G90xv",mrEscalationTitleText:"ManageRemainder-module_mrEscalationTitleText__X233z",mrTooltipIcon:"ManageRemainder-module_mrTooltipIcon__QpPGO",mrEscalationActions:"ManageRemainder-module_mrEscalationActions__RoHhx",mrEscalationPreviewButton:"ManageRemainder-module_mrEscalationPreviewButton__68J90",mrEscalationPreviewIcon:"ManageRemainder-module_mrEscalationPreviewIcon__KNa9K",mrEscalationPreviewText:"ManageRemainder-module_mrEscalationPreviewText__FM5S5",mrEscalationDescription:"ManageRemainder-module_mrEscalationDescription__z-3q8",mrReorderGroup:"ManageRemainder-module_mrReorderGroup__sLaAn",mrReminderItem:"ManageRemainder-module_mrReminderItem__kwd0b",mrReminderLabelBox:"ManageRemainder-module_mrReminderLabelBox__KRi5V",mrReminderLabelInner:"ManageRemainder-module_mrReminderLabelInner__GuTh-",mrReminderContent:"ManageRemainder-module_mrReminderContent__yKbGS",mrDragHandle:"ManageRemainder-module_mrDragHandle__4Lz8t",mrReminderBox:"ManageRemainder-module_mrReminderBox__ur54z",mrReminderFields:"ManageRemainder-module_mrReminderFields__yQROF",mrReminderHeader:"ManageRemainder-module_mrReminderHeader__wMUF6",mrReminderAssignee:"ManageRemainder-module_mrReminderAssignee__0p1Gb",mrReminderAvatar:"ManageRemainder-module_mrReminderAvatar__6KM5V",mrReminderInitials:"ManageRemainder-module_mrReminderInitials__bUFkd",mrReminderName:"ManageRemainder-module_mrReminderName__zjceM",mrReminderStatement:"ManageRemainder-module_mrReminderStatement__7Y0B-",mrReminderStatementText:"ManageRemainder-module_mrReminderStatementText__LodbK",mrReminderDateFields:"ManageRemainder-module_mrReminderDateFields__GT4N9",mrReminderField:"ManageRemainder-module_mrReminderField__XBiO4",mrReminderFieldLabel:"ManageRemainder-module_mrReminderFieldLabel__S9dXV",mrReminderDatePicker:"ManageRemainder-module_mrReminderDatePicker__Vgbui",mrReminderDueDate:"ManageRemainder-module_mrReminderDueDate__7nawQ",mrReminderFrequency:"ManageRemainder-module_mrReminderFrequency__Qq1qa",mrReminderFrequencyText:"ManageRemainder-module_mrReminderFrequencyText__lGfl0",mrEscalationCheckbox:"ManageRemainder-module_mrEscalationCheckbox__xZrG3",mrEscalationCheckboxHeader:"ManageRemainder-module_mrEscalationCheckboxHeader__1GgFB",mrEscalationContent:"ManageRemainder-module_mrEscalationContent__ItAyr",mrEscalationCondition:"ManageRemainder-module_mrEscalationCondition__4GCeD",mrEscalationFields:"ManageRemainder-module_mrEscalationFields__oFHp-",mrEscalationFieldGroup:"ManageRemainder-module_mrEscalationFieldGroup__uES3-",mrEscalationFieldGroupLarge:"ManageRemainder-module_mrEscalationFieldGroupLarge__MpVYP",mrEscalationFieldGroupSmall:"ManageRemainder-module_mrEscalationFieldGroupSmall__FFbRJ",mrEscalationFieldText:"ManageRemainder-module_mrEscalationFieldText__n7EfI",mrDropdownButton:"ManageRemainder-module_mrDropdownButton__9wvGh",mrCalendarPanel:"ManageRemainder-module_mrCalendarPanel__PnMpt",mrCalendarCollapsed:"ManageRemainder-module_mrCalendarCollapsed__mb-bI",mrCalendarToggle:"ManageRemainder-module_mrCalendarToggle__9HIet",mrNoPointerEvents:"ManageRemainder-module_mrNoPointerEvents__OQbav",mrPointerEventsAuto:"ManageRemainder-module_mrPointerEventsAuto__0avRT",calendarContainer:"ManageRemainder-module_calendarContainer__N804t",calendarHeader:"ManageRemainder-module_calendarHeader__BjE9o",calendarHeaderTitle:"ManageRemainder-module_calendarHeaderTitle__U8NmV",calendarHeaderInfo:"ManageRemainder-module_calendarHeaderInfo__s05VQ",monthNav:"ManageRemainder-module_monthNav__FBbyi",monthNavBtn:"ManageRemainder-module_monthNavBtn__oor7V",monthNavTitle:"ManageRemainder-module_monthNavTitle__zgDDq",weekdayHeader:"ManageRemainder-module_weekdayHeader__XciP8",weekdayLabel:"ManageRemainder-module_weekdayLabel__dDWJo",dayGrid:"ManageRemainder-module_dayGrid__dT0og",dayCell:"ManageRemainder-module_dayCell__AGx-w",dayCellPast:"ManageRemainder-module_dayCellPast__91hbu",dayCellToday:"ManageRemainder-module_dayCellToday__q8Wvi",dayNumber:"ManageRemainder-module_dayNumber__6yOVW",dayNumberCurrent:"ManageRemainder-module_dayNumberCurrent__6ML9j",dayNumberOutside:"ManageRemainder-module_dayNumberOutside__JQ-t7",indicatorWrapper:"ManageRemainder-module_indicatorWrapper__5FOym",indicatorDot:"ManageRemainder-module_indicatorDot__ElweF",indicatorDotOverlap:"ManageRemainder-module_indicatorDotOverlap__QPBRy",tooltipContent:"ManageRemainder-module_tooltipContent__ErzOu",tooltipHeader:"ManageRemainder-module_tooltipHeader__Q4qHO",tooltipTitle:"ManageRemainder-module_tooltipTitle__iZtI4",tooltipDate:"ManageRemainder-module_tooltipDate__ulMaQ",tooltipAssignees:"ManageRemainder-module_tooltipAssignees__jGc-Y",tooltipAssigneeRow:"ManageRemainder-module_tooltipAssigneeRow__nzr3m",tooltipAssigneeInfo:"ManageRemainder-module_tooltipAssigneeInfo__vIXTP",tooltipAssigneeDot:"ManageRemainder-module_tooltipAssigneeDot__yz6E6",tooltipAssigneeName:"ManageRemainder-module_tooltipAssigneeName__JJbid",tooltipAssigneeCount:"ManageRemainder-module_tooltipAssigneeCount__49OVk",legendWrapper:"ManageRemainder-module_legendWrapper__OfxhE",legendInner:"ManageRemainder-module_legendInner__iwIe7",legendItem:"ManageRemainder-module_legendItem__zbxBG",legendItemAssignee1:"ManageRemainder-module_legendItemAssignee1__I6F-D",legendItemAssignee2:"ManageRemainder-module_legendItemAssignee2__YObVW",legendItemAssignee3:"ManageRemainder-module_legendItemAssignee3__uCkBW",legendLabel:"ManageRemainder-module_legendLabel__Va4Sw",legendLabelAssignee1:"ManageRemainder-module_legendLabelAssignee1__vG-F4",legendLabelAssignee2:"ManageRemainder-module_legendLabelAssignee2__CbGVb",legendLabelAssignee3:"ManageRemainder-module_legendLabelAssignee3__cz-57",checkboxIconUnchecked:"ManageRemainder-module_checkboxIconUnchecked__xoI0S",checkboxIconChecked:"ManageRemainder-module_checkboxIconChecked__Y3mN2",checkboxIconCheckedAssignee1:"ManageRemainder-module_checkboxIconCheckedAssignee1__817aZ",checkboxIconCheckedAssignee2:"ManageRemainder-module_checkboxIconCheckedAssignee2__hTAKp",checkboxIconCheckedAssignee3:"ManageRemainder-module_checkboxIconCheckedAssignee3__hQwwN",checkboxCheckSvg:"ManageRemainder-module_checkboxCheckSvg__R87mg",bottomLegend:"ManageRemainder-module_bottomLegend__rRzkt",bottomLegendItem:"ManageRemainder-module_bottomLegendItem__u90vA",bottomLegendSwatch:"ManageRemainder-module_bottomLegendSwatch__9uu1M",bottomLegendSwatchPast:"ManageRemainder-module_bottomLegendSwatchPast__-DcRZ",bottomLegendSwatchFailed:"ManageRemainder-module_bottomLegendSwatchFailed__9lK2I",bottomLegendLabel:"ManageRemainder-module_bottomLegendLabel__9eDD-"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const a=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;a&&e.setAttribute("nonce",a),e.appendChild(document.createTextNode(".ManageRemainder-module_mrContainer__kVgxT{align-items:center;display:flex;flex-direction:column;gap:1rem;justify-content:center;margin-top:1rem}.ManageRemainder-module_mrSectionBox__bEDtY{border:1px solid #b6c1ca;border-radius:10px;cursor:pointer;display:flex;flex-direction:column;gap:.75rem;padding:.75rem;width:100%}.ManageRemainder-module_mrSectionHeader__5k1HQ{display:flex;flex-direction:column;gap:.25rem}.ManageRemainder-module_mrSectionHeaderContent__eKJWh{display:flex;flex-direction:row;gap:.5rem;justify-content:space-between;width:100%}.ManageRemainder-module_mrSectionHeaderLeft__I-hzD{display:flex;flex-direction:column;gap:.25rem}.ManageRemainder-module_mrSectionHeaderRight__W-BY3{align-items:center;display:flex;gap:.25rem;justify-content:flex-start}.ManageRemainder-module_mrSectionTitleWrapper__NA6i-{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrSectionTitleIcon__6pWZz{align-items:center;display:flex;height:.75rem;justify-content:center;width:.75rem}.ManageRemainder-module_mrSectionTitle__BPAU2{color:#334155;font-size:.875rem;font-weight:600}.ManageRemainder-module_mrSectionDescription__HdkjC{color:#334155;font-size:.75rem;font-weight:400}.ManageRemainder-module_mrIconSmall__kbiWd{color:#334155;height:.75rem;width:.75rem}.ManageRemainder-module_mrIconInfo__U8Ylz{color:#64748b;height:1rem;width:1rem}.ManageRemainder-module_mrIconArrow__wMp9q{stroke:#334155;height:.75rem;width:.75rem}.ManageRemainder-module_mrIconAction__l9uVi{height:1rem;width:1rem}.ManageRemainder-module_mrIconPreview__oYo84{stroke:#64748b;height:1rem;width:1rem}.ManageRemainder-module_mrIconCalendar__2gaaf{color:#1e293b;height:1.25rem;width:1.25rem}.ManageRemainder-module_mrIconChevronToggle__LjUy1{color:#4f46e5;height:1rem;position:fixed;width:1rem}.ManageRemainder-module_mrIconDropdown__-heGj{height:.75rem;width:.75rem}.ManageRemainder-module_mrIconSuccess__EMJrR{color:#16a34a;height:1.5rem;width:1.5rem}.ManageRemainder-module_mrChevronButton__QKLsI{align-items:center;display:flex;justify-content:center}.ManageRemainder-module_mrChevronIcon__CxLkq{height:1.25rem;transition:transform .2s ease;width:1.25rem}.ManageRemainder-module_mrChevronIcon__CxLkq.ManageRemainder-module_mrChevronRotated__NL7Ho{transform:rotate(180deg)}.ManageRemainder-module_mrSuccessMessage__4N0gO{align-items:center;display:inline-flex;flex-direction:column;gap:.75rem;width:100%}.ManageRemainder-module_mrSuccessIcon__PsybU{align-items:center;background-color:#dcfce7;border-radius:9999px;box-shadow:0 0 0 4px #fff;display:flex;height:3rem;justify-content:center;width:3rem}.ManageRemainder-module_mrSuccessIconInner__yEl8-{height:1.5rem;position:relative;width:1.5rem}.ManageRemainder-module_mrSuccessText__-hXJh{align-items:center;display:flex;flex-direction:column;gap:.25rem;text-align:center}.ManageRemainder-module_mrSuccessTitle__Zakof{color:#166534;font-size:1rem;font-weight:500;line-height:1.5}.ManageRemainder-module_mrSuccessDescription__-r7A8{color:#22c55e;font-size:.875rem;font-weight:400;line-height:1.25}.ManageRemainder-module_mrRecipientsSection__L0f1k{display:flex;flex-direction:column;gap:.5rem}.ManageRemainder-module_mrRecipientsLabel__Escta{color:#3f3f46;font-size:.75rem;font-weight:500}.ManageRemainder-module_mrRecipientsGrid__-7giX{display:flex;flex-wrap:wrap;gap:.75rem;margin-bottom:.75rem}.ManageRemainder-module_mrRecipientItem__C0uw5{align-items:center;background-color:#fff;border:1px solid #cbd5e1;border-radius:.375rem;display:flex;gap:.5rem;padding:.25rem .5rem}.ManageRemainder-module_mrRecipientInfo__djuEp{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrRecipientAvatar__g6YDo{align-items:center;border-radius:9999px;display:flex;font-size:.6875rem;font-weight:500;height:1.5rem;justify-content:center;width:1.5rem}.ManageRemainder-module_mrRecipientName__gFCJU{color:#3f3f46;font-size:.875rem}.ManageRemainder-module_mrCheckboxUnchecked__j0wYE{background-color:#fff;border:1px solid #d0d5dd;border-radius:.25rem;height:1rem;width:1rem}.ManageRemainder-module_mrCheckboxChecked__TowNb{align-items:center;background-color:#fff;border:1px solid #6938ef;border-radius:.25rem;display:flex;height:1rem;justify-content:center;width:1rem}.ManageRemainder-module_mrCheckboxIcon__RVL-V{height:.625rem;width:.625rem}.ManageRemainder-module_mrActionsSection__in30u{display:flex;gap:.75rem}.ManageRemainder-module_mrActionButton__x9IEC{align-items:center;border:none;border-radius:.375rem;cursor:pointer;display:flex;flex:1;font-size:.875rem;font-weight:500;gap:.5rem;height:2.25rem;justify-content:center}.ManageRemainder-module_mrActionButtonSecondary__GBvpQ{background-color:#fff;border:1px solid #a5b4fc;color:#4f46e5}.ManageRemainder-module_mrActionButtonSecondary__GBvpQ:hover{background-color:#f3f4f6}.ManageRemainder-module_mrActionButtonPrimary__vRNbF{background-color:#4f46e5;color:#fff}.ManageRemainder-module_mrActionButtonPrimary__vRNbF:hover{background-color:#4338ca}.ManageRemainder-module_mrMainContent__2gAUU{display:flex;flex-direction:row;gap:1.75rem;width:100%}.ManageRemainder-module_mrEscalationContainer__V4PfB{background-color:#ffffffb3;border-radius:10px;display:flex;flex:1;flex-direction:column;gap:.75rem;min-width:0;outline:1px solid #b6c1ca;outline-offset:-1px;padding:.75rem}.ManageRemainder-module_mrEscalationHeaderWrapper__vOg2K{cursor:pointer;display:flex;flex-direction:column;gap:.25rem;justify-content:space-between}.ManageRemainder-module_mrEscalationHeader__sV-tw{align-items:center;display:flex;gap:.5rem;justify-content:space-between}.ManageRemainder-module_mrEscalationTitleWrapper__G90xv{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrEscalationTitleText__X233z{color:#3f3f46;font-size:.875rem;font-weight:600;line-height:1.25}.ManageRemainder-module_mrTooltipIcon__QpPGO{height:1rem;overflow:hidden;position:relative;width:1rem}.ManageRemainder-module_mrEscalationActions__RoHhx{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrEscalationPreviewButton__68J90{align-items:center;background-color:#fff;border:none;border-radius:1.29rem;box-shadow:0 1px 2px 0 #0000000d;cursor:pointer;display:flex;gap:.375rem;height:1.75rem;outline:.54px solid #d1d5db;outline-offset:-.54px;padding:.375rem .875rem}.ManageRemainder-module_mrEscalationPreviewIcon__KNa9K{height:1rem;overflow:hidden;position:relative;width:1rem}.ManageRemainder-module_mrEscalationPreviewText__FM5S5{color:#6b7280;font-size:.75rem;font-weight:400;line-height:1rem}.ManageRemainder-module_mrEscalationDescription__z-3q8{color:#334155;font-size:.75rem;font-weight:400}.ManageRemainder-module_mrReorderGroup__sLaAn{display:flex;flex-direction:column;gap:1.5rem}.ManageRemainder-module_mrReminderItem__kwd0b{display:flex;gap:1rem;justify-content:space-between;width:100%}.ManageRemainder-module_mrReminderLabelBox__KRi5V{display:flex;flex-shrink:0;justify-content:center;width:90px}.ManageRemainder-module_mrReminderLabelInner__GuTh-{align-items:center;display:flex}.ManageRemainder-module_mrReminderContent__yKbGS{align-items:center;display:flex;gap:1rem;width:100%}.ManageRemainder-module_mrDragHandle__4Lz8t{align-items:center;cursor:grab;display:flex;gap:.75rem}.ManageRemainder-module_mrReminderBox__ur54z{border-radius:.75rem;padding:.5rem;width:100%}.ManageRemainder-module_mrReminderFields__yQROF{display:flex;flex-direction:column;flex-wrap:wrap;gap:1rem;width:100%}.ManageRemainder-module_mrReminderHeader__wMUF6{align-items:flex-start;display:flex;gap:1rem;justify-content:space-between;width:100%}.ManageRemainder-module_mrReminderAssignee__0p1Gb{align-items:center;display:flex;gap:.75rem}.ManageRemainder-module_mrReminderAvatar__6KM5V{align-items:center;background-color:#dbeafe;border-radius:9999px;display:flex;height:1.75rem;justify-content:center;width:1.75rem}.ManageRemainder-module_mrReminderInitials__bUFkd{color:#1e40af;font-size:.625rem;font-weight:500}.ManageRemainder-module_mrReminderName__zjceM{color:#1f2937;font-size:.75rem;font-weight:500}.ManageRemainder-module_mrReminderStatement__7Y0B-{border-radius:9999px;display:flex;padding:.5rem .75rem}.ManageRemainder-module_mrReminderStatementText__LodbK{font-size:.625rem;font-weight:500;letter-spacing:-.01em}.ManageRemainder-module_mrReminderDateFields__GT4N9{align-items:flex-start;display:flex;gap:1.5rem;width:100%}.ManageRemainder-module_mrReminderField__XBiO4{width:100%}.ManageRemainder-module_mrReminderFieldLabel__S9dXV{color:#3f3f46;font-size:.75rem;font-weight:500;margin-bottom:.25rem}.ManageRemainder-module_mrReminderDatePicker__Vgbui{align-items:center;box-shadow:0 1px 2px 0 #0000000d;color:#3f3f46;display:flex;font-size:.75rem;gap:.75rem;height:1.75rem;justify-content:space-between}.ManageRemainder-module_mrReminderDueDate__7nawQ{align-items:center;background-color:#f1f5f9;border:.5px solid #cbd5e1;border-radius:0;color:#64748b;display:flex;font-size:.75rem;height:1.75rem;padding:0 .75rem}.ManageRemainder-module_mrReminderFrequency__Qq1qa{align-items:center;display:flex;gap:.5rem}.ManageRemainder-module_mrReminderFrequencyText__lGfl0{color:#374151;font-size:.75rem}.ManageRemainder-module_mrEscalationCheckbox__xZrG3{align-items:flex-start;border:1px solid #e5e7eb;border-radius:.25rem;color:#3f3f46;display:flex;flex-direction:column;font-size:.75rem;font-weight:500;gap:.5rem;padding:.5rem;width:100%}.ManageRemainder-module_mrEscalationCheckboxHeader__1GgFB{align-items:flex-start;display:flex;gap:.5rem;justify-content:flex-start;width:100%}.ManageRemainder-module_mrEscalationContent__ItAyr{display:flex;flex-direction:column;gap:.5rem;overflow:hidden;width:100%}.ManageRemainder-module_mrEscalationCondition__4GCeD{color:#3f3f46;font-family:Inter,sans-serif;font-size:.75rem;font-weight:500;line-height:1;margin-top:.75rem;width:100%}.ManageRemainder-module_mrEscalationFields__oFHp-{align-items:flex-end;display:flex;flex-wrap:wrap;gap:1.5rem;gap:.625rem;width:100%}.ManageRemainder-module_mrEscalationFieldGroup__uES3-{display:flex;flex:1;gap:.75rem;min-width:130px}.ManageRemainder-module_mrEscalationFieldGroupLarge__MpVYP{flex:1;min-width:265px}.ManageRemainder-module_mrEscalationFieldGroupSmall__FFbRJ{display:flex;flex:1;min-width:88px}.ManageRemainder-module_mrEscalationFieldText__n7EfI{color:#3f3f46;font-family:Inter,sans-serif;font-size:.75rem;font-weight:500;line-height:1.5;min-width:152px}.ManageRemainder-module_mrDropdownButton__9wvGh{align-items:center;cursor:pointer;display:flex;justify-content:center}.ManageRemainder-module_mrCalendarPanel__PnMpt{flex-shrink:0;position:relative}.ManageRemainder-module_mrCalendarCollapsed__mb-bI{background-color:#fff;border:1px solid #b6c1ca;border-radius:10px;display:flex;height:100%;justify-content:center;padding-top:281px;width:43px}.ManageRemainder-module_mrCalendarToggle__9HIet{align-items:center;background:none;border:none;cursor:pointer;display:flex;height:3rem;justify-content:center;left:-26px;position:absolute;top:50%;transform:translateY(-50%);width:2.25rem;z-index:10}@media (max-width:1024px){.ManageRemainder-module_mrMainContent__2gAUU{flex-direction:column;gap:1rem}.ManageRemainder-module_mrCalendarPanel__PnMpt{width:100%}.ManageRemainder-module_mrCalendarToggle__9HIet{display:none}}@media (max-width:768px){.ManageRemainder-module_mrContainer__kVgxT{gap:.5rem;margin-top:.5rem}.ManageRemainder-module_mrSectionBox__bEDtY{gap:.5rem;padding:.5rem}.ManageRemainder-module_mrActionsSection__in30u,.ManageRemainder-module_mrSectionHeaderContent__eKJWh{flex-direction:column}.ManageRemainder-module_mrActionButton__x9IEC{height:2rem}.ManageRemainder-module_mrReminderDateFields__GT4N9{flex-direction:column;gap:1rem}.ManageRemainder-module_mrReminderContent__yKbGS,.ManageRemainder-module_mrReminderItem__kwd0b{gap:.5rem}.ManageRemainder-module_mrEscalationFields__oFHp-{flex-direction:column}.ManageRemainder-module_mrEscalationFieldGroupLarge__MpVYP,.ManageRemainder-module_mrEscalationFieldGroupSmall__FFbRJ,.ManageRemainder-module_mrEscalationFieldGroup__uES3-{min-width:100%;width:100%}.ManageRemainder-module_mrEscalationFieldText__n7EfI{min-width:auto}.ManageRemainder-module_mrReminderLabelBox__KRi5V{width:100%}}button:focus{outline:2px solid #4f46e5;outline-offset:2px}button:active{opacity:.9}.ManageRemainder-module_mrHiddenSection__c67oj{overflow:hidden}.ManageRemainder-module_mrNoPointerEvents__OQbav{pointer-events:none}.ManageRemainder-module_mrPointerEventsAuto__0avRT{pointer-events:auto}.ManageRemainder-module_calendarContainer__N804t{background-color:#fff;border:1px solid #b6c1ca;border-radius:8px;height:100%;min-width:345px;padding:16px}.ManageRemainder-module_calendarHeader__BjE9o{align-items:center;display:flex;gap:6px;margin-bottom:24px}.ManageRemainder-module_calendarHeaderTitle__U8NmV{align-items:center;color:#334155;display:flex;font-size:14px;font-weight:600;gap:6px;line-height:20px}.ManageRemainder-module_calendarHeaderInfo__s05VQ{height:16px;width:16px}.ManageRemainder-module_monthNav__FBbyi{align-items:center;display:flex;justify-content:space-between;margin-bottom:24px}.ManageRemainder-module_monthNavBtn__oor7V{align-items:center;background:none;border:1px solid #dce0e5;border-radius:8px;cursor:pointer;display:flex;justify-content:center;padding:8px}.ManageRemainder-module_monthNavTitle__zgDDq{color:#14181f;font-size:15px;font-weight:600;margin:0}.ManageRemainder-module_weekdayHeader__XciP8{display:grid;grid-template-columns:repeat(7,1fr);margin-bottom:8px}.ManageRemainder-module_weekdayLabel__dDWJo{color:#6f7c8e;font-size:15px;font-weight:400;text-align:center}.ManageRemainder-module_dayGrid__dT0og{display:grid;gap:8px 11px;grid-template-columns:repeat(7,1fr);margin-top:16px}.ManageRemainder-module_dayCell__AGx-w{align-items:center;border-radius:8px;cursor:pointer;display:flex;flex-direction:column;height:35px;justify-content:center}.ManageRemainder-module_dayCellPast__91hbu{background-color:#daf7d2}.ManageRemainder-module_dayCellToday__q8Wvi{border:2px solid #4f46e5}.ManageRemainder-module_dayNumber__6yOVW{font-size:14px}.ManageRemainder-module_dayNumberCurrent__6ML9j{color:#0f172a}.ManageRemainder-module_dayNumberOutside__JQ-t7{color:#94a3b8}.ManageRemainder-module_indicatorWrapper__5FOym{align-items:center;display:flex}.ManageRemainder-module_indicatorDot__ElweF{border-radius:50%;height:6px;width:6px}.ManageRemainder-module_indicatorDotOverlap__QPBRy{margin-left:-1px}.ManageRemainder-module_tooltipContent__ErzOu{background-color:#f8fafc;border-radius:8px;min-width:120px;padding:8px}.ManageRemainder-module_tooltipHeader__Q4qHO{border-bottom:1px solid #cbd5e1;margin-bottom:4px;padding-bottom:4px}.ManageRemainder-module_tooltipTitle__iZtI4{color:#0f172a;font-size:10px;font-weight:500;line-height:16px}.ManageRemainder-module_tooltipDate__ulMaQ{color:#334155;font-size:8px;font-weight:400;line-height:16px}.ManageRemainder-module_tooltipAssignees__jGc-Y{display:flex;flex-direction:column;gap:2px}.ManageRemainder-module_tooltipAssigneeRow__nzr3m{align-items:center;display:flex;gap:12px;justify-content:space-between}.ManageRemainder-module_tooltipAssigneeInfo__vIXTP{align-items:center;display:flex;gap:4px}.ManageRemainder-module_tooltipAssigneeDot__yz6E6{border-radius:50%;height:8px;width:8px}.ManageRemainder-module_tooltipAssigneeName__JJbid{color:#0f172a;font-size:9px;font-weight:400;line-height:16px}.ManageRemainder-module_tooltipAssigneeCount__49OVk{color:#0f172a;font-size:9px;font-weight:500;line-height:16px}.ManageRemainder-module_legendWrapper__OfxhE{align-items:flex-start;display:flex;flex-wrap:wrap;gap:6px;justify-content:center;margin-top:38px}.ManageRemainder-module_legendInner__iwIe7{align-items:flex-start;display:flex;gap:6px}.ManageRemainder-module_legendItem__zbxBG{align-items:center;border-radius:4px;cursor:pointer;display:flex;gap:4px;padding:4px 8px;width:100%}.ManageRemainder-module_legendItemAssignee1__I6F-D{background-color:#fdf2f8;border:1px solid #be185d}.ManageRemainder-module_legendItemAssignee2__YObVW{background-color:#eef2ff;border:1px solid #4338ca}.ManageRemainder-module_legendItemAssignee3__uCkBW{background-color:#fff7ed;border:1px solid #f87171;justify-content:center}.ManageRemainder-module_legendLabel__Va4Sw{font-size:12px;font-weight:500}.ManageRemainder-module_legendLabelAssignee1__vG-F4{color:#be185d}.ManageRemainder-module_legendLabelAssignee2__CbGVb{color:#4338ca}.ManageRemainder-module_legendLabelAssignee3__cz-57{color:#f87171}.ManageRemainder-module_checkboxIconUnchecked__xoI0S{background-color:#fff;border:1px solid #d0d5dd;border-radius:4px;height:16px;width:16px}.ManageRemainder-module_checkboxIconChecked__Y3mN2{align-items:center;background-color:#fff;border-radius:4px;display:flex;height:16px;justify-content:center;width:16px}.ManageRemainder-module_checkboxIconCheckedAssignee1__817aZ{border:1px solid #c11574}.ManageRemainder-module_checkboxIconCheckedAssignee2__hTAKp{border:1px solid #3538cd}.ManageRemainder-module_checkboxIconCheckedAssignee3__hQwwN{border:1px solid #ff6058}.ManageRemainder-module_checkboxCheckSvg__R87mg{height:10px;width:10px}.ManageRemainder-module_bottomLegend__rRzkt{align-items:center;display:inline-flex;gap:24px;margin-left:4px;margin-top:16px}.ManageRemainder-module_bottomLegendItem__u90vA{align-items:center;display:flex;gap:4px}.ManageRemainder-module_bottomLegendSwatch__9uu1M{border-radius:2px;height:12px;width:12px}.ManageRemainder-module_bottomLegendSwatchPast__-DcRZ{background-color:#daf7d2}.ManageRemainder-module_bottomLegendSwatchFailed__9lK2I{background-color:#fecaca}.ManageRemainder-module_bottomLegendLabel__9eDD-{color:#334155;font-size:12px;font-weight:500}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
2
+ //# sourceMappingURL=ManageRemainder.module.css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManageRemainder.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__assign as e}from"tslib";import{jsxs as i,jsx as n}from"react/jsx-runtime";import{useState as a,useEffect as r}from"react";import{Send as t,ChevronDown as o,CircleCheckBigIcon as c,Mail as l,InfoIcon as s,ArrowRight as d,CalendarIcon as m,ChevronRight as u,ChevronLeft as v}from"lucide-react";import h from"@mui/material/Checkbox";import{Chip as p,Box as f,Autocomplete as N,TextField as g}from"@mui/material";import{useDragControls as b,AnimatePresence as y,motion as x,Reorder as C}from"framer-motion";import k from"@mui/icons-material/DragIndicator";import{LocalizationProvider as F,DatePicker as R}from"@mui/x-date-pickers";import{AdapterDayjs as D}from"@mui/x-date-pickers/AdapterDayjs";import w from"./ReminderFrequencyAutocomplete.js";import S from"./AssigneeCalendarView.js";import E from"dayjs";import I from"./ManageRemainder.module.css.js";var _=["Assignee 1","Assignee 2","Assignee 3"],A=[{bg:"#FDF2FA",text:"#C11574"},{bg:"#EEF4FF",text:"#3538CD"},{bg:"#F1F5F9",text:"#344054"}],B=[{bg:"#FDF2FA",text:"#C93185"},{bg:"#EEF2FF",text:"#6366F1"},{bg:"#FFF4E5",text:"#FF6058"}],T=[{id:"1",name:"Assignee 1",color:"#C11574",bg:"#FDF2F8",startDate:new Date("2026-11-09"),dueDate:new Date("2026-12-01")},{id:"2",name:"Assignee 2",color:"#3538CD",bg:"#EEF4FF",startDate:new Date("2026-11-21"),dueDate:new Date("2026-12-03")},{id:"3",name:"Assignee 3",color:"#FF6058",bg:"#FFF7ED",startDate:new Date("2026-12-01"),dueDate:new Date("2026-12-03")}],L=[{bg:"#DBEAFE",text:"#1E40AF"},{bg:"#CCFBF1",text:"#0D9488"},{bg:"#DCFCE7",text:"#166534"}],P=[{initials:"OR",name:"Olivia Rhye",checked:!1,bg:"bg-blue-100",text:"text-blue-700"},{initials:"DM",name:"Daniela Mark",checked:!1,bg:"bg-cyan-100",text:"text-teal-700"},{initials:"JB",name:"Jenna Beckner",checked:!1,bg:"bg-emerald-100",text:"text-emerald-600"}],O=function(e){var i,n,a,r,t,o,c,l;return(null==e?void 0:e.is_escalation_reminder)&&(null===(i=null==e?void 0:e.days)||void 0===i?void 0:i.value)&&"undefined"!==(null===(n=null==e?void 0:e.days)||void 0===n?void 0:n.value)&&(null===(a=null==e?void 0:e.escalation_reminder_frequency)||void 0===a?void 0:a.value)&&"undefined"!==(null===(r=null==e?void 0:e.escalation_reminder_frequency)||void 0===r?void 0:r.value)?"Start notifying ".concat((null===(t=null==e?void 0:e.days)||void 0===t?void 0:t.value.includes("day"))?null===(o=null==e?void 0:e.days)||void 0===o?void 0:o.value:"".concat(null===(c=null==e?void 0:e.days)||void 0===c?void 0:c.value," ").concat(Number(null===(l=null==e?void 0:e.days)||void 0===l?void 0:l.value)>0?"days":"day")," ").concat(null==e?void 0:e.before_or_after," the due date"):"Notify until successful document upload"},M={"& .MuiInputBase-root":{height:"28px",borderRadius:"4px",fontSize:"11px"}},q=function(q){var Y=q.data,j=q.schedules,H=q.setSchedules,z=q.remainderOwners,W=q.setRemainderOwners,G=q.labels,U=void 0===G?_:G,V=q.colors,J=void 0===V?A:V,Z=q.chipColor,K=void 0===Z?B:Z,Q=q.assignees,X=void 0===Q?T:Q,$=q.fallbackRecipients,ee=void 0===$?P:$,ie=q.recipientsColor,ne=void 0===ie?L:ie,ae=q.manualReminderTitle,re=void 0===ae?"Send Manual Reminder Now":ae,te=q.manualReminderDescription,oe=void 0===te?"Immediately notify the assignees about this document.":te;q.lastReminderText;var ce=q.selectRecipientsLabel,le=void 0===ce?"Select recipients:":ce,se=q.previewEmailButtonLabel,de=void 0===se?"Preview Email":se,me=q.sendNowButtonLabel,ue=void 0===me?"Send Now":me,ve=q.reminderSuccessTitle,he=void 0===ve?"Reminder sent successfully!":ve,pe=q.reminderSuccessDescription,fe=void 0===pe?"Email notification sent to 2 assignees.":pe,Ne=q.escalationTitle,ge=void 0===Ne?"Escalation and Auto Reminder Setup":Ne;q.escalationTitleTooltip;var be=q.escalationDescription,ye=void 0===be?"Configure Auto reminder settings for all assignees.":be;q.configureAutoReminderText;var xe=q.getDynamicStatement,Ce=void 0===xe?O:xe,ke=q.reminderStartDateLabel,Fe=void 0===ke?"Reminder Start Date":ke,Re=q.documentDueDateLabel,De=void 0===Re?"Document Due Date":Re,we=q.reminderFrequencyLabel,Se=void 0===we?"Reminder Frequency":we,Ee=q.escalationRemindersLabel,Ie=void 0===Ee?"Escalation Reminders":Ee;q.escalationTooltip;var _e=q.escalationConditionText,Ae=void 0===_e?"If the document is still pending, start escalation reminders":_e,Be=q.daysText,Te=void 0===Be?"days":Be,Le=q.dueDataAndRepeatText,Pe=void 0===Le?"due date and repeat every":Le,Oe=q.reminderFrequencyOptions,Me=void 0===Oe?["12 hours","24 hours","48 hours","72 hours","Custom"]:Oe,qe=q.escalationFrequencyOptions,Ye=void 0===qe?["1/2 hour","1 hour","4 hours","6 hours","12 hours","Custom"]:qe,je=q.beforeAfterOptions,He=void 0===je?["After","Before"]:je,ze=q.handelSendNow,We=q.showPreviewEmail,Ge=void 0===We||We,Ue=a(!1),Ve=Ue[0],Je=Ue[1],Ze=a(!1),Ke=Ze[0],Qe=Ze[1],Xe=a(!1),$e=Xe[0],ei=Xe[1],ii=a(null);ii[0],ii[1];var ni=a(!0),ai=ni[0],ri=ni[1],ti=a(ee),oi=ti[0],ci=ti[1],li=b(),si=function(i,n,a){W(function(r){return r.map(function(r,t){var o;return t===i?e(e({},r),((o={})[n]=a,o)):r})})},di=function(e){var i;if(!e)return null;if("custom"===e.type)return Number(e.value)<=0?null:60*Number(e.value)*60*1e3;return null!==(i={"1/2 hour":18e5,"1 hour":36e5,"4 hours":144e5,"6 hours":216e5,"12 hours":432e5,"24 hours":864e5,"48 hours":1728e5,"72 hours":2592e5,"96 hours":3456e5,"1/2 day":432e5,"1 day":864e5,"2 days":1728e5,"3 days":2592e5,"4 days":3456e5}[e.value])&&void 0!==i?i:null},mi=function(e,i,n){if(!e||!i||!n)return[];var a=di(n);if(!a)return[];for(var r=[],t=E(e).valueOf(),o=E(i).valueOf();t<=o;)r.push(E(t).toISOString()),t+=a;return r},ui=function(e,i,n,a){if(!(e&&i&&a&&n))return[];var r=di(a);if(!r)return[];var t,o=E(e),c="custom"===i.type?Number(i.value):Number("1/2"===i.value.split(" ")[0]?.5:Number(i.value.split(" ")[0])),l=[];switch(n){case"Before":t=o.subtract(c,"day");break;case"After":t=o.add(c,"day");break;default:return[]}for(var s=t.valueOf(),d=0;d<1e3;d++)l.push(E(s).toISOString()),s+=r;return l},vi=function(e){return e?e.split(" ").map(function(e){return e[0]}).join("").toUpperCase():""};r(function(){var e=(null==Y?void 0:Y.due_at)||"",i=null==z?void 0:z.map(function(i){var n=X.find(function(e){return e.id===String(i.id)});return{ownerId:i.id,ownerName:null==n?void 0:n.name,ownerColor:null==n?void 0:n.color,reminders:mi(i.reminder_start_date,e,i.reminder_frequency),escalations:ui(e,i.days,i.before_or_after,i.escalation_reminder_frequency)}});H(i)},[z]),r(function(){if(null==Y?void 0:Y.assignee){var e=Object.values(Y.assignee).filter(function(e){return e&&Object.keys(e).length>0}).map(function(e,i){return{name:e.name,checked:!1,recipientsColor:ne[i]}}),i=e.length>0?e:ee;ci(i)}},[Y]);var hi=Object.values((null==Y?void 0:Y.assignee)||{}).filter(function(e){return null==e?void 0:e.name});return i("div",e({className:I.mrContainer},{children:[i("div",e({className:I.mrSectionBox,onClick:function(){return Je(function(e){return!e})}},{children:[i("div",e({className:I.mrSectionHeader},{children:[i("div",e({className:I.mrSectionHeaderContent},{children:[i("div",e({className:I.mrSectionHeaderLeft},{children:[i("div",e({className:I.mrSectionTitleWrapper},{children:[n("div",e({className:I.mrSectionTitleIcon},{children:n(t,{className:I.mrIconSmall})})),n("div",e({className:I.mrSectionTitle},{children:re}))]})),n("div",e({className:I.mrSectionDescription},{children:oe}))]})),n("div",e({className:I.mrSectionHeaderRight},{children:n("button",e({type:"button",onClick:function(e){e.stopPropagation(),Je(function(e){return!e})},className:I.mrChevronButton},{children:n(o,{className:"".concat(I.mrChevronIcon," ").concat(Ve?I.mrChevronRotated:"")})}))}))]})),n(y,{children:$e&&i(x.div,e({initial:{opacity:0,y:-10},animate:{opacity:1,y:0},exit:{opacity:0,y:-10},transition:{duration:.2},className:I.mrSuccessMessage},{children:[n("div",e({className:I.mrSuccessIcon},{children:n("div",e({className:I.mrSuccessIconInner},{children:n(c,{className:I.mrIconSuccess})}))})),i("div",e({className:I.mrSuccessText},{children:[n("div",e({className:I.mrSuccessTitle},{children:he})),n("div",e({className:I.mrSuccessDescription},{children:fe}))]}))]}))})]})),n(y,{children:Ve&&i(x.div,e({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},className:I.mrHiddenSection,style:{pointerEvents:Ve?"auto":"none"}},{children:[i("div",e({className:I.mrRecipientsSection},{children:[n("div",e({className:I.mrRecipientsLabel},{children:le})),n("div",e({className:I.mrRecipientsGrid},{children:oi.map(function(a){return i("div",e({className:I.mrRecipientItem},{children:[n(h,{checked:a.checked,onChange:function(){return i=a.name,void ci(function(n){return n.map(function(n){return n.name===i?e(e({},n),{checked:!n.checked}):n})});var i},onClick:function(e){return e.stopPropagation()},size:"small",disableRipple:!0,icon:n("div",{className:I.mrCheckboxUnchecked}),checkedIcon:n("div",e({className:I.mrCheckboxChecked},{children:n("svg",e({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",className:I.mrCheckboxIcon},{children:n("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),i("div",e({className:I.mrRecipientInfo},{children:[n("div",e({className:I.mrRecipientAvatar,style:{backgroundColor:a.recipientsColor.bg,color:a.recipientsColor.text}},{children:vi(a.name)})),n("div",e({className:I.mrRecipientName},{children:a.name}))]}))]}),a.name)})}))]})),i("div",e({className:I.mrActionsSection},{children:[Ge&&i("button",e({onClick:function(e){e.stopPropagation()},type:"button",className:"".concat(I.mrActionButton," ").concat(I.mrActionButtonSecondary)},{children:[n(l,{className:I.mrIconAction}),de]})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),ei(!0),setTimeout(function(){ei(!1)},3e3),ze()},className:"".concat(I.mrActionButton," ").concat(I.mrActionButtonPrimary)},{children:ue}))]}))]}))})]})),i("div",e({className:I.mrMainContent},{children:[i("div",e({className:I.mrEscalationContainer},{children:[i("div",e({className:I.mrEscalationHeaderWrapper,onClick:function(e){e.stopPropagation(),Qe(function(e){return!e})}},{children:[i("div",e({className:I.mrEscalationHeader},{children:[i("div",e({className:I.mrEscalationTitleWrapper},{children:[n("div",e({className:I.mrEscalationTitleText},{children:ge})),n("div",e({className:I.mrTooltipIcon},{children:n(s,{stroke:"#64748B",className:I.mrIconInfo})}))]})),i("div",e({className:I.mrEscalationActions},{children:[Ge&&i("button",e({className:I.mrEscalationPreviewButton},{children:[n("div",e({className:I.mrEscalationPreviewIcon},{children:n(l,{className:I.mrIconPreview})})),n("span",e({className:I.mrEscalationPreviewText},{children:de}))]})),n("button",e({type:"button",onClick:function(e){e.stopPropagation(),Qe(function(e){return!e})},className:I.mrChevronButton},{children:n(o,{className:"".concat(I.mrChevronIcon," ").concat(Ke?I.mrChevronRotated:"")})}))]}))]})),n("div",e({className:I.mrEscalationDescription},{children:ye}))]})),n(y,e({initial:!1},{children:Ke&&n(x.div,e({layout:!0,initial:{opacity:0,scaleY:.96},animate:{opacity:1,scaleY:1},exit:{opacity:0,scaleY:.96},transition:{duration:.3,ease:"easeInOut"},style:{transformOrigin:"top",overflow:"hidden"}},{children:n(C.Group,e({axis:"y",values:z||[],onReorder:function(e){W(e)},layoutScroll:!0,className:I.mrReorderGroup},{children:null==z?void 0:z.map(function(a,r){var t,c,l=hi[r]||ee[r];return n(C.Item,e({value:a,dragControls:li,layout:"position",className:""},{children:i("div",e({className:I.mrReminderItem},{children:[n("div",e({className:I.mrReminderLabelBox},{children:n("div",e({className:I.mrReminderLabelInner},{children:n(p,{label:U[r],sx:{backgroundColor:J[r].bg,minWidth:90,color:J[r].text,fontWeight:500}})}))})),i("div",e({className:I.mrReminderContent},{children:[n("div",e({className:I.mrDragHandle},{children:n(k,{onPointerDown:function(e){return li.start(e)},sx:{color:"#9e9e9e"}})})),n(f,e({display:"flex",alignItems:"center",gap:2,border:"1px solid #E5E7EB",sx:{background:"#fff"},className:I.mrReminderBox},{children:i("div",e({className:I.mrReminderFields},{children:[i("div",e({className:I.mrReminderHeader},{children:[i("div",e({className:I.mrReminderAssignee},{children:[n("div",e({className:I.mrReminderAvatar},{children:n("span",e({className:I.mrReminderInitials},{children:vi(null==l?void 0:l.name)}))})),n("span",e({className:I.mrReminderName},{children:null==l?void 0:l.name}))]})),n("div",e({className:I.mrReminderStatement,style:{backgroundColor:null===(t=K[r])||void 0===t?void 0:t.bg}},{children:n("span",e({className:I.mrReminderStatementText,style:{color:null===(c=K[r])||void 0===c?void 0:c.text}},{children:Ce(a)}))}))]})),i("div",e({className:I.mrReminderDateFields},{children:[i("div",e({className:I.mrReminderField},{children:[n("p",e({className:I.mrReminderFieldLabel},{children:Fe})),i("div",e({className:I.mrReminderDatePicker},{children:[n(F,e({dateAdapter:D},{children:n(R,{value:a.reminder_start_date?E(a.reminder_start_date):null,disablePast:!0,format:"MM/DD/YYYY",onChange:function(e){if(!e||!E(e).isBefore(E(),"day")){var i=e?E(e).toISOString():"";!function(e,i){si(e,"reminder_start_date",i)}(r,e?E(i).toISOString():"")}},slotProps:{actionBar:{actions:["clear"]},textField:{fullWidth:!0,size:"small",sx:M,placeholder:"MM/DD/YYYY"},openPickerButton:{id:"trial-start-date-picker-icon","data-testid":"trial-start-date-picker-icon",size:"small"},openPickerIcon:{sx:{fontSize:"14px"}}}})})),n(d,{className:I.mrIconArrow})]}))]})),i("div",e({className:I.mrReminderField},{children:[n("p",e({className:I.mrReminderFieldLabel},{children:De})),n("div",e({className:I.mrReminderDueDate},{children:(null==Y?void 0:Y.due_at)?E(Y.due_at).format("MM/DD/YYYY"):""}))]})),i("div",e({className:I.mrReminderField},{children:[n("p",e({className:I.mrReminderFieldLabel},{children:Se})),i("div",e({className:I.mrReminderFrequency},{children:[n("span",e({className:I.mrReminderFrequencyText},{children:"Every"})),n(w,{value:a.reminder_frequency,onChange:function(e){return function(e,i){si(e,"reminder_frequency",i)}(r,e)},options:Me,suffix:"hours"})]}))]}))]})),i("div",e({className:I.mrEscalationCheckbox},{children:[i("div",e({className:I.mrEscalationCheckboxHeader},{children:[n(h,{size:"small",disableRipple:!0,checked:a.is_escalation_reminder,onChange:function(e){!function(e,i){si(e,"is_escalation_reminder",i),i||(si(e,"days",{type:"preset",value:""}),si(e,"escalation_reminder_frequency",{type:"preset",value:""}),si(e,"before_or_after",""))}(r,e.target.checked)},icon:n("div",{className:I.mrCheckboxUnchecked}),checkedIcon:n("div",e({className:I.mrCheckboxChecked},{children:n("svg",e({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 12 10",fill:"none",className:I.mrCheckboxIcon},{children:n("path",{d:"M1 5L4.2 8L11 1",stroke:"#5925DC",strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})}))})),sx:{padding:0}}),Ie,n("div",e({className:I.mrTooltipIcon},{children:n(s,{stroke:"#64748B",className:I.mrIconInfo})}))]})),n(y,{children:a.is_escalation_reminder&&i(x.div,e({initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},transition:{duration:.3},className:I.mrEscalationContent},{children:[n("div",e({className:I.mrEscalationCondition},{children:Ae})),i("div",e({className:I.mrEscalationFields},{children:[i("div",e({className:I.mrEscalationFieldGroup},{children:[n(w,{value:a.days,onChange:function(e){return function(e,i){si(e,"days",i)}(r,e)}}),n("div",e({className:I.mrEscalationFieldText},{children:Te}))]})),i("div",e({className:"".concat(I.mrEscalationFieldGroup," ").concat(I.mrEscalationFieldGroupLarge)},{children:[n(N,{size:"small",options:He,value:a.before_or_after,onChange:function(e,i){!function(e,i){si(e,"before_or_after",i)}(r,i||"")},popupIcon:n("button",e({type:"button",id:"dropdown-icon",className:I.mrDropdownButton},{children:n(o,{className:I.mrIconDropdown})})),slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"12px",minHeight:"32px"}}},clearIndicator:{sx:{"& svg":{fontSize:12}}}},renderInput:function(i){return n(g,e({},i,{placeholder:"Select value",sx:M}))},sx:{width:"100%"}}),n("div",e({className:I.mrEscalationFieldText},{children:Pe}))]})),n("div",e({className:I.mrEscalationFieldGroupSmall},{children:n(w,{value:a.escalation_reminder_frequency,onChange:function(e){return function(e,i){si(e,"escalation_reminder_frequency",i)}(r,e)},options:Ye,suffix:"hours"})}))]}))]}))})]}))]}))}))]}))]}))}),a.id||r)})}))}))}))]})),Ke&&i(x.div,e({initial:{width:ai?"345px":"43px"},animate:{width:ai?"345px":"43px"},transition:{duration:.3},className:I.mrCalendarPanel},{children:[ai?n(S,{assignees:j}):n("div",e({className:I.mrCalendarCollapsed},{children:n(m,{className:I.mrIconCalendar})})),i("button",e({onClick:function(){return ri(function(e){return!e})},className:I.mrCalendarToggle},{children:[n("svg",e({xmlns:"http://www.w3.org/2000/svg",width:"19",height:"50",viewBox:"0 0 19 50",fill:"none"},{children:n("path",{d:"M3.94434 9.65137C1.79601 11.031 0.49707 13.4087 0.49707 15.9619V35.1436C0.49707 37.8496 1.95476 40.346 4.31152 41.6758L17.5469 49.1426V0.915039L3.94434 9.65137Z",fill:"white",stroke:"#E0E0E0"})})),n(ai?u:v,{className:I.mrIconChevronToggle})]}))]}))]}))]}))};export{q as ManageReminders};
2
+ //# sourceMappingURL=ManageReminders.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ManageReminders.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ import{__assign as e}from"tslib";import{jsx as t,jsxs as o,Fragment as n}from"react/jsx-runtime";import{useState as r,useEffect as i}from"react";import{Autocomplete as u,TextField as p,InputAdornment as l}from"@mui/material";import{ChevronsUpDownIcon as a}from"lucide-react";var s=["1/2","1","2","3","4","Custom"];function c(c){var d=c.value,m=c.onChange,f=c.options,v=void 0===f?s:f,h=c.placeholder,x=void 0===h?"Select frequency":h,y=c.suffix,I=r(""),g=I[0],P=I[1],w=r(null),S=w[0],z=w[1],C=r(!1),b=C[0],A=C[1];return i(function(){return d?"custom"===d.type?(A(!0),z(null),void P(d.value||"")):(A(!1),z(d.value),void P(d.value)):(z(null),P(""),void A(!1))},[d]),t(u,{size:"small",freeSolo:b,options:v,value:S,inputValue:g,popupIcon:t("button",e({type:"button",id:"dropdown-icon",className:"cursor-pointer flex items-center justify-center"},{children:t(a,{className:"w-3 h-3"})})),onChange:function(e,t){return t?"Custom"===t?(A(!0),z(null),P(""),void m({type:"custom",value:""})):(A(!1),z(t),P(t),void m({type:"preset",value:t})):(z(null),P(""),A(!1),void m(null))},slotProps:{paper:{sx:{"& .MuiAutocomplete-option":{fontSize:"12px",minHeight:"32px"}}},clearIndicator:{sx:{"& svg":{fontSize:12}}}},onInputChange:function(e,t,o){if(b){var n=t.replace(/[^\d]/g,"");P(n),"input"===o&&m({type:"custom",value:n})}},renderInput:function(r){return t(p,e({},r,{placeholder:b?"Enter custom value":x,inputProps:e(e({},r.inputProps),{inputMode:b?"numeric":void 0,readOnly:!b}),InputProps:e(e({},r.InputProps),{endAdornment:b&&y?o(n,{children:[t(l,e({position:"end"},{children:t("span",e({style:{fontSize:"11px",color:"#888",whiteSpace:"nowrap"}},{children:y}))})),r.InputProps.endAdornment]}):r.InputProps.endAdornment}),sx:{"& .MuiInputBase-root":{height:"28px",borderRadius:"4px",fontSize:"11px",width:"100%",cursor:b?"text":"pointer"},"& input":{cursor:b?"text":"pointer"}},onKeyDown:function(e){b&&"Enter"===e.key&&(e.preventDefault(),e.stopPropagation())}}))},sx:{width:"100%"}})}export{c as default};
2
+ //# sourceMappingURL=ReminderFrequencyAutocomplete.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReminderFrequencyAutocomplete.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as c,jsx as i,Fragment as n}from"react/jsx-runtime";import t,{useMemo as a}from"react";import r from"../Popups/PopupDefaults.js";import o from"react-markdown";import l from"rehype-raw";import d from"./CitationComponent.module.css.js";import{ChevronUp as s}from"lucide-react";import{ReactComponent as m}from"../icons/cognitiveBrain.svg.js";import{ReactComponent as v}from"../icons/aiMagic.svg.js";import _ from"./CitationAnchor.js";var h=function(c){var n=c.text,t=c.item;return i(o,e({rehypePlugins:[l],components:{ol:function(c){var n=c.children;return i("ol",e({className:d["md-ol"]},{children:n}))},ul:function(c){var n=c.children;return i("ul",e({className:d["md-ul"]},{children:n}))},li:function(c){var n=c.children;return i("li",e({className:d["md-li"]},{children:n}))},a:function(e){e.node;var c=e.href,n=e.children;return i(_,{href:c,children:n,metaData:{citations:t.citations,docData:t.docData}})}}},{children:n.replace(/<br\s*\/?>/gi,"\n")}))};function p(o){var l=o.item,_=o.title,p=void 0===_?"Cognitive Decisioning AI":_,u=o.relevanceScore,N=void 0===u?0:u,f=o.showRelevanceScore,y=void 0===f||f,b=o.reason,x=void 0===b?"No reasoning provided.":b,g=o.impact,C=void 0===g?"No Impact provided.":g,k=o.explaination,H=void 0===k?"No explaination provided.":k,B=o.gap,j=void 0===B?"None":B,D=o.onClose,T=void 0===D?function(){}:D,A=o.onAccept,I=o.onReject,L=o.showResolveBtns,R=void 0!==L&&L,w=o.sections,P=o.leftIcon,M=o.scoreIcon,E=o.className,G=o.customStyles,S=void 0===G?{}:G,F=o.onBackClick,q=o.isImpactNeeded,z=void 0===q||q,J=o.cognitiveTitle,K=void 0===J?"Cognitive Integrity":J,O=o.labels,Q=void 0===O?{}:O,U=a(function(){var e=Number(N);return Number.isNaN(e)?0:Math.max(0,Math.min(100,Math.round(e)))},[N]),V=a(function(){var e=Q&&Q.noGapsText||"1. No gaps identified.";return function(e){if(!e)return!0;var c=e.trim().toLowerCase();return"none"===c||"no gap"===c||"no gaps"===c||"n/a"===c}(j)?e:j},[j]),W=Q&&Q.impact||"Impact",X=Q&&Q.explanation||"Explaination",Y=Q&&Q.decisionFactors||"Decision Making Factors",Z=Q&&Q.gaps||"Gaps in Decision",$=Q&&Q.accept||"Accept",ee=Q&&Q.reject||"Reject",ce=Q&&Q.backAriaLabel||"Go back";return c("div",e({className:"".concat(d["cite-acc"]," ").concat(E||""),style:e(e({},r.CitationAccordionDefaults.container),null==S?void 0:S.container)},{children:[F&&c("div",e({className:d["cite-acc__backHeader"]},{children:[i("button",e({type:"button",className:d["cite-acc__backBtn"],onClick:function(e){e.stopPropagation(),F&&F()},"aria-label":ce},{children:"‹"})),i("span",e({className:d["cite-acc__backTitle"]},{children:K}))]})),w&&w.length>0?w.map(function(n){return!1===n.show?null:c("div",e({className:"".concat(d["cite-acc__explain-body"]," ").concat(n.bodyClassName||"")},{children:[c("div",e({className:d["cite-acc__innerHeader"],style:e(e({},r.CitationAccordionDefaults.innerHeader),null==S?void 0:S.innerHeader)},{children:[i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:n.title}))})})),i("button",e({type:"button",onClick:function(e){e.stopPropagation(),T&&T()}},{children:i(s,{})}))]})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600"),style:e(e({},r.CitationAccordionDefaults.innerBody),null==S?void 0:S.innerBody)},{children:"string"==typeof n.content?i(h,{text:n.content,item:n.item||l||{}}):n.content}))]}),n.id||n.title)}):c(n,{children:[z&&c("div",e({className:d["cite-acc__explain-body"]},{children:[c("div",e({className:d["cite-acc__innerHeader"]},{children:[i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:W}))})})),i("button",e({type:"button",onClick:function(e){e.stopPropagation(),T&&T()}},{children:i(s,{})}))]})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(h,{text:C||"",item:l||{}})}))]})),c("div",e({className:d["cite-acc__explain-body"]},{children:[i("div",e({className:d["cite-acc__innerHeader"]},{children:i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:X}))})}))})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(h,{text:H||"",item:{}})}))]})),R&&c("div",e({className:d["cite-acc__btn-container"]},{children:[i("button",e({className:d["btn-reject"],onClick:I},{children:ee})),i("button",e({className:d["btn-accept"],onClick:A},{children:$}))]})),c("div",e({className:d["cite-acc__header"]},{children:[c("div",e({className:d["cite-acc__headerLeft"]},{children:[i("span",e({className:d["cite-acc__titleIcon"]},{children:P?"function"==typeof P?t.createElement(P):P:i(m,{})})),i("div",e({className:d["cite-acc__title"]},{children:p}))]})),i("div",e({className:d["cite-acc__headerRight"]},{children:y&&c("span",e({className:d["cite-acc__scoreBadge"]},{children:[M?"function"==typeof M?t.createElement(M):M:i(v,{}),c("span",e({className:d["cite-acc__scoreText"]},{children:[U,"%"]}))]}))}))]})),c("div",e({className:d["cite-acc__explain-body"]},{children:[i("div",e({className:d["cite-acc__innerHeader"]},{children:i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:Y}))})}))})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(h,{text:x||"",item:l||{}})}))]})),c("div",e({className:"".concat(d["cite-acc__explain-body"]," ").concat(d["cite-acc__explain-body_border"])},{children:[i("div",e({className:d["cite-acc__innerHeader"]},{children:i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:Z}))})}))})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(h,{text:V||"",item:l||{}})}))]}))]})]}))}export{p as default};
1
+ import{__assign as e}from"tslib";import{jsxs as c,jsx as i,Fragment as a}from"react/jsx-runtime";import n,{useMemo as t}from"react";import r from"../Popups/PopupDefaults.js";import o from"react-markdown";import l from"rehype-raw";import d from"./CitationComponent.module.css.js";import{ChevronUp as s}from"lucide-react";import{ReactComponent as m}from"../icons/cognitiveBrain.svg.js";import{ReactComponent as v}from"../icons/aiMagic.svg.js";import _ from"./CitationAnchor.js";var p=function(c){var a=c.text,n=c.item;return i(o,e({rehypePlugins:[l],components:{ol:function(c){var a=c.children;return i("ol",e({className:d["md-ol"]},{children:a}))},ul:function(c){var a=c.children;return i("ul",e({className:d["md-ul"]},{children:a}))},li:function(c){var a=c.children;return i("li",e({className:d["md-li"]},{children:a}))},a:function(e){e.node;var c=e.href,a=e.children;return i(_,{href:c,children:a,metaData:{citations:n.citations,docData:n.docData}})}}},{children:a.replace(/<br\s*\/?>/gi,"\n")}))};function h(o){var l=o.item,_=o.title,h=void 0===_?"Cognitive Decisioning AI":_,u=o.relevanceScore,N=void 0===u?0:u,f=o.showRelevanceScore,b=void 0===f||f,y=o.reason,x=void 0===y?"No reasoning provided.":y,g=o.impact,C=void 0===g?"No Impact provided.":g,k=o.explaination,B=void 0===k?"No explaination provided.":k,H=o.gap,j=void 0===H?"None":H,D=o.onClose,A=void 0===D?function(){}:D,T=o.onAccept,I=o.onReject,L=o.showResolveBtns,w=void 0!==L&&L,R=o.sections,P=o.leftIcon,M=o.scoreIcon,S=o.className,E=o.customStyles,G=void 0===E?{}:E,F=o.actions,q=o.disableAllActions,z=void 0!==q&&q,J=o.actionBtnDisabledStyle,K=void 0===J?{}:J,O=o.onBackClick,Q=o.isImpactNeeded,U=void 0===Q||Q,V=o.cognitiveTitle,W=void 0===V?"Cognitive Integrity":V,X=o.labels,Y=void 0===X?{}:X,Z=t(function(){var e=Number(N);return Number.isNaN(e)?0:Math.max(0,Math.min(100,Math.round(e)))},[N]),$=t(function(){var e=Y&&Y.noGapsText||"1. No gaps identified.";return function(e){if(!e)return!0;var c=e.trim().toLowerCase();return"none"===c||"no gap"===c||"no gaps"===c||"n/a"===c}(j)?e:j},[j]),ee=Y&&Y.impact||"Impact",ce=Y&&Y.explanation||"Explaination",ie=Y&&Y.decisionFactors||"Decision Making Factors",ae=Y&&Y.gaps||"Gaps in Decision",ne=Y&&Y.accept||"Accept",te=Y&&Y.reject||"Reject",re=Y&&Y.backAriaLabel||"Go back",oe=F||[{id:"reject",label:te,onClick:I,className:d["btn-reject"]},{id:"accept",label:ne,onClick:T,className:d["btn-accept"]}];return c("div",e({className:"".concat(d["cite-acc"]," ").concat(S||""),style:e(e({},r.CitationAccordionDefaults.container),null==G?void 0:G.container)},{children:[O&&c("div",e({className:d["cite-acc__backHeader"]},{children:[i("button",e({type:"button",className:d["cite-acc__backBtn"],onClick:function(e){e.stopPropagation(),O&&O()},"aria-label":re},{children:"‹"})),i("span",e({className:d["cite-acc__backTitle"]},{children:W}))]})),R&&R.length>0?R.map(function(a){return!1===a.show?null:c("div",e({className:"".concat(d["cite-acc__explain-body"]," ").concat(a.bodyClassName||"")},{children:[c("div",e({className:d["cite-acc__innerHeader"],style:e(e({},r.CitationAccordionDefaults.innerHeader),null==G?void 0:G.innerHeader)},{children:[i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:a.title}))})})),i("button",e({type:"button",onClick:function(e){e.stopPropagation(),A&&A()}},{children:i(s,{})}))]})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600"),style:e(e({},r.CitationAccordionDefaults.innerBody),null==G?void 0:G.innerBody)},{children:"string"==typeof a.content?i(p,{text:a.content,item:a.item||l||{}}):a.content}))]}),a.id||a.title)}):c(a,{children:[U&&c("div",e({className:d["cite-acc__explain-body"]},{children:[c("div",e({className:d["cite-acc__innerHeader"]},{children:[i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:ee}))})})),i("button",e({type:"button",onClick:function(e){e.stopPropagation(),A&&A()}},{children:i(s,{})}))]})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(p,{text:C||"",item:l||{}})}))]})),c("div",e({className:d["cite-acc__explain-body"]},{children:[i("div",e({className:d["cite-acc__innerHeader"]},{children:i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:ce}))})}))})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(p,{text:B||"",item:{}})}))]})),w&&i("div",e({className:d["cite-acc__btn-container"]},{children:oe.map(function(c){var a=z||c.disabled;return i("button",e({className:c.className,onClick:a?void 0:c.onClick,disabled:a,style:e(e({},c.style),a?e(e({opacity:.5,cursor:"not-allowed"},K),c.disabledStyle):{})},{children:c.label}),c.id)})})),c("div",e({className:d["cite-acc__header"]},{children:[c("div",e({className:d["cite-acc__headerLeft"]},{children:[i("span",e({className:d["cite-acc__titleIcon"]},{children:P?"function"==typeof P?n.createElement(P):P:i(m,{})})),i("div",e({className:d["cite-acc__title"]},{children:h}))]})),i("div",e({className:d["cite-acc__headerRight"]},{children:b&&c("span",e({className:d["cite-acc__scoreBadge"]},{children:[M?"function"==typeof M?n.createElement(M):M:i(v,{}),c("span",e({className:d["cite-acc__scoreText"]},{children:[Z,"%"]}))]}))}))]})),c("div",e({className:d["cite-acc__explain-body"]},{children:[i("div",e({className:d["cite-acc__innerHeader"]},{children:i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:ie}))})}))})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(p,{text:x||"",item:l||{}})}))]})),c("div",e({className:"".concat(d["cite-acc__explain-body"]," ").concat(d["cite-acc__explain-body_border"])},{children:[i("div",e({className:d["cite-acc__innerHeader"]},{children:i("div",e({className:d["cite-acc__innerHeaderLeft"]},{children:i("div",{children:i("div",e({className:d["cite-acc__innerTitle"]},{children:ae}))})}))})),i("div",e({className:"".concat(d["cite-acc__innerBody"]," text-sm text-gray-600")},{children:i(p,{text:$||"",item:l||{}})}))]}))]})]}))}export{h as default};
2
2
  //# sourceMappingURL=CognitiveComponent.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsxs as i,jsx as o,Fragment as n}from"react/jsx-runtime";import{Info as t,ChevronDown as l,PenLine as r,CheckCircle as d,XCircle as a,ChevronRight as s}from"lucide-react";import{useState as c}from"react";import{ToneToggle as v}from"./ToneToggle.js";import"../CognitiveComponents/CitationComponent.module.css.js";import{ReactComponent as p}from"../icons/cognitiveBrain.svg.js";import{ReactComponent as u}from"../icons/aiMagic.svg.js";var g=[{color:"#1D9E75",angle:-90,arcD:"M1 13 A10 10 0 0 1 1 13"},{color:"#BA7517",angle:0,arcD:"M1 13 A10 10 0 0 1 11 3"},{color:"#E24B4A",angle:90,arcD:"M1 13 A10 10 0 0 1 21 13"}],m=function(n){var t=n.toneIndex,l=n.configs,r=void 0===l?g:l,d=r[Math.min(t,r.length-1)]||r[1]||r[0],a=d.color,s=d.angle,c=d.arcD,v=(s-90)*Math.PI/180,p=11+9*Math.cos(v),u=13+9*Math.sin(v);return i("svg",e({width:"22",height:"14",viewBox:"0 0 22 14",fill:"none"},{children:[o("path",{d:"M1 13 A10 10 0 0 1 21 13",stroke:"#e5e5e5",strokeWidth:"2.5",strokeLinecap:"round"}),o("path",{d:c,stroke:a,strokeWidth:"2.5",strokeLinecap:"round"}),o("line",{x1:"11",y1:"13",x2:p,y2:u,stroke:a,strokeWidth:"2",strokeLinecap:"round"})]}))},y=function(i){var n=i.type,t=i.customStyles,l=void 0===t?{}:t,r=e(e({},{High:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #FECACA",background:"#FEF2F2",color:"#B91C1C",fontSize:"11px",fontWeight:"500"},Medium:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #F2E5A1",background:"#FFFBEB",color:"#B45309",fontSize:"11px",fontWeight:"500"},Low:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #8098F9",background:"#DBEAFE",color:"#444CE7",fontSize:"11px",fontWeight:"500"}}),l),d=r[n]||r.Medium;return o("div",e({style:d},{children:n}))},f=["Lenient","Balanced","Aggressive"],h={Lenient:"#1D9E75",Balanced:"#BA7517",Aggressive:"#E24B4A"},x={width:"350px",background:"#fff",border:"1px solid #ddd",borderRadius:"8px",padding:"16px",maxHeight:"400px",overflow:"auto"},S={display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},b={fontSize:11,fontWeight:500,letterSpacing:"0.08em",color:"#E24B4A",textTransform:"uppercase"},C={fontSize:15,fontWeight:500,margin:"0 0 8px",color:"#111"},B={fontSize:13,color:"#666",lineHeight:1.6,margin:"0 0 14px"},I={marginBottom:14,borderTop:"0.5px solid #eee",paddingTop:12},k={display:"flex",alignItems:"center",gap:6,background:"none",border:"none",cursor:"pointer",padding:0,width:"100%"},A={fontSize:11,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.08em",color:"#E24B4A"},D={display:"flex",gap:8,marginBottom:18},T={flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:5,fontSize:12,fontWeight:500,padding:"7px 4px",borderRadius:8,border:"0.5px solid #ccc",background:"#fff",cursor:"pointer"},w={background:"none",border:"none",cursor:"pointer",fontSize:16,color:"#888",lineHeight:1,padding:0},z={borderTop:"0.5px solid #eee",paddingTop:14},R={display:"flex",alignItems:"center",width:"100%",background:"none",border:"none",cursor:"pointer",padding:0,marginBottom:4},W={cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"12px",borderTop:"1px solid #eee",borderBottom:"none",paddingLeft:"12px",paddingRight:"12px"},E={display:"flex",alignItems:"center",gap:"4px",minWidth:0,flex:"1 1 auto",overflow:"hidden"},j={width:"28px",height:"28px",display:"inline-flex",alignItems:"center",justifyContent:"center",flex:"0 0 28px"},L={fontSize:"13px",color:"#101828",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},M={display:"flex",alignItems:"center",gap:"10px",flex:"0 0 auto",minWidth:0,flexWrap:"nowrap"},F={display:"flex",padding:"4px 8px",alignItems:"center",gap:"4px",borderRadius:"var(--chip-border-radius, 16px)",border:"1px solid var(--Primitive-Gray-300, #d0d5dd)",flex:"0 1 auto",minWidth:0},H={color:"var(--Primitive-Purple-600, #6938ef)",fontFamily:"Inter",fontSize:"12px",fontStyle:"normal",fontWeight:500,lineHeight:"150%"};function N(N){var _,P,O,G,q,J,K,Q,U,V,X,Y,Z,$,ee,ie,oe,ne,te,le=N.onClose,re=N.aiReason,de=N.onAccept,ae=N.onReject,se=N.onIterate,ce=N.initialTone,ve=N.onRegenerate,pe=N.labels,ue=void 0===pe?{}:pe,ge=N.toneLevelsConfig,me=void 0===ge?f:ge,ye=N.toneColorsConfig,fe=void 0===ye?h:ye,he=N.dialConfigs,xe=void 0===he?g:he,Se=N.customStyles,be=void 0===Se?{}:Se,Ce=N.severityChipStyles,Be=void 0===Ce?{}:Ce,Ie=N.customIcons,ke=void 0===Ie?{}:Ie,Ae=N.onOpenCognitive,De=N.showTone,Te=void 0===De||De,we=N.cognitiveSectionStyle,ze=void 0===we?{}:we,Re=N.cognitiveScoreBadgeStyle,We=void 0===Re?{}:Re,Ee=N.cognitiveScoreTextStyle,je=void 0===Ee?{}:Ee,Le=N.cognitiveStyles,Me=void 0===Le?{}:Le,Fe=N.cognitiveClassNames,He=void 0===Fe?{}:Fe,Ne=N.cognitiveTitle,_e=void 0===Ne?"Cognitive Integrity":Ne,Pe=N.cognitiveLeftIcon,Oe=N.showCognitiveRightArrow,Ge=void 0===Oe||Oe,qe=me.findIndex(function(e){return e===ce});-1===qe&&(qe=1);var Je=c(!0),Ke=Je[0],Qe=Je[1],Ue=c(!1),Ve=Ue[0],Xe=Ue[1],Ye=c(qe),Ze=Ye[0],$e=Ye[1],ei=c(qe)[0],ii=me[Ze],oi=fe[ii]||"#BA7517",ni=Ze!==ei;return i("div",e({onClick:function(e){return e.stopPropagation()},style:e(e({},x),null===(_=null==be?void 0:be.DeviationSummaryStyles)||void 0===_?void 0:_.root)},{children:[i("div",e({style:e(e({},S),null===(P=null==be?void 0:be.DeviationSummaryStyles)||void 0===P?void 0:P.header)},{children:[i("div",e({style:{display:"flex",alignItems:"center",gap:6}},{children:[o("span",{children:ke.summaryIcon||o(t,{size:16,color:"#E24B4A"})}),o("span",e({style:e(e({},b),null===(O=null==be?void 0:be.DeviationSummaryStyles)||void 0===O?void 0:O.title)},{children:ue.summaryHeader||"Summary"}))]})),o("button",e({onClick:le,style:e(e({},w),null===(G=null==be?void 0:be.DeviationSummaryStyles)||void 0===G?void 0:G.closeBtn)},{children:"✕"}))]})),o("p",e({style:e(e({},C),null===(q=null==be?void 0:be.DeviationSummaryStyles)||void 0===q?void 0:q.bodyText)},{children:null===(J=null==re?void 0:re.deviation_details)||void 0===J?void 0:J.deviation_title})),o("p",e({style:e(e({},B),null===(K=null==be?void 0:be.DeviationSummaryStyles)||void 0===K?void 0:K.summary)},{children:null===(Q=null==re?void 0:re.deviation_details)||void 0===Q?void 0:Q.deviation_summary})),i("div",e({style:e(e({},I),null===(U=null==be?void 0:be.DeviationSummaryStyles)||void 0===U?void 0:U.impactContainer)},{children:[i("div",e({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[i("button",e({onClick:function(){return Qe(!Ke)},style:e(e({},k),null===(V=null==be?void 0:be.DeviationSummaryStyles)||void 0===V?void 0:V.impactToggle)},{children:[o("span",e({style:e(e({},A),null===(X=null==be?void 0:be.DeviationSummaryStyles)||void 0===X?void 0:X.impactToggleLabel)},{children:ue.impactHeader||"Impact"})),o("span",e({style:{fontSize:12,color:"#E24B4A",transition:"transform 0.2s",display:"flex",alignItems:"center",transform:Ke?"rotate(180deg)":"rotate(0deg)"}},{children:o(l,{size:16,color:"#E24B4A"})}))]})),o(y,{type:(null==re?void 0:re.severity)||"Medium",customStyles:Be})]})),Ke&&o("p",e({style:{fontSize:13,color:"#666",lineHeight:1.6,margin:"8px 0 0"}},{children:null!==(Z=null===(Y=null==re?void 0:re.deviation_details)||void 0===Y?void 0:Y.deviation_impact)&&void 0!==Z?Z:ue.fallbackImpact||"This change reduces compliance obligations and lowers contractual risk thresholds."}))]})),i("div",e({style:e(e({},D),null===($=null==be?void 0:be.DeviationSummaryStyles)||void 0===$?void 0:$.actionContainer)},{children:[i("button",e({style:e(e(e({},T),null===(ee=null==be?void 0:be.DeviationSummaryStyles)||void 0===ee?void 0:ee.actionBtn),{color:"#64748B"}),onClick:se},{children:[ke.iterateIcon||o(r,{size:16,color:"#64748B"}),ue.btnIterate||"Iterate"]}),"Iterate"),i("button",e({style:e(e(e({},T),null===(ie=null==be?void 0:be.DeviationSummaryStyles)||void 0===ie?void 0:ie.actionBtn),{color:"#10B981"}),onClick:de},{children:[ke.acceptIcon||o(d,{size:16,color:"#10B981"}),ue.btnAccept||"Approve"]}),"Accept"),i("button",e({style:e(e(e({},T),null===(oe=null==be?void 0:be.DeviationSummaryStyles)||void 0===oe?void 0:oe.actionBtn),{color:"#DC2626"}),onClick:ae},{children:[ke.rejectIcon||o(a,{size:16,color:"#DC2626"}),ue.btnReject||"Reject"]}),"reject")]})),Te&&i("div",e({style:e(e({},z),null===(ne=null==be?void 0:be.DeviationSummaryStyles)||void 0===ne?void 0:ne.toneContainer)},{children:[i("button",e({onClick:function(){return Xe(!Ve)},style:e(e({},R),null===(te=null==be?void 0:be.DeviationSummaryStyles)||void 0===te?void 0:te.toneToggleBtn)},{children:[i("div",e({style:{display:"flex",alignItems:"center",gap:8}},{children:[o(m,{toneIndex:Ze,configs:xe}),o("span",e({style:{fontSize:13,fontWeight:500,color:"#111"}},{children:ue.toneHeader||"Redline Tone"}))]})),o("span",e({style:{transition:"transform 0.2s",display:"flex",alignItems:"center",transform:Ve?"rotate(180deg)":"rotate(0deg)"}},{children:o(l,{size:16,color:"#111"})}))]})),Ve&&i(n,{children:[o("p",e({style:{fontSize:12,color:"#888",margin:"0 0 12px"}},{children:ue.toneDescription||"Controls how assertively AI is redlining"})),o(v,{isDirty:ni,onToneChange:function(e){$e(e)},toneColor:oi,toneIndex:Ze,onClickRegenerate:function(){return null==ve?void 0:ve(ii)},toneLabels:me})]})]})),Ae&&i("div",e({className:null==He?void 0:He.section,onClick:function(e){e.stopPropagation(),Ae&&Ae(e)},style:e(e(e({},W),null==Me?void 0:Me.section),ze)},{children:[i("div",e({className:null==He?void 0:He.headerLeft,style:e(e({},E),null==Me?void 0:Me.headerLeft)},{children:[o("span",e({className:null==He?void 0:He.titleIcon,style:e(e({},j),null==Me?void 0:Me.titleIcon)},{children:null!=Pe?Pe:o(p,{})})),o("div",e({className:null==He?void 0:He.cognitiveTitle,style:e(e({},L),null==Me?void 0:Me.cognitiveTitle)},{children:_e}))]})),i("div",e({className:null==He?void 0:He.headerRight,style:e(e({},M),null==Me?void 0:Me.headerRight)},{children:[void 0!==(null==re?void 0:re.relevance_score)&&null!==(null==re?void 0:re.relevance_score)?i("span",e({className:null==He?void 0:He.scoreBadge,style:e(e(e({},F),null==Me?void 0:Me.scoreBadge),We)},{children:[o(u,{}),i("span",e({className:null==He?void 0:He.scoreText,style:e(e(e({},H),null==Me?void 0:Me.scoreText),je)},{children:[Math.round(Number(re.relevance_score)),"%"]}))]})):null,Ge&&o("span",e({style:{display:"flex",alignItems:"center"}},{children:o(s,{size:16,color:"#64748B"})}))]}))]}))]}))}export{N as default};
1
+ import{__assign as e}from"tslib";import{jsx as i,jsxs as o,Fragment as n}from"react/jsx-runtime";import{PenLine as t,CheckCircle as l,XCircle as r,Info as d,ChevronDown as a,ChevronRight as s}from"lucide-react";import{useState as c}from"react";import{ToneToggle as p}from"./ToneToggle.js";import"../CognitiveComponents/CitationComponent.module.css.js";import{ReactComponent as v}from"../icons/cognitiveBrain.svg.js";import{ReactComponent as u}from"../icons/aiMagic.svg.js";var g=[{color:"#1D9E75",angle:-90,arcD:"M1 13 A10 10 0 0 1 1 13"},{color:"#BA7517",angle:0,arcD:"M1 13 A10 10 0 0 1 11 3"},{color:"#E24B4A",angle:90,arcD:"M1 13 A10 10 0 0 1 21 13"}],m=function(n){var t=n.toneIndex,l=n.configs,r=void 0===l?g:l,d=r[Math.min(t,r.length-1)]||r[1]||r[0],a=d.color,s=d.angle,c=d.arcD,p=(s-90)*Math.PI/180,v=11+9*Math.cos(p),u=13+9*Math.sin(p);return o("svg",e({width:"22",height:"14",viewBox:"0 0 22 14",fill:"none"},{children:[i("path",{d:"M1 13 A10 10 0 0 1 21 13",stroke:"#e5e5e5",strokeWidth:"2.5",strokeLinecap:"round"}),i("path",{d:c,stroke:a,strokeWidth:"2.5",strokeLinecap:"round"}),i("line",{x1:"11",y1:"13",x2:v,y2:u,stroke:a,strokeWidth:"2",strokeLinecap:"round"})]}))},y=function(o){var n=o.type,t=o.customStyles,l=void 0===t?{}:t,r=e(e({},{High:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #FECACA",background:"#FEF2F2",color:"#B91C1C",fontSize:"11px",fontWeight:"500"},Medium:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #F2E5A1",background:"#FFFBEB",color:"#B45309",fontSize:"11px",fontWeight:"500"},Low:{padding:"3.5px 7px",borderRadius:"100px",border:"1px solid #8098F9",background:"#DBEAFE",color:"#444CE7",fontSize:"11px",fontWeight:"500"}}),l),d=r[n]||r.Medium;return i("div",e({style:d},{children:n}))},f=["Lenient","Balanced","Aggressive"],h={Lenient:"#1D9E75",Balanced:"#BA7517",Aggressive:"#E24B4A"},x={width:"350px",background:"#fff",border:"1px solid #ddd",borderRadius:"8px",padding:"16px",maxHeight:"400px",overflow:"auto"},S={display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:12},b={fontSize:11,fontWeight:500,letterSpacing:"0.08em",color:"#E24B4A",textTransform:"uppercase"},C={fontSize:15,fontWeight:500,margin:"0 0 8px",color:"#111"},B={fontSize:13,color:"#666",lineHeight:1.6,margin:"0 0 14px"},I={marginBottom:14,borderTop:"0.5px solid #eee",paddingTop:12},k={display:"flex",alignItems:"center",gap:6,background:"none",border:"none",cursor:"pointer",padding:0,width:"100%"},A={fontSize:11,fontWeight:500,textTransform:"uppercase",letterSpacing:"0.08em",color:"#E24B4A"},D={display:"flex",gap:8,marginBottom:18},T={flex:1,display:"flex",alignItems:"center",justifyContent:"center",gap:5,fontSize:12,fontWeight:500,padding:"7px 4px",borderRadius:8,border:"0.5px solid #ccc",background:"#fff",cursor:"pointer"},w={background:"none",border:"none",cursor:"pointer",fontSize:16,color:"#888",lineHeight:1,padding:0},z={borderTop:"0.5px solid #eee",paddingTop:14},R={display:"flex",alignItems:"center",width:"100%",background:"none",border:"none",cursor:"pointer",padding:0,marginBottom:4},W={cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"space-between",paddingTop:"12px",borderTop:"1px solid #eee",borderBottom:"none",paddingLeft:"12px",paddingRight:"12px"},E={display:"flex",alignItems:"center",gap:"4px",minWidth:0,flex:"1 1 auto",overflow:"hidden"},j={width:"28px",height:"28px",display:"inline-flex",alignItems:"center",justifyContent:"center",flex:"0 0 28px"},L={fontSize:"13px",color:"#101828",minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},M={display:"flex",alignItems:"center",gap:"10px",flex:"0 0 auto",minWidth:0,flexWrap:"nowrap"},F={display:"flex",padding:"4px 8px",alignItems:"center",gap:"4px",borderRadius:"var(--chip-border-radius, 16px)",border:"1px solid var(--Primitive-Gray-300, #d0d5dd)",flex:"0 1 auto",minWidth:0},H={color:"var(--Primitive-Purple-600, #6938ef)",fontFamily:"Inter",fontSize:"12px",fontStyle:"normal",fontWeight:500,lineHeight:"150%"};function N(N){var _,P,O,G,q,J,K,Q,U,V,X,Y,Z,$,ee,ie,oe=N.onClose,ne=N.aiReason,te=N.onAccept,le=N.onReject,re=N.onIterate,de=N.initialTone,ae=N.onRegenerate,se=N.labels,ce=void 0===se?{}:se,pe=N.toneLevelsConfig,ve=void 0===pe?f:pe,ue=N.toneColorsConfig,ge=void 0===ue?h:ue,me=N.dialConfigs,ye=void 0===me?g:me,fe=N.actions,he=N.disableAllActions,xe=void 0!==he&&he,Se=N.customStyles,be=void 0===Se?{}:Se,Ce=N.severityChipStyles,Be=void 0===Ce?{}:Ce,Ie=N.customIcons,ke=void 0===Ie?{}:Ie,Ae=N.onOpenCognitive,De=N.showTone,Te=void 0===De||De,we=N.cognitiveSectionStyle,ze=void 0===we?{}:we,Re=N.cognitiveScoreBadgeStyle,We=void 0===Re?{}:Re,Ee=N.cognitiveScoreTextStyle,je=void 0===Ee?{}:Ee,Le=N.cognitiveStyles,Me=void 0===Le?{}:Le,Fe=N.cognitiveClassNames,He=void 0===Fe?{}:Fe,Ne=N.cognitiveTitle,_e=void 0===Ne?"Cognitive Integrity":Ne,Pe=N.cognitiveLeftIcon,Oe=N.showCognitiveRightArrow,Ge=void 0===Oe||Oe,qe=N.isStreaming,Je=ve.findIndex(function(e){return e===de});-1===Je&&(Je=1);var Ke=c(!0),Qe=Ke[0],Ue=Ke[1],Ve=c(!1),Xe=Ve[0],Ye=Ve[1],Ze=c(Je),$e=Ze[0],ei=Ze[1],ii=c(Je)[0],oi=ve[$e],ni=ge[oi]||"#BA7517",ti=$e!==ii,li=[{id:"iterate",icon:ke.iterateIcon||i(t,{size:16,color:"#64748B"}),label:ce.btnIterate||"Iterate",color:"#64748B",onClick:re},{id:"accept",icon:ke.acceptIcon||i(l,{size:16,color:"#10B981"}),label:ce.btnAccept||"Approve",color:"#10B981",onClick:te},{id:"reject",icon:ke.rejectIcon||i(r,{size:16,color:"#DC2626"}),label:ce.btnReject||"Reject",color:"#DC2626",onClick:le}],ri=fe||li;return o("div",e({onClick:function(e){return e.stopPropagation()},style:e(e({},x),null===(_=null==be?void 0:be.DeviationSummaryStyles)||void 0===_?void 0:_.root)},{children:[o("div",e({style:e(e({},S),null===(P=null==be?void 0:be.DeviationSummaryStyles)||void 0===P?void 0:P.header)},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:6}},{children:[i("span",{children:ke.summaryIcon||i(d,{size:16,color:"#E24B4A"})}),i("span",e({style:e(e({},b),null===(O=null==be?void 0:be.DeviationSummaryStyles)||void 0===O?void 0:O.title)},{children:ce.summaryHeader||"Summary"}))]})),i("button",e({onClick:oe,style:e(e({},w),null===(G=null==be?void 0:be.DeviationSummaryStyles)||void 0===G?void 0:G.closeBtn)},{children:"✕"}))]})),i("p",e({style:e(e({},C),null===(q=null==be?void 0:be.DeviationSummaryStyles)||void 0===q?void 0:q.bodyText)},{children:null===(J=null==ne?void 0:ne.deviation_details)||void 0===J?void 0:J.deviation_title})),i("p",e({style:e(e({},B),null===(K=null==be?void 0:be.DeviationSummaryStyles)||void 0===K?void 0:K.summary)},{children:null===(Q=null==ne?void 0:ne.deviation_details)||void 0===Q?void 0:Q.deviation_summary})),o("div",e({style:e(e({},I),null===(U=null==be?void 0:be.DeviationSummaryStyles)||void 0===U?void 0:U.impactContainer)},{children:[o("div",e({style:{display:"flex",justifyContent:"space-between",alignItems:"center"}},{children:[o("button",e({onClick:function(){return Ue(!Qe)},style:e(e({},k),null===(V=null==be?void 0:be.DeviationSummaryStyles)||void 0===V?void 0:V.impactToggle)},{children:[i("span",e({style:e(e({},A),null===(X=null==be?void 0:be.DeviationSummaryStyles)||void 0===X?void 0:X.impactToggleLabel)},{children:ce.impactHeader||"Impact"})),i("span",e({style:{fontSize:12,color:"#E24B4A",transition:"transform 0.2s",display:"flex",alignItems:"center",transform:Qe?"rotate(180deg)":"rotate(0deg)"}},{children:i(a,{size:16,color:"#E24B4A"})}))]})),i(y,{type:(null==ne?void 0:ne.severity)||"Medium",customStyles:Be})]})),Qe&&i("p",e({style:{fontSize:13,color:"#666",lineHeight:1.6,margin:"8px 0 0"}},{children:null!==(Z=null===(Y=null==ne?void 0:ne.deviation_details)||void 0===Y?void 0:Y.deviation_impact)&&void 0!==Z?Z:ce.fallbackImpact||"This change reduces compliance obligations and lowers contractual risk thresholds."}))]})),i("div",e({style:e(e({},D),null===($=null==be?void 0:be.DeviationSummaryStyles)||void 0===$?void 0:$.actionContainer)},{children:ri.map(function(i){var n,t,l=xe||i.disabled,r=l?e(e({cursor:"not-allowed",opacity:.5},null===(n=null==be?void 0:be.DeviationSummaryStyles)||void 0===n?void 0:n.actionBtnDisabled),i.disabledStyle):{};return o("button",e({style:e(e(e(e(e({},T),null===(t=null==be?void 0:be.DeviationSummaryStyles)||void 0===t?void 0:t.actionBtn),{color:i.color}),i.style),r),onClick:l?void 0:i.onClick,disabled:l},{children:[i.icon,i.label]}),i.id)})})),Te&&o("div",e({style:e(e({},z),null===(ee=null==be?void 0:be.DeviationSummaryStyles)||void 0===ee?void 0:ee.toneContainer)},{children:[o("button",e({onClick:function(){return Ye(!Xe)},style:e(e({},R),null===(ie=null==be?void 0:be.DeviationSummaryStyles)||void 0===ie?void 0:ie.toneToggleBtn)},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:8}},{children:[i(m,{toneIndex:$e,configs:ye}),i("span",e({style:{fontSize:13,fontWeight:500,color:"#111"}},{children:ce.toneHeader||"Redline Tone"}))]})),i("span",e({style:{transition:"transform 0.2s",display:"flex",alignItems:"center",transform:Xe?"rotate(180deg)":"rotate(0deg)"}},{children:i(a,{size:16,color:"#111"})}))]})),Xe&&o(n,{children:[i("p",e({style:{fontSize:12,color:"#888",margin:"0 0 12px"}},{children:ce.toneDescription||"Controls how assertively AI is redlining"})),i(p,{isDirty:ti,onToneChange:function(e){ei(e)},toneColor:ni,toneIndex:$e,onClickRegenerate:function(){return null==ae?void 0:ae(oi)},toneLabels:ve,isStreaming:qe,aiReason:ne})]})]})),Ae&&o("div",e({className:null==He?void 0:He.section,onClick:function(e){e.stopPropagation(),Ae&&Ae(e)},style:e(e(e({},W),null==Me?void 0:Me.section),ze)},{children:[o("div",e({className:null==He?void 0:He.headerLeft,style:e(e({},E),null==Me?void 0:Me.headerLeft)},{children:[i("span",e({className:null==He?void 0:He.titleIcon,style:e(e({},j),null==Me?void 0:Me.titleIcon)},{children:null!=Pe?Pe:i(v,{})})),i("div",e({className:null==He?void 0:He.cognitiveTitle,style:e(e({},L),null==Me?void 0:Me.cognitiveTitle)},{children:_e}))]})),o("div",e({className:null==He?void 0:He.headerRight,style:e(e({},M),null==Me?void 0:Me.headerRight)},{children:[void 0!==(null==ne?void 0:ne.relevance_score)&&null!==(null==ne?void 0:ne.relevance_score)?o("span",e({className:null==He?void 0:He.scoreBadge,style:e(e(e({},F),null==Me?void 0:Me.scoreBadge),We)},{children:[i(u,{}),o("span",e({className:null==He?void 0:He.scoreText,style:e(e(e({},H),null==Me?void 0:Me.scoreText),je)},{children:[Math.round(Number(ne.relevance_score)),"%"]}))]})):null,Ge&&i("span",e({style:{display:"flex",alignItems:"center"}},{children:i(s,{size:16,color:"#64748B"})}))]}))]}))]}))}export{N as default};
2
2
  //# sourceMappingURL=DeviationSummary.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as n,jsxs as t}from"react/jsx-runtime";import{useState as o}from"react";import i from"./PopupDefaults.js";import{ReactComponent as r}from"../icons/History.svg.js";import{ReactComponent as a}from"../icons/message-chat-square.svg.js";import{ToneToggle as l}from"./ToneToggle.js";var d=[{id:"chat",icon:n(a,{}),label:"Chat",description:"Type on what basis you want to iterate"},{id:"risk",icon:n(a,{}),label:"Shift the risk",description:"Adjust how aggressive or lenient the language is"},{id:"history",icon:n(r,{}),label:"Historical Recommendations",description:"Pull from past recommended clauses"}],s=[{id:"1",filename:"Mutual_DA2.pdf",excerpt:'"...shall protect Confidential Information using at least the same degree of care as it uses to protect its own confidential information, but no less than reasonable c..."',tab:"Balanced"},{id:"2",filename:"Tech NDA.pdf",excerpt:'"...protect confidential information using reasonable care and appropriate safeguards..."',tab:"Balanced"},{id:"3",filename:"Corp NDA.pdf",excerpt:'"...shall use best efforts to protect any disclosed confidential materials from unauthorised access or disclosure..."',tab:"Aggressive"},{id:"4",filename:"Vendor Agreement.pdf",excerpt:'"...may use disclosed information solely for the stated purpose with no special handling required..."',tab:"Lenient"}],c=["Lenient","Balanced","Aggressive"],f={Lenient:"#1D9E75",Balanced:"#BA7517",Aggressive:"#E24B4A"},p=["Grounded","Innovative"];function g(o){var i=o.chatTitle,r=o.chatBody,a=o.mergedStyles,l=void 0===a?b:a;return n("div",e({style:l.body},{children:t("div",e({style:l.chatBanner},{children:[n("p",e({style:l.chatBannerTitle},{children:i})),n("p",e({style:l.chatBannerBody},{children:r}))]}))}))}function u(i){var r=i.initialTone,a=i.onRiskRegenerate,d=i.riskMode,s=i.toneLevelsConfig,g=void 0===s?c:s,u=i.toneColorsConfig,h=void 0===u?f:u,m=i.riskModesConfig,y=void 0===m?p:m,x=i.mergedStyles,v=void 0===x?b:x,C=g.findIndex(function(e){return e===r});-1===C&&(C=1);var k=o(d||y[0]||"Grounded"),B=k[0],S=k[1],T=o(C),A=T[0],R=T[1],w=o(C)[0],z=g[A],L=h[z]||"#BA7517",D=A!==w||d!==B;return t("div",e({style:v.body},{children:[n("div",e({style:{display:"flex",gap:8,marginBottom:16}},{children:y.map(function(o){return t("button",e({onClick:function(){return S(o)},style:{flex:1,display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderRadius:10,border:"1px solid ".concat(B===o?"#7c5cbf":"#e0ddd8"),background:"#fff",cursor:"pointer",fontSize:13,fontWeight:500,color:"#1a1a1a"}},{children:[n("span",e({style:{width:16,height:16,borderRadius:"50%",border:"2px solid ".concat(B===o?"#7c5cbf":"#ccc"),display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:B===o&&n("span",{style:{width:8,height:8,borderRadius:"50%",background:"#7c5cbf"}})})),o.charAt(0).toUpperCase()+o.slice(1)]}),o)})})),n(l,{onToneChange:function(e){return R(e)},toneColor:L,isDirty:D,toneIndex:A,onClickRegenerate:function(){return null==a?void 0:a({tone:z,mode:B})}})]}))}function h(i){var r=i.onApply,a=i.historicalClausesData,l=void 0===a?s:a,d=i.toneLevelsConfig,f=void 0===d?c:d,p=i.mergedStyles,g=void 0===p?b:p,u=f.length>1?f[1]:f[0]||"Balanced",h=o(u),m=h[0],y=h[1],x=l.filter(function(e){return e.tab===m});return t("div",e({style:g.body},{children:[n("div",e({style:g.segmentedControl},{children:f.map(function(t){return n("button",e({onClick:function(){return y(t)},style:e(e({},g.segmentedBtn),m===t?g.segmentedBtnActive:{})},{children:t.charAt(0).toUpperCase()+t.slice(1)}),t)})})),t("div",e({style:{display:"flex",flexDirection:"column",gap:10,marginTop:12}},{children:[x.map(function(o){return t("button",e({onClick:function(){return null==r?void 0:r({type:"history",value:o.excerpt})},style:g.clauseCard},{children:[n("p",e({style:g.clauseFilename},{children:o.filename})),n("p",e({style:g.clauseExcerpt},{children:o.excerpt}))]}),o.id)}),0===x.length&&n("p",e({style:{fontSize:12,color:"#aaa",textAlign:"center",padding:"12px 0"}},{children:"No clauses for this tone"}))]}))]}))}function m(e){var t=e.type,o=e.onRiskRegenerate,i=e.initialTone,r=e.riskMode,a=e.onApply,l=e.chatTitle,d=e.chatBody,s=e.historicalClausesData,c=e.toneLevelsConfig,f=e.toneColorsConfig,p=e.riskModesConfig,m=e.mergedStyles,y=void 0===m?b:m;return"chat"===t?n(g,{chatTitle:l,chatBody:d,mergedStyles:y}):"risk"===t?n(u,{onRiskRegenerate:o,initialTone:i,riskMode:r,toneLevelsConfig:c,toneColorsConfig:f,riskModesConfig:p,mergedStyles:y}):"history"===t?n(h,{onApply:a,historicalClausesData:s,toneLevelsConfig:c,mergedStyles:y}):null}function y(r){var a=r.onBack,l=r.onChatClick,g=r.onRiskRegenerate,u=r.initialTone,h=r.riskMode,y=r.onApply,x=r.onTabToggle,v=r.menuItemsConfig,C=void 0===v?d:v,k=r.historicalClausesConfig,B=void 0===k?s:k,S=r.chatTitle,T=void 0===S?"Chat mode active":S,A=r.chatBody,R=void 0===A?"You are now chatting about this redline, continue the conversation in the left panel to refine or update it":A,w=r.headerTitle,z=void 0===w?"How would you like to iterate?":w,L=r.customStyles,D=void 0===L?{}:L,I=r.toneLevelsConfig,M=void 0===I?c:I,j=r.toneColorsConfig,F=void 0===j?f:j,H=r.riskModesConfig,W=void 0===H?p:H,E=o(null),G=E[0],N=E[1],q=e(e(e({},i.IterateMenuDefaults.styles),b),D);return t("div",e({style:q.card},{children:[t("div",e({style:q.header},{children:[n("button",e({onClick:a,style:q.backBtn,"aria-label":"Go back"},{children:"‹"})),n("span",e({style:q.headerTitle},{children:z}))]})),C.map(function(o,i){var r=G===o.id;return t("div",e({style:{borderBottom:i<C.length-1?"0.5px solid #e8e7e3":"none"}},{children:[t("button",e({onClick:function(){return e=o.id,N(function(n){return n===e?null:("chat"===e&&(null==l||l()),x&&x(e),e)});var e},style:q.row},{children:[n("div",e({style:q.rowLeft},{children:t("div",{children:[n("p",e({style:q.label},{children:o.label})),n("p",e({style:q.desc},{children:o.description}))]})})),n("span",e({style:e(e({},q.chevron),{transform:r?"rotate(90deg)":"rotate(0deg)"})},{children:"›"}))]})),n("div",e({style:{maxHeight:r?400:0,overflow:"hidden",transition:"max-height 0.25s ease"}},{children:n(m,{type:o.id,onRiskRegenerate:g,initialTone:u,riskMode:h,onApply:y,chatTitle:T,chatBody:R,historicalClausesData:B,toneLevelsConfig:M,toneColorsConfig:F,riskModesConfig:W,mergedStyles:q})}))]}),o.id)})]}))}var b={card:{background:"#fff",border:"0.5px solid #e8e7e3",borderRadius:14,width:300,maxHeight:"350px",overflow:"auto",fontFamily:"system-ui, sans-serif"},header:{display:"flex",alignItems:"center",gap:8,padding:"14px 16px",borderBottom:"0.5px solid #e8e7e3"},backBtn:{background:"none",border:"none",cursor:"pointer",fontSize:20,color:"#888",padding:0,lineHeight:1},headerTitle:{fontSize:14,fontWeight:500,color:"#1a1a1a"},row:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",cursor:"pointer",border:"none",textAlign:"left",gap:10,boxSizing:"border-box",backgroundColor:"transparent"},rowLeft:{display:"flex",alignItems:"flex-start",gap:10,flex:1},icon:{fontSize:16,color:"#666",marginTop:1,flexShrink:0},label:{margin:0,fontSize:14,fontWeight:500,color:"#1a1a1a"},desc:{margin:"2px 0 0",fontSize:12,color:"#888",lineHeight:1.4},chevron:{fontSize:18,color:"#aaa",flexShrink:0,display:"inline-block",transition:"transform 0.2s"},body:{padding:"0 16px 14px 16px"},chatBanner:{background:"#eef4fd",border:"1px solid #c5d8f7",borderRadius:10,padding:"12px 14px",marginBottom:10},chatBannerTitle:{margin:"0 0 6px",fontSize:14,fontWeight:600,color:"#3a5a8a"},chatBannerBody:{margin:0,fontSize:13,color:"#4a6080",lineHeight:1.5},applyBtn:{display:"flex",padding:"7px 10.5px",justifyContent:"center",alignItems:"center",gap:"7px",marginTop:8,fontSize:13,borderRadius:6,border:"1px solid #2563EB",background:"#2563EB",color:"#fff"},rangeLabel:{fontSize:12,color:"#888"},segmentedControl:{border:"1px solid #F2F4F7",display:"flex",background:"#F9FAFB",borderRadius:4,padding:6,gap:8},segmentedBtn:{flex:1,padding:"7px 0",fontSize:13,fontWeight:500,color:"#888",background:"transparent",border:"none",borderRadius:8,cursor:"pointer",transition:"background 0.15s, color 0.15s"},segmentedBtnActive:{background:"#dce8fa",color:"#2a4a7a",fontWeight:700},clauseCard:{background:"#fff",border:"1px solid #dde5f0",borderRadius:12,padding:"12px 14px",textAlign:"left",cursor:"pointer",width:"100%"},clauseFilename:{margin:"0 0 6px",fontSize:13,fontWeight:600,color:"#2a4a7a"},clauseExcerpt:{margin:0,fontSize:13,color:"#4a5a70",fontStyle:"italic",lineHeight:1.5}};export{y as default};
1
+ import{__assign as e}from"tslib";import{jsx as n,jsxs as t}from"react/jsx-runtime";import{useState as i}from"react";import o from"./PopupDefaults.js";import{ReactComponent as r}from"../icons/History.svg.js";import{ReactComponent as a}from"../icons/message-chat-square.svg.js";import{ToneToggle as l}from"./ToneToggle.js";var s=[{id:"chat",icon:n(a,{}),label:"Chat",description:"Type on what basis you want to iterate"},{id:"risk",icon:n(a,{}),label:"Shift the risk",description:"Adjust how aggressive or lenient the language is"},{id:"history",icon:n(r,{}),label:"Historical Recommendations",description:"Pull from past recommended clauses"}],d=[{id:"1",filename:"Mutual_DA2.pdf",excerpt:'"...shall protect Confidential Information using at least the same degree of care as it uses to protect its own confidential information, but no less than reasonable c..."',tab:"Balanced"},{id:"2",filename:"Tech NDA.pdf",excerpt:'"...protect confidential information using reasonable care and appropriate safeguards..."',tab:"Balanced"},{id:"3",filename:"Corp NDA.pdf",excerpt:'"...shall use best efforts to protect any disclosed confidential materials from unauthorised access or disclosure..."',tab:"Aggressive"},{id:"4",filename:"Vendor Agreement.pdf",excerpt:'"...may use disclosed information solely for the stated purpose with no special handling required..."',tab:"Lenient"}],c=["Lenient","Balanced","Aggressive"],f={Lenient:"#1D9E75",Balanced:"#BA7517",Aggressive:"#E24B4A"},p=["Grounded","Innovative"];function g(i){var o=i.chatTitle,r=i.chatBody,a=i.mergedStyles,l=void 0===a?b:a;return n("div",e({style:l.body},{children:t("div",e({style:l.chatBanner},{children:[n("p",e({style:l.chatBannerTitle},{children:o})),n("p",e({style:l.chatBannerBody},{children:r}))]}))}))}function u(o){var r=o.initialTone,a=o.onRiskRegenerate,s=o.riskMode,d=o.toneLevelsConfig,g=void 0===d?c:d,u=o.toneColorsConfig,h=void 0===u?f:u,m=o.riskModesConfig,y=void 0===m?p:m,x=o.mergedStyles,v=void 0===x?b:x,C=o.isStreaming,k=o.aiReason,B=g.findIndex(function(e){return e===r});-1===B&&(B=1);var S=i(s||y[0]||"Grounded"),R=S[0],T=S[1],A=i(B),w=A[0],z=A[1],L=i(B)[0],D=g[w],I=h[D]||"#BA7517",M=w!==L||s!==R;return t("div",e({style:v.body},{children:[n("div",e({style:{display:"flex",gap:8,marginBottom:16}},{children:y.map(function(i){return t("button",e({onClick:function(){return T(i)},style:{flex:1,display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderRadius:10,border:"1px solid ".concat(R===i?"#7c5cbf":"#e0ddd8"),background:"#fff",cursor:"pointer",fontSize:13,fontWeight:500,color:"#1a1a1a"}},{children:[n("span",e({style:{width:16,height:16,borderRadius:"50%",border:"2px solid ".concat(R===i?"#7c5cbf":"#ccc"),display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0}},{children:R===i&&n("span",{style:{width:8,height:8,borderRadius:"50%",background:"#7c5cbf"}})})),i.charAt(0).toUpperCase()+i.slice(1)]}),i)})})),n(l,{onToneChange:function(e){return z(e)},toneColor:I,isDirty:M,toneIndex:w,onClickRegenerate:function(){return null==a?void 0:a({tone:D,mode:R})},isStreaming:C,aiReason:k})]}))}function h(o){var r=o.onApply,a=o.historicalClausesData,l=void 0===a?d:a,s=o.toneLevelsConfig,f=void 0===s?c:s,p=o.mergedStyles,g=void 0===p?b:p,u=f.length>1?f[1]:f[0]||"Balanced",h=i(u),m=h[0],y=h[1],x=l.filter(function(e){return e.tab===m});return t("div",e({style:g.body},{children:[n("div",e({style:g.segmentedControl},{children:f.map(function(t){return n("button",e({onClick:function(){return y(t)},style:e(e({},g.segmentedBtn),m===t?g.segmentedBtnActive:{})},{children:t.charAt(0).toUpperCase()+t.slice(1)}),t)})})),t("div",e({style:{display:"flex",flexDirection:"column",gap:10,marginTop:12}},{children:[x.map(function(i){return t("button",e({onClick:function(){return null==r?void 0:r({type:"history",value:i.excerpt})},style:g.clauseCard},{children:[n("p",e({style:g.clauseFilename},{children:i.filename})),n("p",e({style:g.clauseExcerpt},{children:i.excerpt}))]}),i.id)}),0===x.length&&n("p",e({style:{fontSize:12,color:"#aaa",textAlign:"center",padding:"12px 0"}},{children:"No clauses for this tone"}))]}))]}))}function m(e){var t=e.type,i=e.onRiskRegenerate,o=e.initialTone,r=e.riskMode,a=e.onApply,l=e.chatTitle,s=e.chatBody,d=e.historicalClausesData,c=e.toneLevelsConfig,f=e.toneColorsConfig,p=e.riskModesConfig,m=e.mergedStyles,y=void 0===m?b:m,x=e.isStreaming,v=e.aiReason;return"chat"===t?n(g,{chatTitle:l,chatBody:s,mergedStyles:y}):"risk"===t?n(u,{onRiskRegenerate:i,initialTone:o,riskMode:r,toneLevelsConfig:c,toneColorsConfig:f,riskModesConfig:p,mergedStyles:y,isStreaming:x,aiReason:v}):"history"===t?n(h,{onApply:a,historicalClausesData:d,toneLevelsConfig:c,mergedStyles:y}):null}function y(r){var a=r.onBack,l=r.onChatClick,g=r.onRiskRegenerate,u=r.initialTone,h=r.riskMode,y=r.onApply,x=r.onTabToggle,v=r.menuItemsConfig,C=void 0===v?s:v,k=r.historicalClausesConfig,B=void 0===k?d:k,S=r.chatTitle,R=void 0===S?"Chat mode active":S,T=r.chatBody,A=void 0===T?"You are now chatting about this redline, continue the conversation in the left panel to refine or update it":T,w=r.headerTitle,z=void 0===w?"How would you like to iterate?":w,L=r.customStyles,D=void 0===L?{}:L,I=r.toneLevelsConfig,M=void 0===I?c:I,j=r.toneColorsConfig,F=void 0===j?f:j,H=r.riskModesConfig,W=void 0===H?p:H,E=r.isStreaming,G=r.aiReason,N=i(null),q=N[0],P=N[1],U=e(e(e({},o.IterateMenuDefaults.styles),b),D);return t("div",e({style:U.card},{children:[t("div",e({style:U.header},{children:[n("button",e({onClick:a,style:U.backBtn,"aria-label":"Go back"},{children:"‹"})),n("span",e({style:U.headerTitle},{children:z}))]})),C.map(function(i,o){var r=q===i.id;return t("div",e({style:{borderBottom:o<C.length-1?"0.5px solid #e8e7e3":"none"}},{children:[t("button",e({onClick:function(){return e=i.id,P(function(n){return n===e?null:("chat"===e&&(null==l||l()),x&&x(e),e)});var e},style:U.row},{children:[n("div",e({style:U.rowLeft},{children:t("div",{children:[n("p",e({style:U.label},{children:i.label})),n("p",e({style:U.desc},{children:i.description}))]})})),n("span",e({style:e(e({},U.chevron),{transform:r?"rotate(90deg)":"rotate(0deg)"})},{children:"›"}))]})),n("div",e({style:{maxHeight:r?400:0,overflow:"hidden",transition:"max-height 0.25s ease"}},{children:n(m,{type:i.id,onRiskRegenerate:g,initialTone:u,riskMode:h,onApply:y,chatTitle:R,chatBody:A,historicalClausesData:B,toneLevelsConfig:M,toneColorsConfig:F,riskModesConfig:W,mergedStyles:U,aiReason:G,isStreaming:E})}))]}),i.id)})]}))}var b={card:{background:"#fff",border:"0.5px solid #e8e7e3",borderRadius:14,width:300,maxHeight:"350px",overflow:"auto",fontFamily:"system-ui, sans-serif"},header:{display:"flex",alignItems:"center",gap:8,padding:"14px 16px",borderBottom:"0.5px solid #e8e7e3"},backBtn:{background:"none",border:"none",cursor:"pointer",fontSize:20,color:"#888",padding:0,lineHeight:1},headerTitle:{fontSize:14,fontWeight:500,color:"#1a1a1a"},row:{width:"100%",display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 16px",cursor:"pointer",border:"none",textAlign:"left",gap:10,boxSizing:"border-box",backgroundColor:"transparent"},rowLeft:{display:"flex",alignItems:"flex-start",gap:10,flex:1},icon:{fontSize:16,color:"#666",marginTop:1,flexShrink:0},label:{margin:0,fontSize:14,fontWeight:500,color:"#1a1a1a"},desc:{margin:"2px 0 0",fontSize:12,color:"#888",lineHeight:1.4},chevron:{fontSize:18,color:"#aaa",flexShrink:0,display:"inline-block",transition:"transform 0.2s"},body:{padding:"0 16px 14px 16px"},chatBanner:{background:"#eef4fd",border:"1px solid #c5d8f7",borderRadius:10,padding:"12px 14px",marginBottom:10},chatBannerTitle:{margin:"0 0 6px",fontSize:14,fontWeight:600,color:"#3a5a8a"},chatBannerBody:{margin:0,fontSize:13,color:"#4a6080",lineHeight:1.5},applyBtn:{display:"flex",padding:"7px 10.5px",justifyContent:"center",alignItems:"center",gap:"7px",marginTop:8,fontSize:13,borderRadius:6,border:"1px solid #2563EB",background:"#2563EB",color:"#fff"},rangeLabel:{fontSize:12,color:"#888"},segmentedControl:{border:"1px solid #F2F4F7",display:"flex",background:"#F9FAFB",borderRadius:4,padding:6,gap:8},segmentedBtn:{flex:1,padding:"7px 0",fontSize:13,fontWeight:500,color:"#888",background:"transparent",border:"none",borderRadius:8,cursor:"pointer",transition:"background 0.15s, color 0.15s"},segmentedBtnActive:{background:"#dce8fa",color:"#2a4a7a",fontWeight:700},clauseCard:{background:"#fff",border:"1px solid #dde5f0",borderRadius:12,padding:"12px 14px",textAlign:"left",cursor:"pointer",width:"100%"},clauseFilename:{margin:"0 0 6px",fontSize:13,fontWeight:600,color:"#2a4a7a"},clauseExcerpt:{margin:0,fontSize:13,color:"#4a5a70",fontStyle:"italic",lineHeight:1.5}};export{y as default};
2
2
  //# sourceMappingURL=IterateComponent.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as e}from"tslib";import{jsx as t,jsxs as o}from"react/jsx-runtime";import{Undo2 as n}from"lucide-react";import{useState as r}from"react";import i from"./PopupDefaults.js";function d(e){var t=new Date(e);return isNaN(t.getTime())?e:new Date(e).toLocaleString("en-US",{month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0}).replace(" AM","AM").replace(" PM","PM")}var l=function(){return o("svg",e({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},{children:[t("circle",{cx:"11",cy:"11",r:"10",stroke:"#22c55e",strokeWidth:"2",fill:"#f0fdf4"}),t("path",{d:"M6.5 11.5l3 3 6-6",stroke:"#22c55e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},c=function(){return o("svg",e({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},{children:[t("circle",{cx:"11",cy:"11",r:"10",stroke:"#ef4444",strokeWidth:"2",fill:"#fff1f2"}),t("path",{d:"M7.5 7.5l7 7M14.5 7.5l-7 7",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round"})]}))},a=function(){return t("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},{children:t("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#94a3b8",strokeWidth:"1.8",strokeLinecap:"round"})}))},s=function(){return o("svg",e({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},{children:[t("circle",{cx:"6.5",cy:"5.5",r:"2.5",stroke:"#94a3b8",strokeWidth:"1.4"}),t("path",{d:"M1.5 13.5c0-3.038 2.462-5.5 5-5.5s5 2.462 5 5.5",stroke:"#94a3b8",strokeWidth:"1.4",strokeLinecap:"round"}),t("path",{d:"M11 8.5l1.5 1.5 2.5-2.5",stroke:"#22c55e",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}))},h=function(){return o("svg",e({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},{children:[t("circle",{cx:"6.5",cy:"5.5",r:"2.5",stroke:"#94a3b8",strokeWidth:"1.4"}),t("path",{d:"M1.5 13.5c0-3.038 2.462-5.5 5-5.5s5 2.462 5 5.5",stroke:"#94a3b8",strokeWidth:"1.4",strokeLinecap:"round"}),t("path",{d:"M11.5 8l3 3m0-3l-3 3",stroke:"#ef4444",strokeWidth:"1.4",strokeLinecap:"round"})]}))},u=function(o){var n=o.open;return t("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{transform:n?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.25s ease"}},{children:t("path",{d:"M4.5 11.25L9 6.75l4.5 4.5",stroke:"#64748b",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))},f=function(n){var r=n.color,i=void 0===r?"#3b82f6":r;return o("svg",e({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t("path",{d:"M1.5 8A6.5 6.5 0 1 0 4 3.2",stroke:i,strokeWidth:"1.5",strokeLinecap:"round"}),t("path",{d:"M1.5 3.5v4h4",stroke:i,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M8 5v3.5l2 1.5",stroke:i,strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}))},p=function(){return o("svg",e({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t("path",{d:"M13.5 8a5.5 5.5 0 1 0-1.6 3.9",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round"}),t("path",{d:"M13.5 13v-4.5H9",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}))},k=function(){return o("svg",e({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t("path",{d:"M2 8h12M10 4l4 4-4 4",stroke:"#64748b",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M4 5l-2 3 2 3",stroke:"#64748b",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}))};function g(n){var r=n.title,i=n.open,d=n.onToggle,l=n.children;return o("div",e({style:{maxHeight:"170px",overflow:"auto"}},{children:[o("div",e({onClick:d,style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",userSelect:"none",padding:"2px 0"}},{children:[t("span",e({style:{fontSize:14,fontWeight:700,color:"#1e293b",letterSpacing:"-0.01em"}},{children:r})),t(u,{open:i})]})),t("div",e({style:{maxHeight:i?300:0,opacity:i?1:0,overflow:"hidden",transition:"max-height 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.25s"}},{children:l}))]}))}function b(t){var n=t.icon,r=t.label,i=t.onClick,d=t.customStyle,l=e({display:"flex",alignItems:"center",gap:7,padding:"8px 16px",background:"#f8fafc",border:"1.5px solid #e2e8f0",borderRadius:10,cursor:"pointer",fontSize:"12px",fontWeight:600,color:"#475569",fontFamily:"inherit",transition:"background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s",whiteSpace:"nowrap"},void 0===d?{}:d);return o("button",e({onClick:i,style:l,onMouseEnter:function(e){e.currentTarget.style.background="#f1f5f9",e.currentTarget.style.transform="translateY(-1px)",e.currentTarget.style.boxShadow="0 2px 8px rgba(0,0,0,0.07)"},onMouseLeave:function(e){e.currentTarget.style.background="#f8fafc",e.currentTarget.style.transform="",e.currentTarget.style.boxShadow=""}},{children:[n,r]}))}function v(u){var v=u.status,m=u.onClose,y=u.impactText,x=u.secondText,B=u.actionTakenByName,C=u.actionTakenAtTime,L=void 0===C?"NA":C,w=u.onHistory,R=u.onIterate,M=u.onReinstate,W=u.onRevert,S=u.impactTitle,T=void 0===S?"Impact":S,I=u.customConfigs,D=void 0===I?{}:I,j=u.customStyles,z=void 0===j?{}:j,A=r(!0),H=A[0],F=A[1],U=r(!0),E=U[0],N=U[1],P=r(!1),O=P[0],Y=P[1],q={headerBg:"#f0fdf4",headerBorder:"#dcfce7",titleColor:"#166534",label:"Redline Approved",metaLabel:"Approved By",UserIcon:t(s,{}),StatusIcon:t(l,{}),secondTitle:"Original text",secondBg:"#f8fafc",secondBorder:"#e2e8f0",impactBox:!0,actions:[{icon:t(f,{}),label:"History",onClick:w},{icon:t(n,{size:17}),label:"Revert",onClick:W},{icon:t(k,{}),label:"Iterate",onClick:R}]},G={headerBg:"#fff1f2",headerBorder:"#fecdd3",titleColor:"#991b1b",label:"Redline Rejected",metaLabel:"Rejected By",UserIcon:t(h,{}),StatusIcon:t(c,{}),secondTitle:"Rejected Recommendation",secondBg:"#f8fafc",secondBorder:"#e2e8f0",impactBox:!1,actions:[{icon:t(f,{color:"#3b82f6"}),label:"History",onClick:w},{icon:t(p,{}),label:"Reinstate",onClick:M},{icon:t(k,{}),label:"Iterate",onClick:R}]},J={headerBg:"#E2E8F0",headerBorder:"none",titleColor:"#1E293B",label:"Redline Reverted",metaLabel:"Reverted By",UserIcon:t(s,{}),StatusIcon:t(n,{size:17}),secondTitle:"Reverted redline",secondBg:"#F9FAFB",secondBorder:"#D0D5DD",impactBox:!1,actions:[{icon:t(f,{}),label:"History",onClick:w},{icon:t(k,{}),label:"Iterate",onClick:R}]},K=e(e({},"accepted"===v?q:"rejected"===v?G:J),D[v]||{});return o("div",e({style:e(e(e({},i.RedlineCardDefaults.root),{animation:O?"slideOut 0.26s cubic-bezier(0.4,0,1,1) forwards":i.RedlineCardDefaults.root.animation||"slideIn 0.32s cubic-bezier(0.22,1,0.36,1) both"}),z.root)},{children:[o("div",e({style:e(e(e({},i.RedlineCardDefaults.header),{background:K.headerBg,borderBottom:"1.5px solid ".concat(K.headerBorder)}),z.header)},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:10}},{children:[K.StatusIcon,t("span",e({style:{fontSize:15,fontWeight:700,color:K.titleColor,letterSpacing:"-0.01em"}},{children:K.label}))]})),t("button",e({onClick:function(){Y(!0),m()},style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:6,display:"flex",alignItems:"center"}},{children:t(a,{})}))]})),o("div",e({style:e(e({},i.RedlineCardDefaults.body),z.body)},{children:[o("div",e({style:e(e({},i.RedlineCardDefaults.meta),z.meta)},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:6,marginBottom:5}},{children:[K.UserIcon,t("span",e({style:{fontSize:12.5,color:"#94a3b8",fontWeight:500}},{children:K.metaLabel}))]})),o("div",e({style:{fontSize:14,fontWeight:700,color:"#1e293b",letterSpacing:"-0.01em"}},{children:[B,", ",d(L)]}))]})),t("div",{style:e(e({},i.RedlineCardDefaults.divider),z.divider)}),t(g,e({title:T,open:H,onToggle:function(){return F(function(e){return!e})}},{children:t("p",e({style:e(e({},i.RedlineCardDefaults.impactText),z.impactText)},{children:y||""}))})),t("div",{style:e(e({},i.RedlineCardDefaults.divider),z.divider)}),t(g,e({title:K.secondTitle,open:E,onToggle:function(){return N(function(e){return!e})}},{children:t("div",e({style:e(e(e({},i.RedlineCardDefaults.secondSection),{background:K.secondBg,border:"1.5px solid ".concat(K.secondBorder)}),z.secondSection)},{children:x||""}))})),t("div",e({style:e(e({},i.RedlineCardDefaults.actionsContainer),z.actionsContainer)},{children:K.actions.map(function(e){return t(b,{icon:e.icon,label:e.label,onClick:e.onClick,customStyle:e.style},e.label)})}))]}))]}))}export{l as ApprovedIcon,u as ChevronIcon,a as CloseIcon,f as HistoryIcon,k as IterateIcon,v as RedlineCard,p as ReinstateIcon,c as RejectedIcon,s as UserApprovedIcon,h as UserRejectedIcon,d as formatDate};
1
+ import{__assign as e}from"tslib";import{jsx as t,jsxs as o}from"react/jsx-runtime";import{Undo2 as n}from"lucide-react";import{useState as i}from"react";import r from"./PopupDefaults.js";function d(e){var t=new Date(e);return isNaN(t.getTime())?e:new Date(e).toLocaleString("en-US",{month:"2-digit",day:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit",hour12:!0}).replace(" AM","AM").replace(" PM","PM")}var l=function(){return o("svg",e({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},{children:[t("circle",{cx:"11",cy:"11",r:"10",stroke:"#22c55e",strokeWidth:"2",fill:"#f0fdf4"}),t("path",{d:"M6.5 11.5l3 3 6-6",stroke:"#22c55e",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})]}))},a=function(){return o("svg",e({width:"22",height:"22",viewBox:"0 0 22 22",fill:"none"},{children:[t("circle",{cx:"11",cy:"11",r:"10",stroke:"#ef4444",strokeWidth:"2",fill:"#fff1f2"}),t("path",{d:"M7.5 7.5l7 7M14.5 7.5l-7 7",stroke:"#ef4444",strokeWidth:"2",strokeLinecap:"round"})]}))},c=function(){return t("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none"},{children:t("path",{d:"M4 4l10 10M14 4L4 14",stroke:"#94a3b8",strokeWidth:"1.8",strokeLinecap:"round"})}))},s=function(){return o("svg",e({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},{children:[t("circle",{cx:"6.5",cy:"5.5",r:"2.5",stroke:"#94a3b8",strokeWidth:"1.4"}),t("path",{d:"M1.5 13.5c0-3.038 2.462-5.5 5-5.5s5 2.462 5 5.5",stroke:"#94a3b8",strokeWidth:"1.4",strokeLinecap:"round"}),t("path",{d:"M11 8.5l1.5 1.5 2.5-2.5",stroke:"#22c55e",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})]}))},h=function(){return o("svg",e({width:"16",height:"16",viewBox:"0 0 16 16",fill:"none"},{children:[t("circle",{cx:"6.5",cy:"5.5",r:"2.5",stroke:"#94a3b8",strokeWidth:"1.4"}),t("path",{d:"M1.5 13.5c0-3.038 2.462-5.5 5-5.5s5 2.462 5 5.5",stroke:"#94a3b8",strokeWidth:"1.4",strokeLinecap:"round"}),t("path",{d:"M11.5 8l3 3m0-3l-3 3",stroke:"#ef4444",strokeWidth:"1.4",strokeLinecap:"round"})]}))},u=function(o){var n=o.open;return t("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",style:{transform:n?"rotate(0deg)":"rotate(180deg)",transition:"transform 0.25s ease"}},{children:t("path",{d:"M4.5 11.25L9 6.75l4.5 4.5",stroke:"#64748b",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round"})}))},f=function(n){var i=n.color,r=void 0===i?"#3b82f6":i;return o("svg",e({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t("path",{d:"M1.5 8A6.5 6.5 0 1 0 4 3.2",stroke:r,strokeWidth:"1.5",strokeLinecap:"round"}),t("path",{d:"M1.5 3.5v4h4",stroke:r,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M8 5v3.5l2 1.5",stroke:r,strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}))},p=function(){return o("svg",e({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t("path",{d:"M13.5 8a5.5 5.5 0 1 0-1.6 3.9",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round"}),t("path",{d:"M13.5 13v-4.5H9",stroke:"#3b82f6",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}))},k=function(){return o("svg",e({width:"15",height:"15",viewBox:"0 0 16 16",fill:"none"},{children:[t("path",{d:"M2 8h12M10 4l4 4-4 4",stroke:"#64748b",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}),t("path",{d:"M4 5l-2 3 2 3",stroke:"#64748b",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})]}))};function g(n){var i=n.title,r=n.open,d=n.onToggle,l=n.children;return o("div",e({style:{maxHeight:"170px",overflow:"auto"}},{children:[o("div",e({onClick:d,style:{display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",userSelect:"none",padding:"2px 0"}},{children:[t("span",e({style:{fontSize:14,fontWeight:700,color:"#1e293b",letterSpacing:"-0.01em"}},{children:i})),t(u,{open:r})]})),t("div",e({style:{maxHeight:r?300:0,opacity:r?1:0,overflow:"hidden",transition:"max-height 0.3s cubic-bezier(0.4,0,0.2,1), opacity 0.25s"}},{children:l}))]}))}function b(t){var n=t.icon,i=t.label,r=t.onClick,d=t.customStyle,l=void 0===d?{}:d,a=t.disabled,c=void 0!==a&&a,s=t.disabledStyle,h=void 0===s?{}:s,u=e(e({display:"flex",alignItems:"center",gap:7,padding:"8px 16px",background:"#f8fafc",border:"1.5px solid #e2e8f0",borderRadius:10,cursor:c?"not-allowed":"pointer",fontSize:"12px",fontWeight:600,color:"#475569",fontFamily:"inherit",transition:"background 0.15s, border-color 0.15s, box-shadow 0.15s, transform 0.12s",whiteSpace:"nowrap",opacity:c?.5:1},l),c?h:{});return o("button",e({onClick:c?void 0:r,disabled:c,style:u,onMouseEnter:function(e){c||(e.currentTarget.style.background="#f1f5f9",e.currentTarget.style.transform="translateY(-1px)",e.currentTarget.style.boxShadow="0 2px 8px rgba(0,0,0,0.07)")},onMouseLeave:function(e){c||(e.currentTarget.style.background="#f8fafc",e.currentTarget.style.transform="",e.currentTarget.style.boxShadow="")}},{children:[n,i]}))}function v(u){var v=u.status,m=u.onClose,y=u.impactText,x=u.secondText,B=u.actionTakenByName,C=u.actionTakenAtTime,L=void 0===C?"NA":C,w=u.onHistory,R=u.onIterate,S=u.onReinstate,M=u.onRevert,W=u.disableAllActions,T=void 0!==W&&W,I=u.impactTitle,D=void 0===I?"Impact":I,j=u.customConfigs,z=void 0===j?{}:j,A=u.customStyles,H=void 0===A?{}:A,F=i(!0),U=F[0],E=F[1],N=i(!0),P=N[0],O=N[1],Y=i(!1),q=Y[0],G=Y[1],J={headerBg:"#f0fdf4",headerBorder:"#dcfce7",titleColor:"#166534",label:"Redline Approved",metaLabel:"Approved By",UserIcon:t(s,{}),StatusIcon:t(l,{}),secondTitle:"Original text",secondBg:"#f8fafc",secondBorder:"#e2e8f0",impactBox:!0,actions:[{icon:t(f,{}),label:"History",onClick:w},{icon:t(n,{size:17}),label:"Revert",onClick:M},{icon:t(k,{}),label:"Iterate",onClick:R}]},K={headerBg:"#fff1f2",headerBorder:"#fecdd3",titleColor:"#991b1b",label:"Redline Rejected",metaLabel:"Rejected By",UserIcon:t(h,{}),StatusIcon:t(a,{}),secondTitle:"Rejected Recommendation",secondBg:"#f8fafc",secondBorder:"#e2e8f0",impactBox:!1,actions:[{icon:t(f,{color:"#3b82f6"}),label:"History",onClick:w},{icon:t(p,{}),label:"Reinstate",onClick:S},{icon:t(k,{}),label:"Iterate",onClick:R}]},Q={headerBg:"#E2E8F0",headerBorder:"none",titleColor:"#1E293B",label:"Redline Reverted",metaLabel:"Reverted By",UserIcon:t(s,{}),StatusIcon:t(n,{size:17}),secondTitle:"Reverted redline",secondBg:"#F9FAFB",secondBorder:"#D0D5DD",impactBox:!1,actions:[{icon:t(f,{}),label:"History",onClick:w},{icon:t(k,{}),label:"Iterate",onClick:R}]},V=e(e({},"accepted"===v?J:"rejected"===v?K:Q),z[v]||{});return o("div",e({style:e(e(e({},r.RedlineCardDefaults.root),{animation:q?"slideOut 0.26s cubic-bezier(0.4,0,1,1) forwards":r.RedlineCardDefaults.root.animation||"slideIn 0.32s cubic-bezier(0.22,1,0.36,1) both"}),H.root)},{children:[o("div",e({style:e(e(e({},r.RedlineCardDefaults.header),{background:V.headerBg,borderBottom:"1.5px solid ".concat(V.headerBorder)}),H.header)},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:10}},{children:[V.StatusIcon,t("span",e({style:{fontSize:15,fontWeight:700,color:V.titleColor,letterSpacing:"-0.01em"}},{children:V.label}))]})),t("button",e({onClick:function(){G(!0),m()},style:{background:"none",border:"none",cursor:"pointer",padding:4,borderRadius:6,display:"flex",alignItems:"center"}},{children:t(c,{})}))]})),o("div",e({style:e(e({},r.RedlineCardDefaults.body),H.body)},{children:[o("div",e({style:e(e({},r.RedlineCardDefaults.meta),H.meta)},{children:[o("div",e({style:{display:"flex",alignItems:"center",gap:6,marginBottom:5}},{children:[V.UserIcon,t("span",e({style:{fontSize:12.5,color:"#94a3b8",fontWeight:500}},{children:V.metaLabel}))]})),o("div",e({style:{fontSize:14,fontWeight:700,color:"#1e293b",letterSpacing:"-0.01em"}},{children:[B,", ",d(L)]}))]})),t("div",{style:e(e({},r.RedlineCardDefaults.divider),H.divider)}),t(g,e({title:D,open:U,onToggle:function(){return E(function(e){return!e})}},{children:t("p",e({style:e(e({},r.RedlineCardDefaults.impactText),H.impactText)},{children:y||""}))})),t("div",{style:e(e({},r.RedlineCardDefaults.divider),H.divider)}),t(g,e({title:V.secondTitle,open:P,onToggle:function(){return O(function(e){return!e})}},{children:t("div",e({style:e(e(e({},r.RedlineCardDefaults.secondSection),{background:V.secondBg,border:"1.5px solid ".concat(V.secondBorder)}),H.secondSection)},{children:x||""}))})),t("div",e({style:e(e({},r.RedlineCardDefaults.actionsContainer),H.actionsContainer)},{children:V.actions.map(function(o){return t(b,{icon:o.icon,label:o.label,onClick:o.onClick,customStyle:e(e({},o.style),H.actionBtn),disabled:T||o.disabled,disabledStyle:H.actionBtnDisabled},o.label)})}))]}))]}))}export{l as ApprovedIcon,u as ChevronIcon,c as CloseIcon,f as HistoryIcon,k as IterateIcon,v as RedlineCard,p as ReinstateIcon,a as RejectedIcon,s as UserApprovedIcon,h as UserRejectedIcon,d as formatDate};
2
2
  //# sourceMappingURL=RedlineStatusCard.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as t}from"tslib";import{jsxs as e,Fragment as o,jsx as n}from"react/jsx-runtime";import{RefreshCw as i}from"lucide-react";function r(r){var a=r.toneColor,l=r.toneIndex,s=r.isDirty,d=r.onToneChange,c=r.onClickRegenerate,g=r.toneLabels,u=void 0===g?["Lenient","Balanced","Aggressive"]:g,f=r.gradientColors,p=void 0===f?["#1D9E75","#BA7517","#E24B4A"]:f,h=r.buttonText,m=void 0===h?"Regenerate":h,b=r.customStyles,y=void 0===b?{}:b,v="linear-gradient(to right, ".concat(p.join(", "),")"),x=Math.max(u.length-1,1),C=l/x*100;return e(o,{children:[n("div",t({style:t({width:"100%",height:8,borderRadius:"999px",background:v,marginBottom:8,position:"relative"},y.track)},{children:n("div",{style:t({position:"absolute",top:"50%",transform:"translate(-50%, -50%)",left:"".concat(C,"%"),width:12,height:12,borderRadius:"50%",background:a,border:"2px solid #fff",boxShadow:"0 0 0 1.5px "+a,transition:"left 0.2s, background 0.2s"},y.thumb)})})),n("input",{type:"range",min:0,max:x,step:1,value:l,onChange:function(t){return d(Number(t.target.value))},style:{width:"100%",cursor:"pointer",marginBottom:4,accentColor:a,opacity:0,marginTop:-20,display:"block",position:"relative",zIndex:1}}),n("div",t({style:t({display:"flex",justifyContent:"space-between",marginBottom:10,marginTop:-4},y.labelsContainer)},{children:u.map(function(e){return n("span",t({style:{fontSize:11,color:"#aaa"}},{children:e}),e)})})),n("div",t({style:t({maxHeight:s?60:0,overflow:"hidden",transition:"max-height 0.25s ease"},y.buttonContainer)},{children:e("button",t({style:t({display:"flex",float:"right",alignItems:"center",justifyContent:"center",gap:6,fontSize:13,fontWeight:500,padding:9,borderRadius:8,border:"none",background:"#2563EB",color:"#fff",cursor:"pointer"},y.button),onClick:c},{children:[n(i,{size:16,color:"#fff"}),m]}))}))]})}export{r as ToneToggle};
1
+ import{__assign as t}from"tslib";import{jsxs as e,Fragment as o,jsx as n}from"react/jsx-runtime";import{RefreshCw as i}from"lucide-react";function r(r){var a=r.toneColor,l=r.toneIndex,s=r.isDirty,d=r.onToneChange,c=r.onClickRegenerate,g=r.toneLabels,u=void 0===g?["Lenient","Balanced","Aggressive"]:g,p=r.gradientColors,f=void 0===p?["#1D9E75","#BA7517","#E24B4A"]:p,m=r.buttonText,h=void 0===m?"Regenerate":m,b=r.customStyles,y=void 0===b?{}:b,v=r.isStreaming,x=r.aiReason,C="linear-gradient(to right, ".concat(f.join(", "),")"),k=Math.max(u.length-1,1),w=l/k*100,A=Boolean(v||(null==x?void 0:x.resolving));return e(o,{children:[n("div",t({style:t({width:"100%",height:8,borderRadius:"999px",background:C,marginBottom:8,position:"relative"},y.track)},{children:n("div",{style:t({position:"absolute",top:"50%",transform:"translate(-50%, -50%)",left:"".concat(w,"%"),width:12,height:12,borderRadius:"50%",border:"2px solid #fff",boxShadow:"0 0 0 1.5px "+a,transition:"left 0.2s, background 0.2s",cursor:A?"not-allowed":"pointer",opacity:A?.7:1,background:A?"#9CA3AF":a},y.thumb)})})),n("input",{type:"range",min:0,max:k,step:1,value:l,onChange:function(t){return d(Number(t.target.value))},style:{width:"100%",cursor:"pointer",marginBottom:4,accentColor:a,opacity:0,marginTop:-20,display:"block",position:"relative",zIndex:1}}),n("div",t({style:t({display:"flex",justifyContent:"space-between",marginBottom:10,marginTop:-4},y.labelsContainer)},{children:u.map(function(e){return n("span",t({style:{fontSize:11,color:"#aaa"}},{children:e}),e)})})),n("div",t({style:t({maxHeight:s?60:0,overflow:"hidden",transition:"max-height 0.25s ease"},y.buttonContainer)},{children:e("button",t({disabled:A,style:t({display:"flex",float:"right",alignItems:"center",justifyContent:"center",gap:6,fontSize:13,fontWeight:500,padding:9,borderRadius:8,border:"none",color:"#fff",cursor:A?"not-allowed":"pointer",opacity:A?.7:1,background:A?"#9CA3AF":a},y.button),onClick:c},{children:[n(i,{size:16,color:"#fff"}),h]}))}))]})}export{r as ToneToggle};
2
2
  //# sourceMappingURL=ToneToggle.js.map
@@ -1,2 +1,2 @@
1
- import{__rest as i,__assign as t,__spreadArray as o}from"tslib";import{jsx as n,Fragment as e,jsxs as a}from"react/jsx-runtime";import{useRef as l,useMemo as c,Suspense as d}from"react";import r from"react-markdown";import s from"rehype-raw";import{ChevronDown as u,ChevronUp as m,Maximize2 as v,X as p,Info as h}from"lucide-react";import{Tooltip as f}from"@mui/material";import _ from"./AiReasonMarkdownWrapper.module.css.js";import g from"../../shared/ExpandableOl.js";import C from"../citations/web-citation/WebCitationWithImageRenderer.js";import b from"../citations/web-citation/WebCitationRenderer.js";import y from"../citations/image-citation/ImageCitationRenderer.js";import I from"../citations/file-citation/FileCitationRender.js";import{useRequirementAI as k}from"../RequirementAIWrapper/RequirementAIWrapper.js";import S from"../citations/stormee-citation/StormeeCitationRenderer.js";import w from"../citations/audio-citation/WaveformCitationRenderer.js";import M from"../citations/appmod-citation/AppmodCitationRenderer.js";import R from"../citations/rca-citation/RCACitationRenderer.js";import N from"../citations/readfile-citation/ReadFileCitationRenderer.js";import j from"../citations/chat-citation/ChatCitationRenderer.js";import{NonWebReasoningComponent as x}from"@e-llm-studio/citation";import P from"../citations/big-enough/BigEnoughCitationRenderer.js";var W=["appmode_citation","appmode_citations","appmod_citation","appmod_citations","image_citation","image_citations","audio_citation","audio_citations","document_citation","document_citations","rca_citation","rca_citations","web_citation","web_citations","code_generated","chat_citation","readfile_citation","readfile_citations","gpt_citation","gpt_citations","big_enough_block"],L=function(i,n,e){return o([],i.map(function(i,o){var a=o>=n&&o<=e;return t(t({},i),{highlighted_text:a?i.message:""})}),!0)},F=function(o){var F=o.label,A=o.message,E=o.isExpandableOrderedListEnabled,T=o.customStyles,D=o.citationStyles,q=o.customIcons,O=o.onSelectProceed,z=o.isDisableProceedButton,B=o.big_enough_block,G=l(null),H=k(),U=H.citations,$=H.citationConfig,J=H.chatHistory,K=H.chatCitationConfigs,Q=H.gptCitationConfigs,V=c(function(){return{h1:function(o){o.node;var e=i(o,["node"]);return n("h1",t({className:_.h1,style:null==T?void 0:T.h1},{children:null==e?void 0:e.children}))},h2:function(o){o.node;var e=i(o,["node"]);return n("h2",t({className:_.h2,style:null==T?void 0:T.h2},{children:null==e?void 0:e.children}))},h3:function(o){o.node;var e=i(o,["node"]);return n("h2",t({className:_.h3,style:null==T?void 0:T.h3},{children:null==e?void 0:e.children}))},b:function(t){return t.node,i(t,["node"]),n("b",{className:_.bold,style:null==T?void 0:T.b})},p:function(o){o.node;var e=i(o,["node"]);return n("p",t({},e,{className:_.paragraph,style:null==T?void 0:T.p},{children:null==e?void 0:e.children}))},ol:function(o){o.node;var e=i(o,["node"]);return E?n(g,t({label:F,customStyles:null==T?void 0:T.expandOlStyle,onProceed:O,isProceedDisabled:z,aiReasoningCitation:U,citationStyles:D,customIcons:q},{children:null==e?void 0:e.children})):n("ol",t({className:_.orderedList,style:null==T?void 0:T.ol},{children:null==e?void 0:e.children}))},ul:function(o){o.node;var e=i(o,["node"]);return n("ul",t({className:_.unorderedList},{children:null==e?void 0:e.children}))},a:function(o){var l,c,r,s,h,g,k,F,A,E,O,z,G,H,V,X,Y,Z,ii,ti,oi,ni,ei,ai,li,ci;o.inline;var di=o.children;o.node;var ri=i(o,["inline","children","node"]),si="true"===(null==ri?void 0:ri.table),ui="".concat(null==ri?void 0:ri.href),mi=null===(l=ui.split("$"))||void 0===l?void 0:l[0],vi=null===(c=ui.split("$"))||void 0===c?void 0:c[1],pi=("appmode_citation"===mi||"appmode_citations"===mi?(null==U?void 0:U.appmod_citations)||[]:"image_citation"===mi||"image_citations"===mi?(null==U?void 0:U.image_citations)||[]:"audio_citation"===mi||"audio_citations"===mi?(null==U?void 0:U.audio_citations)||[]:"document_citation"===mi||"document_citations"===mi?(null==U?void 0:U.file_citations)||[]:"rca_citation"===mi||"rca_citations"===mi?(null==U?void 0:U.rca_citations)||[]:"web_citation"===mi||"web_citations"===mi?(null==U?void 0:U.web_citations)||[]:"code_generated"===mi?(null==U?void 0:U.code_generated)||[]:"readfile_citation"===mi||"readfile_citations"===mi?(null==U?void 0:U.readfile_citations)||[]:"gpt_citation"===mi||"gpt_citations"===mi?U.gpt_citations||[]:"big_enough_block"===mi&&B||[]).find(function(i){return i.citation_number===decodeURIComponent(vi)}),hi=W.includes(mi);if("big_enough_block"===mi&&pi)return console.log("Rendering big enough block with citation:",D),n(P,{title:di,citation:pi,customStyles:null==D?void 0:D.bigEnoughCitation,customIcons:q});if("chat_citation"===mi){if(!J||0===J.length)return null;var fi=vi.split("-").map(Number),_i=fi[0],gi=fi[1];return _i=_i>0?_i-1:_i,gi=gi<J.length-1?gi+1:gi,n(j,{customIcon:null==q?void 0:q.chatCitationIcon,title:di,chatHistory:L(J,_i,gi),isTable:si,chatCitationProps:null==K?void 0:K.chatCitationProps,onCitationClick:null==K?void 0:K.handleCitationClicked,customStyles:null==D?void 0:D.chatCitation})}if("gpt_citation"===mi&&pi)return n(x,t({item:{text:"",dataSource:null===(s=null===(r=pi.customMetadata)||void 0===r?void 0:r.data_sources)||void 0===s?void 0:s[0],trainingDataTitle:null===(g=null===(h=pi.customMetadata)||void 0===h?void 0:h.training_data_title)||void 0===g?void 0:g[0],paraphrase:null===(F=null===(k=pi.customMetadata)||void 0===k?void 0:k.paraphrase)||void 0===F?void 0:F[0]},headerTitle:(null==Q?void 0:Q.title)||"GPT - Gemini 2.5 Flash",iconsConfig:{ChevronDownIcon:u,ChevronUpIcon:m,MaximizeIcon:v,CloseIcon:p}},null==Q?void 0:Q.gptCitationProps));if("image_citation"===mi&&!pi)return null;if("web_citation"===(null===(A=null==pi?void 0:pi.customMetadata)||void 0===A?void 0:A.type))return(null===(E=pi.customMetadata)||void 0===E?void 0:E.screenshot_url)?n(C,{title:di,citation:pi,customStyles:null==D?void 0:D.webCitation,customIcons:q}):n(b,{label:di,url:null===(O=pi.customMetadata)||void 0===O?void 0:O.link,customStyles:null==D?void 0:D.webCitation,customIcons:q});if("audio_transcript"===(null===(z=null==pi?void 0:pi.customMetadata)||void 0===z?void 0:z.type))return"stormee"===(null==pi?void 0:pi.customMetadata.audio_citation_mode)?n(d,t({fallback:n(e,{})},{children:n(S,{title:"".concat(di),citation:pi,customStyles:null==D?void 0:D.stormeeCitation,customIcons:q})})):n(d,t({fallback:n(e,{})},{children:n(w,{title:"".concat(di),citation:pi,customStyles:null==D?void 0:D.waveformCitation,customIcons:q})}));if("image_citation"===(null==pi?void 0:pi.customMetadata.type))return n(d,t({fallback:n(e,{})},{children:n(y,{title:"".concat(di),citation:pi,customIcons:q,customStyles:null==D?void 0:D.imageCitation})}));if("book_citation_doc"===(null===(G=null==pi?void 0:pi.customMetadata)||void 0===G?void 0:G.type)||"book_citation_pdf"===(null==pi?void 0:pi.customMetadata.type))return n(d,t({fallback:n(e,{})},{children:n(I,{title:"".concat(di),citation:pi,customIcons:q,customStyles:null==D?void 0:D.fileCitation})}));if("app_mod_rag_question"===(null===(H=null==pi?void 0:pi.customMetadata)||void 0===H?void 0:H.type))return n(d,t({fallback:n(e,{})},{children:n(M,{title:"".concat(di),citation:pi,customIcons:q,customStyles:null==D?void 0:D.appModCitation,codeLinkConfig:null===(V=null==$?void 0:$.appMod)||void 0===V?void 0:V.codeLinkConfig,isLoading:null===(X=null==$?void 0:$.appMod)||void 0===X?void 0:X.isLoading})}));if("rca_citation"===(null===(Y=null==pi?void 0:pi.customMetadata)||void 0===Y?void 0:Y.type))return n(d,t({fallback:n(e,{})},{children:n(R,{title:"".concat(di),citation:pi,customIcons:q,customStyles:null==D?void 0:D.rcaCitation})}));if("readfile_citation"===(null===(Z=null==pi?void 0:pi.customMetadata)||void 0===Z?void 0:Z.type))return n(d,t({fallback:n(e,{})},{children:n(N,{title:"".concat(di),citation:pi,customIcons:q,customStyles:null==D?void 0:D.readFileCitation,fileCallback:null===(ii=null==$?void 0:$.readFile)||void 0===ii?void 0:ii.fileCallback,editorConfig:null===(ti=null==$?void 0:$.readFile)||void 0===ti?void 0:ti.editorConfig,customColors:null===(oi=null==$?void 0:$.readFile)||void 0===oi?void 0:oi.customColors})}));if(hi&&!pi){var Ci=null!==(ni=null==q?void 0:q.citationLoadingIcon)&&void 0!==ni?ni:n("span",{className:_.citationSpinner,style:null===(ei=null==D?void 0:D.loadingCitations)||void 0===ei?void 0:ei.citationSpinner});return n(f,t({title:null!==(li=null===(ai=null==D?void 0:D.loadingCitations)||void 0===ai?void 0:ai.tooltipTitle)&&void 0!==li?li:"source ".concat(mi.split("_")[0]," citations"),arrow:!0},{children:a("span",t({className:_.citationSpinnerWrapper,style:null===(ci=null==D?void 0:D.loadingCitations)||void 0===ci?void 0:ci.citationSpinnerWrapper},{children:[di,Ci]}))}))}return n("span",t({},ri,{className:_.paragraph,style:null==T?void 0:T.p},{children:null==ri?void 0:ri.children}))},code:function(o){o.inline;var e=o.children,a=o.className;return o.node,i(o,["inline","children","className","node"]),/language-(\w+)/.exec(a||"")||(null==a?void 0:a.includes("language-"))?n("div",{children:n("code",t({className:_.blockCode},{children:e}))}):n("code",t({className:_.inlineCode,style:null==T?void 0:T.code},{children:e}))},learned:function(i){var o=i.children;return n(e,{children:n(f,t({title:o,placement:"top"},{children:n(h,{size:16,className:_.learnedIcon})}))})}}},[U,E,$,J,B]);return n("div",t({ref:G,className:"w-full"},{children:n(r,t({components:V,rehypePlugins:[s]},{children:A}))}))};export{F as AiReasonMarkdownWrapper,L as formatChatData};
1
+ import{__rest as i,__assign as t,__spreadArray as o}from"tslib";import{jsx as n,Fragment as e,jsxs as a}from"react/jsx-runtime";import{useRef as l,useMemo as c,Suspense as d}from"react";import r from"react-markdown";import s from"rehype-raw";import{ChevronDown as u,ChevronUp as m,Maximize2 as v,X as p,Info as _}from"lucide-react";import{Tooltip as h}from"@mui/material";import f from"./AiReasonMarkdownWrapper.module.css.js";import g from"../../shared/ExpandableOl.js";import C from"../citations/web-citation/WebCitationWithImageRenderer.js";import b from"../citations/web-citation/WebCitationRenderer.js";import y from"../citations/image-citation/ImageCitationRenderer.js";import I from"../citations/file-citation/FileCitationRender.js";import{useRequirementAI as k}from"../RequirementAIWrapper/RequirementAIWrapper.js";import S from"../citations/stormee-citation/StormeeCitationRenderer.js";import M from"../citations/audio-citation/WaveformCitationRenderer.js";import R from"../citations/appmod-citation/AppmodCitationRenderer.js";import w from"../citations/rca-citation/RCACitationRenderer.js";import N from"../citations/readfile-citation/ReadFileCitationRenderer.js";import j from"../citations/chat-citation/ChatCitationRenderer.js";import{NonWebReasoningComponent as x}from"@e-llm-studio/citation";import P from"../citations/big-enough/BigEnoughCitationRenderer.js";import W from"./ScannedCitationRenderer.js";var L=["appmode_citation","appmode_citations","appmod_citation","appmod_citations","image_citation","image_citations","audio_citation","audio_citations","document_citation","document_citations","rca_citation","rca_citations","web_citation","web_citations","code_generated","chat_citation","readfile_citation","readfile_citations","gpt_citation","gpt_citations","big_enough_block","scanned_doc_citation","scanned_doc_citations"],F=function(i,n,e){return o([],i.map(function(i,o){var a=o>=n&&o<=e;return t(t({},i),{highlighted_text:a?i.message:""})}),!0)},A=function(o){var A=o.label,D=o.message,E=o.isExpandableOrderedListEnabled,T=o.customStyles,q=o.citationStyles,O=o.customIcons,z=o.onSelectProceed,B=o.isDisableProceedButton,G=o.big_enough_block,H=l(null),U=k(),$=U.citations,J=U.citationConfig,K=U.chatHistory,Q=U.chatCitationConfigs,V=U.gptCitationConfigs,X=c(function(){return{h1:function(o){o.node;var e=i(o,["node"]);return n("h1",t({className:f.h1,style:null==T?void 0:T.h1},{children:null==e?void 0:e.children}))},h2:function(o){o.node;var e=i(o,["node"]);return n("h2",t({className:f.h2,style:null==T?void 0:T.h2},{children:null==e?void 0:e.children}))},h3:function(o){o.node;var e=i(o,["node"]);return n("h2",t({className:f.h3,style:null==T?void 0:T.h3},{children:null==e?void 0:e.children}))},b:function(t){return t.node,i(t,["node"]),n("b",{className:f.bold,style:null==T?void 0:T.b})},p:function(o){o.node;var e=i(o,["node"]);return n("p",t({},e,{className:f.paragraph,style:null==T?void 0:T.p},{children:null==e?void 0:e.children}))},ol:function(o){o.node;var e=i(o,["node"]);return E?n(g,t({label:A,customStyles:null==T?void 0:T.expandOlStyle,onProceed:z,isProceedDisabled:B,aiReasoningCitation:$,citationStyles:q,customIcons:O},{children:null==e?void 0:e.children})):n("ol",t({className:f.orderedList,style:null==T?void 0:T.ol},{children:null==e?void 0:e.children}))},ul:function(o){o.node;var e=i(o,["node"]);return n("ul",t({className:f.unorderedList},{children:null==e?void 0:e.children}))},a:function(o){var l,c,r,s,_,g,k,A,D,E,z,B,H,U,X,Y,Z,ii,ti,oi,ni,ei,ai,li,ci,di,ri,si;o.inline;var ui=o.children;o.node;var mi=i(o,["inline","children","node"]),vi="true"===(null==mi?void 0:mi.table),pi="".concat(null==mi?void 0:mi.href),_i=null===(l=pi.split("$"))||void 0===l?void 0:l[0],hi=null===(c=pi.split("$"))||void 0===c?void 0:c[1],fi=("appmode_citation"===_i||"appmode_citations"===_i?(null==$?void 0:$.appmod_citations)||[]:"image_citation"===_i||"image_citations"===_i?(null==$?void 0:$.image_citations)||[]:"audio_citation"===_i||"audio_citations"===_i?(null==$?void 0:$.audio_citations)||[]:"document_citation"===_i||"document_citations"===_i?(null==$?void 0:$.file_citations)||[]:"rca_citation"===_i||"rca_citations"===_i?(null==$?void 0:$.rca_citations)||[]:"web_citation"===_i||"web_citations"===_i?(null==$?void 0:$.web_citations)||[]:"code_generated"===_i?(null==$?void 0:$.code_generated)||[]:"readfile_citation"===_i||"readfile_citations"===_i?(null==$?void 0:$.readfile_citations)||[]:"gpt_citation"===_i||"gpt_citations"===_i?(null==$?void 0:$.gpt_citations)||[]:"scanned_doc_citation"===_i||"scanned_doc_citations"===_i?(null==$?void 0:$.scanned_doc_citations)||[]:"big_enough_block"===_i&&G||[]).find(function(i){return i.citation_number===decodeURIComponent(hi)}),gi=L.includes(_i);if("big_enough_block"===_i&&fi)return console.log("Rendering big enough block with citation:",q),n(P,{title:ui,citation:fi,customStyles:null==q?void 0:q.bigEnoughCitation,customIcons:O});if("chat_citation"===_i){if(!K||0===K.length)return null;var Ci=hi.split("-").map(Number),bi=Ci[0],yi=Ci[1];return bi=bi>0?bi-1:bi,yi=yi<K.length-1?yi+1:yi,n(j,{customIcon:null==O?void 0:O.chatCitationIcon,title:ui,chatHistory:F(K,bi,yi),isTable:vi,chatCitationProps:null==Q?void 0:Q.chatCitationProps,onCitationClick:null==Q?void 0:Q.handleCitationClicked,customStyles:null==q?void 0:q.chatCitation})}if("gpt_citation"===_i&&fi)return n(x,t({item:{text:"",dataSource:null===(s=null===(r=fi.customMetadata)||void 0===r?void 0:r.data_sources)||void 0===s?void 0:s[0],trainingDataTitle:null===(g=null===(_=fi.customMetadata)||void 0===_?void 0:_.training_data_title)||void 0===g?void 0:g[0],paraphrase:null===(A=null===(k=fi.customMetadata)||void 0===k?void 0:k.paraphrase)||void 0===A?void 0:A[0]},headerTitle:(null==V?void 0:V.title)||"GPT - Gemini 2.5 Flash",iconsConfig:{ChevronDownIcon:u,ChevronUpIcon:m,MaximizeIcon:v,CloseIcon:p}},null==V?void 0:V.gptCitationProps));if("image_citation"===_i&&!fi)return null;if("web_citation"===(null===(D=null==fi?void 0:fi.customMetadata)||void 0===D?void 0:D.type))return(null===(E=fi.customMetadata)||void 0===E?void 0:E.screenshot_url)?n(C,{title:ui,citation:fi,customStyles:null==q?void 0:q.webCitation,customIcons:O}):n(b,{label:ui,url:null===(z=fi.customMetadata)||void 0===z?void 0:z.link,customStyles:null==q?void 0:q.webCitation,customIcons:O});if("audio_transcript"===(null===(B=null==fi?void 0:fi.customMetadata)||void 0===B?void 0:B.type))return"stormee"===(null==fi?void 0:fi.customMetadata.audio_citation_mode)?n(d,t({fallback:n(e,{})},{children:n(S,{title:"".concat(ui),citation:fi,customStyles:null==q?void 0:q.stormeeCitation,customIcons:O})})):n(d,t({fallback:n(e,{})},{children:n(M,{title:"".concat(ui),citation:fi,customStyles:null==q?void 0:q.waveformCitation,customIcons:O})}));if("scanned_doc_citations"===(null===(H=null==fi?void 0:fi.customMetadata)||void 0===H?void 0:H.type)||"scanned_doc_citation"===(null===(U=null==fi?void 0:fi.customMetadata)||void 0===U?void 0:U.type))return n(d,t({fallback:n(e,{})},{children:n(W,{title:ui,citation:fi,customIcons:O,customStyles:null==q?void 0:q.scannedDocumentCitation})}));if("image_citation"===(null==fi?void 0:fi.customMetadata.type))return n(d,t({fallback:n(e,{})},{children:n(y,{title:"".concat(ui),citation:fi,customIcons:O,customStyles:null==q?void 0:q.imageCitation})}));if("book_citation_doc"===(null===(X=null==fi?void 0:fi.customMetadata)||void 0===X?void 0:X.type)||"book_citation_pdf"===(null==fi?void 0:fi.customMetadata.type))return n(d,t({fallback:n(e,{})},{children:n(I,{title:"".concat(ui),citation:fi,customIcons:O,customStyles:null==q?void 0:q.fileCitation})}));if("app_mod_rag_question"===(null===(Y=null==fi?void 0:fi.customMetadata)||void 0===Y?void 0:Y.type))return n(d,t({fallback:n(e,{})},{children:n(R,{title:"".concat(ui),citation:fi,customIcons:O,customStyles:null==q?void 0:q.appModCitation,codeLinkConfig:null===(Z=null==J?void 0:J.appMod)||void 0===Z?void 0:Z.codeLinkConfig,isLoading:null===(ii=null==J?void 0:J.appMod)||void 0===ii?void 0:ii.isLoading})}));if("rca_citation"===(null===(ti=null==fi?void 0:fi.customMetadata)||void 0===ti?void 0:ti.type))return n(d,t({fallback:n(e,{})},{children:n(w,{title:"".concat(ui),citation:fi,customIcons:O,customStyles:null==q?void 0:q.rcaCitation})}));if("readfile_citation"===(null===(oi=null==fi?void 0:fi.customMetadata)||void 0===oi?void 0:oi.type))return n(d,t({fallback:n(e,{})},{children:n(N,{title:"".concat(ui),citation:fi,customIcons:O,customStyles:null==q?void 0:q.readFileCitation,fileCallback:null===(ni=null==J?void 0:J.readFile)||void 0===ni?void 0:ni.fileCallback,editorConfig:null===(ei=null==J?void 0:J.readFile)||void 0===ei?void 0:ei.editorConfig,customColors:null===(ai=null==J?void 0:J.readFile)||void 0===ai?void 0:ai.customColors})}));if(gi&&!fi){var Ii=null!==(li=null==O?void 0:O.citationLoadingIcon)&&void 0!==li?li:n("span",{className:f.citationSpinner,style:null===(ci=null==q?void 0:q.loadingCitations)||void 0===ci?void 0:ci.citationSpinner});return n(h,t({title:null!==(ri=null===(di=null==q?void 0:q.loadingCitations)||void 0===di?void 0:di.tooltipTitle)&&void 0!==ri?ri:"source ".concat(_i.split("_")[0]," citations"),arrow:!0},{children:a("span",t({className:f.citationSpinnerWrapper,style:null===(si=null==q?void 0:q.loadingCitations)||void 0===si?void 0:si.citationSpinnerWrapper},{children:[ui,Ii]}))}))}return n("span",t({},mi,{className:f.paragraph,style:null==T?void 0:T.p},{children:null==mi?void 0:mi.children}))},code:function(o){o.inline;var e=o.children,a=o.className;return o.node,i(o,["inline","children","className","node"]),/language-(\w+)/.exec(a||"")||(null==a?void 0:a.includes("language-"))?n("div",{children:n("code",t({className:f.blockCode},{children:e}))}):n("code",t({className:f.inlineCode,style:null==T?void 0:T.code},{children:e}))},learned:function(i){var o=i.children;return n(e,{children:n(h,t({title:o,placement:"top"},{children:n(_,{size:16,className:f.learnedIcon})}))})}}},[$,E,J,K,G]);return n("div",t({ref:H,className:"w-full"},{children:n(r,t({components:X,rehypePlugins:[s]},{children:D}))}))};export{A as AiReasonMarkdownWrapper,F as formatChatData};
2
2
  //# sourceMappingURL=AiReasonMarkdownWrapper.js.map
@@ -1,2 +1,2 @@
1
- import{__assign as i}from"tslib";import{jsx as n}from"react/jsx-runtime";import t from"./AiReasoningCitationContent.js";import e from"../../icons/CognitiveDecision.js";import o from"../../../CitationRenderer/CitationRenderer.js";var r=function(){return n("svg",i({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",style:{verticalAlign:"bottom",marginLeft:"1px"}},{children:n("polyline",{points:"18 15 12 9 6 15"})}))},l=function(){return n("svg",i({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",style:{verticalAlign:"bottom",marginLeft:"1px"}},{children:n("polyline",{points:"6 9 12 15 18 9"})}))},a=75,c=function(a){var c=a.isSourceHasHighlight,s=a.aiReason,d=a.citationTitle,p=void 0===d?"":d,f=a.customStyles,m=a.customIcons,g=a.onSelectProceed,u=a.isDisableProceedButton,h=(s.relevance_score>=75?null==m?void 0:m.highConfidence:null==m?void 0:m.lowConfidence)||n(e,{});return n("span",{children:n(o,{inLineCitation:!0,citationId:"ai-reasoning-".concat(s.id),citationTitle:p,citationIcon:h,defaultExpanded:(null==s?void 0:s.isOpen)||c||!1,citationComponent:n(t,{aiReason:s,customStyles:f,customIcons:m,onSelectProceed:g,isDisableProceedButton:u}),chevronDownComponent:n(l,{}),chevronUpComponent:n(r,{}),styles:{pillButton:i({margin:"0px",padding:"4px 8px",fontSize:"15px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"flex-end",background:"#ffffffff",fontWeight:"700",gap:"1.5px",border:"none"},null==f?void 0:f.aiReasoningPill),citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})})};export{a as SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING,c as default};
1
+ import{__assign as i}from"tslib";import{jsx as n}from"react/jsx-runtime";import e from"./AiReasoningCitationContent.js";import t from"../../icons/CognitiveDecision.js";import o from"../../../CitationRenderer/CitationRenderer.js";var r=function(){return n("svg",i({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",style:{verticalAlign:"bottom",marginLeft:"1px"}},{children:n("polyline",{points:"18 15 12 9 6 15"})}))},l=function(){return n("svg",i({width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"#4B5563",strokeWidth:"2.5",style:{verticalAlign:"bottom",marginLeft:"1px"}},{children:n("polyline",{points:"6 9 12 15 18 9"})}))},a=75,c=function(a){var c=a.isSourceHasHighlight,s=a.aiReason,d=a.citationTitle,p=void 0===d?"":d,f=a.customStyles,m=a.customIcons,g=a.onSelectProceed,u=a.isDisableProceedButton,h=a.inlineLabel,v=a.isInlineCitation,x=(s.relevance_score>=75?null==m?void 0:m.highConfidence:null==m?void 0:m.lowConfidence)||n(t,{});return n("span",{children:n(o,{inLineCitation:!0,citationId:"ai-reasoning-".concat(s.id),citationTitle:v?h||"":p||"",citationIcon:v?null:x,defaultExpanded:(null==s?void 0:s.isOpen)||c||!1,citationComponent:n(e,{aiReason:s,customStyles:f,customIcons:m,onSelectProceed:g,isDisableProceedButton:u}),chevronDownComponent:n(l,{}),chevronUpComponent:n(r,{}),styles:{pillButton:i({margin:"0px",padding:"4px 8px",fontSize:"15px",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:v?"center":"flex-end",background:"#ffffffff",fontWeight:"700",gap:"1.5px",border:"none"},null==f?void 0:f.aiReasoningPill),citationContent:{width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"}}})})};export{a as SHOW_CONFIDENCE_SCORE_THRESHOLD_IN_AI_REASONING,c as default};
2
2
  //# sourceMappingURL=AiReasoningCitation.js.map
@@ -0,0 +1,2 @@
1
+ import{__assign as t}from"tslib";import{jsx as n}from"react/jsx-runtime";import{ScannedDocCitation as i}from"@e-llm-studio/citation";import o from"../../../RequirementAiCitations/AiReasoning/components/icons/DocumentCitationIcon.js";import e from"../../../CitationRenderer/CitationRenderer.js";var r=function(r){var a,c=r.title,l=r.citation,m=r.customIcons,s=r.customStyles,u=l.customMetadata,d=null!==(a=null==m?void 0:m.ScannedDocumentIcon)&&void 0!==a?a:n(o,{});return n(e,{inLineCitation:!0,citationTitle:c,citationId:"scanned-doc-".concat(l.citation_number),citationComponent:n(i,{pages:null==u?void 0:u.value,subHeadingText:null==u?void 0:u.artifact_title,height:"400px"}),chevronDownComponent:d,chevronUpComponent:d,styles:{pillButton:t({fontSize:"14px",margin:"0px",background:"#ffffff",color:"#526eff",cursor:"pointer",verticalAlign:"middle",whiteSpace:"nowrap",display:"inline-flex",alignItems:"center",border:"none"},null==s?void 0:s.pill),citationContent:t({width:"100%",background:"transparent",minHeight:"10px",height:"fit-content"},null==s?void 0:s.content)}})};export{r as default};
2
+ //# sourceMappingURL=ScannedCitationRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ScannedCitationRenderer.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
@@ -1,2 +1,2 @@
1
- import{__assign as e,__awaiter as n,__generator as t}from"tslib";import{jsxs as o,jsx as a}from"react/jsx-runtime";import r,{useContext as i,useMemo as s}from"react";import{Loader2 as l,ChevronDown as c}from"lucide-react";import{cn as m}from"../../../UserStoryImport/lib/cn.js";import u from"./segment.module.css.js";import d from"./ExampleComponentWrapper.js";import p from"../ai-reasoning/AiReasoningCitationContent.js";import g from"./SegmentLoader.js";import"./segment-common.css.js";import{MarkdownStateContext as v}from"../../store/markdown-context.js";var f=function(f){var y=f.id,h=void 0===y?"Segment":y,S=f.label,C=f.segmentUUID,b=f.originalValue;f.decisionStrength;var x=f.aiReason,j=f.customStyles,E=f.customIcons,I=f.aiReasoningCitationCustomStyles,N=f.segmentExampleComponent,w=f.handleViewGlossary,R=f.isUpdatedSegment,U=f.onOpen,k=i(v),V=k.citationsMetadata,L=k.updateCitationsMetadata;console.log("citation metadata ",V);var W=r.useState(!1),G=W[0],M=W[1],z=s(function(){return V.get(C)},[V,C]),A=s(function(){return(null==z?void 0:z.open)||!1},[z]),B=s(function(){return z&&"loading"===z.state},[z]);return o("div",e({className:"".concat(u.segmentWrapper),style:e({},null==j?void 0:j.segmentWrapper)},{children:[o("div",e({className:"segment-".concat(h,"-container segmentContainer ").concat(R?"updatedSegmentContainer":""),style:e({},null==j?void 0:j.container)},{children:[a("span",e({className:"segment-".concat(h," segmentLabel ").concat(R?"updatedSegmentLabel":""),style:e({},null==j?void 0:j.label)},{children:R?b:S})),a("button",e({className:"".concat(u.segmentExplanationButtonContainer),style:e({},null==j?void 0:j.buttonContainer),onClick:function(){return n(void 0,void 0,void 0,function(){var n;return t(this,function(t){switch(t.label){case 0:if(n=!A,M(!1),console.log("citation metadata::",n,x),!n||(null==x?void 0:x.reason))return[3,5];L(C,function(t){if(t){var o=e({},t);return o.state="loading",o}return{open:n,state:"loading"}}),t.label=1;case 1:return t.trys.push([1,,3,4]),console.log("citation metadata:: onopen"),[4,null==U?void 0:U()];case 2:return t.sent(),[3,4];case 3:return L(C,function(t){if(t){var o=e({},t);return o.state="ready",o.open=n,o}return{open:n,state:"ready"}}),[7];case 4:return[3,6];case 5:console.log("citation metadata:: else block"),L(C,function(t){if(t){var o=e({},t);return o.open=n,o}return{open:n,state:B?"loading":"ready"}}),t.label=6;case 6:return[2]}})})}},{children:B?a(l,{size:16,className:u.spinner}):a(c,{className:m(R&&u.updatedChevronIcon,u.cheveronIcon,A&&u.cheveronIconRotated),style:e({},null==j?void 0:j.cheveronIcon)})}))]})),G&&!R?a(d,{label:null!=S?S:"",segmentExampleComponent:N,customStyles:null==j?void 0:j.segmentExample,handleCancelExample:function(){M(!1)}}):A&&(B?a(g,{customStyles:null==j?void 0:j.loadingSkeleton}):a(p,{aiReason:x,customStyles:I,customIcons:E,isSegmentExplanation:!0,handleViewGlossary:w?function(){L(C,function(n){if(n){var t=e({},n);return t.open=!1,t}return{open:!1,state:B?"loading":"ready"}}),null==w||w(h)}:void 0,handleViewExample:N?function(){M(!0)}:void 0,isUpdatedSegment:R}))]}))};export{f as default};
1
+ import{__assign as e,__awaiter as n,__generator as t}from"tslib";import{jsxs as o,jsx as a}from"react/jsx-runtime";import i,{useContext as r,useMemo as l}from"react";import{Loader2 as s,ChevronDown as c}from"lucide-react";import{cn as m}from"../../../UserStoryImport/lib/cn.js";import d from"./segment.module.css.js";import u from"./ExampleComponentWrapper.js";import p from"../ai-reasoning/AiReasoningCitationContent.js";import g from"./SegmentLoader.js";import"./segment-common.css.js";import{MarkdownStateContext as v}from"../../store/markdown-context.js";var f=function(f){var h=f.id,y=void 0===h?"Segment":h,S=f.label,C=f.children,x=f.segmentUUID;f.decisionStrength;var b=f.aiReason,j=f.customStyles,E=f.customIcons,I=f.aiReasoningCitationCustomStyles,N=f.segmentExampleComponent,w=f.handleViewGlossary,R=f.isUpdatedSegment,U=f.onOpen,k=r(v),L=k.citationsMetadata,V=k.updateCitationsMetadata;console.log("citation metadata ",L);var W=i.useState(!1),A=W[0],G=W[1],M=l(function(){return L.get(x)},[L,x]),P=l(function(){return(null==M?void 0:M.open)||!1},[M]),z=l(function(){return M&&"loading"===M.state},[M]);return o("div",e({className:"".concat(d.segmentWrapper),style:e(e({},null==j?void 0:j.segmentWrapper),{display:"inline-flex",verticalAlign:"middle"})},{children:[o("div",e({className:"segment-".concat(y,"-container segmentContainer ").concat(R?"updatedSegmentContainer":""),style:e({},null==j?void 0:j.container)},{children:[a("span",e({className:"segment-".concat(y," segmentLabel ").concat(R?"updatedSegmentLabel":""),style:e({},null==j?void 0:j.label)},{children:R?C:S})),a("button",e({className:"".concat(d.segmentExplanationButtonContainer),style:e({},null==j?void 0:j.buttonContainer),onClick:function(){return n(void 0,void 0,void 0,function(){var n;return t(this,function(t){switch(t.label){case 0:if(n=!P,G(!1),console.log("citation metadata::",n,b),!n||(null==b?void 0:b.reason))return[3,5];V(x,function(t){if(t){var o=e({},t);return o.state="loading",o}return{open:n,state:"loading"}}),t.label=1;case 1:return t.trys.push([1,,3,4]),console.log("citation metadata:: onopen"),[4,null==U?void 0:U()];case 2:return t.sent(),[3,4];case 3:return V(x,function(t){if(t){var o=e({},t);return o.state="ready",o.open=n,o}return{open:n,state:"ready"}}),[7];case 4:return[3,6];case 5:console.log("citation metadata:: else block"),V(x,function(t){if(t){var o=e({},t);return o.open=n,o}return{open:n,state:z?"loading":"ready"}}),t.label=6;case 6:return[2]}})})}},{children:z?a(s,{size:16,className:d.spinner}):a(c,{className:m(R&&d.updatedChevronIcon,d.cheveronIcon,P&&d.cheveronIconRotated),style:e({},null==j?void 0:j.cheveronIcon)})}))]})),A&&!R?a("div",e({className:d.explanationPanel},{children:a(u,{label:null!=S?S:"",segmentExampleComponent:N,customStyles:null==j?void 0:j.segmentExample,handleCancelExample:function(){G(!1)}})})):P&&(z?a(g,{customStyles:null==j?void 0:j.loadingSkeleton}):a("div",e({className:d.explanationPanel},{children:a(p,{aiReason:b,customStyles:I,customIcons:E,isSegmentExplanation:!0,handleViewGlossary:w?function(){V(x,function(n){if(n){var t=e({},n);return t.open=!1,t}return{open:!1,state:z?"loading":"ready"}}),null==w||w(y)}:void 0,handleViewExample:N?function(){G(!0)}:void 0,isUpdatedSegment:R})})))]}))};export{f as default};
2
2
  //# sourceMappingURL=Segment.js.map
@@ -1,2 +1,2 @@
1
- import{__awaiter as e,__generator as n}from"tslib";import{jsx as t}from"react/jsx-runtime";import o from"./Segment.js";import l from"dompurify";var i=function(i){var d,a,s,r,u,m,v,g,c,p,S,h,f,b=i.id,x=i.children,y=i.props,C=i.segmentComponentConfig,_=i.customStyles,I=i.customIcons,U=i.extractText,D=i.isUpdatedSegment,w=void 0!==D&&D,E=(null==y?void 0:y.id)||"Segment",F=(null==y?void 0:y.decisionstrength)||"80",L=C||{},k=L.segmentDataList,R=L.getSegmentExampleComponent,V=L.handleViewGlossary,j=L.upadatedSegmentDataList,G=L.handleFetchUpdatedSegmentDetails,O=L.handleFetchSegmentDetails,T=w?null==j?void 0:j.find(function(e){return String(e.segment_id)===String(E)}):null==k?void 0:k.find(function(e){return String(e.segment_id)===String(E)});console.log("meee work",T,w,k,j);var W={id:E,reason:null!==(d=null==T?void 0:T.reason)&&void 0!==d?d:"",gap:null!==(a=null==T?void 0:T.gap)&&void 0!==a?a:"",explanation:null!==(s=null==T?void 0:T.explanation)&&void 0!==s?s:"",relevance_score:null!==(r=null==T?void 0:T.relevance_score)&&void 0!==r?r:0,isOpen:!1},z=void 0,H=U(x),M=y["data-table"],q="";if(M&&!w)try{q=decodeURIComponent(atob(M))}catch(e){console.error("Failed to decode data-table for segment",E,e)}var A=l.sanitize(q);return T||!O||w||null==O||O(E),E&&T&&R&&!w&&(z=M?t(function(){return t("div",{dangerouslySetInnerHTML:{__html:A}})},{}):R(E,H,T.segment_type)),t(o,{id:E,segmentUUID:b,label:null!==(u=null==T?void 0:T.label)&&void 0!==u?u:null==T?void 0:T.segment_name,originalValue:H,decisionStrength:F,aiReason:W,customIcons:I,aiReasoningCitationCustomStyles:_,segmentExampleComponent:z,handleViewGlossary:V,customStyles:{segmentWrapper:null===(m=null==_?void 0:_.segment)||void 0===m?void 0:m.segmentWrapper,container:null===(v=null==_?void 0:_.segment)||void 0===v?void 0:v.container,label:null===(g=null==_?void 0:_.segment)||void 0===g?void 0:g.label,decisionStrength:null===(c=null==_?void 0:_.segment)||void 0===c?void 0:c.decisionStrength,buttonContainer:null===(p=null==_?void 0:_.segment)||void 0===p?void 0:p.buttonContainer,cheveronIcon:null===(S=null==_?void 0:_.segment)||void 0===S?void 0:S.cheveronIcon,segmentExample:null===(h=null==_?void 0:_.segment)||void 0===h?void 0:h.segmentExample,loadingSkeleton:null===(f=null==_?void 0:_.segment)||void 0===f?void 0:f.SegmentLoadingSkeletonStyles},isUpdatedSegment:w,onOpen:function(){return e(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return T||!w?[3,2]:(console.log("citation metadata:: handleFetchUpdatedSegmentDetails"),[4,null==G?void 0:G(E)]);case 1:e.sent(),e.label=2;case 2:return[2]}})})}},E)};export{i as default};
1
+ import{__assign as e,__awaiter as n,__generator as t}from"tslib";import{jsx as o}from"react/jsx-runtime";import l from"./Segment.js";import i from"dompurify";var d=function(d){var a,s,r,u,m,v,g,c,p,S,h,f,b,x=d.id,y=d.children,C=d.props,_=d.segmentComponentConfig,I=d.customStyles,U=d.customIcons,D=d.extractText,w=d.isUpdatedSegment,E=void 0!==w&&w,F=(null==C?void 0:C.id)||"Segment",L=(null==C?void 0:C.decisionstrength)||"80",k=_||{},R=k.segmentDataList,j=k.getSegmentExampleComponent,G=k.handleViewGlossary,O=k.upadatedSegmentDataList,T=k.handleFetchUpdatedSegmentDetails,V=k.handleFetchSegmentDetails,W=E?null==O?void 0:O.find(function(e){return String(e.segment_id)===String(F)}):null==R?void 0:R.find(function(e){return String(e.segment_id)===String(F)});console.log("meee work",W,E,R,O);var z={id:F,reason:null!==(a=null==W?void 0:W.reason)&&void 0!==a?a:"",gap:null!==(s=null==W?void 0:W.gap)&&void 0!==s?s:"",explanation:null!==(r=null==W?void 0:W.explanation)&&void 0!==r?r:"",relevance_score:null!==(u=null==W?void 0:W.relevance_score)&&void 0!==u?u:0,isOpen:!1},H=void 0,M=D(y),q=C["data-table"],A="";if(q&&!E)try{A=decodeURIComponent(atob(q))}catch(e){console.error("Failed to decode data-table for segment",F,e)}var B=i.sanitize(A);return W||!V||E||null==V||V(F),F&&W&&j&&!E&&(H=q?o(function(){return o("div",{dangerouslySetInnerHTML:{__html:B}})},{}):j(F,M,W.segment_type)),o(l,e({id:F,segmentUUID:x,label:null!==(m=null==W?void 0:W.label)&&void 0!==m?m:null==W?void 0:W.segment_name,decisionStrength:L,aiReason:z,customIcons:U,aiReasoningCitationCustomStyles:I,segmentExampleComponent:H,handleViewGlossary:G,customStyles:{segmentWrapper:null===(v=null==I?void 0:I.segment)||void 0===v?void 0:v.segmentWrapper,container:null===(g=null==I?void 0:I.segment)||void 0===g?void 0:g.container,label:null===(c=null==I?void 0:I.segment)||void 0===c?void 0:c.label,decisionStrength:null===(p=null==I?void 0:I.segment)||void 0===p?void 0:p.decisionStrength,buttonContainer:null===(S=null==I?void 0:I.segment)||void 0===S?void 0:S.buttonContainer,cheveronIcon:null===(h=null==I?void 0:I.segment)||void 0===h?void 0:h.cheveronIcon,segmentExample:null===(f=null==I?void 0:I.segment)||void 0===f?void 0:f.segmentExample,loadingSkeleton:null===(b=null==I?void 0:I.segment)||void 0===b?void 0:b.SegmentLoadingSkeletonStyles},isUpdatedSegment:E,onOpen:function(){return n(void 0,void 0,void 0,function(){return t(this,function(e){switch(e.label){case 0:return W||!E?[3,2]:(console.log("citation metadata:: handleFetchUpdatedSegmentDetails"),[4,null==T?void 0:T(F)]);case 1:e.sent(),e.label=2;case 2:return[2]}})})}},{children:y}),F)};export{d as default};
2
2
  //# sourceMappingURL=SegmentWrapper.js.map
@@ -1,2 +1,2 @@
1
- var e={segmentWrapper:"segment-module_segmentWrapper__PVOuq",segmentButtonContainer:"segment-module_segmentButtonContainer__X76sx",cheveronIcon:"segment-module_cheveronIcon__1njFy",updatedChevronIcon:"segment-module_updatedChevronIcon__8vN-t",cheveronIconRotated:"segment-module_cheveronIconRotated__qDYj7",exampleWrapper:"segment-module_exampleWrapper__ptZzj",uppercase:"segment-module_uppercase__hjgxG",exampleContainer:"segment-module_exampleContainer__9tMXx",exampleHeader:"segment-module_exampleHeader__9P11O",loaderWrapper:"segment-module_loaderWrapper__SwIof",loaderContainer:"segment-module_loaderContainer__5Mhyz",loaderHeader:"segment-module_loaderHeader__J2JnY",skeleton:"segment-module_skeleton__2uZEf",pulse:"segment-module_pulse__A17cR",title:"segment-module_title__fW93U",icon:"segment-module_icon__Dvee3",lineFull:"segment-module_lineFull__MMmOD",line90:"segment-module_line90__OFStl",line75:"segment-module_line75__9r6Xp",line60:"segment-module_line60__bLRec",exampleHeaderText:"segment-module_exampleHeaderText__MWMG0",cancelButton:"segment-module_cancelButton__-F5aZ",spinner:"segment-module_spinner__kRnWD",spin:"segment-module_spin__MV6y5"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const n=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;n&&e.setAttribute("nonce",n),e.appendChild(document.createTextNode(".segment-module_segmentWrapper__PVOuq{display:flex;flex-direction:column;gap:8px}.segment-module_segmentButtonContainer__X76sx{background-color:initial;border:none;cursor:pointer;padding:0}.segment-module_cheveronIcon__1njFy{color:#3b82f6;height:16px;transition:all .2s ease-in-out;width:16px}.segment-module_updatedChevronIcon__8vN-t{color:#16a34a}.segment-module_cheveronIconRotated__qDYj7{transform:rotate(180deg)}.segment-module_exampleWrapper__ptZzj{align-items:flex-start;display:flex;flex-direction:column;gap:12px}.segment-module_uppercase__hjgxG{text-transform:uppercase}.segment-module_exampleContainer__9tMXx{align-items:flex-start;border:2px dashed #e2e8f0;border-radius:8px;display:flex;flex-direction:column;gap:8px;padding:16px;width:100%}.segment-module_exampleHeader__9P11O{align-items:center;align-self:stretch;display:flex;justify-content:space-between}.segment-module_loaderContainer__5Mhyz,.segment-module_loaderWrapper__SwIof{border:1px solid #e5e7eb;border-radius:8px;padding:12px}.segment-module_loaderHeader__J2JnY{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.segment-module_skeleton__2uZEf{animation:segment-module_pulse__A17cR 1.5s ease-in-out infinite;background:#e5e7eb;border-radius:6px}.segment-module_title__fW93U{height:18px;width:100px}.segment-module_icon__Dvee3{height:18px;width:18px}.segment-module_lineFull__MMmOD{height:14px;margin-bottom:10px;width:100%}.segment-module_line90__OFStl{height:14px;margin-bottom:10px;width:90%}.segment-module_line75__9r6Xp{height:14px;margin-bottom:10px;width:75%}.segment-module_line60__bLRec{height:14px;width:60%}@keyframes segment-module_pulse__A17cR{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.segment-module_exampleHeaderText__MWMG0{color:#334155;font-size:14px;font-weight:600;line-height:21px;margin:0}.segment-module_cancelButton__-F5aZ{align-items:center;align-self:stretch;background-color:initial;border:none;color:#334155;cursor:pointer;display:flex;height:fit-content;justify-content:space-between;padding:4px;transition:all .2s ease-in-out}.segment-module_cancelButton__-F5aZ:hover{background-color:#eff6ff}.segment-module_spinner__kRnWD{animation:segment-module_spin__MV6y5 1s linear infinite}@keyframes segment-module_spin__MV6y5{to{transform:rotate(1turn)}}"));const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement;t&&t.appendChild(e)}();export{e as default};
1
+ var e={segmentWrapper:"segment-module_segmentWrapper__PVOuq",segmentButtonContainer:"segment-module_segmentButtonContainer__X76sx",cheveronIcon:"segment-module_cheveronIcon__1njFy",updatedChevronIcon:"segment-module_updatedChevronIcon__8vN-t",cheveronIconRotated:"segment-module_cheveronIconRotated__qDYj7",segmentPopup:"segment-module_segmentPopup__YcHor",explanationPanel:"segment-module_explanationPanel__7YlpU",exampleWrapper:"segment-module_exampleWrapper__ptZzj",uppercase:"segment-module_uppercase__hjgxG",exampleContainer:"segment-module_exampleContainer__9tMXx",exampleHeader:"segment-module_exampleHeader__9P11O",loaderWrapper:"segment-module_loaderWrapper__SwIof",loaderContainer:"segment-module_loaderContainer__5Mhyz",loaderHeader:"segment-module_loaderHeader__J2JnY",skeleton:"segment-module_skeleton__2uZEf",pulse:"segment-module_pulse__A17cR",title:"segment-module_title__fW93U",icon:"segment-module_icon__Dvee3",lineFull:"segment-module_lineFull__MMmOD",line90:"segment-module_line90__OFStl",line75:"segment-module_line75__9r6Xp",line60:"segment-module_line60__bLRec",exampleHeaderText:"segment-module_exampleHeaderText__MWMG0",cancelButton:"segment-module_cancelButton__-F5aZ",spinner:"segment-module_spinner__kRnWD",spin:"segment-module_spin__MV6y5"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const n=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;n&&e.setAttribute("nonce",n),e.appendChild(document.createTextNode(".segment-module_segmentWrapper__PVOuq{display:inline-flex;gap:8px;position:relative;vertical-align:middle}.segment-module_segmentButtonContainer__X76sx{background-color:initial;border:none;cursor:pointer;padding:0}.segment-module_cheveronIcon__1njFy{color:#3b82f6;height:16px;transition:all .2s ease-in-out;width:16px}.segment-module_updatedChevronIcon__8vN-t{color:#16a34a}.segment-module_cheveronIconRotated__qDYj7{transform:rotate(180deg)}.segment-module_segmentPopup__YcHor{left:0;min-width:500px;position:absolute;top:calc(100% + 8px);z-index:1000}.segment-module_explanationPanel__7YlpU{background:#fff;left:0;position:absolute;top:100%;width:600px;z-index:100}.segment-module_exampleWrapper__ptZzj{align-items:flex-start;display:flex;flex-direction:column;gap:12px}.segment-module_uppercase__hjgxG{text-transform:uppercase}.segment-module_exampleContainer__9tMXx{align-items:flex-start;border:2px dashed #e2e8f0;border-radius:8px;display:flex;flex-direction:column;gap:8px;padding:16px;width:100%}.segment-module_exampleHeader__9P11O{align-items:center;align-self:stretch;display:flex;justify-content:space-between}.segment-module_loaderContainer__5Mhyz,.segment-module_loaderWrapper__SwIof{border:1px solid #e5e7eb;border-radius:8px;padding:12px}.segment-module_loaderHeader__J2JnY{align-items:center;display:flex;justify-content:space-between;margin-bottom:16px}.segment-module_skeleton__2uZEf{animation:segment-module_pulse__A17cR 1.5s ease-in-out infinite;background:#e5e7eb;border-radius:6px}.segment-module_title__fW93U{height:18px;width:100px}.segment-module_icon__Dvee3{height:18px;width:18px}.segment-module_lineFull__MMmOD{height:14px;margin-bottom:10px;width:100%}.segment-module_line90__OFStl{height:14px;margin-bottom:10px;width:90%}.segment-module_line75__9r6Xp{height:14px;margin-bottom:10px;width:75%}.segment-module_line60__bLRec{height:14px;width:60%}@keyframes segment-module_pulse__A17cR{0%{opacity:1}50%{opacity:.5}to{opacity:1}}.segment-module_exampleHeaderText__MWMG0{color:#334155;font-size:14px;font-weight:600;line-height:21px;margin:0}.segment-module_cancelButton__-F5aZ{align-items:center;align-self:stretch;background-color:initial;border:none;color:#334155;cursor:pointer;display:flex;height:fit-content;justify-content:space-between;padding:4px;transition:all .2s ease-in-out}.segment-module_cancelButton__-F5aZ:hover{background-color:#eff6ff}.segment-module_spinner__kRnWD{animation:segment-module_spin__MV6y5 1s linear infinite}@keyframes segment-module_spin__MV6y5{to{transform:rotate(1turn)}}"));const t=document.head||document.getElementsByTagName("head")[0]||document.documentElement;t&&t.appendChild(e)}();export{e as default};
2
2
  //# sourceMappingURL=segment.module.css.js.map