(this.webpackJsonp=this.webpackJsonp||[]).push([[9],{"/FJ/":function(e,t,i){"use strict";i.d(t,"d",(function(){return a})),i.d(t,"e",(function(){return s})),i.d(t,"f",(function(){return o})),i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return l})),i.d(t,"c",(function(){return d}));var n=i("/lV4");const a="i_code_review_saved_replies_use",s="i_code_review_saved_replies_use_in_mr",o="i_code_review_saved_replies_use_in_other",r=["currentUser"],l={currentUser:Object(n.a)("User")},d=["code","quote","bullet-list","numbered-list","task-list","collapsible-section","table","attach-file","full-screen"]},"0ENF":function(e,t,i){"use strict";var n=i("7xOh");t.a=Object(n.a)()},"2XMn":function(e,t,i){"use strict";var n=i("4lAS"),a=i("/lV4"),s={components:{GlButton:n.a},props:{value:{type:String,required:!0}},computed:{markdownEditorSelected(){return"markdown"===this.value},text(){return this.markdownEditorSelected?Object(a.a)("Switch to rich text editing"):Object(a.a)("Switch to plain text editing")}},richTextEditorButtonId:"switch-to-rich-text-editor"},o=i("tBpV"),r=Object(o.a)(s,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"content-editor-switcher gl-inline-flex gl-items-center"},[t("gl-button",{staticClass:"!gl-px-4 !gl-text-sm !gl-text-subtle",attrs:{id:e.$options.richTextEditorButtonId,size:"small",category:"tertiary","data-testid":"editing-mode-switcher"},on:{click:function(t){return e.$emit("switch")}}},[e._v(e._s(e.text))])],1)}),[],!1,null,null,null);t.a=r.exports},"7KkO":function(e,t,i){"use strict";var n=i("o4PY"),a=i.n(n),s=(i("3UXl"),i("iyoE"),i("4lAS")),o=i("Bo17"),r=i("DZUU"),l=i("/lV4"),d=i("w3AR");var c={components:{GlButton:s.a,GlDisclosureDropdown:o.a,GlTooltip:r.a},data:()=>({toggleId:a()("dropdown-toggle-btn-"),maxRows:5,maxCols:5,rows:1,cols:1}),methods:{list:e=>new Array(e).fill().map((function(e,t){return t+1})),setRowsAndCols(e,t){this.rows=e,this.cols=t,this.maxRows=Object(d.a)(e+1,this.maxRows,10),this.maxCols=Object(d.a)(t+1,this.maxCols,10)},resetState(){this.rows=1,this.cols=1,this.maxRows=5,this.maxCols=5},insertTable(){this.$emit("insert-table",{rows:this.rows,cols:this.cols}),this.resetState(),this.$refs.dropdown.close(),this.$emit("execute",{contentType:"table"})},getButtonLabel:(e,t)=>Object(l.i)(Object(l.a)("Insert a %{rows}×%{cols} table"),{rows:e,cols:t}),onKeydown(e){const t={ArrowUp:{rows:-1,cols:0},ArrowDown:{rows:1,cols:0},ArrowLeft:{rows:0,cols:-1},ArrowRight:{rows:0,cols:1}}[e]||{rows:0,cols:0},i=Object(d.a)(this.rows+t.rows,1,this.maxRows),n=Object(d.a)(this.cols+t.cols,1,this.maxCols);this.setRowsAndCols(i,n)},setFocus(e,t){this.resetState(),this.$refs[`table-${e}-${t}`][0].$el.focus()}},MAX_COLS:10,MAX_ROWS:10},u=i("tBpV"),g=Object(u.a)(c,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"gl-inline-flex gl-align-middle"},[t("gl-disclosure-dropdown",{ref:"dropdown",staticClass:"content-editor-table-dropdown gl-mr-2",attrs:{"toggle-id":e.toggleId,size:"small",category:"tertiary",icon:"table","no-caret":"","aria-label":e.__("Insert table"),"toggle-text":e.__("Insert table"),"text-sr-only":"","fluid-width":!0},on:{shown:function(t){return e.setFocus(1,1)},hidden:e.resetState}},[t("div",{staticClass:"gl-p-3 gl-pt-2",attrs:{role:"grid","aria-colcount":e.$options.MAX_COLS,"aria-rowcount":e.$options.MAX_ROWS}},e._l(e.list(e.maxRows),(function(i){return t("div",{key:i,staticClass:"gl-flex",attrs:{role:"row"}},e._l(e.list(e.maxCols),(function(n){return t("div",{key:n,attrs:{role:"gridcell"}},[t("gl-button",{ref:`table-${i}-${n}`,refInFor:!0,staticClass:"table-creator-grid-item gl-m-2 !gl-rounded-none !gl-p-0",class:{active:i<=e.rows&&n<=e.cols},attrs:{"aria-label":e.getButtonLabel(i,n)},on:{mouseover:function(t){return e.setRowsAndCols(i,n)},focus:function(t){return e.setRowsAndCols(i,n)},click:function(t){return e.insertTable()},keydown:function(t){return e.onKeydown(t.key)}}})],1)})),0)})),0),e._v(" "),t("div",{staticClass:"gl-border-t gl-px-4 gl-pb-2 gl-pt-3"},[e._v("\n      "+e._s(e.getButtonLabel(e.rows,e.cols))+"\n    ")])]),e._v(" "),t("gl-tooltip",{attrs:{target:e.toggleId,placement:"top"}},[e._v(e._s(e.__("Insert table")))])],1)}),[],!1,null,null,null);t.a=g.exports},Ak1V:function(e,t,i){"use strict";i.d(t,"a",(function(){return b}));var n=i("59DU"),a=i.n(n),s=(i("lFMf"),i("gOHk"),i("c9hT"),i("byxs"),i("jlnU")),o=i("JTkt"),r=i("0AwG"),l=i("/lV4"),d=i("1OWu");const c={ui:"sketch",noSaveBtn:1,saveAndExit:1,keepmodified:1,spin:1,embed:1,libraries:1,configure:1,proto:"json",toSvg:1};function u(e,t){Object.assign(e,t)}function g(e,t){const{origin:i}=new URL(e.drawioUrl);e.iframe.contentWindow.postMessage(JSON.stringify(t),i)}function p(e){e.disposeEventListener(),e.iframe.remove()}async function m(e,t){const{newDiagram:i,diagramMarkdown:n,filename:a,diagramSvg:o}=e,r=a.endsWith(".drawio.svg")?a:a+".drawio.svg";g(e,{action:"spinner",show:!0,messageKey:"saving"});try{const a=await t.uploadDiagram({filename:r,diagramSvg:o});i?t.insertDiagram({uploadResults:a}):t.updateDiagram({diagramMarkdown:n,uploadResults:a}),Object(s.createAlert)({message:Object(l.a)("Diagram saved successfully."),variant:s.VARIANT_SUCCESS,fadeTransition:!0}),setTimeout((function(){return p(e)}),10)}catch{g(e,{action:"spinner",show:!1}),g(e,{action:"dialog",titleKey:"error",modified:!0,buttonKey:"close",messageKey:"errorSavingFile"})}}function h(e,t,i){g(e,{action:"prompt",titleKey:"filename",okKey:"save",defaultValue:t||""}),null!==i&&g(e,{action:"dialog",titleKey:"error",messageKey:i,buttonKey:"ok"})}function f(e){g(e,{action:"load",xml:e.diagramSvg,border:8,background:"#ffffff",dark:e.dark,title:e.filename})}async function w(e,t){const{iframe:i}=e;i.style.cursor="wait";try{await async function(e,t){let i=null;try{i=await t.getDiagram()}catch(e){throw new Error(Object(l.a)("Cannot load the diagram into the diagrams.net editor"))}if(i){const{diagramMarkdown:t,filename:n,diagramSvg:a,contentType:s,diagramURL:o}=i,r=new URL(o,window.location.origin),d=new Blob([a]).size;if("image/svg+xml"!==s)throw new Error(Object(l.a)("The selected image is not a valid SVG diagram"));if(r.origin!==window.location.origin)throw new Error(Object(l.a)("The selected image is not an asset uploaded in the application"));if(d>10485760)throw new Error(Object(l.a)("The selected image is too large."));u(e,{newDiagram:!1,filename:n,diagramMarkdown:t,diagramSvg:a})}else u(e,{newDiagram:!0});f(e)}(e,t),i.style.visibility="visible",i.style.cursor="",window.scrollTo(0,0)}catch(t){Object(s.createAlert)({message:t.message,error:t}),p(e)}}function v(e,t,i){if(a()(i)||i.source!==e.iframe.contentWindow)return;const n=JSON.parse(i.data);var s;"configure"===n.event?function(e){g(e,{action:"configure",config:{darkColor:"#202020",settingsName:"gitlab"},colorSchemeMeta:e.dark}),u(e,{initialized:!0})}(e):"init"===n.event?w(e,t):"exit"===n.event?p(e):"prompt"===n.event?(u(e,{filename:n.value}),e.filename?m(e,t):h(e,"diagram.drawio.svg","filenameShort")):"export"===n.event&&(u(e,{diagramSvg:(s=n.data,'<?xml version="1.0" encoding="UTF-8"?>\n      <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">\n      '+Object(r.e)(s.substring(s.indexOf(",")+1)))}),f(e),g(e,{action:"status",modified:!0}),e.filename?m(e,t):h(e,"diagram.drawio.svg",null))}function b({editorFacade:e,filename:t,drawioUrl:i=gon.diagramsnet_url}){const n=new URL(i);for(const[e,t]of Object.entries(c))n.searchParams.set(e,t);const a=function({filename:e=null,drawioUrl:t}){return{newDiagram:!0,filename:e,diagramSvg:null,diagramMarkdown:null,iframe:null,isBusy:!1,initialized:!1,dark:Object(o.a)(),disposeEventListener:null,drawioUrl:t}}({filename:t,drawioUrl:n.href});!function(e,t){const i=function(i){v(e,t,i)};window.addEventListener("message",i),u(e,{disposeEventListener:function(){window.removeEventListener("message",i)}})}(a,e),function(e){const t=document.createElement("iframe");Object(d.k)(t,{id:"drawio-frame",src:e.drawioUrl,class:"drawio-editor"}),document.body.appendChild(t),setTimeout((function(){!1===e.initialized&&(p(e),Object(s.createAlert)({message:Object(l.a)("The diagrams.net editor could not be loaded.")}))}),4e3),u(e,{iframe:t})}(a)}},B3Hj:function(e,t,i){"use strict";i.d(t,"a",(function(){return a})),i.d(t,"b",(function(){return s})),i.d(t,"c",(function(){return o}));var n=i("ygVz");const a="markdown_editor",s="execute_toolbar_control",o=function(e,t){n.b.event(void 0,"save_markdown",{label:e?"rich_text_editor":a,property:t})}},EP76:function(e,t,i){"use strict";var n={},a=i("tBpV"),s=Object(a.a)(n,(function(){this._self._c;return this._m(0)}),[function(){var e=this._self._c;return e("div",{staticClass:"gl-flex gl-py-2"},[e("div",{staticClass:"gl-border-l gl-ml-2 gl-pl-3"})])}],!1,null,null,null);t.a=s.exports},Hcvv:function(e,t,i){"use strict";var n=i("o4PY"),a=i.n(n),s=(i("3UXl"),i("iyoE"),i("UezY"),i("z6RN"),i("hG7+"),i("4lAS")),o=i("1cpz"),r=i("iN9h"),l=i("A5dm"),d=i("Bo17"),c=i("fSQg"),u=i("z1xw"),g=i("PxiM"),p=i.n(g),m=i("tTlX"),h=i("LlB7"),f=i("ygVz"),w=i("nuxI"),v=i.n(w),b=i("/FJ/"),y={apollo:{savedReplies:{query:v.a,manual:!0,result({data:e,loading:t}){t||(this.savedReplies=e)},variables(){const e=document.body.dataset.groupFullPath,t=document.body.dataset.projectFullPath;return{groupPath:e,hideGroup:!e,projectPath:t,hideProject:!t}},skip(){return!this.shouldFetchCommentTemplates}}},components:{GlButton:s.a,GlModal:o.a,GlSearchBoxByType:r.a,GlTruncate:l.a,GlDisclosureDropdown:d.a,GlDisclosureDropdownGroup:c.a},directives:{GlTooltip:u.a},mixins:[f.a.mixin(),m.a],props:{newCommentTemplatePaths:{type:Array,required:!0}},data:()=>({shouldFetchCommentTemplates:!1,savedReplies:{},commentTemplateSearch:"",loadingSavedReplies:!1}),computed:{allSavedReplies(){var e=this;return b.a.map((function(t){var i;return{name:b.b[t],items:((null===(i=e.savedReplies[t])||void 0===i||null===(i=i.savedReplies)||void 0===i?void 0:i.nodes)||[]).map((function(e){return{value:e.id,text:e.name,content:e.content}}))}}))},filteredSavedReplies(){var e=this;let t=this.allSavedReplies;return this.commentTemplateSearch&&(t=t.map((function(t){return{...t,items:p.a.filter(t.items,e.commentTemplateSearch,{key:["text"]})}})).filter((function({items:e}){return e.length}))),t.filter((function({items:e}){return e.length}))},modalId:()=>a()("insert-comment-template-modal-")},methods:{onSelect(e){const t=Boolean(Object(h.b)({endpoint:window.location}).id);this.$emit("select",e.content),this.trackEvent(b.d),this.trackEvent(t?b.e:b.f),this.shouldFetchCommentTemplates=!1},toggleModal(){this.shouldFetchCommentTemplates=!this.shouldFetchCommentTemplates}}},_=i("tBpV"),k=Object(_.a)(y,(function(){var e=this,t=e._self._c;return t("span",[t("gl-modal",{ref:"modal",attrs:{title:e.__("Select a comment template"),scrollable:"","modal-id":e.modalId,"modal-class":"comment-templates-modal"},scopedSlots:e._u([{key:"modal-footer",fn:function(){return[t("gl-disclosure-dropdown",{attrs:{items:e.newCommentTemplatePaths,"toggle-text":e.__("Manage comment templates"),placement:"bottom-end","fluid-width":"","data-testid":"manage-dropdown"},scopedSlots:e._u([{key:"header",fn:function(){return[t("div",{staticClass:"gl-min-h-8 gl-border-b-1 gl-border-b-dropdown !gl-p-4 gl-text-sm gl-font-bold gl-border-b-solid"},[e._v("\n            "+e._s(e.__("Manage"))+"\n          ")])]},proxy:!0}])})]},proxy:!0}]),model:{value:e.shouldFetchCommentTemplates,callback:function(t){e.shouldFetchCommentTemplates=t},expression:"shouldFetchCommentTemplates"}},[t("gl-search-box-by-type",{ref:"searchInput",attrs:{placeholder:e.__("Search comment templates")},on:{keydown:e.onKeydown},model:{value:e.commentTemplateSearch,callback:function(t){e.commentTemplateSearch=t},expression:"commentTemplateSearch"}}),e._v(" "),e.filteredSavedReplies.length?t("ul",{ref:"resultsList",staticClass:"comment-templates-options gl-m-0 gl-list-none gl-p-0",attrs:{"data-testid":"comment-templates-list"},on:{keydown:e.onKeydown}},e._l(e.filteredSavedReplies,(function(i,n){return t("gl-disclosure-dropdown-group",{key:i.name,class:{"!gl-mt-0 !gl-border-t-0 gl-pt-0":0===n},attrs:{group:i,bordered:""},on:{action:e.onSelect},scopedSlots:e._u([{key:"list-item",fn:function({item:i}){return[t("strong",{staticClass:"gl-block gl-w-full"},[e._v(e._s(i.text))]),e._v(" "),t("gl-truncate",{staticClass:"gl-mt-2 gl-text-subtle",attrs:{text:i.content,position:"end"}})]}}],null,!0)})})),1):t("section",{staticClass:"gl-mt-3"},[e._v("\n      "+e._s(e.__("No comment templates found."))+"\n    ")])],1),e._v(" "),t("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],staticClass:"js-comment-template-toggle",attrs:{title:e.__("Insert comment template"),"aria-label":e.__("Insert comment template"),category:"tertiary",size:"small",icon:"comment-lines","data-testid":"comment-templates-dropdown-toggle"},on:{click:e.toggleModal}})],1)}),[],!1,null,null,null);t.a=k.exports},IeAI:function(e,t,i){"use strict";var n=i("jqx9"),a=i.n(n),s=i("VNnR"),o=i.n(s),r=i("Tmea"),l=i.n(r),d=(i("3UXl"),i("iyoE"),i("ZzK0"),i("z6RN"),i("BzOf"),i("s1D3")),c=i("z1xw"),u=i("EmJ/"),g=i.n(u),p=i("jlnU"),m=i("FVJN"),h=i("Mp8J"),f=i("2ibD"),w=i("0AwG"),v=i("/lV4"),b=i("KAYR"),y=i("sHIo"),_=i("EJYk"),k=i("5c3i"),S=i("0ENF"),x=(i("B++/"),i("47t/"),i("v2fZ"),i("A7K0")),C=i("4lAS"),A=i("PrLL"),M=i("d08M"),T=i("xPX6"),B=i("NmEs"),P=i("3E4U"),j=i("tXF7"),O=i("7KkO"),q=i("B3Hj"),$={components:{GlButton:C.a},directives:{GlTooltip:c.a},props:{buttonTitle:{type:String,required:!0},icon:{type:String,required:!0},tag:{type:String,required:!1,default:""},tagBlock:{type:String,required:!1,default:""},tagSelect:{type:String,required:!1,default:""},prepend:{type:Boolean,required:!1,default:!1},tagContent:{type:String,required:!1,default:""},cursorOffset:{type:Number,required:!1,default:0},command:{type:String,required:!1,default:""},shortcuts:{type:[String,Array],required:!1,default:function(){return[]}},trackingProperty:{type:String,required:!1,default:null}},computed:{shortcutsString(){const e=Array.isArray(this.shortcuts)?this.shortcuts:[this.shortcuts];return JSON.stringify(e)},trackingProps(){const{trackingProperty:e}=this;return e?{"data-track-action":q.b,"data-track-label":q.a,"data-track-property":e}:{}}}},D=i("tBpV"),R=Object(D.a)($,(function(){var e=this;return(0,e._self._c)("gl-button",e._b({directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],staticClass:"js-md gl-mr-2",attrs:{"data-md-tag":e.tag,"data-md-cursor-offset":e.cursorOffset,"data-md-select":e.tagSelect,"data-md-block":e.tagBlock,"data-md-tag-content":e.tagContent,"data-md-prepend":e.prepend,"data-md-shortcuts":e.shortcutsString,"data-md-command":e.command,title:e.buttonTitle,"aria-label":e.buttonTitle,icon:e.icon,type:"button",category:"tertiary",size:"small","data-container":"body"},on:{click:function(t){return e.$emit("click",t)}}},"gl-button",e.trackingProps,!1))}),[],!1,null,null,null).exports,E=i("Ak1V");const I=function({textArea:e,markdownPreviewPath:t,uploadsPath:i}){return{getDiagram:async function(){const i=await Object(j.f)(e,t);if(!i)return null;const{imageURL:n,imageMarkdown:a,filename:s}=i,o=await f.a.get(n,{responseType:"text"});return{diagramURL:n,diagramMarkdown:a,filename:s,diagramSvg:o.data,contentType:o.headers["content-type"]}},updateDiagram:function({uploadResults:t,diagramMarkdown:i}){e.focus(),e.value=e.value.replace(i,t.link.markdown),e.dispatchEvent(new Event("input"))},insertDiagram:function({uploadResults:t}){e.focus();const i=e.value,n=i.substring(e.selectionStart,e.selectionEnd);Object(j.c)({textArea:e,text:i,tag:t.link.markdown,selected:n})},uploadDiagram:async function({filename:e,diagramSvg:t}){const n=new Blob([t],{type:"image/svg+xml"}),a=new FormData;a.append("file",n,e);return(await f.a.post(i,a)).data}}};var F={components:{GlButton:C.a},directives:{GlTooltip:c.a},props:{uploadsPath:{type:String,required:!0},markdownPreviewPath:{type:String,required:!0}},methods:{getTextArea:()=>document.querySelector(".js-gfm-input"),launchDrawioEditor(){Object(E.a)({editorFacade:I({uploadsPath:this.uploadsPath,textArea:this.getTextArea(),markdownPreviewPath:this.markdownPreviewPath})})}}},N=Object(D.a)(F,(function(){return(0,this._self._c)("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],attrs:{title:this.__("Insert or edit diagram"),"aria-label":this.__("Insert or edit diagram"),category:"tertiary",icon:"diagram",size:"small"},on:{click:this.launchDrawioEditor}})}),[],!1,null,null,null).exports,G=i("Hcvv"),L=i("EP76"),z={components:{ToolbarButton:R,ToolbarTableButton:O.a,GlPopover:x.a,GlButton:C.a,GlFormInput:A.a,DrawioToolbarButton:N,CommentTemplatesModal:G.a,AiActionsDropdown:function(){return i.e(3).then(i.bind(null,"4b03"))},HeaderDivider:L.a,SummarizeCodeChanges:function(){return i.e(3).then(i.bind(null,"4b03"))}},directives:{GlTooltip:c.a},mixins:[Object(y.a)()],inject:{newCommentTemplatePaths:{default:function(){return[]}},editorAiActions:{default:function(){return[]}},mrGeneratedContent:{default:null},canSummarizeChanges:{default:!1}},props:{previewMarkdown:{type:Boolean,required:!0},lineContent:{type:String,required:!1,default:""},canSuggest:{type:Boolean,required:!1,default:!0},showSuggestPopover:{type:Boolean,required:!1,default:!1},suggestionStartIndex:{type:Number,required:!1,default:0},enablePreview:{type:Boolean,required:!1,default:!0},restrictedToolBarItems:{type:Array,required:!1,default:function(){return[]}},uploadsPath:{type:String,required:!1,default:""},markdownPreviewPath:{type:String,required:!1,default:""},newCommentTemplatePathsProp:{type:Array,required:!1,default:function(){return[]}},drawioEnabled:{type:Boolean,required:!1,default:!1},supportsQuickActions:{type:Boolean,required:!1,default:!1}},data(){const e=Object(T.g)();return{tag:"> ",suggestPopoverVisible:!1,findAndReplace:{find:"",replace:"",shouldShowBar:!1},modifierKey:e,shiftKey:"⌘"===e?"⇧":"Shift+"}},computed:{commentTemplatePaths(){return this.newCommentTemplatePaths.length>0?this.newCommentTemplatePaths:this.newCommentTemplatePathsProp},mdTable(){const e=Object(v.h)("MarkdownEditor|header"),t="-".repeat(e.length),i=" ".repeat(e.length);return[`| ${e} | ${e} |`,`| ${t} | ${t} |`,`| ${i} | ${i} |`,`| ${i} | ${i} |`].join("\n")},mdSuggestion(){const e=Object(j.e)(this.lineContent);return[`${e}suggestion:-${this.suggestionStartIndex}+0`,"{text}",e].join("\n")},mdCollapsibleSection:()=>[`<details><summary>${Object(v.h)("MarkdownEditor|Click to expand")}</summary>`,"{text}","</details>"].join("\n"),hideDividerBeforeTable(){return this.previewMarkdown||this.restrictedToolBarItems.includes("table")&&this.restrictedToolBarItems.includes("attach-file")&&!this.drawioEnabled&&!this.supportsQuickActions&&!this.commentTemplatePaths.length},showFindAndReplaceButton(){return this.glFeatures.findAndReplace&&!this.restrictedToolBarItems.includes("find-and-replace")}},watch:{showSuggestPopover(){this.updateSuggestPopoverVisibility()}},mounted(){g()(document).on("markdown-preview:show.vue",this.showMarkdownPreview),g()(document).on("markdown-preview:hide.vue",this.hideMarkdownPreview),g()(document).on("markdown-editor:find-and-replace:show",this.findAndReplace_show),this.updateSuggestPopoverVisibility()},beforeDestroy(){g()(document).off("markdown-preview:show.vue",this.showMarkdownPreview),g()(document).off("markdown-preview:hide.vue",this.hideMarkdownPreview),g()(document).off("markdown-editor:find-and-replace:show",this.findAndReplace_show)},methods:{async updateSuggestPopoverVisibility(){await this.$nextTick(),this.suggestPopoverVisible=this.showSuggestPopover&&this.canSuggest},isValid(e){return!e||e.find(".js-vue-markdown-field").length&&g()(this.$el).closest("form")[0]===e[0]},showMarkdownPreview(e,t){this.isValid(t)&&this.$emit("showPreview")},hideMarkdownPreview(e,t){this.isValid(t)&&this.$emit("hidePreview")},handleSuggestDismissed(){this.$emit("handleSuggestDismissed")},handleQuote(){const e=Object(B.m)();if(!e||!e.textContent)return void(this.tag="> ");this.tag="";const t=P.a.transformGFMSelection(e),i=this.$el.parentNode.querySelector("textarea");P.a.nodeToGFM(t).then((function(t){P.a.insertPastedText(i,e.textContent,P.a.quoted(t))})).catch((function(){}))},getCurrentTextArea(){var e;return null===(e=this.$el.closest(".md-area"))||void 0===e?void 0:e.querySelector("textarea")},insertIntoTextarea(e){const t=this.getCurrentTextArea();t&&Object(j.g)({textArea:t,tag:e,cursorOffset:0,wrap:!1})},insertTable({rows:e,cols:t}){const i=Object(v.h)("MarkdownEditor|header"),n="-".repeat(i.length),a=" ".repeat(i.length),s=["|"+` ${i} |`.repeat(t),"|"+` ${n} |`.repeat(t)];for(let i=0;i<e;i+=1)s.push((o=t,"|"+` ${a} |`.repeat(o)));var o;this.insertIntoTextarea(s.join("\n"))},replaceTextarea(e){const{description:t,descriptionForSha:i}=this.$options.i18n,n=document.getElementById("merge_request_diff_head_sha").value,a=n?Object(v.i)(i,{revision:Object(w.E)(n)}):t;this.mrGeneratedContent&&(this.mrGeneratedContent.setGeneratedContent(`${e}\n\n---\n\n_${a}_`),this.mrGeneratedContent.showWarning())},switchPreview(){this.previewMarkdown?this.hideMarkdownPreview():this.showMarkdownPreview()},insertAIAction(e){this.insertIntoTextarea(`${e}\n\n---\n\n_${Object(v.a)("This comment was generated by AI")}_`)},insertSavedReply(e){var t=this;this.insertIntoTextarea(e),setTimeout((function(){var e;null===(e=t.$el.closest(".md-area"))||void 0===e||null===(e=e.querySelector("textarea"))||void 0===e||e.focus()}),500)},findAndReplace_show(e,t){this.isValid(t)&&(this.findAndReplace.shouldShowBar=!0)},findAndReplace_handleKeyDown(e){if("Enter"===e.key)e.preventDefault();else if("Escape"===e.key){var t,i;this.findAndReplace.shouldShowBar=!1,null===(t=this.getCurrentTextArea())||void 0===t||t.removeEventListener("scroll",this.findAndReplace_syncScroll),null===(i=this.cloneDiv)||void 0===i||i.parentElement.removeChild(this.cloneDiv),this.cloneDiv=void 0}},findAndReplace_handleKeyUp(e){this.findAndReplace_highlightMatchingText(e.target.value)},findAndReplace_syncScroll(){const e=this.getCurrentTextArea();this.cloneDiv.scrollTop=e.scrollTop},findAndReplace_safeReplace(e,t){var i=this;const n=new RegExp(`(${t})`,"g"),a=e.value.split(n);this.cloneDiv.innerHTML="",a.forEach((function(e){if(e===t){const t=document.createElement("span");t.classList.add("js-highlight"),t.style.backgroundColor="orange",t.style.display="inline-block",t.textContent=e,i.cloneDiv.appendChild(t)}else{const t=document.createTextNode(e);i.cloneDiv.appendChild(t)}}))},async findAndReplace_highlightMatchingText(e){const t=this.getCurrentTextArea();t&&(t.style.position="relative",t.style.zIndex=2,await this.findAndReplace_attachCloneDivIfNotExists(t),this.findAndReplace_safeReplace(t,e))},async findAndReplace_attachCloneDivIfNotExists(e){var t=this;if(this.cloneDiv)return;this.cloneDiv=document.createElement("div"),this.cloneDiv.dataset.testid="find-and-replace-clone",this.cloneDiv.textContent=e.value;const i=window.getComputedStyle(e);["width","height","padding","border","font-family","font-size","line-height","background-color","color","overflow","white-space","word-wrap","resize","margin"].forEach((function(e){t.cloneDiv.style[e]=i[e]})),this.cloneDiv.style.whiteSpace="pre-wrap",this.cloneDiv.style.overflowY="auto",this.cloneDiv.style.position="absolute",this.cloneDiv.style.zIndex=1,this.cloneDiv.style.color="transparent",e.addEventListener("scroll",this.findAndReplace_syncScroll),e.parentElement.insertBefore(this.cloneDiv,e),await this.$nextTick(),this.cloneDiv.scrollTop=e.scrollTop}},shortcuts:{bold:Object(M.Ab)(M.a),italic:Object(M.Ab)(M.P),strikethrough:Object(M.Ab)(M.tb),link:Object(M.Ab)(M.Q),indent:Object(M.Ab)(M.F),outdent:Object(M.Ab)(M.db),findAndReplace:Object(M.Ab)(M.c)},i18n:{comment:Object(v.a)("This comment was generated by AI"),description:Object(v.h)("MergeRequest|This description was generated using AI"),descriptionForSha:Object(v.h)("MergeRequest|This description was generated for revision %{revision} using AI"),hidePreview:Object(v.a)("Continue editing"),preview:Object(v.a)("Preview"),editorToolbar:Object(v.a)("Editor toolbar")}},K=Object(D.a)(z,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"md-header gl-border-b gl-z-2 gl-rounded-lg gl-rounded-b-none gl-border-default gl-px-3",class:{"md-header-preview":e.previewMarkdown}},[t("div",{staticClass:"gl-flex gl-flex-wrap gl-items-center"},[t("div",{staticClass:"md-header-toolbar gl-flex gl-grow gl-items-start gl-gap-y-2 gl-py-3",attrs:{"data-testid":"md-header-toolbar"}},[t("div",{staticClass:"gl-flex gl-flex-wrap gl-gap-y-2",attrs:{role:"toolbar","aria-label":e.$options.i18n.editorToolbar}},[e.enablePreview?t("gl-button",{staticClass:"js-md-preview-button gl-flex-row-reverse gl-items-center !gl-font-normal",attrs:{"data-testid":"preview-toggle",value:e.previewMarkdown?"preview":"edit",label:e.$options.i18n.previewTabTitle,size:"small",category:"tertiary"},on:{click:e.switchPreview}},[e._v(e._s(e.previewMarkdown?e.$options.i18n.hidePreview:e.$options.i18n.preview))]):e._e(),e._v(" "),!e.previewMarkdown&&e.canSuggest?[t("div",{staticClass:"gl-flex gl-gap-y-2"},[e.previewMarkdown?e._e():t("header-divider"),e._v(" "),t("toolbar-button",{ref:"suggestButton",staticClass:"js-suggestion-btn",attrs:{tag:e.mdSuggestion,prepend:!0,"button-title":e.__("Insert suggestion"),"cursor-offset":4,"tag-content":e.lineContent,"tracking-property":"codeSuggestion",icon:"doc-code","data-testid":"suggestion-button"},on:{click:e.handleSuggestDismissed}}),e._v(" "),e.suggestPopoverVisible?t("gl-popover",{attrs:{target:e.$refs.suggestButton.$el,"css-classes":["diff-suggest-popover"],placement:"bottom",show:e.suggestPopoverVisible,triggers:""}},[t("strong",[e._v(e._s(e.__("New! Suggest changes directly")))]),e._v(" "),t("p",{staticClass:"mb-2"},[e._v("\n                "+e._s(e.__("Suggest code changes which can be immediately applied in one click. Try it out!"))+"\n              ")]),e._v(" "),t("gl-button",{attrs:{variant:"confirm",category:"primary",size:"small","data-testid":"dismiss-suggestion-popover-button"},on:{click:e.handleSuggestDismissed}},[e._v("\n                "+e._s(e.__("Got it"))+"\n              ")])],1):e._e()],1)]:e._e(),e._v(" "),t("div",{staticClass:"gl-flex gl-gap-y-2"},[!e.previewMarkdown&&e.editorAiActions.length?t("div",{staticClass:"gl-flex gl-gap-y-2"},[e.previewMarkdown?e._e():t("header-divider"),e._v(" "),t("ai-actions-dropdown",{attrs:{actions:e.editorAiActions},on:{input:e.insertAIAction,replace:e.replaceTextarea}})],1):e._e(),e._v(" "),e.enablePreview&&!e.previewMarkdown?t("header-divider"):e._e()],1),e._v(" "),t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],attrs:{tag:"**","button-title":e.sprintf(e.s__("MarkdownEditor|Add bold text (%{modifierKey}B)"),{modifierKey:e.modifierKey}),shortcuts:e.$options.shortcuts.bold,icon:"bold","tracking-property":"bold"}}),e._v(" "),t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],attrs:{tag:"_","button-title":e.sprintf(e.s__("MarkdownEditor|Add italic text (%{modifierKey}I)"),{modifierKey:e.modifierKey}),shortcuts:e.$options.shortcuts.italic,icon:"italic","tracking-property":"italic"}}),e._v(" "),t("div",{staticClass:"gl-flex gl-gap-y-2"},[e.restrictedToolBarItems.includes("strikethrough")?e._e():t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],attrs:{tag:"~~","button-title":e.sprintf(e.s__("MarkdownEditor|Add strikethrough text (%{modifierKey}%{shiftKey}X)"),{modifierKey:e.modifierKey,shiftKey:e.shiftKey}),shortcuts:e.$options.shortcuts.strikethrough,icon:"strikethrough","tracking-property":"strike"}}),e._v(" "),e.previewMarkdown?e._e():t("header-divider")],1),e._v(" "),e.restrictedToolBarItems.includes("quote")?e._e():t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],attrs:{prepend:!0,tag:e.tag,"button-title":e.__("Insert a quote"),icon:"quote","tracking-property":"blockquote"},on:{click:e.handleQuote}}),e._v(" "),e.restrictedToolBarItems.includes("code")?e._e():t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],attrs:{tag:"`","tag-block":"```","button-title":e.__("Insert code"),icon:"code","tracking-property":"code"}}),e._v(" "),t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],attrs:{tag:"[{text}](url)","tag-select":"url","button-title":e.sprintf(e.s__("MarkdownEditor|Add a link (%{modifierKey}K)"),{modifierKey:e.modifierKey}),shortcuts:e.$options.shortcuts.link,icon:"link","tracking-property":"link"}}),e._v(" "),e.restrictedToolBarItems.includes("bullet-list")?e._e():t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],attrs:{prepend:!0,tag:"- ","button-title":e.__("Add a bullet list"),icon:"list-bulleted","tracking-property":"bulletList"}}),e._v(" "),e.restrictedToolBarItems.includes("numbered-list")?e._e():t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],attrs:{prepend:!0,tag:"1. ","button-title":e.__("Add a numbered list"),icon:"list-numbered","tracking-property":"orderedList"}}),e._v(" "),e.restrictedToolBarItems.includes("task-list")?e._e():t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],attrs:{prepend:!0,tag:"- [ ] ","button-title":e.__("Add a checklist"),icon:"list-task","tracking-property":"taskList"}}),e._v(" "),e.restrictedToolBarItems.includes("indent")?e._e():t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],staticClass:"gl-hidden",attrs:{"button-title":e.sprintf(e.s__("MarkdownEditor|Indent line (%{modifierKey}])"),{modifierKey:e.modifierKey}),shortcuts:e.$options.shortcuts.indent,command:"indentLines",icon:"list-indent","tracking-property":"indent"}}),e._v(" "),e.restrictedToolBarItems.includes("outdent")?e._e():t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],staticClass:"gl-hidden",attrs:{"button-title":e.sprintf(e.s__("MarkdownEditor|Outdent line (%{modifierKey}[)"),{modifierKey:e.modifierKey}),shortcuts:e.$options.shortcuts.outdent,command:"outdentLines",icon:"list-outdent","tracking-property":"outdent"}}),e._v(" "),t("div",{staticClass:"gl-flex gl-gap-y-2"},[e.restrictedToolBarItems.includes("collapsible-section")?e._e():t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],attrs:{tag:e.mdCollapsibleSection,prepend:!0,"tag-select":"Click to expand","button-title":e.__("Add a collapsible section"),icon:"details-block","tracking-property":"details"}}),e._v(" "),e.hideDividerBeforeTable?e._e():t("header-divider")],1),e._v(" "),e.restrictedToolBarItems.includes("table")?e._e():t("toolbar-table-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],on:{"insert-table":e.insertTable}}),e._v(" "),t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown&&!e.restrictedToolBarItems.includes("attach-file"),expression:"!previewMarkdown && !restrictedToolBarItems.includes('attach-file')"}],staticClass:"gl-mr-2",attrs:{"data-testid":"button-attach-file","data-button-type":"attach-file","button-title":e.__("Attach a file or image"),icon:"paperclip","tracking-property":"upload"}}),e._v(" "),!e.previewMarkdown&&e.drawioEnabled?t("drawio-toolbar-button",{attrs:{"uploads-path":e.uploadsPath,"markdown-preview-path":e.markdownPreviewPath}}):e._e(),e._v(" "),e.supportsQuickActions?t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],attrs:{prepend:!0,tag:"/","button-title":e.__("Add a quick action"),icon:"quick-actions","tracking-property":"quickAction"}}):e._e(),e._v(" "),!e.previewMarkdown&&e.commentTemplatePaths.length?t("comment-templates-modal",{attrs:{"new-comment-template-paths":e.commentTemplatePaths},on:{select:e.insertSavedReply}}):e._e(),e._v(" "),!e.previewMarkdown&&e.canSummarizeChanges?[t("header-divider"),e._v(" "),t("summarize-code-changes")]:e._e(),e._v(" "),e.previewMarkdown?e._e():e._t("header-buttons")],2),e._v(" "),e.previewMarkdown?e._e():t("div",{staticClass:"full-screen gl-flex gl-grow gl-justify-end"},[e.restrictedToolBarItems.includes("full-screen")?e._e():t("toolbar-button",{staticClass:"js-zen-enter !gl-mr-0",attrs:{icon:"maximize","button-title":e.__("Go full screen"),prepend:!0,"tracking-property":"fullScreen"}})],1),e._v(" "),e.showFindAndReplaceButton?t("toolbar-button",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],staticClass:"gl-hidden",attrs:{"button-title":e.s__("MarkdownEditor|Find and replace"),shortcuts:e.$options.shortcuts.findAndReplace,icon:"retry"}}):e._e()],1)]),e._v(" "),e.findAndReplace.shouldShowBar?t("div",{staticClass:"gl-border gl-absolute gl-right-0 gl-z-3 gl-flex gl-w-34 gl-rounded-bl-base gl-border-r-0 gl-bg-section gl-p-3 gl-shadow-sm",attrs:{"data-testid":"find-and-replace"}},[t("gl-form-input",{attrs:{placeholder:e.__("Find"),autofocus:"","data-testid":"find-btn"},on:{keydown:e.findAndReplace_handleKeyDown,keyup:e.findAndReplace_handleKeyUp},model:{value:e.findAndReplace.find,callback:function(t){e.$set(e.findAndReplace,"find",t)},expression:"findAndReplace.find"}})],1):e._e()])}),[],!1,null,null,null).exports,U=i("FkSe"),V=i("30su"),H=i("2XMn"),W={components:{GlButton:C.a,GlLoadingIcon:U.a,GlSprintf:V.a,GlIcon:d.a,EditorModeSwitcher:H.a},directives:{GlTooltip:c.a},props:{markdownDocsPath:{type:String,required:!0},canAttachFile:{type:Boolean,required:!1,default:!0},showCommentToolBar:{type:Boolean,required:!1,default:!0},showContentEditorSwitcher:{type:Boolean,required:!1,default:!1}},computed:{showEditorModeSwitcher(){return this.showContentEditorSwitcher}},methods:{insertIntoTextarea(...e){var t;const i=e.join("\n"),n=null===(t=this.$el.closest(".md-area"))||void 0===t?void 0:t.querySelector("textarea");n&&!n.value&&Object(j.g)({textArea:n,tag:i,cursorOffset:0,wrap:!1})}}};function X(e){return a()(Object(w.A)(e).replace(/\\n/g,"%br").replace(/\n/g,""))}var J={components:{MarkdownHeader:K,MarkdownToolbar:Object(D.a)(W,(function(){var e=this,t=e._self._c;return e.showCommentToolBar?t("div",{staticClass:"comment-toolbar gl-flex gl-flex-row gl-rounded-b-base gl-px-2",class:e.showContentEditorSwitcher?"gl-border-t gl-items-center gl-justify-between gl-border-default":"gl-my-2 gl-justify-end"},[e.showEditorModeSwitcher?t("editor-mode-switcher",{attrs:{size:"small",value:"markdown"},on:{switch:function(t){return e.$emit("enableContentEditor")}}}):e._e(),e._v(" "),t("div",{staticClass:"gl-flex"},[e.canAttachFile?t("div",{staticClass:"uploading-container gl-mr-3 gl-text-sm gl-leading-32"},[t("span",{staticClass:"uploading-progress-container hide"},[t("gl-icon",{attrs:{name:"paperclip"}}),e._v(" "),t("span",{staticClass:"attaching-file-message"}),e._v(" "),t("span",{staticClass:"uploading-progress"},[e._v("0%")]),e._v(" "),t("gl-loading-icon",{attrs:{size:"sm",inline:""}})],1),e._v(" "),t("span",{staticClass:"uploading-error-container hide"},[t("span",{staticClass:"uploading-error-icon"},[t("gl-icon",{attrs:{name:"paperclip"}})],1),e._v(" "),t("span",{staticClass:"uploading-error-message"}),e._v(" "),t("gl-sprintf",{attrs:{message:e.__("%{retryButtonStart}Try again%{retryButtonEnd} or %{newFileButtonStart}attach a new file%{newFileButtonEnd}.")},scopedSlots:e._u([{key:"retryButton",fn:function({content:i}){return[t("gl-button",{staticClass:"retry-uploading-link gl-align-baseline !gl-text-sm",attrs:{variant:"link",category:"primary"}},[e._v("\n              "+e._s(i)+"\n            ")])]}},{key:"newFileButton",fn:function({content:i}){return[t("gl-button",{staticClass:"markdown-selector attach-new-file gl-align-baseline !gl-text-sm",attrs:{variant:"link",category:"primary"}},[e._v("\n              "+e._s(i)+"\n            ")])]}}],null,!1,3239805150)})],1),e._v(" "),t("gl-button",{staticClass:"button-cancel-uploading-files hide gl-align-baseline !gl-text-sm",attrs:{variant:"link",category:"primary"}},[e._v("\n        "+e._s(e.__("Cancel"))+"\n      ")])],1):e._e(),e._v(" "),e._t("toolbar"),e._v(" "),e.markdownDocsPath?t("gl-button",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip"}],staticClass:"!gl-px-3",attrs:{icon:"markdown-mark",href:e.markdownDocsPath,target:"_blank",category:"tertiary",size:"small",title:e.__("Markdown is supported"),"aria-label":e.__("Markdown is supported")}}):e._e()],2)],1):e._e()}),[],!1,null,null,null).exports,GlIcon:d.a,Suggestions:b.a},directives:{SafeHtml:h.a,GlTooltip:c.a},mixins:[Object(y.a)()],props:{textareaValue:{type:String,required:!0},markdownDocsPath:{type:String,required:!0},isSubmitting:{type:Boolean,required:!1,default:!1},markdownPreviewPath:{type:String,required:!1,default:""},newCommentTemplatePaths:{type:Array,required:!1,default:function(){return[]}},enablePreview:{type:Boolean,required:!1,default:!0},addSpacingClasses:{type:Boolean,required:!1,default:!0},removeBorder:{type:Boolean,required:!1,default:!1},supportsQuickActions:{type:Boolean,required:!1,default:!1},canAttachFile:{type:Boolean,required:!1,default:!0},uploadsPath:{type:String,required:!1,default:""},enableAutocomplete:{type:Boolean,required:!1,default:!0},autocompleteDataSources:{type:Object,required:!1,default:function(){return{}}},line:{type:Object,required:!1,default:null},lines:{type:Array,required:!1,default:function(){return[]}},note:{type:Object,required:!1,default:function(){return{}}},canSuggest:{type:Boolean,required:!1,default:!1},helpPagePath:{type:String,required:!1,default:""},showSuggestPopover:{type:Boolean,required:!1,default:!1},showCommentToolBar:{type:Boolean,required:!1,default:!0},restrictedToolBarItems:{type:Array,required:!1,default:function(){return[]}},showContentEditorSwitcher:{type:Boolean,required:!1,default:!1},drawioEnabled:{type:Boolean,required:!1,default:!1}},data(){return{glForm:null,markdownPreview:"",referencedCommands:"",referencedUsers:[],hasSuggestion:!1,markdownPreviewLoading:!1,previewMarkdown:!1,suggestions:this.note.suggestions||[],debouncedFetchMarkdownLoading:!1}},computed:{shouldShowReferencedUsers(){return this.referencedUsers.length>=10},lineContent(){if(this.lines.length)return this.lines.map((function(e){const{rich_text:t,text:i}=e;return i||X(t)})).join("\\n");if(this.line){const{rich_text:e,text:t}=this.line;return t||X(e)}return""},lineNumber(){let e;if(this.line){const{new_line:t,old_line:i}=this.line;e=t||i}return e},lineType(){return this.line?this.line.type:""},addMultipleToDiscussionWarning(){return Object(v.i)(Object(v.a)("You are about to add %{usersTag} people to the discussion. They will all receive a notification."),{usersTag:`<strong><span class="js-referenced-users-count">${this.referencedUsers.length}</span></strong>`},!1)},suggestionsStartIndex(){return Math.max(this.lines.length-1,0)}},watch:{isSubmitting(e){if(!e||!this.$refs["markdown-preview"].querySelectorAll)return;const t=this.$refs["markdown-preview"].querySelectorAll("video, audio");t&&t.forEach((function(e){e.pause()}))},textareaValue:{immediate:!0,handler(e,t){const i=/@all([^\w._-]|$)/,n=i.test(e),a=i.test(t),s=a&&!n;!a&&n?(this.debouncedFetchMarkdownLoading=!1,this.debouncedFetchMarkdown()):s&&(this.debouncedFetchMarkdownLoading=!0,this.referencedUsers=[])}},enablePreview:{immediate:!0,handler(e){e||this.hidePreview()}},autocompleteDataSources:{immediate:!0,handler(e,t){!o()(e,t)&&this.glForm&&this.glForm.updateAutocompleteDataSources(e)}}},mounted(){this.glForm=new m.a(g()(this.$refs["gl-form"]),{emojis:this.enableAutocomplete,members:this.enableAutocomplete,issues:this.enableAutocomplete,mergeRequests:this.enableAutocomplete,epics:this.enableAutocomplete,milestones:this.enableAutocomplete,labels:this.enableAutocomplete,snippets:this.enableAutocomplete,vulnerabilities:this.enableAutocomplete,contacts:this.enableAutocomplete},!0,this.autocompleteDataSources),S.a.$emit(k.j)},beforeDestroy(){this.glForm&&this.glForm.destroy()},methods:{showPreview(){var e=this;this.previewMarkdown||(this.previewMarkdown=!0,this.textareaValue?(this.markdownPreviewLoading=!0,this.markdownPreview=Object(v.a)("Loading…"),this.fetchMarkdown().then((function(t){return e.renderMarkdown(t)})).catch((function(){return Object(p.createAlert)({message:Object(v.a)("Error loading markdown preview")})}))):this.renderMarkdown())},hidePreview(){this.markdownPreview="",this.previewMarkdown=!1},fetchMarkdown(){var e=this;return f.a.post(this.markdownPreviewPath,{text:this.textareaValue}).then((function({data:t}){const{references:i}=t;var n;i&&(e.referencedCommands=i.commands,e.referencedUsers=i.users,e.hasSuggestion=(null===(n=i.suggestions)||void 0===n?void 0:n.length)>0,e.suggestions=i.suggestions);return t}))},debouncedFetchMarkdown:l()((function(){var e=this;return this.fetchMarkdown().then((function(){e.debouncedFetchMarkdownLoading&&(e.referencedUsers=[],e.debouncedFetchMarkdownLoading=!1)}))}),400),renderMarkdown(e={}){var t=this;const{references:i}=e;i||(this.referencedCommands=""),this.markdownPreviewLoading=!1,this.markdownPreview=e.body||e.html||Object(v.a)("Nothing to preview."),this.$nextTick().then((function(){Object(_.a)(t.$refs["markdown-preview"])})).catch((function(){return Object(p.createAlert)({message:Object(v.a)("Error rendering Markdown preview")})}))}},safeHtmlConfig:{ADD_TAGS:["gl-emoji"]}},Y=Object(D.a)(J,(function(){var e=this,t=e._self._c;return t("div",{ref:"gl-form",staticClass:"js-vue-markdown-field md-area position-relative gfm-form",attrs:{"data-uploads-path":e.uploadsPath}},[t("markdown-header",{attrs:{"preview-markdown":e.previewMarkdown,"line-content":e.lineContent,"can-suggest":e.canSuggest,"enable-preview":e.enablePreview,"show-suggest-popover":e.showSuggestPopover,"suggestion-start-index":e.suggestionsStartIndex,"uploads-path":e.uploadsPath,"markdown-preview-path":e.markdownPreviewPath,"new-comment-template-paths-prop":e.newCommentTemplatePaths,"drawio-enabled":e.drawioEnabled,"supports-quick-actions":e.supportsQuickActions,"data-testid":"markdownHeader","restricted-tool-bar-items":e.restrictedToolBarItems},on:{showPreview:e.showPreview,hidePreview:e.hidePreview,handleSuggestDismissed:function(){return e.$emit("handleSuggestDismissed")}},scopedSlots:e._u([{key:"header-buttons",fn:function(){return[e._t("header-buttons")]},proxy:!0}],null,!0)}),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:!e.previewMarkdown,expression:"!previewMarkdown"}],staticClass:"md-write-holder"},[t("div",{staticClass:"zen-backdrop"},[e._t("textarea"),e._v(" "),t("a",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.placement.left",modifiers:{placement:!0,left:!0}}],staticClass:"zen-control zen-control-leave js-zen-leave gl-button btn-default-tertiary btn-icon btn-sm",attrs:{href:"#",title:e.__("Exit full screen"),"aria-label":e.__("Exit full screen")}},[t("gl-icon",{attrs:{variant:"subtle",size:24,name:"minimize"}})],1),e._v(" "),t("markdown-toolbar",{attrs:{"markdown-docs-path":e.markdownDocsPath,"can-attach-file":e.canAttachFile,"show-comment-tool-bar":e.showCommentToolBar,"show-content-editor-switcher":e.showContentEditorSwitcher},on:{enableContentEditor:function(t){return e.$emit("enableContentEditor")}},scopedSlots:e._u([{key:"toolbar",fn:function(){return[e._t("toolbar")]},proxy:!0}],null,!0)})],2)]),e._v(" "),t("div",{directives:[{name:"show",rawName:"v-show",value:e.previewMarkdown,expression:"previewMarkdown"}],ref:"markdown-preview",staticClass:"js-vue-md-preview md-preview-holder gl-px-5"},[e.hasSuggestion?t("suggestions",{attrs:{"note-html":e.markdownPreview,"line-type":e.lineType,disabled:!0,suggestions:e.suggestions,"help-page-path":e.helpPagePath}}):[t("div",{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfig]",value:e.markdownPreview,expression:"markdownPreview",arg:e.$options.safeHtmlConfig}],staticClass:"md"})]],2),e._v(" "),e.referencedCommands&&e.previewMarkdown&&!e.markdownPreviewLoading?t("div",{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfig]",value:e.referencedCommands,expression:"referencedCommands",arg:e.$options.safeHtmlConfig}],staticClass:"referenced-commands gl-mx-2 gl-mb-2 gl-rounded-bl-base gl-rounded-br-base gl-px-4",attrs:{"data-testid":"referenced-commands"}}):e._e(),e._v(" "),e.shouldShowReferencedUsers?t("div",{staticClass:"referenced-users"},[t("gl-icon",{attrs:{name:"warning-solid"}}),e._v(" "),t("span",{directives:[{name:"safe-html",rawName:"v-safe-html:[$options.safeHtmlConfig]",value:e.addMultipleToDiscussionWarning,expression:"addMultipleToDiscussionWarning",arg:e.$options.safeHtmlConfig}]})],1):e._e()],1)}),[],!1,null,null,null);t.a=Y.exports},KAYR:function(e,t,i){"use strict";i("ZzK0"),i("z6RN"),i("BzOf");var n=i("ewH8"),a=i("Mp8J"),s=i("jlnU"),o=i("/lV4");i("B++/"),i("47t/"),i("3UXl"),i("iyoE"),i("UezY"),i("hG7+");function r(e){return e?e.replace(/^( |\+|-)/,""):e}function l(e){return e.filter((function(e){return"match"!==e.type})).map((function(e){return function(e={}){return{...e,text:r(e.text),rich_text:r(e.rich_text)}}(e)}))}var d=i("Lzak"),c=i("4lAS"),u=i("FkSe"),g=i("z1xw"),p=i("xRSn"),m=i("NmEs"),h=i("Bo17"),f=i("F6ad"),w=i("47in"),v=i("dsWN"),b={components:{GlDisclosureDropdown:h.a,GlForm:f.a,GlFormTextarea:w.a,GlButton:c.a,GlAlert:v.a},props:{disabled:{type:Boolean,required:!1,default:!1},defaultCommitMessage:{type:String,required:!1,default:null},batchSuggestionsCount:{type:Number,required:!1,default:0},errorMessage:{type:String,required:!1,default:null}},data:()=>({message:null}),computed:{dropdownText(){return this.batchSuggestionsCount<=1?Object(o.a)("Apply suggestion"):Object(o.g)("Apply %d suggestion","Apply %d suggestions",this.batchSuggestionsCount)},helperText(){return this.batchSuggestionsCount<=1?Object(o.a)("This also resolves this thread"):Object(o.a)("This also resolves all related threads")}},methods:{onApply(){this.$emit("apply",this.message)},focusCommitMessageInput(){this.$refs.commitMessage.$el.focus()}}},y=i("tBpV"),_=Object(y.a)(b,(function(){var e=this,t=e._self._c;return t("gl-disclosure-dropdown",{attrs:{"data-testid":"apply-suggestion-dropdown","fluid-width":"",placement:"bottom-end",size:"small",disabled:e.disabled,"toggle-text":e.dropdownText},on:{shown:e.focusCommitMessageInput}},[t("gl-form",{staticClass:"!gl-mx-0 !gl-my-2 gl-flex gl-flex-col !gl-px-4"},[t("label",{attrs:{for:"commit-message"}},[e._v(e._s(e.__("Commit message")))]),e._v(" "),e.errorMessage?t("gl-alert",{staticClass:"gl-mb-4",attrs:{variant:"danger",dismissible:!1}},[e._v("\n      "+e._s(e.errorMessage)+"\n    ")]):e._e(),e._v(" "),t("gl-form-textarea",{ref:"commitMessage",staticClass:"apply-suggestions-input-min-width",attrs:{id:"commit-message",placeholder:e.defaultCommitMessage,"submit-on-enter":"","data-testid":"commit-message-field","no-resize":""},on:{submit:e.onApply},model:{value:e.message,callback:function(t){e.message=t},expression:"message"}}),e._v(" "),t("span",{staticClass:"gl-mt-2 gl-text-subtle"},[e._v("\n      "+e._s(e.helperText)+"\n    ")]),e._v(" "),t("gl-button",{staticClass:"gl-mt-3 !gl-w-auto gl-self-end",attrs:{category:"primary",variant:"confirm","data-testid":"commit-with-custom-message-button"},on:{click:e.onApply}},[e._v("\n      "+e._s(e.__("Apply"))+"\n    ")])],1)],1)}),[],!1,null,null,null).exports;const k=Object(o.a)("Unable to fully load the default commit message. You can still apply this suggestion and the commit message will be correct.");var S={components:{GlBadge:d.a,GlButton:c.a,GlLoadingIcon:u.a,ApplySuggestion:_,HelpIcon:p.a},directives:{GlTooltip:g.a},props:{batchSuggestionsCount:{type:Number,required:!1,default:0},canApply:{type:Boolean,required:!1,default:!1},isApplied:{type:Boolean,required:!0,default:!1},isBatched:{type:Boolean,required:!1,default:!1},isApplyingBatch:{type:Boolean,required:!1,default:!1},helpPagePath:{type:String,required:!0},defaultCommitMessage:{type:String,required:!1,default:null},inapplicableReason:{type:String,required:!1,default:null},suggestionsCount:{type:Number,required:!1,default:0},failedToLoadMetadata:{type:Boolean,required:!1,default:!1}},data:()=>({isApplyingSingle:!1}),computed:{isApplying(){return this.isApplyingSingle||this.isApplyingBatch},tooltipMessage(){return!this.canApply&&this.inapplicableReason},isDisableButton(){return this.isApplying||!this.canApply},applyingSuggestionsMessage(){return this.isApplyingSingle||this.batchSuggestionsCount<2?Object(o.a)("Applying suggestion…"):Object(o.a)("Applying suggestions…")},isLoggedIn:()=>Object(m.B)(),showApplySuggestion(){return!!this.isLoggedIn&&!(this.batchSuggestionsCount>=1&&!this.isBatched)},applySuggestionErrorMessage(){return this.failedToLoadMetadata?k:null}},methods:{apply(e){this.batchSuggestionsCount>1?this.applySuggestionBatch(e):this.applySuggestion(e)},applySuggestion(e){this.canApply&&(this.isApplyingSingle=!0,this.$emit("apply",this.applySuggestionCallback,e))},applySuggestionCallback(){this.isApplyingSingle=!1},applySuggestionBatch(e){this.canApply&&this.$emit("applyBatch",e)},addSuggestionToBatch(){this.$emit("addToBatch")},removeSuggestionFromBatch(){this.$emit("removeFromBatch")}}},x=Object(y.a)(S,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"md-suggestion-header border-bottom-0 gl-flex-col gl-items-start gl-gap-3 gl-px-4 gl-py-3 sm:gl-flex-row sm:gl-flex-wrap"},[t("div",{staticClass:"js-suggestion-diff-header gl-font-bold"},[e._v("\n    "+e._s(e.__("Suggested change"))+"\n    "),e.helpPagePath?t("a",{staticClass:"js-help-btn",attrs:{href:e.helpPagePath,"aria-label":e.__("Help")}},[t("help-icon")],1):e._e()]),e._v(" "),e.isApplied?t("gl-badge",{attrs:{variant:"success","data-testid":"applied-badge"}},[e._v("\n    "+e._s(e.__("Applied"))+"\n  ")]):e.isApplying?t("div",{staticClass:"gl-flex gl-items-center gl-text-subtle",attrs:{"data-testid":"applying-badge"}},[t("gl-loading-icon",{staticClass:"gl-mr-3 gl-items-center gl-justify-center",attrs:{size:"sm"}}),e._v(" "),t("span",[e._v(e._s(e.applyingSuggestionsMessage))])],1):e.isLoggedIn?t("div",{staticClass:"gl-flex gl-flex-wrap gl-items-center gl-gap-3"},[e.isBatched?t("div",[t("gl-button",{staticClass:"js-remove-from-batch-btn",attrs:{disabled:e.isApplying,size:"small"},on:{click:e.removeSuggestionFromBatch}},[e._v("\n        "+e._s(e.__("Remove from batch"))+"\n      ")])],1):!e.isDisableButton&&e.suggestionsCount>1?t("div",[t("gl-button",{staticClass:"js-add-to-batch-btn",attrs:{"data-testid":"add-suggestion-batch-button",disabled:e.isDisableButton,size:"small"},on:{click:e.addSuggestionToBatch}},[e._v("\n        "+e._s(e.__("Add suggestion to batch"))+"\n      ")])],1):e._e(),e._v(" "),e.showApplySuggestion?t("apply-suggestion",{directives:[{name:"gl-tooltip",rawName:"v-gl-tooltip.viewport",value:e.tooltipMessage,expression:"tooltipMessage",modifiers:{viewport:!0}}],attrs:{disabled:e.isDisableButton,"default-commit-message":e.defaultCommitMessage,"batch-suggestions-count":e.batchSuggestionsCount,"error-message":e.applySuggestionErrorMessage},on:{apply:e.apply}}):e._e()],1):e._e()],1)}),[],!1,null,null,null).exports,C={name:"SuggestionDiffRow",directives:{SafeHtml:a.a},props:{line:{type:Object,required:!0}},computed:{displayAsCell(){return!(this.line.rich_text||this.line.text)},lineType(){return this.line.type}}},A={components:{SuggestionDiffHeader:x,SuggestionDiffRow:Object(y.a)(C,(function(){var e=this,t=e._self._c;return t("tr",{staticClass:"line_holder",class:e.lineType},[t("td",{staticClass:"diff-line-num old_line border-top-0 border-bottom-0",class:e.lineType},[e._v("\n    "+e._s(e.line.old_line)+"\n  ")]),e._v(" "),t("td",{staticClass:"diff-line-num new_line border-top-0 border-bottom-0",class:e.lineType},[e._v("\n    "+e._s(e.line.new_line)+"\n  ")]),e._v(" "),t("td",{staticClass:"line_content",class:[{"d-table-cell":e.displayAsCell},e.lineType],attrs:{"data-testid":"suggestion-diff-content"}},[e.line.rich_text?t("span",{directives:[{name:"safe-html",rawName:"v-safe-html",value:e.line.rich_text,expression:"line.rich_text"}],staticClass:"line"}):e.line.text?t("span",{staticClass:"line"},[e._v(e._s(e.line.text))]):t("span",{staticClass:"line"})])])}),[],!1,null,null,null).exports},props:{suggestion:{type:Object,required:!0},batchSuggestionsInfo:{type:Array,required:!1,default:function(){return[]}},disabled:{type:Boolean,required:!1,default:!1},helpPagePath:{type:String,required:!0},defaultCommitMessage:{type:String,required:!0},suggestionsCount:{type:Number,required:!1,default:0},failedToLoadMetadata:{type:Boolean,required:!1,default:!1}},computed:{batchSuggestionsCount(){return this.batchSuggestionsInfo.length},isBatched(){var e=this;return Boolean(this.batchSuggestionsInfo.find((function({suggestionId:t}){return t===e.suggestion.id})))},lines(){return l(this.suggestion.diff_lines)}},methods:{applySuggestion(e,t){this.$emit("apply",{suggestionId:this.suggestion.id,callback:e,message:t})},applySuggestionBatch(e){this.$emit("applyBatch",e)},addSuggestionToBatch(){this.$emit("addToBatch",this.suggestion.id)},removeSuggestionFromBatch(){this.$emit("removeFromBatch",this.suggestion.id)}}},M=Object(y.a)(A,(function(){var e=this,t=e._self._c;return t("div",{staticClass:"md-suggestion"},[t("suggestion-diff-header",{staticClass:"js-suggestion-diff-header",attrs:{"suggestions-count":e.suggestionsCount,"can-apply":e.suggestion.appliable&&e.suggestion.current_user.can_apply&&!e.disabled,"is-applied":e.suggestion.applied,"is-batched":e.isBatched,"is-applying-batch":e.suggestion.is_applying_batch,"batch-suggestions-count":e.batchSuggestionsCount,"help-page-path":e.helpPagePath,"default-commit-message":e.defaultCommitMessage,"inapplicable-reason":e.suggestion.inapplicable_reason,"failed-to-load-metadata":e.failedToLoadMetadata},on:{apply:e.applySuggestion,applyBatch:e.applySuggestionBatch,addToBatch:e.addSuggestionToBatch,removeFromBatch:e.removeSuggestionFromBatch}}),e._v(" "),t("table",{staticClass:"mb-3 md-suggestion-diff js-syntax-highlight code"},[t("tbody",e._l(e.lines,(function(e,i){return t("suggestion-diff-row",{key:`${i}-${e.text}`,attrs:{line:e}})})),1)])],1)}),[],!1,null,null,null).exports,T={directives:{SafeHtml:a.a},props:{lineType:{type:String,required:!1,default:""},suggestions:{type:Array,required:!1,default:function(){return[]}},batchSuggestionsInfo:{type:Array,required:!1,default:function(){return[]}},noteHtml:{type:String,required:!0},disabled:{type:Boolean,required:!1,default:!1},helpPagePath:{type:String,required:!0},defaultCommitMessage:{type:String,required:!1,default:null},suggestionsCount:{type:Number,required:!1,default:0},failedToLoadMetadata:{type:Boolean,required:!1,default:!1}},data:()=>({isRendered:!1}),watch:{suggestions(){this.reset()},noteHtml(){this.reset()},failedToLoadMetadata(){this.reset()}},mounted(){this.renderSuggestions()},beforeDestroy(){this.suggestionsWatch&&this.suggestionsWatch(),this.defaultCommitMessageWatch&&this.defaultCommitMessageWatch()},methods:{renderSuggestions(){var e=this;if(!this.noteHtml)return;const{container:t}=this.$refs,i=t.querySelectorAll(".js-render-suggestion");"old"===this.lineType&&Object(s.createAlert)({message:Object(o.a)("Unable to apply suggestions to a deleted line."),parent:this.$el}),i.forEach((function(t,i){const n=t.parentElement;e.generateDiff(i).$mount(n)})),this.isRendered=!0},generateDiff(e){var t=this;const{suggestions:i,disabled:a,batchSuggestionsInfo:s,helpPagePath:o,defaultCommitMessage:r,suggestionsCount:l,failedToLoadMetadata:d}=this,c=i&&i[e]?i[e]:{},u=new(n.default.extend(M))({propsData:{disabled:a,suggestion:c,batchSuggestionsInfo:s,helpPagePath:o,defaultCommitMessage:r||"",suggestionsCount:l,failedToLoadMetadata:d}});return this.suggestionsWatch=this.$watch("suggestionsCount",(function(){u.suggestionsCount=t.suggestionsCount})),this.defaultCommitMessageWatch=this.$watch("defaultCommitMessage",(function(){u.defaultCommitMessage=t.defaultCommitMessage})),u.$on("apply",(function({suggestionId:e,callback:i,message:n}){t.$emit("apply",{suggestionId:e,callback:i,flashContainer:t.$el,message:n})})),u.$on("applyBatch",(function(e){t.$emit("applyBatch",{message:e,flashContainer:t.$el})})),u.$on("addToBatch",(function(e){t.$emit("addToBatch",e)})),u.$on("removeFromBatch",(function(e){t.$emit("removeFromBatch",e)})),u},reset(){var e=this;this.$refs.container.innerHTML=this.noteHtml,this.isRendered=!1,this.renderSuggestions(),this.$nextTick((function(){return e.renderSuggestions()}))}}},B=Object(y.a)(T,(function(){var e=this._self._c;return e("div",[e("div",{staticClass:"flash-container js-suggestions-flash gl-whitespace-pre-line"}),this._v(" "),e("div",{directives:[{name:"show",rawName:"v-show",value:this.isRendered,expression:"isRendered"},{name:"safe-html",rawName:"v-safe-html",value:this.noteHtml,expression:"noteHtml"}],ref:"container",staticClass:"md suggestions",attrs:{"data-testid":"suggestions-container"}})])}),[],!1,null,null,null);t.a=B.exports},nuxI:function(e,t){var i={kind:"Document",definitions:[{kind:"OperationDefinition",operation:"query",name:{kind:"Name",value:"getSavedReplies"},variableDefinitions:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"currentUser"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"savedReplies"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"nodes"},arguments:[],directives:[],selectionSet:{kind:"SelectionSet",selections:[{kind:"Field",name:{kind:"Name",value:"id"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"name"},arguments:[],directives:[]},{kind:"Field",name:{kind:"Name",value:"content"},arguments:[],directives:[]}]}}]}}]}}]}}],loc:{start:0,end:140}};i.loc.source={body:"query getSavedReplies {\n  currentUser {\n    id\n    savedReplies {\n      nodes {\n        id\n        name\n        content\n      }\n    }\n  }\n}\n",name:"GraphQL request",locationOffset:{line:1,column:1}};var n={};function a(e,t){for(var i=0;i<e.definitions.length;i++){var n=e.definitions[i];if(n.name&&n.name.value==t)return n}}i.definitions.forEach((function(e){if(e.name){var t=new Set;!function e(t,i){if("FragmentSpread"===t.kind)i.add(t.name.value);else if("VariableDefinition"===t.kind){var n=t.type;"NamedType"===n.kind&&i.add(n.name.value)}t.selectionSet&&t.selectionSet.selections.forEach((function(t){e(t,i)})),t.variableDefinitions&&t.variableDefinitions.forEach((function(t){e(t,i)})),t.definitions&&t.definitions.forEach((function(t){e(t,i)}))}(e,t),n[e.name.value]=t}})),e.exports=i,e.exports.getSavedReplies=function(e,t){var i={kind:e.kind,definitions:[a(e,t)]};e.hasOwnProperty("loc")&&(i.loc=e.loc);var s=n[t]||new Set,o=new Set,r=new Set;for(s.forEach((function(e){r.add(e)}));r.size>0;){var l=r;r=new Set,l.forEach((function(e){o.has(e)||(o.add(e),(n[e]||new Set).forEach((function(e){r.add(e)})))}))}return o.forEach((function(t){var n=a(e,t);n&&i.definitions.push(n)})),i}(i,"getSavedReplies")},w3AR:function(e,t,i){"use strict";i.d(t,"a",(function(){return r})),i.d(t,"b",(function(){return l})),i.d(t,"c",(function(){return d}));var n=i("htNe"),a=i.n(n),s=(i("UezY"),i("z6RN"),i("hG7+"),i("YsOi")),o=i.n(s);const r=function(e,t,i){return Math.max(Math.min(e,i),t)},l=a()((async function(e){const{data:t}=await o()(e,{responseType:"blob"});return t.text()})),d=function(...e){const t=e.filter((function(e){return e}));if(!t.length)return new DOMRect(-1e3,-1e3,0,0);if(1===t.length)return t[0];let i=1/0,n=1/0,a=-1/0,s=-1/0;for(const e of t)i=Math.min(i,e.left),n=Math.min(n,e.top),a=Math.max(a,e.right),s=Math.max(s,e.bottom);return new DOMRect(i,n,a-i,s-n)}}}]);
//# sourceMappingURL=commons-pages.admin.abuse_reports.show-pages.admin.topics.edit-pages.admin.topics.new-pages.groups.i-7f78ce46.21feedca.chunk.js.map