@e-llm-studio/requirement-ai 0.0.212 → 0.0.213
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js +2 -0
- package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js.map +1 -0
- package/dist/cjs/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/features/RequirementAI/components/RichTextEditor/RichTextEditor.js +1 -1
- package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js +2 -0
- package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js.map +1 -0
- package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js +2 -0
- package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js.map +1 -0
- package/dist/features/RequirementAI/components/UserStoryCard/UserStoryCard.js +1 -1
- package/dist/features/RequirementAI/store/ref.context.js +1 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts +8 -1
- package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map +1 -1
- package/dist/types/src/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.d.ts +8 -0
- package/dist/types/src/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.d.ts.map +1 -0
- package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("./Editor/constants/editorConfig.js"),o=require("./Editor/Editor.js"),i=require("../../store/ref.context.js"),a=require("@lexical/html"),u=require("turndown"),c=require("turndown-plugin-gfm");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=new(l(u).default)({headingStyle:"atx",codeBlockStyle:"fenced"});d.keep(["ins","del","mark"]),d.keep(function(e){var t,r;return"A"===e.nodeName&&null!==(r=null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("ai_reasoning$"))&&void 0!==r&&r}),d.keep(function(e){return"SPAN"===e.nodeName&&e.hasAttribute("highlight-id")}),d.addRule("md-table-passthrough",{filter:function(e){return"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table")},replacement:function(e,t){return t.textContent||""}}),d.use(c.tables);
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),r=require("react"),n=require("./Editor/constants/editorConfig.js"),o=require("./Editor/Editor.js"),i=require("../../store/ref.context.js"),a=require("@lexical/html"),u=require("turndown"),c=require("turndown-plugin-gfm"),s=require("../UnsavedChangesPopup/UnsavedChangesPopup.js");function l(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var d=new(l(u).default)({headingStyle:"atx",codeBlockStyle:"fenced"});d.keep(["ins","del","mark"]),d.keep(function(e){var t,r;return"A"===e.nodeName&&null!==(r=null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("ai_reasoning$"))&&void 0!==r&&r}),d.keep(function(e){return"SPAN"===e.nodeName&&e.hasAttribute("highlight-id")}),d.addRule("md-table-passthrough",{filter:function(e){return"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table")},replacement:function(e,t){return t.textContent||""}}),d.use(c.tables);var f=function(e){return(e||"").replace(/\r\n/g,"\n").trim()},h=r.forwardRef(function(u,c){var l=u.type,h=u.value,v=u.handleUpdateState,g=u.onBlur,p=u.placeholder,m=u.minHeight,E=u.height,A=u.mode,b=u.doNotShowBorderInViewMode,w=u.onSaveUnsavedChanges,y=u.onDiscardUnsavedChanges,S=u.isSavingUnsavedChanges,_=void 0!==S&&S,x=r.useRef(null),C=r.useState({type:l,value:h}),q=C[0],N=C[1],T=r.useState(0),R=T[0],L=T[1],j=r.useState(!1),H=j[0],B=j[1],M=r.useRef(h),U=r.useRef(h),W=r.useRef(Boolean(h)),O=i.useRefStore(),P=O.contentRef;O.setContentRef;r.useEffect(function(){N(function(t){return e.__assign(e.__assign({},t),{value:h})}),M.current=h,U.current=h,W.current=Boolean(h),B(!1)},[h]),r.useImperativeHandle(c,function(){return{requestClose:function(){return!("edit"===A&&f(M.current)!==f(U.current))||(B(!0),!1)}}},[A]);return r.useEffect(function(){var e=function(){P&&P.current&&L(P.current.clientHeight-60)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[P]),t.jsxs("div",e.__assign({style:{position:"relative",width:"100%",height:E,minHeight:m}},{children:[H&&t.jsx(s.UnsavedChangesPopup,{isSaving:_,onSave:function(){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,null==w?void 0:w()];case 1:return e.sent(),M.current=U.current,B(!1),[2]}})})},onDiscard:function(){U.current=M.current,null==y||y(),B(!1)}}),t.jsx(o.default,{minHeight:m,height:E,placeholder:p||"Enter some text...",onChange:function(e,t){e.read(function(){var e=a.$generateHtmlFromNodes(t,null),r=(new DOMParser).parseFromString(e,"text/html");function n(e){return Array.from(e.childNodes).map(function(e){if(e.nodeType===Node.TEXT_NODE)return e.textContent||"";if(e.nodeType===Node.ELEMENT_NODE){var t=e,r=t.tagName.toLowerCase(),o=n(t);if("strong"===r||"b"===r)return o.startsWith("<strong>")&&o.endsWith("</strong>")?o:"<strong>".concat(o,"</strong>");if("em"===r||"i"===r)return o.startsWith("<em>")&&o.endsWith("</em>")?o:"<em>".concat(o,"</em>");if("code"===r)return"<code>".concat(o,"</code>");if("u"===r)return"<u>".concat(o,"</u>");if("s"===r)return"<s>".concat(o,"</s>");if("a"===r){var i=t.getAttribute("href")||"";return'<a href="'.concat(i,'">').concat(o,"</a>")}return o}return""}).join("")}r.querySelectorAll("span").forEach(function(e){var t=e.getAttribute("style")||"";t.includes("background-color")&&t.includes("rgb(219, 234, 254)")&&e.setAttribute("data-review","insert"),t.includes("text-decoration")&&t.includes("line-through")&&e.setAttribute("data-review","delete")}),r.querySelectorAll("strong code").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code strong").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(function(e){var t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,""))}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(function(e){var t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,""))}),r.querySelectorAll("ins[data-review-id], del[data-review-id]").forEach(function(e){e.innerHTML=n(e)});var o=[];r.querySelectorAll("ins[data-review-id], del[data-review-id]").forEach(function(e,t){o.push(e.outerHTML);var n=r.createElement("span");n.textContent="%%REVIEW_".concat(t,"%%"),e.replaceWith(n)});var i=[];r.querySelectorAll("table").forEach(function(e,t){i.push(e.outerHTML);var n=r.createElement("p");n.textContent="%%TABLE_".concat(t,"%%"),e.replaceWith(n)});var u=d.turndown(r.body.innerHTML);o.forEach(function(e,t){u=u.replace("%%REVIEW\\_".concat(t,"%%"),e)}),i.forEach(function(e,t){u=u.replace("%%TABLE\\_".concat(t,"%%"),"\n\n".concat(e,"\n\n"))}),u=u.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"),W.current&&(M.current=u,W.current=!1),U.current=u,function(e,t){v(e,t)}("prompt",u)})},toolbarConfig:n.DEFAULT_TOOLBAR_CONFIG,editorRef:x,mode:A,initialString:{type:q.type,value:q.value},dynamicHeight:R,onBlur:g,doNotShowBorderInViewMode:b||!1})]}))});h.displayName="RichTextEditor",exports.default=h;
|
|
2
2
|
//# sourceMappingURL=RichTextEditor.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),s=require("react/jsx-runtime"),a=require("./UnsavedChangesPopup.module.css.js"),n=function(n){var i=n.isSaving,t=void 0!==i&&i,l=n.onSave,o=n.onDiscard;return s.jsx("div",e.__assign({className:a.default.overlay,onClick:function(e){return e.stopPropagation()},role:"presentation"},{children:s.jsxs("div",e.__assign({className:a.default.dialog,role:"dialog","aria-modal":"true","aria-labelledby":"unsaved-changes-title"},{children:[s.jsx("h3",e.__assign({id:"unsaved-changes-title",className:a.default.title},{children:"Unsaved changes"})),s.jsx("p",e.__assign({className:a.default.message},{children:"We see, you have unsaved changes, click on Yes to save your changes, else click on No."})),s.jsxs("div",e.__assign({className:a.default.actions},{children:[s.jsx("button",e.__assign({type:"button",className:a.default.noButton,onClick:o,disabled:t},{children:"No"})),s.jsx("button",e.__assign({type:"button",className:a.default.yesButton,onClick:l,disabled:t},{children:t?"Saving...":"Yes"}))]}))]}))}))};exports.UnsavedChangesPopup=n,exports.default=n;
|
|
2
|
+
//# sourceMappingURL=UnsavedChangesPopup.js.map
|
package/dist/cjs/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsavedChangesPopup.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".UnsavedChangesPopup-module_overlay__hSGb2{align-items:flex-start;background:#0f172a47;display:flex;inset:0;justify-content:center;padding:24px 16px 16px;position:absolute;z-index:20}.UnsavedChangesPopup-module_dialog__TIloc{background:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 18px 45px #0f172a2e;cursor:default;padding:20px;width:min(420px,100%)}.UnsavedChangesPopup-module_title__fWQ1u{color:#111827;font-size:18px;font-weight:600;line-height:26px;margin:0}.UnsavedChangesPopup-module_message__KWuvt{color:#4b5563;font-size:14px;line-height:20px;margin:8px 0 0}.UnsavedChangesPopup-module_actions__4C-2B{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}.UnsavedChangesPopup-module_noButton__fP-Fy,.UnsavedChangesPopup-module_yesButton__2IG5l{border-radius:6px;cursor:pointer;font-size:14px;font-weight:600;min-width:72px;padding:8px 14px}.UnsavedChangesPopup-module_noButton__fP-Fy{background:#fff;border:1px solid #d1d5db;color:#374151}.UnsavedChangesPopup-module_yesButton__2IG5l{background:#5b3df5;border:1px solid #5b3df5;color:#fff}.UnsavedChangesPopup-module_noButton__fP-Fy:disabled,.UnsavedChangesPopup-module_yesButton__2IG5l:disabled{cursor:not-allowed;opacity:.6}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}(),exports.default={overlay:"UnsavedChangesPopup-module_overlay__hSGb2",dialog:"UnsavedChangesPopup-module_dialog__TIloc",title:"UnsavedChangesPopup-module_title__fWQ1u",message:"UnsavedChangesPopup-module_message__KWuvt",actions:"UnsavedChangesPopup-module_actions__4C-2B",noButton:"UnsavedChangesPopup-module_noButton__fP-Fy",yesButton:"UnsavedChangesPopup-module_yesButton__2IG5l"};
|
|
2
|
+
//# sourceMappingURL=UnsavedChangesPopup.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsavedChangesPopup.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),t=require("react/jsx-runtime"),n=require("react"),i=require("lucide-react"),s=require("showdown"),l=require("@mui/material"),o=require("../../icons/Illustration.svg.js"),a=require("uuid"),r=require("./UserStoryCard.module.css.js"),u=require("../../utils/helpers.js"),d=require("../../utils/user-story.utils.js"),c=require("../../shared/AtomicButton.js"),v=require("../RichTextEditor/RichTextEditor.js"),f=require("../userstory-with-citation/UserStoryWithCitation.js"),_=require("../RequirementAIWrapper/RequirementAIWrapper.js"),g=require("../story-screen/BigEnoughPanel.js"),p=require("./TitleEditor/TitleEditor.js"),h=require("./ClinicalTrialSection.js"),y=require("../story-screen/CompletionPanel.js"),m=require("../../icons/CDIcon.js");function S(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x,C=S(s),j=((x={})[_.SectionStatus.WAITING]="WAITING TO GENERATE",x[_.SectionStatus.IN_PROGRESS]="IN PROGRESS",x[_.SectionStatus.GENERATED]="GENERATED",x[_.SectionStatus.FAILED]="FAILED",x[_.SectionStatus.GENERATE]="GENERATE",x[_.SectionStatus.APPROVED]="APPROVED",x);function I(n){for(var s,o=[],r=/<learned>(.*?)<\/learned>/g,u=0,d=0;null!==(s=r.exec(n));){var c=s[1],v=s.index;v>u&&o.push(t.jsx("span",{children:n.slice(u,v)},"text-pre-".concat(d++))),o.push(t.jsx(l.Tooltip,e.__assign({title:c,placement:"top"},{children:t.jsx(i.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(a.v4()))),u=r.lastIndex}return u<(null==n?void 0:n.length)&&o.push(t.jsx("span",{children:n.slice(u)},"text-post-".concat(d++))),o}function w(t,n,i){var s;if(!t)return{};if(n)return e.__assign({},t.parentConfig);var l=e.__assign({},t.childConfig);return i&&(null===(s=t.subFeatureOverrides)||void 0===s?void 0:s[i])?e.__assign(e.__assign({},l),t.subFeatureOverrides[i]):l}var N=function(n){var s,l=n.displayName,o=_.useRequirementAI().customStyles,a=null===(s=null==o?void 0:o.userStoryCardStyles)||void 0===s?void 0:s.showDisplayName;return t.jsxs("div",e.__assign({className:r.default.displayName,style:null==a?void 0:a.wrapper},{children:[t.jsx(i.Bookmark,{className:r.default.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),t.jsxs("span",e.__assign({style:null==a?void 0:a.label},{children:[l,":"]}))]}))},b=function(s){var S,x,E,D,B,T,A,k,P,U,R,M,q,L,F,z,O,V,W,G,H,Q=s.isUserStoryCurrentlyUpdated,X=s.artifactId,Z=s.artifactTitleId,J=s.parentUserStory,K=s.currentUserStory,Y=s.onUserStoryChange,$=s.parentIndex,ee=s.currentIndex,te=s.enableDownload,ne=s.isDiffEditReviewMode,ie=s.showUserStoryDiff,se=s.handleDownloadUserStory,le=s.handleOpenSendDialog,oe=s.updateUserStoryArtifact,ae=s.selectedArtifactId,re=s.isDisplayHighlightControl,ue=s.elementDisplayConfig,de=s._resolvedConfig,ce=s.showWrapper,ve=void 0!==ce&&ce,fe=s.defaultExpanded,_e=s.actionItemsConfig,ge=s.onDelete,pe=s.contextVariant,he=s.expandedSubFeatures,ye=s.showDisplayName,me=void 0===ye||ye,Se=s.allowTitleEdit,xe=void 0===Se||Se,Ce=s.showConfidenceScore,je=void 0===Ce||Ce,Ie=s.showBorderTop,we=void 0===Ie||Ie,Ne=s.sectionStatusConfig,be=s.showCompletionPanel,Ee=void 0!==be&&be,De=s.showAddSectionButton,Be=void 0!==De&&De,Te=s.disableEditPlan,Ae=void 0!==Te&&Te,ke=s.useMuiTooltip,Pe=void 0!==ke&&ke,Ue=s.approveButtonConfig,Re=s.CDNeededInChip,Me=null!=Ne?Ne:{},qe=Me.isLoadingSectionData,Le=void 0!==qe&&qe,Fe=Me.onLoadSectionData,ze=Me.status,Oe=Me.onStatusClick,Ve=Me.completedCount,We=Me.totalCount,Ge=Me.isNoDataAvailable,He=void 0!==Ge&&Ge,Qe=_.useRequirementAI(),Xe=Qe.searchQueryList,Ze=Qe.citations,Je=Qe.customStyles,Ke=Qe.customSectionConfig,Ye=null==Je?void 0:Je.userStoryCardStyles,$e=null==Ye?void 0:Ye.statusStyles,et=null===(x=null==Je?void 0:Je.userStoryCardStyles)||void 0===x?void 0:x.userStoryEditStyles,tt=null===(E=null==Je?void 0:Je.userStoryScreenStyles)||void 0===E?void 0:E.userStoryContentStyles,nt=null==Ye?void 0:Ye.progressHeaderStyles,it=null==Ye?void 0:Ye.clinicalTrialSectionStyles,st=null==Ye?void 0:Ye.CompletionStyles,lt=null==Ye?void 0:Ye.noDataStyles,ot=null==Ye?void 0:Ye.approveButtonStyles,at=null!==(B=null===(D=null==Ke?void 0:Ke.shouldRender)||void 0===D?void 0:D.call(Ke,K))&&void 0!==B&&B,rt=null===(T=null==Ke?void 0:Ke.getValue)||void 0===T?void 0:T.call(Ke,K),ut=null!==(k=null===(A=null==Ke?void 0:Ke.getFields)||void 0===A?void 0:A.call(Ke,K))&&void 0!==k?k:[],dt=null!==(P=null==Ke?void 0:Ke.isEditDisabled)&&void 0!==P&&P,ct=null!==(R=null===(U=null==Ke?void 0:Ke.isSaving)||void 0===U?void 0:U.call(Ke,K))&&void 0!==R&&R,vt=(G=null!==(M=K.completion_percentage)&&void 0!==M?M:0,H=st,G>=80?null==H?void 0:H.highCompletion:G>=50?null==H?void 0:H.mediumCompletion:null==H?void 0:H.lowCompletion),ft=((S={})[_.SectionStatus.WAITING]=null==$e?void 0:$e.waiting,S[_.SectionStatus.IN_PROGRESS]=null==$e?void 0:$e.inProgress,S[_.SectionStatus.GENERATED]=null==$e?void 0:$e.generated,S[_.SectionStatus.FAILED]=null==$e?void 0:$e.failed,S[_.SectionStatus.GENERATE]=null==$e?void 0:$e.generate,S[_.SectionStatus.APPROVED]=null==$e?void 0:$e.approved,S),_t=n.useState(e.__assign(e.__assign({},structuredClone(K)),{value:u.formatMarkdown(K.value)||""})),gt=_t[0],pt=_t[1],ht=n.useState({userStory:!!K.isDefaultEdit}),yt=ht[0],mt=ht[1],St=n.useState(!1),xt=St[0],Ct=St[1],jt=n.useState(!1),It=jt[0],wt=jt[1],Nt=n.useState(null),bt=Nt[0],Et=Nt[1],Dt=n.useState(null),Bt=Dt[0],Tt=Dt[1],At=_.useRequirementAI(),kt=At.userStory,Pt=At.customIcons,Ut=n.useState(null!=fe?fe:""===$||ae===K.artifactId||!!K.isDefaultOpen),Rt=Ut[0],Mt=Ut[1],qt=n.useState(!1);qt[0];var Lt=qt[1],Ft=n.useState(null),zt=Ft[0],Ot=Ft[1],Vt=n.useState(null),Wt=Vt[0],Gt=Vt[1],Ht=n.useState(!1),Qt=Ht[0],Xt=Ht[1],Zt=n.useRef(null),Jt=n.useState(!1);Jt[0];var Kt=Jt[1],Yt=n.useState(!1),$t=Yt[0],en=Yt[1],tn=n.useRef(null);n.useEffect(function(){Q&&Mt(Q)},[Q]),n.useEffect(function(){pt(e.__assign(e.__assign({},structuredClone(K)),{value:u.formatMarkdown(K.value)||""}))},[K]),n.useEffect(function(){Xe.length>0?Mt(!0):void 0===fe&&(ae?Mt(ae===K.artifactId):he&&he.length>0&&Mt(he.includes(K.artifactId)))},[Xe,ae,K.artifactId,he]);var nn=function(){Ot(null)},sn=function(){Gt(null)},ln=function(){Mt(function(e){return!e})};var on=null!=(null==K?void 0:K.big_enough)&&!Number.isNaN(K.big_enough)&&!!(null==K?void 0:K.big_enough_decision_factors),an=null!==(q=null==K?void 0:K.completion_percentage)&&void 0!==q?q:0,rn=!!(null==K?void 0:K.completion_decision_factors),un=""===$,dn=null!=de?de:w(ue,un),cn=!ne&&!ie;return n.useEffect(function(){if(Bt){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(Bt));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[Bt]),n.useEffect(function(){K.isDefaultEdit&&mt(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})},[K.isDefaultEdit]),t.jsxs("div",e.__assign({className:r.default.card,style:null==Ye?void 0:Ye.cardStyle,id:"story-card-".concat(K.title),"data-expanded":Rt},{children:[t.jsxs("div",e.__assign({className:r.default.titleSection,style:null==Ye?void 0:Ye.titleSection},{children:[t.jsxs("div",e.__assign({className:r.default.titleRow,style:null==Ye?void 0:Ye.titleRow,onClick:ln},{children:[t.jsxs("div",e.__assign({className:r.default.titleLeft,style:null==Ye?void 0:Ye.titleLeft,onMouseEnter:function(){return Kt(!0)},onMouseLeave:function(){return Kt(!1)}},{children:[me&&t.jsx(N,{displayName:Z}),xt&&cn?t.jsx(p.InlineTitleEditor,{title:K.title,onSave:function(t){return function(t,n){return e.__awaiter(void 0,void 0,void 0,function(){var i,s;return e.__generator(this,function(l){try{i=e.__assign({},K),K.artifactId===n?i.title=t:i.sub_features=(null===(s=K.sub_features)||void 0===s?void 0:s.map(function(i){return i.artifactId===n?e.__assign(e.__assign({},i),{title:t}):i}))||[],pt(i),Y(i),Ct(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(t,K.artifactId)},onCancel:function(){Ct(!1)},inputStyle:null==et?void 0:et.inlineTitleInput,confirmButtonStyle:null==et?void 0:et.inlineTitleConfirm,cancelButtonStyle:null==et?void 0:et.inlineTitleCancel},"inline-title-editor"):t.jsxs("div",e.__assign({className:r.default.storyTitleWrapper},{children:[t.jsx(l.Tooltip,e.__assign({title:I(K.title),arrow:!0},{children:t.jsx("h2",e.__assign({title:Pe?void 0:K.title,className:r.default.storyTitle,style:null==Ye?void 0:Ye.storyTitle},{children:I(K.title)}),K.artifactId)})),Ee&&!at&&(rn?t.jsx(y.CompletionPanel,e.__assign({customIcons:null==Pt?void 0:Pt.userStoryIcons,customStyles:null==Ye?void 0:Ye.aiReasoningCitaionStyles,currentUserStory:K,panelStyles:null==Ye?void 0:Ye.CompletionStyles,onToggleStateChange:en},{children:t.jsxs("div",e.__assign({style:e.__assign(e.__assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==st?void 0:st.badge),vt)},{children:[t.jsxs("span",{children:[an,"% Completed"]}),t.jsx("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:t.jsx(m.default,{color:"currentColor"})})),$t?t.jsx(i.ChevronUp,{size:14,style:null==st?void 0:st.chevronStyle}):t.jsx(i.ChevronDown,{size:14,style:null==st?void 0:st.chevronStyle})]}))})):t.jsx("div",e.__assign({style:e.__assign(e.__assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==st?void 0:st.badge),vt)},{children:t.jsxs("span",{children:[an,"% Completed"]})}))),xe&&t.jsx("button",e.__assign({type:"button",className:r.default.titleEditButton,style:null==et?void 0:et.titleEditButton,onClick:function(e){e.stopPropagation(),Ct(!0),Rt||Mt(!0)},"aria-label":"Edit title",title:"Edit title"},{children:t.jsx("svg",e.__assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:t.jsx("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),(ze||void 0!==Ve&&void 0!==We)&&t.jsxs("div",e.__assign({className:r.default.statusContainer},{children:[void 0!==Ve&&void 0!==We&&t.jsxs("div",e.__assign({className:r.default.completedBadge},{children:["Completed: ",Ve,"/",We]})),ze&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==Oe||Oe()},className:r.default.statusButton,style:ft[ze]},{children:j[ze]}))]})),t.jsxs("div",e.__assign({className:r.default.titleActions,style:null==Ye?void 0:Ye.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(dn.showProgressPercentage||dn.showGapBox)&&ve&&t.jsxs("div",e.__assign({className:r.default.progressHeader,style:null==nt?void 0:nt.wrapper},{children:[dn.showProgressPercentage&&t.jsxs("div",e.__assign({className:r.default.progressPercentage,style:null==nt?void 0:nt.percentage},{children:[null!==(F=null!==(L=null==K?void 0:K.confidenceScore)&&void 0!==L?L:null==dn?void 0:dn.confidenceValue)&&void 0!==F?F:"0","%"]})),dn.showGapBox&&t.jsxs("div",e.__assign({className:r.default.gapBox,style:null==nt?void 0:nt.gapBox},{children:[null!==(O=null!==(z=null==K?void 0:K.gapValue)&&void 0!==z?z:null==dn?void 0:dn.gapBoxValue)&&void 0!==O?O:"2"," ","Gaps"]}))]})),on&&t.jsx(g.BigEnoughPanel,{customIcons:null==Pt?void 0:Pt.userStoryIcons,customStyles:null==Ye?void 0:Ye.aiReasoningCitaionStyles,currentUserStory:K,panelStyles:null==Ye?void 0:Ye.BigEnoughStyles}),!yt.userStory&&t.jsxs(t.Fragment,{children:[!1!==(null==dn?void 0:dn.showShareButton)&&t.jsx("button",e.__assign({className:r.default.iconButton,style:null==Ye?void 0:Ye.iconButton,onClick:function(e){Ot(e.currentTarget)}},{children:t.jsx(i.ExternalLink,{size:16})})),t.jsxs(l.Menu,e.__assign({id:"user-story-share-menu",anchorEl:zt,open:!!zt,onClose:function(){return Ot(null)},style:null==Ye?void 0:Ye.userStoryShareMenu},{children:[te&&t.jsx(l.MenuItem,e.__assign({style:null==Ye?void 0:Ye.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return Lt(!0),se?[4,Promise.all([se("pdf"),se("doc")])]:[2];case 1:return e.sent(),Lt(!1),[2]}})})}},{children:t.jsxs("div",e.__assign({ref:Zt,className:r.default.menuItemContent,style:null==Ye?void 0:Ye.menuItemContent},{children:[t.jsx(i.Download,{size:16,color:null==Ye?void 0:Ye.menuIconColor}),t.jsx("p",e.__assign({style:null==Ye?void 0:Ye.menuLabel},{children:"Download"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==Ye?void 0:Ye.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){return t=K,J&&(t=e.__assign(e.__assign({},K),{value:"".concat(d.replaceTitleSection(null==J?void 0:J.value,K.title)," \n").concat(K.value)})),null==le||le(!0,[t],K.artifactId),nn(),[2]})})}},{children:t.jsxs("div",e.__assign({style:null==Ye?void 0:Ye.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(i.Share2,{size:16,color:null==Ye?void 0:Ye.menuIconColor}),t.jsx("p",e.__assign({style:null==Ye?void 0:Ye.menuLabel},{children:"Send"}))]}))})),t.jsx(l.MenuItem,e.__assign({style:null==Ye?void 0:Ye.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t,n,i,s,l;return e.__generator(this,function(e){switch(e.label){case 0:t=new C.default.Converter,n=t.makeHtml(u.formatMarkdown(K.value)||K.value),i=function(e){var t=(new C.default.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(u.formatMarkdown(K.value)||K.value),s=new ClipboardItem({"text/plain":new Blob([i],{type:"text/plain"}),"text/html":new Blob([n],{type:"text/html"})}),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,navigator.clipboard.write([s])];case 2:return e.sent(),console.log("Copied User Story"),[3,5];case 3:return l=e.sent(),console.error("Failed to copy user story:",l),[3,5];case 4:return nn(),[7];case 5:return[2]}})})}},{children:t.jsxs("div",e.__assign({style:null==Ye?void 0:Ye.menuItemContent,className:r.default.menuItemContentPadded},{children:[t.jsx(i.Copy,{size:16,color:null==Ye?void 0:Ye.menuIconColor}),t.jsx("p",e.__assign({style:null==Ye?void 0:Ye.menuLabel},{children:"Copy"}))]}))}))]}))]}),yt.userStory&&Rt?t.jsx(c.default,{type:"outline",children:"Cancel",style:null==Ye?void 0:Ye.cancelButton,onClick:function(){var t;null===(t=tn.current)||void 0===t||t.abort(),mt(function(t){return e.__assign(e.__assign({},t),{userStory:!1})})}}):t.jsx(t.Fragment,{}),yt.userStory&&Rt?t.jsx(c.default,{type:"fill",children:Qt?t.jsxs("span",e.__assign({className:r.default.savingSpinner,style:null==Ye?void 0:Ye.savingSpinner},{children:[t.jsx(i.LoaderCircle,{className:r.default.spinAnimation,style:null==Ye?void 0:Ye.spinAnimation}),t.jsx("span",{children:"Saving..."})]})):"Save",isDisable:Qt,style:Qt?null==Ye?void 0:Ye.savingButton:null==Ye?void 0:Ye.saveButton,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(n){switch(n.label){case 0:return Xt(!0),"userStory"==="userStory"&&(Y(gt),console.log("I am changing RTE editor values",gt)),[4,oe(Ze,kt,X,null===(t=tn.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),Y(e.__assign(e.__assign({},gt),{isDefaultEdit:!1})),mt(function(t){return e.__assign(e.__assign({},t),{userStory:!1})}),Xt(!1),[2]}})})}}):!ne&&!ie&&!Ae&&Rt&&!1!==(null==dn?void 0:dn.showEditButton)&&t.jsx("button",e.__assign({className:r.default.iconButton,style:null==Ye?void 0:Ye.editButton,onClick:function(){return mt(function(t){return e.__assign(e.__assign({},t),{userStory:!0})})}},{children:t.jsx(i.PencilIcon,{color:null==Ye?void 0:Ye.pencilIconColor,size:16})})),Be&&un&&Rt&&!ne&&!ie&&!1!==(null==dn?void 0:dn.showEditButton)&&t.jsxs("button",e.__assign({type:"button",className:r.default.addSectionButton,style:null==et?void 0:et.addSectionButton,onClick:function(t){var n,i,s;t.stopPropagation();var l=(null!==(i=null===(n=K.sub_features)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1,o={artifactId:a.v4(),title:"New Section ".concat(l),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},r=e.__assign(e.__assign({},K),{sub_features:e.__spreadArray(e.__spreadArray([],null!==(s=K.sub_features)&&void 0!==s?s:[],!0),[o],!1)});pt(r),Y(r),Mt(!0),Tt(o.title)},"aria-label":"Add section",title:"Add section"},{children:[t.jsx(i.Plus,{size:14}),t.jsx("span",e.__assign({className:r.default.addSectionLabel},{children:"Add Section"}))]})),!un&&!ne&&!Ae&&!ie&&t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==ge||ge()},className:r.default.iconButton,style:null==et?void 0:et.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:t.jsx(i.Trash2,{size:16})})),at&&t.jsx("button",e.__assign({type:"button",className:r.default.iconButton,disabled:dt,onClick:function(e){if(e.stopPropagation(),It)return Et(null),void wt(!1);Et(structuredClone(null!=rt?rt:{})),Mt(!0),wt(!0)}},{children:It?t.jsx(i.X,{size:16,color:null==Ye?void 0:Ye.pencilIconColor}):t.jsx(i.PencilIcon,{size:16,color:null==Ye?void 0:Ye.pencilIconColor})})),(null==dn?void 0:dn.actionItemsButton)&&t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({className:r.default.actionItemBtn,style:null==Ye?void 0:Ye.actionItemBtn,onClick:function(e){e.stopPropagation(),Gt(e.currentTarget)}},{children:t.jsx(i.Ellipsis,{})})),t.jsx(l.Menu,e.__assign({id:"user-story-action-menu",anchorEl:Wt,open:!!Wt,onClose:sn,style:null==Ye?void 0:Ye.userStoryShareMenu},{children:null==_e?void 0:_e.items.map(function(n,i){return t.jsx(l.MenuItem,e.__assign({style:null==Ye?void 0:Ye.userStoryMenuItem,onClick:function(){n.onclick(K),sn()}},{children:t.jsxs("div",e.__assign({className:r.default.menuItemContent,style:e.__assign(e.__assign({},null==Ye?void 0:Ye.menuItemContent),!n.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[t.jsx("span",e.__assign({className:r.default.menuItemIcon,style:null==Ye?void 0:Ye.menuItemIcon},{children:n.icon})),t.jsx("p",e.__assign({style:null==Ye?void 0:Ye.menuLabel},{children:n.name})),t.jsx("span",{className:r.default.menuItemRight,style:null==Ye?void 0:Ye.menuItemRight})]}))}),"action-item-".concat(i,"-").concat(n.name))})}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),ln()},style:null==Ye?void 0:Ye.chevronButton,className:r.default.chevronButton},{children:Rt?t.jsx(i.ChevronUp,{className:r.default.chevronIcon,color:null==Ye?void 0:Ye.chevronIconColor}):t.jsx(i.ChevronDown,{className:r.default.chevronIcon,color:null==Ye?void 0:Ye.chevronIconColor})}))]}))]})),t.jsx("div",{className:r.default.divider,style:null==Ye?void 0:Ye.dividerStyle})]})),Rt&&t.jsx("div",e.__assign({className:r.default.cardContent,style:e.__assign(e.__assign({},null==Ye?void 0:Ye.cardContentStyle),{borderTop:we?"1px solid #E5E5E5":"none"})},{children:Le?t.jsxs("div",e.__assign({className:r.default.loadingContainer},{children:[t.jsx("div",e.__assign({className:r.default.loadingIconWrapper},{children:t.jsx(i.Hourglass,{size:28,color:"#5B3DF5",className:r.default.spinAnimation})})),t.jsxs("div",{children:[t.jsx("h3",e.__assign({className:r.default.loadingTitle},{children:"Section generation in progress.."})),t.jsx("p",e.__assign({className:r.default.loadingSubtitle},{children:"This may take a few minutes"}))]}),t.jsx("button",e.__assign({type:"button",onClick:function(){return null==Fe?void 0:Fe()},className:r.default.viewStatusButton},{children:"View Status"}))]})):He?t.jsxs("div",e.__assign({className:r.default.noDataContainer,style:null==lt?void 0:lt.container},{children:[t.jsx("img",{src:o.default,alt:"No data available",className:r.default.noDataIllustration,style:null==lt?void 0:lt.illustration}),t.jsx("h3",e.__assign({className:r.default.noDataTitle,style:null==lt?void 0:lt.title},{children:"No Data Available for This Section"})),t.jsx("p",e.__assign({className:r.default.noDataSubtitle,style:null==lt?void 0:lt.subtitle},{children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."}))]})):t.jsxs("div",e.__assign({className:r.default.contentInner,style:null==Ye?void 0:Ye.contentInner},{children:[t.jsxs("div",e.__assign({className:r.default.descriptionSection,style:null==Ye?void 0:Ye.descriptionSection},{children:[t.jsx("div",{className:r.default.justifyBetween,style:null==Ye?void 0:Ye.justifyBetween}),yt.userStory?t.jsx(v.default,{minHeight:"100%",height:"100%",type:"string",value:u.formatMarkdown(K.value)||"",handleUpdateState:function(t,n){var i=u.indentMarkdown(n);pt(function(t){return e.__assign(e.__assign({},t),{value:i||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:yt.userStory?"edit":"readOnly"}):at?t.jsx(h.default,{styles:it,fields:ut,readonly:!It,isSaving:ct,value:null!==(V=null!=bt?bt:rt)&&void 0!==V?V:{},onChange:Et,onSave:function(){return e.__awaiter(void 0,void 0,void 0,function(){var t;return e.__generator(this,function(e){switch(e.label){case 0:return bt?[4,null===(t=null==Ke?void 0:Ke.onSave)||void 0===t?void 0:t.call(Ke,K,bt)]:[2];case 1:return e.sent(),Et(null),wt(!1),[2]}})})},onCancel:function(){Et(null),wt(!1)}}):t.jsxs(t.Fragment,{children:[t.jsx(f.default,{showUserStoryDiff:ie,isParent:""===$,message:u.formatMarkdown(K.value)||"",artifactId:K.artifactId,customStyles:tt,isDisplayHighlightControl:re,contextVariant:pe,showConfidenceScore:je,CDNeededInChip:Re}),Ue&&t.jsx("div",e.__assign({className:r.default.approveButtonContainer,style:null==ot?void 0:ot.container},{children:t.jsx("button",e.__assign({type:"button",className:r.default.approveButton,style:null==ot?void 0:ot.button,disabled:Ue.disabled||Ue.isLoading,onClick:function(e){var t;e.stopPropagation(),null===(t=null==Ue?void 0:Ue.onClick)||void 0===t||t.call(Ue)}},{children:Ue.isLoading?t.jsxs(t.Fragment,{children:[t.jsx(i.LoaderCircle,{size:16,className:r.default.spinner,style:null==ot?void 0:ot.icon}),t.jsx("span",e.__assign({style:null==ot?void 0:ot.text},{children:Ue.label}))]}):t.jsxs(t.Fragment,{children:[t.jsx("span",e.__assign({style:null==ot?void 0:ot.text},{children:Ue.label})),t.jsx(i.Check,{size:16,style:null==ot?void 0:ot.icon})]})}))}))]})]})),null===(W=gt.sub_features)||void 0===W?void 0:W.map(function(n,i){var s=w(ue,!1,n.artifactId);return t.jsx(b,{artifactId:X,isUserStoryCurrentlyUpdated:Q,artifactTitleId:"".concat(Z,"-").concat(String.fromCharCode(65+i)),parentUserStory:K,parentIndex:"".concat($).concat($&&".").concat(ee),currentIndex:"".concat(i+1),doNotShowBorderInViewMode:!1,currentUserStory:n,onUserStoryChange:function(t){return function(t,n){var i=e.__spreadArray([],K.sub_features||[],!0);i[t]=n,Y(e.__assign(e.__assign({},K),{sub_features:i}))}(i,t)},enableDownload:!0,isDiffEditReviewMode:ne,showUserStoryDiff:ie,updateUserStoryArtifact:oe,handleDownloadUserStory:se,handleOpenSendDialog:le,isDisplayHighlightControl:re,elementDisplayConfig:ue,_resolvedConfig:s,actionItemsConfig:_e,onDelete:function(){return function(t){var n=(K.sub_features||[]).filter(function(e,n){return n!==t}),i=e.__assign(e.__assign({},K),{sub_features:n});pt(i),Y(i)}(i)},expandedSubFeatures:he,disableEditPlan:Ae,useMuiTooltip:Pe},n.artifactId)})]}))}))]}))};exports.StoryCard=b,exports.UserStoryCardWrapper=function(n){var s=n.artifactTitleIDs,l=n.expandedSubFeatures,o=n.isDiffEditReviewMode,a=n.showUserStoryDiff,u=n.updateUserStoryArtifact,d=n.isUserStoryCurrentlyUpdated,c=n.artifactId,v=n.handleOpenSendDialog,f=n.handleDownloadUserStory,g=n.selectedArtifactId,p=n.isDisplayHighlightControl,h=n.elementDisplayConfig,y=n.showWrapper,m=n.actionItemsConfig,S=n.contextVariant,x=n.showDisplayName,C=n.allowTitleEdit,j=n.showConfidenceScore,I=n.showBorderTop,N=n.defaultExpanded,E=n.showCompletionPanel,D=void 0!==E&&E,B=n.showAddSectionButton,T=void 0!==B&&B,A=n.disableEditPlan,k=void 0!==A&&A,P=n.useMuiTooltip,U=void 0!==P&&P,R=n.approveButtonConfig,M=n.CDNeededInChip,q=_.useRequirementAI(),L=q.userStory,F=q.setUserStory,z=q.customStyles,O=q.searchQueryList,V=q.currentHighlightIndex,W=q.setCurrentHighlightIndex;q.segmentComponentConfig;var G=q.sectionStatusConfig,H=null==z?void 0:z.userStoryCardStyles,Q=0===V,X=V===O.length-1;return t.jsxs("div",e.__assign({className:r.default.userStoryCardWrapper,style:p?e.__assign(e.__assign({},null==H?void 0:H.userStoryCardWrapper),{position:"relative"}):null==H?void 0:H.userStoryCardWrapper},{children:[p&&t.jsx(t.Fragment,{children:O.length>0&&t.jsx("div",e.__assign({className:r.default.wrapper},{children:t.jsx("div",e.__assign({className:r.default.highlightNavigation},{children:t.jsxs("div",e.__assign({className:r.default.navigationContainer},{children:[t.jsxs("span",e.__assign({className:r.default.navCounter},{children:[V+1," of ",O.length]})),t.jsxs("div",e.__assign({className:r.default.navButtons},{children:[t.jsx("button",e.__assign({onClick:function(){V>0&&W(function(e){return e-1})},className:r.default.navButton,disabled:Q},{children:t.jsx(i.ChevronUpIcon,{size:20,className:r.default.navIcon})})),t.jsx("button",e.__assign({onClick:function(){V<O.length-1&&W(function(e){return e+1})},className:r.default.navButton,disabled:X},{children:t.jsx(i.ChevronDownIcon,{size:20,className:r.default.navIcon})}))]}))]}))}))}))}),L.map(function(n,i){var r=w(h,!0);return t.jsx(b,{isUserStoryCurrentlyUpdated:d,artifactId:c,artifactTitleId:s[i]||"",expandedSubFeatures:l,currentUserStory:n,onUserStoryChange:function(t){F(function(n){return n[i]=t,e.__spreadArray([],n,!0)})},parentIndex:"",currentIndex:"".concat(i+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:o,showUserStoryDiff:a,updateUserStoryArtifact:u,handleOpenSendDialog:v,handleDownloadUserStory:f,selectedArtifactId:g,isDisplayHighlightControl:p,elementDisplayConfig:h,_resolvedConfig:r,showWrapper:y,defaultExpanded:N,actionItemsConfig:m,contextVariant:S,showDisplayName:x,allowTitleEdit:C,showConfidenceScore:j,showBorderTop:I,sectionStatusConfig:G,showCompletionPanel:D,showAddSectionButton:T,disableEditPlan:k,useMuiTooltip:U,approveButtonConfig:R,CDNeededInChip:M},n.artifactId)})]}))},exports.default=b,exports.replaceLearnedTagsWithInfo=I;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("tslib"),n=require("react/jsx-runtime"),t=require("react"),i=require("lucide-react"),s=require("showdown"),l=require("@mui/material"),o=require("../../icons/Illustration.svg.js"),a=require("uuid"),r=require("./UserStoryCard.module.css.js"),u=require("../../utils/helpers.js"),d=require("../../utils/user-story.utils.js"),c=require("../../shared/AtomicButton.js"),v=require("../RichTextEditor/RichTextEditor.js"),f=require("../userstory-with-citation/UserStoryWithCitation.js"),_=require("../RequirementAIWrapper/RequirementAIWrapper.js"),g=require("../story-screen/BigEnoughPanel.js"),p=require("./TitleEditor/TitleEditor.js"),h=require("./ClinicalTrialSection.js"),y=require("../story-screen/CompletionPanel.js"),m=require("../../icons/CDIcon.js");function S(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var x,C=S(s),j=((x={})[_.SectionStatus.WAITING]="WAITING TO GENERATE",x[_.SectionStatus.IN_PROGRESS]="IN PROGRESS",x[_.SectionStatus.GENERATED]="GENERATED",x[_.SectionStatus.FAILED]="FAILED",x[_.SectionStatus.GENERATE]="GENERATE",x[_.SectionStatus.APPROVED]="APPROVED",x);function I(t){for(var s,o=[],r=/<learned>(.*?)<\/learned>/g,u=0,d=0;null!==(s=r.exec(t));){var c=s[1],v=s.index;v>u&&o.push(n.jsx("span",{children:t.slice(u,v)},"text-pre-".concat(d++))),o.push(n.jsx(l.Tooltip,e.__assign({title:c,placement:"top"},{children:n.jsx(i.Info,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(a.v4()))),u=r.lastIndex}return u<(null==t?void 0:t.length)&&o.push(n.jsx("span",{children:t.slice(u)},"text-post-".concat(d++))),o}function w(n,t,i){var s;if(!n)return{};if(t)return e.__assign({},n.parentConfig);var l=e.__assign({},n.childConfig);return i&&(null===(s=n.subFeatureOverrides)||void 0===s?void 0:s[i])?e.__assign(e.__assign({},l),n.subFeatureOverrides[i]):l}var N=function(t){var s,l=t.displayName,o=_.useRequirementAI().customStyles,a=null===(s=null==o?void 0:o.userStoryCardStyles)||void 0===s?void 0:s.showDisplayName;return n.jsxs("div",e.__assign({className:r.default.displayName,style:null==a?void 0:a.wrapper},{children:[n.jsx(i.Bookmark,{className:r.default.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),n.jsxs("span",e.__assign({style:null==a?void 0:a.label},{children:[l,":"]}))]}))},b=function(s){var S,x,E,D,B,T,A,k,P,U,R,M,q,L,F,z,O,V,W,G,H,Q=s.isUserStoryCurrentlyUpdated,X=s.artifactId,Z=s.artifactTitleId,J=s.parentUserStory,K=s.currentUserStory,Y=s.onUserStoryChange,$=s.parentIndex,ee=s.currentIndex,ne=s.enableDownload,te=s.isDiffEditReviewMode,ie=s.showUserStoryDiff,se=s.handleDownloadUserStory,le=s.handleOpenSendDialog,oe=s.updateUserStoryArtifact,ae=s.selectedArtifactId,re=s.isDisplayHighlightControl,ue=s.elementDisplayConfig,de=s._resolvedConfig,ce=s.showWrapper,ve=void 0!==ce&&ce,fe=s.defaultExpanded,_e=s.actionItemsConfig,ge=s.onDelete,pe=s.contextVariant,he=s.expandedSubFeatures,ye=s.showDisplayName,me=void 0===ye||ye,Se=s.allowTitleEdit,xe=void 0===Se||Se,Ce=s.showConfidenceScore,je=void 0===Ce||Ce,Ie=s.showBorderTop,we=void 0===Ie||Ie,Ne=s.sectionStatusConfig,be=s.showCompletionPanel,Ee=void 0!==be&&be,De=s.showAddSectionButton,Be=void 0!==De&&De,Te=s.disableEditPlan,Ae=void 0!==Te&&Te,ke=s.useMuiTooltip,Pe=void 0!==ke&&ke,Ue=s.approveButtonConfig,Re=s.CDNeededInChip,Me=null!=Ne?Ne:{},qe=Me.isLoadingSectionData,Le=void 0!==qe&&qe,Fe=Me.onLoadSectionData,ze=Me.status,Oe=Me.onStatusClick,Ve=Me.completedCount,We=Me.totalCount,Ge=Me.isNoDataAvailable,He=void 0!==Ge&&Ge,Qe=_.useRequirementAI(),Xe=Qe.searchQueryList,Ze=Qe.citations,Je=Qe.customStyles,Ke=Qe.customSectionConfig,Ye=null==Je?void 0:Je.userStoryCardStyles,$e=null==Ye?void 0:Ye.statusStyles,en=null===(x=null==Je?void 0:Je.userStoryCardStyles)||void 0===x?void 0:x.userStoryEditStyles,nn=null===(E=null==Je?void 0:Je.userStoryScreenStyles)||void 0===E?void 0:E.userStoryContentStyles,tn=null==Ye?void 0:Ye.progressHeaderStyles,sn=null==Ye?void 0:Ye.clinicalTrialSectionStyles,ln=null==Ye?void 0:Ye.CompletionStyles,on=null==Ye?void 0:Ye.noDataStyles,an=null==Ye?void 0:Ye.approveButtonStyles,rn=null!==(B=null===(D=null==Ke?void 0:Ke.shouldRender)||void 0===D?void 0:D.call(Ke,K))&&void 0!==B&&B,un=null===(T=null==Ke?void 0:Ke.getValue)||void 0===T?void 0:T.call(Ke,K),dn=null!==(k=null===(A=null==Ke?void 0:Ke.getFields)||void 0===A?void 0:A.call(Ke,K))&&void 0!==k?k:[],cn=null!==(P=null==Ke?void 0:Ke.isEditDisabled)&&void 0!==P&&P,vn=null!==(R=null===(U=null==Ke?void 0:Ke.isSaving)||void 0===U?void 0:U.call(Ke,K))&&void 0!==R&&R,fn=(G=null!==(M=K.completion_percentage)&&void 0!==M?M:0,H=ln,G>=80?null==H?void 0:H.highCompletion:G>=50?null==H?void 0:H.mediumCompletion:null==H?void 0:H.lowCompletion),_n=((S={})[_.SectionStatus.WAITING]=null==$e?void 0:$e.waiting,S[_.SectionStatus.IN_PROGRESS]=null==$e?void 0:$e.inProgress,S[_.SectionStatus.GENERATED]=null==$e?void 0:$e.generated,S[_.SectionStatus.FAILED]=null==$e?void 0:$e.failed,S[_.SectionStatus.GENERATE]=null==$e?void 0:$e.generate,S[_.SectionStatus.APPROVED]=null==$e?void 0:$e.approved,S),gn=t.useState(e.__assign(e.__assign({},structuredClone(K)),{value:u.formatMarkdown(K.value)||""})),pn=gn[0],hn=gn[1],yn=t.useState({userStory:!!K.isDefaultEdit}),mn=yn[0],Sn=yn[1],xn=t.useState(!1),Cn=xn[0],jn=xn[1],In=t.useState(!1),wn=In[0],Nn=In[1],bn=t.useState(null),En=bn[0],Dn=bn[1],Bn=t.useState(null),Tn=Bn[0],An=Bn[1],kn=_.useRequirementAI(),Pn=kn.userStory,Un=kn.customIcons,Rn=t.useState(null!=fe?fe:""===$||ae===K.artifactId||!!K.isDefaultOpen),Mn=Rn[0],qn=Rn[1],Ln=t.useState(!1);Ln[0];var Fn=Ln[1],zn=t.useState(null),On=zn[0],Vn=zn[1],Wn=t.useState(null),Gn=Wn[0],Hn=Wn[1],Qn=t.useState(!1),Xn=Qn[0],Zn=Qn[1],Jn=t.useRef(null),Kn=t.useRef(null),Yn=t.useState(!1);Yn[0];var $n=Yn[1],et=t.useState(!1),nt=et[0],tt=et[1],it=t.useRef(null);t.useEffect(function(){Q&&qn(Q)},[Q]),t.useEffect(function(){hn(e.__assign(e.__assign({},structuredClone(K)),{value:u.formatMarkdown(K.value)||""}))},[K]),t.useEffect(function(){Xe.length>0?qn(!0):void 0===fe&&(ae?qn(ae===K.artifactId):he&&he.length>0&&qn(he.includes(K.artifactId)))},[Xe,ae,K.artifactId,he]);var st=function(){Vn(null)},lt=function(){Hn(null)},ot=function(){Mn&&mn.userStory&&Kn.current&&!Kn.current.requestClose()||qn(function(e){return!e})},at=function(){return e.__awaiter(void 0,void 0,void 0,function(){var n;return e.__generator(this,function(t){switch(t.label){case 0:Zn(!0),t.label=1;case 1:return t.trys.push([1,,3,4]),"userStory"==="userStory"&&(Y(pn),console.log("I am changing RTE editor values",pn)),[4,oe(Ze,Pn,X,null===(n=it.current)||void 0===n?void 0:n.signal)];case 2:return t.sent(),Y(e.__assign(e.__assign({},pn),{isDefaultEdit:!1})),Sn(function(n){return e.__assign(e.__assign({},n),{userStory:!1})}),[3,4];case 3:return Zn(!1),[7];case 4:return[2]}})})};var rt=null!=(null==K?void 0:K.big_enough)&&!Number.isNaN(K.big_enough)&&!!(null==K?void 0:K.big_enough_decision_factors),ut=null!==(q=null==K?void 0:K.completion_percentage)&&void 0!==q?q:0,dt=!!(null==K?void 0:K.completion_decision_factors),ct=""===$,vt=null!=de?de:w(ue,ct),ft=!te&&!ie;return t.useEffect(function(){if(Tn){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(Tn));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[Tn]),t.useEffect(function(){K.isDefaultEdit&&Sn(function(n){return e.__assign(e.__assign({},n),{userStory:!0})})},[K.isDefaultEdit]),n.jsxs("div",e.__assign({className:r.default.card,style:null==Ye?void 0:Ye.cardStyle,id:"story-card-".concat(K.title),"data-expanded":Mn},{children:[n.jsxs("div",e.__assign({className:r.default.titleSection,style:null==Ye?void 0:Ye.titleSection},{children:[n.jsxs("div",e.__assign({className:r.default.titleRow,style:null==Ye?void 0:Ye.titleRow,onClick:ot},{children:[n.jsxs("div",e.__assign({className:r.default.titleLeft,style:null==Ye?void 0:Ye.titleLeft,onMouseEnter:function(){return $n(!0)},onMouseLeave:function(){return $n(!1)}},{children:[me&&n.jsx(N,{displayName:Z}),Cn&&ft?n.jsx(p.InlineTitleEditor,{title:K.title,onSave:function(n){return function(n,t){return e.__awaiter(void 0,void 0,void 0,function(){var i,s;return e.__generator(this,function(l){try{i=e.__assign({},K),K.artifactId===t?i.title=n:i.sub_features=(null===(s=K.sub_features)||void 0===s?void 0:s.map(function(i){return i.artifactId===t?e.__assign(e.__assign({},i),{title:n}):i}))||[],hn(i),Y(i),jn(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(n,K.artifactId)},onCancel:function(){jn(!1)},inputStyle:null==en?void 0:en.inlineTitleInput,confirmButtonStyle:null==en?void 0:en.inlineTitleConfirm,cancelButtonStyle:null==en?void 0:en.inlineTitleCancel},"inline-title-editor"):n.jsxs("div",e.__assign({className:r.default.storyTitleWrapper},{children:[n.jsx(l.Tooltip,e.__assign({title:I(K.title),arrow:!0},{children:n.jsx("h2",e.__assign({title:Pe?void 0:K.title,className:r.default.storyTitle,style:null==Ye?void 0:Ye.storyTitle},{children:I(K.title)}),K.artifactId)})),Ee&&!rn&&(dt?n.jsx(y.CompletionPanel,e.__assign({customIcons:null==Un?void 0:Un.userStoryIcons,customStyles:null==Ye?void 0:Ye.aiReasoningCitaionStyles,currentUserStory:K,panelStyles:null==Ye?void 0:Ye.CompletionStyles,onToggleStateChange:tt},{children:n.jsxs("div",e.__assign({style:e.__assign(e.__assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==ln?void 0:ln.badge),fn)},{children:[n.jsxs("span",{children:[ut,"% Completed"]}),n.jsx("span",e.__assign({style:{display:"flex",alignItems:"center"}},{children:n.jsx(m.default,{color:"currentColor"})})),nt?n.jsx(i.ChevronUp,{size:14,style:null==ln?void 0:ln.chevronStyle}):n.jsx(i.ChevronDown,{size:14,style:null==ln?void 0:ln.chevronStyle})]}))})):n.jsx("div",e.__assign({style:e.__assign(e.__assign({display:"inline-flex",alignItems:"center",gap:"4px"},null==ln?void 0:ln.badge),fn)},{children:n.jsxs("span",{children:[ut,"% Completed"]})}))),xe&&n.jsx("button",e.__assign({type:"button",className:r.default.titleEditButton,style:null==en?void 0:en.titleEditButton,onClick:function(e){e.stopPropagation(),jn(!0),Mn||qn(!0)},"aria-label":"Edit title",title:"Edit title"},{children:n.jsx("svg",e.__assign({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:n.jsx("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),(ze||void 0!==Ve&&void 0!==We)&&n.jsxs("div",e.__assign({className:r.default.statusContainer},{children:[void 0!==Ve&&void 0!==We&&n.jsxs("div",e.__assign({className:r.default.completedBadge},{children:["Completed: ",Ve,"/",We]})),ze&&n.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==Oe||Oe()},className:r.default.statusButton,style:_n[ze]},{children:j[ze]}))]})),n.jsxs("div",e.__assign({className:r.default.titleActions,style:null==Ye?void 0:Ye.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(vt.showProgressPercentage||vt.showGapBox)&&ve&&n.jsxs("div",e.__assign({className:r.default.progressHeader,style:null==tn?void 0:tn.wrapper},{children:[vt.showProgressPercentage&&n.jsxs("div",e.__assign({className:r.default.progressPercentage,style:null==tn?void 0:tn.percentage},{children:[null!==(F=null!==(L=null==K?void 0:K.confidenceScore)&&void 0!==L?L:null==vt?void 0:vt.confidenceValue)&&void 0!==F?F:"0","%"]})),vt.showGapBox&&n.jsxs("div",e.__assign({className:r.default.gapBox,style:null==tn?void 0:tn.gapBox},{children:[null!==(O=null!==(z=null==K?void 0:K.gapValue)&&void 0!==z?z:null==vt?void 0:vt.gapBoxValue)&&void 0!==O?O:"2"," ","Gaps"]}))]})),rt&&n.jsx(g.BigEnoughPanel,{customIcons:null==Un?void 0:Un.userStoryIcons,customStyles:null==Ye?void 0:Ye.aiReasoningCitaionStyles,currentUserStory:K,panelStyles:null==Ye?void 0:Ye.BigEnoughStyles}),!mn.userStory&&n.jsxs(n.Fragment,{children:[!1!==(null==vt?void 0:vt.showShareButton)&&n.jsx("button",e.__assign({className:r.default.iconButton,style:null==Ye?void 0:Ye.iconButton,onClick:function(e){Vn(e.currentTarget)}},{children:n.jsx(i.ExternalLink,{size:16})})),n.jsxs(l.Menu,e.__assign({id:"user-story-share-menu",anchorEl:On,open:!!On,onClose:function(){return Vn(null)},style:null==Ye?void 0:Ye.userStoryShareMenu},{children:[ne&&n.jsx(l.MenuItem,e.__assign({style:null==Ye?void 0:Ye.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return Fn(!0),se?[4,Promise.all([se("pdf"),se("doc")])]:[2];case 1:return e.sent(),Fn(!1),[2]}})})}},{children:n.jsxs("div",e.__assign({ref:Jn,className:r.default.menuItemContent,style:null==Ye?void 0:Ye.menuItemContent},{children:[n.jsx(i.Download,{size:16,color:null==Ye?void 0:Ye.menuIconColor}),n.jsx("p",e.__assign({style:null==Ye?void 0:Ye.menuLabel},{children:"Download"}))]}))})),n.jsx(l.MenuItem,e.__assign({style:null==Ye?void 0:Ye.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n;return e.__generator(this,function(t){return n=K,J&&(n=e.__assign(e.__assign({},K),{value:"".concat(d.replaceTitleSection(null==J?void 0:J.value,K.title)," \n").concat(K.value)})),null==le||le(!0,[n],K.artifactId),st(),[2]})})}},{children:n.jsxs("div",e.__assign({style:null==Ye?void 0:Ye.menuItemContent,className:r.default.menuItemContentPadded},{children:[n.jsx(i.Share2,{size:16,color:null==Ye?void 0:Ye.menuIconColor}),n.jsx("p",e.__assign({style:null==Ye?void 0:Ye.menuLabel},{children:"Send"}))]}))})),n.jsx(l.MenuItem,e.__assign({style:null==Ye?void 0:Ye.userStoryMenuItem,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n,t,i,s,l;return e.__generator(this,function(e){switch(e.label){case 0:n=new C.default.Converter,t=n.makeHtml(u.formatMarkdown(K.value)||K.value),i=function(e){var n=(new C.default.Converter).makeHtml(e),t=document.createElement("div");return t.innerHTML=n,t.textContent||t.innerText||""}(u.formatMarkdown(K.value)||K.value),s=new ClipboardItem({"text/plain":new Blob([i],{type:"text/plain"}),"text/html":new Blob([t],{type:"text/html"})}),e.label=1;case 1:return e.trys.push([1,3,4,5]),[4,navigator.clipboard.write([s])];case 2:return e.sent(),console.log("Copied User Story"),[3,5];case 3:return l=e.sent(),console.error("Failed to copy user story:",l),[3,5];case 4:return st(),[7];case 5:return[2]}})})}},{children:n.jsxs("div",e.__assign({style:null==Ye?void 0:Ye.menuItemContent,className:r.default.menuItemContentPadded},{children:[n.jsx(i.Copy,{size:16,color:null==Ye?void 0:Ye.menuIconColor}),n.jsx("p",e.__assign({style:null==Ye?void 0:Ye.menuLabel},{children:"Copy"}))]}))}))]}))]}),mn.userStory&&Mn?n.jsx(c.default,{type:"outline",children:"Cancel",style:null==Ye?void 0:Ye.cancelButton,onClick:function(){var n;null===(n=it.current)||void 0===n||n.abort(),Sn(function(n){return e.__assign(e.__assign({},n),{userStory:!1})})}}):n.jsx(n.Fragment,{}),mn.userStory&&Mn?n.jsx(c.default,{type:"fill",children:Xn?n.jsxs("span",e.__assign({className:r.default.savingSpinner,style:null==Ye?void 0:Ye.savingSpinner},{children:[n.jsx(i.LoaderCircle,{className:r.default.spinAnimation,style:null==Ye?void 0:Ye.spinAnimation}),n.jsx("span",{children:"Saving..."})]})):"Save",isDisable:Xn,style:Xn?null==Ye?void 0:Ye.savingButton:null==Ye?void 0:Ye.saveButton,onClick:function(){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,at()];case 1:return e.sent(),[2]}})})}}):!te&&!ie&&!Ae&&Mn&&!1!==(null==vt?void 0:vt.showEditButton)&&n.jsx("button",e.__assign({className:r.default.iconButton,style:null==Ye?void 0:Ye.editButton,onClick:function(){return Sn(function(n){return e.__assign(e.__assign({},n),{userStory:!0})})}},{children:n.jsx(i.PencilIcon,{color:null==Ye?void 0:Ye.pencilIconColor,size:16})})),Be&&ct&&Mn&&!te&&!ie&&!1!==(null==vt?void 0:vt.showEditButton)&&n.jsxs("button",e.__assign({type:"button",className:r.default.addSectionButton,style:null==en?void 0:en.addSectionButton,onClick:function(n){var t,i,s;n.stopPropagation();var l=(null!==(i=null===(t=K.sub_features)||void 0===t?void 0:t.length)&&void 0!==i?i:0)+1,o={artifactId:a.v4(),title:"New Section ".concat(l),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},r=e.__assign(e.__assign({},K),{sub_features:e.__spreadArray(e.__spreadArray([],null!==(s=K.sub_features)&&void 0!==s?s:[],!0),[o],!1)});hn(r),Y(r),qn(!0),An(o.title)},"aria-label":"Add section",title:"Add section"},{children:[n.jsx(i.Plus,{size:14}),n.jsx("span",e.__assign({className:r.default.addSectionLabel},{children:"Add Section"}))]})),!ct&&!te&&!Ae&&!ie&&n.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),null==ge||ge()},className:r.default.iconButton,style:null==en?void 0:en.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:n.jsx(i.Trash2,{size:16})})),rn&&n.jsx("button",e.__assign({type:"button",className:r.default.iconButton,disabled:cn,onClick:function(e){if(e.stopPropagation(),wn)return Dn(null),void Nn(!1);Dn(structuredClone(null!=un?un:{})),qn(!0),Nn(!0)}},{children:wn?n.jsx(i.X,{size:16,color:null==Ye?void 0:Ye.pencilIconColor}):n.jsx(i.PencilIcon,{size:16,color:null==Ye?void 0:Ye.pencilIconColor})})),(null==vt?void 0:vt.actionItemsButton)&&n.jsxs(n.Fragment,{children:[n.jsx("span",e.__assign({className:r.default.actionItemBtn,style:null==Ye?void 0:Ye.actionItemBtn,onClick:function(e){e.stopPropagation(),Hn(e.currentTarget)}},{children:n.jsx(i.Ellipsis,{})})),n.jsx(l.Menu,e.__assign({id:"user-story-action-menu",anchorEl:Gn,open:!!Gn,onClose:lt,style:null==Ye?void 0:Ye.userStoryShareMenu},{children:null==_e?void 0:_e.items.map(function(t,i){return n.jsx(l.MenuItem,e.__assign({style:null==Ye?void 0:Ye.userStoryMenuItem,onClick:function(){t.onclick(K),lt()}},{children:n.jsxs("div",e.__assign({className:r.default.menuItemContent,style:e.__assign(e.__assign({},null==Ye?void 0:Ye.menuItemContent),!t.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[n.jsx("span",e.__assign({className:r.default.menuItemIcon,style:null==Ye?void 0:Ye.menuItemIcon},{children:t.icon})),n.jsx("p",e.__assign({style:null==Ye?void 0:Ye.menuLabel},{children:t.name})),n.jsx("span",{className:r.default.menuItemRight,style:null==Ye?void 0:Ye.menuItemRight})]}))}),"action-item-".concat(i,"-").concat(t.name))})}))]}),n.jsx("button",e.__assign({type:"button",onClick:function(e){e.stopPropagation(),ot()},style:null==Ye?void 0:Ye.chevronButton,className:r.default.chevronButton},{children:Mn?n.jsx(i.ChevronUp,{className:r.default.chevronIcon,color:null==Ye?void 0:Ye.chevronIconColor}):n.jsx(i.ChevronDown,{className:r.default.chevronIcon,color:null==Ye?void 0:Ye.chevronIconColor})}))]}))]})),n.jsx("div",{className:r.default.divider,style:null==Ye?void 0:Ye.dividerStyle})]})),Mn&&n.jsx("div",e.__assign({className:r.default.cardContent,style:e.__assign(e.__assign({},null==Ye?void 0:Ye.cardContentStyle),{borderTop:we?"1px solid #E5E5E5":"none"})},{children:Le?n.jsxs("div",e.__assign({className:r.default.loadingContainer},{children:[n.jsx("div",e.__assign({className:r.default.loadingIconWrapper},{children:n.jsx(i.Hourglass,{size:28,color:"#5B3DF5",className:r.default.spinAnimation})})),n.jsxs("div",{children:[n.jsx("h3",e.__assign({className:r.default.loadingTitle},{children:"Section generation in progress.."})),n.jsx("p",e.__assign({className:r.default.loadingSubtitle},{children:"This may take a few minutes"}))]}),n.jsx("button",e.__assign({type:"button",onClick:function(){return null==Fe?void 0:Fe()},className:r.default.viewStatusButton},{children:"View Status"}))]})):He?n.jsxs("div",e.__assign({className:r.default.noDataContainer,style:null==on?void 0:on.container},{children:[n.jsx("img",{src:o.default,alt:"No data available",className:r.default.noDataIllustration,style:null==on?void 0:on.illustration}),n.jsx("h3",e.__assign({className:r.default.noDataTitle,style:null==on?void 0:on.title},{children:"No Data Available for This Section"})),n.jsx("p",e.__assign({className:r.default.noDataSubtitle,style:null==on?void 0:on.subtitle},{children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."}))]})):n.jsxs("div",e.__assign({className:r.default.contentInner,style:null==Ye?void 0:Ye.contentInner},{children:[n.jsxs("div",e.__assign({className:r.default.descriptionSection,style:null==Ye?void 0:Ye.descriptionSection},{children:[n.jsx("div",{className:r.default.justifyBetween,style:null==Ye?void 0:Ye.justifyBetween}),mn.userStory?n.jsx(v.default,{ref:Kn,minHeight:"100%",height:"100%",type:"string",value:u.formatMarkdown(K.value)||"",handleUpdateState:function(n,t){var i=u.indentMarkdown(t);hn(function(n){return e.__assign(e.__assign({},n),{value:i||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:mn.userStory?"edit":"readOnly",onSaveUnsavedChanges:function(){return e.__awaiter(void 0,void 0,void 0,function(){return e.__generator(this,function(e){switch(e.label){case 0:return[4,at()];case 1:return e.sent(),qn(!1),[2]}})})},onDiscardUnsavedChanges:function(){hn(e.__assign(e.__assign({},structuredClone(K)),{value:u.formatMarkdown(K.value)||""})),Sn(function(n){return e.__assign(e.__assign({},n),{userStory:!1})}),qn(!1)},isSavingUnsavedChanges:Xn}):rn?n.jsx(h.default,{styles:sn,fields:dn,readonly:!wn,isSaving:vn,value:null!==(V=null!=En?En:un)&&void 0!==V?V:{},onChange:Dn,onSave:function(){return e.__awaiter(void 0,void 0,void 0,function(){var n;return e.__generator(this,function(e){switch(e.label){case 0:return En?[4,null===(n=null==Ke?void 0:Ke.onSave)||void 0===n?void 0:n.call(Ke,K,En)]:[2];case 1:return e.sent(),Dn(null),Nn(!1),[2]}})})},onCancel:function(){Dn(null),Nn(!1)}}):n.jsxs(n.Fragment,{children:[n.jsx(f.default,{showUserStoryDiff:ie,isParent:""===$,message:u.formatMarkdown(K.value)||"",artifactId:K.artifactId,customStyles:nn,isDisplayHighlightControl:re,contextVariant:pe,showConfidenceScore:je,CDNeededInChip:Re}),Ue&&n.jsx("div",e.__assign({className:r.default.approveButtonContainer,style:null==an?void 0:an.container},{children:n.jsx("button",e.__assign({type:"button",className:r.default.approveButton,style:null==an?void 0:an.button,disabled:Ue.disabled||Ue.isLoading,onClick:function(e){var n;e.stopPropagation(),null===(n=null==Ue?void 0:Ue.onClick)||void 0===n||n.call(Ue)}},{children:Ue.isLoading?n.jsxs(n.Fragment,{children:[n.jsx(i.LoaderCircle,{size:16,className:r.default.spinner,style:null==an?void 0:an.icon}),n.jsx("span",e.__assign({style:null==an?void 0:an.text},{children:Ue.label}))]}):n.jsxs(n.Fragment,{children:[n.jsx("span",e.__assign({style:null==an?void 0:an.text},{children:Ue.label})),n.jsx(i.Check,{size:16,style:null==an?void 0:an.icon})]})}))}))]})]})),null===(W=pn.sub_features)||void 0===W?void 0:W.map(function(t,i){var s=w(ue,!1,t.artifactId);return n.jsx(b,{artifactId:X,isUserStoryCurrentlyUpdated:Q,artifactTitleId:"".concat(Z,"-").concat(String.fromCharCode(65+i)),parentUserStory:K,parentIndex:"".concat($).concat($&&".").concat(ee),currentIndex:"".concat(i+1),doNotShowBorderInViewMode:!1,currentUserStory:t,onUserStoryChange:function(n){return function(n,t){var i=e.__spreadArray([],K.sub_features||[],!0);i[n]=t,Y(e.__assign(e.__assign({},K),{sub_features:i}))}(i,n)},enableDownload:!0,isDiffEditReviewMode:te,showUserStoryDiff:ie,updateUserStoryArtifact:oe,handleDownloadUserStory:se,handleOpenSendDialog:le,isDisplayHighlightControl:re,elementDisplayConfig:ue,_resolvedConfig:s,actionItemsConfig:_e,onDelete:function(){return function(n){var t=(K.sub_features||[]).filter(function(e,t){return t!==n}),i=e.__assign(e.__assign({},K),{sub_features:t});hn(i),Y(i)}(i)},expandedSubFeatures:he,disableEditPlan:Ae,useMuiTooltip:Pe},t.artifactId)})]}))}))]}))};exports.StoryCard=b,exports.UserStoryCardWrapper=function(t){var s=t.artifactTitleIDs,l=t.expandedSubFeatures,o=t.isDiffEditReviewMode,a=t.showUserStoryDiff,u=t.updateUserStoryArtifact,d=t.isUserStoryCurrentlyUpdated,c=t.artifactId,v=t.handleOpenSendDialog,f=t.handleDownloadUserStory,g=t.selectedArtifactId,p=t.isDisplayHighlightControl,h=t.elementDisplayConfig,y=t.showWrapper,m=t.actionItemsConfig,S=t.contextVariant,x=t.showDisplayName,C=t.allowTitleEdit,j=t.showConfidenceScore,I=t.showBorderTop,N=t.defaultExpanded,E=t.showCompletionPanel,D=void 0!==E&&E,B=t.showAddSectionButton,T=void 0!==B&&B,A=t.disableEditPlan,k=void 0!==A&&A,P=t.useMuiTooltip,U=void 0!==P&&P,R=t.approveButtonConfig,M=t.CDNeededInChip,q=_.useRequirementAI(),L=q.userStory,F=q.setUserStory,z=q.customStyles,O=q.searchQueryList,V=q.currentHighlightIndex,W=q.setCurrentHighlightIndex;q.segmentComponentConfig;var G=q.sectionStatusConfig,H=null==z?void 0:z.userStoryCardStyles,Q=0===V,X=V===O.length-1;return n.jsxs("div",e.__assign({className:r.default.userStoryCardWrapper,style:p?e.__assign(e.__assign({},null==H?void 0:H.userStoryCardWrapper),{position:"relative"}):null==H?void 0:H.userStoryCardWrapper},{children:[p&&n.jsx(n.Fragment,{children:O.length>0&&n.jsx("div",e.__assign({className:r.default.wrapper},{children:n.jsx("div",e.__assign({className:r.default.highlightNavigation},{children:n.jsxs("div",e.__assign({className:r.default.navigationContainer},{children:[n.jsxs("span",e.__assign({className:r.default.navCounter},{children:[V+1," of ",O.length]})),n.jsxs("div",e.__assign({className:r.default.navButtons},{children:[n.jsx("button",e.__assign({onClick:function(){V>0&&W(function(e){return e-1})},className:r.default.navButton,disabled:Q},{children:n.jsx(i.ChevronUpIcon,{size:20,className:r.default.navIcon})})),n.jsx("button",e.__assign({onClick:function(){V<O.length-1&&W(function(e){return e+1})},className:r.default.navButton,disabled:X},{children:n.jsx(i.ChevronDownIcon,{size:20,className:r.default.navIcon})}))]}))]}))}))}))}),L.map(function(t,i){var r=w(h,!0);return n.jsx(b,{isUserStoryCurrentlyUpdated:d,artifactId:c,artifactTitleId:s[i]||"",expandedSubFeatures:l,currentUserStory:t,onUserStoryChange:function(n){F(function(t){return t[i]=n,e.__spreadArray([],t,!0)})},parentIndex:"",currentIndex:"".concat(i+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:o,showUserStoryDiff:a,updateUserStoryArtifact:u,handleOpenSendDialog:v,handleDownloadUserStory:f,selectedArtifactId:g,isDisplayHighlightControl:p,elementDisplayConfig:h,_resolvedConfig:r,showWrapper:y,defaultExpanded:N,actionItemsConfig:m,contextVariant:S,showDisplayName:x,allowTitleEdit:C,showConfidenceScore:j,showBorderTop:I,sectionStatusConfig:G,showCompletionPanel:D,showAddSectionButton:T,disableEditPlan:k,useMuiTooltip:U,approveButtonConfig:R,CDNeededInChip:M},t.artifactId)})]}))},exports.default=b,exports.replaceLearnedTagsWithInfo=I;
|
|
2
2
|
//# sourceMappingURL=UserStoryCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e}from"tslib";import{
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as r}from"tslib";import{jsxs as n,jsx as o}from"react/jsx-runtime";import{forwardRef as i,useRef as a,useState as c,useEffect as u,useImperativeHandle as l}from"react";import{DEFAULT_TOOLBAR_CONFIG as d}from"./Editor/constants/editorConfig.js";import s from"./Editor/Editor.js";import{useRefStore as f}from"../../store/ref.context.js";import{$generateHtmlFromNodes as h}from"@lexical/html";import m from"turndown";import{tables as p}from"turndown-plugin-gfm";import{UnsavedChangesPopup as v}from"../UnsavedChangesPopup/UnsavedChangesPopup.js";var g=new m({headingStyle:"atx",codeBlockStyle:"fenced"});g.keep(["ins","del","mark"]),g.keep(function(e){var t,r;return"A"===e.nodeName&&null!==(r=null===(t=e.getAttribute("href"))||void 0===t?void 0:t.includes("ai_reasoning$"))&&void 0!==r&&r}),g.keep(function(e){return"SPAN"===e.nodeName&&e.hasAttribute("highlight-id")}),g.addRule("md-table-passthrough",{filter:function(e){return"PRE"===e.nodeName&&"true"===e.getAttribute("data-md-table")},replacement:function(e,t){return t.textContent||""}}),g.use(p);var E=function(e){return(e||"").replace(/\r\n/g,"\n").trim()},A=i(function(i,m){var p=i.type,A=i.value,w=i.handleUpdateState,y=i.onBlur,b=i.placeholder,S=i.minHeight,C=i.height,x=i.mode,N=i.doNotShowBorderInViewMode,T=i.onSaveUnsavedChanges,L=i.onDiscardUnsavedChanges,q=i.isSavingUnsavedChanges,B=void 0!==q&&q,H=a(null),_=c({type:p,value:A}),M=_[0],R=_[1],W=c(0),j=W[0],k=W[1],U=c(!1),D=U[0],P=U[1],I=a(A),V=a(A),$=a(Boolean(A)),O=f(),z=O.contentRef;O.setContentRef;u(function(){R(function(t){return e(e({},t),{value:A})}),I.current=A,V.current=A,$.current=Boolean(A),P(!1)},[A]),l(m,function(){return{requestClose:function(){return!("edit"===x&&E(I.current)!==E(V.current))||(P(!0),!1)}}},[x]);return u(function(){var e=function(){z&&z.current&&k(z.current.clientHeight-60)};return e(),window.addEventListener("resize",e),function(){window.removeEventListener("resize",e)}},[z]),n("div",e({style:{position:"relative",width:"100%",height:C,minHeight:S}},{children:[D&&o(v,{isSaving:B,onSave:function(){return t(void 0,void 0,void 0,function(){return r(this,function(e){switch(e.label){case 0:return[4,null==T?void 0:T()];case 1:return e.sent(),I.current=V.current,P(!1),[2]}})})},onDiscard:function(){V.current=I.current,null==L||L(),P(!1)}}),o(s,{minHeight:S,height:C,placeholder:b||"Enter some text...",onChange:function(e,t){e.read(function(){var e=h(t,null),r=(new DOMParser).parseFromString(e,"text/html");function n(e){return Array.from(e.childNodes).map(function(e){if(e.nodeType===Node.TEXT_NODE)return e.textContent||"";if(e.nodeType===Node.ELEMENT_NODE){var t=e,r=t.tagName.toLowerCase(),o=n(t);if("strong"===r||"b"===r)return o.startsWith("<strong>")&&o.endsWith("</strong>")?o:"<strong>".concat(o,"</strong>");if("em"===r||"i"===r)return o.startsWith("<em>")&&o.endsWith("</em>")?o:"<em>".concat(o,"</em>");if("code"===r)return"<code>".concat(o,"</code>");if("u"===r)return"<u>".concat(o,"</u>");if("s"===r)return"<s>".concat(o,"</s>");if("a"===r){var i=t.getAttribute("href")||"";return'<a href="'.concat(i,'">').concat(o,"</a>")}return o}return""}).join("")}r.querySelectorAll("span").forEach(function(e){var t=e.getAttribute("style")||"";t.includes("background-color")&&t.includes("rgb(219, 234, 254)")&&e.setAttribute("data-review","insert"),t.includes("text-decoration")&&t.includes("line-through")&&e.setAttribute("data-review","delete")}),r.querySelectorAll("strong code").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll("code strong").forEach(function(e){var t=e.parentElement;t&&t.replaceChild(document.createTextNode(e.textContent||""),e)}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(function(e){var t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,""))}),r.querySelectorAll('a[href*="ai_reasoning$"]').forEach(function(e){var t=e.getAttribute("href")||"";e.setAttribute("href",t.replace(/^https?:\/\//,""))}),r.querySelectorAll("ins[data-review-id], del[data-review-id]").forEach(function(e){e.innerHTML=n(e)});var o=[];r.querySelectorAll("ins[data-review-id], del[data-review-id]").forEach(function(e,t){o.push(e.outerHTML);var n=r.createElement("span");n.textContent="%%REVIEW_".concat(t,"%%"),e.replaceWith(n)});var i=[];r.querySelectorAll("table").forEach(function(e,t){i.push(e.outerHTML);var n=r.createElement("p");n.textContent="%%TABLE_".concat(t,"%%"),e.replaceWith(n)});var a=g.turndown(r.body.innerHTML);o.forEach(function(e,t){a=a.replace("%%REVIEW\\_".concat(t,"%%"),e)}),i.forEach(function(e,t){a=a.replace("%%TABLE\\_".concat(t,"%%"),"\n\n".concat(e,"\n\n"))}),a=a.replace(/\*{4}([^*]+)\*{4}/g,"**$1**"),$.current&&(I.current=a,$.current=!1),V.current=a,function(e,t){w(e,t)}("prompt",a)})},toolbarConfig:d,editorRef:H,mode:x,initialString:{type:M.type,value:M.value},dynamicHeight:j,onBlur:y,doNotShowBorderInViewMode:N||!1})]}))});A.displayName="RichTextEditor";export{A as default};
|
|
2
2
|
//# sourceMappingURL=RichTextEditor.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{__assign as e}from"tslib";import{jsx as a,jsxs as s}from"react/jsx-runtime";import n from"./UnsavedChangesPopup.module.css.js";var o=function(o){var i=o.isSaving,t=void 0!==i&&i,l=o.onSave,c=o.onDiscard;return a("div",e({className:n.overlay,onClick:function(e){return e.stopPropagation()},role:"presentation"},{children:s("div",e({className:n.dialog,role:"dialog","aria-modal":"true","aria-labelledby":"unsaved-changes-title"},{children:[a("h3",e({id:"unsaved-changes-title",className:n.title},{children:"Unsaved changes"})),a("p",e({className:n.message},{children:"We see, you have unsaved changes, click on Yes to save your changes, else click on No."})),s("div",e({className:n.actions},{children:[a("button",e({type:"button",className:n.noButton,onClick:c,disabled:t},{children:"No"})),a("button",e({type:"button",className:n.yesButton,onClick:l,disabled:t},{children:t?"Saving...":"Yes"}))]}))]}))}))};export{o as UnsavedChangesPopup,o as default};
|
|
2
|
+
//# sourceMappingURL=UnsavedChangesPopup.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsavedChangesPopup.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
package/dist/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.module.css.js
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var e={overlay:"UnsavedChangesPopup-module_overlay__hSGb2",dialog:"UnsavedChangesPopup-module_dialog__TIloc",title:"UnsavedChangesPopup-module_title__fWQ1u",message:"UnsavedChangesPopup-module_message__KWuvt",actions:"UnsavedChangesPopup-module_actions__4C-2B",noButton:"UnsavedChangesPopup-module_noButton__fP-Fy",yesButton:"UnsavedChangesPopup-module_yesButton__2IG5l"};!function(){if("undefined"==typeof document)return;const e=document.createElement("style");e.type="text/css";const o=window.__CSP_NONCE__||document.querySelector('meta[name="csp-nonce"]')?.content;o&&e.setAttribute("nonce",o),e.appendChild(document.createTextNode(".UnsavedChangesPopup-module_overlay__hSGb2{align-items:flex-start;background:#0f172a47;display:flex;inset:0;justify-content:center;padding:24px 16px 16px;position:absolute;z-index:20}.UnsavedChangesPopup-module_dialog__TIloc{background:#fff;border:1px solid #e5e7eb;border-radius:8px;box-shadow:0 18px 45px #0f172a2e;cursor:default;padding:20px;width:min(420px,100%)}.UnsavedChangesPopup-module_title__fWQ1u{color:#111827;font-size:18px;font-weight:600;line-height:26px;margin:0}.UnsavedChangesPopup-module_message__KWuvt{color:#4b5563;font-size:14px;line-height:20px;margin:8px 0 0}.UnsavedChangesPopup-module_actions__4C-2B{display:flex;gap:10px;justify-content:flex-end;margin-top:20px}.UnsavedChangesPopup-module_noButton__fP-Fy,.UnsavedChangesPopup-module_yesButton__2IG5l{border-radius:6px;cursor:pointer;font-size:14px;font-weight:600;min-width:72px;padding:8px 14px}.UnsavedChangesPopup-module_noButton__fP-Fy{background:#fff;border:1px solid #d1d5db;color:#374151}.UnsavedChangesPopup-module_yesButton__2IG5l{background:#5b3df5;border:1px solid #5b3df5;color:#fff}.UnsavedChangesPopup-module_noButton__fP-Fy:disabled,.UnsavedChangesPopup-module_yesButton__2IG5l:disabled{cursor:not-allowed;opacity:.6}"));const n=document.head||document.getElementsByTagName("head")[0]||document.documentElement;n&&n.appendChild(e)}();export{e as default};
|
|
2
|
+
//# sourceMappingURL=UnsavedChangesPopup.module.css.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsavedChangesPopup.module.css.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as e,__awaiter as t,__generator as n,__spreadArray as o}from"tslib";import{jsxs as l,jsx as i,Fragment as r}from"react/jsx-runtime";import{useState as a,useRef as s,useEffect as d}from"react";import{ChevronUp as u,ChevronDown as c,ExternalLink as v,Download as p,Share2 as m,Copy as h,LoaderCircle as f,PencilIcon as y,Plus as S,Trash2 as g,X as C,Ellipsis as I,Hourglass as N,Check as b,ChevronUpIcon as w,ChevronDownIcon as D,Info as E,Bookmark as B}from"lucide-react";import x from"showdown";import{Tooltip as T,Menu as A,MenuItem as P}from"@mui/material";import U from"../../icons/Illustration.svg.js";import{v4 as k}from"uuid";import R from"./UserStoryCard.module.css.js";import{formatMarkdown as _,indentMarkdown as M}from"../../utils/helpers.js";import{replaceTitleSection as L}from"../../utils/user-story.utils.js";import j from"../../shared/AtomicButton.js";import V from"../RichTextEditor/RichTextEditor.js";import G from"../userstory-with-citation/UserStoryWithCitation.js";import{SectionStatus as O,useRequirementAI as z}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as H}from"../story-screen/BigEnoughPanel.js";import{InlineTitleEditor as W}from"./TitleEditor/TitleEditor.js";import F from"./ClinicalTrialSection.js";import{CompletionPanel as q}from"../story-screen/CompletionPanel.js";import Q from"../../icons/CDIcon.js";var Z,J=((Z={})[O.WAITING]="WAITING TO GENERATE",Z[O.IN_PROGRESS]="IN PROGRESS",Z[O.GENERATED]="GENERATED",Z[O.FAILED]="FAILED",Z[O.GENERATE]="GENERATE",Z[O.APPROVED]="APPROVED",Z);function K(t){for(var n,o=[],l=/<learned>(.*?)<\/learned>/g,r=0,a=0;null!==(n=l.exec(t));){var s=n[1],d=n.index;d>r&&o.push(i("span",{children:t.slice(r,d)},"text-pre-".concat(a++))),o.push(i(T,e({title:s,placement:"top"},{children:i(E,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(k()))),r=l.lastIndex}return r<(null==t?void 0:t.length)&&o.push(i("span",{children:t.slice(r)},"text-post-".concat(a++))),o}function X(t,n,o){var l;if(!t)return{};if(n)return e({},t.parentConfig);var i=e({},t.childConfig);return o&&(null===(l=t.subFeatureOverrides)||void 0===l?void 0:l[o])?e(e({},i),t.subFeatureOverrides[o]):i}var Y=function(t){var n,o=t.displayName,r=z().customStyles,a=null===(n=null==r?void 0:r.userStoryCardStyles)||void 0===n?void 0:n.showDisplayName;return l("div",e({className:R.displayName,style:null==a?void 0:a.wrapper},{children:[i(B,{className:R.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),l("span",e({style:null==a?void 0:a.label},{children:[o,":"]}))]}))},$=function(w){var D,E,B,Z,ee,te,ne,oe,le,ie,re,ae,se,de,ue,ce,ve,pe,me,he=w.isUserStoryCurrentlyUpdated,fe=w.artifactId,ye=w.artifactTitleId,Se=w.parentUserStory,ge=w.currentUserStory,Ce=w.onUserStoryChange,Ie=w.parentIndex,Ne=w.currentIndex,be=w.enableDownload,we=w.isDiffEditReviewMode,De=w.showUserStoryDiff,Ee=w.handleDownloadUserStory,Be=w.handleOpenSendDialog,xe=w.updateUserStoryArtifact,Te=w.selectedArtifactId,Ae=w.isDisplayHighlightControl,Pe=w.elementDisplayConfig,Ue=w._resolvedConfig,ke=w.showWrapper,Re=void 0!==ke&&ke,_e=w.defaultExpanded,Me=w.actionItemsConfig,Le=w.onDelete,je=w.contextVariant,Ve=w.expandedSubFeatures,Ge=w.showDisplayName,Oe=void 0===Ge||Ge,ze=w.allowTitleEdit,He=void 0===ze||ze,We=w.showConfidenceScore,Fe=void 0===We||We,qe=w.showBorderTop,Qe=void 0===qe||qe,Ze=w.sectionStatusConfig,Je=w.showCompletionPanel,Ke=void 0!==Je&&Je,Xe=w.showAddSectionButton,Ye=void 0!==Xe&&Xe,$e=w.disableEditPlan,et=void 0!==$e&&$e,tt=w.useMuiTooltip,nt=void 0!==tt&&tt,ot=w.approveButtonConfig,lt=w.CDNeededInChip,it=null!=Ze?Ze:{},rt=it.isLoadingSectionData,at=void 0!==rt&&rt,st=it.onLoadSectionData,dt=it.status,ut=it.onStatusClick,ct=it.completedCount,vt=it.totalCount,pt=it.isNoDataAvailable,mt=void 0!==pt&&pt,ht=z(),ft=ht.searchQueryList,yt=ht.citations,St=ht.customStyles,gt=ht.customSectionConfig,Ct=null==St?void 0:St.userStoryCardStyles,It=null==Ct?void 0:Ct.statusStyles,Nt=null===(E=null==St?void 0:St.userStoryCardStyles)||void 0===E?void 0:E.userStoryEditStyles,bt=null===(B=null==St?void 0:St.userStoryScreenStyles)||void 0===B?void 0:B.userStoryContentStyles,wt=null==Ct?void 0:Ct.progressHeaderStyles,Dt=null==Ct?void 0:Ct.clinicalTrialSectionStyles,Et=null==Ct?void 0:Ct.CompletionStyles,Bt=null==Ct?void 0:Ct.noDataStyles,xt=null==Ct?void 0:Ct.approveButtonStyles,Tt=null!==(ee=null===(Z=null==gt?void 0:gt.shouldRender)||void 0===Z?void 0:Z.call(gt,ge))&&void 0!==ee&&ee,At=null===(te=null==gt?void 0:gt.getValue)||void 0===te?void 0:te.call(gt,ge),Pt=null!==(oe=null===(ne=null==gt?void 0:gt.getFields)||void 0===ne?void 0:ne.call(gt,ge))&&void 0!==oe?oe:[],Ut=null!==(le=null==gt?void 0:gt.isEditDisabled)&&void 0!==le&&le,kt=null!==(re=null===(ie=null==gt?void 0:gt.isSaving)||void 0===ie?void 0:ie.call(gt,ge))&&void 0!==re&&re,Rt=function(e,t){return e>=80?null==t?void 0:t.highCompletion:e>=50?null==t?void 0:t.mediumCompletion:null==t?void 0:t.lowCompletion}(null!==(ae=ge.completion_percentage)&&void 0!==ae?ae:0,Et),_t=((D={})[O.WAITING]=null==It?void 0:It.waiting,D[O.IN_PROGRESS]=null==It?void 0:It.inProgress,D[O.GENERATED]=null==It?void 0:It.generated,D[O.FAILED]=null==It?void 0:It.failed,D[O.GENERATE]=null==It?void 0:It.generate,D[O.APPROVED]=null==It?void 0:It.approved,D),Mt=a(e(e({},structuredClone(ge)),{value:_(ge.value)||""})),Lt=Mt[0],jt=Mt[1],Vt=a({userStory:!!ge.isDefaultEdit}),Gt=Vt[0],Ot=Vt[1],zt=a(!1),Ht=zt[0],Wt=zt[1],Ft=a(!1),qt=Ft[0],Qt=Ft[1],Zt=a(null),Jt=Zt[0],Kt=Zt[1],Xt=a(null),Yt=Xt[0],$t=Xt[1],en=z(),tn=en.userStory,nn=en.customIcons,on=a(null!=_e?_e:""===Ie||Te===ge.artifactId||!!ge.isDefaultOpen),ln=on[0],rn=on[1],an=a(!1);an[0];var sn=an[1],dn=a(null),un=dn[0],cn=dn[1],vn=a(null),pn=vn[0],mn=vn[1],hn=a(!1),fn=hn[0],yn=hn[1],Sn=s(null),gn=a(!1);gn[0];var Cn=gn[1],In=a(!1),Nn=In[0],bn=In[1],wn=s(null);d(function(){he&&rn(he)},[he]),d(function(){jt(e(e({},structuredClone(ge)),{value:_(ge.value)||""}))},[ge]),d(function(){ft.length>0?rn(!0):void 0===_e&&(Te?rn(Te===ge.artifactId):Ve&&Ve.length>0&&rn(Ve.includes(ge.artifactId)))},[ft,Te,ge.artifactId,Ve]);var Dn=function(){cn(null)},En=function(){mn(null)},Bn=function(){rn(function(e){return!e})};var xn=null!=(null==ge?void 0:ge.big_enough)&&!Number.isNaN(ge.big_enough)&&!!(null==ge?void 0:ge.big_enough_decision_factors),Tn=null!==(se=null==ge?void 0:ge.completion_percentage)&&void 0!==se?se:0,An=!!(null==ge?void 0:ge.completion_decision_factors),Pn=""===Ie,Un=null!=Ue?Ue:X(Pe,Pn),kn=!we&&!De;return d(function(){if(Yt){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(Yt));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[Yt]),d(function(){ge.isDefaultEdit&&Ot(function(t){return e(e({},t),{userStory:!0})})},[ge.isDefaultEdit]),l("div",e({className:R.card,style:null==Ct?void 0:Ct.cardStyle,id:"story-card-".concat(ge.title),"data-expanded":ln},{children:[l("div",e({className:R.titleSection,style:null==Ct?void 0:Ct.titleSection},{children:[l("div",e({className:R.titleRow,style:null==Ct?void 0:Ct.titleRow,onClick:Bn},{children:[l("div",e({className:R.titleLeft,style:null==Ct?void 0:Ct.titleLeft,onMouseEnter:function(){return Cn(!0)},onMouseLeave:function(){return Cn(!1)}},{children:[Oe&&i(Y,{displayName:ye}),Ht&&kn?i(W,{title:ge.title,onSave:function(o){return function(o,l){return t(void 0,void 0,void 0,function(){var t,i;return n(this,function(n){try{t=e({},ge),ge.artifactId===l?t.title=o:t.sub_features=(null===(i=ge.sub_features)||void 0===i?void 0:i.map(function(t){return t.artifactId===l?e(e({},t),{title:o}):t}))||[],jt(t),Ce(t),Wt(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(o,ge.artifactId)},onCancel:function(){Wt(!1)},inputStyle:null==Nt?void 0:Nt.inlineTitleInput,confirmButtonStyle:null==Nt?void 0:Nt.inlineTitleConfirm,cancelButtonStyle:null==Nt?void 0:Nt.inlineTitleCancel},"inline-title-editor"):l("div",e({className:R.storyTitleWrapper},{children:[i(T,e({title:K(ge.title),arrow:!0},{children:i("h2",e({title:nt?void 0:ge.title,className:R.storyTitle,style:null==Ct?void 0:Ct.storyTitle},{children:K(ge.title)}),ge.artifactId)})),Ke&&!Tt&&(An?i(q,e({customIcons:null==nn?void 0:nn.userStoryIcons,customStyles:null==Ct?void 0:Ct.aiReasoningCitaionStyles,currentUserStory:ge,panelStyles:null==Ct?void 0:Ct.CompletionStyles,onToggleStateChange:bn},{children:l("div",e({style:e(e({display:"inline-flex",alignItems:"center",gap:"4px"},null==Et?void 0:Et.badge),Rt)},{children:[l("span",{children:[Tn,"% Completed"]}),i("span",e({style:{display:"flex",alignItems:"center"}},{children:i(Q,{color:"currentColor"})})),i(Nn?u:c,{size:14,style:null==Et?void 0:Et.chevronStyle})]}))})):i("div",e({style:e(e({display:"inline-flex",alignItems:"center",gap:"4px"},null==Et?void 0:Et.badge),Rt)},{children:l("span",{children:[Tn,"% Completed"]})}))),He&&i("button",e({type:"button",className:R.titleEditButton,style:null==Nt?void 0:Nt.titleEditButton,onClick:function(e){e.stopPropagation(),Wt(!0),ln||rn(!0)},"aria-label":"Edit title",title:"Edit title"},{children:i("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:i("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),(dt||void 0!==ct&&void 0!==vt)&&l("div",e({className:R.statusContainer},{children:[void 0!==ct&&void 0!==vt&&l("div",e({className:R.completedBadge},{children:["Completed: ",ct,"/",vt]})),dt&&i("button",e({type:"button",onClick:function(e){e.stopPropagation(),null==ut||ut()},className:R.statusButton,style:_t[dt]},{children:J[dt]}))]})),l("div",e({className:R.titleActions,style:null==Ct?void 0:Ct.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(Un.showProgressPercentage||Un.showGapBox)&&Re&&l("div",e({className:R.progressHeader,style:null==wt?void 0:wt.wrapper},{children:[Un.showProgressPercentage&&l("div",e({className:R.progressPercentage,style:null==wt?void 0:wt.percentage},{children:[null!==(ue=null!==(de=null==ge?void 0:ge.confidenceScore)&&void 0!==de?de:null==Un?void 0:Un.confidenceValue)&&void 0!==ue?ue:"0","%"]})),Un.showGapBox&&l("div",e({className:R.gapBox,style:null==wt?void 0:wt.gapBox},{children:[null!==(ve=null!==(ce=null==ge?void 0:ge.gapValue)&&void 0!==ce?ce:null==Un?void 0:Un.gapBoxValue)&&void 0!==ve?ve:"2"," ","Gaps"]}))]})),xn&&i(H,{customIcons:null==nn?void 0:nn.userStoryIcons,customStyles:null==Ct?void 0:Ct.aiReasoningCitaionStyles,currentUserStory:ge,panelStyles:null==Ct?void 0:Ct.BigEnoughStyles}),!Gt.userStory&&l(r,{children:[!1!==(null==Un?void 0:Un.showShareButton)&&i("button",e({className:R.iconButton,style:null==Ct?void 0:Ct.iconButton,onClick:function(e){cn(e.currentTarget)}},{children:i(v,{size:16})})),l(A,e({id:"user-story-share-menu",anchorEl:un,open:!!un,onClose:function(){return cn(null)},style:null==Ct?void 0:Ct.userStoryShareMenu},{children:[be&&i(P,e({style:null==Ct?void 0:Ct.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return sn(!0),Ee?[4,Promise.all([Ee("pdf"),Ee("doc")])]:[2];case 1:return e.sent(),sn(!1),[2]}})})}},{children:l("div",e({ref:Sn,className:R.menuItemContent,style:null==Ct?void 0:Ct.menuItemContent},{children:[i(p,{size:16,color:null==Ct?void 0:Ct.menuIconColor}),i("p",e({style:null==Ct?void 0:Ct.menuLabel},{children:"Download"}))]}))})),i(P,e({style:null==Ct?void 0:Ct.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){return t=ge,Se&&(t=e(e({},ge),{value:"".concat(L(null==Se?void 0:Se.value,ge.title)," \n").concat(ge.value)})),null==Be||Be(!0,[t],ge.artifactId),Dn(),[2]})})}},{children:l("div",e({style:null==Ct?void 0:Ct.menuItemContent,className:R.menuItemContentPadded},{children:[i(m,{size:16,color:null==Ct?void 0:Ct.menuIconColor}),i("p",e({style:null==Ct?void 0:Ct.menuLabel},{children:"Send"}))]}))})),i(P,e({style:null==Ct?void 0:Ct.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var e,t,o,l,i;return n(this,function(n){switch(n.label){case 0:e=new x.Converter,t=e.makeHtml(_(ge.value)||ge.value),o=function(e){var t=(new x.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(_(ge.value)||ge.value),l=new ClipboardItem({"text/plain":new Blob([o],{type:"text/plain"}),"text/html":new Blob([t],{type:"text/html"})}),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,navigator.clipboard.write([l])];case 2:return n.sent(),console.log("Copied User Story"),[3,5];case 3:return i=n.sent(),console.error("Failed to copy user story:",i),[3,5];case 4:return Dn(),[7];case 5:return[2]}})})}},{children:l("div",e({style:null==Ct?void 0:Ct.menuItemContent,className:R.menuItemContentPadded},{children:[i(h,{size:16,color:null==Ct?void 0:Ct.menuIconColor}),i("p",e({style:null==Ct?void 0:Ct.menuLabel},{children:"Copy"}))]}))}))]}))]}),Gt.userStory&&ln?i(j,{type:"outline",children:"Cancel",style:null==Ct?void 0:Ct.cancelButton,onClick:function(){var t;null===(t=wn.current)||void 0===t||t.abort(),Ot(function(t){return e(e({},t),{userStory:!1})})}}):i(r,{}),Gt.userStory&&ln?i(j,{type:"fill",children:fn?l("span",e({className:R.savingSpinner,style:null==Ct?void 0:Ct.savingSpinner},{children:[i(f,{className:R.spinAnimation,style:null==Ct?void 0:Ct.spinAnimation}),i("span",{children:"Saving..."})]})):"Save",isDisable:fn,style:fn?null==Ct?void 0:Ct.savingButton:null==Ct?void 0:Ct.saveButton,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:return yn(!0),"userStory"==="userStory"&&(Ce(Lt),console.log("I am changing RTE editor values",Lt)),[4,xe(yt,tn,fe,null===(t=wn.current)||void 0===t?void 0:t.signal)];case 1:return n.sent(),Ce(e(e({},Lt),{isDefaultEdit:!1})),Ot(function(t){return e(e({},t),{userStory:!1})}),yn(!1),[2]}})})}}):!we&&!De&&!et&&ln&&!1!==(null==Un?void 0:Un.showEditButton)&&i("button",e({className:R.iconButton,style:null==Ct?void 0:Ct.editButton,onClick:function(){return Ot(function(t){return e(e({},t),{userStory:!0})})}},{children:i(y,{color:null==Ct?void 0:Ct.pencilIconColor,size:16})})),Ye&&Pn&&ln&&!we&&!De&&!1!==(null==Un?void 0:Un.showEditButton)&&l("button",e({type:"button",className:R.addSectionButton,style:null==Nt?void 0:Nt.addSectionButton,onClick:function(t){var n,l,i;t.stopPropagation();var r=(null!==(l=null===(n=ge.sub_features)||void 0===n?void 0:n.length)&&void 0!==l?l:0)+1,a={artifactId:k(),title:"New Section ".concat(r),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},s=e(e({},ge),{sub_features:o(o([],null!==(i=ge.sub_features)&&void 0!==i?i:[],!0),[a],!1)});jt(s),Ce(s),rn(!0),$t(a.title)},"aria-label":"Add section",title:"Add section"},{children:[i(S,{size:14}),i("span",e({className:R.addSectionLabel},{children:"Add Section"}))]})),!Pn&&!we&&!et&&!De&&i("button",e({type:"button",onClick:function(e){e.stopPropagation(),null==Le||Le()},className:R.iconButton,style:null==Nt?void 0:Nt.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:i(g,{size:16})})),Tt&&i("button",e({type:"button",className:R.iconButton,disabled:Ut,onClick:function(e){if(e.stopPropagation(),qt)return Kt(null),void Qt(!1);Kt(structuredClone(null!=At?At:{})),rn(!0),Qt(!0)}},{children:i(qt?C:y,{size:16,color:null==Ct?void 0:Ct.pencilIconColor})})),(null==Un?void 0:Un.actionItemsButton)&&l(r,{children:[i("span",e({className:R.actionItemBtn,style:null==Ct?void 0:Ct.actionItemBtn,onClick:function(e){e.stopPropagation(),mn(e.currentTarget)}},{children:i(I,{})})),i(A,e({id:"user-story-action-menu",anchorEl:pn,open:!!pn,onClose:En,style:null==Ct?void 0:Ct.userStoryShareMenu},{children:null==Me?void 0:Me.items.map(function(t,n){return i(P,e({style:null==Ct?void 0:Ct.userStoryMenuItem,onClick:function(){t.onclick(ge),En()}},{children:l("div",e({className:R.menuItemContent,style:e(e({},null==Ct?void 0:Ct.menuItemContent),!t.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[i("span",e({className:R.menuItemIcon,style:null==Ct?void 0:Ct.menuItemIcon},{children:t.icon})),i("p",e({style:null==Ct?void 0:Ct.menuLabel},{children:t.name})),i("span",{className:R.menuItemRight,style:null==Ct?void 0:Ct.menuItemRight})]}))}),"action-item-".concat(n,"-").concat(t.name))})}))]}),i("button",e({type:"button",onClick:function(e){e.stopPropagation(),Bn()},style:null==Ct?void 0:Ct.chevronButton,className:R.chevronButton},{children:i(ln?u:c,{className:R.chevronIcon,color:null==Ct?void 0:Ct.chevronIconColor})}))]}))]})),i("div",{className:R.divider,style:null==Ct?void 0:Ct.dividerStyle})]})),ln&&i("div",e({className:R.cardContent,style:e(e({},null==Ct?void 0:Ct.cardContentStyle),{borderTop:Qe?"1px solid #E5E5E5":"none"})},{children:l("div",at?e({className:R.loadingContainer},{children:[i("div",e({className:R.loadingIconWrapper},{children:i(N,{size:28,color:"#5B3DF5",className:R.spinAnimation})})),l("div",{children:[i("h3",e({className:R.loadingTitle},{children:"Section generation in progress.."})),i("p",e({className:R.loadingSubtitle},{children:"This may take a few minutes"}))]}),i("button",e({type:"button",onClick:function(){return null==st?void 0:st()},className:R.viewStatusButton},{children:"View Status"}))]}):mt?e({className:R.noDataContainer,style:null==Bt?void 0:Bt.container},{children:[i("img",{src:U,alt:"No data available",className:R.noDataIllustration,style:null==Bt?void 0:Bt.illustration}),i("h3",e({className:R.noDataTitle,style:null==Bt?void 0:Bt.title},{children:"No Data Available for This Section"})),i("p",e({className:R.noDataSubtitle,style:null==Bt?void 0:Bt.subtitle},{children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."}))]}):e({className:R.contentInner,style:null==Ct?void 0:Ct.contentInner},{children:[l("div",e({className:R.descriptionSection,style:null==Ct?void 0:Ct.descriptionSection},{children:[i("div",{className:R.justifyBetween,style:null==Ct?void 0:Ct.justifyBetween}),Gt.userStory?i(V,{minHeight:"100%",height:"100%",type:"string",value:_(ge.value)||"",handleUpdateState:function(t,n){var o=M(n);jt(function(t){return e(e({},t),{value:o||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:Gt.userStory?"edit":"readOnly"}):Tt?i(F,{styles:Dt,fields:Pt,readonly:!qt,isSaving:kt,value:null!==(pe=null!=Jt?Jt:At)&&void 0!==pe?pe:{},onChange:Kt,onSave:function(){return t(void 0,void 0,void 0,function(){var e;return n(this,function(t){switch(t.label){case 0:return Jt?[4,null===(e=null==gt?void 0:gt.onSave)||void 0===e?void 0:e.call(gt,ge,Jt)]:[2];case 1:return t.sent(),Kt(null),Qt(!1),[2]}})})},onCancel:function(){Kt(null),Qt(!1)}}):l(r,{children:[i(G,{showUserStoryDiff:De,isParent:""===Ie,message:_(ge.value)||"",artifactId:ge.artifactId,customStyles:bt,isDisplayHighlightControl:Ae,contextVariant:je,showConfidenceScore:Fe,CDNeededInChip:lt}),ot&&i("div",e({className:R.approveButtonContainer,style:null==xt?void 0:xt.container},{children:i("button",e({type:"button",className:R.approveButton,style:null==xt?void 0:xt.button,disabled:ot.disabled||ot.isLoading,onClick:function(e){var t;e.stopPropagation(),null===(t=null==ot?void 0:ot.onClick)||void 0===t||t.call(ot)}},{children:ot.isLoading?l(r,{children:[i(f,{size:16,className:R.spinner,style:null==xt?void 0:xt.icon}),i("span",e({style:null==xt?void 0:xt.text},{children:ot.label}))]}):l(r,{children:[i("span",e({style:null==xt?void 0:xt.text},{children:ot.label})),i(b,{size:16,style:null==xt?void 0:xt.icon})]})}))}))]})]})),null===(me=Lt.sub_features)||void 0===me?void 0:me.map(function(t,n){var l=X(Pe,!1,t.artifactId);return i($,{artifactId:fe,isUserStoryCurrentlyUpdated:he,artifactTitleId:"".concat(ye,"-").concat(String.fromCharCode(65+n)),parentUserStory:ge,parentIndex:"".concat(Ie).concat(Ie&&".").concat(Ne),currentIndex:"".concat(n+1),doNotShowBorderInViewMode:!1,currentUserStory:t,onUserStoryChange:function(t){return function(t,n){var l=o([],ge.sub_features||[],!0);l[t]=n,Ce(e(e({},ge),{sub_features:l}))}(n,t)},enableDownload:!0,isDiffEditReviewMode:we,showUserStoryDiff:De,updateUserStoryArtifact:xe,handleDownloadUserStory:Ee,handleOpenSendDialog:Be,isDisplayHighlightControl:Ae,elementDisplayConfig:Pe,_resolvedConfig:l,actionItemsConfig:Me,onDelete:function(){return function(t){var n=(ge.sub_features||[]).filter(function(e,n){return n!==t}),o=e(e({},ge),{sub_features:n});jt(o),Ce(o)}(n)},expandedSubFeatures:Ve,disableEditPlan:et,useMuiTooltip:nt},t.artifactId)})]}))}))]}))},ee=function(t){var n=t.artifactTitleIDs,a=t.expandedSubFeatures,s=t.isDiffEditReviewMode,d=t.showUserStoryDiff,u=t.updateUserStoryArtifact,c=t.isUserStoryCurrentlyUpdated,v=t.artifactId,p=t.handleOpenSendDialog,m=t.handleDownloadUserStory,h=t.selectedArtifactId,f=t.isDisplayHighlightControl,y=t.elementDisplayConfig,S=t.showWrapper,g=t.actionItemsConfig,C=t.contextVariant,I=t.showDisplayName,N=t.allowTitleEdit,b=t.showConfidenceScore,E=t.showBorderTop,B=t.defaultExpanded,x=t.showCompletionPanel,T=void 0!==x&&x,A=t.showAddSectionButton,P=void 0!==A&&A,U=t.disableEditPlan,k=void 0!==U&&U,_=t.useMuiTooltip,M=void 0!==_&&_,L=t.approveButtonConfig,j=t.CDNeededInChip,V=z(),G=V.userStory,O=V.setUserStory,H=V.customStyles,W=V.searchQueryList,F=V.currentHighlightIndex,q=V.setCurrentHighlightIndex;V.segmentComponentConfig;var Q=V.sectionStatusConfig,Z=null==H?void 0:H.userStoryCardStyles,J=0===F,K=F===W.length-1;return l("div",e({className:R.userStoryCardWrapper,style:f?e(e({},null==Z?void 0:Z.userStoryCardWrapper),{position:"relative"}):null==Z?void 0:Z.userStoryCardWrapper},{children:[f&&i(r,{children:W.length>0&&i("div",e({className:R.wrapper},{children:i("div",e({className:R.highlightNavigation},{children:l("div",e({className:R.navigationContainer},{children:[l("span",e({className:R.navCounter},{children:[F+1," of ",W.length]})),l("div",e({className:R.navButtons},{children:[i("button",e({onClick:function(){F>0&&q(function(e){return e-1})},className:R.navButton,disabled:J},{children:i(w,{size:20,className:R.navIcon})})),i("button",e({onClick:function(){F<W.length-1&&q(function(e){return e+1})},className:R.navButton,disabled:K},{children:i(D,{size:20,className:R.navIcon})}))]}))]}))}))}))}),G.map(function(e,t){var l=X(y,!0);return i($,{isUserStoryCurrentlyUpdated:c,artifactId:v,artifactTitleId:n[t]||"",expandedSubFeatures:a,currentUserStory:e,onUserStoryChange:function(e){O(function(n){return n[t]=e,o([],n,!0)})},parentIndex:"",currentIndex:"".concat(t+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:s,showUserStoryDiff:d,updateUserStoryArtifact:u,handleOpenSendDialog:p,handleDownloadUserStory:m,selectedArtifactId:h,isDisplayHighlightControl:f,elementDisplayConfig:y,_resolvedConfig:l,showWrapper:S,defaultExpanded:B,actionItemsConfig:g,contextVariant:C,showDisplayName:I,allowTitleEdit:N,showConfidenceScore:b,showBorderTop:E,sectionStatusConfig:Q,showCompletionPanel:T,showAddSectionButton:P,disableEditPlan:k,useMuiTooltip:M,approveButtonConfig:L,CDNeededInChip:j},e.artifactId)})]}))};export{$ as StoryCard,ee as UserStoryCardWrapper,$ as default,K as replaceLearnedTagsWithInfo};
|
|
1
|
+
import{__assign as e,__awaiter as t,__generator as n,__spreadArray as o}from"tslib";import{jsxs as i,jsx as l,Fragment as r}from"react/jsx-runtime";import{useState as a,useRef as s,useEffect as u}from"react";import{ChevronUp as d,ChevronDown as c,ExternalLink as v,Download as p,Share2 as m,Copy as h,LoaderCircle as f,PencilIcon as y,Plus as S,Trash2 as C,X as g,Ellipsis as I,Hourglass as N,Check as b,ChevronUpIcon as w,ChevronDownIcon as D,Info as E,Bookmark as B}from"lucide-react";import x from"showdown";import{Tooltip as T,Menu as A,MenuItem as U}from"@mui/material";import P from"../../icons/Illustration.svg.js";import{v4 as k}from"uuid";import R from"./UserStoryCard.module.css.js";import{formatMarkdown as _,indentMarkdown as M}from"../../utils/helpers.js";import{replaceTitleSection as L}from"../../utils/user-story.utils.js";import j from"../../shared/AtomicButton.js";import V from"../RichTextEditor/RichTextEditor.js";import G from"../userstory-with-citation/UserStoryWithCitation.js";import{SectionStatus as O,useRequirementAI as z}from"../RequirementAIWrapper/RequirementAIWrapper.js";import{BigEnoughPanel as H}from"../story-screen/BigEnoughPanel.js";import{InlineTitleEditor as W}from"./TitleEditor/TitleEditor.js";import F from"./ClinicalTrialSection.js";import{CompletionPanel as q}from"../story-screen/CompletionPanel.js";import Q from"../../icons/CDIcon.js";var Z,J=((Z={})[O.WAITING]="WAITING TO GENERATE",Z[O.IN_PROGRESS]="IN PROGRESS",Z[O.GENERATED]="GENERATED",Z[O.FAILED]="FAILED",Z[O.GENERATE]="GENERATE",Z[O.APPROVED]="APPROVED",Z);function K(t){for(var n,o=[],i=/<learned>(.*?)<\/learned>/g,r=0,a=0;null!==(n=i.exec(t));){var s=n[1],u=n.index;u>r&&o.push(l("span",{children:t.slice(r,u)},"text-pre-".concat(a++))),o.push(l(T,e({title:s,placement:"top"},{children:l(E,{size:16,className:"inline-block mx-1 text-blue-500 hover:text-blue-700 cursor"})}),"tooltip-".concat(k()))),r=i.lastIndex}return r<(null==t?void 0:t.length)&&o.push(l("span",{children:t.slice(r)},"text-post-".concat(a++))),o}function X(t,n,o){var i;if(!t)return{};if(n)return e({},t.parentConfig);var l=e({},t.childConfig);return o&&(null===(i=t.subFeatureOverrides)||void 0===i?void 0:i[o])?e(e({},l),t.subFeatureOverrides[o]):l}var Y=function(t){var n,o=t.displayName,r=z().customStyles,a=null===(n=null==r?void 0:r.userStoryCardStyles)||void 0===n?void 0:n.showDisplayName;return i("div",e({className:R.displayName,style:null==a?void 0:a.wrapper},{children:[l(B,{className:R.displayNameIcon,style:null==a?void 0:a.displayNameIcon}),i("span",e({style:null==a?void 0:a.label},{children:[o,":"]}))]}))},$=function(w){var D,E,B,Z,ee,te,ne,oe,ie,le,re,ae,se,ue,de,ce,ve,pe,me,he=w.isUserStoryCurrentlyUpdated,fe=w.artifactId,ye=w.artifactTitleId,Se=w.parentUserStory,Ce=w.currentUserStory,ge=w.onUserStoryChange,Ie=w.parentIndex,Ne=w.currentIndex,be=w.enableDownload,we=w.isDiffEditReviewMode,De=w.showUserStoryDiff,Ee=w.handleDownloadUserStory,Be=w.handleOpenSendDialog,xe=w.updateUserStoryArtifact,Te=w.selectedArtifactId,Ae=w.isDisplayHighlightControl,Ue=w.elementDisplayConfig,Pe=w._resolvedConfig,ke=w.showWrapper,Re=void 0!==ke&&ke,_e=w.defaultExpanded,Me=w.actionItemsConfig,Le=w.onDelete,je=w.contextVariant,Ve=w.expandedSubFeatures,Ge=w.showDisplayName,Oe=void 0===Ge||Ge,ze=w.allowTitleEdit,He=void 0===ze||ze,We=w.showConfidenceScore,Fe=void 0===We||We,qe=w.showBorderTop,Qe=void 0===qe||qe,Ze=w.sectionStatusConfig,Je=w.showCompletionPanel,Ke=void 0!==Je&&Je,Xe=w.showAddSectionButton,Ye=void 0!==Xe&&Xe,$e=w.disableEditPlan,et=void 0!==$e&&$e,tt=w.useMuiTooltip,nt=void 0!==tt&&tt,ot=w.approveButtonConfig,it=w.CDNeededInChip,lt=null!=Ze?Ze:{},rt=lt.isLoadingSectionData,at=void 0!==rt&&rt,st=lt.onLoadSectionData,ut=lt.status,dt=lt.onStatusClick,ct=lt.completedCount,vt=lt.totalCount,pt=lt.isNoDataAvailable,mt=void 0!==pt&&pt,ht=z(),ft=ht.searchQueryList,yt=ht.citations,St=ht.customStyles,Ct=ht.customSectionConfig,gt=null==St?void 0:St.userStoryCardStyles,It=null==gt?void 0:gt.statusStyles,Nt=null===(E=null==St?void 0:St.userStoryCardStyles)||void 0===E?void 0:E.userStoryEditStyles,bt=null===(B=null==St?void 0:St.userStoryScreenStyles)||void 0===B?void 0:B.userStoryContentStyles,wt=null==gt?void 0:gt.progressHeaderStyles,Dt=null==gt?void 0:gt.clinicalTrialSectionStyles,Et=null==gt?void 0:gt.CompletionStyles,Bt=null==gt?void 0:gt.noDataStyles,xt=null==gt?void 0:gt.approveButtonStyles,Tt=null!==(ee=null===(Z=null==Ct?void 0:Ct.shouldRender)||void 0===Z?void 0:Z.call(Ct,Ce))&&void 0!==ee&&ee,At=null===(te=null==Ct?void 0:Ct.getValue)||void 0===te?void 0:te.call(Ct,Ce),Ut=null!==(oe=null===(ne=null==Ct?void 0:Ct.getFields)||void 0===ne?void 0:ne.call(Ct,Ce))&&void 0!==oe?oe:[],Pt=null!==(ie=null==Ct?void 0:Ct.isEditDisabled)&&void 0!==ie&&ie,kt=null!==(re=null===(le=null==Ct?void 0:Ct.isSaving)||void 0===le?void 0:le.call(Ct,Ce))&&void 0!==re&&re,Rt=function(e,t){return e>=80?null==t?void 0:t.highCompletion:e>=50?null==t?void 0:t.mediumCompletion:null==t?void 0:t.lowCompletion}(null!==(ae=Ce.completion_percentage)&&void 0!==ae?ae:0,Et),_t=((D={})[O.WAITING]=null==It?void 0:It.waiting,D[O.IN_PROGRESS]=null==It?void 0:It.inProgress,D[O.GENERATED]=null==It?void 0:It.generated,D[O.FAILED]=null==It?void 0:It.failed,D[O.GENERATE]=null==It?void 0:It.generate,D[O.APPROVED]=null==It?void 0:It.approved,D),Mt=a(e(e({},structuredClone(Ce)),{value:_(Ce.value)||""})),Lt=Mt[0],jt=Mt[1],Vt=a({userStory:!!Ce.isDefaultEdit}),Gt=Vt[0],Ot=Vt[1],zt=a(!1),Ht=zt[0],Wt=zt[1],Ft=a(!1),qt=Ft[0],Qt=Ft[1],Zt=a(null),Jt=Zt[0],Kt=Zt[1],Xt=a(null),Yt=Xt[0],$t=Xt[1],en=z(),tn=en.userStory,nn=en.customIcons,on=a(null!=_e?_e:""===Ie||Te===Ce.artifactId||!!Ce.isDefaultOpen),ln=on[0],rn=on[1],an=a(!1);an[0];var sn=an[1],un=a(null),dn=un[0],cn=un[1],vn=a(null),pn=vn[0],mn=vn[1],hn=a(!1),fn=hn[0],yn=hn[1],Sn=s(null),Cn=s(null),gn=a(!1);gn[0];var In=gn[1],Nn=a(!1),bn=Nn[0],wn=Nn[1],Dn=s(null);u(function(){he&&rn(he)},[he]),u(function(){jt(e(e({},structuredClone(Ce)),{value:_(Ce.value)||""}))},[Ce]),u(function(){ft.length>0?rn(!0):void 0===_e&&(Te?rn(Te===Ce.artifactId):Ve&&Ve.length>0&&rn(Ve.includes(Ce.artifactId)))},[ft,Te,Ce.artifactId,Ve]);var En=function(){cn(null)},Bn=function(){mn(null)},xn=function(){ln&&Gt.userStory&&Cn.current&&!Cn.current.requestClose()||rn(function(e){return!e})},Tn=function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){switch(n.label){case 0:yn(!0),n.label=1;case 1:return n.trys.push([1,,3,4]),"userStory"==="userStory"&&(ge(Lt),console.log("I am changing RTE editor values",Lt)),[4,xe(yt,tn,fe,null===(t=Dn.current)||void 0===t?void 0:t.signal)];case 2:return n.sent(),ge(e(e({},Lt),{isDefaultEdit:!1})),Ot(function(t){return e(e({},t),{userStory:!1})}),[3,4];case 3:return yn(!1),[7];case 4:return[2]}})})};var An=null!=(null==Ce?void 0:Ce.big_enough)&&!Number.isNaN(Ce.big_enough)&&!!(null==Ce?void 0:Ce.big_enough_decision_factors),Un=null!==(se=null==Ce?void 0:Ce.completion_percentage)&&void 0!==se?se:0,Pn=!!(null==Ce?void 0:Ce.completion_decision_factors),kn=""===Ie,Rn=null!=Pe?Pe:X(Ue,kn),_n=!we&&!De;return u(function(){if(Yt){var e=setTimeout(function(){var e=document.getElementById("story-card-".concat(Yt));null==e||e.scrollIntoView({behavior:"smooth",block:"start"})},100);return function(){return clearTimeout(e)}}},[Yt]),u(function(){Ce.isDefaultEdit&&Ot(function(t){return e(e({},t),{userStory:!0})})},[Ce.isDefaultEdit]),i("div",e({className:R.card,style:null==gt?void 0:gt.cardStyle,id:"story-card-".concat(Ce.title),"data-expanded":ln},{children:[i("div",e({className:R.titleSection,style:null==gt?void 0:gt.titleSection},{children:[i("div",e({className:R.titleRow,style:null==gt?void 0:gt.titleRow,onClick:xn},{children:[i("div",e({className:R.titleLeft,style:null==gt?void 0:gt.titleLeft,onMouseEnter:function(){return In(!0)},onMouseLeave:function(){return In(!1)}},{children:[Oe&&l(Y,{displayName:ye}),Ht&&_n?l(W,{title:Ce.title,onSave:function(o){return function(o,i){return t(void 0,void 0,void 0,function(){var t,l;return n(this,function(n){try{t=e({},Ce),Ce.artifactId===i?t.title=o:t.sub_features=(null===(l=Ce.sub_features)||void 0===l?void 0:l.map(function(t){return t.artifactId===i?e(e({},t),{title:o}):t}))||[],jt(t),ge(t),Wt(!1)}catch(e){console.error("Failed to save title",e)}return[2]})})}(o,Ce.artifactId)},onCancel:function(){Wt(!1)},inputStyle:null==Nt?void 0:Nt.inlineTitleInput,confirmButtonStyle:null==Nt?void 0:Nt.inlineTitleConfirm,cancelButtonStyle:null==Nt?void 0:Nt.inlineTitleCancel},"inline-title-editor"):i("div",e({className:R.storyTitleWrapper},{children:[l(T,e({title:K(Ce.title),arrow:!0},{children:l("h2",e({title:nt?void 0:Ce.title,className:R.storyTitle,style:null==gt?void 0:gt.storyTitle},{children:K(Ce.title)}),Ce.artifactId)})),Ke&&!Tt&&(Pn?l(q,e({customIcons:null==nn?void 0:nn.userStoryIcons,customStyles:null==gt?void 0:gt.aiReasoningCitaionStyles,currentUserStory:Ce,panelStyles:null==gt?void 0:gt.CompletionStyles,onToggleStateChange:wn},{children:i("div",e({style:e(e({display:"inline-flex",alignItems:"center",gap:"4px"},null==Et?void 0:Et.badge),Rt)},{children:[i("span",{children:[Un,"% Completed"]}),l("span",e({style:{display:"flex",alignItems:"center"}},{children:l(Q,{color:"currentColor"})})),l(bn?d:c,{size:14,style:null==Et?void 0:Et.chevronStyle})]}))})):l("div",e({style:e(e({display:"inline-flex",alignItems:"center",gap:"4px"},null==Et?void 0:Et.badge),Rt)},{children:i("span",{children:[Un,"% Completed"]})}))),He&&l("button",e({type:"button",className:R.titleEditButton,style:null==Nt?void 0:Nt.titleEditButton,onClick:function(e){e.stopPropagation(),Wt(!0),ln||rn(!0)},"aria-label":"Edit title",title:"Edit title"},{children:l("svg",e({width:"18",height:"18",viewBox:"0 0 18 18",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:l("path",{d:"M8.99998 14.9992H15.75M2.25 14.9992H3.50591C3.87279 14.9992 4.05624 14.9992 4.22887 14.9577C4.38192 14.921 4.52824 14.8604 4.66245 14.7782C4.81382 14.6854 4.94354 14.5557 5.20296 14.2962L14.625 4.87419C15.2463 4.25287 15.2463 3.24551 14.625 2.62419C14.0037 2.00287 12.9963 2.00287 12.375 2.62419L2.95295 12.0462C2.69352 12.3057 2.5638 12.4354 2.47104 12.5868C2.3888 12.721 2.32819 12.8673 2.29145 13.0203C2.25 13.193 2.25 13.3764 2.25 13.7433V14.9992Z",stroke:"#94A3B8","stroke-width":"1.54286","stroke-linecap":"round","stroke-linejoin":"round"})}))}))]}))]})),(ut||void 0!==ct&&void 0!==vt)&&i("div",e({className:R.statusContainer},{children:[void 0!==ct&&void 0!==vt&&i("div",e({className:R.completedBadge},{children:["Completed: ",ct,"/",vt]})),ut&&l("button",e({type:"button",onClick:function(e){e.stopPropagation(),null==dt||dt()},className:R.statusButton,style:_t[ut]},{children:J[ut]}))]})),i("div",e({className:R.titleActions,style:null==gt?void 0:gt.titleActions,onClick:function(e){return e.stopPropagation()}},{children:[(Rn.showProgressPercentage||Rn.showGapBox)&&Re&&i("div",e({className:R.progressHeader,style:null==wt?void 0:wt.wrapper},{children:[Rn.showProgressPercentage&&i("div",e({className:R.progressPercentage,style:null==wt?void 0:wt.percentage},{children:[null!==(de=null!==(ue=null==Ce?void 0:Ce.confidenceScore)&&void 0!==ue?ue:null==Rn?void 0:Rn.confidenceValue)&&void 0!==de?de:"0","%"]})),Rn.showGapBox&&i("div",e({className:R.gapBox,style:null==wt?void 0:wt.gapBox},{children:[null!==(ve=null!==(ce=null==Ce?void 0:Ce.gapValue)&&void 0!==ce?ce:null==Rn?void 0:Rn.gapBoxValue)&&void 0!==ve?ve:"2"," ","Gaps"]}))]})),An&&l(H,{customIcons:null==nn?void 0:nn.userStoryIcons,customStyles:null==gt?void 0:gt.aiReasoningCitaionStyles,currentUserStory:Ce,panelStyles:null==gt?void 0:gt.BigEnoughStyles}),!Gt.userStory&&i(r,{children:[!1!==(null==Rn?void 0:Rn.showShareButton)&&l("button",e({className:R.iconButton,style:null==gt?void 0:gt.iconButton,onClick:function(e){cn(e.currentTarget)}},{children:l(v,{size:16})})),i(A,e({id:"user-story-share-menu",anchorEl:dn,open:!!dn,onClose:function(){return cn(null)},style:null==gt?void 0:gt.userStoryShareMenu},{children:[be&&l(U,e({style:null==gt?void 0:gt.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return sn(!0),Ee?[4,Promise.all([Ee("pdf"),Ee("doc")])]:[2];case 1:return e.sent(),sn(!1),[2]}})})}},{children:i("div",e({ref:Sn,className:R.menuItemContent,style:null==gt?void 0:gt.menuItemContent},{children:[l(p,{size:16,color:null==gt?void 0:gt.menuIconColor}),l("p",e({style:null==gt?void 0:gt.menuLabel},{children:"Download"}))]}))})),l(U,e({style:null==gt?void 0:gt.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var t;return n(this,function(n){return t=Ce,Se&&(t=e(e({},Ce),{value:"".concat(L(null==Se?void 0:Se.value,Ce.title)," \n").concat(Ce.value)})),null==Be||Be(!0,[t],Ce.artifactId),En(),[2]})})}},{children:i("div",e({style:null==gt?void 0:gt.menuItemContent,className:R.menuItemContentPadded},{children:[l(m,{size:16,color:null==gt?void 0:gt.menuIconColor}),l("p",e({style:null==gt?void 0:gt.menuLabel},{children:"Send"}))]}))})),l(U,e({style:null==gt?void 0:gt.userStoryMenuItem,onClick:function(){return t(void 0,void 0,void 0,function(){var e,t,o,i,l;return n(this,function(n){switch(n.label){case 0:e=new x.Converter,t=e.makeHtml(_(Ce.value)||Ce.value),o=function(e){var t=(new x.Converter).makeHtml(e),n=document.createElement("div");return n.innerHTML=t,n.textContent||n.innerText||""}(_(Ce.value)||Ce.value),i=new ClipboardItem({"text/plain":new Blob([o],{type:"text/plain"}),"text/html":new Blob([t],{type:"text/html"})}),n.label=1;case 1:return n.trys.push([1,3,4,5]),[4,navigator.clipboard.write([i])];case 2:return n.sent(),console.log("Copied User Story"),[3,5];case 3:return l=n.sent(),console.error("Failed to copy user story:",l),[3,5];case 4:return En(),[7];case 5:return[2]}})})}},{children:i("div",e({style:null==gt?void 0:gt.menuItemContent,className:R.menuItemContentPadded},{children:[l(h,{size:16,color:null==gt?void 0:gt.menuIconColor}),l("p",e({style:null==gt?void 0:gt.menuLabel},{children:"Copy"}))]}))}))]}))]}),Gt.userStory&&ln?l(j,{type:"outline",children:"Cancel",style:null==gt?void 0:gt.cancelButton,onClick:function(){var t;null===(t=Dn.current)||void 0===t||t.abort(),Ot(function(t){return e(e({},t),{userStory:!1})})}}):l(r,{}),Gt.userStory&&ln?l(j,{type:"fill",children:fn?i("span",e({className:R.savingSpinner,style:null==gt?void 0:gt.savingSpinner},{children:[l(f,{className:R.spinAnimation,style:null==gt?void 0:gt.spinAnimation}),l("span",{children:"Saving..."})]})):"Save",isDisable:fn,style:fn?null==gt?void 0:gt.savingButton:null==gt?void 0:gt.saveButton,onClick:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return[4,Tn()];case 1:return e.sent(),[2]}})})}}):!we&&!De&&!et&&ln&&!1!==(null==Rn?void 0:Rn.showEditButton)&&l("button",e({className:R.iconButton,style:null==gt?void 0:gt.editButton,onClick:function(){return Ot(function(t){return e(e({},t),{userStory:!0})})}},{children:l(y,{color:null==gt?void 0:gt.pencilIconColor,size:16})})),Ye&&kn&&ln&&!we&&!De&&!1!==(null==Rn?void 0:Rn.showEditButton)&&i("button",e({type:"button",className:R.addSectionButton,style:null==Nt?void 0:Nt.addSectionButton,onClick:function(t){var n,i,l;t.stopPropagation();var r=(null!==(i=null===(n=Ce.sub_features)||void 0===n?void 0:n.length)&&void 0!==i?i:0)+1,a={artifactId:k(),title:"New Section ".concat(r),value:"Please add details for this section.",section:"subfeature",isDefaultOpen:!0},s=e(e({},Ce),{sub_features:o(o([],null!==(l=Ce.sub_features)&&void 0!==l?l:[],!0),[a],!1)});jt(s),ge(s),rn(!0),$t(a.title)},"aria-label":"Add section",title:"Add section"},{children:[l(S,{size:14}),l("span",e({className:R.addSectionLabel},{children:"Add Section"}))]})),!kn&&!we&&!et&&!De&&l("button",e({type:"button",onClick:function(e){e.stopPropagation(),null==Le||Le()},className:R.iconButton,style:null==Nt?void 0:Nt.deleteButton,"aria-label":"Delete section",title:"Delete section"},{children:l(C,{size:16})})),Tt&&l("button",e({type:"button",className:R.iconButton,disabled:Pt,onClick:function(e){if(e.stopPropagation(),qt)return Kt(null),void Qt(!1);Kt(structuredClone(null!=At?At:{})),rn(!0),Qt(!0)}},{children:l(qt?g:y,{size:16,color:null==gt?void 0:gt.pencilIconColor})})),(null==Rn?void 0:Rn.actionItemsButton)&&i(r,{children:[l("span",e({className:R.actionItemBtn,style:null==gt?void 0:gt.actionItemBtn,onClick:function(e){e.stopPropagation(),mn(e.currentTarget)}},{children:l(I,{})})),l(A,e({id:"user-story-action-menu",anchorEl:pn,open:!!pn,onClose:Bn,style:null==gt?void 0:gt.userStoryShareMenu},{children:null==Me?void 0:Me.items.map(function(t,n){return l(U,e({style:null==gt?void 0:gt.userStoryMenuItem,onClick:function(){t.onclick(Ce),Bn()}},{children:i("div",e({className:R.menuItemContent,style:e(e({},null==gt?void 0:gt.menuItemContent),!t.isActive&&{cursor:"not-allowed",opacity:.5})},{children:[l("span",e({className:R.menuItemIcon,style:null==gt?void 0:gt.menuItemIcon},{children:t.icon})),l("p",e({style:null==gt?void 0:gt.menuLabel},{children:t.name})),l("span",{className:R.menuItemRight,style:null==gt?void 0:gt.menuItemRight})]}))}),"action-item-".concat(n,"-").concat(t.name))})}))]}),l("button",e({type:"button",onClick:function(e){e.stopPropagation(),xn()},style:null==gt?void 0:gt.chevronButton,className:R.chevronButton},{children:l(ln?d:c,{className:R.chevronIcon,color:null==gt?void 0:gt.chevronIconColor})}))]}))]})),l("div",{className:R.divider,style:null==gt?void 0:gt.dividerStyle})]})),ln&&l("div",e({className:R.cardContent,style:e(e({},null==gt?void 0:gt.cardContentStyle),{borderTop:Qe?"1px solid #E5E5E5":"none"})},{children:i("div",at?e({className:R.loadingContainer},{children:[l("div",e({className:R.loadingIconWrapper},{children:l(N,{size:28,color:"#5B3DF5",className:R.spinAnimation})})),i("div",{children:[l("h3",e({className:R.loadingTitle},{children:"Section generation in progress.."})),l("p",e({className:R.loadingSubtitle},{children:"This may take a few minutes"}))]}),l("button",e({type:"button",onClick:function(){return null==st?void 0:st()},className:R.viewStatusButton},{children:"View Status"}))]}):mt?e({className:R.noDataContainer,style:null==Bt?void 0:Bt.container},{children:[l("img",{src:P,alt:"No data available",className:R.noDataIllustration,style:null==Bt?void 0:Bt.illustration}),l("h3",e({className:R.noDataTitle,style:null==Bt?void 0:Bt.title},{children:"No Data Available for This Section"})),l("p",e({className:R.noDataSubtitle,style:null==Bt?void 0:Bt.subtitle},{children:"We couldn't find data for this section yet. Upload the required document from the Documents tab to generate content."}))]}):e({className:R.contentInner,style:null==gt?void 0:gt.contentInner},{children:[i("div",e({className:R.descriptionSection,style:null==gt?void 0:gt.descriptionSection},{children:[l("div",{className:R.justifyBetween,style:null==gt?void 0:gt.justifyBetween}),Gt.userStory?l(V,{ref:Cn,minHeight:"100%",height:"100%",type:"string",value:_(Ce.value)||"",handleUpdateState:function(t,n){var o=M(n);jt(function(t){return e(e({},t),{value:o||""})})},doNotShowBorderInViewMode:!1,onBlur:function(){},mode:Gt.userStory?"edit":"readOnly",onSaveUnsavedChanges:function(){return t(void 0,void 0,void 0,function(){return n(this,function(e){switch(e.label){case 0:return[4,Tn()];case 1:return e.sent(),rn(!1),[2]}})})},onDiscardUnsavedChanges:function(){jt(e(e({},structuredClone(Ce)),{value:_(Ce.value)||""})),Ot(function(t){return e(e({},t),{userStory:!1})}),rn(!1)},isSavingUnsavedChanges:fn}):Tt?l(F,{styles:Dt,fields:Ut,readonly:!qt,isSaving:kt,value:null!==(pe=null!=Jt?Jt:At)&&void 0!==pe?pe:{},onChange:Kt,onSave:function(){return t(void 0,void 0,void 0,function(){var e;return n(this,function(t){switch(t.label){case 0:return Jt?[4,null===(e=null==Ct?void 0:Ct.onSave)||void 0===e?void 0:e.call(Ct,Ce,Jt)]:[2];case 1:return t.sent(),Kt(null),Qt(!1),[2]}})})},onCancel:function(){Kt(null),Qt(!1)}}):i(r,{children:[l(G,{showUserStoryDiff:De,isParent:""===Ie,message:_(Ce.value)||"",artifactId:Ce.artifactId,customStyles:bt,isDisplayHighlightControl:Ae,contextVariant:je,showConfidenceScore:Fe,CDNeededInChip:it}),ot&&l("div",e({className:R.approveButtonContainer,style:null==xt?void 0:xt.container},{children:l("button",e({type:"button",className:R.approveButton,style:null==xt?void 0:xt.button,disabled:ot.disabled||ot.isLoading,onClick:function(e){var t;e.stopPropagation(),null===(t=null==ot?void 0:ot.onClick)||void 0===t||t.call(ot)}},{children:ot.isLoading?i(r,{children:[l(f,{size:16,className:R.spinner,style:null==xt?void 0:xt.icon}),l("span",e({style:null==xt?void 0:xt.text},{children:ot.label}))]}):i(r,{children:[l("span",e({style:null==xt?void 0:xt.text},{children:ot.label})),l(b,{size:16,style:null==xt?void 0:xt.icon})]})}))}))]})]})),null===(me=Lt.sub_features)||void 0===me?void 0:me.map(function(t,n){var i=X(Ue,!1,t.artifactId);return l($,{artifactId:fe,isUserStoryCurrentlyUpdated:he,artifactTitleId:"".concat(ye,"-").concat(String.fromCharCode(65+n)),parentUserStory:Ce,parentIndex:"".concat(Ie).concat(Ie&&".").concat(Ne),currentIndex:"".concat(n+1),doNotShowBorderInViewMode:!1,currentUserStory:t,onUserStoryChange:function(t){return function(t,n){var i=o([],Ce.sub_features||[],!0);i[t]=n,ge(e(e({},Ce),{sub_features:i}))}(n,t)},enableDownload:!0,isDiffEditReviewMode:we,showUserStoryDiff:De,updateUserStoryArtifact:xe,handleDownloadUserStory:Ee,handleOpenSendDialog:Be,isDisplayHighlightControl:Ae,elementDisplayConfig:Ue,_resolvedConfig:i,actionItemsConfig:Me,onDelete:function(){return function(t){var n=(Ce.sub_features||[]).filter(function(e,n){return n!==t}),o=e(e({},Ce),{sub_features:n});jt(o),ge(o)}(n)},expandedSubFeatures:Ve,disableEditPlan:et,useMuiTooltip:nt},t.artifactId)})]}))}))]}))},ee=function(t){var n=t.artifactTitleIDs,a=t.expandedSubFeatures,s=t.isDiffEditReviewMode,u=t.showUserStoryDiff,d=t.updateUserStoryArtifact,c=t.isUserStoryCurrentlyUpdated,v=t.artifactId,p=t.handleOpenSendDialog,m=t.handleDownloadUserStory,h=t.selectedArtifactId,f=t.isDisplayHighlightControl,y=t.elementDisplayConfig,S=t.showWrapper,C=t.actionItemsConfig,g=t.contextVariant,I=t.showDisplayName,N=t.allowTitleEdit,b=t.showConfidenceScore,E=t.showBorderTop,B=t.defaultExpanded,x=t.showCompletionPanel,T=void 0!==x&&x,A=t.showAddSectionButton,U=void 0!==A&&A,P=t.disableEditPlan,k=void 0!==P&&P,_=t.useMuiTooltip,M=void 0!==_&&_,L=t.approveButtonConfig,j=t.CDNeededInChip,V=z(),G=V.userStory,O=V.setUserStory,H=V.customStyles,W=V.searchQueryList,F=V.currentHighlightIndex,q=V.setCurrentHighlightIndex;V.segmentComponentConfig;var Q=V.sectionStatusConfig,Z=null==H?void 0:H.userStoryCardStyles,J=0===F,K=F===W.length-1;return i("div",e({className:R.userStoryCardWrapper,style:f?e(e({},null==Z?void 0:Z.userStoryCardWrapper),{position:"relative"}):null==Z?void 0:Z.userStoryCardWrapper},{children:[f&&l(r,{children:W.length>0&&l("div",e({className:R.wrapper},{children:l("div",e({className:R.highlightNavigation},{children:i("div",e({className:R.navigationContainer},{children:[i("span",e({className:R.navCounter},{children:[F+1," of ",W.length]})),i("div",e({className:R.navButtons},{children:[l("button",e({onClick:function(){F>0&&q(function(e){return e-1})},className:R.navButton,disabled:J},{children:l(w,{size:20,className:R.navIcon})})),l("button",e({onClick:function(){F<W.length-1&&q(function(e){return e+1})},className:R.navButton,disabled:K},{children:l(D,{size:20,className:R.navIcon})}))]}))]}))}))}))}),G.map(function(e,t){var i=X(y,!0);return l($,{isUserStoryCurrentlyUpdated:c,artifactId:v,artifactTitleId:n[t]||"",expandedSubFeatures:a,currentUserStory:e,onUserStoryChange:function(e){O(function(n){return n[t]=e,o([],n,!0)})},parentIndex:"",currentIndex:"".concat(t+1),doNotShowBorderInViewMode:!0,enableDownload:!0,isDiffEditReviewMode:s,showUserStoryDiff:u,updateUserStoryArtifact:d,handleOpenSendDialog:p,handleDownloadUserStory:m,selectedArtifactId:h,isDisplayHighlightControl:f,elementDisplayConfig:y,_resolvedConfig:i,showWrapper:S,defaultExpanded:B,actionItemsConfig:C,contextVariant:g,showDisplayName:I,allowTitleEdit:N,showConfidenceScore:b,showBorderTop:E,sectionStatusConfig:Q,showCompletionPanel:T,showAddSectionButton:U,disableEditPlan:k,useMuiTooltip:M,approveButtonConfig:L,CDNeededInChip:j},e.artifactId)})]}))};export{$ as StoryCard,ee as UserStoryCardWrapper,$ as default,K as replaceLearnedTagsWithInfo};
|
|
2
2
|
//# sourceMappingURL=UserStoryCard.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{__assign as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import{createContext as t,
|
|
1
|
+
import{__assign as r}from"tslib";import{jsx as e}from"react/jsx-runtime";import{createContext as t,useContext as o,useState as n}from"react";var i=t(void 0),f=function(t){var o=t.children,f=n(null),u=f[0],m=f[1];return e(i.Provider,r({value:{contentRef:u,setContentRef:m}},{children:o}))},u=function(){var r=o(i);if(!r)throw new Error("useRefStore must be used inside RefProvider");return r};export{f as RefProvider,u as useRefStore};
|
|
2
2
|
//# sourceMappingURL=ref.context.js.map
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
interface TextEditorProps {
|
|
2
3
|
type: "string" | "html";
|
|
3
4
|
value: string;
|
|
@@ -8,8 +9,14 @@ interface TextEditorProps {
|
|
|
8
9
|
height: string;
|
|
9
10
|
mode: TMode;
|
|
10
11
|
doNotShowBorderInViewMode?: boolean;
|
|
12
|
+
onSaveUnsavedChanges?: () => void | Promise<void>;
|
|
13
|
+
onDiscardUnsavedChanges?: () => void;
|
|
14
|
+
isSavingUnsavedChanges?: boolean;
|
|
11
15
|
}
|
|
12
16
|
export type TMode = "readOnly" | "edit";
|
|
13
|
-
|
|
17
|
+
export interface RichTextEditorHandle {
|
|
18
|
+
requestClose: () => boolean;
|
|
19
|
+
}
|
|
20
|
+
declare const RichTextEditor: import("react").ForwardRefExoticComponent<TextEditorProps & import("react").RefAttributes<RichTextEditorHandle>>;
|
|
14
21
|
export default RichTextEditor;
|
|
15
22
|
//# sourceMappingURL=RichTextEditor.d.ts.map
|
package/dist/types/src/features/RequirementAI/components/RichTextEditor/RichTextEditor.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"RichTextEditor.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/RichTextEditor/RichTextEditor.tsx"],"names":[],"mappings":";AAoCA,UAAU,eAAe;IACvB,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAC;IACxB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACxD,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,KAAK,CAAC;IACZ,yBAAyB,CAAC,EAAE,OAAO,CAAA;IACnC,oBAAoB,CAAC,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC;AAED,MAAM,MAAM,KAAK,GAAG,UAAU,GAAG,MAAM,CAAA;AAEvC,MAAM,WAAW,oBAAoB;IACnC,YAAY,EAAE,MAAM,OAAO,CAAC;CAC7B;AAKD,QAAA,MAAM,cAAc,kHAoQlB,CAAC;AAIH,eAAe,cAAc,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
interface UnsavedChangesPopupProps {
|
|
2
|
+
isSaving?: boolean;
|
|
3
|
+
onSave: () => void | Promise<void>;
|
|
4
|
+
onDiscard: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare const UnsavedChangesPopup: ({ isSaving, onSave, onDiscard, }: UnsavedChangesPopupProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
export default UnsavedChangesPopup;
|
|
8
|
+
//# sourceMappingURL=UnsavedChangesPopup.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UnsavedChangesPopup.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/UnsavedChangesPopup/UnsavedChangesPopup.tsx"],"names":[],"mappings":"AAGA,UAAU,wBAAwB;IAC9B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnC,SAAS,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,eAAO,MAAM,mBAAmB,qCAI7B,wBAAwB,4CAwC1B,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
package/dist/types/src/features/RequirementAI/components/UserStoryCard/UserStoryCard.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UserStoryCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/UserStoryCard/UserStoryCard.tsx"],"names":[],"mappings":"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
|
|
1
|
+
{"version":3,"file":"UserStoryCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/RequirementAI/components/UserStoryCard/UserStoryCard.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA+B,SAAS,EAAE,MAAM,OAAO,CAAC;AA0B/D,OAAO,EAAE,UAAU,EAAE,MAAM,sCAAsC,CAAC;AAMlE,OAAQ,EAA8C,mBAAmB,EAAoB,MAAM,8CAA8C,CAAC;AAClJ,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AAYzE,UAAU,iBAAiB;IACvB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAE5B,sBAAsB,CAAC,EAAE,OAAO,CAAC;IACjC,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IAElC,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACjC;AAED,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAGD,MAAM,WAAW,oBAAoB;IACjC,YAAY,CAAC,EAAE,iBAAiB,CAAC;IACjC,WAAW,CAAC,EAAE,iBAAiB,CAAC;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,CAAC;CAC3D;AAED,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,CAAC,gBAAgB,EAAE,UAAU,KAAK,IAAI,CAAC;IAChD,IAAI,EAAE,SAAS,CAAC;IAChB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,KAAK,EAAE,UAAU,EAAE,CAAC;CACrB;AAED,UAAU,cAAc;IACpB,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,UAAU,CAAC;IAC7B,gBAAgB,EAAE,UAAU,CAAC;IAC7B,iBAAiB,EAAE,CAAC,UAAU,EAAE,UAAU,KAAK,IAAI,CAAC;IAEpD,WAAW,EAAE,MAAM,CAAC;IACpB,YAAY,EAAE,MAAM,CAAC;IACrB,yBAAyB,EAAE,OAAO,CAAC;IACnC,cAAc,EAAE,OAAO,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;IACxB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,2CAA2C;IAC3C,iBAAiB,EAAE,OAAO,CAAC;IAC3B,uBAAuB,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,oBAAoB,CAAC,EAAE,CAAC,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAAE,aAAa,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACrK,uBAAuB,EAAE,CAAC,YAAY,EAAE,kBAAkB,GAAG,IAAI,EAAE,sBAAsB,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACnK,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,eAAe,CAAC,EAAE,iBAAiB,CAAC;IACpC,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;IACtB,cAAc,CAAC,EAAC,UAAU,GAAG,QAAQ,CAAC;IACtC,eAAe,CAAC,EAAC,OAAO,CAAC;IACzB,cAAc,CAAC,EAAC,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAC,OAAO,CAAC;IAC7B,aAAa,CAAC,EAAC,OAAO,CAAC;IACvB,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC9B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,cAAc,CAAC,EAAE,OAAO,CAAA;CAG3B;AA+BD,wBAAgB,0BAA0B,CAAC,OAAO,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,EAAE,CAwC7E;AAgDD,eAAO,MAAM,SAAS,mpBAqCnB,cAAc,4CA08BhB,CAAC;AAEF,UAAU,MAAM;IACZ,2BAA2B,CAAC,EAAE,OAAO,CAAC;IACtC,UAAU,EAAE,MAAM,CAAC;IACnB,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAC/B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,iBAAiB,EAAE,OAAO,CAAC;IAC3B,uBAAuB,EAAE,CAAC,YAAY,EAAE,kBAAkB,GAAG,IAAI,EAAE,sBAAsB,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,CAAC,EAAG,WAAW,KAAK,OAAO,CAAC,GAAG,CAAC,CAAC;IACpK,oBAAoB,CAAC,EAAE,CAAC,eAAe,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,kBAAkB,CAAC,EAAE,MAAM,EAAE,EAAE,aAAa,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;IACrK,uBAAuB,CAAC,EAAE,CAAC,QAAQ,EAAE,KAAK,GAAG,KAAK,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrE,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,yBAAyB,CAAC,EAAE,OAAO,CAAC;IACpC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,cAAc,CAAC,EAAC,UAAU,GAAG,QAAQ,CAAC;IACtC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,aAAa,CAAC,EAAC,OAAO,CAAC;IACvB,eAAe,CAAC,EAAC,OAAO,CAAC;IACzB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,cAAc,CAAC,EAAE,OAAO,CAAA;CAC3B;AAED,eAAO,MAAM,oBAAoB,mgBAAiiB,MAAM,4CA6GvkB,CAAA;AAED,eAAe,SAAS,CAAC"}
|