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

1 line
1.1 MiB

This file contains invisible Unicode characters!

This file contains invisible Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

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

(self.webpackChunk=self.webpackChunk||[]).push([[5816],{70746: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={},t="5.0",n={},i=null,r=!1,o=!1,a=null,l=!1,s=null,c=null,u=0;u<arguments.length;u++){var d=arguments[u];if(null!==d)switch(_typeof(d)){case"number":t=d.toFixed(1);break;case"string":d.match(new RegExp("^[0-9]\\.[0-9]+$"))?t=d:a=d;break;case"object":void 0!==d.is3D?i=d:n=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===n.material_id||o||(r=!0)),null!==a&&void 0===n.id&&(n.id=a);var h="",p=!1,f=null,m=null,v=null,g=!1,y=null,x=null,b=null;void 0!==n.height&&(n.height=Math.round(n.height)),void 0!==n.width&&(n.width=Math.round(n.width));var w=function(e){return parseFloat(e)>4?parseFloat(e):5};function C(){try{return window.self!==window.top}catch(e){return!0}}function k(){return(!n.hasOwnProperty("screenshotGenerator")||!n.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,t){c=e,B(e,t)},e.setJavaCodebase=e.setJavaCodebaseVersion=e.isCompiledInstalled=e.setPreCompiledScriptPath=e.setPreCompiledResourcePath=function(){},e.setHTML5CodebaseVersion=function(e,t){var n=parseFloat(e);NaN!==n&&n<5?console.log("The GeoGebra HTML5 codebase version "+n+" is deprecated. Using version latest instead."):(s=e,L(e,t))},e.getHTML5CodebaseVersion=function(){return m},e.getParameters=function(){return n},e.setFontsCSSURL=function(e){b=e},e.setGiacJSURL=function(e){},e.setJNLPFile=function(e){e},e.setJNLPBaseDir=function(e){},e.inject=function(){function t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var i,r="auto",o=n.id,a=!1,s=0;s<arguments.length;s++){var c=arguments[s];"string"==typeof c?(c=c.toLowerCase()).match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?r=c:o=arguments[s]:"boolean"==typeof c?a=c:c instanceof HTMLElement&&(i=c)}function u(){if(l){r=P(r);var s=i||document.getElementById(o);if(s)if(e.removeExistingApplet(s,!1),void 0===n.width&&s.clientWidth&&(n.width=s.clientWidth),void 0===n.height&&s.clientHeight&&(n.height=s.clientHeight),n.width&&n.height||"html5"!==r||(delete n.width,delete n.height),f=r,"screenshot"===r)A(s,n);else{var c=!1;n.hasOwnProperty("playButton")&&n.playButton||n.hasOwnProperty("clickToLoad")&&n.clickToLoad?c=!0:n.hasOwnProperty("playButtonAutoDecide")&&n.playButtonAutoDecide&&(c=(!C()||t())&&k()),c?(f="screenshot",I(s,n,a,r)):E(s,n,a)}else console.log("possibly bug on ajax loading? ")}else setTimeout(u,200)}u()},e.getViews=function(){return i},e.isJavaInstalled=function(){return!1};var S=function(t){var r=function(){n.onError&&n.onError(),R("Error: Fetching material (id "+n.material_id+") failed.",n)},o=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",a="/materials/"+n.material_id+"?scope=basic";j("https://"+o+"/api/proxy.php?path="+encodeURIComponent(a),(function(o){var a=JSON.parse(o),l=a.elements?a.elements.filter((function(e){return"G"==e.type||"E"==e.type}))[0]:a;if(l&&l.url){n.fileName=l.url,_(l.settings||{}),i.is3D=!0;var s="https://www.geogebra.org/images/";e.setPreviewImage(y||l.previewUrl,s+"GeoGebra_loading.png",s+"applet_play.png"),t()}else r()}),r)};function _(e){["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach((function(t){e[t]=!!e[t]})),["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"].forEach((function(t){void 0===n[t]&&void 0!==e[t]&&(n[t]=e[t])})),void 0===n.showToolBarHelp&&(n.showToolBarHelp=n.showToolBar)}function j(e,t,n){var i=new XMLHttpRequest;i.open("GET",e),i.onload=function(){t(i.responseText)},i.onerror=n,i.send()}e.isHTML5Installed=function(){return!0},e.getLoadedAppletType=function(){return f},e.setPreviewImage=function(e,t,n){y=e,x=t,n},e.removeExistingApplet=function(e,t){var i;"string"==typeof e&&(e=document.getElementById(e)),f=null;var r=null;for(i=0;i<e.childNodes.length;i++){var o=e.childNodes[i],a=o.className;"applet_screenshot"===a?t?(o.style.display="block",f="screenshot"):o.style.display="none":"applet_scaler prerender"!==a&&(e.removeChild(o),r=a&&-1!=a.indexOf("appletParameters")?o.id:null,i--)}var l=void 0!==n.id?n.id:r,s=window[l];s&&"function"==typeof s.getBase64&&(s.remove(),window[l]=null)},e.refreshHitPoints=function(){if(w(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var t=e.getAppletObject();return!(!t||"function"!=typeof t.recalculateEnvironments)&&(t.recalculateEnvironments(),!0)},e.startAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.startAnimation)&&(t.startAnimation(),!0)},e.stopAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.stopAnimation)&&(t.stopAnimation(),!0)},e.getAppletObject=function(){var e=void 0!==n.id?n.id:"ggbApplet";return window[e]},e.resize=function(){};var N=function(e){return e&&"false"!==e},E=function(t,n,i){w(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 a=n.width,l=n.height;if(n.disableAutoScale=void 0===n.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():n.disableAutoScale,void 0!==n.width)if(w(m)<=4.4)N(n.showToolBar)&&(n.height-=7),N(n.showAlgebraInput)&&(n.height-=37),n.width<605&&N(n.showToolBar)&&(n.width=605,a=605);else{var u=100;(N(n.showToolBar)||N(n.showMenuBar))&&(n.hasOwnProperty("customToolBar")&&(n.customToolbar=n.customToolBar),u=N(n.showMenuBar)?245:155),a<u&&(n.width=u,a=u)}for(var d in o.style.border="none",o.style.display="inline-block",n)n.hasOwnProperty(d)&&"appletOnLoad"!==d&&o.setAttribute("data-param-"+d,n[d]);b&&o.setAttribute("data-param-fontscssurl",b),e.resize=function(){GGBAppletUtils.responsiveResize(t,n)},window.addEventListener("resize",(function(t){e.resize()}));var p="function"==typeof n.appletOnLoad?n.appletOnLoad:function(){};if(i||void 0===n.width){var f=document.createElement("div");f.className="applet_scaler",f.style.position="relative",f.style.display="block",f.appendChild(o),t.appendChild(f),n.appletOnLoad=function(t){e.resize(),p(t)}}else{n.hasOwnProperty("showSplash")||o.setAttribute("data-param-showSplash","false");var y=t.querySelector(".applet_scaler.prerender"),x=null!==y;if(x)C=y.querySelector(".ggb_preview");else{var C=T(a,l,n.borderColor,!1);(y=document.createElement("div")).className="applet_scaler",y.style.position="relative",y.style.display="block",y.style.width=a+"px",y.style.height=l+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(y,"66%"),w(m)>=5?(n.appletOnLoad=function(e){var n=t.querySelector(".ggb_preview");n&&n.parentNode.removeChild(n),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(y),window.GGBT_wsf_view&&$(window).trigger("resize"),p(e)},x||y.appendChild(C)):o.appendChild(C),y.appendChild(o),x||t.appendChild(y),setTimeout((function(){e.resize()}),1)}function k(e,t){t&&"function"==typeof t.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,t.appletOnLoad):renderGGBElement(e),R("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",t)}function S(e,t){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:e,params:t}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(e){k(e.article,e.params)})),html5AppletsToProcess=null)},w(m)<5&&(e.className+=" geogebraweb")):k(e,t)}if(r){scriptLoadStarted=!0;for(var _=0;_<o.childNodes.length;_++){"TABLE"===o.childNodes[_].tagName&&(o.removeChild(o.childNodes[_]),_--)}if(null!==ggbHTML5LoadedScript){var j=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');null!=j&&j.parentNode.removeChild(j)}var E=document.createElement("script"),A=function(){S(o,n)};E.src=h+v,ggbHTML5LoadedCodebaseIsWebSimple=g,ggbHTML5LoadedCodebaseVersion=m,ggbHTML5LoadedScript=E.src,R("GeoGebra HTML5 codebase loaded: '"+h+"'.",n),c||s&&"5.0"!=s?h.requirejs?__webpack_require__.e(5575).then(function(){var e=[__webpack_require__(15575)];A.apply(null,e)}.bind(this)).catch(__webpack_require__.oe):(E.onload=A,t.appendChild(E)):(g?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),A())}else S(o,n);n.height=l,n.width=a},A=function(t,n,i){var r=T(n.width,n.height,n.borderColor,i),o=document.createElement("div");o.style.position="relative",o.style.display="block",o.style.width=n.width+"px",o.style.height=n.height+"px",o.className="applet_screenshot applet_scaler"+(i?" applet_screenshot_play":""),o.appendChild(r);var a=GGBAppletUtils.getScale(n,t,i);i?(t.appendChild(D()),window.GGBT_wsf_view||(t.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(o,"66%"),t.appendChild(o),1===a||isNaN(a)||(GGBAppletUtils.scaleElement(o,a),o.style.width=n.width+"px",o.style.height=n.height+"px",o.parentNode.style.width=n.width*a+"px",o.parentNode.style.height=n.height*a+"px"),e.resize=function(){Z(t,r,o,i)},window.addEventListener("resize",(function(t){e.resize()})),e.resize()};function Z(e,t,i,r){if(e.contains(t)){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(n,e,r);null!==i.parentNode&&(isNaN(o)||1===o?(GGBAppletUtils.scaleElement(i,1),i.parentNode.style.width=n.width+"px",i.parentNode.style.height=n.height+"px"):(GGBAppletUtils.scaleElement(i,o),i.parentNode.style.width=n.width*o+"px",i.parentNode.style.height=n.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,t){t.appendChild(e)};var I=function(e,t,n,i){A(e,t,!0);for(var r=function(){var n=[];for(a=0;a<e.childNodes.length;a++)n.push(e.childNodes[a]);if(window.GGBT_wsf_view){var r=window.GGBT_wsf_view.renderFullScreen(e,t.id),o=document.getElementById("fullscreencontainer"),l=jQuery(e).find(".fullscreencontent");l.length>0?(r.remove(),l.attr("id","fullscreencontent").show(),jQuery(o).append(l),window.dispatchEvent(new Event("resize"))):E(r,t,!1),window.GGBT_wsf_view.launchFullScreen(o)}else f=i,E(e,t,!1);if(!window.GGBT_wsf_view)for(a=0;a<n.length;a++)e.removeChild(n[a])},o=e.getElementsByClassName("ggb_preview_play"),a=0;a<o.length;a++)o[a].addEventListener("click",r,!1),o[a].addEventListener("ontouchstart",r,!1);"function"==typeof window.ggbAppletPlayerOnload&&window.ggbAppletPlayerOnload(e),k()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},D=function(){var e=document.createElement("div");if(e.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var t='.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");}',n=document.createElement("style");n.styleSheet?n.styleSheet.cssText=t:n.appendChild(document.createTextNode(t)),document.getElementsByTagName("head")[0].appendChild(n)}return e},T=function(e,t,n,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=t-2+"px",r.style.top="0px",r.style.left="0px",r.style.overflow="hidden",r.style.backgroundColor="white";var o="lightgrey";void 0!==n&&(o="none"===n?"transparent":n),r.style.border="1px solid "+o;var a,l,s,c=document.createElement("img");if((c.style.position="relative",c.style.zIndex="1000",c.style.top="-1px",c.style.left="-1px",null!==y&&c.setAttribute("src",y),c.style.opacity=.7,null!==x)&&!i){(a=document.createElement("img")).style.position="absolute",a.style.zIndex="1001",a.style.opacity=1,c.style.opacity=.3,(l=360)>e/4*3&&(l=e/4*3),s=l/5.8,a.setAttribute("src",x),a.setAttribute("width",l),a.setAttribute("height",s);var u=(e-l)/2,d=(t-s)/2;a.style.left=u+"px",a.style.top=d+"px",r.appendChild(a)}return r.appendChild(c),r},P=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},M=["web","webSimple","web3d","tablet","tablet3d","phone"],L=function(e,t){if(m=e,t)B(m,!0);else{var o,a,l=!r;if(l){var s=w(m);!isNaN(s)&&s<4.4&&(l=!1)}o="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var c=m.indexOf("//");for(var u in a=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 B(a,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!l||i.is3D||i.AV||i.SV||i.CV||i.EV2||i.CP||i.PC||i.DA||i.FI||i.PV||N(n.showToolBar)||N(n.showMenuBar)||N(n.showAlgebraInput)||N(n.enableRightClick)||n.appName&&"classic"!=n.appName?a+="web3d/":a+="webSimple/",B(a,!1)}},B=function(e,t){if(e.requirejs)h=e;else{"/"!==e.slice(-1)&&(e+="/"),h=e,null===t&&(t=-1===e.indexOf("http")),p=t,v="web.nocache.js",g=!1;var n=h.split("/");n.length>1&&(t||"webSimple"!==n[n.length-2]?M.indexOf(n[n.length-2])>=0&&(v=n[n.length-2]+".nocache.js"):(v="webSimple.nocache.js",g=!0)),n=e.split("/"),"test"===(m=n[n.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."),L("5.0",t))}},R=function(e,t){window.console&&window.console.log&&(!t||void 0===t.showLogging||t.showLogging&&"false"!==t.showLogging)&&console.log(e)};function O(){var e=t;null!==s?e=s:parseFloat(e)<5&&(e="5.0"),L(e,!1),null!==c&&B(c,p),l=!0}return void 0!==n.material_id?S(O):O(),e},GGBAppletUtils=function(){"use strict";function e(){return void 0!==window.GGBT_wsf_edit}function t(e,t){1!=t?(e.style.transformOrigin="0% 0% 0px",e.style.webkitTransformOrigin="0% 0% 0px",e.style.transform="scale("+t+","+t+")",e.style.webkitTransform="scale("+t+","+t+")",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 n(e,t,n,i,r){if(e.isScreenshoGenerator)return 1;var o,a=void 0!==i&&i,l=null!=e.noScaleMargin&&e.noScaleMargin,s=(o=e.autoHeight)&&"false"!==o,c=function(e,t,n,i,r,o){var a=null;if(null!=o&&""!=o)for(var l=e.parentNode;null!=l;){if((" "+l.className+" ").indexOf(" "+o+" ")>-1){a=l;break}l=l.parentNode}var s=0,c=0,u=0,d=0,h=0,p=0,f=0;if(a)s=a.offsetWidth,c=Math.max(i?a.offsetWidth:0,a.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(s=Math.min(window.innerWidth,document.documentElement.clientWidth),c=Math.min(window.innerHeight,document.documentElement.clientHeight),u=s):(s=window.innerWidth,c=window.innerHeight,u=window.innerWidth),e){var m=e.getBoundingClientRect();m.left>0&&m.left<=s&&(void 0===r||!r)&&("rtl"===document.dir?(h=s-m.width-m.left,p=u<=480?10:30):(p=m.left,h=u<=480?10:30),d=p+h)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(d=40,f=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(d=0,f=40))}return e&&((void 0===n||!n)&&t>0&&t+d<s?s=t:s-=d,"object"!==_typeof(window.GGBT_wsf_view)||!window.GGBT_wsf_view.isFullscreen()||void 0!==n&&n||(c-=f)),{width:s,height:c}}(t,e.width,n,s,a&&window.GGBT_wsf_view||l,r),u=parseInt(c.width),d=e.width,h=e.height;if(void 0===d){var p=t.querySelector(".appletParameters");p&&(d=p.offsetWidth,h=p.offsetHeight)}var f=u/d,m=a?1:c.height/h;return void 0===n||n||(f=Math.min(1,f),m=Math.min(1,m)),Math.min(f,m)}function i(e,t,i){var r,o=1,a=!1;return e.hasOwnProperty("allowUpscale")&&(a=e.allowUpscale),e.hasOwnProperty("scale")&&(o=parseFloat(e.scale),(isNaN(o)||null===o||0===o)&&(o=1),o>1&&(a=!0)),t&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(a=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?o:(r=n(e,t,a,i,e.scaleContainerClass),!a||e.hasOwnProperty("scale")&&1!==o?Math.min(o,r):r)}function r(e){var t=Math.min(window.innerWidth,document.documentElement.clientWidth),n=Math.min(window.innerHeight,document.documentElement.clientHeight),i=e.getBoundingClientRect(),r=(t-i.width)/2,o=(n-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(n,o){var a=n.querySelector(".appletParameters");if(a){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(o.id!==a.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(n)}if(a.parentElement&&/fullscreen/.test(a.parentElement.className))return;var l=i(o,n);e()&&a.setAttribute("data-param-scale",l);for(var s=null,c=0;c<n.childNodes.length;c++)if(void 0!==n.childNodes[c].className&&n.childNodes[c].className.match(/^applet_scaler/)){s=n.childNodes[c];break}if(null!==s&&null!==s.querySelector(".noscale"))return;var u=void 0!==o.id?o.id:"ggbApplet",d=window[u];null!=d&&d.recalculateEnvironments||null===s||s.className.match(/fullscreen/)||(s.parentNode.style.transform="",isNaN(l)||1===l?(t(s,1),s.parentNode.style.width=o.width+"px",s.parentNode.style.height=o.height+"px"):(s.parentNode.style.width=o.width*l+"px",s.parentNode.style.height=o.height*l+"px",t(s,l))),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&r(n),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(a).parents(".content-added-content"))}},isFlexibleWorksheetEditor:e,positionCenter:r,getScale:i,scaleElement:t}}();__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,t){}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 t(){return _typeof(o.readyState)==Y?_typeof(o.body)!=Y&&null!=o.body:/loaded|complete/.test(o.readyState)}var n=t();if(n)e();else{o.addEventListener&&o.addEventListener(Z,r,!1);var i=setInterval((function(){r()}),$)}function r(){if(!n){if(!t())return;n=!0,e(),o.removeEventListener&&o.removeEventListener(Z,r,!1),i&&clearInterval(i)}}}((function(){var t,n,i,r;t=e,n=u(),i=n.body,(r=n.createElement(_)).language=ab,r.crossOrigin=W,r.src=t,webModule.__errFn&&(r.onerror=function(){webModule.__errFn(L,new Error(bb+t))}),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 t=c[e];return null==t?null:t},r=d,webModule.__errFn=e}function B(){function e(e){var t=e.lastIndexOf(rb);-1==t&&(t=e.length);var n=e.indexOf(sb);-1==n&&(n=e.length);var i=e.lastIndexOf(tb,Math.min(n,t));return i>=O?e.substring(O,i+P):W}var t,n=null!=(t=__gwt_getMetaProperty(wb))?t:W;return n==W&&(n=function(){for(var t=o.getElementsByTagName(_),n=O;n<t.length;++n)if(-1!=t[n].src.indexOf(xb))return e(t[n].src);return W}()),n==W&&(n=function(){var e=o.getElementsByTagName(yb);return e.length>O?e[e.length-P].href:W}()),n==W&&function(){var e=o.location;return e.href==e.protocol+zb+e.host+e.pathname+e.search+e.hash}()&&(n=e(o.location.href)),n=function(t){if(t.match(/^\w+:\/\//));else{var n=o.createElement(ub);n.src=t+vb,t=e(n.src)}return t}(n),n}function C(e){return e.match(/^\//)||e.match(/^[a-zA-Z]+:\/\//)?e:webModule.__moduleBase+e}function D(){var e,t=O,i=[],o=[];function a(e){var t=o[e](),n=i[e];if(t in n)return t;var a=[];for(var l in n)a[n[l]]=l;throw r&&r(e,a,t),null}if(__gwt_isKnownPropertyValue=function(e,t){return t in i[e]},webModule.__getPropMap=function(){var e={};for(var t in i)i.hasOwnProperty(t)&&(e[t]=a(t));return e},webModule.__computePropValue=a,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var l=(e=Cb).indexOf(Db);-1!=l&&(t=parseInt(e.substring(l+P),$),e=e.substring(O,l))}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 t=s[L].bindings;s[L].bindings=function(){for(var n=t?t():{},i=e[webModule.__softPermutationId],r=O;r<i.length;r++){var o=i[r];n[o[O]]=o[P]}return n}},webModule.__startLoadingFragment=function(e){return C(e)},webModule.__installRunAsyncCode=function(e){var t=u(),n=t.body,i=t.createElement(_);i.language=ab,i.text=e,n.appendChild(i),n.removeChild(i)},A(),webModule.__moduleBase="/react/build/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")})()},22065:function(e,t,n){"use strict";function i(e){var t=!0;if(e.length>0){for(var n=0;n<e.length;n++)if(0==e[n].compile_success||!e[n].compile_success){t=!1;break}}else t=!1;return t}function r(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",n=[],i=0;i<e.length;i++){var r=e[i],o=t?"".concat(t,"/").concat(r.name):"".concat(r.name);n.push({title:r.name,type:r.type,isLeaf:"tree"!==r.type,key:o})}return n}function o(e,t,n){for(var i=0;i<e.length;i++){var r=e[i];if(r.key===t){r.children=n;break}r.children&&o(r.children,t,n)}return e}function a(e,t,n){var i;return function(){var r=this,o=arguments,a=function(){i=null,n||e.apply(r,o)},l=n&&!i;clearTimeout(i),i=setTimeout(a,t),l&&e.apply(r,o)}}n.d(t,{Ax:function(){return o},Ds:function(){return a},KI:function(){return l},SI:function(){return r},f1:function(){return i}});var l=n(51200).Z.API_SERVER},59167:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var i=n(82242),r=n.n(i),o=n(7557),a=n.n(o),l=n(41498),s=n.n(l),c=n(79800),u=n.n(c),d=n(39647),h=n.n(d),p=n(99571),f=n(59301),m=n(37712),v=["children"],g=function(e){var t=e.children,n=h()(e,v),i=(0,f.useState)(!1),o=u()(i,2),l=o[0],c=o[1];return(0,m.jsx)(p.ZP,r()(r()({},n),{},{loading:l,onClick:function(){var e=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,c(!0),e.next=4,n.onClick(t);case 4:c(!1),e.next=11;break;case 7:e.prev=7,e.t0=e.catch(0),console.error(e.t0),c(!1);case 11:case"end":return e.stop()}}),e,null,[[0,7]])})));return function(t){return e.apply(this,arguments)}}(),children:t}))}},37499:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});n(7557),n(41498);var i=n(82100),r=n.n(i),o=n(29186),a=n.n(o),l=n(13720),s=n.n(l),c=n(80619),u=n.n(c),d=n(47074),h=n.n(d),p=n(85573),f=n.n(p),m=n(59301),v=n(6767),g=n(37568),y="codeBox___WpkVl",x=n(92310),b=n.n(x),w=n(37712),C=function(e){u()(n,e);var t=h()(n);function n(e){var i;return r()(this,n),i=t.call(this,e),f()(s()(i),"canvas",void 0),f()(s()(i),"randomNum",(function(e,t){return Math.floor(Math.random()*(t-e)+e)})),f()(s()(i),"drawPic",(function(){i.randomCode()})),f()(s()(i),"reloadPic",(function(){i.drawPic()})),f()(s()(i),"changeCode",(function(e){console.log(e.target.value,222),i.setState({value:e.target.value,showError:!1})})),f()(s()(i),"onVerify",(function(){var e;return""!==i.state.value.toLowerCase()&&i.state.value.toLowerCase()!==i.state.code.toLowerCase()?(e=!0,v.ZP.error("请输入正确的验证码"),i.reloadPic()):""===i.state.value.toLowerCase()?(e=!0,v.ZP.error("请输入验证码")):i.state.value.toLowerCase()===i.state.code.toLowerCase()&&(e=!1),i.setState({showError:e}),e})),i.canvas=m.createRef(),i.state={value:"",code:"",codeLength:4,fontSizeMin:20,fontSizeMax:22,backgroundColorMin:240,backgroundColorMax:250,colorMin:10,colorMax:20,lineColorMin:40,lineColorMax:180,contentWidth:96,contentHeight:38,showError:!1},i}return a()(n,[{key:"componentDidMount",value:function(){this.drawPic()}},{key:"randomColor",value:function(e,t){var n=this.randomNum(e,t),i=this.randomNum(e,t),r=this.randomNum(e,t);return"rgb(".concat(n,", ").concat(i,", ").concat(r,")")}},{key:"drawText",value:function(e,t,n){e.fillStyle=this.randomColor(this.state.colorMin,this.state.colorMax);var i=this.randomNum(this.state.fontSizeMin,this.state.fontSizeMax);e.font=i+"px SimHei";var r=(this.state.contentWidth-40)/(this.state.code.length-1),o=10;n>0&&(o=10+n*r);var a=this.randomNum(this.state.fontSizeMax,this.state.contentHeight-5);i>40&&(a=40);var l=this.randomNum(-10,10);e.translate(o,a),e.rotate(l*Math.PI/180),e.fillText(t,0,0),e.rotate(-l*Math.PI/180),e.translate(-o,-a)}},{key:"drawLine",value:function(e){for(var t=0;t<1;t++)e.strokeStyle=this.randomColor(this.state.lineColorMin,this.state.lineColorMax),e.beginPath(),e.moveTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),e.lineTo(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight)),e.stroke()}},{key:"drawDot",value:function(e){for(var t=0;t<100;t++)e.fillStyle=this.randomColor(0,255),e.beginPath(),e.arc(this.randomNum(0,this.state.contentWidth),this.randomNum(0,this.state.contentHeight),1,0,2*Math.PI),e.fill()}},{key:"randomCode",value:function(){for(var e=this,t="",n=0;n<this.state.codeLength;n++){t+="QWERTYUPLKJHGFDSAZXCVBNMqwertyupkjhgfdsazxcvbnm1234567890"[Math.floor(57*Math.random())]}this.setState({code:t},(function(){var t=e.canvas.current.getContext("2d");t.textBaseline="bottom",t.fillStyle=e.randomColor(e.state.backgroundColorMin,e.state.backgroundColorMax),t.fillRect(0,0,e.state.contentWidth,e.state.contentHeight);for(var n=0;n<e.state.code.length;n++)e.drawText(t,e.state.code[n],n);e.drawLine(t),e.drawDot(t)}))}},{key:"render",value:function(){var e=this.props,t=e.className,n=e.width,i=void 0===n?300:n;return(0,w.jsxs)("div",{className:b()(y,t),style:{width:i},children:[(0,w.jsx)("aside",{children:(0,w.jsx)(g.Z,{value:this.state.value,onChange:this.changeCode,placeholder:"请输入图片中的验证码"})}),(0,w.jsxs)("div",{children:[(0,w.jsx)("canvas",{onClick:this.reloadPic,ref:this.canvas,width:"100",height:"30"}),(0,w.jsx)("div",{className:"current",onClick:this.reloadPic,children:"看不清?换一张"})]})]})}}]),n}(m.Component),k=C},49296:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var i=n(82100),r=n.n(i),o=n(29186),a=n.n(o),l=n(80619),s=n.n(l),c=n(47074),u=n.n(c),d=n(59301),h=n(37568),p=n(96599),f=n(6767),m="flex___eLcnP",v="color666___TiUhG",g=n(62772),y=n(37712),x=(h.Z.TextArea,function(e){s()(n,e);var t=u()(n);function n(e){var i;return r()(this,n),(i=t.call(this,e)).state={inputVisible:!1,EditInputIndex:-1},i}return a()(n,[{key:"render",value:function(){var e=this,t=this.props,n=t.index,i=t.onAnswerChange,r=t.addChildAnswer,o=(t.exerciseIsPublish,t.answers);t.activeOptionErrorIndex,t.flex;console.log("----",o);var a=this.state,l=a.inputVisible,s=a.EditInputIndex;return(0,y.jsxs)("div",{className:m,children:[(0,y.jsxs)("div",{className:"".concat(v," mb5 mt6"),style:{flex:"0 0 90px"},children:["答案(填空",n+1,"):"]}),(0,y.jsxs)("div",{style:{border:"1px solid #f6f6f6",flex:1,padding:10},children:[null==o?void 0:o.map((function(t,r){return(0,y.jsx)(y.Fragment,{children:s!==r&&(null==t?void 0:t.length)>0?(0,y.jsx)(p.Z,{className:"edit-tag",closable:!(0===n&&0===r),onClose:function(t){t.preventDefault(),1===(null==o?void 0:o.length)&&0===r?e.props.deleteChildAnswermain(n,r):e.props.deleteChildAnswer(n,r)},children:(0,y.jsx)("span",{onDoubleClick:function(t){e.setState({EditInputIndex:r}),t.preventDefault()},children:t})},t):(0,y.jsx)(h.Z,{defaultValue:t,style:{width:78,marginRight:8,height:24,verticalAlign:"top"},onBlur:function(t){t.target.value.replaceAll(" ","").length<=0?f.ZP.info("内容不能为纯空格"):(i(n,r,t.target.value),e.setState({EditInputIndex:-1,inputVisible:!1}))}})})})),!l&&(0,y.jsxs)(p.Z,{className:"site-tag-plus",onClick:function(){r(n),e.setState({inputVisible:!0})},children:[(0,y.jsx)(g.Z,{})," 新增答案"]})]})]})}}]),n}(d.Component))},73259:function(e,t,n){"use strict";n.d(t,{d4:function(){return j},VP:function(){return k}});var i=n(59301),r="digitalLabel___hkWuZ",o="active___jawU1",a="titleEditor___wX1lW",l="title___SuT2h",s="editIcon___XrTIi",c="paperTab___GUxeB",u="tabItem___or0fY",d="dottedLine___Ln0Xr",h=n(37712),p=function(e){var t=e.number,n=e.active,i=e.className;return(0,h.jsx)("div",{className:"".concat(r," ").concat(n?o:""," ").concat(i),children:t})},f=n(7557),m=n.n(f),v=n(41498),g=n.n(v),y=n(79800),x=n.n(y),b=n(25399),w=n(37568),C=n(6767),k=function(e){var t=e.defaultValue,n=e.onFinish,r=(0,i.useState)(!1),o=x()(r,2),c=o[0],u=o[1],d=(0,i.useState)(t),p=x()(d,2),f=p[0],v=p[1];return(0,i.useEffect)((function(){v(t)}),[t]),(0,h.jsx)("div",{className:a,children:c?(0,h.jsx)(w.Z,{autoFocus:!0,maxLength:60,style:{textAlign:"center",marginTop:20,marginBottom:20},value:f,onChange:function(e){v(e.target.value)},onBlur:g()(m()().mark((function e(){var t;return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==f||null===(t=f.replaceAll(" ",""))||void 0===t?void 0:t.length)<=0)){e.next=3;break}return C.ZP.error("试卷标题不能为空"),e.abrupt("return");case 3:return e.next=5,n(f);case 5:e.sent&&u(!1);case 7:case"end":return e.stop()}}),e)}))),onPressEnter:g()(m()().mark((function e(){var t;return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!((null==f||null===(t=f.replaceAll(" ",""))||void 0===t?void 0:t.length)<=0)){e.next=3;break}return C.ZP.error("试卷标题不能为空"),e.abrupt("return");case 3:return e.next=5,n(f);case 5:e.sent&&u(!1);case 7:case"end":return e.stop()}}),e)})))}):(0,h.jsxs)("div",{className:l,onDoubleClick:function(){return u(!0)},children:[f,(0,h.jsx)(b.Z,{title:"编辑试卷名称",children:(0,h.jsx)("i",{className:"".concat(s," iconfont icon-bianji_Hover"),onClick:function(){return u(!0)}})})]})})},S=n(77019),_=n(5269),j=function(e){var t,n,r,a,l,s,f,v=e.onChange,y=void 0===v?g()(m()().mark((function e(){return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:case"end":return e.stop()}}),e)}))):v,b=e.tabs,w=e.activeKey,C=e.defaultActiveKey,k=e.className,j=void 0===k?"":k,N=(0,i.useState)(void 0===C?null===(t=b[0])||void 0===t?void 0:t.key:C),E=x()(N,2),A=E[0],Z=E[1];return(0,i.useEffect)((function(){void 0!==w&&Z(w)}),[w]),(0,h.jsxs)(S.Z,{justify:"center",align:"middle",className:"".concat(c," ").concat(j),children:[(0,h.jsxs)(_.Z,{className:"".concat(u," ").concat(A===(null===(n=b[0])||void 0===n?void 0:n.key)?o:""),onClick:g()(m()().mark((function e(){var t;return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y(b[0].key);case 2:Z(null===(t=b[0])||void 0===t?void 0:t.key);case 3:case"end":return e.stop()}}),e)}))),children:[(0,h.jsx)(p,{number:1,active:A===(null===(r=b[0])||void 0===r?void 0:r.key),className:"mr10"}),(0,h.jsx)("span",{children:null===(a=b[0])||void 0===a?void 0:a.label})]}),(0,h.jsx)(_.Z,{flex:"188px",className:"".concat(d," ml30 mr30")}),(0,h.jsxs)(_.Z,{className:"".concat(u," ").concat(A===(null===(l=b[1])||void 0===l?void 0:l.key)?o:""),onClick:g()(m()().mark((function e(){var t,n;return m()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y(null===(t=b[1])||void 0===t?void 0:t.key);case 2:Z(null===(n=b[1])||void 0===n?void 0:n.key);case 3:case"end":return e.stop()}}),e)}))),children:[(0,h.jsx)(p,{number:2,active:A===(null===(s=b[1])||void 0===s?void 0:s.key),className:"mr10"}),(0,h.jsx)("span",{children:null===(f=b[1])||void 0===f?void 0:f.label})]})]})}},84698:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var i=n(37639),r="text___FxbAX",o="wrap___UlBQ1",a="contact____pUDq",l="img___BapAv",s=n(32637),c=n(37712),u=function(e){var t=e.type,n=e.style,u=(0,c.jsxs)("div",{className:o,onClick:function(e){e.preventDefault(),e.stopPropagation()},children:[(0,c.jsxs)("p",{children:["shixun"===t||"paths"===t?"当前实践项目是高消耗类型的实验。":"当前试卷包含高消耗类型的实验。",(0,c.jsx)("br",{}),"根据平台使用规则,需要授权才能使用。","paths"===t?"发送到课堂":"发布","使用之前,请先联系平台管理员获取授权码。"]}),(0,c.jsxs)("div",{className:a,children:[(0,c.jsx)("div",{className:l,children:(0,c.jsx)("img",{src:s,width:"124px",height:"124px"})}),(0,c.jsx)("div",{className:"tc font14 mt10",style:{color:"#777A93"},children:"扫一扫,获取授权码"})]})]});return(0,c.jsx)(i.Z,{content:u,children:(0,c.jsx)("span",{className:r,style:n,children:"高消耗"})})}},32110:function(e,t,n){"use strict";n.d(t,{Z:function(){return b}});var i=n(7557),r=n.n(i),o=n(41498),a=n.n(o),l=n(79800),s=n.n(l),c=n(59301),u="imageDimensions___a7crR",d="img___Kroat",h="fullWidth___c492T",p=n(92310),f=n.n(p),m=n(29787),v=n(2859),g=n(87281),y=n(30406),x=n(37712),b=function(e){var t=e.data,n=e.className,i=e.fullWidth,o=e.style,l=void 0===o?{}:o,p=e.onClose,b=e.onOk,w=e.showFullTools,C=e.noAssociationId,k=(0,c.useRef)(null),S=(0,c.useRef)(null),_=(0,c.useRef)(null),j=(0,c.useRef)(null),N=(0,c.useState)(!1),E=s()(N,2),A=E[0],Z=E[1],I=(0,c.useState)("正在加载中"),D=s()(I,2),T=D[0],P=D[1];(0,c.useEffect)((function(){return _.current||(_.current=document.createElement("style"),document.head.appendChild(_.current)),null!=t&&t.visible?(document.body.setAttribute("data-custom","y-hidden"),_.current.innerHTML=" html { overflow-y: hidden; }",null!=t&&t.src&&M()):(document.body.removeAttribute("data-custom"),_.current&&(document.head.removeChild(_.current),_.current=null)),function(){document.body.removeAttribute("data-custom"),_.current&&(document.head.removeChild(_.current),_.current=null)}}),[null==t?void 0:t.visible]);var M=function(){var e=a()(r()().mark((function e(){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Z(!0),P("正在加载中"),e.next=4,(0,y.ZJ)(null==t?void 0:t.src);case 4:n=e.sent,k.current.src="",k.current.src=n,k.current.onload=function(){B()},Z(!1),P("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),L=function(){var e=a()(r()().mark((function e(n){var i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Z(!0),P("正在保存中"),e.next=4,(0,g.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:t.title,file:n.dataUrl}});case 4:if(null==(i=e.sent)||!i.id||C){e.next=12;break}return e.next=8,(0,g.ZP)("/api/attachments/".concat(t.id,"/add_subitem.json"),{method:"post",body:{subitem_id:null==i?void 0:i.id,settings:JSON.stringify(n.state)}});case 8:0===e.sent.status&&b(),e.next=13;break;case 12:null!=i&&i.id&&b(i);case 13:Z(!1),P("");case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),B=function(){S.current=new v.hP(k.current),S.current.targetRoot=j.current,S.current.addEventListener("render",L),S.current.addEventListener("beforeclose",p),w&&(S.current.availableMarkerTypes=S.current.ALL_MARKER_TYPES,S.current.uiStyleSettings.redoButtonVisible=!0,S.current.uiStyleSettings.notesButtonVisible=!0,S.current.uiStyleSettings.zoomButtonVisible=!0,S.current.uiStyleSettings.zoomOutButtonVisible=!0,S.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=S.current.uiStyleSettings,S.current.show(),null!=t&&t.snapshotData&&S.current.restoreState(t.snapshotData),setTimeout((function(){var e;window.scrollTo(0,0),(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 t=document.querySelector(e.name);t&&t.setAttribute("title",e.title)}))}),300)};return(0,x.jsx)(c.Fragment,{children:(null==t?void 0:t.visible)&&(0,x.jsx)(m.Z,{spinning:A,tip:T,style:{position:"absolute",width:"100vw"},children:(0,x.jsx)("div",{ref:j,className:f()(u,n,i?h:""),style:l,children:(0,x.jsx)("img",{className:d,ref:k})})})})}},75344:function(e,t,n){"use strict";var i=n(79800),r=n.n(i),o=n(59301),a=n(40862),l=(n(48136),n(90786)),s=n(62957),c=n(37712),u=(0,o.forwardRef)((function(e,t){var n=e.callback,i=e.width,u=e.onChange,d=e.disabled,h=e.readOnly,p=e.type,f=void 0===p?"":p,m=e.value,v=void 0===m?"":m,g=e.style,y=void 0===g?{}:g,x=(0,o.useRef)(),b=(0,o.useRef)(),w=(0,o.useState)(0),C=r()(w,2),k=C[0],S=C[1],_=(0,o.useState)(0),j=r()(_,2),N=j[0],E=j[1],A=(0,o.useState)(!1),Z=r()(A,2),I=Z[0],D=Z[1],T=function(){var e=document.createElement("div");e.innerHTML=x.current.getValue();var t=e.innerText;return n&&n(t),t};(0,o.useImperativeHandle)(t,(function(){return{getData:T}}));var P=function(e,t,n,i){var r=document.body.clientHeight,o=document.body.clientWidth;return!(e<20&&n>e||e>o-20&&n<e||t<20&&i>t||t>r-20&&i<t)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};(0,o.useEffect)((function(){I&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],t=window.innerWidth/2-e.offsetWidth/2,n=window.innerHeight/2-e.offsetHeight/2;S(t),E(n)}),0)}),[I]);return(0,c.jsxs)("div",{style:y,children:[(0,c.jsx)("div",{style:{width:i||"100%",position:"relative"},className:"".concat(a.Z.mathFillWrap," ").concat(d||h?"cursorDefault":""),onClick:function(){d||h||D(!0)},children:(0,c.jsx)("math-field",{disabled:d,locale:"zh_cn",class:"".concat(a.Z.mathField," ").concat(f),readOnly:h,placeholder:"请输入公式",ref:x,style:{width:"100%",fontSize:v?18:14},value:v||""})}),(0,c.jsx)(s.Z,{maskClosable:!1,centered:!0,width:860,style:{position:"absolute",left:k,top:N},title:(0,c.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var t=e.clientX-k,n=e.clientY-N;document.body.onmousemove=function(e){var i=e.clientX-t,r=e.clientY-n,o=document.getElementsByClassName("markdown-popup-form")[0],a=window.innerWidth-o.offsetWidth,l=window.innerHeight-o.offsetHeight;i=Math.max(0,Math.min(i,a)),r=Math.max(0,Math.min(r,l)),P(e.clientX,e.clientY,t,n)&&(S(i),E(r))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:"输入公式"}),open:I,onOk:function(){var e=b.current.getData();x.current.setValue(e),u(e),D(!1)},onCancel:function(){D(!1)},destroyOnClose:!0,className:"markdown-popup-form",children:(0,c.jsx)(l.Z,{value:v,ref:b,onChange:u,showSaveButton:!1})})]})}));t.Z=u},90786:function(e,t,n){"use strict";var i=n(59301),r=n(77019),o=n(5269),a=n(20554),l=n(99571),s=n(83449),c=n(40862),u=(n(48136),n(37712)),d=(0,i.forwardRef)((function(e,t){var n=e.callback,d=e.showSaveButton,h=e.value,p=void 0===h?"":h,f=(0,i.useRef)(),m=function(e){f.current.setValue(f.current.getValue()+" "+e.value+" ")},v=[{key:"1",label:"快捷模板",children:(0,u.jsx)(r.Z,{className:c.Z.lists,gutter:[10,10],children:[{name:"分数得分",value:"\\frac{x}{y}",children:[{name:"分数 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"导数 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"模算术 Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"根式角标",value:"\\sqrt{x}",children:[{name:"根式 Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"上下标 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"重音符及其他 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"极限对数",value:"\\lim_{x \\to 0}",children:[{name:"极限 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"对数指数 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"界限 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"三角函数",value:"\\sin a",children:[{name:"三角函数 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"反三角函数 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"双曲函数 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"反双曲函数 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"积分运算",value:"\\int_{a}^{b}",children:[{name:"积分 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"双重积分 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"三重积分 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"曲线积分 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"大型运算",value:"\\sum_{a}^{b}",children:[{name:"求和 Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"乘积余积 Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"并集交集 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"析取合取 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"括号取整",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"括号 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}].map((function(e,t){return(0,u.jsxs)(o.Z,{flex:"110px",className:c.Z.item,children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(s.Z,{value:"$$".concat(e.value,"$$")}),e.name]}),(0,u.jsx)("div",{className:c.Z.children,children:e.children.map((function(e,t){return(0,u.jsxs)("div",{children:[(0,u.jsx)("h1",{children:e.name}),(0,u.jsx)(r.Z,{gutter:[10,10],children:e.data.map((function(e,t){return(0,u.jsx)(o.Z,{onClick:function(){return m(e)},className:c.Z.diamond,children:(0,u.jsx)(s.Z,{value:"`$$"+e.value+"$$`"})},t)}))})]},t)}))})]})}))})},{key:"2",label:"公式模板",children:(0,u.jsx)(r.Z,{className:c.Z.lists,gutter:[10,10],children:[{name:"代数",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:"\\left\\{\\begin{matrix} \r\n x=a + r\\text{cos}\\theta \\ \r\n y=b + r\\text{sin}\\theta \r\n\\end{matrix}\\right. "},{value:"\\begin{array}{l} \r\n \\text{对于方程形如:}x^{3}-1=0 \\ \r\n \\text{设}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r\n x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r\n x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r\n\\end{array} "},{value:"\\begin{array}{l} \r\n a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r\n \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r\n \\left\\{\\begin{matrix} \r\n \\Delta \\gt 0\\text{方程有两个不相等的实根} \\ \r\n \\Delta = 0\\text{方程有两个相等的实根} \\ \r\n \\Delta \\lt 0\\text{方程无实根} \r\n\\end{matrix}\\right. \r\n\\end{array} "},{value:"\\begin{array}{l} \r\n a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r\n \\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r\n \\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r\n \\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r\n \\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r\n \\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r\n\\end{array} "}]}]},{name:"几何",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:"\\left.\\begin{matrix} \r\n a \\perp \\alpha \\ \r\n b \\perp \\alpha \r\n\\end{matrix}\\right\\}\\Rightarrow a \\parallel b"},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:"\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r\n \\Rightarrow a \\perp \\beta "},{value:"\\left.\\begin{matrix} \r\n a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r\n a \\parallel \\partial ,b \\parallel \\partial \r\n\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha "},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:"\\left.\\begin{matrix} \r\n m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r\n a \\perp m,a \\perp n \r\n\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha "},{value:"\\begin{array}{c} \r\n \\text{直角三角形中,直角边长a,b,斜边边长c} \\ \r\n a^{2}+b^{2}=c^{2} \r\n\\end{array}"}]}]},{name:"不等式",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:"\\begin{array}{c} \r\n a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r\n a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r\n\\end{array}"},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:"\\begin{array}{c} \r\n a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r\n \\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r\n\\end{array}"},{value:"\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r\n\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) "},{value:"\\begin{array}{c} \r\n a,b \\in R^{+} \\ \r\n \\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r\n \\left( \\text{当且仅当}a=b\\text{时取“}=\\text{”号}\\right) \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n a,b \\in R \\ \r\n \\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r\n \\left( \\text{当且仅当}a=b\\text{时取“}=\\text{”号}\\right) \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r\n\\end{array}"}]}]},{name:"积分",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"三角",value:"e^{i \\theta}",children:[{name:"求和 Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"统计",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:"\\begin{array}{c} \r\n \\text{若}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r\n \\text{则}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r\n\\end{array}"},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:"\\begin{array}{c} \r\n P \\left( \\emptyset \\right) =0 \\\\ \r\n P \\left( S \\right) =1 \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n \\forall A \\in S \\\\ \r\n P \\left( A \\right) \\ge 0 \r\n\\end{array}"},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:"\\begin{array}{c} \r\n S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r\n P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n P_{n}=n! \\\\ \r\n A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r\n\\end{array}"}]}]}].map((function(e,t){return(0,u.jsxs)(o.Z,{flex:"110px",className:c.Z.item,children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(s.Z,{value:"`$$"+e.value+"$$`"}),e.name]}),(0,u.jsx)("div",{className:c.Z.children,children:e.children.map((function(e,t){return(0,u.jsxs)("div",{children:[e.name&&(0,u.jsx)("h1",{children:e.name}),(0,u.jsx)(r.Z,{gutter:[10,10],children:e.data.map((function(e,t){return(0,u.jsx)(o.Z,{onClick:function(){return m(e)},className:c.Z.diamond,children:(0,u.jsx)(s.Z,{value:"`$$"+e.value+"$$`"})},t)}))})]},t)}))})]})}))})}],g=function(){var e=document.createElement("div");e.innerHTML=f.current.getValue();var t=e.innerText;return n&&n(t),t};return(0,i.useImperativeHandle)(t,(function(){return{getData:g}})),(0,u.jsxs)("div",{className:c.Z.mathWrap,children:[(0,u.jsx)(a.Z,{defaultActiveKey:"1",items:v}),(0,u.jsx)("math-field",{locale:"zh_cn",className:c.Z.mathField,placeholder:"请打开键盘,输入公式",ref:f,style:{width:800,marginTop:30,fontSize:18},children:p||""}),d&&(0,u.jsx)("div",{className:c.Z.button,children:(0,u.jsx)(l.ZP,{size:"large",onClick:g,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})}));t.Z=d},37286:function(e,t,n){"use strict";var i=n(82242),r=n.n(i),o=(n(59301),n(93314)),a=n(99571),l=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,i=void 0===n?{}:n,s=e.styles,c=void 0===s?{}:s,u=e.customText,d=e.ButtonText,h=e.ButtonClick,p=e.Buttonclass,f=e.ButtonTwo,m=e.imgStyles,v=e.loading,g=void 0!==v&&v,y=e.className,x=void 0===y?"":y;return(0,l.jsxs)("section",{className:"tc animated fadeIn ".concat(x),style:r()({color:"#999",margin:"100px auto",visibility:g?"hidden":"visible"},c),children:[(0,l.jsx)("img",{src:t||o,style:r()(r()({},m),{},{pointerEvents:"none",userSelect:"none"})}),(0,l.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),d&&(0,l.jsx)(a.ZP,r()(r()({className:p,onClick:h},i),{},{children:d})),f&&f]})}},92216:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var i=n(82242),r=n.n(i),o=n(7557),a=n.n(o),l=n(41498),s=n.n(l),c=n(79800),u=n.n(c),d=n(59301),h={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},p=n(99571),f=n(70557),m=n(50062),v=n(25399),g=n(30406),y=n(62928),x=n(37286),b=n(51200),w=n(12116),C=n(37712),k=function(e){var t,n,i,o,l,c,k=e.editOffice,S=void 0===k?"view":k,_=e.data,j=e.issaver,N=e.onSaver,E=(e.theme,e.type),A=e.filename,Z=e.monacoEditor,I=e.className,D=e.style,T=e.close,P=e.onClose,M=e.hasMask,L=e.disabledDownload,B=e.onImgDimensions,R=e.showNodata,O=e.recordInfo,F=(0,d.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),W=u()(F,2),H=(W[0],W[1],(0,d.useState)("")),z=u()(H,2),G=(z[0],z[1]),V=(0,d.useState)(),K=u()(V,2),U=K[0],q=K[1],Y="build"===window.ENV?"/react/build":"",X=location.host.startsWith("localhost")?b.Z.PROXY_SERVER:b.Z.API_SERVER,J=(0,d.useRef)();null!==(t=_)&&void 0!==t&&t.startsWith("/api")&&"txt"!==E&&(_=b.Z.API_SERVER+_);function Q(e){return $.apply(this,arguments)}function $(){return($=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"pdfdata"===t.data.type&&(N(t.data.data),window.removeEventListener("message",Q,!1)),console.log("mess---:",t.data);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}A&&Z&&(Z.filename=A),(0,d.useEffect)((function(){var e,t=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==t||t.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&G(t[1])}))}),[]),(0,d.useEffect)((function(){var e;"office"===E&&(_.indexOf("bigfilescdn.")>-1||_.indexOf("bigfiles1")>-1?q({url:_,fileType:(e=_,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:_.indexOf("model=edit")?"edit":"view"}):ee())}),[E,_]);var ee=function(){var e=s()(a()().mark((function e(){var t,n,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",_),t=_,_.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,(0,y.gJ)({attachment_id:n});case 6:(i=e.sent).url=X+i.url,q(i);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){_.startsWith("http")||_.startsWith("blob:")?ne():(0,g.Sv)(A||"educoder",_,A)},ne=function(){O&&(0,w.fc)({id:null==O?void 0:O.id,watch_type:1,course_id:null==O?void 0:O.course_id}),(0,g.Nd)(A||"educoder",decodeURIComponent(_))};return(0,C.jsxs)("div",{style:r()({},D||{}),className:"".concat(M&&h.bgBlack," ").concat(E?h.wrp:"hide"),children:[T&&(0,C.jsxs)("div",{className:h.close,ref:J,children:[!!B&&(0,C.jsx)(v.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return J.current},children:(0,C.jsx)("span",{onClick:function(){P(),B()},children:(0,C.jsx)("i",{className:"icon-yulanpizhu"})})}),!L&&(0,C.jsx)(v.Z,{title:"点击下载此文件",getPopupContainer:function(){return J.current},children:(0,C.jsx)("span",{onClick:ne,children:(0,C.jsx)("i",{className:"icon-quxiaozhiding"})})}),j&&(0,C.jsx)(v.Z,{title:"保存pdf并退出",getPopupContainer:function(){return J.current},children:(0,C.jsx)("span",{className:"",onClick:function(){var e=document.getElementById("pdfiframe");window.addEventListener("message",Q,!1),setTimeout((function(){e.contentWindow.postMessage("getData","*")}),300)},children:(0,C.jsx)("i",{className:"icon-baocun"})})}),(0,C.jsx)(v.Z,{title:"关闭",getPopupContainer:function(){return J.current},children:(0,C.jsx)("span",{className:"",onClick:function(){P()},children:(0,C.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,C.jsx)("div",{className:"".concat(h[I]," ").concat(I," ").concat(h.monaco," ").concat("txt"===E?"show":"hide"),children:"txt"===E&&(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(m.ZP,r()({},Z))})}),"audio"===E&&(0,C.jsx)("audio",{src:"".concat((null===(n=_)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(i=_)||void 0===i?void 0:i.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(_),autoPlay:!0}),"video"===E&&(0,C.jsx)(C.Fragment,{children:(null===(o=_)||void 0===o?void 0:o.indexOf("http"))>-1?(0,C.jsx)("video",{controls:!0,src:"".concat(_),autoPlay:!0}):(0,C.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(_),autoPlay:!0})}),"office"===E&&U&&(0,C.jsx)("iframe",{src:"".concat(Y,"/office.html?key=").concat(U.key,"&url=").concat(btoa(U.url),"&callbackUrl=").concat(X+(U.callbackUrl||""),"&fileType=").concat(U.fileType,"&title=").concat(U.title||"","&model=").concat(S,"&officeServer=").concat(b.Z.ONLYOFFICE,"&disabledDownload=").concat(!!L)}),"html"===E&&(0,C.jsx)("iframe",{src:_+"&disposition=inline"}),"pdf"===E&&(0,C.jsx)("iframe",{id:"pdfiframe",src:"".concat(Y,"/js/pdfview/index.html?filename=").concat(A||"educoder.pdf","&url=").concat(encodeURIComponent(_),"&disabledDownload=").concat(!!L,"&model=").concat(S)}),"image"===E&&(0,C.jsx)("img",{src:"".concat((null===(l=_)||void 0===l?void 0:l.indexOf("http://"))>-1||(null===(c=_)||void 0===c?void 0:c.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(_)}),("other"===E||"download"===E)&&(0,C.jsx)(C.Fragment,{children:R?(0,C.jsx)(x.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,C.jsx)(p.ZP,{icon:(0,C.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:te,disabled:L,children:"下载"})}):(0,C.jsxs)(p.ZP,{type:"primary",size:"middle",onClick:te,disabled:L,children:[(0,C.jsx)(f.Z,{}),"点击下载"]})}),"flowChart"===E&&(0,C.jsx)("div",{className:"embed",children:(0,C.jsx)("iframe",{src:"/drawio/src/main/webapp/viewer.html?id=".concat(_||"","&gapi=0&od=0&db=0&gh=0&gl=0"),width:"100%",height:"100%",frameBorder:"0"})})]})}},88595:function(e,t,n){"use strict";n.d(t,{t:function(){return J}});var i=n(39647),r=n.n(i),o=n(91232),a=n.n(o),l=n(85573),s=n.n(l),c=n(82242),u=n.n(c),d=n(79800),h=n.n(d),p=n(59301),f=n(37568),m=n(28284),v=n(62957),g=n(77019),y=n(5269),x=n(71051),b=n(82326),w=n(47889),C=n(93484),k=n(76805),S=n(86787),_=n(7557),j=n.n(_),N=n(41498),E=n.n(N),A=n(6767),Z=n(99571),I=n(29787),D=n(24334),T="result___UYRo8",P="left___TRaH5",M="right___twp9s",L="box___vwndt",B="li___hRe2d",R=n(87281),O=n(70122),F=n(16039),W=n(56102),H=n(57864),z=n(37712),G=function(e){var t=e.buttonProps,n=e.buttonText,i=e.form,r=e.hackIdentifier,o=void 0===r?"":r,a=e.answerKey,l=e.data,s=(0,p.useState)(!1),c=h()(s,2),d=c[0],m=c[1],g=(0,p.useState)(!1),y=h()(g,2),x=y[0],b=y[1],w=(0,p.useState)(!1),C=h()(w,2),k=C[0],S=C[1],_=(0,p.useState)({}),N=h()(_,2),G=N[0],V=N[1],K=(0,p.useState)(""),U=h()(K,2),q=U[0],Y=U[1],X=(0,p.useState)(""),J=h()(X,2),Q=J[0],$=J[1],ee=(0,p.useRef)(o),te=(0,p.useRef)(""),ne=(0,p.useRef)(!1);(0,p.useEffect)((function(){k&&ae()}),[k]),(0,p.useEffect)((function(){return function(){sessionStorage.removeItem("projectFill")}}),[]);var ie=function(){return(new Date).getTime()},re=null==l?void 0:l.code,oe=function(){var e,t,n=re?null==l?void 0:l.code:null===(e=i.getFieldValue("hack_codes"))||void 0===e?void 0:e.code,r=re?null==l?void 0:l.answer_content:i.getFieldValue(a),o=re?null==l?void 0:l.input:null===(t=i.getFieldValue("hack_sets"))||void 0===t?void 0:t.input;null==r||r.forEach((function(e){var t=e.value||e.answer_text||"";n=n.replace(/(@▁@|@▁▁@)/,t)})),$(o),Y(n),V({}),S(!0)},ae=function(){var e=E()(j()().mark((function e(){var t,n,r,o,a,s,c,d;return j()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return d=function(){return d=E()(j()().mark((function e(){var t,n,i,r,l;return j()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,O.rX)(te.current,"submit");case 2:if(t=e.sent,n=t.status,i=t.data,r=ie(),l=r-o>1e3*(a+3)*s,ne.current){e.next=9;break}return e.abrupt("return");case 9:if(!l){e.next=13;break}return A.ZP.error("调试代码超时"),m(!1),e.abrupt("return");case 13:if(0!==n){e.next=17;break}return m(!1),V(u()(u()({},i),{},{showText:!0})),e.abrupt("return");case 17:setTimeout(c,1e3);case 18:case"end":return e.stop()}}),e)}))),d.apply(this,arguments)},c=function(){return d.apply(this,arguments)},o=ie(),a=re?null==l?void 0:l.time_limit:null===(t=i.getFieldsValue())||void 0===t?void 0:t.hack.time_limit,s=re?null==l||null===(n=l.answer_content)||void 0===n?void 0:n.length:null===(r=i.getFieldsValue())||void 0===r||null===(r=r.standard_answers)||void 0===r?void 0:r.length,m(!0),e.next=8,(0,O.bM)(te.current,{test_hack_code:q,test_input:Q});case 8:c();case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),le=function(){var e=E()(j()().mark((function e(){var t,n,r,o,a,s,c,d;return j()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l){e.next=25;break}return e.prev=1,e.next=4,i.validateFields();case 4:e.next=11;break;case 6:return e.prev=6,e.t0=e.catch(1),null!==e.t0&&void 0!==e.t0&&null!==(t=e.t0.errorFields)&&void 0!==t&&null!==(t=t[0])&&void 0!==t&&null!==(t=t.name)&&void 0!==t&&t.includes("standard_answers")?A.ZP.error("填空项答案不能为空"):A.ZP.error(e.t0.errorFields[0].errors[0]),i.scrollToField(e.t0.errorFields[0].name,{behavior:"smooth",block:"center"}),e.abrupt("return");case 11:if(b(!0),n="",r=i.getFieldsValue(),ee.current){e.next=22;break}return e.next=17,(0,R.ZP)("/api/problems.json",{method:"post",body:u()(u()({},r),{},{hack:u()(u()({},null==r?void 0:r.hack),{},{sub_discipline_id:null==r||null===(o=r.hack)||void 0===o||null===(o=o.sub_discipline_id)||void 0===o?void 0:o[1],difficult:r.difficulty,item_banks_group_id:r.item_banks_group_id}),hack_codes:u()(u()({},r.hack_codes),{},{code:D.Base64.encode(r.hack_codes.code)}),hack_sets:[u()({},r.hack_sets)],is_blank:!0,item_type:"BPROGRAM"})});case 17:n=e.sent,ee.current=null===(a=n)||void 0===a?void 0:a.identifier,sessionStorage.projectFill=null===(s=n)||void 0===s?void 0:s.identifier,e.next=25;break;case 22:return e.next=24,(0,R.ZP)("/api/problems/".concat(ee.current,".json"),{method:"put",body:u()(u()({},r),{},{hack:u()(u()({},null==r?void 0:r.hack),{},{sub_discipline_id:null==r||null===(c=r.hack)||void 0===c||null===(c=c.sub_discipline_id)||void 0===c?void 0:c[1],difficult:r.difficulty,item_banks_group_id:r.item_banks_group_id}),hack_codes:u()(u()({},r.hack_codes),{},{code:D.Base64.encode(r.hack_codes.code)}),update_hack_sets:[u()({},r.hack_sets)],is_blank:!0,item_type:"BPROGRAM"})});case 24:n=e.sent;case 25:return e.next=27,(0,R.ZP)("/api/problems/".concat(ee.current,"/start.json"),{method:"get"});case 27:if(0!==(null==(d=e.sent)?void 0:d.status)){e.next=34;break}return te.current=null==d?void 0:d.identifier,ne.current=!0,b(!1),oe(),e.abrupt("return");case 34:b(!1);case 35:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(){return e.apply(this,arguments)}}();return(0,z.jsxs)("div",{children:[(0,z.jsx)(Z.ZP,u()(u()({loading:x},t),{},{onClick:le,children:n})),(0,z.jsx)(v.Z,{open:k,title:"调试代码",destroyOnClose:!0,width:1200,okText:"运行测试",confirmLoading:d,cancelButtonProps:{style:{display:"none"}},onOk:function(){return ae()},onCancel:function(){ne.current=!1,S(!1)},children:(0,z.jsxs)("div",{className:T,children:[(0,z.jsxs)("div",{className:P,children:[(0,z.jsxs)("div",{className:"mb20",children:[(0,z.jsx)("span",{className:"c-black",children:"执行代码"}),!l&&(0,z.jsx)(W.CopyToClipboard,{text:q,onCopy:function(){return A.ZP.success("复制成功")},children:(0,z.jsxs)("span",{style:{float:"right"},className:"current c-light-primary",children:[(0,z.jsx)("i",{className:"iconfont icon-fuzhi8 mr5"}),"复制"]})})]}),(0,z.jsx)(F.Z,{height:510,className:"mb0",hidetoolBar:!0,defaultValue:q,onChange:function(e){return Y(e)}})]}),(0,z.jsxs)("div",{className:M,children:[(0,z.jsx)("div",{className:"c-black mb20",children:"自定义测试用例"}),(0,z.jsx)("div",{className:L,children:(0,z.jsx)("div",{className:B,children:(0,z.jsx)(f.Z.TextArea,{placeholder:"请输入",value:Q,onChange:function(e){return $(e.target.value)},bordered:!1,style:{height:180}})})}),(0,z.jsx)("div",{className:"c-black mb20 mt30",children:"代码执行结果"}),(0,z.jsx)("div",{className:L,children:(0,z.jsx)(I.Z,{spinning:d,tip:"代码执行中",children:(0,z.jsx)("div",{className:B,style:{height:196,overflow:"auto",padding:10},children:function(e){var t=e.status,n=e.error_msg,i=e.execute_time,r=e.output,o=e.input,a=e.expected_output,l=null;switch(t){case H.h.OK:l=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("p",{children:["执行用时:",i/1e3,"秒"]}),(0,z.jsx)("p",{children:"执行结果:调试通过"})]});break;case H.h.NOMATCH:l=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("div",{children:"输入:"}),(0,z.jsx)("pre",{style:{fontFamily:"initial"},children:o}),(0,z.jsx)("div",{children:"输出:"}),(0,z.jsx)("pre",{style:{fontFamily:"initial"},children:r&&D.Base64.decode(r)}),(0,z.jsx)("div",{children:"预期输出:"}),(0,z.jsx)("pre",{style:{fontFamily:"initial"},children:a&&D.Base64.decode(a)})]});break;case H.h.EXECUTEFAILURE:case H.h.COMPILEFAILURE:l=(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("p",{children:["最后执行的输入:",(0,z.jsx)("pre",{children:o})]}),(0,z.jsx)("p",{children:"执行出错信息:"}),(0,z.jsx)("pre",{className:"error",children:D.Base64.decode(n)})]});break;case H.h.PODFAILURE:l=(0,z.jsx)("p",{children:"创建pod失败请稍后重试"});break;case H.h.TIMEOUT:l=(0,z.jsx)("p",{children:"评测超时,请稍后重试"})}return(0,z.jsxs)(z.Fragment,{children:[" ",l," "]})}(G)})})})]})]})})]})},V=n(87169),K=["key","name"],U=f.Z.TextArea,q=[{title:"C",key:"C"},{title:"C++",key:"C++"},{title:"Python",key:"Python"},{title:"Java",key:"Java"}],Y="@▁@",X="@▁▁@",J=function(e){var t=e.questionTitlePlaceholder,n=e.form,i=e.scoreByBlank,o=void 0!==i&&i,l=e.hackidentifier,c=e.answerKey,d=(0,p.useState)(!1),_=h()(d,2),j=_[0],N=_[1],E=(0,p.useState)(!1),A=h()(E,2),Z=(A[0],A[1],(0,k.useParams)().type,function(e,t){for(var n=t.line,i=0,r=0;r<n;r++)i+=e.getLine(r).split(Y).length-1;for(var o=0;o<n;o++)i+=e.getLine(o).split(X).length-1;var a=e.getLine(n).substring(0,t.ch);return i+=a.split(Y).length-1,i+=a.split(X).length-1}),I=function(){var e=n.getFieldValue(c);n.setFieldsValue(s()({},c,null==e?void 0:e.map((function(e,t){return u()(u()({},e),{},{position:t+1})}))))},D=(0,p.useRef)(),T=function(e,t){for(var n=0;n<e;n++)D.current({position:null,answer_text:""},t+n);I()},P=(0,p.useRef)(),M=function(e){P.current(e),I()},L=m.Z.useWatch(c,n);return(0,z.jsxs)("div",{className:S.Z.wrap,children:[(0,z.jsx)(m.Z.Item,{label:"试题描述",name:["hack","description"],style:{display:"table"},className:"w100",labelCol:{span:24},rules:[{required:!0}],children:(0,z.jsx)(C.h,{scrollId:"name",watch:!0,height:140})}),(0,z.jsx)("div",{className:S.Z.questionTitleEditorWrap,children:(0,z.jsx)(m.Z.Item,{label:"程序代码",name:["hack_codes","code"],labelCol:{span:24},rules:[{required:!0}],children:(0,z.jsx)(C.h,{scrollId:"name",watch:!0,height:400,showNullProgramButton:!0,onChange:function(e,t){var i=n.getFieldValue(c);console.log("--preAnswerData",i,t),n.setFieldsValue(s()({},c,null==i?void 0:i.map((function(e,n){var i;return u()(u()({},e),{},{position:n+1,multi_line:null==t||null===(i=t[n])||void 0===i?void 0:i.multiLine})}))))},placeholder:t,onCMBeforeChange:function(e,t){!function(e,t,n,i){var r=e.getRange(t.from,t.to),o=0;if(t.text.forEach((function(e){o+=e.split(Y).length-1})),t.text.forEach((function(e){o+=e.split(X).length-1})),"setValue"!==t.origin)if(!r||-1===r.indexOf(Y)&&-1===r.indexOf(X)){if(o>0){var a=Z(e,t.from);console.log("新增".concat(o,"个,之前有").concat(a,"个")),n(o,a)}}else{var l=r.split(Y).length-1+r.split(X).length-1,s=Z(e,t.from);console.log("删除".concat(l,"个, 前面有").concat(s,"个,新增").concat(o,"个")),i(l>1?Array.from({length:l},(function(e,t){return s+t})):s)}}(e,t,T,M)}})})}),(0,z.jsx)(m.Z.List,{name:c,rules:[{validator:function(e,t){if(null==t||!t.length)return Promise.reject(new Error("答案不能为空"));var n,i=a()(t);try{for(i.s();!(n=i.n()).done;){var r=(n.value||{}).answer_text;if(0===(null==r?void 0:r.length))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,t,n){var i=t.add,a=t.remove;n.errors;return D.current=i,P.current=a,(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,z.jsx)(m.Z.Item,{label:"填空项答案",required:!0,labelCol:{span:24}}),(0,z.jsxs)("div",{onClick:function(){v.Z.warning({title:"给分说明",icon:null,width:700,centered:!0,content:(0,z.jsxs)("div",{children:[(0,z.jsxs)("div",{children:["1.学生填写答案之后,必须提交代码",(0,z.jsx)("span",{style:{color:"#e30000"},children:"进行评测"}),"才能得分。"]}),(0,z.jsx)("div",{style:{marginTop:10},children:"2.试题算分时系统会将程序里面的所有空替换成学生的答案进行评测。输出的结果与测试集比对完全正确则得满分若不完全正确则依次将每个空换成学生提交的答案同时将其他空替换成标准答案运行程序。如果这个空的学生答案与标准答案结合能得到正确输出则这个空得到该空的满分否则该空得0分。"})]})})},style:{minHeight:32,color:"#3061D0",cursor:"pointer"},children:[(0,z.jsx)(V.Z,{style:{marginRight:3,color:"#3061D0"}}),(0,z.jsx)("span",{children:" 给分说明"})]})]}),e.map((function(e,t){var n,i,a=e.key,l=e.name,s=r()(e,K);return(0,z.jsxs)(g.Z,{className:"mb20",align:"middle",wrap:!1,children:[(0,z.jsxs)(y.Z,{flex:"0 0 auto",className:"".concat(S.Z.blankIndex),children:["填空项",t+1]}),(0,z.jsx)(y.Z,{flex:1,children:(0,z.jsxs)(g.Z,{align:"top",justify:"space-between",wrap:!1,children:[(0,z.jsx)(y.Z,{children:(0,z.jsx)(m.Z.Item,u()(u()({},s),{},{name:[l,"answer_text"],noStyle:!0,children:null!=L&&null!==(n=L[l])&&void 0!==n&&n.multi_line||null!=L&&null!==(i=L[l])&&void 0!==i&&i.multiLine?(0,z.jsx)(U,{spellCheck:!1,style:{marginLeft:10,width:550}}):(0,z.jsx)(f.Z,{style:{marginLeft:10,width:550},className:S.Z.blankInput,size:"large",maxLength:1e3,onBlur:function(e){}})}))}),o&&(0,z.jsx)(y.Z,{flex:"224px",children:(0,z.jsx)(m.Z.Item,u()(u()({},s),{},{name:[l,"score"],label:"分值",rules:[{required:!0}],children:(0,z.jsx)(x.Z,{size:"large",className:S.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入分值"})}))})]})})]},a)}))]})}}),(0,z.jsx)("div",{onClick:function(){return N(!0)},children:(0,z.jsx)(m.Z.Item,{name:["hack","analysis"],label:"题目解析",labelCol:{span:24},children:(0,z.jsx)(C.x,{placeholder:"请编辑题目解析(非必填)",isEdit:j})})}),(0,z.jsx)(m.Z.Item,{label:"编程语言",style:{marginTop:30},name:["hack_codes","language"],labelCol:{span:24},rules:[{required:!0,message:"请选择编程语言"}],children:(0,z.jsx)(b.default,{size:"large",children:q.map((function(e){return(0,z.jsxs)(b.default.Option,{value:e.key,children:[" ",e.title]},e.title)}))})}),(0,z.jsxs)(m.Z.Item,{label:"最大评测时长(秒)",style:{marginTop:30},labelCol:{span:24},required:!0,children:[(0,z.jsx)(m.Z.Item,{name:["hack","time_limit"],rules:[{required:!0,message:"请输入单个测试集评测时长限制"},{type:"number",min:3,message:"最小限制时间是3秒"}],noStyle:!0,children:(0,z.jsx)(x.Z,{precision:0,max:10,min:3,size:"large",style:{width:"97%"}})}),(0,z.jsx)("span",{className:"ml10 font14",children:"秒"})]}),(0,z.jsx)(m.Z.Item,{label:"评测时空格处理",style:{marginTop:30},name:["hack","submit_rule"],labelCol:{span:24},rules:[{required:!0,message:"请选择评测时空格处理"}],children:(0,z.jsxs)(w.ZP.Group,{style:{marginTop:-10},children:[(0,z.jsx)(w.ZP,{value:0,children:"不忽略空格"}),(0,z.jsx)(w.ZP,{value:1,children:"忽略首尾空格"}),(0,z.jsx)(w.ZP,{value:2,children:"忽略所有空格"})]})}),(0,z.jsx)(m.Z.Item,{label:"测试用例",required:!0,style:{marginTop:30}}),(0,z.jsxs)("div",{style:{background:"#F6F7F9",padding:15},children:[(0,z.jsx)(m.Z.Item,{label:"输入",labelCol:{span:24},name:["hack_sets","input"],children:(0,z.jsx)(U,{rows:4})}),(0,z.jsx)(m.Z.Item,{label:"输出",labelCol:{span:24},name:["hack_sets","output"],rules:[{required:!0,message:"请输入输出内容"}],children:(0,z.jsx)(U,{rows:4})})]}),(0,z.jsx)(G,{form:n,answerKey:c,hackIdentifier:l,buttonText:"运行调试",buttonProps:{ghost:!0,icon:(0,z.jsx)("i",{className:"iconfont icon-ceshi"}),style:{background:"rgba(55,173,131,0.05)",borderRadius:19,border:"1px solid #37AD83",width:116,height:38,display:"inline-flex",fontSize:14,alignItems:"center",justifyContent:"center",marginTop:20,cursor:"pointer",color:"#37AD83"}}})]})}},63490:function(e,t,n){"use strict";n.d(t,{u:function(){return S}});var i=n(39647),r=n.n(i),o=n(79800),a=n.n(o),l=n(85573),s=n.n(l),c=n(82242),u=n.n(c),d=n(59301),h=n(77019),p=n(5269),f=n(25399),m=n(28284),v=n(86787),g=n(32134),y=n(12893),x=n(93484),b=n(37712),w=["key","name"],C=["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"],k=function(e){var t=e.value,n=e.onChange,i=e.choiceTextKey,r=e.answerKey,o=e.index,a=e.isEdit,l=e.setInputActive,c=e.form,d=e.choiceOptionsPath,m=e.allowChangeMode,w=e.showAddIcon,k=e.addItem,S=e.deleteItem;console.log(t,"value");var _=1===(null==t?void 0:t[r]),j=function(){var e;_?n(u()(u()({},t),{},s()({},r,0))):(m||(e=c.getFieldValue(d),c.setFieldValue(d,e.map((function(e){return u()(u()({},e),{},s()({},r,0))})))),n(u()(u()({},t),{},s()({},r,1))))};return(0,b.jsxs)(h.Z,{className:v.Z.choiceWrap,align:"middle",wrap:!1,children:[(0,b.jsx)(p.Z,{onClick:j,className:"".concat(v.Z.choiceIndex," ").concat(_?v.Z.activeAnswer:""),children:C[o]}),(0,b.jsx)(p.Z,{flex:1,className:"".concat(v.Z.editorWrap," ml15"),onClick:l,children:(0,b.jsx)(x.x,{height:155,placeholder:"请您输入选项",isEdit:a,value:null==t?void 0:t[i],onChange:function(e){n(u()(u()({},t),{},s()({},i,e)))}})}),(0,b.jsx)(p.Z,{flex:"0 0 auto",className:"ml15",children:(0,b.jsx)("div",{onClick:j,className:"".concat(v.Z.setAnswerBtn," ").concat(_?v.Z.activeAnswer:""),children:_?"正确答案":"设为答案"})}),(0,b.jsxs)(p.Z,{className:v.Z.actionWrapper,children:[(0,b.jsx)(f.Z,{title:"新增参考答案",children:(0,b.jsx)(g.Z,{className:v.Z.addIcon,onClick:k,style:{visibility:w?"visible":"hidden"}})}),(0,b.jsx)(f.Z,{title:"删除",children:(0,b.jsx)(y.Z,{className:v.Z.deleteIcon,onClick:S,style:{visibility:o>1?"visible":"hidden"}})})]})]})},S=function(e){var t=e.questionTitlePlaceholder,n=e.titleKey,i=e.choiceKey,o=e.analysisKey,l=e.choiceTextKey,c=e.answerKey,h=e.choiceOptionsPath,p=e.allowChangeMode,f=void 0===p||p,g=e.form,y=e.showAnalysis,S=void 0===y||y,_=(0,d.useState)(),j=a()(_,2),N=j[0],E=j[1],A=(0,d.useState)(!1),Z=a()(A,2),I=Z[0],D=Z[1];return(0,b.jsxs)("div",{className:v.Z.wrap,children:[(0,b.jsx)("div",{className:v.Z.questionTitleEditorWrap,children:(0,b.jsx)(m.Z.Item,{label:"题干",name:n,labelCol:{span:24},rules:[{required:!0}],children:(0,b.jsx)(x.h,{scrollId:Array.isArray(n)?n.join("_"):"".concat(n),watch:!0,height:140,placeholder:t})})}),(0,b.jsx)(m.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24}}),(0,b.jsx)(m.Z.List,{name:i,rules:[{validator:function(e,t){var n=t.some((function(e){return 1===e[c]})),i=t.findIndex((function(e){var t;return(null===(t=e[l])||void 0===t?void 0:t.length)<=0}));return-1!==i?Promise.reject(new Error("请先输入".concat(C[i],"选项的内容"))):n?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e,t){var n=t.add,i=t.remove;return(0,b.jsxs)("div",{id:Array.isArray(h)?h.join("_"):"".concat(h),children:[e.map((function(t,o){var a=t.key,p=t.name,y=r()(t,w),x=N===a,S=o<7&&o===e.length-1;return(0,d.createElement)(m.Z.Item,u()(u()({},y),{},{key:a,name:p,className:v.Z.choiceListWrap,rules:[{validator:function(e,t){return null!=t&&t.choice_text?Promise.resolve():Promise.reject(new Error("请先输入".concat(C[o],"选项的内容")))}}]}),(0,b.jsx)(k,{choiceTextKey:l,answerKey:c,index:o,isEdit:x,setInputActive:function(){E(a)},form:g,choiceOptionsPath:h,allowChangeMode:f,showAddIcon:S,addItem:function(){return n(s()(s()({},l,""),c,0))},deleteItem:function(){return i(p)}}))})),e.length<8&&(0,b.jsx)("div",{className:"".concat(v.Z.addBtn," mb30"),onClick:function(){return n(s()(s()({},l,""),c,0))},children:"添加选项"})]})}}),S&&(0,b.jsx)("div",{onClick:function(){return D(!0)},children:(0,b.jsx)(m.Z.Item,{name:o,label:"题目解析",labelCol:{span:24},children:(0,b.jsx)(x.x,{placeholder:"请编辑题目解析(非必填)",isEdit:I})})})]})}},95743:function(e,t,n){"use strict";n.d(t,{u:function(){return B}});var i=n(39647),r=n.n(i),o=n(91232),a=n.n(o),l=n(85573),s=n.n(l),c=n(82242),u=n.n(c),d=n(79800),h=n.n(d),p=n(37205),f=n.n(p),m=n(59301),v=n(62957),g=n(77019),y=n(5269),x=n(37568),b=n(25399),w=n(71411),C=n(28284),k=n(47889),S=n(71051),_=n(99571),j=n(93484),N=n(12893),E=n(32134),A=n(61485),Z=n(86787),I=n(75344),D=n(37712),T=["key","name"],P=function(e){var t=e.value,n=e.onChange,i=e.position,r=e.removeBlank;return(0,D.jsx)(g.Z,{className:"ml20",children:(0,D.jsx)(y.Z,{flex:1,children:null==t?void 0:t.map((function(e,o){return(0,D.jsxs)(g.Z,{className:"mb20",children:[(0,D.jsx)(x.Z.TextArea,{style:{flex:1,minHeight:44},defaultValue:e,autoSize:{maxRows:3},maxLength:1e3,onBlur:function(e){var i=f()(t),r=e.target.value.trim();i[o]=r,n(i)}}),(0,D.jsx)(b.Z,{title:"删除",children:(0,D.jsx)(N.Z,{className:Z.Z.deleteIcon,style:{marginLeft:15,visibility:1===i&&0===o?"hidden":"visible"},onClick:function(){return function(e){v.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:Z.Z.modal,onOk:function(){var o=f()(t);o.splice(e,1),0===o.length?r(i-1):n(o)}})}(o)}})}),(0,D.jsx)(b.Z,{title:"新增答案",children:(0,D.jsx)(E.Z,{style:{color:"#2A5DD8",fontSize:16,marginLeft:15,visibility:0===o?"visible":"hidden"},onClick:function(){var e;(e=f()(t)).push(""),n(e)}})})]},"".concat(e,"_").concat(o))}))})})},M=function(e){var t=e.value,n=e.onChange,i=e.position,r=e.removeBlank;return(0,D.jsx)(g.Z,{className:"ml20",children:(0,D.jsx)(y.Z,{flex:1,children:null==t?void 0:t.map((function(e,o){return(0,D.jsxs)(g.Z,{align:"middle",className:"mb20",children:[(0,D.jsx)(I.Z,{value:e,style:{flex:1},onChange:function(e){var i=f()(t);i[o]=e,n(i)}}),(0,D.jsx)(b.Z,{title:"删除",children:(0,D.jsx)(N.Z,{className:Z.Z.deleteIcon,style:{marginLeft:15,visibility:1===i&&0===o?"hidden":"visible"},onClick:function(){return function(e){v.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:Z.Z.modal,onOk:function(){var o=f()(t);o.splice(e,1),0===o.length?r(i-1):n(o)}})}(o)}})}),(0,D.jsx)(b.Z,{title:"新增答案",children:(0,D.jsx)(E.Z,{style:{color:"#2A5DD8",fontSize:16,marginLeft:15,visibility:0===o?"visible":"hidden"},onClick:function(){var e;(e=f()(t)).push(""),n(e)}})})]},"".concat(e,"_").concat(o))}))})})},L=function(e){var t=e.value,n=void 0===t||t,i=e.onChange;return(0,D.jsx)(w.Z,{checked:!n,onChange:function(e){i(!e)}})},B=function(e){var t=e.questionTitlePlaceholder,n=e.form,i=e.scoreByBlank,o=void 0!==i&&i,l=e.answerKey,c=(0,m.useState)(!1),d=h()(c,2),p=d[0],f=d[1],v=function(){var e=n.getFieldValue(l);n.setFieldsValue(s()({},l,e.map((function(e,t){return u()(u()({},e),{},{position:t+1})}))))},N=(0,m.useRef)(),E=function(e,t){for(var n=0;n<e;n++)N.current({position:null,answer_text:[""],model:1},t+n);v()},I=(0,m.useRef)(),B=function(e){I.current(e),v()},R=C.Z.useWatch(l,n);return(0,D.jsxs)("div",{className:Z.Z.wrap,children:[(0,D.jsx)("div",{className:Z.Z.questionTitleEditorWrap,children:(0,D.jsx)(C.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,D.jsx)(j.h,{scrollId:"name",watch:!0,height:140,placeholder:t,showNullButton:!0,onAddBlank:function(){var e=n.getFieldValue(l);E(1,null==e?void 0:e.length)}})})}),(0,D.jsx)(C.Z.List,{name:l,rules:[{validator:function(e,t){if(null==t||!t.length)return Promise.reject(new Error("请先在题干中插入填空项"));var n,i=a()(t);try{for(i.s();!(n=i.n()).done;){var r=(n.value||{}).answer_text;if(null!=r&&r.some((function(e){return 0===(null==e?void 0:e.length)})))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,t,i){var a=t.add,c=t.remove;i.errors;return N.current=a,I.current=c,(0,D.jsxs)(D.Fragment,{children:[(0,D.jsx)(C.Z.Item,{label:(0,D.jsx)("span",{children:"填空项答案"}),required:!0,labelCol:{span:24}}),e.map((function(e,t){var i,a=e.key,c=e.name,d=r()(e,T);return(0,D.jsxs)("div",{style:{marginBottom:10},children:[(0,D.jsxs)(g.Z,{className:"mb20",align:"middle",wrap:!1,children:[(0,D.jsxs)(y.Z,{style:{marginRight:10},flex:"0 0 auto",className:"".concat(Z.Z.blankIndex),children:["填空项",t+1]}),(0,D.jsx)(C.Z.Item,u()(u()({},d),{},{name:[c,"model"],noStyle:!0,children:(0,D.jsxs)(k.ZP.Group,{onChange:function(){var e=n.getFieldValue(l);n.setFieldsValue(s()({},l,e.map((function(e,t){return u()(u()({},e),{},{answer_text:c===t?[""]:e.answer_text})}))))},children:[(0,D.jsxs)(k.ZP,{value:1,children:["文本模式 ",(0,D.jsx)(b.Z,{title:"学生答题时,需要在文本框中填写文本答案",children:(0,D.jsx)(A.Z,{})})]}),(0,D.jsxs)(k.ZP,{value:2,children:["数学公式模式 ",(0,D.jsx)(b.Z,{title:"学生答题时,需要编写数学公式作为答案",children:(0,D.jsx)(A.Z,{})})]})]})}))]}),(0,D.jsx)(g.Z,{style:{marginLeft:20},align:"middle",wrap:!1,children:(0,D.jsxs)(y.Z,{flex:1,children:[(0,D.jsxs)(g.Z,{align:"top",justify:"space-between",wrap:!1,children:[(0,D.jsx)(y.Z,{flex:1,children:(0,D.jsx)(C.Z.Item,u()(u()({},d),{},{name:[c,"answer_text"],noStyle:!0,children:1===(null===(i=n.getFieldValue(l))||void 0===i||null===(i=i[c])||void 0===i?void 0:i.model)?(0,D.jsx)(P,{removeBlank:B,position:t+1}):(0,D.jsx)(M,{removeBlank:B,position:t+1})}))}),o&&(0,D.jsx)(y.Z,{flex:"224px",style:{margin:"-2px 0 0 20px"},children:(0,D.jsx)(C.Z.Item,u()(u()({},d),{},{name:[c,"score"],label:"分值",rules:[{required:!0}],className:Z.Z.blankInputNumberWrapper,children:(0,D.jsx)(S.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入分值"})}))})]}),(0,D.jsx)(C.Z.Item,u()(u()({},d),{},{name:[c,"position"],noStyle:!0,children:(0,D.jsx)(x.Z,{type:"hidden"})}))]})})]},a)}))]})}}),(0,D.jsx)(_.ZP,{className:"mb20",onClick:function(){return E(1,null==R?void 0:R.length)},type:"primary",shape:"round",children:"新增填空项"}),(0,D.jsxs)(g.Z,{align:"middle",children:[(0,D.jsx)(C.Z.Item,{name:"downcase",valuePropName:"checked",children:(0,D.jsx)(w.Z,{})}),(0,D.jsx)(y.Z,{className:"ml10",children:"判分时忽略答案中的字母大小写"})]}),(0,D.jsxs)(g.Z,{align:"middle",children:[(0,D.jsx)(C.Z.Item,{name:"no_space",valuePropName:"checked",children:(0,D.jsx)(w.Z,{})}),(0,D.jsx)(y.Z,{className:"ml10",children:"判分时忽略答案中的空格"})]}),(null==R?void 0:R.length)>1&&(0,D.jsxs)(g.Z,{align:"middle",className:(null==R?void 0:R.length)>1?"mb30":"".concat(Z.Z.hide),children:[(0,D.jsx)(C.Z.Item,{name:"is_ordered",children:(0,D.jsx)(L,{})}),(0,D.jsx)(y.Z,{className:"ml10",children:"允许学生每个填空的答案与标准答案的顺序不一致"})]}),(0,D.jsx)("div",{onClick:function(){return f(!0)},children:(0,D.jsx)(C.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,D.jsx)(j.x,{placeholder:"请编辑题目解析(非必填)",isEdit:p})})})]})}},56108:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var i=n(39647),r=n.n(i),o=n(79800),a=n.n(o),l=n(82242),s=n.n(l),c=n(85573),u=n.n(c),d=n(59301),h=n(77019),p=n(5269),f=n(28284),m=n(86787),v=n(93484),g=n(37712),y=["key","name"],x=u()(u()({},"正确","T"),"错误","F"),b=function(e){var t=e.value,n=e.onChange,i=e.form,r=1===(null==t?void 0:t.is_answer),o=null==t?void 0:t.choice_text,a=function(){var e=i.getFieldsValue().choices.map((function(e){return{choice_text:e.choice_text,is_answer:0}}));i.setFieldsValue({choices:e}),n(s()(s()({},t),{},{is_answer:1}))};return(0,g.jsxs)(h.Z,{className:m.Z.choiceWrap,align:"middle",wrap:!1,style:{marginBottom:"20px"},children:[(0,g.jsx)(p.Z,{onClick:a,className:"".concat(m.Z.choiceIndex," ").concat(m.Z.judgementIndex," ").concat(r?m.Z.activeAnswer:""),children:x[o]}),(0,g.jsx)(p.Z,{flex:1,className:"".concat(m.Z.editorWrap," ml15"),children:(0,g.jsx)("div",{className:"".concat(m.Z.inputBorder," ").concat(m.Z.placeholder," ").concat(r?m.Z.activeJudgementAnswer:""),children:o})}),(0,g.jsx)(p.Z,{flex:"0 0 auto",className:"ml15",children:(0,g.jsx)("div",{onClick:a,className:"".concat(m.Z.setAnswerBtn," ").concat(r?m.Z.activeAnswer:""),children:r?"正确答案":"设为答案"})})]})},w=function(e){var t=e.questionTitlePlaceholder,n=(e.choiceKey,e.form),i=(0,d.useState)(!1),o=a()(i,2),l=o[0],c=o[1];return(0,g.jsxs)("div",{className:m.Z.wrap,children:[(0,g.jsx)("div",{className:m.Z.questionTitleEditorWrap,children:(0,g.jsx)(f.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,g.jsx)(v.h,{scrollId:"name",watch:!0,height:140,placeholder:t})})}),(0,g.jsx)(f.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24},children:(0,g.jsx)(f.Z.List,{name:"choices",rules:[{validator:function(e,t){return t.some((function(e){return 1===(null==e?void 0:e.is_answer)}))?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e){return(0,g.jsx)("div",{id:"choices",children:e.map((function(e){var t=e.key,i=e.name,o=r()(e,y);return(0,d.createElement)(f.Z.Item,s()(s()({},o),{},{key:t,name:i,noStyle:!0}),(0,g.jsx)(b,{form:n}))}))})}})}),(0,g.jsx)("div",{onClick:function(){return c(!0)},children:(0,g.jsx)(f.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,g.jsx)(v.x,{placeholder:"请编辑题目解析(非必填)",isEdit:l})})})]})}},93484:function(e,t,n){"use strict";n.d(t,{h:function(){return h},x:function(){return p}});var i=n(82242),r=n.n(i),o=n(39647),a=n.n(o),l=n(16039),s=n(86787),c=n(83449),u=n(37712),d=["value","onChange","scrollId"],h=function(e){var t=e.value,n=e.onChange,i=e.scrollId,o=a()(e,d);return(0,u.jsx)("div",{id:i||"",children:(0,u.jsx)(l.Z,r()(r()({},o),{},{defaultValue:t,onChange:function(e,t){null!=t&&t.length?n(e,t):n(e)}}))})},p=function(e){var t=e.value,n=e.onChange,i=e.placeholder,r=e.height,o=void 0===r?140:r,a=e.isEdit,d=e.miniToolbar,h=e.watch,p=void 0===h||h;return a?(0,u.jsx)(l.Z,{watch:p,isFocus:!0,height:o||void 0,placeholder:i,defaultValue:t,onChange:n,miniToolbar:d}):(0,u.jsx)("div",{style:{cursor:"pointer"},children:t?(0,u.jsx)(c.Z,{className:s.Z.inputBorder,value:t}):(0,u.jsx)("div",{className:"".concat(s.Z.inputBorder," ").concat(s.Z.placeholder," inputBorderError"),children:i})})}},39570:function(e,t,n){"use strict";n.d(t,{W:function(){return Z}});var i=n(91232),r=n.n(i),o=n(79800),a=n.n(o),l=n(82242),s=n.n(l),c=n(39647),u=n.n(c),d=n(59301),h=n(6767),p=n(96599),f=n(28284),m=n(71411),v=n(77019),g=n(5269),y=n(25399),x=n(37568),b=n(71051),w=n(86787),C=n(93484),k=n(16039),S=n(61485),_=n(37712),j=["value","onChange"],N=["key","name"],E=function(e){var t=e.value,n=e.onChange,i=u()(e,j);return(0,_.jsx)(k.Z,s()(s()({},i),{},{defaultValue:null==t?void 0:t[0],onChange:function(e){n([e])}}))},A=function(e){var t=e.value,n=void 0===t?[]:t,i=e.onClose;return(0,_.jsx)(p.Z,{closable:!0,onClose:i,className:w.Z.keywordTag,children:(0,_.jsx)("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"},children:n.join(" 或 ")})})},Z=function(e){var t=e.questionTitlePlaceholder,n=e.form,i=e.showKeywords,o=e.isMustKeyWords,l=void 0===o?i:o,c=(0,d.useState)(!1),p=a()(c,2),k=p[0],j=p[1],Z=(0,d.useState)(""),I=a()(Z,2),D=I[0],T=I[1],P=f.Z.useWatch("use_keywords",n),M=f.Z.useWatch("question_score",n);return(0,_.jsxs)("div",{className:w.Z.wrap,children:[(0,_.jsx)("div",{className:w.Z.questionTitleEditorWrap,children:(0,_.jsx)(f.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,_.jsx)(C.h,{scrollId:"name",watch:!0,height:140,placeholder:t})})}),(0,_.jsx)(f.Z.Item,{label:"参考答案",name:"answer_texts",labelCol:{span:24},children:(0,_.jsx)(E,{watch:!0,height:140,placeholder:"请编辑参考答案(非必填)"})}),i&&!l&&(0,_.jsx)(f.Z.Item,{hidden:!0,name:"use_keywords",valuePropName:"checked",children:(0,_.jsx)(m.Z,{defaultChecked:!0})}),i&&l&&(0,_.jsxs)(v.Z,{align:"middle",className:"mb30",children:[(0,_.jsx)(f.Z.Item,{name:"use_keywords",valuePropName:"checked",children:(0,_.jsx)(m.Z,{})}),(0,_.jsx)(g.Z,{className:"ml10",children:"开启关键词自动判分"}),(0,_.jsx)(g.Z,{children:(0,_.jsx)(y.Z,{placement:"right",title:"选中后,需要设置每个关键词的分值,系统会根据设置的关键词进行自动判分; 所有关键词分值之和必须小于等于小题分值。",children:(0,_.jsx)(S.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})})]}),(P||!l)&&(0,_.jsx)(f.Z.List,{name:"keywords",rules:[{validator:function(e,t){return l?null!=t&&t.length?(null==t?void 0:t.reduce((function(e,t){return e+t.score}),0))>parseFloat(M)?Promise.reject(new Error("所有关键词的分值之和必须小于等于该小题的分值")):Promise.resolve():Promise.reject(new Error("请设置判分关键词")):Promise.resolve()}}],children:function(e,t){var i=t.add,o=t.remove;return(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)("div",{className:"".concat(w.Z.title," mb10"),children:l?"关键词":(0,_.jsx)("span",{style:{color:"#9096A3"},children:"判分关键词"})}),(0,_.jsxs)(v.Z,{align:"middle",className:"font14 mb30",children:[(0,_.jsx)(g.Z,{flex:1,children:(0,_.jsx)(x.Z,{value:D,onChange:function(e){T(e.target.value)},maxLength:50,allowClear:!0,onPressEnter:function(e){var t,o,a,l,s="".concat(null===(t=e.target)||void 0===t?void 0:t.value),c=null==s||null===(o=s.split("|"))||void 0===o||null===(o=o.filter((function(e){return!!e})))||void 0===o?void 0:o.map((function(e){return null==e?void 0:e.trim()})),u=n.getFieldValue("keywords"),d=(null==u||null===(a=u.map((function(e){return null==e?void 0:e.keyword})))||void 0===a?void 0:a.flat())||[],p=r()(c);try{for(p.s();!(l=p.n()).done;){var f=l.value;if(d.includes(f))return void h.ZP.error("为避免判分错误,请勿设置相同的关键词")}}catch(e){p.e(e)}finally{p.f()}(function(e){if(!e)return!1;if(!/^s*$/.test(e)&&""!==e.trim())return new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~@#¥……&*—【】”“。「」『』_\\+\\-·%《》]|[\\\\/]"),"|"!==e||(h.ZP.warning("关键词不能只输入一个“|”字符!"),!1);h.ZP.warning("关键词不能全为空格")})(s)&&(i({keyword:c,score:1}),T(""))},className:w.Z.inputBorder,placeholder:"支持设置多个关键词;并列关键词(或的关系)请用“|”分隔开"})}),(0,_.jsx)(g.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"},children:"“回车键”保存关键词"})]}),e.map((function(e){var t=e.key,n=e.name,i=u()(e,N);return(0,_.jsx)(v.Z,{className:"mb20",style:{marginRight:148},children:(0,_.jsx)(g.Z,{flex:1,children:(0,_.jsxs)(v.Z,{align:"middle",justify:"space-between",children:[(0,_.jsx)(f.Z.Item,s()(s()({},i),{},{name:[n,"keyword"],children:(0,_.jsx)(A,{onClose:function(){return o(n)}})})),l&&(0,_.jsx)(f.Z.Item,s()(s()({},i),{},{name:[n,"score"],label:"分值",rules:[{required:!0}],className:w.Z.blankInputNumberWrapper,children:(0,_.jsx)(b.Z,{className:w.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入关键词分数"})}))]})})},t)}))]})}}),(0,_.jsx)("div",{onClick:function(){return j(!0)},children:(0,_.jsx)(f.Z.Item,{name:"analysis",label:"题目解析",labelCol:{span:24},children:(0,_.jsx)(C.x,{placeholder:"请编辑题目解析(非必填)",isEdit:k})})})]})}},66612:function(e,t,n){"use strict";n.d(t,{tc:function(){return ne.t},uh:function(){return i.u},rL:function(){return te},u8:function(){return o.u},ZZ:function(){return r.Z},Wk:function(){return a.W}});var i=n(63490),r=n(56108),o=n(95743),a=n(39570),l=n(37205),s=n.n(l),c=n(82242),u=n.n(c),d=n(39647),h=n.n(d),p=n(79800),f=n.n(p),m=n(59301),v=n(8848),g=n(28284),y=n(77019),x=n(5269),b=n(71051),w=n(25399),C=n(75727),k=n(86787),S=n(12893),_=n(93484),j=n(91232),N=n.n(j),E=n(62957),A=n(37568),Z=n(71411),I=n(99571),D=n(32134),T=n(37712),P=["key","name"],M=function(e){var t=e.value,n=e.onChange,i=e.position,r=e.removeBlank;return(0,T.jsx)(y.Z,{className:"ml20",children:(0,T.jsx)(x.Z,{flex:1,children:null==t?void 0:t.map((function(e,o){return(0,T.jsxs)(y.Z,{className:"mb20",children:[(0,T.jsx)(A.Z.TextArea,{style:{flex:1,minHeight:44},defaultValue:e,autoSize:{maxRows:3},maxLength:1e3,onBlur:function(e){var i=s()(t),r=e.target.value.trim();i[o]=r,n(i)}}),(0,T.jsx)(w.Z,{title:"删除",children:(0,T.jsx)(S.Z,{className:k.Z.deleteIcon,style:{marginLeft:15,visibility:1===i&&0===o?"hidden":"visible"},onClick:function(){return function(e){E.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:k.Z.modal,onOk:function(){var o=s()(t);o.splice(e,1),0===o.length?r(i-1):n(o)}})}(o)}})}),(0,T.jsx)(w.Z,{title:"新增答案",children:(0,T.jsx)(D.Z,{style:{color:"#2A5DD8",fontSize:16,marginLeft:15,visibility:0===o?"visible":"hidden"},onClick:function(){var e;(e=s()(t)).push(""),n(e)}})})]},"".concat(e,"_").concat(o))}))})})},L=function(e){var t=e.value,n=void 0===t||t,i=e.onChange;return(0,T.jsx)(Z.Z,{checked:!n,onChange:function(e){i(!e)}})},B=function(e){var t,n=e.questionTitlePlaceholder,i=e.form,r=e.name,o=e.scoreByBlank,a=void 0!==o&&o,l=e.answerKey,c=e.titleKey,d=void 0===c?"name":c,p=e.analysisKey,v=void 0===p?"analysis":p,w=e.isOrdered,C=void 0===w?"is_ordered":w,S=(0,m.useState)(!1),j=f()(S,2),E=j[0],D=j[1],B=function(){var e=i.getFieldValue(["sub_item_banks"].concat(s()(l)));i.setFieldValue(["sub_item_banks"].concat(s()(l)),null==e?void 0:e.map((function(e,t){return u()(u()({},e),{},{position:t+1})})))},R=(0,m.useRef)(),O=function(e,t){for(var n=0;n<e;n++)R.current({position:null,answer_text:[""]},t+n);B()},F=(0,m.useRef)(),W=function(e){F.current(e),B()},H=null===(t=i.getFieldValue("sub_item_banks"))||void 0===t||null===(t=t[null==l?void 0:l[0]])||void 0===t?void 0:t[null==l?void 0:l[1]];return(0,T.jsxs)("div",{className:k.Z.wrap,children:[(0,T.jsx)("div",{className:k.Z.questionTitleEditorWrap,children:(0,T.jsx)(g.Z.Item,{label:"题干",name:d,labelCol:{span:24},rules:[{required:!0}],children:(0,T.jsx)(_.h,{scrollId:"name",watch:!0,height:140,placeholder:n,showNullButton:!0,onAddBlank:function(){var e=i.getFieldValue(["sub_item_banks"].concat(s()(l)));O(1,null==e?void 0:e.length)}})})}),(0,T.jsx)(g.Z.List,{name:l,rules:[{validator:function(e,t){if(0===(null==t?void 0:t.length))return Promise.reject(new Error("请先在题干中插入填空项"));var n,i=N()(t);try{for(i.s();!(n=i.n()).done;){var r=(n.value||{}).answer_text;if(null!=r&&r.some((function(e){return 0===(null==e?void 0:e.length)})))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,t,n){var i=t.add,r=t.remove;n.errors;return R.current=i,F.current=r,(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(g.Z.Item,{label:(0,T.jsx)("span",{children:"填空项答案"}),required:!0,labelCol:{span:24}}),e.map((function(e,t){var n=e.key,i=e.name,r=h()(e,P);return(0,T.jsxs)(y.Z,{align:"top",children:[(0,T.jsxs)(x.Z,{className:"".concat(k.Z.blankIndex," pt5"),children:["填空项",t+1]}),(0,T.jsxs)(x.Z,{flex:1,children:[(0,T.jsxs)(y.Z,{align:"top",justify:"space-between",children:[(0,T.jsx)(x.Z,{flex:1,children:(0,T.jsx)(g.Z.Item,u()(u()({},r),{},{name:[i,"answer_text"],noStyle:!0,children:(0,T.jsx)(M,{removeBlank:W,position:t+1})}))}),a&&(0,T.jsx)(x.Z,{flex:"224px",children:(0,T.jsx)(g.Z.Item,u()(u()({},r),{},{name:[i,"score"],label:"分值",rules:[{required:!0}],className:k.Z.blankInputNumberWrapper,children:(0,T.jsx)(b.Z,{className:k.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"按空给分请输入分值"})}))})]}),(0,T.jsx)(g.Z.Item,u()(u()({},r),{},{name:[i,"position"],noStyle:!0,children:(0,T.jsx)(A.Z,{type:"hidden"})}))]})]},n)}))]})}}),(0,T.jsx)(I.ZP,{className:"mb20",onClick:function(){return O(1,null==H?void 0:H.length)},type:"primary",shape:"round",children:"新增填空项"}),(0,T.jsxs)(y.Z,{align:"middle",children:[(0,T.jsx)(g.Z.Item,{name:[r,"downcase"],valuePropName:"checked",children:(0,T.jsx)(Z.Z,{})}),(0,T.jsx)(x.Z,{className:"ml10",children:"判分时忽略答案中的字母大小写"})]}),(0,T.jsxs)(y.Z,{align:"middle",children:[(0,T.jsx)(g.Z.Item,{name:[r,"no_space"],valuePropName:"checked",children:(0,T.jsx)(Z.Z,{})}),(0,T.jsx)(x.Z,{className:"ml10",children:"判分时忽略答案中的空格"})]}),(null==H?void 0:H.length)>1&&(0,T.jsxs)(y.Z,{align:"middle",className:(null==H?void 0:H.length)>1?"mb30":"".concat(k.Z.hide),children:[(0,T.jsx)(g.Z.Item,{name:C,children:(0,T.jsx)(L,{})}),(0,T.jsx)(x.Z,{className:"ml10",children:"允许学生每个填空的答案与标准答案的顺序不一致"})]}),(0,T.jsx)("div",{className:"mt30",onClick:function(){return D(!0)},children:(0,T.jsx)(g.Z.Item,{name:v,label:"题目解析",labelCol:{span:24},children:(0,T.jsx)(_.x,{placeholder:"请编辑题目解析(非必填)",isEdit:E})})})]})},R=n(85573),O=n.n(R),F=["key","name"],W=O()(O()({},"正确","T"),"错误","F"),H=function(e){var t=e.value,n=e.onChange,i=e.form,r=e.choiceKey,o=1===(null==t?void 0:t.is_answer),a=null==t?void 0:t.choice_text,l=function(){var e,o=null==i||null===(e=i.getFieldValue(["sub_item_banks"].concat(s()(r))))||void 0===e?void 0:e.map((function(e){return{choice_text:e.choice_text,is_answer:0}}));null==i||i.setFieldValue(["sub_item_banks"].concat(s()(r)),o),n(u()(u()({},t),{},{is_answer:1}))};return(0,T.jsxs)(y.Z,{className:k.Z.choiceWrap,align:"middle",wrap:!1,children:[(0,T.jsx)(x.Z,{onClick:l,className:"".concat(k.Z.choiceIndex," ").concat(k.Z.judgementIndex," ").concat(o?k.Z.activeAnswer:""),children:W[a]}),(0,T.jsx)(x.Z,{flex:1,className:"".concat(k.Z.editorWrap," ml15"),children:(0,T.jsx)("div",{className:"".concat(k.Z.inputBorder," ").concat(k.Z.placeholder," ").concat(o?k.Z.activeJudgementAnswer:""),children:a})}),(0,T.jsx)(x.Z,{flex:"0 0 auto",className:"ml15",children:(0,T.jsx)("div",{onClick:l,className:"".concat(k.Z.setAnswerBtn," ").concat(o?k.Z.activeAnswer:""),children:o?"正确答案":"设为答案"})})]})},z=function(e){var t=e.questionTitlePlaceholder,n=e.choiceKey,i=void 0===n?"choices":n,r=e.form,o=e.titleKey,a=void 0===o?"name":o,l=e.analysisKey,s=void 0===l?"analysis":l,c=(0,m.useState)(!1),d=f()(c,2),p=d[0],v=d[1];return(0,T.jsxs)("div",{className:k.Z.wrap,children:[(0,T.jsx)("div",{className:k.Z.questionTitleEditorWrap,children:(0,T.jsx)(g.Z.Item,{label:"题干",name:a,labelCol:{span:24},rules:[{required:!0}],children:(0,T.jsx)(_.h,{scrollId:"name",watch:!0,height:140,placeholder:t})})}),(0,T.jsx)(g.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24},children:(0,T.jsx)(g.Z.List,{name:i,rules:[{validator:function(e,t){return t.some((function(e){return 1===(null==e?void 0:e.is_answer)}))?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e){return(0,T.jsx)("div",{id:"choices",style:{display:"flex",flexDirection:"column",gap:"20px"},children:e.map((function(e){var t=e.key,n=e.name,o=h()(e,F);return(0,m.createElement)(g.Z.Item,u()(u()({},o),{},{key:t,name:n,noStyle:!0}),(0,T.jsx)(H,{form:r,choiceKey:i}))}))})}})}),(0,T.jsx)("div",{className:"mt30",onClick:function(){return v(!0)},children:(0,T.jsx)(g.Z.Item,{name:s,label:"题目解析",labelCol:{span:24},children:(0,T.jsx)(_.x,{placeholder:"请编辑题目解析(非必填)",isEdit:p})})})]})},G=n(6767),V=n(96599),K=n(16039),U=n(61485),q=["value","onChange"],Y=["key","name"],X=function(e){var t=e.value,n=e.onChange,i=h()(e,q);return(0,T.jsx)(K.Z,u()(u()({},i),{},{defaultValue:null==t?void 0:t[0],onChange:function(e){n([e])}}))},J=function(e){var t=e.value,n=void 0===t?[]:t,i=e.onClose;return(0,T.jsx)(V.Z,{closable:!0,onClose:i,className:k.Z.keywordTag,children:(0,T.jsx)("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"},children:n.join(" 或 ")})})},Q=function(e){var t=e.questionTitlePlaceholder,n=e.form,i=e.showKeywords,r=e.isMustKeyWords,o=void 0===r?i:r,a=e.titleKey,l=void 0===a?"name":a,c=e.analysisKey,d=void 0===c?"analysis":c,p=e.answerTexts,v=void 0===p?"answer_texts":p,C=e.keywords,S=void 0===C?"keywords":C,j=e.useKeywords,E=void 0===j?"use_keywords":j,I=e.indexs,D=(0,m.useState)(!1),P=f()(D,2),M=P[0],L=P[1],B=(0,m.useState)(""),R=f()(B,2),O=R[0],F=R[1],W=(0,m.useState)(!1),H=f()(W,2),z=H[0],V=H[1],K=g.Z.useWatch("question_score",n);return(0,T.jsxs)("div",{className:k.Z.wrap,children:[(0,T.jsx)("div",{className:k.Z.questionTitleEditorWrap,children:(0,T.jsx)(g.Z.Item,{label:"题干",name:l,labelCol:{span:24},rules:[{required:!0}],children:(0,T.jsx)(_.h,{scrollId:"name",watch:!0,height:140,placeholder:t})})}),(0,T.jsx)(g.Z.Item,{label:"参考答案",name:v,labelCol:{span:24},children:(0,T.jsx)(X,{watch:!0,height:140,placeholder:"请编辑参考答案(非必填)"})}),i&&!o&&(0,T.jsx)(g.Z.Item,{hidden:!0,name:E,valuePropName:"checked",children:(0,T.jsx)(Z.Z,{defaultChecked:!0})}),i&&o&&(0,T.jsxs)(y.Z,{align:"middle",className:"mb30",children:[(0,T.jsx)(g.Z.Item,{name:E,valuePropName:"checked",children:(0,T.jsx)(Z.Z,{onChange:function(){var e,t;console.log(n.getFieldsValue()),V(null===(e=n.getFieldsValue())||void 0===e||null===(e=e.sub_item_banks)||void 0===e||null===(e=e[I])||void 0===e?void 0:e.use_keywords),console.log(null===(t=n.getFieldsValue())||void 0===t||null===(t=t.sub_item_banks)||void 0===t||null===(t=t[I])||void 0===t?void 0:t.use_keywords),console.log(z)}})}),(0,T.jsx)(x.Z,{className:"ml10",children:"开启关键词自动判分"}),(0,T.jsx)(x.Z,{children:(0,T.jsx)(w.Z,{placement:"right",title:"选中后,需要设置每个关键词的分值,系统会根据设置的关键词进行自动判分; 所有关键词分值之和必须小于等于小题分值。",children:(0,T.jsx)(U.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})})]}),(z||!o)&&(0,T.jsx)(g.Z.List,{name:S,rules:[{validator:function(e,t){return o?null!=t&&t.length?(null==t?void 0:t.reduce((function(e,t){return e+t.score}),0))>parseFloat(K)?Promise.reject(new Error("所有关键词的分值之和必须小于等于该小题的分值")):Promise.resolve():Promise.reject(new Error("请设置判分关键词")):Promise.resolve()}}],children:function(e,t){var i=t.add,r=t.remove;return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)("div",{className:"".concat(k.Z.title," mb10"),children:o?"关键词":(0,T.jsx)("span",{style:{color:"#9096A3"},children:"判分关键词"})}),(0,T.jsxs)(y.Z,{align:"middle",className:"font14 mb30",children:[(0,T.jsx)(x.Z,{flex:1,children:(0,T.jsx)(A.Z,{value:O,onChange:function(e){F(e.target.value)},maxLength:50,allowClear:!0,onPressEnter:function(e){var t,r,o,a,l,c="".concat(null===(t=e.target)||void 0===t?void 0:t.value),u=null==c||null===(r=c.split("|"))||void 0===r||null===(r=r.filter((function(e){return!!e})))||void 0===r?void 0:r.map((function(e){return null==e?void 0:e.trim()})),d=n.getFieldValue(["sub_item_banks"].concat(s()(S))),h=(null==d||null===(o=d.map((function(e){return null==e?void 0:e.keyword})))||void 0===o?void 0:o.flat())||[],p=N()(u);try{for(p.s();!(a=p.n()).done;){var f=a.value;if(h.includes(f))return void G.ZP.error("为避免判分错误,请勿设置相同的关键词")}}catch(e){p.e(e)}finally{p.f()}(l=c)&&(new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~@#¥……&*—【】”“。「」『』_\\+\\-·%《》]|[\\\\/]"),"|"!==l||(G.ZP.warning("关键词不能只输入一个“|”字符!"),0))&&(i({keyword:u,score:1}),F(""))},className:k.Z.inputBorder,placeholder:"支持设置多个关键词;并列关键词(或的关系)请用“|”分隔开"})}),(0,T.jsx)(x.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"},children:"“回车键”保存关键词"})]}),e.map((function(e){var t=e.key,n=e.name,i=h()(e,Y);return(0,T.jsx)(y.Z,{className:"mb20",style:{marginRight:148},children:(0,T.jsx)(x.Z,{flex:1,children:(0,T.jsxs)(y.Z,{align:"middle",justify:"space-between",children:[(0,T.jsx)(g.Z.Item,u()(u()({},i),{},{name:[n,"keyword"],children:(0,T.jsx)(J,{onClose:function(){return r(n)}})})),o&&(0,T.jsx)(g.Z.Item,u()(u()({},i),{},{name:[n,"score"],label:"分值",rules:[{required:!0}],className:k.Z.blankInputNumberWrapper,children:(0,T.jsx)(b.Z,{className:k.Z.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入关键词分数"})}))]})})},t)}))]})}}),(0,T.jsx)("div",{onClick:function(){return L(!0)},children:(0,T.jsx)(g.Z.Item,{name:d,label:"题目解析",labelCol:{span:24},children:(0,T.jsx)(_.x,{placeholder:"请编辑题目解析(非必填)",isEdit:M})})})]})},$=["key","name"],ee=v.Z.Panel,te=function(e){var t=e.questionTitlePlaceholder,n=(e.choiceKey,e.form),r=e.withScore,o=(0,m.useState)([]),a=f()(o,2),l=a[0],c=a[1],d=function(e){c(e)};return(0,T.jsxs)("div",{className:k.Z.wrap,children:[(0,T.jsx)("div",{className:k.Z.questionTitleEditorWrap,children:(0,T.jsx)(g.Z.Item,{label:"题干",name:"name",labelCol:{span:24},rules:[{required:!0}],children:(0,T.jsx)(_.h,{scrollId:"name",watch:!0,height:140,placeholder:t})})}),(0,T.jsx)(g.Z.Item,{label:"小题",required:!0,labelCol:{span:24}}),(0,T.jsx)(g.Z.List,{name:"sub_item_banks",rules:[{validator:function(e,t){return t?Promise.resolve():Promise.reject(new Error("请添加小题"))}}],children:function(e,t){var o=t.add,a=t.remove,p=t.move,f=n.getFieldValue("sub_item_banks");return(0,T.jsxs)(T.Fragment,{children:[(0,T.jsx)(v.Z,{className:e.length>0?k.Z.collapseWrapper:"",bordered:!1,activeKey:l,onChange:d,expandIcon:function(e){var t=e.isActive;return(0,T.jsx)("i",{className:"iconfont icon-weizhankai ".concat(t?k.Z.open:k.Z.close),style:{fontSize:14,transition:"all .2s"}})},children:e.map((function(t,o){t.key;var l,s,c,d,m,v,C,_,j,N,E=t.name,A=h()(t,$);return(0,T.jsx)(ee,{className:k.Z.panel,forceRender:!0,header:(0,T.jsxs)("div",{className:k.Z.panelHeader,children:["第",o+1,"小题",(0,T.jsxs)("span",{children:["","SINGLE"==(null==f||null===(l=f[E])||void 0===l?void 0:l.item_type)?"单选题":"MULTIPLE"==(null==f||null===(s=f[E])||void 0===s?void 0:s.item_type)?"多选题":"COMPLETION"==(null==f||null===(c=f[E])||void 0===c?void 0:c.item_type)?"填空题":"JUDGMENT"==(null==f||null===(d=f[E])||void 0===d?void 0:d.item_type)?"判断题":"简答题",""]})]}),extra:(0,T.jsxs)(y.Z,{align:"middle",onClick:function(e){return e.stopPropagation()},children:[r&&(0,T.jsx)(x.Z,{children:(0,T.jsx)(g.Z.Item,u()(u()({},A),{},{rules:[{required:!0,message:"请输入小题分值"}],label:"分值",name:[E,"question_score"],className:k.Z.blankInputNumberWrapper,children:(0,T.jsx)(b.Z,{className:k.Z.blankInput,placeholder:"请输入当前小题分数",min:.1,precision:1,max:100,style:{width:150}})}))}),(0,T.jsx)(x.Z,{children:(0,T.jsxs)(y.Z,{align:"middle",className:"pl40",justify:"end",children:[0!==o&&(0,T.jsx)("div",{onClick:function(){var t;p(o,o-1);var i=null===(t=n.getFieldValue("sub_item_banks"))||void 0===t?void 0:t.map((function(t,n){return e.map((function(e,i){n===i&&(t.q_position=Number(e.name)+1)})),t}));n.setFieldValue("sub_item_banks",i)},children:(0,T.jsx)(w.Z,{title:"上移",children:(0,T.jsx)("i",{className:"iconfont icon-shangyi3 c-grey-999 primary-hover"})})}),o<e.length-1&&(0,T.jsx)("div",{onClick:function(){var t;p(o,o+1);var i=null===(t=n.getFieldValue("sub_item_banks"))||void 0===t?void 0:t.map((function(t,n){return e.map((function(e,i){n===i&&(t.q_position=Number(e.name)+1)})),t}));n.setFieldValue("sub_item_banks",i)},className:0===o?"":"ml15",children:(0,T.jsx)(w.Z,{title:"下移",children:(0,T.jsx)("i",{className:"iconfont icon-xiayi3 c-grey-999 primary-hover"})})})]})}),(0,T.jsx)(x.Z,{children:(0,T.jsx)(w.Z,{title:"删除",children:(0,T.jsx)(S.Z,{className:"".concat(k.Z.deleteIcon," ml15"),onClick:function(){return a(E)}})})})]}),children:(0,T.jsxs)(g.Z.Item,u()(u()({},A),{},{name:E,children:[("SINGLE"==(null==f||null===(m=f[E])||void 0===m?void 0:m.item_type)||"MULTIPLE"==(null==f||null===(v=f[E])||void 0===v?void 0:v.item_type))&&(0,T.jsx)(i.u,{questionTitlePlaceholder:"请编辑选择题题干内容",allowChangeMode:"MULTIPLE"==(null==f||null===(C=f[E])||void 0===C?void 0:C.item_type),form:n,choiceKey:[E,"choices"],titleKey:[E,"name"],analysisKey:[E,"analysis"],choiceOptionsPath:["sub_item_banks",E,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),"COMPLETION"==(null==f||null===(_=f[E])||void 0===_?void 0:_.item_type)&&(0,T.jsx)(B,{form:n,questionTitlePlaceholder:"请编辑题干,您可以用任意字符表示填空项",scoreByBlank:!1,name:E,titleKey:[E,"name"],analysisKey:[E,"analysis"],isOrdered:[E,"is_ordered"],answerKey:[E,"standard_answers"]}),"JUDGMENT"==(null==f||null===(j=f[E])||void 0===j?void 0:j.item_type)&&(0,T.jsx)(z,{form:n,questionTitlePlaceholder:"请编辑判断题题干内容",titleKey:[E,"name"],analysisKey:[E,"analysis"],choiceKey:[E,"choices"]}),"SUBJECTIVE"==(null==f||null===(N=f[E])||void 0===N?void 0:N.item_type)&&(0,T.jsx)(Q,{showKeywords:!0,isMustKeyWords:!1,form:n,titleKey:[E,"name"],analysisKey:[E,"analysis"],answerTexts:[E,"answer_texts"],useKeywords:[E,"use_keywords"],keywords:[E,"keywords"],indexs:E,questionTitlePlaceholder:"请编辑简答题题干内容"})]}))},E)}))}),e.length<20&&(0,T.jsx)(C.Z,{menu:{items:[{label:(0,T.jsx)("div",{onClick:function(){o({name:"",choices:Array.from({length:4},(function(){return{choice_text:"",is_answer:0}})),analysis:"",item_type:"SINGLE"}),c([null==e?void 0:e.length].concat(s()(l)))},children:"单选题"}),key:"1",show:!0},{label:(0,T.jsx)("div",{onClick:function(){o({name:"",choices:Array.from({length:4},(function(){return{choice_text:"",is_answer:0}})),analysis:"",item_type:"MULTIPLE"}),c([null==e?void 0:e.length].concat(s()(l)))},children:"多选题"}),key:"2",show:!0},{label:(0,T.jsx)("div",{onClick:function(){o({name:"",choices:[{choice_text:"正确",is_answer:0},{choice_text:"错误",is_answer:0}],analysis:"",item_type:"JUDGMENT"}),c([null==e?void 0:e.length].concat(s()(l)))},children:"判断题"}),key:"3",show:!0},{label:(0,T.jsx)("div",{onClick:function(){o({name:"",analysis:"",is_ordered:!0,standard_answers:[{position:1,answer_text:[""]}],item_type:"COMPLETION",downcase:!0,no_space:!0}),c([null==e?void 0:e.length].concat(s()(l)))},children:"填空题"}),key:"4",show:!0},{label:(0,T.jsx)("div",{onClick:function(){o({name:"",answer_texts:[],keywords:[],use_keywords:!0,analysis:"",item_type:"SUBJECTIVE"}),c([null==e?void 0:e.length].concat(s()(l)))},children:"简答题"}),key:"5",show:!0}].filter((function(e){return e.show})).map((function(e){return{label:e.label,key:e.key}}))},children:(0,T.jsx)("div",{className:"".concat(k.Z.addBtn),children:"添加小题"})})]})}})]})},ne=n(88595)},83449:function(e,t,n){"use strict";n.d(t,{z:function(){return E},Z:function(){return A}});var i=n(82242),r=n.n(i),o=n(37205),a=n.n(o),l=n(91232),s=n.n(l),c=n(79800),u=n.n(c),d=n(59301),h=(n(54196),n(8426)),p=(n(64018),n(80360)),f=n(51200),m=n(30406),v=n(15342),g=n(77736),y=n(99571),x=n(1012),b=n(92216),w=n(37712),C=function(e){var t=e.html,n=(0,d.useRef)(null),i=(0,d.useRef)(null);return(0,d.useEffect)((function(){var e=n.current.attachShadow({mode:"open"});i.current=document.createElement("div"),i.current.className="markdown-body",i.current.innerHTML=t,e.appendChild(i.current);var r=document.createElement("style");return r.textContent='.markdown-body p {\n margin: 0 0 16px 0 !important;\n line-height: 28px;\n white-space: pre-wrap;\n }\n\n ol,\n ul,\n li {\n list-style-type: none\n }\n\n ol,\n ul,\n dl {\n margin-bottom: 0px;\n }\n\n .markdown-body {\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n color: #333;\n overflow: hidden;\n font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "华文细黑", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "宋体", Heiti, "黑体", sans-serif;\n word-break: break-word;\n font-size: 16px;\n line-height: 1.6;\n white-space: normal;\n word-wrap: break-word;\n position: relative;\n }\n\n .markdown-body ul>li {\n list-style-type: disc;\n }\n\n .markdown-body ol>li {\n list-style-type: decimal;\n }\n\n .markdown-body a {\n background: transparent;\n }\n\n .markdown-body a:active,\n .markdown-body a:hover {\n outline: 0;\n }\n\n .markdown-body strong {\n font-weight: bold;\n }\n\n .markdown-body h1 {\n font-size: 2em;\n margin: 0.67em 0;\n }\n\n .markdown-body img {\n border: 0;\n }\n\n .markdown-body hr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n }\n\n .markdown-body pre {\n overflow: auto;\n }\n\n .markdown-body code,\n .markdown-body kbd,\n .markdown-body pre {\n font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;\n font-size: 1em;\n }\n\n .markdown-body input {\n color: inherit;\n font: inherit;\n margin: 0;\n }\n\n .markdown-body html input[disabled] {\n cursor: default;\n }\n\n .markdown-body input {\n line-height: normal;\n }\n\n .markdown-body input[type="checkbox"] {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n padding: 0;\n }\n\n .markdown-body table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n .markdown-body td,\n .markdown-body th {\n padding: 0;\n }\n\n .markdown-body * {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n .markdown-body input {\n font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";\n }\n\n .markdown-body a {\n color: #4183c4;\n text-decoration: none;\n }\n\n .markdown-body a:hover,\n .markdown-body a:active {\n text-decoration: underline;\n }\n\n .markdown-body hr {\n height: 0;\n margin: 15px 0;\n overflow: hidden;\n background: transparent;\n border: 0;\n border-bottom: 1px solid #ddd;\n }\n\n .markdown-body hr:before {\n display: table;\n content: "";\n }\n\n .markdown-body hr:after {\n display: table;\n clear: both;\n content: "";\n }\n\n .markdown-body h1,\n .markdown-body h2,\n .markdown-body h3,\n .markdown-body h4,\n .markdown-body h5,\n .markdown-body h6 {\n margin-top: 15px;\n margin-bottom: 15px;\n line-height: 1.1;\n }\n\n .markdown-body h1 {\n font-size: 30px;\n }\n\n .markdown-body h2 {\n font-size: 21px;\n }\n\n .markdown-body h3 {\n font-size: 16px;\n }\n\n .markdown-body h4 {\n font-size: 14px;\n }\n\n .markdown-body h5 {\n font-size: 12px;\n }\n\n .markdown-body h6 {\n font-size: 11px;\n }\n\n .markdown-body blockquote {\n margin: 0;\n }\n\n .markdown-body ul,\n .markdown-body ol {\n padding: 0;\n margin-top: 0;\n margin-bottom: 0;\n }\n\n ul.linenums,\n ol.linenums {\n padding: 16px 0 0 56px !important;\n }\n\n .markdown-body ul,\n .markdown-body ol {\n padding-left: 2em;\n }\n\n\n .markdown-body ol ol,\n .markdown-body ul ol {\n list-style-type: lower-roman;\n }\n\n .markdown-body ul ul ol,\n .markdown-body ul ol ol,\n .markdown-body ol ul ol,\n .markdown-body ol ol ol {\n list-style-type: lower-alpha;\n }\n\n .markdown-body dd {\n margin-left: 0;\n }\n\n .markdown-body code {\n font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;\n font-size: 12px;\n }\n\n .markdown-body pre {\n margin-top: 0;\n margin-bottom: 0;\n font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;\n }\n\n .markdown-body .octicon {\n font: normal normal 16px octicons-anchor;\n line-height: 1;\n display: inline-block;\n text-decoration: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .markdown-body .octicon-link:before {\n content: \'\f05c\';\n }\n\n .markdown-body>*:first-child {\n margin-top: 0 !important;\n }\n\n .markdown-body>*:last-child {\n margin-bottom: 0 !important;\n }\n\n .markdown-body .anchor {\n position: absolute;\n top: 0;\n left: 0;\n display: block;\n padding-right: 6px;\n padding-left: 30px;\n margin-left: -30px;\n }\n\n .markdown-body .anchor:focus {\n outline: none;\n }\n\n .markdown-body h1,\n .markdown-body h2,\n .markdown-body h3,\n .markdown-body h4,\n .markdown-body h5,\n .markdown-body h6 {\n position: relative;\n margin-top: 1em;\n margin-bottom: 16px;\n font-weight: bold;\n line-height: 1.4;\n }\n\n .markdown-body h1 .octicon-link,\n .markdown-body h2 .octicon-link,\n .markdown-body h3 .octicon-link,\n .markdown-body h4 .octicon-link,\n .markdown-body h5 .octicon-link,\n .markdown-body h6 .octicon-link {\n display: none;\n color: #000;\n vertical-align: middle;\n }\n\n .markdown-body h1:hover .anchor,\n .markdown-body h2:hover .anchor,\n .markdown-body h3:hover .anchor,\n .markdown-body h4:hover .anchor,\n .markdown-body h5:hover .anchor,\n .markdown-body h6:hover .anchor {\n padding-left: 8px;\n margin-left: -30px;\n text-decoration: none;\n }\n\n .markdown-body h1:hover .anchor .octicon-link,\n .markdown-body h2:hover .anchor .octicon-link,\n .markdown-body h3:hover .anchor .octicon-link,\n .markdown-body h4:hover .anchor .octicon-link,\n .markdown-body h5:hover .anchor .octicon-link,\n .markdown-body h6:hover .anchor .octicon-link {\n display: inline-block;\n }\n\n .markdown-body h1 {\n padding-bottom: 0.3em;\n font-size: 2.25em;\n line-height: 1.2;\n border-bottom: 1px solid #eee;\n }\n\n .markdown-body h1 .anchor {\n line-height: 1;\n }\n\n .markdown-body h2 {\n padding-bottom: 0.3em;\n font-size: 1.75em;\n line-height: 1.225;\n border-bottom: 1px solid #eee;\n }\n\n .markdown-body h2 .anchor {\n line-height: 1;\n }\n\n .markdown-body h3 {\n font-size: 1.5em;\n line-height: 1.43;\n }\n\n .markdown-body h3 .anchor {\n line-height: 1.2;\n }\n\n .markdown-body h4 {\n font-size: 1.25em;\n }\n\n .markdown-body h4 .anchor {\n line-height: 1.2;\n }\n\n .markdown-body h5 {\n font-size: 1em;\n }\n\n .markdown-body h5 .anchor {\n line-height: 1.1;\n }\n\n .markdown-body h6 {\n font-size: 1em;\n color: #777;\n }\n\n .markdown-body h6 .anchor {\n line-height: 1.1;\n }\n\n .markdown-body p,\n .markdown-body blockquote,\n .markdown-body ul,\n .markdown-body ol,\n .markdown-body dl,\n .markdown-body table,\n .markdown-body pre {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n .markdown-body ul ul,\n .markdown-body ul ol,\n .markdown-body ol ol,\n .markdown-body ol ul {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .markdown-body li>p {\n margin-top: 16px;\n }\n\n .markdown-body dl {\n padding: 0;\n }\n\n .markdown-body dl dt {\n padding: 0;\n margin-top: 16px;\n font-size: 1em;\n font-style: italic;\n font-weight: bold;\n }\n\n .markdown-body dl dd {\n padding: 0 16px;\n margin-bottom: 16px;\n }\n\n .markdown-body blockquote {\n padding: 0 15px;\n color: #777;\n border-left: 4px solid #ddd;\n }\n\n .markdown-body blockquote> :first-child {\n margin-top: 0;\n }\n\n .markdown-body blockquote> :last-child {\n margin-bottom: 0;\n }\n\n .markdown-body table {\n display: block;\n width: 100%;\n overflow: auto;\n word-break: normal;\n word-break: keep-all;\n }\n\n .markdown-body table th {\n font-weight: bold;\n text-align: revert;\n }\n\n .markdown-body table th,\n .markdown-body table td {\n padding: 6px 13px;\n border: 1px solid #ddd;\n }\n\n .markdown-body table tr {\n background-color: #fff;\n border-top: 1px solid #ccc;\n }\n\n .markdown-body table tr:nth-child(2n) {\n background-color: #f8f8f8;\n }\n\n .markdown-body img {\n max-width: 100%;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n .markdown-body code {\n padding: 0;\n padding-top: 0.2em;\n padding-bottom: 0.2em;\n margin: 0;\n font-size: 85%;\n background-color: rgba(0, 0, 0, 0.04);\n border-radius: 3px;\n }\n\n .markdown-body code:has(.katex) {\n background-color: transparent;\n }\n\n .markdown-body code:before,\n .markdown-body code:after {\n letter-spacing: -0.2em;\n content: "\\00a0";\n }\n\n .markdown-body pre>code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n border: 0;\n }\n\n .markdown-body .highlight {\n margin-bottom: 16px;\n }\n\n .markdown-body .highlight pre,\n .markdown-body pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: #f7f7f7;\n border-radius: 3px;\n }\n\n .markdown-body .highlight pre {\n margin-bottom: 0;\n word-break: normal;\n }\n\n .markdown-body pre {\n word-wrap: normal;\n }\n\n .markdown-body pre code {\n display: inline;\n max-width: initial;\n padding: 0;\n margin: 0;\n overflow: initial;\n line-height: inherit;\n word-wrap: normal;\n background-color: transparent;\n border: 0;\n }\n\n .markdown-body pre code:before,\n .markdown-body pre code:after {\n content: normal;\n }\n\n .markdown-body kbd {\n display: inline-block;\n padding: 3px 5px;\n font-size: 11px;\n line-height: 10px;\n color: #555;\n vertical-align: middle;\n background-color: #fcfcfc;\n border: solid 1px #ccc;\n border-bottom-color: #bbb;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 #bbb;\n }\n\n .markdown-body .pl-c {\n color: #969896;\n }\n\n .markdown-body .pl-c1,\n .markdown-body .pl-mdh,\n .markdown-body .pl-mm,\n .markdown-body .pl-mp,\n .markdown-body .pl-mr,\n .markdown-body .pl-s1 .pl-v,\n .markdown-body .pl-s3,\n .markdown-body .pl-sc,\n .markdown-body .pl-sv {\n color: #0086b3;\n }\n\n .markdown-body .pl-e,\n .markdown-body .pl-en {\n color: #795da3;\n }\n\n .markdown-body .pl-s1 .pl-s2,\n .markdown-body .pl-smi,\n .markdown-body .pl-smp,\n .markdown-body .pl-stj,\n .markdown-body .pl-vo,\n .markdown-body .pl-vpf {\n color: #333;\n }\n\n .markdown-body .pl-ent {\n color: #63a35c;\n }\n\n .markdown-body .pl-k,\n .markdown-body .pl-s,\n .markdown-body .pl-st {\n color: #a71d5d;\n }\n\n .markdown-body .pl-pds,\n .markdown-body .pl-s1,\n .markdown-body .pl-s1 .pl-pse .pl-s2,\n .markdown-body .pl-sr,\n .markdown-body .pl-sr .pl-cce,\n .markdown-body .pl-sr .pl-sra,\n .markdown-body .pl-sr .pl-sre,\n .markdown-body .pl-src {\n color: #df5000;\n }\n\n .markdown-body .pl-mo,\n .markdown-body .pl-v {\n color: #1d3e81;\n }\n\n .markdown-body .pl-id {\n color: #b52a1d;\n }\n\n .markdown-body .pl-ii {\n background-color: #b52a1d;\n color: #f8f8f8;\n }\n\n .markdown-body .pl-sr .pl-cce {\n color: #63a35c;\n font-weight: bold;\n }\n\n .markdown-body .pl-ml {\n color: #693a17;\n }\n\n .markdown-body .pl-mh,\n .markdown-body .pl-mh .pl-en,\n .markdown-body .pl-ms {\n color: #1d3e81;\n font-weight: bold;\n }\n\n .markdown-body .pl-mq {\n color: #008080;\n }\n\n .markdown-body .pl-mi {\n color: #333;\n font-style: italic;\n }\n\n .markdown-body .pl-mb {\n color: #333;\n font-weight: bold;\n }\n\n .markdown-body .pl-md,\n .markdown-body .pl-mdhf {\n background-color: #ffecec;\n color: #bd2c00;\n }\n\n .markdown-body .pl-mdht,\n .markdown-body .pl-mi1 {\n background-color: #eaffea;\n color: #55a532;\n }\n\n .markdown-body .pl-mdr {\n color: #795da3;\n font-weight: bold;\n }\n\n .markdown-body kbd {\n display: inline-block;\n padding: 3px 5px;\n font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;\n line-height: 10px;\n color: #555;\n vertical-align: middle;\n background-color: #fcfcfc;\n border: solid 1px #ccc;\n border-bottom-color: #bbb;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 #bbb;\n }\n\n .markdown-body .task-list-item {\n list-style-type: none;\n }\n\n .markdown-body .task-list-item+.task-list-item {\n margin-top: 3px;\n }\n\n .markdown-body .task-list-item input {\n float: left;\n margin: 0.3em 0 0.25em -1.6em;\n vertical-align: middle;\n }\n\n .markdown-body :checked+.radio-label {\n z-index: 1;\n position: relative;\n border-color: #4183c4;\n }\n\n\n /*! Pretty printing styles. Used with prettify.js. */\n /* SPAN elements with the classes below are added by prettyprint. */\n .pln {\n color: #000\n }\n\n /* plain text */\n\n @media screen {\n .str {\n color: #080\n }\n\n /* string content */\n .kwd {\n color: #008\n }\n\n /* a keyword */\n .com {\n color: #800\n }\n\n /* a comment */\n .typ {\n color: #606\n }\n\n /* a type name */\n .lit {\n color: #066\n }\n\n /* a literal value */\n /* punctuation, lisp open bracket, lisp close bracket */\n .pun,\n .opn,\n .clo {\n color: #660\n }\n\n .tag {\n color: #008\n }\n\n /* a markup tag name */\n .atn {\n color: #606\n }\n\n /* a markup attribute name */\n .atv {\n color: #080\n }\n\n /* a markup attribute value */\n .dec,\n .var {\n color: #606\n }\n\n /* a declaration; a variable name */\n .fun {\n color: red\n }\n\n /* a function name */\n }\n\n /* Use higher contrast and text-weight for printable form. */\n @media print,\n projection {\n .str {\n color: #060\n }\n\n .kwd {\n color: #006;\n font-weight: bold\n }\n\n .com {\n color: #600;\n font-style: italic\n }\n\n .typ {\n color: #404;\n font-weight: bold\n }\n\n .lit {\n color: #044\n }\n\n .pun,\n .opn,\n .clo {\n color: #440\n }\n\n .tag {\n color: #006;\n font-weight: bold\n }\n\n .atn {\n color: #404\n }\n\n .atv {\n color: #060\n }\n }\n\n /* Put a border around prettyprinted code snippets. */\n pre.prettyprint {\n padding: 2px;\n /* border: 1px solid #888 */\n }\n\n /* Specify class=linenums on a pre to get line numbering */\n ol.linenums {\n margin-top: 0;\n margin-bottom: 0\n }\n\n /* IE indents via margin-left */\n li.L0,\n li.L1,\n li.L2,\n li.L3,\n li.L5,\n li.L6,\n li.L7,\n li.L8 {\n list-style-type: none\n }\n\n /* Alternate shading for lines */\n li.L1,\n li.L3,\n li.L5,\n li.L7,\n li.L9 {\n background: #eee\n }\n\n .markdown-body p,\n .markdown-body blockquote,\n .markdown-body ul,\n .markdown-body ol,\n .markdown-body dl,\n .markdown-body table,\n .markdown-body pre {\n margin-top: 0;\n margin-bottom: 16px;\n }',e.appendChild(r),function(){e.innerHTML=""}}),[]),(0,d.useEffect)((function(){i.current&&(i.current.innerHTML=t)}),[t]),(0,w.jsx)("div",{ref:n})};var k="mdBody___raKXb",S="button___Ch5Pc",_="previewFlowChart___vY1dq",j="@▁@",N=/<pre[^>]*>/g;var E=function(e,t){e=e||"";var n=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return t?e.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(n,(function(e,t,n,i,r,o,a){var l=t||i||o,s=n||r||a||"?";return f.Z.API_SERVER+"/api/attachments/"+l+s+"&t="+(0,m.Jn)(l,Date.now())+(e.indexOf(")")>-1?")":"&")})).replaceAll('src="(','src="').replaceAll("src='(",'src="'):e=e.replace(/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,i,r,o,a){var l=t||i||o,s=n||r||a||"?";return f.Z.API_SERVER+"/attachments/download/"+l+s+"&t="+(0,m.Jn)(l,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(n,(function(e,t,n,i,r,o,a){var l=t||i||o,s=n||r||a||"?";return f.Z.API_SERVER+"/api/attachments/"+l+s+"&t="+(0,m.Jn)(l,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,i,r){var o=t||i,a=n||r||"";return'"'+f.Z.API_SERVER+"/api/attachments/"+o+a+o+a+"&t="+(0,m.Jn)(o,Date.now())})).replace(/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,i,r){var o=t||i,a=n||r||"";return"("+f.Z.API_SERVER+"/files/uploads/"+o+a+o+a+"&t="+(0,m.Jn)(o,Date.now())})).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")},A=function(e){var t=e.value,n=void 0===t?"":t,i=e.edit,o=void 0!==i&&i,l=e.className,c=e.showTextOnly,m=e.showLines,E=e.style,A=void 0===E?{}:E,Z=e.stylesPrev,I=void 0===Z?{}:Z,D=e.highlightKeywords,T=e.showProgramFill,P=(e.isProgramFill,e.disabledFill),M=void 0!==P&&P,L=e.programFillValue,B=e.openEditor,R=void 0===B?function(){}:B,O=e.onFillChange,F=void 0===O?function(e){}:O,W=e.onFillBlur,H=void 0===W?function(){}:W,z=e.onFillFocus,G=void 0===z?function(){}:z,V=function(e){var t=new RegExp("\\b(".concat(["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"].join("|"),")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s>]*)"),"gi");return e.replace(t,"").trim()}(String(n||"")),K=(0,d.useRef)(),U=(0,d.useRef)(),q=(0,d.useState)(""),Y=u()(q,2),X=Y[0],J=Y[1],Q=(0,d.useState)("office"),$=u()(Q,2),ee=$[0],te=$[1],ne=(0,d.useState)([]),ie=u()(ne,2),re=ie[0],oe=ie[1],ae=(0,d.useRef)("a"+(0,x.Z)()),le={},se=function(e){return/<style[\s\S]*?>/i.test(e||"")};var ce=function(e){return!c&&se(V)?e:e.replace(/<style.*?>([\s\S]+?)<\/style>/gim,(function(e,t){var n=t.replace(/(\n|\r)/g,"").split("}"),i=[];return n.map((function(e){""!=e&&i.push(".".concat(ae.current," ").concat(e))})),"<style>".concat(i.join("}"),"</style>")}))},ue=(0,d.useMemo)((function(){try{V=V.replace(/\(\/attachments\/download\//g,"("+f.Z.API_SERVER+"/attachments/download/").replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,"("+f.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+f.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+f.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n"),K.current.style.display="none"}catch(e){}if(T){var e=-1;return V=V.replaceAll("<","&lt;").replaceAll(">","&gt;").replace(/(@▁▁@|@▁@)/g,(function(t,n,i){var r;return function(e,t,n){var i=document.createElement(e===j?"input":"textarea");i.style.width="100%",i.style.height=e===j?"40px":"151px",i.rows=5,i.spellcheck=!1,i.name="edu-program-fill",i.placeholder="请输入",i.dataset.id=t;var r=Object.keys(le).length;return le[r]=i,'<span class="edu-program-fill-wrap '.concat(e===j?"":"show",'" style="width:').concat(e===j?"600px":"100%",'" title=').concat(n||"","><span>").concat(i.outerHTML,'<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>')}(t,++e,null==L||null===(r=L[e])||void 0===r?void 0:r.value.replaceAll("<","&lt;").replaceAll(">","&gt;"))})),'<pre style="background:#fff;padding:4px">'.concat(ce(V||""),"</pre>")}var t=ce(V);t=(0,h.ZP)(t);var n=(0,h.ez)();V.match(/\[TOC\]/)&&(t=t.replace("<p>[TOC]</p>",(0,h.Qv)()),(0,h.Iy)()),t=t.replace(/(__special_katext_id_\d+__)/g,(function(e,t){var i=n[t],r=i.type,o=i.expression;return(0,v.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(o)||"",{displayMode:"block"===r,throwOnError:!1,output:"html"})})),t=t.replace(/▁/g,"▁▁▁▁▁"),(0,h.AL)();var i=document.createElement("div");return i.innerHTML=t,c?i.innerText:D?(fe(i,D.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),i.innerHTML):(setTimeout((function(){return ge()}),500),i.innerHTML)}),[V,D]);(0,d.useEffect)((function(){me.current&&me.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=de,e.onblur=he,e.onfocus=pe}))}),[re]),(0,d.useEffect)((function(){if(null!=L&&L.length)try{var e,t=me.current.querySelectorAll(".edu-program-fill-score"),n=me.current.querySelectorAll('[name="edu-program-fill"]'),i=s()(n.entries());try{for(i.s();!(e=i.n()).done;){var r,o,a,l=u()(e.value,2),c=l[0],d=l[1];d.value=(null==L||null===(r=L[c])||void 0===r?void 0:r.value)||"","warning"===(null==L||null===(o=L[c])||void 0===o?void 0:o.type)?d.className="program-fill-warning":"success"===(null==L||null===(a=L[c])||void 0===a?void 0:a.type)?d.className="program-fill-success":d.className=""}}catch(e){i.e(e)}finally{i.f()}var h,p=s()(t.entries());try{for(p.s();!(h=p.n()).done;){var f,m,v=u()(h.value,2),g=v[0];v[1].innerHTML=null!=L&&null!==(f=L[g])&&void 0!==f&&f.score?"".concat(null==L||null===(m=L[g])||void 0===m?void 0:m.score,"分"):""}}catch(e){p.e(e)}finally{p.f()}oe(L)}catch(e){console.log(e,"error")}}),[L]);var de=function(e){re[e.target.dataset.id]=re[e.target.dataset.id]||{},re[e.target.dataset.id].value=e.target.value,oe(a()(re)),F(re,e.target.dataset.id)},he=function(e){re[e.target.dataset.id]=re[e.target.dataset.id]||{},re[e.target.dataset.id].value=e.target.value,oe(a()(re)),H(re,e.target.dataset.id)},pe=function(e){re[e.target.dataset.id]=re[e.target.dataset.id]||{},re[e.target.dataset.id].value=e.target.value,oe(a()(re)),G(re,e.target.dataset.id)};function fe(e,t){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)fe(e,t);else if("IMG"!==e.nodeName)if(e.innerHTML){var n;e.innerHTML=null===(n=e.innerHTML)||void 0===n?void 0:n.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>')}else{var i=document.createElement("span");i.innerHTML=e.textContent.replace(new RegExp(t,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),e.replaceWith(i)}}))}var me=(0,d.useRef)();function ve(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.indexOf("office")>-1)e.preventDefault(),J(n),te("office");else if(n.indexOf("application/pdf")>-1)e.preventDefault(),J(n),te("pdf");else if(n.indexOf("text/html")>-1)e.preventDefault(),J(n),te("html");else if(n.startsWith("#")){e.preventDefault();var i=document.getElementById(n.replace("#",""));i&&i.scrollIntoView(!0)}}}h.jb.WebkitLineClamp=m,m&&(A=r()(r()({},A),h.jb));var ge=function(){var e,t=null===(e=me.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(p.ZP.isSupported()){var t=new p.ZP;t.loadSource(e.src),t.attachMedia(e)}}))};(0,d.useEffect)((function(){if(me.current&&ue&&ue.match(N)&&window.PR.prettyPrint(),me.current)return me.current.addEventListener("click",ve),function(){var e;null===(e=me.current)||void 0===e||e.removeEventListener("click",ve),(0,h.AL)(),(0,h.Iy)()}}),[ue,me.current,ve]);return(0,d.useEffect)((function(){var e,t=function(e){e.preventDefault(),e.clipboardData.setData("text",window.getSelection().toString())};return null===(e=me.current)||void 0===e||e.addEventListener("copy",t),function(){var e;null===(e=me.current)||void 0===e||e.removeEventListener("copy",t)}}),[me.current]),(0,w.jsxs)("div",{style:{position:"relative"},onMouseLeave:function(){K.current.style.display="none"},children:[c&&(0,w.jsx)("div",{ref:me,className:"".concat(k," "),children:ue}),!c&&!se(ue)&&(0,w.jsx)("div",{ref:me,style:r()({},A),onMouseOver:function(e){"IMG"===e.target.nodeName&&e.target.className.indexOf("draw-flowchart")>-1?(K.current.style.zIndex=1,K.current.style.display="flex",K.current.style.width=e.target.clientWidth+"px",K.current.style.height=e.target.clientHeight+"px",K.current.style.top=e.target.offsetTop+"px",K.current.style.left=e.target.offsetLeft+"px",e.target.id&&(U.current=e.target.id)):K.current.style.display="none"},className:"".concat(l||""," ").concat(M?"disabled-fill":""," markdown-body ").concat(k," ").concat(ae.current),dangerouslySetInnerHTML:{__html:ue}}),!c&&se(ue)&&(0,w.jsx)(C,{html:ue}),(0,w.jsx)("div",{ref:K,className:"".concat(S," ").concat(o?"":_),children:(0,w.jsx)(g.Z,{children:(0,w.jsx)(y.ZP,{onClick:function(){o?R(U.current):(J(U.current),te("flowChart"))},children:o?"编辑":"预览"})})}),(0,w.jsx)(b.Z,{close:!0,data:X,type:null!=X&&X.length?ee:"",style:r()({},I),onClose:function(){return J("")}})]})}},55265:function(e,t,n){"use strict";n.d(t,{C:function(){return R}});var i=n(7557),r=n.n(i),o=n(41498),a=n.n(o),l=n(82242),s=n.n(l),c=n(79800),u=n.n(c),d=n(59301),h="recalculation____i9AE",p="tips___GoMu8",f="filter___Vx7VO",m="input___OEMMv",v="operating___TS9iA",g="operatingItem___AT84q",y=n(92310),x=n.n(y),b=n(62673),w=n(77019),C=n(6767),k=n(25399),S=n(99571),_=n(62957),j=n(54172),N=n(71051),E=n(28284),A=n(29787),Z=n(30406),I=n(87281),D=n(40189),T=n(37499),P=n(38049),M=n(37712),L=b.Z.Group,B=function(e){var t=e.className,n=e.title,i=e.items,r=void 0===i?[]:i,o=e.value,a=e.onChange,l=(null==r?void 0:r.length)===(null==o?void 0:o.length),s=(null==o?void 0:o.length)>0&&(null==o?void 0:o.length)<(null==r?void 0:r.length);return(0,M.jsxs)(w.Z,{align:"middle",className:t,children:[!!n&&(0,M.jsx)("div",{className:"mr20",style:{color:"#5F6368"},children:n}),(0,M.jsx)(b.Z,{indeterminate:s,onChange:function(e){var t=r.map((function(e){return e.id}));a(e.target.checked?t:[])},checked:l,children:"全部"}),(0,M.jsx)(L,{value:o,onChange:a,children:r.map((function(e){return(0,M.jsxs)(b.Z,{className:"ml30 c-black",value:e.id,children:[e.name,(0,M.jsx)("span",{children:"(".concat(e.count,")")})]},e.id)}))})]})},R=function(e){var t,n,i,o,l,c,y,L=e.className,R=e.style,O=e.dataSource,F=(0,d.useState)({}),W=u()(F,2),H=W[0],z=W[1],G=(0,d.useState)(!0),V=u()(G,2),K=V[0],U=V[1],q=(0,d.useState)(!1),Y=u()(q,2),X=Y[0],J=Y[1],Q=(0,d.useState)(!1),$=u()(Q,2),ee=$[0],te=$[1],ne=(0,d.useState)(null),ie=u()(ne,2),re=ie[0],oe=ie[1],ae=(0,d.useState)(0),le=u()(ae,2),se=le[0],ce=le[1],ue=(0,d.useState)({}),de=u()(ue,2),he=de[0],pe=de[1],fe=(0,d.useState)(!0),me=u()(fe,2),ve=me[0],ge=me[1],ye=(0,d.useState)(0),xe=u()(ye,2),be=xe[0],we=xe[1],Ce=(0,d.useState)(0),ke=u()(Ce,2),Se=ke[0],_e=ke[1],je=(0,d.useState)(!1),Ne=u()(je,2),Ee=Ne[0],Ae=Ne[1],Ze=(0,d.useRef)(null),Ie=(0,d.useState)(!1),De=u()(Ie,2),Te=De[0],Pe=De[1],Me=(0,d.useState)(!0),Le=u()(Me,2),Be=Le[0],Re=Le[1],Oe=(0,d.useState)([]),Fe=u()(Oe,2),We=Fe[0],He=Fe[1],ze={page:1,per_page:5,keyword:"",review:[],question_status:[],success_status:[],sort_by:null,direction:null},Ge=(0,d.useState)(s()({},ze)),Ve=u()(Ge,2),Ke=Ve[0],Ue=Ve[1];(0,d.useEffect)((function(){null!=O&&O.question_id&&z(O)}),[null==O?void 0:O.question_id]),(0,d.useEffect)((function(){var e;if("running"===(null==H||null===(e=H.exercise_question_resubmit)||void 0===e?void 0:e.status)){var t=setInterval((function(){Xe()}),3e3);return function(){return clearInterval(t)}}}),[null==H||null===(t=H.exercise_question_resubmit)||void 0===t?void 0:t.status]),(0,d.useEffect)((function(){if(ee){var e;if(1===ee&&(Ke.question_status=Je.map((function(e){return e.value})),Ke.review=Qe.map((function(e){return e.value}))),2===ee)Ke.exercise_question_resubmit_id=null==H||null===(e=H.exercise_question_resubmit)||void 0===e?void 0:e.id,1===re&&(Ke.success_status=[1]),2===re&&(Ke.success_status=[0]);Ue(s()({},Ke)),qe(Ke),_e(null!=H&&H.is_mirror?3:10),we(null!=H&&H.is_mirror?1:5)}}),[ee]),(0,d.useEffect)((function(){Te&&Ye()}),[Te]);var qe=function(){var e=a()(r()().mark((function e(t){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return U(!0),e.next=3,(0,I.ZP)("/api/exercise_questions/".concat(null==H?void 0:H.question_id,"/resubmit_student_list.json"),{method:"get",params:t});case 3:0==(null==(n=e.sent)?void 0:n.status)&&(pe(n||[]),ce(null==n?void 0:n.count)),U(!1);case 6:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ye=function(){var e=a()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return Re(!0),e.next=3,(0,I.ZP)("/api/exercise_questions/".concat(null==H?void 0:H.question_id,"/resubmit_history.json"),{method:"get"});case 3:0==(null==(t=e.sent)?void 0:t.status)&&He((null==t?void 0:t.data)||[]),Re(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Xe=function(){var e=a()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/exercise_questions/".concat(null==H?void 0:H.question_id,"/resubmit_status.json"),{method:"get"});case 2:0==(null==(t=e.sent)?void 0:t.status)&&z(s()(s()({},H),{},{show_resubmit_history:!0,exercise_question_resubmit:(null==t?void 0:t.data)||{}}));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Je=[{label:"未评测",value:2,color:"#9096A3"},{label:"未通关",value:0,color:"#E30000"},{label:"已通关",value:1,color:"#00B187"}],Qe=[{label:"未评阅",value:0,color:"#9096A3"},{label:"评阅中",value:2,color:"#FF9D18"},{label:"已评阅",value:1,color:"#3061D0"}],$e=[{label:"成功",value:1,color:"#00B187"},{label:"失败",value:0,color:"#E30000"}],et=[{title:"序号",dataIndex:"key",render:function(e,t,n){return(0,M.jsx)("span",{className:"c-black",children:n+1+(Ke.page-1)*Ke.per_page})}},{title:"姓名",dataIndex:"user_name",render:function(e){return(0,M.jsx)("span",{className:"c-black",children:e})}},{title:"学号",dataIndex:"student_id",sorter:!0,render:function(e){return(0,M.jsx)("span",{className:"c-grey-666",children:e||"--"})}},{title:"分班",dataIndex:"group_name",render:function(e){return(0,M.jsx)("span",{className:"c-black",children:e})}},{title:"题目状态",dataIndex:"question_status",render:function(e){var t=Je.find((function(t){return t.value===e}))||{},n=t.label,i=t.color;return(0,M.jsx)("span",{style:{color:i},children:n})}},{title:"题目得分",dataIndex:"question_score",sorter:!0,render:function(e){return(0,M.jsx)("span",{className:"c-black",children:e})}},{title:"最终成绩",dataIndex:"score",sorter:!0,render:function(e){return(0,M.jsx)("span",{className:"c-black",children:e})}},{title:"评阅状态",dataIndex:"review",render:function(e){var t=Qe.find((function(t){return t.value===e}))||{},n=t.label,i=t.color;return(0,M.jsx)("span",{style:{color:i},children:n})}},2===ee&&{title:"重新评测结果",dataIndex:"success_status",render:function(e){var t=$e.find((function(t){return t.value===e}))||{},n=t.label,i=t.color;return(0,M.jsx)("span",{style:{color:i},children:n})}}].filter(Boolean),tt=function(){var e=a()(r()().mark((function e(){var t,n,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(null===(t=Ze.current)||void 0===t||!t.onVerify()){e.next=2;break}return e.abrupt("return");case 2:return J(!0),e.next=5,(0,I.ZP)("/api/exercise_questions/".concat(null==H?void 0:H.question_id,"/resubmit.json"),{method:"post",body:{keyword:Ke.keyword,question_status:Ke.question_status,review:Ke.review_status,success_status:Ke.success_status,use_max_score:ve,permits:be,exercise_question_resubmit_id:1===ee?null:null==H||null===(n=H.exercise_question_resubmit)||void 0===n?void 0:n.id}});case 5:if(0!=(null==(i=e.sent)?void 0:i.status)){e.next=12;break}return e.next=9,Xe();case 9:C.ZP.success("操作成功"),Ae(!1),te(!1);case 12:J(!1);case 13:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),nt=function(e,t){Ke.page=1,Ke[t]=e,Ue(s()({},Ke)),qe(Ke)};return(0,M.jsxs)(d.Fragment,{children:[(0,M.jsxs)("div",{className:x()(h,L),style:R,children:[(0,M.jsx)(k.Z,{title:["","当前题目的实验资源为专有云,不支持重新评测~","该功能仅课堂管理员和考试的创建者可以操作~"][(null==H?void 0:H.disable_resubmit_reason)||0],children:(0,M.jsx)(S.ZP,{disabled:(null==H?void 0:H.disable_resubmit)||"running"===(null==H||null===(n=H.exercise_question_resubmit)||void 0===n?void 0:n.status),onClick:function(){return te(1)},icon:(0,M.jsx)("i",{className:"iconfont icon-zhongxinpingce font14"}),type:"primary",ghost:!0,children:"重新评测算分"})}),(null==H?void 0:H.show_resubmit_history)&&(0,M.jsxs)(M.Fragment,{children:["running"===(null==H||null===(i=H.exercise_question_resubmit)||void 0===i?void 0:i.status)?(0,M.jsxs)("div",{className:"c-grey-666",children:["重新评测中,当前进度",(0,M.jsx)("span",{className:"c-light-primary ml3",children:null==H||null===(o=H.exercise_question_resubmit)||void 0===o?void 0:o.rate})]}):(0,M.jsxs)("div",{className:"c-grey-666",children:["重新评测成功",(0,M.jsx)("span",{onClick:function(){te(2),oe(1)},className:"current",style:{color:"#3061D0",textDecoration:"underline",margin:"0 3px"},children:null==H||null===(l=H.exercise_question_resubmit)||void 0===l?void 0:l.success_student_count}),"人,失败",(0,M.jsx)("span",{onClick:function(){te(2),oe(2)},className:"current",style:{color:"#E30000",textDecoration:"underline",margin:"0 3px"},children:null==H||null===(c=H.exercise_question_resubmit)||void 0===c?void 0:c.fail_count}),"人"]}),(0,M.jsx)(k.Z,{title:"操作记录",children:(0,M.jsx)("i",{onClick:function(){return Pe(!0)},className:"iconfont icon-chakanshenqingjilu c-light-primary current font14"})})]})]}),(0,M.jsxs)(_.Z,{centered:!0,open:!!ee,title:"重新评测".concat(1===ee?"算分":"结果"),width:870,okText:"重新评测算分",onCancel:function(){return te(!1)},onOk:function(){be?Ae(!0):C.ZP.warning("请输入重新评测任务并发人数")},afterClose:function(){ge(!0),oe(null),Ue(s()({},ze))},children:[(0,M.jsxs)("div",{className:f,children:[1===ee&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)("div",{className:p,children:[(0,M.jsxs)("div",{className:"mb5",style:{color:"#FF9D18"},children:[(0,M.jsx)("i",{className:"iconfont icon-tishi9 mr10 font14"}),"温馨提示"]}),(0,M.jsx)("div",{children:"1.重新评测算分流程: 系统自动获取学生在考试页面保存的最新代码,并进行重新评测,从而精准计算出学生的最终得分;"}),(0,M.jsx)("div",{style:{margin:"2px 0"},children:"2.重新评测条件: 考试结束后,仅对已提交试卷且已作答该题目的学生进行重新评测与算分;"}),(0,M.jsx)("div",{children:"3.重新评测时,请确保实验环境能正常启动并可运行评测。"})]}),(0,M.jsx)(B,{className:"mt10",title:"题目状态",items:(null==he?void 0:he.question_status)||[],value:Ke.question_status,onChange:function(e){return nt(e,"question_status")}}),(0,M.jsx)(B,{className:"mt10",title:"评阅状态",items:(null==he?void 0:he.review_status)||[],value:Ke.review,onChange:function(e){return nt(e,"review")}})]}),2===ee&&(0,M.jsx)(M.Fragment,{children:(0,M.jsx)(B,{className:"mt10",title:"重新评测结果",items:(null==he?void 0:he.success_status)||[],value:Ke.success_status,onChange:function(e){return nt(e,"success_status")}})}),(0,M.jsx)(P.t7,{className:m,style:{bottom:1===ee?10:-5},value:Ke.keyword,onChange:function(e){return nt(e,"keyword")},placeholder:"请输入姓名或者学号搜索"})]}),(0,M.jsx)(j.Z,{className:"mt20",columns:et,scroll:(null==he||null===(y=he.data)||void 0===y?void 0:y.length)>7?{y:300}:{},dataSource:(null==he?void 0:he.data)||[],loading:K,onChange:function(e,t,n){Ke.page=null==e?void 0:e.current,Ke.per_page=null==e?void 0:e.pageSize,null!=n&&n.order?(Ke.sort_by=null==n?void 0:n.field,Ke.direction="ascend"===(null==n?void 0:n.order)?"asc":"desc"):(Ke.sort_by=null,Ke.direction=null),Ue(s()({},Ke)),qe(Ke)},pagination:{total:se,pageSize:Ke.per_page,current:Ke.page,hideOnSinglePage:!se,showSizeChanger:!0,pageSizeOptions:["5","10","20","50","100"],showQuickJumper:!0,size:"default",showTotal:Z.rU}}),(0,M.jsxs)(w.Z,{justify:"space-between",align:"middle",className:"mt10",children:[(0,M.jsx)(b.Z,{className:"c-black",checked:ve,onChange:function(e){return ge(e.target.checked)},children:"重新评测后的分数大于原来的分数才更新成绩"}),(0,D.Ny)()&&(0,M.jsxs)("div",{className:"c-black",children:["重新评测任务并发人数",(0,M.jsx)(N.Z,{className:"ml10 mr10",value:be,max:Se,min:1,precision:0,onChange:function(e){return we(e)}}),"人",(0,M.jsx)(k.Z,{overlayStyle:{maxWidth:450},title:"重新评测任务的最大并发人数为20人自定义镜像的最大并发人数为3人。",children:(0,M.jsx)("i",{style:{color:"#9096A3"},className:"iconfont icon-tishi5 font13 ml10"})})]})]})]}),(0,M.jsx)(_.Z,{centered:!0,title:"重新评测算分",open:Ee,width:494,zIndex:1001,okText:"确定",cancelText:"取消",confirmLoading:X,destroyOnClose:!0,onOk:tt,onCancel:function(){return Ae(!1)},children:(0,M.jsx)(E.Z.Item,{className:"mb0",colon:!1,label:"验证码",name:"code",rules:[{required:!0,message:"请输入验证码"}],children:(0,M.jsx)(T.Z,{ref:function(e){return Ze.current=e}})})}),(0,M.jsx)(_.Z,{centered:!0,title:"操作记录",open:Te,width:710,onCancel:function(){return Pe(!1)},footer:null,children:(0,M.jsxs)(A.Z,{spinning:Be,children:[(0,M.jsx)("div",{className:v,children:We.map((function(e,t){return(0,M.jsxs)("div",{className:g,children:[(0,M.jsx)("div",{style:{flex:"0 0 180px"},className:"c-grey-666",children:null==e?void 0:e.created_at}),(0,M.jsxs)("div",{className:"c-black",children:[null==e?void 0:e.user_name,"操作了重新评测算分"]}),"running"===(null==e?void 0:e.status)?(0,M.jsxs)("div",{className:"c-black",children:["重新评测中,当前进度",(0,M.jsx)("span",{className:"c-light-primary ml3",children:null==e?void 0:e.rate})]}):(0,M.jsxs)("div",{className:"c-black",children:["重新评测成功",(0,M.jsx)("span",{style:{color:"#3061D0",margin:"0 3px"},children:null==e?void 0:e.success_student_count}),"人,失败",(0,M.jsx)("span",{style:{color:"#E30000",margin:"0 3px"},children:null==e?void 0:e.fail_count}),"人"]})]},t)}))}),(0,M.jsx)("div",{style:{height:20}})]})})]})}},24906:function(e,t,n){"use strict";n.d(t,{Z:function(){return x}});var i=n(7557),r=n.n(i),o=n(37205),a=n.n(o),l=n(41498),s=n.n(l),c=n(79800),u=n.n(c),d=n(59301),h="orangeColor___U5vU6",p="redColor___qYa6X",f="statustitle___pTBLm",m="statusbody___qUPQx",v="flex___VtL45",g=n(62957),y=n(37712),x=function(e){var t=e.type,n=e.resdata,i=e.onok,o=e.oktext,l=e.okloading,c=(0,d.useState)(!1),x=u()(c,2),b=x[0],w=x[1],C=n.can_copy_list,k=n.can_copy_num,S=n.challenge_type,_=(n.course_data_list,n.no_copy_list),j=n.no_copy_num,N=n.no_use_list,E=(n.no_use_num,n.repeat_shixun_num,n.student_count),A=(n.total_num,n.use_num),Z=k>0||"exercise"===t;(0,d.useEffect)((function(){(null==n?void 0:n.student_count)>0&&w(!0)}),[n]),console.log("---11",l),(0,d.useEffect)((function(){l||w(!1)}),[l]);return(0,y.jsx)(g.Z,{open:b,onCancel:function(){w(!1)},cancelText:"取消",title:"提示",width:700,centered:!0,cancelButtonProps:{style:{display:!Z&&"none"}},zIndex:1003,confirmLoading:l,okText:Z?o:"我知道了",onOk:s()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!Z){e.next=5;break}return e.next=3,i([].concat(a()(C),a()(N)));case 3:e.next=6;break;case 5:w(!1);case 6:case"end":return e.stop()}}),e)}))),children:(0,y.jsxs)("div",{style:{maxHeight:600,overflow:"auto"},children:["exercise"===t&&1===S?(0,y.jsxs)(y.Fragment,{children:["课堂内有",(0,y.jsx)("span",{className:h,children:E}),"名学生已在其他考试中挑战过其中的",(0,y.jsx)("span",{className:h,children:A}),"个实践项目,",(0,y.jsx)("span",{className:p,children:"重复发送会导致这部分学生无法作答已挑战过的实训题。"})]}):"exercise"===t&&2===S?(0,y.jsxs)(y.Fragment,{children:["课堂内有",(0,y.jsx)("span",{className:h,children:E}),"名学生已在课堂实验中挑战过其中的",(0,y.jsx)("span",{className:h,children:A}),"个实践项目,且作业已开启“作业截止后不允许学生编辑代码”设置项,",(0,y.jsx)("span",{className:p,children:"重复发布会导致这部分学生无法再提交作业。"})]}):"shixun"===t&&1===S?(0,y.jsxs)(y.Fragment,{children:["课堂内有",(0,y.jsx)("span",{className:h,children:E}),"名学生已在考试中挑战过该实践项目,",(0,y.jsx)("span",{className:p,children:"重复发送会导致这部分学生无法再提交作业。"})]}):"shixun"===t&&2===S?(0,y.jsxs)(y.Fragment,{children:["课堂内有",(0,y.jsx)("span",{className:h,children:E}),"名学生已在课堂实验中挑战过该实践项目,且作业已开启“作业截止后不允许学生编辑代码”设置项,",(0,y.jsx)("span",{className:p,children:"重复发送会导致这部分学生无法再提交作业。"})]}):"subject"===t&&1===S?(0,y.jsxs)(y.Fragment,{children:["课堂内有",(0,y.jsx)("span",{className:h,children:E}),"名学生已在考试中挑战过其中的",(0,y.jsx)("span",{className:h,children:A}),"个实践项目,",(0,y.jsx)("span",{className:p,children:"重复发送会导致这部分学生无法再提交作业。"})]}):"subject"===t&&2===S?(0,y.jsxs)(y.Fragment,{children:["课堂内有 ",(0,y.jsx)("span",{className:h,children:E})," 名学生已在课堂实验挑战过其中的 ",(0,y.jsx)("span",{className:h,children:A})," 个实践项目,且作业已开启“作业截止后不允许学生编辑代码”设置项,",(0,y.jsx)("span",{className:p,children:"重复发送会导致这部分学生无法再提交作业。"})]}):"exercisepush"===t?(0,y.jsxs)(y.Fragment,{children:["课堂内有",(0,y.jsx)("span",{className:h,children:E}),"名学生已在其他考试中挑战过试卷中的",(0,y.jsx)("span",{className:h,children:A}),"个实践项目 ",(0,y.jsx)("span",{className:p,children:"重复发布会导致这部分学生无法在当前考试中进行作答。"})]}):"shixunpush"===t&&1===S?(0,y.jsxs)(y.Fragment,{children:["课堂内有",(0,y.jsx)("span",{className:h,children:E}),"名学生已在考试中挑战过其中的",(0,y.jsx)("span",{className:h,children:A}),"个实践项目,",(0,y.jsx)("span",{className:p,children:"重复发布会导致这部分学生无法再提交作业。"})]}):"shixunpush"===t&&2===S?(0,y.jsxs)(y.Fragment,{children:["课堂内有",(0,y.jsx)("span",{className:h,children:E}),"名学生已在课堂实验中挑战过",(0,y.jsx)("span",{className:h,children:A}),"个实践项目,且作业已开启“作业截止后不允许学生编辑代码”设置项,",(0,y.jsx)("span",{className:p,children:"重复发布会导致这部分学生无法再提交作业。"})]}):void 0,"exercise"===t||"subject"===t||"exercisepush"===t||"shixunpush"===t?(0,y.jsxs)("div",{style:{marginTop:20},children:[j>0&&(0,y.jsxs)("div",{children:[(0,y.jsxs)("span",{className:v,children:[(0,y.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAW1JREFUOE+dkj1IQmEUht9z/blp4VQEjS39eW+oSCFCpFCI4BiKFGWWQUSrCjVVg+lQNJZQDZGNTm1B4NTibS3n2lo0wuqEN8i/a0HfeN7v+d73nO+QJEcKAJzQPAwCnSpKNtoqkyRHqgDrtUFAb6Rnedx43KgT6O5P0GQijFiNLe/Sy3/B8g+YTIRRrb5jP32JYNADr8eOldU0RJEqVlm8r1kyuA/AIEB10OWy4vBgA4ryCIdjCJlMDmfn1zAY6EmyGY/UrAwrgGATWKsn4mGEQl4Uiw+YX9hT73aZiEcl8eMbZAGA0AT6/ZPY3Ykiny/A55tA7uoGqdQFBD2VbDbDugoSTTEj3gTGYgG8Vt7UeG63hNkZJ7a2s+gw1XqPnf5REKhkt4kxNakO08ycbOtRC/7FcakCwNTJ0WwmDI+1LUCZZDkSYGa5Eewf0G0KAnprNYtFQHdPbZhNS1cmLafF5bUTJsyBSVMHPm+/ADTrfrtCH68WAAAAAElFTkSuQmCC",style:{width:14}}),(0,y.jsx)("span",{className:f,children:"不支持复制的实践项目"})]}),(0,y.jsxs)("div",{className:m,children:["exercise"===t&&(0,y.jsxs)("div",{style:{marginBottom:15},children:["没有复制权限的实践项目,",(0,y.jsx)("span",{className:p,children:"以下试题将不会被发送至课堂中。"}),"您也可以联系项目创建者开启复制权限或者联系平台教研助理进行协助。"]}),("subject"===t||"exercisepush"===t)&&(0,y.jsxs)("div",{style:{marginBottom:15},children:["没有复制权限的实践项目,",Z&&(0,y.jsx)("span",{className:p,children:"一键复制不会复制此部分项目。"}),"您可以联系项目创建者开启复制权限或者联系平台教研助理进行协助。"]}),"shixunpush"===t&&(0,y.jsxs)("div",{style:{marginBottom:15},children:["没有复制权限的实践项目,",Z&&(0,y.jsx)("span",{className:p,children:"一键复制不会复制此部分项目。"}),"建议您重新选择实践项目再发布作业,也可联系项目创建者开启复制权限或联系平台教研助理进行协助。"]}),(0,y.jsx)("div",{children:null==_?void 0:_.map((function(e,t){return(0,y.jsxs)("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:["《",null==e?void 0:e.name,"》",t+1!==j&&"、"]})}))})]})]}),k>0&&(0,y.jsxs)("div",{style:{marginTop:20},children:[(0,y.jsxs)("span",{className:v,children:[(0,y.jsx)("img",{src:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAYAAADUFP50AAAAAXNSR0IArs4c6QAAAUFJREFUOE+V0ktKw1AUxvH/rVqIxT4wkgwEUSmK4APRBfiYCKU7cOZEBOkadAMZiwhuwJETBQciFRTtwJkPBLW2BRGrRanU9kpN2sSYiGaWc/PjuznnCN2Qh8AkPo+AzXxKLLiPhW7ICtDqB4GzQkqM/huGFZgZcDCBBDaaicsTMKbZH2xfwdY5/ICAEGSasC0AwRYblj+gKkENwfy4WS9V4LHsgsk49EZteJKHdBa6w7AybdZzr3D64ILxGKjtNrx9gfsSRBSYtf6xZh1/u+qQClrIhtdFuHmGvhisJcz65RPsZl2Jc/3QE7FhpgDHuT80x2+O9cR1K/GiCDt3rkQ/+Ns43gDFD0YVmHIuQGOOmiGTARhxwkGd1cZ7Vwd0OppWr3911StpcV++Iwn67q/kyBMuHchErcqwFxT1XZXsfQJqo2zI6kdI4QAAAABJRU5ErkJggg==",style:{width:14}}),(0,y.jsx)("span",{className:f,children:"支持复制的实践项目"})]}),(0,y.jsxs)("div",{className:m,children:["exercise"===t&&(0,y.jsx)("div",{style:{marginBottom:15},children:"建议您一键复制并替换试题(将复制并创建一个新的项目替换试卷中的原试题,不会复制学生的挑战记录,新的项目支持进行编辑并与原项目信息互不影响)。"}),("subject"===t||"exercisepush"===t)&&(0,y.jsx)("div",{style:{marginBottom:15},children:"建议您一键复制并发送(将复制并创建一个新的项目,不会复制学生的挑战记录,新的项目支持进行编辑并与原项目信息互不影响)。"}),"shixunpush"===t&&(0,y.jsx)("div",{style:{marginBottom:15},children:"建议您一键复制并替换试题(将复制并创建一个新的项目替换当前作业中的实践项目,不会复制学生的挑战记录,新的项目支持进行编辑并与原项目信息互不影响)。"}),(0,y.jsx)("div",{children:null==C?void 0:C.map((function(e,t){return(0,y.jsxs)("a",{href:"/shixuns/".concat(e.identifier,"/challenges"),target:"_blank",children:["《",null==e?void 0:e.name,"》",t+1!==k&&"、"]})}))})]})]})]}):"shixun"===t?(0,y.jsx)("div",{style:{marginTop:20},children:k>0?"该项目支持复制,建议您一键复制并发送(将复制并创建一个新的项目,不会复制学生的挑战记录,新的项目支持进行编辑并与原项目信息互不影响)。":"该项目不支持复制,您可以联系项目创建者开启复制权限或者联系平台教研助理进行协助。"}):void 0]})})}},80552:function(e,t,n){"use strict";n.d(t,{Z:function(){return l}});n(59301);var i={btn:"btn___kReTL",redBtn:"redBtn___UFEL0"},r=n(92310),o=n.n(r),a=n(37712),l=function(e){var t=e.className,n=e.style,r=e.state,l=e.onClick;return(0,a.jsx)("div",{onClick:l,className:o()(r?null==i?void 0:i.redBtn:null==i?void 0:i.btn,t),style:n,children:r?(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("i",{className:"iconfont icon-biaoji1"}),(0,a.jsx)("span",{children:"取消标记错题"})]}):(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("i",{className:"iconfont icon-biaojigaiti"}),(0,a.jsx)("span",{children:"标记错题"})]})})}},51168:function(e,t,n){"use strict";n.d(t,{h:function(){return g}});var i=n(82242),r=n.n(i),o=n(79800),a=n.n(o),l=n(59301),s=n(82326),c=n(28284),u=n(99571),d=n(89780),h=n.n(d),p=(n(2018),n(66551),n(37712)),f=s.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 t=e.value,n=e.onChange,i=e.mode,o=e.options,s=void 0===o?{}:o,c=(0,l.useRef)(),u=(0,l.useState)(),d=a()(u,2),f=d[0],m=d[1];return(0,l.useEffect)((function(){if(f){var e=function(e){var t=e.getValue();n&&n(t)};return f.on("change",e),function(){f.off("change",e)}}}),[f,n]),(0,l.useEffect)((function(){f&&f.setOption("mode",i)}),[f,i]),(0,l.useEffect)((function(){f&&(t===f.getValue()&&""!==t||setTimeout((function(){f.setValue(t||"")}),300))}),[f,t]),(0,l.useEffect)((function(){if(c.current&&!f){var e=h().fromTextArea(c.current,r()({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},s));m(e)}}),[c.current,f]),(0,p.jsx)("div",{className:"my-codemirror-container",children:(0,p.jsx)("textarea",{ref:c})})}t.Z=function(e){var t=e.callback,n=e.onCancel,i=(0,l.useState)("python"),o=a()(i,2),d=o[0],h=o[1];return(0,p.jsxs)(c.Z,r()(r()({},m),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)},style:{width:500},children:[(0,p.jsx)(c.Z.Item,{label:"代码语言",name:"language",children:(0,p.jsx)(s.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){h(v[e][1])},children:Object.keys(v).map((function(e){return(0,p.jsx)(f,{value:e,children:v[e][0]},e)}))})}),(0,p.jsx)(c.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,p.jsx)(g,{mode:d})}),(0,p.jsxs)("div",{className:"flex-container flex-end",children:[(0,p.jsx)(u.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,p.jsx)(u.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))}},16039:function(e,t,n){"use strict";n.d(t,{Z:function(){return he}});var i=n(91232),r=n.n(i),o=n(79800),a=n.n(o),l=n(85573),s=n.n(l),c=n(59301),u=n(76805),d=n(89780),h=n.n(d),p=n(76374),f=(n(2018),n(6313),n(25717),n(99498),n(25419),n(67549),n(83449)),m=n(37712),v=function(e){var t=e.value,n=void 0===t?"":t,i=(e.className,e.showTextOnly,e.showLines,e.style,(0,c.useMemo)((function(){return""}),[n]));return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})},g=n(82242),y=n.n(g),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:"md-iconfont icon-formula",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 b(e){var t=e.onActionCallback,n=e.title,i=e.icon,r=e.actionName,o=e.className,a=void 0===o?"":o,l=e.children;return(0,m.jsxs)("a",{title:n,className:a,onClick:function(){t(r)},children:[(0,m.jsx)("i",{className:"".concat(i)}),l]})}var w=function(e){var t=e.watch,n=e.showNullButton,i=e.showNullProgramButton,r=e.onActionCallback,o=e.fullScreen,a=e.insertTemp,l=e.hidetoolBar,s=e.extraUse,c=[].concat(x,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,m.jsxs)("ul",{className:"markdown-toolbar-container",children:[!l&&c.map((function(e,t){return(0,m.jsx)("li",{children:e.actionName?(0,m.jsx)(b,y()(y()({},e),{},{onActionCallback:r})):(0,m.jsx)("span",{className:"v-line"})},t)})),n?(0,m.jsx)("li",{children:(0,m.jsx)(b,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"增加填空",actionName:"add-null-ch",onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"点击新增填空项"})})}):null,i?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("li",{children:(0,m.jsx)(b,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"添加单行填空项"})})}),(0,m.jsx)("li",{children:(0,m.jsx)(b,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"添加多行填空项"})})})]}):null,a&&(0,m.jsx)("li",{children:(0,m.jsx)(b,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),s&&(0,m.jsx)("li",{children:s}),(0,m.jsx)("li",{className:"btn-full-screen",children:(0,m.jsx)(b,{icon:"".concat(o?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:o?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})})]})},C=n(34858),k=n(28284),S=n(37568),_=n(99571),j={labelCol:{span:4},wrapperCol:{span:20}},N=function(e){var t=e.callback,n=e.onCancel;return(0,m.jsxs)(k.Z,y()(y()({},j),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)},style:{width:500},children:[(0,m.jsx)(k.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,m.jsx)(S.Z,{})}),(0,m.jsx)(k.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,m.jsx)(S.Z,{})}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(_.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(_.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))},E=n(51168),A=n(83016),Z=n(62957),I=n(77019),D=n(32110),T=function(e){var t=e.callback,n=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,m.jsx)(Z.Z,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1,children:(0,m.jsx)(I.Z,{style:{height:"100vh"},children:(0,m.jsx)(D.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:o,visible:!0,title:String(Date.now())},onOk:function(e){t({src:e.url})},onClose:n})})})},P=n(30641),M=n(5269),L=n(6767),B="drawerWrap___MfDw8",R=(0,c.forwardRef)((function(e,t){e.onCancel;var n=e.editImgId,i=e.callback,r=((0,c.useRef)(),(0,c.useRef)()),o=((0,c.useRef)(),(0,c.useRef)(!1),(0,c.useRef)(!1));console.log("ref:",t);var l=(0,c.useState)(0),s=a()(l,2),u=s[0],d=s[1],h=(0,c.useState)("100vh"),p=a()(h,2),f=p[0],v=p[1];return(0,c.useEffect)((function(){d(1)}),[]),(0,c.useImperativeHandle)(t,(function(){return{setHeight:v}})),(0,m.jsx)("div",{ref:o,className:"body-overflow-initial",children:(0,m.jsx)(P.Z,{width:"100vw",height:f,footer:null,closable:!0,placement:"bottom",open:!!u,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:"zIndex-9999 ".concat(B),onClose:function(){window.saveDrawData((function(e){i({src:"/api/attachments/".concat(e),id:e})}))},title:(0,m.jsxs)(I.Z,{align:"middle",children:[(0,m.jsx)(M.Z,{flex:1,children:"插入流程图"}),(0,m.jsx)(M.Z,{onClick:function(){v("60px"===f?"100vh":"60px")},children:(0,m.jsx)("span",{className:"current c-blue",style:{fontWeight:400},children:"展开/收起"})}),(0,m.jsx)(M.Z,{onClick:function(){window.saveDrawData((function(e){null!==e?(L.ZP.success({content:"保存成功",key:"saveFlowChart",style:{zIndex:999999999}}),i({src:"/api/attachments/".concat(e),id:e,disabledClose:!0})):L.ZP.warning({content:"内容为空,请先绘制流程图",key:"saveFlowChart"})}))},children:(0,m.jsx)(_.ZP,{type:"primary",className:"ml20",children:"保存"})})]}),children:(0,m.jsx)("iframe",{src:"/drawio/src/main/webapp/?id=".concat(n||"","&gapi=0&od=0&db=0&gh=0&gl=0&local=0"),width:"100%",height:"100%",frameBorder:"0",ref:r})})})})),O=n(51200),F=n(47889),W=n(71051),H=F.ZP.Group,z={margin:"0 8px"},G=function(e){var t=e.callback,n=e.onCancel;return(0,m.jsxs)(k.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)},children:[(0,m.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,m.jsx)("span",{style:z,children:"单元格数:"}),(0,m.jsx)("span",{style:z,children:"行数"}),(0,m.jsx)(k.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,m.jsx)(W.Z,{})}),(0,m.jsx)("span",{style:z,children:"列数"}),(0,m.jsx)(k.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,m.jsx)(W.Z,{})})]}),(0,m.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,m.jsx)("span",{style:z,children:"对齐方式:"}),(0,m.jsx)(k.Z.Item,{name:"align",children:(0,m.jsxs)(H,{children:[(0,m.jsx)(F.ZP,{value:"default",children:(0,m.jsx)("i",{className:"fa fa-align-justify"})}),(0,m.jsx)(F.ZP,{value:"left",children:(0,m.jsx)("i",{className:"fa fa-align-left"})}),(0,m.jsx)(F.ZP,{value:"center",children:(0,m.jsx)("i",{className:"fa fa-align-center"})}),(0,m.jsx)(F.ZP,{value:"right",children:(0,m.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(_.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(_.ZP,{type:"ghost",onClick:n,children:"取消"})]})]})},V=n(71411),K=n(70746),U=n.n(K),q=(0,c.forwardRef)((function(e,t){var n=e.use3d,i=e.width,r=e.height,o=e.callback,l=(e.showSaveButton,(0,c.useRef)()),s=(0,c.useRef)(),u=(0,c.useState)(!1),d=a()(u,2),h=d[0],p=d[1],f=(0,c.useRef)({id:l,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(){s.current=new(U())(f.current,!0),window.onload=function(){s.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(){f.current.appName=h?"3D":"graphing",s.current.inject("applet_container")}),[h]),(0,c.useEffect)((function(){p(n)}),[n]),(0,c.useImperativeHandle)(t,(function(){return{getImgData:v}})),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:l}),(0,m.jsxs)(I.Z,{align:"middle",children:[(0,m.jsx)(M.Z,{flex:1,children:(0,m.jsx)(V.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:h,onChange:function(e){return p(e)}})}),(0,m.jsx)(M.Z,{children:(0,m.jsx)(_.ZP,{size:"large",onClick:v,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),Y=n(90786),X="link",J="upload-image",Q="add-flowchart",$="draw-image",ee="code-block",te="add-table",ne="------------",ie={default:ne,left:":".concat(ne),center:":".concat(ne,":"),right:"".concat(ne,":")},re=n(28329),oe=n(30406);var ae="@▁▁@",le=["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 se(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ce=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ue=s()(s()({},ce+"-B","bold"),ce+"-I","italic"),de=s()(s()(s()(s()(s()(s()(s()(s()({},X,"添加链接"),ee,"添加代码块"),J,"添加图片"),$,"添加画图"),Q,"插入流程图"),te,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),he=function(e){var t=e.defaultValue,n=void 0===t?"":t,i=e.onChange,o=e.width,l=void 0===o?"100%":o,d=e.height,g=void 0===d?400:d,y=e.miniToolbar,x=void 0!==y&&y,b=e.isFocus,k=void 0!==b&&b,S=e.watch,_=e.insertTemp,j=e.mode,I=void 0===j?"markdown":j,D=e.id,P=void 0===D?"markdown-editor-id":D,M=e.showResizeBar,B=void 0!==M&&M,F=e.noStorage,W=void 0!==F&&F,H=e.showNullButton,z=void 0!==H&&H,V=e.showNullProgramButton,K=void 0!==V&&V,U=e.hidetoolBar,ne=void 0!==U&&U,ce=e.fullScreen,he=void 0!==ce&&ce,pe=e.onBlur,fe=e.onCMBeforeChange,me=e.onFullScreen,ve=e.className,ge=void 0===ve?"":ve,ye=e.disablePaste,xe=void 0!==ye&&ye,be=e.disabled,we=void 0!==be&&be,Ce=e.disabledFill,ke=void 0!==Ce&&Ce,Se=e.placeholder,_e=void 0===Se?"":Se,je=e.values,Ne=void 0===je?"":je,Ee=e.extraUse,Ae=e.onAddBlank,Ze=(0,c.useState)(null),Ie=a()(Ze,2),De=Ie[0],Te=Ie[1],Pe=(0,c.useState)(n),Me=a()(Pe,2),Le=Me[0],Be=Me[1],Re=(0,c.useState)(S),Oe=a()(Re,2),Fe=Oe[0],We=Oe[1],He=(0,c.useState)(he),ze=a()(He,2),Ge=ze[0],Ve=ze[1],Ke=(0,c.useState)(""),Ue=a()(Ke,2),qe=Ue[0],Ye=Ue[1],Xe=(0,c.useState)(0),Je=a()(Xe,2),Qe=Je[0],$e=Je[1],et=(0,c.useState)(g),tt=a()(et,2),nt=tt[0],it=tt[1],rt=(0,c.useState)(!1),ot=a()(rt,2),at=(ot[0],ot[1]),lt=(0,c.useState)(0),st=a()(lt,2),ct=st[0],ut=st[1],dt=(0,c.useState)(0),ht=a()(dt,2),pt=ht[0],ft=ht[1],mt=(0,c.useRef)(),vt=(0,c.useRef)(),gt=(0,c.useRef)(),yt=(0,c.useRef)(),xt=(0,c.useRef)(),bt=(0,c.useRef)(),wt=(0,u.useDispatch)();(0,c.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Be(Ne),null==De||De.setValue(Ne),window.scrollTo(0,e)}),[Ne]),(0,c.useEffect)((function(){null==me||me(Ge)}),[Ge]),(0,c.useEffect)((function(){if(mt.current){var e=function(e,n){if(!xe){var i=n.clipboardData;if(i){var r=i.types.toString(),o=i.items;if("Files"===r||i.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==I)return;try{var a,l=o[1];"file"===(null===(a=o[0])||void 0===a?void 0:a.kind)&&(l=o[0]);var s=l.getAsFile(),c=s.name.split(".").pop();(0,A.I)(s,(function(e){var n,i,r;e.id?(null==s||null===(n=s.type)||void 0===n?void 0:n.indexOf("image"))>-1?t.replaceSelection('<img width="100%" src="/api/attachments/'.concat(e.id,"?type=").concat(e.content_type,')" alt="','" />')):(null==s||null===(i=s.type)||void 0===i?void 0:i.indexOf("video"))>-1?t.replaceSelection('<video width="100%" controls src="/api/attachments/'.concat(e.id,'"></video>')):(null==s||null===(r=s.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?t.replaceSelection('<a href="/api/attachments/'.concat(e.id,"?type=").concat(s.type,'&disposition=inline" target="_blank">').concat(s.name,"</a>")):le.includes(c)?t.replaceSelection('<a href="/api/attachments/'.concat(e.id,'?type=office&disposition=inline" target="_blank">').concat(s.name,"</a>")):t.replaceSelection("[".concat(s.name,"](/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(n){L.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()},t=h().fromTextArea(mt.current,{mode:I,lineNumbers:!x,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});return t.on("keyup",(function(e,n){8===n.keyCode&&(""==e.getValue()?t.setOption("placeholder",_e):t.setOption("placeholder",null))})),t.on("keydown",(function(e,t){if(8===t.keyCode){var n=function(e,t){var n=e.getDoc(),i=n.getCursor(),r=n.getLine(i.line),o=r.charAt(i.ch-1),a=r.lastIndexOf("@▁@",i.ch),l=r.lastIndexOf("@▁▁@",i.ch),s=a>l?a:l,c=a>l?3:4;if(-1===ae.indexOf(o))return null;if(console.log("change1:",t,e,r,i,s,a,l,o),s>=0&&i.ch-s<5){var u=s+c;return n.replaceRange("",{line:i.line,ch:s},{line:i.line,ch:u}),{line:i.line,ch:u}}return null}(e);n&&t.preventDefault()}})),k&&t.focus(),t.on("paste",e),we&&t.on("beforeChange",(function(e,t){"paste"!==t.origin&&"+input"!==t.origin||t.cancel()})),Te(t),function(){t.off("paste",e)}}}),[]);var Ct=(0,c.useCallback)((function(){vt.current}),[nt,vt,Ge]);(0,c.useEffect)((function(){if(De){var e=function(){var e=new p.Z((function(e){var t,n=r()(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(Ct(),De.setSize("100%","100%"),De.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(mt.current.parentElement),e}();return function(){var t,n;null!==(t=mt.current)&&void 0!==t&&t.parentElement&&e.unobserve(null===(n=mt.current)||void 0===n?void 0:n.parentElement)}}}),[De,Ct]),(0,c.useEffect)((function(){if(De){for(var e=[],t=function(){var t=a()(i[n],2),r=t[0],o=t[1],l=s()({},r,(function(){kt(o)}));e.push(l),De.addKeyMap(l)},n=0,i=Object.entries(ue);n<i.length;n++)t();return function(){for(var t=0,n=e;t<n.length;t++){var i=n[t];De.removeKeyMap(i)}}}}),[De]),(0,c.useEffect)((function(){he!==Ge&&Ve(he)}),[he]),(0,re.Z)((function(){if(!W&&Qe>0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(P);e>=Qe+1e4&&(!t||t!==Le)&&(window.sessionStorage.setItem(P,Le),at(!0))}}),1e4),(0,c.useEffect)((function(){We(S)}),[De,S]),(0,c.useEffect)((function(){De&&k&&De.focus()}),[De,k]),(0,c.useEffect)((function(){if(Fe&&De){var e=function(e){var t=e.target;if(yt.current){var n=t.scrollTop/t.scrollHeight;yt.current.scrollTop=yt.current.scrollHeight*n}},t=De.getScrollerElement();return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[De,Fe]),(0,c.useEffect)((function(){if(De&&fe){var e=function(e,t){fe(e,t)};return De.on("beforeChange",e),function(){De.off("beforeChange",e)}}}),[De,fe]),(0,c.useEffect)((function(){if(De&&pe){var e=function(){pe(De.getValue())};return De.on("blur",e),function(){De.off("blur",e)}}}),[De,pe]),(0,c.useEffect)((function(){if(De){var e=function(e,t){var n=e.getValue();Be(n),$e((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(K?i(n,Et(n)):i(n))};return De.on("change",e),function(){De.off("change",e)}}}),[De,i]),(0,c.useEffect)((function(){if(De)if(null==n)De.setValue(""),Be("");else{var e=window.scrollY||window.pageYOffset;n!==De.getValue()&&(De.setValue(n),Be(n),De.setCursor(we?1:De.lineCount(),0),window.scrollTo(0,e))}}),[De,n]);var kt=(0,c.useCallback)((function(e){var t=De.getCursor(),n=De.getSelection(),i=n.split("\n");switch(e){case"bold":return De.replaceSelection("**"+n+"**"),""===n&&De.setCursor(t.line,t.ch+2),De.focus();case"italic":return De.replaceSelection("*"+n+"*"),""===n&&De.setCursor(t.line,t.ch+1),De.focus();case"code":return De.replaceSelection("`"+n+"`"),""===n&&De.setCursor(t.line,t.ch+1),De.focus();case"inline-latex":if((0,oe.Ye)(wt))return;return Ye("inline-latex"),De.focus();case"latex":return De.replaceSelection("```latex\n"+n+"\n```"),De.setCursor(t.line+1,n.length+1),De.focus();case"line-break":return De.replaceSelection("<br/>\n"),De.focus();case"list-ul":return""===n?De.replaceSelection("- "+n):De.replaceSelection(i.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),De.focus();case"list-ol":return""===n?De.replaceSelection("1. "+n):De.replaceSelection(i.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),De.focus();case"add-null-ch":return void(null==Ae||Ae());case"add-signal":return""===n&&De.setCursor(t.line,t.ch),De.replaceSelection("@▁@"),De.focus();case"add-multiple":return""===n&&De.setCursor(t.line,t.ch),De.replaceSelection(ae),De.focus();case"inster-template-1":return""===n&&De.setCursor(t.line,t.ch),De.replaceSelection("\n**模板标题**\n模板正文内容可输入文本内容和粘贴图片等操作"),De.focus();case"eraser":return De.setValue(""),De.focus();case"trigger-watch":return We(!Fe),De.focus();case"trigger-full-screen":return Ve(!Ge),De.focus();case X:return void Ye(X);case ee:return void Ye(ee);case J:return void Ye(J);case $:return void Ye($);case"maths-latex":if((0,oe.Ye)(wt))return;return void Ye("maths-latex");case Q:return xt.current="",sessionStorage.removeItem("file_id"),void Ye(Q);case te:return void Ye(te);default:throw new Error}}),[De,Fe,Ge]),St=(0,c.useCallback)((function(e,t){var n,i,r,o,a;null!=e&&e.disabledClose||Ye("");var l=e||{},s=l.src,c=l.alt,u=l.id;switch(qe){case X:var d=e.title,h=e.link;return De.replaceSelection("[".concat(d,"](").concat(h,")")),De.focus();case ee:var p=e.language,f=e.content;return De.replaceSelection(["```"+p,f,"```"].join("\n")),De.focus();case"maths-latex":for(var m=atob(e),v=new Uint8Array(m.length),g=0;g<m.length;g++)v[g]=m.charCodeAt(g);var y=new Blob([v],{type:"image/png"});(0,A.I)(y,(function(e){e.id?De.replaceSelection("![,](/api/attachments/".concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}));break;case"inline-latex":if((0,oe.Ye)(wt))return;De.replaceSelection("`$$"+e+"$$`");break;case"add-flowchart":if(!u)return;-1===De.getValue().indexOf(s)?De.replaceSelection('<center><img id="'.concat(u,'" width="80%" src="').concat(s,'" class="draw-flowchart" alt="').concat(c||"",'" /></center>')):document.getElementById(u).src=O.Z.API_SERVER+s+"?t="+Date.now();break;case J:case $:var x=t,b=null==x||null===(n=x.name)||void 0===n||null===(n=n.split("."))||void 0===n||null===(i=n.pop)||void 0===i?void 0:i.call(n);return(null==x||null===(r=x.type)||void 0===r?void 0:r.indexOf("image"))>-1||null==x||!x.type?null!=x&&x.align||null!=x&&x.width?De.replaceSelection('<p style="text-align:'.concat(x.align||"initial",'"><img width="').concat(x.width?x.width+"%":"initial",'" src="').concat(s,'" alt="').concat(c||"",'" /></p>')):De.replaceSelection('<img width="100%" src="'.concat(s,'" alt="').concat(c||"",'" />')):(null==x||null===(o=x.type)||void 0===o?void 0:o.indexOf("video"))>-1?De.replaceSelection('<video width="100%" controls src="'.concat(s,'"></video>')):(null==x||null===(a=x.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?De.replaceSelection('<a href="'.concat(s,"?type=").concat(x.type,'&disposition=inline" target="_blank">').concat(x.name,"</a>")):le.includes(b)?De.replaceSelection('<a href="'.concat(s,'?type=office&disposition=inline" target="_blank">').concat(x.name,"</a>")):De.replaceSelection("[".concat(x.name,"](").concat(s,")")),De.focus();case te:for(var w=e.row,C=e.col,k=e.align,S="\n",_=0;_<w;_++){for(var j=[],N=[],E=0;E<C;E++)1===_&&N.push(ie[k]),j.push(" ");1===_&&(S+="| ".concat(N.join(" | ")," |\n")),S+="| ".concat(j.join(1===C?"":" | ")," |\n")}return De.replaceSelection(S+"\n"),De.focus();default:throw new Error}}),[De,qe]),_t=(0,c.useMemo)((function(){switch(qe){case X:return(0,m.jsx)(N,{callback:St,onCancel:jt});case ee:return(0,m.jsx)(E.Z,{callback:St,onCancel:jt});case J:return(0,m.jsx)(A.Z,{callback:St,onCancel:jt});case Q:return(0,m.jsx)(R,{editImgId:xt.current,callback:St,onCancel:jt});case te:return(0,m.jsx)(G,{callback:St,onCancel:jt});case"maths-latex":return(0,m.jsx)(q,{showSaveButton:!0,callback:St});case"inline-latex":return(0,m.jsx)(Y.Z,{showSaveButton:!0,callback:St});default:return null}}),[qe]);function jt(){Ye("")}(0,c.useEffect)((function(){if(gt.current){var e=function(e){r=!0,o=e.pageY},t=function(){r=!1},n=function(e){if(r){var t=e.pageY-o;t<0&&(t=0),t>300&&(t=300),it(g+t+"px")}},i=gt.current,r=!1,o=0;return i.addEventListener("mousedown",e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",t),function(){i.removeEventListener("mousedown",e),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",t)}}}),[De,gt]),(0,c.useEffect)((function(){it(g)}),[g]);var Nt={width:se(l),height:se(nt)},Et=((0,c.useMemo)((function(){if(Qe){var e=new Date(Qe),t=e.getHours(),n=e.getMinutes(),i=e.getSeconds();return n=n<10?"0"+n:n,i=i<10?"0"+i:i,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(i)}return 0}),[Qe]),function(e){var t=[];if(K){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,n,i){t.push({multiLine:!("@▁@"===e)})}))}return t});(0,c.useEffect)((function(){de[qe]&&qe!==$&&qe!==Q&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],t=window.innerWidth/2-e.offsetWidth/2,n=window.innerHeight/2-e.offsetHeight/2;ut(t),ft(n)}),0)}),[qe]);var At=function(e,t,n,i){var r=document.body.clientHeight,o=document.body.clientWidth;return!(e<20&&n>e||e>o-20&&n<e||t<20&&i>t||t>r-20&&i<t)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};return(0,m.jsxs)(c.Fragment,{children:[(0,m.jsx)("div",{className:"markdown-editor-wrapper",ref:vt,children:(0,m.jsxs)("div",{className:"markdown-editor-container ".concat(ge," ").concat(Fe?"on-preview":""," ").concat(x?"mini":""," ").concat(Ge?"full-screen":""),style:Nt,children:[(0,m.jsx)(w,{insertTemp:_,watch:Fe,fullScreen:Ge,showNullButton:z,showNullProgramButton:K,onActionCallback:kt,hidetoolBar:ne,extraUse:Ee}),(0,m.jsxs)("div",{className:"markdown-editor-body",children:[(0,m.jsx)("div",{className:"codemirror-container",children:(0,m.jsx)("textarea",{ref:mt,placeholder:_e})}),Fe?(0,m.jsxs)("div",{ref:yt,className:"preview-container",children:["stex"===I&&(0,m.jsx)(v,{value:Le}),"stex"!==I&&(0,m.jsx)(f.Z,{edit:!0,disabledFill:ke,showProgramFill:K,value:Le,openEditor:function(e){var t;xt.current=e,null===(t=bt.current)||void 0===t||t.setHeight("100vh"),setTimeout((function(){Ye("add-flowchart")}),150)}})]}):null]})]})}),B?(0,m.jsx)("a",{ref:gt,className:"editor-resize"}):null,qe===$&&(0,m.jsx)(T,{callback:St,onCancel:jt}),qe===Q&&(0,m.jsx)(R,{ref:bt,editImgId:xt.current,callback:St,onCancel:jt}),(0,m.jsx)(C.Z,{children:de[qe]&&qe!==$&&qe!==Q?(0,m.jsx)(Z.Z,{maskClosable:!1,centered:!0,style:{position:"absolute",left:ct,top:pt},title:(0,m.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var t=e.clientX-ct,n=e.clientY-pt;document.body.onmousemove=function(e){var i=e.clientX-t,r=e.clientY-n,o=document.getElementsByClassName("markdown-popup-form")[0],a=window.innerWidth-o.offsetWidth,l=window.innerHeight-o.offsetHeight;i=Math.max(0,Math.min(i,a)),r=Math.max(0,Math.min(r,l)),At(e.clientX,e.clientY,t,n)&&(ut(i),ft(r))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:de[qe]}),open:!0,onCancel:jt,footer:null,destroyOnClose:!0,width:qe===Q?"1200px":null,height:qe===Q?"80vh":null,className:"markdown-popup-form",children:_t}):null})]})}},83016:function(e,t,n){"use strict";n.d(t,{Z:function(){return b},I:function(){return C}});var i=n(82242),r=n.n(i),o=n(79800),a=n.n(o),l=n(28284),s=n(6767),c=n(37568),u=n(77736),d=n(71051),h=n(47889),p=n(99571),f=n(22065),m=n(59301),v=n(37712),g=l.Z.useForm,y={width:280,marginRight:10},x={labelCol:{span:5},wrapperCol:{span:19}},b=function(e){var t=e.callback,n=e.onCancel,i=g(),o=a()(i,1)[0],f=(0,m.useRef)();function b(e,t){-1!==e.status?o.setFieldsValue({src:"/api/attachments/".concat(e.id),type:t.type}):s.ZP.error(e.message)}return(0,v.jsxs)(l.Z,r()(r()({form:o},x),{},{className:"upload-image-panel",onFinish:function(e){f.current.width=o.getFieldValue("width"),f.current.align=o.getFieldValue("align"),t(e,f.current)},style:{width:470,overflow:"hidden"},children:[(0,v.jsx)(l.Z.Item,{label:"图片地址",required:!0,children:(0,v.jsxs)("div",{className:"flex-container",children:[(0,v.jsx)(l.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,v.jsx)(c.Z,{style:y})}),(0,v.jsx)(w,{onFileChange:function(e){var t=e.target.files[0];f.current=t,C(t,b)}})]})}),(0,v.jsx)(l.Z.Item,{label:"图片描述",name:"alt",children:(0,v.jsx)(c.Z,{style:{width:264}})}),(0,v.jsx)(l.Z.Item,{label:"图片宽度",name:"width",children:(0,v.jsxs)(u.Z,{children:[(0,v.jsx)(l.Z.Item,{name:"width",style:{margin:0},children:(0,v.jsx)(d.Z,{style:{width:264}})}),(0,v.jsx)("span",{className:"ml8",children:"%"})]})}),(0,v.jsx)(l.Z.Item,{label:"对齐方式",name:"align",children:(0,v.jsx)(h.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"左对齐"},{value:"center",label:"居中对齐"},{value:"right",label:"右对齐"}]})}),(0,v.jsx)("aside",{children:(0,v.jsxs)(l.Z.Item,{style:{textAlign:"right",position:"relative",right:-98},children:[(0,v.jsx)(p.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,v.jsx)(p.ZP,{type:"default",onClick:n,children:"取消"})]})})]}))};function w(e){var t=e.onFileChange;return(0,v.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,v.jsx)("input",{type:"file",onChange:t})]})}function C(e,t){if(!e)throw new String("没有文件");var n=new FormData;n.append("editormd-image-file",e),n.append("file_param_name","editormd-image-file"),n.append("byxhr","true");var i=new window.XMLHttpRequest;i.withCredentials=!0,i.addEventListener("load",(function(n){t(JSON.parse(n.target.responseText),e)}),!1),i.addEventListener("error",(function(e){console.error(e)}),!1),i.open("POST","".concat(f.KI,"/api/attachments.json")),i.send(n)}},34858:function(e,t,n){"use strict";n.d(t,{Z:function(){return p}});var i=n(82100),r=n.n(i),o=n(29186),a=n.n(o),l=n(80619),s=n.n(l),c=n(47074),u=n.n(c),d=n(59301),h=n(4676),p=function(e){s()(n,e);var t=u()(n);function n(e){var i;r()(this,n),i=t.call(this,e);var o=window.document;return i.node=o.createElement("div"),o.body.appendChild(i.node),i}return a()(n,[{key:"render",value:function(){var e=this.props.children;return(0,h.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),n}(d.Component)},50062:function(e,t,n){"use strict";n.d(t,{SV:function(){return J},ZP:function(){return X}});var i=n(82242),r=n.n(i),o=n(37205),a=n.n(o),l=n(91232),s=n.n(l),c=n(79800),u=n.n(c),d=n(39647),h=n.n(d),p=n(7557),f=n.n(p),m=n(41498),v=n.n(m),g=n(59301),y=n(76374),x=["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"],b={quickKey:[{label:"main",content:["public static void main(String[] args) {","\t$0","}"].join("\n")},{label:"System.out.println",content:["System.out.println($0)"].join("\n")},{label:"System.out.print",content:["System.out.print($0)"].join("\n")}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},w={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {","\t$0","} else {","\t","}"].join("\n")},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {","\t$0","}"].join("\n")},{label:"if",content:["if () {","\t$0","}"].join("\n")},{label:"for",content:["for(int j=0 ; j<10; j++){","\t$0","}"].join("\n")},{label:"trycatch",content:["try{","\t$0","}catch(ExceptionName e){","}"].join("\n")},{label:"using namespace std;",content:["using namespace std;"].join("\n")},{label:"include <iostream>",content:["#include <iostream>"].join("\n")},{label:"include <vector>",content:["#include <vector>"].join("\n")},{label:"include <cstdio>",content:["#include <cstdio>"].join("\n")},{label:"include <cstring>",content:["#include <cstring>"].join("\n")},{label:"include <sstream>",content:["#include <sstream>"].join("\n")},{label:"include <fstream>",content:["#include <fstream>"].join("\n")},{label:"include <map>",content:["#include <map>"].join("\n")},{label:"include <string>",content:["#include <string>"].join("\n")},{label:"include <cmath>",content:["#include <cmath>"].join("\n")}]},C={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join("\n")}]},k={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join("\n")}]},S=n(53184),_=n.n(S),j={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},N=function(e,t,n,i){e.languages.registerCompletionItemProvider(t,{provideCompletionItems:function(t,r){var o=t.getWordUntilPosition(r),l={startLineNumber:r.lineNumber,endLineNumber:r.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},s=t.getLineContent(r.lineNumber).substring(o.startColumn-2,o.endColumn),c=function(e,t,n,i){var r=t.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column});return Array.from(new Set(r.match(/\b\w{2,}\b/g)||[])).map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Text,insertText:t,range:i}}))}(e,t,r,l);return{suggestions:[].concat(a()(c),a()(n.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,documentation:t,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:l}}))),a()(i.map((function(t){return{label:t.label,kind:e.languages.CompletionItemKind.Snippet,documentation:t.content,insertText:s.startsWith("#")?t.content.replace(/#/,""):t.content,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:l}}))))}}})},E=n(82100),A=n.n(E),Z=n(29186),I=n.n(Z),D=n(85573),T=n.n(D),P=function(){function e(t,n,i){var r=this;A()(this,e),this.placeholder=t,this.editor=n,this.monaco=i,n.onDidChangeModelContent((function(){return r.onDidChangeModelContent()})),this.onDidChangeModelContent()}return I()(e,[{key:"onDidChangeModelContent",value:function(){""===this.editor.getValue()?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}},{key:"getId",value:function(){return e.ID}},{key:"getDomNode",value:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}},{key:"getPosition",value:function(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}},{key:"dispose",value:function(){this.editor.removeContentWidget(this)}}]),e}();T()(P,"ID","editor.widget.placeholderHint");var M=P,L=n(96236),B=n(6767),R=n(25399),O=n(89392),F=n(82210),W=n(56102),H=n(37712),z=["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"];function G(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}function V(){}var K={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function U(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n<e.length;n++){var i=K[e[n]];if(i)return i}return t[0]}return K[t]||t}var q=null,Y=function(){var e=v()(f()().mark((function e(){return f()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,navigator.clipboard.writeText(" ");case 3:console.log("内容已自动复制到剪贴板:"),e.next=9;break;case 6:e.prev=6,e.t0=e.catch(0),console.error("自动复制失败:",e.t0);case 9:case"end":return e.stop()}}),e,null,[[0,6]])})));return function(){return e.apply(this,arguments)}}(),X=function(e){var t=e.width,i=void 0===t?"100%":t,o=e.height,l=void 0===o?"100%":o,c=e.value,d=e.language,p=void 0===d?"javascript":d,m=e.style,S=void 0===m?{}:m,E=e.options,A=void 0===E?{}:E,Z=e.overrideServices,I=void 0===Z?{}:Z,D=e.theme,T=void 0===D?"vs-dark":D,P=e.onEditBlur,K=e.isCopy,X=void 0!==K&&K,J=e.onSave,Q=e.autoHeight,$=void 0!==Q&&Q,ee=e.forbidCopy,te=void 0!==ee&&ee,ne=e.onChange,ie=void 0===ne?V:ne,re=e.editorDidMount,oe=void 0===re?V:re,ae=e.onFocus,le=void 0===ae?V:ae,se=e.onBreakPoint,ce=void 0===se?V:se,ue=e.breakPointValue,de=void 0===ue?[]:ue,he=e.filename,pe=void 0===he?"educoder.txt":he,fe=e.errorLine,me=e.errorContent,ve=void 0===me?"":me,ge=e.highlightLine,ye=e.openBreakPoint,xe=void 0!==ye&&ye,be=e.placeholder,we=void 0===be?"":be,Ce=e.showMiniMap,ke=void 0===Ce||Ce,Se=(h()(e,z),(0,g.useRef)()),_e=(0,g.useRef)({}),je=(0,g.useRef)(),Ne=(0,g.useRef)(),Ee=(0,g.useRef)([]),Ae=(0,g.useRef)(!1),Ze=(0,g.useRef)(),Ie=(0,g.useRef)(),De=(0,g.useRef)(!1),Te=(0,g.useState)(!1),Pe=u()(Te,2),Me=Pe[0],Le=Pe[1];(0,g.useEffect)((function(){var e=F.Z.subscribe("formatDocument",(function(e){var t,n=_e.current.instance;null==n||null===(t=n.getAction)||void 0===t||t.call(n,"editor.action.formatDocument").run()}));return window.updateMonacoValue=function(e){ie(e)},e}),[]),(0,g.useEffect)((function(){var e,t=_e.current.instance;(Ne.current&&clearTimeout(Ne.current),Ne.current=setTimeout((function(){!function(){var e=_e.current.instance;if(null!=c&&e&&Me){var t=e.getModel();t&&c!==t.getValue()&&(!0,t.setValue(c),e.layout(),!1)}}()}),500),c&&null!=c&&c.length)&&(null==t||null===(e=t.updateOptions)||void 0===e||e.call(t,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(c.split(/\r\n|\r|\n/g).length))+3,5)}))}),[c,Me,_e.current]),(0,g.useEffect)((function(){if(fe&&_e.current&&_e.current.instance){var e=_e.current.instance;e.changeViewZones((function(e){var t=document.createElement("div");t.style.padding="10px 20px",t.style.width="calc(100% - 20px)",t.className="my-error-line-wrp",t.innerHTML=ve,e.addZone({afterLineNumber:fe||11,heightInLines:3,domNode:t})}));var t={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};e.addOverlayWidget(t),e.revealPositionInCenter({lineNumber:20,column:1})}}),[fe,_e.current,Me]);var Be=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!e||""===e.trim())return!0;for(var n=_e.current.instance.getModel(),i=n.getLineTokens(t),r=!1,o=0;o<2;o++)1===i.getStandardTokenType(o)&&(r=!0);return r};function Re(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&83==e.keyCode&&(e.preventDefault(),J())}(0,g.useEffect)((function(){var e,t=null===(e=_e.current)||void 0===e?void 0:e.instance;if(t&&Me&&te){var n=t.onDidBlurEditorWidget((function(){De.current=!1})),i=t.onDidFocusEditorText((function(){De.current=!0}));return function(){n.dispose(),i.dispose()}}}),[_e.current,Me,te]),(0,g.useEffect)((function(){var e;if(null!==(e=_e.current)&&void 0!==e&&e.instance&&Me&&xe){var t=_e.current.instance,n=t.getModel();if(!n)return;!function(){var e,i=[],r=[],o=n.getAllDecorations(),a=s()(o);try{for(a.s();!(e=a.n()).done;){var l,c=e.value;if("highlighted-line"===c.options.className)i.push(null==c||null===(l=c.range)||void 0===l?void 0:l.startLineNumber),r.push(null==c?void 0:c.id)}}catch(e){a.e(e)}finally{a.f()}if(ge!==i[0]){n.deltaDecorations(r,[]);var u=n.getLineCount();ge&&ge<=u&&(t.deltaDecorations([],[{range:new q.Range(ge,1,ge,n.getLineMaxColumn(ge)),options:{isWholeLine:!0,className:"highlighted-line"}}]),t.revealLineInCenter(ge))}}();var i=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=[],r=[],o=n.getAllDecorations(),a=s()(o);try{for(a.s();!(e=a.n()).done;){var l,c=e.value;if("breakpoints-select"===c.options.linesDecorationsClassName)i.push(null==c||null===(l=c.range)||void 0===l?void 0:l.startLineNumber),r.push(null==c?void 0:c.id)}}catch(e){a.e(e)}finally{a.f()}if(t)return{lines:i,ids:r};ce(i)},r=function(){var e=v()(f()().mark((function e(t){var r;return f()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={range:new q.Range(t,1,t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}},e.next=3,n.deltaDecorations([],[r]);case 3:i();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=v()(f()().mark((function e(r){var o,a,l,c,u;return f()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=[],a=t.getLineDecorations(r),l=s()(a);try{for(l.s();!(c=l.n()).done;)"breakpoints-select"===(u=c.value).options.linesDecorationsClassName&&o.push(u.id)}catch(e){l.e(e)}finally{l.f()}return e.next=6,n.deltaDecorations(o,[]);case 6:i();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a=function(e){var n,i=t.getLineDecorations(e),r=s()(i);try{for(r.s();!(n=r.n()).done;){if("breakpoints-select"===n.value.options.linesDecorationsClassName)return!0}}catch(e){r.e(e)}finally{r.f()}return!1};if(!(0,O.isEqual)(de,i(!0).lines)){n.deltaDecorations(i(!0).ids,[]);var l=de.map((function(e){return{range:new q.Range(e,1,e,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}}));n.deltaDecorations([],l)}var c=t.onDidChangeModelContent((function(e){var l=t.getPosition();if(l){var s=l.lineNumber;clearTimeout(Ie.current),Ie.current=setTimeout((function(){Be(n.getLineContent(s),s)?o(s):a(s)?(o(s),r(s)):i()}),100)}})),u=t.onMouseDown((function(e){var t;if(e.target.detail&&null!==(t=e.target)&&void 0!==t&&null!==(t=t.element)&&void 0!==t&&null!==(t=t.className)&&void 0!==t&&t.includes("line-numbers")){var i=e.target.position.lineNumber;if(Be(n.getLineContent(i),i))return;a(i)?o(i):r(i)}})),d=function(){Ee.current=t.deltaDecorations(Ee.current,[])},h=t.onMouseMove((function(e){var i;if(d(),e.target.detail&&null!==(i=e.target)&&void 0!==i&&null!==(i=i.element)&&void 0!==i&&null!==(i=i.className)&&void 0!==i&&i.includes("line-numbers")){var r=e.target.position.lineNumber;if(Be(n.getLineContent(r),r))return;!function(e){var n={range:new q.Range(e,1,e,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Ee.current=t.deltaDecorations(Ee.current,[n])}(r)}})),p=t.onMouseLeave((function(){d()}));return function(){c.dispose(),u.dispose(),h.dispose(),p.dispose()}}}),[_e.current,Me,de,ge,xe,p]),(0,g.useEffect)((function(){var e;null!==(e=_e.current)&&void 0!==e&&e.instance&&xe&&_e.current.instance.setPosition({lineNumber:0,column:0})}),[ge]);var Oe=function(){if($&&_e.current.instance){var e=_e.current.instance.getContentHeight();qe(e<l?l:e)}else qe(l)};var Fe=function(e){if(De.current){var t=e.keyCode,n=e.ctrlKey,i=e.metaKey,r=e.target;return"paste"!==e.type&&(67!==t&&86!==t||!i&&!n)||"TEXTAREA"!==r.nodeName||(B.ZP.warning({content:decodeURIComponent("该任务关卡设置了禁止复制粘贴,请手动输入代码。"),key:"monaco-editor-tip"}),e.preventDefault()),!1}};function We(e,t){var n,i,r=window.URL||window.webkitURL||window,o=new Blob([t]),a=document.createElementNS("http://www.w3.org/1999/xhtml","a");a.href=r.createObjectURL(o),a.download=e,n=a,(i=document.createEvent("MouseEvents")).initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),n.dispatchEvent(i)}(0,g.useEffect)((function(){Oe()}),[Oe]),(0,g.useEffect)((function(){Se.current&&!Me&&Promise.all([n.e(8909),n.e(4474)]).then(n.bind(n,71448)).then((function(e){try{q=e,_e.current.instance=q.editor.create(Se.current,{value:c,language:U(p),theme:T,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:ke||!1}},I);var t=_e.current.instance,n=L.BH._menuItems,i=a()(n).find((function(e){return"EditorContext"==e[0]._debugName}))[1];if(oe(t,q),setTimeout((function(){Oe(),_e.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:function(){We(pe||"educoder.txt",t.getValue())}})}),500),_e.current.subscription=t.onDidChangeModelContent((function(e){Ae.current?clearTimeout(Ze.current):(Oe(),ie(t.getValue(),e)),Ze.current=setTimeout((function(){Ae.current=!1}),500)})),window.Monaco||function(e){j.languages.forEach((function(t){e.languages.registerDocumentFormattingEditProvider(t,{provideDocumentFormattingEdits:function(e){return v()(f()().mark((function t(){var n;return f()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=_()(e.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1}),t.abrupt("return",[{range:e.getFullModelRange(),text:n}]);case 2:case"end":return t.stop()}}),t)})))()}})})),N(e,"java",b.keywords,b.quickKey),N(e,"cpp",w.keywords,w.quickKey),N(e,"c",x,[]),N(e,"python",C.keywords,C.quickKey),N(e,"scala",k.keywords,k.quickKey)}(q,U(p)),te&&(!function(e,t){var n=e._first;do{var i;t.includes(null===(i=n.element)||void 0===i||null===(i=i.command)||void 0===i?void 0:i.id)&&e._remove(n)}while(n=n.next)}(i,["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"]),Se.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",Fe),window.removeEventListener("paste",Fe),window.addEventListener("keydown",Fe),window.addEventListener("paste",Fe)),window.Monaco=q,P&&t.onDidBlurEditorWidget((function(){P(t.getValue())})),le&&t.onDidFocusEditorText((function(){te&&Y(),le(t.getValue())})),te){Y();try{t.onDidPaste((function(e){var n=t.getSelection(),i=_e.current.pastePos||{};new q.Range(i.startLineNumber||n.endLineNumber,i.startColumn||n.endColumn,i.endLineNumber||n.endLineNumber,i.endColumn||n.endColumn);t.executeEdits("",[{range:e.range,text:""}])}))}catch(e){}}var r=function(){var e;return Se.current&&(e=new y.Z((function(e){var t,n=s()(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&_e.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(Se.current),e}();return we&&"string"==typeof we&&new M(we,t,q),Le(!0),function(){var e=_e.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),_e.current.subscription&&_e.current.subscription.dispose(),r.unobserve(Se.current)}}catch(e){}}))}),[]),(0,g.useEffect)((function(){if(_e.current.instance&&Me)return document.addEventListener("keydown",Re,!1),function(){document.removeEventListener("keydown",Re)}}),[J,Me]),(0,g.useEffect)((function(){var e=_e.current.instance;if(e&&Me){var t=U(p);q.editor.setModelLanguage(e.getModel(),t)}}),[p,Me]),(0,g.useEffect)((function(){_e.current.instance&&Me&&q.editor.setTheme(T)}),[T,Me]),(0,g.useEffect)((function(){var e=_e.current.instance;je.current=A,e&&Me&&(e.updateOptions(r()({},A)),setTimeout((function(){e.getModel().updateOptions(r()({},A))}),200))}),[JSON.stringify(A),Me]),(0,g.useEffect)((function(){var e=_e.current.instance;e&&Me&&e.layout()}),[i,l,Me]);var He=(0,g.useState)(G(i)),ze=u()(He,2),Ge=ze[0],Ve=(ze[1],(0,g.useState)(G(l))),Ke=u()(Ve,2),Ue=Ke[0],qe=Ke[1],Ye=r()(r()({},S),{},{width:Ge,height:Ue,position:"relative"});return(0,H.jsx)("div",{className:"my-monaco-editor",ref:Se,style:Ye,children:X&&(0,H.jsx)(W.CopyToClipboard,{text:c,onCopy:function(){return B.ZP.success("复制成功")},children:(0,H.jsx)(R.Z,{title:"复制代码",children:(0,H.jsxs)("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"},children:[(0,H.jsx)("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," 复制代码"]})})})})};function J(e){var t=e.width,i=void 0===t?"100%":t,o=e.height,a=void 0===o?"100%":o,l=e.original,c=e.modified,d=e.language,h=e.options,p=void 0===h?{}:h,f=(0,g.useRef)(),m=(0,g.useState)(null),v=u()(m,2),x=v[0],b=v[1];(0,g.useEffect)((function(){return f.current&&Promise.all([n.e(8909),n.e(9404)]).then(n.bind(n,2550)).then((function(e){var t=(q=e).editor.createDiffEditor(f.current,r()(r()({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},p),{},{wordWrap:!0}));b(t);var n=function(e){var t;return f.current&&(t=new y.Z((function(t){var n,i=s()(t);try{for(i.s();!(n=i.n()).done;){var r=n.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&e.layout()}}catch(e){i.e(e)}finally{i.f()}}))).observe(f.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(f.current)}})),function(){window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}}),[]),(0,g.useEffect)((function(){x&&x.setModel({original:q.editor.createModel(l,d),modified:q.editor.createModel(c,d)})}),[l,c,d,x]);var w={width:G(i),height:G(a)};return(0,H.jsx)("div",{className:"my-diff-editor",ref:f,style:w})}},38049:function(e,t,n){"use strict";n.d(t,{jL:function(){return s},w9:function(){return ke},QD:function(){return it},cQ:function(){return we},op:function(){return Xe},O5:function(){return ht},_b:function(){return st},t7:function(){return M},Gi:function(){return Ne},YG:function(){return je},qp:function(){return S},vr:function(){return ot},qE:function(){return $e},Je:function(){return R},wb:function(){return oe},cq:function(){return Re},tp:function(){return N}});var i=n(59301),r="banner___PoUBO",o="content___XoDjy",a="btns___Pb35j",l=n(37712),s=function(e){var t=e.dataSource,n=void 0===t?[]:t,i=e.img,s=e.imgWidth,c=void 0===s?346:s,u=e.title,d=e.sunTitle,h=e.bannerExtraContent;return(0,l.jsx)("div",{className:r,children:(0,l.jsxs)("div",{className:o,children:[(0,l.jsxs)("aside",{children:[(0,l.jsxs)("p",{children:[(0,l.jsx)("b",{children:u}),(0,l.jsx)("span",{children:d})]}),n.length>0&&(0,l.jsx)("div",{className:a,children:n.map((function(e,t){return(0,l.jsxs)("div",{onClick:e.click,children:[e.name,e.sign?(0,l.jsx)("img",{src:"data:image/png;base64,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",width:39}):null]},t)}))}),h]}),i&&(0,l.jsx)("img",{style:{marginTop:33,marginRight:38},src:i,width:c})]})})},c=n(79800),u=n.n(c),d="row___aXJjm",h="title___HUKL0",p="tagsWrap___XB2W3",f="action___VdHb1",m="bar___t1kKC",v="tag___V7Eft",g="name___Hk1Ip",y="num___xQpcH",x="active___XryTX",b="tagsBorderWrap___OMxjs",w=n(92310),C=n.n(w),k=n(89392),S=function(e){var t=e.dataSource,n=void 0===t?[]:t,r=e.value,o=e.onChange,a=e.onTitleChange,s=e.className,c=e.title,w=e.titleWidth,S=void 0===w?41:w,_=e.style,j=void 0===_?{}:_,N=e.fontColor,E=void 0===N?"#6A7283":N,A=e.showCount,Z=(0,i.useState)(0),I=u()(Z,2),D=I[0],T=I[1],P=(0,i.useState)(!1),M=u()(P,2),L=M[0],B=M[1],R=(0,i.useRef)(null),O=(0,i.useRef)(null);return(0,i.useEffect)((function(){var e;0!==n.length&&((null==R||null===(e=R.current)||void 0===e?void 0:e.clientHeight)>97?T(1):T(0));0===n.length&&T(0),B(!1)}),[n]),(0,l.jsxs)("div",{className:C()(d,s),style:j,children:[(0,l.jsx)("div",{onClick:(0,k.throttle)((function(){return null==a?void 0:a()}),2e3),style:{width:S,marginTop:L?12:4},className:"".concat(h," ").concat(a?"current":""),children:c}),(0,l.jsxs)("div",{className:L?"".concat(p," ").concat(b):p,children:[(0,l.jsx)("div",{className:m,ref:O,style:D>0?{height:1===D?97:"auto",overflow:1===D?"hidden":"auto",paddingRight:55}:{paddingRight:0},children:(0,l.jsx)("div",{className:v,ref:R,children:null==n?void 0:n.map((function(e){return(0,l.jsxs)("span",{onClick:function(){return o(e.id)},style:{color:E},className:r===e.id?x:"",children:[(0,l.jsx)("span",{title:e.name,className:g,children:e.name}),!!A&&(0,l.jsx)("span",{className:y,children:e.count})]},e.id)}))})}),!!D&&(0,l.jsx)(i.Fragment,{children:1===D?(0,l.jsxs)("div",{onClick:function(){var e;T(2),(null==R||null===(e=R.current)||void 0===e?void 0:e.clientHeight)>245?B(!0):B(!1)},className:f,children:["展开",(0,l.jsx)("i",{style:{transform:"translateY(1px) scale(0.6)"},className:"iconfont icon-zhankai4"})]}):(0,l.jsxs)("div",{onClick:function(){O.current.scrollTop=0,T(1),B(!1)},className:f,children:["收起",(0,l.jsx)("i",{style:{transform:"translateY(0px) scale(0.6)"},className:"iconfont icon-shouqi3"})]})})]})]})},_="tabs___GTqPV",j="active___F26E8",N=function(e){var t=e.dataSource,n=void 0===t?[]:t,i=e.value,r=e.onChange,o=e.className,a=e.style,s=void 0===a?{}:a;return(0,l.jsx)("div",{style:s,className:C()(_,o),children:n.map((function(e){return(0,l.jsx)("span",{onClick:function(){return r(e.id)},className:i===e.id?j:"",children:e.name},e.id)}))})},E="input___PW2zI",A="dropdown___vSy8B",Z="menu___NiyBu",I="text___Grueu",D="b1___ZKryM",T="b2___aKyGa",P=n(37568),M=function(e){var t,n=e.dataSource,r=void 0===n?[]:n,o=e.value,a=void 0===o?"":o,s=e.onChange,c=e.onInputChange,d=void 0===c?function(){}:c,h=e.className,p=e.style,f=void 0===p?{}:p,m=e.placeholder,v=e.allowClear,g=void 0!==v&&v,y=(0,i.useState)(""),x=u()(y,2),b=x[0],w=x[1],k=(0,i.useState)(""),S=u()(k,2),_=S[0],j=S[1];(0,i.useEffect)((function(){var e,t=a;null!==(e=JSON.stringify(a))&&void 0!==e&&e.includes("{")&&(w(a.id),t=a.value||"");try{j(decodeURIComponent(t||""))}catch(e){j(decodeURIComponent(t||""))}}),[a]);var N=function(){s(encodeURIComponent(_),b||null)};return(0,l.jsxs)("div",{className:C()(E,h),style:f,children:[!!r.length&&(0,l.jsxs)("div",{className:A,children:[(0,l.jsxs)("div",{className:I,children:[null===(t=r.find((function(e){return e.id===b})))||void 0===t?void 0:t.name,(0,l.jsx)("i",{className:"iconfont icon-zhankai4"}),(0,l.jsx)("b",{className:D}),(0,l.jsx)("b",{className:T})]}),(0,l.jsx)("div",{className:Z,children:r.map((function(e,t){return(0,l.jsx)("div",{onClick:function(){var t;(t=e.id)!==b&&(w(t),s(encodeURIComponent(_),t))},children:e.name},t)}))})]}),(0,l.jsx)(P.Z,{onPressEnter:N,value:_,onChange:function(e){j(e.target.value),d(encodeURIComponent(e.target.value),b||null)},placeholder:m,variant:"borderless",allowClear:g,onClear:function(){return s("",b||null)}}),(0,l.jsx)("i",{onClick:N,className:"iconfont icon-sousuo9 font14 current"})]})},L="quickPager___GM30J",B="disabled___Ozc8I",R=function(e){var t=e.value,n=e.onChange,i=e.className,r=e.total,o=e.pageSize,a=e.style,s=void 0===a?{}:a,c=t<2,u=t>=Math.ceil(r/o);return r<=o?(0,l.jsx)(l.Fragment,{}):(0,l.jsxs)("div",{className:C()(L,i),style:s,children:[(0,l.jsx)("div",{onClick:function(){c||n(t-1,"prev")},className:c?B:"",children:"上一页"}),(0,l.jsx)("div",{onClick:function(){u||n(t+1,"next")},className:u?B:"",children:"下一页"})]})},O="list___oOsiS",F="wrap___G6T7F",W="lockWrap___Rl79E",H="li___oZZ7l",z="cover___b2bYW",G="img___IQX7w",V="sign___HkT6C",K="name___SsJx8",U="e___TMqq0",q="tags___bcjyo",Y="rate___YACg7",X=n(29787),J=n(25399),Q=n(58018),$=n(51200),ee=n(30406),te=n(96908),ne=n(57177),ie=n(81378),re=n(37286),oe=function(e){var t=e.className,n=e.dataSource,i=void 0===n?[]:n,r=e.col,o=void 0===r?4:r,a=e.right,s=e.bottom,c=void 0===s?23:s,u=e.precision,d=void 0===u?0:u,h=e.wrapWidth,p=void 0===h?1200:h,f=e.trackEventItems,m=e.loading,v=Math.floor((p-(o-1)*a)/o);return(0,l.jsx)(X.Z,{spinning:m,children:(0,l.jsxs)("div",{className:C()(O,t),children:[!!i.length&&i.map((function(e,t){var n=e.name,i=e.id,r=e.identifier,s=e.power,u=(e.cover_image_id,e.pic);return(0,l.jsxs)("div",{className:F,style:{width:v,marginRight:(1+t)%o==0?0:a+d,marginBottom:c},children:[(0,l.jsxs)("a",{target:"_blank",href:"/shixuns/".concat(r,"/challenges"),className:H,onClick:function(e){e.preventDefault(),f&&(0,ee.L9)([f]),s&&(0,ee.xg)("/shixuns/".concat(r,"/challenges"))},children:[(0,l.jsxs)("div",{className:G,children:[(0,l.jsx)("img",{className:z,src:"".concat(u)}),e.is_jupyter&&(0,l.jsx)("img",{className:V,src:te}),e.is_jupyter_lab&&(0,l.jsx)("img",{className:V,src:ne}),e.is_unity_3d&&(0,l.jsx)("img",{className:V,src:ie})]}),(0,l.jsx)("div",{className:K,children:(0,l.jsx)(J.Z,{title:n||"实践项目名称-未填写",children:(0,l.jsx)("span",{className:U,children:n||"实践项目名称-未填写"})})}),(0,l.jsxs)("div",{className:q,children:[(0,l.jsx)(J.Z,{placement:"bottom",title:"关卡数",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-shixunguanqia font14 mr2"}),(0,l.jsx)("span",{children:e.challenges_count})]})}),!!e.myshixuns_count&&(0,l.jsx)(J.Z,{placement:"bottom",title:"学习人数",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-chengyuan font14 mr2"}),(0,l.jsx)("span",{children:e.myshixuns_count})]})}),(0,l.jsx)(J.Z,{placement:"bottom",title:"难度等级",children:(0,l.jsx)("span",{children:(0,l.jsx)("span",{children:e.level})})}),(0,l.jsxs)("div",{className:Y,children:[(0,l.jsx)(Q.Z,{allowHalf:!0,disabled:!0,defaultValue:e.score_info}),(0,l.jsxs)("span",{children:[" ",e.score_info?"".concat(e.score_info,"分"):"5分"]})]})]})]}),!s&&(0,l.jsxs)("div",{className:W,children:[(0,l.jsx)("img",{src:"".concat($.Z.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),(0,l.jsx)("span",{className:"mt15 font16 c-white",children:"定向开放内容,需要授权"})]})]},i)})),!i.length&&(0,l.jsx)(re.Z,{})]})})},ae="list___jb2Ay",le="wrap___VsQDr",se="li___IxCLC",ce="cover___Mu8wr",ue="img___IpFLA",de="movebq___mF7wt",he="bq___Bil0T",pe="sign___DXJ4d",fe="name___l7FoJ",me="e___pXQUG",ve="unit___wCIFR",ge="tags___w_Mil",ye="wrapisCurrent___qIfQT",xe=n(60242),be=n(40189),we=function(e){var t=e.className,n=e.dataSource,i=void 0===n?[]:n,r=e.col,o=void 0===r?4:r,a=e.right,s=e.bottom,c=void 0===s?23:s,u=e.precision,d=void 0===u?0:u,h=e.wrapWidth,p=void 0===h?1200:h,f=e.trackEventItems,m=e.loading,v=e.onRemove,g=void 0===v?function(){}:v,y=e.isCurrent,x=void 0===y||y,b=e.showProgress,w=void 0!==b&&b,k=e.showAlias,S=void 0!==k&&k,_=Math.floor((p-(o-1)*a)/o),j=[{name:"推荐自学",ptimg:"/images/tjzx.png",swimg:"/images/sw_tjzx.png"},{name:"101计划",ptimg:"/images/jh.png",swimg:"/images/sw_jh.png"},{name:"国家一流",ptimg:"/images/gjyl.png",swimg:"/images/sw_gjyl.png"},{name:"省级一流",ptimg:"/images/sjyl.png",swimg:"/images/sw_sjyl.png"},{name:"精品课程",ptimg:"/images/jpkc.png",swimg:"/images/sw_jpkc.png"},{name:"军队一流",ptimg:"/images/jdyl.png",swimg:"/images/sw_jdyl.png"},{name:"新型教材",ptimg:"/images/xxjc.png",swimg:"/images/sw_xxjc.png"}];return(0,l.jsx)(X.Z,{spinning:m,children:(0,l.jsxs)("div",{className:C()(ae,t),children:[!(null==i||!i.length)&&(null==i?void 0:i.map((function(e,t){var n,i,r,s,u,h,p=e.name,m=e.id,v=e.identifier,y=(e.featured,e.school_name),b=e.image_url;e.excellent,e.is_plan;return(0,l.jsx)("div",{className:x&&w?ye:le,style:{width:_,marginRight:(1+t)%o==0?0:a+d,marginBottom:c},children:(0,l.jsxs)("a",{className:se,onClick:function(e){e.preventDefault(),e.stopPropagation(),f&&(0,ee.L9)([f]),(0,ee.xg)("/paths/".concat(v))},children:[(0,l.jsxs)("div",{className:ue,children:[(0,l.jsx)("img",{className:ce,src:"".concat(b)}),x&&(0,be.bg)()&&(null==e?void 0:e.studying)&&(0,l.jsxs)("div",{className:"".concat(de," user-path-items"),onClick:function(t){t.stopPropagation(),g(e)},children:[(0,l.jsx)("i",{className:"iconfont icon-yichu1 mr5 c-red"}),(0,l.jsx)("span",{className:"c-red",children:"移除"})]}),null==e||null===(n=e.subject_tags)||void 0===n?void 0:n.map((function(e,t){var n;if(0===t){var i,r=null===(i=j.find((function(t){return t.name==e})))||void 0===i?void 0:i.swimg;return(0,l.jsx)("img",{className:pe,src:r,style:{left:"-4px"}})}var o=null===(n=j.find((function(t){return t.name==e})))||void 0===n?void 0:n.ptimg;return(0,l.jsx)("img",{className:pe,src:o,style:{left:"".concat(48+52*(t-1)+2*t,"px")}})})),(0,l.jsx)("div",{style:{position:"absolute",top:"150px",left:"4px"},children:(null==e?void 0:e.excellent)&&(0,l.jsx)("div",{className:he,children:"开放课程"})})]}),(0,l.jsx)("div",{className:fe,children:(0,l.jsx)(J.Z,{title:S&&null!=e&&e.excellent_alias_name?(0,l.jsxs)("span",{children:["课程原名:".concat(p),(0,l.jsx)("br",{}),(0,l.jsx)("span",{children:"课程别名:".concat(null==e?void 0:e.excellent_alias_name)})]}):p,children:(0,l.jsx)("span",{className:me,children:S&&(null==e?void 0:e.excellent_alias_name)||p})})}),x&&w&&0!=(null==e||null===(i=e.progress)||void 0===i?void 0:i.all_score)&&(0,l.jsxs)("div",{style:{padding:"0px 10px",color:"#333",marginTop:10},children:[(0,l.jsx)(xe.Z,{strokeColor:"#44d7b6",gap:"small",percent:((null==e||null===(r=e.progress)||void 0===r?void 0:r.my_score)/(null==e||null===(s=e.progress)||void 0===s?void 0:s.all_score)*100).toFixed(),showInfo:!1}),"已完成 ",null==e||null===(u=e.progress)||void 0===u?void 0:u.my_score,"/",null==e||null===(h=e.progress)||void 0===h?void 0:h.all_score]}),(!x||!w)&&(0,l.jsx)(J.Z,{title:"发布单位:".concat(y),children:(0,l.jsxs)("div",{className:ve,children:[(0,l.jsx)("i",{className:"iconfont icon-danwei1 font14 mr3"}),y]})}),(!x||!w)&&(0,l.jsx)("div",{className:ge,children:(0,l.jsxs)("div",{children:[(0,l.jsx)(J.Z,{placement:"bottom",title:"章节数",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-zhangjie1 font14 mr3"}),(0,l.jsx)("span",{children:e.stages_count})]})}),(0,l.jsx)(J.Z,{placement:"bottom",title:"学习人数",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-chengyuan font14 mr3"}),(0,l.jsx)("span",{children:e.members_count})]})})]})})]})},m)}))),!i.length&&(0,l.jsx)(re.Z,{})]})})},Ce={flex_box_center:"flex_box_center___eMcr7",flex_space_between:"flex_space_between___HcNca",flex_box_vertical_center:"flex_box_vertical_center___ZnvVN",flex_box_center_end:"flex_box_center_end___fdgDf",flex_box_column:"flex_box_column___SEKvd",list:"list___L1hmU",wrap:"wrap___pKgcW",lockWrap:"lockWrap___SMhkK",top:"top___udHSB",sign:"sign___uwRpq",name:"name___Fpf90",img:"img___AMLhL",text:"text___KiTb7",btns:"btns___i6IuZ",bottom:"bottom____k2sh"},ke=function(e){var t=e.className,n=e.dataSource,i=void 0===n?[]:n,r=e.col,o=void 0===r?4:r,a=e.right,s=e.bottom,c=void 0===s?23:s,u=e.precision,d=void 0===u?0:u,h=e.wrapWidth,p=void 0===h?1200:h,f=e.trackEventItems,m=e.loading,v=e.handleVery,g=void 0===v?function(){return!0}:v,y=Math.floor((p-(o-1)*a)/o);return(0,l.jsx)(X.Z,{spinning:m,children:(0,l.jsxs)("div",{className:C()(Ce.list,t),children:[!!i.length&&i.map((function(e,t){var n=e.subject_identifier,i=e.id,r=(e.identifier,e.power,0!=e.is_public&&e.is_public);return(0,l.jsxs)("div",{className:Ce.wrap,style:{width:y,marginRight:(1+t)%o==0?0:a+d,marginBottom:c},children:[(0,l.jsxs)("a",{className:Ce.li,onClick:function(t){t.preventDefault(),g(null==e?void 0:e.first_category_url)&&(f&&(0,ee.L9)([f]),(0,ee.xg)(e.first_category_url))},children:[(0,l.jsxs)("div",{className:Ce.top,children:[(0,l.jsx)(J.Z,{title:e.name,children:(0,l.jsx)("div",{className:Ce.name,children:e.name})}),(0,l.jsx)("img",{className:Ce.img,src:$.Z.IMG_SERVER+"/images/"+e.avatar_url}),(0,l.jsx)("div",{className:Ce.text,title:e.creator,children:e.creator}),n&&(0,l.jsxs)("div",{className:Ce.btns,children:[(0,l.jsx)("div",{children:"开放课程"}),(0,l.jsx)("aside",{children:"开放课堂"})]}),r&&(0,l.jsx)("div",{className:Ce.sign,children:"公开"})]}),(0,l.jsxs)("div",{className:Ce.bottom,children:[e.visits>0&&(0,l.jsx)(J.Z,{title:"访问量",placement:"bottom",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-liulanyan"}),(0,l.jsx)("span",{children:e.visits})]})}),e.course_members_count>0&&(0,l.jsx)(J.Z,{title:"成员",placement:"bottom",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-chengyuan"}),e.course_members_count]})}),e.tasks_count>0&&(0,l.jsx)(J.Z,{title:"作业",placement:"bottom",children:(0,l.jsxs)("span",{children:[(0,l.jsx)("i",{className:"iconfont icon-zuoye"}),e.tasks_count]})}),e.is_end?(0,l.jsx)("div",{style:{color:"#6B758B"},children:"已结束"}):(0,l.jsx)("div",{style:{color:"#00B187"},children:"进行中"})]})]}),!e.is_accessible&&(0,l.jsxs)("div",{className:Ce.lockWrap,children:[(0,l.jsx)("img",{src:"".concat($.Z.IMG_SERVER,"/images/educoder/icon/lockclose.svg")}),(0,l.jsx)("span",{className:"mt15 font16 c-white",children:"非课堂成员不可进入"})]})]},i)})),!i.length&&(0,l.jsx)(re.Z,{})]})})},Se={flex_box_center:"flex_box_center___d27mZ",flex_space_between:"flex_space_between___qfRU9",flex_box_vertical_center:"flex_box_vertical_center___fCRld",flex_box_center_end:"flex_box_center_end___ORMV8",flex_box_column:"flex_box_column___PNKtZ",tabs:"tabs___alpa7",tabsWrap:"tabsWrap___aCQjw",tab:"tab___MKLr4",active:"active___nl_4v"},_e=n(76805),je=function(e){var t=e.dataSource,n=void 0===t?[]:t,i=e.value,r=e.onChange,o=e.className,a=e.style,s=void 0===a?{}:a,c=e.tabBarExtraContent;return(0,l.jsxs)("div",{className:C()(Se.tabs,o),style:s,children:[(0,l.jsx)("div",{className:Se.tabsWrap,children:n.map((function(e,t){return!(null!=e&&e.hide)&&(0,l.jsxs)("aside",{className:Se.tab,onClick:function(){r(e.id),e.link&&_e.history.push(e.link)},children:[(0,l.jsx)("div",{className:i===e.id?Se.active:"",children:e.name}),null==(null==e?void 0:e.resetCount)&&void 0!==(null==e?void 0:e.total)&&(0,l.jsxs)("span",{children:["",null==e?void 0:e.total,""]}),void 0!==(null==e?void 0:e.resetCount)&&void 0!==(null==e?void 0:e.total)&&(0,l.jsx)(J.Z,{title:null!=(null==e?void 0:e.tip)?null==e?void 0:e.tip:"",children:(0,l.jsxs)("span",{style:{color:"#9096A3"},children:["",(0,l.jsx)("span",{style:{color:"#000"},children:null==e?void 0:e.resetCount}),"/",(0,l.jsx)("span",{children:null==e?void 0:e.total}),""]})})]},t)}))}),(0,l.jsx)("div",{className:Se.tabBar,children:c})]})},Ne=function(e){var t=e.className,n=e.style,i=void 0===n?{}:n,r=e.children;return(0,l.jsx)("div",{className:C()(t),style:i,children:r})},Ee="orderWrap___ZfyGX",Ae="orderIconWrap___XTB_O",Ze="orderAsc___KWHmA",Ie="orderDesc___rHdbB",De="active___a7eSP",Te="cursorPointer___gs9kL",Pe="orderTextWrap___teAKn",Me=n(75727),Le=n(93041),Be=[{id:"updated_at",name:"最新动态"},{id:"created_at",name:"最新创建"},{id:"name",name:"名称排序"}],Re=function(e){var t,n=e.sortValue,i=e.dropValue,r=e.className,o=e.onSort,a=e.onDrop,s=e.dataSource,c=void 0===s?Be:s;return(0,l.jsxs)("div",{className:C()(Ee,r),children:[(0,l.jsx)(Me.Z,{dropdownRender:function(){return(0,l.jsx)(Le.Z,{children:c.map((function(e,t){return(0,l.jsx)(Le.Z.Item,{onClick:function(){return a(e.id)},children:e.name},t)}))})},children:(0,l.jsx)("span",{className:Pe,children:null===(t=c.find((function(e){return i===e.id})))||void 0===t?void 0:t.name})}),(0,l.jsxs)("span",{className:Ae,children:[(0,l.jsx)("span",{className:Ze,children:(0,l.jsx)("i",{className:"asc"===n?"iconfont icon-sanjiaoxing-up font12 ".concat(Te," ").concat(De):"iconfont icon-sanjiaoxing-up font12 ".concat(Te),onClick:function(){return o("asc"===n?"desc":"asc")}})}),(0,l.jsx)("span",{className:Ie,children:(0,l.jsx)("i",{className:"desc"===n?"iconfont icon-sanjiaoxing-down font12 ".concat(Te," ").concat(De):"iconfont icon-sanjiaoxing-down font12 ".concat(Te),onClick:function(){return o("asc"===n?"desc":"asc")}})})]})]})},Oe=n(82242),Fe=n.n(Oe),We=n(7557),He=n.n(We),ze=n(41498),Ge=n.n(ze),Ve=n(39647),Ke=n.n(Ve),Ue={flex_box_center:"flex_box_center___LCi0B",flex_space_between:"flex_space_between___hzONe",flex_box_vertical_center:"flex_box_vertical_center___ZyQRE",flex_box_center_end:"flex_box_center_end___XKM74",flex_box_column:"flex_box_column___p8LCU",btn:"btn___In02G","mediacy-round":"mediacy-round___uveEv","mediacy-default":"mediacy-default___dDxsd",default:"default___K791v"},qe=n(99571),Ye=["className","style","children","loading","openLoading","onClick","size","shape"],Xe=function(e){var t=e.className,n=e.style,r=e.children,o=e.loading,a=void 0!==o&&o,s=e.openLoading,c=e.onClick,d=void 0===c?function(){}:c,h=e.size,p=void 0===h?"middle":h,f=e.shape,m=void 0===f?"round":f,v=Ke()(e,Ye),g=(0,i.useState)(!1),y=u()(g,2),x=y[0],b=y[1];return(0,l.jsx)(qe.ZP,Fe()(Fe()({onClick:(0,k.throttle)(function(){var e=Ge()(He()().mark((function e(t){return He()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s&&b(!0),e.prev=1,e.next=4,d(t);case 4:e.next=9;break;case 6:e.prev=6,e.t0=e.catch(1),console.log("error",e.t0);case 9:s&&b(!1);case 10:case"end":return e.stop()}}),e,null,[[1,6]])})));return function(t){return e.apply(this,arguments)}}(),2e3,{leading:!0,trailing:!1}),className:C()(Ue.btn,Ue["".concat(p,"-").concat(m)],t),style:n,size:p,shape:m,loading:x||a},v),{},{children:r}))},Je="head___ghH72",Qe="node___mjPEy",$e=function(e){var t=e.className,n=e.style,i=e.children,r=void 0===i?null:i,o=e.onClick,a=e.title;return(0,l.jsxs)("div",{className:C()(Je,t),style:n,children:[(0,l.jsxs)("span",{className:"primary-hover",onClick:o,children:[(0,l.jsx)("i",{className:"iconfont icon-fanhui2 font12"}),"返回"]}),(0,l.jsx)("b",{title:a,children:a}),(0,l.jsx)("div",{className:Qe,children:r})]})},et="btns___sNgTb",tt="confirm___Ozirl",nt="cancel___aiq1I",it=function(e){var t=e.confirmShow,n=void 0===t||t,i=e.confirmTitle,r=e.confirmClick,o=e.cancelShow,a=void 0===o||o,s=e.cancelTitle,c=e.cancelClick,u=e.className,d=e.style,h=e.confirmLoading,p=void 0!==h&&h;return(0,l.jsxs)("div",{className:C()(et,u),style:d,children:[n&&(0,l.jsx)(qe.ZP,{loading:p,onClick:r,type:"primary",className:tt,children:i}),a&&(0,l.jsx)(qe.ZP,{onClick:c,className:nt,children:s})]})},rt={flex_box_center:"flex_box_center___jkpdr",flex_space_between:"flex_space_between___OtsL8",flex_box_vertical_center:"flex_box_vertical_center___rbcb_",flex_box_center_end:"flex_box_center_end___zBR21",flex_box_column:"flex_box_column___nS_eP",fixedBottom:"fixedBottom___oJl7m",wrap:"wrap___A3Oq1",center:"center____VL1y"},ot=function(e){var t=e.className,n=e.style,i=void 0===n?{}:n,r=e.LeftContent,o=e.children,a=e.RightContent;return(0,l.jsx)("div",{className:C()(rt.fixedBottom,t),style:i,children:(0,l.jsxs)("div",{className:rt.wrap,children:[(0,l.jsx)("div",{className:rt.left,children:r}),(0,l.jsx)("div",{className:rt.center,children:o}),(0,l.jsx)("div",{className:rt.right,children:a})]})})},at="crumbs___V41Oe",lt="hover___bEIVd",st=function(e){var t=e.className,n=e.style,r=void 0===n?{}:n,o=e.dataSource,a=void 0===o?[]:o;return(0,l.jsx)("div",{className:C()(at,t),style:r,children:a.map((function(e,t){return t<a.length-1?(0,l.jsxs)(i.Fragment,{children:[e.path||e.onClick?(0,l.jsx)("span",{className:lt,onClick:null!=e&&e.onClick?e.onClick:function(){return _e.history.push(e.path)},children:e.name}):(0,l.jsx)("span",{children:e.name}),(0,l.jsxs)("span",{children:[" ",">"," "]})]},t):(0,l.jsx)("span",{style:{color:"#5F6368"},children:e.name},t)}))})},ct=n(11938),ut=["onChange"],dt=ct.Z.Countdown,ht=function(e){var t=e.onChange,n=Ke()(e,ut),r=(0,i.useState)(null),o=u()(r,2),a=o[0],s=o[1];(0,i.useEffect)((function(){"number"==typeof a&&a>=0&&t(a)}),[a]);return(0,l.jsx)(dt,Fe()(Fe()({},n),{},{onChange:function(e){var t=Math.floor(e/1e3);s(t)}}))}},28329:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(59301);function r(e,t){var n=(0,i.useRef)();(0,i.useEffect)((function(){n.current=e})),(0,i.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},21466:function(e,t,n){"use strict";n.d(t,{i:function(){return _},q:function(){return S}});var i=n(82242),r=n.n(i),o=n(7557),a=n.n(o),l=n(41498),s=n.n(l),c=n(79800),u=n.n(c),d=n(39647),h=n.n(d),p=n(59301),f={flex_box_center:"flex_box_center___yMUhy",flex_space_between:"flex_space_between___KNvG9",flex_box_vertical_center:"flex_box_vertical_center___yqWY9",flex_box_center_end:"flex_box_center_end___DJKuV",flex_box_column:"flex_box_column___NTtN1",singleSelect:"singleSelect___fU3O9",multipleSelect:"multipleSelect___LFXCB",plus:"plus___gdDhG"},m=n(92310),v=n.n(m),g=n(25399),y=n(82326),x=n(99571),b=n(87281),w=n(37712),C=["wrapClassName","wrapStyle","showLinkButton","tooltipTitle","loadGeneral","data"],k=["wrapClassName","wrapStyle","showLinkButton","courseDisciplineId","isPlusHeight","tooltipTitle","allowAcceptEmpty","data"],S=function(e){var t=e.wrapClassName,n=e.wrapStyle,i=void 0===n?{}:n,o=e.showLinkButton,l=void 0===o||o,c=e.tooltipTitle,d=void 0===c?"":c,m=e.loadGeneral,k=void 0!==m&&m,S=e.data,_=void 0===S?{}:S,j=h()(e,C),N="course_disciplines_list",E=(0,p.useState)((function(){var e=sessionStorage.getItem(N);return e?JSON.parse(e):[]})),A=u()(E,2),Z=A[0],I=A[1],D=(0,p.useState)(!1),T=u()(D,2),P=T[0],M=T[1],L=(0,p.useState)(!0),B=u()(L,2),R=B[0],O=B[1];(0,p.useEffect)((function(){F()}),[]);var F=function(){var e=s()(a()().mark((function e(){var t,n,i,r,o;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return M(!0),e.next=3,(0,b.U2)("v2/course_disciplines.json",_);case 3:0===(t=e.sent).status&&(i=(null==t||null===(n=t.data)||void 0===n||null===(n=n.list)||void 0===n?void 0:n.map((function(e){return{value:e.id,label:e.name}})))||[],I(i),O(!1),sessionStorage.setItem(N,JSON.stringify(i)),R&&(o=null==t||null===(r=t.data)||void 0===r||null===(r=r.list)||void 0===r?void 0:r.find((function(e){return e.is_default})),k&&o&&j.onChange(null==o?void 0:o.id))),M(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,w.jsxs)("div",{className:v()(f.singleSelect,t),style:i,children:[(0,w.jsx)(g.Z,{title:d,children:(0,w.jsx)(y.default,r()({allowClear:!0,placeholder:"请选择课程",loading:P,options:Z,onDropdownVisibleChange:function(e){e&&F()}},j))}),l&&(0,w.jsx)(x.ZP,{type:"link",target:"_blank",href:"/knowledgeHub",children:"管理课程"})]})},_=function(e){var t=e.wrapClassName,n=e.wrapStyle,i=void 0===n?{}:n,o=e.showLinkButton,l=void 0===o||o,c=e.courseDisciplineId,d=void 0===c?"":c,m=e.isPlusHeight,C=void 0!==m&&m,S=e.tooltipTitle,_=e.allowAcceptEmpty,j=void 0!==_&&_,N=e.data,E=void 0===N?{}:N,A=h()(e,k),Z=(0,p.useState)([]),I=u()(Z,2),D=I[0],T=I[1],P=(0,p.useState)(!1),M=u()(P,2),L=M[0],B=M[1];(0,p.useEffect)((function(){R()}),[d]);var R=function(){var e=s()(a()().mark((function e(){var t,n,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(j||d){e.next=3;break}return T([]),e.abrupt("return");case 3:return B(!0),e.next=6,(0,b.U2)("v2/course_disciplines/".concat(d||"all",".json"),E);case 6:0===(t=e.sent).status&&(i=(null==t||null===(n=t.data)||void 0===n||null===(n=n.tag_disciplines)||void 0===n?void 0:n.map((function(e){return{value:e.id,label:e.name}})))||[]).length&&T(i),B(!1);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,w.jsxs)("div",{className:v()(f.multipleSelect,t),style:i,children:[(0,w.jsx)(g.Z,{title:S,children:(0,w.jsx)(y.default,r()(r()({allowClear:!0,mode:"multiple",optionFilterProp:"label",placeholder:"请选择知识点",loading:L,options:D,maxTagCount:"responsive",onDropdownVisibleChange:function(e){e&&R()}},A),{},{className:v()(A.className,C&&f.plus)}))}),l&&(0,w.jsx)(x.ZP,{className:f.btn,type:"link",target:"_blank",href:"/knowledgeHub",children:"管理知识点"})]})}},57864:function(e,t,n){"use strict";n.d(t,{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[e.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",e}({})},70122:function(e,t,n){"use strict";n.d(t,{H7:function(){return p},MK:function(){return h},MU:function(){return s},X6:function(){return u},bM:function(){return l},fi:function(){return f},fu:function(){return a},n4:function(){return m},rX:function(){return d},vl:function(){return v},zO:function(){return c}});var i=n(82242),r=n.n(i),o=n(87281);function a(e,t){return(0,o.U2)("myproblems/".concat(e,".json"),r()({hidePopLogin:!0},t||{}))}function l(e,t){return(0,o.v_)("myproblems/".concat(e,"/code_submit.json"),t)}function s(e,t){return(0,o.v_)("myproblems/".concat(e,"/code_debug.json"),t)}function c(e,t){return t.language&&(t.language=encodeURIComponent(t.language)),(0,o.U2)("myproblems/".concat(e,"/submit_records.json"),t)}function u(e){return(0,o.U2)("myproblems/record_detail.json",{id:e})}function d(e,t){return(0,o.U2)("myproblems/".concat(e,"/result.json"),{mode:t})}function h(e,t){return(0,o.v_)("myproblems/".concat(e,"/add_notes.json"),t)}function p(e,t){return(0,o.v_)("myproblems/".concat(e,"/restore_initial_code.json"),t)}function f(e){return(0,o.v_)("myproblems/".concat(e,"/sync_code.json"))}function m(e,t){return(0,o.v_)("myproblems/".concat(e,"/update_code.json"),t)}function v(e,t){return(0,o.v_)("discusses/".concat(e,"/plus.json"),t)}},79923:function(e,t,n){"use strict";n.d(t,{Z:function(){return gt}});var i=n(7557),r=n.n(i),o=n(41498),a=n.n(o),l=n(82242),s=n.n(l),c=n(37205),u=n.n(c),d=n(79800),h=n.n(d),p=n(59301),f={flex_box_center:"flex_box_center___bZaL5",flex_space_between:"flex_space_between___oaJSq",flex_box_vertical_center:"flex_box_vertical_center____hsuP",flex_box_center_end:"flex_box_center_end___ZYbPQ",flex_box_column:"flex_box_column___nE_62",wrap:"wrap___ulhwR",left:"left___kyWln",title:"title___jsO1D",total:"total___GEhiU",list:"list___u9dBZ",name:"name___Wxggs",b:"b___Y15YO",r:"r___mKQoe",l:"l___uelFD",tag:"tag___Mpkbg",right:"right___mQ3dU",examName:"examName___Na1r8",t:"t___IgCWK",num:"num___CXI8j",topWarp:"topWarp___Kicpu",head:"head___jx3W8",so:"so___qYW7F",btn:"btn___EMJDz",content:"content___sHGsV",titleWrap:"titleWrap___I__GR",single:"single___K5iv9",analysis:"analysis___NoAuR",text:"text___xESW2",modalColumn:"modalColumn___I_tK_",modalRow:"modalRow___lyw_U",sup:"sup___HSz3Z",popover:"popover___kE8aI",btn_warp:"btn_warp___fOE2S"},m=n(28284),v=n(25399),g=n(99571),y=n(62957),x=n(71051),b=n(6767),w=n(37568),C=n(37285),k=n(62673),S=n(37639),_=n(77019),j=n(5269),N=n(13747);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var E=n(83449),A=n(76805),Z=n(30406),I=n(87281);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var D=n(61098),T=n(39647),P=n.n(T),M=n(16039),L=n(49296),B={wrap:"wrap___OIoOI",modal:"modal___Z3hfU",titleWrap:"titleWrap___aK3oG",required:"required___NHoO7",title:"title___uxb1R",colorGray:"colorGray___O8YPg",choiceWrap:"choiceWrap___t51sb",answer:"answer___vsBnh",activeAnswer:"activeAnswer___AJN4p",deleteIcon:"deleteIcon___WvOJZ",addIcon:"addIcon___UyeIs",editorWrap:"editorWrap___uqcFU",htmlWrap:"htmlWrap___GcBNL",radio:"radio___e8qQ5",color333:"color333___PLzVK",color999:"color999___v3EY0",fold:"fold___OfvPe",head:"head___EejYX",collapseWrapper:"collapseWrapper___sQyVD",panelHeader:"panelHeader___Ivicf",open:"open___aEOQE",close:"close___z4P5H",inputBorder:"inputBorder___ix67O",keywordTag:"keywordTag___iGx08",scoreByBlankRadio:"scoreByBlankRadio___Kwu7q"},R=n(37712),O=["globalSetting","loading","dispatch","isEdit","editData"],F=function(e,t){e.globalSetting,e.loading,e.dispatch;var n=e.isEdit,i=e.editData,r=(P()(e,O),(0,p.useState)("")),o=h()(r,2),a=o[0],l=o[1],c=(0,p.useState)(""),d=h()(c,2),f=d[0],m=d[1],v=(0,p.useState)([]),w=h()(v,2),C=w[0],S=w[1],_=(0,p.useState)(""),j=h()(_,2),N=j[0],E=j[1],A=(0,p.useState)(),I=h()(A,2),D=I[0],T=I[1],F=(0,p.useState)(!1),W=h()(F,2),H=W[0],z=W[1],G=(0,p.useState)({}),V=h()(G,2),K=V[0],U=V[1],q=(0,p.useState)([]),Y=h()(q,2),X=Y[0],J=Y[1];(0,p.useEffect)((function(){i&&n&&(l(null==i?void 0:i.name),m(null==i?void 0:i.analysis),T(null==i?void 0:i.is_ordered),U(i),z(!0))}),[i]),(0,p.useEffect)((function(){if(H){var e=null==i?void 0:i.standard_answer.map((function(e){return null==e?void 0:e.answer_text}));S(e);var t=null==i?void 0:i.standard_answer.map((function(e){return null==e?void 0:e.score}));J(t),z(!1)}}),[H]),(0,p.useImperativeHandle)(t,(function(){return{onSave:Q,Clear:$}}));var Q=function(){var e=[],t=!1;return a?(C.forEach((function(n,i){e.push({position:i+1,answer_text:[],score:X[i]}),null==n||n.forEach((function(n,r){e[i].answer_text.push(n),n&&(0,Z.eR)(n,1e4)||(E("".concat(i,"-").concat(r)),b.ZP.info(n?"答案不能超过10000字符":"答案:不能为空"),t=!0)}))})),!t&&((null==e?void 0:e.length)>20?(b.ZP.warning("填空题标准答案不能为空/不能超过20个"),!1):{name:a,analysis:f,standard_answers:e,is_ordered:D,downcase:null==K?void 0:K.downcase,no_space:null==K?void 0:K.no_space,use_blank_score:null==K?void 0:K.use_blank_score})):(b.ZP.info("请您输入题干"),!1)},$=function(){l(""),m(""),S([]),T(!1)},ee=function(e,t,n){E("");var i=C.slice();i[e][t]=n,S(i)},te=function(e){var t=C.slice();t[e]=[].concat(u()(t[e]),[""]),S(t)},ne=function(e,t){var n=C.slice();if(!n[e][t])return n[e]=n[e].filter((function(e,n){return n!==t})),void S(n);y.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:B.modal,onOk:function(){n[e]=n[e].filter((function(e,n){return n!==t})),S(n)}})},ie=function(e){y.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:B.modal,onOk:function(){var t=C.slice();t=C.filter((function(t,n){return e!==n})),S(t)}})};return(0,R.jsxs)("section",{className:B.wrap,children:[(0,R.jsxs)("p",{className:B.titleWrap,children:[(0,R.jsx)("span",{className:B.required,children:"*"}),(0,R.jsx)("span",{className:B.title,children:"题干:"})]}),(0,R.jsx)("div",{children:(0,R.jsx)(M.Z,{id:"completion-question-tittle",placeholder:"请编辑题干,您可以用任意字符表示填空项",height:155,defaultValue:a,onChange:function(e){return l(e)},showNullButton:!0,onAddBlank:function(){return S((function(e){return[].concat(u()(e),[[""]])}))}})}),(0,R.jsx)("div",{className:"mt20 flex flex-col gap-10px",children:C.map((function(e,t){return(0,R.jsxs)("div",{style:{display:"flex"},children:[(0,R.jsx)("div",{style:{flex:1},children:(0,R.jsx)(L.Z,{answers:e,index:t,flex:1,is_md:!0,activeOptionErrorIndex:N,onAnswerChange:ee,addChildAnswer:te,deleteChildAnswer:ne,deleteChildAnswermain:ie},t)}),K.use_blank_score&&(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center",width:"165px"},children:[(0,R.jsx)("span",{style:{color:"red",margin:"auto 5px auto 10px"},children:"*"}),"分值:",(0,R.jsx)(x.Z,{style:{width:"100px"},size:"large",defaultValue:X[t],onBlur:function(e){X[t]=e.target.value,J(u()(X))}})]})]})}))}),(0,R.jsx)(g.ZP,{className:"mt20",onClick:function(){return S((function(e){return[].concat(u()(e),[[""]])}))},type:"primary",shape:"round",children:"新增填空项"}),(0,R.jsxs)("div",{children:[(0,R.jsx)(k.Z,{className:"".concat(B.color333," font14 mt20"),checked:K.use_blank_score,onChange:function(e){return U(s()(s()({},K),{},{use_blank_score:e.target.checked}))},children:"判分时按空给分"}),(0,R.jsx)("span",{style:{color:"#999999",fontSize:"12px"},children:"(选中,则需要设置每空分值,学生答案判分时按空给分)"})]}),(0,R.jsx)("div",{children:(0,R.jsx)(k.Z,{className:"".concat(B.color333," font14 mt20"),checked:K.downcase,onChange:function(e){return U(s()(s()({},K),{},{downcase:e.target.checked}))},children:"判分时忽略答案中的字母大小写"})}),(0,R.jsx)("div",{children:(0,R.jsx)(k.Z,{className:"".concat(B.color333," font14 mt20"),checked:K.no_space,onChange:function(e){return U(s()(s()({},K),{},{no_space:e.target.checked}))},children:"判分时忽略答案中的空格"})}),(0,R.jsx)("div",{className:"mt20",children:(null==C?void 0:C.length)>1&&(0,R.jsxs)("span",{children:[(0,R.jsx)(k.Z,{checked:D,onChange:function(e){return T(e.target.checked)},className:"".concat(B.color333," font14"),children:"多个填空的答案有顺序要求"}),(0,R.jsx)("span",{className:"".concat(B.color999," font12"),children:"(选中,每个填空的答案顺序必须与参考答案一致)"})]})}),(0,R.jsx)("p",{className:B.titleWrap,children:(0,R.jsx)("span",{className:B.title,children:"题目解析:"})}),(0,R.jsx)(M.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:f,onChange:function(e){return m(e)}})]})},W=(0,A.connect)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})((0,p.forwardRef)(F)),H=n(47889),z=["globalSetting","loading","editData","dispatch","onRef","isEdit"],G=function(e,t){e.globalSetting,e.loading;var n=e.editData,i=(e.dispatch,e.onRef,e.isEdit),r=(P()(e,z),(0,p.useState)()),o=h()(r,2),a=o[0],l=o[1],s=(0,p.useState)(""),c=h()(s,2),u=c[0],d=c[1],f=(0,p.useState)(""),m=h()(f,2),v=m[0],g=m[1];(0,p.useEffect)((function(){if(n&&i){d(null==n?void 0:n.name),g(null==n?void 0:n.analysis);var e=null==n?void 0:n.choices.find((function(e){return e.is_answer}));l("正确"===e.choice_text?"0":"1")}}),[n]),(0,p.useImperativeHandle)(t,(function(){return{onSave:y,Clear:x}}));var y=function(){return u?a?{name:u,choices:[{choice_text:"正确",is_answer:"0"===a?1:0},{choice_text:"错误",is_answer:"1"===a?1:0}],analysis:v}:(b.ZP.info("请先点击选择本选择题的正确选项"),!1):(b.ZP.info("请您输入题干"),!1)},x=function(){d(""),g(""),l("")};return(0,R.jsxs)("section",{className:B.wrap,children:[(0,R.jsxs)("p",{className:B.titleWrap,children:[(0,R.jsx)("span",{className:B.required,children:"*"}),(0,R.jsx)("span",{className:B.title,children:"题干:"})]}),(0,R.jsx)(M.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:u,onChange:function(e){return d(e)}}),(0,R.jsxs)("p",{className:B.titleWrap,children:[(0,R.jsx)("span",{className:B.required,children:"*"}),(0,R.jsxs)("span",{className:B.title,children:["答案选项:",(0,R.jsx)("span",{className:B.colorGray,children:"点击选项可设置正确答案"})]})]}),(0,R.jsxs)(H.ZP.Group,{buttonStyle:"solid",value:a,onChange:function(e){return l(e.target.value)},children:[(0,R.jsx)(H.ZP.Button,{value:"0",className:"".concat(B.radio," mr40"),children:"正确"}),(0,R.jsx)(H.ZP.Button,{value:"1",className:B.radio,children:"错误"})]}),(0,R.jsx)("p",{className:B.titleWrap,children:(0,R.jsx)("span",{className:B.title,children:"题目解析:"})}),(0,R.jsx)(M.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:v,onChange:function(e){return g(e)}})]})},V=(0,A.connect)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})((0,p.forwardRef)(G)),K=["globalSetting","loading","editData","dispatch","onRef","isEdit"],U=function(e,t){e.globalSetting,e.loading;var n=e.editData,i=(e.dispatch,e.onRef,e.isEdit),r=(P()(e,K),(0,p.useState)([])),o=h()(r,2),a=o[0],l=o[1];(0,p.useEffect)((function(){var e;if(n&&i){var t=null==n||null===(e=n.shixun)||void 0===e?void 0:e.challenges.map((function(e){return{id:null==e?void 0:e.id,score:e.score}}));l(t)}}),[n]),(0,p.useImperativeHandle)(t,(function(){return{onSave:s,Clear:c}}));var s=function(){return{challenges:u()(a)}},c=function(){l([])};console.log("editData--",n);var d,f;return(0,R.jsxs)("section",{className:B.wrap,children:[(0,R.jsx)(E.Z,{style:{paddingRight:10},className:B.titleHtml,value:"".concat(null==n?void 0:n.position)+"、"+"".concat(null==n?void 0:n.name)}),(0,R.jsxs)("p",{style:{marginBottom:"10px",marginTop:"25px"},children:[(0,R.jsx)("span",{className:B.required,children:"*"}),(0,R.jsx)("span",{className:B.title,children:"关卡"})]}),(d=n,(0,R.jsxs)("div",{children:[null==d||null===(f=d.shixun)||void 0===f||null===(f=f.challenges)||void 0===f?void 0:f.map((function(e,t){var n;return(0,R.jsxs)("div",{className:"c-grey-666 font14 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"15px"},children:[(0,R.jsxs)("div",{children:[(0,R.jsxs)("span",{className:"mr5",children:["第",t+1,"关"]}),(0,R.jsx)(v.Z,{title:null==e?void 0:e.challenge_name,children:(0,R.jsx)("span",{children:(0,Z.Pq)(null==e?void 0:e.challenge_name,44)})},t)]}),(0,R.jsxs)("p",{style:{marginBottom:0},children:[(0,R.jsx)("span",{className:B.required,children:"*"}),(0,R.jsx)("span",{className:B.title,children:"分值:"}),(0,R.jsx)(x.Z,{precision:1,min:1,max:100,className:B.baseFormItem,style:{width:176},value:null===(n=a.find((function(t){return t.id===e.id})))||void 0===n?void 0:n.score,onChange:function(t){a.find((function(t){return t.id===e.id})).score=t,l(u()(a))}})]})]})})),(0,R.jsx)("div",{style:{clear:"both"}})]}))]})},q=(0,A.connect)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})((0,p.forwardRef)(U)),Y=["editData","globalSetting","loading","dispatch","onRef","isEdit"],X=["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"],J=function(e,t){var n=e.editData,i=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),r=(P()(e,Y),(0,p.useState)([])),o=h()(r,2),a=o[0],l=o[1],s=(0,p.useState)(),c=h()(s,2),d=c[0],f=c[1],m=(0,p.useState)([]),g=h()(m,2),y=g[0],x=g[1],w=(0,p.useState)(""),C=h()(w,2),k=C[0],S=C[1],_=(0,p.useState)(""),j=h()(_,2),N=j[0],A=j[1];(0,p.useEffect)((function(){l(["","","",""])}),[]),(0,p.useEffect)((function(){if(n&&i){S(null==n?void 0:n.name),A(null==n?void 0:n.analysis),l(null==n?void 0:n.choices.map((function(e){return e.choice_text})));var e=[];null==n||n.choices.map((function(t,n){t.is_answer&&e.push(n)})),x(e)}}),[n]),(0,p.useImperativeHandle)(t,(function(){return{onSave:Z,Clear:I}}));var Z=function(){if(!k)return b.ZP.info("请您输入题干"),!1;var e=a.findIndex((function(e){return!e}));if(e>-1)return b.ZP.info("请先输入 ".concat(X[e]," 选项的内容")),!1;if(!y.length)return b.ZP.info("请设置本题的正确答案点击选项A/B...即可完成设置"),!1;if(y.length<2)return b.ZP.info("多选题最小正确选项为2个"),!1;var t=a.map((function(e,t){return{choice_text:e,is_answer:y.includes(t)?1:0}}));return{name:k,choices:t,analysis:N}},I=function(){l(["","","",""]),S(""),A(""),x("")};return(0,R.jsxs)("section",{className:B.wrap,children:[(0,R.jsxs)("p",{className:B.titleWrap,children:[(0,R.jsx)("span",{className:B.required,children:"*"}),(0,R.jsx)("span",{className:B.title,children:"题干:"})]}),(0,R.jsx)(M.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:k,onChange:function(e){return S(e)}}),(0,R.jsxs)("p",{className:B.titleWrap,children:[(0,R.jsx)("span",{className:B.required,children:"*"}),(0,R.jsxs)("span",{className:B.title,children:["答案选项:",(0,R.jsx)("span",{className:B.colorGray,children:"点击选项可设置正确答案"})]})]}),a.map((function(e,t){return(0,R.jsxs)("div",{className:B.choiceWrap,children:[(0,R.jsx)(v.Z,{title:"点击设置为标准答案",placement:"left",children:(0,R.jsx)("div",{className:"".concat(B.answer," ").concat(y.includes(t)?B.activeAnswer:""),onClick:function(){y.includes(t)?x(y.filter((function(e){return e!==t}))):x([].concat(u()(y),[t]))},children:X[t]})}),(0,R.jsx)("div",{className:B.editorWrap,children:d===t?(0,R.jsx)(M.Z,{id:"single-question-option-".concat(t),watch:!0,height:155,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){a[t]=e,l(a)}}):(0,R.jsx)("div",{className:B.htmlWrap,onClick:function(){return f(t)},children:(0,R.jsx)(E.Z,{value:e})})}),t>1&&(0,R.jsx)(v.Z,{title:"删除",children:(0,R.jsx)("i",{className:"".concat(B.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){l(a.filter((function(e,n){return n!==t}))),y.includes(t)?x(y.filter((function(e){return e!==t}))):x([].concat(u()(y),[t]))}})}),t<7&&t===a.length-1&&(0,R.jsx)(v.Z,{title:"新增参考答案",children:(0,R.jsx)("i",{className:"".concat(B.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return l([].concat(u()(a),[""]))}})})]},t)})),(0,R.jsx)("p",{className:B.titleWrap,children:(0,R.jsx)("span",{className:B.title,children:"题目解析:"})}),(0,R.jsx)(M.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:N,onChange:function(e){return A(e)}})]})},Q=(0,A.connect)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})((0,p.forwardRef)(J)),$=["editData","globalSetting","loading","dispatch","onRef","isEdit"],ee=["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"],te=function(e,t){var n=e.editData,i=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),r=(P()(e,$),(0,p.useState)([])),o=h()(r,2),a=o[0],l=o[1],s=(0,p.useState)(),c=h()(s,2),d=c[0],f=c[1],m=(0,p.useState)(),g=h()(m,2),y=g[0],x=g[1],w=(0,p.useState)(""),C=h()(w,2),k=C[0],S=C[1],_=(0,p.useState)(""),j=h()(_,2),N=j[0],A=j[1];(0,p.useEffect)((function(){l(["","","",""])}),[]),(0,p.useEffect)((function(){if(n&&i){var e=[],t=[];null==n||n.choices.forEach((function(n,i){e.push(n.choice_text),n.is_answer&&t.push(i)})),S(null==n?void 0:n.name),A(null==n?void 0:n.analysis),l(e),x(t)}}),[n]),(0,p.useImperativeHandle)(t,(function(){return{onSave:Z,Clear:I}}));var Z=function(){if(!k)return b.ZP.info("请您输入题干"),!1;var e=a.findIndex((function(e){return!e}));if(e>-1)return b.ZP.info("请先输入 ".concat(ee[e]," 选项的内容")),!1;if(!Array.isArray(y))return b.ZP.info("请设置本题的正确答案点击选项A/B...即可完成设置"),!1;var t=a.map((function(e,t){return{choice_text:e,is_answer:y.includes(t)?1:0}}));return{name:k,choices:t,analysis:N}},I=function(){l(["","","",""]),S(""),A(""),x("")};return(0,R.jsxs)("section",{className:B.wrap,children:[(0,R.jsxs)("p",{className:B.titleWrap,children:[(0,R.jsx)("span",{className:B.required,children:"*"}),(0,R.jsx)("span",{className:B.title,children:"题干:"})]}),(0,R.jsx)(M.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:k,onChange:function(e){return S(e)}}),(0,R.jsxs)("p",{className:B.titleWrap,children:[(0,R.jsx)("span",{className:B.required,children:"*"}),(0,R.jsxs)("span",{className:B.title,children:["答案选项:",(0,R.jsx)("span",{className:B.colorGray,children:"点击选项可设置正确答案"})]})]}),a.map((function(e,t){return(0,R.jsxs)("div",{className:B.choiceWrap,children:[(0,R.jsx)(v.Z,{title:"点击设置为标准答案",placement:"left",children:(0,R.jsx)("div",{className:"".concat(B.answer," ").concat(null!=y&&y.includes(t)?B.activeAnswer:""),onClick:function(){return x([t])},children:ee[t]})}),(0,R.jsx)("div",{className:B.editorWrap,children:d===t?(0,R.jsx)(M.Z,{id:"single-question-option-".concat(t),watch:!0,height:155,isFocus:!0,placeholder:"请您输入选项",defaultValue:e,onChange:function(e){a[t]=e,l(a)}}):(0,R.jsx)("div",{className:B.htmlWrap,onClick:function(){return f(t)},children:(0,R.jsx)(E.Z,{value:e})})}),t>1&&(0,R.jsx)(v.Z,{title:"删除",children:(0,R.jsx)("i",{className:"".concat(B.deleteIcon," iconfont icon-htmal5icon19"),onClick:function(){l(a.filter((function(e,n){return n!==t}))),t===y&&x(null)}})}),t<7&&t===a.length-1&&(0,R.jsx)(v.Z,{title:"新增参考答案",children:(0,R.jsx)("i",{className:"".concat(B.addIcon," iconfont icon-roundaddfill ml6"),onClick:function(){return l([].concat(u()(a),[""]))}})})]},t)})),(0,R.jsx)("p",{className:B.titleWrap,children:(0,R.jsx)("span",{className:B.title,children:"题目解析:"})}),(0,R.jsx)(M.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:N,onChange:function(e){return A(e)}})]})},ne=(0,A.connect)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})((0,p.forwardRef)(te)),ie=n(91232),re=n.n(ie),oe=n(96599),ae=n(71411),le=n(61485),se=["editData","globalSetting","loading","dispatch","onRef","isEdit"],ce=["key","name"],ue=function(e){var t=e.value,n=void 0===t?[]:t,i=e.onClose;return(0,R.jsx)(oe.Z,{closable:!0,onClose:i,className:B.keywordTag,children:(0,R.jsx)("pre",{style:{margin:"0px",whiteSpace:"pre-wrap"},children:n.join(" 或 ")})})},de=function(e,t){var n=e.editData,i=(e.globalSetting,e.loading,e.dispatch,e.onRef,e.isEdit),o=(P()(e,se),(0,p.useState)("")),l=h()(o,2),c=l[0],u=l[1],d=(0,p.useState)(""),f=h()(d,2),g=f[0],y=f[1],C=(0,p.useState)(""),k=h()(C,2),S=k[0],N=k[1],E=(0,p.useState)(""),A=h()(E,2),Z=A[0],I=A[1],D=m.Z.useForm(),T=h()(D,1)[0],L=m.Z.useWatch("use_keywords",T);(0,p.useEffect)((function(){var e;n&&i&&(u(null==n?void 0:n.name),y(null==n?void 0:n.analysis),N(null==n||null===(e=n.answer_texts)||void 0===e?void 0:e[0]),T.setFieldsValue(s()({},n)))}),[n]),(0,p.useImperativeHandle)(t,(function(){return{onSave:O,Clear:F}}));var O=function(){var e=a()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c){e.next=3;break}return b.ZP.info("请您输入题干"),e.abrupt("return",!1);case 3:return e.prev=3,e.next=6,T.validateFields();case 6:e.next=12;break;case 8:return e.prev=8,e.t0=e.catch(3),b.ZP.error(e.t0.errorFields[0].errors[0]),e.abrupt("return");case 12:return t=T.getFieldsValue(),console.log(t,"values"),e.abrupt("return",s()({name:c,answer_texts:[S],analysis:g},t));case 15:case"end":return e.stop()}}),e,null,[[3,8]])})));return function(){return e.apply(this,arguments)}}(),F=function(){u(""),y(""),N(""),T.resetFields()},W=null==n?void 0:n.score;return(0,R.jsxs)("section",{className:B.wrap,children:[(0,R.jsxs)("p",{className:B.titleWrap,children:[(0,R.jsx)("span",{className:B.required,children:"*"}),(0,R.jsx)("span",{className:B.title,children:"题干:"})]}),(0,R.jsx)(M.Z,{id:"single-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:c,onChange:function(e){return u(e)}}),(0,R.jsx)("p",{className:B.titleWrap,children:(0,R.jsx)("span",{className:B.title,children:"参考答案:"})}),(0,R.jsx)(M.Z,{id:"single-question-reference-answer",watch:!0,height:155,placeholder:"请您输入参考答案",defaultValue:S,onChange:function(e){return N(e)}}),(0,R.jsx)("p",{className:B.titleWrap,children:(0,R.jsx)("span",{className:B.title,children:"题目解析:"})}),(0,R.jsx)(M.Z,{id:"single-question-answer",watch:!0,height:155,placeholder:"请您输入题目解析",defaultValue:g,onChange:function(e){return y(e)}}),(0,R.jsxs)(m.Z,{form:T,size:"large",onFinishFailed:function(){var e=a()(r()().mark((function e(t){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:b.ZP.error(t.errorFields[0].errors[0]),T.scrollToField(null==t||null===(n=t.errorFields)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.name,{behavior:"smooth",block:"center"});case 2:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:[(0,R.jsxs)(_.Z,{align:"middle",className:"mb30 mt20",children:[(0,R.jsx)(m.Z.Item,{noStyle:!0,name:"use_keywords",valuePropName:"checked",children:(0,R.jsx)(ae.Z,{})}),(0,R.jsx)(j.Z,{className:"ml10",children:"开启关键词自动判分"}),(0,R.jsx)(j.Z,{children:(0,R.jsx)(v.Z,{placement:"right",title:"选中后,需要设置每个关键词的分值,系统会根据设置的关键词进行自动判分; 所有关键词分值之和必须小于等于小题分值。",children:(0,R.jsx)(le.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})})]}),L&&(0,R.jsx)(m.Z.List,{name:"keywords",rules:[{validator:function(e,t){return null!=t&&t.length?(null==t?void 0:t.reduce((function(e,t){return e+t.score}),0))>parseFloat(W)?Promise.reject(new Error("所有关键词的分值之和必须小于等于该小题的分值")):Promise.resolve():Promise.reject(new Error("请设置判分关键词"))}}],children:function(e,t){var n=t.add,i=t.remove;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("div",{className:"mb10",children:"关键词"}),(0,R.jsxs)(_.Z,{align:"middle",className:"font14 mb30",children:[(0,R.jsx)(j.Z,{flex:1,children:(0,R.jsx)(w.Z,{value:Z,onChange:function(e){I(e.target.value)},maxLength:50,allowClear:!0,onPressEnter:function(e){var t,i,r,o,a="".concat(null===(t=e.target)||void 0===t?void 0:t.value),l=null==a||null===(i=a.split("|"))||void 0===i||null===(i=i.filter((function(e){return!!e})))||void 0===i?void 0:i.map((function(e){return null==e?void 0:e.trim()})),s=T.getFieldValue("keywords"),c=(null==s||null===(r=s.map((function(e){return null==e?void 0:e.keyword})))||void 0===r?void 0:r.flat())||[],u=re()(l);try{for(u.s();!(o=u.n()).done;){var d=o.value;if(c.includes(d))return void b.ZP.error("为避免判分错误,请勿设置相同的关键词")}}catch(e){u.e(e)}finally{u.f()}(function(e){if(!e)return!1;if(!/^s*$/.test(e)&&""!==e.trim())return new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~@#¥……&*—【】”“。「」『』_\\+\\-·%《》]|[\\\\/]"),"|"!==e||(b.ZP.warning("关键词不能只输入一个“|”字符!"),!1);b.ZP.warning("关键词不能全为空格")})(a)&&(n({keyword:l,score:1}),I(""))},className:B.inputBorder,placeholder:"支持设置多个关键词;并列关键词(或的关系)请用“|”分隔开"})}),(0,R.jsx)(j.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"},children:"“回车键”保存关键词"})]}),e.map((function(e){var t=e.key,n=e.name,r=P()(e,ce);return(0,R.jsx)(_.Z,{style:{marginRight:148},children:(0,R.jsx)(j.Z,{flex:1,children:(0,R.jsxs)(_.Z,{align:"middle",justify:"space-between",children:[(0,R.jsx)(m.Z.Item,s()(s()({},r),{},{name:[n,"keyword"],children:(0,R.jsx)(ue,{onClose:function(){return i(n)}})})),(0,R.jsx)(m.Z.Item,s()(s()({},r),{},{name:[n,"score"],label:"分值",rules:[{required:!0}],children:(0,R.jsx)(x.Z,{min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入关键词分数"})}))]})})},t)}))]})}})]})]})},he=(0,A.connect)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})((0,p.forwardRef)(de)),pe=n(8848),fe=n(85573),me=n.n(fe),ve={wrap:"wrap___Cc0gS",deleteIcon:"deleteIcon___ebwMv",keywordTag:"keywordTag___lUfL5",questionTitleEditorWrap:"questionTitleEditorWrap___u9UgK",choiceWrap:"choiceWrap___VHsr3",choiceIndex:"choiceIndex___rsj9r",judgementIndex:"judgementIndex___fMm6E",setAnswerBtn:"setAnswerBtn___krVC9",activeAnswer:"activeAnswer___WiYo2",activeJudgementAnswer:"activeJudgementAnswer___M6iww",actionWrapper:"actionWrapper___oKI8_",addIcon:"addIcon___eMbGP",inputBorder:"inputBorder___ob_6x",placeholder:"placeholder___Vkwr4",blankWrapper:"blankWrapper____MZQ5",blankInput:"blankInput___ephwY",blankInputNumberWrapper:"blankInputNumberWrapper___C1UJS",addBtn:"addBtn___qRBpJ",blankIndex:"blankIndex___QsKgf",baseInputWrapper:"baseInputWrapper___juqCB",collapseWrapper:"collapseWrapper___kAXJ0",panelHeader:"panelHeader___hLTSe",open:"open___wWDjf",close:"close___XPTJ0",hide:"hide___VytUy"},ge=n(32134),ye=n(12893),xe=["value","onChange","scrollId"],be=function(e){var t=e.value,n=e.onChange,i=e.scrollId,r=P()(e,xe);return(0,R.jsx)("div",{id:i||"",children:(0,R.jsx)(M.Z,s()(s()({},r),{},{defaultValue:t,onChange:function(e,t){null!=t&&t.length?n(e,t):n(e)}}))})},we=function(e){var t=e.value,n=e.onChange,i=e.placeholder,r=e.height,o=void 0===r?140:r;return e.isEdit?(0,R.jsx)(M.Z,{watch:!0,isFocus:!0,height:o,placeholder:i,defaultValue:t,onChange:n}):(0,R.jsx)("div",{style:{cursor:"pointer"},children:t?(0,R.jsx)(E.Z,{className:ve.inputBorder,value:t}):(0,R.jsx)("div",{className:"".concat(ve.inputBorder," ").concat(ve.placeholder),children:i})})},Ce=["key","name"],ke=["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"],Se=function(e){var t=e.value,n=e.onChange,i=e.choiceTextKey,r=e.answerKey,o=e.index,a=e.isEdit,l=e.setInputActive,c=e.form,u=e.choiceOptionsPath,d=e.allowChangeMode,h=e.showAddIcon,p=e.addItem,f=e.deleteItem,m=!0===(null==t?void 0:t[r]),g=function(){var e;m?n(s()(s()({},t),{},me()({},r,!1))):(d||(e=c.getFieldValue(u),c.setFieldValue(u,e.map((function(e){return s()(s()({},e),{},me()({},r,!1))})))),n(s()(s()({},t),{},me()({},r,!0))))};return(0,R.jsxs)(_.Z,{className:ve.choiceWrap,align:"middle",wrap:!1,children:[(0,R.jsx)(j.Z,{onClick:g,className:"".concat(ve.choiceIndex," ").concat(m?ve.activeAnswer:""),children:ke[o]}),(0,R.jsx)(j.Z,{flex:1,className:"".concat(ve.editorWrap," ml15"),onClick:l,children:(0,R.jsx)(we,{height:155,placeholder:"请您输入选项",isEdit:a,value:null==t?void 0:t[i],onChange:function(e){n(s()(s()({},t),{},me()({},i,e)))}})}),(0,R.jsx)(j.Z,{flex:"0 0 auto",className:"ml15",children:(0,R.jsx)("div",{onClick:g,className:"".concat(ve.setAnswerBtn," ").concat(m?ve.activeAnswer:""),children:m?"正确答案":"设为答案"})}),(0,R.jsxs)(j.Z,{className:ve.actionWrapper,children:[(0,R.jsx)(v.Z,{title:"新增参考答案",children:(0,R.jsx)(ge.Z,{className:ve.addIcon,onClick:p,style:{visibility:h?"visible":"hidden"}})}),(0,R.jsx)(v.Z,{title:"删除",children:(0,R.jsx)(ye.Z,{className:ve.deleteIcon,onClick:f,style:{visibility:o>1?"visible":"hidden"}})})]})]})},_e=function(e){var t=e.questionTitlePlaceholder,n=e.titleKey,i=e.choiceKey,r=e.analysisKey,o=e.choiceTextKey,a=e.answerKey,l=e.choiceOptionsPath,c=e.allowChangeMode,u=void 0===c||c,d=e.form,f=e.showAnalysis,v=void 0===f||f,g=(0,p.useState)(),y=h()(g,2),x=y[0],b=y[1],w=(0,p.useState)(!1),C=h()(w,2),k=C[0],S=C[1];return(0,R.jsxs)("div",{className:ve.wrap,children:[(0,R.jsx)("div",{className:ve.questionTitleEditorWrap,children:(0,R.jsx)(m.Z.Item,{label:"题干",name:n,labelCol:{span:24},rules:[{required:!0}],children:(0,R.jsx)(be,{scrollId:Array.isArray(n)?n.join("_"):"".concat(n),watch:!0,height:140,placeholder:t})})}),(0,R.jsx)(m.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24}}),(0,R.jsx)(m.Z.List,{name:i,rules:[{validator:function(e,t){var n=t.some((function(e){return e[a]})),i=t.findIndex((function(e){var t;return(null===(t=e[o])||void 0===t?void 0:t.length)<=0}));return-1!==i?Promise.reject(new Error("请先输入".concat(ke[i],"选项的内容"))):n?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e,t){var n=t.add,i=t.remove;return(0,R.jsxs)("div",{id:Array.isArray(l)?l.join("_"):"".concat(l),children:[e.map((function(t,r){var c=t.key,h=t.name,f=P()(t,Ce),v=x===c,g=r<7&&r===e.length-1;return(0,p.createElement)(m.Z.Item,s()(s()({},f),{},{key:c,name:h,noStyle:!0}),(0,R.jsx)(Se,{choiceTextKey:o,answerKey:a,index:r,isEdit:v,setInputActive:function(){b(c)},form:d,choiceOptionsPath:l,allowChangeMode:u,showAddIcon:g,addItem:function(){return n(me()(me()({},o,""),a,0))},deleteItem:function(){return i(h)}}))})),e.length<8&&(0,R.jsx)("div",{className:"".concat(ve.addBtn," mb30"),onClick:function(){return n(me()(me()({},o,""),a,0))},children:"添加选项"})]})}}),v&&(0,R.jsx)("div",{onClick:function(){return S(!0)},children:(0,R.jsx)(m.Z.Item,{name:r,label:"题目解析",labelCol:{span:24},children:(0,R.jsx)(we,{placeholder:"请编辑题目解析(非必填)",isEdit:k})})})]})},je=["key","name"],Ne=function(e){var t=e.value,n=e.onChange,i=e.position,r=e.removeBlank;return(0,R.jsx)(_.Z,{className:"ml20",children:(0,R.jsx)(j.Z,{flex:1,children:null==t?void 0:t.map((function(e,o){return(0,R.jsxs)(_.Z,{className:"mb20",children:[(0,R.jsx)(w.Z.TextArea,{style:{flex:1,minHeight:44},defaultValue:e,autoSize:{maxRows:3},maxLength:1e3,onBlur:function(e){var i=u()(t),r=e.target.value.trim();i[o]=r,n(i)}}),(0,R.jsx)(v.Z,{title:"删除",children:(0,R.jsx)(ye.Z,{className:ve.deleteIcon,style:{marginLeft:15,visibility:1===i&&0===o?"hidden":"visible"},onClick:function(){return function(e){y.Z.confirm({centered:!0,okText:"确定",cancelText:"取消",title:"提示",content:"确认要删除这个参考答案吗?",className:ve.modal,onOk:function(){var o=u()(t);o.splice(e,1),0===o.length?r(i-1):n(o)}})}(o)}})}),(0,R.jsx)(v.Z,{title:"新增答案",children:(0,R.jsx)(ge.Z,{style:{color:"#2A5DD8",fontSize:16,marginLeft:15,visibility:0===o?"visible":"hidden"},onClick:function(){var e;(e=u()(t)).push(""),n(e)}})})]},"".concat(e,"_").concat(o))}))})})},Ee=function(e){var t=e.value,n=void 0===t||t,i=e.onChange;return(0,R.jsx)(ae.Z,{checked:!n,onChange:function(e){i(!e)}})},Ae=function(e){var t,n=e.questionTitlePlaceholder,i=e.form,r=e.name,o=e.scoreByBlank,a=void 0===o?"use_blank_score":o,l=e.answerKey,c=e.titleKey,d=void 0===c?"name":c,f=e.analysisKey,v=void 0===f?"analysis":f,y=e.isOrdered,b=void 0===y?"is_ordered":y,C=(0,p.useState)(!1),k=h()(C,2),S=k[0],N=k[1],E=function(){var e=i.getFieldValue(["sub_item_banks"].concat(u()(l)));i.setFieldValue(["sub_item_banks"].concat(u()(l)),null==e?void 0:e.map((function(e,t){return s()(s()({},e),{},{position:t+1})})))},A=(0,p.useRef)(),Z=function(e,t){for(var n=0;n<e;n++)A.current({position:null,answer_text:[""]},t+n);E()},I=(0,p.useRef)(),D=function(e){I.current(e),E()},T=null===(t=i.getFieldValue("sub_item_banks"))||void 0===t||null===(t=t[null==l?void 0:l[0]])||void 0===t?void 0:t[null==l?void 0:l[1]];return(0,R.jsxs)("div",{className:ve.wrap,children:[(0,R.jsx)("div",{className:ve.questionTitleEditorWrap,children:(0,R.jsx)(m.Z.Item,{label:"题干",name:d,labelCol:{span:24},rules:[{required:!0}],children:(0,R.jsx)(be,{scrollId:"name",watch:!0,height:140,placeholder:n,showNullButton:!0,onAddBlank:function(){var e=i.getFieldValue(["sub_item_banks"].concat(u()(l)));Z(1,null==e?void 0:e.length)}})})}),(0,R.jsx)(m.Z.List,{name:l,rules:[{validator:function(e,t){if(0===(null==t?void 0:t.length))return Promise.reject(new Error("答案不能为空"));var n,i=re()(t);try{for(i.s();!(n=i.n()).done;){var r=(n.value||{}).answer_text;if(null!=r&&r.some((function(e){return 0===(null==e?void 0:e.length)})))return Promise.reject(new Error("填空项答案不能为空"))}}catch(e){i.e(e)}finally{i.f()}return Promise.resolve()}}],children:function(e,t,n){var r=t.add,o=t.remove;n.errors;return A.current=r,I.current=o,(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(m.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24}}),e.map((function(e,t){var n=e.key,r=e.name,o=P()(e,je);return(0,R.jsxs)(_.Z,{align:"top",wrap:!1,children:[(0,R.jsxs)(j.Z,{flex:"0 0 auto",className:"".concat(ve.blankIndex," pt5"),children:["填空项",t+1]}),(0,R.jsxs)(j.Z,{flex:1,children:[(0,R.jsxs)(_.Z,{align:"top",justify:"space-between",wrap:!1,children:[(0,R.jsx)(j.Z,{flex:1,children:(0,R.jsx)(m.Z.Item,s()(s()({},o),{},{name:[r,"answer_text"],noStyle:!0,children:(0,R.jsx)(Ne,{removeBlank:D,position:t+1})}))}),(null==i?void 0:i.getFieldValue(["sub_item_banks"].concat(u()(a))))&&(0,R.jsx)(j.Z,{flex:"224px",style:{margin:"-2px 0px 0px 20px"},children:(0,R.jsx)(m.Z.Item,s()(s()({},o),{},{name:[r,"score"],label:"分值",rules:[{required:!0}],className:ve.blankInputNumberWrapper,children:(0,R.jsx)(x.Z,{className:ve.blankInput,min:.1,max:100,style:{width:"100%"},placeholder:"按空给分请输入分值"})}))})]}),(0,R.jsx)(m.Z.Item,s()(s()({},o),{},{name:[r,"position"],noStyle:!0,children:(0,R.jsx)(w.Z,{type:"hidden"})}))]})]},n)}))]})}}),(0,R.jsx)(g.ZP,{className:"mb20",onClick:function(){return Z(1,null==T?void 0:T.length)},type:"primary",shape:"round",children:"新增填空项"}),(0,R.jsxs)(_.Z,{align:"middle",children:[(0,R.jsx)(m.Z.Item,{name:[r,"downcase"],valuePropName:"checked",children:(0,R.jsx)(ae.Z,{})}),(0,R.jsx)(j.Z,{className:"ml10",children:"判分时忽略答案中的字母大小写"})]}),(0,R.jsxs)(_.Z,{align:"middle",children:[(0,R.jsx)(m.Z.Item,{name:[r,"no_space"],valuePropName:"checked",children:(0,R.jsx)(ae.Z,{})}),(0,R.jsx)(j.Z,{className:"ml10",children:"判分时忽略答案中的空格"})]}),(null==T?void 0:T.length)>1&&(0,R.jsxs)(_.Z,{align:"middle",className:(null==T?void 0:T.length)>1?"mb30":"".concat(ve.hide),children:[(0,R.jsx)(m.Z.Item,{name:b,children:(0,R.jsx)(Ee,{})}),(0,R.jsx)(j.Z,{className:"ml10",children:"允许学生每个填空的答案与标准答案的顺序不一致"})]}),(0,R.jsx)("div",{onClick:function(){return N(!0)},children:(0,R.jsx)(m.Z.Item,{name:v,label:"题目解析",labelCol:{span:24},children:(0,R.jsx)(we,{placeholder:"请编辑题目解析(非必填)",isEdit:S})})})]})},Ze=["key","name"],Ie=me()(me()({},"正确","T"),"错误","F"),De=function(e){var t=e.value,n=e.onChange,i=e.form,r=e.choiceKey,o=!0===(null==t?void 0:t.is_answer),a=null==t?void 0:t.choice_text,l=function(){var e,o=null==i||null===(e=i.getFieldValue(["sub_item_banks"].concat(u()(r))))||void 0===e?void 0:e.map((function(e){return{choice_text:null==e?void 0:e.choice_text,is_answer:!1}}));null==i||i.setFieldValue(["sub_item_banks"].concat(u()(r)),o),n(s()(s()({},t),{},{is_answer:!0}))};return(0,R.jsxs)(_.Z,{className:ve.choiceWrap,align:"middle",wrap:!1,children:[(0,R.jsx)(j.Z,{onClick:l,className:"".concat(ve.choiceIndex," ").concat(ve.judgementIndex," ").concat(o?ve.activeAnswer:""),children:Ie[a]}),(0,R.jsx)(j.Z,{flex:1,className:"".concat(ve.editorWrap," ml15"),children:(0,R.jsx)("div",{className:"".concat(ve.inputBorder," ").concat(ve.placeholder," ").concat(o?ve.activeJudgementAnswer:""),children:a})}),(0,R.jsx)(j.Z,{flex:"0 0 auto",className:"ml15",children:(0,R.jsx)("div",{onClick:l,className:"".concat(ve.setAnswerBtn," ").concat(o?ve.activeAnswer:""),children:o?"正确答案":"设为答案"})})]})},Te=function(e){var t=e.questionTitlePlaceholder,n=e.choiceKey,i=void 0===n?"choices":n,r=e.form,o=e.titleKey,a=void 0===o?"name":o,l=e.analysisKey,c=void 0===l?"analysis":l,u=(0,p.useState)(!1),d=h()(u,2),f=d[0],v=d[1];return(0,R.jsxs)("div",{className:ve.wrap,children:[(0,R.jsx)("div",{className:ve.questionTitleEditorWrap,children:(0,R.jsx)(m.Z.Item,{label:"题干",name:a,labelCol:{span:24},rules:[{required:!0}],children:(0,R.jsx)(be,{scrollId:"name",watch:!0,height:140,placeholder:t})})}),(0,R.jsx)(m.Z.Item,{label:"答案选项",required:!0,labelCol:{span:24},children:(0,R.jsx)(m.Z.List,{name:i,rules:[{validator:function(e,t){return t.some((function(e){return!0===(null==e?void 0:e.is_answer)}))?Promise.resolve():Promise.reject(new Error("请设置正确答案"))}}],children:function(e){return(0,R.jsx)("div",{id:"choices",children:e.map((function(e){var t=e.key,n=e.name,o=P()(e,Ze);return(0,p.createElement)(m.Z.Item,s()(s()({},o),{},{key:t,name:n,noStyle:!0}),(0,R.jsx)(De,{form:r,choiceKey:i}))}))})}})}),(0,R.jsx)("div",{onClick:function(){return v(!0)},children:(0,R.jsx)(m.Z.Item,{name:c,label:"题目解析",labelCol:{span:24},children:(0,R.jsx)(we,{placeholder:"请编辑题目解析(非必填)",isEdit:f})})})]})},Pe=["value","onChange"],Me=["key","name"],Le=function(e){var t=e.value,n=e.onChange,i=P()(e,Pe);return(0,R.jsx)(M.Z,s()(s()({},i),{},{defaultValue:null==t?void 0:t[0],onChange:function(e){n([e])}}))},Be=function(e){var t=e.value,n=void 0===t?[]:t,i=e.onClose;return(0,R.jsx)(oe.Z,{closable:!0,onClose:i,className:ve.keywordTag,children:null==n?void 0:n.join(" 或 ")})},Re=function(e){var t=e.questionTitlePlaceholder,n=e.form,i=e.showKeywords,r=e.isMustKeyWords,o=void 0===r?i:r,a=e.titleKey,l=void 0===a?"name":a,c=e.analysisKey,d=void 0===c?"analysis":c,f=e.answerTexts,g=void 0===f?"answer_texts":f,y=e.keywords,C=void 0===y?"keywords":y,k=e.useKeywords,S=void 0===k?"use_keywords":k,N=e.indexs,E=(0,p.useState)(!1),A=h()(E,2),Z=A[0],I=A[1],D=(0,p.useState)(""),T=h()(D,2),M=T[0],L=T[1],B=m.Z.useWatch("sub_item_banks",n),O=(null==B?void 0:B[N])||{},F=O.use_keywords,W=O.score;return console.log(F,W,"itemValues"),(0,R.jsxs)("div",{className:ve.wrap,children:[(0,R.jsx)("div",{className:ve.questionTitleEditorWrap,children:(0,R.jsx)(m.Z.Item,{label:"题干",name:l,labelCol:{span:24},rules:[{required:!0}],children:(0,R.jsx)(be,{scrollId:"name",watch:!0,height:140,placeholder:t})})}),(0,R.jsx)(m.Z.Item,{label:"参考答案",name:g,labelCol:{span:24},children:(0,R.jsx)(Le,{watch:!0,height:140,placeholder:"请编辑参考答案(非必填)"})}),i&&!o&&(0,R.jsx)(m.Z.Item,{hidden:!0,name:S,valuePropName:"checked",children:(0,R.jsx)(ae.Z,{defaultChecked:!0})}),i&&o&&(0,R.jsxs)(_.Z,{align:"middle",className:"mb30",children:[(0,R.jsx)(m.Z.Item,{name:S,valuePropName:"checked",children:(0,R.jsx)(ae.Z,{})}),(0,R.jsx)(j.Z,{className:"ml10",children:"开启关键词自动判分"}),(0,R.jsx)(j.Z,{children:(0,R.jsx)(v.Z,{placement:"right",title:"选中后,需要设置每个关键词的分值,系统会根据设置的关键词进行自动判分; 所有关键词分值之和必须小于等于小题分值。",children:(0,R.jsx)(le.Z,{style:{color:"#3061D0",marginLeft:6,cursor:"pointer"}})})})]}),(F||!o)&&(0,R.jsx)(m.Z.List,{name:C,rules:[{validator:function(e,t){return o?null!=t&&t.length?(null==t?void 0:t.reduce((function(e,t){return e+t.score}),0))>parseFloat(W)?Promise.reject(new Error("所有关键词的分值之和必须小于等于该小题的分值")):Promise.resolve():Promise.reject(new Error("请设置判分关键词")):Promise.resolve()}}],children:function(e,t){var i=t.add,r=t.remove;return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("div",{className:"".concat(ve.title," mb10"),children:o?"关键词":(0,R.jsx)("span",{style:{color:"#9096A3"},children:"判分关键词"})}),(0,R.jsxs)(_.Z,{align:"middle",className:"font14 mb30",children:[(0,R.jsx)(j.Z,{flex:1,children:(0,R.jsx)(w.Z,{value:M,onChange:function(e){L(e.target.value)},maxLength:50,allowClear:!0,onPressEnter:function(e){var t,r,o,a,l,s="".concat(null===(t=e.target)||void 0===t?void 0:t.value),c=null==s||null===(r=s.split("|"))||void 0===r||null===(r=r.filter((function(e){return!!e})))||void 0===r?void 0:r.map((function(e){return null==e?void 0:e.trim()})),d=n.getFieldValue(["sub_item_banks"].concat(u()(C))),h=(null==d||null===(o=d.map((function(e){return null==e?void 0:e.keyword})))||void 0===o?void 0:o.flat())||[],p=re()(c);try{for(p.s();!(a=p.n()).done;){var f=a.value;if(h.includes(f))return void b.ZP.error("为避免判分错误,请勿设置相同的关键词")}}catch(e){p.e(e)}finally{p.f()}(l=s)&&(new RegExp("[ `~!@#$^&*()={}':;,\\[\\].<>/?~@#¥……&*—【】”“。「」『』_\\+\\-·%《》]|[\\\\/]"),"|"!==l||(b.ZP.warning("关键词不能只输入一个“|”字符!"),0))&&(i({keyword:c,score:1}),L(""))},className:ve.inputBorder,placeholder:"支持设置多个关键词;并列关键词(或的关系)请用“|”分隔开"})}),(0,R.jsx)(j.Z,{flex:"148px",style:{textAlign:"right",color:"#e99237"},children:"“回车键”保存关键词"})]}),e.map((function(e){var t=e.key,n=e.name,i=P()(e,Me);return(0,R.jsx)(_.Z,{className:"mb20",style:{marginRight:148},children:(0,R.jsx)(j.Z,{flex:1,children:(0,R.jsxs)(_.Z,{align:"middle",justify:"space-between",children:[(0,R.jsx)(m.Z.Item,s()(s()({},i),{},{name:[n,"keyword"],children:(0,R.jsx)(Be,{onClose:function(){return r(n)}})})),o&&(0,R.jsx)(m.Z.Item,s()(s()({},i),{},{name:[n,"score"],label:"分值",rules:[{required:!0}],className:ve.blankInputNumberWrapper,children:(0,R.jsx)(x.Z,{className:ve.blankInput,min:.1,max:100,precision:1,style:{width:"100%"},placeholder:"请输入关键词分数"})}))]})})},t)}))]})}}),(0,R.jsx)("div",{onClick:function(){return I(!0)},children:(0,R.jsx)(m.Z.Item,{name:d,label:"题目解析",labelCol:{span:24},children:(0,R.jsx)(we,{placeholder:"请编辑题目解析(非必填)",isEdit:Z})})})]})},Oe=["globalSetting","loading","dispatch","editData","onRef","isEdit"],Fe=["key","name"],We=pe.Z.Panel,He=function(e,t){e.globalSetting,e.loading,e.dispatch;var n=e.editData,i=(e.onRef,e.isEdit),o=(P()(e,Oe),(0,p.useState)("")),l=h()(o,2),c=l[0],u=l[1],d=(0,p.useState)([]),f=h()(d,2),g=f[0],y=f[1],x=m.Z.useForm(),w=h()(x,1)[0];(0,p.useEffect)((function(){n&&i&&(u(null==n?void 0:n.name),y(null==n?void 0:n.sub_item_banks),w.setFieldsValue(s()({},n)))}),[n]),(0,p.useEffect)((function(){y(w.getFieldValue("sub_item_banks"))}),[m.Z.useWatch("sub_item_banks",w)]),(0,p.useImperativeHandle)(t,(function(){return{onSave:C,Clear:k}}));var C=function(){var e=a()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c){e.next=3;break}return b.ZP.info("请您输入题干"),e.abrupt("return",!1);case 3:return e.prev=3,e.next=6,w.validateFields();case 6:e.next=13;break;case 8:return e.prev=8,e.t0=e.catch(3),console.log(e.t0,"errInfo"),b.ZP.error(e.t0.errorFields[0].errors[0]),e.abrupt("return",!1);case 13:return t=g.map((function(e){return s()({id:e.id>1?e.id:null},e)})),e.abrupt("return",{name:c,sub_item_banks:t});case 15:case"end":return e.stop()}}),e,null,[[3,8]])})));return function(){return e.apply(this,arguments)}}(),k=function(){u(""),y([])},S={single:"单选题",multiple:"多选题",judgement:"判断题",completion:"填空题",subjective:"简答题",practical:"实训题",program:"编程题",bprogram:"程序填空题",combination:"组合题"},j=function(e){var t=e.value;return(0,R.jsx)("div",{style:{textAlign:"center",color:"#DF3065",margin:"0 5px"},children:t})},N=(0,p.useState)(),E=h()(N,2),A=E[0],Z=E[1];return(0,R.jsxs)("section",{className:B.wrap,children:[(0,R.jsxs)("p",{className:B.titleWrap,children:[(0,R.jsx)("span",{className:B.required,children:"*"}),(0,R.jsx)("span",{className:B.title,children:"题干:"})]}),(0,R.jsx)(M.Z,{id:"combination-question-title",watch:!0,height:155,placeholder:"请您输入题干",defaultValue:c,onChange:function(e){return u(e)}}),(0,R.jsx)(m.Z,{form:w,autoComplete:"off",children:(0,R.jsx)(m.Z.List,{name:"sub_item_banks",rules:[{validator:function(e,t){return t?Promise.resolve():Promise.reject(new Error("请添加小题"))}}],children:function(e,t){t.add,t.remove;var n=w.getFieldValue("sub_item_banks");return(0,R.jsx)(R.Fragment,{children:(0,R.jsx)(pe.Z,{className:e.length>0?B.collapseWrapper:"",bordered:!1,expandIcon:function(e){var t=e.isActive;return(0,R.jsx)("i",{className:"iconfont icon-weizhankai ".concat(t?B.open:B.close),style:{fontSize:14,transition:"all .2s"}})},children:e.map((function(e,t){var i,r,o,a,l,c,u,d,h,p,f,g,y=e.key,x=e.name,b=P()(e,Fe);return(0,R.jsx)(We,{className:B.panel,forceRender:!0,header:(0,R.jsxs)("div",{className:B.panelHeader,children:["第",t+1,"小题",(0,R.jsxs)("span",{children:["",S[null==n||null===(i=n[x])||void 0===i?void 0:i.item_type],""]})]}),extra:(0,R.jsxs)(_.Z,{align:"middle",onClick:function(e){return e.stopPropagation()},style:{display:"flex",alignItems:"center"},children:["completion"==(null==n||null===(r=n[x])||void 0===r?void 0:r.item_type)&&(0,R.jsx)(m.Z.Item,s()(s()({},b),{},{name:[x,"score"],className:B.blankInputNumberWrapper,style:{marginBottom:0},children:"completion"==(null==n||null===(o=n[x])||void 0===o?void 0:o.item_type)&&(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center",color:"#191919"},children:["共",(0,R.jsx)(j,{value:null==n||null===(a=n[x])||void 0===a?void 0:a.score}),"分"]})})),"completion"==(null==n||null===(l=n[x])||void 0===l?void 0:l.item_type)&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(H.ZP.Group,{defaultValue:null==n||null===(c=n[x])||void 0===c?void 0:c.use_blank_score,className:B.scoreByBlankRadio,style:{marginRight:10},optionType:"button",options:[{label:"按空给分",value:!0},{label:"按题给分",value:!1}],onChange:function(e){var t;console.log(w.getFieldsValue()),null==w||w.setFieldValue(["sub_item_banks",x,"use_blank_score"],null==e||null===(t=e.target)||void 0===t?void 0:t.value),Z(new Date)}}),(0,R.jsx)(v.Z,{overlayInnerStyle:{width:460},title:(0,R.jsxs)("div",{children:["按空给分:需要分别设置每个填空项的分值,填空项答对之后则获得对应的分值。",(0,R.jsx)("br",{}),"按题给分:答对全部填空项之后才能获得该小题的分值。"]}),children:(0,R.jsx)("i",{className:"icon-tishixiaowenhao font18 c-3061d0"})})]})]}),children:(0,R.jsxs)(m.Z.Item,s()(s()({},b),{},{name:x,children:[("single"==(null==n||null===(u=n[x])||void 0===u?void 0:u.item_type)||"multiple"==(null==n||null===(d=n[x])||void 0===d?void 0:d.item_type))&&(0,R.jsx)(_e,{questionTitlePlaceholder:"请编辑选择题题干内容",allowChangeMode:"single"!=(null==n||null===(h=n[x])||void 0===h?void 0:h.item_type),form:w,choiceKey:[x,"choices"],titleKey:[x,"name"],analysisKey:[x,"analysis"],choiceOptionsPath:["sub_item_banks",x,"choices"],choiceTextKey:"choice_text",answerKey:"is_answer"}),"completion"==(null==n||null===(p=n[x])||void 0===p?void 0:p.item_type)&&(0,R.jsx)(Ae,{form:w,name:x,questionTitlePlaceholder:"请编辑题干,您可以用任意字符表示填空项",scoreByBlank:[x,"use_blank_score"],titleKey:[x,"name"],analysisKey:[x,"analysis"],isOrdered:[x,"is_ordered"],answerKey:[x,"standard_answer"]},A),"judgement"==(null==n||null===(f=n[x])||void 0===f?void 0:f.item_type)&&(0,R.jsx)(Te,{form:w,questionTitlePlaceholder:"请编辑判断题题干内容",titleKey:[x,"name"],analysisKey:[x,"analysis"],choiceKey:[x,"choices"]}),"subjective"==(null==n||null===(g=n[x])||void 0===g?void 0:g.item_type)&&(0,R.jsx)(Re,{showKeywords:!0,form:w,titleKey:[x,"name"],analysisKey:[x,"analysis"],answerTexts:[x,"answer_texts"],useKeywords:[x,"use_keywords"],keywords:[x,"keywords"],indexs:x,questionTitlePlaceholder:"请编辑简答题题干内容"})]}))},y)}))})})}})})]})},ze=(0,A.connect)((function(e){var t=e.loading;return{globalSetting:e.globalSetting,loading:t.effects}}),null,null,{forwardRef:!0})((0,p.forwardRef)(He)),Ge=n(59167),Ve=n(17149),Ke=n(82326),Ue=n(54172),qe="challengeNameWrapper___SpiRb",Ye="challengeName___lmQe2",Xe="shixunPreviewFooter___u0CzD",Je="shixunInfoWrapper___HzLHD",Qe="shixunInfo___qaQlF",$e="btnToDetail___scXqr",et="title___cQWdZ",tt=n(38049),nt=n(66047),it=n(21204),rt=n(82927),ot=n(37286),at=n(84698),lt=function(e){var t=e.open,n=e.onCancel,i=e.onOk,r=(0,nt.g)(),o=(0,rt.U)(it.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),a=h()(o,4),l=a[0],s=a[1],c=a[2],u=a[3],d=(0,p.useState)(!1),f=h()(d,2),m=f[0],x=f[1];(0,p.useEffect)((function(){t&&c({page:1,limit:10,type:0},!0).then((function(e){0===(null==e?void 0:e.shixuns_count)&&x(!0)}))}),[t]);var b=(0,p.useState)([]),w=h()(b,2),C=w[0],k=w[1],S=(0,p.useState)([]),N=h()(S,2),A=N[0],I=N[1];return(0,R.jsxs)(y.Z,{title:"选择实训题",open:t,width:948,centered:!0,closable:!0,onCancel:n,onOk:function(){return i(A)},destroyOnClose:!0,children:[(0,R.jsxs)(_.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650},children:[(0,R.jsxs)(j.Z,{children:[(0,R.jsx)(Ve.Z,{style:{width:160},size:"large",placeholder:"请选择方向&课程",options:r,onChange:function(e){c({page:1,discipline_id:null==e?void 0:e[0],sub_discipline_id:null==e?void 0:e[1]})}}),(0,R.jsx)(Ke.default,{className:"ml20",style:{width:118},size:"large",placeholder:"难度",allowClear:!0,options:[{label:"初级",value:1},{label:"中级",value:2},{label:"中高级",value:3},{label:"高级",value:4}],onChange:function(e){return c({page:1,diff:e})}}),(0,R.jsx)(Ke.default,{className:"ml20",placeholder:"全部状态",style:{width:118},size:"large",allowClear:!0,options:[{label:"未发布",value:"unpublish"},{label:"静默发布",value:"silent_publish"},{label:"公开发布",value:"public_publish"}],onChange:function(e){return c({page:1,shixun_publish_status:e})}})]}),(0,R.jsx)(tt.t7,{placeholder:"请输入关键词搜索",style:{width:290},onChange:function(e){c({keyword:e,page:1})}})]}),m?(0,R.jsx)("div",{children:(0,R.jsx)(ot.Z,{customText:"暂无数据",ButtonText:"前往实践项目库,添加更多试题>",ButtonClick:function(){return(0,Z.xg)("/shixuns")}})}):(0,R.jsx)(Ue.Z,{loading:s,rowKey:"id",columns:[{title:"试题名称",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:function(e,t){return(0,R.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,R.jsx)("div",{className:null!=t&&t.high_resources_consume?et:"",title:e||"--",children:(0,R.jsx)(E.Z,{showLines:1,showTextOnly:!0,value:e||"--"},1)}),(null==t?void 0:t.high_resources_consume)&&(0,R.jsx)(at.Z,{type:"shixun",style:{marginLeft:10}})]})}},{title:"难度",dataIndex:"level"},{title:"关卡数量",dataIndex:"challenges_count",key:"challenges_count",render:function(e,t,n){return(0,R.jsx)("span",{children:e||"- -"})}},{title:"使用次数",dataIndex:"study_count"},{title:(0,R.jsxs)("span",{children:["发布状态 ",(0,R.jsx)(v.Z,{title:"未发布的实践项目不能被选用",children:(0,R.jsx)(le.Z,{})})]}),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:function(e,t,n){return(0,R.jsx)("span",{children:e||"- -"})}},{title:"操作",render:function(e,t){var n=t||{},i=n.title,r=n.challenge_names,o=n.author_name,a=n.identifier,l=n.author_school_name,s=n.study_count;return(0,R.jsxs)("div",{children:[(0,R.jsx)("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:function(){y.Z.confirm({title:"题目详情",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:(0,R.jsxs)("div",{children:[(0,R.jsx)(E.Z,{value:i,style:{marginBottom:18}}),(0,R.jsx)("div",{className:qe,children:r.map((function(e,t){return(0,R.jsxs)("div",{className:Ye,children:["第",(0,Z.EM)(t+1),"题 ",e]},t)}))}),(0,R.jsxs)(_.Z,{className:Xe,justify:"space-between",style:{alignItems:"center"},children:[(0,R.jsxs)(j.Z,{className:Je,children:[(0,R.jsx)("span",{children:"创建者"}),(0,R.jsx)("span",{className:Qe,children:o.split("、")[0]}),(0,R.jsx)("span",{children:"所属单位"}),(0,R.jsx)("span",{className:Qe,children:l}),(0,R.jsx)("span",{children:"学习人数"}),(0,R.jsx)("span",{className:Qe,children:s})]}),(0,R.jsxs)(g.ZP,{type:"primary",className:$e,onClick:function(){return(0,Z.xg)("/shixuns/".concat(a,"/challenges?exercise=true"))},children:[(0,R.jsx)("i",{className:"iconfont icon-shixunkecheng"}),"实训详情"]})]})]})})},children:"查看"}),1===(null==t?void 0:t.shixun_tag_num)&&(0,R.jsx)("a",{target:"_blank",href:"/shixuns/".concat(null==t?void 0:t.identifier,"/challenges"),style:{marginLeft:10},children:"去发布"})]})}}],dataSource:null==u?void 0:u.items,rowSelection:{type:"radio",selectedRowKeys:C,preserveSelectedRowKeys:!0,getCheckboxProps:function(e){return{disabled:1===e.shixun_tag_num}},onChange:function(e,t){console.log(e),k(e);var n,i=[],r=re()(A);try{for(r.s();!(n=r.n()).done;){var o=n.value;e.includes(o.id)&&i.push(o)}}catch(e){r.e(e)}finally{r.f()}var a,l=i.map((function(e){return e.id})),s=re()(t);try{for(s.s();!(a=s.n()).done;){var c,u,d,h=a.value;if(h&&e.includes(h.id)&&!l.includes(h.id))i.push({id:h.id,difficulty:h.level,identifier:h.identifier,name:h.name,real_name:null==h||null===(c=h.author_name)||void 0===c?void 0:c.split("、")[0],school_name:h.author_school_name,challenge_names:h.challenge_names,challenges:null===(u=h.challenge_names)||void 0===u?void 0:u.map((function(e,t){return{subject:e,id:t,score:5}})),score:5*(null===(d=h.challenge_names)||void 0===d?void 0:d.length),study_count:h.study_count,challenges_count:h.challenges_count})}}catch(e){s.e(e)}finally{s.f()}I(i)}},pagination:{current:l.page,pageSize:l.limit,total:null==u?void 0:u.items_count,showTotal:function(e){return(0,R.jsxs)("span",{children:["共 ",(0,R.jsx)("span",{style:{color:"#165DFF"},children:e})," 条数据"]})},showQuickJumper:!0,onChange:function(e,t){c({page:e,limit:t})},size:"default"},scroll:{y:400}})]})},st=n(24906),ct=n(61047),ut=function(e){var t=e.visible,n=e.getdata,i=e.onCancel,o=e.onRandomExchange,l=e.selectFromProblemSet,s=e.questionParams,c=(0,p.useState)(!1),d=h()(c,2),f=d[0],m=d[1],v=(0,p.useState)(!1),x=h()(v,2),w=x[0],C=x[1],k=(0,p.useState)({}),S=h()(k,2),j=S[0],N=S[1],E=(0,A.useParams)(),Z=(0,p.useState)(),D=h()(Z,2),T=D[0],P=D[1],M=function(){var e=a()(r()().mark((function e(t,o){var a;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return C(!0),e.next=3,(0,I.ZP)("/api/exercises/".concat(E.categoryId,"/toggle_random_question.json"),{method:"post",body:{question_id:s.id,item_bank_id:t,shixuns_info:[{id:t,is_copy:1!=o,is_use:1!=o}]}});case 3:return a=e.sent,C(!1),null!=a&&a.status||(b.ZP.info("换题成功"),i(),n()),e.abrupt("return");case 7:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,R.jsxs)(y.Z,{title:"请选择替换方式",open:t,onCancel:i,centered:!0,maskClosable:!0,footer:null,children:[(0,R.jsxs)(_.Z,{justify:"center",className:"pb20",children:[(0,R.jsx)(Ge.Z,{onClick:o,children:"随机更换"}),"PRACTICAL"!==(null==s?void 0:s.type)&&(0,R.jsx)(g.ZP,{style:{marginLeft:24},onClick:l,children:"从题库中选择"}),"PRACTICAL"===(null==s?void 0:s.type)&&(0,R.jsx)(g.ZP,{style:{marginLeft:24},onClick:function(){m(!0)},children:"从题库中选择"})]}),(0,R.jsx)(lt,{open:f,onCancel:function(){return m(!1)},onOk:function(){var e=a()(r()().mark((function e(t){var n,i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("----selectedRows",t,E),!((null==t?void 0:t.length)<=0)){e.next=4;break}return b.ZP.info("请选择实训"),e.abrupt("return");case 4:return n=null==t?void 0:t.map((function(e){return null==e?void 0:e.id})),e.next=7,(0,ct.Tr)({id:u()(n),course_id:E.coursesId,type:"shixun"});case 7:0===(null==(i=e.sent)?void 0:i.student_count)?M(null==n?void 0:n[0],1):(P(n),N(i)),m(!1);case 10:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),(0,R.jsx)(st.Z,{resdata:j,type:"shixun",okloading:w,oktext:0===(null==j?void 0:j.can_copy_num)?"确定":"一键复制并替换",onok:function(){var e=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:M(null==T?void 0:T[0],2);case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()})]})},dt=n(66612),ht=n(24334),pt=n(80552),ft=n(55265),mt=n(38916),vt=n(40189),gt=(0,A.connect)((function(e){return{classroomList:e.classroomList}}))((function(e){var t,n,i,o,l,c,d,T,P,M,L,B=e.data,O=e.submit,F=e.goBack,H=(e.loading,e.onTypeScore),z=e.editPreview,G=void 0!==z&&z,K=e.onSkipExamination,U=e.selectValue,Y=e.onExchange,X=e.getdata,J=e.handleMarkWrongQuestion,$=e.dispatch,ee=(0,p.useRef)(),te=(0,p.useState)(null),ie=h()(te,2),re=ie[0],oe=ie[1],ae=(0,p.useState)(!1),le=h()(ae,2),se=le[0],ce=le[1],ue=(0,p.useState)(!1),de=h()(ue,2),pe=de[0],fe=de[1],me=(0,p.useRef)(),ve=m.Z.useForm(),ge=h()(ve,1)[0],ye=(0,A.useParams)(),xe=(0,p.useState)(!1),be=h()(xe,2),we=be[0],Ce=(be[1],(0,p.useState)([])),ke=h()(Ce,2),Se=ke[0],_e=ke[1];(0,p.useEffect)((function(){ce(!0)}),[]),(0,p.useEffect)((function(){G||(0,Z.Dk)("试卷预览")}),[G]),(0,p.useEffect)((function(){var e;(null==B||null===(e=B.questionList)||void 0===e?void 0:e.length)>0&&(null==B||B.questionList.forEach((function(e){var t;"PRACTICAL"===e.type&&(null==e||null===(t=e.questions)||void 0===t||t.forEach((function(e,t){var n;Se[t]=!(null!=e&&null!==(n=e.shixun)&&void 0!==n&&n.ignore_prompt),_e(u()(Se))})))})))}),[B]);var je=["容易","简单","适中","困难"],Ne={SINGLE:"单选题",MULTIPLE:"多选题",JUDGMENT:"判断题",COMPLETION:"填空题",SUBJECTIVE:"简答题",PRACTICAL:"实训题",PROGRAM:"编程题",BPROGRAM:"程序填空题",COMBINATION:"组合题"},Ee={single:"单选题",multiple:"多选题",judgement:"判断题",completion:"填空题",subjective:"简答题",practical:"实训题",program:"编程题",bprogram:"程序填空题",combination:"组合题"},Ae=function(e,t){var n,i=null==e||null===(n=e.standard_answer)||void 0===n?void 0:n.map((function(e,t){var n;return(0,R.jsx)("div",{children:"答案(填空".concat(null==e?void 0:e.position,"").concat(null==e||null===(n=e.answer_text)||void 0===n?void 0:n.join("、"))},t)}));return(0,R.jsx)(p.Fragment,{children:(0,R.jsxs)("div",{className:f.analysis,children:[(0,R.jsxs)("div",{style:{display:"flex"},children:[(0,R.jsx)("div",{children:"正确答案:"}),(0,R.jsx)("div",{children:i})]}),(0,R.jsxs)("aside",{children:[(0,R.jsx)("span",{className:f.text,children:"解析:"}),(0,R.jsx)(E.Z,{value:e.analysis?e.analysis:"暂无解析"})]}),(0,R.jsxs)("ul",{children:[(0,R.jsxs)("li",{children:[(0,R.jsx)("span",{style:{color:"#007AFF",marginRight:10},children:"课程:"}),"".concat((null==t?void 0:t.course_discipline_name)||"--")]}),(0,R.jsx)(v.Z,{title:t?null==t?void 0:t.tag_discipline_name:null==e?void 0:e.tag_discipline_name,children:(0,R.jsxs)("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[(0,R.jsx)("span",{style:{color:"#5AB891",marginRight:10},children:"知识点:"}),t?null==t?void 0:t.tag_discipline_name:null==e?void 0:e.tag_discipline_name]})})]})]})})},Ze=function(e){var t,n=null==e||null===(t=e.standard_answer)||void 0===t?void 0:t.map((function(e,t){return(0,R.jsx)("div",{children:"答案(填空".concat((null==e?void 0:e.position)||(null==e?void 0:e.exercise_choice_id),"").concat(null==e?void 0:e.answer_text)},t)}));return(0,R.jsx)(p.Fragment,{children:(0,R.jsxs)("div",{className:f.analysis,children:[(0,R.jsxs)("div",{style:{display:"flex"},children:[(0,R.jsx)("div",{children:"正确答案:"}),(0,R.jsx)("div",{children:n})]}),(0,R.jsxs)("aside",{children:[(0,R.jsx)("span",{className:f.text,children:"解析:"}),(0,R.jsx)(E.Z,{value:e.analysis?e.analysis:"暂无解析"})]}),(0,R.jsxs)("ul",{children:[(0,R.jsxs)("li",{children:[(0,R.jsx)("span",{style:{color:"#007AFF",marginRight:10},children:"课程:"}),"".concat((null==e?void 0:e.course_discipline_name)||"--")]}),(0,R.jsx)(v.Z,{title:null==e?void 0:e.tag_discipline_name,children:(0,R.jsxs)("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[(0,R.jsx)("span",{style:{color:"#5AB891",marginRight:10},children:"知识点:"}),null==e?void 0:e.tag_discipline_name]})})]})]})})},Ie=function(e,t){var n;return(0,R.jsxs)("div",{className:f.analysis,children:[(0,R.jsxs)("div",{children:["正确答案:",null==e||null===(n=e.answer_texts)||void 0===n?void 0:n[0]]}),(0,R.jsxs)("aside",{children:[(0,R.jsx)("span",{className:f.text,children:"解析:"}),(0,R.jsx)(E.Z,{value:e.analysis?e.analysis:"暂无解析"})]}),(0,R.jsxs)("ul",{children:[(0,R.jsxs)("li",{children:[(0,R.jsx)("span",{style:{color:"#007AFF",marginRight:10},children:"课程:"}),"".concat((null==t?void 0:t.course_discipline_name)||"--")]}),(0,R.jsx)(v.Z,{title:t?null==t?void 0:t.tag_discipline_name:null==e?void 0:e.tag_discipline_name,children:(0,R.jsxs)("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[(0,R.jsx)("span",{style:{color:"#5AB891",marginRight:10},children:"知识点:"}),t?null==t?void 0:t.tag_discipline_name:null==e?void 0:e.tag_discipline_name]})})]})]})},De=function(e){var t,n;return(0,R.jsxs)("div",{className:f.analysis,children:[(0,R.jsxs)("aside",{children:[(0,R.jsx)("span",{className:f.text,children:"预期输出:"}),(0,R.jsx)(E.Z,{value:null==e||null===(t=e.program_attr)||void 0===t?void 0:t.description})]}),(0,R.jsxs)("div",{style:{marginTop:20},children:["正确答案:",(null==e||null===(n=e.program_attr)||void 0===n?void 0:n.answer_text)||"--"]}),(0,R.jsxs)("aside",{children:[(0,R.jsx)("span",{className:f.text,children:"解析:"}),(0,R.jsx)(E.Z,{value:e.analysis?e.analysis:"暂无解析"})]}),(0,R.jsxs)("ul",{children:[(0,R.jsxs)("li",{children:[(0,R.jsx)("span",{style:{color:"#007AFF",marginRight:10},children:"课程:"}),"".concat((null==e?void 0:e.course_discipline_name)||"--")]}),(0,R.jsx)(v.Z,{title:null==e?void 0:e.tag_discipline_name,children:(0,R.jsxs)("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[(0,R.jsx)("span",{style:{color:"#5AB891",marginRight:10},children:"知识点:"}),null==e?void 0:e.tag_discipline_name]})})]})]})},Te=function(e){var t,n;return(0,R.jsxs)("div",{style:{marginTop:"12px"},children:[null==e||null===(t=e.shixun)||void 0===t||null===(t=t.challenges)||void 0===t?void 0:t.map((function(e,t){return(0,R.jsxs)("div",{className:"c-grey-666 font14 mb10 ml25",style:{display:"flex",alignItems:"center",justifyContent:"space-between"},children:[(0,R.jsxs)("div",{children:[(0,R.jsxs)("span",{className:"mr5",children:["第",t+1,"关"]}),(0,R.jsx)(v.Z,{title:null==e?void 0:e.challenge_name,children:(0,R.jsx)("span",{children:(0,Z.Pq)(null==e?void 0:e.challenge_name,44)})},t)]}),G&&(0,R.jsxs)("div",{children:["分值:",e.score,"分"]})]})})),(0,R.jsx)(A.Link,{style:{float:"right"},target:"_blank",to:"/shixuns/".concat(null==e||null===(n=e.shixun)||void 0===n?void 0:n.identifier,"/challenges"),children:"实训详情"}),(0,R.jsx)("div",{style:{clear:"both"}})]})},Pe=function(){var e,t="";y.Z.confirm({icon:null,centered:!0,title:"保存试卷",content:(0,R.jsxs)("div",{className:f.modalColumn,children:[(0,R.jsxs)("div",{style:{color:"#676A6C",display:"flex",alignItems:"center"},className:"font14 mt20",children:[(0,R.jsx)("img",{style:{marginRight:5},src:D.Z}),"保存后单独生成一份人工组卷类型的固定试卷。"]}),(0,R.jsxs)("div",{className:f.modalRow,style:{marginTop:20},children:[(0,R.jsx)("sup",{className:f.sup,children:"*"}),(0,R.jsx)("span",{style:{flexShrink:0},children:"试卷名称:"}),(0,R.jsx)(w.Z,{placeholder:"请输入试卷名称",min:0,maxLength:60,defaultValue:t,onChange:function(e){t=e.target.value}})]})]}),okText:"确认",cancelText:"取消",onOk:(e=a()(r()().mark((function e(){var n,i,o,a,l,s;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t){e.next=3;break}return b.ZP.warning("试卷名称不能为空"),e.abrupt("return",Promise.reject());case 3:return i=[],o=[],a=[],l=[],null==B||null===(n=B.questionList)||void 0===n||n.forEach((function(e){var t;null===(t=e.questions)||void 0===t||t.forEach((function(t){var n=e.questions_score/e.questions_count;n=n&&n.toFixed(1),"COMBINATION"===e.type&&a.push({id:t.id,sub_item_bank_ids:t.sub_item_banks.map((function(e){return e.id}))}),"PRACTICAL"===e.type?l.push(t.id):(i.push(t.id),o.push(n))}))})),console.log("-----",a),s={item_bank_ids:i,item_bank_scores:o,name:t,combination_item_banks:a,shixun_ids:l},e.next=12,O(s);case 12:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},Me=function(e){console.log(e,"key"),K(e-1)},Le=function(e,t){if("SINGLE"===t)return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ne,{ref:ee,editData:e,isEdit:!0}),(0,R.jsx)(C.Z,{})]});if("MULTIPLE"===t)return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(Q,{ref:ee,editData:e,isEdit:!0}),(0,R.jsx)(C.Z,{})]});if("JUDGMENT"===t)return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(V,{ref:ee,editData:e,isEdit:!0}),(0,R.jsx)(C.Z,{})]});if("COMPLETION"===t)return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(W,{ref:ee,editData:e,isEdit:!0}),(0,R.jsx)(C.Z,{})]});if("SUBJECTIVE"===t)return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(he,{ref:ee,editData:e,isEdit:!0}),(0,R.jsx)(C.Z,{})]});if("COMBINATION"===t)return(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(ze,{ref:ee,editData:e,isEdit:!0}),(0,R.jsx)(C.Z,{})]});var n,i;if("BPROGRAM"===t)return(0,R.jsx)(R.Fragment,{children:(0,R.jsxs)(m.Z,{form:ge,style:{marginTop:20},onFinishFailed:function(e){var t;e.errorFields[0].name.includes("standard_answers")?b.ZP.error("填空项答案不能为空"):b.ZP.error(e.errorFields[0].errors[0]),ge.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"})},onFinish:function(){var t=a()(r()().mark((function t(n){var i,o,a;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=s()(s()({question_score:e.score},n),{},{question_type:8,hack:s()(s()({},n.hack),{},{difficult:e.program_attr.difficult}),hack_codes:s()(s()({},n.hack_codes),{},{code:ht.Base64.encode(null===(i=n.hack_codes)||void 0===i?void 0:i.code)})}),we&&(o.is_cover=1),t.next=4,(0,I.ZP)("/api/exercise_questions/".concat(e.id,".json"),{method:"put",body:o});case 4:0===(null==(a=t.sent)?void 0:a.status)&&(b.ZP.success("编辑成功"),Me(U+1)),oe(null);case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),children:[(0,R.jsx)(dt.tc,{form:ge,questionTitlePlaceholder:"请编辑题干并设置填空项",scoreByBlank:!1,hackidentifier:null==e||null===(n=e.program_attr)||void 0===n?void 0:n.identifier,answerKey:"standard_answers"}),(0,R.jsx)(C.Z,{})]})});"PROGRAM"===t&&A.history.push("/problems/".concat(null==e||null===(i=e.program_attr)||void 0===i?void 0:i.identifier,"/edit?type=exercises&express_id=").concat(ye.categoryId,"&question_id=").concat(null==e?void 0:e.id,"&score=").concat(null==e?void 0:e.score,"&callback_url=").concat(location.pathname,"&select=").concat(U,"&exercise=true"));return"PRACTICAL"===t?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(q,{ref:ee,editData:e,isEdit:!0}),(0,R.jsx)(C.Z,{})]}):void 0},Be=function(){var e=a()(r()().mark((function e(t,n){var i,o,a,l,c,u,d,h,p,f,m,v,g,x,w,C,k;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,null===(i=ee.current)||void 0===i?void 0:i.onSave();case 2:if(o=e.sent){e.next=5;break}return e.abrupt("return");case 5:if(a=function(e){var t=e.map((function(e){return e.choice_text.trim().replace(/^\s+|\s+$/g,"")}));return new Set(t).size!==t.length},l={question_score:n.score,analysis:o.analysis},"SINGLE"!==t&&"MULTIPLE"!==t&&"JUDGMENT"!==t){e.next=18;break}if("JUDGMENT"===t||!a(null==o?void 0:o.choices)){e.next=11;break}return b.ZP.error("选择题选项内容不能重复,请修改后再保存"),e.abrupt("return");case 11:u=[],d=[],l.question_type="JUDGMENT"===t?2:1,l.question_title=null==o?void 0:o.name,null==o||null===(c=o.choices)||void 0===c||c.forEach((function(e,t){u.push(e.choice_text),null!=e&&e.is_answer&&d.push(t+1)})),l.question_choices=u,l.standard_answers=d;case 18:if("COMPLETION"!==t){e.next=36;break}if(!((null==(m=null==o||null===(h=o.standard_answers)||void 0===h?void 0:h.map((function(e,t){return Number(null==e?void 0:e.score)?null:t+1})).filter((function(e){return null!==e})))?void 0:m.length)>0)){e.next=23;break}return b.ZP.warning("第".concat(m.join("、"),"项的分值不能为空")),e.abrupt("return",!1);case 23:if(v=null==o||null===(p=o.standard_answers)||void 0===p?void 0:p.reduce((function(e,t){return e+(Number(null==t?void 0:t.score)||0)}),0),parseFloat(v.toFixed(2))==(null==l?void 0:l.question_score)){e.next=27;break}return b.ZP.warning("各填空项分值之和必须等于该小题分值!"),e.abrupt("return",!1);case 27:l.is_ordered=o.is_ordered,l.question_title=null==o?void 0:o.name,l.use_blank_score=null==o?void 0:o.use_blank_score,l.question_type=3,g=[],null==o||null===(f=o.standard_answers)||void 0===f||f.forEach((function(e,t){g.push({choice_id:e.position,answer_text:e.answer_text,score:e.score})})),l.standard_answers=g,l.downcase=null==o?void 0:o.downcase,l.no_space=null==o?void 0:o.no_space;case 36:if("SUBJECTIVE"===t&&(console.log("editorData"),console.log(o),l.question_title=null==o?void 0:o.name,l.question_type=4,l.answer_texts=null==o?void 0:o.answer_texts,l.use_keywords=null==o?void 0:o.use_keywords,l.keywords=null==o?void 0:o.keywords),"COMBINATION"!==t){e.next=49;break}l.question_title=null==o?void 0:o.name,l.question_type=7,e.prev=40,l.sub_questions=null==o||null===(x=o.sub_item_banks)||void 0===x?void 0:x.map((function(e,t){if("single"==(null==e?void 0:e.item_type)||"multiple"==(null==e?void 0:e.item_type)){var n;if(a(null==e?void 0:e.choices))throw new Error("第".concat(t+1,"小题选项内容重复,请修改后再保存"));var i=[],r=[];return null==e||null===(n=e.choices)||void 0===n||n.forEach((function(e,t){i.push(e.choice_text),null!=e&&e.is_answer&&r.push(t+1)})),{id:e.id,question_id:e.id,question_title:e.name,difficulty:e.difficulty,question_type:"single"==(null==e?void 0:e.item_type)?0:"multiple"==(null==e?void 0:e.item_type)?1:2,question_choices:i,standard_answers:r,analysis:e.analysis,question_score:null==e?void 0:e.score}}if("completion"==(null==e?void 0:e.item_type)){var o,l,s=null==e||null===(o=e.standard_answer)||void 0===o?void 0:o.reduce((function(e,t){return e+(Number(null==t?void 0:t.score)||0)}),0);if(parseFloat(s.toFixed(2))!=(null==e?void 0:e.score))throw new Error("各填空项分值之和必须等于该小题分值!");var c=[];return null==e||null===(l=e.standard_answer)||void 0===l||l.forEach((function(e,t){c.push({choice_id:e.position,answer_text:e.answer_text,score:e.score})})),{id:e.id,question_id:e.id,is_ordered:e.is_ordered,question_title:e.name,difficulty:e.difficulty,question_type:3,standard_answers:c,use_blank_score:e.use_blank_score,analysis:e.analysis,downcase:null==e?void 0:e.downcase,no_space:null==e?void 0:e.no_space,question_score:null==e?void 0:e.score}}if("subjective"==(null==e?void 0:e.item_type))return{id:e.id,question_id:e.id,question_title:e.name,question_type:4,difficulty:e.difficulty,answer_texts:null==e?void 0:e.answer_texts,analysis:e.analysis,question_score:null==e?void 0:e.score,use_keywords:e.use_keywords,keywords:null==e?void 0:e.keywords}})),e.next=48;break;case 44:return e.prev=44,e.t0=e.catch(40),b.ZP.warning(e.t0.message),e.abrupt("return");case 48:delete l.analysis;case 49:if(w=!1,1!==(null==n?void 0:n.is_my)){e.next=55;break}return e.next=53,new Promise((function(e,t){y.Z.confirm({title:"提示",content:"此题目已存在于试题库,是否将修改后的题目覆盖试题库的原题?",okText:"覆盖原题",cancelText:"不覆盖",keyboard:!1,onOk:function(){e(!0)},onCancel:function(){e(!1)}})}));case 53:C=e.sent,w=C;case 55:if(w&&(l.is_cover=1),"PRACTICAL"===t){e.next=62;break}return e.next=59,(0,I.ZP)("/api/exercise_questions/".concat(n.id,".json"),{method:"put",body:l});case 59:e.t1=e.sent,e.next=65;break;case 62:return e.next=64,(0,I.ZP)("/api/exercise_questions/".concat(n.id,"/update_shixun_score.json"),{method:"post",body:s()({},o)});case 64:e.t1=e.sent;case 65:0===(null==(k=e.t1)?void 0:k.status)&&(b.ZP.success("编辑成功"),Me(U+1),oe(null));case 67:case"end":return e.stop()}}),e,null,[[40,44]])})));return function(t,n){return e.apply(this,arguments)}}(),Re=function(){var e=a()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(0,A.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!0,text:"正在更新试卷,请稍后..."}}),e.next=3,(0,I.ZP)("/api/exercises/".concat(ye.categoryId,"/sync_random_question.json"),{method:"post"});case 3:if(0!==e.sent.status){e.next=8;break}return e.next=7,K(U);case 7:b.ZP.success("更新成功");case 8:(0,A.getDvaApp)()._store.dispatch({type:"globalSetting/setGlobalLoading",payload:{show:!1}});case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Oe=function(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n.value,o=[],l=[],s=null==i||null===(e=i.choices)||void 0===e?void 0:e.map((function(e,t){var n=t+1;return null!=e&&e.is_answer&&(o.push(n),l.push(n)),{value:n,label:(0,R.jsx)(E.Z,{className:"c-black font14",value:"".concat(null===mt.k4||void 0===mt.k4?void 0:mt.k4[t],". ").concat(null==e?void 0:e.choice_text)}),disabled:null==e?void 0:e.origin_standard_answer}}));y.Z.confirm({centered:!0,icon:null,title:"增设正确答案",width:800,content:(0,R.jsxs)(R.Fragment,{children:["当前试题的正确答案为 ",null==o?void 0:o.map((function(e){return null===mt.k4||void 0===mt.k4?void 0:mt.k4[e-1]})),",请选择需要增设为正确答案的选项。",(0,R.jsx)("br",{}),"勾选提交之后,选中增设为正确答案任一选项的学生也会获得该小题的分值,但不会修改当前试题的题型。取消勾选提交之后,也会重新计算对应学生的得分。",(0,R.jsx)("br",{}),(0,R.jsx)(k.Z.Group,{className:"flex-col mt20",options:s,defaultValue:l,onChange:function(e){l=e}})]}),onOk:(t=a()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/exercises/".concat(ye.categoryId,"/questions/").concat(null==i?void 0:i.id,"/add_standard_answers.json"),{method:"put",body:{standard_answer:l}});case 2:0===(null==(t=e.sent)?void 0:t.status)&&(b.ZP.success("修改成功"),Me(U+1));case 4:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})})},Fe=null==B||null===(t=B.questionList)||void 0===t?void 0:t.reduce((function(e,t){return e+Number(t.questions_score)}),0),We=G&&1!==(null==B||null===(n=B.exam)||void 0===n?void 0:n.exercise_status),He=function(){var e=a()(r()().mark((function e(t){var n;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/courses/".concat(null==ye?void 0:ye.coursesId,"/sync_shixuns.json"),{method:"post",body:{exercise_ids:[null==ye?void 0:ye.categoryId],exercise_question_id:t.id}});case 2:0===(null==(n=e.sent)?void 0:n.status)&&($({type:"classroomList/setActionTabs",payload:{}}),b.ZP.info("实训同步中,请稍后"));case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),Ge=function(){var e=a()(r()().mark((function e(t,n){var i;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,I.ZP)("/api/courses/".concat(null==ye?void 0:ye.coursesId,"/ignore_prompt.json"),{method:"post",body:{container_type:"Exercise",container_id:null==ye?void 0:ye.categoryId,exercise_question_id:null==t?void 0:t.id}});case 2:0===(null==(i=e.sent)?void 0:i.status)&&(Se[n]=!1,_e(u()(Se)));case 4:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}();return(0,R.jsxs)("section",{className:f.wrap,children:[(0,R.jsxs)("div",{id:"id_left_preview",className:f.left,onMouseEnter:function(e){document.getElementById("id_left_preview").style.overflowY="auto"},onMouseLeave:function(e){document.getElementById("id_left_preview").style.overflowY="hidden"},children:[(0,R.jsx)("div",{className:f.title,children:(0,R.jsxs)("div",{className:"body-overflow-initial",children:[(0,R.jsx)("b",{}),(0,R.jsx)("span",{children:"答题卡"})]})}),(0,R.jsxs)("div",{className:f.total,children:[(0,R.jsxs)("div",{children:[(0,R.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIgZmlsbD0iI0VBRjNGNCIvPjxwYXRoIGQ9Ik0yNS45MDUgMTUuMzdhLjc3NS43NzUgMCAwIDAtLjYyNi0uNTI5bC00LjgxNC0uNy0yLjE1Mi00LjM2MmEuNzc2Ljc3NiAwIDAgMC0xLjM5MiAwbC0yLjE1MyA0LjM2My00LjgxNC42OTlhLjc3NS43NzUgMCAwIDAtLjQzIDEuMzIzbDMuNDg0IDMuMzk2LS44MjMgNC43OTRhLjc3Ny43NzcgMCAwIDAgMS4xMjYuODE4bDQuMzA2LTIuMjY0IDQuMzA1IDIuMjY0YS43NzguNzc4IDAgMCAwIC44MTctLjA1OS43NzcuNzc3IDAgMCAwIC4zMS0uNzU5bC0uODIzLTQuNzk0IDMuNDgzLTMuMzk2YS43NzcuNzc3IDAgMCAwIC4xOTYtLjc5NVoiIGZpbGw9IiMyMUMwQTYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvZz48L3N2Zz4="}),(0,R.jsx)("span",{children:"题数(道)"}),(0,R.jsx)("aside",{children:null==B?void 0:B.all_questions_count})]}),(0,R.jsxs)("div",{className:"mr30 ml30",children:[(0,R.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTdGM0ZGIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGw9IiM0QzZGRkYiIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0ibTIzLjcxOSAxMy4zMjUtNC4wOTgtMy45NGMtLjA5Ny0uMTMtLjIyNS0uMTYyLS4zNTUtLjE2Mi0uMTI5IDAtLjI1OC4wNjQtLjM4Ny4xNjFsLTcuNTUgNy43NTNjLS4wNjUuMDY1LS4wOTguMTYyLS4xMy4yMjdsLTEuMDMyIDUuNDI3Yy0uMDMzLjE5NC4wMzIuMzIzLjE2LjQ4NC4xMy4xMy4yMjcuMTYyLjM4OS4xNjJoLjA5Nmw0Ljc3Ni0xLjA5OWMuMDk3LS4wMzIuMTk0LS4wNjQuMjU4LS4xNjFsNy44NDEtOC4xMDhjLjE5NC0uMTYyLjE5NC0uNTE3LjAzMy0uNzQ0aC0uMDAxWm0tOC4xIDguMDQ0YS41MzQuNTM0IDAgMCAxLS4zODYuMTYyLjU2LjU2IDAgMCAxLS4zODgtLjE2MmwtMy0yLjgxYy0uMjI2LS4xOTQtLjIyNi0uNTE3LS4wMzMtLjc0My4xOTQtLjIyNy41MTctLjIyNy43NDMtLjAzM2wzIDIuODExYy4yNTkuMjI2LjI5MS41NS4wNjUuNzc2Wk0xNyAyMi45Mmg2Ljg0NHYxLjA1NUgxN3oiLz48L2c+PC9nPjwvc3ZnPg=="}),(0,R.jsx)("span",{children:"总分(分)"}),(0,R.jsx)("aside",{children:Fe&&Fe.toFixed(1)})]}),(0,R.jsxs)("div",{children:[(0,R.jsx)("img",{src:"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSIjRTRFNkZEIiB3aWR0aD0iMzQiIGhlaWdodD0iMzQiIHJ4PSIxMCIvPjxnIGZpbGwtcnVsZT0ibm9uemVybyI+PHBhdGggZD0iTTEzLjgwOCAxMS40NDhhLjU1OC41NTggMCAwIDEgMCAuNzg4bC0xLjU2NCAxLjU2NWEuNTU4LjU1OCAwIDEgMS0uNzg5LS43OWwxLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDAgMSAuNzkgMFptOS44ODIgMi40NjJhLjU1OC41NTggMCAwIDEtLjc4OSAwbC0xLjU2NC0xLjU2M2EuNTU4LjU1OCAwIDEgMSAuNzg5LS43ODlsMS41NjQgMS41NjRhLjU1Ni41NTYgMCAwIDEgMCAuNzg4WiIgZmlsbD0iIzY2NzhFQiIvPjxwYXRoIGQ9Ik0yMS43NTMgMjEuNzA3YTUuOTM3IDUuOTM3IDAgMSAwLTguNTguMDE1bC0uOTM3LjkzNmEuNTU4LjU1OCAwIDEgMCAuNzg5Ljc4OGwuOTk1LS45OTRhNS45MSA1LjkxIDAgMCAwIDMuNDM2IDEuMDk1YzEuMjg3IDAgMi40OC0uNDEgMy40NTItMS4xMDZsLjk5Mi45OTJhLjU1OC41NTggMCAxIDAgLjc4OS0uNzg5bC0uOTM2LS45MzdaIiBmaWxsPSIjNjY3OEVCIi8+PHBhdGggZD0ibTIwLjg1OCAxOC45NS0zLjAyNC0xLjc0NXYtMi4wNTRhLjU1OC41NTggMCAxIDAtMS4xMTcgMHYyLjM1MWMwIC4wNjQuMDExLjEyNi4wMzEuMTg0YS41NTEuNTUxIDAgMCAwIC4yNTguMzNsMy4yOTMgMS45YS41NTcuNTU3IDAgMCAwIC41NTktLjk2NloiIGZpbGw9IiNGRkYiLz48L2c+PC9nPjwvc3ZnPg=="}),(0,R.jsx)("span",{children:"时长(分)"}),(0,R.jsx)("aside",{children:-1===(null==B||null===(i=B.exam)||void 0===i?void 0:i.time)||null===(null==B||null===(o=B.exam)||void 0===o?void 0:o.time)?"不限":null==B||null===(l=B.exam)||void 0===l?void 0:l.time})]})]}),null==B||null===(c=B.questionList)||void 0===c?void 0:c.map((function(e,t){var n;return(0,R.jsxs)("div",{className:f.list,children:[(0,R.jsxs)("div",{className:f.name,children:[(0,R.jsx)("b",{}),(0,R.jsx)("span",{children:e.name})]}),(0,R.jsxs)("aside",{children:[(0,R.jsxs)("div",{children:["共",(0,R.jsx)("span",{className:f.b,children:e.questions_count}),"题 ",(0,R.jsx)("span",{className:f.l,children:"|"}),"共",(0,R.jsx)("span",{className:f.r,children:e.questions_score}),"分"]}),(0,R.jsx)("div",{className:f.answerSheet,children:null==e||null===(n=e.questions)||void 0===n?void 0:n.map((function(e,t){return(0,R.jsx)("div",{onClick:function(){var t="Anchor_".concat(null==e?void 0:e.id),n=document.getElementById(t);n&&setTimeout((function(){return n.scrollIntoView({block:"center",behavior:"smooth"})}))},className:f.tag,children:t+1},null==e?void 0:e.id)}))})]})]},t)}))]}),(0,R.jsxs)("div",{className:f.right,children:[(0,R.jsxs)("div",{className:f.examName,id:"examName",children:[(0,R.jsx)("div",{className:f.name,children:(0,R.jsx)(v.Z,{title:null==B||null===(d=B.exam)||void 0===d?void 0:d.name,getPopupContainer:function(e){return e.parentNode},children:(0,R.jsx)("span",{className:f.t,children:null==B||null===(T=B.exam)||void 0===T?void 0:T.name})})}),G&&1===(null==B||null===(P=B.exam)||void 0===P?void 0:P.exercise_status)&&(0,R.jsx)(tt.op,{openLoading:!0,shape:"default",onClick:function(){y.Z.confirm({title:"提示",content:"确认根据最新的随机组卷抽题规则重新生成试卷吗?",onOk:function(){Re()}})},type:"primary",children:"更新试卷"}),!G&&(0,R.jsx)(g.ZP,{onClick:function(){var e,t=y.Z.confirm({icon:null,centered:!0,title:"温馨提示",content:"确认更换预览中的所有试题吗?",cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(e=a()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t.update({cancelButtonProps:{disabled:!0}}),e.next=3,Y();case 3:t.update({cancelButtonProps:{disabled:!1}}),b.ZP.success("已重新随机生成整张试题");case 5:case"end":return e.stop()}}),e)}))),function(){return e.apply(this,arguments)})})},type:"primary",children:"随机更换"})]}),(0,R.jsx)("div",{className:f.topWarp,children:null==B||null===(M=B.questionList)||void 0===M?void 0:M.map((function(e,t){var n,i;return(0,R.jsxs)(p.Fragment,{children:[(0,R.jsxs)("div",{className:f.head,style:0===t?{border:0,marginTop:-16}:{},children:[(0,R.jsxs)("div",{className:f.name,children:[(0,R.jsx)("b",{}),(0,R.jsx)("span",{children:e.name})]}),(0,R.jsxs)("div",{className:f.so,children:["共",(0,R.jsxs)("span",{className:f.b,children:[e.questions_count," "]}),"题 ","COMBINATION"===e.type&&"(包含".concat(null==e||null===(n=e.questions)||void 0===n?void 0:n.map((function(e){var t;return null==e||null===(t=e.sub_item_banks)||void 0===t?void 0:t.length})).reduce((function(e,t){return e+t})),"小题)"),(0,R.jsx)("span",{className:f.l,children:"|"}),"共",(0,R.jsx)("span",{className:f.r,children:e.questions_score}),"分"]}),!G&&(0,R.jsxs)("div",{className:f.btn,children:[(0,R.jsx)(g.ZP,{onClick:function(){var t,n,i;i=(t=e).questions_score/t.questions_count,y.Z.confirm({icon:null,centered:!0,title:"分数设置",content:(0,R.jsx)("div",{className:f.modalColumn,children:(0,R.jsxs)("div",{className:f.modalRow,style:{justifyContent:"flex-start"},children:[(0,R.jsx)("sup",{className:f.sup,children:"*"}),(0,R.jsxs)("span",{children:[null==t?void 0:t.name,""]}),(0,R.jsx)(x.Z,{min:0,precision:1,defaultValue:i,onChange:function(e){i=e}}),(0,R.jsx)("span",{className:"ml5",children:"分/题"})]})}),okText:"确认",cancelText:"取消",onOk:(n=a()(r()().mark((function e(){var n,o;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i){e.next=3;break}return b.ZP.warning("分数不能为空或为0"),e.abrupt("return",Promise.reject());case 3:o={type:null==t?void 0:t.type,score:i,scoreTotal:Number(null===(n=i*t.questions_count)||void 0===n?void 0:n.toFixed(1))},H(o);case 5:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})})},type:"primary",ghost:!0,className:"mr20",children:"设置得分"}),(0,R.jsx)(g.ZP,{onClick:function(){return o=null===(n=(t=e).questions)||void 0===n?void 0:n.map((function(e){return null==e?void 0:e.id})),l=t.name,void(s=y.Z.confirm({icon:null,centered:!0,title:"温馨提示",content:"确认更换".concat(l,"中的所有试题吗?"),cancelButtonProps:{disabled:!1},maskClosable:!1,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(i=a()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s.update({cancelButtonProps:{disabled:!0}}),e.next=3,Y({seleted_item_bank_ids:o},{type:t.type});case 3:s.update({cancelButtonProps:{disabled:!1}}),b.ZP.success("已重新随机生成".concat(l,"试题"));case 5:case"end":return e.stop()}}),e)}))),function(){return i.apply(this,arguments)})}));var t,n,i,o,l,s},type:"primary",ghost:!0,children:"随机更换"})]})]}),null==e||null===(i=e.questions)||void 0===i?void 0:i.map((function(t,n){var i,o,l,c,d,h,m,x,w,C,k;return re===(null==t?void 0:t.id)?(0,R.jsxs)("div",{id:"Anchor_".concat(null==t?void 0:t.id),className:f.content,style:{padding:0,marginTop:24},children:[(0,R.jsxs)("div",{style:{float:"right",marginTop:"".concat("PRACTICAL"===(null==e?void 0:e.type)?"-2px":"-6px")},children:[(0,R.jsx)(g.ZP,{onClick:function(){return oe(null)},className:"mr20",type:"primary",ghost:!0,children:"取消"}),(0,R.jsx)(g.ZP,{onClick:function(){Be(null==e?void 0:e.type,t)},type:"primary",children:"保存"})]}),Le(t,e.type)]},null==t?void 0:t.id):(0,R.jsxs)("div",{id:"Anchor_".concat(null==t?void 0:t.id),className:f.content,children:[(0,R.jsxs)("div",{className:f.titleWrap,children:["bprogram"===(null==t?void 0:t.item_type)?(0,R.jsx)(E.Z,{style:{paddingRight:10},value:n+1+"、"+(null==t||null===(i=t.program_attr)||void 0===i?void 0:i.description)}):(0,R.jsx)(E.Z,{style:{paddingRight:10},className:f.titleHtml,value:n+1+"、"+"".concat("combination"===(null==t?void 0:t.item_type)?"(题干)":"")+(null==t?void 0:t.name)}),(0,vt.G5)()&&(null==t||null===(o=t.shixun)||void 0===o?void 0:o.shixun_change)&&(0,R.jsx)(S.Z,{trigger:"click",open:Se[n],onOpenChange:function(e){Se[n]=!0,_e(u()(Se))},placement:"bottomLeft",autoAdjustOverflow:!1,title:null,content:(0,R.jsxs)("div",{style:{width:"310px",color:"#000"},children:[(0,R.jsx)("div",{children:"实训管理员对试卷中使用的实践项目进行了修改,请检查后,确认是否需要同步到试卷中"}),(0,R.jsxs)("div",{className:f.btn_warp,children:[(0,R.jsx)(g.ZP,{size:"small",onClick:function(){return Ge(t,n)},children:"忽略"}),(0,R.jsx)(g.ZP,{className:"ml20",size:"small",type:"primary",onClick:function(){Se[n]=!1,_e(u()(Se)),$({type:"classroomList/setActionTabs",payload:{key:"实训同步确认",onOK:function(){return He(t)}}})},children:"确认同步"}),(0,R.jsx)(g.ZP,{className:"ml20",size:"small",type:"primary",onClick:function(){return(0,Z.xg)("/shixuns/".concat(null==t?void 0:t.forked_shixun_identifier,"/challenges?exercise=true"))},children:"前往查看"})]})]}),children:(0,R.jsx)("i",{className:"iconfont icon-tongzhi1 pl10 current",style:{fontSize:"16px",color:"#F7B500"},onClick:function(e){return e.stopPropagation()}})}),G&&(0,R.jsx)(g.ZP,{onClick:function(){var e,n,i;re?b.ZP.warning("先保存或取消当前正在编辑的试题"):(ge.setFieldsValue({standard_answers:null==t?void 0:t.standard_answer,hack:s()(s()({},t),null==t?void 0:t.program_attr),hack_codes:s()(s()({},null==t?void 0:t.program_attr),{},{code:ht.Base64.decode((null==t||null===(e=t.program_attr)||void 0===e?void 0:e.code)||"")}),hack_sets:s()({},null==t||null===(n=t.hack_sets)||void 0===n?void 0:n[0])}),"program"==(null==t?void 0:t.item_type)?A.history.push("/problems/newedit/".concat(null==t||null===(i=t.program_attr)||void 0===i?void 0:i.identifier,"?type=exercises&express_id=").concat(ye.categoryId,"&question_id=").concat(null==t?void 0:t.id,"&score=").concat(null==t?void 0:t.score,"&exercise=true&callback_url=/classrooms/").concat(ye.coursesId,"/exercise/").concat(ye.categoryId,"/detail?random=true")):oe(null==t?void 0:t.id))},type:"primary",style:{marginLeft:"auto"},ghost:!0,children:"编辑"}),!We&&(0,R.jsx)(g.ZP,{disabled:We,className:"ml20",onClick:function(){return function(e,t,n,i){var o,l,s="".concat(location.pathname).concat(location.search),c=null===(o=i.questions)||void 0===o?void 0:o.map((function(e){return null==e?void 0:e.id}));if(s.includes("exercise"))me.current={id:e,ids:c,type:t,index:n},fe(!0);else var u=y.Z.confirm({icon:null,centered:!0,title:"温馨提示",content:"确认要更换该试题吗?",cancelButtonProps:{disabled:!1},maskClosable:!0,keyboard:!1,okText:"确认",cancelText:"取消",onOk:(l=a()(r()().mark((function i(){return r()().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return u.update({cancelButtonProps:{disabled:!0}}),i.next=3,Y({single_question_id:e,seleted_item_bank_ids:c},{type:t,index:n});case 3:u.update({cancelButtonProps:{disabled:!1}}),b.ZP.success("已重新随机生成试题");case 5:case"end":return i.stop()}}),i)}))),function(){return l.apply(this,arguments)})})}(null==t?void 0:t.id,e.type,n,e)},type:"primary",ghost:!0,children:"换一题"})]}),"bprogram"===(null==t?void 0:t.item_type)&&(0,R.jsx)(E.Z,{style:{paddingRight:10,paddingLeft:25},showProgramFill:!0,disabledFill:!0,className:f.titleHtml,value:ht.Base64.decode((null==t||null===(l=t.program_attr)||void 0===l?void 0:l.code)||"")}),("SINGLE"===e.type||"JUDGMENT"===e.type||"MULTIPLE"===e.type)&&(w=t,k=[],(0,R.jsxs)(p.Fragment,{children:[(0,R.jsx)("aside",{className:f.single,children:null==w||null===(C=w.choices)||void 0===C?void 0:C.map((function(e,t){return e.is_answer&&k.push(mt.k4[t]),(0,R.jsxs)("ul",{children:[(0,R.jsxs)("li",{children:[mt.k4[t],"、"]}),(0,R.jsx)("li",{children:(0,R.jsx)(E.Z,{value:e.choice_text})})]},t)}))}),(0,R.jsxs)("div",{className:f.analysis,children:[(0,R.jsxs)("div",{children:["正确答案:",k.join(""),(0,R.jsxs)("span",{className:"ml30",children:["难度:",je[w.difficulty]]})]}),(0,R.jsxs)("aside",{children:[(0,R.jsx)("span",{className:f.text,children:"解析:"}),(0,R.jsx)(E.Z,{value:w.analysis?w.analysis:"暂无解析"})]}),(0,R.jsxs)("ul",{children:[(0,R.jsxs)("li",{children:[(0,R.jsx)("span",{style:{color:"#007AFF",marginRight:10},children:"课程:"}),"".concat((null==w?void 0:w.course_discipline_name)||"--")]}),(0,R.jsx)(v.Z,{title:null==w?void 0:w.tag_discipline_name,children:(0,R.jsxs)("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[(0,R.jsx)("span",{style:{color:"#5AB891",marginRight:10},children:"知识点:"}),null==w?void 0:w.tag_discipline_name]})})]})]})]})),"COMPLETION"===e.type&&Ae(t),"SUBJECTIVE"===e.type&&Ie(t),"PROGRAM"===e.type&&De(t),"BPROGRAM"===e.type&&Ze(t),"COMBINATION"===e.type&&(h=t,m=n,(0,R.jsx)("div",{children:null==h||null===(x=h.sub_item_banks)||void 0===x?void 0:x.map((function(e,t){var n,i,r=[];return(0,R.jsxs)(p.Fragment,{children:[(0,R.jsxs)("div",{style:{marginLeft:25,fontSize:"16px",color:"#333",paddingTop:"15px"},children:[m+1+"."+(t+1),"",Ne[e.item_type]||Ee[e.item_type],"",e.name]}),("SINGLE"==e.item_type||"MULTIPLE"==e.item_type||"JUDGMENT"==e.item_type||"single"==e.item_type||"multiple"==e.item_type||"judgement"==e.item_type)&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)("aside",{className:f.single,children:null==e||null===(n=e.choices)||void 0===n?void 0:n.map((function(e,t){return e.is_answer&&r.push(mt.k4[t]),(0,R.jsxs)("ul",{children:[(0,R.jsxs)("li",{children:[mt.k4[t],"、"]}),(0,R.jsx)("li",{children:(0,R.jsx)(E.Z,{value:e.choice_text})})]},t)}))}),(0,R.jsxs)("div",{className:f.analysis,children:[(0,R.jsxs)("div",{children:["正确答案:",r.join(""),(0,R.jsxs)("span",{className:"ml30",children:["难度:",je[e.difficulty]]})]}),(0,R.jsxs)("aside",{children:[(0,R.jsx)("span",{className:f.text,children:"解析:"}),(0,R.jsx)(E.Z,{value:e.analysis?e.analysis:"暂无解析"})]}),(0,R.jsxs)("ul",{children:[(0,R.jsxs)("li",{children:[(0,R.jsx)("span",{style:{color:"#007AFF",marginRight:10},children:"课程:"}),"".concat((null==h?void 0:h.course_discipline_name)||"--")]}),(0,R.jsx)(v.Z,{title:null==h?void 0:h.tag_discipline_name,children:(0,R.jsxs)("li",{style:{maxWidth:"400px",overflow:"hidden",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:[(0,R.jsx)("span",{style:{color:"#5AB891",marginRight:10},children:"知识点:"}),null==h?void 0:h.tag_discipline_name]})})]})]})]}),("COMPLETION"==e.item_type||"completion"==e.item_type)&&Ae(e,h),("SUBJECTIVE"==e.item_type||"subjective"==e.item_type)&&Ie(e,h),3===(null==B||null===(i=B.exam)||void 0===i?void 0:i.exercise_status)&&(0,R.jsxs)("div",{className:"flex gap-20px mt20",children:[(0,R.jsx)(pt.Z,{state:null==e?void 0:e.is_wrong,onClick:function(){null==J||J({value:s()(s()({},e),{},{question_id:null==e?void 0:e.id,question_score:null==e?void 0:e.score})})}}),"single"==e.item_type&&(0,R.jsx)(g.ZP,{style:{color:"#3061D0"},onClick:function(){Oe({value:e})},children:"增设正确答案"})]})]})}))})),"PRACTICAL"===e.type&&Te(t),(0,R.jsxs)(_.Z,{className:"mt20",wrap:!1,align:"middle",gutter:20,children:[3===(null==B||null===(c=B.exam)||void 0===c?void 0:c.exercise_status)&&!["PROGRAM","BPROGRAM","PRACTICAL","COMBINATION"].includes(e.type)&&(0,R.jsx)(j.Z,{children:(0,R.jsx)(pt.Z,{state:null==t?void 0:t.is_wrong,onClick:function(){null==J||J({value:s()(s()({},t),{},{question_id:null==t?void 0:t.id,question_score:null==t?void 0:t.score})})}})}),["PROGRAM","BPROGRAM","PRACTICAL"].includes(e.type)&&(null==t?void 0:t.show_resubmit)&&(0,R.jsx)(j.Z,{children:(0,R.jsx)(ft.C,{dataSource:s()(s()({},t),{},{question_id:null==t?void 0:t.id})})}),3===(null==B||null===(d=B.exam)||void 0===d?void 0:d.exercise_status)&&["SINGLE"].includes(e.type)&&(0,R.jsx)(j.Z,{children:(0,R.jsx)(g.ZP,{style:{color:"#3061D0"},onClick:function(){Oe({value:t})},children:"增设正确答案"})})]})]},null==t?void 0:t.id)}))]},t)}))})]}),G?(0,R.jsx)(tt.vr,{children:(0,R.jsx)(N.Z,{showTotal:Z.rU,total:null==B||null===(L=B.exam)||void 0===L?void 0:L.total_num,pageSize:1,current:U+1,showSizeChanger:!1,onChange:Me,showQuickJumper:!1,hideOnSinglePage:!1})}):(0,R.jsx)(tt.vr,{LeftContent:(0,R.jsx)(tt.op,{onClick:F,shape:"default",style:{height:38,background:"#fff",boxShadow:"none"},children:"返回"}),RightContent:(0,R.jsxs)(_.Z,{align:"middle",children:[(0,R.jsx)(S.Z,{color:"#55575D",overlayClassName:f.popover,open:se,getPopupContainer:function(e){return null==e?void 0:e.parentNode},content:"如您对此份试题满意,可将此份试题保存为固定试卷",children:(0,R.jsx)(tt.op,{onMouseEnter:function(){return ce(!0)},onMouseLeave:function(){return ce(!1)},onClick:a()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Number(Fe),[100,120,150].includes(t)){e.next=4;break}return e.next=4,new Promise((function(e,n){var i;y.Z.confirm({centered:!0,icon:null,okText:"保存",cancelText:"取消",title:"提示",content:(0,R.jsxs)("div",{className:"c-grey-333",children:["当前试卷总分为",(0,R.jsx)("span",{style:{color:"#FA6400",margin:"0 5px"},children:t}),"分,请确认是否进行保存?"]}),onOk:(i=a()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e("");case 1:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)}),onCancel:function(){n()}})}));case 4:Pe();case 5:case"end":return e.stop()}}),e)}))),shape:"default",style:{height:38,background:"#fff",boxShadow:"none"},children:"保存"})}),(0,R.jsx)(tt.op,{shape:"default",type:"primary",onClick:a()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=Number(Fe),[100,120,150].includes(t)){e.next=4;break}return e.next=4,new Promise((function(e,n){var i;y.Z.confirm({centered:!0,icon:null,okText:"保存",cancelText:"取消",title:"提示",content:(0,R.jsxs)("div",{className:"c-grey-333",children:["当前试卷总分为",(0,R.jsx)("span",{style:{color:"#FA6400",margin:"0 5px"},children:t}),"分,请确认是否进行保存?"]}),onOk:(i=a()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e("");case 1:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)}),onCancel:function(){n()}})}));case 4:O();case 5:case"end":return e.stop()}}),e)}))),style:{height:38,marginLeft:20},children:"提交"})]})}),(0,R.jsx)(ut,{visible:pe,questionParams:me.current,getdata:X,onRandomExchange:a()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=me.current,e.next=3,Y({single_question_id:t.id,seleted_item_bank_ids:t.ids},{type:t.type,index:t.index});case 3:fe(!1);case 4:case"end":return e.stop()}}),e)}))),selectFromProblemSet:function(){var e=me.current,t="".concat(location.pathname).concat(location.search);t.includes("exercise")&&A.history.push("/paperlibrary/exchangequestion?type=exercise&qid=".concat(e.id,"&qtype=").concat(e.type,"&exerciseid=").concat(ye.categoryId,"&from=").concat(t))},onCancel:function(){fe(!1)}})]})}))},70939:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return Zn}});var i=n(82242),r=n.n(i),o=n(7557),a=n.n(o),l=n(41498),s=n.n(l),c=n(79800),u=n.n(c),d=n(59301),h="wrapper___KtBVT",p="breadCrumbWrapper___k9tSB",f="radioBtnWrapper___k9OCh",m="baseLineHeight___O_QXK",v="radiogroup___e2fW6",g="easy___WcUAp",y="medium___U_o3j",x="hard___dAXLS",b="formWrap___wt5tC",w="baseFormItem___zV64d",C="fixedBottom___liDZ4",k="cancelBtn___ZV9Mi",S="confirmBtn___DwH6m",_="concat___ZuLMo",j=n(6767),N=n(28284),E=n(91882),A=n(76805),Z=n(73259),I=n(29787),D=n(37568),T=n(47889),P=n(77019),M=n(71051),L=n(99571),B=n(87281);function R(e){return O.apply(this,arguments)}function O(){return(O=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/examination_banks/".concat(t,"/edit_random_exam_new.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function F(e,t){return W.apply(this,arguments)}function W(){return(W=s()(a()().mark((function e(t,n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/examination_banks/".concat(t,"/update_random_exam.json"),{method:"post",body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function H(e){return z.apply(this,arguments)}function z(){return(z=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/examination_banks/create_random_exam.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function G(e){return V.apply(this,arguments)}function V(){return(V=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/v2/course_disciplines/tag_disciplines_by_random.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function K(){return(K=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/item_banks/item_difficulty_count.json",{method:"get",params:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function U(e,t){return q.apply(this,arguments)}function q(){return(q=s()(a()().mark((function e(t,n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/examination_banks/".concat(t,"/set_item_type_score.json"),{method:"post",body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Y(e,t){return X.apply(this,arguments)}function X(){return(X=s()(a()().mark((function e(t,n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/exercises/".concat(t,"/set_item_type_score.json"),{method:"post",body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function J(e,t){return Q.apply(this,arguments)}function Q(){return(Q=s()(a()().mark((function e(t,n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/examination_banks/".concat(t,"/delete_item_type.json"),{method:"post",body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function $(e,t){return ee.apply(this,arguments)}function ee(){return(ee=s()(a()().mark((function e(t,n){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/exercises/".concat(t,"/delete_item_type.json"),{method:"post",body:n}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function te(e){return ne.apply(this,arguments)}function ne(){return(ne=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/examination_banks/preview_random_questions.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function ie(e){return re.apply(this,arguments)}function re(){return(re=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/examination_banks/toggle_random_questions.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function oe(e){return ae.apply(this,arguments)}function ae(){return(ae=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/examination_banks/save_question_list.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function le(e){return se.apply(this,arguments)}function se(){return(se=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,B.ZP)("/api/exercises/".concat(t.categoryId,"/edit.json"),{method:"get",params:r()({},t)}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var ce=n(91232),ue=n.n(ce),de=n(85573),he=n.n(de),pe=function(e){return e.OnlyFileFolder="1",e.OnlyKnowledge="2",e.OnlyDifficulty="3",e.FileFolderAndDiff="4",e.FileFolderAndKnowledge="5",e.KnowledgeAndDiff="6",e.All="7",e.Shixun="8",e}({}),fe=n(89392),me=function(e){return e[e.FileFolder=1]="FileFolder",e[e.Difficulty=2]="Difficulty",e[e.Knowledge=3]="Knowledge",e}(me||{}),ve=(0,d.createContext)(null),ge=he()(he()(he()(he()(he()(he()(he()({},pe.OnlyFileFolder,[me.FileFolder]),pe.OnlyKnowledge,[me.Knowledge]),pe.OnlyDifficulty,[me.Difficulty]),pe.FileFolderAndDiff,[me.FileFolder,me.Difficulty]),pe.FileFolderAndKnowledge,[me.FileFolder,me.Knowledge]),pe.KnowledgeAndDiff,[me.Knowledge,me.Difficulty]),pe.All,[me.Knowledge,me.Difficulty,me.FileFolder]),ye=function(e,t){if(e.length!==t.length)return!1;var n,i=ue()(t);try{for(i.s();!(n=i.n()).done;){var r=n.value;if(!e.includes(r))return!1}}catch(e){i.e(e)}finally{i.f()}return!0},xe=function(e){for(var t=0,n=Object.entries(ge);t<n.length;t++){var i=u()(n[t],2),r=i[0],o=i[1];if(ye(e,o))return r}},be={SINGLE:"单选题",MULTIPLE:"多选题",COMPLETION:"填空题",JUDGMENT:"判断题",SUBJECTIVE:"简答题",PROGRAM:"编程题",BPROGRAM:"程序填空题",COMBINATION:"组合题",PRACTICAL:"实训题"},we={1:{label:"简单",color:"#46B70E"},2:{label:"适中",color:"#165DFF"},3:{label:"困难",color:"#EE6F1A"}},Ce=function(e){return e&&parseFloat(e.toFixed(1))},ke=function(e,t){switch(t.type){case"init":return t.payload;case"updateBaseInfo":return r()(r()({},e),{},{examination_bank:t.payload});case"deleteQuestionType":var n=e.item_types.filter((function(e){return e.item_type!==t.payload}));return e.examination_bank.question_count=Ce(n.reduce((function(e,t){return e+t.item_bank_count}),0)),e.examination_bank.total_score=Ce(n.reduce((function(e,t){return e+t.total_score}),0)),r()(r()({},e),{},{item_types:n});case"setQuestionType":var i,o=e.item_types,a=void 0===o?[]:o,l=a.map((function(e){return e.item_type})),s=a.filter((function(e){return t.payload.includes(e.item_type)})),c=ue()(t.payload);try{for(c.s();!(i=c.n()).done;){var u=i.value;l.includes(u)||("PRACTICAL"===u?s.push({item_type:u,contents:[],item_banks:[],item_bank_count:0,item_bank_num:0,item_type_text:be[u],random_rule_type:pe.Shixun,score:0,total_score:0}):s.push({item_type:u,contents:[],item_bank_count:0,item_type_text:be[u],score:0,total_score:0}))}}catch(e){c.e(e)}finally{c.f()}return r()(r()({},e),{},{item_types:s});case"updateItemTypes":return r()(r()({},e),{},{item_types:t.payload});case"deleteRule":var d,h=(0,fe.cloneDeep)(e),p=h.item_types.find((function(e){return e.item_type===t.payload.itemType})),f=p.contents.find((function(e){return e.id===t.payload.id&&e.is_share==t.payload.is_share}));return p.contents=p.contents.filter((function(e){return e!==f})),0===(null===(d=p.contents)||void 0===d?void 0:d.length)&&(p.random_rule_type=[]),p.item_bank_count-=null==f?void 0:f.quanlity,h.examination_bank.question_count-=null==f?void 0:f.quanlity,p.total_score-=(null==f?void 0:f.quanlity)*p.score,h.examination_bank.total_score-=(null==f?void 0:f.quanlity)*p.score,p.total_score=Ce(p.total_score),h.examination_bank.total_score=Ce(h.examination_bank.total_score),h.contents=p.contents,h;case"changeQuestionNum":var m,v=(0,fe.cloneDeep)(e),g=v.item_types.find((function(e){return e.item_type===t.payload.itemType})),y=null==g||null===(m=g.contents)||void 0===m?void 0:m.find((function(e){return e.id===t.payload.id}));if("PRACTICAL"===t.payload.itemType)return t.payload.num&&(v.examination_bank.question_count=v.examination_bank.question_count-g.item_bank_count+t.payload.num,v.examination_bank.total_score=Ce(v.examination_bank.total_score-g.total_score+t.payload.num*g.score)),t.payload.score&&(v.examination_bank.total_score=Ce(v.examination_bank.total_score-g.total_score+t.payload.num*g.score)),g.item_bank_count=t.payload.num,g.total_score=Ce(g.item_bank_count*g.score),v;v.examination_bank.question_count=v.examination_bank.question_count-(null==y?void 0:y.quanlity)+t.payload.num;var x=g.contents.find((function(e){return e.id===t.payload.id&&e.teacher_group_id===t.payload.teacher_group_id}));x.quanlity=t.payload.num;var b,w=0,C=0,k=ue()(g.contents);try{for(k.s();!(b=k.n()).done;){var S=b.value;w+=null==S?void 0:S.quanlity,C+=(null==S?void 0:S.quanlity)*g.score}}catch(e){k.e(e)}finally{k.f()}return v.examination_bank.total_score=Ce(v.examination_bank.total_score-g.total_score+C),g.item_bank_count=w,g.total_score=Ce(C),v;case"changeQuestionScore":var _=(0,fe.cloneDeep)(e),j=_.item_types.find((function(e){return e.item_type===t.payload.itemType}));return j.score=t.payload.score,j.total_score=Ce(j.item_bank_count*j.score),_.examination_bank.total_score=Ce(_.item_types.reduce((function(e,t){return e+t.total_score}),0)),_;case"editRule":var N=(0,fe.cloneDeep)(e),E=N.item_types.find((function(e){return e.item_type===t.payload.itemType}));return E.contents=t.payload.tableData.map((function(e){return r()(r()({},e),{},{item_type:t.payload.itemType,random_rule_type:t.payload.randomRuleType})})),E.random_rule_type=t.payload.randomRuleType,E.item_bank_count=E.contents.reduce((function(e,t){return e+(null==t?void 0:t.quanlity)}),0),E.score=E.score||1,E.total_score=Ce(E.item_bank_count*E.score),N.examination_bank.question_count=N.item_types.reduce((function(e,t){return e+t.item_bank_count}),0),N.examination_bank.total_score=Ce(N.item_types.reduce((function(e,t){return e+t.total_score}),0)),N;case"addShixun":var A,Z=(0,fe.cloneDeep)(e),I=Z.item_types.find((function(e){return"PRACTICAL"===e.item_type}));return I.item_banks=t.payload.shixunList,Z.examination_bank.question_count=Z.examination_bank.question_count+1,I.item_bank_num=I.item_banks.length,I.item_bank_count=I.item_bank_count||1,I.score=I.score||1,I.total_score=I.total_score||I.score*I.item_bank_count,Z.examination_bank.total_score=null==Z||null===(A=Z.item_types)||void 0===A?void 0:A.map((function(e){return e.total_score})).reduce((function(e,t){return e+t})),Z;case"deleteShixunQuestion":var D=(0,fe.cloneDeep)(e),T=D.item_types.find((function(e){return"PRACTICAL"===e.item_type}));return T.item_banks=T.item_banks.filter((function(e){return e.id!==t.payload.shixunId})),T.item_bank_num-=1,T.item_bank_count>T.item_bank_num&&(T.item_bank_count-=1,T.total_score-=T.score,T.total_score=Ce(T.total_score)),D}},Se=n(68505),_e=n(21466),je=n(37712),Ne=function(e){var t,n=e.courseOptions,i=e.setCurrentKey,o=e.loading,l=e.form,c=(0,d.useContext)(ve),h=c.data,p=c.disabled,j=c.dispatch,E=(0,A.useParams)(),Z=(0,d.useRef)(!0),B=(0,d.useState)(!1),R=u()(B,2),O=R[0],F=R[1],W=(0,d.useMemo)((function(){var e,t,i,o,a;if(n.length&&h){var l=null==h||null===(e=h.examination_bank)||void 0===e?void 0:e.course_discipline_id,s=-1===(null==h||null===(t=h.examination_bank)||void 0===t?void 0:t.time)?void 0:Z.current?E.id?null==h||null===(i=h.examination_bank)||void 0===i?void 0:i.time:(null==h||null===(o=h.examination_bank)||void 0===o?void 0:o.time)||60:null==h||null===(a=h.examination_bank)||void 0===a?void 0:a.time;return Z.current=!1,r()(r()({},h.examination_bank),{},{time:s,course_discipline_id:l})}}),[h,n]);return(0,d.useEffect)((function(){l.setFieldsValue(r()({},W))}),[W]),(0,je.jsxs)(I.Z,{spinning:o,size:"large",style:{position:"fixed",maxHeight:"100vh"},className:"mt30",children:[(0,je.jsx)("div",{className:b,children:(0,je.jsxs)(N.Z,{form:l,autoComplete:"off",colon:!1,labelCol:{span:4},wrapperCol:{span:20},initialValues:W||{difficulty:2,time:60},onValuesChange:function(e,t){var n=r()({},t);j({type:"updateBaseInfo",payload:n})},children:[(0,je.jsx)(N.Z.Item,{name:"name",label:"试卷名称",className:m,rules:[{required:!0,validator:function(e,t){var n;return(null==t||null===(n=t.replaceAll(" ",""))||void 0===n?void 0:n.length)>0?Promise.resolve():Promise.reject("请输入试卷名称")}}],children:(0,je.jsx)(D.Z,{maxLength:60,className:w,placeholder:"请输入试卷名称",showCount:!0})}),(0,je.jsx)(N.Z.Item,{label:"所属课程",name:"course_discipline_id",className:m,children:(0,je.jsx)(_e.q,{data:{course_discipline_id:null==h||null===(t=h.examination_bank)||void 0===t?void 0:t.course_discipline_id},style:{height:46},showLinkButton:!1})}),(0,je.jsxs)("div",{className:_,children:["没有合适的课程?",(0,je.jsx)("a",{target:"_blank",href:"/knowledgeHub",children:"管理课程"})]}),(0,je.jsx)(N.Z.Item,{label:"难度",name:"difficulty",className:f,rules:[{required:!0,message:"请选择难度"}],children:(0,je.jsxs)(T.ZP.Group,{disabled:p,className:v,children:[(0,je.jsx)(T.ZP.Button,{className:g,value:1,children:"简单"}),(0,je.jsx)(T.ZP.Button,{className:y,value:2,children:"适中"}),(0,je.jsx)(T.ZP.Button,{className:x,value:3,children:"困难"})]})}),(0,je.jsx)(N.Z.Item,{label:"答题时长",className:m,children:(0,je.jsxs)(P.Z,{align:"middle",children:[(0,je.jsx)(N.Z.Item,{name:"time",noStyle:!0,children:(0,je.jsx)(M.Z,{className:w,min:1,disabled:p,size:"large",max:9999,style:{width:220},placeholder:"请填写答题时长"})}),(0,je.jsx)("span",{style:{marginLeft:"10px",width:"40px",lineHeight:"46px",fontSize:14},children:"分钟"})]})}),(0,je.jsx)(N.Z.Item,{label:"试卷须知",name:"exam_notes",children:(0,je.jsx)(D.Z.TextArea,{rows:6,disabled:p,maxLength:65535,placeholder:"请输入试卷须知"})})]})}),(0,je.jsxs)("div",{className:C,children:[(0,je.jsx)(L.ZP,{className:"".concat(k," mr5"),onClick:function(){E.id||window.location.href.indexOf("randompaper")>-1?A.history.push("/paperlibrary"):A.history.push("/classrooms/".concat(E.coursesId,"/exercise"))},children:"取消"}),(0,je.jsx)(L.ZP,{className:"".concat(S," ml15"),type:"primary",size:"large",onClick:s()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,l.validateFields();case 2:if(E.id||E.coursesId){e.next=9;break}return e.next=5,H(h);case 5:0===(t=e.sent).status&&(A.history.replace("/randompaper/edit/".concat(null==t?void 0:t.examination_bank_id,"?type=settings")),i("settings")),e.next=10;break;case 9:i("settings");case 10:case"end":return e.stop()}}),e)}))),children:"下一步"})]}),(0,je.jsx)(Se.Z,{open:O,onCancel:function(){F(!1)}})]})},Ee=n(37205),Ae=n.n(Ee),Ze=n(70236),Ie=n.n(Ze),De=n(62957),Te=n(5269),Pe="questionInfo___U9mnu",Me="label___PP7Ng",Le="content___PUXFl",Be="leftPart___uoQeo",Re="rightPart___mCG7H",Oe="dragItem___djmPG",Fe="blackText___KqEaU",We="greyText___VamKm",He="iconWrapper___o1C0y",ze="contentArea___Fj7D0",Ge="dragging___mX3Il",Ve="hidden___KWDLK",Ke="dragIcon___yPuB3",Ue="deleteIcon___go29y",qe="challengeNameWrapper___DFjRy",Ye="challengeName___m7v0x",Xe="shixunPreviewFooter___iaciG",Je="shixunInfoWrapper___aSihg",Qe="shixunInfo___WYBm1",$e="btnToDetail___WVmtj",et="fixedBottom___oeMSX",tt="confirmBtn___sYh2O",nt="previewBtn___c2uQz",it="setScoreModalTable___kPddX",rt="title___lP1E2",ot="tipcontent___tV6uE",at="name___YLyPW",lt="tip___FYIzt",st="info___rSdr9",ct="img___ft7eS",ut=n(37286),dt=n(38049),ht=n(62673),pt=[{label:"单选题",value:"SINGLE"},{label:"多选题",value:"MULTIPLE"},{label:"填空题",value:"COMPLETION"},{label:"判断题",value:"JUDGMENT"},{label:"简答题",value:"SUBJECTIVE"},{label:"编程题",value:"PROGRAM"},{label:"组合题",value:"COMBINATION"},{label:"实训题",value:"PRACTICAL"},{label:"程序填空题",value:"BPROGRAM"}],ft=function(e){var t=e.open,n=e.onCancel,i=e.onOk,r=(0,d.useContext)(ve),o=r.data;r.dispatch;(0,d.useEffect)((function(){if(t){var e=(o||{}).item_types;c(null==e?void 0:e.map((function(e){return e.item_type})))}}),[t,o]);var a=(0,d.useState)([]),l=u()(a,2),s=l[0],c=l[1];return(0,je.jsx)(De.Z,{title:(0,je.jsxs)("div",{children:["题型设置",(0,je.jsx)("span",{className:"c-grey-333",style:{fontSize:14,fontWeight:400},children:"(通过勾选可对题型进行添加/删除)"})]}),closable:!0,centered:!0,open:t,onCancel:n,onOk:function(){return i(s)},children:(0,je.jsx)(ht.Z.Group,{value:s,onChange:function(e){return c(e)},children:(0,je.jsx)(P.Z,{gutter:[0,20],children:pt.map((function(e){return(0,je.jsx)(Te.Z,{span:6,children:(0,je.jsx)(ht.Z,{value:e.value,children:e.label})},e.value)}))})})})},mt=n(54172),vt=function(e){var t=e.open,n=e.onCancel,i=e.onOk,o=(0,d.useContext)(ve).data,a=(0,d.useState)(),l=u()(a,2),s=l[0],c=l[1];console.log("--xxx-",s),(0,d.useEffect)((function(){t&&c((0,fe.cloneDeep)(o))}),[t,o]);var h=(0,d.useMemo)((function(){var e,t;return null===(t=null==s||null===(e=s.item_types)||void 0===e?void 0:e.map((function(e){return e.total_score})).reduce((function(e,t){return parseFloat(e)+parseFloat(t)})))||void 0===t?void 0:t.toFixed(1)}),[s]);return t?(0,je.jsxs)(De.Z,{title:"批量设置分值",open:t,width:640,centered:!0,closable:!0,onCancel:n,onOk:function(){i(s)},children:[(0,je.jsxs)("div",{className:"c-black mb20",children:["总分",(0,je.jsx)("span",{className:"ml10 c-light-primary",children:h})]}),(0,je.jsx)(mt.Z,{columns:[{title:"题型名称",dataIndex:"item_type_text",width:130},{title:"小题总数",dataIndex:"item_bank_count",width:130},{title:"题型总分",dataIndex:"total_score",width:130},{title:"操作",render:function(e,t){t.score;var n=t.item_type;return(0,je.jsxs)("div",{style:{color:"#9096A3"},children:["每",(null==t||t.item_type,"题"),(0,je.jsx)(M.Z,{precision:1,size:"large",className:"ml10 mr10",min:.1,disabled:0===(null==t?void 0:t.item_bank_count),max:100,onChange:function(e){var t=s,i=t.item_types.find((function(e){return e.item_type===n}));i.score=Number(e);var o=e*i.item_bank_count;i.total_score=o&&Number(o.toFixed(1)),t.examination_bank.total_score=t.item_types.reduce((function(e,t){return Number(e)+Number(t.total_score)}),0),c(r()({},t))}}),"分"]})}}],className:it,dataSource:null==s?void 0:s.item_types,rowKey:"item_type",pagination:!1})]}):null},gt=n(20554),yt=n(82326),xt=n(18287),bt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAAtFJREFUWEftWL9rU1EYPffFpCCKEEEJVUQHB10qAUHFHwguDg4ORRDq4uDg4CBIJ6GD0D/B3UEFJ5cugjbQChIqokWKClVrFDGIg2B8yZX3Xl/z/O5LzvfyKhTJXV7g/jrfOfc797sx1toCNnAzQ4A51RkymJNA/CcMvpoYhf0xDWtPwqICWEKM+QSYGgojt3Hw3mweFjmD9YlR+N8WAJSdjYwBrAWCb1oL+jzvMbzSFKoPBgLKAc6dugPbuRDtHzAXgGEMxmjjsXEAYr4MMOw2DcA8wcjWG6g+XOEAZ8c+wNpKtCXZMI+WMn6DJrbsOMQBPtrr9ySM4ZX9LEApkOfd5QBntvvhuhqFswKOz2/wDQWSZ9o0FADLfji5fBTYPwmUduYVMmV+IrLWF2DpFtCcizDTu3hmFeCBKaC4LR2cJpvjMZrwfn8HFm8qATan/bWslWckq6SuTyWcIfi5allrkmsY/DoZSZzanCwQo0REAwTIJf583e9txNIWic9p5E2OCQilZ7BxzY/8L60RSqRkcgnHqKXERgFw5eq/80EagIbB91cSPigilMabNWmYD6okXr7cZdABIAE7Gv6dpfIuZxJDI/G7S32ymJx6CoDP50ny5mIXIJPQ2Y8kEVVEw+DSeCKLWbkldlQA6JZwaZe9BuDr8xkAZjU6Pp5LvHiu9xmkWej6Wt8KXOK1VuGDL89272IaMLv6yAID3cUvzvS5SZyQyZOAZZl7hrnEz0/rjZoxzAhOyUEOcOFEH6MWhDGCWAApPs8B1o/p68GsANgbRVVRPzu8fvVg5gA0xcLTsV/wCtF/iKz6cABkfBfL+Z12m0tc2/cWXnFPODf3zZCxmOj4yxzg/O4qWv48LDwHIHOZrO/i5HoGHRQ3HeEAg0m1ShWtn/dh27tgUAilTqOUMcyqm7AfbZjCR5Q2j+N4o64DOMDhXq8pQ4B5mdzwDP4B5kHmZrL/eyAAAAAASUVORK5CYII=",wt="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAAA4RJREFUWEftWEtrE1EYPXfSh5VWSlMfNSi4sokLK30pWtuKIChVVBBBWpfiRhcKghii7tp/4FrBBxREXbhQ0Bj7gqokahe+kNZWqa21tLGtk7kymY5J79yZL5NUKNLZZHHnzj33fOec+90wzrkHS/hhywBzrM4ygzkSiP+EwTdtPvDJdnDeCI4KgBPEsGGAPYOn8Bq23A7nwiLNYH+bD+rYSwBlloUYAzgH9F/Zo48pyhMoBVdR3ZkVUBpgV9MNcO24sb7OnA6GYtBEa75rbkCYL24wOcxGAPYUhSUXUH3/Cw0wXDUIziuMJYkFc6mluH+GcRSv2UYDfLxJtSWMwiuOUxsUC6Qot2iAD71q8ruZVNgtYFO/+m+yQKKm2UgGAMvU5GTvbqDyClC4LmUMuw+LTFiYdNDC7FdgIASMG57KHGDNdSB/tVyKltIJAESmRHziBmZHgf5WlwBrb6bihFrQmkdpCSDRiiyu+ozgyJzBujtpy1Jiy9XOAPqOuQRY35mKP8qdFvELBFJu1qH1HnUL8K59iV0DFtwqc3PPIQnAH+3noGmXAK1k4YnhxoaS8joqQgFYOaBUAlBSedbTIgCcuLwBc78+SW3qWnJUzkjG8/yAZ3Nqd937BYDfghvB4x+NQJ5vAMycozRvOVOF+Rk1FaVAkQEquX73PkmJh89EwXngn5+5dhsuPgwopYYZu/ZKAA6dDkLTQhaAlhKLDAsvuJWE+X5RDbCi1jBjpEkCcPCsH4mpmKXEVIksbZiAkDxz5zWZVwaUnjS6pkiDTcx8aI2CscCCRtStJqmjzKmtLD8FeLxAZKcNwPcnguCJ0II1SAYERJSJnUxX0gysagbC2+0YbPNDnY79rZrk6LR+n0DkRsP5a4GK80C4xuEkeXswCvCAfaOawV3E1K2+DGUaUeO+i4AlB9NpeX0gCGihpA6zeahcpBB7W4Bo0IHBgSN+zP2MGVuX1ZiihHKJOC5IpMAHfH7gAFAfetUYBUcgGwIXZc73d0BixqEffNGQ5mYi1yjCSFdLKhIfA6ZHHQBGm/2YmYpJ2bAEN4nAmVRZjKmzwOQQcWnq3focnNdTBwV9n88yhuKj95xb/i5/HdSpRwBbmfpXIRPTCIS5ycF0U3o8O+g7SWR9FebiHeCJXQArkNdKYIiqODXO2G9A6cCeiRANcFEsmf1HlgFmz50xc8kz+AfHHTJwrKNsNwAAAABJRU5ErkJggg==",Ct="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAAAXNSR0IArs4c6QAABWlJREFUWEftV1tsVEUY/ubspUu3W9mWGlttwXqJVRNBbqIFDbyA8mCCkAYtpEaIGBODhBCECiG+UE1EnzTempYqtSAE45saBMX40JC0IRojpd1GKM1uW7bd7V7OOWPmnD3bPTNndxYbE2I6L2dzdubMN9/3/ZchlFIXbuNB5gDOUp05BmdJIP4fDPZcxt2xaRzVgadBUQ3QDDEE5m/2zBkE1whwoYTg461LcX42LEoZZOCiMXoJoBUCHEIASgH2dBqUgijKORfBkW3/EqgUYNsPieMAmtj+Fhb2NIfFXvaFnUhCQBlI6wD8dGcBrisEP5V7fft2NuJvKcC9p6PDoLSa7cwTJgKejZj8WjLm93iWSAG2tI+qEsdlvywl6BZPqBByQgpw44fDKskEAQUF+82e5rBrxCvGz7fWZr+XkZ/ZwFTIbgkKel0K8LkPhlW2uLbSh9UNQfh9btGLIrIZ7E7WyDkaf8xYQsX538cwHE4YgKUAnz0WMgC+/EwNSn1uR5MVEcxZ/xbjUgbyi3PXDNNLAW44FjIk3rOxNpvtCseuCEFCMGcUc/2734YMFaQA178fUhlDB56vy+4s27AYlgrOocA7Z0IG60UDPLypLm8BEQBncnc2X3ITijng4ZMhM8vK+kHGIIuyI5sXZgsGn//ECmOvgMJ8rgA5/f92T8hM8rkAX/psZI+u4yClesAWhhLNhPTBpSMhfeSkF7eLoP5OHzY8FoSizGzU+vWQmXosgLvPTNTGJpNXi8lvPF4hPwoZW0YZsKw+gMWLSrMV1ASYE8V7e27WTUwnB7IzsrFVjOXzdDVWOpfgY+YO+j3YvKrCWMEkP9g9ZHjeJvErnaN9oHhYgCSrYQ5F2echKPcpSGkUE9PU3vXkMeWWJxcg6HcZAA+cGDIosgHc0THaqun0EN8ViFFqdij5SlTT8jKsa5gHJdPF/DaQwCcXotkCme+8y+/zY1m937D/W19yHmSs7eoeb0gm0v1Wi2QBEGpuAcm8buCjF6tmWqyMHPu/iWAkahQlseZm0lKw1I2mRlPm/V2D9iCxZG1pH+2j4GR2KB1lJaaE8TSTUDf88kiNB2sfKsWCMgWlXgVVARfG4xp+/iuBU72xmca7gGW2NlYaMu/vYgxyaYaBbGkPt+pUP5Trw1xGa4Nu7FhdjkULPBlDUwxGVLgVgsFIGj/+MY0rYdXwzzwvQTzFOiDHi4Fj9K14wI+V9/uxr3PQuZLs6hxviKnpfttVI+fERzdVoPoOsWmYiGt4ozsCncnFA+JeFGp0KwJuNK+pwL6OPBKzYzV/npHZoZN/74UK3OUAMJ7S8VpXBJoRsPYgEhBLskLzmkq0nR7OX+q2t4fNaHYYtUEXdq4O4N6MxGzKnzfSiExpqJnvRm8oiYtXkhiJasZqj8vMMCqzaebAsvbsiQf9OHXxRv5+kEXzZFzvt+5qgiQEmO8jhseSGjAW0w0wJW7g8Tovnqovgb+EGO+XLvTCRYBITEd3bxy/DqREQrnmojLgRt/VMaN7z9ssNLeP94GPZotR2d2CECy5x40315XZNIgldbz61U15aSLASHgSqqblB9hyfKpV07WMzHaXi3lS3NPrAnav9ePRGjOgVI3i5KUEvrucEm6HfFix2h6dnMbNqen8AHd1pxpiyWS/mS0lYSncj2cWVJURBHwEI1Ed8VQ+8sSoSasqro9OFL40beuM/UIpXSnczvjbF387484jK+VODDL/3QiPny3YsG7vGFsRT+rfE5BSC6QjB7IWWfY/91FrrwRRV0k76i2fhhcnk2obqN4IQrxOAGWevEV8UIiS1iltO/t69SEpQHnI/bcz5gDOlt/bnsF/AOXAMnuF/cdAAAAAAElFTkSuQmCC",kt="data:image/png;base64,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",St="ruleCheckBox___Onj2f",_t="folderAreaWrapper___ut2mr",jt="folderAreaHeader___fOIDA",Nt="folderWrapper___IpJ50",Et="folderIcon___zBoRM",At="shareFolderIcon____5s3p",Zt=n(69513),It={"简单":1,"适中":2,"困难":3},Dt=function e(t,n,i){return t.map((function(t){var o,a=null==t?void 0:t.tag_disciplines.map((function(e){var o=null==e?void 0:e.difficulty_count.map((function(e){return{label:null==e?void 0:e.name,value:It[e.name]}}));return{title:xe(n)===pe.All&&o.length>0?(0,je.jsxs)(P.Z,{justify:"space-between",children:[(0,je.jsx)(Te.Z,{children:"".concat(e.name,"").concat(e.child_count,"")}),(0,je.jsxs)(Te.Z,{children:[(0,je.jsx)("span",{className:"mr15",style:{color:"#666"},children:"难度"}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["".concat(t.id,"_").concat(e.id),"diffValue"],children:(0,je.jsx)(ht.Z.Group,{style:{columnGap:12},options:o})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["".concat(t.id,"_").concat(e.id),"diffNum"],initialValue:null==e?void 0:e.difficulty_count,children:(0,je.jsx)("input",{type:"hidden"})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["".concat(t.id,"_").concat(e.id),"extra"],initialValue:r()(r()({},t),{},{type:i}),children:(0,je.jsx)("input",{type:"hidden"})})]})]}):"".concat(e.name,"").concat(e.child_count,""),key:"".concat(t.id,"_").concat(e.id),name:e.name,parentName:t.name,item_banks_count:e.child_count,icon:null,isLeaf:!0,checkable:xe(n)===pe.FileFolderAndKnowledge,disableCheckbox:0===e.child_count}})),l=null==t?void 0:t.difficulty_count.map((function(e){return{label:null==e?void 0:e.name,value:It[e.name]}}));return{title:xe(n)===pe.FileFolderAndDiff&&l.length>0?(0,je.jsxs)(P.Z,{justify:"space-between",children:[(0,je.jsx)(Te.Z,{children:"".concat(t.name,"").concat(t.item_banks_count,"")}),(0,je.jsxs)(Te.Z,{children:[(0,je.jsx)("span",{className:"mr15",style:{color:"#666"},children:"难度"}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["".concat(t.id),"diffValue"],children:(0,je.jsx)(ht.Z.Group,{style:{columnGap:12},options:l})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["".concat(t.id),"diffNum"],initialValue:null==t?void 0:t.difficulty_count,children:(0,je.jsx)("input",{type:"hidden"})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["".concat(t.id),"extra"],initialValue:r()(r()({},t),{},{type:i}),children:(0,je.jsx)("input",{type:"hidden"})})]})]}):"".concat(t.name,"").concat(t.item_banks_count,""),key:"".concat(t.id),name:t.name,item_banks_count:t.item_banks_count,icon:function(e){return e.expanded?"0"===i?(0,je.jsx)("img",{src:wt,className:Et}):(0,je.jsx)("img",{src:Ct,className:At}):"0"===i?(0,je.jsx)("img",{src:bt,className:Et}):(0,je.jsx)("img",{src:kt,className:At})},isLeaf:!(t.have_child||null!==(o=t.tag_disciplines)&&void 0!==o&&o.length),checkable:xe(n)===pe.OnlyFileFolder,disableCheckbox:0===t.item_banks_count,children:t.children.length?xe(n)===pe.All||xe(n)===pe.FileFolderAndKnowledge?[].concat(Ae()(e(t.children,n,i)),Ae()(a)):e(t.children,n,i):[]}}))},Tt=function e(t,n,i){return t.map((function(t){var o,a=null==t?void 0:t.tag_disciplines.map((function(e){console.log("tagItem:",e);var o=null==e?void 0:e.difficulty_count.map((function(e){return{label:null==e?void 0:e.name,value:It[e.name]}}));return{title:xe(n)===pe.All&&o.length>0?(0,je.jsxs)(P.Z,{justify:"space-between",children:[(0,je.jsx)(Te.Z,{children:"".concat(e.name,"").concat(e.child_count,"")}),(0,je.jsxs)(Te.Z,{children:[(0,je.jsx)("span",{className:"mr15",style:{color:"#666"},children:"难度"}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["".concat(t.id,"_").concat(e.id),"diffValue"],children:(0,je.jsx)(ht.Z.Group,{style:{columnGap:12},options:o})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["".concat(t.id,"_").concat(e.id),"diffNum"],initialValue:null==e?void 0:e.difficulty_count,children:(0,je.jsx)("input",{type:"hidden"})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["".concat(t.id,"_").concat(e.id),"extra"],initialValue:r()(r()({},t),{},{type:i}),children:(0,je.jsx)("input",{type:"hidden"})})]})]}):"".concat(e.name,"").concat(e.child_count,""),key:"".concat(t.id,"_").concat(e.id),name:e.name,parentName:t.name,item_banks_count:e.child_count,icon:null,isLeaf:!0,checkable:xe(n)===pe.FileFolderAndKnowledge,disableCheckbox:0===e.child_count}})),l=null==t?void 0:t.difficulty_count.map((function(e){return{label:null==e?void 0:e.name,value:It[e.name]}}));return{title:xe(n)===pe.FileFolderAndDiff&&l.length>0?(0,je.jsxs)(P.Z,{justify:"space-between",children:[(0,je.jsx)(Te.Z,{children:"".concat(t.name,"").concat(t.item_banks_count,"")}),(0,je.jsxs)(Te.Z,{children:[(0,je.jsx)("span",{className:"mr15",style:{color:"#666"},children:"难度"}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["".concat(t.id),"diffValue"],children:(0,je.jsx)(ht.Z.Group,{style:{columnGap:12},options:l})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["".concat(t.id),"diffNum"],initialValue:null==t?void 0:t.difficulty_count,children:(0,je.jsx)("input",{type:"hidden"})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["".concat(t.id),"extra"],initialValue:r()(r()({},t),{},{type:i}),children:(0,je.jsx)("input",{type:"hidden"})})]})]}):"".concat(t.name,"").concat(t.item_banks_count,""),key:"".concat(t.id),name:t.name,item_banks_count:t.item_banks_count,icon:function(e){return e.expanded?"0"===i?(0,je.jsx)("img",{src:wt,className:Et}):(0,je.jsx)("img",{src:Ct,className:At}):"0"===i?(0,je.jsx)("img",{src:bt,className:Et}):(0,je.jsx)("img",{src:kt,className:At})},isLeaf:!(t.have_child||null!==(o=t.tag_disciplines)&&void 0!==o&&o.length),checkable:xe(n)===pe.OnlyFileFolder,disableCheckbox:0===t.item_banks_count,children:[].concat(Ae()(e(t.children,n,i)),Ae()(a))}}))},Pt=function(e){var t=e.ruleValue,n=e.defaultData,i=e.setSelectData,o=e.currentItemType,l=e.selectData,c=(0,d.useState)("1"),h=u()(c,2),p=h[0],f=h[1],m=(0,d.useState)(!0),v=u()(m,2),g=(v[0],v[1],N.Z.useForm()),y=u()(g,1)[0],x=(0,d.useState)([]),b=u()(x,2),w=b[0],C=b[1],k=(0,d.useState)("all"),S=u()(k,2),_=S[0],j=S[1],E=function(e,n,o){var a=n.checkedNodes;console.log("type:",o,a,l),"0"===o?(T(e),xe(t)===pe.OnlyFileFolder?(i((function(e){return r()(r()({},e),{},{my:a.map((function(e){return{id:e.key,group_id:e.key,group_name:e.name,item_bank_num:e.item_banks_count,folderType:"0",quanlity:1}}))})})),ge(a.reduce((function(e,t){return e+t.item_banks_count}),0))):(console.log(a),i((function(e){return r()(r()({},e),{},{my:a.map((function(e){var t=e.key.split("_"),n=u()(t,2),i=n[0],r=n[1];return{id:e.key,tag_discipline_name:e.name,group_id:i,tag_discipline_id:r,folderType:"0",group_name:e.parentName,item_bank_num:e.item_banks_count,quanlity:1}}))})})),ge(a.reduce((function(e,t){return e+t.item_banks_count}),0)))):(O(e),xe(t)===pe.OnlyFileFolder?i((function(e){return console.log("pre:",e),r()(r()({},e),{},{public:a.map((function(e){return{id:"0"===e.key?"00":e.key,teacher_group_name:e.name,teacher_group_id:e.key,folderType:"3",item_bank_num:e.item_banks_count,quanlity:1}}))})})):i((function(e){return r()(r()({},e),{},{public:a.map((function(e){var t=e.key.split("_"),n=u()(t,2),i=n[0],r=n[1];return{id:"0"===e.key?"00":e.key,tag_discipline_name:e.name,teacher_group_id:i,tag_discipline_id:r,folderType:"3",teacher_group_name:e.parentName,item_bank_num:e.item_banks_count,quanlity:1}}))})})),ge(a.reduce((function(e,t){return e+t.item_banks_count}),0)))},A=(0,d.useState)([]),Z=u()(A,2),D=Z[0],T=Z[1],M=(0,d.useState)([]),L=u()(M,2),R=L[0],O=L[1],F=(0,d.useState)([]),W=u()(F,2),H=W[0],z=W[1],G=(0,d.useState)([]),V=u()(G,2),K=V[0],U=V[1],q=(0,d.useState)([]),Y=u()(q,2),X=Y[0],J=Y[1],Q=(0,d.useState)([]),$=u()(Q,2),ee=$[0],te=$[1],ne=(0,d.useState)(!1),ie=u()(ne,2),re=ie[0],oe=ie[1],ae=(0,d.useState)(!1),le=u()(ae,2),se=le[0],ce=le[1];function de(){return(de=s()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,B.ZP)("/api/teach_group_shares.json",{method:"get"});case 2:(t=e.sent)&&C(null==t?void 0:t.groups);case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}(0,d.useEffect)((function(){!function(){de.apply(this,arguments)}()}),[]);var he=function(){var e=s()(a()().mark((function e(n){var i,r,o,l,s,c,u,d,h,p,f,m,v,g,y,x,b,w;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"0"===n.type?oe(!0):ce(!0),e.next=3,(0,Zt.ex)(n);case 3:o=e.sent,"0"===n.type?oe(!1):ce(!1),"0"===n.type?J(o):te(o),l=null===(i=o.navigation[0])||void 0===i?void 0:i.difficulty_count.map((function(e){return{label:null==e?void 0:e.name,value:It[e.name]}})),s=null===(r=o.navigation[0])||void 0===r?void 0:r.tag_disciplines.map((function(e){var i=null==e?void 0:e.difficulty_count.map((function(e){return{label:null==e?void 0:e.name,value:It[e.name]}}));return{title:xe(t)===pe.All&&i.length>0?(0,je.jsxs)(P.Z,{justify:"space-between",style:{color:"#232B40"},children:[(0,je.jsx)(Te.Z,{children:"".concat(e.name,"").concat(e.child_count,"")}),(0,je.jsxs)(Te.Z,{children:[(0,je.jsx)("span",{className:"mr15",style:{color:"#666"},children:"难度"}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["0_".concat(e.id),"diffValue"],children:(0,je.jsx)(ht.Z.Group,{style:{columnGap:12},options:i})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["0_".concat(e.id),"diffNum"],initialValue:null==e?void 0:e.difficulty_count,children:(0,je.jsx)("input",{type:"hidden"})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["0_".concat(e.id),"extra"],initialValue:{tag_discipline_name:e.name,name:"根目录",type:n.type},children:(0,je.jsx)("input",{type:"hidden"})})]})]}):(0,je.jsxs)("span",{style:{color:"#232B40"},children:[e.name,"",e.child_count,""]}),key:"0_".concat(e.id),name:e.name,parentName:"根目录",item_banks_count:e.child_count,icon:null,isLeaf:!0,checkable:xe(t)===pe.FileFolderAndKnowledge,disableCheckbox:0===e.child_count}})),"0"===n.type?(f=Dt(o.data,t,"0"),m=Tt(o.data,t,"0"),console.log("normalChildren2:",m),z([{title:xe(t)===pe.FileFolderAndDiff?(0,je.jsxs)(P.Z,{justify:"space-between",style:{color:"#232B40"},children:[(0,je.jsx)(Te.Z,{children:"根目录(".concat(null===(c=o.navigation[0])||void 0===c?void 0:c.child_count,"")}),(0,je.jsxs)(Te.Z,{children:[(0,je.jsx)("span",{className:"mr15",style:{color:"#666"},children:"难度"}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["0","diffValue"],initialValue:[],children:(0,je.jsx)(ht.Z.Group,{style:{columnGap:12},options:l})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["0","diffNum"],initialValue:null===(u=o.navigation[0])||void 0===u?void 0:u.difficulty_count,children:(0,je.jsx)("input",{type:"hidden"})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["0","extra"],initialValue:{type:"0",group_id:"0",name:"根目录"},children:(0,je.jsx)("input",{type:"hidden"})})]})]}):(0,je.jsx)("span",{style:{color:"#232B40"},children:"根目录(".concat(null===(d=o.navigation[0])||void 0===d?void 0:d.child_count,"")}),key:"0",name:"根目录",item_banks_count:null===(h=o.navigation[0])||void 0===h?void 0:h.child_count,disabled:!((null===(p=o.navigation[0])||void 0===p?void 0:p.child_count)>0),checkable:xe(t)===pe.OnlyFileFolder,icon:function(e){return e.expanded?(0,je.jsx)("img",{src:wt,className:Et}):(0,je.jsx)("img",{src:bt,className:Et})},isLeaf:!1,children:xe(t)===pe.OnlyFileFolder||xe(t)===pe.FileFolderAndDiff?f:[].concat(Ae()(m),Ae()(s))}])):(w=Dt(o.data,t,"3"),U([{title:xe(t)===pe.FileFolderAndDiff?(0,je.jsxs)(P.Z,{justify:"space-between",children:[(0,je.jsx)(Te.Z,{children:"根目录(".concat(null===(v=o.navigation[0])||void 0===v?void 0:v.child_count,"")}),(0,je.jsxs)(Te.Z,{children:[(0,je.jsx)("span",{className:"mr15",style:{color:"#666"},children:"难度"}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["0","diffValue"],children:(0,je.jsx)(ht.Z.Group,{style:{columnGap:12},options:l})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["0","diffNum"],initialValue:null===(g=o.navigation[0])||void 0===g?void 0:g.difficulty_count,children:(0,je.jsx)("input",{type:"hidden"})}),(0,je.jsx)(N.Z.Item,{noStyle:!0,name:["0","extra"],initialValue:{type:"3",group_id:"0",name:"根目录"},children:(0,je.jsx)("input",{type:"hidden"})})]})]}):(0,je.jsx)("span",{style:{color:"#232B40"},children:"根目录(".concat(null===(y=o.navigation[0])||void 0===y?void 0:y.child_count,"")}),key:"0",name:"根目录",item_banks_count:null===(x=o.navigation[0])||void 0===x?void 0:x.child_count,checkable:xe(t)===pe.OnlyFileFolder,icon:function(e){return e.expanded?(0,je.jsx)("img",{src:Ct,className:At}):(0,je.jsx)("img",{src:kt,className:At})},isLeaf:!1,disabled:!((null===(b=o.navigation[0])||void 0===b?void 0:b.child_count)>0),children:xe(t)===pe.OnlyFileFolder||xe(t)===pe.FileFolderAndDiff?w:[].concat(Ae()(w),Ae()(s))}]));case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}();(0,d.useEffect)((function(){"1"===p?he({type:"0",group_id:0,item_type:o,show_children:!0}):"2"===p&&he({type:"3",except_mine:!0,item_type:o,show_children:!0,teach_group_id:"all"===_?"":_})}),[t,p,_]),(0,d.useEffect)((function(){var e,r,o,a,s,c,u;if(console.log("selectData-active:",l,n,p),"1"===p)T(null==l||null===(e=l.my)||void 0===e?void 0:e.map((function(e){return e.id}))),ge((null==l||null===(r=l.my)||void 0===r||null===(o=r.reduce)||void 0===o?void 0:o.call(r,(function(e,t){return e+t.item_bank_num}),0))||0);else if("2"===p){var d,h,f;O(null==l||null===(d=l.public)||void 0===d?void 0:d.map((function(e){return e.id}))),ge((null==l||null===(h=l.public)||void 0===h||null===(f=h.reduce)||void 0===f?void 0:f.call(h,(function(e,t){return e+t.item_bank_num}),0))||0)}if(xe(t)===pe.All)if("1"===p)T(null==l||null===(a=l.my)||void 0===a?void 0:a.map((function(e){return e.id}))),ge((null==l?void 0:l.filter((function(e){return!e.is_share})).reduce((function(e,t){return e+t.item_bank_num}),0))||0),null==l||null===(s=l.filter((function(e){return!e.is_share})))||void 0===s||s.forEach((function(e){var t=y.getFieldValue(["".concat(e.group_id||0,"_").concat(e.tag_discipline_id),"diffValue"])||[];console.log("prev:",t),null!=t&&t.includes[e.difficulty]||y.setFieldValue(["".concat(e.group_id||0,"_").concat(e.tag_discipline_id),"diffValue"],Array.from(new Set([].concat(Ae()(t),[e.difficulty]))))}));else if("2"===p){var m,v;O(null==l||null===(m=l.public)||void 0===m?void 0:m.map((function(e){return e.id}))),ge((null==l?void 0:l.filter((function(e){return!!e.is_share})).reduce((function(e,t){return e+t.item_bank_num}),0))||0),null==l||null===(v=l.filter((function(e){return!!e.is_share})))||void 0===v||v.forEach((function(e){var t=y.getFieldValue(["".concat(e.teacher_group_id||0,"_").concat(e.tag_discipline_id),"diffValue"])||[];null!=t&&t.includes[e.difficulty]||y.setFieldValue(["".concat(e.teacher_group_id||0,"_").concat(e.tag_discipline_id),"diffValue"],Array.from(new Set([].concat(Ae()(t),[e.difficulty]))))}))}xe(t)===pe.FileFolderAndDiff&&(y.resetFields(),setTimeout((function(){i(l)}),300),"1"===p?(ge((null==l?void 0:l.filter((function(e){return!e.is_share})).reduce((function(e,t){return e+t.item_bank_num}),0))||0),null==l||null===(c=l.filter((function(e){return!e.is_share})))||void 0===c||c.forEach((function(e){var t=y.getFieldValue(["".concat(e.group_id),"diffValue"])||[];console.log("prev:",t),null!=t&&t.includes[e.difficulty]||y.setFieldValue(["".concat(e.group_id),"diffValue"],Array.from(new Set([].concat(Ae()(t),[e.difficulty]))))}))):(ge((null==l?void 0:l.filter((function(e){return!!e.is_share})).reduce((function(e,t){return e+t.item_bank_num}),0))||0),null==l||null===(u=l.filter((function(e){return!!e.is_share})))||void 0===u||u.forEach((function(e){var t=y.getFieldValue(["".concat(e.teacher_group_id),"diffValue"])||[];null!=t&&t.includes[e.difficulty]||y.setFieldValue(["".concat(e.teacher_group_id),"diffValue"],Array.from(new Set([].concat(Ae()(t),[e.difficulty]))))}))))}),[p]),console.log("1111111111:",D,R),(0,d.useEffect)((function(){setTimeout((function(){switch(xe(t)){case pe.OnlyFileFolder:var e,n=[],i=[],r=ue()(l.my||[]);try{for(r.s();!(e=r.n()).done;){var o=e.value;n.push(o)}}catch(e){r.e(e)}finally{r.f()}var a,s=ue()(l.public||[]);try{for(s.s();!(a=s.n()).done;){var c=a.value;i.push(c)}}catch(e){s.e(e)}finally{s.f()}T(n.map((function(e){return"".concat(e.group_id)}))),O(i.map((function(e){return"".concat(e.teacher_group_id)}))),ge("1"===p?n.reduce((function(e,t){return e+t.item_bank_num}),0):i.reduce((function(e,t){return e+t.item_bank_num}),0));break;case pe.FileFolderAndKnowledge:var u,d,h=[],f=[],m=ue()((null==l?void 0:l.my)||[]);try{for(m.s();!(d=m.n()).done;){var v=d.value;h.push(v)}}catch(e){m.e(e)}finally{m.f()}var g,x=ue()((null==l?void 0:l.public)||[]);try{for(x.s();!(g=x.n()).done;){var b=g.value;f.push(b)}}catch(e){x.e(e)}finally{x.f()}ge(null===(u="1"===p?h:f)||void 0===u?void 0:u.reduce((function(e,t){return e+t.item_bank_num}),0)),T(h.map((function(e){return"".concat(e.group_id,"_").concat(e.tag_discipline_id)}))),O(f.map((function(e){return"".concat(e.teacher_group_id,"_").concat(e.tag_discipline_id)})));break;case pe.All:var w,C;if("1"===p)ge((null==l?void 0:l.filter((function(e){return!e.is_share})).reduce((function(e,t){return e+t.item_bank_num}),0))||0),null==l||null===(w=l.filter((function(e){return!e.is_share})))||void 0===w||w.forEach((function(e){var t=y.getFieldValue(["".concat(e.group_id||0,"_").concat(e.tag_discipline_id),"diffValue"])||[];console.log("prev:",t,e.difficulty,e),null!=t&&t.includes[e.difficulty]||y.setFieldValue(["".concat(e.group_id||0,"_").concat(e.tag_discipline_id),"diffValue"],Array.from(new Set([].concat(Ae()(t),[e.difficulty]))))}));else ge((null==l?void 0:l.filter((function(e){return!!e.is_share})).reduce((function(e,t){return e+t.item_bank_num}),0))||0),null==l||null===(C=l.filter((function(e){return!!e.is_share})))||void 0===C||C.forEach((function(e){var t=y.getFieldValue(["".concat(e.group_id||0,"_").concat(e.tag_discipline_id),"diffValue"])||[];console.log("prev:",t,e.difficulty,e),null!=t&&t.includes[e.difficulty]||y.setFieldValue(["".concat(e.group_id||0,"_").concat(e.tag_discipline_id),"diffValue"],Array.from(new Set([].concat(Ae()(t),[e.difficulty]))))}));break;case pe.FileFolderAndDiff:var k,S;if("1"===p)ge((null==l?void 0:l.filter((function(e){return!e.is_share})).reduce((function(e,t){return e+t.item_bank_num}),0))||0),null==l||null===(k=l.filter((function(e){return!e.is_share})))||void 0===k||k.forEach((function(e){var t=y.getFieldValue(["".concat(e.group_id),"diffValue"])||[];console.log("prev:",t,e.difficulty),null!=t&&t.includes[e.difficulty]||y.setFieldValue(["".concat(e.group_id),"diffValue"],Array.from(new Set([].concat(Ae()(t),[e.difficulty]))))}));else ge((null==l?void 0:l.filter((function(e){return!!e.is_share})).reduce((function(e,t){return e+t.item_bank_num}),0))||0),null==l||null===(S=l.filter((function(e){return!!e.is_share})))||void 0===S||S.forEach((function(e){var t=y.getFieldValue(["".concat(e.group_id),"diffValue"])||[];null!=t&&t.includes[e.difficulty]||y.setFieldValue(["".concat(e.group_id),"diffValue"],Array.from(new Set([].concat(Ae()(t),[e.difficulty]))))}))}}),800)}),[n,t,H,K]);var fe=(0,d.useState)(0),me=u()(fe,2),ve=me[0],ge=me[1];return(0,je.jsx)(N.Z,{form:y,onValuesChange:function(){var e=s()(a()().mark((function e(n,o){var s,c,d,h,f,m,v,g,x,b,w,C,k,S;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("onValuesChange:",o,n),s=0,xe(t)!==pe.FileFolderAndDiff){e.next=15;break}return e.next=5,y.getFieldValue();case 5:for(c=e.sent,d=[],h=[],f=0,m=Object.keys(c);f<m.length;f++)g=m[f],null!==(v=c[g])&&void 0!==v&&null!==(v=v.diffValue)&&void 0!==v&&v.length&&"null"!==g&&null!==g&&(x=c[g],d.push(r()({id:g},x)));b={1:"简单",2:"适中",3:"困难"},d.map((function(e){var t,n,i;0==e.id&&(e.diffNum="1"===p?null==X||null===(n=X.navigation)||void 0===n||null===(n=n[0])||void 0===n?void 0:n.difficulty_count:null==ee||null===(i=ee.navigation)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.difficulty_count);null==e||null===(t=e.diffValue)||void 0===t||t.map((function(t){var n,i,r,o={group_name:(null===(n=e.extra)||void 0===n?void 0:n.name)||"",teacher_group_name:"",id:"".concat(e.id,"_").concat(t),group_id:e.id,difficulty:t,item_bank_num:null===(i=e.diffNum)||void 0===i||null===(i=i.filter((function(e){return e.name===b[t]})))||void 0===i||null===(i=i[0])||void 0===i?void 0:i.value};"2"===p&&(o.is_share=!0,o.teacher_group_id=e.id,o.teacher_group_name=null===(r=e.extra)||void 0===r?void 0:r.name);h.push(o)}))})),s=h.reduce((function(e,t){return e+t.item_bank_num}),0),i([].concat(h,Ae()(null==l?void 0:l.filter((function(e){return"1"===p?e.is_share:!e.is_share}))))),e.next=25;break;case 15:if(xe(t)!==pe.All){e.next=25;break}w=[],C=a()().mark((function e(){var t,n,i,r,l,c,d,h,f,m,v,g,y,x;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:n=S[k],i=o[n],r=i.diffNum,l=void 0===r?[]:r,c=i.diffValue,d=void 0===c?[]:c,h=i.extra,f=void 0===h?{}:h,console.log("---",f),m=n.split("_"),v=u()(m,2),g=v[0],y=v[1],x=null===(t=f.tag_disciplines)||void 0===t||null===(t=t.filter((function(e){return parseInt(e.id)===parseInt(y)})))||void 0===t?void 0:t[0],d.forEach((function(e){var t,i={1:"简单",2:"适中",3:"困难"},r=null==l||null===(t=l.find((function(t){return t.name===i[e]})))||void 0===t?void 0:t.value,o={group_name:"",teacher_group_name:"",tag_discipline_name:(null==x?void 0:x.name)||f.tag_discipline_name,id:"".concat(n,"_").concat(e),group_id:g,is_share:!!(null!=x&&x.is_share||"3"===(null==f?void 0:f.type)),tag_discipline_id:y,difficulty:e,item_bank_num:r};s+=r,"0"===f.type?o.group_name=f.name:o.teacher_group_name=f.name,"2"===p&&(o.is_share=!0,o.teacher_group_id=f.id||0,o.teacher_group_name=f.name),r>0&&w.push(o)}));case 6:case"end":return e.stop()}}),e)})),k=0,S=Object.keys(o);case 19:if(!(k<S.length)){e.next=24;break}return e.delegateYield(C(),"t0",21);case 21:k++,e.next=19;break;case 24:i([].concat(w,Ae()(null==l?void 0:l.filter((function(e){return"1"===p?e.is_share:!e.is_share})))));case 25:ge(s);case 26:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),children:(0,je.jsx)(gt.Z,{destroyInactiveTabPane:!0,activeKey:p,onChange:function(e){return f(e)},style:{minHeight:260},tabBarExtraContent:{right:"2"===p&&(null==w?void 0:w.length)>0&&(0,je.jsxs)(yt.default,{onChange:function(e){j(e)},value:_,style:{width:120},children:[(0,je.jsx)(yt.default.Option,{value:"all",children:"全部"},"all"),null==w?void 0:w.map((function(e){return(0,je.jsx)(yt.default.Option,{value:null==e?void 0:e.group_id,children:null==e?void 0:e.name},null==e?void 0:e.group_id)}))]})},items:[{key:"1",label:"我创建的",children:0===(null==H?void 0:H.length)?(0,je.jsx)(I.Z,{spinning:re,children:(0,je.jsx)(ut.Z,{ButtonTwo:(0,je.jsxs)("a",{target:"_blank",href:"/problemset",children:["前往题库,新增更多试题",">"]})})}):(0,je.jsxs)("div",{className:_t,children:[(0,je.jsxs)(P.Z,{justify:"space-between",align:"middle",className:jt,children:[(0,je.jsx)("span",{children:"文件夹"}),(0,je.jsxs)("span",{className:"mr20",children:["已选",(0,je.jsxs)("span",{style:{color:"#3061D0"},children:[" ",ve," "]}),"题"]})]}),(0,je.jsx)(I.Z,{spinning:re,children:(0,je.jsx)("div",{style:{minHeight:200},children:H.length>0&&(0,je.jsx)(xt.Z,{checkable:!0,className:Nt,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},selectable:!1,onCheck:function(e,t){return E(e,t,"0")},checkedKeys:D,checkStrictly:!0,treeData:H,showIcon:!0,blockNode:!0,defaultExpandAll:!0})})})]})},{key:"2",label:"团队共享",children:0===(null==K?void 0:K.length)?(0,je.jsx)(I.Z,{spinning:se,children:(0,je.jsx)(ut.Z,{ButtonTwo:(0,je.jsxs)("a",{target:"_blank",href:"/problemset",children:["前往题库,新增更多试题",">"]})})}):(0,je.jsxs)("div",{className:_t,children:[(0,je.jsxs)(P.Z,{justify:"space-between",align:"middle",className:jt,children:[(0,je.jsx)("span",{children:"文件夹"}),(0,je.jsxs)("span",{className:"mr20",children:["已选",(0,je.jsxs)("span",{style:{color:"#3061D0"},children:[" ",ve||0," "]}),"题"]})]}),(0,je.jsx)(I.Z,{spinning:se,children:(0,je.jsx)("div",{style:{minHeight:200},children:(null==K?void 0:K.length)>0&&(0,je.jsx)(xt.Z,{checkable:!0,className:Nt,selectable:!1,rootStyle:{paddingLeft:15,paddingRight:0,paddingTop:10},onCheck:function(e,t){return E(e,t,"3")},checkedKeys:R,checkStrictly:!0,treeData:K,showIcon:!0,blockNode:!0,defaultExpandAll:!0})})})]})}]})})},Mt=n(64165),Lt=n(82927),Bt={"简单":1,"适中":2,"困难":3},Rt=function(e){var t=e.ruleValue,n=e.setSelectData,i=e.currentItemType,o=e.defaultData,l=e.isFirst,c=(0,d.useState)([]),h=u()(c,2),p=(h[0],h[1]),f=(0,Lt.U)(G,{keyword:"",course_discipline_id:null,item_type:i}),m=u()(f,4),v=m[0],g=m[1],y=m[2],x=m[3];(0,d.useEffect)((function(){s()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,y({},!0);case 2:t=e.sent,p((0,Mt.L)(t.disciplines));case 4:case"end":return e.stop()}}),e)})))()}),[]),console.log(o),(0,d.useEffect)((function(){if(l)switch(xe(t)){case pe.OnlyKnowledge:E(o.map((function(e){return e.tag_discipline_id})));break;case pe.KnowledgeAndDiff:var e=new Map;o.forEach((function(t){t&&(e.has(t.tag_discipline_id)?e.set(t.tag_discipline_id,[].concat(Ae()(e.get(t.tag_discipline_id)),[t.difficulty])):e.set(t.tag_discipline_id,[t.difficulty]))}));var n,i=ue()(e.entries());try{for(i.s();!(n=i.n()).done;){var r=u()(n.value,2),a=r[0],s=r[1];w.setFieldValue([a,"diff"],s)}}catch(e){i.e(e)}finally{i.f()}}}),[o,t,l]);var b=N.Z.useForm(),w=u()(b,1)[0],C=(0,d.useMemo)((function(){var e,t=[];console.log(x,"disciplineRes");var n,i=ue()((null==x||null===(e=x.data)||void 0===e?void 0:e.list)||[]);try{for(i.s();!(n=i.n()).done;){var r=n.value,o={course_discipline_name:null==r?void 0:r.course_discipline_name,tag_discipline_name:r.name,id:r.id,item_bank_num:r.total_count,difficulty_count:r.difficulty_count,tag_discipline_id:r.id};t.push(o)}}catch(e){i.e(e)}finally{i.f()}return t}),[x,o]),k=[{title:"知识点",dataIndex:"tag_discipline_name",show:!0,render:function(e,t){var n=t.item_bank_num;return(0,je.jsxs)("div",{children:[e,"(".concat(n,")")]})}},{title:"所属课程",dataIndex:"course_discipline_name",ellipsis:!0,show:!0},{title:"难度",width:"35%",show:t.includes(me.Difficulty),render:function(e,t){var n=t.id,i=t.difficulty_count,r=t.total_count,o=t.course_discipline_name,a=t.tag_discipline_name;return(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(N.Z.Item,{name:[n,"diff"],noStyle:!0,children:(0,je.jsx)(ht.Z.Group,{style:{columnGap:12},options:i.map((function(e){return{label:e.name,value:Bt[e.name]}}))})}),(0,je.jsx)(N.Z.Item,{name:[n,"extra"],initialValue:{difficulty_count:i,total_count:r,course_discipline_name:o,tag_discipline_name:a},noStyle:!0,children:(0,je.jsx)("input",{type:"hidden"})})]})}}].filter((function(e){return e.show})),S=(0,d.useState)([]),_=u()(S,2),j=_[0],E=_[1],A=(0,d.useRef)(new Map);return(0,je.jsxs)("div",{style:{marginTop:12},children:[(0,je.jsxs)(P.Z,{className:"mb20",align:"middle",gutter:20,children:[(0,je.jsx)(Te.Z,{children:(0,je.jsx)(_e.q,{size:"large",style:{width:240},showLinkButton:!1,onChange:function(e){y({course_discipline_id:e})}})}),(0,je.jsx)(Te.Z,{children:(0,je.jsx)(dt.t7,{style:{width:300},placeholder:"请输入知识点名称进行搜索",value:v.keyword,onChange:function(e){return y({keyword:e})}})})]}),(0,je.jsx)(N.Z,{form:w,onValuesChange:function(e,t){console.log(t),A.current.clear();for(var i=function(){var e,n=a[o],i={1:"简单",2:"适中",3:"困难"},l=t[n],s=l.extra||{},c=s.difficulty_count;s.total_count;null==l||null===(e=l.diff)||void 0===e||e.forEach((function(e){var t,o=null==c||null===(t=c.find((function(t){return t.name===i[e]})))||void 0===t?void 0:t.value,a=r()(r()({},l.extra),{},{id:"".concat(n,"_").concat(e),difficulty:e,item_bank_num:o,tag_discipline_id:n});o>0&&A.current.set("".concat(n,"_").concat(e),a)}))},o=0,a=Object.keys(t);o<a.length;o++)i();n(Ae()(A.current.values()))},children:0===(null==C?void 0:C.length)?(0,je.jsx)(ut.Z,{ButtonTwo:(0,je.jsxs)("a",{target:"_blank",href:"/problemset",children:["前往题库,新增更多试题",">"]})}):(0,je.jsx)(mt.Z,{rowSelection:xe(t)===pe.OnlyKnowledge?{preserveSelectedRowKeys:!0,type:"checkbox",onChange:function(e,t){console.log("table-selectedRowKeys:",e,t),E(e),n(t)},getCheckboxProps:function(e){return{disabled:0===e.item_bank_num}},selectedRowKeys:j}:void 0,columns:k,dataSource:C,loading:g,scroll:{y:480},rowKey:"id",pagination:!1})})]})},Ot={"简单":1,"适中":2,"困难":3},Ft=function(e){var t,n=e.open,i=e.onCancel,o=e.setVisibleModalType,l=e.currentItemType,c=(0,d.useContext)(ve),h=c.data,p=c.dispatch,f=(0,d.useState)([]),m=u()(f,2),v=m[0],g=m[1],y=(0,d.useState)(),x=u()(y,2),b=x[0],w=x[1],C=null==h||null===(t=h.item_types)||void 0===t?void 0:t.find((function(e){return e.item_type===l}));(0,d.useEffect)((function(){if(n){var e,t=null==h||null===(e=h.item_types)||void 0===e?void 0:e.find((function(e){return e.item_type===l}));if((null==t?void 0:t.random_rule_type)!==pe.Shixun){var i,r=ge[null==t?void 0:t.random_rule_type]||[];g(r);var o=null==h||null===(i=h.item_types)||void 0===i||null===(i=i.find((function(e){return e.item_type===l})))||void 0===i?void 0:i.contents;switch(console.log("----xxx",xe(r)),xe(r)){case pe.OnlyDifficulty:I(o.map((function(e){return e.difficulty})));break;case pe.OnlyFileFolder:case pe.FileFolderAndKnowledge:I({my:null==o?void 0:o.filter((function(e){return"NaN"!==parseInt(e.teacher_group_id)&&!e.teacher_group_id&&0!==e.teacher_group_id})),public:null==o?void 0:o.filter((function(e){return parseInt(e.teacher_group_id)>=0}))}),w({my:null==o?void 0:o.filter((function(e){return"NaN"!==parseInt(e.teacher_group_id)&&!e.teacher_group_id&&0!==e.teacher_group_id})),public:null==o?void 0:o.filter((function(e){return parseInt(e.teacher_group_id)>=0}))});break;case pe.FileFolderAndDiff:case pe.All:I(o),w(o);break;default:I(o)}}}}),[n]);var k=(0,d.useState)([]),S=u()(k,2),_=S[0],N=S[1];(0,d.useEffect)((function(){n&&function(e){return K.apply(this,arguments)}({item_type:l}).then((function(e){0===e.status&&N(e.data)}))}),[n]),(0,d.useEffect)((function(){console.log("selectData",b)}),[b]);var E=(0,d.useState)(),A=u()(E,2),Z=A[0],I=A[1],D=(0,d.useState)(!0),T=u()(D,2),P=T[0],M=T[1];console.log("isFirst:",P);var L=function(e){g(e),w([]),I([]),M(!1)};return(0,je.jsxs)(De.Z,{title:"设置抽题规则",width:948,closable:!0,centered:!0,open:n,onCancel:i,destroyOnClose:!0,onOk:s()(a()().mark((function e(){var t,n,i,s,c,u,d,f,m;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(void 0!==b){e.next=3;break}return o(""),e.abrupt("return");case 3:if("[object Object]"!==Object.prototype.toString.call(b)){e.next=7;break}if(null!==(t=b.my)&&void 0!==t&&t.length||null!==(n=b.public)&&void 0!==n&&n.length){e.next=7;break}return j.ZP.warning("试题总数=0请先设置抽题规则"),e.abrupt("return");case 7:if(Object.keys(b).length||null!=b&&b.length){e.next=10;break}return j.ZP.warning("试题总数=0请先设置抽题规则"),e.abrupt("return");case 10:i=xe(v),e.t0=i,e.next=e.t0===pe.OnlyFileFolder?14:e.t0===pe.OnlyDifficulty?16:e.t0===pe.OnlyKnowledge?20:e.t0===pe.KnowledgeAndDiff?22:e.t0===pe.FileFolderAndDiff?24:e.t0===pe.FileFolderAndKnowledge?26:e.t0===pe.All?28:30;break;case 14:return p({type:"editRule",payload:{itemType:l,tableData:[].concat(Ae()(b.my||[]),Ae()(b.public||[])),randomRuleType:i}}),e.abrupt("break",30);case 16:return f=null==h||null===(s=h.item_types)||void 0===s||null===(s=s.find((function(e){return e.item_type===l})))||void 0===s?void 0:s.contents,m=[{},{value:null===(c=_.find((function(e){return"简单"===e.name})))||void 0===c?void 0:c.value},{value:null===(u=_.find((function(e){return"适中"===e.name})))||void 0===u?void 0:u.value},{value:null===(d=_.find((function(e){return"困难"===e.name})))||void 0===d?void 0:d.value}],p({type:"editRule",payload:{itemType:l,tableData:b.map((function(e,t){var n,i,r;return{difficulty:e,id:t,quanlity:(null==f||null===(n=f.filter((function(e){return e.id===t})))||void 0===n||null===(n=n[0])||void 0===n?void 0:n.quanlity)||1,item_bank_num:1===(null==_?void 0:_.length)?null===(i=_[0])||void 0===i?void 0:i.value:null==m||null===(r=m[e])||void 0===r?void 0:r.value}})),randomRuleType:i}}),e.abrupt("break",30);case 20:case 22:case 24:return p({type:"editRule",payload:{itemType:l,tableData:b.map((function(e){return r()(r()({},e),{},{quanlity:e.quanlity||1})})),randomRuleType:i}}),e.abrupt("break",30);case 26:return p({type:"editRule",payload:{itemType:l,tableData:[].concat(Ae()(b.my||[]),Ae()(b.public||[])),randomRuleType:i}}),e.abrupt("break",30);case 28:return p({type:"editRule",payload:{itemType:l,tableData:b.map((function(e){return r()(r()({},e),{},{quanlity:e.quanlity||1})})),randomRuleType:i}}),e.abrupt("break",30);case 30:o("");case 31:case"end":return e.stop()}}),e)}))),children:[(0,je.jsx)(ht.Z.Group,{className:"".concat(St),style:{marginBottom:8},value:v,onChange:function(e){var t;null!=v&&v.length&&(null==C||null===(t=C.contents)||void 0===t?void 0:t.length)>0?De.Z.confirm({title:"提示",content:"切换规则后,之前的抽题配置将被清空!",okText:"立即切换",cancelText:"暂不切换",onOk:function(){return L(e)}}):L(e)},options:[{label:"指定文件夹抽题",value:me.FileFolder},{label:"指定难度抽题",value:me.Difficulty},{label:"指定知识点抽题",value:me.Knowledge}]}),v.includes(me.FileFolder)?(0,je.jsx)(Pt,{defaultData:Z,selectData:b,ruleValue:v,setSelectData:w,currentItemType:l}):v.includes(me.Knowledge)?(0,je.jsx)(Rt,{defaultData:Z,isFirst:P,ruleValue:v,setSelectData:w,currentItemType:l}):v.includes(me.Difficulty)?(0,je.jsxs)("div",{style:{marginTop:12},children:[(0,je.jsx)("span",{className:"mr20",style:{color:"#666"},children:"难度"}),(0,je.jsx)(ht.Z.Group,{style:{columnGap:12},options:_.map((function(e){return{label:e.name,value:Ot[e.name]}})),value:b||Z,onChange:function(e){return w(e)}})]}):null]})},Wt=function(e){var t=e.open,n=e.onCancel,i=e.setVisibleModalType,r=e.currentItemType;return t?(0,je.jsx)(Ft,{open:t,onCancel:n,setVisibleModalType:i,currentItemType:r}):null},Ht=n(17149),zt=n(25399),Gt=n(66047),Vt=n(21204),Kt=n(83449),Ut=n(30406),qt=n(61485),Yt=n(84698),Xt=function(e){var t=e.open,n=e.onCancel,i=e.onOk,r=(0,d.useContext)(ve).data,o=(0,Gt.g)(),a=(0,Lt.U)(Vt.Gm,{page:1,limit:10,keyword:"",diff:"",shixun_publish_status:"",discipline_id:"",sub_discipline_id:"",type:0,include_shixuns:!0,item_type:"SHIXUN"}),l=u()(a,4),s=l[0],c=l[1],h=l[2],p=l[3],f=(0,d.useState)(!1),m=u()(f,2),v=m[0],g=m[1];(0,d.useEffect)((function(){if(t){h({page:1,limit:10,type:0},!0).then((function(e){0===(null==e?void 0:e.shixuns_count)&&g(!0)}));var e=r.item_types.find((function(e){return"PRACTICAL"===e.item_type}));w(e.item_banks.map((function(e){return e.id}))),_(e.item_banks)}}),[t,r]);var y=(0,d.useState)([]),x=u()(y,2),b=x[0],w=x[1],C=(0,d.useState)([]),k=u()(C,2),S=k[0],_=k[1];return(0,je.jsxs)(De.Z,{title:"选择实训题",open:t,width:948,centered:!0,closable:!0,onCancel:n,onOk:function(){return i(S)},destroyOnClose:!0,children:[(0,je.jsxs)(P.Z,{justify:"space-between",className:"mb20",style:{maxHeight:650},children:[(0,je.jsxs)(Te.Z,{children:[(0,je.jsx)(Ht.Z,{style:{width:160},size:"large",placeholder:"请选择方向&课程",options:o,onChange:function(e){h({page:1,discipline_id:null==e?void 0:e[0],sub_discipline_id:null==e?void 0:e[1]})}}),(0,je.jsx)(yt.default,{className:"ml20",style:{width:118},size:"large",placeholder:"难度",allowClear:!0,options:[{label:"简单",value:1},{label:"适中",value:2},{label:"困难",value:3}],onChange:function(e){return h({page:1,diff:e})}}),(0,je.jsx)(yt.default,{className:"ml20",placeholder:"全部状态",style:{width:118},size:"large",allowClear:!0,options:[{label:"未发布",value:"unpublish"},{label:"静默发布",value:"silent_publish"},{label:"公开发布",value:"public_publish"}],onChange:function(e){return h({page:1,shixun_publish_status:e})}})]}),(0,je.jsx)(dt.t7,{placeholder:"请输入关键词搜索",style:{width:290},onChange:function(e){h({keyword:e,page:1})}})]}),v?(0,je.jsx)("div",{children:(0,je.jsx)(ut.Z,{customText:"暂无数据",ButtonText:"前往实践项目库,添加更多试题>",ButtonClick:function(){return(0,Ut.xg)("/shixuns")}})}):(0,je.jsx)(mt.Z,{loading:c,rowKey:"id",columns:[{title:"试题名称",dataIndex:"name",width:"30%",ellipsis:{showTitle:!0},render:function(e,t){return(0,je.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,je.jsx)("div",{className:null!=t&&t.high_resources_consume?rt:"",title:e||"--",children:(0,je.jsx)(Kt.Z,{showLines:1,showTextOnly:!0,value:e||"--"},1)}),(null==t?void 0:t.high_resources_consume)&&(0,je.jsx)(Yt.Z,{type:"shixun",style:{marginLeft:10}})]})}},{title:"难度",dataIndex:"level"},{title:"关卡数量",dataIndex:"challenges_count",key:"challenges_count",render:function(e,t,n){return(0,je.jsx)("span",{children:e||"- -"})}},{title:"使用次数",dataIndex:"study_count"},{title:(0,je.jsxs)("span",{children:["发布状态 ",(0,je.jsx)(zt.Z,{title:"未发布的实践项目不能被选用",children:(0,je.jsx)(qt.Z,{})})]}),dataIndex:"shixun_tag_num_name",key:"shixun_tag_num_name",width:100,render:function(e,t,n){return(0,je.jsx)("span",{children:e||"- -"})}},{title:"操作",render:function(e,t){var n=t||{},i=n.title,r=n.challenge_names,o=n.author_name,a=n.identifier,l=n.author_school_name,s=n.study_count;return(0,je.jsxs)("div",{children:[(0,je.jsx)("span",{style:{color:"#165DFF",cursor:"pointer"},onClick:function(){De.Z.confirm({title:"题目详情",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:(0,je.jsxs)("div",{children:[(0,je.jsx)(Kt.Z,{value:i,style:{marginBottom:18}}),(0,je.jsx)("div",{className:qe,children:r.map((function(e,t){return(0,je.jsxs)("div",{className:Ye,children:["第",(0,Ut.EM)(t+1),"题 ",e]},t)}))}),(0,je.jsxs)(P.Z,{className:Xe,justify:"space-between",style:{alignItems:"center"},children:[(0,je.jsxs)(Te.Z,{className:Je,children:[(0,je.jsx)("span",{children:"创建者"}),(0,je.jsx)("span",{className:Qe,children:o.split("、")[0]}),(0,je.jsx)("span",{children:"所属单位"}),(0,je.jsx)("span",{className:Qe,children:l}),(0,je.jsx)("span",{children:"学习人数"}),(0,je.jsx)("span",{className:Qe,children:s})]}),(0,je.jsxs)(L.ZP,{type:"primary",className:$e,onClick:function(){return(0,Ut.xg)("/shixuns/".concat(a,"/challenges?exercise=true"))},children:[(0,je.jsx)("i",{className:"iconfont icon-shixunkecheng"}),"实训详情"]})]})]})})},children:"查看"}),1===(null==t?void 0:t.shixun_tag_num)&&(0,je.jsx)("a",{target:"_blank",href:"/shixuns/".concat(null==t?void 0:t.identifier,"/challenges"),style:{marginLeft:10},children:"去发布"})]})}}],dataSource:null==p?void 0:p.items,rowSelection:{selectedRowKeys:b,preserveSelectedRowKeys:!0,getCheckboxProps:function(e){return{disabled:1===e.shixun_tag_num}},onChange:function(e,t){console.log(e),w(e);var n,i=[],r=ue()(S);try{for(r.s();!(n=r.n()).done;){var o=n.value;e.includes(o.id)&&i.push(o)}}catch(e){r.e(e)}finally{r.f()}var a,l=i.map((function(e){return e.id})),s=ue()(t);try{for(s.s();!(a=s.n()).done;){var c,u,d,h=a.value;if(h&&e.includes(h.id)&&!l.includes(h.id))i.push({id:h.id,difficulty:h.level,identifier:h.identifier,name:h.name,real_name:null==h||null===(c=h.author_name)||void 0===c?void 0:c.split("、")[0],school_name:h.author_school_name,challenge_names:h.challenge_names,challenges:null===(u=h.challenge_names)||void 0===u?void 0:u.map((function(e,t){return{subject:e,id:t,score:5}})),score:5*(null===(d=h.challenge_names)||void 0===d?void 0:d.length),study_count:h.study_count,challenges_count:h.challenges_count})}}catch(e){s.e(e)}finally{s.f()}_(i)}},pagination:{current:s.page,pageSize:s.limit,total:null==p?void 0:p.items_count,showTotal:function(e){return(0,je.jsxs)("span",{children:["共 ",(0,je.jsx)("span",{style:{color:"#165DFF"},children:e})," 条数据"]})},showQuickJumper:!0,onChange:function(e,t){h({page:e,limit:t})},size:"default"},scroll:{y:400}})]})},Jt=n(22061),Qt=function(e){var t=e.onDelete,n=e.list,i=e.onSelect,o=(0,d.useState)(!1),a=u()(o,2),l=a[0],s=(a[1],(0,d.useContext)(ve)),c=s.dispatch,h=s.disabled,p=(0,d.useState)(null),f=u()(p,2),m=f[0],v=f[1],g=(0,d.useState)(!1),y=u()(g,2),x=y[0],b=y[1];return(0,je.jsx)(Jt.Z5,{onDragStart:function(){b(!0)},onDragEnd:function(e){if(b(!1),e.destination){var t=function(e,t,n){var i=Array.from(e),r=i.splice(t,1),o=u()(r,1)[0];return i.splice(n,0,o),i}(n,e.source.index,e.destination.index);c({type:"updateItemTypes",payload:t})}},children:(0,je.jsx)(Jt.bK,{droppableId:"droppable",children:function(e,o){return(0,je.jsxs)("div",r()(r()({},e.droppableProps),{},{ref:e.innerRef,children:[(0,je.jsx)(I.Z,{spinning:l,children:n.map((function(e,n){return(0,je.jsx)(Jt._l,{draggableId:n.toString(),index:n,isDragDisabled:m!==e.item_type,children:function(o,a){return(0,je.jsxs)(P.Z,r()(r()(r()({align:"middle",wrap:!1,ref:o.innerRef},o.draggableProps),o.dragHandleProps),{},{className:"".concat(Oe," ").concat(x?Ge:""),children:[(0,je.jsxs)(Te.Z,{className:ze,onClick:function(){i(e.item_type),(0,Ut.k3)()},children:[(0,je.jsxs)("span",{className:Fe,children:[(0,Ut.EM)(n+1),"、【",e.item_type_text,"】"]}),(0,je.jsx)(zt.Z,{title:"".concat(e.item_bank_count,"小题,共").concat(parseFloat(e.total_score).toFixed(1),"分)"),children:(0,je.jsx)("span",{className:We,children:"".concat(e.item_bank_count,"小题,共").concat(parseFloat(e.total_score).toFixed(1),"分)")})})]}),!h&&(0,je.jsxs)(je.Fragment,{children:[(0,je.jsx)(zt.Z,{title:"长按可进行拖拽排序",open:m===e.item_type&&!x,children:(0,je.jsx)("div",{style:{cursor:"grab"},className:"".concat(He," ").concat(x?Ve:""),onMouseEnter:function(){v(e.item_type)},onMouseLeave:function(){return v(null)},children:(0,je.jsx)("i",{className:"iconfont icon-tuodong1 ".concat(Ke)})})}),(0,je.jsx)(zt.Z,{title:"删除",children:(0,je.jsx)("div",{className:"".concat(He," ").concat(x?Ve:""),style:{cursor:"pointer"},onClick:function(){return t(e.item_type)},children:(0,je.jsx)("i",{className:"iconfont icon-shanchu12 ".concat(Ue)})})})]})]}))}},n)}))}),e.placeholder]}))}})})},$t=n(71114),en="timelineWrapper___LP9aM",tn="title___KUHj_",nn="desc___ubc8E",rn="titles___njkjf",on="questionDetailWrapper___p4SFM",an="questionTitle___JC9X6",ln="questionScoreInfo___NgOJI",sn="deleteIcon___oMVTN",cn="deleteBtn___JUPEl",un="normalText___FW9Y_",dn="folderIcon___gvacQ",hn="challengeNameWrapper___fG7Vv",pn="challengeName___Ia1Xs",fn="shixunPreviewFooter___rKsnN",mn="shixunInfoWrapper___FEnDb",vn="shixunInfo___TbrA2",gn="btnToDetail___dqLQP",yn="q_title___qnv4p",xn=n(73631),bn=n(31328),wn=function(e,t,n,i){for(var r=he()(he()(he()(he()(he()(he()(he()(he()({},pe.OnlyDifficulty,[{title:"难度",key:"difficulty",render:function(e,t){var n=t.difficulty;return(0,je.jsx)("span",{style:{color:we[n].color},children:we[n].label})}}]),pe.OnlyKnowledge,[{title:"知识点",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"所属课程",dataIndex:"course_discipline_name",width:180,ellipsis:{showTitle:!0},render:function(e,t){return"".concat(e)}}]),pe.OnlyFileFolder,[{title:"文件夹",render:function(e,t,n){var i=t.group_name,r=t.teacher_group_name,o=i||r,a=r?bn:xn;return(0,je.jsxs)("div",{style:{display:"flex"},children:[(0,je.jsx)("img",{src:a,className:dn})," ",(0,je.jsx)(zt.Z,{title:o,children:(0,je.jsx)("span",{className:rn,children:o})})]})}},{title:"类型",render:function(e,t){var n=t.teacher_group_name;return(0,je.jsx)("span",{children:n?"团队共享":"我创建的"})}}]),pe.KnowledgeAndDiff,[{title:"知识点",dataIndex:"tag_discipline_name",ellipsis:{showTitle:!0}},{title:"所属课程",width:180,dataIndex:"course_discipline_name",ellipsis:{showTitle:!0}},{title:"难度",key:"difficulty",render:function(e,t){var n=t.difficulty;return(0,je.jsx)("span",{style:{color:we[n].color},children:we[n].label})}}]),pe.FileFolderAndKnowledge,[{title:"知识点",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"文件夹",render:function(e,t){var n=t.group_name,i=t.teacher_group_name,r=n||i,o=i?bn:xn;return(0,je.jsxs)("div",{style:{display:"flex"},children:[(0,je.jsx)("img",{src:o,className:dn})," ",(0,je.jsx)(zt.Z,{title:r,children:(0,je.jsx)("span",{className:rn,children:r})})]})}},{title:"类型",render:function(e,t){var n=t.teacher_group_name;return(0,je.jsx)("span",{children:n?"团队共享":"我创建的"})}}]),pe.FileFolderAndDiff,[{title:"文件夹",render:function(e,t){var n=t.group_name,i=t.teacher_group_name,r=n||i,o=i?bn:xn;return(0,je.jsxs)("div",{style:{display:"flex"},children:[(0,je.jsx)("img",{src:o,className:dn})," ",(0,je.jsx)(zt.Z,{title:r,children:(0,je.jsx)("span",{className:rn,children:r})})]})}},{title:"类型",render:function(e,t){var n=t.teacher_group_name;return(0,je.jsx)("span",{children:n?"团队共享":"我创建的"})}},{title:"难度",key:"difficulty",render:function(e,t){var n=t.difficulty;return(0,je.jsx)("span",{style:{color:we[n].color},children:we[n].label})}}]),pe.All,[{title:"知识点",dataIndex:"tag_discipline_name",ellipsis:!0},{title:"文件夹",render:function(e,t){var n=t.group_name,i=t.teacher_group_name,r=t.teacher_group_id,o=n||i,a=r||0===r?bn:xn;return(0,je.jsxs)("div",{style:{display:"flex"},children:[(0,je.jsx)("img",{src:a,className:dn})," ",(0,je.jsx)(zt.Z,{title:o,children:(0,je.jsx)("span",{className:rn,children:o})})]})}},{title:"类型",render:function(e,t){var n=t.teacher_group_id;return(0,je.jsx)("span",{children:n||0===n?"团队共享":"我创建的"})}},{title:"难度",key:"difficulty",render:function(e,t){var n=t.difficulty;return(0,je.jsx)("span",{style:{color:we[n].color},children:we[n].label})}}]),pe.Shixun,[]),o=0,a=Object.values(r);o<a.length;o++){a[o].push({title:"抽题数量",key:"quanlity",render:function(e,r){var o=r||{},a=o.item_bank_num,l=o.quanlity,s=o.id,c=o.teacher_group_id;return(0,je.jsxs)(P.Z,{align:"middle",children:[(0,je.jsx)(M.Z,{disabled:i,min:1,max:a,size:"large",precision:0,value:l,onChange:function(e){t({type:"changeQuestionNum",payload:{itemType:n,id:s,num:e,teacher_group_id:c}})}}),(0,je.jsxs)("span",{className:"ml10 font14",style:{color:"#333333"},children:["/",a]})]})}},{title:"操作",key:"action",align:"right",render:function(e,r){var o=r.id,a=r.is_share;return i?(0,je.jsx)("span",{className:"cursorNotAllowed c-grey-999",children:"删除"}):(0,je.jsx)("span",{className:cn,onClick:function(){t({type:"deleteRule",payload:{itemType:n,id:o,is_share:a}})},children:"删除"})}})}return r[e]},Cn=function(e){var t,n,i,r,o=e.setVisibleModalType,a=(0,d.useContext)(ve),l=a.data,s=a.dispatch,c=a.disabled,u=null==l||null===(t=l.item_types)||void 0===t?void 0:t.find((function(e){return"PRACTICAL"===e.item_type}));return(0,je.jsx)($t.Z,{className:en,items:[{children:(0,je.jsxs)("div",{style:{transform:"translateY(-4px)"},children:[(0,je.jsxs)(P.Z,{className:"mb20",align:"middle",justify:"space-between",children:[(0,je.jsxs)(Te.Z,{children:[(0,je.jsx)("span",{className:tn,children:"题库选题"}),(0,je.jsx)("span",{className:nn,children:"(需要先从题库中选择实训题,再设置从已选实训题中随机抽题的数量)"})]}),!c&&(0,je.jsx)(dt.op,{style:{width:102},onClick:function(){return o("selectShixun")},children:"从题库选择"})]}),0===(null==u||null===(n=u.item_banks)||void 0===n?void 0:n.length)?(0,je.jsx)(ut.Z,{customText:"暂无待抽试题,请先从题库进行选择~"}):(0,je.jsx)(mt.Z,{rowKey:"id",className:"mb10",columns:[{title:"序号",width:60,render:function(e,t,n){return(0,je.jsx)("span",{children:n+1})}},{title:"试题名称",dataIndex:"name",width:"40%",ellipsis:{showTitle:!0},render:function(e,t){return(0,je.jsxs)("div",{style:{display:"flex",alignItems:"center"},children:[(0,je.jsx)("div",{className:null!=t&&t.high_resources_consume?yn:"",title:e||"--",children:(0,je.jsx)(Kt.Z,{showLines:1,showTextOnly:!0,value:e},1)}),(null==t?void 0:t.high_resources_consume)&&(0,je.jsx)(Yt.Z,{type:"shixun",style:{marginLeft:10}})]})}},{title:"使用次数",dataIndex:"study_count"},{title:"关卡数量",dataIndex:"challenges_count",key:"challenges_count",render:function(e,t,n){return(0,je.jsx)("span",{children:e||"- -"})}},{title:"难度",dataIndex:"difficulty"},{title:"操作",align:"right",width:180,render:function(e,t,n){var i=t||{},r=i.id,o=i.identifier,a=i.name,l=(i.challenge_names,i.real_name),u=i.school_name,d=i.study_count,h=i.challenges,p=void 0===h?[]:h;return(0,je.jsxs)("div",{children:[(0,je.jsx)("span",{style:{color:"#165DFF",cursor:"pointer",marginLeft:20},onClick:function(){De.Z.confirm({title:"题目详情",closable:!0,width:1e3,centered:!0,icon:null,footer:null,content:(0,je.jsxs)("div",{children:[(0,je.jsx)(Kt.Z,{value:a,style:{marginBottom:18}}),(0,je.jsx)("div",{className:hn,children:null==p?void 0:p.map((function(e,t){return(0,je.jsxs)("div",{className:pn,children:["第",(0,Ut.EM)(t+1),"题 ",null==e?void 0:e.subject]},t)}))}),(0,je.jsxs)(P.Z,{className:fn,justify:"space-between",style:{alignItems:"center"},children:[(0,je.jsxs)(Te.Z,{className:mn,children:[(0,je.jsx)("span",{children:"创建者"}),(0,je.jsx)("span",{className:vn,children:l}),(0,je.jsx)("span",{children:"所属单位"}),(0,je.jsx)("span",{className:vn,children:u}),(0,je.jsx)("span",{children:"学习人数"}),(0,je.jsx)("span",{className:vn,children:d})]}),(0,je.jsxs)(L.ZP,{type:"primary",className:gn,onClick:function(){return(0,Ut.xg)("/shixuns/".concat(o,"/challenges?exercise=true"))},children:[(0,je.jsx)("i",{className:"iconfont icon-shixunkecheng"}),"实训详情"]})]})]})})},children:"查看"}),!c&&(0,je.jsx)("span",{onClick:function(){s({type:"deleteShixunQuestion",payload:{shixunId:r}})},className:"ml20 ".concat(cn),children:"删除"})]})}}],dataSource:(null==u?void 0:u.item_banks)||[],pagination:!1})]})},{children:(0,je.jsxs)(P.Z,{style:{transform:null!=u&&null!==(i=u.item_banks)&&void 0!==i&&i.length?"translateY(-8px)":"none"},align:"middle",justify:"space-between",children:[(0,je.jsx)("span",{className:tn,children:"已选实训题中随机抽题"}),!(null==u||null===(r=u.item_banks)||void 0===r||!r.length)&&(0,je.jsx)(Te.Z,{children:(0,je.jsxs)(P.Z,{align:"middle",children:[(0,je.jsx)("span",{className:un,children:"抽题数量"}),(0,je.jsx)(M.Z,{min:0,disabled:c,max:null==u?void 0:u.item_bank_num,size:"large",className:"ml10 mr10",value:(null==u?void 0:u.item_bank_count)||1,onChange:function(e){return s({type:"changeQuestionNum",payload:{num:e||1,itemType:"PRACTICAL"}})}}),(0,je.jsxs)("span",{className:"".concat(un," mr30"),children:["/",null==u?void 0:u.item_bank_num]}),(0,je.jsx)("span",{className:un,children:"每题分值"}),(0,je.jsx)(M.Z,{disabled:c,min:0,max:100,size:"large",precision:1,className:"ml10 mr10",value:null==u?void 0:u.score,onChange:function(e){return s({type:"changeQuestionScore",payload:{score:e,itemType:"PRACTICAL"}})}}),(0,je.jsx)("span",{className:un,children:"分"})]})})]})}]})},kn=function(e){var t,n,i=e.setVisibleModalType,r=e.currentItemType,o=e.onDelete,a=(0,A.useParams)(),l=(0,d.useContext)(ve),s=l.data,c=l.dispatch,u=l.disabled,h=(null==s||null===(t=s.item_types)||void 0===t?void 0:t.findIndex((function(e){return e.item_type===r})))+1,p=null==s||null===(n=s.item_types)||void 0===n?void 0:n.find((function(e){return e.item_type===r}));return(0,je.jsxs)("div",{className:on,children:[(0,je.jsxs)(P.Z,{justify:"space-between",align:"middle",className:"mb30",children:[(0,je.jsxs)(Te.Z,{children:[(0,je.jsx)("span",{className:an,children:"".concat((0,Ut.EM)(h),"、").concat(null==p?void 0:p.item_type_text)}),(0,je.jsxs)("span",{className:ln,children:["",(0,je.jsx)("span",{style:{color:"#3061D0"},children:null==p?void 0:p.item_bank_count}),"小题 ",(0,je.jsxs)("span",{children:[",共",(0,je.jsx)("span",{style:{color:"#3061D0"},children:null==p?void 0:p.total_score}),"分"]}),""]})]}),!u&&(0,je.jsx)("i",{className:"iconfont icon-shanchutimu ".concat(sn),onClick:function(){return o(r)}})]}),"PRACTICAL"===r?(0,je.jsx)(Cn,{setVisibleModalType:i}):(0,je.jsx)(je.Fragment,{children:0===(null==p?void 0:p.contents.length)?(0,je.jsx)(ut.Z,{styles:{margin:"70px auto 100px auto"},customText:(0,je.jsxs)("span",{children:["暂无抽题规则,支持",(0,je.jsx)("span",{style:{color:"#EA9741"},children:"指定文件夹、难度、知识点"}),"进行抽题~"]}),ButtonTwo:(null==a?void 0:a.id)&&(0,je.jsx)(P.Z,{justify:"center",className:"mt30",children:(0,je.jsx)(dt.op,{style:{width:136,marginTop:-10},onClick:function(){return i("rule")},children:"设置抽题规则"})})}):(0,je.jsxs)(je.Fragment,{children:[(0,je.jsxs)(P.Z,{justify:"space-between",align:"middle",className:"mb20",children:[(0,je.jsx)(Te.Z,{children:(0,je.jsxs)(P.Z,{align:"middle",children:[(0,je.jsx)("span",{className:"".concat(un),children:"每题分值"}),(0,je.jsx)(M.Z,{disabled:u,size:"large",className:"ml10 mr10",min:.1,max:100,value:null==p?void 0:p.score,precision:1,onChange:function(e){return c({type:"changeQuestionScore",payload:{score:e,itemType:r}})}}),(0,je.jsx)("span",{className:un,children:"分"})]})}),(null==a?void 0:a.id)&&(0,je.jsx)(dt.op,{onClick:function(){return i("rule")},children:"设置抽题规则"})]}),(0,je.jsx)(mt.Z,{columns:wn(null==p?void 0:p.random_rule_type,c,r,u),dataSource:null==p?void 0:p.contents,pagination:!1,rowKey:"id"})]})})]})},Sn=n(59167),_n=n(62928),jn=n(40189),Nn=n(32637),En=function(e){var t,n,i,o,l,c,h,p,f,m,v,g,y;Ie()(e);var x=(0,A.useSearchParams)(),b=u()(x,1)[0],w=(0,A.useParams)(),C=(0,d.useContext)(ve),k=C.data,S=C.dispatch,_=(C.setPreview,C.getData),N=C.handlePreview,E=C.disabled,D=(0,d.useState)(""),T=u()(D,2),M=T[0],L=T[1],R=(0,d.useState)(null==k||null===(t=k.item_types)||void 0===t||null===(t=t[0])||void 0===t?void 0:t.item_type),O=u()(R,2),W=O[0],H=O[1],z=(0,d.useState)(!0),G=u()(z,2),V=G[0],K=G[1],q=(0,d.useState)(!1),X=u()(q,2),Q=(X[0],X[1],function(){var e=s()(a()().mark((function e(t,n){var i,r,o,l,c,u,d,h,p,f,m,v;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(l=k.item_types.map((function(e){return e.item_type_text})),c=null==k||null===(i=k.item_types)||void 0===i?void 0:i.filter((function(e){var t,n;return(null===(t=e.contents)||void 0===t?void 0:t.length)>0||(null==e||null===(n=e.item_banks)||void 0===n?void 0:n.length)>0})),k.sort_by_item_type=l,null!==(r=k.item_types)&&void 0!==r&&r.length){e.next=6;break}return j.ZP.warning("试题总数=0请先设置抽题规则"),e.abrupt("return");case 6:if(0!==(null==c?void 0:c.length)){e.next=9;break}return j.ZP.warning("试题总数=0请先设置抽题规则"),e.abrupt("return");case 9:if(t){e.next=14;break}if(d=Number(null==k||null===(u=k.examination_bank)||void 0===u?void 0:u.total_score),[100,120,150].includes(d)){e.next=14;break}return e.next=14,new Promise((function(e,t){var n;De.Z.confirm({centered:!0,icon:null,okText:"保存",cancelText:"取消",title:"提示",content:(0,je.jsxs)("div",{className:"c-grey-333",children:["当前试卷总分为",(0,je.jsx)("span",{style:{color:"#FA6400",margin:"0 5px"},children:d}),"分,请确认是否进行保存?"]}),onOk:(n=s()(a()().mark((function t(){return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e("");case 1:case"end":return t.stop()}}),t)}))),function(){return n.apply(this,arguments)}),onCancel:function(){t()}})}));case 14:h=function(){var e=s()(a()().mark((function e(){var i,r;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return i=(0,fe.cloneDeep)(k),r=(i||{}).item_types,i.item_types=r.filter((function(e){return e.item_type===W})),e.next=5,F(w.id||w.categoryId,i);case 5:0===e.sent.status&&(H(n),j.ZP.success("保存成功"),t||A.history.push("/paperlibrary"));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),p=null==k||null===(o=k.item_types)||void 0===o||null===(o=o.filter((function(e){return"实训题"===e.item_type_text}))[0])||void 0===o?void 0:o.item_banks,f=0,null==p||p.map((function(e){e.high_resources_consume&&(f+=1)})),console.log(f),f>0?De.Z.info({centered:!0,icon:null,width:600,okText:"我知道了",title:"提示",content:(0,je.jsx)("div",{children:(0,je.jsxs)("div",{className:ot,children:[(0,je.jsxs)("div",{children:[(0,je.jsxs)("div",{className:at,children:["您好!",null===(m=(0,jn.eY)())||void 0===m?void 0:m.username,"",null===(v=(0,jn.eY)())||void 0===v?void 0:v.login,""]}),(0,je.jsxs)("div",{className:lt,children:["当前试卷包含高消耗类型的实验。",(0,je.jsx)("br",{}),"根据平台使用规则,需要授权才能使用。发布考试前,请先联系平台管理员获取授权码。"]}),(0,je.jsxs)("div",{className:st,children:[(0,je.jsx)("i",{className:"iconfont icon-xunifangzhenti1 mr10 font26"}),(0,je.jsx)("span",{className:"mr10",style:{color:"#6A7283"},children:"高消耗实验"}),(0,je.jsx)("span",{style:{color:"#232B40"},children:"".concat(f,"个")})]})]}),(0,je.jsxs)("div",{children:[(0,je.jsx)("div",{className:ct,children:(0,je.jsx)("img",{src:Nn,width:"124px",height:"124px"})}),(0,je.jsx)("div",{className:"tc font14 mt10",style:{color:"#777A93"},children:"扫一扫,获取授权码"})]})]})}),onOk:function(){h()}}):h();case 20:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),ee=function(){var e=s()(a()().mark((function e(t,n,i){var o,l,s,c=arguments;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=c.length>3&&void 0!==c[3]&&c[3],console.log(k),l=r()(r()(r()({},k.exercise),w),{},{exerciseId:w.categoryId,sort_by_item_type:k.sort_by_item_type,difficulty:k.examination_bank.difficulty,exam_notes:k.examination_bank.exam_notes,exercise_name:k.examination_bank.name,time:k.examination_bank.time,changed_item_type:W,item_types:k.item_types,sub_discipline_id:k.examination_bank.sub_discipline_id}),t&&1!==n||(l.is_reset=1),e.next=6,(0,_n.wy)(l);case 6:return 0===(s=e.sent).status&&(o||j.ZP.success("修改成功 "),H(i),t||A.history.push("/classrooms/".concat(w.coursesId,"/exercise/").concat(w.categoryId,"/detail?random=true"))),e.abrupt("return",s);case 9:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),te=function(e){var t;De.Z.confirm({title:"提示",icon:null,centered:!0,closable:!0,content:(0,je.jsx)("div",{children:"确认删除该题型?"}),onOk:(t=s()(a()().mark((function t(){var n,i,r,o;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!w.id){t.next=8;break}return t.next=3,J(w.id,{item_type:[e]});case 3:if(0===t.sent.status){t.next=6;break}return t.abrupt("return");case 6:t.next=14;break;case 8:return t.next=10,$(w.categoryId,{item_type:[e]});case 10:if(n=t.sent,_(),0===n.status){t.next=14;break}return t.abrupt("return");case 14:S({type:"deleteQuestionType",payload:e}),e===W?(r=ke(k,{type:"deleteQuestionType",payload:e}),H(r.item_types.length?r.item_types[0].item_type:null==k||null===(i=k.item_types)||void 0===i||null===(i=i[0])||void 0===i?void 0:i.item_type)):H(null==k||null===(o=k.item_types)||void 0===o||null===(o=o[0])||void 0===o?void 0:o.item_type);case 16:case"end":return t.stop()}}),t)}))),function(){return t.apply(this,arguments)})})};(0,d.useEffect)((function(){var e;null!=k&&null!==(e=k.examination_bank)&&void 0!==e&&e.name&&K(!1),(0,Ut.Dk)("随机组卷")}),[null==k||null===(n=k.examination_bank)||void 0===n?void 0:n.name]);var ne=function(){var e=s()(a()().mark((function e(){var t,n,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,ee(!0,1,W,!0);case 2:if(0!==(null==(t=e.sent)?void 0:t.status)){e.next=8;break}return e.next=6,(0,B.ZP)("/api/exercises/".concat(null==w?void 0:w.categoryId,"/simulate_start_answer.json"),{method:"get",params:{coursesId:null==w?void 0:w.coursesId,categoryId:null==w?void 0:w.categoryId}});case 6:-1!=(null==(n=e.sent)?void 0:n.status)&&window.open("/classrooms/".concat(w.coursesId,"/exercise/").concat(w.categoryId,"/").concat(null===(i=(0,jn.eY)())||void 0===i?void 0:i.login,"/initate_answer"));case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,je.jsxs)("div",{className:Pe,children:[(0,je.jsx)("div",{className:"tc mb20",children:(0,je.jsx)(Z.VP,{defaultValue:null==k||null===(i=k.examination_bank)||void 0===i?void 0:i.name,onFinish:function(){var e=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return S({type:"updateBaseInfo",payload:r()(r()({},k.examination_bank),{},{name:t})}),null!=w&&w.id?(0,_n.se)({name:t,exerciseId:(null==w?void 0:w.categoryId)||(null==w?void 0:w.id)}):(0,_n.wy)({exercise_name:t,exerciseId:(null==w?void 0:w.categoryId)||(null==w?void 0:w.id)}),e.abrupt("return",!0);case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()})}),(0,je.jsxs)(P.Z,{justify:"center",className:"mb20",children:[(0,je.jsxs)(Te.Z,{className:"mr30",children:[(0,je.jsx)("span",{className:Me,children:"答题时长"}),(0,je.jsx)("span",{children:-1===(null==k||null===(o=k.examination_bank)||void 0===o?void 0:o.time)?"不限":(null==k||null===(l=k.examination_bank)||void 0===l?void 0:l.time)||"不限"})]}),(0,je.jsxs)(Te.Z,{className:"mr30",children:[(0,je.jsx)("span",{className:Me,children:"难度"}),(0,je.jsx)("span",{children:null===(c=we["".concat(null==k||null===(h=k.examination_bank)||void 0===h?void 0:h.difficulty)])||void 0===c?void 0:c.label})]}),(0,je.jsxs)(Te.Z,{className:"mr30",children:[(0,je.jsx)("span",{className:Me,children:"试题总数"}),(0,je.jsx)("span",{children:(null==k||null===(p=k.examination_bank)||void 0===p?void 0:p.question_count)||0})]}),(0,je.jsxs)(Te.Z,{children:[(0,je.jsx)("span",{className:Me,children:"总分"}),(0,je.jsx)("span",{children:(null==k||null===(f=k.examination_bank)||void 0===f||null===(f=f.total_score)||void 0===f?void 0:f.toFixed(1))||0})]})]}),(0,je.jsx)("div",{className:Le,style:{border:(null==k||null===(m=k.item_types)||void 0===m?void 0:m.length)<=0&&"none"},children:(null==k||null===(v=k.item_types)||void 0===v?void 0:v.length)>0?(0,je.jsxs)(P.Z,{wrap:!1,children:[(0,je.jsxs)(Te.Z,{flex:"260px",className:Be,children:[!E&&(0,je.jsxs)(P.Z,{className:"mb20",children:[(0,je.jsx)(dt.op,{style:{margin:"0 15px",borderRadius:2},onClick:function(){return L("setScore")},children:"批量设置分值"}),(null==w?void 0:w.id)&&(0,je.jsx)(dt.op,{shape:"default",onClick:function(){return L("questionType")},children:"添加题型"})]}),(0,je.jsx)(Qt,{list:k.item_types,onSelect:function(){var e=s()(a()().mark((function e(t){var n,i,r;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t!==W){e.next=2;break}return e.abrupt("return");case 2:if(K(!0),n=k.item_types.find((function(e){return e.item_type===W})),!("PRACTICAL"!==W&&n.contents.length>0&&null!=w&&w.id)){e.next=19;break}return i=(0,fe.cloneDeep)(k),r=(i||{}).item_types,i.item_types=r.filter((function(e){return e.item_type===W})),e.prev=8,e.next=11,F(w.id||w.categoryId,i);case 11:0===e.sent.status&&H(t),e.next=17;break;case 15:e.prev=15,e.t0=e.catch(8);case 17:e.next=20;break;case 19:w.categoryId?ee(!0,2,t):Q(!0,t);case 20:K(!1);case 21:case"end":return e.stop()}}),e,null,[[8,15]])})));return function(t){return e.apply(this,arguments)}}(),onDelete:te})]}),(0,je.jsx)(Te.Z,{flex:1,className:Re,children:(0,je.jsx)(I.Z,{spinning:V,children:(0,je.jsx)(kn,{setVisibleModalType:L,currentItemType:W,onDelete:te})})})]}):(0,je.jsx)(ut.Z,{customText:"请先设置试卷题型",styles:{margin:"70px auto"},ButtonTwo:(0,je.jsx)(P.Z,{justify:"center",className:"mt20",children:(null==w?void 0:w.id)&&(0,je.jsx)(dt.op,{style:{width:88},onClick:function(){return L("questionType")},children:"添加题型"})})})}),!(null==w||!w.id)&&(0,je.jsxs)("div",{className:et,children:[(0,je.jsx)(Sn.Z,{className:"".concat(nt," mr20"),onClick:s()(a()().mark((function e(){var t,n,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(i=null==k||null===(t=k.item_types)||void 0===t?void 0:t.filter((function(e){var t,n;return(null===(t=e.contents)||void 0===t?void 0:t.length)>0||(null==e||null===(n=e.item_banks)||void 0===n?void 0:n.length)>0})),null!==(n=k.item_types)&&void 0!==n&&n.length){e.next=4;break}return j.ZP.warning("试题总数=0请先设置抽题规则"),e.abrupt("return");case 4:if(0!==(null==i?void 0:i.length)){e.next=7;break}return j.ZP.warning("试题总数=0请先设置抽题规则"),e.abrupt("return");case 7:return e.next=9,Q(!0,W);case 9:N();case 10:case"end":return e.stop()}}),e)}))),children:"试卷预览"}),(0,je.jsxs)(Sn.Z,{type:"primary",className:tt,onClick:function(){return Q()},children:[(0,je.jsx)("i",{className:"iconfont icon-baocun1 mr5"}),"保存试卷"]})]}),!(null==w||!w.categoryId)&&(0,je.jsxs)("div",{className:et,style:{justifyContent:1!==(null==k||null===(g=k.exercise)||void 0===g?void 0:g.exercise_status)?"end":"center"},children:[(0,je.jsx)(Sn.Z,{className:"".concat(nt," mr20"),onClick:s()(a()().mark((function e(){var t,n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:document.body.scrollIntoView(),A.history.push("/classrooms/".concat(w.coursesId,"/exercise/").concat(null==k||null===(t=k.exercise)||void 0===t?void 0:t.id,"/detail?random=").concat(null==k||null===(n=k.exercise)||void 0===n?void 0:n.is_random));case 2:case"end":return e.stop()}}),e)}))),children:"返回"}),1===(null==k||null===(y=k.exercise)||void 0===y?void 0:y.exercise_status)&&(0,je.jsx)(Sn.Z,{className:"".concat(nt," mr20"),onClick:ne,children:"模拟考试"}),1===(null==k?void 0:k.exercise.exercise_status)&&(0,je.jsx)(Sn.Z,{type:"primary",className:tt,onClick:s()(a()().mark((function e(){var t,n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=Number(null==k||null===(t=k.examination_bank)||void 0===t?void 0:t.total_score),[100,120,150].includes(n)){e.next=4;break}return e.next=4,new Promise((function(e,t){var i;De.Z.confirm({centered:!0,icon:null,okText:"保存",cancelText:"取消",title:"提示",content:(0,je.jsxs)("div",{className:"c-grey-333",children:["当前试卷总分为",(0,je.jsx)("span",{style:{color:"#FA6400",margin:"0 5px"},children:n}),"分,请确认是否进行保存?"]}),onOk:(i=s()(a()().mark((function t(){return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:e("");case 1:case"end":return t.stop()}}),t)}))),function(){return i.apply(this,arguments)}),onCancel:function(){t()}})}));case 4:ee();case 5:case"end":return e.stop()}}),e)}))),children:"提交"})]}),(0,je.jsx)(ft,{open:"questionType"===M,onCancel:function(){return L("")},onOk:function(){var e=s()(a()().mark((function e(t){var n,i,r,o,l,s,c,u;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:r=[],o=ke(k,{type:"setQuestionType",payload:t}),l=(null==o||null===(n=o.item_types)||void 0===n?void 0:n.map((function(e){return e.item_type})))||[],s=ue()((null==k||null===(i=k.item_types)||void 0===i?void 0:i.map((function(e){return e.item_type})))||[]);try{for(s.s();!(c=s.n()).done;)u=c.value,l.includes(u)||r.push(u)}catch(e){s.e(e)}finally{s.f()}if(!(w.id&&r.length>0)){e.next=11;break}return e.next=8,J(w.id,{item_type:r});case 8:if(0===e.sent.status){e.next=11;break}return e.abrupt("return");case 11:S({type:"setQuestionType",payload:t}),H(W||o.item_types[0].item_type),L("");case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),(0,je.jsx)(vt,{open:"setScore"===M,onCancel:function(){L("")},onOk:function(){var e=s()(a()().mark((function e(t){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(console.log("---newData",t),n=t.item_types.map((function(e){return{item_type:e.item_type,score:e.score}})),!w.id){e.next=9;break}return e.next=5,U(w.id,{score_settings:n});case 5:0===e.sent.status&&S({type:"init",payload:t}),e.next=13;break;case 9:return e.next=11,Y(w.categoryId,{score_settings:n});case 11:0===e.sent.status&&S({type:"init",payload:t});case 13:L("");case 14:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),(0,je.jsx)(Wt,{open:"rule"===M,onCancel:function(){return L("")},currentItemType:W,setVisibleModalType:L}),"settings"===b.get("type")&&(0,je.jsx)(Xt,{open:"selectShixun"===M,onCancel:function(){return L("")},onOk:function(e){console.log(e),(null==e?void 0:e.length)<=0?j.ZP.info("实训数不能为0"):(S({type:"addShixun",payload:{shixunList:Ae()(e)}}),L(""))}})]})},An=n(79923),Zn=function(){var e,t,n,i=(0,d.useState)("baseInfo"),o=u()(i,2),l=o[0],c=o[1],f=(0,A.useDispatch)();(0,d.useEffect)((function(){f({type:"globalSetting/footerToggle",payload:!1})}),[]);var m=(0,A.useParams)(),v=!(!m.id&&!m.categoryId),g=(0,A.useSearchParams)(),y=u()(g,1)[0];(0,d.useEffect)((function(){"settings"===y.get("type")&&c("settings")}),[]);var x=(0,d.useReducer)(ke,null),b=u()(x,2),w=b[0],C=b[1],k=(0,d.useState)(!1),S=u()(k,2),_=S[0],I=S[1],D=function(){var e=s()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(I(!0),!m.categoryId){e.next=7;break}return e.next=4,le(m);case 4:t=e.sent,e.next=10;break;case 7:return e.next=9,R(m.id);case 9:t=e.sent;case 10:I(!1),0===t.status&&C({type:"init",payload:t});case 12:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();(0,d.useEffect)((function(){v?D():C({type:"init",payload:{examination_bank:{difficulty:2}}})}),[m]);var T=(0,d.useState)(""),P=u()(T,2),M=P[0],L=P[1],B=function(){var e=s()(a()().mark((function e(t,n){var i,o,l,s,c,u,d,h,p,f,m,v,g;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=null==w||null===(i=w.item_types)||void 0===i?void 0:i.filter((function(e){var t;return(null==e||null===(t=e.item_type)||void 0===t?void 0:t.toUpperCase())===(null==n?void 0:n.type)})),l={sort_by_item_type:w.sort_by_item_type,difficulty:w.examination_bank.difficulty,exam_notes:w.examination_bank.exam_notes,name:w.examination_bank.name,time:w.examination_bank.time,item_types:w.item_types},void 0===t||null!=t&&t.single_question_id){e.next=10;break}return l.seleted_item_bank_ids=null==t?void 0:t.seleted_item_bank_ids,l.item_types=o,e.next=7,ie(l);case 7:return 0===(null==(s=e.sent)?void 0:s.status)&&((u=(0,fe.cloneDeep)(U.data)).questionList=null==u||null===(c=u.questionList)||void 0===c?void 0:c.map((function(e){var t;return e.type===n.type?r()(r()({},e),{},{questions:(null==s||null===(t=s.questions)||void 0===t?void 0:t.questions)||[]}):e})),q({show:!0,data:u})),e.abrupt("return");case 10:if(null==t||void 0===t||!t.single_question_id){e.next=19;break}return l.seleted_item_bank_ids=null==t?void 0:t.seleted_item_bank_ids,l.single_question_id=null==t?void 0:t.single_question_id,l.item_types=o,e.next=16,ie(l);case 16:return 0===(null==(d=e.sent)?void 0:d.status)&&((p=(0,fe.cloneDeep)(U.data)).questionList=null==p||null===(h=p.questionList)||void 0===h?void 0:h.map((function(e){if(e.type===n.type){var t,i=(0,fe.cloneDeep)(null==e?void 0:e.questions);return i.splice(n.index,1,null==d||null===(t=d.questions)||void 0===t||null===(t=t.questions)||void 0===t?void 0:t[0]),console.log(null==e?void 0:e.questions,i,n.index,"new_questions"),r()(r()({},e),{},{questions:i})}return e})),q({show:!0,data:p})),e.abrupt("return");case 19:return e.next=21,te(l);case 21:0===(null==(f=e.sent)?void 0:f.status)&&(v=(0,Ut.ad)(f),g=[],null==w||null===(m=w.item_types)||void 0===m||m.forEach((function(e){var t,n=null==v||null===(t=v.questionList)||void 0===t?void 0:t.find((function(t){return e.item_type===t.type}));g.push(n)})),console.log(w,"sortList"),g=(0,fe.compact)(g),v.questionList=g,q({show:!0,data:v}),L(new Date));case 23:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),O=function(){var e=s()(a()().mark((function e(t){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n={sort_by_item_type:w.sort_by_item_type,difficulty:w.examination_bank.difficulty,exam_notes:w.examination_bank.exam_notes,name:w.examination_bank.name,time:w.examination_bank.time,item_types:w.item_types,sub_discipline_id:w.examination_bank.sub_discipline_id},!t){e.next=7;break}return e.next=4,oe(r()(r()({},n),t));case 4:return 0===e.sent.status&&j.ZP.success("保存成功"),e.abrupt("return");case 7:return e.next=9,F(m.id,n);case 9:0===e.sent.status&&(j.ZP.success("提交成功"),A.history.push("/paperlibrary?defaultActiveKey=0"));case 11:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),W=(0,Gt.g)(),z=N.Z.useForm(),G=u()(z,1)[0],V=(0,d.useState)({show:!1,data:{}}),K=u()(V,2),U=K[0],q=K[1],Y=!(null==w||null===(e=w.exercise)||void 0===e||!e.exercise_status)&&1!==(null==w||null===(t=w.exercise)||void 0===t?void 0:t.exercise_status);return(0,je.jsx)(ve.Provider,{value:{data:w,disabled:Y,dispatch:C,setPreview:q,getData:D,handlePreview:B},children:U.show?(0,je.jsx)(An.Z,{data:U.data,onExchange:B,onTypeScore:function(e){var t,n=(0,fe.cloneDeep)(U.data);n.questionList=null==n||null===(t=n.questionList)||void 0===t?void 0:t.map((function(t){return t.type===e.type?r()(r()({},t),{},{questions_score:e.scoreTotal}):t})),C({type:"changeQuestionScore",payload:{score:e.score,itemType:e.type}}),q({show:!0,data:n})},submit:O,goBack:function(){return q({show:!1,data:{}})}},M):(0,je.jsx)("div",{className:h,children:(0,je.jsxs)("div",{className:"edu-container",children:[(0,je.jsx)(E.Z,{className:p,separator:">",items:null!=m&&m.categoryId?[{title:(0,je.jsx)(A.Link,{to:"/classrooms/".concat(m.coursesId,"/exercise"),children:null===(n=(0,jn.eY)())||void 0===n||null===(n=n.course)||void 0===n?void 0:n.course_name})},{title:(0,je.jsx)(A.Link,{to:"/classrooms/".concat(m.coursesId,"/exercise"),children:"试卷列表"})},{title:"编辑试卷"}]:[{title:(0,je.jsx)(A.Link,{to:"/paperlibrary",children:"试卷库"})},{title:"随机组卷"}]}),(0,je.jsx)(Z.d4,{activeKey:l,tabs:[{key:"baseInfo",label:"试卷基础信息"},{key:"settings",label:"组卷配置"}],onChange:function(){var e=s()(a()().mark((function e(t){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if("settings"!==t){e.next=8;break}return e.next=3,G.validateFields();case 3:if(v){e.next=8;break}return e.next=6,H(w);case 6:0===(n=e.sent).status&&A.history.replace("/randompaper/edit/".concat(null==n?void 0:n.examination_bank_id,"?type=settings"));case 8:c(t);case 9:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}()}),"baseInfo"===l&&(0,je.jsx)(Ne,{courseOptions:W,setCurrentKey:c,loading:_,form:G}),(0,je.jsx)("div",{style:{display:"settings"===l?"block":"none"},children:w&&(0,je.jsx)(En,{})})]})})})}},68505:function(e,t,n){"use strict";n.d(t,{Z:function(){return u}});var i=n(39647),r=n.n(i),o=n(62957),a="ul___TdfYY",l=n(32637),s=n(37712),c=["open","onCancel"],u=function(e){var t=e.open,n=e.onCancel;r()(e,c);return(0,s.jsx)(o.Z,{centered:!0,open:t,title:(0,s.jsx)("div",{style:{fontWeight:"bold"},children:"联系教研助理"}),width:"696px",onCancel:n,footer:null,children:(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"tc",children:(0,s.jsx)("img",{className:"mt10",src:l,width:"182px",height:"181px",style:{borderRadius:"2px",border:"1px solid #D8E3E9"}})}),(0,s.jsx)("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16 mt10",children:"免费教研助理"}),(0,s.jsx)("div",{style:{color:"#191919",fontWeight:"bold"},className:"tc font16",children:"微信扫一扫添加"}),(0,s.jsx)("div",{style:{color:"#333"},className:"pt30 font14",children:(0,s.jsxs)("ul",{className:a,children:[(0,s.jsx)("li",{children:"1、解答老师疑惑、帮助老师更快熟悉和使用平台教学。"}),(0,s.jsx)("li",{children:"2、协助老师创建课堂、课程设计、做好教学工作。"}),(0,s.jsx)("li",{children:"3、根据老师教学方向分享头歌平台C9院校、985高校、211高校、双一流高校老师经典实践教学案例。"})]})})]})})}},66047:function(e,t,n){"use strict";n.d(t,{g:function(){return h}});var i=n(7557),r=n.n(i),o=n(41498),a=n.n(o),l=n(79800),s=n.n(l),c=n(59301),u=n(51439),d=n(64165),h=function(){var e=(0,c.useState)([]),t=s()(e,2),n=t[0],i=t[1];return(0,c.useEffect)((function(){var e=function(){var e=a()(r()().mark((function e(){var t;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,u.d1)({source:"question"});case 2:null!=(t=e.sent)&&t.disciplines&&i((0,d.L)(null==t?void 0:t.disciplines));case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();e()}),[]),n}},82927:function(e,t,n){"use strict";n.d(t,{U:function(){return h}});var i=n(7557),r=n.n(i),o=n(82242),a=n.n(o),l=n(41498),s=n.n(l),c=n(79800),u=n.n(c),d=n(59301);function h(e,t){var n=(0,d.useState)(t),i=u()(n,2),o=i[0],l=i[1],c=(0,d.useState)(!1),h=u()(c,2),p=h[0],f=h[1],m=(0,d.useState)(),v=u()(m,2),g=v[0],y=v[1],x=function(){var n=s()(r()().mark((function n(i){var s,c,u,d=arguments;return r()().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return s=d.length>1&&void 0!==d[1]&&d[1],c=s?t:a()(a()({},o),i),f(!0),l(c),n.next=6,e(c);case 6:return u=n.sent,f(!1),y(u),n.abrupt("return",u);case 10:case"end":return n.stop()}}),n)})));return function(e){return n.apply(this,arguments)}}();return[o,p,x,g,y]}},8426:function(e,t,n){"use strict";n.d(t,{AL:function(){return k},Iy:function(){return p},Qv:function(){return v},ez:function(){return C},jb:function(){return f}});var i=n(79800),r=n.n(i),o=n(32834),a=n.n(o),l=n(11690),s=1;var c=[],u=["<ul>"],d=new(a().Renderer),h=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){c.length=0,u=["<ul>"]}var f={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function m(e,t,n,i){if(t>=e.length||e[t].level<=n)return t;var r=e[t];i.push("<li><a href='#"+s+r.anchor+"'>"+r.text+"</a>");var o=[];return t=m(e,++t,r.level,o),o.length>0&&(i.push("<ul>"),o.forEach((function(e){i.push(e)})),i.push("</ul>")),i.push("</li>"),t=m(e,t,n,i)}function v(){return m(c,0,0,u),u.push("</ul>"),u.join("")}var g={heading:function(e){var t=h.exec(e);if(s+=1,t)return{type:"heading",raw:t[0],depth:t[1].length,text:t[2]}},fences:function(e){var t=this.rules.block.fences.exec(e);if(t){var n=t[0],i=function(e,t){var n=e.match(/^(\s+)(?:```)/);if(null===n)return t;var i=n[1];return t.split("\n").map((function(e){var t=e.match(/^\s+/);return null===t?e:r()(t,1)[0].length>=i.length?e.slice(i.length):e})).join("\n")}(n,t[3]||""),o=t[2]?t[2].trim():t[2];if(["latex","katex","math"].indexOf(o)>=0){var a=b(),l=i;i=a,w[a]={type:"block",expression:l}}return{type:"code",raw:n,lang:o,text:i}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,x=0,b=function(){return"__special_katext_id_".concat(x++,"__")},w={};function C(){return w}function k(){x=0,w={}}function S(e){return e=e.replace(y,(function(e,t){var n=b();return w[n]={type:"inline",expression:t},n}))}var _=d.listitem;d.listitem=function(e){return _(S(e))};var j=d.paragraph;d.paragraph=function(e){return j(S(e))};var N=d.tablecell;d.tablecell=function(e,t){return N(S(e),t)},d.code=function(e,t,n){var i=(t||"").match(/\S*/)[0];return i?["latex","katex","math"].indexOf(i)>=0?"<p class='editormd-tex'>".concat(e,"</p>"):'<pre class="prettyprint linenums"><code class="language-'.concat(t,'">').concat(n?e:(0,l.escape)(e,!0),"</code></pre>\n"):'<pre class="prettyprint linenums"><code>'+(n?e:(0,l.escape)(e,!0))+"</code></pre>"},d.heading=function(e,t,n){var i=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:i,level:t,text:e}),"<h"+t+' id="'+s+i+'">'+e+"</h"+t+">"},a().setOptions({silent:!0,gfm:!0,pedantic:!1}),a().use({tokenizer:g,renderer:d}),t.ZP=a()},61098:function(e,t,n){"use strict";n(59301);Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;t.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTQiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48Y2lyY2xlIGZpbGw9IiNGQ0IwNDEiIGN4PSI3IiBjeT0iNyIgcj0iNyIvPjxwYXRoIGQ9Ik03LjUzMSA5LjYzOGEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwdi0uMDJhLjYxNi42MTYgMCAxIDEgMS4yMzEgMHYuMDJabTAtMi4yNWEuNjE2LjYxNiAwIDEgMS0xLjIzMSAwVjQuMTE3YS42MTYuNjE2IDAgMSAxIDEuMjMxIDB2My4yNzNaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iLz48L2c+PC9zdmc+"},2018:function(){},66551:function(){},40862:function(e,t){"use strict";t.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},86787:function(e,t){"use strict";t.Z={wrap:"wrap___ilWvf",deleteIcon:"deleteIcon___JBDG8",keywordTag:"keywordTag___iieCb",questionTitleEditorWrap:"questionTitleEditorWrap___MHB5s",choiceListWrap:"choiceListWrap___jB8b1",choiceWrap:"choiceWrap___QFkTc",choiceIndex:"choiceIndex___Mr2YO",judgementIndex:"judgementIndex___fUVWK",setAnswerBtn:"setAnswerBtn___Whox5",activeAnswer:"activeAnswer___fGU6Y",activeJudgementAnswer:"activeJudgementAnswer___wJv8P",actionWrapper:"actionWrapper___ERQ7k",addIcon:"addIcon___L9TE0",inputBorder:"inputBorder___Q5tRE",placeholder:"placeholder___p9sFY",blankInputNumberWrapper:"blankInputNumberWrapper___uEHb0",addBtn:"addBtn___WR5ZI",blankIndex:"blankIndex___x9Pny",baseInputWrapper:"baseInputWrapper___eVsG7",collapseWrapper:"collapseWrapper___ZTysU",panelHeader:"panelHeader___QSN9g",open:"open___B6FU9",close:"close___QX19r",hide:"hide___mn25n"}},71114:function(e,t,n){"use strict";n.d(t,{Z:function(){return S}});var i=n(59301),r=n(92310),o=n.n(r),a=n(48755),l=n(83397),s=n(36237),c=n(63356),u=n(16931),d=n(51636);const h=e=>{const{componentCls:t,calc:n}=e;return{[t]:Object.assign(Object.assign({},(0,c.Wf)(e)),{margin:0,padding:0,listStyle:"none",[`${t}-item`]:{position:"relative",margin:0,paddingBottom:e.itemPaddingBottom,fontSize:e.fontSize,listStyle:"none","&-tail":{position:"absolute",insetBlockStart:e.itemHeadSize,insetInlineStart:n(n(e.itemHeadSize).sub(e.tailWidth)).div(2).equal(),height:`calc(100% - ${(0,s.unit)(e.itemHeadSize)})`,borderInlineStart:`${(0,s.unit)(e.tailWidth)} ${e.lineType} ${e.tailColor}`},"&-pending":{[`${t}-item-head`]:{fontSize:e.fontSizeSM,backgroundColor:"transparent"},[`${t}-item-tail`]:{display:"none"}},"&-head":{position:"absolute",width:e.itemHeadSize,height:e.itemHeadSize,backgroundColor:e.dotBg,border:`${(0,s.unit)(e.dotBorderWidth)} ${e.lineType} transparent`,borderRadius:"50%","&-blue":{color:e.colorPrimary,borderColor:e.colorPrimary},"&-red":{color:e.colorError,borderColor:e.colorError},"&-green":{color:e.colorSuccess,borderColor:e.colorSuccess},"&-gray":{color:e.colorTextDisabled,borderColor:e.colorTextDisabled}},"&-head-custom":{position:"absolute",insetBlockStart:n(e.itemHeadSize).div(2).equal(),insetInlineStart:n(e.itemHeadSize).div(2).equal(),width:"auto",height:"auto",marginBlockStart:0,paddingBlock:e.customHeadPaddingVertical,lineHeight:1,textAlign:"center",border:0,borderRadius:0,transform:"translate(-50%, -50%)"},"&-content":{position:"relative",insetBlockStart:n(n(e.fontSize).mul(e.lineHeight).sub(e.fontSize)).mul(-1).add(e.lineWidth).equal(),marginInlineStart:n(e.margin).add(e.itemHeadSize).equal(),marginInlineEnd:0,marginBlockStart:0,marginBlockEnd:0,wordBreak:"break-word"},"&-last":{[`> ${t}-item-tail`]:{display:"none"},[`> ${t}-item-content`]:{minHeight:n(e.controlHeightLG).mul(1.2).equal()}}},[`&${t}-alternate,\n &${t}-right,\n &${t}-label`]:{[`${t}-item`]:{"&-tail, &-head, &-head-custom":{insetInlineStart:"50%"},"&-head":{marginInlineStart:n(e.marginXXS).mul(-1).equal(),"&-custom":{marginInlineStart:n(e.tailWidth).div(2).equal()}},"&-left":{[`${t}-item-content`]:{insetInlineStart:`calc(50% - ${(0,s.unit)(e.marginXXS)})`,width:`calc(50% - ${(0,s.unit)(e.marginSM)})`,textAlign:"start"}},"&-right":{[`${t}-item-content`]:{width:`calc(50% - ${(0,s.unit)(e.marginSM)})`,margin:0,textAlign:"end"}}}},[`&${t}-right`]:{[`${t}-item-right`]:{[`${t}-item-tail,\n ${t}-item-head,\n ${t}-item-head-custom`]:{insetInlineStart:`calc(100% - ${(0,s.unit)(n(n(e.itemHeadSize).add(e.tailWidth)).div(2).equal())})`},[`${t}-item-content`]:{width:`calc(100% - ${(0,s.unit)(n(e.itemHeadSize).add(e.marginXS).equal())})`}}},[`&${t}-pending\n ${t}-item-last\n ${t}-item-tail`]:{display:"block",height:`calc(100% - ${(0,s.unit)(e.margin)})`,borderInlineStart:`${(0,s.unit)(e.tailWidth)} dotted ${e.tailColor}`},[`&${t}-reverse\n ${t}-item-last\n ${t}-item-tail`]:{display:"none"},[`&${t}-reverse ${t}-item-pending`]:{[`${t}-item-tail`]:{insetBlockStart:e.margin,display:"block",height:`calc(100% - ${(0,s.unit)(e.margin)})`,borderInlineStart:`${(0,s.unit)(e.tailWidth)} dotted ${e.tailColor}`},[`${t}-item-content`]:{minHeight:n(e.controlHeightLG).mul(1.2).equal()}},[`&${t}-label`]:{[`${t}-item-label`]:{position:"absolute",insetBlockStart:n(n(e.fontSize).mul(e.lineHeight).sub(e.fontSize)).mul(-1).add(e.tailWidth).equal(),width:`calc(50% - ${(0,s.unit)(e.marginSM)})`,textAlign:"end"},[`${t}-item-right`]:{[`${t}-item-label`]:{insetInlineStart:`calc(50% + ${(0,s.unit)(e.marginSM)})`,width:`calc(50% - ${(0,s.unit)(e.marginSM)})`,textAlign:"start"}}},"&-rtl":{direction:"rtl",[`${t}-item-head-custom`]:{transform:"translate(50%, -50%)"}}})}};var p=(0,u.I$)("Timeline",(e=>{const t=(0,d.mergeToken)(e,{itemHeadSize:10,customHeadPaddingVertical:e.paddingXXS,paddingInlineEnd:2});return[h(t)]}),(e=>({tailColor:e.colorSplit,tailWidth:e.lineWidthBold,dotBorderWidth:e.wireframe?e.lineWidthBold:3*e.lineWidth,dotBg:e.colorBgContainer,itemPaddingBottom:1.25*e.padding}))),f=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};var m=e=>{var{prefixCls:t,className:n,color:r="blue",dot:l,pending:s=!1,position:c,label:u,children:d}=e,h=f(e,["prefixCls","className","color","dot","pending","position","label","children"]);const{getPrefixCls:p}=i.useContext(a.E_),m=p("timeline",t),v=o()(`${m}-item`,{[`${m}-item-pending`]:s},n),g=/blue|red|green|gray/.test(r||"")?void 0:r,y=o()(`${m}-item-head`,{[`${m}-item-head-custom`]:!!l,[`${m}-item-head-${r}`]:!g});return i.createElement("li",Object.assign({},h,{className:v}),u&&i.createElement("div",{className:`${m}-item-label`},u),i.createElement("div",{className:`${m}-item-tail`}),i.createElement("div",{className:y,style:{borderColor:g,color:g}},l),i.createElement("div",{className:`${m}-item-content`},d))},v=n(94480),g=n(58617),y=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};var x=e=>{var{prefixCls:t,className:n,pending:r=!1,children:a,items:l,rootClassName:s,reverse:c=!1,direction:u,hashId:d,pendingDot:h,mode:p=""}=e,f=y(e,["prefixCls","className","pending","children","items","rootClassName","reverse","direction","hashId","pendingDot","mode"]);const x=(e,n)=>"alternate"===p?"right"===e?`${t}-item-right`:"left"===e||n%2==0?`${t}-item-left`:`${t}-item-right`:"left"===p?`${t}-item-left`:"right"===p||"right"===e?`${t}-item-right`:"",b=(0,v.Z)(l||[]),w="boolean"==typeof r?null:r;r&&b.push({pending:!!r,dot:h||i.createElement(g.Z,null),children:w}),c&&b.reverse();const C=b.length,k=`${t}-item-last`,S=b.filter((e=>!!e)).map(((e,t)=>{var n;const a=t===C-2?k:"",l=t===C-1?k:"",{className:s}=e,u=y(e,["className"]);return i.createElement(m,Object.assign({},u,{className:o()([s,!c&&r?a:l,x(null!==(n=null==e?void 0:e.position)&&void 0!==n?n:"",t)]),key:(null==e?void 0:e.key)||t}))})),_=b.some((e=>!!(null==e?void 0:e.label))),j=o()(t,{[`${t}-pending`]:!!r,[`${t}-reverse`]:!!c,[`${t}-${p}`]:!!p&&!_,[`${t}-label`]:_,[`${t}-rtl`]:"rtl"===u},n,s,d);return i.createElement("ul",Object.assign({},f,{className:j}),S)},b=n(11592);var w=function(e,t){return e&&Array.isArray(e)?e:(0,b.Z)(t).map((e=>{var t,n;return Object.assign({children:null!==(n=null===(t=null==e?void 0:e.props)||void 0===t?void 0:t.children)&&void 0!==n?n:""},e.props)}))},C=function(e,t){var n={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.indexOf(i)<0&&(n[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(e);r<i.length;r++)t.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(e,i[r])&&(n[i[r]]=e[i[r]])}return n};const k=e=>{const{getPrefixCls:t,direction:n,timeline:r}=i.useContext(a.E_),{prefixCls:s,children:c,items:u,className:d,style:h}=e,f=C(e,["prefixCls","children","items","className","style"]),m=t("timeline",s);const v=(0,l.Z)(m),[g,y,b]=p(m,v),k=w(u,c);return g(i.createElement(x,Object.assign({},f,{className:o()(null==r?void 0:r.className,d,b,v),style:Object.assign(Object.assign({},null==r?void 0:r.style),h),prefixCls:m,direction:n,items:k,hashId:y})))};k.Item=m;var S=k},99498:function(e,t,n){!function(e){function t(e){e.state.placeholder&&(e.state.placeholder.parentNode.removeChild(e.state.placeholder),e.state.placeholder=null)}function n(e){t(e);var n=e.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=e.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var i=e.getOption("placeholder");"string"==typeof i&&(i=document.createTextNode(i)),n.appendChild(i),e.display.lineSpace.insertBefore(n,e.display.lineSpace.firstChild)}function i(e){setTimeout((function(){var i=!1,r=e.getInputField();"TEXTAREA"==r.nodeName?i=!r.value:1==e.lineCount()&&(i=!/[^\u200b]/.test(r.querySelector(".CodeMirror-line").textContent)),i?n(e):t(e)}),20)}function r(e){a(e)&&n(e)}function o(e){var i=e.getWrapperElement(),r=a(e);i.className=i.className.replace(" CodeMirror-empty","")+(r?" CodeMirror-empty":""),r?n(e):t(e)}function a(e){return 1===e.lineCount()&&""===e.getLine(0)}e.defineOption("placeholder","",(function(n,a,l){var s=l&&l!=e.Init;if(a&&!s)n.on("blur",r),n.on("change",o),n.on("swapDoc",o),e.on(n.getInputField(),"compositionupdate",n.state.placeholderCompose=function(){i(n)}),o(n);else if(!a&&s){n.off("blur",r),n.off("change",o),n.off("swapDoc",o),e.off(n.getInputField(),"compositionupdate",n.state.placeholderCompose),t(n);var c=n.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}a&&!n.hasFocus()&&r(n)}))}(n(89780))},25717:function(e,t,n){!function(e){var t={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=e.Pos;function i(e,n){return"pairs"==n&&"string"==typeof e?e:"object"==typeof e&&null!=e[n]?e[n]:t[n]}e.defineOption("autoCloseBrackets",!1,(function(t,n,a){a&&a!=e.Init&&(t.removeKeyMap(r),t.state.closeBrackets=null),n&&(o(i(n,"pairs")),t.state.closeBrackets=n,t.addKeyMap(r))}));var r={Backspace:s,Enter:c};function o(e){for(var t=0;t<e.length;t++){var n=e.charAt(t),i="'"+n+"'";r[i]||(r[i]=a(n))}}function a(e){return function(t){return d(t,e)}}function l(e){var t=e.state.closeBrackets;return!t||t.override?t:e.getModeAt(e.getCursor()).closeBrackets||t}function s(t){var r=l(t);if(!r||t.getOption("disableInput"))return e.Pass;for(var o=i(r,"pairs"),a=t.listSelections(),s=0;s<a.length;s++){if(!a[s].empty())return e.Pass;var c=h(t,a[s].head);if(!c||o.indexOf(c)%2!=0)return e.Pass}for(s=a.length-1;s>=0;s--){var u=a[s].head;t.replaceRange("",n(u.line,u.ch-1),n(u.line,u.ch+1),"+delete")}}function c(t){var n=l(t),r=n&&i(n,"explode");if(!r||t.getOption("disableInput"))return e.Pass;for(var o=t.listSelections(),a=0;a<o.length;a++){if(!o[a].empty())return e.Pass;var s=h(t,o[a].head);if(!s||r.indexOf(s)%2!=0)return e.Pass}t.operation((function(){var e=t.lineSeparator()||"\n";t.replaceSelection(e+e,null),t.execCommand("goCharLeft"),o=t.listSelections();for(var n=0;n<o.length;n++){var i=o[n].head.line;t.indentLine(i,null,!0),t.indentLine(i+1,null,!0)}}))}function u(t){var i=e.cmpPos(t.anchor,t.head)>0;return{anchor:new n(t.anchor.line,t.anchor.ch+(i?-1:1)),head:new n(t.head.line,t.head.ch+(i?1:-1))}}function d(t,r){var o=l(t);if(!o||t.getOption("disableInput"))return e.Pass;var a=i(o,"pairs"),s=a.indexOf(r);if(-1==s)return e.Pass;for(var c,d=i(o,"closeBefore"),h=i(o,"triples"),f=a.charAt(s+1)==r,m=t.listSelections(),v=s%2==0,g=0;g<m.length;g++){var y,x=m[g],b=x.head,w=t.getRange(b,n(b.line,b.ch+1));if(v&&!x.empty())y="surround";else if(!f&&v||w!=r)if(f&&b.ch>1&&h.indexOf(r)>=0&&t.getRange(n(b.line,b.ch-2),b)==r+r){if(b.ch>2&&/\bstring/.test(t.getTokenTypeAt(n(b.line,b.ch-2))))return e.Pass;y="addFour"}else if(f){var C=0==b.ch?" ":t.getRange(n(b.line,b.ch-1),b);if(e.isWordChar(w)||C==r||e.isWordChar(C))return e.Pass;y="both"}else{if(!v||!(0===w.length||/\s/.test(w)||d.indexOf(w)>-1))return e.Pass;y="both"}else y=f&&p(t,b)?"both":h.indexOf(r)>=0&&t.getRange(b,n(b.line,b.ch+3))==r+r+r?"skipThree":"skip";if(c){if(c!=y)return e.Pass}else c=y}var k=s%2?a.charAt(s-1):r,S=s%2?r:a.charAt(s+1);t.operation((function(){if("skip"==c)t.execCommand("goCharRight");else if("skipThree"==c)for(var e=0;e<3;e++)t.execCommand("goCharRight");else if("surround"==c){var n=t.getSelections();for(e=0;e<n.length;e++)n[e]=k+n[e]+S;for(t.replaceSelections(n,"around"),n=t.listSelections().slice(),e=0;e<n.length;e++)n[e]=u(n[e]);t.setSelections(n)}else"both"==c?(t.replaceSelection(k+S,null),t.triggerElectric(k+S),t.execCommand("goCharLeft")):"addFour"==c&&(t.replaceSelection(k+k+k+k,"before"),t.execCommand("goCharRight"))}))}function h(e,t){var i=e.getRange(n(t.line,t.ch-1),n(t.line,t.ch+1));return 2==i.length?i:null}function p(e,t){var i=e.getTokenAt(n(t.line,t.ch+1));return/\bstring/.test(i.type)&&i.start==t.ch&&(0==t.ch||!/\bstring/.test(e.getTokenTypeAt(t)))}o(t.pairs+"`")}(n(89780))},6313:function(e,t,n){!function(e){e.defineOption("autoCloseTags",!1,(function(t,n,r){if(r!=e.Init&&r&&t.removeKeyMap("autoCloseTags"),n){var a={name:"autoCloseTags"};"object"==typeof n&&!1===n.whenClosing||(a["'/'"]=function(e){return o(e)}),"object"==typeof n&&!1===n.whenOpening||(a["'>'"]=function(e){return i(e)}),t.addKeyMap(a)}}));var t=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function i(i){if(i.getOption("disableInput"))return e.Pass;for(var r=i.listSelections(),o=[],s=i.getOption("autoCloseTags"),c=0;c<r.length;c++){if(!r[c].empty())return e.Pass;var u=r[c].head,d=i.getTokenAt(u),h=e.innerMode(i.getMode(),d.state),p=h.state,f=h.mode.xmlCurrentTag&&h.mode.xmlCurrentTag(p),m=f&&f.name;if(!m)return e.Pass;var v="html"==h.mode.configuration,g="object"==typeof s&&s.dontCloseTags||v&&t,y="object"==typeof s&&s.indentTags||v&&n;d.end>u.ch&&(m=m.slice(0,m.length-d.end+u.ch));var x=m.toLowerCase();if(!m||"string"==d.type&&(d.end!=u.ch||!/[\"\']/.test(d.string.charAt(d.string.length-1))||1==d.string.length)||"tag"==d.type&&f.close||d.string.indexOf("/")==u.ch-d.start-1||g&&a(g,x)>-1||l(i,h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(p)||[],m,u,!0))return e.Pass;var b="object"==typeof s&&s.emptyTags;if(b&&a(b,m)>-1)o[c]={text:"/>",newPos:e.Pos(u.line,u.ch+2)};else{var w=y&&a(y,x)>-1;o[c]={indent:w,text:">"+(w?"\n\n":"")+"</"+m+">",newPos:w?e.Pos(u.line+1,0):e.Pos(u.line,u.ch+1)}}}var C="object"==typeof s&&s.dontIndentOnAutoClose;for(c=r.length-1;c>=0;c--){var k=o[c];i.replaceRange(k.text,r[c].head,r[c].anchor,"+insert");var S=i.listSelections().slice(0);S[c]={head:k.newPos,anchor:k.newPos},i.setSelections(S),!C&&k.indent&&(i.indentLine(k.newPos.line,null,!0),i.indentLine(k.newPos.line+1,null,!0))}}function r(t,n){for(var i=t.listSelections(),r=[],o=n?"/":"</",a=t.getOption("autoCloseTags"),s="object"==typeof a&&a.dontIndentOnSlash,c=0;c<i.length;c++){if(!i[c].empty())return e.Pass;var u=i[c].head,d=t.getTokenAt(u),h=e.innerMode(t.getMode(),d.state),p=h.state;if(n&&("string"==d.type||"<"!=d.string.charAt(0)||d.start!=u.ch-1))return e.Pass;var f,m="xml"!=h.mode.name&&"htmlmixed"==t.getMode().name;if(m&&"javascript"==h.mode.name)f=o+"script";else if(m&&"css"==h.mode.name)f=o+"style";else{var v=h.mode.xmlCurrentContext&&h.mode.xmlCurrentContext(p);if(!v||v.length&&l(t,v,v[v.length-1],u))return e.Pass;f=o+v[v.length-1]}">"!=t.getLine(u.line).charAt(d.end)&&(f+=">"),r[c]=f}if(t.replaceSelections(r),i=t.listSelections(),!s)for(c=0;c<i.length;c++)(c==i.length-1||i[c].head.line<i[c+1].head.line)&&t.indentLine(i[c].head.line)}function o(t){return t.getOption("disableInput")?e.Pass:r(t,!0)}function a(e,t){if(e.indexOf)return e.indexOf(t);for(var n=0,i=e.length;n<i;++n)if(e[n]==t)return n;return-1}function l(t,n,i,r,o){if(!e.scanForClosingTag)return!1;var a=Math.min(t.lastLine()+1,r.line+500),l=e.scanForClosingTag(t,r,null,a);if(!l||l.tag!=i)return!1;for(var s=o?1:0,c=n.length-1;c>=0&&n[c]==i;c--)++s;for(r=l.to,c=1;c<s;c++){var u=e.scanForClosingTag(t,r,null,a);if(!u||u.tag!=i)return!1;r=u.to}return!0}e.commands.closeTag=function(e){return r(e)}}(n(89780),n(32855))},32855:function(e,t,n){!function(e){"use strict";var t=e.Pos;function n(e,t){return e.line-t.line||e.ch-t.ch}var i="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",r=new RegExp("<(/?)(["+i+"]["+i+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*)","g");function o(e,t,n,i){this.line=t,this.ch=n,this.cm=e,this.text=e.getLine(t),this.min=i?Math.max(i.from,e.firstLine()):e.firstLine(),this.max=i?Math.min(i.to-1,e.lastLine()):e.lastLine()}function a(e,n){var i=e.cm.getTokenTypeAt(t(e.line,n));return i&&/\btag\b/.test(i)}function l(e){if(!(e.line>=e.max))return e.ch=0,e.text=e.cm.getLine(++e.line),!0}function s(e){if(!(e.line<=e.min))return e.text=e.cm.getLine(--e.line),e.ch=e.text.length,!0}function c(e){for(;;){var t=e.text.indexOf(">",e.ch);if(-1==t){if(l(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),i=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t+1}}function u(e){for(;;){var t=e.ch?e.text.lastIndexOf("<",e.ch-1):-1;if(-1==t){if(s(e))continue;return}if(a(e,t+1)){r.lastIndex=t,e.ch=t;var n=r.exec(e.text);if(n&&n.index==t)return n}else e.ch=t}}function d(e){for(;;){r.lastIndex=e.ch;var t=r.exec(e.text);if(!t){if(l(e))continue;return}if(a(e,t.index+1))return e.ch=t.index+t[0].length,t;e.ch=t.index+1}}function h(e){for(;;){var t=e.ch?e.text.lastIndexOf(">",e.ch-1):-1;if(-1==t){if(s(e))continue;return}if(a(e,t+1)){var n=e.text.lastIndexOf("/",t),i=n>-1&&!/\S/.test(e.text.slice(n+1,t));return e.ch=t+1,i?"selfClose":"regular"}e.ch=t}}function p(e,n){for(var i=[];;){var r,o=d(e),a=e.line,l=e.ch-(o?o[0].length:0);if(!o||!(r=c(e)))return;if("selfClose"!=r)if(o[1]){for(var s=i.length-1;s>=0;--s)if(i[s]==o[2]){i.length=s;break}if(s<0&&(!n||n==o[2]))return{tag:o[2],from:t(a,l),to:t(e.line,e.ch)}}else i.push(o[2])}}function f(e,n){for(var i=[];;){var r=h(e);if(!r)return;if("selfClose"!=r){var o=e.line,a=e.ch,l=u(e);if(!l)return;if(l[1])i.push(l[2]);else{for(var s=i.length-1;s>=0;--s)if(i[s]==l[2]){i.length=s;break}if(s<0&&(!n||n==l[2]))return{tag:l[2],from:t(e.line,e.ch),to:t(o,a)}}}else u(e)}}e.registerHelper("fold","xml",(function(e,i){for(var r=new o(e,i.line,0);;){var a=d(r);if(!a||r.line!=i.line)return;var l=c(r);if(!l)return;if(!a[1]&&"selfClose"!=l){var s=t(r.line,r.ch),u=p(r,a[2]);return u&&n(u.from,s)>0?{from:s,to:u.from}:null}}})),e.findMatchingTag=function(e,i,r){var a=new o(e,i.line,i.ch,r);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var l=c(a),s=l&&t(a.line,a.ch),d=l&&u(a);if(l&&d&&!(n(a,i)>0)){var h={from:t(a.line,a.ch),to:s,tag:d[2]};return"selfClose"==l?{open:h,close:null,at:"open"}:d[1]?{open:f(a,d[2]),close:h,at:"close"}:{open:h,close:p(a=new o(e,s.line,s.ch,r),d[2]),at:"open"}}}},e.findEnclosingTag=function(e,t,n,i){for(var r=new o(e,t.line,t.ch,n);;){var a=f(r,i);if(!a)break;var l=p(new o(e,t.line,t.ch,n),a.tag);if(l)return{open:a,close:l}}},e.scanForClosingTag=function(e,t,n,i){return p(new o(e,t.line,t.ch,i?{from:0,to:i}:null),n)}}(n(89780))},89780:function(e){e.exports=function(){"use strict";var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),i=/MSIE \d/.test(e),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=i||r||o,l=a&&(i?document.documentMode||6:+(o||r)[1]),s=!o&&/WebKit\//.test(e),c=s&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),d=/Opera\//.test(e),h=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),f=/PhantomJS/.test(e),m=!o&&/AppleWebKit/.test(e)&&/Mobile\/\w+/.test(e),v=/Android/.test(e),g=m||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=m||/Mac/.test(t),x=/\bCrOS\b/.test(e),b=/win/i.test(t),w=d&&e.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(d=!1,s=!0);var C=y&&(c||d&&(null==w||w<12.11)),k=n||a&&l>=9;function S(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var _,j=function(e,t){var n=e.className,i=S(t).exec(n);if(i){var r=n.slice(i.index+i[0].length);e.className=n.slice(0,i.index)+(r?i[1]+r:"")}};function N(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function E(e,t){return N(e).appendChild(t)}function A(e,t,n,i){var r=document.createElement(e);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof t)r.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)r.appendChild(t[o]);return r}function Z(e,t,n,i){var r=A(e,t,n,i);return r.setAttribute("role","presentation"),r}function I(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function D(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function T(e,t){var n=e.className;S(t).test(n)||(e.className+=(n?" ":"")+t)}function P(e,t){for(var n=e.split(" "),i=0;i<n.length;i++)n[i]&&!S(n[i]).test(t)&&(t+=" "+n[i]);return t}_=document.createRange?function(e,t,n,i){var r=document.createRange();return r.setEnd(i||e,n),r.setStart(e,t),r}:function(e,t,n){var i=document.body.createTextRange();try{i.moveToElementText(e.parentNode)}catch(e){return i}return i.collapse(!0),i.moveEnd("character",n),i.moveStart("character",t),i};var M=function(e){e.select()};function L(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function B(e,t,n){for(var i in t||(t={}),e)!e.hasOwnProperty(i)||!1===n&&t.hasOwnProperty(i)||(t[i]=e[i]);return t}function R(e,t,n,i,r){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=i||0,a=r||0;;){var l=e.indexOf("\t",o);if(l<0||l>=t)return a+(t-o);a+=l-o,a+=n-a%n,o=l+1}}m?M=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(M=function(e){try{e.select()}catch(e){}});var O=function(){this.id=null,this.f=null,this.time=0,this.handler=L(this.onTimeout,this)};function F(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}O.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},O.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var W=50,H={toString:function(){return"CodeMirror.Pass"}},z={scroll:!1},G={origin:"*mouse"},V={origin:"+move"};function K(e,t,n){for(var i=0,r=0;;){var o=e.indexOf("\t",i);-1==o&&(o=e.length);var a=o-i;if(o==e.length||r+a>=t)return i+Math.min(a,t-r);if(r+=o-i,i=o+1,(r+=n-r%n)>=t)return i}}var U=[""];function q(e){for(;U.length<=e;)U.push(Y(U)+" ");return U[e]}function Y(e){return e[e.length-1]}function X(e,t){for(var n=[],i=0;i<e.length;i++)n[i]=t(e[i],i);return n}function J(e,t,n){for(var i=0,r=n(t);i<e.length&&n(e[i])<=r;)i++;e.splice(i,0,t)}function Q(){}function $(e,t){var n;return Object.create?n=Object.create(e):(Q.prototype=e,n=new Q),t&&B(t,n),n}var ee=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function te(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||ee.test(e))}function ne(e,t){return t?!!(t.source.indexOf("\\w")>-1&&te(e))||t.test(e):te(e)}function ie(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function oe(e){return e.charCodeAt(0)>=768&&re.test(e)}function ae(e,t,n){for(;(n<0?t>0:t<e.length)&&oe(e.charAt(t));)t+=n;return t}function le(e,t,n){for(var i=t>n?-1:1;;){if(t==n)return t;var r=(t+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+i}}function se(e,t,n,i){if(!e)return i(t,n,"ltr",0);for(var r=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(i(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),r=!0)}r||i(t,n,"ltr")}var ce=null;function ue(e,t,n){var i;ce=null;for(var r=0;r<e.length;++r){var o=e[r];if(o.from<t&&o.to>t)return r;o.to==t&&(o.from!=o.to&&"before"==n?i=r:ce=r),o.from==t&&(o.from!=o.to&&"before"!=n?i=r:ce=r)}return null!=i?i:ce}var de=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?e.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?t.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,l=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(e,t){var c="ltr"==t?"L":"R";if(0==e.length||"ltr"==t&&!i.test(e))return!1;for(var u=e.length,d=[],h=0;h<u;++h)d.push(n(e.charCodeAt(h)));for(var p=0,f=c;p<u;++p){var m=d[p];"m"==m?d[p]=f:f=m}for(var v=0,g=c;v<u;++v){var y=d[v];"1"==y&&"r"==g?d[v]="n":o.test(y)&&(g=y,"r"==y&&(d[v]="R"))}for(var x=1,b=d[0];x<u-1;++x){var w=d[x];"+"==w&&"1"==b&&"1"==d[x+1]?d[x]="1":","!=w||b!=d[x+1]||"1"!=b&&"n"!=b||(d[x]=b),b=w}for(var C=0;C<u;++C){var k=d[C];if(","==k)d[C]="N";else if("%"==k){var S=void 0;for(S=C+1;S<u&&"%"==d[S];++S);for(var _=C&&"!"==d[C-1]||S<u&&"1"==d[S]?"1":"N",j=C;j<S;++j)d[j]=_;C=S-1}}for(var N=0,E=c;N<u;++N){var A=d[N];"L"==E&&"1"==A?d[N]="L":o.test(A)&&(E=A)}for(var Z=0;Z<u;++Z)if(r.test(d[Z])){var I=void 0;for(I=Z+1;I<u&&r.test(d[I]);++I);for(var D="L"==(Z?d[Z-1]:c),T=D==("L"==(I<u?d[I]:c))?D?"L":"R":c,P=Z;P<I;++P)d[P]=T;Z=I-1}for(var M,L=[],B=0;B<u;)if(a.test(d[B])){var R=B;for(++B;B<u&&a.test(d[B]);++B);L.push(new s(0,R,B))}else{var O=B,F=L.length,W="rtl"==t?1:0;for(++B;B<u&&"L"!=d[B];++B);for(var H=O;H<B;)if(l.test(d[H])){O<H&&(L.splice(F,0,new s(1,O,H)),F+=W);var z=H;for(++H;H<B&&l.test(d[H]);++H);L.splice(F,0,new s(2,z,H)),F+=W,O=H}else++H;O<B&&L.splice(F,0,new s(1,O,B))}return"ltr"==t&&(1==L[0].level&&(M=e.match(/^\s+/))&&(L[0].from=M[0].length,L.unshift(new s(0,0,M[0].length))),1==Y(L).level&&(M=e.match(/\s+$/))&&(Y(L).to-=M[0].length,L.push(new s(0,u-M[0].length,u)))),"rtl"==t?L.reverse():L}}();function he(e,t){var n=e.order;return null==n&&(n=e.order=de(e.text,t)),n}var pe=[],fe=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var i=e._handlers||(e._handlers={});i[t]=(i[t]||pe).concat(n)}};function me(e,t){return e._handlers&&e._handlers[t]||pe}function ve(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var i=e._handlers,r=i&&i[t];if(r){var o=F(r,n);o>-1&&(i[t]=r.slice(0,o).concat(r.slice(o+1)))}}}function ge(e,t){var n=me(e,t);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r<n.length;++r)n[r].apply(null,i)}function ye(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ge(e,n||t.type,e,t),Se(t)||t.codemirrorIgnore}function xe(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),i=0;i<t.length;++i)-1==F(n,t[i])&&n.push(t[i])}function be(e,t){return me(e,t).length>0}function we(e){e.prototype.on=function(e,t){fe(this,e,t)},e.prototype.off=function(e,t){ve(this,e,t)}}function Ce(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function ke(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function Se(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function _e(e){Ce(e),ke(e)}function je(e){return e.target||e.srcElement}function Ne(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var Ee,Ae,Ze=function(){if(a&&l<9)return!1;var e=A("div");return"draggable"in e||"dragDrop"in e}();function Ie(e){if(null==Ee){var t=A("span","");E(e,A("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(Ee=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&l<8))}var n=Ee?A("span",""):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function De(e){if(null!=Ae)return Ae;var t=E(e,document.createTextNode("AخA")),n=_(t,0,1).getBoundingClientRect(),i=_(t,1,2).getBoundingClientRect();return N(e),!(!n||n.left==n.right)&&(Ae=i.right-n.right<3)}var Te,Pe=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],i=e.length;t<=i;){var r=e.indexOf("\n",t);-1==r&&(r=e.length);var o=e.slice(t,"\r"==e.charAt(r-1)?r-1:r),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=r+1)}return n}:function(e){return e.split(/\r\n?|\n/)},Me=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Le="oncopy"in(Te=A("div"))||(Te.setAttribute("oncopy","return;"),"function"==typeof Te.oncopy),Be=null;function Re(e){if(null!=Be)return Be;var t=E(e,A("span","x")),n=t.getBoundingClientRect(),i=_(t,0,1).getBoundingClientRect();return Be=Math.abs(n.left-i.left)>1}var Oe={},Fe={};function We(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Oe[e]=t}function He(e,t){Fe[e]=t}function ze(e){if("string"==typeof e&&Fe.hasOwnProperty(e))e=Fe[e];else if(e&&"string"==typeof e.name&&Fe.hasOwnProperty(e.name)){var t=Fe[e.name];"string"==typeof t&&(t={name:t}),(e=$(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ge(e,t){t=ze(t);var n=Oe[t.name];if(!n)return Ge(e,"text/plain");var i=n(e,t);if(Ve.hasOwnProperty(t.name)){var r=Ve[t.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=t.name,t.helperType&&(i.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)i[a]=t.modeProps[a];return i}var Ve={};function Ke(e,t){B(t,Ve.hasOwnProperty(e)?Ve[e]:Ve[e]={})}function Ue(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var i in t){var r=t[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function qe(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function Ye(e,t,n){return!e.startState||e.startState(t,n)}var Xe=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Je(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(t<o){n=r;break}t-=o}return n.lines[t]}function Qe(e,t,n){var i=[],r=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;r==n.line&&(o=o.slice(0,n.ch)),r==t.line&&(o=o.slice(t.ch)),i.push(o),++r})),i}function $e(e,t,n){var i=[];return e.iter(t,n,(function(e){i.push(e.text)})),i}function et(e,t){var n=t-e.height;if(n)for(var i=e;i;i=i.parent)i.height+=n}function tt(e){if(null==e.parent)return null;for(var t=e.parent,n=F(t.lines,e),i=t.parent;i;t=i,i=i.parent)for(var r=0;i.children[r]!=t;++r)n+=i.children[r].chunkSize();return n+t.first}function nt(e,t){var n=e.first;e:do{for(var i=0;i<e.children.length;++i){var r=e.children[i],o=r.height;if(t<o){e=r;continue e}t-=o,n+=r.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var l=e.lines[a].height;if(t<l)break;t-=l}return n+a}function it(e,t){return t>=e.first&&t<e.first+e.size}function rt(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function ot(e,t,n){if(void 0===n&&(n=null),!(this instanceof ot))return new ot(e,t,n);this.line=e,this.ch=t,this.sticky=n}function at(e,t){return e.line-t.line||e.ch-t.ch}function lt(e,t){return e.sticky==t.sticky&&0==at(e,t)}function st(e){return ot(e.line,e.ch)}function ct(e,t){return at(e,t)<0?t:e}function ut(e,t){return at(e,t)<0?e:t}function dt(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function ht(e,t){if(t.line<e.first)return ot(e.first,0);var n=e.first+e.size-1;return t.line>n?ot(n,Je(e,n).text.length):pt(t,Je(e,t.line).text.length)}function pt(e,t){var n=e.ch;return null==n||n>t?ot(e.line,t):n<0?ot(e.line,0):e}function ft(e,t){for(var n=[],i=0;i<t.length;i++)n[i]=ht(e,t[i]);return n}Xe.prototype.eol=function(){return this.pos>=this.string.length},Xe.prototype.sol=function(){return this.pos==this.lineStart},Xe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},Xe.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},Xe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},Xe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},Xe.prototype.skipToEnd=function(){this.pos=this.string.length},Xe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},Xe.prototype.backUp=function(e){this.pos-=e},Xe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=R(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.indentation=function(){return R(this.string,null,this.tabSize)-(this.lineStart?R(this.string,this.lineStart,this.tabSize):0)},Xe.prototype.match=function(e,t,n){if("string"!=typeof e){var i=this.string.slice(this.pos).match(e);return i&&i.index>0?null:(i&&!1!==t&&(this.pos+=i[0].length),i)}var r=function(e){return n?e.toLowerCase():e};if(r(this.string.substr(this.pos,e.length))==r(e))return!1!==t&&(this.pos+=e.length),!0},Xe.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},Xe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},Xe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var mt=function(e,t){this.state=e,this.lookAhead=t},vt=function(e,t,n,i){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function gt(e,t,n,i){var r=[e.state.modeGen],o={};jt(e,t.text,e.doc.mode,n,(function(e,t){return r.push(e,t)}),o,i);for(var a=n.state,l=function(i){n.baseTokens=r;var l=e.state.overlays[i],s=1,c=0;n.state=!0,jt(e,t.text,l.mode,n,(function(e,t){for(var n=s;c<e;){var i=r[s];i>e&&r.splice(s,1,e,r[s+1],i),s+=2,c=Math.min(e,i)}if(t)if(l.opaque)r.splice(n,s-n,e,"overlay "+t),s=n+2;else for(;n<s;n+=2){var o=r[n+1];r[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},s=0;s<e.state.overlays.length;++s)l(s);return{styles:r,classes:o.bgClass||o.textClass?o:null}}function yt(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var i=xt(e,tt(t)),r=t.text.length>e.options.maxHighlightLength&&Ue(e.doc.mode,i.state),o=gt(e,t,i);r&&(i.state=r),t.stateAfter=i.save(!r),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function xt(e,t,n){var i=e.doc,r=e.display;if(!i.mode.startState)return new vt(i,!0,t);var o=Nt(e,t,n),a=o>i.first&&Je(i,o-1).stateAfter,l=a?vt.fromSaved(i,a,o):new vt(i,Ye(i.mode),o);return i.iter(o,t,(function(n){bt(e,n.text,l);var i=l.line;n.stateAfter=i==t-1||i%5==0||i>=r.viewFrom&&i<r.viewTo?l.save():null,l.nextLine()})),n&&(i.modeFrontier=l.line),l}function bt(e,t,n,i){var r=e.doc.mode,o=new Xe(t,e.options.tabSize,n);for(o.start=o.pos=i||0,""==t&&wt(r,n.state);!o.eol();)Ct(r,o,n.state),o.start=o.pos}function wt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=qe(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function Ct(e,t,n,i){for(var r=0;r<10;r++){i&&(i[0]=qe(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}vt.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},vt.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},vt.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},vt.fromSaved=function(e,t,n){return t instanceof mt?new vt(e,Ue(e.mode,t.state),n,t.lookAhead):new vt(e,Ue(e.mode,t),n)},vt.prototype.save=function(e){var t=!1!==e?Ue(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new mt(t,this.maxLookAhead):t};var kt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function St(e,t,n,i){var r,o,a=e.doc,l=a.mode,s=Je(a,(t=ht(a,t)).line),c=xt(e,t.line,n),u=new Xe(s.text,e.options.tabSize,c);for(i&&(o=[]);(i||u.pos<t.ch)&&!u.eol();)u.start=u.pos,r=Ct(l,u,c.state),i&&o.push(new kt(u,r,Ue(a.mode,c.state)));return i?o:new kt(u,r,c.state)}function _t(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var i=n[1]?"bgClass":"textClass";null==t[i]?t[i]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[i])||(t[i]+=" "+n[2])}return e}function jt(e,t,n,i,r,o,a){var l=n.flattenSpans;null==l&&(l=e.options.flattenSpans);var s,c=0,u=null,d=new Xe(t,e.options.tabSize,i),h=e.options.addModeClass&&[null];for(""==t&&_t(wt(n,i.state),o);!d.eol();){if(d.pos>e.options.maxHighlightLength?(l=!1,a&&bt(e,t,i,d.pos),d.pos=t.length,s=null):s=_t(Ct(n,d,i.state,h),o),h){var p=h[0].name;p&&(s="m-"+(s?p+" "+s:p))}if(!l||u!=s){for(;c<d.start;)r(c=Math.min(d.start,c+5e3),u);u=s}d.start=d.pos}for(;c<d.pos;){var f=Math.min(d.pos,c+5e3);r(f,u),c=f}}function Nt(e,t,n){for(var i,r,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),l=t;l>a;--l){if(l<=o.first)return o.first;var s=Je(o,l-1),c=s.stateAfter;if(c&&(!n||l+(c instanceof mt?c.lookAhead:0)<=o.modeFrontier))return l;var u=R(s.text,null,e.options.tabSize);(null==r||i>u)&&(r=l-1,i=u)}return r}function Et(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,i=t-1;i>n;i--){var r=Je(e,i).stateAfter;if(r&&(!(r instanceof mt)||i+r.lookAhead<t)){n=i+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}var At=!1,Zt=!1;function It(){At=!0}function Dt(){Zt=!0}function Tt(e,t,n){this.marker=e,this.from=t,this.to=n}function Pt(e,t){if(e)for(var n=0;n<e.length;++n){var i=e[n];if(i.marker==t)return i}}function Mt(e,t){for(var n,i=0;i<e.length;++i)e[i]!=t&&(n||(n=[])).push(e[i]);return n}function Lt(e,t){e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],t.marker.attachLine(e)}function Bt(e,t,n){var i;if(e)for(var r=0;r<e.length;++r){var o=e[r],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var l=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(i||(i=[])).push(new Tt(a,o.from,l?null:o.to))}}return i}function Rt(e,t,n){var i;if(e)for(var r=0;r<e.length;++r){var o=e[r],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var l=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(i||(i=[])).push(new Tt(a,l?null:o.from-t,null==o.to?null:o.to-t))}}return i}function Ot(e,t){if(t.full)return null;var n=it(e,t.from.line)&&Je(e,t.from.line).markedSpans,i=it(e,t.to.line)&&Je(e,t.to.line).markedSpans;if(!n&&!i)return null;var r=t.from.ch,o=t.to.ch,a=0==at(t.from,t.to),l=Bt(n,r,a),s=Rt(i,o,a),c=1==t.text.length,u=Y(t.text).length+(c?r:0);if(l)for(var d=0;d<l.length;++d){var h=l[d];if(null==h.to){var p=Pt(s,h.marker);p?c&&(h.to=null==p.to?null:p.to+u):h.to=r}}if(s)for(var f=0;f<s.length;++f){var m=s[f];null!=m.to&&(m.to+=u),null==m.from?Pt(l,m.marker)||(m.from=u,c&&(l||(l=[])).push(m)):(m.from+=u,c&&(l||(l=[])).push(m))}l&&(l=Ft(l)),s&&s!=l&&(s=Ft(s));var v=[l];if(!c){var g,y=t.text.length-2;if(y>0&&l)for(var x=0;x<l.length;++x)null==l[x].to&&(g||(g=[])).push(new Tt(l[x].marker,null,null));for(var b=0;b<y;++b)v.push(g);v.push(s)}return v}function Ft(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function Wt(e,t,n){var i=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||i&&-1!=F(i,n)||(i||(i=[])).push(n)}})),!i)return null;for(var r=[{from:t,to:n}],o=0;o<i.length;++o)for(var a=i[o],l=a.find(0),s=0;s<r.length;++s){var c=r[s];if(!(at(c.to,l.from)<0||at(c.from,l.to)>0)){var u=[s,1],d=at(c.from,l.from),h=at(c.to,l.to);(d<0||!a.inclusiveLeft&&!d)&&u.push({from:c.from,to:l.from}),(h>0||!a.inclusiveRight&&!h)&&u.push({from:l.to,to:c.to}),r.splice.apply(r,u),s+=u.length-3}}return r}function Ht(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function zt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function Gt(e){return e.inclusiveLeft?-1:0}function Vt(e){return e.inclusiveRight?1:0}function Kt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var i=e.find(),r=t.find(),o=at(i.from,r.from)||Gt(e)-Gt(t);if(o)return-o;var a=at(i.to,r.to)||Vt(e)-Vt(t);return a||t.id-e.id}function Ut(e,t){var n,i=Zt&&e.markedSpans;if(i)for(var r=void 0,o=0;o<i.length;++o)(r=i[o]).marker.collapsed&&null==(t?r.from:r.to)&&(!n||Kt(n,r.marker)<0)&&(n=r.marker);return n}function qt(e){return Ut(e,!0)}function Yt(e){return Ut(e,!1)}function Xt(e,t){var n,i=Zt&&e.markedSpans;if(i)for(var r=0;r<i.length;++r){var o=i[r];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Kt(n,o.marker)<0)&&(n=o.marker)}return n}function Jt(e,t,n,i,r){var o=Je(e,t),a=Zt&&o.markedSpans;if(a)for(var l=0;l<a.length;++l){var s=a[l];if(s.marker.collapsed){var c=s.marker.find(0),u=at(c.from,n)||Gt(s.marker)-Gt(r),d=at(c.to,i)||Vt(s.marker)-Vt(r);if(!(u>=0&&d<=0||u<=0&&d>=0)&&(u<=0&&(s.marker.inclusiveRight&&r.inclusiveLeft?at(c.to,n)>=0:at(c.to,n)>0)||u>=0&&(s.marker.inclusiveRight&&r.inclusiveLeft?at(c.from,i)<=0:at(c.from,i)<0)))return!0}}}function Qt(e){for(var t;t=qt(e);)e=t.find(-1,!0).line;return e}function $t(e){for(var t;t=Yt(e);)e=t.find(1,!0).line;return e}function en(e){for(var t,n;t=Yt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}function tn(e,t){var n=Je(e,t),i=Qt(n);return n==i?t:tt(i)}function nn(e,t){if(t>e.lastLine())return t;var n,i=Je(e,t);if(!rn(e,i))return t;for(;n=Yt(i);)i=n.find(1,!0).line;return tt(i)+1}function rn(e,t){var n=Zt&&t.markedSpans;if(n)for(var i=void 0,r=0;r<n.length;++r)if((i=n[r]).marker.collapsed){if(null==i.from)return!0;if(!i.marker.widgetNode&&0==i.from&&i.marker.inclusiveLeft&&on(e,t,i))return!0}}function on(e,t,n){if(null==n.to){var i=n.marker.find(1,!0);return on(e,i.line,Pt(i.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var r=void 0,o=0;o<t.markedSpans.length;++o)if((r=t.markedSpans[o]).marker.collapsed&&!r.marker.widgetNode&&r.from==n.to&&(null==r.to||r.to!=n.from)&&(r.marker.inclusiveLeft||n.marker.inclusiveRight)&&on(e,t,r))return!0}function an(e){for(var t=0,n=(e=Qt(e)).parent,i=0;i<n.lines.length;++i){var r=n.lines[i];if(r==e)break;t+=r.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var l=o.children[a];if(l==n)break;t+=l.height}return t}function ln(e){if(0==e.height)return 0;for(var t,n=e.text.length,i=e;t=qt(i);){var r=t.find(0,!0);i=r.from.line,n+=r.from.ch-r.to.ch}for(i=e;t=Yt(i);){var o=t.find(0,!0);n-=i.text.length-o.from.ch,n+=(i=o.to.line).text.length-o.to.ch}return n}function sn(e){var t=e.display,n=e.doc;t.maxLine=Je(n,n.first),t.maxLineLength=ln(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=ln(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var cn=function(e,t,n){this.text=e,zt(this,t),this.height=n?n(this):1};function un(e,t,n,i){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),Ht(e),zt(e,n);var r=i?i(e):1;r!=e.height&&et(e,r)}function dn(e){e.parent=null,Ht(e)}cn.prototype.lineNo=function(){return tt(this)},we(cn);var hn={},pn={};function fn(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?pn:hn;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function mn(e,t){var n=Z("span",null,null,s?"padding-right: .1px":null),i={pre:Z("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var r=0;r<=(t.rest?t.rest.length:0);r++){var o=r?t.rest[r-1]:t.line,a=void 0;i.pos=0,i.addToken=gn,De(e.display.measure)&&(a=he(o,e.doc.direction))&&(i.addToken=xn(i.addToken,a)),i.map=[],wn(o,i,yt(e,o,t!=e.display.externalMeasured&&tt(o))),o.styleClasses&&(o.styleClasses.bgClass&&(i.bgClass=P(o.styleClasses.bgClass,i.bgClass||"")),o.styleClasses.textClass&&(i.textClass=P(o.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Ie(e.display.measure))),0==r?(t.measure.map=i.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(i.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(s){var l=i.content.lastChild;(/\bcm-tab\b/.test(l.className)||l.querySelector&&l.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,i.pre),i.pre.className&&(i.textClass=P(i.pre.className,i.textClass||"")),i}function vn(e){var t=A("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function gn(e,t,n,i,r,o,s){if(t){var c,u=e.splitSpaces?yn(t,e.trailingSpace):t,d=e.cm.state.specialChars,h=!1;if(d.test(t)){c=document.createDocumentFragment();for(var p=0;;){d.lastIndex=p;var f=d.exec(t),m=f?f.index-p:t.length-p;if(m){var v=document.createTextNode(u.slice(p,p+m));a&&l<9?c.appendChild(A("span",[v])):c.appendChild(v),e.map.push(e.pos,e.pos+m,v),e.col+=m,e.pos+=m}if(!f)break;p+=m+1;var g=void 0;if("\t"==f[0]){var y=e.cm.options.tabSize,x=y-e.col%y;(g=c.appendChild(A("span",q(x),"cm-tab"))).setAttribute("role","presentation"),g.setAttribute("cm-text","\t"),e.col+=x}else"\r"==f[0]||"\n"==f[0]?((g=c.appendChild(A("span","\r"==f[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",f[0]),e.col+=1):((g=e.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),a&&l<9?c.appendChild(A("span",[g])):c.appendChild(g),e.col+=1);e.map.push(e.pos,e.pos+1,g),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&l<9&&(h=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||i||r||h||o||s){var b=n||"";i&&(b+=i),r&&(b+=r);var w=A("span",[c],b,o);if(s)for(var C in s)s.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&w.setAttribute(C,s[C]);return e.content.appendChild(w)}e.content.appendChild(c)}}function yn(e,t){if(e.length>1&&!/ /.test(e))return e;for(var n=t,i="",r=0;r<e.length;r++){var o=e.charAt(r);" "!=o||!n||r!=e.length-1&&32!=e.charCodeAt(r+1)||(o=" "),i+=o,n=" "==o}return i}function xn(e,t){return function(n,i,r,o,a,l,s){r=r?r+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+i.length;;){for(var d=void 0,h=0;h<t.length&&!((d=t[h]).to>c&&d.from<=c);h++);if(d.to>=u)return e(n,i,r,o,a,l,s);e(n,i.slice(0,d.to-c),r,o,null,l,s),o=null,i=i.slice(d.to-c),c=d.to}}}function bn(e,t,n,i){var r=!i&&n.widgetNode;r&&e.map.push(e.pos,e.pos+t,r),!i&&e.cm.display.input.needsContentAttribute&&(r||(r=e.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(e.cm.display.input.setUneditable(r),e.content.appendChild(r)),e.pos+=t,e.trailingSpace=!1}function wn(e,t,n){var i=e.markedSpans,r=e.text,o=0;if(i)for(var a,l,s,c,u,d,h,p=r.length,f=0,m=1,v="",g=0;;){if(g==f){s=c=u=l="",h=null,d=null,g=1/0;for(var y=[],x=void 0,b=0;b<i.length;++b){var w=i[b],C=w.marker;if("bookmark"==C.type&&w.from==f&&C.widgetNode)y.push(C);else if(w.from<=f&&(null==w.to||w.to>f||C.collapsed&&w.to==f&&w.from==f)){if(null!=w.to&&w.to!=f&&g>w.to&&(g=w.to,c=""),C.className&&(s+=" "+C.className),C.css&&(l=(l?l+";":"")+C.css),C.startStyle&&w.from==f&&(u+=" "+C.startStyle),C.endStyle&&w.to==g&&(x||(x=[])).push(C.endStyle,w.to),C.title&&((h||(h={})).title=C.title),C.attributes)for(var k in C.attributes)(h||(h={}))[k]=C.attributes[k];C.collapsed&&(!d||Kt(d.marker,C)<0)&&(d=w)}else w.from>f&&g>w.from&&(g=w.from)}if(x)for(var S=0;S<x.length;S+=2)x[S+1]==g&&(c+=" "+x[S]);if(!d||d.from==f)for(var _=0;_<y.length;++_)bn(t,0,y[_]);if(d&&(d.from||0)==f){if(bn(t,(null==d.to?p+1:d.to)-f,d.marker,null==d.from),null==d.to)return;d.to==f&&(d=!1)}}if(f>=p)break;for(var j=Math.min(p,g);;){if(v){var N=f+v.length;if(!d){var E=N>j?v.slice(0,j-f):v;t.addToken(t,E,a?a+s:s,u,f+E.length==g?c:"",l,h)}if(N>=j){v=v.slice(j-f),f=j;break}f=N,u=""}v=r.slice(o,o=n[m++]),a=fn(n[m++],t.cm.options)}}else for(var A=1;A<n.length;A+=2)t.addToken(t,r.slice(o,o=n[A]),fn(n[A+1],t.cm.options))}function Cn(e,t,n){this.line=t,this.rest=en(t),this.size=this.rest?tt(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=rn(e,t)}function kn(e,t,n){for(var i,r=[],o=t;o<n;o=i){var a=new Cn(e.doc,Je(e.doc,o),o);i=o+a.size,r.push(a)}return r}var Sn=null;function _n(e){Sn?Sn.ops.push(e):e.ownsGroup=Sn={ops:[e],delayedCallbacks:[]}}function jn(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var i=0;i<e.ops.length;i++){var r=e.ops[i];if(r.cursorActivityHandlers)for(;r.cursorActivityCalled<r.cursorActivityHandlers.length;)r.cursorActivityHandlers[r.cursorActivityCalled++].call(null,r.cm)}}while(n<t.length)}function Nn(e,t){var n=e.ownsGroup;if(n)try{jn(n)}finally{Sn=null,t(n)}}var En=null;function An(e,t){var n=me(e,t);if(n.length){var i,r=Array.prototype.slice.call(arguments,2);Sn?i=Sn.delayedCallbacks:En?i=En:(i=En=[],setTimeout(Zn,0));for(var o=function(e){i.push((function(){return n[e].apply(null,r)}))},a=0;a<n.length;++a)o(a)}}function Zn(){var e=En;En=null;for(var t=0;t<e.length;++t)e[t]()}function In(e,t,n,i){for(var r=0;r<t.changes.length;r++){var o=t.changes[r];"text"==o?Mn(e,t):"gutter"==o?Bn(e,t,n,i):"class"==o?Ln(e,t):"widget"==o&&Rn(e,t,i)}t.changes=null}function Dn(e){return e.node==e.text&&(e.node=A("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&l<8&&(e.node.style.zIndex=2)),e.node}function Tn(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var i=Dn(t);t.background=i.insertBefore(A("div",null,n),i.firstChild),e.display.input.setUneditable(t.background)}}function Pn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):mn(e,t)}function Mn(e,t){var n=t.text.className,i=Pn(e,t);t.text==t.node&&(t.node=i.pre),t.text.parentNode.replaceChild(i.pre,t.text),t.text=i.pre,i.bgClass!=t.bgClass||i.textClass!=t.textClass?(t.bgClass=i.bgClass,t.textClass=i.textClass,Ln(e,t)):n&&(t.text.className=n)}function Ln(e,t){Tn(e,t),t.line.wrapClass?Dn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function Bn(e,t,n,i){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var r=Dn(t);t.gutterBackground=A("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px; width: "+i.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),r.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=Dn(t),l=t.gutter=A("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?i.fixedPos:-i.gutterTotalWidth)+"px");if(e.display.input.setUneditable(l),a.insertBefore(l,t.text),t.line.gutterClass&&(l.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=l.appendChild(A("div",rt(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+i.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var s=0;s<e.display.gutterSpecs.length;++s){var c=e.display.gutterSpecs[s].className,u=o.hasOwnProperty(c)&&o[c];u&&l.appendChild(A("div",[u],"CodeMirror-gutter-elt","left: "+i.gutterLeft[c]+"px; width: "+i.gutterWidth[c]+"px"))}}}function Rn(e,t,n){t.alignable&&(t.alignable=null);for(var i=S("CodeMirror-linewidget"),r=t.node.firstChild,o=void 0;r;r=o)o=r.nextSibling,i.test(r.className)&&t.node.removeChild(r);Fn(e,t,n)}function On(e,t,n,i){var r=Pn(e,t);return t.text=t.node=r.pre,r.bgClass&&(t.bgClass=r.bgClass),r.textClass&&(t.textClass=r.textClass),Ln(e,t),Bn(e,t,n,i),Fn(e,t,i),t.node}function Fn(e,t,n){if(Wn(e,t.line,t,n,!0),t.rest)for(var i=0;i<t.rest.length;i++)Wn(e,t.rest[i],t,n,!1)}function Wn(e,t,n,i,r){if(t.widgets)for(var o=Dn(n),a=0,l=t.widgets;a<l.length;++a){var s=l[a],c=A("div",[s.node],"CodeMirror-linewidget"+(s.className?" "+s.className:""));s.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),Hn(s,c,n,i),e.display.input.setUneditable(c),r&&s.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),An(s,"redraw")}}function Hn(e,t,n,i){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var r=i.wrapperWidth;t.style.left=i.fixedPos+"px",e.coverGutter||(r-=i.gutterTotalWidth,t.style.paddingLeft=i.gutterTotalWidth+"px"),t.style.width=r+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-i.gutterTotalWidth+"px"))}function zn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!I(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),E(t.display.measure,A("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function Gn(e,t){for(var n=je(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Vn(e){return e.lineSpace.offsetTop}function Kn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function Un(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=E(e.measure,A("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,i={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(i.left)||isNaN(i.right)||(e.cachedPaddingH=i),i}function qn(e){return W-e.display.nativeBarWidth}function Yn(e){return e.display.scroller.clientWidth-qn(e)-e.display.barWidth}function Xn(e){return e.display.scroller.clientHeight-qn(e)-e.display.barHeight}function Jn(e,t,n){var i=e.options.lineWrapping,r=i&&Yn(e);if(!t.measure.heights||i&&t.measure.width!=r){var o=t.measure.heights=[];if(i){t.measure.width=r;for(var a=t.text.firstChild.getClientRects(),l=0;l<a.length-1;l++){var s=a[l],c=a[l+1];Math.abs(s.bottom-c.bottom)>2&&o.push((s.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Qn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var i=0;i<e.rest.length;i++)if(e.rest[i]==t)return{map:e.measure.maps[i],cache:e.measure.caches[i]};for(var r=0;r<e.rest.length;r++)if(tt(e.rest[r])>n)return{map:e.measure.maps[r],cache:e.measure.caches[r],before:!0}}function $n(e,t){var n=tt(t=Qt(t)),i=e.display.externalMeasured=new Cn(e.doc,t,n);i.lineN=n;var r=i.built=mn(e,i);return i.text=r.pre,E(e.display.lineMeasure,r.pre),i}function ei(e,t,n,i){return ii(e,ni(e,t),n,i)}function ti(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[Li(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function ni(e,t){var n=tt(t),i=ti(e,n);i&&!i.text?i=null:i&&i.changes&&(In(e,i,n,Ii(e)),e.curOp.forceUpdate=!0),i||(i=$n(e,t));var r=Qn(i,t,n);return{line:t,view:i,rect:null,map:r.map,cache:r.cache,before:r.before,hasHeights:!1}}function ii(e,t,n,i,r){t.before&&(n=-1);var o,a=n+(i||"");return t.cache.hasOwnProperty(a)?o=t.cache[a]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(Jn(e,t.view,t.rect),t.hasHeights=!0),(o=si(e,t,n,i)).bogus||(t.cache[a]=o)),{left:o.left,right:o.right,top:r?o.rtop:o.top,bottom:r?o.rbottom:o.bottom}}var ri,oi={left:0,right:0,top:0,bottom:0};function ai(e,t,n){for(var i,r,o,a,l,s,c=0;c<e.length;c+=3)if(l=e[c],s=e[c+1],t<l?(r=0,o=1,a="left"):t<s?o=1+(r=t-l):(c==e.length-3||t==s&&e[c+3]>t)&&(r=(o=s-l)-1,t>=s&&(a="right")),null!=r){if(i=e[c+2],l==s&&n==(i.insertLeft?"left":"right")&&(a=n),"left"==n&&0==r)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)i=e[2+(c-=3)],a="left";if("right"==n&&r==s-l)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)i=e[(c+=3)+2],a="right";break}return{node:i,start:r,end:o,collapse:a,coverStart:l,coverEnd:s}}function li(e,t){var n=oi;if("left"==t)for(var i=0;i<e.length&&(n=e[i]).left==n.right;i++);else for(var r=e.length-1;r>=0&&(n=e[r]).left==n.right;r--);return n}function si(e,t,n,i){var r,o=ai(t.map,n,i),s=o.node,c=o.start,u=o.end,d=o.collapse;if(3==s.nodeType){for(var h=0;h<4;h++){for(;c&&oe(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&oe(t.line.text.charAt(o.coverStart+u));)++u;if((r=a&&l<9&&0==c&&u==o.coverEnd-o.coverStart?s.parentNode.getBoundingClientRect():li(_(s,c,u).getClientRects(),i)).left||r.right||0==c)break;u=c,c-=1,d="right"}a&&l<11&&(r=ci(e.display.measure,r))}else{var p;c>0&&(d=i="right"),r=e.options.lineWrapping&&(p=s.getClientRects()).length>1?p["right"==i?p.length-1:0]:s.getBoundingClientRect()}if(a&&l<9&&!c&&(!r||!r.left&&!r.right)){var f=s.parentNode.getClientRects()[0];r=f?{left:f.left,right:f.left+Zi(e.display),top:f.top,bottom:f.bottom}:oi}for(var m=r.top-t.rect.top,v=r.bottom-t.rect.top,g=(m+v)/2,y=t.view.measure.heights,x=0;x<y.length-1&&!(g<y[x]);x++);var b=x?y[x-1]:0,w=y[x],C={left:("right"==d?r.right:r.left)-t.rect.left,right:("left"==d?r.left:r.right)-t.rect.left,top:b,bottom:w};return r.left||r.right||(C.bogus=!0),e.options.singleCursorHeightPerLine||(C.rtop=m,C.rbottom=v),C}function ci(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!Re(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,i=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*i,bottom:t.bottom*i}}function ui(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function di(e){e.display.externalMeasure=null,N(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)ui(e.display.view[t])}function hi(e){di(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function pi(){return u&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function fi(){return u&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function mi(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=zn(e.widgets[n]));return t}function vi(e,t,n,i,r){if(!r){var o=mi(t);n.top+=o,n.bottom+=o}if("line"==i)return n;i||(i="local");var a=an(t);if("local"==i?a+=Vn(e.display):a-=e.display.viewOffset,"page"==i||"window"==i){var l=e.display.lineSpace.getBoundingClientRect();a+=l.top+("window"==i?0:fi());var s=l.left+("window"==i?0:pi());n.left+=s,n.right+=s}return n.top+=a,n.bottom+=a,n}function gi(e,t,n){if("div"==n)return t;var i=t.left,r=t.top;if("page"==n)i-=pi(),r-=fi();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();i+=o.left,r+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:i-a.left,top:r-a.top}}function yi(e,t,n,i,r){return i||(i=Je(e.doc,t.line)),vi(e,i,ei(e,i,t.ch,r),n)}function xi(e,t,n,i,r,o){function a(t,a){var l=ii(e,r,t,a?"right":"left",o);return a?l.left=l.right:l.right=l.left,vi(e,i,l,n)}i=i||Je(e.doc,t.line),r||(r=ni(e,i));var l=he(i,e.doc.direction),s=t.ch,c=t.sticky;if(s>=i.text.length?(s=i.text.length,c="before"):s<=0&&(s=0,c="after"),!l)return a("before"==c?s-1:s,"before"==c);function u(e,t,n){return a(n?e-1:e,1==l[t].level!=n)}var d=ue(l,s,c),h=ce,p=u(s,d,"before"==c);return null!=h&&(p.other=u(s,h,"before"!=c)),p}function bi(e,t){var n=0;t=ht(e.doc,t),e.options.lineWrapping||(n=Zi(e.display)*t.ch);var i=Je(e.doc,t.line),r=an(i)+Vn(e.display);return{left:n,right:n,top:r,bottom:r+i.height}}function wi(e,t,n,i,r){var o=ot(e,t,n);return o.xRel=r,i&&(o.outside=i),o}function Ci(e,t,n){var i=e.doc;if((n+=e.display.viewOffset)<0)return wi(i.first,0,null,-1,-1);var r=nt(i,n),o=i.first+i.size-1;if(r>o)return wi(i.first+i.size-1,Je(i,o).text.length,null,1,1);t<0&&(t=0);for(var a=Je(i,r);;){var l=ji(e,a,r,t,n),s=Xt(a,l.ch+(l.xRel>0||l.outside>0?1:0));if(!s)return l;var c=s.find(1);if(c.line==r)return c;a=Je(i,r=c.line)}}function ki(e,t,n,i){i-=mi(t);var r=t.text.length,o=le((function(t){return ii(e,n,t-1).bottom<=i}),r,0);return{begin:o,end:r=le((function(t){return ii(e,n,t).top>i}),o,r)}}function Si(e,t,n,i){return n||(n=ni(e,t)),ki(e,t,n,vi(e,t,ii(e,n,i),"line").top)}function _i(e,t,n,i){return!(e.bottom<=n)&&(e.top>n||(i?e.left:e.right)>t)}function ji(e,t,n,i,r){r-=an(t);var o=ni(e,t),a=mi(t),l=0,s=t.text.length,c=!0,u=he(t,e.doc.direction);if(u){var d=(e.options.lineWrapping?Ei:Ni)(e,t,n,o,u,i,r);l=(c=1!=d.level)?d.from:d.to-1,s=c?d.to:d.from-1}var h,p,f=null,m=null,v=le((function(t){var n=ii(e,o,t);return n.top+=a,n.bottom+=a,!!_i(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(f=t,m=n),!0)}),l,s),g=!1;if(m){var y=i-m.left<m.right-i,x=y==c;v=f+(x?0:1),p=x?"after":"before",h=y?m.left:m.right}else{c||v!=s&&v!=l||v++,p=0==v?"after":v==t.text.length?"before":ii(e,o,v-(c?1:0)).bottom+a<=r==c?"after":"before";var b=xi(e,ot(n,v,p),"line",t,o);h=b.left,g=r<b.top?-1:r>=b.bottom?1:0}return wi(n,v=ae(t.text,v,1),p,g,i-h)}function Ni(e,t,n,i,r,o,a){var l=le((function(l){var s=r[l],c=1!=s.level;return _i(xi(e,ot(n,c?s.to:s.from,c?"before":"after"),"line",t,i),o,a,!0)}),0,r.length-1),s=r[l];if(l>0){var c=1!=s.level,u=xi(e,ot(n,c?s.from:s.to,c?"after":"before"),"line",t,i);_i(u,o,a,!0)&&u.top>a&&(s=r[l-1])}return s}function Ei(e,t,n,i,r,o,a){var l=ki(e,t,i,a),s=l.begin,c=l.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,d=null,h=0;h<r.length;h++){var p=r[h];if(!(p.from>=c||p.to<=s)){var f=ii(e,i,1!=p.level?Math.min(c,p.to)-1:Math.max(s,p.from)).right,m=f<o?o-f+1e9:f-o;(!u||d>m)&&(u=p,d=m)}}return u||(u=r[r.length-1]),u.from<s&&(u={from:s,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function Ai(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==ri){ri=A("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)ri.appendChild(document.createTextNode("x")),ri.appendChild(A("br"));ri.appendChild(document.createTextNode("x"))}E(e.measure,ri);var n=ri.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),N(e.measure),n||1}function Zi(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=A("span","xxxxxxxxxx"),n=A("pre",[t],"CodeMirror-line-like");E(e.measure,n);var i=t.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(e.cachedCharWidth=r),r||10}function Ii(e){for(var t=e.display,n={},i={},r=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var l=e.display.gutterSpecs[a].className;n[l]=o.offsetLeft+o.clientLeft+r,i[l]=o.clientWidth}return{fixedPos:Di(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:t.wrapper.clientWidth}}function Di(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function Ti(e){var t=Ai(e.display),n=e.options.lineWrapping,i=n&&Math.max(5,e.display.scroller.clientWidth/Zi(e.display)-3);return function(r){if(rn(e.doc,r))return 0;var o=0;if(r.widgets)for(var a=0;a<r.widgets.length;a++)r.widgets[a].height&&(o+=r.widgets[a].height);return n?o+(Math.ceil(r.text.length/i)||1)*t:o+t}}function Pi(e){var t=e.doc,n=Ti(e);t.iter((function(e){var t=n(e);t!=e.height&&et(e,t)}))}function Mi(e,t,n,i){var r=e.display;if(!n&&"true"==je(t).getAttribute("cm-not-content"))return null;var o,a,l=r.lineSpace.getBoundingClientRect();try{o=t.clientX-l.left,a=t.clientY-l.top}catch(e){return null}var s,c=Ci(e,o,a);if(i&&c.xRel>0&&(s=Je(e.doc,c.line).text).length==c.ch){var u=R(s,s.length,e.options.tabSize)-s.length;c=ot(c.line,Math.max(0,Math.round((o-Un(e.display).left)/Zi(e.display))-u))}return c}function Li(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,i=0;i<n.length;i++)if((t-=n[i].size)<0)return i}function Bi(e,t,n,i){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),i||(i=0);var r=e.display;if(i&&n<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>t)&&(r.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=r.viewTo)Zt&&tn(e.doc,t)<r.viewTo&&Oi(e);else if(n<=r.viewFrom)Zt&&nn(e.doc,n+i)>r.viewFrom?Oi(e):(r.viewFrom+=i,r.viewTo+=i);else if(t<=r.viewFrom&&n>=r.viewTo)Oi(e);else if(t<=r.viewFrom){var o=Fi(e,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):Oi(e)}else if(n>=r.viewTo){var a=Fi(e,t,t,-1);a?(r.view=r.view.slice(0,a.index),r.viewTo=a.lineN):Oi(e)}else{var l=Fi(e,t,t,-1),s=Fi(e,n,n+i,1);l&&s?(r.view=r.view.slice(0,l.index).concat(kn(e,l.lineN,s.lineN)).concat(r.view.slice(s.index)),r.viewTo+=i):Oi(e)}var c=r.externalMeasured;c&&(n<c.lineN?c.lineN+=i:t<c.lineN+c.size&&(r.externalMeasured=null))}function Ri(e,t,n){e.curOp.viewChanged=!0;var i=e.display,r=e.display.externalMeasured;if(r&&t>=r.lineN&&t<r.lineN+r.size&&(i.externalMeasured=null),!(t<i.viewFrom||t>=i.viewTo)){var o=i.view[Li(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==F(a,n)&&a.push(n)}}}function Oi(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function Fi(e,t,n,i){var r,o=Li(e,t),a=e.display.view;if(!Zt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var l=e.display.viewFrom,s=0;s<o;s++)l+=a[s].size;if(l!=t){if(i>0){if(o==a.length-1)return null;r=l+a[o].size-t,o++}else r=l-t;t+=r,n+=r}for(;tn(e.doc,n)!=n;){if(o==(i<0?0:a.length-1))return null;n+=i*a[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function Wi(e,t,n){var i=e.display;0==i.view.length||t>=i.viewTo||n<=i.viewFrom?(i.view=kn(e,t,n),i.viewFrom=t):(i.viewFrom>t?i.view=kn(e,t,i.viewFrom).concat(i.view):i.viewFrom<t&&(i.view=i.view.slice(Li(e,t))),i.viewFrom=t,i.viewTo<n?i.view=i.view.concat(kn(e,i.viewTo,n)):i.viewTo>n&&(i.view=i.view.slice(0,Li(e,n)))),i.viewTo=n}function Hi(e){for(var t=e.display.view,n=0,i=0;i<t.length;i++){var r=t[i];r.hidden||r.node&&!r.changes||++n}return n}function zi(e){e.display.input.showSelection(e.display.input.prepareSelection())}function Gi(e,t){void 0===t&&(t=!0);for(var n=e.doc,i={},r=i.cursors=document.createDocumentFragment(),o=i.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var l=n.sel.ranges[a];if(!(l.from().line>=e.display.viewTo||l.to().line<e.display.viewFrom)){var s=l.empty();(s||e.options.showCursorWhenSelecting)&&Vi(e,l.head,r),s||Ui(e,l,o)}}return i}function Vi(e,t,n){var i=xi(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),r=n.appendChild(A("div"," ","CodeMirror-cursor"));if(r.style.left=i.left+"px",r.style.top=i.top+"px",r.style.height=Math.max(0,i.bottom-i.top)*e.options.cursorHeight+"px",i.other){var o=n.appendChild(A("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));o.style.display="",o.style.left=i.other.left+"px",o.style.top=i.other.top+"px",o.style.height=.85*(i.other.bottom-i.other.top)+"px"}}function Ki(e,t){return e.top-t.top||e.left-t.left}function Ui(e,t,n){var i=e.display,r=e.doc,o=document.createDocumentFragment(),a=Un(e.display),l=a.left,s=Math.max(i.sizerWidth,Yn(e)-i.sizer.offsetLeft)-a.right,c="ltr"==r.direction;function u(e,t,n,i){t<0&&(t=0),t=Math.round(t),i=Math.round(i),o.appendChild(A("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n top: "+t+"px; width: "+(null==n?s-e:n)+"px;\n height: "+(i-t)+"px"))}function d(t,n,i){var o,a,d=Je(r,t),h=d.text.length;function p(n,i){return yi(e,ot(t,n),"div",d,i)}function f(t,n,i){var r=Si(e,d,null,t),o="ltr"==n==("after"==i)?"left":"right";return p("after"==i?r.begin:r.end-(/\s/.test(d.text.charAt(r.end-1))?2:1),o)[o]}var m=he(d,r.direction);return se(m,n||0,null==i?h:i,(function(e,t,r,d){var v="ltr"==r,g=p(e,v?"left":"right"),y=p(t-1,v?"right":"left"),x=null==n&&0==e,b=null==i&&t==h,w=0==d,C=!m||d==m.length-1;if(y.top-g.top<=3){var k=(c?b:x)&&C,S=(c?x:b)&&w?l:(v?g:y).left,_=k?s:(v?y:g).right;u(S,g.top,_-S,g.bottom)}else{var j,N,E,A;v?(j=c&&x&&w?l:g.left,N=c?s:f(e,r,"before"),E=c?l:f(t,r,"after"),A=c&&b&&C?s:y.right):(j=c?f(e,r,"before"):l,N=!c&&x&&w?s:g.right,E=!c&&b&&C?l:y.left,A=c?f(t,r,"after"):s),u(j,g.top,N-j,g.bottom),g.bottom<y.top&&u(l,g.bottom,null,y.top),u(E,y.top,A-E,y.bottom)}(!o||Ki(g,o)<0)&&(o=g),Ki(y,o)<0&&(o=y),(!a||Ki(g,a)<0)&&(a=g),Ki(y,a)<0&&(a=y)})),{start:o,end:a}}var h=t.from(),p=t.to();if(h.line==p.line)d(h.line,h.ch,p.ch);else{var f=Je(r,h.line),m=Je(r,p.line),v=Qt(f)==Qt(m),g=d(h.line,h.ch,v?f.text.length+1:null).end,y=d(p.line,v?0:null,p.ch).start;v&&(g.top<y.top-2?(u(g.right,g.top,null,g.bottom),u(l,y.top,y.left,y.bottom)):u(g.right,g.top,y.left-g.right,g.bottom)),g.bottom<y.top&&u(l,g.bottom,null,y.top)}n.appendChild(o)}function qi(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||Qi(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function Yi(e){e.state.focused||(e.display.input.focus(),Ji(e))}function Xi(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,Qi(e))}),100)}function Ji(e,t){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,T(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),s&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),qi(e))}function Qi(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,j(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function $i(e){for(var t=e.display,n=t.lineDiv.offsetTop,i=0;i<t.view.length;i++){var r=t.view[i],o=e.options.lineWrapping,s=void 0,c=0;if(!r.hidden){if(a&&l<8){var u=r.node.offsetTop+r.node.offsetHeight;s=u-n,n=u}else{var d=r.node.getBoundingClientRect();s=d.bottom-d.top,!o&&r.text.firstChild&&(c=r.text.firstChild.getBoundingClientRect().right-d.left-1)}var h=r.line.height-s;if((h>.005||h<-.005)&&(et(r.line,s),er(r.line),r.rest))for(var p=0;p<r.rest.length;p++)er(r.rest[p]);if(c>e.display.sizerWidth){var f=Math.ceil(c/Zi(e.display));f>e.display.maxLineLength&&(e.display.maxLineLength=f,e.display.maxLine=r.line,e.display.maxLineChanged=!0)}}}}function er(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],i=n.node.parentNode;i&&(n.height=i.offsetHeight)}}function tr(e,t,n){var i=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;i=Math.floor(i-Vn(e));var r=n&&null!=n.bottom?n.bottom:i+e.wrapper.clientHeight,o=nt(t,i),a=nt(t,r);if(n&&n.ensure){var l=n.ensure.from.line,s=n.ensure.to.line;l<o?(o=l,a=nt(t,an(Je(t,l))+e.wrapper.clientHeight)):Math.min(s,t.lastLine())>=a&&(o=nt(t,an(Je(t,s))-e.wrapper.clientHeight),a=s)}return{from:o,to:Math.max(a,o+1)}}function nr(e,t){if(!ye(e,"scrollCursorIntoView")){var n=e.display,i=n.sizer.getBoundingClientRect(),r=null;if(t.top+i.top<0?r=!0:t.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!f){var o=A("div","",null,"position: absolute;\n top: "+(t.top-n.viewOffset-Vn(e.display))+"px;\n height: "+(t.bottom-t.top+qn(e)+n.barHeight)+"px;\n left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(r),e.display.lineSpace.removeChild(o)}}}function ir(e,t,n,i){var r;null==i&&(i=0),e.options.lineWrapping||t!=n||(n="before"==(t=t.ch?ot(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t).sticky?ot(t.line,t.ch+1,"before"):t);for(var o=0;o<5;o++){var a=!1,l=xi(e,t),s=n&&n!=t?xi(e,n):l,c=or(e,r={left:Math.min(l.left,s.left),top:Math.min(l.top,s.top)-i,right:Math.max(l.left,s.left),bottom:Math.max(l.bottom,s.bottom)+i}),u=e.doc.scrollTop,d=e.doc.scrollLeft;if(null!=c.scrollTop&&(hr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(fr(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-d)>1&&(a=!0)),!a)break}return r}function rr(e,t){var n=or(e,t);null!=n.scrollTop&&hr(e,n.scrollTop),null!=n.scrollLeft&&fr(e,n.scrollLeft)}function or(e,t){var n=e.display,i=Ai(e.display);t.top<0&&(t.top=0);var r=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=Xn(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var l=e.doc.height+Kn(n),s=t.top<i,c=t.bottom>l-i;if(t.top<r)a.scrollTop=s?0:t.top;else if(t.bottom>r+o){var u=Math.min(t.top,(c?l:t.bottom)-o);u!=r&&(a.scrollTop=u)}var d=e.options.fixedGutter?0:n.gutters.offsetWidth,h=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-d,p=Yn(e)-n.gutters.offsetWidth,f=t.right-t.left>p;return f&&(t.right=t.left+p),t.left<10?a.scrollLeft=0:t.left<h?a.scrollLeft=Math.max(0,t.left+d-(f?0:10)):t.right>p+h-3&&(a.scrollLeft=t.right+(f?0:10)-p),a}function ar(e,t){null!=t&&(ur(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function lr(e){ur(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function sr(e,t,n){null==t&&null==n||ur(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function cr(e,t){ur(e),e.curOp.scrollToPos=t}function ur(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,dr(e,bi(e,t.from),bi(e,t.to),t.margin))}function dr(e,t,n,i){var r=or(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-i,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+i});sr(e,r.scrollLeft,r.scrollTop)}function hr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||zr(e,{top:t}),pr(e,t,!0),n&&zr(e),Mr(e,100))}function pr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function fr(e,t,n,i){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!i||(e.doc.scrollLeft=t,Ur(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function mr(e){var t=e.display,n=t.gutters.offsetWidth,i=Math.round(e.doc.height+Kn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+qn(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var vr=function(e,t,n){this.cm=n;var i=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=r.tabIndex=-1,e(i),e(r),fe(i,"scroll",(function(){i.clientHeight&&t(i.scrollTop,"vertical")})),fe(r,"scroll",(function(){r.clientWidth&&t(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&l<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};vr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,i=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?i+"px":"0";var r=e.viewHeight-(t?i:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:t?i:0}},vr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},vr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},vr.prototype.zeroWidthHack=function(){var e=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new O,this.disableVert=new O},vr.prototype.enableZeroWidthBar=function(e,t,n){function i(){var r=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,i)}e.style.pointerEvents="auto",t.set(1e3,i)},vr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var gr=function(){};function yr(e,t){t||(t=mr(e));var n=e.display.barWidth,i=e.display.barHeight;xr(e,t);for(var r=0;r<4&&n!=e.display.barWidth||i!=e.display.barHeight;r++)n!=e.display.barWidth&&e.options.lineWrapping&&$i(e),xr(e,mr(e)),n=e.display.barWidth,i=e.display.barHeight}function xr(e,t){var n=e.display,i=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}gr.prototype.update=function(){return{bottom:0,right:0}},gr.prototype.setScrollLeft=function(){},gr.prototype.setScrollTop=function(){},gr.prototype.clear=function(){};var br={native:vr,null:gr};function wr(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&j(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new br[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),fe(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?fr(e,t):hr(e,t)}),e),e.display.scrollbars.addClass&&T(e.display.wrapper,e.display.scrollbars.addClass)}var Cr=0;function kr(e){e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Cr},_n(e.curOp)}function Sr(e){var t=e.curOp;t&&Nn(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;_r(e)}))}function _r(e){for(var t=e.ops,n=0;n<t.length;n++)jr(t[n]);for(var i=0;i<t.length;i++)Nr(t[i]);for(var r=0;r<t.length;r++)Er(t[r]);for(var o=0;o<t.length;o++)Ar(t[o]);for(var a=0;a<t.length;a++)Zr(t[a])}function jr(e){var t=e.cm,n=t.display;Rr(t),e.updateMaxLine&&sn(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new Br(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Nr(e){e.updatedDisplay=e.mustUpdate&&Wr(e.cm,e.update)}function Er(e){var t=e.cm,n=t.display;e.updatedDisplay&&$i(t),e.barMeasure=mr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=ei(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+qn(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Yn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Ar(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&fr(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==D();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&yr(t,e.barMeasure),e.updatedDisplay&&Kr(t,e.barMeasure),e.selectionChanged&&qi(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&Yi(e.cm)}function Zr(e){var t=e.cm,n=t.display,i=t.doc;e.updatedDisplay&&Hr(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&pr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&fr(t,e.scrollLeft,!0,!0),e.scrollToPos&&nr(t,ir(t,ht(i,e.scrollToPos.from),ht(i,e.scrollToPos.to),e.scrollToPos.margin));var r=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(r)for(var a=0;a<r.length;++a)r[a].lines.length||ge(r[a],"hide");if(o)for(var l=0;l<o.length;++l)o[l].lines.length&&ge(o[l],"unhide");n.wrapper.offsetHeight&&(i.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ge(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function Ir(e,t){if(e.curOp)return t();kr(e);try{return t()}finally{Sr(e)}}function Dr(e,t){return function(){if(e.curOp)return t.apply(e,arguments);kr(e);try{return t.apply(e,arguments)}finally{Sr(e)}}}function Tr(e){return function(){if(this.curOp)return e.apply(this,arguments);kr(this);try{return e.apply(this,arguments)}finally{Sr(this)}}}function Pr(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);kr(t);try{return e.apply(this,arguments)}finally{Sr(t)}}}function Mr(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,L(Lr,e))}function Lr(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,i=xt(e,t.highlightFrontier),r=[];t.iter(i.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(i.line>=e.display.viewFrom){var a=o.styles,l=o.text.length>e.options.maxHighlightLength?Ue(t.mode,i.state):null,s=gt(e,o,i,!0);l&&(i.state=l),o.styles=s.styles;var c=o.styleClasses,u=s.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var d=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),h=0;!d&&h<a.length;++h)d=a[h]!=o.styles[h];d&&r.push(i.line),o.stateAfter=i.save(),i.nextLine()}else o.text.length<=e.options.maxHighlightLength&&bt(e,o.text,i),o.stateAfter=i.line%5==0?i.save():null,i.nextLine();if(+new Date>n)return Mr(e,e.options.workDelay),!0})),t.highlightFrontier=i.line,t.modeFrontier=Math.max(t.modeFrontier,i.line),r.length&&Ir(e,(function(){for(var t=0;t<r.length;t++)Ri(e,r[t],"text")}))}}var Br=function(e,t,n){var i=e.display;this.viewport=t,this.visible=tr(i,e.doc,t),this.editorIsHidden=!i.wrapper.offsetWidth,this.wrapperHeight=i.wrapper.clientHeight,this.wrapperWidth=i.wrapper.clientWidth,this.oldDisplayWidth=Yn(e),this.force=n,this.dims=Ii(e),this.events=[]};function Rr(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=qn(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=qn(e)+"px",t.scrollbarsClipped=!0)}function Or(e){if(e.hasFocus())return null;var t=D();if(!t||!I(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var i=window.getSelection();i.anchorNode&&i.extend&&I(e.display.lineDiv,i.anchorNode)&&(n.anchorNode=i.anchorNode,n.anchorOffset=i.anchorOffset,n.focusNode=i.focusNode,n.focusOffset=i.focusOffset)}return n}function Fr(e){if(e&&e.activeElt&&e.activeElt!=D()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&I(document.body,e.anchorNode)&&I(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}function Wr(e,t){var n=e.display,i=e.doc;if(t.editorIsHidden)return Oi(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Hi(e))return!1;qr(e)&&(Oi(e),t.dims=Ii(e));var r=i.first+i.size,o=Math.max(t.visible.from-e.options.viewportMargin,i.first),a=Math.min(r,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(i.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(r,n.viewTo)),Zt&&(o=tn(e.doc,o),a=nn(e.doc,a));var l=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;Wi(e,o,a),n.viewOffset=an(Je(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var s=Hi(e);if(!l&&0==s&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=Or(e);return s>4&&(n.lineDiv.style.display="none"),Gr(e,n.updateLineNumbers,t.dims),s>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Fr(c),N(n.cursorDiv),N(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,l&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,Mr(e,400)),n.updateLineNumbers=null,!0}function Hr(e,t){for(var n=t.viewport,i=!0;;i=!1){if(i&&e.options.lineWrapping&&t.oldDisplayWidth!=Yn(e))i&&(t.visible=tr(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Kn(e.display)-Xn(e),n.top)}),t.visible=tr(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!Wr(e,t))break;$i(e);var r=mr(e);zi(e),yr(e,r),Kr(e,r),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function zr(e,t){var n=new Br(e,t);if(Wr(e,n)){$i(e),Hr(e,n);var i=mr(e);zi(e),yr(e,i),Kr(e,i),n.finish()}}function Gr(e,t,n){var i=e.display,r=e.options.lineNumbers,o=i.lineDiv,a=o.firstChild;function l(t){var n=t.nextSibling;return s&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=i.view,u=i.viewFrom,d=0;d<c.length;d++){var h=c[d];if(h.hidden);else if(h.node&&h.node.parentNode==o){for(;a!=h.node;)a=l(a);var p=r&&null!=t&&t<=u&&h.lineNumber;h.changes&&(F(h.changes,"gutter")>-1&&(p=!1),In(e,h,u,n)),p&&(N(h.lineNumber),h.lineNumber.appendChild(document.createTextNode(rt(e.options,u)))),a=h.node.nextSibling}else{var f=On(e,h,u,n);o.insertBefore(f,a)}u+=h.size}for(;a;)a=l(a)}function Vr(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px"}function Kr(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+qn(e)+"px"}function Ur(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var i=Di(t)-t.scroller.scrollLeft+e.doc.scrollLeft,r=t.gutters.offsetWidth,o=i+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var l=n[a].alignable;if(l)for(var s=0;s<l.length;s++)l[s].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=i+r+"px")}}function qr(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=rt(e.options,t.first+t.size-1),i=e.display;if(n.length!=i.lineNumChars){var r=i.measure.appendChild(A("div",[A("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=r.firstChild.offsetWidth,a=r.offsetWidth-o;return i.lineGutter.style.width="",i.lineNumInnerWidth=Math.max(o,i.lineGutter.offsetWidth-a)+1,i.lineNumWidth=i.lineNumInnerWidth+a,i.lineNumChars=i.lineNumInnerWidth?n.length:-1,i.lineGutter.style.width=i.lineNumWidth+"px",Vr(e.display),!0}return!1}function Yr(e,t){for(var n=[],i=!1,r=0;r<e.length;r++){var o=e[r],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;i=!0}n.push({className:o,style:a})}return t&&!i&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function Xr(e){var t=e.gutters,n=e.gutterSpecs;N(t),e.lineGutter=null;for(var i=0;i<n.length;++i){var r=n[i],o=r.className,a=r.style,l=t.appendChild(A("div",null,"CodeMirror-gutter "+o));a&&(l.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=l,l.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",Vr(e)}function Jr(e){Xr(e.display),Bi(e),Ur(e)}function Qr(e,t,i,r){var o=this;this.input=i,o.scrollbarFiller=A("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=A("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=Z("div",null,"CodeMirror-code"),o.selectionDiv=A("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=A("div",null,"CodeMirror-cursors"),o.measure=A("div",null,"CodeMirror-measure"),o.lineMeasure=A("div",null,"CodeMirror-measure"),o.lineSpace=Z("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=Z("div",[o.lineSpace],"CodeMirror-lines");o.mover=A("div",[c],null,"position: relative"),o.sizer=A("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=A("div",null,null,"position: absolute; height: "+W+"px; width: 1px;"),o.gutters=A("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=A("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=A("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),a&&l<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),s||n&&g||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=Yr(r.gutters,r.lineNumbers),Xr(o),i.init(o)}Br.prototype.signal=function(e,t){be(e,t)&&this.events.push(arguments)},Br.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ge.apply(null,this.events[e])};var $r=0,eo=null;function to(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function no(e){var t=to(e);return t.x*=eo,t.y*=eo,t}function io(e,t){var i=to(t),r=i.x,o=i.y,a=e.display,l=a.scroller,c=l.scrollWidth>l.clientWidth,u=l.scrollHeight>l.clientHeight;if(r&&c||o&&u){if(o&&y&&s)e:for(var h=t.target,p=a.view;h!=l;h=h.parentNode)for(var f=0;f<p.length;f++)if(p[f].node==h){e.display.currentWheelTarget=h;break e}if(r&&!n&&!d&&null!=eo)return o&&u&&hr(e,Math.max(0,l.scrollTop+o*eo)),fr(e,Math.max(0,l.scrollLeft+r*eo)),(!o||o&&u)&&Ce(t),void(a.wheelStartX=null);if(o&&null!=eo){var m=o*eo,v=e.doc.scrollTop,g=v+a.wrapper.clientHeight;m<0?v=Math.max(0,v+m-50):g=Math.min(e.doc.height,g+m+50),zr(e,{top:v,bottom:g})}$r<20&&(null==a.wheelStartX?(a.wheelStartX=l.scrollLeft,a.wheelStartY=l.scrollTop,a.wheelDX=r,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var e=l.scrollLeft-a.wheelStartX,t=l.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(eo=(eo*$r+n)/($r+1),++$r)}}),200)):(a.wheelDX+=r,a.wheelDY+=o))}}a?eo=-.53:n?eo=15:u?eo=-.7:h&&(eo=-1/3);var ro=function(e,t){this.ranges=e,this.primIndex=t};ro.prototype.primary=function(){return this.ranges[this.primIndex]},ro.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],i=e.ranges[t];if(!lt(n.anchor,i.anchor)||!lt(n.head,i.head))return!1}return!0},ro.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new oo(st(this.ranges[t].anchor),st(this.ranges[t].head));return new ro(e,this.primIndex)},ro.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ro.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var i=this.ranges[n];if(at(t,i.from())>=0&&at(e,i.to())<=0)return n}return-1};var oo=function(e,t){this.anchor=e,this.head=t};function ao(e,t,n){var i=e&&e.options.selectionsMayTouch,r=t[n];t.sort((function(e,t){return at(e.from(),t.from())})),n=F(t,r);for(var o=1;o<t.length;o++){var a=t[o],l=t[o-1],s=at(l.to(),a.from());if(i&&!a.empty()?s>0:s>=0){var c=ut(l.from(),a.from()),u=ct(l.to(),a.to()),d=l.empty()?a.from()==a.head:l.from()==l.head;o<=n&&--n,t.splice(--o,2,new oo(d?u:c,d?c:u))}}return new ro(t,n)}function lo(e,t){return new ro([new oo(e,t||e)],0)}function so(e){return e.text?ot(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function co(e,t){if(at(e,t.from)<0)return e;if(at(e,t.to)<=0)return so(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,i=e.ch;return e.line==t.to.line&&(i+=so(t).ch-t.to.ch),ot(n,i)}function uo(e,t){for(var n=[],i=0;i<e.sel.ranges.length;i++){var r=e.sel.ranges[i];n.push(new oo(co(r.anchor,t),co(r.head,t)))}return ao(e.cm,n,e.sel.primIndex)}function ho(e,t,n){return e.line==t.line?ot(n.line,e.ch-t.ch+n.ch):ot(n.line+(e.line-t.line),e.ch)}function po(e,t,n){for(var i=[],r=ot(e.first,0),o=r,a=0;a<t.length;a++){var l=t[a],s=ho(l.from,r,o),c=ho(so(l),r,o);if(r=l.to,o=c,"around"==n){var u=e.sel.ranges[a],d=at(u.head,u.anchor)<0;i[a]=new oo(d?c:s,d?s:c)}else i[a]=new oo(s,s)}return new ro(i,e.sel.primIndex)}function fo(e){e.doc.mode=Ge(e.options,e.doc.modeOption),mo(e)}function mo(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,Mr(e,100),e.state.modeGen++,e.curOp&&Bi(e)}function vo(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function go(e,t,n,i){function r(e){return n?n[e]:null}function o(e,n,r){un(e,n,r,i),An(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new cn(c[o],r(o),i));return n}var l=t.from,s=t.to,c=t.text,u=Je(e,l.line),d=Je(e,s.line),h=Y(c),p=r(c.length-1),f=s.line-l.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(vo(e,t)){var m=a(0,c.length-1);o(d,d.text,p),f&&e.remove(l.line,f),m.length&&e.insert(l.line,m)}else if(u==d)if(1==c.length)o(u,u.text.slice(0,l.ch)+h+u.text.slice(s.ch),p);else{var v=a(1,c.length-1);v.push(new cn(h+u.text.slice(s.ch),p,i)),o(u,u.text.slice(0,l.ch)+c[0],r(0)),e.insert(l.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,l.ch)+c[0]+d.text.slice(s.ch),r(0)),e.remove(l.line+1,f);else{o(u,u.text.slice(0,l.ch)+c[0],r(0)),o(d,h+d.text.slice(s.ch),p);var g=a(1,c.length-1);f>1&&e.remove(l.line+1,f-1),e.insert(l.line+1,g)}An(e,"change",e,t)}function yo(e,t,n){function i(e,r,o){if(e.linked)for(var a=0;a<e.linked.length;++a){var l=e.linked[a];if(l.doc!=r){var s=o&&l.sharedHist;n&&!s||(t(l.doc,s),i(l.doc,e,s))}}}i(e,null,!0)}function xo(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,Pi(e),fo(e),bo(e),e.options.lineWrapping||sn(e),e.options.mode=t.modeOption,Bi(e)}function bo(e){("rtl"==e.doc.direction?T:j)(e.display.lineDiv,"CodeMirror-rtl")}function wo(e){Ir(e,(function(){bo(e),Bi(e)}))}function Co(e){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e||1}function ko(e,t){var n={from:st(t.from),to:so(t),text:Qe(e,t.from,t.to)};return Zo(e,n,t.from.line,t.to.line+1),yo(e,(function(e){return Zo(e,n,t.from.line,t.to.line+1)}),!0),n}function So(e){for(;e.length&&Y(e).ranges;)e.pop()}function _o(e,t){return t?(So(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}function jo(e,t,n,i){var r=e.history;r.undone.length=0;var o,a,l=+new Date;if((r.lastOp==i||r.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&r.lastModTime>l-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=_o(r,r.lastOp==i)))a=Y(o.changes),0==at(t.from,t.to)&&0==at(t.from,a.to)?a.to=so(t):o.changes.push(ko(e,t));else{var s=Y(r.done);for(s&&s.ranges||Ao(e.sel,r.done),o={changes:[ko(e,t)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=l,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=t.origin,a||ge(e,"historyAdded")}function No(e,t,n,i){var r=t.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}function Eo(e,t,n,i){var r=e.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||No(e,o,Y(r.done),t))?r.done[r.done.length-1]=t:Ao(t,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&So(r.undone)}function Ao(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Zo(e,t,n,i){var r=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,i),(function(n){n.markedSpans&&((r||(r=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function Io(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function Do(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var i=[],r=0;r<t.text.length;++r)i.push(Io(n[r]));return i}function To(e,t){var n=Do(e,t),i=Ot(e,t);if(!n)return i;if(!i)return n;for(var r=0;r<n.length;++r){var o=n[r],a=i[r];if(o&&a)e:for(var l=0;l<a.length;++l){for(var s=a[l],c=0;c<o.length;++c)if(o[c].marker==s.marker)continue e;o.push(s)}else a&&(n[r]=a)}return n}function Po(e,t,n){for(var i=[],r=0;r<e.length;++r){var o=e[r];if(o.ranges)i.push(n?ro.prototype.deepCopy.call(o):o);else{var a=o.changes,l=[];i.push({changes:l});for(var s=0;s<a.length;++s){var c=a[s],u=void 0;if(l.push({from:c.from,to:c.to,text:c.text}),t)for(var d in c)(u=d.match(/^spans_(\d+)$/))&&F(t,Number(u[1]))>-1&&(Y(l)[d]=c[d],delete c[d])}}}return i}function Mo(e,t,n,i){if(i){var r=e.anchor;if(n){var o=at(t,r)<0;o!=at(n,r)<0?(r=t,t=n):o!=at(t,n)<0&&(t=n)}return new oo(r,t)}return new oo(n||t,t)}function Lo(e,t,n,i,r){null==r&&(r=e.cm&&(e.cm.display.shift||e.extend)),Ho(e,new ro([Mo(e.sel.primary(),t,n,r)],0),i)}function Bo(e,t,n){for(var i=[],r=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)i[o]=Mo(e.sel.ranges[o],t[o],null,r);Ho(e,ao(e.cm,i,e.sel.primIndex),n)}function Ro(e,t,n,i){var r=e.sel.ranges.slice(0);r[t]=n,Ho(e,ao(e.cm,r,e.sel.primIndex),i)}function Oo(e,t,n,i){Ho(e,lo(t,n),i)}function Fo(e,t,n){var i={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new oo(ht(e,t[n].anchor),ht(e,t[n].head))},origin:n&&n.origin};return ge(e,"beforeSelectionChange",e,i),e.cm&&ge(e.cm,"beforeSelectionChange",e.cm,i),i.ranges!=t.ranges?ao(e.cm,i.ranges,i.ranges.length-1):t}function Wo(e,t,n){var i=e.history.done,r=Y(i);r&&r.ranges?(i[i.length-1]=t,zo(e,t,n)):Ho(e,t,n)}function Ho(e,t,n){zo(e,t,n),Eo(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function zo(e,t,n){(be(e,"beforeSelectionChange")||e.cm&&be(e.cm,"beforeSelectionChange"))&&(t=Fo(e,t,n));var i=n&&n.bias||(at(t.primary().head,e.sel.primary().head)<0?-1:1);Go(e,Ko(e,t,i,!0)),n&&!1===n.scroll||!e.cm||lr(e.cm)}function Go(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,xe(e.cm)),An(e,"cursorActivity",e))}function Vo(e){Go(e,Ko(e,e.sel,null,!1))}function Ko(e,t,n,i){for(var r,o=0;o<t.ranges.length;o++){var a=t.ranges[o],l=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],s=qo(e,a.anchor,l&&l.anchor,n,i),c=qo(e,a.head,l&&l.head,n,i);(r||s!=a.anchor||c!=a.head)&&(r||(r=t.ranges.slice(0,o)),r[o]=new oo(s,c))}return r?ao(e.cm,r,t.primIndex):t}function Uo(e,t,n,i,r){var o=Je(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var l=o.markedSpans[a],s=l.marker,c="selectLeft"in s?!s.selectLeft:s.inclusiveLeft,u="selectRight"in s?!s.selectRight:s.inclusiveRight;if((null==l.from||(c?l.from<=t.ch:l.from<t.ch))&&(null==l.to||(u?l.to>=t.ch:l.to>t.ch))){if(r&&(ge(s,"beforeCursorEnter"),s.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!s.atomic)continue;if(n){var d=s.find(i<0?1:-1),h=void 0;if((i<0?u:c)&&(d=Yo(e,d,-i,d&&d.line==t.line?o:null)),d&&d.line==t.line&&(h=at(d,n))&&(i<0?h<0:h>0))return Uo(e,d,t,i,r)}var p=s.find(i<0?-1:1);return(i<0?c:u)&&(p=Yo(e,p,i,p.line==t.line?o:null)),p?Uo(e,p,t,i,r):null}}return t}function qo(e,t,n,i,r){var o=i||1,a=Uo(e,t,n,o,r)||!r&&Uo(e,t,n,o,!0)||Uo(e,t,n,-o,r)||!r&&Uo(e,t,n,-o,!0);return a||(e.cantEdit=!0,ot(e.first,0))}function Yo(e,t,n,i){return n<0&&0==t.ch?t.line>e.first?ht(e,ot(t.line-1)):null:n>0&&t.ch==(i||Je(e,t.line)).text.length?t.line<e.first+e.size-1?ot(t.line+1,0):null:new ot(t.line,t.ch+n)}function Xo(e){e.setSelection(ot(e.firstLine(),0),ot(e.lastLine()),z)}function Jo(e,t,n){var i={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return i.canceled=!0}};return n&&(i.update=function(t,n,r,o){t&&(i.from=ht(e,t)),n&&(i.to=ht(e,n)),r&&(i.text=r),void 0!==o&&(i.origin=o)}),ge(e,"beforeChange",e,i),e.cm&&ge(e.cm,"beforeChange",e.cm,i),i.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:i.from,to:i.to,text:i.text,origin:i.origin}}function Qo(e,t,n){if(e.cm){if(!e.cm.curOp)return Dr(e.cm,Qo)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"))||(t=Jo(e,t,!0))){var i=At&&!n&&Wt(e,t.from,t.to);if(i)for(var r=i.length-1;r>=0;--r)$o(e,{from:i[r].from,to:i[r].to,text:r?[""]:t.text,origin:t.origin});else $o(e,t)}}function $o(e,t){if(1!=t.text.length||""!=t.text[0]||0!=at(t.from,t.to)){var n=uo(e,t);jo(e,t,n,e.cm?e.cm.curOp.id:NaN),na(e,t,n,Ot(e,t));var i=[];yo(e,(function(e,n){n||-1!=F(i,e.history)||(la(e.history,t),i.push(e.history)),na(e,t,null,Ot(e,t))}))}}function ea(e,t,n){var i=e.cm&&e.cm.state.suppressEdits;if(!i||n){for(var r,o=e.history,a=e.sel,l="undo"==t?o.done:o.undone,s="undo"==t?o.undone:o.done,c=0;c<l.length&&(r=l[c],n?!r.ranges||r.equals(e.sel):r.ranges);c++);if(c!=l.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(r=l.pop()).ranges){if(i)return void l.push(r);break}if(Ao(r,s),n&&!r.equals(e.sel))return void Ho(e,r,{clearRedo:!1});a=r}var u=[];Ao(a,s),s.push({changes:u,generation:o.generation}),o.generation=r.generation||++o.maxGeneration;for(var d=be(e,"beforeChange")||e.cm&&be(e.cm,"beforeChange"),h=function(n){var i=r.changes[n];if(i.origin=t,d&&!Jo(e,i,!1))return l.length=0,{};u.push(ko(e,i));var o=n?uo(e,i):Y(l);na(e,i,o,To(e,i)),!n&&e.cm&&e.cm.scrollIntoView({from:i.from,to:so(i)});var a=[];yo(e,(function(e,t){t||-1!=F(a,e.history)||(la(e.history,i),a.push(e.history)),na(e,i,null,To(e,i))}))},p=r.changes.length-1;p>=0;--p){var f=h(p);if(f)return f.v}}}}function ta(e,t){if(0!=t&&(e.first+=t,e.sel=new ro(X(e.sel.ranges,(function(e){return new oo(ot(e.anchor.line+t,e.anchor.ch),ot(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){Bi(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,i=n.viewFrom;i<n.viewTo;i++)Ri(e.cm,i,"gutter")}}function na(e,t,n,i){if(e.cm&&!e.cm.curOp)return Dr(e.cm,na)(e,t,n,i);if(t.to.line<e.first)ta(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var r=t.text.length-1-(e.first-t.from.line);ta(e,r),t={from:ot(e.first,0),to:ot(t.to.line+r,t.to.ch),text:[Y(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:ot(o,Je(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Qe(e,t.from,t.to),n||(n=uo(e,t)),e.cm?ia(e.cm,t,i):go(e,t,i),zo(e,n,z),e.cantEdit&&qo(e,ot(e.firstLine(),0))&&(e.cantEdit=!1)}}function ia(e,t,n){var i=e.doc,r=e.display,o=t.from,a=t.to,l=!1,s=o.line;e.options.lineWrapping||(s=tt(Qt(Je(i,o.line))),i.iter(s,a.line+1,(function(e){if(e==r.maxLine)return l=!0,!0}))),i.sel.contains(t.from,t.to)>-1&&xe(e),go(i,t,n,Ti(e)),e.options.lineWrapping||(i.iter(s,o.line+t.text.length,(function(e){var t=ln(e);t>r.maxLineLength&&(r.maxLine=e,r.maxLineLength=t,r.maxLineChanged=!0,l=!1)})),l&&(e.curOp.updateMaxLine=!0)),Et(i,o.line),Mr(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?Bi(e):o.line!=a.line||1!=t.text.length||vo(e.doc,t)?Bi(e,o.line,a.line+1,c):Ri(e,o.line,"text");var u=be(e,"changes"),d=be(e,"change");if(d||u){var h={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};d&&An(e,"change",e,h),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(h)}e.display.selForContextMenu=null}function ra(e,t,n,i,r){var o;i||(i=n),at(i,n)<0&&(n=(o=[i,n])[0],i=o[1]),"string"==typeof t&&(t=e.splitLines(t)),Qo(e,{from:n,to:i,text:t,origin:r})}function oa(e,t,n,i){n<e.line?e.line+=i:t<e.line&&(e.line=t,e.ch=0)}function aa(e,t,n,i){for(var r=0;r<e.length;++r){var o=e[r],a=!0;if(o.ranges){o.copied||((o=e[r]=o.deepCopy()).copied=!0);for(var l=0;l<o.ranges.length;l++)oa(o.ranges[l].anchor,t,n,i),oa(o.ranges[l].head,t,n,i)}else{for(var s=0;s<o.changes.length;++s){var c=o.changes[s];if(n<c.from.line)c.from=ot(c.from.line+i,c.from.ch),c.to=ot(c.to.line+i,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,r+1),r=0)}}}function la(e,t){var n=t.from.line,i=t.to.line,r=t.text.length-(i-n)-1;aa(e.done,n,i,r),aa(e.undone,n,i,r)}function sa(e,t,n,i){var r=t,o=t;return"number"==typeof t?o=Je(e,dt(e,t)):r=tt(t),null==r?null:(i(o,r)&&e.cm&&Ri(e.cm,r,n),o)}function ca(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function ua(e){this.children=e;for(var t=0,n=0,i=0;i<e.length;++i){var r=e[i];t+=r.chunkSize(),n+=r.height,r.parent=this}this.size=t,this.height=n,this.parent=null}oo.prototype.from=function(){return ut(this.anchor,this.head)},oo.prototype.to=function(){return ct(this.anchor,this.head)},oo.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},ca.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,i=e+t;n<i;++n){var r=this.lines[n];this.height-=r.height,dn(r),An(r,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var i=0;i<t.length;++i)t[i].parent=this},iterN:function(e,t,n){for(var i=e+t;e<i;++e)if(n(this.lines[e]))return!0}},ua.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var i=this.children[n],r=i.chunkSize();if(e<r){var o=Math.min(t,r-e),a=i.height;if(i.removeInner(e,o),this.height-=a-i.height,r==o&&(this.children.splice(n--,1),i.parent=null),0==(t-=o))break;e=0}else e-=r}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof ca))){var l=[];this.collapse(l),this.children=[new ca(l)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(e<=o){if(r.insertInner(e,t,n),r.lines&&r.lines.length>50){for(var a=r.lines.length%25+25,l=a;l<r.lines.length;){var s=new ca(r.lines.slice(l,l+=25));r.height-=s.height,this.children.splice(++i,0,s),s.parent=this}r.lines=r.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new ua(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=F(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var i=new ua(e.children);i.parent=e,e.children=[i,t],e=i}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var i=0;i<this.children.length;++i){var r=this.children[i],o=r.chunkSize();if(e<o){var a=Math.min(t,o-e);if(r.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var da=function(e,t,n){if(n)for(var i in n)n.hasOwnProperty(i)&&(this[i]=n[i]);this.doc=e,this.node=t};function ha(e,t,n){an(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&ar(e,n)}function pa(e,t,n,i){var r=new da(e,n,i),o=e.cm;return o&&r.noHScroll&&(o.display.alignWidgets=!0),sa(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==r.insertAt?n.push(r):n.splice(Math.min(n.length-1,Math.max(0,r.insertAt)),0,r),r.line=t,o&&!rn(e,t)){var i=an(t)<e.scrollTop;et(t,t.height+zn(r)),i&&ar(o,r.height),o.curOp.forceUpdate=!0}return!0})),o&&An(o,"lineWidgetAdded",o,r,"number"==typeof t?t:tt(t)),r}da.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,i=tt(n);if(null!=i&&t){for(var r=0;r<t.length;++r)t[r]==this&&t.splice(r--,1);t.length||(n.widgets=null);var o=zn(this);et(n,Math.max(0,n.height-o)),e&&(Ir(e,(function(){ha(e,n,-o),Ri(e,i,"widget")})),An(e,"lineWidgetCleared",e,this,i))}},da.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,i=this.line;this.height=null;var r=zn(this)-t;r&&(rn(this.doc,i)||et(i,i.height+r),n&&Ir(n,(function(){n.curOp.forceUpdate=!0,ha(n,i,r),An(n,"lineWidgetChanged",n,e,tt(i))})))},we(da);var fa=0,ma=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++fa};function va(e,t,n,i,r){if(i&&i.shared)return ya(e,t,n,i,r);if(e.cm&&!e.cm.curOp)return Dr(e.cm,va)(e,t,n,i,r);var o=new ma(e,r),a=at(t,n);if(i&&B(i,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=Z("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Jt(e,t.line,t,n,o)||t.line!=n.line&&Jt(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Dt()}o.addToHistory&&jo(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var l,s=t.line,c=e.cm;if(e.iter(s,n.line+1,(function(e){c&&o.collapsed&&!c.options.lineWrapping&&Qt(e)==c.display.maxLine&&(l=!0),o.collapsed&&s!=t.line&&et(e,0),Lt(e,new Tt(o,s==t.line?t.ch:null,s==n.line?n.ch:null)),++s})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){rn(e,t)&&et(t,0)})),o.clearOnEnter&&fe(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(It(),(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++fa,o.atomic=!0),c){if(l&&(c.curOp.updateMaxLine=!0),o.collapsed)Bi(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)Ri(c,u,"text");o.atomic&&Vo(c.doc),An(c,"markerAdded",c,o)}return o}ma.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&kr(e),be(this,"clear")){var n=this.find();n&&An(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;o<this.lines.length;++o){var a=this.lines[o],l=Pt(a.markedSpans,this);e&&!this.collapsed?Ri(e,tt(a),"text"):e&&(null!=l.to&&(r=tt(a)),null!=l.from&&(i=tt(a))),a.markedSpans=Mt(a.markedSpans,l),null==l.from&&this.collapsed&&!rn(this.doc,a)&&e&&et(a,Ai(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var s=0;s<this.lines.length;++s){var c=Qt(this.lines[s]),u=ln(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=i&&e&&this.collapsed&&Bi(e,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&Vo(e.doc)),e&&An(e,"markerCleared",e,this,i,r),t&&Sr(e),this.parent&&this.parent.clear()}},ma.prototype.find=function(e,t){var n,i;null==e&&"bookmark"==this.type&&(e=1);for(var r=0;r<this.lines.length;++r){var o=this.lines[r],a=Pt(o.markedSpans,this);if(null!=a.from&&(n=ot(t?o:tt(o),a.from),-1==e))return n;if(null!=a.to&&(i=ot(t?o:tt(o),a.to),1==e))return i}return n&&{from:n,to:i}},ma.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,i=this.doc.cm;t&&i&&Ir(i,(function(){var r=t.line,o=tt(t.line),a=ti(i,o);if(a&&(ui(a),i.curOp.selectionChanged=i.curOp.forceUpdate=!0),i.curOp.updateMaxLine=!0,!rn(n.doc,r)&&null!=n.height){var l=n.height;n.height=null;var s=zn(n)-l;s&&et(r,r.height+s)}An(i,"markerChanged",i,e)}))},ma.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=F(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},ma.prototype.detachLine=function(e){if(this.lines.splice(F(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},we(ma);var ga=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function ya(e,t,n,i,r){(i=B(i)).shared=!1;var o=[va(e,t,n,i,r)],a=o[0],l=i.widgetNode;return yo(e,(function(e){l&&(i.widgetNode=l.cloneNode(!0)),o.push(va(e,ht(e,t),ht(e,n),i,r));for(var s=0;s<e.linked.length;++s)if(e.linked[s].isParent)return;a=Y(o)})),new ga(o,a)}function xa(e){return e.findMarks(ot(e.first,0),e.clipPos(ot(e.lastLine())),(function(e){return e.parent}))}function ba(e,t){for(var n=0;n<t.length;n++){var i=t[n],r=i.find(),o=e.clipPos(r.from),a=e.clipPos(r.to);if(at(o,a)){var l=va(e,o,a,i.primary,i.primary.type);i.markers.push(l),l.parent=i}}}function wa(e){for(var t=function(t){var n=e[t],i=[n.primary.doc];yo(n.primary.doc,(function(e){return i.push(e)}));for(var r=0;r<n.markers.length;r++){var o=n.markers[r];-1==F(i,o.doc)&&(o.parent=null,n.markers.splice(r--,1))}},n=0;n<e.length;n++)t(n)}ga.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();An(this,"clear")}},ga.prototype.find=function(e,t){return this.primary.find(e,t)},we(ga);var Ca=0,ka=function(e,t,n,i,r){if(!(this instanceof ka))return new ka(e,t,n,i,r);null==n&&(n=0),ua.call(this,[new ca([new cn("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=ot(n,0);this.sel=lo(o),this.history=new Co(null),this.id=++Ca,this.modeOption=t,this.lineSep=i,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),go(this,{from:o,to:o,text:e}),Ho(this,lo(o),z)};ka.prototype=$(ua.prototype,{constructor:ka,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,i=0;i<t.length;++i)n+=t[i].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=$e(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:Pr((function(e){var t=ot(this.first,0),n=this.first+this.size-1;Qo(this,{from:t,to:ot(n,Je(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&sr(this.cm,0,0),Ho(this,lo(t),z)})),replaceRange:function(e,t,n,i){ra(this,e,t=ht(this,t),n=n?ht(this,n):t,i)},getRange:function(e,t,n){var i=Qe(this,ht(this,e),ht(this,t));return!1===n?i:i.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(it(this,e))return Je(this,e)},getLineNumber:function(e){return tt(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Je(this,e)),Qt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return ht(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:Pr((function(e,t,n){Oo(this,ht(this,"number"==typeof e?ot(e,t||0):e),null,n)})),setSelection:Pr((function(e,t,n){Oo(this,ht(this,e),ht(this,t||e),n)})),extendSelection:Pr((function(e,t,n){Lo(this,ht(this,e),t&&ht(this,t),n)})),extendSelections:Pr((function(e,t){Bo(this,ft(this,e),t)})),extendSelectionsBy:Pr((function(e,t){Bo(this,ft(this,X(this.sel.ranges,e)),t)})),setSelections:Pr((function(e,t,n){if(e.length){for(var i=[],r=0;r<e.length;r++)i[r]=new oo(ht(this,e[r].anchor),ht(this,e[r].head));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),Ho(this,ao(this.cm,i,t),n)}})),addSelection:Pr((function(e,t,n){var i=this.sel.ranges.slice(0);i.push(new oo(ht(this,e),ht(this,t||e))),Ho(this,ao(this.cm,i,i.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,i=0;i<n.length;i++){var r=Qe(this,n[i].from(),n[i].to());t=t?t.concat(r):r}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,i=0;i<n.length;i++){var r=Qe(this,n[i].from(),n[i].to());!1!==e&&(r=r.join(e||this.lineSeparator())),t[i]=r}return t},replaceSelection:function(e,t,n){for(var i=[],r=0;r<this.sel.ranges.length;r++)i[r]=e;this.replaceSelections(i,t,n||"+input")},replaceSelections:Pr((function(e,t,n){for(var i=[],r=this.sel,o=0;o<r.ranges.length;o++){var a=r.ranges[o];i[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var l=t&&"end"!=t&&po(this,i,t),s=i.length-1;s>=0;s--)Qo(this,i[s]);l?Wo(this,l):this.cm&&lr(this.cm)})),undo:Pr((function(){ea(this,"undo")})),redo:Pr((function(){ea(this,"redo")})),undoSelection:Pr((function(){ea(this,"undo",!0)})),redoSelection:Pr((function(){ea(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,i=0;i<e.done.length;i++)e.done[i].ranges||++t;for(var r=0;r<e.undone.length;r++)e.undone[r].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Co(this.history.maxGeneration),yo(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Po(this.history.done),undone:Po(this.history.undone)}},setHistory:function(e){var t=this.history=new Co(this.history.maxGeneration);t.done=Po(e.done.slice(0),null,!0),t.undone=Po(e.undone.slice(0),null,!0)},setGutterMarker:Pr((function(e,t,n){return sa(this,e,"gutter",(function(e){var i=e.gutterMarkers||(e.gutterMarkers={});return i[t]=n,!n&&ie(i)&&(e.gutterMarkers=null),!0}))})),clearGutter:Pr((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&sa(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,ie(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!it(this,e))return null;if(t=e,!(e=Je(this,e)))return null}else if(null==(t=tt(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:Pr((function(e,t,n){return sa(this,e,"gutter"==t?"gutter":"class",(function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[i]){if(S(n).test(e[i]))return!1;e[i]+=" "+n}else e[i]=n;return!0}))})),removeLineClass:Pr((function(e,t,n){return sa(this,e,"gutter"==t?"gutter":"class",(function(e){var i="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",r=e[i];if(!r)return!1;if(null==n)e[i]=null;else{var o=r.match(S(n));if(!o)return!1;var a=o.index+o[0].length;e[i]=r.slice(0,o.index)+(o.index&&a!=r.length?" ":"")+r.slice(a)||null}return!0}))})),addLineWidget:Pr((function(e,t,n){return pa(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return va(this,ht(this,e),ht(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return va(this,e=ht(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Je(this,(e=ht(this,e)).line).markedSpans;if(n)for(var i=0;i<n.length;++i){var r=n[i];(null==r.from||r.from<=e.ch)&&(null==r.to||r.to>=e.ch)&&t.push(r.marker.parent||r.marker)}return t},findMarks:function(e,t,n){e=ht(this,e),t=ht(this,t);var i=[],r=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var l=0;l<a.length;l++){var s=a[l];null!=s.to&&r==e.line&&e.ch>=s.to||null==s.from&&r!=e.line||null!=s.from&&r==t.line&&s.from>=t.ch||n&&!n(s.marker)||i.push(s.marker.parent||s.marker)}++r})),i},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var i=0;i<n.length;++i)null!=n[i].from&&e.push(n[i].marker)})),e},posFromIndex:function(e){var t,n=this.first,i=this.lineSeparator().length;return this.iter((function(r){var o=r.text.length+i;if(o>e)return t=e,!0;e-=o,++n})),ht(this,ot(n,t))},indexFromPos:function(e){var t=(e=ht(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new ka($e(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var i=new ka($e(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(i.history=this.history),(this.linked||(this.linked=[])).push({doc:i,sharedHist:e.sharedHist}),i.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],ba(i,xa(this)),i},unlinkDoc:function(e){if(e instanceof Bl&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),wa(xa(this));break}if(e.history==this.history){var n=[e.id];yo(e,(function(e){return n.push(e.id)}),!0),e.history=new Co(null),e.history.done=Po(this.history.done,n),e.history.undone=Po(this.history.undone,n)}},iterLinkedDocs:function(e){yo(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Pe(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:Pr((function(e){"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&wo(this.cm))}))}),ka.prototype.eachLine=ka.prototype.iter;var Sa=0;function _a(e){var t=this;if(Ea(t),!ye(t,e)&&!Gn(t.display,e)){Ce(e),a&&(Sa=+new Date);var n=Mi(t,e,!0),i=e.dataTransfer.files;if(n&&!t.isReadOnly())if(i&&i.length&&window.FileReader&&window.File)for(var r=i.length,o=Array(r),l=0,s=function(){++l==r&&Dr(t,(function(){var e={from:n=ht(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};Qo(t.doc,e),Wo(t.doc,lo(ht(t.doc,n),ht(t.doc,so(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==F(t.options.allowDropFileTypes,e.type))s();else{var i=new FileReader;i.onerror=function(){return s()},i.onload=function(){var e=i.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),s()},i.readAsText(e)}},u=0;u<i.length;u++)c(i[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var d=e.dataTransfer.getData("Text");if(d){var h;if(t.state.draggingText&&!t.state.draggingText.copy&&(h=t.listSelections()),zo(t.doc,lo(n,n)),h)for(var p=0;p<h.length;++p)ra(t.doc,"",h[p].anchor,h[p].head,"drag");t.replaceSelection(d,"around","paste"),t.display.input.focus()}}catch(e){}}}}function ja(e,t){if(a&&(!e.state.draggingText||+new Date-Sa<100))_e(t);else if(!ye(e,t)&&!Gn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!h)){var n=A("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",d&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),d&&n.parentNode.removeChild(n)}}function Na(e,t){var n=Mi(e,t);if(n){var i=document.createDocumentFragment();Vi(e,n,i),e.display.dragCursor||(e.display.dragCursor=A("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),E(e.display.dragCursor,i)}}function Ea(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Aa(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],i=0;i<t.length;i++){var r=t[i].CodeMirror;r&&n.push(r)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Za=!1;function Ia(){Za||(Da(),Za=!0)}function Da(){var e;fe(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Aa(Ta)}),100))})),fe(window,"blur",(function(){return Aa(Qi)}))}function Ta(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Pa={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Ma=0;Ma<10;Ma++)Pa[Ma+48]=Pa[Ma+96]=String(Ma);for(var La=65;La<=90;La++)Pa[La]=String.fromCharCode(La);for(var Ba=1;Ba<=12;Ba++)Pa[Ba+111]=Pa[Ba+63235]="F"+Ba;var Ra={};function Oa(e){var t,n,i,r,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var l=o[a];if(/^(cmd|meta|m)$/i.test(l))r=!0;else if(/^a(lt)?$/i.test(l))t=!0;else if(/^(c|ctrl|control)$/i.test(l))n=!0;else{if(!/^s(hift)?$/i.test(l))throw new Error("Unrecognized modifier name: "+l);i=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),r&&(e="Cmd-"+e),i&&(e="Shift-"+e),e}function Fa(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var i=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==i){delete e[n];continue}for(var r=X(n.split(" "),Oa),o=0;o<r.length;o++){var a=void 0,l=void 0;o==r.length-1?(l=r.join(" "),a=i):(l=r.slice(0,o+1).join(" "),a="...");var s=t[l];if(s){if(s!=a)throw new Error("Inconsistent bindings for "+l)}else t[l]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Wa(e,t,n,i){var r=(t=Va(t)).call?t.call(e,i):t[e];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&n(r))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Wa(e,t.fallthrough,n,i);for(var o=0;o<t.fallthrough.length;o++){var a=Wa(e,t.fallthrough[o],n,i);if(a)return a}}}function Ha(e){var t="string"==typeof e?e:Pa[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function za(e,t,n){var i=e;return t.altKey&&"Alt"!=i&&(e="Alt-"+e),(C?t.metaKey:t.ctrlKey)&&"Ctrl"!=i&&(e="Ctrl-"+e),(C?t.ctrlKey:t.metaKey)&&"Mod"!=i&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=i&&(e="Shift-"+e),e}function Ga(e,t){if(d&&34==e.keyCode&&e.char)return!1;var n=Pa[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),za(n,e,t))}function Va(e){return"string"==typeof e?Ra[e]:e}function Ka(e,t){for(var n=e.doc.sel.ranges,i=[],r=0;r<n.length;r++){for(var o=t(n[r]);i.length&&at(o.from,Y(i).to)<=0;){var a=i.pop();if(at(a.from,o.from)<0){o.from=a.from;break}}i.push(o)}Ir(e,(function(){for(var t=i.length-1;t>=0;t--)ra(e.doc,"",i[t].from,i[t].to,"+delete");lr(e)}))}function Ua(e,t,n){var i=ae(e.text,t+n,n);return i<0||i>e.text.length?null:i}function qa(e,t,n){var i=Ua(e,t.ch,n);return null==i?null:new ot(t.line,i,n<0?"after":"before")}function Ya(e,t,n,i,r){if(e){"rtl"==t.doc.direction&&(r=-r);var o=he(n,t.doc.direction);if(o){var a,l=r<0?Y(o):o[0],s=r<0==(1==l.level)?"after":"before";if(l.level>0||"rtl"==t.doc.direction){var c=ni(t,n);a=r<0?n.text.length-1:0;var u=ii(t,c,a).top;a=le((function(e){return ii(t,c,e).top==u}),r<0==(1==l.level)?l.from:l.to-1,a),"before"==s&&(a=Ua(n,a,1))}else a=r<0?l.to:l.from;return new ot(i,a,s)}}return new ot(i,r<0?n.text.length:0,r<0?"before":"after")}function Xa(e,t,n,i){var r=he(t,e.doc.direction);if(!r)return qa(t,n,i);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ue(r,n.ch,n.sticky),a=r[o];if("ltr"==e.doc.direction&&a.level%2==0&&(i>0?a.to>n.ch:a.from<n.ch))return qa(t,n,i);var l,s=function(e,n){return Ua(t,e instanceof ot?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(l=l||ni(e,t),Si(e,t,l,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?s(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var d=1==a.level==i<0,h=s(n,d?1:-1);if(null!=h&&(d?h<=a.to&&h<=u.end:h>=a.from&&h>=u.begin)){var p=d?"before":"after";return new ot(n.line,h,p)}}var f=function(e,t,i){for(var o=function(e,t){return t?new ot(n.line,s(e,1),"before"):new ot(n.line,e,"after")};e>=0&&e<r.length;e+=t){var a=r[e],l=t>0==(1!=a.level),c=l?i.begin:s(i.end,-1);if(a.from<=c&&c<a.to)return o(c,l);if(c=l?a.from:s(a.to,-1),i.begin<=c&&c<i.end)return o(c,l)}},m=f(o+i,i,u);if(m)return m;var v=i>0?u.end:s(u.begin,-1);return null==v||i>0&&v==t.text.length||!(m=f(i>0?0:r.length-1,i,c(v)))?null:m}Ra.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Ra.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Ra.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Ra.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Ra.default=y?Ra.macDefault:Ra.pcDefault;var Ja={selectAll:Xo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),z)},killLine:function(e){return Ka(e,(function(t){if(t.empty()){var n=Je(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:ot(t.head.line+1,0)}:{from:t.head,to:ot(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Ka(e,(function(t){return{from:ot(t.from().line,0),to:ht(e.doc,ot(t.to().line+1,0))}}))},delLineLeft:function(e){return Ka(e,(function(e){return{from:ot(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Ka(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Ka(e,(function(t){var n=e.charCoords(t.head,"div").top+5,i=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:i}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(ot(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(ot(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return Qa(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return el(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return $a(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),V)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),V)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,i=e.coordsChar({left:0,top:n},"div");return i.ch<e.getLine(i.line).search(/\S/)?el(e,t.head):i}),V)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),i=e.options.tabSize,r=0;r<n.length;r++){var o=n[r].from(),a=R(e.getLine(o.line),o.ch,i);t.push(q(i-a%i))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return Ir(e,(function(){for(var t=e.listSelections(),n=[],i=0;i<t.length;i++)if(t[i].empty()){var r=t[i].head,o=Je(e.doc,r.line).text;if(o)if(r.ch==o.length&&(r=new ot(r.line,r.ch-1)),r.ch>0)r=new ot(r.line,r.ch+1),e.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),ot(r.line,r.ch-2),r,"+transpose");else if(r.line>e.doc.first){var a=Je(e.doc,r.line-1).text;a&&(r=new ot(r.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),ot(r.line-1,a.length-1),r,"+transpose"))}n.push(new oo(r,r))}e.setSelections(n)}))},newlineAndIndent:function(e){return Ir(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var i=0;i<t.length;i++)e.indentLine(t[i].from().line,null,!0);lr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function Qa(e,t){var n=Je(e.doc,t),i=Qt(n);return i!=n&&(t=tt(i)),Ya(!0,e,i,t,1)}function $a(e,t){var n=Je(e.doc,t),i=$t(n);return i!=n&&(t=tt(i)),Ya(!0,e,n,t,-1)}function el(e,t){var n=Qa(e,t.line),i=Je(e.doc,n.line),r=he(i,e.doc.direction);if(!r||0==r[0].level){var o=Math.max(n.ch,i.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return ot(n.line,a?0:o,n.sticky)}return n}function tl(e,t,n){if("string"==typeof t&&!(t=Ja[t]))return!1;e.display.input.ensurePolled();var i=e.display.shift,r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),r=t(e)!=H}finally{e.display.shift=i,e.state.suppressEdits=!1}return r}function nl(e,t,n){for(var i=0;i<e.state.keyMaps.length;i++){var r=Wa(t,e.state.keyMaps[i],n,e);if(r)return r}return e.options.extraKeys&&Wa(t,e.options.extraKeys,n,e)||Wa(t,e.options.keyMap,n,e)}var il=new O;function rl(e,t,n,i){var r=e.state.keySeq;if(r){if(Ha(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:il.set(50,(function(){e.state.keySeq==r&&(e.state.keySeq=null,e.display.input.reset())})),ol(e,r+" "+t,n,i))return!0}return ol(e,t,n,i)}function ol(e,t,n,i){var r=nl(e,t,i);return"multi"==r&&(e.state.keySeq=t),"handled"==r&&An(e,"keyHandled",e,t,n),"handled"!=r&&"multi"!=r||(Ce(n),qi(e)),!!r}function al(e,t){var n=Ga(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?rl(e,"Shift-"+n,t,(function(t){return tl(e,t,!0)}))||rl(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return tl(e,t)})):rl(e,n,t,(function(t){return tl(e,t)})))}function ll(e,t,n){return rl(e,"'"+n+"'",t,(function(t){return tl(e,t,!0)}))}var sl=null;function cl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=D(),ye(t,e)))){a&&l<11&&27==e.keyCode&&(e.returnValue=!1);var i=e.keyCode;t.display.shift=16==i||e.shiftKey;var r=al(t,e);d&&(sl=r?i:null,r||88!=i||Le||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!r&&46==i&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=i||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||ul(t)}}function ul(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(j(t,"CodeMirror-crosshair"),ve(document,"keyup",n),ve(document,"mouseover",n))}T(t,"CodeMirror-crosshair"),fe(document,"keyup",n),fe(document,"mouseover",n)}function dl(e){16==e.keyCode&&(this.doc.sel.shift=!1),ye(this,e)}function hl(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||Gn(t.display,e)||ye(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,i=e.charCode;if(d&&n==sl)return sl=null,void Ce(e);if(!d||e.which&&!(e.which<10)||!al(t,e)){var r=String.fromCharCode(null==i?n:i);"\b"!=r&&(ll(t,e,r)||t.display.input.onKeyPress(e))}}}var pl,fl,ml=400,vl=function(e,t,n){this.time=e,this.pos=t,this.button=n};function gl(e,t){var n=+new Date;return fl&&fl.compare(n,e,t)?(pl=fl=null,"triple"):pl&&pl.compare(n,e,t)?(fl=new vl(n,e,t),pl=null,"double"):(pl=new vl(n,e,t),fl=null,"single")}function yl(e){var t=this,n=t.display;if(!(ye(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,Gn(n,e))s||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Nl(t,e)){var i=Mi(t,e),r=Ne(e),o=i?gl(i,r):"single";window.focus(),1==r&&t.state.selectingText&&t.state.selectingText(e),i&&xl(t,r,i,o,e)||(1==r?i?wl(t,i,o,e):je(e)==n.scroller&&Ce(e):2==r?(i&&Lo(t.doc,i),setTimeout((function(){return n.input.focus()}),20)):3==r&&(k?t.display.input.onContextMenu(e):Xi(t)))}}function xl(e,t,n,i,r){var o="Click";return"double"==i?o="Double"+o:"triple"==i&&(o="Triple"+o),rl(e,za(o=(1==t?"Left":2==t?"Middle":"Right")+o,r),r,(function(t){if("string"==typeof t&&(t=Ja[t]),!t)return!1;var i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),i=t(e,n)!=H}finally{e.state.suppressEdits=!1}return i}))}function bl(e,t,n){var i=e.getOption("configureMouse"),r=i?i(e,t,n):{};if(null==r.unit){var o=x?n.shiftKey&&n.metaKey:n.altKey;r.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==r.extend||e.doc.extend)&&(r.extend=e.doc.extend||n.shiftKey),null==r.addNew&&(r.addNew=y?n.metaKey:n.ctrlKey),null==r.moveOnDrag&&(r.moveOnDrag=!(y?n.altKey:n.ctrlKey)),r}function wl(e,t,n,i){a?setTimeout(L(Yi,e),0):e.curOp.focus=D();var r,o=bl(e,n,i),l=e.doc.sel;e.options.dragDrop&&Ze&&!e.isReadOnly()&&"single"==n&&(r=l.contains(t))>-1&&(at((r=l.ranges[r]).from(),t)<0||t.xRel>0)&&(at(r.to(),t)>0||t.xRel<0)?Cl(e,i,t,o):Sl(e,i,t,o)}function Cl(e,t,n,i){var r=e.display,o=!1,c=Dr(e,(function(t){s&&(r.scroller.draggable=!1),e.state.draggingText=!1,ve(r.wrapper.ownerDocument,"mouseup",c),ve(r.wrapper.ownerDocument,"mousemove",u),ve(r.scroller,"dragstart",d),ve(r.scroller,"drop",c),o||(Ce(t),i.addNew||Lo(e.doc,n,null,null,i.extend),s&&!h||a&&9==l?setTimeout((function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()}),20):r.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},d=function(){return o=!0};s&&(r.scroller.draggable=!0),e.state.draggingText=c,c.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),fe(r.wrapper.ownerDocument,"mouseup",c),fe(r.wrapper.ownerDocument,"mousemove",u),fe(r.scroller,"dragstart",d),fe(r.scroller,"drop",c),Xi(e),setTimeout((function(){return r.input.focus()}),20)}function kl(e,t,n){if("char"==n)return new oo(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new oo(ot(t.line,0),ht(e.doc,ot(t.line+1,0)));var i=n(e,t);return new oo(i.from,i.to)}function Sl(e,t,n,i){var r=e.display,o=e.doc;Ce(t);var a,l,s=o.sel,c=s.ranges;if(i.addNew&&!i.extend?(l=o.sel.contains(n),a=l>-1?c[l]:new oo(n,n)):(a=o.sel.primary(),l=o.sel.primIndex),"rectangle"==i.unit)i.addNew||(a=new oo(n,n)),n=Mi(e,t,!0,!0),l=-1;else{var u=kl(e,n,i.unit);a=i.extend?Mo(a,u.anchor,u.head,i.extend):u}i.addNew?-1==l?(l=c.length,Ho(o,ao(e,c.concat([a]),l),{scroll:!1,origin:"*mouse"})):c.length>1&&c[l].empty()&&"char"==i.unit&&!i.extend?(Ho(o,ao(e,c.slice(0,l).concat(c.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),s=o.sel):Ro(o,l,a,G):(l=0,Ho(o,new ro([a],0),G),s=o.sel);var d=n;function h(t){if(0!=at(d,t))if(d=t,"rectangle"==i.unit){for(var r=[],c=e.options.tabSize,u=R(Je(o,n.line).text,n.ch,c),h=R(Je(o,t.line).text,t.ch,c),p=Math.min(u,h),f=Math.max(u,h),m=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));m<=v;m++){var g=Je(o,m).text,y=K(g,p,c);p==f?r.push(new oo(ot(m,y),ot(m,y))):g.length>y&&r.push(new oo(ot(m,y),ot(m,K(g,f,c))))}r.length||r.push(new oo(n,n)),Ho(o,ao(e,s.ranges.slice(0,l).concat(r),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var x,b=a,w=kl(e,t,i.unit),C=b.anchor;at(w.anchor,C)>0?(x=w.head,C=ut(b.from(),w.anchor)):(x=w.anchor,C=ct(b.to(),w.head));var k=s.ranges.slice(0);k[l]=_l(e,new oo(ht(o,C),x)),Ho(o,ao(e,k,l),G)}}var p=r.wrapper.getBoundingClientRect(),f=0;function m(t){var n=++f,a=Mi(e,t,!0,"rectangle"==i.unit);if(a)if(0!=at(a,d)){e.curOp.focus=D(),h(a);var l=tr(r,o);(a.line>=l.to||a.line<l.from)&&setTimeout(Dr(e,(function(){f==n&&m(t)})),150)}else{var s=t.clientY<p.top?-20:t.clientY>p.bottom?20:0;s&&setTimeout(Dr(e,(function(){f==n&&(r.scroller.scrollTop+=s,m(t))})),50)}}function v(t){e.state.selectingText=!1,f=1/0,t&&(Ce(t),r.input.focus()),ve(r.wrapper.ownerDocument,"mousemove",g),ve(r.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var g=Dr(e,(function(e){0!==e.buttons&&Ne(e)?m(e):v(e)})),y=Dr(e,v);e.state.selectingText=y,fe(r.wrapper.ownerDocument,"mousemove",g),fe(r.wrapper.ownerDocument,"mouseup",y)}function _l(e,t){var n=t.anchor,i=t.head,r=Je(e.doc,n.line);if(0==at(n,i)&&n.sticky==i.sticky)return t;var o=he(r);if(!o)return t;var a=ue(o,n.ch,n.sticky),l=o[a];if(l.from!=n.ch&&l.to!=n.ch)return t;var s,c=a+(l.from==n.ch==(1!=l.level)?0:1);if(0==c||c==o.length)return t;if(i.line!=n.line)s=(i.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=ue(o,i.ch,i.sticky),d=u-a||(i.ch-n.ch)*(1==l.level?-1:1);s=u==c-1||u==c?d<0:d>0}var h=o[c+(s?-1:0)],p=s==(1==h.level),f=p?h.from:h.to,m=p?"after":"before";return n.ch==f&&n.sticky==m?t:new oo(new ot(n.line,f,m),i)}function jl(e,t,n,i){var r,o;if(t.touches)r=t.touches[0].clientX,o=t.touches[0].clientY;else try{r=t.clientX,o=t.clientY}catch(e){return!1}if(r>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;i&&Ce(t);var a=e.display,l=a.lineDiv.getBoundingClientRect();if(o>l.bottom||!be(e,n))return Se(t);o-=l.top-a.viewOffset;for(var s=0;s<e.display.gutterSpecs.length;++s){var c=a.gutters.childNodes[s];if(c&&c.getBoundingClientRect().right>=r)return ge(e,n,e,nt(e.doc,o),e.display.gutterSpecs[s].className,t),Se(t)}}function Nl(e,t){return jl(e,t,"gutterClick",!0)}function El(e,t){Gn(e.display,t)||Al(e,t)||ye(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function Al(e,t){return!!be(e,"gutterContextMenu")&&jl(e,t,"gutterContextMenu",!1)}function Zl(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),hi(e)}vl.prototype.compare=function(e,t,n){return this.time+ml>e&&0==at(t,this.pos)&&n==this.button};var Il={toString:function(){return"CodeMirror.Init"}},Dl={},Tl={};function Pl(e){var t=e.optionHandlers;function n(n,i,r,o){e.defaults[n]=i,r&&(t[n]=o?function(e,t,n){n!=Il&&r(e,t,n)}:r)}e.defineOption=n,e.Init=Il,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,fo(e)}),!0),n("indentUnit",2,fo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){mo(e),hi(e),Bi(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],i=e.doc.first;e.doc.iter((function(e){for(var r=0;;){var o=e.text.indexOf(t,r);if(-1==o)break;r=o+t.length,n.push(ot(i,o))}i++}));for(var r=n.length-1;r>=0;r--)ra(e.doc,t,n[r],ot(n[r].line,n[r].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Il&&e.refresh()})),n("specialCharPlaceholder",vn,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",g?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!b),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){Zl(e),Jr(e)}),!0),n("keyMap","default",(function(e,t,n){var i=Va(t),r=n!=Il&&Va(n);r&&r.detach&&r.detach(e,i),i.attach&&i.attach(e,r||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Ll,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=Yr(t,e.options.lineNumbers),Jr(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?Di(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return yr(e)}),!0),n("scrollbarStyle","native",(function(e){wr(e),yr(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=Yr(e.options.gutters,t),Jr(e)}),!0),n("firstLineNumber",1,Jr,!0),n("lineNumberFormatter",(function(e){return e}),Jr,!0),n("showCursorWhenSelecting",!1,zi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(Qi(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=""===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Ml),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,zi,!0),n("singleCursorHeightPerLine",!0,zi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,mo,!0),n("addModeClass",!1,mo,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,mo,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}function Ml(e,t,n){if(!t!=!(n&&n!=Il)){var i=e.display.dragFunctions,r=t?fe:ve;r(e.display.scroller,"dragstart",i.start),r(e.display.scroller,"dragenter",i.enter),r(e.display.scroller,"dragover",i.over),r(e.display.scroller,"dragleave",i.leave),r(e.display.scroller,"drop",i.drop)}}function Ll(e){e.options.lineWrapping?(T(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(j(e.display.wrapper,"CodeMirror-wrap"),sn(e)),Pi(e),Bi(e),hi(e),setTimeout((function(){return yr(e)}),100)}function Bl(e,t){var n=this;if(!(this instanceof Bl))return new Bl(e,t);this.options=t=t?B(t):{},B(Dl,t,!1);var i=t.value;"string"==typeof i?i=new ka(i,t.mode,null,t.lineSeparator,t.direction):t.mode&&(i.modeOption=t.mode),this.doc=i;var r=new Bl.inputStyles[t.inputStyle](this),o=this.display=new Qr(e,i,r,t);for(var c in o.wrapper.CodeMirror=this,Zl(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),wr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new O,keySeq:null,specialChars:null},t.autofocus&&!g&&o.input.focus(),a&&l<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Rl(this),Ia(),kr(this),this.curOp.forceUpdate=!0,xo(this,i),t.autofocus&&!g||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Ji(n)}),20):Qi(this),Tl)Tl.hasOwnProperty(c)&&Tl[c](this,t[c],Il);qr(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ol.length;++u)Ol[u](this);Sr(this),s&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}function Rl(e){var t=e.display;fe(t.scroller,"mousedown",Dr(e,yl)),fe(t.scroller,"dblclick",a&&l<11?Dr(e,(function(t){if(!ye(e,t)){var n=Mi(e,t);if(n&&!Nl(e,t)&&!Gn(e.display,t)){Ce(t);var i=e.findWordAt(n);Lo(e.doc,i.anchor,i.head)}}})):function(t){return ye(e,t)||Ce(t)}),fe(t.scroller,"contextmenu",(function(t){return El(e,t)})),fe(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||El(e,n)}));var n,i={end:0};function r(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(i=t.activeTouch).end=+new Date)}function o(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}function s(e,t){if(null==t.left)return!0;var n=t.left-e.left,i=t.top-e.top;return n*n+i*i>400}fe(t.scroller,"touchstart",(function(r){if(!ye(e,r)&&!o(r)&&!Nl(e,r)){t.input.ensurePolled(),clearTimeout(n);var a=+new Date;t.activeTouch={start:a,moved:!1,prev:a-i.end<=300?i:null},1==r.touches.length&&(t.activeTouch.left=r.touches[0].pageX,t.activeTouch.top=r.touches[0].pageY)}})),fe(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),fe(t.scroller,"touchend",(function(n){var i=t.activeTouch;if(i&&!Gn(t,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var o,a=e.coordsChar(t.activeTouch,"page");o=!i.prev||s(i,i.prev)?new oo(a,a):!i.prev.prev||s(i,i.prev.prev)?e.findWordAt(a):new oo(ot(a.line,0),ht(e.doc,ot(a.line+1,0))),e.setSelection(o.anchor,o.head),e.focus(),Ce(n)}r()})),fe(t.scroller,"touchcancel",r),fe(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(hr(e,t.scroller.scrollTop),fr(e,t.scroller.scrollLeft,!0),ge(e,"scroll",e))})),fe(t.scroller,"mousewheel",(function(t){return io(e,t)})),fe(t.scroller,"DOMMouseScroll",(function(t){return io(e,t)})),fe(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ye(e,t)||_e(t)},over:function(t){ye(e,t)||(Na(e,t),_e(t))},start:function(t){return ja(e,t)},drop:Dr(e,_a),leave:function(t){ye(e,t)||Ea(e)}};var c=t.input.getField();fe(c,"keyup",(function(t){return dl.call(e,t)})),fe(c,"keydown",Dr(e,cl)),fe(c,"keypress",Dr(e,hl)),fe(c,"focus",(function(t){return Ji(e,t)})),fe(c,"blur",(function(t){return Qi(e,t)}))}Bl.defaults=Dl,Bl.optionHandlers=Tl;var Ol=[];function Fl(e,t,n,i){var r,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=xt(e,t).state:n="prev");var a=e.options.tabSize,l=Je(o,t),s=R(l.text,null,a);l.stateAfter&&(l.stateAfter=null);var c,u=l.text.match(/^\s*/)[0];if(i||/\S/.test(l.text)){if("smart"==n&&((c=o.mode.indent(r,l.text.slice(u.length),l.text))==H||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?R(Je(o,t-1).text,null,a):0:"add"==n?c=s+e.options.indentUnit:"subtract"==n?c=s-e.options.indentUnit:"number"==typeof n&&(c=s+n),c=Math.max(0,c);var d="",h=0;if(e.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)h+=a,d+="\t";if(h<c&&(d+=q(c-h)),d!=u)return ra(o,d,ot(t,0),ot(t,u.length),"+input"),l.stateAfter=null,!0;for(var f=0;f<o.sel.ranges.length;f++){var m=o.sel.ranges[f];if(m.head.line==t&&m.head.ch<u.length){var v=ot(t,u.length);Ro(o,f,new oo(v,v));break}}}Bl.defineInitHook=function(e){return Ol.push(e)};var Wl=null;function Hl(e){Wl=e}function zl(e,t,n,i,r){var o=e.doc;e.display.shift=!1,i||(i=o.sel);var a=+new Date-200,l="paste"==r||e.state.pasteIncoming>a,s=Pe(t),c=null;if(l&&i.ranges.length>1)if(Wl&&Wl.text.join("\n")==t){if(i.ranges.length%Wl.text.length==0){c=[];for(var u=0;u<Wl.text.length;u++)c.push(o.splitLines(Wl.text[u]))}}else s.length==i.ranges.length&&e.options.pasteLinesPerSelection&&(c=X(s,(function(e){return[e]})));for(var d=e.curOp.updateInput,h=i.ranges.length-1;h>=0;h--){var p=i.ranges[h],f=p.from(),m=p.to();p.empty()&&(n&&n>0?f=ot(f.line,f.ch-n):e.state.overwrite&&!l?m=ot(m.line,Math.min(Je(o,m.line).text.length,m.ch+Y(s).length)):l&&Wl&&Wl.lineWise&&Wl.text.join("\n")==s.join("\n")&&(f=m=ot(f.line,0)));var v={from:f,to:m,text:c?c[h%c.length]:s,origin:r||(l?"paste":e.state.cutIncoming>a?"cut":"+input")};Qo(e.doc,v),An(e,"inputRead",e,v)}t&&!l&&Vl(e,t),lr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=d),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Gl(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||Ir(t,(function(){return zl(t,n,0,null,"paste")})),!0}function Vl(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=e.getModeAt(r.head),a=!1;if(o.electricChars){for(var l=0;l<o.electricChars.length;l++)if(t.indexOf(o.electricChars.charAt(l))>-1){a=Fl(e,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Je(e.doc,r.head.line).text.slice(0,r.head.ch))&&(a=Fl(e,r.head.line,"smart"));a&&An(e,"electricInput",e,r.head.line)}}}function Kl(e){for(var t=[],n=[],i=0;i<e.doc.sel.ranges.length;i++){var r=e.doc.sel.ranges[i].head.line,o={anchor:ot(r,0),head:ot(r+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Ul(e,t,n,i){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",i?"":"off"),e.setAttribute("spellcheck",!!t)}function ql(){var e=A("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=A("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return s?e.style.width="1000px":e.setAttribute("wrap","off"),m&&(e.style.border="1px solid black"),Ul(e),t}function Yl(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var i=this.options,r=i[e];i[e]==n&&"mode"!=e||(i[e]=n,t.hasOwnProperty(e)&&Dr(this,t[e])(this,n,r),ge(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Va(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:Tr((function(t,n){var i=t.token?t:e.getMode(this.options,t);if(i.startState)throw new Error("Overlays may not be stateful.");J(this.state.overlays,{mode:i,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,Bi(this)})),removeOverlay:Tr((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var i=t[n].modeSpec;if(i==e||"string"==typeof e&&i.name==e)return t.splice(n,1),this.state.modeGen++,void Bi(this)}})),indentLine:Tr((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),it(this.doc,e)&&Fl(this,e,t,n)})),indentSelection:Tr((function(e){for(var t=this.doc.sel.ranges,n=-1,i=0;i<t.length;i++){var r=t[i];if(r.empty())r.head.line>n&&(Fl(this,r.head.line,e,!0),n=r.head.line,i==this.doc.sel.primIndex&&lr(this));else{var o=r.from(),a=r.to(),l=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var s=l;s<n;++s)Fl(this,s,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[i].from().ch>0&&Ro(this.doc,i,new oo(o,c[i].to()),z)}}})),getTokenAt:function(e,t){return St(this,e,t)},getLineTokens:function(e,t){return St(this,ot(e),t,!0)},getTokenTypeAt:function(e){e=ht(this.doc,e);var t,n=yt(this,Je(this.doc,e.line)),i=0,r=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=i+r>>1;if((a?n[2*a-1]:0)>=o)r=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}i=a+1}}var l=t?t.indexOf("overlay "):-1;return l<0?t:0==l?null:t.slice(0,l-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var i=[];if(!n.hasOwnProperty(t))return i;var r=n[t],o=this.getModeAt(e);if("string"==typeof o[t])r[o[t]]&&i.push(r[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var l=r[o[t][a]];l&&i.push(l)}else o.helperType&&r[o.helperType]?i.push(r[o.helperType]):r[o.name]&&i.push(r[o.name]);for(var s=0;s<r._global.length;s++){var c=r._global[s];c.pred(o,this)&&-1==F(i,c.val)&&i.push(c.val)}return i},getStateAfter:function(e,t){var n=this.doc;return xt(this,(e=dt(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return xi(this,null==e?n.head:"object"==typeof e?ht(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return yi(this,ht(this.doc,e),t||"page")},coordsChar:function(e,t){return Ci(this,(e=gi(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=gi(this,{top:e,left:0},t||"page").top,nt(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var i,r=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,r=!0),i=Je(this.doc,e)}else i=e;return vi(this,i,{top:0,left:0},t||"page",n||r).top+(r?this.doc.height-an(i):0)},defaultTextHeight:function(){return Ai(this.display)},defaultCharWidth:function(){return Zi(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,i,r){var o=this.display,a=(e=xi(this,ht(this.doc,e))).bottom,l=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),o.sizer.appendChild(t),"over"==i)a=e.top;else if("above"==i||"near"==i){var s=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||e.bottom+t.offsetHeight>s)&&e.top>t.offsetHeight?a=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=s&&(a=e.bottom),l+t.offsetWidth>c&&(l=c-t.offsetWidth)}t.style.top=a+"px",t.style.left=t.style.right="","right"==r?(l=o.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==r?l=0:"middle"==r&&(l=(o.sizer.clientWidth-t.offsetWidth)/2),t.style.left=l+"px"),n&&rr(this,{left:l,top:a,right:l+t.offsetWidth,bottom:a+t.offsetHeight})},triggerOnKeyDown:Tr(cl),triggerOnKeyPress:Tr(hl),triggerOnKeyUp:dl,triggerOnMouseDown:Tr(yl),execCommand:function(e){if(Ja.hasOwnProperty(e))return Ja[e].call(null,this)},triggerElectric:Tr((function(e){Vl(this,e)})),findPosH:function(e,t,n,i){var r=1;t<0&&(r=-1,t=-t);for(var o=ht(this.doc,e),a=0;a<t&&!(o=Xl(this.doc,o,r,n,i)).hitSide;++a);return o},moveH:Tr((function(e,t){var n=this;this.extendSelectionsBy((function(i){return n.display.shift||n.doc.extend||i.empty()?Xl(n.doc,i.head,e,t,n.options.rtlMoveVisually):e<0?i.from():i.to()}),V)})),deleteH:Tr((function(e,t){var n=this.doc.sel,i=this.doc;n.somethingSelected()?i.replaceSelection("",null,"+delete"):Ka(this,(function(n){var r=Xl(i,n.head,e,t,!1);return e<0?{from:r,to:n.head}:{from:n.head,to:r}}))})),findPosV:function(e,t,n,i){var r=1,o=i;t<0&&(r=-1,t=-t);for(var a=ht(this.doc,e),l=0;l<t;++l){var s=xi(this,a,"div");if(null==o?o=s.left:s.left=o,(a=Jl(this,s,r,n)).hitSide)break}return a},moveV:Tr((function(e,t){var n=this,i=this.doc,r=[],o=!this.display.shift&&!i.extend&&i.sel.somethingSelected();if(i.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var l=xi(n,a.head,"div");null!=a.goalColumn&&(l.left=a.goalColumn),r.push(l.left);var s=Jl(n,l,e,t);return"page"==t&&a==i.sel.primary()&&ar(n,yi(n,s,"div").top-l.top),s}),V),r.length)for(var a=0;a<i.sel.ranges.length;a++)i.sel.ranges[a].goalColumn=r[a]})),findWordAt:function(e){var t=Je(this.doc,e.line).text,n=e.ch,i=e.ch;if(t){var r=this.getHelper(e,"wordChars");"before"!=e.sticky&&i!=t.length||!n?++i:--n;for(var o=t.charAt(n),a=ne(o,r)?function(e){return ne(e,r)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!ne(e)};n>0&&a(t.charAt(n-1));)--n;for(;i<t.length&&a(t.charAt(i));)++i}return new oo(ot(e.line,n),ot(e.line,i))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?T(this.display.cursorDiv,"CodeMirror-overwrite"):j(this.display.cursorDiv,"CodeMirror-overwrite"),ge(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==D()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:Tr((function(e,t){sr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-qn(this)-this.display.barHeight,width:e.scrollWidth-qn(this)-this.display.barWidth,clientHeight:Xn(this),clientWidth:Yn(this)}},scrollIntoView:Tr((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:ot(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?cr(this,e):dr(this,e.from,e.to,e.margin)})),setSize:Tr((function(e,t){var n=this,i=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=i(e)),null!=t&&(this.display.wrapper.style.height=i(t)),this.options.lineWrapping&&di(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){Ri(n,r,"widget");break}++r})),this.curOp.forceUpdate=!0,ge(this,"refresh",this)})),operation:function(e){return Ir(this,e)},startOperation:function(){return kr(this)},endOperation:function(){return Sr(this)},refresh:Tr((function(){var e=this.display.cachedTextHeight;Bi(this),this.curOp.forceUpdate=!0,hi(this),sr(this,this.doc.scrollLeft,this.doc.scrollTop),Vr(this.display),(null==e||Math.abs(e-Ai(this.display))>.5||this.options.lineWrapping)&&Pi(this),ge(this,"refresh",this)})),swapDoc:Tr((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),xo(this,e),hi(this),this.display.input.reset(),sr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,An(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},we(e),e.registerHelper=function(t,i,r){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][i]=r},e.registerGlobalHelper=function(t,i,r,o){e.registerHelper(t,i,o),n[t]._global.push({pred:r,val:o})}}function Xl(e,t,n,i,r){var o=t,a=n,l=Je(e,t.line),s=r&&"rtl"==e.direction?-n:n;function c(){var n=t.line+s;return!(n<e.first||n>=e.first+e.size)&&(t=new ot(n,t.ch,t.sticky),l=Je(e,n))}function u(o){var a;if("codepoint"==i){var u=l.text.charCodeAt(t.ch+(i>0?0:-1));a=isNaN(u)?null:new ot(t.line,Math.max(0,Math.min(l.text.length,t.ch+n*(u>=55296&&u<56320?2:1))),-n)}else a=r?Xa(e.cm,l,t,n):qa(l,t,n);if(null==a){if(o||!c())return!1;t=Ya(r,e.cm,l,t.line,s)}else t=a;return!0}if("char"==i||"codepoint"==i)u();else if("column"==i)u(!0);else if("word"==i||"group"==i)for(var d=null,h="group"==i,p=e.cm&&e.cm.getHelper(t,"wordChars"),f=!0;!(n<0)||u(!f);f=!1){var m=l.text.charAt(t.ch)||"\n",v=ne(m,p)?"w":h&&"\n"==m?"n":!h||/\s/.test(m)?null:"p";if(!h||f||v||(v="s"),d&&d!=v){n<0&&(n=1,u(),t.sticky="after");break}if(v&&(d=v),n>0&&!u(!f))break}var g=qo(e,t,o,a,!0);return lt(o,g)&&(g.hitSide=!0),g}function Jl(e,t,n,i){var r,o,a=e.doc,l=t.left;if("page"==i){var s=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(s-.5*Ai(e.display),3);r=(n>0?t.bottom:t.top)+n*c}else"line"==i&&(r=n>0?t.bottom+3:t.top-3);for(;(o=Ci(e,l,r)).outside;){if(n<0?r<=0:r>=a.height){o.hitSide=!0;break}r+=5*n}return o}var Ql=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new O,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function $l(e,t){var n=ti(e,t.line);if(!n||n.hidden)return null;var i=Je(e.doc,t.line),r=Qn(n,i,t.line),o=he(i,e.doc.direction),a="left";o&&(a=ue(o,t.ch)%2?"right":"left");var l=ai(r.map,t.ch,a);return l.offset="right"==l.collapse?l.end:l.start,l}function es(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}function ts(e,t){return t&&(e.bad=!0),e}function ns(e,t,n,i,r){var o="",a=!1,l=e.doc.lineSeparator(),s=!1;function c(e){return function(t){return t.id==e}}function u(){a&&(o+=l,s&&(o+=l),a=s=!1)}function d(e){e&&(u(),o+=e)}function h(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void d(n);var o,p=t.getAttribute("cm-marker");if(p){var f=e.findMarks(ot(i,0),ot(r+1,0),c(+p));return void(f.length&&(o=f[0].find(0))&&d(Qe(e.doc,o.from,o.to).join(l)))}if("false"==t.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;m&&u();for(var v=0;v<t.childNodes.length;v++)h(t.childNodes[v]);/^(pre|p)$/i.test(t.nodeName)&&(s=!0),m&&(a=!0)}else 3==t.nodeType&&d(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;h(t),t!=n;)t=t.nextSibling,s=!1;return o}function is(e,t,n){var i;if(t==e.display.lineDiv){if(!(i=e.display.lineDiv.childNodes[n]))return ts(e.clipPos(ot(e.display.viewTo-1)),!0);t=null,n=0}else for(i=t;;i=i.parentNode){if(!i||i==e.display.lineDiv)return null;if(i.parentNode&&i.parentNode==e.display.lineDiv)break}for(var r=0;r<e.display.view.length;r++){var o=e.display.view[r];if(o.node==i)return rs(o,t,n)}}function rs(e,t,n){var i=e.text.firstChild,r=!1;if(!t||!I(i,t))return ts(ot(tt(e.line),0),!0);if(t==i&&(r=!0,t=i.childNodes[n],n=0,!t)){var o=e.rest?Y(e.rest):e.line;return ts(ot(tt(o),o.text.length),r)}var a=3==t.nodeType?t:null,l=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));l.parentNode!=i;)l=l.parentNode;var s=e.measure,c=s.maps;function u(t,n,i){for(var r=-1;r<(c?c.length:0);r++)for(var o=r<0?s.map:c[r],a=0;a<o.length;a+=3){var l=o[a+2];if(l==t||l==n){var u=tt(r<0?e.line:e.rest[r]),d=o[a]+i;return(i<0||l!=t)&&(d=o[a+(i?1:0)]),ot(u,d)}}}var d=u(a,l,n);if(d)return ts(d,r);for(var h=l.nextSibling,p=a?a.nodeValue.length-n:0;h;h=h.nextSibling){if(d=u(h,h.firstChild,0))return ts(ot(d.line,d.ch-p),r);p+=h.textContent.length}for(var f=l.previousSibling,m=n;f;f=f.previousSibling){if(d=u(f,f.firstChild,-1))return ts(ot(d.line,d.ch+m),r);m+=f.textContent.length}}Ql.prototype.init=function(e){var t=this,n=this,i=n.cm,r=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==r)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!ye(i,e)){if(i.somethingSelected())Hl({lineWise:!1,text:i.getSelections()}),"cut"==e.type&&i.replaceSelection("",null,"cut");else{if(!i.options.lineWiseCopyCut)return;var t=Kl(i);Hl({lineWise:!0,text:t.text}),"cut"==e.type&&i.operation((function(){i.setSelections(t.ranges,0,z),i.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Wl.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var l=ql(),s=l.firstChild;i.display.lineSpace.insertBefore(l,i.display.lineSpace.firstChild),s.value=Wl.text.join("\n");var c=document.activeElement;M(s),setTimeout((function(){i.display.lineSpace.removeChild(l),c.focus(),c==r&&n.showPrimarySelection()}),50)}}Ul(r,i.options.spellcheck,i.options.autocorrect,i.options.autocapitalize),fe(r,"paste",(function(e){!o(e)||ye(i,e)||Gl(e,i)||l<=11&&setTimeout(Dr(i,(function(){return t.updateFromDOM()})),20)})),fe(r,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),fe(r,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),fe(r,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),fe(r,"touchstart",(function(){return n.forceCompositionEnd()})),fe(r,"input",(function(){t.composing||t.readFromDOMSoon()})),fe(r,"copy",a),fe(r,"cut",a)},Ql.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute("aria-label",e):this.div.removeAttribute("aria-label")},Ql.prototype.prepareSelection=function(){var e=Gi(this.cm,!1);return e.focus=document.activeElement==this.div,e},Ql.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ql.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ql.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,i=t.doc.sel.primary(),r=i.from(),o=i.to();if(t.display.viewTo==t.display.viewFrom||r.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=is(t,e.anchorNode,e.anchorOffset),l=is(t,e.focusNode,e.focusOffset);if(!a||a.bad||!l||l.bad||0!=at(ut(a,l),r)||0!=at(ct(a,l),o)){var s=t.display.view,c=r.line>=t.display.viewFrom&&$l(t,r)||{node:s[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&$l(t,o);if(!u){var d=s[s.length-1].measure,h=d.maps?d.maps[d.maps.length-1]:d.map;u={node:h[h.length-1],offset:h[h.length-2]-h[h.length-3]}}if(c&&u){var p,f=e.rangeCount&&e.getRangeAt(0);try{p=_(c.node,c.offset,u.offset,u.node)}catch(e){}p&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),p.collapsed||(e.removeAllRanges(),e.addRange(p))):(e.removeAllRanges(),e.addRange(p)),f&&null==e.anchorNode?e.addRange(f):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ql.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Ql.prototype.showMultipleSelections=function(e){E(this.cm.display.cursorDiv,e.cursors),E(this.cm.display.selectionDiv,e.selection)},Ql.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ql.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return I(this.div,t)},Ql.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&document.activeElement==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ql.prototype.blur=function(){this.div.blur()},Ql.prototype.getField=function(){return this.div},Ql.prototype.supportsTouch=function(){return!0},Ql.prototype.receivedFocus=function(){var e=this;function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))}this.selectionInEditor()?this.pollSelection():Ir(this.cm,(function(){return e.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,t)},Ql.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ql.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&u&&this.cm.display.gutterSpecs.length&&es(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=is(t,e.anchorNode,e.anchorOffset),i=is(t,e.focusNode,e.focusOffset);n&&i&&Ir(t,(function(){Ho(t.doc,lo(n,i),z),(n.bad||i.bad)&&(t.curOp.selectionChanged=!0)}))}}},Ql.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,i=this.cm,r=i.display,o=i.doc.sel.primary(),a=o.from(),l=o.to();if(0==a.ch&&a.line>i.firstLine()&&(a=ot(a.line-1,Je(i.doc,a.line-1).length)),l.ch==Je(i.doc,l.line).text.length&&l.line<i.lastLine()&&(l=ot(l.line+1,0)),a.line<r.viewFrom||l.line>r.viewTo-1)return!1;a.line==r.viewFrom||0==(e=Li(i,a.line))?(t=tt(r.view[0].line),n=r.view[0].node):(t=tt(r.view[e].line),n=r.view[e-1].node.nextSibling);var s,c,u=Li(i,l.line);if(u==r.view.length-1?(s=r.viewTo-1,c=r.lineDiv.lastChild):(s=tt(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!n)return!1;for(var d=i.doc.splitLines(ns(i,n,c,t,s)),h=Qe(i.doc,ot(t,0),ot(s,Je(i.doc,s).text.length));d.length>1&&h.length>1;)if(Y(d)==Y(h))d.pop(),h.pop(),s--;else{if(d[0]!=h[0])break;d.shift(),h.shift(),t++}for(var p=0,f=0,m=d[0],v=h[0],g=Math.min(m.length,v.length);p<g&&m.charCodeAt(p)==v.charCodeAt(p);)++p;for(var y=Y(d),x=Y(h),b=Math.min(y.length-(1==d.length?p:0),x.length-(1==h.length?p:0));f<b&&y.charCodeAt(y.length-f-1)==x.charCodeAt(x.length-f-1);)++f;if(1==d.length&&1==h.length&&t==a.line)for(;p&&p>a.ch&&y.charCodeAt(y.length-f-1)==x.charCodeAt(x.length-f-1);)p--,f++;d[d.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),d[0]=d[0].slice(p).replace(/\u200b+$/,"");var w=ot(t,p),C=ot(s,h.length?Y(h).length-f:0);return d.length>1||d[0]||at(w,C)?(ra(i.doc,d,w,C,"+input"),!0):void 0},Ql.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ql.prototype.reset=function(){this.forceCompositionEnd()},Ql.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ql.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ql.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||Ir(this.cm,(function(){return Bi(e.cm)}))},Ql.prototype.setUneditable=function(e){e.contentEditable="false"},Ql.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||Dr(this.cm,zl)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ql.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ql.prototype.onContextMenu=function(){},Ql.prototype.resetPosition=function(){},Ql.prototype.needsContentAttribute=!0;var os=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new O,this.hasSelection=!1,this.composing=null};function as(e,t){if((t=t?B(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=D();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function i(){e.value=l.getValue()}var r;if(e.form&&(fe(e.form,"submit",i),!t.leaveSubmitMethodAlone)){var o=e.form;r=o.submit;try{var a=o.submit=function(){i(),o.submit=r,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=i,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,i(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(ve(e.form,"submit",i),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=r))}},e.style.display="none";var l=Bl((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return l}function ls(e){e.off=ve,e.on=fe,e.wheelEventPixels=no,e.Doc=ka,e.splitLines=Pe,e.countColumn=R,e.findColumn=K,e.isWordChar=te,e.Pass=H,e.signal=ge,e.Line=cn,e.changeEnd=so,e.scrollbarModel=br,e.Pos=ot,e.cmpPos=at,e.modes=Oe,e.mimeModes=Fe,e.resolveMode=ze,e.getMode=Ge,e.modeExtensions=Ve,e.extendMode=Ke,e.copyState=Ue,e.startState=Ye,e.innerMode=qe,e.commands=Ja,e.keyMap=Ra,e.keyName=Ga,e.isModifierKey=Ha,e.lookupKey=Wa,e.normalizeKeyMap=Fa,e.StringStream=Xe,e.SharedTextMarker=ga,e.TextMarker=ma,e.LineWidget=da,e.e_preventDefault=Ce,e.e_stopPropagation=ke,e.e_stop=_e,e.addClass=T,e.contains=I,e.rmClass=j,e.keyNames=Pa}os.prototype.init=function(e){var t=this,n=this,i=this.cm;this.createField(e);var r=this.textarea;function o(e){if(!ye(i,e)){if(i.somethingSelected())Hl({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var t=Kl(i);Hl({lineWise:!0,text:t.text}),"cut"==e.type?i.setSelections(t.ranges,null,z):(n.prevInput="",r.value=t.text.join("\n"),M(r))}"cut"==e.type&&(i.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),m&&(r.style.width="0px"),fe(r,"input",(function(){a&&l>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),fe(r,"paste",(function(e){ye(i,e)||Gl(e,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())})),fe(r,"cut",o),fe(r,"copy",o),fe(e.scroller,"paste",(function(t){if(!Gn(e,t)&&!ye(i,t)){if(!r.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,r.dispatchEvent(o)}})),fe(e.lineSpace,"selectstart",(function(t){Gn(e,t)||Ce(t)})),fe(r,"compositionstart",(function(){var e=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:i.markText(e,i.getCursor("to"),{className:"CodeMirror-composing"})}})),fe(r,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},os.prototype.createField=function(e){this.wrapper=ql(),this.textarea=this.wrapper.firstChild},os.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute("aria-label",e):this.textarea.removeAttribute("aria-label")},os.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,i=Gi(e);if(e.options.moveInputWithCursor){var r=xi(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,r.top+a.top-o.top)),i.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,r.left+a.left-o.left))}return i},os.prototype.showSelection=function(e){var t=this.cm.display;E(t.cursorDiv,e.cursors),E(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},os.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&M(this.textarea),a&&l>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&l>=9&&(this.hasSelection=null))}},os.prototype.getField=function(){return this.textarea},os.prototype.supportsTouch=function(){return!1},os.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!g||D()!=this.textarea))try{this.textarea.focus()}catch(e){}},os.prototype.blur=function(){this.textarea.blur()},os.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},os.prototype.receivedFocus=function(){this.slowPoll()},os.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},os.prototype.fastPoll=function(){var e=!1,t=this;function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}t.pollingFast=!0,t.polling.set(20,n)},os.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!t.state.focused||Me(n)&&!i&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var r=n.value;if(r==i&&!t.somethingSelected())return!1;if(a&&l>=9&&this.hasSelection===r||y&&/[\uf700-\uf7ff]/.test(r))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i=""),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var s=0,c=Math.min(i.length,r.length);s<c&&i.charCodeAt(s)==r.charCodeAt(s);)++s;return Ir(t,(function(){zl(t,r.slice(s),i.length-s,null,e.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=r,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},os.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},os.prototype.onKeyPress=function(){a&&l>=9&&(this.hasSelection=null),this.fastPoll()},os.prototype.onContextMenu=function(e){var t=this,n=t.cm,i=n.display,r=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=Mi(n,e),c=i.scroller.scrollTop;if(o&&!d){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Dr(n,Ho)(n.doc,lo(o),z);var u,h=r.style.cssText,p=t.wrapper.style.cssText,f=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(e.clientY-f.top-5)+"px; left: "+(e.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",s&&(u=window.scrollY),i.input.focus(),s&&window.scrollTo(null,u),i.input.reset(),n.somethingSelected()||(r.value=t.prevInput=" "),t.contextMenuPending=g,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),a&&l>=9&&v(),k){_e(e);var m=function(){ve(window,"mouseup",m),setTimeout(g,20)};fe(window,"mouseup",m)}else setTimeout(g,50)}function v(){if(null!=r.selectionStart){var e=n.somethingSelected(),o=""+(e?r.value:"");r.value="⇚",r.value=o,t.prevInput=e?"":"",r.selectionStart=1,r.selectionEnd=o.length,i.selForContextMenu=n.doc.sel}}function g(){if(t.contextMenuPending==g&&(t.contextMenuPending=!1,t.wrapper.style.cssText=p,r.style.cssText=h,a&&l<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=r.selectionStart)){(!a||a&&l<9)&&v();var e=0,o=function(){i.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&""==t.prevInput?Dr(n,Xo)(n):e++<10?i.detectingSelectAll=setTimeout(o,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(o,200)}}},os.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},os.prototype.setUneditable=function(){},os.prototype.needsContentAttribute=!1,Pl(Bl),Yl(Bl);var ss="iter insert remove copy getEditor constructor".split(" ");for(var cs in ka.prototype)ka.prototype.hasOwnProperty(cs)&&F(ss,cs)<0&&(Bl.prototype[cs]=function(e){return function(){return e.apply(this.doc,arguments)}}(ka.prototype[cs]));return we(ka),Bl.inputStyles={textarea:os,contenteditable:Ql},Bl.defineMode=function(e){Bl.defaults.mode||"null"==e||(Bl.defaults.mode=e),We.apply(this,arguments)},Bl.defineMIME=He,Bl.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),Bl.defineMIME("text/plain","null"),Bl.defineExtension=function(e,t){Bl.prototype[e]=t},Bl.defineDocExtension=function(e,t){ka.prototype[e]=t},Bl.fromTextArea=as,ls(Bl),Bl.version="5.58.2",Bl}()},25419:function(e,t,n){!function(e){"use strict";e.defineMode("markdown",(function(t,n){var i=e.getMode(t,"text/html"),r="null"==i.name;function o(n){if(e.findModeByName){var i=e.findModeByName(n);i&&(n=i.mime||i.mimes[0])}var r=e.getMode(t,n);return"null"==r.name?null:r}void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var a={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var l in a)a.hasOwnProperty(l)&&n.tokenTypeOverrides[l]&&(a[l]=n.tokenTypeOverrides[l]);var s=/^([*\-_])(?:\s*\1){2,}\s*$/,c=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,d=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,h=/^ {0,3}(?:\={1,}|-{2,})\s*$/,p=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,v=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,g=" ";function y(e,t,n){return t.f=t.inline=n,n(e,t)}function x(e,t,n){return t.f=t.block=n,n(e,t)}function b(e){return!e||!/\S/.test(e.string)}function w(t){if(t.linkTitle=!1,t.linkHref=!1,t.linkText=!1,t.em=!1,t.strong=!1,t.strikethrough=!1,t.quote=0,t.indentedCode=!1,t.f==k){var n=r;if(!n){var o=e.innerMode(i,t.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(t.f=N,t.block=C,t.htmlState=null)}return t.trailingSpace=0,t.trailingSpaceNewLine=!1,t.prevLine=t.thisLine,t.thisLine={stream:null},null}function C(t,i){var r=t.column()===i.indentation,l=b(i.prevLine.stream),p=i.indentedCode,v=i.prevLine.hr,g=!1!==i.list,x=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var w=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,g)){for(i.list=null;w<i.listStack[i.listStack.length-1];)i.listStack.pop(),i.listStack.length?i.indentation=i.listStack[i.listStack.length-1]:i.list=!1;!1!==i.list&&(i.indentationDiff=w-i.listStack[i.listStack.length-1])}var C=!(l||v||i.prevLine.header||g&&p||i.prevLine.fencedCodeEnd),k=(!1===i.list||v||l)&&i.indentation<=x&&t.match(s),j=null;if(i.indentationDiff>=4&&(p||i.prevLine.fencedCodeEnd||i.prevLine.header||l))return t.skipToEnd(),i.indentedCode=!0,a.code;if(t.eatSpace())return null;if(r&&i.indentation<=x&&(j=t.match(d))&&j[1].length<=6)return i.quote=0,i.header=j[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,_(i);if(i.indentation<=x&&t.eat(">"))return i.quote=r?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),t.eatSpace(),_(i);if(!k&&!i.setext&&r&&i.indentation<=x&&(j=t.match(c))){var N=j[1]?"ol":"ul";return i.indentation=w+t.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&t.match(u,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+N]),_(i)}return r&&i.indentation<=x&&(j=t.match(f,!0))?(i.quote=0,i.fencedEndRE=new RegExp(j[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&o(j[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=e.startState(i.localMode)),i.f=i.block=S,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,_(i)):i.setext||!(C&&g||i.quote||!1!==i.list||i.code||k||m.test(t.string))&&(j=t.lookAhead(1))&&(j=j.match(h))?(i.setext?(i.header=i.setext,i.setext=0,t.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==j[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,_(i)):k?(t.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,a.hr):"["===t.peek()?y(t,i,D):y(t,i,i.inline)}function k(t,n){var o=i.token(t,n.htmlState);if(!r){var a=e.innerMode(i,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&t.current().indexOf(">")>-1)&&(n.f=N,n.block=C,n.htmlState=null)}return o}function S(e,t){var i,r=t.listStack[t.listStack.length-1]||0,o=t.indentation<r,l=r+3;return t.fencedEndRE&&t.indentation<=l&&(o||e.match(t.fencedEndRE))?(n.highlightFormatting&&(t.formatting="code-block"),o||(i=_(t)),t.localMode=t.localState=null,t.block=C,t.f=N,t.fencedEndRE=null,t.code=0,t.thisLine.fencedCodeEnd=!0,o?x(e,t,t.block):i):t.localMode?t.localMode.token(e,t.localState):(e.skipToEnd(),a.code)}function _(e){var t=[];if(e.formatting){t.push(a.formatting),"string"==typeof e.formatting&&(e.formatting=[e.formatting]);for(var i=0;i<e.formatting.length;i++)t.push(a.formatting+"-"+e.formatting[i]),"header"===e.formatting[i]&&t.push(a.formatting+"-"+e.formatting[i]+"-"+e.header),"quote"===e.formatting[i]&&(!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.formatting+"-"+e.formatting[i]+"-"+e.quote):t.push("error"))}if(e.taskOpen)return t.push("meta"),t.length?t.join(" "):null;if(e.taskClosed)return t.push("property"),t.length?t.join(" "):null;if(e.linkHref?t.push(a.linkHref,"url"):(e.strong&&t.push(a.strong),e.em&&t.push(a.em),e.strikethrough&&t.push(a.strikethrough),e.emoji&&t.push(a.emoji),e.linkText&&t.push(a.linkText),e.code&&t.push(a.code),e.image&&t.push(a.image),e.imageAltText&&t.push(a.imageAltText,"link"),e.imageMarker&&t.push(a.imageMarker)),e.header&&t.push(a.header,a.header+"-"+e.header),e.quote&&(t.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=e.quote?t.push(a.quote+"-"+e.quote):t.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==e.list){var r=(e.listStack.length-1)%3;r?1===r?t.push(a.list2):t.push(a.list3):t.push(a.list1)}return e.trailingSpaceNewLine?t.push("trailing-space-new-line"):e.trailingSpace&&t.push("trailing-space-"+(e.trailingSpace%2?"a":"b")),t.length?t.join(" "):null}function j(e,t){if(e.match(p,!0))return _(t)}function N(t,r){var o=r.text(t,r);if(void 0!==o)return o;if(r.list)return r.list=null,_(r);if(r.taskList)return" "===t.match(u,!0)[1]?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,_(r);if(r.taskOpen=!1,r.taskClosed=!1,r.header&&t.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"),_(r);var l=t.next();if(r.linkTitle){r.linkTitle=!1;var s=l;"("===l&&(s=")");var c="^\\s*(?:[^"+(s=(s+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+s;if(t.match(new RegExp(c),!0))return a.linkHref}if("`"===l){var d=r.formatting;n.highlightFormatting&&(r.formatting="code"),t.eatWhile("`");var h=t.current().length;if(0!=r.code||r.quote&&1!=h){if(h==r.code){var p=_(r);return r.code=0,p}return r.formatting=d,_(r)}return r.code=h,_(r)}if(r.code)return _(r);if("\\"===l&&(t.next(),n.highlightFormatting)){var f=_(r),m=a.formatting+"-escape";return f?f+" "+m:m}if("!"===l&&t.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return r.imageMarker=!0,r.image=!0,n.highlightFormatting&&(r.formatting="image"),_(r);if("["===l&&r.imageMarker&&t.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return r.imageMarker=!1,r.imageAltText=!0,n.highlightFormatting&&(r.formatting="image"),_(r);if("]"===l&&r.imageAltText){n.highlightFormatting&&(r.formatting="image");var f=_(r);return r.imageAltText=!1,r.image=!1,r.inline=r.f=A,f}if("["===l&&!r.image)return r.linkText&&t.match(/^.*?\]/)||(r.linkText=!0,n.highlightFormatting&&(r.formatting="link")),_(r);if("]"===l&&r.linkText){n.highlightFormatting&&(r.formatting="link");var f=_(r);return r.linkText=!1,r.inline=r.f=t.match(/\(.*?\)| ?\[.*?\]/,!1)?A:N,f}if("<"===l&&t.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=E,n.highlightFormatting&&(r.formatting="link"),(f=_(r))?f+=" ":f="",f+a.linkInline;if("<"===l&&t.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=E,n.highlightFormatting&&(r.formatting="link"),(f=_(r))?f+=" ":f="",f+a.linkEmail;if(n.xml&&"<"===l&&t.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var g=t.string.indexOf(">",t.pos);if(-1!=g){var y=t.string.substring(t.start,g);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(r.md_inside=!0)}return t.backUp(1),r.htmlState=e.startState(i),x(t,r,k)}if(n.xml&&"<"===l&&t.match(/^\/\w*?>/))return r.md_inside=!1,"tag";if("*"===l||"_"===l){for(var b=1,w=1==t.pos?" ":t.string.charAt(t.pos-2);b<3&&t.eat(l);)b++;var C=t.peek()||" ",S=!/\s/.test(C)&&(!v.test(C)||/\s/.test(w)||v.test(w)),j=!/\s/.test(w)&&(!v.test(w)||/\s/.test(C)||v.test(C)),Z=null,I=null;if(b%2&&(r.em||!S||"*"!==l&&j&&!v.test(w)?r.em!=l||!j||"*"!==l&&S&&!v.test(C)||(Z=!1):Z=!0),b>1&&(r.strong||!S||"*"!==l&&j&&!v.test(w)?r.strong!=l||!j||"*"!==l&&S&&!v.test(C)||(I=!1):I=!0),null!=I||null!=Z)return n.highlightFormatting&&(r.formatting=null==Z?"strong":null==I?"em":"strong em"),!0===Z&&(r.em=l),!0===I&&(r.strong=l),p=_(r),!1===Z&&(r.em=!1),!1===I&&(r.strong=!1),p}else if(" "===l&&(t.eat("*")||t.eat("_"))){if(" "===t.peek())return _(r);t.backUp(1)}if(n.strikethrough)if("~"===l&&t.eatWhile(l)){if(r.strikethrough)return n.highlightFormatting&&(r.formatting="strikethrough"),p=_(r),r.strikethrough=!1,p;if(t.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),_(r)}else if(" "===l&&t.match(/^~~/,!0)){if(" "===t.peek())return _(r);t.backUp(2)}if(n.emoji&&":"===l&&t.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){r.emoji=!0,n.highlightFormatting&&(r.formatting="emoji");var D=_(r);return r.emoji=!1,D}return" "===l&&(t.match(/^ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),_(r)}function E(e,t){if(">"===e.next()){t.f=t.inline=N,n.highlightFormatting&&(t.formatting="link");var i=_(t);return i?i+=" ":i="",i+a.linkInline}return e.match(/^[^>]+/,!0),a.linkInline}function A(e,t){if(e.eatSpace())return null;var i=e.next();return"("===i||"["===i?(t.f=t.inline=I("("===i?")":"]"),n.highlightFormatting&&(t.formatting="link-string"),t.linkHref=!0,_(t)):"error"}var Z={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function I(e){return function(t,i){if(t.next()===e){i.f=i.inline=N,n.highlightFormatting&&(i.formatting="link-string");var r=_(i);return i.linkHref=!1,r}return t.match(Z[e]),i.linkHref=!0,_(i)}}function D(e,t){return e.match(/^([^\]\\]|\\.)*\]:/,!1)?(t.f=T,e.next(),n.highlightFormatting&&(t.formatting="link"),t.linkText=!0,_(t)):y(e,t,N)}function T(e,t){if(e.match(/^\]:/,!0)){t.f=t.inline=P,n.highlightFormatting&&(t.formatting="link");var i=_(t);return t.linkText=!1,i}return e.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function P(e,t){return e.eatSpace()?null:(e.match(/^[^\s]+/,!0),void 0===e.peek()?t.linkTitle=!0:e.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),t.f=t.inline=N,a.linkHref+" url")}var M={startState:function(){return{f:C,prevLine:{stream:null},thisLine:{stream:null},block:C,htmlState:null,indentation:0,inline:N,text:j,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(t){return{f:t.f,prevLine:t.prevLine,thisLine:t.thisLine,block:t.block,htmlState:t.htmlState&&e.copyState(i,t.htmlState),indentation:t.indentation,localMode:t.localMode,localState:t.localMode?e.copyState(t.localMode,t.localState):null,inline:t.inline,text:t.text,formatting:!1,linkText:t.linkText,linkTitle:t.linkTitle,linkHref:t.linkHref,code:t.code,em:t.em,strong:t.strong,strikethrough:t.strikethrough,emoji:t.emoji,header:t.header,setext:t.setext,hr:t.hr,taskList:t.taskList,list:t.list,listStack:t.listStack.slice(0),quote:t.quote,indentedCode:t.indentedCode,trailingSpace:t.trailingSpace,trailingSpaceNewLine:t.trailingSpaceNewLine,md_inside:t.md_inside,fencedEndRE:t.fencedEndRE}},token:function(e,t){if(t.formatting=!1,e!=t.thisLine.stream){if(t.header=0,t.hr=!1,e.match(/^\s*$/,!0))return w(t),null;if(t.prevLine=t.thisLine,t.thisLine={stream:e},t.taskList=!1,t.trailingSpace=0,t.trailingSpaceNewLine=!1,!t.localState&&(t.f=t.block,t.f!=k)){var n=e.match(/^\s*/,!0)[0].replace(/\t/g,g).length;if(t.indentation=n,t.indentationDiff=null,n>0)return null}}return t.f(e,t)},innerMode:function(e){return e.block==k?{state:e.htmlState,mode:i}:e.localState?{state:e.localState,mode:e.localMode}:{state:e,mode:M}},indent:function(t,n,r){return t.block==k&&i.indent?i.indent(t.htmlState,n,r):t.localState&&t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},blankLine:w,getType:_,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return M}),"xml"),e.defineMIME("text/markdown","markdown"),e.defineMIME("text/x-markdown","markdown")}(n(89780),n(15525),n(98101))},98101:function(e,t,n){!function(e){"use strict";e.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var t=0;t<e.modeInfo.length;t++){var n=e.modeInfo[t];n.mimes&&(n.mime=n.mimes[0])}e.findModeByMIME=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.mime==t)return i;if(i.mimes)for(var r=0;r<i.mimes.length;r++)if(i.mimes[r]==t)return i}return/\+xml$/.test(t)?e.findModeByMIME("application/xml"):/\+json$/.test(t)?e.findModeByMIME("application/json"):void 0},e.findModeByExtension=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.ext)for(var r=0;r<i.ext.length;r++)if(i.ext[r]==t)return i}},e.findModeByFileName=function(t){for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.file&&i.file.test(t))return i}var r=t.lastIndexOf("."),o=r>-1&&t.substring(r+1,t.length);if(o)return e.findModeByExtension(o)},e.findModeByName=function(t){t=t.toLowerCase();for(var n=0;n<e.modeInfo.length;n++){var i=e.modeInfo[n];if(i.name.toLowerCase()==t)return i;if(i.alias)for(var r=0;r<i.alias.length;r++)if(i.alias[r].toLowerCase()==t)return i}}}(n(89780))},67549:function(e,t,n){!function(e){"use strict";e.defineMode("stex",(function(e,t){function n(e,t){e.cmdState.push(t)}function i(e){return e.cmdState.length>0?e.cmdState[e.cmdState.length-1]:null}function r(e){var t=e.cmdState.pop();t&&t.closeBracket()}function o(e){for(var t=e.cmdState,n=t.length-1;n>=0;n--){var i=t[n];if("DEFAULT"!=i.name)return i}return{styleIdentifier:function(){return null}}}function a(e,t,n){return function(){this.name=e,this.bracketNo=0,this.style=t,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var l={};function s(e,t){e.f=t}function c(e,t){var r;if(e.match(/^\\[a-zA-Z@]+/)){var a=e.current().slice(1);return n(t,r=new(r=l.hasOwnProperty(a)?l[a]:l.DEFAULT)),s(t,d),r.style}if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/\\]/))return"tag";if(e.match("\\["))return s(t,(function(e,t){return u(e,t,"\\]")})),"keyword";if(e.match("\\("))return s(t,(function(e,t){return u(e,t,"\\)")})),"keyword";if(e.match("$$"))return s(t,(function(e,t){return u(e,t,"$$")})),"keyword";if(e.match("$"))return s(t,(function(e,t){return u(e,t,"$")})),"keyword";var c=e.next();return"%"==c?(e.skipToEnd(),"comment"):"}"==c||"]"==c?(r=i(t))?(r.closeBracket(c),s(t,d),"bracket"):"error":"{"==c||"["==c?(n(t,r=new(r=l.DEFAULT)),"bracket"):/\d/.test(c)?(e.eatWhile(/[\w.%]/),"atom"):(e.eatWhile(/[\w\-_]/),"begin"==(r=o(t)).name&&(r.argument=e.current()),r.styleIdentifier())}function u(e,t,n){if(e.eatSpace())return null;if(n&&e.match(n))return s(t,c),"keyword";if(e.match(/^\\[a-zA-Z@]+/))return"tag";if(e.match(/^[a-zA-Z]+/))return"variable-2";if(e.match(/^\\[$&%#{}_]/))return"tag";if(e.match(/^\\[,;!\/]/))return"tag";if(e.match(/^[\^_&]/))return"tag";if(e.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(e.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=e.next();return"{"==i||"}"==i||"["==i||"]"==i||"("==i||")"==i?"bracket":"%"==i?(e.skipToEnd(),"comment"):"error"}function d(e,t){var n=e.peek();return"{"==n||"["==n?(i(t).openBracket(n),e.eat(n),s(t,c),"bracket"):/[ \t\r]/.test(n)?(e.eat(n),null):(s(t,c),r(t),c(e,t))}return l.importmodule=a("importmodule","tag",["string","builtin"]),l.documentclass=a("documentclass","tag",["","atom"]),l.usepackage=a("usepackage","tag",["atom"]),l.begin=a("begin","tag",["atom"]),l.end=a("end","tag",["atom"]),l.label=a("label","tag",["atom"]),l.ref=a("ref","tag",["atom"]),l.eqref=a("eqref","tag",["atom"]),l.cite=a("cite","tag",["atom"]),l.bibitem=a("bibitem","tag",["atom"]),l.Bibitem=a("Bibitem","tag",["atom"]),l.RBibitem=a("RBibitem","tag",["atom"]),l.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:t.inMathMode?function(e,t){return u(e,t)}:c}},copyState:function(e){return{cmdState:e.cmdState.slice(),f:e.f}},token:function(e,t){return t.f(e,t)},blankLine:function(e){e.f=c,e.cmdState.length=0},lineComment:"%"}})),e.defineMIME("text/x-stex","stex"),e.defineMIME("text/x-latex","stex")}(n(89780))},15525:function(e,t,n){!function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(i,r){var o,a,l=i.indentUnit,s={},c=r.htmlMode?t:n;for(var u in c)s[u]=c[u];for(var u in r)s[u]=r[u];function d(e,t){function n(n){return t.tokenize=n,n(e,t)}var i=e.next();return"<"==i?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(f("atom","]]>")):null:e.match("--")?n(f("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(m(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=f("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=h,"tag bracket"):"&"==i?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function h(e,t){var n=e.next();if(">"==n||"/"==n&&e.eat(">"))return t.tokenize=d,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){t.tokenize=d,t.state=x,t.tagName=t.tagStart=null;var i=t.tokenize(e,t);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(t.tokenize=p(n),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(e){var t=function(t,n){for(;!t.eol();)if(t.next()==e){n.tokenize=h;break}return"string"};return t.isInAttribute=!0,t}function f(e,t){return function(n,i){for(;!n.eol();){if(n.match(t)){i.tokenize=d;break}n.next()}return e}}function m(e){return function(t,n){for(var i;null!=(i=t.next());){if("<"==i)return n.tokenize=m(e+1),n.tokenize(t,n);if(">"==i){if(1==e){n.tokenize=d;break}return n.tokenize=m(e-1),n.tokenize(t,n)}}return"meta"}}function v(e,t,n){this.prev=e.context,this.tagName=t,this.indent=e.indented,this.startOfLine=n,(s.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function g(e){e.context&&(e.context=e.context.prev)}function y(e,t){for(var n;;){if(!e.context)return;if(n=e.context.tagName,!s.contextGrabbers.hasOwnProperty(n)||!s.contextGrabbers[n].hasOwnProperty(t))return;g(e)}}function x(e,t,n){return"openTag"==e?(n.tagStart=t.column(),b):"closeTag"==e?w:x}function b(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",S):s.allowMissingTagName&&"endTag"==e?(a="tag bracket",S(e,t,n)):(a="error",b)}function w(e,t,n){if("word"==e){var i=t.current();return n.context&&n.context.tagName!=i&&s.implicitlyClosed.hasOwnProperty(n.context.tagName)&&g(n),n.context&&n.context.tagName==i||!1===s.matchClosing?(a="tag",C):(a="tag error",k)}return s.allowMissingTagName&&"endTag"==e?(a="tag bracket",C(e,t,n)):(a="error",k)}function C(e,t,n){return"endTag"!=e?(a="error",C):(g(n),x)}function k(e,t,n){return a="error",C(e,t,n)}function S(e,t,n){if("word"==e)return a="attribute",_;if("endTag"==e||"selfcloseTag"==e){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||s.autoSelfClosers.hasOwnProperty(i)?y(n,i):(y(n,i),n.context=new v(n,i,r==n.indented)),x}return a="error",S}function _(e,t,n){return"equals"==e?j:(s.allowMissing||(a="error"),S(e,t,n))}function j(e,t,n){return"string"==e?N:"word"==e&&s.allowUnquoted?(a="string",S):(a="error",S(e,t,n))}function N(e,t,n){return"string"==e?N:S(e,t,n)}return d.isInText=!0,{startState:function(e){var t={tokenize:d,state:x,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,i){var r=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+l;if(r&&r.noIndent)return e.Pass;if(t.tokenize!=h&&t.tokenize!=d)return i?i.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==s.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+l*(s.multilineTagIndentFactor||1);if(s.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;r;){if(r.tagName==o[2]){r=r.prev;break}if(!s.implicitlyClosed.hasOwnProperty(r.tagName))break;r=r.prev}else if(o)for(;r;){var a=s.contextGrabbers[r.tagName];if(!a||!a.hasOwnProperty(o[2]))break;r=r.prev}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+l:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:s.htmlMode?"html":"xml",helperType:s.htmlMode?"html":"xml",skipAttribute:function(e){e.state==j&&(e.state=S)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)n.tagName&&t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(89780))},24334:function(e,t,n){var i,r;r="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==n.g?n.g:this,e.exports=function(n){"use strict";var r,o=(n=n||{}).Base64,a="2.6.4",l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=function(e){for(var t={},n=0,i=e.length;n<i;n++)t[e.charAt(n)]=n;return t}(l),c=String.fromCharCode,u=function(e){if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?c(192|t>>>6)+c(128|63&t):c(224|t>>>12&15)+c(128|t>>>6&63)+c(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return c(240|t>>>18&7)+c(128|t>>>12&63)+c(128|t>>>6&63)+c(128|63&t)},d=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,h=function(e){return e.replace(d,u)},p=function(e){var t=[0,2,1][e.length%3],n=e.charCodeAt(0)<<16|(e.length>1?e.charCodeAt(1):0)<<8|(e.length>2?e.charCodeAt(2):0);return[l.charAt(n>>>18),l.charAt(n>>>12&63),t>=2?"=":l.charAt(n>>>6&63),t>=1?"=":l.charAt(63&n)].join("")},f=n.btoa&&"function"==typeof n.btoa?function(e){return n.btoa(e)}:function(e){if(e.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return e.replace(/[\s\S]{1,3}/g,p)},m=function(e){return f(h(String(e)))},v=function(e){return e.replace(/[+\/]/g,(function(e){return"+"==e?"-":"_"})).replace(/=/g,"")},g=function(e,t){return t?v(m(e)):m(e)},y=function(e){return g(e,!0)};n.Uint8Array&&(r=function(e,t){for(var n="",i=0,r=e.length;i<r;i+=3){var o=e[i],a=e[i+1],s=e[i+2],c=o<<16|a<<8|s;n+=l.charAt(c>>>18)+l.charAt(c>>>12&63)+(void 0!==a?l.charAt(c>>>6&63):"=")+(void 0!==s?l.charAt(63&c):"=")}return t?v(n):n});var x,b=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,w=function(e){switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return c(55296+(t>>>10))+c(56320+(1023&t));case 3:return c((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return c((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},C=function(e){return e.replace(b,w)},k=function(e){var t=e.length,n=t%4,i=(t>0?s[e.charAt(0)]<<18:0)|(t>1?s[e.charAt(1)]<<12:0)|(t>2?s[e.charAt(2)]<<6:0)|(t>3?s[e.charAt(3)]:0),r=[c(i>>>16),c(i>>>8&255),c(255&i)];return r.length-=[0,0,2,1][n],r.join("")},S=n.atob&&"function"==typeof n.atob?function(e){return n.atob(e)}:function(e){return e.replace(/\S{1,4}/g,k)},_=function(e){return S(String(e).replace(/[^A-Za-z0-9\+\/]/g,""))},j=function(e){return C(S(e))},N=function(e){return String(e).replace(/[-_]/g,(function(e){return"-"==e?"+":"/"})).replace(/[^A-Za-z0-9\+\/]/g,"")},E=function(e){return j(N(e))};n.Uint8Array&&(x=function(e){return Uint8Array.from(_(N(e)),(function(e){return e.charCodeAt(0)}))});var A=function(){var e=n.Base64;return n.Base64=o,e};if(n.Base64={VERSION:a,atob:_,btoa:f,fromBase64:E,toBase64:g,utob:h,encode:g,encodeURI:y,btou:C,decode:E,noConflict:A,fromUint8Array:r,toUint8Array:x},"function"==typeof Object.defineProperty){var Z=function(e){return{value:e,enumerable:!1,writable:!0,configurable:!0}};n.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Z((function(){return E(this)}))),Object.defineProperty(String.prototype,"toBase64",Z((function(e){return g(this,e)}))),Object.defineProperty(String.prototype,"toBase64URI",Z((function(){return g(this,!0)})))}}return n.Meteor&&(Base64=n.Base64),e.exports?e.exports.Base64=n.Base64:void 0===(i=function(){return n.Base64}.apply(t,[]))||(e.exports=i),{Base64:n.Base64}}(r)},2859:function(e,t,n){"use strict";n.d(t,{hP:function(){return Q}});var i=function(e,t){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])})(e,t)};function r(e,t){function n(){this.constructor=e}i(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}function o(e,t,n,i){return new(n||(n=Promise))((function(r,o){function a(e){try{s(i.next(e))}catch(e){o(e)}}function l(e){try{s(i.throw(e))}catch(e){o(e)}}function s(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,l)}s((i=i.apply(e,t||[])).next())}))}function a(e,t){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:l(0),throw:l(1),return:l(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function l(o){return function(l){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]<r[3])){a.label=o[1];break}if(6===o[0]&&a.label<r[1]){a.label=r[1],r=o;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(o);break}r[2]&&a.ops.pop(),a.trys.pop();continue}o=t.call(e,a)}catch(e){o=[6,e],i=0}finally{n=r=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,l])}}}function l(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var i=Array(e),r=0;for(t=0;t<n;t++)for(var o=arguments[t],a=0,l=o.length;a<l;a++,r++)i[r]=o[a];return i}var s=function(){function e(){}return e.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},e.setAttributes=function(e,t){for(var n=0,i=t;n<i.length;n++){var r=i[n],o=r[0],a=r[1];e.setAttribute(o,a)}},e.createRect=function(t,n,i){var r=document.createElementNS("http://www.w3.org/2000/svg","rect");return r.setAttribute("width",t.toString()),r.setAttribute("height",n.toString()),i&&e.setAttributes(r,i),r},e.createLine=function(t,n,i,r,o){var a=document.createElementNS("http://www.w3.org/2000/svg","line");return a.setAttribute("x1",t.toString()),a.setAttribute("y1",n.toString()),a.setAttribute("x2",i.toString()),a.setAttribute("y2",r.toString()),o&&e.setAttributes(a,o),a},e.createPolygon=function(t,n){var i=document.createElementNS("http://www.w3.org/2000/svg","polygon");return i.setAttribute("points",t),n&&e.setAttributes(i,n),i},e.createCircle=function(t,n){var i=document.createElementNS("http://www.w3.org/2000/svg","circle");return i.setAttribute("cx",(t/2).toString()),i.setAttribute("cy",(t/2).toString()),i.setAttribute("r",t.toString()),n&&e.setAttributes(i,n),i},e.createEllipse=function(t,n,i){var r=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return r.setAttribute("cx",(t/2).toString()),r.setAttribute("cy",(n/2).toString()),r.setAttribute("rx",(t/2).toString()),r.setAttribute("ry",(n/2).toString()),i&&e.setAttributes(r,i),r},e.createGroup=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","g");return t&&e.setAttributes(n,t),n},e.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},e.createMarker=function(t,n,i,r,o,a,l){var s=document.createElementNS("http://www.w3.org/2000/svg","marker");return e.setAttributes(s,[["id",t],["orient",n],["markerWidth",i.toString()],["markerHeight",r.toString()],["refX",o.toString()],["refY",a.toString()]]),s.appendChild(l),s},e.createText=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","text");return n.setAttribute("x","0"),n.setAttribute("y","0"),t&&e.setAttributes(n,t),n},e.createTSpan=function(t,n){var i=document.createElementNS("http://www.w3.org/2000/svg","tspan");return i.textContent=t,n&&e.setAttributes(i,n),i},e.createImage=function(t){var n=document.createElementNS("http://www.w3.org/2000/svg","image");return t&&e.setAttributes(n,t),n},e.createPoint=function(e,t){var n=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return n.x=e,n.y=t,n},e.createPath=function(t,n){var i=document.createElementNS("http://www.w3.org/2000/svg","path");return i.setAttribute("d",t),n&&e.setAttributes(i,n),i},e}(),c=function(){function e(){}return e.addKey=function(t){e.key=t},Object.defineProperty(e,"isLicensed",{get:function(){return!!e.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(e.key)},enumerable:!1,configurable:!0}),e}(),u=function(){function e(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return e.prototype.rasterize=function(e,t,n){var i=this;return new Promise((function(r){var o=void 0!==n?n:document.createElement("canvas");null===e&&(i.markersOnly=!0,i.naturalSize=!1);var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.setAttribute("xmlns","http://www.w3.org/2000/svg"),a.setAttribute("width",t.width.baseVal.valueAsString),a.setAttribute("height",t.height.baseVal.valueAsString),a.setAttribute("viewBox","0 0 "+t.viewBox.baseVal.width.toString()+" "+t.viewBox.baseVal.height.toString()),a.innerHTML=t.innerHTML,!0===i.naturalSize?(a.width.baseVal.value=e.naturalWidth,a.height.baseVal.value=e.naturalHeight):void 0!==i.width&&void 0!==i.height&&(a.width.baseVal.value=i.width,a.height.baseVal.value=i.height),o.width=a.width.baseVal.value,o.height=a.height.baseVal.value;var l=a.outerHTML,s=o.getContext("2d");!0!==i.markersOnly&&s.drawImage(e,0,0,o.width,o.height);var c=window.URL,u=new Image(o.width,o.height);u.setAttribute("crossOrigin","anonymous");var d=new Blob([l],{type:"image/svg+xml"}),h=c.createObjectURL(d);u.onload=function(){s.drawImage(u,0,0),c.revokeObjectURL(h);var e=o.toDataURL(i.imageType,i.imageQuality);r(e)},u.src=h}))},e}(),d=function(){},h=function(){function e(e){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+e+"_"}return Object.defineProperty(e.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),e.prototype.addClass=function(e){return void 0===this.styleSheet&&this.addStyleSheet(),e.name=""+this.classNamePrefix+e.localName,this.classes.push(e),this.styleSheet.sheet.insertRule("."+e.name+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length),e},e.prototype.addRule=function(e){void 0===this.styleSheet&&this.addStyleSheet(),this.rules.push(e),this.styleSheet.sheet.insertRule(e.selector+" {"+e.style+"}",this.styleSheet.sheet.cssRules.length)},e.prototype.addStyleSheet=function(){var e;this.styleSheet=document.createElement("style"),(null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).appendChild(this.styleSheet),this.addRule(new p("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new p("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames","\n from {\n opacity: 0;\n }\n to {\n opacity: 1;\n }\n ")),this.addRule(new p("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames","\n from {\n opacity: 1;\n }\n to {\n opacity: 0;\n }\n ")),this.addClass(new f("fade_in","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_in_animation_frames;\n ")),this.addClass(new f("fade_out","\n animation-duration: 0.3s;\n animation-name: "+this.classNamePrefix+"_fade_out_animation_frames;\n "))},e.prototype.removeStyleSheet=function(){var e;this.styleSheet&&((null!==(e=this.styleSheetRoot)&&void 0!==e?e:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},e}(),p=function(e,t){this.selector=e,this.style=t},f=function(e,t){this.localName=e,this.style=t},m=function(){function e(e,t,n,i,r){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=e,this.displayMode=t,this.markerItems=n,this.uiStyleSettings=i,this.styles=r,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return e.prototype.show=function(e){var t=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var n=document.createElement("div");n.className=this.toolbarBlockStyleClass.name,n.style.whiteSpace="nowrap",this.uiContainer.appendChild(n),this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach((function(e){var n=document.createElement("div");n.className=""+t.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",e.typeName),n.innerHTML=e.icon,n.addEventListener("click",(function(){t.markerToolbarButtonClicked(n,e)})),t.buttons.push(n),t.markerButtons.push(n)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var i=document.createElement("div");i.className=this.toolbarBlockStyleClass.name,i.style.whiteSpace="nowrap",i.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(i),this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(i,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},e.prototype.addButtonClickListener=function(e){this.buttonClickListeners.push(e)},e.prototype.removeButtonClickListener=function(e){this.buttonClickListeners.indexOf(e)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(e),1)},e.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},e.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var e=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var t=0;t<this.markerButtons.length;t++)t<e||t===e&&this.markerButtons.length-1===e?this.markerButtonBlock.appendChild(this.markerButtons[t]):(t===e&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[t]))}},e.prototype.overflowButtonClicked=function(){"none"!==this.markerButtonOverflowBlock.style.display?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},e.prototype.resetButtonStyles=function(){var e=this;this.buttons.forEach((function(t){t.className=t.className.replace(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name,"").trim(),t.className=t.className.replace(e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?e.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:e.toolbarActiveButtonStyleColorsClass.name,"").trim(),t.className+=" "+(e.uiStyleSettings.toolbarButtonStyleColorsClassName?e.uiStyleSettings.toolbarButtonStyleColorsClassName:e.toolbarButtonStyleColorsClass.name)}))},e.prototype.addActionButton=function(e,t,n){var i=this,r=document.createElement("div");switch(r.className=""+this.toolbarButtonStyleClass.name,r.innerHTML=t,r.setAttribute("data-action",n),r.addEventListener("click",(function(){i.actionToolbarButtonClicked(r,n)})),n){case"select":case"undo":case"redo":r.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":r.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"render":r.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":r.style.fill=this.uiStyleSettings.closeButtonColor}e.appendChild(r),this.buttons.push(r)},e.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new f("toolbar","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: row;\n justify-content: space-between; \n height: "+this.uiStyleSettings.toolbarHeight+"px;\n box-sizing: content-box;\n "+("inline"===this.displayMode?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolbarStyleColorsClass=this.styles.addClass(new f("toolbar_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n box-shadow: 0px 3px rgba(33, 33, 33, 0.1);\n ")),this.toolbarBlockStyleClass=this.styles.addClass(new f("toolbar-block","\n display: inline-block;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new f("toolbar-overflow-block","\n position: absolute;\n top: "+this.uiStyleSettings.toolbarHeight+"px;\n max-width: "+2*this.uiStyleSettings.toolbarHeight+"px;\n z-index: 10;\n box-sizing: content-box;\n ")),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new f("toolbar-overflow-block_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new f("toolbar_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolbarButtonStyleColorsClass=this.styles.addClass(new f("toolbar_button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new f("toolbar_active_button","\n fill: "+this.uiStyleSettings.toolbarColor+";\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new p("."+this.toolbarButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n ")),this.styles.addRule(new p("."+this.toolbarButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n "))},e.prototype.markerToolbarButtonClicked=function(e,t){this.setActiveButton(e),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("marker",t)})),this.markerButtonOverflowBlock.style.display="none"},e.prototype.actionToolbarButtonClicked=function(e,t){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(e){return e("action",t)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},e.prototype.setActiveButton=function(e){this.resetButtonStyles(),e.className=e.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),e.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},e.prototype.setActiveMarkerButton=function(e){var t=this.markerButtons.find((function(t){return t.getAttribute("data-type-name")===e}));t&&this.setActiveButton(t)},e.prototype.setCurrentMarker=function(e){var t=this;this.currentMarker=e,this.buttons.filter((function(e){return/delete|notes/.test(e.getAttribute("data-action"))})).forEach((function(e){void 0===t.currentMarker?(e.style.fillOpacity="0.4",e.style.pointerEvents="none"):(e.style.fillOpacity="1",e.style.pointerEvents="all")}))},e}(),v=function(){function e(e,t,n,i){this.panels=[],this.panelButtons=[],this.markerjsContainer=e,this.displayMode=t,this.uiStyleSettings=n,this.styles=i,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return e.prototype.addStyles=function(){var e;this.toolboxStyleClass=this.styles.addClass(new f("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new f("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var t=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new f("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new f("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new f("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new f("toolbox-panel-row_colors","\n background-color: "+(null!==(e=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==e?e:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new f("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*t)+"px;\n padding: "+t+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new f("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new f("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new p("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new p("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},e.prototype.show=function(e){var t;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=e,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==t?t:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},e.prototype.setPanelButtons=function(e){var t,n,i=this;this.panels=e,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(t=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==t?t:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(e){var t;e.uiStyleSettings=i.uiStyleSettings;var n=document.createElement("div");n.className=i.toolboxButtonStyleClass.name+" "+(null!==(t=i.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==t?t:i.toolboxButtonStyleColorsClass.name),n.innerHTML=e.icon,n.title=e.title,n.addEventListener("click",(function(){i.panelButtonClick(e)})),i.panelButtons.push(n),i.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},e.prototype.panelButtonClick=function(e){var t=this,n=-1;if(e!==this.activePanel){n=this.panels.indexOf(e),this.panelRow.innerHTML="";var i=e.getUi();i.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(i),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=e}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===t.displayMode?t.panelRow.style.display="none":t.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(e,i){var r,o;e.className=t.toolboxButtonStyleClass.name+" "+(i===n?""+(null!==(r=t.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==r?r:t.toolboxActiveButtonStyleColorsClass.name):""+(null!==(o=t.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==o?o:t.toolboxButtonStyleColorsClass.name))}))},e}(),g=function(e,t){this.title=e,this.icon=t},y=function(e){function t(t,n,i,r){var o=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return o.colors=[],o.addTransparent=!1,o.colorBoxes=[],o.colors=n,o.currentColor=i,o.setCurrentColor=o.setCurrentColor.bind(o),o.getColorBox=o.getColorBox.bind(o),o}return r(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.whiteSpace="nowrap",this.colors.forEach((function(n){var i=e.getColorBox(n);t.appendChild(i),e.colorBoxes.push(i)})),t},t.prototype.getColorBox=function(e){var t=this,n=this.uiStyleSettings.toolbarHeight/4,i=this.uiStyleSettings.toolbarHeight-n,r=document.createElement("div");r.style.display="inline-block",r.style.boxSizing="content-box",r.style.width=i-2+"px",r.style.height=i-2+"px",r.style.padding="1px",r.style.marginRight="2px",r.style.marginBottom="2px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderRadius=(i+2)/2+"px",r.style.borderColor=e===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){t.setCurrentColor(e,r)}));var o=document.createElement("div");return o.style.display="inline-block",o.style.width=i-2+"px",o.style.height=i-2+"px",o.style.backgroundColor=e,o.style.borderRadius=i/2+"px","transparent"===e&&(o.style.fill=this.uiStyleSettings.toolboxAccentColor,o.innerHTML='<svg viewBox="0 0 24 24">\n <path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />\n </svg>'),r.appendChild(o),r},t.prototype.setCurrentColor=function(e,t){var n=this;this.currentColor=e,this.colorBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(e)},t}(g),x=function(){function e(e,t,n){this._state="new",this._isSelected=!1,this._container=e,this._overlayContainer=t,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(e.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!1},Object.defineProperty(e.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),e.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},e.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},e.prototype.pointerDown=function(e,t){},e.prototype.dblClick=function(e,t){},e.prototype.manipulate=function(e){},e.prototype.pointerUp=function(e){this.stateChanged()},e.prototype.dispose=function(){},e.prototype.addMarkerVisualToContainer=function(e){this.container.childNodes.length>0?this.container.insertBefore(e,this.container.childNodes[0]):this.container.appendChild(e)},e.prototype.getState=function(){return{typeName:e.typeName,state:this.state,notes:this.notes}},e.prototype.restoreState=function(e){this._state=e.state,this.notes=e.notes},e.prototype.scale=function(e,t){},e.prototype.colorChanged=function(e){this.onColorChanged&&this.onColorChanged(e),this.stateChanged()},e.prototype.fillColorChanged=function(e){this.onFillColorChanged&&this.onFillColorChanged(e),this.stateChanged()},e.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var e=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),e.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(e)&&this.onStateChanged(this)}},e.typeName="MarkerBase",e}(),b=function(){function e(){this.findGripByVisual=this.findGripByVisual.bind(this)}return e.prototype.findGripByVisual=function(e){return this.topLeft.ownsTarget(e)?this.topLeft:this.topCenter.ownsTarget(e)?this.topCenter:this.topRight.ownsTarget(e)?this.topRight:this.centerLeft.ownsTarget(e)?this.centerLeft:this.centerRight.ownsTarget(e)?this.centerRight:this.bottomLeft.ownsTarget(e)?this.bottomLeft:this.bottomCenter.ownsTarget(e)?this.bottomCenter:this.bottomRight.ownsTarget(e)?this.bottomRight:void 0},e}(),w=function(){function e(){this.GRIP_SIZE=10,this.visual=s.createGroup(),this.visual.appendChild(s.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(s.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return e.prototype.ownsTarget=function(e){return e===this.visual||e===this.visual.childNodes[0]||e===this.visual.childNodes[1]},e}(),C=function(){function e(){}return e.toITransformMatrix=function(e){return{a:e.a,b:e.b,c:e.c,d:e.d,e:e.e,f:e.f}},e.toSVGMatrix=function(e,t){return e.a=t.a,e.b=t.b,e.c=t.c,e.d=t.d,e.e=t.e,e.f=t.f,e},e}(),k=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.left=0,r.top=0,r.width=0,r.height=0,r.defaultSize={x:50,y:20},r.offsetX=0,r.offsetY=0,r.rotationAngle=0,r.CB_DISTANCE=10,r._suppressMarkerCreateEvent=!1,r.container.transform.baseVal.appendItem(s.createTransform()),r.setupControlBox(),r}return r(t,e),Object.defineProperty(t.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"visual",{get:function(){return this._visual},set:function(e){this._visual=e;var t=s.createTransform();this._visual.transform.baseVal.appendItem(t)},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!!(void 0!==this.controlGrips.findGripByVisual(t)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.left=t.x,this.top=t.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var i=this.unrotatePoint(t);if(this.manipulationStartX=i.x,this.manipulationStartY=i.y,this.offsetX=i.x-this.left,this.offsetY=i.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var r=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=r.x-this.width/2,this.top=r.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var o=this.container.transform.baseVal.getItem(0);o.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(o,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},t.prototype.moveVisual=function(e){this.visual.style.transform="translate("+e.x+"px, "+e.y+"px)"},t.prototype.manipulate=function(e){var t=this.unrotatePoint(e);"creating"===this.state?this.resize(e):"move"===this.state?(this.left=this.manipulationStartLeft+(t.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(t.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(t):"rotate"===this.state&&this.rotate(e)},t.prototype.resize=function(e){var t=this.manipulationStartLeft,n=this.manipulationStartWidth,i=this.manipulationStartTop,r=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:t=this.manipulationStartLeft+e.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-t;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+e.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:i=this.manipulationStartTop+e.y-this.manipulationStartY,r=this.manipulationStartHeight+this.manipulationStartTop-i;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:r=this.manipulationStartHeight+e.y-this.manipulationStartY}n>=0?(this.left=t,this.width=n):(this.left=t+n,this.width=-n),r>=0?(this.top=i,this.height=r):(this.top=i+r,this.height=-r),this.setSize()},t.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},t.prototype.rotate=function(e){if(Math.abs(e.x-this.centerX)>.1){var t=Math.sign(e.x-this.centerX);this.rotationAngle=180*Math.atan((e.y-this.centerY)/(e.x-this.centerX))/Math.PI+90*t,this.applyRotation()}},t.prototype.applyRotation=function(){var e=this.container.transform.baseVal.getItem(0);e.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(e,0)},t.prototype.rotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM(),n=s.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.unrotatePoint=function(e){if(0===this.rotationAngle)return e;var t=this.container.getCTM();t=t.inverse();var n=s.createPoint(e.x,e.y);return{x:(n=n.matrixTransform(t)).x,y:n.y}},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=s.createGroup();var e=s.createTransform();e.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(e),this.container.appendChild(this.controlBox),this.controlRect=s.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=s.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new b,this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){var e=this.controlBox.transform.baseVal.getItem(0);e.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(e,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},t.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},t.prototype.createGrip=function(){var e=new w;return e.visual.transform.baseVal.appendItem(s.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.controlGrips.topLeft.GRIP_SIZE,t=-e/2,n=t,i=(this.width+this.CB_DISTANCE)/2-e/2,r=(this.height+this.CB_DISTANCE)/2-e/2,o=this.height+this.CB_DISTANCE-e/2,a=this.width+this.CB_DISTANCE-e/2;this.positionGrip(this.controlGrips.topLeft.visual,t,n),this.positionGrip(this.controlGrips.topCenter.visual,i,n),this.positionGrip(this.controlGrips.topRight.visual,a,n),this.positionGrip(this.controlGrips.centerLeft.visual,t,r),this.positionGrip(this.controlGrips.centerRight.visual,a,r),this.positionGrip(this.controlGrips.bottomLeft.visual,t,o),this.positionGrip(this.controlGrips.bottomCenter.visual,i,o),this.positionGrip(this.controlGrips.bottomRight.visual,a,o),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,i,n-3*this.CB_DISTANCE)},t.prototype.positionGrip=function(e,t,n){var i=e.transform.baseVal.getItem(0);i.setTranslate(t,n),e.transform.baseVal.replaceItem(i,0)},t.prototype.hideControlBox=function(){this.controlBox.style.display="none"},t.prototype.showControlBox=function(){this.controlBox.style.display=""},t.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:C.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:C.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(C.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(C.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n);var i=this.rotatePoint({x:this.left,y:this.top}),r=this.unrotatePoint({x:i.x*t,y:i.y*n});this.left=r.x,this.top=r.y,this.width=this.width*t,this.height=this.height*n,this.adjustControlBox()},t}(x),S=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.opacity=1,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.createVisual=r.createVisual.bind(r),r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=s.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),s.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&s.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&s.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&s.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&s.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.title="Rectangle marker",t}(k),_=function(e){function t(t,n,i,r){var o=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return o.widths=[],o.widthBoxes=[],o.widths=n,o.currentWidth=i,o.setCurrentWidth=o.setCurrentWidth.bind(o),o}return r(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.widths.forEach((function(n){var i=document.createElement("div");i.style.display="flex",i.style.flexGrow="2",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=n===e.currentWidth?e.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){e.setCurrentWidth(n,i)})),t.appendChild(i);var r=document.createElement("div");r.innerText=n.toString(),r.style.marginRight="5px",i.appendChild(r);var o=document.createElement("div");o.style.minHeight="20px",o.style.flexGrow="2",o.style.display="flex",o.style.alignItems="center";var a=document.createElement("hr");a.style.minWidth="20px",a.style.border="0px",a.style.borderTop=n+"px solid "+e.uiStyleSettings.toolboxColor,a.style.flexGrow="2",o.appendChild(a),i.appendChild(o),e.widthBoxes.push(i)})),t},t.prototype.setCurrentWidth=function(e,t){var n=this;this.currentWidth=e,this.widthBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},t}(g),j=function(e){function t(t,n,i,r){var o=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return o.styles=[],o.styleBoxes=[],o.styles=n,o.currentStyle=i,o.setCurrentStyle=o.setCurrentStyle.bind(o),o}return r(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",this.styles.forEach((function(n){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/e.styles.length-5+"%",i.style.borderColor=n===e.currentStyle?e.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){e.setCurrentStyle(n,i)})),t.appendChild(i);var r=document.createElement("div");r.style.minHeight="20px",r.style.flexGrow="2",r.style.overflow="hidden";var o='<svg width="100" height="20">\n <line x1="0" y1="10" x2="100" y2="10" stroke="'+e.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(""!==n?'stroke-dasharray="'+n+'"':"")+" />\n </svg>";r.innerHTML=o,i.appendChild(r),e.styleBoxes.push(i)})),t},t.prototype.setCurrentStyle=function(e,t){var n=this;this.currentStyle=e,this.styleBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},t}(g),N=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new y("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new _("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new j("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return r(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="FrameMarker",t.title="Frame marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',t}(S),E=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},A=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.x1=0,r.y1=0,r.x2=0,r.y2=0,r.defaultLength=50,r.manipulationStartX=0,r.manipulationStartY=0,r.manipulationStartX1=0,r.manipulationStartY1=0,r.manipulationStartX2=0,r.manipulationStartY2=0,r.setupControlBox(),r}return r(t,e),t.prototype.ownsTarget=function(t){return!!e.prototype.ownsTarget.call(this,t)||!(!this.grip1.ownsTarget(t)&&!this.grip2.ownsTarget(t))},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartX=t.x,this.manipulationStartY=t.y,"new"===this.state&&(this.x1=t.x,this.y1=t.y,this.x2=t.x,this.y2=t.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},t.prototype.pointerUp=function(t){var n=this.state;e.prototype.pointerUp.call(this,t),"creating"===this.state&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(t),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},t.prototype.adjustVisual=function(){},t.prototype.manipulate=function(e){"creating"===this.state?this.resize(e):"move"===this.state?(this.x1=this.manipulationStartX1+e.x-this.manipulationStartX,this.y1=this.manipulationStartY1+e.y-this.manipulationStartY,this.x2=this.manipulationStartX2+e.x-this.manipulationStartX,this.y2=this.manipulationStartY2+e.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(e)},t.prototype.resize=function(e){switch(this.activeGrip){case this.grip1:this.x1=e.x,this.y1=e.y;break;case this.grip2:case void 0:this.x2=e.x,this.y2=e.y}this.adjustVisual(),this.adjustControlBox()},t.prototype.select=function(){e.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},t.prototype.deselect=function(){e.prototype.deselect.call(this),this.controlBox.style.display="none"},t.prototype.setupControlBox=function(){this.controlBox=s.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},t.prototype.adjustControlBox=function(){this.positionGrips()},t.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},t.prototype.createGrip=function(){var e=new w;return e.visual.transform.baseVal.appendItem(s.createTransform()),this.controlBox.appendChild(e.visual),e},t.prototype.positionGrips=function(){var e=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-e/2,this.y1-e/2),this.positionGrip(this.grip2.visual,this.x2-e/2,this.y2-e/2)},t.prototype.positionGrip=function(e,t,n){var i=e.transform.baseVal.getItem(0);i.setTranslate(t,n),e.transform.baseVal.replaceItem(i,0)},t.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},e.prototype.getState.call(this))},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.x1=this.x1*t,this.y1=this.y1*n,this.x2=this.x2*t,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},t}(x),Z=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.setStrokeColor=r.setStrokeColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new y("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new _("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new j("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorLine&&t!==this.visibleLine)},t.prototype.createVisual=function(){this.visual=s.createGroup(),this.selectorLine=s.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=s.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},t.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),s.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),s.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),s.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},t.typeName="LineMarker",t.title="Line marker",t.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',t}(A),I=function(e){function t(t,n,i,r){var o=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return o.fonts=[],o.fontBoxes=[],o.fonts=n,o.currentFont=i,o.setCurrentFont=o.setCurrentFont.bind(o),o}return r(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.overflow="hidden",t.style.flexGrow="2",this.fonts.forEach((function(n){var i=document.createElement("div");i.style.display="inline-block",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/e.fonts.length-5+"%",i.style.borderColor=n===e.currentFont?e.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){e.setCurrentFont(n,i)})),t.appendChild(i);var r=document.createElement("div");r.style.display="flex",r.style.minHeight="20px",r.style.flexGrow="2",r.style.fontFamily=n,r.style.overflow="hidden";var o=document.createElement("div");o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.innerHTML="The quick brown fox jumps over the lazy dog",r.appendChild(o),i.appendChild(r),e.fontBoxes.push(i)})),t},t.prototype.setCurrentFont=function(e,t){var n=this;this.currentFont=e,this.fontBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},t}(g),D=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.color="transparent",r.padding=5,r.DEFAULT_TEXT="请输入文本",r.text=r.DEFAULT_TEXT,r.isMoved=!1,r.color=i.defaultColor,r.fontFamily=i.defaultFontFamily,r.defaultSize={x:100,y:30},r.setColor=r.setColor.bind(r),r.setFont=r.setFont.bind(r),r.renderText=r.renderText.bind(r),r.sizeText=r.sizeText.bind(r),r.textEditDivClicked=r.textEditDivClicked.bind(r),r.showTextEditor=r.showTextEditor.bind(r),r.setSize=r.setSize.bind(r),r.positionTextEditor=r.positionTextEditor.bind(r),r.colorPanel=new y("Color",i.defaultColorSet,i.defaultColor),r.colorPanel.onColorChanged=r.setColor,r.fontFamilyPanel=new I("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r}return r(t,e),t.prototype.ownsTarget=function(t){if(e.prototype.ownsTarget.call(this,t)||t===this.visual||t===this.textElement||t===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(e){e===t&&(n=!0)})),n},t.prototype.createVisual=function(){this.visual=s.createGroup(),this.bgRectangle=s.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=s.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(s.createTransform()),this.textElement.transform.baseVal.appendItem(s.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.renderText=function(){var e=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(t){e.textElement.appendChild(s.createTSpan(""===t.trim()?" ":t.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},t.prototype.getTextScale=function(){var e=this.textElement.getBBox(),t=1;if(e.width>0&&e.height>0){var n=(1*this.width-this.width*this.padding*2/100)/e.width,i=(1*this.height-this.height*this.padding*2/100)/e.height;t=Math.min(n,i)}return t},t.prototype.getTextPosition=function(e){var t=this.textElement.getBBox(),n=0,i=0;return t.width>0&&t.height>0&&(n=(this.width-t.width*e)/2,i=this.height/2-t.height*e/2),{x:n,y:i}},t.prototype.sizeText=function(){var e=this.textElement.getBBox(),t=this.getTextScale(),n=this.getTextPosition(t);n.y-=e.y*t,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+t+", "+t+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(t,t))},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.isMoved=!0,this.setSize(),this.sizeText()},t.prototype.setSize=function(){e.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(s.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),s.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},t.prototype.pointerUp=function(t){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),e.prototype.pointerUp.call(this,t),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.showTextEditor=function(){var e=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(e){e.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var t=Number.parseFloat(e.textEditor.style.fontSize);e.textEditor.clientWidth>=Number.parseInt(e.textEditor.style.maxWidth)&&t>.9;)t-=.1,e.textEditor.style.fontSize=Math.max(t,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(e){if(e.clipboardData){var t=e.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(t)),e.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){e.textEditDivClicked(e.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},t.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var e=this.getTextScale(),t=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),i={x:n.width*e,y:n.height*e};t.x-=i.x/2,t.y-=i.y/2,this.textEditor.style.top=t.y+"px",this.textEditor.style.left=t.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-t.x+"px",this.textEditor.style.fontSize=Math.max(16*e,12)+"px",this.textElement.style.display="none"}},t.prototype.textEditDivClicked=function(e){this.text=e.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},t.prototype.select=function(){e.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},t.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),e.prototype.deselect.call(this)},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setColor=function(e){this.textElement&&s.setAttributes(this.textElement,[["fill",e]]),this.color=e,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(e)},t.prototype.setFont=function(e){this.textElement&&s.setAttributes(this.textElement,[["font-family",e]]),this.fontFamily=e,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},t.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},t.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize(),this.sizeText(),this.positionTextEditor()},t.typeName="TextMarker",t.title="Text marker",t.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',t}(k),T=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.color="transparent",r.lineWidth=3,r.drawing=!1,r.pixelRatio=1,r.color=i.defaultColor,r.lineWidth=i.defaultStrokeWidth,r.pixelRatio=i.freehandPixelRatio,r.setColor=r.setColor.bind(r),r.addCanvas=r.addCanvas.bind(r),r.finishCreation=r.finishCreation.bind(r),r.setLineWidth=r.setLineWidth.bind(r),r.colorPanel=new y("Color",i.defaultColorSet,i.defaultColor),r.colorPanel.onColorChanged=r.setColor,r.lineWidthPanel=new _("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.lineWidthPanel.onWidthChanged=r.setLineWidth,r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.drawingImage)},t.prototype.createVisual=function(){this.visual=s.createGroup(),this.drawingImage=s.createImage(),this.visual.appendChild(this.drawingImage);var e=s.createTransform();this.visual.transform.baseVal.appendItem(e),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(t.x,t.y),this.drawing=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.manipulate=function(t){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(t.x,t.y),this.canvasContext.stroke()):e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),s.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),s.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},t.prototype.pointerUp=function(t){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):e.prototype.pointerUp.call(this,t)},t.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},t.prototype.select=function(){"creating"===this.state&&this.finishCreation(),e.prototype.select.call(this)},t.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),e.prototype.deselect.call(this)},t.prototype.finishCreation=function(){for(var e=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),t=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=t[0],i=t[1],r=t[2],o=t[3],a=!1,l=0;l<this.canvasElement.height;l++)for(var s=0;s<this.canvasElement.width;s++)e.data[l*this.canvasElement.width*4+4*s+3]>0&&(a=!0,l<i&&(i=l),s<n&&(n=s),l>o&&(o=l),s>r&&(r=s));if(a){this.left=n/this.pixelRatio,this.top=i/this.pixelRatio,this.width=(r-n)/this.pixelRatio,this.height=(o-i)/this.pixelRatio;var c=document.createElement("canvas");c.width=r-n,c.height=o-i,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,i,r-n,o-i),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},t.prototype.setDrawingImage=function(){s.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),s.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},t.prototype.setColor=function(e){this.color=e,this.colorChanged(e)},t.prototype.setLineWidth=function(e){this.lineWidth=e},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){this.createVisual(),e.prototype.restoreState.call(this,t),this.drawingImgUrl=t.drawingImgUrl,this.setDrawingImage()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setDrawingImage()},t.typeName="FreehandMarker",t.title="Freehand marker",t.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',t}(k),P=function(e){function t(t,n,i){var r=e.call(this,t,i||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return r.typeBoxes=[],r.currentType=n,r.setCurrentType=r.setCurrentType.bind(r),r}return r(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2";for(var n=function(n){var r="both";switch(n){case 0:r="both";break;case 1:r="start";break;case 2:r="end";break;case 3:r="none"}var o=document.createElement("div");if(o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=r===i.currentType?i.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){e.setCurrentType(r,o)})),t.appendChild(o),"both"===r||"start"===r){var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,5 10,0 10,10" fill="'+(void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',a.style.marginLeft="5px",o.appendChild(a)}var l=document.createElement("div");l.style.display="flex",l.style.alignItems="center",l.style.minHeight="20px",l.style.flexGrow="2";var s=document.createElement("hr");if(s.style.minWidth="20px",s.style.border="0px",s.style.borderTop="3px solid "+(void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee"),s.style.flexGrow="2",l.appendChild(s),o.appendChild(l),"both"===r||"end"===r){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">\n <polygon points="0,0 10,5 0,10" fill="'+(void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee")+'" />\n </svg>',c.style.marginRight="5px",o.appendChild(c)}i.typeBoxes.push(o)},i=this,r=0;r<4;r++)n(r);return t},t.prototype.setCurrentType=function(e,t){var n=this;this.currentType=e,this.typeBoxes.forEach((function(e){e.style.borderColor=e===t?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},t}(g),M=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.arrowType="end",r.arrowBaseHeight=10,r.arrowBaseWidth=10,r.getArrowPoints=r.getArrowPoints.bind(r),r.setArrowType=r.setArrowType.bind(r),r.arrowTypePanel=new P("Arrow type","end"),r.arrowTypePanel.onArrowTypeChanged=r.setArrowType,r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.arrow1&&t!==this.arrow2)},t.prototype.getArrowPoints=function(e,t){var n=this.arrowBaseWidth+2*this.strokeWidth,i=this.arrowBaseHeight+2*this.strokeWidth;return e-n/2+","+(t+i/2)+" "+e+","+(t-i/2)+" "+(e+n/2)+","+(t+i/2)},t.prototype.createTips=function(){this.arrow1=s.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(s.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=s.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(s.createTransform()),this.visual.appendChild(this.arrow2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",s.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),s.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var t=0;Math.abs(this.x1-this.x2)>.1&&(t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var i=this.arrow2.transform.baseVal.getItem(0);i.setRotate(t+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(i,0)}},t.prototype.setArrowType=function(e){this.arrowType=e,this.adjustVisual(),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},t.typeName="ArrowMarker",t.title="Arrow marker",t.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',t}(Z),L=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.fillColor=i.defaultFillColor,r.strokeWidth=0,r.fillPanel=new y("Color",i.defaultColorSet,i.defaultFillColor),r.fillPanel.onColorChanged=r.setFillColor,r}return r(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="CoverMarker",t.title="Cover marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',t}(S),B=function(e){function t(t,n,i,r){var o=e.call(this,t,r||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return o.opacities=[],o.opacityBoxes=[],o.opacities=n,o.currentOpacity=i,o.setCurrentOpacity=o.setCurrentOpacity.bind(o),o}return r(t,e),t.prototype.getUi=function(){var e=this,t=document.createElement("div");return t.style.display="flex",t.style.overflow="hidden",t.style.flexGrow="2",t.style.justifyContent="space-between",this.opacities.forEach((function(n){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=n===e.currentOpacity?e.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){e.setCurrentOpacity(n,i)})),t.appendChild(i);var r=document.createElement("div");r.innerText=100*n+"%",i.appendChild(r),e.opacityBoxes.push(i)})),t},t.prototype.setCurrentOpacity=function(e,t){var n=this;this.currentOpacity=e,this.opacityBoxes.forEach((function(e){e.style.borderColor=e===t?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},t}(g),R=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.setOpacity=r.setOpacity.bind(r),r.fillColor=i.defaultHighlightColor,r.strokeWidth=0,r.opacity=i.defaultHighlightOpacity,r.fillPanel=new y("Color",i.defaultColorSet,r.fillColor),r.fillPanel.onColorChanged=r.setFillColor,r.opacityPanel=new B("Opacity",i.defaultOpacitySteps,r.opacity),r.opacityPanel.onOpacityChanged=r.setOpacity,r}return r(t,e),t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&s.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="HighlightMarker",t.title="Highlight marker",t.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',t}(L),O='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',F='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',W=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.bgColor="transparent",r.tipPosition={x:0,y:0},r.tipBase1Position={x:0,y:0},r.tipBase2Position={x:0,y:0},r.tipMoving=!1,r.color=i.defaultStrokeColor,r.bgColor=i.defaultFillColor,r.fontFamily=i.defaultFontFamily,r.defaultSize={x:100,y:30},r.setBgColor=r.setBgColor.bind(r),r.getTipPoints=r.getTipPoints.bind(r),r.positionTip=r.positionTip.bind(r),r.setTipPoints=r.setTipPoints.bind(r),r.colorPanel=new y("Text color",i.defaultColorSet,r.color,O),r.colorPanel.onColorChanged=r.setColor,r.bgColorPanel=new y("Fill color",i.defaultColorSet,r.bgColor,F),r.bgColorPanel.onColorChanged=r.setBgColor,r.fontFamilyPanel=new I("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r.tipGrip=new w,r.tipGrip.visual.transform.baseVal.appendItem(s.createTransform()),r.controlBox.appendChild(r.tipGrip.visual),r}return r(t,e),t.prototype.ownsTarget=function(t){return e.prototype.ownsTarget.call(this,t)||this.tipGrip.ownsTarget(t)||this.tip===t},t.prototype.createTip=function(){s.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=s.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},t.prototype.pointerDown=function(t,n){"new"===this.state&&e.prototype.pointerDown.call(this,t,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):e.prototype.pointerDown.call(this,t,n)},t.prototype.pointerUp=function(t){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,e.prototype.pointerUp.call(this,t);else{var n="creating"===this.state;e.prototype.pointerUp.call(this,t),this.setTipPoints(n),this.positionTip()}},t.prototype.manipulate=function(t){if(this.tipMoving){var n=this.unrotatePoint(t);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else e.prototype.manipulate.call(this,t)},t.prototype.setBgColor=function(e){this.bgRectangle&&this.tip&&(s.setAttributes(this.bgRectangle,[["fill",e]]),s.setAttributes(this.tip,[["fill",e]])),this.bgColor=e,this.fillColorChanged(e)},t.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},t.prototype.setTipPoints=function(e){void 0===e&&(e=!1);var t=Math.min(this.height/2,15),n=this.height/5;e&&(this.tipPosition={x:t+n/2,y:this.height+20});var i=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:t,y:0},this.tipBase2Position={x:t+n,y:0}):(this.tipBase1Position={x:0,y:t},this.tipBase2Position={x:0,y:t+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?i<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-t-n,y:0},this.tipBase2Position={x:this.width-t,y:0}):(this.tipBase1Position={x:this.width,y:t},this.tipBase2Position={x:this.width,y:t+n}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?i<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-t-n,y:this.height},this.tipBase2Position={x:this.width-t,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-t-n},this.tipBase2Position={x:this.width,y:this.height-t}):i<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(n=this.width/5,t=Math.min(this.width/2,15),this.tipBase1Position={x:t,y:this.height},this.tipBase2Position={x:t+n,y:this.height}):(this.tipBase1Position={x:0,y:this.height-t},this.tipBase2Position={x:0,y:this.height-t-n})},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.positionTip()},t.prototype.positionTip=function(){s.setAttributes(this.tip,[["points",this.getTipPoints()]]);var e=this.tipGrip.visual.transform.baseVal.getItem(0);e.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(e,0)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.positionTip(),e.prototype.select.call(this)},t.prototype.getState=function(){var n=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.bgColor=n.bgColor,this.tipPosition=n.tipPosition,e.prototype.restoreState.call(this,t),this.createTip(),this.setTipPoints()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.tipPosition={x:this.tipPosition.x*t,y:this.tipPosition.y*n},this.positionTip()},t.typeName="CalloutMarker",t.title="Callout marker",t.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',t}(D),H=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.opacity=1,r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.fillColor=i.defaultFillColor,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.setOpacity=r.setOpacity.bind(r),r.createVisual=r.createVisual.bind(r),r.strokePanel=new y("Line color",l(i.defaultColorSet,["transparent"]),i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.fillPanel=new y("Fill color",l(i.defaultColorSet,["transparent"]),r.fillColor,F),r.fillPanel.onColorChanged=r.setFillColor,r.strokeWidthPanel=new _("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new j("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r.opacityPanel=new B("Opacity",i.defaultOpacitySteps,r.opacity),r.opacityPanel.onOpacityChanged=r.setOpacity,r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual)},t.prototype.createVisual=function(){this.visual=s.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.setSize=function(){e.prototype.setSize.call(this),s.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.visual&&s.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.visual&&s.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(e),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.visual&&s.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.visual&&s.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},t.prototype.setOpacity=function(e){this.opacity=e,this.visual&&s.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.typeName="EllipseMarker",t.title="Ellipse marker",t.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',t}(k),z=function(e){function t(t,n,i){return e.call(this,t,n,i)||this}return r(t,e),Object.defineProperty(t.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.tip1&&t!==this.tip2)},t.prototype.createTips=function(){this.tip1=s.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(s.createTransform()),this.visual.appendChild(this.tip1),this.tip2=s.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(s.createTransform()),this.visual.appendChild(this.tip2)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),"creating"===this.state&&this.createTips()},t.prototype.adjustVisual=function(){if(e.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(s.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),s.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var t=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(t,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var i=this.tip2.transform.baseVal.getItem(0);i.setRotate(t+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(i,0)}},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t),this.createTips(),this.adjustVisual()},t.typeName="MeasurementMarker",t.title="Measurement marker",t.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',t}(Z),G=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.strokePanel.colors=i.defaultColorSet,r.fillColor="transparent",r}return r(t,e),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=e.prototype.getState.call(this);return n.typeName=t.typeName,n},t.typeName="EllipseFrameMarker",t.title="Ellipse frame marker",t.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',t}(H),V=function(){function e(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),e.prototype.addUndoStep=function(e){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(e)||(this.undoStack.push(e),JSON.stringify(this.lastRedoStep)!==JSON.stringify(e)&&this.redoStack.splice(0,this.redoStack.length))},e.prototype.replaceLastUndoStep=function(e){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=e)},e.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},e.prototype.undo=function(){if(this.undoStack.length>1){var e=this.undoStack.pop();return void 0!==e&&this.redoStack.push(e),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},e.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},e}(),K=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.curveX=0,r.curveY=0,r.manipulationStartCurveX=0,r.manipulationStartCurveY=0,r.setStrokeColor=r.setStrokeColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.positionGrips=r.positionGrips.bind(r),r.addControlGrips=r.addControlGrips.bind(r),r.adjustVisual=r.adjustVisual.bind(r),r.setupControlBox=r.setupControlBox.bind(r),r.resize=r.resize.bind(r),r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new y("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new _("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new j("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.selectorCurve&&t!==this.visibleCurve&&!this.curveGrip.ownsTarget(t))},t.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},t.prototype.createVisual=function(){this.visual=s.createGroup(),this.selectorCurve=s.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=s.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=t.x,this.curveY=t.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},t.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),s.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),s.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),s.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},t.prototype.setupControlBox=function(){e.prototype.setupControlBox.call(this),this.curveControlLine1=s.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=s.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},t.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,e.prototype.addControlGrips.call(this)},t.prototype.positionGrips=function(){e.prototype.positionGrips.call(this);var t=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-t/2,this.curveY-t/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},t.prototype.manipulate=function(t){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+t.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+t.y-this.manipulationStartY),e.prototype.manipulate.call(this,t)},t.prototype.resize=function(t){this.activeGrip===this.curveGrip&&(this.curveX=t.x,this.curveY=t.y),e.prototype.resize.call(this,t),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.adjustVisual(),this.colorChanged(e)},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.adjustVisual()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.adjustVisual()},t.prototype.scale=function(t,n){this.curveX=this.curveX*t,this.curveY=this.curveY*n,e.prototype.scale.call(this,t,n)},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},e.prototype.getState.call(this));return n.typeName=t.typeName,n},t.prototype.restoreState=function(t){e.prototype.restoreState.call(this,t);var n=t;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},t.typeName="CurveMarker",t.title="Curve marker",t.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',t}(A),U=function(e){function t(t,n,i){var r=e.call(this,t,n,i)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.textColor="transparent",r.fontSize="1rem",r.isMoved=!1,r.captionText="Caption",r.PADDING=5,r.captionBoxWidth=0,r.captionBoxHeight=0,r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.fillColor=i.defaultFillColor,r.textColor=i.defaultStrokeColor,r.fontFamily=i.defaultFontFamily,r.fontSize=i.defaultCaptionFontSize,r.captionText=i.defaultCaptionText,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.createVisual=r.createVisual.bind(r),r.sizeCaption=r.sizeCaption.bind(r),r.setCaptionText=r.setCaptionText.bind(r),r.showTextEditor=r.showTextEditor.bind(r),r.positionTextEditor=r.positionTextEditor.bind(r),r.finishTextEditing=r.finishTextEditing.bind(r),r.setFont=r.setFont.bind(r),r.setTextColor=r.setTextColor.bind(r),r.strokePanel=new y("Line color",l(i.defaultColorSet,["transparent"]),r.strokeColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.fillPanel=new y("Fill color",l(i.defaultColorSet,["transparent"]),r.fillColor,F),r.fillPanel.onColorChanged=r.setFillColor,r.strokeWidthPanel=new _("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new j("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r.fontFamilyPanel=new I("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r.textColorPanel=new y("Text color",i.defaultColorSet,r.textColor,O),r.textColorPanel.onColorChanged=r.setTextColor,r}return r(t,e),t.prototype.ownsTarget=function(t){return!(!e.prototype.ownsTarget.call(this,t)&&t!==this.visual&&t!==this.frame&&t!==this.captionBg&&t!==this.captionElement)},t.prototype.createVisual=function(){this.visual=s.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=s.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=s.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=s.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},t.prototype.setCaptionText=function(e){this.captionText=e,this.captionElement.textContent=this.captionText,this.sizeCaption()},t.prototype.pointerDown=function(t,n){e.prototype.pointerDown.call(this,t,n),this.isMoved=!1,this.pointerDownPoint=t,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(t),this._state="creating")},t.prototype.manipulate=function(t){e.prototype.manipulate.call(this,t),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(t.x-this.pointerDownPoint.x)>5||Math.abs(t.y-this.pointerDownPoint.y)>5)},t.prototype.resize=function(t){e.prototype.resize.call(this,t),this.setSize()},t.prototype.sizeCaption=function(){var e=this.captionElement.getBBox();""!==this.captionText.trim()?(this.captionBoxWidth=e.width+2*this.PADDING,this.captionBoxHeight=e.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),s.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),s.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},t.prototype.showTextEditor=function(){var e=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",(function(e){e.stopPropagation()})),this.textEditBox.addEventListener("keypress",(function(t){"Enter"===t.key&&e.finishTextEditing(e.textEditBox.value)})),this.textEditBox.addEventListener("keyup",(function(e){e.cancelBubble=!0})),this.textEditBox.addEventListener("blur",(function(){e.finishTextEditing(e.textEditBox.value)})),this.textEditDiv.addEventListener("pointerup",(function(){e.finishTextEditing(e.textEditBox.value)})),this.positionTextEditor(),this.textEditBox.focus()},t.prototype.positionTextEditor=function(){"edit"===this.state&&(void 0===this.textEditBox?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},t.prototype.finishTextEditing=function(e){this.setCaptionText(e.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},t.prototype.setFont=function(e){this.captionElement&&s.setAttributes(this.captionElement,[["font-family",e]]),this.fontFamily=e,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},t.prototype.setTextColor=function(e){this.captionElement&&s.setAttributes(this.captionElement,[["fill",e]]),this.textColor=e,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},t.prototype.setSize=function(){e.prototype.setSize.call(this),s.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},t.prototype.pointerUp=function(t){e.prototype.pointerUp.call(this,t),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},t.prototype.dblClick=function(t,n){e.prototype.dblClick.call(this,t,n),this.showTextEditor()},t.prototype.setStrokeColor=function(e){this.strokeColor=e,this.frame&&s.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(e),this.stateChanged()},t.prototype.setFillColor=function(e){this.fillColor=e,this.captionBg&&s.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(e),this.stateChanged()},t.prototype.setStrokeWidth=function(e){this.strokeWidth=e,this.frame&&s.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},t.prototype.setStrokeDasharray=function(e){this.strokeDasharray=e,this.frame&&s.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),t.prototype.getState=function(){var t=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},e.prototype.getState.call(this));return t.typeName=this.typeName,t},t.prototype.restoreState=function(t){var n=t;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.textColor=n.textColor,this.fontFamily=n.fontFamily,this.captionText=n.captionText,this.fontSize=n.fontSize,this.createVisual(),e.prototype.restoreState.call(this,t),this.setSize()},t.prototype.scale=function(t,n){e.prototype.scale.call(this,t,n),this.setSize()},t.typeName="CaptionFrameMarker",t.title="Caption frame marker",t.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',t}(k),q=function(){function e(e,t){void 0===t&&(t=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=e,this.cancelable=t}return Object.defineProperty(e.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),e.prototype.preventDefault=function(){this._defaultPrevented=!0},e}(),Y=function(e){function t(t,n,i){var r=e.call(this,t,!1)||this;return r.dataUrl=n,r.state=i,r}return r(t,e),t}(q),X=function(e){function t(t,n,i){void 0===i&&(i=!1);var r=e.call(this,t,i)||this;return r.marker=n,r}return r(t,e),t}(q),J=function(){function e(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return e.prototype.addEventListener=function(e,t){this[e].push(t)},e.prototype.removeEventListener=function(e,t){var n=this[e].indexOf(t);n>-1&&this[e].splice(n,1)},e}(),Q=function(){function e(t){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new E,this._isOpen=!1,this.undoRedoManager=new V,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new J,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=e.instanceCounter++,this.styles=new h(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=t,this.targetRoot=document.body,this.width=t.clientWidth,this.height=t.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(e.prototype,"ALL_MARKER_TYPES",{get:function(){return[N,T,M,D,G,H,R,W,z,L,Z,K,U]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[N,T,M,D,H,R,W]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"BASIC_MARKER_TYPES",{get:function(){return[N,T,M,D,R]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(e){var t=this;this._availableMarkerTypes.splice(0),e.forEach((function(e){if("string"==typeof e){var n=t.ALL_MARKER_TYPES.find((function(t){return t.typeName===e}));void 0!==n&&t._availableMarkerTypes.push(n)}else t._availableMarkerTypes.push(e)}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(e){this._zoomLevel=e,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),e.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),c.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},e.prototype.show=function(){var e=this;void 0===this.styles.styleSheetRoot&&void 0!==d.styleSheetRoot&&(this.styles.styleSheetRoot=d.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(t){return t(new q(e))}))},e.prototype.render=function(){return o(this,void 0,void 0,(function(){var e;return a(this,(function(t){switch(t.label){case 0:return this.setCurrentMarker(),(e=new u).naturalSize=this.renderAtNaturalSize,e.imageType=this.renderImageType,e.imageQuality=this.renderImageQuality,e.markersOnly=this.renderMarkersOnly,e.width=this.renderWidth,e.height=this.renderHeight,[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return t.sent(),[4,e.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,t.sent()]}}))}))},e.prototype.close=function(e){var t=this;if(void 0===e&&(e=!1),this.isOpen){var n=!1;e||this.eventListeners.beforeclose.forEach((function(e){var i=new q(t,!0);e(i),i.defaultPrevented&&(n=!0)})),n||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(e){return e(new q(t))})),this.detachEvents(),this._isOpen=!1)}},e.prototype.addMarkersToToolbar=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];(e=this._availableMarkerTypes).push.apply(e,t)},e.prototype.addRenderEventListener=function(e){this.addEventListener("render",(function(t){e(t.dataUrl,t.state)}))},e.prototype.removeRenderEventListener=function(e){},e.prototype.addCloseEventListener=function(e){this.addEventListener("close",(function(){e()}))},e.prototype.removeCloseEventListener=function(e){},e.prototype.setupResizeObserver=function(){var e=this;"inline"===this.settings.displayMode?window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){e.resize(e.target.clientWidth,e.target.clientHeight)})),this.targetObserver.observe(this.target)):"popup"===this.settings.displayMode&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver((function(){return e.onPopupTargetResize()})),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},e.prototype.onPopupTargetResize=function(){var e=1*this.target.clientWidth/this.target.clientHeight,t=this.editorCanvas.clientWidth/e>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*e:this.editorCanvas.clientWidth,n=t<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/e;this.resize(t,n)},e.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},e.prototype.resize=function(e,t){this._isResizing=!0;var n=e/this.imageWidth,i=t/this.imageHeight;this.imageWidth=Math.round(e),this.imageHeight=Math.round(t),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px","popup"!==this.settings.displayMode?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),void 0!==this.toolbar&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(n,i),this._isResizing=!1},e.prototype.scaleMarkers=function(e,t){var n,i=this;this._currentMarker&&this._currentMarker instanceof D?this._currentMarker.scale(e,t):(n=this._currentMarker,this.setCurrentMarker()),this.markers.forEach((function(n){n!==i._currentMarker&&n.scale(e,t)})),void 0!==n&&this.setCurrentMarker(n)},e.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},e.prototype.setTopLeft=function(){var e=this.editingTarget.getBoundingClientRect(),t=this.editorCanvas.getBoundingClientRect();this.left=e.left-t.left,this.top=e.top-t.top},e.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},e.prototype.addDefs=function(){for(var e,t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];this.defs=s.createDefs(),this.addDefsToImage(),(e=this.defs).append.apply(e,t)},e.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},e.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},e.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},e.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},e.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},e.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},e.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},e.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var e=document.createElement("a");e.href="https://markerjs.com/",e.target="_blank",e.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',e.title="Powered by marker.js",e.style.display="grid",e.style.alignItems="center",e.style.justifyItems="center",e.style.padding="3px",e.style.width="20px",e.style.height="20px",this.logoUI.appendChild(e),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},e.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},e.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},e.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},e.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var e=void 0!==this.settings.uiOffsetTop?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new m(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1","popup"===this.settings.displayMode&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex","popup"===this.settings.displayMode&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),void 0===this.settings.uiOffsetTop&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new v(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},e.prototype.closeUI=function(){"popup"===this.settings.displayMode&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},e.prototype.removeMarker=function(e){this.markerImage.removeChild(e.container),this.markers.indexOf(e)>-1&&this.markers.splice(this.markers.indexOf(e),1),e.dispose()},e.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},e.prototype.toolbarButtonClicked=function(e,t){if("marker"===e&&void 0!==t)this.createNewMarker(t);else if("action"===e)switch(t){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},e.prototype.deleteSelectedMarker=function(){var e=this;if(void 0!==this._currentMarker){var t=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var i=new X(e,e._currentMarker,!0);n(i),i.defaultPrevented&&(t=!0)})),!t){var n=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(t){return t(new X(e,n))}))}}},e.prototype.clear=function(){var e=this,t=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var i=new X(e,void 0,!0);n(i),i.defaultPrevented&&(t=!0)})),!t)){this.setCurrentMarker();for(var n=function(t){var n=i.markers[t];i.setCurrentMarker(i.markers[t]),i._currentMarker.dispose(),i.markerImage.removeChild(i._currentMarker.container),i.markers.splice(i.markers.indexOf(i._currentMarker),1),i.eventListeners.markerdelete.forEach((function(t){return t(new X(e,n))}))},i=this,r=this.markers.length-1;r>=0;r--)n(r);this.addUndoStep()}},Object.defineProperty(e.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),e.prototype.showNotesEditor=function(){var e;void 0!==this._currentMarker&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=null!==(e=this._currentMarker.notes)&&void 0!==e?e:"",this.overlayContainer.appendChild(this.notesArea))},e.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},e.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},e.prototype.addUndoStep=function(){var e=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var t=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===t.width&&n.height===t.height){var i=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(t),i<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach((function(t){return t(new q(e))}))}else this.undoRedoManager.replaceLastUndoStep(t),this.eventListeners.statechange.forEach((function(t){return t(new q(e))}))}},e.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},e.prototype.undoStep=function(){var e=this,t=this.undoRedoManager.undo();void 0!==t&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(t){return t(new q(e))})))},e.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},e.prototype.redoStep=function(){var e=this,t=this.undoRedoManager.redo();void 0!==t&&(this.restoreState(t),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach((function(t){return t(new q(e))})))},e.prototype.stepZoom=function(){var e=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=e<this.zoomSteps.length-1?this.zoomSteps[e+1]:this.zoomSteps[0]},e.prototype.panTo=function(e){this.contentDiv.scrollBy({left:this.prevPanPoint.x-e.x,top:this.prevPanPoint.y-e.y}),this.prevPanPoint=e},e.prototype.startRenderAndClose=function(){return o(this,void 0,void 0,(function(){var e,t,n=this;return a(this,(function(i){switch(i.label){case 0:return[4,this.render()];case 1:return e=i.sent(),t=this.getState(),this.eventListeners.render.forEach((function(i){return i(new Y(n,e,t))})),this.close(!0),[2]}}))}))},e.prototype.getState=function(e){!0===e&&this.setCurrentMarker();var t={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach((function(e){return t.markers.push(e.getState())})),t},e.prototype.restoreState=function(e){var t=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);e.markers.forEach((function(e){var n=t._availableMarkerTypes.find((function(t){return t.typeName===e.typeName}));if(void 0!==n){var i=t.addNewMarker(n);i.restoreState(e),t.markers.push(i)}})),e.width&&e.height&&(e.width!==this.imageWidth||e.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/e.width,this.imageHeight/e.height),this.eventListeners.restorestate.forEach((function(e){return e(new q(t))}))},e.prototype.addNewMarker=function(e){var t=s.createGroup();return this.markerImage.appendChild(t),new e(t,this.overlayContainer,this.settings)},e.prototype.createNewMarker=function(e){var t,n=this;(t="string"==typeof e?this._availableMarkerTypes.find((function(t){return t.typeName===e})):e)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(t),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(t.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach((function(e){return e(new X(n,n._currentMarker))})))},e.prototype.markerCreated=function(e){var t=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(e),this.setCurrentMarker(e),e instanceof T&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(T):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach((function(e){return e(new X(t,t._currentMarker))}))},e.prototype.colorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=e,this.settings.defaultStrokeColor=e)},e.prototype.fillColorChanged=function(e){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=e)},e.prototype.markerStateChanged=function(e){var t=this;this.eventListeners.markerchange.forEach((function(n){return n(new X(t,e))}))},e.prototype.setCurrentMarker=function(e){var t=this;this._currentMarker!==e&&void 0!==this._currentMarker&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach((function(e){return e(new X(t,t._currentMarker))}))),this._currentMarker=e,void 0===this._currentMarker||this._currentMarker.isSelected||("new"!==this._currentMarker.state&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach((function(e){return e(new X(t,t._currentMarker))})))},e.prototype.onPointerDown=function(e){if(this._isFocused||this.focus(),this.touchPoints++,1===this.touchPoints||"touch"!==e.pointerType)if(void 0===this._currentMarker||"new"!==this._currentMarker.state&&"creating"!==this._currentMarker.state){if("select"===this.mode){var t=this.markers.find((function(t){return t.ownsTarget(e.target)}));void 0!==t?(this.setCurrentMarker(t),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:e.clientX,y:e.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(e.clientX,e.clientY))},e.prototype.onDblClick=function(e){if(this._isFocused||this.focus(),"select"===this.mode){var t=this.markers.find((function(t){return t.ownsTarget(e.target)}));void 0!==t&&t!==this._currentMarker&&this.setCurrentMarker(t),void 0!==this._currentMarker?this._currentMarker.dblClick(this.clientToLocalCoordinates(e.clientX,e.clientY),e.target):this.setCurrentMarker()}},e.prototype.onPointerMove=function(e){1!==this.touchPoints&&"touch"===e.pointerType||(void 0!==this._currentMarker||this.isDragging)&&(void 0!==this._currentMarker&&"edit"===this._currentMarker.state||e.preventDefault(),void 0!==this._currentMarker?this._currentMarker.manipulate(this.clientToLocalCoordinates(e.clientX,e.clientY)):this.zoomLevel>1&&this.panTo({x:e.clientX,y:e.clientY}))},e.prototype.onPointerUp=function(e){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(e.clientX,e.clientY)),this.isDragging=!1,this.addUndoStep()},e.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},e.prototype.onKeyUp=function(e){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==e.key&&"Backspace"!==e.key||this.deleteSelectedMarker()},e.prototype.clientToLocalCoordinates=function(e,t){var n=this.markerImage.getBoundingClientRect();return{x:(e-n.left)/this.zoomLevel,y:(t-n.top)/this.zoomLevel}},e.prototype.onWindowResize=function(){this.positionUI()},e.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var e=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=e+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},e.prototype.addLicenseKey=function(e){c.addKey(e)},e.prototype.addEventListener=function(e,t){this.eventListeners.addEventListener(e,t)},e.prototype.removeEventListener=function(e,t){this.eventListeners.removeEventListener(e,t)},e.prototype.renderState=function(e){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(e),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(e.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),e.prototype.focus=function(){var e=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(t){return t(new q(e))})))},e.prototype.blur=function(){var e=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(t){return t(new q(e))})))},e.instanceCounter=0,e}()},63727:function(e,t,n){"use strict";n.d(t,{s:function(){return Q},default:function(){return te}});var i=n(54476),r=n(33885),o=n(94480),a=n(42978),l=n(75931),s=n(37463),c=n(6551),u=n(6089),d=n(18929),h=n(59301),p=h.createContext({}),f=n(76190),m=n(20068),v="__rc_cascader_search_mark__",g=function(e,t,n){var i=n.label,r=void 0===i?"":i;return t.some((function(t){return String(t[r]).toLowerCase().includes(e.toLowerCase())}))},y=function(e,t,n,i){return t.map((function(e){return e[i.label]})).join(" / ")},x=function(e,t,n,i,a,l){var s=a.filter,c=void 0===s?g:s,u=a.render,d=void 0===u?y:u,p=a.limit,f=void 0===p?50:p,x=a.sort;return h.useMemo((function(){var a=[];if(!e)return[];return function t(s,u){var h=arguments.length>2&&void 0!==arguments[2]&&arguments[2];s.forEach((function(s){if(!(!x&&!1!==f&&f>0&&a.length>=f)){var p,g=[].concat((0,o.Z)(u),[s]),y=s[n.children],b=h||s.disabled;if(!y||0===y.length||l)if(c(e,g,{label:n.label}))a.push((0,r.Z)((0,r.Z)({},s),{},(p={disabled:b},(0,m.Z)(p,n.label,d(e,g,i,n)),(0,m.Z)(p,v,g),(0,m.Z)(p,n.children,void 0),p)));y&&t(s[n.children],g,b)}}))}(t,[]),x&&a.sort((function(t,i){return x(t[v],i[v],e,n)})),!1!==f&&f>0?a.slice(0,f):a}),[e,t,n,i,d,l,c,x,f])},b="__RC_CASCADER_SPLIT__",w="SHOW_PARENT",C="SHOW_CHILD";function k(e){return e.join(b)}function S(e){return e.map(k)}function _(e){var t=e||{},n=t.label,i=t.value||"value";return{label:n||"label",value:i,key:i,children:t.children||"children"}}function j(e,t){var n,i;return null!==(n=e.isLeaf)&&void 0!==n?n:!(null!==(i=e[t.children])&&void 0!==i&&i.length)}function N(e){var t=e.parentElement;if(t){var n=e.offsetTop-t.offsetTop;n-t.scrollTop<0?t.scrollTo({top:n}):n+e.offsetHeight-t.scrollTop>t.offsetHeight&&t.scrollTo({top:n+e.offsetHeight-t.offsetHeight})}}function E(e,t){return e.map((function(e){var n;return null===(n=e[v])||void 0===n?void 0:n.map((function(e){return e[t.value]}))}))}function A(e){return e?function(e){return Array.isArray(e)&&Array.isArray(e[0])}(e)?e:(0===e.length?[]:[e]).map((function(e){return Array.isArray(e)?e:[e]})):[]}function Z(e,t,n){var i=new Set(e),r=t();return e.filter((function(e){var t=r[e],o=t?t.parent:null,a=t?t.children:null;return!(!t||!t.node.disabled)||(n===C?!(a&&a.some((function(e){return e.key&&i.has(e.key)}))):!(o&&!o.node.disabled&&i.has(o.key)))}))}function I(e,t,n){for(var i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],r=t,o=[],a=function(){var t,a,s,c=e[l],u=null===(t=r)||void 0===t?void 0:t.findIndex((function(e){var t=e[n.value];return i?String(t)===String(c):t===c})),d=-1!==u?null===(a=r)||void 0===a?void 0:a[u]:null;o.push({value:null!==(s=null==d?void 0:d[n.value])&&void 0!==s?s:c,index:u,option:d}),r=null==d?void 0:d[n.children]},l=0;l<e.length;l+=1)a();return o}function D(e,t){return h.useCallback((function(n){var i=[],r=[];return n.forEach((function(n){I(n,e,t).every((function(e){return e.option}))?r.push(n):i.push(n)})),[r,i]}),[e,t])}var T=n(34061);function P(e,t){var n=h.useMemo((function(){return t||[]}),[t]),i=function(e,t){var n=h.useRef({options:[],info:{keyEntities:{},pathKeyEntities:{}}});return h.useCallback((function(){return n.current.options!==e&&(n.current.options=e,n.current.info=(0,T.I8)(e,{fieldNames:t,initWrapper:function(e){return(0,r.Z)((0,r.Z)({},e),{},{pathKeyEntities:{}})},processEntity:function(e,n){var i=e.nodes.map((function(e){return e[t.value]})).join(b);n.pathKeyEntities[i]=e,e.key=i}})),n.current.info.pathKeyEntities}),[t,e])}(n,e),o=h.useCallback((function(t){var n=i();return t.map((function(t){return n[t].nodes.map((function(t){return t[e.value]}))}))}),[i,e]);return[n,i,o]}n(48736);var M=n(34643);function L(e,t,n,i,r,a,l,s){return function(c){if(e){var u=k(c),d=S(n),h=S(i),p=d.includes(u),f=r.some((function(e){return k(e)===u})),m=n,v=r;if(f&&!p)v=r.filter((function(e){return k(e)!==u}));else{var g,y=p?d.filter((function(e){return e!==u})):[].concat((0,o.Z)(d),[u]),x=a();if(p)g=(0,M.S)(y,{checked:!1,halfCheckedKeys:h},x).checkedKeys;else g=(0,M.S)(y,!0,x).checkedKeys;var b=Z(g,a,s);m=l(b)}t([].concat((0,o.Z)(v),(0,o.Z)(m)))}else t(c)}}function B(e,t,n,i,r){return h.useMemo((function(){var o=r(t),l=(0,a.Z)(o,2),s=l[0],c=l[1];if(!e||!t.length)return[s,[],c];var u=S(s),d=n(),h=(0,M.S)(u,!0,d),p=h.checkedKeys,f=h.halfCheckedKeys;return[i(p),i(f),c]}),[e,t,n,i,r])}var R=n(92310),O=n.n(R);var F=h.memo((function(e){return e.children}),(function(e,t){return!t.open}));function W(e){var t,n=e.prefixCls,i=e.checked,r=e.halfChecked,o=e.disabled,a=e.onClick,l=e.disableCheckbox,s=h.useContext(p).checkable,c="boolean"!=typeof s?s:null;return h.createElement("span",{className:O()("".concat(n),(t={},(0,m.Z)(t,"".concat(n,"-checked"),i),(0,m.Z)(t,"".concat(n,"-indeterminate"),!i&&r),(0,m.Z)(t,"".concat(n,"-disabled"),o||l),t)),onClick:a},c)}var H="__cascader_fix_label__";function z(e){var t=e.prefixCls,n=e.multiple,i=e.options,r=e.activeValue,a=e.prevValuePath,l=e.onToggleOpen,s=e.onSelect,c=e.onActive,u=e.checkedSet,d=e.halfCheckedSet,f=e.loadingKeys,g=e.isSelectable,y=e.disabled,x="".concat(t,"-menu"),b="".concat(t,"-menu-item"),w=h.useContext(p),C=w.fieldNames,S=w.changeOnSelect,_=w.expandTrigger,N=w.expandIcon,E=w.loadingIcon,A=w.dropdownMenuColumnStyle,Z=w.optionRender,I="hover"===_,D=function(e){return y||e},T=h.useMemo((function(){return i.map((function(e){var t,n=e.disabled,i=e.disableCheckbox,r=e[v],l=null!==(t=e[H])&&void 0!==t?t:e[C.label],s=e[C.value],c=j(e,C),h=r?r.map((function(e){return e[C.value]})):[].concat((0,o.Z)(a),[s]),p=k(h);return{disabled:n,label:l,value:s,isLeaf:c,isLoading:f.includes(p),checked:u.has(p),halfChecked:d.has(p),option:e,disableCheckbox:i,fullPath:h,fullPathKey:p}}))}),[i,u,C,d,f,a]);return h.createElement("ul",{className:x,role:"menu"},T.map((function(e){var i,a,u=e.disabled,d=e.label,p=e.value,f=e.isLeaf,v=e.isLoading,y=e.checked,x=e.halfChecked,w=e.option,C=e.fullPath,k=e.fullPathKey,_=e.disableCheckbox,j=function(){if(!D(u)){var e=(0,o.Z)(C);I&&f&&e.pop(),c(e)}},T=function(){g(w)&&!D(u)&&s(C,f)};return"string"==typeof w.title?a=w.title:"string"==typeof d&&(a=d),h.createElement("li",{key:k,className:O()(b,(i={},(0,m.Z)(i,"".concat(b,"-expand"),!f),(0,m.Z)(i,"".concat(b,"-active"),r===p||r===k),(0,m.Z)(i,"".concat(b,"-disabled"),D(u)),(0,m.Z)(i,"".concat(b,"-loading"),v),i)),style:A,role:"menuitemcheckbox",title:a,"aria-checked":y,"data-path-key":k,onClick:function(){j(),_||n&&!f||T()},onDoubleClick:function(){S&&l(!1)},onMouseEnter:function(){I&&j()},onMouseDown:function(e){e.preventDefault()}},n&&h.createElement(W,{prefixCls:"".concat(t,"-checkbox"),checked:y,halfChecked:x,disabled:D(u)||_,disableCheckbox:_,onClick:function(e){_||(e.stopPropagation(),T())}}),h.createElement("div",{className:"".concat(b,"-content")},Z?Z(w):d),!v&&N&&!f&&h.createElement("div",{className:"".concat(b,"-expand-icon")},N),v&&E&&h.createElement("div",{className:"".concat(b,"-loading-icon")},E))})))}var G=function(e,t){var n=h.useContext(p).values[0],i=h.useState([]),r=(0,a.Z)(i,2),o=r[0],l=r[1];return h.useEffect((function(){e||l(n||[])}),[t,n]),[o,l]},V=n(10228),K=function(e,t,n,i,r,l,s){var c=s.direction,u=s.searchValue,d=s.toggleOpen,p=s.open,f="rtl"===c,m=h.useMemo((function(){for(var e=-1,r=t,o=[],a=[],l=i.length,s=E(t,n),c=function(t){var l=r.findIndex((function(e,r){return(s[r]?k(s[r]):e[n.value])===i[t]}));if(-1===l)return 1;e=l,o.push(e),a.push(i[t]),r=r[e][n.children]},u=0;u<l&&r&&!c(u);u+=1);for(var d=t,h=0;h<o.length-1;h+=1)d=d[o[h]][n.children];return[a,e,d,s]}),[i,n,t]),g=(0,a.Z)(m,4),y=g[0],x=g[1],b=g[2],w=g[3],C=function(e){r(e)},S=function(){if(y.length>1){var e=y.slice(0,-1);C(e)}else d(!1)},_=function(){var e,t=((null===(e=b[x])||void 0===e?void 0:e[n.children])||[]).find((function(e){return!e.disabled}));if(t){var i=[].concat((0,o.Z)(y),[t[n.value]]);C(i)}};h.useImperativeHandle(e,(function(){return{onKeyDown:function(e){var t=e.which;switch(t){case V.Z.UP:case V.Z.DOWN:var i=0;t===V.Z.UP?i=-1:t===V.Z.DOWN&&(i=1),0!==i&&function(e){var t=b.length,i=x;-1===i&&e<0&&(i=t);for(var r=0;r<t;r+=1){var o=b[i=(i+e+t)%t];if(o&&!o.disabled){var a=y.slice(0,-1).concat(w[i]?k(w[i]):o[n.value]);return void C(a)}}}(i);break;case V.Z.LEFT:if(u)break;f?_():S();break;case V.Z.RIGHT:if(u)break;f?S():_();break;case V.Z.BACKSPACE:u||S();break;case V.Z.ENTER:if(y.length){var r=b[x],o=(null==r?void 0:r[v])||[];o.length?l(o.map((function(e){return e[n.value]})),o[o.length-1]):l(y,b[x])}break;case V.Z.ESC:d(!1),p&&e.stopPropagation()}},onKeyUp:function(){}}}))},U=h.forwardRef((function(e,t){var n,l,s,c=e.prefixCls,u=e.multiple,d=e.searchValue,f=e.toggleOpen,v=e.notFoundContent,g=e.direction,y=e.open,x=e.disabled,w=h.useRef(null),C="rtl"===g,_=h.useContext(p),A=_.options,Z=_.values,D=_.halfValues,T=_.fieldNames,P=_.changeOnSelect,M=_.onSelect,L=_.searchOptions,B=_.dropdownPrefixCls,R=_.loadData,W=_.expandTrigger,V=B||c,U=h.useState([]),q=(0,a.Z)(U,2),Y=q[0],X=q[1];h.useEffect((function(){Y.length&&Y.forEach((function(e){var t=I(e.split(b),A,T,!0).map((function(e){return e.option})),n=t[t.length-1];(!n||n[T.children]||j(n,T))&&X((function(t){return t.filter((function(t){return t!==e}))}))}))}),[A,Y,T]);var J=h.useMemo((function(){return new Set(S(Z))}),[Z]),Q=h.useMemo((function(){return new Set(S(D))}),[D]),$=G(u,y),ee=(0,a.Z)($,2),te=ee[0],ne=ee[1],ie=function(e){ne(e),function(e){if(R&&!d){var t=I(e,A,T).map((function(e){return e.option})),n=t[t.length-1];if(n&&!j(n,T)){var i=k(e);X((function(e){return[].concat((0,o.Z)(e),[i])})),R(t)}}}(e)},re=function(e){if(x)return!1;var t=e.disabled,n=j(e,T);return!t&&(n||P||u)},oe=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];M(e),!u&&(t||P&&("hover"===W||n))&&f(!1)},ae=h.useMemo((function(){return d?L:A}),[d,L,A]),le=h.useMemo((function(){for(var e=[{options:ae}],t=ae,n=E(t,T),i=function(){var i=te[r],o=t.find((function(e,t){return(n[t]?k(n[t]):e[T.value])===i})),a=null==o?void 0:o[T.children];if(null==a||!a.length)return 1;t=a,e.push({options:a})},r=0;r<te.length&&!i();r+=1);return e}),[ae,te,T]);K(t,ae,T,te,ie,(function(e,t){re(t)&&oe(e,j(t,T),!0)}),{direction:g,searchValue:d,toggleOpen:f,open:y}),h.useEffect((function(){if(!d)for(var e=0;e<te.length;e+=1){var t,n=k(te.slice(0,e+1)),i=null===(t=w.current)||void 0===t?void 0:t.querySelector('li[data-path-key="'.concat(n.replace(/\\{0,2}"/g,'\\"'),'"]'));i&&N(i)}}),[te,d]);var se=!(null!==(n=le[0])&&void 0!==n&&null!==(n=n.options)&&void 0!==n&&n.length),ce=[(l={},(0,m.Z)(l,T.value,"__EMPTY__"),(0,m.Z)(l,H,v),(0,m.Z)(l,"disabled",!0),l)],ue=(0,r.Z)((0,r.Z)({},e),{},{multiple:!se&&u,onSelect:oe,onActive:ie,onToggleOpen:f,checkedSet:J,halfCheckedSet:Q,loadingKeys:Y,isSelectable:re}),de=(se?[{options:ce}]:le).map((function(e,t){var n=te.slice(0,t),r=te[t];return h.createElement(z,(0,i.Z)({key:t},ue,{prefixCls:V,options:e.options,prevValuePath:n,activeValue:r}))}));return h.createElement(F,{open:y},h.createElement("div",{className:O()("".concat(V,"-menus"),(s={},(0,m.Z)(s,"".concat(V,"-menu-empty"),se),(0,m.Z)(s,"".concat(V,"-rtl"),C),s)),ref:w},de))}));var q=U,Y=h.forwardRef((function(e,t){var n=(0,s.lk)();return h.createElement(q,(0,i.Z)({},e,n,{ref:t}))})),X=n(70425);function J(){}function Q(e){var t,n=e,i=n.prefixCls,r=void 0===i?"rc-cascader":i,o=n.style,l=n.className,s=n.options,c=n.checkable,u=n.defaultValue,d=n.value,f=n.fieldNames,v=n.changeOnSelect,g=n.onChange,y=n.showCheckedStrategy,x=n.loadData,b=n.expandTrigger,w=n.expandIcon,C=void 0===w?">":w,k=n.loadingIcon,S=n.direction,j=n.notFoundContent,N=void 0===j?"Not Found":j,E=n.disabled,Z=!!c,T=(0,X.C8)(u,{value:d,postState:A}),M=(0,a.Z)(T,2),R=M[0],F=M[1],W=h.useMemo((function(){return _(f)}),[JSON.stringify(f)]),H=P(W,s),z=(0,a.Z)(H,3),G=z[0],V=z[1],K=z[2],U=D(G,W),Y=B(Z,R,V,K,U),Q=(0,a.Z)(Y,3),$=Q[0],ee=Q[1],te=Q[2],ne=(0,X.zX)((function(e){if(F(e),g){var t=A(e),n=t.map((function(e){return I(e,G,W).map((function(e){return e.option}))})),i=Z?t:t[0],r=Z?n:n[0];g(i,r)}})),ie=L(Z,ne,$,ee,te,V,K,y),re=(0,X.zX)((function(e){ie(e)})),oe=h.useMemo((function(){return{options:G,fieldNames:W,values:$,halfValues:ee,changeOnSelect:v,onSelect:re,checkable:c,searchOptions:[],dropdownPrefixCls:void 0,loadData:x,expandTrigger:b,expandIcon:C,loadingIcon:k,dropdownMenuColumnStyle:void 0}}),[G,W,$,ee,v,re,c,x,b,C,k]),ae="".concat(r,"-panel"),le=!G.length;return h.createElement(p.Provider,{value:oe},h.createElement("div",{className:O()(ae,(t={},(0,m.Z)(t,"".concat(ae,"-rtl"),"rtl"===S),(0,m.Z)(t,"".concat(ae,"-empty"),le),t),l),style:o},le?N:h.createElement(q,{prefixCls:r,searchValue:"",multiple:Z,toggleOpen:J,open:!0,direction:S,disabled:E})))}var $=["id","prefixCls","fieldNames","defaultValue","value","changeOnSelect","onChange","displayRender","checkable","autoClearSearchValue","searchValue","onSearch","showSearch","expandTrigger","options","dropdownPrefixCls","loadData","popupVisible","open","popupClassName","dropdownClassName","dropdownMenuColumnStyle","dropdownStyle","popupPlacement","placement","onDropdownVisibleChange","onPopupVisibleChange","expandIcon","loadingIcon","children","dropdownMatchSelectWidth","showCheckedStrategy","optionRender"],ee=h.forwardRef((function(e,t){var n=e.id,m=e.prefixCls,v=void 0===m?"rc-cascader":m,g=e.fieldNames,y=e.defaultValue,b=e.value,C=e.changeOnSelect,j=e.onChange,N=e.displayRender,E=e.checkable,T=e.autoClearSearchValue,M=void 0===T||T,R=e.searchValue,O=e.onSearch,F=e.showSearch,W=e.expandTrigger,H=e.options,z=e.dropdownPrefixCls,G=e.loadData,V=e.popupVisible,K=e.open,U=e.popupClassName,q=e.dropdownClassName,X=e.dropdownMenuColumnStyle,J=e.dropdownStyle,Q=e.popupPlacement,ee=e.placement,te=e.onDropdownVisibleChange,ne=e.onPopupVisibleChange,ie=e.expandIcon,re=void 0===ie?">":ie,oe=e.loadingIcon,ae=e.children,le=e.dropdownMatchSelectWidth,se=void 0!==le&&le,ce=e.showCheckedStrategy,ue=void 0===ce?w:ce,de=e.optionRender,he=(0,l.Z)(e,$),pe=(0,c.ZP)(n),fe=!!E,me=(0,d.Z)(y,{value:b,postState:A}),ve=(0,a.Z)(me,2),ge=ve[0],ye=ve[1],xe=h.useMemo((function(){return _(g)}),[JSON.stringify(g)]),be=P(xe,H),we=(0,a.Z)(be,3),Ce=we[0],ke=we[1],Se=we[2],_e=(0,d.Z)("",{value:R,postState:function(e){return e||""}}),je=(0,a.Z)(_e,2),Ne=je[0],Ee=je[1],Ae=function(e){return h.useMemo((function(){if(!e)return[!1,{}];var t={matchInputWidth:!0,limit:50};return e&&"object"===(0,f.Z)(e)&&(t=(0,r.Z)((0,r.Z)({},t),e)),t.limit<=0&&(t.limit=!1),[!0,t]}),[e])}(F),Ze=(0,a.Z)(Ae,2),Ie=Ze[0],De=Ze[1],Te=x(Ne,Ce,xe,z||v,De,C||fe),Pe=D(Ce,xe),Me=B(fe,ge,ke,Se,Pe),Le=(0,a.Z)(Me,3),Be=Le[0],Re=Le[1],Oe=Le[2],Fe=function(e,t,n,i,r){return h.useMemo((function(){var a=r||function(e){var t=i?e.slice(-1):e;return t.every((function(e){return["string","number"].includes((0,f.Z)(e))}))?t.join(" / "):t.reduce((function(e,t,n){var i=h.isValidElement(t)?h.cloneElement(t,{key:n}):t;return 0===n?[i]:[].concat((0,o.Z)(e),[" / ",i])}),[])};return e.map((function(e){var i,r=I(e,t,n),o=a(r.map((function(e){var t,i=e.option,r=e.value;return null!==(t=null==i?void 0:i[n.label])&&void 0!==t?t:r})),r.map((function(e){return e.option}))),l=k(e);return{label:o,value:l,key:l,valueCells:e,disabled:null===(i=r[r.length-1])||void 0===i||null===(i=i.option)||void 0===i?void 0:i.disabled}}))}),[e,t,n,r,i])}(h.useMemo((function(){var e=Z(S(Be),ke,ue);return[].concat((0,o.Z)(Oe),(0,o.Z)(Se(e)))}),[Be,ke,Se,Oe,ue]),Ce,xe,fe,N),We=(0,u.Z)((function(e){if(ye(e),j){var t=A(e),n=t.map((function(e){return I(e,Ce,xe).map((function(e){return e.option}))})),i=fe?t:t[0],r=fe?n:n[0];j(i,r)}})),He=L(fe,We,Be,Re,Oe,ke,Se,ue),ze=(0,u.Z)((function(e){fe&&!M||Ee(""),He(e)})),Ge=void 0!==K?K:V,Ve=q||U,Ke=ee||Q;var Ue=h.useMemo((function(){return{options:Ce,fieldNames:xe,values:Be,halfValues:Re,changeOnSelect:C,onSelect:ze,checkable:E,searchOptions:Te,dropdownPrefixCls:z,loadData:G,expandTrigger:W,expandIcon:re,loadingIcon:oe,dropdownMenuColumnStyle:X,optionRender:de}}),[Ce,xe,Be,Re,C,ze,E,Te,z,G,W,re,oe,X,de]),qe=!(Ne?Te:Ce).length,Ye=Ne&&De.matchInputWidth||qe?{}:{minWidth:"auto"};return h.createElement(p.Provider,{value:Ue},h.createElement(s.Ac,(0,i.Z)({},he,{ref:t,id:pe,prefixCls:v,autoClearSearchValue:M,dropdownMatchSelectWidth:se,dropdownStyle:(0,r.Z)((0,r.Z)({},Ye),J),displayValues:Fe,onDisplayValuesChange:function(e,t){if("clear"!==t.type){var n=t.values[0].valueCells;ze(n)}else We([])},mode:fe?"multiple":void 0,searchValue:Ne,onSearch:function(e,t){Ee(e),"blur"!==t.source&&O&&O(e)},showSearch:Ie,OptionList:Y,emptyOptions:qe,open:Ge,dropdownClassName:Ve,placement:Ke,onDropdownVisibleChange:function(e){null==te||te(e),null==ne||ne(e)},getRawInputElement:function(){return ae}})))}));ee.SHOW_PARENT=w,ee.SHOW_CHILD=C,ee.Panel=Q;var te=ee},98535:function(e,t,n){"use strict";n.r(t),n.d(t,{Panel:function(){return A},default:function(){return E}});var i=n(54476),r=n(94480),o=n(42978),a=n(76190),l=n(92310),s=n.n(l),c=n(18929),u=n(48736),d=n(59301),h=n(75931),p=n(11592),f=n(33885),m=n(20068),v=n(77900),g=n(10228),y=d.forwardRef((function(e,t){var n=e.prefixCls,i=e.forceRender,r=e.className,a=e.style,l=e.children,c=e.isActive,u=e.role,h=e.classNames,p=e.styles,f=d.useState(c||i),v=(0,o.Z)(f,2),g=v[0],y=v[1];return d.useEffect((function(){(i||c)&&y(!0)}),[i,c]),g?d.createElement("div",{ref:t,className:s()("".concat(n,"-content"),(0,m.Z)((0,m.Z)({},"".concat(n,"-content-active"),c),"".concat(n,"-content-inactive"),!c),r),style:a,role:u},d.createElement("div",{className:s()("".concat(n,"-content-box"),null==h?void 0:h.body),style:null==p?void 0:p.body},l)):null}));y.displayName="PanelContent";var x=y,b=["showArrow","headerClass","isActive","onItemClick","forceRender","className","classNames","styles","prefixCls","collapsible","accordion","panelKey","extra","header","expandIcon","openMotion","destroyInactivePanel","children"],w=d.forwardRef((function(e,t){var n=e.showArrow,r=void 0===n||n,o=e.headerClass,a=e.isActive,l=e.onItemClick,c=e.forceRender,u=e.className,p=e.classNames,y=void 0===p?{}:p,w=e.styles,C=void 0===w?{}:w,k=e.prefixCls,S=e.collapsible,_=e.accordion,j=e.panelKey,N=e.extra,E=e.header,A=e.expandIcon,Z=e.openMotion,I=e.destroyInactivePanel,D=e.children,T=(0,h.Z)(e,b),P="disabled"===S,M=null!=N&&"boolean"!=typeof N,L=(0,m.Z)((0,m.Z)((0,m.Z)({onClick:function(){null==l||l(j)},onKeyDown:function(e){"Enter"!==e.key&&e.keyCode!==g.Z.ENTER&&e.which!==g.Z.ENTER||null==l||l(j)},role:_?"tab":"button"},"aria-expanded",a),"aria-disabled",P),"tabIndex",P?-1:0),B="function"==typeof A?A(e):d.createElement("i",{className:"arrow"}),R=B&&d.createElement("div",(0,i.Z)({className:"".concat(k,"-expand-icon")},["header","icon"].includes(S)?L:{}),B),O=s()("".concat(k,"-item"),(0,m.Z)((0,m.Z)({},"".concat(k,"-item-active"),a),"".concat(k,"-item-disabled"),P),u),F=s()(o,"".concat(k,"-header"),(0,m.Z)({},"".concat(k,"-collapsible-").concat(S),!!S),y.header),W=(0,f.Z)({className:F,style:C.header},["header","icon"].includes(S)?{}:L);return d.createElement("div",(0,i.Z)({},T,{ref:t,className:O}),d.createElement("div",W,r&&R,d.createElement("span",(0,i.Z)({className:"".concat(k,"-header-text")},"header"===S?L:{}),E),M&&d.createElement("div",{className:"".concat(k,"-extra")},N)),d.createElement(v.default,(0,i.Z)({visible:a,leavedClassName:"".concat(k,"-content-hidden")},Z,{forceRender:c,removeOnLeave:I}),(function(e,t){var n=e.className,i=e.style;return d.createElement(x,{ref:t,prefixCls:k,className:n,classNames:y,style:i,styles:C,isActive:a,forceRender:c,role:_?"tabpanel":void 0},D)})))})),C=["children","label","key","collapsible","onItemClick","destroyInactivePanel"];var k=function(e,t,n){return Array.isArray(e)?function(e,t){var n=t.prefixCls,r=t.accordion,o=t.collapsible,a=t.destroyInactivePanel,l=t.onItemClick,s=t.activeKey,c=t.openMotion,u=t.expandIcon;return e.map((function(e,t){var p=e.children,f=e.label,m=e.key,v=e.collapsible,g=e.onItemClick,y=e.destroyInactivePanel,x=(0,h.Z)(e,C),b=String(null!=m?m:t),k=null!=v?v:o,S=null!=y?y:a,_=!1;return _=r?s[0]===b:s.indexOf(b)>-1,d.createElement(w,(0,i.Z)({},x,{prefixCls:n,key:b,panelKey:b,isActive:_,accordion:r,openMotion:c,expandIcon:u,header:f,collapsible:k,onItemClick:function(e){"disabled"!==k&&(l(e),null==g||g(e))},destroyInactivePanel:S}),p)}))}(e,n):(0,p.Z)(t).map((function(e,t){return function(e,t,n){if(!e)return null;var i=n.prefixCls,r=n.accordion,o=n.collapsible,a=n.destroyInactivePanel,l=n.onItemClick,s=n.activeKey,c=n.openMotion,u=n.expandIcon,h=e.key||String(t),p=e.props,f=p.header,m=p.headerClass,v=p.destroyInactivePanel,g=p.collapsible,y=p.onItemClick,x=!1;x=r?s[0]===h:s.indexOf(h)>-1;var b=null!=g?g:o,w={key:h,panelKey:h,header:f,headerClass:m,isActive:x,prefixCls:i,destroyInactivePanel:null!=v?v:a,openMotion:c,accordion:r,children:e.props.children,onItemClick:function(e){"disabled"!==b&&(l(e),null==y||y(e))},expandIcon:u,collapsible:b};return"string"==typeof e.type?e:(Object.keys(w).forEach((function(e){void 0===w[e]&&delete w[e]})),d.cloneElement(e,w))}(e,t,n)}))},S=n(26112);function _(e){var t=e;if(!Array.isArray(t)){var n=(0,a.Z)(t);t="number"===n||"string"===n?[t]:[]}return t.map((function(e){return String(e)}))}var j=d.forwardRef((function(e,t){var n=e.prefixCls,a=void 0===n?"rc-collapse":n,l=e.destroyInactivePanel,h=void 0!==l&&l,p=e.style,f=e.accordion,m=e.className,v=e.children,g=e.collapsible,y=e.openMotion,x=e.expandIcon,b=e.activeKey,w=e.defaultActiveKey,C=e.onChange,j=e.items,N=s()(a,m),E=(0,c.Z)([],{value:b,onChange:function(e){return null==C?void 0:C(e)},defaultValue:w,postState:_}),A=(0,o.Z)(E,2),Z=A[0],I=A[1];(0,u.ZP)(!v,"[rc-collapse] `children` will be removed in next major version. Please use `items` instead.");var D=k(j,v,{prefixCls:a,accordion:f,openMotion:y,expandIcon:x,collapsible:g,destroyInactivePanel:h,onItemClick:function(e){return I((function(){return f?Z[0]===e?[]:[e]:Z.indexOf(e)>-1?Z.filter((function(t){return t!==e})):[].concat((0,r.Z)(Z),[e])}))},activeKey:Z});return d.createElement("div",(0,i.Z)({ref:t,className:N,style:p,role:f?"tablist":void 0},(0,S.Z)(e,{aria:!0,data:!0})),D)})),N=Object.assign(j,{Panel:w}),E=N,A=N.Panel},66042:function(e,t,n){"use strict";n.d(t,{Z:function(){return N}});var i=n(33885),r=n(42978),o=n(43403),a=n(34280),l=n(59301),s=l.createContext(null),c=l.createContext({}),u=s,d=n(20068),h=n(54476),p=n(92310),f=n.n(p),m=n(77900),v=n(10228),g=n(26112),y=n(75931),x=n(8654),b=["prefixCls","className","containerRef"];var w=function(e){var t=e.prefixCls,n=e.className,i=e.containerRef,r=(0,y.Z)(e,b),o=l.useContext(c).panel,a=(0,x.x1)(o,i);return l.createElement("div",(0,h.Z)({className:f()("".concat(t,"-content"),n),role:"dialog",ref:a},(0,g.Z)(e,{aria:!0}),{"aria-modal":"true"},r))},C=n(48736);function k(e){return"string"==typeof e&&String(Number(e))===e?((0,C.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(e)):e}var S={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function _(e,t){var n,o,a,s=e.prefixCls,c=e.open,p=e.placement,y=e.inline,x=e.push,b=e.forceRender,C=e.autoFocus,_=e.keyboard,j=e.classNames,N=e.rootClassName,E=e.rootStyle,A=e.zIndex,Z=e.className,I=e.id,D=e.style,T=e.motion,P=e.width,M=e.height,L=e.children,B=e.mask,R=e.maskClosable,O=e.maskMotion,F=e.maskClassName,W=e.maskStyle,H=e.afterOpenChange,z=e.onClose,G=e.onMouseEnter,V=e.onMouseOver,K=e.onMouseLeave,U=e.onClick,q=e.onKeyDown,Y=e.onKeyUp,X=e.styles,J=e.drawerRender,Q=l.useRef(),$=l.useRef(),ee=l.useRef();l.useImperativeHandle(t,(function(){return Q.current}));l.useEffect((function(){var e;c&&C&&(null===(e=Q.current)||void 0===e||e.focus({preventScroll:!0}))}),[c]);var te=l.useState(!1),ne=(0,r.Z)(te,2),ie=ne[0],re=ne[1],oe=l.useContext(u),ae=null!==(n=null!==(o=null===(a="boolean"==typeof x?x?{}:{distance:0}:x||{})||void 0===a?void 0:a.distance)&&void 0!==o?o:null==oe?void 0:oe.pushDistance)&&void 0!==n?n:180,le=l.useMemo((function(){return{pushDistance:ae,push:function(){re(!0)},pull:function(){re(!1)}}}),[ae]);l.useEffect((function(){var e,t;c?null==oe||null===(e=oe.push)||void 0===e||e.call(oe):null==oe||null===(t=oe.pull)||void 0===t||t.call(oe)}),[c]),l.useEffect((function(){return function(){var e;null==oe||null===(e=oe.pull)||void 0===e||e.call(oe)}}),[]);var se=B&&l.createElement(m.default,(0,h.Z)({key:"mask"},O,{visible:c}),(function(e,t){var n=e.className,r=e.style;return l.createElement("div",{className:f()("".concat(s,"-mask"),n,null==j?void 0:j.mask,F),style:(0,i.Z)((0,i.Z)((0,i.Z)({},r),W),null==X?void 0:X.mask),onClick:R&&c?z:void 0,ref:t})})),ce="function"==typeof T?T(p):T,ue={};if(ie&&ae)switch(p){case"top":ue.transform="translateY(".concat(ae,"px)");break;case"bottom":ue.transform="translateY(".concat(-ae,"px)");break;case"left":ue.transform="translateX(".concat(ae,"px)");break;default:ue.transform="translateX(".concat(-ae,"px)")}"left"===p||"right"===p?ue.width=k(P):ue.height=k(M);var de={onMouseEnter:G,onMouseOver:V,onMouseLeave:K,onClick:U,onKeyDown:q,onKeyUp:Y},he=l.createElement(m.default,(0,h.Z)({key:"panel"},ce,{visible:c,forceRender:b,onVisibleChanged:function(e){null==H||H(e)},removeOnLeave:!1,leavedClassName:"".concat(s,"-content-wrapper-hidden")}),(function(t,n){var r=t.className,o=t.style,a=l.createElement(w,(0,h.Z)({id:I,containerRef:n,prefixCls:s,className:f()(Z,null==j?void 0:j.content),style:(0,i.Z)((0,i.Z)({},D),null==X?void 0:X.content)},(0,g.Z)(e,{aria:!0}),de),L);return l.createElement("div",(0,h.Z)({className:f()("".concat(s,"-content-wrapper"),null==j?void 0:j.wrapper,r),style:(0,i.Z)((0,i.Z)((0,i.Z)({},ue),o),null==X?void 0:X.wrapper)},(0,g.Z)(e,{data:!0})),J?J(a):a)})),pe=(0,i.Z)({},E);return A&&(pe.zIndex=A),l.createElement(u.Provider,{value:le},l.createElement("div",{className:f()(s,"".concat(s,"-").concat(p),N,(0,d.Z)((0,d.Z)({},"".concat(s,"-open"),c),"".concat(s,"-inline"),y)),style:pe,tabIndex:-1,ref:Q,onKeyDown:function(e){var t=e.keyCode,n=e.shiftKey;switch(t){case v.Z.TAB:var i;if(t===v.Z.TAB)if(n||document.activeElement!==ee.current){if(n&&document.activeElement===$.current){var r;null===(r=ee.current)||void 0===r||r.focus({preventScroll:!0})}}else null===(i=$.current)||void 0===i||i.focus({preventScroll:!0});break;case v.Z.ESC:z&&_&&(e.stopPropagation(),z(e))}}},se,l.createElement("div",{tabIndex:0,ref:$,style:S,"aria-hidden":"true","data-sentinel":"start"}),he,l.createElement("div",{tabIndex:0,ref:ee,style:S,"aria-hidden":"true","data-sentinel":"end"})))}var j=l.forwardRef(_);var N=function(e){var t=e.open,n=void 0!==t&&t,s=e.prefixCls,u=void 0===s?"rc-drawer":s,d=e.placement,h=void 0===d?"right":d,p=e.autoFocus,f=void 0===p||p,m=e.keyboard,v=void 0===m||m,g=e.width,y=void 0===g?378:g,x=e.mask,b=void 0===x||x,w=e.maskClosable,C=void 0===w||w,k=e.getContainer,S=e.forceRender,_=e.afterOpenChange,N=e.destroyOnClose,E=e.onMouseEnter,A=e.onMouseOver,Z=e.onMouseLeave,I=e.onClick,D=e.onKeyDown,T=e.onKeyUp,P=e.panelRef,M=l.useState(!1),L=(0,r.Z)(M,2),B=L[0],R=L[1];var O=l.useState(!1),F=(0,r.Z)(O,2),W=F[0],H=F[1];(0,a.Z)((function(){H(!0)}),[]);var z=!!W&&n,G=l.useRef(),V=l.useRef();(0,a.Z)((function(){z&&(V.current=document.activeElement)}),[z]);var K=l.useMemo((function(){return{panel:P}}),[P]);if(!S&&!B&&!z&&N)return null;var U={onMouseEnter:E,onMouseOver:A,onMouseLeave:Z,onClick:I,onKeyDown:D,onKeyUp:T},q=(0,i.Z)((0,i.Z)({},e),{},{open:z,prefixCls:u,placement:h,autoFocus:f,keyboard:v,width:y,mask:b,maskClosable:C,inline:!1===k,afterOpenChange:function(e){var t,n;(R(e),null==_||_(e),e||!V.current||null!==(t=G.current)&&void 0!==t&&t.contains(V.current))||(null===(n=V.current)||void 0===n||n.focus({preventScroll:!0}))},ref:G},U);return l.createElement(c.Provider,{value:K},l.createElement(o.Z,{open:z||S||B,autoDestroy:!1,getContainer:k,autoLock:b&&(z||B)},l.createElement(j,q)))}},23425:function(e,t,n){"use strict";n.d(t,{Z:function(){return C}});var i=n(20068),r=n(54476),o=n(76190),a=n(33885),l=n(42978),s=n(92310),c=n.n(s),u=n(18929),d=n(10228),h=n(26112),p=(n(48736),n(59301)),f=n(17119),m=[10,20,50,100];var v=function(e){var t=e.pageSizeOptions,n=void 0===t?m:t,i=e.locale,r=e.changeSize,o=e.pageSize,a=e.goButton,s=e.quickGo,c=e.rootPrefixCls,u=e.disabled,h=e.buildOptionText,f=e.showSizeChanger,v=e.sizeChangerRender,g=p.useState(""),y=(0,l.Z)(g,2),x=y[0],b=y[1],w=function(){return!x||Number.isNaN(x)?void 0:Number(x)},C="function"==typeof h?h:function(e){return"".concat(e," ").concat(i.items_per_page)},k=function(e){""!==x&&(e.keyCode!==d.Z.ENTER&&"click"!==e.type||(b(""),null==s||s(w())))},S="".concat(c,"-options");if(!f&&!s)return null;var _=null,j=null,N=null;return f&&v&&(_=v({disabled:u,size:o,onSizeChange:function(e){null==r||r(Number(e))},"aria-label":i.page_size,className:"".concat(S,"-size-changer"),options:(n.some((function(e){return e.toString()===o.toString()}))?n:n.concat([o]).sort((function(e,t){return(Number.isNaN(Number(e))?0:Number(e))-(Number.isNaN(Number(t))?0:Number(t))}))).map((function(e){return{label:C(e),value:e}}))})),s&&(a&&(N="boolean"==typeof a?p.createElement("button",{type:"button",onClick:k,onKeyUp:k,disabled:u,className:"".concat(S,"-quick-jumper-button")},i.jump_to_confirm):p.createElement("span",{onClick:k,onKeyUp:k},a)),j=p.createElement("div",{className:"".concat(S,"-quick-jumper")},i.jump_to,p.createElement("input",{disabled:u,type:"text",value:x,onChange:function(e){b(e.target.value)},onKeyUp:k,onBlur:function(e){a||""===x||(b(""),e.relatedTarget&&(e.relatedTarget.className.indexOf("".concat(c,"-item-link"))>=0||e.relatedTarget.className.indexOf("".concat(c,"-item"))>=0)||null==s||s(w()))},"aria-label":i.page}),i.page,N)),p.createElement("li",{className:S},_,j)};var g=function(e){var t=e.rootPrefixCls,n=e.page,r=e.active,o=e.className,a=e.showTitle,l=e.onClick,s=e.onKeyPress,u=e.itemRender,d="".concat(t,"-item"),h=c()(d,"".concat(d,"-").concat(n),(0,i.Z)((0,i.Z)({},"".concat(d,"-active"),r),"".concat(d,"-disabled"),!n),o),f=u(n,"page",p.createElement("a",{rel:"nofollow"},n));return f?p.createElement("li",{title:a?String(n):null,className:h,onClick:function(){l(n)},onKeyDown:function(e){s(e,l,n)},tabIndex:0},f):null},y=function(e,t,n){return n};function x(){}function b(e){var t=Number(e);return"number"==typeof t&&!Number.isNaN(t)&&isFinite(t)&&Math.floor(t)===t}function w(e,t,n){var i=void 0===e?t:e;return Math.floor((n-1)/i)+1}var C=function(e){var t=e.prefixCls,n=void 0===t?"rc-pagination":t,s=e.selectPrefixCls,m=void 0===s?"rc-select":s,C=e.className,k=e.current,S=e.defaultCurrent,_=void 0===S?1:S,j=e.total,N=void 0===j?0:j,E=e.pageSize,A=e.defaultPageSize,Z=void 0===A?10:A,I=e.onChange,D=void 0===I?x:I,T=e.hideOnSinglePage,P=e.align,M=e.showPrevNextJumpers,L=void 0===M||M,B=e.showQuickJumper,R=e.showLessItems,O=e.showTitle,F=void 0===O||O,W=e.onShowSizeChange,H=void 0===W?x:W,z=e.locale,G=void 0===z?f.Z:z,V=e.style,K=e.totalBoundaryShowSizeChanger,U=void 0===K?50:K,q=e.disabled,Y=e.simple,X=e.showTotal,J=e.showSizeChanger,Q=void 0===J?N>U:J,$=e.sizeChangerRender,ee=e.pageSizeOptions,te=e.itemRender,ne=void 0===te?y:te,ie=e.jumpPrevIcon,re=e.jumpNextIcon,oe=e.prevIcon,ae=e.nextIcon,le=p.useRef(null),se=(0,u.Z)(10,{value:E,defaultValue:Z}),ce=(0,l.Z)(se,2),ue=ce[0],de=ce[1],he=(0,u.Z)(1,{value:k,defaultValue:_,postState:function(e){return Math.max(1,Math.min(e,w(void 0,ue,N)))}}),pe=(0,l.Z)(he,2),fe=pe[0],me=pe[1],ve=p.useState(fe),ge=(0,l.Z)(ve,2),ye=ge[0],xe=ge[1];(0,p.useEffect)((function(){xe(fe)}),[fe]);var be=Math.max(1,fe-(R?3:5)),we=Math.min(w(void 0,ue,N),fe+(R?3:5));function Ce(t,i){var r=t||p.createElement("button",{type:"button","aria-label":i,className:"".concat(n,"-item-link")});return"function"==typeof t&&(r=p.createElement(t,(0,a.Z)({},e))),r}function ke(e){var t=e.target.value,n=w(void 0,ue,N);return""===t?t:Number.isNaN(Number(t))?ye:t>=n?n:Number(t)}var Se=N>ue&&B;function _e(e){var t=ke(e);switch(t!==ye&&xe(t),e.keyCode){case d.Z.ENTER:je(t);break;case d.Z.UP:je(t-1);break;case d.Z.DOWN:je(t+1)}}function je(e){if(function(e){return b(e)&&e!==fe&&b(N)&&N>0}(e)&&!q){var t=w(void 0,ue,N),n=e;return e>t?n=t:e<1&&(n=1),n!==ye&&xe(n),me(n),null==D||D(n,ue),n}return fe}var Ne=fe>1,Ee=fe<w(void 0,ue,N);function Ae(){Ne&&je(fe-1)}function Ze(){Ee&&je(fe+1)}function Ie(){je(be)}function De(){je(we)}function Te(e,t){if("Enter"===e.key||e.charCode===d.Z.ENTER||e.keyCode===d.Z.ENTER){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];t.apply(void 0,i)}}function Pe(e){"click"!==e.type&&e.keyCode!==d.Z.ENTER||je(ye)}var Me=null,Le=(0,h.Z)(e,{aria:!0,data:!0}),Be=X&&p.createElement("li",{className:"".concat(n,"-total-text")},X(N,[0===N?0:(fe-1)*ue+1,fe*ue>N?N:fe*ue])),Re=null,Oe=w(void 0,ue,N);if(T&&N<=ue)return null;var Fe=[],We={rootPrefixCls:n,onClick:je,onKeyPress:Te,showTitle:F,itemRender:ne,page:-1},He=fe-1>0?fe-1:0,ze=fe+1<Oe?fe+1:Oe,Ge=B&&B.goButton,Ve="object"===(0,o.Z)(Y)?Y.readOnly:!Y,Ke=Ge,Ue=null;Y&&(Ge&&(Ke="boolean"==typeof Ge?p.createElement("button",{type:"button",onClick:Pe,onKeyUp:Pe},G.jump_to_confirm):p.createElement("span",{onClick:Pe,onKeyUp:Pe},Ge),Ke=p.createElement("li",{title:F?"".concat(G.jump_to).concat(fe,"/").concat(Oe):null,className:"".concat(n,"-simple-pager")},Ke)),Ue=p.createElement("li",{title:F?"".concat(fe,"/").concat(Oe):null,className:"".concat(n,"-simple-pager")},Ve?ye:p.createElement("input",{type:"text","aria-label":G.jump_to,value:ye,disabled:q,onKeyDown:function(e){e.keyCode!==d.Z.UP&&e.keyCode!==d.Z.DOWN||e.preventDefault()},onKeyUp:_e,onChange:_e,onBlur:function(e){je(ke(e))},size:3}),p.createElement("span",{className:"".concat(n,"-slash")},"/"),Oe));var qe=R?1:2;if(Oe<=3+2*qe){Oe||Fe.push(p.createElement(g,(0,r.Z)({},We,{key:"noPager",page:1,className:"".concat(n,"-item-disabled")})));for(var Ye=1;Ye<=Oe;Ye+=1)Fe.push(p.createElement(g,(0,r.Z)({},We,{key:Ye,page:Ye,active:fe===Ye})))}else{var Xe=R?G.prev_3:G.prev_5,Je=R?G.next_3:G.next_5,Qe=ne(be,"jump-prev",Ce(ie,"prev page")),$e=ne(we,"jump-next",Ce(re,"next page"));L&&(Me=Qe?p.createElement("li",{title:F?Xe:null,key:"prev",onClick:Ie,tabIndex:0,onKeyDown:function(e){Te(e,Ie)},className:c()("".concat(n,"-jump-prev"),(0,i.Z)({},"".concat(n,"-jump-prev-custom-icon"),!!ie))},Qe):null,Re=$e?p.createElement("li",{title:F?Je:null,key:"next",onClick:De,tabIndex:0,onKeyDown:function(e){Te(e,De)},className:c()("".concat(n,"-jump-next"),(0,i.Z)({},"".concat(n,"-jump-next-custom-icon"),!!re))},$e):null);var et=Math.max(1,fe-qe),tt=Math.min(fe+qe,Oe);fe-1<=qe&&(tt=1+2*qe),Oe-fe<=qe&&(et=Oe-2*qe);for(var nt=et;nt<=tt;nt+=1)Fe.push(p.createElement(g,(0,r.Z)({},We,{key:nt,page:nt,active:fe===nt})));if(fe-1>=2*qe&&3!==fe&&(Fe[0]=p.cloneElement(Fe[0],{className:c()("".concat(n,"-item-after-jump-prev"),Fe[0].props.className)}),Fe.unshift(Me)),Oe-fe>=2*qe&&fe!==Oe-2){var it=Fe[Fe.length-1];Fe[Fe.length-1]=p.cloneElement(it,{className:c()("".concat(n,"-item-before-jump-next"),it.props.className)}),Fe.push(Re)}1!==et&&Fe.unshift(p.createElement(g,(0,r.Z)({},We,{key:1,page:1}))),tt!==Oe&&Fe.push(p.createElement(g,(0,r.Z)({},We,{key:Oe,page:Oe})))}var rt=function(e){var t=ne(e,"prev",Ce(oe,"prev page"));return p.isValidElement(t)?p.cloneElement(t,{disabled:!Ne}):t}(He);if(rt){var ot=!Ne||!Oe;rt=p.createElement("li",{title:F?G.prev_page:null,onClick:Ae,tabIndex:ot?null:0,onKeyDown:function(e){Te(e,Ae)},className:c()("".concat(n,"-prev"),(0,i.Z)({},"".concat(n,"-disabled"),ot)),"aria-disabled":ot},rt)}var at,lt,st=function(e){var t=ne(e,"next",Ce(ae,"next page"));return p.isValidElement(t)?p.cloneElement(t,{disabled:!Ee}):t}(ze);st&&(Y?(at=!Ee,lt=Ne?0:null):lt=(at=!Ee||!Oe)?null:0,st=p.createElement("li",{title:F?G.next_page:null,onClick:Ze,tabIndex:lt,onKeyDown:function(e){Te(e,Ze)},className:c()("".concat(n,"-next"),(0,i.Z)({},"".concat(n,"-disabled"),at)),"aria-disabled":at},st));var ct=c()(n,C,(0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)((0,i.Z)({},"".concat(n,"-start"),"start"===P),"".concat(n,"-center"),"center"===P),"".concat(n,"-end"),"end"===P),"".concat(n,"-simple"),Y),"".concat(n,"-disabled"),q));return p.createElement("ul",(0,r.Z)({className:ct,style:V,ref:le},Le),Be,rt,Y?Ue:Fe,st,p.createElement(v,{locale:G,rootPrefixCls:n,disabled:q,selectPrefixCls:m,changeSize:function(e){var t=w(e,ue,N),n=fe>t&&0!==t?t:fe;de(e),xe(n),null==H||H(fe,e),me(n),null==D||D(n,e)},pageSize:ue,pageSizeOptions:ee,quickGo:Se?je:null,goButton:Ke,showSizeChanger:Q,sizeChangerRender:$}))}},25930:function(e,t,n){"use strict";n.d(t,{Cd:function(){return S}});var i=n(54476),r=n(33885),o=n(75931),a=n(59301),l=n(92310),s=n.n(l),c={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},u=function(){var e=(0,a.useRef)([]),t=(0,a.useRef)(null);return(0,a.useEffect)((function(){var n=Date.now(),i=!1;e.current.forEach((function(e){if(e){i=!0;var r=e.style;r.transitionDuration=".3s, .3s, .3s, .06s",t.current&&n-t.current<100&&(r.transitionDuration="0s, 0s")}})),i&&(t.current=Date.now())})),e.current};var d=n(76190),h=n(42978),p=n(47273),f=0,m=(0,p.Z)();var v=function(e){var t=a.useState(),n=(0,h.Z)(t,2),i=n[0],r=n[1];return a.useEffect((function(){var e;r("rc_progress_".concat((m?(e=f,f+=1):e="TEST_OR_SSR",e)))}),[]),e||i},g=function(e){var t=e.bg,n=e.children;return a.createElement("div",{style:{width:"100%",height:"100%",background:t}},n)};function y(e,t){return Object.keys(e).map((function(n){var i=parseFloat(n),r="".concat(Math.floor(i*t),"%");return"".concat(e[n]," ").concat(r)}))}var x=a.forwardRef((function(e,t){var n=e.prefixCls,i=e.color,r=e.gradientId,o=e.radius,l=e.style,s=e.ptg,c=e.strokeLinecap,u=e.strokeWidth,h=e.size,p=e.gapDegree,f=i&&"object"===(0,d.Z)(i),m=f?"#FFF":void 0,v=h/2,x=a.createElement("circle",{className:"".concat(n,"-circle-path"),r:o,cx:v,cy:v,stroke:m,strokeLinecap:c,strokeWidth:u,opacity:0===s?0:1,style:l,ref:t});if(!f)return x;var b="".concat(r,"-conic"),w=p?"".concat(180+p/2,"deg"):"0deg",C=y(i,(360-p)/360),k=y(i,1),S="conic-gradient(from ".concat(w,", ").concat(C.join(", "),")"),_="linear-gradient(to ".concat(p?"bottom":"top",", ").concat(k.join(", "),")");return a.createElement(a.Fragment,null,a.createElement("mask",{id:b},x),a.createElement("foreignObject",{x:0,y:0,width:h,height:h,mask:"url(#".concat(b,")")},a.createElement(g,{bg:_},a.createElement(g,{bg:S}))))})),b=100,w=function(e,t,n,i,r,o,a,l,s,c){var u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,d=n/100*360*((360-o)/360),h=0===o?0:{bottom:0,top:180,left:90,right:-90}[a],p=(100-i)/100*t;"round"===s&&100!==i&&(p+=c/2)>=t&&(p=t-.01);var f=50;return{stroke:"string"==typeof l?l:void 0,strokeDasharray:"".concat(t,"px ").concat(e),strokeDashoffset:p+u,transform:"rotate(".concat(r+d+h,"deg)"),transformOrigin:"".concat(f,"px ").concat(f,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},C=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function k(e){var t=null!=e?e:[];return Array.isArray(t)?t:[t]}var S=function(e){var t,n,l,h=(0,r.Z)((0,r.Z)({},c),e),p=h.id,f=h.prefixCls,m=h.steps,g=h.strokeWidth,y=h.trailWidth,S=h.gapDegree,_=void 0===S?0:S,j=h.gapPosition,N=h.trailColor,E=h.strokeLinecap,A=h.style,Z=h.className,I=h.strokeColor,D=h.percent,T=(0,o.Z)(h,C),P=v(p),M="".concat(P,"-gradient"),L=50-g/2,B=2*Math.PI*L,R=_>0?90+_/2:-90,O=B*((360-_)/360),F="object"===(0,d.Z)(m)?m:{count:m,gap:2},W=F.count,H=F.gap,z=k(D),G=k(I),V=G.find((function(e){return e&&"object"===(0,d.Z)(e)})),K=V&&"object"===(0,d.Z)(V)?"butt":E,U=w(B,O,0,100,R,_,j,N,K,g),q=u();return a.createElement("svg",(0,i.Z)({className:s()("".concat(f,"-circle"),Z),viewBox:"0 0 ".concat(b," ").concat(b),style:A,id:p,role:"presentation"},T),!W&&a.createElement("circle",{className:"".concat(f,"-circle-trail"),r:L,cx:50,cy:50,stroke:N,strokeLinecap:K,strokeWidth:y||g,style:U}),W?(t=Math.round(W*(z[0]/100)),n=100/W,l=0,new Array(W).fill(null).map((function(e,i){var r=i<=t-1?G[0]:N,o=r&&"object"===(0,d.Z)(r)?"url(#".concat(M,")"):void 0,s=w(B,O,l,n,R,_,j,r,"butt",g,H);return l+=100*(O-s.strokeDashoffset+H)/O,a.createElement("circle",{key:i,className:"".concat(f,"-circle-path"),r:L,cx:50,cy:50,stroke:o,strokeWidth:g,opacity:1,style:s,ref:function(e){q[i]=e}})}))):function(){var e=0;return z.map((function(t,n){var i=G[n]||G[G.length-1],r=w(B,O,e,t,R,_,j,i,K,g);return e+=t,a.createElement(x,{key:n,color:i,ptg:t,radius:L,prefixCls:f,gradientId:M,style:r,strokeLinecap:K,strokeWidth:g,gapDegree:_,ref:function(e){q[n]=e},size:b})})).reverse()}())}},738:function(e,t,n){"use strict";n.d(t,{Z:function(){return g}});var i=n(54476),r=n(20068),o=n(42978),a=n(75931),l=n(92310),s=n.n(l),c=n(18929),u=n(10228),d=n(26112),h=n(59301);function p(e,t){var n=e.disabled,i=e.prefixCls,r=e.character,o=e.characterRender,a=e.index,l=e.count,c=e.value,d=e.allowHalf,p=e.focused,f=e.onHover,m=e.onClick,v=a+1,g=new Set([i]);0===c&&0===a&&p?g.add("".concat(i,"-focused")):d&&c+.5>=v&&c<v?(g.add("".concat(i,"-half")),g.add("".concat(i,"-active")),p&&g.add("".concat(i,"-focused"))):(v<=c?g.add("".concat(i,"-full")):g.add("".concat(i,"-zero")),v===c&&p&&g.add("".concat(i,"-focused")));var y="function"==typeof r?r(e):r,x=h.createElement("li",{className:s()(Array.from(g)),ref:t},h.createElement("div",{onClick:n?null:function(e){m(e,a)},onKeyDown:n?null:function(e){e.keyCode===u.Z.ENTER&&m(e,a)},onMouseMove:n?null:function(e){f(e,a)},role:"radio","aria-checked":c>a?"true":"false","aria-posinset":a+1,"aria-setsize":l,tabIndex:n?-1:0},h.createElement("div",{className:"".concat(i,"-first")},y),h.createElement("div",{className:"".concat(i,"-second")},y)));return o&&(x=o(x,e)),x}var f=h.forwardRef(p);var m=["prefixCls","className","defaultValue","value","count","allowHalf","allowClear","keyboard","character","characterRender","disabled","direction","tabIndex","autoFocus","onHoverChange","onChange","onFocus","onBlur","onKeyDown","onMouseLeave"];function v(e,t){var n,l=e.prefixCls,p=void 0===l?"rc-rate":l,v=e.className,g=e.defaultValue,y=e.value,x=e.count,b=void 0===x?5:x,w=e.allowHalf,C=void 0!==w&&w,k=e.allowClear,S=void 0===k||k,_=e.keyboard,j=void 0===_||_,N=e.character,E=void 0===N?"★":N,A=e.characterRender,Z=e.disabled,I=e.direction,D=void 0===I?"ltr":I,T=e.tabIndex,P=void 0===T?0:T,M=e.autoFocus,L=e.onHoverChange,B=e.onChange,R=e.onFocus,O=e.onBlur,F=e.onKeyDown,W=e.onMouseLeave,H=(0,a.Z)(e,m),z=(n=h.useRef({}),[function(e){return n.current[e]},function(e){return function(t){n.current[e]=t}}]),G=(0,o.Z)(z,2),V=G[0],K=G[1],U=h.useRef(null),q=function(){var e;Z||(null===(e=U.current)||void 0===e||e.focus())};h.useImperativeHandle(t,(function(){return{focus:q,blur:function(){var e;Z||(null===(e=U.current)||void 0===e||e.blur())}}}));var Y=(0,c.Z)(g||0,{value:y}),X=(0,o.Z)(Y,2),J=X[0],Q=X[1],$=(0,c.Z)(null),ee=(0,o.Z)($,2),te=ee[0],ne=ee[1],ie=function(e,t){var n,i,r,o,a="rtl"===D,l=e+1;if(C){var s=V(e),c=(i=function(e){var t,n,i=e.ownerDocument,r=i.body,o=i&&i.documentElement,a=e.getBoundingClientRect();return t=a.left,n=a.top,{left:t-=o.clientLeft||r.clientLeft||0,top:n-=o.clientTop||r.clientTop||0}}(n=s),r=n.ownerDocument,o=r.defaultView||r.parentWindow,i.left+=function(e){var t=e.pageXOffset,n="scrollLeft";if("number"!=typeof t){var i=e.document;"number"!=typeof(t=i.documentElement[n])&&(t=i.body[n])}return t}(o),i.left),u=s.clientWidth;(a&&t-c>u/2||!a&&t-c<u/2)&&(l-=.5)}return l},re=function(e){Q(e),null==B||B(e)},oe=h.useState(!1),ae=(0,o.Z)(oe,2),le=ae[0],se=ae[1],ce=h.useState(null),ue=(0,o.Z)(ce,2),de=ue[0],he=ue[1],pe=function(e,t){var n=ie(t,e.pageX);n!==te&&(he(n),ne(null)),null==L||L(n)},fe=function(e){Z||(he(null),ne(null),null==L||L(void 0)),e&&(null==W||W(e))},me=function(e,t){var n=ie(t,e.pageX),i=!1;S&&(i=n===J),fe(),re(i?0:n),ne(i?n:null)};h.useEffect((function(){M&&!Z&&q()}),[]);var ve=new Array(b).fill(0).map((function(e,t){return h.createElement(f,{ref:K(t),index:t,count:b,disabled:Z,prefixCls:"".concat(p,"-star"),allowHalf:C,value:null===de?J:de,onClick:me,onHover:pe,key:e||t,character:E,characterRender:A,focused:le})})),ge=s()(p,v,(0,r.Z)((0,r.Z)({},"".concat(p,"-disabled"),Z),"".concat(p,"-rtl"),"rtl"===D));return h.createElement("ul",(0,i.Z)({className:ge,onMouseLeave:fe,tabIndex:Z?-1:P,onFocus:Z?null:function(){se(!0),null==R||R()},onBlur:Z?null:function(){se(!1),null==O||O()},onKeyDown:Z?null:function(e){var t=e.keyCode,n="rtl"===D,i=C?.5:1;j&&(t===u.Z.RIGHT&&J<b&&!n?(re(J+i),e.preventDefault()):t===u.Z.LEFT&&J>0&&!n||t===u.Z.RIGHT&&J>0&&n?(re(J-i),e.preventDefault()):t===u.Z.LEFT&&J<b&&n&&(re(J+i),e.preventDefault())),null==F||F(e)},ref:U},(0,d.Z)(H,{aria:!0,data:!0,attr:!0})),ve)}var g=h.forwardRef(v)},6551:function(e,t,n){"use strict";n.d(t,{ZP:function(){return s}});var i=n(42978),r=n(59301),o=n(47273),a=0,l=(0,o.Z)();function s(e){var t=r.useState(),n=(0,i.Z)(t,2),o=n[0],s=n[1];return r.useEffect((function(){var e;s("rc_select_".concat((l?(e=a,a+=1):e="TEST_OR_SSR",e)))}),[]),e||o}},37463:function(e,t,n){"use strict";n.d(t,{Ac:function(){return ee},Xo:function(){return ne},Wx:function(){return re},ZP:function(){return _e},lk:function(){return b}});var i=n(54476),r=n(94480),o=n(20068),a=n(33885),l=n(42978),s=n(75931),c=n(76190),u=n(18929),d=n(48736),h=n(59301),p=n(92310),f=n.n(p),m=n(34280),v=n(49658),g=n(8654),y=function(e){var t=e.className,n=e.customizeIcon,i=e.customizeIconProps,r=e.children,o=e.onMouseDown,a=e.onClick,l="function"==typeof n?n(i):n;return h.createElement("span",{className:t,onMouseDown:function(e){e.preventDefault(),null==o||o(e)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:a,"aria-hidden":!0},void 0!==l?l:h.createElement("span",{className:f()(t.split(/\s+/).map((function(e){return"".concat(e,"-icon")})))},r))},x=h.createContext(null);function b(){return h.useContext(x)}function w(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,t=h.useRef(null),n=h.useRef(null);function i(i){(i||null===t.current)&&(t.current=i),window.clearTimeout(n.current),n.current=window.setTimeout((function(){t.current=null}),e)}return h.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return t.current},i]}var C=n(10228);var k=n(26112),S=n(11780);var _=function(e,t,n){var i=(0,a.Z)((0,a.Z)({},e),n?t:{});return Object.keys(t).forEach((function(n){var r=t[n];"function"==typeof r&&(i[n]=function(){for(var t,i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return r.apply(void 0,o),null===(t=e[n])||void 0===t?void 0:t.call.apply(t,[e].concat(o))})})),i},j=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],N=function(e,t){var n=e.prefixCls,i=e.id,r=e.inputElement,o=e.autoFocus,l=e.autoComplete,c=e.editable,u=e.activeDescendantId,p=e.value,m=e.open,v=e.attrs,y=(0,s.Z)(e,j),x=r||h.createElement("input",null),b=x,w=b.ref,C=b.props;return(0,d.Kp)(!("maxLength"in x.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),x=h.cloneElement(x,(0,a.Z)((0,a.Z)((0,a.Z)({type:"search"},_(y,C,!0)),{},{id:i,ref:(0,g.sQ)(t,w),autoComplete:l||"off",autoFocus:o,className:f()("".concat(n,"-selection-search-input"),null==C?void 0:C.className),role:"combobox","aria-expanded":m||!1,"aria-haspopup":"listbox","aria-owns":"".concat(i,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(i,"_list"),"aria-activedescendant":m?u:void 0},v),{},{value:c?p:"",readOnly:!c,unselectable:c?null:"on",style:(0,a.Z)((0,a.Z)({},C.style),{},{opacity:c?null:0})}))};var E=h.forwardRef(N);function A(e){return Array.isArray(e)?e:void 0!==e?[e]:[]}var Z="undefined"!=typeof window&&window.document&&window.document.documentElement;function I(e){return["string","number"].includes((0,c.Z)(e))}function D(e){var t=void 0;return e&&(I(e.title)?t=e.title.toString():I(e.label)&&(t=e.label.toString())),t}function T(e){var t;return null!==(t=e.key)&&void 0!==t?t:e.value}var P=function(e){e.preventDefault(),e.stopPropagation()},M=function(e){var t,n,i=e.id,r=e.prefixCls,a=e.values,s=e.open,c=e.searchValue,u=e.autoClearSearchValue,d=e.inputRef,p=e.placeholder,m=e.disabled,v=e.mode,g=e.showSearch,x=e.autoFocus,b=e.autoComplete,w=e.activeDescendantId,C=e.tabIndex,_=e.removeIcon,j=e.maxTagCount,N=e.maxTagTextLength,A=e.maxTagPlaceholder,I=void 0===A?function(e){return"+ ".concat(e.length," ...")}:A,M=e.tagRender,L=e.onToggleOpen,B=e.onRemove,R=e.onInputChange,O=e.onInputPaste,F=e.onInputKeyDown,W=e.onInputMouseDown,H=e.onInputCompositionStart,z=e.onInputCompositionEnd,G=e.onInputBlur,V=h.useRef(null),K=(0,h.useState)(0),U=(0,l.Z)(K,2),q=U[0],Y=U[1],X=(0,h.useState)(!1),J=(0,l.Z)(X,2),Q=J[0],$=J[1],ee="".concat(r,"-selection"),te=s||"multiple"===v&&!1===u||"tags"===v?c:"",ne="tags"===v||"multiple"===v&&!1===u||g&&(s||Q);t=function(){Y(V.current.scrollWidth)},n=[te],Z?h.useLayoutEffect(t,n):h.useEffect(t,n);var ie=function(e,t,n,i,r){return h.createElement("span",{title:D(e),className:f()("".concat(ee,"-item"),(0,o.Z)({},"".concat(ee,"-item-disabled"),n))},h.createElement("span",{className:"".concat(ee,"-item-content")},t),i&&h.createElement(y,{className:"".concat(ee,"-item-remove"),onMouseDown:P,onClick:r,customizeIcon:_},"×"))},re=function(e,t,n,i,r,o){return h.createElement("span",{onMouseDown:function(e){P(e),L(!s)}},M({label:t,value:e,disabled:n,closable:i,onClose:r,isMaxTag:!!o}))},oe=h.createElement("div",{className:"".concat(ee,"-search"),style:{width:q},onFocus:function(){$(!0)},onBlur:function(){$(!1)}},h.createElement(E,{ref:d,open:s,prefixCls:r,id:i,inputElement:null,disabled:m,autoFocus:x,autoComplete:b,editable:ne,activeDescendantId:w,value:te,onKeyDown:F,onMouseDown:W,onChange:R,onPaste:O,onCompositionStart:H,onCompositionEnd:z,onBlur:G,tabIndex:C,attrs:(0,k.Z)(e,!0)}),h.createElement("span",{ref:V,className:"".concat(ee,"-search-mirror"),"aria-hidden":!0},te," ")),ae=h.createElement(S.Z,{prefixCls:"".concat(ee,"-overflow"),data:a,renderItem:function(e){var t=e.disabled,n=e.label,i=e.value,r=!m&&!t,o=n;if("number"==typeof N&&("string"==typeof n||"number"==typeof n)){var a=String(o);a.length>N&&(o="".concat(a.slice(0,N),"..."))}var l=function(t){t&&t.stopPropagation(),B(e)};return"function"==typeof M?re(i,o,t,r,l):ie(e,o,t,r,l)},renderRest:function(e){if(!a.length)return null;var t="function"==typeof I?I(e):I;return"function"==typeof M?re(void 0,t,!1,!1,void 0,!0):ie({title:t},t,!1)},suffix:oe,itemKey:T,maxCount:j});return h.createElement("span",{className:"".concat(ee,"-wrap")},ae,!a.length&&!te&&h.createElement("span",{className:"".concat(ee,"-placeholder")},p))},L=function(e){var t=e.inputElement,n=e.prefixCls,i=e.id,r=e.inputRef,o=e.disabled,a=e.autoFocus,s=e.autoComplete,c=e.activeDescendantId,u=e.mode,d=e.open,p=e.values,f=e.placeholder,m=e.tabIndex,v=e.showSearch,g=e.searchValue,y=e.activeValue,x=e.maxLength,b=e.onInputKeyDown,w=e.onInputMouseDown,C=e.onInputChange,S=e.onInputPaste,_=e.onInputCompositionStart,j=e.onInputCompositionEnd,N=e.onInputBlur,A=e.title,Z=h.useState(!1),I=(0,l.Z)(Z,2),T=I[0],P=I[1],M="combobox"===u,L=M||v,B=p[0],R=g||"";M&&y&&!T&&(R=y),h.useEffect((function(){M&&P(!1)}),[M,y]);var O=!("combobox"!==u&&!d&&!v)&&!!R,F=void 0===A?D(B):A,W=h.useMemo((function(){return B?null:h.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:O?{visibility:"hidden"}:void 0},f)}),[B,O,f,n]);return h.createElement("span",{className:"".concat(n,"-selection-wrap")},h.createElement("span",{className:"".concat(n,"-selection-search")},h.createElement(E,{ref:r,prefixCls:n,id:i,open:d,inputElement:t,disabled:o,autoFocus:a,autoComplete:s,editable:L,activeDescendantId:c,value:R,onKeyDown:b,onMouseDown:w,onChange:function(e){P(!0),C(e)},onPaste:S,onCompositionStart:_,onCompositionEnd:j,onBlur:N,tabIndex:m,attrs:(0,k.Z)(e,!0),maxLength:M?x:void 0})),!M&&B?h.createElement("span",{className:"".concat(n,"-selection-item"),title:F,style:O?{visibility:"hidden"}:void 0},B.label):null,W)},B=function(e,t){var n=(0,h.useRef)(null),r=(0,h.useRef)(!1),o=e.prefixCls,a=e.open,s=e.mode,c=e.showSearch,u=e.tokenWithEnter,d=e.disabled,p=e.prefix,f=e.autoClearSearchValue,m=e.onSearch,v=e.onSearchSubmit,g=e.onToggleOpen,y=e.onInputKeyDown,x=e.onInputBlur,b=e.domRef;h.useImperativeHandle(t,(function(){return{focus:function(e){n.current.focus(e)},blur:function(){n.current.blur()}}}));var k=w(0),S=(0,l.Z)(k,2),_=S[0],j=S[1],N=(0,h.useRef)(null),E=function(e){!1!==m(e,!0,r.current)&&g(!0)},A={inputRef:n,onInputKeyDown:function(e){var t,i=e.which,o=n.current instanceof HTMLTextAreaElement;(o||!a||i!==C.Z.UP&&i!==C.Z.DOWN||e.preventDefault(),y&&y(e),i!==C.Z.ENTER||"tags"!==s||r.current||a||null==v||v(e.target.value),o&&!a&&~[C.Z.UP,C.Z.DOWN,C.Z.LEFT,C.Z.RIGHT].indexOf(i))||(t=i)&&![C.Z.ESC,C.Z.SHIFT,C.Z.BACKSPACE,C.Z.TAB,C.Z.WIN_KEY,C.Z.ALT,C.Z.META,C.Z.WIN_KEY_RIGHT,C.Z.CTRL,C.Z.SEMICOLON,C.Z.EQUALS,C.Z.CAPS_LOCK,C.Z.CONTEXT_MENU,C.Z.F1,C.Z.F2,C.Z.F3,C.Z.F4,C.Z.F5,C.Z.F6,C.Z.F7,C.Z.F8,C.Z.F9,C.Z.F10,C.Z.F11,C.Z.F12].includes(t)&&g(!0)},onInputMouseDown:function(){j(!0)},onInputChange:function(e){var t=e.target.value;if(u&&N.current&&/[\r\n]/.test(N.current)){var n=N.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");t=t.replace(n,N.current)}N.current=null,E(t)},onInputPaste:function(e){var t=e.clipboardData,n=null==t?void 0:t.getData("text");N.current=n||""},onInputCompositionStart:function(){r.current=!0},onInputCompositionEnd:function(e){r.current=!1,"combobox"!==s&&E(e.target.value)},onInputBlur:x},Z="multiple"===s||"tags"===s?h.createElement(M,(0,i.Z)({},e,A)):h.createElement(L,(0,i.Z)({},e,A));return h.createElement("div",{ref:b,className:"".concat(o,"-selector"),onClick:function(e){e.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(e){var t=_();e.target===n.current||t||"combobox"===s&&d||e.preventDefault(),("combobox"===s||c&&t)&&a||(a&&!1!==f&&m("",!0,!1),g())}},p&&h.createElement("div",{className:"".concat(o,"-prefix")},p),Z)};var R=h.forwardRef(B),O=n(65030),F=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],W=function(e,t){var n=e.prefixCls,r=(e.disabled,e.visible),l=e.children,c=e.popupElement,u=e.animation,d=e.transitionName,p=e.dropdownStyle,m=e.dropdownClassName,v=e.direction,g=void 0===v?"ltr":v,y=e.placement,x=e.builtinPlacements,b=e.dropdownMatchSelectWidth,w=e.dropdownRender,C=e.dropdownAlign,k=e.getPopupContainer,S=e.empty,_=e.getTriggerDOMNode,j=e.onPopupVisibleChange,N=e.onPopupMouseEnter,E=(0,s.Z)(e,F),A="".concat(n,"-dropdown"),Z=c;w&&(Z=w(c));var I=h.useMemo((function(){return x||function(e){var t=!0===e?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:t,adjustY:1},htmlRegion:"scroll"}}}(b)}),[x,b]),D=u?"".concat(A,"-").concat(u):d,T="number"==typeof b,P=h.useMemo((function(){return T?null:!1===b?"minWidth":"width"}),[b,T]),M=p;T&&(M=(0,a.Z)((0,a.Z)({},M),{},{width:b}));var L=h.useRef(null);return h.useImperativeHandle(t,(function(){return{getPopupElement:function(){var e;return null===(e=L.current)||void 0===e?void 0:e.popupElement}}})),h.createElement(O.Z,(0,i.Z)({},E,{showAction:j?["click"]:[],hideAction:j?["click"]:[],popupPlacement:y||("rtl"===g?"bottomRight":"bottomLeft"),builtinPlacements:I,prefixCls:A,popupTransitionName:D,popup:h.createElement("div",{onMouseEnter:N},Z),ref:L,stretch:P,popupAlign:C,popupVisible:r,getPopupContainer:k,popupClassName:f()(m,(0,o.Z)({},"".concat(A,"-empty"),S)),popupStyle:M,getTriggerDOMNode:_,onPopupVisibleChange:j}),l)};var H=h.forwardRef(W),z=n(66712);function G(e,t){var n,i=e.key;return"value"in e&&(n=e.value),null!=i?i:void 0!==n?n:"rc-index-key-".concat(t)}function V(e){return void 0!==e&&!Number.isNaN(e)}function K(e,t){var n=e||{},i=n.label||(t?"children":"label");return{label:i,value:n.value||"value",options:n.options||"options",groupLabel:n.groupLabel||i}}function U(e){var t=(0,a.Z)({},e);return"props"in t||Object.defineProperty(t,"props",{get:function(){return(0,d.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),t}}),t}var q=h.createContext(null);function Y(e){var t=e.visible,n=e.values;if(!t)return null;return h.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,50).map((function(e){var t=e.label,n=e.value;return["number","string"].includes((0,c.Z)(t))?t:n})).join(", ")),n.length>50?", ...":null)}var X=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],J=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Q=function(e){return"tags"===e||"multiple"===e},$=h.forwardRef((function(e,t){var n,d=e.id,p=e.prefixCls,b=e.className,C=e.showSearch,k=e.tagRender,S=e.direction,_=e.omitDomProps,j=e.displayValues,N=e.onDisplayValuesChange,E=e.emptyOptions,A=e.notFoundContent,Z=void 0===A?"Not Found":A,I=e.onClear,D=e.mode,T=e.disabled,P=e.loading,M=e.getInputElement,L=e.getRawInputElement,B=e.open,O=e.defaultOpen,F=e.onDropdownVisibleChange,W=e.activeValue,G=e.onActiveValueChange,K=e.activeDescendantId,U=e.searchValue,$=e.autoClearSearchValue,ee=e.onSearch,te=e.onSearchSplit,ne=e.tokenSeparators,ie=e.allowClear,re=e.prefix,oe=e.suffixIcon,ae=e.clearIcon,le=e.OptionList,se=e.animation,ce=e.transitionName,ue=e.dropdownStyle,de=e.dropdownClassName,he=e.dropdownMatchSelectWidth,pe=e.dropdownRender,fe=e.dropdownAlign,me=e.placement,ve=e.builtinPlacements,ge=e.getPopupContainer,ye=e.showAction,xe=void 0===ye?[]:ye,be=e.onFocus,we=e.onBlur,Ce=e.onKeyUp,ke=e.onKeyDown,Se=e.onMouseDown,_e=(0,s.Z)(e,X),je=Q(D),Ne=(void 0!==C?C:je)||"combobox"===D,Ee=(0,a.Z)({},_e);J.forEach((function(e){delete Ee[e]})),null==_||_.forEach((function(e){delete Ee[e]}));var Ae=h.useState(!1),Ze=(0,l.Z)(Ae,2),Ie=Ze[0],De=Ze[1];h.useEffect((function(){De((0,v.Z)())}),[]);var Te=h.useRef(null),Pe=h.useRef(null),Me=h.useRef(null),Le=h.useRef(null),Be=h.useRef(null),Re=h.useRef(!1),Oe=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,t=h.useState(!1),n=(0,l.Z)(t,2),i=n[0],r=n[1],o=h.useRef(null),a=function(){window.clearTimeout(o.current)};return h.useEffect((function(){return a}),[]),[i,function(t,n){a(),o.current=window.setTimeout((function(){r(t),n&&n()}),e)},a]}(),Fe=(0,l.Z)(Oe,3),We=Fe[0],He=Fe[1],ze=Fe[2];h.useImperativeHandle(t,(function(){var e,t;return{focus:null===(e=Le.current)||void 0===e?void 0:e.focus,blur:null===(t=Le.current)||void 0===t?void 0:t.blur,scrollTo:function(e){var t;return null===(t=Be.current)||void 0===t?void 0:t.scrollTo(e)},nativeElement:Te.current||Pe.current}}));var Ge=h.useMemo((function(){var e;if("combobox"!==D)return U;var t=null===(e=j[0])||void 0===e?void 0:e.value;return"string"==typeof t||"number"==typeof t?String(t):""}),[U,D,j]),Ve="combobox"===D&&"function"==typeof M&&M()||null,Ke="function"==typeof L&&L(),Ue=(0,g.x1)(Pe,null==Ke||null===(n=Ke.props)||void 0===n?void 0:n.ref),qe=h.useState(!1),Ye=(0,l.Z)(qe,2),Xe=Ye[0],Je=Ye[1];(0,m.Z)((function(){Je(!0)}),[]);var Qe=(0,u.Z)(!1,{defaultValue:O,value:B}),$e=(0,l.Z)(Qe,2),et=$e[0],tt=$e[1],nt=!!Xe&&et,it=!Z&&E;(T||it&&nt&&"combobox"===D)&&(nt=!1);var rt=!it&&nt,ot=h.useCallback((function(e){var t=void 0!==e?e:!nt;T||(tt(t),nt!==t&&(null==F||F(t)))}),[T,nt,tt,F]),at=h.useMemo((function(){return(ne||[]).some((function(e){return["\n","\r\n"].includes(e)}))}),[ne]),lt=h.useContext(q)||{},st=lt.maxCount,ct=lt.rawValues,ut=function(e,t,n){if(!(je&&V(st)&&(null==ct?void 0:ct.size)>=st)){var i=!0,o=e;null==G||G(null);var a=function(e,t,n){if(!t||!t.length)return null;var i=!1,o=function e(t,n){var o=(0,z.Z)(n),a=o[0],l=o.slice(1);if(!a)return[t];var s=t.split(a);return i=i||s.length>1,s.reduce((function(t,n){return[].concat((0,r.Z)(t),(0,r.Z)(e(n,l)))}),[]).filter(Boolean)}(e,t);return i?void 0!==n?o.slice(0,n):o:null}(e,ne,V(st)?st-ct.size:void 0),l=n?null:a;return"combobox"!==D&&l&&(o="",null==te||te(l),ot(!1),i=!1),ee&&Ge!==o&&ee(o,{source:t?"typing":"effect"}),i}};h.useEffect((function(){nt||je||"combobox"===D||ut("",!1,!1)}),[nt]),h.useEffect((function(){et&&T&&tt(!1),T&&!Re.current&&He(!1)}),[T]);var dt=w(),ht=(0,l.Z)(dt,2),pt=ht[0],ft=ht[1],mt=h.useRef(!1),vt=h.useRef(!1),gt=[];h.useEffect((function(){return function(){gt.forEach((function(e){return clearTimeout(e)})),gt.splice(0,gt.length)}}),[]);var yt,xt=h.useState({}),bt=(0,l.Z)(xt,2)[1];Ke&&(yt=function(e){ot(e)}),function(e,t,n,i){var r=h.useRef(null);r.current={open:t,triggerOpen:n,customizedTrigger:i},h.useEffect((function(){function t(t){var n;if(null===(n=r.current)||void 0===n||!n.customizedTrigger){var i=t.target;i.shadowRoot&&t.composed&&(i=t.composedPath()[0]||i),r.current.open&&e().filter((function(e){return e})).every((function(e){return!e.contains(i)&&e!==i}))&&r.current.triggerOpen(!1)}}return window.addEventListener("mousedown",t),function(){return window.removeEventListener("mousedown",t)}}),[])}((function(){var e;return[Te.current,null===(e=Me.current)||void 0===e?void 0:e.getPopupElement()]}),rt,ot,!!Ke);var wt,Ct=h.useMemo((function(){return(0,a.Z)((0,a.Z)({},e),{},{notFoundContent:Z,open:nt,triggerOpen:rt,id:d,showSearch:Ne,multiple:je,toggleOpen:ot})}),[e,Z,rt,nt,d,Ne,je,ot]),kt=!!oe||P;kt&&(wt=h.createElement(y,{className:f()("".concat(p,"-arrow"),(0,o.Z)({},"".concat(p,"-arrow-loading"),P)),customizeIcon:oe,customizeIconProps:{loading:P,searchValue:Ge,open:nt,focused:We,showSearch:Ne}}));var St,_t=function(e,t,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6?arguments[6]:void 0,l=arguments.length>7?arguments[7]:void 0,s=h.useMemo((function(){return"object"===(0,c.Z)(i)?i.clearIcon:r||void 0}),[i,r]),u=h.useMemo((function(){return!(o||!i||!n.length&&!a||"combobox"===l&&""===a)}),[i,o,n.length,a,l]);return{allowClear:u,clearIcon:h.createElement(y,{className:"".concat(e,"-clear"),onMouseDown:t,customizeIcon:s},"×")}}(p,(function(){var e;null==I||I(),null===(e=Le.current)||void 0===e||e.focus(),N([],{type:"clear",values:j}),ut("",!1,!1)}),j,ie,ae,T,Ge,D),jt=_t.allowClear,Nt=_t.clearIcon,Et=h.createElement(le,{ref:Be}),At=f()(p,b,(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(p,"-focused"),We),"".concat(p,"-multiple"),je),"".concat(p,"-single"),!je),"".concat(p,"-allow-clear"),ie),"".concat(p,"-show-arrow"),kt),"".concat(p,"-disabled"),T),"".concat(p,"-loading"),P),"".concat(p,"-open"),nt),"".concat(p,"-customize-input"),Ve),"".concat(p,"-show-search"),Ne)),Zt=h.createElement(H,{ref:Me,disabled:T,prefixCls:p,visible:rt,popupElement:Et,animation:se,transitionName:ce,dropdownStyle:ue,dropdownClassName:de,direction:S,dropdownMatchSelectWidth:he,dropdownRender:pe,dropdownAlign:fe,placement:me,builtinPlacements:ve,getPopupContainer:ge,empty:E,getTriggerDOMNode:function(e){return Pe.current||e},onPopupVisibleChange:yt,onPopupMouseEnter:function(){bt({})}},Ke?h.cloneElement(Ke,{ref:Ue}):h.createElement(R,(0,i.Z)({},e,{domRef:Pe,prefixCls:p,inputElement:Ve,ref:Le,id:d,prefix:re,showSearch:Ne,autoClearSearchValue:$,mode:D,activeDescendantId:K,tagRender:k,values:j,open:nt,onToggleOpen:ot,activeValue:W,searchValue:Ge,onSearch:ut,onSearchSubmit:function(e){e&&e.trim()&&ee(e,{source:"submit"})},onRemove:function(e){var t=j.filter((function(t){return t!==e}));N(t,{type:"remove",values:[e]})},tokenWithEnter:at,onInputBlur:function(){mt.current=!1}})));return St=Ke?Zt:h.createElement("div",(0,i.Z)({className:At},Ee,{ref:Te,onMouseDown:function(e){var t,n=e.target,i=null===(t=Me.current)||void 0===t?void 0:t.getPopupElement();if(i&&i.contains(n)){var r=setTimeout((function(){var e,t=gt.indexOf(r);-1!==t&&gt.splice(t,1),ze(),Ie||i.contains(document.activeElement)||null===(e=Le.current)||void 0===e||e.focus()}));gt.push(r)}for(var o=arguments.length,a=new Array(o>1?o-1:0),l=1;l<o;l++)a[l-1]=arguments[l];null==Se||Se.apply(void 0,[e].concat(a))},onKeyDown:function(e){var t,n=pt(),i=e.key,o="Enter"===i;if(o&&("combobox"!==D&&e.preventDefault(),nt||ot(!0)),ft(!!Ge),"Backspace"===i&&!n&&je&&!Ge&&j.length){for(var a=(0,r.Z)(j),l=null,s=a.length-1;s>=0;s-=1){var c=a[s];if(!c.disabled){a.splice(s,1),l=c;break}}l&&N(a,{type:"remove",values:[l]})}for(var u=arguments.length,d=new Array(u>1?u-1:0),h=1;h<u;h++)d[h-1]=arguments[h];!nt||o&&mt.current||(o&&(mt.current=!0),null===(t=Be.current)||void 0===t||t.onKeyDown.apply(t,[e].concat(d))),null==ke||ke.apply(void 0,[e].concat(d))},onKeyUp:function(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var r;nt&&(null===(r=Be.current)||void 0===r||r.onKeyUp.apply(r,[e].concat(n))),"Enter"===e.key&&(mt.current=!1),null==Ce||Ce.apply(void 0,[e].concat(n))},onFocus:function(){He(!0),T||(be&&!vt.current&&be.apply(void 0,arguments),xe.includes("focus")&&ot(!0)),vt.current=!0},onBlur:function(){Re.current=!0,He(!1,(function(){vt.current=!1,Re.current=!1,ot(!1)})),T||(Ge&&("tags"===D?ee(Ge,{source:"submit"}):"multiple"===D&&ee("",{source:"blur"})),we&&we.apply(void 0,arguments))}}),h.createElement(Y,{visible:We&&!nt,values:j}),Zt,wt,jt&&Nt),h.createElement(x.Provider,{value:Ct},St)}));var ee=$,te=function(){return null};te.isSelectOptGroup=!0;var ne=te,ie=function(){return null};ie.isSelectOption=!0;var re=ie,oe=n(80547),ae=n(2738),le=n(48911);var se=["disabled","title","children","style","className"];function ce(e){return"string"==typeof e||"number"==typeof e}var ue=function(e,t){var n=b(),a=n.prefixCls,c=n.id,u=n.open,d=n.multiple,p=n.mode,m=n.searchValue,v=n.toggleOpen,g=n.notFoundContent,x=n.onPopupScroll,w=h.useContext(q),S=w.maxCount,_=w.flattenOptions,j=w.onActiveValue,N=w.defaultActiveFirstOption,E=w.onSelect,A=w.menuItemSelectedIcon,Z=w.rawValues,I=w.fieldNames,D=w.virtual,T=w.direction,P=w.listHeight,M=w.listItemHeight,L=w.optionRender,B="".concat(a,"-item"),R=(0,oe.Z)((function(){return _}),[u,_],(function(e,t){return t[0]&&e[1]!==t[1]})),O=h.useRef(null),F=h.useMemo((function(){return d&&V(S)&&(null==Z?void 0:Z.size)>=S}),[d,S,null==Z?void 0:Z.size]),W=function(e){e.preventDefault()},H=function(e){var t;null===(t=O.current)||void 0===t||t.scrollTo("number"==typeof e?{index:e}:e)},z=h.useCallback((function(e){return"combobox"!==p&&Z.has(e)}),[p,(0,r.Z)(Z).toString(),Z.size]),G=function(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=R.length,i=0;i<n;i+=1){var r=(e+i*t+n)%n,o=R[r]||{},a=o.group,l=o.data;if(!a&&(null==l||!l.disabled)&&(z(l.value)||!F))return r}return-1},K=h.useState((function(){return G(0)})),U=(0,l.Z)(K,2),Y=U[0],X=U[1],J=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];X(e);var n={source:t?"keyboard":"mouse"},i=R[e];i?j(i.value,e,n):j(null,-1,n)};(0,h.useEffect)((function(){J(!1!==N?G(0):-1)}),[R.length,m]);var Q=h.useCallback((function(e){return"combobox"===p?String(e).toLowerCase()===m.toLowerCase():Z.has(e)}),[p,m,(0,r.Z)(Z).toString(),Z.size]);(0,h.useEffect)((function(){var e,t=setTimeout((function(){if(!d&&u&&1===Z.size){var e=Array.from(Z)[0],t=R.findIndex((function(t){var n=t.data;return m?String(n.value).startsWith(m):n.value===e}));-1!==t&&(J(t),H(t))}}));u&&(null===(e=O.current)||void 0===e||e.scrollTo(void 0));return function(){return clearTimeout(t)}}),[u,m]);var $=function(e){void 0!==e&&E(e,{selected:!Z.has(e)}),d||v(!1)};if(h.useImperativeHandle(t,(function(){return{onKeyDown:function(e){var t=e.which,n=e.ctrlKey;switch(t){case C.Z.N:case C.Z.P:case C.Z.UP:case C.Z.DOWN:var i=0;if(t===C.Z.UP?i=-1:t===C.Z.DOWN?i=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(t===C.Z.N?i=1:t===C.Z.P&&(i=-1)),0!==i){var r=G(Y+i,i);H(r),J(r,!0)}break;case C.Z.TAB:case C.Z.ENTER:var o,a=R[Y];!a||null!=a&&null!==(o=a.data)&&void 0!==o&&o.disabled||F?$(void 0):$(a.value),u&&e.preventDefault();break;case C.Z.ESC:v(!1),u&&e.stopPropagation()}},onKeyUp:function(){},scrollTo:function(e){H(e)}}})),0===R.length)return h.createElement("div",{role:"listbox",id:"".concat(c,"_list"),className:"".concat(B,"-empty"),onMouseDown:W},g);var ee=Object.keys(I).map((function(e){return I[e]})),te=function(e){return e.label};function ne(e,t){return{role:e.group?"presentation":"option",id:"".concat(c,"_list_").concat(t)}}var ie=function(e){var t=R[e];if(!t)return null;var n=t.data||{},r=n.value,o=t.group,a=(0,k.Z)(n,!0),l=te(t);return t?h.createElement("div",(0,i.Z)({"aria-label":"string"!=typeof l||o?null:l},a,{key:e},ne(t,e),{"aria-selected":Q(r)}),r):null},re={role:"listbox",id:"".concat(c,"_list")};return h.createElement(h.Fragment,null,D&&h.createElement("div",(0,i.Z)({},re,{style:{height:0,width:0,overflow:"hidden"}}),ie(Y-1),ie(Y),ie(Y+1)),h.createElement(le.Z,{itemKey:"key",ref:O,data:R,height:P,itemHeight:M,fullHeight:!1,onMouseDown:W,onScroll:x,virtual:D,direction:T,innerProps:D?null:re},(function(e,t){var n=e.group,r=e.groupOption,a=e.data,l=e.label,c=e.value,u=a.key;if(n){var d,p=null!==(d=a.title)&&void 0!==d?d:ce(l)?l.toString():void 0;return h.createElement("div",{className:f()(B,"".concat(B,"-group"),a.className),title:p},void 0!==l?l:u)}var m=a.disabled,v=a.title,g=(a.children,a.style),x=a.className,b=(0,s.Z)(a,se),w=(0,ae.Z)(b,ee),C=z(c),S=m||!C&&F,_="".concat(B,"-option"),j=f()(B,_,x,(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(_,"-grouped"),r),"".concat(_,"-active"),Y===t&&!S),"".concat(_,"-disabled"),S),"".concat(_,"-selected"),C)),N=te(e),E=!A||"function"==typeof A||C,Z="number"==typeof N?N:N||c,I=ce(Z)?Z.toString():void 0;return void 0!==v&&(I=v),h.createElement("div",(0,i.Z)({},(0,k.Z)(w),D?{}:ne(e,t),{"aria-selected":Q(c),className:j,title:I,onMouseMove:function(){Y===t||S||J(t)},onClick:function(){S||$(c)},style:g}),h.createElement("div",{className:"".concat(_,"-content")},"function"==typeof L?L(e,{index:t}):Z),h.isValidElement(A)||C,E&&h.createElement(y,{className:"".concat(B,"-option-state"),customizeIcon:A,customizeIconProps:{value:c,disabled:S,isSelected:C}},C?"✓":null))})))};var de=h.forwardRef(ue);function he(e,t){return A(e).join("").toUpperCase().includes(t)}var pe=n(6551),fe=n(11592),me=["children","value"],ve=["children"];function ge(e){var t=e,n=t.key,i=t.props,r=i.children,o=i.value,l=(0,s.Z)(i,me);return(0,a.Z)({key:n,value:void 0!==o?o:n,children:r},l)}function ye(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,fe.Z)(e).map((function(e,n){if(!h.isValidElement(e)||!e.type)return null;var i=e,r=i.type.isSelectOptGroup,o=i.key,l=i.props,c=l.children,u=(0,s.Z)(l,ve);return t||!r?ge(e):(0,a.Z)((0,a.Z)({key:"__RC_SELECT_GRP__".concat(null===o?n:o,"__"),label:o},u),{},{options:ye(c)})})).filter((function(e){return e}))}var xe=function(e,t,n,i,r){return h.useMemo((function(){var o=e;!e&&(o=ye(t));var a=new Map,l=new Map,s=function(e,t,n){n&&"string"==typeof n&&e.set(t[n],t)};return function e(t){for(var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=0;c<t.length;c+=1){var u=t[c];!u[n.options]||o?(a.set(u[n.value],u),s(l,u,n.label),s(l,u,i),s(l,u,r)):e(u[n.options],!0)}}(o),{options:o,valueOptions:a,labelOptions:l}}),[e,t,n,i,r])};function be(e){var t=h.useRef();t.current=e;var n=h.useCallback((function(){return t.current.apply(t,arguments)}),[]);return n}var we=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],Ce=["inputValue"];var ke=h.forwardRef((function(e,t){var n=e.id,d=e.mode,p=e.prefixCls,f=void 0===p?"rc-select":p,m=e.backfill,v=e.fieldNames,g=e.inputValue,y=e.searchValue,x=e.onSearch,b=e.autoClearSearchValue,w=void 0===b||b,C=e.onSelect,k=e.onDeselect,S=e.dropdownMatchSelectWidth,_=void 0===S||S,j=e.filterOption,N=e.filterSort,E=e.optionFilterProp,Z=e.optionLabelProp,I=e.options,D=e.optionRender,T=e.children,P=e.defaultActiveFirstOption,M=e.menuItemSelectedIcon,L=e.virtual,B=e.direction,R=e.listHeight,O=void 0===R?200:R,F=e.listItemHeight,W=void 0===F?20:F,H=e.labelRender,z=e.value,V=e.defaultValue,Y=e.labelInValue,X=e.onChange,J=e.maxCount,$=(0,s.Z)(e,we),te=(0,pe.ZP)(n),ne=Q(d),ie=!(I||!T),re=h.useMemo((function(){return(void 0!==j||"combobox"!==d)&&j}),[j,d]),oe=h.useMemo((function(){return K(v,ie)}),[JSON.stringify(v),ie]),ae=(0,u.Z)("",{value:void 0!==y?y:g,postState:function(e){return e||""}}),le=(0,l.Z)(ae,2),se=le[0],ce=le[1],ue=xe(I,T,oe,E,Z),fe=ue.valueOptions,me=ue.labelOptions,ve=ue.options,ge=h.useCallback((function(e){return A(e).map((function(e){var t,n,i,r,o,a;(function(e){return!e||"object"!==(0,c.Z)(e)})(e)?t=e:(i=e.key,n=e.label,t=null!==(a=e.value)&&void 0!==a?a:i);var l,s=fe.get(t);s&&(void 0===n&&(n=null==s?void 0:s[Z||oe.label]),void 0===i&&(i=null!==(l=null==s?void 0:s.key)&&void 0!==l?l:t),r=null==s?void 0:s.disabled,o=null==s?void 0:s.title);return{label:n,value:t,key:i,disabled:r,title:o}}))}),[oe,Z,fe]),ye=(0,u.Z)(V,{value:z}),ke=(0,l.Z)(ye,2),Se=ke[0],_e=ke[1],je=h.useMemo((function(){var e,t=ge(ne&&null===Se?[]:Se);return"combobox"===d&&function(e){return!e&&0!==e}(null===(e=t[0])||void 0===e?void 0:e.value)?[]:t}),[Se,ge,d,ne]),Ne=function(e,t){var n=h.useRef({values:new Map,options:new Map});return[h.useMemo((function(){var i=n.current,r=i.values,o=i.options,l=e.map((function(e){var t;return void 0===e.label?(0,a.Z)((0,a.Z)({},e),{},{label:null===(t=r.get(e.value))||void 0===t?void 0:t.label}):e})),s=new Map,c=new Map;return l.forEach((function(e){s.set(e.value,e),c.set(e.value,t.get(e.value)||o.get(e.value))})),n.current.values=s,n.current.options=c,l}),[e,t]),h.useCallback((function(e){return t.get(e)||n.current.options.get(e)}),[t])]}(je,fe),Ee=(0,l.Z)(Ne,2),Ae=Ee[0],Ze=Ee[1],Ie=h.useMemo((function(){if(!d&&1===Ae.length){var e=Ae[0];if(null===e.value&&(null===e.label||void 0===e.label))return[]}return Ae.map((function(e){var t;return(0,a.Z)((0,a.Z)({},e),{},{label:null!==(t="function"==typeof H?H(e):e.label)&&void 0!==t?t:e.value})}))}),[d,Ae,H]),De=h.useMemo((function(){return new Set(Ae.map((function(e){return e.value})))}),[Ae]);h.useEffect((function(){if("combobox"===d){var e,t=null===(e=Ae[0])||void 0===e?void 0:e.value;ce(function(e){return null!=e}(t)?String(t):"")}}),[Ae]);var Te=be((function(e,t){var n=null!=t?t:e;return(0,o.Z)((0,o.Z)({},oe.value,e),oe.label,n)})),Pe=function(e,t,n,i,r){return h.useMemo((function(){if(!n||!1===i)return e;var l=t.options,s=t.label,c=t.value,u=[],d="function"==typeof i,h=n.toUpperCase(),p=d?i:function(e,t){return r?he(t[r],h):t[l]?he(t["children"!==s?s:"label"],h):he(t[c],h)},f=d?function(e){return U(e)}:function(e){return e};return e.forEach((function(e){if(e[l])if(p(n,f(e)))u.push(e);else{var t=e[l].filter((function(e){return p(n,f(e))}));t.length&&u.push((0,a.Z)((0,a.Z)({},e),{},(0,o.Z)({},l,t)))}else p(n,f(e))&&u.push(e)})),u}),[e,i,r,n,t])}(h.useMemo((function(){if("tags"!==d)return ve;var e=(0,r.Z)(ve);return(0,r.Z)(Ae).sort((function(e,t){return e.value<t.value?-1:1})).forEach((function(t){var n=t.value;(function(e){return fe.has(e)})(n)||e.push(Te(n,t.label))})),e}),[Te,ve,fe,Ae,d]),oe,se,re,E),Me=h.useMemo((function(){return"tags"!==d||!se||Pe.some((function(e){return e[E||"value"]===se}))||Pe.some((function(e){return e[oe.value]===se}))?Pe:[Te(se)].concat((0,r.Z)(Pe))}),[Te,E,d,Pe,se,oe]),Le=function e(t){return(0,r.Z)(t).sort((function(e,t){return N(e,t,{searchValue:se})})).map((function(t){return Array.isArray(t.options)?(0,a.Z)((0,a.Z)({},t),{},{options:t.options.length>0?e(t.options):t.options}):t}))},Be=h.useMemo((function(){return N?Le(Me):Me}),[Me,N,se]),Re=h.useMemo((function(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.fieldNames,i=t.childrenAsData,r=[],o=K(n,!1),a=o.label,l=o.value,s=o.options,c=o.groupLabel;function u(e,t){Array.isArray(e)&&e.forEach((function(e){if(t||!(s in e)){var n=e[l];r.push({key:G(e,r.length),groupOption:t,data:e,label:e[a],value:n})}else{var o=e[c];void 0===o&&i&&(o=e.label),r.push({key:G(e,r.length),group:!0,data:e,label:o}),u(e[s],!0)}}))}return u(e,!1),r}(Be,{fieldNames:oe,childrenAsData:ie})}),[Be,oe,ie]),Oe=function(e){var t=ge(e);if(_e(t),X&&(t.length!==Ae.length||t.some((function(e,t){var n;return(null===(n=Ae[t])||void 0===n?void 0:n.value)!==(null==e?void 0:e.value)})))){var n=Y?t:t.map((function(e){return e.value})),i=t.map((function(e){return U(Ze(e.value))}));X(ne?n:n[0],ne?i:i[0])}},Fe=h.useState(null),We=(0,l.Z)(Fe,2),He=We[0],ze=We[1],Ge=h.useState(0),Ve=(0,l.Z)(Ge,2),Ke=Ve[0],Ue=Ve[1],qe=void 0!==P?P:"combobox"!==d,Ye=h.useCallback((function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.source,r=void 0===i?"keyboard":i;Ue(t),m&&"combobox"===d&&null!==e&&"keyboard"===r&&ze(String(e))}),[m,d]),Xe=function(e,t,n){var i=function(){var t,n=Ze(e);return[Y?{label:null==n?void 0:n[oe.label],value:e,key:null!==(t=null==n?void 0:n.key)&&void 0!==t?t:e}:e,U(n)]};if(t&&C){var r=i(),o=(0,l.Z)(r,2),a=o[0],s=o[1];C(a,s)}else if(!t&&k&&"clear"!==n){var c=i(),u=(0,l.Z)(c,2),d=u[0],h=u[1];k(d,h)}},Je=be((function(e,t){var n,i=!ne||t.selected;n=i?ne?[].concat((0,r.Z)(Ae),[e]):[e]:Ae.filter((function(t){return t.value!==e})),Oe(n),Xe(e,i),"combobox"===d?ze(""):Q&&!w||(ce(""),ze(""))})),Qe=h.useMemo((function(){var e=!1!==L&&!1!==_;return(0,a.Z)((0,a.Z)({},ue),{},{flattenOptions:Re,onActiveValue:Ye,defaultActiveFirstOption:qe,onSelect:Je,menuItemSelectedIcon:M,rawValues:De,fieldNames:oe,virtual:e,direction:B,listHeight:O,listItemHeight:W,childrenAsData:ie,maxCount:J,optionRender:D})}),[J,ue,Re,Ye,qe,Je,M,De,oe,L,_,B,O,W,ie,D]);return h.createElement(q.Provider,{value:Qe},h.createElement(ee,(0,i.Z)({},$,{id:te,prefixCls:f,ref:t,omitDomProps:Ce,mode:d,displayValues:Ie,onDisplayValuesChange:function(e,t){Oe(e);var n=t.type,i=t.values;"remove"!==n&&"clear"!==n||i.forEach((function(e){Xe(e.value,!1,n)}))},direction:B,searchValue:se,onSearch:function(e,t){if(ce(e),ze(null),"submit"!==t.source)"blur"!==t.source&&("combobox"===d&&Oe(e),null==x||x(e));else{var n=(e||"").trim();if(n){var i=Array.from(new Set([].concat((0,r.Z)(De),[n])));Oe(i),Xe(n,!0),ce("")}}},autoClearSearchValue:w,onSearchSplit:function(e){var t=e;"tags"!==d&&(t=e.map((function(e){var t=me.get(e);return null==t?void 0:t.value})).filter((function(e){return void 0!==e})));var n=Array.from(new Set([].concat((0,r.Z)(De),(0,r.Z)(t))));Oe(n),n.forEach((function(e){Xe(e,!0)}))},dropdownMatchSelectWidth:_,OptionList:de,emptyOptions:!Re.length,activeValue:He,activeDescendantId:"".concat(te,"_list_").concat(Ke)})))}));var Se=ke;Se.Option=re,Se.OptGroup=ne;var _e=Se},63158:function(e,t,n){"use strict";var i=n(54476),r=n(20068),o=n(42978),a=n(75931),l=n(59301),s=n(92310),c=n.n(s),u=n(18929),d=n(10228),h=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],p=l.forwardRef((function(e,t){var n,s=e.prefixCls,p=void 0===s?"rc-switch":s,f=e.className,m=e.checked,v=e.defaultChecked,g=e.disabled,y=e.loadingIcon,x=e.checkedChildren,b=e.unCheckedChildren,w=e.onClick,C=e.onChange,k=e.onKeyDown,S=(0,a.Z)(e,h),_=(0,u.Z)(!1,{value:m,defaultValue:v}),j=(0,o.Z)(_,2),N=j[0],E=j[1];function A(e,t){var n=N;return g||(E(n=e),null==C||C(n,t)),n}var Z=c()(p,f,(n={},(0,r.Z)(n,"".concat(p,"-checked"),N),(0,r.Z)(n,"".concat(p,"-disabled"),g),n));return l.createElement("button",(0,i.Z)({},S,{type:"button",role:"switch","aria-checked":N,disabled:g,className:Z,ref:t,onKeyDown:function(e){e.which===d.Z.LEFT?A(!1,e):e.which===d.Z.RIGHT&&A(!0,e),null==k||k(e)},onClick:function(e){var t=A(!N,e);null==w||w(t,e)}}),y,l.createElement("span",{className:"".concat(p,"-inner")},l.createElement("span",{className:"".concat(p,"-inner-checked")},x),l.createElement("span",{className:"".concat(p,"-inner-unchecked")},b)))}));p.displayName="Switch",t.Z=p},86351:function(e,t,n){"use strict";n.d(t,{R:function(){return r},w:function(){return i}});var i={},r="rc-table-internal-hook"},97347:function(e,t,n){"use strict";n.d(t,{L:function(){return v},Z:function(){return x}});var i=n(42978),r=n(20068),o=n(94480),a=n(76190),l=n(33885),s=n(75931),c=n(11592),u=(n(48736),n(59301)),d=n(86351),h=n(54451);function p(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return"number"==typeof t?t:t.endsWith("%")?e*parseFloat(t)/100:null}var f=["children"],m=["fixed"];function v(e){return(0,c.Z)(e).filter((function(e){return u.isValidElement(e)})).map((function(e){var t=e.key,n=e.props,i=n.children,r=(0,s.Z)(n,f),o=(0,l.Z)({key:t},r);return i&&(o.children=v(i)),o}))}function g(e){return e.filter((function(e){return e&&"object"===(0,a.Z)(e)&&!e.hidden})).map((function(e){var t=e.children;return t&&t.length>0?(0,l.Z)((0,l.Z)({},e),{},{children:g(t)}):e}))}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"key";return e.filter((function(e){return e&&"object"===(0,a.Z)(e)})).reduce((function(e,n,i){var r=n.fixed,a=!0===r?"left":r,s="".concat(t,"-").concat(i),c=n.children;return c&&c.length>0?[].concat((0,o.Z)(e),(0,o.Z)(y(c,s).map((function(e){return(0,l.Z)({fixed:a},e)})))):[].concat((0,o.Z)(e),[(0,l.Z)((0,l.Z)({key:s},n),{},{fixed:a})])}),[])}var x=function(e,t){var n=e.prefixCls,o=e.columns,a=e.children,c=e.expandable,f=e.expandedKeys,x=e.columnTitle,b=e.getRowKey,w=e.onTriggerExpand,C=e.expandIcon,k=e.rowExpandable,S=e.expandIconColumnIndex,_=e.direction,j=e.expandRowByClick,N=e.columnWidth,E=e.fixed,A=e.scrollWidth,Z=e.clientWidth,I=u.useMemo((function(){return g((o||v(a)||[]).slice())}),[o,a]),D=u.useMemo((function(){if(c){var e=I.slice();if(!e.includes(d.w)){var t=S||0;t>=0&&(t||"left"===E||!E)&&e.splice(t,0,d.w),"right"===E&&e.splice(I.length,0,d.w)}0;var i=e.indexOf(d.w);e=e.filter((function(e,t){return e!==d.w||t===i}));var o,a=I[i];o=E||(a?a.fixed:null);var l=(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)({},h.v,{className:"".concat(n,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",x),"fixed",o),"className","".concat(n,"-row-expand-icon-cell")),"width",N),"render",(function(e,t,i){var r=b(t,i),o=f.has(r),a=!k||k(t),l=C({prefixCls:n,expanded:o,expandable:a,record:t,onExpand:w});return j?u.createElement("span",{onClick:function(e){return e.stopPropagation()}},l):l}));return e.map((function(e){return e===d.w?l:e}))}return I.filter((function(e){return e!==d.w}))}),[c,I,b,f,C,_]),T=u.useMemo((function(){var e=D;return t&&(e=t(e)),e.length||(e=[{render:function(){return null}}]),e}),[t,D,_]),P=u.useMemo((function(){return"rtl"===_?function(e){return e.map((function(e){var t=e.fixed,n=(0,s.Z)(e,m),i=t;return"left"===t?i="right":"right"===t&&(i="left"),(0,l.Z)({fixed:i},n)}))}(y(T)):y(T)}),[T,_,A]),M=u.useMemo((function(){for(var e=-1,t=P.length-1;t>=0;t-=1){var n=P[t].fixed;if("left"===n||!0===n){e=t;break}}if(e>=0)for(var i=0;i<=e;i+=1){var r=P[i].fixed;if("left"!==r&&!0!==r)return!0}var o=P.findIndex((function(e){return"right"===e.fixed}));if(o>=0)for(var a=o;a<P.length;a+=1){if("right"!==P[a].fixed)return!0}return!1}),[P]),L=function(e,t,n){return u.useMemo((function(){if(t&&t>0){var i=0,r=0;e.forEach((function(e){var n=p(t,e.width);n?i+=n:r+=1}));var o=Math.max(t,n),a=Math.max(o-i,r),s=r,c=a/r,u=0,d=e.map((function(e){var n=(0,l.Z)({},e),i=p(t,n.width);if(i)n.width=i;else{var r=Math.floor(c);n.width=1===s?a:r,a-=r,s-=1}return u+=n.width,n}));if(u<o){var h=o/u;a=o,d.forEach((function(e,t){var n=Math.floor(e.width*h);e.width=t===d.length-1?a:n,a-=n}))}return[d,Math.max(u,o)]}return[e,t]}),[e,t,n])}(P,A,Z),B=(0,i.Z)(L,2),R=B[0],O=B[1];return[T,R,O,M]}},4030:function(e,t,n){"use strict";n.d(t,{w2:function(){return i.w},vP:function(){return oe.v},RQ:function(){return i.R},ER:function(){return H},Q$:function(){return De},TN:function(){return Ve}});var i=n(86351),r=n(42978),o=n(6089),a=n(34280),l=n(13697),s=n(59301),c=n(4676);function u(e){var t=s.createContext(void 0);return{Context:t,Provider:function(e){var n=e.value,i=e.children,o=s.useRef(n);o.current=n;var l=s.useState((function(){return{getValue:function(){return o.current},listeners:new Set}})),u=(0,r.Z)(l,1)[0];return(0,a.Z)((function(){(0,c.unstable_batchedUpdates)((function(){u.listeners.forEach((function(e){e(n)}))}))}),[n]),s.createElement(t.Provider,{value:u},i)},defaultValue:e}}function d(e,t){var n=(0,o.Z)("function"==typeof t?t:function(e){if(void 0===t)return e;if(!Array.isArray(t))return e[t];var n={};return t.forEach((function(t){n[t]=e[t]})),n}),i=s.useContext(null==e?void 0:e.Context),c=i||{},u=c.listeners,d=c.getValue,h=s.useRef();h.current=n(i?d():null==e?void 0:e.defaultValue);var p=s.useState({}),f=(0,r.Z)(p,2)[1];return(0,a.Z)((function(){if(i)return u.add(e),function(){u.delete(e)};function e(e){var t=n(e);(0,l.Z)(h.current,t,!0)||f({})}}),[i]),h.current}var h=n(54476),p=n(8654);function f(){var e=s.createContext(null);function t(){return s.useContext(e)}return{makeImmutable:function(n,i){var r=(0,p.Yr)(n),o=function(o,a){var l=r?{ref:a}:{},c=s.useRef(0),u=s.useRef(o);return null!==t()?s.createElement(n,(0,h.Z)({},o,l)):(i&&!i(u.current,o)||(c.current+=1),u.current=o,s.createElement(e.Provider,{value:c.current},s.createElement(n,(0,h.Z)({},o,l))))};return r?s.forwardRef(o):o},responseImmutable:function(e,n){var i=(0,p.Yr)(e),r=function(n,r){var o=i?{ref:r}:{};return t(),s.createElement(e,(0,h.Z)({},n,o))};return i?s.memo(s.forwardRef(r),n):s.memo(r,n)},useImmutableMark:t}}var m=f(),v=(m.makeImmutable,m.responseImmutable,m.useImmutableMark,f()),g=v.makeImmutable,y=v.responseImmutable,x=v.useImmutableMark,b=u();var w=n(76190),C=n(33885),k=n(20068),S=n(92310),_=n.n(S),j=n(80547),N=n(97938),E=(n(48736),s.createContext({renderWithProps:!1}));function A(e){var t=[],n={};return e.forEach((function(e){for(var i,r=e||{},o=r.key,a=r.dataIndex,l=o||(i=a,null==i?[]:Array.isArray(i)?i:[i]).join("-")||"RC_TABLE_KEY";n[l];)l="".concat(l,"_next");n[l]=!0,t.push(l)})),t}function Z(e){return null!=e}function I(e,t,n,i,o,a){var c=s.useContext(E),u=x();return(0,j.Z)((function(){if(Z(i))return[i];var r,a=null==t||""===t?[]:Array.isArray(t)?t:[t],l=(0,N.Z)(e,a),u=l,d=void 0;if(o){var h=o(l,e,n);!(r=h)||"object"!==(0,w.Z)(r)||Array.isArray(r)||s.isValidElement(r)?u=h:(u=h.children,d=h.props,c.renderWithProps=!0)}return[u,d]}),[u,e,i,t,o,n],(function(e,t){if(a){var n=(0,r.Z)(e,2)[1],i=(0,r.Z)(t,2)[1];return a(i,n)}return!!c.renderWithProps||!(0,l.Z)(e,t,!0)}))}var D=n(70425);function T(e){var t,n,i,o,a,l,c,u;var p=e.component,f=e.children,m=e.ellipsis,v=e.scope,g=e.prefixCls,y=e.className,x=e.align,S=e.record,j=e.render,N=e.dataIndex,E=e.renderIndex,A=e.shouldCellUpdate,Z=e.index,T=e.rowType,P=e.colSpan,M=e.rowSpan,L=e.fixLeft,B=e.fixRight,R=e.firstFixLeft,O=e.lastFixLeft,F=e.firstFixRight,W=e.lastFixRight,H=e.appendNode,z=e.additionalProps,G=void 0===z?{}:z,V=e.isSticky,K="".concat(g,"-cell"),U=d(b,["supportSticky","allColumnsFixedLeft","rowHoverable"]),q=U.supportSticky,Y=U.allColumnsFixedLeft,X=U.rowHoverable,J=I(S,N,E,f,j,A),Q=(0,r.Z)(J,2),$=Q[0],ee=Q[1],te={},ne="number"==typeof L&&q,ie="number"==typeof B&&q;ne&&(te.position="sticky",te.left=L),ie&&(te.position="sticky",te.right=B);var re=null!==(t=null!==(n=null!==(i=null==ee?void 0:ee.colSpan)&&void 0!==i?i:G.colSpan)&&void 0!==n?n:P)&&void 0!==t?t:1,oe=null!==(o=null!==(a=null!==(l=null==ee?void 0:ee.rowSpan)&&void 0!==l?l:G.rowSpan)&&void 0!==a?a:M)&&void 0!==o?o:1,ae=function(e,t){return d(b,(function(n){var i,r,o,a;return[(i=e,r=t||1,o=n.hoverStartRow,a=n.hoverEndRow,i<=a&&i+r-1>=o),n.onHover]}))}(Z,oe),le=(0,r.Z)(ae,2),se=le[0],ce=le[1],ue=(0,D.zX)((function(e){var t;S&&ce(Z,Z+oe-1),null==G||null===(t=G.onMouseEnter)||void 0===t||t.call(G,e)})),de=(0,D.zX)((function(e){var t;S&&ce(-1,-1),null==G||null===(t=G.onMouseLeave)||void 0===t||t.call(G,e)}));if(0===re||0===oe)return null;var he=null!==(c=G.title)&&void 0!==c?c:function(e){var t,n=e.ellipsis,i=e.rowType,r=e.children,o=!0===n?{showTitle:!0}:n;return o&&(o.showTitle||"header"===i)&&("string"==typeof r||"number"==typeof r?t=r.toString():s.isValidElement(r)&&"string"==typeof r.props.children&&(t=r.props.children)),t}({rowType:T,ellipsis:m,children:$}),pe=_()(K,y,(u={},(0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)(u,"".concat(K,"-fix-left"),ne&&q),"".concat(K,"-fix-left-first"),R&&q),"".concat(K,"-fix-left-last"),O&&q),"".concat(K,"-fix-left-all"),O&&Y&&q),"".concat(K,"-fix-right"),ie&&q),"".concat(K,"-fix-right-first"),F&&q),"".concat(K,"-fix-right-last"),W&&q),"".concat(K,"-ellipsis"),m),"".concat(K,"-with-append"),H),"".concat(K,"-fix-sticky"),(ne||ie)&&V&&q),(0,k.Z)(u,"".concat(K,"-row-hover"),!ee&&se)),G.className,null==ee?void 0:ee.className),fe={};x&&(fe.textAlign=x);var me=(0,C.Z)((0,C.Z)((0,C.Z)((0,C.Z)({},null==ee?void 0:ee.style),te),fe),G.style),ve=$;return"object"!==(0,w.Z)(ve)||Array.isArray(ve)||s.isValidElement(ve)||(ve=null),m&&(O||F)&&(ve=s.createElement("span",{className:"".concat(K,"-content")},ve)),s.createElement(p,(0,h.Z)({},ee,G,{className:pe,style:me,title:he,scope:v,onMouseEnter:X?ue:void 0,onMouseLeave:X?de:void 0,colSpan:1!==re?re:null,rowSpan:1!==oe?oe:null}),H,ve)}var P=s.memo(T);function M(e,t,n,i,r){var o,a,l=n[e]||{},s=n[t]||{};"left"===l.fixed?o=i.left["rtl"===r?t:e]:"right"===s.fixed&&(a=i.right["rtl"===r?e:t]);var c=!1,u=!1,d=!1,h=!1,p=n[t+1],f=n[e-1],m=p&&!p.fixed||f&&!f.fixed||n.every((function(e){return"left"===e.fixed}));if("rtl"===r){if(void 0!==o)h=!(f&&"left"===f.fixed)&&m;else if(void 0!==a){d=!(p&&"right"===p.fixed)&&m}}else if(void 0!==o){c=!(p&&"left"===p.fixed)&&m}else if(void 0!==a){u=!(f&&"right"===f.fixed)&&m}return{fixLeft:o,fixRight:a,lastFixLeft:c,firstFixRight:u,lastFixRight:d,firstFixLeft:h,isSticky:i.isSticky}}var L=s.createContext({});var B=n(75931),R=["children"];function O(e){return e.children}O.Row=function(e){var t=e.children,n=(0,B.Z)(e,R);return s.createElement("tr",n,t)},O.Cell=function(e){var t=e.className,n=e.index,i=e.children,r=e.colSpan,o=void 0===r?1:r,a=e.rowSpan,l=e.align,c=d(b,["prefixCls","direction"]),u=c.prefixCls,p=c.direction,f=s.useContext(L),m=f.scrollColumnIndex,v=f.stickyOffsets,g=n+o-1+1===m?o+1:o,y=M(n,n+g-1,f.flattenColumns,v,p);return s.createElement(P,(0,h.Z)({className:t,index:n,component:"td",prefixCls:u,record:null,dataIndex:null,align:l,colSpan:g,rowSpan:a,render:function(){return i}},y))};var F=O;var W=y((function(e){var t=e.children,n=e.stickyOffsets,i=e.flattenColumns,r=d(b,"prefixCls"),o=i.length-1,a=i[o],l=s.useMemo((function(){return{stickyOffsets:n,flattenColumns:i,scrollColumnIndex:null!=a&&a.scrollbar?o:null}}),[a,i,o,n]);return s.createElement(L.Provider,{value:l},s.createElement("tfoot",{className:"".concat(r,"-summary")},t))})),H=F,z=n(29301),G=n(24514),V=n(75152),K=n(26112);function U(e,t,n,i,r,o,a){e.push({record:t,indent:n,index:a});var l=o(t),s=null==r?void 0:r.has(l);if(t&&Array.isArray(t[i])&&s)for(var c=0;c<t[i].length;c+=1)U(e,t[i][c],n+1,i,r,o,c)}function q(e,t,n,i){return s.useMemo((function(){if(null!=n&&n.size){for(var r=[],o=0;o<(null==e?void 0:e.length);o+=1){U(r,e[o],0,t,n,i,o)}return r}return null==e?void 0:e.map((function(e,t){return{record:e,indent:0,index:t}}))}),[e,t,n,i])}function Y(e,t,n,i){var r,o=d(b,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),a=o.flattenColumns,l=o.expandableType,s=o.expandedKeys,c=o.childrenColumnName,u=o.onTriggerExpand,h=o.rowExpandable,p=o.onRow,f=o.expandRowByClick,m=o.rowClassName,v="nest"===l,g="row"===l&&(!h||h(e)),y=g||v,x=s&&s.has(t),w=c&&e&&e[c],k=(0,D.zX)(u),S=null==p?void 0:p(e,n),j=null==S?void 0:S.onClick;"string"==typeof m?r=m:"function"==typeof m&&(r=m(e,n,i));var N=A(a);return(0,C.Z)((0,C.Z)({},o),{},{columnsKey:N,nestExpandable:v,expanded:x,hasNestChildren:w,record:e,onTriggerExpand:k,rowSupportExpand:g,expandable:y,rowProps:(0,C.Z)((0,C.Z)({},S),{},{className:_()(r,null==S?void 0:S.className),onClick:function(t){f&&y&&u(e,t);for(var n=arguments.length,i=new Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];null==j||j.apply(void 0,[t].concat(i))}})})}var X=function(e){var t=e.prefixCls,n=e.children,i=e.component,r=e.cellComponent,o=e.className,a=e.expanded,l=e.colSpan,c=e.isEmpty,u=d(b,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),h=u.scrollbarSize,p=u.fixHeader,f=u.fixColumn,m=u.componentWidth,v=u.horizonScroll,g=n;return(c?v&&m:f)&&(g=s.createElement("div",{style:{width:m-(p&&!c?h:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(t,"-expanded-row-fixed")},g)),s.createElement(i,{className:o,style:{display:a?null:"none"}},s.createElement(P,{component:r,prefixCls:t,colSpan:l},g))};function J(e){var t=e.prefixCls,n=e.record,i=e.onExpand,r=e.expanded,o=e.expandable,a="".concat(t,"-row-expand-icon");if(!o)return s.createElement("span",{className:_()(a,"".concat(t,"-row-spaced"))});return s.createElement("span",{className:_()(a,(0,k.Z)((0,k.Z)({},"".concat(t,"-row-expanded"),r),"".concat(t,"-row-collapsed"),!r)),onClick:function(e){i(n,e),e.stopPropagation()}})}function Q(e,t,n,i){return"string"==typeof e?e:"function"==typeof e?e(t,n,i):""}function $(e,t,n,i,r){var o,a,l=e.record,c=e.prefixCls,u=e.columnsKey,d=e.fixedInfoList,h=e.expandIconColumnIndex,p=e.nestExpandable,f=e.indentSize,m=e.expandIcon,v=e.expanded,g=e.hasNestChildren,y=e.onTriggerExpand,x=u[n],b=d[n];return n===(h||0)&&p&&(o=s.createElement(s.Fragment,null,s.createElement("span",{style:{paddingLeft:"".concat(f*i,"px")},className:"".concat(c,"-row-indent indent-level-").concat(i)}),m({prefixCls:c,expanded:v,expandable:g,record:l,onExpand:y}))),t.onCell&&(a=t.onCell(l,r)),{key:x,fixedInfo:b,appendCellNode:o,additionalCellProps:a||{}}}var ee=y((function(e){var t=e.className,n=e.style,i=e.record,r=e.index,o=e.renderIndex,a=e.rowKey,l=e.indent,c=void 0===l?0:l,u=e.rowComponent,d=e.cellComponent,p=e.scopeCellComponent,f=Y(i,a,r,c),m=f.prefixCls,v=f.flattenColumns,g=f.expandedRowClassName,y=f.expandedRowRender,x=f.rowProps,b=f.expanded,w=f.rowSupportExpand,S=s.useRef(!1);S.current||(S.current=b);var j,N=Q(g,i,r,c),E=s.createElement(u,(0,h.Z)({},x,{"data-row-key":a,className:_()(t,"".concat(m,"-row"),"".concat(m,"-row-level-").concat(c),null==x?void 0:x.className,(0,k.Z)({},N,c>=1)),style:(0,C.Z)((0,C.Z)({},n),null==x?void 0:x.style)}),v.map((function(e,t){var n=e.render,a=e.dataIndex,l=e.className,u=$(f,e,t,c,r),v=u.key,g=u.fixedInfo,y=u.appendCellNode,x=u.additionalCellProps;return s.createElement(P,(0,h.Z)({className:l,ellipsis:e.ellipsis,align:e.align,scope:e.rowScope,component:e.rowScope?p:d,prefixCls:m,key:v,record:i,index:r,renderIndex:o,dataIndex:a,render:n,shouldCellUpdate:e.shouldCellUpdate},g,{appendNode:y,additionalProps:x}))})));if(w&&(S.current||b)){var A=y(i,r,c+1,b);j=s.createElement(X,{expanded:b,className:_()("".concat(m,"-expanded-row"),"".concat(m,"-expanded-row-level-").concat(c+1),N),prefixCls:m,component:u,cellComponent:d,colSpan:v.length,isEmpty:!1},A)}return s.createElement(s.Fragment,null,E,j)}));function te(e){var t=e.columnKey,n=e.onColumnResize,i=s.useRef();return(0,a.Z)((function(){i.current&&n(t,i.current.offsetWidth)}),[]),s.createElement(z.Z,{data:t},s.createElement("td",{ref:i,style:{padding:0,border:0,height:0}},s.createElement("div",{style:{height:0,overflow:"hidden"}}," ")))}var ne=n(29194);function ie(e){var t=e.prefixCls,n=e.columnsKey,i=e.onColumnResize,r=s.useRef(null);return s.createElement("tr",{"aria-hidden":"true",className:"".concat(t,"-measure-row"),style:{height:0,fontSize:0},ref:r},s.createElement(z.Z.Collection,{onBatchResize:function(e){(0,ne.Z)(r.current)&&e.forEach((function(e){var t=e.data,n=e.size;i(t,n.offsetWidth)}))}},n.map((function(e){return s.createElement(te,{key:e,columnKey:e,onColumnResize:i})}))))}var re=y((function(e){var t,n=e.data,i=e.measureColumnWidth,r=d(b,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),o=r.prefixCls,a=r.getComponent,l=r.onColumnResize,c=r.flattenColumns,u=r.getRowKey,h=r.expandedKeys,p=r.childrenColumnName,f=r.emptyNode,m=q(n,p,h,u),v=s.useRef({renderWithProps:!1}),g=a(["body","wrapper"],"tbody"),y=a(["body","row"],"tr"),x=a(["body","cell"],"td"),w=a(["body","cell"],"th");t=n.length?m.map((function(e,t){var n=e.record,i=e.indent,r=e.index,o=u(n,t);return s.createElement(ee,{key:o,rowKey:o,record:n,index:t,renderIndex:r,rowComponent:y,cellComponent:x,scopeCellComponent:w,indent:i})})):s.createElement(X,{expanded:!0,className:"".concat(o,"-placeholder"),prefixCls:o,component:y,cellComponent:x,colSpan:c.length,isEmpty:!0},f);var C=A(c);return s.createElement(E.Provider,{value:v.current},s.createElement(g,{className:"".concat(o,"-tbody")},i&&s.createElement(ie,{prefixCls:o,columnsKey:C,onColumnResize:l}),t))})),oe=n(54451),ae=["columnType"];var le=function(e){for(var t=e.colWidths,n=e.columns,i=e.columCount,r=d(b,["tableLayout"]).tableLayout,o=[],a=!1,l=(i||n.length)-1;l>=0;l-=1){var c=t[l],u=n&&n[l],p=void 0,f=void 0;if(u&&(p=u[oe.v],"auto"===r&&(f=u.minWidth)),c||f||p||a){var m=p||{},v=(m.columnType,(0,B.Z)(m,ae));o.unshift(s.createElement("col",(0,h.Z)({key:l,style:{width:c,minWidth:f}},v))),a=!0}}return s.createElement("colgroup",null,o)},se=n(94480),ce=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];var ue=s.forwardRef((function(e,t){var n=e.className,i=e.noData,r=e.columns,o=e.flattenColumns,a=e.colWidths,l=e.columCount,c=e.stickyOffsets,u=e.direction,h=e.fixHeader,f=e.stickyTopOffset,m=e.stickyBottomOffset,v=e.stickyClassName,g=e.onScroll,y=e.maxContentScroll,x=e.children,w=(0,B.Z)(e,ce),S=d(b,["prefixCls","scrollbarSize","isSticky","getComponent"]),j=S.prefixCls,N=S.scrollbarSize,E=S.isSticky,A=(0,S.getComponent)(["header","table"],"table"),Z=E&&!h?0:N,I=s.useRef(null),D=s.useCallback((function(e){(0,p.mH)(t,e),(0,p.mH)(I,e)}),[]);s.useEffect((function(){var e;function t(e){var t=e,n=t.currentTarget,i=t.deltaX;i&&(g({currentTarget:n,scrollLeft:n.scrollLeft+i}),e.preventDefault())}return null===(e=I.current)||void 0===e||e.addEventListener("wheel",t,{passive:!1}),function(){var e;null===(e=I.current)||void 0===e||e.removeEventListener("wheel",t)}}),[]);var T=s.useMemo((function(){return o.every((function(e){return e.width}))}),[o]),P=o[o.length-1],M={fixed:P?P.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(j,"-cell-scrollbar")}}},L=(0,s.useMemo)((function(){return Z?[].concat((0,se.Z)(r),[M]):r}),[Z,r]),R=(0,s.useMemo)((function(){return Z?[].concat((0,se.Z)(o),[M]):o}),[Z,o]),O=(0,s.useMemo)((function(){var e=c.right,t=c.left;return(0,C.Z)((0,C.Z)({},c),{},{left:"rtl"===u?[].concat((0,se.Z)(t.map((function(e){return e+Z}))),[0]):t,right:"rtl"===u?e:[].concat((0,se.Z)(e.map((function(e){return e+Z}))),[0]),isSticky:E})}),[Z,c,E]),F=function(e,t){return(0,s.useMemo)((function(){for(var n=[],i=0;i<t;i+=1){var r=e[i];if(void 0===r)return null;n[i]=r}return n}),[e.join("_"),t])}(a,l);return s.createElement("div",{style:(0,C.Z)({overflow:"hidden"},E?{top:f,bottom:m}:{}),ref:D,className:_()(n,(0,k.Z)({},v,!!v))},s.createElement(A,{style:{tableLayout:"fixed",visibility:i||F?null:"hidden"}},(!i||!y||T)&&s.createElement(le,{colWidths:F?[].concat((0,se.Z)(F),[Z]):[],columCount:l+1,columns:R}),x((0,C.Z)((0,C.Z)({},w),{},{stickyOffsets:O,columns:L,flattenColumns:R}))))}));var de=s.memo(ue);var he=function(e){var t,n=e.cells,i=e.stickyOffsets,r=e.flattenColumns,o=e.rowComponent,a=e.cellComponent,l=e.onHeaderRow,c=e.index,u=d(b,["prefixCls","direction"]),p=u.prefixCls,f=u.direction;l&&(t=l(n.map((function(e){return e.column})),c));var m=A(n.map((function(e){return e.column})));return s.createElement(o,t,n.map((function(e,t){var n,o=e.column,l=M(e.colStart,e.colEnd,r,i,f);return o&&o.onHeaderCell&&(n=e.column.onHeaderCell(o)),s.createElement(P,(0,h.Z)({},e,{scope:o.title?e.colSpan>1?"colgroup":"col":null,ellipsis:o.ellipsis,align:o.align,component:a,prefixCls:p,key:m[t]},l,{additionalProps:n,rowType:"header"}))})))};var pe=y((function(e){var t=e.stickyOffsets,n=e.columns,i=e.flattenColumns,r=e.onHeaderRow,o=d(b,["prefixCls","getComponent"]),a=o.prefixCls,l=o.getComponent,c=s.useMemo((function(){return function(e){var t=[];!function e(n,i){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;t[r]=t[r]||[];var o=i;return n.filter(Boolean).map((function(n){var i={key:n.key,className:n.className||"",children:n.title,column:n,colStart:o},a=1,l=n.children;return l&&l.length>0&&(a=e(l,o,r+1).reduce((function(e,t){return e+t}),0),i.hasSubColumns=!0),"colSpan"in n&&(a=n.colSpan),"rowSpan"in n&&(i.rowSpan=n.rowSpan),i.colSpan=a,i.colEnd=i.colStart+a-1,t[r].push(i),o+=a,a}))}(e,0);for(var n=t.length,i=function(e){t[e].forEach((function(t){"rowSpan"in t||t.hasSubColumns||(t.rowSpan=n-e)}))},r=0;r<n;r+=1)i(r);return t}(n)}),[n]),u=l(["header","wrapper"],"thead"),h=l(["header","row"],"tr"),p=l(["header","cell"],"th");return s.createElement(u,{className:"".concat(a,"-thead")},c.map((function(e,n){return s.createElement(he,{key:n,flattenColumns:i,cells:e,stickyOffsets:t,rowComponent:h,cellComponent:p,onHeaderRow:r,index:n})})))})),fe=n(97347);var me=(0,n(47273).Z)()?window:null;var ve=function(e,t,n){return(0,s.useMemo)((function(){var i=t.length,r=function(n,i,r){for(var o=[],a=0,l=n;l!==i;l+=r)o.push(a),t[l].fixed&&(a+=e[l]||0);return o},o=r(0,i,1),a=r(i-1,-1,-1).reverse();return"rtl"===n?{left:a,right:o}:{left:o,right:a}}),[e,t,n])};var ge=function(e){var t=e.className,n=e.children;return s.createElement("div",{className:t},n)},ye=n(8224),xe=n(16089),be=n(76846);function we(e){var t=(0,be.bn)(e).getBoundingClientRect(),n=document.documentElement;return{left:t.left+(window.pageXOffset||n.scrollLeft)-(n.clientLeft||document.body.clientLeft||0),top:t.top+(window.pageYOffset||n.scrollTop)-(n.clientTop||document.body.clientTop||0)}}var Ce=function(e,t){var n,i,o,a,l,c,u,h,p=e.scrollBodyRef,f=e.onScroll,m=e.offsetScroll,v=e.container,g=e.direction,y=d(b,"prefixCls"),x=(null===(n=p.current)||void 0===n?void 0:n.scrollWidth)||0,w=(null===(i=p.current)||void 0===i?void 0:i.clientWidth)||0,S=x&&w*(w/x),j=s.useRef(),N=(o={scrollLeft:0,isHiddenScrollBar:!0},a=(0,s.useRef)(o),l=(0,s.useState)({}),c=(0,r.Z)(l,2)[1],u=(0,s.useRef)(null),h=(0,s.useRef)([]),(0,s.useEffect)((function(){return function(){u.current=null}}),[]),[a.current,function(e){h.current.push(e);var t=Promise.resolve();u.current=t,t.then((function(){if(u.current===t){var e=h.current,n=a.current;h.current=[],e.forEach((function(e){a.current=e(a.current)})),u.current=null,n!==a.current&&c({})}}))}]),E=(0,r.Z)(N,2),A=E[0],Z=E[1],I=s.useRef({delta:0,x:0}),D=s.useState(!1),T=(0,r.Z)(D,2),P=T[0],M=T[1],L=s.useRef(null);s.useEffect((function(){return function(){xe.Z.cancel(L.current)}}),[]);var B=function(){M(!1)},R=function(e){var t,n=(e||(null===(t=window)||void 0===t?void 0:t.event)).buttons;if(P&&0!==n){var i=I.current.x+e.pageX-I.current.x-I.current.delta,r="rtl"===g;i=Math.max(r?S-w:0,Math.min(r?0:w-S,i)),(!r||Math.abs(i)+Math.abs(S)<w)&&(f({scrollLeft:i/w*(x+2)}),I.current.x=e.pageX)}else P&&M(!1)},O=function(){xe.Z.cancel(L.current),L.current=(0,xe.Z)((function(){if(p.current){var e=we(p.current).top,t=e+p.current.offsetHeight,n=v===window?document.documentElement.scrollTop+window.innerHeight:we(v).top+v.clientHeight;t-(0,V.Z)()<=n||e>=n-m?Z((function(e){return(0,C.Z)((0,C.Z)({},e),{},{isHiddenScrollBar:!0})})):Z((function(e){return(0,C.Z)((0,C.Z)({},e),{},{isHiddenScrollBar:!1})}))}}))},F=function(e){Z((function(t){return(0,C.Z)((0,C.Z)({},t),{},{scrollLeft:e/x*w||0})}))};return s.useImperativeHandle(t,(function(){return{setScrollLeft:F,checkScrollBarVisible:O}})),s.useEffect((function(){var e=(0,ye.Z)(document.body,"mouseup",B,!1),t=(0,ye.Z)(document.body,"mousemove",R,!1);return O(),function(){e.remove(),t.remove()}}),[S,P]),s.useEffect((function(){if(p.current){for(var e=[],t=(0,be.bn)(p.current);t;)e.push(t),t=t.parentElement;return e.forEach((function(e){return e.addEventListener("scroll",O,!1)})),window.addEventListener("resize",O,!1),window.addEventListener("scroll",O,!1),v.addEventListener("scroll",O,!1),function(){e.forEach((function(e){return e.removeEventListener("scroll",O)})),window.removeEventListener("resize",O),window.removeEventListener("scroll",O),v.removeEventListener("scroll",O)}}}),[v]),s.useEffect((function(){A.isHiddenScrollBar||Z((function(e){var t=p.current;return t?(0,C.Z)((0,C.Z)({},e),{},{scrollLeft:t.scrollLeft/t.scrollWidth*t.clientWidth}):e}))}),[A.isHiddenScrollBar]),x<=w||!S||A.isHiddenScrollBar?null:s.createElement("div",{style:{height:(0,V.Z)(),width:w,bottom:m},className:"".concat(y,"-sticky-scroll")},s.createElement("div",{onMouseDown:function(e){e.persist(),I.current.delta=e.pageX-A.scrollLeft,I.current.x=0,M(!0),e.preventDefault()},ref:j,className:_()("".concat(y,"-sticky-scroll-bar"),(0,k.Z)({},"".concat(y,"-sticky-scroll-bar-active"),P)),style:{width:"".concat(S,"px"),transform:"translate3d(".concat(A.scrollLeft,"px, 0, 0)")}}))},ke=s.forwardRef(Ce);var Se=function(e){return null};var _e=function(e){return null},je="rc-table",Ne=[],Ee={};function Ae(){return"No Data"}function Ze(e,t){var n=(0,C.Z)({rowKey:"key",prefixCls:je,emptyText:Ae},e),c=n.prefixCls,u=n.className,d=n.rowClassName,p=n.style,f=n.data,m=n.rowKey,v=n.scroll,g=n.tableLayout,y=n.direction,x=n.title,S=n.footer,E=n.summary,I=n.caption,D=n.id,T=n.showHeader,P=n.components,L=n.emptyText,B=n.onRow,R=n.onHeaderRow,O=n.onScroll,H=n.internalHooks,U=n.transformColumns,q=n.internalRefs,Y=n.tailor,X=n.getContainerWidth,Q=n.sticky,$=n.rowHoverable,ee=void 0===$||$,te=f||Ne,ne=!!te.length,ie=H===i.R;var ae=s.useCallback((function(e,t){return(0,N.Z)(P,e)||t}),[P]),ce=s.useMemo((function(){return"function"==typeof m?m:function(e){return e&&e[m]}}),[m]),ue=ae(["body"]),he=function(){var e=s.useState(-1),t=(0,r.Z)(e,2),n=t[0],i=t[1],o=s.useState(-1),a=(0,r.Z)(o,2),l=a[0],c=a[1];return[n,l,s.useCallback((function(e,t){i(e),c(t)}),[])]}(),ye=(0,r.Z)(he,3),xe=ye[0],we=ye[1],Ce=ye[2],Se=function(e,t,n){var o=(0,oe.g)(e),a=o.expandIcon,l=o.expandedRowKeys,c=o.defaultExpandedRowKeys,u=o.defaultExpandAllRows,d=o.expandedRowRender,h=o.onExpand,p=o.onExpandedRowsChange,f=a||J,m=o.childrenColumnName||"children",v=s.useMemo((function(){return d?"row":!!(e.expandable&&e.internalHooks===i.R&&e.expandable.__PARENT_RENDER_ICON__||t.some((function(e){return e&&"object"===(0,w.Z)(e)&&e[m]})))&&"nest"}),[!!d,t]),g=s.useState((function(){return c||(u?function(e,t,n){var i=[];return function e(r){(r||[]).forEach((function(r,o){i.push(t(r,o)),e(r[n])}))}(e),i}(t,n,m):[])})),y=(0,r.Z)(g,2),x=y[0],b=y[1],C=s.useMemo((function(){return new Set(l||x||[])}),[l,x]),k=s.useCallback((function(e){var i,r=n(e,t.indexOf(e)),o=C.has(r);o?(C.delete(r),i=(0,se.Z)(C)):i=[].concat((0,se.Z)(C),[r]),b(i),h&&h(!o,e),p&&p(i)}),[n,C,t,h,p]);return[o,v,C,f,m,k]}(n,te,ce),_e=(0,r.Z)(Se,6),Ze=_e[0],Ie=_e[1],De=_e[2],Te=_e[3],Pe=_e[4],Me=_e[5],Le=null==v?void 0:v.x,Be=s.useState(0),Re=(0,r.Z)(Be,2),Oe=Re[0],Fe=Re[1],We=(0,fe.Z)((0,C.Z)((0,C.Z)((0,C.Z)({},n),Ze),{},{expandable:!!Ze.expandedRowRender,columnTitle:Ze.columnTitle,expandedKeys:De,getRowKey:ce,onTriggerExpand:Me,expandIcon:Te,expandIconColumnIndex:Ze.expandIconColumnIndex,direction:y,scrollWidth:ie&&Y&&"number"==typeof Le?Le:null,clientWidth:Oe}),ie?U:null),He=(0,r.Z)(We,4),ze=He[0],Ge=He[1],Ve=He[2],Ke=He[3],Ue=null!=Ve?Ve:Le,qe=s.useMemo((function(){return{columns:ze,flattenColumns:Ge}}),[ze,Ge]),Ye=s.useRef(),Xe=s.useRef(),Je=s.useRef(),Qe=s.useRef();s.useImperativeHandle(t,(function(){return{nativeElement:Ye.current,scrollTo:function(e){var t,n;if(Je.current instanceof HTMLElement){var i=e.index,r=e.top,o=e.key;if("number"!=typeof(n=r)||Number.isNaN(n)){var a,l=null!=o?o:ce(te[i]);null===(a=Je.current.querySelector('[data-row-key="'.concat(l,'"]')))||void 0===a||a.scrollIntoView()}else{var s;null===(s=Je.current)||void 0===s||s.scrollTo({top:r})}}else null!==(t=Je.current)&&void 0!==t&&t.scrollTo&&Je.current.scrollTo(e)}}}));var $e,et,tt,nt=s.useRef(),it=s.useState(!1),rt=(0,r.Z)(it,2),ot=rt[0],at=rt[1],lt=s.useState(!1),st=(0,r.Z)(lt,2),ct=st[0],ut=st[1],dt=s.useState(new Map),ht=(0,r.Z)(dt,2),pt=ht[0],ft=ht[1],mt=A(Ge).map((function(e){return pt.get(e)})),vt=s.useMemo((function(){return mt}),[mt.join("_")]),gt=ve(vt,Ge,y),yt=v&&Z(v.y),xt=v&&Z(Ue)||Boolean(Ze.fixed),bt=xt&&Ge.some((function(e){return e.fixed})),wt=s.useRef(),Ct=function(e,t){var n="object"===(0,w.Z)(e)?e:{},i=n.offsetHeader,r=void 0===i?0:i,o=n.offsetSummary,a=void 0===o?0:o,l=n.offsetScroll,c=void 0===l?0:l,u=n.getContainer,d=(void 0===u?function(){return me}:u)()||me,h=!!e;return s.useMemo((function(){return{isSticky:h,stickyClassName:h?"".concat(t,"-sticky-holder"):"",offsetHeader:r,offsetSummary:a,offsetScroll:c,container:d}}),[h,c,r,a,t,d])}(Q,c),kt=Ct.isSticky,St=Ct.offsetHeader,_t=Ct.offsetSummary,jt=Ct.offsetScroll,Nt=Ct.stickyClassName,Et=Ct.container,At=s.useMemo((function(){return null==E?void 0:E(te)}),[E,te]),Zt=(yt||kt)&&s.isValidElement(At)&&At.type===F&&At.props.fixed;yt&&(et={overflowY:ne?"scroll":"auto",maxHeight:v.y}),xt&&($e={overflowX:"auto"},yt||(et={overflowY:"hidden"}),tt={width:!0===Ue?"auto":Ue,minWidth:"100%"});var It=s.useCallback((function(e,t){ft((function(n){if(n.get(e)!==t){var i=new Map(n);return i.set(e,t),i}return n}))}),[]),Dt=function(e){var t=(0,s.useRef)(e||null),n=(0,s.useRef)();function i(){window.clearTimeout(n.current)}return(0,s.useEffect)((function(){return i}),[]),[function(e){t.current=e,i(),n.current=window.setTimeout((function(){t.current=null,n.current=void 0}),100)},function(){return t.current}]}(null),Tt=(0,r.Z)(Dt,2),Pt=Tt[0],Mt=Tt[1];function Lt(e,t){t&&("function"==typeof t?t(e):t.scrollLeft!==e&&(t.scrollLeft=e,t.scrollLeft!==e&&setTimeout((function(){t.scrollLeft=e}),0)))}var Bt=(0,o.Z)((function(e){var t,n=e.currentTarget,i=e.scrollLeft,r="rtl"===y,o="number"==typeof i?i:n.scrollLeft,a=n||Ee;Mt()&&Mt()!==a||(Pt(a),Lt(o,Xe.current),Lt(o,Je.current),Lt(o,nt.current),Lt(o,null===(t=wt.current)||void 0===t?void 0:t.setScrollLeft));var l=n||Xe.current;if(l){var s=ie&&Y&&"number"==typeof Ue?Ue:l.scrollWidth,c=l.clientWidth;if(s===c)return at(!1),void ut(!1);r?(at(-o<s-c),ut(-o>0)):(at(o>0),ut(o<s-c))}})),Rt=(0,o.Z)((function(e){Bt(e),null==O||O(e)})),Ot=function(){var e;xt&&Je.current?Bt({currentTarget:(0,be.bn)(Je.current),scrollLeft:null===(e=Je.current)||void 0===e?void 0:e.scrollLeft}):(at(!1),ut(!1))},Ft=s.useRef(!1);s.useEffect((function(){Ft.current&&Ot()}),[xt,f,ze.length]),s.useEffect((function(){Ft.current=!0}),[]);var Wt=s.useState(0),Ht=(0,r.Z)(Wt,2),zt=Ht[0],Gt=Ht[1],Vt=s.useState(!0),Kt=(0,r.Z)(Vt,2),Ut=Kt[0],qt=Kt[1];(0,a.Z)((function(){Y&&ie||(Je.current instanceof Element?Gt((0,V.o)(Je.current).width):Gt((0,V.o)(Qe.current).width)),qt((0,G.G)("position","sticky"))}),[]),s.useEffect((function(){ie&&q&&(q.body.current=Je.current)}));var Yt,Xt=s.useCallback((function(e){return s.createElement(s.Fragment,null,s.createElement(pe,e),"top"===Zt&&s.createElement(W,e,At))}),[Zt,At]),Jt=s.useCallback((function(e){return s.createElement(W,e,At)}),[At]),Qt=ae(["table"],"table"),$t=s.useMemo((function(){return g||(bt?"max-content"===Ue?"auto":"fixed":yt||kt||Ge.some((function(e){return e.ellipsis}))?"fixed":"auto")}),[yt,bt,Ge,g,kt]),en={colWidths:vt,columCount:Ge.length,stickyOffsets:gt,onHeaderRow:R,fixHeader:yt,scroll:v},tn=s.useMemo((function(){return ne?null:"function"==typeof L?L():L}),[ne,L]),nn=s.createElement(re,{data:te,measureColumnWidth:yt||xt||kt}),rn=s.createElement(le,{colWidths:Ge.map((function(e){return e.width})),columns:Ge}),on=null!=I?s.createElement("caption",{className:"".concat(c,"-caption")},I):void 0,an=(0,K.Z)(n,{data:!0}),ln=(0,K.Z)(n,{aria:!0});if(yt||kt){var sn;"function"==typeof ue?(sn=ue(te,{scrollbarSize:zt,ref:Je,onScroll:Bt}),en.colWidths=Ge.map((function(e,t){var n=e.width,i=t===Ge.length-1?n-zt:n;return"number"!=typeof i||Number.isNaN(i)?0:i}))):sn=s.createElement("div",{style:(0,C.Z)((0,C.Z)({},$e),et),onScroll:Rt,ref:Je,className:_()("".concat(c,"-body"))},s.createElement(Qt,(0,h.Z)({style:(0,C.Z)((0,C.Z)({},tt),{},{tableLayout:$t})},ln),on,rn,nn,!Zt&&At&&s.createElement(W,{stickyOffsets:gt,flattenColumns:Ge},At)));var cn=(0,C.Z)((0,C.Z)((0,C.Z)({noData:!te.length,maxContentScroll:xt&&"max-content"===Ue},en),qe),{},{direction:y,stickyClassName:Nt,onScroll:Bt});Yt=s.createElement(s.Fragment,null,!1!==T&&s.createElement(de,(0,h.Z)({},cn,{stickyTopOffset:St,className:"".concat(c,"-header"),ref:Xe}),Xt),sn,Zt&&"top"!==Zt&&s.createElement(de,(0,h.Z)({},cn,{stickyBottomOffset:_t,className:"".concat(c,"-summary"),ref:nt}),Jt),kt&&Je.current&&Je.current instanceof Element&&s.createElement(ke,{ref:wt,offsetScroll:jt,scrollBodyRef:Je,onScroll:Bt,container:Et,direction:y}))}else Yt=s.createElement("div",{style:(0,C.Z)((0,C.Z)({},$e),et),className:_()("".concat(c,"-content")),onScroll:Bt,ref:Je},s.createElement(Qt,(0,h.Z)({style:(0,C.Z)((0,C.Z)({},tt),{},{tableLayout:$t})},ln),on,rn,!1!==T&&s.createElement(pe,(0,h.Z)({},en,qe)),nn,At&&s.createElement(W,{stickyOffsets:gt,flattenColumns:Ge},At)));var un=s.createElement("div",(0,h.Z)({className:_()(c,u,(0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)((0,k.Z)({},"".concat(c,"-rtl"),"rtl"===y),"".concat(c,"-ping-left"),ot),"".concat(c,"-ping-right"),ct),"".concat(c,"-layout-fixed"),"fixed"===g),"".concat(c,"-fixed-header"),yt),"".concat(c,"-fixed-column"),bt),"".concat(c,"-fixed-column-gapped"),bt&&Ke),"".concat(c,"-scroll-horizontal"),xt),"".concat(c,"-has-fix-left"),Ge[0]&&Ge[0].fixed),"".concat(c,"-has-fix-right"),Ge[Ge.length-1]&&"right"===Ge[Ge.length-1].fixed)),style:p,id:D,ref:Ye},an),x&&s.createElement(ge,{className:"".concat(c,"-title")},x(te)),s.createElement("div",{ref:Qe,className:"".concat(c,"-container")},Yt),S&&s.createElement(ge,{className:"".concat(c,"-footer")},S(te)));xt&&(un=s.createElement(z.Z,{onResize:function(e){var t,n=e.width;null===(t=wt.current)||void 0===t||t.checkScrollBarVisible();var i=Ye.current?Ye.current.offsetWidth:n;ie&&X&&Ye.current&&(i=X(Ye.current,i)||i),i!==Oe&&(Ot(),Fe(i))}},un));var dn=function(e,t,n){var i=e.map((function(i,r){return M(r,r,e,t,n)}));return(0,j.Z)((function(){return i}),[i],(function(e,t){return!(0,l.Z)(e,t)}))}(Ge,gt,y),hn=s.useMemo((function(){return{scrollX:Ue,prefixCls:c,getComponent:ae,scrollbarSize:zt,direction:y,fixedInfoList:dn,isSticky:kt,supportSticky:Ut,componentWidth:Oe,fixHeader:yt,fixColumn:bt,horizonScroll:xt,tableLayout:$t,rowClassName:d,expandedRowClassName:Ze.expandedRowClassName,expandIcon:Te,expandableType:Ie,expandRowByClick:Ze.expandRowByClick,expandedRowRender:Ze.expandedRowRender,onTriggerExpand:Me,expandIconColumnIndex:Ze.expandIconColumnIndex,indentSize:Ze.indentSize,allColumnsFixedLeft:Ge.every((function(e){return"left"===e.fixed})),emptyNode:tn,columns:ze,flattenColumns:Ge,onColumnResize:It,hoverStartRow:xe,hoverEndRow:we,onHover:Ce,rowExpandable:Ze.rowExpandable,onRow:B,getRowKey:ce,expandedKeys:De,childrenColumnName:Pe,rowHoverable:ee}}),[Ue,c,ae,zt,y,dn,kt,Ut,Oe,yt,bt,xt,$t,d,Ze.expandedRowClassName,Te,Ie,Ze.expandRowByClick,Ze.expandedRowRender,Me,Ze.expandIconColumnIndex,Ze.indentSize,tn,ze,Ge,It,xe,we,Ce,Ze.rowExpandable,B,ce,De,Pe,ee]);return s.createElement(b.Provider,{value:hn},un)}var Ie=s.forwardRef(Ze);function De(e){return g(Ie,e)}var Te=De();Te.EXPAND_COLUMN=i.w,Te.INTERNAL_HOOKS=i.R,Te.Column=Se,Te.ColumnGroup=_e,Te.Summary=H;var Pe=Te,Me=n(48911),Le=u(null),Be=u(null);var Re=function(e){var t=e.rowInfo,n=e.column,i=e.colIndex,r=e.indent,o=e.index,a=e.component,l=e.renderIndex,c=e.record,u=e.style,p=e.className,f=e.inverse,m=e.getHeight,v=n.render,g=n.dataIndex,y=n.className,x=n.width,b=d(Be,["columnsOffset"]).columnsOffset,w=$(t,n,i,r,o),k=w.key,S=w.fixedInfo,j=w.appendCellNode,N=w.additionalCellProps,E=N.style,A=N.colSpan,Z=void 0===A?1:A,I=N.rowSpan,D=void 0===I?1:I,T=function(e,t,n){return n[e+(t||1)]-(n[e]||0)}(i-1,Z,b),M=Z>1?x-T:0,L=(0,C.Z)((0,C.Z)((0,C.Z)({},E),u),{},{flex:"0 0 ".concat(T,"px"),width:"".concat(T,"px"),marginRight:M,pointerEvents:"auto"}),B=s.useMemo((function(){return f?D<=1:0===Z||0===D||D>1}),[D,Z,f]);B?L.visibility="hidden":f&&(L.height=null==m?void 0:m(D));var R=B?function(){return null}:v,O={};return 0!==D&&0!==Z||(O.rowSpan=1,O.colSpan=1),s.createElement(P,(0,h.Z)({className:_()(y,p),ellipsis:n.ellipsis,align:n.align,scope:n.rowScope,component:a,prefixCls:t.prefixCls,key:k,record:c,index:o,renderIndex:l,dataIndex:g,render:R,shouldCellUpdate:n.shouldCellUpdate},S,{appendNode:j,additionalProps:(0,C.Z)((0,C.Z)({},N),{},{style:L},O)}))},Oe=["data","index","className","rowKey","style","extra","getHeight"];var Fe=y(s.forwardRef((function(e,t){var n,i=e.data,r=e.index,o=e.className,a=e.rowKey,l=e.style,c=e.extra,u=e.getHeight,p=(0,B.Z)(e,Oe),f=i.record,m=i.indent,v=i.index,g=d(b,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),y=g.scrollX,x=g.flattenColumns,w=g.prefixCls,S=g.fixColumn,j=g.componentWidth,N=d(Le,["getComponent"]).getComponent,E=Y(f,a,r,m),A=N(["body","row"],"div"),Z=N(["body","cell"],"div"),I=E.rowSupportExpand,D=E.expanded,T=E.rowProps,M=E.expandedRowRender,L=E.expandedRowClassName;if(I&&D){var R=M(f,r,m+1,D),O=Q(L,f,r,m),F={};S&&(F={style:(0,k.Z)({},"--virtual-width","".concat(j,"px"))});var W="".concat(w,"-expanded-row-cell");n=s.createElement(A,{className:_()("".concat(w,"-expanded-row"),"".concat(w,"-expanded-row-level-").concat(m+1),O)},s.createElement(P,{component:Z,prefixCls:w,className:_()(W,(0,k.Z)({},"".concat(W,"-fixed"),S)),additionalProps:F},R))}var H=(0,C.Z)((0,C.Z)({},l),{},{width:y});c&&(H.position="absolute",H.pointerEvents="none");var z=s.createElement(A,(0,h.Z)({},T,p,{"data-row-key":a,ref:I?null:t,className:_()(o,"".concat(w,"-row"),null==T?void 0:T.className,(0,k.Z)({},"".concat(w,"-row-extra"),c)),style:(0,C.Z)((0,C.Z)({},H),null==T?void 0:T.style)}),x.map((function(e,t){return s.createElement(Re,{key:t,component:Z,rowInfo:E,column:e,colIndex:t,indent:m,index:r,renderIndex:v,record:f,inverse:c,getHeight:u})})));return I?s.createElement("div",{ref:t},z,n):z})));var We=y(s.forwardRef((function(e,t){var n=e.data,i=e.onScroll,o=d(b,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),a=o.flattenColumns,l=o.onColumnResize,c=o.getRowKey,u=o.expandedKeys,h=o.prefixCls,p=o.childrenColumnName,f=o.scrollX,m=o.direction,v=d(Le),g=v.sticky,y=v.scrollY,x=v.listItemHeight,C=v.getComponent,k=v.onScroll,S=s.useRef(),_=q(n,p,u,c),j=s.useMemo((function(){var e=0;return a.map((function(t){var n=t.width;return[t.key,n,e+=n]}))}),[a]),N=s.useMemo((function(){return j.map((function(e){return e[2]}))}),[j]);s.useEffect((function(){j.forEach((function(e){var t=(0,r.Z)(e,2),n=t[0],i=t[1];l(n,i)}))}),[j]),s.useImperativeHandle(t,(function(){var e,t={scrollTo:function(e){var t;null===(t=S.current)||void 0===t||t.scrollTo(e)},nativeElement:null===(e=S.current)||void 0===e?void 0:e.nativeElement};return Object.defineProperty(t,"scrollLeft",{get:function(){var e;return(null===(e=S.current)||void 0===e?void 0:e.getScrollInfo().x)||0},set:function(e){var t;null===(t=S.current)||void 0===t||t.scrollTo({left:e})}}),t}));var E=function(e,t){var n,i=null===(n=_[t])||void 0===n?void 0:n.record,r=e.onCell;if(r){var o,a=r(i,t);return null!==(o=null==a?void 0:a.rowSpan)&&void 0!==o?o:1}return 1},A=s.useMemo((function(){return{columnsOffset:N}}),[N]),Z="".concat(h,"-tbody"),I=C(["body","wrapper"]),D={};return g&&(D.position="sticky",D.bottom=0,"object"===(0,w.Z)(g)&&g.offsetScroll&&(D.bottom=g.offsetScroll)),s.createElement(Be.Provider,{value:A},s.createElement(Me.Z,{fullHeight:!1,ref:S,prefixCls:"".concat(Z,"-virtual"),styles:{horizontalScrollBar:D},className:Z,height:y,itemHeight:x||24,data:_,itemKey:function(e){return c(e.record)},component:I,scrollWidth:f,direction:m,onVirtualScroll:function(e){var t,n=e.x;i({currentTarget:null===(t=S.current)||void 0===t?void 0:t.nativeElement,scrollLeft:n})},onScroll:k,extraRender:function(e){var t=e.start,n=e.end,i=e.getSize,r=e.offsetY;if(n<0)return null;for(var o=a.filter((function(e){return 0===E(e,t)})),l=t,u=function(e){if(!(o=o.filter((function(t){return 0===E(t,e)}))).length)return l=e,1},d=t;d>=0&&!u(d);d-=1);for(var h=a.filter((function(e){return 1!==E(e,n)})),p=n,f=function(e){if(!(h=h.filter((function(t){return 1!==E(t,e)}))).length)return p=Math.max(e-1,n),1},m=n;m<_.length&&!f(m);m+=1);for(var v=[],g=function(e){if(!_[e])return 1;a.some((function(t){return E(t,e)>1}))&&v.push(e)},y=l;y<=p;y+=1)g(y);return v.map((function(e){var t=_[e],n=c(t.record,e),o=i(n);return s.createElement(Fe,{key:e,data:t,rowKey:n,index:e,style:{top:-r+o.top},extra:!0,getHeight:function(t){var r=e+t-1,o=c(_[r].record,r),a=i(n,o);return a.bottom-a.top}})}))}},(function(e,t,n){var i=c(e.record,t);return s.createElement(Fe,{data:e,rowKey:i,index:t,style:n.style})})))}))),He=function(e,t){var n=t.ref,i=t.onScroll;return s.createElement(We,{ref:n,data:e,onScroll:i})};function ze(e,t){var n=e.data,r=e.columns,o=e.scroll,a=e.sticky,l=e.prefixCls,c=void 0===l?je:l,u=e.className,d=e.listItemHeight,p=e.components,f=e.onScroll,m=o||{},v=m.x,g=m.y;"number"!=typeof v&&(v=1),"number"!=typeof g&&(g=500);var y=(0,D.zX)((function(e,t){return(0,N.Z)(p,e)||t})),x=(0,D.zX)(f),b=s.useMemo((function(){return{sticky:a,scrollY:g,listItemHeight:d,getComponent:y,onScroll:x}}),[a,g,d,y,x]);return s.createElement(Le.Provider,{value:b},s.createElement(Pe,(0,h.Z)({},e,{className:_()(u,"".concat(c,"-virtual")),scroll:(0,C.Z)((0,C.Z)({},o),{},{x:v}),components:(0,C.Z)((0,C.Z)({},p),{},{body:null!=n&&n.length?He:void 0}),columns:r,internalHooks:i.R,tailor:!0,ref:t})))}var Ge=s.forwardRef(ze);function Ve(e){return g(Ge,e)}Ve()},54451:function(e,t,n){"use strict";n.d(t,{g:function(){return l},v:function(){return a}});var i=n(33885),r=n(75931),o=(n(48736),["expandable"]),a="RC_TABLE_INTERNAL_COL_DEFINE";function l(e){var t,n=e.expandable,a=(0,r.Z)(e,o);return!1===(t="expandable"in e?(0,i.Z)((0,i.Z)({},a),n):a).showExpandColumn&&(t.expandIconColumnIndex=-1),t}},22711:function(e,t,n){"use strict";n.r(t),n.d(t,{ResizableTextArea:function(){return N},default:function(){return A}});var i,r=n(54476),o=n(20068),a=n(33885),l=n(94480),s=n(42978),c=n(75931),u=n(92310),d=n.n(u),h=n(36901),p=n(66003),f=n(30292),m=n(18929),v=n(59301),g=n(76190),y=n(29301),x=n(34280),b=n(16089),w="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n pointer-events: none !important;\n",C=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],k={};function S(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=e.getAttribute("id")||e.getAttribute("data-reactid")||e.getAttribute("name");if(t&&k[n])return k[n];var i=window.getComputedStyle(e),r=i.getPropertyValue("box-sizing")||i.getPropertyValue("-moz-box-sizing")||i.getPropertyValue("-webkit-box-sizing"),o=parseFloat(i.getPropertyValue("padding-bottom"))+parseFloat(i.getPropertyValue("padding-top")),a=parseFloat(i.getPropertyValue("border-bottom-width"))+parseFloat(i.getPropertyValue("border-top-width")),l=C.map((function(e){return"".concat(e,":").concat(i.getPropertyValue(e))})).join(";"),s={sizingStyle:l,paddingSize:o,borderSize:a,boxSizing:r};return t&&n&&(k[n]=s),s}var _=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],j=v.forwardRef((function(e,t){var n=e,l=n.prefixCls,u=n.defaultValue,h=n.value,p=n.autoSize,f=n.onResize,C=n.className,k=n.style,j=n.disabled,N=n.onChange,E=(n.onInternalAutoSize,(0,c.Z)(n,_)),A=(0,m.Z)(u,{value:h,postState:function(e){return null!=e?e:""}}),Z=(0,s.Z)(A,2),I=Z[0],D=Z[1],T=v.useRef();v.useImperativeHandle(t,(function(){return{textArea:T.current}}));var P=v.useMemo((function(){return p&&"object"===(0,g.Z)(p)?[p.minRows,p.maxRows]:[]}),[p]),M=(0,s.Z)(P,2),L=M[0],B=M[1],R=!!p,O=v.useState(2),F=(0,s.Z)(O,2),W=F[0],H=F[1],z=v.useState(),G=(0,s.Z)(z,2),V=G[0],K=G[1],U=function(){H(0)};(0,x.Z)((function(){R&&U()}),[h,L,B,R]),(0,x.Z)((function(){if(0===W)H(1);else if(1===W){var e=function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;i||((i=document.createElement("textarea")).setAttribute("tab-index","-1"),i.setAttribute("aria-hidden","true"),i.setAttribute("name","hiddenTextarea"),document.body.appendChild(i)),e.getAttribute("wrap")?i.setAttribute("wrap",e.getAttribute("wrap")):i.removeAttribute("wrap");var o=S(e,t),a=o.paddingSize,l=o.borderSize,s=o.boxSizing,c=o.sizingStyle;i.setAttribute("style","".concat(c,";").concat(w)),i.value=e.value||e.placeholder||"";var u,d=void 0,h=void 0,p=i.scrollHeight;if("border-box"===s?p+=l:"content-box"===s&&(p-=a),null!==n||null!==r){i.value=" ";var f=i.scrollHeight-a;null!==n&&(d=f*n,"border-box"===s&&(d=d+a+l),p=Math.max(d,p)),null!==r&&(h=f*r,"border-box"===s&&(h=h+a+l),u=p>h?"":"hidden",p=Math.min(h,p))}var m={height:p,overflowY:u,resize:"none"};return d&&(m.minHeight=d),h&&(m.maxHeight=h),m}(T.current,!1,L,B);H(2),K(e)}else!function(){try{if(document.activeElement===T.current){var e=T.current,t=e.selectionStart,n=e.selectionEnd,i=e.scrollTop;T.current.setSelectionRange(t,n),T.current.scrollTop=i}}catch(e){}}()}),[W]);var q=v.useRef(),Y=function(){b.Z.cancel(q.current)};v.useEffect((function(){return Y}),[]);var X=R?V:null,J=(0,a.Z)((0,a.Z)({},k),X);return 0!==W&&1!==W||(J.overflowY="hidden",J.overflowX="hidden"),v.createElement(y.Z,{onResize:function(e){2===W&&(null==f||f(e),p&&(Y(),q.current=(0,b.Z)((function(){U()}))))},disabled:!(p||f)},v.createElement("textarea",(0,r.Z)({},E,{ref:T,style:J,className:d()(l,C,(0,o.Z)({},"".concat(l,"-disabled"),j)),disabled:j,value:I,onChange:function(e){D(e.target.value),null==N||N(e)}})))})),N=j,E=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],A=v.forwardRef((function(e,t){var n,i=e.defaultValue,u=e.value,g=e.onFocus,y=e.onBlur,x=e.onChange,b=e.allowClear,w=e.maxLength,C=e.onCompositionStart,k=e.onCompositionEnd,S=e.suffix,_=e.prefixCls,j=void 0===_?"rc-textarea":_,A=e.showCount,Z=e.count,I=e.className,D=e.style,T=e.disabled,P=e.hidden,M=e.classNames,L=e.styles,B=e.onResize,R=e.onClear,O=e.onPressEnter,F=e.readOnly,W=e.autoSize,H=e.onKeyDown,z=(0,c.Z)(e,E),G=(0,m.Z)(i,{value:u,defaultValue:i}),V=(0,s.Z)(G,2),K=V[0],U=V[1],q=null==K?"":String(K),Y=v.useState(!1),X=(0,s.Z)(Y,2),J=X[0],Q=X[1],$=v.useRef(!1),ee=v.useState(null),te=(0,s.Z)(ee,2),ne=te[0],ie=te[1],re=(0,v.useRef)(null),oe=(0,v.useRef)(null),ae=function(){var e;return null===(e=oe.current)||void 0===e?void 0:e.textArea},le=function(){ae().focus()};(0,v.useImperativeHandle)(t,(function(){var e;return{resizableTextArea:oe.current,focus:le,blur:function(){ae().blur()},nativeElement:(null===(e=re.current)||void 0===e?void 0:e.nativeElement)||ae()}})),(0,v.useEffect)((function(){Q((function(e){return!T&&e}))}),[T]);var se=v.useState(null),ce=(0,s.Z)(se,2),ue=ce[0],de=ce[1];v.useEffect((function(){var e;ue&&(e=ae()).setSelectionRange.apply(e,(0,l.Z)(ue))}),[ue]);var he,pe=(0,p.Z)(Z,A),fe=null!==(n=pe.max)&&void 0!==n?n:w,me=Number(fe)>0,ve=pe.strategy(q),ge=!!fe&&ve>fe,ye=function(e,t){var n=t;!$.current&&pe.exceedFormatter&&pe.max&&pe.strategy(t)>pe.max&&t!==(n=pe.exceedFormatter(t,{max:pe.max}))&&de([ae().selectionStart||0,ae().selectionEnd||0]),U(n),(0,f.rJ)(e.currentTarget,e,x,n)},xe=S;pe.show&&(he=pe.showFormatter?pe.showFormatter({value:q,count:ve,maxLength:fe}):"".concat(ve).concat(me?" / ".concat(fe):""),xe=v.createElement(v.Fragment,null,xe,v.createElement("span",{className:d()("".concat(j,"-data-count"),null==M?void 0:M.count),style:null==L?void 0:L.count},he)));var be=!W&&!A&&!b;return v.createElement(h.BaseInput,{ref:re,value:q,allowClear:b,handleReset:function(e){U(""),le(),(0,f.rJ)(ae(),e,x)},suffix:xe,prefixCls:j,classNames:(0,a.Z)((0,a.Z)({},M),{},{affixWrapper:d()(null==M?void 0:M.affixWrapper,(0,o.Z)((0,o.Z)({},"".concat(j,"-show-count"),A),"".concat(j,"-textarea-allow-clear"),b))}),disabled:T,focused:J,className:d()(I,ge&&"".concat(j,"-out-of-range")),style:(0,a.Z)((0,a.Z)({},D),ne&&!be?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":"string"==typeof he?he:void 0}},hidden:P,readOnly:F,onClear:R},v.createElement(N,(0,r.Z)({},z,{autoSize:W,maxLength:w,onKeyDown:function(e){"Enter"===e.key&&O&&O(e),null==H||H(e)},onChange:function(e){ye(e,e.target.value)},onFocus:function(e){Q(!0),null==g||g(e)},onBlur:function(e){Q(!1),null==y||y(e)},onCompositionStart:function(e){$.current=!0,null==C||C(e)},onCompositionEnd:function(e){$.current=!1,ye(e,e.currentTarget.value),null==k||k(e)},className:d()(null==M?void 0:M.textarea),style:(0,a.Z)((0,a.Z)({},null==L?void 0:L.textarea),{},{resize:null==D?void 0:D.resize}),disabled:T,prefixCls:j,onResize:function(e){var t;null==B||B(e),null!==(t=ae())&&void 0!==t&&t.style.height&&ie(!0)},ref:oe,readOnly:F})))}))},639:function(e,t,n){"use strict";n.d(t,{Z:function(){return w}});var i=n(54476),r=n(20068),o=n(33885),a=n(42978),l=n(75931),s=n(59301),c=n(92310),u=n.n(c),d=n(26112),h=n(30699),p=function(e){for(var t=e.prefixCls,n=e.level,i=e.isStart,o=e.isEnd,a="".concat(t,"-indent-unit"),l=[],c=0;c<n;c+=1)l.push(s.createElement("span",{key:c,className:u()(a,(0,r.Z)((0,r.Z)({},"".concat(a,"-start"),i[c]),"".concat(a,"-end"),o[c]))}));return s.createElement("span",{"aria-hidden":"true",className:"".concat(t,"-indent")},l)},f=s.memo(p),m=n(65065),v=n(34061),g=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],y="open",x="close",b=function(e){var t,n,c,p=e.eventKey,b=e.className,w=e.style,C=e.dragOver,k=e.dragOverGapTop,S=e.dragOverGapBottom,_=e.isLeaf,j=e.isStart,N=e.isEnd,E=e.expanded,A=e.selected,Z=e.checked,I=e.halfChecked,D=e.loading,T=e.domRef,P=e.active,M=e.data,L=e.onMouseMove,B=e.selectable,R=(0,l.Z)(e,g),O=s.useContext(h.k),F=s.useContext(h.y),W=s.useRef(null),H=s.useState(!1),z=(0,a.Z)(H,2),G=z[0],V=z[1],K=!!(O.disabled||e.disabled||null!==(t=F.nodeDisabled)&&void 0!==t&&t.call(F,M)),U=s.useMemo((function(){return!(!O.checkable||!1===e.checkable)&&O.checkable}),[O.checkable,e.checkable]),q=function(t){K||U&&!e.disableCheckbox&&O.onNodeCheck(t,(0,v.F)(e),!Z)},Y=s.useMemo((function(){return"boolean"==typeof B?B:O.selectable}),[B,O.selectable]),X=function(t){O.onNodeClick(t,(0,v.F)(e)),Y?function(t){K||O.onNodeSelect(t,(0,v.F)(e))}(t):q(t)},J=function(t){O.onNodeDoubleClick(t,(0,v.F)(e))},Q=function(t){O.onNodeMouseEnter(t,(0,v.F)(e))},$=function(t){O.onNodeMouseLeave(t,(0,v.F)(e))},ee=function(t){O.onNodeContextMenu(t,(0,v.F)(e))},te=s.useMemo((function(){return!(!O.draggable||O.draggable.nodeDraggable&&!O.draggable.nodeDraggable(M))}),[O.draggable,M]),ne=function(t){D||O.onNodeExpand(t,(0,v.F)(e))},ie=s.useMemo((function(){var e=((0,m.Z)(O.keyEntities,p)||{}).children;return Boolean((e||[]).length)}),[O.keyEntities,p]),re=s.useMemo((function(){return!1!==_&&(_||!O.loadData&&!ie||O.loadData&&e.loaded&&!ie)}),[_,O.loadData,ie,e.loaded]);s.useEffect((function(){D||"function"!=typeof O.loadData||!E||re||e.loaded||O.onNodeLoad((0,v.F)(e))}),[D,O.loadData,O.onNodeLoad,E,re,e]);var oe=s.useMemo((function(){var e;return null!==(e=O.draggable)&&void 0!==e&&e.icon?s.createElement("span",{className:"".concat(O.prefixCls,"-draggable-icon")},O.draggable.icon):null}),[O.draggable]),ae=function(t){var n=e.switcherIcon||O.switcherIcon;return"function"==typeof n?n((0,o.Z)((0,o.Z)({},e),{},{isLeaf:t})):n},le=s.useMemo((function(){if(!U)return null;var t="boolean"!=typeof U?U:null;return s.createElement("span",{className:u()("".concat(O.prefixCls,"-checkbox"),(0,r.Z)((0,r.Z)((0,r.Z)({},"".concat(O.prefixCls,"-checkbox-checked"),Z),"".concat(O.prefixCls,"-checkbox-indeterminate"),!Z&&I),"".concat(O.prefixCls,"-checkbox-disabled"),K||e.disableCheckbox)),onClick:q,role:"checkbox","aria-checked":I?"mixed":Z,"aria-disabled":K||e.disableCheckbox,"aria-label":"Select ".concat("string"==typeof e.title?e.title:"tree node")},t)}),[U,Z,I,K,e.disableCheckbox,e.title]),se=s.useMemo((function(){return re?null:E?y:x}),[re,E]),ce=s.useMemo((function(){return s.createElement("span",{className:u()("".concat(O.prefixCls,"-iconEle"),"".concat(O.prefixCls,"-icon__").concat(se||"docu"),(0,r.Z)({},"".concat(O.prefixCls,"-icon_loading"),D))})}),[O.prefixCls,se,D]),ue=s.useMemo((function(){var t=Boolean(O.draggable);return!e.disabled&&t&&O.dragOverNodeKey===p?O.dropIndicatorRender({dropPosition:O.dropPosition,dropLevelOffset:O.dropLevelOffset,indent:O.indent,prefixCls:O.prefixCls,direction:O.direction}):null}),[O.dropPosition,O.dropLevelOffset,O.indent,O.prefixCls,O.direction,O.draggable,O.dragOverNodeKey,O.dropIndicatorRender]),de=s.useMemo((function(){var t,n,i=e.title,o=void 0===i?"---":i,a="".concat(O.prefixCls,"-node-content-wrapper");if(O.showIcon){var l=e.icon||O.icon;t=l?s.createElement("span",{className:u()("".concat(O.prefixCls,"-iconEle"),"".concat(O.prefixCls,"-icon__customize"))},"function"==typeof l?l(e):l):ce}else O.loadData&&D&&(t=ce);return n="function"==typeof o?o(M):O.titleRender?O.titleRender(M):o,s.createElement("span",{ref:W,title:"string"==typeof o?o:"",className:u()(a,"".concat(a,"-").concat(se||"normal"),(0,r.Z)({},"".concat(O.prefixCls,"-node-selected"),!K&&(A||G))),onMouseEnter:Q,onMouseLeave:$,onContextMenu:ee,onClick:X,onDoubleClick:J},t,s.createElement("span",{className:"".concat(O.prefixCls,"-title")},n),ue)}),[O.prefixCls,O.showIcon,e,O.icon,ce,O.titleRender,M,se,Q,$,ee,X,J]),he=(0,d.Z)(R,{aria:!0,data:!0}),pe=((0,m.Z)(O.keyEntities,p)||{}).level,fe=N[N.length-1],me=!K&&te,ve=O.draggingNodeKey===p,ge=void 0!==B?{"aria-selected":!!B}:void 0;return s.createElement("div",(0,i.Z)({ref:T,role:"treeitem","aria-expanded":_?void 0:E,className:u()(b,"".concat(O.prefixCls,"-treenode"),(c={},(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)(c,"".concat(O.prefixCls,"-treenode-disabled"),K),"".concat(O.prefixCls,"-treenode-switcher-").concat(E?"open":"close"),!_),"".concat(O.prefixCls,"-treenode-checkbox-checked"),Z),"".concat(O.prefixCls,"-treenode-checkbox-indeterminate"),I),"".concat(O.prefixCls,"-treenode-selected"),A),"".concat(O.prefixCls,"-treenode-loading"),D),"".concat(O.prefixCls,"-treenode-active"),P),"".concat(O.prefixCls,"-treenode-leaf-last"),fe),"".concat(O.prefixCls,"-treenode-draggable"),te),"dragging",ve),(0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)((0,r.Z)(c,"drop-target",O.dropTargetKey===p),"drop-container",O.dropContainerKey===p),"drag-over",!K&&C),"drag-over-gap-top",!K&&k),"drag-over-gap-bottom",!K&&S),"filter-node",null===(n=O.filterTreeNode)||void 0===n?void 0:n.call(O,(0,v.F)(e))),"".concat(O.prefixCls,"-treenode-leaf"),re))),style:w,draggable:me,onDragStart:me?function(t){t.stopPropagation(),V(!0),O.onNodeDragStart(t,e);try{t.dataTransfer.setData("text/plain","")}catch(e){}}:void 0,onDragEnter:te?function(t){t.preventDefault(),t.stopPropagation(),O.onNodeDragEnter(t,e)}:void 0,onDragOver:te?function(t){t.preventDefault(),t.stopPropagation(),O.onNodeDragOver(t,e)}:void 0,onDragLeave:te?function(t){t.stopPropagation(),O.onNodeDragLeave(t,e)}:void 0,onDrop:te?function(t){t.preventDefault(),t.stopPropagation(),V(!1),O.onNodeDrop(t,e)}:void 0,onDragEnd:te?function(t){t.stopPropagation(),V(!1),O.onNodeDragEnd(t,e)}:void 0,onMouseMove:L},ge,he),s.createElement(f,{prefixCls:O.prefixCls,level:pe,isStart:j,isEnd:N}),oe,function(){if(re){var e=ae(!0);return!1!==e?s.createElement("span",{className:u()("".concat(O.prefixCls,"-switcher"),"".concat(O.prefixCls,"-switcher-noop"))},e):null}var t=ae(!1);return!1!==t?s.createElement("span",{onClick:ne,className:u()("".concat(O.prefixCls,"-switcher"),"".concat(O.prefixCls,"-switcher_").concat(E?y:x))},t):null}(),le,de)};b.isTreeNode=1;var w=b},30699:function(e,t,n){"use strict";n.d(t,{k:function(){return r},y:function(){return o}});var i=n(59301),r=i.createContext(null),o=i.createContext({})},3741:function(e,t,n){"use strict";n.d(t,{OF:function(){return N.Z},y6:function(){return x.y},ZP:function(){return q}});var i=n(54476),r=n(76190),o=n(33885),a=n(94480),l=n(67732),s=n(83652),c=n(31226),u=n(42403),d=n(158),h=n(20068),p=n(92310),f=n.n(p),m=n(10228),v=n(26112),g=n(48736),y=n(59301),x=n(30699);var b=function(e){var t=e.dropPosition,n=e.dropLevelOffset,i=e.indent,r={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(t){case-1:r.top=0,r.left=-n*i;break;case 1:r.bottom=0,r.left=-n*i;break;case 0:r.bottom=0,r.left=i}return y.createElement("div",{style:r})};function w(e){if(null==e)throw new TypeError("Cannot destructure "+e)}var C=n(42978),k=n(75931),S=n(34280),_=n(48911),j=n(77900),N=n(639);var E=function(e,t){var n=y.useState(!1),i=(0,C.Z)(n,2),r=i[0],o=i[1];(0,S.Z)((function(){if(r)return e(),function(){t()}}),[r]),(0,S.Z)((function(){return o(!0),function(){o(!1)}}),[])},A=n(34061),Z=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"];var I=y.forwardRef((function(e,t){var n=e.className,r=e.style,o=e.motion,a=e.motionNodes,l=e.motionType,s=e.onMotionStart,c=e.onMotionEnd,u=e.active,d=e.treeNodeRequiredProps,h=(0,k.Z)(e,Z),p=y.useState(!0),m=(0,C.Z)(p,2),v=m[0],g=m[1],b=y.useContext(x.k).prefixCls,_=a&&"hide"!==l;(0,S.Z)((function(){a&&_!==v&&g(_)}),[a]);var I=y.useRef(!1),D=function(){a&&!I.current&&(I.current=!0,c())};E((function(){a&&s()}),D);return a?y.createElement(j.default,(0,i.Z)({ref:t,visible:v},o,{motionAppear:"show"===l,onVisibleChanged:function(e){_===e&&D()}}),(function(e,t){var n=e.className,r=e.style;return y.createElement("div",{ref:t,className:f()("".concat(b,"-treenode-motion"),n),style:r},a.map((function(e){var t=Object.assign({},(w(e.data),e.data)),n=e.title,r=e.key,o=e.isStart,a=e.isEnd;delete t.children;var l=(0,A.H8)(r,d);return y.createElement(N.Z,(0,i.Z)({},t,l,{title:n,active:u,data:e.data,key:r,isStart:o,isEnd:a}))})))})):y.createElement(N.Z,(0,i.Z)({domRef:t,className:n,style:r},h,{active:u}))}));function D(e,t,n){var i=e.findIndex((function(e){return e.key===n})),r=e[i+1],o=t.findIndex((function(e){return e.key===n}));if(r){var a=t.findIndex((function(e){return e.key===r.key}));return t.slice(o+1,a)}return t.slice(o+1)}var T=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],P={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},M=function(){},L="RC_TREE_MOTION_".concat(Math.random()),B={key:L},R={key:L,level:0,index:0,pos:"0",node:B,nodes:[B]},O={parent:null,children:[],pos:R.pos,data:B,title:null,key:L,isStart:[],isEnd:[]};function F(e,t,n,i){return!1!==t&&n?e.slice(0,Math.ceil(n/i)+1):e}function W(e){var t=e.key,n=e.pos;return(0,A.km)(t,n)}var H=y.forwardRef((function(e,t){var n=e.prefixCls,r=e.data,o=(e.selectable,e.checkable,e.expandedKeys),a=e.selectedKeys,l=e.checkedKeys,s=e.loadedKeys,c=e.loadingKeys,u=e.halfCheckedKeys,d=e.keyEntities,h=e.disabled,p=e.dragging,f=e.dragOverNodeKey,m=e.dropPosition,v=e.motion,g=e.height,x=e.itemHeight,b=e.virtual,j=e.scrollWidth,N=e.focusable,E=e.activeItem,Z=e.focused,B=e.tabIndex,R=e.onKeyDown,H=e.onFocus,z=e.onBlur,G=e.onActiveChange,V=e.onListChangeStart,K=e.onListChangeEnd,U=(0,k.Z)(e,T),q=y.useRef(null),Y=y.useRef(null);y.useImperativeHandle(t,(function(){return{scrollTo:function(e){q.current.scrollTo(e)},getIndentWidth:function(){return Y.current.offsetWidth}}}));var X=y.useState(o),J=(0,C.Z)(X,2),Q=J[0],$=J[1],ee=y.useState(r),te=(0,C.Z)(ee,2),ne=te[0],ie=te[1],re=y.useState(r),oe=(0,C.Z)(re,2),ae=oe[0],le=oe[1],se=y.useState([]),ce=(0,C.Z)(se,2),ue=ce[0],de=ce[1],he=y.useState(null),pe=(0,C.Z)(he,2),fe=pe[0],me=pe[1],ve=y.useRef(r);function ge(){var e=ve.current;ie(e),le(e),de([]),me(null),K()}ve.current=r,(0,S.Z)((function(){$(o);var e=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=e.length,i=t.length;if(1!==Math.abs(n-i))return{add:!1,key:null};function r(e,t){var n=new Map;e.forEach((function(e){n.set(e,!0)}));var i=t.filter((function(e){return!n.has(e)}));return 1===i.length?i[0]:null}return n<i?{add:!0,key:r(e,t)}:{add:!1,key:r(t,e)}}(Q,o);if(null!==e.key)if(e.add){var t=ne.findIndex((function(t){return t.key===e.key})),n=F(D(ne,r,e.key),b,g,x),i=ne.slice();i.splice(t+1,0,O),le(i),de(n),me("show")}else{var a=r.findIndex((function(t){return t.key===e.key})),l=F(D(r,ne,e.key),b,g,x),s=r.slice();s.splice(a+1,0,O),le(s),de(l),me("hide")}else ne!==r&&(ie(r),le(r))}),[o,r]),y.useEffect((function(){p||ge()}),[p]);var ye=v?ae:r,xe={expandedKeys:o,selectedKeys:a,loadedKeys:s,loadingKeys:c,checkedKeys:l,halfCheckedKeys:u,dragOverNodeKey:f,dropPosition:m,keyEntities:d};return y.createElement(y.Fragment,null,Z&&E&&y.createElement("span",{style:P,"aria-live":"assertive"},function(e){for(var t=String(e.data.key),n=e;n.parent;)n=n.parent,t="".concat(n.data.key," > ").concat(t);return t}(E)),y.createElement("div",null,y.createElement("input",{style:P,disabled:!1===N||h,tabIndex:!1!==N?B:null,onKeyDown:R,onFocus:H,onBlur:z,value:"",onChange:M,"aria-label":"for screen reader"})),y.createElement("div",{className:"".concat(n,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},y.createElement("div",{className:"".concat(n,"-indent")},y.createElement("div",{ref:Y,className:"".concat(n,"-indent-unit")}))),y.createElement(_.Z,(0,i.Z)({},U,{data:ye,itemKey:W,height:g,fullHeight:!1,virtual:b,itemHeight:x,scrollWidth:j,prefixCls:"".concat(n,"-list"),ref:q,role:"tree",onVisibleChange:function(e){e.every((function(e){return W(e)!==L}))&&ge()}}),(function(e){var t=e.pos,n=Object.assign({},(w(e.data),e.data)),r=e.title,o=e.key,a=e.isStart,l=e.isEnd,s=(0,A.km)(o,t);delete n.key,delete n.children;var c=(0,A.H8)(s,xe);return y.createElement(I,(0,i.Z)({},n,c,{title:r,active:!!E&&o===E.key,pos:t,data:e.data,isStart:a,isEnd:l,motion:v,motionNodes:o===L?ue:null,motionType:fe,onMotionStart:V,onMotionEnd:ge,treeNodeRequiredProps:xe,onMouseMove:function(){G(null)}}))})))}));var z=H,G=n(82661),V=n(34643),K=n(65065),U=function(e){(0,u.Z)(n,e);var t=(0,d.Z)(n);function n(){var e;(0,l.Z)(this,n);for(var i=arguments.length,r=new Array(i),s=0;s<i;s++)r[s]=arguments[s];return e=t.call.apply(t,[this].concat(r)),(0,h.Z)((0,c.Z)(e),"destroyed",!1),(0,h.Z)((0,c.Z)(e),"delayedDragEnterLogic",void 0),(0,h.Z)((0,c.Z)(e),"loadingRetryTimes",{}),(0,h.Z)((0,c.Z)(e),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,A.w$)()}),(0,h.Z)((0,c.Z)(e),"dragStartMousePosition",null),(0,h.Z)((0,c.Z)(e),"dragNodeProps",null),(0,h.Z)((0,c.Z)(e),"currentMouseOverDroppableNodeKey",null),(0,h.Z)((0,c.Z)(e),"listRef",y.createRef()),(0,h.Z)((0,c.Z)(e),"onNodeDragStart",(function(t,n){var i=e.state,r=i.expandedKeys,o=i.keyEntities,a=e.props.onDragStart,l=n.eventKey;e.dragNodeProps=n,e.dragStartMousePosition={x:t.clientX,y:t.clientY};var s=(0,G._5)(r,l);e.setState({draggingNodeKey:l,dragChildrenKeys:(0,G.wA)(l,o),indent:e.listRef.current.getIndentWidth()}),e.setExpandedKeys(s),window.addEventListener("dragend",e.onWindowDragEnd),null==a||a({event:t,node:(0,A.F)(n)})})),(0,h.Z)((0,c.Z)(e),"onNodeDragEnter",(function(t,n){var i=e.state,r=i.expandedKeys,o=i.keyEntities,l=i.dragChildrenKeys,s=i.flattenNodes,c=i.indent,u=e.props,d=u.onDragEnter,h=u.onExpand,p=u.allowDrop,f=u.direction,m=n.pos,v=n.eventKey;if(e.currentMouseOverDroppableNodeKey!==v&&(e.currentMouseOverDroppableNodeKey=v),e.dragNodeProps){var g=(0,G.OM)(t,e.dragNodeProps,n,c,e.dragStartMousePosition,p,s,o,r,f),y=g.dropPosition,x=g.dropLevelOffset,b=g.dropTargetKey,w=g.dropContainerKey,C=g.dropTargetPos,k=g.dropAllowed,S=g.dragOverNodeKey;!l.includes(b)&&k?(e.delayedDragEnterLogic||(e.delayedDragEnterLogic={}),Object.keys(e.delayedDragEnterLogic).forEach((function(t){clearTimeout(e.delayedDragEnterLogic[t])})),e.dragNodeProps.eventKey!==n.eventKey&&(t.persist(),e.delayedDragEnterLogic[m]=window.setTimeout((function(){if(null!==e.state.draggingNodeKey){var i=(0,a.Z)(r),l=(0,K.Z)(o,n.eventKey);l&&(l.children||[]).length&&(i=(0,G.L0)(r,n.eventKey)),e.props.hasOwnProperty("expandedKeys")||e.setExpandedKeys(i),null==h||h(i,{node:(0,A.F)(n),expanded:!0,nativeEvent:t.nativeEvent})}}),800)),e.dragNodeProps.eventKey!==b||0!==x?(e.setState({dragOverNodeKey:S,dropPosition:y,dropLevelOffset:x,dropTargetKey:b,dropContainerKey:w,dropTargetPos:C,dropAllowed:k}),null==d||d({event:t,node:(0,A.F)(n),expandedKeys:r})):e.resetDragState()):e.resetDragState()}else e.resetDragState()})),(0,h.Z)((0,c.Z)(e),"onNodeDragOver",(function(t,n){var i=e.state,r=i.dragChildrenKeys,o=i.flattenNodes,a=i.keyEntities,l=i.expandedKeys,s=i.indent,c=e.props,u=c.onDragOver,d=c.allowDrop,h=c.direction;if(e.dragNodeProps){var p=(0,G.OM)(t,e.dragNodeProps,n,s,e.dragStartMousePosition,d,o,a,l,h),f=p.dropPosition,m=p.dropLevelOffset,v=p.dropTargetKey,g=p.dropContainerKey,y=p.dropTargetPos,x=p.dropAllowed,b=p.dragOverNodeKey;!r.includes(v)&&x&&(e.dragNodeProps.eventKey===v&&0===m?null===e.state.dropPosition&&null===e.state.dropLevelOffset&&null===e.state.dropTargetKey&&null===e.state.dropContainerKey&&null===e.state.dropTargetPos&&!1===e.state.dropAllowed&&null===e.state.dragOverNodeKey||e.resetDragState():f===e.state.dropPosition&&m===e.state.dropLevelOffset&&v===e.state.dropTargetKey&&g===e.state.dropContainerKey&&y===e.state.dropTargetPos&&x===e.state.dropAllowed&&b===e.state.dragOverNodeKey||e.setState({dropPosition:f,dropLevelOffset:m,dropTargetKey:v,dropContainerKey:g,dropTargetPos:y,dropAllowed:x,dragOverNodeKey:b}),null==u||u({event:t,node:(0,A.F)(n)}))}})),(0,h.Z)((0,c.Z)(e),"onNodeDragLeave",(function(t,n){e.currentMouseOverDroppableNodeKey!==n.eventKey||t.currentTarget.contains(t.relatedTarget)||(e.resetDragState(),e.currentMouseOverDroppableNodeKey=null);var i=e.props.onDragLeave;null==i||i({event:t,node:(0,A.F)(n)})})),(0,h.Z)((0,c.Z)(e),"onWindowDragEnd",(function(t){e.onNodeDragEnd(t,null,!0),window.removeEventListener("dragend",e.onWindowDragEnd)})),(0,h.Z)((0,c.Z)(e),"onNodeDragEnd",(function(t,n){var i=e.props.onDragEnd;e.setState({dragOverNodeKey:null}),e.cleanDragState(),null==i||i({event:t,node:(0,A.F)(n)}),e.dragNodeProps=null,window.removeEventListener("dragend",e.onWindowDragEnd)})),(0,h.Z)((0,c.Z)(e),"onNodeDrop",(function(t,n){var i,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],a=e.state,l=a.dragChildrenKeys,s=a.dropPosition,c=a.dropTargetKey,u=a.dropTargetPos,d=a.dropAllowed;if(d){var h=e.props.onDrop;if(e.setState({dragOverNodeKey:null}),e.cleanDragState(),null!==c){var p=(0,o.Z)((0,o.Z)({},(0,A.H8)(c,e.getTreeNodeRequiredProps())),{},{active:(null===(i=e.getActiveItem())||void 0===i?void 0:i.key)===c,data:(0,K.Z)(e.state.keyEntities,c).node}),f=l.includes(c);(0,g.ZP)(!f,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var m=(0,G.yx)(u),v={event:t,node:(0,A.F)(p),dragNode:e.dragNodeProps?(0,A.F)(e.dragNodeProps):null,dragNodesKeys:[e.dragNodeProps.eventKey].concat(l),dropToGap:0!==s,dropPosition:s+Number(m[m.length-1])};r||null==h||h(v),e.dragNodeProps=null}}})),(0,h.Z)((0,c.Z)(e),"cleanDragState",(function(){null!==e.state.draggingNodeKey&&e.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),e.dragStartMousePosition=null,e.currentMouseOverDroppableNodeKey=null})),(0,h.Z)((0,c.Z)(e),"triggerExpandActionExpand",(function(t,n){var i=e.state,r=i.expandedKeys,a=i.flattenNodes,l=n.expanded,s=n.key;if(!(n.isLeaf||t.shiftKey||t.metaKey||t.ctrlKey)){var c=a.filter((function(e){return e.key===s}))[0],u=(0,A.F)((0,o.Z)((0,o.Z)({},(0,A.H8)(s,e.getTreeNodeRequiredProps())),{},{data:c.data}));e.setExpandedKeys(l?(0,G._5)(r,s):(0,G.L0)(r,s)),e.onNodeExpand(t,u)}})),(0,h.Z)((0,c.Z)(e),"onNodeClick",(function(t,n){var i=e.props,r=i.onClick;"click"===i.expandAction&&e.triggerExpandActionExpand(t,n),null==r||r(t,n)})),(0,h.Z)((0,c.Z)(e),"onNodeDoubleClick",(function(t,n){var i=e.props,r=i.onDoubleClick;"doubleClick"===i.expandAction&&e.triggerExpandActionExpand(t,n),null==r||r(t,n)})),(0,h.Z)((0,c.Z)(e),"onNodeSelect",(function(t,n){var i=e.state.selectedKeys,r=e.state,o=r.keyEntities,a=r.fieldNames,l=e.props,s=l.onSelect,c=l.multiple,u=n.selected,d=n[a.key],h=!u,p=(i=h?c?(0,G.L0)(i,d):[d]:(0,G._5)(i,d)).map((function(e){var t=(0,K.Z)(o,e);return t?t.node:null})).filter(Boolean);e.setUncontrolledState({selectedKeys:i}),null==s||s(i,{event:"select",selected:h,node:n,selectedNodes:p,nativeEvent:t.nativeEvent})})),(0,h.Z)((0,c.Z)(e),"onNodeCheck",(function(t,n,i){var r,o=e.state,l=o.keyEntities,s=o.checkedKeys,c=o.halfCheckedKeys,u=e.props,d=u.checkStrictly,h=u.onCheck,p=n.key,f={event:"check",node:n,checked:i,nativeEvent:t.nativeEvent};if(d){var m=i?(0,G.L0)(s,p):(0,G._5)(s,p);r={checked:m,halfChecked:(0,G._5)(c,p)},f.checkedNodes=m.map((function(e){return(0,K.Z)(l,e)})).filter(Boolean).map((function(e){return e.node})),e.setUncontrolledState({checkedKeys:m})}else{var v=(0,V.S)([].concat((0,a.Z)(s),[p]),!0,l),g=v.checkedKeys,y=v.halfCheckedKeys;if(!i){var x=new Set(g);x.delete(p);var b=(0,V.S)(Array.from(x),{checked:!1,halfCheckedKeys:y},l);g=b.checkedKeys,y=b.halfCheckedKeys}r=g,f.checkedNodes=[],f.checkedNodesPositions=[],f.halfCheckedKeys=y,g.forEach((function(e){var t=(0,K.Z)(l,e);if(t){var n=t.node,i=t.pos;f.checkedNodes.push(n),f.checkedNodesPositions.push({node:n,pos:i})}})),e.setUncontrolledState({checkedKeys:g},!1,{halfCheckedKeys:y})}null==h||h(r,f)})),(0,h.Z)((0,c.Z)(e),"onNodeLoad",(function(t){var n,i=t.key,r=e.state.keyEntities,o=(0,K.Z)(r,i);if(null==o||null===(n=o.children)||void 0===n||!n.length){var a=new Promise((function(n,r){e.setState((function(o){var a=o.loadedKeys,l=void 0===a?[]:a,s=o.loadingKeys,c=void 0===s?[]:s,u=e.props,d=u.loadData,h=u.onLoad;return!d||l.includes(i)||c.includes(i)?null:(d(t).then((function(){var r=e.state.loadedKeys,o=(0,G.L0)(r,i);null==h||h(o,{event:"load",node:t}),e.setUncontrolledState({loadedKeys:o}),e.setState((function(e){return{loadingKeys:(0,G._5)(e.loadingKeys,i)}})),n()})).catch((function(t){if(e.setState((function(e){return{loadingKeys:(0,G._5)(e.loadingKeys,i)}})),e.loadingRetryTimes[i]=(e.loadingRetryTimes[i]||0)+1,e.loadingRetryTimes[i]>=10){var o=e.state.loadedKeys;(0,g.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),e.setUncontrolledState({loadedKeys:(0,G.L0)(o,i)}),n()}r(t)})),{loadingKeys:(0,G.L0)(c,i)})}))}));return a.catch((function(){})),a}})),(0,h.Z)((0,c.Z)(e),"onNodeMouseEnter",(function(t,n){var i=e.props.onMouseEnter;null==i||i({event:t,node:n})})),(0,h.Z)((0,c.Z)(e),"onNodeMouseLeave",(function(t,n){var i=e.props.onMouseLeave;null==i||i({event:t,node:n})})),(0,h.Z)((0,c.Z)(e),"onNodeContextMenu",(function(t,n){var i=e.props.onRightClick;i&&(t.preventDefault(),i({event:t,node:n}))})),(0,h.Z)((0,c.Z)(e),"onFocus",(function(){var t=e.props.onFocus;e.setState({focused:!0});for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];null==t||t.apply(void 0,i)})),(0,h.Z)((0,c.Z)(e),"onBlur",(function(){var t=e.props.onBlur;e.setState({focused:!1}),e.onActiveChange(null);for(var n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];null==t||t.apply(void 0,i)})),(0,h.Z)((0,c.Z)(e),"getTreeNodeRequiredProps",(function(){var t=e.state;return{expandedKeys:t.expandedKeys||[],selectedKeys:t.selectedKeys||[],loadedKeys:t.loadedKeys||[],loadingKeys:t.loadingKeys||[],checkedKeys:t.checkedKeys||[],halfCheckedKeys:t.halfCheckedKeys||[],dragOverNodeKey:t.dragOverNodeKey,dropPosition:t.dropPosition,keyEntities:t.keyEntities}})),(0,h.Z)((0,c.Z)(e),"setExpandedKeys",(function(t){var n=e.state,i=n.treeData,r=n.fieldNames,o=(0,A.oH)(i,t,r);e.setUncontrolledState({expandedKeys:t,flattenNodes:o},!0)})),(0,h.Z)((0,c.Z)(e),"onNodeExpand",(function(t,n){var i=e.state.expandedKeys,r=e.state,o=r.listChanging,a=r.fieldNames,l=e.props,s=l.onExpand,c=l.loadData,u=n.expanded,d=n[a.key];if(!o){var h=i.includes(d),p=!u;if((0,g.ZP)(u&&h||!u&&!h,"Expand state not sync with index check"),i=p?(0,G.L0)(i,d):(0,G._5)(i,d),e.setExpandedKeys(i),null==s||s(i,{node:n,expanded:p,nativeEvent:t.nativeEvent}),p&&c){var f=e.onNodeLoad(n);f&&f.then((function(){var t=(0,A.oH)(e.state.treeData,i,a);e.setUncontrolledState({flattenNodes:t})})).catch((function(){var t=e.state.expandedKeys,n=(0,G._5)(t,d);e.setExpandedKeys(n)}))}}})),(0,h.Z)((0,c.Z)(e),"onListChangeStart",(function(){e.setUncontrolledState({listChanging:!0})})),(0,h.Z)((0,c.Z)(e),"onListChangeEnd",(function(){setTimeout((function(){e.setUncontrolledState({listChanging:!1})}))})),(0,h.Z)((0,c.Z)(e),"onActiveChange",(function(t){var n=e.state.activeKey,i=e.props,r=i.onActiveChange,o=i.itemScrollOffset,a=void 0===o?0:o;n!==t&&(e.setState({activeKey:t}),null!==t&&e.scrollTo({key:t,offset:a}),null==r||r(t))})),(0,h.Z)((0,c.Z)(e),"getActiveItem",(function(){var t=e.state,n=t.activeKey,i=t.flattenNodes;return null===n?null:i.find((function(e){return e.key===n}))||null})),(0,h.Z)((0,c.Z)(e),"offsetActiveKey",(function(t){var n=e.state,i=n.flattenNodes,r=n.activeKey,o=i.findIndex((function(e){return e.key===r}));-1===o&&t<0&&(o=i.length);var a=i[o=(o+t+i.length)%i.length];if(a){var l=a.key;e.onActiveChange(l)}else e.onActiveChange(null)})),(0,h.Z)((0,c.Z)(e),"onKeyDown",(function(t){var n=e.state,i=n.activeKey,r=n.expandedKeys,a=n.checkedKeys,l=n.fieldNames,s=e.props,c=s.onKeyDown,u=s.checkable,d=s.selectable;switch(t.which){case m.Z.UP:e.offsetActiveKey(-1),t.preventDefault();break;case m.Z.DOWN:e.offsetActiveKey(1),t.preventDefault()}var h=e.getActiveItem();if(h&&h.data){var p=e.getTreeNodeRequiredProps(),f=!1===h.data.isLeaf||!!(h.data[l.children]||[]).length,v=(0,A.F)((0,o.Z)((0,o.Z)({},(0,A.H8)(i,p)),{},{data:h.data,active:!0}));switch(t.which){case m.Z.LEFT:f&&r.includes(i)?e.onNodeExpand({},v):h.parent&&e.onActiveChange(h.parent.key),t.preventDefault();break;case m.Z.RIGHT:f&&!r.includes(i)?e.onNodeExpand({},v):h.children&&h.children.length&&e.onActiveChange(h.children[0].key),t.preventDefault();break;case m.Z.ENTER:case m.Z.SPACE:!u||v.disabled||!1===v.checkable||v.disableCheckbox?u||!d||v.disabled||!1===v.selectable||e.onNodeSelect({},v):e.onNodeCheck({},v,!a.includes(i))}}null==c||c(t)})),(0,h.Z)((0,c.Z)(e),"setUncontrolledState",(function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(!e.destroyed){var r=!1,a=!0,l={};Object.keys(t).forEach((function(n){e.props.hasOwnProperty(n)?a=!1:(r=!0,l[n]=t[n])})),!r||n&&!a||e.setState((0,o.Z)((0,o.Z)({},l),i))}})),(0,h.Z)((0,c.Z)(e),"scrollTo",(function(t){e.listRef.current.scrollTo(t)})),e}return(0,s.Z)(n,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var e=this.props,t=e.activeKey,n=e.itemScrollOffset,i=void 0===n?0:n;void 0!==t&&t!==this.state.activeKey&&(this.setState({activeKey:t}),null!==t&&this.scrollTo({key:t,offset:i}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var e,t=this.state,n=t.focused,o=t.flattenNodes,a=t.keyEntities,l=t.draggingNodeKey,s=t.activeKey,c=t.dropLevelOffset,u=t.dropContainerKey,d=t.dropTargetKey,p=t.dropPosition,m=t.dragOverNodeKey,g=t.indent,b=this.props,w=b.prefixCls,C=b.className,k=b.style,S=b.showLine,_=b.focusable,j=b.tabIndex,N=void 0===j?0:j,E=b.selectable,A=b.showIcon,Z=b.icon,I=b.switcherIcon,D=b.draggable,T=b.checkable,P=b.checkStrictly,M=b.disabled,L=b.motion,B=b.loadData,R=b.filterTreeNode,O=b.height,F=b.itemHeight,W=b.scrollWidth,H=b.virtual,G=b.titleRender,V=b.dropIndicatorRender,K=b.onContextMenu,U=b.onScroll,q=b.direction,Y=b.rootClassName,X=b.rootStyle,J=(0,v.Z)(this.props,{aria:!0,data:!0});D&&(e="object"===(0,r.Z)(D)?D:"function"==typeof D?{nodeDraggable:D}:{});var Q={prefixCls:w,selectable:E,showIcon:A,icon:Z,switcherIcon:I,draggable:e,draggingNodeKey:l,checkable:T,checkStrictly:P,disabled:M,keyEntities:a,dropLevelOffset:c,dropContainerKey:u,dropTargetKey:d,dropPosition:p,dragOverNodeKey:m,indent:g,direction:q,dropIndicatorRender:V,loadData:B,filterTreeNode:R,titleRender:G,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return y.createElement(x.k.Provider,{value:Q},y.createElement("div",{className:f()(w,C,Y,(0,h.Z)((0,h.Z)((0,h.Z)({},"".concat(w,"-show-line"),S),"".concat(w,"-focused"),n),"".concat(w,"-active-focused"),null!==s)),style:X},y.createElement(z,(0,i.Z)({ref:this.listRef,prefixCls:w,style:k,data:o,disabled:M,selectable:E,checkable:!!T,motion:L,dragging:null!==l,height:O,itemHeight:F,virtual:H,focusable:_,focused:n,tabIndex:N,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:K,onScroll:U,scrollWidth:W},this.getTreeNodeRequiredProps(),J))))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n,i=t.prevProps,r={prevProps:e};function a(t){return!i&&e.hasOwnProperty(t)||i&&i[t]!==e[t]}var l=t.fieldNames;if(a("fieldNames")&&(l=(0,A.w$)(e.fieldNames),r.fieldNames=l),a("treeData")?n=e.treeData:a("children")&&((0,g.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),n=(0,A.zn)(e.children)),n){r.treeData=n;var s=(0,A.I8)(n,{fieldNames:l});r.keyEntities=(0,o.Z)((0,h.Z)({},L,R),s.keyEntities)}var c,u=r.keyEntities||t.keyEntities;if(a("expandedKeys")||i&&a("autoExpandParent"))r.expandedKeys=e.autoExpandParent||!i&&e.defaultExpandParent?(0,G.r7)(e.expandedKeys,u):e.expandedKeys;else if(!i&&e.defaultExpandAll){var d=(0,o.Z)({},u);delete d[L];var p=[];Object.keys(d).forEach((function(e){var t=d[e];t.children&&t.children.length&&p.push(t.key)})),r.expandedKeys=p}else!i&&e.defaultExpandedKeys&&(r.expandedKeys=e.autoExpandParent||e.defaultExpandParent?(0,G.r7)(e.defaultExpandedKeys,u):e.defaultExpandedKeys);if(r.expandedKeys||delete r.expandedKeys,n||r.expandedKeys){var f=(0,A.oH)(n||t.treeData,r.expandedKeys||t.expandedKeys,l);r.flattenNodes=f}if((e.selectable&&(a("selectedKeys")?r.selectedKeys=(0,G.BT)(e.selectedKeys,e):!i&&e.defaultSelectedKeys&&(r.selectedKeys=(0,G.BT)(e.defaultSelectedKeys,e))),e.checkable)&&(a("checkedKeys")?c=(0,G.E6)(e.checkedKeys)||{}:!i&&e.defaultCheckedKeys?c=(0,G.E6)(e.defaultCheckedKeys)||{}:n&&(c=(0,G.E6)(e.checkedKeys)||{checkedKeys:t.checkedKeys,halfCheckedKeys:t.halfCheckedKeys}),c)){var m=c,v=m.checkedKeys,y=void 0===v?[]:v,x=m.halfCheckedKeys,b=void 0===x?[]:x;if(!e.checkStrictly){var w=(0,V.S)(y,!0,u);y=w.checkedKeys,b=w.halfCheckedKeys}r.checkedKeys=y,r.halfCheckedKeys=b}return a("loadedKeys")&&(r.loadedKeys=e.loadedKeys),r}}]),n}(y.Component);(0,h.Z)(U,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:b,allowDrop:function(){return!0},expandAction:!1}),(0,h.Z)(U,"TreeNode",N.Z);var q=U},82661:function(e,t,n){"use strict";n.d(t,{BT:function(){return p},E6:function(){return f},L0:function(){return s},OM:function(){return h},_5:function(){return l},r7:function(){return m},wA:function(){return u},yx:function(){return c}});var i=n(94480),r=n(76190),o=n(48736),a=(n(59301),n(639),n(65065));n(34061);function l(e,t){if(!e)return[];var n=e.slice(),i=n.indexOf(t);return i>=0&&n.splice(i,1),n}function s(e,t){var n=(e||[]).slice();return-1===n.indexOf(t)&&n.push(t),n}function c(e){return e.split("-")}function u(e,t){var n=[];return function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];t.forEach((function(t){var i=t.key,r=t.children;n.push(i),e(r)}))}((0,a.Z)(t,e).children),n}function d(e){if(e.parent){var t=c(e.pos);return Number(t[t.length-1])===e.parent.children.length-1}return!1}function h(e,t,n,i,r,o,l,s,u,h){var p,f=e.clientX,m=e.clientY,v=e.target.getBoundingClientRect(),g=v.top,y=v.height,x=(("rtl"===h?-1:1)*(((null==r?void 0:r.x)||0)-f)-12)/i,b=u.filter((function(e){var t;return null===(t=s[e])||void 0===t||null===(t=t.children)||void 0===t?void 0:t.length})),w=(0,a.Z)(s,n.eventKey);if(m<g+y/2){var C=l.findIndex((function(e){return e.key===w.key})),k=l[C<=0?0:C-1].key;w=(0,a.Z)(s,k)}var S=w.key,_=w,j=w.key,N=0,E=0;if(!b.includes(S))for(var A=0;A<x&&d(w);A+=1)w=w.parent,E+=1;var Z,I=t.data,D=w.node,T=!0;return Z=c(w.pos),0===Number(Z[Z.length-1])&&0===w.level&&m<g+y/2&&o({dragNode:I,dropNode:D,dropPosition:-1})&&w.key===n.eventKey?N=-1:(_.children||[]).length&&b.includes(j)?o({dragNode:I,dropNode:D,dropPosition:0})?N=0:T=!1:0===E?x>-1.5?o({dragNode:I,dropNode:D,dropPosition:1})?N=1:T=!1:o({dragNode:I,dropNode:D,dropPosition:0})?N=0:o({dragNode:I,dropNode:D,dropPosition:1})?N=1:T=!1:o({dragNode:I,dropNode:D,dropPosition:1})?N=1:T=!1,{dropPosition:N,dropLevelOffset:E,dropTargetKey:w.key,dropTargetPos:w.pos,dragOverNodeKey:j,dropContainerKey:0===N?null:(null===(p=w.parent)||void 0===p?void 0:p.key)||null,dropAllowed:T}}function p(e,t){if(e)return t.multiple?e.slice():e.length?[e[0]]:e}function f(e){if(!e)return null;var t;if(Array.isArray(e))t={checkedKeys:e,halfCheckedKeys:void 0};else{if("object"!==(0,r.Z)(e))return(0,o.ZP)(!1,"`checkedKeys` is not an array or an object"),null;t={checkedKeys:e.checked||void 0,halfCheckedKeys:e.halfChecked||void 0}}return t}function m(e,t){var n=new Set;function r(e){if(!n.has(e)){var i=(0,a.Z)(t,e);if(i){n.add(e);var o=i.parent;i.node.disabled||o&&r(o.key)}}}return(e||[]).forEach((function(e){r(e)})),(0,i.Z)(n)}},34643:function(e,t,n){"use strict";n.d(t,{S:function(){return l}});var i=n(48736),r=n(65065);function o(e,t){var n=new Set;return e.forEach((function(e){t.has(e)||n.add(e)})),n}function a(e){var t=e||{},n=t.disabled,i=t.disableCheckbox,r=t.checkable;return!(!n&&!i)||!1===r}function l(e,t,n,l){var s,c=[];s=l||a;var u,d=new Set(e.filter((function(e){var t=!!(0,r.Z)(n,e);return t||c.push(e),t}))),h=new Map,p=0;return Object.keys(n).forEach((function(e){var t=n[e],i=t.level,r=h.get(i);r||(r=new Set,h.set(i,r)),r.add(t),p=Math.max(p,i)})),(0,i.ZP)(!c.length,"Tree missing follow keys: ".concat(c.slice(0,100).map((function(e){return"'".concat(e,"'")})).join(", "))),u=!0===t?function(e,t,n,i){for(var r=new Set(e),a=new Set,l=0;l<=n;l+=1)(t.get(l)||new Set).forEach((function(e){var t=e.key,n=e.node,o=e.children,a=void 0===o?[]:o;r.has(t)&&!i(n)&&a.filter((function(e){return!i(e.node)})).forEach((function(e){r.add(e.key)}))}));for(var s=new Set,c=n;c>=0;c-=1)(t.get(c)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!i(n)&&e.parent&&!s.has(e.parent.key))if(i(e.parent.node))s.add(t.key);else{var o=!0,l=!1;(t.children||[]).filter((function(e){return!i(e.node)})).forEach((function(e){var t=e.key,n=r.has(t);o&&!n&&(o=!1),l||!n&&!a.has(t)||(l=!0)})),o&&r.add(t.key),l&&a.add(t.key),s.add(t.key)}}));return{checkedKeys:Array.from(r),halfCheckedKeys:Array.from(o(a,r))}}(d,h,p,s):function(e,t,n,i,r){for(var a=new Set(e),l=new Set(t),s=0;s<=i;s+=1)(n.get(s)||new Set).forEach((function(e){var t=e.key,n=e.node,i=e.children,o=void 0===i?[]:i;a.has(t)||l.has(t)||r(n)||o.filter((function(e){return!r(e.node)})).forEach((function(e){a.delete(e.key)}))}));l=new Set;for(var c=new Set,u=i;u>=0;u-=1)(n.get(u)||new Set).forEach((function(e){var t=e.parent,n=e.node;if(!r(n)&&e.parent&&!c.has(e.parent.key))if(r(e.parent.node))c.add(t.key);else{var i=!0,o=!1;(t.children||[]).filter((function(e){return!r(e.node)})).forEach((function(e){var t=e.key,n=a.has(t);i&&!n&&(i=!1),o||!n&&!l.has(t)||(o=!0)})),i||a.delete(t.key),o&&l.add(t.key),c.add(t.key)}}));return{checkedKeys:Array.from(a),halfCheckedKeys:Array.from(o(l,a))}}(d,t.halfCheckedKeys,h,p,s),u}},65065:function(e,t,n){"use strict";function i(e,t){return e[t]}n.d(t,{Z:function(){return i}})},34061:function(e,t,n){"use strict";n.d(t,{F:function(){return b},H8:function(){return x},I8:function(){return y},km:function(){return p},oH:function(){return v},w$:function(){return f},zn:function(){return m}});var i=n(76190),r=n(94480),o=n(33885),a=n(75931),l=n(11592),s=n(2738),c=n(48736),u=n(65065),d=["children"];function h(e,t){return"".concat(e,"-").concat(t)}function p(e,t){return null!=e?e:t}function f(e){var t=e||{},n=t.title||"title";return{title:n,_title:t._title||[n],key:t.key||"key",children:t.children||"children"}}function m(e){return function e(t){return(0,l.Z)(t).map((function(t){if(!function(e){return e&&e.type&&e.type.isTreeNode}(t))return(0,c.ZP)(!t,"Tree/TreeNode can only accept TreeNode as children."),null;var n=t.key,i=t.props,r=i.children,l=(0,a.Z)(i,d),s=(0,o.Z)({key:n},l),u=e(r);return u.length&&(s.children=u),s})).filter((function(e){return e}))}(e)}function v(e,t,n){var i=f(n),o=i._title,a=i.key,l=i.children,c=new Set(!0===t?[]:t),u=[];return function e(n){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return n.map((function(d,f){for(var m,v=h(i?i.pos:"0",f),g=p(d[a],v),y=0;y<o.length;y+=1){var x=o[y];if(void 0!==d[x]){m=d[x];break}}var b=Object.assign((0,s.Z)(d,[].concat((0,r.Z)(o),[a,l])),{title:m,key:g,parent:i,pos:v,children:null,data:d,isStart:[].concat((0,r.Z)(i?i.isStart:[]),[0===f]),isEnd:[].concat((0,r.Z)(i?i.isEnd:[]),[f===n.length-1])});return u.push(b),!0===t||c.has(g)?b.children=e(d[l]||[],b):b.children=[],b}))}(e),u}function g(e,t,n){var o,a=("object"===(0,i.Z)(n)?n:{externalGetKey:n})||{},l=a.childrenPropName,s=a.externalGetKey,c=f(a.fieldNames),u=c.key,d=c.children,m=l||d;s?"string"==typeof s?o=function(e){return e[s]}:"function"==typeof s&&(o=function(e){return s(e)}):o=function(e,t){return p(e[u],t)},function n(i,a,l,s){var c=i?i[m]:e,u=i?h(l.pos,a):"0",d=i?[].concat((0,r.Z)(s),[i]):[];if(i){var p=o(i,u),f={node:i,index:a,pos:u,key:p,parentPos:l.node?l.pos:null,level:l.level+1,nodes:d};t(f)}c&&c.forEach((function(e,t){n(e,t,{node:i,pos:u,level:l?l.level+1:-1},d)}))}(null)}function y(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.initWrapper,i=t.processEntity,r=t.onProcessFinished,o=t.externalGetKey,a=t.childrenPropName,l=t.fieldNames,s=arguments.length>2?arguments[2]:void 0,c=o||s,u={},d={},h={posEntities:u,keyEntities:d};return n&&(h=n(h)||h),g(e,(function(e){var t=e.node,n=e.index,r=e.pos,o=e.key,a=e.parentPos,l=e.level,s={node:t,nodes:e.nodes,index:n,key:o,pos:r,level:l},c=p(o,r);u[r]=s,d[c]=s,s.parent=u[a],s.parent&&(s.parent.children=s.parent.children||[],s.parent.children.push(s)),i&&i(s,h)}),{externalGetKey:c,childrenPropName:a,fieldNames:l}),r&&r(h),h}function x(e,t){var n=t.expandedKeys,i=t.selectedKeys,r=t.loadedKeys,o=t.loadingKeys,a=t.checkedKeys,l=t.halfCheckedKeys,s=t.dragOverNodeKey,c=t.dropPosition,d=t.keyEntities,h=(0,u.Z)(d,e);return{eventKey:e,expanded:-1!==n.indexOf(e),selected:-1!==i.indexOf(e),loaded:-1!==r.indexOf(e),loading:-1!==o.indexOf(e),checked:-1!==a.indexOf(e),halfChecked:-1!==l.indexOf(e),pos:String(h?h.pos:""),dragOver:s===e&&0===c,dragOverGapTop:s===e&&-1===c,dragOverGapBottom:s===e&&1===c}}function b(e){var t=e.data,n=e.expanded,i=e.selected,r=e.checked,a=e.loaded,l=e.loading,s=e.halfChecked,u=e.dragOver,d=e.dragOverGapTop,h=e.dragOverGapBottom,p=e.pos,f=e.active,m=e.eventKey,v=(0,o.Z)((0,o.Z)({},t),{},{expanded:n,selected:i,checked:r,loaded:a,loading:l,halfChecked:s,dragOver:u,dragOverGapTop:d,dragOverGapBottom:h,pos:p,active:f,key:m});return"props"in v||Object.defineProperty(v,"props",{get:function(){return(0,c.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),e}}),v}},8224:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(4676);function r(e,t,n,r){var o=i.unstable_batchedUpdates?function(e){i.unstable_batchedUpdates(n,e)}:n;return null!=e&&e.addEventListener&&e.addEventListener(t,o,r),{remove:function(){null!=e&&e.removeEventListener&&e.removeEventListener(t,o,r)}}}},24514:function(e,t,n){"use strict";n.d(t,{G:function(){return o}});var i=n(47273),r=function(e){if((0,i.Z)()&&window.document.documentElement){var t=Array.isArray(e)?e:[e],n=window.document.documentElement;return t.some((function(e){return e in n.style}))}return!1};function o(e,t){return Array.isArray(e)||void 0===t?r(e):function(e,t){if(!r(e))return!1;var n=document.createElement("div"),i=n.style[e];return n.style[e]=t,n.style[e]!==i}(e,t)}},48911:function(e,t,n){"use strict";n.d(t,{Z:function(){return R}});var i=n(54476),r=n(76190),o=n(33885),a=n(20068),l=n(42978),s=n(75931),c=n(92310),u=n.n(c),d=n(29301),h=n(70425),p=n(34280),f=n(59301),m=n(4676),v=f.forwardRef((function(e,t){var n=e.height,r=e.offsetY,l=e.offsetX,s=e.children,c=e.prefixCls,h=e.onInnerResize,p=e.innerProps,m=e.rtl,v=e.extra,g={},y={display:"flex",flexDirection:"column"};return void 0!==r&&(g={height:n,position:"relative",overflow:"hidden"},y=(0,o.Z)((0,o.Z)({},y),{},(0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)((0,a.Z)({transform:"translateY(".concat(r,"px)")},m?"marginRight":"marginLeft",-l),"position","absolute"),"left",0),"right",0),"top",0))),f.createElement("div",{style:g},f.createElement(d.Z,{onResize:function(e){e.offsetHeight&&h&&h()}},f.createElement("div",(0,i.Z)({style:y,className:u()((0,a.Z)({},"".concat(c,"-holder-inner"),c)),ref:t},p),s,v)))}));v.displayName="Filler";var g=v;function y(e){var t=e.children,n=e.setRef,i=f.useCallback((function(e){n(e)}),[]);return f.cloneElement(t,{ref:i})}function x(e,t,n){var i=f.useState(e),r=(0,l.Z)(i,2),o=r[0],a=r[1],s=f.useState(null),c=(0,l.Z)(s,2),u=c[0],d=c[1];return f.useEffect((function(){var i=function(e,t,n){var i,r,o=e.length,a=t.length;if(0===o&&0===a)return null;o<a?(i=e,r=t):(i=t,r=e);var l={__EMPTY_ITEM__:!0};function s(e){return void 0!==e?n(e):l}for(var c=null,u=1!==Math.abs(o-a),d=0;d<r.length;d+=1){var h=s(i[d]);if(h!==s(r[d])){c=d,u=u||h!==s(r[d+1]);break}}return null===c?null:{index:c,multiple:u}}(o||[],e||[],t);void 0!==(null==i?void 0:i.index)&&(null==n||n(i.index),d(e[i.index])),a(e)}),[e]),[u]}var b=n(16089),w="object"===("undefined"==typeof navigator?"undefined":(0,r.Z)(navigator))&&/Firefox/i.test(navigator.userAgent),C=function(e,t,n,i){var r=(0,f.useRef)(!1),o=(0,f.useRef)(null);function a(){clearTimeout(o.current),r.current=!0,o.current=setTimeout((function(){r.current=!1}),50)}var l=(0,f.useRef)({top:e,bottom:t,left:n,right:i});return l.current.top=e,l.current.bottom=t,l.current.left=n,l.current.right=i,function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=e?t<0&&l.current.left||t>0&&l.current.right:t<0&&l.current.top||t>0&&l.current.bottom;return n&&i?(clearTimeout(o.current),r.current=!1):i&&!r.current||a(),!r.current&&i}};function k(e,t,n,i,r,o,a){var l=(0,f.useRef)(0),s=(0,f.useRef)(null),c=(0,f.useRef)(null),u=(0,f.useRef)(!1),d=C(t,n,i,r);var h=(0,f.useRef)(null),p=(0,f.useRef)(null);return[function(t){if(e){b.Z.cancel(p.current),p.current=(0,b.Z)((function(){h.current=null}),2);var n=t.deltaX,i=t.deltaY,r=t.shiftKey,f=n,m=i;("sx"===h.current||!h.current&&r&&i&&!n)&&(f=i,m=0,h.current="sx");var v=Math.abs(f),g=Math.abs(m);null===h.current&&(h.current=o&&v>g?"x":"y"),"y"===h.current?function(e,t){if(b.Z.cancel(s.current),!d(!1,t)){var n=e;n._virtualHandled||(n._virtualHandled=!0,l.current+=t,c.current=t,w||n.preventDefault(),s.current=(0,b.Z)((function(){var e=u.current?10:1;a(l.current*e,!1),l.current=0})))}}(t,m):function(e,t){a(t,!0),w||e.preventDefault()}(t,f)}},function(t){e&&(u.current=t.detail===c.current)}]}var S=n(67732),_=n(83652),j=function(){function e(){(0,S.Z)(this,e),(0,a.Z)(this,"maps",void 0),(0,a.Z)(this,"id",0),(0,a.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,_.Z)(e,[{key:"set",value:function(e,t){this.diffRecords.set(e,this.maps[e]),this.maps[e]=t,this.id+=1}},{key:"get",value:function(e){return this.maps[e]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),e}();function N(e){var t=parseFloat(e);return isNaN(t)?0:t}var E=14/15;function A(e){return Math.floor(Math.pow(e,.5))}function Z(e,t){return("touches"in e?e.touches[0]:e)[t?"pageX":"pageY"]-window[t?"scrollX":"scrollY"]}var I=f.forwardRef((function(e,t){var n=e.prefixCls,i=e.rtl,r=e.scrollOffset,s=e.scrollRange,c=e.onStartMove,d=e.onStopMove,h=e.onScroll,p=e.horizontal,m=e.spinSize,v=e.containerSize,g=e.style,y=e.thumbStyle,x=e.showScrollBar,w=f.useState(!1),C=(0,l.Z)(w,2),k=C[0],S=C[1],_=f.useState(null),j=(0,l.Z)(_,2),N=j[0],E=j[1],A=f.useState(null),I=(0,l.Z)(A,2),D=I[0],T=I[1],P=!i,M=f.useRef(),L=f.useRef(),B=f.useState(x),R=(0,l.Z)(B,2),O=R[0],F=R[1],W=f.useRef(),H=function(){!0!==x&&!1!==x&&(clearTimeout(W.current),F(!0),W.current=setTimeout((function(){F(!1)}),3e3))},z=s-v||0,G=v-m||0,V=f.useMemo((function(){return 0===r||0===z?0:r/z*G}),[r,z,G]),K=f.useRef({top:V,dragging:k,pageY:N,startTop:D});K.current={top:V,dragging:k,pageY:N,startTop:D};var U=function(e){S(!0),E(Z(e,p)),T(K.current.top),c(),e.stopPropagation(),e.preventDefault()};f.useEffect((function(){var e=function(e){e.preventDefault()},t=M.current,n=L.current;return t.addEventListener("touchstart",e,{passive:!1}),n.addEventListener("touchstart",U,{passive:!1}),function(){t.removeEventListener("touchstart",e),n.removeEventListener("touchstart",U)}}),[]);var q=f.useRef();q.current=z;var Y=f.useRef();Y.current=G,f.useEffect((function(){if(k){var e,t=function(t){var n=K.current,i=n.dragging,r=n.pageY,o=n.startTop;b.Z.cancel(e);var a=M.current.getBoundingClientRect(),l=v/(p?a.width:a.height);if(i){var s=(Z(t,p)-r)*l,c=o;!P&&p?c-=s:c+=s;var u=q.current,d=Y.current,f=d?c/d:0,m=Math.ceil(f*u);m=Math.max(m,0),m=Math.min(m,u),e=(0,b.Z)((function(){h(m,p)}))}},n=function(){S(!1),d()};return window.addEventListener("mousemove",t,{passive:!0}),window.addEventListener("touchmove",t,{passive:!0}),window.addEventListener("mouseup",n,{passive:!0}),window.addEventListener("touchend",n,{passive:!0}),function(){window.removeEventListener("mousemove",t),window.removeEventListener("touchmove",t),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),b.Z.cancel(e)}}}),[k]),f.useEffect((function(){return H(),function(){clearTimeout(W.current)}}),[r]),f.useImperativeHandle(t,(function(){return{delayHidden:H}}));var X="".concat(n,"-scrollbar"),J={position:"absolute",visibility:O?null:"hidden"},Q={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return p?(Object.assign(J,{height:8,left:0,right:0,bottom:0}),Object.assign(Q,(0,a.Z)({height:"100%",width:m},P?"left":"right",V))):(Object.assign(J,(0,a.Z)({width:8,top:0,bottom:0},P?"right":"left",0)),Object.assign(Q,{width:"100%",height:m,top:V})),f.createElement("div",{ref:M,className:u()(X,(0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(X,"-horizontal"),p),"".concat(X,"-vertical"),!p),"".concat(X,"-visible"),O)),style:(0,o.Z)((0,o.Z)({},J),g),onMouseDown:function(e){e.stopPropagation(),e.preventDefault()},onMouseMove:H},f.createElement("div",{ref:L,className:u()("".concat(X,"-thumb"),(0,a.Z)({},"".concat(X,"-thumb-moving"),k)),style:(0,o.Z)((0,o.Z)({},Q),y),onMouseDown:U}))}));function D(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e/t*e;return isNaN(n)&&(n=0),n=Math.max(n,20),Math.floor(n)}var T=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],P=[],M={overflowY:"auto",overflowAnchor:"none"};function L(e,t){var n=e.prefixCls,c=void 0===n?"rc-virtual-list":n,v=e.className,w=e.height,S=e.itemHeight,_=e.fullHeight,L=void 0===_||_,B=e.style,R=e.data,O=e.children,F=e.itemKey,W=e.virtual,H=e.direction,z=e.scrollWidth,G=e.component,V=void 0===G?"div":G,K=e.onScroll,U=e.onVirtualScroll,q=e.onVisibleChange,Y=e.innerProps,X=e.extraRender,J=e.styles,Q=e.showScrollBar,$=void 0===Q?"optional":Q,ee=(0,s.Z)(e,T),te=f.useCallback((function(e){return"function"==typeof F?F(e):null==e?void 0:e[F]}),[F]),ne=function(e,t,n){var i=f.useState(0),r=(0,l.Z)(i,2),o=r[0],a=r[1],s=(0,f.useRef)(new Map),c=(0,f.useRef)(new j),u=(0,f.useRef)(0);function d(){u.current+=1}function h(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];d();var t=function(){var e=!1;s.current.forEach((function(t,n){if(t&&t.offsetParent){var i=t.offsetHeight,r=getComputedStyle(t),o=r.marginTop,a=r.marginBottom,l=i+N(o)+N(a);c.current.get(n)!==l&&(c.current.set(n,l),e=!0)}})),e&&a((function(e){return e+1}))};if(e)t();else{u.current+=1;var n=u.current;Promise.resolve().then((function(){n===u.current&&t()}))}}return(0,f.useEffect)((function(){return d}),[]),[function(i,r){var o=e(i),a=s.current.get(o);r?(s.current.set(o,r),h()):s.current.delete(o),!a!=!r&&(r?null==t||t(i):null==n||n(i))},h,c.current,o]}(te,null,null),ie=(0,l.Z)(ne,4),re=ie[0],oe=ie[1],ae=ie[2],le=ie[3],se=!(!1===W||!w||!S),ce=f.useMemo((function(){return Object.values(ae.maps).reduce((function(e,t){return e+t}),0)}),[ae.id,ae.maps]),ue=se&&R&&(Math.max(S*R.length,ce)>w||!!z),de="rtl"===H,he=u()(c,(0,a.Z)({},"".concat(c,"-rtl"),de),v),pe=R||P,fe=(0,f.useRef)(),me=(0,f.useRef)(),ve=(0,f.useRef)(),ge=(0,f.useState)(0),ye=(0,l.Z)(ge,2),xe=ye[0],be=ye[1],we=(0,f.useState)(0),Ce=(0,l.Z)(we,2),ke=Ce[0],Se=Ce[1],_e=(0,f.useState)(!1),je=(0,l.Z)(_e,2),Ne=je[0],Ee=je[1],Ae=function(){Ee(!0)},Ze=function(){Ee(!1)},Ie={getKey:te};function De(e){be((function(t){var n=function(e){var t=e;Number.isNaN(Je.current)||(t=Math.min(t,Je.current));return t=Math.max(t,0),t}("function"==typeof e?e(t):e);return fe.current.scrollTop=n,n}))}var Te=(0,f.useRef)({start:0,end:pe.length}),Pe=(0,f.useRef)(),Me=x(pe,te),Le=(0,l.Z)(Me,1)[0];Pe.current=Le;var Be=f.useMemo((function(){if(!se)return{scrollHeight:void 0,start:0,end:pe.length-1,offset:void 0};var e;if(!ue)return{scrollHeight:(null===(e=me.current)||void 0===e?void 0:e.offsetHeight)||0,start:0,end:pe.length-1,offset:void 0};for(var t,n,i,r=0,o=pe.length,a=0;a<o;a+=1){var l=pe[a],s=te(l),c=ae.get(s),u=r+(void 0===c?S:c);u>=xe&&void 0===t&&(t=a,n=r),u>xe+w&&void 0===i&&(i=a),r=u}return void 0===t&&(t=0,n=0,i=Math.ceil(w/S)),void 0===i&&(i=pe.length-1),{scrollHeight:r,start:t,end:i=Math.min(i+1,pe.length-1),offset:n}}),[ue,se,xe,pe,le,w]),Re=Be.scrollHeight,Oe=Be.start,Fe=Be.end,We=Be.offset;Te.current.start=Oe,Te.current.end=Fe,f.useLayoutEffect((function(){var e=ae.getRecord();if(1===e.size){var t=Array.from(e.keys())[0],n=e.get(t),i=pe[Oe];if(i&&void 0===n)if(te(i)===t){var r=ae.get(t)-S;De((function(e){return e+r}))}}ae.resetRecord()}),[Re]);var He=f.useState({width:0,height:w}),ze=(0,l.Z)(He,2),Ge=ze[0],Ve=ze[1],Ke=(0,f.useRef)(),Ue=(0,f.useRef)(),qe=f.useMemo((function(){return D(Ge.width,z)}),[Ge.width,z]),Ye=f.useMemo((function(){return D(Ge.height,Re)}),[Ge.height,Re]),Xe=Re-w,Je=(0,f.useRef)(Xe);Je.current=Xe;var Qe=xe<=0,$e=xe>=Xe,et=ke<=0,tt=ke>=z,nt=C(Qe,$e,et,tt),it=function(){return{x:de?-ke:ke,y:xe}},rt=(0,f.useRef)(it()),ot=(0,h.zX)((function(e){if(U){var t=(0,o.Z)((0,o.Z)({},it()),e);rt.current.x===t.x&&rt.current.y===t.y||(U(t),rt.current=t)}}));function at(e,t){var n=e;t?((0,m.flushSync)((function(){Se(n)})),ot()):De(n)}var lt=function(e){var t=e,n=z?z-Ge.width:0;return t=Math.max(t,0),t=Math.min(t,n)},st=(0,h.zX)((function(e,t){t?((0,m.flushSync)((function(){Se((function(t){return lt(t+(de?-e:e))}))})),ot()):De((function(t){return t+e}))})),ct=k(se,Qe,$e,et,tt,!!z,st),ut=(0,l.Z)(ct,2),dt=ut[0],ht=ut[1];!function(e,t,n){var i,r=(0,f.useRef)(!1),o=(0,f.useRef)(0),a=(0,f.useRef)(0),l=(0,f.useRef)(null),s=(0,f.useRef)(null),c=function(e){if(r.current){var t=Math.ceil(e.touches[0].pageX),i=Math.ceil(e.touches[0].pageY),l=o.current-t,c=a.current-i,u=Math.abs(l)>Math.abs(c);u?o.current=t:a.current=i;var d=n(u,u?l:c,!1,e);d&&e.preventDefault(),clearInterval(s.current),d&&(s.current=setInterval((function(){u?l*=E:c*=E;var e=Math.floor(u?l:c);(!n(u,e,!0)||Math.abs(e)<=.1)&&clearInterval(s.current)}),16))}},u=function(){r.current=!1,i()},d=function(e){i(),1!==e.touches.length||r.current||(r.current=!0,o.current=Math.ceil(e.touches[0].pageX),a.current=Math.ceil(e.touches[0].pageY),l.current=e.target,l.current.addEventListener("touchmove",c,{passive:!1}),l.current.addEventListener("touchend",u,{passive:!0}))};i=function(){l.current&&(l.current.removeEventListener("touchmove",c),l.current.removeEventListener("touchend",u))},(0,p.Z)((function(){return e&&t.current.addEventListener("touchstart",d,{passive:!0}),function(){var e;null===(e=t.current)||void 0===e||e.removeEventListener("touchstart",d),i(),clearInterval(s.current)}}),[e])}(se,fe,(function(e,t,n,i){var r=i;return!nt(e,t,n)&&((!r||!r._virtualHandled)&&(r&&(r._virtualHandled=!0),dt({preventDefault:function(){},deltaX:e?t:0,deltaY:e?0:t}),!0))})),function(e,t,n){f.useEffect((function(){var i=t.current;if(e&&i){var r,o,a=!1,l=function(){b.Z.cancel(r)},s=function e(){l(),r=(0,b.Z)((function(){n(o),e()}))},c=function(){a=!1,l()},u=function(e){if(!e.target.draggable&&0===e.button){var t=e;t._virtualHandled||(t._virtualHandled=!0,a=!0)}},d=function(e){if(a){var t=Z(e,!1),n=i.getBoundingClientRect(),r=n.top,c=n.bottom;t<=r?(o=-A(r-t),s()):t>=c?(o=A(t-c),s()):l()}};return i.addEventListener("mousedown",u),i.ownerDocument.addEventListener("mouseup",c),i.ownerDocument.addEventListener("mousemove",d),i.ownerDocument.addEventListener("dragend",c),function(){i.removeEventListener("mousedown",u),i.ownerDocument.removeEventListener("mouseup",c),i.ownerDocument.removeEventListener("mousemove",d),i.ownerDocument.removeEventListener("dragend",c),l()}}}),[e])}(ue,fe,(function(e){De((function(t){return t+e}))})),(0,p.Z)((function(){function e(e){var t=Qe&&e.detail<0,n=$e&&e.detail>0;!se||t||n||e.preventDefault()}var t=fe.current;return t.addEventListener("wheel",dt,{passive:!1}),t.addEventListener("DOMMouseScroll",ht,{passive:!0}),t.addEventListener("MozMousePixelScroll",e,{passive:!1}),function(){t.removeEventListener("wheel",dt),t.removeEventListener("DOMMouseScroll",ht),t.removeEventListener("MozMousePixelScroll",e)}}),[se,Qe,$e]),(0,p.Z)((function(){if(z){var e=lt(ke);Se(e),ot({x:e})}}),[Ge.width,z]);var pt=function(){var e,t;null===(e=Ke.current)||void 0===e||e.delayHidden(),null===(t=Ue.current)||void 0===t||t.delayHidden()},ft=function(e,t,n,i,a,s,c,u){var d=f.useRef(),h=f.useState(null),m=(0,l.Z)(h,2),v=m[0],g=m[1];return(0,p.Z)((function(){if(v&&v.times<10){if(!e.current)return void g((function(e){return(0,o.Z)({},e)}));s();var r=v.targetAlign,l=v.originAlign,u=v.index,d=v.offset,h=e.current.clientHeight,p=!1,f=r,m=null;if(h){for(var y=r||l,x=0,b=0,w=0,C=Math.min(t.length-1,u),k=0;k<=C;k+=1){var S=a(t[k]);b=x;var _=n.get(S);x=w=b+(void 0===_?i:_)}for(var j="top"===y?d:h-d,N=C;N>=0;N-=1){var E=a(t[N]),A=n.get(E);if(void 0===A){p=!0;break}if((j-=A)<=0)break}switch(y){case"top":m=b-d;break;case"bottom":m=w-h+d;break;default:var Z=e.current.scrollTop;b<Z?f="top":w>Z+h&&(f="bottom")}null!==m&&c(m),m!==v.lastTop&&(p=!0)}p&&g((0,o.Z)((0,o.Z)({},v),{},{times:v.times+1,targetAlign:f,lastTop:m}))}}),[v,e.current]),function(e){if(null!=e){if(b.Z.cancel(d.current),"number"==typeof e)c(e);else if(e&&"object"===(0,r.Z)(e)){var n,i=e.align;n="index"in e?e.index:t.findIndex((function(t){return a(t)===e.key}));var o=e.offset;g({times:0,index:n,offset:void 0===o?0:o,originAlign:i})}}else u()}}(fe,pe,ae,S,te,(function(){return oe(!0)}),De,pt);f.useImperativeHandle(t,(function(){return{nativeElement:ve.current,getScrollInfo:it,scrollTo:function(e){var t;(t=e)&&"object"===(0,r.Z)(t)&&("left"in t||"top"in t)?(void 0!==e.left&&Se(lt(e.left)),ft(e.top)):ft(e)}}})),(0,p.Z)((function(){if(q){var e=pe.slice(Oe,Fe+1);q(e,pe)}}),[Oe,Fe,pe]);var mt=function(e,t,n,i){var r=f.useMemo((function(){return[new Map,[]]}),[e,n.id,i]),o=(0,l.Z)(r,2),a=o[0],s=o[1];return function(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,l=a.get(r),c=a.get(o);if(void 0===l||void 0===c)for(var u=e.length,d=s.length;d<u;d+=1){var h,p=e[d],f=t(p);a.set(f,d);var m=null!==(h=n.get(f))&&void 0!==h?h:i;if(s[d]=(s[d-1]||0)+m,f===r&&(l=d),f===o&&(c=d),void 0!==l&&void 0!==c)break}return{top:s[l-1]||0,bottom:s[c]}}}(pe,te,ae,S),vt=null==X?void 0:X({start:Oe,end:Fe,virtual:ue,offsetX:ke,offsetY:We,rtl:de,getSize:mt}),gt=function(e,t,n,i,r,o,a,l){var s=l.getKey;return e.slice(t,n+1).map((function(e,n){var l=a(e,t+n,{style:{width:i},offsetX:r}),c=s(e);return f.createElement(y,{key:c,setRef:function(t){return o(e,t)}},l)}))}(pe,Oe,Fe,z,ke,re,O,Ie),yt=null;w&&(yt=(0,o.Z)((0,a.Z)({},L?"height":"maxHeight",w),M),se&&(yt.overflowY="hidden",z&&(yt.overflowX="hidden"),Ne&&(yt.pointerEvents="none")));var xt={};return de&&(xt.dir="rtl"),f.createElement("div",(0,i.Z)({ref:ve,style:(0,o.Z)((0,o.Z)({},B),{},{position:"relative"}),className:he},xt,ee),f.createElement(d.Z,{onResize:function(e){Ve({width:e.offsetWidth,height:e.offsetHeight})}},f.createElement(V,{className:"".concat(c,"-holder"),style:yt,ref:fe,onScroll:function(e){var t=e.currentTarget.scrollTop;t!==xe&&De(t),null==K||K(e),ot()},onMouseEnter:pt},f.createElement(g,{prefixCls:c,height:Re,offsetX:ke,offsetY:We,scrollWidth:z,onInnerResize:oe,ref:me,innerProps:Y,rtl:de,extra:vt},gt))),ue&&Re>w&&f.createElement(I,{ref:Ke,prefixCls:c,scrollOffset:xe,scrollRange:Re,rtl:de,onScroll:at,onStartMove:Ae,onStopMove:Ze,spinSize:Ye,containerSize:Ge.height,style:null==J?void 0:J.verticalScrollBar,thumbStyle:null==J?void 0:J.verticalScrollBarThumb,showScrollBar:$}),ue&&z>Ge.width&&f.createElement(I,{ref:Ue,prefixCls:c,scrollOffset:ke,scrollRange:z,rtl:de,onScroll:at,onStartMove:Ae,onStopMove:Ze,spinSize:qe,containerSize:Ge.width,horizontal:!0,style:null==J?void 0:J.horizontalScrollBar,thumbStyle:null==J?void 0:J.horizontalScrollBarThumb,showScrollBar:$}))}var B=f.forwardRef(L);B.displayName="List";var R=B},22061:function(e,t,n){"use strict";n.d(t,{Z5:function(){return wr},_l:function(){return io},bK:function(){return lo}});var i=n(59301),r=n(69168),o=n(54476),a=n(59781),l=i.createContext(null);var s=function(e){e()},c=function(){return s};var u={notify:function(){},get:function(){return[]}};function d(e,t){var n,i=u;function r(){a.onStateChange&&a.onStateChange()}function o(){n||(n=t?t.addNestedSub(r):e.subscribe(r),i=function(){var e=c(),t=null,n=null;return{clear:function(){t=null,n=null},notify:function(){e((function(){for(var e=t;e;)e.callback(),e=e.next}))},get:function(){for(var e=[],n=t;n;)e.push(n),n=n.next;return e},subscribe:function(e){var i=!0,r=n={callback:e,next:null,prev:n};return r.prev?r.prev.next=r:t=r,function(){i&&null!==t&&(i=!1,r.next?r.next.prev=r.prev:n=r.prev,r.prev?r.prev.next=r.next:t=r.next)}}}}())}var a={addNestedSub:function(e){return o(),i.subscribe(e)},notifyNestedSubs:function(){i.notify()},handleChangeWrapper:r,isSubscribed:function(){return Boolean(n)},trySubscribe:o,tryUnsubscribe:function(){n&&(n(),n=void 0,i.clear(),i=u)},getListeners:function(){return i}};return a}var h="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect;var p=function(e){var t=e.store,n=e.context,r=e.children,o=(0,i.useMemo)((function(){var e=d(t);return{store:t,subscription:e}}),[t]),a=(0,i.useMemo)((function(){return t.getState()}),[t]);h((function(){var e=o.subscription;return e.onStateChange=e.notifyNestedSubs,e.trySubscribe(),a!==t.getState()&&e.notifyNestedSubs(),function(){e.tryUnsubscribe(),e.onStateChange=null}}),[o,a]);var s=n||l;return i.createElement(s.Provider,{value:o},r)},f=n(85377),m=n(94266),v=n.n(m),g=n(53410),y=["getDisplayName","methodName","renderCountProp","shouldHandleStateChanges","storeKey","withRef","forwardRef","context"],x=["reactReduxForwardedRef"],b=[],w=[null,null];function C(e,t){var n=e[1];return[t.payload,n+1]}function k(e,t,n){h((function(){return e.apply(void 0,t)}),n)}function S(e,t,n,i,r,o,a){e.current=i,t.current=r,n.current=!1,o.current&&(o.current=null,a())}function _(e,t,n,i,r,o,a,l,s,c){if(e){var u=!1,d=null,h=function(){if(!u){var e,n,h=t.getState();try{e=i(h,r.current)}catch(e){n=e,d=e}n||(d=null),e===o.current?a.current||s():(o.current=e,l.current=e,a.current=!0,c({type:"STORE_UPDATED",payload:{error:n}}))}};n.onStateChange=h,n.trySubscribe(),h();return function(){if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d}}}var j=function(){return[null,0]};function N(e,t){void 0===t&&(t={});var n=t,r=n.getDisplayName,a=void 0===r?function(e){return"ConnectAdvanced("+e+")"}:r,s=n.methodName,c=void 0===s?"connectAdvanced":s,u=n.renderCountProp,h=void 0===u?void 0:u,p=n.shouldHandleStateChanges,m=void 0===p||p,N=n.storeKey,E=void 0===N?"store":N,A=(n.withRef,n.forwardRef),Z=void 0!==A&&A,I=n.context,D=void 0===I?l:I,T=(0,f.Z)(n,y),P=D;return function(t){var n=t.displayName||t.name||"Component",r=a(n),l=(0,o.Z)({},T,{getDisplayName:a,methodName:c,renderCountProp:h,shouldHandleStateChanges:m,storeKey:E,displayName:r,wrappedComponentName:n,WrappedComponent:t}),s=T.pure;var u=s?i.useMemo:function(e){return e()};function p(n){var r=(0,i.useMemo)((function(){var e=n.reactReduxForwardedRef,t=(0,f.Z)(n,x);return[n.context,e,t]}),[n]),a=r[0],s=r[1],c=r[2],h=(0,i.useMemo)((function(){return a&&a.Consumer&&(0,g.isContextConsumer)(i.createElement(a.Consumer,null))?a:P}),[a,P]),p=(0,i.useContext)(h),v=Boolean(n.store)&&Boolean(n.store.getState)&&Boolean(n.store.dispatch);Boolean(p)&&Boolean(p.store);var y=v?n.store:p.store,N=(0,i.useMemo)((function(){return function(t){return e(t.dispatch,l)}(y)}),[y]),E=(0,i.useMemo)((function(){if(!m)return w;var e=d(y,v?null:p.subscription),t=e.notifyNestedSubs.bind(e);return[e,t]}),[y,v,p]),A=E[0],Z=E[1],I=(0,i.useMemo)((function(){return v?p:(0,o.Z)({},p,{subscription:A})}),[v,p,A]),D=(0,i.useReducer)(C,b,j),T=D[0][0],M=D[1];if(T&&T.error)throw T.error;var L=(0,i.useRef)(),B=(0,i.useRef)(c),R=(0,i.useRef)(),O=(0,i.useRef)(!1),F=u((function(){return R.current&&c===B.current?R.current:N(y.getState(),c)}),[y,T,c]);k(S,[B,L,O,c,F,R,Z]),k(_,[m,y,A,N,B,L,O,R,Z,M],[y,A,N]);var W=(0,i.useMemo)((function(){return i.createElement(t,(0,o.Z)({},F,{ref:s}))}),[s,t,F]);return(0,i.useMemo)((function(){return m?i.createElement(h.Provider,{value:I},W):W}),[h,W,I])}var y=s?i.memo(p):p;if(y.WrappedComponent=t,y.displayName=p.displayName=r,Z){var N=i.forwardRef((function(e,t){return i.createElement(y,(0,o.Z)({},e,{reactReduxForwardedRef:t}))}));return N.displayName=r,N.WrappedComponent=t,v()(N,t)}return v()(y,t)}}function E(e,t){return e===t?0!==e||0!==t||1/e==1/t:e!=e&&t!=t}function A(e,t){if(E(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),i=Object.keys(t);if(n.length!==i.length)return!1;for(var r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!E(e[n[r]],t[n[r]]))return!1;return!0}function Z(e){return function(t,n){var i=e(t,n);function r(){return i}return r.dependsOnOwnProps=!1,r}}function I(e){return null!==e.dependsOnOwnProps&&void 0!==e.dependsOnOwnProps?Boolean(e.dependsOnOwnProps):1!==e.length}function D(e,t){return function(t,n){n.displayName;var i=function(e,t){return i.dependsOnOwnProps?i.mapToProps(e,t):i.mapToProps(e)};return i.dependsOnOwnProps=!0,i.mapToProps=function(t,n){i.mapToProps=e,i.dependsOnOwnProps=I(e);var r=i(t,n);return"function"==typeof r&&(i.mapToProps=r,i.dependsOnOwnProps=I(r),r=i(t,n)),r},i}}var T=[function(e){return"function"==typeof e?D(e):void 0},function(e){return e?void 0:Z((function(e){return{dispatch:e}}))},function(e){return e&&"object"==typeof e?Z((function(t){return function(e,t){var n={},i=function(i){var r=e[i];"function"==typeof r&&(n[i]=function(){return t(r.apply(void 0,arguments))})};for(var r in e)i(r);return n}(e,t)})):void 0}];var P=[function(e){return"function"==typeof e?D(e):void 0},function(e){return e?void 0:Z((function(){return{}}))}];function M(e,t,n){return(0,o.Z)({},n,e,t)}var L=[function(e){return"function"==typeof e?function(e){return function(t,n){n.displayName;var i,r=n.pure,o=n.areMergedPropsEqual,a=!1;return function(t,n,l){var s=e(t,n,l);return a?r&&o(s,i)||(i=s):(a=!0,i=s),i}}}(e):void 0},function(e){return e?void 0:function(){return M}}],B=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function R(e,t,n,i){return function(r,o){return n(e(r,o),t(i,o),o)}}function O(e,t,n,i,r){var o,a,l,s,c,u=r.areStatesEqual,d=r.areOwnPropsEqual,h=r.areStatePropsEqual,p=!1;function f(r,p){var f,m,v=!d(p,a),g=!u(r,o,p,a);return o=r,a=p,v&&g?(l=e(o,a),t.dependsOnOwnProps&&(s=t(i,a)),c=n(l,s,a)):v?(e.dependsOnOwnProps&&(l=e(o,a)),t.dependsOnOwnProps&&(s=t(i,a)),c=n(l,s,a)):g?(f=e(o,a),m=!h(f,l),l=f,m&&(c=n(l,s,a)),c):c}return function(r,u){return p?f(r,u):(l=e(o=r,a=u),s=t(i,a),c=n(l,s,a),p=!0,c)}}function F(e,t){var n=t.initMapStateToProps,i=t.initMapDispatchToProps,r=t.initMergeProps,o=(0,f.Z)(t,B),a=n(e,o),l=i(e,o),s=r(e,o);return(o.pure?O:R)(a,l,s,e,o)}var W=["pure","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","areMergedPropsEqual"];function H(e,t,n){for(var i=t.length-1;i>=0;i--){var r=t[i](e);if(r)return r}return function(t,i){throw new Error("Invalid value of type "+typeof e+" for "+n+" argument when connecting component "+i.wrappedComponentName+".")}}function z(e,t){return e===t}function G(e){var t=void 0===e?{}:e,n=t.connectHOC,i=void 0===n?N:n,r=t.mapStateToPropsFactories,a=void 0===r?P:r,l=t.mapDispatchToPropsFactories,s=void 0===l?T:l,c=t.mergePropsFactories,u=void 0===c?L:c,d=t.selectorFactory,h=void 0===d?F:d;return function(e,t,n,r){void 0===r&&(r={});var l=r,c=l.pure,d=void 0===c||c,p=l.areStatesEqual,m=void 0===p?z:p,v=l.areOwnPropsEqual,g=void 0===v?A:v,y=l.areStatePropsEqual,x=void 0===y?A:y,b=l.areMergedPropsEqual,w=void 0===b?A:b,C=(0,f.Z)(l,W),k=H(e,a,"mapStateToProps"),S=H(t,s,"mapDispatchToProps"),_=H(n,u,"mergeProps");return i(h,(0,o.Z)({methodName:"connect",getDisplayName:function(e){return"Connect("+e+")"},shouldHandleStateChanges:Boolean(e),initMapStateToProps:k,initMapDispatchToProps:S,initMergeProps:_,pure:d,areStatesEqual:m,areOwnPropsEqual:g,areStatePropsEqual:x,areMergedPropsEqual:w},C))}}var V=G();var K,U=n(4676);function q(e,t){var n=(0,i.useState)((function(){return{inputs:t,result:e()}}))[0],r=(0,i.useRef)(!0),o=(0,i.useRef)(n),a=r.current||Boolean(t&&o.current.inputs&&function(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,o.current.inputs))?o.current:{inputs:t,result:e()};return(0,i.useEffect)((function(){r.current=!1,o.current=a}),[a]),a.result}K=U.unstable_batchedUpdates,s=K;var Y=q,X=function(e,t){return q((function(){return e}),t)},J="Invariant failed";var Q=function(e){var t=e.top,n=e.right,i=e.bottom,r=e.left;return{top:t,right:n,bottom:i,left:r,width:n-r,height:i-t,x:r,y:t,center:{x:(n+r)/2,y:(i+t)/2}}},$=function(e,t){return{top:e.top-t.top,left:e.left-t.left,bottom:e.bottom+t.bottom,right:e.right+t.right}},ee=function(e,t){return{top:e.top+t.top,left:e.left+t.left,bottom:e.bottom-t.bottom,right:e.right-t.right}},te={top:0,right:0,bottom:0,left:0},ne=function(e){var t=e.borderBox,n=e.margin,i=void 0===n?te:n,r=e.border,o=void 0===r?te:r,a=e.padding,l=void 0===a?te:a,s=Q($(t,i)),c=Q(ee(t,o)),u=Q(ee(c,l));return{marginBox:s,borderBox:Q(t),paddingBox:c,contentBox:u,margin:i,border:o,padding:l}},ie=function(e){var t=e.slice(0,-2);if("px"!==e.slice(-2))return 0;var n=Number(t);return isNaN(n)&&function(e,t){if(!e)throw new Error(J)}(!1),n},re=function(e,t){var n,i,r=e.borderBox,o=e.border,a=e.margin,l=e.padding,s=(i=t,{top:(n=r).top+i.y,left:n.left+i.x,bottom:n.bottom+i.y,right:n.right+i.x});return ne({borderBox:s,border:o,margin:a,padding:l})},oe=function(e,t){return void 0===t&&(t={x:window.pageXOffset,y:window.pageYOffset}),re(e,t)},ae=function(e,t){var n={top:ie(t.marginTop),right:ie(t.marginRight),bottom:ie(t.marginBottom),left:ie(t.marginLeft)},i={top:ie(t.paddingTop),right:ie(t.paddingRight),bottom:ie(t.paddingBottom),left:ie(t.paddingLeft)},r={top:ie(t.borderTopWidth),right:ie(t.borderRightWidth),bottom:ie(t.borderBottomWidth),left:ie(t.borderLeftWidth)};return ne({borderBox:e,margin:n,padding:i,border:r})},le=function(e){var t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return ae(t,n)},se=Number.isNaN||function(e){return"number"==typeof e&&e!=e};function ce(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(i=e[n],r=t[n],!(i===r||se(i)&&se(r)))return!1;var i,r;return!0}var ue=function(e,t){var n;void 0===t&&(t=ce);var i,r=[],o=!1;return function(){for(var a=[],l=0;l<arguments.length;l++)a[l]=arguments[l];return o&&n===this&&t(a,r)||(i=e.apply(this,a),o=!0,n=this,r=a),i}},de=function(e){var t=[],n=null,i=function(){for(var i=arguments.length,r=new Array(i),o=0;o<i;o++)r[o]=arguments[o];t=r,n||(n=requestAnimationFrame((function(){n=null,e.apply(void 0,t)})))};return i.cancel=function(){n&&(cancelAnimationFrame(n),n=null)},i};function he(e,t){}he.bind(null,"warn"),he.bind(null,"error");function pe(){}function fe(e,t,n){var i=t.map((function(t){var i=function(e,t){return(0,o.Z)({},e,{},t)}(n,t.options);return e.addEventListener(t.eventName,t.fn,i),function(){e.removeEventListener(t.eventName,t.fn,i)}}));return function(){i.forEach((function(e){e()}))}}var me="Invariant failed";function ve(e){this.message=e}function ge(e,t){if(!e)throw new ve(me)}ve.prototype.toString=function(){return this.message};var ye=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(t=e.call.apply(e,[this].concat(i))||this).callbacks=null,t.unbind=pe,t.onWindowError=function(e){var n=t.getCallbacks();n.isDragging()&&n.tryAbort(),e.error instanceof ve&&e.preventDefault()},t.getCallbacks=function(){if(!t.callbacks)throw new Error("Unable to find AppCallbacks in <ErrorBoundary/>");return t.callbacks},t.setCallbacks=function(e){t.callbacks=e},t}(0,r.Z)(t,e);var n=t.prototype;return n.componentDidMount=function(){this.unbind=fe(window,[{eventName:"error",fn:this.onWindowError}])},n.componentWillUnmount=function(){this.unbind()},n.componentDidCatch=function(e){if(!(e instanceof ve))throw e;this.setState({})},n.render=function(){return this.props.children(this.setCallbacks)},t}(i.Component),xe=function(e){return e+1},be=function(e,t){var n=e.droppableId===t.droppableId,i=xe(e.index),r=xe(t.index);return n?"\n You have moved the item from position "+i+"\n to position "+r+"\n ":"\n You have moved the item from position "+i+"\n in list "+e.droppableId+"\n to list "+t.droppableId+"\n in position "+r+"\n "},we=function(e,t,n){return t.droppableId===n.droppableId?"\n The item "+e+"\n has been combined with "+n.draggableId:"\n The item "+e+"\n in list "+t.droppableId+"\n has been combined with "+n.draggableId+"\n in list "+n.droppableId+"\n "},Ce=function(e){return"\n The item has returned to its starting position\n of "+xe(e.index)+"\n"},ke="\n Press space bar to start a drag.\n When dragging you can use the arrow keys to move the item around and escape to cancel.\n Some screen readers may require you to be in focus mode or to use your pass through key\n",Se=function(e){return"\n You have lifted an item in position "+xe(e.source.index)+"\n"},_e=function(e){var t=e.destination;if(t)return be(e.source,t);var n=e.combine;return n?we(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},je=function(e){if("CANCEL"===e.reason)return"\n Movement cancelled.\n "+Ce(e.source)+"\n ";var t=e.destination,n=e.combine;return t?"\n You have dropped the item.\n "+be(e.source,t)+"\n ":n?"\n You have dropped the item.\n "+we(e.draggableId,e.source,n)+"\n ":"\n The item has been dropped while not over a drop area.\n "+Ce(e.source)+"\n "},Ne={x:0,y:0},Ee=function(e,t){return{x:e.x+t.x,y:e.y+t.y}},Ae=function(e,t){return{x:e.x-t.x,y:e.y-t.y}},Ze=function(e,t){return e.x===t.x&&e.y===t.y},Ie=function(e){return{x:0!==e.x?-e.x:0,y:0!==e.y?-e.y:0}},De=function(e,t,n){var i;return void 0===n&&(n=0),(i={})[e]=t,i["x"===e?"y":"x"]=n,i},Te=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},Pe=function(e,t){return Math.min.apply(Math,t.map((function(t){return Te(e,t)})))},Me=function(e){return function(t){return{x:e(t.x),y:e(t.y)}}},Le=function(e,t){return{top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}},Be=function(e){return[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}]},Re=function(e,t){return t&&t.shouldClipSubject?function(e,t){var n=Q({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n}(t.pageMarginBox,e):Q(e)},Oe=function(e){var t=e.page,n=e.withPlaceholder,i=e.axis,r=e.frame,a=function(e,t){return t?Le(e,t.scroll.diff.displacement):e}(t.marginBox,r),l=function(e,t,n){var i;return n&&n.increasedBy?(0,o.Z)({},e,((i={})[t.end]=e[t.end]+n.increasedBy[t.line],i)):e}(a,i,n);return{page:t,withPlaceholder:n,active:Re(l,r)}},Fe=function(e,t){e.frame||ge(!1);var n=e.frame,i=Ae(t,n.scroll.initial),r=Ie(i),a=(0,o.Z)({},n,{scroll:{initial:n.scroll.initial,current:t,diff:{value:i,displacement:r},max:n.scroll.max}}),l=Oe({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:a});return(0,o.Z)({},e,{frame:a,subject:l})};function We(e){return Object.values?Object.values(e):Object.keys(e).map((function(t){return e[t]}))}function He(e,t){if(e.findIndex)return e.findIndex(t);for(var n=0;n<e.length;n++)if(t(e[n]))return n;return-1}function ze(e,t){if(e.find)return e.find(t);var n=He(e,t);return-1!==n?e[n]:void 0}function Ge(e){return Array.prototype.slice.call(e)}var Ve=ue((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),Ke=ue((function(e){return e.reduce((function(e,t){return e[t.descriptor.id]=t,e}),{})})),Ue=ue((function(e){return We(e)})),qe=ue((function(e){return We(e)})),Ye=ue((function(e,t){var n=qe(t).filter((function(t){return e===t.descriptor.droppableId})).sort((function(e,t){return e.descriptor.index-t.descriptor.index}));return n}));function Xe(e){return e.at&&"REORDER"===e.at.type?e.at.destination:null}function Je(e){return e.at&&"COMBINE"===e.at.type?e.at.combine:null}var Qe=ue((function(e,t){return t.filter((function(t){return t.descriptor.id!==e.descriptor.id}))})),$e=function(e,t){return e.descriptor.droppableId===t.descriptor.id},et={point:Ne,value:0},tt={invisible:{},visible:{},all:[]},nt={displaced:tt,displacedBy:et,at:null},it=function(e,t){return function(n){return e<=n&&n<=t}},rt=function(e){var t=it(e.top,e.bottom),n=it(e.left,e.right);return function(i){if(t(i.top)&&t(i.bottom)&&n(i.left)&&n(i.right))return!0;var r=t(i.top)||t(i.bottom),o=n(i.left)||n(i.right);if(r&&o)return!0;var a=i.top<e.top&&i.bottom>e.bottom,l=i.left<e.left&&i.right>e.right;return!(!a||!l)||(a&&o||l&&r)}},ot=function(e){var t=it(e.top,e.bottom),n=it(e.left,e.right);return function(e){return t(e.top)&&t(e.bottom)&&n(e.left)&&n(e.right)}},at={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},lt={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"},st=function(e){var t=e.target,n=e.destination,i=e.viewport,r=e.withDroppableDisplacement,o=e.isVisibleThroughFrameFn,a=r?function(e,t){var n=t.frame?t.frame.scroll.diff.displacement:Ne;return Le(e,n)}(t,n):t;return function(e,t,n){return!!t.subject.active&&n(t.subject.active)(e)}(a,n,o)&&function(e,t,n){return n(t)(e)}(a,i,o)},ct=function(e){return st((0,o.Z)({},e,{isVisibleThroughFrameFn:rt}))},ut=function(e){return st((0,o.Z)({},e,{isVisibleThroughFrameFn:ot}))};function dt(e){var t=e.afterDragging,n=e.destination,i=e.displacedBy,r=e.viewport,o=e.forceShouldAnimate,a=e.last;return t.reduce((function(e,t){var l=function(e,t){var n=e.page.marginBox,i={top:t.point.y,right:0,bottom:0,left:t.point.x};return Q($(n,i))}(t,i),s=t.descriptor.id;if(e.all.push(s),!ct({target:l,destination:n,viewport:r,withDroppableDisplacement:!0}))return e.invisible[t.descriptor.id]=!0,e;var c=function(e,t,n){if("boolean"==typeof n)return n;if(!t)return!0;var i=t.invisible,r=t.visible;if(i[e])return!1;var o=r[e];return!o||o.shouldAnimate}(s,a,o),u={draggableId:s,shouldAnimate:c};return e.visible[s]=u,e}),{all:[],visible:{},invisible:{}})}function ht(e){var t=e.insideDestination,n=e.inHomeList,i=e.displacedBy,r=e.destination,o=function(e,t){if(!e.length)return 0;var n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}(t,{inHomeList:n});return{displaced:tt,displacedBy:i,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:o}}}}function pt(e){var t=e.draggable,n=e.insideDestination,i=e.destination,r=e.viewport,o=e.displacedBy,a=e.last,l=e.index,s=e.forceShouldAnimate,c=$e(t,i);if(null==l)return ht({insideDestination:n,inHomeList:c,displacedBy:o,destination:i});var u=ze(n,(function(e){return e.descriptor.index===l}));if(!u)return ht({insideDestination:n,inHomeList:c,displacedBy:o,destination:i});var d=Qe(t,n),h=n.indexOf(u);return{displaced:dt({afterDragging:d.slice(h),destination:i,displacedBy:o,last:a,viewport:r.frame,forceShouldAnimate:s}),displacedBy:o,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:l}}}}function ft(e,t){return Boolean(t.effected[e])}var mt=function(e){var t=e.isMovingForward,n=e.isInHomeList,i=e.draggable,r=e.draggables,o=e.destination,a=e.insideDestination,l=e.previousImpact,s=e.viewport,c=e.afterCritical,u=l.at;if(u||ge(!1),"REORDER"===u.type){var d=function(e){var t=e.isMovingForward,n=e.isInHomeList,i=e.insideDestination,r=e.location;if(!i.length)return null;var o=r.index,a=t?o+1:o-1,l=i[0].descriptor.index,s=i[i.length-1].descriptor.index;return a<l||a>(n?s:s+1)?null:a}({isMovingForward:t,isInHomeList:n,location:u.destination,insideDestination:a});return null==d?null:pt({draggable:i,insideDestination:a,destination:o,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:d})}var h=function(e){var t=e.isMovingForward,n=e.destination,i=e.draggables,r=e.combine,o=e.afterCritical;if(!n.isCombineEnabled)return null;var a=r.draggableId,l=i[a].descriptor.index;return ft(a,o)?t?l:l-1:t?l+1:l}({isMovingForward:t,destination:o,displaced:l.displaced,draggables:r,combine:u.combine,afterCritical:c});return null==h?null:pt({draggable:i,insideDestination:a,destination:o,viewport:s,last:l.displaced,displacedBy:l.displacedBy,index:h})},vt=function(e){var t=e.afterCritical,n=e.impact,i=e.draggables,r=Je(n);r||ge(!1);var o=r.draggableId,a=i[o].page.borderBox.center,l=function(e){var t=e.displaced,n=e.afterCritical,i=e.combineWith,r=e.displacedBy,o=Boolean(t.visible[i]||t.invisible[i]);return ft(i,n)?o?Ne:Ie(r.point):o?r.point:Ne}({displaced:n.displaced,afterCritical:t,combineWith:o,displacedBy:n.displacedBy});return Ee(a,l)},gt=function(e,t){return t.margin[e.start]+t.borderBox[e.size]/2},yt=function(e,t,n){return t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2},xt=function(e){var t=e.axis,n=e.moveRelativeTo,i=e.isMoving;return De(t.line,n.marginBox[t.end]+gt(t,i),yt(t,n.marginBox,i))},bt=function(e){var t=e.axis,n=e.moveRelativeTo,i=e.isMoving;return De(t.line,n.marginBox[t.start]-function(e,t){return t.margin[e.end]+t.borderBox[e.size]/2}(t,i),yt(t,n.marginBox,i))},wt=function(e){var t=e.impact,n=e.draggable,i=e.draggables,r=e.droppable,o=e.afterCritical,a=Ye(r.descriptor.id,i),l=n.page,s=r.axis;if(!a.length)return function(e){var t=e.axis,n=e.moveInto,i=e.isMoving;return De(t.line,n.contentBox[t.start]+gt(t,i),yt(t,n.contentBox,i))}({axis:s,moveInto:r.page,isMoving:l});var c=t.displaced,u=t.displacedBy,d=c.all[0];if(d){var h=i[d];if(ft(d,o))return bt({axis:s,moveRelativeTo:h.page,isMoving:l});var p=re(h.page,u.point);return bt({axis:s,moveRelativeTo:p,isMoving:l})}var f=a[a.length-1];if(f.descriptor.id===n.descriptor.id)return l.borderBox.center;if(ft(f.descriptor.id,o)){var m=re(f.page,Ie(o.displacedBy.point));return xt({axis:s,moveRelativeTo:m,isMoving:l})}return xt({axis:s,moveRelativeTo:f.page,isMoving:l})},Ct=function(e,t){var n=e.frame;return n?Ee(t,n.scroll.diff.displacement):t},kt=function(e){var t=function(e){var t=e.impact,n=e.draggable,i=e.droppable,r=e.draggables,o=e.afterCritical,a=n.page.borderBox.center,l=t.at;return i&&l?"REORDER"===l.type?wt({impact:t,draggable:n,draggables:r,droppable:i,afterCritical:o}):vt({impact:t,draggables:r,afterCritical:o}):a}(e),n=e.droppable;return n?Ct(n,t):t},St=function(e,t){var n=Ae(t,e.scroll.initial),i=Ie(n);return{frame:Q({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:i}}}};function _t(e,t){return e.map((function(e){return t[e]}))}var jt=function(e){var t=e.pageBorderBoxCenter,n=e.draggable,i=function(e,t){return Ee(e.scroll.diff.displacement,t)}(e.viewport,t),r=Ae(i,n.page.borderBox.center);return Ee(n.client.borderBox.center,r)},Nt=function(e){var t=e.draggable,n=e.destination,i=e.newPageBorderBoxCenter,r=e.viewport,a=e.withDroppableDisplacement,l=e.onlyOnMainAxis,s=void 0!==l&&l,c=Ae(i,t.page.borderBox.center),u={target:Le(t.page.borderBox,c),destination:n,withDroppableDisplacement:a,viewport:r};return s?function(e){return st((0,o.Z)({},e,{isVisibleThroughFrameFn:(t=e.destination.axis,function(e){var n=it(e.top,e.bottom),i=it(e.left,e.right);return function(e){return t===at?n(e.top)&&n(e.bottom):i(e.left)&&i(e.right)}})}));var t}(u):ut(u)},Et=function(e){var t=e.isMovingForward,n=e.draggable,i=e.destination,r=e.draggables,a=e.previousImpact,l=e.viewport,s=e.previousPageBorderBoxCenter,c=e.previousClientSelection,u=e.afterCritical;if(!i.isEnabled)return null;var d=Ye(i.descriptor.id,r),h=$e(n,i),p=function(e){var t=e.isMovingForward,n=e.draggable,i=e.destination,r=e.insideDestination,a=e.previousImpact;if(!i.isCombineEnabled)return null;if(!Xe(a))return null;function l(e){var t={type:"COMBINE",combine:{draggableId:e,droppableId:i.descriptor.id}};return(0,o.Z)({},a,{at:t})}var s=a.displaced.all,c=s.length?s[0]:null;if(t)return c?l(c):null;var u=Qe(n,r);if(!c)return u.length?l(u[u.length-1].descriptor.id):null;var d=He(u,(function(e){return e.descriptor.id===c}));-1===d&&ge(!1);var h=d-1;return h<0?null:l(u[h].descriptor.id)}({isMovingForward:t,draggable:n,destination:i,insideDestination:d,previousImpact:a})||mt({isMovingForward:t,isInHomeList:h,draggable:n,draggables:r,destination:i,insideDestination:d,previousImpact:a,viewport:l,afterCritical:u});if(!p)return null;var f=kt({impact:p,draggable:n,droppable:i,draggables:r,afterCritical:u});if(Nt({draggable:n,destination:i,newPageBorderBoxCenter:f,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:jt({pageBorderBoxCenter:f,draggable:n,viewport:l}),impact:p,scrollJumpRequest:null};var m=Ae(f,s),v=function(e){var t=e.impact,n=e.viewport,i=e.destination,r=e.draggables,a=e.maxScrollChange,l=St(n,Ee(n.scroll.current,a)),s=i.frame?Fe(i,Ee(i.frame.scroll.current,a)):i,c=t.displaced,u=dt({afterDragging:_t(c.all,r),destination:i,displacedBy:t.displacedBy,viewport:l.frame,last:c,forceShouldAnimate:!1}),d=dt({afterDragging:_t(c.all,r),destination:s,displacedBy:t.displacedBy,viewport:n.frame,last:c,forceShouldAnimate:!1}),h={},p={},f=[c,u,d];return c.all.forEach((function(e){var t=function(e,t){for(var n=0;n<t.length;n++){var i=t[n].visible[e];if(i)return i}return null}(e,f);t?p[e]=t:h[e]=!0})),(0,o.Z)({},t,{displaced:{all:c.all,invisible:h,visible:p}})}({impact:p,viewport:l,destination:i,draggables:r,maxScrollChange:m});return{clientSelection:c,impact:v,scrollJumpRequest:m}},At=function(e){var t=e.subject.active;return t||ge(!1),t},Zt=function(e,t){var n=e.page.borderBox.center;return ft(e.descriptor.id,t)?Ae(n,t.displacedBy.point):n},It=function(e,t){var n=e.page.borderBox;return ft(e.descriptor.id,t)?Le(n,Ie(t.displacedBy.point)):n},Dt=ue((function(e,t){var n=t[e.line];return{value:n,point:De(e.line,n)}})),Tt=function(e,t){return(0,o.Z)({},e,{scroll:(0,o.Z)({},e.scroll,{max:t})})},Pt=function(e,t,n){var i=e.frame;$e(t,e)&&ge(!1),e.subject.withPlaceholder&&ge(!1);var r=Dt(e.axis,t.displaceBy).point,a=function(e,t,n){var i=e.axis;if("virtual"===e.descriptor.mode)return De(i.line,t[i.line]);var r=e.subject.page.contentBox[i.size],o=Ye(e.descriptor.id,n).reduce((function(e,t){return e+t.client.marginBox[i.size]}),0)+t[i.line]-r;return o<=0?null:De(i.line,o)}(e,r,n),l={placeholderSize:r,increasedBy:a,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!i){var s=Oe({page:e.subject.page,withPlaceholder:l,axis:e.axis,frame:e.frame});return(0,o.Z)({},e,{subject:s})}var c=a?Ee(i.scroll.max,a):i.scroll.max,u=Tt(i,c),d=Oe({page:e.subject.page,withPlaceholder:l,axis:e.axis,frame:u});return(0,o.Z)({},e,{subject:d,frame:u})},Mt=function(e){var t=e.isMovingForward,n=e.previousPageBorderBoxCenter,i=e.draggable,r=e.isOver,o=e.draggables,a=e.droppables,l=e.viewport,s=e.afterCritical,c=function(e){var t=e.isMovingForward,n=e.pageBorderBoxCenter,i=e.source,r=e.droppables,o=e.viewport,a=i.subject.active;if(!a)return null;var l=i.axis,s=it(a[l.start],a[l.end]),c=Ue(r).filter((function(e){return e!==i})).filter((function(e){return e.isEnabled})).filter((function(e){return Boolean(e.subject.active)})).filter((function(e){return rt(o.frame)(At(e))})).filter((function(e){var n=At(e);return t?a[l.crossAxisEnd]<n[l.crossAxisEnd]:n[l.crossAxisStart]<a[l.crossAxisStart]})).filter((function(e){var t=At(e),n=it(t[l.start],t[l.end]);return s(t[l.start])||s(t[l.end])||n(a[l.start])||n(a[l.end])})).sort((function(e,n){var i=At(e)[l.crossAxisStart],r=At(n)[l.crossAxisStart];return t?i-r:r-i})).filter((function(e,t,n){return At(e)[l.crossAxisStart]===At(n[0])[l.crossAxisStart]}));if(!c.length)return null;if(1===c.length)return c[0];var u=c.filter((function(e){return it(At(e)[l.start],At(e)[l.end])(n[l.line])}));return 1===u.length?u[0]:u.length>1?u.sort((function(e,t){return At(e)[l.start]-At(t)[l.start]}))[0]:c.sort((function(e,t){var i=Pe(n,Be(At(e))),r=Pe(n,Be(At(t)));return i!==r?i-r:At(e)[l.start]-At(t)[l.start]}))[0]}({isMovingForward:t,pageBorderBoxCenter:n,source:r,droppables:a,viewport:l});if(!c)return null;var u=Ye(c.descriptor.id,o),d=function(e){var t=e.pageBorderBoxCenter,n=e.viewport,i=e.destination,r=e.insideDestination,o=e.afterCritical,a=r.filter((function(e){return ut({target:It(e,o),destination:i,viewport:n.frame,withDroppableDisplacement:!0})})).sort((function(e,n){var r=Te(t,Ct(i,Zt(e,o))),a=Te(t,Ct(i,Zt(n,o)));return r<a?-1:a<r?1:e.descriptor.index-n.descriptor.index}));return a[0]||null}({pageBorderBoxCenter:n,viewport:l,destination:c,insideDestination:u,afterCritical:s}),h=function(e){var t=e.previousPageBorderBoxCenter,n=e.moveRelativeTo,i=e.insideDestination,r=e.draggable,o=e.draggables,a=e.destination,l=e.viewport,s=e.afterCritical;if(!n){if(i.length)return null;var c={displaced:tt,displacedBy:et,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},u=kt({impact:c,draggable:r,droppable:a,draggables:o,afterCritical:s}),d=$e(r,a)?a:Pt(a,r,o);return Nt({draggable:r,destination:d,newPageBorderBoxCenter:u,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?c:null}var h,p=Boolean(t[a.axis.line]<=n.page.borderBox.center[a.axis.line]),f=(h=n.descriptor.index,n.descriptor.id===r.descriptor.id||p?h:h+1),m=Dt(a.axis,r.displaceBy);return pt({draggable:r,insideDestination:i,destination:a,viewport:l,displacedBy:m,last:tt,index:f})}({previousPageBorderBoxCenter:n,destination:c,draggable:i,draggables:o,moveRelativeTo:d,insideDestination:u,viewport:l,afterCritical:s});if(!h)return null;var p=kt({impact:h,draggable:i,droppable:c,draggables:o,afterCritical:s});return{clientSelection:jt({pageBorderBoxCenter:p,draggable:i,viewport:l}),impact:h,scrollJumpRequest:null}},Lt=function(e){var t=e.at;return t?"REORDER"===t.type?t.destination.droppableId:t.combine.droppableId:null},Bt=function(e){var t=e.state,n=e.type,i=function(e,t){var n=Lt(e);return n?t[n]:null}(t.impact,t.dimensions.droppables),r=Boolean(i),o=t.dimensions.droppables[t.critical.droppable.id],a=i||o,l=a.axis.direction,s="vertical"===l&&("MOVE_UP"===n||"MOVE_DOWN"===n)||"horizontal"===l&&("MOVE_LEFT"===n||"MOVE_RIGHT"===n);if(s&&!r)return null;var c="MOVE_DOWN"===n||"MOVE_RIGHT"===n,u=t.dimensions.draggables[t.critical.draggable.id],d=t.current.page.borderBoxCenter,h=t.dimensions,p=h.draggables,f=h.droppables;return s?Et({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,destination:a,draggables:p,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):Mt({isMovingForward:c,previousPageBorderBoxCenter:d,draggable:u,isOver:a,draggables:p,droppables:f,viewport:t.viewport,afterCritical:t.afterCritical})};function Rt(e){return"DRAGGING"===e.phase||"COLLECTING"===e.phase}function Ot(e){var t=it(e.top,e.bottom),n=it(e.left,e.right);return function(e){return t(e.y)&&n(e.x)}}function Ft(e){var t=e.pageBorderBox,n=e.draggable,i=e.droppables,r=Ue(i).filter((function(e){if(!e.isEnabled)return!1;var n,i,r=e.subject.active;if(!r)return!1;if(i=r,!((n=t).left<i.right&&n.right>i.left&&n.top<i.bottom&&n.bottom>i.top))return!1;if(Ot(r)(t.center))return!0;var o=e.axis,a=r.center[o.crossAxisLine],l=t[o.crossAxisStart],s=t[o.crossAxisEnd],c=it(r[o.crossAxisStart],r[o.crossAxisEnd]),u=c(l),d=c(s);return!u&&!d||(u?l<a:s>a)}));return r.length?1===r.length?r[0].descriptor.id:function(e){var t=e.pageBorderBox,n=e.draggable,i=e.candidates,r=n.page.borderBox.center,o=i.map((function(e){var n=e.axis,i=De(e.axis.line,t.center[n.line],e.page.borderBox.center[n.crossAxisLine]);return{id:e.descriptor.id,distance:Te(r,i)}})).sort((function(e,t){return t.distance-e.distance}));return o[0]?o[0].id:null}({pageBorderBox:t,draggable:n,candidates:r}):null}var Wt=function(e,t){return Q(Le(e,t))};function Ht(e){var t=e.displaced,n=e.id;return Boolean(t.visible[n]||t.invisible[n])}var zt=function(e){var t=e.pageOffset,n=e.draggable,i=e.draggables,r=e.droppables,o=e.previousImpact,a=e.viewport,l=e.afterCritical,s=Wt(n.page.borderBox,t),c=Ft({pageBorderBox:s,draggable:n,droppables:r});if(!c)return nt;var u=r[c],d=Ye(u.descriptor.id,i),h=function(e,t){var n=e.frame;return n?Wt(t,n.scroll.diff.value):t}(u,s);return function(e){var t=e.draggable,n=e.pageBorderBoxWithDroppableScroll,i=e.previousImpact,r=e.destination,o=e.insideDestination,a=e.afterCritical;if(!r.isCombineEnabled)return null;var l=r.axis,s=Dt(r.axis,t.displaceBy),c=s.value,u=n[l.start],d=n[l.end],h=ze(Qe(t,o),(function(e){var t=e.descriptor.id,n=e.page.borderBox,r=n[l.size]/4,o=ft(t,a),s=Ht({displaced:i.displaced,id:t});return o?s?d>n[l.start]+r&&d<n[l.end]-r:u>n[l.start]-c+r&&u<n[l.end]-c-r:s?d>n[l.start]+c+r&&d<n[l.end]+c-r:u>n[l.start]+r&&u<n[l.end]-r}));return h?{displacedBy:s,displaced:i.displaced,at:{type:"COMBINE",combine:{draggableId:h.descriptor.id,droppableId:r.descriptor.id}}}:null}({pageBorderBoxWithDroppableScroll:h,draggable:n,previousImpact:o,destination:u,insideDestination:d,afterCritical:l})||function(e){var t=e.pageBorderBoxWithDroppableScroll,n=e.draggable,i=e.destination,r=e.insideDestination,o=e.last,a=e.viewport,l=e.afterCritical,s=i.axis,c=Dt(i.axis,n.displaceBy),u=c.value,d=t[s.start],h=t[s.end],p=function(e){var t=e.draggable,n=e.closest,i=e.inHomeList;return n?i&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}({draggable:n,closest:ze(Qe(n,r),(function(e){var t=e.descriptor.id,n=e.page.borderBox.center[s.line],i=ft(t,l),r=Ht({displaced:o,id:t});return i?r?h<=n:d<n-u:r?h<=n+u:d<n})),inHomeList:$e(n,i)});return pt({draggable:n,insideDestination:r,destination:i,viewport:a,last:o,displacedBy:c,index:p})}({pageBorderBoxWithDroppableScroll:h,draggable:n,destination:u,insideDestination:d,last:o.displaced,viewport:a,afterCritical:l})},Gt=function(e,t){var n;return(0,o.Z)({},e,((n={})[t.descriptor.id]=t,n))},Vt=function(e){var t=e.previousImpact,n=e.impact,i=e.droppables,r=Lt(t),a=Lt(n);if(!r)return i;if(r===a)return i;var l=i[r];if(!l.subject.withPlaceholder)return i;var s=function(e){var t=e.subject.withPlaceholder;t||ge(!1);var n=e.frame;if(!n){var i=Oe({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return(0,o.Z)({},e,{subject:i})}var r=t.oldFrameMaxScroll;r||ge(!1);var a=Tt(n,r),l=Oe({page:e.subject.page,axis:e.axis,frame:a,withPlaceholder:null});return(0,o.Z)({},e,{subject:l,frame:a})}(l);return Gt(i,s)},Kt=function(e){var t=e.state,n=e.clientSelection,i=e.dimensions,r=e.viewport,a=e.impact,l=e.scrollJumpRequest,s=r||t.viewport,c=i||t.dimensions,u=n||t.current.client.selection,d=Ae(u,t.initial.client.selection),h={offset:d,selection:u,borderBoxCenter:Ee(t.initial.client.borderBoxCenter,d)},p={selection:Ee(h.selection,s.scroll.current),borderBoxCenter:Ee(h.borderBoxCenter,s.scroll.current),offset:Ee(h.offset,s.scroll.diff.value)},f={client:h,page:p};if("COLLECTING"===t.phase)return(0,o.Z)({phase:"COLLECTING"},t,{dimensions:c,viewport:s,current:f});var m=c.draggables[t.critical.draggable.id],v=a||zt({pageOffset:p.offset,draggable:m,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:s,afterCritical:t.afterCritical}),g=function(e){var t=e.draggable,n=e.draggables,i=e.droppables,r=e.previousImpact,o=e.impact,a=Vt({previousImpact:r,impact:o,droppables:i}),l=Lt(o);if(!l)return a;var s=i[l];if($e(t,s))return a;if(s.subject.withPlaceholder)return a;var c=Pt(s,t,n);return Gt(a,c)}({draggable:m,impact:v,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables});return(0,o.Z)({},t,{current:f,dimensions:{draggables:c.draggables,droppables:g},impact:v,viewport:s,scrollJumpRequest:l||null,forceShouldAnimate:!l&&null})};var Ut=function(e){var t=e.impact,n=e.viewport,i=e.draggables,r=e.destination,a=e.forceShouldAnimate,l=t.displaced,s=function(e,t){return e.map((function(e){return t[e]}))}(l.all,i),c=dt({afterDragging:s,destination:r,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:a,last:l});return(0,o.Z)({},t,{displaced:c})},qt=function(e){var t=e.impact,n=e.draggable,i=e.droppable,r=e.draggables,o=e.viewport,a=e.afterCritical,l=kt({impact:t,draggable:n,draggables:r,droppable:i,afterCritical:a});return jt({pageBorderBoxCenter:l,draggable:n,viewport:o})},Yt=function(e){var t=e.state,n=e.dimensions,i=e.viewport;"SNAP"!==t.movementMode&&ge(!1);var r=t.impact,o=i||t.viewport,a=n||t.dimensions,l=a.draggables,s=a.droppables,c=l[t.critical.draggable.id],u=Lt(r);u||ge(!1);var d=s[u],h=Ut({impact:r,viewport:o,destination:d,draggables:l}),p=qt({impact:h,draggable:c,droppable:d,draggables:l,viewport:o,afterCritical:t.afterCritical});return Kt({impact:h,clientSelection:p,state:t,dimensions:a,viewport:o})},Xt=function(e){var t=e.draggable,n=e.home,i=e.draggables,r=e.viewport,o=Dt(n.axis,t.displaceBy),a=Ye(n.descriptor.id,i),l=a.indexOf(t);-1===l&&ge(!1);var s,c=a.slice(l+1),u=c.reduce((function(e,t){return e[t.descriptor.id]=!0,e}),{}),d={inVirtualList:"virtual"===n.descriptor.mode,displacedBy:o,effected:u};return{impact:{displaced:dt({afterDragging:c,destination:n,displacedBy:o,last:null,viewport:r.frame,forceShouldAnimate:!1}),displacedBy:o,at:{type:"REORDER",destination:(s=t.descriptor,{index:s.index,droppableId:s.droppableId})}},afterCritical:d}},Jt=function(e){0},Qt=function(e){0},$t=function(e){var t=e.additions,n=e.updatedDroppables,i=e.viewport,r=i.scroll.diff.value;return t.map((function(e){var t=e.descriptor.droppableId,a=function(e){var t=e.frame;return t||ge(!1),t}(n[t]),l=a.scroll.diff.value,s=function(e){var t=e.draggable,n=e.offset,i=e.initialWindowScroll,r=re(t.client,n),a=oe(r,i);return(0,o.Z)({},t,{placeholder:(0,o.Z)({},t.placeholder,{client:r}),client:r,page:a})}({draggable:e,offset:Ee(r,l),initialWindowScroll:i.scroll.initial});return s}))},en=function(e){return"SNAP"===e.movementMode},tn=function(e,t,n){var i=function(e,t){return{draggables:e.draggables,droppables:Gt(e.droppables,t)}}(e.dimensions,t);return!en(e)||n?Kt({state:e,dimensions:i}):Yt({state:e,dimensions:i})};function nn(e){return e.isDragging&&"SNAP"===e.movementMode?(0,o.Z)({phase:"DRAGGING"},e,{scrollJumpRequest:null}):e}var rn={phase:"IDLE",completed:null,shouldFlush:!1},on=function(e,t){if(void 0===e&&(e=rn),"FLUSH"===t.type)return(0,o.Z)({},rn,{shouldFlush:!0});if("INITIAL_PUBLISH"===t.type){"IDLE"!==e.phase&&ge(!1);var n=t.payload,i=n.critical,r=n.clientSelection,a=n.viewport,l=n.dimensions,s=n.movementMode,c=l.draggables[i.draggable.id],u=l.droppables[i.droppable.id],d={selection:r,borderBoxCenter:c.client.borderBox.center,offset:Ne},h={client:d,page:{selection:Ee(d.selection,a.scroll.initial),borderBoxCenter:Ee(d.selection,a.scroll.initial),offset:Ee(d.selection,a.scroll.diff.value)}},p=Ue(l.droppables).every((function(e){return!e.isFixedOnPage})),f=Xt({draggable:c,home:u,draggables:l.draggables,viewport:a}),m=f.impact;return{phase:"DRAGGING",isDragging:!0,critical:i,movementMode:s,dimensions:l,initial:h,current:h,isWindowScrollAllowed:p,impact:m,afterCritical:f.afterCritical,onLiftImpact:m,viewport:a,scrollJumpRequest:null,forceShouldAnimate:null}}if("COLLECTION_STARTING"===t.type)return"COLLECTING"===e.phase||"DROP_PENDING"===e.phase?e:("DRAGGING"!==e.phase&&ge(!1),(0,o.Z)({phase:"COLLECTING"},e,{phase:"COLLECTING"}));if("PUBLISH_WHILE_DRAGGING"===t.type)return"COLLECTING"!==e.phase&&"DROP_PENDING"!==e.phase&&ge(!1),function(e){var t=e.state,n=e.published;Jt();var i=n.modified.map((function(e){var n=t.dimensions.droppables[e.droppableId];return Fe(n,e.scroll)})),r=(0,o.Z)({},t.dimensions.droppables,{},Ve(i)),a=Ke($t({additions:n.additions,updatedDroppables:r,viewport:t.viewport})),l=(0,o.Z)({},t.dimensions.draggables,{},a);n.removals.forEach((function(e){delete l[e]}));var s={droppables:r,draggables:l},c=Lt(t.impact),u=c?s.droppables[c]:null,d=s.draggables[t.critical.draggable.id],h=s.droppables[t.critical.droppable.id],p=Xt({draggable:d,home:h,draggables:l,viewport:t.viewport}),f=p.impact,m=p.afterCritical,v=u&&u.isCombineEnabled?t.impact:f,g=zt({pageOffset:t.current.page.offset,draggable:s.draggables[t.critical.draggable.id],draggables:s.draggables,droppables:s.droppables,previousImpact:v,viewport:t.viewport,afterCritical:m});Qt();var y=(0,o.Z)({phase:"DRAGGING"},t,{phase:"DRAGGING",impact:g,onLiftImpact:f,dimensions:s,afterCritical:m,forceShouldAnimate:!1});return"COLLECTING"===t.phase?y:(0,o.Z)({phase:"DROP_PENDING"},y,{phase:"DROP_PENDING",reason:t.reason,isWaiting:!1})}({state:e,published:t.payload});if("MOVE"===t.type){if("DROP_PENDING"===e.phase)return e;Rt(e)||ge(!1);var v=t.payload.client;return Ze(v,e.current.client.selection)?e:Kt({state:e,clientSelection:v,impact:en(e)?e.impact:null})}if("UPDATE_DROPPABLE_SCROLL"===t.type){if("DROP_PENDING"===e.phase)return nn(e);if("COLLECTING"===e.phase)return nn(e);Rt(e)||ge(!1);var g=t.payload,y=g.id,x=g.newScroll,b=e.dimensions.droppables[y];if(!b)return e;var w=Fe(b,x);return tn(e,w,!1)}if("UPDATE_DROPPABLE_IS_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Rt(e)||ge(!1);var C=t.payload,k=C.id,S=C.isEnabled,_=e.dimensions.droppables[k];_||ge(!1),_.isEnabled===S&&ge(!1);var j=(0,o.Z)({},_,{isEnabled:S});return tn(e,j,!0)}if("UPDATE_DROPPABLE_IS_COMBINE_ENABLED"===t.type){if("DROP_PENDING"===e.phase)return e;Rt(e)||ge(!1);var N=t.payload,E=N.id,A=N.isCombineEnabled,Z=e.dimensions.droppables[E];Z||ge(!1),Z.isCombineEnabled===A&&ge(!1);var I=(0,o.Z)({},Z,{isCombineEnabled:A});return tn(e,I,!0)}if("MOVE_BY_WINDOW_SCROLL"===t.type){if("DROP_PENDING"===e.phase||"DROP_ANIMATING"===e.phase)return e;Rt(e)||ge(!1),e.isWindowScrollAllowed||ge(!1);var D=t.payload.newScroll;if(Ze(e.viewport.scroll.current,D))return nn(e);var T=St(e.viewport,D);return en(e)?Yt({state:e,viewport:T}):Kt({state:e,viewport:T})}if("UPDATE_VIEWPORT_MAX_SCROLL"===t.type){if(!Rt(e))return e;var P=t.payload.maxScroll;if(Ze(P,e.viewport.scroll.max))return e;var M=(0,o.Z)({},e.viewport,{scroll:(0,o.Z)({},e.viewport.scroll,{max:P})});return(0,o.Z)({phase:"DRAGGING"},e,{viewport:M})}if("MOVE_UP"===t.type||"MOVE_DOWN"===t.type||"MOVE_LEFT"===t.type||"MOVE_RIGHT"===t.type){if("COLLECTING"===e.phase||"DROP_PENDING"===e.phase)return e;"DRAGGING"!==e.phase&&ge(!1);var L=Bt({state:e,type:t.type});return L?Kt({state:e,impact:L.impact,clientSelection:L.clientSelection,scrollJumpRequest:L.scrollJumpRequest}):e}if("DROP_PENDING"===t.type){var B=t.payload.reason;return"COLLECTING"!==e.phase&&ge(!1),(0,o.Z)({phase:"DROP_PENDING"},e,{phase:"DROP_PENDING",isWaiting:!0,reason:B})}if("DROP_ANIMATE"===t.type){var R=t.payload,O=R.completed,F=R.dropDuration,W=R.newHomeClientOffset;return"DRAGGING"!==e.phase&&"DROP_PENDING"!==e.phase&&ge(!1),{phase:"DROP_ANIMATING",completed:O,dropDuration:F,newHomeClientOffset:W,dimensions:e.dimensions}}return"DROP_COMPLETE"===t.type?{phase:"IDLE",completed:t.payload.completed,shouldFlush:!1}:e},an=function(e){return{type:"PUBLISH_WHILE_DRAGGING",payload:e}},ln=function(){return{type:"COLLECTION_STARTING",payload:null}},sn=function(e){return{type:"UPDATE_DROPPABLE_SCROLL",payload:e}},cn=function(e){return{type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}},un=function(e){return{type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}},dn=function(e){return{type:"MOVE",payload:e}},hn=function(){return{type:"MOVE_UP",payload:null}},pn=function(){return{type:"MOVE_DOWN",payload:null}},fn=function(){return{type:"MOVE_RIGHT",payload:null}},mn=function(){return{type:"MOVE_LEFT",payload:null}},vn=function(e){return{type:"DROP_COMPLETE",payload:e}},gn=function(e){return{type:"DROP",payload:e}},yn=function(){return{type:"DROP_ANIMATION_FINISHED",payload:null}};var xn="cubic-bezier(.2,1,.1,1)",bn={drop:0,combining:.7},wn={drop:.75},Cn=.2+"s "+"cubic-bezier(0.2, 0, 0, 1)",kn={fluid:"opacity "+Cn,snap:"transform "+Cn+", opacity "+Cn,drop:function(e){var t=e+"s "+xn;return"transform "+t+", opacity "+t},outOfTheWay:"transform "+Cn,placeholder:"height "+Cn+", width "+Cn+", margin "+Cn},Sn=function(e){return Ze(e,Ne)?null:"translate("+e.x+"px, "+e.y+"px)"},_n=Sn,jn=function(e,t){var n=Sn(e);return n?t?n+" scale("+wn.drop+")":n:null},Nn=.33,En=.55,An=En-Nn,Zn=function(e){var t=e.getState,n=e.dispatch;return function(e){return function(i){if("DROP"===i.type){var r=t(),a=i.payload.reason;if("COLLECTING"!==r.phase){if("IDLE"!==r.phase){"DROP_PENDING"===r.phase&&r.isWaiting&&ge(!1),"DRAGGING"!==r.phase&&"DROP_PENDING"!==r.phase&&ge(!1);var l=r.critical,s=r.dimensions,c=s.draggables[r.critical.draggable.id],u=function(e){var t=e.draggables,n=e.reason,i=e.lastImpact,r=e.home,a=e.viewport,l=e.onLiftImpact;return i.at&&"DROP"===n?"REORDER"===i.at.type?{impact:i,didDropInsideDroppable:!0}:{impact:(0,o.Z)({},i,{displaced:tt}),didDropInsideDroppable:!0}:{impact:Ut({draggables:t,impact:l,destination:r,viewport:a,forceShouldAnimate:!0}),didDropInsideDroppable:!1}}({reason:a,lastImpact:r.impact,afterCritical:r.afterCritical,onLiftImpact:r.onLiftImpact,home:r.dimensions.droppables[r.critical.droppable.id],viewport:r.viewport,draggables:r.dimensions.draggables}),d=u.impact,h=u.didDropInsideDroppable,p=h?Xe(d):null,f=h?Je(d):null,m={index:l.draggable.index,droppableId:l.droppable.id},v={draggableId:c.descriptor.id,type:c.descriptor.type,source:m,reason:a,mode:r.movementMode,destination:p,combine:f},g=function(e){var t=e.impact,n=e.draggable,i=e.dimensions,r=e.viewport,o=e.afterCritical,a=i.draggables,l=i.droppables,s=Lt(t),c=s?l[s]:null,u=l[n.descriptor.droppableId],d=qt({impact:t,draggable:n,draggables:a,afterCritical:o,droppable:c||u,viewport:r});return Ae(d,n.client.borderBox.center)}({impact:d,draggable:c,dimensions:s,viewport:r.viewport,afterCritical:r.afterCritical}),y={critical:r.critical,afterCritical:r.afterCritical,result:v,impact:d};if(!Ze(r.current.client.offset,g)||Boolean(v.combine)){var x=function(e){var t=e.current,n=e.destination,i=e.reason,r=Te(t,n);if(r<=0)return Nn;if(r>=1500)return En;var o=Nn+An*(r/1500);return Number(("CANCEL"===i?.6*o:o).toFixed(2))}({current:r.current.client.offset,destination:g,reason:a});n(function(e){return{type:"DROP_ANIMATE",payload:e}}({newHomeClientOffset:g,dropDuration:x,completed:y}))}else n(vn({completed:y}))}}else n(function(e){return{type:"DROP_PENDING",payload:e}}({reason:a}))}else e(i)}}},In=function(){return{x:window.pageXOffset,y:window.pageYOffset}};function Dn(e){var t=e.onWindowScroll;var n=de((function(){t(In())})),i=function(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(t){t.target!==window&&t.target!==window.document||e()}}}(n),r=pe;function o(){return r!==pe}return{start:function(){o()&&ge(!1),r=fe(window,[i])},stop:function(){o()||ge(!1),n.cancel(),r(),r=pe},isActive:o}}var Tn=function(e){var t=Dn({onWindowScroll:function(t){e.dispatch({type:"MOVE_BY_WINDOW_SCROLL",payload:{newScroll:t}})}});return function(e){return function(n){t.isActive()||"INITIAL_PUBLISH"!==n.type||t.start(),t.isActive()&&function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(n)&&t.stop(),e(n)}}},Pn=function(){var e=[];return{add:function(t){var n=setTimeout((function(){return function(t){var n=He(e,(function(e){return e.timerId===t}));-1===n&&ge(!1),e.splice(n,1)[0].callback()}(n)})),i={timerId:n,callback:t};e.push(i)},flush:function(){if(e.length){var t=[].concat(e);e.length=0,t.forEach((function(e){clearTimeout(e.timerId),e.callback()}))}}}},Mn=function(e,t){Jt(),t(),Qt()},Ln=function(e,t){return{draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}},Bn=function(e,t,n,i){if(e){var r=function(e){var t=!1,n=!1,i=setTimeout((function(){n=!0})),r=function(r){t||n||(t=!0,e(r),clearTimeout(i))};return r.wasCalled=function(){return t},r}(n);e(t,{announce:r}),r.wasCalled()||n(i(t))}else n(i(t))},Rn=function(e,t){var n=function(e,t){var n=Pn(),i=null,r=function(n){i||ge(!1),i=null,Mn(0,(function(){return Bn(e().onDragEnd,n,t,je)}))};return{beforeCapture:function(t,n){i&&ge(!1),Mn(0,(function(){var i=e().onBeforeCapture;i&&i({draggableId:t,mode:n})}))},beforeStart:function(t,n){i&&ge(!1),Mn(0,(function(){var i=e().onBeforeDragStart;i&&i(Ln(t,n))}))},start:function(r,o){i&&ge(!1);var a=Ln(r,o);i={mode:o,lastCritical:r,lastLocation:a.source,lastCombine:null},n.add((function(){Mn(0,(function(){return Bn(e().onDragStart,a,t,Se)}))}))},update:function(r,a){var l=Xe(a),s=Je(a);i||ge(!1);var c=!function(e,t){if(e===t)return!0;var n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,i=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&i}(r,i.lastCritical);c&&(i.lastCritical=r);var u,d,h=(d=l,!(null==(u=i.lastLocation)&&null==d||null!=u&&null!=d&&u.droppableId===d.droppableId&&u.index===d.index));h&&(i.lastLocation=l);var p=!function(e,t){return null==e&&null==t||null!=e&&null!=t&&e.draggableId===t.draggableId&&e.droppableId===t.droppableId}(i.lastCombine,s);if(p&&(i.lastCombine=s),c||h||p){var f=(0,o.Z)({},Ln(r,i.mode),{combine:s,destination:l});n.add((function(){Mn(0,(function(){return Bn(e().onDragUpdate,f,t,_e)}))}))}},flush:function(){i||ge(!1),n.flush()},drop:r,abort:function(){if(i){var e=(0,o.Z)({},Ln(i.lastCritical,i.mode),{combine:null,destination:null,reason:"CANCEL"});r(e)}}}}(e,t);return function(e){return function(t){return function(i){if("BEFORE_INITIAL_CAPTURE"!==i.type){if("INITIAL_PUBLISH"===i.type){var r=i.payload.critical;return n.beforeStart(r,i.payload.movementMode),t(i),void n.start(r,i.payload.movementMode)}if("DROP_COMPLETE"===i.type){var o=i.payload.completed.result;return n.flush(),t(i),void n.drop(o)}if(t(i),"FLUSH"!==i.type){var a=e.getState();"DRAGGING"===a.phase&&n.update(a.critical,a.impact)}else n.abort()}else n.beforeCapture(i.payload.draggableId,i.payload.movementMode)}}}},On=function(e){return function(t){return function(n){if("DROP_ANIMATION_FINISHED"===n.type){var i=e.getState();"DROP_ANIMATING"!==i.phase&&ge(!1),e.dispatch(vn({completed:i.completed}))}else t(n)}}},Fn=function(e){var t=null,n=null;return function(i){return function(r){if("FLUSH"!==r.type&&"DROP_COMPLETE"!==r.type&&"DROP_ANIMATION_FINISHED"!==r.type||(n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)),i(r),"DROP_ANIMATE"===r.type){var o={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:function(){"DROP_ANIMATING"===e.getState().phase&&e.dispatch({type:"DROP_ANIMATION_FINISHED",payload:null})}};n=requestAnimationFrame((function(){n=null,t=fe(window,[o])}))}}}},Wn=function(e){return function(t){return function(n){if(t(n),"PUBLISH_WHILE_DRAGGING"===n.type){var i=e.getState();"DROP_PENDING"===i.phase&&(i.isWaiting||e.dispatch(gn({reason:i.reason})))}}}},Hn=a.qC,zn=function(e){var t,n=e.dimensionMarshal,i=e.focusMarshal,r=e.styleMarshal,o=e.getResponders,l=e.announce,s=e.autoScroller;return(0,a.MT)(on,Hn((0,a.md)((t=r,function(){return function(e){return function(n){"INITIAL_PUBLISH"===n.type&&t.dragging(),"DROP_ANIMATE"===n.type&&t.dropping(n.payload.completed.result.reason),"FLUSH"!==n.type&&"DROP_COMPLETE"!==n.type||t.resting(),e(n)}}}),function(e){return function(){return function(t){return function(n){"DROP_COMPLETE"!==n.type&&"FLUSH"!==n.type&&"DROP_ANIMATE"!==n.type||e.stopPublishing(),t(n)}}}}(n),function(e){return function(t){var n=t.getState,i=t.dispatch;return function(t){return function(r){if("LIFT"===r.type){var o=r.payload,a=o.id,l=o.clientSelection,s=o.movementMode,c=n();"DROP_ANIMATING"===c.phase&&i(vn({completed:c.completed})),"IDLE"!==n().phase&&ge(!1),i({type:"FLUSH",payload:null}),i({type:"BEFORE_INITIAL_CAPTURE",payload:{draggableId:a,movementMode:s}});var u={draggableId:a,scrollOptions:{shouldPublishImmediately:"SNAP"===s}},d=e.startPublishing(u),h=d.critical,p=d.dimensions,f=d.viewport;i({type:"INITIAL_PUBLISH",payload:{critical:h,dimensions:p,clientSelection:l,movementMode:s,viewport:f}})}else t(r)}}}}(n),Zn,On,Fn,Wn,function(e){return function(t){return function(n){return function(i){if(function(e){return"DROP_COMPLETE"===e.type||"DROP_ANIMATE"===e.type||"FLUSH"===e.type}(i))return e.stop(),void n(i);if("INITIAL_PUBLISH"===i.type){n(i);var r=t.getState();return"DRAGGING"!==r.phase&&ge(!1),void e.start(r)}n(i),e.scroll(t.getState())}}}}(s),Tn,function(e){var t=!1;return function(){return function(n){return function(i){if("INITIAL_PUBLISH"===i.type)return t=!0,e.tryRecordFocus(i.payload.critical.draggable.id),n(i),void e.tryRestoreFocusRecorded();if(n(i),t){if("FLUSH"===i.type)return t=!1,void e.tryRestoreFocusRecorded();if("DROP_COMPLETE"===i.type){t=!1;var r=i.payload.completed.result;r.combine&&e.tryShiftRecord(r.draggableId,r.combine.draggableId),e.tryRestoreFocusRecorded()}}}}}}(i),Rn(o,l))))};var Gn=function(e){var t=e.scrollHeight,n=e.scrollWidth,i=e.height,r=e.width,o=Ae({x:n,y:t},{x:r,y:i});return{x:Math.max(0,o.x),y:Math.max(0,o.y)}},Vn=function(){var e=document.documentElement;return e||ge(!1),e},Kn=function(){var e=Vn();return Gn({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},Un=function(e){var t=e.critical,n=e.scrollOptions,i=e.registry;Jt();var r,o,a,l,s,c,u,d=(r=In(),o=Kn(),a=r.y,l=r.x,s=Vn(),c=s.clientWidth,u=s.clientHeight,{frame:Q({top:a,left:l,right:l+c,bottom:a+u}),scroll:{initial:r,current:r,max:o,diff:{value:Ne,displacement:Ne}}}),h=d.scroll.current,p=t.droppable,f=i.droppable.getAllByType(p.type).map((function(e){return e.callbacks.getDimensionAndWatchScroll(h,n)})),m=i.draggable.getAllByType(t.draggable.type).map((function(e){return e.getDimension(h)})),v={draggables:Ke(m),droppables:Ve(f)};return Qt(),{dimensions:v,critical:t,viewport:d}};function qn(e,t,n){return n.descriptor.id!==t.id&&(n.descriptor.type===t.type&&"virtual"===e.droppable.getById(n.descriptor.droppableId).descriptor.mode)}var Yn,Xn,Jn=function(e,t){var n=null,i=function(e){var t=e.registry,n=e.callbacks,i={additions:{},removals:{},modified:{}},r=null,o=function(){r||(n.collectionStarting(),r=requestAnimationFrame((function(){r=null,Jt();var e=i,o=e.additions,a=e.removals,l=e.modified,s=Object.keys(o).map((function(e){return t.draggable.getById(e).getDimension(Ne)})).sort((function(e,t){return e.descriptor.index-t.descriptor.index})),c=Object.keys(l).map((function(e){return{droppableId:e,scroll:t.droppable.getById(e).callbacks.getScrollWhileDragging()}})),u={additions:s,removals:Object.keys(a),modified:c};i={additions:{},removals:{},modified:{}},Qt(),n.publish(u)})))};return{add:function(e){var t=e.descriptor.id;i.additions[t]=e,i.modified[e.descriptor.droppableId]=!0,i.removals[t]&&delete i.removals[t],o()},remove:function(e){var t=e.descriptor;i.removals[t.id]=!0,i.modified[t.droppableId]=!0,i.additions[t.id]&&delete i.additions[t.id],o()},stop:function(){r&&(cancelAnimationFrame(r),r=null,i={additions:{},removals:{},modified:{}})}}}({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),r=function(t){n||ge(!1);var r=n.critical.draggable;"ADDITION"===t.type&&qn(e,r,t.value)&&i.add(t.value),"REMOVAL"===t.type&&qn(e,r,t.value)&&i.remove(t.value)},o={updateDroppableIsEnabled:function(i,r){e.droppable.exists(i)||ge(!1),n&&t.updateDroppableIsEnabled({id:i,isEnabled:r})},updateDroppableIsCombineEnabled:function(i,r){n&&(e.droppable.exists(i)||ge(!1),t.updateDroppableIsCombineEnabled({id:i,isCombineEnabled:r}))},scrollDroppable:function(t,i){n&&e.droppable.getById(t).callbacks.scroll(i)},updateDroppableScroll:function(i,r){n&&(e.droppable.exists(i)||ge(!1),t.updateDroppableScroll({id:i,newScroll:r}))},startPublishing:function(t){n&&ge(!1);var i=e.draggable.getById(t.draggableId),o=e.droppable.getById(i.descriptor.droppableId),a={draggable:i.descriptor,droppable:o.descriptor},l=e.subscribe(r);return n={critical:a,unsubscribe:l},Un({critical:a,registry:e,scrollOptions:t.scrollOptions})},stopPublishing:function(){if(n){i.stop();var t=n.critical.droppable;e.droppable.getAllByType(t.type).forEach((function(e){return e.callbacks.dragStopped()})),n.unsubscribe(),n=null}}};return o},Qn=function(e,t){return"IDLE"===e.phase||"DROP_ANIMATING"===e.phase&&(e.completed.result.draggableId!==t&&"DROP"===e.completed.result.reason)},$n=function(e){window.scrollBy(e.x,e.y)},ei=ue((function(e){return Ue(e).filter((function(e){return!!e.isEnabled&&!!e.frame}))})),ti=function(e){var t=e.center,n=e.destination,i=e.droppables;if(n){var r=i[n];return r.frame?r:null}var o=function(e,t){var n=ze(ei(t),(function(t){return t.frame||ge(!1),Ot(t.frame.pageMarginBox)(e)}));return n}(t,i);return o},ni=.25,ii=.05,ri=28,oi=function(e){return Math.pow(e,2)},ai={stopDampeningAt:1200,accelerateAt:360},li=function(e){var t=e.startOfRange,n=e.endOfRange,i=e.current,r=n-t;return 0===r?0:(i-t)/r},si=ai.accelerateAt,ci=ai.stopDampeningAt,ui=function(e){var t=e.distanceToEdge,n=e.thresholds,i=e.dragStartTime,r=e.shouldUseTimeDampening,o=function(e,t){if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return ri;if(e===t.startScrollingFrom)return 1;var n=li({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),i=ri*oi(1-n);return Math.ceil(i)}(t,n);return 0===o?0:r?Math.max(function(e,t){var n=t,i=ci,r=Date.now()-n;if(r>=ci)return e;if(r<si)return 1;var o=li({startOfRange:si,endOfRange:i,current:r}),a=e*oi(o);return Math.ceil(a)}(o,i),1):o},di=function(e){var t=e.container,n=e.distanceToEdges,i=e.dragStartTime,r=e.axis,o=e.shouldUseTimeDampening,a=function(e,t){return{startScrollingFrom:e[t.size]*ni,maxScrollValueAt:e[t.size]*ii}}(t,r);return n[r.end]<n[r.start]?ui({distanceToEdge:n[r.end],thresholds:a,dragStartTime:i,shouldUseTimeDampening:o}):-1*ui({distanceToEdge:n[r.start],thresholds:a,dragStartTime:i,shouldUseTimeDampening:o})},hi=Me((function(e){return 0===e?0:e})),pi=function(e){var t=e.dragStartTime,n=e.container,i=e.subject,r=e.center,o=e.shouldUseTimeDampening,a={top:r.y-n.top,right:n.right-r.x,bottom:n.bottom-r.y,left:r.x-n.left},l=di({container:n,distanceToEdges:a,dragStartTime:t,axis:at,shouldUseTimeDampening:o}),s=di({container:n,distanceToEdges:a,dragStartTime:t,axis:lt,shouldUseTimeDampening:o}),c=hi({x:s,y:l});if(Ze(c,Ne))return null;var u=function(e){var t=e.container,n=e.subject,i=e.proposedScroll,r=n.height>t.height,o=n.width>t.width;return o||r?o&&r?null:{x:o?0:i.x,y:r?0:i.y}:i}({container:n,subject:i,proposedScroll:c});return u?Ze(u,Ne)?null:u:null},fi=Me((function(e){return 0===e?0:e>0?1:-1})),mi=(Yn=function(e,t){return e<0?e:e>t?e-t:0},function(e){var t=e.current,n=e.max,i=e.change,r=Ee(t,i),o={x:Yn(r.x,n.x),y:Yn(r.y,n.y)};return Ze(o,Ne)?null:o}),vi=function(e){var t=e.max,n=e.current,i=e.change,r={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},o=fi(i),a=mi({max:r,current:n,change:o});return!a||(0!==o.x&&0===a.x||0!==o.y&&0===a.y)},gi=function(e,t){return vi({current:e.scroll.current,max:e.scroll.max,change:t})},yi=function(e,t){var n=e.frame;return!!n&&vi({current:n.scroll.current,max:n.scroll.max,change:t})},xi=function(e){var t=e.state,n=e.dragStartTime,i=e.shouldUseTimeDampening,r=e.scrollWindow,o=e.scrollDroppable,a=t.current.page.borderBoxCenter,l=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){var s=function(e){var t=e.viewport,n=e.subject,i=e.center,r=e.dragStartTime,o=e.shouldUseTimeDampening,a=pi({dragStartTime:r,container:t.frame,subject:n,center:i,shouldUseTimeDampening:o});return a&&gi(t,a)?a:null}({dragStartTime:n,viewport:t.viewport,subject:l,center:a,shouldUseTimeDampening:i});if(s)return void r(s)}var c=ti({center:a,destination:Lt(t.impact),droppables:t.dimensions.droppables});if(c){var u=function(e){var t=e.droppable,n=e.subject,i=e.center,r=e.dragStartTime,o=e.shouldUseTimeDampening,a=t.frame;if(!a)return null;var l=pi({dragStartTime:r,container:a.pageMarginBox,subject:n,center:i,shouldUseTimeDampening:o});return l&&yi(t,l)?l:null}({dragStartTime:n,droppable:c,subject:l,center:a,shouldUseTimeDampening:i});u&&o(c.descriptor.id,u)}},bi=function(e){var t=e.move,n=e.scrollDroppable,i=e.scrollWindow,r=function(e,t){if(!yi(e,t))return t;var i=function(e,t){var n=e.frame;return n&&yi(e,t)?mi({current:n.scroll.current,max:n.scroll.max,change:t}):null}(e,t);if(!i)return n(e.descriptor.id,t),null;var r=Ae(t,i);return n(e.descriptor.id,r),Ae(t,r)},o=function(e,t,n){if(!e)return n;if(!gi(t,n))return n;var r=function(e,t){if(!gi(e,t))return null;var n=e.scroll.max,i=e.scroll.current;return mi({current:i,max:n,change:t})}(t,n);if(!r)return i(n),null;var o=Ae(n,r);return i(o),Ae(n,o)};return function(e){var n=e.scrollJumpRequest;if(n){var i=Lt(e.impact);i||ge(!1);var a=r(e.dimensions.droppables[i],n);if(a){var l=e.viewport,s=o(e.isWindowScrollAllowed,l,a);s&&function(e,n){var i=Ee(e.current.client.selection,n);t({client:i})}(e,s)}}}},wi=function(e){var t=e.scrollDroppable,n=e.scrollWindow,i=e.move,r=function(e){var t=e.scrollWindow,n=e.scrollDroppable,i=de(t),r=de(n),o=null,a=function(e){o||ge(!1);var t=o,n=t.shouldUseTimeDampening,a=t.dragStartTime;xi({state:e,scrollWindow:i,scrollDroppable:r,dragStartTime:a,shouldUseTimeDampening:n})};return{start:function(e){Jt(),o&&ge(!1);var t=Date.now(),n=!1,i=function(){n=!0};xi({state:e,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:i,scrollDroppable:i}),o={dragStartTime:t,shouldUseTimeDampening:n},Qt(),n&&a(e)},stop:function(){o&&(i.cancel(),r.cancel(),o=null)},scroll:a}}({scrollWindow:n,scrollDroppable:t}),o=bi({move:i,scrollWindow:n,scrollDroppable:t});return{scroll:function(e){"DRAGGING"===e.phase&&("FLUID"!==e.movementMode?e.scrollJumpRequest&&o(e):r.scroll(e))},start:r.start,stop:r.stop}},Ci="data-rbd",ki={base:Xn=Ci+"-drag-handle",draggableId:Xn+"-draggable-id",contextId:Xn+"-context-id"},Si=function(){var e=Ci+"-draggable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),_i=function(){var e=Ci+"-droppable";return{base:e,contextId:e+"-context-id",id:e+"-id"}}(),ji={contextId:Ci+"-scroll-container-context-id"},Ni=function(e,t){return e.map((function(e){var n=e.styles[t];return n?e.selector+" { "+n+" }":""})).join(" ")},Ei="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement?i.useLayoutEffect:i.useEffect,Ai=function(){var e=document.querySelector("head");return e||ge(!1),e},Zi=function(e){var t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t};function Ii(e,t){var n=Y((function(){return function(e){var t,n,i,r=(t=e,function(e){return"["+e+'="'+t+'"]'}),o=(n="\n cursor: -webkit-grab;\n cursor: grab;\n ",{selector:r(ki.contextId),styles:{always:"\n -webkit-touch-callout: none;\n -webkit-tap-highlight-color: rgba(0,0,0,0);\n touch-action: manipulation;\n ",resting:n,dragging:"pointer-events: none;",dropAnimating:n}}),a=[(i="\n transition: "+kn.outOfTheWay+";\n ",{selector:r(Si.contextId),styles:{dragging:i,dropAnimating:i,userCancel:i}}),o,{selector:r(_i.contextId),styles:{always:"overflow-anchor: none;"}},{selector:"body",styles:{dragging:"\n cursor: grabbing;\n cursor: -webkit-grabbing;\n user-select: none;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n overflow-anchor: none;\n "}}];return{always:Ni(a,"always"),resting:Ni(a,"resting"),dragging:Ni(a,"dragging"),dropAnimating:Ni(a,"dropAnimating"),userCancel:Ni(a,"userCancel")}}(e)}),[e]),r=(0,i.useRef)(null),o=(0,i.useRef)(null),a=X(ue((function(e){var t=o.current;t||ge(!1),t.textContent=e})),[]),l=X((function(e){var t=r.current;t||ge(!1),t.textContent=e}),[]);Ei((function(){(r.current||o.current)&&ge(!1);var i=Zi(t),s=Zi(t);return r.current=i,o.current=s,i.setAttribute(Ci+"-always",e),s.setAttribute(Ci+"-dynamic",e),Ai().appendChild(i),Ai().appendChild(s),l(n.always),a(n.resting),function(){var e=function(e){var t=e.current;t||ge(!1),Ai().removeChild(t),e.current=null};e(r),e(o)}}),[t,l,a,n.always,n.resting,e]);var s=X((function(){return a(n.dragging)}),[a,n.dragging]),c=X((function(e){a("DROP"!==e?n.userCancel:n.dropAnimating)}),[a,n.dropAnimating,n.userCancel]),u=X((function(){o.current&&a(n.resting)}),[a,n.resting]);return Y((function(){return{dragging:s,dropping:c,resting:u}}),[s,c,u])}var Di=function(e){return e&&e.ownerDocument?e.ownerDocument.defaultView:window};function Ti(e){return e instanceof Di(e).HTMLElement}function Pi(e,t){var n="["+ki.contextId+'="'+e+'"]',i=Ge(document.querySelectorAll(n));if(!i.length)return null;var r=ze(i,(function(e){return e.getAttribute(ki.draggableId)===t}));return r&&Ti(r)?r:null}function Mi(){var e={draggables:{},droppables:{}},t=[];function n(e){t.length&&t.forEach((function(t){return t(e)}))}function i(t){return e.draggables[t]||null}function r(t){return e.droppables[t]||null}return{draggable:{register:function(t){e.draggables[t.descriptor.id]=t,n({type:"ADDITION",value:t})},update:function(t,n){var i=e.draggables[n.descriptor.id];i&&i.uniqueId===t.uniqueId&&(delete e.draggables[n.descriptor.id],e.draggables[t.descriptor.id]=t)},unregister:function(t){var r=t.descriptor.id,o=i(r);o&&t.uniqueId===o.uniqueId&&(delete e.draggables[r],n({type:"REMOVAL",value:t}))},getById:function(e){var t=i(e);return t||ge(!1),t},findById:i,exists:function(e){return Boolean(i(e))},getAllByType:function(t){return We(e.draggables).filter((function(e){return e.descriptor.type===t}))}},droppable:{register:function(t){e.droppables[t.descriptor.id]=t},unregister:function(t){var n=r(t.descriptor.id);n&&t.uniqueId===n.uniqueId&&delete e.droppables[t.descriptor.id]},getById:function(e){var t=r(e);return t||ge(!1),t},findById:r,exists:function(e){return Boolean(r(e))},getAllByType:function(t){return We(e.droppables).filter((function(e){return e.descriptor.type===t}))}},subscribe:function(e){return t.push(e),function(){var n=t.indexOf(e);-1!==n&&t.splice(n,1)}},clean:function(){e.draggables={},e.droppables={},t.length=0}}}var Li=i.createContext(null),Bi=function(){var e=document.body;return e||ge(!1),e},Ri={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var Oi=0,Fi={separator:"::"};function Wi(e,t){return void 0===t&&(t=Fi),Y((function(){return""+e+t.separator+Oi++}),[t.separator,e])}var Hi=i.createContext(null);function zi(e){0}function Gi(e,t){zi()}function Vi(){Gi()}function Ki(e){var t=(0,i.useRef)(e);return(0,i.useEffect)((function(){t.current=e})),t}var Ui,qi=((Ui={})[13]=!0,Ui[9]=!0,Ui),Yi=function(e){qi[e.keyCode]&&e.preventDefault()},Xi=function(){var e="visibilitychange";return"undefined"==typeof document?e:ze([e,"ms"+e,"webkit"+e,"moz"+e,"o"+e],(function(e){return"on"+e in document}))||e}();var Ji,Qi={type:"IDLE"};function $i(e){var t=e.cancel,n=e.completed,i=e.getPhase,r=e.setPhase;return[{eventName:"mousemove",fn:function(e){var t=e.button,n=e.clientX,o=e.clientY;if(0===t){var a={x:n,y:o},l=i();if("DRAGGING"===l.type)return e.preventDefault(),void l.actions.move(a);"PENDING"!==l.type&&ge(!1);var s=l.point;if(c=s,u=a,Math.abs(u.x-c.x)>=5||Math.abs(u.y-c.y)>=5){var c,u;e.preventDefault();var d=l.actions.fluidLift(a);r({type:"DRAGGING",actions:d})}}}},{eventName:"mouseup",fn:function(e){var r=i();"DRAGGING"===r.type?(e.preventDefault(),r.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"mousedown",fn:function(e){"DRAGGING"===i().type&&e.preventDefault(),t()}},{eventName:"keydown",fn:function(e){if("PENDING"!==i().type)return 27===e.keyCode?(e.preventDefault(),void t()):void Yi(e);t()}},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:function(){"PENDING"===i().type&&t()}},{eventName:"webkitmouseforcedown",fn:function(e){var n=i();"IDLE"===n.type&&ge(!1),n.actions.shouldRespectForcePress()?t():e.preventDefault()}},{eventName:Xi,fn:t}]}function er(){}var tr=((Ji={})[34]=!0,Ji[33]=!0,Ji[36]=!0,Ji[35]=!0,Ji);function nr(e,t){function n(){t(),e.cancel()}return[{eventName:"keydown",fn:function(i){return 27===i.keyCode?(i.preventDefault(),void n()):32===i.keyCode?(i.preventDefault(),t(),void e.drop()):40===i.keyCode?(i.preventDefault(),void e.moveDown()):38===i.keyCode?(i.preventDefault(),void e.moveUp()):39===i.keyCode?(i.preventDefault(),void e.moveRight()):37===i.keyCode?(i.preventDefault(),void e.moveLeft()):void(tr[i.keyCode]?i.preventDefault():Yi(i))}},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:Xi,fn:n}]}var ir={type:"IDLE"};var rr={input:!0,button:!0,textarea:!0,select:!0,option:!0,optgroup:!0,video:!0,audio:!0};function or(e,t){if(null==t)return!1;if(Boolean(rr[t.tagName.toLowerCase()]))return!0;var n=t.getAttribute("contenteditable");return"true"===n||""===n||t!==e&&or(e,t.parentElement)}function ar(e,t){var n=t.target;return!!Ti(n)&&or(e,n)}var lr=function(e){return Q(e.getBoundingClientRect()).center};var sr=function(){var e="matches";return"undefined"==typeof document?e:ze([e,"msMatchesSelector","webkitMatchesSelector"],(function(e){return e in Element.prototype}))||e}();function cr(e,t){return null==e?null:e[sr](t)?e:cr(e.parentElement,t)}function ur(e,t){return e.closest?e.closest(t):cr(e,t)}function dr(e,t){var n,i=t.target;if(!((n=i)instanceof Di(n).Element))return null;var r=function(e){return"["+ki.contextId+'="'+e+'"]'}(e),o=ur(i,r);return o&&Ti(o)?o:null}function hr(e){e.preventDefault()}function pr(e){var t=e.expected,n=e.phase,i=e.isLockActive;e.shouldWarn;return!!i()&&t===n}function fr(e){var t=e.lockAPI,n=e.store,i=e.registry,r=e.draggableId;if(t.isClaimed())return!1;var o=i.draggable.findById(r);return!!o&&(!!o.options.isEnabled&&!!Qn(n.getState(),r))}function mr(e){var t=e.lockAPI,n=e.contextId,i=e.store,r=e.registry,a=e.draggableId,l=e.forceSensorStop,s=e.sourceEvent;if(!fr({lockAPI:t,store:i,registry:r,draggableId:a}))return null;var c=r.draggable.getById(a),u=function(e,t){var n="["+Si.contextId+'="'+e+'"]',i=ze(Ge(document.querySelectorAll(n)),(function(e){return e.getAttribute(Si.id)===t}));return i&&Ti(i)?i:null}(n,c.descriptor.id);if(!u)return null;if(s&&!c.options.canDragInteractiveElements&&ar(u,s))return null;var d=t.claim(l||pe),h="PRE_DRAG";function p(){return c.options.shouldRespectForcePress}function f(){return t.isActive(d)}var m=function(e,t){pr({expected:e,phase:h,isLockActive:f,shouldWarn:!0})&&i.dispatch(t())}.bind(null,"DRAGGING");function v(e){function n(){t.release(),h="COMPLETED"}function r(t,r){if(void 0===r&&(r={shouldBlockNextClick:!1}),e.cleanup(),r.shouldBlockNextClick){var o=fe(window,[{eventName:"click",fn:hr,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(o)}n(),i.dispatch(gn({reason:t}))}return"PRE_DRAG"!==h&&(n(),"PRE_DRAG"!==h&&ge(!1)),i.dispatch(function(e){return{type:"LIFT",payload:e}}(e.liftActionArgs)),h="DRAGGING",(0,o.Z)({isActive:function(){return pr({expected:"DRAGGING",phase:h,isLockActive:f,shouldWarn:!1})},shouldRespectForcePress:p,drop:function(e){return r("DROP",e)},cancel:function(e){return r("CANCEL",e)}},e.actions)}return{isActive:function(){return pr({expected:"PRE_DRAG",phase:h,isLockActive:f,shouldWarn:!1})},shouldRespectForcePress:p,fluidLift:function(e){var t=de((function(e){m((function(){return dn({client:e})}))})),n=v({liftActionArgs:{id:a,clientSelection:e,movementMode:"FLUID"},cleanup:function(){return t.cancel()},actions:{move:t}});return(0,o.Z)({},n,{move:t})},snapLift:function(){var e={moveUp:function(){return m(hn)},moveRight:function(){return m(fn)},moveDown:function(){return m(pn)},moveLeft:function(){return m(mn)}};return v({liftActionArgs:{id:a,clientSelection:lr(u),movementMode:"SNAP"},cleanup:pe,actions:e})},abort:function(){pr({expected:"PRE_DRAG",phase:h,isLockActive:f,shouldWarn:!0})&&t.release()}}}var vr=[function(e){var t=(0,i.useRef)(Qi),n=(0,i.useRef)(pe),r=Y((function(){return{eventName:"mousedown",fn:function(t){if(!t.defaultPrevented&&0===t.button&&!(t.ctrlKey||t.metaKey||t.shiftKey||t.altKey)){var i=e.findClosestDraggableId(t);if(i){var r=e.tryGetLock(i,l,{sourceEvent:t});if(r){t.preventDefault();var o={x:t.clientX,y:t.clientY};n.current(),u(r,o)}}}}}}),[e]),o=Y((function(){return{eventName:"webkitmouseforcewillbegin",fn:function(t){if(!t.defaultPrevented){var n=e.findClosestDraggableId(t);if(n){var i=e.findOptionsForDraggable(n);i&&(i.shouldRespectForcePress||e.canGetLock(n)&&t.preventDefault())}}}}}),[e]),a=X((function(){n.current=fe(window,[o,r],{passive:!1,capture:!0})}),[o,r]),l=X((function(){"IDLE"!==t.current.type&&(t.current=Qi,n.current(),a())}),[a]),s=X((function(){var e=t.current;l(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[l]),c=X((function(){var e=$i({cancel:s,completed:l,getPhase:function(){return t.current},setPhase:function(e){t.current=e}});n.current=fe(window,e,{capture:!0,passive:!1})}),[s,l]),u=X((function(e,n){"IDLE"!==t.current.type&&ge(!1),t.current={type:"PENDING",point:n,actions:e},c()}),[c]);Ei((function(){return a(),function(){n.current()}}),[a])},function(e){var t=(0,i.useRef)(er),n=Y((function(){return{eventName:"keydown",fn:function(n){if(!n.defaultPrevented&&32===n.keyCode){var i=e.findClosestDraggableId(n);if(i){var o=e.tryGetLock(i,s,{sourceEvent:n});if(o){n.preventDefault();var a=!0,l=o.snapLift();t.current(),t.current=fe(window,nr(l,s),{capture:!0,passive:!1})}}}function s(){a||ge(!1),a=!1,t.current(),r()}}}}),[e]),r=X((function(){t.current=fe(window,[n],{passive:!1,capture:!0})}),[n]);Ei((function(){return r(),function(){t.current()}}),[r])},function(e){var t=(0,i.useRef)(ir),n=(0,i.useRef)(pe),r=X((function(){return t.current}),[]),o=X((function(e){t.current=e}),[]),a=Y((function(){return{eventName:"touchstart",fn:function(t){if(!t.defaultPrevented){var i=e.findClosestDraggableId(t);if(i){var r=e.tryGetLock(i,s,{sourceEvent:t});if(r){var o=t.touches[0],a={x:o.clientX,y:o.clientY};n.current(),h(r,a)}}}}}}),[e]),l=X((function(){n.current=fe(window,[a],{capture:!0,passive:!1})}),[a]),s=X((function(){var e=t.current;"IDLE"!==e.type&&("PENDING"===e.type&&clearTimeout(e.longPressTimerId),o(ir),n.current(),l())}),[l,o]),c=X((function(){var e=t.current;s(),"DRAGGING"===e.type&&e.actions.cancel({shouldBlockNextClick:!0}),"PENDING"===e.type&&e.actions.abort()}),[s]),u=X((function(){var e={capture:!0,passive:!1},t={cancel:c,completed:s,getPhase:r},i=fe(window,function(e){var t=e.cancel,n=e.completed,i=e.getPhase;return[{eventName:"touchmove",options:{capture:!1},fn:function(e){var n=i();if("DRAGGING"===n.type){n.hasMoved=!0;var r=e.touches[0],o={x:r.clientX,y:r.clientY};e.preventDefault(),n.actions.move(o)}else t()}},{eventName:"touchend",fn:function(e){var r=i();"DRAGGING"===r.type?(e.preventDefault(),r.actions.drop({shouldBlockNextClick:!0}),n()):t()}},{eventName:"touchcancel",fn:function(e){"DRAGGING"===i().type?(e.preventDefault(),t()):t()}},{eventName:"touchforcechange",fn:function(e){var n=i();"IDLE"===n.type&&ge(!1);var r=e.touches[0];if(r&&r.force>=.15){var o=n.actions.shouldRespectForcePress();if("PENDING"!==n.type)return o?n.hasMoved?void e.preventDefault():void t():void e.preventDefault();o&&t()}}},{eventName:Xi,fn:t}]}(t),e),o=fe(window,function(e){var t=e.cancel,n=e.getPhase;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:function(e){e.preventDefault()}},{eventName:"keydown",fn:function(e){"DRAGGING"===n().type?(27===e.keyCode&&e.preventDefault(),t()):t()}},{eventName:Xi,fn:t}]}(t),e);n.current=function(){i(),o()}}),[c,r,s]),d=X((function(){var e=r();"PENDING"!==e.type&&ge(!1);var t=e.actions.fluidLift(e.point);o({type:"DRAGGING",actions:t,hasMoved:!1})}),[r,o]),h=X((function(e,t){"IDLE"!==r().type&&ge(!1);var n=setTimeout(d,120);o({type:"PENDING",point:t,actions:e,longPressTimerId:n}),u()}),[u,r,o,d]);Ei((function(){return l(),function(){n.current();var e=r();"PENDING"===e.type&&(clearTimeout(e.longPressTimerId),o(ir))}}),[r,l,o]),Ei((function(){return fe(window,[{eventName:"touchmove",fn:function(){},options:{capture:!1,passive:!1}}])}),[])}];function gr(e){var t=e.contextId,n=e.store,r=e.registry,o=e.customSensors,a=e.enableDefaultSensors,l=[].concat(a?vr:[],o||[]),s=(0,i.useState)((function(){return function(){var e=null;function t(){e||ge(!1),e=null}return{isClaimed:function(){return Boolean(e)},isActive:function(t){return t===e},claim:function(t){e&&ge(!1);var n={abandon:t};return e=n,n},release:t,tryAbandon:function(){e&&(e.abandon(),t())}}}()}))[0],c=X((function(e,t){e.isDragging&&!t.isDragging&&s.tryAbandon()}),[s]);Ei((function(){var e=n.getState();return n.subscribe((function(){var t=n.getState();c(e,t),e=t}))}),[s,n,c]),Ei((function(){return s.tryAbandon}),[s.tryAbandon]);var u=X((function(e){return fr({lockAPI:s,registry:r,store:n,draggableId:e})}),[s,r,n]),d=X((function(e,i,o){return mr({lockAPI:s,registry:r,contextId:t,store:n,draggableId:e,forceSensorStop:i,sourceEvent:o&&o.sourceEvent?o.sourceEvent:null})}),[t,s,r,n]),h=X((function(e){return function(e,t){var n=dr(e,t);return n?n.getAttribute(ki.draggableId):null}(t,e)}),[t]),p=X((function(e){var t=r.draggable.findById(e);return t?t.options:null}),[r.draggable]),f=X((function(){s.isClaimed()&&(s.tryAbandon(),"IDLE"!==n.getState().phase&&n.dispatch({type:"FLUSH",payload:null}))}),[s,n]),m=X(s.isClaimed,[s]),v=Y((function(){return{canGetLock:u,tryGetLock:d,findClosestDraggableId:h,findOptionsForDraggable:p,tryReleaseLock:f,isLockClaimed:m}}),[u,d,h,p,f,m]);zi();for(var g=0;g<l.length;g++)l[g](v)}function yr(e){return e.current||ge(!1),e.current}function xr(e){var t=e.contextId,n=e.setCallbacks,r=e.sensors,l=e.nonce,s=e.dragHandleUsageInstructions,c=(0,i.useRef)(null);Vi();var u=Ki(e),d=X((function(){return function(e){return{onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}}(u.current)}),[u]),h=function(e){var t=Y((function(){return function(e){return"rbd-announcement-"+e}(e)}),[e]),n=(0,i.useRef)(null);return(0,i.useEffect)((function(){var e=document.createElement("div");return n.current=e,e.id=t,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),(0,o.Z)(e.style,Ri),Bi().appendChild(e),function(){setTimeout((function(){var t=Bi();t.contains(e)&&t.removeChild(e),e===n.current&&(n.current=null)}))}}),[t]),X((function(e){var t=n.current;t&&(t.textContent=e)}),[])}(t),f=function(e){var t=e.contextId,n=e.text,r=Wi("hidden-text",{separator:"-"}),o=Y((function(){return"rbd-hidden-text-"+(e={contextId:t,uniqueId:r}).contextId+"-"+e.uniqueId;var e}),[r,t]);return(0,i.useEffect)((function(){var e=document.createElement("div");return e.id=o,e.textContent=n,e.style.display="none",Bi().appendChild(e),function(){var t=Bi();t.contains(e)&&t.removeChild(e)}}),[o,n]),o}({contextId:t,text:s}),m=Ii(t,l),v=X((function(e){yr(c).dispatch(e)}),[]),g=Y((function(){return(0,a.DE)({publishWhileDragging:an,updateDroppableScroll:sn,updateDroppableIsEnabled:cn,updateDroppableIsCombineEnabled:un,collectionStarting:ln},v)}),[v]),y=function(){var e=Y(Mi,[]);return(0,i.useEffect)((function(){return function(){requestAnimationFrame(e.clean)}}),[e]),e}(),x=Y((function(){return Jn(y,g)}),[y,g]),b=Y((function(){return wi((0,o.Z)({scrollWindow:$n,scrollDroppable:x.scrollDroppable},(0,a.DE)({move:dn},v)))}),[x.scrollDroppable,v]),w=function(e){var t=(0,i.useRef)({}),n=(0,i.useRef)(null),r=(0,i.useRef)(null),o=(0,i.useRef)(!1),a=X((function(e,n){var i={id:e,focus:n};return t.current[e]=i,function(){var n=t.current;n[e]!==i&&delete n[e]}}),[]),l=X((function(t){var n=Pi(e,t);n&&n!==document.activeElement&&n.focus()}),[e]),s=X((function(e,t){n.current===e&&(n.current=t)}),[]),c=X((function(){r.current||o.current&&(r.current=requestAnimationFrame((function(){r.current=null;var e=n.current;e&&l(e)})))}),[l]),u=X((function(e){n.current=null;var t=document.activeElement;t&&t.getAttribute(ki.draggableId)===e&&(n.current=e)}),[]);return Ei((function(){return o.current=!0,function(){o.current=!1;var e=r.current;e&&cancelAnimationFrame(e)}}),[]),Y((function(){return{register:a,tryRecordFocus:u,tryRestoreFocusRecorded:c,tryShiftRecord:s}}),[a,u,c,s])}(t),C=Y((function(){return zn({announce:h,autoScroller:b,dimensionMarshal:x,focusMarshal:w,getResponders:d,styleMarshal:m})}),[h,b,x,w,d,m]);c.current=C;var k=X((function(){var e=yr(c);"IDLE"!==e.getState().phase&&e.dispatch({type:"FLUSH",payload:null})}),[]),S=X((function(){var e=yr(c).getState();return e.isDragging||"DROP_ANIMATING"===e.phase}),[]);n(Y((function(){return{isDragging:S,tryAbort:k}}),[S,k]));var _=X((function(e){return Qn(yr(c).getState(),e)}),[]),j=X((function(){return Rt(yr(c).getState())}),[]),N=Y((function(){return{marshal:x,focus:w,contextId:t,canLift:_,isMovementAllowed:j,dragHandleUsageInstructionsId:f,registry:y}}),[t,x,f,w,_,j,y]);return gr({contextId:t,store:C,registry:y,customSensors:r,enableDefaultSensors:!1!==e.enableDefaultSensors}),(0,i.useEffect)((function(){return k}),[k]),i.createElement(Hi.Provider,{value:N},i.createElement(p,{context:Li,store:C},e.children))}var br=0;function wr(e){var t=Y((function(){return""+br++}),[]),n=e.dragHandleUsageInstructions||ke;return i.createElement(ye,null,(function(r){return i.createElement(xr,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd},e.children)}))}var Cr=function(e){return function(t){return e===t}},kr=Cr("scroll"),Sr=Cr("auto"),_r=(Cr("visible"),function(e,t){return t(e.overflowX)||t(e.overflowY)}),jr=function(e){var t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return _r(n,kr)||_r(n,Sr)},Nr=function e(t){return null==t||t===document.body||t===document.documentElement?null:jr(t)?t:e(t.parentElement)},Er=function(e){return{x:e.scrollLeft,y:e.scrollTop}},Ar=function e(t){return!!t&&("fixed"===window.getComputedStyle(t).position||e(t.parentElement))},Zr=function(e){return{closestScrollable:Nr(e),isFixedOnPage:Ar(e)}},Ir=function(e){var t=e.ref,n=e.descriptor,i=e.env,r=e.windowScroll,o=e.direction,a=e.isDropDisabled,l=e.isCombineEnabled,s=e.shouldClipSubject,c=i.closestScrollable,u=function(e,t){var n=le(e);if(!t)return n;if(e!==t)return n;var i=n.paddingBox.top-t.scrollTop,r=n.paddingBox.left-t.scrollLeft,o=i+t.scrollHeight,a=r+t.scrollWidth,l=$({top:i,right:a,bottom:o,left:r},n.border);return ne({borderBox:l,margin:n.margin,border:n.border,padding:n.padding})}(t,c),d=oe(u,r),h=function(){if(!c)return null;var e=le(c),t={scrollHeight:c.scrollHeight,scrollWidth:c.scrollWidth};return{client:e,page:oe(e,r),scroll:Er(c),scrollSize:t,shouldClipSubject:s}}(),p=function(e){var t=e.descriptor,n=e.isEnabled,i=e.isCombineEnabled,r=e.isFixedOnPage,o=e.direction,a=e.client,l=e.page,s=e.closest,c=function(){if(!s)return null;var e=s.scrollSize,t=s.client,n=Gn({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,height:t.paddingBox.height,width:t.paddingBox.width});return{pageMarginBox:s.page.marginBox,frameClient:t,scrollSize:e,shouldClipSubject:s.shouldClipSubject,scroll:{initial:s.scroll,current:s.scroll,max:n,diff:{value:Ne,displacement:Ne}}}}(),u="vertical"===o?at:lt;return{descriptor:t,isCombineEnabled:i,isFixedOnPage:r,axis:u,isEnabled:n,client:a,page:l,frame:c,subject:Oe({page:l,withPlaceholder:null,axis:u,frame:c})}}({descriptor:n,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:i.isFixedOnPage,direction:o,client:u,page:d,closest:h});return p},Dr={passive:!1},Tr={passive:!0},Pr=function(e){return e.shouldPublishImmediately?Dr:Tr};function Mr(e){var t=(0,i.useContext)(e);return t||ge(!1),t}var Lr=function(e){return e&&e.env.closestScrollable||null};function Br(){}var Rr={width:0,height:0,margin:{top:0,right:0,bottom:0,left:0}},Or=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,i=e.animate,r=function(e){var t=e.isAnimatingOpenOnMount,n=e.placeholder,i=e.animate;return t||"close"===i?Rr:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}}({isAnimatingOpenOnMount:t,placeholder:n,animate:i});return{display:n.display,boxSizing:"border-box",width:r.width,height:r.height,marginTop:r.margin.top,marginRight:r.margin.right,marginBottom:r.margin.bottom,marginLeft:r.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:"none"!==i?kn.placeholder:null}};var Fr=i.memo((function(e){var t=(0,i.useRef)(null),n=X((function(){t.current&&(clearTimeout(t.current),t.current=null)}),[]),r=e.animate,o=e.onTransitionEnd,a=e.onClose,l=e.contextId,s=(0,i.useState)("open"===e.animate),c=s[0],u=s[1];(0,i.useEffect)((function(){return c?"open"!==r?(n(),u(!1),Br):t.current?Br:(t.current=setTimeout((function(){t.current=null,u(!1)})),n):Br}),[r,c,n]);var d=X((function(e){"height"===e.propertyName&&(o(),"close"===r&&a())}),[r,a,o]),h=Or({isAnimatingOpenOnMount:c,animate:e.animate,placeholder:e.placeholder});return i.createElement(e.placeholder.tagName,{style:h,"data-rbd-placeholder-context-id":l,onTransitionEnd:d,ref:e.innerRef})})),Wr=i.createContext(null);var Hr=function(e){function t(){for(var t,n=arguments.length,i=new Array(n),r=0;r<n;r++)i[r]=arguments[r];return(t=e.call.apply(e,[this].concat(i))||this).state={isVisible:Boolean(t.props.on),data:t.props.on,animate:t.props.shouldAnimate&&t.props.on?"open":"none"},t.onClose=function(){"close"===t.state.animate&&t.setState({isVisible:!1})},t}return(0,r.Z)(t,e),t.getDerivedStateFromProps=function(e,t){return e.shouldAnimate?e.on?{isVisible:!0,data:e.on,animate:"open"}:t.isVisible?{isVisible:!0,data:t.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:Boolean(e.on),data:e.on,animate:"none"}},t.prototype.render=function(){if(!this.state.isVisible)return null;var e={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(e)},t}(i.PureComponent),zr=5e3,Gr=4500,Vr=function(e,t){return t?kn.drop(t.duration):e?kn.snap:kn.fluid},Kr=function(e,t){return e?t?bn.drop:bn.combining:null};function Ur(e){return"DRAGGING"===e.type?function(e){var t=e.dimension.client,n=e.offset,i=e.combineWith,r=e.dropping,o=Boolean(i),a=function(e){return null!=e.forceShouldAnimate?e.forceShouldAnimate:"SNAP"===e.mode}(e),l=Boolean(r),s=l?jn(n,o):_n(n);return{position:"fixed",top:t.marginBox.top,left:t.marginBox.left,boxSizing:"border-box",width:t.borderBox.width,height:t.borderBox.height,transition:Vr(a,r),transform:s,opacity:Kr(o,l),zIndex:l?Gr:zr,pointerEvents:"none"}}(e):{transform:_n((t=e).offset),transition:t.shouldAnimateDisplacement?null:"none"};var t}function qr(e){var t=Wi("draggable"),n=e.descriptor,r=e.registry,o=e.getDraggableRef,a=e.canDragInteractiveElements,l=e.shouldRespectForcePress,s=e.isEnabled,c=Y((function(){return{canDragInteractiveElements:a,shouldRespectForcePress:l,isEnabled:s}}),[a,s,l]),u=X((function(e){var t=o();return t||ge(!1),function(e,t,n){void 0===n&&(n=Ne);var i=window.getComputedStyle(t),r=t.getBoundingClientRect(),o=ae(r,i),a=oe(o,n);return{descriptor:e,placeholder:{client:o,tagName:t.tagName.toLowerCase(),display:i.display},displaceBy:{x:o.marginBox.width,y:o.marginBox.height},client:o,page:a}}(n,t,e)}),[n,o]),d=Y((function(){return{uniqueId:t,descriptor:n,options:c,getDimension:u}}),[n,u,c,t]),h=(0,i.useRef)(d),p=(0,i.useRef)(!0);Ei((function(){return r.draggable.register(h.current),function(){return r.draggable.unregister(h.current)}}),[r.draggable]),Ei((function(){if(p.current)p.current=!1;else{var e=h.current;h.current=d,r.draggable.update(d,e)}}),[d,r.draggable])}function Yr(e,t,n){Gi()}function Xr(e){e.preventDefault()}var Jr=function(e,t){return e===t},Qr=function(e){var t=e.combine,n=e.destination;return n?n.droppableId:t?t.droppableId:null};function $r(e){return{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}var eo={mapped:{type:"SECONDARY",offset:Ne,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:$r(null)}};var to=V((function(){var e,t,n,i=(e=ue((function(e,t){return{x:e,y:t}})),t=ue((function(e,t,n,i,r){return{isDragging:!0,isClone:t,isDropAnimating:Boolean(r),dropAnimation:r,mode:e,draggingOver:n,combineWith:i,combineTargetFor:null}})),n=ue((function(e,n,i,r,o,a,l){return{mapped:{type:"DRAGGING",dropping:null,draggingOver:o,combineWith:a,mode:n,offset:e,dimension:i,forceShouldAnimate:l,snapshot:t(n,r,o,a,null)}}})),function(i,r){if(i.isDragging){if(i.critical.draggable.id!==r.draggableId)return null;var o=i.current.client.offset,a=i.dimensions.draggables[r.draggableId],l=Lt(i.impact),s=(u=i.impact).at&&"COMBINE"===u.at.type?u.at.combine.draggableId:null,c=i.forceShouldAnimate;return n(e(o.x,o.y),i.movementMode,a,r.isClone,l,s,c)}var u;if("DROP_ANIMATING"===i.phase){var d=i.completed;if(d.result.draggableId!==r.draggableId)return null;var h=r.isClone,p=i.dimensions.draggables[r.draggableId],f=d.result,m=f.mode,v=Qr(f),g=function(e){return e.combine?e.combine.draggableId:null}(f),y={duration:i.dropDuration,curve:xn,moveTo:i.newHomeClientOffset,opacity:g?bn.drop:null,scale:g?wn.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:p,dropping:y,draggingOver:v,combineWith:g,mode:m,forceShouldAnimate:null,snapshot:t(m,h,v,g,y)}}}return null}),r=function(){var e=ue((function(e,t){return{x:e,y:t}})),t=ue($r),n=ue((function(e,n,i){return void 0===n&&(n=null),{mapped:{type:"SECONDARY",offset:e,combineTargetFor:n,shouldAnimateDisplacement:i,snapshot:t(n)}}})),i=function(e){return e?n(Ne,e,!0):null},r=function(t,r,o,a){var l=o.displaced.visible[t],s=Boolean(a.inVirtualList&&a.effected[t]),c=Je(o),u=c&&c.draggableId===t?r:null;if(!l){if(!s)return i(u);if(o.displaced.invisible[t])return null;var d=Ie(a.displacedBy.point),h=e(d.x,d.y);return n(h,u,!0)}if(s)return i(u);var p=o.displacedBy.point,f=e(p.x,p.y);return n(f,u,l.shouldAnimate)};return function(e,t){if(e.isDragging)return e.critical.draggable.id===t.draggableId?null:r(t.draggableId,e.critical.draggable.id,e.impact,e.afterCritical);if("DROP_ANIMATING"===e.phase){var n=e.completed;return n.result.draggableId===t.draggableId?null:r(t.draggableId,n.result.draggableId,n.impact,n.afterCritical)}return null}}();return function(e,t){return i(e,t)||r(e,t)||eo}}),{dropAnimationFinished:yn},null,{context:Li,pure:!0,areStatePropsEqual:Jr})((function(e){var t=(0,i.useRef)(null),n=X((function(e){t.current=e}),[]),r=X((function(){return t.current}),[]),o=Mr(Hi),a=o.contextId,l=o.dragHandleUsageInstructionsId,s=o.registry,c=Mr(Wr),u=c.type,d=c.droppableId,h=Y((function(){return{id:e.draggableId,index:e.index,type:u,droppableId:d}}),[e.draggableId,e.index,u,d]),p=e.children,f=e.draggableId,m=e.isEnabled,v=e.shouldRespectForcePress,g=e.canDragInteractiveElements,y=e.isClone,x=e.mapped,b=e.dropAnimationFinished;Yr(),zi(),y||qr(Y((function(){return{descriptor:h,registry:s,getDraggableRef:r,canDragInteractiveElements:g,shouldRespectForcePress:v,isEnabled:m}}),[h,s,r,g,v,m]));var w=Y((function(){return m?{tabIndex:0,role:"button","aria-describedby":l,"data-rbd-drag-handle-draggable-id":f,"data-rbd-drag-handle-context-id":a,draggable:!1,onDragStart:Xr}:null}),[a,l,f,m]),C=X((function(e){"DRAGGING"===x.type&&x.dropping&&"transform"===e.propertyName&&b()}),[b,x]),k=Y((function(){var e=Ur(x),t="DRAGGING"===x.type&&x.dropping?C:null;return{innerRef:n,draggableProps:{"data-rbd-draggable-context-id":a,"data-rbd-draggable-id":f,style:e,onTransitionEnd:t},dragHandleProps:w}}),[a,w,f,x,C,n]),S=Y((function(){return{draggableId:h.id,type:h.type,source:{index:h.index,droppableId:h.droppableId}}}),[h.droppableId,h.id,h.index,h.type]);return p(k,x.snapshot,S)}));function no(e){return Mr(Wr).isUsingCloneFor!==e.draggableId||e.isClone?i.createElement(to,e):null}function io(e){var t="boolean"!=typeof e.isDragDisabled||!e.isDragDisabled,n=Boolean(e.disableInteractiveElementBlocking),r=Boolean(e.shouldRespectForcePress);return i.createElement(no,(0,o.Z)({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}var ro=function(e,t){return e===t.droppable.type},oo=function(e,t){return t.draggables[e.draggable.id]};var ao={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:function(){return document.body||ge(!1),document.body}},lo=V((function(){var e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t=(0,o.Z)({},e,{shouldAnimatePlaceholder:!1}),n=ue((function(e){return{draggableId:e.id,type:e.type,source:{index:e.index,droppableId:e.droppableId}}})),i=ue((function(i,r,o,a,l,s){var c=l.descriptor.id;if(l.descriptor.droppableId===i){var u=s?{render:s,dragging:n(l.descriptor)}:null,d={isDraggingOver:o,draggingOverWith:o?c:null,draggingFromThisWith:c,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!1,snapshot:d,useClone:u}}if(!r)return t;if(!a)return e;var h={isDraggingOver:o,draggingOverWith:c,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:l.placeholder,shouldAnimatePlaceholder:!0,snapshot:h,useClone:null}}));return function(n,r){var o=r.droppableId,a=r.type,l=!r.isDropDisabled,s=r.renderClone;if(n.isDragging){var c=n.critical;if(!ro(a,c))return t;var u=oo(c,n.dimensions),d=Lt(n.impact)===o;return i(o,l,d,d,u,s)}if("DROP_ANIMATING"===n.phase){var h=n.completed;if(!ro(a,h.critical))return t;var p=oo(h.critical,n.dimensions);return i(o,l,Qr(h.result)===o,Lt(h.impact)===o,p,s)}if("IDLE"===n.phase&&n.completed&&!n.shouldFlush){var f=n.completed;if(!ro(a,f.critical))return t;var m=Lt(f.impact)===o,v=Boolean(f.impact.at&&"COMBINE"===f.impact.at.type),g=f.critical.droppable.id===o;return m?v?e:t:g?e:t}return t}}),{updateViewportMaxScroll:function(e){return{type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}}},null,{context:Li,pure:!0,areStatePropsEqual:Jr})((function(e){var t=(0,i.useContext)(Hi);t||ge(!1);var n=t.contextId,r=t.isMovementAllowed,o=(0,i.useRef)(null),a=(0,i.useRef)(null),l=e.children,s=e.droppableId,c=e.type,u=e.mode,d=e.direction,h=e.ignoreContainerClipping,p=e.isDropDisabled,f=e.isCombineEnabled,m=e.snapshot,v=e.useClone,g=e.updateViewportMaxScroll,y=e.getContainerForClone,x=X((function(){return o.current}),[]),b=X((function(e){o.current=e}),[]),w=(X((function(){return a.current}),[]),X((function(e){a.current=e}),[]));Gi();var C=X((function(){r()&&g({maxScroll:Kn()})}),[r,g]);!function(e){var t=(0,i.useRef)(null),n=Mr(Hi),r=Wi("droppable"),o=n.registry,a=n.marshal,l=Ki(e),s=Y((function(){return{id:e.droppableId,type:e.type,mode:e.mode}}),[e.droppableId,e.mode,e.type]),c=(0,i.useRef)(s),u=Y((function(){return ue((function(e,n){t.current||ge(!1);var i={x:e,y:n};a.updateDroppableScroll(s.id,i)}))}),[s.id,a]),d=X((function(){var e=t.current;return e&&e.env.closestScrollable?Er(e.env.closestScrollable):Ne}),[]),h=X((function(){var e=d();u(e.x,e.y)}),[d,u]),p=Y((function(){return de(h)}),[h]),f=X((function(){var e=t.current,n=Lr(e);e&&n||ge(!1),e.scrollOptions.shouldPublishImmediately?h():p()}),[p,h]),m=X((function(e,i){t.current&&ge(!1);var r=l.current,o=r.getDroppableRef();o||ge(!1);var a=Zr(o),c={ref:o,descriptor:s,env:a,scrollOptions:i};t.current=c;var u=Ir({ref:o,descriptor:s,env:a,windowScroll:e,direction:r.direction,isDropDisabled:r.isDropDisabled,isCombineEnabled:r.isCombineEnabled,shouldClipSubject:!r.ignoreContainerClipping}),d=a.closestScrollable;return d&&(d.setAttribute(ji.contextId,n.contextId),d.addEventListener("scroll",f,Pr(c.scrollOptions))),u}),[n.contextId,s,f,l]),v=X((function(){var e=t.current,n=Lr(e);return e&&n||ge(!1),Er(n)}),[]),g=X((function(){var e=t.current;e||ge(!1);var n=Lr(e);t.current=null,n&&(p.cancel(),n.removeAttribute(ji.contextId),n.removeEventListener("scroll",f,Pr(e.scrollOptions)))}),[f,p]),y=X((function(e){var n=t.current;n||ge(!1);var i=Lr(n);i||ge(!1),i.scrollTop+=e.y,i.scrollLeft+=e.x}),[]),x=Y((function(){return{getDimensionAndWatchScroll:m,getScrollWhileDragging:v,dragStopped:g,scroll:y}}),[g,m,v,y]),b=Y((function(){return{uniqueId:r,descriptor:s,callbacks:x}}),[x,s,r]);Ei((function(){return c.current=b.descriptor,o.droppable.register(b),function(){t.current&&g(),o.droppable.unregister(b)}}),[x,s,g,b,a,o.droppable]),Ei((function(){t.current&&a.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)}),[e.isDropDisabled,a]),Ei((function(){t.current&&a.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)}),[e.isCombineEnabled,a])}({droppableId:s,type:c,mode:u,direction:d,isDropDisabled:p,isCombineEnabled:f,ignoreContainerClipping:h,getDroppableRef:x});var k=i.createElement(Hr,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},(function(e){var t=e.onClose,r=e.data,o=e.animate;return i.createElement(Fr,{placeholder:r,onClose:t,innerRef:w,animate:o,contextId:n,onTransitionEnd:C})})),S=Y((function(){return{innerRef:b,placeholder:k,droppableProps:{"data-rbd-droppable-id":s,"data-rbd-droppable-context-id":n}}}),[n,s,k,b]),_=v?v.dragging.draggableId:null,j=Y((function(){return{droppableId:s,type:c,isUsingCloneFor:_}}),[s,_,c]);return i.createElement(Wr.Provider,{value:j},l(S,m),function(){if(!v)return null;var e=v.dragging,t=v.render,n=i.createElement(no,{draggableId:e.draggableId,index:e.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(function(n,i){return t(n,i,e)}));return U.createPortal(n,y())}())}));lo.defaultProps=ao},38486:function(e,t){"use strict";var n=60103,i=60106,r=60107,o=60108,a=60114,l=60109,s=60110,c=60112,u=60113,d=60120,h=60115,p=60116,f=60121,m=60122,v=60117,g=60129,y=60131;if("function"==typeof Symbol&&Symbol.for){var x=Symbol.for;n=x("react.element"),i=x("react.portal"),r=x("react.fragment"),o=x("react.strict_mode"),a=x("react.profiler"),l=x("react.provider"),s=x("react.context"),c=x("react.forward_ref"),u=x("react.suspense"),d=x("react.suspense_list"),h=x("react.memo"),p=x("react.lazy"),f=x("react.block"),m=x("react.server.block"),v=x("react.fundamental"),g=x("react.debug_trace_mode"),y=x("react.legacy_hidden")}function b(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case n:switch(e=e.type){case r:case a:case o:case u:case d:return e;default:switch(e=e&&e.$$typeof){case s:case c:case p:case h:case l:return e;default:return t}}case i:return t}}}t.isContextConsumer=function(e){return b(e)===s}},53410:function(e,t,n){"use strict";e.exports=n(38486)},32637:function(e,t,n){"use strict";e.exports=n.p+"static/AssistantCode3.a8740efb.jpeg"},93314:function(e){"use strict";e.exports="data:image/png;base64,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"},73631:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAZxJREFUOBGtlL1Ow0AMgH2XUIkOLFXVASgTsDHxBIAEzAwMPBQjT8AATGVBgEBCYmHmFcICYmBogCbNYSe52HUTVZWwFJ3PP599Z+WMcy6Af5SwYkWnLYifTyBzq5XNK8YNwbbvYP381ZuaVlN1+HJwAc4d1QYaA+gDsHYANrhGHTdCMtSDMILtwSMDn7ZiANPKwyjeQ0Reo4r1gEoEwRkDb7spdPcBeocMk1Cv00oii5L+fgPwcR/zHfb3AJY2sEpUVLOUhB/l+w7I1iS9TYDFrM3AzhqGDstPZ3li2Z12U2WLvk4fGJh+F0elYN8ZrbWiA7igAP4WR6sFzDAKPgPHP0VnlMsFS5IyyIGoeAamCKybYI5UQLWVE2fgGI/s72wqQXRd9jyxiHgGJtihFxGQm8Qd5XvtF3fEQOrQH9mDm1Z9hyJuEphXIq9uSWSQqv8a4RbAUTFdcs7gifwplYGjT3wzbPFz6Q70EZv8WZoxMP66ApMc86inirNBA8njcFIuvOTXhowPyzuQJiukzi3hQgS7b+I9nJtQn/AHsLGsvlcPPWsAAAAASUVORK5CYII="},31328:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAUCAYAAACNiR0NAAAAAXNSR0IArs4c6QAAAodJREFUOBGtU0trFEEQ/qZnM5NsWBCfSEjwQdSggmAieAv4uOnFg5eIXgTvEY+ePJqToDf9AcZDFAUF8SgEQUxAjC6+QlhX4xo0G93ZnRnr697umSyKBCyY/aqqq76q6uoF/rN4lu/BmzSsLGFM7P4kAZQCiBTR64nCw/MHvRnj+fuvI7zxtDWJJD1lQulO5TPHnkAqpuAUFKZUqg8da8xI35+/cMh77AjHJ5cakh/oqHa2ZhGHpSb+STxJZA3lqesFG1CuLAdsqLfbb/dlTwQ7GdmG9VGVBuoNfT/nHGHUSnByeAN2binmmDK1gyM7aGvl6gruPvtadCOfvVlxN0PFjsF4qxMptjl7BflirsPAVxJoQjy5eUMqq6bkMgbWF7C4HGMlsnRmZE82xtEdYSwGnRTuhCvVqG3T8bGhHpweKaFWj3HpzqI7Z16SmHxHmKbcVE7yBs+k1uBm8wh6Q4VQJvrZMkEp98EGBB2h3pFUMWJmPLKniKGtXZhZiLC/L8CLhQbmqhHefmmi3pRYOwInY65gRiiM+ZEP9Ic4c7ik+Ye3dePK/W94/bmpbVNO4u2S2rmrOmRvtkEmlHraC9EUgEzo/optVwZM4IiCLivR1WhywwrT75p4WYlkqhTT7xs4vreIke2h3KWHTaUClC/ZnsR3fOTWMnarZi/QulYhr2l0MMDorhA7NhbwodbC5Xs/9FT5d+s6lJJSzHxWJ9ov9Xw8KceYX9LrQ9+6LF6pgs4luqVIIl+G69gp0id1tk+8/byJ77+AV9UEiRTJMnQMOYycuPZpNuhS+7TF+fgkiBSr55+J9eXOm1E86wjpPzrx8aI8hd3U1yryrOcejQ9cXWveP+N/A79g8eaXNDk4AAAAAElFTkSuQmCC"},96908:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAKQAAAA8CAYAAADogBFvAAAAAXNSR0IArs4c6QAADzxJREFUeF7tnQl4VcUVx3/3JSEBARFEFllcQAMJuKDUD7FqtVbFtUqtS6ufS1soxaW1Si0KBaFVWy2ittqqdQ9xpYq4tLgVFWUThYQlJIEkkJXs63u333lzL+/mrfeF9/KSeM/35Xv3zZw5c+bM/83MOTN3ouGQY4EuZAGtC+niqOJYAAeQDgi6lAU0fUayHqCR5gJXEriS/T6TICkZNOMzIN/gFx7/8vvLiFxDtpfP4G2Xb5Ej6SaPKddav6mPtb5g9e/PF9nSvmTVlpD1S36Sr63WOj1ukD/d+PR+b1NpAekmj5Gve8Dd5lc2ivK4G2lzV4K7Eo/8eSrQ3ZW424rw6J/ST1utTb2jtkuhLAplwgDS7BDj09txdgFqgsjCbwVOKMCYAPH+IAzABIDf8qPYz+OygMus0+8HFQDmYDpaypj1mp+m/qKbgMoKQO+zxwIyCzhNPhOIQQFrAas/uK3l5dlt/SEY9bbn0ZsrS1obynfXNJQXFTeUbPugua5utQZrM7PZHgU2EsIaHJAJUcWp1JYFklKgVx/fX0oqpPSBgw6BASOh/xAlxgC+u6WJqh0bqdi2nrb66gI0sjQXL2W8xHpb9XUykwPITjZ43KuTpcnBw2HA4TBwFBw81Dt66+42aoq2U7FjAw0Ve8R52KxpLB6v86KWjTvuetmswAGkTUN1W7aDBsHIieiHjkVDlhpuavbkU7ThE9wtjQLMbTosyFzGc5pGoD/RyQ13ANnJBk9YdSm9YVg6+tB0NC2ZtqZ6dn/1P+rKirwqaRqrknVuSM9mZ8J0FD2CetmJ1MipO74WkPXn0VOg72CvY1ZRuJU9uRvQPW4ZLes0jdszlvG3+CoRWroDyERZPtH1Dk1HH56B5vHQWFvJzrUf42lrUaMlPJ4BMxOxtnQAmWhgJLL+3gPQR5+E1qsPDdXl5G9YjUdipIreGpzGFUOfpb4zVXQA2ZnW7op1paSiH30qWlIqdVWlFGz6Al1ipmqkXH0wnD0ym8bOUt0BZGdZuivXk9IH/ajJaK4Uasr3UJizUQX/Fb2WOZ7LtfniosefHEDG38bdo4bUvuijJqG5XFQU5VOSv22/3hr8NTObWzqjIQ4gO8PK3aWO3v3RR57gHR13blpHQ121FZTTM7N5Od5NcQAZbwt3N/mDjvDu8jQ11rHj6/XoskevqKxXMuOPfZHyeDbJAWQ8rdsdZct2zYjj0VJS2bu7gLLiXdZRMiszmx/Hs1kOIONp3e4qO60/+rBx6O5WdmzeRHOTz8lO0pg2fhkr4tU0B5Dxsmx3lytTd99B1FZVUZC31dqanMzxTNDmsz9gGcumOoCMpTV7kixXEvrwCV4HZ1vuZlqamqytu2VCNn+NR3MdQMbDqj1Epj5wBFqfgVSU7qWkWB3CENKgEhibme39jCklBpCysf/H3aohrY1w64CYNqrLCJOziRJg1hN+qqtjJklJQx88xrudmJuzBY+cVveBcmlmNr/qmODQpRIHyPuKlVYtjXBL/1i3K7HyDh4Gp94IU2+Ee0+A+pgPJJ3WPn3QEWgpvSkpKaaiosJabxsuJk7IYksslXEAGUtrmrIW5sHAkerb7UO6NSBJ6wcDhnvXkFu354HlDK8GKzOzOS+WJnQAGUtrmrIW5atXCHoCIDXwDDwSlyuJvIICGhran7OIdRjIAaQDyIgW0PsNRkvtR2l5OaXlAcuPmIaBuh4gp1wP/QYrI338ODRUBRpM0+Cc36p0OVT6nwd9PIcdAydcqr7nroL8NXDi5TBmKoyepPgL16n0dS+3dzgGjoaTjY0If7n+Wow+GdK/p1Jr9sC+Ihg1SX0X3Xob6+K3F0FLg0r/egUUbWovSRy8SdNh5PEw4jho2Ae71sOuDbDhVaWvP1nbWLIZvvo3TLwQvjtDvdQlaf+eB2Uxeuu1V2/oP4yGhnryCn3etqmWS+PmjGUsiYhsGwxdD5C/WwsjJirV7xkX3KjyPvZSY+poqoXbBvqaetzF8HPjDMAbc2HIWDjlp8FNsfldePIaH+iTU2FxIRxkyHvgu5D3afCyM5dDprF8emuBN4jM6TPDm/zZG+HTf/l4xpwG1z/nXaMFpYIv4fHpUGVEJEwmaxu/eBFyP4Br/t5exMPnwZb3bUDADouGPmiU9+3FnLxC3BZvW0rHMgzUswEpI5O8Q9LaDAVroHgzDE2H0SdB6kGqJyryYdFJ0GicbLnsfjjLOGn1yT/ghRmBPSajmgBXLg+Qwwd3j4WzboXTDV4J95jkPZxghH2e+xl89ozKEVDdlKVu8RAq/lqNikm91Eg++GiVXlsGD52tRr1ggCz+BgaPAXk/20oxBSTo/YagJfdiV8lequuMEd9SnwYxCQP1bECKwerK4ZELQUYbk2RbbNZbMOQYlbJyMSy/Wz3LdDjvG/XcWAN3Hg6t7XYp4IxZ8CNjmSCj7NJp7cEQyamRH8m8zT7H54WZ8MkTPhlyO4ZM+xcvUGkb3oDHLw8OSDP1m3fgw0ehtlSBWUb2ysL2eh3It7T+iMddVV1LUVnQMFZMwkA9H5CPXQqb3gzsChlVBBSyHm2uh7ljFHiFbn4Pjj1DPT/1U5Bp0Uq/XQ1HnKxSnrgC1r8aHSAvnAfn3aXKfPYsPHN9cKiYywIJrC+a5Ft/WqfsSDIOBITWsnJjRr/DaG1pIbewJKjUWISBejYgZTqeOzZ0l9zyPhxzusp/7BLY9JZ6FifjhhfUc85/YckPfDKsI6iMRnNGq3t+rBRphJyzBuQgrNBD34etHwTXcfLVcN3TKu/d++H136lnKyDlx3TXkcGdv1iB0ZTT7zDv0/aiMppaWoNKP9AwUM8G5Fdvwt8MjzuY+ab/Bc40dr+yfw2rDEdRRgMBlXSArAFl9KwyzgVaR7f3HoDX5gRKjgTIh6rV2lZow+uBSwJTojhX489R32QUltHYH5A7P4P7T4s19ILLk2k7JY3SqhpK99WFqvOAwkA9G5Af/R1emhW6s865HS5ZpPJXLYXsW328Fy+EH9yhvi+/B1YafH/YCoceqdLnZUBpu6NZKj0cICVgLvnRkoSCFk8OBOSXy+DJq6OV1jH+5F6Q1p/G5mZ2lAQJxxlSDyQMFHtATpgGR56iVNvyHmz7KLDxstcrXqpQUx3cdoiPJ5ZhnzUvwNPXhjb+tLth2lyV/86f4I3f+3jF8Zmfq+6SLNsB96TDUVPgNx8qHmnXg2cFlx0OkDIyPrhPrV2FJNbqe8MvtK4S3go2Zcv6Vta5nUGicp9B3vuBcooraXMHfxHxQMJAsQfkRQvg3DuVeazeq9Vgo06EOz9XKXu3wvwMX651fbXgeCgxPF5reQlgLzSCvuHikOJpSiwxFF3zBEy5TuU+exN8aqzXTP5fvgkZxvrxz2fC5CvhtJ+p3KevgzXPRw9IKWHd6w41yoYDmH8csrMAKTql9vWGqoqr6qisaw6pZUfDQLEH5Hd+Atc+qRRdmw3/vCpQaStPzn9gybk+nl+8BhMvUN+XXgCb3wksf+1T8J1rVHo4QMoux7xxwcMfElwXUJt7zg+cDnmr29clux+/MDxoGW0zzlVBc9lNmTMy9Nov0hpy1goY/31Vl3/Ix6rB8ZfACT9UKRJe+vw59ZxIQMq0nZJGbUMzBRVhL7XoUBgo9oCUoPMdxu6GBKQXTIByy4VaKWnwm4/VVpnQf5fAy7/2dcP0B+FMY90XbMo9fCLM+UJNpZEAKflfZqndGH8SZ0acGiEJSC82wjhWPokH3pvnA62ZJ/G+rJsDZZop1nWmePni7VvpuIvg56+oFNlynJ8JzX5OgswCd63zbUH+5Xuw/ePEA1KWGvIOt9vNlr21eDyhz3p2JAwUe0CKyWavhHRjfVVXoUAni38x8ik/geHGFC33yMgIZu2wcWfDr972dZ/slnz+PNTuhaNPhUvuVd6vSeFGSPGQBbjrXoH3/gxl22BIOpz0I593LXIevQi+ttRpBc/5c+ECI2hupt8rMcGvQgPSGk6SsFHO+2rPXLxyk2a8DrLeFirdrtaHEryXy0ZlmTD5Kt9uzTcrVXDfpESOkKKD7G3rOruqmqhuCv9qjcvF+RlZhDBuoAnjA0iJ1ckoaR4wCNV1794HrxsBYivPze/CsWcGLyUgWz5XAVMoHCAFiEInXhZcloBkxQKQvehQJFP6wh2+Lb78L+C+KaH5JUeWE7Ks8KdZaeqqZaFDRsCMN3z79qEk7t4IMjo21XQdQLpSvP8QoKaxlcJ9odeRorCmsSVjHBPtvhQWH0CKJtKRVz3mO4BgNXhFgQrHyC8/GMmhUNlTPvWG9rnVJarcphX2DleIByrOxxVL1Mhsxv5EqkyVWbNh4/Lw4JLc2e/4TvbI3raM2pFo6k1wxkwYPNa3z2wFpJSXeOf5v1d751bdJE/WqfJDkeWBf+A90SOkTNtJvdA9bWwpa8ET4RWNaMJA8QOk2WF9DlEHGmS6FhDszVX7rXao76EwdJy6yF2OjJXLieUIFKqzpPMlHCWjdsFadWTMDglQFhVAnwFqi/HOEYHrPTtywvFIBx96FAzPVODbk6PW3XbCQQdad0fLiz11D7urW9nXHP4eqmjCQPEHZEcb3NFysR49JMxz5SNKm9VPgZzYcQjE4ZOzKy1u8qtt3Jmv8fCEZcyOZDoHkJEsNHcjDBuvuO6bCvlG/DRSuW9Dvly74tHZUumOOG3LUWo7L4U5gAwHHHGsxMESkvOKC40DEd8GsEXRxqI6D1VNka+P1ODtzGzOD7t66XGX3sdyypaguATHhbJvg1UPR9FN3x7WxjbYsc/ezSqRwkA9b4QclqE8aiEJeH/5UseQITs5F81X/+tQSPa6g73f0zHpPaqUhMa3VrppDRMkNxscKQzU8wDZo7q6+zSmtFGntN6GcwOECwM5gOw+fd6lNW31QG6lADLytTHhwkAOILt0N3cv5XZWe6gXZNqhEGEgB5B2jOfw2LLAvmad3bX2pu1QYSAHkLZM7TDZsYD4NDn2YpJeccHCQA4g7Vja4bFtgeJ6D5WNNqdtcXD8TgM5gLRtaofRjgWa3LC9yl5M0jtK+p0GcgBpx8oOT1QWyKt209Aa2ds2hbpczM7Iwrvr4AAyKlM7zHYsEKVz0+5uIAeQdizs8Ni2gIyL8icxSbeNnZv9go0wkANI26Z2GKOxwJ56D+VRODdmGMgBZDRWdnhtW6C6WWeX/Zjk/jDQ/wHkSLPJ/mcrgQAAAABJRU5ErkJggg=="},57177:function(e){"use strict";e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAANQAAAA8CAYAAAAeyZT3AAAAAXNSR0IArs4c6QAAEpJJREFUeF7tXQeYFdUV/mcbS1F6UUEsoLC7IGKNJWpERbEgSoxGo7HEQFDRWCAGgdASNBbEhglqsC1rAxVBNGg0qNgLsJRddmFhe3vby3uT7393ZmfeezOv7M57W3LP9/EtM3Pn3DPn3n/uvf85c58CKdID0gOOeUBxTJNUJD0gPQAJKNkJpAcc9EALoNRpCaqt3rh4QIkDvH/jxV/zuZZjrVy8uRzvSzDdrx3HxWnnEnz1eevhOf/79HpNdrAs6wrQr9VvtiMc+/kc0HSan9Nrq8Uzt9hquuZjv8kPev26r8x16X5VPYDHDYT7Vy/L8vo94d7P8u5mcV+w+1U34GEZ7a+5Tg/vV31tbrmu36ff23JcB9VdBo9a5v2rekq14/1wN30GNXGzctPKKgf7eExVKUGBpJsSEkgWYPMHXEuH0sHlB5iW8jrAtE6sd9AW8GidVD9mR/fvxDrAzJ3Yp/ObAGL3srC1XweJnf0awHUQWgGJ52i3P+D9OyOP/QHSAjYT8Lwd3gRGH3Bp5dza34D7LUDsD04vmPzuN9cZGkSAF3xm4JttNoFWdasNlRVNta4SV21l6YHakvyPGurrNivA12kZ2B1TdLSisvAA1QrF8hbpAUsP8EWVkAwkdgMSugHxiUB8EpDcC+g1AOjeG+BciSBWPXA3NaA8Pxel+7LRXF+bCwXpShxeTX0V33ZED0tAdcRW+X+2iaN3j35Ar/7iX/e+XnCpbg9cZfkozctBrauci/9tioIlKSpeUTLg7iguk4DqKC0h7bD2QPJBQP/hUHsNhsIVv+qBq7QI+7O2w93USGDtUoEFaavxoqJ4x7Z2FQmodnW/rDxsD3Ba2PcwqL0PhaLEobmxAXnZmaiuKPOqUBRsSlBx06gM7AlbZxQKSkBFwalSZRQ9kJAEDD4GSD7Yyz6WFu5HQV4uVI+Ho1W1ouCe1NV4OooWBFUtAdVenpf1ts0DfQ6F2mcoOMurq6nCnp2Z8DAMwNEKWJEKTG+PtZUEVNuaVd7dnh5I6gF1wFFQEpJQW+1CTtYueBgeEPLuwGRcNWQVamJpogRULL0t63LeA/GJUAeNhBKXgOpqF3Kzs6Ey3iVGqs29gQnDMlDnfMXWGiWgYuVpWU/0PBCfBHXQ0VCUeLgqK7B3b67I4BDyZloKrlTmQ6AsyiIBFWUHS/Ux8kBCMtT+w70MYGlJMfILCloqVoDH0jIwMxaWSEDFwsuyjth4IKk71D7DGKzCnj05qK0zZnoKMDUtA69F2xAJqGh7WOqPrQeYvtSjL+rr65C1JxeqMfUrTkpAyrGvoCSaBklARdO7UnfsPaAAat/DocTFo7C4FMWlIvBLUYD0tAz8KppGSUBF07tSd/t4ILE71N5DoHrcyMrJQ0NjY4sd8QompazGumgZJgEVLc9Kve3rgZ79gW49UVVdg9wDhWZbMtNSMEaZDxEFdlgkoBx2qFTXQTygxHnz/gAPdu3NR2Njk9mwmWMy8Fg0LJWAioZXpU7DA/0OB479hTguyQZ2/Sdm3lF79IWS2B2llVXILylvqVcBuLAamZbh/euotA+geg0E/ponHqSpDrizj6MP1WGU8WM671eq7fhVweTFwIQ/Cpe8PRfY8NfYuue4y4BbNbb6y1eA534Tu/rjEqEeNAAejxs7cgvg4VfGmijA8rQM3Oa0Me0HqKUHxLM01gEzD3b6udpXX+9DgNNvBs64GVh0PFDj+Isw/Oe7fAlw3t2i/NoHgPVLwr/XiZLtCShGpHr29zJ++aWVKHX5pPU1Iw5jx6RjuxOP2QLUsPaUcLJG6uII1ZUBtTAb6McAI4B7BktAtdcIRf/zM/vkg9HY3IydeQxBGbMFBVifloELnezecoRy0pu6rsU5QJ/DJKDogXYeoWiCp2c/7mWF7MJy1Nb7kBNwmkaXgJKAioYHDJ0dAFBqt55Q4ruhyFWDooqArzkcpdE7HqBOuxE4aKBokE9WALUGO9PSStxc4Px7xWFzI/DhI0YDDjoGOP5ycbxjE5CzBRh/JTDiDGD4CaL83m/E+W9e8yUM+g0HTtIC6f56/bvd8JOAURp75SoAKvYDh58gStG27tq68L3FQGOtOP/TOmD/j76aOP09YSowbBww9DigtgLY9y2w7zvguzeEvf5ifsb8bcAPbwNjLwF+Pg3oPQTgubfnAcW7ASfXUAOOBH52PTB0nKiHn6UXZwFFu4DPVwEFFssRK0BRz7gpwn/0U+7XQM6XwFfpYrsxpyUhEUjqhdqGJmQXVgRoj1NwR+pqLHOi2o4HqD99DQwdK55t7mjRKfyF++4t1xIf66uAu/oZJcwNuGYOMHgkcKoNs7TtfWDltQZoOd9eshfoqel76OdA9mfWfp6+FkjTpt/vLhA79Jw1PXibrLoZ+OwFo8yIM4EbXwT6MF5iIblfASumAuUaI6oX8e+kOz4Crn3GV8HjFwLbP3AOUJfMBybO9m7eYCnuJmDjQ4L4MIu/rR8+Bty2zvCxuezuT4AVVwHVxU70bR8dao8+XsY1c38F3Ca2j4WcpNG7NqA4MiT1AJoagNwtwIFtwJBRwPATvVF0r5TmAItPBOoqxfEVDwLnapn+n/4DeHlaYONyVCHw4hPErqoPjATOvRM4Syvr3RVWE2/jaQvhF38HfP4vcYEd7ZZ0sWsu5cBPYlTiW58j6cCjxfmqYuDRCWLU0cXcSQ9sBQaOEPvcmcVJQF08F7joz4b2sr3iRcOX2eHjxT9dVl4HfPWqta0cnRmX4r58WZ8CRbsD24Mvj8UnOE7kqN16eT/t2FdWjcrawFHfKRq9awOKzVpdAjxxCcC3vS79jwBmvCs2+6CQStbfrJxOzdsqzte5gFmHAU31vp317BnAL7VpJke55ZN8r4ciJQjyedsM4uLl6cCnzxo6uDcdp42XLRDnvlsDrLjSupPqZ7duAD5+EqgqEmBkh2fHb+uUjy+eJXliI0rK6/f6TrF5ji+TK5aK65wCzh1lbyvb48nJQM4XRpkBRwHT3gIOGS3Obfw78OYsX5+29YgvnLgklNc0YH+FNgX31ekIjd71AfXU5cCP7wQ2B9/q7NScwjTUAHNGCPBR7tgIHHu2+D8DkQxImuXezcARJ4kzz14FfPuG7/VQgLpkHnDh/eIerj3+daN1d9GnlQwM862tr7/MI1QoHW0FFNdLE+8ToQ6uFTlFtpJFe4C+Q8WVmb2NdaO/rS/cCHyxyro95m4Ve9ozNsn24MvBKeHW10nd0dTsxo5C663TnaDRuzagOJ2bM9K+SWZ+ABxzlrj+1GTgx3fF/0kS3PSy+H/mv4FlFxg6zCMYG3z28MCFdChAzd4CDDte6Hz0PGDnR9Y2nvxr4IbnxbX3HwTe+pP4v7mT8mVw/5HW5A3LthVQ4XboO94Hjj1HlF403hr8ZfsEULQ9HwJUz1gHpJwnTj89RZAtTgpHW9WD3cU1qG+y/iK+rTR61wbUD+8AT2uMn1XDTH0YOEfLPsn4I7BJI3q43zZBcdAgsUZiJyjfJzSYRxcuwt+cHag5FKAerRRrO8p3bwVOKXWNJEdSzhdHHAU5GvoDas/nwINn2nc7JwHF2NrxUwCydP2PFEQMiRzulcdjfV1Ke2iXv61b14vpt52Y169v3Ad88LCTcBJ2KvEoqmpAUbUFeypqaxON3rUB9Z9ngFdn2DfK+fcAzHWjbFoOZNxplL1sIXDBfeJ47VxgvVbuLztFh6LMSwWKdgbqDwYodkpej1RIpS85ObCTfrUaWPnr6AKKDNlVy4DxUwURE0rsABWqPZhzOEXLNfz4KSD99lA1RXbd+1NCiahrdCOrzH4jpLbQ6M4Daswk4MhTxYNu32idXcxcN7JklPpq4K6+hmOcpM23vAw8f7290yc9AEyaI65v+BuwxsRkkbiYv0PM6fWF9lGnAXd/LMoza/qRc611BwMUR6ZHKgz6mbE2uymQWTsZNaspX6iE07aOUInJwO0bgKNPM9qL8bHCXUBVoRhdmxuAibOMaawdoL54EXjht/btYR791y0E3pkfGWBClSbjH0c21IPM4no0e6yTlttCozsPqEsXCOdSzOyZ+WFJs87SWJ7CncD8VOOqeX2xYByQrzFu5vsZgF2oxaeCxaHIdDGWZCfXPgucdoO4uuoW4DNtvaKX/8M7QKq2fvr7OcDJVwNn/k5cff4GYMtLkQOKd5hz/exGuWCdI5Lsg7YCimzj5EXCmrzvBYXP4LO/zPrcCGzbASrYS4j6rvuHCBxT7MiLUKAJdZ3Teag44GpCWZ39j3a0lkZ3HlCnXAdcv1I81tcZwD+vCXxEc5nMD4FlE40yv38TGHuxOF5+MbBtQ+D91z8HnKKxTcEAxSyDeaMFfewvDA4TlHrO3UNnAdmbfUsx++D3GoPH0S51oghIskPNHma/9gm1hjIvvv0pc7MF4yaLNQuF9Dzf8JRYAop0NmcdlGeuBL5fE+hL/qbT0gJjOmgHKLbHn48CXD5f0Ap9bA/67eDB4njp6SKbxWnRfjmzqr4ZuZVBszJaRaM7DygGTe/TsgsYUF0wBigx/SACpxB3fyJSbSj/Xga8pn2vw+OpjwDnaOseqynbYWOB2V+KqRglGKB4neksVlQvyQiSEhQGVJdoNLi5ARkPWpRtgE6/xnhP+h32TW1eZ5FlJNtoluMuBW59XZxhytL8NKCh2rcMR+H7vzFSmB7+BcBMAkosAWWegvPlyJekv5hBx2t2gOK1/64EXro1UMeEu4ApfxPnmYa0VJti2nu59Vfi4r27y24vaYYnyLdqraHRnQcUH/P29cAobX1RXSpAw8U7O8mp1wGHalM8bu7OEcTc4UZPAG57z3AWsxW+eEnM148+XUw/yL7pEgxQZOgIvG9eF8HC4l3A4FHAib802D3qefJS4CdTneamumgOcLFfOs0ixoR+sG9QMx1P2j3zA5EzSFZQF3MnZMYA10cMPvOzbU4zT77GyJbwZ8daCyjq58sjHPlhrfDJb1aKNqMU7gBemgZk/VdkeHCtfPliY82s6w0GKJYhkULSgdN5Zq4wTKGzrbzOGQtnLtES9gmPB/uqPKhsCL6hbFwcLkpNh03nCDQwOoBirIajlJ4gaueY95cCb2kBTnMZc0zD/16CZO0cY14fDFAEEmX8FdYWsJOvWwAwF89OOCVcmGWkCIXz9uR0lNNSf5mRLH6rlsIg6LQ1Rt6iXf1ct3B0qncZJVoLqEg6qM5sWrUlM0hIruiM386PBdj09aUdoLZtFOSGTq8HtK1bZKywX0RVvL/cBlejir2u4D9+qCjYnjoaY8Pd1CU6gKIz2BGvecpIIDU7qDRX0Nl881oJf7WOMYnTb/K9Wpkv7vtxXXjJsWTASB6Q8uVbVo/9UCunWqRlv18buunIcumZ5czt46gZSs64BTh7OjBwpJFnZwYU7+cCmTlyzB0028ZrXKcR6Jxe+mdgxxJQtOWIU4CrHzdYPP3Z2Y7fvi5GV+b7MXmWYgcopi0xiM2g+aARvh7kfhP0LUf0GAk5vu2l7qDTPpoSCY0ePUDpTunRVwzrnO6xE/NNFm5KCXcBHTJaLFT5yQWdHkrsOhs7L6co+ucCTKMJR9jRF+cCjMUwK2HW0MD1Tjh6gpVh+hPz2Q5NE+ApyBTrznDo9LbWHe79tHFIigACaXJOH/VUrXB1mMuxTbne1j+nqSltjZY235NX5UFFiGlfJDR69AHV5keOUEEkb+9wVHMac/UTouTm5wBmjEvpMh6oblKRUxnGb14reHzMaoSMNEtAheoac74HDkkRpZae4ZslHepeeb3De4DL6O1load9/JQ1nE1dJKCCNTmTPUmQUPi90kItobXDdxNpYCQe2F/tQXl96J+PUoD30jJwUdDZe7vsehTJ00Za1skpH4O6DO5SMu4CNj0eqTWyfCfwQF0zkFUR3qf3oWj0rjdCHZJqxE0YczF/PRpJ4zJyf+l8b3ayV5jrZ7W/RSQ6ZdkO6QGyfTvL3Giyye0zGx2KRu96gOqQTSaN6ugeKKpTUVQTBjkRgkaXgOroLS3ti4kH+L3hjjICKvS22cFodAmomDSXrKQzeGBPpQc1Nl/yBthvQ6NLQHWGlpY2xsQDFQ0q8qrCm/bZ0egSUDFpKllJZ/AAOYnM8GJS3sexotEloDpDS0sbY+aBAzUelNWFjknpBvnT6BJQMWsqWVFn8EC9G9hdHl5MyjtK+WWjS0B1hlaWNsbUA9mVbtQ2hWb7TKPU7anp8Eb9JaBi2lSyss7ggQjJCZ+90SWgOkMLSxtj5gGOS/zHmJQ7jMyJFsM0Gl0CKmZNJSvqTB4oqPGgJAJyQqfRJaA6UytLW2PmgcoGFfvCj0m10Oj/A9jGm+feuyEMAAAAAElFTkSuQmCC"},81378:function(e){"use strict";e.exports="data:image/png;base64,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"},69168:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(18773);function r(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,(0,i.Z)(e,t)}},16722:function(e,t,n){"use strict";n.d(t,{Z:function(){return c}});const i=e=>"object"==typeof e&&null!=e&&1===e.nodeType,r=(e,t)=>(!t||"hidden"!==e)&&"visible"!==e&&"clip"!==e,o=(e,t)=>{if(e.clientHeight<e.scrollHeight||e.clientWidth<e.scrollWidth){const n=getComputedStyle(e,null);return r(n.overflowY,t)||r(n.overflowX,t)||(e=>{const t=(e=>{if(!e.ownerDocument||!e.ownerDocument.defaultView)return null;try{return e.ownerDocument.defaultView.frameElement}catch(e){return null}})(e);return!!t&&(t.clientHeight<e.scrollHeight||t.clientWidth<e.scrollWidth)})(e)}return!1},a=(e,t,n,i,r,o,a,l)=>o<e&&a>t||o>e&&a<t?0:o<=e&&l<=n||a>=t&&l>=n?o-e-i:a>t&&l<n||o<e&&l>n?a-t+r:0,l=e=>{const t=e.parentElement;return null==t?e.getRootNode().host||null:t},s=(e,t)=>{var n,r,s,c;if("undefined"==typeof document)return[];const{scrollMode:u,block:d,inline:h,boundary:p,skipOverflowHiddenElements:f}=t,m="function"==typeof p?p:e=>e!==p;if(!i(e))throw new TypeError("Invalid target");const v=document.scrollingElement||document.documentElement,g=[];let y=e;for(;i(y)&&m(y);){if(y=l(y),y===v){g.push(y);break}null!=y&&y===document.body&&o(y)&&!o(document.documentElement)||null!=y&&o(y,f)&&g.push(y)}const x=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,b=null!=(c=null==(s=window.visualViewport)?void 0:s.height)?c:innerHeight,{scrollX:w,scrollY:C}=window,{height:k,width:S,top:_,right:j,bottom:N,left:E}=e.getBoundingClientRect(),{top:A,right:Z,bottom:I,left:D}=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);let T="start"===d||"nearest"===d?_-A:"end"===d?N+I:_+k/2-A+I,P="center"===h?E+S/2-D+Z:"end"===h?j+Z:E-D;const M=[];for(let e=0;e<g.length;e++){const t=g[e],{height:n,width:i,top:r,right:l,bottom:s,left:c}=t.getBoundingClientRect();if("if-needed"===u&&_>=0&&E>=0&&N<=b&&j<=x&&(t===v&&!o(t)||_>=r&&N<=s&&E>=c&&j<=l))return M;const p=getComputedStyle(t),f=parseInt(p.borderLeftWidth,10),m=parseInt(p.borderTopWidth,10),y=parseInt(p.borderRightWidth,10),A=parseInt(p.borderBottomWidth,10);let Z=0,I=0;const D="offsetWidth"in t?t.offsetWidth-t.clientWidth-f-y:0,L="offsetHeight"in t?t.offsetHeight-t.clientHeight-m-A:0,B="offsetWidth"in t?0===t.offsetWidth?0:i/t.offsetWidth:0,R="offsetHeight"in t?0===t.offsetHeight?0:n/t.offsetHeight:0;if(v===t)Z="start"===d?T:"end"===d?T-b:"nearest"===d?a(C,C+b,b,m,A,C+T,C+T+k,k):T-b/2,I="start"===h?P:"center"===h?P-x/2:"end"===h?P-x:a(w,w+x,x,f,y,w+P,w+P+S,S),Z=Math.max(0,Z+C),I=Math.max(0,I+w);else{Z="start"===d?T-r-m:"end"===d?T-s+A+L:"nearest"===d?a(r,s,n,m,A+L,T,T+k,k):T-(r+n/2)+L/2,I="start"===h?P-c-f:"center"===h?P-(c+i/2)+D/2:"end"===h?P-l+y+D:a(c,l,i,f,y+D,P,P+S,S);const{scrollLeft:e,scrollTop:o}=t;Z=0===R?0:Math.max(0,Math.min(o+Z/R,t.scrollHeight-n/R+L)),I=0===B?0:Math.max(0,Math.min(e+I/B,t.scrollWidth-i/B+D)),T+=o-Z,P+=e-I}M.push({el:t,top:Z,left:I})}return M};function c(e,t){if(!e.isConnected||!(e=>{let t=e;for(;t&&t.parentNode;){if(t.parentNode===document)return!0;t=t.parentNode instanceof ShadowRoot?t.parentNode.host:t.parentNode}return!1})(e))return;const n=(e=>{const t=window.getComputedStyle(e);return{top:parseFloat(t.scrollMarginTop)||0,right:parseFloat(t.scrollMarginRight)||0,bottom:parseFloat(t.scrollMarginBottom)||0,left:parseFloat(t.scrollMarginLeft)||0}})(e);if((e=>"object"==typeof e&&"function"==typeof e.behavior)(t))return t.behavior(s(e,t));const i="boolean"==typeof t||null==t?void 0:t.behavior;for(const{el:r,top:o,left:a}of s(e,(e=>!1===e?{block:"end",inline:"nearest"}:(e=>e===Object(e)&&0!==Object.keys(e).length)(e)?e:{block:"start",inline:"nearest"})(t))){const e=o-n.top+n.bottom,t=a-n.left+n.right;r.scroll({top:e,left:t,behavior:i})}}}}]);