(this.webpackJsonp=this.webpackJsonp||[]).push([[68],{"E+/Y":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.httpUrl=void 0;var n,r=a("JGtk"),l=(n=r)&&n.__esModule?n:{default:n};var i=JSON.parse(localStorage.chromesetting),o=i&&i.common.wiki,u=(0,l.default)(o);t.httpUrl=o;t.default=u},FRFo:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=o(a("3S7+")),r=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var a=[],n=!0,r=!1,l=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done)&&(a.push(i.value),!t||a.length!==t);n=!0);}catch(e){r=!0,l=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw l}}return a}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};a("TfFZ");var l=a("q1tI"),i=o(l);function o(e){return e&&e.__esModule?e:{default:e}}function u(e){var t=e.beforeText,a=e.afterText,o=e.className,u=e.inputId,c=e.timeOut,d=(0,l.useState)((function(){return t})),s=r(d,2),f=s[0],m=s[1],p=(0,l.useCallback)((function(){var e=document.querySelector("#"+u);e?(e.select(),document.execCommand("copy")&&document.execCommand("copy"),document.getSelection().removeAllRanges(),m(a),c&&setTimeout((function(){m(t)}),1500)):console.error("您的CopyTool未设置正确的inputId")}),[]);return i.default.createElement(n.default,{placement:"top",title:f,onVisibleChange:function(){m(t)}},i.default.createElement("i",{className:"iconfont icon-fuzhiicon "+o,style:{color:"#466aff"},onClick:p}))}u.defaultProps={beforeText:"复制链接",afterText:"复制成功",className:"",inputId:"copyText",timeOut:!0},t.default=(0,l.memo)(u)},G99X:function(e,t,a){},H5Q0:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var a=[],n=!0,r=!1,l=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done)&&(a.push(i.value),!t||a.length!==t);n=!0);}catch(e){r=!0,l=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw l}}return a}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")};t.default=function(e){var t=document.createElement("div");function a(){i.unmountComponentAtNode(t)&&t.parentNode&&t.parentNode.removeChild(t)}document.body.appendChild(t),setTimeout((function(){i.render(l.default.createElement(c,{afterClose:a}),t)}))};var r=a("q1tI"),l=u(r),i=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&(t[a]=e[a]);return t.default=e,t}(a("i8i4")),o=u(a("CWZq"));function u(e){return e&&e.__esModule?e:{default:e}}function c(e){var t=e.afterClose,a=(0,r.useState)(!0),i=n(a,2),u=i[0],c=i[1];return l.default.createElement(o.default,{isRender:u,Modifyloginvalue:function(){c(!1),t()}})}},JGtk:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TokenKey=void 0;var n=u(a("TeRw")),r=u(a("tsqr"));t.default=function(e){window.location.href.indexOf("localhost")<0&&(l.default.defaults.withCredentials=!0);var t=l.default.create({baseURL:e,timeout:18e5});return t.interceptors.request.use((function(e){if(i.default.load(c)&&(e.headers.Authorization=i.default.load(c)),"3007"===window.location.port){var t=i.default.load(c);-1===e.url.indexOf("?")?e.url=e.url+"?token="+t:e.url=e.url+"&token="+t}return e}),(function(e){console.log(e)})),t.interceptors.response.use((function(e){var t=e||{};return 400===t.status?(r.default.error(t.data.message||"操作失败"),Promise.reject("error")):401===t.status?(r.default.error(t.data.message||"登录信息已过期"),Promise.reject("error")):403===t.status?(r.default.error(t.data.message||"无权限!"),Promise.reject("error")):40001===t.status?(n.default.open({message:"提示",description:"账户或密码错误!"}),Promise.reject("error")):200===e.status||200===t.status?e.data:void n.default.open({message:"提示",description:t.message})}),(function(e){console.log(e);var t=e.response||{};return 400===t.status?(r.default.error(t.data.message||"操作失败"),Promise.reject("error")):401===t.status?(r.default.error(t.data.message||"登录信息已过期"),(0,o.default)(),Promise.reject("error")):403===t.status?(r.default.error(t.data.message||"无权限!"),Promise.reject("error")):(n.default.open({message:"提示",description:e.message}),Promise.reject(e))})),t},a("O+I2"),a("8/o9");var l=u(a("vDqi")),i=u(a("Po8q")),o=u(a("H5Q0"));function u(e){return e&&e.__esModule?e:{default:e}}var c=t.TokenKey="autologin_trustie"},dINp:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=T(a("W9HT")),r=T(a("jsC+")),l=T(a("8z0m")),i=T(a("3S7+")),o=T(a("2/Rp")),u=T(a("CtXQ")),c=T(a("BvKs")),d=T(a("tsqr")),s=T(a("2fM7")),f=T(a("5rEg")),m=Object.assign||function(e){for(var t=1;t|%-+_]/g.test(e.name)){var t=!0,a=!1,n=void 0;try{for(var r,l=A[Symbol.iterator]();!(t=(r=l.next()).done);t=!0){if(r.value.name===e.name)return d.default.error("不能上传与已有文件相同文件名的文件"),!1}}catch(e){a=!0,n=e}finally{try{!t&&l.return&&l.return()}finally{if(a)throw n}}var i=e.size/1024/1024<100;return i||T("文件大小必须小于100MB!"),i}d.default.error("文件名不能有特殊字符")},onChange:function(e){if("uploading"===e.file.status&&console.log(e.file,e.fileList),"done"===e.file.status)if("200"===e.file.response.message)d.default.success(e.file.name+" 上传成功"),$(Math.random());else if("500"===e.file.response.message){var t=JSON.parse(e.file.response.data);d.default.error(t&&t.message?t.message:"文件上传失败")}else d.default.error("文件上传失败");else"error"===e.file.status&&d.default.error(e.file.name+" 上传失败")}};return y.default.createElement(n.default,{spinning:!A,className:"opacitySpin"},A&&A.length?y.default.createElement("div",{className:"wiki-main"},y.default.createElement("div",{className:"wiki-head"},y.default.createElement("span",{className:"head-title"},I?y.default.createElement(o.default,{type:"default",onClick:function(){a.push("/"+M+"/"+x+"/wiki/add")}},y.default.createElement(u.default,{type:"plus"}),"新增页面"):"Wiki文档"),y.default.createElement("div",null,I&&y.default.createElement(l.default,ie,y.default.createElement(i.default,{placement:"top",title:"支持导入txt、markdown格式文件"},y.default.createElement(o.default,{type:"default",className:"ml10"},y.default.createElement(u.default,{type:"plus"}),"导入模板"))),y.default.createElement(r.default,{overlay:re},y.default.createElement(o.default,{type:"default",className:"ml10"},"导出",y.default.createElement(u.default,{type:"caret-down"}))),y.default.createElement(o.default,{type:"default",className:"ml10",onClick:function(){window.open("/"+M+"/"+x+"/wiki/preview/"+encodeURI(P.name)+"/"+P.id)}},"预览"))),y.default.createElement("div",{className:"wiki-body"},y.default.createElement("div",{className:"wiki-nav-parent"},y.default.createElement("div",{className:"wiki-nav"},y.default.createElement(j,{placeholder:"输入关键字搜索文件",className:"wiki-search",onChange:function(e){var t=e.target.value,a=[],n=!0,r=!1,l=void 0;try{for(var i,o=A[Symbol.iterator]();!(n=(i=o.next()).done);n=!0){var u=i.value;u.name.indexOf(t)>-1&&a.push(u)}}catch(e){r=!0,l=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw l}}X(a)}}),B.map((function(e){return y.default.createElement("div",{className:"wiki-nav-title-parent",key:e.name},y.default.createElement("div",{className:"wiki-nav-title "+(e.name===H.name?"active":""),onClick:function(){D(e)}},y.default.createElement("div",{className:"nav-title-left"},y.default.createElement("i",{className:"iconfont icon-wenjianjia2 mr3"}),y.default.createElement("span",{className:"nav-title-left-text"},e.name)),I&&y.default.createElement("i",{className:"iconfont icon-shanchuicon1 delete-title-icon color-grey-6",onClick:function(t){!function(e,t){e.stopPropagation(),(0,E.default)({title:"删除页面",contentTitle:"您确定要删除“"+t.name+"”此页面吗?",content:"此操作将删除该页面,请进行确认以防文件的丢失",onOk:function(){(0,N.deleteWiki)({owner:M,repo:x,pagename:t.name,projectId:P.id}).then((function(e){e&&"200"===e.message?(d.default.success("删除成功"),$(Math.random())):d.default.error("删除失败")}))}})}(t,e)}})))}))),H.wiki_clone_link&&y.default.createElement(C,{className:"copy-url",compact:!0},y.default.createElement(s.default,{dropdownClassName:"wiki-url-type",defaultValue:"HTTPS",onChange:function(e){ne(e)}},y.default.createElement(S,{value:"HTTPS"},"HTTPS"),y.default.createElement(S,{value:"SSH"},"SSH")),y.default.createElement(f.default,{id:"wikiUrl",value:"HTTPS"===ae?H.wiki_clone_link.https:H.wiki_clone_link.ssh}),y.default.createElement(w.default,{className:"copy-wiki",inputId:"wikiUrl"}))),y.default.createElement("div",{className:"wiki-content"},y.default.createElement("div",{className:"wiki-content-head"},y.default.createElement("div",{className:"wiki-content-head-left"},y.default.createElement("h3",{className:"wiki-detail-title"},H.name),y.default.createElement("span",{className:"user-box mr10",onClick:function(){var e;H.commit&&(e=H.commit.author.name,window.location.href="/"+e)}},z.image_url&&y.default.createElement("img",{alt:"头像",className:"head-log-small",src:(0,h.getImageUrl)("/"+z.image_url)}),y.default.createElement("span",null,z.userName)),y.default.createElement("span",{className:"time-ago"},"上次修改于",H.commit?(0,h.timeAgo)(H.commit.author.when):"刚刚")),I&&y.default.createElement(o.default,{type:"primary",onClick:function(){a.push("/"+M+"/"+x+"/wiki/edit/"+encodeURI(H.name))}},"编辑")),y.default.createElement("div",{className:"wiki-content-detail editor-content-panel markdown-body",dangerouslySetInnerHTML:{__html:z&&z.simple_content}})))):y.default.createElement(g.default,m({},e,{reloadList:$})))}},"j/6D":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wikiPages=function(e){return(0,l.default)({url:"/api/wiki/wikiPages",method:"get",params:e})},t.getWiki=function(e){return(0,l.default)({url:"/api/wiki/getWiki",method:"get",params:e})},t.addWiki=function(e){return(0,l.default)({url:"/api/wiki/createWiki",method:"post",data:e})},t.updateWiki=function(e){return(0,l.default)({url:"/api/wiki/updateWiki",method:"PUT",data:e})},t.deleteWiki=function(e){return(0,l.default)({url:"/api/wiki/deleteWiki",method:"DELETE",data:e})};var n,r=a("E+/Y"),l=(n=r)&&n.__esModule?n:{default:n}},j29u:function(e,t,a){},qqRK:function(e,t,a){},v5ho:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=l(a("2/Rp"));a("L/Qf");var r=l(a("q1tI"));function l(e){return e&&e.__esModule?e:{default:e}}a("qqRK"),t.default=function(e){var t=e.project,a=e.isManager,l=e.history,i=(e.showNotification,e.match),o=(e.reloadList,i.params.projectsId),u=i.params.owner;return r.default.createElement("div",{className:"welcome-main"},r.default.createElement("i",{className:"iconfont icon-huanying_icon"}),r.default.createElement("p",{className:"welcome-title"},"欢迎使用 ",r.default.createElement("span",{className:"wiki-title"},t&&t.name)," Wiki"),r.default.createElement("p",{className:"welcome-content"},"Wiki主要是您项目的产品设计、文档描述、注释等等"),r.default.createElement("div",{className:"wiki-line"}),a?r.default.createElement(n.default,{type:"primary",onClick:function(){l.push("/"+u+"/"+o+"/wiki/add")}},"创建Wiki文档"):r.default.createElement("p",{className:"welcome-des"},"该项目暂时没有创建Wiki"))}},"zBD+":function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=d(a("kLXV")),r=d(a("2/Rp")),l=function(e,t){if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return function(e,t){var a=[],n=!0,r=!1,l=void 0;try{for(var i,o=e[Symbol.iterator]();!(n=(i=o.next()).done)&&(a.push(i.value),!t||a.length!==t);n=!0);}catch(e){r=!0,l=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw l}}return a}(e,t);throw new TypeError("Invalid attempt to destructure non-iterable instance")},i=Object.assign||function(e){for(var t=1;t