|
|
(self.webpackChunk=self.webpackChunk||[]).push([[14889,79817,4977],{88289:function(e,n,t){"use strict";t.d(n,{Z:function(){return l}});var i=t(1565),r=t(59301),o={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},s=t(68475),a=function(e,n){return r.createElement(s.Z,(0,i.Z)({},e,{ref:n,icon:o}))};var l=r.forwardRef(a)},66455:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__(31468).default;(function(){if("function"!=typeof window.GGBApplet){var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var e={},n="5.0",t={},i=null,r=!1,o=!1,s=null,a=!1,l=null,c=null,u=0;u<arguments.length;u++){var d=arguments[u];if(null!==d)switch(_typeof(d)){case"number":n=d.toFixed(1);break;case"string":d.match(new RegExp("^[0-9]\\.[0-9]+$"))?n=d:s=d;break;case"object":void 0!==d.is3D?i=d:t=d;break;case"boolean":r=d,o=!0}}null===i&&(i={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},void 0===t.material_id||o||(r=!0)),null!==s&&void 0===t.id&&(t.id=s);var p="",f=!1,h=null,m=null,v=null,g=!1,x=null,w=null,_=null;void 0!==t.height&&(t.height=Math.round(t.height)),void 0!==t.width&&(t.width=Math.round(t.width));var y=function(e){return parseFloat(e)>4?parseFloat(e):5};function b(){try{return window.self!==window.top}catch(e){return!0}}function j(){return(!t.hasOwnProperty("screenshotGenerator")||!t.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,n){c=e,q(e,n)},e.setJavaCodebase=e.setJavaCodebaseVersion=e.isCompiledInstalled=e.setPreCompiledScriptPath=e.setPreCompiledResourcePath=function(){},e.setHTML5CodebaseVersion=function(e,n){var t=parseFloat(e);NaN!==t&&t<5?console.log("The GeoGebra HTML5 codebase version "+t+" is deprecated. Using version latest instead."):(l=e,I(e,n))},e.getHTML5CodebaseVersion=function(){return m},e.getParameters=function(){return t},e.setFontsCSSURL=function(e){_=e},e.setGiacJSURL=function(e){},e.setJNLPFile=function(e){e},e.setJNLPBaseDir=function(e){},e.inject=function(){function n(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var i,r="auto",o=t.id,s=!1,l=0;l<arguments.length;l++){var c=arguments[l];"string"==typeof c?(c=c.toLowerCase()).match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?r=c:o=arguments[l]:"boolean"==typeof c?s=c:c instanceof HTMLElement&&(i=c)}function u(){if(a){r=Z(r);var l=i||document.getElementById(o);if(l)if(e.removeExistingApplet(l,!1),void 0===t.width&&l.clientWidth&&(t.width=l.clientWidth),void 0===t.height&&l.clientHeight&&(t.height=l.clientHeight),t.width&&t.height||"html5"!==r||(delete t.width,delete t.height),h=r,"screenshot"===r)N(l,t);else{var c=!1;t.hasOwnProperty("playButton")&&t.playButton||t.hasOwnProperty("clickToLoad")&&t.clickToLoad?c=!0:t.hasOwnProperty("playButtonAutoDecide")&&t.playButtonAutoDecide&&(c=(!b()||n())&&j()),c?(h="screenshot",A(l,t,s,r)):T(l,t,s)}else console.log("possibly bug on ajax loading? ")}else setTimeout(u,200)}u()},e.getViews=function(){return i},e.isJavaInstalled=function(){return!1};var k=function(n){var r=function(){t.onError&&t.onError(),O("Error: Fetching material (id "+t.material_id+") failed.",t)},o=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",s="/materials/"+t.material_id+"?scope=basic";C("https://"+o+"/api/proxy.php?path="+encodeURIComponent(s),(function(o){var s=JSON.parse(o),a=s.elements?s.elements.filter((function(e){return"G"==e.type||"E"==e.type}))[0]:s;if(a&&a.url){t.fileName=a.url,S(a.settings||{}),i.is3D=!0;var l="https://www.geogebra.org/images/";e.setPreviewImage(x||a.previewUrl,l+"GeoGebra_loading.png",l+"applet_play.png"),n()}else r()}),r)};function S(e){["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach((function(n){e[n]=!!e[n]})),["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"].forEach((function(n){void 0===t[n]&&void 0!==e[n]&&(t[n]=e[n])})),void 0===t.showToolBarHelp&&(t.showToolBarHelp=t.showToolBar)}function C(e,n,t){var i=new XMLHttpRequest;i.open("GET",e),i.onload=function(){n(i.responseText)},i.onerror=t,i.send()}e.isHTML5Installed=function(){return!0},e.getLoadedAppletType=function(){return h},e.setPreviewImage=function(e,n,t){x=e,w=n,t},e.removeExistingApplet=function(e,n){var i;"string"==typeof e&&(e=document.getElementById(e)),h=null;var r=null;for(i=0;i<e.childNodes.length;i++){var o=e.childNodes[i],s=o.className;"applet_screenshot"===s?n?(o.style.display="block",h="screenshot"):o.style.display="none":"applet_scaler prerender"!==s&&(e.removeChild(o),r=s&&-1!=s.indexOf("appletParameters")?o.id:null,i--)}var a=void 0!==t.id?t.id:r,l=window[a];l&&"function"==typeof l.getBase64&&(l.remove(),window[a]=null)},e.refreshHitPoints=function(){if(y(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var n=e.getAppletObject();return!(!n||"function"!=typeof n.recalculateEnvironments)&&(n.recalculateEnvironments(),!0)},e.startAnimation=function(){var n=e.getAppletObject();return!(!n||"function"!=typeof n.startAnimation)&&(n.startAnimation(),!0)},e.stopAnimation=function(){var n=e.getAppletObject();return!(!n||"function"!=typeof n.stopAnimation)&&(n.stopAnimation(),!0)},e.getAppletObject=function(){var e=void 0!==t.id?t.id:"ggbApplet";return window[e]},e.resize=function(){};var B=function(e){return e&&"false"!==e},T=function(n,t,i){y(m)<=4.2&&(i=!0);var r=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==m||ggbHTML5LoadedCodebaseIsWebSimple&&!g)&&(r=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var o=document.createElement("div");o.classList.add("appletParameters","notranslate");var s=t.width,a=t.height;if(t.disableAutoScale=void 0===t.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():t.disableAutoScale,void 0!==t.width)if(y(m)<=4.4)B(t.showToolBar)&&(t.height-=7),B(t.showAlgebraInput)&&(t.height-=37),t.width<605&&B(t.showToolBar)&&(t.width=605,s=605);else{var u=100;(B(t.showToolBar)||B(t.showMenuBar))&&(t.hasOwnProperty("customToolBar")&&(t.customToolbar=t.customToolBar),u=B(t.showMenuBar)?245:155),s<u&&(t.width=u,s=u)}for(var d in o.style.border="none",o.style.display="inline-block",t)t.hasOwnProperty(d)&&"appletOnLoad"!==d&&o.setAttribute("data-param-"+d,t[d]);_&&o.setAttribute("data-param-fontscssurl",_),e.resize=function(){GGBAppletUtils.responsiveResize(n,t)},window.addEventListener("resize",(function(n){e.resize()}));var f="function"==typeof t.appletOnLoad?t.appletOnLoad:function(){};if(i||void 0===t.width){var h=document.createElement("div");h.className="applet_scaler",h.style.position="relative",h.style.display="block",h.appendChild(o),n.appendChild(h),t.appletOnLoad=function(n){e.resize(),f(n)}}else{t.hasOwnProperty("showSplash")||o.setAttribute("data-param-showSplash","false");var x=n.querySelector(".applet_scaler.prerender"),w=null!==x;if(w)b=x.querySelector(".ggb_preview");else{var b=L(s,a,t.borderColor,!1);(x=document.createElement("div")).className="applet_scaler",x.style.position="relative",x.style.display="block",x.style.width=s+"px",x.style.height=a+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(x,"66%"),y(m)>=5?(t.appletOnLoad=function(e){var t=n.querySelector(".ggb_preview");t&&t.parentNode.removeChild(t),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(x),window.GGBT_wsf_view&&$(window).trigger("resize"),f(e)},w||x.appendChild(b)):o.appendChild(b),x.appendChild(o),w||n.appendChild(x),setTimeout((function(){e.resize()}),1)}function j(e,n){n&&"function"==typeof n.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,n.appletOnLoad):renderGGBElement(e),O("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",n)}function k(e,n){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:e,params:n}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(e){j(e.article,e.params)})),html5AppletsToProcess=null)},y(m)<5&&(e.className+=" geogebraweb")):j(e,n)}if(r){scriptLoadStarted=!0;for(var S=0;S<o.childNodes.length;S++){"TABLE"===o.childNodes[S].tagName&&(o.removeChild(o.childNodes[S]),S--)}if(null!==ggbHTML5LoadedScript){var C=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');null!=C&&C.parentNode.removeChild(C)}var T=document.createElement("script"),N=function(){k(o,t)};T.src=p+v,ggbHTML5LoadedCodebaseIsWebSimple=g,ggbHTML5LoadedCodebaseVersion=m,ggbHTML5LoadedScript=T.src,O("GeoGebra HTML5 codebase loaded: '"+p+"'.",t),c||l&&"5.0"!=l?p.requirejs?__webpack_require__.e(5783).then(function(){var e=[__webpack_require__(5783)];N.apply(null,e)}.bind(this)).catch(__webpack_require__.oe):(T.onload=N,n.appendChild(T)):(g?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),N())}else k(o,t);t.height=a,t.width=s},N=function(n,t,i){var r=L(t.width,t.height,t.borderColor,i),o=document.createElement("div");o.style.position="relative",o.style.display="block",o.style.width=t.width+"px",o.style.height=t.height+"px",o.className="applet_screenshot applet_scaler"+(i?" applet_screenshot_play":""),o.appendChild(r);var s=GGBAppletUtils.getScale(t,n,i);i?(n.appendChild(P()),window.GGBT_wsf_view||(n.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(o,"66%"),n.appendChild(o),1===s||isNaN(s)||(GGBAppletUtils.scaleElement(o,s),o.style.width=t.width+"px",o.style.height=t.height+"px",o.parentNode.style.width=t.width*s+"px",o.parentNode.style.height=t.height*s+"px"),e.resize=function(){E(n,r,o,i)},window.addEventListener("resize",(function(n){e.resize()})),e.resize()};function E(e,n,i,r){if(e.contains(n)){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if("fullscreencontent"!==e.id)return;window.GGBT_wsf_view.setCloseBtnPosition(e)}var o=GGBAppletUtils.getScale(t,e,r);null!==i.parentNode&&(isNaN(o)||1===o?(GGBAppletUtils.scaleElement(i,1),i.parentNode.style.width=t.width+"px",i.parentNode.style.height=t.height+"px"):(GGBAppletUtils.scaleElement(i,o),i.parentNode.style.width=t.width*o+"px",i.parentNode.style.height=t.height*o+"px")),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(e),"object"===_typeof(window.GGBT_ws_header_footer)&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}e.onExitFullscreen=function(e,n){n.appendChild(e)};var A=function(e,n,t,i){N(e,n,!0);for(var r=function(){var t=[];for(s=0;s<e.childNodes.length;s++)t.push(e.childNodes[s]);if(window.GGBT_wsf_view){var r=window.GGBT_wsf_view.renderFullScreen(e,n.id),o=document.getElementById("fullscreencontainer"),a=jQuery(e).find(".fullscreencontent");a.length>0?(r.remove(),a.attr("id","fullscreencontent").show(),jQuery(o).append(a),window.dispatchEvent(new Event("resize"))):T(r,n,!1),window.GGBT_wsf_view.launchFullScreen(o)}else h=i,T(e,n,!1);if(!window.GGBT_wsf_view)for(s=0;s<t.length;s++)e.removeChild(t[s])},o=e.getElementsByClassName("ggb_preview_play"),s=0;s<o.length;s++)o[s].addEventListener("click",r,!1),o[s].addEventListener("ontouchstart",r,!1);"function"==typeof window.ggbAppletPlayerOnload&&window.ggbAppletPlayerOnload(e),j()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},P=function(){var e=document.createElement("div");if(e.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var n='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',t=document.createElement("style");t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n)),document.getElementsByTagName("head")[0].appendChild(t)}return e},L=function(e,n,t,i){var r=document.createElement("div");r.className="ggb_preview",r.style.position="absolute",r.style.zIndex="90",r.style.width=e-2+"px",r.style.height=n-2+"px",r.style.top="0px",r.style.left="0px",r.style.overflow="hidden",r.style.backgroundColor="white";var o="lightgrey";void 0!==t&&(o="none"===t?"transparent":t),r.style.border="1px solid "+o;var s,a,l,c=document.createElement("img");if((c.style.position="relative",c.style.zIndex="1000",c.style.top="-1px",c.style.left="-1px",null!==x&&c.setAttribute("src",x),c.style.opacity=.7,null!==w)&&!i){(s=document.createElement("img")).style.position="absolute",s.style.zIndex="1001",s.style.opacity=1,c.style.opacity=.3,(a=360)>e/4*3&&(a=e/4*3),l=a/5.8,s.setAttribute("src",w),s.setAttribute("width",a),s.setAttribute("height",l);var u=(e-a)/2,d=(n-l)/2;s.style.left=u+"px",s.style.top=d+"px",r.appendChild(s)}return r.appendChild(c),r},Z=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},M=["web","webSimple","web3d","tablet","tablet3d","phone"],I=function(e,n){if(m=e,n)q(m,!0);else{var o,s,a=!r;if(a){var l=y(m);!isNaN(l)&&l<4.4&&(a=!1)}o="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var c=m.indexOf("//");for(var u in s=c>0?m:0===c?o+m:"https://www.geogebra.org/apps/5.2.814.0/",M)if(m.slice(-1*M[u].length)===M[u]||m.slice(-1*(M[u].length+1))===M[u]+"/")return void q(s,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!a||i.is3D||i.AV||i.SV||i.CV||i.EV2||i.CP||i.PC||i.DA||i.FI||i.PV||B(t.showToolBar)||B(t.showMenuBar)||B(t.showAlgebraInput)||B(t.enableRightClick)||t.appName&&"classic"!=t.appName?s+="web3d/":s+="webSimple/",q(s,!1)}},q=function(e,n){if(e.requirejs)p=e;else{"/"!==e.slice(-1)&&(e+="/"),p=e,null===n&&(n=-1===e.indexOf("http")),f=n,v="web.nocache.js",g=!1;var t=p.split("/");t.length>1&&(n||"webSimple"!==t[t.length-2]?M.indexOf(t[t.length-2])>=0&&(v=t[t.length-2]+".nocache.js"):(v="webSimple.nocache.js",g=!0)),t=e.split("/"),"test"===(m=t[t.length-3]).substr(0,4)?m=m.substr(4,1)+"."+m.substr(5,1):"war"!==m.substr(0,3)&&"beta"!==m.substr(0,4)||(m="5.0");var i=parseFloat(m);NaN!==i&&i<5&&e.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+i+" is deprecated. Using version latest instead."),I("5.0",n))}},O=function(e,n){window.console&&window.console.log&&(!n||void 0===n.showLogging||n.showLogging&&"false"!==n.showLogging)&&console.log(e)};function D(){var e=n;null!==l?e=l:parseFloat(e)<5&&(e="5.0"),I(e,!1),null!==c&&q(c,f),a=!0}return void 0!==t.material_id?k(D):D(),e},GGBAppletUtils=function(){"use strict";function e(){return void 0!==window.GGBT_wsf_edit}function n(e,n){1!=n?(e.style.transformOrigin="0% 0% 0px",e.style.webkitTransformOrigin="0% 0% 0px",e.style.transform="scale("+n+","+n+")",e.style.webkitTransform="scale("+n+","+n+")",e.style.maxWidth="initial",null!==e.querySelector(".ggb_preview")&&(e.querySelector(".ggb_preview").style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[0]&&(e.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[1]&&(e.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(e.style.transform="none",e.style.webkitTransform="none")}function t(e,n,t,i,r){if(e.isScreenshoGenerator)return 1;var o,s=void 0!==i&&i,a=null!=e.noScaleMargin&&e.noScaleMargin,l=(o=e.autoHeight)&&"false"!==o,c=function(e,n,t,i,r,o){var s=null;if(null!=o&&""!=o)for(var a=e.parentNode;null!=a;){if((" "+a.className+" ").indexOf(" "+o+" ")>-1){s=a;break}a=a.parentNode}var l=0,c=0,u=0,d=0,p=0,f=0,h=0;if(s)l=s.offsetWidth,c=Math.max(i?s.offsetWidth:0,s.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(l=Math.min(window.innerWidth,document.documentElement.clientWidth),c=Math.min(window.innerHeight,document.documentElement.clientHeight),u=l):(l=window.innerWidth,c=window.innerHeight,u=window.innerWidth),e){var m=e.getBoundingClientRect();m.left>0&&m.left<=l&&(void 0===r||!r)&&("rtl"===document.dir?(p=l-m.width-m.left,f=u<=480?10:30):(f=m.left,p=u<=480?10:30),d=f+p)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(d=40,h=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(d=0,h=40))}return e&&((void 0===t||!t)&&n>0&&n+d<l?l=n:l-=d,"object"!==_typeof(window.GGBT_wsf_view)||!window.GGBT_wsf_view.isFullscreen()||void 0!==t&&t||(c-=h)),{width:l,height:c}}(n,e.width,t,l,s&&window.GGBT_wsf_view||a,r),u=parseInt(c.width),d=e.width,p=e.height;if(void 0===d){var f=n.querySelector(".appletParameters");f&&(d=f.offsetWidth,p=f.offsetHeight)}var h=u/d,m=s?1:c.height/p;return void 0===t||t||(h=Math.min(1,h),m=Math.min(1,m)),Math.min(h,m)}function i(e,n,i){var r,o=1,s=!1;return e.hasOwnProperty("allowUpscale")&&(s=e.allowUpscale),e.hasOwnProperty("scale")&&(o=parseFloat(e.scale),(isNaN(o)||null===o||0===o)&&(o=1),o>1&&(s=!0)),n&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(s=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?o:(r=t(e,n,s,i,e.scaleContainerClass),!s||e.hasOwnProperty("scale")&&1!==o?Math.min(o,r):r)}function r(e){var n=Math.min(window.innerWidth,document.documentElement.clientWidth),t=Math.min(window.innerHeight,document.documentElement.clientHeight),i=e.getBoundingClientRect(),r=(n-i.width)/2,o=(t-i.height)/2;o<0&&(o=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=r<40?"40px":r+"px",e.style.top=o+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=o<40?"40px":o+"px",e.style.left=r+"px")}return{responsiveResize:function(t,o){var s=t.querySelector(".appletParameters");if(s){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(o.id!==s.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(t)}if(s.parentElement&&/fullscreen/.test(s.parentElement.className))return;var a=i(o,t);e()&&s.setAttribute("data-param-scale",a);for(var l=null,c=0;c<t.childNodes.length;c++)if(void 0!==t.childNodes[c].className&&t.childNodes[c].className.match(/^applet_scaler/)){l=t.childNodes[c];break}if(null!==l&&null!==l.querySelector(".noscale"))return;var u=void 0!==o.id?o.id:"ggbApplet",d=window[u];null!=d&&d.recalculateEnvironments||null===l||l.className.match(/fullscreen/)||(l.parentNode.style.transform="",isNaN(a)||1===a?(n(l,1),l.parentNode.style.width=o.width+"px",l.parentNode.style.height=o.height+"px"):(l.parentNode.style.width=o.width*a+"px",l.parentNode.style.height=o.height*a+"px",n(l,a))),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&r(t),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(s).parents(".content-added-content"))}},isFlexibleWorksheetEditor:e,positionCenter:r,getScale:i,scaleElement:n}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),void 0===__WEBPACK_AMD_DEFINE_RESULT__||(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var e=n.location.search;return-1!=e.indexOf(J)||-1!=e.indexOf(K)}function q(e,n){}q(H,I),webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{},t;function u(){return v(),t}function v(){if(!t){var e=o.createElement(Q);if(e.id=L,e.style.cssText=R+S,e.tabIndex=-1,o.body.appendChild(e),t=e.contentWindow.document,-1==navigator.userAgent.indexOf(T)){t.open();var n=document.compatMode==U?V:W;t.write(n+X),t.close()}}}function w(e){q(cb,eb),function(e){function n(){return _typeof(o.readyState)==Y?_typeof(o.body)!=Y&&null!=o.body:/loaded|complete/.test(o.readyState)}var t=n();if(t)e();else{o.addEventListener&&o.addEventListener(Z,r,!1);var i=setInterval((function(){r()}),$)}function r(){if(!t){if(!n())return;t=!0,e(),o.removeEventListener&&o.removeEventListener(Z,r,!1),i&&clearInterval(i)}}}((function(){var n,t,i,r;n=e,t=u(),i=t.body,(r=t.createElement(_)).language=ab,r.crossOrigin=W,r.src=n,webModule.__errFn&&(r.onerror=function(){webModule.__errFn(L,new Error(bb+n))}),i.appendChild(r),q(cb,db)}))}function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(e){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(e){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(e){var n=c[e];return null==n?null:n},r=d,webModule.__errFn=e}function B(){function e(e){var n=e.lastIndexOf(rb);-1==n&&(n=e.length);var t=e.indexOf(sb);-1==t&&(t=e.length);var i=e.lastIndexOf(tb,Math.min(t,n));return i>=O?e.substring(O,i+P):W}var n,t=null!=(n=__gwt_getMetaProperty(wb))?n:W;return t==W&&(t=function(){for(var n=o.getElementsByTagName(_),t=O;t<n.length;++t)if(-1!=n[t].src.indexOf(xb))return e(n[t].src);return W}()),t==W&&(t=function(){var e=o.getElementsByTagName(yb);return e.length>O?e[e.length-P].href:W}()),t==W&&function(){var e=o.location;return e.href==e.protocol+zb+e.host+e.pathname+e.search+e.hash}()&&(t=e(o.location.href)),t=function(n){if(n.match(/^\w+:\/\//));else{var t=o.createElement(ub);t.src=n+vb,n=e(t.src)}return n}(t),t}function C(e){return e.match(/^\//)||e.match(/^[a-zA-Z]+:\/\//)?e:webModule.__moduleBase+e}function D(){var e,t=O,i=[],o=[];function s(e){var n=o[e](),t=i[e];if(n in t)return n;var s=[];for(var a in t)s[t[a]]=a;throw r&&r(e,s,n),null}if(__gwt_isKnownPropertyValue=function(e,n){return n in i[e]},webModule.__getPropMap=function(){var e={};for(var n in i)i.hasOwnProperty(n)&&(e[n]=s(n));return e},webModule.__computePropValue=s,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var a=(e=Cb).indexOf(Db);-1!=a&&(t=parseInt(e.substring(a+P),$),e=e.substring(O,a))}catch(e){}return webModule.__softPermutationId=t,C(e+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}s[L]={moduleName:L},webModule.__moduleStartupDone=function(e){var n=s[L].bindings;s[L].bindings=function(){for(var t=n?n():{},i=e[webModule.__softPermutationId],r=O;r<i.length;r++){var o=i[r];t[o[O]]=o[P]}return t}},webModule.__startLoadingFragment=function(e){return C(e)},webModule.__installRunAsyncCode=function(e){var n=u(),t=n.body,i=n.createElement(_);i.language=ab,i.text=e,t.appendChild(i),t.removeChild(i)},A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},"function"!=typeof window.web3d&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),"function"!=typeof window.webSimple&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet}else console.warn("deployggb.js was loaded twice")})()},55087:function(e,n,t){"use strict";function i(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 r(e){for(var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",t=[],i=0;i<e.length;i++){var r=e[i],o=n?"".concat(n,"/").concat(r.name):"".concat(r.name);t.push({title:r.name,type:r.type,isLeaf:"tree"!==r.type,key:o})}return t}function o(e,n,t){for(var i=0;i<e.length;i++){var r=e[i];if(r.key===n){r.children=t;break}r.children&&o(r.children,n,t)}return e}function s(e,n,t){var i;return function(){var r=this,o=arguments,s=function(){i=null,t||e.apply(r,o)},a=t&&!i;clearTimeout(i),i=setTimeout(s,n),a&&e.apply(r,o)}}t.d(n,{Ax:function(){return o},Ds:function(){return s},KI:function(){return a},SI:function(){return r},f1:function(){return i}});var a=t(27065).Z.API_SERVER},74908:function(e,n,t){"use strict";t.d(n,{Z:function(){return _}});var i=t(7557),r=t.n(i),o=t(41498),s=t.n(o),a=t(79800),l=t.n(a),c=t(59301),u="imageDimensions___a7crR",d="img___Kroat",p="fullWidth___c492T",f=t(92310),h=t.n(f),m=t(71418),v=t(2859),g=t(51136),x=t(6457),w=t(37712),_=function(e){var n=e.data,t=e.className,i=e.fullWidth,o=e.style,a=void 0===o?{}:o,f=e.onClose,_=e.onOk,y=e.showFullTools,b=e.noAssociationId,j=(0,c.useRef)(null),k=(0,c.useRef)(null),S=(0,c.useState)(!1),C=l()(S,2),B=C[0],T=C[1],N=(0,c.useState)("正在加载中"),E=l()(N,2),A=E[0],P=E[1];(0,c.useEffect)((function(){null!=n&&n.visible?document.body.setAttribute("data-custom","y-hidden"):document.body.removeAttribute("data-custom"),null!=n&&n.src&&L()}),[null==n?void 0:n.visible]);var L=function(){var e=s()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T(!0),P("正在加载中"),e.next=4,(0,x.ZJ)(null==n?void 0:n.src);case 4:t=e.sent,j.current.src="",j.current.src=t,j.current.onload=function(){M()},T(!1),P("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Z=function(){var e=s()(r()().mark((function e(t){var i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return T(!0),P("正在保存中"),e.next=4,(0,g.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:n.title,file:t.dataUrl}});case 4:if(null==(i=e.sent)||!i.id||b){e.next=12;break}return e.next=8,(0,g.ZP)("/api/attachments/".concat(n.id,"/add_subitem.json"),{method:"post",body:{subitem_id:null==i?void 0:i.id,settings:JSON.stringify(t.state)}});case 8:0===e.sent.status&&_(),e.next=13;break;case 12:null!=i&&i.id&&_(i);case 13:T(!1),P("");case 15:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),M=function(){k.current=new v.hP(j.current),k.current.addEventListener("render",Z),k.current.addEventListener("beforeclose",f),y&&(k.current.availableMarkerTypes=k.current.ALL_MARKER_TYPES,k.current.uiStyleSettings.redoButtonVisible=!0,k.current.uiStyleSettings.notesButtonVisible=!0,k.current.uiStyleSettings.zoomButtonVisible=!0,k.current.uiStyleSettings.zoomOutButtonVisible=!0,k.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=k.current.uiStyleSettings,k.current.show(),null!=n&&n.snapshotData&&k.current.restoreState(n.snapshotData),setTimeout((function(){var e;(e=document.querySelector('a[href="https://markerjs.com/"]'))&&e.parentNode&&(e.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"选择"},{name:'[data-action="delete"]',title:"删除元素"},{name:'[data-action="undo"]',title:"撤销"},{name:'[data-type-name="FrameMarker"]',title:"矩形"},{name:'[data-type-name="FreehandMarker"]',title:"画线"},{name:'[data-type-name="ArrowMarker"]',title:"箭头"},{name:'[data-type-name="TextMarker"]',title:"文本"},{name:'[data-type-name="EllipseMarker"]',title:"椭圆"},{name:'[data-type-name="HighlightMarker"]',title:"方块"},{name:'[data-type-name="CalloutMarker"]',title:"注释"},{name:'[data-action="render"]',title:"保存"},{name:'[data-action="close"]',title:"退出"}].forEach((function(e){var n=document.querySelector(e.name);n&&n.setAttribute("title",e.title)}))}),300)};return(0,w.jsx)(c.Fragment,{children:(null==n?void 0:n.visible)&&(0,w.jsxs)("div",{className:h()(u,t,i?p:""),style:a,children:[(0,w.jsx)(m.Z,{spinning:B,tip:A,style:{position:"absolute"}}),(0,w.jsx)("img",{className:d,ref:j})]})})}},30347:function(e,n,t){"use strict";var i=t(79800),r=t.n(i),o=t(59301),s=t(44499),a=(t(48136),t(33773)),l=t(43418),c=t(37712),u=(0,o.forwardRef)((function(e,n){var t=e.callback,i=e.width,u=e.onChange,d=e.disabled,p=e.readOnly,f=e.type,h=void 0===f?"":f,m=e.value,v=void 0===m?"":m,g=e.style,x=void 0===g?{}:g,w=(0,o.useRef)(),_=(0,o.useRef)(),y=(0,o.useState)(0),b=r()(y,2),j=b[0],k=b[1],S=(0,o.useState)(0),C=r()(S,2),B=C[0],T=C[1],N=(0,o.useState)(!1),E=r()(N,2),A=E[0],P=E[1],L=function(){var e=document.createElement("div");e.innerHTML=w.current.getValue();var n=e.innerText;return t&&t(n),n};(0,o.useImperativeHandle)(n,(function(){return{getData:L}}));var Z=function(e,n,t,i){var r=document.body.clientHeight,o=document.body.clientWidth;return!(e<20&&t>e||e>o-20&&t<e||n<20&&i>n||n>r-20&&i<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};(0,o.useEffect)((function(){A&&setTimeout((function(){var e=document.getElementsByClassName("ant-modal")[0],n=window.innerWidth/2-e.offsetWidth/2,t=window.innerHeight/2-e.offsetHeight/2;k(n),T(t)}),0)}),[A]);return(0,c.jsxs)("div",{style:x,children:[(0,c.jsx)("div",{style:{width:i||"100%",position:"relative"},className:"".concat(s.Z.mathFillWrap," ").concat(d||p?"cursorDefault":""),onClick:function(){d||p||P(!0)},children:(0,c.jsx)("math-field",{disabled:d,locale:"zh_cn",class:"".concat(s.Z.mathField," ").concat(h),readOnly:p,placeholder:"请输入公式",ref:w,style:{width:"100%",fontSize:v?18:14},value:v||""})}),(0,c.jsx)(l.Z,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:j,top:B},title:(0,c.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-j,t=e.clientY-B;document.body.onmousemove=function(e){var i=e.clientX-n,r=e.clientY-t,o=document.getElementsByClassName("ant-modal")[0],s=window.innerWidth-o.offsetWidth,a=window.innerHeight-o.offsetHeight;i=Math.max(0,Math.min(i,s)),r=Math.max(0,Math.min(r,a)),Z(e.clientX,e.clientY,n,t)&&(k(i),T(r))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:"输入公式"}),open:A,onOk:function(){var e=_.current.getData();w.current.setValue(e),u(e),P(!1)},onCancel:function(){P(!1)},destroyOnClose:!0,className:"markdown-popup-form",children:(0,c.jsx)(a.Z,{value:v,ref:_,onChange:u,showSaveButton:!1})})]})}));n.Z=u},21871:function(e,n,t){"use strict";var i=t(82242),r=t.n(i),o=t(7557),s=t.n(o),a=t(41498),l=t.n(a),c=t(79800),u=t.n(c),d=t(7880),p=t(59301),f=t(8591),h=t(3113),m=t(43418),v=t(24334),g=t(51136),x=t(76039),w=t(84804),_=t(99232),y=t.n(_),b=t(37712);n.Z=function(e){var n=e.ButtonProps,t=e.ButtonText,i=e.form,o=e.answerKey,a=e.hackidentifier,c=void 0===a?"":a,_=e.items,j=void 0===_?{}:_,k=e.setIsSubmitCode,S=(0,p.useState)(!1),C=u()(S,2),B=C[0],T=C[1],N=(0,p.useState)(""),E=u()(N,2),A=E[0],P=E[1],L=(0,d.useParams)(),Z=(0,p.useState)({}),M=u()(Z,2),I=M[0],q=M[1],O="edit"===L.type;window.location.href.includes("problemset");function D(e,n){return R.apply(this,arguments)}function R(){return(R=l()(s()().mark((function e(n,t){var r,a,l,c,u;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(a=i.getFieldValue("hack_codes"),l=i.getFieldValue(o),a.code){e.next=5;break}return f.ZP.info("程序代码不能为空!"),e.abrupt("return");case 5:if(a.language){e.next=8;break}return f.ZP.info("编程语言不能为空!"),e.abrupt("return");case 8:if(!(l.length>0&&(null===(r=l.filter((function(e){return!e.answer_text})))||void 0===r?void 0:r.length)>0)){e.next=11;break}return f.ZP.info("填空项不能为空!"),e.abrupt("return");case 11:return c=a.code,l.length>0&&(null==l||l.map((function(e){c=e.multi_line?c.substring(0,c.indexOf("@▁▁@"))+e.answer_text+c.substring(c.indexOf("@▁▁@")+4):c.substring(0,c.indexOf("@▁@"))+e.answer_text+c.substring(c.indexOf("@▁@")+3)}))),e.next=15,(0,x.n4)(t,n||{code:v.Base64.encode(c),language:a.language,answers:null==l?void 0:l.map((function(e){return e.answer_text}))});case 15:return u=e.sent,e.abrupt("return",u);case 17:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e,n){return F.apply(this,arguments)}function F(){return(F=l()(s()().mark((function e(n,t){var i,r,o;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=j.userAnswer,r=v.Base64.decode(j.code),i.length>0&&(null==i||i.map((function(e){r=e.multi_line?r.substring(0,r.indexOf("@▁▁@"))+e.value+r.substring(r.indexOf("@▁▁@")+4):r.substring(0,r.indexOf("@▁@"))+e.value+r.substring(r.indexOf("@▁@")+3)}))),e.next=5,(0,x.n4)(t,n||{code:v.Base64.encode(r),language:j.language,answers:null==i?void 0:i.map((function(e){return e.value}))});case 5:return o=e.sent,e.abrupt("return",o);case 7:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function z(){return(new Date).getTime()}return(0,p.useEffect)((function(){(O||c)&&P(c||L.id)}),[L]),(0,p.useEffect)((function(){return function(){sessionStorage.removeItem("projectFill")}}),[]),(0,b.jsxs)("div",{children:[(0,b.jsx)(h.ZP,r()(r()({loading:B},n),{},{onClick:l()(s()().mark((function e(){var n,o,a,c,u,d,p,h,w,_,y,b,S,C;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("----",111),"提交代码"!==t){e.next=22;break}if(T(!0),!B){e.next=5;break}return e.abrupt("return");case 5:return e.next=7,(0,g.ZP)("/api/problems/".concat(A,"/start.json"),{method:"get"});case 7:return n=e.sent,e.next=10,G(null,null==n?void 0:n.identifier);case 10:if(0!==(null==(o=e.sent)?void 0:o.status)){e.next=19;break}return a=function(){var e=l()(s()().mark((function e(){var t,i,r,o,l,u;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,x.rX)(null==n?void 0:n.identifier,"submit");case 2:if(i=e.sent,r=i.status,i.message,o=i.data,l=z(),u=l-c>1e4*(null==j||null===(t=j.userAnswer)||void 0===t?void 0:t.length),0===r||u||setTimeout(a,1e3),!u){e.next=13;break}return m.Z.error({centered:!0,okText:"知道啦",title:"调试代码超时"}),T(!1),e.abrupt("return");case 13:0===r&&(T(!1),q(o),2===o.status&&(T(!1),m.Z.error({centered:!0,okText:"知道啦",title:"调试代码超时"})));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),c=z(),e.next=16,(0,x.bM)(null==n?void 0:n.identifier,{});case 16:a(),e.next=20;break;case 19:T(!1);case 20:return k&&k(!0),e.abrupt("return");case 22:return u=!0,e.next=25,i.validateFields().then((function(){u=!1}),(function(e){var n,t;e.errorFields[0].name.includes("standard_answers")?f.ZP.error("填空项答案不能为空"):f.ZP.error(e.errorFields[0].errors[0]),0===(null===(n=e.errorFields)||void 0===n?void 0:n.length)&&(u=!1),i.scrollToField(null==e||null===(t=e.errorFields)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.name,{behavior:"smooth",block:"center"}),u=!0}));case 25:if(!u){e.next=27;break}return e.abrupt("return");case 27:if(T(!0),!B){e.next=30;break}return e.abrupt("return");case 30:if(d="",p=i.getFieldsValue(),A){e.next=41;break}return e.next=35,(0,g.ZP)("/api/problems.json",{method:"post",body:r()(r()({},p),{},{hack:r()(r()({},null==p?void 0:p.hack),{},{sub_discipline_id:null==p||null===(h=p.hack)||void 0===h||null===(h=h.sub_discipline_id)||void 0===h?void 0:h[1],difficult:p.difficulty,item_banks_group_id:p.item_banks_group_id}),hack_codes:r()(r()({},p.hack_codes),{},{code:v.Base64.encode(p.hack_codes.code)}),hack_sets:[r()({},p.hack_sets)],is_blank:!0})});case 35:d=e.sent,A=null===(w=d)||void 0===w?void 0:w.identifier,sessionStorage.projectFill=A,P(A),e.next=44;break;case 41:return e.next=43,(0,g.ZP)("/api/problems/".concat(A,".json"),{method:"put",body:r()(r()({},p),{},{hack:r()(r()({},null==p?void 0:p.hack),{},{sub_discipline_id:null==p||null===(_=p.hack)||void 0===_||null===(_=_.sub_discipline_id)||void 0===_?void 0:_[1],difficult:p.difficulty,item_banks_group_id:p.item_banks_group_id}),hack_codes:r()(r()({},p.hack_codes),{},{code:v.Base64.encode(p.hack_codes.code)}),update_hack_sets:[r()({},p.hack_sets)],is_blank:!0})});case 43:d=e.sent;case 44:return e.next=46,(0,g.ZP)("/api/problems/".concat(A,"/start.json"),{method:"get"});case 46:return y=e.sent,e.next=49,D(null,null==y?void 0:y.identifier);case 49:if(0!==(null==(b=e.sent)?void 0:b.status)){e.next=58;break}return S=function(){var e=l()(s()().mark((function e(){var n,t,i,r,o,a;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,x.rX)(null==y?void 0:y.identifier,"submit");case 2:if(t=e.sent,i=t.status,t.message,r=t.data,o=z(),a=o-C>1e3*(p.hack.time_limit+3)*(null==p||null===(n=p.standard_answers)||void 0===n?void 0:n.length),0===i||a||setTimeout(S,1e3),!a){e.next=13;break}return m.Z.error({centered:!0,okText:"知道啦",title:"调试代码超时"}),T(!1),e.abrupt("return");case 13:0===i&&(T(!1),q(r),2===r.status&&(T(!1),m.Z.error({centered:!0,okText:"知道啦",title:"调试代码超时"})));case 14:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=z(),e.next=55,(0,x.bM)(null==y?void 0:y.identifier,{});case 55:S(),e.next=59;break;case 58:T(!1);case 59:case"end":return e.stop()}}),e)}))),children:t})),(null==I?void 0:I.id)&&2!==I.status&&(0,b.jsx)(m.Z,{open:(null==I?void 0:I.id)&&2!==I.status,title:"运行结果",width:1100,footer:!1,onOk:function(){q({})},onCancel:function(){q({})},children:(0,b.jsxs)("div",{style:{maxHeight:600,overflow:"auto",marginBottom:15},children:[(0,b.jsxs)("div",{style:{marginBottom:20,display:"flex",justifyContent:"space-between",fontSize:14},children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#666666"},children:"状态"}),(0,b.jsx)("span",{style:{marginLeft:12,color:0!==I.status&&"#E30000"},children:w.Im[I.status]})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#666666"},children:"提交时间"}),(0,b.jsx)("span",{style:{marginLeft:12},children:y()(I.created_at).format("YYYY-MM-DD HH:mm:ss")})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#666666"},children:"语言"}),(0,b.jsx)("span",{style:{marginLeft:12},children:I.language})]}),(0,b.jsxs)("div",{children:[(0,b.jsx)("span",{style:{color:"#666666"},children:"执行用时"}),(0,b.jsxs)("span",{style:{marginLeft:12},children:[I.execute_time,"ms"]})]})]}),(0,b.jsx)(w.Y4,r()({},I))]})})]})}},88549:function(e,n,t){"use strict";t.d(n,{Z:function(){return p}});t(59301);var i="result___gu5zt",r="title___xrnx2",o="left___IAxp9",s="leftNode___HL8fG",a="right___ZXYmw",l="rightNode___jYL5_",c=t(92310),u=t.n(c),d=t(37712),p=function(e){var n=e.className,t=e.style,c=void 0===t?{}:t,p=e.leftNode,f=e.leftTitle,h=void 0===f?"自测输入":f,m=e.rightNode,v=e.rightTitle,g=void 0===v?"运行结果":v;return(0,d.jsxs)("div",{className:u()(i,n),style:c,children:[(0,d.jsxs)("div",{className:o,children:[(0,d.jsxs)("div",{className:r,children:[(0,d.jsx)("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),(0,d.jsx)("span",{children:h})]}),(0,d.jsx)("div",{className:s,children:p})]}),(0,d.jsxs)("div",{className:a,children:[(0,d.jsxs)("div",{className:r,children:[(0,d.jsx)("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),(0,d.jsx)("span",{children:g})]}),(0,d.jsx)("div",{className:l,children:m})]})]})}},37507:function(e,n,t){"use strict";t.d(n,{h:function(){return g}});var i=t(82242),r=t.n(i),o=t(79800),s=t.n(o),a=t(59301),l=t(57809),c=t(78241),u=t(3113),d=t(89780),p=t.n(d),f=(t(81974),t(3693),t(37712)),h=l.default.Option,m={labelCol:{span:4},wrapperCol:{span:20}},v={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 g(e){var n=e.value,t=e.onChange,i=e.mode,o=e.options,l=void 0===o?{}:o,c=(0,a.useRef)(),u=(0,a.useState)(),d=s()(u,2),h=d[0],m=d[1];return(0,a.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,a.useEffect)((function(){h&&h.setOption("mode",i)}),[h,i]),(0,a.useEffect)((function(){h&&(n===h.getValue()&&""!==n||setTimeout((function(){h.setValue(n||"")}),300))}),[h,n]),(0,a.useEffect)((function(){if(c.current&&!h){var e=p().fromTextArea(c.current,r()({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},l));m(e)}}),[c.current,h]),(0,f.jsx)("div",{className:"my-codemirror-container",children:(0,f.jsx)("textarea",{ref:c})})}n.Z=function(e){var n=e.callback,t=e.onCancel,i=(0,a.useState)("python"),o=s()(i,2),d=o[0],p=o[1];return(0,f.jsxs)(c.Z,r()(r()({},m),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){n(e)},style:{width:500},children:[(0,f.jsx)(c.Z.Item,{label:"代码语言",name:"language",children:(0,f.jsx)(l.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){p(v[e][1])},children:Object.keys(v).map((function(e){return(0,f.jsx)(h,{value:e,children:v[e][0]},e)}))})}),(0,f.jsx)(c.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,f.jsx)(g,{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:"取消"})]})]}))}},11094:function(e,n,t){"use strict";t.d(n,{Z:function(){return Be}});var i=t(91232),r=t.n(i),o=t(79800),s=t.n(o),a=t(85573),l=t.n(a),c=t(59301),u=t(89780),d=t.n(u),p=t(76374),f=(t(81974),t(6313),t(25717),t(99498),t(25419),t(67549),t(42783)),h=t(37712),m=function(e){var n=e.value,t=void 0===n?"":n,i=(e.className,e.showTextOnly,e.showLines,e.style,(0,c.useMemo)((function(){return""}),[t]));return(0,h.jsx)(h.Fragment,{children:(0,h.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})},v=t(82242),g=t.n(v),x=[{title:"粗体",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"斜体",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"md-iconfont icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"链接",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"行内公式",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"数学图像",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"多行公式",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"添加图片",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"插入画图",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"插入流程图",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"表格",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"换行",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"清空",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function w(e){var n=e.onActionCallback,t=e.title,i=e.icon,r=e.actionName,o=e.className,s=void 0===o?"":o,a=e.children;return(0,h.jsxs)("a",{title:t,className:s,onClick:function(){n(r)},children:[(0,h.jsx)("i",{className:"".concat(i)}),a]})}var _=function(e){var n=e.watch,t=e.showNullButton,i=e.showNullProgramButton,r=e.onActionCallback,o=e.fullScreen,s=e.insertTemp,a=e.hidetoolBar,l=e.extraUse,c=[].concat(x,[{title:"".concat(n?"关闭实时预览":"开启实时预览"),icon:"".concat(n?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,h.jsxs)("ul",{className:"markdown-toolbar-container",children:[!a&&c.map((function(e,n){return(0,h.jsx)("li",{children:e.actionName?(0,h.jsx)(w,g()(g()({},e),{},{onActionCallback:r})):(0,h.jsx)("span",{className:"v-line"})},n)})),t?(0,h.jsx)("li",{children:(0,h.jsx)(w,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:r,children:(0,h.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,i?(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("li",{children:(0,h.jsx)(w,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:r,children:(0,h.jsx)("span",{className:"fill-tip",children:"+单行填空项"})})}),(0,h.jsx)("li",{children:(0,h.jsx)(w,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:r,children:(0,h.jsx)("span",{className:"fill-tip",children:"+多行填空项"})})})]}):null,s&&(0,h.jsx)("li",{children:(0,h.jsx)(w,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(s),onActionCallback:r,children:(0,h.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),l&&(0,h.jsx)("li",{children:l}),(0,h.jsx)("li",{className:"btn-full-screen",children:(0,h.jsx)(w,{icon:"".concat(o?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:o?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})})]})},y=t(27308),b=t(78241),j=t(98135),k=t(3113),S={labelCol:{span:4},wrapperCol:{span:20}},C=function(e){var n=e.callback,t=e.onCancel;return(0,h.jsxs)(b.Z,g()(g()({},S),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){n(e)},style:{width:500},children:[(0,h.jsx)(b.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,h.jsx)(j.Z,{})}),(0,h.jsx)(b.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,h.jsx)(j.Z,{})}),(0,h.jsxs)("div",{className:"flex-container flex-end",children:[(0,h.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(k.ZP,{type:"ghost",onClick:t,children:"取消"})]})]}))},B=t(37507),T=t(8591),N=t(55087),E=b.Z.useForm,A={width:280,marginRight:10},P={labelCol:{span:5},wrapperCol:{span:19}},L=function(e){var n=e.callback,t=e.onCancel,i=E(),r=s()(i,1)[0],o=(0,c.useRef)();function a(e,n){-1!==e.status?r.setFieldsValue({src:"/api/attachments/".concat(e.id),type:n.type}):T.ZP.error(e.message)}return(0,h.jsxs)(b.Z,g()(g()({form:r},P),{},{className:"upload-image-panel",onFinish:function(e){n(e,o.current)},style:{width:470,overflow:"hidden"},children:[(0,h.jsx)(b.Z.Item,{label:"图片地址",required:!0,children:(0,h.jsxs)("div",{className:"flex-container",children:[(0,h.jsx)(b.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,h.jsx)(j.Z,{style:A})}),(0,h.jsx)(Z,{onFileChange:function(e){var n=e.target.files[0];o.current=n,M(n,a)}})]})}),(0,h.jsx)(b.Z.Item,{label:"图片描述",name:"alt",children:(0,h.jsx)(j.Z,{style:{width:264}})}),(0,h.jsxs)(b.Z.Item,{style:{textAlign:"right"},children:[(0,h.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(k.ZP,{type:"default",onClick:t,children:"取消"})]})]}))};function Z(e){var n=e.onFileChange;return(0,h.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,h.jsx)("input",{type:"file",onChange:n})]})}function M(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 i=new window.XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",(function(t){n(JSON.parse(t.target.responseText),e)}),!1),i.addEventListener("error",(function(e){console.error(e)}),!1),i.open("POST","".concat(N.KI,"/api/attachments.json")),i.send(t)}var I=t(95237),q=t(74908),O=function(e){var n=e.callback,t=e.onCancel,i=document.createElement("canvas"),r=i.getContext("2d");i.width=1e3,i.height=800,r.fillStyle="#ffffff",r.fillRect(0,0,i.width,i.height);var o=i.toDataURL("image/png");return(0,h.jsx)(I.Z,{style:{height:"100vh"},children:(0,h.jsx)(q.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:o,visible:!0,title:String(Date.now())},onOk:function(e){n({src:e.url})},onClose:t})})},D=t(7557),R=t.n(D),G=t(41498),F=t.n(G),z=t(37205),H=t.n(z),W=t(12378);function U(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(U,go.CommandHandler),U.prototype.canAlignSelection=function(){var e=this.diagram;return null!==e&&!e.isReadOnly&&!e.isModelReadOnly&&!(e.selection.count<2)},U.prototype.alignLeft=function(){var e=this.diagram;e.startTransaction("aligning left");var n=1/0;e.selection.each((function(e){e instanceof go.Link||(n=Math.min(e.position.x,n))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(n,e.position.y))})),e.commitTransaction("aligning left")},U.prototype.alignRight=function(){var e=this.diagram;e.startTransaction("aligning right");var n=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var t=e.actualBounds.x+e.actualBounds.width;n=Math.max(t,n)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(n-e.actualBounds.width,e.position.y))})),e.commitTransaction("aligning right")},U.prototype.alignTop=function(){var e=this.diagram;e.startTransaction("alignTop");var n=1/0;e.selection.each((function(e){e instanceof go.Link||(n=Math.min(e.position.y,n))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.position.x,n))})),e.commitTransaction("alignTop")},U.prototype.alignBottom=function(){var e=this.diagram;e.startTransaction("aligning bottom");var n=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var t=e.actualBounds.y+e.actualBounds.height;n=Math.max(t,n)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,n-e.actualBounds.height))})),e.commitTransaction("aligning bottom")},U.prototype.alignCenterX=function(){var e=this.diagram,n=e.selection.first();if(n){e.startTransaction("aligning Center X");var t=n.actualBounds.x+n.actualBounds.width/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(t-e.actualBounds.width/2,e.actualBounds.y))})),e.commitTransaction("aligning Center X")}},U.prototype.alignCenterY=function(){var e=this.diagram,n=e.selection.first();if(n){e.startTransaction("aligning Center Y");var t=n.actualBounds.y+n.actualBounds.height/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,t-e.actualBounds.height/2))})),e.commitTransaction("aligning Center Y")}},U.prototype.alignColumn=function(e){var n=this.diagram;n.startTransaction("align Column"),void 0===e&&(e=0),e=parseFloat(e);var t=new Array;n.selection.each((function(e){e instanceof go.Link||t.push(e)}));for(var i=0;i<t.length-1;i++){var r=t[i],o=r.actualBounds.y+r.actualBounds.height+e;t[i+1].move(new go.Point(r.actualBounds.x,o))}n.commitTransaction("align Column")},U.prototype.alignRow=function(e){void 0===e&&(e=0),e=parseFloat(e);var n=this.diagram;n.startTransaction("align Row");var t=new Array;n.selection.each((function(e){e instanceof go.Link||t.push(e)}));for(var i=0;i<t.length-1;i++){var r=t[i],o=r.actualBounds.x+r.actualBounds.width+e;t[i+1].move(new go.Point(o,r.actualBounds.y))}n.commitTransaction("align Row")},U.prototype.canRotate=function(e){var n=this.diagram;return null!==n&&!n.isReadOnly&&!n.isModelReadOnly&&!(n.selection.count<1)},U.prototype.rotate=function(e){var n;void 0===e&&(e=90),(n=this.diagram).startTransaction("rotate "+e.toString()),(n=this.diagram).selection.each((function(n){n instanceof go.Link||n instanceof go.Group||(n.angle+=e)})),n.commitTransaction("rotate "+e.toString())},U.prototype.pullToFront=function(){var e=this.diagram;e.startTransaction("pullToFront");var n=new go.Map;e.selection.each((function(e){n.set(e.layer,0)})),n.iteratorKeys.each((function(e){var t=0;e.parts.each((function(e){if(!e.isSelected){var n=e.zOrder;isNaN(n)?e.zOrder=0:t=Math.max(t,n)}})),n.set(e,t)})),e.selection.each((function(e){U._assignZOrder(e,n.get(e.layer)+1)})),e.commitTransaction("pullToFront")},U.prototype.pushToBack=function(){var e=this.diagram;e.startTransaction("pushToBack");var n=new go.Map;e.selection.each((function(e){n.set(e.layer,0)})),n.iteratorKeys.each((function(e){var t=0;e.parts.each((function(e){if(!e.isSelected){var n=e.zOrder;isNaN(n)?e.zOrder=0:t=Math.min(t,n)}})),n.set(e,t)})),e.selection.each((function(e){U._assignZOrder(e,n.get(e.layer)-1-U._findGroupDepth(e))})),e.commitTransaction("pushToBack")},U._assignZOrder=function(e,n,t){void 0===t&&(t=e),e.layer===t.layer&&(e.zOrder=n),e instanceof go.Group&&e.memberParts.each((function(e){U._assignZOrder(e,n+1,t)}))},U._findGroupDepth=function(e){if(e instanceof go.Group){var n=0;return e.memberParts.each((function(e){n=Math.max(n,U._findGroupDepth(e))})),n+1}return 0},U.prototype.doKeyDown=function(){var e=this.diagram;if(null!==e){var n=e.lastInput;if("Up"===n.key||"Down"===n.key||"Left"===n.key||"Right"===n.key){var t=this.arrowKeyBehavior;if("none"===t)return;if("select"===t)return void this._arrowKeySelect();if("move"===t)return void this._arrowKeyMove();if("tree"===t)return void this._arrowKeyTree()}go.CommandHandler.prototype.doKeyDown.call(this)}},U.prototype._getAllParts=function(){var e=new Array;return this.diagram.nodes.each((function(n){e.push(n)})),this.diagram.parts.each((function(n){e.push(n)})),e},U.prototype._arrowKeyMove=function(){var e=this.diagram,n=e.lastInput,t=0,i=0;if(n.control||n.meta)t=1,i=1;else if(null!==e.grid){var r=e.grid.gridCellSize;i=r.width,t=r.height}e.startTransaction("arrowKeyMove"),e.selection.each((function(e){"Up"===n.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y-t)):"Down"===n.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y+t)):"Left"===n.key?e.move(new go.Point(e.actualBounds.x-i,e.actualBounds.y)):"Right"===n.key&&e.move(new go.Point(e.actualBounds.x+i,e.actualBounds.y))})),e.commitTransaction("arrowKeyMove")},U.prototype._arrowKeySelect=function(){var e=this.diagram,n=e.lastInput,t=null;"Up"===n.key?t=this._findNearestPartTowards(270):"Down"===n.key?t=this._findNearestPartTowards(90):"Left"===n.key?t=this._findNearestPartTowards(180):"Right"===n.key&&(t=this._findNearestPartTowards(0)),null!==t&&(n.shift?t.isSelected=!0:n.control||n.meta?t.isSelected=!t.isSelected:e.select(t))},U.prototype._findNearestPartTowards=function(e){var n=this.diagram.selection.first();if(null===n)return null;for(var t=n.actualBounds.center,i=this._getAllParts(),r=1/0,o=n,s=0;s<i.length;s++){var a=i[s];if(a!==n&&a.canSelect()){var l=a.actualBounds.center,c=t.directionPoint(l),u=this._angleCloseness(c,e);if(u<=45){var d=t.distanceSquaredPoint(l);(d*=1+Math.sin(u*Math.PI/180))<r&&(r=d,o=a)}}}return o},U.prototype._angleCloseness=function(e,n){return Math.min(Math.abs(n-e),Math.min(Math.abs(n+360-e),Math.abs(n-360-e)))},U.prototype._arrowKeyTree=function(){var e=this.diagram,n=e.selection.first();if(n instanceof go.Node){var t=e.lastInput;if("Right"===t.key)if(n.isTreeLeaf);else if(n.isTreeExpanded){null!==(r=this._sortTreeChildrenByY(n).first())&&e.select(r)}else e.commandHandler.canExpandTree(n)&&e.commandHandler.expandTree(n);else if("Left"===t.key){if(!n.isTreeLeaf&&n.isTreeExpanded)e.commandHandler.canCollapseTree(n)&&e.commandHandler.collapseTree(n);else null!==(o=n.findTreeParentNode())&&e.select(o)}else if("Up"===t.key){if(null!==(o=n.findTreeParentNode()))if((a=(s=this._sortTreeChildrenByY(o)).indexOf(n))>0){for(var i=s.elt(a-1);null!==i&&i.isTreeExpanded&&!i.isTreeLeaf;){i=this._sortTreeChildrenByY(i).last()}null!==i&&e.select(i)}else e.select(o)}else if("Down"===t.key){var r;if(n.isTreeExpanded&&!n.isTreeLeaf)null!==(r=this._sortTreeChildrenByY(n).first())&&e.select(r);else for(;null!==n;){var o,s,a;if(null===(o=n.findTreeParentNode()))break;if((a=(s=this._sortTreeChildrenByY(o)).indexOf(n))<s.length-1){e.select(s.elt(a+1));break}n=o}}var l=e.selection.first();null!==l&&e.scrollToRect(l.actualBounds)}},U.prototype._sortTreeChildrenByY=function(e){var n=(new go.List).addAll(e.findTreeChildrenNodes());return n.sort((function(e,n){var t=e.location,i=n.location;return t.y<i.y?-1:t.y>i.y?1:t.x<i.x?-1:t.x>i.x?1:0})),n},U.prototype.copyToClipboard=function(e){go.CommandHandler.prototype.copyToClipboard.call(this,e),this._lastPasteOffset.set(this.pasteOffset)},U.prototype.pasteFromClipboard=function(){var e=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(e,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),e},Object.defineProperty(U.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(e){if("move"!==e&&"select"!==e&&"scroll"!==e&&"tree"!==e&&"none"!==e)throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+e);this._arrowKeyBehavior=e}}),Object.defineProperty(U.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(e){if(!(e instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+e);this._pasteOffset.set(e)}});var V=U,Y=(t(31270),t(85160)),K=t(43418),J=t(43604),X=t(51136),Q="myPaletteDiv___Xjz2I",$="maxH60___Pd4Re";window.go=W;var ee=function(e){var n=e.onCancel,t=e.callback,i=(0,c.useRef)(),r=(0,c.useRef)(),o=(0,c.useRef)(),a=(0,c.useRef)(!1),l=(0,c.useRef)(!1),u=(0,c.useState)(0),d=s()(u,2),p=d[0],f=d[1],m=function(){var e=F()(R()().mark((function e(){var n,r;return R()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=i.current.makeImage(),e.next=3,(0,X.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:n.src}});case 3:r=e.sent,t({src:r.url});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,c.useEffect)((function(){f(p+1)}),[]),(0,h.jsx)("div",{ref:l,className:a.current?"".concat($," body-overflow-initial"):"body-overflow-initial",children:(0,h.jsx)(K.Z,{width:1200,icon:null,footer:null,closable:!0,visible:!!p,destroyOnClose:!0,maskClosable:!1,getContainer:l.current,rootClassName:"zIndex-9999",title:(0,h.jsxs)(I.Z,{children:[(0,h.jsx)(J.Z,{flex:1,children:"插入流程图"}),(0,h.jsx)(J.Z,{onClick:function(){a.current=!a.current,f(p+1)},children:(0,h.jsx)("span",{className:"current c-blue mr30",style:{fontWeight:400},children:"展开/收起"})})]}),onCancel:n,children:(0,h.jsxs)("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},children:[(0,h.jsxs)("div",{style:{display:"flex",height:"100%"},children:[(0,h.jsxs)("div",{style:{width:"300px",height:"100%"},children:[(0,h.jsx)("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"},children:"图形库"}),(0,h.jsx)("div",{style:{height:"calc(100% - 50px)"},className:Q,ref:o})]}),(0,h.jsxs)("div",{style:{flex:1,position:"relative"},children:[(0,h.jsx)(Y.FI,{initDiagram:function(){var e=W.GraphObject.make,n="#ff3333",t="#3358ff",s="#25ad23",a="#d533ff",l="#7d33ff",c="#ff6233",u="#ffffff",d="#000000",p="#fffcd5",f="#d5ebff",h="#f2dfe0",m="#a5d2fa",v="#cccccc",g="#b3e6b3",x="#fcbbbd";function w(n,t){var i=function(e,t){e.handled=!0,e.diagram.model.commit((function(i){var r=t.part.adornedPart,o=(new W.Point).setRectSpot(r.actualBounds,n);o.subtract(r.location),o.scale(2,2),o.x+=130*Math.sign(o.x),o.y+=130*Math.sign(o.y),o.add(r.location),o.snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize);var s=i.copyNodeData(r.data);i.setGroupKeyForNodeData(s,i.getGroupKeyForNodeData(r.data)),i.addNodeData(s);var a={from:r.key,to:i.getKeyForNodeData(s)};i.addLinkData(a);var l=e.diagram.findNodeForData(s);l.location=o,e.diagram.select(l),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)}))};return e(W.Shape,{figure:t,alignment:n,alignmentFocus:n.opposite(),width:n.equals(W.Spot.Top)||n.equals(W.Spot.Bottom)?25:18,height:n.equals(W.Spot.Top)||n.equals(W.Spot.Bottom)?18:25,fill:"orange",stroke:u,strokeWidth:4,mouseEnter:function(e,n){return n.fill="dodgerblue"},mouseLeave:function(e,n){return n.fill="orange"},isActionable:!0,click:i,contextClick:i})}function _(n){return e(W.Shape,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:function(e,n){return n.fill="dodgerblue"},mouseLeave:function(e,n){return n.fill="orange"},click:function(e,n){e.diagram.commandHandler.showContextMenu(n.part.adornedPart)}},n||{})}function y(e,n){return function(t,i){t.handled=!0,t.diagram.model.commit((function(t){t.set(i.part.adornedPart.data,e,n)}))}}function b(n,t){return t||(t="color"),e(W.Shape,{width:16,height:16,stroke:"lightgray",fill:n,margin:1,background:"transparent",mouseEnter:function(e,n){return n.stroke="dodgerblue"},mouseLeave:function(e,n){return n.stroke="lightgray"},click:y(t,n),contextClick:y(t,n)})}function j(){return[e("ContextMenuButton",e(W.Panel,"Horizontal",b(u,"fill"),b(p,"fill"),b(f,"fill"),b(h,"fill"))),e("ContextMenuButton",e(W.Panel,"Horizontal",b(v,"fill"),b(g,"fill"),b(m,"fill"),b(x,"fill")))]}function k(){return[e("ContextMenuButton",e(W.Panel,"Horizontal",b(d),b(s),b(t),b(n))),e("ContextMenuButton",e(W.Panel,"Horizontal",b(u),b(a),b(l),b(c)))]}function S(n,t){return t||(t="thickness"),e(W.Shape,"LineH",{width:16,height:16,strokeWidth:n,margin:1,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:y(t,n),contextClick:y(t,n)})}function C(n,t){return t||(t="dash"),e(W.Shape,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:n,margin:1,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:y(t,n),contextClick:y(t,n)})}function B(){return[e("ContextMenuButton",e(W.Panel,"Horizontal",S(1),S(2),S(3),S(4))),e("ContextMenuButton",e(W.Panel,"Horizontal",C(null),C([2,4]),C([4,4])))]}function T(n,t){return t||(t="figure"),e(W.Shape,{width:32,height:32,scale:.5,fill:"lightgray",figure:n,margin:1,background:"transparent",mouseEnter:function(e,n){return n.fill="dodgerblue"},mouseLeave:function(e,n){return n.fill="lightgray"},click:y(t,n),contextClick:y(t,n)})}function N(n){return e(W.Shape,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(n+4).toString()+" H3"})}function E(n){var t="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return 0===n?t="M0 0 M16 16 M0 8 L16 8":2===n&&(t="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),e(W.Shape,{geometryString:t,margin:2,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:y("dir",n),contextClick:y("dir",n)})}function A(n){var t=function(e,t){e.handled=!0,e.diagram.model.commit((function(e){var i=t.part.adornedPart;e.set(i.data,n?"toSpot":"fromSpot",W.Spot.stringify(W.Spot.AllSides)),(n?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return e(W.Shape,{width:12,height:12,fill:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:t,contextClick:t})}function P(n,t){var i=0,r=W.Spot.RightSide;n.equals(W.Spot.Top)?(i=270,r=W.Spot.TopSide):n.equals(W.Spot.Left)?(i=180,r=W.Spot.LeftSide):n.equals(W.Spot.Bottom)&&(i=90,r=W.Spot.BottomSide),t||(i-=180);var o=function(e,n){e.handled=!0,e.diagram.model.commit((function(e){var i=n.part.adornedPart;e.set(i.data,t?"toSpot":"fromSpot",W.Spot.stringify(r)),(t?i.toNode:i.fromNode).invalidateConnectedLinks()}))};return e(W.Shape,{alignment:n,alignmentFocus:n.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:i,background:"transparent",mouseEnter:function(e,n){return n.background="dodgerblue"},mouseLeave:function(e,n){return n.background="transparent"},click:o,contextClick:o})}return i.current=new W.Diagram(r.current,{padding:20,grid:e(W.Panel,"Grid",e(W.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(W.Shape,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:function(e){e.diagram.commandHandler.addTopLevelParts(e.diagram.selection,!0)||e.diagram.currentTool.doCancel()},commandHandler:e(V),"clickCreatingTool.archetypeNodeData":{text:"未命名",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:function(e){var n=e.subject;n.location=n.location.copy().snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:function(e){e.subject;setTimeout((function(){e.diagram.commandHandler.editTextBlock()}))},LinkRelinked:function(e){e.parameter.part.invalidateConnectedLinks();var n=e.subject;e.diagram.toolManager.linkingTool.isForwards?n.toNode.invalidateConnectedLinks():n.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),i.current.nodeTemplate=e(W.Node,"Auto",{locationSpot:W.Spot.Center,locationObjectName:"SHAPE",desiredSize:new W.Size(120,60),minSize:new W.Size(40,40),resizable:!0,resizeCellSize:new W.Size(10,10),rotatable:!0},new W.Binding("location","loc",W.Point.parse).makeTwoWay(W.Point.stringify),new W.Binding("desiredSize","size",W.Size.parse).makeTwoWay(W.Size.stringify),e(W.Shape,{name:"SHAPE",fill:u,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:W.Spot.AllSides,toSpot:W.Spot.AllSides},new W.Binding("figure"),new W.Binding("fill"),new W.Binding("stroke","borderColor"),new W.Binding("strokeWidth","thickness"),new W.Binding("strokeDashArray","dash")),e(W.Shape,{width:100,height:20,strokeWidth:0,fill:"transparent"}),e(W.TextBlock,{margin:1,textAlign:"center",overflow:W.TextBlock.OverflowEllipsis,editable:!0},new W.Binding("text").makeTwoWay(),new W.Binding("stroke","color"))),i.current.nodeTemplate.toolTip=e("ToolTip",e(W.Panel,"Vertical",{maxSize:new W.Size(200,NaN)},e(W.TextBlock,{font:"bold 10pt sans-serif",textAlign:"center"},new W.Binding("text")),e(W.TextBlock,{font:"10pt sans-serif",textAlign:"center"},new W.Binding("text","details")))),i.current.nodeTemplate.selectionAdornmentTemplate=e(W.Adornment,"Spot",e(W.Placeholder,{padding:10}),w(W.Spot.Top,"TriangleUp"),w(W.Spot.Left,"TriangleLeft"),w(W.Spot.Right,"TriangleRight"),w(W.Spot.Bottom,"TriangleDown"),_({alignment:new W.Spot(.75,0)})),i.current.nodeTemplate.contextMenu=e("ContextMenu",e("ContextMenuButton",e(W.Panel,"Horizontal",T("Rectangle"),T("RoundedRectangle"),T("Ellipse"),T("Diamond"))),e("ContextMenuButton",e(W.Panel,"Horizontal",T("Parallelogram2"),T("ManualOperation"),T("Procedure"),T("Cylinder1"))),e("ContextMenuButton",e(W.Panel,"Horizontal",T("Terminator"),T("CreateRequest"),T("Document"),T("TriangleDown"))),j(),k(),B()),i.current.groupTemplate=e(W.Group,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:W.Spot.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:function(e,n){n.addMembers(n.diagram.selection,!0)||n.diagram.currentTool.doCancel()},avoidable:!1},new W.Binding("location","loc",W.Point.parse).makeTwoWay(W.Point.stringify),e(W.Panel,"Auto",{name:"BODY"},e(W.Shape,{parameter1:10,fill:u,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:W.Spot.AllSides,toSpot:W.Spot.AllSides},new W.Binding("fill"),new W.Binding("stroke","color"),new W.Binding("strokeWidth","thickness"),new W.Binding("strokeDashArray","dash")),e(W.Placeholder,{background:"transparent",margin:20})),e(W.TextBlock,{alignment:W.Spot.Top,alignmentFocus:W.Spot.Bottom,font:"bold 12pt sans-serif",editable:!0},new W.Binding("text"),new W.Binding("stroke","color"))),i.current.groupTemplate.selectionAdornmentTemplate=e(W.Adornment,"Spot",e(W.Panel,"Auto",e(W.Shape,{fill:null,stroke:"dodgerblue",strokeWidth:3}),e(W.Placeholder,{margin:1.5})),_({alignment:W.Spot.TopRight,alignmentFocus:W.Spot.BottomRight})),i.current.groupTemplate.contextMenu=e("ContextMenu",j(),k(),B()),i.current.linkTemplate=e(W.Link,{layerName:"Foreground",routing:W.Link.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new W.Binding("fromSpot","fromSpot",W.Spot.parse),new W.Binding("toSpot","toSpot",W.Spot.parse),new W.Binding("fromShortLength","dir",(function(e){return e>=1?10:0})),new W.Binding("toShortLength","dir",(function(e){return e>=1?10:0})),new W.Binding("points").makeTwoWay(),e(W.Shape,{strokeWidth:2},new W.Binding("stroke","color"),new W.Binding("strokeWidth","thickness"),new W.Binding("strokeDashArray","dash")),e(W.Shape,{segmentIndex:0,segmentOffset:new W.Point(15,0),segmentOrientation:W.Link.OrientAlong,alignmentFocus:W.Spot.Right,figure:"circle",width:10,strokeWidth:0},new W.Binding("fill","color"),new W.Binding("visible","dir",(function(e){return 1===e}))),e(W.Shape,{segmentIndex:-1,segmentOffset:new W.Point(-10,6),segmentOrientation:W.Link.OrientPlus90,alignmentFocus:W.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new W.Binding("fill","color"),new W.Binding("visible","dir",(function(e){return e>=1})),new W.Binding("width","thickness",(function(e){return 7+3*e})),new W.Binding("height","thickness",(function(e){return 7+3*e})),new W.Binding("segmentOffset","thickness",(function(e){return new W.Point(-15,4+1.5*e)}))),e(W.Shape,{segmentIndex:0,segmentOffset:new W.Point(15,-6),segmentOrientation:W.Link.OrientMinus90,alignmentFocus:W.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new W.Binding("fill","color"),new W.Binding("visible","dir",(function(e){return 2===e})),new W.Binding("width","thickness",(function(e){return 7+3*e})),new W.Binding("height","thickness",(function(e){return 7+3*e})),new W.Binding("segmentOffset","thickness",(function(e){return new W.Point(-15,4+1.5*e)}))),e(W.TextBlock,{alignmentFocus:new W.Spot(0,1,-4,0),editable:!0},new W.Binding("text").makeTwoWay(),new W.Binding("stroke","color"))),i.current.linkTemplate.selectionAdornmentTemplate=e(W.Adornment,e(W.Shape,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:N(2)},new W.Binding("pathPattern","thickness",N)),_({alignmentFocus:new W.Spot(0,0,-6,-4)})),i.current.linkTemplate.contextMenu=e("ContextMenu",k(),B(),e("ContextMenuButton",e(W.Panel,"Horizontal",E(0),E(1),E(2))),e("ContextMenuButton",e(W.Panel,"Horizontal",e(W.Panel,"Spot",A(!1),P(W.Spot.Top,!1),P(W.Spot.Left,!1),P(W.Spot.Right,!1),P(W.Spot.Bottom,!1)),e(W.Panel,"Spot",{margin:new W.Margin(0,0,0,2)},A(!0),P(W.Spot.Top,!0),P(W.Spot.Left,!0),P(W.Spot.Right,!0),P(W.Spot.Bottom,!0))))),new W.Palette(o.current,{maxSelectionCount:1,linkTemplate:e(W.Link,{locationSpot:W.Spot.Center,selectionAdornmentTemplate:e(W.Adornment,"Link",{locationSpot:W.Spot.Center},e(W.Shape,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),e(W.Shape,{toArrow:"Standard",stroke:null}))},{routing:W.Link.AvoidsNodes,curve:W.Link.JumpOver,corner:5,toShortLength:4},new W.Binding("points"),e(W.Shape,{isPanelMain:!0,strokeWidth:2}),e(W.Shape,{toArrow:"Standard",stroke:null})),model:new W.GraphLinksModel([{text:"未命名",size:"100 100",fill:null,stroke:"#000"}].concat(H()(W.Shape.getFigureGenerators().toArray().map((function(e){return{text:"未命名",size:"100 100",figure:e.key,fill:"white",stroke:"#666",borderColor:"#000"}})))))}).nodeTemplate=e(W.Node,"Auto",{locationSpot:W.Spot.Center},new W.Binding("location","location",W.Point.parse).makeTwoWay(W.Point.stringify),e(W.Shape,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new W.Binding("stroke").makeTwoWay(),new W.Binding("fill").makeTwoWay(),new W.Binding("figure")),e(W.TextBlock,{margin:new W.Margin(5,5,3,5),font:"10pt sans-serif",minSize:new W.Size(16,16),maxSize:new W.Size(10,NaN),textAlign:"center",editable:!0},new W.Binding("key").makeTwoWay())),setTimeout((function(){i.current.grid=e(W.Panel,"Grid",e(W.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(W.Shape,"LineV",{stroke:"lightgray",strokeWidth:.5})),i.current.grid.visible=!0,i.current.grid.gridCellStroke="darkgray",i.current.grid.gridCellStrokeWidth=1}),300),window.myDiagrams=i.current,i.current},divClassName:"diagram-component",style:{height:"80vh"}}),(0,h.jsx)("div",{ref:r})]})]}),(0,h.jsx)("div",{className:"tr",children:(0,h.jsx)(k.ZP,{size:"large",onClick:m,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary",children:"保存到编辑器"})})]})})})},ne=t(5112),te=t(54449),ie=ne.ZP.Group,re={margin:"0 8px"},oe=function(e){var n=e.callback,t=e.onCancel;return(0,h.jsxs)(b.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){n(e)},children:[(0,h.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,h.jsx)("span",{style:re,children:"单元格数:"}),(0,h.jsx)("span",{style:re,children:"行数"}),(0,h.jsx)(b.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,h.jsx)(te.Z,{})}),(0,h.jsx)("span",{style:re,children:"列数"}),(0,h.jsx)(b.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,h.jsx)(te.Z,{})})]}),(0,h.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,h.jsx)("span",{style:re,children:"对齐方式:"}),(0,h.jsx)(b.Z.Item,{name:"align",children:(0,h.jsxs)(ie,{children:[(0,h.jsx)(ne.ZP,{value:"default",children:(0,h.jsx)("i",{className:"fa fa-align-justify"})}),(0,h.jsx)(ne.ZP,{value:"left",children:(0,h.jsx)("i",{className:"fa fa-align-left"})}),(0,h.jsx)(ne.ZP,{value:"center",children:(0,h.jsx)("i",{className:"fa fa-align-center"})}),(0,h.jsx)(ne.ZP,{value:"right",children:(0,h.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,h.jsxs)("div",{className:"flex-container flex-end",children:[(0,h.jsx)(k.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,h.jsx)(k.ZP,{type:"ghost",onClick:t,children:"取消"})]})]})},se=t(78673),ae=t(66455),le=t.n(ae),ce=(0,c.forwardRef)((function(e,n){var t=e.use3d,i=e.width,r=e.height,o=e.callback,a=(e.showSaveButton,(0,c.useRef)()),l=(0,c.useRef)(),u=(0,c.useState)(!1),d=s()(u,2),p=d[0],f=d[1],m=(0,c.useRef)({id:a,appName:"graphing",width:i||1e3,height:r||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,c.useEffect)((function(){l.current=new(le())(m.current,!0),window.onload=function(){l.current.inject("applet_container")}}),[]);var v=function(){var e=window.ggbApplet.getPNGBase64(1,!0,72);return o&&o(e),e};return(0,c.useEffect)((function(){m.current.appName=p?"3D":"graphing",l.current.inject("applet_container")}),[p]),(0,c.useEffect)((function(){f(t)}),[t]),(0,c.useImperativeHandle)(n,(function(){return{getImgData:v}})),(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:a}),(0,h.jsxs)(I.Z,{align:"middle",children:[(0,h.jsx)(J.Z,{flex:1,children:(0,h.jsx)(se.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:p,onChange:function(e){return f(e)}})}),(0,h.jsx)(J.Z,{children:(0,h.jsx)(k.ZP,{size:"large",onClick:v,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),ue=t(33773),de=t(27065),pe="link",fe="upload-image",he="add-flowchart",me="draw-image",ve="code-block",ge="add-table",xe="------------",we={default:xe,left:":".concat(xe),center:":".concat(xe,":"),right:"".concat(xe,":")},_e=t(56266);var ye="@▁▁@",be=["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"];function je(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ke=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",Se=l()(l()({},ke+"-B","bold"),ke+"-I","italic"),Ce=l()(l()(l()(l()(l()(l()(l()(l()({},pe,"添加链接"),ve,"添加代码块"),fe,"添加图片"),me,"添加画图"),he,"插入流程图"),ge,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),Be=function(e){var n=e.defaultValue,t=void 0===n?"":n,i=e.onChange,o=e.width,a=void 0===o?"100%":o,u=e.height,v=void 0===u?400:u,g=e.miniToolbar,x=void 0!==g&&g,w=e.isFocus,b=void 0!==w&&w,j=e.watch,k=e.insertTemp,S=e.mode,N=void 0===S?"markdown":S,E=e.id,A=void 0===E?"markdown-editor-id":E,P=e.showResizeBar,Z=void 0!==P&&P,I=e.noStorage,q=void 0!==I&&I,D=e.showNullButton,R=void 0!==D&&D,G=e.showNullProgramButton,F=void 0!==G&&G,z=e.hidetoolBar,H=void 0!==z&&z,W=e.fullScreen,U=void 0!==W&&W,V=e.onBlur,Y=e.onCMBeforeChange,J=e.onFullScreen,X=e.className,Q=void 0===X?"":X,$=e.disablePaste,ne=void 0!==$&&$,te=e.disabled,ie=void 0!==te&&te,re=e.disabledFill,se=void 0!==re&&re,ae=e.placeholder,le=void 0===ae?"":ae,xe=e.values,ke=void 0===xe?"":xe,Be=e.extraUse,Te=(0,c.useState)(null),Ne=s()(Te,2),Ee=Ne[0],Ae=Ne[1],Pe=(0,c.useState)(t),Le=s()(Pe,2),Ze=Le[0],Me=Le[1],Ie=(0,c.useState)(j),qe=s()(Ie,2),Oe=qe[0],De=qe[1],Re=(0,c.useState)(U),Ge=s()(Re,2),Fe=Ge[0],ze=Ge[1],He=(0,c.useState)(""),We=s()(He,2),Ue=We[0],Ve=We[1],Ye=(0,c.useState)(0),Ke=s()(Ye,2),Je=Ke[0],Xe=Ke[1],Qe=(0,c.useState)(v),$e=s()(Qe,2),en=$e[0],nn=$e[1],tn=(0,c.useState)(!1),rn=s()(tn,2),on=(rn[0],rn[1]),sn=(0,c.useState)(0),an=s()(sn,2),ln=an[0],cn=an[1],un=(0,c.useState)(0),dn=s()(un,2),pn=dn[0],fn=dn[1],hn=(0,c.useRef)(),mn=(0,c.useRef)(),vn=(0,c.useRef)(),gn=(0,c.useRef)();(0,c.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Me(ke),null==Ee||Ee.setValue(ke),window.scrollTo(0,e)}),[ke]),(0,c.useEffect)((function(){null==J||J(Fe)}),[Fe]),(0,c.useEffect)((function(){if(hn.current){var e=function(e,t){if(!ne){var i=t.clipboardData;if(i){var r=i.types.toString(),o=i.items;if("Files"===r||i.types.indexOf("Files")>-1){if(t.preventDefault(),"stex"==N)return;try{var s,a=o[1];"file"===(null===(s=o[0])||void 0===s?void 0:s.kind)&&(a=o[0]);var l=a.getAsFile(),c=l.name.split(".").pop();M(l,(function(e){var t,i,r;e.id?(null==l||null===(t=l.type)||void 0===t?void 0:t.indexOf("image"))>-1?n.replaceSelection(".concat(e.content_type,")")):(null==l||null===(i=l.type)||void 0===i?void 0:i.indexOf("video"))>-1?n.replaceSelection('<video width="100%" controls src="'.concat(de.Z.API_SERVER,"/api/attachments/").concat(e.id,'"></video>')):(null==l||null===(r=l.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?n.replaceSelection('<a href="'.concat(de.Z.API_SERVER,"/api/attachments/").concat(e.id,"?type=").concat(l.type,'&disposition=inline" target="_blank">').concat(l.name,"</a>")):be.includes(c)?n.replaceSelection('<a href="'.concat(de.Z.API_SERVER,"/api/attachments/").concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(l.name,"</a>")):n.replaceSelection("[".concat(l.name,"](").concat(de.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){T.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}t.preventDefault()},n=d().fromTextArea(hn.current,{mode:N,lineNumbers:!x,lineWrapping:!0,value:t,autoCloseTags:!0,autoCloseBrackets:!0});return n.on("keyup",(function(e,t){8===t.keyCode&&(""==e.getValue()?n.setOption("placeholder",le):n.setOption("placeholder",null))})),n.on("keydown",(function(e,n){if(8===n.keyCode){var t=function(e,n){var t=e.getDoc(),i=t.getCursor(),r=t.getLine(i.line),o=r.charAt(i.ch-1),s=r.lastIndexOf("@▁@",i.ch),a=r.lastIndexOf("@▁▁@",i.ch),l=s>a?s:a,c=s>a?3:4;if(-1===ye.indexOf(o))return null;if(console.log("change1:",n,e,r,i,l,s,a,o),l>=0&&i.ch-l<5){var u=l+c;return t.replaceRange("",{line:i.line,ch:l},{line:i.line,ch:u}),{line:i.line,ch:u}}return null}(e);t&&n.preventDefault()}})),b&&n.focus(),n.on("paste",e),ie&&n.on("beforeChange",(function(e,n){"paste"!==n.origin&&"+input"!==n.origin||n.cancel()})),Ae(n),function(){n.off("paste",e)}}}),[]);var xn=(0,c.useCallback)((function(){mn.current}),[en,mn,Fe]);(0,c.useEffect)((function(){if(Ee){var e=function(){var e=new p.Z((function(e){var n,t=r()(e);try{for(t.s();!(n=t.n()).done;){var i=n.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(xn(),Ee.setSize("100%","100%"),Ee.refresh())}}catch(e){t.e(e)}finally{t.f()}}));return e.observe(hn.current.parentElement),e}();return function(){var n,t;null!==(n=hn.current)&&void 0!==n&&n.parentElement&&e.unobserve(null===(t=hn.current)||void 0===t?void 0:t.parentElement)}}}),[Ee,xn]),(0,c.useEffect)((function(){if(Ee){for(var e=[],n=function(){var n=s()(i[t],2),r=n[0],o=n[1],a=l()({},r,(function(){wn(o)}));e.push(a),Ee.addKeyMap(a)},t=0,i=Object.entries(Se);t<i.length;t++)n();return function(){for(var n=0,t=e;n<t.length;n++){var i=t[n];Ee.removeKeyMap(i)}}}}),[Ee]),(0,c.useEffect)((function(){U!==Fe&&ze(U)}),[U]),(0,_e.Z)((function(){if(!q&&Je>0){var e=(new Date).getTime(),n=window.sessionStorage.getItem(A);e>=Je+1e4&&(!n||n!==Ze)&&(window.sessionStorage.setItem(A,Ze),on(!0))}}),1e4),(0,c.useEffect)((function(){De(j)}),[Ee,j]),(0,c.useEffect)((function(){Ee&&b&&Ee.focus()}),[Ee,b]),(0,c.useEffect)((function(){if(Oe&&Ee){var e=function(e){var n=e.target;if(gn.current){var t=n.scrollTop/n.scrollHeight;gn.current.scrollTop=gn.current.scrollHeight*t}},n=Ee.getScrollerElement();return n.addEventListener("scroll",e),function(){n.removeEventListener("scroll",e)}}}),[Ee,Oe]),(0,c.useEffect)((function(){if(Ee&&Y){var e=function(e,n){Y(e,n)};return Ee.on("beforeChange",e),function(){Ee.off("beforeChange",e)}}}),[Ee,Y]),(0,c.useEffect)((function(){if(Ee&&V){var e=function(){V(Ee.getValue())};return Ee.on("blur",e),function(){Ee.off("blur",e)}}}),[Ee,V]),(0,c.useEffect)((function(){if(Ee){var e=function(e,n){var t=e.getValue();Me(t),Xe((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(F?i(t,kn(t)):i(t))};return Ee.on("change",e),function(){Ee.off("change",e)}}}),[Ee,i]),(0,c.useEffect)((function(){if(Ee)if(null==t)Ee.setValue(""),Me("");else{var e=window.scrollY||window.pageYOffset;t!==Ee.getValue()&&(Ee.setValue(t),Me(t),Ee.setCursor(ie?1:Ee.lineCount(),0),window.scrollTo(0,e))}}),[Ee,t]);var wn=(0,c.useCallback)((function(e){var n=Ee.getCursor(),t=Ee.getSelection(),i=t.split("\n");switch(e){case"bold":return Ee.replaceSelection("**"+t+"**"),""===t&&Ee.setCursor(n.line,n.ch+2),Ee.focus();case"italic":return Ee.replaceSelection("*"+t+"*"),""===t&&Ee.setCursor(n.line,n.ch+1),Ee.focus();case"code":return Ee.replaceSelection("`"+t+"`"),""===t&&Ee.setCursor(n.line,n.ch+1),Ee.focus();case"inline-latex":return Ve("inline-latex"),Ee.focus();case"latex":return Ee.replaceSelection("```latex\n"+t+"\n```"),Ee.setCursor(n.line+1,t.length+1),Ee.focus();case"line-break":return Ee.replaceSelection("<br/>\n"),Ee.focus();case"list-ul":return""===t?Ee.replaceSelection("- "+t):Ee.replaceSelection(i.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Ee.focus();case"list-ol":return""===t?Ee.replaceSelection("1. "+t):Ee.replaceSelection(i.map((function(e,n){return""===e?"":"".concat(n+1,". ").concat(e)})).join("\n")),Ee.focus();case"add-null-ch":return""===t&&Ee.setCursor(n.line,n.ch),Ee.replaceSelection("▁"),Ee.focus();case"add-signal":return""===t&&Ee.setCursor(n.line,n.ch),Ee.replaceSelection("@▁@"),Ee.focus();case"add-multiple":return""===t&&Ee.setCursor(n.line,n.ch),Ee.replaceSelection(ye),Ee.focus();case"inster-template-1":return""===t&&Ee.setCursor(n.line,n.ch),Ee.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),Ee.focus();case"eraser":return Ee.setValue(""),Ee.focus();case"trigger-watch":return De(!Oe),Ee.focus();case"trigger-full-screen":return ze(!Fe),Ee.focus();case pe:return void Ve(pe);case ve:return void Ve(ve);case fe:return void Ve(fe);case me:return void Ve(me);case"maths-latex":return void Ve("maths-latex");case he:return void Ve(he);case ge:return void Ve(ge);default:throw new Error}}),[Ee,Oe,Fe]),_n=(0,c.useCallback)((function(e,n){var t,i,r,o,s;switch(Ve(""),Ue){case pe:var a=e.title,l=e.link;return Ee.replaceSelection("[".concat(a,"](").concat(l,")")),Ee.focus();case ve:var c=e.language,u=e.content;return Ee.replaceSelection(["```"+c,u,"```"].join("\n")),Ee.focus();case"maths-latex":for(var d=atob(e),p=new Uint8Array(d.length),f=0;f<d.length;f++)p[f]=d.charCodeAt(f);M(new Blob([p],{type:"image/png"}),(function(e){e.id?Ee.replaceSelection(".concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}));break;case"inline-latex":Ee.replaceSelection("`$$"+e+"$$`");break;case fe:case me:case"add-flowchart":var h=e.src,m=e.alt,v=n,g=null==v||null===(t=v.name)||void 0===t||null===(t=t.split("."))||void 0===t||null===(i=t.pop)||void 0===i?void 0:i.call(t);return(null==v||null===(r=v.type)||void 0===r?void 0:r.indexOf("image"))>-1||null==v||!v.type?m?Ee.replaceSelection(".concat(h,' "').concat(m,'" )')):Ee.replaceSelection("")):(null==v||null===(o=v.type)||void 0===o?void 0:o.indexOf("video"))>-1?Ee.replaceSelection('<video width="100%" controls src="'.concat(de.Z.API_SERVER).concat(h,'"></video>')):(null==v||null===(s=v.type)||void 0===s?void 0:s.indexOf("pdf"))>-1?Ee.replaceSelection('<a href="'.concat(de.Z.API_SERVER).concat(h,"?type=").concat(v.type,'&disposition=inline" target="_blank">').concat(v.name,"</a>")):be.includes(g)?Ee.replaceSelection('<a href="'.concat(de.Z.API_SERVER).concat(h,'?type=office&disposition=inline" target="_blank">').concat(v.name,"</a>")):Ee.replaceSelection("[".concat(v.name,"](").concat(de.Z.API_SERVER).concat(h,")")),Ee.focus();case ge:for(var x=e.row,w=e.col,_=e.align,y="\n",b=0;b<x;b++){for(var j=[],k=[],S=0;S<w;S++)1===b&&k.push(we[_]),j.push(" ");1===b&&(y+="| ".concat(k.join(" | ")," |\n")),y+="| ".concat(j.join(1===w?"":" | ")," |\n")}return Ee.replaceSelection(y+"\n"),Ee.focus();default:throw new Error}}),[Ee,Ue]),yn=(0,c.useMemo)((function(){switch(Ue){case pe:return(0,h.jsx)(C,{callback:_n,onCancel:bn});case ve:return(0,h.jsx)(B.Z,{callback:_n,onCancel:bn});case fe:return(0,h.jsx)(L,{callback:_n,onCancel:bn});case he:return(0,h.jsx)(ee,{callback:_n,onCancel:bn});case ge:return(0,h.jsx)(oe,{callback:_n,onCancel:bn});case"maths-latex":return(0,h.jsx)(ce,{showSaveButton:!0,callback:_n});case"inline-latex":return(0,h.jsx)(ue.Z,{showSaveButton:!0,callback:_n});default:return null}}),[Ue]);function bn(){Ve("")}(0,c.useEffect)((function(){if(vn.current){var e=function(e){r=!0,o=e.pageY},n=function(){r=!1},t=function(e){if(r){var n=e.pageY-o;n<0&&(n=0),n>300&&(n=300),nn(v+n+"px")}},i=vn.current,r=!1,o=0;return i.addEventListener("mousedown",e),document.addEventListener("mousemove",t),document.addEventListener("mouseup",n),function(){i.removeEventListener("mousedown",e),document.removeEventListener("mousemove",t),document.removeEventListener("mouseup",n)}}}),[Ee,vn]),(0,c.useEffect)((function(){nn(v)}),[v]);var jn={width:je(a),height:je(en)},kn=((0,c.useMemo)((function(){if(Je){var e=new Date(Je),n=e.getHours(),t=e.getMinutes(),i=e.getSeconds();return t=t<10?"0"+t:t,i=i<10?"0"+i:i,"".concat(n=n<10?"0"+n:n,":").concat(t,":").concat(i)}return 0}),[Je]),function(e){var n=[];if(F){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,t,i){n.push({multiLine:!("@▁@"===e)})}))}return n});(0,c.useEffect)((function(){if(Ce[Ue]&&Ue!==me&&Ue!==he){var e=document.getElementsByClassName("ant-modal")[0],n=window.innerWidth/2-e.offsetWidth/2,t=window.innerHeight/2-e.offsetHeight/2;cn(n),fn(t)}}),[Ue]);var Sn=function(e,n,t,i){var r=document.body.clientHeight,o=document.body.clientWidth;return!(e<20&&t>e||e>o-20&&t<e||n<20&&i>n||n>r-20&&i<n)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};return(0,h.jsxs)(c.Fragment,{children:[(0,h.jsx)("div",{className:"markdown-editor-wrapper",ref:mn,children:(0,h.jsxs)("div",{className:"markdown-editor-container ".concat(Q," ").concat(Oe?"on-preview":""," ").concat(x?"mini":""," ").concat(Fe?"full-screen":""),style:jn,children:[(0,h.jsx)(_,{insertTemp:k,watch:Oe,fullScreen:Fe,showNullButton:R,showNullProgramButton:F,onActionCallback:wn,hidetoolBar:H,extraUse:Be}),(0,h.jsxs)("div",{className:"markdown-editor-body",children:[(0,h.jsx)("div",{className:"codemirror-container",children:(0,h.jsx)("textarea",{ref:hn,placeholder:le})}),Oe?(0,h.jsxs)("div",{ref:gn,className:"preview-container",children:["stex"===N&&(0,h.jsx)(m,{value:Ze}),"stex"!==N&&(0,h.jsx)(f.Z,{disabledFill:se,showProgramFill:F,value:Ze})]}):null]})]})}),Z?(0,h.jsx)("a",{ref:vn,className:"editor-resize"}):null,Ue===me&&(0,h.jsx)(O,{callback:_n,onCancel:bn}),Ue===he&&(0,h.jsx)(ee,{callback:_n,onCancel:bn}),(0,h.jsx)(y.Z,{children:Ce[Ue]&&Ue!==me&&Ue!==he?(0,h.jsx)(K.Z,{maskClosable:!1,centered:!0,style:{position:"absolute",left:ln,top:pn},title:(0,h.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var n=e.clientX-ln,t=e.clientY-pn;document.body.onmousemove=function(e){var i=e.clientX-n,r=e.clientY-t,o=document.getElementsByClassName("ant-modal")[0],s=window.innerWidth-o.offsetWidth,a=window.innerHeight-o.offsetHeight;i=Math.max(0,Math.min(i,s)),r=Math.max(0,Math.min(r,a)),Sn(e.clientX,e.clientY,n,t)&&(cn(i),fn(r))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:Ce[Ue]}),open:!0,onCancel:bn,footer:null,destroyOnClose:!0,width:Ue===he?"1200px":null,height:Ue===he?"80vh":null,className:"markdown-popup-form",children:yn}):null})]})}},52385:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return de}});var i=t(7557),r=t.n(i),o=t(82242),s=t.n(o),a=t(41498),l=t.n(a),c=t(79800),u=t.n(c),d=t(59301),p=t(7880),f=t(31797),h=t(98135),m=t(43418),v=t(8591),g=t(93948),x=t(5112),w=t(95237),_=t(43604),y=t(24905),b=t(6848),j=t(3113),k=t(71418),S=t(28396),C=t(38391),B=t(22122),T=t(99232),N=t.n(T),E={flex_box_center:"flex_box_center___MzHUI",flex_space_between:"flex_space_between___ZPKmx",flex_box_vertical_center:"flex_box_vertical_center___MNo4n",flex_box_center_end:"flex_box_center_end___stoyX",flex_box_column:"flex_box_column___HR6oq",baseMargin:"baseMargin___V_l7f",noWrap:"noWrap___ZcvYB",singleItem:"singleItem___vjYWR",questionIcons:"questionIcons___kiVRR",green:"green___PIOSW",orange:"orange___aGI_B",greenTip:"greenTip___bShpb",redTip:"redTip___wCm4Z",orangeTip:"orangeTip___HRBLJ",pollDesc:"pollDesc___SxQ7V",answered:"answered___e5zk4",unanswer:"unanswer___dEmC8",anchor:"anchor___xdS4e",answerFlag:"answerFlag____R2kw",flagActive:"flagActive___hkk6X",flagHalf:"flagHalf___ZgZyz",answerStudentFlag:"answerStudentFlag___RlIwt",answerStudentActive:"answerStudentActive___pQpEA",questionItem:"questionItem___Yg7y3",questionScore:"questionScore___hGLaV",itemFlag:"itemFlag___KI4Jb",answerWrap:"answerWrap___CETMI",answerSubjective:"answerSubjective____A1OC",otherInput:"otherInput___hanjt",randomFlag:"randomFlag___mId_V",answerTrue:"answerTrue___QzQ9o",answerFalse:"answerFalse____K4Me",answerHalf:"answerHalf___gnzWI",renderHtml:"renderHtml___dDhM4",simpleText:"simpleText___kJ0Kc",answerYes:"answerYes___btoYt",answerNo:"answerNo___aNG_f",answerInfo:"answerInfo___af0Ma",answerProgress:"answerProgress___h6he7",answerSheetWrap:"answerSheetWrap___qVk_a",answerSheetQuestionTitle:"answerSheetQuestionTitle___YqJ8X",answerSheet:"answerSheet___ojXFi",answerSheetItem:"answerSheetItem___coR9L",qindex:"qindex___Fx51y",active:"active___KmAlt",partialActive:"partialActive___UsoA4",selected:"selected___QBbv4",answerSheetBottom:"answerSheetBottom___Lh0Ny",countDown:"countDown___W4ClT",red:"red___RSej4",fold:"fold___pujAY",cardList:"cardList___Bd4OZ",iframe:"iframe___kQjBw",mainPart:"mainPart___aRRl1",tooltipWrap:"tooltipWrap___FJod3",leftPart:"leftPart___f5dDH",rightPart:"rightPart___M7fOP",questionPart:"questionPart___HlX7z",questionTypeTitle:"questionTypeTitle___RRn2_",questionTypeInfo:"questionTypeInfo___a3Iny",toIframeBtn:"toIframeBtn___PH9eF",bottom:"bottom___slps3",changeButton:"changeButton___YjNWr",prevBtn:"prevBtn___NeeAj",fixHeader:"fixHeader___Jjypd",title:"title___h5yRx",submitButton:"submitButton___ATddm",dottedLineWrapper:"dottedLineWrapper___RxpC7",leftHalfCircle:"leftHalfCircle___McsYA",dottedLine:"dottedLine___cwiMH",rightHalfCircle:"rightHalfCircle___sP0Ln"},A=t(6457),P=t(89918),L=t(3883),Z=t(83),M=t(85062),I=t(42783),q=t(11094),O=t(37712),D=function(e){var n,t,i,r,o,s=e.item,a=e.answerData,l=e.onBlur,c=void 0===l?function(){}:l,p=(0,d.useState)(),f=u()(p,2),m=f[0],v=f[1],g=(0,d.useState)(),x=u()(g,2),w=(x[0],x[1]),_=(0,d.useState)(),y=u()(_,2),b=y[0],j=y[1];return(0,d.useEffect)((function(){w(null==s?void 0:s.a_flag)}),[null==s?void 0:s.a_flag]),(0,O.jsxs)("div",{children:[1===(null==a||null===(n=a.exercise)||void 0===n?void 0:n.commit_status)?(0,O.jsxs)("div",{children:[(0,O.jsx)("p",{className:"mt10 mb10",children:"我的答案:"}),(0,O.jsx)("div",{className:E.simpleText,style:{marginBottom:20},children:(0,O.jsx)(I.Z,{value:null==s||null===(t=s.user_answer)||void 0===t?void 0:t[0]})})]}):(0,O.jsx)("div",{className:s.user_score&&(s.user_score===s.question_score?"c-green":"c-red"),children:b?(0,O.jsx)(q.Z,{height:450,isFocus:!0,defaultValue:null==s||null===(i=s.user_answer)||void 0===i?void 0:i[0],id:null==s?void 0:s.question_id,onChange:function(e){return v(e)},onBlur:function(){return c(m)}}):(0,O.jsx)("div",{onClick:function(){var e;!s.repeat_answer&&(null==s||null===(e=s.user_answer)||void 0===e?void 0:e.length)>0||j(!0)},children:(0,O.jsx)(h.Z,{disabled:!s.repeat_answer&&(null==s||null===(r=s.user_answer)||void 0===r?void 0:r.length)>0&&!s.israp,size:"middle",className:"current",style:{marginBottom:20},placeholder:"点击开始作答",readOnly:!0})})}),(null==s?void 0:s.standard_answer)&&(0,O.jsxs)("div",{children:[(0,O.jsx)("p",{className:"mt10 mb0",children:"参考答案:"}),(0,O.jsx)("div",{style:{border:"1px solid #eee",background:"#f5f5f5",borderRadius:4,padding:5},children:(0,O.jsx)(I.Z,{value:null==s||null===(o=s.standard_answer)||void 0===o?void 0:o[0]})})]})]})},R=t(79817),G=t(14491),F=t(94049),z={flex_box_center:"flex_box_center___NzoJU",flex_space_between:"flex_space_between___Hwix8",flex_box_vertical_center:"flex_box_vertical_center___IjC7Y",flex_box_center_end:"flex_box_center_end___HmCsd",flex_box_column:"flex_box_column___hOf25",shixunWrp:"shixunWrp___yZiPI",fill:"fill___gz7tU",index:"index___eoHnJ",success:"success___vcRmo",fail:"fail___u5yz8",fillInput:"fillInput___ras_5",shixunWrapper:"shixunWrapper___jNj55",score:"score___gt155",name:"name___BgNAP",programWrapper:"programWrapper___lMcxv",desc:"desc___ODeOH",content:"content___RoL0o"},H=function(e){var n,t,i,r,o=e.item,a=e.answerData,l=(0,d.useState)([]),c=u()(l,2),f=c[0],h=c[1],m=(0,d.useState)([]),v=u()(m,2),g=v[0],x=v[1];(0,d.useEffect)((function(){var e;if(null!=o&&null!==(e=o.shixun_details)&&void 0!==e&&e.length){for(var n=[],t=[],i=0;i<(null==o||null===(r=o.shixun_details)||void 0===r?void 0:r.length);i++){for(var r,a,l,c=0;c<(null==o?void 0:o.shixun_details[i].stage_list.length);c++){var u,d=null==o?void 0:o.shixun_details[i].stage_list[c];n.push(s()(s()({},d),{operation:null==o||null===(u=o.shixun_details)||void 0===u||null===(u=u[i])||void 0===u||null===(u=u.shixun_detail)||void 0===u||null===(u=u[0])||void 0===u?void 0:u.game_identifier}))}if(null!=o&&null!==(a=o.shixun_details)&&void 0!==a&&null!==(a=a[i])&&void 0!==a&&a.shixun_detail)t.push(null==o||null===(l=o.shixun_details)||void 0===l||null===(l=l[i])||void 0===l||null===(l=l.shixun_detail)||void 0===l?void 0:l[0])}x(t),h(n)}}),[null==o?void 0:o.shixun_details]);var y=[{title:"关卡",dataIndex:"position",key:"position",align:"center"},{title:"任务名称",dataIndex:"name",key:"name",align:"center",render:function(e){return(0,O.jsx)("span",{className:"overflowHidden1",style:{maxWidth:"400px"},title:e&&e.length>25?e:"",children:e})}},{title:"评测次数",dataIndex:"evaluate_count",key:"evaluate_count",align:"center",render:function(e,n){return(0,O.jsx)("span",{children:n.evaluate_count?n.evaluate_count:(0,O.jsx)("span",{className:"color-grey-9",children:"--"})})}},{title:"完成时间",key:"endTime",dataIndex:"endTime",align:"center",render:function(e,n){var t=!1;return n.finished_time&&null!=a&&a.exercise&&null!=a&&a.exercise_answer_user&&(t=-1===(null==a?void 0:a.exercise.time)?N()(null==a?void 0:a.exercise.end_time).isBefore(n.finished_time):N()(null==a?void 0:a.exercise_answer_user.start_at).add(null==a?void 0:a.exercise.time,"m").isBefore(n.finished_time)),(0,O.jsxs)("span",{children:[n.finished_time||(0,O.jsx)("span",{className:"c-grey-999",children:"--"}),(0,O.jsx)("span",{className:"c-orange-ff9 ",children:t?"(已超时)":""})]})}},{title:"耗时",dataIndex:"time_consuming",key:"time_consuming",align:"center",render:function(e,n){return(0,O.jsx)("span",{children:n.time_consuming||(0,O.jsx)("span",{className:"color-grey-9",children:"--"})})}},{title:"查看答案",dataIndex:"view_answer",key:"view_answer",align:"center",render:function(e,n){return(0,O.jsx)("span",{children:n.view_answer?"已查看":"未查看"})}},{title:"操作",dataIndex:"operation",key:"operation",align:"center",render:function(e,n,t){return e?(0,O.jsx)(R.Z,{affix:!1,className:"mt10",children:(0,O.jsx)(R.Z.Link,{href:"#challenge_".concat(null==o?void 0:o.question_id).concat(t),title:(0,O.jsx)("span",{style:{color:"#0152d9"},children:"查看"})})}):(0,O.jsx)("span",{className:"c-grey-999",children:"--"})}}],b={selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1};return(0,O.jsxs)("div",{className:z.shixunWrapper,children:[0===(null==a||null===(n=a.exercise)||void 0===n?void 0:n.commit_status)&&(0,O.jsx)("div",{children:o.shixun.map((function(e,n){return(0,O.jsxs)(w.Z,{className:"mb20",justify:"space-between",children:[(0,O.jsxs)(_.Z,{flex:1,children:[(0,O.jsxs)("span",{className:z.score,children:["(",e.challenge_score,"分)"]}),(0,O.jsxs)("span",{className:z.name,children:[e.challenge_name," "]})]}),(0,O.jsxs)(_.Z,{children:[0===e.answer_status&&(0,O.jsx)("span",{className:"font14",style:{color:"#FA6400"},children:"未完成"}),1===e.answer_status&&(0,O.jsx)("span",{className:"font14",style:{color:"#37AD83"},children:"已完成"})]})]})}))}),0!==(null==a||null===(t=a.exercise)||void 0===t?void 0:t.commit_status)||0!==(null==a||null===(i=a.exercise)||void 0===i?void 0:i.user_exercise_status)?(0,O.jsxs)(O.Fragment,{children:[!(null==f||!f.length)&&(0,O.jsxs)("div",{children:[(0,O.jsx)("p",{className:"font16 c-grey-666",children:"阶段成绩"}),(0,O.jsx)(G.Z,{columns:y,dataSource:f,pagination:!1})]}),!(null==g||!g.length)&&(0,O.jsxs)("div",{children:[(0,O.jsx)("p",{className:"font16 c-grey-666 mt10",children:"实训详情"}),null==g?void 0:g.map((function(e,n){return(0,O.jsxs)("div",{id:"challenge_".concat(null==o?void 0:o.question_id).concat(n),className:"mt5",children:[(0,O.jsxs)("div",{children:[(0,O.jsxs)("span",{className:"font16 mr15",children:[" 第",e.position,"关"]}),(0,O.jsx)(p.Link,{className:"current c-black font16",to:"/tasks/".concat(e.game_identifier),children:e.name})]}),0===(null==e?void 0:e.st)&&e.passed_code&&(0,O.jsxs)("aside",{className:z.shixunWrp,children:[(0,O.jsxs)("h2",{children:["最后一次通关的代码(未通关则为最后一次提交评测的代码)",(0,O.jsx)("span",{className:"c-light-black",children:e.path})]}),(0,O.jsx)(F.ZP,{height:300,language:"python",theme:"default",value:e.passed_code,options:b})]})]})}))]})]}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(I.Z,{className:"c-grey-999 mt20 mb20",value:null==o?void 0:o.question_title}),null==o||null===(r=o.shixun)||void 0===r?void 0:r.map((function(e,n){return(0,O.jsxs)("p",{className:"font16 c-grey-666 mb5",children:[(0,O.jsxs)("span",{className:"mr20",children:["第",null==e?void 0:e.challenge_position,"关 ",null==e?void 0:e.challenge_name]}),(0,O.jsxs)("span",{children:[null==e?void 0:e.challenge_score,"分"]})]},n)}))]})]})},W=t(24334),U=function(e){var n=e.item,t=(e.answerData,(0,d.useState)([])),i=u()(t,2),r=(i[0],i[1]);(0,d.useEffect)((function(){var e,t;(null==n||null===(e=n.evaluate_codes)||void 0===e?void 0:e.length)>0?r(null==n||null===(t=n.evaluate_codes)||void 0===t?void 0:t.map((function(e,n){return{key:n+1,error_msg:null!=e&&e.error_msg?W.Base64.decode(null==e?void 0:e.error_msg):""}}))):r([{key:"--",error_msg:"--"}])}),[null==n?void 0:n.evaluate_codes]);return(0,O.jsxs)("div",{className:"".concat(z.programWrapper),children:[(0,O.jsx)("div",{className:z.desc,children:"题目描述"}),(0,O.jsx)("div",{className:z.content,children:(0,O.jsx)(I.Z,{value:null==n?void 0:n.description})}),!(null==n||!n.user_answer.length)&&(null==n?void 0:n.passed_code)&&(0,O.jsxs)("aside",{className:z.shixunWrp,children:[(0,O.jsx)("h3",{children:"第一次评测通过的代码(未通关则为最后一次提交评测的代码)"}),(0,O.jsx)(F.ZP,{style:{border:"1px solid #ccc"},height:300,language:"python",theme:"vs-light",value:null!=n&&n.passed_code?W.Base64.decode(null==n?void 0:n.passed_code):"",options:{selectOnLineNumbers:!0,readOnly:!0,minimap:{enabled:!1},scrollBeyondLastLine:!1}})]})]})},V=t(37205),Y=t.n(V),K=t(30347),J=h.Z.TextArea,X=function(e){var n,t,i=e.item,o=e.answerData,a=e.onBlur,c=void 0===a?function(){}:a,p=(0,d.useState)([]),f=u()(p,2),m=f[0],v=f[1],g=(0,d.useState)([]),x=u()(g,2),y=x[0],b=x[1],j=(0,d.useRef)();return(0,d.useEffect)((function(){var e,n;n=null==i||null===(e=i.standard_answers)||void 0===e?void 0:e.map((function(e){var n;return s()(s()({},e),{},{choice_id:e.position,answer_text:(null==i||null===(n=i.user_answer)||void 0===n||null===(n=n.find((function(n){return n.choice_id===e.choice_id})))||void 0===n?void 0:n.answer_text)||""})})),v(n)}),[null==i?void 0:i.user_answer]),(0,O.jsxs)("div",{children:[null==m?void 0:m.map((function(e,n){var t,s,a,u;return(0,O.jsxs)(w.Z,{className:"".concat(z.baseMargin," ").concat(z.fill),align:"middle",children:[(0,O.jsxs)(_.Z,{className:z.index,children:["填空项",n+1]}),(0,O.jsx)(_.Z,{flex:"430px",className:"ml20 mr20",children:1===(null==e?void 0:e.model)?(0,O.jsx)(h.Z,{placeholder:"请输入答案",disabled:!i.repeat_answer&&(null==i||null===(t=i.user_answer)||void 0===t?void 0:t.length)>0&&!i.israp||!(null==o||!o.exercise.commit_status),value:null==e?void 0:e.answer_text,onChange:function(e){m[n].answer_text=e.target.value,v(Y()(m))},onBlur:function(){var t=l()(r()().mark((function t(i){var o,s,a;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,c(null==e?void 0:e.answer_text,n+1,m);case 2:0===(o=t.sent).status?((s=y.slice())[n]={status:"success",errorText:""},j.current=s,b(s)):((a=y.slice())[n]={status:"fail",errorText:o.message},j.current=a,b(a));case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),className:"".concat(i.user_score&&(i.user_score===i.question_score?"c-green":"c-red")," ").concat(z.fillInput)}):(0,O.jsx)(K.Z,{value:null==e?void 0:e.answer_text,onChange:function(){var e=l()(r()().mark((function e(t){var i,o,s,a,l;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m[n].answer_text=t,v(Y()(m)),e.next=4,c(t,n+1,m);case 4:(i=e.sent).status?((l=(null==j||null===(a=j.current)||void 0===a?void 0:a.slice())||[].slice())[n]={status:"fail",errorText:i.message},j.current=l,b(l)):((s=(null==j||null===(o=j.current)||void 0===o?void 0:o.slice())||[].slice())[n]={status:"success",errorText:""},j.current=s,b(s));case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}()})}),"success"===(null===(s=y[n])||void 0===s?void 0:s.status)&&(0,O.jsx)(_.Z,{children:(0,O.jsxs)(w.Z,{align:"middle",children:[(0,O.jsx)("i",{style:{marginRight:8},className:"iconfont icon-chenggong1 ".concat(z.success)}),(0,O.jsx)("span",{className:z.success,children:"保存成功"})]})}),"fail"===(null===(a=y[n])||void 0===a?void 0:a.status)&&(0,O.jsx)(_.Z,{children:(0,O.jsxs)(w.Z,{align:"middle",children:[(0,O.jsx)("i",{style:{marginRight:8},className:"iconfont icon-tishi7 ".concat(z.fail)}),(0,O.jsx)("span",{className:z.fail,children:null===(u=y[n])||void 0===u?void 0:u.errorText})]})})]},n)})),!(null==i||null===(n=i.standard_answer)||void 0===n||!n.length)&&(0,O.jsx)("div",{children:null==i||null===(t=i.standard_answer)||void 0===t?void 0:t.map((function(e,n){return(0,O.jsxs)("div",{children:[(0,O.jsxs)("span",{children:["参考答案:(填空",n+1,"):"]}),(0,O.jsx)("div",{children:(0,O.jsx)(J,{autoSize:!0,disabled:!0,value:null==e?void 0:e.answer_text[0]})})]},n)}))})]})},Q=t(21871),$=t(88289),ee=h.Z.TextArea,ne=function(e){var n,t,i=e.item,o=(e.answerData,e.onBlur),a=void 0===o?function(){}:o,c=(e.onDebug,(0,d.useState)([])),p=u()(c,2),f=p[0],h=p[1];return(0,d.useEffect)((function(){var e,n=null==i||null===(e=i.standard_answer_with_score)||void 0===e?void 0:e.map((function(e,n){var t;return s()(s()({},e),{},{value:(null==i||null===(t=i.user_answer)||void 0===t||null===(t=t.find((function(e){return parseInt(e.choice_id)===n+1})))||void 0===t?void 0:t.answer_text)||""})}));h(n)}),[null==i?void 0:i.standard_answer_with_score]),(0,O.jsxs)("div",{children:[(null==i?void 0:i.code)&&(0,O.jsx)("div",{style:{border:"1px solid #CCCCCC",padding:"10px",marginBottom:20},children:(0,O.jsx)(I.Z,{className:z.content,programFillValue:f,showProgramFill:!0,onFillBlur:function(){var e=l()(r()().mark((function e(n,t){var i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a(null==n||null===(i=n[parseInt(t)])||void 0===i?void 0:i.value,parseInt(t)+1,f);case 2:0===e.sent.status?(f[parseInt(t)].type="success",h(f)):(f[parseInt(t)].type="warning",h(f));case 4:case"end":return e.stop()}}),e)})));return function(n,t){return e.apply(this,arguments)}}(),value:W.Base64.decode((null==i?void 0:i.code)||"")})}),!(null==i||null===(n=i.standard_answer)||void 0===n||!n.length)&&(0,O.jsx)("div",{children:null==i||null===(t=i.standard_answer)||void 0===t?void 0:t.map((function(e,n){return(0,O.jsxs)("div",{children:[(0,O.jsxs)("span",{children:["参考答案:(填空",n+1,"):"]}),(0,O.jsx)("div",{children:(0,O.jsx)(ee,{autoSize:!0,disabled:!0,value:null==e?void 0:e.answer_text[0]})})]},n)}))}),(0,O.jsxs)("div",{style:{display:"flex",justifyContent:"space-between"},children:[(0,O.jsxs)("div",{style:{fontSize:14,color:"#ff0000"},children:[(0,O.jsx)($.Z,{}),(0,O.jsx)("span",{style:{marginLeft:5},children:"注意:填写答案之后,必须提交代码进行评测,否则无法得分"})]}),(0,O.jsx)(Q.Z,{ButtonProps:{type:"primary"},ButtonText:"提交代码",items:s()(s()({},i),{},{userAnswer:f}),hackidentifier:null==i?void 0:i.hack_identifier})]})]})},te=t(42195),ie=(h.Z.TextArea,function(e){var n=e.data;return(0,O.jsxs)("div",{className:"tc mt80",children:[(0,O.jsx)("img",{width:"486",src:te.BV})," ",(0,O.jsx)("br",{}),-1===n.status&&(0,O.jsx)("div",{className:"c-grey-999 mt60",children:"您的IP不在考试允许的范围内!"}),-2===n.status&&(0,O.jsxs)("div",{className:" c-grey-999 mt60",children:["您已绑定当前考试IP地址:",(0,O.jsx)("span",{className:"c-red",children:n.ip}),"请使用该IP地址进入考试。"]}),(0,O.jsx)(j.ZP,{className:"mt40 pl20 pr20",type:"primary",children:(0,O.jsx)("a",{href:"/",children:"回到首页"})})]})}),re=t(27065),oe=t(89392),se=t(7540),ae=f.Z.Countdown,le=h.Z.TextArea,ce=["A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"],ue={0:"c-red-ee4",1:"c-green"},de=(0,p.connect)((function(e){var n=e.loading;return{user:e.user,loading:n.effects}}))((function(e){var n,t,i,o,a,c,f,h,T,q,R,G,F,z,W,V,Y,K=e.user,J=e.dispatch,Q=(0,p.useParams)(),$=(0,d.useState)({}),ee=u()($,2),te=ee[0],de=ee[1],pe=(0,d.useState)({}),fe=u()(pe,2),he=(fe[0],fe[1],(0,d.useState)({})),me=u()(he,2),ve=me[0],ge=me[1],xe=(0,d.useState)(!1),we=u()(xe,2),_e=we[0],ye=we[1],be=(0,d.useState)(!0),je=u()(be,2),ke=je[0],Se=je[1],Ce=(0,d.useState)(!1),Be=u()(Ce,2),Te=(Be[0],Be[1]),Ne=(0,d.useState)(!1),Ee=u()(Ne,2),Ae=Ee[0],Pe=(Ee[1],(0,d.useState)()),Le=u()(Pe,2),Ze=Le[0],Me=Le[1],Ie=(0,d.useState)(""),qe=u()(Ie,2),Oe=qe[0],De=qe[1],Re=(0,d.useState)("none"),Ge=u()(Re,2),Fe=Ge[0],ze=Ge[1],He=(0,d.useState)(""),We=u()(He,2),Ue=We[0],Ve=(We[1],(0,d.useState)({status:0})),Ye=u()(Ve,2),Ke=Ye[0],Je=(Ye[1],(0,d.useRef)()),Xe=(0,d.useState)(0),Qe=u()(Xe,2),$e=Qe[0],en=Qe[1],nn=(0,d.useState)(0),tn=u()(nn,2),rn=tn[0],on=tn[1],sn=(0,d.useState)(!1),an=u()(sn,2),ln=an[0],cn=an[1],un=(0,d.useState)(!1),dn=u()(un,2),pn=dn[0],fn=dn[1],hn=(0,d.useState)(),mn=u()(hn,2),vn=mn[0],gn=mn[1],xn=(0,d.useState)(),wn=u()(xn,2),_n=wn[0],yn=wn[1];(0,d.useEffect)((function(){return J({type:"globalSetting/headerFooterToggle",payload:!1}),((0,P.GJ)()||(0,P.EO)())&&Q.categoryId&&K.userInfo.login&&kn(),window.addEventListener("message",bn),function(){window.removeEventListener("message",bn),window.removeEventListener("beforeunload",jn),J({type:"globalSetting/headerFooterToggle",payload:!0}),location.pathname.indexOf("/detail")>-1&&(0,L.BU)()}}),[Q.categoryId,K.userInfo.login]);var bn=function(e){"backExercise"===e.data&&(ze("none"),De(""),kn())},jn=function(e){var n="确定离开此页面吗?此页数据可能会丢失";return(e||window.event).returnValue=n,n},kn=function(){var e=l()(r()().mark((function e(){var n,t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ye(!0),e.next=3,(0,Z._F)(s()({},Q)).catch((function(){return ye(!1)}));case 3:(null==(n=e.sent)?void 0:n.exercise)&&(n.exercise.user_exercise_status=1),ye(!1),n&&(n.exercise_types=(null==n?void 0:n.exercise_types)||(null==n||null===(t=n.exercise_scores)||void 0===t?void 0:t.exercise_types),de(n));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,d.useEffect)((function(){var e,n,t;0===(null===(e=te.exercise)||void 0===e?void 0:e.time)&&Gn(),(null===(n=te.exercise)||void 0===n?void 0:n.time)&&Me(Date.now()+1e3*(null==te||null===(t=te.exercise)||void 0===t?void 0:t.time)*60)}),[null===(n=te.exercise)||void 0===n?void 0:n.time]);var Sn,Cn,Bn,Tn,Nn,En,An=function(){kn()},Pn=function(){var e=l()(r()().mark((function e(){var n,t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.kp)({categoryId:Q.categoryId,commit_method:2});case 2:0===(null==(n=e.sent)?void 0:n.status)&&(m.Z.info({width:530,title:"提示",centered:!0,okText:"确定",content:(0,O.jsxs)("div",{className:"tc font16",children:["答题结束了,系统已自动提交试卷",(0,O.jsx)("br",{}),"不能再修改答题"]}),onOk:function(){var e=l()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:An();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()}),v.ZP.info(null==n?void 0:n.message)),-3===(null==n?void 0:n.status)&&(t=parseInt(null==n?void 0:n.message),te.exercise.time=t,de(s()({},te)));case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Ln=function(){var e=l()(r()().mark((function e(n){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(n.is_jupyter||n.is_jupyter_lab?M.BK:M.Ir)({id:n.shixun_identifier});case 2:(null!=(t=e.sent)&&t.game_identifier||null!=t&&t.identifier)&&(n.is_jupyter_lab||n.is_jupyter?De("/tasks/".concat(t.identifier,"/jupyter?type=exercises&exercisesId=").concat(Q.categoryId,"&coursesId=coursesId&login=").concat(Q.login,"&questionId=").concat(n.question_id)):De("/tasks/".concat(t.game_identifier,"?type=exercises&exercisesId=").concat(Q.categoryId,"&coursesId=").concat(Q.coursesId,"&login=").concat(Q.login,"&questionId=").concat(n.question_id)),ze("block")),-3===(null==t?void 0:t.status)?(0,A.eF)():2===(null==t?void 0:t.status)?Zn(null==t?void 0:t.message,n.question_id,n.is_jupyter_lab,n.is_jupyter):3===(null==t?void 0:t.status)&&Mn(null==t?void 0:t.message);case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Zn=function e(n,t,i,o){var s,a;n=null!==(s=n)&&void 0!==s&&s.includes(".json")?n:"".concat(n,".json"),m.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,O.jsx)("div",{className:"tc font16",children:"实训已经更新了,正在为您重置!"}),onOk:(a=l()(r()().mark((function s(){var a,l;return r()().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,(0,Z.$Q)({url:n});case 2:if(a=r.sent){r.next=5;break}return r.abrupt("return");case 5:return v.ZP.success("重置成功,正在进入实践项目!"),r.next=8,(0,M.Ir)({id:a.shixun_identifier});case 8:if(null==(l=r.sent)||!l.game_identifier){r.next=12;break}return Ln({shixun_identifier:null==l?void 0:l.game_identifier,question_id:t,is_jupyter_lab:i,is_jupyter:o}),r.abrupt("return");case 12:2===(null==l?void 0:l.status)?e(null==l?void 0:l.message,t,i,o):3===(null==l?void 0:l.status)&&Mn(null==l?void 0:l.message);case 13:case"end":return r.stop()}}),s)}))),function(){return a.apply(this,arguments)})})},Mn=function(e){m.Z.confirm({centered:!0,title:"提示",okText:"确定",cancelText:"取消",content:(0,O.jsxs)("div",{className:"tc font16",children:["目前该实践项目尚在内测中,将于",e,"之后开放,谢谢!"]})})},In=function(){var e=l()(r()().mark((function e(n){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!n.hack_identifier){e.next=5;break}return e.next=3,(0,Z.nF)({id:n.hack_identifier});case 3:0===(null==(t=e.sent)?void 0:t.status)&&(De("/myproblems/".concat(t.identifier,"?type=exercises&exercisesId=").concat(Q.categoryId,"&coursesId=").concat(Q.coursesId,"&login=").concat(Q.login,"&questionId=").concat(n.question_id)),ze("block"));case 5:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),qn=function(){var e=l()(r()().mark((function e(n,t,i,o){var s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n){e.next=3;break}return console.error("handleSave no questionId params"),e.abrupt("return");case 3:return e.next=5,(0,Z.oX)({questionId:n,exercise_choice_id:t,answer_text:i});case 5:return 0===(null==(s=e.sent)?void 0:s.status)&&o&&o(),e.abrupt("return",s);case 8:case"end":return e.stop()}}),e)})));return function(n,t,i,r){return e.apply(this,arguments)}}(),On=function(){var e=l()(r()().mark((function e(n){var t,i,o;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,Z.WL)({id:Q.categoryId});case 2:if(t=e.sent){e.next=5;break}return e.abrupt("return");case 5:0!==t.question_undo||0!==t.oj_undo?(i="",0!==t.question_undo&&0!==t.oj_undo?i="有 ".concat(t.question_undo," 题未完成,包含 ").concat(t.oj_undo," 个").concat((null==te||null===(o=te.exercise_question_types)||void 0===o||null===(o=o.find((function(e){return 6==e.question_type})))||void 0===o?void 0:o.name)||"编程题"):0!==t.question_undo&&0===t.oj_undo?i="有 ".concat(t.question_undo," 题未完成"):0===t.question_undo&&0!==t.oj_undo&&(i="有 ".concat(t.oj_undo," 编程题未完成")),m.Z.confirm({width:530,title:"提示",centered:!0,okText:"确定",cancelText:"取消",content:(0,O.jsxs)("div",{className:"tc font16",children:[i,(0,O.jsx)("br",{}),n?"在".concat(N()(t.end_time).format("YYYY-MM-DD HH:mm"),"之前,允许修改答题"):"提交后无法再修改答题,是否确认提交?"]}),onOk:function(){var e=l()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n?An():Gn();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()})):m.Z.info({width:530,title:"提示",centered:!0,okText:"知道啦",content:(0,O.jsx)("div",{className:"tc font16",children:n?"在".concat(N()(t.end_time).format("YYYY-MM-DD HH:mm"),"之前,允许修改答题"):"提交后无法再修改答题,是否确认提交?"}),onOk:function(){var e=l()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n?An():Gn();case 1:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}()});case 6:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}(),Dn=function(e){return(0,O.jsxs)("div",{children:[(0,O.jsx)(g.Z,{strokeColor:{from:"#108ee9",to:"#87d068"},status:"active",percent:e}),(0,O.jsx)("div",{className:"c-grey-c tc mt10 mb20",children:"正在判分中…"})]})},Rn=function(){var e=0,n=m.Z.info({title:"交卷中",icon:null,className:"modal-footer-none",content:Dn(e)}),t=setInterval((function(){e<=100?(e+=2,n.update({content:Dn(e)})):(n.destroy(),clearInterval(t))}),50)},Gn=function(){var e=l()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Rn(),e.next=3,(0,Z.kp)({categoryId:Q.categoryId,commit_method:1});case 3:n=e.sent,(0,L.BU)(),J({type:"exercise/setActionTabs",payload:s()({},{removeEventListenerExitScreen:!0})}),0===(null==n?void 0:n.status)&&(v.ZP.success(null==n?void 0:n.message),Te(!1),setTimeout((function(){m.Z.info({title:"交卷成功!",okText:"确定",onOk:function(){An()}})}),3e3));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Fn=function(){var e=l()(r()().mark((function e(n,t,i,o){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:qn(t,n,null,(function(){te.question_status.find((function(e){return e.ques_id===t})).ques_status=n?1:0,o.user_answer=[],o.user_answer.push(n),o.repeat_answer||(o.israp=!0),de(s()({},te))}));case 1:case"end":return e.stop()}}),e)})));return function(n,t,i,r){return e.apply(this,arguments)}}(),zn=function(){var e=l()(r()().mark((function e(n,t,i,o,a){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:qn(o.question_id,n,null,(function(){var e,i,r;o.user_answer=[],o.user_answer.push(n);var l=null==a||null===(e=a.sub_exercise_questions)||void 0===e?void 0:e.filter((function(e){var n;return 0===(null===(n=e.user_answer)||void 0===n?void 0:n.length)}));te.question_status.find((function(e){return e.ques_id===t})).ques_status=(null==l?void 0:l.length)===(null==a||null===(i=a.sub_exercise_questions)||void 0===i?void 0:i.length)?0:(null==l?void 0:l.length)>0&&(null==l?void 0:l.length)<(null==a||null===(r=a.sub_exercise_questions)||void 0===r?void 0:r.length)?2:1,de(s()({},te))}));case 1:case"end":return e.stop()}}),e)})));return function(n,t,i,r,o){return e.apply(this,arguments)}}(),Hn=function(){var e=l()(r()().mark((function e(n,t,i,o,a,l){var c;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qn(i,t,n,(function(){var e={choice_id:t,answer_text:n};if(a.user_answer.filter((function(e){return e.choice_id!=t}))?a.user_answer.splice(t-1,1,e):a.user_answer.push(e),null!=l&&l.question_id){var r,c,u,d=null==l||null===(r=l.sub_exercise_questions)||void 0===r?void 0:r.filter((function(e){var n;return 0===(null===(n=e.user_answer)||void 0===n?void 0:n.length)}));te.question_status.find((function(e){return e.ques_id===(null==l?void 0:l.question_id)})).ques_status=(null==d?void 0:d.length)===(null==l||null===(c=l.sub_exercise_questions)||void 0===c?void 0:c.length)?0:(null==d?void 0:d.length)>0&&(null==d?void 0:d.length)<(null==l||null===(u=l.sub_exercise_questions)||void 0===u?void 0:u.length)?2:1}else te.question_status.find((function(e){return e.ques_id===i})).ques_status=o.every((function(e){return!!e.answer_text}))?1:te.question_status.find((function(e){return e.ques_id===i})).ques_status=o.some((function(e){return!!e.answer_text}))?2:0,a.repeat_answer||(a.israp=!0);de(s()({},te))}));case 2:return c=e.sent,e.abrupt("return",c);case 4:case"end":return e.stop()}}),e)})));return function(n,t,i,r,o,s){return e.apply(this,arguments)}}(),Wn=function(){var e=l()(r()().mark((function e(n,t,i,o,a){var l;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,qn(i,t,n,(function(){te.question_status.find((function(e){return e.ques_id===i})).ques_status=o.every((function(e){return!!e.value}))?1:te.question_status.find((function(e){return e.ques_id===i})).ques_status=o.some((function(e){return!!e.value}))?2:0;var e={choice_id:t,answer_text:n};a.user_answer.filter((function(e){return e.choice_id!=t}))?a.user_answer.splice(t-1,1,e):a.user_answer.push(e),a.repeat_answer||(a.israp=!0),de(s()({},te))}));case 2:return l=e.sent,e.abrupt("return",l);case 4:case"end":return e.stop()}}),e)})));return function(n,t,i,r,o){return e.apply(this,arguments)}}(),Un=function(e,n){var t,i,r,o,s,a,l,c,u=1===(null==te||null===(t=te.exercise)||void 0===t?void 0:t.user_exercise_status)||!e.repeat_answer&&(null==e||null===(i=e.user_answer)||void 0===i?void 0:i.length)>0&&0!==e.ques_status;return(0,O.jsxs)("div",{className:E.baseMargin,children:[(0,O.jsx)(x.ZP.Group,{disabled:u,defaultValue:null==e||null===(r=e.user_answer)||void 0===r?void 0:r[0],onChange:function(t){return Fn(t.target.value,null==e?void 0:e.question_id,n,e)},className:e.user_score&&"edu-radio-".concat(e.user_score===e.question_score?"green":"red"),children:null==e||null===(o=e.question_choices)||void 0===o?void 0:o.map((function(n,t){var i=2==e.question_type?"":"".concat(ce[t],".");return(0,O.jsx)("div",{className:"".concat(E.answerWrap),children:(0,O.jsx)(x.ZP,{className:E.noWrap,disabled:!(null==te||!te.exercise.commit_status),value:null==n?void 0:n.choice_id,children:(0,O.jsxs)(w.Z,{wrap:!1,align:"middle",gutter:5,children:[(0,O.jsx)(_.Z,{children:(0,O.jsx)("span",{className:"mr3 font16",children:i})}),(0,O.jsx)(_.Z,{children:(0,O.jsx)(I.Z,{style:{width:740},className:E.renderHtml,value:null==n?void 0:n.choice_text})})]})})},t)}))}),(0,P.dE)()&&(null==te||null===(s=te.exercise)||void 0===s?void 0:s.answer_open)&&(3==(null==te||null===(a=te.exercise)||void 0===a?void 0:a.exercise_status)||1==(null==te||null===(l=te.exercise)||void 0===l?void 0:l.user_exercise_status))&&(0,O.jsxs)("div",{children:["参考答案:",null==e||null===(c=e.standard_answer)||void 0===c?void 0:c.map((function(e,n){return(0,O.jsx)("span",{children:ce[Number(e)-1]},n)}))]})]})},Vn=function(e,n,t){var i;return(0,O.jsx)("div",{children:null==e||null===(i=e.sub_exercise_questions)||void 0===i?void 0:i.map((function(n,i){var r,o,s,a,l,c;return(0,O.jsxs)("div",{className:"".concat(E.baseMargin," ").concat(E.singleItem," mb20"),children:[(0,O.jsxs)("div",{style:{display:"flex",alignItems:"baseline",userSelect:"none",marginBottom:40},children:[(0,O.jsxs)("span",{style:{flexShrink:0,color:"#999999"},className:"font14",children:["(",null==n?void 0:n.question_score,"分)"]}),(0,O.jsx)("span",{style:{flexShrink:0,marginRight:6},className:"font16",children:t+1+"."+(i+1)}),(0,O.jsx)(I.Z,{value:null==n?void 0:n.question_title})]}),(0==n.question_type||2==n.question_type)&&(0,O.jsx)(x.ZP.Group,{style:{paddingLeft:66},disabled:!(null==te||!te.exercise.commit_status),defaultValue:null==n||null===(r=n.user_answer)||void 0===r?void 0:r[0],onChange:function(t){return zn(t.target.value,null==e?void 0:e.question_id,i,n,e)},className:n.user_score&&"edu-radio-".concat(n.user_score===n.question_score?"green":"red"),children:null==n||null===(o=n.question_choices)||void 0===o?void 0:o.map((function(e,t){var i,r=2==n.question_type?"":"".concat(ce[t],".");return(0,O.jsx)("div",{className:E.answerWrap,children:(0,O.jsx)(x.ZP,{className:E.noWrap,disabled:!n.repeat_answer&&(null==n||null===(i=n.user_answer)||void 0===i?void 0:i.length)>0,value:null==e?void 0:e.choice_id,children:(0,O.jsxs)(w.Z,{wrap:!1,align:"middle",children:[(0,O.jsx)(_.Z,{children:(0,O.jsx)("span",{style:{color:"#333333"},className:"mr3 font16 ".concat(E.noWrap),children:r})}),(0,O.jsx)(_.Z,{children:(0,O.jsx)(I.Z,{className:E.renderHtml,value:null==e?void 0:e.choice_text})})]})})},t)}))}),1==(null==n?void 0:n.question_type)&&Yn(n,i,e),3==(null==n?void 0:n.question_type)&&Kn(n,null==n?void 0:n.question_type,e),4==(null==n?void 0:n.question_type)&&Jn(n,null==n?void 0:n.question_type,e),(0,P.dE)()&&(0==n.question_type||2==n.question_type)&&(null==te||null===(s=te.exercise)||void 0===s?void 0:s.answer_open)&&(3==(null==te||null===(a=te.exercise)||void 0===a?void 0:a.exercise_status)||1==(null==te||null===(l=te.exercise)||void 0===l?void 0:l.user_exercise_status))&&(0,O.jsxs)("div",{children:["参考答案:",null==n||null===(c=n.standard_answer)||void 0===c?void 0:c.map((function(e,n){return(0,O.jsx)("span",{children:ce[Number(e)-1]},n)}))]})]},i)}))})},Yn=function(e,n,t){var i,r,o,a;return(0,O.jsxs)("div",{className:E.baseMargin,children:[(0,O.jsx)(y.Z.Group,{disabled:!(null==te||!te.exercise.commit_status),defaultValue:null==e?void 0:e.user_answer,onChange:function(n){return function(e,n,t,i){qn(n,e,null,(function(){if(t.user_answer=e,null!=i&&i.question_id){var r,o,a,l=null==i||null===(r=i.sub_exercise_questions)||void 0===r?void 0:r.filter((function(e){var n;return 0===(null===(n=e.user_answer)||void 0===n?void 0:n.length)}));te.question_status.find((function(e){return e.ques_id===(null==i?void 0:i.question_id)})).ques_status=(null==l?void 0:l.length)===(null==i||null===(o=i.sub_exercise_questions)||void 0===o?void 0:o.length)?0:(null==l?void 0:l.length)>0&&(null==l?void 0:l.length)<(null==i||null===(a=i.sub_exercise_questions)||void 0===a?void 0:a.length)?2:1}else t.repeat_answer||(t.israp=!0),te.question_status.find((function(e){return e.ques_id===n})).ques_status=null!=e&&e.length?1:0;de(s()({},te))}))}(n,null==e?void 0:e.question_id,e,t)},className:e.user_score&&"edu-checkbox-".concat(e.user_score===e.question_score?"green":"red"),children:null==e||null===(i=e.question_choices)||void 0===i?void 0:i.map((function(n,t){var i,r="".concat(ce[t],".");return(0,O.jsx)("div",{className:E.answerWrap,children:(0,O.jsx)(y.Z,{disabled:!e.repeat_answer&&(null==e||null===(i=e.user_answer)||void 0===i?void 0:i.length)>0&&!e.israp,value:null==n?void 0:n.choice_id,children:(0,O.jsxs)(w.Z,{wrap:!1,align:"middle",children:[(0,O.jsx)(_.Z,{children:(0,O.jsx)("span",{className:"mr3 font16",style:{whiteSpace:"nowrap"},children:r})}),(0,O.jsx)(_.Z,{children:(0,O.jsx)(I.Z,{className:E.renderHtml,value:null==n?void 0:n.choice_text})})]})})},t)}))}),(0,P.dE)()&&(null==te||null===(r=te.exercise)||void 0===r?void 0:r.answer_open)&&3==(null==te||null===(o=te.exercise)||void 0===o?void 0:o.exercise_status)&&(0,O.jsxs)("div",{children:["参考答案:",null==e||null===(a=e.standard_answer)||void 0===a?void 0:a.map((function(e,n){return(0,O.jsx)("span",{children:ce[Number(e)-1]},n)}))]})]})},Kn=function(e,n,t){return(0,O.jsx)(X,{item:e,answerData:te,onBlur:function(){var n=l()(r()().mark((function n(i,o,s){return r()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Hn(i,o,null==e?void 0:e.question_id,s,e,t);case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),n)})));return function(e,t,i){return n.apply(this,arguments)}}()})},Jn=function(e,n,t){return(0,O.jsx)(D,{item:e,answerData:te,onBlur:function(n){return function(e,n,t,i){qn(n,null,e,(function(){if(t.user_answer=[],t.user_answer.push(e),null!=i&&i.question_id){var r,o,a,l=null==i||null===(r=i.sub_exercise_questions)||void 0===r?void 0:r.filter((function(e){var n;return 0===(null===(n=e.user_answer)||void 0===n?void 0:n.length)}));te.question_status.find((function(e){return e.ques_id===(null==i?void 0:i.question_id)})).ques_status=(null==l?void 0:l.length)===(null==i||null===(o=i.sub_exercise_questions)||void 0===o?void 0:o.length)?0:(null==l?void 0:l.length)>0&&(null==l?void 0:l.length)<(null==i||null===(a=i.sub_exercise_questions)||void 0===a?void 0:a.length)?2:1}else te.question_status.find((function(e){return e.ques_id===n})).ques_status=e?1:0,t.repeat_answer||(t.israp=!0);de(s()({},te))}))}(n,null==e?void 0:e.question_id,e,t)}})},Xn=function(e,n){return(0,O.jsx)(H,{item:e,answerData:te})},Qn=function(e,n){return(0,O.jsx)(U,{item:e,answerData:te})},$n=function(e,n){return(0,O.jsx)(ne,{item:e,answerData:te,onBlur:function(){var n=l()(r()().mark((function n(t,i,o){return r()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,Wn(t,i,null==e?void 0:e.question_id,o,e);case 2:return n.abrupt("return",n.sent);case 3:case"end":return n.stop()}}),n)})));return function(e,t,i){return n.apply(this,arguments)}}()})},et=function(e,n,t){var i,r,o=null==te||null===(i=te.exercise_question_types)||void 0===i?void 0:i.find((function(e){return e.question_type===n}));return(0,O.jsxs)("div",{className:E.answerSheetWrap,children:[(0,O.jsxs)("div",{className:E.answerSheetQuestionTitle,onClick:function(){ve[n]=!ve[n],ge(s()({},ve))},children:[!ve[n]&&(0,O.jsx)(S.Z,{}),ve[n]&&(0,O.jsx)(C.Z,{}),(0,O.jsx)("span",{className:"ml5 c-grey-666",children:e})]}),!ve[n]&&(0,O.jsx)(w.Z,{className:E.answerSheet,gutter:[20,20],children:null==o||null===(r=o.items)||void 0===r?void 0:r.map((function(e,i){var r,o,a;if(e.question_type===n)return(0,O.jsx)(_.Z,{children:(0,O.jsxs)("div",{onClick:function(){var e;if(t!==$e||i!==rn){var r;if(te.exercise_question_types[$e].items[rn].israp=!1,de(s()({},te)),!pn&&0===(null==te||null===(e=te.exercise)||void 0===e?void 0:e.user_exercise_status)&&(0,P.dE)())if(null===(r=te.exercise_question_types)||void 0===r||null===(r=r[$e])||void 0===r||null===(r=r.items)||void 0===r||null===(r=r[rn])||void 0===r||!r.repeat_answer)return cn(!0),gn(3),void yn({oneindex:t,twoindex:i});en(t),on(i);var o="Anchor_".concat(n,"_").concat(i),a=document.getElementById(o);a&&setTimeout((function(){return a.scrollIntoView({block:"start",behavior:"smooth"})}))}},className:"\n ".concat(E.answerSheetItem,"\n ").concat(null!=te&&null!==(r=te.question_status)&&void 0!==r&&r.some((function(n){return n.ques_id===e.question_id&&1===(null==n?void 0:n.ques_status)}))?E.active:"","\n ").concat(null!=te&&null!==(o=te.question_status)&&void 0!==o&&o.some((function(n){return n.ques_id===e.question_id&&2===(null==n?void 0:n.ques_status)}))?E.partialActive:"","\n ").concat(t===$e&&i===rn?E.selected:"","\n "),children:[(0,O.jsx)("span",{className:E.qindex,children:i+1}),(null==te||null===(a=te.question_status)||void 0===a?void 0:a.some((function(n){return n.ques_id===e.question_id&&2===(null==n?void 0:n.ques_status)})))&&(0,O.jsx)("div",{style:{height:12,background:"#3061D0",position:"absolute",width:"100%",bottom:0}})]},i)})}))},n)]})},nt=function(e,n){var t,i,o,a,c;return(0,O.jsxs)("div",{className:E.questionItem,id:"Anchor_".concat(null==e?void 0:e.question_type,"_").concat(n),children:[(0,O.jsxs)("div",{style:{display:"flex",alignItems:"baseline",marginTop:20,marginBottom:40,userSelect:"none"},children:[(0,O.jsxs)("span",{className:"".concat(E.questionScore," mr10"),children:[null==e?void 0:e.question_score,"分"]}),(0,O.jsxs)("span",{className:"font16 ".concat(E.noWrap),children:[n+1,"、"]}),(0,O.jsx)(I.Z,{value:8==(null==e?void 0:e.question_type)?null==e?void 0:e.description:null==e?void 0:e.question_title}),!(null!=e&&e.repeat_answer)&&(0,O.jsx)("span",{style:{color:"#E30000",marginLeft:20,fontSize:14},children:"注意:该题作答之后不允许修改答案。"}),!(null==e||null===(t=e.schools)||void 0===t||!t.length)&&(0,O.jsx)(b.Z,{title:"该实训题面向指定单位开放",children:(0,O.jsx)("i",{className:"iconfont icon-zhidinggongkai1 line24 font18 c-orange"})})]}),0==(null==e?void 0:e.question_type)&&Un(e,null==e?void 0:e.question_type),2==(null==e?void 0:e.question_type)&&Un(e,null==e?void 0:e.question_type),1==(null==e?void 0:e.question_type)&&Yn(e,null==e?void 0:e.question_type),3==(null==e?void 0:e.question_type)&&Kn(e,null==e?void 0:e.question_type),4==(null==e?void 0:e.question_type)&&Jn(e,null==e?void 0:e.question_type),5==(null==e?void 0:e.question_type)&&Xn(e,null==e||e.question_type),6==(null==e?void 0:e.question_type)&&Qn(e,null==e||e.question_type),7==(null==e?void 0:e.question_type)&&Vn(e,null==e||e.question_type,n),8==(null==e?void 0:e.question_type)&&$n(e,null==e||e.question_type),!(null==e||null===(i=e.answer_comments)||void 0===i||!i.length)&&(0,O.jsx)("div",{className:"mt30",children:null==e||null===(o=e.answer_comments)||void 0===o?void 0:o.map((function(n,t){var i,r;return(0,O.jsxs)("div",{children:[(0,O.jsxs)(w.Z,{align:"middle",gutter:[0,10],children:[(0,O.jsx)(_.Z,{flex:"50px",children:(0,O.jsx)("img",{src:re.Z.API_SERVER+"/images/"+(null===(i=n.user)||void 0===i?void 0:i.image_url),width:"40",style:{borderRadius:40}})}),(0,O.jsxs)(_.Z,{flex:"1",children:[n.updated_at,(0,O.jsx)("br",{}),null===(r=n.user)||void 0===r?void 0:r.name]}),(0,O.jsxs)(_.Z,{className:"c-grey-c",children:[n.shixun_chanllge_position&&(0,O.jsxs)("span",{children:["第",n.shixun_chanllge_position,"关"]}),4!==e.question_type&&(0,O.jsxs)("span",{children:["原始得分",n.origin_score,"分 ,"]})," 修正为",n.score,"分"]})]}),n.comment&&(0,O.jsxs)(w.Z,{align:"middle",gutter:[0,10],children:[(0,O.jsx)(_.Z,{flex:"50px"}),(0,O.jsx)(_.Z,{flex:"1",children:(0,O.jsx)(le,{autoSize:!0,value:n.comment,disabled:!0})})]})]},t)}))}),(null==e?void 0:e.question_type)<3&&(null==e?void 0:e.standard_answer_show)&&(0,O.jsxs)("span",{className:"font16 ml20",children:["正确答案:",null==e?void 0:e.standard_answer_show]}),(0,O.jsx)("span",{children:null!==(null==e?void 0:e.user_score)&&(null==e?void 0:e.user_score)>=0&&(0,O.jsxs)("span",{children:[(0,O.jsx)("span",{className:ue[Number(null==e?void 0:e.answer_status)]||"c-orange-ff9",children:null==e?void 0:e.user_score})," 分"]})}),5==(null==e?void 0:e.question_type)&&!(null!==(a=te.exercise)&&void 0!==a&&a.commit_status)&&(0,O.jsx)(w.Z,{justify:"end",className:"mt20",children:(0,O.jsx)(j.ZP,{type:"primary",className:E.toIframeBtn,onClick:function(){return function(e){var n;e.redo?m.Z.info({width:530,title:"提示",centered:!0,okText:"确定",content:(0,O.jsx)("div",{className:"tc font16",children:"您之前已经挑战过该实训,考试过程中需要重新挑战"}),onOk:(n=l()(r()().mark((function n(){var t,i,o,a;return r()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,(0,Z.$Q)({id:e.myshixun_identifier,url:e.url});case 2:(t=n.sent)&&(i=(0,oe.cloneDeep)(null==te?void 0:te.exercise_question_types),o=null==i?void 0:i.findIndex((function(e){return 5===e.question_type})),i[o].items.find((function(n){return n.question_id===e.question_id})).redo=!1,i[o].items.find((function(n){return n.question_id===e.question_id})).shixun_identifier=t.shixun_identifier,te.exercise_question_types=i,de(te),a=s()(s()({},e),{},{shixun_identifier:t.shixun_identifier}),Ln(a));case 4:case"end":return n.stop()}}),n)}))),function(){return n.apply(this,arguments)})}):Ln(e)}(e)},children:"进入答题"})}),6==(null==e?void 0:e.question_type)&&!(null!==(c=te.exercise)&&void 0!==c&&c.commit_status)&&(0,O.jsx)(w.Z,{justify:"end",className:"mt20",children:(0,O.jsx)(j.ZP,{type:"primary",className:E.toIframeBtn,onClick:function(){return In(e)},children:"进入答题"})})]})},tt=function(e,n){return(0,O.jsx)(d.Fragment,{children:et(e.name||se.f[e.question_type].name,e.question_type,n)})},it=function(e){var n=["零","一","二","三","四","五","六","七","八","九"],t=["","十","百","千","万"];e=parseInt(e);var i=function(e){for(var i=e.toString().split("").reverse(),r="",o=0;o<i.length;o++)r=(0==o&&0==i[o]||o>0&&0==i[o]&&0==i[o-1]?"":n[i[o]]+(0==i[o]?t[0]:t[o]))+r;return r},r=Math.floor(e/1e4),o=e%1e4;return o.toString().length<4&&(o="0"+o),r?i(r)+"万"+i(o):i(e)};return(0,O.jsxs)(k.Z,{size:"middle",spinning:_e,children:[Ae&&(0,O.jsx)(B.Z,{iframe:Je}),(0,O.jsx)("iframe",{style:{display:Fe},id:"iframeShixuns",className:E.iframe,src:Oe,ref:Je,frameBorder:"0"}),(0,O.jsx)("div",{className:E.fixHeader,children:(0,O.jsxs)(w.Z,{align:"middle",className:"edu-container",children:[(0,O.jsx)(_.Z,{children:(0,O.jsx)(A.VV,{status:null!=te&&null!==(t=te.exercise)&&void 0!==t&&t.commit_status?[A.ju[4]]:[A.ju[99]]})}),(0,O.jsx)(_.Z,{className:"".concat(E.title," ml10"),children:null==te||null===(i=te.exercise)||void 0===i?void 0:i.exercise_name}),(0,O.jsx)(_.Z,{style:{marginLeft:"auto"},children:-1!==(null==te||null===(o=te.exercise)||void 0===o?void 0:o.time)&&!(null!=te&&null!==(a=te.exercise)&&void 0!==a&&a.commit_status)&&(0,O.jsxs)("aside",{className:"".concat(E.countDown," ").concat(Ue),children:["剩余答题时长",(0,O.jsx)(ae,{value:Ze,onFinish:Pn})]})}),(0,O.jsx)(_.Z,{children:!(null!=te&&null!==(c=te.exercise)&&void 0!==c&&c.commit_status)&&(0,O.jsx)(j.ZP,{className:E.submitButton,style:{marginLeft:30},type:"primary",onClick:function(){return On(!1)},children:"交卷"})})]})}),(0,O.jsxs)("section",{className:"edu-container",children:[0===Ke.status&&(0,O.jsxs)(w.Z,{className:E.mainPart,wrap:!1,children:[(0,O.jsxs)(_.Z,{flex:ke?"280px":"0px",children:[(0,O.jsxs)("div",{className:E.leftPart,children:[ke&&(0,O.jsxs)("aside",{className:"bg-white",children:[(0,O.jsxs)("aside",{className:E.answerInfo,children:[(0,O.jsxs)(w.Z,{justify:"space-between",children:[(0,O.jsx)(_.Z,{children:"答题进度"}),(0,O.jsxs)(_.Z,{className:E.answerProgress,children:[(0,O.jsx)("span",{style:{color:"#165DFF"},children:null==te||null===(f=te.question_status)||void 0===f||null===(f=f.filter((function(e){return 1===(null==e?void 0:e.ques_status)})))||void 0===f?void 0:f.length}),(0,O.jsxs)("span",{style:{color:"#999999"},children:["/",null==te||null===(h=te.exercise_types)||void 0===h?void 0:h.q_counts]})]})]}),(0,O.jsx)(w.Z,{children:(0,O.jsx)(g.Z,{strokeColor:"#165dffa6",trailColor:"#0000000d",percent:(null==te||null===(T=te.question_status)||void 0===T||null===(T=T.filter((function(e){return 1===(null==e?void 0:e.ques_status)})))||void 0===T?void 0:T.length)/(null==te||null===(q=te.exercise_types)||void 0===q?void 0:q.q_counts)*100,showInfo:!1})}),(0,O.jsx)(w.Z,{children:(0,O.jsxs)(_.Z,{children:[(0,O.jsxs)("span",{className:"c-grey-333",children:["共 ",(0,O.jsx)("span",{style:{color:"#165DFF"},children:(null==te||null===(R=te.exercise_types)||void 0===R?void 0:R.q_counts)||(null==te||null===(G=te.exercise_scores)||void 0===G||null===(G=G.exercise_types)||void 0===G?void 0:G.q_counts)})," 题:"]}),(0,O.jsxs)("span",{className:"c-grey-333",children:["满分 ",(0,O.jsx)("span",{style:{color:"#FA6400"},children:(null==te||null===(F=te.exercise_types)||void 0===F?void 0:F.q_scores)||(null==te||null===(z=te.exercise_scores)||void 0===z||null===(z=z.exercise_types)||void 0===z?void 0:z.q_scores)})," 分"]})]})})]}),(0,O.jsxs)(w.Z,{className:E.dottedLineWrapper,align:"middle",children:[(0,O.jsx)(_.Z,{className:E.leftHalfCircle}),(0,O.jsx)(_.Z,{flex:1,className:E.dottedLine}),(0,O.jsx)(_.Z,{className:E.rightHalfCircle})]}),(0,O.jsx)(w.Z,{children:(0,O.jsx)(_.Z,{flex:"1",children:(0,O.jsx)("aside",{className:E.cardList,children:null==te||null===(W=te.exercise_question_types)||void 0===W?void 0:W.map((function(e,n){return(0,O.jsx)(d.Fragment,{children:tt(e,n)},e.question_type)}))})})})]}),(0,O.jsxs)(w.Z,{justify:"space-around",align:"middle",className:E.answerSheetBottom,children:[(0,O.jsxs)(_.Z,{className:E.tooltipWrap,children:[(0,O.jsx)("span",{className:E.answerYes}),"已答"]}),(0,O.jsxs)(_.Z,{className:E.tooltipWrap,children:[(0,O.jsx)("span",{className:"".concat(E.answerNo," ml10"),children:(0,O.jsx)("div",{style:{height:"50%",background:"#0152d9"}})}),"部分答题"]}),(0,O.jsxs)(_.Z,{className:E.tooltipWrap,children:[(0,O.jsx)("span",{className:"".concat(E.answerNo," ml10")}),"未答"]})]})]}),(0,O.jsxs)("div",{className:E.fold,onClick:function(){return Se(!ke)},children:[ke&&(0,O.jsx)(b.Z,{title:"收起答题卡",children:(0,O.jsx)("span",{className:"icon-zuojiantou iconfont c-grey-c"})}),!ke&&(0,O.jsx)(b.Z,{title:"展开",children:(0,O.jsx)("span",{className:"icon-youjiantou iconfont c-grey-c"})})]})]}),(0,O.jsx)(_.Z,{flex:"1",children:(0,O.jsxs)("section",{className:[E.rightPart,"ml20"].join(" "),children:[(0,O.jsx)("div",{className:"".concat(E.questionPart," pl30 pr30"),children:(0,O.jsxs)(d.Fragment,{children:[(0,O.jsxs)("div",{className:"pt20",children:[(0,O.jsxs)("span",{className:E.questionTypeTitle,children:[it($e+1),"、",null==te||null===(Sn=te.exercise_question_types)||void 0===Sn||null===(Sn=Sn[$e])||void 0===Sn?void 0:Sn.name]}),(0,O.jsxs)("span",{className:E.questionTypeInfo,children:["(共",null==te||null===(Cn=te.exercise_question_types)||void 0===Cn||null===(Cn=Cn[$e])||void 0===Cn?void 0:Cn.count,"题;",7===(null==te||null===(Bn=te.exercise_question_types)||void 0===Bn||null===(Bn=Bn[$e])||void 0===Bn?void 0:Bn.question_type)?"包含".concat(null==te||null===(Tn=te.exercise_question_types)||void 0===Tn||null===(Tn=Tn[$e])||void 0===Tn?void 0:Tn.sub_questions_count,"小题"):""," 共",null==te||null===(Nn=te.exercise_question_types)||void 0===Nn||null===(Nn=Nn[$e])||void 0===Nn?void 0:Nn.score,"分)"]})]}),(0,O.jsx)(d.Fragment,{children:nt(null==te||null===(En=te.exercise_question_types)||void 0===En||null===(En=En[$e])||void 0===En||null===(En=En.items)||void 0===En?void 0:En[rn],rn)},rn)]},$e)}),(0,O.jsx)(w.Z,{className:E.bottom,align:"middle",justify:"end",children:(0,O.jsxs)(_.Z,{children:[(0!=$e||0!=rn)&&(0,O.jsx)(j.ZP,{className:"".concat(E.changeButton," ").concat(E.prevBtn," mr20"),type:"default",onClick:function(){var e,n;if((te.exercise_question_types[$e].items[rn].israp=!1,de(s()({},te)),!pn&&0===(null==te||null===(e=te.exercise)||void 0===e?void 0:e.user_exercise_status)&&(0,P.dE)())&&(null===(n=te.exercise_question_types)||void 0===n||null===(n=n[$e])||void 0===n||null===(n=n.items)||void 0===n||null===(n=n[rn])||void 0===n||!n.repeat_answer))return cn(!0),void gn(1);0===rn?($e-=1,rn=te.exercise_question_types[$e].items.length-1):rn-=1,en($e),on(rn)},children:"上一题"}),!($e===(null==te||null===(V=te.exercise_question_types)||void 0===V?void 0:V.length)-1&&rn===(null==te||null===(Y=te.exercise_question_types)||void 0===Y||null===(Y=Y[$e])||void 0===Y||null===(Y=Y.items)||void 0===Y?void 0:Y.length)-1)&&(0,O.jsx)(j.ZP,{className:E.changeButton,type:"primary",onClick:function(){var e,n;if((te.exercise_question_types[$e].items[rn].israp=!1,de(s()({},te)),!pn&&0===(null==te||null===(e=te.exercise)||void 0===e?void 0:e.user_exercise_status)&&(0,P.dE)())&&(null===(n=te.exercise_question_types)||void 0===n||null===(n=n[$e])||void 0===n||null===(n=n.items)||void 0===n||null===(n=n[rn])||void 0===n||!n.repeat_answer))return cn(!0),void gn(2);te.exercise_question_types[$e].items.length-1===rn?($e+=1,rn=0):rn+=1,en($e),on(rn)},children:"下一题"})]})})]})}),(0,O.jsx)(m.Z,{title:"注意",open:ln,onCancel:function(){return cn(!1)},footer:!1,children:(0,O.jsxs)("div",{children:[(0,O.jsx)("p",{style:{marginBottom:0},children:"离开该题后不允许再次修改答案,确认离开吗?"}),(0,O.jsxs)("div",{style:{marginTop:60,display:"flex",justifyContent:"space-between"},children:[(0,O.jsx)(y.Z,{checked:pn,onChange:function(e){fn(e.target.checked)},children:"下次不再显示"}),(0,O.jsxs)("div",{children:[(0,O.jsx)(j.ZP,{onClick:function(){(te.exercise_question_types[$e].items[rn].israp||""===te.exercise_question_types[$e].items[rn].israp)&&(te.exercise_question_types[$e].items[rn].israp=!0,de(s()({},te)))},children:"我再想想"}),(0,O.jsx)(j.ZP,{onClick:function(){te.exercise_question_types[$e].items[rn].israp=!1,de(s()({},te)),1===vn?(0===rn?($e-=1,rn=te.exercise_question_types[$e].items.length-1):rn-=1,console.log(te.exercise_question_types[$e].items[rn],"-----"),en($e),on(rn)):2===vn?(te.exercise_question_types[$e].items.length-1===rn?($e+=1,rn=0):rn+=1,en($e),on(rn)):(en(_n.oneindex),on(_n.twoindex)),cn(!1)},type:"primary",style:{marginLeft:30},children:"确认"})]})]})]})})]}),0!==Ke.status&&(0,O.jsx)(ie,{data:Ke})]})]})}))},84804:function(e,n,t){"use strict";t.d(n,{Y4:function(){return Z},Im:function(){return A},ZP:function(){return I}});var i=t(79800),r=t.n(i),o=t(7557),s=t.n(o),a=t(41498),l=t.n(a),c=t(82242),u=t.n(c),d=t(85573),p=t.n(d),f=t(59301),h=t(98135),m=t(8591),v=t(3113),g=t(43501),x=t(53547),w=t(42541),_=t(24334),y=t(96962),b=t(42783),j=t(6457),k=t(34376),S=t(51136),C=t(7880),B=t(88549),T=t(37712),N=h.Z.TextArea,E={visible:!1,tabIndex:"0"},A=p()(p()(p()(p()(p()(p()({},w.h.NOMATCH,"测试用例结果不匹配"),w.h.OK,"调试通过"),2,"调试超时"),3,"调试pod失败"),4,"编译失败"),5,"执行失败"),P=function(e){return e[e.SET_VISIBLE=0]="SET_VISIBLE",e[e.SET_TABINDEX=1]="SET_TABINDEX",e}(P||{});function L(e,n){switch(n.type){case P.SET_VISIBLE:return u()(u()({},e),{},{visible:n.payload});case P.SET_TABINDEX:return u()(u()({},e),{},{tabIndex:n.payload});default:throw new Error}}function Z(e){var n=e.status,t=e.error_msg,i=e.output,r=e.input,o=e.expected_output,a=e.is_file,c=e.input_file_url,u=e.output_file_url,d=e.expected_output_file_url,p=e.setMonacoValue,h=e.setData,m=(0,f.useRef)(),v=(0,f.useRef)(),g=(0,f.useRef)(),x=null,y={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch((0,f.useEffect)((function(){if(i&&!a&&m.current){var e=new k.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});e.open(m.current);var n=(0,j.pp)(_.Base64.decode(i));e.write(n),e.setOption("theme",{background:"#1e1e1e"})}if(r&&!a&&v.current){var t=new k.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});t.open(v.current),t.write((0,j.pp)(r)),t.setOption("theme",{background:"#1e1e1e"})}if(o&&!a&&g.current){var s=new k.Terminal({fontSize:14,letterSpacing:1,cols:83,rows:10});s.open(g.current),s.write((0,j.pp)(_.Base64.decode(o))),s.setOption("theme",{background:"#1e1e1e"})}}),[i]),n){case w.h.NOMATCH:x=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("p",{className:"c-red",children:"实际输出:"}),!a&&(0,T.jsx)("div",{ref:m}),a&&(0,T.jsx)("div",{style:y,children:(0,T.jsx)("a",{style:{fontSize:"16px"},onClick:l()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.ZP)(u,{method:"Get",headers:{"Content-Type":"application/xml",Accept:"*/*"}});case 2:n=e.sent,p(n),setTimeout((function(){h(u)}),200);case 5:case"end":return e.stop()}}),e)}))),children:i})}),(0,T.jsx)("p",{className:"c-red",children:"预期输出:"}),!a&&(0,T.jsx)("div",{ref:g}),a&&(0,T.jsx)("div",{style:y,children:(0,T.jsx)("a",{style:{fontSize:"16px"},onClick:l()(s()().mark((function e(){var n;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch(d,{method:"Get",headers:{"Content-Type":"application/octet-stream",Accept:"*/*"}});case 2:return n=e.sent,e.t0=p,e.next=6,n.text();case 6:e.t1=e.sent,(0,e.t0)(e.t1),setTimeout((function(){h(d)}),200);case 9:case"end":return e.stop()}}),e)}))),children:o})})]});break;case w.h.EXECUTEFAILURE:x=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)("div",{style:{border:"1px #F6F7F9 solid"},children:[(0,T.jsx)("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"},children:"最后执行的输入:"}),!a&&(0,T.jsx)(b.Z,{value:r,style:y}),a&&(0,T.jsx)("div",{style:y,children:(0,T.jsx)("a",{onClick:function(){return(0,j.LR)(c,r)},children:r})})]}),(0,T.jsxs)("div",{style:{border:"1px #F6F7F9 solid",marginTop:"10px"},children:[(0,T.jsx)("p",{style:{width:"100%",height:40,background:"#F6F7F9",lineHeight:"40px",color:"#666666",paddingLeft:"12px"},children:"执行出错信息:"}),(0,T.jsxs)("pre",{className:"error",style:{color:"#E30000",padding:"0 10px"},children:[_.Base64.decode(t),"111"]})]})]});break;case w.h.COMPILEFAILURE:x=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("p",{children:"执行出错信息:"}),(0,T.jsx)("pre",{className:"error",children:_.Base64.decode(t)})]});break;case w.h.PODFAILURE:x=(0,T.jsx)("p",{children:"创建pod失败,请稍后重试"});break;case w.h.TIMEOUT:x=(0,T.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,T.jsxs)(T.Fragment,{children:[" ",x," "]})}function M(e){var n=e.status,t=e.error_msg,i=e.execute_time,r=e.output,o=e.input,s=e.expected_output,a=(e.is_file,e.input_file_url,e.output_file_url,e.expected_output_file_url,null);switch(n){case w.h.OK:a=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)("p",{children:["执行用时:",i/1e3,"秒"]}),(0,T.jsx)("p",{children:"执行结果:"}),(0,T.jsx)("pre",{children:_.Base64.decode(r)})]});break;case w.h.NOMATCH:a=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)("p",{children:["输入:",(0,T.jsx)("pre",{children:o})]}),(0,T.jsxs)("p",{children:["输出:",r&&_.Base64.decode(r)]}),(0,T.jsxs)("p",{children:["预期输出:",s&&_.Base64.decode(s)]})]});break;case w.h.EXECUTEFAILURE:case w.h.COMPILEFAILURE:a=(0,T.jsxs)(T.Fragment,{children:[(0,T.jsxs)("p",{children:["最后执行的输入:",(0,T.jsx)("pre",{children:o})]}),(0,T.jsx)("p",{children:"执行出错信息:"}),(0,T.jsx)("pre",{className:"error",children:_.Base64.decode(t)})]});break;case w.h.PODFAILURE:a=(0,T.jsx)("p",{children:"创建pod失败,请稍后重试"});break;case w.h.TIMEOUT:a=(0,T.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,T.jsxs)(T.Fragment,{children:[" ",a," "]})}var I=function(e){var n=e.input,t=e.is_file,i=e.debuging,o=e.submitting,a=(e.executingMessage,e.debugResult),c=e.onChangeInput,u=e.onDebugCode,d=e.onSubmitCode,p=e.hack,h=e.user,w=(0,f.useReducer)(L,E),_=r()(w,2),b=_[0],j=_[1],k=b.visible,A=(b.tabIndex,(0,C.useSearchParams)()),Z=r()(A,1)[0];var I=(0,f.useMemo)((function(){if(a){a.status;return(0,T.jsx)(T.Fragment,{children:M(a)})}return null}),[a]);var q=function(){var e=l()(s()().mark((function e(n){var t;return s()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,S.ZP)("/api/problems/".concat(n,"/start.json"),{method:"get",params:{hack_user_id:null==h?void 0:h.user_id}});case 2:(t=e.sent)&&(window.location.href="/myproblems/".concat(null==t?void 0:t.identifier,"?type=1"));case 4:case"end":return e.stop()}}),e)})));return function(n){return e.apply(this,arguments)}}();return(0,T.jsxs)("div",{className:"test-case-panel",children:[(0,T.jsxs)("div",{className:"test-case-panel-body ".concat(k?"active":""),children:[(0,T.jsx)("ul",{className:"s-navs",children:(0,T.jsx)("li",{children:(0,T.jsx)("a",{className:"active",children:"调试代码结果"})})}),(0,T.jsx)(B.Z,{leftTitle:"自定义测试用例",rightTitle:"代码执行结果",style:{height:240},leftNode:(0,T.jsx)(N,{placeholder:"请输入自测用例(如果未填写,自测运行时,系统会自动填充第一个非隐藏的文本类型的测试用例)",value:t?"":n,onChange:c}),rightNode:i?(0,T.jsx)(y.Z,{message:"代码执行中..."}):a?I:(0,T.jsx)("p",{style:{color:"#536879"},children:"请填写测试用例的输入值,点击“调试代码”"})})]}),(0,T.jsx)("a",{className:"btn-collapse ".concat(k?"up":""),onClick:function(){j({type:P.SET_VISIBLE,payload:!k})},children:k?(0,T.jsx)(g.Z,{}):(0,T.jsx)(x.Z,{})}),(0,T.jsxs)("footer",{className:"footer",children:[(0,T.jsx)("span",{children:"控制台"}),(0,T.jsxs)("div",{className:"flex-container",children:[(null==p?void 0:p.is_program)&&(null==p?void 0:p.above_question)&&(0,T.jsx)(v.ZP,{onClick:function(){return q(null==p?void 0:p.above_question)},id:"oj-prev",className:"btn-blue",type:"ghost",children:"上一题"}),(null==p?void 0:p.is_program)&&(null==p?void 0:p.under_question)&&(0,T.jsx)(v.ZP,{onClick:function(){return q(null==p?void 0:p.under_question)},id:"oj-next",className:"btn-blue",type:"ghost",children:"下一题"}),(0,T.jsx)(v.ZP,{className:"btn-green",type:"ghost",loading:i,onClick:function(){if(!n||t)return m.ZP.error("请输入自测用例"),j({type:P.SET_VISIBLE,payload:!0}),void j({type:P.SET_TABINDEX,payload:"0"});j({type:P.SET_VISIBLE,payload:!0}),j({type:P.SET_TABINDEX,payload:"1"}),u()},children:"调试代码"}),"8"!==Z.get("qtype")&&(0,T.jsx)(v.ZP,{type:"primary",className:"custom-ant-disabled",loading:o,disabled:o,onClick:function(){j({type:P.SET_VISIBLE,payload:!1}),d()},children:"评测并提交"})]})]})]})}},42541:function(e,n,t){"use strict";t.d(n,{h:function(){return i}});var i=function(e){return e[e.NOMATCH=-1]="NOMATCH",e[e.OK=0]="OK",e[e.TIMEOUT=2]="TIMEOUT",e[e.PODFAILURE=3]="PODFAILURE",e[e.COMPILEFAILURE=4]="COMPILEFAILURE",e[e.EXECUTEFAILURE=5]="EXECUTEFAILURE",e}({})},76039:function(e,n,t){"use strict";t.d(n,{H7:function(){return f},MK:function(){return p},MU:function(){return l},X6:function(){return u},bM:function(){return a},fi:function(){return h},fu:function(){return s},n4:function(){return m},rX:function(){return d},vl:function(){return v},zO:function(){return c}});var i=t(82242),r=t.n(i),o=t(51136);function s(e,n){return(0,o.U2)("myproblems/".concat(e,".json"),r()({hidePopLogin:!0},n||{}))}function a(e,n){return(0,o.v_)("myproblems/".concat(e,"/code_submit.json"),n)}function l(e,n){return(0,o.v_)("myproblems/".concat(e,"/code_debug.json"),n)}function c(e,n){return n.language&&(n.language=encodeURIComponent(n.language)),(0,o.U2)("myproblems/".concat(e,"/submit_records.json"),n)}function u(e){return(0,o.U2)("myproblems/record_detail.json",{id:e})}function d(e,n){return(0,o.U2)("myproblems/".concat(e,"/result.json"),{mode:n})}function p(e,n){return(0,o.v_)("myproblems/".concat(e,"/add_notes.json"),n)}function f(e,n){return(0,o.v_)("myproblems/".concat(e,"/restore_initial_code.json"),n)}function h(e){return(0,o.v_)("myproblems/".concat(e,"/sync_code.json"))}function m(e,n){return(0,o.v_)("myproblems/".concat(e,"/update_code.json"),n)}function v(e,n){return(0,o.v_)("discusses/".concat(e,"/plus.json"),n)}},27666:function(e,n,t){"use strict";var i=t(12295),r=t(3490);n.Z=function(e){let n;const t=t=>()=>{n=null,e.apply(void 0,(0,i.Z)(t))},o=function(){if(null==n){for(var e=arguments.length,i=new Array(e),o=0;o<e;o++)i[o]=arguments[o];n=(0,r.Z)(t(i))}};return o.cancel=()=>{r.Z.cancel(n),n=null},o}},81228:function(e,n,t){"use strict";t.d(n,{Z:function(){return S}});var i=t(15744),r=t(87469),o=t(87902),s=t(16910),a=t(59301),l=t(92310),c=t.n(l),u=t(28647),d=t(70521),p=t(27666),f=t(36355),h=t(83116),m=t(37613);const v=e=>{const{componentCls:n}=e;return{[n]:{position:"fixed",zIndex:e.zIndexPopup}}};var g=(0,h.Z)("Affix",(e=>{const n=(0,m.TS)(e,{zIndexPopup:e.zIndexBase+10});return[v(n)]}));function x(e){return e!==window?e.getBoundingClientRect():{top:0,bottom:window.innerHeight}}function w(e,n,t){if(void 0!==t&&n.top>e.top-t)return t+n.top}function _(e,n,t){if(void 0!==t&&n.bottom<e.bottom+t){return t+(window.innerHeight-n.bottom)}}const y=["resize","scroll","touchstart","touchmove","touchend","pageshow","load"];function b(){return"undefined"!=typeof window?window:null}var j;!function(e){e[e.None=0]="None",e[e.Prepare=1]="Prepare"}(j||(j={}));let k=function(e){(0,o.Z)(t,e);var n=(0,s.Z)(t);function t(){var e;return(0,i.Z)(this,t),(e=n.apply(this,arguments)).state={status:j.None,lastAffix:!1,prevTarget:null},e.placeholderNodeRef=(0,a.createRef)(),e.fixedNodeRef=(0,a.createRef)(),e.addListeners=()=>{const n=e.getTargetFunc(),t=null==n?void 0:n(),{prevTarget:i}=e.state;i!==t&&(y.forEach((n=>{null==i||i.removeEventListener(n,e.lazyUpdatePosition),null==t||t.addEventListener(n,e.lazyUpdatePosition)})),e.updatePosition(),e.setState({prevTarget:t}))},e.removeListeners=()=>{e.timer&&(clearTimeout(e.timer),e.timer=null);const{prevTarget:n}=e.state,t=e.getTargetFunc(),i=null==t?void 0:t();y.forEach((t=>{null==i||i.removeEventListener(t,e.lazyUpdatePosition),null==n||n.removeEventListener(t,e.lazyUpdatePosition)})),e.updatePosition.cancel(),e.lazyUpdatePosition.cancel()},e.getOffsetTop=()=>{const{offsetBottom:n,offsetTop:t}=e.props;return void 0===n&&void 0===t?0:t},e.getOffsetBottom=()=>e.props.offsetBottom,e.measure=()=>{const{status:n,lastAffix:t}=e.state,{onChange:i}=e.props,r=e.getTargetFunc();if(n!==j.Prepare||!e.fixedNodeRef.current||!e.placeholderNodeRef.current||!r)return;const o=e.getOffsetTop(),s=e.getOffsetBottom(),a=r();if(a){const n={status:j.None},r=x(e.placeholderNodeRef.current);if(0===r.top&&0===r.left&&0===r.width&&0===r.height)return;const l=x(a),c=w(r,l,o),u=_(r,l,s);void 0!==c?(n.affixStyle={position:"fixed",top:c,width:r.width,height:r.height},n.placeholderStyle={width:r.width,height:r.height}):void 0!==u&&(n.affixStyle={position:"fixed",bottom:u,width:r.width,height:r.height},n.placeholderStyle={width:r.width,height:r.height}),n.lastAffix=!!n.affixStyle,i&&t!==n.lastAffix&&i(n.lastAffix),e.setState(n)}},e.prepareMeasure=()=>{e.setState({status:j.Prepare,affixStyle:void 0,placeholderStyle:void 0})},e.updatePosition=(0,p.Z)((()=>{e.prepareMeasure()})),e.lazyUpdatePosition=(0,p.Z)((()=>{const n=e.getTargetFunc(),{affixStyle:t}=e.state;if(n&&t){const i=e.getOffsetTop(),r=e.getOffsetBottom(),o=n();if(o&&e.placeholderNodeRef.current){const n=x(o),s=x(e.placeholderNodeRef.current),a=w(s,n,i),l=_(s,n,r);if(void 0!==a&&t.top===a||void 0!==l&&t.bottom===l)return}}e.prepareMeasure()})),e}return(0,r.Z)(t,[{key:"getTargetFunc",value:function(){const{getTargetContainer:e}=this.context,{target:n}=this.props;return void 0!==n?n:null!=e?e:b}},{key:"componentDidMount",value:function(){this.timer=setTimeout(this.addListeners)}},{key:"componentDidUpdate",value:function(e){this.addListeners(),e.offsetTop===this.props.offsetTop&&e.offsetBottom===this.props.offsetBottom||this.updatePosition(),this.measure()}},{key:"componentWillUnmount",value:function(){this.removeListeners()}},{key:"render",value:function(){const{affixStyle:e,placeholderStyle:n}=this.state,{affixPrefixCls:t,rootClassName:i,children:r}=this.props,o=c()(e&&i,{[t]:!!e});let s=(0,d.Z)(this.props,["prefixCls","offsetTop","offsetBottom","target","onChange","affixPrefixCls","rootClassName"]);return a.createElement(u.Z,{onResize:this.updatePosition},a.createElement("div",Object.assign({},s,{ref:this.placeholderNodeRef}),e&&a.createElement("div",{style:n,"aria-hidden":"true"}),a.createElement("div",{className:o,ref:this.fixedNodeRef,style:e},a.createElement(u.Z,{onResize:this.updatePosition},r))))}}]),t}(a.Component);k.contextType=f.E_;var S=(0,a.forwardRef)(((e,n)=>{const{prefixCls:t,rootClassName:i}=e,{getPrefixCls:r}=(0,a.useContext)(f.E_),o=r("affix",t),[s,l]=g(o),u=Object.assign(Object.assign({},e),{affixPrefixCls:o,rootClassName:c()(i,l)});return s(a.createElement(k,Object.assign({},u,{ref:n})))}))},79817:function(e,n,t){"use strict";t.d(n,{Z:function(){return C}});var i=t(12295),r=t(92310),o=t.n(r),s=t(41685),a=t(59301),l=t(6774),c=t(13845),u=t(68031),d=t(81228),p=t(36355);var f=a.createContext(void 0);var h=e=>{const{href:n,title:t,prefixCls:i,children:r,className:s,target:l,replace:c}=e,u=a.useContext(f),{registerLink:d,unregisterLink:h,scrollTo:m,onClick:v,activeLink:g,direction:x}=u||{};a.useEffect((()=>(null==d||d(n),()=>{null==h||h(n)})),[n]);const{getPrefixCls:w}=a.useContext(p.E_),_=w("anchor",i),y=g===n,b=o()(`${_}-link`,s,{[`${_}-link-active`]:y}),j=o()(`${_}-link-title`,{[`${_}-link-title-active`]:y});return a.createElement("div",{className:b},a.createElement("a",{className:j,href:n,title:"string"==typeof t?t:"",target:l,onClick:e=>{c&&(e.preventDefault(),window.location.replace(n)),null==v||v(e,{title:t,href:n}),null==m||m(n)}},t),"horizontal"!==x?r:null)},m=t(17313),v=t(83116),g=t(37613);const x=e=>{const{componentCls:n,holderOffsetBlock:t,motionDurationSlow:i,lineWidthBold:r,colorPrimary:o,lineType:s,colorSplit:a}=e;return{[`${n}-wrapper`]:{marginBlockStart:-t,paddingBlockStart:t,[n]:Object.assign(Object.assign({},(0,m.Wf)(e)),{position:"relative",paddingInlineStart:r,[`${n}-link`]:{paddingBlock:e.linkPaddingBlock,paddingInline:`${e.linkPaddingInlineStart}px 0`,"&-title":Object.assign(Object.assign({},m.vS),{position:"relative",display:"block",marginBlockEnd:e.anchorTitleBlock,color:e.colorText,transition:`all ${e.motionDurationSlow}`,"&:only-child":{marginBlockEnd:0}}),[`&-active > ${n}-link-title`]:{color:e.colorPrimary},[`${n}-link`]:{paddingBlock:e.anchorPaddingBlockSecondary}}}),[`&:not(${n}-wrapper-horizontal)`]:{[n]:{"&::before":{position:"absolute",insetInlineStart:0,top:0,height:"100%",borderInlineStart:`${r}px ${s} ${a}`,content:'" "'},[`${n}-ink`]:{position:"absolute",insetInlineStart:0,display:"none",transform:"translateY(-50%)",transition:`top ${i} ease-in-out`,width:r,backgroundColor:o,[`&${n}-ink-visible`]:{display:"inline-block"}}}},[`${n}-fixed ${n}-ink ${n}-ink`]:{display:"none"}}}},w=e=>{const{componentCls:n,motionDurationSlow:t,lineWidthBold:i,colorPrimary:r}=e;return{[`${n}-wrapper-horizontal`]:{position:"relative","&::before":{position:"absolute",left:{_skip_check_:!0,value:0},right:{_skip_check_:!0,value:0},bottom:0,borderBottom:`1px ${e.lineType} ${e.colorSplit}`,content:'" "'},[n]:{overflowX:"scroll",position:"relative",display:"flex",scrollbarWidth:"none","&::-webkit-scrollbar":{display:"none"},[`${n}-link:first-of-type`]:{paddingInline:0},[`${n}-ink`]:{position:"absolute",bottom:0,transition:`left ${t} ease-in-out, width ${t} ease-in-out`,height:i,backgroundColor:r}}}}};var _=(0,v.Z)("Anchor",(e=>{const{fontSize:n,fontSizeLG:t,paddingXXS:i}=e,r=(0,g.TS)(e,{holderOffsetBlock:i,anchorPaddingBlockSecondary:i/2,anchorTitleBlock:n/14*3,anchorBallSize:t/2});return[x(r),w(r)]}),(e=>({linkPaddingBlock:e.paddingXXS,linkPaddingInlineStart:e.padding})));function y(){return window}function b(e,n){if(!e.getClientRects().length)return 0;const t=e.getBoundingClientRect();return t.width||t.height?n===window?(n=e.ownerDocument.documentElement,t.top-n.clientTop):t.top-n.getBoundingClientRect().top:t.top}const j=/#([\S ]+)$/,k=e=>{var n;const{rootClassName:t,anchorPrefixCls:r,className:m,style:v,offsetTop:g,affix:x=!0,showInkInFixed:w=!1,children:_,items:k,direction:S="vertical",bounds:C,targetOffset:B,onClick:T,onChange:N,getContainer:E,getCurrentAnchor:A,replace:P}=e;const[L,Z]=a.useState([]),[M,I]=a.useState(null),q=a.useRef(M),O=a.useRef(null),D=a.useRef(null),R=a.useRef(!1),{direction:G,getTargetContainer:F,anchor:z}=a.useContext(p.E_),H=null!==(n=null!=E?E:F)&&void 0!==n?n:y,W=JSON.stringify(L),U=(0,s.useEvent)((e=>{L.includes(e)||Z((n=>[].concat((0,i.Z)(n),[e])))})),V=(0,s.useEvent)((e=>{L.includes(e)&&Z((n=>n.filter((n=>n!==e))))})),Y=(0,s.useEvent)((e=>{if(q.current===e)return;const n="function"==typeof A?A(e):e;I(n),q.current=n,null==N||N(e)})),K=a.useCallback((()=>{if(R.current)return;const e=function(e){let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:5;const i=[],r=H();if(e.forEach((e=>{const o=j.exec(null==e?void 0:e.toString());if(!o)return;const s=document.getElementById(o[1]);if(s){const o=b(s,r);o<n+t&&i.push({link:e,top:o})}})),i.length)return i.reduce(((e,n)=>n.top>e.top?n:e)).link;return""}(L,void 0!==B?B:g||0,C);Y(e)}),[W,B,g]),J=a.useCallback((e=>{Y(e);const n=j.exec(e);if(!n)return;const t=document.getElementById(n[1]);if(!t)return;const i=H();let r=(0,c.Z)(i,!0)+b(t,i);r-=void 0!==B?B:g||0,R.current=!0,(0,u.Z)(r,{getContainer:H,callback(){R.current=!1}})}),[B,g]),X=o()(t,`${r}-wrapper`,{[`${r}-wrapper-horizontal`]:"horizontal"===S,[`${r}-rtl`]:"rtl"===G},m,null==z?void 0:z.className),Q=o()(r,{[`${r}-fixed`]:!x&&!w}),$=o()(`${r}-ink`,{[`${r}-ink-visible`]:M}),ee=Object.assign(Object.assign({maxHeight:g?`calc(100vh - ${g}px)`:"100vh"},null==z?void 0:z.style),v),ne=e=>Array.isArray(e)?e.map((e=>a.createElement(h,Object.assign({replace:P},e,{key:e.key}),"vertical"===S&&ne(e.children)))):null,te=a.createElement("div",{ref:O,className:X,style:ee},a.createElement("div",{className:Q},a.createElement("span",{className:$,ref:D}),"items"in e?ne(k):_));a.useEffect((()=>{const e=H();return K(),null==e||e.addEventListener("scroll",K),()=>{null==e||e.removeEventListener("scroll",K)}}),[W]),a.useEffect((()=>{"function"==typeof A&&Y(A(q.current||""))}),[A]),a.useEffect((()=>{(()=>{var e;const n=null===(e=O.current)||void 0===e?void 0:e.querySelector(`.${r}-link-title-active`);if(n&&D.current){const{style:e}=D.current,t="horizontal"===S;e.top=t?"":`${n.offsetTop+n.clientHeight/2}px`,e.height=t?"":`${n.clientHeight}px`,e.left=t?`${n.offsetLeft}px`:"",e.width=t?`${n.clientWidth}px`:"",t&&(0,l.Z)(n,{scrollMode:"if-needed",block:"nearest"})}})()}),[S,A,W,M]);const ie=a.useMemo((()=>({registerLink:U,unregisterLink:V,scrollTo:J,activeLink:M,onClick:T,direction:S})),[M,T,J,S]);return a.createElement(f.Provider,{value:ie},x?a.createElement(d.Z,{offsetTop:g,target:H},te):te)};const S=e=>{const{prefixCls:n,rootClassName:t}=e,{getPrefixCls:i}=a.useContext(p.E_),r=i("anchor",n),[s,l]=_(r);return s(a.createElement(k,Object.assign({},e,{rootClassName:o()(l,t),anchorPrefixCls:r})))};S.Link=h;var C=S},31797:function(e,n,t){"use strict";t.d(n,{Z:function(){return y}});var i=t(59301),r=t(56762),o=t(92343),s=t(92310),a=t.n(s),l=t(36355),c=t(56511);var u=e=>{const{value:n,formatter:t,precision:r,decimalSeparator:o,groupSeparator:s="",prefixCls:a}=e;let l;if("function"==typeof t)l=t(n);else{const e=String(n),t=e.match(/^(-?)(\d*)(\.(\d+))?$/);if(t&&"-"!==e){const e=t[1];let n=t[2]||"0",c=t[4]||"";n=n.replace(/\B(?=(\d{3})+(?!\d))/g,s),"number"==typeof r&&(c=c.padEnd(r,"0").slice(0,r>0?r:0)),c&&(c=`${o}${c}`),l=[i.createElement("span",{key:"int",className:`${a}-content-value-int`},e,n),c&&i.createElement("span",{key:"decimal",className:`${a}-content-value-decimal`},c)]}else l=e}return i.createElement("span",{className:`${a}-content-value`},l)},d=t(17313),p=t(83116),f=t(37613);const h=e=>{const{componentCls:n,marginXXS:t,padding:i,colorTextDescription:r,titleFontSize:o,colorTextHeading:s,contentFontSize:a,fontFamily:l}=e;return{[`${n}`]:Object.assign(Object.assign({},(0,d.Wf)(e)),{[`${n}-title`]:{marginBottom:t,color:r,fontSize:o},[`${n}-skeleton`]:{paddingTop:i},[`${n}-content`]:{color:s,fontSize:a,fontFamily:l,[`${n}-content-value`]:{display:"inline-block",direction:"ltr"},[`${n}-content-prefix, ${n}-content-suffix`]:{display:"inline-block"},[`${n}-content-prefix`]:{marginInlineEnd:t},[`${n}-content-suffix`]:{marginInlineStart:t}}})}};var m=(0,p.Z)("Statistic",(e=>{const n=(0,f.TS)(e,{});return[h(n)]}),(e=>{const{fontSizeHeading3:n,fontSize:t}=e;return{titleFontSize:t,contentFontSize:n}}));var v=e=>{const{prefixCls:n,className:t,rootClassName:r,style:o,valueStyle:s,value:d=0,title:p,valueRender:f,prefix:h,suffix:v,loading:g=!1,onMouseEnter:x,onMouseLeave:w,decimalSeparator:_=".",groupSeparator:y=","}=e,{getPrefixCls:b,direction:j,statistic:k}=i.useContext(l.E_),S=b("statistic",n),[C,B]=m(S),T=i.createElement(u,Object.assign({decimalSeparator:_,groupSeparator:y,prefixCls:S},e,{value:d})),N=a()(S,{[`${S}-rtl`]:"rtl"===j},null==k?void 0:k.className,t,r,B);return C(i.createElement("div",{className:N,style:Object.assign(Object.assign({},null==k?void 0:k.style),o),onMouseEnter:x,onMouseLeave:w},p&&i.createElement("div",{className:`${S}-title`},p),i.createElement(c.Z,{paragraph:!1,loading:g,className:`${S}-skeleton`},i.createElement("div",{style:s,className:`${S}-content`},h&&i.createElement("span",{className:`${S}-content-prefix`},h),f?f(T):T,v&&i.createElement("span",{className:`${S}-content-suffix`},v)))))};const g=[["Y",31536e6],["M",2592e6],["D",864e5],["H",36e5],["m",6e4],["s",1e3],["S",1]];function x(e,n){const{format:t=""}=n,i=new Date(e).getTime(),r=Date.now();return function(e,n){let t=e;const i=/\[[^\]]*]/g,r=(n.match(i)||[]).map((e=>e.slice(1,-1))),o=n.replace(i,"[]"),s=g.reduce(((e,n)=>{let[i,r]=n;if(e.includes(i)){const n=Math.floor(t/r);return t-=n*r,e.replace(new RegExp(`${i}+`,"g"),(e=>{const t=e.length;return n.toString().padStart(t,"0")}))}return e}),o);let a=0;return s.replace(i,(()=>{const e=r[a];return a+=1,e}))}(Math.max(i-r,0),t)}const w=e=>{const{value:n,format:t="HH:mm:ss",onChange:s,onFinish:a}=e,l=(0,r.Z)(),c=i.useRef(null),u=()=>{const e=function(e){return new Date(e).getTime()}(n);e>=Date.now()&&(c.current=setInterval((()=>{l(),null==s||s(e-Date.now()),e<Date.now()&&(null==a||a(),c.current&&(clearInterval(c.current),c.current=null))}),33.333333333333336))};i.useEffect((()=>(u(),()=>{c.current&&(clearInterval(c.current),c.current=null)})),[n]);return i.createElement(v,Object.assign({},e,{valueRender:e=>(0,o.Tm)(e,{title:void 0}),formatter:(e,n)=>x(e,Object.assign(Object.assign({},n),{format:t}))}))};var _=i.memo(w);v.Countdown=_;var y=v},93314:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMD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