text: (window.webpackJsonp=window.webpackJsonp||[]).push([[287],{1017:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(13),s=n(176),o=n(669);function a(e){var t,n=e.diff;if("file"===n.key)return r.createElement("p",null,Object(s.translateWithParameters)("issue.change.file_move",n.oldValue||"",n.newValue||""));if(["from_long_branch","from_branch"].includes(n.key))return r.createElement("p",null,Object(s.translateWithParameters)("issue.change.from_branch",n.oldValue||"",n.newValue||""));if("from_short_branch"===n.key)return r.createElement("p",null,Object(s.translateWithParameters)("issue.change.from_non_branch",n.oldValue||"",n.newValue||""));if("line"===n.key)return r.createElement("p",null,Object(s.translateWithParameters)("issue.changelog.line_removed_X",n.oldValue||""));if(null!=n.newValue){var a=n.newValue;"effort"===n.key&&(a=Object(o.formatMeasure)(n.newValue,"WORK_DUR")),t=Object(s.translateWithParameters)("issue.changelog.changed_to",Object(s.translate)("issue.changelog.field",n.key),a)}else t=Object(s.translateWithParameters)("issue.changelog.removed",Object(s.translate)("issue.changelog.field",n.key));if(null!=n.oldValue){var i=n.oldValue;"effort"===n.key&&(i=Object(o.formatMeasure)(n.oldValue,"WORK_DUR")),t+=" ("+Object(s.translateWithParameters)("issue.changelog.was",i)+")"}return r.createElement("p",null,t)}},1061:function(e,t,n){var r=n(662),s=n(1062);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);var o={insert:"head",singleton:!1},a=(r(s,o),s.locals?s.locals:{});e.exports=a},1062:function(e,t,n){(t=n(663)(!1)).push([e.i,".location-index{position:relative;display:inline-block;vertical-align:top;line-height:16px;padding-left:6px;padding-right:6px;border-radius:2px;background-color:#d18582;color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;transition:background-color .3s ease;-webkit-user-select:none;-ms-user-select:none;user-select:none}.location-index.selected{background-color:#a4030f}.location-index.muted{background-color:#cdcdcd}.location-index.is-leading:first-child{margin-left:0}.location-index.is-leading:not(:first-child){margin-left:-22px}.location-index[tabindex]{cursor:pointer}.location-index[tabindex]:hover,a:hover>.location-index{background-color:#a4030f}.location-index[tabindex]:focus{outline:none}.source-line-code-inner .location-index{line-height:16px;margin:1px 4px}.source-line-code-inner .location-index+.location-index{margin-left:0}",""]),e.exports=t},1063:function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(660),s=n(13);n(1064);function o(e){return s.createElement("div",{className:r("location-message",{selected:e.selected})},e.children)}},1064:function(e,t,n){var r=n(662),s=n(1065);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);var o={insert:"head",singleton:!1},a=(r(s,o),s.locals?s.locals:{});e.exports=a},1065:function(e,t,n){(t=n(663)(!1)).push([e.i,'.location-message{display:inline-block;vertical-align:top;line-height:16px;padding:0 6px;border-radius:2px;background-color:#9e9e9e;color:#fff;font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:12px;text-overflow:ellipsis;overflow:hidden;transition:background-color .3s ease}.location-message.selected{background-color:#475760}.location-index+.location-message{margin-left:4px}.location-index>.location-message{display:none;position:absolute;bottom:calc(100% + 4px);left:0}.location-index:hover>.location-message{display:block}.location-index>.location-message:after{position:absolute;bottom:-5px;left:4px;width:0;height:0;border-top:5px solid #475760;border-left:5px solid transparent;border-right:5px solid transparent;content:""}.source-line-code .location-message{padding-top:2px;padding-bottom:2px}',""]),e.exports=t},1066:function(e,t,n){var r=n(662),s=n(1067);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);var o={insert:"head",singleton:!1},a=(r(s,o),s.locals?s.locals:{});e.exports=a},1067:function(e,t,n){(t=n(663)(!1)).push([e.i,'.issue{position:relative;padding-top:8px;padding-bottom:8px;background-color:#f2dede;transition:all .3s ease,border 0s ease}.issue.hotspot{background-color:#eeeff4}.issue.selected{box-shadow:none;outline:none;border:2px solid #4b9fd5!important}.issue+.issue,.issue-container+.issue-container{margin-top:5px}.issue.selected+.issue{border-top-color:transparent}.issue-row{display:flex;margin-bottom:5px}.issue-row-meta{flex-grow:0;padding-right:5px;white-space:nowrap}.issue-message{flex-grow:1;padding-left:8px;padding-right:8px;line-height:18px;font-size:13px;font-weight:600;text-overflow:ellipsis}.issue-actions{justify-content:space-between;flex-wrap:wrap;padding-left:8px}.issue-actions,.issue-meta-list{display:flex;align-items:center}.issue-meta{line-height:16px;font-size:12px}.issue-meta+.issue-meta{margin-left:8px}.issue-meta-label{display:inline-block;vertical-align:top;max-width:180px;line-height:16px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.issue-see-rule{border-bottom:none;font-size:12px}.issue-changelog{width:450px;max-height:320px;overflow:auto;white-space:normal}.issue-comments{margin-top:5px;padding-left:8px;font-size:12px}.issue-comment{display:flex}.issue-comment+.issue-comment{margin-top:4px}.issue-comment-author{max-width:130px;font-weight:600;overflow:hidden;text-overflow:ellipsis}.issue-comment-age,.issue-comment-author{flex-shrink:0;line-height:18px;color:#777;white-space:nowrap}.issue-comment-text{flex:1;min-width:0;margin-left:5px;margin-right:5px;line-height:18px;line-height:1.5;overflow:hidden;outline:none;word-break:break-all}.issue-comment-text.markdown pre{float:none;height:auto;margin:0;padding:8px;background-color:#e6e6e6;border:none;border-radius:3px}.issue-comment-text.markdown br~pre{margin-top:8px}.issue-comment-actions{flex-shrink:0;padding-left:5px;line-height:18px;white-space:nowrap}.issue-comment-bubble-popup{width:440px;font-size:12px}.issue-comment-form-text textarea{width:100%;max-width:100%}.issue-comment-form-footer{margin-top:5px;line-height:22px}.issue-comment-form-footer:after,.issue-comment-form-footer:before{display:table;content:"";line-height:0}.issue-comment-form-footer:after{clear:both}.issue-comment-form-actions{float:right}.issue-comment-form-tips{float:left}.issue-with-checkbox{padding-left:24px}.issue-with-checkbox .issue-checkbox-container{display:flex;justify-content:center;align-items:center}.issue-checkbox-container{display:none;position:absolute;width:28px;top:0;bottom:0;left:0;border:none}.issue-checkbox-container:hover{background-color:rgba(0,0,0,.05)}.issue:not(.selected) .location-index{background-color:#999}.issue .menu:not(.issues-similar-issues-menu):not(.issue-changelog){max-height:120px;overflow:auto}',""]),e.exports=t},1068:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var o=n(13),a=n(664),i={open:l,confirmed:c,reopened:function(e){return o.createElement(a.ThemedIcon,r({},e),(function(e){var t=e.theme;return o.createElement("path",{d:"M8 12.25v-8.5c-.77 0-1.482.19-2.133.57A4.25 4.25 0 0 0 4.32 5.867c-.38.65-.57 1.362-.57 2.133 0 .77.19 1.482.57 2.133.38.65.896 1.167 1.547 1.547.65.38 1.362.57 2.133.57zM14 8c0 1.09-.268 2.092-.805 3.012a5.96 5.96 0 0 1-2.183 2.183A5.863 5.863 0 0 1 8 14a5.863 5.863 0 0 1-3.012-.805 5.96 5.96 0 0 1-2.183-2.183A5.863 5.863 0 0 1 2 8c0-1.09.268-2.092.805-3.012a5.96 5.96 0 0 1 2.183-2.183A5.863 5.863 0 0 1 8 2c1.09 0 2.092.268 3.012.805a5.96 5.96 0 0 1 2.183 2.183C13.732 5.908 14 6.91 14 8z",style:{fill:t.colors.blue}})}))},resolved:u,closed:function(e){return o.createElement(a.ThemedIcon,r({},e),(function(e){var t=e.theme;return o.createElement("path",{d:"M14 8c0 1.09-.268 2.092-.805 3.012a5.96 5.96 0 0 1-2.183 2.183A5.863 5.863 0 0 1 8 14a5.863 5.863 0 0 1-3.012-.805 5.96 5.96 0 0 1-2.183-2.183A5.863 5.863 0 0 1 2 8c0-1.09.268-2.092.805-3.012a5.96 5.96 0 0 1 2.183-2.183A5.863 5.863 0 0 1 8 2c1.09 0 2.092.268 3.012.805a5.96 5.96 0 0 1 2.183 2.183C13.732 5.908 14 6.91 14 8z",style:{fill:t.colors.baseFontColor}})}))},to_review:l,in_review:c,reviewed:u};function l(e){return o.createElement(a.ThemedIcon,r({},e),(function(e){var t=e.theme;return o.createElement("path",{d:"M8 3.75c-.77 0-1.482.19-2.133.57A4.25 4.25 0 0 0 4.32 5.867c-.38.65-.57 1.362-.57 2.133 0 .77.19 1.482.57 2.133.38.65.896 1.167 1.547 1.547.65.38 1.362.57 2.133.57.77 0 1.482-.19 2.133-.57a4.242 4.242 0 0 0 1.547-1.547c.38-.65.57-1.362.57-2.133 0-.77-.19-1.482-.57-2.133a4.25 4.25 0 0 0-1.547-1.547A4.153 4.153 0 0 0 8 3.75zM14 8c0 1.09-.268 2.092-.805 3.012a5.96 5.96 0 0 1-2.183 2.183A5.863 5.863 0 0 1 8 14a5.863 5.863 0 0 1-3.012-.805 5.96 5.96 0 0 1-2.183-2.183A5.863 5.863 0 0 1 2 8c0-1.09.268-2.092.805-3.012a5.96 5.96 0 0 1 2.183-2.183A5.863 5.863 0 0 1 8 2c1.09 0 2.092.268 3.012.805a5.96 5.96 0 0 1 2.183 2.183C13.732 5.908 14 6.91 14 8z",style:{fill:t.colors.blue}})}))}function c(e){return o.createElement(a.ThemedIcon,r({},e),(function(e){var t=e.theme;return o.createElement("path",{d:"M10 8c0 .552-.195 1.023-.586 1.414-.39.39-.862.586-1.414.586a1.926 1.926 0 0 1-1.414-.586A1.928 1.928 0 0 1 6 8c0-.552.195-1.023.586-1.414C6.976 6.196 7.448 6 8 6c.552 0 1.023.195 1.414.586.39.39.586.862.586 1.414zM8 3.75c-.77 0-1.482.19-2.133.57A4.25 4.25 0 0 0 4.32 5.867c-.38.65-.57 1.362-.57 2.133 0 .77.19 1.482.57 2.133.38.65.896 1.167 1.547 1.547.65.38 1.362.57 2.133.57.77 0 1.482-.19 2.133-.57a4.242 4.242 0 0 0 1.547-1.547c.38-.65.57-1.362.57-2.133 0-.77-.19-1.482-.57-2.133a4.25 4.25 0 0 0-1.547-1.547A4.153 4.153 0 0 0 8 3.75zM14 8c0 1.09-.268 2.092-.805 3.012a5.96 5.96 0 0 1-2.183 2.183A5.863 5.863 0 0 1 8 14a5.863 5.863 0 0 1-3.012-.805 5.96 5.96 0 0 1-2.183-2.183A5.863 5.863 0 0 1 2 8c0-1.09.268-2.092.805-3.012a5.96 5.96 0 0 1 2.183-2.183A5.863 5.863 0 0 1 8 2c1.09 0 2.092.268 3.012.805a5.96 5.96 0 0 1 2.183 2.183C13.732 5.908 14 6.91 14 8z",style:{fill:t.colors.blue}})}))}function u(e){return o.createElement(a.ThemedIcon,r({},e),(function(e){var t=e.theme;return o.createElement("path",{d:"M12.03 6.734a.49.49 0 0 0-.14-.36l-.71-.702a.48.48 0 0 0-.352-.15.474.474 0 0 0-.35.15l-3.19 3.18-1.765-1.766a.479.479 0 0 0-.35-.15.479.479 0 0 0-.353.15l-.71.703a.482.482 0 0 0-.14.358c0 .14.046.258.14.352l2.828 2.828c.098.1.216.15.35.15.142 0 .26-.05.36-.15l4.243-4.242a.475.475 0 0 0 .14-.352l-.001.001zM14 8c0 1.09-.268 2.092-.805 3.012a5.96 5.96 0 0 1-2.183 2.183A5.863 5.863 0 0 1 8 14a5.863 5.863 0 0 1-3.012-.805 5.96 5.96 0 0 1-2.183-2.183A5.863 5.863 0 0 1 2 8c0-1.09.268-2.092.805-3.012a5.96 5.96 0 0 1 2.183-2.183A5.863 5.863 0 0 1 8 2c1.09 0 2.092.268 3.012.805a5.96 5.96 0 0 1 2.183 2.183C13.732 5.908 14 6.91 14 8z",style:{fill:t.colors.baseFontColor}})}))}t.default=function(e){var t=e.status,n=s(e,["status"]),a=i[t.toLowerCase()];return a?o.createElement(a,r({},n)):null}},1137:function(e,t,n){"use strict";var r,s=n(838),o=n(13),a=n(702),i=n(954),l=function(e,t,n,r){var s=void 0!==n&&void 0!==r;s&&e(r),t.then((function(t){if(!s){var n=Object(i.a)(t.issue,t.components,t.users,t.rules);e(n)}}),(function(){s&&e(n)}))},c=(n(1066),n(660)),u=n.n(c),p=n(691),m=n.n(p),d=n(176),h=n(661),f=n(706),g=n.n(f),v=n(683),y=n.n(v),b=n(726),E=n(700),O=n.n(E),_=n(676),x=n(699),w=n.n(x),N=n(836),j=n(783),k=n(38),C=n(686),P=n(1145),S=n.n(P),L=n(666),I=n.n(L),A=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),M=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleSelect=function(e){e.preventDefault(),t.props.onSelect&&t.props.onSelect(t.props.item)},t.handleHover=function(){t.props.onHover&&t.props.onHover(t.props.item)},t}return A(t,e),t.prototype.renderLink=function(){var e=this.props.children||this.props.item;return o.createElement("li",null,o.createElement("a",{className:u()({active:this.props.active===this.props.item},this.props.className),href:"#",onClick:this.handleSelect,onFocus:this.handleHover,onMouseOver:this.handleHover},e))},t.prototype.render=function(){return o.createElement(I.a,{overlay:this.props.title||void 0,placement:"right"},this.renderLink())},t}(o.PureComponent),T=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),B=function(e){function t(t){var n=e.call(this,t)||this;return n.attachShortcuts=function(){n.previousKeyScope=s.getScope(),n.previousFilter=s.filter,n.currentKeyScope=S()("key-scope"),s.setScope(n.currentKeyScope),s.filter=function(e){var t=(e.target||e.srcElement).tagName,n="INPUT"===t||"SELECT"===t||"TEXTAREA"===t;return[13,38,40].includes(e.keyCode)||!n},s("down",n.currentKeyScope,(function(){return n.setState(n.selectNextElement),!1})),s("up",n.currentKeyScope,(function(){return n.setState(n.selectPreviousElement),!1})),s("return",n.currentKeyScope,(function(){return null!=n.state.active&&n.handleSelect(n.state.active),!1}))},n.detachShortcuts=function(){n.previousKeyScope&&s.setScope(n.previousKeyScope),n.currentKeyScope&&s.deleteScope(n.currentKeyScope),s.filter=n.previousFilter},n.handleSelect=function(e){n.props.onSelect(e)},n.handleHover=function(e){n.setState({active:e})},n.selectNextElement=function(e,t){var n=t.items.indexOf(e.active);return n<0?{active:t.items[0]}:{active:t.items[(n+1)%t.items.length]}},n.selectPreviousElement=function(e,t){var n=t.items.indexOf(e.active);return n<=0?{active:t.items[t.items.length-1]}:{active:t.items[n-1]}},n.renderChild=function(e){return null==e?null:e.type!==M?e:o.cloneElement(e,{active:n.state.active,onHover:n.handleHover,onSelect:n.handleSelect})},n.state={active:t.currentItem},n}return T(t,e),t.prototype.componentDidMount=function(){this.attachShortcuts()},t.prototype.componentDidUpdate=function(e){e.currentItem===this.props.currentItem||this.props.items.includes(this.state.active)||this.setState({active:this.props.currentItem})},t.prototype.componentWillUnmount=function(){this.detachShortcuts()},t.prototype.render=function(){var e=this,t=this.props.children,n=o.Children.count(t)>0;return o.createElement("ul",{className:u()("menu",this.props.className)},n&&o.Children.map(t,this.renderChild),!n&&this.props.items.map((function(t){return o.createElement(M,{active:e.state.active,item:t,key:t,onHover:e.handleHover,onSelect:e.handleSelect})})))},t}(o.PureComponent),D=n(785),R=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),z=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),s=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,i=o.length;a<i;a++,s++)r[s]=o[a];return r},U=function(e){function t(t){var n=e.call(this,t)||this;return n.searchMembers=function(e){Object(N.h)({organization:n.props.issue.projectOrganization,q:e,ps:10}).then(n.handleSearchResult,(function(){}))},n.searchUsers=function(e){Object(j.f)({q:e,ps:10}).then(n.handleSearchResult,(function(){}))},n.handleSearchResult=function(e){var t=e.users.filter(C.c);n.setState({users:t,currentUser:t.length>0?t[0].login:""})},n.handleSearchChange=function(e){0===e.length?n.setState({query:e,users:n.defaultUsersArray,currentUser:n.defaultUsersArray[0].login}):(n.setState({query:e}),Object(k.isSonarCloud)()?n.searchMembers(e):n.searchUsers(e))},n.defaultUsersArray=[{login:"",name:Object(d.translate)("unassigned")}],Object(C.b)(t.currentUser)&&(n.defaultUsersArray=z([t.currentUser],n.defaultUsersArray)),n.state={query:"",users:n.defaultUsersArray,currentUser:n.defaultUsersArray.length>0?n.defaultUsersArray[0].login:""},n}return R(t,e),t.prototype.render=function(){return o.createElement(_.DropdownOverlay,{noPadding:!0},o.createElement("div",{className:"multi-select"},o.createElement("div",{className:"menu-search"},o.createElement(w.a,{autoFocus:!0,className:"little-spacer-top",minLength:2,onChange:this.handleSearchChange,placeholder:Object(d.translate)("search.search_for_users"),value:this.state.query})),o.createElement(B,{currentItem:this.state.currentUser,items:O()(this.state.users,"login"),onSelect:this.props.onSelect},this.state.users.map((function(e){return o.createElement(M,{item:e.login,key:e.login},!!e.login&&o.createElement(b.a,{className:"spacer-right",hash:e.avatar,name:e.name,size:16}),o.createElement("span",{className:"text-middle",style:{marginLeft:e.login?24:void 0}},e.name))})))))},t}(o.PureComponent),F=Object(D.a)(U),q=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),H=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toggleAssign=function(e){t.props.togglePopup("assign",e)},t.handleClose=function(){t.toggleAssign(!1)},t}return q(t,e),t.prototype.renderAssignee=function(){var e=this.props.issue,t=e.assigneeName||e.assignee;return t?o.createElement(o.Fragment,null,o.createElement("span",{className:"text-top"},o.createElement(b.a,{className:"little-spacer-right",hash:e.assigneeAvatar,name:e.assigneeName||e.assignee,size:16})),o.createElement("span",{className:"issue-meta-label"},!1===e.assigneeActive?Object(d.translateWithParameters)("user.x_deleted",t):t)):o.createElement("span",{className:"issue-meta-label"},Object(d.translate)("unassigned"))},t.prototype.render=function(){return this.props.canAssign?o.createElement("div",{className:"dropdown"},o.createElement(g.a,{closeOnEscape:!0,onRequestClose:this.handleClose,open:this.props.isOpen&&this.props.canAssign,overlay:o.createElement(F,{issue:this.props.issue,onSelect:this.props.onAssign})},o.createElement(h.ButtonLink,{className:"issue-action issue-action-with-options js-issue-assign",onClick:this.toggleAssign},this.renderAssignee(),o.createElement(y.a,{className:"little-spacer-left"})))):this.renderAssignee()},t}(o.PureComponent),K=n(817),V=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),W=function(e){function t(t){var n=e.call(this,t)||this;return n.handleCommentChange=function(e){n.setState({textComment:e.target.value})},n.handleCommentClick=function(){n.state.textComment.trim().length>0&&n.props.onComment(n.state.textComment)},n.handleCancelClick=function(){n.props.toggleComment(!1)},n.handleKeyboard=function(e){13===e.keyCode&&(e.metaKey||e.ctrlKey)?n.handleCommentClick():[37,38,39,40].includes(e.keyCode)&&e.stopPropagation()},n.state={textComment:t.comment?t.comment.markdown:""},n}return V(t,e),t.prototype.render=function(){var e=this.props,t=e.comment,n=e.autoTriggered;return o.createElement(_.DropdownOverlay,{placement:this.props.placement},o.createElement("div",{className:"issue-comment-bubble-popup"},o.createElement("div",{className:"issue-comment-form-text"},o.createElement("textarea",{autoFocus:!0,onChange:this.handleCommentChange,onKeyDown:this.handleKeyboard,placeholder:this.props.placeholder,rows:2,value:this.state.textComment})),o.createElement("div",{className:"issue-comment-form-footer"},o.createElement("div",{className:"issue-comment-form-actions"},o.createElement(h.Button,{className:"js-issue-comment-submit little-spacer-right",disabled:this.state.textComment.trim().length<1,onClick:this.handleCommentClick},t&&Object(d.translate)("save"),!t&&Object(d.translate)("issue.comment.submit")),o.createElement(h.ResetButtonLink,{className:"js-issue-comment-cancel",onClick:this.handleCancelClick},n?Object(d.translate)("skip"):Object(d.translate)("cancel"))),o.createElement("div",{className:"issue-comment-form-tips"},o.createElement(K.a,null)))))},t}(o.PureComponent),Y=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),G=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.addComment=function(e){l(t.props.onChange,Object(a.a)({issue:t.props.issueKey,text:e})),t.props.toggleComment(!1)},t.handleCommentClick=function(){t.props.toggleComment()},t.handleClose=function(){t.props.toggleComment(!1)},t}return Y(t,e),t.prototype.render=function(){return o.createElement("li",{className:"issue-meta dropdown"},o.createElement(g.a,{closeOnClickOutside:!1,onRequestClose:this.handleClose,open:"comment"===this.props.currentPopup,overlay:o.createElement(W,{autoTriggered:this.props.commentAutoTriggered,onComment:this.addComment,placeholder:this.props.commentPlaceholder,toggleComment:this.props.toggleComment})},o.createElement(h.ButtonLink,{className:"issue-action js-issue-comment",onClick:this.handleCommentClick},o.createElement("span",{className:"issue-meta-label"},Object(d.translate)("issue.comment.formlink")))))},t}(o.PureComponent),Q=n(728),X=n(818),J=n.n(X),Z=["BLOCKER","CRITICAL","MAJOR","MINOR","INFO"];function $(e){var t=e.issue,n=e.onSelect;return o.createElement(_.DropdownOverlay,null,o.createElement(B,{currentItem:t.severity,items:Z,onSelect:n},Z.map((function(e){return o.createElement(M,{className:"display-flex-center",item:e,key:e},o.createElement(J.a,{className:"little-spacer-right",severity:e}),Object(d.translate)("severity",e))}))))}var ee=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),te=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toggleSetSeverity=function(e){t.props.togglePopup("set-severity",e)},t.setSeverity=function(e){t.props.setIssueProperty("severity","set-severity",a.m,e)},t.handleClose=function(){t.toggleSetSeverity(!1)},t}return ee(t,e),t.prototype.render=function(){var e=this.props.issue;return this.props.canSetSeverity?o.createElement("div",{className:"dropdown"},o.createElement(g.a,{onRequestClose:this.handleClose,open:this.props.isOpen&&this.props.canSetSeverity,overlay:o.createElement($,{issue:e,onSelect:this.setSeverity})},o.createElement(h.ButtonLink,{className:"issue-action issue-action-with-options js-issue-set-severity",onClick:this.toggleSetSeverity},o.createElement(Q.a,{className:"issue-meta-label",severity:e.severity}),o.createElement(y.a,{className:"little-spacer-left"})))):o.createElement(Q.a,{className:"issue-meta-label",severity:e.severity})},t}(o.PureComponent),ne=n(815),re=n(719),se=n.n(re),oe=n(739),ae=n.n(oe),ie=n(717),le=n(872),ce=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ue=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),s=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,i=o.length;a<i;a++,s++)r[s]=o[a];return r},pe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mounted=!1,t.state={searchResult:[]},t.onSearch=function(e){return Object(a.j)({q:e,ps:Math.min(t.props.selectedTags.length-1+10,100),organization:t.props.organization}).then((function(e){t.mounted&&t.setState({searchResult:e})}),(function(){}))},t.onSelect=function(e){t.props.setTags(ue(t.props.selectedTags,[e]))},t.onUnselect=function(e){t.props.setTags(se()(t.props.selectedTags,e))},t}return ce(t,e),t.prototype.componentDidMount=function(){this.mounted=!0},t.prototype.componentWillUnmount=function(){this.mounted=!1},t.prototype.render=function(){var e=ae()(this.state.searchResult,this.props.selectedTags);return o.createElement(_.DropdownOverlay,{placement:ie.PopupPlacement.BottomRight},o.createElement(le.a,{listSize:10,onSearch:this.onSearch,onSelect:this.onSelect,onUnselect:this.onUnselect,selectedTags:this.props.selectedTags,tags:e}))},t}(o.PureComponent),me=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),de=function(){return(de=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},he=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toggleSetTags=function(e){t.props.togglePopup("edit-tags",e)},t.setTags=function(e){var n=t.props.issue,r=de(de({},n),{tags:e});l(t.props.onChange,Object(a.n)({issue:n.key,tags:e.join(",")}),n,r)},t.handleClose=function(){t.toggleSetTags(!1)},t}return me(t,e),t.prototype.render=function(){var e=this.props.issue,t=e.tags,n=void 0===t?[]:t;return this.props.canSetTags?o.createElement("div",{className:"dropdown"},o.createElement(g.a,{onRequestClose:this.handleClose,open:this.props.isOpen,overlay:o.createElement(pe,{organization:e.projectOrganization,selectedTags:n,setTags:this.setTags})},o.createElement(h.ButtonLink,{className:"issue-action issue-action-with-options js-issue-edit-tags",onClick:this.toggleSetTags},o.createElement(ne.a,{allowUpdate:this.props.canSetTags,tags:e.tags&&e.tags.length>0?e.tags:[Object(d.translate)("issue.no_tag")]})))):o.createElement(ne.a,{allowUpdate:this.props.canSetTags,className:"note",tags:e.tags&&e.tags.length>0?e.tags:[Object(d.translate)("issue.no_tag")]})},t}(o.PureComponent),fe=n(907);function ge(e){var t=e.fromHotspot,n=e.onSelect,r=e.transitions,s=e.type,a=t&&"VULNERABILITY"===s;return o.createElement(_.DropdownOverlay,null,o.createElement(B,{currentItem:r[0],items:r,onSelect:n},r.map((function(e){var t=function(e,t){return t&&Object(d.hasMessage)("vulnerability.transition",e)?[Object(d.translate)("vulnerability.transition",e),Object(d.translate)("vulnerability.transition",e,"description")]:[Object(d.translate)("issue.transition",e),Object(d.translate)("issue.transition",e,"description")]}(e,a),n=t[0],r=t[1];return o.createElement(M,{item:e,key:e,title:r},n)}))))}var ve=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ye=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.setTransition=function(e){l(t.props.onChange,Object(a.o)({issue:t.props.issue.key,transition:e})),t.toggleSetTransition()},t.toggleSetTransition=function(e){t.props.togglePopup("transition",e)},t.handleClose=function(){t.toggleSetTransition(!1)},t}return ve(t,e),t.prototype.render=function(){var e=this.props.issue;return this.props.hasTransitions?o.createElement("div",{className:"dropdown"},o.createElement(g.a,{onRequestClose:this.handleClose,open:this.props.isOpen&&this.props.hasTransitions,overlay:o.createElement(ge,{fromHotspot:e.fromHotspot,onSelect:this.setTransition,transitions:e.transitions,type:e.type})},o.createElement(h.ButtonLink,{className:"issue-action issue-action-with-options js-issue-transition",onClick:this.toggleSetTransition},o.createElement(fe.a,{className:"issue-meta-label",resolution:e.resolution,status:e.status}),o.createElement(y.a,{className:"little-spacer-left"})))):o.createElement(fe.a,{className:"issue-meta-label",resolution:e.resolution,status:e.status})},t}(o.PureComponent),be=n(722),Ee=n.n(be),Oe=n(685),_e=["BUG","VULNERABILITY","CODE_SMELL"];function xe(e){var t=e.issue,n=e.onSelect;return o.createElement(_.DropdownOverlay,null,o.createElement(B,{currentItem:t.type,items:_e,onSelect:n},_e.map((function(e){return o.createElement(M,{className:"display-flex-center",item:e,key:e},o.createElement(Ee.a,{className:"little-spacer-right",query:e}),Object(d.translate)("issue.type",e))}))))}var we=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ne=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toggleSetType=function(e){t.props.togglePopup("set-type",e)},t.setType=function(e){t.props.setIssueProperty("type","set-type",a.p,e)},t.handleClose=function(){t.toggleSetType(!1)},t}return we(t,e),t.prototype.render=function(){var e=this.props.issue;return this.props.canSetType?o.createElement("div",{className:"dropdown"},o.createElement(g.a,{onRequestClose:this.handleClose,open:this.props.isOpen&&this.props.canSetType,overlay:o.createElement(xe,{issue:e,onSelect:this.setType})},o.createElement(h.ButtonLink,{className:"issue-action issue-action-with-options js-issue-set-type",onClick:this.toggleSetType},o.createElement(Ee.a,{className:"little-spacer-right",fill:Oe.colors.baseFontColor,query:e.type}),Object(d.translate)("issue.type",e.type),o.createElement(y.a,{className:"little-spacer-left"})))):o.createElement("span",null,o.createElement(Ee.a,{className:"little-spacer-right",query:e.type}),Object(d.translate)("issue.type",e.type))},t}(o.PureComponent),je=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ke=function(){return(ke=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},Ce=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={commentAutoTriggered:!1,commentPlaceholder:""},t.setIssueProperty=function(e,n,r,s){var o,a,i=t.props.issue;if(i[e]!==s){var c=ke(ke({},i),((o={})[e]=s,o));l(t.props.onChange,r(((a={issue:i.key})[e]=s,a)),i,c)}t.props.togglePopup(n,!1)},t.toggleComment=function(e,n,r){void 0===n&&(n=""),void 0===r&&(r=!1),t.setState({commentPlaceholder:n,commentAutoTriggered:r}),t.props.togglePopup("comment",e)},t.handleTransition=function(e){t.props.onChange(e),("FALSE-POSITIVE"===e.resolution||"WONTFIX"===e.resolution&&"SECURITY_HOTSPOT"!==e.type)&&t.toggleComment(!0,Object(d.translate)("issue.comment.explain_why"),!0)},t}return je(t,e),t.prototype.render=function(){var e=this.props.issue,t=e.actions.includes("assign"),n=e.actions.includes("comment"),r=e.actions.includes("set_severity"),s=e.actions.includes("set_type"),a=e.actions.includes("set_tags"),i=e.transitions&&e.transitions.length>0,l="SECURITY_HOTSPOT"===e.type;return o.createElement("div",{className:"issue-actions"},o.createElement("ul",{className:"issue-meta-list"},o.createElement("li",{className:"issue-meta"},o.createElement(Ne,{canSetType:s,isOpen:"set-type"===this.props.currentPopup&&s,issue:e,setIssueProperty:this.setIssueProperty,togglePopup:this.props.togglePopup})),!l&&o.createElement("li",{className:"issue-meta"},o.createElement(te,{canSetSeverity:r,isOpen:"set-severity"===this.props.currentPopup&&r,issue:e,setIssueProperty:this.setIssueProperty,togglePopup:this.props.togglePopup})),o.createElement("li",{className:"issue-meta"},o.createElement(ye,{hasTransitions:i,isOpen:"transition"===this.props.currentPopup&&i,issue:e,onChange:this.handleTransition,togglePopup:this.props.togglePopup})),o.createElement("li",{className:"issue-meta"},o.createElement(H,{canAssign:t,isOpen:"assign"===this.props.currentPopup&&t,issue:e,onAssign:this.props.onAssign,togglePopup:this.props.togglePopup})),!l&&e.effort&&o.createElement("li",{className:"issue-meta"},o.createElement("span",{className:"issue-meta-label"},Object(d.translateWithParameters)("issue.x_effort",e.effort))),n&&o.createElement(G,{commentAutoTriggered:this.state.commentAutoTriggered,commentPlaceholder:this.state.commentPlaceholder,currentPopup:this.props.currentPopup,issueKey:e.key,onChange:this.props.onChange,toggleComment:this.toggleComment})),o.createElement("ul",{className:"list-inline"},o.createElement("li",{className:"issue-meta js-issue-tags"},o.createElement(he,{canSetTags:a,isOpen:"edit-tags"===this.props.currentPopup&&a,issue:e,onChange:this.props.onChange,togglePopup:this.props.togglePopup}))))},t}(o.PureComponent),Pe=n(834),Se=n(712),Le=n.n(Se);function Ie(e){var t=e.onDelete;return o.createElement(_.DropdownOverlay,{placement:ie.PopupPlacement.BottomRight},o.createElement("div",{className:"menu is-container"},o.createElement("div",{className:"spacer-bottom"},Object(d.translate)("issue.comment.delete_confirm_message")),o.createElement(h.Button,{className:"button-red",onClick:t},Object(d.translate)("delete"))))}var Ae=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Me=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={openPopup:""},t.handleEdit=function(e){t.props.onEdit(t.props.comment.key,e),t.toggleEditPopup(!1)},t.handleDelete=function(){t.props.onDelete(t.props.comment.key),t.toggleDeletePopup(!1)},t.togglePopup=function(e,n){t.setState((function(t){return t.openPopup!==e&&!1!==n?{openPopup:e}:t.openPopup===e&&!0!==n?{openPopup:""}:t}))},t.toggleDeletePopup=function(e){t.togglePopup("delete",e)},t.toggleEditPopup=function(e){t.togglePopup("edit",e)},t.closePopups=function(){t.setState({openPopup:""})},t}return Ae(t,e),t.prototype.render=function(){var e=this.props.comment,t=e.authorName||e.author,n=!1===e.authorActive&&t?Object(d.translateWithParameters)("user.x_deleted",t):t;return o.createElement("div",{className:"issue-comment"},o.createElement("div",{className:"issue-comment-author",title:n},o.createElement(b.a,{className:"little-spacer-right",hash:e.authorAvatar,name:t,size:16}),n),o.createElement("div",{className:"issue-comment-text markdown",dangerouslySetInnerHTML:{__html:Object(Pe.sanitize)(e.htmlText)}}),o.createElement("div",{className:"issue-comment-age"},o.createElement(Le.a,{date:e.createdAt})),o.createElement("div",{className:"issue-comment-actions"},e.updatable&&o.createElement("div",{className:"dropdown"},o.createElement(g.a,{closeOnClickOutside:!1,onRequestClose:this.closePopups,open:"edit"===this.state.openPopup,overlay:o.createElement(W,{comment:e,onComment:this.handleEdit,placeholder:"",placement:ie.PopupPlacement.BottomRight,toggleComment:this.toggleEditPopup})},o.createElement(h.EditButton,{className:"js-issue-comment-edit button-small",onClick:this.toggleEditPopup}))),e.updatable&&o.createElement("div",{className:"dropdown"},o.createElement(g.a,{onRequestClose:this.closePopups,open:"delete"===this.state.openPopup,overlay:o.createElement(Ie,{onDelete:this.handleDelete})},o.createElement(h.DeleteButton,{className:"js-issue-comment-delete button-small",onClick:this.toggleDeletePopup})))))},t}(o.PureComponent),Te=n(665),Be=n(876),De=n.n(Be),Re=n(669),ze=n(680),Ue=n(671),Fe=n(906),qe=n(956),He=n(703),Ke=n.n(He),Ve=n(1017),We=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Ye=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mounted=!1,t.state={changelog:[]},t}return We(t,e),t.prototype.componentDidMount=function(){this.mounted=!0,this.loadChangelog()},t.prototype.componentWillUnmount=function(){this.mounted=!1},t.prototype.loadChangelog=function(){var e=this;Object(a.g)(this.props.issue.key).then((function(t){var n=t.changelog;e.mounted&&e.setState({changelog:n})}),(function(){}))},t.prototype.render=function(){var e=this.props.issue,t=e.author;return o.createElement(_.DropdownOverlay,{placement:ie.PopupPlacement.BottomRight},o.createElement("div",{className:"menu is-container issue-changelog"},o.createElement("table",{className:"spaced"},o.createElement("tbody",null,o.createElement("tr",null,o.createElement("td",{className:"thin text-left text-top nowrap"},o.createElement(Ke.a,{date:e.creationDate})),o.createElement("td",{className:"text-left text-top"},t?Object(d.translate)("created_by")+" "+t:Object(d.translate)("created"))),this.state.changelog.map((function(e,t){var n=e.userName||e.user;return o.createElement("tr",{key:t},o.createElement("td",{className:"thin text-left text-top nowrap"},o.createElement(Ke.a,{date:e.creationDate})),o.createElement("td",{className:"text-left text-top"},n&&o.createElement("p",null,o.createElement(b.a,{className:"little-spacer-right",hash:e.avatar,name:n,size:16}),e.isUserActive?n:Object(d.translateWithParameters)("user.x_deleted",n)),e.diffs.map((function(e){return o.createElement(Ve.a,{diff:e,key:e.key})}))))}))))))},t}(o.PureComponent),Ge=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),Qe=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.toggleChangelog=function(e){t.props.togglePopup("changelog",e)},t.handleClick=function(){t.toggleChangelog()},t.handleClose=function(){t.toggleChangelog(!1)},t}return Ge(t,e),t.prototype.render=function(){return o.createElement("div",{className:"dropdown"},o.createElement(g.a,{onRequestClose:this.handleClose,open:this.props.isOpen,overlay:o.createElement(Ye,{issue:this.props.issue})},o.createElement(I.a,{mouseEnterDelay:.5,overlay:o.createElement(Ke.a,{date:this.props.creationDate})},o.createElement(h.ButtonLink,{className:"issue-action issue-action-with-options js-issue-show-changelog",onClick:this.handleClick},o.createElement("span",{className:"issue-meta-label"},o.createElement(Le.a,{date:this.props.creationDate})),o.createElement(y.a,{className:"little-spacer-left"})))))},t}(o.PureComponent);function Xe(e){var t=e.engine,n=e.engineName,r=e.manualVulnerability,s=e.message,a=e.organization,i=e.ruleKey,l=n||t;return o.createElement("div",{className:"issue-message"},o.createElement("span",{className:"spacer-right"},s),o.createElement(h.ButtonLink,{"aria-label":Object(d.translate)("issue.why_this_issue.long"),className:"issue-see-rule spacer-right",onClick:function(){return e.onOpenRule({key:i,organization:a})}},Object(d.translate)("issue.why_this_issue")),l&&o.createElement(I.a,{overlay:Object(d.translateWithParameters)("issue.from_external_rule_engine",l)},o.createElement("div",{className:"badge spacer-right text-top"},l)),r&&o.createElement(I.a,{overlay:Object(d.translate)("issue.manual_vulnerability.description")},o.createElement("div",{className:"badge spacer-right text-top"},Object(d.translate)("issue.manual_vulnerability"))))}var Je=n(1069),Ze=n.n(Je),$e=n(695),et=n.n($e),tt=n(760),nt=n.n(tt),rt=n(744),st=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ot=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),s=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,i=o.length;a<i;a++,s++)r[s]=o[a];return r},at=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleSelect=function(e){t.props.onFilter(e,t.props.issue)},t}return st(t,e),t.prototype.render=function(){var e=this.props.issue,t=ot(["type","severity","status","resolution","assignee","rule"],(e.tags||[]).map((function(e){return"tag###"+e})),["project",e.subProject?"module":void 0,"file"]).filter((function(e){return e})),n=e.assigneeName||e.assignee;return o.createElement(_.DropdownOverlay,{noPadding:!0},o.createElement("header",{className:"menu-search"},o.createElement("h6",null,Object(d.translate)("issue.filter_similar_issues"))),o.createElement(B,{className:"issues-similar-issues-menu",currentItem:t[0],items:t,onSelect:this.handleSelect},o.createElement(M,{className:"display-flex-center",item:"type"},o.createElement(Ee.a,{className:"little-spacer-right",query:e.type}),Object(d.translate)("issue.type",e.type)),o.createElement(M,{item:"severity"},o.createElement(Q.a,{className:"display-flex-center",severity:e.severity})),o.createElement(M,{item:"status"},o.createElement(fe.a,{className:"display-flex-center",resolution:void 0,status:e.status})),o.createElement(M,{item:"resolution"},null!=e.resolution?Object(d.translate)("issue.resolution",e.resolution):Object(d.translate)("unresolved")),o.createElement(M,{item:"assignee"},n?o.createElement("span",null,Object(d.translate)("assigned_to"),o.createElement(b.a,{className:"little-spacer-left little-spacer-right",hash:e.assigneeAvatar,name:n,size:16}),!1===e.assigneeActive?Object(d.translateWithParameters)("user.x_deleted",n):n):Object(d.translate)("unassigned")),o.createElement("li",{className:"divider"}),o.createElement(M,{item:"rule"},Object(rt.limitComponentName)(e.ruleName)),null!=e.tags&&e.tags.map((function(e){return o.createElement(M,{item:"tag###"+e,key:"tag###"+e},o.createElement(nt.a,{className:"icon-half-transparent little-spacer-right text-middle"}),o.createElement("span",{className:"text-middle"},e))})),o.createElement("li",{className:"divider"}),o.createElement(M,{item:"project"},o.createElement(et.a,{className:"little-spacer-right",qualifier:"TRK"}),e.projectName),null!=e.subProject&&o.createElement(M,{item:"module"},o.createElement(et.a,{className:"little-spacer-right",qualifier:"BRC"}),e.subProjectName),o.createElement(M,{item:"file"},o.createElement(et.a,{className:"little-spacer-right",qualifier:e.componentQualifier}),Object(rt.fileFromPath)(e.componentLongName))))},t}(o.PureComponent),it=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),lt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleFilter=function(e,n){t.togglePopup(!1),t.props.onFilter&&t.props.onFilter(e,n)},t.togglePopup=function(e){t.props.togglePopup("similarIssues",e)},t.handleClose=function(){t.togglePopup(!1)},t}return it(t,e),t.prototype.render=function(){return o.createElement("div",{className:"dropdown"},o.createElement(g.a,{onRequestClose:this.handleClose,open:this.props.isOpen,overlay:o.createElement(at,{issue:this.props.issue,onFilter:this.handleFilter})},o.createElement(h.ButtonLink,{"aria-label":Object(d.translate)("issue.filter_similar_issues"),className:"issue-action issue-action-with-options js-issue-filter",onClick:this.togglePopup,title:Object(d.translate)("issue.filter_similar_issues")},o.createElement(Ze.a,{className:"icon-half-transparent"}),o.createElement(y.a,{className:"icon-half-transparent"}))))},t}(o.PureComponent),ct=function(){return(ct=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};function ut(e){var t=e.issue,n=null!=e.onFilter,r=t.secondaryLocations.length+t.flows.reduce((function(e,t){return e+t.length}),0),s=o.createElement(I.a,{overlay:Object(d.translateWithParameters)("issue.this_issue_involves_x_code_locations",Object(Re.formatMeasure)(r,"INT"))},o.createElement(Fe.a,null,r)),a=e.displayLocationsCount&&r>0,i=Object(Ue.h)(t.project,ct(ct({},Object(ze.d)(e.branchLike)),{issues:t.key,open:t.key,types:"SECURITY_HOTSPOT"===t.type?t.type:void 0}));return o.createElement("div",{className:"issue-row"},o.createElement(qe.a.Consumer,null,(function(e){var n=e.externalRulesRepoNames,r=e.openRule;return o.createElement(Xe,{engine:t.externalRuleEngine,engineName:t.externalRuleEngine&&n&&n[t.externalRuleEngine],manualVulnerability:t.fromHotspot&&"VULNERABILITY"===t.type,message:t.message,onOpenRule:r,organization:t.organization,ruleKey:t.rule})})),o.createElement("div",{className:"issue-row-meta"},o.createElement("ul",{className:"issue-meta-list"},o.createElement("li",{className:"issue-meta"},o.createElement(Qe,{creationDate:t.creationDate,isOpen:"changelog"===e.currentPopup,issue:t,togglePopup:e.togglePopup})),null!=t.textRange&&o.createElement("li",{className:"issue-meta"},o.createElement("span",{className:"issue-meta-label",title:Object(d.translate)("line_number")},"L",t.textRange.endLine)),a&&o.createElement("li",{className:"issue-meta"},e.displayLocationsLink?o.createElement(Te.Link,{target:"_blank",to:i},s):s),o.createElement("li",{className:"issue-meta"},o.createElement(Te.Link,{className:"js-issue-permalink link-no-underline",target:"_blank",title:Object(d.translate)("permalink"),to:i},o.createElement(De.a,null))),n&&o.createElement("li",{className:"issue-meta"},o.createElement(lt,{isOpen:"similarIssues"===e.currentPopup,issue:t,onFilter:e.onFilter,togglePopup:e.togglePopup})))))}var pt=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),mt=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.handleCheck=function(){t.props.onCheck&&t.props.onCheck(t.props.issue.key)},t.handleClick=function(e){!dt(e.target)&&t.props.onClick&&(e.preventDefault(),t.props.onClick(t.props.issue.key))},t.editComment=function(e,n){l(t.props.onChange,Object(a.d)({comment:e,text:n}))},t.deleteComment=function(e){l(t.props.onChange,Object(a.c)({comment:e}))},t}return pt(t,e),t.prototype.render=function(){var e=this,t=this.props.issue,n=null!=this.props.onCheck,r=u()("issue",{hotspot:"SECURITY_HOTSPOT"===t.type,"issue-with-checkbox":n,selected:this.props.selected});return o.createElement("div",{className:r,"data-issue":t.key,onClick:this.handleClick,role:"listitem",tabIndex:0},o.createElement(ut,{branchLike:this.props.branchLike,currentPopup:this.props.currentPopup,displayLocationsCount:this.props.displayLocationsCount,displayLocationsLink:this.props.displayLocationsLink,issue:t,onFilter:this.props.onFilter,togglePopup:this.props.togglePopup}),o.createElement(Ce,{currentPopup:this.props.currentPopup,issue:t,onAssign:this.props.onAssign,onChange:this.props.onChange,togglePopup:this.props.togglePopup}),t.comments&&t.comments.length>0&&o.createElement("div",{className:"issue-comments"},t.comments.map((function(t){return o.createElement(Me,{comment:t,key:t.key,onDelete:e.deleteComment,onEdit:e.editComment})}))),n&&o.createElement(o.Fragment,null,o.createElement(m.a,{checked:this.props.checked||!1,className:"issue-checkbox-container",onCheck:this.handleCheck})))},t}(o.PureComponent);function dt(e){if(!e)return!1;var t=(e.tagName||"").toUpperCase();return["A","BUTTON","INPUT","TEXTAREA"].includes(t)||dt(e.parentElement)}var ht=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),ft=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.togglePopup=function(e,n){t.props.onPopupToggle(t.props.issue.key,e,n)},t.handleAssignement=function(e){var n=t.props.issue;n.assignee!==e&&l(t.props.onChange,Object(a.l)({issue:n.key,assignee:e})),t.togglePopup("assign",!1)},t}return ht(t,e),t.prototype.componentDidMount=function(){this.props.selected&&this.bindShortcuts()},t.prototype.componentWillUpdate=function(e){!e.selected&&this.props.selected&&this.unbindShortcuts()},t.prototype.componentDidUpdate=function(e){!e.selected&&this.props.selected&&this.bindShortcuts()},t.prototype.componentWillUnmount=function(){this.props.selected&&this.unbindShortcuts()},t.prototype.bindShortcuts=function(){var e=this;s("f","issues",(function(){return e.togglePopup("transition"),!1})),s("a","issues",(function(){return e.togglePopup("assign"),!1})),s("m","issues",(function(){return e.props.issue.actions.includes("assign")&&e.handleAssignement("_me"),!1})),s("i","issues",(function(){return e.togglePopup("set-severity"),!1})),s("c","issues",(function(){return e.togglePopup("comment"),!1})),s("t","issues",(function(){return e.togglePopup("edit-tags"),!1})),s("space","issues",(function(){if(e.props.onCheck)return e.props.onCheck(e.props.issue.key),!1}))},t.prototype.unbindShortcuts=function(){s.unbind("f","issues"),s.unbind("a","issues"),s.unbind("m","issues"),s.unbind("i","issues"),s.unbind("c","issues"),s.unbind("space","issues"),s.unbind("t","issues")},t.prototype.render=function(){return o.createElement(mt,{branchLike:this.props.branchLike,checked:this.props.checked,currentPopup:this.props.openPopup,displayLocationsCount:this.props.displayLocationsCount,displayLocationsLink:this.props.displayLocationsLink,issue:this.props.issue,onAssign:this.handleAssignement,onChange:this.props.onChange,onCheck:this.props.onCheck,onClick:this.props.onClick,onFilter:this.props.onFilter,selected:this.props.selected,togglePopup:this.togglePopup})},t.defaultProps={selected:!1},t}(o.PureComponent);t.a=ft},1177:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var o=n(13),a=n(664);t.default=function(e){var t=e.fill,n=void 0===t?"currentColor":t,i=s(e,["fill"]);return o.createElement(a.default,r({},i),o.createElement("path",{d:"M15.045 11.526v1.007q0 0.204-0.149 0.354t-0.354 0.149h-13.084q-0.204 0-0.354-0.149t-0.149-0.354v-1.006q0-0.204 0.149-0.354t0.354-0.149h13.084q0.204 0 0.354 0.149t0.149 0.354zM15.045 8.506v1.006q0 0.204-0.149 0.354t-0.354 0.149h-13.084q-0.204 0-0.354-0.149t-0.149-0.354v-1.006q0-0.204 0.149-0.354t0.354-0.149h13.084q0.204 0 0.354 0.149t0.149 0.354zM15.045 5.487v1.006q0 0.204-0.149 0.354t-0.354 0.149h-13.084q-0.204 0-0.354-0.149t-0.149-0.354v-1.006q0-0.204 0.149-0.354t0.354-0.149h13.084q0.204 0 0.354 0.149t0.149 0.354zM15.045 2.468v1.006q0 0.204-0.149 0.354t-0.354 0.149h-13.084q-0.204 0-0.354-0.149t-0.149-0.354v-1.006q0-0.204 0.149-0.354t0.354-0.149h13.084q0.204 0 0.354 0.149t0.149 0.354z",style:{fill:n}}))}},1194:function(e,t,n){"use strict";n.r(t);var r=n(889),s=n.n(r),o=n(1020),a=n.n(o),i=n(13),l=n(674),c=n(176),u=n(713),p=n(680),m=n(956),d=n(1606),h=n(1607),f=n(1207),g=n(962),v=n(702),y=n(954),b=function(){return(b=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},E=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),s=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,i=o.length;a<i;a++,s++)r[s]=o[a];return r};function O(e,t,n,r){return void 0===r&&(r=500),function(e,t,n){return void 0===n&&(n=500),Object(v.k)(b(b({},e),{p:t,ps:n})).then((function(e){return e.issues.map((function(t){return Object(y.a)(t,e.components,e.users,e.rules)}))}))}(e,n).then((function(s){if(0===s.length)return[];var o=s[s.length-1];return null!=o.textRange&&o.textRange.endLine>t||s.length<r?s:O(e,t,n+1,r).then((function(e){return E(s,e)}))}))}function _(e,t,n,r){var s=function(e,t){return b({additionalFields:"_all",resolved:"false",componentKeys:e,s:"FILE_LINE"},Object(p.d)(t))}(e,r);return new Promise((function(e){O(s,n,1).then((function(t){e(t)}))}))}var x,w=n(661),N=n(1193),j=n(1018),k=n(1161),C=(x=function(e,t){return(x=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}x(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),P=[],S={code:"",duplicated:!1,isNew:!1,line:0},L=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.getDuplicationsForLine=function(e){return t.props.duplicationsByLine[e.line]||P},t.getIssuesForLine=function(e){return t.props.issuesByLine[e.line]||P},t.getIssueLocationsForLine=function(e){return t.props.issueLocationsByLine[e.line]||P},t.renderLine=function(e){var n=e.line,r=e.index,s=e.displayCoverage,o=e.displayDuplications,a=e.displayIssues,l=t.props,c=l.highlightedLocationMessage,u=l.highlightedLocations,p=l.selectedIssue,m=l.sources,d=Object(j.b)(n,u),h=t.props.duplications?t.props.duplications.length:0,f=t.getIssuesForLine(n);return i.createElement(N.a,{branchLike:t.props.branchLike,displayAllIssues:t.props.displayAllIssues,displayCoverage:s,displayDuplications:o,displayIssueLocationsCount:t.props.displayIssueLocationsCount,displayIssueLocationsLink:t.props.displayIssueLocationsLink,displayIssues:a,displayLocationMarkers:t.props.displayLocationMarkers,duplications:t.getDuplicationsForLine(n),duplicationsCount:h,highlighted:n.line===t.props.highlightedLine,highlightedLocationMessage:Object(k.b)(c,d),highlightedSymbols:Object(k.a)(t.props.symbolsByLine[n.line],t.props.highlightedSymbols),issueLocations:t.getIssueLocationsForLine(n),issuePopup:t.props.issuePopup,issues:f,key:n.line,last:r===t.props.sources.length-1&&!t.props.hasSourcesAfter,line:n,loadDuplications:t.props.loadDuplications,onIssueChange:t.props.onIssueChange,onIssuePopupToggle:t.props.onIssuePopupToggle,onIssueSelect:t.props.onIssueSelect,onIssueUnselect:t.props.onIssueUnselect,onIssuesClose:t.props.onIssuesClose,onIssuesOpen:t.props.onIssuesOpen,onLocationSelect:t.props.onLocationSelect,onSymbolClick:t.props.onSymbolClick,openIssues:t.props.openIssuesByLine[n.line]||!1,previousLine:r>0?m[r-1]:void 0,renderDuplicationPopup:t.props.renderDuplicationPopup,scroll:t.props.scroll,secondaryIssueLocations:d,selectedIssue:Object(k.c)(p,f)})},t}return C(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.issues,r=void 0===n?[]:n,s=t.sources,o=s.some((function(e){return null!=e.coverageStatus})),a=s.some((function(e){return!!e.duplicated})),l=r.length>0,u=l&&r.some((function(e){return!e.textRange}));return i.createElement("div",{className:"source-viewer-code"},this.props.hasSourcesBefore&&i.createElement("div",{className:"source-viewer-more-code"},this.props.loadingSourcesBefore?i.createElement("div",{className:"js-component-viewer-loading-before"},i.createElement("i",{className:"spinner"}),i.createElement("span",{className:"note spacer-left"},Object(c.translate)("source_viewer.loading_more_code"))):i.createElement(w.Button,{className:"js-component-viewer-source-before",onClick:this.props.loadSourcesBefore},Object(c.translate)("source_viewer.load_more_code"))),i.createElement("table",{className:"source-table"},i.createElement("tbody",null,u&&this.renderLine({line:S,index:-1,displayCoverage:o,displayDuplications:a,displayIssues:l}),s.map((function(t,n){return e.renderLine({line:t,index:n,displayCoverage:o,displayDuplications:a,displayIssues:l})})))),this.props.hasSourcesAfter&&i.createElement("div",{className:"source-viewer-more-code"},this.props.loadingSourcesAfter?i.createElement("div",{className:"js-component-viewer-loading-after"},i.createElement("i",{className:"spinner"}),i.createElement("span",{className:"note spacer-left"},Object(c.translate)("source_viewer.loading_more_code"))):i.createElement(w.Button,{className:"js-component-viewer-source-after",onClick:this.props.loadSourcesAfter},Object(c.translate)("source_viewer.load_more_code"))))},t}(i.PureComponent),I=n(1019),A=n(182),M=n(665),T=n(721),B=n(676),D=n.n(B),R=n(1177),z=n.n(R),U=n(695),F=n.n(U),q=n(717),H=n(669),K=n(744),V=n(49),W=n(687),Y=n(671),G=n(693),Q=n(679),X=n.n(Q),J=n(833),Z=n.n(J),$=n(732),ee=n.n($),te=n(678),ne=n.n(te),re=n(722),se=n.n(re),oe=n(760),ae=n.n(oe),ie=n(945),le=n.n(ie),ce=n(891),ue=n(1014),pe=n(765),me=n(698),de=n(748),he=n(728),fe=n(875),ge=n(743);function ve(e){var t=e.measure;return i.createElement("div",{className:"measure measure-one-line","data-metric":t.metric.key,key:t.metric.key},i.createElement("span",{className:"measure-name"},Object(ge.b)(t.metric.key)&&[ge.a.bugs,ge.a.vulnerabilities,ge.a.code_smells].includes(t.metric.key)&&i.createElement(se.a,{className:"little-spacer-right",query:t.metric.key}),Object(c.getLocalizedMetricName)(t.metric)),i.createElement("span",{className:"measure-value"},i.createElement(de.a,{metricKey:t.metric.key,metricType:t.metric.type,small:!0,value:t.value})))}var ye=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),be=function(){return(be=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},Ee=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.mounted=!1,t.state={loading:!0,measures:{},showAllMeasures:!1},t.fetchData=function(){Promise.all([t.fetchMeasures(),t.fetchIssues()]).then((function(e){var n=e[0],r=e[1];t.mounted&&t.setState(be({loading:!1,measures:n},r))}),(function(){t.mounted&&t.setState({loading:!1})}))},t.fetchMeasures=function(){return Object(ue.c)().then((function(e){var n=Object(me.getDisplayMetrics)(e).map((function(e){return e.key}));return Object(ce.d)(be({component:t.props.sourceViewerFile.key,metricKeys:n.join()},Object(p.d)(t.props.branchLike))).then((function(t){var n=Object(me.enhanceMeasuresWithMetrics)(t,e).filter((function(e){return e.metric}));return Z()(n,(function(e){return e.metric.key}))}))}))},t.fetchIssues=function(){return Object(v.f)(be({componentKeys:t.props.sourceViewerFile.key,resolved:"false"},Object(p.d)(t.props.branchLike)),["types","severities","tags"]).then((function(e){var t=e.facets,n=t.find((function(e){return"severities"===e.property})),r=t.find((function(e){return"tags"===e.property})),s=t.find((function(e){return"types"===e.property}));return{severitiesFacet:n&&n.values,tagsFacet:r&&r.values,typesFacet:s&&s.values}}))},t.handleAllMeasuresClick=function(e){e.preventDefault(),e.currentTarget.blur(),t.setState({showAllMeasures:!0})},t.renderMeasure=function(e){return e?i.createElement(ve,{key:e.metric.key,measure:e}):null},t.renderLines=function(){var e=t.state.measures;return i.createElement("div",{className:"measures-viewer-section"},i.createElement("div",{className:"measures-viewer-card"},i.createElement("div",{className:"measures"},t.renderMeasure(e.lines),t.renderMeasure(e.ncloc),t.renderMeasure(e.comment_lines),t.renderMeasure(e.comment_lines_density)),i.createElement("div",{className:"measures"},t.renderMeasure(e.cognitive_complexity),t.renderMeasure(e.complexity),t.renderMeasure(e.function_complexity))))},t.renderBigMeasure=function(e){return e?i.createElement("div",{className:"measure measure-big","data-metric":e.metric.key},i.createElement("span",{className:"measure-value"},i.createElement(de.a,{metricKey:e.metric.key,metricType:e.metric.type,value:e.value})),i.createElement("span",{className:"measure-name"},Object(c.getLocalizedMetricName)(e.metric,!0))):null},t.renderIssues=function(){var e=t.state,n=e.measures,r=e.severitiesFacet,s=e.tagsFacet,o=e.typesFacet;return i.createElement("div",{className:"measures-viewer-section"},i.createElement("div",{className:"measures-viewer-card"},i.createElement("div",{className:"measures"},t.renderBigMeasure(n.violations),t.renderBigMeasure(n.sqale_index)),n.violations&&!!n.violations.value&&i.createElement(i.Fragment,null,o&&i.createElement("div",{className:"measures"},X()(o,(function(e){return pe.a.indexOf(e.val)})).map((function(e){return i.createElement("div",{className:"measure measure-one-line",key:e.val},i.createElement("span",{className:"measure-name"},i.createElement(se.a,{className:"little-spacer-right",query:e.val}),Object(c.translate)("issue.type",e.val)),i.createElement("span",{className:"measure-value"},Object(H.formatMeasure)(e.count,"SHORT_INT")))}))),r&&i.createElement("div",{className:"measures"},X()(r,(function(e){return pe.f.indexOf(e.val)})).map((function(e){return i.createElement("div",{className:"measure measure-one-line",key:e.val},i.createElement("span",{className:"measure-name"},i.createElement(he.a,{severity:e.val})),i.createElement("span",{className:"measure-value"},Object(H.formatMeasure)(e.count,"SHORT_INT")))}))),s&&i.createElement("div",{className:"measures"},s.map((function(e){return i.createElement("div",{className:"measure measure-one-line",key:e.val},i.createElement("span",{className:"measure-name"},i.createElement(ae.a,{className:"little-spacer-right"}),e.val),i.createElement("span",{className:"measure-value"},Object(H.formatMeasure)(e.count,"SHORT_INT")))}))))))},t.renderCoverage=function(){var e=t.state.measures.coverage;return e?i.createElement("div",{className:"measures-viewer-section"},i.createElement("div",{className:"measures-viewer-card"},i.createElement("div",{className:"measures"},i.createElement("div",{className:"measures-chart"},i.createElement(fe.a,{size:"big",value:e.value})),i.createElement("div",{className:"measure measure-big","data-metric":e.metric.key},i.createElement("span",{className:"measure-value"},i.createElement(de.a,{metricKey:e.metric.key,metricType:e.metric.type,value:e.value})),i.createElement("span",{className:"measure-name"},Object(c.getLocalizedMetricName)(e.metric)))),i.createElement("div",{className:"measures"},t.renderMeasure(t.state.measures.uncovered_lines),t.renderMeasure(t.state.measures.lines_to_cover),t.renderMeasure(t.state.measures.uncovered_conditions),t.renderMeasure(t.state.measures.conditions_to_cover)))):null},t.renderDuplications=function(){var e=t.state.measures.duplicated_lines_density;return e?i.createElement("div",{className:"measures-viewer-section"},i.createElement("div",{className:"measures-viewer-card"},i.createElement("div",{className:"measures"},i.createElement("div",{className:"measures-chart"},i.createElement(le.a,{muted:void 0===e.value,size:"big",value:Number(e.value||0)})),i.createElement("div",{className:"measure measure-big","data-metric":e.metric.key},i.createElement("span",{className:"measure-value"},i.createElement(de.a,{metricKey:e.metric.key,metricType:e.metric.type,value:e.value})),i.createElement("span",{className:"measure-name"},Object(c.getLocalizedMetricName)(e.metric,!0)))),i.createElement("div",{className:"measures"},t.renderMeasure(t.state.measures.duplicated_blocks),t.renderMeasure(t.state.measures.duplicated_lines)))):null},t.renderTests=function(){var e=t.state.measures;return i.createElement("div",{className:"measures-viewer"},i.createElement("div",{className:"measures-viewer-section measures-viewer-section-limited"},i.createElement("div",{className:"measures-viewer-card"},i.createElement("div",{className:"measures"},t.renderMeasure(e.tests),t.renderMeasure(e.test_success_density),t.renderMeasure(e.test_failures),t.renderMeasure(e.test_errors),t.renderMeasure(e.skipped_tests),t.renderMeasure(e.test_execution_time)))))},t.renderDomain=function(e,n){return i.createElement("div",{className:"measures-viewer-card",key:e},i.createElement("div",{className:"measures"},i.createElement("div",{className:"measure measure-big"},i.createElement("span",{className:"measure-name"},Object(c.translate)("metric_domain",e))),X()(n.filter((function(e){return void 0!==e.value})),(function(e){return Object(c.getLocalizedMetricName)(e.metric)})).map((function(e){return t.renderMeasure(e)}))))},t.renderAllMeasures=function(){var e=ee()(Object.values(t.state.measures),(function(e){return e.metric.domain})),n=Object.keys(e),r=n.filter((function(e,t){return t%2==1})),s=n.filter((function(e,t){return t%2==0}));return i.createElement("div",{className:"measures-viewer measures-viewer-secondary"},i.createElement("div",{className:"measures-viewer-section"},r.map((function(n){return t.renderDomain(n,e[n])}))),i.createElement("div",{className:"measures-viewer-section"},s.map((function(n){return t.renderDomain(n,e[n])}))))},t}return ye(t,e),t.prototype.componentDidMount=function(){this.mounted=!0,this.fetchData()},t.prototype.componentWillUnmount=function(){this.mounted=!1},t.prototype.render=function(){var e=this.props,t=e.branchLike,n=e.sourceViewerFile,r=this.state.loading,s=Object(c.translate)("component_viewer.file_measures");return i.createElement(ne.a,{contentLabel:s,onRequestClose:this.props.onClose,size:"large"},i.createElement("div",{className:"modal-head"},i.createElement("h2",null,s)),i.createElement("div",{className:"modal-body modal-container"},i.createElement("div",{className:"measures-viewer-header big-spacer-bottom"},i.createElement("div",null,i.createElement(F.a,{className:"little-spacer-right",qualifier:"TRK"}),i.createElement(M.Link,{to:Object(Y.b)(n.project,t)},n.projectName),n.subProject&&i.createElement(i.Fragment,null,i.createElement(F.a,{className:"big-spacer-left little-spacer-right",qualifier:"BRC"}),n.subProjectName)),i.createElement("div",{className:"display-flex-center little-spacer-top"},i.createElement(F.a,{className:"little-spacer-right",qualifier:n.q}),n.path)),r?i.createElement("i",{className:"spinner"}):i.createElement(i.Fragment,null,"UTS"===n.q?this.renderTests():i.createElement("div",{className:"measures-viewer"},this.renderLines(),this.renderIssues(),this.renderCoverage(),this.renderDuplications())),i.createElement("div",{className:"spacer-top"},this.state.showAllMeasures?this.renderAllMeasures():i.createElement("a",{className:"js-show-all-measures",href:"#",onClick:this.handleAllMeasuresClick},Object(c.translate)("component_viewer.show_all_measures")))),i.createElement("footer",{className:"modal-foot"},i.createElement(w.ResetButtonLink,{onClick:this.props.onClose},Object(c.translate)("close"))))},t}(i.PureComponent),Oe=function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}(),_e=function(){return(_e=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},xe={BUG:"bugs",VULNERABILITY:"vulnerabilities",CODE_SMELL:"code_smells",SECURITY_HOTSPOT:"security_hotspots"},we=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.state={measuresOverlay:!1},t.handleShowMeasuresClick=function(e){e.preventDefault(),t.setState({measuresOverlay:!0})},t.handleMeasuresOverlayClose=function(){t.setState({measuresOverlay:!1})},t.openInWorkspace=function(e){e.preventDefault();var n=t.props.sourceViewerFile.key;t.props.openComponent({branchLike:t.props.branchLike,key:n})},t.renderIssueMeasures=function(){var e=t.props,n=e.branchLike,r=e.componentMeasures,s=e.sourceViewerFile;return r&&r.length>0&&i.createElement(i.Fragment,null,i.createElement("div",{className:"source-viewer-header-measure-separator"}),["BUG","VULNERABILITY","CODE_SMELL","SECURITY_HOTSPOT"].map((function(e){var t=_e(_e({},Object(p.d)(n)),{fileUuids:s.uuid,resolved:"false",types:e}),o=r.find((function(t){return t.metric===xe[e]}));return i.createElement("div",{className:"source-viewer-header-measure",key:e},i.createElement("span",{className:"source-viewer-header-measure-label"},Object(c.translate)("issue.type",e)),i.createElement("span",{className:"source-viewer-header-measure-value"},i.createElement(M.Link,{to:Object(Y.h)(s.project,t)},Object(H.formatMeasure)(o&&o.value||0,"INT"))))})))},t}return Oe(t,e),t.prototype.render=function(){var e=this.props.showMeasures,t=this.props.sourceViewerFile,n=t.key,r=t.measures,s=t.path,o=t.project,a=t.projectName,l=t.q,u=t.subProject,m=t.subProjectName,d=l===G.a.TestFile?"tests":"lines",h=Object(W.getBaseUrl)()+"/api/sources/raw?"+Object(A.stringify)(Object(V.omitNil)(_e({key:n},Object(p.d)(this.props.branchLike))));return i.createElement("div",{className:"source-viewer-header display-flex-center"},i.createElement("div",{className:"flex-1 little-spacer-top"},i.createElement("div",{className:"component-name"},i.createElement("div",{className:"component-name-parent"},i.createElement("a",{className:"link-with-icon",href:Object(W.getPathUrlAsString)(Object(Y.b)(o,this.props.branchLike))},i.createElement(F.a,{qualifier:"TRK"})," ",i.createElement("span",null,a))),void 0!==u&&i.createElement("div",{className:"component-name-parent"},i.createElement(F.a,{qualifier:"BRC"})," ",i.createElement("span",null,m)),i.createElement("div",{className:"component-name-path"},i.createElement(F.a,{qualifier:l})," ",i.createElement("span",null,Object(K.collapsedDirFromPath)(s)),i.createElement("span",{className:"component-name-file"},Object(K.fileFromPath)(s)),i.createElement("span",{className:"nudged-up spacer-left"},i.createElement(T.ClipboardIconButton,{className:"button-link link-no-underline",copyValue:s}))))),this.state.measuresOverlay&&i.createElement(Ee,{branchLike:this.props.branchLike,onClose:this.handleMeasuresOverlayClose,sourceViewerFile:this.props.sourceViewerFile}),e&&i.createElement("div",{className:"display-flex-center"},r[d]&&i.createElement("div",{className:"source-viewer-header-measure"},i.createElement("span",{className:"source-viewer-header-measure-label"},Object(c.translate)("metric."+d+".name")),i.createElement("span",{className:"source-viewer-header-measure-value"},Object(H.formatMeasure)(r[d],"SHORT_INT"))),void 0!==r.coverage&&i.createElement("div",{className:"source-viewer-header-measure"},i.createElement("span",{className:"source-viewer-header-measure-label"},Object(c.translate)("metric.coverage.name")),i.createElement("span",{className:"source-viewer-header-measure-value"},Object(H.formatMeasure)(r.coverage,"PERCENT"))),void 0!==r.duplicationDensity&&i.createElement("div",{className:"source-viewer-header-measure"},i.createElement("span",{className:"source-viewer-header-measure-label"},Object(c.translate)("duplications")),i.createElement("span",{className:"source-viewer-header-measure-value"},Object(H.formatMeasure)(r.duplicationDensity,"PERCENT"))),this.renderIssueMeasures()),i.createElement(D.a,{className:"source-viewer-header-actions flex-0",overlay:i.createElement("ul",{className:"menu"},i.createElement("li",null,i.createElement("a",{className:"js-measures",href:"#",onClick:this.handleShowMeasuresClick},Object(c.translate)("component_viewer.show_details"))),i.createElement("li",null,i.createElement(M.Link,{className:"js-new-window",rel:"noopener noreferrer",target:"_blank",to:Object(Y.d)(this.props.sourceViewerFile.project,this.props.branchLike,n)},Object(c.translate)("component_viewer.new_window"))),i.createElement("li",null,i.createElement("a",{className:"js-workspace",href:"#",onClick:this.openInWorkspace},Object(c.translate)("component_viewer.open_in_workspace"))),i.createElement("li",null,i.createElement("a",{className:"js-raw-source",href:h,rel:"noopener noreferrer",target:"_blank"},Object(c.translate)("component_viewer.show_raw_source")))),overlayPlacement:q.PopupPlacement.BottomRight},i.createElement(w.ButtonIcon,{className:"js-actions"},i.createElement(z.a,null))))},t}(i.PureComponent),Ne=n(1160),je=(n(2178),function(){var e=function(t,n){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(t,n)};return function(t,n){function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}}()),ke=function(){return(ke=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},Ce=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),s=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,i=o.length;a<i;a++,s++)r[s]=o[a];return r},Pe=function(e){function t(t){var n=e.call(this,t)||this;return n.mounted=!1,n.loadSources=function(){return new Promise((function(e,t){var r=n.props.aroundLine?Math.max(1,n.props.aroundLine-250+1):1,s=n.props.aroundLine?n.props.aroundLine+250+1:501;return 1===r&&s<500&&(s=500),s++,n.propsLoadSources(n.props.component,r,s,n.props.branchLike).then((function(t){return e(t)}),(function(r){n.mounted&&([403,404].includes(r.status)?t(r):e([]))}))}))},n.loadSourcesBefore=function(){if(n.state.sources){var e=n.state.sources[0];n.setState({loadingSourcesBefore:!0});var t=Math.max(1,e.line-500);Promise.all([n.propsLoadSources(n.props.component,t,e.line-1,n.props.branchLike),n.loadIssues(n.props.component,t,e.line-1,n.props.branchLike)]).then((function(e){var t=e[0],r=e[1];n.mounted&&n.setState((function(e){var o=s()(Ce(r,e.issues||[]),(function(e){return e.key}));return{issues:o,issuesByLine:Object(g.c)(o),issueLocationsByLine:Object(g.d)(o),loadingSourcesBefore:!1,sources:Ce(n.computeCoverageStatus(t),e.sources||[]),symbolsByLine:ke(ke({},e.symbolsByLine),Object(g.e)(t))}}))}),(function(){}))}},n.loadSourcesAfter=function(){if(n.state.sources){var e=n.state.sources[n.state.sources.length-1];n.setState({loadingSourcesAfter:!0});var t=e.line+1,r=e.line+500+1;Promise.all([n.propsLoadSources(n.props.component,t,r,n.props.branchLike),n.loadIssues(n.props.component,t,r,n.props.branchLike)]).then((function(e){var t=e[0],r=e[1];n.mounted&&n.setState((function(e){var o=s()(Ce(e.issues||[],r),(function(e){return e.key}));return{issues:o,issuesByLine:Object(g.c)(o),issueLocationsByLine:Object(g.d)(o),hasSourcesAfter:t.length>500,loadingSourcesAfter:!1,sources:Ce(e.sources||[],n.computeCoverageStatus(t.slice(0,500))),symbolsByLine:ke(ke({},e.symbolsByLine),Object(g.e)(t.slice(0,500)))}}))}),(function(){}))}},n.loadDuplications=function(){Object(u.q)(ke({key:n.props.component},Object(p.d)(n.props.branchLike))).then((function(e){n.mounted&&n.setState({duplications:e.duplications,duplicationsByLine:Object(g.a)(e.duplications),duplicatedFiles:e.files})}),(function(){}))},n.handleIssuePopupToggle=function(e,t,r){n.setState((function(n){var s=n.issuePopup&&n.issuePopup.name===t&&n.issuePopup.issue===e;return!1===r||s?!0!==r&&s?{issuePopup:void 0}:null:{issuePopup:{issue:e,name:t}}}))},n.handleSymbolClick=function(e){n.setState((function(t){return{highlightedSymbols:a()(t.highlightedSymbols,e).length>0?[]:e}}))},n.handleIssueSelect=function(e){n.props.onIssueSelect?n.props.onIssueSelect(e):n.setState({selectedIssue:e})},n.handleIssueUnselect=function(){n.props.onIssueUnselect?n.props.onIssueUnselect():n.setState({selectedIssue:void 0})},n.handleOpenIssues=function(e){n.setState((function(t){var n;return{openIssuesByLine:ke(ke({},t.openIssuesByLine),(n={},n[e.line]=!0,n))}}))},n.handleCloseIssues=function(e){n.setState((function(t){var n;return{openIssuesByLine:ke(ke({},t.openIssuesByLine),(n={},n[e.line]=!1,n))}}))},n.handleIssueChange=function(e){n.setState((function(t){var n=t.issues,r=(void 0===n?[]:n).map((function(t){return t.key===e.key?e:t}));return{issues:r,issuesByLine:Object(g.c)(r)}})),n.props.onIssueChange&&n.props.onIssueChange(e)},n.renderDuplicationPopup=function(e,t){var r=n.state,s=r.component,o=r.duplicatedFiles,a=r.duplications;if(!s||!o)return null;var l=Object(h.b)(a,e);return i.createElement(m.a.Consumer,null,(function(e){var r=e.openComponent;return i.createElement(d.a,{blocks:Object(h.a)(l,t),branchLike:n.props.branchLike,duplicatedFiles:o,inRemovedComponent:Object(h.c)(l),openComponent:r,sourceViewerFile:s})}))},n.state={duplicationsByLine:{},hasSourcesAfter:!1,highlightedSymbols:[],issuesByLine:{},issueLocationsByLine:{},loading:!0,loadingSourcesAfter:!1,loadingSourcesBefore:!1,notAccessible:!1,notExist:!1,openIssuesByLine:{},selectedIssue:t.selectedIssue,sourceRemoved:!1,symbolsByLine:{}},n}return je(t,e),t.prototype.componentDidMount=function(){this.mounted=!0,this.fetchComponent()},t.prototype.componentWillReceiveProps=function(e){e.component===this.props.component&&Object(p.i)(e.branchLike,this.props.branchLike)||this.setState({loading:!0}),void 0!==e.onIssueSelect&&e.selectedIssue!==this.props.selectedIssue&&this.setState({selectedIssue:e.selectedIssue})},t.prototype.componentDidUpdate=function(e){if(e.component===this.props.component&&Object(p.i)(e.branchLike,this.props.branchLike))if(void 0!==this.props.aroundLine&&e.aroundLine!==this.props.aroundLine&&this.isLineOutsideOfRange(this.props.aroundLine))this.fetchSources();else{var t=this.props.selectedIssue,n=this.state.issues;void 0!==t&&void 0!==n&&void 0===n.find((function(e){return e.key===t}))&&this.reloadIssues()}else this.fetchComponent()},t.prototype.componentWillUnmount=function(){this.mounted=!1},Object.defineProperty(t.prototype,"loadComponent",{get:function(){return this.props.loadComponent||Se},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"loadIssues",{get:function(){return this.props.loadIssues||_},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"propsLoadSources",{get:function(){return this.props.loadSources||Le},enumerable:!0,configurable:!0}),t.prototype.computeCoverageStatus=function(e){return e.map((function(e){return ke(ke({},e),{coverageStatus:Object(f.a)(e)})}))},t.prototype.isLineOutsideOfRange=function(e){var t=this.state.sources;if(t&&t.length>0){var n=t[0],r=t[t.length-1];return e<n.line||e>r.line}return!0},t.prototype.fetchComponent=function(){var e=this;this.setState({loading:!0});var t=(this.props.aroundLine||0)+500;this.loadComponent(this.props.component,this.props.branchLike).then((function(n){("FIL"===n.q||"UTS"===n.q?e.loadSources():Promise.resolve([])).then((function(r){return function(n,r){e.loadIssues(e.props.component,1,t,e.props.branchLike).then((function(t){if(e.mounted){var s=r.slice(0,500);e.setState({component:n,duplicatedFiles:void 0,duplications:void 0,duplicationsByLine:{},hasSourcesAfter:r.length>500,highlightedSymbols:[],issueLocationsByLine:Object(g.d)(t),issues:t,issuesByLine:Object(g.c)(t),loading:!1,notAccessible:!1,notExist:!1,openIssuesByLine:{},issuePopup:void 0,sourceRemoved:!1,sources:e.computeCoverageStatus(s),symbolsByLine:Object(g.e)(r.slice(0,500))},(function(){e.props.onLoaded&&e.props.onLoaded(n,s,t)}))}}),(function(){}))}(n,r)}),(function(t){return function(t,n){e.mounted&&(403===t.status?e.setState({component:n,loading:!1,notAccessible:!0}):404===t.status&&e.setState({component:n,loading:!1,sourceRemoved:!0}))}(t,n)}))}),(function(t){e.mounted&&(403===t.status?e.setState({loading:!1,notAccessible:!0}):404===t.status&&e.setState({loading:!1,notExist:!0}))}))},t.prototype.fetchSources=function(){var e=this;this.loadSources().then((function(t){if(e.mounted){var n=t.slice(0,500);e.setState({sources:t.slice(0,500),hasSourcesAfter:t.length>500},(function(){e.props.onLoaded&&e.state.component&&e.state.issues&&e.props.onLoaded(e.state.component,n,e.state.issues)}))}}),(function(){}))},t.prototype.reloadIssues=function(){var e=this;if(this.state.sources){var t=this.state.sources[0],n=this.state.sources[this.state.sources.length-1];this.loadIssues(this.props.component,t&&t.line,n&&n.line,this.props.branchLike).then((function(t){e.mounted&&e.setState({issues:t,issuesByLine:Object(g.c)(t),issueLocationsByLine:Object(g.d)(t)})}),(function(){}))}},t.prototype.renderCode=function(e){var t=e.length>0&&e[0].line>1;return i.createElement(L,{branchLike:this.props.branchLike,componentKey:this.props.component,displayAllIssues:this.props.displayAllIssues,displayIssueLocationsCount:this.props.displayIssueLocationsCount,displayIssueLocationsLink:this.props.displayIssueLocationsLink,displayLocationMarkers:this.props.displayLocationMarkers,duplications:this.state.duplications,duplicationsByLine:this.state.duplicationsByLine,hasSourcesAfter:this.state.hasSourcesAfter,hasSourcesBefore:t,highlightedLine:this.props.highlightedLine,highlightedLocationMessage:this.props.highlightedLocationMessage,highlightedLocations:this.props.highlightedLocations,highlightedSymbols:this.state.highlightedSymbols,issueLocationsByLine:this.state.issueLocationsByLine,issuePopup:this.state.issuePopup,issues:this.state.issues,issuesByLine:this.state.issuesByLine,loadDuplications:this.loadDuplications,loadSourcesAfter:this.loadSourcesAfter,loadSourcesBefore:this.loadSourcesBefore,loadingSourcesAfter:this.state.loadingSourcesAfter,loadingSourcesBefore:this.state.loadingSourcesBefore,onIssueChange:this.handleIssueChange,onIssuePopupToggle:this.handleIssuePopupToggle,onIssueSelect:this.handleIssueSelect,onIssueUnselect:this.handleIssueUnselect,onIssuesClose:this.handleCloseIssues,onIssuesOpen:this.handleOpenIssues,onLocationSelect:this.props.onLocationSelect,onSymbolClick:this.handleSymbolClick,openIssuesByLine:this.state.openIssuesByLine,renderDuplicationPopup:this.renderDuplicationPopup,scroll:this.props.scroll,selectedIssue:this.state.selectedIssue,sources:e,symbolsByLine:this.state.symbolsByLine})},t.prototype.renderHeader=function(e,t){var n=this;return this.props.slimHeader?i.createElement(Ne.a,{branchLike:e,sourceViewerFile:t}):i.createElement(m.a.Consumer,null,(function(e){var r=e.openComponent;return i.createElement(we,{branchLike:n.props.branchLike,componentMeasures:n.props.componentMeasures,openComponent:r,showMeasures:n.props.showMeasures,sourceViewerFile:t})}))},t.prototype.render=function(){var e=this,t=this.state,n=t.component,r=t.loading,s=t.sources,o=t.notAccessible,a=t.sourceRemoved;return r?null:this.state.notExist?i.createElement(l.Alert,{className:"spacer-top",variant:"warning"},Object(c.translate)("component_viewer.no_component")):o?i.createElement(l.Alert,{className:"spacer-top",variant:"warning"},Object(c.translate)("code_viewer.no_source_code_displayed_due_to_security")):n?i.createElement(I.a.Provider,{value:{branchLike:this.props.branchLike,file:n}},i.createElement("div",{className:"source-viewer",ref:function(t){return e.node=t}},this.renderHeader(this.props.branchLike,n),a&&i.createElement(l.Alert,{className:"spacer-top",variant:"warning"},Object(c.translate)("code_viewer.no_source_code_displayed_due_to_source_removed")),!a&&void 0!==s&&this.renderCode(s))):null},t.defaultProps={displayAllIssues:!1,displayIssueLocationsCount:!0,displayIssueLocationsLink:!0,displayLocationMarkers:!0},t}(i.PureComponent);t.default=Pe;function Se(e,t){return Promise.all([Object(u.k)(ke({component:e},Object(p.d)(t))),Object(u.j)(ke({component:e},Object(p.d)(t)))]).then((function(e){var t=e[0],n=e[1].component;return ke(ke({},t),{leakPeriodDate:n.leakPeriodDate})}))}function Le(e,t,n,r){return Object(u.u)(ke({key:e,from:t,to:n},Object(p.d)(r)))}},2178:function(e,t,n){var r=n(662),s=n(2179);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);var o={insert:"head",singleton:!1},a=(r(s,o),s.locals?s.locals:{});e.exports=a},2179:function(e,t,n){(t=n(663)(!1)).push([e.i,".source-viewer{width:100%;min-height:200px;border:1px solid #cdcdcd;box-sizing:border-box;background-color:#fff;overflow:hidden}.source-table{width:100%;border:none;border-collapse:collapse}.source-viewer-header{position:relative;padding:2px 10px 4px;border-bottom:1px solid #e6e6e6;background-color:#f3f3f3}.source-viewer-header-measure{vertical-align:middle;font-size:13px}.source-viewer-header-measure .rating{font-size:18px}.source-viewer-header-measure-separator{margin:0 24px;height:30px;border-right:1px solid #cdcdcd}.source-viewer-header-measure+.source-viewer-header-measure{margin-left:24px}.source-viewer-header-measure-label{display:block;line-height:12px;color:#777;font-size:12px}.source-viewer-header-measure-value{display:block;margin-top:2px;line-height:18px;color:#444;font-size:16px}.source-viewer-header-actions{display:block;margin-left:24px;padding:8px 4px}.source-viewer-header-actions svg{margin-top:2px}.source-viewer-header-more-actions{position:absolute;z-index:7500;right:0;top:100%;padding:10px;border:1px solid #e6e6e6;border-right:none;background-color:#fff;line-height:1.8}.source-viewer-code{overflow-x:auto}.source-viewer-more-code{padding:40px 0;border-bottom:1px solid #e6e6e6;background-color:#f3f3f3;text-align:center}.source-viewer-more-code .spinner{top:-1px}.source-table+.source-viewer-more-code{border-bottom:none;border-top:1px solid #e6e6e6}.source-viewer-bubble-popup{font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px;text-align:left;-webkit-user-select:text;-ms-user-select:text;user-select:text}.issue-location.highlighted{border-color:#e1e1f2;background-color:#e1e1f2}.issue-location.selected{border-color:#f4b1b0;background-color:#f4b1b0}.measures-viewer{display:flex;margin:0 -8px}.measures-viewer+.measures-viewer{margin-top:8px}.measures-viewer-header{font-size:12px}.measures-viewer-secondary .measures-viewer-card{background-color:#f3f3f3}.measures-viewer-section{flex:1}.measures-viewer-section-limited{max-width:25%}.measures-viewer-card{margin:16px 8px;padding:8px;border:1px solid #e6e6e6;background-color:#fff}.measures+.measures{margin-top:16px;padding-top:16px;border-top:1px solid #e6e6e6}.measures-chart{display:inline-block;vertical-align:middle;width:80px;margin-right:24px;text-align:center}.measure{line-height:1.34}.measure-one-line{display:flex;justify-content:space-between}.measure-one-line .measure-name{display:inline}.measure-name{display:block;font-size:13px}.measure-value{color:#236a97;font-size:16px;font-weight:400}.measure-big{display:inline-block;vertical-align:middle}.measure-big .measure-name{margin-top:4px;margin-bottom:8px;font-size:16px}.measure-big .measure-value,.measure-big .rating{font-size:24px}.measure-big+.measure-big{margin-left:24px}",""]),e.exports=t},700:function(e,t,n){var r=n(718),s=n(694),o=n(764),a=n(707);e.exports=function(e,t){return(a(e)?r:o)(e,s(t,3))}},703:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)};Object.defineProperty(t,"__esModule",{value:!0});var s=n(13),o=n(668),a=n(129);t.formatterOption={year:"numeric",month:"long",day:"numeric",hour:"numeric",minute:"numeric"},t.default=function(e){var n=e.children,i=e.date;return s.createElement(o.FormattedDate,r({value:a.parseDate(i)},t.formatterOption),n)}},712:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(13),s=n(668),o=n(129);t.default=function(e){var t=e.children,n=e.date;return r.createElement(s.FormattedRelative,{value:o.parseDate(n)},t)}},727:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(660),s=n(13),o=n(669);n(758),t.default=function(e){var t=o.formatMeasure(e.level,"LEVEL"),n=r(e.className,"level","level-"+e.level,{"level-small":e.small,"level-muted":e.muted});return s.createElement("span",{"aria-label":e["aria-label"],"aria-labelledby":e["aria-labelledby"],className:n},t)}},728:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(13),s=n(818),o=n.n(s),a=n(176);function i(e){var t=e.className,n=e.severity;return n?r.createElement("span",{className:t},r.createElement(o.a,{className:"little-spacer-right",severity:n}),Object(a.translate)("severity",n)):null}},737:function(e,t,n){"use strict";var r=this&&this.__assign||function(){return(r=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},s=this&&this.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n};Object.defineProperty(t,"__esModule",{value:!0});var o=n(660),a=n(13),i=n(176),l=n(669);n(844),t.default=function(e){var t=e.className,n=e.muted,c=void 0!==n&&n,u=e.small,p=void 0!==u&&u,m=e.value,d=s(e,["className","muted","small","value"]);if(void 0===m)return a.createElement("span",r({"aria-label":i.translate("metric.no_rating")},d),"–");var h=l.formatMeasure(m,"RATING");return a.createElement("span",r({"aria-label":i.translateWithParameters("metric.has_rating_X",h),className:o("rating","rating-"+h,{"rating-small":p,"rating-muted":c},t)},d),h)}},740:function(e,t,n){"use strict";n.d(t,"a",(function(){return i})),n.d(t,"b",(function(){return l})),n.d(t,"c",(function(){return c}));var r=n(698),s=n(788),o=function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)},a=["sqale_rating","maintainability_rating","reliability_rating","security_rating","security_review_rating"];function i(e,t){return o(o({},e),{metric:t[e.metric],leak:l(e)})}function l(e){if(e&&e.periods){var t=Object(s.a)(e.periods);return t&&t.value}}function c(e,t){var n=Object(r.isDiffMetric)(e)?e.substr(4):e;if(a.includes(n))return Object(r.getRatingTooltip)(n,t)}},748:function(e,t,n){"use strict";n.d(t,"a",(function(){return m}));var r=n(13),s=n(666),o=n.n(s),a=n(727),i=n.n(a),l=n(737),c=n.n(l),u=n(669),p=n(740);function m(e){var t=e.className,n=e.decimals,s=e.metricKey,a=e.metricType,l=e.small,m=e.value;if(void 0===m)return r.createElement("span",{className:t},"–");if("LEVEL"===a)return r.createElement(i.a,{className:t,level:m,small:l});if("RATING"!==a){var d=Object(u.formatMeasure)(m,a,{decimals:n,omitExtraDecimalZeros:"PERCENT"===a});return r.createElement("span",{className:t},null!=d?d:"–")}var h=Object(p.c)(s,Number(m)),f=r.createElement(c.a,{small:l,value:m});return h?r.createElement(o.a,{overlay:h},r.createElement("span",{className:t},f)):f}},758:function(e,t,n){var r=n(662),s=n(759);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);var o={insert:"head",singleton:!1},a=(r(s,o),s.locals?s.locals:{});e.exports=a},759:function(e,t,n){(t=n(663)(!1)).push([e.i,".level{display:inline-block;min-width:80px;height:24px;line-height:24px;border-radius:24px;box-sizing:border-box;color:#fff;letter-spacing:.02em;font-size:13px;font-weight:400;text-align:center;text-shadow:0 0 1px rgba(0,0,0,.35)}.level,.level-small{width:auto;padding-left:9px;padding-right:9px}.level-small{min-width:64px;margin-top:-1px;margin-bottom:-1px;height:20px;line-height:20px;font-size:12px}.level-muted{background-color:#bdbdbd!important}a>.level{margin-bottom:-1px;border-bottom:1px solid;transition:all .2s ease}a>.level:hover{opacity:.8}.level-OK{background-color:#0a0}.level-WARN{background-color:#ed7d20}.level-ERROR{background-color:#d4333f}.level-NONE{background-color:#b4b4b4}",""]),e.exports=t},761:function(e,t,n){var r=n(662),s=n(840);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);var o={insert:"head",singleton:!1},a=(r(s,o),s.locals?s.locals:{});e.exports=a},788:function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"b",(function(){return i})),n.d(t,"d",(function(){return l}));var r=n(129),s=n(176);function o(e){return function(e,t){if(Array.isArray(e))return e.find((function(e){return e.index===t}))}(e,1)}function a(e,t){if(e){var n=e.modeParam||e.parameter||"";switch(e.mode){case"SPECIFIC_ANALYSIS":n=t(e.date);break;case"PREVIOUS_VERSION":n=n||t(e.date);break;case"previous_version":if(!n)return Object(s.translate)("overview.period.previous_version_only_date");break;case"date":n=n&&t(n);break;case"manual_baseline":n=n||t(e.date)}return Object(s.translateWithParameters)("overview.period."+e.mode.toLowerCase(),n)}}function i(e){return e&&e.date?Object(r.parseDate)(e.date):void 0}function l(e){return void 0!==e.project}},810:function(e,t,n){"use strict";var r=n(739),s=n.n(r),o=n(660),a=n(13),i=n(699),l=n.n(i),c=n(176),u=n(691),p=n.n(u);function m(e){var t=e.active,n=e.custom,r=e.disabled,s=e.element,i=e.selected,l=function(){return e.onHover(s)},u=o({active:t,disabled:r}),m=e.renderLabel(s);return a.createElement("li",{onFocus:l,onMouseOver:l},a.createElement(p.a,{checked:Boolean(i),className:u,disabled:r,id:s,onCheck:e.onSelectChange},n?a.createElement("span",{"aria-label":Object(c.translate)("create_new_element")+": "+m,className:"little-spacer-left"},a.createElement("span",{"aria-hidden":!0,className:"little-spacer-right"},"+"),m):a.createElement("span",{className:"little-spacer-left"},m)))}var d,h=(d=function(e,t){return(d=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}d(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),f=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),s=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,i=o.length;a<i;a++,s++)r[s]=o[a];return r},g=function(e){function t(t){var n=e.call(this,t)||this;return n.mounted=!1,n.handleSelectChange=function(e,t){e?n.onSelectItem(t):n.onUnselectItem(t)},n.handleSearchChange=function(e){n.onSearchQuery(n.props.validateSearchInput(e))},n.handleElementHover=function(e){n.setState((function(t,r){return{activeIdx:n.getAllElements(r,t).indexOf(e)}}))},n.handleKeyboard=function(e){switch(e.keyCode){case 40:e.stopPropagation(),e.preventDefault(),n.setState(n.selectNextElement);break;case 38:e.stopPropagation(),e.preventDefault(),n.setState(n.selectPreviousElement);break;case 37:case 39:e.stopPropagation();break;case 13:n.state.activeIdx>=0&&n.toggleSelect(n.getAllElements(n.props,n.state)[n.state.activeIdx])}},n.onSearchQuery=function(e){n.setState({activeIdx:0,loading:!0,query:e}),n.props.onSearch(e).then(n.stopLoading,n.stopLoading)},n.onSelectItem=function(e){n.isNewElement(e,n.props)&&n.onSearchQuery(""),n.props.onSelect(e)},n.onUnselectItem=function(e){return n.props.onUnselect(e)},n.isNewElement=function(e,t){var n=t.selectedElements,r=t.elements;return e.length>0&&-1===n.indexOf(e)&&-1===r.indexOf(e)},n.updateSelectedElements=function(e){n.setState((function(t){return t.query?{selectedElements:e.filterSelected(t.query,e.selectedElements)}:{selectedElements:f(e.selectedElements)}}))},n.updateUnselectedElements=function(e){n.setState((function(t){return 0===e.listSize?{unselectedElements:s()(e.elements,e.selectedElements)}:e.listSize<t.selectedElements.length?{unselectedElements:[]}:{unselectedElements:s()(e.elements,e.selectedElements).slice(0,e.listSize-t.selectedElements.length)}}))},n.getAllElements=function(e,t){return n.isNewElement(t.query,e)?f(t.selectedElements,t.unselectedElements,[t.query]):f(t.selectedElements,t.unselectedElements)},n.setElementActive=function(e){return n.setState({activeIdx:e})},n.selectNextElement=function(e,t){var r=e.activeIdx,s=n.getAllElements(t,e);return r<0||r>=s.length-1?{activeIdx:0}:{activeIdx:r+1}},n.selectPreviousElement=function(e,t){var r=e.activeIdx,s=n.getAllElements(t,e);return r<=0?{activeIdx:s.length-1}:{activeIdx:r-1}},n.stopLoading=function(){n.mounted&&n.setState({loading:!1})},n.toggleSelect=function(e){-1===n.props.selectedElements.indexOf(e)?n.onSelectItem(e):n.onUnselectItem(e)},n.state={activeIdx:0,loading:!0,query:"",selectedElements:[],unselectedElements:[]},n}return h(t,e),t.prototype.componentDidMount=function(){this.mounted=!0,this.onSearchQuery(""),this.updateSelectedElements(this.props),this.updateUnselectedElements(this.props),this.container&&this.container.addEventListener("keydown",this.handleKeyboard,!0)},t.prototype.componentWillReceiveProps=function(e){if(this.props.elements!==e.elements||this.props.selectedElements!==e.selectedElements){this.updateSelectedElements(e),this.updateUnselectedElements(e);var t=this.getAllElements(e,this.state).length;this.state.activeIdx>=t&&this.setState({activeIdx:t-1})}},t.prototype.componentDidUpdate=function(){this.searchInput&&this.searchInput.focus()},t.prototype.componentWillUnmount=function(){this.mounted=!1,this.container&&this.container.removeEventListener("keydown",this.handleKeyboard)},t.prototype.render=function(){var e=this,t=this.props,n=t.allowSelection,r=void 0===n||n,s=t.allowNewElements,i=void 0===s||s,u=t.footerNode,p=void 0===u?"":u,d=this.props.renderLabel,h=this.state,f=h.query,g=h.activeIdx,v=h.selectedElements,y=h.unselectedElements,b=this.getAllElements(this.props,this.state)[g],E=i&&this.isNewElement(f,this.props),O=0===this.props.listSize,_=o("menu",{"menu-vertically-limited":O,"spacer-top":O,"with-top-separator":O,"with-bottom-separator":Boolean(p)});return a.createElement("div",{className:"multi-select",ref:function(t){return e.container=t}},a.createElement("div",{className:"menu-search"},a.createElement(l.a,{autoFocus:!0,className:"little-spacer-top",loading:this.state.loading,onChange:this.handleSearchChange,placeholder:this.props.placeholder,value:f})),a.createElement("ul",{className:_},v.length>0&&v.map((function(t){return a.createElement(m,{active:b===t,element:t,key:t,onHover:e.handleElementHover,onSelectChange:e.handleSelectChange,renderLabel:d,selected:!0})})),y.length>0&&y.map((function(t){return a.createElement(m,{active:b===t,disabled:!r,element:t,key:t,onHover:e.handleElementHover,onSelectChange:e.handleSelectChange,renderLabel:d})})),E&&a.createElement(m,{active:b===f,custom:!0,element:f,key:f,onHover:this.handleElementHover,onSelectChange:this.handleSelectChange,renderLabel:d}),!E&&v.length<1&&y.length<1&&a.createElement("li",{className:"spacer-left"},Object(c.translateWithParameters)("no_results_for_x",f))),p)},t.defaultProps={filterSelected:function(e,t){return t.filter((function(t){return t.includes(e)}))},listSize:0,renderLabel:function(e){return e},validateSearchInput:function(e){return e}},t}(a.PureComponent);t.a=g},815:function(e,t,n){"use strict";n.d(t,"a",(function(){return u}));var r=n(660),s=n(13),o=n(683),a=n.n(o),i=n(760),l=n.n(i),c=n(176);n(761);function u(e){var t=e.allowUpdate,n=void 0!==t&&t,o=e.className,i=e.tags;return s.createElement("span",{"aria-label":Object(c.translateWithParameters)("tags_list_x",i.join(", ")),className:r("tags-list",o)},s.createElement(l.a,{className:"text-middle"}),s.createElement("span",{"aria-hidden":!0,className:"text-ellipsis text-middle",title:i.join(", ")},i.join(", ")),n&&s.createElement(a.a,{className:"text-middle"}))}},817:function(e,t,n){"use strict";var r,s=n(660),o=n(13),a=n(176),i=n(671),l=(r=function(e,t){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return l(t,e),t.prototype.handleClick=function(e){e.preventDefault(),window.open(Object(i.o)(),"Markdown","height=300,width=600,scrollbars=1,resizable=1")},t.prototype.render=function(){return o.createElement("div",{className:s("markdown-tips",this.props.className)},o.createElement("a",{className:"little-spacer-right",href:"#",onClick:this.handleClick},Object(a.translate)("markdown.helplink")),":",o.createElement("span",{className:"spacer-left"},"*",Object(a.translate)("bold"),"*"),o.createElement("span",{className:"spacer-left"},"``",Object(a.translate)("code"),"``"),o.createElement("span",{className:"spacer-left"},"* ",Object(a.translate)("bulleted_point")))},t}(o.PureComponent);t.a=c},840:function(e,t,n){(t=n(663)(!1)).push([e.i,".tags-list{white-space:nowrap;line-height:16px}.tags-list i:before{font-size:12px}.tags-list span{display:inline-block;vertical-align:middle;text-align:left;max-width:220px;padding-left:4px;padding-right:4px}",""]),e.exports=t},844:function(e,t,n){var r=n(662),s=n(845);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);var o={insert:"head",singleton:!1},a=(r(s,o),s.locals?s.locals:{});e.exports=a},845:function(e,t,n){(t=n(663)(!1)).push([e.i,".rating{display:inline-block;width:24px;height:24px;line-height:24px;border-radius:24px;box-sizing:border-box;color:#fff;font-size:16px;font-weight:400;text-align:center;text-shadow:0 0 1px rgba(0,0,0,.35)}.rating-muted{background-color:#bdbdbd!important;color:#fff!important;text-shadow:0 0 1px rgba(0,0,0,.35)!important}a>.rating{margin-bottom:-1px;border-bottom:1px solid;transition:all .2s ease}a>.rating:hover{opacity:.8}.rating-A{line-height:23px;background-color:#0a0}a>.rating-A{border-bottom-color:#0a0}.rating-B{background-color:#b0d513}a .rating-B{border-bottom-color:#b0d513}.rating-C{background-color:#eabe06}a .rating-C{border-bottom-color:#eabe06}.rating-D{background-color:#ed7d20}a .rating-D{border-bottom-color:#ed7d20}.rating-E{background-color:#d4333f}a .rating-E{border-bottom-color:#d4333f}.rating-small{width:18px;height:18px;line-height:18px;margin-top:-1px;margin-bottom:-1px;font-size:12px}",""]),e.exports=t},872:function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(13),s=n(176),o=n(810);n(761);function a(e){return r.createElement(o.a,{elements:e.tags,listSize:e.listSize,onSearch:e.onSearch,onSelect:e.onSelect,onUnselect:e.onUnselect,placeholder:Object(s.translate)("search.search_for_tags"),selectedElements:e.selectedTags,validateSearchInput:i})}function i(e){return e.toLowerCase().replace(/[^-a-z0-9+#.]/gi,"")}},875:function(e,t,n){"use strict";n.d(t,"a",(function(){return c}));var r=n(13),s=n(675),o=n(685),a=Object(s.lazyLoadComponent)((function(){return Promise.all([n.e(25),n.e(374)]).then(n.t.bind(null,1135,7))}),"DonutChart"),i={small:16,normal:24,big:40,huge:60},l={small:2,normal:3,big:3,huge:4};function c(e){var t=e.muted,n=void 0!==t&&t,s=e.size,c=void 0===s?"normal":s,u=e.value,p=[{value:100,fill:"#ccc "}],m=0;if(null!=u){var d=Number(u);p=[{value:d,fill:n?o.colors.gray71:o.colors.green},{value:100-d,fill:n?o.colors.barBackgroundColor:o.colors.lineCoverageRed}],0!==d&&d<100&&(m=.1)}var h=i[c],f=l[c];return r.createElement(a,{data:p,height:h,padAngle:m,thickness:f,width:h})}},906:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(660),s=n(13),o=(n(1061),function(){return(o=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var s in t=arguments[n])Object.prototype.hasOwnProperty.call(t,s)&&(e[s]=t[s]);return e}).apply(this,arguments)}),a=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var s=0;for(r=Object.getOwnPropertySymbols(e);s<r.length;s++)t.indexOf(r[s])<0&&Object.prototype.propertyIsEnumerable.call(e,r[s])&&(n[r[s]]=e[r[s]])}return n};function i(e){var t=e.children,n=e.leading,i=e.onClick,l=e.selected,c=a(e,["children","leading","onClick","selected"]),u=i?{onClick:i,role:"button",tabIndex:0}:{};return s.createElement("div",o({className:r("location-index",{"is-leading":n,selected:l})},u,c),t)}},907:function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(13),s=n(1068),o=n.n(s),a=n(176);function i(e){var t=e.resolution&&" ("+Object(a.translate)("issue.resolution",e.resolution)+")";return r.createElement("span",{className:e.className},r.createElement(o.a,{className:"little-spacer-right",status:e.status}),Object(a.translate)("issue.status",e.status),t)}},945:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(660),s=n(130),o=n(13);n(996),t.default=function(e){var t=e.muted,n=void 0!==t&&t,a=e.size,i=void 0===a?"normal":a,l=e.value,c=r("duplications-rating",{"duplications-rating-small":"small"===i,"duplications-rating-big":"big"===i,"duplications-rating-huge":"huge"===i,"duplications-rating-muted":n||null==l||isNaN(l),"duplications-rating-A":s.inRange(l||0,0,3),"duplications-rating-B":s.inRange(l||0,3,5),"duplications-rating-C":s.inRange(l||0,5,10),"duplications-rating-D":s.inRange(l||0,10,20),"duplications-rating-E":(l||0)>=20});return o.createElement("div",{className:c})}},996:function(e,t,n){var r=n(662),s=n(997);"string"==typeof(s=s.__esModule?s.default:s)&&(s=[[e.i,s,""]]);var o={insert:"head",singleton:!1},a=(r(s,o),s.locals?s.locals:{});e.exports=a},997:function(e,t,n){(t=n(663)(!1)).push([e.i,'.duplications-rating{position:relative;display:inline-flex;vertical-align:top;justify-content:center;align-items:center;width:24px;height:24px;border:3px solid #ed7d20;border-radius:24px;box-sizing:border-box}.duplications-rating-small{width:16px;height:16px;border-width:2px}.duplications-rating-big{width:40px;height:40px;border-width:3px}.duplications-rating-huge{width:60px;height:60px;border-width:4px;border-radius:30px}.duplications-rating-muted{border-color:#bdbdbd!important}.duplications-rating-muted:after{background-color:#bdbdbd!important}.duplications-rating:after{border-radius:24px;content:""}.duplications-rating-A{border-color:#0a0}.duplications-rating-A:after{display:none}.duplications-rating-B{border-color:#b0d513}.duplications-rating-B:after{width:6px;height:6px;background-color:#b0d513}.duplications-rating-small.duplications-rating-B:after{width:2px;height:2px}.duplications-rating-big.duplications-rating-B:after{width:12px;height:12px}.duplications-rating-huge.duplications-rating-B:after{width:18px;height:18px}.duplications-rating-C{border-color:#eabe06}.duplications-rating-C:after{width:8px;height:8px;background-color:#eabe06}.duplications-rating-small.duplications-rating-C:after{width:6px;height:6px}.duplications-rating-big.duplications-rating-C:after{width:16px;height:16px}.duplications-rating-huge.duplications-rating-C:after{width:24px;height:24px}.duplications-rating-D{border-color:#ed7d20}.duplications-rating-D:after{width:12px;height:12px;background-color:#ed7d20}.duplications-rating-small.duplications-rating-D:after{width:8px;height:8px}.duplications-rating-big.duplications-rating-D:after{width:24px;height:24px}.duplications-rating-huge.duplications-rating-D:after{width:36px;height:36px}.duplications-rating-E{border-color:#d4333f}.duplications-rating-E:after{width:14px;height:14px;background-color:#d4333f}.duplications-rating-small.duplications-rating-E:after{width:10px;height:10px}.duplications-rating-big.duplications-rating-E:after{width:28px;height:28px}.duplications-rating-huge.duplications-rating-E:after{width:42px;height:42px}',""]),e.exports=t}}]);
  //# sourceMappingURL=287.1593679646964.chunk.js.map