(self.webpackChunk=self.webpackChunk||[]).push([[4496],{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 t={},e="5.0",n={},i=null,r=!1,o=!1,a=null,s=!1,l=null,c=null,u=0;u4?parseFloat(t):5};function C(){try{return window.self!==window.top}catch(t){return!0}}function k(){return(!n.hasOwnProperty("screenshotGenerator")||!n.screenshotGenerator)&&Math.max(screen.width,screen.height)<800}t.setHTML5Codebase=function(t,e){c=t,O(t,e)},t.setJavaCodebase=t.setJavaCodebaseVersion=t.isCompiledInstalled=t.setPreCompiledScriptPath=t.setPreCompiledResourcePath=function(){},t.setHTML5CodebaseVersion=function(t,e){var n=parseFloat(t);NaN!==n&&n<5?console.log("The GeoGebra HTML5 codebase version "+n+" is deprecated. Using version latest instead."):(l=t,R(t,e))},t.getHTML5CodebaseVersion=function(){return m},t.getParameters=function(){return n},t.setFontsCSSURL=function(t){x=t},t.setGiacJSURL=function(t){},t.setJNLPFile=function(t){t},t.setJNLPBaseDir=function(t){},t.inject=function(){function e(){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 e=t.getAppletObject();return!(!e||"function"!=typeof e.recalculateEnvironments)&&(e.recalculateEnvironments(),!0)},t.startAnimation=function(){var e=t.getAppletObject();return!(!e||"function"!=typeof e.startAnimation)&&(e.startAnimation(),!0)},t.stopAnimation=function(){var e=t.getAppletObject();return!(!e||"function"!=typeof e.stopAnimation)&&(e.stopAnimation(),!0)},t.getAppletObject=function(){var t=void 0!==n.id?n.id:"ggbApplet";return window[t]},t.resize=function(){};var T=function(t){return t&&"false"!==t},L=function(e,n,i){w(m)<=4.2&&(i=!0);var r=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==m||ggbHTML5LoadedCodebaseIsWebSimple&&!v)&&(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)T(n.showToolBar)&&(n.height-=7),T(n.showAlgebraInput)&&(n.height-=37),n.width<605&&T(n.showToolBar)&&(n.width=605,a=605);else{var u=100;(T(n.showToolBar)||T(n.showMenuBar))&&(n.hasOwnProperty("customToolBar")&&(n.customToolbar=n.customToolBar),u=T(n.showMenuBar)?245:155),a=5?(n.appletOnLoad=function(t){var n=e.querySelector(".ggb_preview");n&&n.parentNode.removeChild(n),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(y),window.GGBT_wsf_view&&$(window).trigger("resize"),p(t)},b||y.appendChild(C)):o.appendChild(C),y.appendChild(o),b||e.appendChild(y),setTimeout((function(){t.resize()}),1)}function k(t,e){e&&"function"==typeof e.appletOnLoad&&"function"==typeof renderGGBElement?renderGGBElement(t,e.appletOnLoad):renderGGBElement(t),F("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",e)}function S(t,e){"undefined"==typeof renderGGBElement?(null===html5AppletsToProcess&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:t,params:e}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,null!==html5AppletsToProcess&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach((function(t){k(t.article,t.params)})),html5AppletsToProcess=null)},w(m)<5&&(t.className+=" geogebraweb")):k(t,e)}if(r){scriptLoadStarted=!0;for(var E=0;E0?(r.remove(),s.attr("id","fullscreencontent").show(),jQuery(o).append(s),window.dispatchEvent(new Event("resize"))):L(r,e,!1),window.GGBT_wsf_view.launchFullScreen(o)}else f=i,L(t,e,!1);if(!window.GGBT_wsf_view)for(a=0;at/4*3&&(s=t/4*3),l=s/5.8,a.setAttribute("src",b),a.setAttribute("width",s),a.setAttribute("height",l);var u=(t-s)/2,h=(e-l)/2;a.style.left=u+"px",a.style.top=h+"px",r.appendChild(a)}return r.appendChild(c),r},_=function(t){return"html5"===(t=t.toLowerCase())||"screenshot"===t?t:"html5"},I=["web","webSimple","web3d","tablet","tablet3d","phone"],R=function(t,e){if(m=t,e)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 c=m.indexOf("//");for(var u in a=c>0?m:0===c?o+m:"https://www.geogebra.org/apps/5.2.814.0/",I)if(m.slice(-1*I[u].length)===I[u]||m.slice(-1*(I[u].length+1))===I[u]+"/")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||T(n.showToolBar)||T(n.showMenuBar)||T(n.showAlgebraInput)||T(n.enableRightClick)||n.appName&&"classic"!=n.appName?a+="web3d/":a+="webSimple/",O(a,!1)}},O=function(t,e){if(t.requirejs)d=t;else{"/"!==t.slice(-1)&&(t+="/"),d=t,null===e&&(e=-1===t.indexOf("http")),p=e,g="web.nocache.js",v=!1;var n=d.split("/");n.length>1&&(e||"webSimple"!==n[n.length-2]?I.indexOf(n[n.length-2])>=0&&(g=n[n.length-2]+".nocache.js"):(g="webSimple.nocache.js",v=!0)),n=t.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&&t.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+i+" is deprecated. Using version latest instead."),R("5.0",e))}},F=function(t,e){window.console&&window.console.log&&(!e||void 0===e.showLogging||e.showLogging&&"false"!==e.showLogging)&&console.log(t)};function j(){var t=e;null!==l?t=l:parseFloat(t)<5&&(t="5.0"),R(t,!1),null!==c&&O(c,p),s=!0}return void 0!==n.material_id?S(j):j(),t},GGBAppletUtils=function(){"use strict";function t(){return void 0!==window.GGBT_wsf_edit}function e(t,e){1!=e?(t.style.transformOrigin="0% 0% 0px",t.style.webkitTransformOrigin="0% 0% 0px",t.style.transform="scale("+e+","+e+")",t.style.webkitTransform="scale("+e+","+e+")",t.style.maxWidth="initial",null!==t.querySelector(".ggb_preview")&&(t.querySelector(".ggb_preview").style.maxWidth="initial"),void 0!==t.querySelectorAll(".ggb_preview img")[0]&&(t.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),void 0!==t.querySelectorAll(".ggb_preview img")[1]&&(t.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(t.style.transform="none",t.style.webkitTransform="none")}function n(t,e,n,i,r){if(t.isScreenshoGenerator)return 1;var o,a=void 0!==i&&i,s=null!=t.noScaleMargin&&t.noScaleMargin,l=(o=t.autoHeight)&&"false"!==o,c=function(t,e,n,i,r,o){var a=null;if(null!=o&&""!=o)for(var s=t.parentNode;null!=s;){if((" "+s.className+" ").indexOf(" "+o+" ")>-1){a=s;break}s=s.parentNode}var l=0,c=0,u=0,h=0,d=0,p=0,f=0;if(a)l=a.offsetWidth,c=Math.max(i?a.offsetWidth:0,a.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(l=Math.min(window.innerWidth,document.documentElement.clientWidth),c=Math.min(window.innerHeight,document.documentElement.clientHeight),u=l):(l=window.innerWidth,c=window.innerHeight,u=window.innerWidth),t){var m=t.getBoundingClientRect();m.left>0&&m.left<=l&&(void 0===r||!r)&&("rtl"===document.dir?(d=l-m.width-m.left,p=u<=480?10:30):(p=m.left,d=u<=480?10:30),h=p+d)}t&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(t.getBoundingClientRect(),"closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(h=40,f=0):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(h=0,f=40))}return t&&((void 0===n||!n)&&e>0&&e+h1&&(a=!0)),e&&"object"===_typeof(window.GGBT_wsf_view)&&window.GGBT_wsf_view.isFullscreen()&&(a=!0),t.hasOwnProperty("disableAutoScale")&&t.disableAutoScale?o:(r=n(t,e,a,i,t.scaleContainerClass),!a||t.hasOwnProperty("scale")&&1!==o?Math.min(o,r):r)}function r(t){var e=Math.min(window.innerWidth,document.documentElement.clientWidth),n=Math.min(window.innerHeight,document.documentElement.clientHeight),i=t.getBoundingClientRect(),r=(e-i.width)/2,o=(n-i.height)/2;o<0&&(o=0),t.style.position="relative","closePositionRight"===window.GGBT_wsf_view.getCloseBtnPosition()?(t.style.left=r<40?"40px":r+"px",t.style.top=o+"px"):"closePositionTop"===window.GGBT_wsf_view.getCloseBtnPosition()&&(t.style.top=o<40?"40px":o+"px",t.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);t()&&a.setAttribute("data-param-scale",s);for(var l=null,c=0;c=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(t){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(t){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(t){var e=c[t];return null==e?null:e},r=d,webModule.__errFn=e}function B(){function t(t){var e=t.lastIndexOf(rb);-1==e&&(e=t.length);var n=t.indexOf(sb);-1==n&&(n=t.length);var i=t.lastIndexOf(tb,Math.min(n,e));return i>=O?t.substring(O,i+P):W}var e,n=null!=(e=__gwt_getMetaProperty(wb))?e:W;return n==W&&(n=function(){for(var e=o.getElementsByTagName(_),n=O;nO?t[t.length-P].href:W}()),n==W&&function(){var t=o.location;return t.href==t.protocol+zb+t.host+t.pathname+t.search+t.hash}()&&(n=t(o.location.href)),n=function(e){if(e.match(/^\w+:\/\//));else{var n=o.createElement(ub);n.src=e+vb,e=t(n.src)}return e}(n),n}function C(t){return t.match(/^\//)||t.match(/^[a-zA-Z]+:\/\//)?t:webModule.__moduleBase+t}function D(){var t,e=O,i=[],o=[];function a(t){var e=o[t](),n=i[t];if(e in n)return e;var a=[];for(var s in n)a[n[s]]=s;throw r&&r(t,a,e),null}if(__gwt_isKnownPropertyValue=function(t,e){return e in i[t]},webModule.__getPropMap=function(){var t={};for(var e in i)i.hasOwnProperty(e)&&(t[e]=a(e));return t},webModule.__computePropValue=a,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);try{var s=(t=Cb).indexOf(Db);-1!=s&&(e=parseInt(t.substring(s+P),$),t=t.substring(O,s))}catch(t){}return webModule.__softPermutationId=e,C(t+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}s[L]={moduleName:L},webModule.__moduleStartupDone=function(t){var e=s[L].bindings;s[L].bindings=function(){for(var n=e?e():{},i=t[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(t,e){return(0,u.jsxs)(o.Z,{flex:"110px",className:c.Z.item,children:[(0,u.jsxs)("div",{children:[(0,u.jsx)(l.Z,{value:"`$$"+t.value+"$$`"}),t.name]}),(0,u.jsx)("div",{className:c.Z.children,children:t.children.map((function(t,e){return(0,u.jsxs)("div",{children:[t.name&&(0,u.jsx)("h1",{children:t.name}),(0,u.jsx)(r.Z,{gutter:[10,10],children:t.data.map((function(t,e){return(0,u.jsx)(o.Z,{onClick:function(){return m(t)},className:c.Z.diamond,children:(0,u.jsx)(l.Z,{value:"`$$"+t.value+"$$`"})},e)}))})]},e)}))})]})}))})}],v=function(){var t=document.createElement("div");t.innerHTML=f.current.getValue();var e=t.innerText;return n&&n(e),e};return(0,i.useImperativeHandle)(e,(function(){return{getData:v}})),(0,u.jsxs)("div",{className:c.Z.mathWrap,children:[(0,u.jsx)(a.Z,{defaultActiveKey:"1",items:g}),(0,u.jsx)("math-field",{locale:"zh_cn",className:c.Z.mathField,placeholder:"请打开键盘,输入公式",ref:f,style:{width:800,marginTop:30,fontSize:18},children:p||""}),h&&(0,u.jsx)("div",{className:c.Z.button,children:(0,u.jsx)(s.ZP,{size:"large",onClick:v,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})}));e.Z=h},50184:function(t,e,n){"use strict";var i=n(82242),r=n.n(i),o=(n(59301),n(93314)),a=n(99571),s=n(37712);e.Z=function(t){var e=t.img,n=t.buttonProps,i=void 0===n?{}:n,l=t.styles,c=void 0===l?{}:l,u=t.customText,h=t.ButtonText,d=t.ButtonClick,p=t.Buttonclass,f=t.ButtonTwo,m=t.imgStyles,g=t.loading,v=void 0!==g&&g,y=t.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:v?"hidden":"visible"},c),children:[(0,s.jsx)("img",{src:e||o,style:r()(r()({},m),{},{pointerEvents:"none",userSelect:"none"})}),(0,s.jsx)("p",{className:"mt20 font14",children:u||"暂时还没有相关数据哦!"}),h&&(0,s.jsx)(a.ZP,r()(r()({className:p,onClick:d},i),{},{children:h})),f&&f]})}},4896:function(t,e,n){"use strict";n.d(e,{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),c=n(79800),u=n.n(c),h=n(59301),d={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},p=n(99571),f=n(70557),m=n(54501),g=n(25399),v=n(89728),y=n(31005),b=n(50184),x=n(62233),w=n(49656),C=n(37712),k=function(t){var e,n,i,o,s,c,k=t.editOffice,S=void 0===k?"view":k,E=t.data,M=t.issaver,T=t.onSaver,L=(t.theme,t.type),A=t.filename,D=t.monacoEditor,P=t.className,N=t.style,B=t.close,_=t.onClose,I=t.hasMask,R=t.disabledDownload,O=t.onImgDimensions,F=t.showNodata,j=t.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"),z=u()(Z,2),H=(z[0],z[1],(0,h.useState)("")),W=u()(H,2),G=(W[0],W[1]),V=(0,h.useState)(),U=u()(V,2),q=U[0],K=U[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!==(e=E)&&void 0!==e&&e.startsWith("/api")&&"txt"!==L&&(E=x.Z.API_SERVER+E);function Q(t){return $.apply(this,arguments)}function $(){return($=l()(a()().mark((function t(e){return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:"pdfdata"===e.data.type&&(T(e.data.data),window.removeEventListener("message",Q,!1)),console.log("mess---:",e.data);case 2:case"end":return t.stop()}}),t)})))).apply(this,arguments)}A&&D&&(D.filename=A),(0,h.useEffect)((function(){var t,e=null===(t=document.cookie)||void 0===t||null===(t=t.replace(/\s/g,""))||void 0===t?void 0:t.split(";");null==e||e.map((function(t){var e=t.split("=");"_educoder_session"===e[0]&&G(e[1])}))}),[]),(0,h.useEffect)((function(){var t;"office"===L&&(E.indexOf("bigfilescdn.")>-1||E.indexOf("bigfiles1")>-1?K({url:E,fileType:(t=E,t.substring(t.lastIndexOf("/")+1).split(".").pop()),model:E.indexOf("model=edit")?"edit":"view"}):tt())}),[L,E]);var tt=function(){var t=l()(a()().mark((function t(){var e,n,i;return a()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return console.log("data:",E),e=E,E.startsWith("http")||(e=location.origin+e),n=new URL(e).pathname.split("/").pop(),t.next=6,(0,y.gJ)({attachment_id:n});case 6:(i=t.sent).url=X+i.url,K(i);case 9:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),et=function(){E.startsWith("http")||E.startsWith("blob:")?nt():(0,v.Sv)(A||"educoder",E,A)},nt=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,v.Nd)(A||"educoder",decodeURIComponent(E))};return(0,C.jsxs)("div",{style:r()({},N||{}),className:"".concat(I&&d.bgBlack," ").concat(L?d.wrp:"hide"),children:[B&&(0,C.jsxs)("div",{className:d.close,ref:J,children:[!!O&&(0,C.jsx)(g.Z,{title:"点击对图片进行批注",getPopupContainer:function(){return J.current},children:(0,C.jsx)("span",{onClick:function(){_(),O()},children:(0,C.jsx)("i",{className:"icon-yulanpizhu"})})}),!R&&(0,C.jsx)(g.Z,{title:"点击下载此文件",getPopupContainer:function(){return J.current},children:(0,C.jsx)("span",{onClick:nt,children:(0,C.jsx)("i",{className:"icon-quxiaozhiding"})})}),M&&(0,C.jsx)(g.Z,{title:"保存pdf并退出",getPopupContainer:function(){return J.current},children:(0,C.jsx)("span",{className:"",onClick:function(){var t=document.getElementById("pdfiframe");window.addEventListener("message",Q,!1),setTimeout((function(){t.contentWindow.postMessage("getData","*")}),300)},children:(0,C.jsx)("i",{className:"icon-baocun"})})}),(0,C.jsx)(g.Z,{title:"关闭",getPopupContainer:function(){return J.current},children:(0,C.jsx)("span",{className:"",onClick:function(){_()},children:(0,C.jsx)("i",{className:"icon-guanbi1"})})})]}),(0,C.jsx)("div",{className:"".concat(d[P]," ").concat(P," ").concat(d.monaco," ").concat("txt"===L?"show":"hide"),children:"txt"===L&&(0,C.jsx)(C.Fragment,{children:(0,C.jsx)(m.ZP,r()({},D))})}),"audio"===L&&(0,C.jsx)("audio",{src:"".concat((null===(n=E)||void 0===n?void 0:n.indexOf("http://"))>-1||(null===(i=E)||void 0===i?void 0:i.indexOf("https://"))>-1?"":"data:audio/mp3;base64,").concat(E),autoPlay:!0}),"video"===L&&(0,C.jsx)(C.Fragment,{children:(null===(o=E)||void 0===o?void 0:o.indexOf("http"))>-1?(0,C.jsx)("video",{controls:!0,src:"".concat(E),autoPlay:!0}):(0,C.jsx)("video",{controls:!0,src:"data:video/mp4;base64,".concat(E),autoPlay:!0})}),"office"===L&&q&&(0,C.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(S,"&officeServer=").concat(x.Z.ONLYOFFICE,"&disabledDownload=").concat(!!R)}),"html"===L&&(0,C.jsx)("iframe",{src:E+"&disposition=inline"}),"pdf"===L&&(0,C.jsx)("iframe",{id:"pdfiframe",src:"".concat(Y,"/js/pdfview/index.html?filename=").concat(A||"educoder.pdf","&url=").concat(encodeURIComponent(E),"&disabledDownload=").concat(!!R,"&model=").concat(S)}),"image"===L&&(0,C.jsx)("img",{src:"".concat((null===(s=E)||void 0===s?void 0:s.indexOf("http://"))>-1||(null===(c=E)||void 0===c?void 0:c.indexOf("https://"))>-1?"":"data:image/png;base64,").concat(E)}),("other"===L||"download"===L)&&(0,C.jsx)(C.Fragment,{children:F?(0,C.jsx)(b.Z,{customText:"当前文件不支持预览,可点击下载查看",ButtonTwo:(0,C.jsx)(p.ZP,{icon:(0,C.jsx)("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:et,disabled:R,children:"下载"})}):(0,C.jsxs)(p.ZP,{type:"primary",size:"middle",onClick:et,disabled:R,children:[(0,C.jsx)(f.Z,{}),"点击下载"]})}),"flowChart"===L&&(0,C.jsx)("div",{className:"embed",children:(0,C.jsx)("iframe",{src:"/drawio/src/main/webapp/viewer.html?id=".concat(E||"","&gapi=0&od=0&db=0&gh=0&gl=0"),width:"100%",height:"100%",frameBorder:"0"})})]})}},18714:function(t,e,n){"use strict";n.d(e,{z:function(){return L},Z:function(){return A}});var i=n(82242),r=n.n(i),o=n(37205),a=n.n(o),s=n(91232),l=n.n(s),c=n(79800),u=n.n(c),h=n(59301),d=(n(48850),n(63741)),p=(n(64018),n(80360)),f=n(62233),m=n(89728),g=n(15342),v=n(77736),y=n(99571),b=n(1012),x=n(4896),w=n(37712),C=function(t){var e=t.html,n=(0,h.useRef)(null),i=(0,h.useRef)(null);return(0,h.useEffect)((function(){var t=n.current.attachShadow({mode:"open"});i.current=document.createElement("div"),i.current.className="markdown-body",i.current.innerHTML=e,t.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 }',t.appendChild(r),function(){t.innerHTML=""}}),[]),(0,h.useEffect)((function(){i.current&&(i.current.innerHTML=e)}),[e]),(0,w.jsx)("div",{ref:n})};var k="mdBody___raKXb",S="button___Ch5Pc",E="previewFlowChart___vY1dq",M="@▁@",T=/]*>/g;var L=function(t,e){t=t||"";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 e?t.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(n,(function(t,e,n,i,r,o,a){var s=e||i||o,l=n||r||a||"?";return f.Z.API_SERVER+"/api/attachments/"+s+l+"&t="+(0,m.Jn)(s,Date.now())+(t.indexOf(")")>-1?")":"&")})).replaceAll('src="(','src="').replaceAll("src='(",'src="'):t=t.replace(/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(t,e,n,i,r,o,a){var s=e||i||o,l=n||r||a||"?";return f.Z.API_SERVER+"/attachments/download/"+s+l+"&t="+(0,m.Jn)(s,Date.now())+(t.indexOf(")")>-1?")":"&")})).replace(n,(function(t,e,n,i,r,o,a){var s=e||i||o,l=n||r||a||"?";return f.Z.API_SERVER+"/api/attachments/"+s+l+"&t="+(0,m.Jn)(s,Date.now())+(t.indexOf(")")>-1?")":"&")})).replace(/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(t,e,n,i,r){var o=e||i,a=n||r||"";return'"'+f.Z.API_SERVER+"/api/attachments/"+o+a+o+a+"&t="+(0,m.Jn)(o,Date.now())})).replace(/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,(function(t,e,n,i,r){var o=e||i,a=n||r||"";return"("+f.Z.API_SERVER+"/files/uploads/"+o+a+o+a+"&t="+(0,m.Jn)(o,Date.now())})).replaceAll('src="(','src="').replaceAll("src='(",'src="').replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n")},A=function(t){var e=t.value,n=void 0===e?"":e,i=t.edit,o=void 0!==i&&i,s=t.className,c=t.showTextOnly,m=t.showLines,L=t.style,A=void 0===L?{}:L,D=t.stylesPrev,P=void 0===D?{}:D,N=t.highlightKeywords,B=t.showProgramFill,_=(t.isProgramFill,t.disabledFill),I=void 0!==_&&_,R=t.programFillValue,O=t.openEditor,F=void 0===O?function(){}:O,j=t.onFillChange,Z=void 0===j?function(t){}:j,z=t.onFillBlur,H=void 0===z?function(){}:z,W=t.onFillFocus,G=void 0===W?function(){}:W,V=function(t){var e=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 t.replace(e,"").trim()}(String(n||"")),U=(0,h.useRef)(),q=(0,h.useRef)(),K=(0,h.useState)(""),Y=u()(K,2),X=Y[0],J=Y[1],Q=(0,h.useState)("office"),$=u()(Q,2),tt=$[0],et=$[1],nt=(0,h.useState)([]),it=u()(nt,2),rt=it[0],ot=it[1],at=(0,h.useRef)("a"+(0,b.Z)()),st={},lt=function(t){return//i.test(t||"")};var ct=function(t){return!c&<(V)?t:t.replace(/([\s\S]+?)<\/style>/gim,(function(t,e){var n=e.replace(/(\n|\r)/g,"").split("}"),i=[];return n.map((function(t){""!=t&&i.push(".".concat(at.current," ").concat(t))})),"")}))},ut=(0,h.useMemo)((function(){try{V=V.replace(/\(\/attachments\/download\//g,"("+f.Z.API_SERVER+"/attachments/download/").replace(/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,"("+f.Z.API_SERVER+"/api/attachments/").replace(/\"\/api\/attachments\/|\"\/attachments\/download\//g,'"'+f.Z.API_SERVER+"/api/attachments/").replace(/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,'"'+f.Z.API_SERVER+"/files/uploads/").replaceAll("http://video.educoder","https://video.educoder").replaceAll("http://www.educoder.net/api","https://data.educoder.net/api").replaceAll("https://www.educoder.net/api","https://data.educoder.net/api").replace(/\r\n/g,"\n"),U.current.style.display="none"}catch(t){}if(B){var t=-1;return V=V.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,(function(e,n,i){var r;return function(t,e,n){var i=document.createElement(t===M?"input":"textarea");i.style.width="100%",i.style.height=t===M?"40px":"151px",i.rows=5,i.spellcheck=!1,i.name="edu-program-fill",i.placeholder="请输入",i.dataset.id=e;var r=Object.keys(st).length;return st[r]=i,'')}(e,++t,null==R||null===(r=R[t])||void 0===r?void 0:r.value.replaceAll("<","<").replaceAll(">",">"))})),'
'.concat(ct(V||""),"
")}var e=ct(V);e=(0,d.ZP)(e);var n=(0,d.ez)();V.match(/\[TOC\]/)&&(e=e.replace("

[TOC]

",(0,d.Qv)()),(0,d.Iy)()),e=e.replace(/(__special_katext_id_\d+__)/g,(function(t,e){var i=n[e],r=i.type,o=i.expression;return(0,g.renderToString)(function(t){var e=document.createElement("div");return e.innerHTML=t,0===e.childNodes.length?"":e.childNodes[0].nodeValue}(o)||"",{displayMode:"block"===r,throwOnError:!1,output:"html"})})),e=e.replace(/▁/g,"▁▁▁▁▁"),(0,d.AL)();var i=document.createElement("div");return i.innerHTML=e,c?i.innerText:N?(ft(i,N.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),i.innerHTML):(setTimeout((function(){return vt()}),500),i.innerHTML)}),[V,N]);(0,h.useEffect)((function(){mt.current&&mt.current.querySelectorAll(["input","textarea"]).forEach((function(t){t.oninput=ht,t.onblur=dt,t.onfocus=pt}))}),[rt]),(0,h.useEffect)((function(){if(null!=R&&R.length)try{var t,e=mt.current.querySelectorAll(".edu-program-fill-score"),n=mt.current.querySelectorAll('[name="edu-program-fill"]'),i=l()(n.entries());try{for(i.s();!(t=i.n()).done;){var r,o,a,s=u()(t.value,2),c=s[0],h=s[1];h.value=(null==R||null===(r=R[c])||void 0===r?void 0:r.value)||"","warning"===(null==R||null===(o=R[c])||void 0===o?void 0:o.type)?h.className="program-fill-warning":"success"===(null==R||null===(a=R[c])||void 0===a?void 0:a.type)?h.className="program-fill-success":h.className=""}}catch(t){i.e(t)}finally{i.f()}var d,p=l()(e.entries());try{for(p.s();!(d=p.n()).done;){var f,m,g=u()(d.value,2),v=g[0];g[1].innerHTML=null!=R&&null!==(f=R[v])&&void 0!==f&&f.score?"".concat(null==R||null===(m=R[v])||void 0===m?void 0:m.score,"分"):""}}catch(t){p.e(t)}finally{p.f()}ot(R)}catch(t){console.log(t,"error")}}),[R]);var ht=function(t){rt[t.target.dataset.id]=rt[t.target.dataset.id]||{},rt[t.target.dataset.id].value=t.target.value,ot(a()(rt)),Z(rt,t.target.dataset.id)},dt=function(t){rt[t.target.dataset.id]=rt[t.target.dataset.id]||{},rt[t.target.dataset.id].value=t.target.value,ot(a()(rt)),H(rt,t.target.dataset.id)},pt=function(t){rt[t.target.dataset.id]=rt[t.target.dataset.id]||{},rt[t.target.dataset.id].value=t.target.value,ot(a()(rt)),G(rt,t.target.dataset.id)};function ft(t,e){return t.childNodes.forEach((function(t){if(t.childNodes.length>0)ft(t,e);else if("IMG"!==t.nodeName)if(t.innerHTML){var n;t.innerHTML=null===(n=t.innerHTML)||void 0===n?void 0:n.replace(new RegExp(e,"gi"),'$&')}else{var i=document.createElement("span");i.innerHTML=t.textContent.replace(new RegExp(e,"gi"),'$&'),t.replaceWith(i)}}))}var mt=(0,h.useRef)();function gt(t){var e=t.target;if("A"===e.tagName.toUpperCase()){var n=e.getAttribute("href");if(n.indexOf("office")>-1)t.preventDefault(),J(n),et("office");else if(n.indexOf("application/pdf")>-1)t.preventDefault(),J(n),et("pdf");else if(n.indexOf("text/html")>-1)t.preventDefault(),J(n),et("html");else if(n.startsWith("#")){t.preventDefault();var i=document.getElementById(n.replace("#",""));i&&i.scrollIntoView(!0)}}}d.jb.WebkitLineClamp=m,m&&(A=r()(r()({},A),d.jb));var vt=function(){var t,e=null===(t=mt.current)||void 0===t?void 0:t.querySelectorAll("video");null==e||e.forEach((function(t){if(t.oncontextmenu=function(){return!1},t.src.indexOf(".m3u8")>-1)if(t.canPlayType("application/vnd.apple.mpegurl"));else if(p.ZP.isSupported()){var e=new p.ZP;e.loadSource(t.src),e.attachMedia(t)}}))};(0,h.useEffect)((function(){if(mt.current&&ut&&ut.match(T)&&window.PR.prettyPrint(),mt.current)return mt.current.addEventListener("click",gt),function(){var t;null===(t=mt.current)||void 0===t||t.removeEventListener("click",gt),(0,d.AL)(),(0,d.Iy)()}}),[ut,mt.current,gt]);return(0,h.useEffect)((function(){var t,e=function(t){t.preventDefault(),t.clipboardData.setData("text",window.getSelection().toString())};return null===(t=mt.current)||void 0===t||t.addEventListener("copy",e),function(){var t;null===(t=mt.current)||void 0===t||t.removeEventListener("copy",e)}}),[mt.current]),(0,w.jsxs)("div",{style:{position:"relative"},onMouseLeave:function(){U.current.style.display="none"},children:[c&&(0,w.jsx)("div",{ref:mt,className:"".concat(k," "),children:ut}),!c&&!lt(ut)&&(0,w.jsx)("div",{ref:mt,style:r()({},A),onMouseOver:function(t){"IMG"===t.target.nodeName&&t.target.className.indexOf("draw-flowchart")>-1?(U.current.style.zIndex=1,U.current.style.display="flex",U.current.style.width=t.target.clientWidth+"px",U.current.style.height=t.target.clientHeight+"px",U.current.style.top=t.target.offsetTop+"px",U.current.style.left=t.target.offsetLeft+"px",t.target.id&&(q.current=t.target.id)):U.current.style.display="none"},className:"".concat(s||""," ").concat(I?"disabled-fill":""," markdown-body ").concat(k," ").concat(at.current),dangerouslySetInnerHTML:{__html:ut}}),!c&<(ut)&&(0,w.jsx)(C,{html:ut}),(0,w.jsx)("div",{ref:U,className:"".concat(S," ").concat(o?"":E),children:(0,w.jsx)(v.Z,{children:(0,w.jsx)(y.ZP,{onClick:function(){o?F(q.current):(J(q.current),et("flowChart"))},children:o?"编辑":"预览"})})}),(0,w.jsx)(x.Z,{close:!0,data:X,type:null!=X&&X.length?tt:"",style:r()({},P),onClose:function(){return J("")}})]})}},42715:function(t,e,n){"use strict";n.d(e,{h:function(){return v}});var i=n(82242),r=n.n(i),o=n(79800),a=n.n(o),s=n(59301),l=n(82326),c=n(28284),u=n(99571),h=n(89780),d=n.n(h),p=(n(45559),n(42313),n(37712)),f=l.default.Option,m={labelCol:{span:4},wrapperCol:{span:20}},g={asp:["ASP","vbscript"],actionscript:["ActionScript(3.0)/Flash/Flex","clike"],bash:["Bash/Bat","shell"],css:["CSS","css"],c:["C","clike"],cpp:["C++","clike"],csharp:["C#","clike"],coffeescript:["CoffeeScript","coffeescript"],d:["D","d"],dart:["Dart","dart"],delphi:["Delphi/Pascal","pascal"],erlang:["Erlang","erlang"],go:["Golang","go"],groovy:["Groovy","groovy"],html:["HTML","text/html"],java:["Java","clike"],json:["JSON","text/json"],javascript:["Javascript","javascript"],lua:["Lua","lua"],less:["LESS","css"],markdown:["Markdown","gfm"],"objective-c":["Objective-C","clike"],php:["PHP","php"],perl:["Perl","perl"],python:["Python","python"],r:["R","r"],rst:["reStructedText","rst"],ruby:["Ruby","ruby"],sql:["SQL","sql"],sass:["SASS/SCSS","sass"],shell:["Shell","shell"],scala:["Scala","clike"],swift:["Swift","clike"],vb:["VB/VBScript","vb"],xml:["XML","text/xml"],yaml:["YAML","yaml"]};function v(t){var e=t.value,n=t.onChange,i=t.mode,o=t.options,l=void 0===o?{}:o,c=(0,s.useRef)(),u=(0,s.useState)(),h=a()(u,2),f=h[0],m=h[1];return(0,s.useEffect)((function(){if(f){var t=function(t){var e=t.getValue();n&&n(e)};return f.on("change",t),function(){f.off("change",t)}}}),[f,n]),(0,s.useEffect)((function(){f&&f.setOption("mode",i)}),[f,i]),(0,s.useEffect)((function(){f&&(e===f.getValue()&&""!==e||setTimeout((function(){f.setValue(e||"")}),300))}),[f,e]),(0,s.useEffect)((function(){if(c.current&&!f){var t=d().fromTextArea(c.current,r()({mode:i,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},l));m(t)}}),[c.current,f]),(0,p.jsx)("div",{className:"my-codemirror-container",children:(0,p.jsx)("textarea",{ref:c})})}e.Z=function(t){var e=t.callback,n=t.onCancel,i=(0,s.useState)("python"),o=a()(i,2),h=o[0],d=o[1];return(0,p.jsxs)(c.Z,r()(r()({},m),{},{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:function(t){e(t)},style:{width:500},children:[(0,p.jsx)(c.Z.Item,{label:"代码语言",name:"language",children:(0,p.jsx)(l.default,{getPopupContainer:function(t){return t.parentNode},onChange:function(t){d(g[t][1])},children:Object.keys(g).map((function(t){return(0,p.jsx)(f,{value:t,children:g[t][0]},t)}))})}),(0,p.jsx)(c.Z.Item,{label:"代码内容",name:"content",rules:[{required:!0,message:"请输入代码内容"}],children:(0,p.jsx)(v,{mode:h})}),(0,p.jsxs)("div",{className:"flex-container flex-end",children:[(0,p.jsx)(u.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,p.jsx)(u.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))}},97752:function(t,e,n){"use strict";n.d(e,{Z:function(){return dt}});var i=n(91232),r=n.n(i),o=n(79800),a=n.n(o),s=n(85573),l=n.n(s),c=n(59301),u=n(56565),h=n(89780),d=n.n(h),p=n(76374),f=(n(45559),n(6313),n(25717),n(99498),n(25419),n(67549),n(18714)),m=n(37712),g=function(t){var e=t.value,n=void 0===e?"":e,i=(t.className,t.showTextOnly,t.showLines,t.style,(0,c.useMemo)((function(){return""}),[n]));return(0,m.jsx)(m.Fragment,{children:(0,m.jsx)("div",{dangerouslySetInnerHTML:{__html:i}})})},v=n(82242),y=n.n(v),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(t){var e=t.onActionCallback,n=t.title,i=t.icon,r=t.actionName,o=t.className,a=void 0===o?"":o,s=t.children;return(0,m.jsxs)("a",{title:n,className:a,onClick:function(){e(r)},children:[(0,m.jsx)("i",{className:"".concat(i)}),s]})}var w=function(t){var e=t.watch,n=t.showNullButton,i=t.showNullProgramButton,r=t.onActionCallback,o=t.fullScreen,a=t.insertTemp,s=t.hidetoolBar,l=t.extraUse,c=[].concat(b,[{title:"".concat(e?"关闭实时预览":"开启实时预览"),icon:"".concat(e?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"),actionName:"trigger-watch"}]);return(0,m.jsxs)("ul",{className:"markdown-toolbar-container",children:[!s&&c.map((function(t,e){return(0,m.jsx)("li",{children:t.actionName?(0,m.jsx)(x,y()(y()({},t),{},{onActionCallback:r})):(0,m.jsx)("span",{className:"v-line"})},e)})),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})})]})},C=n(22949),k=n(28284),S=n(37568),E=n(99571),M={labelCol:{span:4},wrapperCol:{span:20}},T=function(t){var e=t.callback,n=t.onCancel;return(0,m.jsxs)(k.Z,y()(y()({},M),{},{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:function(t){e(t)},style:{width:500},children:[(0,m.jsx)(k.Z.Item,{label:"链接地址",name:"link",rules:[{required:!0,message:"请输入链接地址"}],children:(0,m.jsx)(S.Z,{})}),(0,m.jsx)(k.Z.Item,{label:"链接标题",name:"title",rules:[{required:!0,message:"请输入链接标题"}],children:(0,m.jsx)(S.Z,{})}),(0,m.jsxs)("div",{className:"flex-container flex-end",children:[(0,m.jsx)(E.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(E.ZP,{type:"ghost",onClick:n,children:"取消"})]})]}))},L=n(42715),A=n(58358),D=n(62957),P=n(77019),N=n(62686),B=function(t){var e=t.callback,n=t.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)(D.Z,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1,children:(0,m.jsx)(P.Z,{style:{height:"100vh"},children:(0,m.jsx)(N.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:o,visible:!0,title:String(Date.now())},onOk:function(t){e({src:t.url})},onClose:n})})})},_=n(30641),I=n(5269),R=n(6767),O="drawerWrap___MfDw8",F=(0,c.forwardRef)((function(t,e){t.onCancel;var n=t.editImgId,i=t.callback,r=((0,c.useRef)(),(0,c.useRef)()),o=((0,c.useRef)(),(0,c.useRef)(!1),(0,c.useRef)(!1));console.log("ref:",e);var s=(0,c.useState)(0),l=a()(s,2),u=l[0],h=l[1],d=(0,c.useState)("100vh"),p=a()(d,2),f=p[0],g=p[1];return(0,c.useEffect)((function(){h(1)}),[]),(0,c.useImperativeHandle)(e,(function(){return{setHeight:g}})),(0,m.jsx)("div",{ref:o,className:"body-overflow-initial",children:(0,m.jsx)(_.Z,{width:"100vw",height:f,footer:null,closable:!0,placement:"bottom",open:!!u,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:"zIndex-9999 ".concat(O),onClose:function(){window.saveDrawData((function(t){i({src:"/api/attachments/".concat(t),id:t})}))},title:(0,m.jsxs)(P.Z,{align:"middle",children:[(0,m.jsx)(I.Z,{flex:1,children:"插入流程图"}),(0,m.jsx)(I.Z,{onClick:function(){g("60px"===f?"100vh":"60px")},children:(0,m.jsx)("span",{className:"current c-blue",style:{fontWeight:400},children:"展开/收起"})}),(0,m.jsx)(I.Z,{onClick:function(){window.saveDrawData((function(t){null!==t?(R.ZP.success({content:"保存成功",key:"saveFlowChart",style:{zIndex:999999999}}),i({src:"/api/attachments/".concat(t),id:t,disabledClose:!0})):R.ZP.warning({content:"内容为空,请先绘制流程图",key:"saveFlowChart"})}))},children:(0,m.jsx)(E.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),z=n(71051),H=Z.ZP.Group,W={margin:"0 8px"},G=function(t){var e=t.callback,n=t.onCancel;return(0,m.jsxs)(k.Z,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:function(t){e(t)},children:[(0,m.jsxs)("div",{className:"flex-container",style:{alignItems:"baseline"},children:[(0,m.jsx)("span",{style:W,children:"单元格数:"}),(0,m.jsx)("span",{style:W,children:"行数"}),(0,m.jsx)(k.Z.Item,{name:"row",rules:[{required:!0,message:"请输入行数"}],children:(0,m.jsx)(z.Z,{})}),(0,m.jsx)("span",{style:W,children:"列数"}),(0,m.jsx)(k.Z.Item,{name:"col",rules:[{required:!0,message:"请输入列数"}],children:(0,m.jsx)(z.Z,{})})]}),(0,m.jsxs)("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"},children:[(0,m.jsx)("span",{style:W,children:"对齐方式:"}),(0,m.jsx)(k.Z.Item,{name:"align",children:(0,m.jsxs)(H,{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)(E.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10},children:"确定"}),(0,m.jsx)(E.ZP,{type:"ghost",onClick:n,children:"取消"})]})]})},V=n(71411),U=n(30638),q=n.n(U),K=(0,c.forwardRef)((function(t,e){var n=t.use3d,i=t.width,r=t.height,o=t.callback,s=(t.showSaveButton,(0,c.useRef)()),l=(0,c.useRef)(),u=(0,c.useState)(!1),h=a()(u,2),d=h[0],p=h[1],f=(0,c.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,c.useEffect)((function(){l.current=new(q())(f.current,!0),window.onload=function(){l.current.inject("applet_container")}}),[]);var g=function(){var t=window.ggbApplet.getPNGBase64(1,!0,72);return o&&o(t),t};return(0,c.useEffect)((function(){f.current.appName=d?"3D":"graphing",l.current.inject("applet_container")}),[d]),(0,c.useEffect)((function(){p(n)}),[n]),(0,c.useImperativeHandle)(e,(function(){return{getImgData:g}})),(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:s}),(0,m.jsxs)(P.Z,{align:"middle",children:[(0,m.jsx)(I.Z,{flex:1,children:(0,m.jsx)(V.Z,{size:"default",checkedChildren:"关闭3D图像",unCheckedChildren:"开启3D图像",checked:d,onChange:function(t){return p(t)}})}),(0,m.jsx)(I.Z,{children:(0,m.jsx)(E.ZP,{size:"large",onClick:g,style:{zIndex:8,marginTop:10},type:"primary",children:"保存到编辑器"})})]})]})})),Y=n(20037),X="link",J="upload-image",Q="add-flowchart",$="draw-image",tt="code-block",et="add-table",nt="------------",it={default:nt,left:":".concat(nt),center:":".concat(nt,":"),right:"".concat(nt,":")},rt=n(14077),ot=n(89728);var at="@▁▁@",st=["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 lt(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}var ct=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",ut=l()(l()({},ct+"-B","bold"),ct+"-I","italic"),ht=l()(l()(l()(l()(l()(l()(l()(l()({},X,"添加链接"),tt,"添加代码块"),J,"添加图片"),$,"添加画图"),Q,"插入流程图"),et,"添加表格"),"maths-latex","数学图像"),"inline-latex","LATEX公式"),dt=function(t){var e=t.defaultValue,n=void 0===e?"":e,i=t.onChange,o=t.width,s=void 0===o?"100%":o,h=t.height,v=void 0===h?400:h,y=t.miniToolbar,b=void 0!==y&&y,x=t.isFocus,k=void 0!==x&&x,S=t.watch,E=t.insertTemp,M=t.mode,P=void 0===M?"markdown":M,N=t.id,_=void 0===N?"markdown-editor-id":N,I=t.showResizeBar,O=void 0!==I&&I,Z=t.noStorage,z=void 0!==Z&&Z,H=t.showNullButton,W=void 0!==H&&H,V=t.showNullProgramButton,U=void 0!==V&&V,q=t.hidetoolBar,nt=void 0!==q&&q,ct=t.fullScreen,dt=void 0!==ct&&ct,pt=t.onBlur,ft=t.onCMBeforeChange,mt=t.onFullScreen,gt=t.className,vt=void 0===gt?"":gt,yt=t.disablePaste,bt=void 0!==yt&&yt,xt=t.disabled,wt=void 0!==xt&&xt,Ct=t.disabledFill,kt=void 0!==Ct&&Ct,St=t.placeholder,Et=void 0===St?"":St,Mt=t.values,Tt=void 0===Mt?"":Mt,Lt=t.extraUse,At=t.onAddBlank,Dt=(0,c.useState)(null),Pt=a()(Dt,2),Nt=Pt[0],Bt=Pt[1],_t=(0,c.useState)(n),It=a()(_t,2),Rt=It[0],Ot=It[1],Ft=(0,c.useState)(S),jt=a()(Ft,2),Zt=jt[0],zt=jt[1],Ht=(0,c.useState)(dt),Wt=a()(Ht,2),Gt=Wt[0],Vt=Wt[1],Ut=(0,c.useState)(""),qt=a()(Ut,2),Kt=qt[0],Yt=qt[1],Xt=(0,c.useState)(0),Jt=a()(Xt,2),Qt=Jt[0],$t=Jt[1],te=(0,c.useState)(v),ee=a()(te,2),ne=ee[0],ie=ee[1],re=(0,c.useState)(!1),oe=a()(re,2),ae=(oe[0],oe[1]),se=(0,c.useState)(0),le=a()(se,2),ce=le[0],ue=le[1],he=(0,c.useState)(0),de=a()(he,2),pe=de[0],fe=de[1],me=(0,c.useRef)(),ge=(0,c.useRef)(),ve=(0,c.useRef)(),ye=(0,c.useRef)(),be=(0,c.useRef)(),xe=(0,c.useRef)(),we=(0,u.useDispatch)();(0,c.useEffect)((function(){var t=window.scrollY||window.pageYOffset;Ot(Tt),null==Nt||Nt.setValue(Tt),window.scrollTo(0,t)}),[Tt]),(0,c.useEffect)((function(){null==mt||mt(Gt)}),[Gt]),(0,c.useEffect)((function(){if(me.current){var t=function(t,n){if(!bt){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"==P)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(),c=l.name.split(".").pop();(0,A.I)(l,(function(t){var n,i,r;t.id?(null==l||null===(n=l.type)||void 0===n?void 0:n.indexOf("image"))>-1?e.replaceSelection('','')):(null==l||null===(i=l.type)||void 0===i?void 0:i.indexOf("video"))>-1?e.replaceSelection('')):(null==l||null===(r=l.type)||void 0===r?void 0:r.indexOf("pdf"))>-1?e.replaceSelection('').concat(l.name,"")):st.includes(c)?e.replaceSelection('').concat(l.name,"")):e.replaceSelection("[".concat(l.name,"](/api/attachments/").concat(t.id,"?type=").concat(t.content_type,")")):401===(null==t?void 0:t.status)&&(document.location.href="/user/login")}))}catch(n){R.ZP.warning("请使用chrome浏览器粘贴")}return!0}return!0}return!0}n.preventDefault()},e=d().fromTextArea(me.current,{mode:P,lineNumbers:!b,lineWrapping:!0,value:n,autoCloseTags:!0,autoCloseBrackets:!0});return e.on("keyup",(function(t,n){8===n.keyCode&&(""==t.getValue()?e.setOption("placeholder",Et):e.setOption("placeholder",null))})),e.on("keydown",(function(t,e){if(8===e.keyCode){var n=function(t,e){var n=t.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,c=a>s?3:4;if(-1===at.indexOf(o))return null;if(console.log("change1:",e,t,r,i,l,a,s,o),l>=0&&i.ch-l<5){var u=l+c;return n.replaceRange("",{line:i.line,ch:l},{line:i.line,ch:u}),{line:i.line,ch:u}}return null}(t);n&&e.preventDefault()}})),k&&e.focus(),e.on("paste",t),wt&&e.on("beforeChange",(function(t,e){"paste"!==e.origin&&"+input"!==e.origin||e.cancel()})),Bt(e),function(){e.off("paste",t)}}}),[]);var Ce=(0,c.useCallback)((function(){ge.current}),[ne,ge,Gt]);(0,c.useEffect)((function(){if(Nt){var t=function(){var t=new p.Z((function(t){var e,n=r()(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;(i.target.offsetHeight>0||i.target.offsetWidth>0)&&(Ce(),Nt.setSize("100%","100%"),Nt.refresh())}}catch(t){n.e(t)}finally{n.f()}}));return t.observe(me.current.parentElement),t}();return function(){var e,n;null!==(e=me.current)&&void 0!==e&&e.parentElement&&t.unobserve(null===(n=me.current)||void 0===n?void 0:n.parentElement)}}}),[Nt,Ce]),(0,c.useEffect)((function(){if(Nt){for(var t=[],e=function(){var e=a()(i[n],2),r=e[0],o=e[1],s=l()({},r,(function(){ke(o)}));t.push(s),Nt.addKeyMap(s)},n=0,i=Object.entries(ut);n0){var t=(new Date).getTime(),e=window.sessionStorage.getItem(_);t>=Qt+1e4&&(!e||e!==Rt)&&(window.sessionStorage.setItem(_,Rt),ae(!0))}}),1e4),(0,c.useEffect)((function(){zt(S)}),[Nt,S]),(0,c.useEffect)((function(){Nt&&k&&Nt.focus()}),[Nt,k]),(0,c.useEffect)((function(){if(Zt&&Nt){var t=function(t){var e=t.target;if(ye.current){var n=e.scrollTop/e.scrollHeight;ye.current.scrollTop=ye.current.scrollHeight*n}},e=Nt.getScrollerElement();return e.addEventListener("scroll",t),function(){e.removeEventListener("scroll",t)}}}),[Nt,Zt]),(0,c.useEffect)((function(){if(Nt&&ft){var t=function(t,e){ft(t,e)};return Nt.on("beforeChange",t),function(){Nt.off("beforeChange",t)}}}),[Nt,ft]),(0,c.useEffect)((function(){if(Nt&&pt){var t=function(){pt(Nt.getValue())};return Nt.on("blur",t),function(){Nt.off("blur",t)}}}),[Nt,pt]),(0,c.useEffect)((function(){if(Nt){var t=function(t,e){var n=t.getValue();Ot(n),$t((new Date).getTime()),t.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),i&&(U?i(n,Le(n)):i(n))};return Nt.on("change",t),function(){Nt.off("change",t)}}}),[Nt,i]),(0,c.useEffect)((function(){if(Nt)if(null==n)Nt.setValue(""),Ot("");else{var t=window.scrollY||window.pageYOffset;n!==Nt.getValue()&&(Nt.setValue(n),Ot(n),Nt.setCursor(wt?1:Nt.lineCount(),0),window.scrollTo(0,t))}}),[Nt,n]);var ke=(0,c.useCallback)((function(t){var e=Nt.getCursor(),n=Nt.getSelection(),i=n.split("\n");switch(t){case"bold":return Nt.replaceSelection("**"+n+"**"),""===n&&Nt.setCursor(e.line,e.ch+2),Nt.focus();case"italic":return Nt.replaceSelection("*"+n+"*"),""===n&&Nt.setCursor(e.line,e.ch+1),Nt.focus();case"code":return Nt.replaceSelection("`"+n+"`"),""===n&&Nt.setCursor(e.line,e.ch+1),Nt.focus();case"inline-latex":if((0,ot.Ye)(we))return;return Yt("inline-latex"),Nt.focus();case"latex":return Nt.replaceSelection("```latex\n"+n+"\n```"),Nt.setCursor(e.line+1,n.length+1),Nt.focus();case"line-break":return Nt.replaceSelection("
\n"),Nt.focus();case"list-ul":return""===n?Nt.replaceSelection("- "+n):Nt.replaceSelection(i.map((function(t){return""===t?"":"- ".concat(t)})).join("\n")),Nt.focus();case"list-ol":return""===n?Nt.replaceSelection("1. "+n):Nt.replaceSelection(i.map((function(t,e){return""===t?"":"".concat(e+1,". ").concat(t)})).join("\n")),Nt.focus();case"add-null-ch":return void(null==At||At());case"add-signal":return""===n&&Nt.setCursor(e.line,e.ch),Nt.replaceSelection("@▁@"),Nt.focus();case"add-multiple":return""===n&&Nt.setCursor(e.line,e.ch),Nt.replaceSelection(at),Nt.focus();case"inster-template-1":return""===n&&Nt.setCursor(e.line,e.ch),Nt.replaceSelection("\n**模板标题**\n模板正文内容,可输入文本内容和粘贴图片等操作"),Nt.focus();case"eraser":return Nt.setValue(""),Nt.focus();case"trigger-watch":return zt(!Zt),Nt.focus();case"trigger-full-screen":return Vt(!Gt),Nt.focus();case X:return void Yt(X);case tt:return void Yt(tt);case J:return void Yt(J);case $:return void Yt($);case"maths-latex":if((0,ot.Ye)(we))return;return void Yt("maths-latex");case Q:return be.current="",sessionStorage.removeItem("file_id"),void Yt(Q);case et:return void Yt(et);default:throw new Error}}),[Nt,Zt,Gt]),Se=(0,c.useCallback)((function(t,e){var n,i,r,o,a;null!=t&&t.disabledClose||Yt("");var s=t||{},l=s.src,c=s.alt,u=s.id;switch(Kt){case X:var h=t.title,d=t.link;return Nt.replaceSelection("[".concat(h,"](").concat(d,")")),Nt.focus();case tt:var p=t.language,f=t.content;return Nt.replaceSelection(["```"+p,f,"```"].join("\n")),Nt.focus();case"maths-latex":for(var m=atob(t),g=new Uint8Array(m.length),v=0;v').concat(c||')):document.getElementById(u).src=j.Z.API_SERVER+l+"?t="+Date.now();break;case J:case $:var b=e,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?Nt.replaceSelection('

').concat(c||

')):Nt.replaceSelection('').concat(c||')):(null==b||null===(o=b.type)||void 0===o?void 0:o.indexOf("video"))>-1?Nt.replaceSelection('')):(null==b||null===(a=b.type)||void 0===a?void 0:a.indexOf("pdf"))>-1?Nt.replaceSelection('').concat(b.name,"")):st.includes(x)?Nt.replaceSelection('').concat(b.name,"")):Nt.replaceSelection("[".concat(b.name,"](").concat(l,")")),Nt.focus();case et:for(var w=t.row,C=t.col,k=t.align,S="\n",E=0;E300&&(e=300),ie(v+e+"px")}},i=ve.current,r=!1,o=0;return i.addEventListener("mousedown",t),document.addEventListener("mousemove",n),document.addEventListener("mouseup",e),function(){i.removeEventListener("mousedown",t),document.removeEventListener("mousemove",n),document.removeEventListener("mouseup",e)}}}),[Nt,ve]),(0,c.useEffect)((function(){ie(v)}),[v]);var Te={width:lt(s),height:lt(ne)},Le=((0,c.useMemo)((function(){if(Qt){var t=new Date(Qt),e=t.getHours(),n=t.getMinutes(),i=t.getSeconds();return n=n<10?"0"+n:n,i=i<10?"0"+i:i,"".concat(e=e<10?"0"+e:e,":").concat(n,":").concat(i)}return 0}),[Qt]),function(t){var e=[];if(U){t=t.replace(/(@▁▁@|@▁@)/g,(function(t,n,i){e.push({multiLine:!("@▁@"===t)})}))}return e});(0,c.useEffect)((function(){ht[Kt]&&Kt!==$&&Kt!==Q&&setTimeout((function(){var t=document.getElementsByClassName("markdown-popup-form")[0],e=window.innerWidth/2-t.offsetWidth/2,n=window.innerHeight/2-t.offsetHeight/2;ue(e),fe(n)}),0)}),[Kt]);var Ae=function(t,e,n,i){var r=document.body.clientHeight,o=document.body.clientWidth;return!(t<20&&n>t||t>o-20&&ne||e>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")}]},C={keywords:["and","as","assert","break","class","continue","def","del","elif","else","except","exec","finally","for","from","global","if","import","in","is","lambda","None","not","or","pass","raise","return","self","try","while","with","yield","int","float","long","complex","hex","abs","all","any","apply","basestring","bin","bool","buffer","bytearray","callable","chr","classmethod","cmp","coerce","compile","complex","delattr","dict","dir","divmod","enumerate","eval","execfile","file","filter","format","frozenset","getattr","globals","hasattr","hash","help","id","input","intern","isinstance","issubclass","iter","len","locals","list","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","reversed","range","raw_input","reduce","reload","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","unichr","unicode","vars","xrange","zip","True","False","__dict__","__methods__","__members__","__class__","__bases__","__name__","__mro__","__subclasses__","__init__","__import__"],quickKey:[{label:"print",content:["print($0)"].join("\n")}]},k={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],quickKey:[{label:"println",content:["println($0)"].join("\n")}]},S=n(53184),E=n.n(S),M={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"]}},T=function(t,e,n,i){t.languages.registerCompletionItemProvider(e,{provideCompletionItems:function(e,r){var o=e.getWordUntilPosition(r),s={startLineNumber:r.lineNumber,endLineNumber:r.lineNumber,startColumn:o.startColumn,endColumn:o.endColumn},l=e.getLineContent(r.lineNumber).substring(o.startColumn-2,o.endColumn),c=function(t,e,n,i){var r=e.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(e){return{label:e,kind:t.languages.CompletionItemKind.Text,insertText:e,range:i}}))}(t,e,r,s);return{suggestions:[].concat(a()(c),a()(n.map((function(e){return{label:e,kind:t.languages.CompletionItemKind.Keyword,documentation:e,insertText:e,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}))),a()(i.map((function(e){return{label:e.label,kind:t.languages.CompletionItemKind.Snippet,documentation:e.content,insertText:l.startsWith("#")?e.content.replace(/#/,""):e.content,insertTextRules:t.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:s}}))))}}})},L=n(82100),A=n.n(L),D=n(29186),P=n.n(D),N=n(85573),B=n.n(N),_=function(){function t(e,n,i){var r=this;A()(this,t),this.placeholder=e,this.editor=n,this.monaco=i,n.onDidChangeModelContent((function(){return r.onDidChangeModelContent()})),this.onDidChangeModelContent()}return P()(t,[{key:"onDidChangeModelContent",value:function(){""===this.editor.getValue()?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}},{key:"getId",value:function(){return t.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)}}]),t}();B()(_,"ID","editor.widget.placeholderHint");var I=_,R=n(96236),O=n(6767),F=n(25399),j=n(89392),Z=n(89794),z=n(56102),H=n(37712),W=["width","height","value","language","style","options","overrideServices","theme","onEditBlur","isCopy","onSave","autoHeight","forbidCopy","onChange","editorDidMount","onFocus","onBreakPoint","breakPointValue","filename","errorLine","errorContent","highlightLine","openBreakPoint","placeholder","showMiniMap"];function G(t){return/^\d+$/.test(t)?"".concat(t,"px"):t}function V(){}var U={"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 t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],e=t;if(Array.isArray(t)){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:"",e=arguments.length>1?arguments[1]:void 0;if(!t||""===t.trim())return!0;for(var n=Et.current.instance.getModel(),i=n.getLineTokens(e),r=!1,o=0;o<2;o++)1===i.getStandardTokenType(o)&&(r=!0);return r};function Ft(t){(window.navigator.platform.match("Mac")?t.metaKey:t.ctrlKey)&&83==t.keyCode&&(t.preventDefault(),J())}(0,v.useEffect)((function(){var t,e=null===(t=Et.current)||void 0===t?void 0:t.instance;if(e&&It&&et){var n=e.onDidBlurEditorWidget((function(){Nt.current=!1})),i=e.onDidFocusEditorText((function(){Nt.current=!0}));return function(){n.dispose(),i.dispose()}}}),[Et.current,It,et]),(0,v.useEffect)((function(){var t;if(null!==(t=Et.current)&&void 0!==t&&t.instance&&It&&bt){var e=Et.current.instance,n=e.getModel();if(!n)return;!function(){var t,i=[],r=[],o=n.getAllDecorations(),a=l()(o);try{for(a.s();!(t=a.n()).done;){var s,c=t.value;if("highlighted-line"===c.options.className)i.push(null==c||null===(s=c.range)||void 0===s?void 0:s.startLineNumber),r.push(null==c?void 0:c.id)}}catch(t){a.e(t)}finally{a.f()}if(vt!==i[0]){n.deltaDecorations(r,[]);var u=n.getLineCount();vt&&vt<=u&&(e.deltaDecorations([],[{range:new K.Range(vt,1,vt,n.getLineMaxColumn(vt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),e.revealLineInCenter(vt))}}();var i=function(){var t,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],i=[],r=[],o=n.getAllDecorations(),a=l()(o);try{for(a.s();!(t=a.n()).done;){var s,c=t.value;if("breakpoints-select"===c.options.linesDecorationsClassName)i.push(null==c||null===(s=c.range)||void 0===s?void 0:s.startLineNumber),r.push(null==c?void 0:c.id)}}catch(t){a.e(t)}finally{a.f()}if(e)return{lines:i,ids:r};ct(i)},r=function(){var t=g()(f()().mark((function t(e){var r;return f()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return r={range:new K.Range(e,1,e,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}},t.next=3,n.deltaDecorations([],[r]);case 3:i();case 4:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),o=function(){var t=g()(f()().mark((function t(r){var o,a,s,c,u;return f()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=[],a=e.getLineDecorations(r),s=l()(a);try{for(s.s();!(c=s.n()).done;)"breakpoints-select"===(u=c.value).options.linesDecorationsClassName&&o.push(u.id)}catch(t){s.e(t)}finally{s.f()}return t.next=6,n.deltaDecorations(o,[]);case 6:i();case 7:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),a=function(t){var n,i=e.getLineDecorations(t),r=l()(i);try{for(r.s();!(n=r.n()).done;){if("breakpoints-select"===n.value.options.linesDecorationsClassName)return!0}}catch(t){r.e(t)}finally{r.f()}return!1};if(!(0,j.isEqual)(ht,i(!0).lines)){n.deltaDecorations(i(!0).ids,[]);var s=ht.map((function(t){return{range:new K.Range(t,1,t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}}));n.deltaDecorations([],s)}var c=e.onDidChangeModelContent((function(t){var s=e.getPosition();if(s){var l=s.lineNumber;clearTimeout(Pt.current),Pt.current=setTimeout((function(){Ot(n.getLineContent(l),l)?o(l):a(l)?(o(l),r(l)):i()}),100)}})),u=e.onMouseDown((function(t){var e;if(t.target.detail&&null!==(e=t.target)&&void 0!==e&&null!==(e=e.element)&&void 0!==e&&null!==(e=e.className)&&void 0!==e&&e.includes("line-numbers")){var i=t.target.position.lineNumber;if(Ot(n.getLineContent(i),i))return;a(i)?o(i):r(i)}})),h=function(){Lt.current=e.deltaDecorations(Lt.current,[])},d=e.onMouseMove((function(t){var i;if(h(),t.target.detail&&null!==(i=t.target)&&void 0!==i&&null!==(i=i.element)&&void 0!==i&&null!==(i=i.className)&&void 0!==i&&i.includes("line-numbers")){var r=t.target.position.lineNumber;if(Ot(n.getLineContent(r),r))return;!function(t){var n={range:new K.Range(t,1,t,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Lt.current=e.deltaDecorations(Lt.current,[n])}(r)}})),p=e.onMouseLeave((function(){h()}));return function(){c.dispose(),u.dispose(),d.dispose(),p.dispose()}}}),[Et.current,It,ht,vt,bt,p]),(0,v.useEffect)((function(){var t;null!==(t=Et.current)&&void 0!==t&&t.instance&&bt&&Et.current.instance.setPosition({lineNumber:0,column:0})}),[vt]);var jt=function(){if($&&Et.current.instance){var t=Et.current.instance.getContentHeight();Kt(t0||i.target.offsetWidth>0)&&Et.current.instance.layout()}}catch(t){n.e(t)}finally{n.f()}}))).observe(St.current),t}();return wt&&"string"==typeof wt&&new I(wt,e,K),Rt(!0),function(){var t=Et.current.instance;t.dispose();var e=t.getModel();e&&e.dispose(),Et.current.subscription&&Et.current.subscription.dispose(),r.unobserve(St.current)}}catch(t){}}))}),[]),(0,v.useEffect)((function(){if(Et.current.instance&&It)return document.addEventListener("keydown",Ft,!1),function(){document.removeEventListener("keydown",Ft)}}),[J,It]),(0,v.useEffect)((function(){var t=Et.current.instance;if(t&&It){var e=q(p);K.editor.setModelLanguage(t.getModel(),e)}}),[p,It]),(0,v.useEffect)((function(){Et.current.instance&&It&&K.editor.setTheme(B)}),[B,It]),(0,v.useEffect)((function(){var t=Et.current.instance;Mt.current=A,t&&It&&(t.updateOptions(r()({},A)),setTimeout((function(){t.getModel().updateOptions(r()({},A))}),200))}),[JSON.stringify(A),It]),(0,v.useEffect)((function(){var t=Et.current.instance;t&&It&&t.layout()}),[i,s,It]);var Ht=(0,v.useState)(G(i)),Wt=u()(Ht,2),Gt=Wt[0],Vt=(Wt[1],(0,v.useState)(G(s))),Ut=u()(Vt,2),qt=Ut[0],Kt=Ut[1],Yt=r()(r()({},S),{},{width:Gt,height:qt,position:"relative"});return(0,H.jsx)("div",{className:"my-monaco-editor",ref:St,style:Yt,children:X&&(0,H.jsx)(z.CopyToClipboard,{text:c,onCopy:function(){return O.ZP.success("复制成功")},children:(0,H.jsx)(F.Z,{title:"复制代码",children:(0,H.jsxs)("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"},children:[(0,H.jsx)("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," 复制代码"]})})})})};function J(t){var e=t.width,i=void 0===e?"100%":e,o=t.height,a=void 0===o?"100%":o,s=t.original,c=t.modified,h=t.language,d=t.options,p=void 0===d?{}:d,f=(0,v.useRef)(),m=(0,v.useState)(null),g=u()(m,2),b=g[0],x=g[1];(0,v.useEffect)((function(){return f.current&&Promise.all([n.e(8909),n.e(9404)]).then(n.bind(n,2550)).then((function(t){var e=(K=t).editor.createDiffEditor(f.current,r()(r()({enableSplitViewResizing:!1,scrollBeyondLastLine:!1,roundedSelection:!1,renderIndicators:!1,useShadows:!1,horizontal:"hidden",lineNumbers:"off",wordWrap:"off",ignoreTrimWhitespace:!1,"semanticHighlighting.enabled":!0,followsCaret:!0,ignoreCharChanges:!0,minimap:{enabled:!1},readOnly:!0},p),{},{wordWrap:!0}));x(e);var n=function(t){var e;return f.current&&(e=new y.Z((function(e){var n,i=l()(e);try{for(i.s();!(n=i.n()).done;){var r=n.value;(r.target.offsetHeight>0||r.target.offsetWidth>0)&&t.layout()}}catch(t){i.e(t)}finally{i.f()}}))).observe(f.current),e}(e);return function(){e.dispose();var t=e.getModel();t&&t.dispose(),n.unobserve(f.current)}})),function(){window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}}),[]),(0,v.useEffect)((function(){b&&b.setModel({original:K.editor.createModel(s,h),modified:K.editor.createModel(c,h)})}),[s,c,h,b]);var w={width:G(i),height:G(a)};return(0,H.jsx)("div",{className:"my-diff-editor",ref:f,style:w})}},14077:function(t,e,n){"use strict";n.d(e,{Z:function(){return r}});var i=n(59301);function r(t,e){var n=(0,i.useRef)();(0,i.useEffect)((function(){n.current=t})),(0,i.useEffect)((function(){if(null!==e){var t=setInterval((function(){n.current()}),e);return function(){return clearInterval(t)}}}),[e])}},52802:function(t,e,n){"use strict";n.r(e),n.d(e,{default:function(){return S}});var i=n(7557),r=n.n(i),o=n(82242),a=n.n(o),s=n(41498),l=n.n(s),c=n(79800),u=n.n(c),h=n(59301),d=n(97752),p=n(6767),f=n(37568),m=n(99571),g=n(43170),v=n(37712);var y=function(t){var e=t.setIscreate,n=t.init,i=t.UpdateItem,o=(0,h.useState)(""),a=u()(o,2),s=a[0],c=a[1],y=(0,h.useState)(""),b=u()(y,2),x=b[0],w=b[1];function C(){return(C=l()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(s){t.next=3;break}return p.ZP.info("标题不能为空"),t.abrupt("return");case 3:if(x){t.next=6;break}return p.ZP.info("内容不能为空"),t.abrupt("return");case 6:if(!i){t.next=9;break}return k(),t.abrupt("return");case 9:return t.next=11,(0,g.ZP)("/api/hpc_courses.json",{method:"post",body:{name:s,description:x,container_type:window.location.pathname.split("/")[1]}});case 11:t.sent&&(p.ZP.info("创建成功"),e(!1),n("add"));case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(){return S.apply(this,arguments)}function S(){return(S=l()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,g.ZP)("/api/hpc_courses/".concat(i.id,".json"),{method:"put",body:{name:s,description:x,container_type:window.location.pathname.split("/")[1]}});case 2:t.sent&&(p.ZP.info("编辑成功"),e(!1),n(""));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return(0,h.useEffect)((function(){i&&(c(i&&i.name),w(i&&i.description))}),[i]),(0,v.jsxs)("div",{children:[(0,v.jsx)(f.Z,{style:{marginBottom:"20px"},placeholder:"请输入标题",value:s,maxLength:60,addonAfter:String(s.length)+"/60",onChange:function(t){return c(t.target.value)}}),(0,v.jsx)(d.Z,{id:"courseContentMD",defaultValue:x,onChange:function(t){return w(t)}}),(0,v.jsxs)("div",{className:"clearfix mt30 mb30",children:[(0,v.jsx)(m.ZP,{type:"primary",onClick:function(){return function(){return C.apply(this,arguments)}()},className:"defalutSubmitbtn fl mr20",children:"提交"}),(0,v.jsx)("a",{className:"defalutCancelbtn fl",onClick:function(){return e(!1)},children:"取消"})]})]})},b=n(18714);var x=function(t){var e=t.CourseItem,n=t.userId,i=t.init,o=t.ItemUpdate,a=t.setSee,s=t.UserInfo;function c(){return(c=l()(r()().mark((function t(){return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,g.ZP)("/api/hpc_courses/".concat(e.id,".json"),{method:"delete"});case 2:t.sent&&(p.ZP.info("删除成功"),i("delete"),a(!1));case 4:case"end":return t.stop()}}),t)})))).apply(this,arguments)}return(0,v.jsxs)("div",{children:[299635===n||301458===n||null!=s&&s.admin||null!=s&&s.business?(0,v.jsxs)("div",{style:{textAlign:"right"},children:[(0,v.jsx)(m.ZP,{onClick:function(){o(e)},children:"编辑"}),(0,v.jsx)(m.ZP,{onClick:function(){return function(){return c.apply(this,arguments)}()},style:{marginLeft:"30px"},children:"删除"})]}):null,(0,v.jsx)("h1",{children:null==e?void 0:e.name}),(0,v.jsx)(b.Z,{value:null==e?void 0:e.description})]})},w=n(14566),C=n(62233),k=n(56565);var S=(0,k.connect)((function(t){return{user:t.user}}))((function(t){var e,n,i,o,s,c,d,f,b,S=t.user,E=t.dispatch,M=(0,h.useState)(1),T=u()(M,2),L=T[0],A=(T[1],(0,h.useState)(100)),D=u()(A,2),P=D[0],N=(D[1],(0,h.useState)([])),B=u()(N,2),_=B[0],I=B[1],R=(0,h.useState)(!1),O=u()(R,2),F=O[0],j=O[1],Z=(0,h.useState)(!1),z=u()(Z,2),H=z[0],W=z[1],G=(0,h.useState)(""),V=u()(G,2),U=V[0],q=V[1],K=(0,h.useState)(""),Y=u()(K,2),X=Y[0],J=Y[1],Q=(0,h.useState)(""),$=u()(Q,2),tt=$[0],et=$[1],nt=(0,k.useParams)().itemname,it=(0,h.useState)(""),rt=u()(it,2),ot=rt[0],at=rt[1];function st(t){return lt.apply(this,arguments)}function lt(){return(lt=l()(r()().mark((function t(e){var n,i,o,a;return r()().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,(0,g.ZP)("/api/hpc_courses.json",{method:"get",params:{page:L,per_page:P,container_type:window.location.pathname.split("/")[1]}});case 2:if(!(n=t.sent)){t.next=24;break}if(i=n.data.hpc_courses.length,I(n.data.hpc_courses),et(n.data.file_url),J(""),i){t.next=10;break}return t.abrupt("return");case 10:if(ot){t.next=14;break}nt?(a=0,null==n||null===(o=n.data)||void 0===o||null===(o=o.hpc_courses)||void 0===o||o.map((function(t,e){var n;(null==nt?void 0:nt.toLocaleLowerCase())===(null==t||null===(n=t.name)||void 0===n?void 0:n.toLocaleLowerCase())&&(a=e)})),q(n.data.hpc_courses[a]),W(!0),at(n.data.hpc_courses[a].id),"resources"===(null==nt?void 0:nt.toLocaleLowerCase())&&(q(n.data.hpc_courses.filter((function(t){return 15===t.id}))[0]),W(!0),at(15))):(q(n.data.hpc_courses[0]),W(!0),at(n.data.hpc_courses[0].id)),t.next=24;break;case 14:if("delete"!==e){t.next=23;break}if(0!==i){t.next=18;break}return W(!1),t.abrupt("return");case 18:q(n.data.hpc_courses[0]),W(!0),at(n.data.hpc_courses[0].id),t.next=24;break;case 23:"add"===e?(q(n.data.hpc_courses[i-1]),W(!0),at(n.data.hpc_courses[i-1].id)):(q(n.data.hpc_courses.filter((function(t){return t.id===ot}))[0]),W(!0),at(ot));case 24:case"end":return t.stop()}}),t)})))).apply(this,arguments)}(0,h.useEffect)((function(){E({type:"globalSetting/headerToggle",payload:!1}),L&&st("")}),[L]);var ct={name:"file",multiple:!0,action:"https://www.educoder.net/api/hpc_courses/upload_file.json",data:{container_type:window.location.pathname.split("/")[1]},onChange:function(t){var e=t.file.status;"done"===e?(p.ZP.success("".concat(t.file.name," 文件上传成功")),st("")):"error"===e&&p.ZP.error("".concat(t.file.name," 文件上传失败"))},beforeUpload:function(t){var e=t.size/1024/1024<150;return e||p.ZP.info("文件大小必须小于150MB"),e}};return(0,v.jsxs)("div",{style:{marginBottom:"40px"},children:[(0,v.jsx)("div",{className:"bannterdiv",style:{background:"url(".concat(C.Z.IMG_SERVER+"/".concat(tt),")")}}),(0,v.jsx)("img",{style:{width:"100%"},src:C.Z.IMG_SERVER+"/".concat(tt)}),(0,v.jsxs)("div",{className:"edu-container minH500",style:{display:"flex",width:"1200px"},children:[(0,v.jsxs)("div",{style:{flex:"1",marginTop:"17px"},children:[_&&_.map((function(t,e){return(0,v.jsx)("p",{onClick:function(){return function(t){j(!1),W(!0),q(t),at(t.id)}(t)},className:ot===t.id?"menuitemselect":"menuitem task-hide",children:t.name},e)})),299635===(null==S||null===(e=S.userInfo)||void 0===e?void 0:e.user_id)||301458===(null==S||null===(n=S.userInfo)||void 0===n?void 0:n.user_id)||null!=S&&null!==(i=S.userInfo)&&void 0!==i&&i.admin||null!=S&&null!==(o=S.userInfo)&&void 0!==o&&o.business?(0,v.jsx)("p",{onClick:function(){return J(""),j(!0),void W(!1)},className:"menuadd",style:{fontSize:"24px",paddingLeft:"10px"},children:(0,v.jsx)("span",{style:{fontSize:"16px",marginLeft:"5px"},children:"Last updated"})}):null]}),(0,v.jsxs)("div",{className:"rightcount",style:{flex:"6",background:"#ffffff",padding:"20px",marginLeft:"30px",marginTop:"24px"},children:[F?(0,v.jsx)(y,{UpdateItem:X,setIscreate:j,init:st}):null,H?(0,v.jsx)(x,{UserInfo:null==S?void 0:S.userInfo,setSee:W,userId:null==S||null===(s=S.userInfo)||void 0===s?void 0:s.user_id,ItemUpdate:function(t){J(t),j(!0),W(!1)},CourseItem:U,init:st}):null]})]}),299635===(null==S||null===(c=S.userInfo)||void 0===c?void 0:c.user_id)||301458===(null==S||null===(d=S.userInfo)||void 0===d?void 0:d.user_id)||null!=S&&null!==(f=S.userInfo)&&void 0!==f&&f.admin||null!=S&&null!==(b=S.userInfo)&&void 0!==b&&b.business?(0,v.jsx)(w.Z,a()(a()({},ct),{},{children:(0,v.jsx)(m.ZP,{className:"menuadd",style:{paddingLeft:"10px",marginLeft:"20px"},children:"上传首页图片"})})):null]})}))},63741:function(t,e,n){"use strict";n.d(e,{AL:function(){return k},Iy:function(){return p},Qv:function(){return g},ez:function(){return C},jb:function(){return f}});var i=n(79800),r=n.n(i),o=n(32834),a=n.n(o),s=n(11690),l=1;var c=[],u=["
    "],h=new(a().Renderer),d=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function p(){c.length=0,u=["
      "]}var f={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function m(t,e,n,i){if(e>=t.length||t[e].level<=n)return e;var r=t[e];i.push("
    • "+r.text+"");var o=[];return e=m(t,++e,r.level,o),o.length>0&&(i.push("
        "),o.forEach((function(t){i.push(t)})),i.push("
      ")),i.push("
    • "),e=m(t,e,n,i)}function g(){return m(c,0,0,u),u.push("
    "),u.join("")}var v={heading:function(t){var e=d.exec(t);if(l+=1,e)return{type:"heading",raw:e[0],depth:e[1].length,text:e[2]}},fences:function(t){var e=this.rules.block.fences.exec(t);if(e){var n=e[0],i=function(t,e){var n=t.match(/^(\s+)(?:```)/);if(null===n)return e;var i=n[1];return e.split("\n").map((function(t){var e=t.match(/^\s+/);return null===e?t:r()(e,1)[0].length>=i.length?t.slice(i.length):t})).join("\n")}(n,e[3]||""),o=e[2]?e[2].trim():e[2];if(["latex","katex","math"].indexOf(o)>=0){var a=x(),s=i;i=a,w[a]={type:"block",expression:s}}return{type:"code",raw:n,lang:o,text:i}}}},y=/(?:\${2})([^\n`]+?)(?:\${2})/gi,b=0,x=function(){return"__special_katext_id_".concat(b++,"__")},w={};function C(){return w}function k(){b=0,w={}}function S(t){return t=t.replace(y,(function(t,e){var n=x();return w[n]={type:"inline",expression:e},n}))}var E=h.listitem;h.listitem=function(t){return E(S(t))};var M=h.paragraph;h.paragraph=function(t){return M(S(t))};var T=h.tablecell;h.tablecell=function(t,e){return T(S(t),e)},h.code=function(t,e,n){var i=(e||"").match(/\S*/)[0];return i?["latex","katex","math"].indexOf(i)>=0?"

    ".concat(t,"

    "):'
    ').concat(n?t:(0,s.escape)(t,!0),"
    \n"):'
    '+(n?t:(0,s.escape)(t,!0))+"
    "},h.heading=function(t,e,n){var i=this.options.headerPrefix+n.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return c.push({anchor:i,level:e,text:t}),"'+t+""},a().setOptions({silent:!0,gfm:!0,pedantic:!1}),a().use({tokenizer:v,renderer:h}),e.ZP=a()},45559:function(){},42313:function(){},96408:function(t,e){"use strict";e.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},99498:function(t,e,n){!function(t){function e(t){t.state.placeholder&&(t.state.placeholder.parentNode.removeChild(t.state.placeholder),t.state.placeholder=null)}function n(t){e(t);var n=t.state.placeholder=document.createElement("pre");n.style.cssText="height: 0; overflow: visible",n.style.direction=t.getOption("direction"),n.className="CodeMirror-placeholder CodeMirror-line-like";var i=t.getOption("placeholder");"string"==typeof i&&(i=document.createTextNode(i)),n.appendChild(i),t.display.lineSpace.insertBefore(n,t.display.lineSpace.firstChild)}function i(t){setTimeout((function(){var i=!1,r=t.getInputField();"TEXTAREA"==r.nodeName?i=!r.value:1==t.lineCount()&&(i=!/[^\u200b]/.test(r.querySelector(".CodeMirror-line").textContent)),i?n(t):e(t)}),20)}function r(t){a(t)&&n(t)}function o(t){var i=t.getWrapperElement(),r=a(t);i.className=i.className.replace(" CodeMirror-empty","")+(r?" CodeMirror-empty":""),r?n(t):e(t)}function a(t){return 1===t.lineCount()&&""===t.getLine(0)}t.defineOption("placeholder","",(function(n,a,s){var l=s&&s!=t.Init;if(a&&!l)n.on("blur",r),n.on("change",o),n.on("swapDoc",o),t.on(n.getInputField(),"compositionupdate",n.state.placeholderCompose=function(){i(n)}),o(n);else if(!a&&l){n.off("blur",r),n.off("change",o),n.off("swapDoc",o),t.off(n.getInputField(),"compositionupdate",n.state.placeholderCompose),e(n);var c=n.getWrapperElement();c.className=c.className.replace(" CodeMirror-empty","")}a&&!n.hasFocus()&&r(n)}))}(n(89780))},25717:function(t,e,n){!function(t){var e={pairs:"()[]{}''\"\"",closeBefore:")]}'\":;>",triples:"",explode:"[]{}"},n=t.Pos;function i(t,n){return"pairs"==n&&"string"==typeof t?t:"object"==typeof t&&null!=t[n]?t[n]:e[n]}t.defineOption("autoCloseBrackets",!1,(function(e,n,a){a&&a!=t.Init&&(e.removeKeyMap(r),e.state.closeBrackets=null),n&&(o(i(n,"pairs")),e.state.closeBrackets=n,e.addKeyMap(r))}));var r={Backspace:l,Enter:c};function o(t){for(var e=0;e=0;l--){var u=a[l].head;e.replaceRange("",n(u.line,u.ch-1),n(u.line,u.ch+1),"+delete")}}function c(e){var n=s(e),r=n&&i(n,"explode");if(!r||e.getOption("disableInput"))return t.Pass;for(var o=e.listSelections(),a=0;a0;return{anchor:new n(e.anchor.line,e.anchor.ch+(i?-1:1)),head:new n(e.head.line,e.head.ch+(i?1:-1))}}function h(e,r){var o=s(e);if(!o||e.getOption("disableInput"))return t.Pass;var a=i(o,"pairs"),l=a.indexOf(r);if(-1==l)return t.Pass;for(var c,h=i(o,"closeBefore"),d=i(o,"triples"),f=a.charAt(l+1)==r,m=e.listSelections(),g=l%2==0,v=0;v1&&d.indexOf(r)>=0&&e.getRange(n(x.line,x.ch-2),x)==r+r){if(x.ch>2&&/\bstring/.test(e.getTokenTypeAt(n(x.line,x.ch-2))))return t.Pass;y="addFour"}else if(f){var C=0==x.ch?" ":e.getRange(n(x.line,x.ch-1),x);if(t.isWordChar(w)||C==r||t.isWordChar(C))return t.Pass;y="both"}else{if(!g||!(0===w.length||/\s/.test(w)||h.indexOf(w)>-1))return t.Pass;y="both"}else y=f&&p(e,x)?"both":d.indexOf(r)>=0&&e.getRange(x,n(x.line,x.ch+3))==r+r+r?"skipThree":"skip";if(c){if(c!=y)return t.Pass}else c=y}var k=l%2?a.charAt(l-1):r,S=l%2?r:a.charAt(l+1);e.operation((function(){if("skip"==c)e.execCommand("goCharRight");else if("skipThree"==c)for(var t=0;t<3;t++)e.execCommand("goCharRight");else if("surround"==c){var n=e.getSelections();for(t=0;t'"]=function(t){return i(t)}),e.addKeyMap(a)}}));var e=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],n=["applet","blockquote","body","button","div","dl","fieldset","form","frameset","h1","h2","h3","h4","h5","h6","head","html","iframe","layer","legend","object","ol","p","select","table","ul"];function i(i){if(i.getOption("disableInput"))return t.Pass;for(var r=i.listSelections(),o=[],l=i.getOption("autoCloseTags"),c=0;cu.ch&&(m=m.slice(0,m.length-h.end+u.ch));var b=m.toLowerCase();if(!m||"string"==h.type&&(h.end!=u.ch||!/[\"\']/.test(h.string.charAt(h.string.length-1))||1==h.string.length)||"tag"==h.type&&f.close||h.string.indexOf("/")==u.ch-h.start-1||v&&a(v,b)>-1||s(i,d.mode.xmlCurrentContext&&d.mode.xmlCurrentContext(p)||[],m,u,!0))return t.Pass;var x="object"==typeof l&&l.emptyTags;if(x&&a(x,m)>-1)o[c]={text:"/>",newPos:t.Pos(u.line,u.ch+2)};else{var w=y&&a(y,b)>-1;o[c]={indent:w,text:">"+(w?"\n\n":"")+"",newPos:w?t.Pos(u.line+1,0):t.Pos(u.line,u.ch+1)}}}var C="object"==typeof l&&l.dontIndentOnAutoClose;for(c=r.length-1;c>=0;c--){var k=o[c];i.replaceRange(k.text,r[c].head,r[c].anchor,"+insert");var S=i.listSelections().slice(0);S[c]={head:k.newPos,anchor:k.newPos},i.setSelections(S),!C&&k.indent&&(i.indentLine(k.newPos.line,null,!0),i.indentLine(k.newPos.line+1,null,!0))}}function r(e,n){for(var i=e.listSelections(),r=[],o=n?"/":""!=e.getLine(u.line).charAt(h.end)&&(f+=">"),r[c]=f}if(e.replaceSelections(r),i=e.listSelections(),!l)for(c=0;c=0&&n[c]==i;c--)++l;for(r=s.to,c=1;c=t.max))return t.ch=0,t.text=t.cm.getLine(++t.line),!0}function l(t){if(!(t.line<=t.min))return t.text=t.cm.getLine(--t.line),t.ch=t.text.length,!0}function c(t){for(;;){var e=t.text.indexOf(">",t.ch);if(-1==e){if(s(t))continue;return}if(a(t,e+1)){var n=t.text.lastIndexOf("/",e),i=n>-1&&!/\S/.test(t.text.slice(n+1,e));return t.ch=e+1,i?"selfClose":"regular"}t.ch=e+1}}function u(t){for(;;){var e=t.ch?t.text.lastIndexOf("<",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(a(t,e+1)){r.lastIndex=e,t.ch=e;var n=r.exec(t.text);if(n&&n.index==e)return n}else t.ch=e}}function h(t){for(;;){r.lastIndex=t.ch;var e=r.exec(t.text);if(!e){if(s(t))continue;return}if(a(t,e.index+1))return t.ch=e.index+e[0].length,e;t.ch=e.index+1}}function d(t){for(;;){var e=t.ch?t.text.lastIndexOf(">",t.ch-1):-1;if(-1==e){if(l(t))continue;return}if(a(t,e+1)){var n=t.text.lastIndexOf("/",e),i=n>-1&&!/\S/.test(t.text.slice(n+1,e));return t.ch=e+1,i?"selfClose":"regular"}t.ch=e}}function p(t,n){for(var i=[];;){var r,o=h(t),a=t.line,s=t.ch-(o?o[0].length:0);if(!o||!(r=c(t)))return;if("selfClose"!=r)if(o[1]){for(var l=i.length-1;l>=0;--l)if(i[l]==o[2]){i.length=l;break}if(l<0&&(!n||n==o[2]))return{tag:o[2],from:e(a,s),to:e(t.line,t.ch)}}else i.push(o[2])}}function f(t,n){for(var i=[];;){var r=d(t);if(!r)return;if("selfClose"!=r){var o=t.line,a=t.ch,s=u(t);if(!s)return;if(s[1])i.push(s[2]);else{for(var l=i.length-1;l>=0;--l)if(i[l]==s[2]){i.length=l;break}if(l<0&&(!n||n==s[2]))return{tag:s[2],from:e(t.line,t.ch),to:e(o,a)}}}else u(t)}}t.registerHelper("fold","xml",(function(t,i){for(var r=new o(t,i.line,0);;){var a=h(r);if(!a||r.line!=i.line)return;var s=c(r);if(!s)return;if(!a[1]&&"selfClose"!=s){var l=e(r.line,r.ch),u=p(r,a[2]);return u&&n(u.from,l)>0?{from:l,to:u.from}:null}}})),t.findMatchingTag=function(t,i,r){var a=new o(t,i.line,i.ch,r);if(-1!=a.text.indexOf(">")||-1!=a.text.indexOf("<")){var s=c(a),l=s&&e(a.line,a.ch),h=s&&u(a);if(s&&h&&!(n(a,i)>0)){var d={from:e(a.line,a.ch),to:l,tag:h[2]};return"selfClose"==s?{open:d,close:null,at:"open"}:h[1]?{open:f(a,h[2]),close:d,at:"close"}:{open:d,close:p(a=new o(t,l.line,l.ch,r),h[2]),at:"open"}}}},t.findEnclosingTag=function(t,e,n,i){for(var r=new o(t,e.line,e.ch,n);;){var a=f(r,i);if(!a)break;var s=p(new o(t,e.line,e.ch,n),a.tag);if(s)return{open:a,close:s}}},t.scanForClosingTag=function(t,e,n,i){return p(new o(t,e.line,e.ch,i?{from:0,to:i}:null),n)}}(n(89780))},89780:function(t){t.exports=function(){"use strict";var t=navigator.userAgent,e=navigator.platform,n=/gecko\/\d/i.test(t),i=/MSIE \d/.test(t),r=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(t),o=/Edge\/(\d+)/.exec(t),a=i||r||o,s=a&&(i?document.documentMode||6:+(o||r)[1]),l=!o&&/WebKit\//.test(t),c=l&&/Qt\/\d+\.\d+/.test(t),u=!o&&/Chrome\//.test(t),h=/Opera\//.test(t),d=/Apple Computer/.test(navigator.vendor),p=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(t),f=/PhantomJS/.test(t),m=!o&&/AppleWebKit/.test(t)&&/Mobile\/\w+/.test(t),g=/Android/.test(t),v=m||g||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(t),y=m||/Mac/.test(e),b=/\bCrOS\b/.test(t),x=/win/i.test(e),w=h&&t.match(/Version\/(\d*\.\d*)/);w&&(w=Number(w[1])),w&&w>=15&&(h=!1,l=!0);var C=y&&(c||h&&(null==w||w<12.11)),k=n||a&&s>=9;function S(t){return new RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var E,M=function(t,e){var n=t.className,i=S(e).exec(n);if(i){var r=n.slice(i.index+i[0].length);t.className=n.slice(0,i.index)+(r?i[1]+r:"")}};function T(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function L(t,e){return T(t).appendChild(e)}function A(t,e,n,i){var r=document.createElement(t);if(n&&(r.className=n),i&&(r.style.cssText=i),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var o=0;o=e)return a+(e-o);a+=s-o,a+=n-a%n,o=s+1}}m?I=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:a&&(I=function(t){try{t.select()}catch(t){}});var j=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};function Z(t,e){for(var n=0;n=e)return i+Math.min(a,e-r);if(r+=o-i,i=o+1,(r+=n-r%n)>=e)return i}}var q=[""];function K(t){for(;q.length<=t;)q.push(Y(q)+" ");return q[t]}function Y(t){return t[t.length-1]}function X(t,e){for(var n=[],i=0;i"€"&&(t.toUpperCase()!=t.toLowerCase()||tt.test(t))}function nt(t,e){return e?!!(e.source.indexOf("\\w")>-1&&et(t))||e.test(t):et(t)}function it(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var rt=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ot(t){return t.charCodeAt(0)>=768&&rt.test(t)}function at(t,e,n){for(;(n<0?e>0:en?-1:1;;){if(e==n)return e;var r=(e+n)/2,o=i<0?Math.ceil(r):Math.floor(r);if(o==e)return t(o)?e:n;t(o)?n=o:e=o+i}}function lt(t,e,n,i){if(!t)return i(e,n,"ltr",0);for(var r=!1,o=0;oe||e==n&&a.to==e)&&(i(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),r=!0)}r||i(e,n,"ltr")}var ct=null;function ut(t,e,n){var i;ct=null;for(var r=0;re)return r;o.to==e&&(o.from!=o.to&&"before"==n?i=r:ct=r),o.from==e&&(o.from!=o.to&&"before"!=n?i=r:ct=r)}return null!=i?i:ct}var ht=function(){var t="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",e="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function n(n){return n<=247?t.charAt(n):1424<=n&&n<=1524?"R":1536<=n&&n<=1785?e.charAt(n-1536):1774<=n&&n<=2220?"r":8192<=n&&n<=8203?"w":8204==n?"b":"L"}var i=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,o=/[LRr]/,a=/[Lb1n]/,s=/[1n]/;function l(t,e,n){this.level=t,this.from=e,this.to=n}return function(t,e){var c="ltr"==e?"L":"R";if(0==t.length||"ltr"==e&&!i.test(t))return!1;for(var u=t.length,h=[],d=0;d-1&&(i[e]=r.slice(0,o).concat(r.slice(o+1)))}}}function vt(t,e){var n=mt(t,e);if(n.length)for(var i=Array.prototype.slice.call(arguments,2),r=0;r0}function wt(t){t.prototype.on=function(t,e){ft(this,t,e)},t.prototype.off=function(t,e){gt(this,t,e)}}function Ct(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function kt(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function St(t){return null!=t.defaultPrevented?t.defaultPrevented:0==t.returnValue}function Et(t){Ct(t),kt(t)}function Mt(t){return t.target||t.srcElement}function Tt(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),y&&t.ctrlKey&&1==e&&(e=3),e}var Lt,At,Dt=function(){if(a&&s<9)return!1;var t=A("div");return"draggable"in t||"dragDrop"in t}();function Pt(t){if(null==Lt){var e=A("span","​");L(t,A("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(Lt=e.offsetWidth<=1&&e.offsetHeight>2&&!(a&&s<8))}var n=Lt?A("span","​"):A("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Nt(t){if(null!=At)return At;var e=L(t,document.createTextNode("AخA")),n=E(e,0,1).getBoundingClientRect(),i=E(e,1,2).getBoundingClientRect();return T(t),!(!n||n.left==n.right)&&(At=i.right-n.right<3)}var Bt,_t=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],i=t.length;e<=i;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var o=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),e+=a+1):(n.push(o),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},It=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!(!e||e.parentElement()!=t)&&0!=e.compareEndPoints("StartToEnd",e)},Rt="oncopy"in(Bt=A("div"))||(Bt.setAttribute("oncopy","return;"),"function"==typeof Bt.oncopy),Ot=null;function Ft(t){if(null!=Ot)return Ot;var e=L(t,A("span","x")),n=e.getBoundingClientRect(),i=E(e,0,1).getBoundingClientRect();return Ot=Math.abs(n.left-i.left)>1}var jt={},Zt={};function zt(t,e){arguments.length>2&&(e.dependencies=Array.prototype.slice.call(arguments,2)),jt[t]=e}function Ht(t,e){Zt[t]=e}function Wt(t){if("string"==typeof t&&Zt.hasOwnProperty(t))t=Zt[t];else if(t&&"string"==typeof t.name&&Zt.hasOwnProperty(t.name)){var e=Zt[t.name];"string"==typeof e&&(e={name:e}),(t=$(e,t)).name=e.name}else{if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return Wt("application/xml");if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return Wt("application/json")}return"string"==typeof t?{name:t}:t||{name:"null"}}function Gt(t,e){e=Wt(e);var n=jt[e.name];if(!n)return Gt(t,"text/plain");var i=n(t,e);if(Vt.hasOwnProperty(e.name)){var r=Vt[e.name];for(var o in r)r.hasOwnProperty(o)&&(i.hasOwnProperty(o)&&(i["_"+o]=i[o]),i[o]=r[o])}if(i.name=e.name,e.helperType&&(i.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)i[a]=e.modeProps[a];return i}var Vt={};function Ut(t,e){O(e,Vt.hasOwnProperty(t)?Vt[t]:Vt[t]={})}function qt(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var i in e){var r=e[i];r instanceof Array&&(r=r.concat([])),n[i]=r}return n}function Kt(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function Yt(t,e,n){return!t.startState||t.startState(e,n)}var Xt=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Jt(t,e){if((e-=t.first)<0||e>=t.size)throw new Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var i=0;;++i){var r=n.children[i],o=r.chunkSize();if(e=t.first&&en?oe(n,Jt(t,n).text.length):pe(e,Jt(t,e.line).text.length)}function pe(t,e){var n=t.ch;return null==n||n>e?oe(t.line,e):n<0?oe(t.line,0):t}function fe(t,e){for(var n=[],i=0;i=this.string.length},Xt.prototype.sol=function(){return this.pos==this.lineStart},Xt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},Xt.prototype.next=function(){if(this.pose},Xt.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},Xt.prototype.skipToEnd=function(){this.pos=this.string.length},Xt.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},Xt.prototype.backUp=function(t){this.pos-=t},Xt.prototype.column=function(){return this.lastColumnPos0?null:(i&&!1!==e&&(this.pos+=i[0].length),i)}var r=function(t){return n?t.toLowerCase():t};if(r(this.string.substr(this.pos,t.length))==r(t))return!1!==e&&(this.pos+=t.length),!0},Xt.prototype.current=function(){return this.string.slice(this.start,this.pos)},Xt.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},Xt.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},Xt.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var me=function(t,e){this.state=t,this.lookAhead=e},ge=function(t,e,n,i){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=i||0,this.baseTokens=null,this.baseTokenPos=1};function ve(t,e,n,i){var r=[t.state.modeGen],o={};Me(t,e.text,t.doc.mode,n,(function(t,e){return r.push(t,e)}),o,i);for(var a=n.state,s=function(i){n.baseTokens=r;var s=t.state.overlays[i],l=1,c=0;n.state=!0,Me(t,e.text,s.mode,n,(function(t,e){for(var n=l;ct&&r.splice(l,1,t,r[l+1],i),l+=2,c=Math.min(t,i)}if(e)if(s.opaque)r.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;nt.options.maxHighlightLength&&qt(t.doc.mode,i.state),o=ve(t,e,i);r&&(i.state=r),e.stateAfter=i.save(!r),e.styles=o.styles,o.classes?e.styleClasses=o.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function be(t,e,n){var i=t.doc,r=t.display;if(!i.mode.startState)return new ge(i,!0,e);var o=Te(t,e,n),a=o>i.first&&Jt(i,o-1).stateAfter,s=a?ge.fromSaved(i,a,o):new ge(i,Yt(i.mode),o);return i.iter(o,e,(function(n){xe(t,n.text,s);var i=s.line;n.stateAfter=i==e-1||i%5==0||i>=r.viewFrom&&ie.start)return o}throw new Error("Mode "+t.name+" failed to advance stream.")}ge.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},ge.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},ge.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ge.fromSaved=function(t,e,n){return e instanceof me?new ge(t,qt(t.mode,e.state),n,e.lookAhead):new ge(t,qt(t.mode,e),n)},ge.prototype.save=function(t){var e=!1!==t?qt(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new me(e,this.maxLookAhead):e};var ke=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function Se(t,e,n,i){var r,o,a=t.doc,s=a.mode,l=Jt(a,(e=de(a,e)).line),c=be(t,e.line,n),u=new Xt(l.text,t.options.tabSize,c);for(i&&(o=[]);(i||u.post.options.maxHighlightLength?(s=!1,a&&xe(t,e,i,h.pos),h.pos=e.length,l=null):l=Ee(Ce(n,h,i.state,d),o),d){var p=d[0].name;p&&(l="m-"+(l?p+" "+l:p))}if(!s||u!=l){for(;ca;--s){if(s<=o.first)return o.first;var l=Jt(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof me?c.lookAhead:0)<=o.modeFrontier))return s;var u=F(l.text,null,t.options.tabSize);(null==r||i>u)&&(r=s-1,i=u)}return r}function Le(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontiern;i--){var r=Jt(t,i).stateAfter;if(r&&(!(r instanceof me)||i+r.lookAhead=e:o.to>e);(i||(i=[])).push(new Be(a,o.from,s?null:o.to))}}return i}function Fe(t,e,n){var i;if(t)for(var r=0;r=e:o.to>e)||o.from==e&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=e:o.from0&&s)for(var b=0;b0)){var u=[l,1],h=ae(c.from,s.from),d=ae(c.to,s.to);(h<0||!a.inclusiveLeft&&!h)&&u.push({from:c.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}function He(t){var e=t.markedSpans;if(e){for(var n=0;ne)&&(!n||Ue(n,o.marker)<0)&&(n=o.marker)}return n}function Je(t,e,n,i,r){var o=Jt(t,e),a=De&&o.markedSpans;if(a)for(var s=0;s=0&&h<=0||u<=0&&h>=0)&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ae(c.to,n)>=0:ae(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?ae(c.from,i)<=0:ae(c.from,i)<0)))return!0}}}function Qe(t){for(var e;e=Ke(t);)t=e.find(-1,!0).line;return t}function $e(t){for(var e;e=Ye(t);)t=e.find(1,!0).line;return t}function tn(t){for(var e,n;e=Ye(t);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}function en(t,e){var n=Jt(t,e),i=Qe(n);return n==i?e:ee(i)}function nn(t,e){if(e>t.lastLine())return e;var n,i=Jt(t,e);if(!rn(t,i))return e;for(;n=Ye(i);)i=n.find(1,!0).line;return ee(i)+1}function rn(t,e){var n=De&&e.markedSpans;if(n)for(var i=void 0,r=0;re.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)}))}var cn=function(t,e,n){this.text=t,We(this,e),this.height=n?n(this):1};function un(t,e,n,i){t.text=e,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),He(t),We(t,n);var r=i?i(t):1;r!=t.height&&te(t,r)}function hn(t){t.parent=null,He(t)}cn.prototype.lineNo=function(){return ee(this)},wt(cn);var dn={},pn={};function fn(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?pn:dn;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function mn(t,e){var n=D("span",null,null,l?"padding-right: .1px":null),i={pre:D("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var r=0;r<=(e.rest?e.rest.length:0);r++){var o=r?e.rest[r-1]:e.line,a=void 0;i.pos=0,i.addToken=vn,Nt(t.display.measure)&&(a=dt(o,t.doc.direction))&&(i.addToken=bn(i.addToken,a)),i.map=[],wn(o,i,ye(t,o,e!=t.display.externalMeasured&&ee(o))),o.styleClasses&&(o.styleClasses.bgClass&&(i.bgClass=_(o.styleClasses.bgClass,i.bgClass||"")),o.styleClasses.textClass&&(i.textClass=_(o.styleClasses.textClass,i.textClass||""))),0==i.map.length&&i.map.push(0,0,i.content.appendChild(Pt(t.display.measure))),0==r?(e.measure.map=i.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(i.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(l){var s=i.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(i.content.className="cm-tab-wrap-hack")}return vt(t,"renderLine",t,e.line,i.pre),i.pre.className&&(i.textClass=_(i.pre.className,i.textClass||"")),i}function gn(t){var e=A("span","•","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e}function vn(t,e,n,i,r,o,l){if(e){var c,u=t.splitSpaces?yn(e,t.trailingSpace):e,h=t.cm.state.specialChars,d=!1;if(h.test(e)){c=document.createDocumentFragment();for(var p=0;;){h.lastIndex=p;var f=h.exec(e),m=f?f.index-p:e.length-p;if(m){var g=document.createTextNode(u.slice(p,p+m));a&&s<9?c.appendChild(A("span",[g])):c.appendChild(g),t.map.push(t.pos,t.pos+m,g),t.col+=m,t.pos+=m}if(!f)break;p+=m+1;var v=void 0;if("\t"==f[0]){var y=t.cm.options.tabSize,b=y-t.col%y;(v=c.appendChild(A("span",K(b),"cm-tab"))).setAttribute("role","presentation"),v.setAttribute("cm-text","\t"),t.col+=b}else"\r"==f[0]||"\n"==f[0]?((v=c.appendChild(A("span","\r"==f[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",f[0]),t.col+=1):((v=t.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),a&&s<9?c.appendChild(A("span",[v])):c.appendChild(v),t.col+=1);t.map.push(t.pos,t.pos+1,v),t.pos++}}else t.col+=e.length,c=document.createTextNode(u),t.map.push(t.pos,t.pos+e.length,c),a&&s<9&&(d=!0),t.pos+=e.length;if(t.trailingSpace=32==u.charCodeAt(e.length-1),n||i||r||d||o||l){var x=n||"";i&&(x+=i),r&&(x+=r);var w=A("span",[c],x,o);if(l)for(var C in l)l.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&w.setAttribute(C,l[C]);return t.content.appendChild(w)}t.content.appendChild(c)}}function yn(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,i="",r=0;rc&&h.from<=c);d++);if(h.to>=u)return t(n,i,r,o,a,s,l);t(n,i.slice(0,h.to-c),r,o,null,s,l),o=null,i=i.slice(h.to-c),c=h.to}}}function xn(t,e,n,i){var r=!i&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!i&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function wn(t,e,n){var i=t.markedSpans,r=t.text,o=0;if(i)for(var a,s,l,c,u,h,d,p=r.length,f=0,m=1,g="",v=0;;){if(v==f){l=c=u=s="",d=null,h=null,v=1/0;for(var y=[],b=void 0,x=0;xf||C.collapsed&&w.to==f&&w.from==f)){if(null!=w.to&&w.to!=f&&v>w.to&&(v=w.to,c=""),C.className&&(l+=" "+C.className),C.css&&(s=(s?s+";":"")+C.css),C.startStyle&&w.from==f&&(u+=" "+C.startStyle),C.endStyle&&w.to==v&&(b||(b=[])).push(C.endStyle,w.to),C.title&&((d||(d={})).title=C.title),C.attributes)for(var k in C.attributes)(d||(d={}))[k]=C.attributes[k];C.collapsed&&(!h||Ue(h.marker,C)<0)&&(h=w)}else w.from>f&&v>w.from&&(v=w.from)}if(b)for(var S=0;S=p)break;for(var M=Math.min(p,v);;){if(g){var T=f+g.length;if(!h){var L=T>M?g.slice(0,M-f):g;e.addToken(e,L,a?a+l:l,u,f+L.length==v?c:"",s,d)}if(T>=M){g=g.slice(M-f),f=M;break}f=T,u=""}g=r.slice(o,o=n[m++]),a=fn(n[m++],e.cm.options)}}else for(var A=1;A2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}function Qn(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var i=0;in)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function $n(t,e){var n=ee(e=Qe(e)),i=t.display.externalMeasured=new Cn(t.doc,e,n);i.lineN=n;var r=i.built=mn(t,i);return i.text=r.pre,L(t.display.lineMeasure,r.pre),i}function ti(t,e,n,i){return ii(t,ni(t,e),n,i)}function ei(t,e){if(e>=t.display.viewFrom&&e=n.lineN&&ee)&&(r=(o=l-s)-1,e>=l&&(a="right")),null!=r){if(i=t[c+2],s==l&&n==(i.insertLeft?"left":"right")&&(a=n),"left"==n&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)i=t[2+(c-=3)],a="left";if("right"==n&&r==l-s)for(;c=0&&(n=t[r]).left==n.right;r--);return n}function li(t,e,n,i){var r,o=ai(e.map,n,i),l=o.node,c=o.start,u=o.end,h=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&ot(e.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u0&&(h=i="right"),r=t.options.lineWrapping&&(p=l.getClientRects()).length>1?p["right"==i?p.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!r||!r.left&&!r.right)){var f=l.parentNode.getClientRects()[0];r=f?{left:f.left,right:f.left+Di(t.display),top:f.top,bottom:f.bottom}:oi}for(var m=r.top-e.rect.top,g=r.bottom-e.rect.top,v=(m+g)/2,y=e.view.measure.heights,b=0;b=i.text.length?(l=i.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var h=ut(s,l,c),d=ct,p=u(l,h,"before"==c);return null!=d&&(p.other=u(l,d,"before"!=c)),p}function xi(t,e){var n=0;e=de(t.doc,e),t.options.lineWrapping||(n=Di(t.display)*e.ch);var i=Jt(t.doc,e.line),r=an(i)+Vn(t.display);return{left:n,right:n,top:r,bottom:r+i.height}}function wi(t,e,n,i,r){var o=oe(t,e,n);return o.xRel=r,i&&(o.outside=i),o}function Ci(t,e,n){var i=t.doc;if((n+=t.display.viewOffset)<0)return wi(i.first,0,null,-1,-1);var r=ne(i,n),o=i.first+i.size-1;if(r>o)return wi(i.first+i.size-1,Jt(i,o).text.length,null,1,1);e<0&&(e=0);for(var a=Jt(i,r);;){var s=Mi(t,a,r,e,n),l=Xe(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==r)return c;a=Jt(i,r=c.line)}}function ki(t,e,n,i){i-=mi(e);var r=e.text.length,o=st((function(e){return ii(t,n,e-1).bottom<=i}),r,0);return{begin:o,end:r=st((function(e){return ii(t,n,e).top>i}),o,r)}}function Si(t,e,n,i){return n||(n=ni(t,e)),ki(t,e,n,gi(t,e,ii(t,n,i),"line").top)}function Ei(t,e,n,i){return!(t.bottom<=n)&&(t.top>n||(i?t.left:t.right)>e)}function Mi(t,e,n,i,r){r-=an(e);var o=ni(t,e),a=mi(e),s=0,l=e.text.length,c=!0,u=dt(e,t.doc.direction);if(u){var h=(t.options.lineWrapping?Li:Ti)(t,e,n,o,u,i,r);s=(c=1!=h.level)?h.from:h.to-1,l=c?h.to:h.from-1}var d,p,f=null,m=null,g=st((function(e){var n=ii(t,o,e);return n.top+=a,n.bottom+=a,!!Ei(n,i,r,!1)&&(n.top<=r&&n.left<=i&&(f=e,m=n),!0)}),s,l),v=!1;if(m){var y=i-m.left=x.bottom?1:0}return wi(n,g=at(e.text,g,1),p,v,i-d)}function Ti(t,e,n,i,r,o,a){var s=st((function(s){var l=r[s],c=1!=l.level;return Ei(bi(t,oe(n,c?l.to:l.from,c?"before":"after"),"line",e,i),o,a,!0)}),0,r.length-1),l=r[s];if(s>0){var c=1!=l.level,u=bi(t,oe(n,c?l.from:l.to,c?"after":"before"),"line",e,i);Ei(u,o,a,!0)&&u.top>a&&(l=r[s-1])}return l}function Li(t,e,n,i,r,o,a){var s=ki(t,e,i,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,h=null,d=0;d=c||p.to<=l)){var f=ii(t,i,1!=p.level?Math.min(c,p.to)-1:Math.max(l,p.from)).right,m=fm)&&(u=p,h=m)}}return u||(u=r[r.length-1]),u.fromc&&(u={from:u.from,to:c,level:u.level}),u}function Ai(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==ri){ri=A("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)ri.appendChild(document.createTextNode("x")),ri.appendChild(A("br"));ri.appendChild(document.createTextNode("x"))}L(t.measure,ri);var n=ri.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),T(t.measure),n||1}function Di(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=A("span","xxxxxxxxxx"),n=A("pre",[e],"CodeMirror-line-like");L(t.measure,n);var i=e.getBoundingClientRect(),r=(i.right-i.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function Pi(t){for(var e=t.display,n={},i={},r=e.gutters.clientLeft,o=e.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+r,i[s]=o.clientWidth}return{fixedPos:Ni(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:i,wrapperWidth:e.wrapper.clientWidth}}function Ni(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function Bi(t){var e=Ai(t.display),n=t.options.lineWrapping,i=n&&Math.max(5,t.display.scroller.clientWidth/Di(t.display)-3);return function(r){if(rn(t.doc,r))return 0;var o=0;if(r.widgets)for(var a=0;a0&&(l=Jt(t.doc,c.line).text).length==c.ch){var u=F(l,l.length,t.options.tabSize)-l.length;c=oe(c.line,Math.max(0,Math.round((o-qn(t.display).left)/Di(t.display))-u))}return c}function Ri(t,e){if(e>=t.display.viewTo)return null;if((e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,i=0;ie)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)De&&en(t.doc,e)r.viewFrom?ji(t):(r.viewFrom+=i,r.viewTo+=i);else if(e<=r.viewFrom&&n>=r.viewTo)ji(t);else if(e<=r.viewFrom){var o=Zi(t,n,n+i,1);o?(r.view=r.view.slice(o.index),r.viewFrom=o.lineN,r.viewTo+=i):ji(t)}else if(n>=r.viewTo){var a=Zi(t,e,e,-1);a?(r.view=r.view.slice(0,a.index),r.viewTo=a.lineN):ji(t)}else{var s=Zi(t,e,e,-1),l=Zi(t,n,n+i,1);s&&l?(r.view=r.view.slice(0,s.index).concat(kn(t,s.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=i):ji(t)}var c=r.externalMeasured;c&&(n=r.lineN&&e=i.viewTo)){var o=i.view[Ri(t,e)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==Z(a,n)&&a.push(n)}}}function ji(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function Zi(t,e,n,i){var r,o=Ri(t,e),a=t.display.view;if(!De||n==t.doc.first+t.doc.size)return{index:o,lineN:n};for(var s=t.display.viewFrom,l=0;l0){if(o==a.length-1)return null;r=s+a[o].size-e,o++}else r=s-e;e+=r,n+=r}for(;en(t.doc,n)!=n;){if(o==(i<0?0:a.length-1))return null;n+=i*a[o-(i<0?1:0)].size,o+=i}return{index:o,lineN:n}}function zi(t,e,n){var i=t.display;0==i.view.length||e>=i.viewTo||n<=i.viewFrom?(i.view=kn(t,e,n),i.viewFrom=e):(i.viewFrom>e?i.view=kn(t,e,i.viewFrom).concat(i.view):i.viewFromn&&(i.view=i.view.slice(0,Ri(t,n)))),i.viewTo=n}function Hi(t){for(var e=t.display.view,n=0,i=0;i=t.display.viewTo||s.to().line0?e.blinker=setInterval((function(){t.hasFocus()||Qi(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function Yi(t){t.state.focused||(t.display.input.focus(),Ji(t))}function Xi(t){t.state.delayingBlurEvent=!0,setTimeout((function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,Qi(t))}),100)}function Ji(t,e){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(vt(t,"focus",t,e),t.state.focused=!0,B(t.display.wrapper,"CodeMirror-focused"),t.curOp||t.display.selForContextMenu==t.doc.sel||(t.display.input.reset(),l&&setTimeout((function(){return t.display.input.reset(!0)}),20)),t.display.input.receivedFocus()),Ki(t))}function Qi(t,e){t.state.delayingBlurEvent||(t.state.focused&&(vt(t,"blur",t,e),t.state.focused=!1,M(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout((function(){t.state.focused||(t.display.shift=!1)}),150))}function $i(t){for(var e=t.display,n=e.lineDiv.offsetTop,i=0;i.005||d<-.005)&&(te(r.line,l),tr(r.line),r.rest))for(var p=0;pt.display.sizerWidth){var f=Math.ceil(c/Di(t.display));f>t.display.maxLineLength&&(t.display.maxLineLength=f,t.display.maxLine=r.line,t.display.maxLineChanged=!0)}}}}function tr(t){if(t.widgets)for(var e=0;e=a&&(o=ne(e,an(Jt(e,l))-t.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function nr(t,e){if(!yt(t,"scrollCursorIntoView")){var n=t.display,i=n.sizer.getBoundingClientRect(),r=null;if(e.top+i.top<0?r=!0:e.bottom+i.top>(window.innerHeight||document.documentElement.clientHeight)&&(r=!1),null!=r&&!f){var o=A("div","​",null,"position: absolute;\n top: "+(e.top-n.viewOffset-Vn(t.display))+"px;\n height: "+(e.bottom-e.top+Kn(t)+n.barHeight)+"px;\n left: "+e.left+"px; width: "+Math.max(2,e.right-e.left)+"px;");t.display.lineSpace.appendChild(o),o.scrollIntoView(r),t.display.lineSpace.removeChild(o)}}}function ir(t,e,n,i){var r;null==i&&(i=0),t.options.lineWrapping||e!=n||(n="before"==(e=e.ch?oe(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e).sticky?oe(e.line,e.ch+1,"before"):e);for(var o=0;o<5;o++){var a=!1,s=bi(t,e),l=n&&n!=e?bi(t,n):s,c=or(t,r={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-i,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+i}),u=t.doc.scrollTop,h=t.doc.scrollLeft;if(null!=c.scrollTop&&(dr(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(fr(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-h)>1&&(a=!0)),!a)break}return r}function rr(t,e){var n=or(t,e);null!=n.scrollTop&&dr(t,n.scrollTop),null!=n.scrollLeft&&fr(t,n.scrollLeft)}function or(t,e){var n=t.display,i=Ai(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,o=Xn(t),a={};e.bottom-e.top>o&&(e.bottom=e.top+o);var s=t.doc.height+Un(n),l=e.tops-i;if(e.topr+o){var u=Math.min(e.top,(c?s:e.bottom)-o);u!=r&&(a.scrollTop=u)}var h=t.options.fixedGutter?0:n.gutters.offsetWidth,d=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-h,p=Yn(t)-n.gutters.offsetWidth,f=e.right-e.left>p;return f&&(e.right=e.left+p),e.left<10?a.scrollLeft=0:e.leftp+d-3&&(a.scrollLeft=e.right+(f?0:10)-p),a}function ar(t,e){null!=e&&(ur(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function sr(t){ur(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function lr(t,e,n){null==e&&null==n||ur(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function cr(t,e){ur(t),t.curOp.scrollToPos=e}function ur(t){var e=t.curOp.scrollToPos;e&&(t.curOp.scrollToPos=null,hr(t,xi(t,e.from),xi(t,e.to),e.margin))}function hr(t,e,n,i){var r=or(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-i,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+i});lr(t,r.scrollLeft,r.scrollTop)}function dr(t,e){Math.abs(t.doc.scrollTop-e)<2||(n||Wr(t,{top:e}),pr(t,e,!0),n&&Wr(t),Ir(t,100))}function pr(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function fr(t,e,n,i){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),(n?e==t.doc.scrollLeft:Math.abs(t.doc.scrollLeft-e)<2)&&!i||(t.doc.scrollLeft=e,qr(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function mr(t){var e=t.display,n=e.gutters.offsetWidth,i=Math.round(t.doc.height+Un(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:i,scrollHeight:i+Kn(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var gr=function(t,e,n){this.cm=n;var i=this.vert=A("div",[A("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=A("div",[A("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");i.tabIndex=r.tabIndex=-1,t(i),t(r),ft(i,"scroll",(function(){i.clientHeight&&e(i.scrollTop,"vertical")})),ft(r,"scroll",(function(){r.clientWidth&&e(r.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};gr.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,i=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?i+"px":"0";var r=t.viewHeight-(e?i:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?i+"px":"0",this.horiz.style.left=t.barLeft+"px";var o=t.viewWidth-t.barLeft-(n?i:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==i&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?i:0,bottom:e?i:0}},gr.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},gr.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},gr.prototype.zeroWidthHack=function(){var t=y&&!p?"12px":"18px";this.horiz.style.height=this.vert.style.width=t,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new j,this.disableVert=new j},gr.prototype.enableZeroWidthBar=function(t,e,n){function i(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,i)}t.style.pointerEvents="auto",e.set(1e3,i)},gr.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var vr=function(){};function yr(t,e){e||(e=mr(t));var n=t.display.barWidth,i=t.display.barHeight;br(t,e);for(var r=0;r<4&&n!=t.display.barWidth||i!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&$i(t),br(t,mr(t)),n=t.display.barWidth,i=t.display.barHeight}function br(t,e){var n=t.display,i=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=i.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=i.bottom)+"px",n.heightForcer.style.borderBottom=i.bottom+"px solid transparent",i.right&&i.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=i.bottom+"px",n.scrollbarFiller.style.width=i.right+"px"):n.scrollbarFiller.style.display="",i.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=i.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}vr.prototype.update=function(){return{bottom:0,right:0}},vr.prototype.setScrollLeft=function(){},vr.prototype.setScrollTop=function(){},vr.prototype.clear=function(){};var xr={native:gr,null:vr};function wr(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&M(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new xr[t.options.scrollbarStyle]((function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),ft(e,"mousedown",(function(){t.state.focused&&setTimeout((function(){return t.display.input.focus()}),0)})),e.setAttribute("cm-not-content","true")}),(function(e,n){"horizontal"==n?fr(t,e):dr(t,e)}),t),t.display.scrollbars.addClass&&B(t.display.wrapper,t.display.scrollbars.addClass)}var Cr=0;function kr(t){t.curOp={cm:t,viewChanged:!1,startHeight:t.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++Cr},En(t.curOp)}function Sr(t){var e=t.curOp;e&&Tn(e,(function(t){for(var e=0;e=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new Or(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.scrollToPos},t.forceUpdate)}function Tr(t){t.updatedDisplay=t.mustUpdate&&zr(t.cm,t.update)}function Lr(t){var e=t.cm,n=e.display;t.updatedDisplay&&$i(e),t.barMeasure=mr(e),n.maxLineChanged&&!e.options.lineWrapping&&(t.adjustWidthTo=ti(e,n.maxLine,n.maxLine.text.length).left+3,e.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+t.adjustWidthTo+Kn(e)+e.display.barWidth),t.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+t.adjustWidthTo-Yn(e))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=n.input.prepareSelection())}function Ar(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft=t.display.viewTo)){var n=+new Date+t.options.workTime,i=be(t,e.highlightFrontier),r=[];e.iter(i.line,Math.min(e.first+e.size,t.display.viewTo+500),(function(o){if(i.line>=t.display.viewFrom){var a=o.styles,s=o.text.length>t.options.maxHighlightLength?qt(e.mode,i.state):null,l=ve(t,o,i,!0);s&&(i.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var h=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!h&&dn)return Ir(t,t.options.workDelay),!0})),e.highlightFrontier=i.line,e.modeFrontier=Math.max(e.modeFrontier,i.line),r.length&&Pr(t,(function(){for(var e=0;e=n.viewFrom&&e.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==Hi(t))return!1;Kr(t)&&(ji(t),e.dims=Pi(t));var r=i.first+i.size,o=Math.max(e.visible.from-t.options.viewportMargin,i.first),a=Math.min(r,e.visible.to+t.options.viewportMargin);n.viewFroma&&n.viewTo-a<20&&(a=Math.min(r,n.viewTo)),De&&(o=en(t.doc,o),a=nn(t.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=e.wrapperHeight||n.lastWrapWidth!=e.wrapperWidth;zi(t,o,a),n.viewOffset=an(Jt(t.doc,n.viewFrom)),t.display.mover.style.top=n.viewOffset+"px";var l=Hi(t);if(!s&&0==l&&!e.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var c=jr(t);return l>4&&(n.lineDiv.style.display="none"),Gr(t,n.updateLineNumbers,e.dims),l>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,Zr(c),T(n.cursorDiv),T(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=e.wrapperHeight,n.lastWrapWidth=e.wrapperWidth,Ir(t,400)),n.updateLineNumbers=null,!0}function Hr(t,e){for(var n=e.viewport,i=!0;;i=!1){if(i&&t.options.lineWrapping&&e.oldDisplayWidth!=Yn(t))i&&(e.visible=er(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+Un(t.display)-Xn(t),n.top)}),e.visible=er(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!zr(t,e))break;$i(t);var r=mr(t);Wi(t),yr(t,r),Ur(t,r),e.force=!1}e.signal(t,"update",t),t.display.viewFrom==t.display.reportedViewFrom&&t.display.viewTo==t.display.reportedViewTo||(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function Wr(t,e){var n=new Or(t,e);if(zr(t,n)){$i(t),Hr(t,n);var i=mr(t);Wi(t),yr(t,i),Ur(t,i),n.finish()}}function Gr(t,e,n){var i=t.display,r=t.options.lineNumbers,o=i.lineDiv,a=o.firstChild;function s(e){var n=e.nextSibling;return l&&y&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var c=i.view,u=i.viewFrom,h=0;h-1&&(p=!1),Pn(t,d,u,n)),p&&(T(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(re(t.options,u)))),a=d.node.nextSibling}else{var f=jn(t,d,u,n);o.insertBefore(f,a)}u+=d.size}for(;a;)a=s(a)}function Vr(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px"}function Ur(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+Kn(t)+"px"}function qr(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var i=Ni(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,o=i+"px",a=0;as.clientWidth,u=s.scrollHeight>s.clientHeight;if(r&&c||o&&u){if(o&&y&&l)t:for(var d=e.target,p=a.view;d!=s;d=d.parentNode)for(var f=0;f=0&&ae(t,i.to())<=0)return n}return-1};var oo=function(t,e){this.anchor=t,this.head=e};function ao(t,e,n){var i=t&&t.options.selectionsMayTouch,r=e[n];e.sort((function(t,e){return ae(t.from(),e.from())})),n=Z(e,r);for(var o=1;o0:l>=0){var c=ue(s.from(),a.from()),u=ce(s.to(),a.to()),h=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,e.splice(--o,2,new oo(h?u:c,h?c:u))}}return new ro(e,n)}function so(t,e){return new ro([new oo(t,e||t)],0)}function lo(t){return t.text?oe(t.from.line+t.text.length-1,Y(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function co(t,e){if(ae(t,e.from)<0)return t;if(ae(t,e.to)<=0)return lo(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,i=t.ch;return t.line==e.to.line&&(i+=lo(e).ch-e.to.ch),oe(n,i)}function uo(t,e){for(var n=[],i=0;i1&&t.remove(s.line+1,f-1),t.insert(s.line+1,v)}An(t,"change",t,e)}function yo(t,e,n){function i(t,r,o){if(t.linked)for(var a=0;a1&&!t.done[t.done.length-2].ranges?(t.done.pop(),Y(t.done)):void 0}function Mo(t,e,n,i){var r=t.history;r.undone.length=0;var o,a,s=+new Date;if((r.lastOp==i||r.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&r.lastModTime>s-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(o=Eo(r,r.lastOp==i)))a=Y(o.changes),0==ae(e.from,e.to)&&0==ae(e.from,a.to)?a.to=lo(e):o.changes.push(ko(t,e));else{var l=Y(r.done);for(l&&l.ranges||Ao(t.sel,r.done),o={changes:[ko(t,e)],generation:r.generation},r.done.push(o);r.done.length>r.undoDepth;)r.done.shift(),r.done[0].ranges||r.done.shift()}r.done.push(n),r.generation=++r.maxGeneration,r.lastModTime=r.lastSelTime=s,r.lastOp=r.lastSelOp=i,r.lastOrigin=r.lastSelOrigin=e.origin,a||vt(t,"historyAdded")}function To(t,e,n,i){var r=e.charAt(0);return"*"==r||"+"==r&&n.ranges.length==i.ranges.length&&n.somethingSelected()==i.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)}function Lo(t,e,n,i){var r=t.history,o=i&&i.origin;n==r.lastSelOp||o&&r.lastSelOrigin==o&&(r.lastModTime==r.lastSelTime&&r.lastOrigin==o||To(t,o,Y(r.done),e))?r.done[r.done.length-1]=e:Ao(e,r.done),r.lastSelTime=+new Date,r.lastSelOrigin=o,r.lastSelOp=n,i&&!1!==i.clearRedo&&So(r.undone)}function Ao(t,e){var n=Y(e);n&&n.ranges&&n.equals(t)||e.push(t)}function Do(t,e,n,i){var r=e["spans_"+t.id],o=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,i),(function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[o]=n.markedSpans),++o}))}function Po(t){if(!t)return null;for(var e,n=0;n-1&&(Y(s)[h]=c[h],delete c[h])}}}return i}function Io(t,e,n,i){if(i){var r=t.anchor;if(n){var o=ae(e,r)<0;o!=ae(n,r)<0?(r=e,e=n):o!=ae(e,n)<0&&(e=n)}return new oo(r,e)}return new oo(n||e,e)}function Ro(t,e,n,i,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),Ho(t,new ro([Io(t.sel.primary(),e,n,r)],0),i)}function Oo(t,e,n){for(var i=[],r=t.cm&&(t.cm.display.shift||t.extend),o=0;o=e.ch:s.to>e.ch))){if(r&&(vt(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var h=l.find(i<0?1:-1),d=void 0;if((i<0?u:c)&&(h=Yo(t,h,-i,h&&h.line==e.line?o:null)),h&&h.line==e.line&&(d=ae(h,n))&&(i<0?d<0:d>0))return qo(t,h,e,i,r)}var p=l.find(i<0?-1:1);return(i<0?c:u)&&(p=Yo(t,p,i,p.line==e.line?o:null)),p?qo(t,p,e,i,r):null}}return e}function Ko(t,e,n,i,r){var o=i||1,a=qo(t,e,n,o,r)||!r&&qo(t,e,n,o,!0)||qo(t,e,n,-o,r)||!r&&qo(t,e,n,-o,!0);return a||(t.cantEdit=!0,oe(t.first,0))}function Yo(t,e,n,i){return n<0&&0==e.ch?e.line>t.first?de(t,oe(e.line-1)):null:n>0&&e.ch==(i||Jt(t,e.line)).text.length?e.line=0;--r)$o(t,{from:i[r].from,to:i[r].to,text:r?[""]:e.text,origin:e.origin});else $o(t,e)}}function $o(t,e){if(1!=e.text.length||""!=e.text[0]||0!=ae(e.from,e.to)){var n=uo(t,e);Mo(t,e,n,t.cm?t.cm.curOp.id:NaN),na(t,e,n,je(t,e));var i=[];yo(t,(function(t,n){n||-1!=Z(i,t.history)||(sa(t.history,e),i.push(t.history)),na(t,e,null,je(t,e))}))}}function ta(t,e,n){var i=t.cm&&t.cm.state.suppressEdits;if(!i||n){for(var r,o=t.history,a=t.sel,s="undo"==e?o.done:o.undone,l="undo"==e?o.undone:o.done,c=0;c=0;--p){var f=d(p);if(f)return f.v}}}}function ea(t,e){if(0!=e&&(t.first+=e,t.sel=new ro(X(t.sel.ranges,(function(t){return new oo(oe(t.anchor.line+e,t.anchor.ch),oe(t.head.line+e,t.head.ch))})),t.sel.primIndex),t.cm)){Oi(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,i=n.viewFrom;it.lastLine())){if(e.from.lineo&&(e={from:e.from,to:oe(o,Jt(t,o).text.length),text:[e.text[0]],origin:e.origin}),e.removed=Qt(t,e.from,e.to),n||(n=uo(t,e)),t.cm?ia(t.cm,e,i):vo(t,e,i),Wo(t,n,W),t.cantEdit&&Ko(t,oe(t.firstLine(),0))&&(t.cantEdit=!1)}}function ia(t,e,n){var i=t.doc,r=t.display,o=e.from,a=e.to,s=!1,l=o.line;t.options.lineWrapping||(l=ee(Qe(Jt(i,o.line))),i.iter(l,a.line+1,(function(t){if(t==r.maxLine)return s=!0,!0}))),i.sel.contains(e.from,e.to)>-1&&bt(t),vo(i,e,n,Bi(t)),t.options.lineWrapping||(i.iter(l,o.line+e.text.length,(function(t){var e=sn(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,s=!1)})),s&&(t.curOp.updateMaxLine=!0)),Le(i,o.line),Ir(t,400);var c=e.text.length-(a.line-o.line)-1;e.full?Oi(t):o.line!=a.line||1!=e.text.length||go(t.doc,e)?Oi(t,o.line,a.line+1,c):Fi(t,o.line,"text");var u=xt(t,"changes"),h=xt(t,"change");if(h||u){var d={from:o,to:a,text:e.text,removed:e.removed,origin:e.origin};h&&An(t,"change",t,d),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(d)}t.display.selForContextMenu=null}function ra(t,e,n,i,r){var o;i||(i=n),ae(i,n)<0&&(n=(o=[i,n])[0],i=o[1]),"string"==typeof e&&(e=t.splitLines(e)),Qo(t,{from:n,to:i,text:e,origin:r})}function oa(t,e,n,i){n1||!(this.children[0]instanceof ca))){var s=[];this.collapse(s),this.children=[new ca(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e50){for(var a=r.lines.length%25+25,s=a;s10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var i=0;i0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=D("span",[o.replacedWith],"CodeMirror-widget"),i.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),i.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(Je(t,e.line,e,n,o)||e.line!=n.line&&Je(t,n.line,e,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");Ne()}o.addToHistory&&Mo(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var s,l=e.line,c=t.cm;if(t.iter(l,n.line+1,(function(t){c&&o.collapsed&&!c.options.lineWrapping&&Qe(t)==c.display.maxLine&&(s=!0),o.collapsed&&l!=e.line&&te(t,0),Re(t,new Be(o,l==e.line?e.ch:null,l==n.line?n.ch:null)),++l})),o.collapsed&&t.iter(e.line,n.line+1,(function(e){rn(t,e)&&te(e,0)})),o.clearOnEnter&&ft(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(Pe(),(t.history.done.length||t.history.undone.length)&&t.clearHistory()),o.collapsed&&(o.id=++fa,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)Oi(c,e.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=e.line;u<=n.line;u++)Fi(c,u,"text");o.atomic&&Vo(c.doc),An(c,"markerAdded",c,o)}return o}ma.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&kr(t),xt(this,"clear")){var n=this.find();n&&An(this,"clear",n.from,n.to)}for(var i=null,r=null,o=0;ot.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=i&&t&&this.collapsed&&Oi(t,i,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&Vo(t.doc)),t&&An(t,"markerCleared",t,this,i,r),e&&Sr(t),this.parent&&this.parent.clear()}},ma.prototype.find=function(t,e){var n,i;null==t&&"bookmark"==this.type&&(t=1);for(var r=0;r=0;l--)Qo(this,i[l]);s?zo(this,s):this.cm&&sr(this.cm)})),undo:_r((function(){ta(this,"undo")})),redo:_r((function(){ta(this,"redo")})),undoSelection:_r((function(){ta(this,"undo",!0)})),redoSelection:_r((function(){ta(this,"redo",!0)})),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,i=0;i=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=de(this,t),e=de(this,e);var i=[],r=t.line;return this.iter(t.line,e.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch||n&&!n(l.marker)||i.push(l.marker.parent||l.marker)}++r})),i},getAllMarks:function(){var t=[];return this.iter((function(e){var n=e.markedSpans;if(n)for(var i=0;it)return e=t,!0;t-=o,++n})),de(this,oe(n,e))},indexFromPos:function(t){var e=(t=de(this,t)).ch;if(t.linee&&(e=t.from),null!=t.to&&t.to-1)return e.state.draggingText(t),void setTimeout((function(){return e.display.input.focus()}),20);try{var h=t.dataTransfer.getData("Text");if(h){var d;if(e.state.draggingText&&!e.state.draggingText.copy&&(d=e.listSelections()),Wo(e.doc,so(n,n)),d)for(var p=0;p=0;e--)ra(t.doc,"",i[e].from,i[e].to,"+delete");sr(t)}))}function qa(t,e,n){var i=at(t.text,e+n,n);return i<0||i>t.text.length?null:i}function Ka(t,e,n){var i=qa(t,e.ch,n);return null==i?null:new oe(e.line,i,n<0?"after":"before")}function Ya(t,e,n,i,r){if(t){"rtl"==e.doc.direction&&(r=-r);var o=dt(n,e.doc.direction);if(o){var a,s=r<0?Y(o):o[0],l=r<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=ni(e,n);a=r<0?n.text.length-1:0;var u=ii(e,c,a).top;a=st((function(t){return ii(e,c,t).top==u}),r<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=qa(n,a,1))}else a=r<0?s.to:s.from;return new oe(i,a,l)}}return new oe(i,r<0?n.text.length:0,r<0?"before":"after")}function Xa(t,e,n,i){var r=dt(e,t.doc.direction);if(!r)return Ka(e,n,i);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=ut(r,n.ch,n.sticky),a=r[o];if("ltr"==t.doc.direction&&a.level%2==0&&(i>0?a.to>n.ch:a.from=a.from&&d>=u.begin)){var p=h?"before":"after";return new oe(n.line,d,p)}}var f=function(t,e,i){for(var o=function(t,e){return e?new oe(n.line,l(t,1),"before"):new oe(n.line,t,"after")};t>=0&&t0==(1!=a.level),c=s?i.begin:l(i.end,-1);if(a.from<=c&&c0?u.end:l(u.begin,-1);return null==g||i>0&&g==e.text.length||!(m=f(i>0?0:r.length-1,i,c(g)))?null:m}Fa.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Fa.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Fa.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Alt-F":"goWordRight","Alt-B":"goWordLeft","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-D":"delWordAfter","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Fa.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Fa.default=y?Fa.macDefault:Fa.pcDefault;var Ja={selectAll:Xo,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),W)},killLine:function(t){return Ua(t,(function(e){if(e.empty()){var n=Jt(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line0)r=new oe(r.line,r.ch+1),t.replaceRange(o.charAt(r.ch-1)+o.charAt(r.ch-2),oe(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var a=Jt(t.doc,r.line-1).text;a&&(r=new oe(r.line,1),t.replaceRange(o.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),oe(r.line-1,a.length-1),r,"+transpose"))}n.push(new oo(r,r))}t.setSelections(n)}))},newlineAndIndent:function(t){return Pr(t,(function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var i=0;i-1&&(ae((r=s.ranges[r]).from(),e)<0||e.xRel>0)&&(ae(r.to(),e)>0||e.xRel<0)?Cs(t,i,e,o):Ss(t,i,e,o)}function Cs(t,e,n,i){var r=t.display,o=!1,c=Nr(t,(function(e){l&&(r.scroller.draggable=!1),t.state.draggingText=!1,gt(r.wrapper.ownerDocument,"mouseup",c),gt(r.wrapper.ownerDocument,"mousemove",u),gt(r.scroller,"dragstart",h),gt(r.scroller,"drop",c),o||(Ct(e),i.addNew||Ro(t.doc,n,null,null,i.extend),l&&!d||a&&9==s?setTimeout((function(){r.wrapper.ownerDocument.body.focus({preventScroll:!0}),r.input.focus()}),20):r.input.focus())})),u=function(t){o=o||Math.abs(e.clientX-t.clientX)+Math.abs(e.clientY-t.clientY)>=10},h=function(){return o=!0};l&&(r.scroller.draggable=!0),t.state.draggingText=c,c.copy=!i.moveOnDrag,r.scroller.dragDrop&&r.scroller.dragDrop(),ft(r.wrapper.ownerDocument,"mouseup",c),ft(r.wrapper.ownerDocument,"mousemove",u),ft(r.scroller,"dragstart",h),ft(r.scroller,"drop",c),Xi(t),setTimeout((function(){return r.input.focus()}),20)}function ks(t,e,n){if("char"==n)return new oo(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new oo(oe(e.line,0),de(t.doc,oe(e.line+1,0)));var i=n(t,e);return new oo(i.from,i.to)}function Ss(t,e,n,i){var r=t.display,o=t.doc;Ct(e);var a,s,l=o.sel,c=l.ranges;if(i.addNew&&!i.extend?(s=o.sel.contains(n),a=s>-1?c[s]:new oo(n,n)):(a=o.sel.primary(),s=o.sel.primIndex),"rectangle"==i.unit)i.addNew||(a=new oo(n,n)),n=Ii(t,e,!0,!0),s=-1;else{var u=ks(t,n,i.unit);a=i.extend?Io(a,u.anchor,u.head,i.extend):u}i.addNew?-1==s?(s=c.length,Ho(o,ao(t,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==i.unit&&!i.extend?(Ho(o,ao(t,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=o.sel):Fo(o,s,a,G):(s=0,Ho(o,new ro([a],0),G),l=o.sel);var h=n;function d(e){if(0!=ae(h,e))if(h=e,"rectangle"==i.unit){for(var r=[],c=t.options.tabSize,u=F(Jt(o,n.line).text,n.ch,c),d=F(Jt(o,e.line).text,e.ch,c),p=Math.min(u,d),f=Math.max(u,d),m=Math.min(n.line,e.line),g=Math.min(t.lastLine(),Math.max(n.line,e.line));m<=g;m++){var v=Jt(o,m).text,y=U(v,p,c);p==f?r.push(new oo(oe(m,y),oe(m,y))):v.length>y&&r.push(new oo(oe(m,y),oe(m,U(v,f,c))))}r.length||r.push(new oo(n,n)),Ho(o,ao(t,l.ranges.slice(0,s).concat(r),s),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,x=a,w=ks(t,e,i.unit),C=x.anchor;ae(w.anchor,C)>0?(b=w.head,C=ue(x.from(),w.anchor)):(b=w.anchor,C=ce(x.to(),w.head));var k=l.ranges.slice(0);k[s]=Es(t,new oo(de(o,C),b)),Ho(o,ao(t,k,s),G)}}var p=r.wrapper.getBoundingClientRect(),f=0;function m(e){var n=++f,a=Ii(t,e,!0,"rectangle"==i.unit);if(a)if(0!=ae(a,h)){t.curOp.focus=N(),d(a);var s=er(r,o);(a.line>=s.to||a.linep.bottom?20:0;l&&setTimeout(Nr(t,(function(){f==n&&(r.scroller.scrollTop+=l,m(e))})),50)}}function g(e){t.state.selectingText=!1,f=1/0,e&&(Ct(e),r.input.focus()),gt(r.wrapper.ownerDocument,"mousemove",v),gt(r.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var v=Nr(t,(function(t){0!==t.buttons&&Tt(t)?m(t):g(t)})),y=Nr(t,g);t.state.selectingText=y,ft(r.wrapper.ownerDocument,"mousemove",v),ft(r.wrapper.ownerDocument,"mouseup",y)}function Es(t,e){var n=e.anchor,i=e.head,r=Jt(t.doc,n.line);if(0==ae(n,i)&&n.sticky==i.sticky)return e;var o=dt(r);if(!o)return e;var a=ut(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return e;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return e;if(i.line!=n.line)l=(i.line-n.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=ut(o,i.ch,i.sticky),h=u-a||(i.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?h<0:h>0}var d=o[c+(l?-1:0)],p=l==(1==d.level),f=p?d.from:d.to,m=p?"after":"before";return n.ch==f&&n.sticky==m?e:new oo(new oe(n.line,f,m),i)}function Ms(t,e,n,i){var r,o;if(e.touches)r=e.touches[0].clientX,o=e.touches[0].clientY;else try{r=e.clientX,o=e.clientY}catch(t){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;i&&Ct(e);var a=t.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!xt(t,n))return St(e);o-=s.top-a.viewOffset;for(var l=0;l=r)return vt(t,n,t,ne(t.doc,o),t.display.gutterSpecs[l].className,e),St(e)}}function Ts(t,e){return Ms(t,e,"gutterClick",!0)}function Ls(t,e){Gn(t.display,e)||As(t,e)||yt(t,e,"contextmenu")||k||t.display.input.onContextMenu(e)}function As(t,e){return!!xt(t,"gutterContextMenu")&&Ms(t,e,"gutterContextMenu",!1)}function Ds(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),di(t)}gs.prototype.compare=function(t,e,n){return this.time+ms>t&&0==ae(e,this.pos)&&n==this.button};var Ps={toString:function(){return"CodeMirror.Init"}},Ns={},Bs={};function _s(t){var e=t.optionHandlers;function n(n,i,r,o){t.defaults[n]=i,r&&(e[n]=o?function(t,e,n){n!=Ps&&r(t,e,n)}:r)}t.defineOption=n,t.Init=Ps,n("value","",(function(t,e){return t.setValue(e)}),!0),n("mode",null,(function(t,e){t.doc.modeOption=e,fo(t)}),!0),n("indentUnit",2,fo,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(t){mo(t),di(t),Oi(t)}),!0),n("lineSeparator",null,(function(t,e){if(t.doc.lineSep=e,e){var n=[],i=t.doc.first;t.doc.iter((function(t){for(var r=0;;){var o=t.text.indexOf(e,r);if(-1==o)break;r=o+e.length,n.push(oe(i,o))}i++}));for(var r=n.length-1;r>=0;r--)ra(t.doc,e,n[r],oe(n[r].line,n[r].ch+e.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(t,e,n){t.state.specialChars=new RegExp(e.source+(e.test("\t")?"":"|\t"),"g"),n!=Ps&&t.refresh()})),n("specialCharPlaceholder",gn,(function(t){return t.refresh()}),!0),n("electricChars",!0),n("inputStyle",v?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(t,e){return t.getInputField().spellcheck=e}),!0),n("autocorrect",!1,(function(t,e){return t.getInputField().autocorrect=e}),!0),n("autocapitalize",!1,(function(t,e){return t.getInputField().autocapitalize=e}),!0),n("rtlMoveVisually",!x),n("wholeLineUpdateBefore",!0),n("theme","default",(function(t){Ds(t),Jr(t)}),!0),n("keyMap","default",(function(t,e,n){var i=Va(e),r=n!=Ps&&Va(n);r&&r.detach&&r.detach(t,i),i.attach&&i.attach(t,r||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Rs,!0),n("gutters",[],(function(t,e){t.display.gutterSpecs=Yr(e,t.options.lineNumbers),Jr(t)}),!0),n("fixedGutter",!0,(function(t,e){t.display.gutters.style.left=e?Ni(t.display)+"px":"0",t.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(t){return yr(t)}),!0),n("scrollbarStyle","native",(function(t){wr(t),yr(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(t,e){t.display.gutterSpecs=Yr(t.options.gutters,e),Jr(t)}),!0),n("firstLineNumber",1,Jr,!0),n("lineNumberFormatter",(function(t){return t}),Jr,!0),n("showCursorWhenSelecting",!1,Wi,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(t,e){"nocursor"==e&&(Qi(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)})),n("screenReaderLabel",null,(function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)})),n("disableInput",!1,(function(t,e){e||t.display.input.reset()}),!0),n("dragDrop",!0,Is),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,Wi,!0),n("singleCursorHeightPerLine",!0,Wi,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,mo,!0),n("addModeClass",!1,mo,!0),n("pollInterval",100),n("undoDepth",200,(function(t,e){return t.doc.history.undoDepth=e})),n("historyEventDelay",1250),n("viewportMargin",10,(function(t){return t.refresh()}),!0),n("maxHighlightLength",1e4,mo,!0),n("moveInputWithCursor",!0,(function(t,e){e||t.display.input.resetPosition()})),n("tabindex",null,(function(t,e){return t.display.input.getField().tabIndex=e||""})),n("autofocus",null),n("direction","ltr",(function(t,e){return t.doc.setDirection(e)}),!0),n("phrases",null)}function Is(t,e,n){if(!e!=!(n&&n!=Ps)){var i=t.display.dragFunctions,r=e?ft:gt;r(t.display.scroller,"dragstart",i.start),r(t.display.scroller,"dragenter",i.enter),r(t.display.scroller,"dragover",i.over),r(t.display.scroller,"dragleave",i.leave),r(t.display.scroller,"drop",i.drop)}}function Rs(t){t.options.lineWrapping?(B(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(M(t.display.wrapper,"CodeMirror-wrap"),ln(t)),_i(t),Oi(t),di(t),setTimeout((function(){return yr(t)}),100)}function Os(t,e){var n=this;if(!(this instanceof Os))return new Os(t,e);this.options=e=e?O(e):{},O(Ns,e,!1);var i=e.value;"string"==typeof i?i=new ka(i,e.mode,null,e.lineSeparator,e.direction):e.mode&&(i.modeOption=e.mode),this.doc=i;var r=new Os.inputStyles[e.inputStyle](this),o=this.display=new Qr(t,i,r,e);for(var c in o.wrapper.CodeMirror=this,Ds(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),wr(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new j,keySeq:null,specialChars:null},e.autofocus&&!v&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),Fs(this),Pa(),kr(this),this.curOp.forceUpdate=!0,bo(this,i),e.autofocus&&!v||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Ji(n)}),20):Qi(this),Bs)Bs.hasOwnProperty(c)&&Bs[c](this,e[c],Ps);Kr(this),e.finishInit&&e.finishInit(this);for(var u=0;u400}ft(e.scroller,"touchstart",(function(r){if(!yt(t,r)&&!o(r)&&!Ts(t,r)){e.input.ensurePolled(),clearTimeout(n);var a=+new Date;e.activeTouch={start:a,moved:!1,prev:a-i.end<=300?i:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}})),ft(e.scroller,"touchmove",(function(){e.activeTouch&&(e.activeTouch.moved=!0)})),ft(e.scroller,"touchend",(function(n){var i=e.activeTouch;if(i&&!Gn(e,n)&&null!=i.left&&!i.moved&&new Date-i.start<300){var o,a=t.coordsChar(e.activeTouch,"page");o=!i.prev||l(i,i.prev)?new oo(a,a):!i.prev.prev||l(i,i.prev.prev)?t.findWordAt(a):new oo(oe(a.line,0),de(t.doc,oe(a.line+1,0))),t.setSelection(o.anchor,o.head),t.focus(),Ct(n)}r()})),ft(e.scroller,"touchcancel",r),ft(e.scroller,"scroll",(function(){e.scroller.clientHeight&&(dr(t,e.scroller.scrollTop),fr(t,e.scroller.scrollLeft,!0),vt(t,"scroll",t))})),ft(e.scroller,"mousewheel",(function(e){return io(t,e)})),ft(e.scroller,"DOMMouseScroll",(function(e){return io(t,e)})),ft(e.wrapper,"scroll",(function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0})),e.dragFunctions={enter:function(e){yt(t,e)||Et(e)},over:function(e){yt(t,e)||(Ta(t,e),Et(e))},start:function(e){return Ma(t,e)},drop:Nr(t,Ea),leave:function(e){yt(t,e)||La(t)}};var c=e.input.getField();ft(c,"keyup",(function(e){return hs.call(t,e)})),ft(c,"keydown",Nr(t,cs)),ft(c,"keypress",Nr(t,ds)),ft(c,"focus",(function(e){return Ji(t,e)})),ft(c,"blur",(function(e){return Qi(t,e)}))}Os.defaults=Ns,Os.optionHandlers=Bs;var js=[];function Zs(t,e,n,i){var r,o=t.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?r=be(t,e).state:n="prev");var a=t.options.tabSize,s=Jt(o,e),l=F(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(i||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(r,s.text.slice(u.length),s.text))==H||c>150)){if(!i)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>o.first?F(Jt(o,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var h="",d=0;if(t.options.indentWithTabs)for(var p=Math.floor(c/a);p;--p)d+=a,h+="\t";if(da,l=_t(e),c=null;if(s&&i.ranges.length>1)if(zs&&zs.text.join("\n")==e){if(i.ranges.length%zs.text.length==0){c=[];for(var u=0;u=0;d--){var p=i.ranges[d],f=p.from(),m=p.to();p.empty()&&(n&&n>0?f=oe(f.line,f.ch-n):t.state.overwrite&&!s?m=oe(m.line,Math.min(Jt(o,m.line).text.length,m.ch+Y(l).length)):s&&zs&&zs.lineWise&&zs.text.join("\n")==l.join("\n")&&(f=m=oe(f.line,0)));var g={from:f,to:m,text:c?c[d%c.length]:l,origin:r||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};Qo(t.doc,g),An(t,"inputRead",t,g)}e&&!s&&Vs(t,e),sr(t),t.curOp.updateInput<2&&(t.curOp.updateInput=h),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function Gs(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||Pr(e,(function(){return Ws(e,n,0,null,"paste")})),!0}function Vs(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,i=n.ranges.length-1;i>=0;i--){var r=n.ranges[i];if(!(r.head.ch>100||i&&n.ranges[i-1].head.line==r.head.line)){var o=t.getModeAt(r.head),a=!1;if(o.electricChars){for(var s=0;s-1){a=Zs(t,r.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Jt(t.doc,r.head.line).text.slice(0,r.head.ch))&&(a=Zs(t,r.head.line,"smart"));a&&An(t,"electricInput",t,r.head.line)}}}function Us(t){for(var e=[],n=[],i=0;in&&(Zs(this,r.head.line,t,!0),n=r.head.line,i==this.doc.sel.primIndex&&sr(this));else{var o=r.from(),a=r.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l0&&Fo(this.doc,i,new oo(o,c[i].to()),W)}}})),getTokenAt:function(t,e){return Se(this,t,e)},getLineTokens:function(t,e){return Se(this,oe(t),e,!0)},getTokenTypeAt:function(t){t=de(this.doc,t);var e,n=ye(this,Jt(this.doc,t.line)),i=0,r=(n.length-1)/2,o=t.ch;if(0==o)e=n[2];else for(;;){var a=i+r>>1;if((a?n[2*a-1]:0)>=o)r=a;else{if(!(n[2*a+1]o&&(t=o,r=!0),i=Jt(this.doc,t)}else i=t;return gi(this,i,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-an(i):0)},defaultTextHeight:function(){return Ai(this.display)},defaultCharWidth:function(){return Di(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,i,r){var o=this.display,a=(t=bi(this,de(this.doc,t))).bottom,s=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),o.sizer.appendChild(e),"over"==i)a=t.top;else if("above"==i||"near"==i){var l=Math.max(o.wrapper.clientHeight,this.doc.height),c=Math.max(o.sizer.clientWidth,o.lineSpace.clientWidth);("above"==i||t.bottom+e.offsetHeight>l)&&t.top>e.offsetHeight?a=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=l&&(a=t.bottom),s+e.offsetWidth>c&&(s=c-e.offsetWidth)}e.style.top=a+"px",e.style.left=e.style.right="","right"==r?(s=o.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?s=0:"middle"==r&&(s=(o.sizer.clientWidth-e.offsetWidth)/2),e.style.left=s+"px"),n&&rr(this,{left:s,top:a,right:s+e.offsetWidth,bottom:a+e.offsetHeight})},triggerOnKeyDown:Br(cs),triggerOnKeyPress:Br(ds),triggerOnKeyUp:hs,triggerOnMouseDown:Br(ys),execCommand:function(t){if(Ja.hasOwnProperty(t))return Ja[t].call(null,this)},triggerElectric:Br((function(t){Vs(this,t)})),findPosH:function(t,e,n,i){var r=1;e<0&&(r=-1,e=-e);for(var o=de(this.doc,t),a=0;a0&&a(e.charAt(n-1));)--n;for(;i.5||this.options.lineWrapping)&&_i(this),vt(this,"refresh",this)})),swapDoc:Br((function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),bo(this,t),di(this),this.display.input.reset(),lr(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,An(this,"swapDoc",this,e),e})),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},wt(t),t.registerHelper=function(e,i,r){n.hasOwnProperty(e)||(n[e]=t[e]={_global:[]}),n[e][i]=r},t.registerGlobalHelper=function(e,i,r,o){t.registerHelper(e,i,o),n[e]._global.push({pred:r,val:o})}}function Xs(t,e,n,i,r){var o=e,a=n,s=Jt(t,e.line),l=r&&"rtl"==t.direction?-n:n;function c(){var n=e.line+l;return!(n=t.first+t.size)&&(e=new oe(n,e.ch,e.sticky),s=Jt(t,n))}function u(o){var a;if("codepoint"==i){var u=s.text.charCodeAt(e.ch+(i>0?0:-1));a=isNaN(u)?null:new oe(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(u>=55296&&u<56320?2:1))),-n)}else a=r?Xa(t.cm,s,e,n):Ka(s,e,n);if(null==a){if(o||!c())return!1;e=Ya(r,t.cm,s,e.line,l)}else e=a;return!0}if("char"==i||"codepoint"==i)u();else if("column"==i)u(!0);else if("word"==i||"group"==i)for(var h=null,d="group"==i,p=t.cm&&t.cm.getHelper(e,"wordChars"),f=!0;!(n<0)||u(!f);f=!1){var m=s.text.charAt(e.ch)||"\n",g=nt(m,p)?"w":d&&"\n"==m?"n":!d||/\s/.test(m)?null:"p";if(!d||f||g||(g="s"),h&&h!=g){n<0&&(n=1,u(),e.sticky="after");break}if(g&&(h=g),n>0&&!u(!f))break}var v=Ko(t,e,o,a,!0);return se(o,v)&&(v.hitSide=!0),v}function Js(t,e,n,i){var r,o,a=t.doc,s=e.left;if("page"==i){var l=Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*Ai(t.display),3);r=(n>0?e.bottom:e.top)+n*c}else"line"==i&&(r=n>0?e.bottom+3:e.top-3);for(;(o=Ci(t,s,r)).outside;){if(n<0?r<=0:r>=a.height){o.hitSide=!0;break}r+=5*n}return o}var Qs=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new j,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function $s(t,e){var n=ei(t,e.line);if(!n||n.hidden)return null;var i=Jt(t.doc,e.line),r=Qn(n,i,e.line),o=dt(i,t.doc.direction),a="left";o&&(a=ut(o,e.ch)%2?"right":"left");var s=ai(r.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function tl(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}function el(t,e){return e&&(t.bad=!0),t}function nl(t,e,n,i,r){var o="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(t){return function(e){return e.id==t}}function u(){a&&(o+=s,l&&(o+=s),a=l=!1)}function h(t){t&&(u(),o+=t)}function d(e){if(1==e.nodeType){var n=e.getAttribute("cm-text");if(n)return void h(n);var o,p=e.getAttribute("cm-marker");if(p){var f=t.findMarks(oe(i,0),oe(r+1,0),c(+p));return void(f.length&&(o=f[0].find(0))&&h(Qt(t.doc,o.from,o.to).join(s)))}if("false"==e.getAttribute("contenteditable"))return;var m=/^(pre|div|p|li|table|br)$/i.test(e.nodeName);if(!/^br$/i.test(e.nodeName)&&0==e.textContent.length)return;m&&u();for(var g=0;g=e.display.viewTo||o.line=e.display.viewFrom&&$s(e,r)||{node:l[0].measure.map[2],offset:0},u=o.linei.firstLine()&&(a=oe(a.line-1,Jt(i.doc,a.line-1).length)),s.ch==Jt(i.doc,s.line).text.length&&s.liner.viewTo-1)return!1;a.line==r.viewFrom||0==(t=Ri(i,a.line))?(e=ee(r.view[0].line),n=r.view[0].node):(e=ee(r.view[t].line),n=r.view[t-1].node.nextSibling);var l,c,u=Ri(i,s.line);if(u==r.view.length-1?(l=r.viewTo-1,c=r.lineDiv.lastChild):(l=ee(r.view[u+1].line)-1,c=r.view[u+1].node.previousSibling),!n)return!1;for(var h=i.doc.splitLines(nl(i,n,c,e,l)),d=Qt(i.doc,oe(e,0),oe(l,Jt(i.doc,l).text.length));h.length>1&&d.length>1;)if(Y(h)==Y(d))h.pop(),d.pop(),l--;else{if(h[0]!=d[0])break;h.shift(),d.shift(),e++}for(var p=0,f=0,m=h[0],g=d[0],v=Math.min(m.length,g.length);pa.ch&&y.charCodeAt(y.length-f-1)==b.charCodeAt(b.length-f-1);)p--,f++;h[h.length-1]=y.slice(0,y.length-f).replace(/^\u200b+/,""),h[0]=h[0].slice(p).replace(/\u200b+$/,"");var w=oe(e,p),C=oe(l,d.length?Y(d).length-f:0);return h.length>1||h[0]||ae(w,C)?(ra(i.doc,h,w,C,"+input"),!0):void 0},Qs.prototype.ensurePolled=function(){this.forceCompositionEnd()},Qs.prototype.reset=function(){this.forceCompositionEnd()},Qs.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Qs.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(t.readDOMTimeout=null,t.composing){if(!t.composing.done)return;t.composing=null}t.updateFromDOM()}),80))},Qs.prototype.updateFromDOM=function(){var t=this;!this.cm.isReadOnly()&&this.pollContent()||Pr(this.cm,(function(){return Oi(t.cm)}))},Qs.prototype.setUneditable=function(t){t.contentEditable="false"},Qs.prototype.onKeyPress=function(t){0==t.charCode||this.composing||(t.preventDefault(),this.cm.isReadOnly()||Nr(this.cm,Ws)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},Qs.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},Qs.prototype.onContextMenu=function(){},Qs.prototype.resetPosition=function(){},Qs.prototype.needsContentAttribute=!0;var ol=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new j,this.hasSelection=!1,this.composing=null};function al(t,e){if((e=e?O(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n=N();e.autofocus=n==t||null!=t.getAttribute("autofocus")&&n==document.body}function i(){t.value=s.getValue()}var r;if(t.form&&(ft(t.form,"submit",i),!e.leaveSubmitMethodAlone)){var o=t.form;r=o.submit;try{var a=o.submit=function(){i(),o.submit=r,o.submit(),o.submit=a}}catch(t){}}e.finishInit=function(n){n.save=i,n.getTextArea=function(){return t},n.toTextArea=function(){n.toTextArea=isNaN,i(),t.parentNode.removeChild(n.getWrapperElement()),t.style.display="",t.form&&(gt(t.form,"submit",i),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=r))}},t.style.display="none";var s=Os((function(e){return t.parentNode.insertBefore(e,t.nextSibling)}),e);return s}function sl(t){t.off=gt,t.on=ft,t.wheelEventPixels=no,t.Doc=ka,t.splitLines=_t,t.countColumn=F,t.findColumn=U,t.isWordChar=et,t.Pass=H,t.signal=vt,t.Line=cn,t.changeEnd=lo,t.scrollbarModel=xr,t.Pos=oe,t.cmpPos=ae,t.modes=jt,t.mimeModes=Zt,t.resolveMode=Wt,t.getMode=Gt,t.modeExtensions=Vt,t.extendMode=Ut,t.copyState=qt,t.startState=Yt,t.innerMode=Kt,t.commands=Ja,t.keyMap=Fa,t.keyName=Ga,t.isModifierKey=Ha,t.lookupKey=za,t.normalizeKeyMap=Za,t.StringStream=Xt,t.SharedTextMarker=va,t.TextMarker=ma,t.LineWidget=ha,t.e_preventDefault=Ct,t.e_stopPropagation=kt,t.e_stop=Et,t.addClass=B,t.contains=P,t.rmClass=M,t.keyNames=_a}ol.prototype.init=function(t){var e=this,n=this,i=this.cm;this.createField(t);var r=this.textarea;function o(t){if(!yt(i,t)){if(i.somethingSelected())Hs({lineWise:!1,text:i.getSelections()});else{if(!i.options.lineWiseCopyCut)return;var e=Us(i);Hs({lineWise:!0,text:e.text}),"cut"==t.type?i.setSelections(e.ranges,null,W):(n.prevInput="",r.value=e.text.join("\n"),I(r))}"cut"==t.type&&(i.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),m&&(r.style.width="0px"),ft(r,"input",(function(){a&&s>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()})),ft(r,"paste",(function(t){yt(i,t)||Gs(t,i)||(i.state.pasteIncoming=+new Date,n.fastPoll())})),ft(r,"cut",o),ft(r,"copy",o),ft(t.scroller,"paste",(function(e){if(!Gn(t,e)&&!yt(i,e)){if(!r.dispatchEvent)return i.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=e.clipboardData,r.dispatchEvent(o)}})),ft(t.lineSpace,"selectstart",(function(e){Gn(t,e)||Ct(e)})),ft(r,"compositionstart",(function(){var t=i.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:i.markText(t,i.getCursor("to"),{className:"CodeMirror-composing"})}})),ft(r,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},ol.prototype.createField=function(t){this.wrapper=Ks(),this.textarea=this.wrapper.firstChild},ol.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},ol.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,i=Gi(t);if(t.options.moveInputWithCursor){var r=bi(t,n.sel.primary().head,"div"),o=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();i.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+a.top-o.top)),i.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+a.left-o.left))}return i},ol.prototype.showSelection=function(t){var e=this.cm.display;L(e.cursorDiv,t.cursors),L(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},ol.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&I(this.textarea),a&&s>=9&&(this.hasSelection=n)}else t||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},ol.prototype.getField=function(){return this.textarea},ol.prototype.supportsTouch=function(){return!1},ol.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!v||N()!=this.textarea))try{this.textarea.focus()}catch(t){}},ol.prototype.blur=function(){this.textarea.blur()},ol.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},ol.prototype.receivedFocus=function(){this.slowPoll()},ol.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){t.poll(),t.cm.state.focused&&t.slowPoll()}))},ol.prototype.fastPoll=function(){var t=!1,e=this;function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))}e.pollingFast=!0,e.polling.set(20,n)},ol.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,i=this.prevInput;if(this.contextMenuPending||!e.state.focused||It(n)&&!i&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==i&&!e.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===r||y&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var o=r.charCodeAt(0);if(8203!=o||i||(i="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(i.length,r.length);l1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},ol.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},ol.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},ol.prototype.onContextMenu=function(t){var e=this,n=e.cm,i=n.display,r=e.textarea;e.contextMenuPending&&e.contextMenuPending();var o=Ii(n,t),c=i.scroller.scrollTop;if(o&&!h){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&Nr(n,Ho)(n.doc,so(o),W);var u,d=r.style.cssText,p=e.wrapper.style.cssText,f=e.wrapper.offsetParent.getBoundingClientRect();if(e.wrapper.style.cssText="position: static",r.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-f.top-5)+"px; left: "+(t.clientX-f.left-5)+"px;\n z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),i.input.focus(),l&&window.scrollTo(null,u),i.input.reset(),n.somethingSelected()||(r.value=e.prevInput=" "),e.contextMenuPending=v,i.selForContextMenu=n.doc.sel,clearTimeout(i.detectingSelectAll),a&&s>=9&&g(),k){Et(t);var m=function(){gt(window,"mouseup",m),setTimeout(v,20)};ft(window,"mouseup",m)}else setTimeout(v,50)}function g(){if(null!=r.selectionStart){var t=n.somethingSelected(),o="​"+(t?r.value:"");r.value="⇚",r.value=o,e.prevInput=t?"":"​",r.selectionStart=1,r.selectionEnd=o.length,i.selForContextMenu=n.doc.sel}}function v(){if(e.contextMenuPending==v&&(e.contextMenuPending=!1,e.wrapper.style.cssText=p,r.style.cssText=d,a&&s<9&&i.scrollbars.setScrollTop(i.scroller.scrollTop=c),null!=r.selectionStart)){(!a||a&&s<9)&&g();var t=0,o=function(){i.selForContextMenu==n.doc.sel&&0==r.selectionStart&&r.selectionEnd>0&&"​"==e.prevInput?Nr(n,Xo)(n):t++<10?i.detectingSelectAll=setTimeout(o,500):(i.selForContextMenu=null,i.input.reset())};i.detectingSelectAll=setTimeout(o,200)}}},ol.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},ol.prototype.setUneditable=function(){},ol.prototype.needsContentAttribute=!1,_s(Os),Ys(Os);var ll="iter insert remove copy getEditor constructor".split(" ");for(var cl in ka.prototype)ka.prototype.hasOwnProperty(cl)&&Z(ll,cl)<0&&(Os.prototype[cl]=function(t){return function(){return t.apply(this.doc,arguments)}}(ka.prototype[cl]));return wt(ka),Os.inputStyles={textarea:ol,contenteditable:Qs},Os.defineMode=function(t){Os.defaults.mode||"null"==t||(Os.defaults.mode=t),zt.apply(this,arguments)},Os.defineMIME=Ht,Os.defineMode("null",(function(){return{token:function(t){return t.skipToEnd()}}})),Os.defineMIME("text/plain","null"),Os.defineExtension=function(t,e){Os.prototype[t]=e},Os.defineDocExtension=function(t,e){ka.prototype[t]=e},Os.fromTextArea=al,sl(Os),Os.version="5.58.2",Os}()},25419:function(t,e,n){!function(t){"use strict";t.defineMode("markdown",(function(e,n){var i=t.getMode(e,"text/html"),r="null"==i.name;function o(n){if(t.findModeByName){var i=t.findModeByName(n);i&&(n=i.mime||i.mimes[0])}var r=t.getMode(e,n);return"null"==r.name?null:r}void 0===n.highlightFormatting&&(n.highlightFormatting=!1),void 0===n.maxBlockquoteDepth&&(n.maxBlockquoteDepth=0),void 0===n.taskLists&&(n.taskLists=!1),void 0===n.strikethrough&&(n.strikethrough=!1),void 0===n.emoji&&(n.emoji=!1),void 0===n.fencedCodeBlockHighlighting&&(n.fencedCodeBlockHighlighting=!0),void 0===n.fencedCodeBlockDefaultMode&&(n.fencedCodeBlockDefaultMode="text/plain"),void 0===n.xml&&(n.xml=!0),void 0===n.tokenTypeOverrides&&(n.tokenTypeOverrides={});var a={header:"header",code:"comment",quote:"quote",list1:"variable-2",list2:"variable-3",list3:"keyword",hr:"hr",image:"image",imageAltText:"image-alt-text",imageMarker:"image-marker",formatting:"formatting",linkInline:"link",linkEmail:"link",linkText:"link",linkHref:"string",em:"em",strong:"strong",strikethrough:"strikethrough",emoji:"builtin"};for(var s in a)a.hasOwnProperty(s)&&n.tokenTypeOverrides[s]&&(a[s]=n.tokenTypeOverrides[s]);var l=/^([*\-_])(?:\s*\1){2,}\s*$/,c=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,u=/^\[(x| )\](?=\s)/i,h=n.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,d=/^ {0,3}(?:\={1,}|-{2,})\s*$/,p=/^[^#!\[\]*_\\<>` "'(~:]+/,f=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,m=/^\s*\[[^\]]+?\]:.*$/,g=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\xA7\xAB\xB6\xB7\xBB\xBF\u037E\u0387\u055A-\u055F\u0589\u058A\u05BE\u05C0\u05C3\u05C6\u05F3\u05F4\u0609\u060A\u060C\u060D\u061B\u061E\u061F\u066A-\u066D\u06D4\u0700-\u070D\u07F7-\u07F9\u0830-\u083E\u085E\u0964\u0965\u0970\u0AF0\u0DF4\u0E4F\u0E5A\u0E5B\u0F04-\u0F12\u0F14\u0F3A-\u0F3D\u0F85\u0FD0-\u0FD4\u0FD9\u0FDA\u104A-\u104F\u10FB\u1360-\u1368\u1400\u166D\u166E\u169B\u169C\u16EB-\u16ED\u1735\u1736\u17D4-\u17D6\u17D8-\u17DA\u1800-\u180A\u1944\u1945\u1A1E\u1A1F\u1AA0-\u1AA6\u1AA8-\u1AAD\u1B5A-\u1B60\u1BFC-\u1BFF\u1C3B-\u1C3F\u1C7E\u1C7F\u1CC0-\u1CC7\u1CD3\u2010-\u2027\u2030-\u2043\u2045-\u2051\u2053-\u205E\u207D\u207E\u208D\u208E\u2308-\u230B\u2329\u232A\u2768-\u2775\u27C5\u27C6\u27E6-\u27EF\u2983-\u2998\u29D8-\u29DB\u29FC\u29FD\u2CF9-\u2CFC\u2CFE\u2CFF\u2D70\u2E00-\u2E2E\u2E30-\u2E42\u3001-\u3003\u3008-\u3011\u3014-\u301F\u3030\u303D\u30A0\u30FB\uA4FE\uA4FF\uA60D-\uA60F\uA673\uA67E\uA6F2-\uA6F7\uA874-\uA877\uA8CE\uA8CF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA95F\uA9C1-\uA9CD\uA9DE\uA9DF\uAA5C-\uAA5F\uAADE\uAADF\uAAF0\uAAF1\uABEB\uFD3E\uFD3F\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE61\uFE63\uFE68\uFE6A\uFE6B\uFF01-\uFF03\uFF05-\uFF0A\uFF0C-\uFF0F\uFF1A\uFF1B\uFF1F\uFF20\uFF3B-\uFF3D\uFF3F\uFF5B\uFF5D\uFF5F-\uFF65]|\uD800[\uDD00-\uDD02\uDF9F\uDFD0]|\uD801\uDD6F|\uD802[\uDC57\uDD1F\uDD3F\uDE50-\uDE58\uDE7F\uDEF0-\uDEF6\uDF39-\uDF3F\uDF99-\uDF9C]|\uD804[\uDC47-\uDC4D\uDCBB\uDCBC\uDCBE-\uDCC1\uDD40-\uDD43\uDD74\uDD75\uDDC5-\uDDC9\uDDCD\uDDDB\uDDDD-\uDDDF\uDE38-\uDE3D\uDEA9]|\uD805[\uDCC6\uDDC1-\uDDD7\uDE41-\uDE43\uDF3C-\uDF3E]|\uD809[\uDC70-\uDC74]|\uD81A[\uDE6E\uDE6F\uDEF5\uDF37-\uDF3B\uDF44]|\uD82F\uDC9F|\uD836[\uDE87-\uDE8B]/,v=" ";function y(t,e,n){return e.f=e.inline=n,n(t,e)}function b(t,e,n){return e.f=e.block=n,n(t,e)}function x(t){return!t||!/\S/.test(t.string)}function w(e){if(e.linkTitle=!1,e.linkHref=!1,e.linkText=!1,e.em=!1,e.strong=!1,e.strikethrough=!1,e.quote=0,e.indentedCode=!1,e.f==k){var n=r;if(!n){var o=t.innerMode(i,e.htmlState);n="xml"==o.mode.name&&null===o.state.tagStart&&!o.state.context&&o.state.tokenize.isInText}n&&(e.f=T,e.block=C,e.htmlState=null)}return e.trailingSpace=0,e.trailingSpaceNewLine=!1,e.prevLine=e.thisLine,e.thisLine={stream:null},null}function C(e,i){var r=e.column()===i.indentation,s=x(i.prevLine.stream),p=i.indentedCode,g=i.prevLine.hr,v=!1!==i.list,b=(i.listStack[i.listStack.length-1]||0)+3;i.indentedCode=!1;var w=i.indentation;if(null===i.indentationDiff&&(i.indentationDiff=i.indentation,v)){for(i.list=null;w=4&&(p||i.prevLine.fencedCodeEnd||i.prevLine.header||s))return e.skipToEnd(),i.indentedCode=!0,a.code;if(e.eatSpace())return null;if(r&&i.indentation<=b&&(M=e.match(h))&&M[1].length<=6)return i.quote=0,i.header=M[1].length,i.thisLine.header=!0,n.highlightFormatting&&(i.formatting="header"),i.f=i.inline,E(i);if(i.indentation<=b&&e.eat(">"))return i.quote=r?1:i.quote+1,n.highlightFormatting&&(i.formatting="quote"),e.eatSpace(),E(i);if(!k&&!i.setext&&r&&i.indentation<=b&&(M=e.match(c))){var T=M[1]?"ol":"ul";return i.indentation=w+e.current().length,i.list=!0,i.quote=0,i.listStack.push(i.indentation),i.em=!1,i.strong=!1,i.code=!1,i.strikethrough=!1,n.taskLists&&e.match(u,!1)&&(i.taskList=!0),i.f=i.inline,n.highlightFormatting&&(i.formatting=["list","list-"+T]),E(i)}return r&&i.indentation<=b&&(M=e.match(f,!0))?(i.quote=0,i.fencedEndRE=new RegExp(M[1]+"+ *$"),i.localMode=n.fencedCodeBlockHighlighting&&o(M[2]||n.fencedCodeBlockDefaultMode),i.localMode&&(i.localState=t.startState(i.localMode)),i.f=i.block=S,n.highlightFormatting&&(i.formatting="code-block"),i.code=-1,E(i)):i.setext||!(C&&v||i.quote||!1!==i.list||i.code||k||m.test(e.string))&&(M=e.lookAhead(1))&&(M=M.match(d))?(i.setext?(i.header=i.setext,i.setext=0,e.skipToEnd(),n.highlightFormatting&&(i.formatting="header")):(i.header="="==M[0].charAt(0)?1:2,i.setext=i.header),i.thisLine.header=!0,i.f=i.inline,E(i)):k?(e.skipToEnd(),i.hr=!0,i.thisLine.hr=!0,a.hr):"["===e.peek()?y(e,i,N):y(e,i,i.inline)}function k(e,n){var o=i.token(e,n.htmlState);if(!r){var a=t.innerMode(i,n.htmlState);("xml"==a.mode.name&&null===a.state.tagStart&&!a.state.context&&a.state.tokenize.isInText||n.md_inside&&e.current().indexOf(">")>-1)&&(n.f=T,n.block=C,n.htmlState=null)}return o}function S(t,e){var i,r=e.listStack[e.listStack.length-1]||0,o=e.indentation=t.quote?e.push(a.formatting+"-"+t.formatting[i]+"-"+t.quote):e.push("error"))}if(t.taskOpen)return e.push("meta"),e.length?e.join(" "):null;if(t.taskClosed)return e.push("property"),e.length?e.join(" "):null;if(t.linkHref?e.push(a.linkHref,"url"):(t.strong&&e.push(a.strong),t.em&&e.push(a.em),t.strikethrough&&e.push(a.strikethrough),t.emoji&&e.push(a.emoji),t.linkText&&e.push(a.linkText),t.code&&e.push(a.code),t.image&&e.push(a.image),t.imageAltText&&e.push(a.imageAltText,"link"),t.imageMarker&&e.push(a.imageMarker)),t.header&&e.push(a.header,a.header+"-"+t.header),t.quote&&(e.push(a.quote),!n.maxBlockquoteDepth||n.maxBlockquoteDepth>=t.quote?e.push(a.quote+"-"+t.quote):e.push(a.quote+"-"+n.maxBlockquoteDepth)),!1!==t.list){var r=(t.listStack.length-1)%3;r?1===r?e.push(a.list2):e.push(a.list3):e.push(a.list1)}return t.trailingSpaceNewLine?e.push("trailing-space-new-line"):t.trailingSpace&&e.push("trailing-space-"+(t.trailingSpace%2?"a":"b")),e.length?e.join(" "):null}function M(t,e){if(t.match(p,!0))return E(e)}function T(e,r){var o=r.text(e,r);if(void 0!==o)return o;if(r.list)return r.list=null,E(r);if(r.taskList)return" "===e.match(u,!0)[1]?r.taskOpen=!0:r.taskClosed=!0,n.highlightFormatting&&(r.formatting="task"),r.taskList=!1,E(r);if(r.taskOpen=!1,r.taskClosed=!1,r.header&&e.match(/^#+$/,!0))return n.highlightFormatting&&(r.formatting="header"),E(r);var s=e.next();if(r.linkTitle){r.linkTitle=!1;var l=s;"("===s&&(l=")");var c="^\\s*(?:[^"+(l=(l+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1"))+"\\\\]+|\\\\\\\\|\\\\.)"+l;if(e.match(new RegExp(c),!0))return a.linkHref}if("`"===s){var h=r.formatting;n.highlightFormatting&&(r.formatting="code"),e.eatWhile("`");var d=e.current().length;if(0!=r.code||r.quote&&1!=d){if(d==r.code){var p=E(r);return r.code=0,p}return r.formatting=h,E(r)}return r.code=d,E(r)}if(r.code)return E(r);if("\\"===s&&(e.next(),n.highlightFormatting)){var f=E(r),m=a.formatting+"-escape";return f?f+" "+m:m}if("!"===s&&e.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return r.imageMarker=!0,r.image=!0,n.highlightFormatting&&(r.formatting="image"),E(r);if("["===s&&r.imageMarker&&e.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return r.imageMarker=!1,r.imageAltText=!0,n.highlightFormatting&&(r.formatting="image"),E(r);if("]"===s&&r.imageAltText){n.highlightFormatting&&(r.formatting="image");var f=E(r);return r.imageAltText=!1,r.image=!1,r.inline=r.f=A,f}if("["===s&&!r.image)return r.linkText&&e.match(/^.*?\]/)||(r.linkText=!0,n.highlightFormatting&&(r.formatting="link")),E(r);if("]"===s&&r.linkText){n.highlightFormatting&&(r.formatting="link");var f=E(r);return r.linkText=!1,r.inline=r.f=e.match(/\(.*?\)| ?\[.*?\]/,!1)?A:T,f}if("<"===s&&e.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=L,n.highlightFormatting&&(r.formatting="link"),(f=E(r))?f+=" ":f="",f+a.linkInline;if("<"===s&&e.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1))return r.f=r.inline=L,n.highlightFormatting&&(r.formatting="link"),(f=E(r))?f+=" ":f="",f+a.linkEmail;if(n.xml&&"<"===s&&e.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var v=e.string.indexOf(">",e.pos);if(-1!=v){var y=e.string.substring(e.start,v);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(y)&&(r.md_inside=!0)}return e.backUp(1),r.htmlState=t.startState(i),b(e,r,k)}if(n.xml&&"<"===s&&e.match(/^\/\w*?>/))return r.md_inside=!1,"tag";if("*"===s||"_"===s){for(var x=1,w=1==e.pos?" ":e.string.charAt(e.pos-2);x<3&&e.eat(s);)x++;var C=e.peek()||" ",S=!/\s/.test(C)&&(!g.test(C)||/\s/.test(w)||g.test(w)),M=!/\s/.test(w)&&(!g.test(w)||/\s/.test(C)||g.test(C)),D=null,P=null;if(x%2&&(r.em||!S||"*"!==s&&M&&!g.test(w)?r.em!=s||!M||"*"!==s&&S&&!g.test(C)||(D=!1):D=!0),x>1&&(r.strong||!S||"*"!==s&&M&&!g.test(w)?r.strong!=s||!M||"*"!==s&&S&&!g.test(C)||(P=!1):P=!0),null!=P||null!=D)return n.highlightFormatting&&(r.formatting=null==D?"strong":null==P?"em":"strong em"),!0===D&&(r.em=s),!0===P&&(r.strong=s),p=E(r),!1===D&&(r.em=!1),!1===P&&(r.strong=!1),p}else if(" "===s&&(e.eat("*")||e.eat("_"))){if(" "===e.peek())return E(r);e.backUp(1)}if(n.strikethrough)if("~"===s&&e.eatWhile(s)){if(r.strikethrough)return n.highlightFormatting&&(r.formatting="strikethrough"),p=E(r),r.strikethrough=!1,p;if(e.match(/^[^\s]/,!1))return r.strikethrough=!0,n.highlightFormatting&&(r.formatting="strikethrough"),E(r)}else if(" "===s&&e.match(/^~~/,!0)){if(" "===e.peek())return E(r);e.backUp(2)}if(n.emoji&&":"===s&&e.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){r.emoji=!0,n.highlightFormatting&&(r.formatting="emoji");var N=E(r);return r.emoji=!1,N}return" "===s&&(e.match(/^ +$/,!1)?r.trailingSpace++:r.trailingSpace&&(r.trailingSpaceNewLine=!0)),E(r)}function L(t,e){if(">"===t.next()){e.f=e.inline=T,n.highlightFormatting&&(e.formatting="link");var i=E(e);return i?i+=" ":i="",i+a.linkInline}return t.match(/^[^>]+/,!0),a.linkInline}function A(t,e){if(t.eatSpace())return null;var i=t.next();return"("===i||"["===i?(e.f=e.inline=P("("===i?")":"]"),n.highlightFormatting&&(e.formatting="link-string"),e.linkHref=!0,E(e)):"error"}var D={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function P(t){return function(e,i){if(e.next()===t){i.f=i.inline=T,n.highlightFormatting&&(i.formatting="link-string");var r=E(i);return i.linkHref=!1,r}return e.match(D[t]),i.linkHref=!0,E(i)}}function N(t,e){return t.match(/^([^\]\\]|\\.)*\]:/,!1)?(e.f=B,t.next(),n.highlightFormatting&&(e.formatting="link"),e.linkText=!0,E(e)):y(t,e,T)}function B(t,e){if(t.match(/^\]:/,!0)){e.f=e.inline=_,n.highlightFormatting&&(e.formatting="link");var i=E(e);return e.linkText=!1,i}return t.match(/^([^\]\\]|\\.)+/,!0),a.linkText}function _(t,e){return t.eatSpace()?null:(t.match(/^[^\s]+/,!0),void 0===t.peek()?e.linkTitle=!0:t.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),e.f=e.inline=T,a.linkHref+" url")}var I={startState:function(){return{f:C,prevLine:{stream:null},thisLine:{stream:null},block:C,htmlState:null,indentation:0,inline:T,text:M,formatting:!1,linkText:!1,linkHref:!1,linkTitle:!1,code:0,em:!1,strong:!1,header:0,setext:0,hr:!1,taskList:!1,list:!1,listStack:[],quote:0,trailingSpace:0,trailingSpaceNewLine:!1,strikethrough:!1,emoji:!1,fencedEndRE:null}},copyState:function(e){return{f:e.f,prevLine:e.prevLine,thisLine:e.thisLine,block:e.block,htmlState:e.htmlState&&t.copyState(i,e.htmlState),indentation:e.indentation,localMode:e.localMode,localState:e.localMode?t.copyState(e.localMode,e.localState):null,inline:e.inline,text:e.text,formatting:!1,linkText:e.linkText,linkTitle:e.linkTitle,linkHref:e.linkHref,code:e.code,em:e.em,strong:e.strong,strikethrough:e.strikethrough,emoji:e.emoji,header:e.header,setext:e.setext,hr:e.hr,taskList:e.taskList,list:e.list,listStack:e.listStack.slice(0),quote:e.quote,indentedCode:e.indentedCode,trailingSpace:e.trailingSpace,trailingSpaceNewLine:e.trailingSpaceNewLine,md_inside:e.md_inside,fencedEndRE:e.fencedEndRE}},token:function(t,e){if(e.formatting=!1,t!=e.thisLine.stream){if(e.header=0,e.hr=!1,t.match(/^\s*$/,!0))return w(e),null;if(e.prevLine=e.thisLine,e.thisLine={stream:t},e.taskList=!1,e.trailingSpace=0,e.trailingSpaceNewLine=!1,!e.localState&&(e.f=e.block,e.f!=k)){var n=t.match(/^\s*/,!0)[0].replace(/\t/g,v).length;if(e.indentation=n,e.indentationDiff=null,n>0)return null}}return e.f(t,e)},innerMode:function(t){return t.block==k?{state:t.htmlState,mode:i}:t.localState?{state:t.localState,mode:t.localMode}:{state:t,mode:I}},indent:function(e,n,r){return e.block==k&&i.indent?i.indent(e.htmlState,n,r):e.localState&&e.localMode.indent?e.localMode.indent(e.localState,n,r):t.Pass},blankLine:w,getType:E,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return I}),"xml"),t.defineMIME("text/markdown","markdown"),t.defineMIME("text/x-markdown","markdown")}(n(89780),n(15525),n(98101))},98101:function(t,e,n){!function(t){"use strict";t.modeInfo=[{name:"APL",mime:"text/apl",mode:"apl",ext:["dyalog","apl"]},{name:"PGP",mimes:["application/pgp","application/pgp-encrypted","application/pgp-keys","application/pgp-signature"],mode:"asciiarmor",ext:["asc","pgp","sig"]},{name:"ASN.1",mime:"text/x-ttcn-asn",mode:"asn.1",ext:["asn","asn1"]},{name:"Asterisk",mime:"text/x-asterisk",mode:"asterisk",file:/^extensions\.conf$/i},{name:"Brainfuck",mime:"text/x-brainfuck",mode:"brainfuck",ext:["b","bf"]},{name:"C",mime:"text/x-csrc",mode:"clike",ext:["c","h","ino"]},{name:"C++",mime:"text/x-c++src",mode:"clike",ext:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],alias:["cpp"]},{name:"Cobol",mime:"text/x-cobol",mode:"cobol",ext:["cob","cpy"]},{name:"C#",mime:"text/x-csharp",mode:"clike",ext:["cs"],alias:["csharp","cs"]},{name:"Clojure",mime:"text/x-clojure",mode:"clojure",ext:["clj","cljc","cljx"]},{name:"ClojureScript",mime:"text/x-clojurescript",mode:"clojure",ext:["cljs"]},{name:"Closure Stylesheets (GSS)",mime:"text/x-gss",mode:"css",ext:["gss"]},{name:"CMake",mime:"text/x-cmake",mode:"cmake",ext:["cmake","cmake.in"],file:/^CMakeLists\.txt$/},{name:"CoffeeScript",mimes:["application/vnd.coffeescript","text/coffeescript","text/x-coffeescript"],mode:"coffeescript",ext:["coffee"],alias:["coffee","coffee-script"]},{name:"Common Lisp",mime:"text/x-common-lisp",mode:"commonlisp",ext:["cl","lisp","el"],alias:["lisp"]},{name:"Cypher",mime:"application/x-cypher-query",mode:"cypher",ext:["cyp","cypher"]},{name:"Cython",mime:"text/x-cython",mode:"python",ext:["pyx","pxd","pxi"]},{name:"Crystal",mime:"text/x-crystal",mode:"crystal",ext:["cr"]},{name:"CSS",mime:"text/css",mode:"css",ext:["css"]},{name:"CQL",mime:"text/x-cassandra",mode:"sql",ext:["cql"]},{name:"D",mime:"text/x-d",mode:"d",ext:["d"]},{name:"Dart",mimes:["application/dart","text/x-dart"],mode:"dart",ext:["dart"]},{name:"diff",mime:"text/x-diff",mode:"diff",ext:["diff","patch"]},{name:"Django",mime:"text/x-django",mode:"django"},{name:"Dockerfile",mime:"text/x-dockerfile",mode:"dockerfile",file:/^Dockerfile$/},{name:"DTD",mime:"application/xml-dtd",mode:"dtd",ext:["dtd"]},{name:"Dylan",mime:"text/x-dylan",mode:"dylan",ext:["dylan","dyl","intr"]},{name:"EBNF",mime:"text/x-ebnf",mode:"ebnf"},{name:"ECL",mime:"text/x-ecl",mode:"ecl",ext:["ecl"]},{name:"edn",mime:"application/edn",mode:"clojure",ext:["edn"]},{name:"Eiffel",mime:"text/x-eiffel",mode:"eiffel",ext:["e"]},{name:"Elm",mime:"text/x-elm",mode:"elm",ext:["elm"]},{name:"Embedded Javascript",mime:"application/x-ejs",mode:"htmlembedded",ext:["ejs"]},{name:"Embedded Ruby",mime:"application/x-erb",mode:"htmlembedded",ext:["erb"]},{name:"Erlang",mime:"text/x-erlang",mode:"erlang",ext:["erl"]},{name:"Esper",mime:"text/x-esper",mode:"sql"},{name:"Factor",mime:"text/x-factor",mode:"factor",ext:["factor"]},{name:"FCL",mime:"text/x-fcl",mode:"fcl"},{name:"Forth",mime:"text/x-forth",mode:"forth",ext:["forth","fth","4th"]},{name:"Fortran",mime:"text/x-fortran",mode:"fortran",ext:["f","for","f77","f90","f95"]},{name:"F#",mime:"text/x-fsharp",mode:"mllike",ext:["fs"],alias:["fsharp"]},{name:"Gas",mime:"text/x-gas",mode:"gas",ext:["s"]},{name:"Gherkin",mime:"text/x-feature",mode:"gherkin",ext:["feature"]},{name:"GitHub Flavored Markdown",mime:"text/x-gfm",mode:"gfm",file:/^(readme|contributing|history)\.md$/i},{name:"Go",mime:"text/x-go",mode:"go",ext:["go"]},{name:"Groovy",mime:"text/x-groovy",mode:"groovy",ext:["groovy","gradle"],file:/^Jenkinsfile$/},{name:"HAML",mime:"text/x-haml",mode:"haml",ext:["haml"]},{name:"Haskell",mime:"text/x-haskell",mode:"haskell",ext:["hs"]},{name:"Haskell (Literate)",mime:"text/x-literate-haskell",mode:"haskell-literate",ext:["lhs"]},{name:"Haxe",mime:"text/x-haxe",mode:"haxe",ext:["hx"]},{name:"HXML",mime:"text/x-hxml",mode:"haxe",ext:["hxml"]},{name:"ASP.NET",mime:"application/x-aspx",mode:"htmlembedded",ext:["aspx"],alias:["asp","aspx"]},{name:"HTML",mime:"text/html",mode:"htmlmixed",ext:["html","htm","handlebars","hbs"],alias:["xhtml"]},{name:"HTTP",mime:"message/http",mode:"http"},{name:"IDL",mime:"text/x-idl",mode:"idl",ext:["pro"]},{name:"Pug",mime:"text/x-pug",mode:"pug",ext:["jade","pug"],alias:["jade"]},{name:"Java",mime:"text/x-java",mode:"clike",ext:["java"]},{name:"Java Server Pages",mime:"application/x-jsp",mode:"htmlembedded",ext:["jsp"],alias:["jsp"]},{name:"JavaScript",mimes:["text/javascript","text/ecmascript","application/javascript","application/x-javascript","application/ecmascript"],mode:"javascript",ext:["js"],alias:["ecmascript","js","node"]},{name:"JSON",mimes:["application/json","application/x-json"],mode:"javascript",ext:["json","map"],alias:["json5"]},{name:"JSON-LD",mime:"application/ld+json",mode:"javascript",ext:["jsonld"],alias:["jsonld"]},{name:"JSX",mime:"text/jsx",mode:"jsx",ext:["jsx"]},{name:"Jinja2",mime:"text/jinja2",mode:"jinja2",ext:["j2","jinja","jinja2"]},{name:"Julia",mime:"text/x-julia",mode:"julia",ext:["jl"]},{name:"Kotlin",mime:"text/x-kotlin",mode:"clike",ext:["kt"]},{name:"LESS",mime:"text/x-less",mode:"css",ext:["less"]},{name:"LiveScript",mime:"text/x-livescript",mode:"livescript",ext:["ls"],alias:["ls"]},{name:"Lua",mime:"text/x-lua",mode:"lua",ext:["lua"]},{name:"Markdown",mime:"text/x-markdown",mode:"markdown",ext:["markdown","md","mkd"]},{name:"mIRC",mime:"text/mirc",mode:"mirc"},{name:"MariaDB SQL",mime:"text/x-mariadb",mode:"sql"},{name:"Mathematica",mime:"text/x-mathematica",mode:"mathematica",ext:["m","nb","wl","wls"]},{name:"Modelica",mime:"text/x-modelica",mode:"modelica",ext:["mo"]},{name:"MUMPS",mime:"text/x-mumps",mode:"mumps",ext:["mps"]},{name:"MS SQL",mime:"text/x-mssql",mode:"sql"},{name:"mbox",mime:"application/mbox",mode:"mbox",ext:["mbox"]},{name:"MySQL",mime:"text/x-mysql",mode:"sql"},{name:"Nginx",mime:"text/x-nginx-conf",mode:"nginx",file:/nginx.*\.conf$/i},{name:"NSIS",mime:"text/x-nsis",mode:"nsis",ext:["nsh","nsi"]},{name:"NTriples",mimes:["application/n-triples","application/n-quads","text/n-triples"],mode:"ntriples",ext:["nt","nq"]},{name:"Objective-C",mime:"text/x-objectivec",mode:"clike",ext:["m"],alias:["objective-c","objc"]},{name:"Objective-C++",mime:"text/x-objectivec++",mode:"clike",ext:["mm"],alias:["objective-c++","objc++"]},{name:"OCaml",mime:"text/x-ocaml",mode:"mllike",ext:["ml","mli","mll","mly"]},{name:"Octave",mime:"text/x-octave",mode:"octave",ext:["m"]},{name:"Oz",mime:"text/x-oz",mode:"oz",ext:["oz"]},{name:"Pascal",mime:"text/x-pascal",mode:"pascal",ext:["p","pas"]},{name:"PEG.js",mime:"null",mode:"pegjs",ext:["jsonld"]},{name:"Perl",mime:"text/x-perl",mode:"perl",ext:["pl","pm"]},{name:"PHP",mimes:["text/x-php","application/x-httpd-php","application/x-httpd-php-open"],mode:"php",ext:["php","php3","php4","php5","php7","phtml"]},{name:"Pig",mime:"text/x-pig",mode:"pig",ext:["pig"]},{name:"Plain Text",mime:"text/plain",mode:"null",ext:["txt","text","conf","def","list","log"]},{name:"PLSQL",mime:"text/x-plsql",mode:"sql",ext:["pls"]},{name:"PostgreSQL",mime:"text/x-pgsql",mode:"sql"},{name:"PowerShell",mime:"application/x-powershell",mode:"powershell",ext:["ps1","psd1","psm1"]},{name:"Properties files",mime:"text/x-properties",mode:"properties",ext:["properties","ini","in"],alias:["ini","properties"]},{name:"ProtoBuf",mime:"text/x-protobuf",mode:"protobuf",ext:["proto"]},{name:"Python",mime:"text/x-python",mode:"python",ext:["BUILD","bzl","py","pyw"],file:/^(BUCK|BUILD)$/},{name:"Puppet",mime:"text/x-puppet",mode:"puppet",ext:["pp"]},{name:"Q",mime:"text/x-q",mode:"q",ext:["q"]},{name:"R",mime:"text/x-rsrc",mode:"r",ext:["r","R"],alias:["rscript"]},{name:"reStructuredText",mime:"text/x-rst",mode:"rst",ext:["rst"],alias:["rst"]},{name:"RPM Changes",mime:"text/x-rpm-changes",mode:"rpm"},{name:"RPM Spec",mime:"text/x-rpm-spec",mode:"rpm",ext:["spec"]},{name:"Ruby",mime:"text/x-ruby",mode:"ruby",ext:["rb"],alias:["jruby","macruby","rake","rb","rbx"]},{name:"Rust",mime:"text/x-rustsrc",mode:"rust",ext:["rs"]},{name:"SAS",mime:"text/x-sas",mode:"sas",ext:["sas"]},{name:"Sass",mime:"text/x-sass",mode:"sass",ext:["sass"]},{name:"Scala",mime:"text/x-scala",mode:"clike",ext:["scala"]},{name:"Scheme",mime:"text/x-scheme",mode:"scheme",ext:["scm","ss"]},{name:"SCSS",mime:"text/x-scss",mode:"css",ext:["scss"]},{name:"Shell",mimes:["text/x-sh","application/x-sh"],mode:"shell",ext:["sh","ksh","bash"],alias:["bash","sh","zsh"],file:/^PKGBUILD$/},{name:"Sieve",mime:"application/sieve",mode:"sieve",ext:["siv","sieve"]},{name:"Slim",mimes:["text/x-slim","application/x-slim"],mode:"slim",ext:["slim"]},{name:"Smalltalk",mime:"text/x-stsrc",mode:"smalltalk",ext:["st"]},{name:"Smarty",mime:"text/x-smarty",mode:"smarty",ext:["tpl"]},{name:"Solr",mime:"text/x-solr",mode:"solr"},{name:"SML",mime:"text/x-sml",mode:"mllike",ext:["sml","sig","fun","smackspec"]},{name:"Soy",mime:"text/x-soy",mode:"soy",ext:["soy"],alias:["closure template"]},{name:"SPARQL",mime:"application/sparql-query",mode:"sparql",ext:["rq","sparql"],alias:["sparul"]},{name:"Spreadsheet",mime:"text/x-spreadsheet",mode:"spreadsheet",alias:["excel","formula"]},{name:"SQL",mime:"text/x-sql",mode:"sql",ext:["sql"]},{name:"SQLite",mime:"text/x-sqlite",mode:"sql"},{name:"Squirrel",mime:"text/x-squirrel",mode:"clike",ext:["nut"]},{name:"Stylus",mime:"text/x-styl",mode:"stylus",ext:["styl"]},{name:"Swift",mime:"text/x-swift",mode:"swift",ext:["swift"]},{name:"sTeX",mime:"text/x-stex",mode:"stex"},{name:"LaTeX",mime:"text/x-latex",mode:"stex",ext:["text","ltx","tex"],alias:["tex"]},{name:"SystemVerilog",mime:"text/x-systemverilog",mode:"verilog",ext:["v","sv","svh"]},{name:"Tcl",mime:"text/x-tcl",mode:"tcl",ext:["tcl"]},{name:"Textile",mime:"text/x-textile",mode:"textile",ext:["textile"]},{name:"TiddlyWiki",mime:"text/x-tiddlywiki",mode:"tiddlywiki"},{name:"Tiki wiki",mime:"text/tiki",mode:"tiki"},{name:"TOML",mime:"text/x-toml",mode:"toml",ext:["toml"]},{name:"Tornado",mime:"text/x-tornado",mode:"tornado"},{name:"troff",mime:"text/troff",mode:"troff",ext:["1","2","3","4","5","6","7","8","9"]},{name:"TTCN",mime:"text/x-ttcn",mode:"ttcn",ext:["ttcn","ttcn3","ttcnpp"]},{name:"TTCN_CFG",mime:"text/x-ttcn-cfg",mode:"ttcn-cfg",ext:["cfg"]},{name:"Turtle",mime:"text/turtle",mode:"turtle",ext:["ttl"]},{name:"TypeScript",mime:"application/typescript",mode:"javascript",ext:["ts"],alias:["ts"]},{name:"TypeScript-JSX",mime:"text/typescript-jsx",mode:"jsx",ext:["tsx"],alias:["tsx"]},{name:"Twig",mime:"text/x-twig",mode:"twig"},{name:"Web IDL",mime:"text/x-webidl",mode:"webidl",ext:["webidl"]},{name:"VB.NET",mime:"text/x-vb",mode:"vb",ext:["vb"]},{name:"VBScript",mime:"text/vbscript",mode:"vbscript",ext:["vbs"]},{name:"Velocity",mime:"text/velocity",mode:"velocity",ext:["vtl"]},{name:"Verilog",mime:"text/x-verilog",mode:"verilog",ext:["v"]},{name:"VHDL",mime:"text/x-vhdl",mode:"vhdl",ext:["vhd","vhdl"]},{name:"Vue.js Component",mimes:["script/x-vue","text/x-vue"],mode:"vue",ext:["vue"]},{name:"XML",mimes:["application/xml","text/xml"],mode:"xml",ext:["xml","xsl","xsd","svg"],alias:["rss","wsdl","xsd"]},{name:"XQuery",mime:"application/xquery",mode:"xquery",ext:["xy","xquery"]},{name:"Yacas",mime:"text/x-yacas",mode:"yacas",ext:["ys"]},{name:"YAML",mimes:["text/x-yaml","text/yaml"],mode:"yaml",ext:["yaml","yml"],alias:["yml"]},{name:"Z80",mime:"text/x-z80",mode:"z80",ext:["z80"]},{name:"mscgen",mime:"text/x-mscgen",mode:"mscgen",ext:["mscgen","mscin","msc"]},{name:"xu",mime:"text/x-xu",mode:"mscgen",ext:["xu"]},{name:"msgenny",mime:"text/x-msgenny",mode:"mscgen",ext:["msgenny"]},{name:"WebAssembly",mime:"text/webassembly",mode:"wast",ext:["wat","wast"]}];for(var e=0;e-1&&e.substring(r+1,e.length);if(o)return t.findModeByExtension(o)},t.findModeByName=function(e){e=e.toLowerCase();for(var n=0;n0?t.cmdState[t.cmdState.length-1]:null}function r(t){var e=t.cmdState.pop();e&&e.closeBracket()}function o(t){for(var e=t.cmdState,n=e.length-1;n>=0;n--){var i=e[n];if("DEFAULT"!=i.name)return i}return{styleIdentifier:function(){return null}}}function a(t,e,n){return function(){this.name=t,this.bracketNo=0,this.style=e,this.styles=n,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var s={};function l(t,e){t.f=e}function c(t,e){var r;if(t.match(/^\\[a-zA-Z@]+/)){var a=t.current().slice(1);return n(e,r=new(r=s.hasOwnProperty(a)?s[a]:s.DEFAULT)),l(e,h),r.style}if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/\\]/))return"tag";if(t.match("\\["))return l(e,(function(t,e){return u(t,e,"\\]")})),"keyword";if(t.match("\\("))return l(e,(function(t,e){return u(t,e,"\\)")})),"keyword";if(t.match("$$"))return l(e,(function(t,e){return u(t,e,"$$")})),"keyword";if(t.match("$"))return l(e,(function(t,e){return u(t,e,"$")})),"keyword";var c=t.next();return"%"==c?(t.skipToEnd(),"comment"):"}"==c||"]"==c?(r=i(e))?(r.closeBracket(c),l(e,h),"bracket"):"error":"{"==c||"["==c?(n(e,r=new(r=s.DEFAULT)),"bracket"):/\d/.test(c)?(t.eatWhile(/[\w.%]/),"atom"):(t.eatWhile(/[\w\-_]/),"begin"==(r=o(e)).name&&(r.argument=t.current()),r.styleIdentifier())}function u(t,e,n){if(t.eatSpace())return null;if(n&&t.match(n))return l(e,c),"keyword";if(t.match(/^\\[a-zA-Z@]+/))return"tag";if(t.match(/^[a-zA-Z]+/))return"variable-2";if(t.match(/^\\[$&%#{}_]/))return"tag";if(t.match(/^\\[,;!\/]/))return"tag";if(t.match(/^[\^_&]/))return"tag";if(t.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(t.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var i=t.next();return"{"==i||"}"==i||"["==i||"]"==i||"("==i||")"==i?"bracket":"%"==i?(t.skipToEnd(),"comment"):"error"}function h(t,e){var n=t.peek();return"{"==n||"["==n?(i(e).openBracket(n),t.eat(n),l(e,c),"bracket"):/[ \t\r]/.test(n)?(t.eat(n),null):(l(e,c),r(e),c(t,e))}return s.importmodule=a("importmodule","tag",["string","builtin"]),s.documentclass=a("documentclass","tag",["","atom"]),s.usepackage=a("usepackage","tag",["atom"]),s.begin=a("begin","tag",["atom"]),s.end=a("end","tag",["atom"]),s.label=a("label","tag",["atom"]),s.ref=a("ref","tag",["atom"]),s.eqref=a("eqref","tag",["atom"]),s.cite=a("cite","tag",["atom"]),s.bibitem=a("bibitem","tag",["atom"]),s.Bibitem=a("Bibitem","tag",["atom"]),s.RBibitem=a("RBibitem","tag",["atom"]),s.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}},{startState:function(){return{cmdState:[],f:e.inMathMode?function(t,e){return u(t,e)}:c}},copyState:function(t){return{cmdState:t.cmdState.slice(),f:t.f}},token:function(t,e){return e.f(t,e)},blankLine:function(t){t.f=c,t.cmdState.length=0},lineComment:"%"}})),t.defineMIME("text/x-stex","stex"),t.defineMIME("text/x-latex","stex")}(n(89780))},15525:function(t,e,n){!function(t){"use strict";var e={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};t.defineMode("xml",(function(i,r){var o,a,s=i.indentUnit,l={},c=r.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in r)l[u]=r[u];function h(t,e){function n(n){return e.tokenize=n,n(t,e)}var i=t.next();return"<"==i?t.eat("!")?t.eat("[")?t.match("CDATA[")?n(f("atom","]]>")):null:t.match("--")?n(f("comment","--\x3e")):t.match("DOCTYPE",!0,!0)?(t.eatWhile(/[\w\._\-]/),n(m(1))):null:t.eat("?")?(t.eatWhile(/[\w\._\-]/),e.tokenize=f("meta","?>"),"meta"):(o=t.eat("/")?"closeTag":"openTag",e.tokenize=d,"tag bracket"):"&"==i?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function d(t,e){var n=t.next();if(">"==n||"/"==n&&t.eat(">"))return e.tokenize=h,o=">"==n?"endTag":"selfcloseTag","tag bracket";if("="==n)return o="equals",null;if("<"==n){e.tokenize=h,e.state=b,e.tagName=e.tagStart=null;var i=e.tokenize(t,e);return i?i+" tag error":"tag error"}return/[\'\"]/.test(n)?(e.tokenize=p(n),e.stringStartCol=t.column(),e.tokenize(t,e)):(t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function p(t){var e=function(e,n){for(;!e.eol();)if(e.next()==t){n.tokenize=d;break}return"string"};return e.isInAttribute=!0,e}function f(t,e){return function(n,i){for(;!n.eol();){if(n.match(e)){i.tokenize=h;break}n.next()}return t}}function m(t){return function(e,n){for(var i;null!=(i=e.next());){if("<"==i)return n.tokenize=m(t+1),n.tokenize(e,n);if(">"==i){if(1==t){n.tokenize=h;break}return n.tokenize=m(t-1),n.tokenize(e,n)}}return"meta"}}function g(t,e,n){this.prev=t.context,this.tagName=e,this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function v(t){t.context&&(t.context=t.context.prev)}function y(t,e){for(var n;;){if(!t.context)return;if(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(n)||!l.contextGrabbers[n].hasOwnProperty(e))return;v(t)}}function b(t,e,n){return"openTag"==t?(n.tagStart=e.column(),x):"closeTag"==t?w:b}function x(t,e,n){return"word"==t?(n.tagName=e.current(),a="tag",S):l.allowMissingTagName&&"endTag"==t?(a="tag bracket",S(t,e,n)):(a="error",x)}function w(t,e,n){if("word"==t){var i=e.current();return n.context&&n.context.tagName!=i&&l.implicitlyClosed.hasOwnProperty(n.context.tagName)&&v(n),n.context&&n.context.tagName==i||!1===l.matchClosing?(a="tag",C):(a="tag error",k)}return l.allowMissingTagName&&"endTag"==t?(a="tag bracket",C(t,e,n)):(a="error",k)}function C(t,e,n){return"endTag"!=t?(a="error",C):(v(n),b)}function k(t,e,n){return a="error",C(t,e,n)}function S(t,e,n){if("word"==t)return a="attribute",E;if("endTag"==t||"selfcloseTag"==t){var i=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(i)?y(n,i):(y(n,i),n.context=new g(n,i,r==n.indented)),b}return a="error",S}function E(t,e,n){return"equals"==t?M:(l.allowMissing||(a="error"),S(t,e,n))}function M(t,e,n){return"string"==t?T:"word"==t&&l.allowUnquoted?(a="string",S):(a="error",S(t,e,n))}function T(t,e,n){return"string"==t?T:S(t,e,n)}return h.isInText=!0,{startState:function(t){var e={tokenize:h,state:b,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;o=null;var n=e.tokenize(t,e);return(n||o)&&"comment"!=n&&(a=null,e.state=e.state(o||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(e,n,i){var r=e.context;if(e.tokenize.isInAttribute)return e.tagStart==e.indented?e.stringStartCol+1:e.indented+s;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=d&&e.tokenize!=h)return i?i.match(/^(\s*)/)[0].length:0;if(e.tagName)return!1!==l.multilineTagIndentPastTag?e.tagStart+e.tagName.length+2:e.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==M&&(t.state=S)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)n.tagName&&e.push(n.tagName);return e.reverse()}}})),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(89780))},2859:function(t,e,n){"use strict";n.d(e,{hP:function(){return Q}});var i=function(t,e){return(i=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(t,e)};function r(t,e){function n(){this.constructor=t}i(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function o(t,e,n,i){return new(n||(n=Promise))((function(r,o){function a(t){try{l(i.next(t))}catch(t){o(t)}}function s(t){try{l(i.throw(t))}catch(t){o(t)}}function l(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(a,s)}l((i=i.apply(t,e||[])).next())}))}function a(t,e){var n,i,r,o,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,i&&(r=2&o[0]?i.return:o[0]?i.throw||((r=i.return)&&r.call(i),0):i.next)&&!(r=r.call(i,o[1])).done)return r;switch(i=0,r&&(o=[2&o[0],r.value]),o[0]){case 0:case 1:r=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,i=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==o[0]&&2!==o[0])){a=0;continue}if(3===o[0]&&(!r||o[1]>r[0]&&o[1]',"select"),this.addActionButton(n,'',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(n,'',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(n,'',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(n,'',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(n,'',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(n,'',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(n,'',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach((function(t){var n=document.createElement("div");n.className=""+e.toolbarButtonStyleClass.name,n.setAttribute("data-type-name",t.typeName),n.innerHTML=t.icon,n.addEventListener("click",(function(){e.markerToolbarButtonClicked(n,t)})),e.buttons.push(n),e.markerButtons.push(n)})),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var i=document.createElement("div");i.className=this.toolbarBlockStyleClass.name,i.style.whiteSpace="nowrap",i.style.display=!1!==this.uiStyleSettings.resultButtonBlockVisible?"":"none",this.uiContainer.appendChild(i),this.addActionButton(i,'',"render"),this.addActionButton(i,'',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},t.prototype.addButtonClickListener=function(t){this.buttonClickListeners.push(t)},t.prototype.removeButtonClickListener=function(t){this.buttonClickListeners.indexOf(t)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(t),1)},t.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},t.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var t=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var e=0;e0&&this.buttonClickListeners.forEach((function(t){return t("marker",e)})),this.markerButtonOverflowBlock.style.display="none"},t.prototype.actionToolbarButtonClicked=function(t,e){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach((function(t){return t("action",e)})),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},t.prototype.setActiveButton=function(t){this.resetButtonStyles(),t.className=t.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),t.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},t.prototype.setActiveMarkerButton=function(t){var e=this.markerButtons.find((function(e){return e.getAttribute("data-type-name")===t}));e&&this.setActiveButton(e)},t.prototype.setCurrentMarker=function(t){var e=this;this.currentMarker=t,this.buttons.filter((function(t){return/delete|notes/.test(t.getAttribute("data-action"))})).forEach((function(t){void 0===e.currentMarker?(t.style.fillOpacity="0.4",t.style.pointerEvents="none"):(t.style.fillOpacity="1",t.style.pointerEvents="all")}))},t}(),g=function(){function t(t,e,n,i){this.panels=[],this.panelButtons=[],this.markerjsContainer=t,this.displayMode=e,this.uiStyleSettings=n,this.styles=i,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return t.prototype.addStyles=function(){var t;this.toolboxStyleClass=this.styles.addClass(new f("toolbox","\n width: 100%;\n flex-shrink: 0;\n display: flex;\n flex-direction: column;\n font-family: sans-serif;\n "+("popup"===this.displayMode?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+"\n box-sizing: content-box;\n "+("popup"===this.displayMode?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+"\n "+("inline"===this.displayMode?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n "+("inline"===this.displayMode?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+"\n overflow: hidden;\n ")),this.toolboxStyleColorsClass=this.styles.addClass(new f("toolbox_colors","\n color: "+this.uiStyleSettings.toolboxColor+";\n "));var e=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new f("toolbox-button-row","\n display: flex;\n cursor: default;\n box-sizing: content-box;\n ")),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new f("toolbox-button-row_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundColor+";\n ")),this.toolboxPanelRowStyleClass=this.styles.addClass(new f("toolbox-panel-row","\n display: flex;\n "+("inline"===this.displayMode?"position: absolute;":"")+"\n "+("inline"===this.displayMode?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+"\n cursor: default;\n height: "+1.5*this.uiStyleSettings.toolbarHeight+"px;\n "+("inline"===this.displayMode?"width: 100%;":"")+"\n box-sizing: content-box;\n ")),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new f("toolbox-panel-row_colors","\n background-color: "+(null!==(t=this.uiStyleSettings.toolboxBackgroundColor)&&void 0!==t?t:this.uiStyleSettings.toolbarBackgroundHoverColor)+";\n ")),this.toolboxButtonStyleClass=this.styles.addClass(new f("toolbox_button","\n display: inline-block;\n width: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n height: "+(this.uiStyleSettings.toolbarHeight-2*e)+"px;\n padding: "+e+"px;\n box-sizing: content-box;\n ")),this.toolboxButtonStyleColorsClass=this.styles.addClass(new f("toolbox-button_colors","\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new f("toolbox-active-button_colors","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+";\n fill: "+this.uiStyleSettings.toolbarColor+";\n ")),this.styles.addRule(new p("."+this.toolboxButtonStyleColorsClass.name+":hover","\n background-color: "+this.uiStyleSettings.toolbarBackgroundHoverColor+"\n ")),this.styles.addRule(new p("."+this.toolboxButtonStyleClass.name+" svg","\n height: "+this.uiStyleSettings.toolbarHeight/2+"px;\n "))},t.prototype.show=function(t){var e;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=t,this.uiContainer.className=this.toolboxStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxStyleColorsClassName)&&void 0!==e?e:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},t.prototype.setPanelButtons=function(t){var e,n,i=this;this.panels=t,void 0!==this.uiContainer&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+(null!==(e=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)&&void 0!==e?e:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+(null!==(n=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)&&void 0!==n?n:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach((function(t){var e;t.uiStyleSettings=i.uiStyleSettings;var n=document.createElement("div");n.className=i.toolboxButtonStyleClass.name+" "+(null!==(e=i.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==e?e:i.toolboxButtonStyleColorsClass.name),n.innerHTML=t.icon,n.title=t.title,n.addEventListener("click",(function(){i.panelButtonClick(t)})),i.panelButtons.push(n),i.buttonRow.appendChild(n)})),"inline"===this.displayMode?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},t.prototype.panelButtonClick=function(t){var e=this,n=-1;if(t!==this.activePanel){n=this.panels.indexOf(t),this.panelRow.innerHTML="";var i=t.getUi();i.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(i),this.panelRow.style.display="flex",this.panelRow.style.visibility="visible",this.panelRow.className=this.panelRow.className.replace(this.styles.fadeOutAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeInAnimationClassName,this.activePanel=t}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout((function(){"inline"===e.displayMode?e.panelRow.style.display="none":e.panelRow.style.visibility="hidden"}),200);this.panelButtons.forEach((function(t,i){var r,o;t.className=e.toolboxButtonStyleClass.name+" "+(i===n?""+(null!==(r=e.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)&&void 0!==r?r:e.toolboxActiveButtonStyleColorsClass.name):""+(null!==(o=e.uiStyleSettings.toolboxButtonStyleColorsClassName)&&void 0!==o?o:e.toolboxButtonStyleColorsClass.name))}))},t}(),v=function(t,e){this.title=t,this.icon=e},y=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'')||this;return o.colors=[],o.addTransparent=!1,o.colorBoxes=[],o.colors=n,o.currentColor=i,o.setCurrentColor=o.setCurrentColor.bind(o),o.getColorBox=o.getColorBox.bind(o),o}return r(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.whiteSpace="nowrap",this.colors.forEach((function(n){var i=t.getColorBox(n);e.appendChild(i),t.colorBoxes.push(i)})),e},e.prototype.getColorBox=function(t){var e=this,n=this.uiStyleSettings.toolbarHeight/4,i=this.uiStyleSettings.toolbarHeight-n,r=document.createElement("div");r.style.display="inline-block",r.style.boxSizing="content-box",r.style.width=i-2+"px",r.style.height=i-2+"px",r.style.padding="1px",r.style.marginRight="2px",r.style.marginBottom="2px",r.style.borderWidth="2px",r.style.borderStyle="solid",r.style.borderRadius=(i+2)/2+"px",r.style.borderColor=t===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",r.addEventListener("click",(function(){e.setCurrentColor(t,r)}));var o=document.createElement("div");return o.style.display="inline-block",o.style.width=i-2+"px",o.style.height=i-2+"px",o.style.backgroundColor=t,o.style.borderRadius=i/2+"px","transparent"===t&&(o.style.fill=this.uiStyleSettings.toolboxAccentColor,o.innerHTML='\n \n '),r.appendChild(o),r},e.prototype.setCurrentColor=function(t,e){var n=this;this.currentColor=t,this.colorBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onColorChanged&&this.onColorChanged(t)},e}(v),b=function(){function t(t,e,n){this._state="new",this._isSelected=!1,this._container=t,this._overlayContainer=e,this.globalSettings=n,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(t.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),t.prototype.ownsTarget=function(t){return!1},Object.defineProperty(t.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),t.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},t.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},t.prototype.pointerDown=function(t,e){},t.prototype.dblClick=function(t,e){},t.prototype.manipulate=function(t){},t.prototype.pointerUp=function(t){this.stateChanged()},t.prototype.dispose=function(){},t.prototype.addMarkerVisualToContainer=function(t){this.container.childNodes.length>0?this.container.insertBefore(t,this.container.childNodes[0]):this.container.appendChild(t)},t.prototype.getState=function(){return{typeName:t.typeName,state:this.state,notes:this.notes}},t.prototype.restoreState=function(t){this._state=t.state,this.notes=t.notes},t.prototype.scale=function(t,e){},t.prototype.colorChanged=function(t){this.onColorChanged&&this.onColorChanged(t),this.stateChanged()},t.prototype.fillColorChanged=function(t){this.onFillColorChanged&&this.onFillColorChanged(t),this.stateChanged()},t.prototype.stateChanged=function(){if(this.onStateChanged&&"creating"!==this.state&&"new"!==this.state){var t=this.getState();void 0!==this.manipulationStartState&&(this.manipulationStartState.state="select"),t.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(t)&&this.onStateChanged(this)}},t.typeName="MarkerBase",t}(),x=function(){function t(){this.findGripByVisual=this.findGripByVisual.bind(this)}return t.prototype.findGripByVisual=function(t){return this.topLeft.ownsTarget(t)?this.topLeft:this.topCenter.ownsTarget(t)?this.topCenter:this.topRight.ownsTarget(t)?this.topRight:this.centerLeft.ownsTarget(t)?this.centerLeft:this.centerRight.ownsTarget(t)?this.centerRight:this.bottomLeft.ownsTarget(t)?this.bottomLeft:this.bottomCenter.ownsTarget(t)?this.bottomCenter:this.bottomRight.ownsTarget(t)?this.bottomRight:void 0},t}(),w=function(){function t(){this.GRIP_SIZE=10,this.visual=l.createGroup(),this.visual.appendChild(l.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(l.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return t.prototype.ownsTarget=function(t){return t===this.visual||t===this.visual.childNodes[0]||t===this.visual.childNodes[1]},t}(),C=function(){function t(){}return t.toITransformMatrix=function(t){return{a:t.a,b:t.b,c:t.c,d:t.d,e:t.e,f:t.f}},t.toSVGMatrix=function(t,e){return t.a=e.a,t.b=e.b,t.c=e.c,t.d=e.d,t.e=e.e,t.f=e.f,t},t}(),k=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.left=0,r.top=0,r.width=0,r.height=0,r.defaultSize={x:50,y:20},r.offsetX=0,r.offsetY=0,r.rotationAngle=0,r.CB_DISTANCE=10,r._suppressMarkerCreateEvent=!1,r.container.transform.baseVal.appendItem(l.createTransform()),r.setupControlBox(),r}return r(e,t),Object.defineProperty(e.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"visual",{get:function(){return this._visual},set:function(t){this._visual=t;var e=l.createTransform();this._visual.transform.baseVal.appendItem(e)},enumerable:!1,configurable:!0}),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!!(void 0!==this.controlGrips.findGripByVisual(e)||void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(e))},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.left=e.x,this.top=e.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var i=this.unrotatePoint(e);if(this.manipulationStartX=i.x,this.manipulationStartY=i.y,this.offsetX=i.x-this.left,this.offsetY=i.y-this.top,"new"!==this.state)if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(n),void 0!==this.activeGrip)this._state="resize";else if(void 0!==this.rotatorGrip&&this.rotatorGrip.ownsTarget(n)){this.activeGrip=this.rotatorGrip;var r=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=r.x-this.width/2,this.top=r.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var o=this.container.transform.baseVal.getItem(0);o.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(o,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},e.prototype.pointerUp=function(e){var n=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(e),this._state="select","creating"===n&&this.onMarkerCreated&&!1===this._suppressMarkerCreateEvent&&this.onMarkerCreated(this)},e.prototype.moveVisual=function(t){this.visual.style.transform="translate("+t.x+"px, "+t.y+"px)"},e.prototype.manipulate=function(t){var e=this.unrotatePoint(t);"creating"===this.state?this.resize(t):"move"===this.state?(this.left=this.manipulationStartLeft+(e.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(e.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):"resize"===this.state?this.resize(e):"rotate"===this.state&&this.rotate(t)},e.prototype.resize=function(t){var e=this.manipulationStartLeft,n=this.manipulationStartWidth,i=this.manipulationStartTop,r=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:e=this.manipulationStartLeft+t.x-this.manipulationStartX,n=this.manipulationStartWidth+this.manipulationStartLeft-e;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:n=this.manipulationStartWidth+t.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:i=this.manipulationStartTop+t.y-this.manipulationStartY,r=this.manipulationStartHeight+this.manipulationStartTop-i;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:r=this.manipulationStartHeight+t.y-this.manipulationStartY}n>=0?(this.left=e,this.width=n):(this.left=e+n,this.width=-n),r>=0?(this.top=i,this.height=r):(this.top=i+r,this.height=-r),this.setSize()},e.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},e.prototype.rotate=function(t){if(Math.abs(t.x-this.centerX)>.1){var e=Math.sign(t.x-this.centerX);this.rotationAngle=180*Math.atan((t.y-this.centerY)/(t.x-this.centerX))/Math.PI+90*e,this.applyRotation()}},e.prototype.applyRotation=function(){var t=this.container.transform.baseVal.getItem(0);t.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(t,0)},e.prototype.rotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM(),n=l.createPoint(t.x,t.y);return{x:(n=n.matrixTransform(e)).x,y:n.y}},e.prototype.unrotatePoint=function(t){if(0===this.rotationAngle)return t;var e=this.container.getCTM();e=e.inverse();var n=l.createPoint(t.x,t.y);return{x:(n=n.matrixTransform(e)).x,y:n.y}},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=l.createGroup();var t=l.createTransform();t.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(t),this.container.appendChild(this.controlBox),this.controlRect=l.createRect(this.width+this.CB_DISTANCE,this.height+this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"],["fill","transparent"],["pointer-events","none"]]),this.controlBox.appendChild(this.controlRect),!0!==this.globalSettings.disableRotation&&(this.rotatorGripLine=l.createLine((this.width+2*this.CB_DISTANCE)/2,this.top-this.CB_DISTANCE,(this.width+2*this.CB_DISTANCE)/2,this.top-3*this.CB_DISTANCE,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.appendChild(this.rotatorGripLine)),this.controlGrips=new x,this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){var t=this.controlBox.transform.baseVal.getItem(0);t.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(t,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),void 0!==this.rotatorGripLine&&(this.rotatorGripLine.setAttribute("x1",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y1",(-this.CB_DISTANCE/2).toString()),this.rotatorGripLine.setAttribute("x2",((this.width+this.CB_DISTANCE)/2).toString()),this.rotatorGripLine.setAttribute("y2",(3*-this.CB_DISTANCE).toString())),this.positionGrips()},e.prototype.addControlGrips=function(){this.controlGrips.topLeft=this.createGrip(),this.controlGrips.topCenter=this.createGrip(),this.controlGrips.topRight=this.createGrip(),this.controlGrips.centerLeft=this.createGrip(),this.controlGrips.centerRight=this.createGrip(),this.controlGrips.bottomLeft=this.createGrip(),this.controlGrips.bottomCenter=this.createGrip(),this.controlGrips.bottomRight=this.createGrip(),!0!==this.globalSettings.disableRotation&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},e.prototype.createGrip=function(){var t=new w;return t.visual.transform.baseVal.appendItem(l.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.controlGrips.topLeft.GRIP_SIZE,e=-t/2,n=e,i=(this.width+this.CB_DISTANCE)/2-t/2,r=(this.height+this.CB_DISTANCE)/2-t/2,o=this.height+this.CB_DISTANCE-t/2,a=this.width+this.CB_DISTANCE-t/2;this.positionGrip(this.controlGrips.topLeft.visual,e,n),this.positionGrip(this.controlGrips.topCenter.visual,i,n),this.positionGrip(this.controlGrips.topRight.visual,a,n),this.positionGrip(this.controlGrips.centerLeft.visual,e,r),this.positionGrip(this.controlGrips.centerRight.visual,a,r),this.positionGrip(this.controlGrips.bottomLeft.visual,e,o),this.positionGrip(this.controlGrips.bottomCenter.visual,i,o),this.positionGrip(this.controlGrips.bottomRight.visual,a,o),void 0!==this.rotatorGrip&&this.positionGrip(this.rotatorGrip.visual,i,n-3*this.CB_DISTANCE)},e.prototype.positionGrip=function(t,e,n){var i=t.transform.baseVal.getItem(0);i.setTranslate(e,n),t.transform.baseVal.replaceItem(i,0)},e.prototype.hideControlBox=function(){this.controlBox.style.display="none"},e.prototype.showControlBox=function(){this.controlBox.style.display=""},e.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:C.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:C.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.left=n.left,this.top=n.top,this.width=n.width,this.height=n.height,this.rotationAngle=n.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(C.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,n.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(C.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,n.containerTransformMatrix))},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n);var i=this.rotatePoint({x:this.left,y:this.top}),r=this.unrotatePoint({x:i.x*e,y:i.y*n});this.left=r.x,this.top=r.y,this.width=this.width*e,this.height=this.height*n,this.adjustControlBox()},e}(b),S=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.opacity=1,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.createVisual=r.createVisual.bind(r),r}return r(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual)},e.prototype.createVisual=function(){this.visual=l.createRect(1,1,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},e.prototype.setSize=function(){t.prototype.setSize.call(this),l.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.visual&&l.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.visual&&l.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.visual&&l.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.visual&&l.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},e.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){var n=e;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.opacity=n.opacity,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize()},e.title="Rectangle marker",e}(k),E=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'')||this;return o.widths=[],o.widthBoxes=[],o.widths=n,o.currentWidth=i,o.setCurrentWidth=o.setCurrentWidth.bind(o),o}return r(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.widths.forEach((function(n){var i=document.createElement("div");i.style.display="flex",i.style.flexGrow="2",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=n===t.currentWidth?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentWidth(n,i)})),e.appendChild(i);var r=document.createElement("div");r.innerText=n.toString(),r.style.marginRight="5px",i.appendChild(r);var o=document.createElement("div");o.style.minHeight="20px",o.style.flexGrow="2",o.style.display="flex",o.style.alignItems="center";var a=document.createElement("hr");a.style.minWidth="20px",a.style.border="0px",a.style.borderTop=n+"px solid "+t.uiStyleSettings.toolboxColor,a.style.flexGrow="2",o.appendChild(a),i.appendChild(o),t.widthBoxes.push(i)})),e},e.prototype.setCurrentWidth=function(t,e){var n=this;this.currentWidth=t,this.widthBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},e}(v),M=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'')||this;return o.styles=[],o.styleBoxes=[],o.styles=n,o.currentStyle=i,o.setCurrentStyle=o.setCurrentStyle.bind(o),o}return r(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",this.styles.forEach((function(n){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.styles.length-5+"%",i.style.borderColor=n===t.currentStyle?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentStyle(n,i)})),e.appendChild(i);var r=document.createElement("div");r.style.minHeight="20px",r.style.flexGrow="2",r.style.overflow="hidden";var o='\n \n ";r.innerHTML=o,i.appendChild(r),t.styleBoxes.push(i)})),e},e.prototype.setCurrentStyle=function(t,e){var n=this;this.currentStyle=t,this.styleBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},e}(v),T=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new y("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new E("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new M("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return r(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="FrameMarker",e.title="Frame marker",e.icon='',e}(S),L=function(){this.defaultColorSet=["#EF4444","#10B981","#2563EB","#FFFF00","#7C3AED","#F472B6","#000000","#FFFFFF"],this.defaultColor=this.defaultColorSet[0],this.defaultFillColor=this.defaultColorSet[0],this.defaultStrokeColor=this.defaultColorSet[7],this.defaultHighlightColor=this.defaultColorSet[3],this.defaultStrokeWidth=3,this.defaultStrokeDasharray="",this.defaultHighlightOpacity=.5,this.defaultFontFamily="Helvetica, Arial, sans-serif",this.defaultStrokeWidths=[1,2,3,5,10],this.defaultStrokeDasharrays=["","3","12 3","9 6 3 6"],this.defaultOpacitySteps=[.1,.25,.5,.75,1],this.displayMode="inline",this.defaultFontFamilies=['Times, "Times New Roman", serif',"Helvetica, Arial, sans-serif",'Courier, "Courier New", monospace',"cursive","fantasy"],this.popupMargin=30,this.newFreehandMarkerOnPointerUp=!1,this.defaultColorsFollowCurrentColors=!1,this.freehandPixelRatio=1,this.disableRotation=!1,this.defaultCaptionFontSize="1rem",this.defaultCaptionText="Text"},A=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.x1=0,r.y1=0,r.x2=0,r.y2=0,r.defaultLength=50,r.manipulationStartX=0,r.manipulationStartY=0,r.manipulationStartX1=0,r.manipulationStartY1=0,r.manipulationStartX2=0,r.manipulationStartY2=0,r.setupControlBox(),r}return r(e,t),e.prototype.ownsTarget=function(e){return!!t.prototype.ownsTarget.call(this,e)||!(!this.grip1.ownsTarget(e)&&!this.grip2.ownsTarget(e))},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.manipulationStartX=e.x,this.manipulationStartY=e.y,"new"===this.state&&(this.x1=e.x,this.y1=e.y,this.x2=e.x,this.y2=e.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,"new"!==this.state&&(this.select(),this.grip1.ownsTarget(n)?this.activeGrip=this.grip1:this.grip2.ownsTarget(n)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},e.prototype.pointerUp=function(e){var n=this.state;t.prototype.pointerUp.call(this,e),"creating"===this.state&&Math.abs(this.x1-this.x2)<10&&Math.abs(this.y1-this.y2)<10?(this.x2=this.x1+this.defaultLength,this.adjustVisual(),this.adjustControlBox()):this.manipulate(e),this._state="select","creating"===n&&this.onMarkerCreated&&this.onMarkerCreated(this)},e.prototype.adjustVisual=function(){},e.prototype.manipulate=function(t){"creating"===this.state?this.resize(t):"move"===this.state?(this.x1=this.manipulationStartX1+t.x-this.manipulationStartX,this.y1=this.manipulationStartY1+t.y-this.manipulationStartY,this.x2=this.manipulationStartX2+t.x-this.manipulationStartX,this.y2=this.manipulationStartY2+t.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):"resize"===this.state&&this.resize(t)},e.prototype.resize=function(t){switch(this.activeGrip){case this.grip1:this.x1=t.x,this.y1=t.y;break;case this.grip2:case void 0:this.x2=t.x,this.y2=t.y}this.adjustVisual(),this.adjustControlBox()},e.prototype.select=function(){t.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},e.prototype.deselect=function(){t.prototype.deselect.call(this),this.controlBox.style.display="none"},e.prototype.setupControlBox=function(){this.controlBox=l.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},e.prototype.adjustControlBox=function(){this.positionGrips()},e.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},e.prototype.createGrip=function(){var t=new w;return t.visual.transform.baseVal.appendItem(l.createTransform()),this.controlBox.appendChild(t.visual),t},e.prototype.positionGrips=function(){var t=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-t/2,this.y1-t/2),this.positionGrip(this.grip2.visual,this.x2-t/2,this.y2-t/2)},e.prototype.positionGrip=function(t,e,n){var i=t.transform.baseVal.getItem(0);i.setTranslate(e,n),t.transform.baseVal.replaceItem(i,0)},e.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},t.prototype.getState.call(this))},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.x1=n.x1,this.y1=n.y1,this.x2=n.x2,this.y2=n.y2},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.x1=this.x1*e,this.y1=this.y1*n,this.x2=this.x2*e,this.y2=this.y2*n,this.adjustVisual(),this.adjustControlBox()},e}(b),D=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.setStrokeColor=r.setStrokeColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new y("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new E("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new M("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return r(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorLine&&e!==this.visibleLine)},e.prototype.createVisual=function(){this.visual=l.createGroup(),this.selectorLine=l.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=l.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.visual.appendChild(this.selectorLine),this.visual.appendChild(this.visibleLine),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"new"===this.state&&(this.createVisual(),this.adjustVisual(),this._state="creating")},e.prototype.adjustVisual=function(){this.selectorLine&&this.visibleLine&&(this.selectorLine.setAttribute("x1",this.x1.toString()),this.selectorLine.setAttribute("y1",this.y1.toString()),this.selectorLine.setAttribute("x2",this.x2.toString()),this.selectorLine.setAttribute("y2",this.y2.toString()),this.visibleLine.setAttribute("x1",this.x1.toString()),this.visibleLine.setAttribute("y1",this.y1.toString()),this.visibleLine.setAttribute("x2",this.x2.toString()),this.visibleLine.setAttribute("y2",this.y2.toString()),l.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),l.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),l.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.createVisual(),this.adjustVisual()},e.typeName="LineMarker",e.title="Line marker",e.icon='',e}(A),P=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'')||this;return o.fonts=[],o.fontBoxes=[],o.fonts=n,o.currentFont=i,o.setCurrentFont=o.setCurrentFont.bind(o),o}return r(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.overflow="hidden",e.style.flexGrow="2",this.fonts.forEach((function(n){var i=document.createElement("div");i.style.display="inline-block",i.style.alignItems="center",i.style.justifyContent="space-between",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.overflow="hidden",i.style.maxWidth=100/t.fonts.length-5+"%",i.style.borderColor=n===t.currentFont?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentFont(n,i)})),e.appendChild(i);var r=document.createElement("div");r.style.display="flex",r.style.minHeight="20px",r.style.flexGrow="2",r.style.fontFamily=n,r.style.overflow="hidden";var o=document.createElement("div");o.style.whiteSpace="nowrap",o.style.overflow="hidden",o.style.textOverflow="ellipsis",o.innerHTML="The quick brown fox jumps over the lazy dog",r.appendChild(o),i.appendChild(r),t.fontBoxes.push(i)})),e},e.prototype.setCurrentFont=function(t,e){var n=this;this.currentFont=t,this.fontBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onFontChanged&&this.onFontChanged(this.currentFont)},e}(v),N=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.color="transparent",r.padding=5,r.DEFAULT_TEXT="请输入文本",r.text=r.DEFAULT_TEXT,r.isMoved=!1,r.color=i.defaultColor,r.fontFamily=i.defaultFontFamily,r.defaultSize={x:100,y:30},r.setColor=r.setColor.bind(r),r.setFont=r.setFont.bind(r),r.renderText=r.renderText.bind(r),r.sizeText=r.sizeText.bind(r),r.textEditDivClicked=r.textEditDivClicked.bind(r),r.showTextEditor=r.showTextEditor.bind(r),r.setSize=r.setSize.bind(r),r.positionTextEditor=r.positionTextEditor.bind(r),r.colorPanel=new y("Color",i.defaultColorSet,i.defaultColor),r.colorPanel.onColorChanged=r.setColor,r.fontFamilyPanel=new P("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r}return r(e,t),e.prototype.ownsTarget=function(e){if(t.prototype.ownsTarget.call(this,e)||e===this.visual||e===this.textElement||e===this.bgRectangle)return!0;var n=!1;return this.textElement.childNodes.forEach((function(t){t===e&&(n=!0)})),n},e.prototype.createVisual=function(){this.visual=l.createGroup(),this.bgRectangle=l.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=l.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(l.createTransform()),this.textElement.transform.baseVal.appendItem(l.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.renderText=function(){var t=this;if(this.textElement){for(;this.textElement.lastChild;)this.textElement.removeChild(this.textElement.lastChild);this.text.split(/\r\n|[\n\v\f\r\x85\u2028\u2029]/).forEach((function(e){t.textElement.appendChild(l.createTSpan(""===e.trim()?" ":e.trim(),[["x","0"],["dy","1.2em"]]))})),setTimeout(this.sizeText,10)}},e.prototype.getTextScale=function(){var t=this.textElement.getBBox(),e=1;if(t.width>0&&t.height>0){var n=(1*this.width-this.width*this.padding*2/100)/t.width,i=(1*this.height-this.height*this.padding*2/100)/t.height;e=Math.min(n,i)}return e},e.prototype.getTextPosition=function(t){var e=this.textElement.getBBox(),n=0,i=0;return e.width>0&&e.height>0&&(n=(this.width-e.width*t)/2,i=this.height/2-e.height*t/2),{x:n,y:i}},e.prototype.sizeText=function(){var t=this.textElement.getBBox(),e=this.getTextScale(),n=this.getTextPosition(e);n.y-=t.y*e,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+n.x+"px, "+n.y+"px) scale("+e+", "+e+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(n.x,n.y),this.textElement.transform.baseVal.getItem(1).setScale(e,e))},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.isMoved=!0,this.setSize(),this.sizeText()},e.prototype.setSize=function(){t.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(l.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),l.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},e.prototype.pointerUp=function(e){var n=this.state;"creating"===n&&(this._suppressMarkerCreateEvent=!0),t.prototype.pointerUp.call(this,e),this.setSize(),("creating"===n||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditor=document.createElement("div"),this.textEditor.style.position="absolute",this.textEditor.style.fontFamily=this.fontFamily,this.textEditor.style.lineHeight="1em",this.textEditor.innerText=this.text,this.textEditor.contentEditable="true",this.textEditor.style.color=this.color,this.textEditor.style.whiteSpace="pre",this.positionTextEditor(),this.textEditor.addEventListener("pointerup",(function(t){t.stopPropagation()})),this.textEditor.addEventListener("input",(function(){for(var e=Number.parseFloat(t.textEditor.style.fontSize);t.textEditor.clientWidth>=Number.parseInt(t.textEditor.style.maxWidth)&&e>.9;)e-=.1,t.textEditor.style.fontSize=Math.max(e,.9)+"em"})),this.textEditor.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditor.addEventListener("paste",(function(t){if(t.clipboardData){var e=t.clipboardData.getData("text"),n=window.getSelection();if(!n.rangeCount)return!1;n.deleteFromDocument(),n.getRangeAt(0).insertNode(document.createTextNode(e)),t.preventDefault()}})),this.textEditDiv.addEventListener("pointerup",(function(){t.textEditDivClicked(t.textEditor.innerText)})),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},e.prototype.positionTextEditor=function(){if("edit"===this.state)if(void 0===this.textEditor)this.showTextEditor();else{this.textElement.style.display="";var t=this.getTextScale(),e=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),n=this.textElement.getBBox(),i={x:n.width*t,y:n.height*t};e.x-=i.x/2,e.y-=i.y/2,this.textEditor.style.top=e.y+"px",this.textEditor.style.left=e.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-e.x+"px",this.textEditor.style.fontSize=Math.max(16*t,12)+"px",this.textElement.style.display="none"}},e.prototype.textEditDivClicked=function(t){this.text=t.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},e.prototype.select=function(){t.prototype.select.call(this),"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText)},e.prototype.deselect=function(){"edit"===this.state&&this.textEditDivClicked(this.textEditor.innerText),t.prototype.deselect.call(this)},e.prototype.dblClick=function(e,n){t.prototype.dblClick.call(this,e,n),this.showTextEditor()},e.prototype.setColor=function(t){this.textElement&&l.setAttributes(this.textElement,[["fill",t]]),this.color=t,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(t)},e.prototype.setFont=function(t){this.textElement&&l.setAttributes(this.textElement,[["font-family",t]]),this.fontFamily=t,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},e.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},e.prototype.showVisual=function(){"edit"===this.state&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){var n=e;this.color=n.color,this.fontFamily=n.fontFamily,this.padding=n.padding,this.text=n.text,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize(),this.sizeText(),this.positionTextEditor()},e.typeName="TextMarker",e.title="Text marker",e.icon='',e}(k),B=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.color="transparent",r.lineWidth=3,r.drawing=!1,r.pixelRatio=1,r.color=i.defaultColor,r.lineWidth=i.defaultStrokeWidth,r.pixelRatio=i.freehandPixelRatio,r.setColor=r.setColor.bind(r),r.addCanvas=r.addCanvas.bind(r),r.finishCreation=r.finishCreation.bind(r),r.setLineWidth=r.setLineWidth.bind(r),r.colorPanel=new y("Color",i.defaultColorSet,i.defaultColor),r.colorPanel.onColorChanged=r.setColor,r.lineWidthPanel=new E("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.lineWidthPanel.onWidthChanged=r.setLineWidth,r}return r(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.drawingImage)},e.prototype.createVisual=function(){this.visual=l.createGroup(),this.drawingImage=l.createImage(),this.visual.appendChild(this.drawingImage);var t=l.createTransform();this.visual.transform.baseVal.appendItem(t),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){"new"===this.state&&(this.addCanvas(),this.createVisual(),this._state="creating"),"creating"===this.state?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(e.x,e.y),this.drawing=!0):t.prototype.pointerDown.call(this,e,n)},e.prototype.manipulate=function(e){"creating"===this.state?this.drawing&&(this.canvasContext.lineTo(e.x,e.y),this.canvasContext.stroke()):t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),l.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),l.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},e.prototype.pointerUp=function(e){"creating"===this._state?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):t.prototype.pointerUp.call(this,e)},e.prototype.addCanvas=function(){this.overlayContainer.innerHTML="",this.canvasElement=document.createElement("canvas"),this.canvasElement.width=this.overlayContainer.clientWidth*this.pixelRatio,this.canvasElement.height=this.overlayContainer.clientHeight*this.pixelRatio,this.canvasContext=this.canvasElement.getContext("2d"),this.canvasContext.scale(this.pixelRatio,this.pixelRatio),this.overlayContainer.appendChild(this.canvasElement)},e.prototype.select=function(){"creating"===this.state&&this.finishCreation(),t.prototype.select.call(this)},e.prototype.deselect=function(){"creating"===this.state&&this.finishCreation(),t.prototype.deselect.call(this)},e.prototype.finishCreation=function(){for(var t=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),e=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],n=e[0],i=e[1],r=e[2],o=e[3],a=!1,s=0;s0&&(a=!0,so&&(o=s),l>r&&(r=l));if(a){this.left=n/this.pixelRatio,this.top=i/this.pixelRatio,this.width=(r-n)/this.pixelRatio,this.height=(o-i)/this.pixelRatio;var c=document.createElement("canvas");c.width=r-n,c.height=o-i,c.getContext("2d").putImageData(this.canvasContext.getImageData(n,i,r-n,o-i),0,0),this.drawingImgUrl=c.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},e.prototype.setDrawingImage=function(){l.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),l.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},e.prototype.setColor=function(t){this.color=t,this.colorChanged(t)},e.prototype.setLineWidth=function(t){this.lineWidth=t},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return"new"===this.state||"creating"===this.state?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({drawingImgUrl:this.drawingImgUrl},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){this.createVisual(),t.prototype.restoreState.call(this,e),this.drawingImgUrl=e.drawingImgUrl,this.setDrawingImage()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setDrawingImage()},e.typeName="FreehandMarker",e.title="Freehand marker",e.icon='',e}(k),_=function(t){function e(e,n,i){var r=t.call(this,e,i||'')||this;return r.typeBoxes=[],r.currentType=n,r.setCurrentType=r.setCurrentType.bind(r),r}return r(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2";for(var n=function(n){var r="both";switch(n){case 0:r="both";break;case 1:r="start";break;case 2:r="end";break;case 3:r="none"}var o=document.createElement("div");if(o.style.display="flex",o.style.flexGrow="2",o.style.alignItems="center",o.style.justifyContent="space-between",o.style.padding="5px",o.style.borderWidth="2px",o.style.borderStyle="solid",o.style.borderColor=r===i.currentType?i.uiStyleSettings.toolboxAccentColor:"transparent",o.addEventListener("click",(function(){t.setCurrentType(r,o)})),e.appendChild(o),"both"===r||"start"===r){var a=document.createElement("div");a.style.display="flex",a.style.alignItems="center",a.style.minHeight="20px",a.innerHTML='\n \n ',a.style.marginLeft="5px",o.appendChild(a)}var s=document.createElement("div");s.style.display="flex",s.style.alignItems="center",s.style.minHeight="20px",s.style.flexGrow="2";var l=document.createElement("hr");if(l.style.minWidth="20px",l.style.border="0px",l.style.borderTop="3px solid "+(void 0!==i.uiStyleSettings?i.uiStyleSettings.toolboxColor:"#eeeeee"),l.style.flexGrow="2",s.appendChild(l),o.appendChild(s),"both"===r||"end"===r){var c=document.createElement("div");c.style.display="flex",c.style.alignItems="center",c.style.minHeight="20px",c.innerHTML='\n \n ',c.style.marginRight="5px",o.appendChild(c)}i.typeBoxes.push(o)},i=this,r=0;r<4;r++)n(r);return e},e.prototype.setCurrentType=function(t,e){var n=this;this.currentType=t,this.typeBoxes.forEach((function(t){t.style.borderColor=t===e?void 0!==n.uiStyleSettings?n.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"})),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},e}(v),I=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.arrowType="end",r.arrowBaseHeight=10,r.arrowBaseWidth=10,r.getArrowPoints=r.getArrowPoints.bind(r),r.setArrowType=r.setArrowType.bind(r),r.arrowTypePanel=new _("Arrow type","end"),r.arrowTypePanel.onArrowTypeChanged=r.setArrowType,r}return r(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.arrow1&&e!==this.arrow2)},e.prototype.getArrowPoints=function(t,e){var n=this.arrowBaseWidth+2*this.strokeWidth,i=this.arrowBaseHeight+2*this.strokeWidth;return t-n/2+","+(e+i/2)+" "+t+","+(e-i/2)+" "+(t+n/2)+","+(e+i/2)},e.prototype.createTips=function(){this.arrow1=l.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(l.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=l.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(l.createTransform()),this.visual.appendChild(this.arrow2)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),"creating"===this.state&&this.createTips()},e.prototype.adjustVisual=function(){if(t.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display="both"===this.arrowType||"start"===this.arrowType?"":"none",this.arrow2.style.display="both"===this.arrowType||"end"===this.arrowType?"":"none",l.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),l.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var e=0;Math.abs(this.x1-this.x2)>.1&&(e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var n=this.arrow1.transform.baseVal.getItem(0);n.setRotate(e,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(n,0);var i=this.arrow2.transform.baseVal.getItem(0);i.setRotate(e+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(i,0)}},e.prototype.setArrowType=function(t){this.arrowType=t,this.adjustVisual(),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({arrowType:this.arrowType},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.arrowType=n.arrowType,this.createTips(),this.adjustVisual()},e.typeName="ArrowMarker",e.title="Arrow marker",e.icon='',e}(D),R=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.fillColor=i.defaultFillColor,r.strokeWidth=0,r.fillPanel=new y("Color",i.defaultColorSet,i.defaultFillColor),r.fillPanel.onColorChanged=r.setFillColor,r}return r(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="CoverMarker",e.title="Cover marker",e.icon='',e}(S),O=function(t){function e(e,n,i,r){var o=t.call(this,e,r||'')||this;return o.opacities=[],o.opacityBoxes=[],o.opacities=n,o.currentOpacity=i,o.setCurrentOpacity=o.setCurrentOpacity.bind(o),o}return r(e,t),e.prototype.getUi=function(){var t=this,e=document.createElement("div");return e.style.display="flex",e.style.overflow="hidden",e.style.flexGrow="2",e.style.justifyContent="space-between",this.opacities.forEach((function(n){var i=document.createElement("div");i.style.display="flex",i.style.alignItems="center",i.style.justifyContent="center",i.style.padding="5px",i.style.borderWidth="2px",i.style.borderStyle="solid",i.style.borderColor=n===t.currentOpacity?t.uiStyleSettings.toolboxAccentColor:"transparent",i.addEventListener("click",(function(){t.setCurrentOpacity(n,i)})),e.appendChild(i);var r=document.createElement("div");r.innerText=100*n+"%",i.appendChild(r),t.opacityBoxes.push(i)})),e},e.prototype.setCurrentOpacity=function(t,e){var n=this;this.currentOpacity=t,this.opacityBoxes.forEach((function(t){t.style.borderColor=t===e?n.uiStyleSettings.toolboxAccentColor:"transparent"})),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},e}(v),F=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.setOpacity=r.setOpacity.bind(r),r.fillColor=i.defaultHighlightColor,r.strokeWidth=0,r.opacity=i.defaultHighlightOpacity,r.fillPanel=new y("Color",i.defaultColorSet,r.fillColor),r.fillPanel.onColorChanged=r.setFillColor,r.opacityPanel=new O("Opacity",i.defaultOpacitySteps,r.opacity),r.opacityPanel.onOpacityChanged=r.setOpacity,r}return r(e,t),e.prototype.setOpacity=function(t){this.opacity=t,this.visual&&l.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="HighlightMarker",e.title="Highlight marker",e.icon='',e}(R),j='',Z='',z=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.bgColor="transparent",r.tipPosition={x:0,y:0},r.tipBase1Position={x:0,y:0},r.tipBase2Position={x:0,y:0},r.tipMoving=!1,r.color=i.defaultStrokeColor,r.bgColor=i.defaultFillColor,r.fontFamily=i.defaultFontFamily,r.defaultSize={x:100,y:30},r.setBgColor=r.setBgColor.bind(r),r.getTipPoints=r.getTipPoints.bind(r),r.positionTip=r.positionTip.bind(r),r.setTipPoints=r.setTipPoints.bind(r),r.colorPanel=new y("Text color",i.defaultColorSet,r.color,j),r.colorPanel.onColorChanged=r.setColor,r.bgColorPanel=new y("Fill color",i.defaultColorSet,r.bgColor,Z),r.bgColorPanel.onColorChanged=r.setBgColor,r.fontFamilyPanel=new P("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r.tipGrip=new w,r.tipGrip.visual.transform.baseVal.appendItem(l.createTransform()),r.controlBox.appendChild(r.tipGrip.visual),r}return r(e,t),e.prototype.ownsTarget=function(e){return t.prototype.ownsTarget.call(this,e)||this.tipGrip.ownsTarget(e)||this.tip===e},e.prototype.createTip=function(){l.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=l.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},e.prototype.pointerDown=function(e,n){"new"===this.state&&t.prototype.pointerDown.call(this,e,n),"creating"===this.state?this.createTip():this.tipGrip.ownsTarget(n)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):t.prototype.pointerDown.call(this,e,n)},e.prototype.pointerUp=function(e){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,t.prototype.pointerUp.call(this,e);else{var n="creating"===this.state;t.prototype.pointerUp.call(this,e),this.setTipPoints(n),this.positionTip()}},e.prototype.manipulate=function(e){if(this.tipMoving){var n=this.unrotatePoint(e);this.tipPosition={x:n.x-this.manipulationStartLeft,y:n.y-this.manipulationStartTop},this.positionTip()}else t.prototype.manipulate.call(this,e)},e.prototype.setBgColor=function(t){this.bgRectangle&&this.tip&&(l.setAttributes(this.bgRectangle,[["fill",t]]),l.setAttributes(this.tip,[["fill",t]])),this.bgColor=t,this.fillColorChanged(t)},e.prototype.getTipPoints=function(){return this.setTipPoints("creating"===this.state),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},e.prototype.setTipPoints=function(t){void 0===t&&(t=!1);var e=Math.min(this.height/2,15),n=this.height/5;t&&(this.tipPosition={x:e+n/2,y:this.height+20});var i=Math.atan(this.height/2/(this.width/2));this.tipPosition.x=this.width/2&&this.tipPosition.y=this.width/2&&this.tipPosition.y>=this.height/2?i.1)){var e=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),n=this.tip1.transform.baseVal.getItem(0);n.setRotate(e,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(n,0);var i=this.tip2.transform.baseVal.getItem(0);i.setRotate(e+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(i,0)}},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e),this.createTips(),this.adjustVisual()},e.typeName="MeasurementMarker",e.title="Measurement marker",e.icon='',e}(D),G=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.strokePanel.colors=i.defaultColorSet,r.fillColor="transparent",r}return r(e,t),Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=t.prototype.getState.call(this);return n.typeName=e.typeName,n},e.typeName="EllipseFrameMarker",e.title="Ellipse frame marker",e.icon='',e}(H),V=function(){function t(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),t.prototype.addUndoStep=function(t){0!==this.undoStack.length&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(t)||(this.undoStack.push(t),JSON.stringify(this.lastRedoStep)!==JSON.stringify(t)&&this.redoStack.splice(0,this.redoStack.length))},t.prototype.replaceLastUndoStep=function(t){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=t)},t.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},t.prototype.undo=function(){if(this.undoStack.length>1){var t=this.undoStack.pop();return void 0!==t&&this.redoStack.push(t),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},t.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},t}(),U=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.curveX=0,r.curveY=0,r.manipulationStartCurveX=0,r.manipulationStartCurveY=0,r.setStrokeColor=r.setStrokeColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.positionGrips=r.positionGrips.bind(r),r.addControlGrips=r.addControlGrips.bind(r),r.adjustVisual=r.adjustVisual.bind(r),r.setupControlBox=r.setupControlBox.bind(r),r.resize=r.resize.bind(r),r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.strokePanel=new y("Line color",i.defaultColorSet,i.defaultColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.strokeWidthPanel=new E("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new M("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r}return r(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.selectorCurve&&e!==this.visibleCurve&&!this.curveGrip.ownsTarget(e))},e.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},e.prototype.createVisual=function(){this.visual=l.createGroup(),this.selectorCurve=l.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=l.createPath(this.getPathD(),[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["fill","transparent"]]),this.visual.appendChild(this.selectorCurve),this.visual.appendChild(this.visibleCurve),this.addMarkerVisualToContainer(this.visual)},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,"new"===this.state&&(this.curveX=e.x,this.curveY=e.y),"new"===this.state?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(n)&&(this.activeGrip=this.curveGrip,this._state="resize")},e.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),l.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),l.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),l.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},e.prototype.setupControlBox=function(){t.prototype.setupControlBox.call(this),this.curveControlLine1=l.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=l.createLine(this.x2,this.y2,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.controlBox.insertBefore(this.curveControlLine1,this.controlBox.firstChild),this.controlBox.insertBefore(this.curveControlLine2,this.controlBox.firstChild)},e.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,t.prototype.addControlGrips.call(this)},e.prototype.positionGrips=function(){t.prototype.positionGrips.call(this);var e=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-e/2,this.curveY-e/2),this.curveControlLine1&&this.curveControlLine2&&(this.curveControlLine1.setAttribute("x1",this.x1.toString()),this.curveControlLine1.setAttribute("y1",this.y1.toString()),this.curveControlLine1.setAttribute("x2",this.curveX.toString()),this.curveControlLine1.setAttribute("y2",this.curveY.toString()),this.curveControlLine2.setAttribute("x1",this.x2.toString()),this.curveControlLine2.setAttribute("y1",this.y2.toString()),this.curveControlLine2.setAttribute("x2",this.curveX.toString()),this.curveControlLine2.setAttribute("y2",this.curveY.toString()))},e.prototype.manipulate=function(e){"move"===this.state&&(this.curveX=this.manipulationStartCurveX+e.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+e.y-this.manipulationStartY),t.prototype.manipulate.call(this,e)},e.prototype.resize=function(e){this.activeGrip===this.curveGrip&&(this.curveX=e.x,this.curveY=e.y),t.prototype.resize.call(this,e),"creating"===this.state&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.adjustVisual(),this.colorChanged(t)},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.adjustVisual()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.adjustVisual()},e.prototype.scale=function(e,n){this.curveX=this.curveX*e,this.curveY=this.curveY*n,t.prototype.scale.call(this,e,n)},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var n=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},t.prototype.getState.call(this));return n.typeName=e.typeName,n},e.prototype.restoreState=function(e){t.prototype.restoreState.call(this,e);var n=e;this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.curveX=n.curveX,this.curveY=n.curveY,this.createVisual(),this.adjustVisual()},e.typeName="CurveMarker",e.title="Curve marker",e.icon='',e}(A),q=function(t){function e(e,n,i){var r=t.call(this,e,n,i)||this;return r.fillColor="transparent",r.strokeColor="transparent",r.strokeWidth=0,r.strokeDasharray="",r.textColor="transparent",r.fontSize="1rem",r.isMoved=!1,r.captionText="Caption",r.PADDING=5,r.captionBoxWidth=0,r.captionBoxHeight=0,r.strokeColor=i.defaultColor,r.strokeWidth=i.defaultStrokeWidth,r.strokeDasharray=i.defaultStrokeDasharray,r.fillColor=i.defaultFillColor,r.textColor=i.defaultStrokeColor,r.fontFamily=i.defaultFontFamily,r.fontSize=i.defaultCaptionFontSize,r.captionText=i.defaultCaptionText,r.setStrokeColor=r.setStrokeColor.bind(r),r.setFillColor=r.setFillColor.bind(r),r.setStrokeWidth=r.setStrokeWidth.bind(r),r.setStrokeDasharray=r.setStrokeDasharray.bind(r),r.createVisual=r.createVisual.bind(r),r.sizeCaption=r.sizeCaption.bind(r),r.setCaptionText=r.setCaptionText.bind(r),r.showTextEditor=r.showTextEditor.bind(r),r.positionTextEditor=r.positionTextEditor.bind(r),r.finishTextEditing=r.finishTextEditing.bind(r),r.setFont=r.setFont.bind(r),r.setTextColor=r.setTextColor.bind(r),r.strokePanel=new y("Line color",s(i.defaultColorSet,["transparent"]),r.strokeColor),r.strokePanel.onColorChanged=r.setStrokeColor,r.fillPanel=new y("Fill color",s(i.defaultColorSet,["transparent"]),r.fillColor,Z),r.fillPanel.onColorChanged=r.setFillColor,r.strokeWidthPanel=new E("Line width",i.defaultStrokeWidths,i.defaultStrokeWidth),r.strokeWidthPanel.onWidthChanged=r.setStrokeWidth,r.strokeStylePanel=new M("Line style",i.defaultStrokeDasharrays,i.defaultStrokeDasharray),r.strokeStylePanel.onStyleChanged=r.setStrokeDasharray,r.fontFamilyPanel=new P("Font",i.defaultFontFamilies,i.defaultFontFamily),r.fontFamilyPanel.onFontChanged=r.setFont,r.textColorPanel=new y("Text color",i.defaultColorSet,r.textColor,j),r.textColorPanel.onColorChanged=r.setTextColor,r}return r(e,t),e.prototype.ownsTarget=function(e){return!(!t.prototype.ownsTarget.call(this,e)&&e!==this.visual&&e!==this.frame&&e!==this.captionBg&&e!==this.captionElement)},e.prototype.createVisual=function(){this.visual=l.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=l.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=l.createText([["fill",this.textColor],["font-family",this.fontFamily]]),this.captionElement.style.fontSize=this.fontSize,this.captionElement.style.textAnchor="start",this.captionElement.style.dominantBaseline="text-before-edge",this.captionElement.textContent=this.captionText,this.visual.appendChild(this.captionElement),this.frame=l.createRect(this.width,this.height,[["fill","transparent"],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray]]),this.visual.appendChild(this.frame),this.sizeCaption()},e.prototype.setCaptionText=function(t){this.captionText=t,this.captionElement.textContent=this.captionText,this.sizeCaption()},e.prototype.pointerDown=function(e,n){t.prototype.pointerDown.call(this,e,n),this.isMoved=!1,this.pointerDownPoint=e,this.pointerDownTimestamp=Date.now(),"new"===this.state&&(this.createVisual(),this.moveVisual(e),this._state="creating")},e.prototype.manipulate=function(e){t.prototype.manipulate.call(this,e),void 0!==this.pointerDownPoint&&(this.isMoved=Math.abs(e.x-this.pointerDownPoint.x)>5||Math.abs(e.y-this.pointerDownPoint.y)>5)},e.prototype.resize=function(e){t.prototype.resize.call(this,e),this.setSize()},e.prototype.sizeCaption=function(){var t=this.captionElement.getBBox();""!==this.captionText.trim()?(this.captionBoxWidth=t.width+2*this.PADDING,this.captionBoxHeight=t.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),l.setAttributes(this.captionBg,[["width",this.captionBoxWidth.toString()],["height",this.captionBoxHeight.toString()],["clip-path","path('M0,0 H"+this.width+" V"+this.height+" H"+-this.width+" Z')"]]),l.setAttributes(this.captionElement,[["x",this.PADDING.toString()],["y",this.PADDING.toString()],["clip-path","path('M0,0 H"+(this.width-this.PADDING)+" V"+this.height+" H"+(-this.width-this.PADDING)+" Z')"]])},e.prototype.showTextEditor=function(){var t=this;this._state="edit",this.overlayContainer.innerHTML="",this.textEditDiv=document.createElement("div"),this.textEditDiv.style.flexGrow="2",this.textEditDiv.style.alignItems="center",this.textEditDiv.style.justifyContent="center",this.textEditDiv.style.pointerEvents="auto",this.textEditDiv.style.overflow="hidden",this.textEditBox=document.createElement("input"),this.textEditBox.style.position="absolute",this.textEditBox.style.width=this.width+"px",this.captionBoxHeight>0&&(this.textEditBox.style.height=this.captionBoxHeight+"px"),this.textEditBox.style.fontSize=this.fontSize,this.textEditBox.style.fontFamily=this.fontFamily,this.textEditBox.style.backgroundColor=this.fillColor,this.textEditBox.style.color=this.textColor,this.textEditBox.style.borderWidth="0",this.textEditBox.setAttribute("value",this.captionText),this.textEditBox.select(),this.textEditDiv.appendChild(this.textEditBox),this.overlayContainer.appendChild(this.textEditDiv),this.textEditBox.addEventListener("pointerup",(function(t){t.stopPropagation()})),this.textEditBox.addEventListener("keypress",(function(e){"Enter"===e.key&&t.finishTextEditing(t.textEditBox.value)})),this.textEditBox.addEventListener("keyup",(function(t){t.cancelBubble=!0})),this.textEditBox.addEventListener("blur",(function(){t.finishTextEditing(t.textEditBox.value)})),this.textEditDiv.addEventListener("pointerup",(function(){t.finishTextEditing(t.textEditBox.value)})),this.positionTextEditor(),this.textEditBox.focus()},e.prototype.positionTextEditor=function(){"edit"===this.state&&(void 0===this.textEditBox?this.showTextEditor():(this.textEditBox.style.left=this.left+"px",this.textEditBox.style.top=this.top+"px",this.textEditBox.style.transform="rotate("+this.rotationAngle+"deg)",this.textEditBox.style.transformOrigin=this.width/2+"px "+this.height/2+"px"))},e.prototype.finishTextEditing=function(t){this.setCaptionText(t.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},e.prototype.setFont=function(t){this.captionElement&&l.setAttributes(this.captionElement,[["font-family",t]]),this.fontFamily=t,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},e.prototype.setTextColor=function(t){this.captionElement&&l.setAttributes(this.captionElement,[["fill",t]]),this.textColor=t,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},e.prototype.setSize=function(){t.prototype.setSize.call(this),l.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},e.prototype.pointerUp=function(e){t.prototype.pointerUp.call(this,e),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},e.prototype.dblClick=function(e,n){t.prototype.dblClick.call(this,e,n),this.showTextEditor()},e.prototype.setStrokeColor=function(t){this.strokeColor=t,this.frame&&l.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(t),this.stateChanged()},e.prototype.setFillColor=function(t){this.fillColor=t,this.captionBg&&l.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(t),this.stateChanged()},e.prototype.setStrokeWidth=function(t){this.strokeWidth=t,this.frame&&l.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},e.prototype.setStrokeDasharray=function(t){this.strokeDasharray=t,this.frame&&l.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(e.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),e.prototype.getState=function(){var e=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:1,textColor:this.textColor,fontFamily:this.fontFamily,fontSize:this.fontSize,captionText:this.captionText},t.prototype.getState.call(this));return e.typeName=this.typeName,e},e.prototype.restoreState=function(e){var n=e;this.fillColor=n.fillColor,this.strokeColor=n.strokeColor,this.strokeWidth=n.strokeWidth,this.strokeDasharray=n.strokeDasharray,this.textColor=n.textColor,this.fontFamily=n.fontFamily,this.captionText=n.captionText,this.fontSize=n.fontSize,this.createVisual(),t.prototype.restoreState.call(this,e),this.setSize()},e.prototype.scale=function(e,n){t.prototype.scale.call(this,e,n),this.setSize()},e.typeName="CaptionFrameMarker",e.title="Caption frame marker",e.icon='',e}(k),K=function(){function t(t,e){void 0===e&&(e=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=t,this.cancelable=e}return Object.defineProperty(t.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),t.prototype.preventDefault=function(){this._defaultPrevented=!0},t}(),Y=function(t){function e(e,n,i){var r=t.call(this,e,!1)||this;return r.dataUrl=n,r.state=i,r}return r(e,t),e}(K),X=function(t){function e(e,n,i){void 0===i&&(i=!1);var r=t.call(this,e,i)||this;return r.marker=n,r}return r(e,t),e}(K),J=function(){function t(){this.render=[],this.beforeclose=[],this.close=[],this.show=[],this.restorestate=[],this.statechange=[],this.markerselect=[],this.markerdeselect=[],this.markercreating=[],this.markercreate=[],this.markerbeforedelete=[],this.markerdelete=[],this.markerchange=[],this.focus=[],this.blur=[]}return t.prototype.addEventListener=function(t,e){this[t].push(e)},t.prototype.removeEventListener=function(t,e){var n=this[t].indexOf(e);n>-1&&this[t].splice(n,1)},t}(),Q=function(){function t(e){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new L,this._isOpen=!1,this.undoRedoManager=new V,this.renderAtNaturalSize=!1,this.renderImageType="image/png",this.renderMarkersOnly=!1,this.zoomSteps=[1,1.5,2,4],this._zoomLevel=1,this._isResizing=!1,this.prevPanPoint={x:0,y:0},this.eventListeners=new J,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=t.instanceCounter++,this.styles=new d(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=e,this.targetRoot=document.body,this.width=e.clientWidth,this.height=e.clientHeight,this.styles.removeStyleSheet(),this.open=this.open.bind(this),this.setTopLeft=this.setTopLeft.bind(this),this.toolbarButtonClicked=this.toolbarButtonClicked.bind(this),this.createNewMarker=this.createNewMarker.bind(this),this.addNewMarker=this.addNewMarker.bind(this),this.markerCreated=this.markerCreated.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this),this.onPointerDown=this.onPointerDown.bind(this),this.onDblClick=this.onDblClick.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOut=this.onPointerOut.bind(this),this.onKeyUp=this.onKeyUp.bind(this),this.overrideOverflow=this.overrideOverflow.bind(this),this.restoreOverflow=this.restoreOverflow.bind(this),this.close=this.close.bind(this),this.closeUI=this.closeUI.bind(this),this.addCloseEventListener=this.addCloseEventListener.bind(this),this.removeCloseEventListener=this.removeCloseEventListener.bind(this),this.addRenderEventListener=this.addRenderEventListener.bind(this),this.removeRenderEventListener=this.removeRenderEventListener.bind(this),this.clientToLocalCoordinates=this.clientToLocalCoordinates.bind(this),this.onWindowResize=this.onWindowResize.bind(this),this.deleteSelectedMarker=this.deleteSelectedMarker.bind(this),this.setWindowHeight=this.setWindowHeight.bind(this),this.removeMarker=this.removeMarker.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this),this.onPopupTargetResize=this.onPopupTargetResize.bind(this),this.showNotesEditor=this.showNotesEditor.bind(this),this.hideNotesEditor=this.hideNotesEditor.bind(this),this.stepZoom=this.stepZoom.bind(this),this.focus=this.focus.bind(this),this.blur=this.blur.bind(this),this.markerStateChanged=this.markerStateChanged.bind(this),this.switchToSelectMode=this.switchToSelectMode.bind(this),this.addDefs=this.addDefs.bind(this),this.addDefsToImage=this.addDefsToImage.bind(this)}return Object.defineProperty(t.prototype,"ALL_MARKER_TYPES",{get:function(){return[T,B,I,N,G,H,F,z,W,R,D,U,q]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[T,B,I,N,H,F,z]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BASIC_MARKER_TYPES",{get:function(){return[T,B,I,N,F]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(t){var e=this;this._availableMarkerTypes.splice(0),t.forEach((function(t){if("string"==typeof t){var n=e.ALL_MARKER_TYPES.find((function(e){return e.typeName===t}));void 0!==n&&e._availableMarkerTypes.push(n)}else e._availableMarkerTypes.push(t)}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(t){this._zoomLevel=t,this.editorCanvas&&this.contentDiv&&(this.editorCanvas.style.transform="scale("+this._zoomLevel+")",this.contentDiv.scrollTo({left:(this.editorCanvas.clientWidth*this._zoomLevel-this.contentDiv.clientWidth)/2,top:(this.editorCanvas.clientHeight*this._zoomLevel-this.contentDiv.clientHeight)/2}))},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),t.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),"popup"===this.settings.displayMode&&this.onPopupTargetResize(),c.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},t.prototype.show=function(){var t=this;void 0===this.styles.styleSheetRoot&&void 0!==h.styleSheetRoot&&(this.styles.styleSheetRoot=h.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach((function(e){return e(new K(t))}))},t.prototype.render=function(){return o(this,void 0,void 0,(function(){var t;return a(this,(function(e){switch(e.label){case 0:return this.setCurrentMarker(),(t=new u).naturalSize=this.renderAtNaturalSize,t.imageType=this.renderImageType,t.imageQuality=this.renderImageQuality,t.markersOnly=this.renderMarkersOnly,t.width=this.renderWidth,t.height=this.renderHeight,[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return e.sent(),[4,t.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,e.sent()]}}))}))},t.prototype.close=function(t){var e=this;if(void 0===t&&(t=!1),this.isOpen){var n=!1;t||this.eventListeners.beforeclose.forEach((function(t){var i=new K(e,!0);t(i),i.defaultPrevented&&(n=!0)})),n||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),"popup"===this.settings.displayMode&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach((function(t){return t(new K(e))})),this.detachEvents(),this._isOpen=!1)}},t.prototype.addMarkersToToolbar=function(){for(var t,e=[],n=0;nthis.editorCanvas.clientHeight?this.editorCanvas.clientHeight*t:this.editorCanvas.clientWidth,n=e',t.title="Powered by marker.js",t.style.display="grid",t.style.alignItems="center",t.style.justifyItems="center",t.style.padding="3px",t.style.width="20px",t.style.height="20px",this.logoUI.appendChild(t),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},t.prototype.positionLogo=function(){this.logoUI&&("right"!==this.uiStyleSettings.logoPosition?this.logoUI.style.left=this.markerImageHolder.offsetLeft+10+"px":this.logoUI.style.left=this.markerImageHolder.offsetLeft+this.markerImageHolder.offsetWidth-this.logoUI.clientWidth-10+"px",this.logoUI.style.top=this.markerImageHolder.offsetTop+this.markerImageHolder.offsetHeight-this.logoUI.clientHeight-10+"px")},t.prototype.overrideOverflow=function(){this.scrollXState=window.scrollX,this.scrollYState=window.scrollY,this.bodyOverflowState=document.body.style.overflow,window.scroll({top:0,left:0}),document.body.style.overflow="hidden"},t.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},t.prototype.showUI=function(){switch("popup"===this.settings.displayMode&&this.overrideOverflow(),this.coverDiv=document.createElement("div"),this.coverDiv.style.visibility=this._silentRenderMode?"hidden":"visible",this.coverDiv.className=this.styles.classNamePrefixBase+" "+this.styles.classNamePrefix,this.coverDiv.style.fontSize="16px",this.coverDiv.style.userSelect="none",this.settings.displayMode){case"inline":this.coverDiv.style.position="absolute";var t=void 0!==this.settings.uiOffsetTop?this.target.offsetTop+this.settings.uiOffsetTop:this.target.offsetTop>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"5";break;case"popup":this.coverDiv.style.position="absolute",this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=window.innerHeight+"px",this.coverDiv.style.backgroundColor="rgba(0, 0, 0, 0.75)",this.coverDiv.style.zIndex=void 0!==this.uiStyleSettings.zIndex?this.uiStyleSettings.zIndex:"1000",this.coverDiv.style.display="flex"}this.targetRoot.appendChild(this.coverDiv),this.uiDiv=document.createElement("div"),this.uiDiv.style.display="flex",this.uiDiv.style.flexDirection="column",this.uiDiv.style.flexGrow="2",this.uiDiv.style.margin="popup"===this.settings.displayMode?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new m(this.uiDiv,this.settings.displayMode,this._availableMarkerTypes,this.uiStyleSettings,this.styles),this.toolbar.addButtonClickListener(this.toolbarButtonClicked),this.toolbar.show(this._silentRenderMode||this.uiStyleSettings.hideToolbar?"hidden":"visible"),this.contentDiv=document.createElement("div"),this.contentDiv.style.display="flex",this.contentDiv.style.flexDirection="row",this.contentDiv.style.flexGrow="2",this.contentDiv.style.flexShrink="1","popup"===this.settings.displayMode&&(this.contentDiv.style.backgroundColor=this.uiStyleSettings.canvasBackgroundColor,this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.uiStyleSettings.toolbarHeight+"px",this.contentDiv.style.maxWidth="calc(100vw - "+2*this.settings.popupMargin+"px)"),this.contentDiv.style.overflow="auto",this.uiDiv.appendChild(this.contentDiv),this.editorCanvas=document.createElement("div"),this.editorCanvas.style.flexGrow="2",this.editorCanvas.style.flexShrink="1",this.editorCanvas.style.position="relative",this.editorCanvas.style.overflow="hidden",this.editorCanvas.style.display="flex","popup"===this.settings.displayMode&&(this.editorCanvas.style.alignItems="center",this.editorCanvas.style.justifyContent="center"),this.editorCanvas.style.pointerEvents="none",this.editorCanvas.style.transformOrigin="left top",this.editorCanvas.style.transform="scale("+this.zoomLevel+")",this.contentDiv.appendChild(this.editorCanvas),this.editingTarget=this.target instanceof HTMLImageElement?document.createElement("img"):document.createElement("canvas"),void 0===this.settings.uiOffsetTop&&this.target.offsetTop-1&&this.markers.splice(this.markers.indexOf(t),1),t.dispose()},t.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),void 0!==this._currentMarker&&("new"!==this._currentMarker.state?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},t.prototype.toolbarButtonClicked=function(t,e){if("marker"===t&&void 0!==e)this.createNewMarker(e);else if("action"===t)switch(e){case"select":this.switchToSelectMode(),this.switchToSelectMode();break;case"delete":this.deleteSelectedMarker();break;case"clear":this.clear();break;case"undo":this.undo();break;case"redo":this.redo();break;case"zoom":this.stepZoom();break;case"zoom-out":this.zoomLevel=1;break;case"notes":void 0===this.notesArea?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},t.prototype.deleteSelectedMarker=function(){var t=this;if(void 0!==this._currentMarker){var e=!1;if(this.eventListeners.markerbeforedelete.forEach((function(n){var i=new X(t,t._currentMarker,!0);n(i),i.defaultPrevented&&(e=!0)})),!e){var n=this._currentMarker;this._currentMarker.dispose(),this.markerImage.removeChild(this._currentMarker.container),this.markers.splice(this.markers.indexOf(this._currentMarker),1),this.setCurrentMarker(),this.addUndoStep(),this.eventListeners.markerdelete.forEach((function(e){return e(new X(t,n))}))}}},t.prototype.clear=function(){var t=this,e=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach((function(n){var i=new X(t,void 0,!0);n(i),i.defaultPrevented&&(e=!0)})),!e)){this.setCurrentMarker();for(var n=function(e){var n=i.markers[e];i.setCurrentMarker(i.markers[e]),i._currentMarker.dispose(),i.markerImage.removeChild(i._currentMarker.container),i.markers.splice(i.markers.indexOf(i._currentMarker),1),i.eventListeners.markerdelete.forEach((function(e){return e(new X(t,n))}))},i=this,r=this.markers.length-1;r>=0;r--)n(r);this.addUndoStep()}},Object.defineProperty(t.prototype,"isNotesAreaOpen",{get:function(){return void 0!==this.notesArea},enumerable:!1,configurable:!0}),t.prototype.showNotesEditor=function(){var t;void 0!==this._currentMarker&&(this.overlayContainer.innerHTML="",this.notesArea=document.createElement("textarea"),this.notesArea.className=this.uiStyleSettings.notesAreaStyleClassName,this.notesArea.style.pointerEvents="auto",this.notesArea.style.alignSelf="stretch",this.notesArea.style.width="100%",this.notesArea.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.notesArea.value=null!==(t=this._currentMarker.notes)&&void 0!==t?t:"",this.overlayContainer.appendChild(this.notesArea))},t.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(void 0!==this._currentMarker&&(this._currentMarker.notes=""!==this.notesArea.value.trim()?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},t.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},t.prototype.addUndoStep=function(){var t=this;if(void 0===this._currentMarker||"edit"!==this._currentMarker.state){var e=this.getState(),n=this.undoRedoManager.getLastUndoStep();if(!n||n.width===e.width&&n.height===e.height){var i=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(e),i1&&this.panTo({x:t.clientX,y:t.clientY}))},t.prototype.onPointerUp=function(t){this.touchPoints>0&&this.touchPoints--,0===this.touchPoints&&this.isDragging&&void 0!==this._currentMarker&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(t.clientX,t.clientY)),this.isDragging=!1,this.addUndoStep()},t.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},t.prototype.onKeyUp=function(t){void 0===this._currentMarker||void 0!==this.notesArea||"Delete"!==t.key&&"Backspace"!==t.key||this.deleteSelectedMarker()},t.prototype.clientToLocalCoordinates=function(t,e){var n=this.markerImage.getBoundingClientRect();return{x:(t-n.left)/this.zoomLevel,y:(e-n.top)/this.zoomLevel}},t.prototype.onWindowResize=function(){this.positionUI()},t.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var t=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=t+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px";break;case"popup":this.coverDiv.style.top="0px",this.coverDiv.style.left="0px",this.coverDiv.style.width="100vw",this.coverDiv.style.height=this.windowHeight+"px",this.contentDiv.style.maxHeight=this.windowHeight-2*this.settings.popupMargin-3.5*this.styles.settings.toolbarHeight+"px"}this.positionMarkerImage(),this.positionLogo()},t.prototype.addLicenseKey=function(t){c.addKey(t)},t.prototype.addEventListener=function(t,e){this.eventListeners.addEventListener(t,e)},t.prototype.removeEventListener=function(t,e){this.eventListeners.removeEventListener(t,e)},t.prototype.renderState=function(t){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(t),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),t.prototype.focus=function(){var t=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,void 0!==this._previousCurrentMarker&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach((function(e){return e(new K(t))})))},t.prototype.blur=function(){var t=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach((function(e){return e(new K(t))})))},t.instanceCounter=0,t}()},66042:function(t,e,n){"use strict";n.d(e,{Z:function(){return T}});var i=n(33885),r=n(42978),o=n(43403),a=n(34280),s=n(59301),l=s.createContext(null),c=s.createContext({}),u=l,h=n(20068),d=n(54476),p=n(92310),f=n.n(p),m=n(77900),g=n(10228),v=n(26112),y=n(75931),b=n(8654),x=["prefixCls","className","containerRef"];var w=function(t){var e=t.prefixCls,n=t.className,i=t.containerRef,r=(0,y.Z)(t,x),o=s.useContext(c).panel,a=(0,b.x1)(o,i);return s.createElement("div",(0,d.Z)({className:f()("".concat(e,"-content"),n),role:"dialog",ref:a},(0,v.Z)(t,{aria:!0}),{"aria-modal":"true"},r))},C=n(48736);function k(t){return"string"==typeof t&&String(Number(t))===t?((0,C.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(t)):t}var S={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function E(t,e){var n,o,a,l=t.prefixCls,c=t.open,p=t.placement,y=t.inline,b=t.push,x=t.forceRender,C=t.autoFocus,E=t.keyboard,M=t.classNames,T=t.rootClassName,L=t.rootStyle,A=t.zIndex,D=t.className,P=t.id,N=t.style,B=t.motion,_=t.width,I=t.height,R=t.children,O=t.mask,F=t.maskClosable,j=t.maskMotion,Z=t.maskClassName,z=t.maskStyle,H=t.afterOpenChange,W=t.onClose,G=t.onMouseEnter,V=t.onMouseOver,U=t.onMouseLeave,q=t.onClick,K=t.onKeyDown,Y=t.onKeyUp,X=t.styles,J=t.drawerRender,Q=s.useRef(),$=s.useRef(),tt=s.useRef();s.useImperativeHandle(e,(function(){return Q.current}));s.useEffect((function(){var t;c&&C&&(null===(t=Q.current)||void 0===t||t.focus({preventScroll:!0}))}),[c]);var et=s.useState(!1),nt=(0,r.Z)(et,2),it=nt[0],rt=nt[1],ot=s.useContext(u),at=null!==(n=null!==(o=null===(a="boolean"==typeof b?b?{}:{distance:0}:b||{})||void 0===a?void 0:a.distance)&&void 0!==o?o:null==ot?void 0:ot.pushDistance)&&void 0!==n?n:180,st=s.useMemo((function(){return{pushDistance:at,push:function(){rt(!0)},pull:function(){rt(!1)}}}),[at]);s.useEffect((function(){var t,e;c?null==ot||null===(t=ot.push)||void 0===t||t.call(ot):null==ot||null===(e=ot.pull)||void 0===e||e.call(ot)}),[c]),s.useEffect((function(){return function(){var t;null==ot||null===(t=ot.pull)||void 0===t||t.call(ot)}}),[]);var lt=O&&s.createElement(m.default,(0,d.Z)({key:"mask"},j,{visible:c}),(function(t,e){var n=t.className,r=t.style;return s.createElement("div",{className:f()("".concat(l,"-mask"),n,null==M?void 0:M.mask,Z),style:(0,i.Z)((0,i.Z)((0,i.Z)({},r),z),null==X?void 0:X.mask),onClick:F&&c?W:void 0,ref:e})})),ct="function"==typeof B?B(p):B,ut={};if(it&&at)switch(p){case"top":ut.transform="translateY(".concat(at,"px)");break;case"bottom":ut.transform="translateY(".concat(-at,"px)");break;case"left":ut.transform="translateX(".concat(at,"px)");break;default:ut.transform="translateX(".concat(-at,"px)")}"left"===p||"right"===p?ut.width=k(_):ut.height=k(I);var ht={onMouseEnter:G,onMouseOver:V,onMouseLeave:U,onClick:q,onKeyDown:K,onKeyUp:Y},dt=s.createElement(m.default,(0,d.Z)({key:"panel"},ct,{visible:c,forceRender:x,onVisibleChanged:function(t){null==H||H(t)},removeOnLeave:!1,leavedClassName:"".concat(l,"-content-wrapper-hidden")}),(function(e,n){var r=e.className,o=e.style,a=s.createElement(w,(0,d.Z)({id:P,containerRef:n,prefixCls:l,className:f()(D,null==M?void 0:M.content),style:(0,i.Z)((0,i.Z)({},N),null==X?void 0:X.content)},(0,v.Z)(t,{aria:!0}),ht),R);return s.createElement("div",(0,d.Z)({className:f()("".concat(l,"-content-wrapper"),null==M?void 0:M.wrapper,r),style:(0,i.Z)((0,i.Z)((0,i.Z)({},ut),o),null==X?void 0:X.wrapper)},(0,v.Z)(t,{data:!0})),J?J(a):a)})),pt=(0,i.Z)({},L);return A&&(pt.zIndex=A),s.createElement(u.Provider,{value:st},s.createElement("div",{className:f()(l,"".concat(l,"-").concat(p),T,(0,h.Z)((0,h.Z)({},"".concat(l,"-open"),c),"".concat(l,"-inline"),y)),style:pt,tabIndex:-1,ref:Q,onKeyDown:function(t){var e=t.keyCode,n=t.shiftKey;switch(e){case g.Z.TAB:var i;if(e===g.Z.TAB)if(n||document.activeElement!==tt.current){if(n&&document.activeElement===$.current){var r;null===(r=tt.current)||void 0===r||r.focus({preventScroll:!0})}}else null===(i=$.current)||void 0===i||i.focus({preventScroll:!0});break;case g.Z.ESC:W&&E&&(t.stopPropagation(),W(t))}}},lt,s.createElement("div",{tabIndex:0,ref:$,style:S,"aria-hidden":"true","data-sentinel":"start"}),dt,s.createElement("div",{tabIndex:0,ref:tt,style:S,"aria-hidden":"true","data-sentinel":"end"})))}var M=s.forwardRef(E);var T=function(t){var e=t.open,n=void 0!==e&&e,l=t.prefixCls,u=void 0===l?"rc-drawer":l,h=t.placement,d=void 0===h?"right":h,p=t.autoFocus,f=void 0===p||p,m=t.keyboard,g=void 0===m||m,v=t.width,y=void 0===v?378:v,b=t.mask,x=void 0===b||b,w=t.maskClosable,C=void 0===w||w,k=t.getContainer,S=t.forceRender,E=t.afterOpenChange,T=t.destroyOnClose,L=t.onMouseEnter,A=t.onMouseOver,D=t.onMouseLeave,P=t.onClick,N=t.onKeyDown,B=t.onKeyUp,_=t.panelRef,I=s.useState(!1),R=(0,r.Z)(I,2),O=R[0],F=R[1];var j=s.useState(!1),Z=(0,r.Z)(j,2),z=Z[0],H=Z[1];(0,a.Z)((function(){H(!0)}),[]);var W=!!z&&n,G=s.useRef(),V=s.useRef();(0,a.Z)((function(){W&&(V.current=document.activeElement)}),[W]);var U=s.useMemo((function(){return{panel:_}}),[_]);if(!S&&!O&&!W&&T)return null;var q={onMouseEnter:L,onMouseOver:A,onMouseLeave:D,onClick:P,onKeyDown:N,onKeyUp:B},K=(0,i.Z)((0,i.Z)({},t),{},{open:W,prefixCls:u,placement:d,autoFocus:f,keyboard:g,width:y,mask:x,maskClosable:C,inline:!1===k,afterOpenChange:function(t){var e,n;(F(t),null==E||E(t),t||!V.current||null!==(e=G.current)&&void 0!==e&&e.contains(V.current))||(null===(n=V.current)||void 0===n||n.focus({preventScroll:!0}))},ref:G},q);return s.createElement(c.Provider,{value:U},s.createElement(o.Z,{open:W||S||O,autoDestroy:!1,getContainer:k,autoLock:x&&(W||O)},s.createElement(M,K)))}},25930:function(t,e,n){"use strict";n.d(e,{Cd:function(){return S}});var i=n(54476),r=n(33885),o=n(75931),a=n(59301),s=n(92310),l=n.n(s),c={percent:0,prefixCls:"rc-progress",strokeColor:"#2db7f5",strokeLinecap:"round",strokeWidth:1,trailColor:"#D9D9D9",trailWidth:1,gapPosition:"bottom"},u=function(){var t=(0,a.useRef)([]),e=(0,a.useRef)(null);return(0,a.useEffect)((function(){var n=Date.now(),i=!1;t.current.forEach((function(t){if(t){i=!0;var r=t.style;r.transitionDuration=".3s, .3s, .3s, .06s",e.current&&n-e.current<100&&(r.transitionDuration="0s, 0s")}})),i&&(e.current=Date.now())})),t.current};var h=n(76190),d=n(42978),p=n(47273),f=0,m=(0,p.Z)();var g=function(t){var e=a.useState(),n=(0,d.Z)(e,2),i=n[0],r=n[1];return a.useEffect((function(){var t;r("rc_progress_".concat((m?(t=f,f+=1):t="TEST_OR_SSR",t)))}),[]),t||i},v=function(t){var e=t.bg,n=t.children;return a.createElement("div",{style:{width:"100%",height:"100%",background:e}},n)};function y(t,e){return Object.keys(t).map((function(n){var i=parseFloat(n),r="".concat(Math.floor(i*e),"%");return"".concat(t[n]," ").concat(r)}))}var b=a.forwardRef((function(t,e){var n=t.prefixCls,i=t.color,r=t.gradientId,o=t.radius,s=t.style,l=t.ptg,c=t.strokeLinecap,u=t.strokeWidth,d=t.size,p=t.gapDegree,f=i&&"object"===(0,h.Z)(i),m=f?"#FFF":void 0,g=d/2,b=a.createElement("circle",{className:"".concat(n,"-circle-path"),r:o,cx:g,cy:g,stroke:m,strokeLinecap:c,strokeWidth:u,opacity:0===l?0:1,style:s,ref:e});if(!f)return b;var x="".concat(r,"-conic"),w=p?"".concat(180+p/2,"deg"):"0deg",C=y(i,(360-p)/360),k=y(i,1),S="conic-gradient(from ".concat(w,", ").concat(C.join(", "),")"),E="linear-gradient(to ".concat(p?"bottom":"top",", ").concat(k.join(", "),")");return a.createElement(a.Fragment,null,a.createElement("mask",{id:x},b),a.createElement("foreignObject",{x:0,y:0,width:d,height:d,mask:"url(#".concat(x,")")},a.createElement(v,{bg:E},a.createElement(v,{bg:S}))))})),x=100,w=function(t,e,n,i,r,o,a,s,l,c){var u=arguments.length>10&&void 0!==arguments[10]?arguments[10]:0,h=n/100*360*((360-o)/360),d=0===o?0:{bottom:0,top:180,left:90,right:-90}[a],p=(100-i)/100*e;"round"===l&&100!==i&&(p+=c/2)>=e&&(p=e-.01);var f=50;return{stroke:"string"==typeof s?s:void 0,strokeDasharray:"".concat(e,"px ").concat(t),strokeDashoffset:p+u,transform:"rotate(".concat(r+h+d,"deg)"),transformOrigin:"".concat(f,"px ").concat(f,"px"),transition:"stroke-dashoffset .3s ease 0s, stroke-dasharray .3s ease 0s, stroke .3s, stroke-width .06s ease .3s, opacity .3s ease 0s",fillOpacity:0}},C=["id","prefixCls","steps","strokeWidth","trailWidth","gapDegree","gapPosition","trailColor","strokeLinecap","style","className","strokeColor","percent"];function k(t){var e=null!=t?t:[];return Array.isArray(e)?e:[e]}var S=function(t){var e,n,s,d=(0,r.Z)((0,r.Z)({},c),t),p=d.id,f=d.prefixCls,m=d.steps,v=d.strokeWidth,y=d.trailWidth,S=d.gapDegree,E=void 0===S?0:S,M=d.gapPosition,T=d.trailColor,L=d.strokeLinecap,A=d.style,D=d.className,P=d.strokeColor,N=d.percent,B=(0,o.Z)(d,C),_=g(p),I="".concat(_,"-gradient"),R=50-v/2,O=2*Math.PI*R,F=E>0?90+E/2:-90,j=O*((360-E)/360),Z="object"===(0,h.Z)(m)?m:{count:m,gap:2},z=Z.count,H=Z.gap,W=k(N),G=k(P),V=G.find((function(t){return t&&"object"===(0,h.Z)(t)})),U=V&&"object"===(0,h.Z)(V)?"butt":L,q=w(O,j,0,100,F,E,M,T,U,v),K=u();return a.createElement("svg",(0,i.Z)({className:l()("".concat(f,"-circle"),D),viewBox:"0 0 ".concat(x," ").concat(x),style:A,id:p,role:"presentation"},B),!z&&a.createElement("circle",{className:"".concat(f,"-circle-trail"),r:R,cx:50,cy:50,stroke:T,strokeLinecap:U,strokeWidth:y||v,style:q}),z?(e=Math.round(z*(W[0]/100)),n=100/z,s=0,new Array(z).fill(null).map((function(t,i){var r=i<=e-1?G[0]:T,o=r&&"object"===(0,h.Z)(r)?"url(#".concat(I,")"):void 0,l=w(O,j,s,n,F,E,M,r,"butt",v,H);return s+=100*(j-l.strokeDashoffset+H)/j,a.createElement("circle",{key:i,className:"".concat(f,"-circle-path"),r:R,cx:50,cy:50,stroke:o,strokeWidth:v,opacity:1,style:l,ref:function(t){K[i]=t}})}))):function(){var t=0;return W.map((function(e,n){var i=G[n]||G[G.length-1],r=w(O,j,t,e,F,E,M,i,U,v);return t+=e,a.createElement(b,{key:n,color:i,ptg:e,radius:R,prefixCls:f,gradientId:I,style:r,strokeLinecap:U,strokeWidth:v,gapDegree:E,ref:function(t){K[n]=t},size:x})})).reverse()}())}},6551:function(t,e,n){"use strict";n.d(e,{ZP:function(){return l}});var i=n(42978),r=n(59301),o=n(47273),a=0,s=(0,o.Z)();function l(t){var e=r.useState(),n=(0,i.Z)(e,2),o=n[0],l=n[1];return r.useEffect((function(){var t;l("rc_select_".concat((s?(t=a,a+=1):t="TEST_OR_SSR",t)))}),[]),t||o}},37463:function(t,e,n){"use strict";n.d(e,{Ac:function(){return tt},Xo:function(){return nt},Wx:function(){return rt},ZP:function(){return Et},lk:function(){return x}});var i=n(54476),r=n(94480),o=n(20068),a=n(33885),s=n(42978),l=n(75931),c=n(76190),u=n(18929),h=n(48736),d=n(59301),p=n(92310),f=n.n(p),m=n(34280),g=n(49658),v=n(8654),y=function(t){var e=t.className,n=t.customizeIcon,i=t.customizeIconProps,r=t.children,o=t.onMouseDown,a=t.onClick,s="function"==typeof n?n(i):n;return d.createElement("span",{className:e,onMouseDown:function(t){t.preventDefault(),null==o||o(t)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:a,"aria-hidden":!0},void 0!==s?s:d.createElement("span",{className:f()(e.split(/\s+/).map((function(t){return"".concat(t,"-icon")})))},r))},b=d.createContext(null);function x(){return d.useContext(b)}function w(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:250,e=d.useRef(null),n=d.useRef(null);function i(i){(i||null===e.current)&&(e.current=i),window.clearTimeout(n.current),n.current=window.setTimeout((function(){e.current=null}),t)}return d.useEffect((function(){return function(){window.clearTimeout(n.current)}}),[]),[function(){return e.current},i]}var C=n(10228);var k=n(26112),S=n(83836);var E=function(t,e,n){var i=(0,a.Z)((0,a.Z)({},t),n?e:{});return Object.keys(e).forEach((function(n){var r=e[n];"function"==typeof r&&(i[n]=function(){for(var e,i=arguments.length,o=new Array(i),a=0;aT&&(o="".concat(a.slice(0,T),"..."))}var s=function(e){e&&e.stopPropagation(),O(t)};return"function"==typeof I?rt(i,o,e,r,s):it(t,o,e,r,s)},renderRest:function(t){if(!a.length)return null;var e="function"==typeof P?P(t):P;return"function"==typeof I?rt(void 0,e,!1,!1,void 0,!0):it({title:e},e,!1)},suffix:ot,itemKey:B,maxCount:M});return d.createElement("span",{className:"".concat(tt,"-wrap")},at,!a.length&&!et&&d.createElement("span",{className:"".concat(tt,"-placeholder")},p))},R=function(t){var e=t.inputElement,n=t.prefixCls,i=t.id,r=t.inputRef,o=t.disabled,a=t.autoFocus,l=t.autoComplete,c=t.activeDescendantId,u=t.mode,h=t.open,p=t.values,f=t.placeholder,m=t.tabIndex,g=t.showSearch,v=t.searchValue,y=t.activeValue,b=t.maxLength,x=t.onInputKeyDown,w=t.onInputMouseDown,C=t.onInputChange,S=t.onInputPaste,E=t.onInputCompositionStart,M=t.onInputCompositionEnd,T=t.onInputBlur,A=t.title,D=d.useState(!1),P=(0,s.Z)(D,2),B=P[0],_=P[1],I="combobox"===u,R=I||g,O=p[0],F=v||"";I&&y&&!B&&(F=y),d.useEffect((function(){I&&_(!1)}),[I,y]);var j=!("combobox"!==u&&!h&&!g)&&!!F,Z=void 0===A?N(O):A,z=d.useMemo((function(){return O?null:d.createElement("span",{className:"".concat(n,"-selection-placeholder"),style:j?{visibility:"hidden"}:void 0},f)}),[O,j,f,n]);return d.createElement("span",{className:"".concat(n,"-selection-wrap")},d.createElement("span",{className:"".concat(n,"-selection-search")},d.createElement(L,{ref:r,prefixCls:n,id:i,open:h,inputElement:e,disabled:o,autoFocus:a,autoComplete:l,editable:R,activeDescendantId:c,value:F,onKeyDown:x,onMouseDown:w,onChange:function(t){_(!0),C(t)},onPaste:S,onCompositionStart:E,onCompositionEnd:M,onBlur:T,tabIndex:m,attrs:(0,k.Z)(t,!0),maxLength:I?b:void 0})),!I&&O?d.createElement("span",{className:"".concat(n,"-selection-item"),title:Z,style:j?{visibility:"hidden"}:void 0},O.label):null,z)},O=function(t,e){var n=(0,d.useRef)(null),r=(0,d.useRef)(!1),o=t.prefixCls,a=t.open,l=t.mode,c=t.showSearch,u=t.tokenWithEnter,h=t.disabled,p=t.prefix,f=t.autoClearSearchValue,m=t.onSearch,g=t.onSearchSubmit,v=t.onToggleOpen,y=t.onInputKeyDown,b=t.onInputBlur,x=t.domRef;d.useImperativeHandle(e,(function(){return{focus:function(t){n.current.focus(t)},blur:function(){n.current.blur()}}}));var k=w(0),S=(0,s.Z)(k,2),E=S[0],M=S[1],T=(0,d.useRef)(null),L=function(t){!1!==m(t,!0,r.current)&&v(!0)},A={inputRef:n,onInputKeyDown:function(t){var e,i=t.which,o=n.current instanceof HTMLTextAreaElement;(o||!a||i!==C.Z.UP&&i!==C.Z.DOWN||t.preventDefault(),y&&y(t),i!==C.Z.ENTER||"tags"!==l||r.current||a||null==g||g(t.target.value),o&&!a&&~[C.Z.UP,C.Z.DOWN,C.Z.LEFT,C.Z.RIGHT].indexOf(i))||(e=i)&&![C.Z.ESC,C.Z.SHIFT,C.Z.BACKSPACE,C.Z.TAB,C.Z.WIN_KEY,C.Z.ALT,C.Z.META,C.Z.WIN_KEY_RIGHT,C.Z.CTRL,C.Z.SEMICOLON,C.Z.EQUALS,C.Z.CAPS_LOCK,C.Z.CONTEXT_MENU,C.Z.F1,C.Z.F2,C.Z.F3,C.Z.F4,C.Z.F5,C.Z.F6,C.Z.F7,C.Z.F8,C.Z.F9,C.Z.F10,C.Z.F11,C.Z.F12].includes(e)&&v(!0)},onInputMouseDown:function(){M(!0)},onInputChange:function(t){var e=t.target.value;if(u&&T.current&&/[\r\n]/.test(T.current)){var n=T.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");e=e.replace(n,T.current)}T.current=null,L(e)},onInputPaste:function(t){var e=t.clipboardData,n=null==e?void 0:e.getData("text");T.current=n||""},onInputCompositionStart:function(){r.current=!0},onInputCompositionEnd:function(t){r.current=!1,"combobox"!==l&&L(t.target.value)},onInputBlur:b},D="multiple"===l||"tags"===l?d.createElement(I,(0,i.Z)({},t,A)):d.createElement(R,(0,i.Z)({},t,A));return d.createElement("div",{ref:x,className:"".concat(o,"-selector"),onClick:function(t){t.target!==n.current&&(void 0!==document.body.style.msTouchAction?setTimeout((function(){n.current.focus()})):n.current.focus())},onMouseDown:function(t){var e=E();t.target===n.current||e||"combobox"===l&&h||t.preventDefault(),("combobox"===l||c&&e)&&a||(a&&!1!==f&&m("",!0,!1),v())}},p&&d.createElement("div",{className:"".concat(o,"-prefix")},p),D)};var F=d.forwardRef(O),j=n(65030),Z=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],z=function(t,e){var n=t.prefixCls,r=(t.disabled,t.visible),s=t.children,c=t.popupElement,u=t.animation,h=t.transitionName,p=t.dropdownStyle,m=t.dropdownClassName,g=t.direction,v=void 0===g?"ltr":g,y=t.placement,b=t.builtinPlacements,x=t.dropdownMatchSelectWidth,w=t.dropdownRender,C=t.dropdownAlign,k=t.getPopupContainer,S=t.empty,E=t.getTriggerDOMNode,M=t.onPopupVisibleChange,T=t.onPopupMouseEnter,L=(0,l.Z)(t,Z),A="".concat(n,"-dropdown"),D=c;w&&(D=w(c));var P=d.useMemo((function(){return b||function(t){var e=!0===t?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:e,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:e,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:e,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:e,adjustY:1},htmlRegion:"scroll"}}}(x)}),[b,x]),N=u?"".concat(A,"-").concat(u):h,B="number"==typeof x,_=d.useMemo((function(){return B?null:!1===x?"minWidth":"width"}),[x,B]),I=p;B&&(I=(0,a.Z)((0,a.Z)({},I),{},{width:x}));var R=d.useRef(null);return d.useImperativeHandle(e,(function(){return{getPopupElement:function(){var t;return null===(t=R.current)||void 0===t?void 0:t.popupElement}}})),d.createElement(j.Z,(0,i.Z)({},L,{showAction:M?["click"]:[],hideAction:M?["click"]:[],popupPlacement:y||("rtl"===v?"bottomRight":"bottomLeft"),builtinPlacements:P,prefixCls:A,popupTransitionName:N,popup:d.createElement("div",{onMouseEnter:T},D),ref:R,stretch:_,popupAlign:C,popupVisible:r,getPopupContainer:k,popupClassName:f()(m,(0,o.Z)({},"".concat(A,"-empty"),S)),popupStyle:I,getTriggerDOMNode:E,onPopupVisibleChange:M}),s)};var H=d.forwardRef(z),W=n(66712);function G(t,e){var n,i=t.key;return"value"in t&&(n=t.value),null!=i?i:void 0!==n?n:"rc-index-key-".concat(e)}function V(t){return void 0!==t&&!Number.isNaN(t)}function U(t,e){var n=t||{},i=n.label||(e?"children":"label");return{label:i,value:n.value||"value",options:n.options||"options",groupLabel:n.groupLabel||i}}function q(t){var e=(0,a.Z)({},t);return"props"in e||Object.defineProperty(e,"props",{get:function(){return(0,h.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),e}}),e}var K=d.createContext(null);function Y(t){var e=t.visible,n=t.values;if(!e)return null;return d.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(n.slice(0,50).map((function(t){var e=t.label,n=t.value;return["number","string"].includes((0,c.Z)(e))?e:n})).join(", ")),n.length>50?", ...":null)}var X=["id","prefixCls","className","showSearch","tagRender","direction","omitDomProps","displayValues","onDisplayValuesChange","emptyOptions","notFoundContent","onClear","mode","disabled","loading","getInputElement","getRawInputElement","open","defaultOpen","onDropdownVisibleChange","activeValue","onActiveValueChange","activeDescendantId","searchValue","autoClearSearchValue","onSearch","onSearchSplit","tokenSeparators","allowClear","prefix","suffixIcon","clearIcon","OptionList","animation","transitionName","dropdownStyle","dropdownClassName","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","placement","builtinPlacements","getPopupContainer","showAction","onFocus","onBlur","onKeyUp","onKeyDown","onMouseDown"],J=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],Q=function(t){return"tags"===t||"multiple"===t},$=d.forwardRef((function(t,e){var n,h=t.id,p=t.prefixCls,x=t.className,C=t.showSearch,k=t.tagRender,S=t.direction,E=t.omitDomProps,M=t.displayValues,T=t.onDisplayValuesChange,L=t.emptyOptions,A=t.notFoundContent,D=void 0===A?"Not Found":A,P=t.onClear,N=t.mode,B=t.disabled,_=t.loading,I=t.getInputElement,R=t.getRawInputElement,O=t.open,j=t.defaultOpen,Z=t.onDropdownVisibleChange,z=t.activeValue,G=t.onActiveValueChange,U=t.activeDescendantId,q=t.searchValue,$=t.autoClearSearchValue,tt=t.onSearch,et=t.onSearchSplit,nt=t.tokenSeparators,it=t.allowClear,rt=t.prefix,ot=t.suffixIcon,at=t.clearIcon,st=t.OptionList,lt=t.animation,ct=t.transitionName,ut=t.dropdownStyle,ht=t.dropdownClassName,dt=t.dropdownMatchSelectWidth,pt=t.dropdownRender,ft=t.dropdownAlign,mt=t.placement,gt=t.builtinPlacements,vt=t.getPopupContainer,yt=t.showAction,bt=void 0===yt?[]:yt,xt=t.onFocus,wt=t.onBlur,Ct=t.onKeyUp,kt=t.onKeyDown,St=t.onMouseDown,Et=(0,l.Z)(t,X),Mt=Q(N),Tt=(void 0!==C?C:Mt)||"combobox"===N,Lt=(0,a.Z)({},Et);J.forEach((function(t){delete Lt[t]})),null==E||E.forEach((function(t){delete Lt[t]}));var At=d.useState(!1),Dt=(0,s.Z)(At,2),Pt=Dt[0],Nt=Dt[1];d.useEffect((function(){Nt((0,g.Z)())}),[]);var Bt=d.useRef(null),_t=d.useRef(null),It=d.useRef(null),Rt=d.useRef(null),Ot=d.useRef(null),Ft=d.useRef(!1),jt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:10,e=d.useState(!1),n=(0,s.Z)(e,2),i=n[0],r=n[1],o=d.useRef(null),a=function(){window.clearTimeout(o.current)};return d.useEffect((function(){return a}),[]),[i,function(e,n){a(),o.current=window.setTimeout((function(){r(e),n&&n()}),t)},a]}(),Zt=(0,s.Z)(jt,3),zt=Zt[0],Ht=Zt[1],Wt=Zt[2];d.useImperativeHandle(e,(function(){var t,e;return{focus:null===(t=Rt.current)||void 0===t?void 0:t.focus,blur:null===(e=Rt.current)||void 0===e?void 0:e.blur,scrollTo:function(t){var e;return null===(e=Ot.current)||void 0===e?void 0:e.scrollTo(t)},nativeElement:Bt.current||_t.current}}));var Gt=d.useMemo((function(){var t;if("combobox"!==N)return q;var e=null===(t=M[0])||void 0===t?void 0:t.value;return"string"==typeof e||"number"==typeof e?String(e):""}),[q,N,M]),Vt="combobox"===N&&"function"==typeof I&&I()||null,Ut="function"==typeof R&&R(),qt=(0,v.x1)(_t,null==Ut||null===(n=Ut.props)||void 0===n?void 0:n.ref),Kt=d.useState(!1),Yt=(0,s.Z)(Kt,2),Xt=Yt[0],Jt=Yt[1];(0,m.Z)((function(){Jt(!0)}),[]);var Qt=(0,u.Z)(!1,{defaultValue:j,value:O}),$t=(0,s.Z)(Qt,2),te=$t[0],ee=$t[1],ne=!!Xt&&te,ie=!D&&L;(B||ie&&ne&&"combobox"===N)&&(ne=!1);var re=!ie&&ne,oe=d.useCallback((function(t){var e=void 0!==t?t:!ne;B||(ee(e),ne!==e&&(null==Z||Z(e)))}),[B,ne,ee,Z]),ae=d.useMemo((function(){return(nt||[]).some((function(t){return["\n","\r\n"].includes(t)}))}),[nt]),se=d.useContext(K)||{},le=se.maxCount,ce=se.rawValues,ue=function(t,e,n){if(!(Mt&&V(le)&&(null==ce?void 0:ce.size)>=le)){var i=!0,o=t;null==G||G(null);var a=function(t,e,n){if(!e||!e.length)return null;var i=!1,o=function t(e,n){var o=(0,W.Z)(n),a=o[0],s=o.slice(1);if(!a)return[e];var l=e.split(a);return i=i||l.length>1,l.reduce((function(e,n){return[].concat((0,r.Z)(e),(0,r.Z)(t(n,s)))}),[]).filter(Boolean)}(t,e);return i?void 0!==n?o.slice(0,n):o:null}(t,nt,V(le)?le-ce.size:void 0),s=n?null:a;return"combobox"!==N&&s&&(o="",null==et||et(s),oe(!1),i=!1),tt&&Gt!==o&&tt(o,{source:e?"typing":"effect"}),i}};d.useEffect((function(){ne||Mt||"combobox"===N||ue("",!1,!1)}),[ne]),d.useEffect((function(){te&&B&&ee(!1),B&&!Ft.current&&Ht(!1)}),[B]);var he=w(),de=(0,s.Z)(he,2),pe=de[0],fe=de[1],me=d.useRef(!1),ge=d.useRef(!1),ve=[];d.useEffect((function(){return function(){ve.forEach((function(t){return clearTimeout(t)})),ve.splice(0,ve.length)}}),[]);var ye,be=d.useState({}),xe=(0,s.Z)(be,2)[1];Ut&&(ye=function(t){oe(t)}),function(t,e,n,i){var r=d.useRef(null);r.current={open:e,triggerOpen:n,customizedTrigger:i},d.useEffect((function(){function e(e){var n;if(null===(n=r.current)||void 0===n||!n.customizedTrigger){var i=e.target;i.shadowRoot&&e.composed&&(i=e.composedPath()[0]||i),r.current.open&&t().filter((function(t){return t})).every((function(t){return!t.contains(i)&&t!==i}))&&r.current.triggerOpen(!1)}}return window.addEventListener("mousedown",e),function(){return window.removeEventListener("mousedown",e)}}),[])}((function(){var t;return[Bt.current,null===(t=It.current)||void 0===t?void 0:t.getPopupElement()]}),re,oe,!!Ut);var we,Ce=d.useMemo((function(){return(0,a.Z)((0,a.Z)({},t),{},{notFoundContent:D,open:ne,triggerOpen:re,id:h,showSearch:Tt,multiple:Mt,toggleOpen:oe})}),[t,D,re,ne,h,Tt,Mt,oe]),ke=!!ot||_;ke&&(we=d.createElement(y,{className:f()("".concat(p,"-arrow"),(0,o.Z)({},"".concat(p,"-arrow-loading"),_)),customizeIcon:ot,customizeIconProps:{loading:_,searchValue:Gt,open:ne,focused:zt,showSearch:Tt}}));var Se,Ee=function(t,e,n,i,r){var o=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=arguments.length>6?arguments[6]:void 0,s=arguments.length>7?arguments[7]:void 0,l=d.useMemo((function(){return"object"===(0,c.Z)(i)?i.clearIcon:r||void 0}),[i,r]),u=d.useMemo((function(){return!(o||!i||!n.length&&!a||"combobox"===s&&""===a)}),[i,o,n.length,a,s]);return{allowClear:u,clearIcon:d.createElement(y,{className:"".concat(t,"-clear"),onMouseDown:e,customizeIcon:l},"×")}}(p,(function(){var t;null==P||P(),null===(t=Rt.current)||void 0===t||t.focus(),T([],{type:"clear",values:M}),ue("",!1,!1)}),M,it,at,B,Gt,N),Me=Ee.allowClear,Te=Ee.clearIcon,Le=d.createElement(st,{ref:Ot}),Ae=f()(p,x,(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(p,"-focused"),zt),"".concat(p,"-multiple"),Mt),"".concat(p,"-single"),!Mt),"".concat(p,"-allow-clear"),it),"".concat(p,"-show-arrow"),ke),"".concat(p,"-disabled"),B),"".concat(p,"-loading"),_),"".concat(p,"-open"),ne),"".concat(p,"-customize-input"),Vt),"".concat(p,"-show-search"),Tt)),De=d.createElement(H,{ref:It,disabled:B,prefixCls:p,visible:re,popupElement:Le,animation:lt,transitionName:ct,dropdownStyle:ut,dropdownClassName:ht,direction:S,dropdownMatchSelectWidth:dt,dropdownRender:pt,dropdownAlign:ft,placement:mt,builtinPlacements:gt,getPopupContainer:vt,empty:L,getTriggerDOMNode:function(t){return _t.current||t},onPopupVisibleChange:ye,onPopupMouseEnter:function(){xe({})}},Ut?d.cloneElement(Ut,{ref:qt}):d.createElement(F,(0,i.Z)({},t,{domRef:_t,prefixCls:p,inputElement:Vt,ref:Rt,id:h,prefix:rt,showSearch:Tt,autoClearSearchValue:$,mode:N,activeDescendantId:U,tagRender:k,values:M,open:ne,onToggleOpen:oe,activeValue:z,searchValue:Gt,onSearch:ue,onSearchSubmit:function(t){t&&t.trim()&&tt(t,{source:"submit"})},onRemove:function(t){var e=M.filter((function(e){return e!==t}));T(e,{type:"remove",values:[t]})},tokenWithEnter:ae,onInputBlur:function(){me.current=!1}})));return Se=Ut?De:d.createElement("div",(0,i.Z)({className:Ae},Lt,{ref:Bt,onMouseDown:function(t){var e,n=t.target,i=null===(e=It.current)||void 0===e?void 0:e.getPopupElement();if(i&&i.contains(n)){var r=setTimeout((function(){var t,e=ve.indexOf(r);-1!==e&&ve.splice(e,1),Wt(),Pt||i.contains(document.activeElement)||null===(t=Rt.current)||void 0===t||t.focus()}));ve.push(r)}for(var o=arguments.length,a=new Array(o>1?o-1:0),s=1;s=0;l-=1){var c=a[l];if(!c.disabled){a.splice(l,1),s=c;break}}s&&T(a,{type:"remove",values:[s]})}for(var u=arguments.length,h=new Array(u>1?u-1:0),d=1;d1?e-1:0),i=1;i=S}),[h,S,null==D?void 0:D.size]),z=function(t){t.preventDefault()},H=function(t){var e;null===(e=j.current)||void 0===e||e.scrollTo("number"==typeof t?{index:t}:t)},W=d.useCallback((function(t){return"combobox"!==p&&D.has(t)}),[p,(0,r.Z)(D).toString(),D.size]),G=function(t){for(var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=F.length,i=0;i1&&void 0!==arguments[1]&&arguments[1];X(t);var n={source:e?"keyboard":"mouse"},i=F[t];i?M(i.value,t,n):M(null,-1,n)};(0,d.useEffect)((function(){J(!1!==T?G(0):-1)}),[F.length,m]);var Q=d.useCallback((function(t){return"combobox"===p?String(t).toLowerCase()===m.toLowerCase():D.has(t)}),[p,m,(0,r.Z)(D).toString(),D.size]);(0,d.useEffect)((function(){var t,e=setTimeout((function(){if(!h&&u&&1===D.size){var t=Array.from(D)[0],e=F.findIndex((function(e){var n=e.data;return m?String(n.value).startsWith(m):n.value===t}));-1!==e&&(J(e),H(e))}}));u&&(null===(t=j.current)||void 0===t||t.scrollTo(void 0));return function(){return clearTimeout(e)}}),[u,m]);var $=function(t){void 0!==t&&L(t,{selected:!D.has(t)}),h||g(!1)};if(d.useImperativeHandle(e,(function(){return{onKeyDown:function(t){var e=t.which,n=t.ctrlKey;switch(e){case C.Z.N:case C.Z.P:case C.Z.UP:case C.Z.DOWN:var i=0;if(e===C.Z.UP?i=-1:e===C.Z.DOWN?i=1:/(mac\sos|macintosh)/i.test(navigator.appVersion)&&n&&(e===C.Z.N?i=1:e===C.Z.P&&(i=-1)),0!==i){var r=G(Y+i,i);H(r),J(r,!0)}break;case C.Z.TAB:case C.Z.ENTER:var o,a=F[Y];!a||null!=a&&null!==(o=a.data)&&void 0!==o&&o.disabled||Z?$(void 0):$(a.value),u&&t.preventDefault();break;case C.Z.ESC:g(!1),u&&t.stopPropagation()}},onKeyUp:function(){},scrollTo:function(t){H(t)}}})),0===F.length)return d.createElement("div",{role:"listbox",id:"".concat(c,"_list"),className:"".concat(O,"-empty"),onMouseDown:z},v);var tt=Object.keys(P).map((function(t){return P[t]})),et=function(t){return t.label};function nt(t,e){return{role:t.group?"presentation":"option",id:"".concat(c,"_list_").concat(e)}}var it=function(t){var e=F[t];if(!e)return null;var n=e.data||{},r=n.value,o=e.group,a=(0,k.Z)(n,!0),s=et(e);return e?d.createElement("div",(0,i.Z)({"aria-label":"string"!=typeof s||o?null:s},a,{key:t},nt(e,t),{"aria-selected":Q(r)}),r):null},rt={role:"listbox",id:"".concat(c,"_list")};return d.createElement(d.Fragment,null,N&&d.createElement("div",(0,i.Z)({},rt,{style:{height:0,width:0,overflow:"hidden"}}),it(Y-1),it(Y),it(Y+1)),d.createElement(st.Z,{itemKey:"key",ref:j,data:F,height:_,itemHeight:I,fullHeight:!1,onMouseDown:z,onScroll:b,virtual:N,direction:B,innerProps:N?null:rt},(function(t,e){var n=t.group,r=t.groupOption,a=t.data,s=t.label,c=t.value,u=a.key;if(n){var h,p=null!==(h=a.title)&&void 0!==h?h:ct(s)?s.toString():void 0;return d.createElement("div",{className:f()(O,"".concat(O,"-group"),a.className),title:p},void 0!==s?s:u)}var m=a.disabled,g=a.title,v=(a.children,a.style),b=a.className,x=(0,l.Z)(a,lt),w=(0,at.Z)(x,tt),C=W(c),S=m||!C&&Z,E="".concat(O,"-option"),M=f()(O,E,b,(0,o.Z)((0,o.Z)((0,o.Z)((0,o.Z)({},"".concat(E,"-grouped"),r),"".concat(E,"-active"),Y===e&&!S),"".concat(E,"-disabled"),S),"".concat(E,"-selected"),C)),T=et(t),L=!A||"function"==typeof A||C,D="number"==typeof T?T:T||c,P=ct(D)?D.toString():void 0;return void 0!==g&&(P=g),d.createElement("div",(0,i.Z)({},(0,k.Z)(w),N?{}:nt(t,e),{"aria-selected":Q(c),className:M,title:P,onMouseMove:function(){Y===e||S||J(e)},onClick:function(){S||$(c)},style:v}),d.createElement("div",{className:"".concat(E,"-content")},"function"==typeof R?R(t,{index:e}):D),d.isValidElement(A)||C,L&&d.createElement(y,{className:"".concat(O,"-option-state"),customizeIcon:A,customizeIconProps:{value:c,disabled:S,isSelected:C}},C?"✓":null))})))};var ht=d.forwardRef(ut);function dt(t,e){return A(t).join("").toUpperCase().includes(e)}var pt=n(6551),ft=n(11592),mt=["children","value"],gt=["children"];function vt(t){var e=t,n=e.key,i=e.props,r=i.children,o=i.value,s=(0,l.Z)(i,mt);return(0,a.Z)({key:n,value:void 0!==o?o:n,children:r},s)}function yt(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return(0,ft.Z)(t).map((function(t,n){if(!d.isValidElement(t)||!t.type)return null;var i=t,r=i.type.isSelectOptGroup,o=i.key,s=i.props,c=s.children,u=(0,l.Z)(s,gt);return e||!r?vt(t):(0,a.Z)((0,a.Z)({key:"__RC_SELECT_GRP__".concat(null===o?n:o,"__"),label:o},u),{},{options:yt(c)})})).filter((function(t){return t}))}var bt=function(t,e,n,i,r){return d.useMemo((function(){var o=t;!t&&(o=yt(e));var a=new Map,s=new Map,l=function(t,e,n){n&&"string"==typeof n&&t.set(e[n],e)};return function t(e){for(var o=arguments.length>1&&void 0!==arguments[1]&&arguments[1],c=0;c0?t(e.options):e.options}):e}))},Ot=d.useMemo((function(){return T?Rt(It):It}),[It,T,lt]),Ft=d.useMemo((function(){return function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.fieldNames,i=e.childrenAsData,r=[],o=U(n,!1),a=o.label,s=o.value,l=o.options,c=o.groupLabel;function u(t,e){Array.isArray(t)&&t.forEach((function(t){if(e||!(l in t)){var n=t[s];r.push({key:G(t,r.length),groupOption:e,data:t,label:t[a],value:n})}else{var o=t[c];void 0===o&&i&&(o=t.label),r.push({key:G(t,r.length),group:!0,data:t,label:o}),u(t[l],!0)}}))}return u(t,!1),r}(Ot,{fieldNames:ot,childrenAsData:it})}),[Ot,ot,it]),jt=function(t){var e=vt(t);if(Et(e),X&&(e.length!==At.length||e.some((function(t,e){var n;return(null===(n=At[e])||void 0===n?void 0:n.value)!==(null==t?void 0:t.value)})))){var n=Y?e:e.map((function(t){return t.value})),i=e.map((function(t){return q(Dt(t.value))}));X(nt?n:n[0],nt?i:i[0])}},Zt=d.useState(null),zt=(0,s.Z)(Zt,2),Ht=zt[0],Wt=zt[1],Gt=d.useState(0),Vt=(0,s.Z)(Gt,2),Ut=Vt[0],qt=Vt[1],Kt=void 0!==_?_:"combobox"!==h,Yt=d.useCallback((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.source,r=void 0===i?"keyboard":i;qt(e),m&&"combobox"===h&&null!==t&&"keyboard"===r&&Wt(String(t))}),[m,h]),Xt=function(t,e,n){var i=function(){var e,n=Dt(t);return[Y?{label:null==n?void 0:n[ot.label],value:t,key:null!==(e=null==n?void 0:n.key)&&void 0!==e?e:t}:t,q(n)]};if(e&&C){var r=i(),o=(0,s.Z)(r,2),a=o[0],l=o[1];C(a,l)}else if(!e&&k&&"clear"!==n){var c=i(),u=(0,s.Z)(c,2),h=u[0],d=u[1];k(h,d)}},Jt=xt((function(t,e){var n,i=!nt||e.selected;n=i?nt?[].concat((0,r.Z)(At),[t]):[t]:At.filter((function(e){return e.value!==t})),jt(n),Xt(t,i),"combobox"===h?Wt(""):Q&&!w||(ct(""),Wt(""))})),Qt=d.useMemo((function(){var t=!1!==R&&!1!==E;return(0,a.Z)((0,a.Z)({},ut),{},{flattenOptions:Ft,onActiveValue:Yt,defaultActiveFirstOption:Kt,onSelect:Jt,menuItemSelectedIcon:I,rawValues:Nt,fieldNames:ot,virtual:t,direction:O,listHeight:j,listItemHeight:z,childrenAsData:it,maxCount:J,optionRender:N})}),[J,ut,Ft,Yt,Kt,Jt,I,Nt,ot,R,E,O,j,z,it,N]);return d.createElement(K.Provider,{value:Qt},d.createElement(tt,(0,i.Z)({},$,{id:et,prefixCls:f,ref:e,omitDomProps:Ct,mode:h,displayValues:Pt,onDisplayValuesChange:function(t,e){jt(t);var n=e.type,i=e.values;"remove"!==n&&"clear"!==n||i.forEach((function(t){Xt(t.value,!1,n)}))},direction:O,searchValue:lt,onSearch:function(t,e){if(ct(t),Wt(null),"submit"!==e.source)"blur"!==e.source&&("combobox"===h&&jt(t),null==b||b(t));else{var n=(t||"").trim();if(n){var i=Array.from(new Set([].concat((0,r.Z)(Nt),[n])));jt(i),Xt(n,!0),ct("")}}},autoClearSearchValue:w,onSearchSplit:function(t){var e=t;"tags"!==h&&(e=t.map((function(t){var e=mt.get(t);return null==e?void 0:e.value})).filter((function(t){return void 0!==t})));var n=Array.from(new Set([].concat((0,r.Z)(Nt),(0,r.Z)(e))));jt(n),n.forEach((function(t){Xt(t,!0)}))},dropdownMatchSelectWidth:E,OptionList:ht,emptyOptions:!Ft.length,activeValue:Ht,activeDescendantId:"".concat(et,"_list_").concat(Ut)})))}));var St=kt;St.Option=rt,St.OptGroup=nt;var Et=St},63158:function(t,e,n){"use strict";var i=n(54476),r=n(20068),o=n(42978),a=n(75931),s=n(59301),l=n(92310),c=n.n(l),u=n(18929),h=n(10228),d=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],p=s.forwardRef((function(t,e){var n,l=t.prefixCls,p=void 0===l?"rc-switch":l,f=t.className,m=t.checked,g=t.defaultChecked,v=t.disabled,y=t.loadingIcon,b=t.checkedChildren,x=t.unCheckedChildren,w=t.onClick,C=t.onChange,k=t.onKeyDown,S=(0,a.Z)(t,d),E=(0,u.Z)(!1,{value:m,defaultValue:g}),M=(0,o.Z)(E,2),T=M[0],L=M[1];function A(t,e){var n=T;return v||(L(n=t),null==C||C(n,e)),n}var D=c()(p,f,(n={},(0,r.Z)(n,"".concat(p,"-checked"),T),(0,r.Z)(n,"".concat(p,"-disabled"),v),n));return s.createElement("button",(0,i.Z)({},S,{type:"button",role:"switch","aria-checked":T,disabled:v,className:D,ref:e,onKeyDown:function(t){t.which===h.Z.LEFT?A(!1,t):t.which===h.Z.RIGHT&&A(!0,t),null==k||k(t)},onClick:function(t){var e=A(!T,t);null==w||w(e,t)}}),y,s.createElement("span",{className:"".concat(p,"-inner")},s.createElement("span",{className:"".concat(p,"-inner-checked")},b),s.createElement("span",{className:"".concat(p,"-inner-unchecked")},x)))}));p.displayName="Switch",e.Z=p},22711:function(t,e,n){"use strict";n.r(e),n.d(e,{ResizableTextArea:function(){return T},default:function(){return A}});var i,r=n(54476),o=n(20068),a=n(33885),s=n(94480),l=n(42978),c=n(75931),u=n(92310),h=n.n(u),d=n(36901),p=n(66003),f=n(30292),m=n(18929),g=n(59301),v=n(76190),y=n(29301),b=n(34280),x=n(16089),w="\n min-height:0 !important;\n max-height:none !important;\n height:0 !important;\n visibility:hidden !important;\n overflow:hidden !important;\n position:absolute !important;\n z-index:-1000 !important;\n top:0 !important;\n right:0 !important;\n pointer-events: none !important;\n",C=["letter-spacing","line-height","padding-top","padding-bottom","font-family","font-weight","font-size","font-variant","text-rendering","text-transform","width","text-indent","padding-left","padding-right","border-width","box-sizing","word-break","white-space"],k={};function S(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=t.getAttribute("id")||t.getAttribute("data-reactid")||t.getAttribute("name");if(e&&k[n])return k[n];var i=window.getComputedStyle(t),r=i.getPropertyValue("box-sizing")||i.getPropertyValue("-moz-box-sizing")||i.getPropertyValue("-webkit-box-sizing"),o=parseFloat(i.getPropertyValue("padding-bottom"))+parseFloat(i.getPropertyValue("padding-top")),a=parseFloat(i.getPropertyValue("border-bottom-width"))+parseFloat(i.getPropertyValue("border-top-width")),s=C.map((function(t){return"".concat(t,":").concat(i.getPropertyValue(t))})).join(";"),l={sizingStyle:s,paddingSize:o,borderSize:a,boxSizing:r};return e&&n&&(k[n]=l),l}var E=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],M=g.forwardRef((function(t,e){var n=t,s=n.prefixCls,u=n.defaultValue,d=n.value,p=n.autoSize,f=n.onResize,C=n.className,k=n.style,M=n.disabled,T=n.onChange,L=(n.onInternalAutoSize,(0,c.Z)(n,E)),A=(0,m.Z)(u,{value:d,postState:function(t){return null!=t?t:""}}),D=(0,l.Z)(A,2),P=D[0],N=D[1],B=g.useRef();g.useImperativeHandle(e,(function(){return{textArea:B.current}}));var _=g.useMemo((function(){return p&&"object"===(0,v.Z)(p)?[p.minRows,p.maxRows]:[]}),[p]),I=(0,l.Z)(_,2),R=I[0],O=I[1],F=!!p,j=g.useState(2),Z=(0,l.Z)(j,2),z=Z[0],H=Z[1],W=g.useState(),G=(0,l.Z)(W,2),V=G[0],U=G[1],q=function(){H(0)};(0,b.Z)((function(){F&&q()}),[d,R,O,F]),(0,b.Z)((function(){if(0===z)H(1);else if(1===z){var t=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;i||((i=document.createElement("textarea")).setAttribute("tab-index","-1"),i.setAttribute("aria-hidden","true"),i.setAttribute("name","hiddenTextarea"),document.body.appendChild(i)),t.getAttribute("wrap")?i.setAttribute("wrap",t.getAttribute("wrap")):i.removeAttribute("wrap");var o=S(t,e),a=o.paddingSize,s=o.borderSize,l=o.boxSizing,c=o.sizingStyle;i.setAttribute("style","".concat(c,";").concat(w)),i.value=t.value||t.placeholder||"";var u,h=void 0,d=void 0,p=i.scrollHeight;if("border-box"===l?p+=s:"content-box"===l&&(p-=a),null!==n||null!==r){i.value=" ";var f=i.scrollHeight-a;null!==n&&(h=f*n,"border-box"===l&&(h=h+a+s),p=Math.max(h,p)),null!==r&&(d=f*r,"border-box"===l&&(d=d+a+s),u=p>d?"":"hidden",p=Math.min(d,p))}var m={height:p,overflowY:u,resize:"none"};return h&&(m.minHeight=h),d&&(m.maxHeight=d),m}(B.current,!1,R,O);H(2),U(t)}else!function(){try{if(document.activeElement===B.current){var t=B.current,e=t.selectionStart,n=t.selectionEnd,i=t.scrollTop;B.current.setSelectionRange(e,n),B.current.scrollTop=i}}catch(t){}}()}),[z]);var K=g.useRef(),Y=function(){x.Z.cancel(K.current)};g.useEffect((function(){return Y}),[]);var X=F?V:null,J=(0,a.Z)((0,a.Z)({},k),X);return 0!==z&&1!==z||(J.overflowY="hidden",J.overflowX="hidden"),g.createElement(y.Z,{onResize:function(t){2===z&&(null==f||f(t),p&&(Y(),K.current=(0,x.Z)((function(){q()}))))},disabled:!(p||f)},g.createElement("textarea",(0,r.Z)({},L,{ref:B,style:J,className:h()(s,C,(0,o.Z)({},"".concat(s,"-disabled"),M)),disabled:M,value:P,onChange:function(t){N(t.target.value),null==T||T(t)}})))})),T=M,L=["defaultValue","value","onFocus","onBlur","onChange","allowClear","maxLength","onCompositionStart","onCompositionEnd","suffix","prefixCls","showCount","count","className","style","disabled","hidden","classNames","styles","onResize","onClear","onPressEnter","readOnly","autoSize","onKeyDown"],A=g.forwardRef((function(t,e){var n,i=t.defaultValue,u=t.value,v=t.onFocus,y=t.onBlur,b=t.onChange,x=t.allowClear,w=t.maxLength,C=t.onCompositionStart,k=t.onCompositionEnd,S=t.suffix,E=t.prefixCls,M=void 0===E?"rc-textarea":E,A=t.showCount,D=t.count,P=t.className,N=t.style,B=t.disabled,_=t.hidden,I=t.classNames,R=t.styles,O=t.onResize,F=t.onClear,j=t.onPressEnter,Z=t.readOnly,z=t.autoSize,H=t.onKeyDown,W=(0,c.Z)(t,L),G=(0,m.Z)(i,{value:u,defaultValue:i}),V=(0,l.Z)(G,2),U=V[0],q=V[1],K=null==U?"":String(U),Y=g.useState(!1),X=(0,l.Z)(Y,2),J=X[0],Q=X[1],$=g.useRef(!1),tt=g.useState(null),et=(0,l.Z)(tt,2),nt=et[0],it=et[1],rt=(0,g.useRef)(null),ot=(0,g.useRef)(null),at=function(){var t;return null===(t=ot.current)||void 0===t?void 0:t.textArea},st=function(){at().focus()};(0,g.useImperativeHandle)(e,(function(){var t;return{resizableTextArea:ot.current,focus:st,blur:function(){at().blur()},nativeElement:(null===(t=rt.current)||void 0===t?void 0:t.nativeElement)||at()}})),(0,g.useEffect)((function(){Q((function(t){return!B&&t}))}),[B]);var lt=g.useState(null),ct=(0,l.Z)(lt,2),ut=ct[0],ht=ct[1];g.useEffect((function(){var t;ut&&(t=at()).setSelectionRange.apply(t,(0,s.Z)(ut))}),[ut]);var dt,pt=(0,p.Z)(D,A),ft=null!==(n=pt.max)&&void 0!==n?n:w,mt=Number(ft)>0,gt=pt.strategy(K),vt=!!ft&>>ft,yt=function(t,e){var n=e;!$.current&&pt.exceedFormatter&&pt.max&&pt.strategy(e)>pt.max&&e!==(n=pt.exceedFormatter(e,{max:pt.max}))&&ht([at().selectionStart||0,at().selectionEnd||0]),q(n),(0,f.rJ)(t.currentTarget,t,b,n)},bt=S;pt.show&&(dt=pt.showFormatter?pt.showFormatter({value:K,count:gt,maxLength:ft}):"".concat(gt).concat(mt?" / ".concat(ft):""),bt=g.createElement(g.Fragment,null,bt,g.createElement("span",{className:h()("".concat(M,"-data-count"),null==I?void 0:I.count),style:null==R?void 0:R.count},dt)));var xt=!z&&!A&&!x;return g.createElement(d.BaseInput,{ref:rt,value:K,allowClear:x,handleReset:function(t){q(""),st(),(0,f.rJ)(at(),t,b)},suffix:bt,prefixCls:M,classNames:(0,a.Z)((0,a.Z)({},I),{},{affixWrapper:h()(null==I?void 0:I.affixWrapper,(0,o.Z)((0,o.Z)({},"".concat(M,"-show-count"),A),"".concat(M,"-textarea-allow-clear"),x))}),disabled:B,focused:J,className:h()(P,vt&&"".concat(M,"-out-of-range")),style:(0,a.Z)((0,a.Z)({},N),nt&&!xt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":"string"==typeof dt?dt:void 0}},hidden:_,readOnly:Z,onClear:F},g.createElement(T,(0,r.Z)({},W,{autoSize:z,maxLength:w,onKeyDown:function(t){"Enter"===t.key&&j&&j(t),null==H||H(t)},onChange:function(t){yt(t,t.target.value)},onFocus:function(t){Q(!0),null==v||v(t)},onBlur:function(t){Q(!1),null==y||y(t)},onCompositionStart:function(t){$.current=!0,null==C||C(t)},onCompositionEnd:function(t){$.current=!1,yt(t,t.currentTarget.value),null==k||k(t)},className:h()(null==I?void 0:I.textarea),style:(0,a.Z)((0,a.Z)({},null==R?void 0:R.textarea),{},{resize:null==N?void 0:N.resize}),disabled:B,prefixCls:M,onResize:function(t){var e;null==O||O(t),null!==(e=at())&&void 0!==e&&e.style.height&&it(!0)},ref:ot,readOnly:Z})))}))},90472:function(t,e,n){"use strict";n.d(e,{Z:function(){return _}});var i=n(54476),r=n(67732),o=n(83652),a=n(31226),s=n(42403),l=n(158),c=n(20068),u=n(59301),h=n(33885),d=n(75931),p=n(76190),f=n(75044),m=n(3202),g=n(94480),v=n(92310),y=n.n(v),b=n(26112),x=n(48736),w=function(t,e){if(t&&e){var n=Array.isArray(e)?e:e.split(","),i=t.name||"",r=t.type||"",o=r.replace(/\/.*$/,"");return n.some((function(t){var e=t.trim();if(/^\*(\/\*)?$/.test(t))return!0;if("."===e.charAt(0)){var n=i.toLowerCase(),a=e.toLowerCase(),s=[a];return".jpg"!==a&&".jpeg"!==a||(s=[".jpg",".jpeg"]),s.some((function(t){return n.endsWith(t)}))}return/\/\*$/.test(e)?o===e.replace(/\/.*$/,""):r===e||!!/^\w+$/.test(e)&&((0,x.ZP)(!1,"Upload takes an invalidate 'accept' type '".concat(e,"'.Skip for check.")),!0)}))}return!0};function C(t){var e=t.responseText||t.response;if(!e)return e;try{return JSON.parse(e)}catch(t){return e}}function k(t){var e=new XMLHttpRequest;t.onProgress&&e.upload&&(e.upload.onprogress=function(e){e.total>0&&(e.percent=e.loaded/e.total*100),t.onProgress(e)});var n=new FormData;t.data&&Object.keys(t.data).forEach((function(e){var i=t.data[e];Array.isArray(i)?i.forEach((function(t){n.append("".concat(e,"[]"),t)})):n.append(e,i)})),t.file instanceof Blob?n.append(t.filename,t.file,t.file.name):n.append(t.filename,t.file),e.onerror=function(e){t.onError(e)},e.onload=function(){return e.status<200||e.status>=300?t.onError(function(t,e){var n="cannot ".concat(t.method," ").concat(t.action," ").concat(e.status,"'"),i=new Error(n);return i.status=e.status,i.method=t.method,i.url=t.action,i}(t,e),C(e)):t.onSuccess(C(e),e)},e.open(t.method,t.action,!0),t.withCredentials&&"withCredentials"in e&&(e.withCredentials=!0);var i=t.headers||{};return null!==i["X-Requested-With"]&&e.setRequestHeader("X-Requested-With","XMLHttpRequest"),Object.keys(i).forEach((function(t){null!==i[t]&&e.setRequestHeader(t,i[t])})),e.send(n),{abort:function(){e.abort()}}}var S=function(){var t=(0,m.Z)((0,f.Z)().mark((function t(e,n){var i,r,o,a,s,l,c,u;return(0,f.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:l=function(){return(l=(0,m.Z)((0,f.Z)().mark((function t(e){return(0,f.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",new Promise((function(t){e.file((function(i){n(i)?(e.fullPath&&!i.webkitRelativePath&&(Object.defineProperties(i,{webkitRelativePath:{writable:!0}}),i.webkitRelativePath=e.fullPath.replace(/^\//,""),Object.defineProperties(i,{webkitRelativePath:{writable:!1}})),t(i)):t(null)}))})));case 1:case"end":return t.stop()}}),t)})))).apply(this,arguments)},s=function(t){return l.apply(this,arguments)},a=function(){return(a=(0,m.Z)((0,f.Z)().mark((function t(e){var n,i,r,o,a;return(0,f.Z)().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:n=e.createReader(),i=[];case 2:return t.next=5,new Promise((function(t){n.readEntries(t,(function(){return t([])}))}));case 5:if(r=t.sent,o=r.length){t.next=9;break}return t.abrupt("break",12);case 9:for(a=0;a2&&void 0!==arguments[2]&&arguments[2],i=t?e<0&&s.current.left||e>0&&s.current.right:e<0&&s.current.top||e>0&&s.current.bottom;return n&&i?(clearTimeout(o.current),r.current=!1):i&&!r.current||a(),!r.current&&i}};function k(t,e,n,i,r,o,a){var s=(0,f.useRef)(0),l=(0,f.useRef)(null),c=(0,f.useRef)(null),u=(0,f.useRef)(!1),h=C(e,n,i,r);var d=(0,f.useRef)(null),p=(0,f.useRef)(null);return[function(e){if(t){x.Z.cancel(p.current),p.current=(0,x.Z)((function(){d.current=null}),2);var n=e.deltaX,i=e.deltaY,r=e.shiftKey,f=n,m=i;("sx"===d.current||!d.current&&r&&i&&!n)&&(f=i,m=0,d.current="sx");var g=Math.abs(f),v=Math.abs(m);null===d.current&&(d.current=o&&g>v?"x":"y"),"y"===d.current?function(t,e){if(x.Z.cancel(l.current),!h(!1,e)){var n=t;n._virtualHandled||(n._virtualHandled=!0,s.current+=e,c.current=e,w||n.preventDefault(),l.current=(0,x.Z)((function(){var t=u.current?10:1;a(s.current*t,!1),s.current=0})))}}(e,m):function(t,e){a(e,!0),w||t.preventDefault()}(e,f)}},function(e){t&&(u.current=e.detail===c.current)}]}var S=n(67732),E=n(83652),M=function(){function t(){(0,S.Z)(this,t),(0,a.Z)(this,"maps",void 0),(0,a.Z)(this,"id",0),(0,a.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,E.Z)(t,[{key:"set",value:function(t,e){this.diffRecords.set(t,this.maps[t]),this.maps[t]=e,this.id+=1}},{key:"get",value:function(t){return this.maps[t]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),t}();function T(t){var e=parseFloat(t);return isNaN(e)?0:e}var L=14/15;function A(t){return Math.floor(Math.pow(t,.5))}function D(t,e){return("touches"in t?t.touches[0]:t)[e?"pageX":"pageY"]-window[e?"scrollX":"scrollY"]}var P=f.forwardRef((function(t,e){var n=t.prefixCls,i=t.rtl,r=t.scrollOffset,l=t.scrollRange,c=t.onStartMove,h=t.onStopMove,d=t.onScroll,p=t.horizontal,m=t.spinSize,g=t.containerSize,v=t.style,y=t.thumbStyle,b=t.showScrollBar,w=f.useState(!1),C=(0,s.Z)(w,2),k=C[0],S=C[1],E=f.useState(null),M=(0,s.Z)(E,2),T=M[0],L=M[1],A=f.useState(null),P=(0,s.Z)(A,2),N=P[0],B=P[1],_=!i,I=f.useRef(),R=f.useRef(),O=f.useState(b),F=(0,s.Z)(O,2),j=F[0],Z=F[1],z=f.useRef(),H=function(){!0!==b&&!1!==b&&(clearTimeout(z.current),Z(!0),z.current=setTimeout((function(){Z(!1)}),3e3))},W=l-g||0,G=g-m||0,V=f.useMemo((function(){return 0===r||0===W?0:r/W*G}),[r,W,G]),U=f.useRef({top:V,dragging:k,pageY:T,startTop:N});U.current={top:V,dragging:k,pageY:T,startTop:N};var q=function(t){S(!0),L(D(t,p)),B(U.current.top),c(),t.stopPropagation(),t.preventDefault()};f.useEffect((function(){var t=function(t){t.preventDefault()},e=I.current,n=R.current;return e.addEventListener("touchstart",t,{passive:!1}),n.addEventListener("touchstart",q,{passive:!1}),function(){e.removeEventListener("touchstart",t),n.removeEventListener("touchstart",q)}}),[]);var K=f.useRef();K.current=W;var Y=f.useRef();Y.current=G,f.useEffect((function(){if(k){var t,e=function(e){var n=U.current,i=n.dragging,r=n.pageY,o=n.startTop;x.Z.cancel(t);var a=I.current.getBoundingClientRect(),s=g/(p?a.width:a.height);if(i){var l=(D(e,p)-r)*s,c=o;!_&&p?c-=l:c+=l;var u=K.current,h=Y.current,f=h?c/h:0,m=Math.ceil(f*u);m=Math.max(m,0),m=Math.min(m,u),t=(0,x.Z)((function(){d(m,p)}))}},n=function(){S(!1),h()};return window.addEventListener("mousemove",e,{passive:!0}),window.addEventListener("touchmove",e,{passive:!0}),window.addEventListener("mouseup",n,{passive:!0}),window.addEventListener("touchend",n,{passive:!0}),function(){window.removeEventListener("mousemove",e),window.removeEventListener("touchmove",e),window.removeEventListener("mouseup",n),window.removeEventListener("touchend",n),x.Z.cancel(t)}}}),[k]),f.useEffect((function(){return H(),function(){clearTimeout(z.current)}}),[r]),f.useImperativeHandle(e,(function(){return{delayHidden:H}}));var X="".concat(n,"-scrollbar"),J={position:"absolute",visibility:j?null:"hidden"},Q={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return p?(Object.assign(J,{height:8,left:0,right:0,bottom:0}),Object.assign(Q,(0,a.Z)({height:"100%",width:m},_?"left":"right",V))):(Object.assign(J,(0,a.Z)({width:8,top:0,bottom:0},_?"right":"left",0)),Object.assign(Q,{width:"100%",height:m,top:V})),f.createElement("div",{ref:I,className:u()(X,(0,a.Z)((0,a.Z)((0,a.Z)({},"".concat(X,"-horizontal"),p),"".concat(X,"-vertical"),!p),"".concat(X,"-visible"),j)),style:(0,o.Z)((0,o.Z)({},J),v),onMouseDown:function(t){t.stopPropagation(),t.preventDefault()},onMouseMove:H},f.createElement("div",{ref:R,className:u()("".concat(X,"-thumb"),(0,a.Z)({},"".concat(X,"-thumb-moving"),k)),style:(0,o.Z)((0,o.Z)({},Q),y),onMouseDown:q}))}));function N(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=t/e*t;return isNaN(n)&&(n=0),n=Math.max(n,20),Math.floor(n)}var B=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],_=[],I={overflowY:"auto",overflowAnchor:"none"};function R(t,e){var n=t.prefixCls,c=void 0===n?"rc-virtual-list":n,g=t.className,w=t.height,S=t.itemHeight,E=t.fullHeight,R=void 0===E||E,O=t.style,F=t.data,j=t.children,Z=t.itemKey,z=t.virtual,H=t.direction,W=t.scrollWidth,G=t.component,V=void 0===G?"div":G,U=t.onScroll,q=t.onVirtualScroll,K=t.onVisibleChange,Y=t.innerProps,X=t.extraRender,J=t.styles,Q=t.showScrollBar,$=void 0===Q?"optional":Q,tt=(0,l.Z)(t,B),et=f.useCallback((function(t){return"function"==typeof Z?Z(t):null==t?void 0:t[Z]}),[Z]),nt=function(t,e,n){var i=f.useState(0),r=(0,s.Z)(i,2),o=r[0],a=r[1],l=(0,f.useRef)(new Map),c=(0,f.useRef)(new M),u=(0,f.useRef)(0);function h(){u.current+=1}function d(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];h();var e=function(){var t=!1;l.current.forEach((function(e,n){if(e&&e.offsetParent){var i=e.offsetHeight,r=getComputedStyle(e),o=r.marginTop,a=r.marginBottom,s=i+T(o)+T(a);c.current.get(n)!==s&&(c.current.set(n,s),t=!0)}})),t&&a((function(t){return t+1}))};if(t)e();else{u.current+=1;var n=u.current;Promise.resolve().then((function(){n===u.current&&e()}))}}return(0,f.useEffect)((function(){return h}),[]),[function(i,r){var o=t(i),a=l.current.get(o);r?(l.current.set(o,r),d()):l.current.delete(o),!a!=!r&&(r?null==e||e(i):null==n||n(i))},d,c.current,o]}(et,null,null),it=(0,s.Z)(nt,4),rt=it[0],ot=it[1],at=it[2],st=it[3],lt=!(!1===z||!w||!S),ct=f.useMemo((function(){return Object.values(at.maps).reduce((function(t,e){return t+e}),0)}),[at.id,at.maps]),ut=lt&&F&&(Math.max(S*F.length,ct)>w||!!W),ht="rtl"===H,dt=u()(c,(0,a.Z)({},"".concat(c,"-rtl"),ht),g),pt=F||_,ft=(0,f.useRef)(),mt=(0,f.useRef)(),gt=(0,f.useRef)(),vt=(0,f.useState)(0),yt=(0,s.Z)(vt,2),bt=yt[0],xt=yt[1],wt=(0,f.useState)(0),Ct=(0,s.Z)(wt,2),kt=Ct[0],St=Ct[1],Et=(0,f.useState)(!1),Mt=(0,s.Z)(Et,2),Tt=Mt[0],Lt=Mt[1],At=function(){Lt(!0)},Dt=function(){Lt(!1)},Pt={getKey:et};function Nt(t){xt((function(e){var n=function(t){var e=t;Number.isNaN(Jt.current)||(e=Math.min(e,Jt.current));return e=Math.max(e,0),e}("function"==typeof t?t(e):t);return ft.current.scrollTop=n,n}))}var Bt=(0,f.useRef)({start:0,end:pt.length}),_t=(0,f.useRef)(),It=b(pt,et),Rt=(0,s.Z)(It,1)[0];_t.current=Rt;var Ot=f.useMemo((function(){if(!lt)return{scrollHeight:void 0,start:0,end:pt.length-1,offset:void 0};var t;if(!ut)return{scrollHeight:(null===(t=mt.current)||void 0===t?void 0:t.offsetHeight)||0,start:0,end:pt.length-1,offset:void 0};for(var e,n,i,r=0,o=pt.length,a=0;a=bt&&void 0===e&&(e=a,n=r),u>bt+w&&void 0===i&&(i=a),r=u}return void 0===e&&(e=0,n=0,i=Math.ceil(w/S)),void 0===i&&(i=pt.length-1),{scrollHeight:r,start:e,end:i=Math.min(i+1,pt.length-1),offset:n}}),[ut,lt,bt,pt,st,w]),Ft=Ot.scrollHeight,jt=Ot.start,Zt=Ot.end,zt=Ot.offset;Bt.current.start=jt,Bt.current.end=Zt,f.useLayoutEffect((function(){var t=at.getRecord();if(1===t.size){var e=Array.from(t.keys())[0],n=t.get(e),i=pt[jt];if(i&&void 0===n)if(et(i)===e){var r=at.get(e)-S;Nt((function(t){return t+r}))}}at.resetRecord()}),[Ft]);var Ht=f.useState({width:0,height:w}),Wt=(0,s.Z)(Ht,2),Gt=Wt[0],Vt=Wt[1],Ut=(0,f.useRef)(),qt=(0,f.useRef)(),Kt=f.useMemo((function(){return N(Gt.width,W)}),[Gt.width,W]),Yt=f.useMemo((function(){return N(Gt.height,Ft)}),[Gt.height,Ft]),Xt=Ft-w,Jt=(0,f.useRef)(Xt);Jt.current=Xt;var Qt=bt<=0,$t=bt>=Xt,te=kt<=0,ee=kt>=W,ne=C(Qt,$t,te,ee),ie=function(){return{x:ht?-kt:kt,y:bt}},re=(0,f.useRef)(ie()),oe=(0,d.zX)((function(t){if(q){var e=(0,o.Z)((0,o.Z)({},ie()),t);re.current.x===e.x&&re.current.y===e.y||(q(e),re.current=e)}}));function ae(t,e){var n=t;e?((0,m.flushSync)((function(){St(n)})),oe()):Nt(n)}var se=function(t){var e=t,n=W?W-Gt.width:0;return e=Math.max(e,0),e=Math.min(e,n)},le=(0,d.zX)((function(t,e){e?((0,m.flushSync)((function(){St((function(e){return se(e+(ht?-t:t))}))})),oe()):Nt((function(e){return e+t}))})),ce=k(lt,Qt,$t,te,ee,!!W,le),ue=(0,s.Z)(ce,2),he=ue[0],de=ue[1];!function(t,e,n){var i,r=(0,f.useRef)(!1),o=(0,f.useRef)(0),a=(0,f.useRef)(0),s=(0,f.useRef)(null),l=(0,f.useRef)(null),c=function(t){if(r.current){var e=Math.ceil(t.touches[0].pageX),i=Math.ceil(t.touches[0].pageY),s=o.current-e,c=a.current-i,u=Math.abs(s)>Math.abs(c);u?o.current=e:a.current=i;var h=n(u,u?s:c,!1,t);h&&t.preventDefault(),clearInterval(l.current),h&&(l.current=setInterval((function(){u?s*=L:c*=L;var t=Math.floor(u?s:c);(!n(u,t,!0)||Math.abs(t)<=.1)&&clearInterval(l.current)}),16))}},u=function(){r.current=!1,i()},h=function(t){i(),1!==t.touches.length||r.current||(r.current=!0,o.current=Math.ceil(t.touches[0].pageX),a.current=Math.ceil(t.touches[0].pageY),s.current=t.target,s.current.addEventListener("touchmove",c,{passive:!1}),s.current.addEventListener("touchend",u,{passive:!0}))};i=function(){s.current&&(s.current.removeEventListener("touchmove",c),s.current.removeEventListener("touchend",u))},(0,p.Z)((function(){return t&&e.current.addEventListener("touchstart",h,{passive:!0}),function(){var t;null===(t=e.current)||void 0===t||t.removeEventListener("touchstart",h),i(),clearInterval(l.current)}}),[t])}(lt,ft,(function(t,e,n,i){var r=i;return!ne(t,e,n)&&((!r||!r._virtualHandled)&&(r&&(r._virtualHandled=!0),he({preventDefault:function(){},deltaX:t?e:0,deltaY:t?0:e}),!0))})),function(t,e,n){f.useEffect((function(){var i=e.current;if(t&&i){var r,o,a=!1,s=function(){x.Z.cancel(r)},l=function t(){s(),r=(0,x.Z)((function(){n(o),t()}))},c=function(){a=!1,s()},u=function(t){if(!t.target.draggable&&0===t.button){var e=t;e._virtualHandled||(e._virtualHandled=!0,a=!0)}},h=function(t){if(a){var e=D(t,!1),n=i.getBoundingClientRect(),r=n.top,c=n.bottom;e<=r?(o=-A(r-e),l()):e>=c?(o=A(e-c),l()):s()}};return i.addEventListener("mousedown",u),i.ownerDocument.addEventListener("mouseup",c),i.ownerDocument.addEventListener("mousemove",h),i.ownerDocument.addEventListener("dragend",c),function(){i.removeEventListener("mousedown",u),i.ownerDocument.removeEventListener("mouseup",c),i.ownerDocument.removeEventListener("mousemove",h),i.ownerDocument.removeEventListener("dragend",c),s()}}}),[t])}(ut,ft,(function(t){Nt((function(e){return e+t}))})),(0,p.Z)((function(){function t(t){var e=Qt&&t.detail<0,n=$t&&t.detail>0;!lt||e||n||t.preventDefault()}var e=ft.current;return e.addEventListener("wheel",he,{passive:!1}),e.addEventListener("DOMMouseScroll",de,{passive:!0}),e.addEventListener("MozMousePixelScroll",t,{passive:!1}),function(){e.removeEventListener("wheel",he),e.removeEventListener("DOMMouseScroll",de),e.removeEventListener("MozMousePixelScroll",t)}}),[lt,Qt,$t]),(0,p.Z)((function(){if(W){var t=se(kt);St(t),oe({x:t})}}),[Gt.width,W]);var pe=function(){var t,e;null===(t=Ut.current)||void 0===t||t.delayHidden(),null===(e=qt.current)||void 0===e||e.delayHidden()},fe=function(t,e,n,i,a,l,c,u){var h=f.useRef(),d=f.useState(null),m=(0,s.Z)(d,2),g=m[0],v=m[1];return(0,p.Z)((function(){if(g&&g.times<10){if(!t.current)return void v((function(t){return(0,o.Z)({},t)}));l();var r=g.targetAlign,s=g.originAlign,u=g.index,h=g.offset,d=t.current.clientHeight,p=!1,f=r,m=null;if(d){for(var y=r||s,b=0,x=0,w=0,C=Math.min(e.length-1,u),k=0;k<=C;k+=1){var S=a(e[k]);x=b;var E=n.get(S);b=w=x+(void 0===E?i:E)}for(var M="top"===y?h:d-h,T=C;T>=0;T-=1){var L=a(e[T]),A=n.get(L);if(void 0===A){p=!0;break}if((M-=A)<=0)break}switch(y){case"top":m=x-h;break;case"bottom":m=w-d+h;break;default:var D=t.current.scrollTop;xD+d&&(f="bottom")}null!==m&&c(m),m!==g.lastTop&&(p=!0)}p&&v((0,o.Z)((0,o.Z)({},g),{},{times:g.times+1,targetAlign:f,lastTop:m}))}}),[g,t.current]),function(t){if(null!=t){if(x.Z.cancel(h.current),"number"==typeof t)c(t);else if(t&&"object"===(0,r.Z)(t)){var n,i=t.align;n="index"in t?t.index:e.findIndex((function(e){return a(e)===t.key}));var o=t.offset;v({times:0,index:n,offset:void 0===o?0:o,originAlign:i})}}else u()}}(ft,pt,at,S,et,(function(){return ot(!0)}),Nt,pe);f.useImperativeHandle(e,(function(){return{nativeElement:gt.current,getScrollInfo:ie,scrollTo:function(t){var e;(e=t)&&"object"===(0,r.Z)(e)&&("left"in e||"top"in e)?(void 0!==t.left&&St(se(t.left)),fe(t.top)):fe(t)}}})),(0,p.Z)((function(){if(K){var t=pt.slice(jt,Zt+1);K(t,pt)}}),[jt,Zt,pt]);var me=function(t,e,n,i){var r=f.useMemo((function(){return[new Map,[]]}),[t,n.id,i]),o=(0,s.Z)(r,2),a=o[0],l=o[1];return function(r){var o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,s=a.get(r),c=a.get(o);if(void 0===s||void 0===c)for(var u=t.length,h=l.length;hw&&f.createElement(P,{ref:Ut,prefixCls:c,scrollOffset:bt,scrollRange:Ft,rtl:ht,onScroll:ae,onStartMove:At,onStopMove:Dt,spinSize:Yt,containerSize:Gt.height,style:null==J?void 0:J.verticalScrollBar,thumbStyle:null==J?void 0:J.verticalScrollBarThumb,showScrollBar:$}),ut&&W>Gt.width&&f.createElement(P,{ref:qt,prefixCls:c,scrollOffset:kt,scrollRange:W,rtl:ht,onScroll:ae,onStartMove:At,onStopMove:Dt,spinSize:Kt,containerSize:Gt.width,horizontal:!0,style:null==J?void 0:J.horizontalScrollBar,thumbStyle:null==J?void 0:J.horizontalScrollBarThumb,showScrollBar:$}))}var O=f.forwardRef(R);O.displayName="List";var F=O},93314:function(t){"use strict";t.exports="data:image/png;base64,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"},16722:function(t,e,n){"use strict";n.d(e,{Z:function(){return c}});const i=t=>"object"==typeof t&&null!=t&&1===t.nodeType,r=(t,e)=>(!e||"hidden"!==t)&&"visible"!==t&&"clip"!==t,o=(t,e)=>{if(t.clientHeight{const e=(t=>{if(!t.ownerDocument||!t.ownerDocument.defaultView)return null;try{return t.ownerDocument.defaultView.frameElement}catch(t){return null}})(t);return!!e&&(e.clientHeightoe||o>t&&a=e&&s>=n?o-t-i:a>e&&sn?a-e+r:0,s=t=>{const e=t.parentElement;return null==e?t.getRootNode().host||null:e},l=(t,e)=>{var n,r,l,c;if("undefined"==typeof document)return[];const{scrollMode:u,block:h,inline:d,boundary:p,skipOverflowHiddenElements:f}=e,m="function"==typeof p?p:t=>t!==p;if(!i(t))throw new TypeError("Invalid target");const g=document.scrollingElement||document.documentElement,v=[];let y=t;for(;i(y)&&m(y);){if(y=s(y),y===g){v.push(y);break}null!=y&&y===document.body&&o(y)&&!o(document.documentElement)||null!=y&&o(y,f)&&v.push(y)}const b=null!=(r=null==(n=window.visualViewport)?void 0:n.width)?r:innerWidth,x=null!=(c=null==(l=window.visualViewport)?void 0:l.height)?c:innerHeight,{scrollX:w,scrollY:C}=window,{height:k,width:S,top:E,right:M,bottom:T,left:L}=t.getBoundingClientRect(),{top:A,right:D,bottom:P,left:N}=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(t);let B="start"===h||"nearest"===h?E-A:"end"===h?T+P:E+k/2-A+P,_="center"===d?L+S/2-N+D:"end"===d?M+D:L-N;const I=[];for(let t=0;t=0&&L>=0&&T<=x&&M<=b&&(e===g&&!o(e)||E>=r&&T<=l&&L>=c&&M<=s))return I;const p=getComputedStyle(e),f=parseInt(p.borderLeftWidth,10),m=parseInt(p.borderTopWidth,10),y=parseInt(p.borderRightWidth,10),A=parseInt(p.borderBottomWidth,10);let D=0,P=0;const N="offsetWidth"in e?e.offsetWidth-e.clientWidth-f-y:0,R="offsetHeight"in e?e.offsetHeight-e.clientHeight-m-A:0,O="offsetWidth"in e?0===e.offsetWidth?0:i/e.offsetWidth:0,F="offsetHeight"in e?0===e.offsetHeight?0:n/e.offsetHeight:0;if(g===e)D="start"===h?B:"end"===h?B-x:"nearest"===h?a(C,C+x,x,m,A,C+B,C+B+k,k):B-x/2,P="start"===d?_:"center"===d?_-b/2:"end"===d?_-b:a(w,w+b,b,f,y,w+_,w+_+S,S),D=Math.max(0,D+C),P=Math.max(0,P+w);else{D="start"===h?B-r-m:"end"===h?B-l+A+R:"nearest"===h?a(r,l,n,m,A+R,B,B+k,k):B-(r+n/2)+R/2,P="start"===d?_-c-f:"center"===d?_-(c+i/2)+N/2:"end"===d?_-s+y+N:a(c,s,i,f,y+N,_,_+S,S);const{scrollLeft:t,scrollTop:o}=e;D=0===F?0:Math.max(0,Math.min(o+D/F,e.scrollHeight-n/F+R)),P=0===O?0:Math.max(0,Math.min(t+P/O,e.scrollWidth-i/O+N)),B+=o-D,_+=t-P}I.push({el:e,top:D,left:P})}return I};function c(t,e){if(!t.isConnected||!(t=>{let e=t;for(;e&&e.parentNode;){if(e.parentNode===document)return!0;e=e.parentNode instanceof ShadowRoot?e.parentNode.host:e.parentNode}return!1})(t))return;const n=(t=>{const e=window.getComputedStyle(t);return{top:parseFloat(e.scrollMarginTop)||0,right:parseFloat(e.scrollMarginRight)||0,bottom:parseFloat(e.scrollMarginBottom)||0,left:parseFloat(e.scrollMarginLeft)||0}})(t);if((t=>"object"==typeof t&&"function"==typeof t.behavior)(e))return e.behavior(l(t,e));const i="boolean"==typeof e||null==e?void 0:e.behavior;for(const{el:r,top:o,left:a}of l(t,(t=>!1===t?{block:"end",inline:"nearest"}:(t=>t===Object(t)&&0!==Object.keys(t).length)(t)?t:{block:"start",inline:"nearest"})(e))){const t=o-n.top+n.bottom,e=a-n.left+n.right;r.scroll({top:t,left:e,behavior:i})}}}}]);