diff --git a/index.html b/index.html index 2e6a4457b0..d66b5bccc6 100644 --- a/index.html +++ b/index.html @@ -183,7 +183,7 @@ display: block !important; } - + \ No newline at end of file diff --git a/p__CaseLibrary__Detail__index.d6d0ce9f.async.js b/p__CaseLibrary__Detail__index.d6d0ce9f.async.js new file mode 100644 index 0000000000..d8b5651467 --- /dev/null +++ b/p__CaseLibrary__Detail__index.d6d0ce9f.async.js @@ -0,0 +1 @@ +(self.webpackChunk=self.webpackChunk||[]).push([[257],{30638:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__,_typeof=__webpack_require__(31468).default;(function(){if("function"!=typeof window.GGBApplet){var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var e={},t="5.0",n={},i=null,r=!1,o=!1,a=null,s=!1,l=null,u=null,c=0;c4?parseFloat(e):5};function _(){try{return window.self!==window.top}catch(e){return!0}}function k(){return(!n.hasOwnProperty("screenshotGenerator")||!n.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}e.setHTML5Codebase=function(e,t){u=e,O(e,t)},e.setJavaCodebase=e.setJavaCodebaseVersion=e.isCompiledInstalled=e.setPreCompiledScriptPath=e.setPreCompiledResourcePath=function(){},e.setHTML5CodebaseVersion=function(e,t){var n=parseFloat(e);NaN!==n&&n<5?console.log("The GeoGebra HTML5 codebase version "+n+" is deprecated. Using version latest instead."):(l=e,I(e,t))},e.getHTML5CodebaseVersion=function(){return m},e.getParameters=function(){return n},e.setFontsCSSURL=function(e){x=e},e.setGiacJSURL=function(e){},e.setJNLPFile=function(e){e},e.setJNLPBaseDir=function(e){},e.inject=function(){function t(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var i,r="auto",o=n.id,a=!1,l=0;l=5)return!0;var t=e.getAppletObject();return!(!t||"function"!=typeof t.recalculateEnvironments)&&(t.recalculateEnvironments(),!0)},e.startAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.startAnimation)&&(t.startAnimation(),!0)},e.stopAnimation=function(){var t=e.getAppletObject();return!(!t||"function"!=typeof t.stopAnimation)&&(t.stopAnimation(),!0)},e.getAppletObject=function(){var e=void 0!==n.id?n.id:"ggbApplet";return window[e]},e.resize=function(){};var L=function(e){return e&&"false"!==e},A=function(t,n,i){w(m)<=4.2&&(i=!0);var r=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==m||ggbHTML5LoadedCodebaseIsWebSimple&&!g)&&(r=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var o=document.createElement("div");o.classList.add("appletParameters","notranslate");var a=n.width,s=n.height;if(n.disableAutoScale=void 0===n.disableAutoScale?GGBAppletUtils.isFlexibleWorksheetEditor():n.disableAutoScale,void 0!==n.width)if(w(m)<=4.4)L(n.showToolBar)&&(n.height-=7),L(n.showAlgebraInput)&&(n.height-=37),n.width<605&&L(n.showToolBar)&&(n.width=605,a=605);else{var c=100;(L(n.showToolBar)||L(n.showMenuBar))&&(n.hasOwnProperty("customToolBar")&&(n.customToolbar=n.customToolBar),c=L(n.showMenuBar)?245:155),a=5?(n.appletOnLoad=function(e){var n=t.querySelector(".ggb_preview");n&&n.parentNode.removeChild(n),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(y),window.GGBT_wsf_view&&$(window).trigger("resize"),f(e)},b||y.appendChild(_)):o.appendChild(_),y.appendChild(o),b||t.appendChild(y),setTimeout((function(){e.resize()}),1)}function k(e,t){t&&"function"==typeof t.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(e,t.appletOnLoad):renderGGBElement(e),F("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",t)}function C(e,t){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:e,params:t}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(e){k(e.article,e.params)})),html5AppletsToProcess=null)},w(m)<5&&(e.className+=" geogebraweb")):k(e,t)}if(r){scriptLoadStarted=!0;for(var S=0;S0?(r.remove(),s.attr("id","fullscreencontent").show(),jQuery(o).append(s),window.dispatchEvent(new Event("resize"))):A(r,t,!1),window.GGBT_wsf_view.launchFullScreen(o)}else p=i,A(e,t,!1);if(!window.GGBT_wsf_view)for(a=0;ae/4*3&&(s=e/4*3),l=s/5.8,a.setAttribute("src",b),a.setAttribute("width",s),a.setAttribute("height",l);var c=(e-s)/2,h=(t-l)/2;a.style.left=c+"px",a.style.top=h+"px",r.appendChild(a)}return r.appendChild(u),r},N=function(e){return"html5"===(e=e.toLowerCase())||"screenshot"===e?e:"html5"},P=["web","webSimple","web3d","tablet","tablet3d","phone"],I=function(e,t){if(m=e,t)O(m,!0);else{var o,a,s=!r;if(s){var l=w(m);!isNaN(l)&&l<4.4&&(s=!1)}o="http"===window.location.protocol.substr(0,4)?window.location.protocol:"http:";var u=m.indexOf("//");for(var c in a=u>0?m:0===u?o+m:"https://www.geogebra.org/apps/5.2.814.0/",P)if(m.slice(-1*P[c].length)===P[c]||m.slice(-1*(P[c].length+1))===P[c]+"/")return void O(a,!1);GGBAppletUtils.isFlexibleWorksheetEditor()||!s||i.is3D||i.AV||i.SV||i.CV||i.EV2||i.CP||i.PC||i.DA||i.FI||i.PV||L(n.showToolBar)||L(n.showMenuBar)||L(n.showAlgebraInput)||L(n.enableRightClick)||n.appName&&"classic"!=n.appName?a+="web3d/":a+="webSimple/",O(a,!1)}},O=function(e,t){if(e.requirejs)d=e;else{"/"!==e.slice(-1)&&(e+="/"),d=e,null===t&&(t=-1===e.indexOf("http")),f=t,v="web.nocache.js",g=!1;var n=d.split("/");n.length>1&&(t||"webSimple"!==n[n.length-2]?P.indexOf(n[n.length-2])>=0&&(v=n[n.length-2]+".nocache.js"):(v="webSimple.nocache.js",g=!0)),n=e.split("/"),"test"===(m=n[n.length-3]).substr(0,4)?m=m.substr(4,1)+"."+m.substr(5,1):"war"!==m.substr(0,3)&&"beta"!==m.substr(0,4)||(m="5.0");var i=parseFloat(m);NaN!==i&&i<5&&e.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+i+" is deprecated. Using version latest instead."),I("5.0",t))}},F=function(e,t){window.console&&window.console.log&&(!t||void 0===t.showLogging||t.showLogging&&"false"!==t.showLogging)&&console.log(e)};function j(){var e=t;null!==l?e=l:parseFloat(e)<5&&(e="5.0"),I(e,!1),null!==u&&O(u,f),s=!0}return void 0!==n.material_id?C(j):j(),e},GGBAppletUtils=function(){"use strict";function e(){return void 0!==window.GGBT_wsf_edit}function t(e,t){1!=t?(e.style.transformOrigin="0% 0% 0px",e.style.webkitTransformOrigin="0% 0% 0px",e.style.transform="scale("+t+","+t+")",e.style.webkitTransform="scale("+t+","+t+")",e.style.maxWidth="initial",null!==e.querySelector(".ggb_preview")&&(e.querySelector(".ggb_preview").style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[0]&&(e.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),void 0!==e.querySelectorAll(".ggb_preview img")[1]&&(e.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(e.style.transform="none",e.style.webkitTransform="none")}function n(e,t,n,i,r){if(e.isScreenshoGenerator)return 1;var o,a=void 0!==i&&i,s=null!=e.noScaleMargin&&e.noScaleMargin,l=(o=e.autoHeight)&&"false"!==o,u=function(e,t,n,i,r,o){var a=null;if(null!=o&&""!=o)for(var s=e.parentNode;null!=s;){if((" "+s.className+" ").indexOf(" "+o+" ")>-1){a=s;break}s=s.parentNode}var l=0,u=0,c=0,h=0,d=0,f=0,p=0;if(a)l=a.offsetWidth,u=Math.max(i?a.offsetWidth:0,a.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(l=Math.min(window.innerWidth,document.documentElement.clientWidth),u=Math.min(window.innerHeight,document.documentElement.clientHeight),c=l):(l=window.innerWidth,u=window.innerHeight,c=window.innerWidth),e){var m=e.getBoundingClientRect();m.left>0&&m.left<=l&&(void 0===r||!r)&&("rtl"===document.dir?(d=l-m.width-m.left,f=c<=480?10:30):(f=m.left,d=c<=480?10:30),h=f+d)}e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(e.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(h=40,p=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(h=0,p=40))}return e&&((void 0===n||!n)&&t>0&&t+h1&&(a=!0)),t&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(a=!0),e.hasOwnProperty("disableAutoScale")&&e.disableAutoScale?o:(r=n(e,t,a,i,e.scaleContainerClass),!a||e.hasOwnProperty("scale")&&1!==o?Math.min(o,r):r)}function r(e){var t=Math.min(window.innerWidth,document.documentElement.clientWidth),n=Math.min(window.innerHeight,document.documentElement.clientHeight),i=e.getBoundingClientRect(),r=(t-i.width)/2,o=(n-i.height)/2;o<0&&(o=0),e.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(e.style.left=r<40?"40px":r+"px",e.style.top=o+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(e.style.top=o<40?"40px":o+"px",e.style.left=r+"px")}return{responsiveResize:function(n,o){var a=n.querySelector(".appletParameters");if(a){if("object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()){if(o.id!==a.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(n)}if(a.parentElement&&/fullscreen/.test(a.parentElement.className))return;var s=i(o,n);e()&&a.setAttribute("data-param-scale",s);for(var l=null,u=0;u=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(e){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(e){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(e){var t=c[e];return null==t?null:t},r=d,webModule.__errFn=e}function B(){function e(e){var t=e.lastIndexOf(rb);-1==t&&(t=e.length);var n=e.indexOf(sb);-1==n&&(n=e.length);var i=e.lastIndexOf(tb,Math.min(n,t));return i>=O?e.substring(O,i+P):W}var t,n=null!=(t=__gwt_getMetaProperty(wb))?t:W;return n==W&&(n=function(){for(var t=o.getElementsByTagName(_),n=O;nO?e[e.length-P].href:W}()),n==W&&function(){var e=o.location;return e.href==e.protocol+zb+e.host+e.pathname+e.search+e.hash}()&&(n=e(o.location.href)),n=function(t){if(t.match(/^\w+:\/\//));else{var n=o.createElement(ub);n.src=t+vb,t=e(n.src)}return t}(n),n}function C(e){return e.match(/^\//)||e.match(/^[a-zA-Z]+:\/\//)?e:webModule.__moduleBase+e}function D(){var e,t=O,i=[],o=[];function a(e){var t=o[e](),n=i[e];if(t in n)return t;var a=[];for(var s in n)a[n[s]]=s;throw r&&r(e,a,t),null}if(__gwt_isKnownPropertyValue=function(e,t){return t in i[e]},webModule.__getPropMap=function(){var e={};for(var t in i)i.hasOwnProperty(t)&&(e[t]=a(t));return e},webModule.__computePropValue=a,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var s=(e=Cb).indexOf(Db);-1!=s&&(t=parseInt(e.substring(s+P),$),e=e.substring(O,s))}catch(e){}return webModule.__softPermutationId=t,C(e+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}s[L]={moduleName:L},webModule.__moduleStartupDone=function(e){var t=s[L].bindings;s[L].bindings=function(){for(var n=t?t():{},i=e[webModule.__softPermutationId],r=O;r0){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:"",n=[],i=0;i b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:"\\begin{array}{c} \r\n a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r\n a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r\n\\end{array}"},{value:"\\left | a-b \\right | \\geqslant \\left | a \\right | -\\left | b \\right | "},{value:"-\\left | a \\right |\\leq a\\leqslant \\left | a \\right | "},{value:"\\left | a \\right |\\leqslant b \\Rightarrow -b \\leqslant a \\leqslant \\left | b \\right | "},{value:"\\left | a+b \\right | \\leqslant \\left | a \\right | + \\left | b \\right | "},{value:"\\begin{array}{c} \r\n a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r\n \\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r\n\\end{array}"},{value:"\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r\n\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) "},{value:"\\begin{array}{c} \r\n a,b \\in R^{+} \\ \r\n \\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r\n \\left( \\text{当且仅当}a=b\\text{时取“}=\\text{”号}\\right) \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n a,b \\in R \\ \r\n \\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r\n \\left( \\text{当且仅当}a=b\\text{时取“}=\\text{”号}\\right) \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n H_{n}=\\frac{n}{\\sum \\limits_{i=1}^{n}\\frac{1}{x_{i}}}= \\frac{n}{\\frac{1}{x_{1}}+ \\frac{1}{x_{2}}+ \\cdots + \\frac{1}{x_{n}}} \\ G_{n}=\\sqrt[n]{\\prod \\limits_{i=1}^{n}x_{i}}= \\sqrt[n]{x_{1}x_{2}\\cdots x_{n}} \\ A_{n}=\\frac{1}{n}\\sum \\limits_{i=1}^{n}x_{i}=\\frac{x_{1}+ x_{2}+ \\cdots + x_{n}}{n} \\ Q_{n}=\\sqrt{\\sum \\limits_{i=1}^{n}x_{i}^{2}}= \\sqrt{\\frac{x_{1}^{2}+ x_{2}^{2}+ \\cdots + x_{n}^{2}}{n}} \\ H_{n}\\leq G_{n}\\leq A_{n}\\leq Q_{n} \r\n\\end{array}"}]}]},{name:"积分",value:"\\frac{\\mathrm{d}\\partial}{\\partial x}",children:[{data:[{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}x^n=nx^{n-1} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}e^{ax}=a\\,e^{ax} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\ln(x)=\\frac{1}{x} "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\sin x=\\cos x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cos x=-\\sin x "},{value:"\\int k\\mathrm{d}x = kx+C "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\tan x=\\sec^2 x "},{value:"\\frac{\\mathrm{d}}{\\mathrm{d}x}\\cot x=-\\csc^2 x "},{value:"\\int \\frac{1}{x}\\mathrm{d}x= \\ln \\left| x \\right| +C "},{value:"\\int \\frac{1}{\\sqrt{1-x^{2}}}\\mathrm{d}x= \\arcsin x +C "},{value:"\\int \\frac{1}{1+x^{2}}\\mathrm{d}x= \\arctan x +C "},{value:"\\int u \\frac{\\mathrm{d}v}{\\mathrm{d}x}\\,\\mathrm{d}x=uv-\\int \\frac{\\mathrm{d}u}{\\mathrm{d}x}v\\,\\mathrm{d}x "},{value:"f(x) = \\int_{-\\infty}^\\infty \\hat f(x)\\xi\\,e^{2 \\pi i \\xi x} \\,\\mathrm{d}\\xi "},{value:"\\int x^{\\mu}\\mathrm{d}x=\\frac{x^{\\mu +1}}{\\mu +1}+C, \\left({\\mu \\neq -1}\\right) "}]}]},{name:"三角",value:"e^{i \\theta}",children:[{name:"求和 Summation",data:[{value:"e^{i \\theta} "},{value:"\\left(\\frac{\\pi}{2}-\\theta \\right ) "},{value:"\\text{sin}^{2}\\frac{\\alpha}{2}=\\frac{1- \\text{cos}\\alpha}{2} "},{value:"\\text{cos}^{2}\\frac{\\alpha}{2}=\\frac{1+ \\text{cos}\\alpha}{2} "},{value:"\\text{tan}\\frac{\\alpha}{2}=\\frac{\\text{sin}\\alpha}{1+ \\text{cos}\\alpha} "},{value:"\\sin \\alpha + \\sin \\beta =2 \\sin \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\sin \\alpha - \\sin \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha + \\cos \\beta =2 \\cos \\frac{\\alpha + \\beta}{2}\\cos \\frac{\\alpha - \\beta}{2} "},{value:"\\cos \\alpha - \\cos \\beta =-2\\sin \\frac{\\alpha + \\beta}{2}\\sin \\frac{\\alpha - \\beta}{2} "},{value:"a^{2}=b^{2}+c^{2}-2bc\\cos A "},{value:"\\frac{\\sin A}{a}=\\frac{\\sin B}{b}=\\frac{\\sin C}{c}=\\frac{1}{2R} "},{value:"\\sin \\left ( \\frac{\\pi}{2}-\\alpha \\right ) = \\cos \\alpha "},{value:"\\sin \\left ( \\frac{\\pi}{2}+\\alpha \\right ) = \\cos \\alpha "}]}]},{name:"统计",value:"C_{r}^{n}",children:[{data:[{value:"C_{r}^{n} "},{value:"\\frac{n!}{r!(n-r)!} "},{value:"\\sum_{i=1}^{n}{X_i} "},{value:"\\sum_{i=1}^{n}{X_i^2} "},{value:"X_1, \\cdots,X_n "},{value:"\\frac{x-\\mu}{\\sigma} "},{value:"\\sum_{i=1}^{n}{(X_i - \\overline{X})^2} "},{value:"\\begin{array}{c} \r\n \\text{若}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r\n \\text{则}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r\n\\end{array}"},{value:"P(E) ={n \\choose k}p^k (1-p)^{n-k} "},{value:"P \\left( A \\right) = \\lim \\limits_{n \\to \\infty}f_{n}\\left ( A \\right ) "},{value:"P \\left( \\bigcup \\limits_{i=1}^{+ \\infty}A_{i}\\right) = \\prod \\limits_{i=1}^{+ \\infty}P{\\left( A_{i}\\right)} "},{value:"\\begin{array}{c} \r\n P \\left( \\emptyset \\right) =0 \\\\ \r\n P \\left( S \\right) =1 \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n \\forall A \\in S \\\\ \r\n P \\left( A \\right) \\ge 0 \r\n\\end{array}"},{value:"P \\left( \\bigcup \\limits_{i=1}^{n}A_{i}\\right) = \\prod \\limits_{i=1}^{n}P \\left( A_{i}\\right) "},{value:"\\begin{array}{c} \r\n S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r\n P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r\n\\end{array}"},{value:"\\begin{array}{c} \r\n P_{n}=n! \\\\ \r\n A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r\n\\end{array}"}]}]}].map((function(e,t){return(0,c.jsxs)(o.Z,{flex:"110px",className:u.Z.item,children:[(0,c.jsxs)("div",{children:[(0,c.jsx)(l.Z,{value:"`$$"+e.value+"$$`"}),e.name]}),(0,c.jsx)("div",{className:u.Z.children,children:e.children.map((function(e,t){return(0,c.jsxs)("div",{children:[e.name&&(0,c.jsx)("h1",{children:e.name}),(0,c.jsx)(r.Z,{gutter:[10,10],children:e.data.map((function(e,t){return(0,c.jsx)(o.Z,{onClick:function(){return m(e)},className:u.Z.diamond,children:(0,c.jsx)(l.Z,{value:"`$$"+e.value+"$$`"})},t)}))})]},t)}))})]})}))})}],g=function(){var e=document.createElement("div");e.innerHTML=p.current.getValue();var t=e.innerText;return n&&n(t),t};return(0,i.useImperativeHandle)(t,(function(){return{getData:g}})),(0,c.jsxs)("div",{className:u.Z.mathWrap,children:[(0,c.jsx)(a.Z,{defaultActiveKey:"1",items:v}),(0,c.jsx)("math-field",{locale:"zh_cn",className:u.Z.mathField,placeholder:"请打开键盘,输入公式",ref:p,style:{width:800,marginTop:30,fontSize:18},children:f||""}),h&&(0,c.jsx)("div",{className:u.Z.button,children:(0,c.jsx)(s.ZP,{size:"large",onClick:g,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})}));t.Z=h},50184:function(e,t,n){"use strict";var i=n(82242),r=n.n(i),o=(n(59301),n(93314)),a=n(99571),s=n(37712);t.Z=function(e){var t=e.img,n=e.buttonProps,i=void 0===n?{}:n,l=e.styles,u=void 0===l?{}:l,c=e.customText,h=e.ButtonText,d=e.ButtonClick,f=e.Buttonclass,p=e.ButtonTwo,m=e.imgStyles,v=e.loading,g=void 0!==v&&v,y=e.className,b=void 0===y?"":y;return(0,s.jsxs)("section",{className:"tc animated fadeIn ".concat(b),style:r()({color:"#999",margin:"100px auto",visibility:g?"hidden":"visible"},u),children:[(0,s.jsx)("img",{src:t||o,style:r()(r()({},m),{},{pointerEvents:"none",userSelect:"none"})}),(0,s.jsx)("p",{className:"mt20 font14",children:c||"暂时还没有相关数据哦!"}),h&&(0,s.jsx)(a.ZP,r()(r()({className:f,onClick:d},i),{},{children:h})),p&&p]})}},4896:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var i=n(82242),r=n.n(i),o=n(7557),a=n.n(o),s=n(41498),l=n.n(s),u=n(79800),c=n.n(u),h=n(59301),d={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},f=n(99571),p=n(70557),m=n(54501),v=n(25399),g=n(89728),y=n(31005),b=n(50184),x=n(62233),w=n(49656),_=n(37712),k=function(e){var t,n,i,o,s,u,k=e.editOffice,C=void 0===k?"view":k,S=e.data,E=e.issaver,L=e.onSaver,A=(e.theme,e.type),T=e.filename,M=e.monacoEditor,D=e.className,R=e.style,B=e.close,N=e.onClose,P=e.hasMask,I=e.disabledDownload,O=e.onImgDimensions,F=e.showNodata,j=e.recordInfo,z=(0,h.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),H=c()(z,2),W=(H[0],H[1],(0,h.useState)("")),G=c()(W,2),U=(G[0],G[1]),Z=(0,h.useState)(),V=c()(Z,2),q=V[0],K=V[1],Y="build"===window.ENV?"/react/build":"",X=location.host.startsWith("localhost")?x.Z.PROXY_SERVER:x.Z.API_SERVER,J=(0,h.useRef)();null!==(t=S)&&void 0!==t&&t.startsWith("/api")&&"txt"!==A&&(S=x.Z.API_SERVER+S);function Q(e){return $.apply(this,arguments)}function $(){return($=l()(a()().mark((function e(t){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:"pdfdata"===t.data.type&&(L(t.data.data),window.removeEventListener("message",Q,!1)),console.log("mess---:",t.data);case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}T&&M&&(M.filename=T),(0,h.useEffect)((function(){var e,t=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==t||t.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&U(t[1])}))}),[]),(0,h.useEffect)((function(){var e;"office"===A&&(S.indexOf("bigfilescdn.")>-1||S.indexOf("bigfiles1")>-1?K({url:S,fileType:(e=S,e.substring(e.lastIndexOf("/")+1).split(".").pop()),model:S.indexOf("model=edit")?"edit":"view"}):ee())}),[A,S]);var ee=function(){var e=l()(a()().mark((function e(){var t,n,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",S),t=S,S.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,(0,y.gJ)({attachment_id:n});case 6:(i=e.sent).url=X+i.url,K(i);case 9:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),te=function(){S.startsWith("http")||S.startsWith("blob:")?ne():(0,g.Sv)(T||"educoder",S,T)},ne=function(){j&&(0,w.fc)({id:null==j?void 0:j.id,watch_type:1,course_id:null==j?void 0:j.course_id}),(0,g.Nd)(T||"educoder",decodeURIComponent(S))};return(0,_.jsxs)("div",{style:r()({},R||{}),className:"".concat(P&&d.bgBlack," ").concat(A?d.wrp:"hide"),children:[B&&(0,_.jsxs)("div",{className:d.close,ref:J,children:[!!O&&(0,_.jsx)(v.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return J.current},children:(0,_.jsx)("span",{onClick:function(){N(),O()},children:(0,_.jsx)("i",{className:"icon-yulanpizhu"})})}),!I&&(0,_.jsx)(v.Z,{title:"点击下载此文件",getPopupContainer:function(){return J.current},children:(0,_.jsx)("span",{onClick:ne,children:(0,_.jsx)("i",{className:"icon-quxiaozhiding"})})}),E&&(0,_.jsx)(v.Z,{title:"保存pdf并退出",getPopupContainer:function(){return J.current},children:(0,_.jsx)("span",{className:"",onClick:function(){var e=document.getElementById("pdfiframe");window.addEventListener("message",Q,!1),setTimeout((function(){e.contentWindow.postMessage("getData","*")}),300)},children:(0,_.jsx)("i",{className:"icon-baocun"})})}),(0,_.jsx)(v.Z,{title:"关闭",getPopupContainer:function(){return J.current},children:(0,_.jsx)("span",{className:"",onClick:function(){N()},children:(0,_.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,_.jsx)("div",{className:"".concat(d[D]," ").concat(D," ").concat(d.monaco," ").concat("txt"===A?"show":"hide"),children:"txt"===A&&(0,_.jsx)(_.Fragment,{children:(0,_.jsx)(m.ZP,r()({},M))})}),"audio"===A&&(0,_.jsx)("audio",{src:"".concat((null===(n=S)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(i=S)||void 0===i?void 0:i.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(S),autoPlay:!0}),"video"===A&&(0,_.jsx)(_.Fragment,{children:(null===(o=S)||void 0===o?void 0:o.indexOf("http"))>-1?(0,_.jsx)("video",{controls:!0,src:"".concat(S),autoPlay:!0}):(0,_.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(S),autoPlay:!0})}),"office"===A&&q&&(0,_.jsx)("iframe",{src:"".concat(Y,"/office.html?key=").concat(q.key,"&url=").concat(btoa(q.url),"&callbackUrl=").concat(X+(q.callbackUrl||""),"&fileType=").concat(q.fileType,"&title=").concat(q.title||"","&model=").concat(C,"&officeServer=").concat(x.Z.ONLYOFFICE,"&disabledDownload=").concat(!!I)}),"html"===A&&(0,_.jsx)("iframe",{src:S+"&disposition=inline"}),"pdf"===A&&(0,_.jsx)("iframe",{id:"pdfiframe",src:"".concat(Y,"/js/pdfview/index.html?filename=").concat(T||"educoder.pdf","&url=").concat(encodeURIComponent(S),"&disabledDownload=").concat(!!I,"&model=").concat(C)}),"image"===A&&(0,_.jsx)("img",{src:"".concat((null===(s=S)||void 0===s?void 0:s.indexOf("http://"))>-1||(null===(u=S)||void 0===u?void 0:u.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(S)}),("other"===A||"download"===A)&&(0,_.jsx)(_.Fragment,{children:F?(0,_.jsx)(b.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,_.jsx)(f.ZP,{icon:(0,_.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:te,disabled:I,children:"下载"})}):(0,_.jsxs)(f.ZP,{type:"primary",size:"middle",onClick:te,disabled:I,children:[(0,_.jsx)(p.Z,{}),"点击下载"]})}),"flowChart"===A&&(0,_.jsx)("div",{className:"embed",children:(0,_.jsx)("iframe",{src:"/drawio/src/main/webapp/viewer.html?id=".concat(S||"","&gapi=0&od=0&db=0&gh=0&gl=0"),width:"100%",height:"100%",frameBorder:"0"})})]})}},18714:function(e,t,n){"use strict";n.d(t,{z:function(){return A},Z:function(){return T}});var i=n(82242),r=n.n(i),o=n(37205),a=n.n(o),s=n(91232),l=n.n(s),u=n(79800),c=n.n(u),h=n(59301),d=(n(48850),n(63741)),f=(n(64018),n(80360)),p=n(62233),m=n(89728),v=n(15342),g=n(77736),y=n(99571),b=n(1012),x=n(4896),w=n(37712),_=function(e){var t=e.html,n=(0,h.useRef)(null),i=(0,h.useRef)(null);return(0,h.useEffect)((function(){var e=n.current.attachShadow({mode:"open"});i.current=document.createElement("div"),i.current.className="markdown-body",i.current.innerHTML=t,e.appendChild(i.current);var r=document.createElement("style");return r.textContent='.markdown-body p {\n margin: 0 0 16px 0 !important;\n line-height: 28px;\n white-space: pre-wrap;\n }\n\n ol,\n ul,\n li {\n list-style-type: none\n }\n\n ol,\n ul,\n dl {\n margin-bottom: 0px;\n }\n\n .markdown-body {\n -ms-text-size-adjust: 100%;\n -webkit-text-size-adjust: 100%;\n color: #333;\n overflow: hidden;\n font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "华文细黑", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "宋体", Heiti, "黑体", sans-serif;\n word-break: break-word;\n font-size: 16px;\n line-height: 1.6;\n white-space: normal;\n word-wrap: break-word;\n position: relative;\n }\n\n .markdown-body ul>li {\n list-style-type: disc;\n }\n\n .markdown-body ol>li {\n list-style-type: decimal;\n }\n\n .markdown-body a {\n background: transparent;\n }\n\n .markdown-body a:active,\n .markdown-body a:hover {\n outline: 0;\n }\n\n .markdown-body strong {\n font-weight: bold;\n }\n\n .markdown-body h1 {\n font-size: 2em;\n margin: 0.67em 0;\n }\n\n .markdown-body img {\n border: 0;\n }\n\n .markdown-body hr {\n -moz-box-sizing: content-box;\n box-sizing: content-box;\n height: 0;\n }\n\n .markdown-body pre {\n overflow: auto;\n }\n\n .markdown-body code,\n .markdown-body kbd,\n .markdown-body pre {\n font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;\n font-size: 1em;\n }\n\n .markdown-body input {\n color: inherit;\n font: inherit;\n margin: 0;\n }\n\n .markdown-body html input[disabled] {\n cursor: default;\n }\n\n .markdown-body input {\n line-height: normal;\n }\n\n .markdown-body input[type="checkbox"] {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n padding: 0;\n }\n\n .markdown-body table {\n border-collapse: collapse;\n border-spacing: 0;\n }\n\n .markdown-body td,\n .markdown-body th {\n padding: 0;\n }\n\n .markdown-body * {\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n .markdown-body input {\n font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";\n }\n\n .markdown-body a {\n color: #4183c4;\n text-decoration: none;\n }\n\n .markdown-body a:hover,\n .markdown-body a:active {\n text-decoration: underline;\n }\n\n .markdown-body hr {\n height: 0;\n margin: 15px 0;\n overflow: hidden;\n background: transparent;\n border: 0;\n border-bottom: 1px solid #ddd;\n }\n\n .markdown-body hr:before {\n display: table;\n content: "";\n }\n\n .markdown-body hr:after {\n display: table;\n clear: both;\n content: "";\n }\n\n .markdown-body h1,\n .markdown-body h2,\n .markdown-body h3,\n .markdown-body h4,\n .markdown-body h5,\n .markdown-body h6 {\n margin-top: 15px;\n margin-bottom: 15px;\n line-height: 1.1;\n }\n\n .markdown-body h1 {\n font-size: 30px;\n }\n\n .markdown-body h2 {\n font-size: 21px;\n }\n\n .markdown-body h3 {\n font-size: 16px;\n }\n\n .markdown-body h4 {\n font-size: 14px;\n }\n\n .markdown-body h5 {\n font-size: 12px;\n }\n\n .markdown-body h6 {\n font-size: 11px;\n }\n\n .markdown-body blockquote {\n margin: 0;\n }\n\n .markdown-body ul,\n .markdown-body ol {\n padding: 0;\n margin-top: 0;\n margin-bottom: 0;\n }\n\n ul.linenums,\n ol.linenums {\n padding: 16px 0 0 56px !important;\n }\n\n .markdown-body ul,\n .markdown-body ol {\n padding-left: 2em;\n }\n\n\n .markdown-body ol ol,\n .markdown-body ul ol {\n list-style-type: lower-roman;\n }\n\n .markdown-body ul ul ol,\n .markdown-body ul ol ol,\n .markdown-body ol ul ol,\n .markdown-body ol ol ol {\n list-style-type: lower-alpha;\n }\n\n .markdown-body dd {\n margin-left: 0;\n }\n\n .markdown-body code {\n font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;\n font-size: 12px;\n }\n\n .markdown-body pre {\n margin-top: 0;\n margin-bottom: 0;\n font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;\n }\n\n .markdown-body .octicon {\n font: normal normal 16px octicons-anchor;\n line-height: 1;\n display: inline-block;\n text-decoration: none;\n -webkit-font-smoothing: antialiased;\n -moz-osx-font-smoothing: grayscale;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n }\n\n .markdown-body .octicon-link:before {\n content: \'\f05c\';\n }\n\n .markdown-body>*:first-child {\n margin-top: 0 !important;\n }\n\n .markdown-body>*:last-child {\n margin-bottom: 0 !important;\n }\n\n .markdown-body .anchor {\n position: absolute;\n top: 0;\n left: 0;\n display: block;\n padding-right: 6px;\n padding-left: 30px;\n margin-left: -30px;\n }\n\n .markdown-body .anchor:focus {\n outline: none;\n }\n\n .markdown-body h1,\n .markdown-body h2,\n .markdown-body h3,\n .markdown-body h4,\n .markdown-body h5,\n .markdown-body h6 {\n position: relative;\n margin-top: 1em;\n margin-bottom: 16px;\n font-weight: bold;\n line-height: 1.4;\n }\n\n .markdown-body h1 .octicon-link,\n .markdown-body h2 .octicon-link,\n .markdown-body h3 .octicon-link,\n .markdown-body h4 .octicon-link,\n .markdown-body h5 .octicon-link,\n .markdown-body h6 .octicon-link {\n display: none;\n color: #000;\n vertical-align: middle;\n }\n\n .markdown-body h1:hover .anchor,\n .markdown-body h2:hover .anchor,\n .markdown-body h3:hover .anchor,\n .markdown-body h4:hover .anchor,\n .markdown-body h5:hover .anchor,\n .markdown-body h6:hover .anchor {\n padding-left: 8px;\n margin-left: -30px;\n text-decoration: none;\n }\n\n .markdown-body h1:hover .anchor .octicon-link,\n .markdown-body h2:hover .anchor .octicon-link,\n .markdown-body h3:hover .anchor .octicon-link,\n .markdown-body h4:hover .anchor .octicon-link,\n .markdown-body h5:hover .anchor .octicon-link,\n .markdown-body h6:hover .anchor .octicon-link {\n display: inline-block;\n }\n\n .markdown-body h1 {\n padding-bottom: 0.3em;\n font-size: 2.25em;\n line-height: 1.2;\n border-bottom: 1px solid #eee;\n }\n\n .markdown-body h1 .anchor {\n line-height: 1;\n }\n\n .markdown-body h2 {\n padding-bottom: 0.3em;\n font-size: 1.75em;\n line-height: 1.225;\n border-bottom: 1px solid #eee;\n }\n\n .markdown-body h2 .anchor {\n line-height: 1;\n }\n\n .markdown-body h3 {\n font-size: 1.5em;\n line-height: 1.43;\n }\n\n .markdown-body h3 .anchor {\n line-height: 1.2;\n }\n\n .markdown-body h4 {\n font-size: 1.25em;\n }\n\n .markdown-body h4 .anchor {\n line-height: 1.2;\n }\n\n .markdown-body h5 {\n font-size: 1em;\n }\n\n .markdown-body h5 .anchor {\n line-height: 1.1;\n }\n\n .markdown-body h6 {\n font-size: 1em;\n color: #777;\n }\n\n .markdown-body h6 .anchor {\n line-height: 1.1;\n }\n\n .markdown-body p,\n .markdown-body blockquote,\n .markdown-body ul,\n .markdown-body ol,\n .markdown-body dl,\n .markdown-body table,\n .markdown-body pre {\n margin-top: 0;\n margin-bottom: 16px;\n }\n\n .markdown-body ul ul,\n .markdown-body ul ol,\n .markdown-body ol ol,\n .markdown-body ol ul {\n margin-top: 0;\n margin-bottom: 0;\n }\n\n .markdown-body li>p {\n margin-top: 16px;\n }\n\n .markdown-body dl {\n padding: 0;\n }\n\n .markdown-body dl dt {\n padding: 0;\n margin-top: 16px;\n font-size: 1em;\n font-style: italic;\n font-weight: bold;\n }\n\n .markdown-body dl dd {\n padding: 0 16px;\n margin-bottom: 16px;\n }\n\n .markdown-body blockquote {\n padding: 0 15px;\n color: #777;\n border-left: 4px solid #ddd;\n }\n\n .markdown-body blockquote> :first-child {\n margin-top: 0;\n }\n\n .markdown-body blockquote> :last-child {\n margin-bottom: 0;\n }\n\n .markdown-body table {\n display: block;\n width: 100%;\n overflow: auto;\n word-break: normal;\n word-break: keep-all;\n }\n\n .markdown-body table th {\n font-weight: bold;\n text-align: revert;\n }\n\n .markdown-body table th,\n .markdown-body table td {\n padding: 6px 13px;\n border: 1px solid #ddd;\n }\n\n .markdown-body table tr {\n background-color: #fff;\n border-top: 1px solid #ccc;\n }\n\n .markdown-body table tr:nth-child(2n) {\n background-color: #f8f8f8;\n }\n\n .markdown-body img {\n max-width: 100%;\n -moz-box-sizing: border-box;\n box-sizing: border-box;\n }\n\n .markdown-body code {\n padding: 0;\n padding-top: 0.2em;\n padding-bottom: 0.2em;\n margin: 0;\n font-size: 85%;\n background-color: rgba(0, 0, 0, 0.04);\n border-radius: 3px;\n }\n\n .markdown-body code:has(.katex) {\n background-color: transparent;\n }\n\n .markdown-body code:before,\n .markdown-body code:after {\n letter-spacing: -0.2em;\n content: "\\00a0";\n }\n\n .markdown-body pre>code {\n padding: 0;\n margin: 0;\n font-size: 100%;\n word-break: normal;\n white-space: pre;\n background: transparent;\n border: 0;\n }\n\n .markdown-body .highlight {\n margin-bottom: 16px;\n }\n\n .markdown-body .highlight pre,\n .markdown-body pre {\n padding: 16px;\n overflow: auto;\n font-size: 85%;\n line-height: 1.45;\n background-color: #f7f7f7;\n border-radius: 3px;\n }\n\n .markdown-body .highlight pre {\n margin-bottom: 0;\n word-break: normal;\n }\n\n .markdown-body pre {\n word-wrap: normal;\n }\n\n .markdown-body pre code {\n display: inline;\n max-width: initial;\n padding: 0;\n margin: 0;\n overflow: initial;\n line-height: inherit;\n word-wrap: normal;\n background-color: transparent;\n border: 0;\n }\n\n .markdown-body pre code:before,\n .markdown-body pre code:after {\n content: normal;\n }\n\n .markdown-body kbd {\n display: inline-block;\n padding: 3px 5px;\n font-size: 11px;\n line-height: 10px;\n color: #555;\n vertical-align: middle;\n background-color: #fcfcfc;\n border: solid 1px #ccc;\n border-bottom-color: #bbb;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 #bbb;\n }\n\n .markdown-body .pl-c {\n color: #969896;\n }\n\n .markdown-body .pl-c1,\n .markdown-body .pl-mdh,\n .markdown-body .pl-mm,\n .markdown-body .pl-mp,\n .markdown-body .pl-mr,\n .markdown-body .pl-s1 .pl-v,\n .markdown-body .pl-s3,\n .markdown-body .pl-sc,\n .markdown-body .pl-sv {\n color: #0086b3;\n }\n\n .markdown-body .pl-e,\n .markdown-body .pl-en {\n color: #795da3;\n }\n\n .markdown-body .pl-s1 .pl-s2,\n .markdown-body .pl-smi,\n .markdown-body .pl-smp,\n .markdown-body .pl-stj,\n .markdown-body .pl-vo,\n .markdown-body .pl-vpf {\n color: #333;\n }\n\n .markdown-body .pl-ent {\n color: #63a35c;\n }\n\n .markdown-body .pl-k,\n .markdown-body .pl-s,\n .markdown-body .pl-st {\n color: #a71d5d;\n }\n\n .markdown-body .pl-pds,\n .markdown-body .pl-s1,\n .markdown-body .pl-s1 .pl-pse .pl-s2,\n .markdown-body .pl-sr,\n .markdown-body .pl-sr .pl-cce,\n .markdown-body .pl-sr .pl-sra,\n .markdown-body .pl-sr .pl-sre,\n .markdown-body .pl-src {\n color: #df5000;\n }\n\n .markdown-body .pl-mo,\n .markdown-body .pl-v {\n color: #1d3e81;\n }\n\n .markdown-body .pl-id {\n color: #b52a1d;\n }\n\n .markdown-body .pl-ii {\n background-color: #b52a1d;\n color: #f8f8f8;\n }\n\n .markdown-body .pl-sr .pl-cce {\n color: #63a35c;\n font-weight: bold;\n }\n\n .markdown-body .pl-ml {\n color: #693a17;\n }\n\n .markdown-body .pl-mh,\n .markdown-body .pl-mh .pl-en,\n .markdown-body .pl-ms {\n color: #1d3e81;\n font-weight: bold;\n }\n\n .markdown-body .pl-mq {\n color: #008080;\n }\n\n .markdown-body .pl-mi {\n color: #333;\n font-style: italic;\n }\n\n .markdown-body .pl-mb {\n color: #333;\n font-weight: bold;\n }\n\n .markdown-body .pl-md,\n .markdown-body .pl-mdhf {\n background-color: #ffecec;\n color: #bd2c00;\n }\n\n .markdown-body .pl-mdht,\n .markdown-body .pl-mi1 {\n background-color: #eaffea;\n color: #55a532;\n }\n\n .markdown-body .pl-mdr {\n color: #795da3;\n font-weight: bold;\n }\n\n .markdown-body kbd {\n display: inline-block;\n padding: 3px 5px;\n font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;\n line-height: 10px;\n color: #555;\n vertical-align: middle;\n background-color: #fcfcfc;\n border: solid 1px #ccc;\n border-bottom-color: #bbb;\n border-radius: 3px;\n box-shadow: inset 0 -1px 0 #bbb;\n }\n\n .markdown-body .task-list-item {\n list-style-type: none;\n }\n\n .markdown-body .task-list-item+.task-list-item {\n margin-top: 3px;\n }\n\n .markdown-body .task-list-item input {\n float: left;\n margin: 0.3em 0 0.25em -1.6em;\n vertical-align: middle;\n }\n\n .markdown-body :checked+.radio-label {\n z-index: 1;\n position: relative;\n border-color: #4183c4;\n }\n\n\n /*! Pretty printing styles. Used with prettify.js. */\n /* SPAN elements with the classes below are added by prettyprint. */\n .pln {\n color: #000\n }\n\n /* plain text */\n\n @media screen {\n .str {\n color: #080\n }\n\n /* string content */\n .kwd {\n color: #008\n }\n\n /* a keyword */\n .com {\n color: #800\n }\n\n /* a comment */\n .typ {\n color: #606\n }\n\n /* a type name */\n .lit {\n color: #066\n }\n\n /* a literal value */\n /* punctuation, lisp open bracket, lisp close bracket */\n .pun,\n .opn,\n .clo {\n color: #660\n }\n\n .tag {\n color: #008\n }\n\n /* a markup tag name */\n .atn {\n color: #606\n }\n\n /* a markup attribute name */\n .atv {\n color: #080\n }\n\n /* a markup attribute value */\n .dec,\n .var {\n color: #606\n }\n\n /* a declaration; a variable name */\n .fun {\n color: red\n }\n\n /* a function name */\n }\n\n /* Use higher contrast and text-weight for printable form. */\n @media print,\n projection {\n .str {\n color: #060\n }\n\n .kwd {\n color: #006;\n font-weight: bold\n }\n\n .com {\n color: #600;\n font-style: italic\n }\n\n .typ {\n color: #404;\n font-weight: bold\n }\n\n .lit {\n color: #044\n }\n\n .pun,\n .opn,\n .clo {\n color: #440\n }\n\n .tag {\n color: #006;\n font-weight: bold\n }\n\n .atn {\n color: #404\n }\n\n .atv {\n color: #060\n }\n }\n\n /* Put a border around prettyprinted code snippets. */\n pre.prettyprint {\n padding: 2px;\n /* border: 1px solid #888 */\n }\n\n /* Specify class=linenums on a pre to get line numbering */\n ol.linenums {\n margin-top: 0;\n margin-bottom: 0\n }\n\n /* IE indents via margin-left */\n li.L0,\n li.L1,\n li.L2,\n li.L3,\n li.L5,\n li.L6,\n li.L7,\n li.L8 {\n list-style-type: none\n }\n\n /* Alternate shading for lines */\n li.L1,\n li.L3,\n li.L5,\n li.L7,\n li.L9 {\n background: #eee\n }\n\n .markdown-body p,\n .markdown-body blockquote,\n .markdown-body ul,\n .markdown-body ol,\n .markdown-body dl,\n .markdown-body table,\n .markdown-body pre {\n margin-top: 0;\n margin-bottom: 16px;\n }',e.appendChild(r),function(){e.innerHTML=""}}),[]),(0,h.useEffect)((function(){i.current&&(i.current.innerHTML=t)}),[t]),(0,w.jsx)("div",{ref:n})};var k="mdBody___raKXb",C="button___Ch5Pc",S="previewFlowChart___vY1dq",E="@▁@",L=/]*>/g;var A=function(e,t){e=e||"";var n=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return t?e.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(n,(function(e,t,n,i,r,o,a){var s=t||i||o,l=n||r||a||"?";return p.Z.API_SERVER+"/api/attachments/"+s+l+"&t="+(0,m.Jn)(s,Date.now())+(e.indexOf(")")>-1?")":"&")})).replaceAll('src="(','src="').replaceAll("src='(",'src="'):e=e.replace(/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,i,r,o,a){var s=t||i||o,l=n||r||a||"?";return p.Z.API_SERVER+"/attachments/download/"+s+l+"&t="+(0,m.Jn)(s,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(n,(function(e,t,n,i,r,o,a){var s=t||i||o,l=n||r||a||"?";return p.Z.API_SERVER+"/api/attachments/"+s+l+"&t="+(0,m.Jn)(s,Date.now())+(e.indexOf(")")>-1?")":"&")})).replace(/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,i,r){var o=t||i,a=n||r||"";return'"'+p.Z.API_SERVER+"/api/attachments/"+o+a+o+a+"&t="+(0,m.Jn)(o,Date.now())})).replace(/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(e,t,n,i,r){var o=t||i,a=n||r||"";return"("+p.Z.API_SERVER+"/files/uploads/"+o+a+o+a+"&t="+(0,m.Jn)(o,Date.now())})).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")},T=function(e){var t=e.value,n=void 0===t?"":t,i=e.edit,o=void 0!==i&&i,s=e.className,u=e.showTextOnly,m=e.showLines,A=e.style,T=void 0===A?{}:A,M=e.stylesPrev,D=void 0===M?{}:M,R=e.highlightKeywords,B=e.showProgramFill,N=(e.isProgramFill,e.disabledFill),P=void 0!==N&&N,I=e.programFillValue,O=e.openEditor,F=void 0===O?function(){}:O,j=e.onFillChange,z=void 0===j?function(e){}:j,H=e.onFillBlur,W=void 0===H?function(){}:H,G=e.onFillFocus,U=void 0===G?function(){}:G,Z=function(e){var t=new RegExp("\\b(".concat(["onabort","onanimationend","onanimationiteration","onanimationstart","onauxclick","onblur","oncancel","oncanplay","oncanplaythrough","onchange","onclick","onclose","oncontextmenu","oncopy","oncut","ondblclick","ondrag","ondragend","ondragenter","ondragleave","ondragover","ondragstart","ondrop","ondurationchange","onemptied","onended","onerror","onfocus","onformdata","ongotpointercapture","oninput","oninvalid","onkeydown","onkeypress","onkeyup","onload","onloadeddata","onloadedmetadata","onloadstart","onlostpointercapture","onmousedown","onmousemove","onmouseout","onmouseover","onmouseup","onpaste","onpause","onplay","onplaying","onpointercancel","onpointerdown","onpointerenter","onpointerleave","onpointermove","onpointerout","onpointerover","onpointerup","onprogress","onratechange","onreset","onresize","onscroll","onsecuritypolicyviolation","onseeked","onseeking","onselect","onslotchange","onstalled","onsubmit","onsuspend","ontimeupdate","ontoggle","ontouchcancel","ontouchend","ontouchmove","ontouchstart","ontransitionend","onvolumechange","onwaiting","onwheel"].join("|"),")\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s>]*)"),"gi");return e.replace(t,"").trim()}(String(n||"")),V=(0,h.useRef)(),q=(0,h.useRef)(),K=(0,h.useState)(""),Y=c()(K,2),X=Y[0],J=Y[1],Q=(0,h.useState)("office"),$=c()(Q,2),ee=$[0],te=$[1],ne=(0,h.useState)([]),ie=c()(ne,2),re=ie[0],oe=ie[1],ae=(0,h.useRef)("a"+(0,b.Z)()),se={},le=function(e){return//i.test(e||"")};var ue=function(e){return!u&&le(Z)?e:e.replace(/([\s\S]+?)<\/style>/gim,(function(e,t){var n=t.replace(/(\n|\r)/g,"").split("}"),i=[];return n.map((function(e){""!=e&&i.push(".".concat(ae.current," ").concat(e))})),"")}))},ce=(0,h.useMemo)((function(){try{Z=Z.replace(/\(\/attachments\/download\//g,"("+p.Z.API_SERVER+"/attachments/download/").replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,"("+p.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+p.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+p.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n"),V.current.style.display="none"}catch(e){}if(B){var e=-1;return Z=Z.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,(function(t,n,i){var r;return function(e,t,n){var i=document.createElement(e===E?"input":"textarea");i.style.width="100%",i.style.height=e===E?"40px":"151px",i.rows=5,i.spellcheck=!1,i.name="edu-program-fill",i.placeholder="请输入",i.dataset.id=t;var r=Object.keys(se).length;return se[r]=i,'')}(t,++e,null==I||null===(r=I[e])||void 0===r?void 0:r.value.replaceAll("<","<").replaceAll(">",">"))})),'
'.concat(ue(Z||""),"
")}var t=ue(Z);t=(0,d.ZP)(t);var n=(0,d.ez)();Z.match(/\[TOC\]/)&&(t=t.replace("

[TOC]

",(0,d.Qv)()),(0,d.Iy)()),t=t.replace(/(__special_katext_id_\d+__)/g,(function(e,t){var i=n[t],r=i.type,o=i.expression;return(0,v.renderToString)(function(e){var t=document.createElement("div");return t.innerHTML=e,0===t.childNodes.length?"":t.childNodes[0].nodeValue}(o)||"",{displayMode:"block"===r,throwOnError:!1,output:"html"})})),t=t.replace(/▁/g,"▁▁▁▁▁"),(0,d.AL)();var i=document.createElement("div");return i.innerHTML=t,u?i.innerText:R?(pe(i,R.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),i.innerHTML):(setTimeout((function(){return ge()}),500),i.innerHTML)}),[Z,R]);(0,h.useEffect)((function(){me.current&&me.current.querySelectorAll(["input","textarea"]).forEach((function(e){e.oninput=he,e.onblur=de,e.onfocus=fe}))}),[re]),(0,h.useEffect)((function(){if(null!=I&&I.length)try{var e,t=me.current.querySelectorAll(".edu-program-fill-score"),n=me.current.querySelectorAll('[name="edu-program-fill"]'),i=l()(n.entries());try{for(i.s();!(e=i.n()).done;){var r,o,a,s=c()(e.value,2),u=s[0],h=s[1];h.value=(null==I||null===(r=I[u])||void 0===r?void 0:r.value)||"","warning"===(null==I||null===(o=I[u])||void 0===o?void 0:o.type)?h.className="program-fill-warning":"success"===(null==I||null===(a=I[u])||void 0===a?void 0:a.type)?h.className="program-fill-success":h.className=""}}catch(e){i.e(e)}finally{i.f()}var d,f=l()(t.entries());try{for(f.s();!(d=f.n()).done;){var p,m,v=c()(d.value,2),g=v[0];v[1].innerHTML=null!=I&&null!==(p=I[g])&&void 0!==p&&p.score?"".concat(null==I||null===(m=I[g])||void 0===m?void 0:m.score,"分"):""}}catch(e){f.e(e)}finally{f.f()}oe(I)}catch(e){console.log(e,"error")}}),[I]);var he=function(e){re[e.target.dataset.id]=re[e.target.dataset.id]||{},re[e.target.dataset.id].value=e.target.value,oe(a()(re)),z(re,e.target.dataset.id)},de=function(e){re[e.target.dataset.id]=re[e.target.dataset.id]||{},re[e.target.dataset.id].value=e.target.value,oe(a()(re)),W(re,e.target.dataset.id)},fe=function(e){re[e.target.dataset.id]=re[e.target.dataset.id]||{},re[e.target.dataset.id].value=e.target.value,oe(a()(re)),U(re,e.target.dataset.id)};function pe(e,t){return e.childNodes.forEach((function(e){if(e.childNodes.length>0)pe(e,t);else if("IMG"!==e.nodeName)if(e.innerHTML){var n;e.innerHTML=null===(n=e.innerHTML)||void 0===n?void 0:n.replace(new RegExp(t,"gi"),'$&')}else{var i=document.createElement("span");i.innerHTML=e.textContent.replace(new RegExp(t,"gi"),'$&'),e.replaceWith(i)}}))}var me=(0,h.useRef)();function ve(e){var t=e.target;if("A"===t.tagName.toUpperCase()){var n=t.getAttribute("href");if(n.indexOf("office")>-1)e.preventDefault(),J(n),te("office");else if(n.indexOf("application/pdf")>-1)e.preventDefault(),J(n),te("pdf");else if(n.indexOf("text/html")>-1)e.preventDefault(),J(n),te("html");else if(n.startsWith("#")){e.preventDefault();var i=document.getElementById(n.replace("#",""));i&&i.scrollIntoView(!0)}}}d.jb.WebkitLineClamp=m,m&&(T=r()(r()({},T),d.jb));var ge=function(){var e,t=null===(e=me.current)||void 0===e?void 0:e.querySelectorAll("video");null==t||t.forEach((function(e){if(e.oncontextmenu=function(){return!1},e.src.indexOf(".m3u8")>-1)if(e.canPlayType("application/vnd.apple.mpegurl"));else if(f.ZP.isSupported()){var t=new f.ZP;t.loadSource(e.src),t.attachMedia(e)}}))};(0,h.useEffect)((function(){if(me.current&&ce&&ce.match(L)&&window.PR.prettyPrint(),me.current)return me.current.addEventListener("click",ve),function(){var e;null===(e=me.current)||void 0===e||e.removeEventListener("click",ve),(0,d.AL)(),(0,d.Iy)()}}),[ce,me.current,ve]);return(0,h.useEffect)((function(){var e,t=function(e){e.preventDefault(),e.clipboardData.setData("text",window.getSelection().toString())};return null===(e=me.current)||void 0===e||e.addEventListener("copy",t),function(){var e;null===(e=me.current)||void 0===e||e.removeEventListener("copy",t)}}),[me.current]),(0,w.jsxs)("div",{style:{position:"relative"},onMouseLeave:function(){V.current.style.display="none"},children:[u&&(0,w.jsx)("div",{ref:me,className:"".concat(k," "),children:ce}),!u&&!le(ce)&&(0,w.jsx)("div",{ref:me,style:r()({},T),onMouseOver:function(e){"IMG"===e.target.nodeName&&e.target.className.indexOf("draw-flowchart")>-1?(V.current.style.zIndex=1,V.current.style.display="flex",V.current.style.width=e.target.clientWidth+"px",V.current.style.height=e.target.clientHeight+"px",V.current.style.top=e.target.offsetTop+"px",V.current.style.left=e.target.offsetLeft+"px",e.target.id&&(q.current=e.target.id)):V.current.style.display="none"},className:"".concat(s||""," ").concat(P?"disabled-fill":""," markdown-body ").concat(k," ").concat(ae.current),dangerouslySetInnerHTML:{__html:ce}}),!u&&le(ce)&&(0,w.jsx)(_,{html:ce}),(0,w.jsx)("div",{ref:V,className:"".concat(C," ").concat(o?"":S),children:(0,w.jsx)(g.Z,{children:(0,w.jsx)(y.ZP,{onClick:function(){o?F(q.current):(J(q.current),te("flowChart"))},children:o?"编辑":"预览"})})}),(0,w.jsx)(x.Z,{close:!0,data:X,type:null!=X&&X.length?ee:"",style:r()({},D),onClose:function(){return J("")}})]})}},84193:function(e,t,n){"use strict";n.d(t,{Z:function(){return k}});var i=n(79800),r=n.n(i),o=n(7557),a=n.n(o),s=n(41498),l=n.n(s),u=n(59301),c=n(6767),h=n(75727),d=n(7804),f=n(80360),p=n(47389),m=n(56102),v=n(86838),g={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"},y=n(37712);function b(e){if(isNaN(e))return{minutes:"00",seconds:"00"};var t=new Date(1e3*e).toISOString().substr(11,8);return{hour:t.substr(0,2),minutes:t.substr(3,2),seconds:t.substr(6,2)}}function x(e,t){return e-t}function w(e){e.sort(x);for(var t=0,n=0;n0&&!this.paused&&!this.ended&&this.readyState>2)}});var _=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i,k=(0,u.forwardRef)((function(e,t){var n,i=e.allow_skip,o=e.src,s=e.toLog,x=e.videoId,k=e.logWatchHistory,C=e.courseId,S=void 0===C?null:C,E=e.startTime,L=e.handlePause,A=void 0===L?function(){}:L,T=e.handlePlay,M=void 0===T?function(){}:T,D=e.handlePlayEnded,R=void 0===D?function(){}:D,B=e.autoPlay,N=void 0!==B&&B,P=e.onPlayEnded,I=void 0===P?function(){}:P,O=e.isShowWaterMark,F=void 0===O||O,j="flv"===(null==o||null===(n=o.split("."))||void 0===n?void 0:n.pop()),z=(0,u.useRef)(),H=(0,u.useRef)(),W=(0,u.useRef)(),G=(0,u.useRef)(),U=(0,u.useRef)(),Z=(0,u.useRef)(),V=(0,u.useRef)(),q=(0,u.useRef)(),K=(0,u.useRef)(),Y=(0,u.useRef)(),X=(0,u.useRef)(),J=(0,u.useRef)(),Q=(0,u.useRef)(),$=(0,u.useRef)(),ee=navigator.userAgent.toLowerCase().match(_),te=ee?ee[0]:"pc",ne=(0,u.useRef)(!1),ie=(0,p.eY)(),re=0,oe=0,ae=0,se=null,le=!1,ue=20,ce=1,he=!1,de=!1,fe=[];(0,u.useImperativeHandle)(t,(function(){return{getLastUpdatedTime:function(){return z.current.currentTime},getDuration:function(){return z.current.duration}}})),c.ZP.config({maxCount:1,getContainer:function(){return W.current}});var pe=(0,u.useCallback)((function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n={point:z.current.currentTime};function i(){return r.apply(this,arguments)}function r(){return(r=l()(a()().mark((function t(){var i;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return he=!0,t.next=3,null==k?void 0:k(n);case 3:i=t.sent,se=i,he=!1,e&&e();case 7:case"end":return t.stop()}}),t)})))).apply(this,arguments)}se?(n.log_id=se,n.watch_duration=w(fe),n.total_duration=oe):(S?(n.video_id=parseInt(x,10),n.course_id=S):n.video_id=x,n.duration=re,n.device=te),t&&(n.ed="1"),i()}),[x,S]);function me(){z.current.paused?(G.current.style.display="none",U.current.style.display="block"):(G.current.style.display="block",U.current.style.display="none")}function ve(){X.current.style.display="none",Q.current.style.display="none",J.current.style.display="none",z.current.muted||0===z.current.volume?X.current.style.display="block":z.current.volume>0&&z.current.volume<=.5?Q.current.style.display="block":J.current.style.display="block"}(0,u.useEffect)((function(){z.current&&(G.current.style.display="none",U.current.style.display="block"),c.ZP.destroy();var e=null;return d.Z.isSupported&&j&&o&&(null==o?void 0:o.indexOf(".m3u8"))<0?(e=d.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:o,muted:!1}),z.current&&(e.attachMediaElement(z.current),e.load())):z.current.setAttribute("src",o),ve(),function(){e&&(e.unload(),e.pause(),e.destroy(),e=null)}}),[z,j,o]),(0,u.useEffect)((function(){document.getElementById("play"),document.querySelectorAll(".playback-icons use");function e(){M(),E&&!ne.current&&(z.current.currentTime=E),ne.current=!0,fe.push(z.current.currentTime),le||(le=!0,s&&pe())}function t(){return n.apply(this,arguments)}function n(){return(n=l()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:me(),fe.push(z.current.currentTime),s&&pe((function(){se=null,ae=0,le=!1,he=!1,de=!1,fe=[],oe=0,ce=1}),!0),I();case 4:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function r(){Z.current.value=Math.round(z.current.currentTime),V.current.value=Math.round(z.current.currentTime)}function o(){var e,t,n,i,r,o=Math.round(null===(e=z.current)||void 0===e?void 0:e.duration);null===(t=Z.current)||void 0===t||null===(n=t.setAttribute)||void 0===n||n.call(t,"max",o),null===(i=V.current)||void 0===i||null===(r=i.setAttribute)||void 0===r||r.call(i,"max",o);var a,s,l=b(o);q.current&&(q.current.innerText="".concat(l.hour>0?l.hour+":":"").concat(l.minutes,":").concat(l.seconds),null===(a=(s=q.current).setAttribute)||void 0===a||a.call(s,"datetime","".concat(l.hour>0?" "+l.hour+" ":"").concat(l.minutes,"m ").concat(l.seconds,"s")))}function u(){try{var e=Math.round(z.current.duration);Z.current.setAttribute("max",e),V.current.setAttribute("max",e);var t=b(e);q.current.innerText="".concat(t.hour>0?t.hour+":":"").concat(t.minutes,":").concat(t.seconds),q.current.setAttribute("datetime","".concat(t.hour>0?" "+t.hour+" ":"").concat(t.minutes,"m ").concat(t.seconds,"s")),r(),function(){var e=b(Math.round(z.current.currentTime));K.current.innerText="".concat(e.hour>0?e.hour+":":"").concat(e.minutes,":").concat(e.seconds),K.current.setAttribute("datetime","".concat(e.hour>0?" "+e.hour+" ":"").concat(e.minutes,"m ").concat(e.seconds,"s"))}();var n=H.current.getBoundingClientRect();n.width,n.height,n.x,n.y;if(!de){var i=z.current.currentTime,o=i-ae;Math.abs(o)<10?(oe+=Math.abs(o),ae=i,he||oe-ce*ue>=0&&(ce++,fe.push(ae),s&&pe())):(ae=i,s&&pe())}}catch(e){console.log("videoplaying:",e)}}function h(){de=!0}function d(){z.current.playing&&fe.push(z.current.currentTime,ae),ae=z.current.currentTime,de=!1}function f(){(re=z.current.duration)<=20&&(ue=re/3),z.current.addEventListener("play",e)}function p(){A()}function m(e){if(i){var t=e.target.dataset.seek?e.target.dataset.seek:e.target.value;z.current.currentTime=t,V.current.value=t,Z.current.value=t}else c.ZP.warning("该视频禁止快进/后退播放")}function g(e){var t=Math.round(e.offsetX/e.target.clientWidth*parseInt(e.target.getAttribute("max"),10));Z.current.setAttribute("data-seek",t);var n=b(t);Y.current.textContent="".concat(n.hour>0?n.hour+":":"").concat(n.minutes,":").concat(n.seconds);var i=z.current.getBoundingClientRect();Y.current.style.left="".concat(e.pageX-i.left,"px")}function y(e){switch(e.code){case"Space":e.preventDefault(),xe();break;case"ArrowRight":if(e.preventDefault(),!i){c.ZP.warning("该视频禁止快进/后退播放");break}if(z.current.currentTime>=z.current.duration)break;z.current.currentTime=parseInt(z.current.currentTime)+5,r();break;case"ArrowLeft":if(e.preventDefault(),!i){c.ZP.warning("该视频禁止快进/后退播放");break}if(0===z.current.currentTime)break;z.current.currentTime=parseInt(z.current.currentTime)-5,r();break;case"ArrowUp":e.preventDefault(),z.current.volume<1&&(z.current.volume=(parseInt(10*z.current.volume)+1)/10);break;case"ArrowDown":e.preventDefault(),z.current.volume>0&&(z.current.volume=(parseInt(10*z.current.volume)-1)/10)}}return W.current.addEventListener((0,v.gH)(),(function(e){e.preventDefault(),(0,v.vp)()?(z.current.style.width="100%",z.current.style.height="100%"):z.current.style.cssText=""})),z.current.addEventListener("canplay",f),z.current.addEventListener("ended",t),z.current.addEventListener("seeking",h),z.current.addEventListener("seeked",d),z.current.addEventListener("loadedmetadata",o),Z.current.addEventListener("mousemove",g),Z.current.addEventListener("input",m),z.current.addEventListener("timeupdate",u),z.current.addEventListener("pause",p),z.current.addEventListener("volumechange",ve),document.addEventListener("keydown",y),function(){var n,i,r,a,l,c,v,b,x,w,_,k;null===(n=z.current)||void 0===n||n.removeEventListener("canplay",f),null===(i=z.current)||void 0===i||i.removeEventListener("play",e),null===(r=z.current)||void 0===r||r.removeEventListener("ended",t),null===(a=z.current)||void 0===a||a.removeEventListener("seeking",h),null===(l=z.current)||void 0===l||l.removeEventListener("seeked",d),null===(c=Z.current)||void 0===c||c.removeEventListener("mousemove",g),null===(v=Z.current)||void 0===v||v.removeEventListener("input",m),null===(b=z.current)||void 0===b||b.removeEventListener("timeupdate",u),null===(x=z.current)||void 0===x||x.removeEventListener("pause",p),null===(w=z.current)||void 0===w||w.removeEventListener("loadedmetadata",o),null===(_=z.current)||void 0===_||_.removeEventListener("volumechange",ve),document.removeEventListener("keydown",y),null!==(k=z.current)&&void 0!==k&&k.playing&&(fe.push(ae,z.current.currentTime),s&&pe())}}),[z,o]),(0,u.useEffect)((function(){if(z.current.onended=function(){R(z)},z.current.oncontextmenu=function(){return!1},(null==o?void 0:o.indexOf(".m3u8"))>-1)if(z.current.canPlayType("application/vnd.apple.mpegurl"))z.current.src=o;else if(f.ZP.isSupported()){var e=new f.ZP;e.loadSource(o),e.attachMedia(z.current)}}),[o]);var ge=(0,u.useState)(1),ye=r()(ge,2),be=(ye[0],ye[1]),xe=function(){z.current.paused||z.current.ended?z.current.play():z.current.pause(),me()};return(0,y.jsxs)("div",{style:{position:"relative"},ref:W,children:[(0,y.jsx)("div",{ref:H,className:"".concat(g.watermark," animated_alternate animate__animated_10s animate__infinite animate__stepstart ").concat(g.animate__loop),children:F&&ie?ie.login:" "}),(0,y.jsx)("div",{className:g.container,children:(0,y.jsxs)("div",{className:g["video-container"],id:"video-container",children:[(0,y.jsx)("div",{className:g["playback-animation"],id:"playback-animation",children:(0,y.jsxs)("svg",{className:g["playback-icons"],children:[(0,y.jsx)("use",{className:"hidden",href:"#play-icon"}),(0,y.jsx)("use",{href:"#pause"})]})}),(0,y.jsx)("video",{className:g.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:z,autoPlay:N}),(0,y.jsxs)("div",{className:"".concat(g["video-controls"]," "),id:"video-controls",children:[(0,y.jsxs)("div",{className:g["bottom-controls"],children:[(0,y.jsxs)("div",{className:g["left-controls"],children:[(0,y.jsx)("button",{"data-title":"播放/暂停",id:"play",onClick:xe,children:(0,y.jsxs)("svg",{className:g["playback-icons"],children:[(0,y.jsx)("use",{ref:U,href:"#play-icon"}),(0,y.jsx)("use",{ref:G,style:{display:"none"},href:"#pause"})]})}),(0,y.jsxs)("div",{className:g.time,children:[(0,y.jsx)("time",{id:"time-elapsed",ref:K,children:"00:00"}),(0,y.jsx)("span",{children:" / "}),(0,y.jsx)("time",{id:"duration",ref:q,children:"00:00"})]})]}),(0,y.jsxs)("div",{className:g["right-controls"],children:[i&&(0,y.jsx)(h.Z,{placement:"top",overlayClassName:g.rateOverlay,getPopupContainer:function(e){return e.parentNode},menu:{items:[{key:"1",label:(0,y.jsx)("span",{onClick:function(){be(1),z.current.playbackRate=1},children:"1.0x"})},{key:"2",label:(0,y.jsx)("span",{onClick:function(){be(1.5),z.current.playbackRate=1.5},children:"1.5x"})},{key:"3",label:(0,y.jsx)("span",{onClick:function(){be(2),z.current.playbackRate=2},children:"2.0x"})}]},children:(0,y.jsx)("div",{className:"".concat(g.controlText," mr5"),children:"倍速"})}),(0,y.jsx)(m.CopyToClipboard,{text:o,onCopy:function(){return c.ZP.success("复制成功")},children:(0,y.jsx)("button",{"data-title":"复制链接",children:(0,y.jsx)("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}})})}),(0,y.jsxs)("div",{className:g["volume-controls"],children:[(0,y.jsxs)("button",{"data-title":"开启/关闭声音",className:g["volume-button"],id:"volume-button",onClick:function(){z.current.muted=!z.current.muted,z.current.muted?($.current.setAttribute("data-volume",volume.value),$.current.value=0):$.current.value=$.current.dataset.volume},children:[(0,y.jsx)("i",{ref:X,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),(0,y.jsx)("i",{ref:Q,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),(0,y.jsx)("i",{ref:J,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})]}),(0,y.jsx)("input",{className:g.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:$,style:{display:"none"},onClick:ve})]}),(0,y.jsx)("button",{"data-title":"全屏/退出全屏",className:g["fullscreen-button"],onClick:function(){(0,v.vp)()?(0,v.BU)():(0,v.Dj)(W.current)},children:(0,y.jsx)("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})})]})]}),(0,y.jsxs)("div",{className:g["video-progress"],children:[(0,y.jsx)("progress",{ref:V,value:"0",min:"0"}),(0,y.jsx)("input",{className:g.seek,ref:Z,value:"0",min:"0",type:"range",step:"1"}),(0,y.jsx)("div",{className:g["seek-tooltip"],ref:Y,id:"seek-tooltip",children:"00:00"})]})]})]})}),(0,y.jsx)("svg",{style:{display:"none"},children:(0,y.jsxs)("defs",{children:[(0,y.jsx)("symbol",{id:"pause",viewBox:"0 0 24 24",children:(0,y.jsx)("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})}),(0,y.jsx)("symbol",{id:"play-icon",viewBox:"0 0 24 24",children:(0,y.jsx)("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})}),(0,y.jsx)("symbol",{id:"volume-high",viewBox:"0 0 24 24",children:(0,y.jsx)("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})}),(0,y.jsx)("symbol",{id:"volume-low",viewBox:"0 0 24 24",children:(0,y.jsx)("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})}),(0,y.jsx)("symbol",{id:"volume-mute",viewBox:"0 0 24 24",children:(0,y.jsx)("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})}),(0,y.jsx)("symbol",{id:"fullscreen",viewBox:"0 0 24 24",children:(0,y.jsx)("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})}),(0,y.jsx)("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24",children:(0,y.jsx)("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})}),(0,y.jsx)("symbol",{id:"pip",viewBox:"0 0 24 24",children:(0,y.jsx)("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})})]})})]})}))},42715:function(e,t,n){"use strict";n.d(t,{h:function(){return g}});var i=n(82242),r=n.n(i),o=n(79800),a=n.n(o),s=n(59301),l=n(82326),u=n(28284),c=n(99571),h=n(89780),d=n.n(h),f=(n(45559),n(42313),n(37712)),p=l.default.Option,m={labelCol:{span:4},wrapperCol:{span:20}},v={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function g(e){var t=e.value,n=e.onChange,i=e.mode,o=e.options,l=void 0===o?{}:o,u=(0,s.useRef)(),c=(0,s.useState)(),h=a()(c,2),p=h[0],m=h[1];return(0,s.useEffect)((function(){if(p){var e=function(e){var t=e.getValue();n&&n(t)};return p.on("change",e),function(){p.off("change",e)}}}),[p,n]),(0,s.useEffect)((function(){p&&p.setOption("mode",i)}),[p,i]),(0,s.useEffect)((function(){p&&(t===p.getValue()&&""!==t||setTimeout((function(){p.setValue(t||"")}),300))}),[p,t]),(0,s.useEffect)((function(){if(u.current&&!p){var e=d().fromTextArea(u.current,r()({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},l));m(e)}}),[u.current,p]),(0,f.jsx)("div",{className:"my-codemirror-container",children:(0,f.jsx)("textarea",{ref:u})})}t.Z=function(e){var t=e.callback,n=e.onCancel,i=(0,s.useState)("python"),o=a()(i,2),h=o[0],d=o[1];return(0,f.jsxs)(u.Z,r()(r()({},m),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(e){t(e)},style:{width:500},children:[(0,f.jsx)(u.Z.Item,{label:"代码语言",name:"language",children:(0,f.jsx)(l.default,{getPopupContainer:function(e){return e.parentNode},onChange:function(e){d(v[e][1])},children:Object.keys(v).map((function(e){return(0,f.jsx)(p,{value:e,children:v[e][0]},e)}))})}),(0,f.jsx)(u.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,f.jsx)(g,{mode:h})}),(0,f.jsxs)("div",{className:"flex-container flex-end",children:[(0,f.jsx)(c.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,f.jsx)(c.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))}},97752:function(e,t,n){"use strict";n.d(t,{Z:function(){return de}});var i=n(91232),r=n.n(i),o=n(79800),a=n.n(o),s=n(85573),l=n.n(s),u=n(59301),c=n(56565),h=n(89780),d=n.n(h),f=n(76374),p=(n(45559),n(6313),n(25717),n(99498),n(25419),n(67549),n(18714)),m=n(37712),v=function(e){var t=e.value,n=void 0===t?"":t,i=(e.className,e.showTextOnly,e.showLines,e.style,(0,u.useMemo)((function(){return""}),[n]));return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})},g=n(82242),y=n.n(g),b=[{title:"粗体",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"斜体",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"无序列表",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"有序列表",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"行内代码",icon:"md-iconfont icon-code",actionName:"code"},{title:"代码块(多语言风格)",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"链接",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"行内公式",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"数学公式",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"多行公式",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"添加图片",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"插入画图",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"插入流程图",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"表格",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"换行",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"清空",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function x(e){var t=e.onActionCallback,n=e.title,i=e.icon,r=e.actionName,o=e.className,a=void 0===o?"":o,s=e.children;return(0,m.jsxs)("a",{title:n,className:a,onClick:function(){t(r)},children:[(0,m.jsx)("i",{className:"".concat(i)}),s]})}var w=function(e){var t=e.watch,n=e.showNullButton,i=e.showNullProgramButton,r=e.onActionCallback,o=e.fullScreen,a=e.insertTemp,s=e.hidetoolBar,l=e.extraUse,u=[].concat(b,[{title:"".concat(t?"关闭实时预览":"开启实时预览"),icon:"".concat(t?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,m.jsxs)("ul",{className:"markdown-toolbar-container",children:[!s&&u.map((function(e,t){return(0,m.jsx)("li",{children:e.actionName?(0,m.jsx)(x,y()(y()({},e),{},{onActionCallback:r})):(0,m.jsx)("span",{className:"v-line"})},t)})),n?(0,m.jsx)("li",{children:(0,m.jsx)(x,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"增加填空",actionName:"add-null-ch",onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"点击新增填空项"})})}):null,i?(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("li",{children:(0,m.jsx)(x,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"增加填空",actionName:"add-signal",onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"添加单行填空项"})})}),(0,m.jsx)("li",{children:(0,m.jsx)(x,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"增加填空",actionName:"add-multiple",onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"添加多行填空项"})})})]}):null,a&&(0,m.jsx)("li",{children:(0,m.jsx)(x,{icon:"md-iconfont icon-edit",className:"btn-null",title:"插入模板",actionName:"inster-template-".concat(a),onActionCallback:r,children:(0,m.jsx)("span",{className:"fill-tip",children:"插入模板"})})}),l&&(0,m.jsx)("li",{children:l}),(0,m.jsx)("li",{className:"btn-full-screen",children:(0,m.jsx)(x,{icon:"".concat(o?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"),title:o?"关闭全屏":"开启全屏",actionName:"trigger-full-screen",onActionCallback:r})})]})},_=n(22949),k=n(28284),C=n(37568),S=n(99571),E={labelCol:{span:4},wrapperCol:{span:20}},L=function(e){var t=e.callback,n=e.onCancel;return(0,m.jsxs)(k.Z,y()(y()({},E),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(e){t(e)},style:{width:500},children:[(0,m.jsx)(k.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,m.jsx)(C.Z,{})}),(0,m.jsx)(k.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,m.jsx)(C.Z,{})}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(S.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(S.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))},A=n(42715),T=n(58358),M=n(62957),D=n(77019),R=n(62686),B=function(e){var t=e.callback,n=e.onCancel,i=document.createElement("canvas"),r=i.getContext("2d");i.width=1e3,i.height=800,r.fillStyle="#ffffff",r.fillRect(0,0,i.width,i.height);var o=i.toDataURL("image/png");return(0,m.jsx)(M.Z,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1,children:(0,m.jsx)(D.Z,{style:{height:"100vh"},children:(0,m.jsx)(R.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:o,visible:!0,title:String(Date.now())},onOk:function(e){t({src:e.url})},onClose:n})})})},N=n(30641),P=n(5269),I=n(6767),O="drawerWrap___MfDw8",F=(0,u.forwardRef)((function(e,t){e.onCancel;var n=e.editImgId,i=e.callback,r=((0,u.useRef)(),(0,u.useRef)()),o=((0,u.useRef)(),(0,u.useRef)(!1),(0,u.useRef)(!1));console.log("ref:",t);var s=(0,u.useState)(0),l=a()(s,2),c=l[0],h=l[1],d=(0,u.useState)("100vh"),f=a()(d,2),p=f[0],v=f[1];return(0,u.useEffect)((function(){h(1)}),[]),(0,u.useImperativeHandle)(t,(function(){return{setHeight:v}})),(0,m.jsx)("div",{ref:o,className:"body-overflow-initial",children:(0,m.jsx)(N.Z,{width:"100vw",height:p,footer:null,closable:!0,placement:"bottom",open:!!c,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:"zIndex-9999 ".concat(O),onClose:function(){window.saveDrawData((function(e){i({src:"/api/attachments/".concat(e),id:e})}))},title:(0,m.jsxs)(D.Z,{align:"middle",children:[(0,m.jsx)(P.Z,{flex:1,children:"插入流程图"}),(0,m.jsx)(P.Z,{onClick:function(){v("60px"===p?"100vh":"60px")},children:(0,m.jsx)("span",{className:"current c-blue",style:{fontWeight:400},children:"展开/收起"})}),(0,m.jsx)(P.Z,{onClick:function(){window.saveDrawData((function(e){null!==e?(I.ZP.success({content:"保存成功",key:"saveFlowChart",style:{zIndex:999999999}}),i({src:"/api/attachments/".concat(e),id:e,disabledClose:!0})):I.ZP.warning({content:"内容为空,请先绘制流程图",key:"saveFlowChart"})}))},children:(0,m.jsx)(S.ZP,{type:"primary",className:"ml20",children:"保存"})})]}),children:(0,m.jsx)("iframe",{src:"/drawio/src/main/webapp/?id=".concat(n||"","&gapi=0&od=0&db=0&gh=0&gl=0&local=0"),width:"100%",height:"100%",frameBorder:"0",ref:r})})})})),j=n(62233),z=n(47889),H=n(71051),W=z.ZP.Group,G={margin:"0 8px"},U=function(e){var t=e.callback,n=e.onCancel;return(0,m.jsxs)(k.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(e){t(e)},children:[(0,m.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,m.jsx)("span",{style:G,children:"单元格数:"}),(0,m.jsx)("span",{style:G,children:"行数"}),(0,m.jsx)(k.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,m.jsx)(H.Z,{})}),(0,m.jsx)("span",{style:G,children:"列数"}),(0,m.jsx)(k.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,m.jsx)(H.Z,{})})]}),(0,m.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,m.jsx)("span",{style:G,children:"对齐方式:"}),(0,m.jsx)(k.Z.Item,{name:"align",children:(0,m.jsxs)(W,{children:[(0,m.jsx)(z.ZP,{value:"default",children:(0,m.jsx)("i",{className:"fa fa-align-justify"})}),(0,m.jsx)(z.ZP,{value:"left",children:(0,m.jsx)("i",{className:"fa fa-align-left"})}),(0,m.jsx)(z.ZP,{value:"center",children:(0,m.jsx)("i",{className:"fa fa-align-center"})}),(0,m.jsx)(z.ZP,{value:"right",children:(0,m.jsx)("i",{className:"fa fa-align-right"})})]})})]}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(S.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(S.ZP,{type:"ghost",onClick:n,children:"取消"})]})]})},Z=n(71411),V=n(30638),q=n.n(V),K=(0,u.forwardRef)((function(e,t){var n=e.use3d,i=e.width,r=e.height,o=e.callback,s=(e.showSaveButton,(0,u.useRef)()),l=(0,u.useRef)(),c=(0,u.useState)(!1),h=a()(c,2),d=h[0],f=h[1],p=(0,u.useRef)({id:s,appName:"graphing",width:i||1e3,height:r||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,u.useEffect)((function(){l.current=new(q())(p.current,!0),window.onload=function(){l.current.inject("applet_container")}}),[]);var v=function(){var e=window.ggbApplet.getPNGBase64(1,!0,72);return o&&o(e),e};return(0,u.useEffect)((function(){p.current.appName=d?"3D":"graphing",l.current.inject("applet_container")}),[d]),(0,u.useEffect)((function(){f(n)}),[n]),(0,u.useImperativeHandle)(t,(function(){return{getImgData:v}})),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:s}),(0,m.jsxs)(D.Z,{align:"middle",children:[(0,m.jsx)(P.Z,{flex:1,children:(0,m.jsx)(Z.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:d,onChange:function(e){return f(e)}})}),(0,m.jsx)(P.Z,{children:(0,m.jsx)(S.ZP,{size:"large",onClick:v,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),Y=n(20037),X="link",J="upload-image",Q="add-flowchart",$="draw-image",ee="code-block",te="add-table",ne="------------",ie={default:ne,left:":".concat(ne),center:":".concat(ne,":"),right:"".concat(ne,":")},re=n(14077),oe=n(89728);var ae="@▁▁@",se=["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 le(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}var ue=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ce=l()(l()({},ue+"-B","bold"),ue+"-I","italic"),he=l()(l()(l()(l()(l()(l()(l()(l()({},X,"添加链接"),ee,"添加代码块"),J,"添加图片"),$,"添加画图"),Q,"插入流程图"),te,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),de=function(e){var t=e.defaultValue,n=void 0===t?"":t,i=e.onChange,o=e.width,s=void 0===o?"100%":o,h=e.height,g=void 0===h?400:h,y=e.miniToolbar,b=void 0!==y&&y,x=e.isFocus,k=void 0!==x&&x,C=e.watch,S=e.insertTemp,E=e.mode,D=void 0===E?"markdown":E,R=e.id,N=void 0===R?"markdown-editor-id":R,P=e.showResizeBar,O=void 0!==P&&P,z=e.noStorage,H=void 0!==z&&z,W=e.showNullButton,G=void 0!==W&&W,Z=e.showNullProgramButton,V=void 0!==Z&&Z,q=e.hidetoolBar,ne=void 0!==q&&q,ue=e.fullScreen,de=void 0!==ue&&ue,fe=e.onBlur,pe=e.onCMBeforeChange,me=e.onFullScreen,ve=e.className,ge=void 0===ve?"":ve,ye=e.disablePaste,be=void 0!==ye&&ye,xe=e.disabled,we=void 0!==xe&&xe,_e=e.disabledFill,ke=void 0!==_e&&_e,Ce=e.placeholder,Se=void 0===Ce?"":Ce,Ee=e.values,Le=void 0===Ee?"":Ee,Ae=e.extraUse,Te=e.onAddBlank,Me=(0,u.useState)(null),De=a()(Me,2),Re=De[0],Be=De[1],Ne=(0,u.useState)(n),Pe=a()(Ne,2),Ie=Pe[0],Oe=Pe[1],Fe=(0,u.useState)(C),je=a()(Fe,2),ze=je[0],He=je[1],We=(0,u.useState)(de),Ge=a()(We,2),Ue=Ge[0],Ze=Ge[1],Ve=(0,u.useState)(""),qe=a()(Ve,2),Ke=qe[0],Ye=qe[1],Xe=(0,u.useState)(0),Je=a()(Xe,2),Qe=Je[0],$e=Je[1],et=(0,u.useState)(g),tt=a()(et,2),nt=tt[0],it=tt[1],rt=(0,u.useState)(!1),ot=a()(rt,2),at=(ot[0],ot[1]),st=(0,u.useState)(0),lt=a()(st,2),ut=lt[0],ct=lt[1],ht=(0,u.useState)(0),dt=a()(ht,2),ft=dt[0],pt=dt[1],mt=(0,u.useRef)(),vt=(0,u.useRef)(),gt=(0,u.useRef)(),yt=(0,u.useRef)(),bt=(0,u.useRef)(),xt=(0,u.useRef)(),wt=(0,c.useDispatch)();(0,u.useEffect)((function(){var e=window.scrollY||window.pageYOffset;Oe(Le),null==Re||Re.setValue(Le),window.scrollTo(0,e)}),[Le]),(0,u.useEffect)((function(){null==me||me(Ue)}),[Ue]),(0,u.useEffect)((function(){if(mt.current){var e=function(e,n){if(!be){var i=n.clipboardData;if(i){var r=i.types.toString(),o=i.items;if("Files"===r||i.types.indexOf("Files")>-1){if(n.preventDefault(),"stex"==D)return;try{var a,s=o[1];"file"===(null===(a=o[0])||void 0===a?void 0:a.kind)&&(s=o[0]);var l=s.getAsFile(),u=l.name.split(".").pop();(0,T.I)(l,(function(e){var n,i,r;e.id?(null==l||null===(n=l.type)||void 0===n?void 0:n.indexOf("image"))>-1?t.replaceSelection('','')):(null==l||null===(i=l.type)||void 0===i?void 0:i.indexOf("video"))>-1?t.replaceSelection('')):(null==l||null===(r=l.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?t.replaceSelection('').concat(l.name,"")):se.includes(u)?t.replaceSelection('').concat(l.name,"")):t.replaceSelection("[".concat(l.name,"](/api/attachments/").concat(e.id,"?type=").concat(e.content_type,")")):401===(null==e?void 0:e.status)&&(document.location.href="/user/login")}))}catch(n){I.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()},t=d().fromTextArea(mt.current,{mode:D,lineNumbers:!b,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});return t.on("keyup",(function(e,n){8===n.keyCode&&(""==e.getValue()?t.setOption("placeholder",Se):t.setOption("placeholder",null))})),t.on("keydown",(function(e,t){if(8===t.keyCode){var n=function(e,t){var n=e.getDoc(),i=n.getCursor(),r=n.getLine(i.line),o=r.charAt(i.ch-1),a=r.lastIndexOf("@▁@",i.ch),s=r.lastIndexOf("@▁▁@",i.ch),l=a>s?a:s,u=a>s?3:4;if(-1===ae.indexOf(o))return null;if(console.log("change1:",t,e,r,i,l,a,s,o),l>=0&&i.ch-l<5){var c=l+u;return n.replaceRange("",{line:i.line,ch:l},{line:i.line,ch:c}),{line:i.line,ch:c}}return null}(e);n&&t.preventDefault()}})),k&&t.focus(),t.on("paste",e),we&&t.on("beforeChange",(function(e,t){"paste"!==t.origin&&"+input"!==t.origin||t.cancel()})),Be(t),function(){t.off("paste",e)}}}),[]);var _t=(0,u.useCallback)((function(){vt.current}),[nt,vt,Ue]);(0,u.useEffect)((function(){if(Re){var e=function(){var e=new f.Z((function(e){var t,n=r()(e);try{for(n.s();!(t=n.n()).done;){var i=t.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(_t(),Re.setSize("100%","100%"),Re.refresh())}}catch(e){n.e(e)}finally{n.f()}}));return e.observe(mt.current.parentElement),e}();return function(){var t,n;null!==(t=mt.current)&&void 0!==t&&t.parentElement&&e.unobserve(null===(n=mt.current)||void 0===n?void 0:n.parentElement)}}}),[Re,_t]),(0,u.useEffect)((function(){if(Re){for(var e=[],t=function(){var t=a()(i[n],2),r=t[0],o=t[1],s=l()({},r,(function(){kt(o)}));e.push(s),Re.addKeyMap(s)},n=0,i=Object.entries(ce);n0){var e=(new Date).getTime(),t=window.sessionStorage.getItem(N);e>=Qe+1e4&&(!t||t!==Ie)&&(window.sessionStorage.setItem(N,Ie),at(!0))}}),1e4),(0,u.useEffect)((function(){He(C)}),[Re,C]),(0,u.useEffect)((function(){Re&&k&&Re.focus()}),[Re,k]),(0,u.useEffect)((function(){if(ze&&Re){var e=function(e){var t=e.target;if(yt.current){var n=t.scrollTop/t.scrollHeight;yt.current.scrollTop=yt.current.scrollHeight*n}},t=Re.getScrollerElement();return t.addEventListener("scroll",e),function(){t.removeEventListener("scroll",e)}}}),[Re,ze]),(0,u.useEffect)((function(){if(Re&&pe){var e=function(e,t){pe(e,t)};return Re.on("beforeChange",e),function(){Re.off("beforeChange",e)}}}),[Re,pe]),(0,u.useEffect)((function(){if(Re&&fe){var e=function(){fe(Re.getValue())};return Re.on("blur",e),function(){Re.off("blur",e)}}}),[Re,fe]),(0,u.useEffect)((function(){if(Re){var e=function(e,t){var n=e.getValue();Oe(n),$e((new Date).getTime()),e.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(V?i(n,At(n)):i(n))};return Re.on("change",e),function(){Re.off("change",e)}}}),[Re,i]),(0,u.useEffect)((function(){if(Re)if(null==n)Re.setValue(""),Oe("");else{var e=window.scrollY||window.pageYOffset;n!==Re.getValue()&&(Re.setValue(n),Oe(n),Re.setCursor(we?1:Re.lineCount(),0),window.scrollTo(0,e))}}),[Re,n]);var kt=(0,u.useCallback)((function(e){var t=Re.getCursor(),n=Re.getSelection(),i=n.split("\n");switch(e){case"bold":return Re.replaceSelection("**"+n+"**"),""===n&&Re.setCursor(t.line,t.ch+2),Re.focus();case"italic":return Re.replaceSelection("*"+n+"*"),""===n&&Re.setCursor(t.line,t.ch+1),Re.focus();case"code":return Re.replaceSelection("`"+n+"`"),""===n&&Re.setCursor(t.line,t.ch+1),Re.focus();case"inline-latex":if((0,oe.Ye)(wt))return;return Ye("inline-latex"),Re.focus();case"latex":return Re.replaceSelection("```latex\n"+n+"\n```"),Re.setCursor(t.line+1,n.length+1),Re.focus();case"line-break":return Re.replaceSelection("
\n"),Re.focus();case"list-ul":return""===n?Re.replaceSelection("- "+n):Re.replaceSelection(i.map((function(e){return""===e?"":"- ".concat(e)})).join("\n")),Re.focus();case"list-ol":return""===n?Re.replaceSelection("1. "+n):Re.replaceSelection(i.map((function(e,t){return""===e?"":"".concat(t+1,". ").concat(e)})).join("\n")),Re.focus();case"add-null-ch":return void(null==Te||Te());case"add-signal":return""===n&&Re.setCursor(t.line,t.ch),Re.replaceSelection("@▁@"),Re.focus();case"add-multiple":return""===n&&Re.setCursor(t.line,t.ch),Re.replaceSelection(ae),Re.focus();case"inster-template-1":return""===n&&Re.setCursor(t.line,t.ch),Re.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),Re.focus();case"eraser":return Re.setValue(""),Re.focus();case"trigger-watch":return He(!ze),Re.focus();case"trigger-full-screen":return Ze(!Ue),Re.focus();case X:return void Ye(X);case ee:return void Ye(ee);case J:return void Ye(J);case $:return void Ye($);case"maths-latex":if((0,oe.Ye)(wt))return;return void Ye("maths-latex");case Q:return bt.current="",sessionStorage.removeItem("file_id"),void Ye(Q);case te:return void Ye(te);default:throw new Error}}),[Re,ze,Ue]),Ct=(0,u.useCallback)((function(e,t){var n,i,r,o,a;null!=e&&e.disabledClose||Ye("");var s=e||{},l=s.src,u=s.alt,c=s.id;switch(Ke){case X:var h=e.title,d=e.link;return Re.replaceSelection("[".concat(h,"](").concat(d,")")),Re.focus();case ee:var f=e.language,p=e.content;return Re.replaceSelection(["```"+f,p,"```"].join("\n")),Re.focus();case"maths-latex":for(var m=atob(e),v=new Uint8Array(m.length),g=0;g').concat(u||')):document.getElementById(c).src=j.Z.API_SERVER+l+"?t="+Date.now();break;case J:case $:var b=t,x=null==b||null===(n=b.name)||void 0===n||null===(n=n.split("."))||void 0===n||null===(i=n.pop)||void 0===i?void 0:i.call(n);return(null==b||null===(r=b.type)||void 0===r?void 0:r.indexOf("image"))>-1||null==b||!b.type?null!=b&&b.align||null!=b&&b.width?Re.replaceSelection('

').concat(u||

')):Re.replaceSelection('').concat(u||')):(null==b||null===(o=b.type)||void 0===o?void 0:o.indexOf("video"))>-1?Re.replaceSelection('')):(null==b||null===(a=b.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?Re.replaceSelection('').concat(b.name,"")):se.includes(x)?Re.replaceSelection('').concat(b.name,"")):Re.replaceSelection("[".concat(b.name,"](").concat(l,")")),Re.focus();case te:for(var w=e.row,_=e.col,k=e.align,C="\n",S=0;S300&&(t=300),it(g+t+"px")}},i=gt.current,r=!1,o=0;return i.addEventListener("mousedown",e),document.addEventListener("mousemove",n),document.addEventListener("mouseup",t),function(){i.removeEventListener("mousedown",e),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",t)}}}),[Re,gt]),(0,u.useEffect)((function(){it(g)}),[g]);var Lt={width:le(s),height:le(nt)},At=((0,u.useMemo)((function(){if(Qe){var e=new Date(Qe),t=e.getHours(),n=e.getMinutes(),i=e.getSeconds();return n=n<10?"0"+n:n,i=i<10?"0"+i:i,"".concat(t=t<10?"0"+t:t,":").concat(n,":").concat(i)}return 0}),[Qe]),function(e){var t=[];if(V){e=e.replace(/(@▁▁@|@▁@)/g,(function(e,n,i){t.push({multiLine:!("@▁@"===e)})}))}return t});(0,u.useEffect)((function(){he[Ke]&&Ke!==$&&Ke!==Q&&setTimeout((function(){var e=document.getElementsByClassName("markdown-popup-form")[0],t=window.innerWidth/2-e.offsetWidth/2,n=window.innerHeight/2-e.offsetHeight/2;ct(t),pt(n)}),0)}),[Ke]);var Tt=function(e,t,n,i){var r=document.body.clientHeight,o=document.body.clientWidth;return!(e<20&&n>e||e>o-20&&nt||t>r-20&&i","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {","\t$0","} else {","\t","}"].join("\n")},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {","\t$0","}"].join("\n")},{label:"if",content:["if () {","\t$0","}"].join("\n")},{label:"for",content:["for(int j=0 ; j<10; j++){","\t$0","}"].join("\n")},{label:"trycatch",content:["try{","\t$0","}catch(ExceptionName e){","}"].join("\n")},{label:"using namespace std;",content:["using namespace std;"].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")},{label:"include ",content:["#include "].join("\n")}]},_={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join("\n")}]},k={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join("\n")}]},C=n(53184),S=n.n(C),E={languages:["c","abap","apex","azcli","bat","cameligo","clojure","coffee","cpp","csharp","csp","css","dockerfile","fsharp","go","graphql","handlebars","html","ini","java","javascript","json","kotlin","less","lua","markdown","mips","msdax","mysql","objective-c","pascal","pascaligo","perl","pgsql","php","postiats","powerquery","powershell","pug","python","r","razor","redis","redshift","restructuredtext","ruby","rust","sb","scheme","scss","shell","solidity","sophia","sql","st","swift","tcl","twig","vb","xml","yaml'"],tables:{users:["name","id","email","phone","password"],roles:["id","name","order","created_at","updated_at","deleted_at"]}},L=function(e,t,n,i){e.languages.registerCompletionItemProvider(t,{provideCompletionItems:function(t,r){var o=t.getWordUntilPosition(r),s={startLineNumber:r.lineNumber,endLineNumber:r.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=t.getLineContent(r.lineNumber).substring(o.startColumn-2,o.endColumn),u=function(e,t,n,i){var r=t.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:n.lineNumber,endColumn:n.column});return Array.from(new Set(r.match(/\b\w{2,}\b/g)||[])).map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Text,insertText:t,range:i}}))}(e,t,r,s);return{suggestions:[].concat(a()(u),a()(n.map((function(t){return{label:t,kind:e.languages.CompletionItemKind.Keyword,documentation:t,insertText:t,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}))),a()(i.map((function(t){return{label:t.label,kind:e.languages.CompletionItemKind.Snippet,documentation:t.content,insertText:l.startsWith("#")?t.content.replace(/#/,""):t.content,insertTextRules:e.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}))))}}})},A=n(82100),T=n.n(A),M=n(29186),D=n.n(M),R=n(85573),B=n.n(R),N=function(){function e(t,n,i){var r=this;T()(this,e),this.placeholder=t,this.editor=n,this.monaco=i,n.onDidChangeModelContent((function(){return r.onDidChangeModelContent()})),this.onDidChangeModelContent()}return D()(e,[{key:"onDidChangeModelContent",value:function(){""===this.editor.getValue()?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}},{key:"getId",value:function(){return e.ID}},{key:"getDomNode",value:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.style.width="max-content",this.domNode.textContent=this.placeholder,this.domNode.style.fontStyle="initial",this.domNode.style.color="#D7D7D7",this.domNode.style.pointerEvents="none",this.editor.applyFontInfo(this.domNode)),this.domNode}},{key:"getPosition",value:function(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}},{key:"dispose",value:function(){this.editor.removeContentWidget(this)}}]),e}();B()(N,"ID","editor.widget.placeholderHint");var P=N,I=n(96236),O=n(6767),F=n(25399),j=n(89392),z=n(89794),H=n(56102),W=n(37712),G=["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"];function U(e){return/^\d+$/.test(e)?"".concat(e,"px"):e}function Z(){}var V={"Python3.6":"python","Python2.7":"python",Dynamips:"cpp",Java:"java",Web:"php",Html:"html",Hive:"sql",Hadoop:"java",SDL:"cpp",PHP:"php",Matlab:"python",Git:"python",Python:"python","C/C++":"cpp","C++":"cpp",C:"cpp",Ruby:"ruby",Shell:"shell",JavaScript:"javascript",Perl6:"perl",Kotlin:"kotlin",Elixir:"elixir",Android:"java",JavaWeb:"java",Go:"go",Spark:"sql",MachineLearning:"python",Verilog:"xml","Verilog/VNC":"xml",Docker:"dockerfile","C#":"csharp",SQLite3:"sql",Oracle:"sql",Vhdl:"vhdl",R:"r",Swift:"swift",SQLServer:"mysql",MySQL:"mysql",Mongo:"sql",PostgreSql:"pgsql",Hbase:"powershell",Sqoop:"sql",Nasm:"cpp",Kafka:"java",Flink:"java",Sml:"javascript",OpenGL:"cpp",Perl5:"perl",Orange:"python",Scala:"scale",solidity:"sol"};function q(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=e;if(Array.isArray(e)){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"",t=arguments.length>1?arguments[1]:void 0;if(!e||""===e.trim())return!0;for(var n=Se.current.instance.getModel(),i=n.getLineTokens(t),r=!1,o=0;o<2;o++)1===i.getStandardTokenType(o)&&(r=!0);return r};function Fe(e){(window.navigator.platform.match("Mac")?e.metaKey:e.ctrlKey)&&83==e.keyCode&&(e.preventDefault(),J())}(0,g.useEffect)((function(){var e,t=null===(e=Se.current)||void 0===e?void 0:e.instance;if(t&&Pe&&te){var n=t.onDidBlurEditorWidget((function(){Re.current=!1})),i=t.onDidFocusEditorText((function(){Re.current=!0}));return function(){n.dispose(),i.dispose()}}}),[Se.current,Pe,te]),(0,g.useEffect)((function(){var e;if(null!==(e=Se.current)&&void 0!==e&&e.instance&&Pe&&be){var t=Se.current.instance,n=t.getModel();if(!n)return;!function(){var e,i=[],r=[],o=n.getAllDecorations(),a=l()(o);try{for(a.s();!(e=a.n()).done;){var s,u=e.value;if("highlighted-line"===u.options.className)i.push(null==u||null===(s=u.range)||void 0===s?void 0:s.startLineNumber),r.push(null==u?void 0:u.id)}}catch(e){a.e(e)}finally{a.f()}if(ge!==i[0]){n.deltaDecorations(r,[]);var c=n.getLineCount();ge&&ge<=c&&(t.deltaDecorations([],[{range:new K.Range(ge,1,ge,n.getLineMaxColumn(ge)),options:{isWholeLine:!0,className:"highlighted-line"}}]),t.revealLineInCenter(ge))}}();var i=function(){var e,t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=[],r=[],o=n.getAllDecorations(),a=l()(o);try{for(a.s();!(e=a.n()).done;){var s,u=e.value;if("breakpoints-select"===u.options.linesDecorationsClassName)i.push(null==u||null===(s=u.range)||void 0===s?void 0:s.startLineNumber),r.push(null==u?void 0:u.id)}}catch(e){a.e(e)}finally{a.f()}if(t)return{lines:i,ids:r};ue(i)},r=function(){var e=v()(p()().mark((function e(t){var r;return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r={range:new K.Range(t,1,t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}},e.next=3,n.deltaDecorations([],[r]);case 3:i();case 4:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),o=function(){var e=v()(p()().mark((function e(r){var o,a,s,u,c;return p()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:o=[],a=t.getLineDecorations(r),s=l()(a);try{for(s.s();!(u=s.n()).done;)"breakpoints-select"===(c=u.value).options.linesDecorationsClassName&&o.push(c.id)}catch(e){s.e(e)}finally{s.f()}return e.next=6,n.deltaDecorations(o,[]);case 6:i();case 7:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),a=function(e){var n,i=t.getLineDecorations(e),r=l()(i);try{for(r.s();!(n=r.n()).done;){if("breakpoints-select"===n.value.options.linesDecorationsClassName)return!0}}catch(e){r.e(e)}finally{r.f()}return!1};if(!(0,j.isEqual)(he,i(!0).lines)){n.deltaDecorations(i(!0).ids,[]);var s=he.map((function(e){return{range:new K.Range(e,1,e,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}}));n.deltaDecorations([],s)}var u=t.onDidChangeModelContent((function(e){var s=t.getPosition();if(s){var l=s.lineNumber;clearTimeout(De.current),De.current=setTimeout((function(){Oe(n.getLineContent(l),l)?o(l):a(l)?(o(l),r(l)):i()}),100)}})),c=t.onMouseDown((function(e){var t;if(e.target.detail&&null!==(t=e.target)&&void 0!==t&&null!==(t=t.element)&&void 0!==t&&null!==(t=t.className)&&void 0!==t&&t.includes("line-numbers")){var i=e.target.position.lineNumber;if(Oe(n.getLineContent(i),i))return;a(i)?o(i):r(i)}})),h=function(){Ae.current=t.deltaDecorations(Ae.current,[])},d=t.onMouseMove((function(e){var i;if(h(),e.target.detail&&null!==(i=e.target)&&void 0!==i&&null!==(i=i.element)&&void 0!==i&&null!==(i=i.className)&&void 0!==i&&i.includes("line-numbers")){var r=e.target.position.lineNumber;if(Oe(n.getLineContent(r),r))return;!function(e){var n={range:new K.Range(e,1,e,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Ae.current=t.deltaDecorations(Ae.current,[n])}(r)}})),f=t.onMouseLeave((function(){h()}));return function(){u.dispose(),c.dispose(),d.dispose(),f.dispose()}}}),[Se.current,Pe,he,ge,be,f]),(0,g.useEffect)((function(){var e;null!==(e=Se.current)&&void 0!==e&&e.instance&&be&&Se.current.instance.setPosition({lineNumber:0,column:0})}),[ge]);var je=function(){if($&&Se.current.instance){var e=Se.current.instance.getContentHeight();Ke(e0||i.target.offsetWidth>0)&&Se.current.instance.layout()}}catch(e){n.e(e)}finally{n.f()}}))).observe(Ce.current),e}();return we&&"string"==typeof we&&new P(we,t,K),Ie(!0),function(){var e=Se.current.instance;e.dispose();var t=e.getModel();t&&t.dispose(),Se.current.subscription&&Se.current.subscription.dispose(),r.unobserve(Ce.current)}}catch(e){}}))}),[]),(0,g.useEffect)((function(){if(Se.current.instance&&Pe)return document.addEventListener("keydown",Fe,!1),function(){document.removeEventListener("keydown",Fe)}}),[J,Pe]),(0,g.useEffect)((function(){var e=Se.current.instance;if(e&&Pe){var t=q(f);K.editor.setModelLanguage(e.getModel(),t)}}),[f,Pe]),(0,g.useEffect)((function(){Se.current.instance&&Pe&&K.editor.setTheme(B)}),[B,Pe]),(0,g.useEffect)((function(){var e=Se.current.instance;Ee.current=T,e&&Pe&&(e.updateOptions(r()({},T)),setTimeout((function(){e.getModel().updateOptions(r()({},T))}),200))}),[JSON.stringify(T),Pe]),(0,g.useEffect)((function(){var e=Se.current.instance;e&&Pe&&e.layout()}),[i,s,Pe]);var We=(0,g.useState)(U(i)),Ge=c()(We,2),Ue=Ge[0],Ze=(Ge[1],(0,g.useState)(U(s))),Ve=c()(Ze,2),qe=Ve[0],Ke=Ve[1],Ye=r()(r()({},C),{},{width:Ue,height:qe,position:"relative"});return(0,W.jsx)("div",{className:"my-monaco-editor",ref:Ce,style:Ye,children:X&&(0,W.jsx)(H.CopyToClipboard,{text:u,onCopy:function(){return O.ZP.success("复制成功")},children:(0,W.jsx)(F.Z,{title:"复制代码",children:(0,W.jsxs)("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"},children:[(0,W.jsx)("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," 复制代码"]})})})})};function J(e){var t=e.width,i=void 0===t?"100%":t,o=e.height,a=void 0===o?"100%":o,s=e.original,u=e.modified,h=e.language,d=e.options,f=void 0===d?{}:d,p=(0,g.useRef)(),m=(0,g.useState)(null),v=c()(m,2),b=v[0],x=v[1];(0,g.useEffect)((function(){return p.current&&Promise.all([n.e(8909),n.e(9404)]).then(n.bind(n,2550)).then((function(e){var t=(K=e).editor.createDiffEditor(p.current,r()(r()({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},f),{},{wordWrap:!0}));x(t);var n=function(e){var t;return p.current&&(t=new y.Z((function(t){var n,i=l()(t);try{for(i.s();!(n=i.n()).done;){var r=n.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&e.layout()}}catch(e){i.e(e)}finally{i.f()}}))).observe(p.current),t}(t);return function(){t.dispose();var e=t.getModel();e&&e.dispose(),n.unobserve(p.current)}})),function(){window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}}),[]),(0,g.useEffect)((function(){b&&b.setModel({original:K.editor.createModel(s,h),modified:K.editor.createModel(u,h)})}),[s,u,h,b]);var w={width:U(i),height:U(a)};return(0,W.jsx)("div",{className:"my-diff-editor",ref:p,style:w})}},14077:function(e,t,n){"use strict";n.d(t,{Z:function(){return r}});var i=n(59301);function r(e,t){var n=(0,i.useRef)();(0,i.useEffect)((function(){n.current=e})),(0,i.useEffect)((function(){if(null!==t){var e=setInterval((function(){n.current()}),t);return function(){return clearInterval(e)}}}),[t])}},55534:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return I}});var i=n(82242),r=n.n(i),o=n(7557),a=n.n(o),s=n(41498),l=n.n(s),u=n(79800),c=n.n(u),h=n(59301),d=n(62957),f=n(6767),p=n(25399),m=n(99571),v=n(458),g={flex_box_center:"flex_box_center___o6PS7",flex_space_between:"flex_space_between___jFqYR",flex_box_vertical_center:"flex_box_vertical_center___bkCsE",flex_box_center_end:"flex_box_center_end___mOjnB",flex_box_column:"flex_box_column___XDXIy",con_warp:"con_warp___q8d5e",all_wrap:"all_wrap___z_EMH",top:"top___pg2nl",left_warp:"left_warp___V0WlV",right_warp:"right_warp___csDNh",right_top:"right_top___hIcQZ",right_center:"right_center___NaPUB",sc_type:"sc_type___hRc_d",sc_lable:"sc_lable___LXq9N",interaction_warp:"interaction_warp___w7H1E",interaction_item:"interaction_item___eL48P",discuss:"discuss___U6lDy",item_warp:"item_warp___YuCMs",user_img:"user_img___Rqz2R",message:"message___JXxin",user_header:"user_header___UmCKv",user_name:"user_name___R8LoK",time:"time___Gk1um",reply:"reply___u_W1X",del_icon:"del_icon___kgB3r",pl_icon:"pl_icon___uTltN",close:"close___M9nrI"},y=n(62233),b=n(56565),x=n(84193),w=n(97752),_=n(68546),k=n(56656),C=n.n(k),S={wrp:"wrp___pCffY",bgBlack:"bgBlack___thUxV",monaco:"monaco___Ldorp",darkBlue:"darkBlue___U50In",close:"close___KlqKs",embed:"embed___Gw1Ga"},E=n(70557),L=n(54501),A=n(89728),T=n(31005),M=n(50184),D=n(43170),R=n(37712),B=function(e){var t,n,i,o,s,u,d,f=e.editOffice,v=void 0===f?"view":f,g=e.data,b=(e.theme,e.type),x=e.filename,w=e.monacoEditor,_=e.className,k=e.style,C=(e.close,e.onClose,e.hasMask),B=e.disabledDownload,N=(e.onImgDimensions,e.showNodata),P=e.resourceId,I=(0,h.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),O=c()(I,2),F=(O[0],O[1],(0,h.useState)("")),j=c()(F,2),z=(j[0],j[1]),H=(0,h.useState)(),W=c()(H,2),G=W[0],U=W[1],Z="build"===window.ENV?"/react/build":"",V=location.host.startsWith("localhost")?y.Z.PROXY_SERVER:y.Z.API_SERVER;console.log("disabledDownload---",B);var q=(0,h.useRef)();null!==(t=g)&&void 0!==t&&t.startsWith("/api")&&"txt"!==b&&(g=y.Z.API_SERVER+g),x&&(w.filename=x),(0,h.useEffect)((function(){var e,t=null===(e=document.cookie)||void 0===e||null===(e=e.replace(/\s/g,""))||void 0===e?void 0:e.split(";");null==t||t.map((function(e){var t=e.split("=");"_educoder_session"===t[0]&&z(t[1])}))}),[]),(0,h.useEffect)((function(){"office"===b&&K()}),[b,g]);var K=function(){var e=l()(a()().mark((function e(){var t,n,i;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return console.log("data:",g),t=g,g.startsWith("http")||(t=location.origin+t),n=new URL(t).pathname.split("/").pop(),e.next=6,(0,T.gJ)({attachment_id:n});case 6:i=e.sent,U(i);case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),Y=function(){(0,A.Nd)(x||"educoder",decodeURIComponent(g)),X()},X=function(){(0,D.ZP)("/api/resource_libraries/".concat(P,"/add_download_count.json"),{method:"post"})};return console.log(g,"data"),(0,R.jsxs)("div",{style:r()({},k||{}),className:"".concat(C&&S.bgBlack," ").concat(b?S.wrp:"hide"),children:[(0,R.jsx)("div",{className:S.close,ref:q,children:!B&&(0,R.jsx)(p.Z,{title:"点击下载此文件",getPopupContainer:function(){return q.current},children:(0,R.jsx)("span",{onClick:Y,children:(0,R.jsx)("i",{className:"icon-quxiaozhiding"})})})}),(0,R.jsx)("div",{className:"".concat(S[_]," ").concat(_," ").concat(S.monaco," ").concat("txt"===b?"show":"hide"),children:"txt"===b&&(0,R.jsx)(L.ZP,r()({},w))}),"audio"===b&&(0,R.jsx)("audio",{src:(null===(n=g)||void 0===n?void 0:n.indexOf("http"))>-1||null!==(i=g)&&void 0!==i&&i.startsWith("/api")?g:"data:image/png;base64,".concat(g),autoPlay:!0}),"video"===b&&(0,R.jsx)(R.Fragment,{children:(null===(o=g)||void 0===o?void 0:o.indexOf("http"))>-1||null!==(s=g)&&void 0!==s&&s.startsWith("/api")?(0,R.jsx)("video",{controls:!0,src:"".concat(g),autoPlay:!0}):(0,R.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(g),autoPlay:!0})}),"office"===b&&G&&(0,R.jsx)("iframe",{src:"".concat(Z,"/office.html?key=").concat(G.key,"&url=").concat(V+G.url,"&callbackUrl=").concat(V+G.callbackUrl,"&fileType=").concat(G.fileType,"&title=").concat(G.title,"&model=").concat(v,"&officeServer=").concat(y.Z.ONLYOFFICE,"&disabledDownload=").concat(!!B)}),"html"===b&&(0,R.jsx)("iframe",{src:g+"&disposition=inline"}),"pdf"===b&&(0,R.jsx)("iframe",{src:"".concat(Z,"/js/pdfview/index.html?url=").concat(g,"&disabledDownload=").concat(!!B)}),"image"===b&&(0,R.jsx)("img",{src:(null===(u=g)||void 0===u?void 0:u.indexOf("http"))>-1||null!==(d=g)&&void 0!==d&&d.startsWith("/api")?g:"data:image/png;base64,".concat(g)}),("other"===b||"download"===b)&&(0,R.jsx)(R.Fragment,{children:N?(0,R.jsx)(M.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,R.jsx)(m.ZP,{icon:(0,R.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:function(){X(),g.startsWith("http")||g.startsWith("blob:")?Y():(0,A.Sv)(x||"educoder",g,x)},children:"下载"})}):(0,R.jsxs)(m.ZP,{type:"primary",size:"middle",onClick:Y,children:[(0,R.jsx)(E.Z,{}),"点击下载"]})})]})},N=n(64957),P=n(14077),I=(0,b.connect)((function(e){var t=e.virtualSpaces;return{globalSetting:e.globalSetting,virtualSpaces:t,user:e.user}}))((function(e){e.globalSetting,e.dispatch;var t,n,i,o,s,u,k,S,E,L,T,M,D=e.user,I=(e.virtualSpaces,(0,b.useLocation)()),O=new URLSearchParams(I.search),F=(0,b.useSearchParams)(),j=c()(F,1)[0],z=(0,b.useParams)(),H=(0,h.useState)(null),W=c()(H,2),G=W[0],U=W[1],Z=(0,h.useState)(!1),V=c()(Z,2),q=V[0],K=V[1],Y=(0,h.useState)(!1),X=c()(Y,2),J=X[0],Q=X[1],$=(0,h.useState)(!1),ee=c()($,2),te=ee[0],ne=ee[1],ie=(0,h.useState)({list:[],size:0}),re=c()(ie,2),oe=re[0],ae=re[1],se=(0,h.useState)(""),le=c()(se,2),ue=le[0],ce=le[1],he=(0,h.useState)(null),de=c()(he,2),fe=de[0],pe=de[1],me=(0,h.useState)(!1),ve=c()(me,2),ge=ve[0],ye=ve[1];(0,h.useEffect)((function(){be(),xe()}),[z.id]);var be=function(){var e=l()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.Vs)(z.id);case 2:0===(null==(t=e.sent)?void 0:t.status)&&U(null==t?void 0:t.data);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),xe=function(){var e=l()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ne(!0),e.next=3,(0,_.ur)(z.id);case 3:0===(null==(t=e.sent)?void 0:t.status)&&ae(null==t?void 0:t.data),ne(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),we=function(){var e=l()(a()().mark((function e(){var t;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return ye(!0),e.next=3,(0,_.eP)({id:z.id,comment:ue,parent_id:fe});case 3:0===(null==(t=e.sent)?void 0:t.status)&&(xe(),q?K(!1):Q(!1)),ye(!1);case 6:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),_e=(0,h.useRef)(),ke=(0,h.useRef)(),Ce=(0,h.useRef)(5);(0,P.Z)(l()(a()().mark((function e(){return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!ke.current){e.next=3;break}return e.next=3,Se();case 3:case"end":return e.stop()}}),e)}))),1e3*Ce.current);var Se=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=e?{is_f:1}:{};return(0,N.DH)(r()(r()({},t),{id:null==G?void 0:G.video_item_id,point:_e.current.getLastUpdatedTime(),total:_e.current.getDuration()}))};return(0,R.jsxs)("div",{className:g.con_warp,children:[(0,R.jsxs)("div",{className:g.all_wrap,children:[(0,R.jsxs)("div",{className:g.top,children:[(0,R.jsxs)("div",{style:{color:"#999",cursor:"pointer",marginRight:10},onClick:function(){var e=O.get("activeTab");e?b.history.push("/account/newInfo?tabName=".concat(e)):b.history.push(j.get("backUrl"))},children:["<","返回"]}),(0,R.jsx)("div",{style:{color:"#333"},children:null==G?void 0:G.name})]}),(0,R.jsxs)("div",{style:{display:"flex",minHeight:735},children:[(0,R.jsxs)("div",{className:g.left_warp,children:["video"==(null==G||null===(t=G.attachment)||void 0===t?void 0:t.file_type)&&"teacher"==(null==D||null===(n=D.userInfo)||void 0===n?void 0:n.identity)&&(0,R.jsx)("div",{className:g.close,children:(0,R.jsx)(p.Z,{title:"点击下载此文件",children:(0,R.jsx)("span",{onClick:function(){var e,t;(0,A.Nd)((null==G||null===(e=G.attachment)||void 0===e?void 0:e.title)||"educoder",decodeURIComponent(null==G||null===(t=G.attachment)||void 0===t?void 0:t.url))},children:(0,R.jsx)("i",{className:"icon-quxiaozhiding"})})})}),"video"==(null==G||null===(i=G.attachment)||void 0===i?void 0:i.file_type)?(0,R.jsx)("div",{style:{padding:"30px 20px"},children:(0,R.jsx)(x.Z,{ref:_e,startTime:0,src:null==G||null===(o=G.attachment)||void 0===o?void 0:o.url,videoId:null==G?void 0:G.video_item_id,handlePause:function(){ke.current=!1},handlePlay:function(){ke.current=!0},toLog:function(){}})}):(0,R.jsx)(B,{close:!0,data:null==G||null===(s=G.attachment)||void 0===s?void 0:s.url,type:null==G||null===(u=G.attachment)||void 0===u?void 0:u.file_type,disabledDownload:"teacher"!=(null==D||null===(k=D.userInfo)||void 0===k?void 0:k.identity),resourceId:null==z?void 0:z.id})]}),(0,R.jsxs)("div",{className:g.right_warp,children:[(0,R.jsxs)("div",{className:g.right_top,children:[(0,R.jsxs)("div",{className:g.sc_type,children:[(0,R.jsx)("span",{children:"知识点"}),(0,R.jsx)("div",{style:{maxWidth:200},children:(null==G||null===(S=G.resource_knowledge_point)||void 0===S?void 0:S.name)||"--"})]}),(0,R.jsxs)("div",{style:{display:"flex"},children:[(0,R.jsxs)("div",{className:g.sc_type,children:[(0,R.jsx)("span",{children:"思政点"}),(0,R.jsx)("div",{children:(null==G||null===(E=G.political_point)||void 0===E?void 0:E.name)||"--"})]}),(0,R.jsxs)("div",{className:g.sc_type,style:{marginLeft:20},children:[(0,R.jsx)("span",{children:"实施方式"}),(0,R.jsx)("div",{children:(null==G||null===(L=G.embodiment)||void 0===L?void 0:L.name)||"--"})]})]}),(0,R.jsx)("div",{style:{display:"flex",flexWrap:"wrap"},children:null==G||null===(T=G.tags)||void 0===T?void 0:T.map((function(e,t){return(0,R.jsx)("div",{className:g.sc_lable,children:null==e?void 0:e.name},t)}))}),(0,R.jsxs)("div",{className:g.interaction_warp,children:[(0,R.jsxs)("div",{className:g.interaction_item,onClick:function(){(0,_.sv)(null==G?void 0:G.user_like,null==G?void 0:G.id,(function(){G.user_like?(G.user_like=!1,G.like_count=G.like_count-1):(G.user_like=!0,G.like_count=G.like_count+1),U(r()({},G))}))},children:[(0,R.jsx)("i",{className:"iconfont icon-dianzan7 mt5",style:{color:(null==G?void 0:G.user_like)&&"#37AD83"}}),(0,R.jsxs)("span",{children:[null!=G&&G.user_like?"已点赞":"点赞","(",null==G?void 0:G.like_count,")"]})]}),(0,R.jsxs)("div",{className:g.interaction_item,onClick:function(){(0,_._L)(null==G?void 0:G.user_collect,null==G?void 0:G.id,(function(){G.user_collect?(G.user_collect=!1,G.collect_count=G.collect_count-1):(G.user_collect=!0,G.collect_count=G.collect_count+1),U(r()({},G))}))},children:[(0,R.jsx)("i",{className:"iconfont icon-shoucang2 mt5",style:{color:(null==G?void 0:G.user_collect)&&"#FFB538"}}),(0,R.jsxs)("span",{children:[null!=G&&G.user_collect?"已收藏":"收藏","(",null==G?void 0:G.collect_count,")"]})]}),(0,R.jsxs)("div",{className:g.interaction_item,children:[(0,R.jsx)("i",{className:"iconfont icon-xiazai7 mt5",style:{color:"#666"}}),(0,R.jsxs)("span",{children:["下载(",null==G?void 0:G.download_count,")"]})]})]})]}),(0,R.jsxs)("div",{className:g.right_center,children:[(0,R.jsxs)("div",{style:{display:"flex"},children:[(0,R.jsx)("i",{className:"iconfont icon-hudongpinglunshu",style:{position:"relative",top:1,color:"#50DCB6",fontSize:20}}),(0,R.jsxs)("span",{style:{margin:"0 10px 0 8px"},children:["评论(",null==oe?void 0:oe.size,")"]})]}),(0,R.jsxs)(m.ZP,{color:"primary",style:{borderColor:"rgba(1,88,39,0.3)",color:"#1B8565",padding:"0 9px"},onClick:function(){pe(null),Q(!0)},children:[(0,R.jsx)("i",{className:"iconfont icon-bianji12",style:{fontSize:14,marginRight:6}}),(0,R.jsx)("span",{children:"发布新评论"})]})]}),(0,R.jsx)("div",{className:g.discuss,children:(0,R.jsx)(v.Z,{loading:te,style:{margin:"20px 0"},children:null==oe||null===(M=oe.list)||void 0===M?void 0:M.map((function(e,t){var n,i,r,o;return(0,R.jsxs)("div",{className:g.item_warp,children:[(0,R.jsx)("img",{src:"".concat(null===y.Z||void 0===y.Z?void 0:y.Z.IMG_SERVER,"/images/").concat(null==e||null===(n=e.user)||void 0===n?void 0:n.image_url),className:g.user_img}),(0,R.jsxs)("div",{style:{width:"100%"},children:[(0,R.jsxs)("div",{className:g.user_header,children:[(0,R.jsx)("div",{className:g.user_name,children:null==e||null===(i=e.user)||void 0===i?void 0:i.name}),(0,R.jsx)("div",{className:g.time,children:C()(null==e?void 0:e.created_at).format("YYYY-MM-DD HH:mm:ss")})]}),(0,R.jsx)("div",{className:g.message,dangerouslySetInnerHTML:{__html:null==e?void 0:e.comment}}),(null==e||null===(r=e.children)||void 0===r?void 0:r.length)>0&&(0,R.jsx)("div",{className:g.reply,children:null==e||null===(o=e.children)||void 0===o?void 0:o.map((function(t,n){var i,r;return(0,R.jsxs)("div",{className:g.reply_item,children:[(0,R.jsxs)("div",{className:g.user_header,children:[(0,R.jsx)("div",{className:g.user_name,children:null==t||null===(i=t.user)||void 0===i?void 0:i.name}),(0,R.jsx)("div",{className:g.time,children:C()(null==t?void 0:t.created_at).format("YYYY-MM-DD HH:mm:ss")})]}),(0,R.jsx)("div",{dangerouslySetInnerHTML:{__html:null==t?void 0:t.comment},className:g.message,style:{marginBottom:n==(null==e||null===(r=e.children)||void 0===r?void 0:r.length)-1?"0":"8px"}})]},n)}))}),(0,R.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end",color:"#B2BACB"},children:[(0,R.jsx)("i",{className:"iconfont icon-a-huifupinglun ".concat(null==g?void 0:g.pl_icon),onClick:function(){pe(null==e?void 0:e.id),K(!0)}}),(0,R.jsx)("i",{className:"iconfont icon-yishanchu ".concat(null==g?void 0:g.del_icon),onClick:function(){var t,n;t={id:null==e?void 0:e.id},d.Z.confirm({centered:!0,width:480,okText:"确定",cancelText:"取消",title:"提示",content:(0,R.jsx)("div",{className:"tc font16",children:"是否确认删除评论?"}),onOk:(n=l()(a()().mark((function e(){var n;return a()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,(0,_.tr)(t);case 2:0==(null==(n=e.sent)?void 0:n.status)&&(f.ZP.success("删除成功"),xe());case 4:case"end":return e.stop()}}),e)}))),function(){return n.apply(this,arguments)})})}})]})]})]},t)}))})})]})]})]}),(0,R.jsx)(d.Z,{title:q?"发布评论":"发布新评论",open:q||J,width:700,afterClose:function(){ce("")},centered:!0,onOk:we,onCancel:function(){q?K(!1):Q(!1)},okText:"发送",confirmLoading:ge,children:(0,R.jsx)(w.Z,{defaultValue:ue,onChange:function(e){ce(e)}})})]})}))},68546:function(e,t,n){"use strict";n.d(t,{Em:function(){return d},FW:function(){return c},Vj:function(){return _},Vs:function(){return p},_L:function(){return B},_w:function(){return E},a6:function(){return C},eP:function(){return y},iq:function(){return l},sv:function(){return R},tr:function(){return x},ur:function(){return v}});var i=n(7557),r=n.n(i),o=n(41498),a=n.n(o),s=n(43170);function l(){return u.apply(this,arguments)}function u(){return(u=a()(r()().mark((function e(){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.ZP)("/api/resource_libraries/get_create_info.json",{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function c(e){return h.apply(this,arguments)}function h(){return(h=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.ZP)("/api/resource_libraries.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function d(e){return f.apply(this,arguments)}function f(){return(f=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.ZP)("/api/resource_libraries/".concat(null==t?void 0:t.id,".json"),{method:"put",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function p(e){return m.apply(this,arguments)}function m(){return(m=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.ZP)("/api/resource_libraries/".concat(t,".json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function v(e){return g.apply(this,arguments)}function g(){return(g=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.ZP)("/api/resource_libraries/".concat(t,"/resource_comments.json"),{method:"get"}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function y(e){return b.apply(this,arguments)}function b(){return(b=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.ZP)("/api/resource_libraries/".concat(null==t?void 0:t.id,"/send_comments"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function x(e){return w.apply(this,arguments)}function w(){return(w=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.ZP)("/api/resource_libraries/destroy_comment.json",{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _(e){return k.apply(this,arguments)}function k(){return(k=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.ZP)("/api/resource_libraries/".concat(null==t?void 0:t.id,"/submit_review.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function C(e){return S.apply(this,arguments)}function S(){return(S=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.ZP)("/api/resource_libraries/".concat(null==t?void 0:t.id,"/cancel_public.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function E(e){return L.apply(this,arguments)}function L(){return(L=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.ZP)("/api/resource_libraries/".concat(null==t?void 0:t.id,".json"),{method:"delete",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function A(e){return T.apply(this,arguments)}function T(){return(T=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.ZP)("/api/resource_libraries/".concat(null==t?void 0:t.id,"/like.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function M(e){return D.apply(this,arguments)}function D(){return(D=a()(r()().mark((function e(t){return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",(0,s.ZP)("/api/resource_libraries/".concat(null==t?void 0:t.id,"/collect.json"),{method:"post",body:t}));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var R=function(){var e=a()(r()().mark((function e(t,n,i){var o;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,A({id:n,type:t?2:1});case 2:0==(null==(o=e.sent)?void 0:o.status)&&i();case 4:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}(),B=function(){var e=a()(r()().mark((function e(t,n,i){var o;return r()().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,M({id:n,type:t?2:1});case 2:0==(null==(o=e.sent)?void 0:o.status)&&i();case 4:case"end":return e.stop()}}),e)})));return function(t,n,i){return e.apply(this,arguments)}}()},86838:function(e,t,n){"use strict";function i(e){try{e.mozRequestFullScreen?e.mozRequestFullScreen():e.webkitRequestFullScreen&&e.webkitRequestFullScreen()}catch(e){console.log(e,":e")}}function r(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}n.d(t,{BU:function(){return r},Dj:function(){return i},gH:function(){return o},vp:function(){return a}});var o=function(){return document.webkitExitFullscreen?"webkitfullscreenchange":document.exitFullscreen?"fullscreenchange":document.msExitFullscreen?"msfullscreenchange":document.mozCancelFullScreen?"mozfullscreenchange":void 0};function a(){var e=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement;document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",e),window.isFullScreen?window.isFullScreen:null!=e}},63741:function(e,t,n){"use strict";n.d(t,{AL:function(){return k},Iy:function(){return f},Qv:function(){return v},ez:function(){return _},jb:function(){return p}});var i=n(79800),r=n.n(i),o=n(32834),a=n.n(o),s=n(11690),l=1;var u=[],c=["