1"use strict";(globalThis.webpackChunkcenterpiece_ui=globalThis.webpackChunkcenterpiece_ui||[]).push([[712],{4347(e,t,n){n.d(t,{PU:()=>o,bO:()=>i,hB:()=>s});let o=function(e){return e.JTBD="jtbd",e.JobStep="job_step",e.OutcomeStatement="outcome_statement",e.OutcomeStatementMTT="outcome_statement_mtt",e.OutcomeStatementMLO="outcome_statement_mlo",e.OutcomeStatementMLT="outcome_statement_mlt",e}({}),i=function(e){return e.Q_CHECK_GRAMMAR="q_check_grammar",e}({}),s=function(e){return e.group_mentoring="Group Mentoring",e.odi_insights_series="ODI Insights Series",e.product_showcases="Connect & Exchange",e.ask_us_anything="Ask Us Anything",e.public_webinar="Public Webinar",e}({})},8016(e,t,n){n.r(t),n.d(t,{default:()=>Y});var o=n(9950),i=n(601),s=n(5234),r=n(2203),a=n(3671),l=n(7111),c=n(7148),d=n(8182),u=n(5369),m=n(4414);const p=e=>{let{remarks:t,ignored:n,onIgnore:o,readonly:i}=e,a="primary";0!==t.length||n||(a="success");const l=`response ${a}`,c=!n&&t.length>0;return(0,m.jsx)(u.zW,{triggerOnce:!0,children:(0,m.jsxs)("div",{className:l,children:[(0,m.jsx)("div",{className:"_icon",children:"success"===a?(0,m.jsx)(r.A,{type:"solid",size:"16",icon:"fa-circle-check"}):(0,m.jsx)(r.A,{type:"solid",size:"16",icon:"fa-exclamation-circle"})}),(0,m.jsxs)("div",{style:{width:"100%"},children:[(0,m.jsx)(s.A,{direction:"vertical",size:12,style:{maxHeight:"150px",overflowX:"scroll",paddingRight:"24px"},children:n?t.length?(0,m.jsx)("div",{className:"_message",children:`Done! But you ignored ${t.length} issues.`}):null:(e=>e.length?e.map((t,n)=>(0,m.jsxs)(s.A,{direction:"vertical",size:16,children:[(0,m.jsx)("div",{className:"_message",dangerouslySetInnerHTML:{__html:t.Message.replaceAll("\n","<br />")}}),n<e.length-1?(0,m.jsx)("div",{className:"divider"}):null]},`rem_${n}`)):(0,m.jsx)("div",{className:"_message",children:"All good!"}))(t)}),!i&&c?(0,m.jsx)("div",{className:"_buttons",children:(0,m.jsx)(s.A,{size:8,children:(0,m.jsx)(d.A,{size:"small",onClick:o,children:"Ignore"})})}):null]})]})})};var h=n(300),v=n(3736),g=n(7797),x=n(4347),f=n(6419);const y="3.1.0",j="2.0.0";function w(e){return A(e)||b(e)}function A(e){if(!e.userInput)return!1;const t=(0,f.IX)(e.verLexer||"1.0.0"),n=(0,f.IX)(y);return!t||!n||t.major<n.major}function b(e){if(!e.userInput)return!1;if(!e.remarks.find(e=>e.RefId===x.bO.Q_CHECK_GRAMMAR))return!1;const t=(0,f.IX)(e.verPrompt||"1.0.0"),n=(0,f.IX)(j);return!t||!n||t.major<n.major}var _=n(8282);const k=o.createContext({importMultipleStatements:()=>{},moveJobStep:()=>{},moveOutcomeStatement:()=>{}});var S=n(7956);const I="\u200b",C=(e,t,n,o)=>{let i=N(n,t);const s=e.reverse(),r=Math.min(s.length,20);for(let a=0;a<r;a++){const e=s[a];if(0===e.trim().length)continue;o(i,{remarks:[],userInput:e+I,category:"",outcomeStatements:[{uuid:(0,S.A)(),userInput:"",remarks:[]}],uuid:(0,S.A)()})}},D=(e,t,n,o)=>{const i=z(n,t);if(!i)return;const s=N(n,i.uuid),r=T(i,t),a=e.reverse(),l=Math.min(a.length,20);for(let c=0;c<l;c++){const e=a[c];if(0===e.trim().length)continue;o(r,{uuid:(0,S.A)(),userInput:e+I,remarks:[]},s)}},N=(e,t)=>e.findIndex(e=>e.uuid===t),T=(e,t)=>e.outcomeStatements.findIndex(e=>e.uuid===t),z=(e,t)=>e.find(e=>e.outcomeStatements.some(e=>e.uuid===t));var M=function(e){return e.MTT="Minimize the time it takes to",e.MLO="Minimize the likelihood of",e.MLT="Minimize the likelihood that",e}(M||{});const O=e=>{let{uuid:t,apiFunction:n,automationEntity:i,placeholder:a,requestTrigger:u,onResponseChange:f,initialResponse:w,readonly:A,controls:b}=e;const{importMultipleStatements:S}=(0,o.useContext)(k),C=(0,h.d4)(e=>e.triangularisDocData.inputStatements[t]),D=(0,h.d4)(e=>e.triangularisDocData.config),N=(0,h.wA)(),[T,z]=(0,o.useState)(!1),[O,P]=(0,o.useState)(!1);(0,o.useEffect)(()=>{void 0===C&&w.userInput&&N((0,v.mV)({uuid:t,userInput:w.userInput}))},[N,w.userInput,C,t]),(0,o.useEffect)(()=>{const{userInput:e}=w;if(e&&e.endsWith(I)){const n=e.replace(I,"");z(!0),U(n).then(()=>{z(!1),N((0,v.mV)({uuid:t,userInput:n}))})}},[]);const E=e=>{e&&P(!1),f(e)},L=e=>{if(C)return void l.A.show({type:"info",content:"Paste multiple statements on an empty input field only."});const n=e.split("\n").filter(e=>e.trim().length>0);if(n.length>20)return l.A.show({type:"info",content:"You can only paste up to 20 statements at a time."}
1),void N((0,v.mV)({uuid:t,userInput:""}));S(i,t,n),N((0,v.mV)({uuid:t,userInput:""}))};const U=async e=>{if(e)try{const t=i===x.PU.OutcomeStatement?(e=>{const t=Object.values(M).find(t=>e.startsWith(t)),n={remarks:[{RefId:"",Origin:"",Message:'Your statement is missing "Minimize the time it takes to" or "Minimize the likelihood of/that".'}],userInput:e,automationEntity:x.PU.OutcomeStatement,verLexer:y,verPrompt:j};if(!t)return E(n),null;switch(t){case M.MTT:return x.PU.OutcomeStatementMTT;case M.MLO:return x.PU.OutcomeStatementMLO;case M.MLT:return x.PU.OutcomeStatementMLT;default:return E(n),null}})(e):i;if(!t)return;if(!function(e,t){return t!==x.PU.JTBD&&t!==x.PU.JobStep||!e.toLocaleLowerCase().startsWith("minimize")||(E({remarks:[{RefId:"",Origin:"",Message:'"Minimize" is the direction of improvement reserved for the beginning of an outcome statement. A direction of improvement is not required or recommended in the structure of a JTBD statement or a job step.'}],userInput:e,automationEntity:t,verLexer:y,verPrompt:j}),!1)}(e,t))return;const o=await n(e,t,D);E(o)}catch(o){E(void 0);try{await(new _.A).log({event:"failed_triangularis_statement_analysis",resource_id:t,description:"resource_id is statement uuid",json_misc_data:JSON.stringify({statement:e,entity:i}),event_params:{triangularis_lexer:y,triangularis_prompt:j},err_message:o.message||"n/a"})}catch{}const n=g.A.is("functions/permission-denied",o)?"Please check if your membership or trial has expired.":void 0;g.A.handle(o,{overrideMessage:n,style:{marginTop:"20px"}})}else E(void 0)},J=async()=>{if(!T)if(C)try{z(!0);const e=C.trim();e!==C&&N((0,v.mV)({uuid:t,userInput:e})),E(void 0),await U(e)}finally{z(!1)}else E(void 0)};return(0,m.jsxs)("div",{className:"input-statement",children:[(0,m.jsxs)("div",{style:{position:"relative"},children:[(0,m.jsx)(c.A,{title:"Press Enter to validate",autoSize:!0,placeholder:a,value:C,onChange:e=>{const n=e.target.value;n.includes("\n")?L(n):N((0,v.mV)({uuid:t,userInput:n}))},onKeyDown:async e=>{"Enter"===e.key&&(e.preventDefault(),await J())},disabled:T||A,onBlur:()=>{C!==w.userInput&&J()},message:T?(0,m.jsx)("div",{className:"loading-icon",children:(0,m.jsx)(r.A,{type:"regular",size:"10",icon:"fa-arrows-rotate"})}):""}),(0,m.jsxs)("div",{className:"_button-wrapper",children:[null!==b&&void 0!==b&&b.onMoveUpClick?(0,m.jsx)(d.A,{color:"neutral",type:"link",size:"xsmall",title:"Move Up",onClick:b.onMoveUpClick,disabled:T||A,children:(0,m.jsx)(r.A,{type:"solid",size:"10",icon:"fa-arrow-up"})}):null,null!==b&&void 0!==b&&b.onMoveDownClick?(0,m.jsx)(d.A,{color:"neutral",type:"link",size:"xsmall",title:"Move Down",onClick:b.onMoveDownClick,disabled:T||A,children:(0,m.jsx)(r.A,{type:"solid",size:"10",icon:"fa-arrow-down"})}):null,null!==b&&void 0!==b&&b.onDeleteClick?(0,m.jsx)(d.A,{onClick:b.onDeleteClick,disabled:T||A,size:"xsmall",color:"danger",title:"Delete Outcome Statement",children:(0,m.jsx)(r.A,{type:"solid",size:"10",icon:"fa-trash"})}):null]})]}),u?o.cloneElement(u,{onClick:J}):null,(()=>{if(!C||C!==w.userInput||C.endsWith(I))return;const{remarks:e}=w;return(0,m.jsx)(s.A,{size:8,direction:"vertical",children:(0,m.jsx)(p,{remarks:e,ignored:O,onIgnore:()=>P(!0),readonly:A})})})()]})},P=e=>{let{jtbdData:t,readonly:n}=e;const i=(0,h.wA)(),l=a.A.getInstance();return(0,o.useEffect)(()=>()=>{i((0,v.Ms)())},[i]),(0,m.jsxs)(s.A,{size:8,direction:"vertical",className:"JTBD",children:[(0,m.jsxs)("h5",{style:{display:"flex",justifyContent:"space-between"},children:[(0,m.jsx)("span",{children:"Job-to-be-Done"}),(0,m.jsxs)("span",{className:"enter-to-validate",children:["Press\xa0",(0,m.jsx)(r.A,{type:"solid",size:"10",icon:"fa-arrow-turn-down-left"})," to validate"]})]}),(0,m.jsx)(O,{uuid:t.uuid,apiFunction:l.runOutcomeAutomation.bind(l),automationEntity:x.PU.JTBD,placeholder:"e.g. Learn to execute a methodology for innovation",onResponseChange:e=>{if(!e)return;const n={uuid:t.uuid,executor:t.executor||"",remarks:e.remarks||[],userInput:e.userInput||""};e.verLexer&&e.verPrompt&&(n.verLexer=e.verLexer,n.verPrompt=e.verPrompt),i((0,v.sx)(n))}
1,initialResponse:{remarks:t.remarks,userInput:t.userInput,automationEntity:x.PU.JTBD},readonly:n})]})},E=e=>{let{outcomeIndex:t,outcomeStatementData:n,readonly:i,maxIndex:r,jobIndex:l}=e;const{moveOutcomeStatement:c}=(0,o.useContext)(k),d=(0,h.wA)(),u=a.A.getInstance();return(0,m.jsx)(s.A,{direction:"vertical",size:12,className:"outcome",children:(0,m.jsx)("div",{className:"_textarea-wrapper",children:(0,m.jsx)(O,{uuid:n.uuid,apiFunction:u.runOutcomeAutomation.bind(u),automationEntity:x.PU.OutcomeStatement,placeholder:"e.g. Minimize the likelihood of misjudging the value of the methodology",onResponseChange:e=>{if(!e)return;const t={uuid:n.uuid,remarks:e.remarks||[],userInput:e.userInput||""};e.verLexer&&e.verPrompt&&(t.verLexer=e.verLexer,t.verPrompt=e.verPrompt),d((0,v.SK)(t))},initialResponse:{remarks:n.remarks,userInput:n.userInput,automationEntity:x.PU.OutcomeStatement},readonly:i,controls:i?void 0:{onDeleteClick:r>0?()=>{d((0,v.M3)(n))}:void 0,onMoveUpClick:t>0?c.bind(null,t,t-1,l):void 0,onMoveDownClick:t<r?c.bind(null,t,t+1,l):void 0}})})})};var L=n(2211),U=n(971);const J=["Define","Locate","Prepare","Confirm","Execute","Monitor","Modify","Conclude"],R=e=>{let{jobIndex:t,jobStepData:n,showDelete:i,readonly:l,maxIndex:c}=e;const{moveJobStep:p}=(0,o.useContext)(k),g=(0,h.wA)(),f=a.A.getInstance(),[y,j]=(0,o.useState)(!0);(0,o.useEffect)(()=>{setTimeout(()=>{j(!1)},10)},[]);const w=(0,m.jsx)("ul",{className:"_menu",children:J.map(e=>(0,m.jsx)("li",{children:(0,m.jsx)(d.A,{onClick:()=>(e=>{const t={...n,category:e};g((0,v.$3)(t))})(e),color:"neutral",type:"link",children:e})},e))});return(0,m.jsx)(u.zW,{cascade:!0,triggerOnce:!0,children:y?(0,m.jsx)("div",{}):(0,m.jsxs)("div",{className:"job-step",children:[(0,m.jsxs)("div",{className:"_header",children:[(0,m.jsxs)("div",{className:"_left",children:[(0,m.jsx)("h4",{children:"Job Step"}),(0,m.jsx)(L.A,{trigger:"click",overlay:w,disabled:l,children:(0,m.jsxs)(d.A,{type:"link",size:"small",children:[n.category||"Category",(0,m.jsx)(r.A,{type:"regular",size:"12",icon:"fa-chevron-down"})]})})]}),(0,m.jsx)("div",{className:"_right",children:(0,m.jsxs)(s.A,{children:[t>0?(0,m.jsx)(d.A,{disabled:l,onClick:()=>p(t,t-1),color:"neutral",size:"xsmall",title:"Move Left",icononly:!0,children:(0,m.jsx)(r.A,{type:"solid",size:"12",icon:"fa-arrow-left"})}):null,t<c?(0,m.jsx)(d.A,{disabled:l,onClick:()=>p(t,t+1),color:"neutral",size:"xsmall",title:"Move Right",icononly:!0,children:(0,m.jsx)(r.A,{type:"solid",size:"12",icon:"fa-arrow-right"})}):null,i?(0,m.jsx)(d.A,{disabled:l,onClick:()=>{g((0,v.yx)(n))},color:"danger",type:"link",size:"small",title:"Delete Job Step",icononly:!0,children:(0,m.jsx)(r.A,{type:"solid",size:"12",icon:"fa-trash"})}):null,(0,m.jsx)(U.A,{content:"Add New Job Step",children:(0,m.jsx)(d.A,{disabled:l,onClick:()=>{g((0,v.f$)(t+1))},color:"primary",type:"primary",size:"small",icononly:!0,children:(0,m.jsx)(r.A,{type:"solid",size:"12",icon:"fa-plus"})})})]})})]}),(0,m.jsxs)("div",{className:"_content",children:[(0,m.jsxs)("div",{className:"job-step-statement",children:[(0,m.jsxs)("span",{className:"enter-to-validate",style:{marginBottom:8},children:["Press\xa0",(0,m.jsx)(r.A,{type:"solid",size:"10",icon:"fa-arrow-turn-down-left"})," ","to validate"]}),(0,m.jsx)(O,{uuid:n.uuid,apiFunction:f.runOutcomeAutomation.bind(f),automationEntity:x.PU.JobStep,placeholder:"e.g. Determine the value of the methodology",onResponseChange:e=>{if(!e)return;const t={remarks:e.remarks||[],userInput:e.userInput||"",category:n.category||"Category",outcomeStatements:n.outcomeStatements,uuid:n.uuid};e.verLexer&&e.verPrompt&&(t.verLexer=e.verLexer,t.verPrompt=e.verPrompt),g((0,v.$3)(t))},initialResponse:{userInput:n.userInput,remarks:n.remarks,automationEntity:x.PU.JobStep},readonly:l})]}),(0,m.jsxs)("div",{className:"outcome-wrapper",children:[(0,m.jsxs)("div",{className:"_header",children:[(0,m.jsx)("div",{className:"_left",children:(0,m.jsx)("h5",{children:"Outcome Statements"})}),(0,m.jsx)("div",{className:"_right",children:(0,m.jsxs)("span",{className:"enter-to-validate",children:["Press\xa0",(0,m.jsx)(r.A,{type:"solid",size:"10",icon:"fa-arrow-tur
1n-down-left"})," ","to validate"]})})]}),(0,m.jsx)("div",{className:"statement-wrapper",children:n.outcomeStatements.map((e,o)=>(0,m.jsx)(E,{outcomeIndex:o,outcomeStatementData:e,readonly:l,maxIndex:n.outcomeStatements.length-1,jobIndex:t},e.uuid))})]})]}),(0,m.jsx)("div",{className:"button-float",children:(0,m.jsxs)(d.A,{size:"small",onClick:()=>{g((0,v.zn)(n))},children:[(0,m.jsx)(r.A,{type:"regular",size:"12",icon:"fa-plus"}),"Add Outcome Statement"]})})]})})};var $=n(4156),B=n(2022),V=n(2585),W=n(7788);const F=e=>{let{readonly:t}=e;const n=(0,h.wA)(),i=(0,h.d4)(e=>e.triangularisDocData.jtbd.executor),[s,r]=(0,o.useState)(i||"");(0,o.useEffect)(()=>{r(i||"")},[i]);return(0,m.jsx)(W.A,{value:s,onBlur:e=>{n((0,v.jt)(e.target.value))},onChange:e=>r(e.target.value),placeholder:"e.g. Innovators",disabled:t})};var q=n(1512),K=n(4065);const H=n.p+"static/media/triangularis-tour-img.d7fa31dec8f402f5dd37.gif";var X=n(4043);const G=e=>{let{visible:t,closeable:n,onClose:i,study:c,docId:u,onUpdateComplete:p}=e;const[h,v]=(0,o.useState)(!1),[x,f]=(0,o.useState)(null),[w,k]=(0,o.useState)({lexer:0,prompt:0});(0,o.useEffect)(()=>{if(c){const e=function(e){let t={lexer:0,prompt:0};A(e.jtbd)&&t.lexer++,b(e.jtbd)&&t.prompt++;for(const n of e.jobSteps){A(n)&&t.lexer++,b(n)&&t.prompt++;for(const e of n.outcomeStatements)A(e)&&t.lexer++,b(e)&&t.prompt++}return t}(c);console.log("fs: outdatedCount",e,c.jtbd.uuid),k(e)}},[c]);const S=async()=>{try{try{await(new _.A).log({event:"click_triangularis_ver_update",resource_id:(null===c||void 0===c?void 0:c.jtbd.uuid)||"n/a",description:u,event_params:{triangularis_lexer:y,triangularis_prompt:j}})}catch{}if(v(!0),f(null),await(()=>{const e=Math.round((new Date).getTime()/1e3),t=`[BAK] ${u} [${e}]`;return(new q.A).saveCopy(u,t,{backupOnly:!0})})(),w.lexer||w.prompt){const e=await a.A.getInstance().upgradeTriangularisDoc(u);if(console.log("fs: upgrade result",e),e.err){if(e.reevaluated<0)f("An error occurred while updating the study document. Please retry shortly and contact support if the issue persists.");else{const t=Math.round((e.reevaluated+e.skipped)/(w.lexer+e.skipped)*100);f(`The study document was partially (~${t}%) updated due to an issue. Please retry shortly and contact support if the issue persists.`)}p(!0)}else l.A.show({content:"Your study has been updated to the latest version.",type:"success",style:{marginTop:"20px"}}),I(),p(null)}}catch(e){try{await(new _.A).log({event:"failed_triangularis_ver_update",resource_id:(null===c||void 0===c?void 0:c.jtbd.uuid)||"n/a",description:u,event_params:{triangularis_lexer:y,triangularis_prompt:j},err_message:e.message||"n/a"})}catch{}console.log("fs: pTr ver update error",e);const t=g.A.is("functions/permission-denied",e)?"Please check if your membership or trial has expired.":"An error occurred while updating the study document. If the error persists, please contact support.";g.A.handle(e,{overrideMessage:t,style:{marginTop:"20px"},duration:5}),I(),p(e)}finally{v(!1)}},I=()=>{v(!1),f(null),k({lexer:0,prompt:0}),i&&i()};return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)(X.A,{visible:t||!1,footer:null,width:420,destoryOnClose:!0,maskClosable:!h&&(n||!1),closable:!h&&(n||!1),onCancel:I,onClose:I,children:(0,m.jsx)("div",{children:(0,m.jsxs)(s.A,{direction:"vertical",size:24,style:{width:"100%"}
1,children:[(0,m.jsxs)(s.A,{direction:"vertical",size:10,children:[(0,m.jsxs)("h3",{children:[(0,m.jsx)(r.A,{type:"regular",size:"24",icon:"fa-exclamation-circle"}),"\xa0 Update Required"]}),(0,m.jsx)("p",{children:"This study was created with an older version of Outcome Validation tool. It is recommended that you update the study to the latest version."}),x&&(0,m.jsxs)("div",{className:"custom-note",children:[(0,m.jsx)(r.A,{size:"16",type:"solid",icon:"fa-exclamation-circle"}),(0,m.jsx)("p",{children:x})]})]}),(0,m.jsx)(d.A,{disabled:h,loading:h,onClick:S,block:!0,children:"Update Study"})]})})})})},Y=e=>{var t,n,c;let{unrestricted:u}=e;const[p,A]=(0,o.useState)(!1),[b,I]=(0,o.useState)(!0),[N,T]=o.useState(""),[z,M]=o.useState(void 0),[O,E]=(0,o.useState)(!1),[L,J]=(0,o.useState)(!1),[W,X]=(0,o.useState)(!1),Y=(0,h.wA)(),Q=(0,h.d4)(e=>e.triangularisDocData.jtbd),Z=(0,h.d4)(e=>e.triangularisDocData.jobSteps),ee=(0,h.d4)(e=>e.triangularisDocData.hasUnsavedChanges),{data:te,refetch:ne}=(0,i.b4)(),{data:oe,isError:ie,error:se,refetch:re}=(0,i.cC)(null!==(t=null===z||void 0===z?void 0:z.docName)&&void 0!==t?t:"");(0,o.useEffect)(()=>{setTimeout(()=>{I(!1)},1e3)},[]),(0,o.useEffect)(()=>{if(ie){var e;const t=g.Q.getMessage(null!==(e=se.code)&&void 0!==e?e:"");ae(t||"An error occurred while loading the data.");try{(new _.A).log({event:"failed_doc_io",resource_id:N||"n/a",event_detail:"Triangularis Doc - load",err_message:t||"An error occurred while loading the data."})}catch{}setTimeout(()=>{le()},2e3)}},[ie,se]),(0,o.useEffect)(()=>{if(oe)if(Y((0,v.eE)(oe)),function(e){if(w(e.jtbd))return!0;for(const t of e.jobSteps){if(w(t))return!0;for(const e of t.outcomeStatements)if(w(e))return!0}return!1}(oe)){X(!0),J(!0);try{(new _.A).log({event:"show_triangularis_ver_notif",resource_id:oe.jtbd.uuid,event_params:{triangularis_lexer:y,triangularis_prompt:j}})}catch{}}else X(!1),J(!1);else Y((0,v.eE)({jtbd:{uuid:(0,S.A)(),executor:"",userInput:"",remarks:[]},jobSteps:[{uuid:(0,S.A)(),userInput:"",category:"",remarks:[],outcomeStatements:[{uuid:(0,S.A)(),userInput:"",remarks:[]}]}]})),X(!1),J(!1)},[oe,Y]),(0,o.useEffect)(()=>{!function(){const e=navigator.userAgent||navigator.vendor;/android/i.test(e)||/iPad|iPhone|iPod/.test(e)&&!window.MSStream?A(!0):A(!1)}()},[]),(0,o.useEffect)(()=>{const e=e=>{ee&&(e.preventDefault(),e.returnValue="")};return window.addEventListener("beforeunload",e),()=>{window.removeEventListener("beforeunload",e)}},[ee]);const ae=(e,t,n)=>{l.A.show({content:e,type:n||"error",style:{marginTop:"20px"},duration:t||3})},le=()=>{window.location.reload()},ce=()=>{if(ie){ae("The document was not loaded successfully. It is recommended to reload the page before making changes.",4);try{(new _.A).log({event:"failed_doc_io",resource_id:N||"n/a",event_detail:"Triangularis Doc - changes blocked",err_message:"doc changes blocked due to load error"})}catch{}return!0}return!(null===z||void 0===z||!z.backupOnly)&&(ae("To make changes to a backup document, first click 'Duplicate' to create a new copy.",6,"info"),!0)};return(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(V.A,{currentDocName:null!==N&&void 0!==N?N:void 0,docList:(null===te||void 0===te?void 0:te.filter(e=>!e.backupOnly).map(e=>({id:e.docName,name:e.docName})))||[],onNew:le,onOpen:async e=>{if(N===e)return void ae(`${e} already open`,1.5,"info");Y((0,v.Ms)()),T(e);const t=null===te||void 0===te?void 0:te.find(t=>t.docName===e);M(t),J(!1),X(!1)},onSave:async e=>{try{if(ce())return void e(!1);const t=new q.A;await t.saveDocData(N,Q,Z),e(!0),ne(),re(),Y((0,v.MR)(!1))}catch(t){try{await(new _.A).log({event:"failed_doc_io",resource_id:N||Q.uuid,event_detail:"Triangularis Doc - save",err_message:t.message||"n/a"})}catch{}e(!1),console.log(t);const n=g.A.is("permission-denied",t)?"Could not save data. Please check if your membership or trial has expired.":void 0;g.A.handle(t,{overrideMessage:n,style:{marginTop:"20px"}})}},onRename:async(e,t)=>{try{var n;if(ce())return!1;const o=new q.A;await o.renameDoc(e,t);const i=await ne();Y((0,v.Ms)()),T(t);const s=null===(n=i.data)||void 0===n?void 0:n.find(e=>e.docName===t);return s?(M(s),!0):(console.log("fs-log: Could not find renamed doc."),window.location.reload(),!1)}catch(o){try{await(new _.A).log({event:"failed_doc_io",resource_id:N,event_detail:"Triangularis Doc - rename",json_misc_data:JSON.stringify({oldName:e,newName:t}),err_message:o.message||"n/a"})}catch{}const n=g.A.is("permission-denied",o)?"Could not rename data. Please check if your membership or trial has expired.":void 0;return g.A.handle(o,{overrideMessage:n,style:{marginTop:"20px"}}),!1}},onSaveCopy:async(e,t)=>{try{var n;const o=new q.A;await o.saveCopy(e,t);const i=await ne();Y((0,v.Ms)()),T(t);const s=null===(n=i.data)||void 0===n?void 0:n.find(e=>e.docName===t);return s?(M(s),!0):(console.log("fs-log: Could not find duplicated doc."),window.location.reload(),!1)}catch(o){try{await(new _.A).log({event:"failed_doc_io",resource_id:N,event_detail:"Triangularis Doc - s
1ave copy",json_misc_data:JSON.stringify({oldName:e,newName:t}),err_message:o.message||"n/a"})}catch{}const n=g.A.is("permission-denied",o)?"Could not save copy of data. Please check if your membership or trial has expired.":void 0;return g.A.handle(o,{overrideMessage:n,style:{marginTop:"20px"}}),!1}},onDelete:async e=>{try{const t=new q.A;return await t.deleteDoc(e),N===e?(setTimeout(()=>{window.location.reload()}),!0):(ne(),!0)}catch(t){try{await(new _.A).log({event:"failed_doc_io",resource_id:e,event_detail:"Triangularis Doc - delete",err_message:t.message||"n/a"})}catch{}const n=g.A.is("permission-denied",t)?"Could not delete data. Please check if your membership or trial has expired.":void 0;return g.A.handle(t,{overrideMessage:n,style:{marginTop:"20px"}}),!1}},onSetDocName:T,hasUnsavedChanges:ee,customOptions:(0,m.jsxs)(s.A,{children:[(0,m.jsxs)(d.A,{disabled:O,loading:O,size:"small",onClick:async()=>{if(u)try{if(!N)return void ae("Please save this file before exporting.",void 0,"info");E(!0);const e=a.A.getInstance(),t=await e.exportTriangularisDoc(N);await(0,f.cW)(`${N}.docx`,t),ee&&ae("Exported file only includes saved data. Save the file first to include all changes.",5,"info")}catch(e){try{await(new _.A).log({event:"failed_doc_io",resource_id:N,event_detail:"Triangularis Doc - export",err_message:e.message||"n/a"})}catch{}ae("Could not export data. Please try again later or contact support.",4)}finally{E(!1)}else l.A.show({content:"Could not export data. Please check if your membership or trial has expired.",type:"error",style:{marginTop:"20px"},duration:3})},title:"Export Word document in Downloads folder",children:[(0,m.jsx)(r.A,{type:"solid",size:"14",icon:"fa-file-word"})," Export"]}),(0,m.jsx)("div",{className:"v-divider",children:(0,m.jsx)(r.A,{type:"regular",size:"14",icon:"fa-pipe"})}),(0,m.jsx)(K.v,{tourTitle:"Outcome Validation",tourText:"Let's start with a quick tour of the Outcome Validation tool.",tourImage:H,localStorageKey:"pTrTourDismissed",iframeSrc:"https://www.figma.com/embed?embed_host=share&url=https%3A%2F%2Fwww.figma.com%2Fproto%2FsPd02YsBE7sh64WwTPojjk%2FProduct-tour%3Fpage-id%3D270%253A48274%26type%3Ddesign%26node-id%3D270-51594%26viewport%3D970%252C503%252C0.06%26t%3DDBEmi7nup84eLb3Z-1%26scaling=scale-down-width%26hide-ui%3D1",iframeTitle:"Outcome Validation Product Tour",iframeHeight:"660"})]}),docStatus:(()=>{const e=null!==z&&void 0!==z&&z.backupOnly?"fa-lock":W?"fa-exclamation-circle":"",t=null!==z&&void 0!==z&&z.backupOnly?"This is a backup document. To make changes, first click 'Duplicate' to create a new copy.":W?"This document was created with an older version of the tool. Please upgrade to the latest version.":"";return e?(0,m.jsx)(U.A,{content:t,children:(0,m.jsx)("span",{className:"status-icon",children:(0,m.jsx)(r.A,{type:"solid",size:"14",icon:e})})}):void 0})()}),p&&(0,m.jsx)("div",{className:"sticky-banner",children:(0,m.jsxs)("p",{children:[(0,m.jsx)(r.A,{type:"solid",size:"14",icon:"fa-exclamation-circle"})," Tools are optimized for desktop use only."]})}),(0,m.jsx)("div",{children:b?(0,m.jsx)("div",{className:"loading",children:(0,m.jsx)(r.A,{type:"regular",size:"36",icon:"fa-spinner"})}):(0,m.jsx)("div",{className:"triangularis-container",children:(0,m.jsxs)($.A,{gutter:50,children:[(0,m.jsx)(B.A,{sm:12,md:6,children:(0,m.jsxs)(s.A,{size:24,direction:"vertical",children:[(0,m.jsxs)(s.A,{size:12,direction:"vertical",children:[(0,m.jsx)("h2",{children:"Outcome Validation"}),(0,m.jsx)("p",{children:"The Outcome Validation tool uses artificial intelligence to gauge the accuracy of your job-to-be-done, job step, and outcome statements. Use it to document and validate if your statements follow the guidelines."}),(0,m.jsxs)(s.A,{direction:"vertical",size:0,children:[(0,m.jsx)("p",{children:(0,m.jsxs)("strong",{style:{fontWeight:500,color:"#253133"},children:["Reference training material:",(0,m.jsx)("br",{})]})}),(0,m.jsx)(U.A,{placement:"topLeft",content:"Make sure you are logged in to the Training Platform and have completed the prerequisites of this module.",children:(0,m.jsx)(d.A,{style:{height:"auto"},type:"link",color:"primary",onClick:()=>window.open("https://training.strategyn.com/course/10415756/module/15951956","_blank"),children:"Guidelines for Outcome Discovery"})})]})]}),(0,m.jsx)("div",{className:"divider"}),(0,m.jsxs)(s.A,{size:8,direction:"vertical",children:[(0,m.jsx)("h5",{children:"Job Executor"}),(0,m.jsx)(F,{readonly:null!==(n=null===z||void 0===z?void 0:z.backupOnly)&&void 0!==n&&n})]}),(0,m.jsx)(P,{jtbdData:Q,readonly:null!==(c=null===z||void 0===z?void 0:z.backupOnly)&&void 0!==c&&c})]})}),(0,m.jsx)(B.A,{sm:12,md:18,children:(0,m.jsx)("div",{className:"job-step-wrapper",children:(0,m.jsx)(k.Provider,{value:{importMultipleStatements:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];((e,t,n,o,i)=>{e===x.PU.JobStep?C(n,t,i,function(){o((0,v.wz)({index:arguments.length<=0?void 0:arguments[0],jobStep:arguments.length<=1?void 0:arguments[1]}))}):e===x.PU.OutcomeStatement&&D(n,t,i,function(){o((0,v.u0)({atOutcomeIndex:arguments.length<=0?void 0:arguments[0],outcome:arguments.length<=1?void 0:arguments[1],jobStepIndex:arguments.length<=2?void 0:arguments[2]}))})})(...t,Y,Z)},moveJobStep:function(){Y((0,v.NS)({fromIndex:arguments.length<=0?void 0:arguments[0],toIndex:arguments.length<=1?void 0:arguments[1]}))},moveOutcomeStatement:function(){Y((0,v.z9)({fromIndex:arguments.length<=0?void 0:arguments[0],toIndex:arguments.length<=1?void 0:arguments[1],jobStepIndex:arguments.length<=2?void 0:arguments[2]}))}},children:null===Z||void 0===Z?void 0:Z.map((e,t)=>{var n;return(0,m.jsx)(R,{jobIndex:t,jobStepData:e,showDelete:Z.length>1,readonly:null!==(n=null===z||void 0===z?void 0:z.backupOnly)&&void 0!==n&&n,maxIndex:Z.length-1},e.uuid)})})})})]})})}),u&&L&&!(null!==z&&void 0!==z&&z.backupOnly)&&(0,m.jsx)(G,{visible:L,onClose:()=>J(!1),closeable:!0,study:null!==oe&&void 0!==oe?oe:null,docId:N,onUpdateComplete:e=>{console.log("fs-log: Update complete. err: ",e||"none"),ne(),re()}})]})}},7148(e,t,n){n.d(t,{A:()=>r});var o=n(9950),i=n(9398),s=n(4613);n(7119);class r extends o.Component{getSizeClassName(e){switch(e){case"small":return"st-textarea-sm";case"large":return"st-textarea-lg";default:return""}}getWrapperClassName(e){switch(e){case"warning":return"st-textarea-warning-wrapper";case"error":return"st-textarea-error-wrapper";default:return""}}render(){const{type:e,label:t,size:n,message:o,className:r,...a}=this.props;return(0,i.a)("span",{className:`st-textarea-wrapper ${this.getWrapperClassName(e)}
1 ${this.getSizeClassName(n)} ${r||""}`,children:[t&&(0,i.j)("small",{className:"input-label",children:t}),(0,i.j)(s.I.TextArea,{...a}),o&&(0,i.j)("small",{className:"input-caption",children:o})]})}}},971(e,t,n){n.d(t,{A:()=>r});var o=n(9950),i=n(9398),s=n(9115);n(7119);class r extends o.Component{render(){const{children:e,className:t,...n}=this.props;return(0,i.j)("div",{className:`st-tooltip-wrapper ${t||""}`,children:(0,i.j)(s.A,{...n,overlayClassName:"st-tooltip",children:e})})}}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.