You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
NewEduCoderBuild/p__Shixuns__Detail__Discuss...

1 line
89 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

"use strict";(self.webpackChunk=self.webpackChunk||[]).push([[22254,80248,30002,79121],{65041:function(e,n,t){t.d(n,{Z:function(){return s}});var a=t(1565),i=t(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M505.7 661a8 8 0 0012.6 0l112-141.7c4.1-5.2.4-12.9-6.3-12.9h-74.1V168c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v338.3H400c-6.7 0-10.4 7.7-6.3 12.9l112 141.8zM878 626h-60c-4.4 0-8 3.6-8 8v154H214V634c0-4.4-3.6-8-8-8h-60c-4.4 0-8 3.6-8 8v198c0 17.7 14.3 32 32 32h684c17.7 0 32-14.3 32-32V634c0-4.4-3.6-8-8-8z"}}]},name:"download",theme:"outlined"},c=t(68475),o=function(e,n){return i.createElement(c.Z,(0,a.Z)({},e,{ref:n,icon:r}))};var s=i.forwardRef(o)},44539:function(e,n,t){t.d(n,{Z:function(){return s}});var a=t(1565),i=t(59301),r={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M909.1 209.3l-56.4 44.1C775.8 155.1 656.2 92 521.9 92 290 92 102.3 279.5 102 511.5 101.7 743.7 289.8 932 521.9 932c181.3 0 335.8-115 394.6-276.1 1.5-4.2-.7-8.9-4.9-10.3l-56.7-19.5a8 8 0 00-10.1 4.8c-1.8 5-3.8 10-5.9 14.9-17.3 41-42.1 77.8-73.7 109.4A344.77 344.77 0 01655.9 829c-42.3 17.9-87.4 27-133.8 27-46.5 0-91.5-9.1-133.8-27A341.5 341.5 0 01279 755.2a342.16 342.16 0 01-73.7-109.4c-17.9-42.4-27-87.4-27-133.9s9.1-91.5 27-133.9c17.3-41 42.1-77.8 73.7-109.4 31.6-31.6 68.4-56.4 109.3-73.8 42.3-17.9 87.4-27 133.8-27 46.5 0 91.5 9.1 133.8 27a341.5 341.5 0 01109.3 73.8c9.9 9.9 19.2 20.4 27.8 31.4l-60.2 47a8 8 0 003 14.1l175.6 43c5 1.2 9.9-2.6 9.9-7.7l.8-180.9c-.1-6.6-7.8-10.3-13-6.2z"}}]},name:"reload",theme:"outlined"},c=t(68475),o=function(e,n){return i.createElement(c.Z,(0,a.Z)({},e,{ref:n,icon:r}))};var s=i.forwardRef(o)},35245:function(e,n,t){t.d(n,{$Y:function(){return U},A0:function(){return Q},EP:function(){return o},F_:function(){return u},G9:function(){return l},GB:function(){return z},GR:function(){return y},GW:function(){return B},Hp:function(){return m},Ir:function(){return i},N$:function(){return R},NZ:function(){return A},Nv:function(){return $},OA:function(){return H},OJ:function(){return O},QF:function(){return q},RS:function(){return I},RY:function(){return K},Rj:function(){return T},SX:function(){return D},Tp:function(){return G},Ui:function(){return W},V1:function(){return P},Vn:function(){return L},dL:function(){return J},fo:function(){return E},gK:function(){return v},hK:function(){return g},i3:function(){return p},ib:function(){return x},lS:function(){return j},m5:function(){return s},n4:function(){return a},n_:function(){return f},oP:function(){return V},p2:function(){return Y},pl:function(){return C},rM:function(){return S},sM:function(){return h},t2:function(){return w},tD:function(){return N},u8:function(){return M},um:function(){return X},vm:function(){return F},wQ:function(){return d},wj:function(){return Z},wt:function(){return _},yS:function(){return b},yi:function(){return r},ym:function(){return k},z2:function(){return c}});var a="FETCH_TASK_START",i="FETCH_TASK_FAILURE",r="FETCH_TASK_SUCCESS",c="UPDATE_TASK_DATA",o="HIDE_EVALUATE_RESULT",s="SHOW_EVALUATE_RESULT",l="UPDATE_TIMESTRAP",u="MOVE_X",d="MOVE_Y",p="TRIGGER_RIGHT_PANEL_MASK ",f="SET_ACTIVE_INDEX",h="GET_TASK_LIST",m="SHOW_TASK_LIST",g="HIDE_TASK_LIST",x="SET_TASK_STAR",j="TRIGGER_ENLARGE_UNITY3D ",v="TRIGGER_TAB_FIXED ",y="GET_DISCUSSES",N="SHOW_DISCUSSES_LOADING",M="TOP_OR_DOWN_DISCUSS",S="PLUS_DISCUSS",b="SET_ACTION_TYPE",I="SHOW_REWARD_DIALOG",w="CANCEL_REWARD_DIALOG",L="SET_REWARD",D="ACTIVE_DISCUSS_INDEX",E="DISABLE_DISCUSS",_="SHOW_ANSWER_LOADING",C="FETCH_ANSWER_INFO",A="HIGH_TIP_MODAL",T="SHOW_TIP_MODAL",k="SELECT_UNLOCK_ANSWER",O="SET_CHOOSE_ANSWERS",Z="EVAL_CHOOSE_START",P="EVAL_CHOOSE_END",z="FETCH_REP_CONTENT",R="EDIT_REP_CONTENT",W="SHOW_EVALUATE_LOADING",Q="HIDE_EVALUATE_LOADING",Y="SET_EVALUATE_MESSAGE",B="SET_SHOW_DIR",U="SET_EDITOR_THEME",G="SET_EDITOR_FONTSIZE",V="SET_REPOS",H="HIDE_PICTURE_VIEW",F="SHOW_PICTURE_VIEW",J="SHOW_NOTICE",$="HIDE_NOTICE",K="SET_VNC_LOADING ",X="ON_TAB_TO_SPACE ",q="ON_AUTO_FORMAT "},33562:function(e,n,t){t.d(n,{KQ:function(){return h},KY:function(){return u},OY:function(){return s},S8:function(){return l},U_:function(){return f},_Z:function(){return c},ae:function(){return o},o7:function(){return i},rd:function(){return p},wJ:function(){return r},wg:function(){return d}});var a=t(90694);function i(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;return(0,a.U2)("/discusses.json",{container_type:"Shixun",container_identifier:e,page:n-1})}function r(e,n){return(0,a.v_)("/discusses/".concat(e,"/top_or_down_discuss.json"),{top:n})}function c(e,n){return(0,a.v_)("/discusses/".concat(e,"/disable_or_open_discuss.json"),{is_disable:!!n})}function o(e,n){return(0,a.v_)("/discusses/".concat(e,"/plus.json"),{container_type:"Discuss",type:n?1:0})}function s(e,n){return(0,a.v_)("/discusses/".concat(e,"/hidden.json"),n)}function l(e,n){return(0,a.v_)("/discusses/".concat(e,"/reward_code.json"),n)}function u(e){return(0,a.ZP)("/api/discusses/".concat(e,".json"),{method:"delete"})}function d(e,n){return(0,a.v_)("/discusses/".concat(e,"/reply.json"),{container_type:"Shixun",content:n})}function p(e){return(0,a.v_)("/discusses.json",e)}function f(e){return(0,a.v_)("/discusses/ai_reply.json",e)}function h(e,n){return(0,a.v_)("/discusses/".concat(e,"/turing.json"),n)}},53842:function(e,n,t){function a(e){var n=!0;if(e.length>0){for(var t=0;t<e.length;t++)if(0==e[t].compile_success||!e[t].compile_success){n=!1;break}}else n=!1;return n}function i(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=[],a=0;a<e.length;a++){var i=e[a],r=n?"".concat(n,"/").concat(i.name):"".concat(i.name);t.push({title:i.name,isLeaf:"tree"!==i.type,key:r})}return t}function r(e,n,t){for(var a=0;a<e.length;a++){var i=e[a];if(i.key===n){i.children=t;break}i.children&&r(i.children,n,t)}return e}function c(e,n,t){var a;return function(){var i=this,r=arguments,c=function(){a=null,t||e.apply(i,r)},o=t&&!a;clearTimeout(a),a=setTimeout(c,n),o&&e.apply(i,r)}}t.d(n,{Ax:function(){return r},Ds:function(){return c},KI:function(){return o},SI:function(){return i},f1:function(){return a}});var o=t(57357).Z.API_SERVER},77984:function(e,n,t){var a=t(82242),i=t.n(a),r=(t(59301),t(19779)),c=t(3113),o=t(37712);n.Z=function(e){var n=e.img,t=e.buttonProps,a=void 0===t?{}:t,s=e.styles,l=void 0===s?{}:s,u=e.customText,d=e.ButtonText,p=e.ButtonClick,f=e.Buttonclass,h=e.ButtonTwo,m=e.imgStyles,g=e.loading,x=void 0!==g&&g;return(0,o.jsxs)("section",{className:"tc animated fadeIn",style:i()(i()({},{color:"#999",margin:"100px auto",visibility:x?"hidden":"visible"}),l),children:[(0,o.jsx)("img",{src:n||r,style:i()({width:288,height:200},m)}),(0,o.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,o.jsx)(c.ZP,i()(i()({className:f,onClick:p},a),{},{children:d})),h&&h]})}},2701:function(e,n,t){t.d(n,{Z:function(){return M}});var a=t(82242),i=t.n(a),r=t(7557),c=t.n(r),o=t(41498),s=t.n(o),l=t(79800),u=t.n(l),d=t(59301),p={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},f=t(3113),h=t(74516),m=t(23239),g=t(6848),x=t(41282),j=t(66151),v=t(77984),y=t(57357),N=t(37712),M=function(e){var n,t,a,r,o,l,M,S=e.editOffice,b=void 0===S?"view":S,I=e.data,w=(e.theme,e.type),L=e.filename,D=e.monacoEditor,E=e.className,_=e.style,C=e.close,A=e.onClose,T=e.hasMask,k=e.disabledDownload,O=e.onImgDimensions,Z=e.showNodata,P=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),z=u()(P,2),R=(z[0],z[1],(0,d.useState)("")),W=u()(R,2),Q=(W[0],W[1]),Y=(0,d.useState)(),B=u()(Y,2),U=B[0],G=B[1],V="build"===window.ENV?"/react/build":"",H=location.host.startsWith("localhost")?y.Z.PROXY_SERVER:y.Z.API_SERVER;console.log("disabledDownload---",k);var F=(0,d.useRef)();null!==(n=I)&&void 0!==n&&n.startsWith("/api")&&"txt"!==w&&(I=y.Z.API_SERVER+I),L&&(D.filename=L),(0,d.useEffect)((function(){var e,n=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==n||n.map((function(e){var n=e.split("=");"_educoder_session"===n[0]&&Q(n[1])}))}),[]),(0,d.useEffect)((function(){"office"===w&&J()}),[w,I]);var J=function(){var e=s()(c()().mark((function e(){var n,t,a;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",I),n=I,I.startsWith("http")||(n=location.origin+n),t=new URL(n).pathname.split("/").pop(),e.next=6,(0,j.gJ)({attachment_id:t});case 6:a=e.sent,G(a);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),$=function(){I.startsWith("http")||I.startsWith("blob:")?K():(0,x.Sv)(L||"educoder",I,L)},K=function(){(0,x.Nd)(L||"educoder",decodeURIComponent(I))};return console.log(I,"data"),(0,N.jsxs)("div",{style:i()({},_||{}),className:"".concat(T&&p.bgBlack," ").concat(w?p.wrp:"hide"),children:[C&&(0,N.jsxs)("div",{className:p.close,ref:F,children:[!!O&&(0,N.jsx)(g.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return F.current},children:(0,N.jsx)("span",{onClick:function(){A(),O()},children:(0,N.jsx)("i",{className:"icon-yulanpizhu"})})}),!k&&(0,N.jsx)(g.Z,{title:"点击下载此文件",getPopupContainer:function(){return F.current},children:(0,N.jsx)("span",{onClick:K,children:(0,N.jsx)("i",{className:"icon-quxiaozhiding"})})}),(0,N.jsx)(g.Z,{title:"关闭",getPopupContainer:function(){return F.current},children:(0,N.jsx)("span",{className:"",onClick:A,children:(0,N.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,N.jsx)("div",{className:"".concat(p[E]," ").concat(E," ").concat(p.monaco," ").concat("txt"===w?"show":"hide"),children:"txt"===w&&(0,N.jsx)(m.ZP,i()({},D))}),"audio"===w&&(0,N.jsx)("audio",{src:(null===(t=I)||void 0===t?void 0:t.indexOf("http"))>-1||null!==(a=I)&&void 0!==a&&a.startsWith("/api")?I:"data:image/png;base64,".concat(I),autoPlay:!0}),"video"===w&&(0,N.jsx)(N.Fragment,{children:(null===(r=I)||void 0===r?void 0:r.indexOf("http"))>-1||null!==(o=I)&&void 0!==o&&o.startsWith("/api")?(0,N.jsx)("video",{controls:!0,src:"".concat(I),autoPlay:!0}):(0,N.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(I),autoPlay:!0})}),"office"===w&&U&&(0,N.jsx)("iframe",{src:"".concat(V,"/office.html?key=").concat(U.key,"&url=").concat(H+U.url,"&callbackUrl=").concat(H+U.callbackUrl,"&fileType=").concat(U.fileType,"&title=").concat(U.title,"&model=").concat(b,"&officeServer=").concat(y.Z.ONLYOFFICE,"&disabledDownload=").concat(!!k)}),"html"===w&&(0,N.jsx)("iframe",{src:I+"&disposition=inline"}),"pdf"===w&&(0,N.jsx)("iframe",{src:"".concat(V,"/js/pdfview/index.html?url=").concat(I,"&disabledDownload=").concat(!!k)}),"image"===w&&(0,N.jsx)("img",{src:(null===(l=I)||void 0===l?void 0:l.indexOf("http"))>-1||null!==(M=I)&&void 0!==M&&M.startsWith("/api")?I:"data:image/png;base64,".concat(I)}),("other"===w||"download"===w)&&(0,N.jsx)(N.Fragment,{children:Z?(0,N.jsx)(v.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,N.jsx)(f.ZP,{icon:(0,N.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:$,children:"下载"})}):(0,N.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:$,children:[(0,N.jsx)(h.Z,{}),"点击下载"]})})]})}},80248:function(e,n,t){t.d(n,{Z:function(){return B}});var a=t(82242),i=t.n(a),r=t(37205),c=t.n(r),o=t(91232),s=t.n(o),l=t(79800),u=t.n(l),d=t(59301),p=(t(8341),t(32834)),f=t.n(p),h=t(11690);var m=[],g=["<ul>"],x=new(f().Renderer),j=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function v(){m.length=0,g=["<ul>"]}var y={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function N(e,n,t,a){if(n>=e.length||e[n].level<=t)return n;var i=e[n];a.push("<li><a href='#"+i.anchor+"'>"+i.text+"</a>");var r=[];return n=N(e,++n,i.level,r),r.length>0&&(a.push("<ul>"),r.forEach((function(e){a.push(e)})),a.push("</ul>")),a.push("</li>"),n=N(e,n,t,a)}function M(){return N(m,0,0,g),g.push("</ul>"),g.join("")}var S={heading:function(e){var n=j.exec(e);if(n)return{type:"heading",raw:n[0],depth:n[1].length,text:n[2]}},fences:function(e){var n=this.rules.block.fences.exec(e);if(n){var t=n[0],a=function(e,n){var t=e.match(/^(\s+)(?:```)/);if(null===t)return n;var a=t[1];return n.split("\n").map((function(e){var n=e.match(/^\s+/);return null===n?e:u()(n,1)[0].length>=a.length?e.slice(a.length):e})).join("\n")}(t,n[3]||""),i=n[2]?n[2].trim():n[2];if(["latex","katex","math"].indexOf(i)>=0){var r=w(),c=a;a=r,L[r]={type:"block",expression:c}}return{type:"code",raw:t,lang:i,text:a}}}},b=/(?:\${2})([^\n`]+?)(?:\${2})/gi,I=0,w=function(){return"__special_katext_id_".concat(I++,"__")},L={};function D(){return L}function E(){I=0,L={}}function _(e){return e=e.replace(b,(function(e,n){var t=w();return L[t]={type:"inline",expression:n},t}))}var C=x.listitem;x.listitem=function(e){return C(_(e))};var A=x.paragraph;x.paragraph=function(e){return A(_(e))};var T=x.tablecell;x.tablecell=function(e,n){return T(_(e),n)},x.code=function(e,n,t){var a=(n||"").match(/\S*/)[0];return a?["latex","katex","math"].indexOf(a)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(n,'">').concat(t?e:(0,h.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(t?e:(0,h.escape)(e,!0))+"</code></pre>"},x.heading=function(e,n,t){var a=this.options.headerPrefix+t.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return m.push({anchor:a,level:n,text:e}),"<h"+n+' id="'+a+'">'+e+"</h"+n+">"},f().setOptions({silent:!0,gfm:!0,pedantic:!1}),f().use({tokenizer:S,renderer:x});var k=f(),O=(t(64018),t(63824)),Z=t(57357),P=t(15342),z=t(1012),R=t(2701),W=t(37712),Q="@▁@",Y=/<pre[^>]*>/g;var B=function(e){var n=e.value,t=void 0===n?"":n,a=e.className,r=e.showTextOnly,o=e.showLines,l=e.style,p=void 0===l?{}:l,f=e.stylesPrev,h=void 0===f?{}:f,m=e.highlightKeywords,g=e.showProgramFill,x=(e.isProgramFill,e.disabledFill),j=void 0!==x&&x,N=e.programFillValue,S=e.onFillChange,b=void 0===S?function(e){}:S,I=e.onFillBlur,w=void 0===I?function(){}:I,L=String(t),_=(0,d.useState)(""),C=u()(_,2),A=C[0],T=C[1],B=(0,d.useState)("office"),U=u()(B,2),G=U[0],V=U[1],H=(0,d.useState)([]),F=u()(H,2),J=F[0],$=F[1],K=(0,d.useRef)("a"+(0,z.Z)()),X={},q=function(e){return e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,n){var t=n.replace(/(\n|\r)/g,"").split("}"),a=[];return t.map((function(e){""!=e&&a.push(".".concat(K.current," ").concat(e))})),"<style>".concat(a.join("}"),"</style>")}))},ee=(0,d.useMemo)((function(){try{L=L.replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\/|\(\/attachments\/download\//g,"("+Z.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+Z.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+Z.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")}catch(e){}if(g){var e=-1;return L=L.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(n,t,a){return function(e,n){var t=document.createElement(e===Q?"input":"textarea");t.style.width="100%",t.style.height=e===Q?"40px":"151px",t.rows=5,t.spellcheck=!1,t.name="edu-program-fill",t.placeholder="请输入",t.dataset.id=n;var a=Object.keys(X).length;return X[a]=t,'<span class="edu-program-fill-wrap '.concat(e===Q?"":"show",'" style="width:').concat(e===Q?"200px":"100%",'"><span>').concat(t.outerHTML,'<span class="edu-program-fill-score"></span></span></span>')}(n,++e)})),'<pre style="background:#fff;padding:4px">'.concat(q(L||""),"</pre>")}var n=k(L);n=q(n);var t=D();L.match(/\[TOC\]/)&&(n=n.replace("<p>[TOC]</p>",M()),v()),n=n.replace(/(__special_katext_id_\d+__)/g,(function(e,n){var a=t[n],i=a.type,r=a.expression;return(0,P.renderToString)(function(e){var n=document.createElement("div");return n.innerHTML=e,0===n.childNodes.length?"":n.childNodes[0].nodeValue}(r)||"",{displayMode:"block"===i,throwOnError:!1,output:"html"})})),n=n.replace(/▁/g,"▁▁▁"),E();var a=document.createElement("div");return a.innerHTML=n,m?(ae(a,m.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),a.innerHTML):r?a.innerText:(setTimeout((function(){return ce()}),500),console.log("dom.innerHTML:",a.innerHTML),a.innerHTML)}),[L,m]);(0,d.useEffect)((function(){ie.current&&ie.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=ne,e.onblur=te}))}),[J]),(0,d.useEffect)((function(){if(null!=N&&N.length){var e,n=ie.current.querySelectorAll(".edu-program-fill-score"),t=ie.current.querySelectorAll('[name="edu-program-fill"]'),a=s()(t.entries());try{for(a.s();!(e=a.n()).done;){var i,r=u()(e.value,2),c=r[0],o=r[1];o.value=null===(i=N[c])||void 0===i?void 0:i.value,"warning"===N[c].type?o.className="program-fill-warning":"success"===N[c].type?o.className="program-fill-success":o.className=""}}catch(e){a.e(e)}finally{a.f()}var l,d=s()(n.entries());try{for(d.s();!(l=d.n()).done;){var p,f,h=u()(l.value,2),m=h[0];h[1].innerHTML=null!==(p=N[m])&&void 0!==p&&p.score?"".concat(null===(f=N[m])||void 0===f?void 0:f.score,"分"):""}}catch(e){d.e(e)}finally{d.f()}$(N)}}),[N]);var ne=function(e){J[e.target.dataset.id]=J[e.target.dataset.id]||{},J[e.target.dataset.id].value=e.target.value,$(c()(J)),b(J,e.target.dataset.id)},te=function(e){J[e.target.dataset.id]=J[e.target.dataset.id]||{},J[e.target.dataset.id].value=e.target.value,$(c()(J)),w(J,e.target.dataset.id)};function ae(e,n){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)ae(e,n);else if("IMG"!==e.nodeName)if(e.innerHTML){var t;e.innerHTML=null===(t=e.innerHTML)||void 0===t?void 0:t.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var a=document.createElement("span");a.innerHTML=e.textContent.replace(new RegExp(n,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(a)}}))}var ie=(0,d.useRef)();function re(e){var n=e.target;if("A"===n.tagName.toUpperCase()){var t=n.getAttribute("href");if(t.indexOf("office")>-1)e.preventDefault(),T(t),V("office");else if(t.indexOf("application/pdf")>-1)e.preventDefault(),T(t),V("pdf");else if(t.indexOf("text/html")>-1)e.preventDefault(),T(t),V("html");else if(t.startsWith("#")){e.preventDefault();var a=document.getElementById(t.replace("#",""));a&&a.scrollIntoView(!0)}}}y.WebkitLineClamp=o,o&&(p=i()(i()({},p),y));var ce=function(){var e,n=null===(e=ie.current)||void 0===e?void 0:e.querySelectorAll("video");null==n||n.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(O.ZP.isSupported()){var n=new O.ZP;n.loadSource(e.src),n.attachMedia(e)}}))};return(0,d.useEffect)((function(){if(ie.current&&ee&&ee.match(Y)&&window.PR.prettyPrint(),ie.current)return ie.current.addEventListener("click",re),function(){var e;null===(e=ie.current)||void 0===e||e.removeEventListener("click",re),E(),v()}}),[ee,ie.current,re]),(0,W.jsxs)(W.Fragment,{children:[r&&(0,W.jsx)("div",{ref:ie,children:ee}),!r&&(0,W.jsx)("div",{ref:ie,style:i()({},p),className:"".concat(a||""," ").concat(j?"disabled-fill":""," markdown-body ").concat(K.current),dangerouslySetInnerHTML:{__html:ee}}),(0,W.jsx)(R.Z,{close:!0,data:A,type:null!=A&&A.length?G:"",style:i()({},h),onClose:function(){return T("")}})]})}},48534:function(e,n,t){t.d(n,{Z:function(){return o}});t(59301);var a=t(51882),i="ldsRing___mpBZC",r="idsRingWrapper___Of9_n",c=t(37712),o=function(e){var n=e.message,t=e.className,o=(e.children,e.style),s=void 0===o?{}:o;return(0,c.jsxs)("div",{className:"".concat(r," ").concat(t),children:[(0,c.jsxs)("div",{className:i,children:[(0,c.jsx)("div",{}),(0,c.jsx)("div",{}),(0,c.jsx)("div",{}),(0,c.jsx)("div",{})]}),n?(0,c.jsx)("p",{style:s,children:n}):null,(0,c.jsx)(a.Outlet,{})]})}},46585:function(e,n,t){t.d(n,{Z:function(){return p}});var a=t(79800),i=t.n(a),r=t(59301),c=t(24785),o=t(3113),s=t(44539),l=t(65041),u=t(14834),d=t(37712),p=function(){var e=(0,r.useState)(""),n=i()(e,2),t=n[0],a=n[1],p=(0,r.useState)(0),f=i()(p,2),h=f[0],m=f[1],g=(0,r.useRef)("");function x(e){27==e.keyCode&&g.current&&j()}function j(){document.body.style.overflow="auto",a("")}(0,r.useEffect)((function(){return c.Z.subscribe("preview-image",(function(e){a(e),document.body.style.overflow="hidden"}))}),[]),(0,r.useEffect)((function(){return document.addEventListener("keydown",x),function(){document.removeEventListener("keydown",x)}}),[]),(0,r.useEffect)((function(){g.current=t}),[t]);var v=(0,r.useRef)(),y=(0,r.useRef)();return(0,d.jsx)(r.Fragment,{children:t?(0,d.jsxs)("div",{className:"image-preview-container",ref:v,onClick:function(e){e.nativeEvent.target!==v.current&&e.nativeEvent.target!==y.current||j()},children:[(0,d.jsxs)("div",{className:"button-group",children:[(0,d.jsxs)(o.ZP,{onClick:function(){m(h+90)},children:["旋转",(0,d.jsx)(s.Z,{})]}),(0,d.jsxs)(o.ZP,{href:t,children:["下载",(0,d.jsx)(l.Z,{})]}),(0,d.jsxs)(o.ZP,{onClick:j,children:["关闭",(0,d.jsx)(u.Z,{})]})]}),(0,d.jsx)("div",{className:"preview-wrp-group",ref:y,children:(0,d.jsx)("img",{className:"image-preview",src:t,alt:"预览大图",style:{transform:"rotate(".concat(h,"deg)")}})})]}):null})}},71550:function(e,n,t){t.d(n,{h:function(){return x}});var a=t(82242),i=t.n(a),r=t(79800),c=t.n(r),o=t(59301),s=t(57809),l=t(78241),u=t(3113),d=t(89780),p=t.n(d),f=(t(49324),t(20615),t(37712)),h=s.default.Option,m={labelCol:{span:4},wrapperCol:{span:20}},g={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function x(e){var n=e.value,t=e.onChange,a=e.mode,r=e.options,s=void 0===r?{}:r,l=(0,o.useRef)(),u=(0,o.useState)(),d=c()(u,2),h=d[0],m=d[1];return(0,o.useEffect)((function(){if(h){var e=function(e){var n=e.getValue();t&&t(n)};return h.on("change",e),function(){h.off("change",e)}}}),[h,t]),(0,o.useEffect)((function(){h&&h.setOption("mode",a)}),[h,a]),(0,o.useEffect)((function(){h&&(n===h.getValue()&&""!==n||setTimeout((function(){h.setValue(n||"")}),300))}),[h,n]),(0,o.useEffect)((function(){if(l.current&&!h){var e=p().fromTextArea(l.current,i()({mode:a,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},s));m(e)}}),[l.current,h]),(0,f.jsx)("div",{className:"my-codemirror-container",children:(0,f.jsx)("textarea",{ref:l})})}n.Z=function(e){var n=e.callback,t=e.onCancel,a=(0,o.useState)("python"),r=c()(a,2),d=r[0],p=r[1];return(0,f.jsxs)(l.Z,i()(i()({},m),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){n(e)},children:[(0,f.jsx)(l.Z.Item,{label:"代码语言",name:"language",children:(0,f.jsx)(s.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){p(g[e][1])},children:Object.keys(g).map((function(e){return(0,f.jsx)(h,{value:e,children:g[e][0]},e)}))})}),(0,f.jsx)(l.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,f.jsx)(x,{mode:d})}),(0,f.jsxs)("div",{className:"flex-container flex-end",children:[(0,f.jsx)(u.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,f.jsx)(u.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))}},94304:function(e,n,t){t.d(n,{Z:function(){return se}});var a=t(91232),i=t.n(a),r=t(7557),c=t.n(r),o=t(41498),s=t.n(o),l=t(79800),u=t.n(l),d=t(85573),p=t.n(d),f=t(59301),h=t(89780),m=t.n(h),g=t(76374),x=(t(49324),t(6313),t(25717),t(99498),t(25419),t(67549),t(80248)),j=t(37712),v=function(e){var n=e.value,t=void 0===n?"":n,a=(e.className,e.showTextOnly,e.showLines,e.style,(0,f.useMemo)((function(){return""}),[t]));return(0,j.jsx)(j.Fragment,{children:(0,j.jsx)("div",{dangerouslySetInnerHTML:{__html:a}})})},y=t(82242),N=t.n(y),M=[{title:"粗体",icon:"icon-bold",actionName:"bold"},{title:"斜体",icon:"icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"icon-file-code",actionName:"code-block"},{title:"链接",icon:"icon-link",actionName:"link"},"|",{title:"行内公式",icon:"icon-sum",actionName:"inline-latex"},{title:"多行公式",icon:"icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"icon-picture",actionName:"upload-image"},{title:"表格",icon:"icon-table",actionName:"add-table"},"|",{title:"换行",icon:"icon-minus",actionName:"line-break"},{title:"清空",icon:"icon-eraser",actionName:"eraser"}];function S(e){var n=e.onActionCallback,t=e.title,a=e.icon,i=e.actionName,r=e.className,c=void 0===r?"":r,o=e.children;return(0,j.jsxs)("a",{title:t,className:c,onClick:function(){n(i)},children:[(0,j.jsx)("i",{className:"md-iconfont ".concat(a)}),o]})}var b=function(e){var n=e.watch,t=e.showNullButton,a=e.showNullProgramButton,i=e.onActionCallback,r=e.fullScreen,c=e.insertTemp,o=e.hidetoolBar,s=[].concat(M,[{title:"".concat(n?"关闭实时预览":"开启实时预览"),icon:"".concat(n?"icon-eye-slash":"icon-eye"),actionName:"trigger-watch"}]);return(0,j.jsxs)("ul",{className:"markdown-toolbar-container",children:[!o&&s.map((function(e,n){return(0,j.jsx)("li",{children:e.actionName?(0,j.jsx)(S,N()(N()({},e),{},{onActionCallback:i})):(0,j.jsx)("span",{className:"v-line"})},n)})),t?(0,j.jsx)("li",{children:(0,j.jsx)(S,{icon:"icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:i,children:(0,j.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,a?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("li",{children:(0,j.jsx)(S,{icon:"icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:i,children:(0,j.jsx)("span",{className:"fill-tip",children:"添加单行填空项"})})}),(0,j.jsx)("li",{children:(0,j.jsx)(S,{icon:"icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:i,children:(0,j.jsx)("span",{className:"fill-tip",children:"添加多行填空项"})})})]}):null,c&&(0,j.jsx)("li",{children:(0,j.jsx)(S,{icon:"icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(c),onActionCallback:i,children:(0,j.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),(0,j.jsx)("li",{className:"btn-full-screen",children:(0,j.jsx)(S,{icon:"".concat(r?"icon-shrink":"icon-enlarge"),title:r?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:i})})]})},I=t(30043),w=t(78241),L=t(98135),D=t(3113),E={labelCol:{span:4},wrapperCol:{span:20}},_=function(e){var n=e.callback,t=e.onCancel;return(0,j.jsxs)(w.Z,N()(N()({},E),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){n(e)},children:[(0,j.jsx)(w.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,j.jsx)(L.Z,{})}),(0,j.jsx)(w.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,j.jsx)(L.Z,{})}),(0,j.jsxs)("div",{className:"flex-container flex-end",children:[(0,j.jsx)(D.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,j.jsx)(D.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))},C=t(71550),A=t(8591),T=t(53842),k=w.Z.useForm,O={width:280,marginRight:10},Z={labelCol:{span:5},wrapperCol:{span:19}},P=function(e){var n=e.callback,t=e.onCancel,a=k(),i=u()(a,1)[0],r=(0,f.useRef)();function c(e,n){-1!==e.status?i.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):A.ZP.error(e.message)}return(0,j.jsxs)(w.Z,N()(N()({form:i},Z),{},{className:"upload-image-panel",onFinish:function(e){n(N()(N()({},e),{},{name:r.current}))},style:{width:470,overflow:"hidden"},children:[(0,j.jsx)(w.Z.Item,{label:"图片地址",required:!0,children:(0,j.jsxs)("div",{className:"flex-container",children:[(0,j.jsx)(w.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入文件地址"}],children:(0,j.jsx)(L.Z,{style:O})}),(0,j.jsx)(z,{onFileChange:function(e){var n=e.target.files[0];r.current=n.name,R(n,c)}})]})}),(0,j.jsx)(w.Z.Item,{label:"图片描述",name:"alt",children:(0,j.jsx)(L.Z,{style:{width:264}})}),(0,j.jsxs)(w.Z.Item,{style:{textAlign:"right"},children:[(0,j.jsx)(D.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,j.jsx)(D.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function z(e){var n=e.onFileChange;return(0,j.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,j.jsx)("input",{type:"file",onChange:n})]})}function R(e,n){if(!e)throw new String("没有文件");var t=new FormData;t.append("editormd-image-file",e),t.append("file_param_name","editormd-image-file"),t.append("byxhr","true");var a=new window.XMLHttpRequest;a.withCredentials=!0,a.addEventListener("load",(function(t){n(JSON.parse(t.target.responseText),e)}),!1),a.addEventListener("error",(function(e){console.error(e)}),!1),a.open("POST","".concat(T.KI,"/api/attachments.json")),a.send(t)}var W=t(5112),Q=t(26220),Y=W.ZP.Group,B={margin:"0 8px"},U=function(e){var n=e.callback,t=e.onCancel;return(0,j.jsxs)(w.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){n(e)},children:[(0,j.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,j.jsx)("span",{style:B,children:"单元格数:"}),(0,j.jsx)("span",{style:B,children:"行数"}),(0,j.jsx)(w.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,j.jsx)(Q.Z,{})}),(0,j.jsx)("span",{style:B,children:"列数"}),(0,j.jsx)(w.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,j.jsx)(Q.Z,{})})]}),(0,j.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,j.jsx)("span",{style:B,children:"对齐方式:"}),(0,j.jsx)(w.Z.Item,{name:"align",children:(0,j.jsxs)(Y,{children:[(0,j.jsx)(W.ZP,{value:"default",children:(0,j.jsx)("i",{className:"fa fa-align-justify"})}),(0,j.jsx)(W.ZP,{value:"left",children:(0,j.jsx)("i",{className:"fa fa-align-left"})}),(0,j.jsx)(W.ZP,{value:"center",children:(0,j.jsx)("i",{className:"fa fa-align-center"})}),(0,j.jsx)(W.ZP,{value:"right",children:(0,j.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,j.jsxs)("div",{className:"flex-container flex-end",children:[(0,j.jsx)(D.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,j.jsx)(D.ZP,{type:"ghost",onClick:t,children:"取消"})]})]})},G=t(57357),V=t(90694),H=t(1012),F=t(43418),J="link",$="upload-image",K="code-block",X="add-table",q="------------",ee={default:q,left:":".concat(q),center:":".concat(q,":"),right:"".concat(q,":")},ne=t(40238);var te="@▁▁@";function ae(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ie=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",re=["pptm","pptx","ppt","pot","pps","ppa","potx","ppsx","ppam","pptm","potm","ppsm","doc","docx","dot","dotx","docm","dotm","xls","xlsx","csv","xlt","xla","xltx","xlsm","xltm","xlam","xlsb"],ce=p()(p()({},ie+"-B","bold"),ie+"-I","italic"),oe=p()(p()(p()(p()({},J,"添加链接"),K,"添加代码块"),$,"添加文件"),X,"添加表格"),se=function(e){var n=e.defaultValue,t=void 0===n?"":n,a=e.onChange,r=e.width,o=void 0===r?"100%":r,l=e.height,d=void 0===l?400:l,h=e.miniToolbar,y=void 0!==h&&h,N=e.isFocus,M=void 0!==N&&N,S=e.watch,w=e.insertTemp,L=e.mode,D=void 0===L?"markdown":L,E=e.id,T=void 0===E?"markdown-editor-id":E,k=e.showResizeBar,O=void 0!==k&&k,Z=e.noStorage,z=void 0!==Z&&Z,W=e.showNullButton,Q=void 0!==W&&W,Y=e.showNullProgramButton,B=void 0!==Y&&Y,q=e.hidetoolBar,ie=void 0!==q&&q,se=e.fullScreen,le=void 0!==se&&se,ue=e.onBlur,de=e.onCMBeforeChange,pe=e.onFullScreen,fe=e.className,he=void 0===fe?"":fe,me=e.disablePaste,ge=void 0!==me&&me,xe=e.disabled,je=void 0!==xe&&xe,ve=e.disabledFill,ye=void 0!==ve&&ve,Ne=e.placeholder,Me=void 0===Ne?"":Ne,Se=e.values,be=void 0===Se?"":Se,Ie=(0,f.useState)(null),we=u()(Ie,2),Le=we[0],De=we[1],Ee=(0,f.useState)(t),_e=u()(Ee,2),Ce=_e[0],Ae=_e[1],Te=(0,f.useState)(S),ke=u()(Te,2),Oe=ke[0],Ze=ke[1],Pe=(0,f.useState)(le),ze=u()(Pe,2),Re=ze[0],We=ze[1],Qe=(0,f.useState)(""),Ye=u()(Qe,2),Be=Ye[0],Ue=Ye[1],Ge=(0,f.useState)(0),Ve=u()(Ge,2),He=Ve[0],Fe=Ve[1],Je=(0,f.useState)(d),$e=u()(Je,2),Ke=$e[0],Xe=$e[1],qe=(0,f.useState)(!1),en=u()(qe,2),nn=(en[0],en[1]),tn=(0,f.useRef)((0,H.Z)()),an=(0,f.useRef)(!1),rn=(0,f.useRef)(),cn=(0,f.useRef)(),on=(0,f.useRef)(),sn=(0,f.useRef)(),ln=(0,f.useRef)(),un=function(){var e=s()(c()().mark((function e(){var n,t;return c()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,V.ZP)("/api/attachments/distinct_hash_val.json",{method:"post",body:{hash_val:tn.current}});case 2:null!=(t=e.sent)&&null!==(n=t.attachments)&&void 0!==n&&n.length&&(console.log("cm:",Le,cn),t.attachments.map((function(e){e.content_type.indexOf("image")>-1?Le.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):e.content_type.indexOf("video")>-1?Le.replaceSelection('<video width="100%" controls src="'.concat(G.Z.API_SERVER,"/api/attachments/").concat(data.id,'"></video>')):e.content_type.indexOf("pdf")>-1?Le.replaceSelection('<a href="'.concat(G.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):Le.replaceSelection("[".concat(e.name,"](").concat(G.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")"))})));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,f.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Ae(be),null==Le||Le.setValue(be),window.scrollTo(0,e)}),[be]),(0,f.useEffect)((function(){null==pe||pe(Re)}),[Re]),(0,f.useEffect)((function(){if(cn.current){var e=function(e,t){if(!ge){var a=t.clipboardData;if(a){var i=a.types.toString(),r=a.items;if("Files"===i||a.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==D)return;try{var c,o=r[1];"file"===(null===(c=r[0])||void 0===c?void 0:c.kind)&&(o=r[0]);var s=o.getAsFile(),l=s.name.split(".").pop();R(s,(function(e){var t,a,i;e.id?(null==s||null===(t=s.type)||void 0===t?void 0:t.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):(null==s||null===(a=s.type)||void 0===a?void 0:a.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(G.Z.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==s||null===(i=s.type)||void 0===i?void 0:i.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(G.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(s.type,'&disposition=inline" target="_blank">').concat(s.name,"</a>")):re.includes(l)?n.replaceSelection('<a href="'.concat(G.Z.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(s.name,"</a>")):n.replaceSelection("[".concat(s.name,"](").concat(G.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(t){A.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=m().fromTextArea(cn.current,{mode:D,lineNumbers:!y,lineWrapping:!0,value:t,autoCloseTags:!B,autoCloseBrackets:!0});return n.on("keyup",(function(e,t){8===t.keyCode&&(""==e.getValue()?n.setOption("placeholder",Me):n.setOption("placeholder",null))})),n.on("keydown",(function(e,n){if(8===n.keyCode){var t=function(e,n){var t=e.getDoc(),a=t.getCursor(),i=t.getLine(a.line),r=i.charAt(a.ch-1),c=i.lastIndexOf("@▁@",a.ch),o=i.lastIndexOf("@▁▁@",a.ch),s=c>o?c:o,l=c>o?3:4;if(-1===te.indexOf(r))return null;if(console.log("change1:",n,e,i,a,s,c,o,r),s>=0&&a.ch-s<5){var u=s+l;return t.replaceRange("",{line:a.line,ch:s},{line:a.line,ch:u}),{line:a.line,ch:u}}return null}(e);t&&n.preventDefault()}})),M&&n.focus(),n.on("paste",e),n.on("dragleave",(function(e,n){on.current.classList.remove("mouse-hover-md")})),n.on("dragover",(function(e,n){on.current.classList.add("mouse-hover-md")})),n.on("drop",(function(e,t){var a;if(on.current.classList.add("mouse-hover-md"),(a=t.dataTransfer.files).length>0){t.preventDefault(),t.stopPropagation();for(var i=function(){var e=a[r],t=e.name.split(".").pop();R(e,(function(a){var i,r,c;a.id?(null==e||null===(i=e.type)||void 0===i?void 0:i.indexOf("image"))>-1?n.replaceSelection("![,](/api/attachments/".concat(a.id,"?type=").concat(a.content_type,")")):(null==e||null===(r=e.type)||void 0===r?void 0:r.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(G.Z.API_SERVER,"/api/attachments/").concat(a.id,'"></video>')):(null==e||null===(c=e.type)||void 0===c?void 0:c.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(G.Z.API_SERVER,"/api/attachments/").concat(a.id,"?type=").concat(e.type,'&disposition=inline" target="_blank">').concat(e.name,"</a>")):re.includes(t)?n.replaceSelection('<a href="'.concat(G.Z.API_SERVER,"/api/attachments/").concat(a.id,'?type=office&disposition=inline" target="_blank">').concat(e.name,"</a>")):n.replaceSelection("[".concat(e.name,"](").concat(G.Z.API_SERVER,"/api/attachments/").concat(a.id,"?type=").concat(a.content_type,")")):401===(null==a?void 0:a.status)&&(document.location.href="/user/login")}))},r=0;r<a.length;r++)i()}})),je&&n.on("beforeChange",(function(e,n){"paste"!==n.origin&&"+input"!==n.origin||n.cancel()})),De(n),function(){n.off("paste",e)}}}),[]);var dn=(0,f.useCallback)((function(){on.current}),[Ke,on,Re]);(0,f.useEffect)((function(){if(Le){var e=function(){var e=new g.Z((function(e){var n,t=i()(e);try{for(t.s();!(n=t.n()).done;){var a=n.value;(a.target.offsetHeight>0||a.target.offsetWidth>0)&&(dn(),Le.setSize("100%","100%"),Le.refresh())}}catch(e){t.e(e)}finally{t.f()}}));return e.observe(cn.current.parentElement),e}();return function(){var n,t;null!==(n=cn.current)&&void 0!==n&&n.parentElement&&e.unobserve(null===(t=cn.current)||void 0===t?void 0:t.parentElement)}}}),[Le,dn]),(0,f.useEffect)((function(){if(Le){for(var e=[],n=function(){var n=u()(a[t],2),i=n[0],r=n[1],c=p()({},i,(function(){pn(r)}));e.push(c),Le.addKeyMap(c)},t=0,a=Object.entries(ce);t<a.length;t++)n();return rn.current=setInterval((function(){an.current&&un()}),4e3),function(){clearInterval(rn.current);for(var n=0,t=e;n<t.length;n++){var a=t[n];Le.removeKeyMap(a)}}}}),[Le]),(0,f.useEffect)((function(){le!==Re&&We(le)}),[le]),(0,ne.Z)((function(){if(!z&&He>0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(T);e>=He+1e4&&(!n||n!==Ce)&&(window.sessionStorage.setItem(T,Ce),nn(!0))}}),1e4),(0,f.useEffect)((function(){Ze(S)}),[Le,S]),(0,f.useEffect)((function(){Le&&M&&Le.focus()}),[Le,M]),(0,f.useEffect)((function(){if(Oe&&Le){var e=function(e){var n=e.target;if(ln.current){var t=n.scrollTop/n.scrollHeight;ln.current.scrollTop=ln.current.scrollHeight*t}},n=Le.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[Le,Oe]),(0,f.useEffect)((function(){if(Le&&de){var e=function(e,n){de(e,n)};return Le.on("beforeChange",e),function(){Le.off("beforeChange",e)}}}),[Le,de]),(0,f.useEffect)((function(){if(Le&&ue){var e=function(){ue(Le.getValue())};return Le.on("blur",e),function(){Le.off("blur",e)}}}),[Le,ue]),(0,f.useEffect)((function(){if(Le){var e=function(e,n){var t=e.getValue();Ae(t),Fe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),a&&(B?a(t,xn(t)):a(t))};return Le.on("change",e),function(){Le.off("change",e)}}}),[Le,a]),(0,f.useEffect)((function(){if(Le)if(null==t)Le.setValue(""),Ae("");else{var e=window.scrollY||window.pageYOffset;t!==Le.getValue()&&(Le.setValue(t),Ae(t),Le.setCursor(je?1:Le.lineCount(),0),window.scrollTo(0,e))}}),[Le,t]);var pn=(0,f.useCallback)((function(e){var n=Le.getCursor(),t=Le.getSelection(),a=t.split("\n");switch(e){case"bold":return Le.replaceSelection("**"+t+"**"),""===t&&Le.setCursor(n.line,n.ch+2),Le.focus();case"italic":return Le.replaceSelection("*"+t+"*"),""===t&&Le.setCursor(n.line,n.ch+1),Le.focus();case"code":return Le.replaceSelection("`"+t+"`"),""===t&&Le.setCursor(n.line,n.ch+1),Le.focus();case"inline-latex":return Le.replaceSelection("`$$"+t+"$$`"),""===t&&Le.setCursor(n.line,n.ch+3),Le.focus();case"latex":return Le.replaceSelection("```latex\n"+t+"\n```"),Le.setCursor(n.line+1,t.length+1),Le.focus();case"line-break":return Le.replaceSelection("<br/>\n"),Le.focus();case"list-ul":return""===t?Le.replaceSelection("- "+t):Le.replaceSelection(a.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Le.focus();case"list-ol":return""===t?Le.replaceSelection("1. "+t):Le.replaceSelection(a.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),Le.focus();case"add-null-ch":return""===t&&Le.setCursor(n.line,n.ch),Le.replaceSelection("▁"),Le.focus();case"add-signal":return""===t&&Le.setCursor(n.line,n.ch),Le.replaceSelection("@▁@"),Le.focus();case"add-multiple":return""===t&&Le.setCursor(n.line,n.ch),Le.replaceSelection(te),Le.focus();case"inster-template-1":return""===t&&Le.setCursor(n.line,n.ch),Le.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),Le.focus();case"eraser":return Le.setValue(""),Le.focus();case"trigger-watch":return Ze(!Oe),Le.focus();case"trigger-full-screen":return We(!Re),Le.focus();case J:return void Ue(J);case K:return void Ue(K);case $:return void Ue($);case X:return void Ue(X);default:throw new Error}}),[Le,Oe,Re]),fn=(0,f.useCallback)((function(e){switch(Ue(""),Be){case J:var n=e.title,t=e.link;return Le.replaceSelection("[".concat(n,"](").concat(t,")")),Le.focus();case K:var a=e.language,i=e.content;return Le.replaceSelection(["```"+a,i,"```"].join("\n")),Le.focus();case $:var r=e.src,c=e.alt;return c?Le.replaceSelection("![ ".concat(c," ]( ").concat(r,' "').concat(c,'" )')):Le.replaceSelection("![,](".concat(r,")")),Le.focus();case X:for(var o=e.row,s=e.col,l=e.align,u="\n",d=0;d<o;d++){for(var p=[],f=[],h=0;h<s;h++)1===d&&f.push(ee[l]),p.push(" ");1===d&&(u+="| ".concat(f.join(" | ")," |\n")),u+="| ".concat(p.join(1===s?"":" | ")," |\n")}return Le.replaceSelection(u+"\n"),Le.focus();default:throw new Error}}),[Le,Be]),hn=(0,f.useMemo)((function(){switch(Be){case J:return(0,j.jsx)(_,{callback:fn,onCancel:mn});case K:return(0,j.jsx)(C.Z,{callback:fn,onCancel:mn});case $:return(0,j.jsx)(P,{callback:fn,onCancel:mn});case X:return(0,j.jsx)(U,{callback:fn,onCancel:mn});default:return null}}),[Be]);function mn(){Ue("")}(0,f.useEffect)((function(){if(sn.current){var e=function(e){i=!0,r=e.pageY},n=function(){i=!1},t=function(e){if(i){var n=e.pageY-r;n<0&&(n=0),n>300&&(n=300),Xe(d+n+"px")}},a=sn.current,i=!1,r=0;return a.addEventListener("mousedown",e),document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),function(){a.removeEventListener("mousedown",e),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)}}}),[Le,sn]),(0,f.useEffect)((function(){Xe(d)}),[d]);var gn={width:ae(o),height:ae(Ke)},xn=((0,f.useMemo)((function(){if(He){var e=new Date(He),n=e.getHours(),t=e.getMinutes(),a=e.getSeconds();return t=t<10?"0"+t:t,a=a<10?"0"+a:a,"".concat(n=n<10?"0"+n:n,":").concat(t,":").concat(a)}return 0}),[He]),function(e){var n=[];if(B){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,a){n.push({multiLine:!("@▁@"===e)})}))}return n});return(0,j.jsxs)(f.Fragment,{children:[(0,j.jsx)("div",{className:"markdown-editor-wrapper",ref:on,children:(0,j.jsxs)("div",{className:"markdown-editor-container ".concat(he," ").concat(Oe?"on-preview":""," ").concat(y?"mini":""," ").concat(Re?"full-screen":""),style:gn,children:[(0,j.jsx)(b,{insertTemp:w,watch:Oe,fullScreen:Re,showNullButton:Q,showNullProgramButton:B,onActionCallback:pn,hidetoolBar:ie,uuid:tn.current,setOpenPhones:function(){an.current=!0}}),(0,j.jsxs)("div",{className:"markdown-editor-body",children:[(0,j.jsx)("div",{className:"codemirror-container",children:(0,j.jsx)("textarea",{ref:cn,placeholder:Me})}),Oe?(0,j.jsxs)("div",{ref:ln,className:"preview-container",children:["stex"===D&&(0,j.jsx)(v,{value:Ce}),"stex"!==D&&(0,j.jsx)(x.Z,{disabledFill:ye,showProgramFill:B,value:Ce})]}):null]})]})}),O?(0,j.jsx)("a",{ref:sn,className:"editor-resize"}):null,(0,j.jsx)(I.Z,{children:oe[Be]?(0,j.jsx)(F.Z,{centered:!0,title:oe[Be],open:!0,onCancel:mn,footer:null,className:"markdown-popup-form",children:hn}):null})]})}},30043:function(e,n,t){t.d(n,{Z:function(){return f}});var a=t(82100),i=t.n(a),r=t(29186),c=t.n(r),o=t(80619),s=t.n(o),l=t(47074),u=t.n(l),d=t(59301),p=t(4676),f=function(e){s()(t,e);var n=u()(t);function t(e){var a;i()(this,t),a=n.call(this,e);var r=window.document;return a.node=r.createElement("div"),r.body.appendChild(a.node),a}return c()(t,[{key:"render",value:function(){var e=this.props.children;return(0,p.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),t}(d.Component)},40238:function(e,n,t){t.d(n,{Z:function(){return i}});var a=t(59301);function i(e,n){var t=(0,a.useRef)();(0,a.useEffect)((function(){t.current=e})),(0,a.useEffect)((function(){if(null!==n){var e=setInterval((function(){t.current()}),n);return function(){return clearInterval(e)}}}),[n])}},88288:function(e,n,t){t.r(n),t.d(n,{default:function(){return D}});var a=t(79800),i=t.n(a),r=t(39647),c=t.n(r),o=t(59301),s=t(51882),l=t(97874),u=t(79121),d=t(46585),p="bg___GVdDO",f="wrap___ROzHg",h="btn___g5tGP",m=t(7557),g=t.n(m),x=t(82242),j=t.n(x),v=t(41498),y=t.n(v),N=t(43418),M=t(14491),S=t(90694),b=t(37712),I=function(e){var n=e.visible,t=(e.onOK,e.onCancel),a=(0,o.useState)([]),r=i()(a,2),c=r[0],l=r[1],u=(0,o.useState)(!0),d=i()(u,2),p=d[0],f=d[1],h=(0,o.useState)(0),m=i()(h,2),x=m[0],v=m[1],I=(0,o.useState)({page:1,limit:10}),w=i()(I,2),L=w[0],D=w[1],E=(0,s.useParams)();(0,o.useEffect)((function(){n&&A(L)}),[n]);var _=[{title:"姓名",dataIndex:"name",key:"name",align:"left",ellipsis:!0},{title:"学校",dataIndex:"school_name",key:"school_name",align:"left",ellipsis:!0},{title:"禁止时间",dataIndex:"created_at",key:"created_at",align:"left"},{title:"禁止次数",dataIndex:"disable_count",key:"disable_count",align:"left"},{title:"审批操作",dataIndex:"action",key:"action",align:"left",render:function(e,n){return(0,b.jsx)("span",{onClick:function(){return C(n)},className:"c-light-primary current",children:"恢复评论功能"})}}],C=function(){var e=y()(g()().mark((function e(n){var t;return g()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.ZP)("/api/discuss_disable_users/cancel.json",{method:"post",body:{container_id:null==E?void 0:E.id,container_type:"Shixun",user_id:n.id}});case 2:0===e.sent.status&&(t=1===c.length&&1!==L.page?L.page-1:L.page,A(j()(j()({},L),{},{page:t})),D(j()(j()({},L),{},{page:t})));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),A=function(){var e=y()(g()().mark((function e(n){var t;return g()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return f(!0),e.next=3,(0,S.ZP)("/api/discuss_disable_users.json",{method:"get",params:j()({container_id:null==E?void 0:E.id,container_type:"Shixun"},n)});case 3:null!=(t=e.sent)&&t.data&&(console.log(t.data),l(null==t?void 0:t.data),v((null==t?void 0:t.count)||0)),f(!1);case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,b.jsx)(N.Z,{title:"禁止评论用户列表",open:n,footer:null,centered:!0,onCancel:function(){D({page:1,limit:10}),t()},width:900,children:(0,b.jsx)(M.Z,{dataSource:c,rowKey:function(e){return e.id},columns:_,loading:p,pagination:{pageSize:L.limit,total:x,current:L.page,onChange:function(e,n){var t=j()(j()({},L),{},{page:e,limit:n});D(t),A(t)},showQuickJumper:!0,hideOnSinglePage:!0,position:["bottomCenter"]}})})},w=t(3113),L=["shixunsDetail","globalSetting","loading","user","dispatch"],D=(0,s.connect)((function(e){var n=e.shixunsDetail,t=e.loading;return{shixunsDetail:n,globalSetting:e.globalSetting,user:e.user,loading:t}}))((function(e){var n,t,a,r=e.shixunsDetail,s=(e.globalSetting,e.loading,e.user),m=(e.dispatch,c()(e,L),null===(n=s.userInfo)||void 0===n||null===(n=n.shixun)||void 0===n?void 0:n.own),g=(0,o.useState)(!1),x=i()(g,2),j=x[0],v=x[1],y=(0,o.useState)(0),N=i()(y,2),M=N[0],S=N[1];return(0,b.jsxs)("section",{className:p,children:[(0,b.jsxs)("div",{className:f,children:[(0,b.jsxs)("div",{className:h,children:[(0,b.jsx)("div",{className:"font16 c-grey-333 bold",children:"实践项目评论"}),m&&(0,b.jsxs)(w.ZP,{onClick:function(){return v(!0)},type:"link",children:["禁止评论用户列表",(0,b.jsx)("i",{className:"iconfont icon-lujing font14 ml5"})]})]}),(0,b.jsx)(l.Z,{activeIndex:3,shixunIdentifier:null===(t=r.detail)||void 0===t?void 0:t.identifier,identity:null===(a=s.userInfo)||void 0===a?void 0:a.role,user:s.userInfo,isShixunDetail:!0,allowDisableDiscuss:m},M)]}),(0,b.jsx)(u.Z,{}),(0,b.jsx)(d.Z,{}),(0,b.jsx)(I,{visible:j,onCancel:function(){v(!1),S(M+1)}})]})}))},79121:function(e,n,t){t.d(n,{Z:function(){return k}});var a=t(79800),i=t.n(a),r=t(39647),c=t.n(r),o=t(59301),s=t(51882),l=t(57357),u=t(93948),d=t(6848),p="rightWrap___Y_2WO",f="learnWrap___mca1k",h="learnTopWrap___cn6Tj",m="courseWrap___N3Z6X",g="pathWrap___QSdXs",x="pathImg___VjPqu",j="pathContentItem___sxOSQ",v="pathContentWrap___WttwX",y="pathContentName___evsEv",N="pathContent___fz4ds",M="pathContentCount___Jlv3G",S="recommandTrainingWrap___F1gpg",b="recommandContent___JZYAA",I="recommandLevel___McDUw",w="color888___l_1AP",L="skillWrap___j6j3B",D="skillTopWrap___kIJbE",E="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 _=t(42441),C=t(30927),A=(t(56047),t(37712)),T=["shixunsDetail","user","globalSetting","loading","dispatch"],k=(0,s.connect)((function(e){var n=e.shixunsDetail,t=e.user,a=e.loading;return{shixunsDetail:n,user:t,globalSetting:e.globalSetting,loading:a.models.index}}))((function(e){var n,t,a,r,s,k,O,Z,P,z,R,W,Q,Y,B,U,G,V=e.shixunsDetail,H=e.user,F=(e.globalSetting,e.loading,e.dispatch,c()(e,T),(0,o.useState)(!0)),J=i()(F,2);J[0],J[1];console.log("----",V);var $,K,X=null!==(n=V.rightData)&&void 0!==n&&n.complete_count?Number(null===(t=V.rightData)||void 0===t?void 0:t.complete_count)/Number(null===(a=V.rightData)||void 0===a?void 0:a.challenge_count)*100:0;return V.rightData?(0,A.jsxs)("section",{className:p,children:[!(null!==(r=V.detail)&&void 0!==r&&r.is_jupyter)&&(null===(s=V.detail)||void 0===s||null===(s=s.task_operation)||void 0===s?void 0:s[2])&&(null==H||null===(k=H.userInfo)||void 0===k?void 0:k.login)&&!(null===(O=V.rightData)||void 0===O||!O.complete_count)&&(null===(Z=V.rightData)||void 0===Z?void 0:Z.complete_count)>0&&(0,A.jsxs)("div",{className:f,children:[(0,A.jsxs)("div",{className:h,children:[(0,A.jsxs)("span",{children:[(0,A.jsx)("img",{className:E,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cGF0aCBkPSJNMTAgMmMuMDIgMCAuMDMuNzUuMDMyIDEuODM5bC4wMyA4LjE2SDkuMTlsLTMuOTMyIDYuMDA1aC45OEwxMC4wNjIgMTJIMjBjMCA1LjUyMy00LjQ3NyAxMC0xMCAxMFMwIDE3LjUyMyAwIDEyIDQuNDc3IDIgMTAgMlptLS4zNDggMTIuOTM4Yy0uNDYzIDAtLjgzNC4xNDctMS4xMTMuNDQzLS4yNzkuMjk1LS40MTguNjkzLS40MTggMS4xOTMgMCAuNDUzLjEzLjgxOS4zOSAxLjA5Ni4yNjEuMjc3LjYwNi40MTYgMS4wMzYuNDE2LjQ1OCAwIC44MjctLjE0OCAxLjEwNS0uNDQzLjI3OS0uMjk2LjQxOC0uNjkxLjQxOC0xLjE4NiAwLS40ODItLjEyNC0uODU1LS4zNzMtMS4xMjEtLjI0OC0uMjY2LS41OTctLjM5OS0xLjA0NS0uMzk5Wm0tLjAzOS43MWMuMTg1IDAgLjMzMy4wNzQuNDQ0LjIyMS4xMS4xNDcuMTY2LjM1OC4xNjYuNjMxIDAgLjU4My0uMjA5Ljg3NS0uNjI1Ljg3NS0uNDE0IDAtLjYyMS0uMjgxLS42MjEtLjg0NCAwLS41ODguMjEyLS44ODMuNjM2LS44ODNabS0zLjcxNS0zLjc4Yy0uNDY4IDAtLjg0LjE0OC0xLjExNS40NDYtLjI3NS4yOTktLjQxMi42OTUtLjQxMiAxLjE5IDAgLjQ1My4xMy44MTguMzg5IDEuMDk0LjI1OS4yNzYuNjA1LjQxNCAxLjAzNy40MTQuNDYgMCAuODMtLjE0NyAxLjEwNS0uNDQyLjI3Ni0uMjk0LjQxNC0uNjg2LjQxNC0xLjE3NSAwLS40NzctLjEyNC0uODUtLjM3My0xLjEyMi0uMjQ4LS4yNy0uNTk3LS40MDYtMS4wNDUtLjQwNlptLS4wMjMuNzFjLjQwMSAwIC42MDIuMjgzLjYwMi44NDggMCAuNTgzLS4yMS44NzUtLjYzLjg3NS0uNDEgMC0uNjE3LS4yOC0uNjE3LS44NCAwLS41ODkuMjE1LS44ODMuNjQ1LS44ODNaIiBmaWxsPSIjMTg5MEZGIi8+PHBhdGggZD0iTTExIDBjNS45ODIgMCAxMC44NDggNC43NzQgMTAuOTk3IDEwLjcyTDIyIDExaC0zLjY2N2MwLTMuOTc0LTMuMTYtNy4yMS03LjEwNS03LjMzTDExIDMuNjY3VjBaIiBmaWxsPSIjQjZEMEZDIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+",alt:""}),"学习进度"]}),(0,A.jsx)("span",{children:(0,A.jsxs)("span",{className:"".concat(w," font14"),children:["已完成 ",(null===(P=V.rightData)||void 0===P?void 0:P.complete_count)||0," 关 / 共",(null===(z=V.rightData)||void 0===z?void 0:z.challenge_count)||0," 关"]})})]}),(0,A.jsx)(u.Z,{percent:X,showInfo:!1,status:"active",strokeColor:{"0%":"#29BD8B","100%":"#29BD8B"}})]}),!(null===(R=V.rightData)||void 0===R||null===(R=R.paths)||void 0===R||!R.length)&&(0,A.jsxs)("div",{className:m,children:[(0,A.jsxs)("p",{className:"mb20 font16",children:[(0,A.jsx)("img",{className:E,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMS4yNDguMDI2aDIuNDk1Yy44MzMgMCAxLjI0OS40MTUgMS4yNDkgMS4yNDN2MTcuMzljMCAuODI5LS40MTYgMS4yNDMtMS4yNDkgMS4yNDNIMS4yNDhDLjQxNiAxOS45MDIgMCAxOS40ODggMCAxOC42NlYxLjI3QzAgLjQ0LjQxNi4wMjUgMS4yNDguMDI1Wk03LjQ4OC4wMjZoMi40OTZjLjgzMiAwIDEuMjQ4LjQxNSAxLjI0OCAxLjI0M3YxNy4zOWMwIC44MjktLjQxNiAxLjI0My0xLjI0OCAxLjI0M0g3LjQ4OGMtLjgzMiAwLTEuMjQ4LS40MTQtMS4yNDgtMS4yNDJWMS4yN2MwLS44My40MTYtMS4yNDQgMS4yNDgtMS4yNDRaIiBmaWxsPSIjNTA5MUZGIi8+PHBhdGggZD0ibTEzLjQwNC42ODggMi40MTItLjY0NmMuMzItLjA4NS42Ni0uMDQuOTQ3LjEyNC4yODcuMTY1LjQ5Ni40MzcuNTgyLjc1NWw0LjUyMiAxNi44YTEuMjQyIDEuMjQyIDAgMCAxLS44ODMgMS41MmwtMi40MTEuNjQ0YTEuMjQ5IDEuMjQ5IDAgMCAxLTEuNTI4LS44NzlMMTIuNTIyIDIuMjA4YTEuMjM4IDEuMjM4IDAgMCAxIC4xMjQtLjk0M2MuMTY2LS4yODUuNDM5LS40OTQuNzU4LS41Nzl2LjAwMloiIGZpbGw9IiNCNkQwRkMiLz48L2c+PC9zdmc+",alt:""}),"所属课程"]}),(0,A.jsx)("div",{children:null===(W=V.rightData)||void 0===W?void 0:W.paths.map((function(e,n){return n>2?null:(0,A.jsxs)("div",{className:g,children:[(0,A.jsx)("a",{href:"/paths/".concat(e.id),target:"_blank",children:(0,A.jsx)("img",{alt:"实训",src:"".concat(l.Z.IMG_SERVER,"/").concat(e.image_url),className:x})}),(0,A.jsxs)("div",{className:v,children:[(0,A.jsx)("a",{href:"/paths/".concat(e.id),target:"_blank",className:y,children:e.name}),(0,A.jsxs)("p",{className:N,children:[(0,A.jsx)(d.Z,{placement:"bottom",title:"章节",children:(0,A.jsxs)("span",{className:M,children:[(0,A.jsx)("i",{className:"iconfont icon-shixun mr3"}),e.stages_count]})}),(0,A.jsx)(d.Z,{placement:"bottom",title:"学习人数",children:(0,A.jsxs)("span",{className:M,children:[(0,A.jsx)("i",{className:"iconfont icon-chengyuan mr3"}),e.members_count]})})]})]})]},e.id)}))})]}),(0,A.jsx)("div",{}),!(null===(Q=V.rightData)||void 0===Q||null===(Q=Q.recommands)||void 0===Q||!Q.length)&&H.userInfo.main_site&&(0,A.jsxs)("div",{className:S,children:[(0,A.jsxs)("p",{className:"mb20 font16",children:[(0,A.jsx)("img",{className:E,src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMTUuNTAzIDIxLjg5NmEyLjA2NyAyLjA2NyAwIDAgMS0uODctLjIwMSA0NTEuOTg3IDQ1MS45ODcgMCAwIDEtNC4zNzYtMi4xMWMtMS40NjYuNjktMi45MzEgMS4zODQtNC4zOTYgMi4wOC0uNjc0LjI5OS0xLjMzLjI2LTEuODE2LS4wOTYtLjQ1OC0uMzM1LS42ODUtLjkxMi0uNjI0LTEuNTc5LjE3My0xLjU2LjQ2NS0zLjY5My41NzQtNC40ODVhMTg4LjAyOSAxODguMDI5IDAgMCAxLTMuNTg3LTMuOTIyIDEuNSAxLjUgMCAwIDEtLjMtMS41MWMuMjEzLS41NzQuNzYtLjk4MiAxLjQ3Mi0xLjA4Nmw0LjY1NS0uODUzQTUxMi45NSA1MTIuOTUgMCAwIDEgOC43ODcgMy43M2MuNzE3LTEuMzQ0IDEuNDI2LTEuMzQ0IDEuOC0xLjIwOS40MDcuMTM0Ljc5Mi41MzEgMS4xNzcgMS4yMjMuODI5IDEuNDMzIDIuMDggMy42NDIgMi41MDQgNC4zOTFsNC42MS44NThjLjY3OC4xIDEuMjE4LjUwNyAxLjQyOCAxLjA4NGExLjUwNyAxLjUwNyAwIDAgMS0uMjg2IDEuNTA0IDE5Mi44MDggMTkyLjgwOCAwIDAgMS0zLjU1NiAzLjk0NGMuMTA0Ljc4OC4zODggMi45MjcuNTczIDQuNDc5LjA3MS42ODUtLjE1MiAxLjI2OS0uNjE2IDEuNjA5YTEuNTUgMS41NSAwIDAgMS0uOTE2LjI4NGgtLjAwMloiIGZpbGw9IiM1MDkxRkYiLz48cGF0aCBkPSJNMjEuNzA2IDQuNDYyYS41NTcuNTU3IDAgMCAxLS4yNDcuMDczYy0uNDUuMDMtMS4xMjIuMDY3LTEuMzk3LjA4bC0uNzc4IDEuMmMtLjEyMi4xOC0uMjkuMjY1LS40NjQuMjQtLjE2My0uMDItLjMwNi0uMTQtLjM5LS4zMjlhNjAuODEgNjAuODEgMCAwIDEtLjUyOS0xLjI3OCA1My4wMDkgNTMuMDA5IDAgMCAxLTEuNDc2LS41MTguNDc1LjQ3NSAwIDAgMS0uMy0uMzYuNTMzLjUzMyAwIDAgMSAuMi0uNTA1bDEuMDI1LS45MWMtLjAxMS0uNTE2LS4wMi0xLjAzMi0uMDI4LTEuNTQ4LS4wMjQtLjQ2My4xNS0uNTY4LjI2NC0uNTg1LjEyMS0uMDI2LjI3NS4wMjQuNDc0LjE1MS40MTkuMjYyIDEuMDYuNjY3IDEuMjc3LjgwNGwxLjI3LS40NDhhLjQ5LjQ5IDAgMCAxIC41MTUuMDhjLjEyNC4xMS4xODMuMjguMTU1LjQ0MS0uMDkuNTI2LS4xODYgMS4wNTItLjI5IDEuNTc0LjE0NS4xOTQuNTM2LjcyMi44MTQgMS4xMS4xMi4xNzIuMTUyLjM2LjA4OC41MThhLjQzNS40MzUgMCAwIDEtLjE4NS4yMWguMDAyWk0yLjg1OSA1LjgzYS4yODcuMjg3IDAgMCAxLS4wOTMtLjA5MSA2Mi4xNyA2Mi4xNyAwIDAgMS0uMzgyLS42MDMgNDkuOTkgNDkuOTkgMCAwIDAtLjctLjA0NWMtLjEwNi0uMDEtLjE4NS0uMDYzLS4yMTgtLjE0NmEuMjc2LjI3NiAwIDAgMSAuMDQtLjI1NWMuMTQtLjE5Ny4zMzQtLjQ2LjQwNy0uNTU3YTI4LjM5NyAyOC4zOTcgMCAwIDEtLjE0OS0uNzg2LjI0My4yNDMgMCAwIDEgLjA3Ni0uMjIzLjI1LjI1IDAgMCAxIC4yNjQtLjAzN2wuNjQuMjI4Yy4xMDgtLjA2OC40MzEtLjI3LjY0NC0uMzk4LjE5LS4xMjguMjc4LS4wNzUuMzE0LS4wMy4wNC4wNDcuMDU5LjEyOC4wNTQuMjVsLS4wMTkuNzY4LjUwNi40NTNhLjI1OC4yNTggMCAwIDEgLjA5NS4yNDkuMjM4LjIzOCAwIDAgMS0uMTQ3LjE3OGMtLjI0NS4wOTItLjQ5LjE4LS43MzYuMjY1LS4wNDcuMTEzLS4xNzEuNDItLjI2NC42NC0uMDQ0LjA5NS0uMTE1LjE1OS0uMTk3LjE2OGEuMjA4LjIwOCAwIDAgMS0uMTM1LS4wMjhaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",alt:""}),(null==V||null===(Y=V.detail)||void 0===Y||null===(Y=Y.disciplines)||void 0===Y?void 0:Y.length)>0?"相关推荐":"热门推荐"]}),(0,A.jsx)("div",{children:null===(B=V.rightData)||void 0===B?void 0:B.recommands.map((function(e,n){return n>2?null:(0,A.jsxs)("div",{className:j,children:[(0,A.jsx)("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:(0,A.jsx)("img",{src:"".concat(l.Z.IMG_SERVER,"/").concat(e.pic),className:x})}),(0,A.jsxs)("div",{className:v,style:{marginBottom:-4},children:[(0,A.jsx)(d.Z,{placement:"bottom",title:e.name,children:(0,A.jsx)("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",className:y,children:e.name})}),(0,A.jsxs)("p",{className:"".concat(N," ").concat(b),children:[(0,A.jsxs)("span",{children:[e.stu_num," 人学习"]}),(0,A.jsx)("span",{className:I,children:e.level})]})]})]},n)}))})]}),(null===(U=V.rightData)||void 0===U||null===(U=U.tags)||void 0===U?void 0:U.length)>0&&(0,A.jsxs)("div",{className:L,children:[(0,A.jsx)("p",{className:"".concat(D," font16 mb20"),children:(0,A.jsxs)("span",{children:["技能标签",(0,A.jsx)("span",{className:"ml5 c-grey-c",children:null===(G=V.rightData)||void 0===G||null===(G=G.tags)||void 0===G?void 0:G.length})]})}),(0,A.jsx)(_.Z,{option:(K=new Image,K.src=C.yt,{backgroundColor:"#fff",tooltip:{pointFormat:"{series.name}</b>"},series:[{type:"wordCloud",sizeRange:[10,30],rotationRange:[-90,90],rotationStep:45,gridSize:2,shape:"pentagon",maskImage:K,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==V||null===($=V.rightData)||void 0===$||null===($=$.tags)||void 0===$?void 0:$.map((function(e,n){return{name:e.tag_name,value:n}})))||[]}]}),style:{height:370},opts:{renderer:"svg"}})]})]}):null}))},98907:function(e,n,t){t.d(n,{Z:function(){return l}});var a=t(79800),i=t.n(a),r=t(59301),c=t(8591),o=t(94304),s=t(37712),l=function(e){var n=e.id,t=e.activeDiscussIndex,a=e.onReplyDiscuss,l=(0,r.useState)(""),u=i()(l,2),d=u[0],p=u[1];return(0,s.jsxs)("div",{className:"discuss-item-editor",style:{display:t===n?"block":"none",width:"100%"},children:[(0,s.jsx)(o.Z,{miniToolbar:!0,startInit:t===n,defaultValue:d,id:n,noStorage:!0,watch:!1,height:155,placeholder:"我要回复",showResizeBar:!0,onChange:function(e){p(e)}}),(0,s.jsx)("a",{onClick:function(){d?(a(n,d),p("")):c.ZP.info("回复内容不能为空!")},className:"btn-send",children:"发送"})]},n)}},97874:function(e,n,t){t.d(n,{Z:function(){return Q}});var a=t(7557),i=t.n(a),r=t(41498),c=t.n(r),o=t(79800),s=t.n(o),l=t(82242),u=t.n(l),d=t(59301),p=t(48534),f=t(30043),h=t(77984),m=t(43418),g=t(3113),x=t(53864),j=t(26220),v=t(78241),y=t(95237),N=t(43604),M=t(60324),S=t(56511),b=t(51882),I=t(24785),w=t(33562),L=t(30927),D=t(37712),E=(0,b.connect)((function(e){return{pathsList:e.pathsList}}))((function(e){e.pathsList,e.dispatch;var n=v.Z.useForm(),t=(s()(n,1)[0],(0,d.useState)()),a=s()(t,2),r=a[0],o=a[1],l=(0,d.useState)(!0),p=s()(l,2),f=p[0],h=p[1],x=(0,d.useState)(!1),j=s()(x,2),b=j[0],E=j[1],_=(0,d.useState)({}),C=s()(_,2),A=C[0],T=C[1],k=(0,d.useState)({keyword:A,robot:!0,page:1}),O=s()(k,2),Z=O[0],P=O[1];(0,d.useEffect)((function(){I.Z.subscribe("ai-replay-show",(function(e){T(e),E(!0)}))}),[]),(0,d.useEffect)((function(){null!=A&&A.id&&z()}),[A]);var z=function(){var e=c()(i()().mark((function e(n){var t;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return h(!0),e.next=3,(0,w.U_)(u()(u()({},Z),{},{keyword:null==A?void 0:A.content,id:null==A?void 0:A.id}));case 3:t=e.sent,h(!1),null!=t&&t.data&&(Z.page++,P(u()({},Z)),o(null==t?void 0:t.data));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),R=function(){var e=c()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:z();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),W=(0,D.jsx)("div",{children:(0,D.jsx)("img",{src:L.wC,width:150})});return(0,D.jsx)(D.Fragment,{children:(0,D.jsx)(m.Z,{title:"其他回答",mask:!0,open:b,okText:"换一换",cancelText:"",onOk:R,width:800,height:500,footer:(0,D.jsx)(y.Z,{align:"middle",justify:"center",children:(0,D.jsxs)(N.Z,{className:"tc",children:[(0,D.jsx)(g.ZP,{type:"primary",onClick:z,children:"换一换"}),(0,D.jsx)(M.Z,{content:W,title:"教师交流社区",children:(0,D.jsx)(g.ZP,{type:"dashed",children:"人工服务"})})]})}),onCancel:function(){E(!1)},children:(0,D.jsx)("aside",{style:{minHeight:300},children:(0,D.jsx)(y.Z,{children:(0,D.jsxs)(S.Z,{loading:f,children:[null==r?void 0:r.map((function(e){return(0,D.jsx)(N.Z,{style:{background:"#e9f3f1",padding:"8px 20px",marginBottom:10,borderRadius:20},span:24,children:e.text})})),!(null!=r&&r.length)&&(0,D.jsxs)("div",{style:{width:"100%",textAlign:"center"},children:[(0,D.jsx)("br",{}),(0,D.jsx)("img",{src:L.wC,width:150}),(0,D.jsx)("br",{}),(0,D.jsx)("br",{}),"教师交流社区"]})]})})})})})})),_=t(35245),C=t(57357),A=t(80248),T=t(6848),k=t(98907),O=(t(46585),t(64330));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;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;function Z(e){var n=e.data,t=e.index,a=e.adminOrOperator,i=e.parentDiscussIndex,r=e.shixunIdentifier,c=e.user,o=e.onSetRewardData,l=e.onSetActionType,u=e.onHandleSubmitDiscusses,p=(e.onTopOrDownDiscuss,e.handleChildrenPlus,e.anserAuthor,e.onPlus,e.onHandleRepaly),f=(e.userInfomation,n.author),h=n.can_delete,m=n.content,g=n.hidden,x=n.id,j=n.reward,v=n.time,y=n.reply_status,N=n.user_praise,S=n.praise_count,I=(0,d.useState)(!1),w=s()(I,2),L=w[0],E=w[1],_=(0,d.useState)(!1),C=s()(_,2),T=C[0],k=C[1],O=(0,d.useState)(!1),Z=s()(O,2),P=Z[0],z=Z[1],R=(0,d.useState)(!1),W=s()(R,2),Q=W[0],Y=W[1],B=function(){L&&u(x,{reply_status:2})},U=function(){T&&u(x,{reply_status:3})},G=function(){u(x,{reply_status:1})},V=function(){u(x,{reply_status:4})};var H=a||h||f.user_id===c.user_id||f.login===c.login,F="tasks"===(0,b.useLocation)().pathname.split("/")[1];return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("div",{className:"second-level-discuss",children:[(0,D.jsx)("div",{className:"discuss-info-body",children:(0,D.jsxs)("div",{className:"discuss-info",children:[(0,D.jsx)("a",{href:"/users/".concat(f.login),target:"_blank",children:f.name}),(0,D.jsx)("span",{className:"grey",children:v}),j?(0,D.jsxs)("a",{className:"c-orange gift",title:"已奖励金币".concat(j),children:[(0,D.jsx)("i",{className:"iconfont icon-gift c-orange "}),(0,D.jsx)("span",{children:j})]}):null]})}),(0,D.jsx)(A.Z,{className:"discuss-content ".concat(t>0?"content-gray":""),value:m})]}),F&&(0,D.jsxs)("div",{className:"btn-group-succes",children:[(0,D.jsx)("div",{className:"btn-group-gratify",children:function(){switch(y){case 0:return(0,D.jsxs)(D.Fragment,{children:[(0,D.jsxs)("div",{onClick:G,className:"whether-satisfied ".concat(P?"cursorPoint blue-text-color":""),onMouseEnter:function(){z(!0)},onMouseLeave:function(){z(!1)},children:[(0,D.jsx)("img",{src:P?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAgMi43MzFINS4xNDFWMGgtMS45NkwxLjY3NSAyLjY0M0gwdjYuMThoNy44NjVMMTAgMi43MzJabS05LjQzMS40ODdoLjgzNnY1LjAzSC41Njl2LTUuMDNabTguNjI2LjA4OEw3LjQ2MyA4LjI0OWgtNS40OVYzLjIxOGguMDMxTDMuNTExLjU3NWgxLjA2MnYyLjczaDQuNjIyWiIgZmlsbD0iIzAxNTJEOSIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9zdmc+":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNMTAgMi43MzFINS4xNDFWMGgtMS45NkwxLjY3NSAyLjY0M0gwdjYuMThoNy44NjVMMTAgMi43MzJabS05LjQzMS40ODdoLjgzNnY1LjAzSC41Njl2LTUuMDNabTguNjI2LjA4OEw3LjQ2MyA4LjI0OWgtNS40OVYzLjIxOGguMDMxTDMuNTExLjU3NWgxLjA2MnYyLjczaDQuNjIyWiIgZmlsbD0iIzAwMCIgZmlsbC1ydWxlPSJub256ZXJvIi8+PC9zdmc+",className:"whether-img SVGColor"}),"满意"]}),(0,D.jsx)(M.Z,{placement:"bottomLeft",content:(0,D.jsxs)("div",{className:"content",children:[(0,D.jsx)("div",{className:"content-disappoint",children:"抱歉让你失望了,请继续尝试:"}),(0,D.jsxs)("div",{className:"radius-box marg15 height30-line black6c-optcity ".concat(L?"blue-background cursorPoint blue-background-write":"gray-background"),onMouseEnter:function(){E(!0)},onMouseLeave:function(){E(!1)},onClick:B,children:["请",null==f?void 0:f.name.trim(),"老师再尝试回答一次。"]}),(0,D.jsx)("div",{className:"radius-box marg15 height30-line black6c-optcity ".concat(T?"blue-background cursorPoint blue-background-write":"gray-background"),onMouseEnter:function(){k(!0)},onMouseLeave:function(){k(!1)},onClick:U,children:"可能启用了机器人,请其他老师回答。"})]}),trigger:"click",children:(0,D.jsxs)("div",{className:"whether-satisfied ".concat(Q?"cursorPoint blue-text-color":""),onMouseEnter:function(){Y(!0)},onMouseLeave:function(){Y(!1)},children:[(0,D.jsx)("img",{src:Q?"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNy44NjUgMEgwdjYuMThoMS42NzVsMS41MDYgMi42NDRoMS45NlY2LjA5MkgxMEw3Ljg2NSAwWk0uNTcuNTc1aC44MzZ2NS4wM0guNTY5Vi41NzZabTQuMDAzIDQuOTQzdjIuNzNIMy41MUwyLjAwNCA1LjYwN2gtLjAzVi41NzZoNS40ODlsMS43MzIgNC45NDJINC41NzJaIiBmaWxsPSIjMDE1MkQ5IiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=":"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAiIGhlaWdodD0iOSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48cGF0aCBkPSJNNy44NjUgMEgwdjYuMThoMS42NzVsMS41MDYgMi42NDRoMS45NlY2LjA5MkgxMEw3Ljg2NSAwWk0uNTcuNTc1aC44MzZ2NS4wM0guNTY5Vi41NzZabTQuMDAzIDQuOTQzdjIuNzNIMy41MUwyLjAwNCA1LjYwN2gtLjAzVi41NzZoNS40ODlsMS43MzIgNC45NDJINC41NzJaIiBmaWxsPSIjMDAwIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L3N2Zz4=",className:"whether-img SVGColor"}),"不满意"]})})]});case 1:return(0,D.jsx)("div",{className:"radius-box cursorPoint height30 ".concat(t>0?"gray-background":"blue-background"),onClick:V,children:"我很满意"});case 2:return(0,D.jsx)("div",{className:"radius-box height30 ".concat(t>0?"gray-background":"blue-background"),children:"不满意 等待老师再次回答"});case 3:return(0,D.jsx)("div",{className:"radius-box height30 ".concat(t>0?"gray-background":"blue-background"),children:"不满意 等待其他老师再次回答"});case 4:return(0,D.jsx)("div",{className:"radius-box height30 ".concat(t>0?"gray-background":"blue-background"),children:"我很满意"});default:return(0,D.jsx)(D.Fragment,{})}}()}),(0,D.jsx)("div",{className:"btn-group-other",children:(0,D.jsx)("div",{className:"discuss-info-body",children:(0,D.jsxs)("div",{className:"btn-group",children:[1===c.identity?(0,D.jsx)("a",{onClick:function(){o({id:x,index:t,user_id:f.user_id,parentDiscussIndex:i})},title:"给TA奖励金币",children:(0,D.jsx)("i",{className:"iconfont icon-jiangli"})}):null,a?(0,D.jsx)("a",{onClick:function(){l({id:x,index:t,params:{hidden:g?"0":"1",container_identifier:r},type:"hidden-discuss",parentDiscussIndex:i,message:g?"确定要取消隐藏该条回复吗":"确定要隐藏该条回复吗"})},title:g?"取消隐藏":"隐藏评论",children:(0,D.jsx)("i",{className:g?"iconfont icon-yincangbiyan":"fa fa-eye"})}):null,H?(0,D.jsx)("a",{onClick:function(){l({id:x,index:t,type:"delete-discuss",parentDiscussIndex:i,message:"确定要删除该条回复吗"})},title:"删除",children:(0,D.jsx)("i",{className:"iconfont icon-shanchu"})}):null,(0,D.jsxs)("a",{onClick:function(){p(x,!N,i,t)},className:N?"c-orange":"",children:[(0,D.jsx)("i",{className:N?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),(0,D.jsx)("span",{children:S||""})]})]})})})]})]})}var P=function(e){var n=e.data,t=e.index,a=e.shixunIdentifier,i=e.adminOrOperator,r=e.identity,c=e.onTopOrDownDiscuss,o=e.onPlusDiscuss,l=e.onDisableDiscuss,u=e.onSetActionType,p=e.onSetRewardData,f=e.user,h=e.activeDiscussIndex,x=e.onReplyDiscuss,j=e.onSetActiveDiscussIndex,v=e.allowDisableDiscuss,y=e.onHandleSubmitDiscusses,N=e.onHandleRepaly,M=e.userInfomation,S=n.content,b=n.children,w=n.game_url,L=n.hidden,E=n.id,_=n.position,P=n.praise_count,z=n.reward,R=n.sticky,W=n.time,Q=n.user_praise,Y=n.game_passed,B=n.ai_reply_text,U=n.ai_reply_flag,G=n.author,V=n.disable_discuss_status,H=(n.reply_status,(0,d.useState)(!1)),F=s()(H,2),J=F[0],$=F[1];function K(){l(E,0===V?2:0,t)}(0,d.useEffect)((function(){J&&setTimeout((function(){return $(!1)}),800)}),[J]);var X=function(e){var n=e.target,t=n.nodeName,a=n.src;"IMG"===t&&(I.Z.publish("preview-image",a),console.log("src:",a))};return(0,D.jsxs)("div",{className:"discuss-item-container",children:[(0,D.jsx)("a",{href:"/users/".concat(G.login),target:"_blank",children:(0,D.jsx)("img",{alt:"用户头像",height:"50",src:"".concat(C.Z.IMG_SERVER,"/images/").concat(G.image_url),width:"50"})}),(0,D.jsxs)("section",{children:[(0,D.jsxs)("div",{className:"discuss-info",children:[(0,D.jsx)("a",{href:"/users/".concat(G.login),target:"_blank",children:G.name}),(0,D.jsx)("span",{className:"grey",children:W}),_?(0,D.jsxs)("span",{className:"c-green",children:[" [第",_,"关] "]}):null,w?(0,D.jsx)("a",{href:w,target:"_blank",className:"view-code",title:"点击查看TA的代码页面",children:"查看"}):null,v&&(0,D.jsxs)(D.Fragment,{children:[0===V&&(0,D.jsx)(T.Z,{title:"禁止该用户在此项目的评论功能",children:(0,D.jsx)("span",{onClick:K,className:"c-red current",children:"禁止评论功能"})}),2===V&&(0,D.jsx)(T.Z,{title:"恢复该用户在此实践项目的评论功能",children:(0,D.jsx)("span",{onClick:K,className:"c-light-primary current",children:"恢复评论功能"})}),1===V&&(0,D.jsx)(T.Z,{title:"该用户已被系统管理员禁言",children:(0,D.jsx)("span",{className:"c-red",children:"被管理员禁止评论"})})]}),R?(0,D.jsx)("span",{className:"top",children:"置顶"}):null,z?(0,D.jsxs)("a",{className:"c-orange gift",title:"已奖励金币".concat(z),children:[(0,D.jsx)("i",{className:"iconfont icon-gift c-orange "}),(0,D.jsx)("span",{children:z})]}):null,r<=5?(0,D.jsx)("span",{style:{flex:"1",textAlign:"right",color:1===Y?"#29bd8b":""},children:1===Y?"已通关":"未通关"}):null]}),(0,D.jsx)("div",{onClick:X,children:(0,D.jsx)(A.Z,{className:"discuss-content",value:S})}),U&&(0,D.jsxs)("div",{style:{padding:10,borderRadius:4,background:"#f4f4f4"},children:[(0,D.jsx)("br",{}),(0,D.jsx)("div",{style:{padding:"6px 0"},children:B}),(0,D.jsxs)(g.ZP,{style:{background:"#d1e5f9",borderRadius:25,border:"none",display:"inline-flex",justifyItems:"center",alignItems:"center"},onClick:function(){return $(!0)},className:"mr10 mr5 relative c-blue",children:[(0,D.jsxs)("span",{className:J?"plus-one-animate":"hide",style:{position:"absolute"},children:[" ","+1"]}),(0,D.jsx)("span",{className:"c-blue icon-duiwoyouyong mr5"}),(0,D.jsx)("span",{className:"c-blue",children:"对我有用"})]}),(0,D.jsx)("span",{className:"c-orange current",onClick:function(){I.Z.publish("ai-replay-show",{content:S,id:E})},children:"其他回答"})]}),b&&b.length>0?(0,D.jsx)("div",{className:"reply-discuss-containerActive",onClick:X,children:b.map((function(e,n){return(0,D.jsx)(Z,{data:e,index:n,userInfomation:M,onTopOrDownDiscuss:c,shixunIdentifier:a,onHandleSubmitDiscusses:y,adminOrOperator:i,user:f,onSetRewardData:p,onSetActionType:u,parentDiscussIndex:t,anserAuthor:G,onHandleRepaly:N},e.id)}))}):null,(0,D.jsx)("div",{className:"btn-group",children:(0,D.jsxs)("div",{className:"btn-group-other",children:[1===f.identity?(0,D.jsx)("a",{onClick:function(){p({id:E,index:t,user_id:G.user_id})},title:"给TA奖励金币",children:(0,D.jsx)("i",{className:"iconfont icon-jiangli"})}):null,i?(0,D.jsx)("a",{onClick:function(){u({id:E,index:t,params:{hidden:L?"0":"1",container_identifier:a},type:"hidden-discuss",message:L?"确定要取消隐藏该条回复吗":"确定要隐藏该条回复吗"})},title:L?"取消隐藏":"隐藏评论",children:(0,D.jsx)("i",{className:L?"iconfont icon-yincangbiyan":"fa fa-eye"})}):null,r<=5?(0,D.jsx)("a",{onClick:function(){c(E,!R,t)},className:R?"btn-top":"btn-down",title:R?"取消置顶":"置顶",children:(0,D.jsx)("i",{className:"iconfont icon-zhiding1 "})}):null,!i||b&&0!=b.length?null:(0,D.jsx)("a",{onClick:function(){u({id:E,index:t,type:"delete-discuss",message:"确定要删除该条回复吗"})},title:"删除",children:(0,D.jsx)("i",{className:"iconfont icon-shanchu"})}),(0,D.jsx)("a",{onClick:function(){var e;null!==(e=(0,O.eY)())&&void 0!==e&&e.authentication?(console.log(E,"idi---------------------------"),j(E)):m.Z.confirm({title:"提示",className:"custom-modal-divider ",icon:null,content:"需要通过实名验证后,才能进行评论操作",okText:"前往实名验证",cancelText:"取消",onOk:function(){window.open("/account/certification")}})},title:"回复",children:(0,D.jsx)("i",{className:"iconfont icon-huifu1"})}),(0,D.jsxs)("a",{onClick:function(){o(E,!Q,t)},className:Q?"c-orange":"",children:[(0,D.jsx)("i",{className:Q?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),(0,D.jsx)("span",{children:P||""})]})]})}),(0,D.jsx)(k.Z,{id:E,activeDiscussIndex:h,onReplyDiscuss:x})]})]},E)},z=t(41282),R={showRewardDialog:!1,data:null,page:1,loading:!1,actionType:null,activeDiscussIndex:null};function W(e,n){switch(n.type){case _.tD:return u()(u()({},e),{},{loading:!0});case _.RS:return u()(u()({},e),{},{showRewardDialog:!0});case _.t2:return u()(u()({},e),{},{showRewardDialog:!1});case _.GR:case _.u8:case _.rM:case _.fo:case _.yS:case _.Vn:case _.SX:return u()(u()({},e),n.payload);default:throw new Error}}var Q=function(e){var n=e.shixunIdentifier,t=e.identity,a=e.activeIndex,r=e.user,o=e.allowDisableDiscuss,l=e.userInfo,v=(e.isShixunDetail,e.taskData),y=e.chatgpt,N=e.to_user_id,M=e.challengeId,S=(0,d.useReducer)(W,R),b=s()(S,2),L=b[0],C=b[1],A=(0,d.useState)(!0),T=s()(A,2),k=T[0],O=T[1],Z=(0,d.useState)(null),Q=s()(Z,2),Y=Q[0],B=Q[1],U=L.page,G=L.loading,V=L.data,H=L.actionType,F=L.showRewardDialog,J=L.activeDiscussIndex,$=(0,d.useRef)(),K=(0,d.useRef)(),X=(0,d.useRef)();function q(e,n){return ee.apply(this,arguments)}function ee(){return(ee=c()(i()().mark((function e(t,a){var r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!G){e.next=2;break}return e.abrupt("return");case 2:return e.prev=2,C({type:_.tD}),e.next=6,(0,w.o7)(n,t);case 6:r=e.sent,console.log("activeDiscussIndex",J),C({type:_.GR,payload:{activeDiscussIndex:a?J:null,page:t,data:r,loading:!1}}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(2),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[2,11]])})))).apply(this,arguments)}function ne(e){q(e)}function te(e,n,t){return ae.apply(this,arguments)}function ae(){return(ae=c()(i()().mark((function e(n,t,a){var r;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,w.ae)(n,t);case 3:r=e.sent,ye[a].user_praise=t,ye[a].praise_count=r.praise_count,C({type:_.rM,payload:{data:u()(u()({},V),{},{comments:ye})}}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function ie(e,n,t,a){return re.apply(this,arguments)}function re(){return(re=c()(i()().mark((function e(n,t,a,r){var c;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,w.ae)(n,t);case 3:c=e.sent,ye[a].children[r].user_praise=t,ye[a].children[r].praise_count=c.praise_count,C({type:_.rM,payload:{data:u()(u()({},V),{},{comments:ye})}}),e.next=12;break;case 9:e.prev=9,e.t0=e.catch(0),console.log(e.t0);case 12:case"end":return e.stop()}}),e,null,[[0,9]])})))).apply(this,arguments)}function ce(e,n,t){return oe.apply(this,arguments)}function oe(){return(oe=c()(i()().mark((function e(n,t,a){var r,c;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,w._Z)(n,t);case 3:if(0===e.sent.status){e.next=6;break}return e.abrupt("return");case 6:r=ye[a].author.user_id,c=ye.map((function(e){return e.author.user_id===r?u()(u()({},e),{},{disable_discuss_status:t}):e})),C({type:_.fo,payload:{data:u()(u()({},V),{},{comments:c})}}),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}function se(e,n,t){return le.apply(this,arguments)}function le(){return(le=c()(i()().mark((function e(n,t,a){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,w.wJ)(n,t);case 3:ye[a].sticky=t,C({type:_.u8,payload:{data:u()(u()({},V),{},{comments:ye})}}),q(L.page),e.next=11;break;case 8:e.prev=8,e.t0=e.catch(0),console.log(e.t0);case 11:case"end":return e.stop()}}),e,null,[[0,8]])})))).apply(this,arguments)}function ue(){return(ue=c()(i()().mark((function e(){var n,t,a,r,c,o,s,l;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=H.id,t=H.params,a=H.type,r=H.index,c=H.parentDiscussIndex,"hidden-discuss"!==a){e.next=6;break}return e.next=4,(0,w.OY)(n,t);case 4:c?ye[c].children[r].hidden=1==t.hidden:ye[r].hidden=1==t.hidden,C({type:_.yS,payload:{actionType:null,data:u()(u()({},V),{},{comments:ye})}});case 6:if("delete-discuss"!==a){e.next=31;break}return e.next=9,(0,w.KY)(n);case 9:if(!c&&0!==c){e.next=22;break}o=ye[c].children,s=o.length-1;case 12:if(!(s>=0)){e.next=19;break}if(o[s].id!==n){e.next=16;break}return o.splice(s,1),e.abrupt("break",19);case 16:s--,e.next=12;break;case 19:ye[c].children=o,e.next=30;break;case 22:l=ye.length-1;case 23:if(!(l>=0)){e.next=30;break}if(ye[l].id!==n){e.next=27;break}return ye.splice(l,1),e.abrupt("break",30);case 27:l--,e.next=23;break;case 30:C({type:_.yS,payload:{actionType:null,data:u()(u()({},V),{},{comments:ye})}});case 31:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function de(e){C({type:_.yS,payload:{actionType:e}})}function pe(){return(pe=c()(i()().mark((function e(){var n,t,a,r,c,o,s;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=$.current,t=n.id,a=n.index,r=n.score,c=n.user_id,o=n.parentDiscussIndex,e.next=3,(0,w.S8)(t,{container_type:"Discusses",score:r,user_id:c});case 3:s=e.sent,o?ye[o].children[a].reward=s.code:ye[a].reward=s.code,C({type:_.Vn,payload:{showRewardDialog:!1,data:u()(u()({},V),{},{comments:ye})}}),$.current=null;case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function fe(e){$.current=e,C({type:_.RS})}function he(e,n){return me.apply(this,arguments)}function me(){return(me=c()(i()().mark((function e(n,t){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,w.wg)(n,t);case 3:if(-3!==e.sent.status){e.next=8;break}return m.Z.info({title:"提示",className:"custom-modal-divider ",icon:null,content:"你的账号因为发布了不当内容,现已将评论功能屏蔽。",okText:"确定"}),je(null),e.abrupt("return");case 8:q(U),e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.log(e.t0);case 14:case"end":return e.stop()}}),e,null,[[0,11]])})))).apply(this,arguments)}function ge(e,n){return xe.apply(this,arguments)}function xe(){return(xe=c()(i()().mark((function e(n,t){var a;return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,(0,w.KQ)(n,t);case 3:if(a=e.sent,1===a.status){e.next=7;break}return e.abrupt("return");case 7:q(U),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(0),console.log(e.t0);case 13:case"end":return e.stop()}}),e,null,[[0,10]])})))).apply(this,arguments)}function je(e){C(J===e?{type:_.SX,payload:{activeDiscussIndex:null}}:{type:_.SX,payload:{activeDiscussIndex:e}})}if((0,d.useEffect)((function(){return 3===a&&y?(clearInterval(X.current),X.current=setInterval((function(){q(U)}),5e3),function(){clearInterval(X.current)}):(console.log("清除定时器"),function(){clearInterval(X.current)})}),[y,a,J]),(0,d.useEffect)((function(){return k||(clearInterval(Y),B(setInterval((function(){q(U,!0)}),5e3))),function(){clearInterval(Y)}}),[k,U,J]),(0,d.useEffect)((function(){function e(){return(e=c()(i()().mark((function e(){return i()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(3!==a||V||!n){e.next=3;break}return e.next=3,q(U);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}!function(){e.apply(this,arguments)}()}),[n,a,U,C]),(0,d.useEffect)((function(){return I.Z.subscribe("create-discuss",(function(){clearInterval(X.current),q(U),y&&(X.current=setInterval((function(){q(U)}),5e3))}))}),[n]),!V)return(0,D.jsx)(p.Z,{});var ve=V.disscuss_count,ye=V.comments,Ne=(V.all,V.can_hidden);return console.log(N,"to_user_id"),(0,D.jsxs)(d.Fragment,{children:[(0,D.jsxs)("div",{className:"discuss-container",ref:K,children:[y&&(0,D.jsx)(g.ZP,{type:"primary",style:{float:"right",marginBottom:10},onClick:function(){(0,z.xg)("/chatgpt?id=".concat(N,"&position=").concat(M))},children:"进入历史问答"}),(null==v?void 0:v.myshixun_manager)&&!y&&(0,D.jsx)(g.ZP,{style:{float:"right",marginBottom:10},type:"primary",onClick:function(){O(!k),k?B(setInterval((function(){q(U,!0)}),5e3)):clearInterval(Y)},children:k?"开启实时刷新":"停止实时刷新"}),0===ve?(0,D.jsx)(h.Z,{styles:{clear:"both"}}):null,ye.map((function(e,a){return(0,D.jsx)(P,{user:r,userInfomation:l,data:e,index:a,identity:t,onPaginationChange:ne,shixunIdentifier:n,onSetActionType:de,onTopOrDownDiscuss:se,adminOrOperator:Ne,onPlusDiscuss:te,onDisableDiscuss:ce,onSetRewardData:fe,activeDiscussIndex:J,onHandleSubmitDiscusses:ge,onSetActiveDiscussIndex:je,onReplyDiscuss:he,allowDisableDiscuss:o,onHandleRepaly:ie},e.id)})),ve>10?(0,D.jsx)("div",{className:"pagination-container",children:(0,D.jsx)(x.Z,{showQuickJumper:!0,showSizeChanger:!1,onChange:ne,current:U,total:ve})}):null,(0,D.jsx)(E,{})]}),(0,D.jsxs)(f.Z,{children:[(0,D.jsx)(m.Z,{centered:!0,title:"提示",open:!!H,onOk:function(){return ue.apply(this,arguments)},onCancel:function(){C({type:_.yS,payload:{actionType:null}})},children:(0,D.jsx)("p",{children:H?H.message:""})}),(0,D.jsx)(m.Z,{centered:!0,width:400,title:"奖励设置",open:F,onCancel:function(){C({type:_.t2})},onOk:function(){return pe.apply(this,arguments)},children:(0,D.jsx)(j.Z,{placeholder:"请输入奖励的金币数量",min:1,onChange:function(e){$.current.score=e},style:{width:"228px"}})})]})]})}},77578:function(e,n,t){t.d(n,{Z:function(){return a}});const a=e=>e?"function"==typeof e?e():e:null},39722:function(e,n,t){t.d(n,{t5:function(){return d}});var a=t(92310),i=t.n(a),r=t(55477),c=t(59301),o=t(36355),s=t(77578),l=t(17356),u=function(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)n.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(t[a[i]]=e[a[i]])}return t};const d=e=>{const{hashId:n,prefixCls:t,className:a,style:o,placement:l="top",title:u,content:d,children:p}=e;return c.createElement("div",{className:i()(n,t,`${t}-pure`,`${t}-placement-${l}`,a),style:o},c.createElement("div",{className:`${t}-arrow`}),c.createElement(r.G,Object.assign({},e,{className:n,prefixCls:t}),p||((e,n,t)=>{if(n||t)return c.createElement(c.Fragment,null,n&&c.createElement("div",{className:`${e}-title`},(0,s.Z)(n)),c.createElement("div",{className:`${e}-inner-content`},(0,s.Z)(t)))})(t,u,d)))};n.ZP=e=>{const{prefixCls:n}=e,t=u(e,["prefixCls"]),{getPrefixCls:a}=c.useContext(o.E_),i=a("popover",n),[r,s]=(0,l.Z)(i);return r(c.createElement(d,Object.assign({},t,{prefixCls:i,hashId:s})))}},60324:function(e,n,t){var a=t(92310),i=t.n(a),r=t(59301),c=t(77578),o=t(62892),s=t(36355),l=t(6848),u=t(39722),d=t(17356),p=function(e,n){var t={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&n.indexOf(a)<0&&(t[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)n.indexOf(a[i])<0&&Object.prototype.propertyIsEnumerable.call(e,a[i])&&(t[a[i]]=e[a[i]])}return t};const f=e=>{let{title:n,content:t,prefixCls:a}=e;return r.createElement(r.Fragment,null,n&&r.createElement("div",{className:`${a}-title`},(0,c.Z)(n)),r.createElement("div",{className:`${a}-inner-content`},(0,c.Z)(t)))},h=r.forwardRef(((e,n)=>{const{prefixCls:t,title:a,content:c,overlayClassName:u,placement:h="top",trigger:m="hover",mouseEnterDelay:g=.1,mouseLeaveDelay:x=.1,overlayStyle:j={}}=e,v=p(e,["prefixCls","title","content","overlayClassName","placement","trigger","mouseEnterDelay","mouseLeaveDelay","overlayStyle"]),{getPrefixCls:y}=r.useContext(s.E_),N=y("popover",t),[M,S]=(0,d.Z)(N),b=y(),I=i()(u,S);return M(r.createElement(l.Z,Object.assign({placement:h,trigger:m,mouseEnterDelay:g,mouseLeaveDelay:x,overlayStyle:j},v,{prefixCls:N,overlayClassName:I,ref:n,overlay:a||c?r.createElement(f,{prefixCls:N,title:a,content:c}):null,transitionName:(0,o.m)(b,"zoom-big",v.transitionName),"data-popover-inject":!0})))}));h._InternalPanelDoNotUseOrYouWillBeFired=u.ZP,n.Z=h},17356:function(e,n,t){var a=t(17313),i=t(29878),r=t(19447),c=t(33166),o=t(83116),s=t(37613);const l=e=>{const{componentCls:n,popoverColor:t,minWidth:i,fontWeightStrong:c,popoverPadding:o,boxShadowSecondary:s,colorTextHeading:l,borderRadiusLG:u,zIndexPopup:d,marginXS:p,colorBgElevated:f,popoverBg:h}=e;return[{[n]:Object.assign(Object.assign({},(0,a.Wf)(e)),{position:"absolute",top:0,left:{_skip_check_:!0,value:0},zIndex:d,fontWeight:"normal",whiteSpace:"normal",textAlign:"start",cursor:"auto",userSelect:"text",transformOrigin:"var(--arrow-x, 50%) var(--arrow-y, 50%)","--antd-arrow-background-color":f,"&-rtl":{direction:"rtl"},"&-hidden":{display:"none"},[`${n}-content`]:{position:"relative"},[`${n}-inner`]:{backgroundColor:h,backgroundClip:"padding-box",borderRadius:u,boxShadow:s,padding:o},[`${n}-title`]:{minWidth:i,marginBottom:p,color:l,fontWeight:c},[`${n}-inner-content`]:{color:t}})},(0,r.ZP)(e,{colorBg:"var(--antd-arrow-background-color)"}),{[`${n}-pure`]:{position:"relative",maxWidth:"none",margin:e.sizePopupArrow,display:"inline-block",[`${n}-content`]:{display:"inline-block"}}}]},u=e=>{const{componentCls:n}=e;return{[n]:c.i.map((t=>{const a=e[`${t}6`];return{[`&${n}-${t}`]:{"--antd-arrow-background-color":a,[`${n}-inner`]:{backgroundColor:a},[`${n}-arrow`]:{background:"transparent"}}}}))}},d=e=>{const{componentCls:n,lineWidth:t,lineType:a,colorSplit:i,paddingSM:r,controlHeight:c,fontSize:o,lineHeight:s,padding:l}=e,u=c-Math.round(o*s);return{[n]:{[`${n}-inner`]:{padding:0},[`${n}-title`]:{margin:0,padding:`${u/2}px ${l}px ${u/2-t}px`,borderBottom:`${t}px ${a} ${i}`},[`${n}-inner-content`]:{padding:`${r}px ${l}px`}}}};n.Z=(0,o.Z)("Popover",(e=>{const{colorBgElevated:n,colorText:t,wireframe:a}=e,r=(0,s.TS)(e,{popoverPadding:12,popoverBg:n,popoverColor:t});return[l(r),u(r),a&&d(r),(0,i._y)(r,"zoom-big")]}),(e=>({width:177,minWidth:177,zIndexPopup:e.zIndexPopupBase+30})),{resetStyle:!1,deprecatedTokens:[["width","minWidth"]]})}}]);