|
|
(self.webpackChunk=self.webpackChunk||[]).push([[3317,26358,92914],{92629: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",l={},n=null,a=!1,i=!1,o=null,r=!1,s=null,u=null,c=0;c<arguments.length;c++){var d=arguments[c];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:o=d;break;case"object":void 0!==d.is3D?n=d:l=d;break;case"boolean":a=d,i=!0}}null===n&&(n={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},void 0===l.material_id||i||(a=!0)),null!==o&&void 0===l.id&&(l.id=o);var v="",p=!1,f=null,h=null,b=null,m=!1,g=null,w=null,y=null;void 0!==l.height&&(l.height=Math.round(l.height)),void 0!==l.width&&(l.width=Math.round(l.width));var x=function(e){return parseFloat(e)>4?parseFloat(e):5};function _(){try{return window.self!==window.top}catch(e){return!0}}function k(){return(!l.hasOwnProperty("screenshotGenerator")||!l.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,t){u=e,F(e,t)},e.setJavaCodebase=e.setJavaCodebaseVersion=e.isCompiledInstalled=e.setPreCompiledScriptPath=e.setPreCompiledResourcePath=function(){},e.setHTML5CodebaseVersion=function(e,t){var l=parseFloat(e);NaN!==l&&l<5?console.log("The GeoGebra HTML5 codebase version "+l+" is deprecated. Using version latest instead."):(s=e,O(e,t))},e.getHTML5CodebaseVersion=function(){return h},e.getParameters=function(){return l},e.setFontsCSSURL=function(e){y=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 n,a="auto",i=l.id,o=!1,s=0;s<arguments.length;s++){var u=arguments[s];"string"==typeof u?(u=u.toLowerCase()).match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?a=u:i=arguments[s]:"boolean"==typeof u?o=u:u instanceof HTMLElement&&(n=u)}function c(){if(r){a=A(a);var s=n||document.getElementById(i);if(s)if(e.removeExistingApplet(s,!1),void 0===l.width&&s.clientWidth&&(l.width=s.clientWidth),void 0===l.height&&s.clientHeight&&(l.height=s.clientHeight),l.width&&l.height||"html5"!==a||(delete l.width,delete l.height),f=a,"screenshot"===a)L(s,l);else{var u=!1;l.hasOwnProperty("playButton")&&l.playButton||l.hasOwnProperty("clickToLoad")&&l.clickToLoad?u=!0:l.hasOwnProperty("playButtonAutoDecide")&&l.playButtonAutoDecide&&(u=(!_()||t())&&k()),u?(f="screenshot",P(s,l,o,a)):j(s,l,o)}else console.log("possibly bug on ajax loading? ")}else setTimeout(c,200)}c()},e.getViews=function(){return n},e.isJavaInstalled=function(){return!1};var S=function(t){var a=function(){l.onError&&l.onError(),Z("Error: Fetching material (id "+l.material_id+") failed.",l)},i=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",o="/materials/"+l.material_id+"?scope=basic";T("https://"+i+"/api/proxy.php?path="+encodeURIComponent(o),(function(i){var o=JSON.parse(i),r=o.elements?o.elements.filter((function(e){return"G"==e.type||"E"==e.type}))[0]:o;if(r&&r.url){l.fileName=r.url,B(r.settings||{}),n.is3D=!0;var s="https://www.geogebra.org/images/";e.setPreviewImage(g||r.previewUrl,s+"GeoGebra_loading.png",s+"applet_play.png"),t()}else a()}),a)};function B(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===l[t]&&void 0!==e[t]&&(l[t]=e[t])})),void 0===l.showToolBarHelp&&(l.showToolBarHelp=l.showToolBar)}function T(e,t,l){var n=new XMLHttpRequest;n.open("GET",e),n.onload=function(){t(n.responseText)},n.onerror=l,n.send()}e.isHTML5Installed=function(){return!0},e.getLoadedAppletType=function(){return f},e.setPreviewImage=function(e,t,l){g=e,w=t,l},e.removeExistingApplet=function(e,t){var n;"string"==typeof e&&(e=document.getElementById(e)),f=null;var a=null;for(n=0;n<e.childNodes.length;n++){var i=e.childNodes[n],o=i.className;"applet_screenshot"===o?t?(i.style.display="block",f="screenshot"):i.style.display="none":"applet_scaler prerender"!==o&&(e.removeChild(i),a=o&&-1!=o.indexOf("appletParameters")?i.id:null,n--)}var r=void 0!==l.id?l.id:a,s=window[r];s&&"function"==typeof s.getBase64&&(s.remove(),window[r]=null)},e.refreshHitPoints=function(){if(x(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!==l.id?l.id:"ggbApplet";return window[e]},e.resize=function(){};var C=function(e){return e&&"false"!==e},j=function(t,l,n){x(h)<=4.2&&(n=!0);var a=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==h||ggbHTML5LoadedCodebaseIsWebSimple&&!m)&&(a=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var i=document.createElement("div");i.classList.add("appletParameters","notranslate");var o=l.width,r=l.height;if(l.disableAutoScale=void 0===l.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():l.disableAutoScale,void 0!==l.width)if(x(h)<=4.4)C(l.showToolBar)&&(l.height-=7),C(l.showAlgebraInput)&&(l.height-=37),l.width<605&&C(l.showToolBar)&&(l.width=605,o=605);else{var c=100;(C(l.showToolBar)||C(l.showMenuBar))&&(l.hasOwnProperty("customToolBar")&&(l.customToolbar=l.customToolBar),c=C(l.showMenuBar)?245:155),o<c&&(l.width=c,o=c)}for(var d in i.style.border="none",i.style.display="inline-block",l)l.hasOwnProperty(d)&&"appletOnLoad"!==d&&i.setAttribute("data-param-"+d,l[d]);y&&i.setAttribute("data-param-fontscssurl",y),e.resize=function(){GGBAppletUtils.responsiveResize(t,l)},window.addEventListener("resize",(function(t){e.resize()}));var p="function"==typeof l.appletOnLoad?l.appletOnLoad:function(){};if(n||void 0===l.width){var f=document.createElement("div");f.className="applet_scaler",f.style.position="relative",f.style.display="block",f.appendChild(i),t.appendChild(f),l.appletOnLoad=function(t){e.resize(),p(t)}}else{l.hasOwnProperty("showSplash")||i.setAttribute("data-param-showSplash","false");var g=t.querySelector(".applet_scaler.prerender"),w=null!==g;if(w)_=g.querySelector(".ggb_preview");else{var _=M(o,r,l.borderColor,!1);(g=document.createElement("div")).className="applet_scaler",g.style.position="relative",g.style.display="block",g.style.width=o+"px",g.style.height=r+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(g,"66%"),x(h)>=5?(l.appletOnLoad=function(e){var l=t.querySelector(".ggb_preview");l&&l.parentNode.removeChild(l),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(g),window.GGBT_wsf_view&&$(window).trigger("resize"),p(e)},w||g.appendChild(_)):i.appendChild(_),g.appendChild(i),w||t.appendChild(g),setTimeout((function(){e.resize()}),1)}function k(e,t){t&&"function"==typeof t.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,t.appletOnLoad):renderGGBElement(e),Z("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)},x(h)<5&&(e.className+=" geogebraweb")):k(e,t)}if(a){scriptLoadStarted=!0;for(var B=0;B<i.childNodes.length;B++){"TABLE"===i.childNodes[B].tagName&&(i.removeChild(i.childNodes[B]),B--)}if(null!==ggbHTML5LoadedScript){var T=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');null!=T&&T.parentNode.removeChild(T)}var j=document.createElement("script"),L=function(){S(i,l)};j.src=v+b,ggbHTML5LoadedCodebaseIsWebSimple=m,ggbHTML5LoadedCodebaseVersion=h,ggbHTML5LoadedScript=j.src,Z("GeoGebra HTML5 codebase loaded: '"+v+"'.",l),u||s&&"5.0"!=s?v.requirejs?__webpack_require__.e(56983).then(function(){var e=[__webpack_require__(56983)];L.apply(null,e)}.bind(this)).catch(__webpack_require__.oe):(j.onload=L,t.appendChild(j)):(m?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),L())}else S(i,l);l.height=r,l.width=o},L=function(t,l,n){var a=M(l.width,l.height,l.borderColor,n),i=document.createElement("div");i.style.position="relative",i.style.display="block",i.style.width=l.width+"px",i.style.height=l.height+"px",i.className="applet_screenshot applet_scaler"+(n?" applet_screenshot_play":""),i.appendChild(a);var o=GGBAppletUtils.getScale(l,t,n);n?(t.appendChild(E()),window.GGBT_wsf_view||(t.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(i,"66%"),t.appendChild(i),1===o||isNaN(o)||(GGBAppletUtils.scaleElement(i,o),i.style.width=l.width+"px",i.style.height=l.height+"px",i.parentNode.style.width=l.width*o+"px",i.parentNode.style.height=l.height*o+"px"),e.resize=function(){N(t,a,i,n)},window.addEventListener("resize",(function(t){e.resize()})),e.resize()};function N(e,t,n,a){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 i=GGBAppletUtils.getScale(l,e,a);null!==n.parentNode&&(isNaN(i)||1===i?(GGBAppletUtils.scaleElement(n,1),n.parentNode.style.width=l.width+"px",n.parentNode.style.height=l.height+"px"):(GGBAppletUtils.scaleElement(n,i),n.parentNode.style.width=l.width*i+"px",n.parentNode.style.height=l.height*i+"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 P=function(e,t,l,n){L(e,t,!0);for(var a=function(){var l=[];for(o=0;o<e.childNodes.length;o++)l.push(e.childNodes[o]);if(window.GGBT_wsf_view){var a=window.GGBT_wsf_view.renderFullScreen(e,t.id),i=document.getElementById("fullscreencontainer"),r=jQuery(e).find(".fullscreencontent");r.length>0?(a.remove(),r.attr("id","fullscreencontent").show(),jQuery(i).append(r),window.dispatchEvent(new Event("resize"))):j(a,t,!1),window.GGBT_wsf_view.launchFullScreen(i)}else f=n,j(e,t,!1);if(!window.GGBT_wsf_view)for(o=0;o<l.length;o++)e.removeChild(l[o])},i=e.getElementsByClassName("ggb_preview_play"),o=0;o<i.length;o++)i[o].addEventListener("click",a,!1),i[o].addEventListener("ontouchstart",a,!1);"function"==typeof window.ggbAppletPlayerOnload&&window.ggbAppletPlayerOnload(e),k()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},E=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");}',l=document.createElement("style");l.styleSheet?l.styleSheet.cssText=t:l.appendChild(document.createTextNode(t)),document.getElementsByTagName("head")[0].appendChild(l)}return e},M=function(e,t,l,n){var a=document.createElement("div");a.className="ggb_preview",a.style.position="absolute",a.style.zIndex="90",a.style.width=e-2+"px",a.style.height=t-2+"px",a.style.top="0px",a.style.left="0px",a.style.overflow="hidden",a.style.backgroundColor="white";var i="lightgrey";void 0!==l&&(i="none"===l?"transparent":l),a.style.border="1px solid "+i;var o,r,s,u=document.createElement("img");if((u.style.position="relative",u.style.zIndex="1000",u.style.top="-1px",u.style.left="-1px",null!==g&&u.setAttribute("src",g),u.style.opacity=.7,null!==w)&&!n){(o=document.createElement("img")).style.position="absolute",o.style.zIndex="1001",o.style.opacity=1,u.style.opacity=.3,(r=360)>e/4*3&&(r=e/4*3),s=r/5.8,o.setAttribute("src",w),o.setAttribute("width",r),o.setAttribute("height",s);var c=(e-r)/2,d=(t-s)/2;o.style.left=c+"px",o.style.top=d+"px",a.appendChild(o)}return a.appendChild(u),a},A=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},G=["web","webSimple","web3d","tablet","tablet3d","phone"],O=function(e,t){if(h=e,t)F(h,!0);else{var i,o,r=!a;if(r){var s=x(h);!isNaN(s)&&s<4.4&&(r=!1)}i="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var u=h.indexOf("//");for(var c in o=u>0?h:0===u?i+h:"https://www.geogebra.org/apps/5.2.814.0/",G)if(h.slice(-1*G[c].length)===G[c]||h.slice(-1*(G[c].length+1))===G[c]+"/")return void F(o,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!r||n.is3D||n.AV||n.SV||n.CV||n.EV2||n.CP||n.PC||n.DA||n.FI||n.PV||C(l.showToolBar)||C(l.showMenuBar)||C(l.showAlgebraInput)||C(l.enableRightClick)||l.appName&&"classic"!=l.appName?o+="web3d/":o+="webSimple/",F(o,!1)}},F=function(e,t){if(e.requirejs)v=e;else{"/"!==e.slice(-1)&&(e+="/"),v=e,null===t&&(t=-1===e.indexOf("http")),p=t,b="web.nocache.js",m=!1;var l=v.split("/");l.length>1&&(t||"webSimple"!==l[l.length-2]?G.indexOf(l[l.length-2])>=0&&(b=l[l.length-2]+".nocache.js"):(b="webSimple.nocache.js",m=!0)),l=e.split("/"),"test"===(h=l[l.length-3]).substr(0,4)?h=h.substr(4,1)+"."+h.substr(5,1):"war"!==h.substr(0,3)&&"beta"!==h.substr(0,4)||(h="5.0");var n=parseFloat(h);NaN!==n&&n<5&&e.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+n+" is deprecated. Using version latest instead."),O("5.0",t))}},Z=function(e,t){window.console&&window.console.log&&(!t||void 0===t.showLogging||t.showLogging&&"false"!==t.showLogging)&&console.log(e)};function I(){var e=t;null!==s?e=s:parseFloat(e)<5&&(e="5.0"),O(e,!1),null!==u&&F(u,p),r=!0}return void 0!==l.material_id?S(I):I(),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 l(e,t,l,n,a){if(e.isScreenshoGenerator)return 1;var i,o=void 0!==n&&n,r=null!=e.noScaleMargin&&e.noScaleMargin,s=(i=e.autoHeight)&&"false"!==i,u=function(e,t,l,n,a,i){var o=null;if(null!=i&&""!=i)for(var r=e.parentNode;null!=r;){if((" "+r.className+" ").indexOf(" "+i+" ")>-1){o=r;break}r=r.parentNode}var s=0,u=0,c=0,d=0,v=0,p=0,f=0;if(o)s=o.offsetWidth,u=Math.max(n?o.offsetWidth:0,o.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(s=Math.min(window.innerWidth,document.documentElement.clientWidth),u=Math.min(window.innerHeight,document.documentElement.clientHeight),c=s):(s=window.innerWidth,u=window.innerHeight,c=window.innerWidth),e){var h=e.getBoundingClientRect();h.left>0&&h.left<=s&&(void 0===a||!a)&&("rtl"===document.dir?(v=s-h.width-h.left,p=c<=480?10:30):(p=h.left,v=c<=480?10:30),d=p+v)}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===l||!l)&&t>0&&t+d<s?s=t:s-=d,"object"!==_typeof(window.GGBT_wsf_view)||!window.GGBT_wsf_view.isFullscreen()||void 0!==l&&l||(u-=f)),{width:s,height:u}}(t,e.width,l,s,o&&window.GGBT_wsf_view||r,a),c=parseInt(u.width),d=e.width,v=e.height;if(void 0===d){var p=t.querySelector(".appletParameters");p&&(d=p.offsetWidth,v=p.offsetHeight)}var f=c/d,h=o?1:u.height/v;return void 0===l||l||(f=Math.min(1,f),h=Math.min(1,h)),Math.min(f,h)}function n(e,t,n){var a,i=1,o=!1;return e.hasOwnProperty("allowUpscale")&&(o=e.allowUpscale),e.hasOwnProperty("scale")&&(i=parseFloat(e.scale),(isNaN(i)||null===i||0===i)&&(i=1),i>1&&(o=!0)),t&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(o=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?i:(a=l(e,t,o,n,e.scaleContainerClass),!o||e.hasOwnProperty("scale")&&1!==i?Math.min(i,a):a)}function a(e){var t=Math.min(window.innerWidth,document.documentElement.clientWidth),l=Math.min(window.innerHeight,document.documentElement.clientHeight),n=e.getBoundingClientRect(),a=(t-n.width)/2,i=(l-n.height)/2;i<0&&(i=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=a<40?"40px":a+"px",e.style.top=i+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=i<40?"40px":i+"px",e.style.left=a+"px")}return{responsiveResize:function(l,i){var o=l.querySelector(".appletParameters");if(o){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(i.id!==o.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(l)}if(o.parentElement&&/fullscreen/.test(o.parentElement.className))return;var r=n(i,l);e()&&o.setAttribute("data-param-scale",r);for(var s=null,u=0;u<l.childNodes.length;u++)if(void 0!==l.childNodes[u].className&&l.childNodes[u].className.match(/^applet_scaler/)){s=l.childNodes[u];break}if(null!==s&&null!==s.querySelector(".noscale"))return;var c=void 0!==i.id?i.id:"ggbApplet",d=window[c];null!=d&&d.recalculateEnvironments||null===s||s.className.match(/fullscreen/)||(s.parentNode.style.transform="",isNaN(r)||1===r?(t(s,1),s.parentNode.style.width=i.width+"px",s.parentNode.style.height=i.height+"px"):(s.parentNode.style.width=i.width*r+"px",s.parentNode.style.height=i.height*r+"px",t(s,r))),"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&a(l),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(o).parents(".content-added-content"))}},isFlexibleWorksheetEditor:e,positionCenter:a,getScale:n,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 l=document.compatMode==U?V:W;t.write(l+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 l=t();if(l)e();else{o.addEventListener&&o.addEventListener(Z,a,!1);var n=setInterval((function(){a()}),$)}function a(){if(!l){if(!t())return;l=!0,e(),o.removeEventListener&&o.removeEventListener(Z,a,!1),n&&clearInterval(n)}}}((function(){var t,l,n,a;t=e,l=u(),n=l.body,(a=l.createElement(_)).language=ab,a.crossOrigin=W,a.src=t,webModule.__errFn&&(a.onerror=function(){webModule.__errFn(L,new Error(bb+t))}),n.appendChild(a),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 l=e.indexOf(sb);-1==l&&(l=e.length);var n=e.lastIndexOf(tb,Math.min(l,t));return n>=O?e.substring(O,n+P):W}var t,l=null!=(t=__gwt_getMetaProperty(wb))?t:W;return l==W&&(l=function(){for(var t=o.getElementsByTagName(_),l=O;l<t.length;++l)if(-1!=t[l].src.indexOf(xb))return e(t[l].src);return W}()),l==W&&(l=function(){var e=o.getElementsByTagName(yb);return e.length>O?e[e.length-P].href:W}()),l==W&&function(){var e=o.location;return e.href==e.protocol+zb+e.host+e.pathname+e.search+e.hash}()&&(l=e(o.location.href)),l=function(t){if(t.match(/^\w+:\/\//));else{var l=o.createElement(ub);l.src=t+vb,t=e(l.src)}return t}(l),l}function C(e){return e.match(/^\//)||e.match(/^[a-zA-Z]+:\/\//)?e:webModule.__moduleBase+e}function D(){var e,t=O,l=[],a=[];function i(e){var t=a[e](),n=l[e];if(t in n)return t;var i=[];for(var o in n)i[n[o]]=o;throw r&&r(e,i,t),null}if(__gwt_isKnownPropertyValue=function(e,t){return t in l[e]},webModule.__getPropMap=function(){var e={};for(var t in l)l.hasOwnProperty(t)&&(e[t]=i(t));return e},webModule.__computePropValue=i,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var o=(e=Cb).indexOf(Db);-1!=o&&(t=parseInt(e.substring(o+P),$),e=e.substring(O,o))}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 l=t?t():{},n=e[webModule.__softPermutationId],a=O;a<n.length;a++){var i=n[a];l[i[O]]=i[P]}return l}},webModule.__startLoadingFragment=function(e){return C(e)},webModule.__installRunAsyncCode=function(e){var t=u(),l=t.body,n=t.createElement(_);n.language=ab,n.text=e,l.appendChild(n),l.removeChild(n)},A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},"function"!=typeof window.web3d&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),"function"!=typeof window.webSimple&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet}else console.warn("deployggb.js was loaded twice")})()},95197:function(e,t,l){"use strict";function n(e){var t=!0;if(e.length>0){for(var l=0;l<e.length;l++)if(0==e[l].compile_success||!e[l].compile_success){t=!1;break}}else t=!1;return t}function a(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",l=[],n=0;n<e.length;n++){var a=e[n],i=t?"".concat(t,"/").concat(a.name):"".concat(a.name);l.push({title:a.name,type:a.type,isLeaf:"tree"!==a.type,key:i})}return l}function i(e,t,l){for(var n=0;n<e.length;n++){var a=e[n];if(a.key===t){a.children=l;break}a.children&&i(a.children,t,l)}return e}function o(e,t,l){var n;return function(){var a=this,i=arguments,o=function(){n=null,l||e.apply(a,i)},r=l&&!n;clearTimeout(n),n=setTimeout(o,t),r&&e.apply(a,i)}}l.d(t,{Ax:function(){return i},Ds:function(){return o},KI:function(){return r},SI:function(){return a},f1:function(){return n}});var r=l(22805).Z.API_SERVER},57271:function(e,t,l){"use strict";l.d(t,{Z:function(){return y}});var n=l(7557),a=l.n(n),i=l(41498),o=l.n(i),r=l(79800),s=l.n(r),u=l(59301),c="imageDimensions___a7crR",d="img___Kroat",v="fullWidth___c492T",p=l(92310),f=l.n(p),h=l(71418),b=l(2859),m=l(5219),g=l(69824),w=l(37712),y=function(e){var t=e.data,l=e.className,n=e.fullWidth,i=e.style,r=void 0===i?{}:i,p=e.onClose,y=e.onOk,x=e.showFullTools,_=e.noAssociationId,k=(0,u.useRef)(null),S=(0,u.useRef)(null),B=(0,u.useRef)(null),T=(0,u.useRef)(null),C=(0,u.useState)(!1),j=s()(C,2),L=j[0],N=j[1],P=(0,u.useState)("正在加载中"),E=s()(P,2),M=E[0],A=E[1];(0,u.useEffect)((function(){B.current||(B.current=document.createElement("style"),document.head.appendChild(B.current)),null!=t&&t.visible?(document.body.setAttribute("data-custom","y-hidden"),B.current.innerHTML=" html { overflow-y: hidden; }",null!=t&&t.src&&G()):(document.body.removeAttribute("data-custom"),B.current&&(document.head.removeChild(B.current),B.current=null))}),[null==t?void 0:t.visible]);var G=function(){var e=o()(a()().mark((function e(){var l;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),A("正在加载中"),e.next=4,(0,g.ZJ)(null==t?void 0:t.src);case 4:l=e.sent,k.current.src="",k.current.src=l,k.current.onload=function(){F()},N(!1),A("");case 10:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),O=function(){var e=o()(a()().mark((function e(l){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return N(!0),A("正在保存中"),e.next=4,(0,m.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:t.title,file:l.dataUrl}});case 4:if(null==(n=e.sent)||!n.id||_){e.next=12;break}return e.next=8,(0,m.ZP)("/api/attachments/".concat(t.id,"/add_subitem.json"),{method:"post",body:{subitem_id:null==n?void 0:n.id,settings:JSON.stringify(l.state)}});case 8:0===e.sent.status&&y(),e.next=13;break;case 12:null!=n&&n.id&&y(n);case 13:N(!1),A("");case 15:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),F=function(){S.current=new b.hP(k.current),S.current.targetRoot=T.current,S.current.addEventListener("render",O),S.current.addEventListener("beforeclose",p),x&&(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,w.jsx)(u.Fragment,{children:(null==t?void 0:t.visible)&&(0,w.jsx)(h.Z,{spinning:L,tip:M,style:{position:"absolute"},children:(0,w.jsx)("div",{ref:T,className:f()(c,l,n?v:""),style:r,children:(0,w.jsx)("img",{className:d,ref:k})})})})}},12705:function(e,t,l){"use strict";l.d(t,{h:function(){return m}});var n=l(82242),a=l.n(n),i=l(79800),o=l.n(i),r=l(59301),s=l(57809),u=l(78241),c=l(3113),d=l(89780),v=l.n(d),p=(l(97752),l(96765),l(37712)),f=s.default.Option,h={labelCol:{span:4},wrapperCol:{span:20}},b={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 m(e){var t=e.value,l=e.onChange,n=e.mode,i=e.options,s=void 0===i?{}:i,u=(0,r.useRef)(),c=(0,r.useState)(),d=o()(c,2),f=d[0],h=d[1];return(0,r.useEffect)((function(){if(f){var e=function(e){var t=e.getValue();l&&l(t)};return f.on("change",e),function(){f.off("change",e)}}}),[f,l]),(0,r.useEffect)((function(){f&&f.setOption("mode",n)}),[f,n]),(0,r.useEffect)((function(){f&&(t===f.getValue()&&""!==t||setTimeout((function(){f.setValue(t||"")}),300))}),[f,t]),(0,r.useEffect)((function(){if(u.current&&!f){var e=v().fromTextArea(u.current,a()({mode:n,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},s));h(e)}}),[u.current,f]),(0,p.jsx)("div",{className:"my-codemirror-container",children:(0,p.jsx)("textarea",{ref:u})})}t.Z=function(e){var t=e.callback,l=e.onCancel,n=(0,r.useState)("python"),i=o()(n,2),d=i[0],v=i[1];return(0,p.jsxs)(u.Z,a()(a()({},h),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)},style:{width:500},children:[(0,p.jsx)(u.Z.Item,{label:"代码语言",name:"language",children:(0,p.jsx)(s.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){v(b[e][1])},children:Object.keys(b).map((function(e){return(0,p.jsx)(f,{value:e,children:b[e][0]},e)}))})}),(0,p.jsx)(u.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,p.jsx)(m,{mode:d})}),(0,p.jsxs)("div",{className:"flex-container flex-end",children:[(0,p.jsx)(c.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,p.jsx)(c.ZP,{type:"ghost",onClick:l,children:"取消"})]})]}))}},91149:function(e,t,l){"use strict";l.d(t,{Z:function(){return ye}});var n=l(91232),a=l.n(n),i=l(79800),o=l.n(i),r=l(85573),s=l.n(r),u=l(59301),c=l(89780),d=l.n(c),v=l(76374),p=(l(97752),l(6313),l(25717),l(99498),l(25419),l(67549),l(47245)),f=l(37712),h=function(e){var t=e.value,l=void 0===t?"":t,n=(e.className,e.showTextOnly,e.showLines,e.style,(0,u.useMemo)((function(){return""}),[l]));return(0,f.jsx)(f.Fragment,{children:(0,f.jsx)("div",{dangerouslySetInnerHTML:{__html:n}})})},b=l(82242),m=l.n(b),g=[{title:"粗体",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"斜体",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"md-iconfont icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"链接",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"行内公式",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"数学图像",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"多行公式",icon:"iconfont icon-jisuan1",actionName:"latex"},"|",{title:"添加图片",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"插入画图",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"插入流程图",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"表格",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"换行",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"清空",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function w(e){var t=e.onActionCallback,l=e.title,n=e.icon,a=e.actionName,i=e.className,o=void 0===i?"":i,r=e.children;return(0,f.jsxs)("a",{title:l,className:o,onClick:function(){t(a)},children:[(0,f.jsx)("i",{className:"".concat(n)}),r]})}var y=function(e){var t=e.watch,l=e.showNullButton,n=e.showNullProgramButton,a=e.onActionCallback,i=e.fullScreen,o=e.insertTemp,r=e.hidetoolBar,s=e.extraUse,u=[].concat(g,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,f.jsxs)("ul",{className:"markdown-toolbar-container",children:[!r&&u.map((function(e,t){return(0,f.jsx)("li",{children:e.actionName?(0,f.jsx)(w,m()(m()({},e),{},{onActionCallback:a})):(0,f.jsx)("span",{className:"v-line"})},t)})),l?(0,f.jsx)("li",{children:(0,f.jsx)(w,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-null-ch",onActionCallback:a,children:(0,f.jsx)("span",{className:"fill-tip",children:"点击插入\b填空项"})})}):null,n?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("li",{children:(0,f.jsx)(w,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:a,children:(0,f.jsx)("span",{className:"fill-tip",children:"+单行填空项"})})}),(0,f.jsx)("li",{children:(0,f.jsx)(w,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:a,children:(0,f.jsx)("span",{className:"fill-tip",children:"+多行填空项"})})})]}):null,o&&(0,f.jsx)("li",{children:(0,f.jsx)(w,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(o),onActionCallback:a,children:(0,f.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),s&&(0,f.jsx)("li",{children:s}),(0,f.jsx)("li",{className:"btn-full-screen",children:(0,f.jsx)(w,{icon:"".concat(i?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:i?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:a})})]})},x=l(42692),_=l(78241),k=l(92832),S=l(3113),B={labelCol:{span:4},wrapperCol:{span:20}},T=function(e){var t=e.callback,l=e.onCancel;return(0,f.jsxs)(_.Z,m()(m()({},B),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)},style:{width:500},children:[(0,f.jsx)(_.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,f.jsx)(k.Z,{})}),(0,f.jsx)(_.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,f.jsx)(k.Z,{})}),(0,f.jsxs)("div",{className:"flex-container flex-end",children:[(0,f.jsx)(S.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,f.jsx)(S.ZP,{type:"ghost",onClick:l,children:"取消"})]})]}))},C=l(12705),j=l(58922),L=l(95237),N=l(57271),P=function(e){var t=e.callback,l=e.onCancel,n=document.createElement("canvas"),a=n.getContext("2d");n.width=1e3,n.height=800,a.fillStyle="#ffffff",a.fillRect(0,0,n.width,n.height);var i=n.toDataURL("image/png");return(0,f.jsx)(L.Z,{style:{height:"100vh"},children:(0,f.jsx)(N.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:i,visible:!0,title:String(Date.now())},onOk:function(e){t({src:e.url})},onClose:l})})},E=l(7557),M=l.n(E),A=l(41498),G=l.n(A),O=l(37205),F=l.n(O),Z=l(12378);function I(){go.CommandHandler.call(this),this._arrowKeyBehavior="move",this._pasteOffset=new go.Point(10,10),this._lastPasteOffset=new go.Point(0,0)}go.Diagram.inherit(I,go.CommandHandler),I.prototype.canAlignSelection=function(){var e=this.diagram;return null!==e&&!e.isReadOnly&&!e.isModelReadOnly&&!(e.selection.count<2)},I.prototype.alignLeft=function(){var e=this.diagram;e.startTransaction("aligning left");var t=1/0;e.selection.each((function(e){e instanceof go.Link||(t=Math.min(e.position.x,t))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(t,e.position.y))})),e.commitTransaction("aligning left")},I.prototype.alignRight=function(){var e=this.diagram;e.startTransaction("aligning right");var t=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var l=e.actualBounds.x+e.actualBounds.width;t=Math.max(l,t)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(t-e.actualBounds.width,e.position.y))})),e.commitTransaction("aligning right")},I.prototype.alignTop=function(){var e=this.diagram;e.startTransaction("alignTop");var t=1/0;e.selection.each((function(e){e instanceof go.Link||(t=Math.min(e.position.y,t))})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.position.x,t))})),e.commitTransaction("alignTop")},I.prototype.alignBottom=function(){var e=this.diagram;e.startTransaction("aligning bottom");var t=-1/0;e.selection.each((function(e){if(!(e instanceof go.Link)){var l=e.actualBounds.y+e.actualBounds.height;t=Math.max(l,t)}})),e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,t-e.actualBounds.height))})),e.commitTransaction("aligning bottom")},I.prototype.alignCenterX=function(){var e=this.diagram,t=e.selection.first();if(t){e.startTransaction("aligning Center X");var l=t.actualBounds.x+t.actualBounds.width/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(l-e.actualBounds.width/2,e.actualBounds.y))})),e.commitTransaction("aligning Center X")}},I.prototype.alignCenterY=function(){var e=this.diagram,t=e.selection.first();if(t){e.startTransaction("aligning Center Y");var l=t.actualBounds.y+t.actualBounds.height/2;e.selection.each((function(e){e instanceof go.Link||e.move(new go.Point(e.actualBounds.x,l-e.actualBounds.height/2))})),e.commitTransaction("aligning Center Y")}},I.prototype.alignColumn=function(e){var t=this.diagram;t.startTransaction("align Column"),void 0===e&&(e=0),e=parseFloat(e);var l=new Array;t.selection.each((function(e){e instanceof go.Link||l.push(e)}));for(var n=0;n<l.length-1;n++){var a=l[n],i=a.actualBounds.y+a.actualBounds.height+e;l[n+1].move(new go.Point(a.actualBounds.x,i))}t.commitTransaction("align Column")},I.prototype.alignRow=function(e){void 0===e&&(e=0),e=parseFloat(e);var t=this.diagram;t.startTransaction("align Row");var l=new Array;t.selection.each((function(e){e instanceof go.Link||l.push(e)}));for(var n=0;n<l.length-1;n++){var a=l[n],i=a.actualBounds.x+a.actualBounds.width+e;l[n+1].move(new go.Point(i,a.actualBounds.y))}t.commitTransaction("align Row")},I.prototype.canRotate=function(e){var t=this.diagram;return null!==t&&!t.isReadOnly&&!t.isModelReadOnly&&!(t.selection.count<1)},I.prototype.rotate=function(e){var t;void 0===e&&(e=90),(t=this.diagram).startTransaction("rotate "+e.toString()),(t=this.diagram).selection.each((function(t){t instanceof go.Link||t instanceof go.Group||(t.angle+=e)})),t.commitTransaction("rotate "+e.toString())},I.prototype.pullToFront=function(){var e=this.diagram;e.startTransaction("pullToFront");var t=new go.Map;e.selection.each((function(e){t.set(e.layer,0)})),t.iteratorKeys.each((function(e){var l=0;e.parts.each((function(e){if(!e.isSelected){var t=e.zOrder;isNaN(t)?e.zOrder=0:l=Math.max(l,t)}})),t.set(e,l)})),e.selection.each((function(e){I._assignZOrder(e,t.get(e.layer)+1)})),e.commitTransaction("pullToFront")},I.prototype.pushToBack=function(){var e=this.diagram;e.startTransaction("pushToBack");var t=new go.Map;e.selection.each((function(e){t.set(e.layer,0)})),t.iteratorKeys.each((function(e){var l=0;e.parts.each((function(e){if(!e.isSelected){var t=e.zOrder;isNaN(t)?e.zOrder=0:l=Math.min(l,t)}})),t.set(e,l)})),e.selection.each((function(e){I._assignZOrder(e,t.get(e.layer)-1-I._findGroupDepth(e))})),e.commitTransaction("pushToBack")},I._assignZOrder=function(e,t,l){void 0===l&&(l=e),e.layer===l.layer&&(e.zOrder=t),e instanceof go.Group&&e.memberParts.each((function(e){I._assignZOrder(e,t+1,l)}))},I._findGroupDepth=function(e){if(e instanceof go.Group){var t=0;return e.memberParts.each((function(e){t=Math.max(t,I._findGroupDepth(e))})),t+1}return 0},I.prototype.doKeyDown=function(){var e=this.diagram;if(null!==e){var t=e.lastInput;if("Up"===t.key||"Down"===t.key||"Left"===t.key||"Right"===t.key){var l=this.arrowKeyBehavior;if("none"===l)return;if("select"===l)return void this._arrowKeySelect();if("move"===l)return void this._arrowKeyMove();if("tree"===l)return void this._arrowKeyTree()}go.CommandHandler.prototype.doKeyDown.call(this)}},I.prototype._getAllParts=function(){var e=new Array;return this.diagram.nodes.each((function(t){e.push(t)})),this.diagram.parts.each((function(t){e.push(t)})),e},I.prototype._arrowKeyMove=function(){var e=this.diagram,t=e.lastInput,l=0,n=0;if(t.control||t.meta)l=1,n=1;else if(null!==e.grid){var a=e.grid.gridCellSize;n=a.width,l=a.height}e.startTransaction("arrowKeyMove"),e.selection.each((function(e){"Up"===t.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y-l)):"Down"===t.key?e.move(new go.Point(e.actualBounds.x,e.actualBounds.y+l)):"Left"===t.key?e.move(new go.Point(e.actualBounds.x-n,e.actualBounds.y)):"Right"===t.key&&e.move(new go.Point(e.actualBounds.x+n,e.actualBounds.y))})),e.commitTransaction("arrowKeyMove")},I.prototype._arrowKeySelect=function(){var e=this.diagram,t=e.lastInput,l=null;"Up"===t.key?l=this._findNearestPartTowards(270):"Down"===t.key?l=this._findNearestPartTowards(90):"Left"===t.key?l=this._findNearestPartTowards(180):"Right"===t.key&&(l=this._findNearestPartTowards(0)),null!==l&&(t.shift?l.isSelected=!0:t.control||t.meta?l.isSelected=!l.isSelected:e.select(l))},I.prototype._findNearestPartTowards=function(e){var t=this.diagram.selection.first();if(null===t)return null;for(var l=t.actualBounds.center,n=this._getAllParts(),a=1/0,i=t,o=0;o<n.length;o++){var r=n[o];if(r!==t&&r.canSelect()){var s=r.actualBounds.center,u=l.directionPoint(s),c=this._angleCloseness(u,e);if(c<=45){var d=l.distanceSquaredPoint(s);(d*=1+Math.sin(c*Math.PI/180))<a&&(a=d,i=r)}}}return i},I.prototype._angleCloseness=function(e,t){return Math.min(Math.abs(t-e),Math.min(Math.abs(t+360-e),Math.abs(t-360-e)))},I.prototype._arrowKeyTree=function(){var e=this.diagram,t=e.selection.first();if(t instanceof go.Node){var l=e.lastInput;if("Right"===l.key)if(t.isTreeLeaf);else if(t.isTreeExpanded){null!==(a=this._sortTreeChildrenByY(t).first())&&e.select(a)}else e.commandHandler.canExpandTree(t)&&e.commandHandler.expandTree(t);else if("Left"===l.key){if(!t.isTreeLeaf&&t.isTreeExpanded)e.commandHandler.canCollapseTree(t)&&e.commandHandler.collapseTree(t);else null!==(i=t.findTreeParentNode())&&e.select(i)}else if("Up"===l.key){if(null!==(i=t.findTreeParentNode()))if((r=(o=this._sortTreeChildrenByY(i)).indexOf(t))>0){for(var n=o.elt(r-1);null!==n&&n.isTreeExpanded&&!n.isTreeLeaf;){n=this._sortTreeChildrenByY(n).last()}null!==n&&e.select(n)}else e.select(i)}else if("Down"===l.key){var a;if(t.isTreeExpanded&&!t.isTreeLeaf)null!==(a=this._sortTreeChildrenByY(t).first())&&e.select(a);else for(;null!==t;){var i,o,r;if(null===(i=t.findTreeParentNode()))break;if((r=(o=this._sortTreeChildrenByY(i)).indexOf(t))<o.length-1){e.select(o.elt(r+1));break}t=i}}var s=e.selection.first();null!==s&&e.scrollToRect(s.actualBounds)}},I.prototype._sortTreeChildrenByY=function(e){var t=(new go.List).addAll(e.findTreeChildrenNodes());return t.sort((function(e,t){var l=e.location,n=t.location;return l.y<n.y?-1:l.y>n.y?1:l.x<n.x?-1:l.x>n.x?1:0})),t},I.prototype.copyToClipboard=function(e){go.CommandHandler.prototype.copyToClipboard.call(this,e),this._lastPasteOffset.set(this.pasteOffset)},I.prototype.pasteFromClipboard=function(){var e=go.CommandHandler.prototype.pasteFromClipboard.call(this);return this.diagram.moveParts(e,this._lastPasteOffset),this._lastPasteOffset.add(this.pasteOffset),e},Object.defineProperty(I.prototype,"arrowKeyBehavior",{get:function(){return this._arrowKeyBehavior},set:function(e){if("move"!==e&&"select"!==e&&"scroll"!==e&&"tree"!==e&&"none"!==e)throw new Error('DrawCommandHandler.arrowKeyBehavior must be either "move", "select", "scroll", "tree", or "none", not: '+e);this._arrowKeyBehavior=e}}),Object.defineProperty(I.prototype,"pasteOffset",{get:function(){return this._pasteOffset},set:function(e){if(!(e instanceof go.Point))throw new Error("DrawCommandHandler.pasteOffset must be a Point, not: "+e);this._pasteOffset.set(e)}});var D=I,R=(l(98403),l(43418)),H=l(43604),W=l(5219),z="myPaletteDiv___Xjz2I",q="flowChartWrp____f45r",V="maxH60___Pd4Re";var U=function(e){var t=e.onCancel,l=e.callback,n=(0,u.useRef)(),a=(0,u.useRef)(),i=(0,u.useRef)(),r=(0,u.useRef)(!1),s=(0,u.useRef)(!1),c=(0,u.useState)(0),d=o()(c,2),v=d[0],p=d[1],h=function(){var e=G()(M()().mark((function e(){var t,a;return M()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=n.current.makeImage(),e.next=3,(0,W.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:Date.now(),file:t.src}});case 3:a=e.sent,l({src:a.url});case 5:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,u.useEffect)((function(){return setTimeout((function(){!function(){var e=Z.GraphObject.make,t="#ff3333",l="#3358ff",o="#25ad23",r="#d533ff",s="#7d33ff",u="#ff6233",c="#ffffff",d="#000000",v="#fffcd5",p="#d5ebff",f="#f2dfe0",h="#a5d2fa",b="#cccccc",m="#b3e6b3",g="#fcbbbd";function w(t,l){var n=function(e,l){e.handled=!0,e.diagram.model.commit((function(n){var a=l.part.adornedPart,i=(new Z.Point).setRectSpot(a.actualBounds,t);i.subtract(a.location),i.scale(2,2),i.x+=130*Math.sign(i.x),i.y+=130*Math.sign(i.y),i.add(a.location),i.snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize);var o=n.copyNodeData(a.data);n.setGroupKeyForNodeData(o,n.getGroupKeyForNodeData(a.data)),n.addNodeData(o);var r={from:a.key,to:n.getKeyForNodeData(o)};n.addLinkData(r);var s=e.diagram.findNodeForData(o);s.location=i,e.diagram.select(s),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)}))};return e(Z.Shape,{figure:l,alignment:t,alignmentFocus:t.opposite(),width:t.equals(Z.Spot.Top)||t.equals(Z.Spot.Bottom)?25:18,height:t.equals(Z.Spot.Top)||t.equals(Z.Spot.Bottom)?18:25,fill:"orange",stroke:c,strokeWidth:4,mouseEnter:function(e,t){return t.fill="dodgerblue"},mouseLeave:function(e,t){return t.fill="orange"},isActionable:!0,click:n,contextClick:n})}function y(t){return e(Z.Shape,{fill:"orange",stroke:"rgba(0, 0, 0, 0)",strokeWidth:15,background:"transparent",geometryString:"F1 M0 0 b 0 360 -4 0 4 z M10 0 b 0 360 -4 0 4 z M20 0 b 0 360 -4 0 4",isActionable:!0,cursor:"context-menu",mouseEnter:function(e,t){return t.fill="dodgerblue"},mouseLeave:function(e,t){return t.fill="orange"},click:function(e,t){e.diagram.commandHandler.showContextMenu(t.part.adornedPart)}},t||{})}function x(e,t){return function(l,n){l.handled=!0,l.diagram.model.commit((function(l){l.set(n.part.adornedPart.data,e,t)}))}}function _(t,l){return l||(l="color"),e(Z.Shape,{width:16,height:16,stroke:"lightgray",fill:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.stroke="dodgerblue"},mouseLeave:function(e,t){return t.stroke="lightgray"},click:x(l,t),contextClick:x(l,t)})}function k(){return[e("ContextMenuButton",e(Z.Panel,"Horizontal",_(c,"fill"),_(v,"fill"),_(p,"fill"),_(f,"fill"))),e("ContextMenuButton",e(Z.Panel,"Horizontal",_(b,"fill"),_(m,"fill"),_(h,"fill"),_(g,"fill")))]}function S(){return[e("ContextMenuButton",e(Z.Panel,"Horizontal",_(d),_(o),_(l),_(t))),e("ContextMenuButton",e(Z.Panel,"Horizontal",_(c),_(r),_(s),_(u)))]}function B(t,l){return l||(l="thickness"),e(Z.Shape,"LineH",{width:16,height:16,strokeWidth:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:x(l,t),contextClick:x(l,t)})}function T(t,l){return l||(l="dash"),e(Z.Shape,"LineH",{width:24,height:16,strokeWidth:2,strokeDashArray:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:x(l,t),contextClick:x(l,t)})}function C(){return[e("ContextMenuButton",e(Z.Panel,"Horizontal",B(1),B(2),B(3),B(4))),e("ContextMenuButton",e(Z.Panel,"Horizontal",T(null),T([2,4]),T([4,4])))]}function j(t,l){return l||(l="figure"),e(Z.Shape,{width:32,height:32,scale:.5,fill:"lightgray",figure:t,margin:1,background:"transparent",mouseEnter:function(e,t){return t.fill="dodgerblue"},mouseLeave:function(e,t){return t.fill="lightgray"},click:x(l,t),contextClick:x(l,t)})}function L(t){return e(Z.Shape,{stroke:"dodgerblue",strokeWidth:2,strokeCap:"square",geometryString:"M0 0 M4 2 H3 M4 "+(t+4).toString()+" H3"})}function N(t){var l="M0 0 M8 16 M0 8 L16 8 M12 11 L16 8 L12 5";return 0===t?l="M0 0 M16 16 M0 8 L16 8":2===t&&(l="M0 0 M16 16 M0 8 L16 8 M12 11 L16 8 L12 5 M4 11 L0 8 L4 5"),e(Z.Shape,{geometryString:l,margin:2,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:x("dir",t),contextClick:x("dir",t)})}function P(t){var l=function(e,l){e.handled=!0,e.diagram.model.commit((function(e){var n=l.part.adornedPart;e.set(n.data,t?"toSpot":"fromSpot",Z.Spot.stringify(Z.Spot.AllSides)),(t?n.toNode:n.fromNode).invalidateConnectedLinks()}))};return e(Z.Shape,{width:12,height:12,fill:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:l,contextClick:l})}function E(t,l){var n=0,a=Z.Spot.RightSide;t.equals(Z.Spot.Top)?(n=270,a=Z.Spot.TopSide):t.equals(Z.Spot.Left)?(n=180,a=Z.Spot.LeftSide):t.equals(Z.Spot.Bottom)&&(n=90,a=Z.Spot.BottomSide),l||(n-=180);var i=function(e,t){e.handled=!0,e.diagram.model.commit((function(e){var n=t.part.adornedPart;e.set(n.data,l?"toSpot":"fromSpot",Z.Spot.stringify(a)),(l?n.toNode:n.fromNode).invalidateConnectedLinks()}))};return e(Z.Shape,{alignment:t,alignmentFocus:t.opposite(),geometryString:"M0 0 M12 12 M12 6 L1 6 L4 4 M1 6 L4 8",angle:n,background:"transparent",mouseEnter:function(e,t){return t.background="dodgerblue"},mouseLeave:function(e,t){return t.background="transparent"},click:i,contextClick:i})}n.current=new Z.Diagram(a.current,{padding:20,grid:e(Z.Panel,"Grid",e(Z.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(Z.Shape,"LineV",{stroke:"lightgray",strokeWidth:.5})),"draggingTool.isGridSnapEnabled":!0,handlesDragDropForTopLevelParts:!0,mouseDrop:function(e){e.diagram.commandHandler.addTopLevelParts(e.diagram.selection,!0)||e.diagram.currentTool.doCancel()},commandHandler:e(D),"clickCreatingTool.archetypeNodeData":{text:"未命名",fill:null,stroke:null,borderColor:"rgba(0,0,0,0)"},PartCreated:function(e){var t=e.subject;t.location=t.location.copy().snapToGridPoint(e.diagram.grid.gridOrigin,e.diagram.grid.gridCellSize),setTimeout((function(){e.diagram.commandHandler.editTextBlock()}),20)},"commandHandler.archetypeGroupData":{isGroup:!0,text:"NEW GROUP"},SelectionGrouped:function(e){e.subject,setTimeout((function(){e.diagram.commandHandler.editTextBlock()}))},LinkRelinked:function(e){e.parameter.part.invalidateConnectedLinks();var t=e.subject;e.diagram.toolManager.linkingTool.isForwards?t.toNode.invalidateConnectedLinks():t.fromNode.invalidateConnectedLinks()},"undoManager.isEnabled":!0}),n.current.nodeTemplate=e(Z.Node,"Auto",{locationSpot:Z.Spot.Center,locationObjectName:"SHAPE",desiredSize:new Z.Size(120,60),minSize:new Z.Size(40,40),resizable:!0,resizeCellSize:new Z.Size(10,10),rotatable:!0},new Z.Binding("location","loc",Z.Point.parse).makeTwoWay(Z.Point.stringify),new Z.Binding("desiredSize","size",Z.Size.parse).makeTwoWay(Z.Size.stringify),e(Z.Shape,{name:"SHAPE",fill:c,cursor:"pointer",portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Z.Spot.AllSides,toSpot:Z.Spot.AllSides},new Z.Binding("figure"),new Z.Binding("fill"),new Z.Binding("stroke","borderColor"),new Z.Binding("strokeWidth","thickness"),new Z.Binding("strokeDashArray","dash")),e(Z.Shape,{width:100,height:20,strokeWidth:0,fill:"transparent"}),e(Z.TextBlock,{margin:1,textAlign:"center",overflow:Z.TextBlock.OverflowEllipsis,editable:!0},new Z.Binding("text").makeTwoWay(),new Z.Binding("stroke","color"))),n.current.nodeTemplate.toolTip=e("ToolTip",e(Z.Panel,"Vertical",{maxSize:new Z.Size(200,NaN)},e(Z.TextBlock,{font:"bold 10pt sans-serif",textAlign:"center"},new Z.Binding("text")),e(Z.TextBlock,{font:"10pt sans-serif",textAlign:"center"},new Z.Binding("text","details")))),n.current.nodeTemplate.selectionAdornmentTemplate=e(Z.Adornment,"Spot",e(Z.Placeholder,{padding:10}),w(Z.Spot.Top,"TriangleUp"),w(Z.Spot.Left,"TriangleLeft"),w(Z.Spot.Right,"TriangleRight"),w(Z.Spot.Bottom,"TriangleDown"),y({alignment:new Z.Spot(.75,0)})),n.current.nodeTemplate.contextMenu=e("ContextMenu",e("ContextMenuButton",e(Z.Panel,"Horizontal",j("Rectangle"),j("RoundedRectangle"),j("Ellipse"),j("Diamond"))),e("ContextMenuButton",e(Z.Panel,"Horizontal",j("Parallelogram2"),j("ManualOperation"),j("Procedure"),j("Cylinder1"))),e("ContextMenuButton",e(Z.Panel,"Horizontal",j("Terminator"),j("CreateRequest"),j("Document"),j("TriangleDown"))),k(),S(),C()),n.current.groupTemplate=e(Z.Group,"Spot",{layerName:"Background",ungroupable:!0,locationSpot:Z.Spot.Center,selectionObjectName:"BODY",computesBoundsAfterDrag:!0,handlesDragDropForMembers:!0,mouseDrop:function(e,t){t.addMembers(t.diagram.selection,!0)||t.diagram.currentTool.doCancel()},avoidable:!1},new Z.Binding("location","loc",Z.Point.parse).makeTwoWay(Z.Point.stringify),e(Z.Panel,"Auto",{name:"BODY"},e(Z.Shape,{parameter1:10,fill:c,strokeWidth:2,cursor:"pointer",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromSpot:Z.Spot.AllSides,toSpot:Z.Spot.AllSides},new Z.Binding("fill"),new Z.Binding("stroke","color"),new Z.Binding("strokeWidth","thickness"),new Z.Binding("strokeDashArray","dash")),e(Z.Placeholder,{background:"transparent",margin:20})),e(Z.TextBlock,{alignment:Z.Spot.Top,alignmentFocus:Z.Spot.Bottom,font:"bold 12pt sans-serif",editable:!0},new Z.Binding("text"),new Z.Binding("stroke","color"))),n.current.groupTemplate.selectionAdornmentTemplate=e(Z.Adornment,"Spot",e(Z.Panel,"Auto",e(Z.Shape,{fill:null,stroke:"dodgerblue",strokeWidth:3}),e(Z.Placeholder,{margin:1.5})),y({alignment:Z.Spot.TopRight,alignmentFocus:Z.Spot.BottomRight})),n.current.groupTemplate.contextMenu=e("ContextMenu",k(),S(),C()),n.current.linkTemplate=e(Z.Link,{layerName:"Foreground",routing:Z.Link.AvoidsNodes,corner:10,fromShortLength:10,toShortLength:15,relinkableFrom:!0,relinkableTo:!0,reshapable:!0,resegmentable:!0},new Z.Binding("fromSpot","fromSpot",Z.Spot.parse),new Z.Binding("toSpot","toSpot",Z.Spot.parse),new Z.Binding("fromShortLength","dir",(function(e){return e>=1?10:0})),new Z.Binding("toShortLength","dir",(function(e){return e>=1?10:0})),new Z.Binding("points").makeTwoWay(),e(Z.Shape,{strokeWidth:2},new Z.Binding("stroke","color"),new Z.Binding("strokeWidth","thickness"),new Z.Binding("strokeDashArray","dash")),e(Z.Shape,{segmentIndex:0,segmentOffset:new Z.Point(15,0),segmentOrientation:Z.Link.OrientAlong,alignmentFocus:Z.Spot.Right,figure:"circle",width:10,strokeWidth:0},new Z.Binding("fill","color"),new Z.Binding("visible","dir",(function(e){return 1===e}))),e(Z.Shape,{segmentIndex:-1,segmentOffset:new Z.Point(-10,6),segmentOrientation:Z.Link.OrientPlus90,alignmentFocus:Z.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Z.Binding("fill","color"),new Z.Binding("visible","dir",(function(e){return e>=1})),new Z.Binding("width","thickness",(function(e){return 7+3*e})),new Z.Binding("height","thickness",(function(e){return 7+3*e})),new Z.Binding("segmentOffset","thickness",(function(e){return new Z.Point(-15,4+1.5*e)}))),e(Z.Shape,{segmentIndex:0,segmentOffset:new Z.Point(15,-6),segmentOrientation:Z.Link.OrientMinus90,alignmentFocus:Z.Spot.Right,figure:"triangle",width:12,height:12,strokeWidth:0},new Z.Binding("fill","color"),new Z.Binding("visible","dir",(function(e){return 2===e})),new Z.Binding("width","thickness",(function(e){return 7+3*e})),new Z.Binding("height","thickness",(function(e){return 7+3*e})),new Z.Binding("segmentOffset","thickness",(function(e){return new Z.Point(-15,4+1.5*e)}))),e(Z.TextBlock,{alignmentFocus:new Z.Spot(0,1,-4,0),editable:!0},new Z.Binding("text").makeTwoWay(),new Z.Binding("stroke","color"))),n.current.linkTemplate.selectionAdornmentTemplate=e(Z.Adornment,e(Z.Shape,{isPanelMain:!0,stroke:"transparent",strokeWidth:6,pathPattern:L(2)},new Z.Binding("pathPattern","thickness",L)),y({alignmentFocus:new Z.Spot(0,0,-6,-4)})),n.current.linkTemplate.contextMenu=e("ContextMenu",S(),C(),e("ContextMenuButton",e(Z.Panel,"Horizontal",N(0),N(1),N(2))),e("ContextMenuButton",e(Z.Panel,"Horizontal",e(Z.Panel,"Spot",P(!1),E(Z.Spot.Top,!1),E(Z.Spot.Left,!1),E(Z.Spot.Right,!1),E(Z.Spot.Bottom,!1)),e(Z.Panel,"Spot",{margin:new Z.Margin(0,0,0,2)},P(!0),E(Z.Spot.Top,!0),E(Z.Spot.Left,!0),E(Z.Spot.Right,!0),E(Z.Spot.Bottom,!0)))));var M=new Z.Palette(i.current,{maxSelectionCount:1,linkTemplate:e(Z.Link,{locationSpot:Z.Spot.Center,selectionAdornmentTemplate:e(Z.Adornment,"Link",{locationSpot:Z.Spot.Center},e(Z.Shape,{isPanelMain:!0,fill:null,stroke:"deepskyblue",strokeWidth:0}),e(Z.Shape,{toArrow:"Standard",stroke:null}))},{routing:Z.Link.AvoidsNodes,curve:Z.Link.JumpOver,corner:5,toShortLength:4},new Z.Binding("points"),e(Z.Shape,{isPanelMain:!0,strokeWidth:2}),e(Z.Shape,{toArrow:"Standard",stroke:null})),model:new Z.GraphLinksModel([{text:"未命名",size:"100 100",fill:null,stroke:"#000"}].concat(F()(Z.Shape.getFigureGenerators().toArray().map((function(e){return{text:"未命名",size:"100 100",figure:e.key,fill:"white",stroke:"#666",borderColor:"#000"}})))))});n.current.addDiagramListener("TextEdited",(function(e){var t,l=e.subject.part,a=null===(t=document.activeElement)||void 0===t?void 0:t.value;"string"==typeof a&&""===a.trim()&&n.current.model.commit((function(e){e.set(l.data,"text","未命名"),n.current.commandHandler.stopCommand()}),"increment")})),M.nodeTemplate=e(Z.Node,"Auto",{locationSpot:Z.Spot.Center},new Z.Binding("location","location",Z.Point.parse).makeTwoWay(Z.Point.stringify),e(Z.Shape,"Circle",{fill:"white",stroke:"gray",strokeWidth:2,width:20,height:20,portId:"",fromLinkable:!0,toLinkable:!0,fromLinkableDuplicates:!0,toLinkableDuplicates:!0,fromLinkableSelfNode:!0,toLinkableSelfNode:!0},new Z.Binding("stroke").makeTwoWay(),new Z.Binding("fill").makeTwoWay(),new Z.Binding("figure")),e(Z.TextBlock,{margin:new Z.Margin(5,5,3,5),font:"10pt sans-serif",minSize:new Z.Size(16,16),maxSize:new Z.Size(10,NaN),textAlign:"center",editable:!0},new Z.Binding("key").makeTwoWay())),setTimeout((function(){n.current.grid=e(Z.Panel,"Grid",e(Z.Shape,"LineH",{stroke:"lightgray",strokeWidth:.5}),e(Z.Shape,"LineV",{stroke:"lightgray",strokeWidth:.5})),n.current.grid.visible=!0,n.current.grid.gridCellStroke="darkgray",n.current.grid.gridCellStrokeWidth=1}),300),window.myDiagrams=n.current,n.current}()}),500),p(v+1),function(){n.current=null}}),[]),(0,f.jsx)("div",{ref:s,className:r.current?"".concat(V," body-overflow-initial"):"body-overflow-initial",children:(0,f.jsx)(R.Z,{width:1200,icon:null,footer:null,closable:!0,visible:!!v,destroyOnClose:!0,maskClosable:!1,getContainer:s.current,rootClassName:"zIndex-9999",title:(0,f.jsxs)(L.Z,{children:[(0,f.jsx)(H.Z,{flex:1,children:"插入流程图"}),(0,f.jsx)(H.Z,{onClick:function(){var e=n.current.selection.first();if(r.current=!r.current,document.activeElement&&e){var t,l=null===(t=document.activeElement)||void 0===t||null===(t=t.value)||void 0===t?void 0:t.trim();"string"==typeof l&&n.current.model.commit((function(t){t.set(e.data,"text",l||"未命名"),n.current.commandHandler.stopCommand()}),"increment")}p(v+1)},children:(0,f.jsx)("span",{className:"current c-blue mr30",style:{fontWeight:400},children:"展开/收起"})})]}),onCancel:t,children:(0,f.jsxs)("div",{style:{width:"100%",height:"80vh",overflow:"hidden",position:"relative"},className:q,children:[(0,f.jsxs)("div",{style:{display:"flex",height:"100%"},children:[(0,f.jsxs)("div",{style:{width:"300px",height:"100%"},children:[(0,f.jsx)("div",{style:{background:"#fff",position:"relative",zIndex:12,fontSize:16,color:"#3061d0"},children:"图形库"}),(0,f.jsx)("div",{style:{height:"calc(100% - 50px)"},className:z,ref:i})]}),(0,f.jsx)("div",{style:{flex:1,position:"relative"},children:(0,f.jsx)("div",{ref:a,style:{height:"80vh"}})})]}),(0,f.jsx)("div",{className:"tr",children:(0,f.jsx)(S.ZP,{size:"large",onClick:h,style:{position:"absolute",right:0,bottom:0,zIndex:8},type:"primary",children:"保存到编辑器"})})]})})})},K=l(5112),Y=l(400),J=K.ZP.Group,X={margin:"0 8px"},$=function(e){var t=e.callback,l=e.onCancel;return(0,f.jsxs)(_.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)},children:[(0,f.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,f.jsx)("span",{style:X,children:"单元格数:"}),(0,f.jsx)("span",{style:X,children:"行数"}),(0,f.jsx)(_.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,f.jsx)(Y.Z,{})}),(0,f.jsx)("span",{style:X,children:"列数"}),(0,f.jsx)(_.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,f.jsx)(Y.Z,{})})]}),(0,f.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,f.jsx)("span",{style:X,children:"对齐方式:"}),(0,f.jsx)(_.Z.Item,{name:"align",children:(0,f.jsxs)(J,{children:[(0,f.jsx)(K.ZP,{value:"default",children:(0,f.jsx)("i",{className:"fa fa-align-justify"})}),(0,f.jsx)(K.ZP,{value:"left",children:(0,f.jsx)("i",{className:"fa fa-align-left"})}),(0,f.jsx)(K.ZP,{value:"center",children:(0,f.jsx)("i",{className:"fa fa-align-center"})}),(0,f.jsx)(K.ZP,{value:"right",children:(0,f.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,f.jsxs)("div",{className:"flex-container flex-end",children:[(0,f.jsx)(S.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,f.jsx)(S.ZP,{type:"ghost",onClick:l,children:"取消"})]})]})},Q=l(78673),ee=l(92629),te=l.n(ee),le=(0,u.forwardRef)((function(e,t){var l=e.use3d,n=e.width,a=e.height,i=e.callback,r=(e.showSaveButton,(0,u.useRef)()),s=(0,u.useRef)(),c=(0,u.useState)(!1),d=o()(c,2),v=d[0],p=d[1],h=(0,u.useRef)({id:r,appName:"graphing",width:n||1e3,height:a||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,u.useEffect)((function(){s.current=new(te())(h.current,!0),window.onload=function(){s.current.inject("applet_container")}}),[]);var b=function(){var e=window.ggbApplet.getPNGBase64(1,!0,72);return i&&i(e),e};return(0,u.useEffect)((function(){h.current.appName=v?"3D":"graphing",s.current.inject("applet_container")}),[v]),(0,u.useEffect)((function(){p(l)}),[l]),(0,u.useImperativeHandle)(t,(function(){return{getImgData:b}})),(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:r}),(0,f.jsxs)(L.Z,{align:"middle",children:[(0,f.jsx)(H.Z,{flex:1,children:(0,f.jsx)(Q.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:v,onChange:function(e){return p(e)}})}),(0,f.jsx)(H.Z,{children:(0,f.jsx)(S.ZP,{size:"large",onClick:b,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),ne=l(73784),ae=l(8591),ie="link",oe="upload-image",re="add-flowchart",se="draw-image",ue="code-block",ce="add-table",de="------------",ve={default:de,left:":".concat(de),center:":".concat(de,":"),right:"".concat(de,":")},pe=l(99944);var fe="@▁▁@",he=["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 be(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var me=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ge=s()(s()({},me+"-B","bold"),me+"-I","italic"),we=s()(s()(s()(s()(s()(s()(s()(s()({},ie,"添加链接"),ue,"添加代码块"),oe,"添加图片"),se,"添加画图"),re,"插入流程图"),ce,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),ye=function(e){var t=e.defaultValue,l=void 0===t?"":t,n=e.onChange,i=e.width,r=void 0===i?"100%":i,c=e.height,b=void 0===c?400:c,m=e.miniToolbar,g=void 0!==m&&m,w=e.isFocus,_=void 0!==w&&w,k=e.watch,S=e.insertTemp,B=e.mode,L=void 0===B?"markdown":B,N=e.id,E=void 0===N?"markdown-editor-id":N,M=e.showResizeBar,A=void 0!==M&&M,G=e.noStorage,O=void 0!==G&&G,F=e.showNullButton,Z=void 0!==F&&F,I=e.showNullProgramButton,D=void 0!==I&&I,H=e.hidetoolBar,W=void 0!==H&&H,z=e.fullScreen,q=void 0!==z&&z,V=e.onBlur,K=e.onCMBeforeChange,Y=e.onFullScreen,J=e.className,X=void 0===J?"":J,Q=e.disablePaste,ee=void 0!==Q&&Q,te=e.disabled,de=void 0!==te&&te,me=e.disabledFill,ye=void 0!==me&&me,xe=e.placeholder,_e=void 0===xe?"":xe,ke=e.values,Se=void 0===ke?"":ke,Be=e.extraUse,Te=(0,u.useState)(null),Ce=o()(Te,2),je=Ce[0],Le=Ce[1],Ne=(0,u.useState)(l),Pe=o()(Ne,2),Ee=Pe[0],Me=Pe[1],Ae=(0,u.useState)(k),Ge=o()(Ae,2),Oe=Ge[0],Fe=Ge[1],Ze=(0,u.useState)(q),Ie=o()(Ze,2),De=Ie[0],Re=Ie[1],He=(0,u.useState)(""),We=o()(He,2),ze=We[0],qe=We[1],Ve=(0,u.useState)(0),Ue=o()(Ve,2),Ke=Ue[0],Ye=Ue[1],Je=(0,u.useState)(b),Xe=o()(Je,2),$e=Xe[0],Qe=Xe[1],et=(0,u.useState)(!1),tt=o()(et,2),lt=(tt[0],tt[1]),nt=(0,u.useState)(0),at=o()(nt,2),it=at[0],ot=at[1],rt=(0,u.useState)(0),st=o()(rt,2),ut=st[0],ct=st[1],dt=(0,u.useRef)(),vt=(0,u.useRef)(),pt=(0,u.useRef)(),ft=(0,u.useRef)();(0,u.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Me(Se),null==je||je.setValue(Se),window.scrollTo(0,e)}),[Se]),(0,u.useEffect)((function(){null==Y||Y(De)}),[De]),(0,u.useEffect)((function(){if(dt.current){var e=function(e,l){if(!ee){var n=l.clipboardData;if(n){var a=n.types.toString(),i=n.items;if("Files"===a||n.types.indexOf("Files")>-1){if(l.preventDefault(),"stex"==L)return;try{var o,r=i[1];"file"===(null===(o=i[0])||void 0===o?void 0:o.kind)&&(r=i[0]);var s=r.getAsFile(),u=s.name.split(".").pop();(0,j.I)(s,(function(e){var l,n,a;e.id?(null==s||null===(l=s.type)||void 0===l?void 0:l.indexOf("image"))>-1?t.replaceSelection(".concat(e.content_type,")")):(null==s||null===(n=s.type)||void 0===n?void 0:n.indexOf("video"))>-1?t.replaceSelection('<video width="100%" controls src="/api/attachments/'.concat(e.id,'"></video>')):(null==s||null===(a=s.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?t.replaceSelection('<a href="/api/attachments/'.concat(e.id,"?type=").concat(s.type,'&disposition=inline" target="_blank">').concat(s.name,"</a>")):he.includes(u)?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(l){ae.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}l.preventDefault()},t=d().fromTextArea(dt.current,{mode:L,lineNumbers:!g,lineWrapping:!0,value:l,autoCloseTags:!0,autoCloseBrackets:!0});return t.on("keyup",(function(e,l){8===l.keyCode&&(""==e.getValue()?t.setOption("placeholder",_e):t.setOption("placeholder",null))})),t.on("keydown",(function(e,t){if(8===t.keyCode){var l=function(e,t){var l=e.getDoc(),n=l.getCursor(),a=l.getLine(n.line),i=a.charAt(n.ch-1),o=a.lastIndexOf("@▁@",n.ch),r=a.lastIndexOf("@▁▁@",n.ch),s=o>r?o:r,u=o>r?3:4;if(-1===fe.indexOf(i))return null;if(console.log("change1:",t,e,a,n,s,o,r,i),s>=0&&n.ch-s<5){var c=s+u;return l.replaceRange("",{line:n.line,ch:s},{line:n.line,ch:c}),{line:n.line,ch:c}}return null}(e);l&&t.preventDefault()}})),_&&t.focus(),t.on("paste",e),de&&t.on("beforeChange",(function(e,t){"paste"!==t.origin&&"+input"!==t.origin||t.cancel()})),Le(t),function(){t.off("paste",e)}}}),[]);var ht=(0,u.useCallback)((function(){vt.current}),[$e,vt,De]);(0,u.useEffect)((function(){if(je){var e=function(){var e=new v.Z((function(e){var t,l=a()(e);try{for(l.s();!(t=l.n()).done;){var n=t.value;(n.target.offsetHeight>0||n.target.offsetWidth>0)&&(ht(),je.setSize("100%","100%"),je.refresh())}}catch(e){l.e(e)}finally{l.f()}}));return e.observe(dt.current.parentElement),e}();return function(){var t,l;null!==(t=dt.current)&&void 0!==t&&t.parentElement&&e.unobserve(null===(l=dt.current)||void 0===l?void 0:l.parentElement)}}}),[je,ht]),(0,u.useEffect)((function(){if(je){for(var e=[],t=function(){var t=o()(n[l],2),a=t[0],i=t[1],r=s()({},a,(function(){bt(i)}));e.push(r),je.addKeyMap(r)},l=0,n=Object.entries(ge);l<n.length;l++)t();return function(){for(var t=0,l=e;t<l.length;t++){var n=l[t];je.removeKeyMap(n)}}}}),[je]),(0,u.useEffect)((function(){q!==De&&Re(q)}),[q]),(0,pe.Z)((function(){if(!O&&Ke>0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(E);e>=Ke+1e4&&(!t||t!==Ee)&&(window.sessionStorage.setItem(E,Ee),lt(!0))}}),1e4),(0,u.useEffect)((function(){Fe(k)}),[je,k]),(0,u.useEffect)((function(){je&&_&&je.focus()}),[je,_]),(0,u.useEffect)((function(){if(Oe&&je){var e=function(e){var t=e.target;if(ft.current){var l=t.scrollTop/t.scrollHeight;ft.current.scrollTop=ft.current.scrollHeight*l}},t=je.getScrollerElement();return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[je,Oe]),(0,u.useEffect)((function(){if(je&&K){var e=function(e,t){K(e,t)};return je.on("beforeChange",e),function(){je.off("beforeChange",e)}}}),[je,K]),(0,u.useEffect)((function(){if(je&&V){var e=function(){V(je.getValue())};return je.on("blur",e),function(){je.off("blur",e)}}}),[je,V]),(0,u.useEffect)((function(){if(je){var e=function(e,t){var l=e.getValue();Me(l),Ye((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),n&&(D?n(l,xt(l)):n(l))};return je.on("change",e),function(){je.off("change",e)}}}),[je,n]),(0,u.useEffect)((function(){if(je)if(null==l)je.setValue(""),Me("");else{var e=window.scrollY||window.pageYOffset;l!==je.getValue()&&(je.setValue(l),Me(l),je.setCursor(de?1:je.lineCount(),0),window.scrollTo(0,e))}}),[je,l]);var bt=(0,u.useCallback)((function(e){var t=je.getCursor(),l=je.getSelection(),n=l.split("\n");switch(e){case"bold":return je.replaceSelection("**"+l+"**"),""===l&&je.setCursor(t.line,t.ch+2),je.focus();case"italic":return je.replaceSelection("*"+l+"*"),""===l&&je.setCursor(t.line,t.ch+1),je.focus();case"code":return je.replaceSelection("`"+l+"`"),""===l&&je.setCursor(t.line,t.ch+1),je.focus();case"inline-latex":return qe("inline-latex"),je.focus();case"latex":return je.replaceSelection("```latex\n"+l+"\n```"),je.setCursor(t.line+1,l.length+1),je.focus();case"line-break":return je.replaceSelection("<br/>\n"),je.focus();case"list-ul":return""===l?je.replaceSelection("- "+l):je.replaceSelection(n.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),je.focus();case"list-ol":return""===l?je.replaceSelection("1. "+l):je.replaceSelection(n.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),je.focus();case"add-null-ch":return""===l&&je.setCursor(t.line,t.ch),je.replaceSelection("▁"),je.focus();case"add-signal":return""===l&&je.setCursor(t.line,t.ch),je.replaceSelection("@▁@"),je.focus();case"add-multiple":return""===l&&je.setCursor(t.line,t.ch),je.replaceSelection(fe),je.focus();case"inster-template-1":return""===l&&je.setCursor(t.line,t.ch),je.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),je.focus();case"eraser":return je.setValue(""),je.focus();case"trigger-watch":return Fe(!Oe),je.focus();case"trigger-full-screen":return Re(!De),je.focus();case ie:return void qe(ie);case ue:return void qe(ue);case oe:return void qe(oe);case se:return void qe(se);case"maths-latex":return void qe("maths-latex");case re:return void qe(re);case ce:return void qe(ce);default:throw new Error}}),[je,Oe,De]),mt=(0,u.useCallback)((function(e,t){var l,n,a,i,o;switch(qe(""),ze){case ie:var r=e.title,s=e.link;return je.replaceSelection("[".concat(r,"](").concat(s,")")),je.focus();case ue:var u=e.language,c=e.content;return je.replaceSelection(["```"+u,c,"```"].join("\n")),je.focus();case"maths-latex":for(var d=atob(e),v=new Uint8Array(d.length),p=0;p<d.length;p++)v[p]=d.charCodeAt(p);var f=new Blob([v],{type:"image/png"});(0,j.I)(f,(function(e){e.id?je.replaceSelection(".concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}));break;case"inline-latex":je.replaceSelection("`$$"+e+"$$`");break;case oe:case se:case"add-flowchart":var h=e.src,b=e.alt,m=t,g=null==m||null===(l=m.name)||void 0===l||null===(l=l.split("."))||void 0===l||null===(n=l.pop)||void 0===n?void 0:n.call(l);return(null==m||null===(a=m.type)||void 0===a?void 0:a.indexOf("image"))>-1||null==m||!m.type?b?je.replaceSelection(".concat(h,' "').concat(b,'" )')):je.replaceSelection("")):(null==m||null===(i=m.type)||void 0===i?void 0:i.indexOf("video"))>-1?je.replaceSelection('<video width="100%" controls src="'.concat(h,'"></video>')):(null==m||null===(o=m.type)||void 0===o?void 0:o.indexOf("pdf"))>-1?je.replaceSelection('<a href="'.concat(h,"?type=").concat(m.type,'&disposition=inline" target="_blank">').concat(m.name,"</a>")):he.includes(g)?je.replaceSelection('<a href="'.concat(h,'?type=office&disposition=inline" target="_blank">').concat(m.name,"</a>")):je.replaceSelection("[".concat(m.name,"](").concat(h,")")),je.focus();case ce:for(var w=e.row,y=e.col,x=e.align,_="\n",k=0;k<w;k++){for(var S=[],B=[],T=0;T<y;T++)1===k&&B.push(ve[x]),S.push(" ");1===k&&(_+="| ".concat(B.join(" | ")," |\n")),_+="| ".concat(S.join(1===y?"":" | ")," |\n")}return je.replaceSelection(_+"\n"),je.focus();default:throw new Error}}),[je,ze]),gt=(0,u.useMemo)((function(){switch(ze){case ie:return(0,f.jsx)(T,{callback:mt,onCancel:wt});case ue:return(0,f.jsx)(C.Z,{callback:mt,onCancel:wt});case oe:return(0,f.jsx)(j.Z,{callback:mt,onCancel:wt});case re:return(0,f.jsx)(U,{callback:mt,onCancel:wt});case ce:return(0,f.jsx)($,{callback:mt,onCancel:wt});case"maths-latex":return(0,f.jsx)(le,{showSaveButton:!0,callback:mt});case"inline-latex":return(0,f.jsx)(ne.Z,{showSaveButton:!0,callback:mt});default:return null}}),[ze]);function wt(){qe("")}(0,u.useEffect)((function(){if(pt.current){var e=function(e){a=!0,i=e.pageY},t=function(){a=!1},l=function(e){if(a){var t=e.pageY-i;t<0&&(t=0),t>300&&(t=300),Qe(b+t+"px")}},n=pt.current,a=!1,i=0;return n.addEventListener("mousedown",e),document.addEventListener("mousemove",l),document.addEventListener("mouseup",t),function(){n.removeEventListener("mousedown",e),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",t)}}}),[je,pt]),(0,u.useEffect)((function(){Qe(b)}),[b]);var yt={width:be(r),height:be($e)},xt=((0,u.useMemo)((function(){if(Ke){var e=new Date(Ke),t=e.getHours(),l=e.getMinutes(),n=e.getSeconds();return l=l<10?"0"+l:l,n=n<10?"0"+n:n,"".concat(t=t<10?"0"+t:t,":").concat(l,":").concat(n)}return 0}),[Ke]),function(e){var t=[];if(D){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,l,n){t.push({multiLine:!("@▁@"===e)})}))}return t});(0,u.useEffect)((function(){we[ze]&&ze!==se&&ze!==re&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],t=window.innerWidth/2-e.offsetWidth/2,l=window.innerHeight/2-e.offsetHeight/2;ot(t),ct(l)}),0)}),[ze]);var _t=function(e,t,l,n){var a=document.body.clientHeight,i=document.body.clientWidth;return!(e<20&&l>e||e>i-20&&l<e||t<20&&n>t||t>a-20&&n<t)||(document.body.onmousemove=null,document.body.onmouseup=null,!1)};return(0,f.jsxs)(u.Fragment,{children:[(0,f.jsx)("div",{className:"markdown-editor-wrapper",ref:vt,children:(0,f.jsxs)("div",{className:"markdown-editor-container ".concat(X," ").concat(Oe?"on-preview":""," ").concat(g?"mini":""," ").concat(De?"full-screen":""),style:yt,children:[(0,f.jsx)(y,{insertTemp:S,watch:Oe,fullScreen:De,showNullButton:Z,showNullProgramButton:D,onActionCallback:bt,hidetoolBar:W,extraUse:Be}),(0,f.jsxs)("div",{className:"markdown-editor-body",children:[(0,f.jsx)("div",{className:"codemirror-container",children:(0,f.jsx)("textarea",{ref:dt,placeholder:_e})}),Oe?(0,f.jsxs)("div",{ref:ft,className:"preview-container",children:["stex"===L&&(0,f.jsx)(h,{value:Ee}),"stex"!==L&&(0,f.jsx)(p.Z,{disabledFill:ye,showProgramFill:D,value:Ee})]}):null]})]})}),A?(0,f.jsx)("a",{ref:pt,className:"editor-resize"}):null,ze===se&&(0,f.jsx)(P,{callback:mt,onCancel:wt}),ze===re&&(0,f.jsx)(U,{callback:mt,onCancel:wt}),(0,f.jsx)(x.Z,{children:we[ze]&&ze!==se&&ze!==re?(0,f.jsx)(R.Z,{maskClosable:!1,centered:!0,style:{position:"absolute",left:it,top:ut},title:(0,f.jsx)("div",{style:{cursor:"move"},onMouseDown:function(e){e.preventDefault();var t=e.clientX-it,l=e.clientY-ut;document.body.onmousemove=function(e){var n=e.clientX-t,a=e.clientY-l,i=document.getElementsByClassName("markdown-popup-form")[0],o=window.innerWidth-i.offsetWidth,r=window.innerHeight-i.offsetHeight;n=Math.max(0,Math.min(n,o)),a=Math.max(0,Math.min(a,r)),_t(e.clientX,e.clientY,t,l)&&(ot(n),ct(a))},document.body.onmouseup=function(){document.body.onmousemove=null}},children:we[ze]}),open:!0,onCancel:wt,footer:null,destroyOnClose:!0,width:ze===re?"1200px":null,height:ze===re?"80vh":null,className:"markdown-popup-form",children:gt}):null})]})}},58922:function(e,t,l){"use strict";l.d(t,{Z:function(){return m},I:function(){return w}});var n=l(82242),a=l.n(n),i=l(79800),o=l.n(i),r=l(78241),s=l(8591),u=l(92832),c=l(3113),d=l(95197),v=l(59301),p=l(37712),f=r.Z.useForm,h={width:280,marginRight:10},b={labelCol:{span:5},wrapperCol:{span:19}},m=function(e){var t=e.callback,l=e.onCancel,n=f(),i=o()(n,1)[0],d=(0,v.useRef)();function m(e,t){-1!==e.status?i.setFieldsValue({src:"/api/attachments/".concat(e.id),type:t.type}):s.ZP.error(e.message)}return(0,p.jsxs)(r.Z,a()(a()({form:i},b),{},{className:"upload-image-panel",onFinish:function(e){t(e,d.current)},style:{width:470,overflow:"hidden"},children:[(0,p.jsx)(r.Z.Item,{label:"图片地址",required:!0,children:(0,p.jsxs)("div",{className:"flex-container",children:[(0,p.jsx)(r.Z.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"请输入图片地址"}],children:(0,p.jsx)(u.Z,{style:h})}),(0,p.jsx)(g,{onFileChange:function(e){var t=e.target.files[0];d.current=t,w(t,m)}})]})}),(0,p.jsx)(r.Z.Item,{label:"图片描述",name:"alt",children:(0,p.jsx)(u.Z,{style:{width:264}})}),(0,p.jsxs)(r.Z.Item,{style:{textAlign:"right"},children:[(0,p.jsx)(c.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,p.jsx)(c.ZP,{type:"default",onClick:l,children:"取消"})]})]}))};function g(e){var t=e.onFileChange;return(0,p.jsxs)("label",{className:"upload-button",style:{cursor:"pointer"},children:["本地上传",(0,p.jsx)("input",{type:"file",onChange:t})]})}function w(e,t){if(!e)throw new String("没有文件");var l=new FormData;l.append("editormd-image-file",e),l.append("file_param_name","editormd-image-file"),l.append("byxhr","true");var n=new window.XMLHttpRequest;n.withCredentials=!0,n.addEventListener("load",(function(l){t(JSON.parse(l.target.responseText),e)}),!1),n.addEventListener("error",(function(e){console.error(e)}),!1),n.open("POST","".concat(d.KI,"/api/attachments.json")),n.send(l)}},42692:function(e,t,l){"use strict";l.d(t,{Z:function(){return p}});var n=l(82100),a=l.n(n),i=l(29186),o=l.n(i),r=l(80619),s=l.n(r),u=l(47074),c=l.n(u),d=l(59301),v=l(4676),p=function(e){s()(l,e);var t=c()(l);function l(e){var n;a()(this,l),n=t.call(this,e);var i=window.document;return n.node=i.createElement("div"),i.body.appendChild(n.node),n}return o()(l,[{key:"render",value:function(){var e=this.props.children;return(0,v.createPortal)(e,this.node)}},{key:"componentWillUnmount",value:function(){window.document.body.removeChild(this.node)}}]),l}(d.Component)},99944:function(e,t,l){"use strict";l.d(t,{Z:function(){return a}});var n=l(59301);function a(e,t){var l=(0,n.useRef)();(0,n.useEffect)((function(){l.current=e})),(0,n.useEffect)((function(){if(null!==t){var e=setInterval((function(){l.current()}),t);return function(){return clearInterval(e)}}}),[t])}},22608:function(e,t,l){"use strict";l.r(t),l.d(t,{default:function(){return E}});var n=l(7557),a=l.n(n),i=l(82242),o=l.n(i),r=l(41498),s=l.n(r),u=l(79800),c=l.n(u),d=l(39647),v=l.n(d),p=l(59301),f=l(91149),h=l(87381),b=l(20834),m=l(44e3),g=l(78241),w=l(8591),y=l(66104),x=l(95237),_=l(43604),k=l(57809),S=l(92832),B=l(28103),T=l(19842),C=l(3113),j=l(26358),L={flex_box_center:"flex_box_center___JefHi",flex_space_between:"flex_space_between___N1h0l",flex_box_vertical_center:"flex_box_vertical_center___Mtb4t",flex_box_center_end:"flex_box_center_end___F6G6K",flex_box_column:"flex_box_column___JldFX",bg:"bg___Hgook",title:"title____XaYs",titleLeft:"titleLeft___xe0PB",titleRight:"titleRight___wML5g",btns:"btns___l22_n"},N=l(37712),P=["graduation","globalSetting","loading","user","dispatch"],E=(b.Z.SubMenu,m.Z.Content,m.Z.Sider,(0,h.connect)((function(e){var t=e.graduation,l=e.loading,n=e.user;return{graduation:t,globalSetting:e.globalSetting,user:n,loading:l.effects}}))((function(e){var t,l,n,i,r,u,d,b=e.graduation,m=(e.globalSetting,e.loading,e.user),E=e.dispatch,M=(v()(e,P),(0,h.useParams)()),A=((0,h.useLocation)(),m.userInfo),G=g.Z.useForm(),O=c()(G,1)[0],F=b.addTopicData,Z=function(){var e=s()(a()().mark((function e(){var t,l,n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=O.getFieldsValue(),(l=o()({},t)).city&&(l.province=l.city[0],l.city=l.city[1]),e.next=5,E({type:"graduation/addTopic",payload:{coursesId:M.coursesId,attachment_ids:[],graduation_topic:l}});case 5:(n=e.sent).status?w.ZP.error(n.message):h.history.push("/classrooms/".concat(M.coursesId,"/graduation_topics/").concat(M.categoryId));case 7:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}();return(0,p.useEffect)((function(){E({type:"graduation/addTopicDefaultData",payload:o()({},M)})}),[M.coursesId]),(0,N.jsxs)("section",{className:"edu-container",children:[(0,N.jsxs)("section",{className:"animated fadeIn",children:[(0,N.jsx)("aside",{className:"mt10",children:A&&(0,N.jsxs)(y.Z,{separator:">",children:[(0,N.jsx)(y.Z.Item,{children:(0,N.jsx)(h.Link,{to:"".concat(A.first_category_url),children:null==A||null===(t=A.course)||void 0===t?void 0:t.course_name})}),(0,N.jsx)(y.Z.Item,{children:(0,N.jsx)(h.Link,{to:"/classrooms/".concat(M.coursesId,"/graduation_topics/").concat(M.categoryId),children:"毕设选题"})}),(0,N.jsx)(y.Z.Item,{children:"新建"})]})}),(0,N.jsx)("aside",{className:[L.title,"mt20"].join(" "),children:(0,N.jsxs)(x.Z,{style:{width:"100%"},children:[(0,N.jsx)(_.Z,{flex:"1",children:(0,N.jsx)("strong",{className:"font20 ml5",children:"新建毕设选题"})}),(0,N.jsx)(_.Z,{children:(0,N.jsx)(h.Link,{className:"font16 c-light-black",to:"/classrooms/".concat(M.coursesId,"/exercise"),children:"返回"})})]})})]}),(0,N.jsx)("section",{className:[L.bg,"pt30","pl30","pr30","pb30","mt20"].join(" "),children:(0,N.jsxs)(g.Z,{layout:"vertical",form:O,scrollToFirstError:!0,onFinish:function(){var e=s()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:Z();case 1:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),children:[(0,N.jsx)(g.Z.Item,{name:"tea_id",label:"指导老师:",rules:[{required:!0,message:"请选择指导老师"}],children:(0,N.jsx)(k.default,{size:"middle",placeholder:"请选择指导老师",style:{width:200},children:null===(l=F.teacher_list)||void 0===l?void 0:l.map((function(e,t){return(0,N.jsx)(k.default.Option,{value:e.id,children:e.name},t)}))})}),(0,N.jsx)(g.Z.Item,{name:"name",label:"选题名称:",rules:[{required:!0,message:"请填写试卷标题"}],children:(0,N.jsx)(S.Z,{maxLength:60,size:"middle",placeholder:"试卷标题,最大限制60个字符"})}),(0,N.jsx)(B.Z,{}),(0,N.jsx)(g.Z.Item,{label:"选题简介",name:"description",rules:[{required:!0,message:"请输入内容"}],children:(0,N.jsx)(f.Z,{watch:!0,placeholder:"请简要说明选题内容,最大限制5000个字符"})}),(0,N.jsxs)(x.Z,{gutter:[20,0],children:[(0,N.jsx)(_.Z,{flex:"1",children:(0,N.jsx)(g.Z.Item,{name:"topic_type",children:(0,N.jsx)(k.default,{size:"middle",placeholder:"请选择选题类型",children:null===(n=F.topic_type)||void 0===n?void 0:n.map((function(e,t){return(0,N.jsx)(k.default.Option,{value:e.id,children:e.name},t)}))})})}),(0,N.jsx)(_.Z,{flex:"1",children:(0,N.jsx)(g.Z.Item,{name:"topic_source",children:(0,N.jsx)(k.default,{size:"middle",placeholder:"请选择选题来源",children:null===(i=F.topic_source)||void 0===i?void 0:i.map((function(e,t){return(0,N.jsx)(k.default.Option,{value:e.id,children:e.name},t)}))})})}),(0,N.jsx)(_.Z,{flex:"1",children:(0,N.jsx)(g.Z.Item,{name:"topic_property_first",children:(0,N.jsx)(k.default,{size:"middle",placeholder:"请选择选题性质1",children:null===(r=F.topic_property_first)||void 0===r?void 0:r.map((function(e,t){return(0,N.jsx)(k.default.Option,{value:e.id,children:e.name},t)}))})})}),(0,N.jsx)(_.Z,{flex:"1",children:(0,N.jsx)(g.Z.Item,{name:"topic_property_second",children:(0,N.jsx)(k.default,{size:"middle",placeholder:"请选择选题性质2",children:null===(u=F.topic_property_second)||void 0===u?void 0:u.map((function(e,t){return(0,N.jsx)(k.default.Option,{value:e.id,children:e.name},t)}))})})}),(0,N.jsx)(_.Z,{flex:"150px"})]}),(0,N.jsx)(B.Z,{}),(0,N.jsx)(g.Z.Item,{name:"source_unit",label:"选题来源单位:",children:(0,N.jsx)(S.Z,{width:"200",size:"middle",style:{width:200},placeholder:"请填写来源单位"})}),(0,N.jsx)(g.Z.Item,{name:"topic_repeat",label:"选题重复情况:",children:(0,N.jsx)(k.default,{size:"middle",placeholder:"请选择重复情况",style:{width:200},children:null===(d=F.topic_repeat)||void 0===d?void 0:d.map((function(e,t){return(0,N.jsx)(k.default.Option,{value:e.id,children:e.name},t)}))})}),(0,N.jsx)(g.Z.Item,{name:"city",label:"调研或实习地点:",children:(0,N.jsx)(T.Z,{size:"middle",style:{width:200},options:j.P,placeholder:"请选择所在地"})})]})}),(0,N.jsxs)("aside",{className:L.btns,children:[(0,N.jsx)(C.ZP,{type:"primary",onClick:function(){O.submit()},children:"保存"}),(0,N.jsx)(h.Link,{to:"/classrooms/".concat(M.coursesId,"/graduation_topics/").concat(M.categoryId),children:"取消"})]})]})})))},26358:function(e,t,l){"use strict";l.d(t,{P:function(){return n}});var n=[{value:"北京",label:"北京",children:[{value:"东城",label:"东城"},{value:"西城",label:"西城"},{value:"朝阳",label:"朝阳"},{value:"丰台",label:"丰台"},{value:"石景山",label:"石景山"},{value:"海淀",label:"海淀"},{value:"门头沟",label:"门头沟"},{value:"房山",label:"房山"},{value:"通州",label:"通州"},{value:"顺义",label:"顺义"},{value:"昌平",label:"昌平"},{value:"大兴",label:"大兴"},{value:"平谷",label:"平谷"},{value:"怀柔",label:"怀柔"},{value:"密云",label:"密云"},{value:"延庆",label:"延庆"}]},{value:"上海",label:"上海",children:[{value:"崇明",label:"崇明"},{value:"黄浦",label:"黄浦"},{value:"卢湾",label:"卢湾"},{value:"徐汇",label:"徐汇"},{value:"长宁",label:"长宁"},{value:"静安",label:"静安"},{value:"普陀",label:"普陀"},{value:"闸北",label:"闸北"},{value:"虹口",label:"虹口"},{value:"杨浦",label:"杨浦"},{value:"闵行",label:"闵行"},{value:"宝山",label:"宝山"},{value:"嘉定",label:"嘉定"},{value:"浦东",label:"浦东"},{value:"金山",label:"金山"},{value:"松江",label:"松江"},{value:"青浦",label:"青浦"},{value:"南汇",label:"南汇"},{value:"奉贤",label:"奉贤"}]},{value:"广东",label:"广东",children:[{value:"广州",label:"广州"},{value:"深圳",label:"深圳"},{value:"珠海",label:"珠海"},{value:"东莞",label:"东莞"},{value:"中山",label:"中山"},{value:"佛山",label:"佛山"},{value:"惠州",label:"惠州"},{value:"河源",label:"河源"},{value:"潮州",label:"潮州"},{value:"江门",label:"江门"},{value:"揭阳",label:"揭阳"},{value:"茂名",label:"茂名"},{value:"梅州",label:"梅州"},{value:"清远",label:"清远"},{value:"汕头",label:"汕头"},{value:"汕尾",label:"汕尾"},{value:"韶关",label:"韶关"},{value:"顺德",label:"顺德"},{value:"阳江",label:"阳江"},{value:"云浮",label:"云浮"},{value:"湛江",label:"湛江"},{value:"肇庆",label:"肇庆"}]},{value:"江苏",label:"江苏",children:[{value:"南京",label:"南京"},{value:"常熟",label:"常熟"},{value:"常州",label:"常州"},{value:"海门",label:"海门"},{value:"淮安",label:"淮安"},{value:"江都",label:"江都"},{value:"江阴",label:"江阴"},{value:"昆山",label:"昆山"},{value:"连云港",label:"连云港"},{value:"南通",label:"南通"},{value:"启东",label:"启东"},{value:"沭阳",label:"沭阳"},{value:"宿迁",label:"宿迁"},{value:"苏州",label:"苏州"},{value:"太仓",label:"太仓"},{value:"泰州",label:"泰州"},{value:"同里",label:"同里"},{value:"无锡",label:"无锡"},{value:"徐州",label:"徐州"},{value:"盐城",label:"盐城"},{value:"扬州",label:"扬州"},{value:"宜兴",label:"宜兴"},{value:"仪征",label:"仪征"},{value:"张家港",label:"张家港"},{value:"镇江",label:"镇江"}]},{value:"重庆",label:"重庆",children:[{value:"万州",label:"万州"},{value:"涪陵",label:"涪陵"},{value:"渝中",label:"渝中"},{value:"大渡口",label:"大渡口"},{value:"江北",label:"江北"},{value:"沙坪坝",label:"沙坪坝"},{value:"九龙坡",label:"九龙坡"},{value:"南岸",label:"南岸"},{value:"北碚",label:"北碚"},{value:"万盛",label:"万盛"},{value:"双挢",label:"双挢"},{value:"渝北",label:"渝北"},{value:"巴南",label:"巴南"},{value:"黔江",label:"黔江"},{value:"长寿",label:"长寿"},{value:"綦江",label:"綦江"},{value:"潼南",label:"潼南"},{value:"铜梁",label:"铜梁"},{value:"大足",label:"大足"},{value:"荣昌",label:"荣昌"},{value:"壁山",label:"壁山"},{value:"梁平",label:"梁平"},{value:"城口",label:"城口"},{value:"丰都",label:"丰都"},{value:"垫江",label:"垫江"},{value:"武隆",label:"武隆"},{value:"忠县",label:"忠县"},{value:"开县",label:"开县"},{value:"云阳",label:"云阳"},{value:"奉节",label:"奉节"},{value:"巫山",label:"巫山"},{value:"巫溪",label:"巫溪"},{value:"石柱",label:"石柱"},{value:"秀山",label:"秀山"},{value:"酉阳",label:"酉阳"},{value:"彭水",label:"彭水"},{value:"江津",label:"江津"},{value:"合川",label:"合川"},{value:"永川",label:"永川"},{value:"南川",label:"南川"}]},{value:"安徽",label:"安徽",children:[{value:"合肥",label:"合肥"},{value:"安庆",label:"安庆"},{value:"蚌埠",label:"蚌埠"},{value:"亳州",label:"亳州"},{value:"巢湖",label:"巢湖"},{value:"滁州",label:"滁州"},{value:"阜阳",label:"阜阳"},{value:"贵池",label:"贵池"},{value:"淮北",label:"淮北"},{value:"淮化",label:"淮化"},{value:"淮南",label:"淮南"},{value:"黄山",label:"黄山"},{value:"九华山",label:"九华山"},{value:"六安",label:"六安"},{value:"马鞍山",label:"马鞍山"},{value:"宿州",label:"宿州"},{value:"铜陵",label:"铜陵"},{value:"屯溪",label:"屯溪"},{value:"芜湖",label:"芜湖"},{value:"宣城",label:"宣城"}]},{value:"福建",label:"福建",children:[{value:"福州",label:"福州"},{value:"厦门",label:"厦门"},{value:"泉州",label:"泉州"},{value:"漳州",label:"漳州"},{value:"龙岩",label:"龙岩"},{value:"南平",label:"南平"},{value:"宁德",label:"宁德"},{value:"莆田",label:"莆田"},{value:"三明",label:"三明"}]},{value:"甘肃",label:"甘肃",children:[{value:"兰州",label:"兰州"},{value:"嘉峪关",label:"嘉峪关"},{value:"白银",label:"白银"},{value:"定西",label:"定西"},{value:"敦煌",label:"敦煌"},{value:"甘南",label:"甘南"},{value:"金昌",label:"金昌"},{value:"酒泉",label:"酒泉"},{value:"临夏",label:"临夏"},{value:"平凉",label:"平凉"},{value:"天水",label:"天水"},{value:"陇南",label:"陇南"},{value:"武威",label:"武威"},{value:"西峰",label:"西峰"},{value:"张掖",label:"张掖"}]},{value:"广西",label:"广西",children:[{value:"南宁",label:"南宁"},{value:"来宾",label:"来宾"},{value:"百色",label:"百色"},{value:"北海",label:"北海"},{value:"桂林",label:"桂林"},{value:"防城港",label:"防城港"},{value:"贵港",label:"贵港"},{value:"河池",label:"河池"},{value:"贺州",label:"贺州"},{value:"柳州",label:"柳州"},{value:"钦州",label:"钦州"},{value:"梧州",label:"梧州"},{value:"玉林",label:"玉林"}]},{value:"贵州",label:"贵州",children:[{value:"贵阳",label:"贵阳"},{value:"安顺",label:"安顺"},{value:"毕节",label:"毕节"},{value:"都匀",label:"都匀"},{value:"凯里",label:"凯里"},{value:"六盘水",label:"六盘水"},{value:"铜仁",label:"铜仁"},{value:"兴义",label:"兴义"},{value:"玉屏",label:"玉屏"},{value:"遵义",label:"遵义"}]},{value:"海南",label:"海南",children:[{value:"海口",label:"海口"},{value:"儋县",label:"儋县"},{value:"陵水",label:"陵水"},{value:"琼海",label:"琼海"},{value:"三亚",label:"三亚"},{value:"通什",label:"通什"},{value:"万宁",label:"万宁"}]},{value:"河北",label:"河北",children:[{value:"石家庄",label:"石家庄"},{value:"保定",label:"保定"},{value:"北戴河",label:"北戴河"},{value:"沧州",label:"沧州"},{value:"承德",label:"承德"},{value:"丰润",label:"丰润"},{value:"邯郸",label:"邯郸"},{value:"衡水",label:"衡水"},{value:"廊坊",label:"廊坊"},{value:"南戴河",label:"南戴河"},{value:"秦皇岛",label:"秦皇岛"},{value:"唐山",label:"唐山"},{value:"新城",label:"新城"},{value:"邢台",label:"邢台"},{value:"张家口",label:"张家口"}]},{value:"黑龙江",label:"黑龙江",children:[{value:"哈尔滨",label:"哈尔滨"},{value:"北安",label:"北安"},{value:"大庆",label:"大庆"},{value:"大兴安岭",label:"大兴安岭"},{value:"鹤岗",label:"鹤岗"},{value:"黑河",label:"黑河"},{value:"佳木斯",label:"佳木斯"},{value:"鸡西",label:"鸡西"},{value:"牡丹江",label:"牡丹江"},{value:"齐齐哈尔",label:"齐齐哈尔"},{value:"七台河",label:"七台河"},{value:"双鸭山",label:"双鸭山"},{value:"绥化",label:"绥化"},{value:"伊春",label:"伊春"}]},{value:"河南",label:"河南",children:[{value:"郑州",label:"郑州"},{value:"安阳",label:"安阳"},{value:"鹤壁",label:"鹤壁"},{value:"潢川",label:"潢川"},{value:"焦作",label:"焦作"},{value:"济源",label:"济源"},{value:"开封",label:"开封"},{value:"漯河",label:"漯河"},{value:"洛阳",label:"洛阳"},{value:"南阳",label:"南阳"},{value:"平顶山",label:"平顶山"},{value:"濮阳",label:"濮阳"},{value:"三门峡",label:"三门峡"},{value:"商丘",label:"商丘"},{value:"新乡",label:"新乡"},{value:"信阳",label:"信阳"},{value:"许昌",label:"许昌"},{value:"周口",label:"周口"},{value:"驻马店",label:"驻马店"}]},{value:"香港",label:"香港",children:[{value:"香港",label:"香港"},{value:"九龙",label:"九龙"},{value:"新界",label:"新界"}]},{value:"湖北",label:"湖北",children:[{value:"武汉",label:"武汉"},{value:"天门",label:"天门"},{value:"恩施",label:"恩施"},{value:"鄂州",label:"鄂州"},{value:"黄冈",label:"黄冈"},{value:"黄石",label:"黄石"},{value:"荆门",label:"荆门"},{value:"荆州",label:"荆州"},{value:"潜江",label:"潜江"},{value:"十堰",label:"十堰"},{value:"随州",label:"随州"},{value:"武穴",label:"武穴"},{value:"仙桃",label:"仙桃"},{value:"咸宁",label:"咸宁"},{value:"襄阳",label:"襄阳"},{value:"襄樊",label:"襄樊"},{value:"孝感",label:"孝感"},{value:"宜昌",label:"宜昌"}]},{value:"湖南",label:"湖南",children:[{value:"长沙",label:"长沙"},{value:"常德",label:"常德"},{value:"郴州",label:"郴州"},{value:"衡阳",label:"衡阳"},{value:"怀化",label:"怀化"},{value:"吉首",label:"吉首"},{value:"娄底",label:"娄底"},{value:"邵阳",label:"邵阳"},{value:"湘潭",label:"湘潭"},{value:"益阳",label:"益阳"},{value:"岳阳",label:"岳阳"},{value:"永州",label:"永州"},{value:"张家界",label:"张家界"},{value:"株洲",label:"株洲"}]},{value:"江西",label:"江西",children:[{value:"南昌",label:"南昌"},{value:"抚州",label:"抚州"},{value:"赣州",label:"赣州"},{value:"吉安",label:"吉安"},{value:"景德镇",label:"景德镇"},{value:"井冈山",label:"井冈山"},{value:"九江",label:"九江"},{value:"庐山",label:"庐山"},{value:"萍乡",label:"萍乡"},{value:"上饶",label:"上饶"},{value:"新余",label:"新余"},{value:"宜春",label:"宜春"},{value:"鹰潭",label:"鹰潭"}]},{value:"吉林",label:"吉林",children:[{value:"长春",label:"长春"},{value:"吉林",label:"吉林"},{value:"白城",label:"白城"},{value:"白山",label:"白山"},{value:"珲春",label:"珲春"},{value:"辽源",label:"辽源"},{value:"梅河",label:"梅河"},{value:"四平",label:"四平"},{value:"松原",label:"松原"},{value:"通化",label:"通化"},{value:"延吉",label:"延吉"}]},{value:"辽宁",label:"辽宁",children:[{value:"沈阳",label:"沈阳"},{value:"鞍山",label:"鞍山"},{value:"本溪",label:"本溪"},{value:"朝阳",label:"朝阳"},{value:"大连",label:"大连"},{value:"丹东",label:"丹东"},{value:"抚顺",label:"抚顺"},{value:"阜新",label:"阜新"},{value:"葫芦岛",label:"葫芦岛"},{value:"锦州",label:"锦州"},{value:"辽阳",label:"辽阳"},{value:"盘锦",label:"盘锦"},{value:"铁岭",label:"铁岭"},{value:"营口",label:"营口"}]},{value:"澳门",label:"澳门",children:[{value:"澳门",label:"澳门"}]},{value:"内蒙古",label:"内蒙古",children:[{value:"呼和浩特",label:"呼和浩特"},{value:"阿拉善盟",label:"阿拉善盟"},{value:"包头",label:"包头"},{value:"赤峰",label:"赤峰"},{value:"东胜",label:"东胜"},{value:"海拉尔",label:"海拉尔"},{value:"集宁",label:"集宁"},{value:"临河",label:"临河"},{value:"通辽",label:"通辽"},{value:"乌海",label:"乌海"},{value:"乌兰浩特",label:"乌兰浩特"},{value:"锡林浩特",label:"锡林浩特"}]},{value:"宁夏",label:"宁夏",children:[{value:"银川",label:"银川"},{value:"固源",label:"固源"},{value:"石嘴山",label:"石嘴山"},{value:"吴忠",label:"吴忠"}]},{value:"青海",label:"青海",children:[{value:"西宁",label:"西宁"},{value:"德令哈",label:"德令哈"},{value:"格尔木",label:"格尔木"},{value:"共和",label:"共和"},{value:"海东",label:"海东"},{value:"海晏",label:"海晏"},{value:"玛沁",label:"玛沁"},{value:"同仁",label:"同仁"},{value:"玉树",label:"玉树"}]},{value:"山东",label:"山东",children:[{value:"济南",label:"济南"},{value:"滨州",label:"滨州"},{value:"兖州",label:"兖州"},{value:"德州",label:"德州"},{value:"东营",label:"东营"},{value:"菏泽",label:"菏泽"},{value:"济宁",label:"济宁"},{value:"莱芜",label:"莱芜"},{value:"聊城",label:"聊城"},{value:"临沂",label:"临沂"},{value:"蓬莱",label:"蓬莱"},{value:"青岛",label:"青岛"},{value:"曲阜",label:"曲阜"},{value:"日照",label:"日照"},{value:"泰安",label:"泰安"},{value:"潍坊",label:"潍坊"},{value:"威海",label:"威海"},{value:"烟台",label:"烟台"},{value:"枣庄",label:"枣庄"},{value:"淄博",label:"淄博"}]},{value:"山西",label:"山西",children:[{value:"太原",label:"太原"},{value:"吕梁",label:"吕梁"},{value:"长治",label:"长治"},{value:"大同",label:"大同"},{value:"候马",label:"候马"},{value:"晋城",label:"晋城"},{value:"离石",label:"离石"},{value:"临汾",label:"临汾"},{value:"宁武",label:"宁武"},{value:"朔州",label:"朔州"},{value:"忻州",label:"忻州"},{value:"阳泉",label:"阳泉"},{value:"榆次",label:"榆次"},{value:"晋中",label:"晋中"},{value:"运城",label:"运城"}]},{value:"陕西",label:"陕西",children:[{value:"西安",label:"西安"},{value:"安康",label:"安康"},{value:"宝鸡",label:"宝鸡"},{value:"汉中",label:"汉中"},{value:"渭南",label:"渭南"},{value:"商州",label:"商州"},{value:"绥德",label:"绥德"},{value:"铜川",label:"铜川"},{value:"咸阳",label:"咸阳"},{value:"延安",label:"延安"},{value:"榆林",label:"榆林"}]},{value:"四川",label:"四川",children:[{value:"成都",label:"成都"},{value:"巴中",label:"巴中"},{value:"达川",label:"达川"},{value:"德阳",label:"德阳"},{value:"都江堰",label:"都江堰"},{value:"峨眉山",label:"峨眉山"},{value:"涪陵",label:"涪陵"},{value:"广安",label:"广安"},{value:"广元",label:"广元"},{value:"九寨沟",label:"九寨沟"},{value:"康定",label:"康定"},{value:"乐山",label:"乐山"},{value:"泸州",label:"泸州"},{value:"马尔康",label:"马尔康"},{value:"绵阳",label:"绵阳"},{value:"眉山",label:"眉山"},{value:"南充",label:"南充"},{value:"内江",label:"内江"},{value:"攀枝花",label:"攀枝花"},{value:"遂宁",label:"遂宁"},{value:"汶川",label:"汶川"},{value:"西昌",label:"西昌"},{value:"雅安",label:"雅安"},{value:"宜宾",label:"宜宾"},{value:"自贡",label:"自贡"},{value:"资阳",label:"资阳"}]},{value:"台湾",label:"台湾",children:[{value:"台北",label:"台北"},{value:"基隆",label:"基隆"},{value:"台南",label:"台南"},{value:"台中",label:"台中"},{value:"高雄",label:"高雄"},{value:"屏东",label:"屏东"},{value:"南投",label:"南投"},{value:"云林",label:"云林"},{value:"新竹",label:"新竹"},{value:"彰化",label:"彰化"},{value:"苗栗",label:"苗栗"},{value:"嘉义",label:"嘉义"},{value:"桃园",label:"桃园"},{value:"宜兰",label:"宜兰"},{value:"台东",label:"台东"},{value:"金门",label:"金门"},{value:"马祖",label:"马祖"},{value:"澎湖",label:"澎湖"}]},{value:"天津",label:"天津",children:[{value:"天津",label:"天津"},{value:"和平",label:"和平"},{value:"东丽",label:"东丽"},{value:"河东",label:"河东"},{value:"西青",label:"西青"},{value:"河西",label:"河西"},{value:"津南",label:"津南"},{value:"南开",label:"南开"},{value:"北辰",label:"北辰"},{value:"河北",label:"河北"},{value:"武清",label:"武清"},{value:"红挢",label:"红挢"},{value:"塘沽",label:"塘沽"},{value:"汉沽",label:"汉沽"},{value:"大港",label:"大港"},{value:"宁河",label:"宁河"},{value:"静海",label:"静海"},{value:"宝坻",label:"宝坻"},{value:"蓟县",label:"蓟县"}]},{value:"新疆",label:"新疆",children:[{value:"乌鲁木齐",label:"乌鲁木齐"},{value:"阿克苏",label:"阿克苏"},{value:"阿勒泰",label:"阿勒泰"},{value:"阿图什",label:"阿图什"},{value:"博乐",label:"博乐"},{value:"昌吉",label:"昌吉"},{value:"东山",label:"东山"},{value:"哈密",label:"哈密"},{value:"和田",label:"和田"},{value:"喀什",label:"喀什"},{value:"克拉玛依",label:"克拉玛依"},{value:"库车",label:"库车"},{value:"库尔勒",label:"库尔勒"},{value:"奎屯",label:"奎屯"},{value:"石河子",label:"石河子"},{value:"塔城",label:"塔城"},{value:"吐鲁番",label:"吐鲁番"},{value:"伊宁",label:"伊宁"}]},{value:"西藏",label:"西藏",children:[{value:"拉萨",label:"拉萨"},{value:"阿里",label:"阿里"},{value:"昌都",label:"昌都"},{value:"林芝",label:"林芝"},{value:"那曲",label:"那曲"},{value:"日喀则",label:"日喀则"},{value:"山南",label:"山南"}]},{value:"云南",label:"云南",children:[{value:"昆明",label:"昆明"},{value:"大理",label:"大理"},{value:"保山",label:"保山"},{value:"楚雄",label:"楚雄"},{value:"大理",label:"大理"},{value:"东川",label:"东川"},{value:"个旧",label:"个旧"},{value:"景洪",label:"景洪"},{value:"开远",label:"开远"},{value:"临沧",label:"临沧"},{value:"丽江",label:"丽江"},{value:"六库",label:"六库"},{value:"潞西",label:"潞西"},{value:"曲靖",label:"曲靖"},{value:"思茅",label:"思茅"},{value:"文山",label:"文山"},{value:"西双版纳",label:"西双版纳"},{value:"玉溪",label:"玉溪"},{value:"中甸",label:"中甸"},{value:"昭通",label:"昭通"}]},{value:"浙江",label:"浙江",children:[{value:"杭州",label:"杭州"},{value:"温州",label:"温州"},{value:"安吉",label:"安吉"},{value:"慈溪",label:"慈溪"},{value:"定海",label:"定海"},{value:"奉化",label:"奉化"},{value:"海盐",label:"海盐"},{value:"黄岩",label:"黄岩"},{value:"湖州",label:"湖州"},{value:"嘉兴",label:"嘉兴"},{value:"金华",label:"金华"},{value:"临安",label:"临安"},{value:"临海",label:"临海"},{value:"丽水",label:"丽水"},{value:"宁波",label:"宁波"},{value:"瓯海",label:"瓯海"},{value:"平湖",label:"平湖"},{value:"千岛湖",label:"千岛湖"},{value:"衢州",label:"衢州"},{value:"江山",label:"江山"},{value:"瑞安",label:"瑞安"},{value:"绍兴",label:"绍兴"},{value:"嵊州",label:"嵊州"},{value:"台州",label:"台州"},{value:"温岭",label:"温岭"},{value:"余姚",label:"余姚"},{value:"舟山",label:"舟山"}]},{value:"海外",label:"海外",children:[{value:"美国",label:"美国"},{value:"日本",label:"日本"},{value:"英国",label:"英国"},{value:"法国",label:"法国"},{value:"德国",label:"德国"},{value:"其他",label:"其他"}]}]}}]); |