<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">try{let e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},t=(new e.Error).stack;t&amp;&amp;(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="31ced0f5-1e35-4c10-8810-3de265315d7f",e._sentryDebugIdIdentifier="sentry-dbid-31ced0f5-1e35-4c10-8810-3de265315d7f")}catch(e){}("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{}).SENTRY_RELEASE={id:"2025.1.67057"},(this.webpackChunk_youtrack_simplified=this.webpackChunk_youtrack_simplified||[]).push([[7425],{248:(e,t,n)=&gt;{n.d(t,{AP:()=&gt;c,FN:()=&gt;l,KC:()=&gt;d,RN:()=&gt;f,Rw:()=&gt;C,ZP:()=&gt;A,cQ:()=&gt;g,mr:()=&gt;m,nC:()=&gt;r,rB:()=&gt;h,sh:()=&gt;y,ub:()=&gt;p,v0:()=&gt;u});var i=n(5846),s=n.n(i),o=n(62200),a=n.n(o)()(s());a.push([e.id,".c_container__b94 {\n  display: flex;\n  flex-direction: row;\n}\n\n.c_avatarContainer__d2b {\n  margin-top: 5px;\n}\n\n.c_rightPart__aa3 {\n  flex-grow: 2;\n  max-width: calc(100% - 40px);\n}\n\n.c_limitedVisibility__d0a.c_limitedVisibility__d0a {\n  --editor-background-color: var(--ring-warning-background-color);\n  --editor-border-color: var(--ring-warning-color);\n}\n\n/* stylelint-disable declaration-no-important */\n.c_commentEditorUnfocused__dfd {\n  height: initial !important; /* JT-76997. Using important here to avoid editor\n                                  height after resizing for unfocused state */\n}\n\n.c_commentEditorWithToolbar__d30 {\n}\n\n.c_commentEditor__cb1.c_commentEditor__cb1 {\n  min-height: 0;\n  border-radius: 6px;\n}\n\n.c_editorActions__d16 {\n  margin-top: var(--ring-unit);\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  gap: var(--ring-unit);\n  align-items: baseline;\n}\n\n.c_hiddeableToolbar__e9d.c_hiddeableToolbar__e9d {\n  display: none;\n  opacity: 0;\n  transition: opacity 0.3s;\n}\n\n.c_commentEditorFocused__f63 .c_hiddeableToolbar__e9d.c_hiddeableToolbar__e9d {\n    display: flex;\n    opacity: 1;\n  }\n\n.c_commentEditorArea__f39.c_commentEditorArea__f39 &gt; .ProseMirror {\n  padding: 8px calc(var(--ring-unit) * 2);\n}\n\n.compactUiMode :is(.c_commentEditorArea__f39.c_commentEditorArea__f39 &gt; .ProseMirror) {\n    padding: calc(var(--ring-unit) + 2px) calc(var(--ring-unit) * 2) 0;\n  }\n\n.c_commentEditorFocused__f63 :is(.c_commentEditorArea__f39.c_commentEditorArea__f39 &gt; .ProseMirror) {\n    padding: 2px calc(var(--ring-unit) * 2);\n    min-height: 56px;\n  }\n\n.c_commentEditorFocused__f63:not(.c_commentEditorWithToolbar__d30) :is(.c_commentEditorArea__f39.c_commentEditorArea__f39 &gt; .ProseMirror) {\n    padding-top: 8px;\n    min-height: 88px;\n  }\n\n.c_preview__c7e {\n  margin-top: 24px;\n}\n","",{version:3,sources:["webpack://./../common/components/editor/comment-editor.css"],names:[],mappings:"AAAA;EACE,aAAa;EACb,mBAAmB;AACrB;;AAEA;EACE,eAAe;AACjB;;AAEA;EACE,YAAY;EACZ,4BAA4B;AAC9B;;AAEA;EACE,+DAA+D;EAC/D,gDAAgD;AAClD;;AAEA,+CAA+C;AAC/C;EACE,0BAA0B,EAAE;6EAC+C;AAC7E;;AAEA;AACA;;AAEA;EACE,aAAa;EACb,kBAAkB;AACpB;;AAEA;EACE,4BAA4B;EAC5B,aAAa;EACb,mBAAmB;EACnB,eAAe;EACf,qBAAqB;EACrB,qBAAqB;AACvB;;AAEA;EACE,aAAa;EACb,UAAU;EACV,wBAAwB;AAM1B;;AAJE;IACE,aAAa;IACb,UAAU;EACZ;;AAGF;EACE,uCAAuC;AAezC;;AAbE;IACE,kEAAkE;EACpE;;AAEA;IACE,uCAAuC;IACvC,gBAAgB;EAClB;;AAEA;IACE,gBAAgB;IAChB,gBAAgB;EAClB;;AAGF;EACE,gBAAgB;AAClB",sourcesContent:[".container {\n  display: flex;\n  flex-direction: row;\n}\n\n.avatarContainer {\n  margin-top: 5px;\n}\n\n.rightPart {\n  flex-grow: 2;\n  max-width: calc(100% - 40px);\n}\n\n.limitedVisibility.limitedVisibility {\n  --editor-background-color: var(--ring-warning-background-color);\n  --editor-border-color: var(--ring-warning-color);\n}\n\n/* stylelint-disable declaration-no-important */\n.commentEditorUnfocused {\n  height: initial !important; /* JT-76997. Using important here to avoid editor\n                                  height after resizing for unfocused state */\n}\n\n.commentEditorWithToolbar {\n}\n\n.commentEditor.commentEditor {\n  min-height: 0;\n  border-radius: 6px;\n}\n\n.editorActions {\n  margin-top: var(--ring-unit);\n  display: flex;\n  flex-direction: row;\n  flex-wrap: wrap;\n  gap: var(--ring-unit);\n  align-items: baseline;\n}\n\n.hiddeableToolbar.hiddeableToolbar {\n  display: none;\n  opacity: 0;\n  transition: opacity 0.3s;\n\n  .commentEditorFocused &amp; {\n    display: flex;\n    opacity: 1;\n  }\n}\n\n.commentEditorArea.commentEditorArea &gt; :global(.ProseMirror) {\n  padding: 8px calc(var(--ring-unit) * 2);\n\n  :global(.compactUiMode) &amp; {\n    padding: calc(var(--ring-unit) + 2px) calc(var(--ring-unit) * 2) 0;\n  }\n\n  .commentEditorFocused &amp; {\n    padding: 2px calc(var(--ring-unit) * 2);\n    min-height: 56px;\n  }\n\n  .commentEditorFocused:not(.commentEditorWithToolbar) &amp; {\n    padding-top: 8px;\n    min-height: 88px;\n  }\n}\n\n.preview {\n  margin-top: 24px;\n}\n"],sourceRoot:""}]);var r="c_container__b94",c="c_avatarContainer__d2b",d="c_rightPart__aa3",l="c_limitedVisibility__d0a",m="c_commentEditorUnfocused__dfd",u="c_commentEditorWithToolbar__d30",p="c_commentEditor__cb1",h="c_editorActions__d16",g="c_hiddeableToolbar__e9d",y="c_commentEditorFocused__f63",C="c_commentEditorArea__f39",f="c_preview__c7e";const A=a},22971:(e,t,n)=&gt;{n.d(t,{Il:()=&gt;i,WL:()=&gt;o,f5:()=&gt;c,nC:()=&gt;s,nP:()=&gt;r,zh:()=&gt;a});var i="collapsed__d44b",s="container__dd11",o="description__e4c7",a="expanded__d1e8",r="heading__bdba",c="renderedMarkdown__c3a9 prosemirror__b91a markdown__e3b0 font__dd1f"},46400:(e,t,n)=&gt;{n.d(t,{l:()=&gt;h});var i=n(38104),s=n(44e3),o=n(9574),a=n(51023),r=n(42905),c=n(90162),d=n(92253),l=n(86646),m=n(90826),u=n(13006);const p=r.Z.withTag("CommandWindowStore");let h=(()=&gt;{var e,t,n,r,h,g,y;let C,f,A,x,E,b,_,k,v,w,S,T,M,I,j=[],P=[],B=[],R=[],N=[],Z=[],q=[],F=[],O=[],D=[],V=[],L=[],U=[];return e=class{get executionResultMessage(){return(0,i.Q_)(this,t,"f")}set executionResultMessage(e){(0,i.YH)(this,t,e,"f")}get commands(){return(0,i.Q_)(this,n,"f")}set commands(e){(0,i.YH)(this,n,e,"f")}get commentVisibility(){return(0,i.Q_)(this,r,"f")}set commentVisibility(e){(0,i.YH)(this,r,e,"f")}get queryInput(){return(0,i.Q_)(this,h,"f")}set queryInput(e){(0,i.YH)(this,h,e,"f")}get commentMarkdown(){return(0,i.Q_)(this,g,"f")}set commentMarkdown(e){(0,i.YH)(this,g,e,"f")}get commandExecutor(){return(0,i.Q_)(this,y,"f")}set commandExecutor(e){(0,i.YH)(this,y,e,"f")}constructor(e,s,a,c,d,l,m){this.commandContext=((0,i.Co)(this,j),e),this.ticketsStore=s,this.permissionsStore=a,this.recentEntitiesStore=c,this.api=d,this.linkBuilder=l,this.initialCommand=m,t.set(this,(0,i.Co)(this,P,"")),n.set(this,((0,i.Co)(this,B),(0,i.Co)(this,R,[]))),r.set(this,((0,i.Co)(this,N),(0,i.Co)(this,Z,[]))),h.set(this,((0,i.Co)(this,q),(0,i.Co)(this,F,void 0))),g.set(this,((0,i.Co)(this,O),(0,i.Co)(this,D,null))),y.set(this,((0,i.Co)(this,V),(0,i.Co)(this,L,null))),(0,i.Co)(this,U),this.commandContext=e,this.ticketsStore=s,this.permissionsStore=a,this.recentEntitiesStore=c,this.api=d,this.linkBuilder=l,this.initialCommand=m,(0,o.Z)(this),this.queryInput={query:"",caret:-1,focus:e.autoFocus??!0}}readInitialQuery(){const e=this.initialCommand;e&amp;&amp;(this.queryInput.query=e.readCommand(),this.queryInput.caret=this.queryInput.query.length,this.commentMarkdown=e.comment,this.commentVisibility=e.visibility,this.initialCommand=void 0)}handleCommandExecutionStatus(e){switch(e.status){case a.v.IssuesListTooLarge:case a.v.Ok:break;case a.v.Error:this.executionResultMessage=e.message;break;case a.v.Replay:this.queryInput={query:e.query??"",caret:e.query?.length??0,focus:!0},this.executionResultMessage=e.message;break;default:p.error("Unknown command execution status",e)}return e.status}handleCommentChange(e){this.commentMarkdown=e||null}async getVisibilityOptions(e){return"ticket"===this.commandContext.queryContext.type?this.api.ticket.getVisibilityOptions(e,this.commandContext.queryContext.ticketId):{bestGroups:[],groups:[],users:[]}}async getHelpdeskDefaultCommandRestrictions(){if("ticket"===this.commandContext.queryContext.type){const e=this.ticketsStore.ticketsMap.get(this.commandContext.queryContext.ticketId).project;return[await this.api.project.getProjectTeam(e)]}return[]}onCommentVisibilityChange(e){this.commentVisibility=e}async handleQueryAssistInput(e){const t=await this.api.commands.getCommandList(e.query,e.caret,this.commandContext.queryContext);return this.commands=t.commands??[],(0,d.fA)(t)}handleQueryChange(e){this.queryInput={...e,focus:this.commandContext.autoFocus??!0},e.query||(this.commands=[],this.executionResultMessage="")}getApplyCommandParams({silent:e}){return{comment:this.commentMarkdown,usesMarkdown:!0,visibility:this.commentVisibility,silent:e,...this.queryInput}}getTotalEntitiesCount(e){const t=this.commandContext.queryContext;return(0,d.B7)(e,t)}get isCommandExecuting(){return this.commandExecutor?.isExecuting??!1}async applyCommand(e=!1,t,n){this.executionResultMessage="";const i=this.commandContext.queryContext;this.commandExecutor=new c.K({api:this.api,request:this.getApplyCommandParams({silent:e}),queryContext:i});const s=await this.commandExecutor.execute(),o=this.handleCommandExecutionStatus(s.result),a=this.getTotalEntitiesCount(s.processed);if("ticket"===i.type)try{const{ticket:e}=await this.api.ticket.getTicket(i.ticketId);e.id!==i.ticketId&amp;&amp;t?.(e.id),this.permissionsStore.isGuest||await this.recentEntitiesStore.addRecentEntity(e)}catch(e){e instanceof m.Bb&amp;&amp;404===e.status&amp;&amp;(n?.(i.ticketId),this.ticketsStore.ticketsMap.delete(i.ticketId))}return{...s,status:o,of:a}}async applyCommandFix(e){if(e.summary.bundle?.id&amp;&amp;e.summary.valueToAdd){const t=await this.api.admin.simpleCreateNewFieldValues(e.summary.bundle.id,e.summary.bundle.$type,e.summary.valueToAdd);return this.handleQueryAssistInput(this.queryInput),t}throw new Error(l.t`The specified value is incompatible with this field and cannot be added to the set`)}get commentEditorProps(){return{disabled:!this.commandContext.access?.canComment,customTransformPasted:e=&gt;(0,u.Z)(e,this.linkBuilder)}}},t=new WeakMap,n=new WeakMap,r=new WeakMap,h=new WeakMap,g=new WeakMap,y=new WeakMap,(()=&gt;{const t="function"==typeof Symbol&amp;&amp;Symbol.metadata?Object.create(null):void 0;C=[s.LO],f=[s.LO],A=[s.LO],x=[s.LO],E=[s.LO],b=[s.LO],_=[s.aD],k=[s.aD],v=[s.aD],w=[s.aD],S=[s.Fl],T=[s.aD],M=[s.aD],I=[s.Fl],(0,i.xE)(e,null,C,{kind:"accessor",name:"executionResultMessage",static:!1,private:!1,access:{has:e=&gt;"executionResultMessage"in e,get:e=&gt;e.executionResultMessage,set:(e,t)=&gt;{e.executionResultMessage=t}},metadata:t},P,B),(0,i.xE)(e,null,f,{kind:"accessor",name:"commands",static:!1,private:!1,access:{has:e=&gt;"commands"in e,get:e=&gt;e.commands,set:(e,t)=&gt;{e.commands=t}},metadata:t},R,N),(0,i.xE)(e,null,A,{kind:"accessor",name:"commentVisibility",static:!1,private:!1,access:{has:e=&gt;"commentVisibility"in e,get:e=&gt;e.commentVisibility,set:(e,t)=&gt;{e.commentVisibility=t}},metadata:t},Z,q),(0,i.xE)(e,null,x,{kind:"accessor",name:"queryInput",static:!1,private:!1,access:{has:e=&gt;"queryInput"in e,get:e=&gt;e.queryInput,set:(e,t)=&gt;{e.queryInput=t}},metadata:t},F,O),(0,i.xE)(e,null,E,{kind:"accessor",name:"commentMarkdown",static:!1,private:!1,access:{has:e=&gt;"commentMarkdown"in e,get:e=&gt;e.commentMarkdown,set:(e,t)=&gt;{e.commentMarkdown=t}},metadata:t},D,V),(0,i.xE)(e,null,b,{kind:"accessor",name:"commandExecutor",static:!1,private:!1,access:{has:e=&gt;"commandExecutor"in e,get:e=&gt;e.commandExecutor,set:(e,t)=&gt;{e.commandExecutor=t}},metadata:t},L,U),(0,i.xE)(e,null,_,{kind:"method",name:"handleCommandExecutionStatus",static:!1,private:!1,access:{has:e=&gt;"handleCommandExecutionStatus"in e,get:e=&gt;e.handleCommandExecutionStatus},metadata:t},null,j),(0,i.xE)(e,null,k,{kind:"method",name:"onCommentVisibilityChange",static:!1,private:!1,access:{has:e=&gt;"onCommentVisibilityChange"in e,get:e=&gt;e.onCommentVisibilityChange},metadata:t},null,j),(0,i.xE)(e,null,v,{kind:"method",name:"handleQueryAssistInput",static:!1,private:!1,access:{has:e=&gt;"handleQueryAssistInput"in e,get:e=&gt;e.handleQueryAssistInput},metadata:t},null,j),(0,i.xE)(e,null,w,{kind:"method",name:"handleQueryChange",static:!1,private:!1,access:{has:e=&gt;"handleQueryChange"in e,get:e=&gt;e.handleQueryChange},metadata:t},null,j),(0,i.xE)(e,null,S,{kind:"getter",name:"isCommandExecuting",static:!1,private:!1,access:{has:e=&gt;"isCommandExecuting"in e,get:e=&gt;e.isCommandExecuting},metadata:t},null,j),(0,i.xE)(e,null,T,{kind:"method",name:"applyCommand",static:!1,private:!1,access:{has:e=&gt;"applyCommand"in e,get:e=&gt;e.applyCommand},metadata:t},null,j),(0,i.xE)(e,null,M,{kind:"method",name:"applyCommandFix",static:!1,private:!1,access:{has:e=&gt;"applyCommandFix"in e,get:e=&gt;e.applyCommandFix},metadata:t},null,j),(0,i.xE)(e,null,I,{kind:"getter",name:"commentEditorProps",static:!1,private:!1,access:{has:e=&gt;"commentEditorProps"in e,get:e=&gt;e.commentEditorProps},metadata:t},null,j),t&amp;&amp;Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:t})})(),e})()},27425:(e,t,n)=&gt;{n.d(t,{Z:()=&gt;ae,showCommandWindow:()=&gt;oe});var i=n(651),s=n(11688),o=n.n(s),a=n(52628),r=n(49047),c=n(57785),d=n(25977),l=n(19554),m=n(27922),u=n(81168),p=n(87094),h=n(65489),g=n(12440),y=n(97688),C=n(44e3),f=n(68019),A=n(92379),x=n(86646),E=n(94519),b=n(89223),_=n(39274),k=n(51023),v=n(20324),w=n(56e3),S=n(89560),T=n(63912),M=n(56124),I=n(32744),j=n(15970),P=n(71646),B=n(91578),R=n.n(B),N=n(7201),Z=n.n(N),q=n(38362),F=n(80558),O=n(47804),D=n(42310),V=n(64717),L=n.n(V),U=n(61383);const Q=(0,i.jsx)(l.ZP,{className:F.gY,glyph:Z()}),$=(0,i.jsx)("div",{className:F.tH}),H=e=&gt;{const{allKeysMode:t,onChange:n,onTipEscapePress:s}=e,o=A.useRef(null);return(0,i.jsx)(j.Z,{anchor:()=&gt;(0,i.jsxs)("span",{className:F._Q,ref:o,children:[(0,i.jsxs)(P.Z,{pseudo:!0,children:[x.t`Hotkey configuration`," ",(0,i.jsx)(l.ZP,{glyph:R()})]}),o.current&amp;&amp;(0,i.jsx)(U.$,{title:x.t`New Command Dialog Options`,icon:L(),directions:[D.Directions.TOP_LEFT],popupProps:{onEscPress:s,anchorElement:o.current},tipsProfileKey:"commandWindowTipShown",children:x.t`You can now choose whether to open this dialog by pressing any key or only by using the predefined keyboard shortcut`})]}),data:[{key:"any-key",template:(0,i.jsxs)("div",{children:[t?Q:$,x.t`Any key`]}),onClick:()=&gt;n(!0),rgItemType:q.P.Type.CUSTOM},{key:"shortcut-only",template:(0,i.jsxs)("div",{children:[t?$:Q,x.t`Shortcut only`,(0,i.jsx)("span",{className:F.kA,children:(0,O.o)("ctrl+alt+j")})]}),onClick:()=&gt;n(!1),rgItemType:q.P.Type.CUSTOM}]})};var W=n(74091),z=n(21096),Y=n(98030),K=n(65602);function G(e){return{...e,rightNodes:e.icon?(0,i.jsx)(K.Z,{url:e.icon,subAvatarUrl:e.auxiliaryIcon,className:F.ri,iconSize:l.ZP.Size.Size12}):void 0,description:e.description,group:e.group,option:e.option,key:Y.Z.createKey(e),label:Y.Z.renderLabel(e),rgItemType:z.Dy.ITEM,data:e}}var J=n(81401),X=n(46400),ee=n(65443),te=n.n(ee),ne=n(92253);const ie=({commands:e,applyFix:t,className:n})=&gt;{const s=te()("wrapper__d987",n);return(0,i.jsx)("ul",{className:s,children:e.map((e=&gt;(0,i.jsxs)("li",{className:"itemContainer__a61c","data-test":"command-preview",children:[(0,i.jsx)("span",{className:te()("item__d844",e.error?"error__d452":void 0),dangerouslySetInnerHTML:{__html:e.description||""}}),e.quickFixes?.filter(ne.ss).map((e=&gt;(0,i.jsx)(P.Z,{className:"itemFix__f303",onClick:()=&gt;t(e),children:e.message.replace("{{valueToAdd}}",e.summary.valueToAdd)},e.id)))]},e.description)))})},se={users:[],tickets:[],articles:[]},oe=(0,S.K)((0,f.Pi)((function(e){const{commandWindowContext:t,onResolve:n,isOpen:s,initialCommand:S,onTicketProjectChanged:j,onTicketDelete:P,afterCommandApply:B}=e,{dialogStore:R,permissionsStore:N,recentEntitiesStore:Z,shortcuts:q,ticketsStore:O,appStore:{api:D,linkBuilder:V},settingsStore:L}=(0,_.Yh)(),U=N.canApplyCommandsSilently(),[Q]=(0,A.useState)((()=&gt;new X.l({access:{canApplyFixes:t?.canApplyFixes,canComment:t?.canComment},queryContext:(0,ne.MY)(t)},O,N,Z,D,V,S))),$=(0,A.useRef)(null),z=(0,A.useRef)(null),K=(0,A.useRef)(null),ee=(0,A.useRef)(null),te=(0,A.useRef)((e=&gt;{z.current!==e&amp;&amp;K.current&amp;&amp;a.Z.remove(K.current),K.current=a.Z.error(e,1e4),z.current=e}));(0,A.useEffect)((()=&gt;{const e=(0,C.U5)((()=&gt;Q.executionResultMessage),(e=&gt;{e&amp;&amp;te.current(e)}));return()=&gt;{e()}}),[Q]),(0,A.useEffect)((()=&gt;()=&gt;{K.current&amp;&amp;a.Z.remove(K.current)}),[]),(0,A.useEffect)((()=&gt;{Q.queryInput.focus||Q.readInitialQuery()}),[Q]);const oe=(0,A.useCallback)((()=&gt;{n(!1),$.current?.()}),[n]),ae=(0,A.useCallback)((async(e=!1)=&gt;{Q&amp;&amp;(e&amp;&amp;!U||(await Q.applyCommand(e,j,P).then((t=&gt;{if(t.status===k.v.Ok){B?.(),oe();const n=t.processed,i=(0,x.ngettext)(x.msgid`${n} issue updated.`,`${n} issues updated.`,n);a.Z.successMessage(e?x.t`${i} Update notifications will not be sent.`:i)}if(t.status===k.v.IssuesListTooLarge&amp;&amp;a.Z.error(t.result.message),t.status===k.v.Cancelled){B?.(),oe();const e=t.processed,n=parseInt(t.of,10);a.Z.error((0,x.ngettext)(x.msgid`Batch update interrupted. Updates were applied to ${e} of ${t.of} issue.`,`Batch update interrupted. Updates were applied to ${e} of ${t.of} issues.`,n))}})),Q.commandExecutor=null))}),[oe,j,P,Q,U]),re=(0,A.useCallback)((async()=&gt;ae()),[ae]),ce=(0,A.useCallback)((()=&gt;ae(!0)),[ae]),de=A.useCallback((e=&gt;{Q?.applyCommandFix(e).then((()=&gt;{(0,C.z)((()=&gt;{Q?.queryInput.query&amp;&amp;(Q.queryInput.query=`${Q.queryInput.query} `)}))})).catch((e=&gt;{const t=(0,E.b)(e);t&amp;&amp;te.current(t)}))}),[Q]),le=(0,A.useMemo)((()=&gt;({esc:oe,...U?{[q.SilentApplyCommand]:ce}:{}})),[ce,q.SilentApplyCommand,U,oe]),me=(0,b.s)(),ue=(0,A.useMemo)((()=&gt;(0,g.X)(...me?[me]:[])),[me]),pe=(0,A.useMemo)((()=&gt;({...Q?.commentEditorProps,providePlugins:ue})),[Q?.commentEditorProps,ue]),he=(0,C.Fl)((()=&gt;function(e){const t=e.commandContext.queryContext;switch(t.type){case"ticket":return`${t.ticketId} ${t.ticketSummary}`;case"ticketList":const e=t.ticketIds.length-1;return 0===e?t.ticketIds[0]:(0,x.ngettext)(x.msgid`${t.ticketIds[0]} and +${e} more`,`${t.ticketIds[0]} and +${e} more`,e);case"ticketIdsGenerator":const n=t.generator.totalIssuesCount;if(!n)return null;if("precise"===n.type){const e=n.value;return(0,x.ngettext)(x.msgid`${e} issue`,`${e} issues`,e)}return(0,x.ngettext)(x.msgid`${n.value}+ issue`,`${n.value}+ issues`,n.value);default:return null}}(Q))).get(),ge=Q.queryInput.query.length||Q.commentMarkdown?.length,ye=(0,A.useCallback)((e=&gt;Q.handleQueryAssistInput(e).then((e=&gt;function(e){if(e.suggestions){const{suggestions:t,...n}=e;return{...n,suggestions:Y.Z.renderList(t||[],G).map((e=&gt;e))}}return e}(e)))),[Q]),Ce=(0,A.useRef)(null);return(0,i.jsxs)(c.Z,{"data-test":"command-dialog",portalTarget:R.getDialogRef()?.current??void 0,contentClassName:F.YS,show:s,onCloseAttempt:oe,trapFocus:!0,children:[(0,i.jsx)(d.H1,{className:F.Fs,children:x.t`Apply Command`}),(0,i.jsx)(m.Z,{children:(0,i.jsxs)("div",{className:F.Fh,ref:ee,children:[(0,i.jsx)(v.Z,{scope:"command-window",map:le,options:{modal:!0}}),(0,i.jsxs)("div",{className:F.rb,children:[(0,i.jsx)("div",{className:F.mn,children:null!==he&amp;&amp;(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("span",{className:F.HO,children:[x.t`Updates:`," "]}),(0,i.jsx)("span",{className:F.SI,children:he})]})}),(0,i.jsx)(T.Q,{...Q.queryInput,onFocusChange:({focus:e})=&gt;{e&amp;&amp;Q.readInitialQuery()},disabled:Q.isCommandExecuting,autoOpen:"force",popupClassName:F.B5,dataSource:ye,useCustomItemRender:!0,className:F.vr,onChange:Q.handleQueryChange,onApply:re,placeholder:x.t`Enter command`,hint:x.t`Press â‡¥ to complete first item`,hintOnSelection:x.t`Press â†© to complete selected item`,huge:!1,glass:!1,clear:!1}),(0,i.jsx)(h.Z,{placeholder:x.t`Comment text (optional)`,className:F.jy,posting:Q.isCommandExecuting,editorClassName:F.ub,mentions:se,getSuggestions:e=&gt;{const n="ticket"===t.type&amp;&amp;t.ticket||"draft"===t.type&amp;&amp;t.draft||"ticketList"===t.type&amp;&amp;{type:"tickets",ticketIds:t.ticketIds};return n?D.getMentionsSuggestions(n,e):Promise.resolve([])},onChange:Q.handleCommentChange,modeStorage:L.editorModeStorage,initialValue:Q.commentMarkdown||"",editorProps:pe,collapsedByDefault:!1,onSend:async()=&gt;re(),renderPreview:e=&gt;(0,i.jsx)(f.Qj,{children:()=&gt;(0,i.jsx)(w.Z,{markdown:e})}),hideActions:!0}),(0,i.jsx)("div",{className:F.ap,children:t.canComment&amp;&amp;("ticket"===t.type&amp;&amp;N.helpdesk.isHelpdeskTicket(t.ticket)||"draft"===t.type&amp;&amp;N.helpdesk.isHelpdeskTicket(t.draft))?(0,i.jsx)(M.M,{publicLabel:x.t`Public`,getDefaultRestrictions:Q.getHelpdeskDefaultCommandRestrictions,selected:Q.commentVisibility,onChange:Q.onCommentVisibilityChange,disabled:Q.commentEditorProps.disabled}):(0,i.jsxs)("span",{"data-test":"comment-visibility",children:[x.t`Visible to `,(0,i.jsx)(I.O,{selected:Q.commentVisibility,onChange:Q.onCommentVisibilityChange,getOptions:Q.getVisibilityOptions,emptyLabel:(0,y.WL)(x.t`Same as issue`,x.t`Same as ticket`,"ticket"===t.type&amp;&amp;t.ticket||"draft"===t.type&amp;&amp;t.draft||!1),renderIcon:e=&gt;e&gt;0?(0,i.jsx)(l.ZP,{glyph:o()}):null})]})})]}),(0,i.jsxs)("div",{className:F.R0,"data-test":"commands-preview",children:[(0,i.jsx)(d.H3,{children:x.t`Preview`}),(0,i.jsx)("div",{className:F.Jj,children:Q.commands.length?(0,i.jsx)(ie,{applyFix:de,commands:Q.commands}):(0,i.jsx)(p.Z,{info:!0,children:x.t`Enter a command to see a preview`})})]})]})}),(0,i.jsxs)(u.Z,{className:F.Mv,children:[(0,i.jsx)(r.ZP,{primary:!0,loader:Q.isCommandExecuting,onClick:re,disabled:!ge||Q.isCommandExecuting,"data-test":"apply-command",children:x.t`Apply command`}),U&amp;&amp;(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.ZP,{loader:Q.isCommandExecuting,onClick:ce,disabled:!Q.queryInput.query.length||Q.isCommandExecuting,"data-test":"apply-command-silently",ref:e=&gt;{Ce.current=e?.buttonRef.current??null},children:x.t`Apply without notification`}),Q.queryInput.query.length&gt;0&amp;&amp;!Q.isCommandExecuting&amp;&amp;(0,i.jsx)(J.K,{anchorRef:Ce})]}),Q.commandExecutor&amp;&amp;Q.commandExecutor.isExecuting?(0,i.jsx)(r.ZP,{onClick:()=&gt;Q.commandExecutor?.abort(),children:x.t`Interrupt`}):(0,i.jsx)(r.ZP,{onClick:oe,disabled:Q.isCommandExecuting,"data-test":"close-dialog",children:x.t`Cancel`}),(0,i.jsx)("span",{className:F.FV}),Q.commandExecutor?(0,i.jsx)(W.w,{className:F.qT,executor:Q.commandExecutor}):(0,i.jsx)(H,{allKeysMode:Boolean(L.settings?.ui.commandWindowOnTyping),onChange:e=&gt;L.toggleCommandWindowMode(e),onTipEscapePress:oe})]})]})}))),ae=oe},56e3:(e,t,n)=&gt;{n.d(t,{Z:()=&gt;p});var i=n(651),s=n(92379),o=n(68019),a=n(16983),r=n(39274),c=n(22971),d=n(65443),l=n.n(d),m=n(22138),u=n(49397);const p=(0,o.Pi)((function({markdown:e,className:t,attachments:n=[],host:o,mentions:d={users:[],articles:[],tickets:[]},disablePermalinks:p=!1}){const h=(0,r.Yh)(),{appStore:{linkBuilder:g}}=h,y=l()(t,c.WL,c.f5),C=(0,s.useMemo)((()=&gt;e?(0,a.Z)(e,g,{attachments:n,disablePermalinks:p,mentions:d,mentionsUnfurling:{users:!0,articles:!0,tickets:!1}}):null),[e,g,n,p,d]);return C?(0,i.jsxs)(m.ZP,{children:[(0,i.jsx)(u.Z.MarkdownItCodeHighlighter,{html:C}),(0,i.jsx)(u.Z.CollapseStacktraceButton,{html:C,expand:!0}),(0,i.jsx)(u.Z.CopyCodeButton,{html:C}),o?(0,i.jsx)(u.Z.WidgetRendererWrapper,{html:C,host:o}):null,(0,i.jsx)("div",{"data-test":"description-preview",className:y,dangerouslySetInnerHTML:{__html:C}})]}):null}))},56124:(e,t,n)=&gt;{n.d(t,{M:()=&gt;p});var i=n(651),s=n(92379),o=n(86646),a=n(68019),r=n(65443),c=n.n(r),d=n(45966),l="containerActive__a29a",m="labelDisabled__a1ef",u=n(90323);const p=(0,a.Pi)((function(e){const{selected:t,disabled:n,publicLabel:a,onChange:r,getDefaultRestrictions:p,publicTitle:h=o.t`Restrict visibility`,privateTitle:g=o.t`Make public`}=e,y=t.length&gt;0,C=(0,u.e5)(t),f=(0,s.useCallback)((async e=&gt;{if(e.target.checked){const e=await p();r(e)}else r([])}),[p,r]);return(0,i.jsx)("div",{className:c()(e.className,"container__ba84",{[l]:y}),"data-test":"combo-visibility-picker",children:(0,i.jsx)(d.Z,{checked:y,onChange:f,disabled:n,title:y?g:h,size:d.$.Size16,"data-test":"visibility-picker-toggle",children:(0,i.jsx)("span",{className:c()("label__c944 link__faa2",{[m]:n}),children:y?o.t`Internal, visible to ${C}`:a})})})}))},65489:(e,t,n)=&gt;{n.d(t,{Z:()=&gt;M});var i=n(651),s=n(49047),o=n(31825),a=n(52628),r=n(80324),c=n.n(r),d=n(92379),l=n(45853),m=n(8696),u=n.n(m),p=n(94609),h=n.n(p),g=n(15112),y=n.n(g),C=n(3958),f=n.n(C),A=n(57557),x=n.n(A),E=n(90490),b=n.n(E),_=n(248),k={};k.styleTagTransform=b(),k.setAttributes=f(),k.insert=y().bind(null,"head"),k.domAPI=h(),k.insertStyleElement=x(),u()(_.ZP,k),_.ZP&amp;&amp;_.ZP.locals&amp;&amp;_.ZP.locals;var v=n(95251),w=n(27509),S=n(33649),T=n(12440);const M=e=&gt;{const{className:t,editorClassName:n,modeStorage:r=new v.aO,initialValue:m="",onSend:u=null,loading:p=!1,posting:h=!1,onAttachFile:g,editorProps:y={},getSuggestions:C=()=&gt;Promise.resolve([]),uploadImage:f,onUpdatedDraftAttachment:A,onUpdatedParentEntityAttachment:x,isUpdatableAttachment:E,onChange:b=()=&gt;{},renderAvatar:k=()=&gt;null,limitedVisibility:M=!1,markdownByDefault:I,renderSendButton:j=(e,t,n)=&gt;(0,i.jsx)(s.ZP,{primary:!0,onClick:e,disabled:t||n,"data-test":"post-comment",loader:t,children:(0,l.ag)("Add comment")}),renderCancelButton:P=()=&gt;null,renderCustomActionItems:B=()=&gt;null,renderPreview:R,draftAttachments:N=[],entityAttachments:Z=[],children:q,placeholder:F="","data-test":O,collapsedByDefault:D=!0,mentions:V,onToggleMode:L,focusEventName:U="FOCUS_COMMENT_EDITOR",hideActions:Q,onFocus:$,onBlur:H,auxShortcutsMap:W,widgetsHost:z,allowEmpty:Y=!1,getEditorTextActions:K}=e,[G,J]=(0,d.useState)(!D),[X,ee]=(0,d.useState)(!D),[te,ne]=(0,d.useState)(m??""),[ie,se]=(0,d.useState)(I),oe=(0,d.useMemo)((()=&gt;N.length&gt;0),[N]),ae=""===te.trim(),{disabled:re,...ce}=y,de=p||h||ae&amp;&amp;!oe&amp;&amp;!Y||Boolean(re),le=(0,d.useCallback)((e=&gt;{const t=e();b(t),ne(t)}),[b]),me=(0,d.useCallback)((async()=&gt;{u&amp;&amp;!de&amp;&amp;(await u(te),J(!1))}),[u,de,te]),ue=(0,d.useCallback)((async(e,t)=&gt;{const n=Z.some((({id:t})=&gt;t===e.id));try{const i={...e,base64Content:t};return n&amp;&amp;x?await x(e,t):!n&amp;&amp;A&amp;&amp;await A(e,t),i}catch(e){throw a.Z.error((0,l.ag)("Failed to save changes for the image")),e}}),[A,x,Z]),pe=(0,d.useMemo)((()=&gt;!!A||!!x),[A,x]),he=(0,d.useMemo)((()=&gt;[...N,...Z]),[N,Z]),ge=(0,d.useMemo)((()=&gt;k()),[k]);(0,d.useEffect)((()=&gt;{N.length&amp;&amp;J(!0)}),[N.length]);const ye=["editor"];O&amp;&amp;ye.push(O);const Ce=(0,d.useRef)(null),fe=(0,d.useCallback)((()=&gt;{J(!0),$?.(),setTimeout((()=&gt;{Ce.current?.editorView.dispatch(Ce.current?.editorView.state.tr.scrollIntoView())}))}),[$]);(0,d.useEffect)((()=&gt;{const e=e=&gt;{e.detail?.fullFocus?Ce.current?.fullFocus():Ce.current?.focus()};return document.addEventListener(U,e),()=&gt;{document.removeEventListener(U,e)}}),[U]),(0,d.useEffect)((()=&gt;{m&amp;&amp;m.length&amp;&amp;!G&amp;&amp;J(!0)}),[m,G]);const Ae=(0,d.useRef)(null),xe=(0,d.useRef)((0,w.N)({decorationFactory:({initialProps:e,node:t})=&gt;(0,S.T)({editorRef:Ce,getEditorTextActions:K??null,node:t,initialProps:e,editorModeStorage:r}),registerResettingFunction:e=&gt;{Ae.current=e}})),Ee=(0,d.useMemo)((()=&gt;(0,T.X)(...y.providePlugins?[y.providePlugins]:[],xe.current)),[y.providePlugins]);return(0,i.jsxs)("div",{className:c()(_.nC,t),children:[!!ge&amp;&amp;(0,i.jsx)("div",{className:_.AP,children:ge}),(0,i.jsxs)("div",{"data-test":["comment-editor",...ye].join(" "),className:c()({[_.KC]:!!ge}),children:[(0,i.jsx)(v.ZP,{initialValue:m,onChange:le,onSend:me,getSuggestions:C,onAttachFile:g,uploadImage:f,editImage:pe?ue:void 0,isUpdatableAttachment:E,attachments:he,mentions:V,placeholder:F,disabled:h,readonly:re,onFocus:fe,showUI:G,showResizer:G,onBlur:H,auxShortcutsMap:W,modeStorage:r,onToolbarModeChange:ee,className:c()(_.ub,{[_.sh]:G,[_.v0]:X,[_.FN]:M},n),toolbarClassName:_.cQ,editorAreaClassName:c()(_.Rw,{[_.sh]:G,[_.mr]:!G}),onEscapeEditor:()=&gt;J(!1),prosmirrorRef:Ce,onToggleMode:e=&gt;{const t="MARKDOWN"===e;se(t),L&amp;&amp;L(t)},isPopupTarget:!0,widgetsHost:z,...ce,providePlugins:Ee}),!Q&amp;&amp;G&amp;&amp;(0,i.jsxs)("div",{"data-test":"editor-actions",className:_.rB,children:[(0,i.jsxs)(o.Z,{children:[u&amp;&amp;j((()=&gt;me()),h,de),P((()=&gt;J(!1)))]}),B()]}),te&amp;&amp;ie&amp;&amp;R&amp;&amp;(0,i.jsx)("div",{className:_.RN,children:R(te)}),q]})]})}},76961:(e,t,n)=&gt;{n.d(t,{S:()=&gt;o});var i=n(60783),s=n(6874);function o(e){const{selection:t}=e;let{from:n,to:o}=t;if(n===o)return null;if(t instanceof i.Bs){const t=e.doc.content.textBetween(n,o);if(""===t||/^(\n)+$/.test(t))return null;const i=[];if(e.doc.nodesBetween(n,o,(e=&gt;{e.isText&amp;&amp;i.push(e)})),i.every((e=&gt;""===e.text?.trim())))return null}return t instanceof i.qv&amp;&amp;"image"!==t.node.type.name?null:((0,s.Nz)(e.schema)&amp;&amp;(t instanceof i.C1||(n-=1,o-=1)),{from:n,to:o})}},27509:(e,t,n)=&gt;{n.d(t,{N:()=&gt;p});var i=n(84118),s=n.n(i),o=n(60783),a=n(35209),r=n(85555),c=n(6874),d=n(76961);const l=new o.H$("selected-range-plugin");class m{constructor(e){this.command=e}}const u=e=&gt;({prevSelection:e??null,showToolbar:!1}),p=e=&gt;{e.registerResettingFunction((e=&gt;{e.dispatch(e.state.tr.setMeta(l,new m({action:"resetSelection"})))}));const t=s()((e=&gt;{const t=l.getState(e.state);!t||!e.hasFocus()||t.prevSelection&amp;&amp;e.state.selection.eq(t.prevSelection)||e.dispatch(e.state.tr.setMeta(l,new m({action:"setSelection"})))}),150),n=s()((e=&gt;{e.dispatch(e.state.tr)}),150);return{customizeSchema:e=&gt;e,getCustomPlugins:()=&gt;[new o.Sy({key:l,state:{init:()=&gt;u(),apply(e,t,n){const i=e.getMeta(l);return i&amp;&amp;i instanceof m&amp;&amp;"resetSelection"===i.command.action?u():i&amp;&amp;i instanceof m&amp;&amp;"setSelection"===i.command.action?{showToolbar:!0,prevSelection:n.selection}:t}},view(i){const s=()=&gt;{const e=document.getSelection();i.hasFocus()||e&amp;&amp;!e.isCollapsed||i.dispatch(i.state.tr.setMeta(l,new m({action:"resetSelection"})))};document.addEventListener("selectionchange",s);const o=new ResizeObserver((()=&gt;{n(i)}));o.observe(i.dom);const u=document.createElement("div");u.style.pointerEvents="none",i.dom.parentElement?.appendChild(u);const p=e.decorationFactory({node:u,initialProps:null});return{update(e){const n=l.getState(e.state);if(!e.hasFocus()&amp;&amp;n?.prevSelection)return void e.dispatch(e.state.tr.setMeta(l,new m({action:"resetSelection"})));t(e);const i=(0,d.S)(e.state),s=document.getSelection();if(n?.showToolbar){const t=s&amp;&amp;s.rangeCount&gt;0&amp;&amp;(0,r.i)(s,e.dom,"normal");if((s?.rangeCount??0)&gt;0&amp;&amp;i&amp;&amp;t){const t=(0,a.z)(s),n=s.getRangeAt(0).getClientRects(),o=n[t?0:n.length-1];if(o){const n=e.dom.getBoundingClientRect();return u.style.position="absolute",u.style.width="1px",u.style.height="20px",u.style.top=o.top-n.top+"px",u.style.left=`${o.left-n.left+(t?0:o.width)}px`,void p.render({from:i.from,to:i.to,mode:(0,c.Nz)(e.state.schema)?"markdown":"wysiwyg"})}}}p.unrender()},destroy(){document.removeEventListener("selectionchange",s),t.cancel(),n.cancel(),o.disconnect(),p.unmount(),i.dom.parentElement?.removeChild(u)}}},props:{handleDOMEvents:{mouseup(e){t(e),t.flush()}}}})]}}},33649:(e,t,n)=&gt;{n.d(t,{T:()=&gt;C});var i=n(651),s=n(92379),o=n(42310),a=n(34237),r=n(4075),c=n(6874),d=n(3318),l=n(11389);function m(e){const t=async t=&gt;(e.dispatch(t),e.state);return(0,c.Nz)(e.state.schema)?(0,d.Z)(e.state,t):(0,l.ZP)(e.state,t)}var u=n(58187),p=n(72423),h=n(88285),g=n(42718);const y=({actions:e,editorActions:t,anchor:n,editor:a,position:c,onClose:d,editorModeStorage:l})=&gt;{const m=(0,s.useRef)(null),[y,C]=(0,s.useState)("top"),f=(0,s.useRef)(0),[A,x]=s.useState(!1),E=(0,r.XA)();(0,s.useLayoutEffect)((()=&gt;{const e=m.current;(E||e&amp;&amp;e.getBoundingClientRect().top-a.getBoundingClientRect().top&lt;=24)&amp;&amp;C("bottom")}),[a,E]),(0,s.useLayoutEffect)((()=&gt;{x(!1),clearTimeout(f.current),f.current=window.setTimeout((()=&gt;x(!0)),500)}),[c.endOffset,c.startOffset]);const b=(0,s.useMemo)((()=&gt;E?[o.Directions.BOTTOM_CENTER,o.Directions.BOTTOM_RIGHT,o.Directions.BOTTOM_LEFT]:"top"===y?[o.Directions.TOP_RIGHT,o.Directions.TOP_LEFT]:[o.Directions.BOTTOM_RIGHT,o.Directions.BOTTOM_LEFT]),[E,y]);return!A||E?null:(0,i.jsx)("span",{ref:m,children:(0,i.jsxs)(u.v,{anchor:n,popupProps:{directions:b,offset:8,left:-16},"data-test":"add-inline-comment-button",children:[(0,i.jsx)(p.e,{actions:e,onApplyClick:async(e,t)=&gt;{d?.(),await t(c)}}),t&amp;&amp;l.inlineToolbarEnabled.get()&amp;&amp;(0,i.jsx)(h.Z,{commands:t,separatorClassName:g.J7,modeStorage:l,className:g.AC,showBlockLevelActions:!1,customCommandsList:["bold","italic","stroked","first-separator","color","second-separator","quote","code","link"]})]})})},C=({editorRef:e,getEditorTextActions:t,node:n,initialProps:s,editorModeStorage:o})=&gt;{let r;if(e.current&amp;&amp;e.current.editorRef&amp;&amp;s&amp;&amp;t){const c=m(e.current.editorView),d=t(e.current.editorView);r=(0,a.ZP)((0,i.jsx)(y,{actions:d,editorActions:c,onClose:async()=&gt;{await(r?.unmount())},editorModeStorage:o,anchor:n,editor:e.current.editorRef,position:{startOffset:s.from,endOffset:s.to,mode:s.mode}}),n)}else r=(0,a.ZP)(null,n);return{render:s=&gt;{r&amp;&amp;e.current?.editorRef&amp;&amp;t?r?.render((0,i.jsx)(y,{editorModeStorage:o,actions:t(e.current.editorView),editorActions:m(e.current.editorView),onClose:async()=&gt;{await(r?.unmount())},anchor:n,editor:e.current.editorRef,position:{startOffset:s.from,endOffset:s.to,mode:s.mode}})):r?.render(null)},unmount:()=&gt;{r?.unmount()},unrender:()=&gt;{r?.render(null)}}}}}]);
//# sourceMappingURL=7425.97c0fcde.js.map</pre></body></html>