|
|
(self.webpackChunk=self.webpackChunk||[]).push([[86541,76469],{57732:function(e,t,n){"use strict";var r=n(26801),i=n.n(r),a=(n(59301),n(93314)),o=n(3113),u=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,r=void 0===n?{}:n,s=e.styles,c=void 0===s?{}:s,l=e.customText,d=e.ButtonText,f=e.ButtonClick,p=e.Buttonclass,j=e.ButtonTwo,g=e.imgStyles,M=e.loading,m=void 0!==M&&M;return(0,u.jsxs)("section",{className:"tc animated fadeIn",style:i()(i()({},{color:"#999",margin:"100px auto",visibility:m?"hidden":"visible"}),c),children:[(0,u.jsx)("img",{src:t||a,style:i()({},g)}),(0,u.jsx)("p",{className:"mt20 font14",children:l||"暂时还没有相关数据哦!"}),d&&(0,u.jsx)(o.ZP,i()(i()({className:p,onClick:f},r),{},{children:d})),j&&j]})}},63720:function(e,t,n){"use strict";n.d(t,{cT:function(){return C},pe:function(){return w}});var r=n(93923),i=n.n(r),a=n(11006),o=n.n(a),u=n(27161),s=n.n(u),c=n(26801),l=n.n(c),d=n(10574),f=n.n(d),p=n(39343),j=n.n(p),g=n(59301),M=n(48826),m=n(8591),y=n(15830),N=n(28209),h=n.n(N),x=n(1012),v=n(22211),L=n(75264),D=n.n(L),S=n(37712),I=["user","cancelUpload"],b=M.Z.Dragger,w=function(e){var t=h().enc.Utf8.parse("bf3c199c2470cb477d907b1e0917c17b"),n=h().enc.Utf8.parse("5183666c72eec9e4"),r=h().AES.decrypt(e,t,{iv:n,mode:h().mode.CBC});return r.toString(h().enc.Utf8)},C=function(){var e=j()(f()().mark((function e(t,n,r){var i,a,o,u,s,c,d,p,j,g;return f()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.file_name=t.name,e.next=3,(0,y.ZP)("/api/buckets/get_upload_token.json",{method:"get"});case 3:return d=e.sent,console.log("decrypt(res.data):",w(d.data)),d.data=JSON.parse(w(d.data)),(p=t.name.split(".")).pop(),j=n.realFileName?p.join(""):(0,x.Z)(),g=new(D())({endpoint:null==d||null===(i=d.data)||void 0===i?void 0:i.end_point,region:null==d||null===(a=d.data)||void 0===a?void 0:a.region,accessKeyId:null==d||null===(o=d.data)||void 0===o?void 0:o.access_key_id,accessKeySecret:null==d||null===(u=d.data)||void 0===u?void 0:u.access_key_secret,bucket:null==d||null===(s=d.data)||void 0===s?void 0:s.bucket,stsToken:null==d||null===(c=d.data)||void 0===c?void 0:c.security_token}),e.abrupt("return",new Promise((function(e,i){var a;g.multipartUpload("".concat(j),new Blob([t],{type:t.type}),l()(l()({timeout:2e5,partSize:102400},r),{},{callback:{url:null==d||null===(a=d.data)||void 0===a?void 0:a.callback_url,host:null==d?void 0:d.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,y.rz)(n)}})).then((function(n){var r;t.response=null===(r=n.data)||void 0===r?void 0:r.data,e(null==n?void 0:n.data)})).catch((function(e){i(e),console.log("err:",e)}))})));case 11:case"end":return e.stop()}}),e)})));return function(t,n,r){return e.apply(this,arguments)}}();t.ZP=(0,v.connect)((function(e){var t=e.loading,n=e.globalSetting,r=e.user;return{globalSetting:n,loading:t.models.competitions,user:r}}))((function(e){var t,n=e.user,r=e.cancelUpload,a=s()(e,I),u=(0,g.useState)([]),c=o()(u,2),d=c[0],p=c[1],M=(0,g.useState)(),N=o()(M,2),h=N[0],v=N[1],L={onRemove:function(e){p(i()(d.filter((function(t){return t.name!==e.name})))),a.onChange(d.filter((function(t){return t.name!==e.name})))},disabled:a.disabled,multiple:!0,fileList:null==d?void 0:d.map((function(e){return e.file})),customRequest:function(){},beforeUpload:(t=j()(f()().mark((function e(t){var n;return f()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=a.maxSize||1073741824,!d.filter((function(e){return e.name===t.name})).length){e.next=4;break}return m.ZP.info("".concat(t.name,"已存在,请重新选择")),e.abrupt("return");case 4:if(!((null==t?void 0:t.size)>n)){e.next=7;break}return m.ZP.info("文件超过".concat(n/1024/1024/1024,"GB,不符合上传要求")),e.abrupt("return",!1);case 7:return d.push({name:t.name,file:t}),p(i()(d)),a.onChange(d),e.abrupt("return",!1);case 11:case"end":return e.stop()}}),e)}))),function(e){return t.apply(this,arguments)})},C=function(){var e=j()(f()().mark((function e(t,n){var r,o,u,s,c,l,j,g,M,N;return f()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n.file_name=t.name,j=t.name,e.next=4,(0,y.ZP)("/api/buckets/get_upload_token_for_big_files.json",{method:"get"});case 4:if((g=e.sent).data=JSON.parse(w(g.data)),0===(null==g?void 0:g.status)){e.next=12;break}return d[d.findIndex((function(e){return e.name===j}))].status="error",d[d.findIndex((function(e){return e.name===j}))].file.status="error",a.onChange(d),m.ZP.warning("上传失败,请重新尝试"),e.abrupt("return");case 12:return h=new(D())({endpoint:null==g||null===(r=g.data)||void 0===r?void 0:r.end_point,region:null==g||null===(o=g.data)||void 0===o?void 0:o.region,accessKeyId:null==g||null===(u=g.data)||void 0===u?void 0:u.access_key_id,accessKeySecret:null==g||null===(s=g.data)||void 0===s?void 0:s.access_key_secret,bucket:null==g||null===(c=g.data)||void 0===c?void 0:c.bucket,stsToken:null==g||null===(l=g.data)||void 0===l?void 0:l.security_token}),console.log(t,"file"),v(h),(M=t.name.split(".")).pop(),N=n.realFileName?M.join("."):(0,x.Z)(),e.abrupt("return",new Promise((function(e,r){try{var o;h.multipartUpload("".concat(a.identifier,"/").concat(N).concat(j.indexOf(".")>-1?"."+j.split(".").pop():""),new Blob([t.file],{type:t.file.type}),{timeout:36e5,partSize:1002400,progress:function(e,t,n){try{console.log("进度",e,t,n);var r=d.findIndex((function(e){return e.name===j}));d[r].file.percent=100*e,d[r].tempCheckpoint=t,p(i()(d))}catch(e){}},checkpoint:d[d.findIndex((function(e){return e.name===j}))].tempCheckpoint,callback:{customValue:{id:j+""},url:null==g||null===(o=g.data)||void 0===o?void 0:o.callback_url,host:null==g?void 0:g.data.bucket_host,body:"bucket=${bucket}&object=${object}&etag=${etag}&size=${size}&mimeType=${mimeType}&my_var=${x:my_var}&"+(0,y.rz)(n)}}).then((function(n){var r,i=d.findIndex((function(e){return e.name===j})),o="done";if(0===(null===(r=n.data)||void 0===r?void 0:r.status)){var u;t.response=null===(u=n.data)||void 0===u?void 0:u.data;var s=d.findIndex((function(e){return e.name===j}));d[s].status="done",d[s].file.status="done"}else{var c;m.ZP.warning(null===(c=n.data)||void 0===c?void 0:c.message),o="error"}d[i].status=o,d[i].file.status=o,a.onChange(d),e(null==n?void 0:n.data)})).catch((function(e){d[d.findIndex((function(e){return e.name===j}))].status="error",d[d.findIndex((function(e){return e.name===j}))].file.status="error",m.ZP.warning("上传失败,请重新尝试"),p(i()(d)),a.onChange(d),r(e),console.log("err:",e)}))}catch(e){}})));case 19:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,g.useEffect)((function(){d.every((function(e){return"done"===e||"error"===e}))&&a.onComplete(d)}),[d]),(0,g.useEffect)((function(){var e;r&&(null===(e=h)||void 0===e||e.cancel())}),[r]),(0,g.useEffect)((function(){a.uploading&&d.map(function(){var e=j()(f()().mark((function e(t){var i;return f()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t.status&&"error"!==t.status||r){e.next=6;break}return t.status="uploading",t.file.status="uploading",e.next=5,C(t,{login:null==n||null===(i=n.userInfo)||void 0===i?void 0:i.login,container_type:a.container_type,container_id:a.container_id,description:a.description,realFileName:a.realFileName});case 5:e.sent;case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}),[a.uploading]),(0,S.jsx)(b,l()(l()({},L),{},{height:a.height,className:a.className,children:(0,S.jsx)("p",{className:"ant-upload-hint",children:a.text||"拖拽文件或者点击上传"})}))}))},24263:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return A}});var r=n(10574),i=n.n(r),a=n(93923),o=n.n(a),u=n(39343),s=n.n(u),c=n(11006),l=n.n(c),d=n(27161),f=n.n(d),p=n(59301),j=n(22211),g=n(76469),M=n(9498),m=n.n(M),y=n(57732),N=n(56102),h=n(8591),x=n(43418),v=n(24905),L=n(6848),D=n(3113),S=n(59981),I=n(72315),b=n(41867),w=n(85578),C={bg:"bg___NFraa",wrap:"wrap___C_Y44",content:"content___t7bDk",modal:"modal___K3UdK",action:"action___pu6F6",actionButton:"actionButton___fYPEj",grayButton:"grayButton___sbGlB"},O=n(9072),_=n(37712),E=["shixunsDetail","globalSetting","loading","user","dispatch"],A=(0,j.connect)((function(e){var t=e.shixunsDetail,n=e.loading;return{shixunsDetail:t,globalSetting:e.globalSetting,user:e.user,loading:n}}))((function(e){var t,n,r,a=e.shixunsDetail,u=e.globalSetting,c=e.loading,d=(e.user,e.dispatch),j=(f()(e,E),(0,p.useRef)()),M=(0,p.useState)([]),A=l()(M,2),T=A[0],k=A[1],z=(0,p.useState)(0),P=l()(z,2),Z=P[0],Q=P[1],Y=(0,p.useState)([]),U=l()(Y,2),R=U[0],B=U[1],W=(0,p.useState)(),G=l()(W,2),F=G[0],J=G[1],V=(0,p.useState)(!1),H=l()(V,2),$=(H[0],H[1],(0,p.useState)(!1)),X=l()($,2),K=X[0],q=X[1],ee=(0,p.useState)({id:null,page:1,limit:10}),te=l()(ee,2),ne=te[0],re=te[1];(0,p.useEffect)((function(){var e;j.current=null===(e=location.pathname)||void 0===e||null===(e=e.split("/"))||void 0===e?void 0:e[2],ne.id=j.current,re(ne),ie(ne)}),[]);var ie=function(){var e=s()(i()().mark((function e(t){var n;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d({type:"shixunsDetail/getSetData",payload:t});case 2:(n=e.sent)&&(k(o()(n.data_sets)),Q(n.data_sets_count),B([]),J(!1));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),ae=function(e){ne.page=e,re(ne),ie(ne)},oe=[{title:"",dataIndex:"title",width:40,ellipsis:!0,render:function(e,t){return(0,_.jsx)(v.Z,{checked:R.includes(t.id),onChange:function(e){return n=t.id,r=e.target.checked,void B(r?[].concat(o()(R),[n]):R.filter((function(e){return e!==n})));var n,r}})}},{title:"文件",dataIndex:"title",key:"title",align:"left",className:"font14",width:"220px",render:function(e,t){return(0,_.jsx)("div",{children:t.title})}},{title:"创建时间",dataIndex:"created_on",key:"created_on",align:"center",className:"font14",width:"150px",render:function(e,t){return(0,_.jsx)("div",{children:m()(t.created_on).format("YYYY-MM-DD HH:mm")})}},{title:"最后修改人",dataIndex:"author",key:"author",align:"center",className:"font14",render:function(e,t){return(0,_.jsx)("div",{children:t.author})}},{title:"文件大小",dataIndex:"filesize",key:"filesize",align:"center",className:"font14",render:function(e,t){return(0,_.jsx)("div",{children:t.filesize})}},{title:"操作",dataIndex:"operation",key:"operation",align:"center",className:"font14 current",render:function(e,t){return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(N.CopyToClipboard,{text:t.file_path,onCopy:function(){return h.ZP.success("复制成功")},children:(0,_.jsx)(L.Z,{title:"复制",children:(0,_.jsx)("i",{className:"iconfont icon-fuzhi3 font18 ml2"})})}),(0,_.jsx)(L.Z,{title:"下载",children:(0,_.jsx)("span",{className:"current ml15 iconfont icon-xiazai2",onClick:function(){(0,w.Nd)(t.title,null==t?void 0:t.download_url)}})})]})}}];return(0,_.jsxs)("section",{className:C.bg,children:[(0,_.jsx)("div",{className:C.wrap,children:(0,_.jsxs)("div",{className:C.content,children:[(0,_.jsxs)("div",{className:C.action,children:[(0,_.jsxs)("div",{children:[(0,_.jsx)(v.Z,{checked:F,onChange:function(e){return t=e.target.checked,J(t),void B(t?T.map((function(e){return e.id})):[]);var t}}),(0,_.jsx)("span",{className:"ml5",children:"全选"})]}),(0,_.jsxs)("div",{children:[(0,_.jsx)(D.ZP,{type:"primary",danger:!!R.length,className:"mr5 ".concat(C.actionButton," ").concat(R.length?"":C.grayButton),onClick:function(){var e;R.length?x.Z.confirm({centered:!0,title:"确定要删除文件吗?",okText:"确定",cancelText:"取消",onOk:(e=s()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,d({type:"shixunsDetail/deleteDataSet",payload:{id:j.current,deleteId:R}});case 2:e.sent&&(h.ZP.success("删除成功"),ne.page=1,re(ne),ie(ne));case 4:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})}):h.ZP.info("请选择要删除的文件")},children:"删除"}),(0,_.jsx)(D.ZP,{type:"primary",onClick:function(){return q(!0)},children:"上传文件"})]})]}),(0,_.jsx)(S.Z,{loading:c.effects["shixunsDetail/getSetData"],active:!0,avatar:{size:40},paragraph:{rows:5},children:(0,_.jsx)("div",{className:"mt20",children:T.length?(0,_.jsx)(I.Z,{columns:oe,dataSource:T,pagination:!1,loading:c.effects["shixunsDetail/getSetData"]}):(0,_.jsx)(y.Z,{})})}),(0,_.jsx)("aside",{className:"tc mt20",children:(0,_.jsx)(b.Z,{showQuickJumper:!0,showSizeChanger:!1,total:Z,hideOnSinglePage:!0,onChange:function(e){return ae(e)},pageSize:ne.limit,current:ne.page})})]})}),(0,_.jsx)(g.Z,{}),(0,_.jsx)(O.Z,{rootIdentifier:null==a||null===(t=a.detail)||void 0===t?void 0:t.root_identifier,wrapClassName:C.uploadFileModal,id:ne.id,containerId:null==a||null===(n=a.detail)||void 0===n?void 0:n.id,local:null==u||null===(r=u.setting)||void 0===r?void 0:r.is_local,dispatch:d,visible:K,onClose:function(){return q(!1)},onOK:function(){return ae(1)}})]})}))},76469:function(e,t,n){"use strict";n.d(t,{Z:function(){return T}});var r=n(11006),i=n.n(r),a=n(27161),o=n.n(a),u=n(59301),s=n(22211),c=n(67871),l=n(93948),d=n(6848),f="rightWrap___Y_2WO",p="learnWrap___mca1k",j="learnTopWrap___cn6Tj",g="courseWrap___N3Z6X",M="pathWrap___QSdXs",m="pathImg___VjPqu",y="pathContentItem___sxOSQ",N="pathContentWrap___WttwX",h="pathContentName___evsEv",x="pathContent___fz4ds",v="pathContentCount___Jlv3G",L="recommandTrainingWrap___F1gpg",D="recommandContent___JZYAA",S="recommandLevel___McDUw",I="color888___l_1AP",b="skillWrap___j6j3B",w="skillTopWrap___kIJbE",C="titleImg___I8kT9";Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var O=n(42441),_=n(60638),E=(n(56047),n(37712)),A=["shixunsDetail","user","globalSetting","loading","dispatch"],T=(0,s.connect)((function(e){var t=e.shixunsDetail,n=e.user,r=e.loading;return{shixunsDetail:t,user:n,globalSetting:e.globalSetting,loading:r.models.index}}))((function(e){var t,n,r,a,s,T,k,z,P,Z,Q,Y,U,R,B,W,G,F=e.shixunsDetail,J=e.user,V=(e.globalSetting,e.loading,e.dispatch,o()(e,A),(0,u.useState)(!0)),H=i()(V,2);H[0],H[1];console.log("----",F);var $,X,K=null!==(t=F.rightData)&&void 0!==t&&t.complete_count?Number(null===(n=F.rightData)||void 0===n?void 0:n.complete_count)/Number(null===(r=F.rightData)||void 0===r?void 0:r.challenge_count)*100:0;return F.rightData?(0,E.jsxs)("section",{className:f,children:[!(null!==(a=F.detail)&&void 0!==a&&a.is_jupyter)&&(null===(s=F.detail)||void 0===s||null===(s=s.task_operation)||void 0===s?void 0:s[2])&&(null==J||null===(T=J.userInfo)||void 0===T?void 0:T.login)&&!(null===(k=F.rightData)||void 0===k||!k.complete_count)&&(null===(z=F.rightData)||void 0===z?void 0:z.complete_count)>0&&(0,E.jsxs)("div",{className:p,children:[(0,E.jsxs)("div",{className:j,children:[(0,E.jsxs)("span",{children:[(0,E.jsx)("img",{className:C,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTAgMmMuMDIgMCAuMDMuNzUuMDMyIDEuODM5bC4wMyA4LjE2SDkuMTlsLTMuOTMyIDYuMDA1aC45OEwxMC4wNjIgMTJIMjBjMCA1LjUyMy00LjQ3NyAxMC0xMCAxMFMwIDE3LjUyMyAwIDEyIDQuNDc3IDIgMTAgMlptLS4zNDggMTIuOTM4Yy0uNDYzIDAtLjgzNC4xNDctMS4xMTMuNDQzLS4yNzkuMjk1LS40MTguNjkzLS40MTggMS4xOTMgMCAuNDUzLjEzLjgxOS4zOSAxLjA5Ni4yNjEuMjc3LjYwNi40MTYgMS4wMzYuNDE2LjQ1OCAwIC44MjctLjE0OCAxLjEwNS0uNDQzLjI3OS0uMjk2LjQxOC0uNjkxLjQxOC0xLjE4NiAwLS40ODItLjEyNC0uODU1LS4zNzMtMS4xMjEtLjI0OC0uMjY2LS41OTctLjM5OS0xLjA0NS0uMzk5Wm0tLjAzOS43MWMuMTg1IDAgLjMzMy4wNzQuNDQ0LjIyMS4xMS4xNDcuMTY2LjM1OC4xNjYuNjMxIDAgLjU4My0uMjA5Ljg3NS0uNjI1Ljg3NS0uNDE0IDAtLjYyMS0uMjgxLS42MjEtLjg0NCAwLS41ODguMjEyLS44ODMuNjM2LS44ODNabS0zLjcxNS0zLjc4Yy0uNDY4IDAtLjg0LjE0OC0xLjExNS40NDYtLjI3NS4yOTktLjQxMi42OTUtLjQxMiAxLjE5IDAgLjQ1My4xMy44MTguMzg5IDEuMDk0LjI1OS4yNzYuNjA1LjQxNCAxLjAzNy40MTQuNDYgMCAuODMtLjE0NyAxLjEwNS0uNDQyLjI3Ni0uMjk0LjQxNC0uNjg2LjQxNC0xLjE3NSAwLS40NzctLjEyNC0uODUtLjM3My0xLjEyMi0uMjQ4LS4yNy0uNTk3LS40MDYtMS4wNDUtLjQwNlptLS4wMjMuNzFjLjQwMSAwIC42MDIuMjgzLjYwMi44NDggMCAuNTgzLS4yMS44NzUtLjYzLjg3NS0uNDEgMC0uNjE3LS4yOC0uNjE3LS44NCAwLS41ODkuMjE1LS44ODMuNjQ1LS44ODNaIiBmaWxsPSIjMTg5MEZGIi8+PHBhdGggZD0iTTExIDBjNS45ODIgMCAxMC44NDggNC43NzQgMTAuOTk3IDEwLjcyTDIyIDExaC0zLjY2N2MwLTMuOTc0LTMuMTYtNy4yMS03LjEwNS03LjMzTDExIDMuNjY3VjBaIiBmaWxsPSIjQjZEMEZDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+",alt:""}),"学习进度"]}),(0,E.jsx)("span",{children:(0,E.jsxs)("span",{className:"".concat(I," font14"),children:["已完成 ",(null===(P=F.rightData)||void 0===P?void 0:P.complete_count)||0," 关 / 共",(null===(Z=F.rightData)||void 0===Z?void 0:Z.challenge_count)||0," 关"]})})]}),(0,E.jsx)(l.Z,{percent:K,showInfo:!1,status:"active",strokeColor:{"0%":"#29BD8B","100%":"#29BD8B"}})]}),!(null===(Q=F.rightData)||void 0===Q||null===(Q=Q.paths)||void 0===Q||!Q.length)&&(0,E.jsxs)("div",{className:g,children:[(0,E.jsxs)("p",{className:"mb20 font16",children:[(0,E.jsx)("img",{className:C,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMS4yNDguMDI2aDIuNDk1Yy44MzMgMCAxLjI0OS40MTUgMS4yNDkgMS4yNDN2MTcuMzljMCAuODI5LS40MTYgMS4yNDMtMS4yNDkgMS4yNDNIMS4yNDhDLjQxNiAxOS45MDIgMCAxOS40ODggMCAxOC42NlYxLjI3QzAgLjQ0LjQxNi4wMjUgMS4yNDguMDI1Wk03LjQ4OC4wMjZoMi40OTZjLjgzMiAwIDEuMjQ4LjQxNSAxLjI0OCAxLjI0M3YxNy4zOWMwIC44MjktLjQxNiAxLjI0My0xLjI0OCAxLjI0M0g3LjQ4OGMtLjgzMiAwLTEuMjQ4LS40MTQtMS4yNDgtMS4yNDJWMS4yN2MwLS44My40MTYtMS4yNDQgMS4yNDgtMS4yNDRaIiBmaWxsPSIjNTA5MUZGIi8+PHBhdGggZD0ibTEzLjQwNC42ODggMi40MTItLjY0NmMuMzItLjA4NS42Ni0uMDQuOTQ3LjEyNC4yODcuMTY1LjQ5Ni40MzcuNTgyLjc1NWw0LjUyMiAxNi44YTEuMjQyIDEuMjQyIDAgMCAxLS44ODMgMS41MmwtMi40MTEuNjQ0YTEuMjQ5IDEuMjQ5IDAgMCAxLTEuNTI4LS44NzlMMTIuNTIyIDIuMjA4YTEuMjM4IDEuMjM4IDAgMCAxIC4xMjQtLjk0M2MuMTY2LS4yODUuNDM5LS40OTQuNzU4LS41Nzl2LjAwMloiIGZpbGw9IiNCNkQwRkMiLz48L2c+PC9zdmc+",alt:""}),"所属课程"]}),(0,E.jsx)("div",{children:null===(Y=F.rightData)||void 0===Y?void 0:Y.paths.map((function(e,t){return t>2?null:(0,E.jsxs)("div",{className:M,children:[(0,E.jsx)("a",{href:"/paths/".concat(e.id),target:"_blank",children:(0,E.jsx)("img",{alt:"实训",src:"".concat(c.Z.IMG_SERVER,"/").concat(e.image_url),className:m})}),(0,E.jsxs)("div",{className:N,children:[(0,E.jsx)("a",{href:"/paths/".concat(e.id),target:"_blank",className:h,children:e.name}),(0,E.jsxs)("p",{className:x,children:[(0,E.jsx)(d.Z,{placement:"bottom",title:"章节",children:(0,E.jsxs)("span",{className:v,children:[(0,E.jsx)("i",{className:"iconfont icon-shixun mr3"}),e.stages_count]})}),(0,E.jsx)(d.Z,{placement:"bottom",title:"学习人数",children:(0,E.jsxs)("span",{className:v,children:[(0,E.jsx)("i",{className:"iconfont icon-chengyuan mr3"}),e.members_count]})})]})]})]},e.id)}))})]}),(0,E.jsx)("div",{}),!(null===(U=F.rightData)||void 0===U||null===(U=U.recommands)||void 0===U||!U.length)&&J.userInfo.main_site&&(0,E.jsxs)("div",{className:L,children:[(0,E.jsxs)("p",{className:"mb20 font16",children:[(0,E.jsx)("img",{className:C,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMTUuNTAzIDIxLjg5NmEyLjA2NyAyLjA2NyAwIDAgMS0uODctLjIwMSA0NTEuOTg3IDQ1MS45ODcgMCAwIDEtNC4zNzYtMi4xMWMtMS40NjYuNjktMi45MzEgMS4zODQtNC4zOTYgMi4wOC0uNjc0LjI5OS0xLjMzLjI2LTEuODE2LS4wOTYtLjQ1OC0uMzM1LS42ODUtLjkxMi0uNjI0LTEuNTc5LjE3My0xLjU2LjQ2NS0zLjY5My41NzQtNC40ODVhMTg4LjAyOSAxODguMDI5IDAgMCAxLTMuNTg3LTMuOTIyIDEuNSAxLjUgMCAwIDEtLjMtMS41MWMuMjEzLS41NzQuNzYtLjk4MiAxLjQ3Mi0xLjA4Nmw0LjY1NS0uODUzQTUxMi45NSA1MTIuOTUgMCAwIDEgOC43ODcgMy43M2MuNzE3LTEuMzQ0IDEuNDI2LTEuMzQ0IDEuOC0xLjIwOS40MDcuMTM0Ljc5Mi41MzEgMS4xNzcgMS4yMjMuODI5IDEuNDMzIDIuMDggMy42NDIgMi41MDQgNC4zOTFsNC42MS44NThjLjY3OC4xIDEuMjE4LjUwNyAxLjQyOCAxLjA4NGExLjUwNyAxLjUwNyAwIDAgMS0uMjg2IDEuNTA0IDE5Mi44MDggMTkyLjgwOCAwIDAgMS0zLjU1NiAzLjk0NGMuMTA0Ljc4OC4zODggMi45MjcuNTczIDQuNDc5LjA3MS42ODUtLjE1MiAxLjI2OS0uNjE2IDEuNjA5YTEuNTUgMS41NSAwIDAgMS0uOTE2LjI4NGgtLjAwMloiIGZpbGw9IiM1MDkxRkYiLz48cGF0aCBkPSJNMjEuNzA2IDQuNDYyYS41NTcuNTU3IDAgMCAxLS4yNDcuMDczYy0uNDUuMDMtMS4xMjIuMDY3LTEuMzk3LjA4bC0uNzc4IDEuMmMtLjEyMi4xOC0uMjkuMjY1LS40NjQuMjQtLjE2My0uMDItLjMwNi0uMTQtLjM5LS4zMjlhNjAuODEgNjAuODEgMCAwIDEtLjUyOS0xLjI3OCA1My4wMDkgNTMuMDA5IDAgMCAxLTEuNDc2LS41MTguNDc1LjQ3NSAwIDAgMS0uMy0uMzYuNTMzLjUzMyAwIDAgMSAuMi0uNTA1bDEuMDI1LS45MWMtLjAxMS0uNTE2LS4wMi0xLjAzMi0uMDI4LTEuNTQ4LS4wMjQtLjQ2My4xNS0uNTY4LjI2NC0uNTg1LjEyMS0uMDI2LjI3NS4wMjQuNDc0LjE1MS40MTkuMjYyIDEuMDYuNjY3IDEuMjc3LjgwNGwxLjI3LS40NDhhLjQ5LjQ5IDAgMCAxIC41MTUuMDhjLjEyNC4xMS4xODMuMjguMTU1LjQ0MS0uMDkuNTI2LS4xODYgMS4wNTItLjI5IDEuNTc0LjE0NS4xOTQuNTM2LjcyMi44MTQgMS4xMS4xMi4xNzIuMTUyLjM2LjA4OC41MThhLjQzNS40MzUgMCAwIDEtLjE4NS4yMWguMDAyWk0yLjg1OSA1LjgzYS4yODcuMjg3IDAgMCAxLS4wOTMtLjA5MSA2Mi4xNyA2Mi4xNyAwIDAgMS0uMzgyLS42MDMgNDkuOTkgNDkuOTkgMCAwIDAtLjctLjA0NWMtLjEwNi0uMDEtLjE4NS0uMDYzLS4yMTgtLjE0NmEuMjc2LjI3NiAwIDAgMSAuMDQtLjI1NWMuMTQtLjE5Ny4zMzQtLjQ2LjQwNy0uNTU3YTI4LjM5NyAyOC4zOTcgMCAwIDEtLjE0OS0uNzg2LjI0My4yNDMgMCAwIDEgLjA3Ni0uMjIzLjI1LjI1IDAgMCAxIC4yNjQtLjAzN2wuNjQuMjI4Yy4xMDgtLjA2OC40MzEtLjI3LjY0NC0uMzk4LjE5LS4xMjguMjc4LS4wNzUuMzE0LS4wMy4wNC4wNDcuMDU5LjEyOC4wNTQuMjVsLS4wMTkuNzY4LjUwNi40NTNhLjI1OC4yNTggMCAwIDEgLjA5NS4yNDkuMjM4LjIzOCAwIDAgMS0uMTQ3LjE3OGMtLjI0NS4wOTItLjQ5LjE4LS43MzYuMjY1LS4wNDcuMTEzLS4xNzEuNDItLjI2NC42NC0uMDQ0LjA5NS0uMTE1LjE1OS0uMTk3LjE2OGEuMjA4LjIwOCAwIDAgMS0uMTM1LS4wMjhaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",alt:""}),(null==F||null===(R=F.detail)||void 0===R||null===(R=R.disciplines)||void 0===R?void 0:R.length)>0?"相关推荐":"热门推荐"]}),(0,E.jsx)("div",{children:null===(B=F.rightData)||void 0===B?void 0:B.recommands.map((function(e,t){return t>2?null:(0,E.jsxs)("div",{className:y,children:[(0,E.jsx)("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:(0,E.jsx)("img",{src:"".concat(c.Z.IMG_SERVER,"/").concat(e.pic),className:m})}),(0,E.jsxs)("div",{className:N,style:{marginBottom:-4},children:[(0,E.jsx)(d.Z,{placement:"bottom",title:e.name,children:(0,E.jsx)("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",className:h,children:e.name})}),(0,E.jsxs)("p",{className:"".concat(x," ").concat(D),children:[(0,E.jsxs)("span",{children:[e.stu_num," 人学习"]}),(0,E.jsx)("span",{className:S,children:e.level})]})]})]},t)}))})]}),(null===(W=F.rightData)||void 0===W||null===(W=W.tags)||void 0===W?void 0:W.length)>0&&(0,E.jsxs)("div",{className:b,children:[(0,E.jsx)("p",{className:"".concat(w," font16 mb20"),children:(0,E.jsxs)("span",{children:["技能标签",(0,E.jsx)("span",{className:"ml5 c-grey-c",children:null===(G=F.rightData)||void 0===G||null===(G=G.tags)||void 0===G?void 0:G.length})]})}),(0,E.jsx)(O.Z,{option:(X=new Image,X.src=_.yt,{backgroundColor:"#fff",tooltip:{pointFormat:"{series.name}</b>"},series:[{type:"wordCloud",sizeRange:[10,30],rotationRange:[-90,90],rotationStep:45,gridSize:2,shape:"pentagon",maskImage:X,textStyle:{normal:{color:function(){return"rgb("+Math.round(255*Math.random())+", "+Math.round(255*Math.random())+", "+Math.round(255*Math.random())+")"}}},left:"center",top:"center",right:null,bottom:null,width:"100%",height:"100%",data:(null==F||null===($=F.rightData)||void 0===$||null===($=$.tags)||void 0===$?void 0:$.map((function(e,t){return{name:e.tag_name,value:t}})))||[]}]}),style:{height:370},opts:{renderer:"svg"}})]})]}):null}))},9072:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var r=n(26801),i=n.n(r),a=n(10574),o=n.n(a),u=n(93923),s=n.n(u),c=n(39343),l=n.n(c),d=n(11006),f=n.n(d),p=n(59301),j=n(67871),g=n(15830),M=n(48826),m=n(78241),y=n(8591),N=n(43418),h=n(1056),x="wrap___EmsVa",v="colorBlue___XqtfP",L="repeatedName___yMQsm",D=n(63720),S=n(85578),I=n(37712),b=M.Z.Dragger,w=function(e){e.dispatch;var t,n=e.id,r=e.onClose,a=e.onOK,u=e.visible,c=(e.wrapClassName,e.local),d=e.containerId,M=e.rootIdentifier,w=(0,p.useState)({}),C=f()(w,2),O=C[0],_=C[1],E=(0,p.useState)([]),A=f()(E,2),T=A[0],k=A[1],z=(0,p.useState)([]),P=f()(z,2),Z=P[0],Q=P[1],Y=(0,p.useState)(0),U=f()(Y,2),R=U[0],B=U[1],W=(0,p.useState)(!1),G=f()(W,2),F=G[0],J=G[1],V=(0,p.useState)(!1),H=f()(V,2),$=H[0],X=H[1],K=m.Z.useForm(),q=f()(K,1)[0],ee=(0,p.useState)([]),te=f()(ee,2),ne=te[0],re=te[1],ie=(0,p.useRef)([]);(0,p.useEffect)((function(){u&&(q.resetFields(),re([]),Q([]),k([]),B(0),X(!1),J(!1))}),[u]);var ae=function(){var e=l()(o()().mark((function e(t){var r,i;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(R){e.next=8;break}return i=ne.filter((function(e){return e.uid!==t.uid})),re(i),ie.current=s()(i),k(T.filter((function(e){return e!==t.name}))),y.ZP.info("删除成功"),i.length||(q.setFieldsValue({file:void 0}),q.validateFields()),e.abrupt("return");case 8:if(t.response){e.next=11;break}return y.ZP.info("还未上传完成,无法进行删除操作!"),e.abrupt("return");case 11:return e.next=13,(0,g.ZP)("/api/shixuns/".concat(n,"/destroy_data_sets.json"),{method:"Delete",body:{id:[null==t||null===(r=t.response)||void 0===r?void 0:r.id]}});case 13:0===e.sent.status&&(re(ne.filter((function(e){return e.uid!==t.uid}))),y.ZP.info("删除成功"));case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),oe={height:300,multiple:!0,disabled:R>0,withCredentials:!0,fileList:ne,action:"".concat(j.Z.API_SERVER,"/api/attachments.json"),onChange:function(e){if("done"===e.file.status||"uploading"===e.file.status){var t,n,r;if(re(e.fileList),!e.file.response)return;if(null!==(t=e.file.response)&&void 0!==t&&t.id)return void y.ZP.success("上传成功!");re(ne.filter((function(t){return t.uid!==e.file.uid}))),(null===(n=e.file.response)||void 0===n?void 0:n.message)&&y.ZP.info(null===(r=e.file.response)||void 0===r?void 0:r.message)}},onRemove:ae,beforeUpload:function(e){if(null!=ne&&ne.some((function(t){return t.name===e.name})))return y.ZP.info("".concat(e.name,"文件已存在")),!1;var t={name:e.name,uid:e.uid,file:e,percent:0};return ne.push(t),ie.current=s()(ne),re(s()(ne)),!1}},ue=function(e,t,n,r,i){var a=new FormData;Object.keys(e).forEach((function(t){a.append(t,e[t])}));var o=new window.XMLHttpRequest;return o.withCredentials=!0,o.addEventListener("load",(function(e){var t;n(JSON.parse(null==e||null===(t=e.target)||void 0===t?void 0:t.response))}),!1),o.addEventListener("error",(function(e){i&&i(e)}),!1),o.upload.onprogress=function(e){r&&r(e)},o.open("POST",t),o.send(a),o},se=function(e,t){if(e.lengthComputable){var n=Math.floor(e.loaded/e.total*100),r=i()(i()({},t),{},{percent:n,status:100===n?"done":"uploading"});console.log(ie.current,333),ie.current=ie.current.map((function(e){return e.uid===t.uid?r:e})),re(ie.current)}},ce=function(e,t){var n=i()(i()({},t),{},{status:"error"});y.ZP.warning("上传失败,请重新尝试"),ie.current=ie.current.map((function(e){return e.uid===t.uid?n:e})),ie.current.every((function(e){return"done"===e.status||"error"===e.status}))&&(X(!1),B(2)),re(ie.current)},le=function(e,t){var n=i()(i()({},t),{},{status:"done"});if(0===e.status||(n=i()(i()({},t),{},{status:"error"}),y.ZP.error("上传失败!")),ie.current=ie.current.map((function(e){return e.uid===t.uid?n:e})),ie.current.every((function(e){return"done"===e.status})))return y.ZP.success("上传完成!"),void pe(!0);ie.current.every((function(e){return"done"===e.status||"error"===e.status}))&&(X(!1),B(2)),re(ie.current)},de=function(){var e=l()(o()().mark((function e(t){var r,i,a,u,s,l,d;return o()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(X(!0),3!==R){e.next=4;break}return B(2),e.abrupt("return");case 4:if(2!==R&&1!==R){e.next=7;break}return fe(),e.abrupt("return");case 7:if(i=(r=t||{}).commitMessage,a=void 0===i?"":i,u=r.fileOss,s=void 0===u?[]:u,!((l=(c?ne:s).map((function(e){return e.name}))).filter((function(e){return-1!=e.indexOf("、")||-1!=e.indexOf(" ")})).length>0)){e.next=14;break}return y.ZP.info("数据集名称禁止有空格与、"),X(!1),e.abrupt("return");case 14:return e.next=16,(0,g.ZP)("/api/shixuns/".concat(n,"/check_data_sets"),{method:"post",body:{files_name:l}});case 16:if(-3!==(d=e.sent).status){e.next=21;break}return k(null==d?void 0:d.exist_files),X(!1),e.abrupt("return");case 21:if("{}"!==JSON.stringify(d)){e.next=25;break}return X(!1),y.ZP.error("网络已断开,请稍后重试!"),e.abrupt("return");case 25:0===d.status&&(ne.forEach((function(e){var t=ue({file:e.file,description:a},"".concat(j.Z.API_SERVER,"/api/shixuns/").concat(n,"/upload_data_sets.json"),(function(t){return le(t,e)}),(function(t){return se(t,e)}),(function(t){return ce(0,e)}));Z.push(t)})),B(1));case 26:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),fe=function(){var e=(i()({},q.getFieldsValue())||{}).commitMessage,t=void 0===e?"":e,r=ie.current.filter((function(e){return"error"===e.status})),a=ie.current.map((function(e){return i()(i()({},e),{},{status:"error"===e.status?"uploading":e.status})}));re(a),r.forEach((function(e){var r=ue({file:e.file,description:t},"".concat(j.Z.API_SERVER,"/api/shixuns/").concat(n,"/upload_data_sets.json"),(function(t){return le(t,e)}),(function(t){return se(t,e)}),(function(t){return ce(0,e)}));Z.push(r)}))},pe=function(e){e||(J(!0),Z.forEach((function(e){e.abort()}))),a(),r()},je=function(){return(0,I.jsxs)(p.Fragment,{children:[(0,I.jsx)("div",{children:(0,I.jsx)("i",{className:"iconfont icon-shangchuan font50 ".concat(v)})}),(0,I.jsxs)("div",{className:"font14 mt30",children:["拖拽文件或",(0,I.jsx)("span",{className:"".concat(v," ml5"),children:"点击此处上传"})]})]})};return(0,I.jsx)(N.Z,{open:u,onOk:function(){(0,S.L9)(["实践项目","设置","数据集","上传文件"]),q.submit()},centered:!0,okText:0===R?"确定":1===R?"上传中":"重新上传",okButtonProps:{loading:$},onCancel:function(){var e=(i()({},q.getFieldsValue())||{}).fileOss,t=void 0===e?[]:e,n=null==ne?void 0:ne.every((function(e){return"done"===e.status})),r=null==t?void 0:t.every((function(e){return"done"===e.status}));n&&r?pe():N.Z.confirm({title:"关闭弹框提示",content:"有文件未上传,是否确定离开?",okText:"离开",cancelText:"取消",onOk:function(){pe()}})},width:"1000px",title:"上传文件",children:(0,I.jsx)("div",{className:x,children:(0,I.jsxs)(m.Z,{className:"mt10",form:q,scrollToFirstError:!0,layout:"vertical",onFinish:de,onValuesChange:function(e){if(console.log(e,"changedValues"),"fileOss"in e){var t,n;if(null!=e&&e.fileOss.every((function(e){return"done"===e.status}))&&null!=e&&null!==(t=e.fileOss)&&void 0!==t&&t.length)return y.ZP.success("上传完成!"),void pe(!0);if(null!=e&&e.fileOss.every((function(e){return"done"===e.status||"error"===e.status}))&&null!=e&&null!==(n=e.fileOss)&&void 0!==n&&n.length)return B(3),void X(!1);k(T.filter((function(t){var n;return null==e||null===(n=e.fileOss)||void 0===n?void 0:n.some((function(e){return e.name===t}))})))}_(i()({},q.getFieldsValue()))},children:[c?(0,I.jsx)(m.Z.Item,{label:(0,I.jsxs)("div",{children:["选择文件 ",(0,I.jsx)("span",{style:{visibility:"hidden"},className:"c-light-black",children:"(单个文件不超过500M)"})]}),name:"file",rules:[{required:!0,message:"请选择文件"}],children:(0,I.jsxs)(b,i()(i()({},oe),{},{children:[" ",je()]}))}):(0,I.jsx)(m.Z.Item,{label:(0,I.jsxs)("div",{children:["选择文件 ",(0,I.jsx)("span",{className:"c-light-black",children:"(单个文件不超过100GB)"})]}),name:"fileOss",rules:[{required:!0,message:"请选择文件"}],children:(0,I.jsx)(D.ZP,{identifier:M,cancelUpload:F,container_type:"Shixun",container_id:d,uploading:R<3?R:0,disabled:R>0,height:300,maxSize:107374182400,description:O.commitMessage||"",text:je(),onComplete:function(e){console.log(e,444)},realFileName:!0})}),!!T.length&&(0,I.jsxs)("span",{className:L,children:[T.join("、"),"已存在,请删除后再上传"]}),(0,I.jsx)(m.Z.Item,{name:"commitMessage",label:"备注:",rules:[{whitespace:!0,message:"请勿输入空格"}],children:(0,I.jsx)(h.Z,{bordered:!1,disabled:R>0,maxLength:100,suffix:"".concat((null===(t=O.commitMessage)||void 0===t?void 0:t.length)||0,"/100"),placeholder:"请填写备注信息"})})]})})})}},25769:function(e,t,n){"use strict";var r=n(98040),i={"text/plain":"Text","text/html":"Url",default:"Text"};e.exports=function(e,t){var n,a,o,u,s,c,l=!1;t||(t={}),n=t.debug||!1;try{if(o=r(),u=document.createRange(),s=document.getSelection(),(c=document.createElement("span")).textContent=e,c.ariaHidden="true",c.style.all="unset",c.style.position="fixed",c.style.top=0,c.style.clip="rect(0, 0, 0, 0)",c.style.whiteSpace="pre",c.style.webkitUserSelect="text",c.style.MozUserSelect="text",c.style.msUserSelect="text",c.style.userSelect="text",c.addEventListener("copy",(function(r){if(r.stopPropagation(),t.format)if(r.preventDefault(),void 0===r.clipboardData){n&&console.warn("unable to use e.clipboardData"),n&&console.warn("trying IE specific stuff"),window.clipboardData.clearData();var a=i[t.format]||i.default;window.clipboardData.setData(a,e)}else r.clipboardData.clearData(),r.clipboardData.setData(t.format,e);t.onCopy&&(r.preventDefault(),t.onCopy(r.clipboardData))})),document.body.appendChild(c),u.selectNodeContents(c),s.addRange(u),!document.execCommand("copy"))throw new Error("copy command was unsuccessful");l=!0}catch(r){n&&console.error("unable to copy using execCommand: ",r),n&&console.warn("trying IE specific stuff");try{window.clipboardData.setData(t.format||"text",e),t.onCopy&&t.onCopy(window.clipboardData),l=!0}catch(r){n&&console.error("unable to copy using clipboardData: ",r),n&&console.error("falling back to prompt"),a=function(e){var t=(/mac os x/i.test(navigator.userAgent)?"⌘":"Ctrl")+"+C";return e.replace(/#{\s*key\s*}/g,t)}("message"in t?t.message:"Copy to clipboard: #{key}, Enter"),window.prompt(a,e)}}finally{s&&("function"==typeof s.removeRange?s.removeRange(u):s.removeAllRanges()),c&&document.body.removeChild(c),o()}return l}},83145:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CopyToClipboard=void 0;var r=a(n(59301)),i=a(n(25769));function a(e){return e&&e.__esModule?e:{default:e}}function o(e){return o="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},o(e)}function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function s(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function c(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function d(e,t){return!t||"object"!==o(t)&&"function"!=typeof t?p(e):t}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function p(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function j(e,t){return j=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},j(e,t)}function g(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var M=function(e){function t(){var e,n;c(this,t);for(var a=arguments.length,o=new Array(a),u=0;u<a;u++)o[u]=arguments[u];return g(p(n=d(this,(e=f(t)).call.apply(e,[this].concat(o)))),"onClick",(function(e){var t=n.props,a=t.text,o=t.onCopy,u=t.children,s=t.options,c=r.default.Children.only(u),l=(0,i.default)(a,s);o&&o(a,l),c&&c.props&&"function"==typeof c.props.onClick&&c.props.onClick(e)})),n}var n,a,o;return 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&&j(e,t)}(t,e),n=t,a=[{key:"render",value:function(){var e=this.props,t=(e.text,e.onCopy,e.options,e.children),n=s(e,["text","onCopy","options","children"]),i=r.default.Children.only(t);return r.default.cloneElement(i,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(n,!0).forEach((function(t){g(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(n).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},n,{onClick:this.onClick}))}}],a&&l(n.prototype,a),o&&l(n,o),t}(r.default.PureComponent);t.CopyToClipboard=M,g(M,"defaultProps",{onCopy:void 0,options:void 0})},56102:function(e,t,n){"use strict";var r=n(83145).CopyToClipboard;r.CopyToClipboard=r,e.exports=r},98040:function(e){e.exports=function(){var e=document.getSelection();if(!e.rangeCount)return function(){};for(var t=document.activeElement,n=[],r=0;r<e.rangeCount;r++)n.push(e.getRangeAt(r));switch(t.tagName.toUpperCase()){case"INPUT":case"TEXTAREA":t.blur();break;default:t=null}return e.removeAllRanges(),function(){"Caret"===e.type&&e.removeAllRanges(),e.rangeCount||n.forEach((function(t){e.addRange(t)})),t&&t.focus()}}},1012:function(e,t,n){"use strict";n.d(t,{Z:function(){return d}});var r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto),i=new Uint8Array(16);function a(){if(!r)throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}var o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var u=function(e){return"string"==typeof e&&o.test(e)},s=[],c=0;c<256;++c)s.push((c+256).toString(16).substr(1));var l=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=(s[e[t+0]]+s[e[t+1]]+s[e[t+2]]+s[e[t+3]]+"-"+s[e[t+4]]+s[e[t+5]]+"-"+s[e[t+6]]+s[e[t+7]]+"-"+s[e[t+8]]+s[e[t+9]]+"-"+s[e[t+10]]+s[e[t+11]]+s[e[t+12]]+s[e[t+13]]+s[e[t+14]]+s[e[t+15]]).toLowerCase();if(!u(n))throw TypeError("Stringified UUID is invalid");return n};var d=function(e,t,n){var r=(e=e||{}).random||(e.rng||a)();if(r[6]=15&r[6]|64,r[8]=63&r[8]|128,t){n=n||0;for(var i=0;i<16;++i)t[n+i]=r[i];return t}return l(r)}},3828:function(){}}]); |