build/static/js/63.9e373d70.chunk.js

1 line
30 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

(this.webpackJsonp=this.webpackJsonp||[]).push([[63],{"0lcf":function(e,t,n){"use strict";n.r(t);n("SchZ"),n("u3En")},"6JOy":function(e,t,n){},AubP:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=u(n("NUBc"));n("YQTV");var r=u(n("q1tI")),l=n("spEH"),o=u(n("Rs/d")),i=n("PhNK"),s=n("sYIF"),c=n("eO8H");function u(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.commits,n=e.projectsId,u=e.owner,f=e.total,d=e.limit,p=e.changeCommitFunc;return r.default.createElement("div",{className:"pb20"},t.map((function(e,t){return r.default.createElement("div",{className:"prCommits"},r.default.createElement("p",{className:"prCreate"},e.created_at),r.default.createElement("div",{className:"prInfo"},r.default.createElement(l.FlexAJ,null,r.default.createElement(l.AlignCenter,null,r.default.createElement(c.Link,{to:"/"+u+"/"+n+"/commits/"+(0,i.truncateCommitId)(""+e.sha),className:"commitKey",style:{marginLeft:0}},(0,i.truncateCommitId)(""+e.sha)),r.default.createElement("p",{className:"ml15 font-16 color-grey-3 task-hide",style:{maxWidth:"700px"}},e.message)),r.default.createElement(c.Link,{to:"/"+u+"/"+n+"/commits/"+(0,i.truncateCommitId)(e.sha),className:"color-blue"},"浏览代码")),r.default.createElement(l.AlignCenter,{className:"mt15"},r.default.createElement(o.default,{url:(0,s.getImageUrl)("/"+(e.committer&&e.committer.image_url)),name:""+(e.committer&&e.committer.name)}),r.default.createElement("span",null,":提交于",e.time_from_now))))})),f>d&&r.default.createElement("div",{style:{textAlign:"center",paddingTop:"20px"}},r.default.createElement(a.default,{pageSize:d,total:f,onChange:function(e){return p(e)}})))}},Fyak:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=u(n("ZTPi")),r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},l=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}();n("AUBz");var o=n("q1tI"),i=u(o),s=u(n("AubP")),c=u(n("aABL"));function u(e){return e&&e.__esModule?e:{default:e}}n("6JOy"),n("js5m");var f=a.default.TabPane,d=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.changeTab=function(e){n.setState({activeKey:e})},n.changeCommitFunc=function(e){var t=n.props.changeCommitFunc;t&&t(e)},n.state={activeKey:"1"},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),l(t,[{key:"render",value:function(){var e=this.props.match.params,t=e.projectsId,n=e.owner,l=this.props,o=l.comparesData,u=void 0===o?{}:o,d=l.limit,p=u.commits,m=u.diff,h=u.commits_count,g=this.state.activeKey;return p&&0===p.length||!m?"":i.default.createElement("div",{className:"main mergeRequest",style:{paddingTop:"0px"}},i.default.createElement(a.default,{activeKey:g,className:"custom-commit-tabs",animated:!1,onChange:this.changeTab},p&&p.length>0&&i.default.createElement(f,{tab:i.default.createElement("span",null,i.default.createElement("span",{className:"font-16"},"提交"),h>0&&i.default.createElement("span",{className:"tabNum"},h)),key:"1"},i.default.createElement(s.default,r({},this.props,{commits:p,total:h,limit:d,changeCommitFunc:this.changeCommitFunc,projectsId:t,owner:n}))),m&&m.files&&m.files.length>0&&i.default.createElement(f,{tab:i.default.createElement("span",null,i.default.createElement("span",{className:"font-16"},"文件"),m.files_count>0&&i.default.createElement("span",{className:"tabNum"},m.files_count)),key:"3"},i.default.createElement(c.default,r({},this.props,{data:m,projectsId:t,owner:n})))))}}]),t}(o.Component);t.default=d},PhNK:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.truncateCommitId=function(e){return e&&e.length>11?e.substring(0,10):e},t.timeFormat=function(e){var t=new Date(1e3*e),n=t.getHours()<10?"0".concat(t.getHours()):t.getHours(),a=t.getMinutes()<10?"0".concat(t.getMinutes()):t.getMinutes();return t.getFullYear()+"-"+(t.getMonth()+1)+"-"+t.getDate()+" "+n+":"+a}},QCvN:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=g(n("W9HT")),r=g(n("2/Rp")),l=g(n("Vl3Y")),o=g(n("5rEg")),i=g(n("mr32")),s=g(n("BvKs")),c=g(n("2fM7")),u=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},f=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}();n("04bd"),n("L/Qf"),n("tULf"),n("1vPl"),n("0lcf"),n("2WkQ"),n("8QGh");var d=n("q1tI"),p=g(d),m=g(n("vDqi"));n("6JOy"),n("js5m");var h=g(n("p7gc"));function g(e){return e&&e.__esModule?e:{default:e}}var y=c.default.Option,v=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.componentDidMount=function(){n.get_default_selects(),n.set_defatul()},n.componentDidUpdate=function(e){var t=n.props.match.params,a=t.projectsId,r=t.owner,l=e.match.params.projectsId,o=e.match.params.owner;l===a&&o===r||n.get_default_selects(),e&&n.props&&!n.props.checkIfLogin()&&n.props.history.push("/403")},n.get_default_selects=function(){var e=n.props.match.params,t=e.projectsId,a=e.owner;n.setState({isSpin:!0}),m.default.get("/"+a+"/"+t+"/pulls/create_merge_infos.json").then((function(e){e&&n.setState({members:e.data.members,issue_tags:e.data.issue_tags,issue_versions:e.data.issue_versions,issue_priories:e.data.issue_priories}),n.setState({isSpin:!1})})).catch((function(e){n.setState({isSpin:!1}),console.log(e)}))},n.set_defatul=function(){var e=n.props,t=e.data,a=e.merge_type;t&&"edit"===a&&n.setState({desc:t.body,issue_tag_ids:t.issue_tag_ids?t.issue_tag_ids[0]:void 0,fixed_version_id:t.fixed_version_id?String(t.fixed_version_id):void 0,assigned_to_id:t.assigned_to_id?String(t.assigned_to_id):void 0,priority_id:t.priority_id?String(t.priority_id):void 0,title:t.title}),n.InitData()},n.InitData=function(){setTimeout((function(){n.props.form.setFieldsValue(u({},n.state))}),100)},n.onPanelChange=function(e,t){n.setState({value:e})},n.onSelect=function(e){n.setState({value:e,selectedValue:e})},n.renderMenu=function(e,t){return p.default.createElement(s.default,null,e&&e.length>0&&e.map((function(e,a){return p.default.createElement(s.default.Item,{key:e,onClick:function(){return n.getOption(e,t)}},e)})))},n.renderSelect=function(e){if(e&&e.length>0)return e.map((function(e,t){return p.default.createElement(y,{key:t+1,value:e.id+""},e.name)}))},n.handleSubmit=function(){n.setState({isSpin:!0}),n.props.form.validateFieldsAndScroll((function(e,t){if(e)n.setState({isSpin:!1});else{var a=n.props.match.params,r=a.projectsId,l=a.mergeId,o=a.owner,i=n.props,s=i.merge,c=i.pull,f=i.merge_type,d=i.data,p=i.commits_count,h=i.files_count;t.issue_tag_ids&&t.issue_tag_ids.length>0?t.issue_tag_ids=[parseInt(t.issue_tag_ids)]:t.issue_tag_ids=[];var g=n.state,y=g.desc,v=g.atWhoLoginList;if("new"===f){var b="/"+o+"/"+r+"/pulls.json";m.default.post(b,u({},t,{body:y,head:c,base:s,is_original:d&&d.is_original,fork_project_id:d&&d.fork_project_id,merge_user_login:d&&d.merge_user_login,files_count:h,commits_count:p,receivers_login:v})).then((function(e){if(e){n.setState({isSpin:!1});var t=e.data.pull_request_number;n.props.history.push("/"+o+"/"+r+"/pulls/"+t);var a=n.props.getDetail;a&&a()}else n.setState({isSpin:!1})})).catch((function(e){n.setState({isSpin:!1})}))}else{var _="/"+o+"/"+r+"/pulls/"+l+".json";m.default.put(_,u({},t,{body:y,head:c,base:s,receivers_login:v})).then((function(e){e?(n.setState({isSpin:!1}),n.props.history.push("/"+o+"/"+r+"/pulls/"+l)):n.setState({isSpin:!1})})).catch((function(e){n.setState({isSpin:!1}),console.log(e)}))}}}))},n.onContentChange=function(e){n.setState({desc:e})},n.changeAtWhoLoginList=function(e){n.setState({atWhoLoginList:e})},n.state={desc:void 0,issue_tag_ids:void 0,fixed_version_id:void 0,assigned_to_id:void 0,titledata:void 0,isSpin:!1,mergedata:void 0,priority_id:void 0,title:void 0,members:void 0,issue_tags:void 0,issue_versions:void 0,issue_priories:void 0,atWhoLoginList:void 0},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),f(t,[{key:"render",value:function(){var e=this,t=this.props.merge_type,n=this.props.form.getFieldDecorator,s=this.props.match.params,u=s.projectsId,f=s.mergeId,d=s.owner,m=this.state,g=m.issue_tag_ids,v=m.fixed_version_id,b=m.assigned_to_id,_=m.priority_id,E=m.desc,w=m.isSpin,O=m.title,C=m.members,j=m.issue_tags,S=m.issue_versions,N=m.issue_priories;return p.default.createElement("div",null,p.default.createElement(a.default,{spinning:w},p.default.createElement("div",{className:"mb20"},p.default.createElement("span",{className:"font-16 fwb mr10 ver-middle"},"new"===t?"新建":"编辑","合并请求:"),p.default.createElement(i.default,{color:"#28BD6C",className:"ver-middle"},"可合并的")),p.default.createElement(l.default,null,p.default.createElement("div",{className:"width100 inline-block"},p.default.createElement("div",{className:"width70 pull-left"},p.default.createElement(l.default.Item,null,n("title",{rules:[{required:!0,message:"请填写请求标题"}],initialValue:O})(p.default.createElement(o.default,{placeholder:"标题",maxLength:200}))),p.default.createElement(h.default,{placeholder:"请输入合并请求的描述...",height:450,mdID:"merge-new-description",initValue:E,onChange:this.onContentChange,isCanAtme:!0,changeAtWhoLoginList:this.changeAtWhoLoginList,owner:d,projectsId:u}),p.default.createElement("p",{className:"clearfix mt20"},p.default.createElement(r.default,{type:"primary",loading:w,onClick:this.handleSubmit},p.default.createElement("span",{className:"plr10"},"new"===t?"创建":"提交")),p.default.createElement(r.default,{type:"default",className:"ml30",onClick:function(){e.props.history.push("new"===t?"/"+d+"/"+u+"/pulls":"/"+d+"/"+u+"/pulls/"+f)}},p.default.createElement("span",{className:"plr10"},"取消")))),p.default.createElement("div",{className:"width30 pull-left"},p.default.createElement("div",{className:"pl30"},p.default.createElement(l.default.Item,null,n("assigned_to_id",{initialValue:b})(p.default.createElement(c.default,{placeholder:"未选择审查人员",showSearch:!0,className:"searchIcon",suffixIcon:p.default.createElement("i",{className:"iconfont icon-sousuo1"}),optionFilterProp:"children",filterOption:function(e,t){return t.props.value&&t.props.children&&t.props.children.toLowerCase().indexOf(e.toLowerCase())>=0}},p.default.createElement(y,{key:0,value:""},"未选择审查人员"),this.renderSelect(C)))),p.default.createElement(l.default.Item,null,n("fixed_version_id",{initialValue:v})(p.default.createElement(c.default,{placeholder:S&&S.length>0?"未选择里程碑":"请添加里程碑",showSearch:!0,className:"searchIcon",suffixIcon:p.default.createElement("i",{className:"iconfont icon-sousuo1"}),optionFilterProp:"children",filterOption:function(e,t){return t.props.value&&t.props.children&&t.props.children.toLowerCase().indexOf(e.toLowerCase())>=0}},p.default.createElement(y,{key:0,value:""},S&&S.length>0?"未选择里程碑":"请添加里程碑"),this.renderSelect(S)))),p.default.createElement(l.default.Item,null,n("issue_tag_ids",{initialValue:g})(p.default.createElement(c.default,{placeholder:j&&j.length>0?"未选择标记":"请在仓库设置里添加标记",showSearch:!0,className:"searchIcon",suffixIcon:p.default.createElement("i",{className:"iconfont icon-sousuo1"}),optionFilterProp:"children",filterOption:function(e,t){return t.props.value&&t.props.children&&t.props.children.toLowerCase().indexOf(e.toLowerCase())>=0}},p.default.createElement(y,{key:0,value:""},j&&j.length>0?"未选择标记":"请在仓库设置里添加标记"),this.renderSelect(j)))),p.default.createElement(l.default.Item,null,n("priority_id",{initialValue:_})(p.default.createElement(c.default,{placeholder:"优先级",showSearch:!0},this.renderSelect(N))))))))))}}]),t}(d.Component),b=l.default.create({name:"NewMergeForm"})(v);t.default=b},"Rs/d":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a,r,l=(a=["\n display:flex;\n font-weight: bold;\n ","\n align-items: center;\n & img{\n width:30px;\n height:30px;\n border-radius:50%;\n }\n ","\n "],r=["\n display:flex;\n font-weight: bold;\n ","\n align-items: center;\n & img{\n width:30px;\n height:30px;\n border-radius:50%;\n }\n ","\n "],Object.freeze(Object.defineProperties(a,{raw:{value:Object.freeze(r)}}))),o=c(n("q1tI")),i=c(n("vOnD")),s=n("eO8H");function c(e){return e&&e.__esModule?e:{default:e}}t.default=function(e){var t=e.url,n=e.name,a=e.column,r=e.id,c=e.login,u=i.default.span(l,a&&"flex-direction: column;text-align:center;",!a&&"\n & span{\n margin-left:8px;\n }");return r?o.default.createElement(s.Link,{to:"/"+c},o.default.createElement(u,null,t&&o.default.createElement("img",{src:t,alt:""}),o.default.createElement("span",null,n))):o.default.createElement(u,null,t&&o.default.createElement("img",{src:t,alt:""}),o.default.createElement("span",null,n))}},VPG4:function(e,t,n){},aABL:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=u(n("3S7+")),r=u(n("CFYs")),l=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var n=[],a=!0,r=!1,l=void 0;try{for(var o,i=e[Symbol.iterator]();!(a=(o=i.next()).done)&&(n.push(o.value),!t||n.length!==t);a=!0);}catch(e){r=!0,l=e}finally{try{!a&&i.return&&i.return()}finally{if(r)throw l}}return n}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};n("TfFZ"),n("D8SU");var o=n("q1tI"),i=u(o),s=n("PhNK"),c=n("spEH");function u(e){return e&&e.__esModule?e:{default:e}}n("js5m"),n("VPG4"),t.default=function(e){var t=e.data,n=e.history,u=e.owner,f=e.projectsId,d=e.parentsSha,p=(0,o.useState)(t&&t.files),m=l(p,2),h=m[0],g=m[1],y=(0,o.useState)("复制文件路径"),v=l(y,2),b=v[0],_=v[1],E=(0,o.useState)(!1),w=l(E,2),O=w[0],C=w[1];function j(e,t,n){if(!n){var a=h.concat();a[t].flag=!e,a.splice(),g(a)}}(0,o.useEffect)((function(){t&&g(t.files)}),[t]),(0,o.useEffect)((function(){document.addEventListener("click",(function(){C(!1)}))}),[]);var S=i.default.createElement("div",{className:"folders"},i.default.createElement("div",{className:"folderList"},h&&h.map((function(e,t){return i.default.createElement("a",{href:"#value"+t},i.default.createElement(c.FlexAJ,{className:"filesInfo",key:t,onClick:function(){e.flag&&j(e.flag,t,e.isBin),C(!1)}},i.default.createElement(c.AlignCenter,null,i.default.createElement("i",{className:"iconfont icon-wenjianicon mr4"}),i.default.createElement("span",{className:"cursor-pointer","data-clipboard-text":e.name},e.name)),i.default.createElement("div",{className:"see-file"},i.default.createElement(a.default,{placement:"top",title:e.addition+e.deletion+"处更改"+(e.addition+e.deletion>0?"":"")+(e.addition>0?e.addition+"处添加":"")+(e.addition>0&&e.deletion>0?"和":"")+(e.deletion>0?e.deletion+"处删除":"")},i.default.createElement(r.default,{showInfo:!1,strokeColor:"#2DB44D",size:"small",percent:e.addition/(e.addition+e.deletion)*100}),e.addition>0&&i.default.createElement("span",{className:"color-green ml10"},"+",e.addition),e.deletion>0&&i.default.createElement("span",{className:"color-red ml10"},"-",e.deletion)))))}))));return i.default.createElement("div",{onClick:function(e){e.nativeEvent.stopImmediatePropagation()}},i.default.createElement(c.AlignCenter,{className:"color-grey-9",style:{position:"relative"}},i.default.createElement("div",{onClick:function(){C(!O)}},i.default.createElement("i",{className:"iconfont mr5 "+(O?"font-18 icon-sanjiaoxing-down":"font-16 icon-triangle")}),i.default.createElement("span",{className:"color-grey-6 update-file-count"},"共有",i.default.createElement("span",{className:"color-grey-3"}," ",t&&t.files_count," 个文件 "),"被更改,包括",t&&t.total_addition?i.default.createElement("span",{className:"color-green"}," ",t&&t.total_addition," 次插入"):"",t&&t.total_addition&&t.total_deletion?" 和 ":"",t&&t.total_deletion?i.default.createElement("span",{className:"color-red"}," ",t&&t.total_deletion," 次删除"):"")),O&&S),h&&h.length>0&&i.default.createElement("div",{className:"fileList"},h.map((function(e,t){return i.default.createElement("div",{className:"files",key:t},i.default.createElement("a",{id:"value"+t,className:"anchorPoint"}),i.default.createElement(c.FlexAJ,{className:"filesInfo"},i.default.createElement(c.AlignCenter,null,e.isBin?"":i.default.createElement("i",{className:e.flag?"iconfont icon-triangle font-15 color-grey-9":"iconfont icon-sanjiaoxing-down color-grey-9 mt4",onClick:function(){return j(e.flag,t,e.isBin)}}),i.default.createElement("span",{className:"cursor-pointer","data-clipboard-text":e.name,onClick:function(){return j(e.flag,t,e.isBin)}},e.name),i.default.createElement(a.default,{title:b,onVisibleChange:function(){return _("复制文件路径")}},i.default.createElement("i",{className:"iconfont icon-fuzhiicon ml6",onClick:function(){return t=e.name,(n=document.createElement("input")).defaultValue=t,document.body.appendChild(n),n.select(),document.execCommand("Copy"),n.className="copyCont",n.style.display="none",void _("复制成功");var t,n}}))),i.default.createElement("div",{className:"see-file"},i.default.createElement(a.default,{placement:"top",title:e.addition+e.deletion+"处更改"+(e.addition+e.deletion>0?"":"")+" "+(e.addition>0?e.addition+"处添加":"")+(e.addition>0&&e.deletion>0?"和":"")+(e.deletion>0?e.deletion+"处删除":"")},i.default.createElement(r.default,{showInfo:!1,strokeColor:"#2DB44D",size:"small",percent:e.addition/(e.addition+e.deletion)*100}),i.default.createElement("span",{className:"ml10"},e.addition+e.deletion,"处")),!e.isSubmodule&&i.default.createElement("span",{className:"see-file-btn",onClick:function(){n.push("/"+u+"/"+f+(e.isDeleted?"/commits/"+(0,s.truncateCommitId)(d):"/tree/"+(0,s.truncateCommitId)(e.sha)+"/"+e.name))}},"查看文件"))),e.sections&&e.sections.length>=1&&!e.flag&&i.default.createElement("div",{className:"filesContent"},e.sections.map((function(e,t){return e.lines&&e.lines.length>0&&e.lines.map((function(e,n){return i.default.createElement("div",{key:t+n,className:2===e.type?"linesContent add":3===e.type?"linesContent reduce":4===e.type?"linesContent translate":"linesContent"},i.default.createElement("span",{className:"lines"},i.default.createElement("span",null,e.leftIdx&&"0"!==e.leftIdx?e.leftIdx:""),i.default.createElement("span",null,e.rightIdx&&"0"!==e.rightIdx?e.rightIdx:"")),i.default.createElement("p",null,e.content))}))}))))}))))}},js5m:function(e,t,n){},mr32:function(e,t,n){"use strict";n.r(t);var a=n("q1tI"),r=n("TSYQ"),l=n.n(r),o=n("BGR+"),i=n("VCL8"),s=n("CtXQ"),c=n("H84U");function u(e){return(u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function f(){return(f=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function d(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function p(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function m(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function h(e,t){return(h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=v(e);if(t){var r=v(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return y(this,n)}}function y(e,t){return!t||"object"!==u(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function v(e){return(v=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var b=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n},_=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(i,e);var t,n,r,o=g(i);function i(){var e;return p(this,i),(e=o.apply(this,arguments)).handleClick=function(){var t=e.props,n=t.checked,a=t.onChange;a&&a(!n)},e.renderCheckableTag=function(t){var n,r=t.getPrefixCls,o=e.props,i=o.prefixCls,s=o.className,c=o.checked,u=b(o,["prefixCls","className","checked"]),p=r("tag",i),m=l()(p,(d(n={},"".concat(p,"-checkable"),!0),d(n,"".concat(p,"-checkable-checked"),c),n),s);return delete u.onChange,a.createElement("span",f({},u,{className:m,onClick:e.handleClick}))},e}return t=i,(n=[{key:"render",value:function(){return a.createElement(c.a,null,this.renderCheckableTag)}}])&&m(t.prototype,n),r&&m(t,r),i}(a.Component),E=n("09Wf"),w=n("6CfX"),O=n("g0mS");function C(e){return(C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function j(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function S(){return(S=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e}).apply(this,arguments)}function N(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}function k(e,t){return(k=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,a=I(e);if(t){var r=I(this).constructor;n=Reflect.construct(a,arguments,r)}else n=a.apply(this,arguments);return P(this,n)}}function P(e,t){return!t||"object"!==C(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function I(e){return(I=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var T=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(a=Object.getOwnPropertySymbols(e);r<a.length;r++)t.indexOf(a[r])<0&&Object.prototype.propertyIsEnumerable.call(e,a[r])&&(n[a[r]]=e[a[r]])}return n},L=new RegExp("^(".concat(E.a.join("|"),")(-inverse)?$")),D=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&k(e,t)}(u,e);var t,n,r,i=x(u);function u(e){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),(t=i.call(this,e)).state={visible:!0},t.handleIconClick=function(e){e.stopPropagation(),t.setVisible(!1,e)},t.renderTag=function(e){var n=t.props,r=n.children,l=T(n,["children"]),i="onClick"in l||r&&"a"===r.type,s=Object(o.default)(l,["onClose","afterClose","color","visible","closable","prefixCls"]);return i?a.createElement(O.a,null,a.createElement("span",S({},s,{className:t.getTagClassName(e),style:t.getTagStyle()}),r,t.renderCloseIcon())):a.createElement("span",S({},s,{className:t.getTagClassName(e),style:t.getTagStyle()}),r,t.renderCloseIcon())},Object(w.a)(!("afterClose"in e),"Tag","'afterClose' will be deprecated, please use 'onClose', we will remove this in the next version."),t}return t=u,r=[{key:"getDerivedStateFromProps",value:function(e){return"visible"in e?{visible:e.visible}:null}}],(n=[{key:"getTagStyle",value:function(){var e=this.props,t=e.color,n=e.style,a=this.isPresetColor();return S({backgroundColor:t&&!a?t:void 0},n)}},{key:"getTagClassName",value:function(e){var t,n=e.getPrefixCls,a=this.props,r=a.prefixCls,o=a.className,i=a.color,s=this.state.visible,c=this.isPresetColor(),u=n("tag",r);return l()(u,(j(t={},"".concat(u,"-").concat(i),c),j(t,"".concat(u,"-has-color"),i&&!c),j(t,"".concat(u,"-hidden"),!s),t),o)}},{key:"setVisible",value:function(e,t){var n=this.props,a=n.onClose,r=n.afterClose;a&&a(t),r&&!a&&r(),t.defaultPrevented||"visible"in this.props||this.setState({visible:e})}},{key:"isPresetColor",value:function(){var e=this.props.color;return!!e&&L.test(e)}},{key:"renderCloseIcon",value:function(){return this.props.closable?a.createElement(s.default,{type:"close",onClick:this.handleIconClick}):null}},{key:"render",value:function(){return a.createElement(c.a,null,this.renderTag)}}])&&N(t.prototype,n),r&&N(t,r),u}(a.Component);D.CheckableTag=_,D.defaultProps={closable:!1},Object(i.polyfill)(D);t.default=D},u3En:function(e,t,n){},vhIH:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=p(n("W9HT")),r=p(n("5rEg")),l=p(n("2/Rp")),o=p(n("2fM7")),i=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(e[a]=n[a])}return e},s=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}();n("04bd"),n("1vPl"),n("L/Qf"),n("8QGh");var c=n("q1tI"),u=p(c),f=p(n("vDqi"));n("6JOy"),n("js5m");var d=p(n("QCvN"));p(n("Fyak"));function p(e){return e&&e.__esModule?e:{default:e}}o.default.Option;var m=function(e){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.componentDidMount=function(){n.getmergelist()},n.getmergelist=function(){n.setState({isSpin:!0});var e=n.props.match.params,t=e.projectsId,a=e.mergeId,r="/"+e.owner+"/"+t+"/pulls/"+a+"/edit.json";f.default.get(r).then((function(e){e?n.setState({isSpin:!1,data:e.data,pull:e.data.head,merge:e.data.base}):n.setState({isSpin:!1})})).catch((function(e){n.setState({isSpin:!1}),console.log(e)}))},n.state={data:void 0,merge:void 0,pull:void 0,isSpin:!1},n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(t,e),s(t,[{key:"render",value:function(){var e=this.state,t=e.data,n=e.isSpin,s=e.pull,c=e.merge;return u.default.createElement("div",null,u.default.createElement("div",{className:"main updateMerge"},u.default.createElement(a.default,{spinning:n}," ",t?u.default.createElement("div",null,u.default.createElement("div",{className:"merge-header width100 inline-block"},u.default.createElement("div",{className:"width45 pull-left"},u.default.createElement("div",{className:"color-grey-3 mb10 fwb"},"源分支 : "),u.default.createElement(r.default.Group,{compact:!0,className:"display-flex"},u.default.createElement(l.default,{className:"merge-header-button flex1 maxW50 hide-1 task-hide",disabled:!0},t.is_original?t.fork_project_user_name+"/"+t.fork_project_identifier:t.project_author+"/"+t.project_name),u.default.createElement(o.default,{defaultValue:t.is_original?t.fork_project_user+":"+s:""+s,className:"minW50 merge-flex1 flex1 matchwidth",disabled:!0})," ")," ")," ",u.default.createElement("div",{className:"width10 pull-left text-center mt25"},u.default.createElement("i",{className:"iconfont icon-youjiang color-grey-c font-32"})," ")," ",u.default.createElement("div",{className:"width45 pull-left"},u.default.createElement("div",null,u.default.createElement("div",{className:"color-grey-3 mb10 fwb"}," 目标分支 : ")," ",u.default.createElement(r.default.Group,{compact:!0,className:"display-flex"},u.default.createElement(l.default,{className:"merge-header-button flex1 maxW50 hide-1 task-hide",disabled:!0},t.project_author+"/"+t.project_name),u.default.createElement(o.default,{defaultValue:t.is_original?t.project_login+":"+c:""+c,className:"minW50 merge-flex1 flex1 matchwidth",disabled:!0})," ")," ")," ")," "),u.default.createElement(d.default,i({},this.props,{merge_type:"edit",data:t,merge:c,pull:s}))," "):"")))}}]),t}(c.Component);t.default=m}}]);