|
|
(self.webpackChunk=self.webpackChunk||[]).push([[7460],{10906:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ee}});var ce=be(54476),ie=be(59301),Ce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M904 512h-56c-4.4 0-8 3.6-8 8v320H184V184h320c4.4 0 8-3.6 8-8v-56c0-4.4-3.6-8-8-8H144c-17.7 0-32 14.3-32 32v736c0 17.7 14.3 32 32 32h736c17.7 0 32-14.3 32-32V520c0-4.4-3.6-8-8-8z"}},{tag:"path",attrs:{d:"M355.9 534.9L354 653.8c-.1 8.9 7.1 16.2 16 16.2h.4l118-2.9c2-.1 4-.9 5.4-2.3l415.9-415c3.1-3.1 3.1-8.2 0-11.3L785.4 114.3c-1.6-1.6-3.6-2.3-5.7-2.3s-4.1.8-5.7 2.3l-415.8 415a8.3 8.3 0 00-2.3 5.6zm63.5 23.6L779.7 199l45.2 45.1-360.5 359.7-45.7 1.1.7-46.4z"}}]},name:"form",theme:"outlined"},ue=Ce,se=be(7657),te=function(E,b){return ie.createElement(se.Z,(0,ce.Z)({},E,{ref:b,icon:ue}))},le=ie.forwardRef(te),ee=le},76618:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ee}});var ce=be(54476),ie=be(59301),Ce={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M705.6 124.9a8 8 0 00-11.6 7.2v64.2c0 5.5 2.9 10.6 7.5 13.6a352.2 352.2 0 0162.2 49.8c32.7 32.8 58.4 70.9 76.3 113.3a355 355 0 0127.9 138.7c0 48.1-9.4 94.8-27.9 138.7a355.92 355.92 0 01-76.3 113.3 353.06 353.06 0 01-113.2 76.4c-43.8 18.6-90.5 28-138.5 28s-94.7-9.4-138.5-28a353.06 353.06 0 01-113.2-76.4A355.92 355.92 0 01184 650.4a355 355 0 01-27.9-138.7c0-48.1 9.4-94.8 27.9-138.7 17.9-42.4 43.6-80.5 76.3-113.3 19-19 39.8-35.6 62.2-49.8 4.7-2.9 7.5-8.1 7.5-13.6V132c0-6-6.3-9.8-11.6-7.2C178.5 195.2 82 339.3 80 506.3 77.2 745.1 272.5 943.5 511.2 944c239 .5 432.8-193.3 432.8-432.4 0-169.2-97-315.7-238.4-386.7zM480 560h64c4.4 0 8-3.6 8-8V88c0-4.4-3.6-8-8-8h-64c-4.4 0-8 3.6-8 8v464c0 4.4 3.6 8 8 8z"}}]},name:"poweroff",theme:"outlined"},ue=Ce,se=be(7657),te=function(E,b){return ie.createElement(se.Z,(0,ce.Z)({},E,{ref:b,icon:ue}))},le=ie.forwardRef(te),ee=le},66543:function(){"use strict"},59598:function(){"use strict"},21697:function(qt,Dt){"use strict";Dt.Z={lists:"lists___xhHyq",item:"item___pWJAA",children:"children___sDG61",diamond:"diamond___FwgzD",button:"button___WPN6r",mathWrap:"mathWrap___FmnMJ",mathFillWrap:"mathFillWrap___PmY3H"}},12085:function(qt,Dt){"use strict";Dt.Z={header:"header___HqHSe",checkboxs:"checkboxs___ObBnD",field:"field___w_sM6","oj-form-container":"oj-form-container____odYP","oj-left-panel":"oj-left-panel___emEB2","oj-form-info":"oj-form-info___m00Ag",footer:"footer___O4iSJ",collapse:"collapse___Ltfkj","test-case-name":"test-case-name___miZcb","btn-remove-case":"btn-remove-case___cHap2","icon-tag":"icon-tag___gmyTb",btn_back:"btn_back___tNmX3",testJi:"testJi___L3fHb",upBtn:"upBtn___RGH6X",djs:"djs____TS0n",time:"time___IAdHc"}},45298:function(){"use strict"},60515:function(qt,Dt,be){"use strict";var ce=be(59301),ie=Object.defineProperty,Ce=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,te=(ne,E,b)=>E in ne?ie(ne,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):ne[E]=b,le=(ne,E)=>{for(var b in E||(E={}))ue.call(E,b)&&te(ne,b,E[b]);if(Ce)for(var b of Ce(E))se.call(E,b)&&te(ne,b,E[b]);return ne};const ee=ne=>React.createElement("svg",le({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},ne),React.createElement("title",null,"\u5360\u7528\u5185\u5B58"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{fillOpacity:.01,fill:"#FFF",d:"M0 0h30v30H0z"}),React.createElement("path",{d:"M6.866 26.928h-1.28a2.561 2.561 0 0 1-2.562-2.561V5.585a2.561 2.561 0 0 1 2.561-2.56h1.28v4.268a2.561 2.561 0 0 0 2.562 2.56h3.842a2.561 2.561 0 0 0 2.56-2.56V3.024h2.915l8.184 8.184v13.159a2.561 2.561 0 0 1-2.561 2.561h-1.28v-5.976c0-.943-.765-1.707-1.708-1.707H8.573c-.943 0-1.707.764-1.707 1.707v5.976Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M8.573 3.024h5.55v4.269a.854.854 0 0 1-.854.853H9.427a.854.854 0 0 1-.854-.853V3.024ZM8.573 26.928v-5.976H21.38v5.976z",fill:"#1890FF"})));Dt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBmaWxsLW9wYWNpdHk9Ii4wMSIgZmlsbD0iI0ZGRiIgZD0iTTAgMGgzMHYzMEgweiIvPjxwYXRoIGQ9Ik02Ljg2NiAyNi45MjhoLTEuMjhhMi41NjEgMi41NjEgMCAwIDEtMi41NjItMi41NjFWNS41ODVhMi41NjEgMi41NjEgMCAwIDEgMi41NjEtMi41NmgxLjI4djQuMjY4YTIuNTYxIDIuNTYxIDAgMCAwIDIuNTYyIDIuNTZoMy44NDJhMi41NjEgMi41NjEgMCAwIDAgMi41Ni0yLjU2VjMuMDI0aDIuOTE1bDguMTg0IDguMTg0djEzLjE1OWEyLjU2MSAyLjU2MSAwIDAgMS0yLjU2MSAyLjU2MWgtMS4yOHYtNS45NzZjMC0uOTQzLS43NjUtMS43MDctMS43MDgtMS43MDdIOC41NzNjLS45NDMgMC0xLjcwNy43NjQtMS43MDcgMS43MDd2NS45NzZaIiBmaWxsPSIjQjZEMEZDIi8+PHBhdGggZD0iTTguNTczIDMuMDI0aDUuNTV2NC4yNjlhLjg1NC44NTQgMCAwIDEtLjg1NC44NTNIOS40MjdhLjg1NC44NTQgMCAwIDEtLjg1NC0uODUzVjMuMDI0Wk04LjU3MyAyNi45Mjh2LTUuOTc2SDIxLjM4djUuOTc2eiIgZmlsbD0iIzE4OTBGRiIvPjwvZz48L3N2Zz4="},88977:function(qt,Dt,be){"use strict";var ce=be(59301),ie=Object.defineProperty,Ce=Object.getOwnPropertySymbols,ue=Object.prototype.hasOwnProperty,se=Object.prototype.propertyIsEnumerable,te=(ne,E,b)=>E in ne?ie(ne,E,{enumerable:!0,configurable:!0,writable:!0,value:b}):ne[E]=b,le=(ne,E)=>{for(var b in E||(E={}))ue.call(E,b)&&te(ne,b,E[b]);if(Ce)for(var b of Ce(E))se.call(E,b)&&te(ne,b,E[b]);return ne};const ee=ne=>React.createElement("svg",le({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},ne),React.createElement("title",null,"\u8FD0\u884C\u65F6\u95F4"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M30 15c0 8.284-6.716 15-15 15-8.284 0-15-6.716-15-15C0 6.716 6.716 0 15 0c8.284 0 15 6.716 15 15Z",fill:"#BAFFF0"}),React.createElement("path",{d:"M25.5 15c0 5.8-4.7 10.5-10.5 10.5S4.5 20.8 4.5 15 9.2 4.5 15 4.5 25.5 9.2 25.5 15Z",fill:"#44D7B6"}),React.createElement("path",{d:"M13.5 9a1.5 1.5 0 0 1 1.5 1.5v4.379l3.56 3.56a1.5 1.5 0 0 1-2.12 2.122l-4-4A1.5 1.5 0 0 1 12 15.5v-5A1.5 1.5 0 0 1 13.5 9Z",fill:"#FFF"})));Dt.Z="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMzAgMTVjMCA4LjI4NC02LjcxNiAxNS0xNSAxNS04LjI4NCAwLTE1LTYuNzE2LTE1LTE1QzAgNi43MTYgNi43MTYgMCAxNSAwYzguMjg0IDAgMTUgNi43MTYgMTUgMTVaIiBmaWxsPSIjQkFGRkYwIi8+PHBhdGggZD0iTTI1LjUgMTVjMCA1LjgtNC43IDEwLjUtMTAuNSAxMC41UzQuNSAyMC44IDQuNSAxNSA5LjIgNC41IDE1IDQuNSAyNS41IDkuMiAyNS41IDE1WiIgZmlsbD0iIzQ0RDdCNiIvPjxwYXRoIGQ9Ik0xMy41IDlhMS41IDEuNSAwIDAgMSAxLjUgMS41djQuMzc5bDMuNTYgMy41NmExLjUgMS41IDAgMCAxLTIuMTIgMi4xMjJsLTQtNEExLjUgMS41IDAgMCAxIDEyIDE1LjV2LTVBMS41IDEuNSAwIDAgMSAxMy41IDlaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg=="},11081:function(module,exports,__webpack_require__){var __WEBPACK_AMD_DEFINE_ARRAY__,__WEBPACK_AMD_DEFINE_RESULT__;(function(){if(typeof window.GGBApplet=="function"){console.warn("deployggb.js was loaded twice");return}var isRenderGGBElementEnabled=!1,scriptLoadStarted=!1,html5AppletsToProcess=null,ggbHTML5LoadedCodebaseIsWebSimple=!1,ggbHTML5LoadedCodebaseVersion=null,ggbHTML5LoadedScript=null,GGBApplet=function(){"use strict";for(var qt={},Dt="5.0",be={},ce=null,ie=!1,Ce=!1,ue=null,se=!1,te=null,le=null,ee=0;ee<arguments.length;ee++){var ne=arguments[ee];if(ne!==null)switch(typeof ne){case"number":Dt=ne.toFixed(1);break;case"string":ne.match(new RegExp("^[0-9]\\.[0-9]+$"))?Dt=ne:ue=ne;break;case"object":typeof ne.is3D!="undefined"?ce=ne:be=ne;break;case"boolean":ie=ne,Ce=!0;break}}ce===null&&(ce={is3D:!1,AV:!1,SV:!1,CV:!1,EV2:!1,CP:!1,PC:!1,DA:!1,FI:!1,PV:!1,macro:!1},be.material_id!==void 0&&!Ce&&(ie=!0)),ue!==null&&be.id===void 0&&(be.id=ue);var E="",b="",z=!1,x=null,re=null,ae=null,oe=!1,ve=null,ye=null,me=null,ge=null,_e=null;be.height!==void 0&&(be.height=Math.round(be.height)),be.width!==void 0&&(be.width=Math.round(be.width));var he=function(et){return parseFloat(et)>4?parseFloat(et):5};qt.setHTML5Codebase=function(et,pt){le=et,Ve(et,pt)},qt.setJavaCodebase=qt.setJavaCodebaseVersion=qt.isCompiledInstalled=qt.setPreCompiledScriptPath=qt.setPreCompiledResourcePath=function(){},qt.setHTML5CodebaseVersion=function(et,pt){var ct=parseFloat(et);if(ct!==NaN&&ct<5){console.log("The GeoGebra HTML5 codebase version "+ct+" is deprecated. Using version latest instead.");return}te=et,ze(et,pt)},qt.getHTML5CodebaseVersion=function(){return re},qt.getParameters=function(){return be},qt.setFontsCSSURL=function(et){ge=et},qt.setGiacJSURL=function(et){},qt.setJNLPFile=function(et){E=et},qt.setJNLPBaseDir=function(et){},qt.inject=function(){function et(){return window.frameElement&&window.frameElement.getAttribute("data-singleton")}for(var pt="auto",ct=be.id,It,dt=!1,Mt=0;Mt<arguments.length;Mt++){var xt=arguments[Mt];typeof xt=="string"?(xt=xt.toLowerCase(),xt.match(/^(prefer)?(java|html5|compiled|auto|screenshot)$/)?pt=xt:ct=arguments[Mt]):typeof xt=="boolean"?dt=xt:xt instanceof HTMLElement&&(It=xt)}gt();function gt(){if(!se){setTimeout(gt,200);return}pt=ut(pt);var _t=It||document.getElementById(ct);if(!_t){console.log("possibly bug on ajax loading? ");return}if(qt.removeExistingApplet(_t,!1),be.width===void 0&&_t.clientWidth&&(be.width=_t.clientWidth),be.height===void 0&&_t.clientHeight&&(be.height=_t.clientHeight),!(be.width&&be.height)&&pt==="html5"&&(delete be.width,delete be.height),x=pt,pt==="screenshot")Xe(_t,be);else{var We=!1;be.hasOwnProperty("playButton")&&be.playButton||be.hasOwnProperty("clickToLoad")&&be.clickToLoad?We=!0:be.hasOwnProperty("playButtonAutoDecide")&&be.playButtonAutoDecide&&(We=(!pe()||et())&&ke()),We?(x="screenshot",He(_t,be,dt,pt)):Qe(_t,be,dt)}}};function pe(){try{return window.self!==window.top}catch(et){return!0}}function ke(){return be.hasOwnProperty("screenshotGenerator")&&be.screenshotGenerator?!1:Math.max(screen.width,screen.height)<800}qt.getViews=function(){return ce},qt.isJavaInstalled=function(){return!1};var Te=function(et){var pt=function(Mt){var xt=JSON.parse(Mt),gt=function(Ae){return Ae.type=="G"||Ae.type=="E"},_t=xt.elements?xt.elements.filter(gt)[0]:xt;if(!_t||!_t.url){ct();return}be.fileName=_t.url,Ee(_t.settings||{}),ce.is3D=!0;var We="https://www.geogebra.org/images/";qt.setPreviewImage(ve||_t.previewUrl,We+"GeoGebra_loading.png",We+"applet_play.png"),et()},ct=function(){be.onError&&be.onError(),$e("Error: Fetching material (id "+be.material_id+") failed.",be)},It=location.host.match(/(www|stage|beta|groot|alpha).geogebra.(org|net)/)?location.host:"www.geogebra.org",dt="/materials/"+be.material_id+"?scope=basic";Oe("https://"+It+"/api/proxy.php?path="+encodeURIComponent(dt),pt,ct)};function Ee(et){var pt=["width","height","showToolBar","showMenuBar","showAlgebraInput","allowStyleBar","showResetIcon","enableLabelDrags","enableShiftDragZoom","enableRightClick","appName"];["enableLabelDrags","enableShiftDragZoom","enableRightClick"].forEach(function(ct){et[ct]=!!et[ct]}),pt.forEach(function(ct){be[ct]===void 0&&et[ct]!==void 0&&(be[ct]=et[ct])}),be.showToolBarHelp===void 0&&(be.showToolBarHelp=be.showToolBar)}function Oe(et,pt,ct){var It=new XMLHttpRequest;It.open("GET",et),It.onload=function(){pt(It.responseText)},It.onerror=ct,It.send()}qt.isHTML5Installed=function(){return!0},qt.getLoadedAppletType=function(){return x},qt.setPreviewImage=function(et,pt,ct){ve=et,ye=pt,me=ct},qt.removeExistingApplet=function(et,pt){var ct;typeof et=="string"&&(et=document.getElementById(et)),x=null;var It=null;for(ct=0;ct<et.childNodes.length;ct++){var dt=et.childNodes[ct],Mt=dt.className;Mt==="applet_screenshot"?pt?(dt.style.display="block",x="screenshot"):dt.style.display="none":Mt!=="applet_scaler prerender"&&(et.removeChild(dt),It=Mt&&Mt.indexOf("appletParameters")!=-1?dt.id:null,ct--)}var xt=be.id!==void 0?be.id:It,gt=window[xt];gt&&typeof gt.getBase64=="function"&&(gt.remove(),window[xt]=null)},qt.refreshHitPoints=function(){if(he(ggbHTML5LoadedCodebaseVersion)>=5)return!0;var et=qt.getAppletObject();return et&&typeof et.recalculateEnvironments=="function"?(et.recalculateEnvironments(),!0):!1},qt.startAnimation=function(){var et=qt.getAppletObject();return et&&typeof et.startAnimation=="function"?(et.startAnimation(),!0):!1},qt.stopAnimation=function(){var et=qt.getAppletObject();return et&&typeof et.stopAnimation=="function"?(et.stopAnimation(),!0):!1},qt.getAppletObject=function(){var et=be.id!==void 0?be.id:"ggbApplet";return window[et]},qt.resize=function(){};var je=function(et,pt,ct){var It=document.createElement("param");It.setAttribute("name",pt),It.setAttribute("value",ct),et.appendChild(It)},Pe=function(et){return et&&et!=="false"},Qe=function(et,pt,ct){he(re)<=4.2&&(ct=!0);var It=!isRenderGGBElementEnabled&&!scriptLoadStarted;(!isRenderGGBElementEnabled&&!scriptLoadStarted||ggbHTML5LoadedCodebaseVersion!==re||ggbHTML5LoadedCodebaseIsWebSimple&&!oe)&&(It=!0,isRenderGGBElementEnabled=!1,scriptLoadStarted=!1);var dt=document.createElement("div");dt.classList.add("appletParameters","notranslate");var Mt=pt.width,xt=pt.height;if(pt.disableAutoScale=pt.disableAutoScale===void 0?GGBAppletUtils.isFlexibleWorksheetEditor():pt.disableAutoScale,pt.width!==void 0)if(he(re)<=4.4)Pe(pt.showToolBar)&&(pt.height-=7),Pe(pt.showAlgebraInput)&&(pt.height-=37),pt.width<605&&Pe(pt.showToolBar)&&(pt.width=605,Mt=605);else{var gt=100;(Pe(pt.showToolBar)||Pe(pt.showMenuBar))&&(pt.hasOwnProperty("customToolBar")&&(pt.customToolbar=pt.customToolBar),gt=Pe(pt.showMenuBar)?245:155),Mt<gt&&(pt.width=gt,Mt=gt)}dt.style.border="none",dt.style.display="inline-block";for(var _t in pt)pt.hasOwnProperty(_t)&&_t!=="appletOnLoad"&&dt.setAttribute("data-param-"+_t,pt[_t]);ge&&dt.setAttribute("data-param-fontscssurl",ge),qt.resize=function(){GGBAppletUtils.responsiveResize(et,pt)},window.addEventListener("resize",function(tt){qt.resize()});var We=typeof pt.appletOnLoad=="function"?pt.appletOnLoad:function(){};if(!ct&&pt.width!==void 0){pt.hasOwnProperty("showSplash")||dt.setAttribute("data-param-showSplash","false");var Ae=et.querySelector(".applet_scaler.prerender"),Se=Ae!==null;if(Se)var Be=Ae.querySelector(".ggb_preview");else{var Be=Ye(Mt,xt,pt.borderColor,!1);Ae=document.createElement("div"),Ae.className="applet_scaler",Ae.style.position="relative",Ae.style.display="block",Ae.style.width=Mt+"px",Ae.style.height=xt+"px"}window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(Ae,"66%"),he(re)>=5?(pt.appletOnLoad=function(tt){var lt=et.querySelector(".ggb_preview");lt&<.parentNode.removeChild(lt),window.GGBT_spinner&&window.GGBT_spinner.removeSpinner(Ae),window.GGBT_wsf_view&&$(window).trigger("resize"),We(tt)},Se||Ae.appendChild(Be)):dt.appendChild(Be),Ae.appendChild(dt),Se||et.appendChild(Ae),setTimeout(function(){qt.resize()},1)}else{var Ke=document.createElement("div");Ke.className="applet_scaler",Ke.style.position="relative",Ke.style.display="block",Ke.appendChild(dt),et.appendChild(Ke),pt.appletOnLoad=function(tt){qt.resize(),We(tt)}}function Ne(tt,lt){lt&&typeof lt.appletOnLoad=="function"&&typeof renderGGBElement=="function"?renderGGBElement(tt,lt.appletOnLoad):renderGGBElement(tt),$e("GeoGebra HTML5 applet injected and rendered with previously loaded codebase.",lt)}function De(tt,lt){typeof renderGGBElement=="undefined"?(html5AppletsToProcess===null&&(html5AppletsToProcess=[]),html5AppletsToProcess.push({article:tt,params:lt}),window.renderGGBElementReady=function(){isRenderGGBElementEnabled=!0,html5AppletsToProcess!==null&&html5AppletsToProcess.length&&(html5AppletsToProcess.forEach(function(Pt){Ne(Pt.article,Pt.params)}),html5AppletsToProcess=null)},he(re)<5&&(tt.className+=" geogebraweb")):Ne(tt,lt)}if(It){scriptLoadStarted=!0;for(var we=0;we<dt.childNodes.length;we++){var Le=dt.childNodes[we].tagName;Le==="TABLE"&&(dt.removeChild(dt.childNodes[we]),we--)}if(ggbHTML5LoadedScript!==null){var Ue=document.querySelector('script[src="'+ggbHTML5LoadedScript+'"]');Ue!=null&&Ue.parentNode.removeChild(Ue)}var Me=document.createElement("script"),Re=function(){De(dt,pt)};Me.src=b+ae,ggbHTML5LoadedCodebaseIsWebSimple=oe,ggbHTML5LoadedCodebaseVersion=re,ggbHTML5LoadedScript=Me.src,$e("GeoGebra HTML5 codebase loaded: '"+b+"'.",pt),!le&&(!te||te=="5.0")?(oe?webSimple.succeeded=webSimple.succeeded||webSimple():web3d.succeeded=web3d.succeeded||web3d(),Re()):b.requirejs?__webpack_require__.e(981).then(function(){var tt=[__webpack_require__(60981)];Re.apply(null,tt)}.bind(this)).catch(__webpack_require__.oe):(Me.onload=Re,et.appendChild(Me))}else De(dt,pt);pt.height=xt,pt.width=Mt},Xe=function(et,pt,ct){var It=Ye(pt.width,pt.height,pt.borderColor,ct),dt=document.createElement("div");dt.style.position="relative",dt.style.display="block",dt.style.width=pt.width+"px",dt.style.height=pt.height+"px",dt.className="applet_screenshot applet_scaler"+(ct?" applet_screenshot_play":""),dt.appendChild(It);var Mt=GGBAppletUtils.getScale(pt,et,ct);ct?(et.appendChild(rt()),window.GGBT_wsf_view||(et.style.position="relative")):window.GGBT_spinner&&window.GGBT_spinner.attachSpinner(dt,"66%"),et.appendChild(dt),Mt!==1&&!isNaN(Mt)&&(GGBAppletUtils.scaleElement(dt,Mt),dt.style.width=pt.width+"px",dt.style.height=pt.height+"px",dt.parentNode.style.width=pt.width*Mt+"px",dt.parentNode.style.height=pt.height*Mt+"px"),qt.resize=function(){ot(et,It,dt,ct)},window.addEventListener("resize",function(xt){qt.resize()}),qt.resize()};function ot(et,pt,ct,It){if(et.contains(pt)){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(et.id!=="fullscreencontent")return;window.GGBT_wsf_view.setCloseBtnPosition(et)}var dt=GGBAppletUtils.getScale(be,et,It);ct.parentNode!==null&&(!isNaN(dt)&&dt!==1?(GGBAppletUtils.scaleElement(ct,dt),ct.parentNode.style.width=be.width*dt+"px",ct.parentNode.style.height=be.height*dt+"px"):(GGBAppletUtils.scaleElement(ct,1),ct.parentNode.style.width=be.width+"px",ct.parentNode.style.height=be.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&GGBAppletUtils.positionCenter(et),typeof window.GGBT_ws_header_footer=="object"&&window.GGBT_ws_header_footer.setWsScrollerHeight()}}qt.onExitFullscreen=function(et,pt){pt.appendChild(et)};var He=function(et,pt,ct,It){Xe(et,pt,!0);for(var dt=function(){var gt=[];for(xt=0;xt<et.childNodes.length;xt++)gt.push(et.childNodes[xt]);if(window.GGBT_wsf_view){var _t=window.GGBT_wsf_view.renderFullScreen(et,pt.id),We=document.getElementById("fullscreencontainer"),Ae=jQuery(et).find(".fullscreencontent");Ae.length>0?(_t.remove(),Ae.attr("id","fullscreencontent").show(),jQuery(We).append(Ae),window.dispatchEvent(new Event("resize"))):Qe(_t,pt,!1),window.GGBT_wsf_view.launchFullScreen(We)}else x=It,Qe(et,pt,!1);if(!window.GGBT_wsf_view)for(xt=0;xt<gt.length;xt++)et.removeChild(gt[xt])},Mt=et.getElementsByClassName("ggb_preview_play"),xt=0;xt<Mt.length;xt++)Mt[xt].addEventListener("click",dt,!1),Mt[xt].addEventListener("ontouchstart",dt,!1);typeof window.ggbAppletPlayerOnload=="function"&&window.ggbAppletPlayerOnload(et),ke()&&window.GGBT_wsf_view&&$(".wsf-element-fullscreen-button").remove()},rt=function(){var et=document.createElement("div");if(et.className="ggb_preview_play icon-applet-play",!window.GGBT_wsf_view){var pt='.icon-applet-play { width: 100%; height: 100%;box-sizing: border-box;position: absolute;z-index: 1001;cursor: pointer;border-width: 0px; background-color: transparent;background-repeat: no-repeat;left: 0;top: 0;background-position: center center; background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet.png");}.icon-applet-play:hover {background-image: url("https://www.geogebra.org/images/worksheet/icon-start-applet-hover.png");}',ct=document.createElement("style");ct.styleSheet?ct.styleSheet.cssText=pt:ct.appendChild(document.createTextNode(pt)),document.getElementsByTagName("head")[0].appendChild(ct)}return et},Ye=function(et,pt,ct,It){var dt=document.createElement("div");dt.className="ggb_preview",dt.style.position="absolute",dt.style.zIndex="90",dt.style.width=et-2+"px",dt.style.height=pt-2+"px",dt.style.top="0px",dt.style.left="0px",dt.style.overflow="hidden",dt.style.backgroundColor="white";var Mt="lightgrey";ct!==void 0&&(ct==="none"?Mt="transparent":Mt=ct),dt.style.border="1px solid "+Mt;var xt=document.createElement("img");if(xt.style.position="relative",xt.style.zIndex="1000",xt.style.top="-1px",xt.style.left="-1px",ve!==null&&xt.setAttribute("src",ve),xt.style.opacity=.7,ye!==null){var gt,_t,We;if(!It){gt=document.createElement("img"),gt.style.position="absolute",gt.style.zIndex="1001",gt.style.opacity=1,xt.style.opacity=.3,_t=360,_t>et/4*3&&(_t=et/4*3),We=_t/5.8,gt.setAttribute("src",ye),gt.setAttribute("width",_t),gt.setAttribute("height",We);var Ae=(et-_t)/2,Se=(pt-We)/2;gt.style.left=Ae+"px",gt.style.top=Se+"px",dt.appendChild(gt)}}return dt.appendChild(xt),dt},ut=function(et){return et=et.toLowerCase(),et==="html5"||et==="screenshot"?et:"html5"},Ge=["web","webSimple","web3d","tablet","tablet3d","phone"],ze=function(et,pt){if(re=et,pt){Ve(re,!0);return}var ct=!ie;if(ct){var It=he(re);!isNaN(It)&&It<4.4&&(ct=!1)}var dt,Mt;window.location.protocol.substr(0,4)==="http"?dt=window.location.protocol:dt="http:";var xt=re.indexOf("//");xt>0?Mt=re:xt===0?Mt=dt+re:Mt="https://www.geogebra.org/apps/5.2.814.0/";for(var gt in Ge)if(re.slice(Ge[gt].length*-1)===Ge[gt]||re.slice((Ge[gt].length+1)*-1)===Ge[gt]+"/"){Ve(Mt,!1);return}!GGBAppletUtils.isFlexibleWorksheetEditor()&&ct&&!ce.is3D&&!ce.AV&&!ce.SV&&!ce.CV&&!ce.EV2&&!ce.CP&&!ce.PC&&!ce.DA&&!ce.FI&&!ce.PV&&!Pe(be.showToolBar)&&!Pe(be.showMenuBar)&&!Pe(be.showAlgebraInput)&&!Pe(be.enableRightClick)&&(!be.appName||be.appName=="classic")?Mt+="webSimple/":Mt+="web3d/",Ve(Mt,!1)},Ve=function(et,pt){if(et.requirejs){b=et;return}et.slice(-1)!=="/"&&(et+="/"),b=et,pt===null&&(pt=et.indexOf("http")===-1),z=pt,ae="web.nocache.js",oe=!1;var ct=b.split("/");ct.length>1&&(!pt&&ct[ct.length-2]==="webSimple"?(ae="webSimple.nocache.js",oe=!0):Ge.indexOf(ct[ct.length-2])>=0&&(ae=ct[ct.length-2]+".nocache.js")),ct=et.split("/"),re=ct[ct.length-3],re.substr(0,4)==="test"?re=re.substr(4,1)+"."+re.substr(5,1):(re.substr(0,3)==="war"||re.substr(0,4)==="beta")&&(re="5.0");var It=parseFloat(re);It!==NaN&&It<5&&et.indexOf("geogebra.org")>=0&&(console.log("The GeoGebra HTML5 codebase version "+It+" is deprecated. Using version latest instead."),ze("5.0",pt))},$e=function(et,pt){window.console&&window.console.log&&(!pt||typeof pt.showLogging=="undefined"||pt.showLogging&&pt.showLogging!=="false")&&console.log(et)};be.material_id!==void 0?Te(nt):nt();function nt(){var et=Dt;te!==null?et=te:parseFloat(et)<5&&(et="5.0"),ze(et,!1),le!==null&&Ve(le,z),se=!0}return qt},GGBAppletUtils=function(){"use strict";function qt(){return window.GGBT_wsf_edit!==void 0}function Dt(se,te){te!=1?(se.style.transformOrigin="0% 0% 0px",se.style.webkitTransformOrigin="0% 0% 0px",se.style.transform="scale("+te+","+te+")",se.style.webkitTransform="scale("+te+","+te+")",se.style.maxWidth="initial",se.querySelector(".ggb_preview")!==null&&(se.querySelector(".ggb_preview").style.maxWidth="initial"),se.querySelectorAll(".ggb_preview img")[0]!==void 0&&(se.querySelectorAll(".ggb_preview img")[0].style.maxWidth="initial"),se.querySelectorAll(".ggb_preview img")[1]!==void 0&&(se.querySelectorAll(".ggb_preview img")[1].style.maxWidth="initial")):(se.style.transform="none",se.style.webkitTransform="none")}function be(se,te,le,ee,ne,E){var b=null;if(E!=null&&E!="")for(var z=se.parentNode;z!=null;)if((" "+z.className+" ").indexOf(" "+E+" ")>-1){b=z;break}else z=z.parentNode;var x=0,re=0,ae=0,oe=0,ve=0,ye=0,me=0;if(b)x=b.offsetWidth,re=Math.max(ee?b.offsetWidth:0,b.offsetHeight);else{if(window.innerWidth&&document.documentElement.clientWidth?(x=Math.min(window.innerWidth,document.documentElement.clientWidth),re=Math.min(window.innerHeight,document.documentElement.clientHeight),ae=x):(x=window.innerWidth,re=window.innerHeight,ae=window.innerWidth),se){var ge=se.getBoundingClientRect();ge.left>0&&ge.left<=x&&(ne===void 0||!ne)&&(document.dir==="rtl"?(ve=x-ge.width-ge.left,ye=ae<=480?10:30):(ye=ge.left,ve=ae<=480?10:30),oe=ye+ve)}if(se&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){var _e=se.getBoundingClientRect();window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(oe=40,me=0):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(oe=0,me=40)}}return se&&((le===void 0||!le)&&te>0&&te+oe<x?x=te:x-=oe,typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(le===void 0||!le)&&(re-=me)),{width:x,height:re}}function ce(se,te,le,ee,ne){if(se.isScreenshoGenerator)return 1;var E=ee!==void 0&&ee,b=se.noScaleMargin!=null&&se.noScaleMargin,z=function(_e){return _e&&_e!=="false"},x=z(se.autoHeight),re=be(te,se.width,le,x,E&&window.GGBT_wsf_view||b,ne),ae=parseInt(re.width),oe=se.width,ve=se.height;if(oe===void 0){var ye=te.querySelector(".appletParameters");ye&&(oe=ye.offsetWidth,ve=ye.offsetHeight)}var me=ae/oe,ge=E?1:re.height/ve;return le!==void 0&&!le&&(me=Math.min(1,me),ge=Math.min(1,ge)),Math.min(me,ge)}function ie(se,te,le){var ee=1,ne,E=!1;if(se.hasOwnProperty("allowUpscale")&&(E=se.allowUpscale),se.hasOwnProperty("scale")&&(ee=parseFloat(se.scale),(isNaN(ee)||ee===null||ee===0)&&(ee=1),ee>1&&(E=!0)),te&&typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&(E=!0),!(se.hasOwnProperty("disableAutoScale")&&se.disableAutoScale))ne=ce(se,te,E,le,se.scaleContainerClass);else return ee;return E&&(!se.hasOwnProperty("scale")||ee===1)?ne:Math.min(ee,ne)}function Ce(se){var te=Math.min(window.innerWidth,document.documentElement.clientWidth),le=Math.min(window.innerHeight,document.documentElement.clientHeight),ee=se.getBoundingClientRect(),ne=(te-ee.width)/2,E=(le-ee.height)/2;E<0&&(E=0),se.style.position="relative",window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionRight"?(ne<40?se.style.left="40px":se.style.left=ne+"px",se.style.top=E+"px"):window.GGBT_wsf_view.getCloseBtnPosition()==="closePositionTop"&&(E<40?se.style.top="40px":se.style.top=E+"px",se.style.left=ne+"px")}function ue(se,te){var le=se.querySelector(".appletParameters");if(le){if(typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()){if(te.id!==le.getAttribute("data-param-id"))return;window.GGBT_wsf_view.setCloseBtnPosition(se)}if(le.parentElement&&/fullscreen/.test(le.parentElement.className))return;var ee=ie(te,se);qt()&&le.setAttribute("data-param-scale",ee);for(var ne=null,E=0;E<se.childNodes.length;E++)if(se.childNodes[E].className!==void 0&&se.childNodes[E].className.match(/^applet_scaler/)){ne=se.childNodes[E];break}if(ne!==null&&ne.querySelector(".noscale")!==null)return;var b=te.id!==void 0?te.id:"ggbApplet",z=window[b];(z==null||!z.recalculateEnvironments)&&ne!==null&&!ne.className.match(/fullscreen/)&&(ne.parentNode.style.transform="",!isNaN(ee)&&ee!==1?(ne.parentNode.style.width=te.width*ee+"px",ne.parentNode.style.height=te.height*ee+"px",Dt(ne,ee)):(Dt(ne,1),ne.parentNode.style.width=te.width+"px",ne.parentNode.style.height=te.height+"px")),typeof window.GGBT_wsf_view=="object"&&window.GGBT_wsf_view.isFullscreen()&&Ce(se),window.GGBT_wsf_view&&!window.GGBT_wsf_view.isFullscreen()&&window.GGBT_wsf_general.adjustContentToResize($(le).parents(".content-added-content"))}}return{responsiveResize:ue,isFlexibleWorksheetEditor:qt,positionCenter:Ce,getScale:ie,scaleElement:Dt}}();__WEBPACK_AMD_DEFINE_ARRAY__=[],__WEBPACK_AMD_DEFINE_RESULT__=function(){return GGBApplet}.apply(exports,__WEBPACK_AMD_DEFINE_ARRAY__),__WEBPACK_AMD_DEFINE_RESULT__!==void 0&&(module.exports=__WEBPACK_AMD_DEFINE_RESULT__),GGBAppletUtils.makeModule=function(name,permutation){function webModule(){var H="bootstrap",I="begin",J="gwt.codesvr."+name+"=",K="gwt.codesvr=",L=name,M="startup",N="DUMMY",O=0,P=1,Q="iframe",R="position:absolute; width:0; height:0; border:none; left: -1000px;",S=" top: -1000px;",T="Chrome",U="CSS1Compat",V="<!doctype html>",W="",X="<html><head></head><body></body></html>",Y="undefined",Z="readystatechange",$=10,_="script",ab="javascript",bb="Failed to load ",cb="moduleStartup",db="scriptTagAdded",eb="moduleRequested",fb="meta",gb="name",hb=name+"::",ib="::",jb="gwt:property",kb="content",lb="=",mb="gwt:onPropertyErrorFn",nb='Bad handler "',ob='" for "gwt:onPropertyErrorFn"',pb="gwt:onLoadErrorFn",qb='" for "gwt:onLoadErrorFn"',rb="#",sb="?",tb="/",ub="img",vb="clear.cache.gif",wb="baseUrl",xb=name+".nocache.js",yb="base",zb="//",Ab="selectingPermutation",Bb=name+".devmode.js",Cb=permutation,Db=":",Eb=".cache.js",Fb="loadExternalRefs",Gb="end",n=window,o=document;function p(){var qt=n.location.search;return qt.indexOf(J)!=-1||qt.indexOf(K)!=-1}function q(qt,Dt){}webModule.__sendStats=q,webModule.__moduleName=L,webModule.__errFn=null,webModule.__moduleBase=N,webModule.__softPermutationId=O,webModule.__computePropValue=null,webModule.__getPropMap=null,webModule.__installRunAsyncCode=function(){},webModule.__gwtStartLoadingFragment=function(){return null},webModule.__gwt_isKnownPropertyValue=function(){return!1},webModule.__gwt_getMetaProperty=function(){return null};var r=null,s=n.__gwt_activeModules=n.__gwt_activeModules||{};s[L]={moduleName:L},webModule.__moduleStartupDone=function(qt){var Dt=s[L].bindings;s[L].bindings=function(){for(var be=Dt?Dt():{},ce=qt[webModule.__softPermutationId],ie=O;ie<ce.length;ie++){var Ce=ce[ie];be[Ce[O]]=Ce[P]}return be}};var t;function u(){return v(),t}function v(){if(!t){var qt=o.createElement(Q);if(qt.id=L,qt.style.cssText=R+S,qt.tabIndex=-1,o.body.appendChild(qt),t=qt.contentWindow.document,navigator.userAgent.indexOf(T)==-1){t.open();var Dt=document.compatMode==U?V:W;t.write(Dt+X),t.close()}}}function w(qt){function Dt(ce){function ie(){return typeof o.readyState==Y?typeof o.body!=Y&&o.body!=null:/loaded|complete/.test(o.readyState)}var Ce=ie();if(Ce){ce();return}function ue(){if(!Ce){if(!ie())return;Ce=!0,ce(),o.removeEventListener&&o.removeEventListener(Z,ue,!1),se&&clearInterval(se)}}o.addEventListener&&o.addEventListener(Z,ue,!1);var se=setInterval(function(){ue()},$)}function be(ce){var ie=u(),Ce=ie.body,ue=ie.createElement(_);ue.language=ab,ue.crossOrigin=W,ue.src=ce,webModule.__errFn&&(ue.onerror=function(){webModule.__errFn(L,new Error(bb+ce))}),Ce.appendChild(ue)}Dt(function(){be(qt)})}webModule.__startLoadingFragment=function(qt){return C(qt)},webModule.__installRunAsyncCode=function(qt){var Dt=u(),be=Dt.body,ce=Dt.createElement(_);ce.language=ab,ce.text=qt,be.appendChild(ce),be.removeChild(ce)};function A(){for(var c={},d,e,f=o.getElementsByTagName(fb),g=O,h=f.length;g<h;++g){var i=f[g],j=i.getAttribute(gb),k;if(j){if(j=j.replace(hb,W),j.indexOf(ib)>=O)continue;if(j==jb){if(k=i.getAttribute(kb),k){var l,m=k.indexOf(lb);m>=O?(j=k.substring(O,m),l=k.substring(m+P)):(j=k,l=W),c[j]=l}}else if(j==mb){if(k=i.getAttribute(kb),k)try{d=eval(k)}catch(qt){alert(nb+k+ob)}}else if(j==pb&&(k=i.getAttribute(kb),k))try{e=eval(k)}catch(qt){alert(nb+k+qb)}}}__gwt_getMetaProperty=function(qt){var Dt=c[qt];return Dt==null?null:Dt},r=d,webModule.__errFn=e}function B(){function qt(se){var te=se.lastIndexOf(rb);te==-1&&(te=se.length);var le=se.indexOf(sb);le==-1&&(le=se.length);var ee=se.lastIndexOf(tb,Math.min(le,te));return ee>=O?se.substring(O,ee+P):W}function Dt(se){if(!se.match(/^\w+:\/\//)){var te=o.createElement(ub);te.src=se+vb,se=qt(te.src)}return se}function be(){var se=__gwt_getMetaProperty(wb);return se!=null?se:W}function ce(){for(var se=o.getElementsByTagName(_),te=O;te<se.length;++te)if(se[te].src.indexOf(xb)!=-1)return qt(se[te].src);return W}function ie(){var se=o.getElementsByTagName(yb);return se.length>O?se[se.length-P].href:W}function Ce(){var se=o.location;return se.href==se.protocol+zb+se.host+se.pathname+se.search+se.hash}var ue=be();return ue==W&&(ue=ce()),ue==W&&(ue=ie()),ue==W&&Ce()&&(ue=qt(o.location.href)),ue=Dt(ue),ue}function C(qt){return qt.match(/^\//)||qt.match(/^[a-zA-Z]+:\/\//)?qt:webModule.__moduleBase+qt}function D(){var qt=[],Dt=O,be=[],ce=[];function ie(se){var te=ce[se](),le=be[se];if(te in le)return te;var ee=[];for(var ne in le)ee[le[ne]]=ne;throw r&&r(se,ee,te),null}if(__gwt_isKnownPropertyValue=function(se,te){return te in be[se]},webModule.__getPropMap=function(){var se={};for(var te in be)be.hasOwnProperty(te)&&(se[te]=ie(te));return se},webModule.__computePropValue=ie,n.__gwt_activeModules[L].bindings=webModule.__getPropMap,p())return C(Bb);var Ce;try{Ce=Cb;var ue=Ce.indexOf(Db);ue!=-1&&(Dt=parseInt(Ce.substring(ue+P),$),Ce=Ce.substring(O,ue))}catch(se){}return webModule.__softPermutationId=Dt,C(Ce+Eb)}function F(){n.__gwt_stylesLoaded||(n.__gwt_stylesLoaded={})}A(),webModule.__moduleBase="/js/mathematicalGraphics/"+name+"/",s[L].moduleBase=webModule.__moduleBase;var G=D();return F(),w(G),!0}return webModule},typeof window.web3d!="function"&&(window.web3d=GGBAppletUtils.makeModule("web3d","A18F540516513B1292CA7CEF2F6AFC7E")),typeof window.webSimple!="function"&&(window.webSimple=GGBAppletUtils.makeModule("webSimple","96B09BF1B436BF53F0DF54116700F16A")),window.GGBApplet=GGBApplet})()},67303:function(qt,Dt,be){"use strict";be.d(Dt,{Ax:function(){return ue},Ds:function(){return se},KI:function(){return le},SI:function(){return Ce},f1:function(){return ie}});var ce=be(90524);function ie(ee){let ne=!0;if(ee.length>0){for(let E=0;E<ee.length;E++)if(ee[E].compile_success==0||!ee[E].compile_success){ne=!1;break}}else ne=!1;return ne}function Ce(ee,ne=""){let E=[];for(let b=0;b<ee.length;b++){let z=ee[b],x=ne?`${ne}/${z.name}`:`${z.name}`;E.push({title:z.name,type:z.type,isLeaf:z.type!=="tree",key:x})}return E}function ue(ee,ne,E){for(let b=0;b<ee.length;b++){let z=ee[b];if(z.key===ne){z.children=E;break}z.children&&ue(z.children,ne,E)}return ee}function se(ee,ne,E){let b;return function(){let z=this,x=arguments,re=function(){b=null,E||ee.apply(z,x)},ae=E&&!b;clearTimeout(b),b=setTimeout(re,ne),ae&&ee.apply(z,x)}}const te=!0,le=ce.Z.API_SERVER},6077:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return b}});var ce=be(59301),ie={imageDimensions:"imageDimensions___a7crR",img:"img___Kroat",fullWidth:"fullWidth___c492T"},Ce=be(92310),ue=be.n(Ce),se=be(29787),te=be(2859),le=be(82093),ee=be(49661),ne=(z,x,re)=>new Promise((ae,oe)=>{var ve=ge=>{try{me(re.next(ge))}catch(_e){oe(_e)}},ye=ge=>{try{me(re.throw(ge))}catch(_e){oe(_e)}},me=ge=>ge.done?ae(ge.value):Promise.resolve(ge.value).then(ve,ye);me((re=re.apply(z,x)).next())}),b=({data:z,className:x,fullWidth:re,style:ae={},onClose:oe,onOk:ve,showFullTools:ye,noAssociationId:me})=>{const ge=(0,ce.useRef)(null),_e=(0,ce.useRef)(null),he=(0,ce.useRef)(null),pe=(0,ce.useRef)(null),[ke,Te]=(0,ce.useState)(!1),[Ee,Oe]=(0,ce.useState)("\u6B63\u5728\u52A0\u8F7D\u4E2D");(0,ce.useEffect)(()=>(he.current||(he.current=document.createElement("style"),document.head.appendChild(he.current)),z!=null&&z.visible?(document.body.setAttribute("data-custom","y-hidden"),he.current.innerHTML=" html { overflow-y: hidden; }",z!=null&&z.src&&je()):(document.body.removeAttribute("data-custom"),he.current&&(document.head.removeChild(he.current),he.current=null)),()=>{document.body.removeAttribute("data-custom"),he.current&&(document.head.removeChild(he.current),he.current=null)}),[z==null?void 0:z.visible]);const je=()=>ne(void 0,null,function*(){Te(!0),Oe("\u6B63\u5728\u52A0\u8F7D\u4E2D");const ot=yield(0,ee.ZJ)(z==null?void 0:z.src);ge.current.src="",ge.current.src=ot,ge.current.onload=function(){Xe()},Te(!1),Oe("")}),Pe=ot=>ne(void 0,null,function*(){Te(!0),Oe("\u6B63\u5728\u4FDD\u5B58\u4E2D");const He=yield(0,le.ZP)("/api/attachments.json",{method:"post",body:{file_type:"base64",original_filename:z.title,file:ot.dataUrl}});He!=null&&He.id&&!me?(yield(0,le.ZP)(`/api/attachments/${z.id}/add_subitem.json`,{method:"post",body:{subitem_id:He==null?void 0:He.id,settings:JSON.stringify(ot.state)}})).status===0&&ve():He!=null&&He.id&&ve(He),Te(!1),Oe("")}),Qe=()=>{const ot=document.querySelector('a[href="https://markerjs.com/"]');ot&&ot.parentNode&&(ot.parentNode.style.display="none"),[{name:'[data-action="select"]',title:"\u9009\u62E9"},{name:'[data-action="delete"]',title:"\u5220\u9664\u5143\u7D20"},{name:'[data-action="undo"]',title:"\u64A4\u9500"},{name:'[data-type-name="FrameMarker"]',title:"\u77E9\u5F62"},{name:'[data-type-name="FreehandMarker"]',title:"\u753B\u7EBF"},{name:'[data-type-name="ArrowMarker"]',title:"\u7BAD\u5934"},{name:'[data-type-name="TextMarker"]',title:"\u6587\u672C"},{name:'[data-type-name="EllipseMarker"]',title:"\u692D\u5706"},{name:'[data-type-name="HighlightMarker"]',title:"\u65B9\u5757"},{name:'[data-type-name="CalloutMarker"]',title:"\u6CE8\u91CA"},{name:'[data-action="render"]',title:"\u4FDD\u5B58"},{name:'[data-action="close"]',title:"\u9000\u51FA"}].forEach(rt=>{const Ye=document.querySelector(rt.name);Ye&&Ye.setAttribute("title",rt.title)})},Xe=()=>{_e.current=new te.hP(ge.current),_e.current.targetRoot=pe.current,_e.current.addEventListener("render",Pe),_e.current.addEventListener("beforeclose",oe),ye&&(_e.current.availableMarkerTypes=_e.current.ALL_MARKER_TYPES,_e.current.uiStyleSettings.redoButtonVisible=!0,_e.current.uiStyleSettings.notesButtonVisible=!0,_e.current.uiStyleSettings.zoomButtonVisible=!0,_e.current.uiStyleSettings.zoomOutButtonVisible=!0,_e.current.uiStyleSettings.clearButtonVisible=!0),window.markerArea=_e.current.uiStyleSettings,_e.current.show(),z!=null&&z.snapshotData&&_e.current.restoreState(z.snapshotData),setTimeout(()=>{window.scrollTo(0,0),Qe()},300)};return ce.createElement(ce.Fragment,null,(z==null?void 0:z.visible)&&ce.createElement(se.Z,{spinning:ke,tip:Ee,style:{position:"absolute",width:"100vw"}},ce.createElement("div",{ref:pe,className:ue()(ie.imageDimensions,x,re?ie.fullWidth:""),style:ae},ce.createElement("img",{className:ie.img,ref:ge}))))}},88615:function(qt,Dt,be){"use strict";var ce=be(59301),ie=be(77019),Ce=be(5269),ue=be(20554),se=be(99571),te=be(38394),le=be(21697),ee=be(48136),ne=be(59301);const E=(0,ce.forwardRef)(({callback:b,showSaveButton:z,value:x=""},re)=>{const ae=(0,ce.useRef)(),oe=[{name:"\u5206\u6570\u5F97\u5206",value:"\\frac{x}{y}",children:[{name:"\u5206\u6570 Fractions",data:[{value:"\\frac{a}{b}"},{value:"x\\tfrac{x}{a} "},{value:"\\mathrm{d}t"},{value:"\\partial t"},{value:"\\frac{\\partial y}{\\partial x}"},{value:"\\nabla\\psi"},{value:"\\frac{\\partial^2}{\\partial x_1\\partial x_2}y"},{value:"\\cfrac{1}{a + \\cfrac{7}{b + \\cfrac{2}{9}}} = c"}]},{name:"\u5BFC\u6570 Derivative",data:[{value:"\\dot{a} "},{value:"\\ddot{a}"},{value:"{f}^{\\prime}"},{value:"{f}^{\\prime\\prime}"},{value:"{f}^{(n)}"}]},{name:"\u6A21\u7B97\u672F Modular arithmetic",data:[{value:"a \\bmod b"},{value:"a \\equiv b \\pmod{m} "},{value:"\\gcd(m, n) "},{value:"\\operatorname{lcm}(m, n) "}]}]},{name:"\u6839\u5F0F\u89D2\u6807",value:"\\sqrt{x}",children:[{name:"\u6839\u5F0F Radicals",data:[{value:"\\sqrt{x}"},{value:"\\sqrt[y]{x}"}]},{name:"\u4E0A\u4E0B\u6807 Sub&Super",data:[{value:"x^{a}"},{value:"x_{a}"},{value:"x_{a}^{b} "},{value:"_{a}^{b} x"},{value:"x_{a}^{b} "}]},{name:"\u91CD\u97F3\u7B26\u53CA\u5176\u4ED6 Accents and Others",data:[{value:"\\hat{a} "},{value:"\\sqrt[y]{x}"},{value:"\\check{} "},{value:"\\grave{a} "},{value:"\\acute{a}"},{value:"\\tilde{a}"},{value:"\\breve{a}"},{value:"\\bar{a}"},{value:"\\vec{a}"},{value:"\\not{a}"},{value:"\\widetilde{abc}"},{value:"\\widehat{abc}"},{value:"\\overleftarrow{abc} "},{value:"\\overrightarrow{abc}"},{value:"\\overline{abc}"},{value:"\\underline{abc}"},{value:"\\overbrace{abc}"},{value:"\\underbrace{abc}"},{value:"\\overset{a}{abc}"},{value:"\\underset{a}{abc} \\stackrel\\frown{ab}"},{value:"\\overline{ab} "},{value:"\\overleftrightarrow{ab}"},{value:"\\overset{a}{\\leftarrow}"},{value:"\\overset{a}{\\rightarrow}"},{value:"\\xleftarrow[abc]{a}"},{value:"\\xrightarrow[abc]{a} "}]}]},{name:"\u6781\u9650\u5BF9\u6570",value:"\\lim_{x \\to 0}",children:[{name:"\u6781\u9650 Limits",data:[{value:"\\lim a"},{value:"\\lim_{x \\to 0}"},{value:"\\lim_{x \\to \\infty}"},{value:"\\max_b{a}"},{value:"\\min_a{b}"}]},{name:"\u5BF9\u6570\u6307\u6570 Logarithms and exponentials",data:[{value:"\\log_{a}{b}"},{value:"\\lg_{a}{b}"},{value:"\\ln_{a}{b}"},{value:"\\exp a"}]},{name:"\u754C\u9650 Bounds",data:[{value:"\\min x"},{value:"\\sup t"},{value:"\\inf s"},{value:"\\lim u"},{value:"\\limsup w"},{value:"\\dim p"},{value:"\\ker\\phi "}]}]},{name:"\u4E09\u89D2\u51FD\u6570",value:"\\sin a",children:[{name:"\u4E09\u89D2\u51FD\u6570 Trigonometric functions",data:[{value:"\\sin a"},{value:"\\cos a"},{value:"\\tan a"},{value:"\\cot a "},{value:"\\sec a "},{value:"\\csc a "}]},{name:"\u53CD\u4E09\u89D2\u51FD\u6570 Inverse trigonometric functions",data:[{value:"\\sin^{-1}"},{value:"\\cos^{-1}"},{value:"\\tan^{-1}"},{value:"\\cot^{-1}"},{value:"\\sec^{-1}"},{value:"\\csc^{-1}"},{value:"\\arcsin a"},{value:"\\arccos a"},{value:"\\arctan a"},{value:"\\operatorname{arccot} a"},{value:"\\operatorname{arcsec} a"},{value:"\\operatorname{arccsc} a"}]},{name:"\u53CC\u66F2\u51FD\u6570 Hyperblic functions",data:[{value:"\\sinh a"},{value:"\\cosh a"},{value:"\\tanh a"},{value:"\\coth a"},{value:"\\operatorname{sech} a"},{value:"\\operatorname{csch} a"}]},{name:"\u53CD\u53CC\u66F2\u51FD\u6570 Inverse hyperbolic functions",data:[{value:"\\sinh^{-1}"},{value:"a\\cosh^{-1} a"},{value:"\\tanh^{-1} a"},{value:"\\coth^{-1} a"},{value:"\\operatorname{sech}^{-1} a"},{value:"\\operatorname{csch}^{-1} a"}]}]},{name:"\u79EF\u5206\u8FD0\u7B97",value:"\\int_{a}^{b}",children:[{name:"\u79EF\u5206 Integral",data:[{value:"\\int"},{value:"\\int_{a}^{b}"},{value:"\\int\\limits_{a}^{b}"}]},{name:"\u53CC\u91CD\u79EF\u5206 Double integral",data:[{value:"\\iint"},{value:"\\iint_{a}^{b} "},{value:"\\iint\\limits_{a}^{b} "}]},{name:"\u4E09\u91CD\u79EF\u5206 Triple integral",data:[{value:"\\iiint"},{value:"\\iiint_{a}^{b}"},{value:"\\iiint\\limits_{a}^{b} "}]},{name:"\u66F2\u7EBF\u79EF\u5206 Closed line or path integral",data:[{value:"\\oint"},{value:"\\oint_{a}^{b} "}]}]},{name:"\u5927\u578B\u8FD0\u7B97",value:"\\sum_{a}^{b}",children:[{name:"\u6C42\u548C Summation",data:[{value:"\\sum"},{value:"\\sum_{a}^{b}"},{value:"{\\textstyle \\sum_{a}^{b}} "}]},{name:"\u4E58\u79EF\u4F59\u79EF Product and coproduct",data:[{value:"\\prod"},{value:"\\prod_{a}^{b}"},{value:"{\\textstyle \\prod_{a}^{b}}"},{value:"\\coprod"},{value:"\\coprod_{a}^{b}"},{value:"{\\textstyle \\coprod_{a}^{b}} "}]},{name:"\u5E76\u96C6\u4EA4\u96C6 Union and intersection",data:[{value:"\\bigcup"},{value:"\\bigcup_{a}^{b}"},{value:"{\\textstyle \\bigcup_{a}^{b}}"},{value:"\\bigcap"},{value:"\\bigcap_{a}^{b}"}]},{name:"\u6790\u53D6\u5408\u53D6 Disjunction and conjunction",data:[{value:"\\bigvee"},{value:"\\bigvee_{a}^{b}"},{value:"\\bigwedge"},{value:"\\bigwedge_{a}^{b}"}]}]},{name:"\u62EC\u53F7\u53D6\u6574",value:"\\left [ \\left ( \\right ) \\right ] ",children:[{name:"\u62EC\u53F7 Brackets",data:[{value:"\\left ( \\right )"},{value:"\\left [ \\right ]"},{value:"\\left \\langle \\right \\rangle "},{value:"\\left | \\right | "},{value:"\\left \\lfloor \\right \\rfloor "},{value:"\\left \\lceil \\right \\rceil "}]}]}],ve=[{name:"\u4EE3\u6570",value:"\\sqrt{a^2+b^2}",children:[{data:[{value:"\\left(x-1\\right)\\left(x+3\\right) "},{value:"\\sqrt{a^2+b^2}"},{value:"\\left ( \\frac{a}{b}\\right )^{n}= \\frac{a^{n}}{b^{n}}"},{value:"\\frac{a}{b}\\pm \\frac{c}{d}= \\frac{ad \\pm bc}{bd} "},{value:"\\frac{x^{2}}{a^{2}}-\\frac{y^{2}}{b^{2}}=1 "},{value:"\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0\\frac{1}{\\sqrt{a}}=\\frac{\\sqrt{a}}{a},a\\ge 0 "},{value:"\\sqrt[n]{a^{n}}=\\left ( \\sqrt[n]{a}\\right )^{n} "},{value:"x ={-b \\pm \\sqrt{b^2-4ac}\\over 2a} "},{value:"y-y_{1}=k \\left( x-x_{1}\\right) "},{value:`\\left\\{\\begin{matrix} \r
|
|
|
x=a + r\\text{cos}\\theta \\ \r
|
|
|
y=b + r\\text{sin}\\theta \r
|
|
|
\\end{matrix}\\right. `},{value:`\\begin{array}{l} \r
|
|
|
\\text{\u5BF9\u4E8E\u65B9\u7A0B\u5F62\u5982\uFF1A}x^{3}-1=0 \\ \r
|
|
|
\\text{\u8BBE}\\text{:}\\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{1}=1,x_{2}= \\omega =\\frac{-1+\\sqrt{3}i}{2} \\ \r
|
|
|
x_{3}= \\omega ^{2}=\\frac{-1-\\sqrt{3}i}{2} \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\left\\{\\begin{matrix} \r
|
|
|
\\Delta \\gt 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u4E0D\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta = 0\\text{\u65B9\u7A0B\u6709\u4E24\u4E2A\u76F8\u7B49\u7684\u5B9E\u6839} \\ \r
|
|
|
\\Delta \\lt 0\\text{\u65B9\u7A0B\u65E0\u5B9E\u6839} \r
|
|
|
\\end{matrix}\\right. \r
|
|
|
\\end{array} `},{value:`\\begin{array}{l} \r
|
|
|
a\\mathop{{x}}\\nolimits^{{2}}+bx+c=0 \\ \r
|
|
|
\\Delta =\\mathop{{b}}\\nolimits^{{2}}-4ac \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1,2}}=\\frac{{-b \\pm \r
|
|
|
\\sqrt{{\\mathop{{b}}\\nolimits^{{2}}-4ac}}}}{{2a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}+\\mathop{{x}}\\nolimits_{{2}}=-\\frac{{b}}{{a}} \\ \r
|
|
|
\\mathop{{x}}\\nolimits_{{1}}\\mathop{{x}}\\nolimits_{{2}}=\\frac{{c}}{{a}} \r
|
|
|
\\end{array} `}]}]},{name:"\u51E0\u4F55",value:"\\Delta A B C ",children:[{data:[{value:"\\Delta A B C "},{value:"a \\parallel c,b \\parallel c \\Rightarrow a \\parallel b "},{value:"l \\perp \\beta ,l \\subset \\alpha \\Rightarrow \\alpha \\perp \\beta"},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\perp \\alpha \\ \r
|
|
|
b \\perp \\alpha \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\parallel b`},{value:"P \\in \\alpha ,P \\in \\beta , \\alpha \\cap \\beta =l \\Rightarrow P \\in l "},{value:`\\alpha \\perp \\beta , \\alpha \\cap \\beta =l,a \\subset \\alpha ,a \\perp l \r
|
|
|
\\Rightarrow a \\perp \\beta `},{value:`\\left.\\begin{matrix} \r
|
|
|
a \\subset \\beta ,b \\subset \\beta ,a \\cap b=P \\ \r
|
|
|
a \\parallel \\partial ,b \\parallel \\partial \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow \\beta \\parallel \\alpha `},{value:"\\alpha \\parallel \\beta , \\gamma \\cap \\alpha =a, \\gamma \\cap \\beta =b \\Rightarrow a \\parallel b "},{value:"A \\in l,B \\in l,A \\in \\alpha ,B \\in \\alpha \\Rightarrow l \\subset \\alpha "},{value:`\\left.\\begin{matrix} \r
|
|
|
m \\subset \\alpha ,n \\subset \\alpha ,m \\cap n=P \\ \r
|
|
|
a \\perp m,a \\perp n \r
|
|
|
\\end{matrix}\\right\\}\\Rightarrow a \\perp \\alpha `},{value:`\\begin{array}{c} \r
|
|
|
\\text{\u76F4\u89D2\u4E09\u89D2\u5F62\u4E2D,\u76F4\u89D2\u8FB9\u957Fa,b,\u659C\u8FB9\u8FB9\u957Fc} \\ \r
|
|
|
a^{2}+b^{2}=c^{2} \r
|
|
|
\\end{array}`}]}]},{name:"\u4E0D\u7B49\u5F0F",value:"a > b",children:[{data:[{value:"a > b,b > c \\Rightarrow a > c "},{value:"a > b,c > d \\Rightarrow a+c > b+d "},{value:"a > b > 0,c > d > 0 \\Rightarrow ac bd "},{value:`\\begin{array}{c} \r
|
|
|
a \\gt b,c \\gt 0 \\Rightarrow ac \\gt bc \\ \r
|
|
|
a \\gt b,c \\lt 0 \\Rightarrow ac \\lt bc \r
|
|
|
\\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
|
|
|
a \\gt b \\gt 0,n \\in N^{\\ast},n \\gt 1 \\ \r
|
|
|
\\Rightarrow a^{n}\\gt b^{n}, \\sqrt[n]{a}\\gt \\sqrt[n]{b} \r
|
|
|
\\end{array}`},{value:`\\left( \\sum_{k=1}^n a_k b_k \\right)^{\\!\\!2}\\leq \r
|
|
|
\\left( \\sum_{k=1}^n a_k^2 \\right) \\left( \\sum_{k=1}^n b_k^2 \\right) `},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R^{+} \\ \r
|
|
|
\\Rightarrow \\frac{a+b}{{2}}\\ge \\sqrt{ab} \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
a,b \\in R \\ \r
|
|
|
\\Rightarrow a^{2}+b^{2}\\gt 2ab \\ \r
|
|
|
\\left( \\text{\u5F53\u4E14\u4EC5\u5F53}a=b\\text{\u65F6\u53D6\u201C}=\\text{\u201D\u53F7}\\right) \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
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
|
|
|
\\end{array}`}]}]},{name:"\u79EF\u5206",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:"\u4E09\u89D2",value:"e^{i \\theta}",children:[{name:"\u6C42\u548C 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:"\u7EDF\u8BA1",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
|
|
|
\\text{\u82E5}P \\left( AB \\right) =P \\left( A \\right) P \\left( B \\right) \\\\ \r
|
|
|
\\text{\u5219}P \\left( A \\left| B\\right. \\right) =P \\left({B}\\right) \r
|
|
|
\\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
|
|
|
P \\left( \\emptyset \\right) =0 \\\\ \r
|
|
|
P \\left( S \\right) =1 \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
\\forall A \\in S \\\\ \r
|
|
|
P \\left( A \\right) \\ge 0 \r
|
|
|
\\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
|
|
|
S= \\binom{N}{n},A_{k}=\\binom{M}{k}\\cdot \\binom{N-M}{n-k} \\\\ \r
|
|
|
P\\left ( A_{k}\\right ) = \\frac{\\binom{M}{k}\\cdot \\binom{N-M}{n-k}}{\\binom{N}{n}} \r
|
|
|
\\end{array}`},{value:`\\begin{array}{c} \r
|
|
|
P_{n}=n! \\\\ \r
|
|
|
A_{n}^{k}=\\frac{n!}{\\left( n-k \\left) !\\right. \\right.} \r
|
|
|
\\end{array}`}]}]}],ye=_e=>{ae.current.setValue(ae.current.getValue()+" "+_e.value+" ")},me=[{key:"1",label:"\u5FEB\u6377\u6A21\u677F",children:ne.createElement(ie.Z,{className:le.Z.lists,gutter:[10,10]},oe.map((_e,he)=>ne.createElement(Ce.Z,{flex:"110px",className:le.Z.item},ne.createElement("div",null,ne.createElement(te.Z,{value:`$$${_e.value}$$`}),_e.name),ne.createElement("div",{className:le.Z.children},_e.children.map((pe,ke)=>ne.createElement("div",{key:ke},ne.createElement("h1",null,pe.name),ne.createElement(ie.Z,{gutter:[10,10]},pe.data.map((Te,Ee)=>ne.createElement(Ce.Z,{key:Ee,onClick:()=>ye(Te),className:le.Z.diamond},ne.createElement(te.Z,{value:"`$$"+Te.value+"$$`"}))))))))))},{key:"2",label:"\u516C\u5F0F\u6A21\u677F",children:ne.createElement(ie.Z,{className:le.Z.lists,gutter:[10,10]},ve.map((_e,he)=>ne.createElement(Ce.Z,{flex:"110px",className:le.Z.item},ne.createElement("div",null,ne.createElement(te.Z,{value:"`$$"+_e.value+"$$`"}),_e.name),ne.createElement("div",{className:le.Z.children},_e.children.map((pe,ke)=>ne.createElement("div",{key:ke},pe.name&&ne.createElement("h1",null,pe.name),ne.createElement(ie.Z,{gutter:[10,10]},pe.data.map((Te,Ee)=>ne.createElement(Ce.Z,{key:Ee,onClick:()=>ye(Te),className:le.Z.diamond},ne.createElement(te.Z,{value:"`$$"+Te.value+"$$`"}))))))))))}],ge=()=>{var _e=document.createElement("div");_e.innerHTML=ae.current.getValue();var he=_e.innerText;return b&&b(he),he};return(0,ce.useImperativeHandle)(re,()=>({getData:ge})),ne.createElement("div",{className:le.Z.mathWrap},ne.createElement(ue.default,{defaultActiveKey:"1",items:me}),ne.createElement("math-field",{locale:"zh_cn",className:le.Z.mathField,placeholder:"\u8BF7\u6253\u5F00\u952E\u76D8\uFF0C\u8F93\u5165\u516C\u5F0F",ref:ae,style:{width:800,marginTop:30,fontSize:18}},x||""),z&&ne.createElement("div",{className:le.Z.button},ne.createElement(se.ZP,{size:"large",onClick:ge,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668")))});Dt.Z=E},57884:function(qt,Dt,be){"use strict";var ce=be(59301),ie=be(93314),Ce=be(99571),ue=Object.defineProperty,se=Object.defineProperties,te=Object.getOwnPropertyDescriptors,le=Object.getOwnPropertySymbols,ee=Object.prototype.hasOwnProperty,ne=Object.prototype.propertyIsEnumerable,E=(re,ae,oe)=>ae in re?ue(re,ae,{enumerable:!0,configurable:!0,writable:!0,value:oe}):re[ae]=oe,b=(re,ae)=>{for(var oe in ae||(ae={}))ee.call(ae,oe)&&E(re,oe,ae[oe]);if(le)for(var oe of le(ae))ne.call(ae,oe)&&E(re,oe,ae[oe]);return re},z=(re,ae)=>se(re,te(ae));const x=({img:re,buttonProps:ae={},styles:oe={},customText:ve,ButtonText:ye,ButtonClick:me,Buttonclass:ge,ButtonTwo:_e,imgStyles:he,loading:pe=!1,className:ke=""})=>ce.createElement("section",{className:`tc animated fadeIn ${ke}`,style:b({color:"#999",margin:"100px auto",visibility:pe?"hidden":"visible"},oe)},ce.createElement("img",{src:re||ie,style:z(b({},he),{pointerEvents:"none",userSelect:"none"})}),ce.createElement("p",{className:"mt20 font14"},ve||"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"),ye&&ce.createElement(Ce.ZP,b({className:ge,onClick:me},ae),ye),_e&&_e);Dt.Z=x},41550:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ge}});var ce=be(59301),ie={wrp:"wrp___dq7YK",bgBlack:"bgBlack___ARIUV",monaco:"monaco___VnZC3",darkBlue:"darkBlue___UprA9",close:"close___LKoWu",embed:"embed___hvpEJ"},Ce=be(99571),ue=be(70557),se=be(51124),te=be(25399),le=be(49661),ee=be(72664),ne=be(57884),E=be(90524),b=be(14794),z=be(59301),x=Object.defineProperty,re=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ve=(_e,he,pe)=>he in _e?x(_e,he,{enumerable:!0,configurable:!0,writable:!0,value:pe}):_e[he]=pe,ye=(_e,he)=>{for(var pe in he||(he={}))ae.call(he,pe)&&ve(_e,pe,he[pe]);if(re)for(var pe of re(he))oe.call(he,pe)&&ve(_e,pe,he[pe]);return _e},me=(_e,he,pe)=>new Promise((ke,Te)=>{var Ee=Pe=>{try{je(pe.next(Pe))}catch(Qe){Te(Qe)}},Oe=Pe=>{try{je(pe.throw(Pe))}catch(Qe){Te(Qe)}},je=Pe=>Pe.done?ke(Pe.value):Promise.resolve(Pe.value).then(Ee,Oe);je((pe=pe.apply(_e,he)).next())}),ge=({editOffice:_e="view",data:he,issaver:pe,onSaver:ke,theme:Te,type:Ee,filename:Oe,monacoEditor:je,className:Pe,style:Qe,close:Xe,onClose:ot,hasMask:He,disabledDownload:rt,onImgDimensions:Ye,showNodata:ut,recordInfo:Ge})=>{const[ze,Ve]=(0,ce.useState)("https://view.officeapps.live.com/op/view.aspx?src=http://testgs.educoder.net//rails/active_storage/blobs/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBCZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--03541f6234b93d7ac3b2d84e7eb0e6594a952945/1.ppt"),[$e,nt]=(0,ce.useState)(""),[et,pt]=(0,ce.useState)(),ct=window.ENV==="build"?"/react/build":"",It=location.host.startsWith("localhost")?E.Z.PROXY_SERVER:E.Z.API_SERVER,Mt=10*(1024*1024),xt=(0,ce.useRef)();he!=null&&he.startsWith("/api")&&Ee!=="txt"&&(he=E.Z.API_SERVER+he);const gt=Be=>Be.substring(Be.lastIndexOf("/")+1).split(".").pop();Oe&&je&&(je.filename=Oe),(0,ce.useEffect)(()=>{var Be,Ke;const Ne=(Ke=(Be=document.cookie)==null?void 0:Be.replace(/\s/g,""))==null?void 0:Ke.split(";");Ne==null||Ne.map(De=>{let we=De.split("=");we[0]==="_educoder_session"&&nt(we[1])})},[]),(0,ce.useEffect)(()=>{Ee==="office"&&(he.indexOf("bigfilescdn.")>-1||he.indexOf("bigfiles1")>-1?pt({url:he,fileType:gt(he),model:he.indexOf("model=edit")?"edit":"view"}):We())},[Ee,he]);function _t(Be){return me(this,null,function*(){Be.data.type==="pdfdata"&&(ke(Be.data.data),window.removeEventListener("message",_t,!1)),console.log("mess---:",Be.data)})}const We=()=>me(void 0,null,function*(){console.log("data:",he);let Be=he;he.startsWith("http")||(Be=location.origin+Be);let Ke=new URL(Be).pathname.split("/").pop();const Ne=yield(0,ee.gJ)({attachment_id:Ke});Ne.url=It+Ne.url,pt(Ne)}),Ae=()=>{if(he.startsWith("http")||he.startsWith("blob:")){Se();return}(0,le.Sv)(Oe||"educoder",he,Oe)},Se=()=>{Ge&&(0,b.fc)({id:Ge==null?void 0:Ge.id,watch_type:1,course_id:Ge==null?void 0:Ge.course_id}),(0,le.Nd)(Oe||"educoder",decodeURIComponent(he))};return z.createElement("div",{style:ye({},Qe||{}),className:`${He&&ie.bgBlack} ${Ee?ie.wrp:"hide"}`},Xe&&z.createElement("div",{className:ie.close,ref:xt},!!Ye&&z.createElement(te.Z,{title:"\u70B9\u51FB\u5BF9\u56FE\u7247\u8FDB\u884C\u6279\u6CE8",getPopupContainer:()=>xt.current},z.createElement("span",{onClick:()=>{ot(),Ye()}},z.createElement("i",{className:"icon-yulanpizhu"}))),!rt&&z.createElement(te.Z,{title:"\u70B9\u51FB\u4E0B\u8F7D\u6B64\u6587\u4EF6",getPopupContainer:()=>xt.current},z.createElement("span",{onClick:Se},z.createElement("i",{className:"icon-quxiaozhiding"}))),pe&&z.createElement(te.Z,{title:"\u4FDD\u5B58pdf\u5E76\u9000\u51FA",getPopupContainer:()=>xt.current},z.createElement("span",{className:"",onClick:()=>{const Be=document.getElementById("pdfiframe");window.addEventListener("message",_t,!1),setTimeout(()=>{Be.contentWindow.postMessage("getData","*")},300)}},z.createElement("i",{className:"icon-baocun"}))),z.createElement(te.Z,{title:"\u5173\u95ED",getPopupContainer:()=>xt.current},z.createElement("span",{className:"",onClick:()=>{ot()}},z.createElement("i",{className:"icon-guanbi1"})))),z.createElement("div",{className:`${ie[Pe]} ${Pe} ${ie.monaco} ${Ee==="txt"?"show":"hide"}`},Ee==="txt"&&z.createElement(z.Fragment,null,z.createElement(se.ZP,ye({},je)))),Ee==="audio"&&z.createElement("audio",{src:`${(he==null?void 0:he.indexOf("http://"))>-1||(he==null?void 0:he.indexOf("https://"))>-1?"":"data:audio/mp3;base64,"}${he}`,autoPlay:!0}),Ee==="video"&&z.createElement(z.Fragment,null,(he==null?void 0:he.indexOf("http"))>-1?z.createElement("video",{controls:!0,src:`${he}`,autoPlay:!0}):z.createElement("video",{controls:!0,src:`data:video/mp4;base64,${he}`,autoPlay:!0})),Ee==="office"&&et&&z.createElement("iframe",{src:`${ct}/office.html?key=${et.key}&url=${btoa(et.url)}&callbackUrl=${It+(et.callbackUrl||"")}&fileType=${et.fileType}&title=${et.title||""}&model=${_e}&officeServer=${E.Z.ONLYOFFICE}&disabledDownload=${!!rt}`}),Ee==="html"&&z.createElement("iframe",{src:he+"&disposition=inline"}),Ee==="pdf"&&z.createElement("iframe",{id:"pdfiframe",src:`${ct}/js/pdfview/index.html?filename=${Oe||"educoder.pdf"}&url=${encodeURIComponent(he)}&disabledDownload=${!!rt}&model=${_e}`}),Ee==="image"&&z.createElement("img",{src:`${(he==null?void 0:he.indexOf("http://"))>-1||(he==null?void 0:he.indexOf("https://"))>-1?"":"data:image/png;base64,"}${he}`}),(Ee==="other"||Ee==="download")&&z.createElement(z.Fragment,null,ut?z.createElement(ne.Z,{customText:"\u5F53\u524D\u6587\u4EF6\u4E0D\u652F\u6301\u9884\u89C8\uFF0C\u53EF\u70B9\u51FB\u4E0B\u8F7D\u67E5\u770B",ButtonTwo:z.createElement(Ce.ZP,{icon:z.createElement("i",{className:"iconfont icon-xiazai4 font14"}),type:"primary",size:"middle",onClick:Ae,disabled:rt},"\u4E0B\u8F7D")}):z.createElement(Ce.ZP,{type:"primary",size:"middle",onClick:Ae,disabled:rt},z.createElement(ue.Z,null),"\u70B9\u51FB\u4E0B\u8F7D")),Ee==="flowChart"&&z.createElement("div",{className:"embed"},z.createElement("iframe",{src:`/drawio/src/main/webapp/viewer.html?id=${he||""}&gapi=0&od=0&db=0&gh=0&gl=0`,width:"100%",height:"100%",frameBorder:"0"})))}},38394:function(qt,Dt,be){"use strict";be.d(Dt,{z:function(){return je},Z:function(){return Pe}});var ce=be(59301),ie=be(88831),Ce=be(90290),ue=be(64018),se=be(44523),te=be(90524),le=be(49661),ee=be(15342),ne=be(77736),E=be(99571),b=be(1012),z=be(41550),x=be(59301),ae=({html:Qe})=>{const Xe=(0,ce.useRef)(null),ot=(0,ce.useRef)(null),He=`.markdown-body p {
|
|
|
margin: 0 0 16px 0 !important;
|
|
|
line-height: 28px;
|
|
|
white-space: pre-wrap;
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
li {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
ol,
|
|
|
ul,
|
|
|
dl {
|
|
|
margin-bottom: 0px;
|
|
|
}
|
|
|
|
|
|
.markdown-body {
|
|
|
-ms-text-size-adjust: 100%;
|
|
|
-webkit-text-size-adjust: 100%;
|
|
|
color: #333;
|
|
|
overflow: hidden;
|
|
|
font-family: "Microsoft YaHei", Helvetica, "Meiryo UI", "Malgun Gothic", "Segoe UI", "Trebuchet MS", "Monaco", monospace, Tahoma, STXihei, "\u534E\u6587\u7EC6\u9ED1", STHeiti, "Helvetica Neue", "Droid Sans", "wenquanyi micro hei", FreeSans, Arimo, Arial, SimSun, "\u5B8B\u4F53", Heiti, "\u9ED1\u4F53", sans-serif;
|
|
|
word-break: break-word;
|
|
|
font-size: 16px;
|
|
|
line-height: 1.6;
|
|
|
white-space: normal;
|
|
|
word-wrap: break-word;
|
|
|
position: relative;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul>li {
|
|
|
list-style-type: disc;
|
|
|
}
|
|
|
|
|
|
.markdown-body ol>li {
|
|
|
list-style-type: decimal;
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
background: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:active,
|
|
|
.markdown-body a:hover {
|
|
|
outline: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body strong {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 2em;
|
|
|
margin: 0.67em 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
-moz-box-sizing: content-box;
|
|
|
box-sizing: content-box;
|
|
|
height: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
overflow: auto;
|
|
|
}
|
|
|
|
|
|
.markdown-body code,
|
|
|
.markdown-body kbd,
|
|
|
.markdown-body pre {
|
|
|
font-family: "Meiryo UI", "YaHei Consolas Hybrid", Consolas, "Malgun Gothic", "Segoe UI", "Trebuchet MS", Helvetica, monospace, monospace;
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
color: inherit;
|
|
|
font: inherit;
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body html input[disabled] {
|
|
|
cursor: default;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
line-height: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body input[type="checkbox"] {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
border-collapse: collapse;
|
|
|
border-spacing: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body td,
|
|
|
.markdown-body th {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body * {
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body input {
|
|
|
font: 13px/1.4 Helvetica, arial, freesans, clean, sans-serif, "Segoe UI Emoji", "Segoe UI Symbol";
|
|
|
}
|
|
|
|
|
|
.markdown-body a {
|
|
|
color: #4183c4;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body a:hover,
|
|
|
.markdown-body a:active {
|
|
|
text-decoration: underline;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr {
|
|
|
height: 0;
|
|
|
margin: 15px 0;
|
|
|
overflow: hidden;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
border-bottom: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:before {
|
|
|
display: table;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body hr:after {
|
|
|
display: table;
|
|
|
clear: both;
|
|
|
content: "";
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
margin-top: 15px;
|
|
|
margin-bottom: 15px;
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
font-size: 30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
font-size: 21px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 11px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
margin: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding: 0;
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
ul.linenums,
|
|
|
ol.linenums {
|
|
|
padding: 16px 0 0 56px !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol {
|
|
|
padding-left: 2em;
|
|
|
}
|
|
|
|
|
|
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ul ol {
|
|
|
list-style-type: lower-roman;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul ol,
|
|
|
.markdown-body ul ol ol,
|
|
|
.markdown-body ol ul ol,
|
|
|
.markdown-body ol ol ol {
|
|
|
list-style-type: lower-alpha;
|
|
|
}
|
|
|
|
|
|
.markdown-body dd {
|
|
|
margin-left: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
font-family: Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
font-size: 12px;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
font: 12px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon {
|
|
|
font: normal normal 16px octicons-anchor;
|
|
|
line-height: 1;
|
|
|
display: inline-block;
|
|
|
text-decoration: none;
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
-webkit-user-select: none;
|
|
|
-moz-user-select: none;
|
|
|
-ms-user-select: none;
|
|
|
user-select: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .octicon-link:before {
|
|
|
content: '\f05c';
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:first-child {
|
|
|
margin-top: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body>*:last-child {
|
|
|
margin-bottom: 0 !important;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor {
|
|
|
position: absolute;
|
|
|
top: 0;
|
|
|
left: 0;
|
|
|
display: block;
|
|
|
padding-right: 6px;
|
|
|
padding-left: 30px;
|
|
|
margin-left: -30px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .anchor:focus {
|
|
|
outline: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1,
|
|
|
.markdown-body h2,
|
|
|
.markdown-body h3,
|
|
|
.markdown-body h4,
|
|
|
.markdown-body h5,
|
|
|
.markdown-body h6 {
|
|
|
position: relative;
|
|
|
margin-top: 1em;
|
|
|
margin-bottom: 16px;
|
|
|
font-weight: bold;
|
|
|
line-height: 1.4;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .octicon-link,
|
|
|
.markdown-body h2 .octicon-link,
|
|
|
.markdown-body h3 .octicon-link,
|
|
|
.markdown-body h4 .octicon-link,
|
|
|
.markdown-body h5 .octicon-link,
|
|
|
.markdown-body h6 .octicon-link {
|
|
|
display: none;
|
|
|
color: #000;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor,
|
|
|
.markdown-body h2:hover .anchor,
|
|
|
.markdown-body h3:hover .anchor,
|
|
|
.markdown-body h4:hover .anchor,
|
|
|
.markdown-body h5:hover .anchor,
|
|
|
.markdown-body h6:hover .anchor {
|
|
|
padding-left: 8px;
|
|
|
margin-left: -30px;
|
|
|
text-decoration: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1:hover .anchor .octicon-link,
|
|
|
.markdown-body h2:hover .anchor .octicon-link,
|
|
|
.markdown-body h3:hover .anchor .octicon-link,
|
|
|
.markdown-body h4:hover .anchor .octicon-link,
|
|
|
.markdown-body h5:hover .anchor .octicon-link,
|
|
|
.markdown-body h6:hover .anchor .octicon-link {
|
|
|
display: inline-block;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 2.25em;
|
|
|
line-height: 1.2;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h1 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 {
|
|
|
padding-bottom: 0.3em;
|
|
|
font-size: 1.75em;
|
|
|
line-height: 1.225;
|
|
|
border-bottom: 1px solid #eee;
|
|
|
}
|
|
|
|
|
|
.markdown-body h2 .anchor {
|
|
|
line-height: 1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 {
|
|
|
font-size: 1.5em;
|
|
|
line-height: 1.43;
|
|
|
}
|
|
|
|
|
|
.markdown-body h3 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 {
|
|
|
font-size: 1.25em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h4 .anchor {
|
|
|
line-height: 1.2;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 {
|
|
|
font-size: 1em;
|
|
|
}
|
|
|
|
|
|
.markdown-body h5 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 {
|
|
|
font-size: 1em;
|
|
|
color: #777;
|
|
|
}
|
|
|
|
|
|
.markdown-body h6 .anchor {
|
|
|
line-height: 1.1;
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body ul ul,
|
|
|
.markdown-body ul ol,
|
|
|
.markdown-body ol ol,
|
|
|
.markdown-body ol ul {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body li>p {
|
|
|
margin-top: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl {
|
|
|
padding: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dt {
|
|
|
padding: 0;
|
|
|
margin-top: 16px;
|
|
|
font-size: 1em;
|
|
|
font-style: italic;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body dl dd {
|
|
|
padding: 0 16px;
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote {
|
|
|
padding: 0 15px;
|
|
|
color: #777;
|
|
|
border-left: 4px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :first-child {
|
|
|
margin-top: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body blockquote> :last-child {
|
|
|
margin-bottom: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body table {
|
|
|
display: block;
|
|
|
width: 100%;
|
|
|
overflow: auto;
|
|
|
word-break: normal;
|
|
|
word-break: keep-all;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th {
|
|
|
font-weight: bold;
|
|
|
text-align: revert;
|
|
|
}
|
|
|
|
|
|
.markdown-body table th,
|
|
|
.markdown-body table td {
|
|
|
padding: 6px 13px;
|
|
|
border: 1px solid #ddd;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr {
|
|
|
background-color: #fff;
|
|
|
border-top: 1px solid #ccc;
|
|
|
}
|
|
|
|
|
|
.markdown-body table tr:nth-child(2n) {
|
|
|
background-color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body img {
|
|
|
max-width: 100%;
|
|
|
-moz-box-sizing: border-box;
|
|
|
box-sizing: border-box;
|
|
|
}
|
|
|
|
|
|
.markdown-body code {
|
|
|
padding: 0;
|
|
|
padding-top: 0.2em;
|
|
|
padding-bottom: 0.2em;
|
|
|
margin: 0;
|
|
|
font-size: 85%;
|
|
|
background-color: rgba(0, 0, 0, 0.04);
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:has(.katex) {
|
|
|
background-color: transparent;
|
|
|
}
|
|
|
|
|
|
.markdown-body code:before,
|
|
|
.markdown-body code:after {
|
|
|
letter-spacing: -0.2em;
|
|
|
content: "\\00a0";
|
|
|
}
|
|
|
|
|
|
.markdown-body pre>code {
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
font-size: 100%;
|
|
|
word-break: normal;
|
|
|
white-space: pre;
|
|
|
background: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight {
|
|
|
margin-bottom: 16px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre,
|
|
|
.markdown-body pre {
|
|
|
padding: 16px;
|
|
|
overflow: auto;
|
|
|
font-size: 85%;
|
|
|
line-height: 1.45;
|
|
|
background-color: #f7f7f7;
|
|
|
border-radius: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .highlight pre {
|
|
|
margin-bottom: 0;
|
|
|
word-break: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre {
|
|
|
word-wrap: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code {
|
|
|
display: inline;
|
|
|
max-width: initial;
|
|
|
padding: 0;
|
|
|
margin: 0;
|
|
|
overflow: initial;
|
|
|
line-height: inherit;
|
|
|
word-wrap: normal;
|
|
|
background-color: transparent;
|
|
|
border: 0;
|
|
|
}
|
|
|
|
|
|
.markdown-body pre code:before,
|
|
|
.markdown-body pre code:after {
|
|
|
content: normal;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font-size: 11px;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c {
|
|
|
color: #969896;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-c1,
|
|
|
.markdown-body .pl-mdh,
|
|
|
.markdown-body .pl-mm,
|
|
|
.markdown-body .pl-mp,
|
|
|
.markdown-body .pl-mr,
|
|
|
.markdown-body .pl-s1 .pl-v,
|
|
|
.markdown-body .pl-s3,
|
|
|
.markdown-body .pl-sc,
|
|
|
.markdown-body .pl-sv {
|
|
|
color: #0086b3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-e,
|
|
|
.markdown-body .pl-en {
|
|
|
color: #795da3;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-s1 .pl-s2,
|
|
|
.markdown-body .pl-smi,
|
|
|
.markdown-body .pl-smp,
|
|
|
.markdown-body .pl-stj,
|
|
|
.markdown-body .pl-vo,
|
|
|
.markdown-body .pl-vpf {
|
|
|
color: #333;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ent {
|
|
|
color: #63a35c;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-k,
|
|
|
.markdown-body .pl-s,
|
|
|
.markdown-body .pl-st {
|
|
|
color: #a71d5d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-pds,
|
|
|
.markdown-body .pl-s1,
|
|
|
.markdown-body .pl-s1 .pl-pse .pl-s2,
|
|
|
.markdown-body .pl-sr,
|
|
|
.markdown-body .pl-sr .pl-cce,
|
|
|
.markdown-body .pl-sr .pl-sra,
|
|
|
.markdown-body .pl-sr .pl-sre,
|
|
|
.markdown-body .pl-src {
|
|
|
color: #df5000;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mo,
|
|
|
.markdown-body .pl-v {
|
|
|
color: #1d3e81;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-id {
|
|
|
color: #b52a1d;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ii {
|
|
|
background-color: #b52a1d;
|
|
|
color: #f8f8f8;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-sr .pl-cce {
|
|
|
color: #63a35c;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-ml {
|
|
|
color: #693a17;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mh,
|
|
|
.markdown-body .pl-mh .pl-en,
|
|
|
.markdown-body .pl-ms {
|
|
|
color: #1d3e81;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mq {
|
|
|
color: #008080;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mi {
|
|
|
color: #333;
|
|
|
font-style: italic;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mb {
|
|
|
color: #333;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-md,
|
|
|
.markdown-body .pl-mdhf {
|
|
|
background-color: #ffecec;
|
|
|
color: #bd2c00;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdht,
|
|
|
.markdown-body .pl-mi1 {
|
|
|
background-color: #eaffea;
|
|
|
color: #55a532;
|
|
|
}
|
|
|
|
|
|
.markdown-body .pl-mdr {
|
|
|
color: #795da3;
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
.markdown-body kbd {
|
|
|
display: inline-block;
|
|
|
padding: 3px 5px;
|
|
|
font: 11px Consolas, "Liberation Mono", Menlo, Courier, monospace;
|
|
|
line-height: 10px;
|
|
|
color: #555;
|
|
|
vertical-align: middle;
|
|
|
background-color: #fcfcfc;
|
|
|
border: solid 1px #ccc;
|
|
|
border-bottom-color: #bbb;
|
|
|
border-radius: 3px;
|
|
|
box-shadow: inset 0 -1px 0 #bbb;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item {
|
|
|
list-style-type: none;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item+.task-list-item {
|
|
|
margin-top: 3px;
|
|
|
}
|
|
|
|
|
|
.markdown-body .task-list-item input {
|
|
|
float: left;
|
|
|
margin: 0.3em 0 0.25em -1.6em;
|
|
|
vertical-align: middle;
|
|
|
}
|
|
|
|
|
|
.markdown-body :checked+.radio-label {
|
|
|
z-index: 1;
|
|
|
position: relative;
|
|
|
border-color: #4183c4;
|
|
|
}
|
|
|
|
|
|
|
|
|
/*! Pretty printing styles. Used with prettify.js. */
|
|
|
/* SPAN elements with the classes below are added by prettyprint. */
|
|
|
.pln {
|
|
|
color: #000
|
|
|
}
|
|
|
|
|
|
/* plain text */
|
|
|
|
|
|
@media screen {
|
|
|
.str {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* string content */
|
|
|
.kwd {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a keyword */
|
|
|
.com {
|
|
|
color: #800
|
|
|
}
|
|
|
|
|
|
/* a comment */
|
|
|
.typ {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a type name */
|
|
|
.lit {
|
|
|
color: #066
|
|
|
}
|
|
|
|
|
|
/* a literal value */
|
|
|
/* punctuation, lisp open bracket, lisp close bracket */
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #660
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #008
|
|
|
}
|
|
|
|
|
|
/* a markup tag name */
|
|
|
.atn {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a markup attribute name */
|
|
|
.atv {
|
|
|
color: #080
|
|
|
}
|
|
|
|
|
|
/* a markup attribute value */
|
|
|
.dec,
|
|
|
.var {
|
|
|
color: #606
|
|
|
}
|
|
|
|
|
|
/* a declaration; a variable name */
|
|
|
.fun {
|
|
|
color: red
|
|
|
}
|
|
|
|
|
|
/* a function name */
|
|
|
}
|
|
|
|
|
|
/* Use higher contrast and text-weight for printable form. */
|
|
|
@media print,
|
|
|
projection {
|
|
|
.str {
|
|
|
color: #060
|
|
|
}
|
|
|
|
|
|
.kwd {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.com {
|
|
|
color: #600;
|
|
|
font-style: italic
|
|
|
}
|
|
|
|
|
|
.typ {
|
|
|
color: #404;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.lit {
|
|
|
color: #044
|
|
|
}
|
|
|
|
|
|
.pun,
|
|
|
.opn,
|
|
|
.clo {
|
|
|
color: #440
|
|
|
}
|
|
|
|
|
|
.tag {
|
|
|
color: #006;
|
|
|
font-weight: bold
|
|
|
}
|
|
|
|
|
|
.atn {
|
|
|
color: #404
|
|
|
}
|
|
|
|
|
|
.atv {
|
|
|
color: #060
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/* Put a border around prettyprinted code snippets. */
|
|
|
pre.prettyprint {
|
|
|
padding: 2px;
|
|
|
/* border: 1px solid #888 */
|
|
|
}
|
|
|
|
|
|
/* Specify class=linenums on a pre to get line numbering */
|
|
|
ol.linenums {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 0
|
|
|
}
|
|
|
|
|
|
/* IE indents via margin-left */
|
|
|
li.L0,
|
|
|
li.L1,
|
|
|
li.L2,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L6,
|
|
|
li.L7,
|
|
|
li.L8 {
|
|
|
list-style-type: none
|
|
|
}
|
|
|
|
|
|
/* Alternate shading for lines */
|
|
|
li.L1,
|
|
|
li.L3,
|
|
|
li.L5,
|
|
|
li.L7,
|
|
|
li.L9 {
|
|
|
background: #eee
|
|
|
}
|
|
|
|
|
|
.markdown-body p,
|
|
|
.markdown-body blockquote,
|
|
|
.markdown-body ul,
|
|
|
.markdown-body ol,
|
|
|
.markdown-body dl,
|
|
|
.markdown-body table,
|
|
|
.markdown-body pre {
|
|
|
margin-top: 0;
|
|
|
margin-bottom: 16px;
|
|
|
}`;return(0,ce.useEffect)(()=>{const rt=Xe.current.attachShadow({mode:"open"});ot.current=document.createElement("div"),ot.current.className="markdown-body",ot.current.innerHTML=Qe,rt.appendChild(ot.current);const Ye=document.createElement("style");return Ye.textContent=He,rt.appendChild(Ye),()=>{rt.innerHTML=""}},[]),(0,ce.useEffect)(()=>{ot.current&&(ot.current.innerHTML=Qe)},[Qe]),x.createElement("div",{ref:Xe})};function oe(Qe){const Xe=["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"],ot=new RegExp(`\\b(${Xe.join("|")})\\s*=\\s*(?:"[^"]*"|'[^']*'|[^\\s>]*)`,"gi");return Qe.replace(ot,"").trim()}var ve={mdBody:"mdBody___raKXb",button:"button___Ch5Pc",previewFlowChart:"previewFlowChart___vY1dq"},ye=Object.defineProperty,me=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,he=(Qe,Xe,ot)=>Xe in Qe?ye(Qe,Xe,{enumerable:!0,configurable:!0,writable:!0,value:ot}):Qe[Xe]=ot,pe=(Qe,Xe)=>{for(var ot in Xe||(Xe={}))ge.call(Xe,ot)&&he(Qe,ot,Xe[ot]);if(me)for(var ot of me(Xe))_e.call(Xe,ot)&&he(Qe,ot,Xe[ot]);return Qe};const ke="@\u2581\u2581@",Te="@\u2581@",Ee=/<pre[^>]*>/g;function Oe(Qe){let Xe=document.createElement("div");return Xe.innerHTML=Qe,Xe.childNodes.length===0?"":Xe.childNodes[0].nodeValue}const je=(Qe,Xe)=>{Qe=Qe||"";const ot=/(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?\)|(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,He=/\"(?:https?:\/\/[^\/]+)?\/api\/attachments\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,rt=/\(\s+(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?|\"(?:https?:\/\/[^\/]+)?\/files\/uploads\/([A-Za-z0-9+/=]+)(\?.*?)?\//g,Ye=/(?:https?:\/\/[^\/]+)?\/attachments\/download\/([A-Za-z0-9+/=]+)(\?.*?)?\//g;return Xe?Qe.replaceAll("https://www.educoder.net","").replaceAll("https://www-cdn.educoder.net","").replaceAll("//api/attachments","/api/attachments").replace(ot,(ut,Ge,ze,Ve,$e,nt,et)=>{const pt=Ge||Ve||nt,ct=ze||$e||et||"?";return te.Z.API_SERVER+"/api/attachments/"+pt+ct+"&t="+(0,le.Jn)(pt,Date.now())+(ut.indexOf(")")>-1?")":"&")}).replaceAll('src="(','src="').replaceAll("src='(",'src="'):(Qe=Qe.replace(Ye,(ut,Ge,ze,Ve,$e,nt,et)=>{const pt=Ge||Ve||nt,ct=ze||$e||et||"?";return te.Z.API_SERVER+"/attachments/download/"+pt+ct+"&t="+(0,le.Jn)(pt,Date.now())+(ut.indexOf(")")>-1?")":"&")}).replace(ot,(ut,Ge,ze,Ve,$e,nt,et)=>{const pt=Ge||Ve||nt,ct=ze||$e||et||"?";return te.Z.API_SERVER+"/api/attachments/"+pt+ct+"&t="+(0,le.Jn)(pt,Date.now())+(ut.indexOf(")")>-1?")":"&")}).replace(He,(ut,Ge,ze,Ve,$e)=>{const nt=Ge||Ve,et=ze||$e||"";return'"'+te.Z.API_SERVER+"/api/attachments/"+nt+et+nt+et+"&t="+(0,le.Jn)(nt,Date.now())}).replace(rt,(ut,Ge,ze,Ve,$e)=>{const nt=Ge||Ve,et=ze||$e||"";return"("+te.Z.API_SERVER+"/files/uploads/"+nt+et+nt+et+"&t="+(0,le.Jn)(nt,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,`
|
|
|
`),Qe)};var Pe=({value:Qe="",edit:Xe=!1,className:ot,showTextOnly:He,showLines:rt,style:Ye={},stylesPrev:ut={},highlightKeywords:Ge,showProgramFill:ze,isProgramFill:Ve,disabledFill:$e=!1,programFillValue:nt,openEditor:et=()=>{},onFillChange:pt=dt=>{},onFillBlur:ct=()=>{},onFillFocus:It=()=>{}})=>{let dt=oe(String(Qe||""));const Mt=(0,ce.useRef)(),xt=(0,ce.useRef)(),[gt,_t]=(0,ce.useState)(""),[We,Ae]=(0,ce.useState)("office"),[Se,Be]=(0,ce.useState)([]),Ke=(0,ce.useRef)("a"+(0,b.Z)()),Ne={},De=yt=>/<style[\s\S]*?>/i.test(yt||""),we=(yt,Xt,Lt)=>{const Kt=document.createElement(yt===Te?"input":"textarea");Kt.style.width="100%",Kt.style.height=yt===Te?"40px":"151px",Kt.rows=5,Kt.spellcheck=!1,Kt.name="edu-program-fill",Kt.placeholder="\u8BF7\u8F93\u5165",Kt.dataset.id=Xt;const sn=Object.keys(Ne).length;return Ne[sn]=Kt,`<span class="edu-program-fill-wrap ${yt===Te?"":"show"}" style="width:${yt===Te?"600px":"100%"}" title=${Lt||""}><span>${Kt.outerHTML}<span class="edu-program-fill-score" style="margin:0 6px"></span></span></span>`};function Le(yt){return yt=yt.replace(/!\[.*?\]\(.*?\)/g,""),yt=yt.replace(/\[.*?\]\(.*?\)/g,""),yt=yt.replace(new RegExp("<iframe.*?<\\/iframe>","gs"),""),yt=yt.replace(/<embed.*?>/g,""),yt=yt.replace(/<img.*?>/g,""),yt=yt.replace(new RegExp("<video.*?>.*?<\\/video>","gs"),""),yt=yt.replace(new RegExp("<audio.*?>.*?<\\/audio>","gs"),""),yt=yt.replace(new RegExp("<style.*?>.*?<\\/style>","gs"),""),yt=yt.replace(new RegExp("<script.*?>.*?<\\/script>","gs"),""),yt}const Ue=yt=>!He&&De(dt)?yt:yt.replace(/<style.*?>([\s\S]+?)<\/style>/gim,function(Xt,Lt){let Kt=Lt.replace(/(\n|\r)/g,"").split("}"),sn=[];return Kt.map(Sn=>{Sn!=""&&sn.push(`.${Ke.current} ${Sn}`)}),`<style>${sn.join("}")}</style>`}),Me=(0,ce.useMemo)(()=>{try{const Kt=/\(\s+\/api\/attachments\/|\(\/api\/attachments\//g,sn=/\"\/api\/attachments\/|\"\/attachments\/download\//g,Sn=/\(\s+\/files\/uploads\/|\"\/files\/uploads\//g,Yt=/\(\/attachments\/download\//g;dt=dt.replace(Yt,"("+te.Z.API_SERVER+"/attachments/download/").replace(Kt,"("+te.Z.API_SERVER+"/api/attachments/").replace(sn,'"'+te.Z.API_SERVER+"/api/attachments/").replace(Sn,'"'+te.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,`
|
|
|
`),Mt.current.style.display="none"}catch(Kt){}if(ze){let Kt=-1;return dt=dt.replaceAll("<","<").replaceAll(">",">").replace(/(@▁▁@|@▁@)/g,function(sn,Sn,Yt){var In;return++Kt,we(sn,Kt,(In=nt==null?void 0:nt[Kt])==null?void 0:In.value.replaceAll("<","<").replaceAll(">",">"))}),`<pre style="background:#fff;padding:4px">${Ue(dt||"")}</pre>`}let yt=Ue(dt);yt=(0,Ce.ZP)(yt);const Xt=(0,Ce.ez)();dt.match(/\[TOC\]/)&&(yt=yt.replace("<p>[TOC]</p>",(0,Ce.Qv)()),(0,Ce.Iy)()),yt=yt.replace(/(__special_katext_id_\d+__)/g,(Kt,sn)=>{const{type:Sn,expression:Yt}=Xt[sn];return(0,ee.renderToString)(Oe(Yt)||"",{displayMode:Sn==="block",throwOnError:!1,output:"html"})}),yt=yt.replace(/▁/g,"\u2581\u2581\u2581\u2581\u2581"),(0,Ce.AL)();const Lt=document.createElement("div");if(Lt.innerHTML=yt,He)return Lt.innerText;if(Ge){const Kt=Ge.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");return Pt(Lt,Kt),Lt.innerHTML}return setTimeout(()=>Ot(),500),Lt.innerHTML},[dt,Ge]);(0,ce.useEffect)(()=>{Ct.current&&Ct.current.querySelectorAll(["input","textarea"]).forEach(Xt=>{Xt.oninput=Re,Xt.onblur=tt,Xt.onfocus=lt})},[Se]),(0,ce.useEffect)(()=>{var yt,Xt,Lt,Kt,sn;if(nt!=null&&nt.length)try{const Sn=Ct.current.querySelectorAll(".edu-program-fill-score"),Yt=Ct.current.querySelectorAll('[name="edu-program-fill"]');for(const[In,Kn]of Yt.entries())Kn.value=((yt=nt==null?void 0:nt[In])==null?void 0:yt.value)||"",((Xt=nt==null?void 0:nt[In])==null?void 0:Xt.type)==="warning"?Kn.className="program-fill-warning":((Lt=nt==null?void 0:nt[In])==null?void 0:Lt.type)==="success"?Kn.className="program-fill-success":Kn.className="";for(const[In,Kn]of Sn.entries())Kn.innerHTML=(Kt=nt==null?void 0:nt[In])!=null&&Kt.score?`${(sn=nt==null?void 0:nt[In])==null?void 0:sn.score}\u5206`:"";Be(nt)}catch(Sn){console.log(Sn,"error")}},[nt]);const Re=yt=>{Se[yt.target.dataset.id]=Se[yt.target.dataset.id]||{},Se[yt.target.dataset.id].value=yt.target.value,Be([...Se]),pt(Se,yt.target.dataset.id)},tt=yt=>{Se[yt.target.dataset.id]=Se[yt.target.dataset.id]||{},Se[yt.target.dataset.id].value=yt.target.value,Be([...Se]),ct(Se,yt.target.dataset.id)},lt=yt=>{Se[yt.target.dataset.id]=Se[yt.target.dataset.id]||{},Se[yt.target.dataset.id].value=yt.target.value,Be([...Se]),It(Se,yt.target.dataset.id)};function Pt(yt,Xt){return yt.childNodes.forEach(Lt=>{var Kt;if(Lt.childNodes.length>0)Pt(Lt,Xt);else if(Lt.nodeName!=="IMG")if(Lt.innerHTML)Lt.innerHTML=(Kt=Lt.innerHTML)==null?void 0:Kt.replace(new RegExp(Xt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>');else{const sn=document.createElement("span");sn.innerHTML=Lt.textContent.replace(new RegExp(Xt,"gi"),'<span style="color:#0152d9;background-color:#1890ff33">$&</span>'),Lt.replaceWith(sn)}})}const Ct=(0,ce.useRef)();Ce.jb.WebkitLineClamp=rt,rt&&(Ye=pe(pe({},Ye),Ce.jb));function vt(yt){let Xt=yt.target;if(Xt.tagName.toUpperCase()==="A"){let Lt=Xt.getAttribute("href");if(Lt.indexOf("office")>-1)yt.preventDefault(),_t(Lt),Ae("office");else if(Lt.indexOf("application/pdf")>-1)yt.preventDefault(),_t(Lt),Ae("pdf");else if(Lt.indexOf("text/html")>-1)yt.preventDefault(),_t(Lt),Ae("html");else if(Lt.startsWith("#")){yt.preventDefault();let Kt=document.getElementById(Lt.replace("#",""));Kt&&Kt.scrollIntoView(!0)}}}const Ot=()=>{var yt;const Xt=(yt=Ct.current)==null?void 0:yt.querySelectorAll("video");Xt==null||Xt.forEach(Lt=>{if(Lt.oncontextmenu=()=>!1,Lt.src.indexOf(".m3u8")>-1&&!Lt.canPlayType("application/vnd.apple.mpegurl")){if(se.ZP.isSupported()){var Kt=new se.ZP;Kt.loadSource(Lt.src),Kt.attachMedia(Lt)}}})};(0,ce.useEffect)(()=>{if(Ct.current&&Me&&Me.match(Ee)&&window.PR.prettyPrint(),Ct.current)return Ct.current.addEventListener("click",vt),()=>{var yt;(yt=Ct.current)==null||yt.removeEventListener("click",vt),(0,Ce.AL)(),(0,Ce.Iy)()}},[Me,Ct.current,vt]);const zt=yt=>{yt.target.nodeName==="IMG"&&yt.target.className.indexOf("draw-flowchart")>-1?(Mt.current.style.zIndex=1,Mt.current.style.display="flex",Mt.current.style.width=yt.target.clientWidth+"px",Mt.current.style.height=yt.target.clientHeight+"px",Mt.current.style.top=yt.target.offsetTop+"px",Mt.current.style.left=yt.target.offsetLeft+"px",yt.target.id&&(xt.current=yt.target.id)):Mt.current.style.display="none"},Ft=()=>{Mt.current.style.display="none"};return(0,ce.useEffect)(()=>{var yt;const Xt=Lt=>{Lt.preventDefault(),Lt.clipboardData.setData("text",window.getSelection().toString())};return(yt=Ct.current)==null||yt.addEventListener("copy",Xt),()=>{var Lt;(Lt=Ct.current)==null||Lt.removeEventListener("copy",Xt)}},[Ct.current]),ce.createElement("div",{style:{position:"relative"},onMouseLeave:Ft},He&&ce.createElement("div",{ref:Ct,className:`${ve.mdBody} `},Me),!He&&!De(Me)&&ce.createElement("div",{ref:Ct,style:pe({},Ye),onMouseOver:zt,className:`${ot||""} ${$e?"disabled-fill":""} markdown-body ${ve.mdBody} ${Ke.current}`,dangerouslySetInnerHTML:{__html:Me}}),!He&&De(Me)&&ce.createElement(ae,{html:Me}),ce.createElement("div",{ref:Mt,className:`${ve.button} ${Xe?"":ve.previewFlowChart}`},ce.createElement(ne.Z,null,ce.createElement(E.ZP,{onClick:()=>{Xe?et(xt.current):(_t(xt.current),Ae("flowChart"))}},Xe?"\u7F16\u8F91":"\u9884\u89C8"))),ce.createElement(z.Z,{close:!0,data:gt,type:gt!=null&>.length?We:"",style:pe({},ut),onClose:()=>_t("")}))}},766:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ue}});var ce=be(76560),ie={ldsRing:"ldsRing___mpBZC",idsRingWrapper:"idsRingWrapper___Of9_n",ldsring:"ldsring___o0w2t"},Ce=be(59301),ue=({message:se,className:te,children:le,style:ee={}})=>Ce.createElement("div",{className:`custom-spinner ${ie.idsRingWrapper} ${te}`},Ce.createElement("div",{className:ie.ldsRing},Ce.createElement("div",null),Ce.createElement("div",null),Ce.createElement("div",null),Ce.createElement("div",null)),se?Ce.createElement("p",{style:ee},se):null,le,Ce.createElement(ce.Outlet,null))},72015:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ue}});var ce=be(59301),ie=be(33796),Ce=be(59301),ue=({defaultX:se="40%",leftChild:te,rightChild:le,className:ee,hideResize:ne=!1})=>{const[E,b]=(0,ce.useState)(se),z=(0,ce.useRef)();function x(){z.current=!0}(0,ce.useEffect)(()=>{function oe(ye){z.current&&(ie.Z.publish("resize-move-bar",ye),b(ye.pageX))}function ve(){z.current=!1}return window.addEventListener("mousemove",oe),window.addEventListener("mouseup",ve),()=>{window.removeEventListener("mousemove",oe),window.removeEventListener("mouseup",ve)}},[]);const re=typeof E=="number"&&E!==.01?`${E}px`:se,ae=`calc(100% - ${ne?"0px":"4px"} - ${re})`;return Ce.createElement("div",{className:`split-panel-container ${ee}`},Ce.createElement("section",{style:{width:re,display:E===.01?"none":""}},te),Ce.createElement("section",{className:"resize-x-bar",onMouseDown:x},Ce.createElement("a",{className:"btn-resize"},Ce.createElement("svg",{width:"16",height:"13",viewBox:"0 0 16 13"},Ce.createElement("path",{d:"M12.245 7.53H5.647v1.882h6.598v2.823L16 8.471l-3.755-3.765V7.53zM10.353 4.706H3.755v2.823L0 3.765 3.755 0v2.824h6.598v1.882z"})))),Ce.createElement("section",{style:{width:ae}},le))}},46685:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return te}});var ce=be(59301),ie={flex_box_center:"flex_box_center___Gc4dd",flex_space_between:"flex_space_between___K2f1v",flex_box_vertical_center:"flex_box_vertical_center___pupRp",flex_box_center_end:"flex_box_center_end___UDLRC",flex_box_column:"flex_box_column___a5uDo",result:"result___gu5zt",title:"title___xrnx2",left:"left___IAxp9",leftNode:"leftNode___HL8fG",right:"right___ZXYmw",rightNode:"rightNode___jYL5_"},Ce=be(92310),ue=be.n(Ce),te=({className:le,style:ee={},leftNode:ne,leftTitle:E="\u81EA\u6D4B\u8F93\u5165",rightNode:b,rightTitle:z="\u8FD0\u884C\u7ED3\u679C"})=>ce.createElement("div",{className:ue()(ie.result,le),style:ee},ce.createElement("div",{className:ie.left},ce.createElement("div",{className:ie.title},ce.createElement("i",{style:{color:"#08CF76"},className:"iconfont iconfont icon-zidingyiceshiyongli font14 mr5"}),ce.createElement("span",null,E)),ce.createElement("div",{className:ie.leftNode},ne)),ce.createElement("div",{className:ie.right},ce.createElement("div",{className:ie.title},ce.createElement("i",{style:{color:"#00DFFF"},className:"iconfont iconfont icon-daimazhihangjieguo font14 mr5"}),ce.createElement("span",null,z)),ce.createElement("div",{className:ie.rightNode},b)))},38273:function(qt,Dt,be){"use strict";var ce=be(59301);const ie=ue=>String(ue).length===1?`0${ue}`:ue,Ce=({className:ue="",onChange:se,defaultValue:te=0})=>{const[le,ee]=(0,ce.useState)(te);(0,ce.useEffect)(()=>{const z=setTimeout(()=>{ee(le+1e3)},1e3);return se(le+1e3),()=>{clearInterval(z)}},[le]);const ne=parseInt(le/(60*6e4))||"00",E=parseInt(le%(60*6e4)/6e4)||"00",b=parseInt(le%6e4/1e3)||"00";return ce.createElement("div",{className:ue},ie(ne),":",ie(E),":",ie(b))};Dt.Z=Ce},93152:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ae}});var ce=be(59301),ie=be(6767),Ce=be(75727),ue=be(60513),se=be(44523),te=be(34055),le=be(56102),ee=be(2610),ne={watermark:"watermark___hNYlv",videovideo:"videovideo___ovOkV",animate__loop:"animate__loop___mvL6s",upDown:"upDown___SlgHv",container:"container___g1WYG","video-container":"video-container___XPkWR","video-controls":"video-controls___to0Zq",hide:"hide___NA3DV","video-progress":"video-progress___gqHsd",seek:"seek___iZHBm","seek-tooltip":"seek-tooltip___uWyXx","bottom-controls":"bottom-controls___uoIBm","left-controls":"left-controls___mBEx4","right-controls":"right-controls___e9L6r",rateOverlay:"rateOverlay___HHBWe",controlText:"controlText___M_BWR","volume-controls":"volume-controls___fa3mE","fullscreen-button":"fullscreen-button___ur0es","fullscreen-button1":"fullscreen-button1___rfaXm","pip-button":"pip-button___GFO8W","playback-animation":"playback-animation___ndURq",volume:"volume___OTmpP",hidden:"hidden___o7GkT"},E=(oe,ve,ye)=>new Promise((me,ge)=>{var _e=ke=>{try{pe(ye.next(ke))}catch(Te){ge(Te)}},he=ke=>{try{pe(ye.throw(ke))}catch(Te){ge(Te)}},pe=ke=>ke.done?me(ke.value):Promise.resolve(ke.value).then(_e,he);pe((ye=ye.apply(oe,ve)).next())});function b(oe){if(isNaN(oe))return{minutes:"00",seconds:"00"};const ve=new Date(oe*1e3).toISOString().substr(11,8);return{hour:ve.substr(0,2),minutes:ve.substr(3,2),seconds:ve.substr(6,2)}}Object.defineProperty(HTMLMediaElement.prototype,"playing",{get:function(){return this.currentTime>0&&!this.paused&&!this.ended&&this.readyState>2}});function z(oe,ve){return oe-ve}function x(oe){oe.sort(z);let ve=0;for(let ye=0;ye<oe.length-1;ye++){let me=Math.abs(oe[ye+1]-oe[ye]);me<21&&(ve+=me)}return ve}const re=/(android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini)/i;var ae=(0,ce.forwardRef)(({allow_skip:oe,src:ve,toLog:ye,videoId:me,logWatchHistory:ge,courseId:_e=null,startTime:he,handlePause:pe=()=>{},handlePlay:ke=()=>{},handlePlayEnded:Te=()=>{},autoPlay:Ee=!1,onPlayEnded:Oe=()=>{},isShowWaterMark:je=!0},Pe)=>{var Qe;ve=ve==null?void 0:ve.replace("http://","https://");const ot=((Qe=ve==null?void 0:ve.split("."))==null?void 0:Qe.pop())==="flv",He=(0,ce.useRef)(),rt=(0,ce.useRef)(),Ye=(0,ce.useRef)(),ut=(0,ce.useRef)(),Ge=(0,ce.useRef)(),ze=(0,ce.useRef)(),Ve=(0,ce.useRef)(),$e=(0,ce.useRef)(),nt=(0,ce.useRef)(),et=(0,ce.useRef)(),pt=(0,ce.useRef)(),ct=(0,ce.useRef)(),It=(0,ce.useRef)(),dt=(0,ce.useRef)(),Mt=navigator.userAgent.toLowerCase().match(re),xt=Mt?Mt[0]:"pc",gt=(0,ce.useRef)(!1),_t=(0,te.eY)();let We=0,Ae=0,Se=0,Be=null,Ke=!1,Ne=20,De=1,we=!1,Le=!1,Ue=[];(0,ce.useImperativeHandle)(Pe,()=>({getLastUpdatedTime:()=>He.current.currentTime,getDuration:()=>He.current.duration})),ie.ZP.config({maxCount:1,getContainer:()=>Ye.current});const Me=(0,ce.useCallback)((Ot,zt=!1)=>{let Ft={point:He.current.currentTime};Be?(Ft.log_id=Be,Ft.watch_duration=x(Ue),Ft.total_duration=Ae):(_e?(Ft.video_id=parseInt(me,10),Ft.course_id=_e):Ft.video_id=me,Ft.duration=We,Ft.device=xt),zt&&(Ft.ed="1");function yt(){return E(this,null,function*(){we=!0,Be=yield ge==null?void 0:ge(Ft),we=!1,Ot&&Ot()})}yt()},[me,_e]);(0,ce.useEffect)(()=>{He.current&&(ut.current.style.display="none",Ge.current.style.display="block"),ie.ZP.destroy();let Ot=null;return ue.Z.isSupported&&ot&&ve&&(ve==null?void 0:ve.indexOf(".m3u8"))<0?(Ot=ue.Z.createPlayer({type:"flv",volume:.8,cors:!0,url:ve,muted:!1}),He.current&&(Ot.attachMediaElement(He.current),Ot.load())):He.current.setAttribute("src",ve),tt(),()=>{Ot&&(Ot.unload(),Ot.pause(),Ot.destroy(),Ot=null)}},[He,ot,ve]);function Re(){He.current.paused?(ut.current.style.display="none",Ge.current.style.display="block"):(ut.current.style.display="block",Ge.current.style.display="none")}function tt(){pt.current.style.display="none",It.current.style.display="none",ct.current.style.display="none",He.current.muted||He.current.volume===0?pt.current.style.display="block":He.current.volume>0&&He.current.volume<=.5?It.current.style.display="block":ct.current.style.display="block"}(0,ce.useEffect)(()=>{const Ot=document.getElementById("play"),zt=document.querySelectorAll(".playback-icons use");function Ft(){ke(),he&&!gt.current&&(He.current.currentTime=he),gt.current=!0,Ue.push(He.current.currentTime),Ke||(Ke=!0,ye&&Me())}function yt(){return E(this,null,function*(){Re(),Ue.push(He.current.currentTime),ye&&Me(()=>{Be=null,Se=0,Ke=!1,we=!1,Le=!1,Ue=[],Ae=0,De=1},!0),Oe()})}function Xt(){ze.current.value=Math.round(He.current.currentTime),Ve.current.value=Math.round(He.current.currentTime)}function Lt(){const Un=b(Math.round(He.current.currentTime));nt.current.innerText=`${Un.hour>0?Un.hour+":":""}${Un.minutes}:${Un.seconds}`,nt.current.setAttribute("datetime",`${Un.hour>0?" "+Un.hour+" ":""}${Un.minutes}m ${Un.seconds}s`)}function Kt(){var Un,Fn,or,Vn,Bn,_n,zn;const cr=Math.round((Un=He.current)==null?void 0:Un.duration);(or=(Fn=ze.current)==null?void 0:Fn.setAttribute)==null||or.call(Fn,"max",cr),(Bn=(Vn=Ve.current)==null?void 0:Vn.setAttribute)==null||Bn.call(Vn,"max",cr);const Dn=b(cr);$e.current&&($e.current.innerText=`${Dn.hour>0?Dn.hour+":":""}${Dn.minutes}:${Dn.seconds}`,(zn=(_n=$e.current).setAttribute)==null||zn.call(_n,"datetime",`${Dn.hour>0?" "+Dn.hour+" ":""}${Dn.minutes}m ${Dn.seconds}s`))}function sn(){try{const Un=Math.round(He.current.duration);ze.current.setAttribute("max",Un),Ve.current.setAttribute("max",Un);const Fn=b(Un);$e.current.innerText=`${Fn.hour>0?Fn.hour+":":""}${Fn.minutes}:${Fn.seconds}`,$e.current.setAttribute("datetime",`${Fn.hour>0?" "+Fn.hour+" ":""}${Fn.minutes}m ${Fn.seconds}s`),Xt(),Lt();const{width:or,height:Vn,x:Bn,y:_n}=rt.current.getBoundingClientRect();if(Bn<0||_n<0,!Le){let zn=He.current.currentTime,cr=zn-Se;Math.abs(cr)<10?(Ae+=Math.abs(cr),Se=zn,we||Ae-De*Ne>=0&&(De++,Ue.push(Se),ye&&Me())):(Se=zn,ye&&Me())}}catch(Un){console.log("videoplaying:",Un)}}function Sn(){Le=!0}function Yt(){He.current.playing&&Ue.push(He.current.currentTime,Se),Se=He.current.currentTime,Le=!1}function In(){We=He.current.duration,We<=20&&(Ne=We/3),He.current.addEventListener("play",Ft)}function Kn(Un){Un.preventDefault(),(0,ee.vp)()?(He.current.style.width="100%",He.current.style.height="100%"):He.current.style.cssText=""}function Gn(){pe()}function nr(Un){if(!oe){ie.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");return}const Fn=Un.target.dataset.seek?Un.target.dataset.seek:Un.target.value;He.current.currentTime=Fn,Ve.current.value=Fn,ze.current.value=Fn}function hr(Un){const Fn=Math.round(Un.offsetX/Un.target.clientWidth*parseInt(Un.target.getAttribute("max"),10));ze.current.setAttribute("data-seek",Fn);const or=b(Fn);et.current.textContent=`${or.hour>0?or.hour+":":""}${or.minutes}:${or.seconds}`;const Vn=He.current.getBoundingClientRect();et.current.style.left=`${Un.pageX-Vn.left}px`}function ur(Un){switch(Un.code){case"Space":Un.preventDefault(),Ct();break;case"ArrowRight":if(Un.preventDefault(),!oe){ie.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(He.current.currentTime>=He.current.duration)break;He.current.currentTime=parseInt(He.current.currentTime)+5,Xt();break;case"ArrowLeft":if(Un.preventDefault(),!oe){ie.ZP.warning("\u8BE5\u89C6\u9891\u7981\u6B62\u5FEB\u8FDB/\u540E\u9000\u64AD\u653E");break}if(He.current.currentTime===0)break;He.current.currentTime=parseInt(He.current.currentTime)-5,Xt();break;case"ArrowUp":Un.preventDefault(),He.current.volume<1&&(He.current.volume=(parseInt(He.current.volume*10)+1)/10);break;case"ArrowDown":Un.preventDefault(),He.current.volume>0&&(He.current.volume=(parseInt(He.current.volume*10)-1)/10);break}}return Ye.current.addEventListener((0,ee.gH)(),Kn),He.current.addEventListener("canplay",In),He.current.addEventListener("ended",yt),He.current.addEventListener("seeking",Sn),He.current.addEventListener("seeked",Yt),He.current.addEventListener("loadedmetadata",Kt),ze.current.addEventListener("mousemove",hr),ze.current.addEventListener("input",nr),He.current.addEventListener("timeupdate",sn),He.current.addEventListener("pause",Gn),He.current.addEventListener("volumechange",tt),document.addEventListener("keydown",ur),()=>{var Un,Fn,or,Vn,Bn,_n,zn,cr,Dn,Cn,er,$t;(Un=He.current)==null||Un.removeEventListener("canplay",In),(Fn=He.current)==null||Fn.removeEventListener("play",Ft),(or=He.current)==null||or.removeEventListener("ended",yt),(Vn=He.current)==null||Vn.removeEventListener("seeking",Sn),(Bn=He.current)==null||Bn.removeEventListener("seeked",Yt),(_n=ze.current)==null||_n.removeEventListener("mousemove",hr),(zn=ze.current)==null||zn.removeEventListener("input",nr),(cr=He.current)==null||cr.removeEventListener("timeupdate",sn),(Dn=He.current)==null||Dn.removeEventListener("pause",Gn),(Cn=He.current)==null||Cn.removeEventListener("loadedmetadata",Kt),(er=He.current)==null||er.removeEventListener("volumechange",tt),document.removeEventListener("keydown",ur),($t=He.current)!=null&&$t.playing&&(Ue.push(Se,He.current.currentTime),ye&&Me())}},[He,ve]),(0,ce.useEffect)(()=>{if(He.current.onended=()=>{Te(He)},He.current.oncontextmenu=()=>!1,(ve==null?void 0:ve.indexOf(".m3u8"))>-1){if(He.current.canPlayType("application/vnd.apple.mpegurl"))He.current.src=ve;else if(se.ZP.isSupported()){var Ot=new se.ZP;Ot.loadSource(ve),Ot.attachMedia(He.current)}}},[ve]);const[lt,Pt]=(0,ce.useState)(1),Ct=()=>{He.current.paused||He.current.ended?He.current.play():He.current.pause(),Re()};function vt(){He.current.muted=!He.current.muted,He.current.muted?(dt.current.setAttribute("data-volume",volume.value),dt.current.value=0):dt.current.value=dt.current.dataset.volume}return ce.createElement("div",{style:{position:"relative"},ref:Ye},ce.createElement("div",{ref:rt,className:`${ne.watermark} animated_alternate animate__animated_10s animate__infinite animate__stepstart ${ne.animate__loop}`},je&&_t?_t.login:" "),ce.createElement("div",{className:ne.container},ce.createElement("div",{className:ne["video-container"],id:"video-container"},ce.createElement("div",{className:ne["playback-animation"],id:"playback-animation"},ce.createElement("svg",{className:ne["playback-icons"]},ce.createElement("use",{className:"hidden",href:"#play-icon"}),ce.createElement("use",{href:"#pause"}))),ce.createElement("video",{className:ne.video,id:"video",preload:"auto",disablePictureInPicture:!0,ref:He,autoPlay:Ee}),ce.createElement("div",{className:`${ne["video-controls"]} `,id:"video-controls"},ce.createElement("div",{className:ne["bottom-controls"]},ce.createElement("div",{className:ne["left-controls"]},ce.createElement("button",{"data-title":"\u64AD\u653E/\u6682\u505C",id:"play",onClick:Ct},ce.createElement("svg",{className:ne["playback-icons"]},ce.createElement("use",{ref:Ge,href:"#play-icon"}),ce.createElement("use",{ref:ut,style:{display:"none"},href:"#pause"}))),ce.createElement("div",{className:ne.time},ce.createElement("time",{id:"time-elapsed",ref:nt},"00:00"),ce.createElement("span",null," / "),ce.createElement("time",{id:"duration",ref:$e},"00:00"))),ce.createElement("div",{className:ne["right-controls"]},oe&&ce.createElement(Ce.Z,{placement:"top",overlayClassName:ne.rateOverlay,getPopupContainer:Ot=>Ot.parentNode,menu:{items:[{key:"1",label:ce.createElement("span",{onClick:()=>{Pt(1),He.current.playbackRate=1}},"1.0x")},{key:"2",label:ce.createElement("span",{onClick:()=>{Pt(1.5),He.current.playbackRate=1.5}},"1.5x")},{key:"3",label:ce.createElement("span",{onClick:()=>{Pt(2),He.current.playbackRate=2}},"2.0x")}]}},ce.createElement("div",{className:`${ne.controlText} mr5`},"\u500D\u901F")),ce.createElement(le.CopyToClipboard,{text:ve,onCopy:()=>ie.ZP.success("\u590D\u5236\u6210\u529F")},ce.createElement("button",{"data-title":"\u590D\u5236\u94FE\u63A5"},ce.createElement("i",{className:"icon-lianjie2 iconfont",style:{fontSize:"12px",color:"white"}}))),ce.createElement("div",{className:ne["volume-controls"]},ce.createElement("button",{"data-title":"\u5F00\u542F/\u5173\u95ED\u58F0\u97F3",className:ne["volume-button"],id:"volume-button",onClick:vt},ce.createElement("i",{ref:pt,className:"icon-a-bianzu8 iconfont",style:{fontSize:"14px",color:"white"}}),ce.createElement("i",{ref:It,className:"icon-shengyinkaibeifen iconfont",style:{fontSize:"14px",color:"white"}}),ce.createElement("i",{ref:ct,className:"icon-shengyinkai iconfont",style:{fontSize:"14px",color:"white"}})),ce.createElement("input",{className:ne.volume,id:"volume",value:"1","data-mute":"0.5",type:"range",max:"1",min:"0",step:"0.01",ref:dt,style:{display:"none"},onClick:tt})),ce.createElement("button",{"data-title":"\u5168\u5C4F/\u9000\u51FA\u5168\u5C4F",className:ne["fullscreen-button"],onClick:()=>{(0,ee.vp)()?(0,ee.BU)():(0,ee.Dj)(Ye.current)}},ce.createElement("i",{className:"icon-fangda1 iconfont",style:{fontSize:"12px",color:"white"}})))),ce.createElement("div",{className:ne["video-progress"]},ce.createElement("progress",{ref:Ve,value:"0",min:"0"}),ce.createElement("input",{className:ne.seek,ref:ze,value:"0",min:"0",type:"range",step:"1"}),ce.createElement("div",{className:ne["seek-tooltip"],ref:et,id:"seek-tooltip"},"00:00"))))),ce.createElement("svg",{style:{display:"none"}},ce.createElement("defs",null,ce.createElement("symbol",{id:"pause",viewBox:"0 0 24 24"},ce.createElement("path",{d:"M14.016 5.016h3.984v13.969h-3.984v-13.969zM6 18.984v-13.969h3.984v13.969h-3.984z"})),ce.createElement("symbol",{id:"play-icon",viewBox:"0 0 24 24"},ce.createElement("path",{d:"M8.016 5.016l10.969 6.984-10.969 6.984v-13.969z"})),ce.createElement("symbol",{id:"volume-high",viewBox:"0 0 24 24"},ce.createElement("path",{d:"M14.016 3.234q3.047 0.656 5.016 3.117t1.969 5.648-1.969 5.648-5.016 3.117v-2.063q2.203-0.656 3.586-2.484t1.383-4.219-1.383-4.219-3.586-2.484v-2.063zM16.5 12q0 2.813-2.484 4.031v-8.063q1.031 0.516 1.758 1.688t0.727 2.344zM3 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6z"})),ce.createElement("symbol",{id:"volume-low",viewBox:"0 0 24 24"},ce.createElement("path",{d:"M5.016 9h3.984l5.016-5.016v16.031l-5.016-5.016h-3.984v-6zM18.516 12q0 2.766-2.531 4.031v-8.063q1.031 0.516 1.781 1.711t0.75 2.32z"})),ce.createElement("symbol",{id:"volume-mute",viewBox:"0 0 24 24"},ce.createElement("path",{d:"M12 3.984v4.219l-2.109-2.109zM4.266 3l16.734 16.734-1.266 1.266-2.063-2.063q-1.547 1.313-3.656 1.828v-2.063q1.172-0.328 2.25-1.172l-4.266-4.266v6.75l-5.016-5.016h-3.984v-6h4.734l-4.734-4.734zM18.984 12q0-2.391-1.383-4.219t-3.586-2.484v-2.063q3.047 0.656 5.016 3.117t1.969 5.648q0 2.203-1.031 4.172l-1.5-1.547q0.516-1.266 0.516-2.625zM16.5 12q0 0.422-0.047 0.609l-2.438-2.438v-2.203q1.031 0.516 1.758 1.688t0.727 2.344z"})),ce.createElement("symbol",{id:"fullscreen",viewBox:"0 0 24 24"},ce.createElement("path",{d:"M14.016 5.016h4.969v4.969h-1.969v-3h-3v-1.969zM17.016 17.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 9.984v-4.969h4.969v1.969h-3v3h-1.969zM6.984 14.016v3h3v1.969h-4.969v-4.969h1.969z"})),ce.createElement("symbol",{id:"fullscreen-exit",viewBox:"0 0 24 24"},ce.createElement("path",{d:"M15.984 8.016h3v1.969h-4.969v-4.969h1.969v3zM14.016 18.984v-4.969h4.969v1.969h-3v3h-1.969zM8.016 8.016v-3h1.969v4.969h-4.969v-1.969h3zM5.016 15.984v-1.969h4.969v4.969h-1.969v-3h-3z"})),ce.createElement("symbol",{id:"pip",viewBox:"0 0 24 24"},ce.createElement("path",{d:"M21 19.031v-14.063h-18v14.063h18zM23.016 18.984q0 0.797-0.609 1.406t-1.406 0.609h-18q-0.797 0-1.406-0.609t-0.609-1.406v-14.016q0-0.797 0.609-1.383t1.406-0.586h18q0.797 0 1.406 0.586t0.609 1.383v14.016zM18.984 11.016v6h-7.969v-6h7.969z"})))))})},39479:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ue}});var ce=be(59301),ie=be(33796),Ce=be(90083),ue=()=>{const[se,te]=(0,ce.useState)(""),[le,ee]=(0,ce.useState)(0);let[ne,E]=(0,ce.useState)(),[b,z]=(0,ce.useState)();const[x,re]=(0,ce.useState)(!1),ae=(0,ce.useRef)("");(0,ce.useEffect)(()=>ie.Z.subscribe("preview-image",Ee=>{te(Ee),console.log(pe.current)}),[]),(0,ce.useEffect)(()=>(document.addEventListener("keydown",oe),()=>{document.removeEventListener("keydown",oe)}),[]),(0,ce.useEffect)(()=>{ae.current=se},[se]);function oe(Te){console.log("e====",Te),Te.keyCode==27&&ae.current&&ve()}function ve(){document.body.style.overflow="auto",E(void 0),z(void 0),ee(0),te("")}function ye(){ee(le+90)}function me(){ne=pe.current.width*1.1,b=pe.current.height*1.1,z(b),E(ne)}function ge(){ne=pe.current.width/1.1,b=pe.current.height/1.1,z(b),E(ne)}const _e=(0,ce.useRef)(),he=(0,ce.useRef)(),pe=(0,ce.useRef)(),ke=Te=>{(Te.nativeEvent.target===_e.current||Te.nativeEvent.target===he.current)&&ve()};return ce.createElement(ce.Fragment,null,se?ce.createElement("div",null,ce.createElement("div",{className:"preview-wrp-group",ref:he},ce.createElement(Ce.Z,{className:"image-preview",src:se,style:{display:"none"},preview:{visible:!0,src:se,onVisibleChange:Te=>{te("")}},alt:"\u9884\u89C8\u5927\u56FE"}))):null)}},44905:function(qt,Dt,be){"use strict";be.d(Dt,{h:function(){return _e}});var ce=be(59301),ie=be(82326),Ce=be(28284),ue=be(99571),se=be(89780),te=be.n(se),le=be(66543),ee=be(59598),ne=Object.defineProperty,E=Object.defineProperties,b=Object.getOwnPropertyDescriptors,z=Object.getOwnPropertySymbols,x=Object.prototype.hasOwnProperty,re=Object.prototype.propertyIsEnumerable,ae=(he,pe,ke)=>pe in he?ne(he,pe,{enumerable:!0,configurable:!0,writable:!0,value:ke}):he[pe]=ke,oe=(he,pe)=>{for(var ke in pe||(pe={}))x.call(pe,ke)&&ae(he,ke,pe[ke]);if(z)for(var ke of z(pe))re.call(pe,ke)&&ae(he,ke,pe[ke]);return he},ve=(he,pe)=>E(he,b(pe));const ye=ie.default.Option,me={labelCol:{span:4},wrapperCol:{span:20}},ge={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"]};Dt.Z=({callback:he,onCancel:pe})=>{const[ke,Te]=(0,ce.useState)("python");function Ee(je){Te(ge[je][1])}function Oe(je){he(je)}return ce.createElement(Ce.default,ve(oe({},me),{className:"code-block-panel",initialValues:{language:"python",content:""},onFinish:Oe,style:{width:500}}),ce.createElement(Ce.default.Item,{label:"\u4EE3\u7801\u8BED\u8A00",name:"language"},ce.createElement(ie.default,{getPopupContainer:je=>je.parentNode,onChange:Ee},Object.keys(ge).map(je=>ce.createElement(ye,{key:je,value:je},ge[je][0])))),ce.createElement(Ce.default.Item,{label:"\u4EE3\u7801\u5185\u5BB9",name:"content",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u4EE3\u7801\u5185\u5BB9"}]},ce.createElement(_e,{mode:ke})),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(ue.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(ue.ZP,{type:"ghost",onClick:pe},"\u53D6\u6D88")))};function _e({value:he,onChange:pe,mode:ke,options:Te={}}){const Ee=(0,ce.useRef)(),[Oe,je]=(0,ce.useState)();return(0,ce.useEffect)(()=>{if(Oe){let Pe=function(Qe){const Xe=Qe.getValue();pe&&pe(Xe)};return Oe.on("change",Pe),()=>{Oe.off("change",Pe)}}},[Oe,pe]),(0,ce.useEffect)(()=>{Oe&&Oe.setOption("mode",ke)},[Oe,ke]),(0,ce.useEffect)(()=>{Oe&&(he!==Oe.getValue()||he==="")&&setTimeout(()=>{Oe.setValue(he||"")},300)},[Oe,he]),(0,ce.useEffect)(()=>{if(Ee.current&&!Oe){const Pe=te().fromTextArea(Ee.current,oe({mode:ke,lineNumbers:!0,lineWrapping:!0,autoCloseBrackets:!0,tabSize:4,autofocus:!0,autoCloseTags:!0,matchBrackets:!0,styleActiveLine:!0},Te));je(Pe)}},[Ee.current,Oe]),ce.createElement("div",{className:"my-codemirror-container"},ce.createElement("textarea",{ref:Ee}))}},2978:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return cr}});var ce=be(59301),ie=be(76560),Ce=be(89780),ue=be.n(Ce),se=be(76374),te=be(66543),le=be(6313),ee=be(25717),ne=be(99498),E=be(25419),b=be(67549),z=be(38394),x=({value:Dn="",className:Cn,showTextOnly:er,showLines:$t,style:Ie={}})=>{const Ze=(0,ce.useMemo)(()=>"",[Dn]);return ce.createElement(ce.Fragment,null,ce.createElement("div",{dangerouslySetInnerHTML:{__html:Ze}}))},re=Object.defineProperty,ae=Object.defineProperties,oe=Object.getOwnPropertyDescriptors,ve=Object.getOwnPropertySymbols,ye=Object.prototype.hasOwnProperty,me=Object.prototype.propertyIsEnumerable,ge=(Dn,Cn,er)=>Cn in Dn?re(Dn,Cn,{enumerable:!0,configurable:!0,writable:!0,value:er}):Dn[Cn]=er,_e=(Dn,Cn)=>{for(var er in Cn||(Cn={}))ye.call(Cn,er)&&ge(Dn,er,Cn[er]);if(ve)for(var er of ve(Cn))me.call(Cn,er)&&ge(Dn,er,Cn[er]);return Dn},he=(Dn,Cn)=>ae(Dn,oe(Cn));let pe=[{title:"\u7C97\u4F53",icon:"md-iconfont icon-bold",actionName:"bold"},{title:"\u659C\u4F53",icon:"md-iconfont icon-italic",actionName:"italic"},"|",{title:"\u65E0\u5E8F\u5217\u8868",icon:"md-iconfont icon-unorder-list",actionName:"list-ul"},{title:"\u6709\u5E8F\u5217\u8868",icon:"md-iconfont icon-order-list",actionName:"list-ol"},"|",{title:"\u884C\u5185\u4EE3\u7801",icon:"md-iconfont icon-code",actionName:"code"},{title:"\u4EE3\u7801\u5757\uFF08\u591A\u8BED\u8A00\u98CE\u683C\uFF09",icon:"md-iconfont icon-file-code",actionName:"code-block"},{title:"\u94FE\u63A5",icon:"md-iconfont icon-link",actionName:"link"},"|",{title:"\u884C\u5185\u516C\u5F0F",icon:"md-iconfont icon-sum",actionName:"inline-latex"},{title:"\u6570\u5B66\u516C\u5F0F",icon:"iconfont icon-shuxuetuxiang2",actionName:"maths-latex"},{title:"\u591A\u884C\u516C\u5F0F",icon:"md-iconfont icon-formula",actionName:"latex"},"|",{title:"\u6DFB\u52A0\u56FE\u7247",icon:"md-iconfont icon-picture",actionName:"upload-image"},{title:"\u63D2\u5165\u753B\u56FE",icon:"iconfont icon-sheji",actionName:"draw-image"},{title:"\u63D2\u5165\u6D41\u7A0B\u56FE",icon:"iconfont icon-liucheng",actionName:"add-flowchart"},{title:"\u8868\u683C",icon:"md-iconfont icon-table",actionName:"add-table"},"|",{title:"\u6362\u884C",icon:"md-iconfont icon-minus",actionName:"line-break"},{title:"\u6E05\u7A7A",icon:"md-iconfont icon-eraser",actionName:"eraser"}];function ke({onActionCallback:Dn,title:Cn,icon:er,actionName:$t,className:Ie="",children:Ze}){function qe(){Dn($t)}return ce.createElement("a",{title:Cn,className:Ie,onClick:qe},ce.createElement("i",{className:`${er}`}),Ze)}var Te=({watch:Dn,showNullButton:Cn,showNullProgramButton:er,onActionCallback:$t,fullScreen:Ie,insertTemp:Ze,hidetoolBar:qe,extraUse:st})=>{const mt=[...pe,{title:`${Dn?"\u5173\u95ED\u5B9E\u65F6\u9884\u89C8":"\u5F00\u542F\u5B9E\u65F6\u9884\u89C8"}`,icon:`${Dn?"md-iconfont icon-eye-slash":"md-iconfont icon-eye"}`,actionName:"trigger-watch"}];return ce.createElement("ul",{className:"markdown-toolbar-container"},!qe&&mt.map((Nt,kt)=>ce.createElement("li",{key:kt},Nt.actionName?ce.createElement(ke,he(_e({},Nt),{onActionCallback:$t})):ce.createElement("span",{className:"v-line"}))),Cn?ce.createElement("li",null,ce.createElement(ke,{icon:"iconfont icon-tianjia5 insert-blank",className:"btn-null ml5",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-null-ch",onActionCallback:$t},ce.createElement("span",{className:"fill-tip"},"\u70B9\u51FB\u65B0\u589E\u586B\u7A7A\u9879"))):null,er?ce.createElement(ce.Fragment,null,ce.createElement("li",null,ce.createElement(ke,{icon:"md-iconfont icon-edit insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-signal",onActionCallback:$t},ce.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u5355\u884C\u586B\u7A7A\u9879"))),ce.createElement("li",null,ce.createElement(ke,{icon:"md-iconfont icon-uniE900 insert-blank",className:"btn-null",title:"\u589E\u52A0\u586B\u7A7A",actionName:"add-multiple",onActionCallback:$t},ce.createElement("span",{className:"fill-tip"},"\u6DFB\u52A0\u591A\u884C\u586B\u7A7A\u9879")))):null,Ze&&ce.createElement("li",null,ce.createElement(ke,{icon:"md-iconfont icon-edit",className:"btn-null",title:"\u63D2\u5165\u6A21\u677F",actionName:`inster-template-${Ze}`,onActionCallback:$t},ce.createElement("span",{className:"fill-tip"},"\u63D2\u5165\u6A21\u677F"))),st&&ce.createElement("li",null,st),ce.createElement("li",{className:"btn-full-screen"},ce.createElement(ke,{icon:`${Ie?"md-iconfont icon-shrink":"md-iconfont icon-enlarge"}`,title:Ie?"\u5173\u95ED\u5168\u5C4F":"\u5F00\u542F\u5168\u5C4F",actionName:"trigger-full-screen",onActionCallback:$t})))},Ee=be(75790),Oe=be(28284),je=be(37568),Pe=be(99571),Qe=Object.defineProperty,Xe=Object.defineProperties,ot=Object.getOwnPropertyDescriptors,He=Object.getOwnPropertySymbols,rt=Object.prototype.hasOwnProperty,Ye=Object.prototype.propertyIsEnumerable,ut=(Dn,Cn,er)=>Cn in Dn?Qe(Dn,Cn,{enumerable:!0,configurable:!0,writable:!0,value:er}):Dn[Cn]=er,Ge=(Dn,Cn)=>{for(var er in Cn||(Cn={}))rt.call(Cn,er)&&ut(Dn,er,Cn[er]);if(He)for(var er of He(Cn))Ye.call(Cn,er)&&ut(Dn,er,Cn[er]);return Dn},ze=(Dn,Cn)=>Xe(Dn,ot(Cn));const Ve={labelCol:{span:4},wrapperCol:{span:20}};var $e=({callback:Dn,onCancel:Cn})=>{function er($t){Dn($t)}return ce.createElement(Oe.default,ze(Ge({},Ve),{initialValues:{link:"http://",title:""},className:"link-panel",onFinish:er,style:{width:500}}),ce.createElement(Oe.default.Item,{label:"\u94FE\u63A5\u5730\u5740",name:"link",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u5730\u5740"}]},ce.createElement(je.default,null)),ce.createElement(Oe.default.Item,{label:"\u94FE\u63A5\u6807\u9898",name:"title",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u94FE\u63A5\u6807\u9898"}]},ce.createElement(je.default,null)),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(Pe.ZP,{type:"ghost",onClick:Cn},"\u53D6\u6D88")))},nt=be(44905),et=be(45596),pt=be(62957),ct=be(77019),It=be(6077),dt=be(59301),Mt=({callback:Dn,onCancel:Cn})=>{const er=document.createElement("canvas"),$t=er.getContext("2d");er.width=1e3,er.height=800,$t.fillStyle="#ffffff",$t.fillRect(0,0,er.width,er.height);const Ie=er.toDataURL("image/png");return dt.createElement(pt.default,{open:!0,width:"100vw",style:{height:"100vh",top:0},footer:null,title:null,closable:!1},dt.createElement(ct.Z,{style:{height:"100vh"}},dt.createElement(It.Z,{fullWidth:!0,noAssociationId:!0,showFullTools:!0,data:{src:Ie,visible:!0,title:String(Date.now())},onOk:Ze=>{Dn({src:Ze.url})},onClose:Cn})))},xt=be(30641),gt=be(5269),_t=be(6767),We={myPaletteDiv:"myPaletteDiv___Xjz2I",flowChartWrp:"flowChartWrp____f45r",maxH60:"maxH60___Pd4Re",drawerWrap:"drawerWrap___MfDw8"},Ae=be(59301),Be=(0,ce.forwardRef)(({onCancel:Dn,editImgId:Cn,callback:er},$t)=>{let Ie=(0,ce.useRef)(),Ze=(0,ce.useRef)(),qe=(0,ce.useRef)(),st=(0,ce.useRef)(!1);const mt=(0,ce.useRef)(!1);console.log("ref:",$t);const[Nt,kt]=(0,ce.useState)(0),[Bt,Jt]=(0,ce.useState)("100vh");return(0,ce.useEffect)(()=>{kt(1)},[]),(0,ce.useImperativeHandle)($t,()=>({setHeight:Jt})),Ae.createElement("div",{ref:mt,className:"body-overflow-initial"},Ae.createElement(xt.Z,{width:"100vw",height:Bt,footer:null,closable:!0,placement:"bottom",open:!!Nt,destroyOnClose:!0,maskClosable:!1,mask:!1,rootClassName:`zIndex-9999 ${We.drawerWrap}`,onClose:()=>{window.saveDrawData(En=>{er({src:`/api/attachments/${En}`,id:En})})},title:Ae.createElement(ct.Z,{align:"middle"},Ae.createElement(gt.Z,{flex:1},"\u63D2\u5165\u6D41\u7A0B\u56FE"),Ae.createElement(gt.Z,{onClick:()=>{Jt(Bt==="60px"?"100vh":"60px")}},Ae.createElement("span",{className:"current c-blue",style:{fontWeight:400}},"\u5C55\u5F00/\u6536\u8D77")),Ae.createElement(gt.Z,{onClick:()=>{window.saveDrawData(En=>{if(En===null){_t.ZP.warning({content:"\u5185\u5BB9\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7ED8\u5236\u6D41\u7A0B\u56FE",key:"saveFlowChart"});return}_t.ZP.success({content:"\u4FDD\u5B58\u6210\u529F",key:"saveFlowChart",style:{zIndex:999999999}}),er({src:`/api/attachments/${En}`,id:En,disabledClose:!0})})}},Ae.createElement(Pe.ZP,{type:"primary",className:"ml20"},"\u4FDD\u5B58")))},Ae.createElement("iframe",{src:`/drawio/src/main/webapp/?id=${Cn||""}&gapi=0&od=0&db=0&gh=0&gl=0&local=0`,width:"100%",height:"100%",frameBorder:"0",ref:Ze})))}),Ke=be(90524),Ne=be(47889),De=be(71051);const we=Ne.ZP.Group,Le={margin:"0 8px"};var Ue=({callback:Dn,onCancel:Cn})=>{function er($t){Dn($t)}return ce.createElement(Oe.default,{className:"add-table-panel",initialValues:{row:3,col:2,align:"default"},onFinish:er},ce.createElement("div",{className:"flex-container",style:{alignItems:"baseline"}},ce.createElement("span",{style:Le},"\u5355\u5143\u683C\u6570\uFF1A"),ce.createElement("span",{style:Le},"\u884C\u6570"),ce.createElement(Oe.default.Item,{name:"row",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u884C\u6570"}]},ce.createElement(De.Z,null)),ce.createElement("span",{style:Le},"\u5217\u6570"),ce.createElement(Oe.default.Item,{name:"col",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u5217\u6570"}]},ce.createElement(De.Z,null))),ce.createElement("div",{className:"flex-container",style:{marginTop:12,alignItems:"baseline"}},ce.createElement("span",{style:Le},"\u5BF9\u9F50\u65B9\u5F0F\uFF1A"),ce.createElement(Oe.default.Item,{name:"align"},ce.createElement(we,null,ce.createElement(Ne.ZP,{value:"default"},ce.createElement("i",{className:"fa fa-align-justify"})),ce.createElement(Ne.ZP,{value:"left"},ce.createElement("i",{className:"fa fa-align-left"})),ce.createElement(Ne.ZP,{value:"center"},ce.createElement("i",{className:"fa fa-align-center"})),ce.createElement(Ne.ZP,{value:"right"},ce.createElement("i",{className:"fa fa-align-right"}))))),ce.createElement("div",{className:"flex-container flex-end"},ce.createElement(Pe.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),ce.createElement(Pe.ZP,{type:"ghost",onClick:Cn},"\u53D6\u6D88")))},Me=be(71411),Re=be(11081),tt=be.n(Re),Pt=(0,ce.forwardRef)(({use3d:Dn,width:Cn,height:er,callback:$t,showSaveButton:Ie},Ze)=>{const qe=(0,ce.useRef)(),st=(0,ce.useRef)(),[mt,Nt]=(0,ce.useState)(!1),kt=(0,ce.useRef)({id:qe,appName:"graphing",width:Cn||1e3,height:er||600,showToolBar:!0,showMenuBar:!0,allowStyleBar:!0,showAlgebraInput:!0,enableLabelDrags:!1,enableShiftDragZoom:!0,showToolBarHelp:!1,errorDialogsActive:!0,showTutorialLink:!0,showLogging:!0,useBrowserForJS:!1});(0,ce.useEffect)(()=>{st.current=new(tt())(kt.current,!0),window.onload=function(){st.current.inject("applet_container")}},[]);const Bt=()=>{var Jt=window.ggbApplet.getPNGBase64(1,!0,72);return $t&&$t(Jt),Jt};return(0,ce.useEffect)(()=>{kt.current.appName=mt?"3D":"graphing",st.current.inject("applet_container")},[mt]),(0,ce.useEffect)(()=>{Nt(Dn)},[Dn]),(0,ce.useImperativeHandle)(Ze,()=>({getImgData:Bt})),ce.createElement(ce.Fragment,null,ce.createElement("div",{style:{width:"100%",height:"100%"},id:"applet_container",ref:qe}),ce.createElement(ct.Z,{align:"middle"},ce.createElement(gt.Z,{flex:1},ce.createElement(Me.Z,{size:"default",checkedChildren:"\u5173\u95ED3D\u56FE\u50CF",unCheckedChildren:"\u5F00\u542F3D\u56FE\u50CF",checked:mt,onChange:Jt=>Nt(Jt)})),ce.createElement(gt.Z,null,ce.createElement(Pe.ZP,{size:"large",onClick:Bt,style:{zIndex:8,marginTop:10},type:"primary"},"\u4FDD\u5B58\u5230\u7F16\u8F91\u5668"))))}),Ct=be(88615);const vt="link",Ot="upload-image",zt="add-flowchart",Ft="draw-image",yt="add-flowchart",Xt="code-block",Lt="add-table",Kt="------------",sn={default:Kt,left:`:${Kt}`,center:`:${Kt}:`,right:`${Kt}:`};var Sn=be(17904),Yt=be(49661);function In(){}let Kn=0;const Gn=1e4,nr="\u2581",hr="@\u2581\u2581@",ur="@\u2581@",Un=`
|
|
|
**\u6A21\u677F\u6807\u9898**
|
|
|
\u6A21\u677F\u6B63\u6587\u5185\u5BB9\uFF0C\u53EF\u8F93\u5165\u6587\u672C\u5185\u5BB9\u548C\u7C98\u8D34\u56FE\u7247\u7B49\u64CD\u4F5C`,Fn=["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 or(Dn){return/^\d+$/.test(Dn)?`${Dn}px`:Dn}const Bn=navigator.platform.toUpperCase().indexOf("MAC")>=0?"Cmd":"Ctrl",_n={[Bn+"-B"]:"bold",[Bn+"-I"]:"italic"},zn={[vt]:"\u6DFB\u52A0\u94FE\u63A5",[Xt]:"\u6DFB\u52A0\u4EE3\u7801\u5757",[Ot]:"\u6DFB\u52A0\u56FE\u7247",[Ft]:"\u6DFB\u52A0\u753B\u56FE",[zt]:"\u63D2\u5165\u6D41\u7A0B\u56FE",[Lt]:"\u6DFB\u52A0\u8868\u683C","maths-latex":"\u6570\u5B66\u56FE\u50CF","inline-latex":"LATEX\u516C\u5F0F"};var cr=({defaultValue:Dn="",onChange:Cn,width:er="100%",height:$t=400,miniToolbar:Ie=!1,isFocus:Ze=!1,watch:qe,insertTemp:st,mode:mt="markdown",id:Nt="markdown-editor-id",showResizeBar:kt=!1,noStorage:Bt=!1,showNullButton:Jt=!1,showNullProgramButton:En=!1,hidetoolBar:qn=!1,fullScreen:At=!1,onBlur:St,onCMBeforeChange:an,onFullScreen:Ht,className:Et="",disablePaste:Ut=!1,disabled:nn=!1,disabledFill:rn=!1,placeholder:gn="",values:bn="",extraUse:An,onAddBlank:Gt})=>{const[Vt,wn]=(0,ce.useState)(null),[jn,Wn]=(0,ce.useState)(Dn),[$n,kr]=(0,ce.useState)(qe),[Sr,Yr]=(0,ce.useState)(At),[_r,Ur]=(0,ce.useState)(""),[wr,Dr]=(0,ce.useState)(0),[Hr,Qr]=(0,ce.useState)($t),[pi,_i]=(0,ce.useState)(!1),[Si,oi]=(0,ce.useState)(0),[Mi,Li]=(0,ce.useState)(0),rr=(0,ce.useRef)(),Cr=(0,ce.useRef)(),Ar=(0,ce.useRef)(),$r=(0,ce.useRef)(),qr=(0,ce.useRef)(),wi=(0,ce.useRef)(),Hi=(0,ie.useDispatch)();(0,ce.useEffect)(()=>{const vn=window.scrollY||window.pageYOffset;Wn(bn),Vt==null||Vt.setValue(bn),window.scrollTo(0,vn)},[bn]),(0,ce.useEffect)(()=>{Ht==null||Ht(Sr)},[Sr]),(0,ce.useEffect)(()=>{if(rr.current){let vn=function(Mn,Rn){var Yn;if(Ut){Rn.preventDefault();return}const fr=Rn.clipboardData;if(fr){const ir=fr.types.toString(),Ir=fr.items;if(ir==="Files"||fr.types.indexOf("Files")>-1){if(Rn.preventDefault(),mt=="stex")return;try{let br=Ir[1];((Yn=Ir[0])==null?void 0:Yn.kind)==="file"&&(br=Ir[0]);const Mr=br.getAsFile(),Wr=Mr.name.split(".").pop();(0,et.I)(Mr,Pr=>{var li,zr,Xr;Pr.id?((li=Mr==null?void 0:Mr.type)==null?void 0:li.indexOf("image"))>-1?fn.replaceSelection(`<img width="100%" src="/api/attachments/${Pr.id}?type=${Pr.content_type})" alt="" />`):((zr=Mr==null?void 0:Mr.type)==null?void 0:zr.indexOf("video"))>-1?fn.replaceSelection(`<video width="100%" controls src="/api/attachments/${Pr.id}"></video>`):((Xr=Mr==null?void 0:Mr.type)==null?void 0:Xr.indexOf("pdf"))>-1?fn.replaceSelection(`<a href="/api/attachments/${Pr.id}?type=${Mr.type}&disposition=inline" target="_blank">${Mr.name}</a>`):Fn.includes(Wr)?fn.replaceSelection(`<a href="/api/attachments/${Pr.id}?type=office&disposition=inline" target="_blank">${Mr.name}</a>`):fn.replaceSelection(`[${Mr.name}](/api/attachments/${Pr.id}?type=${Pr.content_type})`):(Pr==null?void 0:Pr.status)===401&&(document.location.href="/user/login")})}catch(br){_t.ZP.warning("\u8BF7\u4F7F\u7528chrome\u6D4F\u89C8\u5668\u7C98\u8D34")}return!0}else return!0}return!0};const fn=ue().fromTextArea(rr.current,{mode:mt,lineNumbers:!Ie,lineWrapping:!0,value:Dn,autoCloseTags:!0,autoCloseBrackets:!0});return fn.on("keyup",function(Mn,Rn){Rn.keyCode===8&&(Mn.getValue()==""?fn.setOption("placeholder",gn):fn.setOption("placeholder",null))}),fn.on("keydown",function(Mn,Rn){if(Rn.keyCode===8){var Yn=tn(Mn);Yn&&Rn.preventDefault()}}),Ze&&fn.focus(),fn.on("paste",vn),nn&&fn.on("beforeChange",function(Mn,Rn){(Rn.origin==="paste"||Rn.origin==="+input")&&Rn.cancel()}),wn(fn),()=>{fn.off("paste",vn)}}},[]);const Tt=(0,ce.useCallback)(()=>{if(Cr.current)try{}catch(vn){console.log(vn,"---- to set md editor body height")}},[Hr,Cr,Sr]);(0,ce.useEffect)(()=>{function vn(){let fn=new se.Z(Mn=>{for(let Rn of Mn)(Rn.target.offsetHeight>0||Rn.target.offsetWidth>0)&&(Tt(),Vt.setSize("100%","100%"),Vt.refresh())});return fn.observe(rr.current.parentElement),fn}if(Vt){const fn=vn();return()=>{var Mn,Rn;(Mn=rr.current)!=null&&Mn.parentElement&&fn.unobserve((Rn=rr.current)==null?void 0:Rn.parentElement)}}},[Vt,Tt]),(0,ce.useEffect)(()=>{if(Vt){let vn=[];for(const[fn,Mn]of Object.entries(_n)){let Rn={[fn]:()=>{Zt(Mn)}};vn.push(Rn),Vt.addKeyMap(Rn)}return()=>{for(let fn of vn)Vt.removeKeyMap(fn)}}},[Vt]),(0,ce.useEffect)(()=>{At!==Sr&&Yr(At)},[At]),(0,Sn.Z)(()=>{if(!Bt&&wr>0){let vn=new Date().getTime(),fn=window.sessionStorage.getItem(Nt);vn>=wr+Gn&&(!fn||fn!==jn)&&(window.sessionStorage.setItem(Nt,jn),_i(!0))}},Gn),(0,ce.useEffect)(()=>{kr(qe)},[Vt,qe]),(0,ce.useEffect)(()=>{Vt&&Ze&&Vt.focus()},[Vt,Ze]),(0,ce.useEffect)(()=>{if($n&&Vt){let vn=function(Mn){let Rn=Mn.target;if($r.current){let Yn=Rn.scrollTop/Rn.scrollHeight;$r.current.scrollTop=$r.current.scrollHeight*Yn}};const fn=Vt.getScrollerElement();return fn.addEventListener("scroll",vn),()=>{fn.removeEventListener("scroll",vn)}}},[Vt,$n]),(0,ce.useEffect)(()=>{if(Vt&&an){let vn=function(fn,Mn){an(fn,Mn)};return Vt.on("beforeChange",vn),()=>{Vt.off("beforeChange",vn)}}},[Vt,an]),(0,ce.useEffect)(()=>{if(Vt&&St){let vn=function(){St(Vt.getValue())};return Vt.on("blur",vn),()=>{Vt.off("blur",vn)}}},[Vt,St]);function tn(vn,fn){var Mn=vn.getDoc(),Rn=Mn.getCursor(),Yn=Mn.getLine(Rn.line),fr=Yn.charAt(Rn.ch-1),ir=Yn.lastIndexOf("@\u2581@",Rn.ch),Ir=Yn.lastIndexOf("@\u2581\u2581@",Rn.ch),br=ir>Ir?ir:Ir,Mr=ir>Ir?3:4;if(hr.indexOf(fr)===-1)return null;if(console.log("change1:",fn,vn,Yn,Rn,br,ir,Ir,fr),br>=0&&Rn.ch-br<5){var Wr=br+Mr;return Mn.replaceRange("",{line:Rn.line,ch:br},{line:Rn.line,ch:Wr}),{line:Rn.line,ch:Wr}}return null}(0,ce.useEffect)(()=>{if(Vt){let vn=function(fn,Mn){const Rn=fn.getValue();Wn(Rn),Dr(new Date().getTime()),fn.getScrollerElement().dispatchEvent(new CustomEvent("scroll")),Cn&&(En?Cn(Rn,ln(Rn)):Cn(Rn))};return Vt.on("change",vn),()=>{Vt.off("change",vn)}}},[Vt,Cn]),(0,ce.useEffect)(()=>{if(Vt)if(Dn==null)Vt.setValue(""),Wn("");else{const vn=window.scrollY||window.pageYOffset;Dn!==Vt.getValue()&&(Vt.setValue(Dn),Wn(Dn),Vt.setCursor(nn?1:Vt.lineCount(),0),window.scrollTo(0,vn))}},[Vt,Dn]);const Zt=(0,ce.useCallback)(vn=>{const fn=Vt.getCursor(),Mn=Vt.getSelection();let Rn=Mn.split(`
|
|
|
`);switch(vn){case"bold":return Vt.replaceSelection("**"+Mn+"**"),Mn===""&&Vt.setCursor(fn.line,fn.ch+2),Vt.focus();case"italic":return Vt.replaceSelection("*"+Mn+"*"),Mn===""&&Vt.setCursor(fn.line,fn.ch+1),Vt.focus();case"code":return Vt.replaceSelection("`"+Mn+"`"),Mn===""&&Vt.setCursor(fn.line,fn.ch+1),Vt.focus();case"inline-latex":return(0,Yt.Ye)(Hi)?void 0:(Ur("inline-latex"),Vt.focus());case"latex":return Vt.replaceSelection("```latex\n"+Mn+"\n```"),Vt.setCursor(fn.line+1,Mn.length+1),Vt.focus();case"line-break":return Vt.replaceSelection(`<br/>
|
|
|
`),Vt.focus();case"list-ul":return Mn===""?Vt.replaceSelection("- "+Mn):Vt.replaceSelection(Rn.map(Yn=>Yn===""?"":`- ${Yn}`).join(`
|
|
|
`)),Vt.focus();case"list-ol":return Mn===""?Vt.replaceSelection("1. "+Mn):Vt.replaceSelection(Rn.map((Yn,fr)=>Yn===""?"":`${fr+1}. ${Yn}`).join(`
|
|
|
`)),Vt.focus();case"add-null-ch":Gt==null||Gt();return;case"add-signal":return Mn===""&&Vt.setCursor(fn.line,fn.ch),Vt.replaceSelection(ur),Vt.focus();case"add-multiple":return Mn===""&&Vt.setCursor(fn.line,fn.ch),Vt.replaceSelection(hr),Vt.focus();case"inster-template-1":return Mn===""&&Vt.setCursor(fn.line,fn.ch),Vt.replaceSelection(Un),Vt.focus();case"eraser":return Vt.setValue(""),Vt.focus();case"trigger-watch":return kr(!$n),Vt.focus();case"trigger-full-screen":return Yr(!Sr),Vt.focus();case vt:Ur(vt);return;case Xt:Ur(Xt);return;case Ot:Ur(Ot);return;case Ft:Ur(Ft);return;case"maths-latex":if((0,Yt.Ye)(Hi))return;Ur("maths-latex");return;case zt:qr.current="",sessionStorage.removeItem("file_id"),Ur(zt);return;case Lt:Ur(Lt);return;default:throw new Error}},[Vt,$n,Sr]),Qt=(0,ce.useCallback)((vn,fn)=>{var Mn,Rn,Yn,fr,ir,Ir;vn!=null&&vn.disabledClose||Ur("");const{src:br,alt:Mr,id:Wr}=vn||{};switch(_r){case vt:const{title:Tr,link:ar}=vn;return Vt.replaceSelection(`[${Tr}](${ar})`),Vt.focus();case Xt:const{language:dr,content:Nr}=vn;return Vt.replaceSelection(["```"+dr,Nr,"```"].join(`
|
|
|
`)),Vt.focus();case"maths-latex":for(var Pr=atob(vn),li=new Uint8Array(Pr.length),zr=0;zr<Pr.length;zr++)li[zr]=Pr.charCodeAt(zr);var Xr=new Blob([li],{type:"image/png"});(0,et.I)(Xr,to=>{to.id?Vt.replaceSelection(``):(to==null?void 0:to.status)===401&&(document.location.href="/user/login")});break;case"inline-latex":if((0,Yt.Ye)(Hi))return;Vt.replaceSelection("`$$"+vn+"$$`");break;case yt:if(!Wr)return;Vt.getValue().indexOf(br)===-1?Vt.replaceSelection(`<center><img id="${Wr}" width="80%" src="${br}" class="draw-flowchart" alt="${Mr||""}" /></center>`):document.getElementById(Wr).src=Ke.Z.API_SERVER+br+"?t="+Date.now();break;case Ot:case Ft:const pr=fn,Jr=(Yn=(Rn=(Mn=pr==null?void 0:pr.name)==null?void 0:Mn.split("."))==null?void 0:Rn.pop)==null?void 0:Yn.call(Rn);return((fr=pr==null?void 0:pr.type)==null?void 0:fr.indexOf("image"))>-1||!(pr!=null&&pr.type)?pr!=null&&pr.align||pr!=null&&pr.width?Vt.replaceSelection(`<p style="text-align:${pr.align||"initial"}"><img width="${pr.width?pr.width+"%":"initial"}" src="${br}" alt="${Mr||""}" /></p>`):Vt.replaceSelection(`<img width="100%" src="${br}" alt="${Mr||""}" />`):((ir=pr==null?void 0:pr.type)==null?void 0:ir.indexOf("video"))>-1?Vt.replaceSelection(`<video width="100%" controls src="${br}"></video>`):((Ir=pr==null?void 0:pr.type)==null?void 0:Ir.indexOf("pdf"))>-1?Vt.replaceSelection(`<a href="${br}?type=${pr.type}&disposition=inline" target="_blank">${pr.name}</a>`):Fn.includes(Jr)?Vt.replaceSelection(`<a href="${br}?type=office&disposition=inline" target="_blank">${pr.name}</a>`):Vt.replaceSelection(`[${pr.name}](${br})`),Vt.focus();case Lt:const{row:ti,col:di,align:po}=vn;let ao=`
|
|
|
`;for(let to=0;to<ti;to++){let mo=[],Ii=[];for(let Ti=0;Ti<di;Ti++)to===1&&Ii.push(sn[po]),mo.push(" ");to===1&&(ao+=`| ${Ii.join(" | ")} |
|
|
|
`),ao+=`| ${mo.join(di===1?"":" | ")} |
|
|
|
`}return Vt.replaceSelection(ao+`
|
|
|
`),Vt.focus();default:throw new Error}},[Vt,_r]),cn=(0,ce.useMemo)(()=>{switch(_r){case vt:return ce.createElement($e,{callback:Qt,onCancel:hn});case Xt:return ce.createElement(nt.Z,{callback:Qt,onCancel:hn});case Ot:return ce.createElement(et.Z,{callback:Qt,onCancel:hn});case zt:return ce.createElement(Be,{editImgId:qr.current,callback:Qt,onCancel:hn});case Lt:return ce.createElement(Ue,{callback:Qt,onCancel:hn});case"maths-latex":return ce.createElement(Pt,{showSaveButton:!0,callback:Qt});case"inline-latex":return ce.createElement(Ct.Z,{showSaveButton:!0,callback:Qt});default:return null}},[_r]);function hn(){Ur("")}(0,ce.useEffect)(()=>{if(Ar.current){let vn=function(ir){Yn=!0,fr=ir.pageY},fn=function(){Yn=!1},Mn=function(ir){if(Yn){let Ir=ir.pageY-fr;Ir<0&&(Ir=0),Ir>300&&(Ir=300);let br=$t+Ir+"px";Qr(br)}},Rn=Ar.current,Yn=!1,fr=0;return Rn.addEventListener("mousedown",vn),document.addEventListener("mousemove",Mn),document.addEventListener("mouseup",fn),()=>{Rn.removeEventListener("mousedown",vn),document.removeEventListener("mousemove",Mn),document.removeEventListener("mouseup",fn)}}},[Vt,Ar]),(0,ce.useEffect)(()=>{Qr($t)},[$t]);const Nn=or(er),kn=or(Hr),yn={width:Nn,height:kn},Wt=(0,ce.useMemo)(()=>{if(wr){let vn=new Date(wr),fn=vn.getHours(),Mn=vn.getMinutes(),Rn=vn.getSeconds();return fn=fn<10?"0"+fn:fn,Mn=Mn<10?"0"+Mn:Mn,Rn=Rn<10?"0"+Rn:Rn,`${fn}:${Mn}:${Rn}`}return 0},[wr]),ln=vn=>{const fn=[];if(En){let Mn=-1;vn=vn.replace(/(@▁▁@|@▁@)/g,function(Rn,Yn,fr){fn.push({multiLine:Rn!==ur})})}return fn};function dn(){window.sessionStorage.removeItem(Nt),_i(!1),Dr(0)}function un(){_i(!1),Dr(0),Vt.setValue(window.sessionStorage.getItem(Nt))}(0,ce.useEffect)(()=>{zn[_r]&&_r!==Ft&&_r!==zt&&setTimeout(()=>{const vn=document.getElementsByClassName("markdown-popup-form")[0],fn=window.innerWidth/2-vn.offsetWidth/2,Mn=window.innerHeight/2-vn.offsetHeight/2;oi(fn),Li(Mn)},0)},[_r]);const mn=vn=>{vn.preventDefault();const fn=vn.clientX-Si,Mn=vn.clientY-Mi;document.body.onmousemove=Rn=>{let Yn=Rn.clientX-fn,fr=Rn.clientY-Mn;const ir=document.getElementsByClassName("markdown-popup-form")[0],Ir=window.innerWidth-ir.offsetWidth,br=window.innerHeight-ir.offsetHeight;Yn=Math.max(0,Math.min(Yn,Ir)),fr=Math.max(0,Math.min(fr,br)),Hn(Rn.clientX,Rn.clientY,fn,Mn)&&(oi(Yn),Li(fr))},document.body.onmouseup=function(){document.body.onmousemove=null}},Hn=(vn,fn,Mn,Rn)=>{const Yn=document.body.clientHeight,fr=document.body.clientWidth;return vn<20&&Mn>vn||vn>fr-20&&Mn<vn||fn<20&&Rn>fn||fn>Yn-20&&Rn<fn?(document.body.onmousemove=null,document.body.onmouseup=null,!1):!0};return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:"markdown-editor-wrapper",ref:Cr},ce.createElement("div",{className:`markdown-editor-container ${Et} ${$n?"on-preview":""} ${Ie?"mini":""} ${Sr?"full-screen":""}`,style:yn},ce.createElement(Te,{insertTemp:st,watch:$n,fullScreen:Sr,showNullButton:Jt,showNullProgramButton:En,onActionCallback:Zt,hidetoolBar:qn,extraUse:An}),ce.createElement("div",{className:"markdown-editor-body"},ce.createElement("div",{className:"codemirror-container"},ce.createElement("textarea",{ref:rr,placeholder:gn})),$n?ce.createElement("div",{ref:$r,className:"preview-container"},mt==="stex"&&ce.createElement(x,{value:jn}),mt!=="stex"&&ce.createElement(z.Z,{edit:!0,disabledFill:rn,showProgramFill:En,value:jn,openEditor:vn=>{var fn;qr.current=vn,(fn=wi.current)==null||fn.setHeight("100vh"),setTimeout(()=>{Ur("add-flowchart")},150)}})):null))),kt?ce.createElement("a",{ref:Ar,className:"editor-resize"}):null,_r===Ft&&ce.createElement(Mt,{callback:Qt,onCancel:hn}),_r===zt&&ce.createElement(Be,{ref:wi,editImgId:qr.current,callback:Qt,onCancel:hn}),ce.createElement(Ee.Z,null,zn[_r]&&_r!==Ft&&_r!==zt?ce.createElement(pt.default,{maskClosable:!1,centered:!0,style:{position:"absolute",left:Si,top:Mi},title:ce.createElement("div",{style:{cursor:"move"},onMouseDown:mn},zn[_r]),open:!0,onCancel:hn,footer:null,destroyOnClose:!0,width:_r===zt?"1200px":null,height:_r===zt?"80vh":null,className:"markdown-popup-form"},cn):null))}},45596:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return pe},I:function(){return Te}});var ce=be(28284),ie=be(6767),Ce=be(37568),ue=be(77736),se=be(71051),te=be(47889),le=be(99571),ee=be(67303),ne=be(59301),E=be(59301),b=Object.defineProperty,z=Object.defineProperties,x=Object.getOwnPropertyDescriptors,re=Object.getOwnPropertySymbols,ae=Object.prototype.hasOwnProperty,oe=Object.prototype.propertyIsEnumerable,ve=(Ee,Oe,je)=>Oe in Ee?b(Ee,Oe,{enumerable:!0,configurable:!0,writable:!0,value:je}):Ee[Oe]=je,ye=(Ee,Oe)=>{for(var je in Oe||(Oe={}))ae.call(Oe,je)&&ve(Ee,je,Oe[je]);if(re)for(var je of re(Oe))oe.call(Oe,je)&&ve(Ee,je,Oe[je]);return Ee},me=(Ee,Oe)=>z(Ee,x(Oe));const{useForm:ge}=ce.default,_e={width:280,marginRight:10},he={labelCol:{span:5},wrapperCol:{span:19}};var pe=({callback:Ee,onCancel:Oe})=>{const[je]=ge();let Pe=(0,ne.useRef)();function Qe(He){Pe.current.width=je.getFieldValue("width"),Pe.current.align=je.getFieldValue("align"),Ee(He,Pe.current)}function Xe(He,rt){if(He.status===-1){ie.ZP.error(He.message);return}je.setFieldsValue({src:`/api/attachments/${He.id}`,type:rt.type})}function ot(He){let rt=He.target.files[0];Pe.current=rt,Te(rt,Xe)}return E.createElement(ce.default,me(ye({form:je},he),{className:"upload-image-panel",onFinish:Qe,style:{width:470,overflow:"hidden"}}),E.createElement(ce.default.Item,{label:"\u56FE\u7247\u5730\u5740",required:!0},E.createElement("div",{className:"flex-container"},E.createElement(ce.default.Item,{noStyle:!0,name:"src",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u56FE\u7247\u5730\u5740"}]},E.createElement(Ce.default,{style:_e})),E.createElement(ke,{onFileChange:ot}))),E.createElement(ce.default.Item,{label:"\u56FE\u7247\u63CF\u8FF0",name:"alt"},E.createElement(Ce.default,{style:{width:264}})),E.createElement(ce.default.Item,{label:"\u56FE\u7247\u5BBD\u5EA6",name:"width"},E.createElement(ue.Z,null,E.createElement(ce.default.Item,{name:"width",style:{margin:0}},E.createElement(se.Z,{style:{width:264}})),E.createElement("span",{className:"ml8"},"%"))),E.createElement(ce.default.Item,{label:"\u5BF9\u9F50\u65B9\u5F0F",name:"align"},E.createElement(te.ZP.Group,{name:"align",defaultValue:1,options:[{value:"left",label:"\u5DE6\u5BF9\u9F50"},{value:"center",label:"\u5C45\u4E2D\u5BF9\u9F50"},{value:"right",label:"\u53F3\u5BF9\u9F50"}]})),E.createElement("aside",null,E.createElement(ce.default.Item,{style:{textAlign:"right",position:"relative",right:-98}},E.createElement(le.ZP,{type:"primary",htmlType:"submit",style:{marginRight:10}},"\u786E\u5B9A"),E.createElement(le.ZP,{type:"default",onClick:Oe},"\u53D6\u6D88"))))};function ke({onFileChange:Ee}){return E.createElement("label",{className:"upload-button",style:{cursor:"pointer"}},"\u672C\u5730\u4E0A\u4F20",E.createElement("input",{type:"file",onChange:Ee}))}function Te(Ee,Oe){if(!Ee)throw new String("\u6CA1\u6709\u6587\u4EF6");let je=new FormData;je.append("editormd-image-file",Ee),je.append("file_param_name","editormd-image-file"),je.append("byxhr","true");var Pe=new window.XMLHttpRequest;Pe.withCredentials=!0,Pe.addEventListener("load",function(Qe){Oe(JSON.parse(Qe.target.responseText),Ee)},!1),Pe.addEventListener("error",function(Qe){console.error(Qe)},!1),Pe.open("POST",`${ee.KI}/api/attachments.json`),Pe.send(je)}},75790:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return Ce}});var ce=be(59301),ie=be(4676);class Ce extends ce.Component{constructor(se){super(se);const te=window.document;this.node=te.createElement("div"),te.body.appendChild(this.node)}render(){const{children:se}=this.props;return(0,ie.createPortal)(se,this.node)}componentWillUnmount(){window.document.body.removeChild(this.node)}}},51124:function(qt,Dt,be){"use strict";be.d(Dt,{SV:function(){return Mt},ZP:function(){return dt}});var ce=be(59301),ie=be(76374);const Ce={keywords:["print","auto","break","case","char","const","continue","default","do","double","else","enum","extern","float","for","goto","if","int","long","register","return","short","signed","sizeof","static","struct","switch","typedef","union","unsigned","void","volatile","while"]},ue={quickKey:[{label:"main",content:["public static void main(String[] args) {"," $0","}"].join(`
|
|
|
`)},{label:"System.out.println",content:["System.out.println($0)"].join(`
|
|
|
`)},{label:"System.out.print",content:["System.out.print($0)"].join(`
|
|
|
`)}],keywords:["abstract","continue","for","new","switch","assert","default","goto","package","synchronized","boolean","do","if","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","true","false"]},se={keywords:["abstract","amp","array","auto","bool","break","case","catch","char","class","const","constexpr","const_cast","continue","cpu","decltype","default","delegate","delete","do","double","dynamic_cast","each","else","enum","event","explicit","export","extern","false","final","finally","float","friend","gcnew","generic","goto","in","initonly","inline","int","interface","interior_ptr","internal","literal","long","mutable","namespace","new","noexcept","nullptr","__nullptr","operator","override","partial","pascal","pin_ptr","private","property","protected","public","ref","register","reinterpret_cast","restrict","return","safe_cast","sealed","short","signed","sizeof","static","static_assert","static_cast","struct","switch","template","this","thread_local","throw","tile_static","true","try","typedef","typeid","typename","union","unsigned","using","virtual","void","volatile","wchar_t","where","while","_asm","_based","_cdecl","_declspec","_fastcall","_if_exists","_if_not_exists","_inline","_multiple_inheritance","_pascal","_single_inheritance","_stdcall","_virtual_inheritance","_w64","__abstract","__alignof","__asm","__assume","__based","__box","__builtin_alignof","__cdecl","__clrcall","__declspec","__delegate","__event","__except","__fastcall","__finally","__forceinline","__gc","__hook","__identifier","__if_exists","__if_not_exists","__inline","__int128","__int16","__int32","__int64","__int8","__interface","__leave","__m128","__m128d","__m128i","__m256","__m256d","__m256i","__m64","__multiple_inheritance","__newslot","__nogc","__noop","__nounwind","__novtordisp","__pascal","__pin","__pragma","__property","__ptr32","__ptr64","__raise","__restrict","__resume","__sealed","__single_inheritance","__stdcall","__super","__thiscall","__try","__try_cast","__typeof","__unaligned","__unhook","__uuidof","__value","__virtual_inheritance","__w64","__wchar_t"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],quickKey:[{label:"ifelse",content:["if (${1:condition}) {"," $0","} else {"," ","}"].join(`
|
|
|
`)},{label:"include",content:"include<$0>"},{label:"printf",content:"printf($0)"},{label:"system",content:'system("$0")'},{label:"main",content:["int main () {"," $0","}"].join(`
|
|
|
`)},{label:"if",content:["if () {"," $0","}"].join(`
|
|
|
`)},{label:"for",content:["for(int j=0 ; j<10; j++){"," $0","}"].join(`
|
|
|
`)},{label:"trycatch",content:["try{"," $0","}catch(ExceptionName e){","}"].join(`
|
|
|
`)},{label:"using namespace std;",content:["using namespace std;"].join(`
|
|
|
`)},{label:"include <iostream>",content:["#include <iostream>"].join(`
|
|
|
`)},{label:"include <vector>",content:["#include <vector>"].join(`
|
|
|
`)},{label:"include <cstdio>",content:["#include <cstdio>"].join(`
|
|
|
`)},{label:"include <cstring>",content:["#include <cstring>"].join(`
|
|
|
`)},{label:"include <sstream>",content:["#include <sstream>"].join(`
|
|
|
`)},{label:"include <fstream>",content:["#include <fstream>"].join(`
|
|
|
`)},{label:"include <map>",content:["#include <map>"].join(`
|
|
|
`)},{label:"include <string>",content:["#include <string>"].join(`
|
|
|
`)},{label:"include <cmath>",content:["#include <cmath>"].join(`
|
|
|
`)}]},te={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(`
|
|
|
`)}]},le={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(`
|
|
|
`)}]};var ee=be(53184),ne=be.n(ee),E=(xt,gt,_t)=>new Promise((We,Ae)=>{var Se=Ne=>{try{Ke(_t.next(Ne))}catch(De){Ae(De)}},Be=Ne=>{try{Ke(_t.throw(Ne))}catch(De){Ae(De)}},Ke=Ne=>Ne.done?We(Ne.value):Promise.resolve(Ne.value).then(Se,Be);Ke((_t=_t.apply(xt,gt)).next())});const b={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"]}},z=(xt,gt,_t,We)=>{const Ae=gt.getValueInRange({startLineNumber:1,startColumn:1,endLineNumber:_t.lineNumber,endColumn:_t.column});return Array.from(new Set(Ae.match(/\b\w{2,}\b/g)||[])).map(Be=>({label:Be,kind:xt.languages.CompletionItemKind.Text,insertText:Be,range:We}))},x=(xt,gt,_t,We)=>{xt.languages.registerCompletionItemProvider(gt,{provideCompletionItems(Ae,Se){const Be=Ae.getWordUntilPosition(Se),Ke={startLineNumber:Se.lineNumber,endLineNumber:Se.lineNumber,startColumn:Be.startColumn,endColumn:Be.endColumn},Ne=Ae.getLineContent(Se.lineNumber).substring(Be.startColumn-2,Be.endColumn);return{suggestions:[...z(xt,Ae,Se,Ke),..._t.map(we=>({label:we,kind:xt.languages.CompletionItemKind.Keyword,documentation:we,insertText:we,insertTextRules:xt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke})),...We.map(we=>({label:we.label,kind:xt.languages.CompletionItemKind.Snippet,documentation:we.content,insertText:Ne.startsWith("#")?we.content.replace(/#/,""):we.content,insertTextRules:xt.languages.CompletionItemInsertTextRule.InsertAsSnippet,range:Ke}))]}}})};var re=xt=>{b.languages.forEach(gt=>{xt.languages.registerDocumentFormattingEditProvider(gt,{provideDocumentFormattingEdits(_t){return E(this,null,function*(){const We=ne()(_t.getValue(),{indent_size:2,indent_char:" ",max_preserve_newlines:2,preserve_newlines:!0,keep_array_indentation:!0,break_chained_methods:!1,indent_scripts:"normal",brace_style:"collapse",space_before_conditional:!0,unescape_strings:!1,jslint_happy:!1,end_with_newline:!0,wrap_line_length:0,indent_inner_html:!1,comma_first:!1,e4x:!1,indent_empty_lines:!1});return[{range:_t.getFullModelRange(),text:We}]})}})}),x(xt,"java",ue.keywords,ue.quickKey),x(xt,"cpp",se.keywords,se.quickKey),x(xt,"c",Ce.keywords,[]),x(xt,"python",te.keywords,te.quickKey),x(xt,"scala",le.keywords,le.quickKey)};const ae="\u8BE5\u4EFB\u52A1\u5173\u5361\u8BBE\u7F6E\u4E86\u7981\u6B62\u590D\u5236\u7C98\u8D34\uFF0C\u8BF7\u624B\u52A8\u8F93\u5165\u4EE3\u7801\u3002";var oe=Object.defineProperty,ve=(xt,gt,_t)=>gt in xt?oe(xt,gt,{enumerable:!0,configurable:!0,writable:!0,value:_t}):xt[gt]=_t,ye=(xt,gt,_t)=>ve(xt,typeof gt!="symbol"?gt+"":gt,_t);const me=class hu{constructor(gt,_t,We){this.placeholder=gt,this.editor=_t,this.monaco=We,_t.onDidChangeModelContent(()=>this.onDidChangeModelContent()),this.onDidChangeModelContent()}onDidChangeModelContent(){this.editor.getValue()===""?this.editor.addContentWidget(this):this.editor.removeContentWidget(this)}getId(){return hu.ID}getDomNode(){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}getPosition(){return{position:{lineNumber:1,column:1},preference:[this.monaco.editor.ContentWidgetPositionPreference.EXACT]}}dispose(){this.editor.removeContentWidget(this)}};ye(me,"ID","editor.widget.placeholderHint");var _e=me,he=be(96236),pe=be(6767),ke=be(25399),Te=be(89392),Ee=be(33796),Oe=be(56102),je=Object.defineProperty,Pe=Object.defineProperties,Qe=Object.getOwnPropertyDescriptors,Xe=Object.getOwnPropertySymbols,ot=Object.prototype.hasOwnProperty,He=Object.prototype.propertyIsEnumerable,rt=(xt,gt,_t)=>gt in xt?je(xt,gt,{enumerable:!0,configurable:!0,writable:!0,value:_t}):xt[gt]=_t,Ye=(xt,gt)=>{for(var _t in gt||(gt={}))ot.call(gt,_t)&&rt(xt,_t,gt[_t]);if(Xe)for(var _t of Xe(gt))He.call(gt,_t)&&rt(xt,_t,gt[_t]);return xt},ut=(xt,gt)=>Pe(xt,Qe(gt)),Ge=(xt,gt)=>{var _t={};for(var We in xt)ot.call(xt,We)&>.indexOf(We)<0&&(_t[We]=xt[We]);if(xt!=null&&Xe)for(var We of Xe(xt))gt.indexOf(We)<0&&He.call(xt,We)&&(_t[We]=xt[We]);return _t},ze=(xt,gt,_t)=>new Promise((We,Ae)=>{var Se=Ne=>{try{Ke(_t.next(Ne))}catch(De){Ae(De)}},Be=Ne=>{try{Ke(_t.throw(Ne))}catch(De){Ae(De)}},Ke=Ne=>Ne.done?We(Ne.value):Promise.resolve(Ne.value).then(Se,Be);Ke((_t=_t.apply(xt,gt)).next())});function Ve(xt){return/^\d+$/.test(xt)?`${xt}px`:xt}function $e(){}let nt=!1;const et={"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 pt(xt=[]){let gt=xt;if(Array.isArray(xt)){for(let _t=0;_t<xt.length;_t++){let We=et[xt[_t]];if(We)return We}return gt[0]}return et[gt]||gt}let ct=null;const It=()=>ze(void 0,null,function*(){try{yield navigator.clipboard.writeText(" "),console.log("\u5185\u5BB9\u5DF2\u81EA\u52A8\u590D\u5236\u5230\u526A\u8D34\u677F:")}catch(xt){console.error("\u81EA\u52A8\u590D\u5236\u5931\u8D25:",xt)}});var dt=xt=>{var gt=xt,{width:_t="100%",height:We="100%",value:Ae,language:Se="javascript",style:Be={},options:Ke={},overrideServices:Ne={},theme:De="vs-dark",onEditBlur:we,isCopy:Le=!1,onSave:Ue,autoHeight:Me=!1,forbidCopy:Re=!1,onChange:tt=$e,editorDidMount:lt=$e,onFocus:Pt=$e,onBreakPoint:Ct=$e,breakPointValue:vt=[],filename:Ot="educoder.txt",errorLine:zt,errorContent:Ft="",highlightLine:yt,openBreakPoint:Xt=!1,placeholder:Lt="",showMiniMap:Kt=!0}=gt,sn=Ge(gt,["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"]);const Sn=(0,ce.useRef)(),Yt=(0,ce.useRef)({}),In=(0,ce.useRef)(),Kn=(0,ce.useRef)(),Gn=(0,ce.useRef)([]),nr=(0,ce.useRef)(!1),hr=(0,ce.useRef)(),ur=(0,ce.useRef)(),Un=(0,ce.useRef)(!1),[Fn,or]=(0,ce.useState)(!1);function Vn(){let kt;return Sn.current&&(kt=new ie.Z(Bt=>{for(let Jt of Bt)(Jt.target.offsetHeight>0||Jt.target.offsetWidth>0)&&Yt.current.instance.layout()}),kt.observe(Sn.current)),kt}function Bn(){pe.ZP.warning({content:decodeURIComponent(ae),key:"monaco-editor-tip"})}const _n=()=>{let kt=Yt.current.instance;if(Ae!=null&&kt&&Fn){const Bt=kt.getModel();Bt&&Ae!==Bt.getValue()&&(nt=!0,Bt.setValue(Ae),kt.layout(),nt=!1)}};(0,ce.useEffect)(()=>{const kt=Ee.Z.subscribe("formatDocument",Bt=>{var Jt;let En=Yt.current.instance;(Jt=En==null?void 0:En.getAction)==null||Jt.call(En,"editor.action.formatDocument").run()});return window.updateMonacoValue=Bt=>{tt(Bt)},kt},[]),(0,ce.useEffect)(()=>{var kt;let Bt=Yt.current.instance;Kn.current&&clearTimeout(Kn.current),Kn.current=setTimeout(()=>{_n()},500),Ae&&(Ae!=null&&Ae.length)&&((kt=Bt==null?void 0:Bt.updateOptions)==null||kt.call(Bt,{lineNumbersMinChars:Math.max(Math.floor(Math.log10(Ae.split(/\r\n|\r|\n/g).length))+3,5)}))},[Ae,Fn,Yt.current]),(0,ce.useEffect)(()=>{if(zt&&Yt.current&&Yt.current.instance){let Bt=Yt.current.instance;Bt.changeViewZones(function(Jt){var En=document.createElement("div");En.style.padding="10px 20px",En.style.width="calc(100% - 20px)",En.className="my-error-line-wrp",En.innerHTML=Ft,Jt.addZone({afterLineNumber:zt||11,heightInLines:3,domNode:En})});var kt={domNode:null,getId:function(){return"my.overlay.widget"},getDomNode:function(){return this.domNode||(this.domNode=document.createElement("div"),this.domNode.innerHTML="",this.domNode.style.width="100%",this.domNode.style.padding="20px 100px",this.domNode.style.right="0px",this.domNode.style.top="50px",this.domNode.style.position="relative",this.domNode.style.color="#333"),this.domNode},getPosition:function(){return null}};Bt.addOverlayWidget(kt),Bt.revealPositionInCenter({lineNumber:20,column:1})}},[zt,Yt.current,Fn]);const zn=(kt="",Bt)=>{if(!kt||kt.trim()==="")return!0;const En=Yt.current.instance.getModel().getLineTokens(Bt);let qn=!1;for(let At=0;At<2;At++)En.getStandardTokenType(At)===1&&(qn=!0);return qn};(0,ce.useEffect)(()=>{var kt;const Bt=(kt=Yt.current)==null?void 0:kt.instance;if(Bt&&Fn&&Re){const Jt=Bt.onDidBlurEditorWidget(()=>{Un.current=!1}),En=Bt.onDidFocusEditorText(()=>{Un.current=!0});return()=>{Jt.dispose(),En.dispose()}}},[Yt.current,Fn,Re]),(0,ce.useEffect)(()=>{var kt;if((kt=Yt.current)!=null&&kt.instance&&Fn&&Xt){let Bt=Yt.current.instance,Jt=Bt.getModel();if(!Jt)return;(()=>{var bn;let An=[],Gt=[];const Vt=Jt.getAllDecorations();for(let jn of Vt)jn.options.className==="highlighted-line"&&(An.push((bn=jn==null?void 0:jn.range)==null?void 0:bn.startLineNumber),Gt.push(jn==null?void 0:jn.id));if(yt===An[0])return;Jt.deltaDecorations(Gt,[]);const wn=Jt.getLineCount();yt&&yt<=wn&&(Bt.deltaDecorations([],[{range:new ct.Range(yt,1,yt,Jt.getLineMaxColumn(yt)),options:{isWholeLine:!0,className:"highlighted-line"}}]),Bt.revealLineInCenter(yt))})();const qn=(bn=!1)=>{var An;let Gt=[],Vt=[];const wn=Jt.getAllDecorations();for(let jn of wn)jn.options.linesDecorationsClassName==="breakpoints-select"&&(Gt.push((An=jn==null?void 0:jn.range)==null?void 0:An.startLineNumber),Vt.push(jn==null?void 0:jn.id));if(bn)return{lines:Gt,ids:Vt};Ct(Gt)},At=bn=>ze(void 0,null,function*(){let An={range:new ct.Range(bn,1,bn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}};yield Jt.deltaDecorations([],[An]),qn()}),St=bn=>ze(void 0,null,function*(){let An=[];const Gt=Bt.getLineDecorations(bn);for(let Vt of Gt)Vt.options.linesDecorationsClassName==="breakpoints-select"&&An.push(Vt.id);yield Jt.deltaDecorations(An,[]),qn()}),an=bn=>{let An=Bt.getLineDecorations(bn);for(let Gt of An)if(Gt.options.linesDecorationsClassName==="breakpoints-select")return!0;return!1};if(!(0,Te.isEqual)(vt,qn(!0).lines)){Jt.deltaDecorations(qn(!0).ids,[]);const bn=vt.map(An=>({range:new ct.Range(An,1,An,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-select"}}));Jt.deltaDecorations([],bn)}const Ht=Bt.onDidChangeModelContent(bn=>{let An=Bt.getPosition();if(An){let Gt=An.lineNumber;clearTimeout(ur.current),ur.current=setTimeout(()=>{zn(Jt.getLineContent(Gt),Gt)?St(Gt):an(Gt)?(St(Gt),At(Gt)):qn()},100)}}),Et=Bt.onMouseDown(bn=>{var An,Gt,Vt;if(bn.target.detail&&((Vt=(Gt=(An=bn.target)==null?void 0:An.element)==null?void 0:Gt.className)!=null&&Vt.includes("line-numbers"))){let wn=bn.target.position.lineNumber;if(zn(Jt.getLineContent(wn),wn))return;an(wn)?St(wn):At(wn)}}),Ut=bn=>{let An={range:new ct.Range(bn,1,bn,1),options:{isWholeLine:!1,linesDecorationsClassName:"breakpoints-fake"}};Gn.current=Bt.deltaDecorations(Gn.current,[An])},nn=()=>{Gn.current=Bt.deltaDecorations(Gn.current,[])},rn=Bt.onMouseMove(bn=>{var An,Gt,Vt;if(nn(),bn.target.detail&&((Vt=(Gt=(An=bn.target)==null?void 0:An.element)==null?void 0:Gt.className)!=null&&Vt.includes("line-numbers"))){let wn=bn.target.position.lineNumber;if(zn(Jt.getLineContent(wn),wn))return;Ut(wn)}}),gn=Bt.onMouseLeave(()=>{nn()});return()=>{Ht.dispose(),Et.dispose(),rn.dispose(),gn.dispose()}}},[Yt.current,Fn,vt,yt,Xt,Se]),(0,ce.useEffect)(()=>{var kt;(kt=Yt.current)!=null&&kt.instance&&Xt&&Yt.current.instance.setPosition({lineNumber:0,column:0})},[yt]);function cr(){let kt=Yt.current.instance;if(kt){const Bt=kt.getSelection(),Jt=Yt.current.pastePos||{},En=new ct.Range(Jt.startLineNumber||Bt.endLineNumber,Jt.startColumn||Bt.endColumn,Jt.endLineNumber||Bt.endLineNumber,Jt.endColumn||Bt.endColumn);setTimeout(()=>{kt.executeEdits("",[{range:En,text:""}])},300)}}function Dn(kt){(window.navigator.platform.match("Mac")?kt.metaKey:kt.ctrlKey)&&kt.keyCode==83&&(kt.preventDefault(),Ue())}const Cn=()=>{if(Me&&Yt.current.instance){const kt=Yt.current.instance.getContentHeight();mt(kt<We?We:kt)}else mt(We)};function er(kt){var Bt=document.createEvent("MouseEvents");Bt.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),kt.dispatchEvent(Bt)}const $t=kt=>{if(!Un.current)return;const{keyCode:Bt,ctrlKey:Jt,metaKey:En,target:qn,type:At}=kt;return(At==="paste"||(Bt===67||Bt===86)&&(En||Jt))&&qn.nodeName==="TEXTAREA"&&(Bn(),kt.preventDefault()),!1};function Ie(kt,Bt){var Jt=window.URL||window.webkitURL||window,En=new Blob([Bt]),qn=document.createElementNS("http://www.w3.org/1999/xhtml","a");qn.href=Jt.createObjectURL(En),qn.download=kt,er(qn)}(0,ce.useEffect)(()=>{Cn()},[Cn]),(0,ce.useEffect)(()=>{Sn.current&&!Fn&&Promise.all([be.e(8909),be.e(5028)]).then(be.bind(be,71448)).then(kt=>{try{ct=kt,Yt.current.instance=ct.editor.create(Sn.current,{value:Ae,language:pt(Se),theme:De,requireConfig:{"vs/nls":{availableLanguages:{"*":"zh-cn"}}},wordWrap:!0,autoIndent:!0,contextmenu:!0,formatOnType:!0,minimap:{enabled:Kt||!1}},Ne);const Bt=Yt.current.instance;let qn=[...he.BH._menuItems].find(Ht=>Ht[0]._debugName=="EditorContext")[1],At=["editor.action.clipboardCopyWithSyntaxHighlightingAction","editor.action.quickCommand","editor.action.clipboardCopyAction","editor.action.clipboardPasteAction","editor.action.clipboardCutAction"],St=(Ht,Et)=>{var Ut,nn;let rn=Ht._first;do Et.includes((nn=(Ut=rn.element)==null?void 0:Ut.command)==null?void 0:nn.id)&&Ht._remove(rn);while(rn=rn.next)};if(lt(Bt,ct),setTimeout(()=>{Cn(),Yt.current.instance.addAction({id:"d123123",label:"Download File",contextMenuGroupId:"9_cutcopypaste",run:()=>{Ie(Ot||"educoder.txt",Bt.getValue())}})},500),Yt.current.subscription=Bt.onDidChangeModelContent(Ht=>{nr.current?clearTimeout(hr.current):(Cn(),tt(Bt.getValue(),Ht)),hr.current=setTimeout(()=>{nr.current=!1},500)}),window.Monaco||re(ct,pt(Se)),Re&&(St(qn,At),Sn.current.classList.add("noCopyPaste"),window.removeEventListener("keydown",$t),window.removeEventListener("paste",$t),window.addEventListener("keydown",$t),window.addEventListener("paste",$t)),window.Monaco=ct,we&&Bt.onDidBlurEditorWidget(()=>{we(Bt.getValue())}),Pt&&Bt.onDidFocusEditorText(()=>{Re&&It(),Pt(Bt.getValue())}),Re){It();try{Bt.onDidPaste(Ht=>{const Et=Bt.getSelection(),Ut=Yt.current.pastePos||{},nn=new ct.Range(Ut.startLineNumber||Et.endLineNumber,Ut.startColumn||Et.endColumn,Ut.endLineNumber||Et.endLineNumber,Ut.endColumn||Et.endColumn);Bt.executeEdits("",[{range:Ht.range,text:""}])})}catch(Ht){}}let an=Vn();return Lt&&typeof Lt=="string"&&new _e(Lt,Bt,ct),or(!0),()=>{const Ht=Yt.current.instance;Ht.dispose();const Et=Ht.getModel();Et&&Et.dispose(),Yt.current.subscription&&Yt.current.subscription.dispose(),an.unobserve(Sn.current)}}catch(Bt){}})},[]),(0,ce.useEffect)(()=>{if(Yt.current.instance&&Fn)return document.addEventListener("keydown",Dn,!1),()=>{document.removeEventListener("keydown",Dn)}},[Ue,Fn]),(0,ce.useEffect)(()=>{let kt=Yt.current.instance;if(kt&&Fn){let Bt=pt(Se);ct.editor.setModelLanguage(kt.getModel(),Bt)}},[Se,Fn]),(0,ce.useEffect)(()=>{Yt.current.instance&&Fn&&ct.editor.setTheme(De)},[De,Fn]),(0,ce.useEffect)(()=>{let kt=Yt.current.instance;In.current=Ke,kt&&Fn&&(kt.updateOptions(Ye({},Ke)),setTimeout(()=>{kt.getModel().updateOptions(Ye({},Ke))},200))},[JSON.stringify(Ke),Fn]),(0,ce.useEffect)(()=>{let kt=Yt.current.instance;kt&&Fn&&kt.layout()},[_t,We,Fn]);const[Ze,qe]=(0,ce.useState)(Ve(_t)),[st,mt]=(0,ce.useState)(Ve(We)),Nt=ut(Ye({},Be),{width:Ze,height:st,position:"relative"});return ce.createElement("div",{className:"my-monaco-editor",ref:Sn,style:Nt},Le&&ce.createElement(Oe.CopyToClipboard,{text:Ae,onCopy:()=>pe.ZP.success("\u590D\u5236\u6210\u529F")},ce.createElement(ke.Z,{title:"\u590D\u5236\u4EE3\u7801"},ce.createElement("div",{style:{position:"absolute",top:0,right:10,cursor:"pointer",zIndex:10,color:"#165DFF"}},ce.createElement("i",{className:"iconfont icon-fuzhi8",style:{fontSize:14}})," \u590D\u5236\u4EE3\u7801"))))};function Mt({width:xt="100%",height:gt="100%",original:_t,modified:We,language:Ae,options:Se={}}){const Be=(0,ce.useRef)(),[Ke,Ne]=(0,ce.useState)(null);function De(Me){let Re;return Be.current&&(Re=new ie.Z(tt=>{for(let lt of tt)(lt.target.offsetHeight>0||lt.target.offsetWidth>0)&&Me.layout()}),Re.observe(Be.current)),Re}(0,ce.useEffect)(()=>(Be.current&&Promise.all([be.e(8909),be.e(9404)]).then(be.bind(be,2550)).then(Me=>{ct=Me;const Re=ct.editor.createDiffEditor(Be.current,ut(Ye({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},Se),{wordWrap:!0}));Ne(Re);let tt=De(Re);return()=>{Re.dispose();const lt=Re.getModel();lt&<.dispose(),tt.unobserve(Be.current)}}),()=>{window.removeEventListener("keydown",checkPaste),window.removeEventListener("paste",checkPaste)}),[]),(0,ce.useEffect)(()=>{Ke&&Ke.setModel({original:ct.editor.createModel(_t,Ae),modified:ct.editor.createModel(We,Ae)})},[_t,We,Ae,Ke]);const we=Ve(xt),Le=Ve(gt),Ue={width:we,height:Le};return ce.createElement("div",{className:"my-diff-editor",ref:Be,style:Ue})}},64536:function(qt,Dt,be){"use strict";var ce=be(45298),ie=be(82326),Ce=be(71411),ue=be(59301);const se=ie.default.Option;Dt.Z=({isTheoretical:te,onFontSizeChange:le,cmFontSize:ee,cmCodeMode:ne,autoFormat:E,onCodeModeChange:b,onTabToSpace:z,onAutoFormat:x,formatDocument:re,className:ae="",tabToSpace:oe,children:ve,code_editor:ye,challenge:me,shixun_environment_id:ge,shixun_environments:_e})=>{var he;const pe={1:"\u7B80\u5355",2:"\u4E2D\u7B49",3:"\u56F0\u96BE"},ke=(he=_e==null?void 0:_e.find(Te=>Te.shixun_environment_id===ge))==null?void 0:he.program_language;return console.log("----",ke,_e,ge,ye),ue.createElement("div",{className:`tpi-code-setting ${ae}`},ue.createElement("h3",null,"\u4EE3\u7801\u683C\u5F0F"),ue.createElement("section",null,ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u663E\u793A\u6A21\u5F0F"),ue.createElement(ie.default,{bordered:!1,size:"small",value:ne,onChange:b},ue.createElement(se,{value:"vs"},"\u767D\u8272\u80CC\u666F"),ue.createElement(se,{value:"vs-dark"},"\u9ED1\u8272\u80CC\u666F"))),!te&&ue.createElement(ue.Fragment,null,ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u5B57\u4F53\u5927\u5C0F"),ue.createElement(ie.default,{bordered:!1,size:"small",value:ee,onChange:le},ue.createElement(se,{value:12},"12px"),ue.createElement(se,{value:14},"14px"),ue.createElement(se,{value:16},"16px"),ue.createElement(se,{value:18},"18px"),ue.createElement(se,{value:20},"20px"),ue.createElement(se,{value:22},"22px"))),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"Tab\u8F6C\u6362"),ue.createElement(Ce.Z,{checked:oe,onChange:z})),ue.createElement("div",{className:"file-item",onClick:re},ue.createElement("b",{style:{cursor:"pointer"}},"\u683C\u5F0F\u5316\u4EE3\u7801")))),!te&&ue.createElement(ue.Fragment,null,ue.createElement("h3",null,"\u5FEB\u6377\u952E"),ue.createElement("section",null,ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u4FDD\u5B58\u4EE3\u7801"),ue.createElement("span",null,"Ctrl + S")),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u5524\u51FA\u5FEB\u6377\u952E\u5217\u8868"),ue.createElement("span",null,"F1 / Alt + F1")),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u5DE6\u53F3\u7F29\u8FDB"),ue.createElement("span",null,"Ctrl + ]/[")),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u8DF3\u5230\u5339\u914D\u7684\u62EC\u53F7"),ue.createElement("span",null,"Ctrl + Shift + \\")),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u8F6C\u5230\u884C\u9996"),ue.createElement("span",null,"Home")),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u8F6C\u5230\u884C\u5C3E"),ue.createElement("span",null,"End"))),ve),!te&&ue.createElement(ue.Fragment,null,ue.createElement("h3",null,"\u5FEB\u6377\u952E"),ue.createElement("section",null,ke&&ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u7F16\u7A0B\u8BED\u8A00"),ue.createElement("span",null,ke)),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u5B9E\u8BAD\u96BE\u6613\u5EA6"),ue.createElement("span",null,pe[me==null?void 0:me.difficulty])),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u5B9E\u9A8C\u73AF\u5883"),ue.createElement("span",null,ye==null?void 0:ye.name)),ue.createElement("div",{className:"file-item"},ue.createElement("b",null,"\u5B9E\u9A8C\u5BB9\u5668\u7F51\u7EDC"),ue.createElement("span",null,ye!=null&&ye.close_internet?"\u5173\u95ED\u5916\u7F51":"\u5F00\u542F\u5916\u7F51")))))}},17904:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ie}});var ce=be(59301);function ie(Ce,ue){const se=(0,ce.useRef)();(0,ce.useEffect)(()=>{se.current=Ce}),(0,ce.useEffect)(()=>{function te(){se.current()}if(ue!==null){let le=setInterval(te,ue);return()=>clearInterval(le)}},[ue])}},40148:function(qt,Dt,be){"use strict";be.d(Dt,{Im:function(){return Oe},ZP:function(){return He},gZ:function(){return Xe}});var ce=be(59301),ie=be(37568),Ce=be(99571),ue=be(84105),se=be(87395),te=be(49162),le=be(24334),ee=be(766),ne=be(38394),E=be(49661),b=be(46685),z=be(34376),x=be(92310),re=be.n(x),ae=be(59301),oe=Object.defineProperty,ve=Object.defineProperties,ye=Object.getOwnPropertyDescriptors,me=Object.getOwnPropertySymbols,ge=Object.prototype.hasOwnProperty,_e=Object.prototype.propertyIsEnumerable,he=(rt,Ye,ut)=>Ye in rt?oe(rt,Ye,{enumerable:!0,configurable:!0,writable:!0,value:ut}):rt[Ye]=ut,pe=(rt,Ye)=>{for(var ut in Ye||(Ye={}))ge.call(Ye,ut)&&he(rt,ut,Ye[ut]);if(me)for(var ut of me(Ye))_e.call(Ye,ut)&&he(rt,ut,Ye[ut]);return rt},ke=(rt,Ye)=>ve(rt,ye(Ye));const{TextArea:Te}=ie.default,Ee={visible:!1,tabIndex:"0"},Oe={[te.h.HIDE_COMPILE_STATUS]:"\u6682\u4E0D\u652F\u6301\u67E5\u770B",[te.h.NOMATCH]:"\u6D4B\u8BD5\u7528\u4F8B\u7ED3\u679C\u4E0D\u5339\u914D",[te.h.OK]:"\u8C03\u8BD5\u901A\u8FC7",2:"\u8C03\u8BD5\u8D85\u65F6",3:"\u8C03\u8BD5pod\u5931\u8D25",4:"\u7F16\u8BD1\u5931\u8D25",5:"\u6267\u884C\u5931\u8D25"};var je=(rt=>(rt[rt.SET_VISIBLE=0]="SET_VISIBLE",rt[rt.SET_TABINDEX=1]="SET_TABINDEX",rt))(je||{});function Pe(rt,Ye){switch(Ye.type){case 0:return ke(pe({},rt),{visible:Ye.payload});case 1:return ke(pe({},rt),{tabIndex:Ye.payload});default:throw new Error}}function Qe({value:rt,className:Ye}){const[ut,Ge]=(0,ce.useState)(!1),ze=(0,ce.useRef)(),Ve=(0,ce.useRef)();return(0,ce.useEffect)(()=>{ut&&(Ve.current.reset(),Ve.current.write((0,E.pp)(rt||"")))},[rt,ut]),(0,ce.useEffect)(()=>{var $e,nt,et,pt;if(ze.current){Ve.current=new z.Terminal({fontSize:14,disableStdin:!0}),Ve.current.open(ze.current);const ct=ze.current.offsetWidth-14,It=((pt=(et=(nt=($e=Ve.current)==null?void 0:$e._core)==null?void 0:nt._renderService)==null?void 0:et.dimensions)==null?void 0:pt.actualCellWidth)||9.5,dt=Math.ceil(ct/It);Ve.current.resize(dt,8),Ge(!0)}},[]),ae.createElement("div",{ref:ze,className:re()("XtermText-valueRef",Ye)})}function Xe(rt){const{status:Ye,error_msg:ut,output:Ge,input:ze,expected_output:Ve,is_file:$e,input_file_url:nt,output_file_url:et,expected_output_file_url:pt}=rt;let ct=null;const It={minHeight:150,marginBottom:10,paddingLeft:24,background:"#070f19",color:"#fff"};switch(Ye){case te.h.NOMATCH:ct=ae.createElement(ae.Fragment,null,ae.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),!$e&&ae.createElement(Qe,{className:"mb10",value:ze}),$e&&ae.createElement("div",{style:It},ae.createElement("a",{onClick:()=>(0,E.LR)(nt,ze)},ze)),ae.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),!$e&&ae.createElement(Qe,{className:"mb10",value:Ge&&le.Base64.decode(Ge)||""}),$e&&ae.createElement("div",{style:It},ae.createElement("a",{onClick:()=>(0,E.LR)(et,Ge)},Ge)),ae.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),!$e&&ae.createElement(Qe,{className:"mb10",value:Ve&&le.Base64.decode(Ve)||""}),$e&&ae.createElement("div",{style:It},ae.createElement("a",{onClick:()=>(0,E.LR)(pt,Ve)},Ve)));break;case te.h.EXECUTEFAILURE:ct=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!$e&&ae.createElement(ne.Z,{value:ze,style:It}),$e&&ae.createElement("div",{style:It},ae.createElement("a",{onClick:()=>(0,E.LR)(nt,ze)},ze)),ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ae.createElement("pre",{className:"error"},le.Base64.decode(ut)));break;case te.h.COMPILEFAILURE:ct=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A"),!$e&&ae.createElement(ne.Z,{value:ze,style:It}),$e&&ae.createElement("div",{style:It},ae.createElement("a",{onClick:()=>(0,E.LR)(nt,ze)},ze)),ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ae.createElement("pre",{className:"error"},le.Base64.decode(ut)));break;case te.h.PODFAILURE:ct=ae.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case te.h.TIMEOUT:ct=ae.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ae.createElement(ae.Fragment,null," ",ct," ")}function ot(rt){const{status:Ye,error_msg:ut,execute_time:Ge,output:ze,input:Ve,expected_output:$e,is_file:nt,input_file_url:et,output_file_url:pt,expected_output_file_url:ct}=rt;let It=null;switch(Ye){case te.h.OK:It=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6267\u884C\u7528\u65F6\uFF1A",Ge,"\u79D2"),ae.createElement("p",null,"\u6267\u884C\u7ED3\u679C\uFF1A"),ae.createElement("pre",null,le.Base64.decode(ze)));break;case te.h.NOMATCH:It=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u8F93\u5165\uFF1A",ae.createElement("pre",null,Ve)),ae.createElement("p",null,"\u8F93\u51FA\uFF1A",ze&&le.Base64.decode(ze)),ae.createElement("p",null,"\u9884\u671F\u8F93\u51FA\uFF1A",$e&&le.Base64.decode($e)));break;case te.h.EXECUTEFAILURE:It=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ae.createElement("pre",null,Ve)),ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ae.createElement("pre",{className:"error"},le.Base64.decode(ut)));break;case te.h.COMPILEFAILURE:It=ae.createElement(ae.Fragment,null,ae.createElement("p",null,"\u6700\u540E\u6267\u884C\u7684\u8F93\u5165\uFF1A",ae.createElement("pre",null,Ve)),ae.createElement("p",null,"\u6267\u884C\u51FA\u9519\u4FE1\u606F\uFF1A"),ae.createElement("pre",{className:"error"},le.Base64.decode(ut)));break;case te.h.PODFAILURE:It=ae.createElement("p",null,"\u521B\u5EFApod\u5931\u8D25\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break;case te.h.TIMEOUT:It=ae.createElement("p",null,"\u8BC4\u6D4B\u8D85\u65F6\uFF0C\u8BF7\u7A0D\u540E\u91CD\u8BD5");break}return ae.createElement(ae.Fragment,null," ",It," ")}var He=({id:rt,is_file:Ye,input:ut,debuging:Ge,submitting:ze,executingMessage:Ve,debugResult:$e,onChangeInput:nt,onDebugCode:et,onSubmitCode:pt})=>{const[ct,It]=(0,ce.useReducer)(Pe,Ee),{visible:dt,tabIndex:Mt}=ct;(0,ce.useEffect)(()=>{It({type:0,payload:!1})},[rt]);function xt(Ae){let Se=Ae.target.id;It({type:1,payload:Se})}function gt(){It({type:0,payload:!dt})}const _t=(0,ce.useMemo)(()=>{if($e){const{status:Ae}=$e;return ae.createElement(ae.Fragment,null,ot($e))}return null},[$e]);function We(){It({type:0,payload:!0}),It({type:1,payload:"1"}),et()}return ae.createElement("div",{className:"test-case-panel"},ae.createElement("div",{className:`test-case-panel-body ${dt?"active":""}`},ae.createElement("ul",{className:"s-navs"},ae.createElement("li",null,ae.createElement("a",{className:"active"},"\u8C03\u8BD5\u4EE3\u7801\u7ED3\u679C"))),ae.createElement(b.Z,{leftTitle:"\u81EA\u5B9A\u4E49\u6D4B\u8BD5\u7528\u4F8B",rightTitle:"\u4EE3\u7801\u6267\u884C\u7ED3\u679C",style:{height:240},leftNode:ae.createElement(Te,{placeholder:"\u8BF7\u8F93\u5165\u81EA\u6D4B\u7528\u4F8B\uFF08\u5982\u679C\u672A\u586B\u5199\uFF0C\u9996\u6B21\u81EA\u6D4B\u8FD0\u884C\u65F6\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u586B\u5145\u7B2C\u4E00\u4E2A\u975E\u9690\u85CF\u7684\u6587\u672C\u7C7B\u578B\u7684\u6D4B\u8BD5\u7528\u4F8B\uFF09",value:Ye?"":ut,onChange:nt}),rightNode:Ge?ae.createElement(ee.Z,{message:"\u4EE3\u7801\u6267\u884C\u4E2D..."}):$e?_t:ae.createElement("p",{style:{color:"#536879"}},"\u8BF7\u586B\u5199\u6D4B\u8BD5\u7528\u4F8B\u7684\u8F93\u5165\u503C\uFF0C\u70B9\u51FB\u201C\u8C03\u8BD5\u4EE3\u7801\u201D")})),ae.createElement("a",{className:`btn-collapse ${dt?"up":""}`,onClick:gt},dt?ae.createElement(ue.Z,null):ae.createElement(se.Z,null)),ae.createElement("footer",{className:"footer"},ae.createElement("span",{style:{visibility:"hidden"}},"\u63A7\u5236\u53F0"),ae.createElement("div",{className:"flex-container"},ae.createElement(Ce.ZP,{id:"oj-prev",className:"btn-blue",type:"ghost"},"\u4E0A\u4E00\u9898"),ae.createElement(Ce.ZP,{id:"oj-next",className:"btn-blue",type:"ghost"},"\u4E0B\u4E00\u9898"),ae.createElement(Ce.ZP,{className:"btn-green",type:"ghost",loading:Ge,onClick:We},"\u8C03\u8BD5\u4EE3\u7801"),ae.createElement(Ce.ZP,{type:"primary",className:"custom-ant-disabled",loading:ze,disabled:ze,onClick:()=>{It({type:0,payload:!1}),pt()}},"\u8BC4\u6D4B\u5E76\u63D0\u4EA4"))))}},63342:function(qt,Dt,be){"use strict";be.r(Dt),be.d(Dt,{default:function(){return ll}});var ce=be(59301),ie=be(10906),Ce=be(76618),ue=be(76560),se=be(11938),te=be(6767),le=be(62957),ee=be(29787),ne=be(82326),E=be(59205),b=be(72015),z=be(90524),x=be(87169),re=be(30641),ae=be(51124),oe=be(75790),ve=be(89613),ye=be(64536),me=be(59301),ge=Object.defineProperty,_e=Object.defineProperties,he=Object.getOwnPropertyDescriptors,pe=Object.getOwnPropertySymbols,ke=Object.prototype.hasOwnProperty,Te=Object.prototype.propertyIsEnumerable,Ee=(ft,bt,wt)=>bt in ft?ge(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,Oe=(ft,bt)=>{for(var wt in bt||(bt={}))ke.call(bt,wt)&&Ee(ft,wt,bt[wt]);if(pe)for(var wt of pe(bt))Te.call(bt,wt)&&Ee(ft,wt,bt[wt]);return ft},je=(ft,bt)=>_e(ft,he(bt));const Pe={theme:(0,ve.G)("cmCodeMode","vs-dark"),fontSize:(0,ve.G)("cmFontSize",14),showEditorSetting:!1,tabToSpace:(0,ve.G)("cmTabToSpace",!0)};var Qe=(ft=>(ft[ft.set_font_size=0]="set_font_size",ft[ft.set_theme=1]="set_theme",ft[ft.on_tab_to_space=2]="on_tab_to_space",ft[ft.set_show_editor_setting=3]="set_show_editor_setting",ft))(Qe||{});function Xe(ft,bt){switch(bt.type){case 3:return je(Oe({},ft),{showEditorSetting:bt.payload});case 1:return je(Oe({},ft),{theme:bt.payload});case 0:return je(Oe({},ft),{fontSize:bt.payload});case 2:return je(Oe({},ft),{tabToSpace:bt.payload});default:throw new Error}}var ot=({isLoading:ft,value:bt,onChange:wt,language:Xn,onUpdateCode:On,ActionBarRender:pn=Ln=>me.createElement(He,{onShowCodeSetting:Ln})})=>{const[Ln,xn]=(0,ce.useReducer)(Xe,Pe),{theme:Pn,fontSize:Jn,showEditorSetting:ci,tabToSpace:Or}=Ln,gi=(0,ce.useRef)(),Lr=(0,ce.useRef)(),yi={onFontSizeChange:Ei=>{xn({type:0,payload:Ei}),(0,ve.t)("cmFontSize",Ei)},tabToSpace:Or,cmFontSize:Jn,className:"oj",cmCodeMode:Pn,onTabToSpace:Ei=>{xn({type:2,payload:Ei}),(0,ve.t)("cmTabToSpace",Ei)},onCodeModeChange:Ei=>{xn({type:1,payload:Ei}),(0,ve.t)("cmCodeMode",Ei)}};function Fr(){xn({type:3,payload:!1})}function zi(){xn({type:3,payload:!0})}const ni={value:bt,language:Xn,theme:Pn,height:"calc(100% - 56px)",options:{fontSize:Jn,insertSpaces:Or},onChange:Ei=>{wt(Ei),Lr.current=Ei,clearTimeout(gi.current),gi.current=setTimeout(()=>{On(Lr.current)},1e4)},onEditBlur:Ei=>{Lr.current&&On(Lr.current)}};return me.createElement(ce.Fragment,null,me.createElement("div",{className:"code-panel-container"},pn(zi),!ft&&me.createElement(ae.ZP,Oe({},ni))),me.createElement(oe.Z,null,me.createElement(re.Z,{rootClassName:"oj",title:null,placement:"right",closable:!1,open:ci,onClose:Fr},me.createElement(ye.Z,Oe({},yi)))))};function He({onShowCodeSetting:ft}){return me.createElement("div",{className:"action-bar"},me.createElement("span",null,"\u5B66\u5458\u521D\u59CB\u4EE3\u7801\u6587\u4EF6"),me.createElement("a",{onClick:ft},me.createElement("i",{className:"iconfont icon-shezhi"})))}var rt=be(24334),Ye=be(12085),ut=be(40148),Ge=be(37568),ze=be(28284),Ve=be(99571);const{TextArea:$e}=Ge.default,nt=5e3;var et=({callback:ft,onCancel:bt,notes:wt})=>{function Xn(On){ft(On)}return ce.createElement(ze.default,{className:"note-form-panel",onFinish:Xn,initialValues:{notes:wt}},ce.createElement(ze.default.Item,{name:"notes",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9"},{max:nt,message:`\u7B14\u8BB0\u6700\u5927\u5B57\u6570\u4E3A${nt}`}]},ce.createElement($e,{placeholder:"\u8BF7\u8F93\u5165\u7B14\u8BB0\u5185\u5BB9",rows:5})),ce.createElement(ze.default.Item,{style:{textAlign:"right"}},ce.createElement(Ve.ZP,{type:"ghost",onClick:bt,style:{marginRight:10}}," \u53D6\u6D88 "),ce.createElement(Ve.ZP,{type:"primary",htmlType:"submit"}," \u63D0\u4EA4 ")))},pt={"left-panel":"left-panel___fP6Y3","tab-panel-body":"tab-panel-body___aLOJQ",b1:"b1___ELpwD","oj-mr":"oj-mr___SIQSw","oj-width-input":"oj-width-input___tR_Si","s-navs":"s-navs___iVrSH","bg-white":"bg-white___S0kiU",active:"active___D332c"},ct={pagination:"pagination___npPu7",info:"info___aRH6C"},It=be(54172),dt=be(13747),Mt=be(58617),xt=be(81953),gt=be(49162),_t=be(49661),We=be(56656),Ae=be.n(We);const{Column:Se}=It.default;var Be=({submitResult:ft,submitting:bt,submitRecords:wt,page:Xn,onPageChange:On,topicId:pn})=>{const{status:Ln,id:xn,input:Pn,output:Jn,expected_output:ci,is_file:Or,input_file_url:gi,output_file_url:Lr,expected_output_file_url:yi,error_msg:Fr}=ft||{},{records:zi,records_count:ni}=wt||{},Ei=(0,ue.useParams)();function Wi(){Or?navigator.clipboard.writeText(rt.Base64.decode(Fr)).then(()=>{te.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")}):navigator.clipboard.writeText(rt.Base64.decode(Jn)).then(()=>{te.ZP.success("\u590D\u5236\u9519\u8BEF\u4FE1\u606F\u6210\u529F")})}return ce.createElement(ee.Z,{spinning:bt,tip:"\u8BC4\u6D4B\u4E2D...",indicator:ce.createElement(Mt.Z,{style:{fontSize:24},spin:!0})},xn?ce.createElement(ce.Fragment,null,ce.createElement("ul",{className:ct.info},ce.createElement("li",null,"\u6267\u884C\u7ED3\u679C\uFF1A",ce.createElement("span",{className:Ln===gt.h.OK?"c-green":"c-red"},ut.Im[Ln])),ce.createElement("li",{className:ct.error},ce.createElement("a",{onClick:Wi},"\u590D\u5236\u9519\u8BEF\u4FE1\u606F ",ce.createElement(xt.Z,null)," ")),ce.createElement("li",null,ce.createElement(ue.Link,{to:`/problems/${pn}/record-detail/${xn}?backId=${Ei==null?void 0:Ei.save_identifier}`},"\u663E\u793A\u8BE6\u60C5 > "))),Ln!==gt.h.OK?ce.createElement(ce.Fragment,null,ce.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u5165\uFF1A"),ce.createElement("pre",null,!Or&&Pn,Or&&ce.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,_t.LR)(gi,Pn)},Pn)),ce.createElement("p",{className:"c-red"},"\u5B9E\u9645\u8F93\u51FA\uFF1A"),ce.createElement("pre",null,(Ln===4||Ln===5)&&rt.Base64.decode(Fr),Ln!=4&&Ln!=5&&(Or?ce.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,_t.LR)(Lr,Jn)},Jn):rt.Base64.decode(Jn))),ce.createElement("p",{className:"c-red"},"\u9884\u671F\u8F93\u51FA\uFF1A"),ce.createElement("pre",null,!Or&&rt.Base64.decode(ci),Or&&ce.createElement("a",{style:{fontSize:"16px"},onClick:()=>(0,_t.LR)(yi,ci)},ci))):null):null,(zi==null?void 0:zi.length)>0?ce.createElement(It.default,{dataSource:zi,rowKey:"id",pagination:!1},ce.createElement(Se,{title:"\u63D0\u4EA4\u65F6\u95F4",dataIndex:"created_at",key:"created_at",render:(ri,Di)=>ce.createElement("span",null," ",Ae()(ri).format("YYYY-MM-DD HH:mm:ss"))}),ce.createElement(Se,{title:"\u63D0\u4EA4\u7ED3\u679C",dataIndex:"status",key:"status",render:(ri,Di)=>{var tr;return ce.createElement(ue.Link,{className:ri===0?"c-green":"c-red",to:`/problems/${pn}/record-detail/${Di.id}?backId=${Ei==null?void 0:Ei.save_identifier}`},(tr=ut.Im[ri])==null?void 0:tr.replace("\u8C03\u8BD5","\u8BC4\u6D4B"))}}),ce.createElement(Se,{title:"\u6267\u884C\u7528\u65F6 (S)",dataIndex:"execute_time",key:"execute_time"}),ce.createElement(Se,{title:"\u5185\u5B58\u6D88\u8017\uFF08MB\uFF09",dataIndex:"execute_memory",key:"execute_memory"}),ce.createElement(Se,{title:"\u8BED\u8A00",dataIndex:"language",key:"language"})):null,ni>15?ce.createElement(dt.Z,{className:ct.pagination,current:Xn,pageSize:15,total:ni,onChange:On}):null)},Ke=be(57884),Ne=be(96599),De=be(77736),we={desc:"desc___X8_hx",info:"info___C1DPv","commit-info":"commit-info____9yQm"},Le=be(38394),Ue=be(59301);const Me={1:{name:"\u7B80\u5355",color:"#52c41a"},2:{name:"\u9002\u4E2D",color:"#faad14"},3:{name:"\u56F0\u96BE",color:"#f5222d"}};var Re=({hack:ft,onTriggerPraise:bt,toDiscuss:wt})=>{const{language:Xn,difficulty:On,time_limit:pn,username:Ln,user_path:xn,user_praise:Pn,comments_count:Jn,praises_count:ci,description:Or,pass_count:gi,submit_count:Lr}=ft,yi=(0,ue.useLocation)();console.log(ft.language,"language");const Fr=Me[On];return Ue.createElement(Ue.Fragment,null,Ue.createElement("ul",{className:we.info},Ue.createElement("li",null,"\u96BE\u5EA6\uFF1A",Ue.createElement(Ne.default,{color:Fr==null?void 0:Fr.color},Fr==null?void 0:Fr.name)),Ue.createElement("li",null,"\u5355\u4E2A\u6D4B\u8BD5\u96C6\u8BC4\u6D4B\u65F6\u957F\u9650\u5236\uFF1A",Ue.createElement("b",null,pn,"\u79D2"))),Ue.createElement(Le.Z,{value:Or,className:we.desc}),Ue.createElement("ul",{className:we["commit-info"]},Ue.createElement("li",null,Ue.createElement(De.Z,{size:4},Ue.createElement("span",null,"\u901A\u8FC7\u6B21\u6570")," ",Ue.createElement("b",null,gi))),Ue.createElement("li",null,Ue.createElement(De.Z,{size:4},Ue.createElement("span",null,"\u63D0\u4EA4\u6B21\u6570")," ",Ue.createElement("b",null,Lr))," "),Ue.createElement("li",{style:{flex:"1 0 0"}}),Ue.createElement("li",null,Ue.createElement(De.Z,{size:4},Ue.createElement("i",{className:"iconfont icon-huifu1",onClick:wt})," ",Ue.createElement("b",null,Jn))," ")))},tt=be(33796),lt=Object.defineProperty,Pt=Object.getOwnPropertySymbols,Ct=Object.prototype.hasOwnProperty,vt=Object.prototype.propertyIsEnumerable,Ot=(ft,bt,wt)=>bt in ft?lt(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,zt=(ft,bt)=>{for(var wt in bt||(bt={}))Ct.call(bt,wt)&&Ot(ft,wt,bt[wt]);if(Pt)for(var wt of Pt(bt))vt.call(bt,wt)&&Ot(ft,wt,bt[wt]);return ft};const Ft=ft=>React.createElement("svg",zt({width:40,height:40,xmlns:"http://www.w3.org/2000/svg"},ft),React.createElement("title",null,"\u5C55\u5F00\u9898\u76EE"),React.createElement("defs",null,React.createElement("linearGradient",{x1:"0%",y1:"0%",x2:"100%",y2:"100%",id:"show_svg__a"},React.createElement("stop",{stopColor:"#EEF7FF",offset:"0%"}),React.createElement("stop",{stopColor:"#C1E2FF",offset:"100%"}))),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("rect",{fill:"url(#show_svg__a)",width:40,height:40,rx:8}),React.createElement("g",{fillRule:"nonzero"},React.createElement("path",{d:"M16.057 20.784H8.238A1.22 1.22 0 0 0 7 21.974v6.811a1.22 1.22 0 0 0 1.238 1.19h7.819a1.213 1.213 0 0 0 1.238-1.19v-6.811a1.213 1.213 0 0 0-.376-.847 1.203 1.203 0 0 0-.862-.332v-.01Zm-1.25 6.769H9.423V23.12h5.384v4.433Z",fill:"#4CACFF"}),React.createElement("path",{d:"M16.057 10.005a1.22 1.22 0 0 1 1.238 1.189v6.812a1.213 1.213 0 0 1-.376.846c-.232.222-.542.34-.862.332H8.238A1.213 1.213 0 0 1 7 18.005v-6.811a1.22 1.22 0 0 1 1.238-1.19Zm-1.239 2.41H9.434v4.401h5.384v-4.4Z",fill:"#94CDFF"}),React.createElement("path",{d:"M20.418 12.632h11.189a1.213 1.213 0 0 0 1.238-1.179 1.224 1.224 0 0 0-.371-.857 1.214 1.214 0 0 0-.867-.343H20.418a1.203 1.203 0 0 0-.866.336c-.233.223-.367.53-.372.854.005.323.14.63.372.854.232.223.544.344.866.335ZM31.575 16.027h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 21.595h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557ZM31.575 27.163h-11.19a1.183 1.183 0 0 0-1.119.557c-.237.384-.237.87 0 1.254.238.384.672.6 1.12.557h11.189c.448.043.882-.173 1.119-.557.237-.384.237-.87 0-1.254a1.183 1.183 0 0 0-1.12-.557Z",fill:"#1890FF"}))));var yt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IHgxPSIwJSIgeTE9IjAlIiB4Mj0iMTAwJSIgeTI9IjEwMCUiIGlkPSJhIj48c3RvcCBzdG9wLWNvbG9yPSIjRUVGN0ZGIiBvZmZzZXQ9IjAlIi8+PHN0b3Agc3RvcC1jb2xvcj0iI0MxRTJGRiIgb2Zmc2V0PSIxMDAlIi8+PC9saW5lYXJHcmFkaWVudD48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48cmVjdCBmaWxsPSJ1cmwoI2EpIiB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHJ4PSI4Ii8+PGcgZmlsbC1ydWxlPSJub256ZXJvIj48cGF0aCBkPSJNMTYuMDU3IDIwLjc4NEg4LjIzOEExLjIyIDEuMjIgMCAwIDAgNyAyMS45NzR2Ni44MTFhMS4yMiAxLjIyIDAgMCAwIDEuMjM4IDEuMTloNy44MTlhMS4yMTMgMS4yMTMgMCAwIDAgMS4yMzgtMS4xOXYtNi44MTFhMS4yMTMgMS4yMTMgMCAwIDAtLjM3Ni0uODQ3IDEuMjAzIDEuMjAzIDAgMCAwLS44NjItLjMzMnYtLjAxWm0tMS4yNSA2Ljc2OUg5LjQyM1YyMy4xMmg1LjM4NHY0LjQzM1oiIGZpbGw9IiM0Q0FDRkYiLz48cGF0aCBkPSJNMTYuMDU3IDEwLjAwNWExLjIyIDEuMjIgMCAwIDEgMS4yMzggMS4xODl2Ni44MTJhMS4yMTMgMS4yMTMgMCAwIDEtLjM3Ni44NDZjLS4yMzIuMjIyLS41NDIuMzQtLjg2Mi4zMzJIOC4yMzhBMS4yMTMgMS4yMTMgMCAwIDEgNyAxOC4wMDV2LTYuODExYTEuMjIgMS4yMiAwIDAgMSAxLjIzOC0xLjE5Wm0tMS4yMzkgMi40MUg5LjQzNHY0LjQwMWg1LjM4NHYtNC40WiIgZmlsbD0iIzk0Q0RGRiIvPjxwYXRoIGQ9Ik0yMC40MTggMTIuNjMyaDExLjE4OWExLjIxMyAxLjIxMyAwIDAgMCAxLjIzOC0xLjE3OSAxLjIyNCAxLjIyNCAwIDAgMC0uMzcxLS44NTcgMS4yMTQgMS4yMTQgMCAwIDAtLjg2Ny0uMzQzSDIwLjQxOGExLjIwMyAxLjIwMyAwIDAgMC0uODY2LjMzNmMtLjIzMy4yMjMtLjM2Ny41My0uMzcyLjg1NC4wMDUuMzIzLjE0LjYzLjM3Mi44NTQuMjMyLjIyMy41NDQuMzQ0Ljg2Ni4zMzVaTTMxLjU3NSAxNi4wMjdoLTExLjE5YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTE5LjU1N2MtLjIzNy4zODQtLjIzNy44NyAwIDEuMjU0LjIzOC4zODQuNjcyLjYgMS4xMi41NTdoMTEuMTg5Yy40NDguMDQzLjg4Mi0uMTczIDEuMTE5LS41NTcuMjM3LS4zODQuMjM3LS44NyAwLTEuMjU0YTEuMTgzIDEuMTgzIDAgMCAwLTEuMTItLjU1N1pNMzEuNTc1IDIxLjU5NWgtMTEuMTlhMS4xODMgMS4xODMgMCAwIDAtMS4xMTkuNTU3Yy0uMjM3LjM4NC0uMjM3Ljg3IDAgMS4yNTQuMjM4LjM4NC42NzIuNiAxLjEyLjU1N2gxMS4xODljLjQ0OC4wNDMuODgyLS4xNzMgMS4xMTktLjU1Ny4yMzctLjM4NC4yMzctLjg3IDAtMS4yNTRhMS4xODMgMS4xODMgMCAwIDAtMS4xMi0uNTU3Wk0zMS41NzUgMjcuMTYzaC0xMS4xOWExLjE4MyAxLjE4MyAwIDAgMC0xLjExOS41NTdjLS4yMzcuMzg0LS4yMzcuODcgMCAxLjI1NC4yMzguMzg0LjY3Mi42IDEuMTIuNTU3aDExLjE4OWMuNDQ4LjA0My44ODItLjE3MyAxLjExOS0uNTU3LjIzNy0uMzg0LjIzNy0uODcgMC0xLjI1NGExLjE4MyAxLjE4MyAwIDAgMC0xLjEyLS41NTdaIiBmaWxsPSIjMTg5MEZGIi8+PC9nPjwvZz48L3N2Zz4=",Xt=be(82093);function Lt(ft){return(0,Xt.U2)("comments.json",ft)}function Kt(ft){return(0,Xt.v_)(`/discusses/${ft}/plus.json`,{container_type:"Discuss",type:1})}function sn(ft){return(0,Xt.v_)("comments/reply.json",ft)}function Sn(ft){return(0,Xt.v_)("comments.json",ft)}function Yt(ft){return(0,Xt.v_)(`comments/${ft==null?void 0:ft.id}/hidden.json`,ft)}function In(ft){return(0,Xt.IV)(`comments/${ft==null?void 0:ft.id}.json`)}var Kn=be(46541),Gn=be(34055);function nr({author:ft}){return ce.createElement("a",{href:`/users/${ft.login}`,target:"_blank"},ce.createElement("img",{alt:"\u7528\u6237\u5934\u50CF",height:"50",style:{borderRadius:"50%"},src:`${z.Z.IMG_SERVER}/images/${ft.image_url}`,width:"50"}))}function hr({data:ft,index:bt,parentDiscussIndex:wt,user:Xn,onSetActionType:On}){const{author:pn,can_delete:Ln,content:xn,id:Pn,time:Jn}=ft;function ci(){On({id:Pn,index:bt,type:"delete-discuss",parentDiscussIndex:wt,message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}const Or=Xn.admin||Ln||pn.user_id===Xn.user_id;return ce.createElement("div",{className:"discuss-item-container second-discuss "},ce.createElement(nr,{author:pn}),ce.createElement("section",null,ce.createElement("div",{className:"discuss-info"},ce.createElement("a",{href:`/users/${pn.login}`,target:"_blank"},pn.name),ce.createElement("span",{className:"grey"},Jn),ce.createElement("div",{className:"btn-group",style:{marginBottom:0}},Or?ce.createElement("a",{onClick:ci,title:"\u5220\u9664"},ce.createElement("i",{className:"iconfont icon-shanchu"})):null)),ce.createElement(Le.Z,{className:"discuss-content",value:xn})))}var ur=({user:ft,data:bt,index:wt,onPlusDiscuss:Xn,onSetActionType:On,activeDiscussIndex:pn,onReplyDiscuss:Ln,onSetActiveDiscussIndex:xn})=>{const{content:Pn,children:Jn,hidden:ci,id:Or,praise_count:gi,time:Lr,user_praise:yi,can_delete:Fr,author:zi}=bt;console.log(Fr&&(!Jn||Jn.length==0),"children22");function ni(){xn(Or)}function Ei(){Xn(Or,!yi,wt)}function Wi(){On({id:Or,index:wt,type:"delete-discuss",message:"\u786E\u5B9A\u8981\u5220\u9664\u8BE5\u6761\u56DE\u590D\u5417"})}function ri(){On({id:Or,index:wt,params:{hidden:ci?"0":"1"},type:"hidden-discuss",message:ci?"\u786E\u5B9A\u8981\u53D6\u6D88\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417":"\u786E\u5B9A\u8981\u9690\u85CF\u8BE5\u6761\u56DE\u590D\u5417"})}const Di=ft.admin||ft.user_id===zi.user_id;return ce.createElement("div",{className:"discuss-item-container",key:Or},ce.createElement(nr,{author:zi}),ce.createElement("section",null,ce.createElement("div",{className:"discuss-info"},ce.createElement("a",{href:`/users/${zi.login}`,target:"_blank"}," ",zi.name," "),ce.createElement("span",{className:"grey"},Lr)),ce.createElement(Le.Z,{className:"discuss-content",value:Pn}),Jn&&Jn.length>0?ce.createElement("div",{className:"reply-discuss-container"},Jn.map((tr,Bi)=>ce.createElement(hr,{key:tr.id,data:tr,index:Bi,user:ft,onSetActionType:On,parentDiscussIndex:wt}))):null,ce.createElement("div",{className:"btn-group"},(0,Gn.Ny)()?ce.createElement("a",{onClick:ri,title:ci?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF\u8BC4\u8BBA"},ce.createElement("i",{className:ci?"iconfont icon-yincangbiyan":"fa fa-eye"})):null,Fr&&(!Jn||Jn.length==0)?ce.createElement("a",{onClick:Wi,title:"\u5220\u9664"},ce.createElement("i",{className:"iconfont icon-shanchu"})):null,ce.createElement("a",{onClick:ni,title:"\u56DE\u590D"}," ",ce.createElement("i",{className:"iconfont icon-huifu1"})," "),ce.createElement("a",{onClick:Ei,className:yi?"c-orange":""},ce.createElement("i",{className:yi?"iconfont icon-dianzan mr3":"iconfont icon-dianzan-xian mr3 "}),ce.createElement("span",null,gi||""))),ce.createElement(Kn.Z,{id:Or,activeDiscussIndex:pn,onReplyDiscuss:Ln})))},Un=be(39479),Fn=be(2978),or=(ft,bt,wt)=>new Promise((Xn,On)=>{var pn=Pn=>{try{xn(wt.next(Pn))}catch(Jn){On(Jn)}},Ln=Pn=>{try{xn(wt.throw(Pn))}catch(Jn){On(Jn)}},xn=Pn=>Pn.done?Xn(Pn.value):Promise.resolve(Pn.value).then(pn,Ln);xn((wt=wt.apply(ft,bt)).next())}),Vn=({user_praise:ft,praise_count:bt,praisePlus:wt,onCreateDiscuss:Xn,discuss_count:On})=>{const[pn,Ln]=(0,ce.useState)(!1),[xn,Pn]=(0,ce.useState)("");function Jn(Lr){Pn(Lr)}function ci(){Ln(!0)}function Or(){Ln(!1)}function gi(){return or(this,null,function*(){Xn(xn),Pn(""),Ln(!1)})}return ce.createElement("div",{className:`dis-input-editor-container ${pn?"active":""} `},ce.createElement("div",{className:pn?"text-area hide":"text-area"},ce.createElement("input",{placeholder:"\u8BF4\u70B9\u4EC0\u4E48",onClick:ci}),ce.createElement("a",{style:{alignItems:"center"}}," ",ce.createElement("i",{className:"iconfont icon-huifu1"})," \xA0 \xA0",On," "),ce.createElement("a",{className:"c-light-black",onClick:wt,style:{alignItems:"center"},title:ft?"\u53D6\u6D88\u70B9\u8D5E":"\u70B9\u8D5E"},ce.createElement("i",{className:`mr3 ${ft?"iconfont icon-dianzan c-orange":"iconfont icon-dianzan-xian"} `}),bt?ce.createElement("span",null,bt):"")),pn?ce.createElement("div",{className:"input-mask",onClick:Or}):null,ce.createElement("div",{className:pn?"md-container":"md-container hide"},ce.createElement(Fn.Z,{id:"discuss-input-editor",miniToolbar:!0,watch:!1,noStorage:!0,defaultValue:xn,height:240,onChange:Jn}),ce.createElement("div",{className:"tip-container",onClick:Or},ce.createElement("a",{className:"btn-send",onClick:gi}," \u53D1\u9001 "))))},Bn=Object.defineProperty,_n=Object.defineProperties,zn=Object.getOwnPropertyDescriptors,cr=Object.getOwnPropertySymbols,Dn=Object.prototype.hasOwnProperty,Cn=Object.prototype.propertyIsEnumerable,er=(ft,bt,wt)=>bt in ft?Bn(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,$t=(ft,bt)=>{for(var wt in bt||(bt={}))Dn.call(bt,wt)&&er(ft,wt,bt[wt]);if(cr)for(var wt of cr(bt))Cn.call(bt,wt)&&er(ft,wt,bt[wt]);return ft},Ie=(ft,bt)=>_n(ft,zn(bt)),Ze=(ft,bt,wt)=>new Promise((Xn,On)=>{var pn=Pn=>{try{xn(wt.next(Pn))}catch(Jn){On(Jn)}},Ln=Pn=>{try{xn(wt.throw(Pn))}catch(Jn){On(Jn)}},xn=Pn=>Pn.done?Xn(Pn.value):Promise.resolve(Pn.value).then(pn,Ln);xn((wt=wt.apply(ft,bt)).next())});const qe={loading:!1,page:1,data:[],count:0,actionType:null,activeDiscussIndex:null};var st=(ft=>(ft[ft.GET_DISCUSSES=0]="GET_DISCUSSES",ft[ft.TOP_OR_DOWN_DISCUSS=1]="TOP_OR_DOWN_DISCUSS",ft[ft.ACTIVE_DISCUSS_INDEX=2]="ACTIVE_DISCUSS_INDEX",ft[ft.PLUS_DISCUSS=3]="PLUS_DISCUSS",ft[ft.SET_ACTION_TYPE=4]="SET_ACTION_TYPE",ft[ft.SET_PAGE=5]="SET_PAGE",ft[ft.SHOW_DISCUSSES_LOADING=6]="SHOW_DISCUSSES_LOADING",ft))(st||{});function mt(ft,bt){switch(bt.type){case 6:return Ie($t({},ft),{loading:!0});case 0:return $t($t({},ft),bt.payload);case 1:return $t($t({},ft),bt.payload);case 4:return $t($t({},ft),bt.payload);case 3:return $t($t({},ft),bt.payload);case 5:return $t($t({},ft),bt.payload);case 2:return $t($t({},ft),bt.payload);default:throw new Error}}var Nt=({user:ft,identifier:bt,hack:wt,onTriggerPraise:Xn,setDiscussTotal:On})=>{const[pn,Ln]=(0,ce.useReducer)(mt,qe),{loading:xn,page:Pn,data:Jn,count:ci,actionType:Or,activeDiscussIndex:gi}=pn;console.log("---",pn);const Lr=(0,ce.useCallback)(()=>Ze(void 0,null,function*(){Ln({type:6});const tr=yield Lt({container_type:"Practice",container_identifier:bt,limit:10,page:Pn}),{comments:Bi,disscuss_count:bi}=tr;Ln({type:0,payload:{data:Bi,count:bi,loading:!1}}),On(bi)}),[Pn,bt]);(0,ce.useEffect)(()=>{Lr()},[bt,Pn]);function yi(tr){Ln({type:5,payload:{page:tr}})}function Fr(tr){Ln({type:4,payload:{actionType:tr}})}function zi(tr){Ln(gi===tr?{type:2,payload:{activeDiscussIndex:null}}:{type:2,payload:{activeDiscussIndex:tr}})}function ni(tr,Bi,bi){return Ze(this,null,function*(){try{const Ri=yield Kt(tr);Jn[bi].user_praise=Bi,Jn[bi].praise_count=Ri.praise_count,Ln({type:3,payload:{data:[...Jn]}})}catch(Ri){console.log(Ri)}})}function Ei(){return Ze(this,null,function*(){const{id:tr,params:Bi,type:bi,index:Ri,parentDiscussIndex:No}=Or;bi==="hidden-discuss"&&(console.log(Bi,"params"),yield Yt($t({id:tr,container_type:"Practice",container_identifier:bt},Bi)),No?Jn[No].children[Ri].hidden=Bi.hidden==1:Jn[Ri].hidden=Bi.hidden==1,Ln({type:4,payload:{actionType:null,data:[...Jn]}})),bi==="delete-discuss"&&(yield In({id:tr,container_type:"Practice",container_identifier:bt}),Ln({type:4,payload:{actionType:null}}),yield Lr())})}function Wi(){Ln({type:4,payload:{actionType:null}})}function ri(tr,Bi){return Ze(this,null,function*(){try{yield sn({container_type:"Practice",container_identifier:bt,comments:{content:Bi,parent_id:tr}}),Lr()}catch(bi){console.log(bi)}})}function Di(tr){return Ze(this,null,function*(){Ln({type:6}),yield Sn({comments:{content:tr},container_type:"Practice",container_identifier:bt}),Lr()})}return ce.createElement(ce.Fragment,null,ce.createElement("div",{className:"discuss-panel"},Jn.length===0?ce.createElement(Ke.Z,null):ce.createElement(ee.Z,{spinning:xn},Jn.map((tr,Bi)=>ce.createElement(ur,{onReplyDiscuss:ri,onPlusDiscuss:ni,onSetActiveDiscussIndex:zi,onSetActionType:Fr,data:tr,index:Bi,user:ft,activeDiscussIndex:gi}))),ci>10?ce.createElement("div",{className:"pagination-container mt10 mb10"},ce.createElement(dt.Z,{showQuickJumper:!0,onChange:yi,current:Pn,total:ci,showTotal:tr=>ce.createElement("span",{style:{color:"#656F87"}},"\u5171",ce.createElement("span",{className:"c-light-primary"},tr),"\u6761\u6570\u636E")})):null),ce.createElement(Vn,{user_praise:wt.user_praise,praise_count:wt.praises_count,praisePlus:Xn,discuss_count:wt.comments_count,onCreateDiscuss:Di}),ce.createElement(oe.Z,null,ce.createElement(le.default,{centered:!0,title:"\u63D0\u793A",open:!!Or,onOk:Ei,onCancel:Wi},ce.createElement("p",null,Or?Or.message:"")),ce.createElement(Un.Z,null)))},kt={flex_box_center:"flex_box_center___tosr6",flex_space_between:"flex_space_between___cQaTP",flex_box_vertical_center:"flex_box_vertical_center___uovxL",flex_box_center_end:"flex_box_center_end___b4gLY",flex_box_column:"flex_box_column___Umjm_",wrap:"wrap___sgoJE",head:"head___b9a9v",sort:"sort___L2Zw8",btn:"btn___khuE4",listWarp:"listWarp___zZj6C",pagination:"pagination___XlROP",fixedRight:"fixedRight___MuAXo","oj-width-input":"oj-width-input___RsZb6"},Bt={flex_box_center:"flex_box_center___EahWI",flex_space_between:"flex_space_between___zopS4",flex_box_vertical_center:"flex_box_vertical_center___w03mz",flex_box_center_end:"flex_box_center_end___lr0Fp",flex_box_column:"flex_box_column___KFHVi",active:"active___BczOO",line:"line___VC_Ry",list:"list___n9ABd",left:"left___LVHqw",mask:"mask___fP13z",right:"right___iLe52",name:"name___Oz_7h",title:"title___2Sess",a:"a___t7rIW",b:"b___Kb_45",des:"des___CjMBM",tag:"tag___V0PVb"},Jt=Object.defineProperty,En=Object.getOwnPropertySymbols,qn=Object.prototype.hasOwnProperty,At=Object.prototype.propertyIsEnumerable,St=(ft,bt,wt)=>bt in ft?Jt(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,an=(ft,bt)=>{for(var wt in bt||(bt={}))qn.call(bt,wt)&&St(ft,wt,bt[wt]);if(En)for(var wt of En(bt))At.call(bt,wt)&&St(ft,wt,bt[wt]);return ft};const Ht=ft=>React.createElement("svg",an({width:12,height:10,xmlns:"http://www.w3.org/2000/svg"},ft),React.createElement("title",null,"\u89C2\u770B"),React.createElement("path",{d:"M11 0a1 1 0 0 1 1 1v8a1 1 0 0 1-1 1H1a1 1 0 0 1-1-1V1a1 1 0 0 1 1-1h10ZM4.4 2.4a.4.4 0 0 0-.4.4v4.4a.4.4 0 0 0 .64.32l2.72-2.04a.6.6 0 0 0 0-.96L4.64 2.48a.4.4 0 0 0-.24-.08Z",fill:"#FFF",fillRule:"evenodd"}));var Et="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTIiIGhlaWdodD0iMTAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTExIDBhMSAxIDAgMCAxIDEgMXY4YTEgMSAwIDAgMS0xIDFIMWExIDEgMCAwIDEtMS0xVjFhMSAxIDAgMCAxIDEtMWgxMFpNNC40IDIuNGEuNC40IDAgMCAwLS40LjR2NC40YS40LjQgMCAwIDAgLjY0LjMybDIuNzItMi4wNGEuNi42IDAgMCAwIDAtLjk2TDQuNjQgMi40OGEuNC40IDAgMCAwLS4yNC0uMDhaIiBmaWxsPSIjRkZGIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=",Ut=Object.defineProperty,nn=Object.getOwnPropertySymbols,rn=Object.prototype.hasOwnProperty,gn=Object.prototype.propertyIsEnumerable,bn=(ft,bt,wt)=>bt in ft?Ut(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,An=(ft,bt)=>{for(var wt in bt||(bt={}))rn.call(bt,wt)&&bn(ft,wt,bt[wt]);if(nn)for(var wt of nn(bt))gn.call(bt,wt)&&bn(ft,wt,bt[wt]);return ft};const Gt=ft=>React.createElement("svg",An({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},ft),React.createElement("title",null,"\u70B9\u8D5E1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#999"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#CCC"})));var Vt="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjOTk5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQ0NDIi8+PC9nPjwvc3ZnPg==",wn=Object.defineProperty,jn=Object.getOwnPropertySymbols,Wn=Object.prototype.hasOwnProperty,$n=Object.prototype.propertyIsEnumerable,kr=(ft,bt,wt)=>bt in ft?wn(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,Sr=(ft,bt)=>{for(var wt in bt||(bt={}))Wn.call(bt,wt)&&kr(ft,wt,bt[wt]);if(jn)for(var wt of jn(bt))$n.call(bt,wt)&&kr(ft,wt,bt[wt]);return ft};const Yr=ft=>React.createElement("svg",Sr({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},ft),React.createElement("title",null,"\u70B9\u8D5E2"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M2.593 13.356V5.694c0-.31-.231-.561-.516-.561H.976c-.532 0-.962.468-.962 1.047v6.69c0 .579.43 1.047.962 1.047h1.101c.285 0 .516-.251.516-.561Z",fill:"#0152d9"}),React.createElement("path",{d:"M3.335 13.512V5.53c0-.184.136-.346.333-.391.695-.16 2.289-.735 2.967-2.694C7.048.73 7.495-.08 8.823.017c1.328.097 1.417 1.263 1.417 1.618v2.752s-.107.42.34.453c.45.033 3.947 0 3.947 0s1.919-.029 1.309 2.122c-.53 1.871-1.58 4.882-1.846 5.635a1.606 1.606 0 0 1-.235.438c-.257.338-.796.88-1.62.88H3.782c-.247.002-.447-.179-.447-.403Z",fill:"#B6D0FC"})));var _r="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMi41OTMgMTMuMzU2VjUuNjk0YzAtLjMxLS4yMzEtLjU2MS0uNTE2LS41NjFILjk3NmMtLjUzMiAwLS45NjIuNDY4LS45NjIgMS4wNDd2Ni42OWMwIC41NzkuNDMgMS4wNDcuOTYyIDEuMDQ3aDEuMTAxYy4yODUgMCAuNTE2LS4yNTEuNTE2LS41NjFaIiBmaWxsPSIjMDE1MmQ5Ii8+PHBhdGggZD0iTTMuMzM1IDEzLjUxMlY1LjUzYzAtLjE4NC4xMzYtLjM0Ni4zMzMtLjM5MS42OTUtLjE2IDIuMjg5LS43MzUgMi45NjctMi42OTRDNy4wNDguNzMgNy40OTUtLjA4IDguODIzLjAxN2MxLjMyOC4wOTcgMS40MTcgMS4yNjMgMS40MTcgMS42MTh2Mi43NTJzLS4xMDcuNDIuMzQuNDUzYy40NS4wMzMgMy45NDcgMCAzLjk0NyAwczEuOTE5LS4wMjkgMS4zMDkgMi4xMjJjLS41MyAxLjg3MS0xLjU4IDQuODgyLTEuODQ2IDUuNjM1YTEuNjA2IDEuNjA2IDAgMCAxLS4yMzUuNDM4Yy0uMjU3LjMzOC0uNzk2Ljg4LTEuNjIuODhIMy43ODJjLS4yNDcuMDAyLS40NDctLjE3OS0uNDQ3LS40MDNaIiBmaWxsPSIjQjZEMEZDIi8+PC9nPjwvc3ZnPg==",Ur=Object.defineProperty,wr=Object.getOwnPropertySymbols,Dr=Object.prototype.hasOwnProperty,Hr=Object.prototype.propertyIsEnumerable,Qr=(ft,bt,wt)=>bt in ft?Ur(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,pi=(ft,bt)=>{for(var wt in bt||(bt={}))Dr.call(bt,wt)&&Qr(ft,wt,bt[wt]);if(wr)for(var wt of wr(bt))Hr.call(bt,wt)&&Qr(ft,wt,bt[wt]);return ft};const _i=ft=>React.createElement("svg",pi({width:16,height:14,xmlns:"http://www.w3.org/2000/svg"},ft),React.createElement("title",null,"\u8BC4\u8BBA1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M4.717.01h8.84c1.571 0 2.357.777 2.357 2.332v5.25c0 1.556-.786 2.334-2.357 2.334h-8.84c-1.572 0-2.357-.778-2.357-2.334v-5.25C2.36.787 3.145.01 4.717.01Z",fill:"#999"}),React.createElement("path",{d:"M2.36 2.342h8.84a2.37 2.37 0 0 1 1.666.684c.442.437.69 1.03.69 1.65v5.25c0 1.288-1.055 2.333-2.357 2.333H7.94l-1.16 1.153-1.167-1.153H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65v-5.25c0-.62.248-1.213.69-1.65a2.37 2.37 0 0 1 1.667-.684Z",fill:"#B6D0FC"}),React.createElement("path",{d:"M2.36 2.926h8.84c1.301 0 2.357 1.044 2.357 2.333v5.25c0 .619-.249 1.212-.69 1.65a2.37 2.37 0 0 1-1.668.683H7.94l-1.16 1.154-1.167-1.154H2.36a2.37 2.37 0 0 1-1.667-.683 2.321 2.321 0 0 1-.69-1.65V5.26c0-.619.248-1.212.69-1.65a2.37 2.37 0 0 1 1.667-.683Z",fill:"#CCC"}),React.createElement("path",{d:"M3.538 5.842h6.483c.393 0 .589.195.589.584 0 .389-.196.583-.59.583H3.539c-.393 0-.59-.194-.59-.583 0-.39.197-.584.59-.584ZM3.538 8.76h4.715c.393 0 .59.194.59.582 0 .39-.197.584-.59.584H3.538c-.393 0-.59-.195-.59-.584 0-.388.197-.583.59-.583Z",fill:"#FFF"})));var Si="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNC43MTcuMDFoOC44NGMxLjU3MSAwIDIuMzU3Ljc3NyAyLjM1NyAyLjMzMnY1LjI1YzAgMS41NTYtLjc4NiAyLjMzNC0yLjM1NyAyLjMzNGgtOC44NGMtMS41NzIgMC0yLjM1Ny0uNzc4LTIuMzU3LTIuMzM0di01LjI1QzIuMzYuNzg3IDMuMTQ1LjAxIDQuNzE3LjAxWiIgZmlsbD0iIzk5OSIvPjxwYXRoIGQ9Ik0yLjM2IDIuMzQyaDguODRhMi4zNyAyLjM3IDAgMCAxIDEuNjY2LjY4NGMuNDQyLjQzNy42OSAxLjAzLjY5IDEuNjV2NS4yNWMwIDEuMjg4LTEuMDU1IDIuMzMzLTIuMzU3IDIuMzMzSDcuOTRsLTEuMTYgMS4xNTMtMS4xNjctMS4xNTNIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NXYtNS4yNWMwLS42Mi4yNDgtMS4yMTMuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4NFoiIGZpbGw9IiNCNkQwRkMiLz48cGF0aCBkPSJNMi4zNiAyLjkyNmg4Ljg0YzEuMzAxIDAgMi4zNTcgMS4wNDQgMi4zNTcgMi4zMzN2NS4yNWMwIC42MTktLjI0OSAxLjIxMi0uNjkgMS42NWEyLjM3IDIuMzcgMCAwIDEtMS42NjguNjgzSDcuOTRsLTEuMTYgMS4xNTQtMS4xNjctMS4xNTRIMi4zNmEyLjM3IDIuMzcgMCAwIDEtMS42NjctLjY4MyAyLjMyMSAyLjMyMSAwIDAgMS0uNjktMS42NVY1LjI2YzAtLjYxOS4yNDgtMS4yMTIuNjktMS42NWEyLjM3IDIuMzcgMCAwIDEgMS42NjctLjY4M1oiIGZpbGw9IiNDQ0MiLz48cGF0aCBkPSJNMy41MzggNS44NDJoNi40ODNjLjM5MyAwIC41ODkuMTk1LjU4OS41ODQgMCAuMzg5LS4xOTYuNTgzLS41OS41ODNIMy41MzljLS4zOTMgMC0uNTktLjE5NC0uNTktLjU4MyAwLS4zOS4xOTctLjU4NC41OS0uNTg0Wk0zLjUzOCA4Ljc2aDQuNzE1Yy4zOTMgMCAuNTkuMTk0LjU5LjU4MiAwIC4zOS0uMTk3LjU4NC0uNTkuNTg0SDMuNTM4Yy0uMzkzIDAtLjU5LS4xOTUtLjU5LS41ODQgMC0uMzg4LjE5Ny0uNTgzLjU5LS41ODNaIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==",oi=Object.defineProperty,Mi=Object.getOwnPropertySymbols,Li=Object.prototype.hasOwnProperty,rr=Object.prototype.propertyIsEnumerable,Cr=(ft,bt,wt)=>bt in ft?oi(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,Ar=(ft,bt)=>{for(var wt in bt||(bt={}))Li.call(bt,wt)&&Cr(ft,wt,bt[wt]);if(Mi)for(var wt of Mi(bt))rr.call(bt,wt)&&Cr(ft,wt,bt[wt]);return ft};const $r=ft=>React.createElement("svg",Ar({width:16,height:12,xmlns:"http://www.w3.org/2000/svg"},ft),React.createElement("title",null,"\u67E5\u770B1"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M7.965 11.961C2.593 11.961 0 6.926 0 5.981 0 5.035 2.623 0 7.965 0s7.965 4.984 7.965 5.98c0 .997-2.593 5.981-7.965 5.981Zm0-2.208c1.296 0 2.494-.72 3.142-1.886a3.902 3.902 0 0 0 0-3.773c-.648-1.167-1.846-1.886-3.142-1.886-2.004 0-3.629 1.69-3.629 3.773s1.625 3.772 3.629 3.772Z",fill:"#CCC"}),React.createElement("path",{d:"M7.965 8.28c-1.222 0-2.213-1.029-2.213-2.3 0-1.27.991-2.3 2.213-2.3s2.212 1.03 2.212 2.3c0 1.271-.99 2.3-2.212 2.3Z",fill:"#999"})));var qr="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTIiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNNy45NjUgMTEuOTYxQzIuNTkzIDExLjk2MSAwIDYuOTI2IDAgNS45ODEgMCA1LjAzNSAyLjYyMyAwIDcuOTY1IDBzNy45NjUgNC45ODQgNy45NjUgNS45OGMwIC45OTctMi41OTMgNS45ODEtNy45NjUgNS45ODFabTAtMi4yMDhjMS4yOTYgMCAyLjQ5NC0uNzIgMy4xNDItMS44ODZhMy45MDIgMy45MDIgMCAwIDAgMC0zLjc3M2MtLjY0OC0xLjE2Ny0xLjg0Ni0xLjg4Ni0zLjE0Mi0xLjg4Ni0yLjAwNCAwLTMuNjI5IDEuNjktMy42MjkgMy43NzNzMS42MjUgMy43NzIgMy42MjkgMy43NzJaIiBmaWxsPSIjQ0NDIi8+PHBhdGggZD0iTTcuOTY1IDguMjhjLTEuMjIyIDAtMi4yMTMtMS4wMjktMi4yMTMtMi4zIDAtMS4yNy45OTEtMi4zIDIuMjEzLTIuM3MyLjIxMiAxLjAzIDIuMjEyIDIuM2MwIDEuMjcxLS45OSAyLjMtMi4yMTIgMi4zWiIgZmlsbD0iIzk5OSIvPjwvZz48L3N2Zz4=",Hi=({style:ft={},onClick:bt,onAssist:wt,onHide:Xn,data:On,active:pn,showLine:Ln})=>ce.createElement(ce.Fragment,null,ce.createElement("div",{className:pn===(On==null?void 0:On.id)?`${Bt.list} ${Bt.active}`:Bt.list,style:ft,onClick:()=>bt(On)},(On==null?void 0:On.video)&&ce.createElement("div",{className:Bt.left},ce.createElement("img",{src:On==null?void 0:On.video_cover}),ce.createElement("div",null,ce.createElement("img",{src:Et}),ce.createElement("span",null,On==null?void 0:On.video_duration)),ce.createElement("div",{className:Bt.mask})),ce.createElement("div",{className:Bt.right},ce.createElement("div",{className:Bt.name},ce.createElement("img",{src:z.Z.IMG_SERVER+"/images/"+(On==null?void 0:On.image_url),width:30,height:30}),ce.createElement("div",{title:On==null?void 0:On.name,className:Bt.title},On==null?void 0:On.name),(On==null?void 0:On.is_authority)&&ce.createElement("div",{className:Bt.b},"\u5B98\u65B9"),(On==null?void 0:On.is_excellent)&&ce.createElement("div",{className:Bt.a},"\u7CBE\u9009")),ce.createElement("div",{className:Bt.des},ce.createElement(Le.Z,{showLines:2,showTextOnly:!0,value:(On==null?void 0:On.content)||"\u6682\u65E0\u5185\u5BB9"})),ce.createElement("div",{className:Bt.tag},ce.createElement("span",{className:"current",onClick:xn=>{xn.stopPropagation(),wt(On)}},ce.createElement("img",{src:On!=null&&On.user_liker?_r:Vt}),ce.createElement("span",{style:{color:On!=null&&On.user_liker?"#0152d9":"#656f87"}},On==null?void 0:On.praises_count)),ce.createElement("span",null,ce.createElement("img",{src:Si}),ce.createElement("span",null,On==null?void 0:On.discusses_count)),ce.createElement("span",null,ce.createElement("img",{src:qr}),ce.createElement("span",null,On==null?void 0:On.viewed_count)),(0,Gn.Ny)()&&ce.createElement("span",{className:"current",style:{color:"#0152d9",marginRight:0,userSelect:"none"},onClick:xn=>{xn.stopPropagation(),Xn(On)}},On!=null&&On.is_hidden?"\u53D6\u6D88\u9690\u85CF":"\u9690\u85CF")))),Ln&&ce.createElement("div",{className:Bt.line})),Tt={flex_box_center:"flex_box_center___C6sVF",flex_space_between:"flex_space_between___VEt8l",flex_box_vertical_center:"flex_box_vertical_center___qeD5F",flex_box_center_end:"flex_box_center_end___iYJd9",flex_box_column:"flex_box_column___iAKJf",listForm:"listForm___leDJL",scroll:"scroll___wtFaF",formWrap:"formWrap___p3W41",btns:"btns___Izl4q",main:"main___xTqlG",mainLoading:"mainLoading___QLa9s",tip:"tip___a0tbY",proWarp:"proWarp___BZhOt",pro:"pro___Yp1Rx",mainSucceed:"mainSucceed___HfaTf",del:"del___TXGhB"},tn=be(25399),Zt=be(12975),Qt=Object.defineProperty,cn=Object.getOwnPropertySymbols,hn=Object.prototype.hasOwnProperty,Nn=Object.prototype.propertyIsEnumerable,kn=(ft,bt,wt)=>bt in ft?Qt(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,yn=(ft,bt)=>{for(var wt in bt||(bt={}))hn.call(bt,wt)&&kn(ft,wt,bt[wt]);if(cn)for(var wt of cn(bt))Nn.call(bt,wt)&&kn(ft,wt,bt[wt]);return ft};const Wt=ft=>React.createElement("svg",yn({width:32,height:30,xmlns:"http://www.w3.org/2000/svg"},ft),React.createElement("title",null,"\u4E0A\u4F20\u89C6\u9891"),React.createElement("path",{d:"M1.6 0C1.175 0 .768.17.468.474A1.63 1.63 0 0 0 0 1.622v3.243h3.237L7.378 0H1.6Zm7.876 0L5.338 4.865h5.9L15.371 0H9.476Zm7.998 0-4.137 4.865h5.896L23.372 0h-5.898Zm8 0-4.138 4.865h6.66V1.622a1.629 1.629 0 0 0-.467-1.148A1.585 1.585 0 0 0 26.397 0h-.924ZM0 6.487v17.837c0 .43.167.844.468 1.148.3.305.707.475 1.132.474h18.61a6.515 6.515 0 0 1 1.652-6.218 6.31 6.31 0 0 1 6.134-1.675V6.487H0Zm11.998 5.675 6.4 4.056-6.4 4.055v-8.11Zm14.399 6.487c-3.092.002-5.597 2.544-5.595 5.678.001 3.134 2.508 5.674 5.6 5.673C29.494 30 32 27.458 32 24.324c0-1.506-.59-2.95-1.641-4.014a5.561 5.561 0 0 0-3.962-1.661Zm0 2.027c.22.003.428.1.574.266.663.6 1.327 1.352 1.99 2.002a.8.8 0 0 1 0 1.14.788.788 0 0 1-1.125 0l-.638-.646v3.724a.814.814 0 0 1-.392.724.79.79 0 0 1-.815 0 .814.814 0 0 1-.392-.724v-3.724l-.637.646a.79.79 0 0 1-.773.215.803.803 0 0 1-.567-.575.816.816 0 0 1 .212-.783c.651-.664 1.333-1.388 1.99-2.002a.778.778 0 0 1 .575-.266l-.002.003Z",fill:"#0152d9",fillRule:"nonzero"}));var ln="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzIiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTEuNiAwQzEuMTc1IDAgLjc2OC4xNy40NjguNDc0QTEuNjMgMS42MyAwIDAgMCAwIDEuNjIydjMuMjQzaDMuMjM3TDcuMzc4IDBIMS42Wm03Ljg3NiAwTDUuMzM4IDQuODY1aDUuOUwxNS4zNzEgMEg5LjQ3NlptNy45OTggMC00LjEzNyA0Ljg2NWg1Ljg5NkwyMy4zNzIgMGgtNS44OThabTggMC00LjEzOCA0Ljg2NWg2LjY2VjEuNjIyYTEuNjI5IDEuNjI5IDAgMCAwLS40NjctMS4xNDhBMS41ODUgMS41ODUgMCAwIDAgMjYuMzk3IDBoLS45MjRaTTAgNi40ODd2MTcuODM3YzAgLjQzLjE2Ny44NDQuNDY4IDEuMTQ4LjMuMzA1LjcwNy40NzUgMS4xMzIuNDc0aDE4LjYxYTYuNTE1IDYuNTE1IDAgMCAxIDEuNjUyLTYuMjE4IDYuMzEgNi4zMSAwIDAgMSA2LjEzNC0xLjY3NVY2LjQ4N0gwWm0xMS45OTggNS42NzUgNi40IDQuMDU2LTYuNCA0LjA1NXYtOC4xMVptMTQuMzk5IDYuNDg3Yy0zLjA5Mi4wMDItNS41OTcgMi41NDQtNS41OTUgNS42NzguMDAxIDMuMTM0IDIuNTA4IDUuNjc0IDUuNiA1LjY3M0MyOS40OTQgMzAgMzIgMjcuNDU4IDMyIDI0LjMyNGMwLTEuNTA2LS41OS0yLjk1LTEuNjQxLTQuMDE0YTUuNTYxIDUuNTYxIDAgMCAwLTMuOTYyLTEuNjYxWm0wIDIuMDI3Yy4yMi4wMDMuNDI4LjEuNTc0LjI2Ni42NjMuNiAxLjMyNyAxLjM1MiAxLjk5IDIuMDAyYS44LjggMCAwIDEgMCAxLjE0Ljc4OC43ODggMCAwIDEtMS4xMjUgMGwtLjYzOC0uNjQ2djMuNzI0YS44MTQuODE0IDAgMCAxLS4zOTIuNzI0Ljc5Ljc5IDAgMCAxLS44MTUgMCAuODE0LjgxNCAwIDAgMS0uMzkyLS43MjR2LTMuNzI0bC0uNjM3LjY0NmEuNzkuNzkgMCAwIDEtLjc3My4yMTUuODAzLjgwMyAwIDAgMS0uNTY3LS41NzUuODE2LjgxNiAwIDAgMSAuMjEyLS43ODNjLjY1MS0uNjY0IDEuMzMzLTEuMzg4IDEuOTktMi4wMDJhLjc3OC43NzggMCAwIDEgLjU3NS0uMjY2bC0uMDAyLjAwM1oiIGZpbGw9IiMwMTUyZDkiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",dn=Object.defineProperty,un=Object.getOwnPropertySymbols,mn=Object.prototype.hasOwnProperty,Hn=Object.prototype.propertyIsEnumerable,vn=(ft,bt,wt)=>bt in ft?dn(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,fn=(ft,bt)=>{for(var wt in bt||(bt={}))mn.call(bt,wt)&&vn(ft,wt,bt[wt]);if(un)for(var wt of un(bt))Hn.call(bt,wt)&&vn(ft,wt,bt[wt]);return ft};const Mn=ft=>React.createElement("svg",fn({width:30,height:30,xmlns:"http://www.w3.org/2000/svg"},ft),React.createElement("title",null,"\u4E0A\u4F20\u6210\u529F"),React.createElement("path",{d:"M15 0c8.285 0 15 6.717 15 15 0 8.285-6.715 15-15 15-8.283 0-15-6.715-15-15C0 6.717 6.717 0 15 0Zm10.041 7.5v.01a47.934 47.934 0 0 0-11.232 9.386l-4.372-3.3v-.002L7.5 15.08l7.553 7.42A44.625 44.625 0 0 1 25.5 8.55l-.459-1.05Z",fill:"#44D7B6",fillRule:"nonzero"}));var Rn="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMzAiIGhlaWdodD0iMzAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTE1IDBjOC4yODUgMCAxNSA2LjcxNyAxNSAxNSAwIDguMjg1LTYuNzE1IDE1LTE1IDE1LTguMjgzIDAtMTUtNi43MTUtMTUtMTVDMCA2LjcxNyA2LjcxNyAwIDE1IDBabTEwLjA0MSA3LjV2LjAxYTQ3LjkzNCA0Ny45MzQgMCAwIDAtMTEuMjMyIDkuMzg2bC00LjM3Mi0zLjN2LS4wMDJMNy41IDE1LjA4bDcuNTUzIDcuNDJBNDQuNjI1IDQ0LjYyNSAwIDAgMSAyNS41IDguNTVsLS40NTktMS4wNVoiIGZpbGw9IiM0NEQ3QjYiIGZpbGwtcnVsZT0ibm9uemVybyIvPjwvc3ZnPg==",Yn=Object.defineProperty,fr=Object.getOwnPropertySymbols,ir=Object.prototype.hasOwnProperty,Ir=Object.prototype.propertyIsEnumerable,br=(ft,bt,wt)=>bt in ft?Yn(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,Mr=(ft,bt)=>{for(var wt in bt||(bt={}))ir.call(bt,wt)&&br(ft,wt,bt[wt]);if(fr)for(var wt of fr(bt))Ir.call(bt,wt)&&br(ft,wt,bt[wt]);return ft};const Wr=ft=>React.createElement("svg",Mr({xmlns:"http://www.w3.org/2000/svg",width:20,height:20},ft),React.createElement("path",{fill:"#AFBACB",d:"M9.99.02C4.482.02.02 4.482.02 9.99c0 5.506 4.463 9.97 9.97 9.97 5.506 0 9.97-4.464 9.97-9.97 0-5.507-4.464-9.97-9.97-9.97Zm1.636 13.69c-.744 1.19-1.488 2.083-2.827 2.083-.893-.149-1.19-.744-1.042-1.488l1.637-5.506c0-.149 0-.298-.149-.298-.148 0-.446 0-.595.298l-1.042 1.19v-.744c.745-1.19 1.935-2.083 2.828-2.083.744.149 1.19.744 1.042 1.488L9.84 14.305c0 .149 0 .298.148.298.15 0 .447-.15.596-.298l1.041-1.34v.745Zm-.297-7.292c-.596 0-1.19-.446-1.19-1.19 0-.745.446-1.191 1.19-1.191.595 0 1.19.446 1.19 1.19 0 .745-.595 1.191-1.19 1.191Z"}));var Pr="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyMCIgaGVpZ2h0PSIyMCI+PHBhdGggZmlsbD0iI0FGQkFDQiIgZD0iTTkuOTkuMDJDNC40ODIuMDIuMDIgNC40ODIuMDIgOS45OWMwIDUuNTA2IDQuNDYzIDkuOTcgOS45NyA5Ljk3IDUuNTA2IDAgOS45Ny00LjQ2NCA5Ljk3LTkuOTcgMC01LjUwNy00LjQ2NC05Ljk3LTkuOTctOS45N1ptMS42MzYgMTMuNjljLS43NDQgMS4xOS0xLjQ4OCAyLjA4My0yLjgyNyAyLjA4My0uODkzLS4xNDktMS4xOS0uNzQ0LTEuMDQyLTEuNDg4bDEuNjM3LTUuNTA2YzAtLjE0OSAwLS4yOTgtLjE0OS0uMjk4LS4xNDggMC0uNDQ2IDAtLjU5NS4yOThsLTEuMDQyIDEuMTl2LS43NDRjLjc0NS0xLjE5IDEuOTM1LTIuMDgzIDIuODI4LTIuMDgzLjc0NC4xNDkgMS4xOS43NDQgMS4wNDIgMS40ODhMOS44NCAxNC4zMDVjMCAuMTQ5IDAgLjI5OC4xNDguMjk4LjE1IDAgLjQ0Ny0uMTUuNTk2LS4yOThsMS4wNDEtMS4zNHYuNzQ1Wm0tLjI5Ny03LjI5MmMtLjU5NiAwLTEuMTktLjQ0Ni0xLjE5LTEuMTkgMC0uNzQ1LjQ0Ni0xLjE5MSAxLjE5LTEuMTkxLjU5NSAwIDEuMTkuNDQ2IDEuMTkgMS4xOSAwIC43NDUtLjU5NSAxLjE5MS0xLjE5IDEuMTkxWiIvPjwvc3ZnPg==",li=Object.defineProperty,zr=Object.getOwnPropertySymbols,Xr=Object.prototype.hasOwnProperty,Tr=Object.prototype.propertyIsEnumerable,ar=(ft,bt,wt)=>bt in ft?li(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,dr=(ft,bt)=>{for(var wt in bt||(bt={}))Xr.call(bt,wt)&&ar(ft,wt,bt[wt]);if(zr)for(var wt of zr(bt))Tr.call(bt,wt)&&ar(ft,wt,bt[wt]);return ft},Nr=(ft,bt,wt)=>new Promise((Xn,On)=>{var pn=Pn=>{try{xn(wt.next(Pn))}catch(Jn){On(Jn)}},Ln=Pn=>{try{xn(wt.throw(Pn))}catch(Jn){On(Jn)}},xn=Pn=>Pn.done?Xn(Pn.value):Promise.resolve(Pn.value).then(pn,Ln);xn((wt=wt.apply(ft,bt)).next())});const pr=(ft,bt)=>{var wt,Xn,On;const{uploadInfo:pn={}}=bt.payload;switch(bt.type){case"addVideo":return{videoList:[...ft.videoList,{name:pn.file.name,size:pn.file.size,type:pn.file.type,fileHash:pn.fileHash,state:pn.state,video_id:pn.videoId,attachment_id:"",article_id:-1,loaded:0,title:""}]};case"removeVideo":return{videoList:ft.videoList.filter(Ln=>Ln.name!==bt.payload.name)};case"replaceVideo":return{videoList:bt.payload};case"removeAll":return[];case"updateProgress":return{videoList:ft.videoList.map(Ln=>Ln.name===bt.payload.uploadInfo.file.name?dr(dr({},Ln),{loaded:bt.payload.progressPercent,video_id:pn.videoId,fileHash:pn.fileHash}):Ln)};case"updateTitle":return{videoList:(wt=ft.videoList)==null?void 0:wt.map(Ln=>Ln.name===bt.payload.item.name?dr(dr({},Ln),{title:bt.payload.title}):Ln)};case"updateImg":return{videoList:(Xn=ft.videoList)==null?void 0:Xn.map(Ln=>Ln.name===bt.payload.item.name?dr(dr({},Ln),{attachment_id:bt.payload.attachment_id}):Ln)};case"updateImg":return{videoList:(On=ft.videoList)==null?void 0:On.map(Ln=>Ln.name===bt.payload.item.name?dr(dr({},Ln),{attachment_id:bt.payload.attachment_id}):Ln)};default:return[]}};var ti=({onClose:ft,onOk:bt,identifier:wt,active:Xn})=>{var On,pn;const[Ln]=ze.default.useForm(),[xn,Pn]=(0,ce.useState)({}),[Jn,ci]=(0,ce.useState)(!1),[Or,gi]=(0,ce.useState)(!1),[Lr,yi]=(0,ce.useReducer)(pr,{videoList:[]}),Fr=(0,Gn.eY)(),zi=(0,ue.useParams)(),ni=(0,ce.useRef)();(0,ce.useEffect)(()=>{Xn&&Ei()},[Xn]);const Ei=()=>Nr(void 0,null,function*(){var jr,mi,Rr,qo,so,oa,os,aa,ga,ii;const Ai=yield(0,E.M3)(wt,{active:Xn});if((Ai==null?void 0:Ai.status)===0){const oo={name:(jr=Ai==null?void 0:Ai.data)==null?void 0:jr.name,content:(mi=Ai==null?void 0:Ai.data)==null?void 0:mi.content};Ln.setFieldsValue(oo),Pn(oo),(qo=(Rr=Ai==null?void 0:Ai.data)==null?void 0:Rr.videos)!=null&&qo[0]&&yi({type:"replaceVideo",payload:[{video_id:(os=(oa=(so=Ai==null?void 0:Ai.data)==null?void 0:so.videos)==null?void 0:oa[0])==null?void 0:os.video_id,name:(ii=(ga=(aa=Ai==null?void 0:Ai.data)==null?void 0:aa.videos)==null?void 0:ga[0])==null?void 0:ii.title,loaded:100}]})}}),Wi=(jr,mi)=>{Pn(dr({},mi))},ri=jr=>Nr(void 0,null,function*(){const mi={videos:Lr.videoList,articles:jr};gi(!0);let Rr;Xn?(mi.active=Xn,Rr=yield(0,E.gu)(wt,mi)):Rr=yield(0,E.bx)(wt,mi),(Rr==null?void 0:Rr.status)===0&&(console.log(Xn||(Rr==null?void 0:Rr.id),44),bt(Xn||(Rr==null?void 0:Rr.id))),gi(!1)}),Di=()=>{const jr=document.getElementById("fileUpload");jr.value=""},tr=jr=>{var mi='{"Vod":{}}';if(ci(!0),ni.current){ni.current.addFile(jr,null,null,null,mi);return}(0,Zt.o)(Fr==null?void 0:Fr.login,"",{create:!ni,addFileSuccess:Rr=>{yi({type:"addVideo",payload:{uploadInfo:Rr}})},onUploadProgress:(Rr,qo,so)=>{const oa=Math.ceil(so*100);yi({type:"updateProgress",payload:{uploadInfo:Rr,progressPercent:oa}}),Di()},onUploadFailed:Rr=>{te.ZP.info("\u89C6\u9891\u4E91\u670D\u52A1\u51FA\u73B0\u5F02\u5E38\uFF0C\u8BF7\u91CD\u65B0\u4E0A\u4F20\u3002")},onUploadEnd:Rr=>{ci(!1)},onUploadSucceed:Rr=>{ci(!1)},onUploadError:Rr=>{ci(!1)},gotUploader:Rr=>{Rr.addFile(jr,null,null,null,mi),ni.current=Rr}})},Bi=jr=>{var mi;const qo=jr.target.files[0];if(!qo){Di();return}let so=qo.name.toLowerCase();if(so&&so.indexOf(".avi")==-1&&so.indexOf(".flv")==-1&&so.indexOf(".f4v")==-1&&so.indexOf(".m4v")==-1&&so.indexOf(".mov")==-1&&so.indexOf(".mp4")==-1&&so.indexOf(".rmvb")==-1&&so.indexOf(".swf")==-1&&so.indexOf(".webm")==-1&&so.indexOf(".wmv")==-1){te.ZP.info("\u4E0D\u652F\u6301\u7684\u89C6\u9891\u683C\u5F0F"),Di();return}if(qo.size>1024*1024*1024){te.ZP.info("\u89C6\u9891\u5927\u5C0F\u8D85\u8FC71024M"),Di();return}if((mi=Lr.videoList)!=null&&mi.find(oa=>oa.name===qo.name)){te.ZP.info("\u4F60\u4E0D\u80FD\u4E0A\u4F20\u540C\u4E00\u4E2A\u89C6\u9891\u6587\u4EF6\u540D\u79F0\uFF0C\u8BF7\u91CD\u65B0\u9009\u62E9\u3002"),Di();return}tr(qo)},bi=(jr,mi)=>{le.default.confirm({title:"\u63D0\u793A",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",content:ce.createElement("div",{className:"tc"},"\u60A8\u786E\u8BA4\u8981",mi?"\u5220\u9664":"\u53D6\u6D88\u4E0A\u4F20","\u8BE5\u89C6\u9891\u5417\uFF1F"),onOk:()=>{Di(),yi({type:"removeVideo",payload:{name:jr}})}})},Ri=()=>ce.createElement("label",{htmlFor:"fileUpload",className:Tt.main},ce.createElement("img",{src:ln,alt:""}),ce.createElement("span",null,"\u4E0A\u4F20\u89C6\u9891")),No=jr=>ce.createElement("div",{className:Tt.mainLoading},ce.createElement("div",{className:Tt.proWarp},ce.createElement("div",{className:Tt.pro},ce.createElement("div",{style:{width:jr}})),ce.createElement("span",null,jr||0,"%")),ce.createElement("aside",null,"\u4E0A\u4F20\u4E2D"),ce.createElement("div",{className:Tt.tip},ce.createElement(tn.Z,{getPopupContainer:mi=>mi.parentNode,title:ce.createElement("div",null,ce.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",ce.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),ce.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),ce.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},ce.createElement("img",{src:Pr,alt:""})))),mr=jr=>ce.createElement("div",{className:Tt.mainSucceed},ce.createElement("img",{src:Rn,alt:""}),ce.createElement("span",null,"\u4E0A\u4F20\u6210\u529F"),ce.createElement("div",{className:Tt.tip},ce.createElement(tn.Z,{getPopupContainer:mi=>mi.parentNode,title:ce.createElement("div",null,ce.createElement("div",null,"1\u3001\u4E0A\u4F20\u89C6\u9891\uFF0C\u5373\u8868\u793A\u60A8\u5DF2\u540C\u610F",ce.createElement("a",{className:"current c-light-primary",target:"_blank",href:"/users/innov/videos/protocol"},"\u4E0A\u4F20\u5185\u5BB9\u534F\u8BAE"),"\uFF0C\u4E0D\u5F97\u4E0A\u4F20\u672A\u7ECF\u4ED6\u4EBA\u6388\u6743\u7684\u4F5C\u54C1\uFF1B"),ce.createElement("div",null,"2\u3001\u4E0D\u652F\u6301\u65AD\u70B9\u7EED\u4F20\uFF0C\u6587\u4EF6\u5927\u5C0F\u8BF7\u52FF\u8D85\u8FC71G\uFF1B"),ce.createElement("div",null,"3\u3001\u652F\u6301\u6587\u4EF6\u683C\u5F0F\uFF1Aavi\u3001flv\u3001f4v\u3001m4v\u3001mov\u3001mp4\u3001rmvb\u3001swf\u3001webm\u3001wmv\uFF1B"))},ce.createElement("img",{src:Pr,alt:""}))),ce.createElement("div",{className:Tt.del,onClick:()=>bi(jr.name,jr.loaded==100)},ce.createElement("i",{className:"iconfont icon-shanchu7 mr5"}),"\u5220\u9664\u89C6\u9891")),Zi=()=>{var jr;return ce.createElement(ce.Fragment,null,(jr=Lr.videoList)==null?void 0:jr.map((mi,Rr)=>ce.createElement(ce.Fragment,{key:Rr},mi.loaded==100?mr(mi):No(mi.loaded))))},si=()=>{le.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:ft})},xr=(On=Lr.videoList)==null?void 0:On.length;return ce.createElement("div",{className:Tt.listForm},ce.createElement("header",null,Xn?"\u7F16\u8F91":"\u53D1\u5E03","\u9898\u89E3"),ce.createElement("section",{className:Tt.scroll,id:"sss"},ce.createElement("div",{className:Tt.formWrap}," ",ce.createElement(ze.default,{form:Ln,scrollToFirstError:!0,layout:"vertical",onValuesChange:Wi,onFinish:ri},ce.createElement(ze.default.Item,{name:"name",label:"\u6807\u9898:",rules:[{required:!0,message:"\u8BF7\u8F93\u5165\u540D\u79F0"},{max:60,message:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26"},{whitespace:!0,message:"\u8BF7\u52FF\u8F93\u5165\u7A7A\u683C"}]},ce.createElement(Ge.default,{bordered:!1,placeholder:"\u8BF7\u8F93\u5165\u540D\u79F0\uFF0C\u6700\u5927\u9650\u523660\u4E2A\u5B57\u7B26",suffix:`${((pn=xn.name)==null?void 0:pn.length)||0}/60`})),ce.createElement(ze.default.Item,{name:"content",label:"\u5185\u5BB9:"},ce.createElement(Fn.Z,{defaultValue:xn.content||"",watch:!0})))),ce.createElement("div",{className:Tt.upload},xr?Zi():Ri(),ce.createElement("input",{type:"file",id:"fileUpload",style:{display:"none"},onChange:Bi,accept:".mkv, .flv, .f4v, .rmvb, .swf, video/mp4,video/x-m4v,video/flv,video/f4v,video/rmvb,video/swf,video/*"}))),ce.createElement("div",{className:Tt.btns},ce.createElement(Ve.ZP,{onClick:si,type:"primary",ghost:!0},"\u5173\u95ED"),ce.createElement(Ve.ZP,{loading:Or,disabled:Jn,onClick:()=>Ln.submit(),type:"primary"},"\u53D1\u5E03\u9898\u89E3")))},di={flex_box_center:"flex_box_center___Udvu8",flex_space_between:"flex_space_between___WNLp1",flex_box_vertical_center:"flex_box_vertical_center___ecch5",flex_box_center_end:"flex_box_center_end___cu_DJ",flex_box_column:"flex_box_column___zF2CU",listDetails:"listDetails___HpDwH",head:"head___wipEz",name:"name___qdH8S",title:"title___B0yUa",a:"a___LB6ZS",b:"b___yvOON",tag:"tag___bRCso",btn:"btn___akBxg",scroll:"scroll___JKC_q",video:"video___nEr4F",html:"html___GDNSx",g:"g___LSOhO",btns:"btns___Ci727"},po=be(458),ao=Object.defineProperty,to=Object.getOwnPropertySymbols,mo=Object.prototype.hasOwnProperty,Ii=Object.prototype.propertyIsEnumerable,Ti=(ft,bt,wt)=>bt in ft?ao(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,Pi=(ft,bt)=>{for(var wt in bt||(bt={}))mo.call(bt,wt)&&Ti(ft,wt,bt[wt]);if(to)for(var wt of to(bt))Ii.call(bt,wt)&&Ti(ft,wt,bt[wt]);return ft};const vo=ft=>React.createElement("svg",Pi({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:15,height:16},ft),React.createElement("defs",null,React.createElement("path",{id:"jx_svg__a",d:"M6.385.257c.616-.343 1.616-.342 2.23 0l5.27 2.94C14.501 3.538 15 4.38 15 5.071v5.856c0 .692-.501 1.533-1.115 1.876l-5.27 2.939c-.616.343-1.616.342-2.23 0l-5.27-2.94C.499 12.462 0 11.622 0 10.929V5.072C0 4.38.501 3.54 1.115 3.196Zm1.423 3.817c-.169-.341-.446-.341-.615 0L6.38 5.717c-.169.341-.616.665-.994.72l-1.82.264c-.378.055-.464.317-.19.583l1.317 1.278c.273.266.444.79.38 1.165l-.31 1.806c-.066.376.158.538.496.36l1.628-.853c.338-.177.89-.177 1.23 0l1.627.853c.337.177.561.015.497-.36l-.31-1.806c-.065-.375.105-.899.379-1.165l1.316-1.278c.274-.266.188-.529-.19-.583l-1.819-.264c-.377-.054-.825-.378-.994-.72Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"jx_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#jx_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#jx_svg__a"}),React.createElement("circle",{cx:-1.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"}),React.createElement("circle",{cx:-2.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#jx_svg__b)"})));var Fi="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTUiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNNi4zODUuMjU3Yy42MTYtLjM0MyAxLjYxNi0uMzQyIDIuMjMgMGw1LjI3IDIuOTRDMTQuNTAxIDMuNTM4IDE1IDQuMzggMTUgNS4wNzF2NS44NTZjMCAuNjkyLS41MDEgMS41MzMtMS4xMTUgMS44NzZsLTUuMjcgMi45MzljLS42MTYuMzQzLTEuNjE2LjM0Mi0yLjIzIDBsLTUuMjctMi45NEMuNDk5IDEyLjQ2MiAwIDExLjYyMiAwIDEwLjkyOVY1LjA3MkMwIDQuMzguNTAxIDMuNTQgMS4xMTUgMy4xOTZabTEuNDIzIDMuODE3Yy0uMTY5LS4zNDEtLjQ0Ni0uMzQxLS42MTUgMEw2LjM4IDUuNzE3Yy0uMTY5LjM0MS0uNjE2LjY2NS0uOTk0LjcybC0xLjgyLjI2NGMtLjM3OC4wNTUtLjQ2NC4zMTctLjE5LjU4M2wxLjMxNyAxLjI3OGMuMjczLjI2Ni40NDQuNzkuMzggMS4xNjVsLS4zMSAxLjgwNmMtLjA2Ni4zNzYuMTU4LjUzOC40OTYuMzZsMS42MjgtLjg1M2MuMzM4LS4xNzcuODktLjE3NyAxLjIzIDBsMS42MjcuODUzYy4zMzcuMTc3LjU2MS4wMTUuNDk3LS4zNmwtLjMxLTEuODA2Yy0uMDY1LS4zNzUuMTA1LS44OTkuMzc5LTEuMTY1bDEuMzE2LTEuMjc4Yy4yNzQtLjI2Ni4xODgtLjUyOS0uMTktLjU4M2wtMS44MTktLjI2NGMtLjM3Ny0uMDU0LS44MjUtLjM3OC0uOTk0LS43MloiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48dXNlIGZpbGw9IiM4REM5RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgeGxpbms6aHJlZj0iI2EiLz48Y2lyY2xlIGN4PSItMS41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLTIuNSIgY3k9Ii00LjUiIHI9IjEyLjUiIGZpbGw9IiNFRUY3RkYiIGZpbGwtcnVsZT0ibm9uemVybyIgbWFzaz0idXJsKCNiKSIvPjwvZz48L3N2Zz4=",Gi=Object.defineProperty,ji=Object.getOwnPropertySymbols,gr=Object.prototype.hasOwnProperty,Gr=Object.prototype.propertyIsEnumerable,Zr=(ft,bt,wt)=>bt in ft?Gi(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,Vr=(ft,bt)=>{for(var wt in bt||(bt={}))gr.call(bt,wt)&&Zr(ft,wt,bt[wt]);if(ji)for(var wt of ji(bt))Gr.call(bt,wt)&&Zr(ft,wt,bt[wt]);return ft};const xi=ft=>React.createElement("svg",Vr({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},ft),React.createElement("defs",null,React.createElement("path",{id:"gf_svg__a",d:"m8 0 1.857 1.073h2.146l1.071 1.854L14.931 4v2.144L16 8l-1.069 1.857V12l-1.858 1.072-1.071 1.856H9.857L8 16l-1.855-1.073H4l-1.072-1.856L1.072 12V9.857L0 8l1.072-1.856V4l1.857-1.073 1.072-1.854h2.145L8 0Zm2.91 6.385H4.796V12h1.246v-.451h4.026v.435h1.247V9.196H6.043v-.515h4.866V6.385Zm-.84 3.681v.613H6.042v-.613h4.026ZM9.705 7.24v.588H6.043v-.588h3.663ZM8.615 4l-1.48.137c.055.133.12.284.192.453l.076.175H4v1.426h1.195v-.483h5.61v.483H12V4.765H8.883c-.078-.23-.148-.43-.21-.602L8.616 4Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"gf_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#gf_svg__a"})),React.createElement("use",{fill:"#8DC9FF",fillRule:"nonzero",xlinkHref:"#gf_svg__a"}),React.createElement("circle",{cx:.5,cy:-3.5,r:16.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"}),React.createElement("circle",{cx:-.5,cy:-4.5,r:12.5,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#gf_svg__b)"})));var Oi="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJtOCAwIDEuODU3IDEuMDczaDIuMTQ2bDEuMDcxIDEuODU0TDE0LjkzMSA0djIuMTQ0TDE2IDhsLTEuMDY5IDEuODU3VjEybC0xLjg1OCAxLjA3Mi0xLjA3MSAxLjg1Nkg5Ljg1N0w4IDE2bC0xLjg1NS0xLjA3M0g0bC0xLjA3Mi0xLjg1NkwxLjA3MiAxMlY5Ljg1N0wwIDhsMS4wNzItMS44NTZWNGwxLjg1Ny0xLjA3MyAxLjA3Mi0xLjg1NGgyLjE0NUw4IDBabTIuOTEgNi4zODVINC43OTZWMTJoMS4yNDZ2LS40NTFoNC4wMjZ2LjQzNWgxLjI0N1Y5LjE5Nkg2LjA0M3YtLjUxNWg0Ljg2NlY2LjM4NVptLS44NCAzLjY4MXYuNjEzSDYuMDQydi0uNjEzaDQuMDI2Wk05LjcwNSA3LjI0di41ODhINi4wNDN2LS41ODhoMy42NjNaTTguNjE1IDRsLTEuNDguMTM3Yy4wNTUuMTMzLjEyLjI4NC4xOTIuNDUzbC4wNzYuMTc1SDR2MS40MjZoMS4xOTV2LS40ODNoNS42MXYuNDgzSDEyVjQuNzY1SDguODgzYy0uMDc4LS4yMy0uMTQ4LS40My0uMjEtLjYwMkw4LjYxNiA0WiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzhEQzlGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9Ii41IiBjeT0iLTMuNSIgcj0iMTYuNSIgZmlsbD0iI0MxRTJGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PGNpcmNsZSBjeD0iLS41IiBjeT0iLTQuNSIgcj0iMTIuNSIgZmlsbD0iI0VFRjdGRiIgZmlsbC1ydWxlPSJub256ZXJvIiBtYXNrPSJ1cmwoI2IpIi8+PC9nPjwvc3ZnPg==",Ao=Object.defineProperty,Yi=Object.getOwnPropertySymbols,Xi=Object.prototype.hasOwnProperty,ui=Object.prototype.propertyIsEnumerable,no=(ft,bt,wt)=>bt in ft?Ao(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,Io=(ft,bt)=>{for(var wt in bt||(bt={}))Xi.call(bt,wt)&&no(ft,wt,bt[wt]);if(Yi)for(var wt of Yi(bt))ui.call(bt,wt)&&no(ft,wt,bt[wt]);return ft};const Ui=ft=>React.createElement("svg",Io({width:22,height:20,xmlns:"http://www.w3.org/2000/svg"},ft),React.createElement("title",null,"\u5927\u70B9\u8D5E"),React.createElement("g",{fillRule:"nonzero",fill:"none"},React.createElement("path",{d:"M3.566 19.08V8.134c0-.443-.318-.802-.71-.802H1.34c-.73 0-1.322.67-1.322 1.496v9.558c0 .827.593 1.496 1.322 1.496h1.515c.392 0 .71-.36.71-.802Z",fill:"#A3D3FF"}),React.createElement("path",{d:"M4.585 19.303V7.9c0-.263.188-.495.459-.559.955-.229 3.147-1.049 4.08-3.848.567-2.451 1.182-3.607 3.008-3.469 1.826.139 1.948 1.804 1.948 2.312v3.93s-.148.602.468.649c.617.046 5.426 0 5.426 0s2.639-.042 1.8 3.031c-.73 2.673-2.173 6.974-2.537 8.05a2.324 2.324 0 0 1-.324.626c-.353.483-1.094 1.258-2.228 1.258H5.201c-.341.002-.616-.257-.616-.577Z",fill:"#FFF"})));var Ho="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjIiIGhlaWdodD0iMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGcgZmlsbC1ydWxlPSJub256ZXJvIiBmaWxsPSJub25lIj48cGF0aCBkPSJNMy41NjYgMTkuMDhWOC4xMzRjMC0uNDQzLS4zMTgtLjgwMi0uNzEtLjgwMkgxLjM0Yy0uNzMgMC0xLjMyMi42Ny0xLjMyMiAxLjQ5NnY5LjU1OGMwIC44MjcuNTkzIDEuNDk2IDEuMzIyIDEuNDk2aDEuNTE1Yy4zOTIgMCAuNzEtLjM2LjcxLS44MDJaIiBmaWxsPSIjQTNEM0ZGIi8+PHBhdGggZD0iTTQuNTg1IDE5LjMwM1Y3LjljMC0uMjYzLjE4OC0uNDk1LjQ1OS0uNTU5Ljk1NS0uMjI5IDMuMTQ3LTEuMDQ5IDQuMDgtMy44NDguNTY3LTIuNDUxIDEuMTgyLTMuNjA3IDMuMDA4LTMuNDY5IDEuODI2LjEzOSAxLjk0OCAxLjgwNCAxLjk0OCAyLjMxMnYzLjkzcy0uMTQ4LjYwMi40NjguNjQ5Yy42MTcuMDQ2IDUuNDI2IDAgNS40MjYgMHMyLjYzOS0uMDQyIDEuOCAzLjAzMWMtLjczIDIuNjczLTIuMTczIDYuOTc0LTIuNTM3IDguMDVhMi4zMjQgMi4zMjQgMCAwIDEtLjMyNC42MjZjLS4zNTMuNDgzLTEuMDk0IDEuMjU4LTIuMjI4IDEuMjU4SDUuMjAxYy0uMzQxLjAwMi0uNjE2LS4yNTctLjYxNi0uNTc3WiIgZmlsbD0iI0ZGRiIvPjwvZz48L3N2Zz4=",Co={flex_box_center:"flex_box_center___Fl60v",flex_space_between:"flex_space_between___bECvI",flex_box_vertical_center:"flex_box_vertical_center___NasnL",flex_box_center_end:"flex_box_center_end___llsAF",flex_box_column:"flex_box_column___KaTPF",discuss:"discuss___fk6PE",reply:"reply___pOmly",pagination:"pagination___qEsHX"},Oo=be(77019),Ki=be(5269),Wo={flex_box_center:"flex_box_center___qGmgZ",flex_space_between:"flex_space_between___PeDhE",flex_box_vertical_center:"flex_box_vertical_center___avs2o",flex_box_center_end:"flex_box_center_end___bpXQB",flex_box_column:"flex_box_column___bc5wd",discussItem:"discussItem___zcesj",wrap:"wrap___ezVW4",list:"list___EEOWp",btns:"btns___Niwl7",secondLevelDiscuss:"secondLevelDiscuss___TXG1b",line:"line___ejh2a",thirdlyLevelDiscuss:"thirdlyLevelDiscuss___HRI5Q"},za=(ft,bt,wt)=>new Promise((Xn,On)=>{var pn=Pn=>{try{xn(wt.next(Pn))}catch(Jn){On(Jn)}},Ln=Pn=>{try{xn(wt.throw(Pn))}catch(Jn){On(Jn)}},xn=Pn=>Pn.done?Xn(Pn.value):Promise.resolve(Pn.value).then(pn,Ln);xn((wt=wt.apply(ft,bt)).next())});const Yo=({id:ft,cb:bt})=>{const[wt,Xn]=(0,ce.useState)("");return ce.createElement("aside",{className:"mt10"},ce.createElement(Fn.Z,{defaultValue:wt,id:"writeForumsReviewId",onChange:On=>{Xn(On)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ce.createElement(Oo.Z,null,ce.createElement(Ki.Z,{flex:"1"}),ce.createElement(Ki.Z,null,ce.createElement(Ve.ZP,{type:"primary",size:"middle",onClick:()=>za(void 0,null,function*(){wt===""?te.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9"):bt(ft,wt)})},"\u53D1\u9001"))))},la=({data:ft})=>{var bt;return ce.createElement("div",{className:Wo.thirdlyLevelDiscuss},ce.createElement("span",{className:"c-grey-333"},ce.createElement("span",{className:"font 14 c-light-primary"},(bt=ft==null?void 0:ft.author)==null?void 0:bt.name),"@",ce.createElement("span",{className:"font 14 c-light-primary"},ft==null?void 0:ft.parent_name),":"),ce.createElement(Le.Z,{value:ft==null?void 0:ft.content}))},Zo=({data:ft,onReplyDiscuss:bt,thirdlyReply:wt,setThirdlyReply:Xn})=>{var On,pn,Ln,xn;const Pn=(0,Gn.eY)();return console.log(Pn,"user"),ce.createElement("div",{className:Wo.list},ce.createElement("img",{src:z.Z.IMG_SERVER+"/images/"+((On=ft==null?void 0:ft.author)==null?void 0:On.image_url)}),ce.createElement("div",{className:Wo.wrap},ce.createElement("div",{className:"font14",style:{marginBottom:6}},ce.createElement("span",{className:"c-grey-333"},(pn=ft==null?void 0:ft.author)==null?void 0:pn.name),(Pn==null?void 0:Pn.login)!==((Ln=ft==null?void 0:ft.author)==null?void 0:Ln.login)&&ce.createElement("span",{onClick:()=>Xn(ft==null?void 0:ft.id),className:"c-grey-999 current",style:{float:"right"}},ce.createElement("i",{className:"iconfont icon-huifu3 mr3 font12"}),ce.createElement("span",null,"\u56DE\u590D"))),ce.createElement(Le.Z,{value:ft==null?void 0:ft.content}),(xn=ft==null?void 0:ft.children)==null?void 0:xn.map(Jn=>ce.createElement(la,{key:Jn.id,data:Jn})),wt===(ft==null?void 0:ft.id)&&ce.createElement("div",null,ce.createElement(Yo,{id:ft==null?void 0:ft.id,cb:bt}),ce.createElement("div",{style:{textAlign:"end",paddingTop:20},onClick:()=>Xn(null),className:"c-light-primary current"},ce.createElement("i",{style:{transform:"scale(0.7)",display:"inline-block"},className:"iconfont icon-shouqi font12"}),"\u6536\u8D77\u56DE\u590D")),ce.createElement("div",{className:Wo.line})))};var qa=({data:ft,onReplyDiscuss:bt,secondReply:wt,setSecondReply:Xn,thirdlyReply:On,setThirdlyReply:pn,onPlusDiscuss:Ln})=>{var xn,Pn,Jn,ci;const[Or,gi]=(0,ce.useState)(!1);return console.log(ft,"data"),ce.createElement("div",{className:Wo.discussItem},ce.createElement("div",{className:Wo.list},ce.createElement("img",{src:z.Z.IMG_SERVER+"/images/"+((xn=ft==null?void 0:ft.author)==null?void 0:xn.image_url)}),ce.createElement("div",{className:Wo.wrap},ce.createElement("div",{className:"font14",style:{marginBottom:6}},ce.createElement("span",{className:"c-grey-333 mr30"},(Pn=ft==null?void 0:ft.author)==null?void 0:Pn.name),ce.createElement("span",{className:"c-grey-999"},ft==null?void 0:ft.time)),ce.createElement(Le.Z,{value:ft==null?void 0:ft.content}),ce.createElement("div",{className:Wo.btns},ce.createElement("div",{onClick:()=>Ln(ft==null?void 0:ft.id),className:ft!=null&&ft.user_praise?"c-light-primary":"c-grey-999"},ce.createElement("i",{className:"iconfont icon-xiaodianzan2 mr3"}),ce.createElement("span",null,ft==null?void 0:ft.praise_count)),ce.createElement("div",{onClick:()=>{var Lr;((Lr=ft==null?void 0:ft.children)==null?void 0:Lr.length)!==0&&(Xn(null),gi(!Or))},style:{color:Or?"#0152d9":"#999999"}},ce.createElement("i",{className:"iconfont icon-xiaopinglun2 mr3"}),ce.createElement("span",null,Or?"\u6536\u8D77\u8BC4\u8BBA":(Jn=ft==null?void 0:ft.children)==null?void 0:Jn.length)),ce.createElement("div",{onClick:()=>{gi(!1),Xn(wt===(ft==null?void 0:ft.id)?null:ft==null?void 0:ft.id)},style:{color:wt===(ft==null?void 0:ft.id)?"#0152d9":"#999999"}},ce.createElement("i",{className:"iconfont icon-huifu3 mr3"}),ce.createElement("span",null,wt===(ft==null?void 0:ft.id)?"\u6536\u8D77\u56DE\u590D":"\u56DE\u590D"))),wt===(ft==null?void 0:ft.id)&&ce.createElement(Yo,{id:ft==null?void 0:ft.id,cb:(Lr,yi)=>{bt(Lr,yi),gi(!0)}}),Or&&ce.createElement("div",{className:Wo.secondLevelDiscuss},(ci=ft==null?void 0:ft.children)==null?void 0:ci.map(Lr=>ce.createElement(Zo,{thirdlyReply:On,setThirdlyReply:pn,key:Lr.id,data:Lr,onReplyDiscuss:bt}))))))},ba=(ft,bt,wt)=>new Promise((Xn,On)=>{var pn=Pn=>{try{xn(wt.next(Pn))}catch(Jn){On(Jn)}},Ln=Pn=>{try{xn(wt.throw(Pn))}catch(Jn){On(Jn)}},xn=Pn=>Pn.done?Xn(Pn.value):Promise.resolve(Pn.value).then(pn,Ln);xn((wt=wt.apply(ft,bt)).next())}),Ma=({identifier:ft,active:bt,onOk:wt})=>{const[Xn,On]=(0,ce.useState)(""),[pn,Ln]=(0,ce.useState)(1),[xn,Pn]=(0,ce.useState)([]),[Jn,ci]=(0,ce.useState)(0),[Or,gi]=(0,ce.useState)(null),[Lr,yi]=(0,ce.useState)(null);(0,ce.useEffect)(()=>{Fr(1),Ln(1)},[bt]);const Fr=ri=>ba(void 0,null,function*(){const Di=yield Lt({container_type:"QuestionSolutionArticle",container_identifier:bt,limit:5,page:ri});Di!=null&&Di.comments&&(Pn((Di==null?void 0:Di.comments)||[]),Ln(ri),ci(Di==null?void 0:Di.disscuss_count))}),zi=()=>ba(void 0,null,function*(){if(Xn===""){te.ZP.error("\u8BF7\u8F93\u5165\u5185\u5BB9");return}const ri=yield Sn({comments:{content:Xn},container_type:"QuestionSolutionArticle",container_identifier:bt});ri!=null&&ri.discuss&&(On(""),Fr(pn),wt())}),ni=(ri,Di,tr)=>ba(void 0,null,function*(){const Bi=yield sn({container_type:"QuestionSolutionArticle",container_identifier:bt,comments:{content:Di,parent_id:ri}});gi(null),yi(null),Fr(pn)}),Ei=ri=>ba(void 0,null,function*(){const Di=yield Kt(ri);Fr(pn)}),Wi=ri=>{Ln(ri),Fr(ri)};return ce.createElement("div",{className:Co.discuss},ce.createElement("aside",{className:Co.reply,style:{borderWidth:Jn?1:0}},ce.createElement(Fn.Z,{defaultValue:Xn,id:"writeForumsReviewId",onChange:ri=>{On(ri)},placeholder:"\u6211\u8981\u56DE\u590D...",height:240}),ce.createElement(Oo.Z,null,ce.createElement(Ki.Z,{flex:"1"}),ce.createElement(Ki.Z,null,ce.createElement(Ve.ZP,{type:"primary",size:"middle",onClick:()=>zi()},"\u53D1\u9001")))),xn==null?void 0:xn.map(ri=>ce.createElement(qa,{secondReply:Or,setSecondReply:gi,thirdlyReply:Lr,setThirdlyReply:yi,key:ri.id,data:ri,onReplyDiscuss:ni,onPlusDiscuss:Ei})),ce.createElement(dt.Z,{className:Co.pagination,showTotal:ri=>ce.createElement("span",{style:{color:"#656F87"}},"\u5171",ce.createElement("span",{className:"c-light-primary"},ri),"\u6761\u6570\u636E"),current:pn,onChange:Wi,total:Jn,showSizeChanger:!1,showQuickJumper:!0,hideOnSinglePage:!0,pageSize:5}))},Ha=be(93152),Ra=Object.defineProperty,pa=Object.getOwnPropertySymbols,Wa=Object.prototype.hasOwnProperty,Ja=Object.prototype.propertyIsEnumerable,Sa=(ft,bt,wt)=>bt in ft?Ra(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,wa=(ft,bt)=>{for(var wt in bt||(bt={}))Wa.call(bt,wt)&&Sa(ft,wt,bt[wt]);if(pa)for(var wt of pa(bt))Ja.call(bt,wt)&&Sa(ft,wt,bt[wt]);return ft},ua=(ft,bt,wt)=>new Promise((Xn,On)=>{var pn=Pn=>{try{xn(wt.next(Pn))}catch(Jn){On(Jn)}},Ln=Pn=>{try{xn(wt.throw(Pn))}catch(Jn){On(Jn)}},xn=Pn=>Pn.done?Xn(Pn.value):Promise.resolve(Pn.value).then(pn,Ln);xn((wt=wt.apply(ft,bt)).next())}),qi=({active:ft,identifier:bt,onAssist:wt,onEdit:Xn,onArticlesSkip:On,onClose:pn,onOk:Ln,onDelete:xn,detailsIndex:Pn,btnShowStatus:Jn})=>{var ci,Or,gi,Lr,yi,Fr,zi,ni,Ei,Wi;const[ri,Di]=(0,ce.useState)(!0),[tr,Bi]=(0,ce.useState)({});(0,ce.useEffect)(()=>{ft&&bi()},[ft,Pn]);const bi=(si=!0)=>ua(void 0,null,function*(){si&&Di(!0);const xr=yield(0,E.wO)(bt,{active:ft});(xr==null?void 0:xr.status)===0&&Bi((xr==null?void 0:xr.data)||{}),Di(!1)}),Ri=si=>ua(void 0,null,function*(){const xr=yield(0,E.qe)(bt,wa({active:ft},si));(xr==null?void 0:xr.status)===0&&(bi(!1),Ln())}),No=si=>ua(void 0,null,function*(){(yield(0,E.Rg)(bt,{active:si==null?void 0:si.id})).status===0&&(bi(!1),Ln())}),mr=si=>{le.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",icon:null,className:"custom-modal-divider",content:"\u786E\u8BA4\u8981\u5220\u9664\u8BE5\u9898\u89E3\u5417?",onOk:()=>xn(si)})},Zi=()=>{bi(!1),Ln()};return ce.createElement("div",{className:di.listDetails},ce.createElement(po.Z,{className:"pt20 pl20 pr20",loading:ri,active:!0,paragraph:{rows:5}},ce.createElement("div",{className:di.head},ce.createElement("div",{className:di.name},ce.createElement("div",{title:tr==null?void 0:tr.name,className:di.title},tr==null?void 0:tr.name),(tr==null?void 0:tr.is_authority)&&ce.createElement("div",{className:di.b},"\u5B98\u65B9"),(tr==null?void 0:tr.is_excellent)&&ce.createElement("div",{className:di.a},"\u7CBE\u9009")),ce.createElement("div",{className:di.tag},ce.createElement("img",{src:z.Z.IMG_SERVER+"/images/"+(tr==null?void 0:tr.image_url)}),ce.createElement("div",{className:"c-grey-333 ml5 mr20 font14"},tr==null?void 0:tr.username),ce.createElement("div",{style:{display:"inline-block",marginBottom:-2},className:"c-grey-999 mr20 font12"},"\u53D1\u5E03\u4E8E",Ae()(tr==null?void 0:tr.created_at).format("YYYY-MM-DD")),ce.createElement("span",null,ce.createElement("img",{src:Vt}),ce.createElement("span",null,tr==null?void 0:tr.praises_count)),ce.createElement("span",null,ce.createElement("img",{src:Si}),ce.createElement("span",null,tr==null?void 0:tr.discusses_count)),ce.createElement("span",null,ce.createElement("img",{src:qr}),ce.createElement("span",null,tr==null?void 0:tr.viewed_count)),ce.createElement("div",{className:di.btn},((0,Gn.Ny)()||(tr==null?void 0:tr.is_self))&&ce.createElement(ce.Fragment,null,ce.createElement(Ve.ZP,{onClick:()=>mr(tr),type:"primary",ghost:!0},"\u5220\u9664"),ce.createElement(Ve.ZP,{onClick:()=>Xn(tr),type:"primary",ghost:!0},"\u7F16\u8F91")),(0,Gn.Ny)()&&ce.createElement(Ve.ZP,{onClick:()=>Ri({is_authority:!(tr!=null&&tr.is_authority)}),type:"primary"},ce.createElement("img",{src:Oi}),tr!=null&&tr.is_authority?"\u53D6\u6D88":"\u8BBE\u4E3A","\u5B98\u65B9"),(0,Gn.Ny)()&&ce.createElement(Ve.ZP,{onClick:()=>Ri({is_excellent:!(tr!=null&&tr.is_excellent)}),type:"primary"},ce.createElement("img",{src:Fi}),tr!=null&&tr.is_excellent?"\u53D6\u6D88":"\u8BBE\u4E3A","\u7CBE\u9009")))),ce.createElement("div",{className:di.scroll},((Or=(ci=tr==null?void 0:tr.videos)==null?void 0:ci[0])==null?void 0:Or.id)&&ce.createElement("div",{className:di.video},ce.createElement(ee.Z,{tip:"\u6B63\u5728\u8F6C\u7801\uFF0C\u8BF7\u7A0D\u7B49...",spinning:!((Lr=(gi=tr==null?void 0:tr.videos)==null?void 0:gi[0])!=null&&Lr.transcoded)},ce.createElement(Ha.Z,{poster:(Fr=(yi=tr==null?void 0:tr.videos)==null?void 0:yi[0])==null?void 0:Fr.cover_url,src:((ni=(zi=tr==null?void 0:tr.videos)==null?void 0:zi[0])==null?void 0:ni.play_url)||"",videoId:(Wi=(Ei=tr==null?void 0:tr.videos)==null?void 0:Ei[0])==null?void 0:Wi.id,logWatchHistory:()=>{}}))),ce.createElement(Le.Z,{className:di.html,value:(tr==null?void 0:tr.content)||""}),ce.createElement("div",{onClick:()=>No(tr),className:di.g},ce.createElement("img",{className:"mr10",src:(tr!=null&&tr.user_liker,Ho)}),ce.createElement("span",null,tr==null?void 0:tr.praises_count)),ce.createElement(Ma,{onOk:Zi,active:ft,identifier:bt})),ce.createElement("div",{className:di.btns},ce.createElement(Ve.ZP,{onClick:()=>pn(),type:"primary",ghost:!0},"\u5173\u95ED"),Jn[0]&&ce.createElement(Ve.ZP,{onClick:si=>On(si,"prev"),style:{marginLeft:20},type:"primary"},"\u4E0A\u4E00\u9898\u89E3"),Jn[1]&&ce.createElement(Ve.ZP,{onClick:si=>On(si,"next"),style:{marginLeft:20},type:"primary"},"\u4E0B\u4E00\u9898\u89E3"))))},vi=Object.defineProperty,ai=Object.getOwnPropertySymbols,ro=Object.prototype.hasOwnProperty,Ji=Object.prototype.propertyIsEnumerable,io=(ft,bt,wt)=>bt in ft?vi(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,co=(ft,bt)=>{for(var wt in bt||(bt={}))ro.call(bt,wt)&&io(ft,wt,bt[wt]);if(ai)for(var wt of ai(bt))Ji.call(bt,wt)&&io(ft,wt,bt[wt]);return ft};const na=ft=>React.createElement("svg",co({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:16,height:16},ft),React.createElement("defs",null,React.createElement("path",{id:"a_svg__a",d:"M13.727 0C14.983 0 16 .895 16 2v12c0 1.105-1.017 2-2.273 2H2.273C1.017 16 0 15.105 0 14V2C0 .895 1.017 0 2.273 0h11.454ZM7.464 11H2.955c-.266 0-.513.19-.646.5s-.133.69 0 1c.133.31.38.5.646.5h4.509c.411 0 .745-.448.745-1s-.334-1-.745-1Zm4-3.5H2.955c-.411 0-.745.448-.745 1s.334 1 .745 1h8.509c.412 0 .746-.448.746-1s-.334-1-.746-1ZM3.71 2.75a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"})),React.createElement("g",{fill:"none",fillRule:"evenodd"},React.createElement("mask",{id:"a_svg__b",fill:"#fff"},React.createElement("use",{xlinkHref:"#a_svg__a"})),React.createElement("use",{fill:"#7DC1FF",fillRule:"nonzero",xlinkHref:"#a_svg__a"}),React.createElement("circle",{cx:1.5,cy:.5,r:16.5,fill:"#A3D3FF",fillRule:"nonzero",mask:"url(#a_svg__b)"}),React.createElement("ellipse",{cx:1.5,cy:-.5,fill:"#C1E2FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12}),React.createElement("ellipse",{cx:-2.5,cy:-4,fill:"#EEF7FF",fillRule:"nonzero",mask:"url(#a_svg__b)",rx:12.5,ry:12})));var Go="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB3aWR0aD0iMTYiIGhlaWdodD0iMTYiPjxkZWZzPjxwYXRoIGlkPSJhIiBkPSJNMTMuNzI3IDBDMTQuOTgzIDAgMTYgLjg5NSAxNiAydjEyYzAgMS4xMDUtMS4wMTcgMi0yLjI3MyAySDIuMjczQzEuMDE3IDE2IDAgMTUuMTA1IDAgMTRWMkMwIC44OTUgMS4wMTcgMCAyLjI3MyAwaDExLjQ1NFpNNy40NjQgMTFIMi45NTVjLS4yNjYgMC0uNTEzLjE5LS42NDYuNXMtLjEzMy42OSAwIDFjLjEzMy4zMS4zOC41LjY0Ni41aDQuNTA5Yy40MTEgMCAuNzQ1LS40NDguNzQ1LTFzLS4zMzQtMS0uNzQ1LTFabTQtMy41SDIuOTU1Yy0uNDExIDAtLjc0NS40NDgtLjc0NSAxcy4zMzQgMSAuNzQ1IDFoOC41MDljLjQxMiAwIC43NDYtLjQ0OC43NDYtMXMtLjMzNC0xLS43NDYtMVpNMy43MSAyLjc1YTEuNSAxLjUgMCAxIDAgMCAzIDEuNSAxLjUgMCAwIDAgMC0zWiIvPjwvZGVmcz48ZyBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPjxtYXNrIGlkPSJiIiBmaWxsPSIjZmZmIj48dXNlIHhsaW5rOmhyZWY9IiNhIi8+PC9tYXNrPjx1c2UgZmlsbD0iIzdEQzFGRiIgZmlsbC1ydWxlPSJub256ZXJvIiB4bGluazpocmVmPSIjYSIvPjxjaXJjbGUgY3g9IjEuNSIgY3k9Ii41IiByPSIxNi41IiBmaWxsPSIjQTNEM0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiLz48ZWxsaXBzZSBjeD0iMS41IiBjeT0iLS41IiBmaWxsPSIjQzFFMkZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48ZWxsaXBzZSBjeD0iLTIuNSIgY3k9Ii00IiBmaWxsPSIjRUVGN0ZGIiBmaWxsLXJ1bGU9Im5vbnplcm8iIG1hc2s9InVybCgjYikiIHJ4PSIxMi41IiByeT0iMTIiLz48L2c+PC9zdmc+",ca=be(59477),Qi=be(89489),yo=Object.defineProperty,Fo=Object.defineProperties,Xo=Object.getOwnPropertyDescriptors,Ia=Object.getOwnPropertySymbols,ds=Object.prototype.hasOwnProperty,fs=Object.prototype.propertyIsEnumerable,da=(ft,bt,wt)=>bt in ft?yo(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,_o=(ft,bt)=>{for(var wt in bt||(bt={}))ds.call(bt,wt)&&da(ft,wt,bt[wt]);if(Ia)for(var wt of Ia(bt))fs.call(bt,wt)&&da(ft,wt,bt[wt]);return ft},Eo=(ft,bt)=>Fo(ft,Xo(bt)),ko=(ft,bt,wt)=>new Promise((Xn,On)=>{var pn=Pn=>{try{xn(wt.next(Pn))}catch(Jn){On(Jn)}},Ln=Pn=>{try{xn(wt.throw(Pn))}catch(Jn){On(Jn)}},xn=Pn=>Pn.done?Xn(Pn.value):Promise.resolve(Pn.value).then(pn,Ln);xn((wt=wt.apply(ft,bt)).next())}),Qa=({identifier:ft,tabStatus:bt,setFilterListTotal:wt,setListStatus:Xn})=>{const On={page:1,limit:10,total:0,search:"",save_search:"",sort_by:"updated_at",sort_direction:null};let[pn,Ln]=(0,ce.useState)(_o({},On));const[xn,Pn]=(0,ce.useState)(!1),[Jn,ci]=(0,ce.useState)(0),[Or,gi]=(0,ce.useState)(1),[Lr,yi]=(0,ce.useState)(null),[Fr,zi]=(0,ce.useState)([]),[ni,Ei]=(0,ce.useState)([!0,!0]),[Wi,ri]=(0,ce.useState)(0),Di=(0,ce.useRef)(null);(0,ce.useEffect)(()=>{jr()},[bt]),(0,ce.useEffect)(()=>{tr()},[Lr]),(0,ce.useEffect)(()=>{bi(_o({},On)),jr()},[ft]),(0,ce.useEffect)(()=>(window.addEventListener("resize",Bi),Xn(Wi),()=>{window.removeEventListener("resize",Bi)}),[Wi]);const tr=()=>ko(void 0,null,function*(){if(!Lr){Ei([!0,!0]);return}const ii=[!0,!0],Ai=Fr==null?void 0:Fr.findIndex(oo=>oo.id===Lr);Ai===0&&pn.page===1&&(ii[0]=!1),(pn.page-1)*pn.limit+(Ai+1)===pn.total&&(ii[1]=!1),Ei(ii)}),Bi=()=>{var ii;if(Wi){const Ai=window.innerWidth-((ii=Di.current)==null?void 0:ii.clientWidth);ci(Ai)}},bi=ii=>ko(void 0,null,function*(){var Ai,oo,Ba;Pn(!0);const jo=yield(0,E.WH)(ft,ii);return(jo==null?void 0:jo.status)===0&&(zi(((Ai=jo==null?void 0:jo.data)==null?void 0:Ai.articles)||[]),Ln(Eo(_o({},ii),{total:(oo=jo==null?void 0:jo.data)==null?void 0:oo.articles_count})),wt((Ba=jo==null?void 0:jo.data)==null?void 0:Ba.articles_count)),Pn(!1),jo}),Ri=()=>{(pn==null?void 0:pn.sort_direction)===null?pn.sort_direction="asc":(pn==null?void 0:pn.sort_direction)==="asc"?pn.sort_direction="desc":(pn==null?void 0:pn.sort_direction)==="desc"&&(pn.sort_direction=null),pn.page=1,jr(),Ln(_o({},pn)),bi(pn)},No=()=>{pn.page=1,pn.search=pn==null?void 0:pn.save_search,jr(),Ln(_o({},pn)),bi(pn)},mr=()=>{var ii;const Ai=document.getElementsByClassName("btn-resize");Ai[0].style.visibility="hidden";const oo=window.innerWidth-((ii=Di.current)==null?void 0:ii.clientWidth);ci(oo)},Zi=()=>{mr(),ri(1)},si=ii=>{mr(),yi(ii==null?void 0:ii.id),ri(3)},xr=ii=>{mr(),yi(ii==null?void 0:ii.id),ri(2)},jr=()=>{const ii=document.getElementsByClassName("btn-resize");ii[0].style.visibility="visible",ci(0),ri(0),yi(null)},mi=ii=>{ri(3),yi(ii),pn.page=1,Ln(_o({},pn)),bi(pn)},Rr=ii=>{ri(3),yi(ii),Ln(_o({},pn)),bi(pn)},qo=ii=>{Ln(_o({},pn)),bi(pn)},so=ii=>ko(void 0,null,function*(){(yield(0,E.Rg)(ft,{active:ii==null?void 0:ii.id})).status===0&&(bi(pn),gi(Or+1))}),oa=ii=>ko(void 0,null,function*(){(yield(0,E.rL)(ft,{active:ii==null?void 0:ii.id})).status===0&&(bi(pn),gi(Or+1))}),os=ii=>ko(void 0,null,function*(){(yield(0,E.de)(ft,{active:ii==null?void 0:ii.id})).status===0&&(jr(),bi(pn))}),aa=ii=>{pn.page=ii,Ln(_o({},pn)),bi(pn)},ga=(ii,Ai)=>ko(void 0,null,function*(){var oo,Ba,jo,Cs;const Jo=Fr==null?void 0:Fr.findIndex(lo=>lo.id===Lr);if(console.log(Jo,Ai,22),Ai==="prev"){if(Jo===void 0){te.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Jo===0){if(pn.page===1){te.ZP.warning("\u4E0A\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(pn.page!==1){pn.page=pn.page-1,Ln(_o({},pn));const lo=yield bi(pn);if((lo==null?void 0:lo.status)===0){const Fa=(jo=lo==null?void 0:lo.data)==null?void 0:jo.articles[((Ba=(oo=lo==null?void 0:lo.data)==null?void 0:oo.articles)==null?void 0:Ba.length)-1];yi(Fa==null?void 0:Fa.id),console.log(ii.target,555)}}}else{const lo=Fr[Jo-1];yi(lo==null?void 0:lo.id)}}if(Ai==="next"){if(Jo===void 0){te.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if((pn.page-1)*pn.limit+(Jo+1)===pn.total){te.ZP.warning("\u4E0B\u4E00\u9898\u89E3\u4E0D\u5B58\u5728");return}if(Jo+1===pn.limit){pn.page=pn.page+1,Ln(_o({},pn));const lo=yield bi(pn);if((lo==null?void 0:lo.status)===0){const Fa=(Cs=lo==null?void 0:lo.data)==null?void 0:Cs.articles[0];yi(Fa==null?void 0:Fa.id)}}else{const lo=Fr[Jo+1];yi(lo==null?void 0:lo.id)}}});return ce.createElement("div",{className:kt.wrap,ref:Di},ce.createElement("div",{className:kt.head},ce.createElement("div",{className:kt.sort,onClick:Ri},ce.createElement("span",null,"\u6700\u65B0"),ce.createElement("aside",null,ce.createElement(ca.Z,{style:{color:(pn==null?void 0:pn.sort_direction)==="asc"?"#0152d9":"#bfbfbf"}}),ce.createElement(Qi.Z,{style:{color:(pn==null?void 0:pn.sort_direction)==="desc"?"#0152d9":"#bfbfbf"}}))),ce.createElement(Ge.default.Search,{value:pn.save_search,className:kt["oj-width-input"],placeholder:"\u641C\u7D22\u9898\u89E3",onChange:ii=>{pn.save_search=ii.target.value,Ln(_o({},pn))},onSearch:No}),ce.createElement("div",{onClick:Zi,className:kt.btn},ce.createElement("img",{src:Go}),"\u5199\u9898\u89E3")),ce.createElement("div",{className:kt.listWarp},ce.createElement(ee.Z,{spinning:xn,className:"mt20"},Fr==null?void 0:Fr.map((ii,Ai)=>{let oo=!0;return Ai+1===Fr.length&&Ai!==0&&(oo=!1),ce.createElement(Hi,{active:Lr,key:ii.id,data:ii,showLine:oo,onClick:si,onAssist:so,onHide:oa})}),(Fr==null?void 0:Fr.length)===0&&ce.createElement(Ke.Z,{customText:"\u6682\u65F6\u8FD8\u6CA1\u6709\u76F8\u5173\u6570\u636E\u54E6!"}))),ce.createElement(dt.Z,{className:kt.pagination,showTotal:ii=>ce.createElement("span",{style:{color:"#656F87"}},"\u5171",ce.createElement("span",{className:"c-light-primary"},ii),"\u6761\u6570\u636E"),total:pn.total,showSizeChanger:!1,current:pn==null?void 0:pn.page,onChange:aa,hideOnSinglePage:!0,showQuickJumper:!0}),Wi>0&&ce.createElement("div",{className:kt.fixedRight,style:{width:Jn}},Wi===1&&ce.createElement(ti,{identifier:ft,onClose:jr,onOk:mi}),Wi===2&&ce.createElement(ti,{active:Lr,identifier:ft,onClose:jr,onOk:Rr}),Wi===3&&ce.createElement(qi,{btnShowStatus:ni,onArticlesSkip:ga,detailsIndex:Or,active:Lr,identifier:ft,onClose:jr,onOk:qo,onEdit:xr,onAssist:so,onDelete:os})))},xa={flex_box_center:"flex_box_center___BbEkt",flex_space_between:"flex_space_between___v3cDl",flex_box_vertical_center:"flex_box_vertical_center___wUFLn",flex_box_center_end:"flex_box_center_end___Tdr08",flex_box_column:"flex_box_column___fYHlj",wrap:"wrap___UAZFM",head:"head___Nl6hk",title:"title___Ir573",content:"content___xUewa",list:"list___oi2ig",footer:"footer___V3bwQ"},_s=Object.defineProperty,Oa=Object.defineProperties,bs=Object.getOwnPropertyDescriptors,$a=Object.getOwnPropertySymbols,Ca=Object.prototype.hasOwnProperty,Ss=Object.prototype.propertyIsEnumerable,es=(ft,bt,wt)=>bt in ft?_s(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,ra=(ft,bt)=>{for(var wt in bt||(bt={}))Ca.call(bt,wt)&&es(ft,wt,bt[wt]);if($a)for(var wt of $a(bt))Ss.call(bt,wt)&&es(ft,wt,bt[wt]);return ft},Za=(ft,bt)=>Oa(ft,bs(bt)),Ea=(ft,bt,wt)=>new Promise((Xn,On)=>{var pn=Pn=>{try{xn(wt.next(Pn))}catch(Jn){On(Jn)}},Ln=Pn=>{try{xn(wt.throw(Pn))}catch(Jn){On(Jn)}},xn=Pn=>Pn.done?Xn(Pn.value):Promise.resolve(Pn.value).then(pn,Ln);xn((wt=wt.apply(ft,bt)).next())}),ts=({visible:ft,onVisible:bt,value:wt,onChange:Xn,setIndex:On})=>{var pn;const Ln={page:1,per_page:30,total:0,tag_discipline_id:[],search:"",save_search:"",difficulty:null};let[xn,Pn]=(0,ce.useState)(Ln);const[Jn,ci]=(0,ce.useState)([]),[Or,gi]=(0,ce.useState)([]),[Lr,yi]=(0,ce.useState)(!1),Fr=(0,ce.useRef)([]),zi=(0,ce.useRef)(null),ni=(0,ue.useParams)();(0,ce.useEffect)(()=>(ni!=null&&ni.id&&(zi.current=setInterval(()=>{Ei(30)},3e4)),()=>{clearInterval(zi.current)}),[]);const Ei=mr=>Ea(void 0,null,function*(){const Zi=yield(0,E.uc)(ni==null?void 0:ni.id,{practice_time:mr})});(0,ce.useEffect)(()=>{bi(xn),tr()},[]),(0,ce.useEffect)(()=>(window.addEventListener("click",ri),()=>{window.removeEventListener("click",ri)}),[ni==null?void 0:ni.save_identifier,ft]),(0,ce.useEffect)(()=>{const mr=Fr.current.findIndex(mi=>mi.identifier===(ni==null?void 0:ni.save_identifier)),Zi=Fr.current[mr-1],si=Fr.current[mr+1],xr=document.getElementById("oj-prev"),jr=document.getElementById("oj-next");Zi?xr.style.display="block":xr.style.display="none",si?jr.style.display="block":jr.style.display="none"},[ni==null?void 0:ni.save_identifier,Fr.current]);const Wi=(mr,Zi)=>{if(mr.id===Zi)return mr;for(let si=0,xr=mr;xr=xr.parentNode;si++){if(xr.id===Zi)return xr;if(xr==document.documentElement)return!1}},ri=mr=>Ea(void 0,null,function*(){!Wi(mr.target,"oj-drawer")&&ft&&bt(!1);const Zi=Fr.current.findIndex(jr=>jr.identifier===(ni==null?void 0:ni.save_identifier)),si=Fr.current[Zi-1],xr=Fr.current[Zi+1];if(mr.target.id==="oj-prev"){if(!si||Zi===-1){te.ZP.warning("\u4E0A\u4E00\u9898\u4E0D\u5B58\u5728");return}mr.target.style.pointerEvents="none",mr.target.style.cursor="not-allowed",yield Ri(si==null?void 0:si.identifier),On("0"),setTimeout(()=>{mr.target.style.pointerEvents="auto",mr.target.style.cursor="pointer"},400)}if(mr.target.id==="oj-next"||mr.target.id==="oj-modal-next"){if(!xr||Zi===-1){te.ZP.warning("\u4E0B\u4E00\u9898\u4E0D\u5B58\u5728");return}mr.target.style.pointerEvents="none",mr.target.style.cursor="not-allowed",yield Ri(xr==null?void 0:xr.identifier),On("0"),setTimeout(()=>{mr.target.style.pointerEvents="auto",mr.target.style.cursor="pointer"},400)}});(0,ce.useEffect)(()=>{Xn(ni==null?void 0:ni.save_identifier);const mr=Or.findIndex(Zi=>Zi.some(si=>si.identifier===(ni==null?void 0:ni.save_identifier)));Pn(mr===-1?Za(ra({},xn),{page:1}):Za(ra({},xn),{page:mr+1}))},[ni==null?void 0:ni.save_identifier,Or]);const Di=mr=>{xn.page=1,xn.tag_discipline_id=mr,Pn(ra({},xn)),bi(xn)},tr=()=>Ea(void 0,null,function*(){const mr=yield(0,Xt.ZP)("/api/tag_disciplines.json",{method:"get",params:{target:"practice",position:"index"}});ci(mr.tag_disciplines||[])}),Bi=mr=>{xn.page=1,xn.difficulty=typeof mr=="number"?mr:null,Pn(ra({},xn)),bi(xn)},bi=mr=>Ea(void 0,null,function*(){var Zi,si;yi(!0);const xr=yield(0,E.KC)(mr);if(xr!=null&&xr.practices_list){for(var jr=(Zi=xr==null?void 0:xr.practices_list)==null?void 0:Zi.length,mi=[],Rr=0;Rr<jr;Rr+=xn==null?void 0:xn.per_page)mi.push((si=xr==null?void 0:xr.practices_list)==null?void 0:si.slice(Rr,Rr+(xn==null?void 0:xn.per_page)));Pn(Za(ra({},xn),{total:xr==null?void 0:xr.practices_count})),Fr.current=(xr==null?void 0:xr.practices_list)||[],gi(mi)}yi(!1)}),Ri=(mr,Zi)=>Ea(void 0,null,function*(){const si=yield(0,Xt.ZP)(`/api/practices/${mr}/start`,{method:"get"});(si==null?void 0:si.status)===0&&ue.history.push(`/problems/${si==null?void 0:si.identifier}/oj/${mr}`)}),No=mr=>{xn.page=mr,Pn(ra({},xn))};return ce.createElement("div",{className:xa.wrap,id:"oj-drawer",style:{left:ft?0:-700}},ce.createElement("div",{className:xa.head},ce.createElement("div",{className:xa.title},"\u9898\u76EE\u5217\u8868"),ce.createElement(Ge.default.Search,{value:xn==null?void 0:xn.save_search,placeholder:"\u8BF7\u8F93\u5165\u9898\u76EE\u540D\u79F0\u641C\u7D22",style:{width:180,marginLeft:"auto",marginRight:10},onChange:mr=>{xn.save_search=mr.target.value,Pn(ra({},xn))},onSearch:()=>{xn.page=1,xn.search=xn.save_search,Pn(ra({},xn)),bi(xn)}}),ce.createElement(ne.default,{value:xn==null?void 0:xn.tag_discipline_id,style:{width:210},mode:"multiple",placeholder:"\u9009\u62E9\u77E5\u8BC6\u70B9",showSearch:!1,showArrow:!0,getPopupContainer:mr=>mr.parentNode,maxTagTextLength:2,maxTagCount:2,onChange:Di},Jn.map(mr=>ce.createElement(ne.default.Option,{key:mr.id,value:mr.id},mr.name))),ce.createElement(ne.default,{style:{width:70,marginLeft:10},allowClear:!0,placeholder:"\u96BE\u5EA6",getPopupContainer:mr=>mr.parentNode,value:xn==null?void 0:xn.difficulty,onChange:Bi},ce.createElement(ne.default.Option,{value:1},"\u7B80\u5355"),ce.createElement(ne.default.Option,{value:2},"\u9002\u4E2D"),ce.createElement(ne.default.Option,{value:3},"\u56F0\u96BE"))),ce.createElement("div",{className:xa.content},ce.createElement(ee.Z,{spinning:Lr},(pn=Or==null?void 0:Or[xn.page-1])==null?void 0:pn.map(mr=>ce.createElement("div",{key:mr.identifier,className:xa.list,onClick:Zi=>Ri(mr.identifier,Zi)},ce.createElement("i",{style:{visibility:wt===mr.identifier?"visible":"hidden"},className:"iconfont icon-wancheng1 c-green-29b"}),ce.createElement("span",{style:{fontWeight:wt===mr.identifier?"bold":400,color:wt===mr.identifier?"#ffffff":"#bac4cd"},title:mr==null?void 0:mr.name},mr.name),(mr==null?void 0:mr.difficulty)===1&&ce.createElement("b",{style:{color:"#2FA34F"}},"\u7B80\u5355"),(mr==null?void 0:mr.difficulty)===2&&ce.createElement("b",{style:{color:"#0152d9"}},"\u9002\u4E2D"),(mr==null?void 0:mr.difficulty)===3&&ce.createElement("b",{style:{color:"#FA6400"}},"\u56F0\u96BE"))))),ce.createElement("div",{className:xa.footer},ce.createElement(dt.Z,{showTotal:mr=>ce.createElement("span",{style:{color:"#656F87"}},"\u5171",ce.createElement("span",{className:"c-light-primary"},mr),"\u6761\u6570\u636E"),total:xn.total,pageSize:xn==null?void 0:xn.per_page,current:xn==null?void 0:xn.page,showSizeChanger:!1,onChange:No,showQuickJumper:!0,hideOnSinglePage:!0})))},hs=({hack:ft,onTriggerPraise:bt,topicId:wt,page:Xn,onPageChange:On,user:pn,submitRecords:Ln,submitting:xn,submitResult:Pn})=>{const[Jn]=(0,ue.useSearchParams)(),ci=(0,ue.useLocation)(),[Or,gi]=(0,ce.useState)(Jn.get("tab")||"0"),[Lr,yi]=(0,ce.useState)(0),[Fr,zi]=(0,ce.useState)(0),[ni,Ei]=(0,ce.useState)(0),[Wi,ri]=(0,ce.useState)(),[Di,tr]=(0,ce.useState)(!1);function Bi(Ri){const No=Ri.target.id;if(Or==="3"&&No!==Or&&(Fr===1||Fr===2)){le.default.confirm({centered:!0,width:500,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u6CE8\u610F",icon:null,className:"custom-modal-divider",content:"\u60A8\u6B63\u5728\u7F16\u5199\u9898\u89E3\uFF0C\u70B9\u51FB\u5173\u95ED\u540E\uFF0C\u60A8\u7684\u9898\u89E3\u5185\u5BB9\u5C06\u4E0D\u4F1A\u8FDB\u884C\u4FDD\u5B58\u3002",onOk:()=>{gi(No)}});return}gi(No)}(0,ce.useEffect)(()=>tt.Z.subscribe("to-commit-info",()=>{gi("1")}),[]);function bi(){gi("2")}return ce.createElement("div",{className:pt["left-panel"]},ce.createElement("ul",{className:`${pt["s-navs"]} ${pt["bg-white"]} ${pt.b1}`},ce.createElement("li",{className:"mr40 current"},ce.createElement("img",{onClick:()=>tr(!0),src:yt})),ce.createElement("li",{className:pt["oj-mr"]},ce.createElement("a",{className:Or==="0"?pt.active:"",id:"0",onClick:Bi},"\u4EFB\u52A1\u63CF\u8FF0")),ce.createElement("li",{className:pt["oj-mr"]},ce.createElement("a",{className:Or==="3"?pt.active:"",id:"3",onClick:Bi},"\u9898\u89E3",ni?`(${ni})`:"")),ce.createElement("li",{className:pt["oj-mr"]},ce.createElement("a",{className:Or==="2"?pt.active:"",id:"2",onClick:Bi},"\u8BC4\u8BBA",Lr?`(${Lr})`:"")),ce.createElement("li",null,ce.createElement("a",{className:Or==="1"?pt.active:"",id:"1",onClick:Bi},"\u63D0\u4EA4\u8BB0\u5F55"))),ce.createElement("div",{className:`${pt["tab-panel-body"]} ${Or==="0"?"":"hide"}`,style:{padding:"0 0 0 16px"}},ce.createElement(Re,{hack:ft,onTriggerPraise:bt,toDiscuss:bi})),ce.createElement("div",{className:`${pt["tab-panel-body"]} ${Or==="1"?"":"hide"}`},Ln!=null&&Ln.records_count?ce.createElement(Be,{page:Xn,onPageChange:On,topicId:wt,submitting:xn,submitRecords:Ln,submitResult:Pn}):ce.createElement(Ke.Z,null)),ce.createElement("div",{className:`${pt["tab-panel-body"]} ${Or==="2"?"":"hide"}`,style:{padding:0}},ce.createElement(Nt,{setDiscussTotal:yi,user:pn,identifier:ft.identifier,hack:ft,onTriggerPraise:bt})),ce.createElement("div",{className:`${pt["tab-panel-body"]} ${Or==="3"?"":"hide"}`,style:{padding:0}},ce.createElement(Qa,{setListStatus:zi,setFilterListTotal:Ei,tabStatus:Or,identifier:ft.identifier})),ce.createElement(ts,{visible:Di,setIndex:gi,onVisible:Ri=>tr(Ri),value:Wi,onChange:Ri=>ri(Ri)}))},ka=be(38273),ps=be(62522),ms=be(60515),ws=be(88977),ns=be(89392),rs=be.n(ns),La=be(56102),Br=be(59301),xs=Object.defineProperty,Pa=Object.defineProperties,vs=Object.getOwnPropertyDescriptors,ia=Object.getOwnPropertySymbols,is=Object.prototype.hasOwnProperty,ma=Object.prototype.propertyIsEnumerable,hi=(ft,bt,wt)=>bt in ft?xs(ft,bt,{enumerable:!0,configurable:!0,writable:!0,value:wt}):ft[bt]=wt,yr=(ft,bt)=>{for(var wt in bt||(bt={}))is.call(bt,wt)&&hi(ft,wt,bt[wt]);if(ia)for(var wt of ia(bt))ma.call(bt,wt)&&hi(ft,wt,bt[wt]);return ft},Ci=(ft,bt)=>Pa(ft,vs(bt)),So=(ft,bt)=>{var wt={};for(var Xn in ft)is.call(ft,Xn)&&bt.indexOf(Xn)<0&&(wt[Xn]=ft[Xn]);if(ft!=null&&ia)for(var Xn of ia(ft))bt.indexOf(Xn)<0&&ma.call(ft,Xn)&&(wt[Xn]=ft[Xn]);return wt},Ni=(ft,bt,wt)=>new Promise((Xn,On)=>{var pn=Pn=>{try{xn(wt.next(Pn))}catch(Jn){On(Jn)}},Ln=Pn=>{try{xn(wt.throw(Pn))}catch(Jn){On(Jn)}},xn=Pn=>Pn.done?Xn(Pn.value):Promise.resolve(Pn.value).then(pn,Ln);xn((wt=wt.apply(ft,bt)).next())});const{Countdown:Na}=se.default,va={Java:"java",C:"c",Python:"py","C++":"c"};var Aa=(ft=>(ft[ft.SET_LOADING=0]="SET_LOADING",ft[ft.GET_DATA=1]="GET_DATA",ft[ft.GET_SUBMIT_RECORDS=2]="GET_SUBMIT_RECORDS",ft[ft.SET_DATA=3]="SET_DATA",ft[ft.SET_DEBUGING=4]="SET_DEBUGING",ft[ft.SET_SUBMITING=5]="SET_SUBMITING",ft[ft.SET_EXECUTE_MESSAGE=6]="SET_EXECUTE_MESSAGE",ft[ft.SET_EXECUTE_RESULT=7]="SET_EXECUTE_RESULT",ft[ft.SET_SUBMIT_RESULT=8]="SET_SUBMIT_RESULT",ft[ft.SET_SHOW_NOTE=9]="SET_SHOW_NOTE",ft[ft.SET_PAGE=10]="SET_PAGE",ft[ft.GET_LANGUAGE=11]="GET_LANGUAGE",ft[ft.GET_DRAWER=12]="GET_DRAWER",ft))(Aa||{});function Po(){return new Date().getTime()}const fa={loading:!0,data:void 0,showNote:!1,debugResult:void 0,submitResult:void 0,debuging:!1,submitting:!1,submitRecords:void 0,submitRecordPage:1,executingMessage:"",languageValue:"",languageList:[],drawerData:[]};function sl(ft,bt){switch(bt.type){case 1:return yr(yr({},ft),bt.payload);case 3:return Ci(yr({},ft),{data:bt.payload});case 0:return Ci(yr({},ft),{loading:bt.payload});case 11:return Ci(yr({},ft),{languageList:bt.payload});case 12:return Ci(yr({},ft),{drawerData:bt.payload});case 9:return Ci(yr({},ft),{showNote:bt.payload});case 4:return Ci(yr({},ft),{debuging:bt.payload});case 5:return Ci(yr({},ft),{submitting:bt.payload});case 2:return Ci(yr({},ft),{submitRecords:bt.payload});case 10:return Ci(yr({},ft),{submitRecordPage:bt.payload});case 6:return Ci(yr({},ft),{executingMessage:bt.payload});case 7:return yr(yr({},ft),bt.payload);case 8:return yr(yr({},ft),bt.payload);default:throw new Error}}var ll=({children:ft})=>{var bt,wt,Xn,On;const[pn,Ln]=(0,ce.useReducer)(sl,fa),{id:xn}=(0,ue.useParams)(),Pn=(0,ue.useLocation)(),[Jn]=(0,ue.useSearchParams)(),{languageValue:ci,languageList:Or,loading:gi,data:Lr,debugResult:yi,submitResult:Fr,submitRecords:zi,submitRecordPage:ni,showNote:Ei,debuging:Wi,submitting:ri,executingMessage:Di}=pn,[tr,Bi]=(0,ce.useState)("#FFF"),[bi,Ri]=(0,ce.useState)(null),[No,mr]=(0,ce.useState)({}),[Zi,si]=(0,ce.useState)(!1),xr=(0,ce.useRef)(null),jr=(0,ce.useRef)(null),mi=Lr==null?void 0:Lr.user,Rr=Lr==null?void 0:Lr.hack;(0,ce.useEffect)(()=>((0,ue.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!1}),(0,ue.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!0}),()=>{(0,ue.getDvaApp)()._store.dispatch({type:"globalSetting/headerFooterToggle",payload:!0}),(0,ue.getDvaApp)()._store.dispatch({type:"globalSetting/onlyShowBackTopToggle",payload:!1})}),[]),(0,ce.useEffect)(()=>{setTimeout(()=>{document.title="\u5728\u7EBF\u5237\u9898"},400)}),(0,ce.useEffect)(()=>{var fi;if(Zi){const $i=document.getElementById("oj-next"),Do=document.getElementById("oj-modal-next");((fi=$i==null?void 0:$i.style)==null?void 0:fi.display)==="none"?Do.style.display="none":Do.style.display="block"}},[Zi]),(0,ce.useEffect)(()=>{function fi(){return Ni(this,null,function*(){var $i,Do,ya;const fo=yield(0,E.fu)(xn);if(fo.status===401)document.location.href="/user/login";else{fo.hack=fo.practice,fo.hack.code=rt.Base64.decode(($i=fo==null?void 0:fo.hack)==null?void 0:$i.code);const _a=`${mi==null?void 0:mi.login}-language`;localStorage.getItem(_a)&&(fo.hack.language=localStorage.getItem(_a)),jr.current=rs().cloneDeep(fo),jr.current.language=(Do=fo==null?void 0:fo.hack)==null?void 0:Do.language,Ln({type:1,payload:{loading:!1,data:fo}}),Ln({type:8,payload:{languageValue:(ya=fo==null?void 0:fo.hack)==null?void 0:ya.language}})}})}xn&&fi()},[xn]),(0,ce.useEffect)(()=>{Ln({type:8,payload:{debugResult:void 0}}),oa(),si(!1)},[xn]),(0,ce.useEffect)(()=>{clearTimeout(xr.current)},[xn]),(0,ce.useEffect)(()=>{so()},[xn,ni]);const qo=()=>{window.parent.postMessage("backExercise","*")};function so(){return Ni(this,null,function*(){try{const fi=yield(0,E.zO)(xn,{limit:15,page:ni});Ln({type:2,payload:fi})}catch(fi){console.log(fi)}})}function oa(){return Ni(this,null,function*(){try{const fi=yield(0,E.dd)(xn);Ln({type:11,payload:fi==null?void 0:fi.data})}catch(fi){console.log(fi)}})}function os(fi){Ln({type:10,payload:fi})}function aa(fi){return Ni(this,null,function*(){var $i,Do,ya;const fo=((ya=(Do=($i=window==null?void 0:window.location)==null?void 0:$i.pathname)==null?void 0:Do.split("/"))==null?void 0:ya[2])||xn;return yield(0,E.n4)(fo,fi||{code:rt.Base64.encode(Rr.code),language:ci})})}function ga(){return Ni(this,null,function*(){var fi;if(!Rr.code||((fi=Rr.code)==null?void 0:fi.trim())===""){te.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}if(!ri){Ln({type:5,payload:!0});try{if(tt.Z.publish("to-commit-info"),(yield aa()).status===0){let Ka=function(){return Ni(this,null,function*(){const{status:Va,data:ja}=yield(0,E.rX)(xn,"submit"),as=Po()-ha>(fo*_a+3)*1e3;if(Va!==0&&!as&&setTimeout(Ka,1e3),as){le.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"}),Ln({type:5,payload:!1});return}if(Va===0){ja.status===2&&le.default.error({centered:!0,okText:"\u77E5\u9053\u5566",title:"\u8BC4\u6D4B\u4EE3\u7801\u8D85\u65F6"});const hl=yield(0,E.zO)(xn,{limit:15,page:ni});Ln({type:8,payload:Ci(yr({},pn),{submitResult:ja,submitting:!1,submitRecords:hl})}),(ja==null?void 0:ja.status)===0&&si(!0)}})},Do={};if((yield(0,E.bM)(xn,Do)).status===-1&&Jn.get("exercisesId")){window.parent.location.href=`/classrooms/${Jn.get("coursesId")}/exercise/${Jn.get("exercisesId")}/detail`;return}const{time_limit:fo,test_case_size:_a}=Rr,ha=Po();Ka()}}catch($i){Ln({type:5,payload:!1})}}})}function ii(){return Ni(this,null,function*(){var fi;if(!Rr.code||((fi=Rr.code)==null?void 0:fi.trim())===""){te.ZP.warning({key:"emptyContent",content:"\u4EE3\u7801\u4E0D\u80FD\u4E3A\u7A7A\uFF0C\u8BF7\u5148\u7F16\u5199\u4EE3\u7801\u540E\uFF0C\u518D\u8FDB\u884C\u8BC4\u6D4B\uFF01"});return}pn.debuging=!0,Ln({type:4,payload:!0});try{if((yield aa()).status===0){let ha=function(){return Ni(this,null,function*(){const{status:Ka,message:Va,data:ja}=yield(0,E.rX)(xn,"debug"),as=Po()-_a>(Do+3)*1e3;if(Ka!==0&&!as&&(Ln({type:6,payload:Va}),setTimeout(ha,1e3)),as){le.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Ln({type:4,payload:!1});return}Ka===0&&(Ln({type:4,payload:!1}),ja.status===2&&le.default.error({centered:!0,okText:"\u77E5\u9053\u5566",content:"\u8C03\u8BD5\u4EE3\u7801\u8D85\u65F6"}),Ln({type:7,payload:Ci(yr({},pn),{debugResult:ja,debuging:!1})}))})};const{time_limit:Do}=Rr;let ya={input:encodeURIComponent(Lr.test_case.input)};if((yield(0,E.MU)(xn,ya)).status===-1&&Jn.get("exercisesId")){window.parent.location.href=`/classrooms/${Jn.get("coursesId")}/exercise/${Jn.get("exercisesId")}/detail`;return}const _a=Po();ha()}else Ln({type:4,payload:!1})}catch($i){console.log($i)}finally{}})}function Ai(fi){var $i;clearTimeout(xr.current),xr.current=setTimeout(()=>{var Do;aa({code:rt.Base64.encode(fi),language:(Do=jr==null?void 0:jr.current)==null?void 0:Do.language})},2e3),Ln({type:3,payload:Ci(yr({},jr==null?void 0:jr.current),{hack:Ci(yr({},($i=jr==null?void 0:jr.current)==null?void 0:$i.hack),{code:fi})})})}function oo(fi){let $i=fi.target.value;Ln({type:3,payload:Ci(yr({},Lr),{test_case:{input:$i}})})}const Ba=fi=>Ni(void 0,null,function*(){var $i;if(Ln({type:0,payload:!0}),(yield aa()).status===0){Ln({type:8,payload:{languageValue:fi}}),jr.current.language=fi;const ya=`${mi==null?void 0:mi.login}-language`;localStorage.setItem(ya,fi);const fo=yield(0,E.dd)(xn);if(fo.status===0){const _a=($i=fo==null?void 0:fo.data)==null?void 0:$i.find(ha=>ha.language===fi);Ai(rt.Base64.decode(_a.code))}}setTimeout(()=>{Ln({type:0,payload:!1})},300)});function jo(){return Ni(this,null,function*(){try{const fi=yield(0,E.H7)(xn,{language:ci});fi.status===401?ue.history.replace("/login",{from:Pn.pathname}):(Ai(rt.Base64.decode(fi.code)),oa())}catch(fi){console.log(fi)}})}function Cs(){le.default.confirm({centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",title:"\u63D0\u793A",content:Br.createElement("p",null,"\u521D\u59CB\u4EE3\u7801\u6709\u4FEE\u6539\uFF0C\u66F4\u65B0\u540E\u5C06\u8986\u76D6\u73B0\u6709\u4EE3\u7801\u54E6~ ",Br.createElement("br",null),"\u8BF7\u5C06\u60A8\u7F16\u8F91\u7684\u4EE3\u7801\u4FDD\u5B58\u81F3\u672C\u5730\uFF0C\u4EE5\u9632\u4E22\u5931"),onOk(){return Ni(this,null,function*(){const fi=yield(0,E.fi)(xn,{language:ci});fi.status===401?ue.history.replace("/login",{from:Pn.pathname}):Ai(rt.Base64.decode(fi.code))})}})}function Jo(){Ln({type:9,payload:!0})}function lo(){Ln({type:9,payload:!1})}function Fa(fi){return Ni(this,null,function*(){yield(0,E.MK)(xn,fi),Ln({type:1,payload:{showNote:!1,data:Ci(yr({},Lr),{hack:Ci(yr({},Rr),{notes:fi.notes})})}})})}const dl={input:(bt=Lr==null?void 0:Lr.test_case)==null?void 0:bt.input,is_file:(wt=Lr==null?void 0:Lr.test_case)==null?void 0:wt.is_file,language:((Xn=jr.current)==null?void 0:Xn.language)||(Rr==null?void 0:Rr.language),code:Rr==null?void 0:Rr.code,title:"main."+va[Rr==null?void 0:Rr.language],modify_code:Rr==null?void 0:Rr.modify_code,notes:Rr==null?void 0:Rr.notes,debugResult:yi,debuging:Wi,submitting:ri,executingMessage:Di,id:xn,languageValue:ci,languageList:Or,onChangeLanguage:Ba,onCancelNote:lo,onAddNote:Fa,showNote:Ei,onShowNote:Jo,onSubmitCode:ga,onChangeCode:Ai,onChangeInput:oo,onDebugCode:ii,onResetCode:jo,onSyncCode:Cs,onUpdateCode:aa};function Xs(){return Ni(this,null,function*(){const{praise_count:fi}=yield(0,E.vl)(Rr.id,{container_type:"Hack",type:1});let $i=Ci(yr({},Lr),{hack:Ci(yr({},Rr),{praises_count:fi,user_praise:!Rr.user_praise})});Ln({type:3,payload:$i})})}const fl={topicId:xn,submitResult:Fr,submitRecords:zi,submitting:ri,page:ni,onPageChange:os,hack:Rr,user:Lr==null?void 0:Lr.user,onTriggerPraise:Xs};return console.log(Lr,jr==null?void 0:jr.current,"data--------"),Br.createElement(Br.Fragment,null,Br.createElement(ee.Z,{className:"oj-custom-large-spin",size:"large",spinning:gi},Lr?Br.createElement("div",{className:"oj-custom-warp"},Br.createElement("header",{className:Ye.Z.header,style:{minWidth:1200}},Br.createElement("div",null,Br.createElement("img",{src:`${z.Z.IMG_SERVER}/images/${mi.image_url}`,alt:"user",width:30}),Br.createElement("span",null,mi.name)),Br.createElement("h2",{className:"flex-wrp flex_box_column flex_box_center"},Br.createElement("div",null,Rr.name),Br.createElement(ka.Z,{onChange:fi=>{},className:"font12 c-grey-999"})),Br.createElement(La.CopyToClipboard,{text:`${(On=window.location)==null?void 0:On.origin}/problems/${Rr.identifier}/share`,onCopy:()=>te.ZP.success("\u590D\u5236\u9898\u76EE\u94FE\u63A5\u6210\u529F")},Br.createElement("span",{className:Ye.Z.btn_back,style:{marginRight:10,cursor:"pointer"}}," ",Br.createElement("i",{className:"iconfont icon-fenxiang1 font14 mr5"}),"\u5206\u4EAB\u9898\u76EE")),Rr.edit_privilege?Br.createElement(ue.Link,{className:Ye.Z.btn_back,to:`/problems/${Rr.identifier}/ojedit`,style:{marginRight:10}}," ",Br.createElement(ie.Z,null)," \u7F16\u8F91"):null,Br.createElement(ue.Link,{className:Ye.Z.btn_back,onClick:()=>{},to:"/problems"}," ",Br.createElement(Ce.Z,null),"\u9000\u51FA")),Br.createElement(b.Z,{hideResize:!0,className:"my-problems oj-problems",leftChild:Br.createElement(hs,yr({},fl)),rightChild:Br.createElement(cl,yr({},dl))})):null),Br.createElement(le.default,{centered:!0,closable:!1,width:680,footer:null,open:Zi,className:"oj-modal"},Br.createElement("section",{className:"oj-modal-content"},Br.createElement("div",{className:"oj-modal-head"},Br.createElement("img",{src:ps,alt:""}),Br.createElement("i",{onClick:()=>si(!1),className:"iconfont icon-guanbi1"})),Br.createElement("aside",null,Br.createElement("img",{className:"mr30",src:ws.Z}),"\u8FD0\u884C\u65F6\u95F4:\xA0",Br.createElement("span",{style:{color:"#75d6ba",marginRight:100}},Fr==null?void 0:Fr.execute_time,"s"),"\u4F18\u4E8E",Br.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Fr==null?void 0:Fr.time_better_than)||100,"%"),"\u7684\u7528\u6237"),Br.createElement("aside",{className:"mb50"},Br.createElement("img",{src:ms.Z,className:"mr30"}),Br.createElement("span",{className:"oj-modal-tt"},Br.createElement("span",null,Br.createElement("span",null,"\u5360\u7528\u5185\u5B58:\xA0"),Br.createElement("span",{className:"c-light-primary"},Fr==null?void 0:Fr.execute_memory,"mb")),Br.createElement("span",null,Br.createElement("span",null))),"\u4F18\u4E8E",Br.createElement("span",{style:{color:"#f3b087",margin:"0 5px"}},(Fr==null?void 0:Fr.memory_better_than)||100,"%"),"\u7684\u7528\u6237"),Br.createElement("div",{id:"oj-modal-next",className:"oj-modal-btn"},"\u8FDB\u5165\u4E0B\u4E00\u9898"))))};function ul({languageValue:ft,languageList:bt,onChangeLanguage:wt,title:Xn,modify_code:On,onSyncCode:pn,onShowCodeSetting:Ln,onResetCode:xn}){const Pn=(0,ue.useLocation)(),Jn=()=>{le.default.confirm({title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",icon:Br.createElement(x.Z,null),content:"\u4F60\u5728\u672C\u6587\u4EF6\u4E2D\u4FEE\u6539\u7684\u5185\u5BB9\u5C06\u4E22\u5931\uFF0C\u662F\u5426\u786E\u5B9A\u91CD\u65B0\u52A0\u8F7D\u521D\u59CB\u4EE3\u7801\uFF1F",centered:!0,okText:"\u786E\u5B9A",cancelText:"\u53D6\u6D88",onOk:xn})};return Br.createElement("div",{className:"action-bar"},Br.createElement(ne.default,{className:"oj-select",value:ft,style:{width:100},placeholder:"\u9009\u62E9\u8BED\u8A00",onChange:wt},bt==null?void 0:bt.map(ci=>Br.createElement(ne.default.Option,{key:ci.language,value:ci.language},ci.language))),Br.createElement("span",null),Br.createElement("a",{title:"\u6062\u590D\u521D\u59CB\u4EE3\u7801",onClick:Jn},Br.createElement("i",{className:"iconfont icon-zhongzhi font-20 "})),Br.createElement("a",{onClick:Ln},Br.createElement("i",{className:"iconfont icon-shezhi"})))}function cl(ft){var bt=ft,{id:wt,input:Xn,is_file:On,showNote:pn,onShowNote:Ln,notes:xn,onCancelNote:Pn,onAddNote:Jn,debugResult:ci,language:Or,debuging:gi,submitting:Lr,executingMessage:yi,code:Fr,onSubmitCode:zi,onDebugCode:ni,onChangeCode:Ei,onChangeInput:Wi,onUpdateCode:ri}=bt,Di=So(bt,["id","input","is_file","showNote","onShowNote","notes","onCancelNote","onAddNote","debugResult","language","debuging","submitting","executingMessage","code","onSubmitCode","onDebugCode","onChangeCode","onChangeInput","onUpdateCode"]);function tr(bi){return Br.createElement(ul,Ci(yr({},Di),{onShowCodeSetting:bi}))}const Bi={id:wt,input:Xn,debugResult:ci,debuging:gi,is_file:On,submitting:Lr,executingMessage:yi,onDebugCode:ni,onChangeCode:Ei,onSubmitCode:zi,onChangeInput:Wi};return Br.createElement("div",{className:"right-panel"},Br.createElement(ot,{onUpdateCode:()=>{},language:Or,value:Fr,onChange:Ei,ActionBarRender:tr}),Br.createElement("div",{className:`note-form-area ${pn?"active":""}`},Br.createElement(et,{onCancel:Pn,notes:xn,callback:Jn})),Br.createElement(ut.ZP,yr({},Bi)))}},49162:function(qt,Dt,be){"use strict";be.d(Dt,{h:function(){return ce}});var ce=(ie=>(ie[ie.NOMATCH=-1]="NOMATCH",ie[ie.OK=0]="OK",ie[ie.TIMEOUT=2]="TIMEOUT",ie[ie.PODFAILURE=3]="PODFAILURE",ie[ie.COMPILEFAILURE=4]="COMPILEFAILURE",ie[ie.EXECUTEFAILURE=5]="EXECUTEFAILURE",ie[ie.HIDE_COMPILE_STATUS=11]="HIDE_COMPILE_STATUS",ie))(ce||{})},59205:function(qt,Dt,be){"use strict";be.d(Dt,{H7:function(){return ne},KC:function(){return re},M3:function(){return ye},MK:function(){return ee},MU:function(){return ue},Rg:function(){return _e},WH:function(){return ae},X6:function(){return te},bM:function(){return Ce},bx:function(){return oe},dd:function(){return z},de:function(){return pe},fi:function(){return E},fu:function(){return ie},gu:function(){return ve},n4:function(){return b},qe:function(){return ge},rL:function(){return he},rX:function(){return le},uc:function(){return ke},vl:function(){return x},wO:function(){return me},zO:function(){return se}});var ce=be(82093);function ie(Te){return(0,ce.U2)(`mypractices/${Te}.json`,{hidePopLogin:!0})}function Ce(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/code_submit.json`,Ee)}function ue(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/code_debug.json`,Ee)}function se(Te,Ee){return Ee.language&&(Ee.language=encodeURIComponent(Ee.language)),(0,ce.U2)(`mypractices/${Te}/submit_records.json`,Ee)}function te(Te){return(0,ce.U2)("mypractices/record_detail.json",{id:Te})}function le(Te,Ee){return(0,ce.U2)(`mypractices/${Te}/result.json`,{mode:Ee})}function ee(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/add_notes.json`,Ee)}function ne(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/restore_initial_code.json`,Ee)}function E(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/sync_code.json`,Ee)}function b(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/update_code.json`,Ee)}function z(Te){return(0,ce.v_)(`mypractices/${Te}/initial_codes.json`)}function x(Te,Ee){return(0,ce.v_)(`discusses/${Te}/plus.json`,Ee)}function re(Te){return(0,ce.U2)("practices/practices_list.json",Te)}function ae(Te,Ee){return(0,ce.U2)(`practices/${Te}/question_solution_articles`,Ee)}function oe(Te,Ee){return(0,ce.v_)(`practices/${Te}/question_solution_articles`,Ee)}function ve(Te,Ee){return(0,ce.gz)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}`,Ee)}function ye(Te,Ee){return(0,ce.U2)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}/edit`,Ee)}function me(Te,Ee){return(0,ce.U2)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}`,Ee)}function ge(Te,Ee){return(0,ce.v_)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}/set_authority_or_excellent`,Ee)}function _e(Te,Ee){return(0,ce.v_)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}/praise_or_treads`,Ee)}function he(Te,Ee){return(0,ce.v_)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}/hide`)}function pe(Te,Ee){return(0,ce.IV)(`practices/${Te}/question_solution_articles/${Ee==null?void 0:Ee.active}`,Ee)}function ke(Te,Ee){return(0,ce.v_)(`mypractices/${Te}/update_practice_time_sum`,Ee)}},46541:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return x}});var ce=be(59301),ie=be(6767),Ce=be(25399),ue=be(29787),se=be(77019),te=be(5269),le=be(13747),ee=be(99571),ne=be(2978),E=be(82093),b=be(38394),z=(ae,oe,ve)=>new Promise((ye,me)=>{var ge=pe=>{try{he(ve.next(pe))}catch(ke){me(ke)}},_e=pe=>{try{he(ve.throw(pe))}catch(ke){me(ke)}},he=pe=>pe.done?ye(pe.value):Promise.resolve(pe.value).then(ge,_e);he((ve=ve.apply(ae,oe)).next())}),x=({id:ae,activeDiscussIndex:oe,onReplyDiscuss:ve,adminOrOperator:ye})=>{const[me,ge]=(0,ce.useState)(""),[_e,he]=(0,ce.useState)(!1);function pe(Te){ge(Te)}function ke(){if(!me){ie.ZP.info("\u56DE\u590D\u5185\u5BB9\u4E0D\u80FD\u4E3A\u7A7A!");return}ve(ae,me),ge("")}return(0,ce.useEffect)(()=>{oe!=ae&&he(!1)},[oe]),ce.createElement("div",{key:ae,className:"discuss-item-editor",style:{display:oe===ae?"block":"none",width:"100%"}},ce.createElement(ne.Z,{miniToolbar:!0,startInit:oe===ae,defaultValue:me,id:ae,noStorage:!0,watch:!1,height:155,placeholder:"\u6211\u8981\u56DE\u590D",showResizeBar:!0,onChange:pe,extraUse:ye&&ce.createElement(Ce.Z,{color:"#fff",open:_e,destroyTooltipOnHide:!0,title:re({id:ae,isOpen:_e,activeDiscussIndex:oe,onChange:pe,setIsOpen:he}),overlayStyle:{maxWidth:600}},ce.createElement("a",{title:_e?"\u5173\u95ED\u63A8\u8350":"\u6253\u5F00\u63A8\u8350",onClick:()=>he(!_e)},ce.createElement("i",{className:"iconfont icon-dianzan11"})))}),ce.createElement("a",{onClick:ke,className:"btn-send"},"\u53D1\u9001"))};const re=ae=>{const[oe,ve]=(0,ce.useState)(!1),[ye,me]=(0,ce.useState)([]),[ge,_e]=(0,ce.useState)(1);(0,ce.useEffect)(()=>{ae!=null&&ae.isOpen?he():(_e(1),me([]))},[ae==null?void 0:ae.isOpen]);const he=()=>z(void 0,null,function*(){ve(!0);const pe=yield(0,E.ZP)(`/api/discusses/${ae==null?void 0:ae.id}/recommend_answer.json`,{method:"get"});(pe==null?void 0:pe.status)==0&&me(pe==null?void 0:pe.answer),ve(!1)});return ce.createElement(ue.Z,{spinning:oe},ce.createElement("div",{style:{color:"#000"}},ce.createElement(b.Z,{className:"font14",style:{maxHeight:500,overflow:"auto"},value:(ye==null?void 0:ye[ge-1])||""}),ce.createElement(se.Z,{justify:"end",align:"middle"},ce.createElement(te.Z,null,ce.createElement(le.Z,{simple:!0,current:ge,pageSize:1,total:(ye==null?void 0:ye.length)||0,onChange:pe=>{_e(pe)}})),ce.createElement(te.Z,null,ce.createElement(ee.ZP,{onClick:()=>z(void 0,null,function*(){ae==null||ae.onChange(ye==null?void 0:ye[ge-1]),ae==null||ae.setIsOpen(!1)})},"\u586B\u5165\u6587\u672C\u6846")))))}},12975:function(qt,Dt,be){"use strict";be.d(Dt,{o:function(){return ne}});var ce=be(82093),ie=be(93125),Ce=be.n(ie);let ue="",se,te="";function le(E){ee(E)}function ee(E){se=new(Ce()).Vod({timeout:6e4,partSize:1048576,parallel:5,retryCount:3,retryDuration:2,region:"ap-southeast-1",userId:0x6803cbd867207,enableUploadProgress:!1,addFileSuccess:function(b){console.log("addFileSuccess: "+b.file.name),E.addFileSuccess&&E.addFileSuccess(b),se.startUpload()},onUploadstarted:function(b){const z=b.file.name;if(b.videoId){var re=`/api/users/${ue}/video_auths.json`;(0,ce.ZP)(re,{method:"put",body:{video_id:b.videoId,title:z,file_name:z,virtual_classroom_id:te}}).then(ae=>{if(ae.status==-1){E.onUploadError&&E.onUploadError(b);return}const oe=ae.data;var ve=oe.UploadAuth,ye=oe.UploadAddress,me=oe.VideoId;se.setUploadAuthAndAddress(b,ve,ye)}).catch(ae=>{se.deleteFile(se._curIndex),se.nextUpload(),console.log(ae)})}else{var x=`/api/users/${ue}/video_auths.json`;const ae="";(0,ce.ZP)(x,{method:"Post",body:{title:ae+z,file_name:ae+z,virtual_classroom_id:te}}).then(oe=>{if(oe){const ge=oe.data;var ve=ge.UploadAuth,ye=ge.UploadAddress,me=ge.VideoId;se.setUploadAuthAndAddress(b,ve,ye,me)}}).catch(oe=>{se.deleteFile(se._curIndex),se.nextUpload(),console.log(oe)}),console.log("\u6587\u4EF6\u5F00\u59CB\u4E0A\u4F20...")}},onUploadSucceed:function(b){E.onUploadSucceed&&E.onUploadSucceed(b),console.log("\u6587\u4EF6\u4E0A\u4F20\u6210\u529F!")},onUploadFailed:function(b,z,x){E.onUploadFailed&&E.onUploadFailed(b),console.log("\u6587\u4EF6\u4E0A\u4F20\u5931\u8D25!")},onUploadCanceled:function(b,z,x){console.log("\u6587\u4EF6\u4E0A\u4F20\u5DF2\u6682\u505C!")},onUploadProgress:function(b,z,x){E.onUploadProgress&&E.onUploadProgress(b,z,x);var re=Math.ceil(x*100);console.log("\u6587\u4EF6\u4E0A\u4F20\u4E2D...")},onUploadTokenExpired:function(b){console.log("\u6587\u4EF6\u4E0A\u4F20\u8D85\u65F6!");var z=`/api/users/${ue}/video_auths.json`;(0,ce.ZP)(z,{method:"put",body:{video_id:b.videoId}}).then(x=>{var ae=x.data.UploadAuth;se.resumeUploadWithAuth(ae)}).catch(x=>{console.log(x)})},onUploadEnd:function(b){E.onUploadEnd&&E.onUploadEnd(b),console.log("onUploadEnd: uploaded all the files")}}),E.gotUploader&&E.gotUploader(se)}function ne(E,b,z){E&&(ue=E),b&&(te=b),le(z)}},2610:function(qt,Dt,be){"use strict";be.d(Dt,{BU:function(){return ie},Dj:function(){return ce},gH:function(){return Ce},vp:function(){return ue}});function ce(se){try{se.mozRequestFullScreen?se.mozRequestFullScreen():se.webkitRequestFullScreen&&se.webkitRequestFullScreen()}catch(te){console.log(te,":e")}}function ie(){window.top.document.webkitExitFullscreen?window.top.document.webkitExitFullscreen():document.exitFullscreen?window.top.document.exitFullscreen():document.msExitFullscreen?window.top.document.msExitFullscreen():document.mozCancelFullScreen&&window.top.document.mozCancelFullScreen()}const Ce=()=>{if(document.webkitExitFullscreen)return"webkitfullscreenchange";if(document.exitFullscreen)return"fullscreenchange";if(document.msExitFullscreen)return"msfullscreenchange";if(document.mozCancelFullScreen)return"mozfullscreenchange"};function ue(){var se=window.top.document.fullscreenElement||window.top.document.mozFullscreenElement||window.top.document.webkitFullscreenElement,te=document.fullscreenEnabled||document.mozFullscreenEnabled||document.webkitFullscreenEnabled;return console.log("fullscreenElement",se),window.isFullScreen?window.isFullScreen:se!=null}},90290:function(qt,Dt,be){"use strict";be.d(Dt,{AL:function(){return _e},Iy:function(){return b},Qv:function(){return re},ez:function(){return ge},jb:function(){return z}});var ce=be(32834),ie=be.n(ce),Ce=be(11690),ue=be.n(Ce);let se=1;function te(Ee,Oe){const je=Ee.match(/^(\s+)(?:```)/);if(je===null)return Oe;const Pe=je[1];return Oe.split(`
|
|
|
`).map(Qe=>{const Xe=Qe.match(/^\s+/);if(Xe===null)return Qe;const[ot]=Xe;return ot.length>=Pe.length?Qe.slice(Pe.length):Qe}).join(`
|
|
|
`)}let le=[],ee=["<ul>"];const ne=new(ie()).Renderer,E=/^ *(#{1,6}) *([^\n]+?) *(?:#+ *)?(?:\n+|$)/;function b(){le.length=0,ee=["<ul>"]}const z={overflow:"hidden",WebkitBoxOrient:"vertical",display:"-webkit-box",WebkitLineClamp:2};function x(Ee,Oe,je,Pe){if(Oe>=Ee.length||Ee[Oe].level<=je)return Oe;var Qe=Ee[Oe];Pe.push("<li><a href='#"+se+Qe.anchor+"'>"+Qe.text+"</a>"),Oe++;var Xe=[];return Oe=x(Ee,Oe,Qe.level,Xe),Xe.length>0&&(Pe.push("<ul>"),Xe.forEach(function(ot){Pe.push(ot)}),Pe.push("</ul>")),Pe.push("</li>"),Oe=x(Ee,Oe,je,Pe),Oe}function re(){return x(le,0,0,ee),ee.push("</ul>"),ee.join("")}const ae={heading(Ee){const Oe=E.exec(Ee);if(se+=1,Oe)return{type:"heading",raw:Oe[0],depth:Oe[1].length,text:Oe[2]}},fences(Ee){const Oe=this.rules.block.fences.exec(Ee);if(Oe){const je=Oe[0];let Pe=te(je,Oe[3]||"");const Qe=Oe[2]?Oe[2].trim():Oe[2];if(["latex","katex","math"].indexOf(Qe)>=0){const Xe=ye(),ot=Pe;Pe=Xe,me[Xe]={type:"block",expression:ot}}return{type:"code",raw:je,lang:Qe,text:Pe}}}},oe=/(?:\${2})([^\n`]+?)(?:\${2})/gi;let ve=0;const ye=()=>`__special_katext_id_${ve++}__`;let me={};function ge(){return me}function _e(){ve=0,me={}}function he(Ee){return Ee=Ee.replace(oe,(Oe,je)=>{const Pe=ye();return me[Pe]={type:"inline",expression:je},Pe}),Ee}const pe=ne.listitem;ne.listitem=function(Ee){return pe(he(Ee))};const ke=ne.paragraph;ne.paragraph=function(Ee){return ke(he(Ee))};const Te=ne.tablecell;ne.tablecell=function(Ee,Oe){return Te(he(Ee),Oe)},ne.code=function(Ee,Oe,je){const Pe=(Oe||"").match(/\S*/)[0];return Pe?["latex","katex","math"].indexOf(Pe)>=0?`<p class='editormd-tex'>${Ee}</p>`:`<pre class="prettyprint linenums"><code class="language-${Oe}">${je?Ee:(0,Ce.escape)(Ee,!0)}</code></pre>
|
|
|
`:'<pre class="prettyprint linenums"><code>'+(je?Ee:(0,Ce.escape)(Ee,!0))+"</code></pre>"},ne.heading=function(Ee,Oe,je){let Pe=this.options.headerPrefix+je.toLowerCase().replace(/[^\w\\u4e00-\\u9fa5]]+/g,"-");return le.push({anchor:Pe,level:Oe,text:Ee}),"<h"+Oe+' id="'+se+Pe+'">'+Ee+"</h"+Oe+">"},ie().setOptions({silent:!0,gfm:!0,pedantic:!1}),ie().use({tokenizer:ae,renderer:ne}),Dt.ZP=ie()},89613:function(qt,Dt,be){"use strict";be.d(Dt,{G:function(){return se},t:function(){return ue}});var ce=be(7062),ie=be.n(ce);const Ce=null;function ue(te,le){let ee=ie().get("__ec");ee||(ee={}),ee[te]=le,ie().set("__ec",ee)}function se(te,le){let ee=ie().get("__ec");return ee?ee[te]===void 0?le:ee[te]:le}},60513:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return er}});class ce{static install(){Object.setPrototypeOf=Object.setPrototypeOf||function(Ie,Ze){return Ie.__proto__=Ze,Ie},Object.assign=Object.assign||function(Ie){if(Ie==null)throw new TypeError("Cannot convert undefined or null to object");let Ze=Object(Ie);for(let qe=1;qe<arguments.length;qe++){let st=arguments[qe];if(st!=null)for(let mt in st)st.hasOwnProperty(mt)&&(Ze[mt]=st[mt])}return Ze},typeof self.Promise!="function"&&be(3867).polyfill()}}ce.install();var ie=ce,Ce=be(86204),ue=be.n(Ce);class se{static e(Ie,Ze){(!Ie||se.FORCE_GLOBAL_TAG)&&(Ie=se.GLOBAL_TAG);let qe=`[${Ie}] > ${Ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","error",qe),se.ENABLE_ERROR&&(console.error?console.error(qe):console.warn?console.warn(qe):console.log(qe))}static i(Ie,Ze){(!Ie||se.FORCE_GLOBAL_TAG)&&(Ie=se.GLOBAL_TAG);let qe=`[${Ie}] > ${Ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","info",qe),se.ENABLE_INFO&&(console.info?console.info(qe):console.log(qe))}static w(Ie,Ze){(!Ie||se.FORCE_GLOBAL_TAG)&&(Ie=se.GLOBAL_TAG);let qe=`[${Ie}] > ${Ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","warn",qe),se.ENABLE_WARN&&(console.warn?console.warn(qe):console.log(qe))}static d(Ie,Ze){(!Ie||se.FORCE_GLOBAL_TAG)&&(Ie=se.GLOBAL_TAG);let qe=`[${Ie}] > ${Ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","debug",qe),se.ENABLE_DEBUG&&(console.debug?console.debug(qe):console.log(qe))}static v(Ie,Ze){(!Ie||se.FORCE_GLOBAL_TAG)&&(Ie=se.GLOBAL_TAG);let qe=`[${Ie}] > ${Ze}`;se.ENABLE_CALLBACK&&se.emitter.emit("log","verbose",qe),se.ENABLE_VERBOSE&&console.log(qe)}}se.GLOBAL_TAG="flv.js",se.FORCE_GLOBAL_TAG=!1,se.ENABLE_ERROR=!0,se.ENABLE_INFO=!0,se.ENABLE_WARN=!0,se.ENABLE_DEBUG=!0,se.ENABLE_VERBOSE=!0,se.ENABLE_CALLBACK=!1,se.emitter=new(ue());var te=se;class le{constructor(){this._firstCheckpoint=0,this._lastCheckpoint=0,this._intervalBytes=0,this._totalBytes=0,this._lastSecondBytes=0,self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now}reset(){this._firstCheckpoint=this._lastCheckpoint=0,this._totalBytes=this._intervalBytes=0,this._lastSecondBytes=0}addBytes(Ie){this._firstCheckpoint===0?(this._firstCheckpoint=this._now(),this._lastCheckpoint=this._firstCheckpoint,this._intervalBytes+=Ie,this._totalBytes+=Ie):this._now()-this._lastCheckpoint<1e3?(this._intervalBytes+=Ie,this._totalBytes+=Ie):(this._lastSecondBytes=this._intervalBytes,this._intervalBytes=Ie,this._totalBytes+=Ie,this._lastCheckpoint=this._now())}get currentKBps(){this.addBytes(0);let Ie=(this._now()-this._lastCheckpoint)/1e3;return Ie==0&&(Ie=1),this._intervalBytes/Ie/1024}get lastSecondKBps(){return this.addBytes(0),this._lastSecondBytes!==0?this._lastSecondBytes/1024:this._now()-this._lastCheckpoint>=500?this.currentKBps:0}get averageKBps(){let Ie=(this._now()-this._firstCheckpoint)/1e3;return this._totalBytes/Ie/1024}}var ee=le;class ne{constructor(Ie){this._message=Ie}get name(){return"RuntimeException"}get message(){return this._message}toString(){return this.name+": "+this.message}}class E extends ne{constructor(Ie){super(Ie)}get name(){return"IllegalStateException"}}class b extends ne{constructor(Ie){super(Ie)}get name(){return"InvalidArgumentException"}}class z extends ne{constructor(Ie){super(Ie)}get name(){return"NotImplementedException"}}const x={kIdle:0,kConnecting:1,kBuffering:2,kError:3,kComplete:4},re={OK:"OK",EXCEPTION:"Exception",HTTP_STATUS_CODE_INVALID:"HttpStatusCodeInvalid",CONNECTING_TIMEOUT:"ConnectingTimeout",EARLY_EOF:"EarlyEof",UNRECOVERABLE_EARLY_EOF:"UnrecoverableEarlyEof"};class ae{constructor(Ie){this._type=Ie||"undefined",this._status=x.kIdle,this._needStash=!1,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}destroy(){this._status=x.kIdle,this._onContentLengthKnown=null,this._onURLRedirect=null,this._onDataArrival=null,this._onError=null,this._onComplete=null}isWorking(){return this._status===x.kConnecting||this._status===x.kBuffering}get type(){return this._type}get status(){return this._status}get needStashBuffer(){return this._needStash}get onContentLengthKnown(){return this._onContentLengthKnown}set onContentLengthKnown(Ie){this._onContentLengthKnown=Ie}get onURLRedirect(){return this._onURLRedirect}set onURLRedirect(Ie){this._onURLRedirect=Ie}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ie){this._onDataArrival=Ie}get onError(){return this._onError}set onError(Ie){this._onError=Ie}get onComplete(){return this._onComplete}set onComplete(Ie){this._onComplete=Ie}open(Ie,Ze){throw new z("Unimplemented abstract function!")}abort(){throw new z("Unimplemented abstract function!")}}let oe={};function ve(){let $t=self.navigator.userAgent.toLowerCase(),Ie=/(edge)\/([\w.]+)/.exec($t)||/(opr)[\/]([\w.]+)/.exec($t)||/(chrome)[ \/]([\w.]+)/.exec($t)||/(iemobile)[\/]([\w.]+)/.exec($t)||/(version)(applewebkit)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec($t)||/(webkit)[ \/]([\w.]+).*(version)[ \/]([\w.]+).*(safari)[ \/]([\w.]+)/.exec($t)||/(webkit)[ \/]([\w.]+)/.exec($t)||/(opera)(?:.*version|)[ \/]([\w.]+)/.exec($t)||/(msie) ([\w.]+)/.exec($t)||$t.indexOf("trident")>=0&&/(rv)(?::| )([\w.]+)/.exec($t)||$t.indexOf("compatible")<0&&/(firefox)[ \/]([\w.]+)/.exec($t)||[],Ze=/(ipad)/.exec($t)||/(ipod)/.exec($t)||/(windows phone)/.exec($t)||/(iphone)/.exec($t)||/(kindle)/.exec($t)||/(android)/.exec($t)||/(windows)/.exec($t)||/(mac)/.exec($t)||/(linux)/.exec($t)||/(cros)/.exec($t)||[],qe={browser:Ie[5]||Ie[3]||Ie[1]||"",version:Ie[2]||Ie[4]||"0",majorVersion:Ie[4]||Ie[2]||"0",platform:Ze[0]||""},st={};if(qe.browser){st[qe.browser]=!0;let mt=qe.majorVersion.split(".");st.version={major:parseInt(qe.majorVersion,10),string:qe.version},mt.length>1&&(st.version.minor=parseInt(mt[1],10)),mt.length>2&&(st.version.build=parseInt(mt[2],10))}if(qe.platform&&(st[qe.platform]=!0),(st.chrome||st.opr||st.safari)&&(st.webkit=!0),st.rv||st.iemobile){st.rv&&delete st.rv;let mt="msie";qe.browser=mt,st[mt]=!0}if(st.edge){delete st.edge;let mt="msedge";qe.browser=mt,st[mt]=!0}if(st.opr){let mt="opera";qe.browser=mt,st[mt]=!0}if(st.safari&&st.android){let mt="android";qe.browser=mt,st[mt]=!0}st.name=qe.browser,st.platform=qe.platform;for(let mt in oe)oe.hasOwnProperty(mt)&&delete oe[mt];Object.assign(oe,st)}ve();var ye=oe;class me extends ae{static isSupported(){try{let Ie=ye.msedge&&ye.version.minor>=15048,Ze=ye.msedge?Ie:!0;return self.fetch&&self.ReadableStream&&Ze}catch(Ie){return!1}}constructor(Ie,Ze){super("fetch-stream-loader"),this.TAG="FetchStreamLoader",this._seekHandler=Ie,this._config=Ze,this._needStash=!0,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),super.destroy()}open(Ie,Ze){this._dataSource=Ie,this._range=Ze;let qe=Ie.url;this._config.reuseRedirectedURL&&Ie.redirectedURL!=null&&(qe=Ie.redirectedURL);let st=this._seekHandler.getConfig(qe,Ze),mt=new self.Headers;if(typeof st.headers=="object"){let kt=st.headers;for(let Bt in kt)kt.hasOwnProperty(Bt)&&mt.append(Bt,kt[Bt])}let Nt={method:"GET",headers:mt,mode:"cors",cache:"default",referrerPolicy:"no-referrer-when-downgrade"};if(typeof this._config.headers=="object")for(let kt in this._config.headers)mt.append(kt,this._config.headers[kt]);Ie.cors===!1&&(Nt.mode="same-origin"),Ie.withCredentials&&(Nt.credentials="include"),Ie.referrerPolicy&&(Nt.referrerPolicy=Ie.referrerPolicy),this._status=x.kConnecting,self.fetch(st.url,Nt).then(kt=>{if(this._requestAbort){this._requestAbort=!1,this._status=x.kIdle;return}if(kt.ok&&kt.status>=200&&kt.status<=299){if(kt.url!==st.url&&this._onURLRedirect){let Jt=this._seekHandler.removeURLParameters(kt.url);this._onURLRedirect(Jt)}let Bt=kt.headers.get("Content-Length");return Bt!=null&&(this._contentLength=parseInt(Bt),this._contentLength!==0&&this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)),this._pump.call(this,kt.body.getReader())}else if(this._status=x.kError,this._onError)this._onError(re.HTTP_STATUS_CODE_INVALID,{code:kt.status,msg:kt.statusText});else throw new ne("FetchStreamLoader: Http code invalid, "+kt.status+" "+kt.statusText)}).catch(kt=>{if(this._status=x.kError,this._onError)this._onError(re.EXCEPTION,{code:-1,msg:kt.message});else throw kt})}abort(){this._requestAbort=!0}_pump(Ie){return Ie.read().then(Ze=>{if(Ze.done)if(this._contentLength!==null&&this._receivedLength<this._contentLength){this._status=x.kError;let qe=re.EARLY_EOF,st={code:-1,msg:"Fetch stream meet Early-EOF"};if(this._onError)this._onError(qe,st);else throw new ne(st.msg)}else this._status=x.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1);else{if(this._requestAbort===!0)return this._requestAbort=!1,this._status=x.kComplete,Ie.cancel();this._status=x.kBuffering;let qe=Ze.value.buffer,st=this._range.from+this._receivedLength;this._receivedLength+=qe.byteLength,this._onDataArrival&&this._onDataArrival(qe,st,this._receivedLength),this._pump(Ie)}}).catch(Ze=>{if(Ze.code===11&&ye.msedge)return;this._status=x.kError;let qe=0,st=null;if((Ze.code===19||Ze.message==="network error")&&(this._contentLength===null||this._contentLength!==null&&this._receivedLength<this._contentLength)?(qe=re.EARLY_EOF,st={code:Ze.code,msg:"Fetch stream meet Early-EOF"}):(qe=re.EXCEPTION,st={code:Ze.code,msg:Ze.message}),this._onError)this._onError(qe,st);else throw new ne(st.msg)})}}var ge=me;class _e extends ae{static isSupported(){try{let Ie=new XMLHttpRequest;return Ie.open("GET","https://example.com",!0),Ie.responseType="moz-chunked-arraybuffer",Ie.responseType==="moz-chunked-arraybuffer"}catch(Ie){return te.w("MozChunkedLoader",Ie.message),!1}}constructor(Ie,Ze){super("xhr-moz-chunked-loader"),this.TAG="MozChunkedLoader",this._seekHandler=Ie,this._config=Ze,this._needStash=!0,this._xhr=null,this._requestAbort=!1,this._contentLength=null,this._receivedLength=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onloadend=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}open(Ie,Ze){this._dataSource=Ie,this._range=Ze;let qe=Ie.url;this._config.reuseRedirectedURL&&Ie.redirectedURL!=null&&(qe=Ie.redirectedURL);let st=this._seekHandler.getConfig(qe,Ze);this._requestURL=st.url;let mt=this._xhr=new XMLHttpRequest;if(mt.open("GET",st.url,!0),mt.responseType="moz-chunked-arraybuffer",mt.onreadystatechange=this._onReadyStateChange.bind(this),mt.onprogress=this._onProgress.bind(this),mt.onloadend=this._onLoadEnd.bind(this),mt.onerror=this._onXhrError.bind(this),Ie.withCredentials&&(mt.withCredentials=!0),typeof st.headers=="object"){let Nt=st.headers;for(let kt in Nt)Nt.hasOwnProperty(kt)&&mt.setRequestHeader(kt,Nt[kt])}if(typeof this._config.headers=="object"){let Nt=this._config.headers;for(let kt in Nt)Nt.hasOwnProperty(kt)&&mt.setRequestHeader(kt,Nt[kt])}this._status=x.kConnecting,mt.send()}abort(){this._requestAbort=!0,this._xhr&&this._xhr.abort(),this._status=x.kComplete}_onReadyStateChange(Ie){let Ze=Ie.target;if(Ze.readyState===2){if(Ze.responseURL!=null&&Ze.responseURL!==this._requestURL&&this._onURLRedirect){let qe=this._seekHandler.removeURLParameters(Ze.responseURL);this._onURLRedirect(qe)}if(Ze.status!==0&&(Ze.status<200||Ze.status>299))if(this._status=x.kError,this._onError)this._onError(re.HTTP_STATUS_CODE_INVALID,{code:Ze.status,msg:Ze.statusText});else throw new ne("MozChunkedLoader: Http code invalid, "+Ze.status+" "+Ze.statusText);else this._status=x.kBuffering}}_onProgress(Ie){if(this._status===x.kError)return;this._contentLength===null&&Ie.total!==null&&Ie.total!==0&&(this._contentLength=Ie.total,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength));let Ze=Ie.target.response,qe=this._range.from+this._receivedLength;this._receivedLength+=Ze.byteLength,this._onDataArrival&&this._onDataArrival(Ze,qe,this._receivedLength)}_onLoadEnd(Ie){if(this._requestAbort===!0){this._requestAbort=!1;return}else if(this._status===x.kError)return;this._status=x.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1)}_onXhrError(Ie){this._status=x.kError;let Ze=0,qe=null;if(this._contentLength&&Ie.loaded<this._contentLength?(Ze=re.EARLY_EOF,qe={code:-1,msg:"Moz-Chunked stream meet Early-Eof"}):(Ze=re.EXCEPTION,qe={code:-1,msg:Ie.constructor.name+" "+Ie.type}),this._onError)this._onError(Ze,qe);else throw new ne(qe.msg)}}var he=_e;class pe extends null{static isSupported(){try{if(typeof self.MSStream=="undefined"||typeof self.MSStreamReader=="undefined")return!1;let Ie=new XMLHttpRequest;return Ie.open("GET","https://example.com",!0),Ie.responseType="ms-stream",Ie.responseType==="ms-stream"}catch(Ie){return Log.w("MSStreamLoader",Ie.message),!1}}constructor(Ie,Ze){super("xhr-msstream-loader"),this.TAG="MSStreamLoader",this._seekHandler=Ie,this._config=Ze,this._needStash=!0,this._xhr=null,this._reader=null,this._totalRange=null,this._currentRange=null,this._currentRequestURL=null,this._currentRedirectedURL=null,this._contentLength=null,this._receivedLength=0,this._bufferLimit=16*1024*1024,this._lastTimeBufferSize=0,this._isReconnecting=!1}destroy(){this.isWorking()&&this.abort(),this._reader&&(this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr=null),super.destroy()}open(Ie,Ze){this._internalOpen(Ie,Ze,!1)}_internalOpen(Ie,Ze,qe){this._dataSource=Ie,qe?this._currentRange=Ze:this._totalRange=Ze;let st=Ie.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?st=this._currentRedirectedURL:Ie.redirectedURL!=null&&(st=Ie.redirectedURL));let mt=this._seekHandler.getConfig(st,Ze);this._currentRequestURL=mt.url;let Nt=this._reader=new self.MSStreamReader;Nt.onprogress=this._msrOnProgress.bind(this),Nt.onload=this._msrOnLoad.bind(this),Nt.onerror=this._msrOnError.bind(this);let kt=this._xhr=new XMLHttpRequest;if(kt.open("GET",mt.url,!0),kt.responseType="ms-stream",kt.onreadystatechange=this._xhrOnReadyStateChange.bind(this),kt.onerror=this._xhrOnError.bind(this),Ie.withCredentials&&(kt.withCredentials=!0),typeof mt.headers=="object"){let Bt=mt.headers;for(let Jt in Bt)Bt.hasOwnProperty(Jt)&&kt.setRequestHeader(Jt,Bt[Jt])}if(typeof this._config.headers=="object"){let Bt=this._config.headers;for(let Jt in Bt)Bt.hasOwnProperty(Jt)&&kt.setRequestHeader(Jt,Bt[Jt])}this._isReconnecting?this._isReconnecting=!1:this._status=LoaderStatus.kConnecting,kt.send()}abort(){this._internalAbort(),this._status=LoaderStatus.kComplete}_internalAbort(){this._reader&&(this._reader.readyState===1&&this._reader.abort(),this._reader.onprogress=null,this._reader.onload=null,this._reader.onerror=null,this._reader=null),this._xhr&&(this._xhr.abort(),this._xhr.onreadystatechange=null,this._xhr=null)}_xhrOnReadyStateChange(Ie){let Ze=Ie.target;if(Ze.readyState===2)if(Ze.status>=200&&Ze.status<=299){if(this._status=LoaderStatus.kBuffering,Ze.responseURL!=null){let st=this._seekHandler.removeURLParameters(Ze.responseURL);Ze.responseURL!==this._currentRequestURL&&st!==this._currentRedirectedURL&&(this._currentRedirectedURL=st,this._onURLRedirect&&this._onURLRedirect(st))}let qe=Ze.getResponseHeader("Content-Length");if(qe!=null&&this._contentLength==null){let st=parseInt(qe);st>0&&(this._contentLength=st,this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength))}}else if(this._status=LoaderStatus.kError,this._onError)this._onError(LoaderErrors.HTTP_STATUS_CODE_INVALID,{code:Ze.status,msg:Ze.statusText});else throw new RuntimeException("MSStreamLoader: Http code invalid, "+Ze.status+" "+Ze.statusText);else if(Ze.readyState===3&&Ze.status>=200&&Ze.status<=299){this._status=LoaderStatus.kBuffering;let qe=Ze.response;this._reader.readAsArrayBuffer(qe)}}_xhrOnError(Ie){this._status=LoaderStatus.kError;let Ze=LoaderErrors.EXCEPTION,qe={code:-1,msg:Ie.constructor.name+" "+Ie.type};if(this._onError)this._onError(Ze,qe);else throw new RuntimeException(qe.msg)}_msrOnProgress(Ie){let qe=Ie.target.result;if(qe==null){this._doReconnectIfNeeded();return}let st=qe.slice(this._lastTimeBufferSize);this._lastTimeBufferSize=qe.byteLength;let mt=this._totalRange.from+this._receivedLength;this._receivedLength+=st.byteLength,this._onDataArrival&&this._onDataArrival(st,mt,this._receivedLength),qe.byteLength>=this._bufferLimit&&(Log.v(this.TAG,`MSStream buffer exceeded max size near ${mt+st.byteLength}, reconnecting...`),this._doReconnectIfNeeded())}_doReconnectIfNeeded(){if(this._contentLength==null||this._receivedLength<this._contentLength){this._isReconnecting=!0,this._lastTimeBufferSize=0,this._internalAbort();let Ie={from:this._totalRange.from+this._receivedLength,to:-1};this._internalOpen(this._dataSource,Ie,!0)}}_msrOnLoad(Ie){this._status=LoaderStatus.kComplete,this._onComplete&&this._onComplete(this._totalRange.from,this._totalRange.from+this._receivedLength-1)}_msrOnError(Ie){this._status=LoaderStatus.kError;let Ze=0,qe=null;if(this._contentLength&&this._receivedLength<this._contentLength?(Ze=LoaderErrors.EARLY_EOF,qe={code:-1,msg:"MSStream meet Early-Eof"}):(Ze=LoaderErrors.EARLY_EOF,qe={code:-1,msg:Ie.constructor.name+" "+Ie.type}),this._onError)this._onError(Ze,qe);else throw new RuntimeException(qe.msg)}}var ke=null;class Te extends ae{static isSupported(){try{let Ie=new XMLHttpRequest;return Ie.open("GET","https://example.com",!0),Ie.responseType="arraybuffer",Ie.responseType==="arraybuffer"}catch(Ie){return te.w("RangeLoader",Ie.message),!1}}constructor(Ie,Ze){super("xhr-range-loader"),this.TAG="RangeLoader",this._seekHandler=Ie,this._config=Ze,this._needStash=!1,this._chunkSizeKBList=[128,256,384,512,768,1024,1536,2048,3072,4096,5120,6144,7168,8192],this._currentChunkSizeKB=384,this._currentSpeedNormalized=0,this._zeroSpeedChunkCount=0,this._xhr=null,this._speedSampler=new ee,this._requestAbort=!1,this._waitForTotalLength=!1,this._totalLengthReceived=!1,this._currentRequestURL=null,this._currentRedirectedURL=null,this._currentRequestRange=null,this._totalLength=null,this._contentLength=null,this._receivedLength=0,this._lastTimeLoaded=0}destroy(){this.isWorking()&&this.abort(),this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr=null),super.destroy()}get currentSpeed(){return this._speedSampler.lastSecondKBps}open(Ie,Ze){this._dataSource=Ie,this._range=Ze,this._status=x.kConnecting;let qe=!1;this._dataSource.filesize!=null&&this._dataSource.filesize!==0&&(qe=!0,this._totalLength=this._dataSource.filesize),!this._totalLengthReceived&&!qe?(this._waitForTotalLength=!0,this._internalOpen(this._dataSource,{from:0,to:-1})):this._openSubRange()}_openSubRange(){let Ie=this._currentChunkSizeKB*1024,Ze=this._range.from+this._receivedLength,qe=Ze+Ie;this._contentLength!=null&&qe-this._range.from>=this._contentLength&&(qe=this._range.from+this._contentLength-1),this._currentRequestRange={from:Ze,to:qe},this._internalOpen(this._dataSource,this._currentRequestRange)}_internalOpen(Ie,Ze){this._lastTimeLoaded=0;let qe=Ie.url;this._config.reuseRedirectedURL&&(this._currentRedirectedURL!=null?qe=this._currentRedirectedURL:Ie.redirectedURL!=null&&(qe=Ie.redirectedURL));let st=this._seekHandler.getConfig(qe,Ze);this._currentRequestURL=st.url;let mt=this._xhr=new XMLHttpRequest;if(mt.open("GET",st.url,!0),mt.responseType="arraybuffer",mt.onreadystatechange=this._onReadyStateChange.bind(this),mt.onprogress=this._onProgress.bind(this),mt.onload=this._onLoad.bind(this),mt.onerror=this._onXhrError.bind(this),Ie.withCredentials&&(mt.withCredentials=!0),typeof st.headers=="object"){let Nt=st.headers;for(let kt in Nt)Nt.hasOwnProperty(kt)&&mt.setRequestHeader(kt,Nt[kt])}if(typeof this._config.headers=="object"){let Nt=this._config.headers;for(let kt in Nt)Nt.hasOwnProperty(kt)&&mt.setRequestHeader(kt,Nt[kt])}mt.send()}abort(){this._requestAbort=!0,this._internalAbort(),this._status=x.kComplete}_internalAbort(){this._xhr&&(this._xhr.onreadystatechange=null,this._xhr.onprogress=null,this._xhr.onload=null,this._xhr.onerror=null,this._xhr.abort(),this._xhr=null)}_onReadyStateChange(Ie){let Ze=Ie.target;if(Ze.readyState===2){if(Ze.responseURL!=null){let qe=this._seekHandler.removeURLParameters(Ze.responseURL);Ze.responseURL!==this._currentRequestURL&&qe!==this._currentRedirectedURL&&(this._currentRedirectedURL=qe,this._onURLRedirect&&this._onURLRedirect(qe))}if(Ze.status>=200&&Ze.status<=299){if(this._waitForTotalLength)return;this._status=x.kBuffering}else if(this._status=x.kError,this._onError)this._onError(re.HTTP_STATUS_CODE_INVALID,{code:Ze.status,msg:Ze.statusText});else throw new ne("RangeLoader: Http code invalid, "+Ze.status+" "+Ze.statusText)}}_onProgress(Ie){if(this._status===x.kError)return;if(this._contentLength===null){let qe=!1;if(this._waitForTotalLength){this._waitForTotalLength=!1,this._totalLengthReceived=!0,qe=!0;let st=Ie.total;this._internalAbort(),st!=null&st!==0&&(this._totalLength=st)}if(this._range.to===-1?this._contentLength=this._totalLength-this._range.from:this._contentLength=this._range.to-this._range.from+1,qe){this._openSubRange();return}this._onContentLengthKnown&&this._onContentLengthKnown(this._contentLength)}let Ze=Ie.loaded-this._lastTimeLoaded;this._lastTimeLoaded=Ie.loaded,this._speedSampler.addBytes(Ze)}_normalizeSpeed(Ie){let Ze=this._chunkSizeKBList,qe=Ze.length-1,st=0,mt=0,Nt=qe;if(Ie<Ze[0])return Ze[0];for(;mt<=Nt;){if(st=mt+Math.floor((Nt-mt)/2),st===qe||Ie>=Ze[st]&&Ie<Ze[st+1])return Ze[st];Ze[st]<Ie?mt=st+1:Nt=st-1}}_onLoad(Ie){if(this._status===x.kError)return;if(this._waitForTotalLength){this._waitForTotalLength=!1;return}this._lastTimeLoaded=0;let Ze=this._speedSampler.lastSecondKBps;if(Ze===0&&(this._zeroSpeedChunkCount++,this._zeroSpeedChunkCount>=3&&(Ze=this._speedSampler.currentKBps)),Ze!==0){let Nt=this._normalizeSpeed(Ze);this._currentSpeedNormalized!==Nt&&(this._currentSpeedNormalized=Nt,this._currentChunkSizeKB=Nt)}let qe=Ie.target.response,st=this._range.from+this._receivedLength;this._receivedLength+=qe.byteLength;let mt=!1;this._contentLength!=null&&this._receivedLength<this._contentLength?this._openSubRange():mt=!0,this._onDataArrival&&this._onDataArrival(qe,st,this._receivedLength),mt&&(this._status=x.kComplete,this._onComplete&&this._onComplete(this._range.from,this._range.from+this._receivedLength-1))}_onXhrError(Ie){this._status=x.kError;let Ze=0,qe=null;if(this._contentLength&&this._receivedLength>0&&this._receivedLength<this._contentLength?(Ze=re.EARLY_EOF,qe={code:-1,msg:"RangeLoader meet Early-Eof"}):(Ze=re.EXCEPTION,qe={code:-1,msg:Ie.constructor.name+" "+Ie.type}),this._onError)this._onError(Ze,qe);else throw new ne(qe.msg)}}var Ee=Te;class Oe extends ae{static isSupported(){try{return typeof self.WebSocket!="undefined"}catch(Ie){return!1}}constructor(){super("websocket-loader"),this.TAG="WebSocketLoader",this._needStash=!0,this._ws=null,this._requestAbort=!1,this._receivedLength=0}destroy(){this._ws&&this.abort(),super.destroy()}open(Ie){try{let Ze=this._ws=new self.WebSocket(Ie.url);Ze.binaryType="arraybuffer",Ze.onopen=this._onWebSocketOpen.bind(this),Ze.onclose=this._onWebSocketClose.bind(this),Ze.onmessage=this._onWebSocketMessage.bind(this),Ze.onerror=this._onWebSocketError.bind(this),this._status=x.kConnecting}catch(Ze){this._status=x.kError;let qe={code:Ze.code,msg:Ze.message};if(this._onError)this._onError(re.EXCEPTION,qe);else throw new ne(qe.msg)}}abort(){let Ie=this._ws;Ie&&(Ie.readyState===0||Ie.readyState===1)&&(this._requestAbort=!0,Ie.close()),this._ws=null,this._status=x.kComplete}_onWebSocketOpen(Ie){this._status=x.kBuffering}_onWebSocketClose(Ie){if(this._requestAbort===!0){this._requestAbort=!1;return}this._status=x.kComplete,this._onComplete&&this._onComplete(0,this._receivedLength-1)}_onWebSocketMessage(Ie){if(Ie.data instanceof ArrayBuffer)this._dispatchArrayBuffer(Ie.data);else if(Ie.data instanceof Blob){let Ze=new FileReader;Ze.onload=()=>{this._dispatchArrayBuffer(Ze.result)},Ze.readAsArrayBuffer(Ie.data)}else{this._status=x.kError;let Ze={code:-1,msg:"Unsupported WebSocket message type: "+Ie.data.constructor.name};if(this._onError)this._onError(re.EXCEPTION,Ze);else throw new ne(Ze.msg)}}_dispatchArrayBuffer(Ie){let Ze=Ie,qe=this._receivedLength;this._receivedLength+=Ze.byteLength,this._onDataArrival&&this._onDataArrival(Ze,qe,this._receivedLength)}_onWebSocketError(Ie){this._status=x.kError;let Ze={code:Ie.code,msg:Ie.message};if(this._onError)this._onError(re.EXCEPTION,Ze);else throw new ne(Ze.msg)}}var je=Oe;class Pe{constructor(Ie){this._zeroStart=Ie||!1}getConfig(Ie,Ze){let qe={};if(Ze.from!==0||Ze.to!==-1){let st;Ze.to!==-1?st=`bytes=${Ze.from.toString()}-${Ze.to.toString()}`:st=`bytes=${Ze.from.toString()}-`,qe.Range=st}else this._zeroStart&&(qe.Range="bytes=0-");return{url:Ie,headers:qe}}removeURLParameters(Ie){return Ie}}var Qe=Pe;class Xe{constructor(Ie,Ze){this._startName=Ie,this._endName=Ze}getConfig(Ie,Ze){let qe=Ie;if(Ze.from!==0||Ze.to!==-1){let st=!0;qe.indexOf("?")===-1&&(qe+="?",st=!1),st&&(qe+="&"),qe+=`${this._startName}=${Ze.from.toString()}`,Ze.to!==-1&&(qe+=`&${this._endName}=${Ze.to.toString()}`)}return{url:qe,headers:{}}}removeURLParameters(Ie){let Ze=Ie.split("?")[0],qe,st=Ie.indexOf("?");st!==-1&&(qe=Ie.substring(st+1));let mt="";if(qe!=null&&qe.length>0){let Nt=qe.split("&");for(let kt=0;kt<Nt.length;kt++){let Bt=Nt[kt].split("="),Jt=kt>0;Bt[0]!==this._startName&&Bt[0]!==this._endName&&(Jt&&(mt+="&"),mt+=Nt[kt])}}return mt.length===0?Ze:Ze+"?"+mt}}var ot=Xe;class He{constructor(Ie,Ze,qe){this.TAG="IOController",this._config=Ze,this._extraData=qe,this._stashInitialSize=1024*384,Ze.stashInitialSize!=null&&Ze.stashInitialSize>0&&(this._stashInitialSize=Ze.stashInitialSize),this._stashUsed=0,this._stashSize=this._stashInitialSize,this._bufferSize=1024*1024*3,this._stashBuffer=new ArrayBuffer(this._bufferSize),this._stashByteStart=0,this._enableStash=!0,Ze.enableStashBuffer===!1&&(this._enableStash=!1),this._loader=null,this._loaderClass=null,this._seekHandler=null,this._dataSource=Ie,this._isWebSocketURL=/wss?:\/\/(.+?)/.test(Ie.url),this._refTotalLength=Ie.filesize?Ie.filesize:null,this._totalLength=this._refTotalLength,this._fullRequestFlag=!1,this._currentRange=null,this._redirectedURL=null,this._speedNormalized=0,this._speedSampler=new ee,this._speedNormalizeList=[64,128,256,384,512,768,1024,1536,2048,3072,4096],this._isEarlyEofReconnecting=!1,this._paused=!1,this._resumeFrom=0,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._selectSeekHandler(),this._selectLoader(),this._createLoader()}destroy(){this._loader.isWorking()&&this._loader.abort(),this._loader.destroy(),this._loader=null,this._loaderClass=null,this._dataSource=null,this._stashBuffer=null,this._stashUsed=this._stashSize=this._bufferSize=this._stashByteStart=0,this._currentRange=null,this._speedSampler=null,this._isEarlyEofReconnecting=!1,this._onDataArrival=null,this._onSeeked=null,this._onError=null,this._onComplete=null,this._onRedirect=null,this._onRecoveredEarlyEof=null,this._extraData=null}isWorking(){return this._loader&&this._loader.isWorking()&&!this._paused}isPaused(){return this._paused}get status(){return this._loader.status}get extraData(){return this._extraData}set extraData(Ie){this._extraData=Ie}get onDataArrival(){return this._onDataArrival}set onDataArrival(Ie){this._onDataArrival=Ie}get onSeeked(){return this._onSeeked}set onSeeked(Ie){this._onSeeked=Ie}get onError(){return this._onError}set onError(Ie){this._onError=Ie}get onComplete(){return this._onComplete}set onComplete(Ie){this._onComplete=Ie}get onRedirect(){return this._onRedirect}set onRedirect(Ie){this._onRedirect=Ie}get onRecoveredEarlyEof(){return this._onRecoveredEarlyEof}set onRecoveredEarlyEof(Ie){this._onRecoveredEarlyEof=Ie}get currentURL(){return this._dataSource.url}get hasRedirect(){return this._redirectedURL!=null||this._dataSource.redirectedURL!=null}get currentRedirectedURL(){return this._redirectedURL||this._dataSource.redirectedURL}get currentSpeed(){return this._loaderClass===Ee?this._loader.currentSpeed:this._speedSampler.lastSecondKBps}get loaderType(){return this._loader.type}_selectSeekHandler(){let Ie=this._config;if(Ie.seekType==="range")this._seekHandler=new Qe(this._config.rangeLoadZeroStart);else if(Ie.seekType==="param"){let Ze=Ie.seekParamStart||"bstart",qe=Ie.seekParamEnd||"bend";this._seekHandler=new ot(Ze,qe)}else if(Ie.seekType==="custom"){if(typeof Ie.customSeekHandler!="function")throw new b("Custom seekType specified in config but invalid customSeekHandler!");this._seekHandler=new Ie.customSeekHandler}else throw new b(`Invalid seekType in config: ${Ie.seekType}`)}_selectLoader(){if(this._config.customLoader!=null)this._loaderClass=this._config.customLoader;else if(this._isWebSocketURL)this._loaderClass=je;else if(ge.isSupported())this._loaderClass=ge;else if(he.isSupported())this._loaderClass=he;else if(Ee.isSupported())this._loaderClass=Ee;else throw new ne("Your browser doesn't support xhr with arraybuffer responseType!")}_createLoader(){this._loader=new this._loaderClass(this._seekHandler,this._config),this._loader.needStashBuffer===!1&&(this._enableStash=!1),this._loader.onContentLengthKnown=this._onContentLengthKnown.bind(this),this._loader.onURLRedirect=this._onURLRedirect.bind(this),this._loader.onDataArrival=this._onLoaderChunkArrival.bind(this),this._loader.onComplete=this._onLoaderComplete.bind(this),this._loader.onError=this._onLoaderError.bind(this)}open(Ie){this._currentRange={from:0,to:-1},Ie&&(this._currentRange.from=Ie),this._speedSampler.reset(),Ie||(this._fullRequestFlag=!0),this._loader.open(this._dataSource,Object.assign({},this._currentRange))}abort(){this._loader.abort(),this._paused&&(this._paused=!1,this._resumeFrom=0)}pause(){this.isWorking()&&(this._loader.abort(),this._stashUsed!==0?(this._resumeFrom=this._stashByteStart,this._currentRange.to=this._stashByteStart-1):this._resumeFrom=this._currentRange.to+1,this._stashUsed=0,this._stashByteStart=0,this._paused=!0)}resume(){if(this._paused){this._paused=!1;let Ie=this._resumeFrom;this._resumeFrom=0,this._internalSeek(Ie,!0)}}seek(Ie){this._paused=!1,this._stashUsed=0,this._stashByteStart=0,this._internalSeek(Ie,!0)}_internalSeek(Ie,Ze){this._loader.isWorking()&&this._loader.abort(),this._flushStashBuffer(Ze),this._loader.destroy(),this._loader=null;let qe={from:Ie,to:-1};this._currentRange={from:qe.from,to:-1},this._speedSampler.reset(),this._stashSize=this._stashInitialSize,this._createLoader(),this._loader.open(this._dataSource,qe),this._onSeeked&&this._onSeeked()}updateUrl(Ie){if(!Ie||typeof Ie!="string"||Ie.length===0)throw new b("Url must be a non-empty string!");this._dataSource.url=Ie}_expandBuffer(Ie){let Ze=this._stashSize;for(;Ze+1024*1024*1<Ie;)Ze*=2;if(Ze+=1024*1024*1,Ze===this._bufferSize)return;let qe=new ArrayBuffer(Ze);if(this._stashUsed>0){let st=new Uint8Array(this._stashBuffer,0,this._stashUsed);new Uint8Array(qe,0,Ze).set(st,0)}this._stashBuffer=qe,this._bufferSize=Ze}_normalizeSpeed(Ie){let Ze=this._speedNormalizeList,qe=Ze.length-1,st=0,mt=0,Nt=qe;if(Ie<Ze[0])return Ze[0];for(;mt<=Nt;){if(st=mt+Math.floor((Nt-mt)/2),st===qe||Ie>=Ze[st]&&Ie<Ze[st+1])return Ze[st];Ze[st]<Ie?mt=st+1:Nt=st-1}}_adjustStashSize(Ie){let Ze=0;this._config.isLive||Ie<512?Ze=Ie:Ie>=512&&Ie<=1024?Ze=Math.floor(Ie*1.5):Ze=Ie*2,Ze>8192&&(Ze=8192);let qe=Ze*1024+1024*1024*1;this._bufferSize<qe&&this._expandBuffer(qe),this._stashSize=Ze*1024}_dispatchChunks(Ie,Ze){return this._currentRange.to=Ze+Ie.byteLength-1,this._onDataArrival(Ie,Ze)}_onURLRedirect(Ie){this._redirectedURL=Ie,this._onRedirect&&this._onRedirect(Ie)}_onContentLengthKnown(Ie){Ie&&this._fullRequestFlag&&(this._totalLength=Ie,this._fullRequestFlag=!1)}_onLoaderChunkArrival(Ie,Ze,qe){if(!this._onDataArrival)throw new E("IOController: No existing consumer (onDataArrival) callback!");if(this._paused)return;this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,this._onRecoveredEarlyEof&&this._onRecoveredEarlyEof()),this._speedSampler.addBytes(Ie.byteLength);let st=this._speedSampler.lastSecondKBps;if(st!==0){let mt=this._normalizeSpeed(st);this._speedNormalized!==mt&&(this._speedNormalized=mt,this._adjustStashSize(mt))}if(this._enableStash)if(this._stashUsed===0&&this._stashByteStart===0&&(this._stashByteStart=Ze),this._stashUsed+Ie.byteLength<=this._stashSize)new Uint8Array(this._stashBuffer,0,this._stashSize).set(new Uint8Array(Ie),this._stashUsed),this._stashUsed+=Ie.byteLength;else{let mt=new Uint8Array(this._stashBuffer,0,this._bufferSize);if(this._stashUsed>0){let Nt=this._stashBuffer.slice(0,this._stashUsed),kt=this._dispatchChunks(Nt,this._stashByteStart);if(kt<Nt.byteLength){if(kt>0){let Bt=new Uint8Array(Nt,kt);mt.set(Bt,0),this._stashUsed=Bt.byteLength,this._stashByteStart+=kt}}else this._stashUsed=0,this._stashByteStart+=kt;this._stashUsed+Ie.byteLength>this._bufferSize&&(this._expandBuffer(this._stashUsed+Ie.byteLength),mt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),mt.set(new Uint8Array(Ie),this._stashUsed),this._stashUsed+=Ie.byteLength}else{let Nt=this._dispatchChunks(Ie,Ze);if(Nt<Ie.byteLength){let kt=Ie.byteLength-Nt;kt>this._bufferSize&&(this._expandBuffer(kt),mt=new Uint8Array(this._stashBuffer,0,this._bufferSize)),mt.set(new Uint8Array(Ie,Nt),0),this._stashUsed+=kt,this._stashByteStart=Ze+Nt}}}else if(this._stashUsed===0){let mt=this._dispatchChunks(Ie,Ze);if(mt<Ie.byteLength){let Nt=Ie.byteLength-mt;Nt>this._bufferSize&&this._expandBuffer(Nt),new Uint8Array(this._stashBuffer,0,this._bufferSize).set(new Uint8Array(Ie,mt),0),this._stashUsed+=Nt,this._stashByteStart=Ze+mt}}else{this._stashUsed+Ie.byteLength>this._bufferSize&&this._expandBuffer(this._stashUsed+Ie.byteLength);let mt=new Uint8Array(this._stashBuffer,0,this._bufferSize);mt.set(new Uint8Array(Ie),this._stashUsed),this._stashUsed+=Ie.byteLength;let Nt=this._dispatchChunks(this._stashBuffer.slice(0,this._stashUsed),this._stashByteStart);if(Nt<this._stashUsed&&Nt>0){let kt=new Uint8Array(this._stashBuffer,Nt);mt.set(kt,0)}this._stashUsed-=Nt,this._stashByteStart+=Nt}}_flushStashBuffer(Ie){if(this._stashUsed>0){let Ze=this._stashBuffer.slice(0,this._stashUsed),qe=this._dispatchChunks(Ze,this._stashByteStart),st=Ze.byteLength-qe;if(qe<Ze.byteLength)if(Ie)te.w(this.TAG,`${st} bytes unconsumed data remain when flush buffer, dropped`);else{if(qe>0){let mt=new Uint8Array(this._stashBuffer,0,this._bufferSize),Nt=new Uint8Array(Ze,qe);mt.set(Nt,0),this._stashUsed=Nt.byteLength,this._stashByteStart+=qe}return 0}return this._stashUsed=0,this._stashByteStart=0,st}return 0}_onLoaderComplete(Ie,Ze){this._flushStashBuffer(!0),this._onComplete&&this._onComplete(this._extraData)}_onLoaderError(Ie,Ze){switch(te.e(this.TAG,`Loader error, code = ${Ze.code}, msg = ${Ze.msg}`),this._flushStashBuffer(!1),this._isEarlyEofReconnecting&&(this._isEarlyEofReconnecting=!1,Ie=re.UNRECOVERABLE_EARLY_EOF),Ie){case re.EARLY_EOF:{if(!this._config.isLive&&this._totalLength){let qe=this._currentRange.to+1;qe<this._totalLength&&(te.w(this.TAG,"Connection lost, trying reconnect..."),this._isEarlyEofReconnecting=!0,this._internalSeek(qe,!1));return}Ie=re.UNRECOVERABLE_EARLY_EOF;break}case re.UNRECOVERABLE_EARLY_EOF:case re.CONNECTING_TIMEOUT:case re.HTTP_STATUS_CODE_INVALID:case re.EXCEPTION:break}if(this._onError)this._onError(Ie,Ze);else throw new ne("IOException: "+Ze.msg)}}var rt=He;const Ye={enableWorker:!1,enableStashBuffer:!0,stashInitialSize:void 0,isLive:!1,lazyLoad:!0,lazyLoadMaxDuration:3*60,lazyLoadRecoverDuration:30,deferLoadAfterSourceOpen:!0,autoCleanupMaxBackwardDuration:3*60,autoCleanupMinBackwardDuration:2*60,statisticsInfoReportInterval:600,fixAudioTimestampGap:!0,accurateSeek:!1,seekType:"range",seekParamStart:"bstart",seekParamEnd:"bend",rangeLoadZeroStart:!1,customSeekHandler:void 0,reuseRedirectedURL:!1,headers:void 0,customLoader:void 0};function ut(){return Object.assign({},Ye)}class Ge{static supportMSEH264Playback(){return window.MediaSource&&window.MediaSource.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"')}static supportNetworkStreamIO(){let Ie=new rt({},ut()),Ze=Ie.loaderType;return Ie.destroy(),Ze=="fetch-stream-loader"||Ze=="xhr-moz-chunked-loader"}static getNetworkLoaderTypeName(){let Ie=new rt({},ut()),Ze=Ie.loaderType;return Ie.destroy(),Ze}static supportNativeMediaPlayback(Ie){Ge.videoElement==null&&(Ge.videoElement=window.document.createElement("video"));let Ze=Ge.videoElement.canPlayType(Ie);return Ze==="probably"||Ze=="maybe"}static getFeatureList(){let Ie={mseFlvPlayback:!1,mseLiveFlvPlayback:!1,networkStreamIO:!1,networkLoaderName:"",nativeMP4H264Playback:!1,nativeWebmVP8Playback:!1,nativeWebmVP9Playback:!1};return Ie.mseFlvPlayback=Ge.supportMSEH264Playback(),Ie.networkStreamIO=Ge.supportNetworkStreamIO(),Ie.networkLoaderName=Ge.getNetworkLoaderTypeName(),Ie.mseLiveFlvPlayback=Ie.mseFlvPlayback&&Ie.networkStreamIO,Ie.nativeMP4H264Playback=Ge.supportNativeMediaPlayback('video/mp4; codecs="avc1.42001E, mp4a.40.2"'),Ie.nativeWebmVP8Playback=Ge.supportNativeMediaPlayback('video/webm; codecs="vp8.0, vorbis"'),Ie.nativeWebmVP9Playback=Ge.supportNativeMediaPlayback('video/webm; codecs="vp9"'),Ie}}var ze=Ge,$e={ERROR:"error",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info"};class nt{static get forceGlobalTag(){return te.FORCE_GLOBAL_TAG}static set forceGlobalTag(Ie){te.FORCE_GLOBAL_TAG=Ie,nt._notifyChange()}static get globalTag(){return te.GLOBAL_TAG}static set globalTag(Ie){te.GLOBAL_TAG=Ie,nt._notifyChange()}static get enableAll(){return te.ENABLE_VERBOSE&&te.ENABLE_DEBUG&&te.ENABLE_INFO&&te.ENABLE_WARN&&te.ENABLE_ERROR}static set enableAll(Ie){te.ENABLE_VERBOSE=Ie,te.ENABLE_DEBUG=Ie,te.ENABLE_INFO=Ie,te.ENABLE_WARN=Ie,te.ENABLE_ERROR=Ie,nt._notifyChange()}static get enableDebug(){return te.ENABLE_DEBUG}static set enableDebug(Ie){te.ENABLE_DEBUG=Ie,nt._notifyChange()}static get enableVerbose(){return te.ENABLE_VERBOSE}static set enableVerbose(Ie){te.ENABLE_VERBOSE=Ie,nt._notifyChange()}static get enableInfo(){return te.ENABLE_INFO}static set enableInfo(Ie){te.ENABLE_INFO=Ie,nt._notifyChange()}static get enableWarn(){return te.ENABLE_WARN}static set enableWarn(Ie){te.ENABLE_WARN=Ie,nt._notifyChange()}static get enableError(){return te.ENABLE_ERROR}static set enableError(Ie){te.ENABLE_ERROR=Ie,nt._notifyChange()}static getConfig(){return{globalTag:te.GLOBAL_TAG,forceGlobalTag:te.FORCE_GLOBAL_TAG,enableVerbose:te.ENABLE_VERBOSE,enableDebug:te.ENABLE_DEBUG,enableInfo:te.ENABLE_INFO,enableWarn:te.ENABLE_WARN,enableError:te.ENABLE_ERROR,enableCallback:te.ENABLE_CALLBACK}}static applyConfig(Ie){te.GLOBAL_TAG=Ie.globalTag,te.FORCE_GLOBAL_TAG=Ie.forceGlobalTag,te.ENABLE_VERBOSE=Ie.enableVerbose,te.ENABLE_DEBUG=Ie.enableDebug,te.ENABLE_INFO=Ie.enableInfo,te.ENABLE_WARN=Ie.enableWarn,te.ENABLE_ERROR=Ie.enableError,te.ENABLE_CALLBACK=Ie.enableCallback}static _notifyChange(){let Ie=nt.emitter;if(Ie.listenerCount("change")>0){let Ze=nt.getConfig();Ie.emit("change",Ze)}}static registerListener(Ie){nt.emitter.addListener("change",Ie)}static removeListener(Ie){nt.emitter.removeListener("change",Ie)}static addLogListener(Ie){te.emitter.addListener("log",Ie),te.emitter.listenerCount("log")>0&&(te.ENABLE_CALLBACK=!0,nt._notifyChange())}static removeLogListener(Ie){te.emitter.removeListener("log",Ie),te.emitter.listenerCount("log")===0&&(te.ENABLE_CALLBACK=!1,nt._notifyChange())}}nt.emitter=new(ue());var et=nt;class pt{constructor(){this.mimeType=null,this.duration=null,this.hasAudio=null,this.hasVideo=null,this.audioCodec=null,this.videoCodec=null,this.audioDataRate=null,this.videoDataRate=null,this.audioSampleRate=null,this.audioChannelCount=null,this.width=null,this.height=null,this.fps=null,this.profile=null,this.level=null,this.refFrames=null,this.chromaFormat=null,this.sarNum=null,this.sarDen=null,this.metadata=null,this.segments=null,this.segmentCount=null,this.hasKeyframesIndex=null,this.keyframesIndex=null}isComplete(){let Ie=this.hasAudio===!1||this.hasAudio===!0&&this.audioCodec!=null&&this.audioSampleRate!=null&&this.audioChannelCount!=null,Ze=this.hasVideo===!1||this.hasVideo===!0&&this.videoCodec!=null&&this.width!=null&&this.height!=null&&this.fps!=null&&this.profile!=null&&this.level!=null&&this.refFrames!=null&&this.chromaFormat!=null&&this.sarNum!=null&&this.sarDen!=null;return this.mimeType!=null&&this.duration!=null&&this.metadata!=null&&this.hasKeyframesIndex!=null&&Ie&&Ze}isSeekable(){return this.hasKeyframesIndex===!0}getNearestKeyframe(Ie){if(this.keyframesIndex==null)return null;let Ze=this.keyframesIndex,qe=this._search(Ze.times,Ie);return{index:qe,milliseconds:Ze.times[qe],fileposition:Ze.filepositions[qe]}}_search(Ie,Ze){let qe=0,st=Ie.length-1,mt=0,Nt=0,kt=st;for(Ze<Ie[0]&&(qe=0,Nt=kt+1);Nt<=kt;)if(mt=Nt+Math.floor((kt-Nt)/2),mt===st||Ze>=Ie[mt]&&Ze<Ie[mt+1]){qe=mt;break}else Ie[mt]<Ze?Nt=mt+1:kt=mt-1;return qe}}var ct=pt;function It($t,Ie,Ze){let qe=$t;if(Ie+Ze<qe.length){for(;Ze--;)if((qe[++Ie]&192)!==128)return!1;return!0}else return!1}function dt($t){let Ie=[],Ze=$t,qe=0,st=$t.length;for(;qe<st;){if(Ze[qe]<128){Ie.push(String.fromCharCode(Ze[qe])),++qe;continue}else if(!(Ze[qe]<192)){if(Ze[qe]<224){if(It(Ze,qe,1)){let mt=(Ze[qe]&31)<<6|Ze[qe+1]&63;if(mt>=128){Ie.push(String.fromCharCode(mt&65535)),qe+=2;continue}}}else if(Ze[qe]<240){if(It(Ze,qe,2)){let mt=(Ze[qe]&15)<<12|(Ze[qe+1]&63)<<6|Ze[qe+2]&63;if(mt>=2048&&(mt&63488)!==55296){Ie.push(String.fromCharCode(mt&65535)),qe+=3;continue}}}else if(Ze[qe]<248&&It(Ze,qe,3)){let mt=(Ze[qe]&7)<<18|(Ze[qe+1]&63)<<12|(Ze[qe+2]&63)<<6|Ze[qe+3]&63;if(mt>65536&&mt<1114112){mt-=65536,Ie.push(String.fromCharCode(mt>>>10|55296)),Ie.push(String.fromCharCode(mt&1023|56320)),qe+=4;continue}}}Ie.push("\uFFFD"),++qe}return Ie.join("")}var Mt=dt;let xt=function(){let $t=new ArrayBuffer(2);return new DataView($t).setInt16(0,256,!0),new Int16Array($t)[0]===256}();class gt{static parseScriptData(Ie,Ze,qe){let st={};try{let mt=gt.parseValue(Ie,Ze,qe),Nt=gt.parseValue(Ie,Ze+mt.size,qe-mt.size);st[mt.data]=Nt.data}catch(mt){te.e("AMF",mt.toString())}return st}static parseObject(Ie,Ze,qe){if(qe<3)throw new E("Data not enough when parse ScriptDataObject");let st=gt.parseString(Ie,Ze,qe),mt=gt.parseValue(Ie,Ze+st.size,qe-st.size),Nt=mt.objectEnd;return{data:{name:st.data,value:mt.data},size:st.size+mt.size,objectEnd:Nt}}static parseVariable(Ie,Ze,qe){return gt.parseObject(Ie,Ze,qe)}static parseString(Ie,Ze,qe){if(qe<2)throw new E("Data not enough when parse String");let mt=new DataView(Ie,Ze,qe).getUint16(0,!xt),Nt;return mt>0?Nt=Mt(new Uint8Array(Ie,Ze+2,mt)):Nt="",{data:Nt,size:2+mt}}static parseLongString(Ie,Ze,qe){if(qe<4)throw new E("Data not enough when parse LongString");let mt=new DataView(Ie,Ze,qe).getUint32(0,!xt),Nt;return mt>0?Nt=Mt(new Uint8Array(Ie,Ze+4,mt)):Nt="",{data:Nt,size:4+mt}}static parseDate(Ie,Ze,qe){if(qe<10)throw new E("Data size invalid when parse Date");let st=new DataView(Ie,Ze,qe),mt=st.getFloat64(0,!xt),Nt=st.getInt16(8,!xt);return mt+=Nt*60*1e3,{data:new Date(mt),size:10}}static parseValue(Ie,Ze,qe){if(qe<1)throw new E("Data not enough when parse Value");let st=new DataView(Ie,Ze,qe),mt=1,Nt=st.getUint8(0),kt,Bt=!1;try{switch(Nt){case 0:kt=st.getFloat64(1,!xt),mt+=8;break;case 1:{kt=!!st.getUint8(1),mt+=1;break}case 2:{let Jt=gt.parseString(Ie,Ze+1,qe-1);kt=Jt.data,mt+=Jt.size;break}case 3:{kt={};let Jt=0;for((st.getUint32(qe-4,!xt)&16777215)===9&&(Jt=3);mt<qe-4;){let En=gt.parseObject(Ie,Ze+mt,qe-mt-Jt);if(En.objectEnd)break;kt[En.data.name]=En.data.value,mt+=En.size}mt<=qe-3&&(st.getUint32(mt-1,!xt)&16777215)===9&&(mt+=3);break}case 8:{kt={},mt+=4;let Jt=0;for((st.getUint32(qe-4,!xt)&16777215)===9&&(Jt=3);mt<qe-8;){let En=gt.parseVariable(Ie,Ze+mt,qe-mt-Jt);if(En.objectEnd)break;kt[En.data.name]=En.data.value,mt+=En.size}mt<=qe-3&&(st.getUint32(mt-1,!xt)&16777215)===9&&(mt+=3);break}case 9:kt=void 0,mt=1,Bt=!0;break;case 10:{kt=[];let Jt=st.getUint32(1,!xt);mt+=4;for(let En=0;En<Jt;En++){let qn=gt.parseValue(Ie,Ze+mt,qe-mt);kt.push(qn.data),mt+=qn.size}break}case 11:{let Jt=gt.parseDate(Ie,Ze+1,qe-1);kt=Jt.data,mt+=Jt.size;break}case 12:{let Jt=gt.parseString(Ie,Ze+1,qe-1);kt=Jt.data,mt+=Jt.size;break}default:mt=qe,te.w("AMF","Unsupported AMF value type "+Nt)}}catch(Jt){te.e("AMF",Jt.toString())}return{data:kt,size:mt,objectEnd:Bt}}}var _t=gt;class We{constructor(Ie){this.TAG="ExpGolomb",this._buffer=Ie,this._buffer_index=0,this._total_bytes=Ie.byteLength,this._total_bits=Ie.byteLength*8,this._current_word=0,this._current_word_bits_left=0}destroy(){this._buffer=null}_fillCurrentWord(){let Ie=this._total_bytes-this._buffer_index;if(Ie<=0)throw new E("ExpGolomb: _fillCurrentWord() but no bytes available");let Ze=Math.min(4,Ie),qe=new Uint8Array(4);qe.set(this._buffer.subarray(this._buffer_index,this._buffer_index+Ze)),this._current_word=new DataView(qe.buffer).getUint32(0,!1),this._buffer_index+=Ze,this._current_word_bits_left=Ze*8}readBits(Ie){if(Ie>32)throw new b("ExpGolomb: readBits() bits exceeded max 32bits!");if(Ie<=this._current_word_bits_left){let Nt=this._current_word>>>32-Ie;return this._current_word<<=Ie,this._current_word_bits_left-=Ie,Nt}let Ze=this._current_word_bits_left?this._current_word:0;Ze=Ze>>>32-this._current_word_bits_left;let qe=Ie-this._current_word_bits_left;this._fillCurrentWord();let st=Math.min(qe,this._current_word_bits_left),mt=this._current_word>>>32-st;return this._current_word<<=st,this._current_word_bits_left-=st,Ze=Ze<<st|mt,Ze}readBool(){return this.readBits(1)===1}readByte(){return this.readBits(8)}_skipLeadingZero(){let Ie;for(Ie=0;Ie<this._current_word_bits_left;Ie++)if(this._current_word&2147483648>>>Ie)return this._current_word<<=Ie,this._current_word_bits_left-=Ie,Ie;return this._fillCurrentWord(),Ie+this._skipLeadingZero()}readUEG(){let Ie=this._skipLeadingZero();return this.readBits(Ie+1)-1}readSEG(){let Ie=this.readUEG();return Ie&1?Ie+1>>>1:-1*(Ie>>>1)}}var Ae=We;class Se{static _ebsp2rbsp(Ie){let Ze=Ie,qe=Ze.byteLength,st=new Uint8Array(qe),mt=0;for(let Nt=0;Nt<qe;Nt++)Nt>=2&&Ze[Nt]===3&&Ze[Nt-1]===0&&Ze[Nt-2]===0||(st[mt]=Ze[Nt],mt++);return new Uint8Array(st.buffer,0,mt)}static parseSPS(Ie){let Ze=Se._ebsp2rbsp(Ie),qe=new Ae(Ze);qe.readByte();let st=qe.readByte();qe.readByte();let mt=qe.readByte();qe.readUEG();let Nt=Se.getProfileString(st),kt=Se.getLevelString(mt),Bt=1,Jt=420,En=[0,420,422,444],qn=8;if((st===100||st===110||st===122||st===244||st===44||st===83||st===86||st===118||st===128||st===138||st===144)&&(Bt=qe.readUEG(),Bt===3&&qe.readBits(1),Bt<=3&&(Jt=En[Bt]),qn=qe.readUEG()+8,qe.readUEG(),qe.readBits(1),qe.readBool())){let Dr=Bt!==3?8:12;for(let Hr=0;Hr<Dr;Hr++)qe.readBool()&&(Hr<6?Se._skipScalingList(qe,16):Se._skipScalingList(qe,64))}qe.readUEG();let At=qe.readUEG();if(At===0)qe.readUEG();else if(At===1){qe.readBits(1),qe.readSEG(),qe.readSEG();let Dr=qe.readUEG();for(let Hr=0;Hr<Dr;Hr++)qe.readSEG()}let St=qe.readUEG();qe.readBits(1);let an=qe.readUEG(),Ht=qe.readUEG(),Et=qe.readBits(1);Et===0&&qe.readBits(1),qe.readBits(1);let Ut=0,nn=0,rn=0,gn=0;qe.readBool()&&(Ut=qe.readUEG(),nn=qe.readUEG(),rn=qe.readUEG(),gn=qe.readUEG());let An=1,Gt=1,Vt=0,wn=!0,jn=0,Wn=0;if(qe.readBool()){if(qe.readBool()){let Dr=qe.readByte(),Hr=[1,12,10,16,40,24,20,32,80,18,15,64,160,4,3,2],Qr=[1,11,11,11,33,11,11,11,33,11,11,33,99,3,2,1];Dr>0&&Dr<16?(An=Hr[Dr-1],Gt=Qr[Dr-1]):Dr===255&&(An=qe.readByte()<<8|qe.readByte(),Gt=qe.readByte()<<8|qe.readByte())}if(qe.readBool()&&qe.readBool(),qe.readBool()&&(qe.readBits(4),qe.readBool()&&qe.readBits(24)),qe.readBool()&&(qe.readUEG(),qe.readUEG()),qe.readBool()){let Dr=qe.readBits(32),Hr=qe.readBits(32);wn=qe.readBool(),jn=Hr,Wn=Dr*2,Vt=jn/Wn}}let kr=1;(An!==1||Gt!==1)&&(kr=An/Gt);let Sr=0,Yr=0;if(Bt===0)Sr=1,Yr=2-Et;else{let Dr=Bt===3?1:2,Hr=Bt===1?2:1;Sr=Dr,Yr=Hr*(2-Et)}let _r=(an+1)*16,Ur=(2-Et)*((Ht+1)*16);_r-=(Ut+nn)*Sr,Ur-=(rn+gn)*Yr;let wr=Math.ceil(_r*kr);return qe.destroy(),qe=null,{profile_string:Nt,level_string:kt,bit_depth:qn,ref_frames:St,chroma_format:Jt,chroma_format_string:Se.getChromaFormatString(Jt),frame_rate:{fixed:wn,fps:Vt,fps_den:Wn,fps_num:jn},sar_ratio:{width:An,height:Gt},codec_size:{width:_r,height:Ur},present_size:{width:wr,height:Ur}}}static _skipScalingList(Ie,Ze){let qe=8,st=8,mt=0;for(let Nt=0;Nt<Ze;Nt++)st!==0&&(mt=Ie.readSEG(),st=(qe+mt+256)%256),qe=st===0?qe:st}static getProfileString(Ie){switch(Ie){case 66:return"Baseline";case 77:return"Main";case 88:return"Extended";case 100:return"High";case 110:return"High10";case 122:return"High422";case 244:return"High444";default:return"Unknown"}}static getLevelString(Ie){return(Ie/10).toFixed(1)}static getChromaFormatString(Ie){switch(Ie){case 420:return"4:2:0";case 422:return"4:2:2";case 444:return"4:4:4";default:return"Unknown"}}}var Be=Se,Ne={OK:"OK",FORMAT_ERROR:"FormatError",FORMAT_UNSUPPORTED:"FormatUnsupported",CODEC_UNSUPPORTED:"CodecUnsupported"};function De($t){return $t>>>8&255|($t&255)<<8}function we($t){return($t&4278190080)>>>24|($t&16711680)>>>8|($t&65280)<<8|($t&255)<<24}function Le($t,Ie){return $t[Ie]<<24|$t[Ie+1]<<16|$t[Ie+2]<<8|$t[Ie+3]}class Ue{constructor(Ie,Ze){this.TAG="FLVDemuxer",this._config=Ze,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null,this._dataOffset=Ie.dataOffset,this._firstParse=!0,this._dispatch=!1,this._hasAudio=Ie.hasAudioTrack,this._hasVideo=Ie.hasVideoTrack,this._hasAudioFlagOverrided=!1,this._hasVideoFlagOverrided=!1,this._audioInitialMetadataDispatched=!1,this._videoInitialMetadataDispatched=!1,this._mediaInfo=new ct,this._mediaInfo.hasAudio=this._hasAudio,this._mediaInfo.hasVideo=this._hasVideo,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._naluLengthSize=4,this._timestampBase=0,this._timescale=1e3,this._duration=0,this._durationOverrided=!1,this._referenceFrameRate={fixed:!0,fps:23.976,fps_num:23976,fps_den:1e3},this._flvSoundRateTable=[5500,11025,22050,44100,48e3],this._mpegSamplingRates=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350],this._mpegAudioV10SampleRateTable=[44100,48e3,32e3,0],this._mpegAudioV20SampleRateTable=[22050,24e3,16e3,0],this._mpegAudioV25SampleRateTable=[11025,12e3,8e3,0],this._mpegAudioL1BitRateTable=[0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,-1],this._mpegAudioL2BitRateTable=[0,32,48,56,64,80,96,112,128,160,192,224,256,320,384,-1],this._mpegAudioL3BitRateTable=[0,32,40,48,56,64,80,96,112,128,160,192,224,256,320,-1],this._videoTrack={type:"video",id:1,sequenceNumber:0,samples:[],length:0},this._audioTrack={type:"audio",id:2,sequenceNumber:0,samples:[],length:0},this._littleEndian=function(){let qe=new ArrayBuffer(2);return new DataView(qe).setInt16(0,256,!0),new Int16Array(qe)[0]===256}()}destroy(){this._mediaInfo=null,this._metadata=null,this._audioMetadata=null,this._videoMetadata=null,this._videoTrack=null,this._audioTrack=null,this._onError=null,this._onMediaInfo=null,this._onMetaDataArrived=null,this._onScriptDataArrived=null,this._onTrackMetadata=null,this._onDataAvailable=null}static probe(Ie){let Ze=new Uint8Array(Ie),qe={match:!1};if(Ze[0]!==70||Ze[1]!==76||Ze[2]!==86||Ze[3]!==1)return qe;let st=(Ze[4]&4)>>>2!==0,mt=(Ze[4]&1)!==0,Nt=Le(Ze,5);return Nt<9?qe:{match:!0,consumed:Nt,dataOffset:Nt,hasAudioTrack:st,hasVideoTrack:mt}}bindDataSource(Ie){return Ie.onDataArrival=this.parseChunks.bind(this),this}get onTrackMetadata(){return this._onTrackMetadata}set onTrackMetadata(Ie){this._onTrackMetadata=Ie}get onMediaInfo(){return this._onMediaInfo}set onMediaInfo(Ie){this._onMediaInfo=Ie}get onMetaDataArrived(){return this._onMetaDataArrived}set onMetaDataArrived(Ie){this._onMetaDataArrived=Ie}get onScriptDataArrived(){return this._onScriptDataArrived}set onScriptDataArrived(Ie){this._onScriptDataArrived=Ie}get onError(){return this._onError}set onError(Ie){this._onError=Ie}get onDataAvailable(){return this._onDataAvailable}set onDataAvailable(Ie){this._onDataAvailable=Ie}get timestampBase(){return this._timestampBase}set timestampBase(Ie){this._timestampBase=Ie}get overridedDuration(){return this._duration}set overridedDuration(Ie){this._durationOverrided=!0,this._duration=Ie,this._mediaInfo.duration=Ie}set overridedHasAudio(Ie){this._hasAudioFlagOverrided=!0,this._hasAudio=Ie,this._mediaInfo.hasAudio=Ie}set overridedHasVideo(Ie){this._hasVideoFlagOverrided=!0,this._hasVideo=Ie,this._mediaInfo.hasVideo=Ie}resetMediaInfo(){this._mediaInfo=new ct}_isInitialMetadataDispatched(){return this._hasAudio&&this._hasVideo?this._audioInitialMetadataDispatched&&this._videoInitialMetadataDispatched:this._hasAudio&&!this._hasVideo?this._audioInitialMetadataDispatched:!this._hasAudio&&this._hasVideo?this._videoInitialMetadataDispatched:!1}parseChunks(Ie,Ze){if(!this._onError||!this._onMediaInfo||!this._onTrackMetadata||!this._onDataAvailable)throw new E("Flv: onError & onMediaInfo & onTrackMetadata & onDataAvailable callback must be specified");let qe=0,st=this._littleEndian;if(Ze===0)if(Ie.byteLength>13)qe=Ue.probe(Ie).dataOffset;else return 0;for(this._firstParse&&(this._firstParse=!1,Ze+qe!==this._dataOffset&&te.w(this.TAG,"First time parsing but chunk byteStart invalid!"),new DataView(Ie,qe).getUint32(0,!st)!==0&&te.w(this.TAG,"PrevTagSize0 !== 0 !!!"),qe+=4);qe<Ie.byteLength;){this._dispatch=!0;let mt=new DataView(Ie,qe);if(qe+11+4>Ie.byteLength)break;let Nt=mt.getUint8(0),kt=mt.getUint32(0,!st)&16777215;if(qe+11+kt+4>Ie.byteLength)break;if(Nt!==8&&Nt!==9&&Nt!==18){te.w(this.TAG,`Unsupported tag type ${Nt}, skipped`),qe+=11+kt+4;continue}let Bt=mt.getUint8(4),Jt=mt.getUint8(5),En=mt.getUint8(6),qn=mt.getUint8(7),At=En|Jt<<8|Bt<<16|qn<<24;(mt.getUint32(7,!st)&16777215)!==0&&te.w(this.TAG,"Meet tag which has StreamID != 0!");let an=qe+11;switch(Nt){case 8:this._parseAudioData(Ie,an,kt,At);break;case 9:this._parseVideoData(Ie,an,kt,At,Ze+qe);break;case 18:this._parseScriptData(Ie,an,kt);break}let Ht=mt.getUint32(11+kt,!st);Ht!==11+kt&&te.w(this.TAG,`Invalid PrevTagSize ${Ht}`),qe+=11+kt+4}return this._isInitialMetadataDispatched()&&this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack),qe}_parseScriptData(Ie,Ze,qe){let st=_t.parseScriptData(Ie,Ze,qe);if(st.hasOwnProperty("onMetaData")){if(st.onMetaData==null||typeof st.onMetaData!="object"){te.w(this.TAG,"Invalid onMetaData structure!");return}this._metadata&&te.w(this.TAG,"Found another onMetaData tag!"),this._metadata=st;let mt=this._metadata.onMetaData;if(this._onMetaDataArrived&&this._onMetaDataArrived(Object.assign({},mt)),typeof mt.hasAudio=="boolean"&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=mt.hasAudio,this._mediaInfo.hasAudio=this._hasAudio),typeof mt.hasVideo=="boolean"&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=mt.hasVideo,this._mediaInfo.hasVideo=this._hasVideo),typeof mt.audiodatarate=="number"&&(this._mediaInfo.audioDataRate=mt.audiodatarate),typeof mt.videodatarate=="number"&&(this._mediaInfo.videoDataRate=mt.videodatarate),typeof mt.width=="number"&&(this._mediaInfo.width=mt.width),typeof mt.height=="number"&&(this._mediaInfo.height=mt.height),typeof mt.duration=="number"){if(!this._durationOverrided){let Nt=Math.floor(mt.duration*this._timescale);this._duration=Nt,this._mediaInfo.duration=Nt}}else this._mediaInfo.duration=0;if(typeof mt.framerate=="number"){let Nt=Math.floor(mt.framerate*1e3);if(Nt>0){let kt=Nt/1e3;this._referenceFrameRate.fixed=!0,this._referenceFrameRate.fps=kt,this._referenceFrameRate.fps_num=Nt,this._referenceFrameRate.fps_den=1e3,this._mediaInfo.fps=kt}}if(typeof mt.keyframes=="object"){this._mediaInfo.hasKeyframesIndex=!0;let Nt=mt.keyframes;this._mediaInfo.keyframesIndex=this._parseKeyframesIndex(Nt),mt.keyframes=null}else this._mediaInfo.hasKeyframesIndex=!1;this._dispatch=!1,this._mediaInfo.metadata=mt,te.v(this.TAG,"Parsed onMetaData"),this._mediaInfo.isComplete()&&this._onMediaInfo(this._mediaInfo)}Object.keys(st).length>0&&this._onScriptDataArrived&&this._onScriptDataArrived(Object.assign({},st))}_parseKeyframesIndex(Ie){let Ze=[],qe=[];for(let st=1;st<Ie.times.length;st++){let mt=this._timestampBase+Math.floor(Ie.times[st]*1e3);Ze.push(mt),qe.push(Ie.filepositions[st])}return{times:Ze,filepositions:qe}}_parseAudioData(Ie,Ze,qe,st){if(qe<=1){te.w(this.TAG,"Flv: Invalid audio packet, missing SoundData payload!");return}if(this._hasAudioFlagOverrided===!0&&this._hasAudio===!1)return;let mt=this._littleEndian,kt=new DataView(Ie,Ze,qe).getUint8(0),Bt=kt>>>4;if(Bt!==2&&Bt!==10){this._onError(Ne.CODEC_UNSUPPORTED,"Flv: Unsupported audio codec idx: "+Bt);return}let Jt=0,En=(kt&12)>>>2;if(En>=0&&En<=4)Jt=this._flvSoundRateTable[En];else{this._onError(Ne.FORMAT_ERROR,"Flv: Invalid audio sample rate idx: "+En);return}let qn=(kt&2)>>>1,At=kt&1,St=this._audioMetadata,an=this._audioTrack;if(St||(this._hasAudio===!1&&this._hasAudioFlagOverrided===!1&&(this._hasAudio=!0,this._mediaInfo.hasAudio=!0),St=this._audioMetadata={},St.type="audio",St.id=an.id,St.timescale=this._timescale,St.duration=this._duration,St.audioSampleRate=Jt,St.channelCount=At===0?1:2),Bt===10){let Ht=this._parseAACAudioData(Ie,Ze+1,qe-1);if(Ht==null)return;if(Ht.packetType===0){St.config&&te.w(this.TAG,"Found another AudioSpecificConfig!");let Et=Ht.data;St.audioSampleRate=Et.samplingRate,St.channelCount=Et.channelCount,St.codec=Et.codec,St.originalCodec=Et.originalCodec,St.config=Et.config,St.refSampleDuration=1024/St.audioSampleRate*St.timescale,te.v(this.TAG,"Parsed AudioSpecificConfig"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._audioInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("audio",St);let Ut=this._mediaInfo;Ut.audioCodec=St.originalCodec,Ut.audioSampleRate=St.audioSampleRate,Ut.audioChannelCount=St.channelCount,Ut.hasVideo?Ut.videoCodec!=null&&(Ut.mimeType='video/x-flv; codecs="'+Ut.videoCodec+","+Ut.audioCodec+'"'):Ut.mimeType='video/x-flv; codecs="'+Ut.audioCodec+'"',Ut.isComplete()&&this._onMediaInfo(Ut)}else if(Ht.packetType===1){let Et=this._timestampBase+st,Ut={unit:Ht.data,length:Ht.data.byteLength,dts:Et,pts:Et};an.samples.push(Ut),an.length+=Ht.data.length}else te.e(this.TAG,`Flv: Unsupported AAC data type ${Ht.packetType}`)}else if(Bt===2){if(!St.codec){let nn=this._parseMP3AudioData(Ie,Ze+1,qe-1,!0);if(nn==null)return;St.audioSampleRate=nn.samplingRate,St.channelCount=nn.channelCount,St.codec=nn.codec,St.originalCodec=nn.originalCodec,St.refSampleDuration=1152/St.audioSampleRate*St.timescale,te.v(this.TAG,"Parsed MPEG Audio Frame Header"),this._audioInitialMetadataDispatched=!0,this._onTrackMetadata("audio",St);let rn=this._mediaInfo;rn.audioCodec=St.codec,rn.audioSampleRate=St.audioSampleRate,rn.audioChannelCount=St.channelCount,rn.audioDataRate=nn.bitRate,rn.hasVideo?rn.videoCodec!=null&&(rn.mimeType='video/x-flv; codecs="'+rn.videoCodec+","+rn.audioCodec+'"'):rn.mimeType='video/x-flv; codecs="'+rn.audioCodec+'"',rn.isComplete()&&this._onMediaInfo(rn)}let Ht=this._parseMP3AudioData(Ie,Ze+1,qe-1,!1);if(Ht==null)return;let Et=this._timestampBase+st,Ut={unit:Ht,length:Ht.byteLength,dts:Et,pts:Et};an.samples.push(Ut),an.length+=Ht.length}}_parseAACAudioData(Ie,Ze,qe){if(qe<=1){te.w(this.TAG,"Flv: Invalid AAC packet, missing AACPacketType or/and Data!");return}let st={},mt=new Uint8Array(Ie,Ze,qe);return st.packetType=mt[0],mt[0]===0?st.data=this._parseAACAudioSpecificConfig(Ie,Ze+1,qe-1):st.data=mt.subarray(1),st}_parseAACAudioSpecificConfig(Ie,Ze,qe){let st=new Uint8Array(Ie,Ze,qe),mt=null,Nt=0,kt=0,Bt=null,Jt=0,En=null;if(Nt=kt=st[0]>>>3,Jt=(st[0]&7)<<1|st[1]>>>7,Jt<0||Jt>=this._mpegSamplingRates.length){this._onError(Ne.FORMAT_ERROR,"Flv: AAC invalid sampling frequency index!");return}let qn=this._mpegSamplingRates[Jt],At=(st[1]&120)>>>3;if(At<0||At>=8){this._onError(Ne.FORMAT_ERROR,"Flv: AAC invalid channel configuration");return}Nt===5&&(En=(st[1]&7)<<1|st[2]>>>7,Bt=(st[2]&124)>>>2);let St=self.navigator.userAgent.toLowerCase();return St.indexOf("firefox")!==-1?Jt>=6?(Nt=5,mt=new Array(4),En=Jt-3):(Nt=2,mt=new Array(2),En=Jt):St.indexOf("android")!==-1?(Nt=2,mt=new Array(2),En=Jt):(Nt=5,En=Jt,mt=new Array(4),Jt>=6?En=Jt-3:At===1&&(Nt=2,mt=new Array(2),En=Jt)),mt[0]=Nt<<3,mt[0]|=(Jt&15)>>>1,mt[1]=(Jt&15)<<7,mt[1]|=(At&15)<<3,Nt===5&&(mt[1]|=(En&15)>>>1,mt[2]=(En&1)<<7,mt[2]|=8,mt[3]=0),{config:mt,samplingRate:qn,channelCount:At,codec:"mp4a.40."+Nt,originalCodec:"mp4a.40."+kt}}_parseMP3AudioData(Ie,Ze,qe,st){if(qe<4){te.w(this.TAG,"Flv: Invalid MP3 packet, header missing!");return}let mt=this._littleEndian,Nt=new Uint8Array(Ie,Ze,qe),kt=null;if(st){if(Nt[0]!==255)return;let Bt=Nt[1]>>>3&3,Jt=(Nt[1]&6)>>1,En=(Nt[2]&240)>>>4,qn=(Nt[2]&12)>>>2,St=(Nt[3]>>>6&3)!==3?2:1,an=0,Ht=0,Et=34,Ut="mp3";switch(Bt){case 0:an=this._mpegAudioV25SampleRateTable[qn];break;case 2:an=this._mpegAudioV20SampleRateTable[qn];break;case 3:an=this._mpegAudioV10SampleRateTable[qn];break}switch(Jt){case 1:Et=34,En<this._mpegAudioL3BitRateTable.length&&(Ht=this._mpegAudioL3BitRateTable[En]);break;case 2:Et=33,En<this._mpegAudioL2BitRateTable.length&&(Ht=this._mpegAudioL2BitRateTable[En]);break;case 3:Et=32,En<this._mpegAudioL1BitRateTable.length&&(Ht=this._mpegAudioL1BitRateTable[En]);break}kt={bitRate:Ht,samplingRate:an,channelCount:St,codec:Ut,originalCodec:Ut}}else kt=Nt;return kt}_parseVideoData(Ie,Ze,qe,st,mt){if(qe<=1){te.w(this.TAG,"Flv: Invalid video packet, missing VideoData payload!");return}if(this._hasVideoFlagOverrided===!0&&this._hasVideo===!1)return;let Nt=new Uint8Array(Ie,Ze,qe)[0],kt=(Nt&240)>>>4,Bt=Nt&15;if(Bt!==7){this._onError(Ne.CODEC_UNSUPPORTED,`Flv: Unsupported codec in video frame: ${Bt}`);return}this._parseAVCVideoPacket(Ie,Ze+1,qe-1,st,mt,kt)}_parseAVCVideoPacket(Ie,Ze,qe,st,mt,Nt){if(qe<4){te.w(this.TAG,"Flv: Invalid AVC packet, missing AVCPacketType or/and CompositionTime");return}let kt=this._littleEndian,Bt=new DataView(Ie,Ze,qe),Jt=Bt.getUint8(0),qn=(Bt.getUint32(0,!kt)&16777215)<<8>>8;if(Jt===0)this._parseAVCDecoderConfigurationRecord(Ie,Ze+4,qe-4);else if(Jt===1)this._parseAVCVideoData(Ie,Ze+4,qe-4,st,mt,Nt,qn);else if(Jt!==2){this._onError(Ne.FORMAT_ERROR,`Flv: Invalid video packet type ${Jt}`);return}}_parseAVCDecoderConfigurationRecord(Ie,Ze,qe){if(qe<7){te.w(this.TAG,"Flv: Invalid AVCDecoderConfigurationRecord, lack of data!");return}let st=this._videoMetadata,mt=this._videoTrack,Nt=this._littleEndian,kt=new DataView(Ie,Ze,qe);st?typeof st.avcc!="undefined"&&te.w(this.TAG,"Found another AVCDecoderConfigurationRecord!"):(this._hasVideo===!1&&this._hasVideoFlagOverrided===!1&&(this._hasVideo=!0,this._mediaInfo.hasVideo=!0),st=this._videoMetadata={},st.type="video",st.id=mt.id,st.timescale=this._timescale,st.duration=this._duration);let Bt=kt.getUint8(0),Jt=kt.getUint8(1),En=kt.getUint8(2),qn=kt.getUint8(3);if(Bt!==1||Jt===0){this._onError(Ne.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord");return}if(this._naluLengthSize=(kt.getUint8(4)&3)+1,this._naluLengthSize!==3&&this._naluLengthSize!==4){this._onError(Ne.FORMAT_ERROR,`Flv: Strange NaluLengthSizeMinusOne: ${this._naluLengthSize-1}`);return}let At=kt.getUint8(5)&31;if(At===0){this._onError(Ne.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No SPS");return}else At>1&&te.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: SPS Count = ${At}`);let St=6;for(let Ht=0;Ht<At;Ht++){let Et=kt.getUint16(St,!Nt);if(St+=2,Et===0)continue;let Ut=new Uint8Array(Ie,Ze+St,Et);St+=Et;let nn=Be.parseSPS(Ut);if(Ht!==0)continue;st.codecWidth=nn.codec_size.width,st.codecHeight=nn.codec_size.height,st.presentWidth=nn.present_size.width,st.presentHeight=nn.present_size.height,st.profile=nn.profile_string,st.level=nn.level_string,st.bitDepth=nn.bit_depth,st.chromaFormat=nn.chroma_format,st.sarRatio=nn.sar_ratio,st.frameRate=nn.frame_rate,(nn.frame_rate.fixed===!1||nn.frame_rate.fps_num===0||nn.frame_rate.fps_den===0)&&(st.frameRate=this._referenceFrameRate);let rn=st.frameRate.fps_den,gn=st.frameRate.fps_num;st.refSampleDuration=st.timescale*(rn/gn);let bn=Ut.subarray(1,4),An="avc1.";for(let Vt=0;Vt<3;Vt++){let wn=bn[Vt].toString(16);wn.length<2&&(wn="0"+wn),An+=wn}st.codec=An;let Gt=this._mediaInfo;Gt.width=st.codecWidth,Gt.height=st.codecHeight,Gt.fps=st.frameRate.fps,Gt.profile=st.profile,Gt.level=st.level,Gt.refFrames=nn.ref_frames,Gt.chromaFormat=nn.chroma_format_string,Gt.sarNum=st.sarRatio.width,Gt.sarDen=st.sarRatio.height,Gt.videoCodec=An,Gt.hasAudio?Gt.audioCodec!=null&&(Gt.mimeType='video/x-flv; codecs="'+Gt.videoCodec+","+Gt.audioCodec+'"'):Gt.mimeType='video/x-flv; codecs="'+Gt.videoCodec+'"',Gt.isComplete()&&this._onMediaInfo(Gt)}let an=kt.getUint8(St);if(an===0){this._onError(Ne.FORMAT_ERROR,"Flv: Invalid AVCDecoderConfigurationRecord: No PPS");return}else an>1&&te.w(this.TAG,`Flv: Strange AVCDecoderConfigurationRecord: PPS Count = ${an}`);St++;for(let Ht=0;Ht<an;Ht++){let Et=kt.getUint16(St,!Nt);St+=2,Et!==0&&(St+=Et)}st.avcc=new Uint8Array(qe),st.avcc.set(new Uint8Array(Ie,Ze,qe),0),te.v(this.TAG,"Parsed AVCDecoderConfigurationRecord"),this._isInitialMetadataDispatched()?this._dispatch&&(this._audioTrack.length||this._videoTrack.length)&&this._onDataAvailable(this._audioTrack,this._videoTrack):this._videoInitialMetadataDispatched=!0,this._dispatch=!1,this._onTrackMetadata("video",st)}_parseAVCVideoData(Ie,Ze,qe,st,mt,Nt,kt){let Bt=this._littleEndian,Jt=new DataView(Ie,Ze,qe),En=[],qn=0,At=0;const St=this._naluLengthSize;let an=this._timestampBase+st,Ht=Nt===1;for(;At<qe;){if(At+4>=qe){te.w(this.TAG,`Malformed Nalu near timestamp ${an}, offset = ${At}, dataSize = ${qe}`);break}let Et=Jt.getUint32(At,!Bt);if(St===3&&(Et>>>=8),Et>qe-St){te.w(this.TAG,`Malformed Nalus near timestamp ${an}, NaluSize > DataSize!`);return}let Ut=Jt.getUint8(At+St)&31;Ut===5&&(Ht=!0);let nn=new Uint8Array(Ie,Ze+At,St+Et),rn={type:Ut,data:nn};En.push(rn),qn+=nn.byteLength,At+=St+Et}if(En.length){let Et=this._videoTrack,Ut={units:En,length:qn,isKeyframe:Ht,dts:an,cts:kt,pts:an+kt};Ht&&(Ut.fileposition=mt),Et.samples.push(Ut),Et.length+=qn}}}var Me=Ue;class Re{static init(){Re.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],mvex:[],mvhd:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[],".mp3":[]};for(let Ze in Re.types)Re.types.hasOwnProperty(Ze)&&(Re.types[Ze]=[Ze.charCodeAt(0),Ze.charCodeAt(1),Ze.charCodeAt(2),Ze.charCodeAt(3)]);let Ie=Re.constants={};Ie.FTYP=new Uint8Array([105,115,111,109,0,0,0,1,105,115,111,109,97,118,99,49]),Ie.STSD_PREFIX=new Uint8Array([0,0,0,0,0,0,0,1]),Ie.STTS=new Uint8Array([0,0,0,0,0,0,0,0]),Ie.STSC=Ie.STCO=Ie.STTS,Ie.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),Ie.HDLR_VIDEO=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),Ie.HDLR_AUDIO=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]),Ie.DREF=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),Ie.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),Ie.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0])}static box(Ie){let Ze=8,qe=null,st=Array.prototype.slice.call(arguments,1),mt=st.length;for(let kt=0;kt<mt;kt++)Ze+=st[kt].byteLength;qe=new Uint8Array(Ze),qe[0]=Ze>>>24&255,qe[1]=Ze>>>16&255,qe[2]=Ze>>>8&255,qe[3]=Ze&255,qe.set(Ie,4);let Nt=8;for(let kt=0;kt<mt;kt++)qe.set(st[kt],Nt),Nt+=st[kt].byteLength;return qe}static generateInitSegment(Ie){let Ze=Re.box(Re.types.ftyp,Re.constants.FTYP),qe=Re.moov(Ie),st=new Uint8Array(Ze.byteLength+qe.byteLength);return st.set(Ze,0),st.set(qe,Ze.byteLength),st}static moov(Ie){let Ze=Re.mvhd(Ie.timescale,Ie.duration),qe=Re.trak(Ie),st=Re.mvex(Ie);return Re.box(Re.types.moov,Ze,qe,st)}static mvhd(Ie,Ze){return Re.box(Re.types.mvhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie&255,Ze>>>24&255,Ze>>>16&255,Ze>>>8&255,Ze&255,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]))}static trak(Ie){return Re.box(Re.types.trak,Re.tkhd(Ie),Re.mdia(Ie))}static tkhd(Ie){let Ze=Ie.id,qe=Ie.duration,st=Ie.presentWidth,mt=Ie.presentHeight;return Re.box(Re.types.tkhd,new Uint8Array([0,0,0,7,0,0,0,0,0,0,0,0,Ze>>>24&255,Ze>>>16&255,Ze>>>8&255,Ze&255,0,0,0,0,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,st>>>8&255,st&255,0,0,mt>>>8&255,mt&255,0,0]))}static mdia(Ie){return Re.box(Re.types.mdia,Re.mdhd(Ie),Re.hdlr(Ie),Re.minf(Ie))}static mdhd(Ie){let Ze=Ie.timescale,qe=Ie.duration;return Re.box(Re.types.mdhd,new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,Ze>>>24&255,Ze>>>16&255,Ze>>>8&255,Ze&255,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255,85,196,0,0]))}static hdlr(Ie){let Ze=null;return Ie.type==="audio"?Ze=Re.constants.HDLR_AUDIO:Ze=Re.constants.HDLR_VIDEO,Re.box(Re.types.hdlr,Ze)}static minf(Ie){let Ze=null;return Ie.type==="audio"?Ze=Re.box(Re.types.smhd,Re.constants.SMHD):Ze=Re.box(Re.types.vmhd,Re.constants.VMHD),Re.box(Re.types.minf,Ze,Re.dinf(),Re.stbl(Ie))}static dinf(){return Re.box(Re.types.dinf,Re.box(Re.types.dref,Re.constants.DREF))}static stbl(Ie){return Re.box(Re.types.stbl,Re.stsd(Ie),Re.box(Re.types.stts,Re.constants.STTS),Re.box(Re.types.stsc,Re.constants.STSC),Re.box(Re.types.stsz,Re.constants.STSZ),Re.box(Re.types.stco,Re.constants.STCO))}static stsd(Ie){return Ie.type==="audio"?Ie.codec==="mp3"?Re.box(Re.types.stsd,Re.constants.STSD_PREFIX,Re.mp3(Ie)):Re.box(Re.types.stsd,Re.constants.STSD_PREFIX,Re.mp4a(Ie)):Re.box(Re.types.stsd,Re.constants.STSD_PREFIX,Re.avc1(Ie))}static mp3(Ie){let Ze=Ie.channelCount,qe=Ie.audioSampleRate,st=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Ze,0,16,0,0,0,0,qe>>>8&255,qe&255,0,0]);return Re.box(Re.types[".mp3"],st)}static mp4a(Ie){let Ze=Ie.channelCount,qe=Ie.audioSampleRate,st=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,Ze,0,16,0,0,0,0,qe>>>8&255,qe&255,0,0]);return Re.box(Re.types.mp4a,st,Re.esds(Ie))}static esds(Ie){let Ze=Ie.config||[],qe=Ze.length,st=new Uint8Array([0,0,0,0,3,23+qe,0,1,0,4,15+qe,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([qe]).concat(Ze).concat([6,1,2]));return Re.box(Re.types.esds,st)}static avc1(Ie){let Ze=Ie.avcc,qe=Ie.codecWidth,st=Ie.codecHeight,mt=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,qe>>>8&255,qe&255,st>>>8&255,st&255,0,72,0,0,0,72,0,0,0,0,0,0,0,1,10,120,113,113,47,102,108,118,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,255,255]);return Re.box(Re.types.avc1,mt,Re.box(Re.types.avcC,Ze))}static mvex(Ie){return Re.box(Re.types.mvex,Re.trex(Ie))}static trex(Ie){let Ze=Ie.id,qe=new Uint8Array([0,0,0,0,Ze>>>24&255,Ze>>>16&255,Ze>>>8&255,Ze&255,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]);return Re.box(Re.types.trex,qe)}static moof(Ie,Ze){return Re.box(Re.types.moof,Re.mfhd(Ie.sequenceNumber),Re.traf(Ie,Ze))}static mfhd(Ie){let Ze=new Uint8Array([0,0,0,0,Ie>>>24&255,Ie>>>16&255,Ie>>>8&255,Ie&255]);return Re.box(Re.types.mfhd,Ze)}static traf(Ie,Ze){let qe=Ie.id,st=Re.box(Re.types.tfhd,new Uint8Array([0,0,0,0,qe>>>24&255,qe>>>16&255,qe>>>8&255,qe&255])),mt=Re.box(Re.types.tfdt,new Uint8Array([0,0,0,0,Ze>>>24&255,Ze>>>16&255,Ze>>>8&255,Ze&255])),Nt=Re.sdtp(Ie),kt=Re.trun(Ie,Nt.byteLength+16+16+8+16+8+8);return Re.box(Re.types.traf,st,mt,kt,Nt)}static sdtp(Ie){let Ze=Ie.samples||[],qe=Ze.length,st=new Uint8Array(4+qe);for(let mt=0;mt<qe;mt++){let Nt=Ze[mt].flags;st[mt+4]=Nt.isLeading<<6|Nt.dependsOn<<4|Nt.isDependedOn<<2|Nt.hasRedundancy}return Re.box(Re.types.sdtp,st)}static trun(Ie,Ze){let qe=Ie.samples||[],st=qe.length,mt=12+16*st,Nt=new Uint8Array(mt);Ze+=8+mt,Nt.set([0,0,15,1,st>>>24&255,st>>>16&255,st>>>8&255,st&255,Ze>>>24&255,Ze>>>16&255,Ze>>>8&255,Ze&255],0);for(let kt=0;kt<st;kt++){let Bt=qe[kt].duration,Jt=qe[kt].size,En=qe[kt].flags,qn=qe[kt].cts;Nt.set([Bt>>>24&255,Bt>>>16&255,Bt>>>8&255,Bt&255,Jt>>>24&255,Jt>>>16&255,Jt>>>8&255,Jt&255,En.isLeading<<2|En.dependsOn,En.isDependedOn<<6|En.hasRedundancy<<4|En.isNonSync,0,0,qn>>>24&255,qn>>>16&255,qn>>>8&255,qn&255],12+16*kt)}return Re.box(Re.types.trun,Nt)}static mdat(Ie){return Re.box(Re.types.mdat,Ie)}}Re.init();var tt=Re;class lt{static getSilentFrame(Ie,Ze){if(Ie==="mp4a.40.2"){if(Ze===1)return new Uint8Array([0,200,0,128,35,128]);if(Ze===2)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(Ze===3)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(Ze===4)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(Ze===5)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(Ze===6)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(Ze===1)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(Ze===2)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(Ze===3)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null}}var Pt=lt;class Ct{constructor(Ie,Ze,qe,st,mt){this.dts=Ie,this.pts=Ze,this.duration=qe,this.originalDts=st,this.isSyncPoint=mt,this.fileposition=null}}class vt{constructor(){this.beginDts=0,this.endDts=0,this.beginPts=0,this.endPts=0,this.originalBeginDts=0,this.originalEndDts=0,this.syncPoints=[],this.firstSample=null,this.lastSample=null}appendSyncPoint(Ie){Ie.isSyncPoint=!0,this.syncPoints.push(Ie)}}class Ot{constructor(){this._list=[]}clear(){this._list=[]}appendArray(Ie){let Ze=this._list;Ie.length!==0&&(Ze.length>0&&Ie[0].originalDts<Ze[Ze.length-1].originalDts&&this.clear(),Array.prototype.push.apply(Ze,Ie))}getLastSyncPointBeforeDts(Ie){if(this._list.length==0)return null;let Ze=this._list,qe=0,st=Ze.length-1,mt=0,Nt=0,kt=st;for(Ie<Ze[0].dts&&(qe=0,Nt=kt+1);Nt<=kt;)if(mt=Nt+Math.floor((kt-Nt)/2),mt===st||Ie>=Ze[mt].dts&&Ie<Ze[mt+1].dts){qe=mt;break}else Ze[mt].dts<Ie?Nt=mt+1:kt=mt-1;return this._list[qe]}}class zt{constructor(Ie){this._type=Ie,this._list=[],this._lastAppendLocation=-1}get type(){return this._type}get length(){return this._list.length}isEmpty(){return this._list.length===0}clear(){this._list=[],this._lastAppendLocation=-1}_searchNearestSegmentBefore(Ie){let Ze=this._list;if(Ze.length===0)return-2;let qe=Ze.length-1,st=0,mt=0,Nt=qe,kt=0;if(Ie<Ze[0].originalBeginDts)return kt=-1,kt;for(;mt<=Nt;)if(st=mt+Math.floor((Nt-mt)/2),st===qe||Ie>Ze[st].lastSample.originalDts&&Ie<Ze[st+1].originalBeginDts){kt=st;break}else Ze[st].originalBeginDts<Ie?mt=st+1:Nt=st-1;return kt}_searchNearestSegmentAfter(Ie){return this._searchNearestSegmentBefore(Ie)+1}append(Ie){let Ze=this._list,qe=Ie,st=this._lastAppendLocation,mt=0;st!==-1&&st<Ze.length&&qe.originalBeginDts>=Ze[st].lastSample.originalDts&&(st===Ze.length-1||st<Ze.length-1&&qe.originalBeginDts<Ze[st+1].originalBeginDts)?mt=st+1:Ze.length>0&&(mt=this._searchNearestSegmentBefore(qe.originalBeginDts)+1),this._lastAppendLocation=mt,this._list.splice(mt,0,qe)}getLastSegmentBefore(Ie){let Ze=this._searchNearestSegmentBefore(Ie);return Ze>=0?this._list[Ze]:null}getLastSampleBefore(Ie){let Ze=this.getLastSegmentBefore(Ie);return Ze!=null?Ze.lastSample:null}getLastSyncPointBefore(Ie){let Ze=this._searchNearestSegmentBefore(Ie),qe=this._list[Ze].syncPoints;for(;qe.length===0&&Ze>0;)Ze--,qe=this._list[Ze].syncPoints;return qe.length>0?qe[qe.length-1]:null}}class Ft{constructor(Ie){this.TAG="MP4Remuxer",this._config=Ie,this._isLive=Ie.isLive===!0,this._dtsBase=-1,this._dtsBaseInited=!1,this._audioDtsBase=1/0,this._videoDtsBase=1/0,this._audioNextDts=void 0,this._videoNextDts=void 0,this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList=new zt("audio"),this._videoSegmentInfoList=new zt("video"),this._onInitSegment=null,this._onMediaSegment=null,this._forceFirstIDR=!!(ye.chrome&&(ye.version.major<50||ye.version.major===50&&ye.version.build<2661)),this._fillSilentAfterSeek=ye.msedge||ye.msie,this._mp3UseMpegAudio=!ye.firefox,this._fillAudioTimestampGap=this._config.fixAudioTimestampGap}destroy(){this._dtsBase=-1,this._dtsBaseInited=!1,this._audioMeta=null,this._videoMeta=null,this._audioSegmentInfoList.clear(),this._audioSegmentInfoList=null,this._videoSegmentInfoList.clear(),this._videoSegmentInfoList=null,this._onInitSegment=null,this._onMediaSegment=null}bindDataSource(Ie){return Ie.onDataAvailable=this.remux.bind(this),Ie.onTrackMetadata=this._onTrackMetadataReceived.bind(this),this}get onInitSegment(){return this._onInitSegment}set onInitSegment(Ie){this._onInitSegment=Ie}get onMediaSegment(){return this._onMediaSegment}set onMediaSegment(Ie){this._onMediaSegment=Ie}insertDiscontinuity(){this._audioNextDts=this._videoNextDts=void 0}seek(Ie){this._audioStashedLastSample=null,this._videoStashedLastSample=null,this._videoSegmentInfoList.clear(),this._audioSegmentInfoList.clear()}remux(Ie,Ze){if(!this._onMediaSegment)throw new E("MP4Remuxer: onMediaSegment callback must be specificed!");this._dtsBaseInited||this._calculateDtsBase(Ie,Ze),this._remuxVideo(Ze),this._remuxAudio(Ie)}_onTrackMetadataReceived(Ie,Ze){let qe=null,st="mp4",mt=Ze.codec;if(Ie==="audio")this._audioMeta=Ze,Ze.codec==="mp3"&&this._mp3UseMpegAudio?(st="mpeg",mt="",qe=new Uint8Array):qe=tt.generateInitSegment(Ze);else if(Ie==="video")this._videoMeta=Ze,qe=tt.generateInitSegment(Ze);else return;if(!this._onInitSegment)throw new E("MP4Remuxer: onInitSegment callback must be specified!");this._onInitSegment(Ie,{type:Ie,data:qe.buffer,codec:mt,container:`${Ie}/${st}`,mediaDuration:Ze.duration})}_calculateDtsBase(Ie,Ze){this._dtsBaseInited||(Ie.samples&&Ie.samples.length&&(this._audioDtsBase=Ie.samples[0].dts),Ze.samples&&Ze.samples.length&&(this._videoDtsBase=Ze.samples[0].dts),this._dtsBase=Math.min(this._audioDtsBase,this._videoDtsBase),this._dtsBaseInited=!0)}flushStashedSamples(){let Ie=this._videoStashedLastSample,Ze=this._audioStashedLastSample,qe={type:"video",id:1,sequenceNumber:0,samples:[],length:0};Ie!=null&&(qe.samples.push(Ie),qe.length=Ie.length);let st={type:"audio",id:2,sequenceNumber:0,samples:[],length:0};Ze!=null&&(st.samples.push(Ze),st.length=Ze.length),this._videoStashedLastSample=null,this._audioStashedLastSample=null,this._remuxVideo(qe,!0),this._remuxAudio(st,!0)}_remuxAudio(Ie,Ze){if(this._audioMeta==null)return;let qe=Ie,st=qe.samples,mt,Nt=-1,kt=-1,Bt=-1,Jt=this._audioMeta.refSampleDuration,En=this._audioMeta.codec==="mp3"&&this._mp3UseMpegAudio,qn=this._dtsBaseInited&&this._audioNextDts===void 0,At=!1;if(!st||st.length===0||st.length===1&&!Ze)return;let St=0,an=null,Ht=0;En?(St=0,Ht=qe.length):(St=8,Ht=8+qe.length);let Et=null;if(st.length>1&&(Et=st.pop(),Ht-=Et.length),this._audioStashedLastSample!=null){let Gt=this._audioStashedLastSample;this._audioStashedLastSample=null,st.unshift(Gt),Ht+=Gt.length}Et!=null&&(this._audioStashedLastSample=Et);let Ut=st[0].dts-this._dtsBase;if(this._audioNextDts)mt=Ut-this._audioNextDts;else if(this._audioSegmentInfoList.isEmpty())mt=0,this._fillSilentAfterSeek&&!this._videoSegmentInfoList.isEmpty()&&this._audioMeta.originalCodec!=="mp3"&&(At=!0);else{let Gt=this._audioSegmentInfoList.getLastSampleBefore(Ut);if(Gt!=null){let Vt=Ut-(Gt.originalDts+Gt.duration);Vt<=3&&(Vt=0);let wn=Gt.dts+Gt.duration+Vt;mt=Ut-wn}else mt=0}if(At){let Gt=Ut-mt,Vt=this._videoSegmentInfoList.getLastSegmentBefore(Ut);if(Vt!=null&&Vt.beginDts<Gt){let wn=Pt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);if(wn){let jn=Vt.beginDts,Wn=Gt-Vt.beginDts;te.v(this.TAG,`InsertPrefixSilentAudio: dts: ${jn}, duration: ${Wn}`),st.unshift({unit:wn,dts:jn,pts:jn}),Ht+=wn.byteLength}}else At=!1}let nn=[];for(let Gt=0;Gt<st.length;Gt++){let Vt=st[Gt],wn=Vt.unit,jn=Vt.dts-this._dtsBase,Wn=jn-mt;Nt===-1&&(Nt=Wn);let $n=0;Gt!==st.length-1?$n=st[Gt+1].dts-this._dtsBase-mt-Wn:Et!=null?$n=Et.dts-this._dtsBase-mt-Wn:nn.length>=1?$n=nn[nn.length-1].duration:$n=Math.floor(Jt);let kr=!1,Sr=null;if($n>Jt*1.5&&this._audioMeta.codec!=="mp3"&&this._fillAudioTimestampGap&&!ye.safari){kr=!0;let Yr=Math.abs($n-Jt),_r=Math.ceil(Yr/Jt),Ur=Wn+Jt;te.w(this.TAG,`Large audio timestamp gap detected, may cause AV sync to drift. Silent frames will be generated to avoid unsync.
|
|
|
dts: ${Wn+$n} ms, expected: ${Wn+Math.round(Jt)} ms, delta: ${Math.round(Yr)} ms, generate: ${_r} frames`);let wr=Pt.getSilentFrame(this._audioMeta.originalCodec,this._audioMeta.channelCount);wr==null&&(te.w(this.TAG,`Unable to generate silent frame for ${this._audioMeta.originalCodec} with ${this._audioMeta.channelCount} channels, repeat last frame`),wr=wn),Sr=[];for(let Hr=0;Hr<_r;Hr++){let Qr=Math.round(Ur);if(Sr.length>0){let _i=Sr[Sr.length-1];_i.duration=Qr-_i.dts}let pi={dts:Qr,pts:Qr,cts:0,unit:wr,size:wr.byteLength,duration:0,originalDts:jn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}};Sr.push(pi),Ht+=pi.size,Ur+=Jt}let Dr=Sr[Sr.length-1];Dr.duration=Wn+$n-Dr.dts,$n=Math.round(Jt)}nn.push({dts:Wn,pts:Wn,cts:0,unit:Vt.unit,size:Vt.unit.byteLength,duration:$n,originalDts:jn,flags:{isLeading:0,dependsOn:1,isDependedOn:0,hasRedundancy:0}}),kr&&nn.push.apply(nn,Sr)}En?an=new Uint8Array(Ht):(an=new Uint8Array(Ht),an[0]=Ht>>>24&255,an[1]=Ht>>>16&255,an[2]=Ht>>>8&255,an[3]=Ht&255,an.set(tt.types.mdat,4));for(let Gt=0;Gt<nn.length;Gt++){let Vt=nn[Gt].unit;an.set(Vt,St),St+=Vt.byteLength}let rn=nn[nn.length-1];kt=rn.dts+rn.duration,this._audioNextDts=kt;let gn=new vt;gn.beginDts=Nt,gn.endDts=kt,gn.beginPts=Nt,gn.endPts=kt,gn.originalBeginDts=nn[0].originalDts,gn.originalEndDts=rn.originalDts+rn.duration,gn.firstSample=new Ct(nn[0].dts,nn[0].pts,nn[0].duration,nn[0].originalDts,!1),gn.lastSample=new Ct(rn.dts,rn.pts,rn.duration,rn.originalDts,!1),this._isLive||this._audioSegmentInfoList.append(gn),qe.samples=nn,qe.sequenceNumber++;let bn=null;En?bn=new Uint8Array:bn=tt.moof(qe,Nt),qe.samples=[],qe.length=0;let An={type:"audio",data:this._mergeBoxes(bn,an).buffer,sampleCount:nn.length,info:gn};En&&qn&&(An.timestampOffset=Nt),this._onMediaSegment("audio",An)}_remuxVideo(Ie,Ze){if(this._videoMeta==null)return;let qe=Ie,st=qe.samples,mt,Nt=-1,kt=-1,Bt=-1,Jt=-1;if(!st||st.length===0||st.length===1&&!Ze)return;let En=8,qn=null,At=8+Ie.length,St=null;if(st.length>1&&(St=st.pop(),At-=St.length),this._videoStashedLastSample!=null){let rn=this._videoStashedLastSample;this._videoStashedLastSample=null,st.unshift(rn),At+=rn.length}St!=null&&(this._videoStashedLastSample=St);let an=st[0].dts-this._dtsBase;if(this._videoNextDts)mt=an-this._videoNextDts;else if(this._videoSegmentInfoList.isEmpty())mt=0;else{let rn=this._videoSegmentInfoList.getLastSampleBefore(an);if(rn!=null){let gn=an-(rn.originalDts+rn.duration);gn<=3&&(gn=0);let bn=rn.dts+rn.duration+gn;mt=an-bn}else mt=0}let Ht=new vt,Et=[];for(let rn=0;rn<st.length;rn++){let gn=st[rn],bn=gn.dts-this._dtsBase,An=gn.isKeyframe,Gt=bn-mt,Vt=gn.cts,wn=Gt+Vt;Nt===-1&&(Nt=Gt,Bt=wn);let jn=0;if(rn!==st.length-1?jn=st[rn+1].dts-this._dtsBase-mt-Gt:St!=null?jn=St.dts-this._dtsBase-mt-Gt:Et.length>=1?jn=Et[Et.length-1].duration:jn=Math.floor(this._videoMeta.refSampleDuration),An){let Wn=new Ct(Gt,wn,jn,gn.dts,!0);Wn.fileposition=gn.fileposition,Ht.appendSyncPoint(Wn)}Et.push({dts:Gt,pts:wn,cts:Vt,units:gn.units,size:gn.length,isKeyframe:An,duration:jn,originalDts:bn,flags:{isLeading:0,dependsOn:An?2:1,isDependedOn:An?1:0,hasRedundancy:0,isNonSync:An?0:1}})}qn=new Uint8Array(At),qn[0]=At>>>24&255,qn[1]=At>>>16&255,qn[2]=At>>>8&255,qn[3]=At&255,qn.set(tt.types.mdat,4);for(let rn=0;rn<Et.length;rn++){let gn=Et[rn].units;for(;gn.length;){let An=gn.shift().data;qn.set(An,En),En+=An.byteLength}}let Ut=Et[Et.length-1];if(kt=Ut.dts+Ut.duration,Jt=Ut.pts+Ut.duration,this._videoNextDts=kt,Ht.beginDts=Nt,Ht.endDts=kt,Ht.beginPts=Bt,Ht.endPts=Jt,Ht.originalBeginDts=Et[0].originalDts,Ht.originalEndDts=Ut.originalDts+Ut.duration,Ht.firstSample=new Ct(Et[0].dts,Et[0].pts,Et[0].duration,Et[0].originalDts,Et[0].isKeyframe),Ht.lastSample=new Ct(Ut.dts,Ut.pts,Ut.duration,Ut.originalDts,Ut.isKeyframe),this._isLive||this._videoSegmentInfoList.append(Ht),qe.samples=Et,qe.sequenceNumber++,this._forceFirstIDR){let rn=Et[0].flags;rn.dependsOn=2,rn.isNonSync=0}let nn=tt.moof(qe,Nt);qe.samples=[],qe.length=0,this._onMediaSegment("video",{type:"video",data:this._mergeBoxes(nn,qn).buffer,sampleCount:Et.length,info:Ht})}_mergeBoxes(Ie,Ze){let qe=new Uint8Array(Ie.byteLength+Ze.byteLength);return qe.set(Ie,0),qe.set(Ze,Ie.byteLength),qe}}var yt=Ft,Lt={IO_ERROR:"io_error",DEMUX_ERROR:"demux_error",INIT_SEGMENT:"init_segment",MEDIA_SEGMENT:"media_segment",LOADING_COMPLETE:"loading_complete",RECOVERED_EARLY_EOF:"recovered_early_eof",MEDIA_INFO:"media_info",METADATA_ARRIVED:"metadata_arrived",SCRIPTDATA_ARRIVED:"scriptdata_arrived",STATISTICS_INFO:"statistics_info",RECOMMEND_SEEKPOINT:"recommend_seekpoint"};class Kt{constructor(Ie,Ze){this.TAG="TransmuxingController",this._emitter=new(ue()),this._config=Ze,Ie.segments||(Ie.segments=[{duration:Ie.duration,filesize:Ie.filesize,url:Ie.url}]),typeof Ie.cors!="boolean"&&(Ie.cors=!0),typeof Ie.withCredentials!="boolean"&&(Ie.withCredentials=!1),this._mediaDataSource=Ie,this._currentSegmentIndex=0;let qe=0;this._mediaDataSource.segments.forEach(st=>{st.timestampBase=qe,qe+=st.duration,st.cors=Ie.cors,st.withCredentials=Ie.withCredentials,Ze.referrerPolicy&&(st.referrerPolicy=Ze.referrerPolicy)}),!isNaN(qe)&&this._mediaDataSource.duration!==qe&&(this._mediaDataSource.duration=qe),this._mediaInfo=null,this._demuxer=null,this._remuxer=null,this._ioctl=null,this._pendingSeekTime=null,this._pendingResolveSeekPoint=null,this._statisticsReporter=null}destroy(){this._mediaInfo=null,this._mediaDataSource=null,this._statisticsReporter&&this._disableStatisticsReporter(),this._ioctl&&(this._ioctl.destroy(),this._ioctl=null),this._demuxer&&(this._demuxer.destroy(),this._demuxer=null),this._remuxer&&(this._remuxer.destroy(),this._remuxer=null),this._emitter.removeAllListeners(),this._emitter=null}on(Ie,Ze){this._emitter.addListener(Ie,Ze)}off(Ie,Ze){this._emitter.removeListener(Ie,Ze)}start(){this._loadSegment(0),this._enableStatisticsReporter()}_loadSegment(Ie,Ze){this._currentSegmentIndex=Ie;let qe=this._mediaDataSource.segments[Ie],st=this._ioctl=new rt(qe,this._config,Ie);st.onError=this._onIOException.bind(this),st.onSeeked=this._onIOSeeked.bind(this),st.onComplete=this._onIOComplete.bind(this),st.onRedirect=this._onIORedirect.bind(this),st.onRecoveredEarlyEof=this._onIORecoveredEarlyEof.bind(this),Ze?this._demuxer.bindDataSource(this._ioctl):st.onDataArrival=this._onInitChunkArrival.bind(this),st.open(Ze)}stop(){this._internalAbort(),this._disableStatisticsReporter()}_internalAbort(){this._ioctl&&(this._ioctl.destroy(),this._ioctl=null)}pause(){this._ioctl&&this._ioctl.isWorking()&&(this._ioctl.pause(),this._disableStatisticsReporter())}resume(){this._ioctl&&this._ioctl.isPaused()&&(this._ioctl.resume(),this._enableStatisticsReporter())}seek(Ie){if(this._mediaInfo==null||!this._mediaInfo.isSeekable())return;let Ze=this._searchSegmentIndexContains(Ie);if(Ze===this._currentSegmentIndex){let qe=this._mediaInfo.segments[Ze];if(qe==null)this._pendingSeekTime=Ie;else{let st=qe.getNearestKeyframe(Ie);this._remuxer.seek(st.milliseconds),this._ioctl.seek(st.fileposition),this._pendingResolveSeekPoint=st.milliseconds}}else{let qe=this._mediaInfo.segments[Ze];if(qe==null)this._pendingSeekTime=Ie,this._internalAbort(),this._remuxer.seek(),this._remuxer.insertDiscontinuity(),this._loadSegment(Ze);else{let st=qe.getNearestKeyframe(Ie);this._internalAbort(),this._remuxer.seek(Ie),this._remuxer.insertDiscontinuity(),this._demuxer.resetMediaInfo(),this._demuxer.timestampBase=this._mediaDataSource.segments[Ze].timestampBase,this._loadSegment(Ze,st.fileposition),this._pendingResolveSeekPoint=st.milliseconds,this._reportSegmentMediaInfo(Ze)}}this._enableStatisticsReporter()}_searchSegmentIndexContains(Ie){let Ze=this._mediaDataSource.segments,qe=Ze.length-1;for(let st=0;st<Ze.length;st++)if(Ie<Ze[st].timestampBase){qe=st-1;break}return qe}_onInitChunkArrival(Ie,Ze){let qe=null,st=0;if(Ze>0)this._demuxer.bindDataSource(this._ioctl),this._demuxer.timestampBase=this._mediaDataSource.segments[this._currentSegmentIndex].timestampBase,st=this._demuxer.parseChunks(Ie,Ze);else if((qe=Me.probe(Ie)).match){this._demuxer=new Me(qe,this._config),this._remuxer||(this._remuxer=new yt(this._config));let mt=this._mediaDataSource;mt.duration!=null&&!isNaN(mt.duration)&&(this._demuxer.overridedDuration=mt.duration),typeof mt.hasAudio=="boolean"&&(this._demuxer.overridedHasAudio=mt.hasAudio),typeof mt.hasVideo=="boolean"&&(this._demuxer.overridedHasVideo=mt.hasVideo),this._demuxer.timestampBase=mt.segments[this._currentSegmentIndex].timestampBase,this._demuxer.onError=this._onDemuxException.bind(this),this._demuxer.onMediaInfo=this._onMediaInfo.bind(this),this._demuxer.onMetaDataArrived=this._onMetaDataArrived.bind(this),this._demuxer.onScriptDataArrived=this._onScriptDataArrived.bind(this),this._remuxer.bindDataSource(this._demuxer.bindDataSource(this._ioctl)),this._remuxer.onInitSegment=this._onRemuxerInitSegmentArrival.bind(this),this._remuxer.onMediaSegment=this._onRemuxerMediaSegmentArrival.bind(this),st=this._demuxer.parseChunks(Ie,Ze)}else qe=null,te.e(this.TAG,"Non-FLV, Unsupported media type!"),Promise.resolve().then(()=>{this._internalAbort()}),this._emitter.emit(Lt.DEMUX_ERROR,Ne.FORMAT_UNSUPPORTED,"Non-FLV, Unsupported media type"),st=0;return st}_onMediaInfo(Ie){this._mediaInfo==null&&(this._mediaInfo=Object.assign({},Ie),this._mediaInfo.keyframesIndex=null,this._mediaInfo.segments=[],this._mediaInfo.segmentCount=this._mediaDataSource.segments.length,Object.setPrototypeOf(this._mediaInfo,ct.prototype));let Ze=Object.assign({},Ie);Object.setPrototypeOf(Ze,ct.prototype),this._mediaInfo.segments[this._currentSegmentIndex]=Ze,this._reportSegmentMediaInfo(this._currentSegmentIndex),this._pendingSeekTime!=null&&Promise.resolve().then(()=>{let qe=this._pendingSeekTime;this._pendingSeekTime=null,this.seek(qe)})}_onMetaDataArrived(Ie){this._emitter.emit(Lt.METADATA_ARRIVED,Ie)}_onScriptDataArrived(Ie){this._emitter.emit(Lt.SCRIPTDATA_ARRIVED,Ie)}_onIOSeeked(){this._remuxer.insertDiscontinuity()}_onIOComplete(Ie){let qe=Ie+1;qe<this._mediaDataSource.segments.length?(this._internalAbort(),this._remuxer.flushStashedSamples(),this._loadSegment(qe)):(this._remuxer.flushStashedSamples(),this._emitter.emit(Lt.LOADING_COMPLETE),this._disableStatisticsReporter())}_onIORedirect(Ie){let Ze=this._ioctl.extraData;this._mediaDataSource.segments[Ze].redirectedURL=Ie}_onIORecoveredEarlyEof(){this._emitter.emit(Lt.RECOVERED_EARLY_EOF)}_onIOException(Ie,Ze){te.e(this.TAG,`IOException: type = ${Ie}, code = ${Ze.code}, msg = ${Ze.msg}`),this._emitter.emit(Lt.IO_ERROR,Ie,Ze),this._disableStatisticsReporter()}_onDemuxException(Ie,Ze){te.e(this.TAG,`DemuxException: type = ${Ie}, info = ${Ze}`),this._emitter.emit(Lt.DEMUX_ERROR,Ie,Ze)}_onRemuxerInitSegmentArrival(Ie,Ze){this._emitter.emit(Lt.INIT_SEGMENT,Ie,Ze)}_onRemuxerMediaSegmentArrival(Ie,Ze){if(this._pendingSeekTime==null&&(this._emitter.emit(Lt.MEDIA_SEGMENT,Ie,Ze),this._pendingResolveSeekPoint!=null&&Ie==="video")){let qe=Ze.info.syncPoints,st=this._pendingResolveSeekPoint;this._pendingResolveSeekPoint=null,ye.safari&&qe.length>0&&qe[0].originalDts===st&&(st=qe[0].pts),this._emitter.emit(Lt.RECOMMEND_SEEKPOINT,st)}}_enableStatisticsReporter(){this._statisticsReporter==null&&(this._statisticsReporter=self.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval))}_disableStatisticsReporter(){this._statisticsReporter&&(self.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}_reportSegmentMediaInfo(Ie){let Ze=this._mediaInfo.segments[Ie],qe=Object.assign({},Ze);qe.duration=this._mediaInfo.duration,qe.segmentCount=this._mediaInfo.segmentCount,delete qe.segments,delete qe.keyframesIndex,this._emitter.emit(Lt.MEDIA_INFO,qe)}_reportStatisticsInfo(){let Ie={};Ie.url=this._ioctl.currentURL,Ie.hasRedirect=this._ioctl.hasRedirect,Ie.hasRedirect&&(Ie.redirectedURL=this._ioctl.currentRedirectedURL),Ie.speed=this._ioctl.currentSpeed,Ie.loaderType=this._ioctl.loaderType,Ie.currentSegmentIndex=this._currentSegmentIndex,Ie.totalSegmentCount=this._mediaDataSource.segments.length,this._emitter.emit(Lt.STATISTICS_INFO,Ie)}}var sn=Kt,Yt=function($t){let Ie="TransmuxingWorker",Ze=null,qe=Ht.bind(this);ie.install(),$t.addEventListener("message",function(Et){switch(Et.data.cmd){case"init":Ze=new sn(Et.data.param[0],Et.data.param[1]),Ze.on(Lt.IO_ERROR,At.bind(this)),Ze.on(Lt.DEMUX_ERROR,St.bind(this)),Ze.on(Lt.INIT_SEGMENT,st.bind(this)),Ze.on(Lt.MEDIA_SEGMENT,mt.bind(this)),Ze.on(Lt.LOADING_COMPLETE,Nt.bind(this)),Ze.on(Lt.RECOVERED_EARLY_EOF,kt.bind(this)),Ze.on(Lt.MEDIA_INFO,Bt.bind(this)),Ze.on(Lt.METADATA_ARRIVED,Jt.bind(this)),Ze.on(Lt.SCRIPTDATA_ARRIVED,En.bind(this)),Ze.on(Lt.STATISTICS_INFO,qn.bind(this)),Ze.on(Lt.RECOMMEND_SEEKPOINT,an.bind(this));break;case"destroy":Ze&&(Ze.destroy(),Ze=null),$t.postMessage({msg:"destroyed"});break;case"start":Ze.start();break;case"stop":Ze.stop();break;case"seek":Ze.seek(Et.data.param);break;case"pause":Ze.pause();break;case"resume":Ze.resume();break;case"logging_config":{let Ut=Et.data.param;et.applyConfig(Ut),Ut.enableCallback===!0?et.addLogListener(qe):et.removeLogListener(qe);break}}});function st(Et,Ut){let nn={msg:Lt.INIT_SEGMENT,data:{type:Et,data:Ut}};$t.postMessage(nn,[Ut.data])}function mt(Et,Ut){let nn={msg:Lt.MEDIA_SEGMENT,data:{type:Et,data:Ut}};$t.postMessage(nn,[Ut.data])}function Nt(){let Et={msg:Lt.LOADING_COMPLETE};$t.postMessage(Et)}function kt(){let Et={msg:Lt.RECOVERED_EARLY_EOF};$t.postMessage(Et)}function Bt(Et){let Ut={msg:Lt.MEDIA_INFO,data:Et};$t.postMessage(Ut)}function Jt(Et){let Ut={msg:Lt.METADATA_ARRIVED,data:Et};$t.postMessage(Ut)}function En(Et){let Ut={msg:Lt.SCRIPTDATA_ARRIVED,data:Et};$t.postMessage(Ut)}function qn(Et){let Ut={msg:Lt.STATISTICS_INFO,data:Et};$t.postMessage(Ut)}function At(Et,Ut){$t.postMessage({msg:Lt.IO_ERROR,data:{type:Et,info:Ut}})}function St(Et,Ut){$t.postMessage({msg:Lt.DEMUX_ERROR,data:{type:Et,info:Ut}})}function an(Et){$t.postMessage({msg:Lt.RECOMMEND_SEEKPOINT,data:Et})}function Ht(Et,Ut){$t.postMessage({msg:"logcat_callback",data:{type:Et,logcat:Ut}})}};class In{constructor(Ie,Ze){if(this.TAG="Transmuxer",this._emitter=new(ue()),Ze.enableWorker&&typeof Worker!="undefined")try{let qe=be(82059);this._worker=qe(Yt),this._workerDestroying=!1,this._worker.addEventListener("message",this._onWorkerMessage.bind(this)),this._worker.postMessage({cmd:"init",param:[Ie,Ze]}),this.e={onLoggingConfigChanged:this._onLoggingConfigChanged.bind(this)},et.registerListener(this.e.onLoggingConfigChanged),this._worker.postMessage({cmd:"logging_config",param:et.getConfig()})}catch(qe){te.e(this.TAG,"Error while initialize transmuxing worker, fallback to inline transmuxing"),this._worker=null,this._controller=new sn(Ie,Ze)}else this._controller=new sn(Ie,Ze);if(this._controller){let qe=this._controller;qe.on(Lt.IO_ERROR,this._onIOError.bind(this)),qe.on(Lt.DEMUX_ERROR,this._onDemuxError.bind(this)),qe.on(Lt.INIT_SEGMENT,this._onInitSegment.bind(this)),qe.on(Lt.MEDIA_SEGMENT,this._onMediaSegment.bind(this)),qe.on(Lt.LOADING_COMPLETE,this._onLoadingComplete.bind(this)),qe.on(Lt.RECOVERED_EARLY_EOF,this._onRecoveredEarlyEof.bind(this)),qe.on(Lt.MEDIA_INFO,this._onMediaInfo.bind(this)),qe.on(Lt.METADATA_ARRIVED,this._onMetaDataArrived.bind(this)),qe.on(Lt.SCRIPTDATA_ARRIVED,this._onScriptDataArrived.bind(this)),qe.on(Lt.STATISTICS_INFO,this._onStatisticsInfo.bind(this)),qe.on(Lt.RECOMMEND_SEEKPOINT,this._onRecommendSeekpoint.bind(this))}}destroy(){this._worker?this._workerDestroying||(this._workerDestroying=!0,this._worker.postMessage({cmd:"destroy"}),et.removeListener(this.e.onLoggingConfigChanged),this.e=null):(this._controller.destroy(),this._controller=null),this._emitter.removeAllListeners(),this._emitter=null}on(Ie,Ze){this._emitter.addListener(Ie,Ze)}off(Ie,Ze){this._emitter.removeListener(Ie,Ze)}hasWorker(){return this._worker!=null}open(){this._worker?this._worker.postMessage({cmd:"start"}):this._controller.start()}close(){this._worker?this._worker.postMessage({cmd:"stop"}):this._controller.stop()}seek(Ie){this._worker?this._worker.postMessage({cmd:"seek",param:Ie}):this._controller.seek(Ie)}pause(){this._worker?this._worker.postMessage({cmd:"pause"}):this._controller.pause()}resume(){this._worker?this._worker.postMessage({cmd:"resume"}):this._controller.resume()}_onInitSegment(Ie,Ze){Promise.resolve().then(()=>{this._emitter.emit(Lt.INIT_SEGMENT,Ie,Ze)})}_onMediaSegment(Ie,Ze){Promise.resolve().then(()=>{this._emitter.emit(Lt.MEDIA_SEGMENT,Ie,Ze)})}_onLoadingComplete(){Promise.resolve().then(()=>{this._emitter.emit(Lt.LOADING_COMPLETE)})}_onRecoveredEarlyEof(){Promise.resolve().then(()=>{this._emitter.emit(Lt.RECOVERED_EARLY_EOF)})}_onMediaInfo(Ie){Promise.resolve().then(()=>{this._emitter.emit(Lt.MEDIA_INFO,Ie)})}_onMetaDataArrived(Ie){Promise.resolve().then(()=>{this._emitter.emit(Lt.METADATA_ARRIVED,Ie)})}_onScriptDataArrived(Ie){Promise.resolve().then(()=>{this._emitter.emit(Lt.SCRIPTDATA_ARRIVED,Ie)})}_onStatisticsInfo(Ie){Promise.resolve().then(()=>{this._emitter.emit(Lt.STATISTICS_INFO,Ie)})}_onIOError(Ie,Ze){Promise.resolve().then(()=>{this._emitter.emit(Lt.IO_ERROR,Ie,Ze)})}_onDemuxError(Ie,Ze){Promise.resolve().then(()=>{this._emitter.emit(Lt.DEMUX_ERROR,Ie,Ze)})}_onRecommendSeekpoint(Ie){Promise.resolve().then(()=>{this._emitter.emit(Lt.RECOMMEND_SEEKPOINT,Ie)})}_onLoggingConfigChanged(Ie){this._worker&&this._worker.postMessage({cmd:"logging_config",param:Ie})}_onWorkerMessage(Ie){let Ze=Ie.data,qe=Ze.data;if(Ze.msg==="destroyed"||this._workerDestroying){this._workerDestroying=!1,this._worker.terminate(),this._worker=null;return}switch(Ze.msg){case Lt.INIT_SEGMENT:case Lt.MEDIA_SEGMENT:this._emitter.emit(Ze.msg,qe.type,qe.data);break;case Lt.LOADING_COMPLETE:case Lt.RECOVERED_EARLY_EOF:this._emitter.emit(Ze.msg);break;case Lt.MEDIA_INFO:Object.setPrototypeOf(qe,ct.prototype),this._emitter.emit(Ze.msg,qe);break;case Lt.METADATA_ARRIVED:case Lt.SCRIPTDATA_ARRIVED:case Lt.STATISTICS_INFO:this._emitter.emit(Ze.msg,qe);break;case Lt.IO_ERROR:case Lt.DEMUX_ERROR:this._emitter.emit(Ze.msg,qe.type,qe.info);break;case Lt.RECOMMEND_SEEKPOINT:this._emitter.emit(Ze.msg,qe);break;case"logcat_callback":te.emitter.emit("log",qe.type,qe.logcat);break;default:break}}}var Kn=In,nr={ERROR:"error",SOURCE_OPEN:"source_open",UPDATE_END:"update_end",BUFFER_FULL:"buffer_full"};class hr{constructor(Ie){this.TAG="MSEController",this._config=Ie,this._emitter=new(ue()),this._config.isLive&&this._config.autoCleanupSourceBuffer==null&&(this._config.autoCleanupSourceBuffer=!0),this.e={onSourceOpen:this._onSourceOpen.bind(this),onSourceEnded:this._onSourceEnded.bind(this),onSourceClose:this._onSourceClose.bind(this),onSourceBufferError:this._onSourceBufferError.bind(this),onSourceBufferUpdateEnd:this._onSourceBufferUpdateEnd.bind(this)},this._mediaSource=null,this._mediaSourceObjectURL=null,this._mediaElement=null,this._isBufferFull=!1,this._hasPendingEos=!1,this._requireSetMediaDuration=!1,this._pendingMediaDuration=0,this._pendingSourceBufferInit=[],this._mimeTypes={video:null,audio:null},this._sourceBuffers={video:null,audio:null},this._lastInitSegments={video:null,audio:null},this._pendingSegments={video:[],audio:[]},this._pendingRemoveRanges={video:[],audio:[]},this._idrList=new Ot}destroy(){(this._mediaElement||this._mediaSource)&&this.detachMediaElement(),this.e=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ie,Ze){this._emitter.addListener(Ie,Ze)}off(Ie,Ze){this._emitter.removeListener(Ie,Ze)}attachMediaElement(Ie){if(this._mediaSource)throw new E("MediaSource has been attached to an HTMLMediaElement!");let Ze=this._mediaSource=new window.MediaSource;Ze.addEventListener("sourceopen",this.e.onSourceOpen),Ze.addEventListener("sourceended",this.e.onSourceEnded),Ze.addEventListener("sourceclose",this.e.onSourceClose),this._mediaElement=Ie,this._mediaSourceObjectURL=window.URL.createObjectURL(this._mediaSource),Ie.src=this._mediaSourceObjectURL}detachMediaElement(){if(this._mediaSource){let Ie=this._mediaSource;for(let Ze in this._sourceBuffers){let qe=this._pendingSegments[Ze];qe.splice(0,qe.length),this._pendingSegments[Ze]=null,this._pendingRemoveRanges[Ze]=null,this._lastInitSegments[Ze]=null;let st=this._sourceBuffers[Ze];if(st){if(Ie.readyState!=="closed"){try{Ie.removeSourceBuffer(st)}catch(mt){te.e(this.TAG,mt.message)}st.removeEventListener("error",this.e.onSourceBufferError),st.removeEventListener("updateend",this.e.onSourceBufferUpdateEnd)}this._mimeTypes[Ze]=null,this._sourceBuffers[Ze]=null}}if(Ie.readyState==="open")try{Ie.endOfStream()}catch(Ze){te.e(this.TAG,Ze.message)}Ie.removeEventListener("sourceopen",this.e.onSourceOpen),Ie.removeEventListener("sourceended",this.e.onSourceEnded),Ie.removeEventListener("sourceclose",this.e.onSourceClose),this._pendingSourceBufferInit=[],this._isBufferFull=!1,this._idrList.clear(),this._mediaSource=null}this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement=null),this._mediaSourceObjectURL&&(window.URL.revokeObjectURL(this._mediaSourceObjectURL),this._mediaSourceObjectURL=null)}appendInitSegment(Ie,Ze){if(!this._mediaSource||this._mediaSource.readyState!=="open"){this._pendingSourceBufferInit.push(Ie),this._pendingSegments[Ie.type].push(Ie);return}let qe=Ie,st=`${qe.container}`;qe.codec&&qe.codec.length>0&&(st+=`;codecs=${qe.codec}`);let mt=!1;if(te.v(this.TAG,"Received Initialization Segment, mimeType: "+st),this._lastInitSegments[qe.type]=qe,st!==this._mimeTypes[qe.type]){if(this._mimeTypes[qe.type])te.v(this.TAG,`Notice: ${qe.type} mimeType changed, origin: ${this._mimeTypes[qe.type]}, target: ${st}`);else{mt=!0;try{let Nt=this._sourceBuffers[qe.type]=this._mediaSource.addSourceBuffer(st);Nt.addEventListener("error",this.e.onSourceBufferError),Nt.addEventListener("updateend",this.e.onSourceBufferUpdateEnd)}catch(Nt){te.e(this.TAG,Nt.message),this._emitter.emit(nr.ERROR,{code:Nt.code,msg:Nt.message});return}}this._mimeTypes[qe.type]=st}Ze||this._pendingSegments[qe.type].push(qe),mt||this._sourceBuffers[qe.type]&&!this._sourceBuffers[qe.type].updating&&this._doAppendSegments(),ye.safari&&qe.container==="audio/mpeg"&&qe.mediaDuration>0&&(this._requireSetMediaDuration=!0,this._pendingMediaDuration=qe.mediaDuration/1e3,this._updateMediaSourceDuration())}appendMediaSegment(Ie){let Ze=Ie;this._pendingSegments[Ze.type].push(Ze),this._config.autoCleanupSourceBuffer&&this._needCleanupSourceBuffer()&&this._doCleanupSourceBuffer();let qe=this._sourceBuffers[Ze.type];qe&&!qe.updating&&!this._hasPendingRemoveRanges()&&this._doAppendSegments()}seek(Ie){for(let Ze in this._sourceBuffers){if(!this._sourceBuffers[Ze])continue;let qe=this._sourceBuffers[Ze];if(this._mediaSource.readyState==="open")try{qe.abort()}catch(mt){te.e(this.TAG,mt.message)}this._idrList.clear();let st=this._pendingSegments[Ze];if(st.splice(0,st.length),this._mediaSource.readyState!=="closed"){for(let mt=0;mt<qe.buffered.length;mt++){let Nt=qe.buffered.start(mt),kt=qe.buffered.end(mt);this._pendingRemoveRanges[Ze].push({start:Nt,end:kt})}if(qe.updating||this._doRemoveRanges(),ye.safari){let mt=this._lastInitSegments[Ze];mt&&(this._pendingSegments[Ze].push(mt),qe.updating||this._doAppendSegments())}}}}endOfStream(){let Ie=this._mediaSource,Ze=this._sourceBuffers;if(!Ie||Ie.readyState!=="open"){Ie&&Ie.readyState==="closed"&&this._hasPendingSegments()&&(this._hasPendingEos=!0);return}Ze.video&&Ze.video.updating||Ze.audio&&Ze.audio.updating?this._hasPendingEos=!0:(this._hasPendingEos=!1,Ie.endOfStream())}getNearestKeyframe(Ie){return this._idrList.getLastSyncPointBeforeDts(Ie)}_needCleanupSourceBuffer(){if(!this._config.autoCleanupSourceBuffer)return!1;let Ie=this._mediaElement.currentTime;for(let Ze in this._sourceBuffers){let qe=this._sourceBuffers[Ze];if(qe){let st=qe.buffered;if(st.length>=1&&Ie-st.start(0)>=this._config.autoCleanupMaxBackwardDuration)return!0}}return!1}_doCleanupSourceBuffer(){let Ie=this._mediaElement.currentTime;for(let Ze in this._sourceBuffers){let qe=this._sourceBuffers[Ze];if(qe){let st=qe.buffered,mt=!1;for(let Nt=0;Nt<st.length;Nt++){let kt=st.start(Nt),Bt=st.end(Nt);if(kt<=Ie&&Ie<Bt+3){if(Ie-kt>=this._config.autoCleanupMaxBackwardDuration){mt=!0;let Jt=Ie-this._config.autoCleanupMinBackwardDuration;this._pendingRemoveRanges[Ze].push({start:kt,end:Jt})}}else Bt<Ie&&(mt=!0,this._pendingRemoveRanges[Ze].push({start:kt,end:Bt}))}mt&&!qe.updating&&this._doRemoveRanges()}}}_updateMediaSourceDuration(){let Ie=this._sourceBuffers;if(this._mediaElement.readyState===0||this._mediaSource.readyState!=="open"||Ie.video&&Ie.video.updating||Ie.audio&&Ie.audio.updating)return;let Ze=this._mediaSource.duration,qe=this._pendingMediaDuration;qe>0&&(isNaN(Ze)||qe>Ze)&&(te.v(this.TAG,`Update MediaSource duration from ${Ze} to ${qe}`),this._mediaSource.duration=qe),this._requireSetMediaDuration=!1,this._pendingMediaDuration=0}_doRemoveRanges(){for(let Ie in this._pendingRemoveRanges){if(!this._sourceBuffers[Ie]||this._sourceBuffers[Ie].updating)continue;let Ze=this._sourceBuffers[Ie],qe=this._pendingRemoveRanges[Ie];for(;qe.length&&!Ze.updating;){let st=qe.shift();Ze.remove(st.start,st.end)}}}_doAppendSegments(){let Ie=this._pendingSegments;for(let Ze in Ie)if(!(!this._sourceBuffers[Ze]||this._sourceBuffers[Ze].updating)&&Ie[Ze].length>0){let qe=Ie[Ze].shift();if(qe.timestampOffset){let st=this._sourceBuffers[Ze].timestampOffset,mt=qe.timestampOffset/1e3;Math.abs(st-mt)>.1&&(te.v(this.TAG,`Update MPEG audio timestampOffset from ${st} to ${mt}`),this._sourceBuffers[Ze].timestampOffset=mt),delete qe.timestampOffset}if(!qe.data||qe.data.byteLength===0)continue;try{this._sourceBuffers[Ze].appendBuffer(qe.data),this._isBufferFull=!1,Ze==="video"&&qe.hasOwnProperty("info")&&this._idrList.appendArray(qe.info.syncPoints)}catch(st){this._pendingSegments[Ze].unshift(qe),st.code===22?(this._isBufferFull||this._emitter.emit(nr.BUFFER_FULL),this._isBufferFull=!0):(te.e(this.TAG,st.message),this._emitter.emit(nr.ERROR,{code:st.code,msg:st.message}))}}}_onSourceOpen(){if(te.v(this.TAG,"MediaSource onSourceOpen"),this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._pendingSourceBufferInit.length>0){let Ie=this._pendingSourceBufferInit;for(;Ie.length;){let Ze=Ie.shift();this.appendInitSegment(Ze,!0)}}this._hasPendingSegments()&&this._doAppendSegments(),this._emitter.emit(nr.SOURCE_OPEN)}_onSourceEnded(){te.v(this.TAG,"MediaSource onSourceEnded")}_onSourceClose(){te.v(this.TAG,"MediaSource onSourceClose"),this._mediaSource&&this.e!=null&&(this._mediaSource.removeEventListener("sourceopen",this.e.onSourceOpen),this._mediaSource.removeEventListener("sourceended",this.e.onSourceEnded),this._mediaSource.removeEventListener("sourceclose",this.e.onSourceClose))}_hasPendingSegments(){let Ie=this._pendingSegments;return Ie.video.length>0||Ie.audio.length>0}_hasPendingRemoveRanges(){let Ie=this._pendingRemoveRanges;return Ie.video.length>0||Ie.audio.length>0}_onSourceBufferUpdateEnd(){this._requireSetMediaDuration?this._updateMediaSourceDuration():this._hasPendingRemoveRanges()?this._doRemoveRanges():this._hasPendingSegments()?this._doAppendSegments():this._hasPendingEos&&this.endOfStream(),this._emitter.emit(nr.UPDATE_END)}_onSourceBufferError(Ie){te.e(this.TAG,`SourceBuffer Error: ${Ie}`)}}var ur=hr;const Un={NETWORK_ERROR:"NetworkError",MEDIA_ERROR:"MediaError",OTHER_ERROR:"OtherError"},Fn={NETWORK_EXCEPTION:re.EXCEPTION,NETWORK_STATUS_CODE_INVALID:re.HTTP_STATUS_CODE_INVALID,NETWORK_TIMEOUT:re.CONNECTING_TIMEOUT,NETWORK_UNRECOVERABLE_EARLY_EOF:re.UNRECOVERABLE_EARLY_EOF,MEDIA_MSE_ERROR:"MediaMSEError",MEDIA_FORMAT_ERROR:Ne.FORMAT_ERROR,MEDIA_FORMAT_UNSUPPORTED:Ne.FORMAT_UNSUPPORTED,MEDIA_CODEC_UNSUPPORTED:Ne.CODEC_UNSUPPORTED};class or{constructor(Ie,Ze){if(this.TAG="FlvPlayer",this._type="FlvPlayer",this._emitter=new(ue()),this._config=ut(),typeof Ze=="object"&&Object.assign(this._config,Ze),Ie.type.toLowerCase()!=="flv")throw new b("FlvPlayer requires an flv MediaDataSource input!");Ie.isLive===!0&&(this._config.isLive=!0),this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this),onvSeeking:this._onvSeeking.bind(this),onvCanPlay:this._onvCanPlay.bind(this),onvStalled:this._onvStalled.bind(this),onvProgress:this._onvProgress.bind(this)},self.performance&&self.performance.now?this._now=self.performance.now.bind(self.performance):this._now=Date.now,this._pendingSeekTime=null,this._requestSetTime=!1,this._seekpointRecord=null,this._progressChecker=null,this._mediaDataSource=Ie,this._mediaElement=null,this._msectl=null,this._transmuxer=null,this._mseSourceOpened=!1,this._hasPendingLoad=!1,this._receivedCanPlay=!1,this._mediaInfo=null,this._statisticsInfo=null;let qe=ye.chrome&&(ye.version.major<50||ye.version.major===50&&ye.version.build<2661);this._alwaysSeekKeyframe=!!(qe||ye.msedge||ye.msie),this._alwaysSeekKeyframe&&(this._config.accurateSeek=!1)}destroy(){this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._transmuxer&&this.unload(),this._mediaElement&&this.detachMediaElement(),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ie,Ze){Ie===$e.MEDIA_INFO?this._mediaInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit($e.MEDIA_INFO,this.mediaInfo)}):Ie===$e.STATISTICS_INFO&&this._statisticsInfo!=null&&Promise.resolve().then(()=>{this._emitter.emit($e.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ie,Ze)}off(Ie,Ze){this._emitter.removeListener(Ie,Ze)}attachMediaElement(Ie){if(this._mediaElement=Ie,Ie.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),Ie.addEventListener("seeking",this.e.onvSeeking),Ie.addEventListener("canplay",this.e.onvCanPlay),Ie.addEventListener("stalled",this.e.onvStalled),Ie.addEventListener("progress",this.e.onvProgress),this._msectl=new ur(this._config),this._msectl.on(nr.UPDATE_END,this._onmseUpdateEnd.bind(this)),this._msectl.on(nr.BUFFER_FULL,this._onmseBufferFull.bind(this)),this._msectl.on(nr.SOURCE_OPEN,()=>{this._mseSourceOpened=!0,this._hasPendingLoad&&(this._hasPendingLoad=!1,this.load())}),this._msectl.on(nr.ERROR,Ze=>{this._emitter.emit($e.ERROR,Un.MEDIA_ERROR,Fn.MEDIA_MSE_ERROR,Ze)}),this._msectl.attachMediaElement(Ie),this._pendingSeekTime!=null)try{Ie.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Ze){}}detachMediaElement(){this._mediaElement&&(this._msectl.detachMediaElement(),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement.removeEventListener("seeking",this.e.onvSeeking),this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay),this._mediaElement.removeEventListener("stalled",this.e.onvStalled),this._mediaElement.removeEventListener("progress",this.e.onvProgress),this._mediaElement=null),this._msectl&&(this._msectl.destroy(),this._msectl=null)}load(){if(!this._mediaElement)throw new E("HTMLMediaElement must be attached before load()!");if(this._transmuxer)throw new E("FlvPlayer.load() has been called, please call unload() first!");if(!this._hasPendingLoad){if(this._config.deferLoadAfterSourceOpen&&this._mseSourceOpened===!1){this._hasPendingLoad=!0;return}this._mediaElement.readyState>0&&(this._requestSetTime=!0,this._mediaElement.currentTime=0),this._transmuxer=new Kn(this._mediaDataSource,this._config),this._transmuxer.on(Lt.INIT_SEGMENT,(Ie,Ze)=>{this._msectl.appendInitSegment(Ze)}),this._transmuxer.on(Lt.MEDIA_SEGMENT,(Ie,Ze)=>{if(this._msectl.appendMediaSegment(Ze),this._config.lazyLoad&&!this._config.isLive){let qe=this._mediaElement.currentTime;Ze.info.endDts>=(qe+this._config.lazyLoadMaxDuration)*1e3&&this._progressChecker==null&&(te.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}}),this._transmuxer.on(Lt.LOADING_COMPLETE,()=>{this._msectl.endOfStream(),this._emitter.emit($e.LOADING_COMPLETE)}),this._transmuxer.on(Lt.RECOVERED_EARLY_EOF,()=>{this._emitter.emit($e.RECOVERED_EARLY_EOF)}),this._transmuxer.on(Lt.IO_ERROR,(Ie,Ze)=>{this._emitter.emit($e.ERROR,Un.NETWORK_ERROR,Ie,Ze)}),this._transmuxer.on(Lt.DEMUX_ERROR,(Ie,Ze)=>{this._emitter.emit($e.ERROR,Un.MEDIA_ERROR,Ie,{code:-1,msg:Ze})}),this._transmuxer.on(Lt.MEDIA_INFO,Ie=>{this._mediaInfo=Ie,this._emitter.emit($e.MEDIA_INFO,Object.assign({},Ie))}),this._transmuxer.on(Lt.METADATA_ARRIVED,Ie=>{this._emitter.emit($e.METADATA_ARRIVED,Ie)}),this._transmuxer.on(Lt.SCRIPTDATA_ARRIVED,Ie=>{this._emitter.emit($e.SCRIPTDATA_ARRIVED,Ie)}),this._transmuxer.on(Lt.STATISTICS_INFO,Ie=>{this._statisticsInfo=this._fillStatisticsInfo(Ie),this._emitter.emit($e.STATISTICS_INFO,Object.assign({},this._statisticsInfo))}),this._transmuxer.on(Lt.RECOMMEND_SEEKPOINT,Ie=>{this._mediaElement&&!this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ie/1e3)}),this._transmuxer.open()}}unload(){this._mediaElement&&this._mediaElement.pause(),this._msectl&&this._msectl.seek(0),this._transmuxer&&(this._transmuxer.close(),this._transmuxer.destroy(),this._transmuxer=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(Ie){this._mediaElement.volume=Ie}get muted(){return this._mediaElement.muted}set muted(Ie){this._mediaElement.muted=Ie}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ie){this._mediaElement?this._internalSeek(Ie):this._pendingSeekTime=Ie}get mediaInfo(){return Object.assign({},this._mediaInfo)}get statisticsInfo(){return this._statisticsInfo==null&&(this._statisticsInfo={}),this._statisticsInfo=this._fillStatisticsInfo(this._statisticsInfo),Object.assign({},this._statisticsInfo)}_fillStatisticsInfo(Ie){if(Ie.playerType=this._type,!(this._mediaElement instanceof HTMLVideoElement))return Ie;let Ze=!0,qe=0,st=0;if(this._mediaElement.getVideoPlaybackQuality){let mt=this._mediaElement.getVideoPlaybackQuality();qe=mt.totalVideoFrames,st=mt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(qe=this._mediaElement.webkitDecodedFrameCount,st=this._mediaElement.webkitDroppedFrameCount):Ze=!1;return Ze&&(Ie.decodedFrames=qe,Ie.droppedFrames=st),Ie}_onmseUpdateEnd(){if(!this._config.lazyLoad||this._config.isLive)return;let Ie=this._mediaElement.buffered,Ze=this._mediaElement.currentTime,qe=0,st=0;for(let mt=0;mt<Ie.length;mt++){let Nt=Ie.start(mt),kt=Ie.end(mt);if(Nt<=Ze&&Ze<kt){qe=Nt,st=kt;break}}st>=Ze+this._config.lazyLoadMaxDuration&&this._progressChecker==null&&(te.v(this.TAG,"Maximum buffering duration exceeded, suspend transmuxing task"),this._suspendTransmuxer())}_onmseBufferFull(){te.v(this.TAG,"MSE SourceBuffer is full, suspend transmuxing task"),this._progressChecker==null&&this._suspendTransmuxer()}_suspendTransmuxer(){this._transmuxer&&(this._transmuxer.pause(),this._progressChecker==null&&(this._progressChecker=window.setInterval(this._checkProgressAndResume.bind(this),1e3)))}_checkProgressAndResume(){let Ie=this._mediaElement.currentTime,Ze=this._mediaElement.buffered,qe=!1;for(let st=0;st<Ze.length;st++){let mt=Ze.start(st),Nt=Ze.end(st);if(Ie>=mt&&Ie<Nt){Ie>=Nt-this._config.lazyLoadRecoverDuration&&(qe=!0);break}}qe&&(window.clearInterval(this._progressChecker),this._progressChecker=null,qe&&(te.v(this.TAG,"Continue loading from paused position"),this._transmuxer.resume()))}_isTimepointBuffered(Ie){let Ze=this._mediaElement.buffered;for(let qe=0;qe<Ze.length;qe++){let st=Ze.start(qe),mt=Ze.end(qe);if(Ie>=st&&Ie<mt)return!0}return!1}_internalSeek(Ie){let Ze=this._isTimepointBuffered(Ie),qe=!1,st=0;if(Ie<1&&this._mediaElement.buffered.length>0){let mt=this._mediaElement.buffered.start(0);(mt<1&&Ie<mt||ye.safari)&&(qe=!0,st=ye.safari?.1:mt)}if(qe)this._requestSetTime=!0,this._mediaElement.currentTime=st;else if(Ze){if(!this._alwaysSeekKeyframe)this._requestSetTime=!0,this._mediaElement.currentTime=Ie;else{let mt=this._msectl.getNearestKeyframe(Math.floor(Ie*1e3));this._requestSetTime=!0,mt!=null?this._mediaElement.currentTime=mt.dts/1e3:this._mediaElement.currentTime=Ie}this._progressChecker!=null&&this._checkProgressAndResume()}else this._progressChecker!=null&&(window.clearInterval(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ie),this._transmuxer.seek(Math.floor(Ie*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ie)}_checkAndApplyUnbufferedSeekpoint(){if(this._seekpointRecord)if(this._seekpointRecord.recordTime<=this._now()-100){let Ie=this._mediaElement.currentTime;this._seekpointRecord=null,this._isTimepointBuffered(Ie)||(this._progressChecker!=null&&(window.clearTimeout(this._progressChecker),this._progressChecker=null),this._msectl.seek(Ie),this._transmuxer.seek(Math.floor(Ie*1e3)),this._config.accurateSeek&&(this._requestSetTime=!0,this._mediaElement.currentTime=Ie))}else window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_checkAndResumeStuckPlayback(Ie){let Ze=this._mediaElement;if(Ie||!this._receivedCanPlay||Ze.readyState<2){let qe=Ze.buffered;qe.length>0&&Ze.currentTime<qe.start(0)&&(te.w(this.TAG,`Playback seems stuck at ${Ze.currentTime}, seek to ${qe.start(0)}`),this._requestSetTime=!0,this._mediaElement.currentTime=qe.start(0),this._mediaElement.removeEventListener("progress",this.e.onvProgress))}else this._mediaElement.removeEventListener("progress",this.e.onvProgress)}_onvLoadedMetadata(Ie){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null)}_onvSeeking(Ie){let Ze=this._mediaElement.currentTime,qe=this._mediaElement.buffered;if(this._requestSetTime){this._requestSetTime=!1;return}if(Ze<1&&qe.length>0){let st=qe.start(0);if(st<1&&Ze<st||ye.safari){this._requestSetTime=!0,this._mediaElement.currentTime=ye.safari?.1:st;return}}if(this._isTimepointBuffered(Ze)){if(this._alwaysSeekKeyframe){let st=this._msectl.getNearestKeyframe(Math.floor(Ze*1e3));st!=null&&(this._requestSetTime=!0,this._mediaElement.currentTime=st.dts/1e3)}this._progressChecker!=null&&this._checkProgressAndResume();return}this._seekpointRecord={seekPoint:Ze,recordTime:this._now()},window.setTimeout(this._checkAndApplyUnbufferedSeekpoint.bind(this),50)}_onvCanPlay(Ie){this._receivedCanPlay=!0,this._mediaElement.removeEventListener("canplay",this.e.onvCanPlay)}_onvStalled(Ie){this._checkAndResumeStuckPlayback(!0)}_onvProgress(Ie){this._checkAndResumeStuckPlayback()}}var Vn=or;class Bn{constructor(Ie,Ze){if(this.TAG="NativePlayer",this._type="NativePlayer",this._emitter=new(ue()),this._config=ut(),typeof Ze=="object"&&Object.assign(this._config,Ze),Ie.type.toLowerCase()==="flv")throw new b("NativePlayer does't support flv MediaDataSource input!");if(Ie.hasOwnProperty("segments"))throw new b(`NativePlayer(${Ie.type}) doesn't support multipart playback!`);this.e={onvLoadedMetadata:this._onvLoadedMetadata.bind(this)},this._pendingSeekTime=null,this._statisticsReporter=null,this._mediaDataSource=Ie,this._mediaElement=null}destroy(){this._mediaElement&&(this.unload(),this.detachMediaElement()),this.e=null,this._mediaDataSource=null,this._emitter.removeAllListeners(),this._emitter=null}on(Ie,Ze){Ie===$e.MEDIA_INFO?this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit($e.MEDIA_INFO,this.mediaInfo)}):Ie===$e.STATISTICS_INFO&&this._mediaElement!=null&&this._mediaElement.readyState!==0&&Promise.resolve().then(()=>{this._emitter.emit($e.STATISTICS_INFO,this.statisticsInfo)}),this._emitter.addListener(Ie,Ze)}off(Ie,Ze){this._emitter.removeListener(Ie,Ze)}attachMediaElement(Ie){if(this._mediaElement=Ie,Ie.addEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._pendingSeekTime!=null)try{Ie.currentTime=this._pendingSeekTime,this._pendingSeekTime=null}catch(Ze){}}detachMediaElement(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src"),this._mediaElement.removeEventListener("loadedmetadata",this.e.onvLoadedMetadata),this._mediaElement=null),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}load(){if(!this._mediaElement)throw new E("HTMLMediaElement must be attached before load()!");this._mediaElement.src=this._mediaDataSource.url,this._mediaElement.readyState>0&&(this._mediaElement.currentTime=0),this._mediaElement.preload="auto",this._mediaElement.load(),this._statisticsReporter=window.setInterval(this._reportStatisticsInfo.bind(this),this._config.statisticsInfoReportInterval)}unload(){this._mediaElement&&(this._mediaElement.src="",this._mediaElement.removeAttribute("src")),this._statisticsReporter!=null&&(window.clearInterval(this._statisticsReporter),this._statisticsReporter=null)}play(){return this._mediaElement.play()}pause(){this._mediaElement.pause()}get type(){return this._type}get buffered(){return this._mediaElement.buffered}get duration(){return this._mediaElement.duration}get volume(){return this._mediaElement.volume}set volume(Ie){this._mediaElement.volume=Ie}get muted(){return this._mediaElement.muted}set muted(Ie){this._mediaElement.muted=Ie}get currentTime(){return this._mediaElement?this._mediaElement.currentTime:0}set currentTime(Ie){this._mediaElement?this._mediaElement.currentTime=Ie:this._pendingSeekTime=Ie}get mediaInfo(){let Ze={mimeType:(this._mediaElement instanceof HTMLAudioElement?"audio/":"video/")+this._mediaDataSource.type};return this._mediaElement&&(Ze.duration=Math.floor(this._mediaElement.duration*1e3),this._mediaElement instanceof HTMLVideoElement&&(Ze.width=this._mediaElement.videoWidth,Ze.height=this._mediaElement.videoHeight)),Ze}get statisticsInfo(){let Ie={playerType:this._type,url:this._mediaDataSource.url};if(!(this._mediaElement instanceof HTMLVideoElement))return Ie;let Ze=!0,qe=0,st=0;if(this._mediaElement.getVideoPlaybackQuality){let mt=this._mediaElement.getVideoPlaybackQuality();qe=mt.totalVideoFrames,st=mt.droppedVideoFrames}else this._mediaElement.webkitDecodedFrameCount!=null?(qe=this._mediaElement.webkitDecodedFrameCount,st=this._mediaElement.webkitDroppedFrameCount):Ze=!1;return Ze&&(Ie.decodedFrames=qe,Ie.droppedFrames=st),Ie}_onvLoadedMetadata(Ie){this._pendingSeekTime!=null&&(this._mediaElement.currentTime=this._pendingSeekTime,this._pendingSeekTime=null),this._emitter.emit($e.MEDIA_INFO,this.mediaInfo)}_reportStatisticsInfo(){this._emitter.emit($e.STATISTICS_INFO,this.statisticsInfo)}}var _n=Bn;ie.install();function zn($t,Ie){let Ze=$t;if(Ze==null||typeof Ze!="object")throw new b("MediaDataSource must be an javascript object!");if(!Ze.hasOwnProperty("type"))throw new b("MediaDataSource must has type field to indicate video file type!");switch(Ze.type){case"flv":return new Vn(Ze,Ie);default:return new _n(Ze,Ie)}}function cr(){return ze.supportMSEH264Playback()}function Dn(){return ze.getFeatureList()}let Cn={};Cn.createPlayer=zn,Cn.isSupported=cr,Cn.getFeatureList=Dn,Cn.BaseLoader=ae,Cn.LoaderStatus=x,Cn.LoaderErrors=re,Cn.Events=$e,Cn.ErrorTypes=Un,Cn.ErrorDetails=Fn,Cn.FlvPlayer=Vn,Cn.NativePlayer=_n,Cn.LoggingControl=et,Object.defineProperty(Cn,"version",{enumerable:!0,get:function(){return"__VERSION__"}});var er=Cn},93125:function(qt,Dt,be){(function(ce){if(1)window.OSS=ce(),qt.exports=ce();else var ie})(function(){var ce;return function(){function ie(Ce,ue,se){function te(ne,E){if(!ue[ne]){if(!Ce[ne]){var b=void 0;if(!E&&b)return require(ne,!0);if(le)return le(ne,!0);var z=new Error("Cannot find module '"+ne+"'");throw z.code="MODULE_NOT_FOUND",z}var x=ue[ne]={exports:{}};Ce[ne][0].call(x.exports,function(re){return te(Ce[ne][1][re]||re)},x,x.exports,ie,Ce,ue,se)}return ue[ne].exports}for(var le=void 0,ee=0;ee<se.length;ee++)te(se[ee]);return te}return ie}()({1:[function(ie,Ce,ue){"use strict";var se=ie("./browser/client");se.Buffer=ie("buffer").Buffer,se.co=ie("co"),se.urllib=ie("../shims/xhr"),se.version=ie("./browser/version").version,Ce.exports=se},{"../shims/xhr":244,"./browser/client":2,"./browser/version":5,buffer:38,co:41}],2:[function(ie,Ce,ue){(function(se,te){"use strict";function le(ze){return ze&&ze.__esModule?ze:{default:ze}}function ee(ze,Ve){return ze[Ve]||ze[Ve.toLowerCase()]}function ne(ze,Ve){var $e=Ee.parse(ze);if(!$e.protocol){var nt=Ve?"https://":"http://";$e=Ee.parse(nt+ze)}if($e.protocol!=="http:"&&$e.protocol!=="https:")throw new Error("Endpoint protocol must be http or https.");return $e}function E(ze,Ve,$e){var nt=$e?"https://":"http://",et=Ve?"-internal.aliyuncs.com":".aliyuncs.com";return ze.substr(0,14)==="vpc100-oss-cn-"&&(et=".aliyuncs.com"),Ee.parse(nt+ze+et)}function b(){return document&&document.location&&document.location.protocol==="https:"}function z(ze,Ve){if(!(this instanceof z))return new z(ze,Ve);ze&&ze.inited?this.options=ze:this.options=z.initOptions(ze),this.options.cancelFlag=!1,this.options.urllib?this.urllib=this.options.urllib:(this.urllib=Qe,this.agent=this.options.agent||ut),this.ctx=Ve,this.userAgent=this._getUserAgent(),this.options.amendTimeSkewed=0}var x=ie("babel-runtime/regenerator"),re=le(x),ae=ie("babel-runtime/core-js/object/keys"),oe=le(ae),ve=ie("debug")("ali-oss"),ye=ie("./../../shims/crypto/crypto.js"),me=ie("path"),ge=ie("copy-to"),_e=ie("mime"),he=ie("xml2js"),pe=ie("humanize-ms"),ke=ie("agentkeepalive"),Te=ie("merge-descriptors"),Ee=ie("url"),Oe=ie("is-type-of"),je=ie("platform"),Pe=ie("utility"),Qe=ie("urllib"),Xe=ie("./version"),ot=ie("dateformat"),He=ie("bowser"),rt=ie("../common/signUtils"),Ye=ie("../common/utils"),ut=new ke;Ce.exports=z,z.initOptions=function(ze){if(!ze||!ze.accessKeyId||!ze.accessKeySecret)throw new Error("require accessKeyId, accessKeySecret");var Ve=b(),$e={region:"oss-cn-hangzhou",internal:!1,secure:Ve,bucket:null,endpoint:null,cname:!1};if((0,oe.default)(ze).forEach(function(nt){ze[nt]!==void 0&&($e[nt]=ze[nt])}),$e.accessKeyId=$e.accessKeyId.trim(),$e.accessKeySecret=$e.accessKeySecret.trim(),$e.timeout&&($e.timeout=pe($e.timeout)),$e.endpoint)$e.endpoint=ne($e.endpoint,$e.secure);else{if(!$e.region)throw new Error("require options.endpoint or options.region");$e.endpoint=E($e.region,$e.internal,$e.secure)}return $e.inited=!0,$e};var Ge=z.prototype;Te(Ge,ie("./object")),Te(Ge,ie("./managed_upload")),Te(Ge,ie("../common/multipart")),Te(Ge,ie("../common/thunkpool.js")),z.Wrapper=ie("./wrapper"),Ge.signature=function(ze){return ve("authorization stringToSign: %s",ze),rt.computeSignature(this.options.accessKeySecret,ze)},Ge.authorization=function(ze,Ve,$e,nt){var et=rt.buildCanonicalString(ze.toUpperCase(),Ve,{headers:nt,parameters:$e});return rt.authorization(this.options.accessKeyId,this.options.accessKeySecret,et)},Ge.createRequest=function(ze){var Ve={"x-oss-date":ot(+new Date+this.options.amendTimeSkewed,"UTC:ddd, dd mmm yyyy HH:MM:ss 'GMT'"),"x-oss-user-agent":this.userAgent};this.options.stsToken&&(Ve["x-oss-security-token"]=this.options.stsToken),ge(ze.headers).to(Ve),ee(Ve,"Content-Type")||(ze.mime===_e.default_type&&(ze.mime=""),ze.mime&&ze.mime.indexOf("/")>0?Ve["Content-Type"]=ze.mime:Ve["Content-Type"]=_e.getType(ze.mime||me.extname(ze.object||""))||"application/octet-stream"),ze.content&&(Ve["Content-Md5"]=ye.createHash("md5").update(new te(ze.content,"utf8")).digest("base64"),Ve["Content-Length"]||(Ve["Content-Length"]=ze.content.length));var $e=this._getResource(ze);Ve.authorization=this.authorization(ze.method,$e,ze.subres,Ve);var nt=this._getReqUrl(ze);ve("request %s %s, with headers %j, !!stream: %s",ze.method,nt,Ve,!!ze.stream);var et=ze.timeout||this.options.timeout;return{url:nt,params:{agent:this.agent,method:ze.method,content:ze.content,stream:ze.stream,headers:Ve,timeout:et,writeStream:ze.writeStream,customResponse:ze.customResponse,ctx:ze.ctx||this.ctx}}},Ge.request=re.default.mark(function ze(Ve){var $e,nt,et,pt;return re.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:return $e=this.createRequest(Ve),nt=void 0,et=void 0,ct.prev=3,ct.next=6,this.urllib.request($e.url,$e.params);case 6:nt=ct.sent,ve("response %s %s, got %s, headers: %j",Ve.method,$e.url,nt.status,nt.headers),ct.next=13;break;case 10:ct.prev=10,ct.t0=ct.catch(3),et=ct.t0;case 13:if(pt=void 0,!nt||!Ve.successStatuses||Ve.successStatuses.indexOf(nt.status)!==-1){ct.next=26;break}return ct.next=17,this.requestError(nt);case 17:if(pt=ct.sent,pt.code!=="RequestTimeTooSkewed"){ct.next=23;break}return this.options.amendTimeSkewed=+new Date(pt.serverTime)-new Date,ct.next=22,this.request(Ve);case 22:return ct.abrupt("return",ct.sent);case 23:pt.params=Ve,ct.next=30;break;case 26:if(!et){ct.next=30;break}return ct.next=29,this.requestError(et);case 29:pt=ct.sent;case 30:if(!pt){ct.next=32;break}throw pt;case 32:if(!Ve.xmlResponse){ct.next=36;break}return ct.next=35,this.parseXML(nt.data);case 35:nt.data=ct.sent;case 36:return ct.abrupt("return",nt);case 37:case"end":return ct.stop()}},ze,this,[[3,10]])}),Ge._getResource=function(ze){var Ve="/";return ze.bucket&&(Ve+=ze.bucket+"/"),ze.object&&(Ve+=ze.object),Ve},Ge._isIP=function(ze){return Ye._isIP(ze)},Ge._escape=function(ze){return Pe.encodeURIComponent(ze).replace(/%2F/g,"/")},Ge._getReqUrl=function(ze){var Ve={};ge(this.options.endpoint).to(Ve);var $e=this._isIP(Ve.hostname),nt=this.options.cname;!ze.bucket||nt||$e||(Ve.host=ze.bucket+"."+Ve.host);var et="/";ze.bucket&&$e&&(et+=ze.bucket+"/"),ze.object&&(et+=this._escape(ze.object).replace(/\+/g,"%2B")),Ve.pathname=et;var pt={};if(ze.query&&Te(pt,ze.query),ze.subres){var ct={};Oe.string(ze.subres)?ct[ze.subres]="":Oe.array(ze.subres)?ze.subres.forEach(function(It){ct[It]=""}):ct=ze.subres,Te(pt,ct)}return Ve.query=pt,Ee.format(Ve)},Ge._getUserAgent=function(){var ze=se&&se.browser?"js":"nodejs",Ve="aliyun-sdk-"+ze+"/"+Xe.version,$e=je.description;return!$e&&se&&($e="Node.js "+se.version.slice(1)+" on "+se.platform+" "+se.arch),this._checkUserAgent(Ve+" "+$e)},Ge._checkUserAgent=function(ze){return ze.replace(/\u03b1/,"alpha").replace(/\u03b2/,"beta")},Ge.checkBrowserAndVersion=function(ze,Ve){return He.name===ze&&He.version.split(".")[0]===Ve},Ge.parseXML=function(ze){return function(Ve){te.isBuffer(ze)&&(ze=ze.toString()),he.parseString(ze,{explicitRoot:!1,explicitArray:!1},Ve)}},Ge.requestError=re.default.mark(function ze(Ve){var $e,nt,et,pt;return re.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if($e=null,Ve.data&&Ve.data.length){ct.next=5;break}Ve.status===-1||Ve.status===-2?($e=new Error(Ve.message),$e.name=Ve.name,$e.status=Ve.status,$e.code=Ve.name):(Ve.status===404?($e=new Error("Object not exists"),$e.name="NoSuchKeyError",$e.status=404,$e.code="NoSuchKey"):Ve.status===412?($e=new Error("Pre condition failed"),$e.name="PreconditionFailedError",$e.status=412,$e.code="PreconditionFailed"):($e=new Error("Unknow error, status: "+Ve.status),$e.name="UnknowError",$e.status=Ve.status),$e.requestId=Ve.headers["x-oss-request-id"],$e.host=""),ct.next=30;break;case 5:return nt=String(Ve.data),ve("request response error data: %s",nt),et=void 0,ct.prev=8,ct.next=11,this.parseXML(nt)||{};case 11:et=ct.sent,ct.next=21;break;case 14:return ct.prev=14,ct.t0=ct.catch(8),ve(nt),ct.t0.message+=`
|
|
|
raw xml: `+nt,ct.t0.status=Ve.status,ct.t0.requestId=Ve.headers["x-oss-request-id"],ct.abrupt("return",ct.t0);case 21:pt=et.Message||"unknow request error, status: "+Ve.status,et.Condition&&(pt+=" (condition: "+et.Condition+")"),$e=new Error(pt),$e.name=et.Code?et.Code+"Error":"UnknowError",$e.status=Ve.status,$e.code=et.Code,$e.requestId=et.RequestId,$e.hostId=et.HostId,$e.serverTime=et.ServerTime;case 30:return ve("generate error %j",$e),ct.abrupt("return",$e);case 32:case"end":return ct.stop()}},ze,this,[[8,14]])})}).call(this,ie("_process"),ie("buffer").Buffer)},{"../common/multipart":8,"../common/signUtils":9,"../common/thunkpool.js":10,"../common/utils":11,"./../../shims/crypto/crypto.js":237,"./managed_upload":3,"./object":4,"./version":5,"./wrapper":6,_process:173,agentkeepalive:12,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,bowser:35,buffer:38,"copy-to":43,dateformat:154,debug:155,"humanize-ms":160,"is-type-of":165,"merge-descriptors":168,mime:242,path:170,platform:171,url:203,urllib:244,utility:243,xml2js:213}],3:[function(ie,Ce,ue){(function(se){"use strict";function te(ge){return ge&&ge.__esModule?ge:{default:ge}}function le(ge,_e){if(!(this instanceof le))return new le(ge,_e);me.call(this,_e),this.file=ge,this.reader=new FileReader,this.start=0,this.finish=!1,this.fileBuffer=null}var ee=ie("babel-runtime/core-js/array/from"),ne=te(ee),E=ie("babel-runtime/regenerator"),b=te(E),z=ie("is-type-of"),x=ie("util"),re=ie("path"),ae=ie("mime"),oe=ie("copy-to"),ve=ue;ve.multipartUpload=b.default.mark(function ge(_e,he,pe){var ke,Te,Ee,Oe,je,Pe,Qe,Xe,ot;return b.default.wrap(function(He){for(;;)switch(He.prev=He.next){case 0:if(this.resetCancelFlag(),pe=pe||{},!pe.checkpoint||!pe.checkpoint.uploadId){He.next=6;break}return He.next=5,this._resumeMultipart(pe.checkpoint,pe);case 5:return He.abrupt("return",He.sent);case 6:return ke=102400,pe.mime||(z.file(he)?pe.mime=ae.getType(re.extname(he.name)):z.blob(he)?pe.mime=he.type:pe.mime=ae.getType(re.extname(he))),pe.headers=pe.headers||{},this._convertMetaToHeaders(pe.meta,pe.headers),He.next=12,this._getFileSize(he);case 12:if(!((Te=He.sent)<ke)){He.next=25;break}return Ee=this._createStream(he,0,Te),pe.contentLength=Te,He.next=18,this.putStream(_e,Ee,pe);case 18:if(Oe=He.sent,!pe||!pe.progress){He.next=22;break}return He.next=22,pe.progress(1);case 22:return je={res:Oe.res,bucket:this.options.bucket,name:_e,etag:Oe.res.headers.etag},(pe.headers&&pe.headers["x-oss-callback"]||pe.callback)&&(je.data=Oe.data),He.abrupt("return",je);case 25:if(!(pe.partSize&&pe.partSize<ke)){He.next=27;break}throw new Error("partSize must not be smaller than "+ke);case 27:return He.next=29,this.initMultipartUpload(_e,pe);case 29:if(Pe=He.sent,Qe=Pe.uploadId,Xe=this._getPartSize(Te,pe.partSize),ot={file:he,name:_e,fileSize:Te,partSize:Xe,uploadId:Qe,doneParts:[]},!pe||!pe.progress){He.next=36;break}return He.next=36,pe.progress(0,ot,Pe.res);case 36:return He.next=38,this._resumeMultipart(ot,pe);case 38:return He.abrupt("return",He.sent);case 39:case"end":return He.stop()}},ge,this)}),ve._resumeMultipart=b.default.mark(function ge(_e,he){var pe,ke,Te,Ee,Oe,je,Pe,Qe,Xe,ot,He,rt,Ye,ut,Ge,ze,Ve,$e,nt,et,pt;return b.default.wrap(function(ct){for(;;)switch(ct.prev=ct.next){case 0:if(!this.isCancel()){ct.next=2;break}throw this._makeCancelEvent();case 2:if(pe=_e.file,ke=_e.fileSize,Te=_e.partSize,Ee=_e.uploadId,Oe=_e.doneParts,je=_e.name,Pe=[],Oe.length>0&&oe(Oe).to(Pe),Qe=this._divideParts(ke,Te),Xe=Qe.length,ot=!1,He=b.default.mark(function It(dt,Mt){var xt,gt,_t;return b.default.wrap(function(We){for(;;)switch(We.prev=We.next){case 0:if(dt.isCancel()){We.next=21;break}return We.prev=1,xt=Qe[Mt-1],gt={stream:dt._createStream(pe,xt.start,xt.end),size:xt.end-xt.start},We.next=6,dt._uploadPart(je,Ee,Mt,gt);case 6:if(_t=We.sent,dt.isCancel()||ot){We.next=13;break}if(_e.doneParts.push({number:Mt,etag:_t.res.headers.etag}),Pe.push({number:Mt,etag:_t.res.headers.etag}),!he||!he.progress){We.next=13;break}return We.next=13,he.progress(Oe.length/Xe,_e,_t.res);case 13:We.next=21;break;case 15:if(We.prev=15,We.t0=We.catch(1),dt.isCancel()){We.next=21;break}throw dt.cancel(),We.t0.partNum=Mt,We.t0;case 21:case"end":return We.stop()}},It,this,[[1,15]])}),rt=(0,ne.default)(new Array(Xe),function(It,dt){return dt+1}),Ye=Pe.map(function(It){return It.number}),ut=rt.filter(function(It){return Ye.indexOf(It)<0}),Ge=5,ze=he.parallel||Ge,!this.checkBrowserAndVersion("Internet Explorer","10")&&ze!==1){ct.next=26;break}Ve=0;case 16:if(!(Ve<ut.length)){ct.next=24;break}if(!this.isCancel()){ct.next=19;break}throw this._makeCancelEvent();case 19:return ct.next=21,He(this,ut[Ve]);case 21:Ve++,ct.next=16;break;case 24:ct.next=40;break;case 26:for($e=[],nt=0;nt<ut.length;nt++)$e.push(He(this,ut[nt]));return ct.next=30,this._thunkPool($e,ze);case 30:if(et=ct.sent,ot=!0,!(et&&et.length>0)){ct.next=37;break}throw this.resetCancelFlag(),pt=et[0],pt.message="Failed to upload some parts with error: "+pt.toString()+" part_num: "+pt.partNum,pt;case 37:if(!this.isCancel()){ct.next=40;break}throw $e=null,this._makeCancelEvent();case 40:return ct.next=42,this.completeMultipartUpload(je,Ee,Pe,he);case 42:return ct.abrupt("return",ct.sent);case 43:case"end":return ct.stop()}},ge,this)}),z.file=function(ge){return typeof File!="undefined"&&ge instanceof File},z.blob=function(ge){return typeof Blob!="undefined"&&ge instanceof Blob},ve._getFileSize=b.default.mark(function ge(_e){var he;return b.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:if(!z.buffer(_e)){pe.next=4;break}return pe.abrupt("return",_e.length);case 4:if(!z.blob(_e)&&!z.file(_e)){pe.next=6;break}return pe.abrupt("return",_e.size);case 6:if(!z.string(_e)){pe.next=11;break}return pe.next=9,this._statFile(_e);case 9:return he=pe.sent,pe.abrupt("return",he.size);case 11:throw new Error("_getFileSize requires Buffer/File/String.");case 12:case"end":return pe.stop()}},ge,this)});var ye=ie("stream"),me=ye.Readable;x.inherits(le,me),le.prototype.readFileAndPush=function(ge){if(this.fileBuffer)for(var _e=!0;_e&&this.fileBuffer&&this.start<this.fileBuffer.length;){var he=this.start,pe=he+ge;pe=pe>this.fileBuffer.length?this.fileBuffer.length:pe,this.start=pe,_e=this.push(this.fileBuffer.slice(he,pe))}},le.prototype._read=function(ge){if(this.file&&this.start>=this.file.size||this.fileBuffer&&this.start>=this.fileBuffer.length||this.finish||this.start===0&&!this.file)return this.finish||(this.fileBuffer=null,this.finish=!0),void this.push(null);ge=ge||16384;var _e=this;this.reader.onload=function(he){_e.fileBuffer=new se(new Uint8Array(he.target.result)),_e.file=null,_e.readFileAndPush(ge)},this.start===0?this.reader.readAsArrayBuffer(this.file):this.readFileAndPush(ge)},ve._createStream=function(ge,_e,he){if(z.blob(ge)||z.file(ge))return new le(ge.slice(_e,he));throw new Error("_createStream requires File/String.")},ve._getPartSize=function(ge,_e){return _e?Math.max(Math.ceil(ge/1e4),_e):1048576},ve._divideParts=function(ge,_e){for(var he=Math.ceil(ge/_e),pe=[],ke=0;ke<he;ke++){var Te=_e*ke,Ee=Math.min(Te+_e,ge);pe.push({start:Te,end:Ee})}return pe},ve._makeCancelEvent=function(){return{status:0,name:"cancel"}}}).call(this,ie("buffer").Buffer)},{"babel-runtime/core-js/array/from":16,"babel-runtime/regenerator":33,buffer:38,"copy-to":43,"is-type-of":165,mime:242,path:170,stream:195,util:207}],4:[function(ie,Ce,ue){"use strict";function se(_e){return _e&&_e.__esModule?_e:{default:_e}}var te=ie("babel-runtime/core-js/object/keys"),le=se(te),ee=ie("babel-runtime/regenerator"),ne=se(ee),E=ie("debug")("ali-oss:object"),b=ie("utility"),z=ie("fs"),x=ie("is-type-of"),re=ie("url"),ae=ie("copy-to"),oe=ie("path"),ve=ie("mime"),ye=ie("../common/callback"),me=ie("../common/signUtils"),ge=ue;ge.append=ne.default.mark(function _e(he,pe,ke){var Te;return ne.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return ke=ke||{},ke.position===void 0&&(ke.position="0"),ke.subres={append:"",position:ke.position},ke.method="POST",Ee.next=6,this.put(he,pe,ke);case 6:return Te=Ee.sent,Te.nextAppendPosition=Te.res.headers["x-oss-next-append-position"],Ee.abrupt("return",Te);case 9:case"end":return Ee.stop()}},_e,this)}),ge.put=ne.default.mark(function _e(he,pe,ke){var Te,Ee,Oe,je,Pe,Qe;return ne.default.wrap(function(Xe){for(;;)switch(Xe.prev=Xe.next){case 0:if(Te=void 0,ke=ke||{},!x.buffer(pe)){Xe.next=6;break}Te=pe,Xe.next=18;break;case 6:if(!x.blob(pe)&&!x.file(pe)){Xe.next=17;break}return ke.mime||(x.file(pe)?ke.mime=ve.getType(oe.extname(pe.name)):ke.mime=pe.type),Ee=this._createStream(pe,0,pe.size),Xe.next=11,this._getFileSize(pe);case 11:return ke.contentLength=Xe.sent,Xe.next=14,this.putStream(he,Ee,ke);case 14:return Xe.abrupt("return",Xe.sent);case 17:throw new TypeError("Must provide Buffer/Blob for put.");case 18:return ke.headers=ke.headers||{},this._convertMetaToHeaders(ke.meta,ke.headers),Oe=ke.method||"PUT",je=this._objectRequestParams(Oe,he,ke),ye.encodeCallback(je,ke),je.mime=ke.mime,je.content=Te,je.successStatuses=[200],Xe.next=28,this.request(je);case 28:return Pe=Xe.sent,Qe={name:he,url:this._objectUrl(he),res:Pe.res},je.headers&&je.headers["x-oss-callback"]&&(Qe.data=JSON.parse(Pe.data.toString())),Xe.abrupt("return",Qe);case 32:case"end":return Xe.stop()}},_e,this)}),ge.putStream=ne.default.mark(function _e(he,pe,ke){var Te,Ee,Oe,je;return ne.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ke=ke||{},ke.headers=ke.headers||{},ke.contentLength?ke.headers["Content-Length"]=ke.contentLength:ke.headers["Transfer-Encoding"]="chunked",this._convertMetaToHeaders(ke.meta,ke.headers),Te=ke.method||"PUT",Ee=this._objectRequestParams(Te,he,ke),ye.encodeCallback(Ee,ke),Ee.mime=ke.mime,Ee.stream=pe,Ee.successStatuses=[200],Pe.next=12,this.request(Ee);case 12:return Oe=Pe.sent,je={name:he,url:this._objectUrl(he),res:Oe.res},Ee.headers&&Ee.headers["x-oss-callback"]&&(je.data=JSON.parse(Oe.data.toString())),Pe.abrupt("return",je);case 16:case"end":return Pe.stop()}},_e,this)}),ge.head=ne.default.mark(function _e(he,pe){var ke,Te,Ee;return ne.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return ke=this._objectRequestParams("HEAD",he,pe),ke.successStatuses=[200,304],Oe.next=4,this.request(ke);case 4:return Te=Oe.sent,Ee={meta:null,res:Te.res,status:Te.status},Te.status===200&&(0,le.default)(Te.headers).forEach(function(je){je.indexOf("x-oss-meta-")===0&&(Ee.meta||(Ee.meta={}),Ee.meta[je.substring(11)]=Te.headers[je])}),Oe.abrupt("return",Ee);case 8:case"end":return Oe.stop()}},_e,this)}),ge.get=ne.default.mark(function _e(he,pe,ke){var Te,Ee,Oe,je;return ne.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return Te=null,Ee=!1,x.writableStream(pe)?Te=pe:x.string(pe)?(Te=z.createWriteStream(pe),Ee=!0):ke=pe,ke=ke||{},ke.process&&(ke.subres=ke.subres||{},ke.subres["x-oss-process"]=ke.process),Oe=void 0,Pe.prev=6,je=this._objectRequestParams("GET",he,ke),je.writeStream=Te,je.successStatuses=[200,206,304],Pe.next=12,this.request(je);case 12:Oe=Pe.sent,Ee&&Te.destroy(),Pe.next=24;break;case 16:if(Pe.prev=16,Pe.t0=Pe.catch(6),!Ee){Pe.next=23;break}return Te.destroy(),E("get error: %s, delete the exists file %s",Pe.t0,pe),Pe.next=23,this._deleteFileSafe(pe);case 23:throw Pe.t0;case 24:return Pe.abrupt("return",{res:Oe.res,content:Oe.data});case 25:case"end":return Pe.stop()}},_e,this,[[6,16]])}),ge.getStream=ne.default.mark(function _e(he,pe){var ke,Te;return ne.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return pe=pe||{},ke=this._objectRequestParams("GET",he,pe),ke.customResponse=!0,ke.successStatuses=[200,206,304],Ee.next=6,this.request(ke);case 6:return Te=Ee.sent,Ee.abrupt("return",{stream:Te.res,res:{status:Te.status,headers:Te.headers}});case 8:case"end":return Ee.stop()}},_e,this)}),ge.delete=ne.default.mark(function _e(he,pe){var ke,Te;return ne.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return ke=this._objectRequestParams("DELETE",he,pe),ke.successStatuses=[204],Ee.next=4,this.request(ke);case 4:return Te=Ee.sent,Ee.abrupt("return",{res:Te.res});case 6:case"end":return Ee.stop()}},_e,this)}),ge.deleteMulti=ne.default.mark(function _e(he,pe){var ke,Te,Ee,Oe,je,Pe;return ne.default.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:for(pe=pe||{},ke=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<Delete>
|
|
|
`,pe.quiet?ke+=` <Quiet>true</Quiet>
|
|
|
`:ke+=` <Quiet>false</Quiet>
|
|
|
`,Te=0;Te<he.length;Te++)ke+=" <Object><Key>"+b.escape(this._objectName(he[Te]))+`</Key></Object>
|
|
|
`;return ke+="</Delete>",E("delete multi objects: %s",ke),pe.subres="delete",Ee=this._objectRequestParams("POST","",pe),Ee.mime="xml",Ee.content=ke,Ee.xmlResponse=!0,Ee.successStatuses=[200],Qe.next=14,this.request(Ee);case 14:return Oe=Qe.sent,je=Oe.data,Pe=je&&je.Deleted||null,Pe&&(Array.isArray(Pe)||(Pe=[Pe]),Pe=Pe.map(function(Xe){return Xe.Key})),Qe.abrupt("return",{res:Oe.res,deleted:Pe});case 19:case"end":return Qe.stop()}},_e,this)}),ge.copy=ne.default.mark(function _e(he,pe,ke){var Te,Ee,Oe;return ne.default.wrap(function(je){for(;;)switch(je.prev=je.next){case 0:return ke=ke||{},ke.headers=ke.headers||{},(0,le.default)(ke.headers).forEach(function(Pe){ke.headers["x-oss-copy-source-"+Pe.toLowerCase()]=ke.headers[Pe]}),ke.meta&&(ke.headers["x-oss-metadata-directive"]="REPLACE"),this._convertMetaToHeaders(ke.meta,ke.headers),pe=pe[0]!=="/"?"/"+this.options.bucket+"/"+encodeURIComponent(pe):"/"+encodeURIComponent(pe.slice(1)),ke.headers["x-oss-copy-source"]=pe,Te=this._objectRequestParams("PUT",he,ke),Te.xmlResponse=!0,Te.successStatuses=[200,304],je.next=12,this.request(Te);case 12:return Ee=je.sent,Oe=Ee.data,Oe&&(Oe={etag:Oe.ETag,lastModified:Oe.LastModified}),je.abrupt("return",{data:Oe,res:Ee.res});case 16:case"end":return je.stop()}},_e,this)}),ge.putMeta=ne.default.mark(function _e(he,pe,ke){return ne.default.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return Te.next=2,this.copy(he,he,{meta:pe||{},timeout:ke&&ke.timeout,ctx:ke&&ke.ctx});case 2:return Te.abrupt("return",Te.sent);case 3:case"end":return Te.stop()}},_e,this)}),ge.list=ne.default.mark(function _e(he,pe){var ke,Te,Ee,Oe,je;return ne.default.wrap(function(Pe){for(;;)switch(Pe.prev=Pe.next){case 0:return ke=this._objectRequestParams("GET","",pe),ke.query=he,ke.xmlResponse=!0,ke.successStatuses=[200],Pe.next=6,this.request(ke);case 6:return Te=Pe.sent,Ee=Te.data.Contents,Oe=this,Ee&&(Array.isArray(Ee)||(Ee=[Ee]),Ee=Ee.map(function(Qe){return{name:Qe.Key,url:Oe._objectUrl(Qe.Key),lastModified:Qe.LastModified,etag:Qe.ETag,type:Qe.Type,size:Number(Qe.Size),storageClass:Qe.StorageClass,owner:{id:Qe.Owner.ID,displayName:Qe.Owner.DisplayName}}})),je=Te.data.CommonPrefixes||null,je&&(Array.isArray(je)||(je=[je]),je=je.map(function(Qe){return Qe.Prefix})),Pe.abrupt("return",{res:Te.res,objects:Ee,prefixes:je,nextMarker:Te.data.NextMarker||null,isTruncated:Te.data.IsTruncated==="true"});case 13:case"end":return Pe.stop()}},_e,this)}),ge.putACL=ne.default.mark(function _e(he,pe,ke){var Te,Ee;return ne.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:return ke=ke||{},ke.subres="acl",ke.headers=ke.headers||{},ke.headers["x-oss-object-acl"]=pe,he=this._objectName(he),Te=this._objectRequestParams("PUT",he,ke),Te.successStatuses=[200],Oe.next=9,this.request(Te);case 9:return Ee=Oe.sent,Oe.abrupt("return",{res:Ee.res});case 11:case"end":return Oe.stop()}},_e,this)}),ge.getACL=ne.default.mark(function _e(he,pe){var ke,Te;return ne.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return pe=pe||{},pe.subres="acl",he=this._objectName(he),ke=this._objectRequestParams("GET",he,pe),ke.successStatuses=[200],ke.xmlResponse=!0,Ee.next=8,this.request(ke);case 8:return Te=Ee.sent,Ee.abrupt("return",{acl:Te.data.AccessControlList.Grant,owner:{id:Te.data.Owner.ID,displayName:Te.data.Owner.DisplayName},res:Te.res});case 10:case"end":return Ee.stop()}},_e,this)}),ge.restore=ne.default.mark(function _e(he,pe){var ke,Te;return ne.default.wrap(function(Ee){for(;;)switch(Ee.prev=Ee.next){case 0:return pe=pe||{},pe.subres="restore",ke=this._objectRequestParams("POST",he,pe),ke.successStatuses=[202],Ee.next=6,this.request(ke);case 6:return Te=Ee.sent,Ee.abrupt("return",{res:Te.res});case 8:case"end":return Ee.stop()}},_e,this)}),ge.signatureUrl=function(_e,he){he=he||{},_e=this._objectName(_e),he.method=he.method||"GET";var pe=b.timestamp()+(he.expires||1800),ke={bucket:this.options.bucket,object:_e},Te=this._getResource(ke);this.options.stsToken&&(he["security-token"]=this.options.stsToken);var Ee=me._signatureForURL(this.options.accessKeySecret,he,Te,pe),Oe=re.parse(this._getReqUrl(ke));return Oe.query={OSSAccessKeyId:this.options.accessKeyId,Expires:pe,Signature:Ee.Signature},ae(Ee.subResource).to(Oe.query),Oe.format()},ge.getObjectUrl=function(_e,he){return he?he[he.length-1]!=="/"&&(he+="/"):he=this.options.endpoint.format(),he+this._escape(this._objectName(_e))},ge._objectUrl=function(_e){return this._getReqUrl({bucket:this.options.bucket,object:_e})},ge.generateObjectUrl=function(_e,he){if(he)he[he.length-1]!=="/"&&(he+="/");else{he=this.options.endpoint.format();var pe=re.parse(he),ke=this.options.bucket;pe.hostname=ke+"."+pe.hostname,pe.host=ke+"."+pe.host,he=pe.format()}return he+this._escape(this._objectName(_e))},ge._objectRequestParams=function(_e,he,pe){if(!this.options.bucket)throw new Error("Please create a bucket first");pe=pe||{},he=this._objectName(he);var ke={object:he,bucket:this.options.bucket,method:_e,subres:pe&&pe.subres,timeout:pe&&pe.timeout,ctx:pe&&pe.ctx};return pe.headers&&(ke.headers={},ae(pe.headers).to(ke.headers)),ke},ge._objectName=function(_e){return _e.replace(/^\/+/,"")},ge._statFile=function(_e){return function(he){z.stat(_e,he)}},ge._convertMetaToHeaders=function(_e,he){_e&&(0,le.default)(_e).forEach(function(pe){he["x-oss-meta-"+pe]=_e[pe]})},ge._deleteFileSafe=function(_e){return function(he){z.exists(_e,function(pe){pe?z.unlink(_e,function(ke){ke&&E("unlink %j error: %s",_e,ke),he()}):he()})}}},{"../common/callback":7,"../common/signUtils":9,"babel-runtime/core-js/object/keys":23,"babel-runtime/regenerator":33,"copy-to":43,debug:155,fs:36,"is-type-of":165,mime:242,path:170,url:203,utility:243}],5:[function(ie,Ce,ue){"use strict";ue.version="5.3.1"},{}],6:[function(ie,Ce,ue){"use strict";function se(oe){return oe&&oe.__esModule?oe:{default:oe}}function te(oe){return oe&&typeof oe.next=="function"&&typeof oe.throw=="function"}function le(oe){if(!oe)return!1;var ve=oe.constructor;return!!ve&&(ve.name==="GeneratorFunction"||ve.displayName==="GeneratorFunction"||te(ve.prototype)||te(oe.prototype))}function ee(oe,ve){var ye=new oe(ve),me=(0,x.default)(ye),ge=(0,x.default)((0,b.default)(ye));me.concat(ge).forEach(function(_e){le(ye[_e])?this[_e]=re.wrap(ye[_e]).bind(ye):this[_e]=ye[_e]},this)}function ne(oe){if(!(this instanceof ne))return new ne(oe);ee.call(this,ae,oe)}var E=ie("babel-runtime/core-js/object/get-prototype-of"),b=se(E),z=ie("babel-runtime/core-js/object/keys"),x=se(z),re=ie("co"),ae=ie("./client");Ce.exports=ne,ne.STS=function oe(ve){if(!(this instanceof oe))return new oe(ve);ee.call(this,ae.STS,ve)}},{"./client":2,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/core-js/object/keys":23,co:41}],7:[function(ie,Ce,ue){(function(se){"use strict";function te(b){return b&&b.__esModule?b:{default:b}}var le=ie("babel-runtime/core-js/object/keys"),ee=te(le),ne=ie("babel-runtime/core-js/json/stringify"),E=te(ne);ue.encodeCallback=function(b,z){if(b.headers=b.headers||{},!Object.prototype.hasOwnProperty.call(b.headers,"x-oss-callback")&&z.callback){var x={callbackUrl:encodeURI(z.callback.url),callbackBody:z.callback.body};z.callback.host&&(x.callbackHost=z.callback.host),z.callback.contentType&&(x.callbackBodyType=z.callback.contentType);var re=new se((0,E.default)(x)).toString("base64");if(b.headers["x-oss-callback"]=re,z.callback.customValue){var ae={};(0,ee.default)(z.callback.customValue).forEach(function(oe){ae["x:"+oe]=z.callback.customValue[oe]}),b.headers["x-oss-callback-var"]=new se((0,E.default)(ae)).toString("base64")}}}}).call(this,ie("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38}],8:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/regenerator"),te=function(E){return E&&E.__esModule?E:{default:E}}(se),le=ie("copy-to"),ee=ie("./callback"),ne=ue;ne.listUploads=te.default.mark(function E(b,z){var x,re,ae,oe;return te.default.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return z=z||{},x={},le(z).to(x),x.subres="uploads",re=this._objectRequestParams("GET","",x),re.query=b,re.xmlResponse=!0,re.successStatuses=[200],ve.next=10,this.request(re);case 10:return ae=ve.sent,oe=ae.data.Upload||[],Array.isArray(oe)||(oe=[oe]),oe=oe.map(function(ye){return{name:ye.Key,uploadId:ye.UploadId,initiated:ye.Initiated}}),ve.abrupt("return",{res:ae.res,uploads:oe,bucket:ae.data.Bucket,nextKeyMarker:ae.data.NextKeyMarker,nextUploadIdMarker:ae.data.NextUploadIdMarker,isTruncated:ae.data.IsTruncated==="true"});case 15:case"end":return ve.stop()}},E,this)}),ne.listParts=te.default.mark(function E(b,z,x,re){var ae,oe,ve;return te.default.wrap(function(ye){for(;;)switch(ye.prev=ye.next){case 0:return re=re||{},ae={},le(re).to(ae),ae.subres={uploadId:z},oe=this._objectRequestParams("GET",b,ae),oe.query=x,oe.xmlResponse=!0,oe.successStatuses=[200],ye.next=10,this.request(oe);case 10:return ve=ye.sent,ye.abrupt("return",{res:ve.res,uploadId:ve.data.UploadId,bucket:ve.data.Bucket,name:ve.data.Key,partNumberMarker:ve.data.PartNumberMarker,nextPartNumberMarker:ve.data.NextPartNumberMarker,maxParts:ve.data.MaxParts,isTruncated:ve.data.IsTruncated,parts:ve.data.Part||[]});case 12:case"end":return ye.stop()}},E,this)}),ne.abortMultipartUpload=te.default.mark(function E(b,z,x){var re,ae,oe;return te.default.wrap(function(ve){for(;;)switch(ve.prev=ve.next){case 0:return this.cancel(),x=x||{},re={},le(x).to(re),re.subres={uploadId:z},ae=this._objectRequestParams("DELETE",b,re),ae.successStatuses=[204],ve.next=9,this.request(ae);case 9:return oe=ve.sent,ve.abrupt("return",{res:oe.res});case 11:case"end":return ve.stop()}},E,this)}),ne.initMultipartUpload=te.default.mark(function E(b,z){var x,re,ae;return te.default.wrap(function(oe){for(;;)switch(oe.prev=oe.next){case 0:return z=z||{},x={},le(z).to(x),x.headers=x.headers||{},this._convertMetaToHeaders(z.meta,x.headers),x.subres="uploads",re=this._objectRequestParams("POST",b,x),re.mime=z.mime,re.xmlResponse=!0,re.successStatuses=[200],oe.next=12,this.request(re);case 12:return ae=oe.sent,oe.abrupt("return",{res:ae.res,bucket:ae.data.Bucket,name:ae.data.Key,uploadId:ae.data.UploadId});case 14:case"end":return oe.stop()}},E,this)}),ne.uploadPart=te.default.mark(function E(b,z,x,re,ae,oe,ve){var ye;return te.default.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return ye={stream:this._createStream(re,ae,oe),size:oe-ae},me.next=3,this._uploadPart(b,z,x,ye,ve);case 3:return me.abrupt("return",me.sent);case 4:case"end":return me.stop()}},E,this)}),ne.completeMultipartUpload=te.default.mark(function E(b,z,x,re){var ae,oe,ve,ye,me,ge,_e,he;return te.default.wrap(function(pe){for(;;)switch(pe.prev=pe.next){case 0:for(ae=x.concat().sort(function(ke,Te){return ke.number-Te.number}).filter(function(ke,Te,Ee){return!Te||ke.number!==Ee[Te-1].number}),oe=`<?xml version="1.0" encoding="UTF-8"?>
|
|
|
<CompleteMultipartUpload>
|
|
|
`,ve=0;ve<ae.length;ve++)ye=ae[ve],oe+=`<Part>
|
|
|
`,oe+="<PartNumber>"+ye.number+`</PartNumber>
|
|
|
`,oe+="<ETag>"+ye.etag+`</ETag>
|
|
|
`,oe+=`</Part>
|
|
|
`;return oe+="</CompleteMultipartUpload>",re=re||{},me={},le(re).to(me),me.subres={uploadId:z},ge=this._objectRequestParams("POST",b,me),ee.encodeCallback(ge,me),ge.mime="xml",ge.content=oe,ge.headers&&ge.headers["x-oss-callback"]||(ge.xmlResponse=!0),ge.successStatuses=[200],pe.next=16,this.request(ge);case 16:return _e=pe.sent,he={res:_e.res,bucket:ge.bucket,name:b,etag:_e.res.headers.etag},ge.headers&&ge.headers["x-oss-callback"]&&(he.data=JSON.parse(_e.data.toString())),pe.abrupt("return",he);case 20:case"end":return pe.stop()}},E,this)}),ne._uploadPart=te.default.mark(function E(b,z,x,re,ae){var oe,ve,ye;return te.default.wrap(function(me){for(;;)switch(me.prev=me.next){case 0:return ae=ae||{},oe={},le(ae).to(oe),oe.headers={"Content-Length":re.size},oe.subres={partNumber:x,uploadId:z},ve=this._objectRequestParams("PUT",b,oe),ve.mime=oe.mime,ve.stream=re.stream,ve.successStatuses=[200],me.next=11,this.request(ve);case 11:return ye=me.sent,re.stream=null,ve.stream=null,me.abrupt("return",{name:b,etag:ye.res.headers.etag,res:ye.res});case 15:case"end":return me.stop()}},E,this)})},{"./callback":7,"babel-runtime/regenerator":33,"copy-to":43}],9:[function(ie,Ce,ue){(function(se){"use strict";function te(x){return x&&x.__esModule?x:{default:x}}var le=ie("babel-runtime/core-js/json/stringify"),ee=te(le),ne=ie("babel-runtime/core-js/object/keys"),E=te(ne),b=ie("./../../shims/crypto/crypto.js"),z=ie("is-type-of");ue.buildCanonicalizedResource=function(x,re){var ae=""+x,oe="?";if(z.string(re)&&re.trim()!=="")ae+=oe+re;else if(z.array(re))re.sort(),ae+=oe+re.join("&");else if(re){var ve=function(me,ge){return me[0]>ge[0]?1:me[0]<ge[0]?-1:0},ye=function(me){ae+=oe+me,re[me]&&(ae+="="+re[me]),oe="&"};(0,E.default)(re).sort(ve).forEach(ye)}return ae},ue.buildCanonicalString=function(x,re,ae,oe){ae=ae||{};var ve=ae.headers||{},ye=[],me={},ge=[x.toUpperCase(),ve["Content-Md5"]||"",ve["Content-Type"]||ve["Content-Type".toLowerCase()],oe||ve["x-oss-date"]];return(0,E.default)(ve).forEach(function(_e){var he=_e.toLowerCase();he.indexOf("x-oss-")===0&&(me[he]=String(ve[_e]).trim())}),(0,E.default)(me).sort().forEach(function(_e){ye.push(_e+":"+me[_e])}),ge=ge.concat(ye),ge.push(this.buildCanonicalizedResource(re,ae.parameters)),ge.join(`
|
|
|
`)},ue.computeSignature=function(x,re){return b.createHmac("sha1",x).update(new se(re,"utf8")).digest("base64")},ue.authorization=function(x,re,ae){return"OSS "+x+":"+this.computeSignature(re,ae)},ue._signatureForURL=function(x,re,ae,oe){var ve={},ye={};if(re.process&&(ye["x-oss-process"]=re.process),re.response&&(0,E.default)(re.response).forEach(function(he){var pe="response-"+he.toLowerCase();ye[pe]=re.response[he]}),(0,E.default)(re).forEach(function(he){var pe=he.toLowerCase(),ke=re[he];pe.indexOf("x-oss-")===0?ve[pe]=ke:pe.indexOf("content-md5")===0||pe.indexOf("content-type")===0?ve[he]=ke:pe!=="expires"&&pe!=="response"&&pe!=="process"&&pe!=="method"&&(ye[pe]=ke)}),Object.prototype.hasOwnProperty.call(re,"security-token")&&(ye["security-token"]=re["security-token"]),Object.prototype.hasOwnProperty.call(re,"callback")){var me={callbackUrl:encodeURI(re.callback.url),callbackBody:re.callback.body};if(re.callback.host&&(me.callbackHost=re.callback.host),re.callback.contentType&&(me.callbackBodyType=re.callback.contentType),ye.callback=new se((0,ee.default)(me)).toString("base64"),re.callback.customValue){var ge={};(0,E.default)(re.callback.customValue).forEach(function(he){ge["x:"+he]=re.callback.customValue[he]}),ye["callback-var"]=new se((0,ee.default)(ge)).toString("base64")}}var _e=this.buildCanonicalString(re.method,ae,{headers:ve,parameters:ye},oe.toString());return{Signature:this.computeSignature(x,_e),subResource:ye}}}).call(this,ie("buffer").Buffer)},{"./../../shims/crypto/crypto.js":237,"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/keys":23,buffer:38,"is-type-of":165}],10:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/regenerator"),te=function(b){return b&&b.__esModule?b:{default:b}}(se),le=ie("co"),ee=ie("co-priority-queue"),ne=ie("any-promise"),E=ue;E._thunkPool=function(b,z){function x(ye,me){++oe===ye.length&&me(ve)}function re(ye,me){function ge(){var Ee;return te.default.wrap(function(Oe){for(;;)switch(Oe.prev=Oe.next){case 0:Ee=void 0;case 1:if(ae.isCancel()){Oe.next=9;break}return Oe.next=4,pe.next();case 4:return Ee=Oe.sent,Oe.next=7,Ee();case 7:Oe.next=1;break;case 9:ke+=1,ke===ye&&(pe.fns=[],pe.buffer=[],me(ve));case 11:case"end":return Oe.stop()}},he,this)}function _e(Ee){console.error(Ee.stack)}for(var he=te.default.mark(ge),pe=new ee,ke=0,Te=0;Te<ye;Te++)le(ge).catch(_e);return function(Ee,Oe){return function(je){pe.push(te.default.mark(function Pe(){return te.default.wrap(function(Qe){for(;;)switch(Qe.prev=Qe.next){case 0:return Qe.prev=0,Qe.t0=je,Qe.next=4,Ee;case 4:Qe.t1=Qe.sent,(0,Qe.t0)(null,Qe.t1),Qe.next=11;break;case 8:Qe.prev=8,Qe.t2=Qe.catch(0),je(Qe.t2);case 11:case"end":return Qe.stop()}},Pe,this,[[0,8]])}),Oe)}}}var ae=this,oe=0,ve=[];return new ne(function(ye){function me(ke){return te.default.wrap(function(Te){for(;;)switch(Te.prev=Te.next){case 0:return Te.next=2,he(b[ke]);case 2:x(b,ye);case 3:case"end":return Te.stop()}},_e,this)}function ge(ke){ve.push(ke),x(b,ye)}for(var _e=te.default.mark(me),he=new re(z,ye),pe=0;pe<b.length;pe++)le(me(pe)).catch(ge)})},E.cancel=function(){this.options.cancelFlag=!0},E.isCancel=function(){return this.options.cancelFlag},E.resetCancelFlag=function(){this.options.cancelFlag=!1}},{"any-promise":13,"babel-runtime/regenerator":33,co:41,"co-priority-queue":40}],11:[function(ie,Ce,ue){"use strict";ue._isIP=function(se){var te=/^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$/,le=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;return te.test(se)||le.test(se)}},{}],12:[function(ie,Ce,ue){function se(){}Ce.exports=se,Ce.exports.HttpsAgent=se},{}],13:[function(ie,Ce,ue){Ce.exports=ie("./register")().Promise},{"./register":15}],14:[function(ie,Ce,ue){"use strict";var se=null;Ce.exports=function(te,le){return function(ee,ne){ee=ee||null,ne=ne||{};var E=ne.global!==!1;if(se===null&&E&&(se=te["@@any-promise/REGISTRATION"]||null),se!==null&&ee!==null&&se.implementation!==ee)throw new Error('any-promise already defined as "'+se.implementation+'". You can only register an implementation before the first call to require("any-promise") and an implementation cannot be changed');return se===null&&(se=ee!==null&&ne.Promise!==void 0?{Promise:ne.Promise,implementation:ee}:le(ee),E&&(te["@@any-promise/REGISTRATION"]=se)),se}}},{}],15:[function(ie,Ce,ue){"use strict";function se(){if(window.Promise===void 0)throw new Error("any-promise browser requires a polyfill or explicit registration e.g: require('any-promise/register/bluebird')");return{Promise:window.Promise,implementation:"window.Promise"}}Ce.exports=ie("./loader")(window,se)},{"./loader":14}],16:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/array/from"),__esModule:!0}},{"core-js/library/fn/array/from":44}],17:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/json/stringify"),__esModule:!0}},{"core-js/library/fn/json/stringify":45}],18:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/object/assign"),__esModule:!0}},{"core-js/library/fn/object/assign":46}],19:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/object/create"),__esModule:!0}},{"core-js/library/fn/object/create":47}],20:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/object/define-property"),__esModule:!0}},{"core-js/library/fn/object/define-property":48}],21:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/object/get-own-property-names"),__esModule:!0}},{"core-js/library/fn/object/get-own-property-names":49}],22:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/object/get-prototype-of"),__esModule:!0}},{"core-js/library/fn/object/get-prototype-of":50}],23:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/object/keys"),__esModule:!0}},{"core-js/library/fn/object/keys":51}],24:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/promise"),__esModule:!0}},{"core-js/library/fn/promise":52}],25:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/set-immediate"),__esModule:!0}},{"core-js/library/fn/set-immediate":53}],26:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/string/from-code-point"),__esModule:!0}},{"core-js/library/fn/string/from-code-point":54}],27:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/symbol"),__esModule:!0}},{"core-js/library/fn/symbol":56}],28:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/symbol/has-instance"),__esModule:!0}},{"core-js/library/fn/symbol/has-instance":55}],29:[function(ie,Ce,ue){Ce.exports={default:ie("core-js/library/fn/symbol/iterator"),__esModule:!0}},{"core-js/library/fn/symbol/iterator":57}],30:[function(ie,Ce,ue){"use strict";ue.__esModule=!0,ue.default=function(se,te){if(!(se instanceof te))throw new TypeError("Cannot call a class as a function")}},{}],31:[function(ie,Ce,ue){"use strict";ue.__esModule=!0;var se=ie("../core-js/object/define-property"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);ue.default=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),(0,te.default)(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}()},{"../core-js/object/define-property":20}],32:[function(ie,Ce,ue){"use strict";function se(b){return b&&b.__esModule?b:{default:b}}ue.__esModule=!0;var te=ie("../core-js/symbol/iterator"),le=se(te),ee=ie("../core-js/symbol"),ne=se(ee),E=typeof ne.default=="function"&&typeof le.default=="symbol"?function(b){return typeof b}:function(b){return b&&typeof ne.default=="function"&&b.constructor===ne.default&&b!==ne.default.prototype?"symbol":typeof b};ue.default=typeof ne.default=="function"&&E(le.default)==="symbol"?function(b){return b===void 0?"undefined":E(b)}:function(b){return b&&typeof ne.default=="function"&&b.constructor===ne.default&&b!==ne.default.prototype?"symbol":b===void 0?"undefined":E(b)}},{"../core-js/symbol":27,"../core-js/symbol/iterator":29}],33:[function(ie,Ce,ue){Ce.exports=ie("regenerator-runtime")},{"regenerator-runtime":191}],34:[function(ie,Ce,ue){"use strict";function se(ye){var me=ye.length;if(me%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var ge=ye.indexOf("=");return ge===-1&&(ge=me),[ge,ge===me?0:4-ge%4]}function te(ye){var me=se(ye),ge=me[0],_e=me[1];return 3*(ge+_e)/4-_e}function le(ye,me,ge){return 3*(me+ge)/4-ge}function ee(ye){for(var me,ge=se(ye),_e=ge[0],he=ge[1],pe=new re(le(ye,_e,he)),ke=0,Te=he>0?_e-4:_e,Ee=0;Ee<Te;Ee+=4)me=x[ye.charCodeAt(Ee)]<<18|x[ye.charCodeAt(Ee+1)]<<12|x[ye.charCodeAt(Ee+2)]<<6|x[ye.charCodeAt(Ee+3)],pe[ke++]=me>>16&255,pe[ke++]=me>>8&255,pe[ke++]=255&me;return he===2&&(me=x[ye.charCodeAt(Ee)]<<2|x[ye.charCodeAt(Ee+1)]>>4,pe[ke++]=255&me),he===1&&(me=x[ye.charCodeAt(Ee)]<<10|x[ye.charCodeAt(Ee+1)]<<4|x[ye.charCodeAt(Ee+2)]>>2,pe[ke++]=me>>8&255,pe[ke++]=255&me),pe}function ne(ye){return z[ye>>18&63]+z[ye>>12&63]+z[ye>>6&63]+z[63&ye]}function E(ye,me,ge){for(var _e,he=[],pe=me;pe<ge;pe+=3)_e=(ye[pe]<<16&16711680)+(ye[pe+1]<<8&65280)+(255&ye[pe+2]),he.push(ne(_e));return he.join("")}function b(ye){for(var me,ge=ye.length,_e=ge%3,he=[],pe=0,ke=ge-_e;pe<ke;pe+=16383)he.push(E(ye,pe,pe+16383>ke?ke:pe+16383));return _e===1?(me=ye[ge-1],he.push(z[me>>2]+z[me<<4&63]+"==")):_e===2&&(me=(ye[ge-2]<<8)+ye[ge-1],he.push(z[me>>10]+z[me>>4&63]+z[me<<2&63]+"=")),he.join("")}ue.byteLength=te,ue.toByteArray=ee,ue.fromByteArray=b;for(var z=[],x=[],re=typeof Uint8Array!="undefined"?Uint8Array:Array,ae="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",oe=0,ve=ae.length;oe<ve;++oe)z[oe]=ae[oe],x[ae.charCodeAt(oe)]=oe;x[45]=62,x[95]=63},{}],35:[function(ie,Ce,ue){(function(se,te,le){Ce!==void 0&&Ce.exports?Ce.exports=le():typeof ce=="function"&&ce.amd?ce("bowser",le):se.bowser=le()})(this,0,function(){function se(x){function re(ze){var Ve=x.match(ze);return Ve&&Ve.length>1&&Ve[1]||""}function ae(ze){var Ve=x.match(ze);return Ve&&Ve.length>1&&Ve[2]||""}var oe,ve=re(/(ipod|iphone|ipad)/i).toLowerCase(),ye=/like android/i.test(x),me=!ye&&/android/i.test(x),ge=/nexus\s*[0-6]\s*/i.test(x),_e=!ge&&/nexus\s*[0-9]+/i.test(x),he=/CrOS/.test(x),pe=/silk/i.test(x),ke=/sailfish/i.test(x),Te=/tizen/i.test(x),Ee=/(web|hpw)os/i.test(x),Oe=/windows phone/i.test(x),je=(/SamsungBrowser/i.test(x),!Oe&&/windows/i.test(x)),Pe=!ve&&!pe&&/macintosh/i.test(x),Qe=!me&&!ke&&!Te&&!Ee&&/linux/i.test(x),Xe=ae(/edg([ea]|ios)\/(\d+(\.\d+)?)/i),ot=re(/version\/(\d+(\.\d+)?)/i),He=/tablet/i.test(x)&&!/tablet pc/i.test(x),rt=!He&&/[^-]mobi/i.test(x),Ye=/xbox/i.test(x);/opera/i.test(x)?oe={name:"Opera",opera:b,version:ot||re(/(?:opera|opr|opios)[\s\/](\d+(\.\d+)?)/i)}:/opr\/|opios/i.test(x)?oe={name:"Opera",opera:b,version:re(/(?:opr|opios)[\s\/](\d+(\.\d+)?)/i)||ot}:/SamsungBrowser/i.test(x)?oe={name:"Samsung Internet for Android",samsungBrowser:b,version:ot||re(/(?:SamsungBrowser)[\s\/](\d+(\.\d+)?)/i)}:/coast/i.test(x)?oe={name:"Opera Coast",coast:b,version:ot||re(/(?:coast)[\s\/](\d+(\.\d+)?)/i)}:/yabrowser/i.test(x)?oe={name:"Yandex Browser",yandexbrowser:b,version:ot||re(/(?:yabrowser)[\s\/](\d+(\.\d+)?)/i)}:/ucbrowser/i.test(x)?oe={name:"UC Browser",ucbrowser:b,version:re(/(?:ucbrowser)[\s\/](\d+(?:\.\d+)+)/i)}:/mxios/i.test(x)?oe={name:"Maxthon",maxthon:b,version:re(/(?:mxios)[\s\/](\d+(?:\.\d+)+)/i)}:/epiphany/i.test(x)?oe={name:"Epiphany",epiphany:b,version:re(/(?:epiphany)[\s\/](\d+(?:\.\d+)+)/i)}:/puffin/i.test(x)?oe={name:"Puffin",puffin:b,version:re(/(?:puffin)[\s\/](\d+(?:\.\d+)?)/i)}:/sleipnir/i.test(x)?oe={name:"Sleipnir",sleipnir:b,version:re(/(?:sleipnir)[\s\/](\d+(?:\.\d+)+)/i)}:/k-meleon/i.test(x)?oe={name:"K-Meleon",kMeleon:b,version:re(/(?:k-meleon)[\s\/](\d+(?:\.\d+)+)/i)}:Oe?(oe={name:"Windows Phone",osname:"Windows Phone",windowsphone:b},Xe?(oe.msedge=b,oe.version=Xe):(oe.msie=b,oe.version=re(/iemobile\/(\d+(\.\d+)?)/i))):/msie|trident/i.test(x)?oe={name:"Internet Explorer",msie:b,version:re(/(?:msie |rv:)(\d+(\.\d+)?)/i)}:he?oe={name:"Chrome",osname:"Chrome OS",chromeos:b,chromeBook:b,chrome:b,version:re(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:/edg([ea]|ios)/i.test(x)?oe={name:"Microsoft Edge",msedge:b,version:Xe}:/vivaldi/i.test(x)?oe={name:"Vivaldi",vivaldi:b,version:re(/vivaldi\/(\d+(\.\d+)?)/i)||ot}:ke?oe={name:"Sailfish",osname:"Sailfish OS",sailfish:b,version:re(/sailfish\s?browser\/(\d+(\.\d+)?)/i)}:/seamonkey\//i.test(x)?oe={name:"SeaMonkey",seamonkey:b,version:re(/seamonkey\/(\d+(\.\d+)?)/i)}:/firefox|iceweasel|fxios/i.test(x)?(oe={name:"Firefox",firefox:b,version:re(/(?:firefox|iceweasel|fxios)[ \/](\d+(\.\d+)?)/i)},/\((mobile|tablet);[^\)]*rv:[\d\.]+\)/i.test(x)&&(oe.firefoxos=b,oe.osname="Firefox OS")):pe?oe={name:"Amazon Silk",silk:b,version:re(/silk\/(\d+(\.\d+)?)/i)}:/phantom/i.test(x)?oe={name:"PhantomJS",phantom:b,version:re(/phantomjs\/(\d+(\.\d+)?)/i)}:/slimerjs/i.test(x)?oe={name:"SlimerJS",slimer:b,version:re(/slimerjs\/(\d+(\.\d+)?)/i)}:/blackberry|\bbb\d+/i.test(x)||/rim\stablet/i.test(x)?oe={name:"BlackBerry",osname:"BlackBerry OS",blackberry:b,version:ot||re(/blackberry[\d]+\/(\d+(\.\d+)?)/i)}:Ee?(oe={name:"WebOS",osname:"WebOS",webos:b,version:ot||re(/w(?:eb)?osbrowser\/(\d+(\.\d+)?)/i)},/touchpad\//i.test(x)&&(oe.touchpad=b)):/bada/i.test(x)?oe={name:"Bada",osname:"Bada",bada:b,version:re(/dolfin\/(\d+(\.\d+)?)/i)}:Te?oe={name:"Tizen",osname:"Tizen",tizen:b,version:re(/(?:tizen\s?)?browser\/(\d+(\.\d+)?)/i)||ot}:/qupzilla/i.test(x)?oe={name:"QupZilla",qupzilla:b,version:re(/(?:qupzilla)[\s\/](\d+(?:\.\d+)+)/i)||ot}:/chromium/i.test(x)?oe={name:"Chromium",chromium:b,version:re(/(?:chromium)[\s\/](\d+(?:\.\d+)?)/i)||ot}:/chrome|crios|crmo/i.test(x)?oe={name:"Chrome",chrome:b,version:re(/(?:chrome|crios|crmo)\/(\d+(\.\d+)?)/i)}:me?oe={name:"Android",version:ot}:/safari|applewebkit/i.test(x)?(oe={name:"Safari",safari:b},ot&&(oe.version=ot)):ve?(oe={name:ve=="iphone"?"iPhone":ve=="ipad"?"iPad":"iPod"},ot&&(oe.version=ot)):oe=/googlebot/i.test(x)?{name:"Googlebot",googlebot:b,version:re(/googlebot\/(\d+(\.\d+))/i)||ot}:{name:re(/^(.*)\/(.*) /),version:ae(/^(.*)\/(.*) /)},!oe.msedge&&/(apple)?webkit/i.test(x)?(/(apple)?webkit\/537\.36/i.test(x)?(oe.name=oe.name||"Blink",oe.blink=b):(oe.name=oe.name||"Webkit",oe.webkit=b),!oe.version&&ot&&(oe.version=ot)):!oe.opera&&/gecko\//i.test(x)&&(oe.name=oe.name||"Gecko",oe.gecko=b,oe.version=oe.version||re(/gecko\/(\d+(\.\d+)?)/i)),oe.windowsphone||!me&&!oe.silk?!oe.windowsphone&&ve?(oe[ve]=b,oe.ios=b,oe.osname="iOS"):Pe?(oe.mac=b,oe.osname="macOS"):Ye?(oe.xbox=b,oe.osname="Xbox"):je?(oe.windows=b,oe.osname="Windows"):Qe&&(oe.linux=b,oe.osname="Linux"):(oe.android=b,oe.osname="Android");var ut="";oe.windows?ut=function(ze){switch(ze){case"NT":return"NT";case"XP":return"XP";case"NT 5.0":return"2000";case"NT 5.1":return"XP";case"NT 5.2":return"2003";case"NT 6.0":return"Vista";case"NT 6.1":return"7";case"NT 6.2":return"8";case"NT 6.3":return"8.1";case"NT 10.0":return"10";default:return}}(re(/Windows ((NT|XP)( \d\d?.\d)?)/i)):oe.windowsphone?ut=re(/windows phone (?:os)?\s?(\d+(\.\d+)*)/i):oe.mac?(ut=re(/Mac OS X (\d+([_\.\s]\d+)*)/i),ut=ut.replace(/[_\s]/g,".")):ve?(ut=re(/os (\d+([_\s]\d+)*) like mac os x/i),ut=ut.replace(/[_\s]/g,".")):me?ut=re(/android[ \/-](\d+(\.\d+)*)/i):oe.webos?ut=re(/(?:web|hpw)os\/(\d+(\.\d+)*)/i):oe.blackberry?ut=re(/rim\stablet\sos\s(\d+(\.\d+)*)/i):oe.bada?ut=re(/bada\/(\d+(\.\d+)*)/i):oe.tizen&&(ut=re(/tizen[\/\s](\d+(\.\d+)*)/i)),ut&&(oe.osversion=ut);var Ge=!oe.windows&&ut.split(".")[0];return He||_e||ve=="ipad"||me&&(Ge==3||Ge>=4&&!rt)||oe.silk?oe.tablet=b:(rt||ve=="iphone"||ve=="ipod"||me||ge||oe.blackberry||oe.webos||oe.bada)&&(oe.mobile=b),oe.msedge||oe.msie&&oe.version>=10||oe.yandexbrowser&&oe.version>=15||oe.vivaldi&&oe.version>=1||oe.chrome&&oe.version>=20||oe.samsungBrowser&&oe.version>=4||oe.firefox&&oe.version>=20||oe.safari&&oe.version>=6||oe.opera&&oe.version>=10||oe.ios&&oe.osversion&&oe.osversion.split(".")[0]>=6||oe.blackberry&&oe.version>=10.1||oe.chromium&&oe.version>=20?oe.a=b:oe.msie&&oe.version<10||oe.chrome&&oe.version<20||oe.firefox&&oe.version<20||oe.safari&&oe.version<6||oe.opera&&oe.version<10||oe.ios&&oe.osversion&&oe.osversion.split(".")[0]<6||oe.chromium&&oe.version<20?oe.c=b:oe.x=b,oe}function te(x){return x.split(".").length}function le(x,re){var ae,oe=[];if(Array.prototype.map)return Array.prototype.map.call(x,re);for(ae=0;ae<x.length;ae++)oe.push(re(x[ae]));return oe}function ee(x){for(var re=Math.max(te(x[0]),te(x[1])),ae=le(x,function(oe){var ve=re-te(oe);return oe+=new Array(ve+1).join(".0"),le(oe.split("."),function(ye){return new Array(20-ye.length).join("0")+ye}).reverse()});--re>=0;){if(ae[0][re]>ae[1][re])return 1;if(ae[0][re]!==ae[1][re])return-1;if(re===0)return 0}}function ne(x,re,ae){var oe=z;typeof re=="string"&&(ae=re,re=void 0),re===void 0&&(re=!1),ae&&(oe=se(ae));var ve=""+oe.version;for(var ye in x)if(x.hasOwnProperty(ye)&&oe[ye]){if(typeof x[ye]!="string")throw new Error("Browser version in the minVersion map should be a string: "+ye+": "+String(x));return ee([ve,x[ye]])<0}return re}function E(x,re,ae){return!ne(x,re,ae)}var b=!0,z=se(typeof navigator!="undefined"&&navigator.userAgent||"");return z.test=function(x){for(var re=0;re<x.length;++re){var ae=x[re];if(typeof ae=="string"&&ae in z)return!0}return!1},z.isUnsupportedBrowser=ne,z.compareVersions=ee,z.check=E,z._detect=se,z.detect=se,z})},{}],36:[function(ie,Ce,ue){},{}],37:[function(ie,Ce,ue){function se(z){if(z&&!E(z))throw new Error("Unknown encoding: "+z)}function te(z){return z.toString(this.encoding)}function le(z){this.charReceived=z.length%2,this.charLength=this.charReceived?2:0}function ee(z){this.charReceived=z.length%3,this.charLength=this.charReceived?3:0}var ne=ie("buffer").Buffer,E=ne.isEncoding||function(z){switch(z&&z.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}},b=ue.StringDecoder=function(z){switch(this.encoding=(z||"utf8").toLowerCase().replace(/[-_]/,""),se(z),this.encoding){case"utf8":this.surrogateSize=3;break;case"ucs2":case"utf16le":this.surrogateSize=2,this.detectIncompleteChar=le;break;case"base64":this.surrogateSize=3,this.detectIncompleteChar=ee;break;default:return void(this.write=te)}this.charBuffer=new ne(6),this.charReceived=0,this.charLength=0};b.prototype.write=function(z){for(var x="";this.charLength;){var re=z.length>=this.charLength-this.charReceived?this.charLength-this.charReceived:z.length;if(z.copy(this.charBuffer,this.charReceived,0,re),this.charReceived+=re,this.charReceived<this.charLength)return"";z=z.slice(re,z.length),x=this.charBuffer.slice(0,this.charLength).toString(this.encoding);var oe=x.charCodeAt(x.length-1);if(!(oe>=55296&&oe<=56319)){if(this.charReceived=this.charLength=0,z.length===0)return x;break}this.charLength+=this.surrogateSize,x=""}this.detectIncompleteChar(z);var ae=z.length;this.charLength&&(z.copy(this.charBuffer,0,z.length-this.charReceived,ae),ae-=this.charReceived),x+=z.toString(this.encoding,0,ae);var ae=x.length-1,oe=x.charCodeAt(ae);if(oe>=55296&&oe<=56319){var ve=this.surrogateSize;return this.charLength+=ve,this.charReceived+=ve,this.charBuffer.copy(this.charBuffer,ve,0,ve),z.copy(this.charBuffer,0,0,ve),x.substring(0,ae)}return x},b.prototype.detectIncompleteChar=function(z){for(var x=z.length>=3?3:z.length;x>0;x--){var re=z[z.length-x];if(x==1&&re>>5==6){this.charLength=2;break}if(x<=2&&re>>4==14){this.charLength=3;break}if(x<=3&&re>>3==30){this.charLength=4;break}}this.charReceived=x},b.prototype.end=function(z){var x="";if(z&&z.length&&(x=this.write(z)),this.charReceived){var re=this.charReceived,ae=this.charBuffer,oe=this.encoding;x+=ae.slice(0,re).toString(oe)}return x}},{buffer:38}],38:[function(ie,Ce,ue){(function(se){"use strict";function te(){return ee.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function le(we,Le){if(te()<Le)throw new RangeError("Invalid typed array length");return ee.TYPED_ARRAY_SUPPORT?(we=new Uint8Array(Le),we.__proto__=ee.prototype):(we===null&&(we=new ee(Le)),we.length=Le),we}function ee(we,Le,Ue){if(!(ee.TYPED_ARRAY_SUPPORT||this instanceof ee))return new ee(we,Le,Ue);if(typeof we=="number"){if(typeof Le=="string")throw new Error("If encoding is specified then the first argument must be a string");return z(this,we)}return ne(this,we,Le,Ue)}function ne(we,Le,Ue,Me){if(typeof Le=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&Le instanceof ArrayBuffer?ae(we,Le,Ue,Me):typeof Le=="string"?x(we,Le,Ue):oe(we,Le)}function E(we){if(typeof we!="number")throw new TypeError('"size" argument must be a number');if(we<0)throw new RangeError('"size" argument must not be negative')}function b(we,Le,Ue,Me){return E(Le),Le<=0?le(we,Le):Ue!==void 0?typeof Me=="string"?le(we,Le).fill(Ue,Me):le(we,Le).fill(Ue):le(we,Le)}function z(we,Le){if(E(Le),we=le(we,Le<0?0:0|ve(Le)),!ee.TYPED_ARRAY_SUPPORT)for(var Ue=0;Ue<Le;++Ue)we[Ue]=0;return we}function x(we,Le,Ue){if(typeof Ue=="string"&&Ue!==""||(Ue="utf8"),!ee.isEncoding(Ue))throw new TypeError('"encoding" must be a valid string encoding');var Me=0|me(Le,Ue);we=le(we,Me);var Re=we.write(Le,Ue);return Re!==Me&&(we=we.slice(0,Re)),we}function re(we,Le){var Ue=Le.length<0?0:0|ve(Le.length);we=le(we,Ue);for(var Me=0;Me<Ue;Me+=1)we[Me]=255&Le[Me];return we}function ae(we,Le,Ue,Me){if(Le.byteLength,Ue<0||Le.byteLength<Ue)throw new RangeError("'offset' is out of bounds");if(Le.byteLength<Ue+(Me||0))throw new RangeError("'length' is out of bounds");return Le=Ue===void 0&&Me===void 0?new Uint8Array(Le):Me===void 0?new Uint8Array(Le,Ue):new Uint8Array(Le,Ue,Me),ee.TYPED_ARRAY_SUPPORT?(we=Le,we.__proto__=ee.prototype):we=re(we,Le),we}function oe(we,Le){if(ee.isBuffer(Le)){var Ue=0|ve(Le.length);return we=le(we,Ue),we.length===0||Le.copy(we,0,0,Ue),we}if(Le){if(typeof ArrayBuffer!="undefined"&&Le.buffer instanceof ArrayBuffer||"length"in Le)return typeof Le.length!="number"||Ae(Le.length)?le(we,0):re(we,Le);if(Le.type==="Buffer"&&Ke(Le.data))return re(we,Le.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function ve(we){if(we>=te())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+te().toString(16)+" bytes");return 0|we}function ye(we){return+we!=we&&(we=0),ee.alloc(+we)}function me(we,Le){if(ee.isBuffer(we))return we.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(we)||we instanceof ArrayBuffer))return we.byteLength;typeof we!="string"&&(we=""+we);var Ue=we.length;if(Ue===0)return 0;for(var Me=!1;;)switch(Le){case"ascii":case"latin1":case"binary":return Ue;case"utf8":case"utf-8":case void 0:return Mt(we).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Ue;case"hex":return Ue>>>1;case"base64":return _t(we).length;default:if(Me)return Mt(we).length;Le=(""+Le).toLowerCase(),Me=!0}}function ge(we,Le,Ue){var Me=!1;if((Le===void 0||Le<0)&&(Le=0),Le>this.length||((Ue===void 0||Ue>this.length)&&(Ue=this.length),Ue<=0)||(Ue>>>=0,Le>>>=0,Ue<=Le))return"";for(we||(we="utf8");;)switch(we){case"hex":return Ye(this,Le,Ue);case"utf8":case"utf-8":return Xe(this,Le,Ue);case"ascii":return He(this,Le,Ue);case"latin1":case"binary":return rt(this,Le,Ue);case"base64":return Qe(this,Le,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ut(this,Le,Ue);default:if(Me)throw new TypeError("Unknown encoding: "+we);we=(we+"").toLowerCase(),Me=!0}}function _e(we,Le,Ue){var Me=we[Le];we[Le]=we[Ue],we[Ue]=Me}function he(we,Le,Ue,Me,Re){if(we.length===0)return-1;if(typeof Ue=="string"?(Me=Ue,Ue=0):Ue>2147483647?Ue=2147483647:Ue<-2147483648&&(Ue=-2147483648),Ue=+Ue,isNaN(Ue)&&(Ue=Re?0:we.length-1),Ue<0&&(Ue=we.length+Ue),Ue>=we.length){if(Re)return-1;Ue=we.length-1}else if(Ue<0){if(!Re)return-1;Ue=0}if(typeof Le=="string"&&(Le=ee.from(Le,Me)),ee.isBuffer(Le))return Le.length===0?-1:pe(we,Le,Ue,Me,Re);if(typeof Le=="number")return Le&=255,ee.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Re?Uint8Array.prototype.indexOf.call(we,Le,Ue):Uint8Array.prototype.lastIndexOf.call(we,Le,Ue):pe(we,[Le],Ue,Me,Re);throw new TypeError("val must be string, number or Buffer")}function pe(we,Le,Ue,Me,Re){function tt(yt,Xt){return lt===1?yt[Xt]:yt.readUInt16BE(Xt*lt)}var lt=1,Pt=we.length,Ct=Le.length;if(Me!==void 0&&((Me=String(Me).toLowerCase())==="ucs2"||Me==="ucs-2"||Me==="utf16le"||Me==="utf-16le")){if(we.length<2||Le.length<2)return-1;lt=2,Pt/=2,Ct/=2,Ue/=2}var vt;if(Re){var Ot=-1;for(vt=Ue;vt<Pt;vt++)if(tt(we,vt)===tt(Le,Ot===-1?0:vt-Ot)){if(Ot===-1&&(Ot=vt),vt-Ot+1===Ct)return Ot*lt}else Ot!==-1&&(vt-=vt-Ot),Ot=-1}else for(Ue+Ct>Pt&&(Ue=Pt-Ct),vt=Ue;vt>=0;vt--){for(var zt=!0,Ft=0;Ft<Ct;Ft++)if(tt(we,vt+Ft)!==tt(Le,Ft)){zt=!1;break}if(zt)return vt}return-1}function ke(we,Le,Ue,Me){Ue=Number(Ue)||0;var Re=we.length-Ue;Me?(Me=Number(Me))>Re&&(Me=Re):Me=Re;var tt=Le.length;if(tt%2!=0)throw new TypeError("Invalid hex string");Me>tt/2&&(Me=tt/2);for(var lt=0;lt<Me;++lt){var Pt=parseInt(Le.substr(2*lt,2),16);if(isNaN(Pt))return lt;we[Ue+lt]=Pt}return lt}function Te(we,Le,Ue,Me){return We(Mt(Le,we.length-Ue),we,Ue,Me)}function Ee(we,Le,Ue,Me){return We(xt(Le),we,Ue,Me)}function Oe(we,Le,Ue,Me){return Ee(we,Le,Ue,Me)}function je(we,Le,Ue,Me){return We(_t(Le),we,Ue,Me)}function Pe(we,Le,Ue,Me){return We(gt(Le,we.length-Ue),we,Ue,Me)}function Qe(we,Le,Ue){return Le===0&&Ue===we.length?Se.fromByteArray(we):Se.fromByteArray(we.slice(Le,Ue))}function Xe(we,Le,Ue){Ue=Math.min(we.length,Ue);for(var Me=[],Re=Le;Re<Ue;){var tt=we[Re],lt=null,Pt=tt>239?4:tt>223?3:tt>191?2:1;if(Re+Pt<=Ue){var Ct,vt,Ot,zt;switch(Pt){case 1:tt<128&&(lt=tt);break;case 2:Ct=we[Re+1],(192&Ct)==128&&(zt=(31&tt)<<6|63&Ct)>127&&(lt=zt);break;case 3:Ct=we[Re+1],vt=we[Re+2],(192&Ct)==128&&(192&vt)==128&&(zt=(15&tt)<<12|(63&Ct)<<6|63&vt)>2047&&(zt<55296||zt>57343)&&(lt=zt);break;case 4:Ct=we[Re+1],vt=we[Re+2],Ot=we[Re+3],(192&Ct)==128&&(192&vt)==128&&(192&Ot)==128&&(zt=(15&tt)<<18|(63&Ct)<<12|(63&vt)<<6|63&Ot)>65535&&zt<1114112&&(lt=zt)}}lt===null?(lt=65533,Pt=1):lt>65535&&(lt-=65536,Me.push(lt>>>10&1023|55296),lt=56320|1023<),Me.push(lt),Re+=Pt}return ot(Me)}function ot(we){var Le=we.length;if(Le<=Ne)return String.fromCharCode.apply(String,we);for(var Ue="",Me=0;Me<Le;)Ue+=String.fromCharCode.apply(String,we.slice(Me,Me+=Ne));return Ue}function He(we,Le,Ue){var Me="";Ue=Math.min(we.length,Ue);for(var Re=Le;Re<Ue;++Re)Me+=String.fromCharCode(127&we[Re]);return Me}function rt(we,Le,Ue){var Me="";Ue=Math.min(we.length,Ue);for(var Re=Le;Re<Ue;++Re)Me+=String.fromCharCode(we[Re]);return Me}function Ye(we,Le,Ue){var Me=we.length;(!Le||Le<0)&&(Le=0),(!Ue||Ue<0||Ue>Me)&&(Ue=Me);for(var Re="",tt=Le;tt<Ue;++tt)Re+=dt(we[tt]);return Re}function ut(we,Le,Ue){for(var Me=we.slice(Le,Ue),Re="",tt=0;tt<Me.length;tt+=2)Re+=String.fromCharCode(Me[tt]+256*Me[tt+1]);return Re}function Ge(we,Le,Ue){if(we%1!=0||we<0)throw new RangeError("offset is not uint");if(we+Le>Ue)throw new RangeError("Trying to access beyond buffer length")}function ze(we,Le,Ue,Me,Re,tt){if(!ee.isBuffer(we))throw new TypeError('"buffer" argument must be a Buffer instance');if(Le>Re||Le<tt)throw new RangeError('"value" argument is out of bounds');if(Ue+Me>we.length)throw new RangeError("Index out of range")}function Ve(we,Le,Ue,Me){Le<0&&(Le=65535+Le+1);for(var Re=0,tt=Math.min(we.length-Ue,2);Re<tt;++Re)we[Ue+Re]=(Le&255<<8*(Me?Re:1-Re))>>>8*(Me?Re:1-Re)}function $e(we,Le,Ue,Me){Le<0&&(Le=4294967295+Le+1);for(var Re=0,tt=Math.min(we.length-Ue,4);Re<tt;++Re)we[Ue+Re]=Le>>>8*(Me?Re:3-Re)&255}function nt(we,Le,Ue,Me,Re,tt){if(Ue+Me>we.length)throw new RangeError("Index out of range");if(Ue<0)throw new RangeError("Index out of range")}function et(we,Le,Ue,Me,Re){return Re||nt(we,Le,Ue,4,34028234663852886e22,-34028234663852886e22),Be.write(we,Le,Ue,Me,23,4),Ue+4}function pt(we,Le,Ue,Me,Re){return Re||nt(we,Le,Ue,8,17976931348623157e292,-17976931348623157e292),Be.write(we,Le,Ue,Me,52,8),Ue+8}function ct(we){if(we=It(we).replace(De,""),we.length<2)return"";for(;we.length%4!=0;)we+="=";return we}function It(we){return we.trim?we.trim():we.replace(/^\s+|\s+$/g,"")}function dt(we){return we<16?"0"+we.toString(16):we.toString(16)}function Mt(we,Le){Le=Le||1/0;for(var Ue,Me=we.length,Re=null,tt=[],lt=0;lt<Me;++lt){if((Ue=we.charCodeAt(lt))>55295&&Ue<57344){if(!Re){if(Ue>56319){(Le-=3)>-1&&tt.push(239,191,189);continue}if(lt+1===Me){(Le-=3)>-1&&tt.push(239,191,189);continue}Re=Ue;continue}if(Ue<56320){(Le-=3)>-1&&tt.push(239,191,189),Re=Ue;continue}Ue=65536+(Re-55296<<10|Ue-56320)}else Re&&(Le-=3)>-1&&tt.push(239,191,189);if(Re=null,Ue<128){if((Le-=1)<0)break;tt.push(Ue)}else if(Ue<2048){if((Le-=2)<0)break;tt.push(Ue>>6|192,63&Ue|128)}else if(Ue<65536){if((Le-=3)<0)break;tt.push(Ue>>12|224,Ue>>6&63|128,63&Ue|128)}else{if(!(Ue<1114112))throw new Error("Invalid code point");if((Le-=4)<0)break;tt.push(Ue>>18|240,Ue>>12&63|128,Ue>>6&63|128,63&Ue|128)}}return tt}function xt(we){for(var Le=[],Ue=0;Ue<we.length;++Ue)Le.push(255&we.charCodeAt(Ue));return Le}function gt(we,Le){for(var Ue,Me,Re,tt=[],lt=0;lt<we.length&&!((Le-=2)<0);++lt)Ue=we.charCodeAt(lt),Me=Ue>>8,Re=Ue%256,tt.push(Re),tt.push(Me);return tt}function _t(we){return Se.toByteArray(ct(we))}function We(we,Le,Ue,Me){for(var Re=0;Re<Me&&!(Re+Ue>=Le.length||Re>=we.length);++Re)Le[Re+Ue]=we[Re];return Re}function Ae(we){return we!==we}var Se=ie("base64-js"),Be=ie("ieee754"),Ke=ie("isarray");ue.Buffer=ee,ue.SlowBuffer=ye,ue.INSPECT_MAX_BYTES=50,ee.TYPED_ARRAY_SUPPORT=se.TYPED_ARRAY_SUPPORT!==void 0?se.TYPED_ARRAY_SUPPORT:function(){try{var we=new Uint8Array(1);return we.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},we.foo()===42&&typeof we.subarray=="function"&&we.subarray(1,1).byteLength===0}catch(Le){return!1}}(),ue.kMaxLength=te(),ee.poolSize=8192,ee._augment=function(we){return we.__proto__=ee.prototype,we},ee.from=function(we,Le,Ue){return ne(null,we,Le,Ue)},ee.TYPED_ARRAY_SUPPORT&&(ee.prototype.__proto__=Uint8Array.prototype,ee.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&ee[Symbol.species]===ee&&Object.defineProperty(ee,Symbol.species,{value:null,configurable:!0})),ee.alloc=function(we,Le,Ue){return b(null,we,Le,Ue)},ee.allocUnsafe=function(we){return z(null,we)},ee.allocUnsafeSlow=function(we){return z(null,we)},ee.isBuffer=function(we){return!(we==null||!we._isBuffer)},ee.compare=function(we,Le){if(!ee.isBuffer(we)||!ee.isBuffer(Le))throw new TypeError("Arguments must be Buffers");if(we===Le)return 0;for(var Ue=we.length,Me=Le.length,Re=0,tt=Math.min(Ue,Me);Re<tt;++Re)if(we[Re]!==Le[Re]){Ue=we[Re],Me=Le[Re];break}return Ue<Me?-1:Me<Ue?1:0},ee.isEncoding=function(we){switch(String(we).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},ee.concat=function(we,Le){if(!Ke(we))throw new TypeError('"list" argument must be an Array of Buffers');if(we.length===0)return ee.alloc(0);var Ue;if(Le===void 0)for(Le=0,Ue=0;Ue<we.length;++Ue)Le+=we[Ue].length;var Me=ee.allocUnsafe(Le),Re=0;for(Ue=0;Ue<we.length;++Ue){var tt=we[Ue];if(!ee.isBuffer(tt))throw new TypeError('"list" argument must be an Array of Buffers');tt.copy(Me,Re),Re+=tt.length}return Me},ee.byteLength=me,ee.prototype._isBuffer=!0,ee.prototype.swap16=function(){var we=this.length;if(we%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Le=0;Le<we;Le+=2)_e(this,Le,Le+1);return this},ee.prototype.swap32=function(){var we=this.length;if(we%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var Le=0;Le<we;Le+=4)_e(this,Le,Le+3),_e(this,Le+1,Le+2);return this},ee.prototype.swap64=function(){var we=this.length;if(we%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var Le=0;Le<we;Le+=8)_e(this,Le,Le+7),_e(this,Le+1,Le+6),_e(this,Le+2,Le+5),_e(this,Le+3,Le+4);return this},ee.prototype.toString=function(){var we=0|this.length;return we===0?"":arguments.length===0?Xe(this,0,we):ge.apply(this,arguments)},ee.prototype.equals=function(we){if(!ee.isBuffer(we))throw new TypeError("Argument must be a Buffer");return this===we||ee.compare(this,we)===0},ee.prototype.inspect=function(){var we="",Le=ue.INSPECT_MAX_BYTES;return this.length>0&&(we=this.toString("hex",0,Le).match(/.{2}/g).join(" "),this.length>Le&&(we+=" ... ")),"<Buffer "+we+">"},ee.prototype.compare=function(we,Le,Ue,Me,Re){if(!ee.isBuffer(we))throw new TypeError("Argument must be a Buffer");if(Le===void 0&&(Le=0),Ue===void 0&&(Ue=we?we.length:0),Me===void 0&&(Me=0),Re===void 0&&(Re=this.length),Le<0||Ue>we.length||Me<0||Re>this.length)throw new RangeError("out of range index");if(Me>=Re&&Le>=Ue)return 0;if(Me>=Re)return-1;if(Le>=Ue)return 1;if(Le>>>=0,Ue>>>=0,Me>>>=0,Re>>>=0,this===we)return 0;for(var tt=Re-Me,lt=Ue-Le,Pt=Math.min(tt,lt),Ct=this.slice(Me,Re),vt=we.slice(Le,Ue),Ot=0;Ot<Pt;++Ot)if(Ct[Ot]!==vt[Ot]){tt=Ct[Ot],lt=vt[Ot];break}return tt<lt?-1:lt<tt?1:0},ee.prototype.includes=function(we,Le,Ue){return this.indexOf(we,Le,Ue)!==-1},ee.prototype.indexOf=function(we,Le,Ue){return he(this,we,Le,Ue,!0)},ee.prototype.lastIndexOf=function(we,Le,Ue){return he(this,we,Le,Ue,!1)},ee.prototype.write=function(we,Le,Ue,Me){if(Le===void 0)Me="utf8",Ue=this.length,Le=0;else if(Ue===void 0&&typeof Le=="string")Me=Le,Ue=this.length,Le=0;else{if(!isFinite(Le))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");Le|=0,isFinite(Ue)?(Ue|=0,Me===void 0&&(Me="utf8")):(Me=Ue,Ue=void 0)}var Re=this.length-Le;if((Ue===void 0||Ue>Re)&&(Ue=Re),we.length>0&&(Ue<0||Le<0)||Le>this.length)throw new RangeError("Attempt to write outside buffer bounds");Me||(Me="utf8");for(var tt=!1;;)switch(Me){case"hex":return ke(this,we,Le,Ue);case"utf8":case"utf-8":return Te(this,we,Le,Ue);case"ascii":return Ee(this,we,Le,Ue);case"latin1":case"binary":return Oe(this,we,Le,Ue);case"base64":return je(this,we,Le,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Pe(this,we,Le,Ue);default:if(tt)throw new TypeError("Unknown encoding: "+Me);Me=(""+Me).toLowerCase(),tt=!0}},ee.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ne=4096;ee.prototype.slice=function(we,Le){var Ue=this.length;we=~~we,Le=Le===void 0?Ue:~~Le,we<0?(we+=Ue)<0&&(we=0):we>Ue&&(we=Ue),Le<0?(Le+=Ue)<0&&(Le=0):Le>Ue&&(Le=Ue),Le<we&&(Le=we);var Me;if(ee.TYPED_ARRAY_SUPPORT)Me=this.subarray(we,Le),Me.__proto__=ee.prototype;else{var Re=Le-we;Me=new ee(Re,void 0);for(var tt=0;tt<Re;++tt)Me[tt]=this[tt+we]}return Me},ee.prototype.readUIntLE=function(we,Le,Ue){we|=0,Le|=0,Ue||Ge(we,Le,this.length);for(var Me=this[we],Re=1,tt=0;++tt<Le&&(Re*=256);)Me+=this[we+tt]*Re;return Me},ee.prototype.readUIntBE=function(we,Le,Ue){we|=0,Le|=0,Ue||Ge(we,Le,this.length);for(var Me=this[we+--Le],Re=1;Le>0&&(Re*=256);)Me+=this[we+--Le]*Re;return Me},ee.prototype.readUInt8=function(we,Le){return Le||Ge(we,1,this.length),this[we]},ee.prototype.readUInt16LE=function(we,Le){return Le||Ge(we,2,this.length),this[we]|this[we+1]<<8},ee.prototype.readUInt16BE=function(we,Le){return Le||Ge(we,2,this.length),this[we]<<8|this[we+1]},ee.prototype.readUInt32LE=function(we,Le){return Le||Ge(we,4,this.length),(this[we]|this[we+1]<<8|this[we+2]<<16)+16777216*this[we+3]},ee.prototype.readUInt32BE=function(we,Le){return Le||Ge(we,4,this.length),16777216*this[we]+(this[we+1]<<16|this[we+2]<<8|this[we+3])},ee.prototype.readIntLE=function(we,Le,Ue){we|=0,Le|=0,Ue||Ge(we,Le,this.length);for(var Me=this[we],Re=1,tt=0;++tt<Le&&(Re*=256);)Me+=this[we+tt]*Re;return Re*=128,Me>=Re&&(Me-=Math.pow(2,8*Le)),Me},ee.prototype.readIntBE=function(we,Le,Ue){we|=0,Le|=0,Ue||Ge(we,Le,this.length);for(var Me=Le,Re=1,tt=this[we+--Me];Me>0&&(Re*=256);)tt+=this[we+--Me]*Re;return Re*=128,tt>=Re&&(tt-=Math.pow(2,8*Le)),tt},ee.prototype.readInt8=function(we,Le){return Le||Ge(we,1,this.length),128&this[we]?-1*(255-this[we]+1):this[we]},ee.prototype.readInt16LE=function(we,Le){Le||Ge(we,2,this.length);var Ue=this[we]|this[we+1]<<8;return 32768&Ue?4294901760|Ue:Ue},ee.prototype.readInt16BE=function(we,Le){Le||Ge(we,2,this.length);var Ue=this[we+1]|this[we]<<8;return 32768&Ue?4294901760|Ue:Ue},ee.prototype.readInt32LE=function(we,Le){return Le||Ge(we,4,this.length),this[we]|this[we+1]<<8|this[we+2]<<16|this[we+3]<<24},ee.prototype.readInt32BE=function(we,Le){return Le||Ge(we,4,this.length),this[we]<<24|this[we+1]<<16|this[we+2]<<8|this[we+3]},ee.prototype.readFloatLE=function(we,Le){return Le||Ge(we,4,this.length),Be.read(this,we,!0,23,4)},ee.prototype.readFloatBE=function(we,Le){return Le||Ge(we,4,this.length),Be.read(this,we,!1,23,4)},ee.prototype.readDoubleLE=function(we,Le){return Le||Ge(we,8,this.length),Be.read(this,we,!0,52,8)},ee.prototype.readDoubleBE=function(we,Le){return Le||Ge(we,8,this.length),Be.read(this,we,!1,52,8)},ee.prototype.writeUIntLE=function(we,Le,Ue,Me){we=+we,Le|=0,Ue|=0,!Me&&ze(this,we,Le,Ue,Math.pow(2,8*Ue)-1,0);var Re=1,tt=0;for(this[Le]=255&we;++tt<Ue&&(Re*=256);)this[Le+tt]=we/Re&255;return Le+Ue},ee.prototype.writeUIntBE=function(we,Le,Ue,Me){we=+we,Le|=0,Ue|=0,!Me&&ze(this,we,Le,Ue,Math.pow(2,8*Ue)-1,0);var Re=Ue-1,tt=1;for(this[Le+Re]=255&we;--Re>=0&&(tt*=256);)this[Le+Re]=we/tt&255;return Le+Ue},ee.prototype.writeUInt8=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,1,255,0),ee.TYPED_ARRAY_SUPPORT||(we=Math.floor(we)),this[Le]=255&we,Le+1},ee.prototype.writeUInt16LE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,2,65535,0),ee.TYPED_ARRAY_SUPPORT?(this[Le]=255&we,this[Le+1]=we>>>8):Ve(this,we,Le,!0),Le+2},ee.prototype.writeUInt16BE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,2,65535,0),ee.TYPED_ARRAY_SUPPORT?(this[Le]=we>>>8,this[Le+1]=255&we):Ve(this,we,Le,!1),Le+2},ee.prototype.writeUInt32LE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,4,4294967295,0),ee.TYPED_ARRAY_SUPPORT?(this[Le+3]=we>>>24,this[Le+2]=we>>>16,this[Le+1]=we>>>8,this[Le]=255&we):$e(this,we,Le,!0),Le+4},ee.prototype.writeUInt32BE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,4,4294967295,0),ee.TYPED_ARRAY_SUPPORT?(this[Le]=we>>>24,this[Le+1]=we>>>16,this[Le+2]=we>>>8,this[Le+3]=255&we):$e(this,we,Le,!1),Le+4},ee.prototype.writeIntLE=function(we,Le,Ue,Me){if(we=+we,Le|=0,!Me){var Re=Math.pow(2,8*Ue-1);ze(this,we,Le,Ue,Re-1,-Re)}var tt=0,lt=1,Pt=0;for(this[Le]=255&we;++tt<Ue&&(lt*=256);)we<0&&Pt===0&&this[Le+tt-1]!==0&&(Pt=1),this[Le+tt]=(we/lt>>0)-Pt&255;return Le+Ue},ee.prototype.writeIntBE=function(we,Le,Ue,Me){if(we=+we,Le|=0,!Me){var Re=Math.pow(2,8*Ue-1);ze(this,we,Le,Ue,Re-1,-Re)}var tt=Ue-1,lt=1,Pt=0;for(this[Le+tt]=255&we;--tt>=0&&(lt*=256);)we<0&&Pt===0&&this[Le+tt+1]!==0&&(Pt=1),this[Le+tt]=(we/lt>>0)-Pt&255;return Le+Ue},ee.prototype.writeInt8=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,1,127,-128),ee.TYPED_ARRAY_SUPPORT||(we=Math.floor(we)),we<0&&(we=255+we+1),this[Le]=255&we,Le+1},ee.prototype.writeInt16LE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,2,32767,-32768),ee.TYPED_ARRAY_SUPPORT?(this[Le]=255&we,this[Le+1]=we>>>8):Ve(this,we,Le,!0),Le+2},ee.prototype.writeInt16BE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,2,32767,-32768),ee.TYPED_ARRAY_SUPPORT?(this[Le]=we>>>8,this[Le+1]=255&we):Ve(this,we,Le,!1),Le+2},ee.prototype.writeInt32LE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,4,2147483647,-2147483648),ee.TYPED_ARRAY_SUPPORT?(this[Le]=255&we,this[Le+1]=we>>>8,this[Le+2]=we>>>16,this[Le+3]=we>>>24):$e(this,we,Le,!0),Le+4},ee.prototype.writeInt32BE=function(we,Le,Ue){return we=+we,Le|=0,Ue||ze(this,we,Le,4,2147483647,-2147483648),we<0&&(we=4294967295+we+1),ee.TYPED_ARRAY_SUPPORT?(this[Le]=we>>>24,this[Le+1]=we>>>16,this[Le+2]=we>>>8,this[Le+3]=255&we):$e(this,we,Le,!1),Le+4},ee.prototype.writeFloatLE=function(we,Le,Ue){return et(this,we,Le,!0,Ue)},ee.prototype.writeFloatBE=function(we,Le,Ue){return et(this,we,Le,!1,Ue)},ee.prototype.writeDoubleLE=function(we,Le,Ue){return pt(this,we,Le,!0,Ue)},ee.prototype.writeDoubleBE=function(we,Le,Ue){return pt(this,we,Le,!1,Ue)},ee.prototype.copy=function(we,Le,Ue,Me){if(Ue||(Ue=0),Me||Me===0||(Me=this.length),Le>=we.length&&(Le=we.length),Le||(Le=0),Me>0&&Me<Ue&&(Me=Ue),Me===Ue||we.length===0||this.length===0)return 0;if(Le<0)throw new RangeError("targetStart out of bounds");if(Ue<0||Ue>=this.length)throw new RangeError("sourceStart out of bounds");if(Me<0)throw new RangeError("sourceEnd out of bounds");Me>this.length&&(Me=this.length),we.length-Le<Me-Ue&&(Me=we.length-Le+Ue);var Re,tt=Me-Ue;if(this===we&&Ue<Le&&Le<Me)for(Re=tt-1;Re>=0;--Re)we[Re+Le]=this[Re+Ue];else if(tt<1e3||!ee.TYPED_ARRAY_SUPPORT)for(Re=0;Re<tt;++Re)we[Re+Le]=this[Re+Ue];else Uint8Array.prototype.set.call(we,this.subarray(Ue,Ue+tt),Le);return tt},ee.prototype.fill=function(we,Le,Ue,Me){if(typeof we=="string"){if(typeof Le=="string"?(Me=Le,Le=0,Ue=this.length):typeof Ue=="string"&&(Me=Ue,Ue=this.length),we.length===1){var Re=we.charCodeAt(0);Re<256&&(we=Re)}if(Me!==void 0&&typeof Me!="string")throw new TypeError("encoding must be a string");if(typeof Me=="string"&&!ee.isEncoding(Me))throw new TypeError("Unknown encoding: "+Me)}else typeof we=="number"&&(we&=255);if(Le<0||this.length<Le||this.length<Ue)throw new RangeError("Out of range index");if(Ue<=Le)return this;Le>>>=0,Ue=Ue===void 0?this.length:Ue>>>0,we||(we=0);var tt;if(typeof we=="number")for(tt=Le;tt<Ue;++tt)this[tt]=we;else{var lt=ee.isBuffer(we)?we:Mt(new ee(we,Me).toString()),Pt=lt.length;for(tt=0;tt<Ue-Le;++tt)this[tt+Le]=lt[tt%Pt]}return this};var De=/[^+\/0-9A-Za-z-_]/g}).call(this,typeof be.g!="undefined"?be.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"base64-js":34,ieee754:161,isarray:166}],39:[function(ie,Ce,ue){Ce.exports={100:"Continue",101:"Switching Protocols",102:"Processing",200:"OK",201:"Created",202:"Accepted",203:"Non-Authoritative Information",204:"No Content",205:"Reset Content",206:"Partial Content",207:"Multi-Status",208:"Already Reported",226:"IM Used",300:"Multiple Choices",301:"Moved Permanently",302:"Found",303:"See Other",304:"Not Modified",305:"Use Proxy",307:"Temporary Redirect",308:"Permanent Redirect",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",409:"Conflict",410:"Gone",411:"Length Required",412:"Precondition Failed",413:"Payload Too Large",414:"URI Too Long",415:"Unsupported Media Type",416:"Range Not Satisfiable",417:"Expectation Failed",418:"I'm a teapot",421:"Misdirected Request",422:"Unprocessable Entity",423:"Locked",424:"Failed Dependency",425:"Unordered Collection",426:"Upgrade Required",428:"Precondition Required",429:"Too Many Requests",431:"Request Header Fields Too Large",451:"Unavailable For Legal Reasons",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout",505:"HTTP Version Not Supported",506:"Variant Also Negotiates",507:"Insufficient Storage",508:"Loop Detected",509:"Bandwidth Limit Exceeded",510:"Not Extended",511:"Network Authentication Required"}},{}],40:[function(ie,Ce,ue){"use strict";var se=function(){this.buffer=[],this.fns=[]};se.prototype.push=function(le,ee){if(this.fns.length)return this.fns.shift()(null,le);var ne={data:le,priority:ee},E=te(this.buffer,ne,function(b){return b.priority});this.buffer.splice(E,0,ne)},se.prototype.next=function(){var le=this;return function(ee){if(le.buffer.length)return ee(null,le.buffer.pop().data);le.fns.push(ee)}};var te=function(le,ee,ne){ee=ne(ee);for(var E=0,b=le?le.length:E;E<b;){var z=E+b>>>1;ne(le[z])<ee?E=z+1:b=z}return E};Ce.exports=se},{}],41:[function(ie,Ce,ue){function se(ae){var oe=this,ve=re.call(arguments,1);return new Promise(function(ye,me){function ge(pe){var ke;try{ke=ae.next(pe)}catch(Te){return me(Te)}he(ke)}function _e(pe){var ke;try{ke=ae.throw(pe)}catch(Te){return me(Te)}he(ke)}function he(pe){if(pe.done)return ye(pe.value);var ke=te.call(oe,pe.value);return ke&&E(ke)?ke.then(ge,_e):_e(new TypeError('You may only yield a function, promise, generator, array, or object, but the following object was passed: "'+String(pe.value)+'"'))}if(typeof ae=="function"&&(ae=ae.apply(oe,ve)),!ae||typeof ae.next!="function")return ye(ae);ge()})}function te(ae){return ae&&(E(ae)?ae:z(ae)||b(ae)?se.call(this,ae):typeof ae=="function"?le.call(this,ae):Array.isArray(ae)?ee.call(this,ae):x(ae)?ne.call(this,ae):ae)}function le(ae){var oe=this;return new Promise(function(ve,ye){ae.call(oe,function(me,ge){if(me)return ye(me);arguments.length>2&&(ge=re.call(arguments,1)),ve(ge)})})}function ee(ae){return Promise.all(ae.map(te,this))}function ne(ae){for(var oe=new ae.constructor,ve=Object.keys(ae),ye=[],me=0;me<ve.length;me++){var ge=ve[me],_e=te.call(this,ae[ge]);_e&&E(_e)?function(he,pe){oe[pe]=void 0,ye.push(he.then(function(ke){oe[pe]=ke}))}(_e,ge):oe[ge]=ae[ge]}return Promise.all(ye).then(function(){return oe})}function E(ae){return typeof ae.then=="function"}function b(ae){return typeof ae.next=="function"&&typeof ae.throw=="function"}function z(ae){var oe=ae.constructor;return!!oe&&(oe.name==="GeneratorFunction"||oe.displayName==="GeneratorFunction"||b(oe.prototype))}function x(ae){return Object==ae.constructor}var re=Array.prototype.slice;Ce.exports=se.default=se.co=se,se.wrap=function(ae){function oe(){return se.call(this,ae.apply(this,arguments))}return oe.__generatorFunction__=ae,oe}},{}],42:[function(ie,Ce,ue){Ce.exports={O_RDONLY:0,O_WRONLY:1,O_RDWR:2,S_IFMT:61440,S_IFREG:32768,S_IFDIR:16384,S_IFCHR:8192,S_IFBLK:24576,S_IFIFO:4096,S_IFLNK:40960,S_IFSOCK:49152,O_CREAT:512,O_EXCL:2048,O_NOCTTY:131072,O_TRUNC:1024,O_APPEND:8,O_DIRECTORY:1048576,O_NOFOLLOW:256,O_SYNC:128,O_SYMLINK:2097152,O_NONBLOCK:4,S_IRWXU:448,S_IRUSR:256,S_IWUSR:128,S_IXUSR:64,S_IRWXG:56,S_IRGRP:32,S_IWGRP:16,S_IXGRP:8,S_IRWXO:7,S_IROTH:4,S_IWOTH:2,S_IXOTH:1,E2BIG:7,EACCES:13,EADDRINUSE:48,EADDRNOTAVAIL:49,EAFNOSUPPORT:47,EAGAIN:35,EALREADY:37,EBADF:9,EBADMSG:94,EBUSY:16,ECANCELED:89,ECHILD:10,ECONNABORTED:53,ECONNREFUSED:61,ECONNRESET:54,EDEADLK:11,EDESTADDRREQ:39,EDOM:33,EDQUOT:69,EEXIST:17,EFAULT:14,EFBIG:27,EHOSTUNREACH:65,EIDRM:90,EILSEQ:92,EINPROGRESS:36,EINTR:4,EINVAL:22,EIO:5,EISCONN:56,EISDIR:21,ELOOP:62,EMFILE:24,EMLINK:31,EMSGSIZE:40,EMULTIHOP:95,ENAMETOOLONG:63,ENETDOWN:50,ENETRESET:52,ENETUNREACH:51,ENFILE:23,ENOBUFS:55,ENODATA:96,ENODEV:19,ENOENT:2,ENOEXEC:8,ENOLCK:77,ENOLINK:97,ENOMEM:12,ENOMSG:91,ENOPROTOOPT:42,ENOSPC:28,ENOSR:98,ENOSTR:99,ENOSYS:78,ENOTCONN:57,ENOTDIR:20,ENOTEMPTY:66,ENOTSOCK:38,ENOTSUP:45,ENOTTY:25,ENXIO:6,EOPNOTSUPP:102,EOVERFLOW:84,EPERM:1,EPIPE:32,EPROTO:100,EPROTONOSUPPORT:43,EPROTOTYPE:41,ERANGE:34,EROFS:30,ESPIPE:29,ESRCH:3,ESTALE:70,ETIME:101,ETIMEDOUT:60,ETXTBSY:26,EWOULDBLOCK:35,EXDEV:18,SIGHUP:1,SIGINT:2,SIGQUIT:3,SIGILL:4,SIGTRAP:5,SIGABRT:6,SIGIOT:6,SIGBUS:10,SIGFPE:8,SIGKILL:9,SIGUSR1:30,SIGSEGV:11,SIGUSR2:31,SIGPIPE:13,SIGALRM:14,SIGTERM:15,SIGCHLD:20,SIGCONT:19,SIGSTOP:17,SIGTSTP:18,SIGTTIN:21,SIGTTOU:22,SIGURG:16,SIGXCPU:24,SIGXFSZ:25,SIGVTALRM:26,SIGPROF:27,SIGWINCH:28,SIGIO:23,SIGSYS:12,SSL_OP_ALL:2147486719,SSL_OP_ALLOW_UNSAFE_LEGACY_RENEGOTIATION:262144,SSL_OP_CIPHER_SERVER_PREFERENCE:4194304,SSL_OP_CISCO_ANYCONNECT:32768,SSL_OP_COOKIE_EXCHANGE:8192,SSL_OP_CRYPTOPRO_TLSEXT_BUG:2147483648,SSL_OP_DONT_INSERT_EMPTY_FRAGMENTS:2048,SSL_OP_EPHEMERAL_RSA:0,SSL_OP_LEGACY_SERVER_CONNECT:4,SSL_OP_MICROSOFT_BIG_SSLV3_BUFFER:32,SSL_OP_MICROSOFT_SESS_ID_BUG:1,SSL_OP_MSIE_SSLV2_RSA_PADDING:0,SSL_OP_NETSCAPE_CA_DN_BUG:536870912,SSL_OP_NETSCAPE_CHALLENGE_BUG:2,SSL_OP_NETSCAPE_DEMO_CIPHER_CHANGE_BUG:1073741824,SSL_OP_NETSCAPE_REUSE_CIPHER_CHANGE_BUG:8,SSL_OP_NO_COMPRESSION:131072,SSL_OP_NO_QUERY_MTU:4096,SSL_OP_NO_SESSION_RESUMPTION_ON_RENEGOTIATION:65536,SSL_OP_NO_SSLv2:16777216,SSL_OP_NO_SSLv3:33554432,SSL_OP_NO_TICKET:16384,SSL_OP_NO_TLSv1:67108864,SSL_OP_NO_TLSv1_1:268435456,SSL_OP_NO_TLSv1_2:134217728,SSL_OP_PKCS1_CHECK_1:0,SSL_OP_PKCS1_CHECK_2:0,SSL_OP_SINGLE_DH_USE:1048576,SSL_OP_SINGLE_ECDH_USE:524288,SSL_OP_SSLEAY_080_CLIENT_DH_BUG:128,SSL_OP_SSLREF2_REUSE_CERT_TYPE_BUG:0,SSL_OP_TLS_BLOCK_PADDING_BUG:512,SSL_OP_TLS_D5_BUG:256,SSL_OP_TLS_ROLLBACK_BUG:8388608,ENGINE_METHOD_DSA:2,ENGINE_METHOD_DH:4,ENGINE_METHOD_RAND:8,ENGINE_METHOD_ECDH:16,ENGINE_METHOD_ECDSA:32,ENGINE_METHOD_CIPHERS:64,ENGINE_METHOD_DIGESTS:128,ENGINE_METHOD_STORE:256,ENGINE_METHOD_PKEY_METHS:512,ENGINE_METHOD_PKEY_ASN1_METHS:1024,ENGINE_METHOD_ALL:65535,ENGINE_METHOD_NONE:0,DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6,F_OK:0,R_OK:4,W_OK:2,X_OK:1,UV_UDP_REUSEADDR:4}},{}],43:[function(ie,Ce,ue){"use strict";function se(ee,ne){if(!(this instanceof se))return new se(ee,ne);this.src=ee,this._withAccess=ne}function te(ee,ne){return ee[ne]===void 0&&ee.__lookupGetter__(ne)===void 0&&ee.__lookupSetter__(ne)===void 0}var le=Array.prototype.slice;Ce.exports=se,se.prototype.withAccess=function(ee){return this._withAccess=ee!==!1,this},se.prototype.pick=function(ee){return Array.isArray(ee)||(ee=le.call(arguments)),ee.length&&(this.keys=ee),this},se.prototype.to=function(ee){if(ee=ee||{},!this.src)return ee;var ne=this.keys||Object.keys(this.src);if(!this._withAccess){for(var E=0;E<ne.length;E++)b=ne[E],ee[b]===void 0&&(ee[b]=this.src[b]);return ee}for(var E=0;E<ne.length;E++){var b=ne[E];if(te(ee,b)){var z=this.src.__lookupGetter__(b),x=this.src.__lookupSetter__(b);z&&ee.__defineGetter__(b,z),x&&ee.__defineSetter__(b,x),z||x||(ee[b]=this.src[b])}}return ee},se.prototype.toCover=function(ee){for(var ne=this.keys||Object.keys(this.src),E=0;E<ne.length;E++){var b=ne[E];delete ee[b];var z=this.src.__lookupGetter__(b),x=this.src.__lookupSetter__(b);z&&ee.__defineGetter__(b,z),x&&ee.__defineSetter__(b,x),z||x||(ee[b]=this.src[b])}},se.prototype.override=se.prototype.toCover,se.prototype.and=function(ee){var ne={};return this.to(ne),this.src=ee,this.to(ne),this.src=ne,this}},{}],44:[function(ie,Ce,ue){ie("../../modules/es6.string.iterator"),ie("../../modules/es6.array.from"),Ce.exports=ie("../../modules/_core").Array.from},{"../../modules/_core":65,"../../modules/es6.array.from":133,"../../modules/es6.string.iterator":145}],45:[function(ie,Ce,ue){var se=ie("../../modules/_core"),te=se.JSON||(se.JSON={stringify:JSON.stringify});Ce.exports=function(le){return te.stringify.apply(te,arguments)}},{"../../modules/_core":65}],46:[function(ie,Ce,ue){ie("../../modules/es6.object.assign"),Ce.exports=ie("../../modules/_core").Object.assign},{"../../modules/_core":65,"../../modules/es6.object.assign":136}],47:[function(ie,Ce,ue){ie("../../modules/es6.object.create");var se=ie("../../modules/_core").Object;Ce.exports=function(te,le){return se.create(te,le)}},{"../../modules/_core":65,"../../modules/es6.object.create":137}],48:[function(ie,Ce,ue){ie("../../modules/es6.object.define-property");var se=ie("../../modules/_core").Object;Ce.exports=function(te,le,ee){return se.defineProperty(te,le,ee)}},{"../../modules/_core":65,"../../modules/es6.object.define-property":138}],49:[function(ie,Ce,ue){ie("../../modules/es6.object.get-own-property-names");var se=ie("../../modules/_core").Object;Ce.exports=function(te){return se.getOwnPropertyNames(te)}},{"../../modules/_core":65,"../../modules/es6.object.get-own-property-names":139}],50:[function(ie,Ce,ue){ie("../../modules/es6.object.get-prototype-of"),Ce.exports=ie("../../modules/_core").Object.getPrototypeOf},{"../../modules/_core":65,"../../modules/es6.object.get-prototype-of":140}],51:[function(ie,Ce,ue){ie("../../modules/es6.object.keys"),Ce.exports=ie("../../modules/_core").Object.keys},{"../../modules/_core":65,"../../modules/es6.object.keys":141}],52:[function(ie,Ce,ue){ie("../modules/es6.object.to-string"),ie("../modules/es6.string.iterator"),ie("../modules/web.dom.iterable"),ie("../modules/es6.promise"),ie("../modules/es7.promise.finally"),ie("../modules/es7.promise.try"),Ce.exports=ie("../modules/_core").Promise},{"../modules/_core":65,"../modules/es6.object.to-string":142,"../modules/es6.promise":143,"../modules/es6.string.iterator":145,"../modules/es7.promise.finally":147,"../modules/es7.promise.try":148,"../modules/web.dom.iterable":151}],53:[function(ie,Ce,ue){ie("../modules/web.immediate"),Ce.exports=ie("../modules/_core").setImmediate},{"../modules/_core":65,"../modules/web.immediate":152}],54:[function(ie,Ce,ue){ie("../../modules/es6.string.from-code-point"),Ce.exports=ie("../../modules/_core").String.fromCodePoint},{"../../modules/_core":65,"../../modules/es6.string.from-code-point":144}],55:[function(ie,Ce,ue){ie("../../modules/es6.function.has-instance"),Ce.exports=ie("../../modules/_wks-ext").f("hasInstance")},{"../../modules/_wks-ext":130,"../../modules/es6.function.has-instance":135}],56:[function(ie,Ce,ue){ie("../../modules/es6.symbol"),ie("../../modules/es6.object.to-string"),ie("../../modules/es7.symbol.async-iterator"),ie("../../modules/es7.symbol.observable"),Ce.exports=ie("../../modules/_core").Symbol},{"../../modules/_core":65,"../../modules/es6.object.to-string":142,"../../modules/es6.symbol":146,"../../modules/es7.symbol.async-iterator":149,"../../modules/es7.symbol.observable":150}],57:[function(ie,Ce,ue){ie("../../modules/es6.string.iterator"),ie("../../modules/web.dom.iterable"),Ce.exports=ie("../../modules/_wks-ext").f("iterator")},{"../../modules/_wks-ext":130,"../../modules/es6.string.iterator":145,"../../modules/web.dom.iterable":151}],58:[function(ie,Ce,ue){Ce.exports=function(se){if(typeof se!="function")throw TypeError(se+" is not a function!");return se}},{}],59:[function(ie,Ce,ue){Ce.exports=function(){}},{}],60:[function(ie,Ce,ue){Ce.exports=function(se,te,le,ee){if(!(se instanceof te)||ee!==void 0&&ee in se)throw TypeError(le+": incorrect invocation!");return se}},{}],61:[function(ie,Ce,ue){var se=ie("./_is-object");Ce.exports=function(te){if(!se(te))throw TypeError(te+" is not an object!");return te}},{"./_is-object":85}],62:[function(ie,Ce,ue){var se=ie("./_to-iobject"),te=ie("./_to-length"),le=ie("./_to-absolute-index");Ce.exports=function(ee){return function(ne,E,b){var z,x=se(ne),re=te(x.length),ae=le(b,re);if(ee&&E!=E){for(;re>ae;)if((z=x[ae++])!=z)return!0}else for(;re>ae;ae++)if((ee||ae in x)&&x[ae]===E)return ee||ae||0;return!ee&&-1}}},{"./_to-absolute-index":121,"./_to-iobject":123,"./_to-length":124}],63:[function(ie,Ce,ue){var se=ie("./_cof"),te=ie("./_wks")("toStringTag"),le=se(function(){return arguments}())=="Arguments",ee=function(ne,E){try{return ne[E]}catch(b){}};Ce.exports=function(ne){var E,b,z;return ne===void 0?"Undefined":ne===null?"Null":typeof(b=ee(E=Object(ne),te))=="string"?b:le?se(E):(z=se(E))=="Object"&&typeof E.callee=="function"?"Arguments":z}},{"./_cof":64,"./_wks":131}],64:[function(ie,Ce,ue){var se={}.toString;Ce.exports=function(te){return se.call(te).slice(8,-1)}},{}],65:[function(ie,Ce,ue){var se=Ce.exports={version:"2.5.7"};typeof __e=="number"&&(__e=se)},{}],66:[function(ie,Ce,ue){"use strict";var se=ie("./_object-dp"),te=ie("./_property-desc");Ce.exports=function(le,ee,ne){ee in le?se.f(le,ee,te(0,ne)):le[ee]=ne}},{"./_object-dp":98,"./_property-desc":111}],67:[function(ie,Ce,ue){var se=ie("./_a-function");Ce.exports=function(te,le,ee){if(se(te),le===void 0)return te;switch(ee){case 1:return function(ne){return te.call(le,ne)};case 2:return function(ne,E){return te.call(le,ne,E)};case 3:return function(ne,E,b){return te.call(le,ne,E,b)}}return function(){return te.apply(le,arguments)}}},{"./_a-function":58}],68:[function(ie,Ce,ue){Ce.exports=function(se){if(se==null)throw TypeError("Can't call method on "+se);return se}},{}],69:[function(ie,Ce,ue){Ce.exports=!ie("./_fails")(function(){return Object.defineProperty({},"a",{get:function(){return 7}}).a!=7})},{"./_fails":74}],70:[function(ie,Ce,ue){var se=ie("./_is-object"),te=ie("./_global").document,le=se(te)&&se(te.createElement);Ce.exports=function(ee){return le?te.createElement(ee):{}}},{"./_global":76,"./_is-object":85}],71:[function(ie,Ce,ue){Ce.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},{}],72:[function(ie,Ce,ue){var se=ie("./_object-keys"),te=ie("./_object-gops"),le=ie("./_object-pie");Ce.exports=function(ee){var ne=se(ee),E=te.f;if(E)for(var b,z=E(ee),x=le.f,re=0;z.length>re;)x.call(ee,b=z[re++])&&ne.push(b);return ne}},{"./_object-gops":103,"./_object-keys":106,"./_object-pie":107}],73:[function(ie,Ce,ue){var se=ie("./_global"),te=ie("./_core"),le=ie("./_ctx"),ee=ie("./_hide"),ne=ie("./_has"),E=function(b,z,x){var re,ae,oe,ve=b&E.F,ye=b&E.G,me=b&E.S,ge=b&E.P,_e=b&E.B,he=b&E.W,pe=ye?te:te[z]||(te[z]={}),ke=pe.prototype,Te=ye?se:me?se[z]:(se[z]||{}).prototype;ye&&(x=z);for(re in x)(ae=!ve&&Te&&Te[re]!==void 0)&&ne(pe,re)||(oe=ae?Te[re]:x[re],pe[re]=ye&&typeof Te[re]!="function"?x[re]:_e&&ae?le(oe,se):he&&Te[re]==oe?function(Ee){var Oe=function(je,Pe,Qe){if(this instanceof Ee){switch(arguments.length){case 0:return new Ee;case 1:return new Ee(je);case 2:return new Ee(je,Pe)}return new Ee(je,Pe,Qe)}return Ee.apply(this,arguments)};return Oe.prototype=Ee.prototype,Oe}(oe):ge&&typeof oe=="function"?le(Function.call,oe):oe,ge&&((pe.virtual||(pe.virtual={}))[re]=oe,b&E.R&&ke&&!ke[re]&&ee(ke,re,oe)))};E.F=1,E.G=2,E.S=4,E.P=8,E.B=16,E.W=32,E.U=64,E.R=128,Ce.exports=E},{"./_core":65,"./_ctx":67,"./_global":76,"./_has":77,"./_hide":78}],74:[function(ie,Ce,ue){Ce.exports=function(se){try{return!!se()}catch(te){return!0}}},{}],75:[function(ie,Ce,x){var se=ie("./_ctx"),te=ie("./_iter-call"),le=ie("./_is-array-iter"),ee=ie("./_an-object"),ne=ie("./_to-length"),E=ie("./core.get-iterator-method"),b={},z={},x=Ce.exports=function(re,ae,oe,ve,ye){var me,ge,_e,he,pe=ye?function(){return re}:E(re),ke=se(oe,ve,ae?2:1),Te=0;if(typeof pe!="function")throw TypeError(re+" is not iterable!");if(le(pe)){for(me=ne(re.length);me>Te;Te++)if((he=ae?ke(ee(ge=re[Te])[0],ge[1]):ke(re[Te]))===b||he===z)return he}else for(_e=pe.call(re);!(ge=_e.next()).done;)if((he=te(_e,ke,ge.value,ae))===b||he===z)return he};x.BREAK=b,x.RETURN=z},{"./_an-object":61,"./_ctx":67,"./_is-array-iter":83,"./_iter-call":86,"./_to-length":124,"./core.get-iterator-method":132}],76:[function(ie,Ce,ue){var se=Ce.exports=typeof window!="undefined"&&window.Math==Math?window:typeof self!="undefined"&&self.Math==Math?self:Function("return this")();typeof __g=="number"&&(__g=se)},{}],77:[function(ie,Ce,ue){var se={}.hasOwnProperty;Ce.exports=function(te,le){return se.call(te,le)}},{}],78:[function(ie,Ce,ue){var se=ie("./_object-dp"),te=ie("./_property-desc");Ce.exports=ie("./_descriptors")?function(le,ee,ne){return se.f(le,ee,te(1,ne))}:function(le,ee,ne){return le[ee]=ne,le}},{"./_descriptors":69,"./_object-dp":98,"./_property-desc":111}],79:[function(ie,Ce,ue){var se=ie("./_global").document;Ce.exports=se&&se.documentElement},{"./_global":76}],80:[function(ie,Ce,ue){Ce.exports=!ie("./_descriptors")&&!ie("./_fails")(function(){return Object.defineProperty(ie("./_dom-create")("div"),"a",{get:function(){return 7}}).a!=7})},{"./_descriptors":69,"./_dom-create":70,"./_fails":74}],81:[function(ie,Ce,ue){Ce.exports=function(se,te,le){var ee=le===void 0;switch(te.length){case 0:return ee?se():se.call(le);case 1:return ee?se(te[0]):se.call(le,te[0]);case 2:return ee?se(te[0],te[1]):se.call(le,te[0],te[1]);case 3:return ee?se(te[0],te[1],te[2]):se.call(le,te[0],te[1],te[2]);case 4:return ee?se(te[0],te[1],te[2],te[3]):se.call(le,te[0],te[1],te[2],te[3])}return se.apply(le,te)}},{}],82:[function(ie,Ce,ue){var se=ie("./_cof");Ce.exports=Object("z").propertyIsEnumerable(0)?Object:function(te){return se(te)=="String"?te.split(""):Object(te)}},{"./_cof":64}],83:[function(ie,Ce,ue){var se=ie("./_iterators"),te=ie("./_wks")("iterator"),le=Array.prototype;Ce.exports=function(ee){return ee!==void 0&&(se.Array===ee||le[te]===ee)}},{"./_iterators":91,"./_wks":131}],84:[function(ie,Ce,ue){var se=ie("./_cof");Ce.exports=Array.isArray||function(te){return se(te)=="Array"}},{"./_cof":64}],85:[function(ie,Ce,ue){Ce.exports=function(se){return typeof se=="object"?se!==null:typeof se=="function"}},{}],86:[function(ie,Ce,ue){var se=ie("./_an-object");Ce.exports=function(te,le,ee,ne){try{return ne?le(se(ee)[0],ee[1]):le(ee)}catch(b){var E=te.return;throw E!==void 0&&se(E.call(te)),b}}},{"./_an-object":61}],87:[function(ie,Ce,ue){"use strict";var se=ie("./_object-create"),te=ie("./_property-desc"),le=ie("./_set-to-string-tag"),ee={};ie("./_hide")(ee,ie("./_wks")("iterator"),function(){return this}),Ce.exports=function(ne,E,b){ne.prototype=se(ee,{next:te(1,b)}),le(ne,E+" Iterator")}},{"./_hide":78,"./_object-create":97,"./_property-desc":111,"./_set-to-string-tag":115,"./_wks":131}],88:[function(ie,Ce,ue){"use strict";var se=ie("./_library"),te=ie("./_export"),le=ie("./_redefine"),ee=ie("./_hide"),ne=ie("./_iterators"),E=ie("./_iter-create"),b=ie("./_set-to-string-tag"),z=ie("./_object-gpo"),x=ie("./_wks")("iterator"),re=!([].keys&&"next"in[].keys()),ae=function(){return this};Ce.exports=function(oe,ve,ye,me,ge,_e,he){E(ye,ve,me);var pe,ke,Te,Ee=function(Ye){if(!re&&Ye in Qe)return Qe[Ye];switch(Ye){case"keys":case"values":return function(){return new ye(this,Ye)}}return function(){return new ye(this,Ye)}},Oe=ve+" Iterator",je=ge=="values",Pe=!1,Qe=oe.prototype,Xe=Qe[x]||Qe["@@iterator"]||ge&&Qe[ge],ot=Xe||Ee(ge),He=ge?je?Ee("entries"):ot:void 0,rt=ve=="Array"&&Qe.entries||Xe;if(rt&&(Te=z(rt.call(new oe)))!==Object.prototype&&Te.next&&(b(Te,Oe,!0),se||typeof Te[x]=="function"||ee(Te,x,ae)),je&&Xe&&Xe.name!=="values"&&(Pe=!0,ot=function(){return Xe.call(this)}),se&&!he||!re&&!Pe&&Qe[x]||ee(Qe,x,ot),ne[ve]=ot,ne[Oe]=ae,ge)if(pe={values:je?ot:Ee("values"),keys:_e?ot:Ee("keys"),entries:He},he)for(ke in pe)ke in Qe||le(Qe,ke,pe[ke]);else te(te.P+te.F*(re||Pe),ve,pe);return pe}},{"./_export":73,"./_hide":78,"./_iter-create":87,"./_iterators":91,"./_library":92,"./_object-gpo":104,"./_redefine":113,"./_set-to-string-tag":115,"./_wks":131}],89:[function(ie,Ce,ue){var se=ie("./_wks")("iterator"),te=!1;try{var le=[7][se]();le.return=function(){te=!0},Array.from(le,function(){throw 2})}catch(ee){}Ce.exports=function(ee,ne){if(!ne&&!te)return!1;var E=!1;try{var b=[7],z=b[se]();z.next=function(){return{done:E=!0}},b[se]=function(){return z},ee(b)}catch(x){}return E}},{"./_wks":131}],90:[function(ie,Ce,ue){Ce.exports=function(se,te){return{value:te,done:!!se}}},{}],91:[function(ie,Ce,ue){Ce.exports={}},{}],92:[function(ie,Ce,ue){Ce.exports=!0},{}],93:[function(ie,Ce,ue){var se=ie("./_uid")("meta"),te=ie("./_is-object"),le=ie("./_has"),ee=ie("./_object-dp").f,ne=0,E=Object.isExtensible||function(){return!0},b=!ie("./_fails")(function(){return E(Object.preventExtensions({}))}),z=function(ve){ee(ve,se,{value:{i:"O"+ ++ne,w:{}}})},x=function(ve,ye){if(!te(ve))return typeof ve=="symbol"?ve:(typeof ve=="string"?"S":"P")+ve;if(!le(ve,se)){if(!E(ve))return"F";if(!ye)return"E";z(ve)}return ve[se].i},re=function(ve,ye){if(!le(ve,se)){if(!E(ve))return!0;if(!ye)return!1;z(ve)}return ve[se].w},ae=function(ve){return b&&oe.NEED&&E(ve)&&!le(ve,se)&&z(ve),ve},oe=Ce.exports={KEY:se,NEED:!1,fastKey:x,getWeak:re,onFreeze:ae}},{"./_fails":74,"./_has":77,"./_is-object":85,"./_object-dp":98,"./_uid":127}],94:[function(ie,Ce,ue){var se=ie("./_global"),te=ie("./_task").set,le=se.MutationObserver||se.WebKitMutationObserver,ee=se.process,ne=se.Promise,E=ie("./_cof")(ee)=="process";Ce.exports=function(){var b,z,x,re=function(){var ye,me;for(E&&(ye=ee.domain)&&ye.exit();b;){me=b.fn,b=b.next;try{me()}catch(ge){throw b?x():z=void 0,ge}}z=void 0,ye&&ye.enter()};if(E)x=function(){ee.nextTick(re)};else if(!le||se.navigator&&se.navigator.standalone)if(ne&&ne.resolve){var ae=ne.resolve(void 0);x=function(){ae.then(re)}}else x=function(){te.call(se,re)};else{var oe=!0,ve=document.createTextNode("");new le(re).observe(ve,{characterData:!0}),x=function(){ve.data=oe=!oe}}return function(ye){var me={fn:ye,next:void 0};z&&(z.next=me),b||(b=me,x()),z=me}}},{"./_cof":64,"./_global":76,"./_task":120}],95:[function(ie,Ce,ue){"use strict";function se(le){var ee,ne;this.promise=new le(function(E,b){if(ee!==void 0||ne!==void 0)throw TypeError("Bad Promise constructor");ee=E,ne=b}),this.resolve=te(ee),this.reject=te(ne)}var te=ie("./_a-function");Ce.exports.f=function(le){return new se(le)}},{"./_a-function":58}],96:[function(ie,Ce,ue){"use strict";var se=ie("./_object-keys"),te=ie("./_object-gops"),le=ie("./_object-pie"),ee=ie("./_to-object"),ne=ie("./_iobject"),E=Object.assign;Ce.exports=!E||ie("./_fails")(function(){var b={},z={},x=Symbol(),re="abcdefghijklmnopqrst";return b[x]=7,re.split("").forEach(function(ae){z[ae]=ae}),E({},b)[x]!=7||Object.keys(E({},z)).join("")!=re})?function(b,z){for(var x=ee(b),re=arguments.length,ae=1,oe=te.f,ve=le.f;re>ae;)for(var ye,me=ne(arguments[ae++]),ge=oe?se(me).concat(oe(me)):se(me),_e=ge.length,he=0;_e>he;)ve.call(me,ye=ge[he++])&&(x[ye]=me[ye]);return x}:E},{"./_fails":74,"./_iobject":82,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_to-object":125}],97:[function(ie,Ce,ue){var se=ie("./_an-object"),te=ie("./_object-dps"),le=ie("./_enum-bug-keys"),ee=ie("./_shared-key")("IE_PROTO"),ne=function(){},E=function(){var b,z=ie("./_dom-create")("iframe"),x=le.length;for(z.style.display="none",ie("./_html").appendChild(z),z.src="javascript:",b=z.contentWindow.document,b.open(),b.write("<script>document.F=Object<\/script>"),b.close(),E=b.F;x--;)delete E.prototype[le[x]];return E()};Ce.exports=Object.create||function(b,z){var x;return b!==null?(ne.prototype=se(b),x=new ne,ne.prototype=null,x[ee]=b):x=E(),z===void 0?x:te(x,z)}},{"./_an-object":61,"./_dom-create":70,"./_enum-bug-keys":71,"./_html":79,"./_object-dps":99,"./_shared-key":116}],98:[function(ie,Ce,ue){var se=ie("./_an-object"),te=ie("./_ie8-dom-define"),le=ie("./_to-primitive"),ee=Object.defineProperty;ue.f=ie("./_descriptors")?Object.defineProperty:function(ne,E,b){if(se(ne),E=le(E,!0),se(b),te)try{return ee(ne,E,b)}catch(z){}if("get"in b||"set"in b)throw TypeError("Accessors not supported!");return"value"in b&&(ne[E]=b.value),ne}},{"./_an-object":61,"./_descriptors":69,"./_ie8-dom-define":80,"./_to-primitive":126}],99:[function(ie,Ce,ue){var se=ie("./_object-dp"),te=ie("./_an-object"),le=ie("./_object-keys");Ce.exports=ie("./_descriptors")?Object.defineProperties:function(ee,ne){te(ee);for(var E,b=le(ne),z=b.length,x=0;z>x;)se.f(ee,E=b[x++],ne[E]);return ee}},{"./_an-object":61,"./_descriptors":69,"./_object-dp":98,"./_object-keys":106}],100:[function(ie,Ce,ue){var se=ie("./_object-pie"),te=ie("./_property-desc"),le=ie("./_to-iobject"),ee=ie("./_to-primitive"),ne=ie("./_has"),E=ie("./_ie8-dom-define"),b=Object.getOwnPropertyDescriptor;ue.f=ie("./_descriptors")?b:function(z,x){if(z=le(z),x=ee(x,!0),E)try{return b(z,x)}catch(re){}if(ne(z,x))return te(!se.f.call(z,x),z[x])}},{"./_descriptors":69,"./_has":77,"./_ie8-dom-define":80,"./_object-pie":107,"./_property-desc":111,"./_to-iobject":123,"./_to-primitive":126}],101:[function(ie,Ce,ue){var se=ie("./_to-iobject"),te=ie("./_object-gopn").f,le={}.toString,ee=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],ne=function(E){try{return te(E)}catch(b){return ee.slice()}};Ce.exports.f=function(E){return ee&&le.call(E)=="[object Window]"?ne(E):te(se(E))}},{"./_object-gopn":102,"./_to-iobject":123}],102:[function(ie,Ce,ue){var se=ie("./_object-keys-internal"),te=ie("./_enum-bug-keys").concat("length","prototype");ue.f=Object.getOwnPropertyNames||function(le){return se(le,te)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],103:[function(ie,Ce,ue){ue.f=Object.getOwnPropertySymbols},{}],104:[function(ie,Ce,ue){var se=ie("./_has"),te=ie("./_to-object"),le=ie("./_shared-key")("IE_PROTO"),ee=Object.prototype;Ce.exports=Object.getPrototypeOf||function(ne){return ne=te(ne),se(ne,le)?ne[le]:typeof ne.constructor=="function"&&ne instanceof ne.constructor?ne.constructor.prototype:ne instanceof Object?ee:null}},{"./_has":77,"./_shared-key":116,"./_to-object":125}],105:[function(ie,Ce,ue){var se=ie("./_has"),te=ie("./_to-iobject"),le=ie("./_array-includes")(!1),ee=ie("./_shared-key")("IE_PROTO");Ce.exports=function(ne,E){var b,z=te(ne),x=0,re=[];for(b in z)b!=ee&&se(z,b)&&re.push(b);for(;E.length>x;)se(z,b=E[x++])&&(~le(re,b)||re.push(b));return re}},{"./_array-includes":62,"./_has":77,"./_shared-key":116,"./_to-iobject":123}],106:[function(ie,Ce,ue){var se=ie("./_object-keys-internal"),te=ie("./_enum-bug-keys");Ce.exports=Object.keys||function(le){return se(le,te)}},{"./_enum-bug-keys":71,"./_object-keys-internal":105}],107:[function(ie,Ce,ue){ue.f={}.propertyIsEnumerable},{}],108:[function(ie,Ce,ue){var se=ie("./_export"),te=ie("./_core"),le=ie("./_fails");Ce.exports=function(ee,ne){var E=(te.Object||{})[ee]||Object[ee],b={};b[ee]=ne(E),se(se.S+se.F*le(function(){E(1)}),"Object",b)}},{"./_core":65,"./_export":73,"./_fails":74}],109:[function(ie,Ce,ue){Ce.exports=function(se){try{return{e:!1,v:se()}}catch(te){return{e:!0,v:te}}}},{}],110:[function(ie,Ce,ue){var se=ie("./_an-object"),te=ie("./_is-object"),le=ie("./_new-promise-capability");Ce.exports=function(ee,ne){if(se(ee),te(ne)&&ne.constructor===ee)return ne;var E=le.f(ee);return(0,E.resolve)(ne),E.promise}},{"./_an-object":61,"./_is-object":85,"./_new-promise-capability":95}],111:[function(ie,Ce,ue){Ce.exports=function(se,te){return{enumerable:!(1&se),configurable:!(2&se),writable:!(4&se),value:te}}},{}],112:[function(ie,Ce,ue){var se=ie("./_hide");Ce.exports=function(te,le,ee){for(var ne in le)ee&&te[ne]?te[ne]=le[ne]:se(te,ne,le[ne]);return te}},{"./_hide":78}],113:[function(ie,Ce,ue){Ce.exports=ie("./_hide")},{"./_hide":78}],114:[function(ie,Ce,ue){"use strict";var se=ie("./_global"),te=ie("./_core"),le=ie("./_object-dp"),ee=ie("./_descriptors"),ne=ie("./_wks")("species");Ce.exports=function(E){var b=typeof te[E]=="function"?te[E]:se[E];ee&&b&&!b[ne]&&le.f(b,ne,{configurable:!0,get:function(){return this}})}},{"./_core":65,"./_descriptors":69,"./_global":76,"./_object-dp":98,"./_wks":131}],115:[function(ie,Ce,ue){var se=ie("./_object-dp").f,te=ie("./_has"),le=ie("./_wks")("toStringTag");Ce.exports=function(ee,ne,E){ee&&!te(ee=E?ee:ee.prototype,le)&&se(ee,le,{configurable:!0,value:ne})}},{"./_has":77,"./_object-dp":98,"./_wks":131}],116:[function(ie,Ce,ue){var se=ie("./_shared")("keys"),te=ie("./_uid");Ce.exports=function(le){return se[le]||(se[le]=te(le))}},{"./_shared":117,"./_uid":127}],117:[function(ie,Ce,ue){var se=ie("./_core"),te=ie("./_global"),le=te["__core-js_shared__"]||(te["__core-js_shared__"]={});(Ce.exports=function(ee,ne){return le[ee]||(le[ee]=ne!==void 0?ne:{})})("versions",[]).push({version:se.version,mode:ie("./_library")?"pure":"global",copyright:"\u6F0F 2018 Denis Pushkarev (zloirock.ru)"})},{"./_core":65,"./_global":76,"./_library":92}],118:[function(ie,Ce,ue){var se=ie("./_an-object"),te=ie("./_a-function"),le=ie("./_wks")("species");Ce.exports=function(ee,ne){var E,b=se(ee).constructor;return b===void 0||(E=se(b)[le])==null?ne:te(E)}},{"./_a-function":58,"./_an-object":61,"./_wks":131}],119:[function(ie,Ce,ue){var se=ie("./_to-integer"),te=ie("./_defined");Ce.exports=function(le){return function(ee,ne){var E,b,z=String(te(ee)),x=se(ne),re=z.length;return x<0||x>=re?le?"":void 0:(E=z.charCodeAt(x),E<55296||E>56319||x+1===re||(b=z.charCodeAt(x+1))<56320||b>57343?le?z.charAt(x):E:le?z.slice(x,x+2):b-56320+(E-55296<<10)+65536)}}},{"./_defined":68,"./_to-integer":122}],120:[function(ie,Ce,ue){var se,te,le,ee=ie("./_ctx"),ne=ie("./_invoke"),E=ie("./_html"),b=ie("./_dom-create"),z=ie("./_global"),x=z.process,re=z.setImmediate,ae=z.clearImmediate,oe=z.MessageChannel,ve=z.Dispatch,ye=0,me={},ge=function(){var he=+this;if(me.hasOwnProperty(he)){var pe=me[he];delete me[he],pe()}},_e=function(he){ge.call(he.data)};re&&ae||(re=function(he){for(var pe=[],ke=1;arguments.length>ke;)pe.push(arguments[ke++]);return me[++ye]=function(){ne(typeof he=="function"?he:Function(he),pe)},se(ye),ye},ae=function(he){delete me[he]},ie("./_cof")(x)=="process"?se=function(he){x.nextTick(ee(ge,he,1))}:ve&&ve.now?se=function(he){ve.now(ee(ge,he,1))}:oe?(te=new oe,le=te.port2,te.port1.onmessage=_e,se=ee(le.postMessage,le,1)):z.addEventListener&&typeof postMessage=="function"&&!z.importScripts?(se=function(he){z.postMessage(he+"","*")},z.addEventListener("message",_e,!1)):se="onreadystatechange"in b("script")?function(he){E.appendChild(b("script")).onreadystatechange=function(){E.removeChild(this),ge.call(he)}}:function(he){setTimeout(ee(ge,he,1),0)}),Ce.exports={set:re,clear:ae}},{"./_cof":64,"./_ctx":67,"./_dom-create":70,"./_global":76,"./_html":79,"./_invoke":81}],121:[function(ie,Ce,ue){var se=ie("./_to-integer"),te=Math.max,le=Math.min;Ce.exports=function(ee,ne){return ee=se(ee),ee<0?te(ee+ne,0):le(ee,ne)}},{"./_to-integer":122}],122:[function(ie,Ce,ue){var se=Math.ceil,te=Math.floor;Ce.exports=function(le){return isNaN(le=+le)?0:(le>0?te:se)(le)}},{}],123:[function(ie,Ce,ue){var se=ie("./_iobject"),te=ie("./_defined");Ce.exports=function(le){return se(te(le))}},{"./_defined":68,"./_iobject":82}],124:[function(ie,Ce,ue){var se=ie("./_to-integer"),te=Math.min;Ce.exports=function(le){return le>0?te(se(le),9007199254740991):0}},{"./_to-integer":122}],125:[function(ie,Ce,ue){var se=ie("./_defined");Ce.exports=function(te){return Object(se(te))}},{"./_defined":68}],126:[function(ie,Ce,ue){var se=ie("./_is-object");Ce.exports=function(te,le){if(!se(te))return te;var ee,ne;if(le&&typeof(ee=te.toString)=="function"&&!se(ne=ee.call(te))||typeof(ee=te.valueOf)=="function"&&!se(ne=ee.call(te))||!le&&typeof(ee=te.toString)=="function"&&!se(ne=ee.call(te)))return ne;throw TypeError("Can't convert object to primitive value")}},{"./_is-object":85}],127:[function(ie,Ce,ue){var se=0,te=Math.random();Ce.exports=function(le){return"Symbol(".concat(le===void 0?"":le,")_",(++se+te).toString(36))}},{}],128:[function(ie,Ce,ue){var se=ie("./_global"),te=se.navigator;Ce.exports=te&&te.userAgent||""},{"./_global":76}],129:[function(ie,Ce,ue){var se=ie("./_global"),te=ie("./_core"),le=ie("./_library"),ee=ie("./_wks-ext"),ne=ie("./_object-dp").f;Ce.exports=function(E){var b=te.Symbol||(te.Symbol=le?{}:se.Symbol||{});E.charAt(0)=="_"||E in b||ne(b,E,{value:ee.f(E)})}},{"./_core":65,"./_global":76,"./_library":92,"./_object-dp":98,"./_wks-ext":130}],130:[function(ie,Ce,ue){ue.f=ie("./_wks")},{"./_wks":131}],131:[function(ie,Ce,ue){var se=ie("./_shared")("wks"),te=ie("./_uid"),le=ie("./_global").Symbol,ee=typeof le=="function";(Ce.exports=function(ne){return se[ne]||(se[ne]=ee&&le[ne]||(ee?le:te)("Symbol."+ne))}).store=se},{"./_global":76,"./_shared":117,"./_uid":127}],132:[function(ie,Ce,ue){var se=ie("./_classof"),te=ie("./_wks")("iterator"),le=ie("./_iterators");Ce.exports=ie("./_core").getIteratorMethod=function(ee){if(ee!=null)return ee[te]||ee["@@iterator"]||le[se(ee)]}},{"./_classof":63,"./_core":65,"./_iterators":91,"./_wks":131}],133:[function(ie,Ce,ue){"use strict";var se=ie("./_ctx"),te=ie("./_export"),le=ie("./_to-object"),ee=ie("./_iter-call"),ne=ie("./_is-array-iter"),E=ie("./_to-length"),b=ie("./_create-property"),z=ie("./core.get-iterator-method");te(te.S+te.F*!ie("./_iter-detect")(function(x){Array.from(x)}),"Array",{from:function(x){var re,ae,oe,ve,ye=le(x),me=typeof this=="function"?this:Array,ge=arguments.length,_e=ge>1?arguments[1]:void 0,he=_e!==void 0,pe=0,ke=z(ye);if(he&&(_e=se(_e,ge>2?arguments[2]:void 0,2)),ke==null||me==Array&&ne(ke))for(re=E(ye.length),ae=new me(re);re>pe;pe++)b(ae,pe,he?_e(ye[pe],pe):ye[pe]);else for(ve=ke.call(ye),ae=new me;!(oe=ve.next()).done;pe++)b(ae,pe,he?ee(ve,_e,[oe.value,pe],!0):oe.value);return ae.length=pe,ae}})},{"./_create-property":66,"./_ctx":67,"./_export":73,"./_is-array-iter":83,"./_iter-call":86,"./_iter-detect":89,"./_to-length":124,"./_to-object":125,"./core.get-iterator-method":132}],134:[function(ie,Ce,ue){"use strict";var se=ie("./_add-to-unscopables"),te=ie("./_iter-step"),le=ie("./_iterators"),ee=ie("./_to-iobject");Ce.exports=ie("./_iter-define")(Array,"Array",function(ne,E){this._t=ee(ne),this._i=0,this._k=E},function(){var ne=this._t,E=this._k,b=this._i++;return!ne||b>=ne.length?(this._t=void 0,te(1)):E=="keys"?te(0,b):E=="values"?te(0,ne[b]):te(0,[b,ne[b]])},"values"),le.Arguments=le.Array,se("keys"),se("values"),se("entries")},{"./_add-to-unscopables":59,"./_iter-define":88,"./_iter-step":90,"./_iterators":91,"./_to-iobject":123}],135:[function(ie,Ce,ue){"use strict";var se=ie("./_is-object"),te=ie("./_object-gpo"),le=ie("./_wks")("hasInstance"),ee=Function.prototype;le in ee||ie("./_object-dp").f(ee,le,{value:function(ne){if(typeof this!="function"||!se(ne))return!1;if(!se(this.prototype))return ne instanceof this;for(;ne=te(ne);)if(this.prototype===ne)return!0;return!1}})},{"./_is-object":85,"./_object-dp":98,"./_object-gpo":104,"./_wks":131}],136:[function(ie,Ce,ue){var se=ie("./_export");se(se.S+se.F,"Object",{assign:ie("./_object-assign")})},{"./_export":73,"./_object-assign":96}],137:[function(ie,Ce,ue){var se=ie("./_export");se(se.S,"Object",{create:ie("./_object-create")})},{"./_export":73,"./_object-create":97}],138:[function(ie,Ce,ue){var se=ie("./_export");se(se.S+se.F*!ie("./_descriptors"),"Object",{defineProperty:ie("./_object-dp").f})},{"./_descriptors":69,"./_export":73,"./_object-dp":98}],139:[function(ie,Ce,ue){ie("./_object-sap")("getOwnPropertyNames",function(){return ie("./_object-gopn-ext").f})},{"./_object-gopn-ext":101,"./_object-sap":108}],140:[function(ie,Ce,ue){var se=ie("./_to-object"),te=ie("./_object-gpo");ie("./_object-sap")("getPrototypeOf",function(){return function(le){return te(se(le))}})},{"./_object-gpo":104,"./_object-sap":108,"./_to-object":125}],141:[function(ie,Ce,ue){var se=ie("./_to-object"),te=ie("./_object-keys");ie("./_object-sap")("keys",function(){return function(le){return te(se(le))}})},{"./_object-keys":106,"./_object-sap":108,"./_to-object":125}],142:[function(ie,Ce,ue){arguments[4][36][0].apply(ue,arguments)},{dup:36}],143:[function(ie,Ce,ue){"use strict";var se,te,le,ee,ne=ie("./_library"),E=ie("./_global"),b=ie("./_ctx"),z=ie("./_classof"),x=ie("./_export"),re=ie("./_is-object"),ae=ie("./_a-function"),oe=ie("./_an-instance"),ve=ie("./_for-of"),ye=ie("./_species-constructor"),me=ie("./_task").set,ge=ie("./_microtask")(),_e=ie("./_new-promise-capability"),he=ie("./_perform"),pe=ie("./_user-agent"),ke=ie("./_promise-resolve"),Te=E.TypeError,Ee=E.process,Oe=Ee&&Ee.versions,je=Oe&&Oe.v8||"",Pe=E.Promise,Qe=z(Ee)=="process",Xe=function(){},ot=te=_e.f,He=!!function(){try{var nt=Pe.resolve(1),et=(nt.constructor={})[ie("./_wks")("species")]=function(pt){pt(Xe,Xe)};return(Qe||typeof PromiseRejectionEvent=="function")&&nt.then(Xe)instanceof et&&je.indexOf("6.6")!==0&&pe.indexOf("Chrome/66")===-1}catch(pt){}}(),rt=function(nt){var et;return!(!re(nt)||typeof(et=nt.then)!="function")&&et},Ye=function(nt,et){if(!nt._n){nt._n=!0;var pt=nt._c;ge(function(){for(var ct=nt._v,It=nt._s==1,dt=0;pt.length>dt;)(function(Mt){var xt,gt,_t,We=It?Mt.ok:Mt.fail,Ae=Mt.resolve,Se=Mt.reject,Be=Mt.domain;try{We?(It||(nt._h==2&&ze(nt),nt._h=1),We===!0?xt=ct:(Be&&Be.enter(),xt=We(ct),Be&&(Be.exit(),_t=!0)),xt===Mt.promise?Se(Te("Promise-chain cycle")):(gt=rt(xt))?gt.call(xt,Ae,Se):Ae(xt)):Se(ct)}catch(Ke){Be&&!_t&&Be.exit(),Se(Ke)}})(pt[dt++]);nt._c=[],nt._n=!1,et&&!nt._h&&ut(nt)})}},ut=function(nt){me.call(E,function(){var et,pt,ct,It=nt._v,dt=Ge(nt);if(dt&&(et=he(function(){Qe?Ee.emit("unhandledRejection",It,nt):(pt=E.onunhandledrejection)?pt({promise:nt,reason:It}):(ct=E.console)&&ct.error&&ct.error("Unhandled promise rejection",It)}),nt._h=Qe||Ge(nt)?2:1),nt._a=void 0,dt&&et.e)throw et.v})},Ge=function(nt){return nt._h!==1&&(nt._a||nt._c).length===0},ze=function(nt){me.call(E,function(){var et;Qe?Ee.emit("rejectionHandled",nt):(et=E.onrejectionhandled)&&et({promise:nt,reason:nt._v})})},Ve=function(nt){var et=this;et._d||(et._d=!0,et=et._w||et,et._v=nt,et._s=2,et._a||(et._a=et._c.slice()),Ye(et,!0))},$e=function(nt){var et,pt=this;if(!pt._d){pt._d=!0,pt=pt._w||pt;try{if(pt===nt)throw Te("Promise can't be resolved itself");(et=rt(nt))?ge(function(){var ct={_w:pt,_d:!1};try{et.call(nt,b($e,ct,1),b(Ve,ct,1))}catch(It){Ve.call(ct,It)}}):(pt._v=nt,pt._s=1,Ye(pt,!1))}catch(ct){Ve.call({_w:pt,_d:!1},ct)}}};He||(Pe=function(nt){oe(this,Pe,"Promise","_h"),ae(nt),se.call(this);try{nt(b($e,this,1),b(Ve,this,1))}catch(et){Ve.call(this,et)}},se=function(nt){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1},se.prototype=ie("./_redefine-all")(Pe.prototype,{then:function(nt,et){var pt=ot(ye(this,Pe));return pt.ok=typeof nt!="function"||nt,pt.fail=typeof et=="function"&&et,pt.domain=Qe?Ee.domain:void 0,this._c.push(pt),this._a&&this._a.push(pt),this._s&&Ye(this,!1),pt.promise},catch:function(nt){return this.then(void 0,nt)}}),le=function(){var nt=new se;this.promise=nt,this.resolve=b($e,nt,1),this.reject=b(Ve,nt,1)},_e.f=ot=function(nt){return nt===Pe||nt===ee?new le(nt):te(nt)}),x(x.G+x.W+x.F*!He,{Promise:Pe}),ie("./_set-to-string-tag")(Pe,"Promise"),ie("./_set-species")("Promise"),ee=ie("./_core").Promise,x(x.S+x.F*!He,"Promise",{reject:function(nt){var et=ot(this);return(0,et.reject)(nt),et.promise}}),x(x.S+x.F*(ne||!He),"Promise",{resolve:function(nt){return ke(ne&&this===ee?Pe:this,nt)}}),x(x.S+x.F*!(He&&ie("./_iter-detect")(function(nt){Pe.all(nt).catch(Xe)})),"Promise",{all:function(nt){var et=this,pt=ot(et),ct=pt.resolve,It=pt.reject,dt=he(function(){var Mt=[],xt=0,gt=1;ve(nt,!1,function(_t){var We=xt++,Ae=!1;Mt.push(void 0),gt++,et.resolve(_t).then(function(Se){Ae||(Ae=!0,Mt[We]=Se,--gt||ct(Mt))},It)}),--gt||ct(Mt)});return dt.e&&It(dt.v),pt.promise},race:function(nt){var et=this,pt=ot(et),ct=pt.reject,It=he(function(){ve(nt,!1,function(dt){et.resolve(dt).then(pt.resolve,ct)})});return It.e&&ct(It.v),pt.promise}})},{"./_a-function":58,"./_an-instance":60,"./_classof":63,"./_core":65,"./_ctx":67,"./_export":73,"./_for-of":75,"./_global":76,"./_is-object":85,"./_iter-detect":89,"./_library":92,"./_microtask":94,"./_new-promise-capability":95,"./_perform":109,"./_promise-resolve":110,"./_redefine-all":112,"./_set-species":114,"./_set-to-string-tag":115,"./_species-constructor":118,"./_task":120,"./_user-agent":128,"./_wks":131}],144:[function(ie,Ce,ue){var se=ie("./_export"),te=ie("./_to-absolute-index"),le=String.fromCharCode,ee=String.fromCodePoint;se(se.S+se.F*(!!ee&&ee.length!=1),"String",{fromCodePoint:function(ne){for(var E,b=[],z=arguments.length,x=0;z>x;){if(E=+arguments[x++],te(E,1114111)!==E)throw RangeError(E+" is not a valid code point");b.push(E<65536?le(E):le(55296+((E-=65536)>>10),E%1024+56320))}return b.join("")}})},{"./_export":73,"./_to-absolute-index":121}],145:[function(ie,Ce,ue){"use strict";var se=ie("./_string-at")(!0);ie("./_iter-define")(String,"String",function(te){this._t=String(te),this._i=0},function(){var te,le=this._t,ee=this._i;return ee>=le.length?{value:void 0,done:!0}:(te=se(le,ee),this._i+=te.length,{value:te,done:!1})})},{"./_iter-define":88,"./_string-at":119}],146:[function(ie,Ce,ue){"use strict";var se=ie("./_global"),te=ie("./_has"),le=ie("./_descriptors"),ee=ie("./_export"),ne=ie("./_redefine"),E=ie("./_meta").KEY,b=ie("./_fails"),z=ie("./_shared"),x=ie("./_set-to-string-tag"),re=ie("./_uid"),ae=ie("./_wks"),oe=ie("./_wks-ext"),ve=ie("./_wks-define"),ye=ie("./_enum-keys"),me=ie("./_is-array"),ge=ie("./_an-object"),_e=ie("./_is-object"),he=ie("./_to-iobject"),pe=ie("./_to-primitive"),ke=ie("./_property-desc"),Te=ie("./_object-create"),Ee=ie("./_object-gopn-ext"),Oe=ie("./_object-gopd"),je=ie("./_object-dp"),Pe=ie("./_object-keys"),Qe=Oe.f,Xe=je.f,ot=Ee.f,He=se.Symbol,rt=se.JSON,Ye=rt&&rt.stringify,ut=ae("_hidden"),Ge=ae("toPrimitive"),ze={}.propertyIsEnumerable,Ve=z("symbol-registry"),$e=z("symbols"),nt=z("op-symbols"),et=Object.prototype,pt=typeof He=="function",ct=se.QObject,It=!ct||!ct.prototype||!ct.prototype.findChild,dt=le&&b(function(){return Te(Xe({},"a",{get:function(){return Xe(this,"a",{value:7}).a}})).a!=7})?function(Ue,Me,Re){var tt=Qe(et,Me);tt&&delete et[Me],Xe(Ue,Me,Re),tt&&Ue!==et&&Xe(et,Me,tt)}:Xe,Mt=function(Ue){var Me=$e[Ue]=Te(He.prototype);return Me._k=Ue,Me},xt=pt&&typeof He.iterator=="symbol"?function(Ue){return typeof Ue=="symbol"}:function(Ue){return Ue instanceof He},gt=function(Ue,Me,Re){return Ue===et&>(nt,Me,Re),ge(Ue),Me=pe(Me,!0),ge(Re),te($e,Me)?(Re.enumerable?(te(Ue,ut)&&Ue[ut][Me]&&(Ue[ut][Me]=!1),Re=Te(Re,{enumerable:ke(0,!1)})):(te(Ue,ut)||Xe(Ue,ut,ke(1,{})),Ue[ut][Me]=!0),dt(Ue,Me,Re)):Xe(Ue,Me,Re)},_t=function(Ue,Me){ge(Ue);for(var Re,tt=ye(Me=he(Me)),lt=0,Pt=tt.length;Pt>lt;)gt(Ue,Re=tt[lt++],Me[Re]);return Ue},We=function(Ue,Me){return Me===void 0?Te(Ue):_t(Te(Ue),Me)},Ae=function(Ue){var Me=ze.call(this,Ue=pe(Ue,!0));return!(this===et&&te($e,Ue)&&!te(nt,Ue))&&(!(Me||!te(this,Ue)||!te($e,Ue)||te(this,ut)&&this[ut][Ue])||Me)},Se=function(Ue,Me){if(Ue=he(Ue),Me=pe(Me,!0),Ue!==et||!te($e,Me)||te(nt,Me)){var Re=Qe(Ue,Me);return!Re||!te($e,Me)||te(Ue,ut)&&Ue[ut][Me]||(Re.enumerable=!0),Re}},Be=function(Ue){for(var Me,Re=ot(he(Ue)),tt=[],lt=0;Re.length>lt;)te($e,Me=Re[lt++])||Me==ut||Me==E||tt.push(Me);return tt},Ke=function(Ue){for(var Me,Re=Ue===et,tt=ot(Re?nt:he(Ue)),lt=[],Pt=0;tt.length>Pt;)!te($e,Me=tt[Pt++])||Re&&!te(et,Me)||lt.push($e[Me]);return lt};pt||(He=function(){if(this instanceof He)throw TypeError("Symbol is not a constructor!");var Ue=re(arguments.length>0?arguments[0]:void 0),Me=function(Re){this===et&&Me.call(nt,Re),te(this,ut)&&te(this[ut],Ue)&&(this[ut][Ue]=!1),dt(this,Ue,ke(1,Re))};return le&&It&&dt(et,Ue,{configurable:!0,set:Me}),Mt(Ue)},ne(He.prototype,"toString",function(){return this._k}),Oe.f=Se,je.f=gt,ie("./_object-gopn").f=Ee.f=Be,ie("./_object-pie").f=Ae,ie("./_object-gops").f=Ke,le&&!ie("./_library")&&ne(et,"propertyIsEnumerable",Ae,!0),oe.f=function(Ue){return Mt(ae(Ue))}),ee(ee.G+ee.W+ee.F*!pt,{Symbol:He});for(var Ne="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),De=0;Ne.length>De;)ae(Ne[De++]);for(var we=Pe(ae.store),Le=0;we.length>Le;)ve(we[Le++]);ee(ee.S+ee.F*!pt,"Symbol",{for:function(Ue){return te(Ve,Ue+="")?Ve[Ue]:Ve[Ue]=He(Ue)},keyFor:function(Ue){if(!xt(Ue))throw TypeError(Ue+" is not a symbol!");for(var Me in Ve)if(Ve[Me]===Ue)return Me},useSetter:function(){It=!0},useSimple:function(){It=!1}}),ee(ee.S+ee.F*!pt,"Object",{create:We,defineProperty:gt,defineProperties:_t,getOwnPropertyDescriptor:Se,getOwnPropertyNames:Be,getOwnPropertySymbols:Ke}),rt&&ee(ee.S+ee.F*(!pt||b(function(){var Ue=He();return Ye([Ue])!="[null]"||Ye({a:Ue})!="{}"||Ye(Object(Ue))!="{}"})),"JSON",{stringify:function(Ue){for(var Me,Re,tt=[Ue],lt=1;arguments.length>lt;)tt.push(arguments[lt++]);if(Re=Me=tt[1],(_e(Me)||Ue!==void 0)&&!xt(Ue))return me(Me)||(Me=function(Pt,Ct){if(typeof Re=="function"&&(Ct=Re.call(this,Pt,Ct)),!xt(Ct))return Ct}),tt[1]=Me,Ye.apply(rt,tt)}}),He.prototype[Ge]||ie("./_hide")(He.prototype,Ge,He.prototype.valueOf),x(He,"Symbol"),x(Math,"Math",!0),x(se.JSON,"JSON",!0)},{"./_an-object":61,"./_descriptors":69,"./_enum-keys":72,"./_export":73,"./_fails":74,"./_global":76,"./_has":77,"./_hide":78,"./_is-array":84,"./_is-object":85,"./_library":92,"./_meta":93,"./_object-create":97,"./_object-dp":98,"./_object-gopd":100,"./_object-gopn":102,"./_object-gopn-ext":101,"./_object-gops":103,"./_object-keys":106,"./_object-pie":107,"./_property-desc":111,"./_redefine":113,"./_set-to-string-tag":115,"./_shared":117,"./_to-iobject":123,"./_to-primitive":126,"./_uid":127,"./_wks":131,"./_wks-define":129,"./_wks-ext":130}],147:[function(ie,Ce,ue){"use strict";var se=ie("./_export"),te=ie("./_core"),le=ie("./_global"),ee=ie("./_species-constructor"),ne=ie("./_promise-resolve");se(se.P+se.R,"Promise",{finally:function(E){var b=ee(this,te.Promise||le.Promise),z=typeof E=="function";return this.then(z?function(x){return ne(b,E()).then(function(){return x})}:E,z?function(x){return ne(b,E()).then(function(){throw x})}:E)}})},{"./_core":65,"./_export":73,"./_global":76,"./_promise-resolve":110,"./_species-constructor":118}],148:[function(ie,Ce,ue){"use strict";var se=ie("./_export"),te=ie("./_new-promise-capability"),le=ie("./_perform");se(se.S,"Promise",{try:function(ee){var ne=te.f(this),E=le(ee);return(E.e?ne.reject:ne.resolve)(E.v),ne.promise}})},{"./_export":73,"./_new-promise-capability":95,"./_perform":109}],149:[function(ie,Ce,ue){ie("./_wks-define")("asyncIterator")},{"./_wks-define":129}],150:[function(ie,Ce,ue){ie("./_wks-define")("observable")},{"./_wks-define":129}],151:[function(ie,Ce,ue){ie("./es6.array.iterator");for(var se=ie("./_global"),te=ie("./_hide"),le=ie("./_iterators"),ee=ie("./_wks")("toStringTag"),ne="CSSRuleList,CSSStyleDeclaration,CSSValueList,ClientRectList,DOMRectList,DOMStringList,DOMTokenList,DataTransferItemList,FileList,HTMLAllCollection,HTMLCollection,HTMLFormElement,HTMLSelectElement,MediaList,MimeTypeArray,NamedNodeMap,NodeList,PaintRequestList,Plugin,PluginArray,SVGLengthList,SVGNumberList,SVGPathSegList,SVGPointList,SVGStringList,SVGTransformList,SourceBufferList,StyleSheetList,TextTrackCueList,TextTrackList,TouchList".split(","),E=0;E<ne.length;E++){var b=ne[E],z=se[b],x=z&&z.prototype;x&&!x[ee]&&te(x,ee,b),le[b]=le.Array}},{"./_global":76,"./_hide":78,"./_iterators":91,"./_wks":131,"./es6.array.iterator":134}],152:[function(ie,Ce,ue){var se=ie("./_export"),te=ie("./_task");se(se.G+se.B,{setImmediate:te.set,clearImmediate:te.clear})},{"./_export":73,"./_task":120}],153:[function(ie,Ce,ue){(function(se){"use strict";function te(pe){return Array.isArray?Array.isArray(pe):ge(pe)==="[object Array]"}function le(pe){return typeof pe=="boolean"}function ee(pe){return pe===null}function ne(pe){return pe==null}function E(pe){return typeof pe=="number"}function b(pe){return typeof pe=="string"}function z(pe){return(pe===void 0?"undefined":(0,he.default)(pe))==="symbol"}function x(pe){return pe===void 0}function re(pe){return ge(pe)==="[object RegExp]"}function ae(pe){return(pe===void 0?"undefined":(0,he.default)(pe))==="object"&&pe!==null}function oe(pe){return ge(pe)==="[object Date]"}function ve(pe){return ge(pe)==="[object Error]"||pe instanceof Error}function ye(pe){return typeof pe=="function"}function me(pe){return pe===null||typeof pe=="boolean"||typeof pe=="number"||typeof pe=="string"||(pe===void 0?"undefined":(0,he.default)(pe))==="symbol"||pe===void 0}function ge(pe){return Object.prototype.toString.call(pe)}var _e=ie("babel-runtime/helpers/typeof"),he=function(pe){return pe&&pe.__esModule?pe:{default:pe}}(_e);ue.isArray=te,ue.isBoolean=le,ue.isNull=ee,ue.isNullOrUndefined=ne,ue.isNumber=E,ue.isString=b,ue.isSymbol=z,ue.isUndefined=x,ue.isRegExp=re,ue.isObject=ae,ue.isDate=oe,ue.isError=ve,ue.isFunction=ye,ue.isPrimitive=me,ue.isBuffer=se.isBuffer}).call(this,{isBuffer:ie("../../is-buffer/index.js")})},{"../../is-buffer/index.js":163,"babel-runtime/helpers/typeof":32}],154:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/helpers/typeof"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(le){function ee(x,re){for(x=String(x),re=re||2;x.length<re;)x="0"+x;return x}function ne(x){var re=new Date(x.getFullYear(),x.getMonth(),x.getDate());re.setDate(re.getDate()-(re.getDay()+6)%7+3);var ae=new Date(re.getFullYear(),0,4);ae.setDate(ae.getDate()-(ae.getDay()+6)%7+3);var oe=re.getTimezoneOffset()-ae.getTimezoneOffset();re.setHours(re.getHours()-oe);var ve=(re-ae)/6048e5;return 1+Math.floor(ve)}function E(x){var re=x.getDay();return re===0&&(re=7),re}function b(x){return x===null?"null":x===void 0?"undefined":(x===void 0?"undefined":(0,te.default)(x))!=="object"?x===void 0?"undefined":(0,te.default)(x):Array.isArray(x)?"array":{}.toString.call(x).slice(8,-1).toLowerCase()}var z=function(){var x=/d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LloSZWN]|'[^']*'|'[^']*'/g,re=/\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g,ae=/[^-+\dA-Z]/g;return function(oe,ve,ye,me){if(arguments.length!==1||b(oe)!=="string"||/\d/.test(oe)||(ve=oe,oe=void 0),oe=oe||new Date,oe instanceof Date||(oe=new Date(oe)),isNaN(oe))throw TypeError("Invalid date");ve=String(z.masks[ve]||ve||z.masks.default);var ge=ve.slice(0,4);ge!=="UTC:"&&ge!=="GMT:"||(ve=ve.slice(4),ye=!0,ge==="GMT:"&&(me=!0));var _e=ye?"getUTC":"get",he=oe[_e+"Date"](),pe=oe[_e+"Day"](),ke=oe[_e+"Month"](),Te=oe[_e+"FullYear"](),Ee=oe[_e+"Hours"](),Oe=oe[_e+"Minutes"](),je=oe[_e+"Seconds"](),Pe=oe[_e+"Milliseconds"](),Qe=ye?0:oe.getTimezoneOffset(),Xe=ne(oe),ot=E(oe),He={d:he,dd:ee(he),ddd:z.i18n.dayNames[pe],dddd:z.i18n.dayNames[pe+7],m:ke+1,mm:ee(ke+1),mmm:z.i18n.monthNames[ke],mmmm:z.i18n.monthNames[ke+12],yy:String(Te).slice(2),yyyy:Te,h:Ee%12||12,hh:ee(Ee%12||12),H:Ee,HH:ee(Ee),M:Oe,MM:ee(Oe),s:je,ss:ee(je),l:ee(Pe,3),L:ee(Math.round(Pe/10)),t:Ee<12?"a":"p",tt:Ee<12?"am":"pm",T:Ee<12?"A":"P",TT:Ee<12?"AM":"PM",Z:me?"GMT":ye?"UTC":(String(oe).match(re)||[""]).pop().replace(ae,""),o:(Qe>0?"-":"+")+ee(100*Math.floor(Math.abs(Qe)/60)+Math.abs(Qe)%60,4),S:["th","st","nd","rd"][he%10>3?0:(he%100-he%10!=10)*he%10],W:Xe,N:ot};return ve.replace(x,function(rt){return rt in He?He[rt]:rt.slice(1,rt.length-1)})}}();z.masks={default:"ddd mmm dd yyyy HH:MM:ss",shortDate:"m/d/yy",mediumDate:"mmm d, yyyy",longDate:"mmmm d, yyyy",fullDate:"dddd, mmmm d, yyyy",shortTime:"h:MM TT",mediumTime:"h:MM:ss TT",longTime:"h:MM:ss TT Z",isoDate:"yyyy-mm-dd",isoTime:"HH:MM:ss",isoDateTime:"yyyy-mm-dd'T'HH:MM:sso",isoUtcDateTime:"UTC:yyyy-mm-dd'T'HH:MM:ss'Z'",expiresHeaderFormat:"ddd, dd mmm yyyy HH:MM:ss Z"},z.i18n={dayNames:["Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec","January","February","March","April","May","June","July","August","September","October","November","December"]},typeof ce=="function"&&ce.amd?ce(function(){return z}):(ue===void 0?"undefined":(0,te.default)(ue))==="object"?Ce.exports=z:le.dateFormat=z})(void 0)},{"babel-runtime/helpers/typeof":32}],155:[function(ie,Ce,ue){(function(se){function te(){return!(typeof window=="undefined"||!window.process||window.process.type!=="renderer")||typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function le(b){var z=this.useColors;if(b[0]=(z?"%c":"")+this.namespace+(z?" %c":" ")+b[0]+(z?"%c ":" ")+"+"+ue.humanize(this.diff),z){var x="color: "+this.color;b.splice(1,0,x,"color: inherit");var re=0,ae=0;b[0].replace(/%[a-zA-Z%]/g,function(oe){oe!=="%%"&&(re++,oe==="%c"&&(ae=re))}),b.splice(ae,0,x)}}function ee(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function ne(b){try{b==null?ue.storage.removeItem("debug"):ue.storage.debug=b}catch(z){}}function E(){var b;try{b=ue.storage.debug}catch(z){}return!b&&se!==void 0&&"env"in se&&(b=se.env.DEBUG),b}ue=Ce.exports=ie("./debug"),ue.log=ee,ue.formatArgs=le,ue.save=ne,ue.load=E,ue.useColors=te,ue.storage=typeof chrome!="undefined"&&chrome.storage!==void 0?chrome.storage.local:function(){try{return window.localStorage}catch(b){}}(),ue.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],ue.formatters.j=function(b){try{return JSON.stringify(b)}catch(z){return"[UnexpectedJSONParseError]: "+z.message}},ue.enable(E())}).call(this,ie("_process"))},{"./debug":156,_process:173}],156:[function(ie,Ce,ue){function se(z){var x,re=0;for(x in z)re=(re<<5)-re+z.charCodeAt(x),re|=0;return ue.colors[Math.abs(re)%ue.colors.length]}function te(z){function x(){if(x.enabled){var re=x,ae=+new Date,oe=ae-(b||ae);re.diff=oe,re.prev=b,re.curr=ae,b=ae;for(var ve=new Array(arguments.length),ye=0;ye<ve.length;ye++)ve[ye]=arguments[ye];ve[0]=ue.coerce(ve[0]),typeof ve[0]!="string"&&ve.unshift("%O");var me=0;ve[0]=ve[0].replace(/%([a-zA-Z%])/g,function(ge,_e){if(ge==="%%")return ge;me++;var he=ue.formatters[_e];if(typeof he=="function"){var pe=ve[me];ge=he.call(re,pe),ve.splice(me,1),me--}return ge}),ue.formatArgs.call(re,ve),(x.log||ue.log||console.log.bind(console)).apply(re,ve)}}return x.namespace=z,x.enabled=ue.enabled(z),x.useColors=ue.useColors(),x.color=se(z),typeof ue.init=="function"&&ue.init(x),x}function le(z){ue.save(z),ue.names=[],ue.skips=[];for(var x=(typeof z=="string"?z:"").split(/[\s,]+/),re=x.length,ae=0;ae<re;ae++)x[ae]&&(z=x[ae].replace(/\*/g,".*?"),z[0]==="-"?ue.skips.push(new RegExp("^"+z.substr(1)+"$")):ue.names.push(new RegExp("^"+z+"$")))}function ee(){ue.enable("")}function ne(z){var x,re;for(x=0,re=ue.skips.length;x<re;x++)if(ue.skips[x].test(z))return!1;for(x=0,re=ue.names.length;x<re;x++)if(ue.names[x].test(z))return!0;return!1}function E(z){return z instanceof Error?z.stack||z.message:z}ue=Ce.exports=te.debug=te.default=te,ue.coerce=E,ue.disable=ee,ue.enable=le,ue.enabled=ne,ue.humanize=ie("ms"),ue.names=[],ue.skips=[],ue.formatters={};var b},{ms:169}],157:[function(ie,Ce,ue){"use strict";function se(le){var ee=""+le,ne=te.exec(ee);if(!ne)return ee;var E,b="",z=0,x=0;for(z=ne.index;z<ee.length;z++){switch(ee.charCodeAt(z)){case 34:E=""";break;case 38:E="&";break;case 39:E="'";break;case 60:E="<";break;case 62:E=">";break;default:continue}x!==z&&(b+=ee.substring(x,z)),x=z+1,b+=E}return x!==z?b+ee.substring(x,z):b}var te=/["'&<>]/;Ce.exports=se},{}],158:[function(ie,Ce,ue){function se(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function te(E){return typeof E=="function"}function le(E){return typeof E=="number"}function ee(E){return typeof E=="object"&&E!==null}function ne(E){return E===void 0}Ce.exports=se,se.EventEmitter=se,se.prototype._events=void 0,se.prototype._maxListeners=void 0,se.defaultMaxListeners=10,se.prototype.setMaxListeners=function(E){if(!le(E)||E<0||isNaN(E))throw TypeError("n must be a positive number");return this._maxListeners=E,this},se.prototype.emit=function(E){var b,z,x,re,ae,oe;if(this._events||(this._events={}),E==="error"&&(!this._events.error||ee(this._events.error)&&!this._events.error.length)){if((b=arguments[1])instanceof Error)throw b;var ve=new Error('Uncaught, unspecified "error" event. ('+b+")");throw ve.context=b,ve}if(z=this._events[E],ne(z))return!1;if(te(z))switch(arguments.length){case 1:z.call(this);break;case 2:z.call(this,arguments[1]);break;case 3:z.call(this,arguments[1],arguments[2]);break;default:re=Array.prototype.slice.call(arguments,1),z.apply(this,re)}else if(ee(z))for(re=Array.prototype.slice.call(arguments,1),oe=z.slice(),x=oe.length,ae=0;ae<x;ae++)oe[ae].apply(this,re);return!0},se.prototype.addListener=function(E,b){var z;if(!te(b))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",E,te(b.listener)?b.listener:b),this._events[E]?ee(this._events[E])?this._events[E].push(b):this._events[E]=[this._events[E],b]:this._events[E]=b,ee(this._events[E])&&!this._events[E].warned&&(z=ne(this._maxListeners)?se.defaultMaxListeners:this._maxListeners)&&z>0&&this._events[E].length>z&&(this._events[E].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[E].length),typeof console.trace=="function"&&console.trace()),this},se.prototype.on=se.prototype.addListener,se.prototype.once=function(E,b){function z(){this.removeListener(E,z),x||(x=!0,b.apply(this,arguments))}if(!te(b))throw TypeError("listener must be a function");var x=!1;return z.listener=b,this.on(E,z),this},se.prototype.removeListener=function(E,b){var z,x,re,ae;if(!te(b))throw TypeError("listener must be a function");if(!this._events||!this._events[E])return this;if(z=this._events[E],re=z.length,x=-1,z===b||te(z.listener)&&z.listener===b)delete this._events[E],this._events.removeListener&&this.emit("removeListener",E,b);else if(ee(z)){for(ae=re;ae-- >0;)if(z[ae]===b||z[ae].listener&&z[ae].listener===b){x=ae;break}if(x<0)return this;z.length===1?(z.length=0,delete this._events[E]):z.splice(x,1),this._events.removeListener&&this.emit("removeListener",E,b)}return this},se.prototype.removeAllListeners=function(E){var b,z;if(!this._events)return this;if(!this._events.removeListener)return arguments.length===0?this._events={}:this._events[E]&&delete this._events[E],this;if(arguments.length===0){for(b in this._events)b!=="removeListener"&&this.removeAllListeners(b);return this.removeAllListeners("removeListener"),this._events={},this}if(z=this._events[E],te(z))this.removeListener(E,z);else if(z)for(;z.length;)this.removeListener(E,z[z.length-1]);return delete this._events[E],this},se.prototype.listeners=function(E){return this._events&&this._events[E]?te(this._events[E])?[this._events[E]]:this._events[E].slice():[]},se.prototype.listenerCount=function(E){if(this._events){var b=this._events[E];if(te(b))return 1;if(b)return b.length}return 0},se.listenerCount=function(E,b){return E.listenerCount(b)}},{}],159:[function(ie,Ce,ue){var se=ie("http"),te=Ce.exports;for(var le in se)se.hasOwnProperty(le)&&(te[le]=se[le]);te.request=function(ee,ne){return ee||(ee={}),ee.scheme="https",ee.protocol="https:",se.request.call(this,ee,ne)}},{http:196}],160:[function(ie,Ce,ue){"use strict";var se=ie("util"),te=ie("ms");Ce.exports=function(le){if(typeof le=="number")return le;var ee=te(le);if(ee===void 0){var ne=new Error(se.format("humanize-ms(%j) result undefined",le));console.warn(ne.stack)}return ee}},{ms:169,util:207}],161:[function(ie,Ce,ue){ue.read=function(se,te,le,ee,ne){var E,b,z=8*ne-ee-1,x=(1<<z)-1,re=x>>1,ae=-7,oe=le?ne-1:0,ve=le?-1:1,ye=se[te+oe];for(oe+=ve,E=ye&(1<<-ae)-1,ye>>=-ae,ae+=z;ae>0;E=256*E+se[te+oe],oe+=ve,ae-=8);for(b=E&(1<<-ae)-1,E>>=-ae,ae+=ee;ae>0;b=256*b+se[te+oe],oe+=ve,ae-=8);if(E===0)E=1-re;else{if(E===x)return b?NaN:1/0*(ye?-1:1);b+=Math.pow(2,ee),E-=re}return(ye?-1:1)*b*Math.pow(2,E-ee)},ue.write=function(se,te,le,ee,ne,E){var b,z,x,re=8*E-ne-1,ae=(1<<re)-1,oe=ae>>1,ve=ne===23?Math.pow(2,-24)-Math.pow(2,-77):0,ye=ee?0:E-1,me=ee?1:-1,ge=te<0||te===0&&1/te<0?1:0;for(te=Math.abs(te),isNaN(te)||te===1/0?(z=isNaN(te)?1:0,b=ae):(b=Math.floor(Math.log(te)/Math.LN2),te*(x=Math.pow(2,-b))<1&&(b--,x*=2),te+=b+oe>=1?ve/x:ve*Math.pow(2,1-oe),te*x>=2&&(b++,x/=2),b+oe>=ae?(z=0,b=ae):b+oe>=1?(z=(te*x-1)*Math.pow(2,ne),b+=oe):(z=te*Math.pow(2,oe-1)*Math.pow(2,ne),b=0));ne>=8;se[le+ye]=255&z,ye+=me,z/=256,ne-=8);for(b=b<<ne|z,re+=ne;re>0;se[le+ye]=255&b,ye+=me,b/=256,re-=8);se[le+ye-me]|=128*ge}},{}],162:[function(ie,Ce,ue){typeof Object.create=="function"?Ce.exports=function(se,te){se.super_=te,se.prototype=Object.create(te.prototype,{constructor:{value:se,enumerable:!1,writable:!0,configurable:!0}})}:Ce.exports=function(se,te){se.super_=te;var le=function(){};le.prototype=te.prototype,se.prototype=new le,se.prototype.constructor=se}},{}],163:[function(ie,Ce,ue){function se(le){return!!le.constructor&&typeof le.constructor.isBuffer=="function"&&le.constructor.isBuffer(le)}function te(le){return typeof le.readFloatLE=="function"&&typeof le.slice=="function"&&se(le.slice(0,0))}Ce.exports=function(le){return le!=null&&(se(le)||te(le)||!!le._isBuffer)}},{}],164:[function(ie,Ce,ue){(function(se){function te(ne){return ee.call(ne).replace(/^[^{]*{\s*/,"").replace(/\s*}[^}]*$/,"")}function le(ne){return typeof ne=="function"&&(/^class(\s|\{\}$)/.test(ee.call(ne))||/^.*classCallCheck\(/.test(te(ne)))}var ee=Function.prototype.toString;ue!==void 0?(Ce!==void 0&&Ce.exports&&(ue=Ce.exports=le),ue.isClass=le):typeof ce=="function"&&ce.amd?ce([],function(){return le}):se.isClass=le})(this)},{}],165:[function(ie,Ce,ue){"use strict";function se(E){var b=E.slice(2);return b=b[0].toLowerCase()+b.slice(1)}var te=ie("core-util-is"),le=ie("isstream"),ee=ie("is-class");Object.keys(te).map(function(E){ue[se(E)]=te[E]}),ue.stream=le,ue.readableStream=le.isReadable,ue.writableStream=le.isWritable,ue.duplexStream=le.isDuplex,ue.class=ee,ue.finite=function(E){return Number.isFinite(E)},ue.NaN=function(E){return Number.isNaN(E)},ue.generator=function(E){return E&&typeof E.next=="function"&&typeof E.throw=="function"},ue.generatorFunction=function(E){return E&&E.constructor&&E.constructor.name==="GeneratorFunction"},ue.asyncFunction=function(E){return E&&E.constructor&&E.constructor.name==="AsyncFunction"},ue.promise=function(E){return E&&typeof E.then=="function"};var ne=Math.pow(2,31);ue.int=function(E){return te.isNumber(E)&&E%1==0},ue.int32=function(E){return ue.int(E)&&E<ne&&E>=-ne},ue.long=function(E){return ue.int(E)&&(E>=ne||E<-ne)},ue.Long=function(E){return ue.object(E)&&ue.number(E.high)&&ue.number(E.low)},ue.double=function(E){return te.isNumber(E)&&!isNaN(E)&&E%1!=0},ue.date=function(E){return E instanceof Date},ue.regExp=function(E){return E instanceof RegExp},ue.regexp=ue.regExp,ue.error=function(E){return E instanceof Error},ue.array=function(E){return Array.isArray(E)}},{"core-util-is":153,"is-class":164,isstream:167}],166:[function(ie,Ce,ue){var se={}.toString;Ce.exports=Array.isArray||function(te){return se.call(te)=="[object Array]"}},{}],167:[function(ie,Ce,ue){function se(E){return E instanceof ne.Stream}function te(E){return se(E)&&typeof E._read=="function"&&typeof E._readableState=="object"}function le(E){return se(E)&&typeof E._write=="function"&&typeof E._writableState=="object"}function ee(E){return te(E)&&le(E)}var ne=ie("stream");Ce.exports=se,Ce.exports.isReadable=te,Ce.exports.isWritable=le,Ce.exports.isDuplex=ee},{stream:195}],168:[function(ie,Ce,ue){"use strict";function se(le,ee,ne){if(!le)throw new TypeError("argument dest is required");if(!ee)throw new TypeError("argument src is required");return ne===void 0&&(ne=!0),Object.getOwnPropertyNames(ee).forEach(function(E){if(ne||!te.call(le,E)){var b=Object.getOwnPropertyDescriptor(ee,E);Object.defineProperty(le,E,b)}}),le}Ce.exports=se;var te=Object.prototype.hasOwnProperty},{}],169:[function(ie,Ce,ue){function se(re){if(re=String(re),!(re.length>100)){var ae=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(re);if(ae){var oe=parseFloat(ae[1]);switch((ae[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return oe*x;case"days":case"day":case"d":return oe*z;case"hours":case"hour":case"hrs":case"hr":case"h":return oe*b;case"minutes":case"minute":case"mins":case"min":case"m":return oe*E;case"seconds":case"second":case"secs":case"sec":case"s":return oe*ne;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return oe;default:return}}}}function te(re){return re>=z?Math.round(re/z)+"d":re>=b?Math.round(re/b)+"h":re>=E?Math.round(re/E)+"m":re>=ne?Math.round(re/ne)+"s":re+"ms"}function le(re){return ee(re,z,"day")||ee(re,b,"hour")||ee(re,E,"minute")||ee(re,ne,"second")||re+" ms"}function ee(re,ae,oe){if(!(re<ae))return re<1.5*ae?Math.floor(re/ae)+" "+oe:Math.ceil(re/ae)+" "+oe+"s"}var ne=1e3,E=60*ne,b=60*E,z=24*b,x=365.25*z;Ce.exports=function(re,ae){ae=ae||{};var oe=typeof re;if(oe==="string"&&re.length>0)return se(re);if(oe==="number"&&isNaN(re)===!1)return ae.long?le(re):te(re);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(re))}},{}],170:[function(ie,Ce,ue){(function(se){function te(E,b){for(var z=0,x=E.length-1;x>=0;x--){var re=E[x];re==="."?E.splice(x,1):re===".."?(E.splice(x,1),z++):z&&(E.splice(x,1),z--)}if(b)for(;z--;z)E.unshift("..");return E}function le(E){typeof E!="string"&&(E+="");var b,z=0,x=-1,re=!0;for(b=E.length-1;b>=0;--b)if(E.charCodeAt(b)===47){if(!re){z=b+1;break}}else x===-1&&(re=!1,x=b+1);return x===-1?"":E.slice(z,x)}function ee(E,b){if(E.filter)return E.filter(b);for(var z=[],x=0;x<E.length;x++)b(E[x],x,E)&&z.push(E[x]);return z}ue.resolve=function(){for(var E="",b=!1,z=arguments.length-1;z>=-1&&!b;z--){var x=z>=0?arguments[z]:se.cwd();if(typeof x!="string")throw new TypeError("Arguments to path.resolve must be strings");x&&(E=x+"/"+E,b=x.charAt(0)==="/")}return E=te(ee(E.split("/"),function(re){return!!re}),!b).join("/"),(b?"/":"")+E||"."},ue.normalize=function(E){var b=ue.isAbsolute(E),z=ne(E,-1)==="/";return E=te(ee(E.split("/"),function(x){return!!x}),!b).join("/"),E||b||(E="."),E&&z&&(E+="/"),(b?"/":"")+E},ue.isAbsolute=function(E){return E.charAt(0)==="/"},ue.join=function(){var E=Array.prototype.slice.call(arguments,0);return ue.normalize(ee(E,function(b,z){if(typeof b!="string")throw new TypeError("Arguments to path.join must be strings");return b}).join("/"))},ue.relative=function(E,b){function z(me){for(var ge=0;ge<me.length&&me[ge]==="";ge++);for(var _e=me.length-1;_e>=0&&me[_e]==="";_e--);return ge>_e?[]:me.slice(ge,_e-ge+1)}E=ue.resolve(E).substr(1),b=ue.resolve(b).substr(1);for(var x=z(E.split("/")),re=z(b.split("/")),ae=Math.min(x.length,re.length),oe=ae,ve=0;ve<ae;ve++)if(x[ve]!==re[ve]){oe=ve;break}for(var ye=[],ve=oe;ve<x.length;ve++)ye.push("..");return ye=ye.concat(re.slice(oe)),ye.join("/")},ue.sep="/",ue.delimiter=":",ue.dirname=function(E){if(typeof E!="string"&&(E+=""),E.length===0)return".";for(var b=E.charCodeAt(0),z=b===47,x=-1,re=!0,ae=E.length-1;ae>=1;--ae)if((b=E.charCodeAt(ae))===47){if(!re){x=ae;break}}else re=!1;return x===-1?z?"/":".":z&&x===1?"/":E.slice(0,x)},ue.basename=function(E,b){var z=le(E);return b&&z.substr(-1*b.length)===b&&(z=z.substr(0,z.length-b.length)),z},ue.extname=function(E){typeof E!="string"&&(E+="");for(var b=-1,z=0,x=-1,re=!0,ae=0,oe=E.length-1;oe>=0;--oe){var ve=E.charCodeAt(oe);if(ve!==47)x===-1&&(re=!1,x=oe+1),ve===46?b===-1?b=oe:ae!==1&&(ae=1):b!==-1&&(ae=-1);else if(!re){z=oe+1;break}}return b===-1||x===-1||ae===0||ae===1&&b===x-1&&b===z+1?"":E.slice(b,x)};var ne=function(E,b,z){return E.substr(b,z)}}).call(this,ie("_process"))},{_process:173}],171:[function(ie,Ce,ue){(function(se){(function(){"use strict";function te(je){return je=String(je),je.charAt(0).toUpperCase()+je.slice(1)}function le(je,Pe,Qe){var Xe={"10.0":"10",6.4:"10 Technical Preview",6.3:"8.1",6.2:"8",6.1:"Server 2008 R2 / 7","6.0":"Server 2008 / Vista",5.2:"Server 2003 / XP 64-bit",5.1:"XP",5.01:"2000 SP1","5.0":"2000","4.0":"NT","4.90":"ME"};return Pe&&Qe&&/^Win/i.test(je)&&!/^Windows Phone /i.test(je)&&(Xe=Xe[/[\d.]+$/.exec(je)])&&(je="Windows "+Xe),je=String(je),Pe&&Qe&&(je=je.replace(RegExp(Pe,"i"),Qe)),je=ne(je.replace(/ ce$/i," CE").replace(/\bhpw/i,"web").replace(/\bMacintosh\b/,"Mac OS").replace(/_PowerPC\b/i," OS").replace(/\b(OS X) [^ \d]+/i,"$1").replace(/\bMac (OS X)\b/,"$1").replace(/\/(\d)/," $1").replace(/_/g,".").replace(/(?: BePC|[ .]*fc[ \d.]+)$/i,"").replace(/\bx86\.64\b/gi,"x86_64").replace(/\b(Windows Phone) OS\b/,"$1").replace(/\b(Chrome OS \w+) [\d.]+\b/,"$1").split(" on ")[0])}function ee(je,Pe){var Qe=-1,Xe=je?je.length:0;if(typeof Xe=="number"&&Xe>-1&&Xe<=he)for(;++Qe<Xe;)Pe(je[Qe],Qe,je);else E(je,Pe)}function ne(je){return je=ae(je),/^(?:webOS|i(?:OS|P))/.test(je)?je:te(je)}function E(je,Pe){for(var Qe in je)Te.call(je,Qe)&&Pe(je[Qe],Qe,je)}function b(je){return je==null?te(je):Ee.call(je).slice(8,-1)}function z(je,Pe){var Qe=je!=null?typeof je[Pe]:"number";return!(/^(?:boolean|number|string|undefined)$/.test(Qe)||Qe=="object"&&!je[Pe])}function x(je){return String(je).replace(/([ -])(?!$)/g,"$1?")}function re(je,Pe){var Qe=null;return ee(je,function(Xe,ot){Qe=Pe(Qe,Xe,ot,je)}),Qe}function ae(je){return String(je).replace(/^ +| +$/g,"")}function oe(je){function Pe(Ue){return re(Ue,function(Me,Re){var tt=Re.pattern||x(Re);return!Me&&(Me=RegExp("\\b"+tt+" *\\d+[.\\w_]*","i").exec(je)||RegExp("\\b"+tt+" *\\w+-[\\w]*","i").exec(je)||RegExp("\\b"+tt+"(?:; *(?:[a-z]+[_-])?[a-z]+\\d+|[^ ();-]*)","i").exec(je))&&((Me=String(Re.label&&!RegExp(tt,"i").test(Re.label)?Re.label:Me).split("/"))[1]&&!/[\d.]+/.test(Me[0])&&(Me[0]+=" "+Me[1]),Re=Re.label||Re,Me=ne(Me[0].replace(RegExp(tt,"i"),Re).replace(RegExp("; *(?:"+Re+"[_-])?","i")," ").replace(RegExp("("+Re+")[-_.]?(\\w)","i"),"$1 $2"))),Me})}function Qe(){return this.description||""}var Xe=ye,ot=je&&typeof je=="object"&&b(je)!="String";ot&&(Xe=je,je=null);var He=Xe.navigator||{},rt=He.userAgent||"";je||(je=rt);var Ye,ut,Ge=ot?!!He.likeChrome:/\bChrome\b/.test(je)&&!/internal|\n/i.test(Ee.toString()),ze=ot?"Object":"ScriptBridgingProxyObject",Ve=ot?"Object":"Environment",$e=ot&&Xe.java?"JavaPackage":b(Xe.java),nt=ot?"Object":"RuntimeObject",et=/\bJava/.test($e)&&Xe.java,pt=et&&b(Xe.environment)==Ve,ct=et?"a":"\u4F2A",It=et?"b":"\u5C3E",dt=Xe.document||{},Mt=Xe.operamini||Xe.opera,xt=pe.test(xt=ot&&Mt?Mt["[[Class]]"]:b(Mt))?xt:Mt=null,gt=je,_t=[],We=null,Ae=je==rt,Se=Ae&&Mt&&typeof Mt.version=="function"&&Mt.version(),Be=function(Ue){return re(Ue,function(Me,Re){return Me||RegExp("\\b"+(Re.pattern||x(Re))+"\\b","i").exec(je)&&(Re.label||Re)})}([{label:"EdgeHTML",pattern:"Edge"},"Trident",{label:"WebKit",pattern:"AppleWebKit"},"iCab","Presto","NetFront","Tasman","KHTML","Gecko"]),Ke=function(Ue){return re(Ue,function(Me,Re){return Me||RegExp("\\b"+(Re.pattern||x(Re))+"\\b","i").exec(je)&&(Re.label||Re)})}(["Adobe AIR","Arora","Avant Browser","Breach","Camino","Electron","Epiphany","Fennec","Flock","Galeon","GreenBrowser","iCab","Iceweasel","K-Meleon","Konqueror","Lunascape","Maxthon",{label:"Microsoft Edge",pattern:"Edge"},"Midori","Nook Browser","PaleMoon","PhantomJS","Raven","Rekonq","RockMelt",{label:"Samsung Internet",pattern:"SamsungBrowser"},"SeaMonkey",{label:"Silk",pattern:"(?:Cloud9|Silk-Accelerated)"},"Sleipnir","SlimBrowser",{label:"SRWare Iron",pattern:"Iron"},"Sunrise","Swiftfox","Waterfox","WebPositive","Opera Mini",{label:"Opera Mini",pattern:"OPiOS"},"Opera",{label:"Opera",pattern:"OPR"},"Chrome",{label:"Chrome Mobile",pattern:"(?:CriOS|CrMo)"},{label:"Firefox",pattern:"(?:Firefox|Minefield)"},{label:"Firefox for iOS",pattern:"FxiOS"},{label:"IE",pattern:"IEMobile"},{label:"IE",pattern:"MSIE"},"Safari"]),Ne=Pe([{label:"BlackBerry",pattern:"BB10"},"BlackBerry",{label:"Galaxy S",pattern:"GT-I9000"},{label:"Galaxy S2",pattern:"GT-I9100"},{label:"Galaxy S3",pattern:"GT-I9300"},{label:"Galaxy S4",pattern:"GT-I9500"},{label:"Galaxy S5",pattern:"SM-G900"},{label:"Galaxy S6",pattern:"SM-G920"},{label:"Galaxy S6 Edge",pattern:"SM-G925"},{label:"Galaxy S7",pattern:"SM-G930"},{label:"Galaxy S7 Edge",pattern:"SM-G935"},"Google TV","Lumia","iPad","iPod","iPhone","Kindle",{label:"Kindle Fire",pattern:"(?:Cloud9|Silk-Accelerated)"},"Nexus","Nook","PlayBook","PlayStation Vita","PlayStation","TouchPad","Transformer",{label:"Wii U",pattern:"WiiU"},"Wii","Xbox One",{label:"Xbox 360",pattern:"Xbox"},"Xoom"]),De=function(Ue){return re(Ue,function(Me,Re,tt){return Me||(Re[Ne]||Re[/^[a-z]+(?: +[a-z]+\b)*/i.exec(Ne)]||RegExp("\\b"+x(tt)+"(?:\\b|\\w*\\d)","i").exec(je))&&tt})}({Apple:{iPad:1,iPhone:1,iPod:1},Archos:{},Amazon:{Kindle:1,"Kindle Fire":1},Asus:{Transformer:1},"Barnes & Noble":{Nook:1},BlackBerry:{PlayBook:1},Google:{"Google TV":1,Nexus:1},HP:{TouchPad:1},HTC:{},LG:{},Microsoft:{Xbox:1,"Xbox One":1},Motorola:{Xoom:1},Nintendo:{"Wii U":1,Wii:1},Nokia:{Lumia:1},Samsung:{"Galaxy S":1,"Galaxy S2":1,"Galaxy S3":1,"Galaxy S4":1},Sony:{PlayStation:1,"PlayStation Vita":1}}),we=function(Ue){return re(Ue,function(Me,Re){var tt=Re.pattern||x(Re);return!Me&&(Me=RegExp("\\b"+tt+"(?:/[\\d.]+|[ \\w.]*)","i").exec(je))&&(Me=le(Me,tt,Re.label||Re)),Me})}(["Windows Phone","Android","CentOS",{label:"Chrome OS",pattern:"CrOS"},"Debian","Fedora","FreeBSD","Gentoo","Haiku","Kubuntu","Linux Mint","OpenBSD","Red Hat","SuSE","Ubuntu","Xubuntu","Cygwin","Symbian OS","hpwOS","webOS ","webOS","Tablet OS","Tizen","Linux","Mac OS X","Macintosh","Mac","Windows 98;","Windows "]);if(Be&&(Be=[Be]),De&&!Ne&&(Ne=Pe([De])),(Ye=/\bGoogle TV\b/.exec(Ne))&&(Ne=Ye[0]),/\bSimulator\b/i.test(je)&&(Ne=(Ne?Ne+" ":"")+"Simulator"),Ke=="Opera Mini"&&/\bOPiOS\b/.test(je)&&_t.push("running in Turbo/Uncompressed mode"),Ke=="IE"&&/\blike iPhone OS\b/.test(je)?(Ye=oe(je.replace(/like iPhone OS/,"")),De=Ye.manufacturer,Ne=Ye.product):/^iP/.test(Ne)?(Ke||(Ke="Safari"),we="iOS"+((Ye=/ OS ([\d_]+)/i.exec(je))?" "+Ye[1].replace(/_/g,"."):"")):Ke!="Konqueror"||/buntu/i.test(we)?De&&De!="Google"&&(/Chrome/.test(Ke)&&!/\bMobile Safari\b/i.test(je)||/\bVita\b/.test(Ne))||/\bAndroid\b/.test(we)&&/^Chrome/.test(Ke)&&/\bVersion\//i.test(je)?(Ke="Android Browser",we=/\bAndroid\b/.test(we)?we:"Android"):Ke=="Silk"?(/\bMobi/i.test(je)||(we="Android",_t.unshift("desktop mode")),/Accelerated *= *true/i.test(je)&&_t.unshift("accelerated")):Ke=="PaleMoon"&&(Ye=/\bFirefox\/([\d.]+)\b/.exec(je))?_t.push("identifying as Firefox "+Ye[1]):Ke=="Firefox"&&(Ye=/\b(Mobile|Tablet|TV)\b/i.exec(je))?(we||(we="Firefox OS"),Ne||(Ne=Ye[1])):!Ke||(Ye=!/\bMinefield\b/i.test(je)&&/\b(?:Firefox|Safari)\b/.exec(Ke))?(Ke&&!Ne&&/[\/,]|^[^(]+?\)/.test(je.slice(je.indexOf(Ye+"/")+8))&&(Ke=null),(Ye=Ne||De||we)&&(Ne||De||/\b(?:Android|Symbian OS|Tablet OS|webOS)\b/.test(we))&&(Ke=/[a-z]+(?: Hat)?/i.exec(/\bAndroid\b/.test(we)?we:Ye)+" Browser")):Ke=="Electron"&&(Ye=(/\bChrome\/([\d.]+)\b/.exec(je)||0)[1])&&_t.push("Chromium "+Ye):we="Kubuntu",Se||(Se=function(Ue){return re(Ue,function(Me,Re){return Me||(RegExp(Re+"(?:-[\\d.]+/|(?: for [\\w-]+)?[ /-])([\\d.]+[^ ();/_-]*)","i").exec(je)||0)[1]||null})}(["(?:Cloud9|CriOS|CrMo|Edge|FxiOS|IEMobile|Iron|Opera ?Mini|OPiOS|OPR|Raven|SamsungBrowser|Silk(?!/[\\d.]+$))","Version",x(Ke),"(?:Firefox|Minefield|NetFront)"])),(Ye=Be=="iCab"&&parseFloat(Se)>3&&"WebKit"||/\bOpera\b/.test(Ke)&&(/\bOPR\b/.test(je)?"Blink":"Presto")||/\b(?:Midori|Nook|Safari)\b/i.test(je)&&!/^(?:Trident|EdgeHTML)$/.test(Be)&&"WebKit"||!Be&&/\bMSIE\b/i.test(je)&&(we=="Mac OS"?"Tasman":"Trident")||Be=="WebKit"&&/\bPlayStation\b(?! Vita\b)/i.test(Ke)&&"NetFront")&&(Be=[Ye]),Ke=="IE"&&(Ye=(/; *(?:XBLWP|ZuneWP)(\d+)/i.exec(je)||0)[1])?(Ke+=" Mobile",we="Windows Phone "+(/\+$/.test(Ye)?Ye:Ye+".x"),_t.unshift("desktop mode")):/\bWPDesktop\b/i.test(je)?(Ke="IE Mobile",we="Windows Phone 8.x",_t.unshift("desktop mode"),Se||(Se=(/\brv:([\d.]+)/.exec(je)||0)[1])):Ke!="IE"&&Be=="Trident"&&(Ye=/\brv:([\d.]+)/.exec(je))&&(Ke&&_t.push("identifying as "+Ke+(Se?" "+Se:"")),Ke="IE",Se=Ye[1]),Ae){if(z(Xe,"global"))if(et&&(Ye=et.lang.System,gt=Ye.getProperty("os.arch"),we=we||Ye.getProperty("os.name")+" "+Ye.getProperty("os.version")),pt){try{Se=Xe.require("ringo/engine").version.join("."),Ke="RingoJS"}catch(Ue){(Ye=Xe.system)&&Ye.global.system==Xe.system&&(Ke="Narwhal",we||(we=Ye[0].os||null))}Ke||(Ke="Rhino")}else typeof Xe.process=="object"&&!Xe.process.browser&&(Ye=Xe.process)&&(typeof Ye.versions=="object"&&(typeof Ye.versions.electron=="string"?(_t.push("Node "+Ye.versions.node),Ke="Electron",Se=Ye.versions.electron):typeof Ye.versions.nw=="string"&&(_t.push("Chromium "+Se,"Node "+Ye.versions.node),Ke="NW.js",Se=Ye.versions.nw)),Ke||(Ke="Node.js",gt=Ye.arch,we=Ye.platform,Se=/[\d.]+/.exec(Ye.version),Se=Se?Se[0]:null));else b(Ye=Xe.runtime)==ze?(Ke="Adobe AIR",we=Ye.flash.system.Capabilities.os):b(Ye=Xe.phantom)==nt?(Ke="PhantomJS",Se=(Ye=Ye.version||null)&&Ye.major+"."+Ye.minor+"."+Ye.patch):typeof dt.documentMode=="number"&&(Ye=/\bTrident\/(\d+)/i.exec(je))?(Se=[Se,dt.documentMode],(Ye=+Ye[1]+4)!=Se[1]&&(_t.push("IE "+Se[1]+" mode"),Be&&(Be[1]=""),Se[1]=Ye),Se=Ke=="IE"?String(Se[1].toFixed(1)):Se[0]):typeof dt.documentMode=="number"&&/^(?:Chrome|Firefox)\b/.test(Ke)&&(_t.push("masking as "+Ke+" "+Se),Ke="IE",Se="11.0",Be=["Trident"],we="Windows");we=we&&ne(we)}if(Se&&(Ye=/(?:[ab]|dp|pre|[ab]\d+pre)(?:\d+\+?)?$/i.exec(Se)||/(?:alpha|beta)(?: ?\d)?/i.exec(je+";"+(Ae&&He.appMinorVersion))||/\bMinefield\b/i.test(je)&&"a")&&(We=/b/i.test(Ye)?"beta":"alpha",Se=Se.replace(RegExp(Ye+"\\+?$"),"")+(We=="beta"?It:ct)+(/\d+\+?/.exec(Ye)||"")),Ke=="Fennec"||Ke=="Firefox"&&/\b(?:Android|Firefox OS)\b/.test(we))Ke="Firefox Mobile";else if(Ke=="Maxthon"&&Se)Se=Se.replace(/\.[\d.]+/,".x");else if(/\bXbox\b/i.test(Ne))Ne=="Xbox 360"&&(we=null),Ne=="Xbox 360"&&/\bIEMobile\b/.test(je)&&_t.unshift("mobile mode");else if(!/^(?:Chrome|IE|Opera)$/.test(Ke)&&(!Ke||Ne||/Browser|Mobi/.test(Ke))||we!="Windows CE"&&!/Mobi/i.test(je))if(Ke=="IE"&&Ae)try{Xe.external===null&&_t.unshift("platform preview")}catch(Ue){_t.unshift("embedded")}else(/\bBlackBerry\b/.test(Ne)||/\bBB10\b/.test(je))&&(Ye=(RegExp(Ne.replace(/ +/g," *")+"/([.\\d]+)","i").exec(je)||0)[1]||Se)?(Ye=[Ye,/BB10/.test(je)],we=(Ye[1]?(Ne=null,De="BlackBerry"):"Device Software")+" "+Ye[0],Se=null):this!=E&&Ne!="Wii"&&(Ae&&Mt||/Opera/.test(Ke)&&/\b(?:MSIE|Firefox)\b/i.test(je)||Ke=="Firefox"&&/\bOS X (?:\d+\.){2,}/.test(we)||Ke=="IE"&&(we&&!/^Win/.test(we)&&Se>5.5||/\bWindows XP\b/.test(we)&&Se>8||Se==8&&!/\bTrident\b/.test(je)))&&!pe.test(Ye=oe.call(E,je.replace(pe,"")+";"))&&Ye.name&&(Ye="ing as "+Ye.name+((Ye=Ye.version)?" "+Ye:""),pe.test(Ke)?(/\bIE\b/.test(Ye)&&we=="Mac OS"&&(we=null),Ye="identify"+Ye):(Ye="mask"+Ye,Ke=xt?ne(xt.replace(/([a-z])([A-Z])/g,"$1 $2")):"Opera",/\bIE\b/.test(Ye)&&(we=null),Ae||(Se=null)),Be=["Presto"],_t.push(Ye));else Ke+=" Mobile";(Ye=(/\bAppleWebKit\/([\d.]+\+?)/i.exec(je)||0)[1])&&(Ye=[parseFloat(Ye.replace(/\.(\d)$/,".0$1")),Ye],Ke=="Safari"&&Ye[1].slice(-1)=="+"?(Ke="WebKit Nightly",We="alpha",Se=Ye[1].slice(0,-1)):Se!=Ye[1]&&Se!=(Ye[2]=(/\bSafari\/([\d.]+\+?)/i.exec(je)||0)[1])||(Se=null),Ye[1]=(/\bChrome\/([\d.]+)/i.exec(je)||0)[1],Ye[0]==537.36&&Ye[2]==537.36&&parseFloat(Ye[1])>=28&&Be=="WebKit"&&(Be=["Blink"]),Ae&&(Ge||Ye[1])?(Be&&(Be[1]="like Chrome"),Ye=Ye[1]||(Ye=Ye[0],Ye<530?1:Ye<532?2:Ye<532.05?3:Ye<533?4:Ye<534.03?5:Ye<534.07?6:Ye<534.1?7:Ye<534.13?8:Ye<534.16?9:Ye<534.24?10:Ye<534.3?11:Ye<535.01?12:Ye<535.02?"13+":Ye<535.07?15:Ye<535.11?16:Ye<535.19?17:Ye<536.05?18:Ye<536.1?19:Ye<537.01?20:Ye<537.11?"21+":Ye<537.13?23:Ye<537.18?24:Ye<537.24?25:Ye<537.36?26:Be!="Blink"?"27":"28")):(Be&&(Be[1]="like Safari"),Ye=Ye[0],Ye=Ye<400?1:Ye<500?2:Ye<526?3:Ye<533?4:Ye<534?"4+":Ye<535?5:Ye<537?6:Ye<538?7:Ye<601?8:"8"),Be&&(Be[1]+=" "+(Ye+=typeof Ye=="number"?".x":/[.+]/.test(Ye)?"":"+")),Ke=="Safari"&&(!Se||parseInt(Se)>45)&&(Se=Ye)),Ke=="Opera"&&(Ye=/\bzbov|zvav$/.exec(we))?(Ke+=" ",_t.unshift("desktop mode"),Ye=="zvav"?(Ke+="Mini",Se=null):Ke+="Mobile",we=we.replace(RegExp(" *"+Ye+"$"),"")):Ke=="Safari"&&/\bChrome\b/.exec(Be&&Be[1])&&(_t.unshift("desktop mode"),Ke="Chrome Mobile",Se=null,/\bOS X\b/.test(we)?(De="Apple",we="iOS 4.3+"):we=null),Se&&Se.indexOf(Ye=/[\d.]+$/.exec(we))==0&&je.indexOf("/"+Ye+"-")>-1&&(we=ae(we.replace(Ye,""))),Be&&!/\b(?:Avant|Nook)\b/.test(Ke)&&(/Browser|Lunascape|Maxthon/.test(Ke)||Ke!="Safari"&&/^iOS/.test(we)&&/\bSafari\b/.test(Be[1])||/^(?:Adobe|Arora|Breach|Midori|Opera|Phantom|Rekonq|Rock|Samsung Internet|Sleipnir|Web)/.test(Ke)&&Be[1])&&(Ye=Be[Be.length-1])&&_t.push(Ye),_t.length&&(_t=["("+_t.join("; ")+")"]),De&&Ne&&Ne.indexOf(De)<0&&_t.push("on "+De),Ne&&_t.push((/^on /.test(_t[_t.length-1])?"":"on ")+Ne),we&&(Ye=/ ([\d.+]+)$/.exec(we),ut=Ye&&we.charAt(we.length-Ye[0].length-1)=="/",we={architecture:32,family:Ye&&!ut?we.replace(Ye[0],""):we,version:Ye?Ye[1]:null,toString:function(){var Ue=this.version;return this.family+(Ue&&!ut?" "+Ue:"")+(this.architecture==64?" 64-bit":"")}}),(Ye=/\b(?:AMD|IA|Win|WOW|x86_|x)64\b/i.exec(gt))&&!/\bi686\b/i.test(gt)?(we&&(we.architecture=64,we.family=we.family.replace(RegExp(" *"+Ye),"")),Ke&&(/\bWOW64\b/i.test(je)||Ae&&/\w(?:86|32)$/.test(He.cpuClass||He.platform)&&!/\bWin64; x64\b/i.test(je))&&_t.unshift("32-bit")):we&&/^OS X/.test(we.family)&&Ke=="Chrome"&&parseFloat(Se)>=39&&(we.architecture=64),je||(je=null);var Le={};return Le.description=je,Le.layout=Be&&Be[0],Le.manufacturer=De,Le.name=Ke,Le.prerelease=We,Le.product=Ne,Le.ua=je,Le.version=Ke&&Se,Le.os=we||{architecture:null,family:null,version:null,toString:function(){return"null"}},Le.parse=oe,Le.toString=Qe,Le.version&&_t.unshift(Se),Le.name&&_t.unshift(Ke),we&&Ke&&(we!=String(we).split(" ")[0]||we!=Ke.split(" ")[0]&&!Ne)&&_t.push(Ne?"("+we+")":"on "+we),_t.length&&(Le.description=_t.join(" ")),Le}var ve={function:!0,object:!0},ye=ve[typeof window]&&window||this,me=ve[typeof ue]&&ue,ge=ve[typeof Ce]&&Ce&&!Ce.nodeType&&Ce,_e=me&&ge&&typeof se=="object"&&se;!_e||_e.global!==_e&&_e.window!==_e&&_e.self!==_e||(ye=_e);var he=Math.pow(2,53)-1,pe=/\bOpera/,ke=Object.prototype,Te=ke.hasOwnProperty,Ee=ke.toString,Oe=oe();typeof ce=="function"&&typeof ce.amd=="object"&&ce.amd?(ye.platform=Oe,ce(function(){return Oe})):me&&ge?E(Oe,function(je,Pe){me[Pe]=je}):ye.platform=Oe}).call(this)}).call(this,typeof be.g!="undefined"?be.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],172:[function(ie,Ce,ue){(function(se){"use strict";function te(le,ee,ne,E){if(typeof le!="function")throw new TypeError('"callback" argument must be a function');var b,z,x=arguments.length;switch(x){case 0:case 1:return se.nextTick(le);case 2:return se.nextTick(function(){le.call(null,ee)});case 3:return se.nextTick(function(){le.call(null,ee,ne)});case 4:return se.nextTick(function(){le.call(null,ee,ne,E)});default:for(b=new Array(x-1),z=0;z<b.length;)b[z++]=arguments[z];return se.nextTick(function(){le.apply(null,b)})}}!se.version||se.version.indexOf("v0.")===0||se.version.indexOf("v1.")===0&&se.version.indexOf("v1.8.")!==0?Ce.exports={nextTick:te}:Ce.exports=se}).call(this,ie("_process"))},{_process:173}],173:[function(ie,Ce,ue){function se(){throw new Error("setTimeout has not been defined")}function te(){throw new Error("clearTimeout has not been defined")}function le(ge){if(x===setTimeout)return setTimeout(ge,0);if((x===se||!x)&&setTimeout)return x=setTimeout,setTimeout(ge,0);try{return x(ge,0)}catch(_e){try{return x.call(null,ge,0)}catch(he){return x.call(this,ge,0)}}}function ee(ge){if(re===clearTimeout)return clearTimeout(ge);if((re===te||!re)&&clearTimeout)return re=clearTimeout,clearTimeout(ge);try{return re(ge)}catch(_e){try{return re.call(null,ge)}catch(he){return re.call(this,ge)}}}function ne(){ye&&oe&&(ye=!1,oe.length?ve=oe.concat(ve):me=-1,ve.length&&E())}function E(){if(!ye){var ge=le(ne);ye=!0;for(var _e=ve.length;_e;){for(oe=ve,ve=[];++me<_e;)oe&&oe[me].run();me=-1,_e=ve.length}oe=null,ye=!1,ee(ge)}}function b(ge,_e){this.fun=ge,this.array=_e}function z(){}var x,re,ae=Ce.exports={};(function(){try{x=typeof setTimeout=="function"?setTimeout:se}catch(ge){x=se}try{re=typeof clearTimeout=="function"?clearTimeout:te}catch(ge){re=te}})();var oe,ve=[],ye=!1,me=-1;ae.nextTick=function(ge){var _e=new Array(arguments.length-1);if(arguments.length>1)for(var he=1;he<arguments.length;he++)_e[he-1]=arguments[he];ve.push(new b(ge,_e)),ve.length!==1||ye||le(E)},b.prototype.run=function(){this.fun.apply(null,this.array)},ae.title="browser",ae.browser=!0,ae.env={},ae.argv=[],ae.version="",ae.versions={},ae.on=z,ae.addListener=z,ae.once=z,ae.off=z,ae.removeListener=z,ae.removeAllListeners=z,ae.emit=z,ae.prependListener=z,ae.prependOnceListener=z,ae.listeners=function(ge){return[]},ae.binding=function(ge){throw new Error("process.binding is not supported")},ae.cwd=function(){return"/"},ae.chdir=function(ge){throw new Error("process.chdir is not supported")},ae.umask=function(){return 0}},{}],174:[function(ie,Ce,ue){(function(se){(function(te){function le($e){throw new RangeError(ut[$e])}function ee($e,nt){for(var et=$e.length,pt=[];et--;)pt[et]=nt($e[et]);return pt}function ne($e,nt){var et=$e.split("@"),pt="";return et.length>1&&(pt=et[0]+"@",$e=et[1]),$e=$e.replace(Ye,"."),pt+ee($e.split("."),nt).join(".")}function E($e){for(var nt,et,pt=[],ct=0,It=$e.length;ct<It;)nt=$e.charCodeAt(ct++),nt>=55296&&nt<=56319&&ct<It?(et=$e.charCodeAt(ct++),(64512&et)==56320?pt.push(((1023&nt)<<10)+(1023&et)+65536):(pt.push(nt),ct--)):pt.push(nt);return pt}function b($e){return ee($e,function(nt){var et="";return nt>65535&&(nt-=65536,et+=Ve(nt>>>10&1023|55296),nt=56320|1023&nt),et+=Ve(nt)}).join("")}function z($e){return $e-48<10?$e-22:$e-65<26?$e-65:$e-97<26?$e-97:Te}function x($e,nt){return $e+22+75*($e<26)-((nt!=0)<<5)}function re($e,nt,et){var pt=0;for($e=et?ze($e/Pe):$e>>1,$e+=ze($e/nt);$e>Ge*Oe>>1;pt+=Te)$e=ze($e/Ge);return ze(pt+(Ge+1)*$e/($e+je))}function ae($e){var nt,et,pt,ct,It,dt,Mt,xt,gt,_t,We=[],Ae=$e.length,Se=0,Be=Xe,Ke=Qe;for(et=$e.lastIndexOf(ot),et<0&&(et=0),pt=0;pt<et;++pt)$e.charCodeAt(pt)>=128&&le("not-basic"),We.push($e.charCodeAt(pt));for(ct=et>0?et+1:0;ct<Ae;){for(It=Se,dt=1,Mt=Te;ct>=Ae&&le("invalid-input"),xt=z($e.charCodeAt(ct++)),(xt>=Te||xt>ze((ke-Se)/dt))&&le("overflow"),Se+=xt*dt,gt=Mt<=Ke?Ee:Mt>=Ke+Oe?Oe:Mt-Ke,!(xt<gt);Mt+=Te)_t=Te-gt,dt>ze(ke/_t)&&le("overflow"),dt*=_t;nt=We.length+1,Ke=re(Se-It,nt,It==0),ze(Se/nt)>ke-Be&&le("overflow"),Be+=ze(Se/nt),Se%=nt,We.splice(Se++,0,Be)}return b(We)}function oe($e){var nt,et,pt,ct,It,dt,Mt,xt,gt,_t,We,Ae,Se,Be,Ke,Ne=[];for($e=E($e),Ae=$e.length,nt=Xe,et=0,It=Qe,dt=0;dt<Ae;++dt)(We=$e[dt])<128&&Ne.push(Ve(We));for(pt=ct=Ne.length,ct&&Ne.push(ot);pt<Ae;){for(Mt=ke,dt=0;dt<Ae;++dt)(We=$e[dt])>=nt&&We<Mt&&(Mt=We);for(Se=pt+1,Mt-nt>ze((ke-et)/Se)&&le("overflow"),et+=(Mt-nt)*Se,nt=Mt,dt=0;dt<Ae;++dt)if(We=$e[dt],We<nt&&++et>ke&&le("overflow"),We==nt){for(xt=et,gt=Te;_t=gt<=It?Ee:gt>=It+Oe?Oe:gt-It,!(xt<_t);gt+=Te)Ke=xt-_t,Be=Te-_t,Ne.push(Ve(x(_t+Ke%Be,0))),xt=ze(Ke/Be);Ne.push(Ve(x(xt,0))),It=re(et,Se,pt==ct),et=0,++pt}++et,++nt}return Ne.join("")}function ve($e){return ne($e,function(nt){return He.test(nt)?ae(nt.slice(4).toLowerCase()):nt})}function ye($e){return ne($e,function(nt){return rt.test(nt)?"xn--"+oe(nt):nt})}var me=typeof ue=="object"&&ue&&!ue.nodeType&&ue,ge=typeof Ce=="object"&&Ce&&!Ce.nodeType&&Ce,_e=typeof se=="object"&&se;_e.global!==_e&&_e.window!==_e&&_e.self!==_e||(te=_e);var he,pe,ke=2147483647,Te=36,Ee=1,Oe=26,je=38,Pe=700,Qe=72,Xe=128,ot="-",He=/^xn--/,rt=/[^\x20-\x7E]/,Ye=/[\x2E\u3002\uFF0E\uFF61]/g,ut={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},Ge=Te-Ee,ze=Math.floor,Ve=String.fromCharCode;if(he={version:"1.4.1",ucs2:{decode:E,encode:b},decode:ae,encode:oe,toASCII:ye,toUnicode:ve},typeof ce=="function"&&typeof ce.amd=="object"&&ce.amd)ce("punycode",function(){return he});else if(me&&ge)if(Ce.exports==me)ge.exports=he;else for(pe in he)he.hasOwnProperty(pe)&&(me[pe]=he[pe]);else te.punycode=he})(this)}).call(this,typeof be.g!="undefined"?be.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],175:[function(ie,Ce,ue){"use strict";function se(le,ee){return Object.prototype.hasOwnProperty.call(le,ee)}Ce.exports=function(le,ee,ne,E){ee=ee||"&",ne=ne||"=";var b={};if(typeof le!="string"||le.length===0)return b;var z=/\+/g;le=le.split(ee);var x=1e3;E&&typeof E.maxKeys=="number"&&(x=E.maxKeys);var re=le.length;x>0&&re>x&&(re=x);for(var ae=0;ae<re;++ae){var oe,ve,ye,me,ge=le[ae].replace(z,"%20"),_e=ge.indexOf(ne);_e>=0?(oe=ge.substr(0,_e),ve=ge.substr(_e+1)):(oe=ge,ve=""),ye=decodeURIComponent(oe),me=decodeURIComponent(ve),se(b,ye)?te(b[ye])?b[ye].push(me):b[ye]=[b[ye],me]:b[ye]=me}return b};var te=Array.isArray||function(le){return Object.prototype.toString.call(le)==="[object Array]"}},{}],176:[function(ie,Ce,ue){"use strict";function se(ne,E){if(ne.map)return ne.map(E);for(var b=[],z=0;z<ne.length;z++)b.push(E(ne[z],z));return b}var te=function(ne){switch(typeof ne){case"string":return ne;case"boolean":return ne?"true":"false";case"number":return isFinite(ne)?ne:"";default:return""}};Ce.exports=function(ne,E,b,z){return E=E||"&",b=b||"=",ne===null&&(ne=void 0),typeof ne=="object"?se(ee(ne),function(x){var re=encodeURIComponent(te(x))+b;return le(ne[x])?se(ne[x],function(ae){return re+encodeURIComponent(te(ae))}).join(E):re+encodeURIComponent(te(ne[x]))}).join(E):z?encodeURIComponent(te(z))+b+encodeURIComponent(te(ne)):""};var le=Array.isArray||function(ne){return Object.prototype.toString.call(ne)==="[object Array]"},ee=Object.keys||function(ne){var E=[];for(var b in ne)Object.prototype.hasOwnProperty.call(ne,b)&&E.push(b);return E}},{}],177:[function(ie,Ce,ue){"use strict";ue.decode=ue.parse=ie("./decode"),ue.encode=ue.stringify=ie("./encode")},{"./decode":175,"./encode":176}],178:[function(ie,Ce,ue){Ce.exports=ie("./lib/_stream_duplex.js")},{"./lib/_stream_duplex.js":179}],179:[function(ie,Ce,ue){"use strict";function se(ye){if(!(this instanceof se))return new se(ye);x.call(this,ye),re.call(this,ye),ye&&ye.readable===!1&&(this.readable=!1),ye&&ye.writable===!1&&(this.writable=!1),this.allowHalfOpen=!0,ye&&ye.allowHalfOpen===!1&&(this.allowHalfOpen=!1),this.once("end",te)}function te(){this.allowHalfOpen||this._writableState.ended||E.nextTick(le,this)}function le(ye){ye.end()}var ee=ie("babel-runtime/core-js/object/keys"),ne=function(ye){return ye&&ye.__esModule?ye:{default:ye}}(ee),E=ie("process-nextick-args"),b=ne.default||function(ye){var me=[];for(var ge in ye)me.push(ge);return me};Ce.exports=se;var z=ie("core-util-is");z.inherits=ie("inherits");var x=ie("./_stream_readable"),re=ie("./_stream_writable");z.inherits(se,x);for(var ae=b(re.prototype),oe=0;oe<ae.length;oe++){var ve=ae[oe];se.prototype[ve]||(se.prototype[ve]=re.prototype[ve])}Object.defineProperty(se.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(se.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._writableState!==void 0&&this._readableState.destroyed&&this._writableState.destroyed},set:function(ye){this._readableState!==void 0&&this._writableState!==void 0&&(this._readableState.destroyed=ye,this._writableState.destroyed=ye)}}),se.prototype._destroy=function(ye,me){this.push(null),this.end(),E.nextTick(me,ye)}},{"./_stream_readable":181,"./_stream_writable":183,"babel-runtime/core-js/object/keys":23,"core-util-is":153,inherits:162,"process-nextick-args":172}],180:[function(ie,Ce,ue){"use strict";function se(ee){if(!(this instanceof se))return new se(ee);te.call(this,ee)}Ce.exports=se;var te=ie("./_stream_transform"),le=ie("core-util-is");le.inherits=ie("inherits"),le.inherits(se,te),se.prototype._transform=function(ee,ne,E){E(null,ee)}},{"./_stream_transform":182,"core-util-is":153,inherits:162}],181:[function(ie,Ce,ue){(function(se,te){"use strict";function le(Ae){return et.from(Ae)}function ee(Ae){return et.isBuffer(Ae)||Ae instanceof pt}function ne(Ae,Se,Be){if(typeof Ae.prependListener=="function")return Ae.prependListener(Se,Be);Ae._events&&Ae._events[Se]?Ve(Ae._events[Se])?Ae._events[Se].unshift(Be):Ae._events[Se]=[Be,Ae._events[Se]]:Ae.on(Se,Be)}function E(Ae,Se){ze=ze||ie("./_stream_duplex"),Ae=Ae||{};var Be=Se instanceof ze;this.objectMode=!!Ae.objectMode,Be&&(this.objectMode=this.objectMode||!!Ae.readableObjectMode);var Ke=Ae.highWaterMark,Ne=Ae.readableHighWaterMark,De=this.objectMode?16:16384;this.highWaterMark=Ke||Ke===0?Ke:Be&&(Ne||Ne===0)?Ne:De,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new xt,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=Ae.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,Ae.encoding&&(Mt||(Mt=ie("string_decoder/").StringDecoder),this.decoder=new Mt(Ae.encoding),this.encoding=Ae.encoding)}function b(Ae){if(ze=ze||ie("./_stream_duplex"),!(this instanceof b))return new b(Ae);this._readableState=new E(Ae,this),this.readable=!0,Ae&&(typeof Ae.read=="function"&&(this._read=Ae.read),typeof Ae.destroy=="function"&&(this._destroy=Ae.destroy)),nt.call(this)}function z(Ae,Se,Be,Ke,Ne){var De=Ae._readableState;if(Se===null)De.reading=!1,ye(Ae,De);else{var we;Ne||(we=re(De,Se)),we?Ae.emit("error",we):De.objectMode||Se&&Se.length>0?(typeof Se=="string"||De.objectMode||(0,ut.default)(Se)===et.prototype||(Se=le(Se)),Ke?De.endEmitted?Ae.emit("error",new Error("stream.unshift() after end event")):x(Ae,De,Se,!0):De.ended?Ae.emit("error",new Error("stream.push() after EOF")):(De.reading=!1,De.decoder&&!Be?(Se=De.decoder.write(Se),De.objectMode||Se.length!==0?x(Ae,De,Se,!1):_e(Ae,De)):x(Ae,De,Se,!1))):Ke||(De.reading=!1)}return ae(De)}function x(Ae,Se,Be,Ke){Se.flowing&&Se.length===0&&!Se.sync?(Ae.emit("data",Be),Ae.read(0)):(Se.length+=Se.objectMode?1:Be.length,Ke?Se.buffer.unshift(Be):Se.buffer.push(Be),Se.needReadable&&me(Ae)),_e(Ae,Se)}function re(Ae,Se){var Be;return ee(Se)||typeof Se=="string"||Se===void 0||Ae.objectMode||(Be=new TypeError("Invalid non-string/buffer chunk")),Be}function ae(Ae){return!Ae.ended&&(Ae.needReadable||Ae.length<Ae.highWaterMark||Ae.length===0)}function oe(Ae){return Ae>=We?Ae=We:(Ae--,Ae|=Ae>>>1,Ae|=Ae>>>2,Ae|=Ae>>>4,Ae|=Ae>>>8,Ae|=Ae>>>16,Ae++),Ae}function ve(Ae,Se){return Ae<=0||Se.length===0&&Se.ended?0:Se.objectMode?1:Ae!==Ae?Se.flowing&&Se.length?Se.buffer.head.data.length:Se.length:(Ae>Se.highWaterMark&&(Se.highWaterMark=oe(Ae)),Ae<=Se.length?Ae:Se.ended?Se.length:(Se.needReadable=!0,0))}function ye(Ae,Se){if(!Se.ended){if(Se.decoder){var Be=Se.decoder.end();Be&&Be.length&&(Se.buffer.push(Be),Se.length+=Se.objectMode?1:Be.length)}Se.ended=!0,me(Ae)}}function me(Ae){var Se=Ae._readableState;Se.needReadable=!1,Se.emittedReadable||(dt("emitReadable",Se.flowing),Se.emittedReadable=!0,Se.sync?Ge.nextTick(ge,Ae):ge(Ae))}function ge(Ae){dt("emit readable"),Ae.emit("readable"),Oe(Ae)}function _e(Ae,Se){Se.readingMore||(Se.readingMore=!0,Ge.nextTick(he,Ae,Se))}function he(Ae,Se){for(var Be=Se.length;!Se.reading&&!Se.flowing&&!Se.ended&&Se.length<Se.highWaterMark&&(dt("maybeReadMore read 0"),Ae.read(0),Be!==Se.length);)Be=Se.length;Se.readingMore=!1}function pe(Ae){return function(){var Se=Ae._readableState;dt("pipeOnDrain",Se.awaitDrain),Se.awaitDrain&&Se.awaitDrain--,Se.awaitDrain===0&&$e(Ae,"data")&&(Se.flowing=!0,Oe(Ae))}}function ke(Ae){dt("readable nexttick read 0"),Ae.read(0)}function Te(Ae,Se){Se.resumeScheduled||(Se.resumeScheduled=!0,Ge.nextTick(Ee,Ae,Se))}function Ee(Ae,Se){Se.reading||(dt("resume read 0"),Ae.read(0)),Se.resumeScheduled=!1,Se.awaitDrain=0,Ae.emit("resume"),Oe(Ae),Se.flowing&&!Se.reading&&Ae.read(0)}function Oe(Ae){var Se=Ae._readableState;for(dt("flow",Se.flowing);Se.flowing&&Ae.read()!==null;);}function je(Ae,Se){if(Se.length===0)return null;var Be;return Se.objectMode?Be=Se.buffer.shift():!Ae||Ae>=Se.length?(Be=Se.decoder?Se.buffer.join(""):Se.buffer.length===1?Se.buffer.head.data:Se.buffer.concat(Se.length),Se.buffer.clear()):Be=Pe(Ae,Se.buffer,Se.decoder),Be}function Pe(Ae,Se,Be){var Ke;return Ae<Se.head.data.length?(Ke=Se.head.data.slice(0,Ae),Se.head.data=Se.head.data.slice(Ae)):Ke=Ae===Se.head.data.length?Se.shift():Be?Qe(Ae,Se):Xe(Ae,Se),Ke}function Qe(Ae,Se){var Be=Se.head,Ke=1,Ne=Be.data;for(Ae-=Ne.length;Be=Be.next;){var De=Be.data,we=Ae>De.length?De.length:Ae;if(we===De.length?Ne+=De:Ne+=De.slice(0,Ae),(Ae-=we)===0){we===De.length?(++Ke,Be.next?Se.head=Be.next:Se.head=Se.tail=null):(Se.head=Be,Be.data=De.slice(we));break}++Ke}return Se.length-=Ke,Ne}function Xe(Ae,Se){var Be=et.allocUnsafe(Ae),Ke=Se.head,Ne=1;for(Ke.data.copy(Be),Ae-=Ke.data.length;Ke=Ke.next;){var De=Ke.data,we=Ae>De.length?De.length:Ae;if(De.copy(Be,Be.length-Ae,0,we),(Ae-=we)===0){we===De.length?(++Ne,Ke.next?Se.head=Ke.next:Se.head=Se.tail=null):(Se.head=Ke,Ke.data=De.slice(we));break}++Ne}return Se.length-=Ne,Be}function ot(Ae){var Se=Ae._readableState;if(Se.length>0)throw new Error('"endReadable()" called on non-empty stream');Se.endEmitted||(Se.ended=!0,Ge.nextTick(He,Se,Ae))}function He(Ae,Se){Ae.endEmitted||Ae.length!==0||(Ae.endEmitted=!0,Se.readable=!1,Se.emit("end"))}function rt(Ae,Se){for(var Be=0,Ke=Ae.length;Be<Ke;Be++)if(Ae[Be]===Se)return Be;return-1}var Ye=ie("babel-runtime/core-js/object/get-prototype-of"),ut=function(Ae){return Ae&&Ae.__esModule?Ae:{default:Ae}}(Ye),Ge=ie("process-nextick-args");Ce.exports=b;var ze,Ve=ie("isarray");b.ReadableState=E;var $e=(ie("events").EventEmitter,function(Ae,Se){return Ae.listeners(Se).length}),nt=ie("./internal/streams/stream"),et=ie("safe-buffer").Buffer,pt=te.Uint8Array||function(){},ct=ie("core-util-is");ct.inherits=ie("inherits");var It=ie("util"),dt=void 0;dt=It&&It.debuglog?It.debuglog("stream"):function(){};var Mt,xt=ie("./internal/streams/BufferList"),gt=ie("./internal/streams/destroy");ct.inherits(b,nt);var _t=["error","close","destroy","pause","resume"];Object.defineProperty(b.prototype,"destroyed",{get:function(){return this._readableState!==void 0&&this._readableState.destroyed},set:function(Ae){this._readableState&&(this._readableState.destroyed=Ae)}}),b.prototype.destroy=gt.destroy,b.prototype._undestroy=gt.undestroy,b.prototype._destroy=function(Ae,Se){this.push(null),Se(Ae)},b.prototype.push=function(Ae,Se){var Be,Ke=this._readableState;return Ke.objectMode?Be=!0:typeof Ae=="string"&&(Se=Se||Ke.defaultEncoding,Se!==Ke.encoding&&(Ae=et.from(Ae,Se),Se=""),Be=!0),z(this,Ae,Se,!1,Be)},b.prototype.unshift=function(Ae){return z(this,Ae,null,!0,!1)},b.prototype.isPaused=function(){return this._readableState.flowing===!1},b.prototype.setEncoding=function(Ae){return Mt||(Mt=ie("string_decoder/").StringDecoder),this._readableState.decoder=new Mt(Ae),this._readableState.encoding=Ae,this};var We=8388608;b.prototype.read=function(Ae){dt("read",Ae),Ae=parseInt(Ae,10);var Se=this._readableState,Be=Ae;if(Ae!==0&&(Se.emittedReadable=!1),Ae===0&&Se.needReadable&&(Se.length>=Se.highWaterMark||Se.ended))return dt("read: emitReadable",Se.length,Se.ended),Se.length===0&&Se.ended?ot(this):me(this),null;if((Ae=ve(Ae,Se))===0&&Se.ended)return Se.length===0&&ot(this),null;var Ke=Se.needReadable;dt("need readable",Ke),(Se.length===0||Se.length-Ae<Se.highWaterMark)&&(Ke=!0,dt("length less than watermark",Ke)),Se.ended||Se.reading?(Ke=!1,dt("reading or ended",Ke)):Ke&&(dt("do read"),Se.reading=!0,Se.sync=!0,Se.length===0&&(Se.needReadable=!0),this._read(Se.highWaterMark),Se.sync=!1,Se.reading||(Ae=ve(Be,Se)));var Ne;return Ne=Ae>0?je(Ae,Se):null,Ne===null?(Se.needReadable=!0,Ae=0):Se.length-=Ae,Se.length===0&&(Se.ended||(Se.needReadable=!0),Be!==Ae&&Se.ended&&ot(this)),Ne!==null&&this.emit("data",Ne),Ne},b.prototype._read=function(Ae){this.emit("error",new Error("_read() is not implemented"))},b.prototype.pipe=function(Ae,Se){function Be(zt,Ft){dt("onunpipe"),zt===Re&&Ft&&Ft.hasUnpiped===!1&&(Ft.hasUnpiped=!0,Ne())}function Ke(){dt("onend"),Ae.end()}function Ne(){dt("cleanup"),Ae.removeListener("close",Le),Ae.removeListener("finish",Ue),Ae.removeListener("drain",Ct),Ae.removeListener("error",we),Ae.removeListener("unpipe",Be),Re.removeListener("end",Ke),Re.removeListener("end",Me),Re.removeListener("data",De),vt=!0,!tt.awaitDrain||Ae._writableState&&!Ae._writableState.needDrain||Ct()}function De(zt){dt("ondata"),Ot=!1,Ae.write(zt)!==!1||Ot||((tt.pipesCount===1&&tt.pipes===Ae||tt.pipesCount>1&&rt(tt.pipes,Ae)!==-1)&&!vt&&(dt("false write response, pause",Re._readableState.awaitDrain),Re._readableState.awaitDrain++,Ot=!0),Re.pause())}function we(zt){dt("onerror",zt),Me(),Ae.removeListener("error",we),$e(Ae,"error")===0&&Ae.emit("error",zt)}function Le(){Ae.removeListener("finish",Ue),Me()}function Ue(){dt("onfinish"),Ae.removeListener("close",Le),Me()}function Me(){dt("unpipe"),Re.unpipe(Ae)}var Re=this,tt=this._readableState;switch(tt.pipesCount){case 0:tt.pipes=Ae;break;case 1:tt.pipes=[tt.pipes,Ae];break;default:tt.pipes.push(Ae)}tt.pipesCount+=1,dt("pipe count=%d opts=%j",tt.pipesCount,Se);var lt=(!Se||Se.end!==!1)&&Ae!==se.stdout&&Ae!==se.stderr,Pt=lt?Ke:Me;tt.endEmitted?Ge.nextTick(Pt):Re.once("end",Pt),Ae.on("unpipe",Be);var Ct=pe(Re);Ae.on("drain",Ct);var vt=!1,Ot=!1;return Re.on("data",De),ne(Ae,"error",we),Ae.once("close",Le),Ae.once("finish",Ue),Ae.emit("pipe",Re),tt.flowing||(dt("pipe resume"),Re.resume()),Ae},b.prototype.unpipe=function(Ae){var Se=this._readableState,Be={hasUnpiped:!1};if(Se.pipesCount===0)return this;if(Se.pipesCount===1)return Ae&&Ae!==Se.pipes?this:(Ae||(Ae=Se.pipes),Se.pipes=null,Se.pipesCount=0,Se.flowing=!1,Ae&&Ae.emit("unpipe",this,Be),this);if(!Ae){var Ke=Se.pipes,Ne=Se.pipesCount;Se.pipes=null,Se.pipesCount=0,Se.flowing=!1;for(var De=0;De<Ne;De++)Ke[De].emit("unpipe",this,Be);return this}var we=rt(Se.pipes,Ae);return we===-1?this:(Se.pipes.splice(we,1),Se.pipesCount-=1,Se.pipesCount===1&&(Se.pipes=Se.pipes[0]),Ae.emit("unpipe",this,Be),this)},b.prototype.on=function(Ae,Se){var Be=nt.prototype.on.call(this,Ae,Se);if(Ae==="data")this._readableState.flowing!==!1&&this.resume();else if(Ae==="readable"){var Ke=this._readableState;Ke.endEmitted||Ke.readableListening||(Ke.readableListening=Ke.needReadable=!0,Ke.emittedReadable=!1,Ke.reading?Ke.length&&me(this):Ge.nextTick(ke,this))}return Be},b.prototype.addListener=b.prototype.on,b.prototype.resume=function(){var Ae=this._readableState;return Ae.flowing||(dt("resume"),Ae.flowing=!0,Te(this,Ae)),this},b.prototype.pause=function(){return dt("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(dt("pause"),this._readableState.flowing=!1,this.emit("pause")),this},b.prototype.wrap=function(Ae){var Se=this,Be=this._readableState,Ke=!1;Ae.on("end",function(){if(dt("wrapped end"),Be.decoder&&!Be.ended){var we=Be.decoder.end();we&&we.length&&Se.push(we)}Se.push(null)}),Ae.on("data",function(we){dt("wrapped data"),Be.decoder&&(we=Be.decoder.write(we)),(!Be.objectMode||we!=null)&&(Be.objectMode||we&&we.length)&&(Se.push(we)||(Ke=!0,Ae.pause()))});for(var Ne in Ae)this[Ne]===void 0&&typeof Ae[Ne]=="function"&&(this[Ne]=function(we){return function(){return Ae[we].apply(Ae,arguments)}}(Ne));for(var De=0;De<_t.length;De++)Ae.on(_t[De],this.emit.bind(this,_t[De]));return this._read=function(we){dt("wrapped _read",we),Ke&&(Ke=!1,Ae.resume())},this},Object.defineProperty(b.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),b._fromList=je}).call(this,ie("_process"),typeof be.g!="undefined"?be.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/BufferList":184,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/get-prototype-of":22,"core-util-is":153,events:158,inherits:162,isarray:166,"process-nextick-args":172,"safe-buffer":193,"string_decoder/":200,util:36}],182:[function(ie,Ce,ue){"use strict";function se(b,z){var x=this._transformState;x.transforming=!1;var re=x.writecb;if(!re)return this.emit("error",new Error("write callback called multiple times"));x.writechunk=null,x.writecb=null,z!=null&&this.push(z),re(b);var ae=this._readableState;ae.reading=!1,(ae.needReadable||ae.length<ae.highWaterMark)&&this._read(ae.highWaterMark)}function te(b){if(!(this instanceof te))return new te(b);ne.call(this,b),this._transformState={afterTransform:se.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,b&&(typeof b.transform=="function"&&(this._transform=b.transform),typeof b.flush=="function"&&(this._flush=b.flush)),this.on("prefinish",le)}function le(){var b=this;typeof this._flush=="function"?this._flush(function(z,x){ee(b,z,x)}):ee(this,null,null)}function ee(b,z,x){if(z)return b.emit("error",z);if(x!=null&&b.push(x),b._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(b._transformState.transforming)throw new Error("Calling transform done when still transforming");return b.push(null)}Ce.exports=te;var ne=ie("./_stream_duplex"),E=ie("core-util-is");E.inherits=ie("inherits"),E.inherits(te,ne),te.prototype.push=function(b,z){return this._transformState.needTransform=!1,ne.prototype.push.call(this,b,z)},te.prototype._transform=function(b,z,x){throw new Error("_transform() is not implemented")},te.prototype._write=function(b,z,x){var re=this._transformState;if(re.writecb=x,re.writechunk=b,re.writeencoding=z,!re.transforming){var ae=this._readableState;(re.needTransform||ae.needReadable||ae.length<ae.highWaterMark)&&this._read(ae.highWaterMark)}},te.prototype._read=function(b){var z=this._transformState;z.writechunk!==null&&z.writecb&&!z.transforming?(z.transforming=!0,this._transform(z.writechunk,z.writeencoding,z.afterTransform)):z.needTransform=!0},te.prototype._destroy=function(b,z){var x=this;ne.prototype._destroy.call(this,b,function(re){z(re),x.emit("close")})}},{"./_stream_duplex":179,"core-util-is":153,inherits:162}],183:[function(ie,Ce,ue){(function(se,te){"use strict";function le(gt){return gt&>.__esModule?gt:{default:gt}}function ee(gt){var _t=this;this.next=null,this.entry=null,this.finish=function(){Qe(_t,gt)}}function ne(gt){return It.from(gt)}function E(gt){return It.isBuffer(gt)||gt instanceof dt}function b(){}function z(gt,_t){$e=$e||ie("./_stream_duplex"),gt=gt||{};var We=_t instanceof $e;this.objectMode=!!gt.objectMode,We&&(this.objectMode=this.objectMode||!!gt.writableObjectMode);var Ae=gt.highWaterMark,Se=gt.writableHighWaterMark,Be=this.objectMode?16:16384;this.highWaterMark=Ae||Ae===0?Ae:We&&(Se||Se===0)?Se:Be,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var Ke=gt.decodeStrings===!1;this.decodeStrings=!Ke,this.defaultEncoding=gt.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(Ne){_e(_t,Ne)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new ee(this)}function x(gt){if($e=$e||ie("./_stream_duplex"),!(xt.call(x,this)||this instanceof $e))return new x(gt);this._writableState=new z(gt,this),this.writable=!0,gt&&(typeof gt.write=="function"&&(this._write=gt.write),typeof gt.writev=="function"&&(this._writev=gt.writev),typeof gt.destroy=="function"&&(this._destroy=gt.destroy),typeof gt.final=="function"&&(this._final=gt.final)),ct.call(this)}function re(gt,_t){var We=new Error("write after end");gt.emit("error",We),Ve.nextTick(_t,We)}function ae(gt,_t,We,Ae){var Se=!0,Be=!1;return We===null?Be=new TypeError("May not write null values to stream"):typeof We=="string"||We===void 0||_t.objectMode||(Be=new TypeError("Invalid non-string/buffer chunk")),Be&&(gt.emit("error",Be),Ve.nextTick(Ae,Be),Se=!1),Se}function oe(gt,_t,We){return gt.objectMode||gt.decodeStrings===!1||typeof _t!="string"||(_t=It.from(_t,We)),_t}function ve(gt,_t,We,Ae,Se,Be){if(!We){var Ke=oe(_t,Ae,Se);Ae!==Ke&&(We=!0,Se="buffer",Ae=Ke)}var Ne=_t.objectMode?1:Ae.length;_t.length+=Ne;var De=_t.length<_t.highWaterMark;if(De||(_t.needDrain=!0),_t.writing||_t.corked){var we=_t.lastBufferedRequest;_t.lastBufferedRequest={chunk:Ae,encoding:Se,isBuf:We,callback:Be,next:null},we?we.next=_t.lastBufferedRequest:_t.bufferedRequest=_t.lastBufferedRequest,_t.bufferedRequestCount+=1}else ye(gt,_t,!1,Ne,Ae,Se,Be);return De}function ye(gt,_t,We,Ae,Se,Be,Ke){_t.writelen=Ae,_t.writecb=Ke,_t.writing=!0,_t.sync=!0,We?gt._writev(Se,_t.onwrite):gt._write(Se,Be,_t.onwrite),_t.sync=!1}function me(gt,_t,We,Ae,Se){--_t.pendingcb,We?(Ve.nextTick(Se,Ae),Ve.nextTick(je,gt,_t),gt._writableState.errorEmitted=!0,gt.emit("error",Ae)):(Se(Ae),gt._writableState.errorEmitted=!0,gt.emit("error",Ae),je(gt,_t))}function ge(gt){gt.writing=!1,gt.writecb=null,gt.length-=gt.writelen,gt.writelen=0}function _e(gt,_t){var We=gt._writableState,Ae=We.sync,Se=We.writecb;if(ge(We),_t)me(gt,We,Ae,_t,Se);else{var Be=Te(We);Be||We.corked||We.bufferProcessing||!We.bufferedRequest||ke(gt,We),Ae?nt(he,gt,We,Be,Se):he(gt,We,Be,Se)}}function he(gt,_t,We,Ae){We||pe(gt,_t),_t.pendingcb--,Ae(),je(gt,_t)}function pe(gt,_t){_t.length===0&&_t.needDrain&&(_t.needDrain=!1,gt.emit("drain"))}function ke(gt,_t){_t.bufferProcessing=!0;var We=_t.bufferedRequest;if(gt._writev&&We&&We.next){var Ae=_t.bufferedRequestCount,Se=new Array(Ae),Be=_t.corkedRequestsFree;Be.entry=We;for(var Ke=0,Ne=!0;We;)Se[Ke]=We,We.isBuf||(Ne=!1),We=We.next,Ke+=1;Se.allBuffers=Ne,ye(gt,_t,!0,_t.length,Se,"",Be.finish),_t.pendingcb++,_t.lastBufferedRequest=null,Be.next?(_t.corkedRequestsFree=Be.next,Be.next=null):_t.corkedRequestsFree=new ee(_t),_t.bufferedRequestCount=0}else{for(;We;){var De=We.chunk,we=We.encoding,Le=We.callback;if(ye(gt,_t,!1,_t.objectMode?1:De.length,De,we,Le),We=We.next,_t.bufferedRequestCount--,_t.writing)break}We===null&&(_t.lastBufferedRequest=null)}_t.bufferedRequest=We,_t.bufferProcessing=!1}function Te(gt){return gt.ending&>.length===0&>.bufferedRequest===null&&!gt.finished&&!gt.writing}function Ee(gt,_t){gt._final(function(We){_t.pendingcb--,We&>.emit("error",We),_t.prefinished=!0,gt.emit("prefinish"),je(gt,_t)})}function Oe(gt,_t){_t.prefinished||_t.finalCalled||(typeof gt._final=="function"?(_t.pendingcb++,_t.finalCalled=!0,Ve.nextTick(Ee,gt,_t)):(_t.prefinished=!0,gt.emit("prefinish")))}function je(gt,_t){var We=Te(_t);return We&&(Oe(gt,_t),_t.pendingcb===0&&(_t.finished=!0,gt.emit("finish"))),We}function Pe(gt,_t,We){_t.ending=!0,je(gt,_t),We&&(_t.finished?Ve.nextTick(We):gt.once("finish",We)),_t.ended=!0,gt.writable=!1}function Qe(gt,_t,We){var Ae=gt.entry;for(gt.entry=null;Ae;){var Se=Ae.callback;_t.pendingcb--,Se(We),Ae=Ae.next}_t.corkedRequestsFree?_t.corkedRequestsFree.next=gt:_t.corkedRequestsFree=gt}var Xe=ie("babel-runtime/core-js/object/define-property"),ot=le(Xe),He=ie("babel-runtime/core-js/symbol/has-instance"),rt=le(He),Ye=ie("babel-runtime/core-js/symbol"),ut=le(Ye),Ge=ie("babel-runtime/core-js/set-immediate"),ze=le(Ge),Ve=ie("process-nextick-args");Ce.exports=x;var $e,nt=!se.browser&&["v0.10","v0.9."].indexOf(se.version.slice(0,5))>-1?ze.default:Ve.nextTick;x.WritableState=z;var et=ie("core-util-is");et.inherits=ie("inherits");var pt={deprecate:ie("util-deprecate")},ct=ie("./internal/streams/stream"),It=ie("safe-buffer").Buffer,dt=te.Uint8Array||function(){},Mt=ie("./internal/streams/destroy");et.inherits(x,ct),z.prototype.getBuffer=function(){for(var gt=this.bufferedRequest,_t=[];gt;)_t.push(gt),gt=gt.next;return _t},function(){try{Object.defineProperty(z.prototype,"buffer",{get:pt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(gt){}}();var xt;typeof ut.default=="function"&&rt.default&&typeof Function.prototype[rt.default]=="function"?(xt=Function.prototype[rt.default],(0,ot.default)(x,rt.default,{value:function(gt){return!!xt.call(this,gt)||this===x&>&>._writableState instanceof z}})):xt=function(gt){return gt instanceof this},x.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},x.prototype.write=function(gt,_t,We){var Ae=this._writableState,Se=!1,Be=!Ae.objectMode&&E(gt);return Be&&!It.isBuffer(gt)&&(gt=ne(gt)),typeof _t=="function"&&(We=_t,_t=null),Be?_t="buffer":_t||(_t=Ae.defaultEncoding),typeof We!="function"&&(We=b),Ae.ended?re(this,We):(Be||ae(this,Ae,gt,We))&&(Ae.pendingcb++,Se=ve(this,Ae,Be,gt,_t,We)),Se},x.prototype.cork=function(){this._writableState.corked++},x.prototype.uncork=function(){var gt=this._writableState;gt.corked&&(gt.corked--,gt.writing||gt.corked||gt.finished||gt.bufferProcessing||!gt.bufferedRequest||ke(this,gt))},x.prototype.setDefaultEncoding=function(gt){if(typeof gt=="string"&&(gt=gt.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((gt+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+gt);return this._writableState.defaultEncoding=gt,this},Object.defineProperty(x.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),x.prototype._write=function(gt,_t,We){We(new Error("_write() is not implemented"))},x.prototype._writev=null,x.prototype.end=function(gt,_t,We){var Ae=this._writableState;typeof gt=="function"?(We=gt,gt=null,_t=null):typeof _t=="function"&&(We=_t,_t=null),gt!=null&&this.write(gt,_t),Ae.corked&&(Ae.corked=1,this.uncork()),Ae.ending||Ae.finished||Pe(this,Ae,We)},Object.defineProperty(x.prototype,"destroyed",{get:function(){return this._writableState!==void 0&&this._writableState.destroyed},set:function(gt){this._writableState&&(this._writableState.destroyed=gt)}}),x.prototype.destroy=Mt.destroy,x.prototype._undestroy=Mt.undestroy,x.prototype._destroy=function(gt,_t){this.end(),_t(gt)}}).call(this,ie("_process"),typeof be.g!="undefined"?be.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./_stream_duplex":179,"./internal/streams/destroy":185,"./internal/streams/stream":186,_process:173,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/set-immediate":25,"babel-runtime/core-js/symbol":27,"babel-runtime/core-js/symbol/has-instance":28,"core-util-is":153,inherits:162,"process-nextick-args":172,"safe-buffer":193,"util-deprecate":205}],184:[function(ie,Ce,ue){"use strict";function se(ne,E){if(!(ne instanceof E))throw new TypeError("Cannot call a class as a function")}function te(ne,E,b){ne.copy(E,b)}var le=ie("safe-buffer").Buffer,ee=ie("util");Ce.exports=function(){function ne(){se(this,ne),this.head=null,this.tail=null,this.length=0}return ne.prototype.push=function(E){var b={data:E,next:null};this.length>0?this.tail.next=b:this.head=b,this.tail=b,++this.length},ne.prototype.unshift=function(E){var b={data:E,next:this.head};this.length===0&&(this.tail=b),this.head=b,++this.length},ne.prototype.shift=function(){if(this.length!==0){var E=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,E}},ne.prototype.clear=function(){this.head=this.tail=null,this.length=0},ne.prototype.join=function(E){if(this.length===0)return"";for(var b=this.head,z=""+b.data;b=b.next;)z+=E+b.data;return z},ne.prototype.concat=function(E){if(this.length===0)return le.alloc(0);if(this.length===1)return this.head.data;for(var b=le.allocUnsafe(E>>>0),z=this.head,x=0;z;)te(z.data,b,x),x+=z.data.length,z=z.next;return b},ne}(),ee&&ee.inspect&&ee.inspect.custom&&(Ce.exports.prototype[ee.inspect.custom]=function(){var ne=ee.inspect({length:this.length});return this.constructor.name+" "+ne})},{"safe-buffer":193,util:36}],185:[function(ie,Ce,ue){"use strict";function se(ne,E){var b=this,z=this._readableState&&this._readableState.destroyed,x=this._writableState&&this._writableState.destroyed;return z||x?(E?E(ne):!ne||this._writableState&&this._writableState.errorEmitted||ee.nextTick(le,this,ne),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(ne||null,function(re){!E&&re?(ee.nextTick(le,b,re),b._writableState&&(b._writableState.errorEmitted=!0)):E&&E(re)}),this)}function te(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function le(ne,E){ne.emit("error",E)}var ee=ie("process-nextick-args");Ce.exports={destroy:se,undestroy:te}},{"process-nextick-args":172}],186:[function(ie,Ce,ue){"use strict";Ce.exports=ie("events").EventEmitter},{events:158}],187:[function(ie,Ce,ue){Ce.exports=ie("./readable").PassThrough},{"./readable":188}],188:[function(ie,Ce,ue){ue=Ce.exports=ie("./lib/_stream_readable.js"),ue.Stream=ue,ue.Readable=ue,ue.Writable=ie("./lib/_stream_writable.js"),ue.Duplex=ie("./lib/_stream_duplex.js"),ue.Transform=ie("./lib/_stream_transform.js"),ue.PassThrough=ie("./lib/_stream_passthrough.js")},{"./lib/_stream_duplex.js":179,"./lib/_stream_passthrough.js":180,"./lib/_stream_readable.js":181,"./lib/_stream_transform.js":182,"./lib/_stream_writable.js":183}],189:[function(ie,Ce,ue){Ce.exports=ie("./readable").Transform},{"./readable":188}],190:[function(ie,Ce,ue){Ce.exports=ie("./lib/_stream_writable.js")},{"./lib/_stream_writable.js":183}],191:[function(ie,Ce,ue){var se=function(){return this}()||Function("return this")(),te=se.regeneratorRuntime&&Object.getOwnPropertyNames(se).indexOf("regeneratorRuntime")>=0,le=te&&se.regeneratorRuntime;if(se.regeneratorRuntime=void 0,Ce.exports=ie("./runtime"),te)se.regeneratorRuntime=le;else try{delete se.regeneratorRuntime}catch(ee){se.regeneratorRuntime=void 0}},{"./runtime":192}],192:[function(ie,Ce,ue){(function(se){"use strict";function te(ze,Ve,$e,nt){var et=Ve&&Ve.prototype instanceof ee?Ve:ee,pt=Object.create(et.prototype),ct=new ve(nt||[]);return pt._invoke=x(ze,$e,ct),pt}function le(ze,Ve,$e){try{return{type:"normal",arg:ze.call(Ve,$e)}}catch(nt){return{type:"throw",arg:nt}}}function ee(){}function ne(){}function E(){}function b(ze){["next","throw","return"].forEach(function(Ve){ze[Ve]=function($e){return this._invoke(Ve,$e)}})}function z(ze){function Ve(et,pt,ct,It){var dt=le(ze[et],ze,pt);if(dt.type!=="throw"){var Mt=dt.arg,xt=Mt.value;return xt&&typeof xt=="object"&&he.call(xt,"__await")?Promise.resolve(xt.__await).then(function(gt){Ve("next",gt,ct,It)},function(gt){Ve("throw",gt,ct,It)}):Promise.resolve(xt).then(function(gt){Mt.value=gt,ct(Mt)},It)}It(dt.arg)}function $e(et,pt){function ct(){return new Promise(function(It,dt){Ve(et,pt,It,dt)})}return nt=nt?nt.then(ct,ct):ct()}var nt;this._invoke=$e}function x(ze,Ve,$e){var nt=Pe;return function(et,pt){if(nt===Xe)throw new Error("Generator is already running");if(nt===ot){if(et==="throw")throw pt;return me()}for($e.method=et,$e.arg=pt;;){var ct=$e.delegate;if(ct){var It=re(ct,$e);if(It){if(It===He)continue;return It}}if($e.method==="next")$e.sent=$e._sent=$e.arg;else if($e.method==="throw"){if(nt===Pe)throw nt=ot,$e.arg;$e.dispatchException($e.arg)}else $e.method==="return"&&$e.abrupt("return",$e.arg);nt=Xe;var dt=le(ze,Ve,$e);if(dt.type==="normal"){if(nt=$e.done?ot:Qe,dt.arg===He)continue;return{value:dt.arg,done:$e.done}}dt.type==="throw"&&(nt=ot,$e.method="throw",$e.arg=dt.arg)}}}function re(ze,Ve){var $e=ze.iterator[Ve.method];if($e===ge){if(Ve.delegate=null,Ve.method==="throw"){if(ze.iterator.return&&(Ve.method="return",Ve.arg=ge,re(ze,Ve),Ve.method==="throw"))return He;Ve.method="throw",Ve.arg=new TypeError("The iterator does not provide a 'throw' method")}return He}var nt=le($e,ze.iterator,Ve.arg);if(nt.type==="throw")return Ve.method="throw",Ve.arg=nt.arg,Ve.delegate=null,He;var et=nt.arg;return et?et.done?(Ve[ze.resultName]=et.value,Ve.next=ze.nextLoc,Ve.method!=="return"&&(Ve.method="next",Ve.arg=ge),Ve.delegate=null,He):et:(Ve.method="throw",Ve.arg=new TypeError("iterator result is not an object"),Ve.delegate=null,He)}function ae(ze){var Ve={tryLoc:ze[0]};1 in ze&&(Ve.catchLoc=ze[1]),2 in ze&&(Ve.finallyLoc=ze[2],Ve.afterLoc=ze[3]),this.tryEntries.push(Ve)}function oe(ze){var Ve=ze.completion||{};Ve.type="normal",delete Ve.arg,ze.completion=Ve}function ve(ze){this.tryEntries=[{tryLoc:"root"}],ze.forEach(ae,this),this.reset(!0)}function ye(ze){if(ze){var Ve=ze[ke];if(Ve)return Ve.call(ze);if(typeof ze.next=="function")return ze;if(!isNaN(ze.length)){var $e=-1,nt=function et(){for(;++$e<ze.length;)if(he.call(ze,$e))return et.value=ze[$e],et.done=!1,et;return et.value=ge,et.done=!0,et};return nt.next=nt}}return{next:me}}function me(){return{value:ge,done:!0}}var ge,_e=Object.prototype,he=_e.hasOwnProperty,pe=typeof Symbol=="function"?Symbol:{},ke=pe.iterator||"@@iterator",Te=pe.asyncIterator||"@@asyncIterator",Ee=pe.toStringTag||"@@toStringTag",Oe=typeof Ce=="object",je=se.regeneratorRuntime;if(je)return void(Oe&&(Ce.exports=je));je=se.regeneratorRuntime=Oe?Ce.exports:{},je.wrap=te;var Pe="suspendedStart",Qe="suspendedYield",Xe="executing",ot="completed",He={},rt={};rt[ke]=function(){return this};var Ye=Object.getPrototypeOf,ut=Ye&&Ye(Ye(ye([])));ut&&ut!==_e&&he.call(ut,ke)&&(rt=ut);var Ge=E.prototype=ee.prototype=Object.create(rt);ne.prototype=Ge.constructor=E,E.constructor=ne,E[Ee]=ne.displayName="GeneratorFunction",je.isGeneratorFunction=function(ze){var Ve=typeof ze=="function"&&ze.constructor;return!!Ve&&(Ve===ne||(Ve.displayName||Ve.name)==="GeneratorFunction")},je.mark=function(ze){return Object.setPrototypeOf?Object.setPrototypeOf(ze,E):(ze.__proto__=E,Ee in ze||(ze[Ee]="GeneratorFunction")),ze.prototype=Object.create(Ge),ze},je.awrap=function(ze){return{__await:ze}},b(z.prototype),z.prototype[Te]=function(){return this},je.AsyncIterator=z,je.async=function(ze,Ve,$e,nt){var et=new z(te(ze,Ve,$e,nt));return je.isGeneratorFunction(Ve)?et:et.next().then(function(pt){return pt.done?pt.value:et.next()})},b(Ge),Ge[Ee]="Generator",Ge[ke]=function(){return this},Ge.toString=function(){return"[object Generator]"},je.keys=function(ze){var Ve=[];for(var $e in ze)Ve.push($e);return Ve.reverse(),function nt(){for(;Ve.length;){var et=Ve.pop();if(et in ze)return nt.value=et,nt.done=!1,nt}return nt.done=!0,nt}},je.values=ye,ve.prototype={constructor:ve,reset:function(ze){if(this.prev=0,this.next=0,this.sent=this._sent=ge,this.done=!1,this.delegate=null,this.method="next",this.arg=ge,this.tryEntries.forEach(oe),!ze)for(var Ve in this)Ve.charAt(0)==="t"&&he.call(this,Ve)&&!isNaN(+Ve.slice(1))&&(this[Ve]=ge)},stop:function(){this.done=!0;var ze=this.tryEntries[0],Ve=ze.completion;if(Ve.type==="throw")throw Ve.arg;return this.rval},dispatchException:function(ze){function Ve(dt,Mt){return pt.type="throw",pt.arg=ze,$e.next=dt,Mt&&($e.method="next",$e.arg=ge),!!Mt}if(this.done)throw ze;for(var $e=this,nt=this.tryEntries.length-1;nt>=0;--nt){var et=this.tryEntries[nt],pt=et.completion;if(et.tryLoc==="root")return Ve("end");if(et.tryLoc<=this.prev){var ct=he.call(et,"catchLoc"),It=he.call(et,"finallyLoc");if(ct&&It){if(this.prev<et.catchLoc)return Ve(et.catchLoc,!0);if(this.prev<et.finallyLoc)return Ve(et.finallyLoc)}else if(ct){if(this.prev<et.catchLoc)return Ve(et.catchLoc,!0)}else{if(!It)throw new Error("try statement without catch or finally");if(this.prev<et.finallyLoc)return Ve(et.finallyLoc)}}}},abrupt:function(ze,Ve){for(var $e=this.tryEntries.length-1;$e>=0;--$e){var nt=this.tryEntries[$e];if(nt.tryLoc<=this.prev&&he.call(nt,"finallyLoc")&&this.prev<nt.finallyLoc){var et=nt;break}}et&&(ze==="break"||ze==="continue")&&et.tryLoc<=Ve&&Ve<=et.finallyLoc&&(et=null);var pt=et?et.completion:{};return pt.type=ze,pt.arg=Ve,et?(this.method="next",this.next=et.finallyLoc,He):this.complete(pt)},complete:function(ze,Ve){if(ze.type==="throw")throw ze.arg;return ze.type==="break"||ze.type==="continue"?this.next=ze.arg:ze.type==="return"?(this.rval=this.arg=ze.arg,this.method="return",this.next="end"):ze.type==="normal"&&Ve&&(this.next=Ve),He},finish:function(ze){for(var Ve=this.tryEntries.length-1;Ve>=0;--Ve){var $e=this.tryEntries[Ve];if($e.finallyLoc===ze)return this.complete($e.completion,$e.afterLoc),oe($e),He}},catch:function(ze){for(var Ve=this.tryEntries.length-1;Ve>=0;--Ve){var $e=this.tryEntries[Ve];if($e.tryLoc===ze){var nt=$e.completion;if(nt.type==="throw"){var et=nt.arg;oe($e)}return et}}throw new Error("illegal catch attempt")},delegateYield:function(ze,Ve,$e){return this.delegate={iterator:ye(ze),resultName:Ve,nextLoc:$e},this.method==="next"&&(this.arg=ge),He}}})(function(){return this}()||Function("return this")())},{}],193:[function(ie,Ce,ue){function se(ne,E){for(var b in ne)E[b]=ne[b]}function te(ne,E,b){return ee(ne,E,b)}var le=ie("buffer"),ee=le.Buffer;ee.from&&ee.alloc&&ee.allocUnsafe&&ee.allocUnsafeSlow?Ce.exports=le:(se(le,ue),ue.Buffer=te),se(ee,te),te.from=function(ne,E,b){if(typeof ne=="number")throw new TypeError("Argument must not be a number");return ee(ne,E,b)},te.alloc=function(ne,E,b){if(typeof ne!="number")throw new TypeError("Argument must be a number");var z=ee(ne);return E!==void 0?typeof b=="string"?z.fill(E,b):z.fill(E):z.fill(0),z},te.allocUnsafe=function(ne){if(typeof ne!="number")throw new TypeError("Argument must be a number");return ee(ne)},te.allocUnsafeSlow=function(ne){if(typeof ne!="number")throw new TypeError("Argument must be a number");return le.SlowBuffer(ne)}},{buffer:38}],194:[function(ie,Ce,ue){(function(se){"use strict";function te(me){return me&&me.__esModule?me:{default:me}}var le=ie("babel-runtime/core-js/string/from-code-point"),ee=te(le),ne=ie("babel-runtime/core-js/json/stringify"),E=te(ne),b=ie("babel-runtime/helpers/typeof"),z=te(b),x=ie("babel-runtime/core-js/object/define-property"),re=te(x),ae=ie("babel-runtime/core-js/object/keys"),oe=te(ae),ve=ie("babel-runtime/core-js/object/create"),ye=te(ve);(function(me){function ge(Me,Re){if(!(this instanceof ge))return new ge(Me,Re);var tt=this;he(tt),tt.q=tt.c="",tt.bufferCheckPosition=me.MAX_BUFFER_LENGTH,tt.opt=Re||{},tt.opt.lowercase=tt.opt.lowercase||tt.opt.lowercasetags,tt.looseCase=tt.opt.lowercase?"toLowerCase":"toUpperCase",tt.tags=[],tt.closed=tt.closedRoot=tt.sawRoot=!1,tt.tag=tt.error=null,tt.strict=!!Me,tt.noscript=!(!Me&&!tt.opt.noscript),tt.state=Le.BEGIN,tt.strictEntities=tt.opt.strictEntities,tt.ENTITIES=tt.strictEntities?(0,ye.default)(me.XML_ENTITIES):(0,ye.default)(me.ENTITIES),tt.attribList=[],tt.opt.xmlns&&(tt.ns=(0,ye.default)(Be)),tt.trackPosition=tt.opt.position!==!1,tt.trackPosition&&(tt.position=tt.line=tt.column=0),Xe(tt,"onready")}function _e(Me){for(var Re=Math.max(me.MAX_BUFFER_LENGTH,10),tt=0,lt=0,Pt=Mt.length;lt<Pt;lt++){var Ct=Me[Mt[lt]].length;if(Ct>Re)switch(Mt[lt]){case"textNode":He(Me);break;case"cdata":ot(Me,"oncdata",Me.cdata),Me.cdata="";break;case"script":ot(Me,"onscript",Me.script),Me.script="";break;default:Ye(Me,"Max buffer length exceeded: "+Mt[lt])}tt=Math.max(tt,Ct)}var vt=me.MAX_BUFFER_LENGTH-tt;Me.bufferCheckPosition=vt+Me.position}function he(Me){for(var Re=0,tt=Mt.length;Re<tt;Re++)Me[Mt[Re]]=""}function pe(Me){He(Me),Me.cdata!==""&&(ot(Me,"oncdata",Me.cdata),Me.cdata=""),Me.script!==""&&(ot(Me,"onscript",Me.script),Me.script="")}function ke(Me,Re){return new Te(Me,Re)}function Te(Me,Re){if(!(this instanceof Te))return new Te(Me,Re);xt.apply(this),this._parser=new ge(Me,Re),this.writable=!0,this.readable=!0;var tt=this;this._parser.onend=function(){tt.emit("end")},this._parser.onerror=function(lt){tt.emit("error",lt),tt._parser.error=null},this._decoder=null,gt.forEach(function(lt){(0,re.default)(tt,"on"+lt,{get:function(){return tt._parser["on"+lt]},set:function(Pt){if(!Pt)return tt.removeAllListeners(lt),tt._parser["on"+lt]=Pt,Pt;tt.on(lt,Pt)},enumerable:!0,configurable:!1})})}function Ee(Me){return Me===" "||Me===`
|
|
|
`||Me==="\r"||Me===" "}function Oe(Me){return Me==='"'||Me==="'"}function je(Me){return Me===">"||Ee(Me)}function Pe(Me,Re){return Me.test(Re)}function Qe(Me,Re){return!Pe(Me,Re)}function Xe(Me,Re,tt){Me[Re]&&Me[Re](tt)}function ot(Me,Re,tt){Me.textNode&&He(Me),Xe(Me,Re,tt)}function He(Me){Me.textNode=rt(Me.opt,Me.textNode),Me.textNode&&Xe(Me,"ontext",Me.textNode),Me.textNode=""}function rt(Me,Re){return Me.trim&&(Re=Re.trim()),Me.normalize&&(Re=Re.replace(/\s+/g," ")),Re}function Ye(Me,Re){return He(Me),Me.trackPosition&&(Re+=`
|
|
|
Line: `+Me.line+`
|
|
|
Column: `+Me.column+`
|
|
|
Char: `+Me.c),Re=new Error(Re),Me.error=Re,Xe(Me,"onerror",Re),Me}function ut(Me){return Me.sawRoot&&!Me.closedRoot&&Ge(Me,"Unclosed root tag"),Me.state!==Le.BEGIN&&Me.state!==Le.BEGIN_WHITESPACE&&Me.state!==Le.TEXT&&Ye(Me,"Unexpected end"),He(Me),Me.c="",Me.closed=!0,Xe(Me,"onend"),ge.call(Me,Me.strict,Me.opt),Me}function Ge(Me,Re){if((Me===void 0?"undefined":(0,z.default)(Me))!=="object"||!(Me instanceof ge))throw new Error("bad call to strictFail");Me.strict&&Ye(Me,Re)}function ze(Me){Me.strict||(Me.tagName=Me.tagName[Me.looseCase]());var Re=Me.tags[Me.tags.length-1]||Me,tt=Me.tag={name:Me.tagName,attributes:{}};Me.opt.xmlns&&(tt.ns=Re.ns),Me.attribList.length=0,ot(Me,"onopentagstart",tt)}function Ve(Me,Re){var tt=Me.indexOf(":"),lt=tt<0?["",Me]:Me.split(":"),Pt=lt[0],Ct=lt[1];return Re&&Me==="xmlns"&&(Pt="xmlns",Ct=""),{prefix:Pt,local:Ct}}function $e(Me){if(Me.strict||(Me.attribName=Me.attribName[Me.looseCase]()),Me.attribList.indexOf(Me.attribName)!==-1||Me.tag.attributes.hasOwnProperty(Me.attribName))return void(Me.attribName=Me.attribValue="");if(Me.opt.xmlns){var Re=Ve(Me.attribName,!0),tt=Re.prefix,lt=Re.local;if(tt==="xmlns")if(lt==="xml"&&Me.attribValue!==Ae)Ge(Me,"xml: prefix must be bound to "+Ae+`
|
|
|
Actual: `+Me.attribValue);else if(lt==="xmlns"&&Me.attribValue!==Se)Ge(Me,"xmlns: prefix must be bound to "+Se+`
|
|
|
Actual: `+Me.attribValue);else{var Pt=Me.tag,Ct=Me.tags[Me.tags.length-1]||Me;Pt.ns===Ct.ns&&(Pt.ns=(0,ye.default)(Ct.ns)),Pt.ns[lt]=Me.attribValue}Me.attribList.push([Me.attribName,Me.attribValue])}else Me.tag.attributes[Me.attribName]=Me.attribValue,ot(Me,"onattribute",{name:Me.attribName,value:Me.attribValue});Me.attribName=Me.attribValue=""}function nt(Me,Re){if(Me.opt.xmlns){var tt=Me.tag,lt=Ve(Me.tagName);tt.prefix=lt.prefix,tt.local=lt.local,tt.uri=tt.ns[lt.prefix]||"",tt.prefix&&!tt.uri&&(Ge(Me,"Unbound namespace prefix: "+(0,E.default)(Me.tagName)),tt.uri=lt.prefix);var Pt=Me.tags[Me.tags.length-1]||Me;tt.ns&&Pt.ns!==tt.ns&&(0,oe.default)(tt.ns).forEach(function(Sn){ot(Me,"onopennamespace",{prefix:Sn,uri:tt.ns[Sn]})});for(var Ct=0,vt=Me.attribList.length;Ct<vt;Ct++){var Ot=Me.attribList[Ct],zt=Ot[0],Ft=Ot[1],yt=Ve(zt,!0),Xt=yt.prefix,Lt=yt.local,Kt=Xt===""?"":tt.ns[Xt]||"",sn={name:zt,value:Ft,prefix:Xt,local:Lt,uri:Kt};Xt&&Xt!=="xmlns"&&!Kt&&(Ge(Me,"Unbound namespace prefix: "+(0,E.default)(Xt)),sn.uri=Xt),Me.tag.attributes[zt]=sn,ot(Me,"onattribute",sn)}Me.attribList.length=0}Me.tag.isSelfClosing=!!Re,Me.sawRoot=!0,Me.tags.push(Me.tag),ot(Me,"onopentag",Me.tag),Re||(Me.noscript||Me.tagName.toLowerCase()!=="script"?Me.state=Le.TEXT:Me.state=Le.SCRIPT,Me.tag=null,Me.tagName=""),Me.attribName=Me.attribValue="",Me.attribList.length=0}function et(Me){if(!Me.tagName)return Ge(Me,"Weird empty close tag."),Me.textNode+="</>",void(Me.state=Le.TEXT);if(Me.script){if(Me.tagName!=="script")return Me.script+="</"+Me.tagName+">",Me.tagName="",void(Me.state=Le.SCRIPT);ot(Me,"onscript",Me.script),Me.script=""}var Re=Me.tags.length,tt=Me.tagName;Me.strict||(tt=tt[Me.looseCase]());for(var lt=tt;Re--&&Me.tags[Re].name!==lt;)Ge(Me,"Unexpected close tag");if(Re<0)return Ge(Me,"Unmatched closing tag: "+Me.tagName),Me.textNode+="</"+Me.tagName+">",void(Me.state=Le.TEXT);Me.tagName=tt;for(var Pt=Me.tags.length;Pt-- >Re;){var Ct=Me.tag=Me.tags.pop();Me.tagName=Me.tag.name,ot(Me,"onclosetag",Me.tagName);var vt={};for(var Ot in Ct.ns)vt[Ot]=Ct.ns[Ot];var zt=Me.tags[Me.tags.length-1]||Me;Me.opt.xmlns&&Ct.ns!==zt.ns&&(0,oe.default)(Ct.ns).forEach(function(Ft){var yt=Ct.ns[Ft];ot(Me,"onclosenamespace",{prefix:Ft,uri:yt})})}Re===0&&(Me.closedRoot=!0),Me.tagName=Me.attribValue=Me.attribName="",Me.attribList.length=0,Me.state=Le.TEXT}function pt(Me){var Re,tt=Me.entity,lt=tt.toLowerCase(),Pt="";return Me.ENTITIES[tt]?Me.ENTITIES[tt]:Me.ENTITIES[lt]?Me.ENTITIES[lt]:(tt=lt,tt.charAt(0)==="#"&&(tt.charAt(1)==="x"?(tt=tt.slice(2),Re=parseInt(tt,16),Pt=Re.toString(16)):(tt=tt.slice(1),Re=parseInt(tt,10),Pt=Re.toString(10))),tt=tt.replace(/^0+/,""),isNaN(Re)||Pt.toLowerCase()!==tt?(Ge(Me,"Invalid character entity"),"&"+Me.entity+";"):(0,ee.default)(Re))}function ct(Me,Re){Re==="<"?(Me.state=Le.OPEN_WAKA,Me.startTagPosition=Me.position):Ee(Re)||(Ge(Me,"Non-whitespace before first tag."),Me.textNode=Re,Me.state=Le.TEXT)}function It(Me,Re){var tt="";return Re<Me.length&&(tt=Me.charAt(Re)),tt}function dt(Me){var Re=this;if(this.error)throw this.error;if(Re.closed)return Ye(Re,"Cannot write after close. Assign an onready handler.");if(Me===null)return ut(Re);(Me===void 0?"undefined":(0,z.default)(Me))==="object"&&(Me=Me.toString());for(var tt=0,lt="";lt=It(Me,tt++),Re.c=lt,!!lt;)switch(Re.trackPosition&&(Re.position++,lt===`
|
|
|
`?(Re.line++,Re.column=0):Re.column++),Re.state){case Le.BEGIN:if(Re.state=Le.BEGIN_WHITESPACE,lt==="\uFEFF")continue;ct(Re,lt);continue;case Le.BEGIN_WHITESPACE:ct(Re,lt);continue;case Le.TEXT:if(Re.sawRoot&&!Re.closedRoot){for(var Pt=tt-1;lt&<!=="<"&<!=="&";)(lt=It(Me,tt++))&&Re.trackPosition&&(Re.position++,lt===`
|
|
|
`?(Re.line++,Re.column=0):Re.column++);Re.textNode+=Me.substring(Pt,tt-1)}lt!=="<"||Re.sawRoot&&Re.closedRoot&&!Re.strict?(Ee(lt)||Re.sawRoot&&!Re.closedRoot||Ge(Re,"Text data outside of root node."),lt==="&"?Re.state=Le.TEXT_ENTITY:Re.textNode+=lt):(Re.state=Le.OPEN_WAKA,Re.startTagPosition=Re.position);continue;case Le.SCRIPT:lt==="<"?Re.state=Le.SCRIPT_ENDING:Re.script+=lt;continue;case Le.SCRIPT_ENDING:lt==="/"?Re.state=Le.CLOSE_TAG:(Re.script+="<"+lt,Re.state=Le.SCRIPT);continue;case Le.OPEN_WAKA:if(lt==="!")Re.state=Le.SGML_DECL,Re.sgmlDecl="";else if(!Ee(lt))if(Pe(Ke,lt))Re.state=Le.OPEN_TAG,Re.tagName=lt;else if(lt==="/")Re.state=Le.CLOSE_TAG,Re.tagName="";else if(lt==="?")Re.state=Le.PROC_INST,Re.procInstName=Re.procInstBody="";else{if(Ge(Re,"Unencoded <"),Re.startTagPosition+1<Re.position){var Ct=Re.position-Re.startTagPosition;lt=new Array(Ct).join(" ")+lt}Re.textNode+="<"+lt,Re.state=Le.TEXT}continue;case Le.SGML_DECL:(Re.sgmlDecl+lt).toUpperCase()===_t?(ot(Re,"onopencdata"),Re.state=Le.CDATA,Re.sgmlDecl="",Re.cdata=""):Re.sgmlDecl+lt==="--"?(Re.state=Le.COMMENT,Re.comment="",Re.sgmlDecl=""):(Re.sgmlDecl+lt).toUpperCase()===We?(Re.state=Le.DOCTYPE,(Re.doctype||Re.sawRoot)&&Ge(Re,"Inappropriately located doctype declaration"),Re.doctype="",Re.sgmlDecl=""):lt===">"?(ot(Re,"onsgmldeclaration",Re.sgmlDecl),Re.sgmlDecl="",Re.state=Le.TEXT):(Oe(lt)&&(Re.state=Le.SGML_DECL_QUOTED),Re.sgmlDecl+=lt);continue;case Le.SGML_DECL_QUOTED:lt===Re.q&&(Re.state=Le.SGML_DECL,Re.q=""),Re.sgmlDecl+=lt;continue;case Le.DOCTYPE:lt===">"?(Re.state=Le.TEXT,ot(Re,"ondoctype",Re.doctype),Re.doctype=!0):(Re.doctype+=lt,lt==="["?Re.state=Le.DOCTYPE_DTD:Oe(lt)&&(Re.state=Le.DOCTYPE_QUOTED,Re.q=lt));continue;case Le.DOCTYPE_QUOTED:Re.doctype+=lt,lt===Re.q&&(Re.q="",Re.state=Le.DOCTYPE);continue;case Le.DOCTYPE_DTD:Re.doctype+=lt,lt==="]"?Re.state=Le.DOCTYPE:Oe(lt)&&(Re.state=Le.DOCTYPE_DTD_QUOTED,Re.q=lt);continue;case Le.DOCTYPE_DTD_QUOTED:Re.doctype+=lt,lt===Re.q&&(Re.state=Le.DOCTYPE_DTD,Re.q="");continue;case Le.COMMENT:lt==="-"?Re.state=Le.COMMENT_ENDING:Re.comment+=lt;continue;case Le.COMMENT_ENDING:lt==="-"?(Re.state=Le.COMMENT_ENDED,Re.comment=rt(Re.opt,Re.comment),Re.comment&&ot(Re,"oncomment",Re.comment),Re.comment=""):(Re.comment+="-"+lt,Re.state=Le.COMMENT);continue;case Le.COMMENT_ENDED:lt!==">"?(Ge(Re,"Malformed comment"),Re.comment+="--"+lt,Re.state=Le.COMMENT):Re.state=Le.TEXT;continue;case Le.CDATA:lt==="]"?Re.state=Le.CDATA_ENDING:Re.cdata+=lt;continue;case Le.CDATA_ENDING:lt==="]"?Re.state=Le.CDATA_ENDING_2:(Re.cdata+="]"+lt,Re.state=Le.CDATA);continue;case Le.CDATA_ENDING_2:lt===">"?(Re.cdata&&ot(Re,"oncdata",Re.cdata),ot(Re,"onclosecdata"),Re.cdata="",Re.state=Le.TEXT):lt==="]"?Re.cdata+="]":(Re.cdata+="]]"+lt,Re.state=Le.CDATA);continue;case Le.PROC_INST:lt==="?"?Re.state=Le.PROC_INST_ENDING:Ee(lt)?Re.state=Le.PROC_INST_BODY:Re.procInstName+=lt;continue;case Le.PROC_INST_BODY:if(!Re.procInstBody&&Ee(lt))continue;lt==="?"?Re.state=Le.PROC_INST_ENDING:Re.procInstBody+=lt;continue;case Le.PROC_INST_ENDING:lt===">"?(ot(Re,"onprocessinginstruction",{name:Re.procInstName,body:Re.procInstBody}),Re.procInstName=Re.procInstBody="",Re.state=Le.TEXT):(Re.procInstBody+="?"+lt,Re.state=Le.PROC_INST_BODY);continue;case Le.OPEN_TAG:Pe(Ne,lt)?Re.tagName+=lt:(ze(Re),lt===">"?nt(Re):lt==="/"?Re.state=Le.OPEN_TAG_SLASH:(Ee(lt)||Ge(Re,"Invalid character in tag name"),Re.state=Le.ATTRIB));continue;case Le.OPEN_TAG_SLASH:lt===">"?(nt(Re,!0),et(Re)):(Ge(Re,"Forward-slash in opening tag not followed by >"),Re.state=Le.ATTRIB);continue;case Le.ATTRIB:if(Ee(lt))continue;lt===">"?nt(Re):lt==="/"?Re.state=Le.OPEN_TAG_SLASH:Pe(Ke,lt)?(Re.attribName=lt,Re.attribValue="",Re.state=Le.ATTRIB_NAME):Ge(Re,"Invalid attribute name");continue;case Le.ATTRIB_NAME:lt==="="?Re.state=Le.ATTRIB_VALUE:lt===">"?(Ge(Re,"Attribute without value"),Re.attribValue=Re.attribName,$e(Re),nt(Re)):Ee(lt)?Re.state=Le.ATTRIB_NAME_SAW_WHITE:Pe(Ne,lt)?Re.attribName+=lt:Ge(Re,"Invalid attribute name");continue;case Le.ATTRIB_NAME_SAW_WHITE:if(lt==="=")Re.state=Le.ATTRIB_VALUE;else{if(Ee(lt))continue;Ge(Re,"Attribute without value"),Re.tag.attributes[Re.attribName]="",Re.attribValue="",ot(Re,"onattribute",{name:Re.attribName,value:""}),Re.attribName="",lt===">"?nt(Re):Pe(Ke,lt)?(Re.attribName=lt,Re.state=Le.ATTRIB_NAME):(Ge(Re,"Invalid attribute name"),Re.state=Le.ATTRIB)}continue;case Le.ATTRIB_VALUE:if(Ee(lt))continue;Oe(lt)?(Re.q=lt,Re.state=Le.ATTRIB_VALUE_QUOTED):(Ge(Re,"Unquoted attribute value"),Re.state=Le.ATTRIB_VALUE_UNQUOTED,Re.attribValue=lt);continue;case Le.ATTRIB_VALUE_QUOTED:if(lt!==Re.q){lt==="&"?Re.state=Le.ATTRIB_VALUE_ENTITY_Q:Re.attribValue+=lt;continue}$e(Re),Re.q="",Re.state=Le.ATTRIB_VALUE_CLOSED;continue;case Le.ATTRIB_VALUE_CLOSED:Ee(lt)?Re.state=Le.ATTRIB:lt===">"?nt(Re):lt==="/"?Re.state=Le.OPEN_TAG_SLASH:Pe(Ke,lt)?(Ge(Re,"No whitespace between attributes"),Re.attribName=lt,Re.attribValue="",Re.state=Le.ATTRIB_NAME):Ge(Re,"Invalid attribute name");continue;case Le.ATTRIB_VALUE_UNQUOTED:if(!je(lt)){lt==="&"?Re.state=Le.ATTRIB_VALUE_ENTITY_U:Re.attribValue+=lt;continue}$e(Re),lt===">"?nt(Re):Re.state=Le.ATTRIB;continue;case Le.CLOSE_TAG:if(Re.tagName)lt===">"?et(Re):Pe(Ne,lt)?Re.tagName+=lt:Re.script?(Re.script+="</"+Re.tagName,Re.tagName="",Re.state=Le.SCRIPT):(Ee(lt)||Ge(Re,"Invalid tagname in closing tag"),Re.state=Le.CLOSE_TAG_SAW_WHITE);else{if(Ee(lt))continue;Qe(Ke,lt)?Re.script?(Re.script+="</"+lt,Re.state=Le.SCRIPT):Ge(Re,"Invalid tagname in closing tag."):Re.tagName=lt}continue;case Le.CLOSE_TAG_SAW_WHITE:if(Ee(lt))continue;lt===">"?et(Re):Ge(Re,"Invalid characters in closing tag");continue;case Le.TEXT_ENTITY:case Le.ATTRIB_VALUE_ENTITY_Q:case Le.ATTRIB_VALUE_ENTITY_U:var vt,Ot;switch(Re.state){case Le.TEXT_ENTITY:vt=Le.TEXT,Ot="textNode";break;case Le.ATTRIB_VALUE_ENTITY_Q:vt=Le.ATTRIB_VALUE_QUOTED,Ot="attribValue";break;case Le.ATTRIB_VALUE_ENTITY_U:vt=Le.ATTRIB_VALUE_UNQUOTED,Ot="attribValue"}lt===";"?(Re[Ot]+=pt(Re),Re.entity="",Re.state=vt):Pe(Re.entity.length?we:De,lt)?Re.entity+=lt:(Ge(Re,"Invalid character in entity name"),Re[Ot]+="&"+Re.entity+lt,Re.entity="",Re.state=vt);continue;default:throw new Error(Re,"Unknown state: "+Re.state)}return Re.position>=Re.bufferCheckPosition&&_e(Re),Re}me.parser=function(Me,Re){return new ge(Me,Re)},me.SAXParser=ge,me.SAXStream=Te,me.createStream=ke,me.MAX_BUFFER_LENGTH=65536;var Mt=["comment","sgmlDecl","textNode","tagName","doctype","procInstName","procInstBody","entity","attribName","attribValue","cdata","script"];me.EVENTS=["text","processinginstruction","sgmldeclaration","doctype","comment","opentagstart","attribute","opentag","closetag","opencdata","cdata","closecdata","error","end","ready","script","opennamespace","closenamespace"],ye.default||(Object.create=function(Me){function Re(){}return Re.prototype=Me,new Re}),oe.default||(Object.keys=function(Me){var Re=[];for(var tt in Me)Me.hasOwnProperty(tt)&&Re.push(tt);return Re}),ge.prototype={end:function(){ut(this)},write:dt,resume:function(){return this.error=null,this},close:function(){return this.write(null)},flush:function(){pe(this)}};var xt;try{xt=ie("stream").Stream}catch(Me){xt=function(){}}var gt=me.EVENTS.filter(function(Me){return Me!=="error"&&Me!=="end"});Te.prototype=(0,ye.default)(xt.prototype,{constructor:{value:Te}}),Te.prototype.write=function(Me){if(typeof se=="function"&&typeof se.isBuffer=="function"&&se.isBuffer(Me)){if(!this._decoder){var Re=ie("string_decoder").StringDecoder;this._decoder=new Re("utf8")}Me=this._decoder.write(Me)}return this._parser.write(Me.toString()),this.emit("data",Me),!0},Te.prototype.end=function(Me){return Me&&Me.length&&this.write(Me),this._parser.end(),!0},Te.prototype.on=function(Me,Re){var tt=this;return tt._parser["on"+Me]||gt.indexOf(Me)===-1||(tt._parser["on"+Me]=function(){var lt=arguments.length===1?[arguments[0]]:Array.apply(null,arguments);lt.splice(0,0,Me),tt.emit.apply(tt,lt)}),xt.prototype.on.call(tt,Me,Re)};var _t="[CDATA[",We="DOCTYPE",Ae="http://www.w3.org/XML/1998/namespace",Se="http://www.w3.org/2000/xmlns/",Be={xml:Ae,xmlns:Se},Ke=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,Ne=/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,De=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/,we=/[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/,Le=0;me.STATE={BEGIN:Le++,BEGIN_WHITESPACE:Le++,TEXT:Le++,TEXT_ENTITY:Le++,OPEN_WAKA:Le++,SGML_DECL:Le++,SGML_DECL_QUOTED:Le++,DOCTYPE:Le++,DOCTYPE_QUOTED:Le++,DOCTYPE_DTD:Le++,DOCTYPE_DTD_QUOTED:Le++,COMMENT_STARTING:Le++,COMMENT:Le++,COMMENT_ENDING:Le++,COMMENT_ENDED:Le++,CDATA:Le++,CDATA_ENDING:Le++,CDATA_ENDING_2:Le++,PROC_INST:Le++,PROC_INST_BODY:Le++,PROC_INST_ENDING:Le++,OPEN_TAG:Le++,OPEN_TAG_SLASH:Le++,ATTRIB:Le++,ATTRIB_NAME:Le++,ATTRIB_NAME_SAW_WHITE:Le++,ATTRIB_VALUE:Le++,ATTRIB_VALUE_QUOTED:Le++,ATTRIB_VALUE_CLOSED:Le++,ATTRIB_VALUE_UNQUOTED:Le++,ATTRIB_VALUE_ENTITY_Q:Le++,ATTRIB_VALUE_ENTITY_U:Le++,CLOSE_TAG:Le++,CLOSE_TAG_SAW_WHITE:Le++,SCRIPT:Le++,SCRIPT_ENDING:Le++},me.XML_ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'"},me.ENTITIES={amp:"&",gt:">",lt:"<",quot:'"',apos:"'",AElig:198,Aacute:193,Acirc:194,Agrave:192,Aring:197,Atilde:195,Auml:196,Ccedil:199,ETH:208,Eacute:201,Ecirc:202,Egrave:200,Euml:203,Iacute:205,Icirc:206,Igrave:204,Iuml:207,Ntilde:209,Oacute:211,Ocirc:212,Ograve:210,Oslash:216,Otilde:213,Ouml:214,THORN:222,Uacute:218,Ucirc:219,Ugrave:217,Uuml:220,Yacute:221,aacute:225,acirc:226,aelig:230,agrave:224,aring:229,atilde:227,auml:228,ccedil:231,eacute:233,ecirc:234,egrave:232,eth:240,euml:235,iacute:237,icirc:238,igrave:236,iuml:239,ntilde:241,oacute:243,ocirc:244,ograve:242,oslash:248,otilde:245,ouml:246,szlig:223,thorn:254,uacute:250,ucirc:251,ugrave:249,uuml:252,yacute:253,yuml:255,copy:169,reg:174,nbsp:160,iexcl:161,cent:162,pound:163,curren:164,yen:165,brvbar:166,sect:167,uml:168,ordf:170,laquo:171,not:172,shy:173,macr:175,deg:176,plusmn:177,sup1:185,sup2:178,sup3:179,acute:180,micro:181,para:182,middot:183,cedil:184,ordm:186,raquo:187,frac14:188,frac12:189,frac34:190,iquest:191,times:215,divide:247,OElig:338,oelig:339,Scaron:352,scaron:353,Yuml:376,fnof:402,circ:710,tilde:732,Alpha:913,Beta:914,Gamma:915,Delta:916,Epsilon:917,Zeta:918,Eta:919,Theta:920,Iota:921,Kappa:922,Lambda:923,Mu:924,Nu:925,Xi:926,Omicron:927,Pi:928,Rho:929,Sigma:931,Tau:932,Upsilon:933,Phi:934,Chi:935,Psi:936,Omega:937,alpha:945,beta:946,gamma:947,delta:948,epsilon:949,zeta:950,eta:951,theta:952,iota:953,kappa:954,lambda:955,mu:956,nu:957,xi:958,omicron:959,pi:960,rho:961,sigmaf:962,sigma:963,tau:964,upsilon:965,phi:966,chi:967,psi:968,omega:969,thetasym:977,upsih:978,piv:982,ensp:8194,emsp:8195,thinsp:8201,zwnj:8204,zwj:8205,lrm:8206,rlm:8207,ndash:8211,mdash:8212,lsquo:8216,rsquo:8217,sbquo:8218,ldquo:8220,rdquo:8221,bdquo:8222,dagger:8224,Dagger:8225,bull:8226,hellip:8230,permil:8240,prime:8242,Prime:8243,lsaquo:8249,rsaquo:8250,oline:8254,frasl:8260,euro:8364,image:8465,weierp:8472,real:8476,trade:8482,alefsym:8501,larr:8592,uarr:8593,rarr:8594,darr:8595,harr:8596,crarr:8629,lArr:8656,uArr:8657,rArr:8658,dArr:8659,hArr:8660,forall:8704,part:8706,exist:8707,empty:8709,nabla:8711,isin:8712,notin:8713,ni:8715,prod:8719,sum:8721,minus:8722,lowast:8727,radic:8730,prop:8733,infin:8734,ang:8736,and:8743,or:8744,cap:8745,cup:8746,int:8747,there4:8756,sim:8764,cong:8773,asymp:8776,ne:8800,equiv:8801,le:8804,ge:8805,sub:8834,sup:8835,nsub:8836,sube:8838,supe:8839,oplus:8853,otimes:8855,perp:8869,sdot:8901,lceil:8968,rceil:8969,lfloor:8970,rfloor:8971,lang:9001,rang:9002,loz:9674,spades:9824,clubs:9827,hearts:9829,diams:9830},(0,oe.default)(me.ENTITIES).forEach(function(Me){var Re=me.ENTITIES[Me],tt=typeof Re=="number"?String.fromCharCode(Re):Re;me.ENTITIES[Me]=tt});for(var Ue in me.STATE)me.STATE[me.STATE[Ue]]=Ue;Le=me.STATE,ee.default||function(){var Me=String.fromCharCode,Re=Math.floor,tt=function(){var lt,Pt,Ct=[],vt=-1,Ot=arguments.length;if(!Ot)return"";for(var zt="";++vt<Ot;){var Ft=Number(arguments[vt]);if(!isFinite(Ft)||Ft<0||Ft>1114111||Re(Ft)!==Ft)throw RangeError("Invalid code point: "+Ft);Ft<=65535?Ct.push(Ft):(Ft-=65536,lt=55296+(Ft>>10),Pt=Ft%1024+56320,Ct.push(lt,Pt)),(vt+1===Ot||Ct.length>16384)&&(zt+=Me.apply(null,Ct),Ct.length=0)}return zt};re.default?Object.defineProperty(String,"fromCodePoint",{value:tt,configurable:!0,writable:!0}):String.fromCodePoint=tt}()})(ue===void 0?(void 0).sax={}:ue)}).call(this,ie("buffer").Buffer)},{"babel-runtime/core-js/json/stringify":17,"babel-runtime/core-js/object/create":19,"babel-runtime/core-js/object/define-property":20,"babel-runtime/core-js/object/keys":23,"babel-runtime/core-js/string/from-code-point":26,"babel-runtime/helpers/typeof":32,buffer:38,stream:195,string_decoder:37}],195:[function(ie,Ce,ue){function se(){te.call(this)}Ce.exports=se;var te=ie("events").EventEmitter;ie("inherits")(se,te),se.Readable=ie("readable-stream/readable.js"),se.Writable=ie("readable-stream/writable.js"),se.Duplex=ie("readable-stream/duplex.js"),se.Transform=ie("readable-stream/transform.js"),se.PassThrough=ie("readable-stream/passthrough.js"),se.Stream=se,se.prototype.pipe=function(le,ee){function ne(ve){le.writable&&le.write(ve)===!1&&ae.pause&&ae.pause()}function E(){ae.readable&&ae.resume&&ae.resume()}function b(){oe||(oe=!0,le.end())}function z(){oe||(oe=!0,typeof le.destroy=="function"&&le.destroy())}function x(ve){if(re(),te.listenerCount(this,"error")===0)throw ve}function re(){ae.removeListener("data",ne),le.removeListener("drain",E),ae.removeListener("end",b),ae.removeListener("close",z),ae.removeListener("error",x),le.removeListener("error",x),ae.removeListener("end",re),ae.removeListener("close",re),le.removeListener("close",re)}var ae=this;ae.on("data",ne),le.on("drain",E),le._isStdio||ee&&ee.end===!1||(ae.on("end",b),ae.on("close",z));var oe=!1;return ae.on("error",x),le.on("error",x),ae.on("end",re),ae.on("close",re),le.on("close",re),le.emit("pipe",ae),le}},{events:158,inherits:162,"readable-stream/duplex.js":178,"readable-stream/passthrough.js":187,"readable-stream/readable.js":188,"readable-stream/transform.js":189,"readable-stream/writable.js":190}],196:[function(ie,Ce,ue){(function(se){var te=ie("./lib/request"),le=ie("./lib/response"),ee=ie("xtend"),ne=ie("builtin-status-codes"),E=ie("url"),b=ue;b.request=function(z,x){z=typeof z=="string"?E.parse(z):ee(z);var re=se.location.protocol.search(/^https?:$/)===-1?"http:":"",ae=z.protocol||re,oe=z.hostname||z.host,ve=z.port,ye=z.path||"/";oe&&oe.indexOf(":")!==-1&&(oe="["+oe+"]"),z.url=(oe?ae+"//"+oe:"")+(ve?":"+ve:"")+ye,z.method=(z.method||"GET").toUpperCase(),z.headers=z.headers||{};var me=new te(z);return x&&me.on("response",x),me},b.get=function(z,x){var re=b.request(z,x);return re.end(),re},b.ClientRequest=te,b.IncomingMessage=le.IncomingMessage,b.Agent=function(){},b.Agent.defaultMaxSockets=4,b.globalAgent=new b.Agent,b.STATUS_CODES=ne,b.METHODS=["CHECKOUT","CONNECT","COPY","DELETE","GET","HEAD","LOCK","M-SEARCH","MERGE","MKACTIVITY","MKCOL","MOVE","NOTIFY","OPTIONS","PATCH","POST","PROPFIND","PROPPATCH","PURGE","PUT","REPORT","SEARCH","SUBSCRIBE","TRACE","UNLOCK","UNSUBSCRIBE"]}).call(this,typeof be.g!="undefined"?be.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./lib/request":198,"./lib/response":199,"builtin-status-codes":39,url:203,xtend:236}],197:[function(ie,Ce,ue){(function(se){"use strict";function te(){if(ne!==void 0)return ne;if(se.XMLHttpRequest){ne=new se.XMLHttpRequest;try{ne.open("GET",se.XDomainRequest?"/":"https://example.com")}catch(z){ne=null}}else ne=null;return ne}function le(z){var x=te();if(!x)return!1;try{return x.responseType=z,x.responseType===z}catch(re){}return!1}function ee(z){return typeof z=="function"}ue.fetch=ee(se.fetch)&&ee(se.ReadableStream),ue.writableStream=ee(se.WritableStream),ue.abortController=ee(se.AbortController),ue.blobConstructor=!1;try{new Blob([new ArrayBuffer(1)]),ue.blobConstructor=!0}catch(z){}var ne,E=se.ArrayBuffer!==void 0,b=E&&ee(se.ArrayBuffer.prototype.slice);ue.arraybuffer=ue.fetch||E&&le("arraybuffer"),ue.msstream=!ue.fetch&&b&&le("ms-stream"),ue.mozchunkedarraybuffer=!ue.fetch&&E&&le("moz-chunked-arraybuffer"),ue.overrideMimeType=ue.fetch||!!te()&&ee(te().overrideMimeType),ue.vbArray=ee(se.VBArray),ne=null}).call(this,typeof be.g!="undefined"?be.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],198:[function(ie,Ce,ue){(function(se,te,le){"use strict";function ee(_e,he){return z.fetch&&he?"fetch":z.mozchunkedarraybuffer?"moz-chunked-arraybuffer":z.msstream?"ms-stream":z.arraybuffer&&_e?"arraybuffer":z.vbArray&&_e?"text:vbarray":"text"}function ne(_e){try{var he=_e.status;return he!==null&&he!==0}catch(pe){return!1}}var E=ie("babel-runtime/core-js/object/keys"),b=function(_e){return _e&&_e.__esModule?_e:{default:_e}}(E),z=ie("./capability"),x=ie("inherits"),re=ie("./response"),ae=ie("readable-stream"),oe=ie("to-arraybuffer"),ve=re.IncomingMessage,ye=re.readyStates,me=Ce.exports=function(_e){var he=this;ae.Writable.call(he),he._opts=_e,he._body=[],he._headers={},_e.auth&&he.setHeader("Authorization","Basic "+new le(_e.auth).toString("base64")),(0,b.default)(_e.headers).forEach(function(Te){he.setHeader(Te,_e.headers[Te])});var pe,ke=!0;if(_e.mode==="disable-fetch"||"requestTimeout"in _e&&!z.abortController)ke=!1,pe=!0;else if(_e.mode==="prefer-streaming")pe=!1;else if(_e.mode==="allow-wrong-content-type")pe=!z.overrideMimeType;else{if(_e.mode&&_e.mode!=="default"&&_e.mode!=="prefer-fast")throw new Error("Invalid value for opts.mode");pe=!0}he._mode=ee(pe,ke),he._fetchTimer=null,he.on("finish",function(){he._onFinish()})};x(me,ae.Writable),me.prototype.setHeader=function(_e,he){var pe=this,ke=_e.toLowerCase();ge.indexOf(ke)===-1&&(pe._headers[ke]={name:_e,value:he})},me.prototype.getHeader=function(_e){var he=this._headers[_e.toLowerCase()];return he?he.value:null},me.prototype.removeHeader=function(_e){delete this._headers[_e.toLowerCase()]},me.prototype._onFinish=function(){var _e=this;if(!_e._destroyed){var he=_e._opts,pe=_e._headers,ke=null;he.method!=="GET"&&he.method!=="HEAD"&&(ke=z.arraybuffer?oe(le.concat(_e._body)):z.blobConstructor?new te.Blob(_e._body.map(function(Pe){return oe(Pe)}),{type:(pe["content-type"]||{}).value||""}):le.concat(_e._body).toString());var Te=[];if((0,b.default)(pe).forEach(function(Pe){var Qe=pe[Pe].name,Xe=pe[Pe].value;Array.isArray(Xe)?Xe.forEach(function(ot){Te.push([Qe,ot])}):Te.push([Qe,Xe])}),_e._mode==="fetch"){var Ee=null;if(z.abortController){var Oe=new AbortController;Ee=Oe.signal,_e._fetchAbortController=Oe,"requestTimeout"in he&&he.requestTimeout!==0&&(_e._fetchTimer=te.setTimeout(function(){_e.emit("requestTimeout"),_e._fetchAbortController&&_e._fetchAbortController.abort()},he.requestTimeout))}te.fetch(_e._opts.url,{method:_e._opts.method,headers:Te,body:ke||void 0,mode:"cors",credentials:he.withCredentials?"include":"same-origin",signal:Ee}).then(function(Pe){_e._fetchResponse=Pe,_e._connect()},function(Pe){te.clearTimeout(_e._fetchTimer),_e._destroyed||_e.emit("error",Pe)})}else{var je=_e._xhr=new te.XMLHttpRequest;try{je.open(_e._opts.method,_e._opts.url,!0)}catch(Pe){return void se.nextTick(function(){_e.emit("error",Pe)})}"responseType"in je&&(je.responseType=_e._mode.split(":")[0]),"withCredentials"in je&&(je.withCredentials=!!he.withCredentials),_e._mode==="text"&&"overrideMimeType"in je&&je.overrideMimeType("text/plain; charset=x-user-defined"),"requestTimeout"in he&&(je.timeout=he.requestTimeout,je.ontimeout=function(){_e.emit("requestTimeout")}),Te.forEach(function(Pe){je.setRequestHeader(Pe[0],Pe[1])}),_e._response=null,je.onreadystatechange=function(){switch(je.readyState){case ye.LOADING:case ye.DONE:_e._onXHRProgress()}},_e._mode==="moz-chunked-arraybuffer"&&(je.onprogress=function(){_e._onXHRProgress()}),je.onerror=function(){_e._destroyed||_e.emit("error",new Error("XHR error"))};try{je.send(ke)}catch(Pe){return void se.nextTick(function(){_e.emit("error",Pe)})}}}},me.prototype._onXHRProgress=function(){var _e=this;ne(_e._xhr)&&!_e._destroyed&&(_e._response||_e._connect(),_e._response._onXHRProgress())},me.prototype._connect=function(){var _e=this;_e._destroyed||(_e._response=new ve(_e._xhr,_e._fetchResponse,_e._mode,_e._fetchTimer),_e._response.on("error",function(he){_e.emit("error",he)}),_e.emit("response",_e._response))},me.prototype._write=function(_e,he,pe){this._body.push(_e),pe()},me.prototype.abort=me.prototype.destroy=function(){var _e=this;_e._destroyed=!0,te.clearTimeout(_e._fetchTimer),_e._response&&(_e._response._destroyed=!0),_e._xhr?_e._xhr.abort():_e._fetchAbortController&&_e._fetchAbortController.abort()},me.prototype.end=function(_e,he,pe){var ke=this;typeof _e=="function"&&(pe=_e,_e=void 0),ae.Writable.prototype.end.call(ke,_e,he,pe)},me.prototype.flushHeaders=function(){},me.prototype.setTimeout=function(){},me.prototype.setNoDelay=function(){},me.prototype.setSocketKeepAlive=function(){};var ge=["accept-charset","accept-encoding","access-control-request-headers","access-control-request-method","connection","content-length","cookie","cookie2","date","dnt","expect","host","keep-alive","origin","referer","te","trailer","transfer-encoding","upgrade","user-agent","via"]}).call(this,ie("_process"),typeof be.g!="undefined"?be.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ie("buffer").Buffer)},{"./capability":197,"./response":199,_process:173,"babel-runtime/core-js/object/keys":23,buffer:38,inherits:162,"readable-stream":188,"to-arraybuffer":202}],199:[function(ie,Ce,ue){(function(se,te,le){"use strict";var ee=ie("babel-runtime/core-js/promise"),ne=function(ae){return ae&&ae.__esModule?ae:{default:ae}}(ee),E=ie("./capability"),b=ie("inherits"),z=ie("readable-stream"),x=ue.readyStates={UNSENT:0,OPENED:1,HEADERS_RECEIVED:2,LOADING:3,DONE:4},re=ue.IncomingMessage=function(ae,oe,ve,ye){var me=this;if(z.Readable.call(me),me._mode=ve,me.headers={},me.rawHeaders=[],me.trailers={},me.rawTrailers=[],me.on("end",function(){se.nextTick(function(){me.emit("close")})}),ve==="fetch"){if(me._fetchResponse=oe,me.url=oe.url,me.statusCode=oe.status,me.statusMessage=oe.statusText,oe.headers.forEach(function(ke,Te){me.headers[Te.toLowerCase()]=ke,me.rawHeaders.push(Te,ke)}),E.writableStream){var ge=new WritableStream({write:function(ke){return new ne.default(function(Te,Ee){me._destroyed?Ee():me.push(new le(ke))?Te():me._resumeFetch=Te})},close:function(){te.clearTimeout(ye),me._destroyed||me.push(null)},abort:function(ke){me._destroyed||me.emit("error",ke)}});try{return void oe.body.pipeTo(ge).catch(function(ke){te.clearTimeout(ye),me._destroyed||me.emit("error",ke)})}catch(ke){}}var _e=oe.body.getReader();(function ke(){_e.read().then(function(Te){if(!me._destroyed){if(Te.done)return te.clearTimeout(ye),void me.push(null);me.push(new le(Te.value)),ke()}}).catch(function(Te){te.clearTimeout(ye),me._destroyed||me.emit("error",Te)})})()}else if(me._xhr=ae,me._pos=0,me.url=ae.responseURL,me.statusCode=ae.status,me.statusMessage=ae.statusText,ae.getAllResponseHeaders().split(/\r?\n/).forEach(function(ke){var Te=ke.match(/^([^:]+):\s*(.*)/);if(Te){var Ee=Te[1].toLowerCase();Ee==="set-cookie"?(me.headers[Ee]===void 0&&(me.headers[Ee]=[]),me.headers[Ee].push(Te[2])):me.headers[Ee]!==void 0?me.headers[Ee]+=", "+Te[2]:me.headers[Ee]=Te[2],me.rawHeaders.push(Te[1],Te[2])}}),me._charset="x-user-defined",!E.overrideMimeType){var he=me.rawHeaders["mime-type"];if(he){var pe=he.match(/;\s*charset=([^;])(;|$)/);pe&&(me._charset=pe[1].toLowerCase())}me._charset||(me._charset="utf-8")}};b(re,z.Readable),re.prototype._read=function(){var ae=this,oe=ae._resumeFetch;oe&&(ae._resumeFetch=null,oe())},re.prototype._onXHRProgress=function(){var ae=this,oe=ae._xhr,ve=null;switch(ae._mode){case"text:vbarray":if(oe.readyState!==x.DONE)break;try{ve=new te.VBArray(oe.responseBody).toArray()}catch(he){}if(ve!==null){ae.push(new le(ve));break}case"text":try{ve=oe.responseText}catch(he){ae._mode="text:vbarray";break}if(ve.length>ae._pos){var ye=ve.substr(ae._pos);if(ae._charset==="x-user-defined"){for(var me=new le(ye.length),ge=0;ge<ye.length;ge++)me[ge]=255&ye.charCodeAt(ge);ae.push(me)}else ae.push(ye,ae._charset);ae._pos=ve.length}break;case"arraybuffer":if(oe.readyState!==x.DONE||!oe.response)break;ve=oe.response,ae.push(new le(new Uint8Array(ve)));break;case"moz-chunked-arraybuffer":if(ve=oe.response,oe.readyState!==x.LOADING||!ve)break;ae.push(new le(new Uint8Array(ve)));break;case"ms-stream":if(ve=oe.response,oe.readyState!==x.LOADING)break;var _e=new te.MSStreamReader;_e.onprogress=function(){_e.result.byteLength>ae._pos&&(ae.push(new le(new Uint8Array(_e.result.slice(ae._pos)))),ae._pos=_e.result.byteLength)},_e.onload=function(){ae.push(null)},_e.readAsArrayBuffer(ve)}ae._xhr.readyState===x.DONE&&ae._mode!=="ms-stream"&&ae.push(null)}}).call(this,ie("_process"),typeof be.g!="undefined"?be.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{},ie("buffer").Buffer)},{"./capability":197,_process:173,"babel-runtime/core-js/promise":24,buffer:38,inherits:162,"readable-stream":188}],200:[function(ie,Ce,ue){"use strict";function se(he){if(!he)return"utf8";for(var pe;;)switch(he){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return he;default:if(pe)return;he=(""+he).toLowerCase(),pe=!0}}function te(he){var pe=se(he);if(typeof pe!="string"&&(ge.isEncoding===_e||!_e(he)))throw new Error("Unknown encoding: "+he);return pe||he}function le(he){this.encoding=te(he);var pe;switch(this.encoding){case"utf16le":this.text=re,this.end=ae,pe=4;break;case"utf8":this.fillLast=b,pe=4;break;case"base64":this.text=oe,this.end=ve,pe=3;break;default:return this.write=ye,void(this.end=me)}this.lastNeed=0,this.lastTotal=0,this.lastChar=ge.allocUnsafe(pe)}function ee(he){return he<=127?0:he>>5==6?2:he>>4==14?3:he>>3==30?4:he>>6==2?-1:-2}function ne(he,pe,ke){var Te=pe.length-1;if(Te<ke)return 0;var Ee=ee(pe[Te]);return Ee>=0?(Ee>0&&(he.lastNeed=Ee-1),Ee):--Te<ke||Ee===-2?0:(Ee=ee(pe[Te]))>=0?(Ee>0&&(he.lastNeed=Ee-2),Ee):--Te<ke||Ee===-2?0:(Ee=ee(pe[Te]),Ee>=0?(Ee>0&&(Ee===2?Ee=0:he.lastNeed=Ee-3),Ee):0)}function E(he,pe,ke){if((192&pe[0])!=128)return he.lastNeed=0,"\u951F\uFFFD";if(he.lastNeed>1&&pe.length>1){if((192&pe[1])!=128)return he.lastNeed=1,"\u951F\uFFFD";if(he.lastNeed>2&&pe.length>2&&(192&pe[2])!=128)return he.lastNeed=2,"\u951F\uFFFD"}}function b(he){var pe=this.lastTotal-this.lastNeed,ke=E(this,he,pe);return ke!==void 0?ke:this.lastNeed<=he.length?(he.copy(this.lastChar,pe,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(he.copy(this.lastChar,pe,0,he.length),void(this.lastNeed-=he.length))}function z(he,pe){var ke=ne(this,he,pe);if(!this.lastNeed)return he.toString("utf8",pe);this.lastTotal=ke;var Te=he.length-(ke-this.lastNeed);return he.copy(this.lastChar,0,Te),he.toString("utf8",pe,Te)}function x(he){var pe=he&&he.length?this.write(he):"";return this.lastNeed?pe+"\u951F\uFFFD":pe}function re(he,pe){if((he.length-pe)%2==0){var ke=he.toString("utf16le",pe);if(ke){var Te=ke.charCodeAt(ke.length-1);if(Te>=55296&&Te<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=he[he.length-2],this.lastChar[1]=he[he.length-1],ke.slice(0,-1)}return ke}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=he[he.length-1],he.toString("utf16le",pe,he.length-1)}function ae(he){var pe=he&&he.length?this.write(he):"";if(this.lastNeed){var ke=this.lastTotal-this.lastNeed;return pe+this.lastChar.toString("utf16le",0,ke)}return pe}function oe(he,pe){var ke=(he.length-pe)%3;return ke===0?he.toString("base64",pe):(this.lastNeed=3-ke,this.lastTotal=3,ke===1?this.lastChar[0]=he[he.length-1]:(this.lastChar[0]=he[he.length-2],this.lastChar[1]=he[he.length-1]),he.toString("base64",pe,he.length-ke))}function ve(he){var pe=he&&he.length?this.write(he):"";return this.lastNeed?pe+this.lastChar.toString("base64",0,3-this.lastNeed):pe}function ye(he){return he.toString(this.encoding)}function me(he){return he&&he.length?this.write(he):""}var ge=ie("safe-buffer").Buffer,_e=ge.isEncoding||function(he){switch((he=""+he)&&he.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};ue.StringDecoder=le,le.prototype.write=function(he){if(he.length===0)return"";var pe,ke;if(this.lastNeed){if((pe=this.fillLast(he))===void 0)return"";ke=this.lastNeed,this.lastNeed=0}else ke=0;return ke<he.length?pe?pe+this.text(he,ke):this.text(he,ke):pe||""},le.prototype.end=x,le.prototype.text=z,le.prototype.fillLast=function(he){if(this.lastNeed<=he.length)return he.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);he.copy(this.lastChar,this.lastTotal-this.lastNeed,0,he.length),this.lastNeed-=he.length}},{"safe-buffer":193}],201:[function(ie,Ce,ue){(function(se,te){function le(x,re){this._id=x,this._clearFn=re}var ee=ie("process/browser.js").nextTick,ne=Function.prototype.apply,E=Array.prototype.slice,b={},z=0;ue.setTimeout=function(){return new le(ne.call(setTimeout,window,arguments),clearTimeout)},ue.setInterval=function(){return new le(ne.call(setInterval,window,arguments),clearInterval)},ue.clearTimeout=ue.clearInterval=function(x){x.close()},le.prototype.unref=le.prototype.ref=function(){},le.prototype.close=function(){this._clearFn.call(window,this._id)},ue.enroll=function(x,re){clearTimeout(x._idleTimeoutId),x._idleTimeout=re},ue.unenroll=function(x){clearTimeout(x._idleTimeoutId),x._idleTimeout=-1},ue._unrefActive=ue.active=function(x){clearTimeout(x._idleTimeoutId);var re=x._idleTimeout;re>=0&&(x._idleTimeoutId=setTimeout(function(){x._onTimeout&&x._onTimeout()},re))},ue.setImmediate=typeof se=="function"?se:function(x){var re=z++,ae=!(arguments.length<2)&&E.call(arguments,1);return b[re]=!0,ee(function(){b[re]&&(ae?x.apply(null,ae):x.call(null),ue.clearImmediate(re))}),re},ue.clearImmediate=typeof te=="function"?te:function(x){delete b[x]}}).call(this,ie("timers").setImmediate,ie("timers").clearImmediate)},{"process/browser.js":173,timers:201}],202:[function(ie,Ce,ue){var se=ie("buffer").Buffer;Ce.exports=function(te){if(te instanceof Uint8Array){if(te.byteOffset===0&&te.byteLength===te.buffer.byteLength)return te.buffer;if(typeof te.buffer.slice=="function")return te.buffer.slice(te.byteOffset,te.byteOffset+te.byteLength)}if(se.isBuffer(te)){for(var le=new Uint8Array(te.length),ee=te.length,ne=0;ne<ee;ne++)le[ne]=te[ne];return le.buffer}throw new Error("Argument must be a Buffer")}},{buffer:38}],203:[function(ie,Ce,ue){"use strict";function se(){this.protocol=null,this.slashes=null,this.auth=null,this.host=null,this.port=null,this.hostname=null,this.hash=null,this.search=null,this.query=null,this.pathname=null,this.path=null,this.href=null}function te(Ee,Oe,je){if(Ee&&b.isObject(Ee)&&Ee instanceof se)return Ee;var Pe=new se;return Pe.parse(Ee,Oe,je),Pe}function le(Ee){return b.isString(Ee)&&(Ee=te(Ee)),Ee instanceof se?Ee.format():se.prototype.format.call(Ee)}function ee(Ee,Oe){return te(Ee,!1,!0).resolve(Oe)}function ne(Ee,Oe){return Ee?te(Ee,!1,!0).resolveObject(Oe):Oe}var E=ie("punycode"),b=ie("./util");ue.parse=te,ue.resolve=ee,ue.resolveObject=ne,ue.format=le,ue.Url=se;var z=/^([a-z0-9.+-]+:)/i,x=/:[0-9]*$/,re=/^(\/\/?(?!\/)[^\?\s]*)(\?[^\s]*)?$/,ae=["<",">",'"',"`"," ","\r",`
|
|
|
`," "],oe=["{","}","|","\\","^","`"].concat(ae),ve=["'"].concat(oe),ye=["%","/","?",";","#"].concat(ve),me=["/","?","#"],ge=/^[+a-z0-9A-Z_-]{0,63}$/,_e=/^([+a-z0-9A-Z_-]{0,63})(.*)$/,he={javascript:!0,"javascript:":!0},pe={javascript:!0,"javascript:":!0},ke={http:!0,https:!0,ftp:!0,gopher:!0,file:!0,"http:":!0,"https:":!0,"ftp:":!0,"gopher:":!0,"file:":!0},Te=ie("querystring");se.prototype.parse=function(Ee,Oe,je){if(!b.isString(Ee))throw new TypeError("Parameter 'url' must be a string, not "+typeof Ee);var Pe=Ee.indexOf("?"),Qe=Pe!==-1&&Pe<Ee.indexOf("#")?"?":"#",Xe=Ee.split(Qe),ot=/\\/g;Xe[0]=Xe[0].replace(ot,"/"),Ee=Xe.join(Qe);var He=Ee;if(He=He.trim(),!je&&Ee.split("#").length===1){var rt=re.exec(He);if(rt)return this.path=He,this.href=He,this.pathname=rt[1],rt[2]?(this.search=rt[2],this.query=Oe?Te.parse(this.search.substr(1)):this.search.substr(1)):Oe&&(this.search="",this.query={}),this}var Ye=z.exec(He);if(Ye){Ye=Ye[0];var ut=Ye.toLowerCase();this.protocol=ut,He=He.substr(Ye.length)}if(je||Ye||He.match(/^\/\/[^@\/]+@[^@\/]+/)){var Ge=He.substr(0,2)==="//";!Ge||Ye&&pe[Ye]||(He=He.substr(2),this.slashes=!0)}if(!pe[Ye]&&(Ge||Ye&&!ke[Ye])){for(var ze=-1,Ve=0;Ve<me.length;Ve++){var $e=He.indexOf(me[Ve]);$e!==-1&&(ze===-1||$e<ze)&&(ze=$e)}var nt,et;et=ze===-1?He.lastIndexOf("@"):He.lastIndexOf("@",ze),et!==-1&&(nt=He.slice(0,et),He=He.slice(et+1),this.auth=decodeURIComponent(nt)),ze=-1;for(var Ve=0;Ve<ye.length;Ve++){var $e=He.indexOf(ye[Ve]);$e!==-1&&(ze===-1||$e<ze)&&(ze=$e)}ze===-1&&(ze=He.length),this.host=He.slice(0,ze),He=He.slice(ze),this.parseHost(),this.hostname=this.hostname||"";var pt=this.hostname[0]==="["&&this.hostname[this.hostname.length-1]==="]";if(!pt)for(var ct=this.hostname.split(/\./),Ve=0,It=ct.length;Ve<It;Ve++){var dt=ct[Ve];if(dt&&!dt.match(ge)){for(var Mt="",xt=0,gt=dt.length;xt<gt;xt++)dt.charCodeAt(xt)>127?Mt+="x":Mt+=dt[xt];if(!Mt.match(ge)){var _t=ct.slice(0,Ve),We=ct.slice(Ve+1),Ae=dt.match(_e);Ae&&(_t.push(Ae[1]),We.unshift(Ae[2])),We.length&&(He="/"+We.join(".")+He),this.hostname=_t.join(".");break}}}this.hostname.length>255?this.hostname="":this.hostname=this.hostname.toLowerCase(),pt||(this.hostname=E.toASCII(this.hostname));var Se=this.port?":"+this.port:"",Be=this.hostname||"";this.host=Be+Se,this.href+=this.host,pt&&(this.hostname=this.hostname.substr(1,this.hostname.length-2),He[0]!=="/"&&(He="/"+He))}if(!he[ut])for(var Ve=0,It=ve.length;Ve<It;Ve++){var Ke=ve[Ve];if(He.indexOf(Ke)!==-1){var Ne=encodeURIComponent(Ke);Ne===Ke&&(Ne=escape(Ke)),He=He.split(Ke).join(Ne)}}var De=He.indexOf("#");De!==-1&&(this.hash=He.substr(De),He=He.slice(0,De));var we=He.indexOf("?");if(we!==-1?(this.search=He.substr(we),this.query=He.substr(we+1),Oe&&(this.query=Te.parse(this.query)),He=He.slice(0,we)):Oe&&(this.search="",this.query={}),He&&(this.pathname=He),ke[ut]&&this.hostname&&!this.pathname&&(this.pathname="/"),this.pathname||this.search){var Se=this.pathname||"",Le=this.search||"";this.path=Se+Le}return this.href=this.format(),this},se.prototype.format=function(){var Ee=this.auth||"";Ee&&(Ee=encodeURIComponent(Ee),Ee=Ee.replace(/%3A/i,":"),Ee+="@");var Oe=this.protocol||"",je=this.pathname||"",Pe=this.hash||"",Qe=!1,Xe="";this.host?Qe=Ee+this.host:this.hostname&&(Qe=Ee+(this.hostname.indexOf(":")===-1?this.hostname:"["+this.hostname+"]"),this.port&&(Qe+=":"+this.port)),this.query&&b.isObject(this.query)&&Object.keys(this.query).length&&(Xe=Te.stringify(this.query));var ot=this.search||Xe&&"?"+Xe||"";return Oe&&Oe.substr(-1)!==":"&&(Oe+=":"),this.slashes||(!Oe||ke[Oe])&&Qe!==!1?(Qe="//"+(Qe||""),je&&je.charAt(0)!=="/"&&(je="/"+je)):Qe||(Qe=""),Pe&&Pe.charAt(0)!=="#"&&(Pe="#"+Pe),ot&&ot.charAt(0)!=="?"&&(ot="?"+ot),je=je.replace(/[?#]/g,function(He){return encodeURIComponent(He)}),ot=ot.replace("#","%23"),Oe+Qe+je+ot+Pe},se.prototype.resolve=function(Ee){return this.resolveObject(te(Ee,!1,!0)).format()},se.prototype.resolveObject=function(Ee){if(b.isString(Ee)){var Oe=new se;Oe.parse(Ee,!1,!0),Ee=Oe}for(var je=new se,Pe=Object.keys(this),Qe=0;Qe<Pe.length;Qe++){var Xe=Pe[Qe];je[Xe]=this[Xe]}if(je.hash=Ee.hash,Ee.href==="")return je.href=je.format(),je;if(Ee.slashes&&!Ee.protocol){for(var ot=Object.keys(Ee),He=0;He<ot.length;He++){var rt=ot[He];rt!=="protocol"&&(je[rt]=Ee[rt])}return ke[je.protocol]&&je.hostname&&!je.pathname&&(je.path=je.pathname="/"),je.href=je.format(),je}if(Ee.protocol&&Ee.protocol!==je.protocol){if(!ke[Ee.protocol]){for(var Ye=Object.keys(Ee),ut=0;ut<Ye.length;ut++){var Ge=Ye[ut];je[Ge]=Ee[Ge]}return je.href=je.format(),je}if(je.protocol=Ee.protocol,Ee.host||pe[Ee.protocol])je.pathname=Ee.pathname;else{for(var It=(Ee.pathname||"").split("/");It.length&&!(Ee.host=It.shift()););Ee.host||(Ee.host=""),Ee.hostname||(Ee.hostname=""),It[0]!==""&&It.unshift(""),It.length<2&&It.unshift(""),je.pathname=It.join("/")}if(je.search=Ee.search,je.query=Ee.query,je.host=Ee.host||"",je.auth=Ee.auth,je.hostname=Ee.hostname||Ee.host,je.port=Ee.port,je.pathname||je.search){var ze=je.pathname||"",Ve=je.search||"";je.path=ze+Ve}return je.slashes=je.slashes||Ee.slashes,je.href=je.format(),je}var $e=je.pathname&&je.pathname.charAt(0)==="/",nt=Ee.host||Ee.pathname&&Ee.pathname.charAt(0)==="/",et=nt||$e||je.host&&Ee.pathname,pt=et,ct=je.pathname&&je.pathname.split("/")||[],It=Ee.pathname&&Ee.pathname.split("/")||[],dt=je.protocol&&!ke[je.protocol];if(dt&&(je.hostname="",je.port=null,je.host&&(ct[0]===""?ct[0]=je.host:ct.unshift(je.host)),je.host="",Ee.protocol&&(Ee.hostname=null,Ee.port=null,Ee.host&&(It[0]===""?It[0]=Ee.host:It.unshift(Ee.host)),Ee.host=null),et=et&&(It[0]===""||ct[0]==="")),nt)je.host=Ee.host||Ee.host===""?Ee.host:je.host,je.hostname=Ee.hostname||Ee.hostname===""?Ee.hostname:je.hostname,je.search=Ee.search,je.query=Ee.query,ct=It;else if(It.length)ct||(ct=[]),ct.pop(),ct=ct.concat(It),je.search=Ee.search,je.query=Ee.query;else if(!b.isNullOrUndefined(Ee.search)){if(dt){je.hostname=je.host=ct.shift();var Mt=!!(je.host&&je.host.indexOf("@")>0)&&je.host.split("@");Mt&&(je.auth=Mt.shift(),je.host=je.hostname=Mt.shift())}return je.search=Ee.search,je.query=Ee.query,b.isNull(je.pathname)&&b.isNull(je.search)||(je.path=(je.pathname?je.pathname:"")+(je.search?je.search:"")),je.href=je.format(),je}if(!ct.length)return je.pathname=null,je.search?je.path="/"+je.search:je.path=null,je.href=je.format(),je;for(var xt=ct.slice(-1)[0],gt=(je.host||Ee.host||ct.length>1)&&(xt==="."||xt==="..")||xt==="",_t=0,We=ct.length;We>=0;We--)xt=ct[We],xt==="."?ct.splice(We,1):xt===".."?(ct.splice(We,1),_t++):_t&&(ct.splice(We,1),_t--);if(!et&&!pt)for(;_t--;_t)ct.unshift("..");!et||ct[0]===""||ct[0]&&ct[0].charAt(0)==="/"||ct.unshift(""),gt&&ct.join("/").substr(-1)!=="/"&&ct.push("");var Ae=ct[0]===""||ct[0]&&ct[0].charAt(0)==="/";if(dt){je.hostname=je.host=Ae?"":ct.length?ct.shift():"";var Mt=!!(je.host&&je.host.indexOf("@")>0)&&je.host.split("@");Mt&&(je.auth=Mt.shift(),je.host=je.hostname=Mt.shift())}return et=et||je.host&&ct.length,et&&!Ae&&ct.unshift(""),ct.length?je.pathname=ct.join("/"):(je.pathname=null,je.path=null),b.isNull(je.pathname)&&b.isNull(je.search)||(je.path=(je.pathname?je.pathname:"")+(je.search?je.search:"")),je.auth=Ee.auth||je.auth,je.slashes=je.slashes||Ee.slashes,je.href=je.format(),je},se.prototype.parseHost=function(){var Ee=this.host,Oe=x.exec(Ee);Oe&&(Oe=Oe[0],Oe!==":"&&(this.port=Oe.substr(1)),Ee=Ee.substr(0,Ee.length-Oe.length)),Ee&&(this.hostname=Ee)}},{"./util":204,punycode:174,querystring:177}],204:[function(ie,Ce,ue){"use strict";Ce.exports={isString:function(se){return typeof se=="string"},isObject:function(se){return typeof se=="object"&&se!==null},isNull:function(se){return se===null},isNullOrUndefined:function(se){return se==null}}},{}],205:[function(ie,Ce,ue){(function(se){function te(ee,ne){function E(){if(!b){if(le("throwDeprecation"))throw new Error(ne);le("traceDeprecation")?console.trace(ne):console.warn(ne),b=!0}return ee.apply(this,arguments)}if(le("noDeprecation"))return ee;var b=!1;return E}function le(ee){try{if(!se.localStorage)return!1}catch(E){return!1}var ne=se.localStorage[ee];return ne!=null&&String(ne).toLowerCase()==="true"}Ce.exports=te}).call(this,typeof be.g!="undefined"?be.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],206:[function(ie,Ce,ue){Ce.exports=function(se){return se&&typeof se=="object"&&typeof se.copy=="function"&&typeof se.fill=="function"&&typeof se.readUInt8=="function"}},{}],207:[function(ie,Ce,ue){(function(se,te){function le(Ve,$e){var nt={seen:[],stylize:ne};return arguments.length>=3&&(nt.depth=arguments[2]),arguments.length>=4&&(nt.colors=arguments[3]),ye($e)?nt.showHidden=$e:$e&&ue._extend(nt,$e),ke(nt.showHidden)&&(nt.showHidden=!1),ke(nt.depth)&&(nt.depth=2),ke(nt.colors)&&(nt.colors=!1),ke(nt.customInspect)&&(nt.customInspect=!0),nt.colors&&(nt.stylize=ee),b(nt,Ve,nt.depth)}function ee(Ve,$e){var nt=le.styles[$e];return nt?"\x1B["+le.colors[nt][0]+"m"+Ve+"\x1B["+le.colors[nt][1]+"m":Ve}function ne(Ve,$e){return Ve}function E(Ve){var $e={};return Ve.forEach(function(nt,et){$e[nt]=!0}),$e}function b(Ve,$e,nt){if(Ve.customInspect&&$e&&Pe($e.inspect)&&$e.inspect!==ue.inspect&&(!$e.constructor||$e.constructor.prototype!==$e)){var et=$e.inspect(nt,Ve);return he(et)||(et=b(Ve,et,nt)),et}var pt=z(Ve,$e);if(pt)return pt;var ct=Object.keys($e),It=E(ct);if(Ve.showHidden&&(ct=Object.getOwnPropertyNames($e)),je($e)&&(ct.indexOf("message")>=0||ct.indexOf("description")>=0))return x($e);if(ct.length===0){if(Pe($e)){var dt=$e.name?": "+$e.name:"";return Ve.stylize("[Function"+dt+"]","special")}if(Te($e))return Ve.stylize(RegExp.prototype.toString.call($e),"regexp");if(Oe($e))return Ve.stylize(Date.prototype.toString.call($e),"date");if(je($e))return x($e)}var Mt="",xt=!1,gt=["{","}"];if(ve($e)&&(xt=!0,gt=["[","]"]),Pe($e)&&(Mt=" [Function"+($e.name?": "+$e.name:"")+"]"),Te($e)&&(Mt=" "+RegExp.prototype.toString.call($e)),Oe($e)&&(Mt=" "+Date.prototype.toUTCString.call($e)),je($e)&&(Mt=" "+x($e)),ct.length===0&&(!xt||$e.length==0))return gt[0]+Mt+gt[1];if(nt<0)return Te($e)?Ve.stylize(RegExp.prototype.toString.call($e),"regexp"):Ve.stylize("[Object]","special");Ve.seen.push($e);var _t;return _t=xt?re(Ve,$e,nt,It,ct):ct.map(function(We){return ae(Ve,$e,nt,It,We,xt)}),Ve.seen.pop(),oe(_t,Mt,gt)}function z(Ve,$e){if(ke($e))return Ve.stylize("undefined","undefined");if(he($e)){var nt="'"+JSON.stringify($e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return Ve.stylize(nt,"string")}return _e($e)?Ve.stylize(""+$e,"number"):ye($e)?Ve.stylize(""+$e,"boolean"):me($e)?Ve.stylize("null","null"):void 0}function x(Ve){return"["+Error.prototype.toString.call(Ve)+"]"}function re(Ve,$e,nt,et,pt){for(var ct=[],It=0,dt=$e.length;It<dt;++It)rt($e,String(It))?ct.push(ae(Ve,$e,nt,et,String(It),!0)):ct.push("");return pt.forEach(function(Mt){Mt.match(/^\d+$/)||ct.push(ae(Ve,$e,nt,et,Mt,!0))}),ct}function ae(Ve,$e,nt,et,pt,ct){var It,dt,Mt;if(Mt=Object.getOwnPropertyDescriptor($e,pt)||{value:$e[pt]},Mt.get?dt=Mt.set?Ve.stylize("[Getter/Setter]","special"):Ve.stylize("[Getter]","special"):Mt.set&&(dt=Ve.stylize("[Setter]","special")),rt(et,pt)||(It="["+pt+"]"),dt||(Ve.seen.indexOf(Mt.value)<0?(dt=me(nt)?b(Ve,Mt.value,null):b(Ve,Mt.value,nt-1),dt.indexOf(`
|
|
|
`)>-1&&(dt=ct?dt.split(`
|
|
|
`).map(function(xt){return" "+xt}).join(`
|
|
|
`).substr(2):`
|
|
|
`+dt.split(`
|
|
|
`).map(function(xt){return" "+xt}).join(`
|
|
|
`))):dt=Ve.stylize("[Circular]","special")),ke(It)){if(ct&&pt.match(/^\d+$/))return dt;It=JSON.stringify(""+pt),It.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(It=It.substr(1,It.length-2),It=Ve.stylize(It,"name")):(It=It.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),It=Ve.stylize(It,"string"))}return It+": "+dt}function oe(Ve,$e,nt){var et=0;return Ve.reduce(function(pt,ct){return et++,ct.indexOf(`
|
|
|
`)>=0&&et++,pt+ct.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?nt[0]+($e===""?"":$e+`
|
|
|
`)+" "+Ve.join(`,
|
|
|
`)+" "+nt[1]:nt[0]+$e+" "+Ve.join(", ")+" "+nt[1]}function ve(Ve){return Array.isArray(Ve)}function ye(Ve){return typeof Ve=="boolean"}function me(Ve){return Ve===null}function ge(Ve){return Ve==null}function _e(Ve){return typeof Ve=="number"}function he(Ve){return typeof Ve=="string"}function pe(Ve){return typeof Ve=="symbol"}function ke(Ve){return Ve===void 0}function Te(Ve){return Ee(Ve)&&Xe(Ve)==="[object RegExp]"}function Ee(Ve){return typeof Ve=="object"&&Ve!==null}function Oe(Ve){return Ee(Ve)&&Xe(Ve)==="[object Date]"}function je(Ve){return Ee(Ve)&&(Xe(Ve)==="[object Error]"||Ve instanceof Error)}function Pe(Ve){return typeof Ve=="function"}function Qe(Ve){return Ve===null||typeof Ve=="boolean"||typeof Ve=="number"||typeof Ve=="string"||typeof Ve=="symbol"||Ve===void 0}function Xe(Ve){return Object.prototype.toString.call(Ve)}function ot(Ve){return Ve<10?"0"+Ve.toString(10):Ve.toString(10)}function He(){var Ve=new Date,$e=[ot(Ve.getHours()),ot(Ve.getMinutes()),ot(Ve.getSeconds())].join(":");return[Ve.getDate(),ze[Ve.getMonth()],$e].join(" ")}function rt(Ve,$e){return Object.prototype.hasOwnProperty.call(Ve,$e)}var Ye=/%[sdj%]/g;ue.format=function(Ve){if(!he(Ve)){for(var $e=[],nt=0;nt<arguments.length;nt++)$e.push(le(arguments[nt]));return $e.join(" ")}for(var nt=1,et=arguments,pt=et.length,ct=String(Ve).replace(Ye,function(Mt){if(Mt==="%%")return"%";if(nt>=pt)return Mt;switch(Mt){case"%s":return String(et[nt++]);case"%d":return Number(et[nt++]);case"%j":try{return JSON.stringify(et[nt++])}catch(xt){return"[Circular]"}default:return Mt}}),It=et[nt];nt<pt;It=et[++nt])me(It)||!Ee(It)?ct+=" "+It:ct+=" "+le(It);return ct},ue.deprecate=function(Ve,$e){function nt(){if(!et){if(se.throwDeprecation)throw new Error($e);se.traceDeprecation?console.trace($e):console.error($e),et=!0}return Ve.apply(this,arguments)}if(ke(te.process))return function(){return ue.deprecate(Ve,$e).apply(this,arguments)};if(se.noDeprecation===!0)return Ve;var et=!1;return nt};var ut,Ge={};ue.debuglog=function(Ve){if(ke(ut)&&(ut=se.env.NODE_DEBUG||""),Ve=Ve.toUpperCase(),!Ge[Ve])if(new RegExp("\\b"+Ve+"\\b","i").test(ut)){var $e=se.pid;Ge[Ve]=function(){var nt=ue.format.apply(ue,arguments);console.error("%s %d: %s",Ve,$e,nt)}}else Ge[Ve]=function(){};return Ge[Ve]},ue.inspect=le,le.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},le.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},ue.isArray=ve,ue.isBoolean=ye,ue.isNull=me,ue.isNullOrUndefined=ge,ue.isNumber=_e,ue.isString=he,ue.isSymbol=pe,ue.isUndefined=ke,ue.isRegExp=Te,ue.isObject=Ee,ue.isDate=Oe,ue.isError=je,ue.isFunction=Pe,ue.isPrimitive=Qe,ue.isBuffer=ie("./support/isBuffer");var ze=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];ue.log=function(){console.log("%s - %s",He(),ue.format.apply(ue,arguments))},ue.inherits=ie("inherits"),ue._extend=function(Ve,$e){if(!$e||!Ee($e))return Ve;for(var nt=Object.keys($e),et=nt.length;et--;)Ve[nt[et]]=$e[nt[et]];return Ve}}).call(this,ie("_process"),typeof be.g!="undefined"?be.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"./support/isBuffer":206,_process:173,inherits:162}],208:[function(ie,Ce,ue){"use strict";(function(){ue.stripBOM=function(se){return se[0]==="\uFEFF"?se.substring(1):se}}).call(void 0)},{}],209:[function(ie,Ce,ue){"use strict";function se(E){return E&&E.__esModule?E:{default:E}}var te=ie("babel-runtime/helpers/typeof"),le=se(te),ee=ie("babel-runtime/core-js/object/keys"),ne=se(ee);(function(){var E,b,z,x,re,ae={}.hasOwnProperty;E=ie("xmlbuilder"),b=ie("./defaults").defaults,x=function(oe){return typeof oe=="string"&&(oe.indexOf("&")>=0||oe.indexOf(">")>=0||oe.indexOf("<")>=0)},re=function(oe){return"<![CDATA["+z(oe)+"]]>"},z=function(oe){return oe.replace("]]>","]]]]><![CDATA[>")},ue.Builder=function(){function oe(ve){var ye,me,ge;this.options={},me=b[.2];for(ye in me)ae.call(me,ye)&&(ge=me[ye],this.options[ye]=ge);for(ye in ve)ae.call(ve,ye)&&(ge=ve[ye],this.options[ye]=ge)}return oe.prototype.buildObject=function(ve){var ye,me,ge,_e,he;return ye=this.options.attrkey,me=this.options.charkey,(0,ne.default)(ve).length===1&&this.options.rootName===b[.2].rootName?(he=(0,ne.default)(ve)[0],ve=ve[he]):he=this.options.rootName,ge=function(pe){return function(ke,Te){var Ee,Oe,je,Pe,Qe,Xe;if((Te===void 0?"undefined":(0,le.default)(Te))!=="object")pe.options.cdata&&x(Te)?ke.raw(re(Te)):ke.txt(Te);else if(Array.isArray(Te)){for(Pe in Te)if(ae.call(Te,Pe)){Oe=Te[Pe];for(Qe in Oe)je=Oe[Qe],ke=ge(ke.ele(Qe),je).up()}}else for(Qe in Te)if(ae.call(Te,Qe))if(Oe=Te[Qe],Qe===ye){if((Oe===void 0?"undefined":(0,le.default)(Oe))==="object")for(Ee in Oe)Xe=Oe[Ee],ke=ke.att(Ee,Xe)}else if(Qe===me)ke=pe.options.cdata&&x(Oe)?ke.raw(re(Oe)):ke.txt(Oe);else if(Array.isArray(Oe))for(Pe in Oe)ae.call(Oe,Pe)&&(je=Oe[Pe],ke=typeof je=="string"?pe.options.cdata&&x(je)?ke.ele(Qe).raw(re(je)).up():ke.ele(Qe,je).up():ge(ke.ele(Qe),je).up());else(Oe===void 0?"undefined":(0,le.default)(Oe))==="object"?ke=ge(ke.ele(Qe),Oe).up():typeof Oe=="string"&&pe.options.cdata&&x(Oe)?ke=ke.ele(Qe).raw(re(Oe)).up():(Oe==null&&(Oe=""),ke=ke.ele(Qe,Oe.toString()).up());return ke}}(this),_e=E.create(he,this.options.xmldec,this.options.doctype,{headless:this.options.headless,allowSurrogateChars:this.options.allowSurrogateChars}),ge(_e,ve).end(this.options.renderOpts)},oe}()}).call(void 0)},{"./defaults":210,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,xmlbuilder:235}],210:[function(ie,Ce,ue){"use strict";(function(){ue.defaults={.1:{explicitCharkey:!1,trim:!0,normalize:!0,normalizeTags:!1,attrkey:"@",charkey:"#",explicitArray:!1,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!1,validator:null,xmlns:!1,explicitChildren:!1,childkey:"@@",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,emptyTag:""},.2:{explicitCharkey:!1,trim:!1,normalize:!1,normalizeTags:!1,attrkey:"$",charkey:"_",explicitArray:!0,ignoreAttrs:!1,mergeAttrs:!1,explicitRoot:!0,validator:null,xmlns:!1,explicitChildren:!1,preserveChildrenOrder:!1,childkey:"$$",charsAsChildren:!1,includeWhiteChars:!1,async:!1,strict:!0,attrNameProcessors:null,attrValueProcessors:null,tagNameProcessors:null,valueProcessors:null,rootName:"root",xmldec:{version:"1.0",encoding:"UTF-8",standalone:!0},doctype:null,renderOpts:{pretty:!0,indent:" ",newline:`
|
|
|
`},headless:!1,chunkSize:1e4,emptyTag:"",cdata:!1}}}).call(void 0)},{}],211:[function(ie,Ce,ue){"use strict";function se(z){return z&&z.__esModule?z:{default:z}}var te=ie("babel-runtime/core-js/object/get-own-property-names"),le=se(te),ee=ie("babel-runtime/core-js/object/keys"),ne=se(ee),E=ie("babel-runtime/helpers/typeof"),b=se(E);(function(){var z,x,re,ae,oe,ve,ye,me,ge=function(pe,ke){return function(){return pe.apply(ke,arguments)}},_e=function(pe,ke){function Te(){this.constructor=pe}for(var Ee in ke)he.call(ke,Ee)&&(pe[Ee]=ke[Ee]);return Te.prototype=ke.prototype,pe.prototype=new Te,pe.__super__=ke.prototype,pe},he={}.hasOwnProperty;ye=ie("sax"),re=ie("events"),z=ie("./bom"),ve=ie("./processors"),me=ie("timers").setImmediate,x=ie("./defaults").defaults,ae=function(pe){return(pe===void 0?"undefined":(0,b.default)(pe))==="object"&&pe!=null&&(0,ne.default)(pe).length===0},oe=function(pe,ke,Te){var Ee,Oe,je;for(Ee=0,Oe=pe.length;Ee<Oe;Ee++)je=pe[Ee],ke=je(ke,Te);return ke},ue.Parser=function(pe){function ke(Te){this.parseString=ge(this.parseString,this),this.reset=ge(this.reset,this),this.assignOrPush=ge(this.assignOrPush,this),this.processAsync=ge(this.processAsync,this);var Ee,Oe,je;if(!(this instanceof ue.Parser))return new ue.Parser(Te);this.options={},Oe=x[.2];for(Ee in Oe)he.call(Oe,Ee)&&(je=Oe[Ee],this.options[Ee]=je);for(Ee in Te)he.call(Te,Ee)&&(je=Te[Ee],this.options[Ee]=je);this.options.xmlns&&(this.options.xmlnskey=this.options.attrkey+"ns"),this.options.normalizeTags&&(this.options.tagNameProcessors||(this.options.tagNameProcessors=[]),this.options.tagNameProcessors.unshift(ve.normalize)),this.reset()}return _e(ke,pe),ke.prototype.processAsync=function(){var Te,Ee;try{return this.remaining.length<=this.options.chunkSize?(Te=this.remaining,this.remaining="",this.saxParser=this.saxParser.write(Te),this.saxParser.close()):(Te=this.remaining.substr(0,this.options.chunkSize),this.remaining=this.remaining.substr(this.options.chunkSize,this.remaining.length),this.saxParser=this.saxParser.write(Te),me(this.processAsync))}catch(Oe){if(Ee=Oe,!this.saxParser.errThrown)return this.saxParser.errThrown=!0,this.emit(Ee)}},ke.prototype.assignOrPush=function(Te,Ee,Oe){return Ee in Te?(Te[Ee]instanceof Array||(Te[Ee]=[Te[Ee]]),Te[Ee].push(Oe)):this.options.explicitArray?Te[Ee]=[Oe]:Te[Ee]=Oe},ke.prototype.reset=function(){var Te,Ee,Oe,je;return this.removeAllListeners(),this.saxParser=ye.parser(this.options.strict,{trim:!1,normalize:!1,xmlns:this.options.xmlns}),this.saxParser.errThrown=!1,this.saxParser.onerror=function(Pe){return function(Qe){if(Pe.saxParser.resume(),!Pe.saxParser.errThrown)return Pe.saxParser.errThrown=!0,Pe.emit("error",Qe)}}(this),this.saxParser.onend=function(Pe){return function(){if(!Pe.saxParser.ended)return Pe.saxParser.ended=!0,Pe.emit("end",Pe.resultObject)}}(this),this.saxParser.ended=!1,this.EXPLICIT_CHARKEY=this.options.explicitCharkey,this.resultObject=null,je=[],Te=this.options.attrkey,Ee=this.options.charkey,this.saxParser.onopentag=function(Pe){return function(Qe){var Xe,ot,He,rt,Ye;if(He={},He[Ee]="",!Pe.options.ignoreAttrs){Ye=Qe.attributes;for(Xe in Ye)he.call(Ye,Xe)&&(Te in He||Pe.options.mergeAttrs||(He[Te]={}),ot=Pe.options.attrValueProcessors?oe(Pe.options.attrValueProcessors,Qe.attributes[Xe],Xe):Qe.attributes[Xe],rt=Pe.options.attrNameProcessors?oe(Pe.options.attrNameProcessors,Xe):Xe,Pe.options.mergeAttrs?Pe.assignOrPush(He,rt,ot):He[Te][rt]=ot)}return He["#name"]=Pe.options.tagNameProcessors?oe(Pe.options.tagNameProcessors,Qe.name):Qe.name,Pe.options.xmlns&&(He[Pe.options.xmlnskey]={uri:Qe.uri,local:Qe.local}),je.push(He)}}(this),this.saxParser.onclosetag=function(Pe){return function(){var Qe,Xe,ot,He,rt,Ye,ut,Ge,ze,Ve;if(Ye=je.pop(),rt=Ye["#name"],Pe.options.explicitChildren&&Pe.options.preserveChildrenOrder||delete Ye["#name"],Ye.cdata===!0&&(Qe=Ye.cdata,delete Ye.cdata),ze=je[je.length-1],Ye[Ee].match(/^\s*$/)&&!Qe?(Xe=Ye[Ee],delete Ye[Ee]):(Pe.options.trim&&(Ye[Ee]=Ye[Ee].trim()),Pe.options.normalize&&(Ye[Ee]=Ye[Ee].replace(/\s{2,}/g," ").trim()),Ye[Ee]=Pe.options.valueProcessors?oe(Pe.options.valueProcessors,Ye[Ee],rt):Ye[Ee],(0,ne.default)(Ye).length===1&&Ee in Ye&&!Pe.EXPLICIT_CHARKEY&&(Ye=Ye[Ee])),ae(Ye)&&(Ye=Pe.options.emptyTag!==""?Pe.options.emptyTag:Xe),Pe.options.validator!=null&&(Ve="/"+function(){var $e,nt,et;for(et=[],$e=0,nt=je.length;$e<nt;$e++)He=je[$e],et.push(He["#name"]);return et}().concat(rt).join("/"),function(){var $e;try{Ye=Pe.options.validator(Ve,ze&&ze[rt],Ye)}catch(nt){return $e=nt,Pe.emit("error",$e)}}()),Pe.options.explicitChildren&&!Pe.options.mergeAttrs&&(Ye===void 0?"undefined":(0,b.default)(Ye))==="object")if(Pe.options.preserveChildrenOrder){if(ze){ze[Pe.options.childkey]=ze[Pe.options.childkey]||[],ut={};for(ot in Ye)he.call(Ye,ot)&&(ut[ot]=Ye[ot]);ze[Pe.options.childkey].push(ut),delete Ye["#name"],(0,ne.default)(Ye).length===1&&Ee in Ye&&!Pe.EXPLICIT_CHARKEY&&(Ye=Ye[Ee])}}else He={},Pe.options.attrkey in Ye&&(He[Pe.options.attrkey]=Ye[Pe.options.attrkey],delete Ye[Pe.options.attrkey]),!Pe.options.charsAsChildren&&Pe.options.charkey in Ye&&(He[Pe.options.charkey]=Ye[Pe.options.charkey],delete Ye[Pe.options.charkey]),(0,le.default)(Ye).length>0&&(He[Pe.options.childkey]=Ye),Ye=He;return je.length>0?Pe.assignOrPush(ze,rt,Ye):(Pe.options.explicitRoot&&(Ge=Ye,Ye={},Ye[rt]=Ge),Pe.resultObject=Ye,Pe.saxParser.ended=!0,Pe.emit("end",Pe.resultObject))}}(this),Oe=function(Pe){return function(Qe){var Xe,ot;if(ot=je[je.length-1])return ot[Ee]+=Qe,Pe.options.explicitChildren&&Pe.options.preserveChildrenOrder&&Pe.options.charsAsChildren&&(Pe.options.includeWhiteChars||Qe.replace(/\\n/g,"").trim()!=="")&&(ot[Pe.options.childkey]=ot[Pe.options.childkey]||[],Xe={"#name":"__text__"},Xe[Ee]=Qe,Pe.options.normalize&&(Xe[Ee]=Xe[Ee].replace(/\s{2,}/g," ").trim()),ot[Pe.options.childkey].push(Xe)),ot}}(this),this.saxParser.ontext=Oe,this.saxParser.oncdata=function(Pe){return function(Qe){var Xe;if(Xe=Oe(Qe))return Xe.cdata=!0}}()},ke.prototype.parseString=function(Te,Ee){var Oe;Ee!=null&&typeof Ee=="function"&&(this.on("end",function(je){return this.reset(),Ee(null,je)}),this.on("error",function(je){return this.reset(),Ee(je)}));try{return Te=Te.toString(),Te.trim()===""?(this.emit("end",null),!0):(Te=z.stripBOM(Te),this.options.async?(this.remaining=Te,me(this.processAsync),this.saxParser):this.saxParser.write(Te).close())}catch(je){if(Oe=je,!this.saxParser.errThrown&&!this.saxParser.ended)return this.emit("error",Oe),this.saxParser.errThrown=!0;if(this.saxParser.ended)throw Oe}},ke}(re.EventEmitter),ue.parseString=function(pe,ke,Te){var Ee,Oe,je;return Te!=null?(typeof Te=="function"&&(Ee=Te),(ke===void 0?"undefined":(0,b.default)(ke))==="object"&&(Oe=ke)):(typeof ke=="function"&&(Ee=ke),Oe={}),je=new ue.Parser(Oe),je.parseString(pe,Ee)}}).call(void 0)},{"./bom":208,"./defaults":210,"./processors":212,"babel-runtime/core-js/object/get-own-property-names":21,"babel-runtime/core-js/object/keys":23,"babel-runtime/helpers/typeof":32,events:158,sax:194,timers:201}],212:[function(ie,Ce,ue){"use strict";(function(){var se;se=new RegExp(/(?!xmlns)^.*:/),ue.normalize=function(te){return te.toLowerCase()},ue.firstCharLowerCase=function(te){return te.charAt(0).toLowerCase()+te.slice(1)},ue.stripPrefix=function(te){return te.replace(se,"")},ue.parseNumbers=function(te){return isNaN(te)||(te=te%1==0?parseInt(te,10):parseFloat(te)),te},ue.parseBooleans=function(te){return/^(?:true|false)$/i.test(te)&&(te=te.toLowerCase()==="true"),te}}).call(void 0)},{}],213:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne=function(b,z){function x(){this.constructor=b}for(var re in z)E.call(z,re)&&(b[re]=z[re]);return x.prototype=z.prototype,b.prototype=new x,b.__super__=z.prototype,b},E={}.hasOwnProperty;te=ie("./defaults"),se=ie("./builder"),le=ie("./parser"),ee=ie("./processors"),ue.defaults=te.defaults,ue.processors=ee,ue.ValidationError=function(b){function z(x){this.message=x}return ne(z,b),z}(Error),ue.Builder=se.Builder,ue.Parser=le.Parser,ue.parseString=le.parseString}).call(void 0)},{"./builder":209,"./defaults":210,"./parser":211,"./processors":212}],214:[function(ie,Ce,ue){"use strict";function se(z){return z&&z.__esModule?z:{default:z}}var te=ie("babel-runtime/core-js/object/get-prototype-of"),le=se(te),ee=ie("babel-runtime/helpers/typeof"),ne=se(ee),E=ie("babel-runtime/core-js/object/assign"),b=se(E);(function(){var z,x,re,ae,oe,ve,ye=[].slice,me={}.hasOwnProperty;z=function(){var ge,_e,he,pe,ke,Te;if(Te=arguments[0],ke=2<=arguments.length?ye.call(arguments,1):[],ae(b.default))b.default.apply(null,arguments);else for(ge=0,he=ke.length;ge<he;ge++)if((pe=ke[ge])!=null)for(_e in pe)me.call(pe,_e)&&(Te[_e]=pe[_e]);return Te},ae=function(ge){return!!ge&&Object.prototype.toString.call(ge)==="[object Function]"},oe=function(ge){var _e;return!!ge&&((_e=ge===void 0?"undefined":(0,ne.default)(ge))==="function"||_e==="object")},x=function(ge){return ae(Array.isArray)?Array.isArray(ge):Object.prototype.toString.call(ge)==="[object Array]"},re=function(ge){var _e;if(x(ge))return!ge.length;for(_e in ge)if(me.call(ge,_e))return!1;return!0},ve=function(ge){var _e,he;return oe(ge)&&(he=(0,le.default)(ge))&&(_e=he.constructor)&&typeof _e=="function"&&_e instanceof _e&&Function.prototype.toString.call(_e)===Function.prototype.toString.call(Object)},Ce.exports.assign=z,Ce.exports.isFunction=ae,Ce.exports.isObject=oe,Ce.exports.isArray=x,Ce.exports.isEmpty=re,Ce.exports.isPlainObject=ve}).call(void 0)},{"babel-runtime/core-js/object/assign":18,"babel-runtime/core-js/object/get-prototype-of":22,"babel-runtime/helpers/typeof":32}],215:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){Ce.exports=function(){function le(ee,ne,E){if(this.options=ee.options,this.stringify=ee.stringify,ne==null)throw new Error("Missing attribute name of element "+ee.name);if(E==null)throw new Error("Missing attribute value for attribute "+ne+" of element "+ee.name);this.name=this.stringify.attName(ne),this.value=this.stringify.attValue(E)}return le.prototype.clone=function(){return(0,te.default)(this)},le.prototype.toString=function(ee){return this.options.writer.set(ee).attribute(this)},le}()}).call(void 0)},{"babel-runtime/core-js/object/create":19}],216:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){var le,ee=function(E,b){function z(){this.constructor=E}for(var x in b)ne.call(b,x)&&(E[x]=b[x]);return z.prototype=b.prototype,E.prototype=new z,E.__super__=b.prototype,E},ne={}.hasOwnProperty;le=ie("./XMLNode"),Ce.exports=function(E){function b(z,x){if(b.__super__.constructor.call(this,z),x==null)throw new Error("Missing CDATA text");this.text=this.stringify.cdata(x)}return ee(b,E),b.prototype.clone=function(){return(0,te.default)(this)},b.prototype.toString=function(z){return this.options.writer.set(z).cdata(this)},b}(le)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],217:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){var le,ee=function(E,b){function z(){this.constructor=E}for(var x in b)ne.call(b,x)&&(E[x]=b[x]);return z.prototype=b.prototype,E.prototype=new z,E.__super__=b.prototype,E},ne={}.hasOwnProperty;le=ie("./XMLNode"),Ce.exports=function(E){function b(z,x){if(b.__super__.constructor.call(this,z),x==null)throw new Error("Missing comment text");this.text=this.stringify.comment(x)}return ee(b,E),b.prototype.clone=function(){return(0,te.default)(this)},b.prototype.toString=function(z){return this.options.writer.set(z).comment(this)},b}(le)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],218:[function(ie,Ce,ue){"use strict";(function(){var se,te=function(ee,ne){function E(){this.constructor=ee}for(var b in ne)le.call(ne,b)&&(ee[b]=ne[b]);return E.prototype=ne.prototype,ee.prototype=new E,ee.__super__=ne.prototype,ee},le={}.hasOwnProperty;se=ie("./XMLNode"),Ce.exports=function(ee){function ne(E,b,z,x,re,ae){if(ne.__super__.constructor.call(this,E),b==null)throw new Error("Missing DTD element name");if(z==null)throw new Error("Missing DTD attribute name");if(!x)throw new Error("Missing DTD attribute type");if(!re)throw new Error("Missing DTD attribute default");if(re.indexOf("#")!==0&&(re="#"+re),!re.match(/^(#REQUIRED|#IMPLIED|#FIXED|#DEFAULT)$/))throw new Error("Invalid default value type; expected: #REQUIRED, #IMPLIED, #FIXED or #DEFAULT");if(ae&&!re.match(/^(#FIXED|#DEFAULT)$/))throw new Error("Default value only applies to #FIXED or #DEFAULT");this.elementName=this.stringify.eleName(b),this.attributeName=this.stringify.attName(z),this.attributeType=this.stringify.dtdAttType(x),this.defaultValue=this.stringify.dtdAttDefault(ae),this.defaultValueType=re}return te(ne,ee),ne.prototype.toString=function(E){return this.options.writer.set(E).dtdAttList(this)},ne}(se)}).call(void 0)},{"./XMLNode":227}],219:[function(ie,Ce,ue){"use strict";(function(){var se,te=function(ee,ne){function E(){this.constructor=ee}for(var b in ne)le.call(ne,b)&&(ee[b]=ne[b]);return E.prototype=ne.prototype,ee.prototype=new E,ee.__super__=ne.prototype,ee},le={}.hasOwnProperty;se=ie("./XMLNode"),Ce.exports=function(ee){function ne(E,b,z){if(ne.__super__.constructor.call(this,E),b==null)throw new Error("Missing DTD element name");z||(z="(#PCDATA)"),Array.isArray(z)&&(z="("+z.join(",")+")"),this.name=this.stringify.eleName(b),this.value=this.stringify.dtdElementValue(z)}return te(ne,ee),ne.prototype.toString=function(E){return this.options.writer.set(E).dtdElement(this)},ne}(se)}).call(void 0)},{"./XMLNode":227}],220:[function(ie,Ce,ue){"use strict";(function(){var se,te,le=function(ne,E){function b(){this.constructor=ne}for(var z in E)ee.call(E,z)&&(ne[z]=E[z]);return b.prototype=E.prototype,ne.prototype=new b,ne.__super__=E.prototype,ne},ee={}.hasOwnProperty;te=ie("./Utility").isObject,se=ie("./XMLNode"),Ce.exports=function(ne){function E(b,z,x,re){if(E.__super__.constructor.call(this,b),x==null)throw new Error("Missing entity name");if(re==null)throw new Error("Missing entity value");if(this.pe=!!z,this.name=this.stringify.eleName(x),te(re)){if(!re.pubID&&!re.sysID)throw new Error("Public and/or system identifiers are required for an external entity");if(re.pubID&&!re.sysID)throw new Error("System identifier is required for a public external entity");if(re.pubID!=null&&(this.pubID=this.stringify.dtdPubID(re.pubID)),re.sysID!=null&&(this.sysID=this.stringify.dtdSysID(re.sysID)),re.nData!=null&&(this.nData=this.stringify.dtdNData(re.nData)),this.pe&&this.nData)throw new Error("Notation declaration is not allowed in a parameter entity")}else this.value=this.stringify.dtdEntityValue(re)}return le(E,ne),E.prototype.toString=function(b){return this.options.writer.set(b).dtdEntity(this)},E}(se)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],221:[function(ie,Ce,ue){"use strict";(function(){var se,te=function(ee,ne){function E(){this.constructor=ee}for(var b in ne)le.call(ne,b)&&(ee[b]=ne[b]);return E.prototype=ne.prototype,ee.prototype=new E,ee.__super__=ne.prototype,ee},le={}.hasOwnProperty;se=ie("./XMLNode"),Ce.exports=function(ee){function ne(E,b,z){if(ne.__super__.constructor.call(this,E),b==null)throw new Error("Missing notation name");if(!z.pubID&&!z.sysID)throw new Error("Public or system identifiers are required for an external entity");this.name=this.stringify.eleName(b),z.pubID!=null&&(this.pubID=this.stringify.dtdPubID(z.pubID)),z.sysID!=null&&(this.sysID=this.stringify.dtdSysID(z.sysID))}return te(ne,ee),ne.prototype.toString=function(E){return this.options.writer.set(E).dtdNotation(this)},ne}(se)}).call(void 0)},{"./XMLNode":227}],222:[function(ie,Ce,ue){"use strict";(function(){var se,te,le=function(ne,E){function b(){this.constructor=ne}for(var z in E)ee.call(E,z)&&(ne[z]=E[z]);return b.prototype=E.prototype,ne.prototype=new b,ne.__super__=E.prototype,ne},ee={}.hasOwnProperty;te=ie("./Utility").isObject,se=ie("./XMLNode"),Ce.exports=function(ne){function E(b,z,x,re){var ae;E.__super__.constructor.call(this,b),te(z)&&(ae=z,z=ae.version,x=ae.encoding,re=ae.standalone),z||(z="1.0"),this.version=this.stringify.xmlVersion(z),x!=null&&(this.encoding=this.stringify.xmlEncoding(x)),re!=null&&(this.standalone=this.stringify.xmlStandalone(re))}return le(E,ne),E.prototype.toString=function(b){return this.options.writer.set(b).declaration(this)},E}(se)}).call(void 0)},{"./Utility":214,"./XMLNode":227}],223:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne,E,b=function(x,re){function ae(){this.constructor=x}for(var oe in re)z.call(re,oe)&&(x[oe]=re[oe]);return ae.prototype=re.prototype,x.prototype=new ae,x.__super__=re.prototype,x},z={}.hasOwnProperty;E=ie("./Utility").isObject,ne=ie("./XMLNode"),se=ie("./XMLDTDAttList"),le=ie("./XMLDTDEntity"),te=ie("./XMLDTDElement"),ee=ie("./XMLDTDNotation"),Ce.exports=function(x){function re(ae,oe,ve){var ye,me;re.__super__.constructor.call(this,ae),this.documentObject=ae,E(oe)&&(ye=oe,oe=ye.pubID,ve=ye.sysID),ve==null&&(me=[oe,ve],ve=me[0],oe=me[1]),oe!=null&&(this.pubID=this.stringify.dtdPubID(oe)),ve!=null&&(this.sysID=this.stringify.dtdSysID(ve))}return b(re,x),re.prototype.element=function(ae,oe){var ve;return ve=new te(this,ae,oe),this.children.push(ve),this},re.prototype.attList=function(ae,oe,ve,ye,me){var ge;return ge=new se(this,ae,oe,ve,ye,me),this.children.push(ge),this},re.prototype.entity=function(ae,oe){var ve;return ve=new le(this,!1,ae,oe),this.children.push(ve),this},re.prototype.pEntity=function(ae,oe){var ve;return ve=new le(this,!0,ae,oe),this.children.push(ve),this},re.prototype.notation=function(ae,oe){var ve;return ve=new ee(this,ae,oe),this.children.push(ve),this},re.prototype.toString=function(ae){return this.options.writer.set(ae).docType(this)},re.prototype.ele=function(ae,oe){return this.element(ae,oe)},re.prototype.att=function(ae,oe,ve,ye,me){return this.attList(ae,oe,ve,ye,me)},re.prototype.ent=function(ae,oe){return this.entity(ae,oe)},re.prototype.pent=function(ae,oe){return this.pEntity(ae,oe)},re.prototype.not=function(ae,oe){return this.notation(ae,oe)},re.prototype.up=function(){return this.root()||this.documentObject},re}(ne)}).call(void 0)},{"./Utility":214,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLNode":227}],224:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne=function(b,z){function x(){this.constructor=b}for(var re in z)E.call(z,re)&&(b[re]=z[re]);return x.prototype=z.prototype,b.prototype=new x,b.__super__=z.prototype,b},E={}.hasOwnProperty;ee=ie("./Utility").isPlainObject,se=ie("./XMLNode"),le=ie("./XMLStringifier"),te=ie("./XMLStringWriter"),Ce.exports=function(b){function z(x){z.__super__.constructor.call(this,null),x||(x={}),x.writer||(x.writer=new te),this.options=x,this.stringify=new le(x),this.isDocument=!0}return ne(z,b),z.prototype.end=function(x){var re;return x?ee(x)&&(re=x,x=this.options.writer.set(re)):x=this.options.writer,x.document(this)},z.prototype.toString=function(x){return this.options.writer.set(x).document(this)},z}(se)}).call(void 0)},{"./Utility":214,"./XMLNode":227,"./XMLStringWriter":231,"./XMLStringifier":232}],225:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne,E,b,z,x,re,ae,oe,ve,ye,me,ge,_e,he,pe,ke={}.hasOwnProperty;pe=ie("./Utility"),_e=pe.isObject,ge=pe.isFunction,he=pe.isPlainObject,re=ie("./XMLElement"),te=ie("./XMLCData"),le=ie("./XMLComment"),oe=ie("./XMLRaw"),me=ie("./XMLText"),ae=ie("./XMLProcessingInstruction"),z=ie("./XMLDeclaration"),x=ie("./XMLDocType"),ee=ie("./XMLDTDAttList"),E=ie("./XMLDTDEntity"),ne=ie("./XMLDTDElement"),b=ie("./XMLDTDNotation"),se=ie("./XMLAttribute"),ye=ie("./XMLStringifier"),ve=ie("./XMLStringWriter"),Ce.exports=function(){function Te(Ee,Oe,je){var Pe;Ee||(Ee={}),Ee.writer?he(Ee.writer)&&(Pe=Ee.writer,Ee.writer=new ve(Pe)):Ee.writer=new ve(Ee),this.options=Ee,this.writer=Ee.writer,this.stringify=new ye(Ee),this.onDataCallback=Oe||function(){},this.onEndCallback=je||function(){},this.currentNode=null,this.currentLevel=-1,this.openTags={},this.documentStarted=!1,this.documentCompleted=!1,this.root=null}return Te.prototype.node=function(Ee,Oe,je){var Pe;if(Ee==null)throw new Error("Missing node name");if(this.root&&this.currentLevel===-1)throw new Error("Document can only have one root node");return this.openCurrent(),Ee=Ee.valueOf(),Oe==null&&(Oe={}),Oe=Oe.valueOf(),_e(Oe)||(Pe=[Oe,je],je=Pe[0],Oe=Pe[1]),this.currentNode=new re(this,Ee,Oe),this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,je!=null&&this.text(je),this},Te.prototype.element=function(Ee,Oe,je){return this.currentNode&&this.currentNode instanceof x?this.dtdElement.apply(this,arguments):this.node(Ee,Oe,je)},Te.prototype.attribute=function(Ee,Oe){var je,Pe;if(!this.currentNode||this.currentNode.children)throw new Error("att() can only be used immediately after an ele() call in callback mode");if(Ee!=null&&(Ee=Ee.valueOf()),_e(Ee))for(je in Ee)ke.call(Ee,je)&&(Pe=Ee[je],this.attribute(je,Pe));else ge(Oe)&&(Oe=Oe.apply()),this.options.skipNullAttributes&&Oe==null||(this.currentNode.attributes[Ee]=new se(this,Ee,Oe));return this},Te.prototype.text=function(Ee){var Oe;return this.openCurrent(),Oe=new me(this,Ee),this.onData(this.writer.text(Oe,this.currentLevel+1)),this},Te.prototype.cdata=function(Ee){var Oe;return this.openCurrent(),Oe=new te(this,Ee),this.onData(this.writer.cdata(Oe,this.currentLevel+1)),this},Te.prototype.comment=function(Ee){var Oe;return this.openCurrent(),Oe=new le(this,Ee),this.onData(this.writer.comment(Oe,this.currentLevel+1)),this},Te.prototype.raw=function(Ee){var Oe;return this.openCurrent(),Oe=new oe(this,Ee),this.onData(this.writer.raw(Oe,this.currentLevel+1)),this},Te.prototype.instruction=function(Ee,Oe){var je,Pe,Qe,Xe,ot;if(this.openCurrent(),Ee!=null&&(Ee=Ee.valueOf()),Oe!=null&&(Oe=Oe.valueOf()),Array.isArray(Ee))for(je=0,Xe=Ee.length;je<Xe;je++)Pe=Ee[je],this.instruction(Pe);else if(_e(Ee))for(Pe in Ee)ke.call(Ee,Pe)&&(Qe=Ee[Pe],this.instruction(Pe,Qe));else ge(Oe)&&(Oe=Oe.apply()),ot=new ae(this,Ee,Oe),this.onData(this.writer.processingInstruction(ot,this.currentLevel+1));return this},Te.prototype.declaration=function(Ee,Oe,je){var Pe;if(this.openCurrent(),this.documentStarted)throw new Error("declaration() must be the first node");return Pe=new z(this,Ee,Oe,je),this.onData(this.writer.declaration(Pe,this.currentLevel+1)),this},Te.prototype.doctype=function(Ee,Oe,je){if(this.openCurrent(),Ee==null)throw new Error("Missing root node name");if(this.root)throw new Error("dtd() must come before the root node");return this.currentNode=new x(this,Oe,je),this.currentNode.rootNodeName=Ee,this.currentNode.children=!1,this.currentLevel++,this.openTags[this.currentLevel]=this.currentNode,this},Te.prototype.dtdElement=function(Ee,Oe){var je;return this.openCurrent(),je=new ne(this,Ee,Oe),this.onData(this.writer.dtdElement(je,this.currentLevel+1)),this},Te.prototype.attList=function(Ee,Oe,je,Pe,Qe){var Xe;return this.openCurrent(),Xe=new ee(this,Ee,Oe,je,Pe,Qe),this.onData(this.writer.dtdAttList(Xe,this.currentLevel+1)),this},Te.prototype.entity=function(Ee,Oe){var je;return this.openCurrent(),je=new E(this,!1,Ee,Oe),this.onData(this.writer.dtdEntity(je,this.currentLevel+1)),this},Te.prototype.pEntity=function(Ee,Oe){var je;return this.openCurrent(),je=new E(this,!0,Ee,Oe),this.onData(this.writer.dtdEntity(je,this.currentLevel+1)),this},Te.prototype.notation=function(Ee,Oe){var je;return this.openCurrent(),je=new b(this,Ee,Oe),this.onData(this.writer.dtdNotation(je,this.currentLevel+1)),this},Te.prototype.up=function(){if(this.currentLevel<0)throw new Error("The document node has no parent");return this.currentNode?(this.currentNode.children?this.closeNode(this.currentNode):this.openNode(this.currentNode),this.currentNode=null):this.closeNode(this.openTags[this.currentLevel]),delete this.openTags[this.currentLevel],this.currentLevel--,this},Te.prototype.end=function(){for(;this.currentLevel>=0;)this.up();return this.onEnd()},Te.prototype.openCurrent=function(){if(this.currentNode)return this.currentNode.children=!0,this.openNode(this.currentNode)},Te.prototype.openNode=function(Ee){if(!Ee.isOpen)return!this.root&&this.currentLevel===0&&Ee instanceof re&&(this.root=Ee),this.onData(this.writer.openNode(Ee,this.currentLevel)),Ee.isOpen=!0},Te.prototype.closeNode=function(Ee){if(!Ee.isClosed)return this.onData(this.writer.closeNode(Ee,this.currentLevel)),Ee.isClosed=!0},Te.prototype.onData=function(Ee){return this.documentStarted=!0,this.onDataCallback(Ee)},Te.prototype.onEnd=function(){return this.documentCompleted=!0,this.onEndCallback()},Te.prototype.ele=function(){return this.element.apply(this,arguments)},Te.prototype.nod=function(Ee,Oe,je){return this.node(Ee,Oe,je)},Te.prototype.txt=function(Ee){return this.text(Ee)},Te.prototype.dat=function(Ee){return this.cdata(Ee)},Te.prototype.com=function(Ee){return this.comment(Ee)},Te.prototype.ins=function(Ee,Oe){return this.instruction(Ee,Oe)},Te.prototype.dec=function(Ee,Oe,je){return this.declaration(Ee,Oe,je)},Te.prototype.dtd=function(Ee,Oe,je){return this.doctype(Ee,Oe,je)},Te.prototype.e=function(Ee,Oe,je){return this.element(Ee,Oe,je)},Te.prototype.n=function(Ee,Oe,je){return this.node(Ee,Oe,je)},Te.prototype.t=function(Ee){return this.text(Ee)},Te.prototype.d=function(Ee){return this.cdata(Ee)},Te.prototype.c=function(Ee){return this.comment(Ee)},Te.prototype.r=function(Ee){return this.raw(Ee)},Te.prototype.i=function(Ee,Oe){return this.instruction(Ee,Oe)},Te.prototype.att=function(){return this.currentNode&&this.currentNode instanceof x?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Te.prototype.a=function(){return this.currentNode&&this.currentNode instanceof x?this.attList.apply(this,arguments):this.attribute.apply(this,arguments)},Te.prototype.ent=function(Ee,Oe){return this.entity(Ee,Oe)},Te.prototype.pent=function(Ee,Oe){return this.pEntity(Ee,Oe)},Te.prototype.not=function(Ee,Oe){return this.notation(Ee,Oe)},Te}()}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLStringWriter":231,"./XMLStringifier":232,"./XMLText":233}],226:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){var le,ee,ne,E,b,z=function(re,ae){function oe(){this.constructor=re}for(var ve in ae)x.call(ae,ve)&&(re[ve]=ae[ve]);return oe.prototype=ae.prototype,re.prototype=new oe,re.__super__=ae.prototype,re},x={}.hasOwnProperty;b=ie("./Utility"),E=b.isObject,ne=b.isFunction,ee=ie("./XMLNode"),le=ie("./XMLAttribute"),Ce.exports=function(re){function ae(oe,ve,ye){if(ae.__super__.constructor.call(this,oe),ve==null)throw new Error("Missing element name");this.name=this.stringify.eleName(ve),this.attributes={},ye!=null&&this.attribute(ye),oe.isDocument&&(this.isRoot=!0,this.documentObject=oe,oe.rootObject=this)}return z(ae,re),ae.prototype.clone=function(){var oe,ve,ye,me;ye=(0,te.default)(this),ye.isRoot&&(ye.documentObject=null),ye.attributes={},me=this.attributes;for(ve in me)x.call(me,ve)&&(oe=me[ve],ye.attributes[ve]=oe.clone());return ye.children=[],this.children.forEach(function(ge){var _e;return _e=ge.clone(),_e.parent=ye,ye.children.push(_e)}),ye},ae.prototype.attribute=function(oe,ve){var ye,me;if(oe!=null&&(oe=oe.valueOf()),E(oe))for(ye in oe)x.call(oe,ye)&&(me=oe[ye],this.attribute(ye,me));else ne(ve)&&(ve=ve.apply()),this.options.skipNullAttributes&&ve==null||(this.attributes[oe]=new le(this,oe,ve));return this},ae.prototype.removeAttribute=function(oe){var ve,ye,me;if(oe==null)throw new Error("Missing attribute name");if(oe=oe.valueOf(),Array.isArray(oe))for(ye=0,me=oe.length;ye<me;ye++)ve=oe[ye],delete this.attributes[ve];else delete this.attributes[oe];return this},ae.prototype.toString=function(oe){return this.options.writer.set(oe).element(this)},ae.prototype.att=function(oe,ve){return this.attribute(oe,ve)},ae.prototype.a=function(oe,ve){return this.attribute(oe,ve)},ae}(ee)}).call(void 0)},{"./Utility":214,"./XMLAttribute":215,"./XMLNode":227,"babel-runtime/core-js/object/create":19}],227:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne,E,b,z,x,re,ae,oe,ve={}.hasOwnProperty;oe=ie("./Utility"),ae=oe.isObject,re=oe.isFunction,x=oe.isEmpty,ne=null,se=null,te=null,le=null,ee=null,b=null,z=null,E=null,Ce.exports=function(){function ye(me){this.parent=me,this.parent&&(this.options=this.parent.options,this.stringify=this.parent.stringify),this.children=[],ne||(ne=ie("./XMLElement"),se=ie("./XMLCData"),te=ie("./XMLComment"),le=ie("./XMLDeclaration"),ee=ie("./XMLDocType"),b=ie("./XMLRaw"),z=ie("./XMLText"),E=ie("./XMLProcessingInstruction"))}return ye.prototype.element=function(me,ge,_e){var he,pe,ke,Te,Ee,Oe,je,Pe,Qe,Xe;if(Oe=null,ge==null&&(ge={}),ge=ge.valueOf(),ae(ge)||(Qe=[ge,_e],_e=Qe[0],ge=Qe[1]),me!=null&&(me=me.valueOf()),Array.isArray(me))for(ke=0,je=me.length;ke<je;ke++)pe=me[ke],Oe=this.element(pe);else if(re(me))Oe=this.element(me.apply());else if(ae(me)){for(Ee in me)if(ve.call(me,Ee))if(Xe=me[Ee],re(Xe)&&(Xe=Xe.apply()),ae(Xe)&&x(Xe)&&(Xe=null),!this.options.ignoreDecorators&&this.stringify.convertAttKey&&Ee.indexOf(this.stringify.convertAttKey)===0)Oe=this.attribute(Ee.substr(this.stringify.convertAttKey.length),Xe);else if(!this.options.separateArrayItems&&Array.isArray(Xe))for(Te=0,Pe=Xe.length;Te<Pe;Te++)pe=Xe[Te],he={},he[Ee]=pe,Oe=this.element(he);else ae(Xe)?(Oe=this.element(Ee),Oe.element(Xe)):Oe=this.element(Ee,Xe)}else Oe=!this.options.ignoreDecorators&&this.stringify.convertTextKey&&me.indexOf(this.stringify.convertTextKey)===0?this.text(_e):!this.options.ignoreDecorators&&this.stringify.convertCDataKey&&me.indexOf(this.stringify.convertCDataKey)===0?this.cdata(_e):!this.options.ignoreDecorators&&this.stringify.convertCommentKey&&me.indexOf(this.stringify.convertCommentKey)===0?this.comment(_e):!this.options.ignoreDecorators&&this.stringify.convertRawKey&&me.indexOf(this.stringify.convertRawKey)===0?this.raw(_e):!this.options.ignoreDecorators&&this.stringify.convertPIKey&&me.indexOf(this.stringify.convertPIKey)===0?this.instruction(me.substr(this.stringify.convertPIKey.length),_e):this.node(me,ge,_e);if(Oe==null)throw new Error("Could not create any elements with: "+me);return Oe},ye.prototype.insertBefore=function(me,ge,_e){var he,pe,ke;if(this.isRoot)throw new Error("Cannot insert elements at root level");return pe=this.parent.children.indexOf(this),ke=this.parent.children.splice(pe),he=this.parent.element(me,ge,_e),Array.prototype.push.apply(this.parent.children,ke),he},ye.prototype.insertAfter=function(me,ge,_e){var he,pe,ke;if(this.isRoot)throw new Error("Cannot insert elements at root level");return pe=this.parent.children.indexOf(this),ke=this.parent.children.splice(pe+1),he=this.parent.element(me,ge,_e),Array.prototype.push.apply(this.parent.children,ke),he},ye.prototype.remove=function(){var me;if(this.isRoot)throw new Error("Cannot remove the root element");return me=this.parent.children.indexOf(this),[].splice.apply(this.parent.children,[me,me-me+1].concat([])),this.parent},ye.prototype.node=function(me,ge,_e){var he,pe;return me!=null&&(me=me.valueOf()),ge||(ge={}),ge=ge.valueOf(),ae(ge)||(pe=[ge,_e],_e=pe[0],ge=pe[1]),he=new ne(this,me,ge),_e!=null&&he.text(_e),this.children.push(he),he},ye.prototype.text=function(me){var ge;return ge=new z(this,me),this.children.push(ge),this},ye.prototype.cdata=function(me){var ge;return ge=new se(this,me),this.children.push(ge),this},ye.prototype.comment=function(me){var ge;return ge=new te(this,me),this.children.push(ge),this},ye.prototype.commentBefore=function(me){var ge,_e;return ge=this.parent.children.indexOf(this),_e=this.parent.children.splice(ge),this.parent.comment(me),Array.prototype.push.apply(this.parent.children,_e),this},ye.prototype.commentAfter=function(me){var ge,_e;return ge=this.parent.children.indexOf(this),_e=this.parent.children.splice(ge+1),this.parent.comment(me),Array.prototype.push.apply(this.parent.children,_e),this},ye.prototype.raw=function(me){var ge;return ge=new b(this,me),this.children.push(ge),this},ye.prototype.instruction=function(me,ge){var _e,he,pe,ke,Te;if(me!=null&&(me=me.valueOf()),ge!=null&&(ge=ge.valueOf()),Array.isArray(me))for(ke=0,Te=me.length;ke<Te;ke++)_e=me[ke],this.instruction(_e);else if(ae(me))for(_e in me)ve.call(me,_e)&&(he=me[_e],this.instruction(_e,he));else re(ge)&&(ge=ge.apply()),pe=new E(this,me,ge),this.children.push(pe);return this},ye.prototype.instructionBefore=function(me,ge){var _e,he;return _e=this.parent.children.indexOf(this),he=this.parent.children.splice(_e),this.parent.instruction(me,ge),Array.prototype.push.apply(this.parent.children,he),this},ye.prototype.instructionAfter=function(me,ge){var _e,he;return _e=this.parent.children.indexOf(this),he=this.parent.children.splice(_e+1),this.parent.instruction(me,ge),Array.prototype.push.apply(this.parent.children,he),this},ye.prototype.declaration=function(me,ge,_e){var he,pe;return he=this.document(),pe=new le(he,me,ge,_e),he.children[0]instanceof le?he.children[0]=pe:he.children.unshift(pe),he.root()||he},ye.prototype.doctype=function(me,ge){var _e,he,pe,ke,Te,Ee,Oe,je,Pe,Qe;for(he=this.document(),pe=new ee(he,me,ge),Pe=he.children,ke=Te=0,Oe=Pe.length;Te<Oe;ke=++Te)if((_e=Pe[ke])instanceof ee)return he.children[ke]=pe,pe;for(Qe=he.children,ke=Ee=0,je=Qe.length;Ee<je;ke=++Ee)if(_e=Qe[ke],_e.isRoot)return he.children.splice(ke,0,pe),pe;return he.children.push(pe),pe},ye.prototype.up=function(){if(this.isRoot)throw new Error("The root node has no parent. Use doc() if you need to get the document object.");return this.parent},ye.prototype.root=function(){var me;for(me=this;me;){if(me.isDocument)return me.rootObject;if(me.isRoot)return me;me=me.parent}},ye.prototype.document=function(){var me;for(me=this;me;){if(me.isDocument)return me;me=me.parent}},ye.prototype.end=function(me){return this.document().end(me)},ye.prototype.prev=function(){var me;if((me=this.parent.children.indexOf(this))<1)throw new Error("Already at the first node");return this.parent.children[me-1]},ye.prototype.next=function(){var me;if((me=this.parent.children.indexOf(this))===-1||me===this.parent.children.length-1)throw new Error("Already at the last node");return this.parent.children[me+1]},ye.prototype.importDocument=function(me){var ge;return ge=me.root().clone(),ge.parent=this,ge.isRoot=!1,this.children.push(ge),this},ye.prototype.ele=function(me,ge,_e){return this.element(me,ge,_e)},ye.prototype.nod=function(me,ge,_e){return this.node(me,ge,_e)},ye.prototype.txt=function(me){return this.text(me)},ye.prototype.dat=function(me){return this.cdata(me)},ye.prototype.com=function(me){return this.comment(me)},ye.prototype.ins=function(me,ge){return this.instruction(me,ge)},ye.prototype.doc=function(){return this.document()},ye.prototype.dec=function(me,ge,_e){return this.declaration(me,ge,_e)},ye.prototype.dtd=function(me,ge){return this.doctype(me,ge)},ye.prototype.e=function(me,ge,_e){return this.element(me,ge,_e)},ye.prototype.n=function(me,ge,_e){return this.node(me,ge,_e)},ye.prototype.t=function(me){return this.text(me)},ye.prototype.d=function(me){return this.cdata(me)},ye.prototype.c=function(me){return this.comment(me)},ye.prototype.r=function(me){return this.raw(me)},ye.prototype.i=function(me,ge){return this.instruction(me,ge)},ye.prototype.u=function(){return this.up()},ye.prototype.importXMLBuilder=function(me){return this.importDocument(me)},ye}()}).call(void 0)},{"./Utility":214,"./XMLCData":216,"./XMLComment":217,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233}],228:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){var le,ee=function(E,b){function z(){this.constructor=E}for(var x in b)ne.call(b,x)&&(E[x]=b[x]);return z.prototype=b.prototype,E.prototype=new z,E.__super__=b.prototype,E},ne={}.hasOwnProperty;le=ie("./XMLNode"),Ce.exports=function(E){function b(z,x,re){if(b.__super__.constructor.call(this,z),x==null)throw new Error("Missing instruction target");this.target=this.stringify.insTarget(x),re&&(this.value=this.stringify.insValue(re))}return ee(b,E),b.prototype.clone=function(){return(0,te.default)(this)},b.prototype.toString=function(z){return this.options.writer.set(z).processingInstruction(this)},b}(le)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],229:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){var le,ee=function(E,b){function z(){this.constructor=E}for(var x in b)ne.call(b,x)&&(E[x]=b[x]);return z.prototype=b.prototype,E.prototype=new z,E.__super__=b.prototype,E},ne={}.hasOwnProperty;le=ie("./XMLNode"),Ce.exports=function(E){function b(z,x){if(b.__super__.constructor.call(this,z),x==null)throw new Error("Missing raw text");this.value=this.stringify.raw(x)}return ee(b,E),b.prototype.clone=function(){return(0,te.default)(this)},b.prototype.toString=function(z){return this.options.writer.set(z).raw(this)},b}(le)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],230:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne,E,b,z,x,re,ae,oe,ve,ye=function(ge,_e){function he(){this.constructor=ge}for(var pe in _e)me.call(_e,pe)&&(ge[pe]=_e[pe]);return he.prototype=_e.prototype,ge.prototype=new he,ge.__super__=_e.prototype,ge},me={}.hasOwnProperty;b=ie("./XMLDeclaration"),z=ie("./XMLDocType"),se=ie("./XMLCData"),te=ie("./XMLComment"),x=ie("./XMLElement"),ae=ie("./XMLRaw"),oe=ie("./XMLText"),re=ie("./XMLProcessingInstruction"),le=ie("./XMLDTDAttList"),ee=ie("./XMLDTDElement"),ne=ie("./XMLDTDEntity"),E=ie("./XMLDTDNotation"),ve=ie("./XMLWriterBase"),Ce.exports=function(ge){function _e(he,pe){_e.__super__.constructor.call(this,pe),this.stream=he}return ye(_e,ge),_e.prototype.document=function(he){var pe,ke,Te,Ee,Oe,je,Pe,Qe;for(je=he.children,ke=0,Ee=je.length;ke<Ee;ke++)pe=je[ke],pe.isLastRootNode=!1;for(he.children[he.children.length-1].isLastRootNode=!0,Pe=he.children,Qe=[],Te=0,Oe=Pe.length;Te<Oe;Te++)switch(pe=Pe[Te],!1){case!(pe instanceof b):Qe.push(this.declaration(pe));break;case!(pe instanceof z):Qe.push(this.docType(pe));break;case!(pe instanceof te):Qe.push(this.comment(pe));break;case!(pe instanceof re):Qe.push(this.processingInstruction(pe));break;default:Qe.push(this.element(pe))}return Qe},_e.prototype.attribute=function(he){return this.stream.write(" "+he.name+'="'+he.value+'"')},_e.prototype.cdata=function(he,pe){return this.stream.write(this.space(pe)+"<![CDATA["+he.text+"]]>"+this.endline(he))},_e.prototype.comment=function(he,pe){return this.stream.write(this.space(pe)+"<!-- "+he.text+" -->"+this.endline(he))},_e.prototype.declaration=function(he,pe){return this.stream.write(this.space(pe)),this.stream.write('<?xml version="'+he.version+'"'),he.encoding!=null&&this.stream.write(' encoding="'+he.encoding+'"'),he.standalone!=null&&this.stream.write(' standalone="'+he.standalone+'"'),this.stream.write(this.spacebeforeslash+"?>"),this.stream.write(this.endline(he))},_e.prototype.docType=function(he,pe){var ke,Te,Ee,Oe;if(pe||(pe=0),this.stream.write(this.space(pe)),this.stream.write("<!DOCTYPE "+he.root().name),he.pubID&&he.sysID?this.stream.write(' PUBLIC "'+he.pubID+'" "'+he.sysID+'"'):he.sysID&&this.stream.write(' SYSTEM "'+he.sysID+'"'),he.children.length>0){for(this.stream.write(" ["),this.stream.write(this.endline(he)),Oe=he.children,Te=0,Ee=Oe.length;Te<Ee;Te++)switch(ke=Oe[Te],!1){case!(ke instanceof le):this.dtdAttList(ke,pe+1);break;case!(ke instanceof ee):this.dtdElement(ke,pe+1);break;case!(ke instanceof ne):this.dtdEntity(ke,pe+1);break;case!(ke instanceof E):this.dtdNotation(ke,pe+1);break;case!(ke instanceof se):this.cdata(ke,pe+1);break;case!(ke instanceof te):this.comment(ke,pe+1);break;case!(ke instanceof re):this.processingInstruction(ke,pe+1);break;default:throw new Error("Unknown DTD node type: "+ke.constructor.name)}this.stream.write("]")}return this.stream.write(this.spacebeforeslash+">"),this.stream.write(this.endline(he))},_e.prototype.element=function(he,pe){var ke,Te,Ee,Oe,je,Pe,Qe,Xe;pe||(pe=0),Xe=this.space(pe),this.stream.write(Xe+"<"+he.name),Pe=he.attributes;for(je in Pe)me.call(Pe,je)&&(ke=Pe[je],this.attribute(ke));if(he.children.length===0||he.children.every(function(ot){return ot.value===""}))this.allowEmpty?this.stream.write("></"+he.name+">"):this.stream.write(this.spacebeforeslash+"/>");else if(this.pretty&&he.children.length===1&&he.children[0].value!=null)this.stream.write(">"),this.stream.write(he.children[0].value),this.stream.write("</"+he.name+">");else{for(this.stream.write(">"+this.newline),Qe=he.children,Ee=0,Oe=Qe.length;Ee<Oe;Ee++)switch(Te=Qe[Ee],!1){case!(Te instanceof se):this.cdata(Te,pe+1);break;case!(Te instanceof te):this.comment(Te,pe+1);break;case!(Te instanceof x):this.element(Te,pe+1);break;case!(Te instanceof ae):this.raw(Te,pe+1);break;case!(Te instanceof oe):this.text(Te,pe+1);break;case!(Te instanceof re):this.processingInstruction(Te,pe+1);break;default:throw new Error("Unknown XML node type: "+Te.constructor.name)}this.stream.write(Xe+"</"+he.name+">")}return this.stream.write(this.endline(he))},_e.prototype.processingInstruction=function(he,pe){return this.stream.write(this.space(pe)+"<?"+he.target),he.value&&this.stream.write(" "+he.value),this.stream.write(this.spacebeforeslash+"?>"+this.endline(he))},_e.prototype.raw=function(he,pe){return this.stream.write(this.space(pe)+he.value+this.endline(he))},_e.prototype.text=function(he,pe){return this.stream.write(this.space(pe)+he.value+this.endline(he))},_e.prototype.dtdAttList=function(he,pe){return this.stream.write(this.space(pe)+"<!ATTLIST "+he.elementName+" "+he.attributeName+" "+he.attributeType),he.defaultValueType!=="#DEFAULT"&&this.stream.write(" "+he.defaultValueType),he.defaultValue&&this.stream.write(' "'+he.defaultValue+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(he))},_e.prototype.dtdElement=function(he,pe){return this.stream.write(this.space(pe)+"<!ELEMENT "+he.name+" "+he.value),this.stream.write(this.spacebeforeslash+">"+this.endline(he))},_e.prototype.dtdEntity=function(he,pe){return this.stream.write(this.space(pe)+"<!ENTITY"),he.pe&&this.stream.write(" %"),this.stream.write(" "+he.name),he.value?this.stream.write(' "'+he.value+'"'):(he.pubID&&he.sysID?this.stream.write(' PUBLIC "'+he.pubID+'" "'+he.sysID+'"'):he.sysID&&this.stream.write(' SYSTEM "'+he.sysID+'"'),he.nData&&this.stream.write(" NDATA "+he.nData)),this.stream.write(this.spacebeforeslash+">"+this.endline(he))},_e.prototype.dtdNotation=function(he,pe){return this.stream.write(this.space(pe)+"<!NOTATION "+he.name),he.pubID&&he.sysID?this.stream.write(' PUBLIC "'+he.pubID+'" "'+he.sysID+'"'):he.pubID?this.stream.write(' PUBLIC "'+he.pubID+'"'):he.sysID&&this.stream.write(' SYSTEM "'+he.sysID+'"'),this.stream.write(this.spacebeforeslash+">"+this.endline(he))},_e.prototype.endline=function(he){return he.isLastRootNode?"":this.newline},_e}(ve)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],231:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne,E,b,z,x,re,ae,oe,ve,ye=function(ge,_e){function he(){this.constructor=ge}for(var pe in _e)me.call(_e,pe)&&(ge[pe]=_e[pe]);return he.prototype=_e.prototype,ge.prototype=new he,ge.__super__=_e.prototype,ge},me={}.hasOwnProperty;b=ie("./XMLDeclaration"),z=ie("./XMLDocType"),se=ie("./XMLCData"),te=ie("./XMLComment"),x=ie("./XMLElement"),ae=ie("./XMLRaw"),oe=ie("./XMLText"),re=ie("./XMLProcessingInstruction"),le=ie("./XMLDTDAttList"),ee=ie("./XMLDTDElement"),ne=ie("./XMLDTDEntity"),E=ie("./XMLDTDNotation"),ve=ie("./XMLWriterBase"),Ce.exports=function(ge){function _e(he){_e.__super__.constructor.call(this,he)}return ye(_e,ge),_e.prototype.document=function(he){var pe,ke,Te,Ee,Oe;for(this.textispresent=!1,Ee="",Oe=he.children,ke=0,Te=Oe.length;ke<Te;ke++)pe=Oe[ke],Ee+=function(){switch(!1){case!(pe instanceof b):return this.declaration(pe);case!(pe instanceof z):return this.docType(pe);case!(pe instanceof te):return this.comment(pe);case!(pe instanceof re):return this.processingInstruction(pe);default:return this.element(pe,0)}}.call(this);return this.pretty&&Ee.slice(-this.newline.length)===this.newline&&(Ee=Ee.slice(0,-this.newline.length)),Ee},_e.prototype.attribute=function(he){return" "+he.name+'="'+he.value+'"'},_e.prototype.cdata=function(he,pe){return this.space(pe)+"<![CDATA["+he.text+"]]>"+this.newline},_e.prototype.comment=function(he,pe){return this.space(pe)+"<!-- "+he.text+" -->"+this.newline},_e.prototype.declaration=function(he,pe){var ke;return ke=this.space(pe),ke+='<?xml version="'+he.version+'"',he.encoding!=null&&(ke+=' encoding="'+he.encoding+'"'),he.standalone!=null&&(ke+=' standalone="'+he.standalone+'"'),ke+=this.spacebeforeslash+"?>",ke+=this.newline},_e.prototype.docType=function(he,pe){var ke,Te,Ee,Oe,je;if(pe||(pe=0),Oe=this.space(pe),Oe+="<!DOCTYPE "+he.root().name,he.pubID&&he.sysID?Oe+=' PUBLIC "'+he.pubID+'" "'+he.sysID+'"':he.sysID&&(Oe+=' SYSTEM "'+he.sysID+'"'),he.children.length>0){for(Oe+=" [",Oe+=this.newline,je=he.children,Te=0,Ee=je.length;Te<Ee;Te++)ke=je[Te],Oe+=function(){switch(!1){case!(ke instanceof le):return this.dtdAttList(ke,pe+1);case!(ke instanceof ee):return this.dtdElement(ke,pe+1);case!(ke instanceof ne):return this.dtdEntity(ke,pe+1);case!(ke instanceof E):return this.dtdNotation(ke,pe+1);case!(ke instanceof se):return this.cdata(ke,pe+1);case!(ke instanceof te):return this.comment(ke,pe+1);case!(ke instanceof re):return this.processingInstruction(ke,pe+1);default:throw new Error("Unknown DTD node type: "+ke.constructor.name)}}.call(this);Oe+="]"}return Oe+=this.spacebeforeslash+">",Oe+=this.newline},_e.prototype.element=function(he,pe){var ke,Te,Ee,Oe,je,Pe,Qe,Xe,ot,He,rt,Ye,ut;pe||(pe=0),ut=!1,this.textispresent?(this.newline="",this.pretty=!1):(this.newline=this.newlinedefault,this.pretty=this.prettydefault),Ye=this.space(pe),Xe="",Xe+=Ye+"<"+he.name,ot=he.attributes;for(Qe in ot)me.call(ot,Qe)&&(ke=ot[Qe],Xe+=this.attribute(ke));if(he.children.length===0||he.children.every(function(Ge){return Ge.value===""}))this.allowEmpty?Xe+="></"+he.name+">"+this.newline:Xe+=this.spacebeforeslash+"/>"+this.newline;else if(this.pretty&&he.children.length===1&&he.children[0].value!=null)Xe+=">",Xe+=he.children[0].value,Xe+="</"+he.name+">"+this.newline;else{if(this.dontprettytextnodes){for(He=he.children,Ee=0,je=He.length;Ee<je;Ee++)if(Te=He[Ee],Te.value!=null){this.textispresent++,ut=!0;break}}for(this.textispresent&&(this.newline="",this.pretty=!1,Ye=this.space(pe)),Xe+=">"+this.newline,rt=he.children,Oe=0,Pe=rt.length;Oe<Pe;Oe++)Te=rt[Oe],Xe+=function(){switch(!1){case!(Te instanceof se):return this.cdata(Te,pe+1);case!(Te instanceof te):return this.comment(Te,pe+1);case!(Te instanceof x):return this.element(Te,pe+1);case!(Te instanceof ae):return this.raw(Te,pe+1);case!(Te instanceof oe):return this.text(Te,pe+1);case!(Te instanceof re):return this.processingInstruction(Te,pe+1);default:throw new Error("Unknown XML node type: "+Te.constructor.name)}}.call(this);ut&&this.textispresent--,this.textispresent||(this.newline=this.newlinedefault,this.pretty=this.prettydefault),Xe+=Ye+"</"+he.name+">"+this.newline}return Xe},_e.prototype.processingInstruction=function(he,pe){var ke;return ke=this.space(pe)+"<?"+he.target,he.value&&(ke+=" "+he.value),ke+=this.spacebeforeslash+"?>"+this.newline},_e.prototype.raw=function(he,pe){return this.space(pe)+he.value+this.newline},_e.prototype.text=function(he,pe){return this.space(pe)+he.value+this.newline},_e.prototype.dtdAttList=function(he,pe){var ke;return ke=this.space(pe)+"<!ATTLIST "+he.elementName+" "+he.attributeName+" "+he.attributeType,he.defaultValueType!=="#DEFAULT"&&(ke+=" "+he.defaultValueType),he.defaultValue&&(ke+=' "'+he.defaultValue+'"'),ke+=this.spacebeforeslash+">"+this.newline},_e.prototype.dtdElement=function(he,pe){return this.space(pe)+"<!ELEMENT "+he.name+" "+he.value+this.spacebeforeslash+">"+this.newline},_e.prototype.dtdEntity=function(he,pe){var ke;return ke=this.space(pe)+"<!ENTITY",he.pe&&(ke+=" %"),ke+=" "+he.name,he.value?ke+=' "'+he.value+'"':(he.pubID&&he.sysID?ke+=' PUBLIC "'+he.pubID+'" "'+he.sysID+'"':he.sysID&&(ke+=' SYSTEM "'+he.sysID+'"'),he.nData&&(ke+=" NDATA "+he.nData)),ke+=this.spacebeforeslash+">"+this.newline},_e.prototype.dtdNotation=function(he,pe){var ke;return ke=this.space(pe)+"<!NOTATION "+he.name,he.pubID&&he.sysID?ke+=' PUBLIC "'+he.pubID+'" "'+he.sysID+'"':he.pubID?ke+=' PUBLIC "'+he.pubID+'"':he.sysID&&(ke+=' SYSTEM "'+he.sysID+'"'),ke+=this.spacebeforeslash+">"+this.newline},_e.prototype.openNode=function(he,pe){var ke,Te,Ee,Oe;if(pe||(pe=0),he instanceof x){Ee=this.space(pe)+"<"+he.name,Oe=he.attributes;for(Te in Oe)me.call(Oe,Te)&&(ke=Oe[Te],Ee+=this.attribute(ke));return Ee+=(he.children?">":"/>")+this.newline}return Ee=this.space(pe)+"<!DOCTYPE "+he.rootNodeName,he.pubID&&he.sysID?Ee+=' PUBLIC "'+he.pubID+'" "'+he.sysID+'"':he.sysID&&(Ee+=' SYSTEM "'+he.sysID+'"'),Ee+=(he.children?" [":">")+this.newline},_e.prototype.closeNode=function(he,pe){switch(pe||(pe=0),!1){case!(he instanceof x):return this.space(pe)+"</"+he.name+">"+this.newline;case!(he instanceof z):return this.space(pe)+"]>"+this.newline}},_e}(ve)}).call(void 0)},{"./XMLCData":216,"./XMLComment":217,"./XMLDTDAttList":218,"./XMLDTDElement":219,"./XMLDTDEntity":220,"./XMLDTDNotation":221,"./XMLDeclaration":222,"./XMLDocType":223,"./XMLElement":226,"./XMLProcessingInstruction":228,"./XMLRaw":229,"./XMLText":233,"./XMLWriterBase":234}],232:[function(ie,Ce,ue){"use strict";(function(){var se=function(le,ee){return function(){return le.apply(ee,arguments)}},te={}.hasOwnProperty;Ce.exports=function(){function le(ee){this.assertLegalChar=se(this.assertLegalChar,this);var ne,E,b;ee||(ee={}),this.noDoubleEncoding=ee.noDoubleEncoding,E=ee.stringify||{};for(ne in E)te.call(E,ne)&&(b=E[ne],this[ne]=b)}return le.prototype.eleName=function(ee){return ee=""+ee||"",this.assertLegalChar(ee)},le.prototype.eleText=function(ee){return ee=""+ee||"",this.assertLegalChar(this.elEscape(ee))},le.prototype.cdata=function(ee){return ee=""+ee||"",ee=ee.replace("]]>","]]]]><![CDATA[>"),this.assertLegalChar(ee)},le.prototype.comment=function(ee){if(ee=""+ee||"",ee.match(/--/))throw new Error("Comment text cannot contain double-hypen: "+ee);return this.assertLegalChar(ee)},le.prototype.raw=function(ee){return""+ee||""},le.prototype.attName=function(ee){return ee=""+ee||""},le.prototype.attValue=function(ee){return ee=""+ee||"",this.attEscape(ee)},le.prototype.insTarget=function(ee){return""+ee||""},le.prototype.insValue=function(ee){if(ee=""+ee||"",ee.match(/\?>/))throw new Error("Invalid processing instruction value: "+ee);return ee},le.prototype.xmlVersion=function(ee){if(ee=""+ee||"",!ee.match(/1\.[0-9]+/))throw new Error("Invalid version number: "+ee);return ee},le.prototype.xmlEncoding=function(ee){if(ee=""+ee||"",!ee.match(/^[A-Za-z](?:[A-Za-z0-9._-])*$/))throw new Error("Invalid encoding: "+ee);return ee},le.prototype.xmlStandalone=function(ee){return ee?"yes":"no"},le.prototype.dtdPubID=function(ee){return""+ee||""},le.prototype.dtdSysID=function(ee){return""+ee||""},le.prototype.dtdElementValue=function(ee){return""+ee||""},le.prototype.dtdAttType=function(ee){return""+ee||""},le.prototype.dtdAttDefault=function(ee){return ee!=null?""+ee||"":ee},le.prototype.dtdEntityValue=function(ee){return""+ee||""},le.prototype.dtdNData=function(ee){return""+ee||""},le.prototype.convertAttKey="@",le.prototype.convertPIKey="?",le.prototype.convertTextKey="#text",le.prototype.convertCDataKey="#cdata",le.prototype.convertCommentKey="#comment",le.prototype.convertRawKey="#raw",le.prototype.assertLegalChar=function(ee){var ne;if(ne=ee.match(/[\0\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/))throw new Error("Invalid character in string: "+ee+" at index "+ne.index);return ee},le.prototype.elEscape=function(ee){var ne;return ne=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ee.replace(ne,"&").replace(/</g,"<").replace(/>/g,">").replace(/\r/g,"
")},le.prototype.attEscape=function(ee){var ne;return ne=this.noDoubleEncoding?/(?!&\S+;)&/g:/&/g,ee.replace(ne,"&").replace(/</g,"<").replace(/"/g,""").replace(/\t/g,"	").replace(/\n/g,"
").replace(/\r/g,"
")},le}()}).call(void 0)},{}],233:[function(ie,Ce,ue){"use strict";var se=ie("babel-runtime/core-js/object/create"),te=function(le){return le&&le.__esModule?le:{default:le}}(se);(function(){var le,ee=function(E,b){function z(){this.constructor=E}for(var x in b)ne.call(b,x)&&(E[x]=b[x]);return z.prototype=b.prototype,E.prototype=new z,E.__super__=b.prototype,E},ne={}.hasOwnProperty;le=ie("./XMLNode"),Ce.exports=function(E){function b(z,x){if(b.__super__.constructor.call(this,z),x==null)throw new Error("Missing element text");this.value=this.stringify.eleText(x)}return ee(b,E),b.prototype.clone=function(){return(0,te.default)(this)},b.prototype.toString=function(z){return this.options.writer.set(z).text(this)},b}(le)}).call(void 0)},{"./XMLNode":227,"babel-runtime/core-js/object/create":19}],234:[function(ie,Ce,ue){"use strict";(function(){var se={}.hasOwnProperty;Ce.exports=function(){function te(le){var ee,ne,E,b,z,x,re,ae,oe;le||(le={}),this.pretty=le.pretty||!1,this.allowEmpty=(ne=le.allowEmpty)!=null&&ne,this.pretty?(this.indent=(E=le.indent)!=null?E:" ",this.newline=(b=le.newline)!=null?b:`
|
|
|
`,this.offset=(z=le.offset)!=null?z:0,this.dontprettytextnodes=(x=le.dontprettytextnodes)!=null?x:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash=(re=le.spacebeforeslash)!=null?re:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,ae=le.writer||{};for(ee in ae)se.call(ae,ee)&&(oe=ae[ee],this[ee]=oe)}return te.prototype.set=function(le){var ee,ne,E;le||(le={}),"pretty"in le&&(this.pretty=le.pretty),"allowEmpty"in le&&(this.allowEmpty=le.allowEmpty),this.pretty?(this.indent="indent"in le?le.indent:" ",this.newline="newline"in le?le.newline:`
|
|
|
`,this.offset="offset"in le?le.offset:0,this.dontprettytextnodes="dontprettytextnodes"in le?le.dontprettytextnodes:0):(this.indent="",this.newline="",this.offset=0,this.dontprettytextnodes=0),this.spacebeforeslash="spacebeforeslash"in le?le.spacebeforeslash:"",this.spacebeforeslash===!0&&(this.spacebeforeslash=" "),this.newlinedefault=this.newline,this.prettydefault=this.pretty,ne=le.writer||{};for(ee in ne)se.call(ne,ee)&&(E=ne[ee],this[ee]=E);return this},te.prototype.space=function(le){var ee;return this.pretty?(ee=(le||0)+this.offset+1,ee>0?new Array(ee).join(this.indent):""):""},te}()}).call(void 0)},{}],235:[function(ie,Ce,ue){"use strict";(function(){var se,te,le,ee,ne,E,b;b=ie("./Utility"),ne=b.assign,E=b.isFunction,se=ie("./XMLDocument"),te=ie("./XMLDocumentCB"),ee=ie("./XMLStringWriter"),le=ie("./XMLStreamWriter"),Ce.exports.create=function(z,x,re,ae){var oe,ve;if(z==null)throw new Error("Root element needs a name");return ae=ne({},x,re,ae),oe=new se(ae),ve=oe.element(z),ae.headless||(oe.declaration(ae),ae.pubID==null&&ae.sysID==null||oe.doctype(ae)),ve},Ce.exports.begin=function(z,x,re){var ae;return E(z)&&(ae=[z,x],x=ae[0],re=ae[1],z={}),x?new te(z,x,re):new se(z)},Ce.exports.stringWriter=function(z){return new ee(z)},Ce.exports.streamWriter=function(z,x){return new le(z,x)}}).call(void 0)},{"./Utility":214,"./XMLDocument":224,"./XMLDocumentCB":225,"./XMLStreamWriter":230,"./XMLStringWriter":231}],236:[function(ie,Ce,ue){function se(){for(var le={},ee=0;ee<arguments.length;ee++){var ne=arguments[ee];for(var E in ne)te.call(ne,E)&&(le[E]=ne[E])}return le}Ce.exports=se;var te=Object.prototype.hasOwnProperty},{}],237:[function(ie,Ce,ue){"use strict";function se(ae,oe,ve){ee.isBuffer(oe)||(oe=new ee(oe)),ee.isBuffer(ve)||(ve=new ee(ve)),oe.length>x?oe=ae(oe):oe.length<x&&(oe=ee.concat([oe,re],x));for(var ye=new ee(x),me=new ee(x),ge=0;ge<x;ge++)ye[ge]=54^oe[ge],me[ge]=92^oe[ge];var _e=ae(ee.concat([ye,ve]));return ae(ee.concat([me,_e]))}function te(ae,oe){ae=ae||"sha1";var ve=z[ae],ye=[],me=0;return ve||le("algorithm:",ae,"is not yet supported"),{update:function(ge){return ee.isBuffer(ge)||(ge=new ee(ge)),ye.push(ge),me+=ge.length,this},digest:function(ge){var _e=ee.concat(ye),he=oe?se(ve,oe,_e):ve(_e);return ye=null,ge?he.toString(ge):he}}}function le(){var ae=[].slice.call(arguments).join(" ");throw new Error([ae,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(`
|
|
|
`))}var ee=ie("buffer").Buffer,ne=ie("./sha"),E=ie("./sha256"),b=ie("./md5"),z={sha1:ne,sha256:E,md5:b},x=64,re=new ee(x);re.fill(0),ue.createHash=function(ae){return te(ae)},ue.createHmac=function(ae,oe){return te(ae,oe)},function(ae,oe){for(var ve in ae)oe(ae[ve],ve)}(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(ae){ue[ae]=function(){le("sorry,",ae,"is not implemented yet")}})},{"./md5":239,"./sha":240,"./sha256":241,buffer:38}],238:[function(ie,Ce,ue){"use strict";function se(z,x){if(z.length%ne!=0){var re=z.length+(ne-z.length%ne);z=ee.concat([z,E],re)}for(var ae=[],oe=x?z.readInt32BE:z.readInt32LE,ve=0;ve<z.length;ve+=ne)ae.push(oe.call(z,ve));return ae}function te(z,x,re){for(var ae=new ee(x),oe=re?ae.writeInt32BE:ae.writeInt32LE,ve=0;ve<z.length;ve++)oe.call(ae,z[ve],4*ve,!0);return ae}function le(z,x,re,ae){return ee.isBuffer(z)||(z=new ee(z)),te(x(se(z,ae),z.length*b),re,ae)}var ee=ie("buffer").Buffer,ne=4,E=new ee(ne);E.fill(0);var b=8;Ce.exports={hash:le}},{buffer:38}],239:[function(ie,Ce,ue){"use strict";function se(re,ae){re[ae>>5]|=128<<ae%32,re[14+(ae+64>>>9<<4)]=ae;for(var oe=1732584193,ve=-271733879,ye=-1732584194,me=271733878,ge=0;ge<re.length;ge+=16){var _e=oe,he=ve,pe=ye,ke=me;oe=le(oe,ve,ye,me,re[ge+0],7,-680876936),me=le(me,oe,ve,ye,re[ge+1],12,-389564586),ye=le(ye,me,oe,ve,re[ge+2],17,606105819),ve=le(ve,ye,me,oe,re[ge+3],22,-1044525330),oe=le(oe,ve,ye,me,re[ge+4],7,-176418897),me=le(me,oe,ve,ye,re[ge+5],12,1200080426),ye=le(ye,me,oe,ve,re[ge+6],17,-1473231341),ve=le(ve,ye,me,oe,re[ge+7],22,-45705983),oe=le(oe,ve,ye,me,re[ge+8],7,1770035416),me=le(me,oe,ve,ye,re[ge+9],12,-1958414417),ye=le(ye,me,oe,ve,re[ge+10],17,-42063),ve=le(ve,ye,me,oe,re[ge+11],22,-1990404162),oe=le(oe,ve,ye,me,re[ge+12],7,1804603682),me=le(me,oe,ve,ye,re[ge+13],12,-40341101),ye=le(ye,me,oe,ve,re[ge+14],17,-1502002290),ve=le(ve,ye,me,oe,re[ge+15],22,1236535329),oe=ee(oe,ve,ye,me,re[ge+1],5,-165796510),me=ee(me,oe,ve,ye,re[ge+6],9,-1069501632),ye=ee(ye,me,oe,ve,re[ge+11],14,643717713),ve=ee(ve,ye,me,oe,re[ge+0],20,-373897302),oe=ee(oe,ve,ye,me,re[ge+5],5,-701558691),me=ee(me,oe,ve,ye,re[ge+10],9,38016083),ye=ee(ye,me,oe,ve,re[ge+15],14,-660478335),ve=ee(ve,ye,me,oe,re[ge+4],20,-405537848),oe=ee(oe,ve,ye,me,re[ge+9],5,568446438),me=ee(me,oe,ve,ye,re[ge+14],9,-1019803690),ye=ee(ye,me,oe,ve,re[ge+3],14,-187363961),ve=ee(ve,ye,me,oe,re[ge+8],20,1163531501),oe=ee(oe,ve,ye,me,re[ge+13],5,-1444681467),me=ee(me,oe,ve,ye,re[ge+2],9,-51403784),ye=ee(ye,me,oe,ve,re[ge+7],14,1735328473),ve=ee(ve,ye,me,oe,re[ge+12],20,-1926607734),oe=ne(oe,ve,ye,me,re[ge+5],4,-378558),me=ne(me,oe,ve,ye,re[ge+8],11,-2022574463),ye=ne(ye,me,oe,ve,re[ge+11],16,1839030562),ve=ne(ve,ye,me,oe,re[ge+14],23,-35309556),oe=ne(oe,ve,ye,me,re[ge+1],4,-1530992060),me=ne(me,oe,ve,ye,re[ge+4],11,1272893353),ye=ne(ye,me,oe,ve,re[ge+7],16,-155497632),ve=ne(ve,ye,me,oe,re[ge+10],23,-1094730640),oe=ne(oe,ve,ye,me,re[ge+13],4,681279174),me=ne(me,oe,ve,ye,re[ge+0],11,-358537222),ye=ne(ye,me,oe,ve,re[ge+3],16,-722521979),ve=ne(ve,ye,me,oe,re[ge+6],23,76029189),oe=ne(oe,ve,ye,me,re[ge+9],4,-640364487),me=ne(me,oe,ve,ye,re[ge+12],11,-421815835),ye=ne(ye,me,oe,ve,re[ge+15],16,530742520),ve=ne(ve,ye,me,oe,re[ge+2],23,-995338651),oe=E(oe,ve,ye,me,re[ge+0],6,-198630844),me=E(me,oe,ve,ye,re[ge+7],10,1126891415),ye=E(ye,me,oe,ve,re[ge+14],15,-1416354905),ve=E(ve,ye,me,oe,re[ge+5],21,-57434055),oe=E(oe,ve,ye,me,re[ge+12],6,1700485571),me=E(me,oe,ve,ye,re[ge+3],10,-1894986606),ye=E(ye,me,oe,ve,re[ge+10],15,-1051523),ve=E(ve,ye,me,oe,re[ge+1],21,-2054922799),oe=E(oe,ve,ye,me,re[ge+8],6,1873313359),me=E(me,oe,ve,ye,re[ge+15],10,-30611744),ye=E(ye,me,oe,ve,re[ge+6],15,-1560198380),ve=E(ve,ye,me,oe,re[ge+13],21,1309151649),oe=E(oe,ve,ye,me,re[ge+4],6,-145523070),me=E(me,oe,ve,ye,re[ge+11],10,-1120210379),ye=E(ye,me,oe,ve,re[ge+2],15,718787259),ve=E(ve,ye,me,oe,re[ge+9],21,-343485551),oe=b(oe,_e),ve=b(ve,he),ye=b(ye,pe),me=b(me,ke)}return Array(oe,ve,ye,me)}function te(re,ae,oe,ve,ye,me){return b(z(b(b(ae,re),b(ve,me)),ye),oe)}function le(re,ae,oe,ve,ye,me,ge){return te(ae&oe|~ae&ve,re,ae,ye,me,ge)}function ee(re,ae,oe,ve,ye,me,ge){return te(ae&ve|oe&~ve,re,ae,ye,me,ge)}function ne(re,ae,oe,ve,ye,me,ge){return te(ae^oe^ve,re,ae,ye,me,ge)}function E(re,ae,oe,ve,ye,me,ge){return te(oe^(ae|~ve),re,ae,ye,me,ge)}function b(re,ae){var oe=(65535&re)+(65535&ae);return(re>>16)+(ae>>16)+(oe>>16)<<16|65535&oe}function z(re,ae){return re<<ae|re>>>32-ae}var x=ie("./helpers");Ce.exports=function(re){return x.hash(re,se,16)}},{"./helpers":238}],240:[function(ie,Ce,ue){"use strict";function se(b,z){b[z>>5]|=128<<24-z%32,b[15+(z+64>>9<<4)]=z;for(var x=Array(80),re=1732584193,ae=-271733879,oe=-1732584194,ve=271733878,ye=-1009589776,me=0;me<b.length;me+=16){for(var ge=re,_e=ae,he=oe,pe=ve,ke=ye,Te=0;Te<80;Te++){x[Te]=Te<16?b[me+Te]:ne(x[Te-3]^x[Te-8]^x[Te-14]^x[Te-16],1);var Ee=ee(ee(ne(re,5),te(Te,ae,oe,ve)),ee(ee(ye,x[Te]),le(Te)));ye=ve,ve=oe,oe=ne(ae,30),ae=re,re=Ee}re=ee(re,ge),ae=ee(ae,_e),oe=ee(oe,he),ve=ee(ve,pe),ye=ee(ye,ke)}return Array(re,ae,oe,ve,ye)}function te(b,z,x,re){return b<20?z&x|~z&re:b<40?z^x^re:b<60?z&x|z&re|x&re:z^x^re}function le(b){return b<20?1518500249:b<40?1859775393:b<60?-1894007588:-899497514}function ee(b,z){var x=(65535&b)+(65535&z);return(b>>16)+(z>>16)+(x>>16)<<16|65535&x}function ne(b,z){return b<<z|b>>>32-z}var E=ie("./helpers");Ce.exports=function(b){return E.hash(b,se,20,!0)}},{"./helpers":238}],241:[function(ie,Ce,ue){"use strict";var se=ie("./helpers"),te=function(oe,ve){var ye=(65535&oe)+(65535&ve);return(oe>>16)+(ve>>16)+(ye>>16)<<16|65535&ye},le=function(oe,ve){return oe>>>ve|oe<<32-ve},ee=function(oe,ve){return oe>>>ve},ne=function(oe,ve,ye){return oe&ve^~oe&ye},E=function(oe,ve,ye){return oe&ve^oe&ye^ve&ye},b=function(oe){return le(oe,2)^le(oe,13)^le(oe,22)},z=function(oe){return le(oe,6)^le(oe,11)^le(oe,25)},x=function(oe){return le(oe,7)^le(oe,18)^ee(oe,3)},re=function(oe){return le(oe,17)^le(oe,19)^ee(oe,10)},ae=function(oe,ve){var ye,me,ge,_e,he,pe,ke,Te,Ee,Oe,je,Pe,Qe=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),Xe=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),ot=new Array(64);oe[ve>>5]|=128<<24-ve%32,oe[15+(ve+64>>9<<4)]=ve;for(var Ee=0;Ee<oe.length;Ee+=16){ye=Xe[0],me=Xe[1],ge=Xe[2],_e=Xe[3],he=Xe[4],pe=Xe[5],ke=Xe[6],Te=Xe[7];for(var Oe=0;Oe<64;Oe++)ot[Oe]=Oe<16?oe[Oe+Ee]:te(te(te(re(ot[Oe-2]),ot[Oe-7]),x(ot[Oe-15])),ot[Oe-16]),je=te(te(te(te(Te,z(he)),ne(he,pe,ke)),Qe[Oe]),ot[Oe]),Pe=te(b(ye),E(ye,me,ge)),Te=ke,ke=pe,pe=he,he=te(_e,je),_e=ge,ge=me,me=ye,ye=te(je,Pe);Xe[0]=te(ye,Xe[0]),Xe[1]=te(me,Xe[1]),Xe[2]=te(ge,Xe[2]),Xe[3]=te(_e,Xe[3]),Xe[4]=te(he,Xe[4]),Xe[5]=te(pe,Xe[5]),Xe[6]=te(ke,Xe[6]),Xe[7]=te(Te,Xe[7])}return Xe};Ce.exports=function(oe){return se.hash(oe,ae,32,!0)}},{"./helpers":238}],242:[function(ie,Ce,ue){(function(se){"use strict";function te(ae){return ae&&ae.__esModule?ae:{default:ae}}var le=ie("babel-runtime/core-js/object/create"),ee=te(le),ne=ie("babel-runtime/helpers/classCallCheck"),E=te(ne),b=ie("babel-runtime/helpers/createClass"),z=te(b),x=ie("babel-runtime/helpers/typeof"),re=te(x);(function(ae){if((ue===void 0?"undefined":(0,re.default)(ue))==="object"&&Ce!==void 0)Ce.exports=ae();else if(typeof ce=="function"&&ce.amd)ce([],ae);else{var oe;oe=typeof window!="undefined"?window:se!==void 0?se:typeof self!="undefined"?self:this,oe.mime=ae()}})(function(){return function ae(oe,ve,ye){function me(he,pe){if(!ve[he]){if(!oe[he]){var ke=typeof ie=="function"&&ie;if(!pe&&ke)return ke(he,!0);if(ge)return ge(he,!0);var Te=new Error("Cannot find module '"+he+"'");throw Te.code="MODULE_NOT_FOUND",Te}var Ee=ve[he]={exports:{}};oe[he][0].call(Ee.exports,function(Oe){var je=oe[he][1][Oe];return me(je||Oe)},Ee,Ee.exports,ae,oe,ve,ye)}return ve[he].exports}for(var ge=typeof ie=="function"&&ie,_e=0;_e<ye.length;_e++)me(ye[_e]);return me}({1:[function(ae,oe,ve){var ye=function(){function me(){(0,E.default)(this,me),this._types=(0,ee.default)(null),this._extensions=(0,ee.default)(null);for(var ge=0;ge<arguments.length;ge++)this.define(arguments[ge])}return(0,z.default)(me,[{key:"define",value:function(ge,_e){for(var he in ge){for(var pe=ge[he],ke=0;ke<pe.length;ke++){var Te=pe[ke];if(!_e&&Te in this._types)throw new Error('Attempt to change mapping for "'+Te+'" extension from "'+this._types[Te]+'" to "'+he+'". Pass `force=true` to allow this, otherwise remove "'+Te+'" from the list of extensions for "'+he+'".');this._types[Te]=he}!_e&&this._extensions[he]||(this._extensions[he]=pe[0])}}},{key:"getType",value:function(ge){ge=String(ge);var _e=ge.replace(/^.*[\/\\]/,"").toLowerCase(),he=_e.replace(/^.*\./,"").toLowerCase(),pe=_e.length<ge.length;return(he.length<_e.length-1||!pe)&&this._types[he]||null}},{key:"getExtension",value:function(ge){return(ge=/^\s*([^;\s]*)/.test(ge)&&RegExp.$1)&&this._extensions[ge.toLowerCase()]||null}}]),me}();oe.exports=ye},{}],2:[function(ae,oe,ve){var ye=ae("./Mime");oe.exports=new ye(ae("./types/standard"),ae("./types/other"))},{"./Mime":1,"./types/other":3,"./types/standard":4}],3:[function(ae,oe,ve){oe.exports={"application/prs.cww":["cww"],"application/vnd.3gpp.pic-bw-large":["plb"],"application/vnd.3gpp.pic-bw-small":["psb"],"application/vnd.3gpp.pic-bw-var":["pvb"],"application/vnd.3gpp2.tcap":["tcap"],"application/vnd.3m.post-it-notes":["pwn"],"application/vnd.accpac.simply.aso":["aso"],"application/vnd.accpac.simply.imp":["imp"],"application/vnd.acucobol":["acu"],"application/vnd.acucorp":["atc","acutc"],"application/vnd.adobe.air-application-installer-package+zip":["air"],"application/vnd.adobe.formscentral.fcdt":["fcdt"],"application/vnd.adobe.fxp":["fxp","fxpl"],"application/vnd.adobe.xdp+xml":["xdp"],"application/vnd.adobe.xfdf":["xfdf"],"application/vnd.ahead.space":["ahead"],"application/vnd.airzip.filesecure.azf":["azf"],"application/vnd.airzip.filesecure.azs":["azs"],"application/vnd.amazon.ebook":["azw"],"application/vnd.americandynamics.acc":["acc"],"application/vnd.amiga.ami":["ami"],"application/vnd.android.package-archive":["apk"],"application/vnd.anser-web-certificate-issue-initiation":["cii"],"application/vnd.anser-web-funds-transfer-initiation":["fti"],"application/vnd.antix.game-component":["atx"],"application/vnd.apple.installer+xml":["mpkg"],"application/vnd.apple.mpegurl":["m3u8"],"application/vnd.apple.pkpass":["pkpass"],"application/vnd.aristanetworks.swi":["swi"],"application/vnd.astraea-software.iota":["iota"],"application/vnd.audiograph":["aep"],"application/vnd.blueice.multipass":["mpm"],"application/vnd.bmi":["bmi"],"application/vnd.businessobjects":["rep"],"application/vnd.chemdraw+xml":["cdxml"],"application/vnd.chipnuts.karaoke-mmd":["mmd"],"application/vnd.cinderella":["cdy"],"application/vnd.claymore":["cla"],"application/vnd.cloanto.rp9":["rp9"],"application/vnd.clonk.c4group":["c4g","c4d","c4f","c4p","c4u"],"application/vnd.cluetrust.cartomobile-config":["c11amc"],"application/vnd.cluetrust.cartomobile-config-pkg":["c11amz"],"application/vnd.commonspace":["csp"],"application/vnd.contact.cmsg":["cdbcmsg"],"application/vnd.cosmocaller":["cmc"],"application/vnd.crick.clicker":["clkx"],"application/vnd.crick.clicker.keyboard":["clkk"],"application/vnd.crick.clicker.palette":["clkp"],"application/vnd.crick.clicker.template":["clkt"],"application/vnd.crick.clicker.wordbank":["clkw"],"application/vnd.criticaltools.wbs+xml":["wbs"],"application/vnd.ctc-posml":["pml"],"application/vnd.cups-ppd":["ppd"],"application/vnd.curl.car":["car"],"application/vnd.curl.pcurl":["pcurl"],"application/vnd.dart":["dart"],"application/vnd.data-vision.rdz":["rdz"],"application/vnd.dece.data":["uvf","uvvf","uvd","uvvd"],"application/vnd.dece.ttml+xml":["uvt","uvvt"],"application/vnd.dece.unspecified":["uvx","uvvx"],"application/vnd.dece.zip":["uvz","uvvz"],"application/vnd.denovo.fcselayout-link":["fe_launch"],"application/vnd.dna":["dna"],"application/vnd.dolby.mlp":["mlp"],"application/vnd.dpgraph":["dpg"],"application/vnd.dreamfactory":["dfac"],"application/vnd.ds-keypoint":["kpxx"],"application/vnd.dvb.ait":["ait"],"application/vnd.dvb.service":["svc"],"application/vnd.dynageo":["geo"],"application/vnd.ecowin.chart":["mag"],"application/vnd.enliven":["nml"],"application/vnd.epson.esf":["esf"],"application/vnd.epson.msf":["msf"],"application/vnd.epson.quickanime":["qam"],"application/vnd.epson.salt":["slt"],"application/vnd.epson.ssf":["ssf"],"application/vnd.eszigno3+xml":["es3","et3"],"application/vnd.ezpix-album":["ez2"],"application/vnd.ezpix-package":["ez3"],"application/vnd.fdf":["fdf"],"application/vnd.fdsn.mseed":["mseed"],"application/vnd.fdsn.seed":["seed","dataless"],"application/vnd.flographit":["gph"],"application/vnd.fluxtime.clip":["ftc"],"application/vnd.framemaker":["fm","frame","maker","book"],"application/vnd.frogans.fnc":["fnc"],"application/vnd.frogans.ltf":["ltf"],"application/vnd.fsc.weblaunch":["fsc"],"application/vnd.fujitsu.oasys":["oas"],"application/vnd.fujitsu.oasys2":["oa2"],"application/vnd.fujitsu.oasys3":["oa3"],"application/vnd.fujitsu.oasysgp":["fg5"],"application/vnd.fujitsu.oasysprs":["bh2"],"application/vnd.fujixerox.ddd":["ddd"],"application/vnd.fujixerox.docuworks":["xdw"],"application/vnd.fujixerox.docuworks.binder":["xbd"],"application/vnd.fuzzysheet":["fzs"],"application/vnd.genomatix.tuxedo":["txd"],"application/vnd.geogebra.file":["ggb"],"application/vnd.geogebra.tool":["ggt"],"application/vnd.geometry-explorer":["gex","gre"],"application/vnd.geonext":["gxt"],"application/vnd.geoplan":["g2w"],"application/vnd.geospace":["g3w"],"application/vnd.gmx":["gmx"],"application/vnd.google-apps.document":["gdoc"],"application/vnd.google-apps.presentation":["gslides"],"application/vnd.google-apps.spreadsheet":["gsheet"],"application/vnd.google-earth.kml+xml":["kml"],"application/vnd.google-earth.kmz":["kmz"],"application/vnd.grafeq":["gqf","gqs"],"application/vnd.groove-account":["gac"],"application/vnd.groove-help":["ghf"],"application/vnd.groove-identity-message":["gim"],"application/vnd.groove-injector":["grv"],"application/vnd.groove-tool-message":["gtm"],"application/vnd.groove-tool-template":["tpl"],"application/vnd.groove-vcard":["vcg"],"application/vnd.hal+xml":["hal"],"application/vnd.handheld-entertainment+xml":["zmm"],"application/vnd.hbci":["hbci"],"application/vnd.hhe.lesson-player":["les"],"application/vnd.hp-hpgl":["hpgl"],"application/vnd.hp-hpid":["hpid"],"application/vnd.hp-hps":["hps"],"application/vnd.hp-jlyt":["jlt"],"application/vnd.hp-pcl":["pcl"],"application/vnd.hp-pclxl":["pclxl"],"application/vnd.hydrostatix.sof-data":["sfd-hdstx"],"application/vnd.ibm.minipay":["mpy"],"application/vnd.ibm.modcap":["afp","listafp","list3820"],"application/vnd.ibm.rights-management":["irm"],"application/vnd.ibm.secure-container":["sc"],"application/vnd.iccprofile":["icc","icm"],"application/vnd.igloader":["igl"],"application/vnd.immervision-ivp":["ivp"],"application/vnd.immervision-ivu":["ivu"],"application/vnd.insors.igm":["igm"],"application/vnd.intercon.formnet":["xpw","xpx"],"application/vnd.intergeo":["i2g"],"application/vnd.intu.qbo":["qbo"],"application/vnd.intu.qfx":["qfx"],"application/vnd.ipunplugged.rcprofile":["rcprofile"],"application/vnd.irepository.package+xml":["irp"],"application/vnd.is-xpr":["xpr"],"application/vnd.isac.fcs":["fcs"],"application/vnd.jam":["jam"],"application/vnd.jcp.javame.midlet-rms":["rms"],"application/vnd.jisp":["jisp"],"application/vnd.joost.joda-archive":["joda"],"application/vnd.kahootz":["ktz","ktr"],"application/vnd.kde.karbon":["karbon"],"application/vnd.kde.kchart":["chrt"],"application/vnd.kde.kformula":["kfo"],"application/vnd.kde.kivio":["flw"],"application/vnd.kde.kontour":["kon"],"application/vnd.kde.kpresenter":["kpr","kpt"],"application/vnd.kde.kspread":["ksp"],"application/vnd.kde.kword":["kwd","kwt"],"application/vnd.kenameaapp":["htke"],"application/vnd.kidspiration":["kia"],"application/vnd.kinar":["kne","knp"],"application/vnd.koan":["skp","skd","skt","skm"],"application/vnd.kodak-descriptor":["sse"],"application/vnd.las.las+xml":["lasxml"],"application/vnd.llamagraphics.life-balance.desktop":["lbd"],"application/vnd.llamagraphics.life-balance.exchange+xml":["lbe"],"application/vnd.lotus-1-2-3":["123"],"application/vnd.lotus-approach":["apr"],"application/vnd.lotus-freelance":["pre"],"application/vnd.lotus-notes":["nsf"],"application/vnd.lotus-organizer":["org"],"application/vnd.lotus-screencam":["scm"],"application/vnd.lotus-wordpro":["lwp"],"application/vnd.macports.portpkg":["portpkg"],"application/vnd.mcd":["mcd"],"application/vnd.medcalcdata":["mc1"],"application/vnd.mediastation.cdkey":["cdkey"],"application/vnd.mfer":["mwf"],"application/vnd.mfmp":["mfm"],"application/vnd.micrografx.flo":["flo"],"application/vnd.micrografx.igx":["igx"],"application/vnd.mif":["mif"],"application/vnd.mobius.daf":["daf"],"application/vnd.mobius.dis":["dis"],"application/vnd.mobius.mbk":["mbk"],"application/vnd.mobius.mqy":["mqy"],"application/vnd.mobius.msl":["msl"],"application/vnd.mobius.plc":["plc"],"application/vnd.mobius.txf":["txf"],"application/vnd.mophun.application":["mpn"],"application/vnd.mophun.certificate":["mpc"],"application/vnd.mozilla.xul+xml":["xul"],"application/vnd.ms-artgalry":["cil"],"application/vnd.ms-cab-compressed":["cab"],"application/vnd.ms-excel":["xls","xlm","xla","xlc","xlt","xlw"],"application/vnd.ms-excel.addin.macroenabled.12":["xlam"],"application/vnd.ms-excel.sheet.binary.macroenabled.12":["xlsb"],"application/vnd.ms-excel.sheet.macroenabled.12":["xlsm"],"application/vnd.ms-excel.template.macroenabled.12":["xltm"],"application/vnd.ms-fontobject":["eot"],"application/vnd.ms-htmlhelp":["chm"],"application/vnd.ms-ims":["ims"],"application/vnd.ms-lrm":["lrm"],"application/vnd.ms-officetheme":["thmx"],"application/vnd.ms-outlook":["msg"],"application/vnd.ms-pki.seccat":["cat"],"application/vnd.ms-pki.stl":["stl"],"application/vnd.ms-powerpoint":["ppt","pps","pot"],"application/vnd.ms-powerpoint.addin.macroenabled.12":["ppam"],"application/vnd.ms-powerpoint.presentation.macroenabled.12":["pptm"],"application/vnd.ms-powerpoint.slide.macroenabled.12":["sldm"],"application/vnd.ms-powerpoint.slideshow.macroenabled.12":["ppsm"],"application/vnd.ms-powerpoint.template.macroenabled.12":["potm"],"application/vnd.ms-project":["mpp","mpt"],"application/vnd.ms-word.document.macroenabled.12":["docm"],"application/vnd.ms-word.template.macroenabled.12":["dotm"],"application/vnd.ms-works":["wps","wks","wcm","wdb"],"application/vnd.ms-wpl":["wpl"],"application/vnd.ms-xpsdocument":["xps"],"application/vnd.mseq":["mseq"],"application/vnd.musician":["mus"],"application/vnd.muvee.style":["msty"],"application/vnd.mynfc":["taglet"],"application/vnd.neurolanguage.nlu":["nlu"],"application/vnd.nitf":["ntf","nitf"],"application/vnd.noblenet-directory":["nnd"],"application/vnd.noblenet-sealer":["nns"],"application/vnd.noblenet-web":["nnw"],"application/vnd.nokia.n-gage.data":["ngdat"],"application/vnd.nokia.n-gage.symbian.install":["n-gage"],"application/vnd.nokia.radio-preset":["rpst"],"application/vnd.nokia.radio-presets":["rpss"],"application/vnd.novadigm.edm":["edm"],"application/vnd.novadigm.edx":["edx"],"application/vnd.novadigm.ext":["ext"],"application/vnd.oasis.opendocument.chart":["odc"],"application/vnd.oasis.opendocument.chart-template":["otc"],"application/vnd.oasis.opendocument.database":["odb"],"application/vnd.oasis.opendocument.formula":["odf"],"application/vnd.oasis.opendocument.formula-template":["odft"],"application/vnd.oasis.opendocument.graphics":["odg"],"application/vnd.oasis.opendocument.graphics-template":["otg"],"application/vnd.oasis.opendocument.image":["odi"],"application/vnd.oasis.opendocument.image-template":["oti"],"application/vnd.oasis.opendocument.presentation":["odp"],"application/vnd.oasis.opendocument.presentation-template":["otp"],"application/vnd.oasis.opendocument.spreadsheet":["ods"],"application/vnd.oasis.opendocument.spreadsheet-template":["ots"],"application/vnd.oasis.opendocument.text":["odt"],"application/vnd.oasis.opendocument.text-master":["odm"],"application/vnd.oasis.opendocument.text-template":["ott"],"application/vnd.oasis.opendocument.text-web":["oth"],"application/vnd.olpc-sugar":["xo"],"application/vnd.oma.dd2+xml":["dd2"],"application/vnd.openofficeorg.extension":["oxt"],"application/vnd.openxmlformats-officedocument.presentationml.presentation":["pptx"],"application/vnd.openxmlformats-officedocument.presentationml.slide":["sldx"],"application/vnd.openxmlformats-officedocument.presentationml.slideshow":["ppsx"],"application/vnd.openxmlformats-officedocument.presentationml.template":["potx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":["xlsx"],"application/vnd.openxmlformats-officedocument.spreadsheetml.template":["xltx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.document":["docx"],"application/vnd.openxmlformats-officedocument.wordprocessingml.template":["dotx"],"application/vnd.osgeo.mapguide.package":["mgp"],"application/vnd.osgi.dp":["dp"],"application/vnd.osgi.subsystem":["esa"],"application/vnd.palm":["pdb","pqa","oprc"],"application/vnd.pawaafile":["paw"],"application/vnd.pg.format":["str"],"application/vnd.pg.osasli":["ei6"],"application/vnd.picsel":["efif"],"application/vnd.pmi.widget":["wg"],"application/vnd.pocketlearn":["plf"],"application/vnd.powerbuilder6":["pbd"],"application/vnd.previewsystems.box":["box"],"application/vnd.proteus.magazine":["mgz"],"application/vnd.publishare-delta-tree":["qps"],"application/vnd.pvi.ptid1":["ptid"],"application/vnd.quark.quarkxpress":["qxd","qxt","qwd","qwt","qxl","qxb"],"application/vnd.realvnc.bed":["bed"],"application/vnd.recordare.musicxml":["mxl"],"application/vnd.recordare.musicxml+xml":["musicxml"],"application/vnd.rig.cryptonote":["cryptonote"],"application/vnd.rim.cod":["cod"],"application/vnd.rn-realmedia":["rm"],"application/vnd.rn-realmedia-vbr":["rmvb"],"application/vnd.route66.link66+xml":["link66"],"application/vnd.sailingtracker.track":["st"],"application/vnd.seemail":["see"],"application/vnd.sema":["sema"],"application/vnd.semd":["semd"],"application/vnd.semf":["semf"],"application/vnd.shana.informed.formdata":["ifm"],"application/vnd.shana.informed.formtemplate":["itp"],"application/vnd.shana.informed.interchange":["iif"],"application/vnd.shana.informed.package":["ipk"],"application/vnd.simtech-mindmapper":["twd","twds"],"application/vnd.smaf":["mmf"],"application/vnd.smart.teacher":["teacher"],"application/vnd.solent.sdkm+xml":["sdkm","sdkd"],"application/vnd.spotfire.dxp":["dxp"],"application/vnd.spotfire.sfs":["sfs"],"application/vnd.stardivision.calc":["sdc"],"application/vnd.stardivision.draw":["sda"],"application/vnd.stardivision.impress":["sdd"],"application/vnd.stardivision.math":["smf"],"application/vnd.stardivision.writer":["sdw","vor"],"application/vnd.stardivision.writer-global":["sgl"],"application/vnd.stepmania.package":["smzip"],"application/vnd.stepmania.stepchart":["sm"],"application/vnd.sun.wadl+xml":["wadl"],"application/vnd.sun.xml.calc":["sxc"],"application/vnd.sun.xml.calc.template":["stc"],"application/vnd.sun.xml.draw":["sxd"],"application/vnd.sun.xml.draw.template":["std"],"application/vnd.sun.xml.impress":["sxi"],"application/vnd.sun.xml.impress.template":["sti"],"application/vnd.sun.xml.math":["sxm"],"application/vnd.sun.xml.writer":["sxw"],"application/vnd.sun.xml.writer.global":["sxg"],"application/vnd.sun.xml.writer.template":["stw"],"application/vnd.sus-calendar":["sus","susp"],"application/vnd.svd":["svd"],"application/vnd.symbian.install":["sis","sisx"],"application/vnd.syncml+xml":["xsm"],"application/vnd.syncml.dm+wbxml":["bdm"],"application/vnd.syncml.dm+xml":["xdm"],"application/vnd.tao.intent-module-archive":["tao"],"application/vnd.tcpdump.pcap":["pcap","cap","dmp"],"application/vnd.tmobile-livetv":["tmo"],"application/vnd.trid.tpt":["tpt"],"application/vnd.triscape.mxs":["mxs"],"application/vnd.trueapp":["tra"],"application/vnd.ufdl":["ufd","ufdl"],"application/vnd.uiq.theme":["utz"],"application/vnd.umajin":["umj"],"application/vnd.unity":["unityweb"],"application/vnd.uoml+xml":["uoml"],"application/vnd.vcx":["vcx"],"application/vnd.visio":["vsd","vst","vss","vsw"],"application/vnd.visionary":["vis"],"application/vnd.vsf":["vsf"],"application/vnd.wap.wbxml":["wbxml"],"application/vnd.wap.wmlc":["wmlc"],"application/vnd.wap.wmlscriptc":["wmlsc"],"application/vnd.webturbo":["wtb"],"application/vnd.wolfram.player":["nbp"],"application/vnd.wordperfect":["wpd"],"application/vnd.wqd":["wqd"],"application/vnd.wt.stf":["stf"],"application/vnd.xara":["xar"],"application/vnd.xfdl":["xfdl"],"application/vnd.yamaha.hv-dic":["hvd"],"application/vnd.yamaha.hv-script":["hvs"],"application/vnd.yamaha.hv-voice":["hvp"],"application/vnd.yamaha.openscoreformat":["osf"],"application/vnd.yamaha.openscoreformat.osfpvg+xml":["osfpvg"],"application/vnd.yamaha.smaf-audio":["saf"],"application/vnd.yamaha.smaf-phrase":["spf"],"application/vnd.yellowriver-custom-menu":["cmp"],"application/vnd.zul":["zir","zirz"],"application/vnd.zzazz.deck+xml":["zaz"],"application/x-7z-compressed":["7z"],"application/x-abiword":["abw"],"application/x-ace-compressed":["ace"],"application/x-apple-diskimage":[],"application/x-arj":["arj"],"application/x-authorware-bin":["aab","x32","u32","vox"],"application/x-authorware-map":["aam"],"application/x-authorware-seg":["aas"],"application/x-bcpio":["bcpio"],"application/x-bdoc":[],"application/x-bittorrent":["torrent"],"application/x-blorb":["blb","blorb"],"application/x-bzip":["bz"],"application/x-bzip2":["bz2","boz"],"application/x-cbr":["cbr","cba","cbt","cbz","cb7"],"application/x-cdlink":["vcd"],"application/x-cfs-compressed":["cfs"],"application/x-chat":["chat"],"application/x-chess-pgn":["pgn"],"application/x-chrome-extension":["crx"],"application/x-cocoa":["cco"],"application/x-conference":["nsc"],"application/x-cpio":["cpio"],"application/x-csh":["csh"],"application/x-debian-package":["udeb"],"application/x-dgc-compressed":["dgc"],"application/x-director":["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"],"application/x-doom":["wad"],"application/x-dtbncx+xml":["ncx"],"application/x-dtbook+xml":["dtb"],"application/x-dtbresource+xml":["res"],"application/x-dvi":["dvi"],"application/x-envoy":["evy"],"application/x-eva":["eva"],"application/x-font-bdf":["bdf"],"application/x-font-ghostscript":["gsf"],"application/x-font-linux-psf":["psf"],"application/x-font-otf":[],"application/x-font-pcf":["pcf"],"application/x-font-snf":["snf"],"application/x-font-ttf":["ttf","ttc"],"application/x-font-type1":["pfa","pfb","pfm","afm"],"application/x-freearc":["arc"],"application/x-futuresplash":["spl"],"application/x-gca-compressed":["gca"],"application/x-glulx":["ulx"],"application/x-gnumeric":["gnumeric"],"application/x-gramps-xml":["gramps"],"application/x-gtar":["gtar"],"application/x-hdf":["hdf"],"application/x-httpd-php":["php"],"application/x-install-instructions":["install"],"application/x-iso9660-image":[],"application/x-java-archive-diff":["jardiff"],"application/x-java-jnlp-file":["jnlp"],"application/x-latex":["latex"],"application/x-lua-bytecode":["luac"],"application/x-lzh-compressed":["lzh","lha"],"application/x-makeself":["run"],"application/x-mie":["mie"],"application/x-mobipocket-ebook":["prc","mobi"],"application/x-ms-application":["application"],"application/x-ms-shortcut":["lnk"],"application/x-ms-wmd":["wmd"],"application/x-ms-wmz":["wmz"],"application/x-ms-xbap":["xbap"],"application/x-msaccess":["mdb"],"application/x-msbinder":["obd"],"application/x-mscardfile":["crd"],"application/x-msclip":["clp"],"application/x-msdos-program":[],"application/x-msdownload":["com","bat"],"application/x-msmediaview":["mvb","m13","m14"],"application/x-msmetafile":["wmf","emf","emz"],"application/x-msmoney":["mny"],"application/x-mspublisher":["pub"],"application/x-msschedule":["scd"],"application/x-msterminal":["trm"],"application/x-mswrite":["wri"],"application/x-netcdf":["nc","cdf"],"application/x-ns-proxy-autoconfig":["pac"],"application/x-nzb":["nzb"],"application/x-perl":["pl","pm"],"application/x-pilot":[],"application/x-pkcs12":["p12","pfx"],"application/x-pkcs7-certificates":["p7b","spc"],"application/x-pkcs7-certreqresp":["p7r"],"application/x-rar-compressed":["rar"],"application/x-redhat-package-manager":["rpm"],"application/x-research-info-systems":["ris"],"application/x-sea":["sea"],"application/x-sh":["sh"],"application/x-shar":["shar"],"application/x-shockwave-flash":["swf"],"application/x-silverlight-app":["xap"],"application/x-sql":["sql"],"application/x-stuffit":["sit"],"application/x-stuffitx":["sitx"],"application/x-subrip":["srt"],"application/x-sv4cpio":["sv4cpio"],"application/x-sv4crc":["sv4crc"],"application/x-t3vm-image":["t3"],"application/x-tads":["gam"],"application/x-tar":["tar"],"application/x-tcl":["tcl","tk"],"application/x-tex":["tex"],"application/x-tex-tfm":["tfm"],"application/x-texinfo":["texinfo","texi"],"application/x-tgif":["obj"],"application/x-ustar":["ustar"],"application/x-virtualbox-hdd":["hdd"],"application/x-virtualbox-ova":["ova"],"application/x-virtualbox-ovf":["ovf"],"application/x-virtualbox-vbox":["vbox"],"application/x-virtualbox-vbox-extpack":["vbox-extpack"],"application/x-virtualbox-vdi":["vdi"],"application/x-virtualbox-vhd":["vhd"],"application/x-virtualbox-vmdk":["vmdk"],"application/x-wais-source":["src"],"application/x-web-app-manifest+json":["webapp"],"application/x-x509-ca-cert":["der","crt","pem"],"application/x-xfig":["fig"],"application/x-xliff+xml":["xlf"],"application/x-xpinstall":["xpi"],"application/x-xz":["xz"],"application/x-zmachine":["z1","z2","z3","z4","z5","z6","z7","z8"],"audio/vnd.dece.audio":["uva","uvva"],"audio/vnd.digital-winds":["eol"],"audio/vnd.dra":["dra"],"audio/vnd.dts":["dts"],"audio/vnd.dts.hd":["dtshd"],"audio/vnd.lucent.voice":["lvp"],"audio/vnd.ms-playready.media.pya":["pya"],"audio/vnd.nuera.ecelp4800":["ecelp4800"],"audio/vnd.nuera.ecelp7470":["ecelp7470"],"audio/vnd.nuera.ecelp9600":["ecelp9600"],"audio/vnd.rip":["rip"],"audio/x-aac":["aac"],"audio/x-aiff":["aif","aiff","aifc"],"audio/x-caf":["caf"],"audio/x-flac":["flac"],"audio/x-m4a":[],"audio/x-matroska":["mka"],"audio/x-mpegurl":["m3u"],"audio/x-ms-wax":["wax"],"audio/x-ms-wma":["wma"],"audio/x-pn-realaudio":["ram","ra"],"audio/x-pn-realaudio-plugin":["rmp"],"audio/x-realaudio":[],"audio/x-wav":[],"chemical/x-cdx":["cdx"],"chemical/x-cif":["cif"],"chemical/x-cmdf":["cmdf"],"chemical/x-cml":["cml"],"chemical/x-csml":["csml"],"chemical/x-xyz":["xyz"],"image/prs.btif":["btif"],"image/vnd.adobe.photoshop":["psd"],"image/vnd.dece.graphic":["uvi","uvvi","uvg","uvvg"],"image/vnd.djvu":["djvu","djv"],"image/vnd.dvb.subtitle":[],"image/vnd.dwg":["dwg"],"image/vnd.dxf":["dxf"],"image/vnd.fastbidsheet":["fbs"],"image/vnd.fpx":["fpx"],"image/vnd.fst":["fst"],"image/vnd.fujixerox.edmics-mmr":["mmr"],"image/vnd.fujixerox.edmics-rlc":["rlc"],"image/vnd.ms-modi":["mdi"],"image/vnd.ms-photo":["wdp"],"image/vnd.net-fpx":["npx"],"image/vnd.wap.wbmp":["wbmp"],"image/vnd.xiff":["xif"],"image/x-3ds":["3ds"],"image/x-cmu-raster":["ras"],"image/x-cmx":["cmx"],"image/x-freehand":["fh","fhc","fh4","fh5","fh7"],"image/x-icon":["ico"],"image/x-jng":["jng"],"image/x-mrsid-image":["sid"],"image/x-ms-bmp":[],"image/x-pcx":["pcx"],"image/x-pict":["pic","pct"],"image/x-portable-anymap":["pnm"],"image/x-portable-bitmap":["pbm"],"image/x-portable-graymap":["pgm"],"image/x-portable-pixmap":["ppm"],"image/x-rgb":["rgb"],"image/x-tga":["tga"],"image/x-xbitmap":["xbm"],"image/x-xpixmap":["xpm"],"image/x-xwindowdump":["xwd"],"model/vnd.collada+xml":["dae"],"model/vnd.dwf":["dwf"],"model/vnd.gdl":["gdl"],"model/vnd.gtw":["gtw"],"model/vnd.mts":["mts"],"model/vnd.vtu":["vtu"],"text/prs.lines.tag":["dsc"],"text/vnd.curl":["curl"],"text/vnd.curl.dcurl":["dcurl"],"text/vnd.curl.mcurl":["mcurl"],"text/vnd.curl.scurl":["scurl"],"text/vnd.dvb.subtitle":["sub"],"text/vnd.fly":["fly"],"text/vnd.fmi.flexstor":["flx"],"text/vnd.graphviz":["gv"],"text/vnd.in3d.3dml":["3dml"],"text/vnd.in3d.spot":["spot"],"text/vnd.sun.j2me.app-descriptor":["jad"],"text/vnd.wap.wml":["wml"],"text/vnd.wap.wmlscript":["wmls"],"text/x-asm":["s","asm"],"text/x-c":["c","cc","cxx","cpp","h","hh","dic"],"text/x-component":["htc"],"text/x-fortran":["f","for","f77","f90"],"text/x-handlebars-template":["hbs"],"text/x-java-source":["java"],"text/x-lua":["lua"],"text/x-markdown":["mkd"],"text/x-nfo":["nfo"],"text/x-opml":["opml"],"text/x-org":[],"text/x-pascal":["p","pas"],"text/x-processing":["pde"],"text/x-sass":["sass"],"text/x-scss":["scss"],"text/x-setext":["etx"],"text/x-sfv":["sfv"],"text/x-suse-ymp":["ymp"],"text/x-uuencode":["uu"],"text/x-vcalendar":["vcs"],"text/x-vcard":["vcf"],"video/vnd.dece.hd":["uvh","uvvh"],"video/vnd.dece.mobile":["uvm","uvvm"],"video/vnd.dece.pd":["uvp","uvvp"],"video/vnd.dece.sd":["uvs","uvvs"],"video/vnd.dece.video":["uvv","uvvv"],"video/vnd.dvb.file":["dvb"],"video/vnd.fvt":["fvt"],"video/vnd.mpegurl":["mxu","m4u"],"video/vnd.ms-playready.media.pyv":["pyv"],"video/vnd.uvvu.mp4":["uvu","uvvu"],"video/vnd.vivo":["viv"],"video/x-f4v":["f4v"],"video/x-fli":["fli"],"video/x-flv":["flv"],"video/x-m4v":["m4v"],"video/x-matroska":["mkv","mk3d","mks"],"video/x-mng":["mng"],"video/x-ms-asf":["asf","asx"],"video/x-ms-vob":["vob"],"video/x-ms-wm":["wm"],"video/x-ms-wmv":["wmv"],"video/x-ms-wmx":["wmx"],"video/x-ms-wvx":["wvx"],"video/x-msvideo":["avi"],"video/x-sgi-movie":["movie"],"video/x-smv":["smv"],"x-conference/x-cooltalk":["ice"]}},{}],4:[function(ae,oe,ve){oe.exports={"application/andrew-inset":["ez"],"application/applixware":["aw"],"application/atom+xml":["atom"],"application/atomcat+xml":["atomcat"],"application/atomsvc+xml":["atomsvc"],"application/bdoc":["bdoc"],"application/ccxml+xml":["ccxml"],"application/cdmi-capability":["cdmia"],"application/cdmi-container":["cdmic"],"application/cdmi-domain":["cdmid"],"application/cdmi-object":["cdmio"],"application/cdmi-queue":["cdmiq"],"application/cu-seeme":["cu"],"application/dash+xml":["mpd"],"application/davmount+xml":["davmount"],"application/docbook+xml":["dbk"],"application/dssc+der":["dssc"],"application/dssc+xml":["xdssc"],"application/ecmascript":["ecma"],"application/emma+xml":["emma"],"application/epub+zip":["epub"],"application/exi":["exi"],"application/font-tdpfr":["pfr"],"application/font-woff":["woff"],"application/font-woff2":["woff2"],"application/geo+json":["geojson"],"application/gml+xml":["gml"],"application/gpx+xml":["gpx"],"application/gxf":["gxf"],"application/gzip":["gz"],"application/hyperstudio":["stk"],"application/inkml+xml":["ink","inkml"],"application/ipfix":["ipfix"],"application/java-archive":["jar","war","ear"],"application/java-serialized-object":["ser"],"application/java-vm":["class"],"application/javascript":["js","mjs"],"application/json":["json","map"],"application/json5":["json5"],"application/jsonml+json":["jsonml"],"application/ld+json":["jsonld"],"application/lost+xml":["lostxml"],"application/mac-binhex40":["hqx"],"application/mac-compactpro":["cpt"],"application/mads+xml":["mads"],"application/manifest+json":["webmanifest"],"application/marc":["mrc"],"application/marcxml+xml":["mrcx"],"application/mathematica":["ma","nb","mb"],"application/mathml+xml":["mathml"],"application/mbox":["mbox"],"application/mediaservercontrol+xml":["mscml"],"application/metalink+xml":["metalink"],"application/metalink4+xml":["meta4"],"application/mets+xml":["mets"],"application/mods+xml":["mods"],"application/mp21":["m21","mp21"],"application/mp4":["mp4s","m4p"],"application/msword":["doc","dot"],"application/mxf":["mxf"],"application/octet-stream":["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"],"application/oda":["oda"],"application/oebps-package+xml":["opf"],"application/ogg":["ogx"],"application/omdoc+xml":["omdoc"],"application/onenote":["onetoc","onetoc2","onetmp","onepkg"],"application/oxps":["oxps"],"application/patch-ops-error+xml":["xer"],"application/pdf":["pdf"],"application/pgp-encrypted":["pgp"],"application/pgp-signature":["asc","sig"],"application/pics-rules":["prf"],"application/pkcs10":["p10"],"application/pkcs7-mime":["p7m","p7c"],"application/pkcs7-signature":["p7s"],"application/pkcs8":["p8"],"application/pkix-attr-cert":["ac"],"application/pkix-cert":["cer"],"application/pkix-crl":["crl"],"application/pkix-pkipath":["pkipath"],"application/pkixcmp":["pki"],"application/pls+xml":["pls"],"application/postscript":["ai","eps","ps"],"application/pskc+xml":["pskcxml"],"application/rdf+xml":["rdf"],"application/reginfo+xml":["rif"],"application/relax-ng-compact-syntax":["rnc"],"application/resource-lists+xml":["rl"],"application/resource-lists-diff+xml":["rld"],"application/rls-services+xml":["rs"],"application/rpki-ghostbusters":["gbr"],"application/rpki-manifest":["mft"],"application/rpki-roa":["roa"],"application/rsd+xml":["rsd"],"application/rss+xml":["rss"],"application/rtf":["rtf"],"application/sbml+xml":["sbml"],"application/scvp-cv-request":["scq"],"application/scvp-cv-response":["scs"],"application/scvp-vp-request":["spq"],"application/scvp-vp-response":["spp"],"application/sdp":["sdp"],"application/set-payment-initiation":["setpay"],"application/set-registration-initiation":["setreg"],"application/shf+xml":["shf"],"application/smil+xml":["smi","smil"],"application/sparql-query":["rq"],"application/sparql-results+xml":["srx"],"application/srgs":["gram"],"application/srgs+xml":["grxml"],"application/sru+xml":["sru"],"application/ssdl+xml":["ssdl"],"application/ssml+xml":["ssml"],"application/tei+xml":["tei","teicorpus"],"application/thraud+xml":["tfi"],"application/timestamped-data":["tsd"],"application/voicexml+xml":["vxml"],"application/widget":["wgt"],"application/winhlp":["hlp"],"application/wsdl+xml":["wsdl"],"application/wspolicy+xml":["wspolicy"],"application/xaml+xml":["xaml"],"application/xcap-diff+xml":["xdf"],"application/xenc+xml":["xenc"],"application/xhtml+xml":["xhtml","xht"],"application/xml":["xml","xsl","xsd","rng"],"application/xml-dtd":["dtd"],"application/xop+xml":["xop"],"application/xproc+xml":["xpl"],"application/xslt+xml":["xslt"],"application/xspf+xml":["xspf"],"application/xv+xml":["mxml","xhvml","xvml","xvm"],"application/yang":["yang"],"application/yin+xml":["yin"],"application/zip":["zip"],"audio/3gpp":[],"audio/adpcm":["adp"],"audio/basic":["au","snd"],"audio/midi":["mid","midi","kar","rmi"],"audio/mp3":[],"audio/mp4":["m4a","mp4a"],"audio/mpeg":["mpga","mp2","mp2a","mp3","m2a","m3a"],"audio/ogg":["oga","ogg","spx"],"audio/s3m":["s3m"],"audio/silk":["sil"],"audio/wav":["wav"],"audio/wave":[],"audio/webm":["weba"],"audio/xm":["xm"],"font/otf":["otf"],"image/apng":["apng"],"image/bmp":["bmp"],"image/cgm":["cgm"],"image/g3fax":["g3"],"image/gif":["gif"],"image/ief":["ief"],"image/jpeg":["jpeg","jpg","jpe"],"image/ktx":["ktx"],"image/png":["png"],"image/sgi":["sgi"],"image/svg+xml":["svg","svgz"],"image/tiff":["tiff","tif"],"image/webp":["webp"],"message/rfc822":["eml","mime"],"model/gltf+json":["gltf"],"model/gltf-binary":["glb"],"model/iges":["igs","iges"],"model/mesh":["msh","mesh","silo"],"model/vrml":["wrl","vrml"],"model/x3d+binary":["x3db","x3dbz"],"model/x3d+vrml":["x3dv","x3dvz"],"model/x3d+xml":["x3d","x3dz"],"text/cache-manifest":["appcache","manifest"],"text/calendar":["ics","ifb"],"text/coffeescript":["coffee","litcoffee"],"text/css":["css"],"text/csv":["csv"],"text/hjson":["hjson"],"text/html":["html","htm","shtml"],"text/jade":["jade"],"text/jsx":["jsx"],"text/less":["less"],"text/markdown":["markdown","md"],"text/mathml":["mml"],"text/n3":["n3"],"text/plain":["txt","text","conf","def","list","log","in","ini"],"text/richtext":["rtx"],"text/rtf":[],"text/sgml":["sgml","sgm"],"text/slim":["slim","slm"],"text/stylus":["stylus","styl"],"text/tab-separated-values":["tsv"],"text/troff":["t","tr","roff","man","me","ms"],"text/turtle":["ttl"],"text/uri-list":["uri","uris","urls"],"text/vcard":["vcard"],"text/vtt":["vtt"],"text/xml":[],"text/yaml":["yaml","yml"],"video/3gpp":["3gp","3gpp"],"video/3gpp2":["3g2"],"video/h261":["h261"],"video/h263":["h263"],"video/h264":["h264"],"video/jpeg":["jpgv"],"video/jpm":["jpm","jpgm"],"video/mj2":["mj2","mjp2"],"video/mp2t":["ts"],"video/mp4":["mp4","mp4v","mpg4"],"video/mpeg":["mpeg","mpg","mpe","m1v","m2v"],"video/ogg":["ogv"],"video/quicktime":["qt","mov"],"video/webm":["webm"]}},{}]},{},[2])(2)})}).call(this,typeof be.g!="undefined"?be.g:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{"babel-runtime/core-js/object/create":19,"babel-runtime/helpers/classCallCheck":30,"babel-runtime/helpers/createClass":31,"babel-runtime/helpers/typeof":32}],243:[function(ie,Ce,ue){"use strict";ue.encodeURIComponent=function(se){try{return encodeURIComponent(se)}catch(te){return se}},ue.escape=ie("escape-html"),ue.timestamp=function(se){if(se){var te=se;return typeof te=="string"&&(te=Number(te)),String(se).length===10&&(te*=1e3),new Date(te)}return Math.round(Date.now()/1e3)}},{"escape-html":157}],244:[function(ie,Ce,ue){(function(se,te){"use strict";function le(Te){return Te&&Te.__esModule?Te:{default:Te}}function ee(Te,Ee){return Te===void 0?Ee:Te}function ne(Te,Ee){return function(Oe,je,Pe){if(Oe)return Ee(Oe);Te({data:je,status:Pe.statusCode,headers:Pe.headers,res:Pe})}}var E,b=ie("babel-runtime/core-js/json/stringify"),z=le(b),x=ie("babel-runtime/helpers/typeof"),re=le(x),ae=ie("util"),oe=ie("url"),ve=ie("http"),ye=ie("https"),me=ie("debug")("urllib"),ge=ie("humanize-ms"),_e=0,he=Math.pow(2,31)-10,pe=/^https?:\/\//i;ue.TIMEOUTS=[ge("300s"),ge("300s")];var ke=["json","text"];ue.request=function(Te,Ee,Oe){return arguments.length===2&&typeof Ee=="function"&&(Oe=Ee,Ee=null),typeof Oe=="function"?ue.requestWithCallback(Te,Ee,Oe):(E||(E=ie("any-promise")),new E(function(je,Pe){ue.requestWithCallback(Te,Ee,ne(je,Pe))}))},ue.requestWithCallback=function(Te,Ee,Oe){function je(){Ne&&(clearTimeout(Ne),Ne=null)}function Pe(){De&&(clearTimeout(De),De=null)}function Qe(yt,Xt,Lt){if(Pe(),!Oe)return console.warn("[urllib:warn] [%s] [%s] [worker:%s] %s %s callback twice!!!",Date(),Ge,se.pid,dt.method,Te),void(yt&&console.warn(`[urllib:warn] [%s] [%s] [worker:%s] %s: %s
|
|
|
stack: %s`,Date(),Ge,se.pid,yt.name,yt.message,yt.stack));var Kt=Oe;Oe=null;var sn={};if(Lt&&(Re=Lt.statusCode,sn=Lt.headers),Re===401&&sn["www-authenticate"]&&(!Ee.headers||!Ee.headers.Authorization)&&Ee.digestAuth){var Sn=sn["www-authenticate"];if(Sn.indexOf("Digest ")>=0)return me("Request#%d %s: got digest auth header WWW-Authenticate: %s",Ge,Te,Sn),Ee.headers=Ee.headers||{},Ee.headers.Authorization=digestAuthHeader(dt.method,dt.path,Sn,Ee.digestAuth),me("Request#%d %s: auth with digest header: %s",Ge,Te,Ee.headers.Authorization),Lt.headers["set-cookie"]&&(Ee.headers.Cookie=Lt.headers["set-cookie"].join(";")),ue.requestWithCallback(Te,Ee,Kt)}var Yt=Date.now()-$e;Ct&&(Ct.contentDownload=Yt),me("[%sms] done, %s bytes HTTP %s %s %s %s, keepAliveSocket: %s, timing: %j",Yt,Me,Re,dt.method,dt.host,dt.path,Ue,Ct);var In={status:Re,statusCode:Re,headers:sn,size:Me,aborted:tt,rt:Yt,keepAliveSocket:Ue,data:Xt,requestUrls:Ee.requestUrls,timing:Ct,remoteAddress:lt,remotePort:Pt};if(yt){var Kn="";ct&&typeof ct.getCurrentStatus=="function"&&(Kn=", agent status: "+(0,z.default)(ct.getCurrentStatus())),yt.message+=", "+dt.method+" "+Te+" "+Re+" (connected: "+Le+", keepalive socket: "+Ue+Kn+`)
|
|
|
headers: `+(0,z.default)(sn),yt.data=Xt,yt.path=dt.path,yt.status=Re,yt.headers=sn,yt.res=In}Kt(yt,Xt,Ee.streaming?Lt:In),Ee.emitter&&(ze.url=Te,ze.socket=Ft&&Ft.connection,ze.options=dt,ze.size=Be,Ee.emitter.emit("response",{requestId:Ge,error:yt,ctx:Ee.ctx,req:ze,res:In}))}function Xe(yt){var Xt=null;if(Ee.followRedirect&&statuses.redirect[yt.statusCode]){Ee._followRedirectCount=(Ee._followRedirectCount||0)+1;var Lt=yt.headers.location;if(Lt){if(!(Ee._followRedirectCount>Ee.maxRedirects)){var Kt=Ee.formatRedirectUrl?Ee.formatRedirectUrl(Te,Lt):oe.resolve(Te,Lt);me("Request#%d %s: `redirected` from %s to %s",Ge,dt.path,Te,Kt),Pe(),Ee.headers&&Ee.headers.Host&&pe.test(Lt)&&(Ee.headers.Host=null);var sn=Oe;return Oe=null,ue.requestWithCallback(Kt,Ee,sn),{redirect:!0,error:null}}Xt=new Error("Exceeded maxRedirects. Probably stuck in a redirect loop "+Te),Xt.name="MaxRedirectError"}else Xt=new Error("Got statusCode "+yt.statusCode+" but cannot resolve next location from headers"),Xt.name="FollowRedirectError"}return{redirect:!1,error:Xt}}function ot(yt,Xt,Lt){return Lt(null,Xt,yt.headers["content-encoding"])}function He(yt){if(Ct&&(Ct.waiting=Date.now()-$e),me("Request#%d %s `req response` event emit: status %d, headers: %j",Ge,Te,yt.statusCode,yt.headers),Ee.streaming){var Xt=Xe(yt);return Xt.redirect?void yt.resume():Xt.error?(yt.resume(),Qe(Xt.error,null,yt)):Qe(null,null,yt)}if(yt.on("close",function(){me("Request#%d %s: `res close` event emit, total size %d",Ge,Te,Me)}),yt.on("error",function(){me("Request#%d %s: `res error` event emit, total size %d",Ge,Te,Me)}),yt.on("aborted",function(){tt=!0,me("Request#%d %s: `res aborted` event emit, total size %d",Ge,Te,Me)}),vt){var Xt=Xe(yt);return Xt.redirect?void yt.resume():Xt.error?(yt.resume(),vt.end(),Qe(Xt.error,null,yt)):(Ee.consumeWriteStream===!1?yt.on("end",Qe.bind(null,null,null,yt)):isNode010||isNode012?first([[vt,"close"],[yt,"aborted"]],function(sn,Sn,Yt){me("Request#%d %s: writeStream or res %s event emitted",Ge,Te,Yt),Qe(we||null,null,yt)}):vt.on("close",function(){me("Request#%d %s: writeStream close event emitted",Ge,Te),Qe(we||null,null,yt)}),yt.pipe(vt))}var Lt=[];yt.on("data",function(Kt){me("Request#%d %s: `res data` event emit, size %d",Ge,Te,Kt.length),Me+=Kt.length,Lt.push(Kt)}),yt.on("end",function(){var Kt=te.concat(Lt,Me);if(me("Request#%d %s: `res end` event emit, total size %d, _dumped: %s",Ge,Te,Me,yt._dumped),we)return Qe(we,Kt,yt);var sn=Xe(yt);if(sn.error)return Qe(sn.error,Kt,yt);sn.redirect||ot(yt,Kt,function(Sn,Yt,In){if(Sn)return Qe(Sn,Kt,yt);if(!In&&ke.indexOf(Ee.dataType)>=0){try{Yt=decodeBodyByCharset(Yt,yt)}catch(Gn){return me("decodeBodyByCharset error: %s",Gn),Qe(null,Yt,yt)}if(Ee.dataType==="json")if(Me===0)Yt=null;else{var Kn=parseJSON(Yt,It);Kn.error?Sn=Kn.error:Yt=Kn.data}}tt&&me("Request#%d %s: Remote socket was terminated before `response.end()` was called",Ge,Te),Qe(Sn,Yt,yt)})})}function rt(){me("Response timer ticking, timeout: %d",zt),De=setTimeout(function(){De=null;var yt="Response timeout for "+zt+"ms";we=new Error(yt),we.name="ResponseTimeoutError",we.requestId=Ge,me("ResponseTimeout: Request#%d %s %s: %s, connected: %s",Ge,Te,we.name,yt,Le),Ye()},zt)}function Ye(){me("Request#%d %s abort, connected: %s",Ge,Te,Le),Ft.socket||(we.noSocket=!0,Qe(we)),Ft.abort()}if(!Te||typeof Te!="string"&&(Te===void 0?"undefined":(0,re.default)(Te))!=="object"){var ut=ae.format("expect request url to be a string or a http request options, but got %j",Te);throw new Error(ut)}arguments.length===2&&typeof Ee=="function"&&(Oe=Ee,Ee=null),Ee=Ee||{},_e>=he&&(_e=0);var Ge=++_e;Ee.requestUrls=Ee.requestUrls||[];var ze={requestId:Ge,url:Te,args:Ee,ctx:Ee.ctx};Ee.emitter&&Ee.emitter.emit("request",ze),Ee.timeout=Ee.timeout||ue.TIMEOUTS,Ee.maxRedirects=Ee.maxRedirects||10,Ee.streaming=Ee.streaming||Ee.customResponse;var Ve,$e=Date.now();typeof Te=="string"?(pe.test(Te)||(Te="http://"+Te),Ve=oe.parse(Te)):Ve=Te;var nt=(Ee.type||Ee.method||Ve.method||"GET").toUpperCase(),et=Ve.port||80,pt=ve,ct=ee(Ee.agent,ue.agent),It=Ee.fixJSONCtlChars;Ve.protocol==="https:"&&(pt=ye,ct=ee(Ee.httpsAgent,ue.httpsAgent),Ve.port||(et=443));var dt={host:Ve.hostname||Ve.host||"localhost",path:Ve.path||"/",method:nt,port:et,agent:ct,headers:Ee.headers||{},lookup:Ee.lookup};Array.isArray(Ee.timeout)?dt.requestTimeout=Ee.timeout[Ee.timeout.length-1]:Ee.timeout!==void 0&&(dt.requestTimeout=Ee.timeout);for(var Mt=["pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","secureProtocol","secureOptions"],xt=0;xt<Mt.length;xt++){var gt=Mt[xt];Ee.hasOwnProperty(gt)&&(dt[gt]=Ee[gt])}dt.rejectUnauthorized!==!1||dt.hasOwnProperty("secureOptions")||(dt.secureOptions=ie("constants").SSL_OP_NO_TLSv1_2);var _t=Ee.auth||Ve.auth;_t&&(dt.auth=_t);var We=Ee.content||Ee.data,Ae=nt==="GET"||nt==="HEAD"||Ee.dataAsQueryString;if(!Ee.content&&We&&typeof We!="string"&&!te.isBuffer(We))if(Ae)We=Ee.nestedQuerystring?qs.stringify(We):querystring.stringify(We);else{var Se=dt.headers["Content-Type"]||dt.headers["content-type"];Se||(Se=Ee.contentType==="json"?"application/json":"application/x-www-form-urlencoded",dt.headers["Content-Type"]=Se),We=parseContentType(Se).type==="application/json"?(0,z.default)(We):Ee.nestedQuerystring?qs.stringify(We):querystring.stringify(We)}Ae&&We&&(dt.path+=(Ve.query?"&":"?")+We,We=null);var Be=0;if(We){var Ke=We.length;te.isBuffer(We)||(Ke=te.byteLength(We)),Be=dt.headers["Content-Length"]=Ke}Ee.dataType==="json"&&(dt.headers.Accept="application/json"),typeof Ee.beforeRequest=="function"&&Ee.beforeRequest(dt);var Ne=null,De=null,we=null,Le=!1,Ue=!1,Me=0,Re=-1,tt=!1,lt="",Pt="",Ct=null;Ee.timing&&(Ct={queuing:0,dnslookup:0,connected:0,requestSent:0,waiting:0,contentDownload:0}),dt.headers["User-Agent"]||dt.headers["user-agent"]||(dt.headers["User-Agent"]=navigator.userAgent),Ee.gzip&&(dt.headers["Accept-Encoding"]||dt.headers["accept-encoding"]||(dt.headers["Accept-Encoding"]="gzip"));var vt=Ee.writeStream;me("Request#%d %s %s with headers %j, options.path: %s",Ge,nt,Te,dt.headers,dt.path),Ee.requestUrls.push(Te);var Ot,zt;Array.isArray(Ee.timeout)?(Ot=ge(Ee.timeout[0]),zt=ge(Ee.timeout[1])):Ot=zt=ge(Ee.timeout),me("ConnectTimeout: %d, ResponseTimeout: %d",Ot,zt);var Ft;try{Ft=pt.request(dt,He)}catch(yt){return Qe(yt)}return typeof window=="undefined"?function(){me("Connect timer ticking, timeout: %d",Ot),Ne=setTimeout(function(){Ne=null,Re===-1&&(Re=-2);var yt="Connect timeout for "+Ot+"ms",Xt="ConnectionTimeoutError";Ft.socket||(Xt="SocketAssignTimeoutError",yt+=", working sockets is full"),we=new Error(yt),we.name=Xt,we.requestId=Ge,me("ConnectTimeout: Request#%d %s %s: %s, connected: %s",Ge,Te,we.name,yt,Le),Ye()},Ot)}():Ft.on("requestTimeout",function(){Re===-1&&(Re=-2);var yt="Connect timeout for "+Ot+"ms";we=new Error(yt),we.name="ConnectionTimeoutError",we.requestId=Ge,Ye()}),Ct&&Ft.on("finish",function(){Ct.requestSent=Date.now()-$e}),Ft.once("socket",function(yt){Ct&&(Ct.queuing=Date.now()-$e),isNode010&&yt.socket&&(yt=yt.socket);var Xt=yt.readyState;if(Xt==="opening")return yt.once("lookup",function(Lt,Kt,sn){me("Request#%d %s lookup: %s, %s, %s",Ge,Te,Lt,Kt,sn),Ct&&(Ct.dnslookup=Date.now()-$e),Kt&&(lt=Kt)}),void yt.once("connect",function(){Ct&&(Ct.connected=Date.now()-$e),je(),rt(),me("Request#%d %s new socket connected",Ge,Te),Le=!0,lt||(lt=yt.remoteAddress),Pt=yt.remotePort});me("Request#%d %s reuse socket connected, readyState: %s",Ge,Te,Xt),Le=!0,Ue=!0,lt||(lt=yt.remoteAddress),Pt=yt.remotePort,je(),rt()}),Ft.on("error",function(yt){yt.name!=="Error"&&yt.name!=="TypeError"||(yt.name=Le?"ResponseError":"RequestError"),yt.message+=' (req "error")',me("Request#%d %s `req error` event emit, %s: %s",Ge,Te,yt.name,yt.message),Qe(we||yt)}),vt&&vt.once("error",function(yt){yt.message+=' (writeStream "error")',we=yt,me("Request#%d %s `writeStream error` event emit, %s: %s",Ge,Te,yt.name,yt.message),Ye()}),Ee.stream?(Ee.stream.pipe(Ft),Ee.stream.once("error",function(yt){yt.message+=' (stream "error")',we=yt,me("Request#%d %s `readStream error` event emit, %s: %s",Ge,Te,yt.name,yt.message),Ye()})):Ft.end(We),Ft.requestId=Ge,Ft}}).call(this,ie("_process"),ie("buffer").Buffer)},{_process:173,"any-promise":13,"babel-runtime/core-js/json/stringify":17,"babel-runtime/helpers/typeof":32,buffer:38,constants:42,debug:155,http:196,https:159,"humanize-ms":160,url:203,util:207}]},{},[1])(1)}),function(ce){function ie(ue){if(Ce[ue])return Ce[ue].exports;var se=Ce[ue]={i:ue,l:!1,exports:{}};return ce[ue].call(se.exports,se,se.exports,ie),se.l=!0,se.exports}var Ce={};ie.m=ce,ie.c=Ce,ie.d=function(ue,se,te){ie.o(ue,se)||Object.defineProperty(ue,se,{configurable:!1,enumerable:!0,get:te})},ie.n=function(ue){var se=ue&&ue.__esModule?function(){return ue.default}:function(){return ue};return ie.d(se,"a",se),se},ie.o=function(ue,se){return Object.prototype.hasOwnProperty.call(ue,se)},ie.p="",ie(ie.s=12)}([function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se()})(0,function(){var ue=ue||function(se,te){var le=Object.create||function(){function ye(){}return function(me){var ge;return ye.prototype=me,ge=new ye,ye.prototype=null,ge}}(),ee={},ne=ee.lib={},E=ne.Base=function(){return{extend:function(ye){var me=le(this);return ye&&me.mixIn(ye),me.hasOwnProperty("init")&&this.init!==me.init||(me.init=function(){me.$super.init.apply(this,arguments)}),me.init.prototype=me,me.$super=this,me},create:function(){var ye=this.extend();return ye.init.apply(ye,arguments),ye},init:function(){},mixIn:function(ye){for(var me in ye)ye.hasOwnProperty(me)&&(this[me]=ye[me]);ye.hasOwnProperty("toString")&&(this.toString=ye.toString)},clone:function(){return this.init.prototype.extend(this)}}}(),b=ne.WordArray=E.extend({init:function(ye,me){ye=this.words=ye||[],this.sigBytes=me!=null?me:4*ye.length},toString:function(ye){return(ye||x).stringify(this)},concat:function(ye){var me=this.words,ge=ye.words,_e=this.sigBytes,he=ye.sigBytes;if(this.clamp(),_e%4)for(var pe=0;pe<he;pe++){var ke=ge[pe>>>2]>>>24-pe%4*8&255;me[_e+pe>>>2]|=ke<<24-(_e+pe)%4*8}else for(var pe=0;pe<he;pe+=4)me[_e+pe>>>2]=ge[pe>>>2];return this.sigBytes+=he,this},clamp:function(){var ye=this.words,me=this.sigBytes;ye[me>>>2]&=4294967295<<32-me%4*8,ye.length=se.ceil(me/4)},clone:function(){var ye=E.clone.call(this);return ye.words=this.words.slice(0),ye},random:function(ye){for(var me,ge=[],_e=0;_e<ye;_e+=4){var he=function(ke){var ke=ke,Te=987654321,Ee=4294967295;return function(){Te=36969*(65535&Te)+(Te>>16)&Ee,ke=18e3*(65535&ke)+(ke>>16)&Ee;var Oe=(Te<<16)+ke&Ee;return Oe/=4294967296,(Oe+=.5)*(se.random()>.5?1:-1)}}(4294967296*(me||se.random()));me=987654071*he(),ge.push(4294967296*he()|0)}return new b.init(ge,ye)}}),z=ee.enc={},x=z.Hex={stringify:function(ye){for(var me=ye.words,ge=ye.sigBytes,_e=[],he=0;he<ge;he++){var pe=me[he>>>2]>>>24-he%4*8&255;_e.push((pe>>>4).toString(16)),_e.push((15&pe).toString(16))}return _e.join("")},parse:function(ye){for(var me=ye.length,ge=[],_e=0;_e<me;_e+=2)ge[_e>>>3]|=parseInt(ye.substr(_e,2),16)<<24-_e%8*4;return new b.init(ge,me/2)}},re=z.Latin1={stringify:function(ye){for(var me=ye.words,ge=ye.sigBytes,_e=[],he=0;he<ge;he++){var pe=me[he>>>2]>>>24-he%4*8&255;_e.push(String.fromCharCode(pe))}return _e.join("")},parse:function(ye){for(var me=ye.length,ge=[],_e=0;_e<me;_e++)ge[_e>>>2]|=(255&ye.charCodeAt(_e))<<24-_e%4*8;return new b.init(ge,me)}},ae=z.Utf8={stringify:function(ye){try{return decodeURIComponent(escape(re.stringify(ye)))}catch(me){throw new Error("Malformed UTF-8 data")}},parse:function(ye){return re.parse(unescape(encodeURIComponent(ye)))}},oe=ne.BufferedBlockAlgorithm=E.extend({reset:function(){this._data=new b.init,this._nDataBytes=0},_append:function(ye){typeof ye=="string"&&(ye=ae.parse(ye)),this._data.concat(ye),this._nDataBytes+=ye.sigBytes},_process:function(ye){var me=this._data,ge=me.words,_e=me.sigBytes,he=this.blockSize,pe=4*he,ke=_e/pe;ke=ye?se.ceil(ke):se.max((0|ke)-this._minBufferSize,0);var Te=ke*he,Ee=se.min(4*Te,_e);if(Te){for(var Oe=0;Oe<Te;Oe+=he)this._doProcessBlock(ge,Oe);var je=ge.splice(0,Te);me.sigBytes-=Ee}return new b.init(je,Ee)},clone:function(){var ye=E.clone.call(this);return ye._data=this._data.clone(),ye},_minBufferSize:0}),ve=(ne.Hasher=oe.extend({cfg:E.extend(),init:function(ye){this.cfg=this.cfg.extend(ye),this.reset()},reset:function(){oe.reset.call(this),this._doReset()},update:function(ye){return this._append(ye),this._process(),this},finalize:function(ye){return ye&&this._append(ye),this._doFinalize()},blockSize:16,_createHelper:function(ye){return function(me,ge){return new ye.init(ge).finalize(me)}},_createHmacHelper:function(ye){return function(me,ge){return new ve.HMAC.init(ye,ge).finalize(me)}}}),ee.algo={});return ee}(Math);return ue})},function(ce,ie,Ce){"use strict";function ue(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}(),te=function(){function le(){ue(this,le)}return se(le,null,[{key:"detectIEVersion",value:function(){for(var ee=4,ne=document.createElement("div"),E=ne.getElementsByTagName("i");ne.innerHTML="<!--[if gt IE "+ee+"]><i></i><![endif]-->",E[0];)ee++;return ee>4&&ee}},{key:"extend",value:function(ee,ne){for(var E in ne)Object.prototype.hasOwnProperty.call(ne,E)&&ne[E]&&(ee[E]=ne[E])}},{key:"isArray",value:function(ee){return Object.prototype.toString.call(arg)==="[object Array]"}},{key:"getFileType",value:function(ee){return ee=ee.toLowerCase(),/.mp4|.flv|.m3u8|.avi|.rm|.rmvb|.mpeg|.mpg|.mov|.wmv|.3gp|.asf|.dat|.dv|.f4v|.gif|.m2t|.m4v|.mj2|.mjpeg|.mpe|.mts|.ogg|.qt|.swf|.ts|.vob|.wmv|.webm/.test(ee)?"video":/.mp3|.wav|.ape|.cda|.au|.midi|.mac|.aac|.ac3|.acm|.amr|.caf|.flac|.m4a|.ra|.wma/.test(ee)?"audio":/.bmp|.jpg|.jpeg|.png/.test(ee)?"img":"other"}},{key:"isImage",value:function(ee){return ee=ee.toLowerCase(),!!/.jpg|.jpeg|.png/.test(ee)}},{key:"ISODateString",value:function(ee){function ne(E){return E<10?"0"+E:E}return ee.getUTCFullYear()+"-"+ne(ee.getUTCMonth()+1)+"-"+ne(ee.getUTCDate())+"T"+ne(ee.getUTCHours())+":"+ne(ee.getUTCMinutes())+":"+ne(ee.getUTCSeconds())+"Z"}},{key:"isIntNum",value:function(ee){return!!/^\d+$/.test(ee)}}]),le}();ie.default=te},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){return function(se){function te(ve,ye,me,ge,_e,he,pe){var ke=ve+(ye&me|~ye&ge)+_e+pe;return(ke<<he|ke>>>32-he)+ye}function le(ve,ye,me,ge,_e,he,pe){var ke=ve+(ye&ge|me&~ge)+_e+pe;return(ke<<he|ke>>>32-he)+ye}function ee(ve,ye,me,ge,_e,he,pe){var ke=ve+(ye^me^ge)+_e+pe;return(ke<<he|ke>>>32-he)+ye}function ne(ve,ye,me,ge,_e,he,pe){var ke=ve+(me^(ye|~ge))+_e+pe;return(ke<<he|ke>>>32-he)+ye}var E=ue,b=E.lib,z=b.WordArray,x=b.Hasher,re=E.algo,ae=[];(function(){for(var ve=0;ve<64;ve++)ae[ve]=4294967296*se.abs(se.sin(ve+1))|0})();var oe=re.MD5=x.extend({_doReset:function(){this._hash=new z.init([1732584193,4023233417,2562383102,271733878])},_doProcessBlock:function(ve,ye){for(var me=0;me<16;me++){var ge=ye+me,_e=ve[ge];ve[ge]=16711935&(_e<<8|_e>>>24)|4278255360&(_e<<24|_e>>>8)}var he=this._hash.words,pe=ve[ye+0],ke=ve[ye+1],Te=ve[ye+2],Ee=ve[ye+3],Oe=ve[ye+4],je=ve[ye+5],Pe=ve[ye+6],Qe=ve[ye+7],Xe=ve[ye+8],ot=ve[ye+9],He=ve[ye+10],rt=ve[ye+11],Ye=ve[ye+12],ut=ve[ye+13],Ge=ve[ye+14],ze=ve[ye+15],Ve=he[0],$e=he[1],nt=he[2],et=he[3];Ve=te(Ve,$e,nt,et,pe,7,ae[0]),et=te(et,Ve,$e,nt,ke,12,ae[1]),nt=te(nt,et,Ve,$e,Te,17,ae[2]),$e=te($e,nt,et,Ve,Ee,22,ae[3]),Ve=te(Ve,$e,nt,et,Oe,7,ae[4]),et=te(et,Ve,$e,nt,je,12,ae[5]),nt=te(nt,et,Ve,$e,Pe,17,ae[6]),$e=te($e,nt,et,Ve,Qe,22,ae[7]),Ve=te(Ve,$e,nt,et,Xe,7,ae[8]),et=te(et,Ve,$e,nt,ot,12,ae[9]),nt=te(nt,et,Ve,$e,He,17,ae[10]),$e=te($e,nt,et,Ve,rt,22,ae[11]),Ve=te(Ve,$e,nt,et,Ye,7,ae[12]),et=te(et,Ve,$e,nt,ut,12,ae[13]),nt=te(nt,et,Ve,$e,Ge,17,ae[14]),$e=te($e,nt,et,Ve,ze,22,ae[15]),Ve=le(Ve,$e,nt,et,ke,5,ae[16]),et=le(et,Ve,$e,nt,Pe,9,ae[17]),nt=le(nt,et,Ve,$e,rt,14,ae[18]),$e=le($e,nt,et,Ve,pe,20,ae[19]),Ve=le(Ve,$e,nt,et,je,5,ae[20]),et=le(et,Ve,$e,nt,He,9,ae[21]),nt=le(nt,et,Ve,$e,ze,14,ae[22]),$e=le($e,nt,et,Ve,Oe,20,ae[23]),Ve=le(Ve,$e,nt,et,ot,5,ae[24]),et=le(et,Ve,$e,nt,Ge,9,ae[25]),nt=le(nt,et,Ve,$e,Ee,14,ae[26]),$e=le($e,nt,et,Ve,Xe,20,ae[27]),Ve=le(Ve,$e,nt,et,ut,5,ae[28]),et=le(et,Ve,$e,nt,Te,9,ae[29]),nt=le(nt,et,Ve,$e,Qe,14,ae[30]),$e=le($e,nt,et,Ve,Ye,20,ae[31]),Ve=ee(Ve,$e,nt,et,je,4,ae[32]),et=ee(et,Ve,$e,nt,Xe,11,ae[33]),nt=ee(nt,et,Ve,$e,rt,16,ae[34]),$e=ee($e,nt,et,Ve,Ge,23,ae[35]),Ve=ee(Ve,$e,nt,et,ke,4,ae[36]),et=ee(et,Ve,$e,nt,Oe,11,ae[37]),nt=ee(nt,et,Ve,$e,Qe,16,ae[38]),$e=ee($e,nt,et,Ve,He,23,ae[39]),Ve=ee(Ve,$e,nt,et,ut,4,ae[40]),et=ee(et,Ve,$e,nt,pe,11,ae[41]),nt=ee(nt,et,Ve,$e,Ee,16,ae[42]),$e=ee($e,nt,et,Ve,Pe,23,ae[43]),Ve=ee(Ve,$e,nt,et,ot,4,ae[44]),et=ee(et,Ve,$e,nt,Ye,11,ae[45]),nt=ee(nt,et,Ve,$e,ze,16,ae[46]),$e=ee($e,nt,et,Ve,Te,23,ae[47]),Ve=ne(Ve,$e,nt,et,pe,6,ae[48]),et=ne(et,Ve,$e,nt,Qe,10,ae[49]),nt=ne(nt,et,Ve,$e,Ge,15,ae[50]),$e=ne($e,nt,et,Ve,je,21,ae[51]),Ve=ne(Ve,$e,nt,et,Ye,6,ae[52]),et=ne(et,Ve,$e,nt,Ee,10,ae[53]),nt=ne(nt,et,Ve,$e,He,15,ae[54]),$e=ne($e,nt,et,Ve,ke,21,ae[55]),Ve=ne(Ve,$e,nt,et,Xe,6,ae[56]),et=ne(et,Ve,$e,nt,ze,10,ae[57]),nt=ne(nt,et,Ve,$e,Pe,15,ae[58]),$e=ne($e,nt,et,Ve,ut,21,ae[59]),Ve=ne(Ve,$e,nt,et,Oe,6,ae[60]),et=ne(et,Ve,$e,nt,rt,10,ae[61]),nt=ne(nt,et,Ve,$e,Te,15,ae[62]),$e=ne($e,nt,et,Ve,ot,21,ae[63]),he[0]=he[0]+Ve|0,he[1]=he[1]+$e|0,he[2]=he[2]+nt|0,he[3]=he[3]+et|0},_doFinalize:function(){var ve=this._data,ye=ve.words,me=8*this._nDataBytes,ge=8*ve.sigBytes;ye[ge>>>5]|=128<<24-ge%32;var _e=se.floor(me/4294967296),he=me;ye[15+(ge+64>>>9<<4)]=16711935&(_e<<8|_e>>>24)|4278255360&(_e<<24|_e>>>8),ye[14+(ge+64>>>9<<4)]=16711935&(he<<8|he>>>24)|4278255360&(he<<24|he>>>8),ve.sigBytes=4*(ye.length+1),this._process();for(var pe=this._hash,ke=pe.words,Te=0;Te<4;Te++){var Ee=ke[Te];ke[Te]=16711935&(Ee<<8|Ee>>>24)|4278255360&(Ee<<24|Ee>>>8)}return pe},clone:function(){var ve=x.clone.call(this);return ve._hash=this._hash.clone(),ve}});E.MD5=x._createHelper(oe),E.HmacMD5=x._createHmacHelper(oe)}(Math),ue.MD5})},function(ce,ie,Ce){"use strict";Object.defineProperty(ie,"__esModule",{value:!0}),ie.UPLOADSTATE={INIT:"init",UPLOADING:"uploading",COMPLETE:"complete",INTERRUPT:"interrupt"},ie.UPLOADSTEP={INIT:"init",PART:"part",COMPLETE:"complete"},ie.UPLOADDEFAULT={PARALLEL:5,PARTSIZE:1048576}},function(ce,ie,Ce){"use strict";function ue(oe){return oe&&oe.__esModule?oe:{default:oe}}function se(oe,ve){if(!(oe instanceof ve))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var te=function(){function oe(ve,ye){for(var me=0;me<ye.length;me++){var ge=ye[me];ge.enumerable=ge.enumerable||!1,ge.configurable=!0,"value"in ge&&(ge.writable=!0),Object.defineProperty(ve,ge.key,ge)}}return function(ve,ye,me){return ye&&oe(ve.prototype,ye),me&&oe(ve,me),ve}}(),le=Ce(5),ee=ue(le),ne=Ce(25),E=ue(ne),b=Ce(6),z=ue(b),x=Ce(7),re=ue(x),ae=function(){function oe(ve){se(this,oe);var ye=re.default.os.name,me=re.default.os.version||"",ge=re.default.browser.name,_e=re.default.browser.version||"",he=window.location.href,pe="";he&&(pe=re.default.getHost(he));var ke="pc";re.default.os.ipad?ke="pad":(re.default.os.iphone||re.default.os.android)&&(ke="phone"),this._ri=ee.default.create(),this.initParam={APIVersion:"0.6.0",lv:"1",av:z.default.version,pd:"upload",sm:"upload",md:"uploader",uuid:oe.getUuid(),os:ye,ov:me,et:ge,ev:_e,uat:navigator.userAgent,app_n:pe,tt:ke,dm:"h5",ut:""}}return te(oe,[{key:"log",value:function(ve,ye){ye&&ye.ri?(this._ri=ye.ri,delete ye.ri):this._ri=ee.default.create(),ye&&ye.ut&&(this.initParam.ut=ye.ut,delete ye.ut),this.initParam.t=new Date().getTime(),this.initParam.ll=ve=="20006"?"error":"info",this.initParam.ri=this._ri,this.initParam.e=ve;var me=[];if(ye)for(var ge in ye)me.push(ge+"="+ye[ge]);var _e=me.join("&");this.initParam.args=encodeURIComponent(_e==""?"0":_e);var he=[];for(var ge in this.initParam)he.push(ge+"="+this.initParam[ge]);var pe=he.join("&");AliyunUpload&&AliyunUpload.__logTestCallback__?AliyunUpload.__logTestCallback__(pe):new Image(0,0).src="https://videocloud.cn-hangzhou.log.aliyuncs.com/logstores/upload/track?"+pe}}],[{key:"getUuid",value:function(){var ve=E.default.get("p_h5_upload_u");return ve||(ve=ee.default.create(),E.default.set("p_h5_upload_u",ve,730)),ve}},{key:"getClientId",value:function(){return E.default.get("p_h5_upload_clientId")}},{key:"setClientId",value:function(ve){return ve||(ve=ee.default.create()),E.default.set("p_h5_upload_clientId",ve,730),ve}}]),oe}();ie.default=ae},function(ce,ie,Ce){"use strict";function ue(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}(),te=function(){function le(){ue(this,le)}return se(le,null,[{key:"create",value:function(ee,ne){var E,b="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz".split(""),z=[];if(ne=ne||b.length,ee)for(E=0;E<ee;E++)z[E]=b[0|Math.random()*ne];else{var x;for(z[8]=z[13]=z[18]=z[23]="-",z[14]="4",E=0;E<36;E++)z[E]||(x=0|16*Math.random(),z[E]=b[E==19?3&x|8:x])}return z.join("")}}]),le}();ie.default=te},function(ce,ie,Ce){"use strict";Object.defineProperty(ie,"__esModule",{value:!0});var ue={version:"1.5.0"};ie.default=ue},function(ce,ie,Ce){"use strict";function ue(b,z){if(!(b instanceof z))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function b(z,x){for(var re=0;re<x.length;re++){var ae=x[re];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(z,ae.key,ae)}}return function(z,x,re){return x&&b(z.prototype,x),re&&b(z,re),z}}(),te=function(b){var z=navigator.userAgent,x="other";if(b.ios)return"iOS";if(b.android)return"android";if(z.indexOf("Baiduspider")>-1)return"Baiduspider";if(z.indexOf("PlayStation")>-1)return"PS4";var re=navigator.platform=="Win32"||navigator.platform=="Windows"||z.indexOf("Windows")>-1,ae=navigator.platform=="Mac68K"||navigator.platform=="MacPPC"||navigator.platform=="Macintosh"||navigator.platform=="MacIntel";return ae&&(x="macOS"),navigator.platform=="X11"&&!re&&!ae&&(x="Unix"),String(navigator.platform).indexOf("Linux")>-1&&(x="Linux"),re?"windows":x},le=function(){var b=navigator.userAgent,z="";return(b.indexOf("Windows NT 5.0")>-1||b.indexOf("Windows 2000")>-1)&&(z="2000"),(b.indexOf("Windows NT 5.1")>-1||b.indexOf("Windows XP")>-1)&&(z="XP"),(b.indexOf("Windows NT 5.2")>-1||b.indexOf("Windows 2003")>-1)&&(z="2003"),(b.indexOf("Windows NT 6.0")>-1||b.indexOf("Windows Vista")>-1)&&(z="Vista"),(b.indexOf("Windows NT 6.1")>-1||b.indexOf("Windows 7")>-1)&&(z="7"),(b.indexOf("Windows NT 6.2")>-1||b.indexOf("Windows 8")>-1)&&(z="8"),(b.indexOf("Windows NT 6.3")>-1||b.indexOf("Windows 8.1")>-1)&&(z="8.1"),(b.indexOf("Windows NT 10")>-1||b.indexOf("Windows 10")>-1)&&(z="10"),z},ee=function(b){var z=navigator.userAgent.toLowerCase();return b.chrome?"Chrome":b.firefox?"Firefox":b.safari?"Safari":b.webview?"webview":b.ie?/edge/.test(z)?"Edge":"IE":/baiduspider/.test(z)?"Baiduspider":/ucweb/.test(z)||/UCBrowser/.test(z)?"UC":/opera/.test(z)?"Opera":/ucweb/.test(z)?"UC":/360se/.test(z)?"360\u6D4F\u89C8\u5668":/bidubrowser/.test(z)?"\u767E\u5EA6\u6D4F\u89C8\u5668":/metasr/.test(z)?"\u641C\u72D7\u6D4F\u89C8\u5668":/lbbrowser/.test(z)?"\u730E\u8C79\u6D4F\u89C8\u5668":/micromessenger/.test(z)?"\u5FAE\u4FE1\u5185\u7F6E\u6D4F\u89C8\u5668":/qqbrowser/.test(z)?"QQ\u6D4F\u89C8\u5668":/playstation/.test(z)?"PS4\u6D4F\u89C8\u5668":void 0},ne=function(){var b={},z={},x=navigator.userAgent,re=navigator.platform,ae=x.match(/Web[kK]it[\/]{0,1}([\d.]+)/),oe=x.match(/(Android);?[\s\/]+([\d.]+)?/),ve=!!x.match(/\(Macintosh\; Intel /),ye=x.match(/(iPad).*OS\s([\d_]+)/),me=x.match(/(iPod)(.*OS\s([\d_]+))?/),ge=!ye&&x.match(/(iPhone\sOS)\s([\d_]+)/),_e=x.match(/(webOS|hpwOS)[\s\/]([\d.]+)/),he=/Win\d{2}|Windows/.test(re),pe=x.match(/Windows Phone ([\d.]+)/),ke=_e&&x.match(/TouchPad/),Te=x.match(/Kindle\/([\d.]+)/),Ee=x.match(/Silk\/([\d._]+)/),Oe=x.match(/(BlackBerry).*Version\/([\d.]+)/),je=x.match(/(BB10).*Version\/([\d.]+)/),Pe=x.match(/(RIM\sTablet\sOS)\s([\d.]+)/),Qe=x.match(/PlayBook/),Xe=x.match(/Chrome\/([\d.]+)/)||x.match(/CriOS\/([\d.]+)/),ot=x.match(/Firefox\/([\d.]+)/),He=x.match(/\((?:Mobile|Tablet); rv:([\d.]+)\).*Firefox\/[\d.]+/),rt=x.match(/MSIE\s([\d.]+)/)||x.match(/Trident\/[\d](?=[^\?]+).*rv:([0-9.].)/),Ye=!Xe&&x.match(/(iPhone|iPod|iPad).*AppleWebKit(?!.*Safari)/),ut=Ye||x.match(/Version\/([\d.]+)([^S](Safari)|[^M]*(Mobile)[^S]*(Safari))/);if((z.webkit=!!ae)&&(z.version=ae[1]),oe&&(b.android=!0,b.version=oe[2]),ge&&!me&&(b.ios=b.iphone=!0,b.version=ge[2].replace(/_/g,".")),ye&&(b.ios=b.ipad=!0,b.version=ye[2].replace(/_/g,".")),me&&(b.ios=b.ipod=!0,b.version=me[3]?me[3].replace(/_/g,"."):null),pe&&(b.wp=!0,b.version=pe[1]),_e&&(b.webos=!0,b.version=_e[2]),ke&&(b.touchpad=!0),Oe&&(b.blackberry=!0,b.version=Oe[2]),je&&(b.bb10=!0,b.version=je[2]),Pe&&(b.rimtabletos=!0,b.version=Pe[2]),Qe&&(z.playbook=!0),Te&&(b.kindle=!0,b.version=Te[1]),Ee&&(z.silk=!0,z.version=Ee[1]),!Ee&&b.android&&x.match(/Kindle Fire/)&&(z.silk=!0),Xe&&(z.chrome=!0,z.version=Xe[1]),ot&&(z.firefox=!0,z.version=ot[1]),He&&(b.firefoxos=!0,b.version=He[1]),rt&&(z.ie=!0,z.version=rt[1]),ut&&(ve||b.ios||he||oe)&&(z.safari=!0,b.ios||(z.version=ut[1])),Ye&&(z.webview=!0),ve){var Ge=x.match(/[\d]*_[\d]*_[\d]*/);Ge&&Ge.length>0&&Ge[0]&&(b.version=Ge[0].replace(/_/g,"."))}return b.tablet=!!(ye||Qe||oe&&!x.match(/Mobile/)||ot&&x.match(/Tablet/)||rt&&!x.match(/Phone/)&&x.match(/Touch/)),b.phone=!(b.tablet||b.ipod||!(oe||ge||_e||Oe||je||Xe&&x.match(/Android/)||Xe&&x.match(/CriOS\/([\d.]+)/)||ot&&x.match(/Mobile/)||rt&&x.match(/Touch/))),b.pc=!b.tablet&&!b.phone,ve?b.name="macOS":he?(b.name="windows",b.version=le()):b.name=te(b),z.name=ee(z),{os:b,browser:z}}(),E=function(){function b(){ue(this,b)}return se(b,null,[{key:"getHost",value:function(z){var ae="";if(z===void 0||z==null||z=="")return"";var x=z.indexOf("//"),re=z;x>-1&&(re=z.substring(x+2));var ae=re,oe=re.split("/");return oe&&oe.length>0&&(ae=oe[0]),oe=ae.split(":"),oe&&oe.length>0&&(ae=oe[0]),ae}},{key:"os",get:function(){return ne.os}},{key:"browser",get:function(){var z=ne.browser;return z.name||(z.name=ee()),z}}]),b}();ie.default=E},function(ce,ie,Ce){"use strict";function ue(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}(),te=function(){function le(){ue(this,le)}return se(le,null,[{key:"get",value:function(ee,ne,E,b,z){var x;E=E||function(){},typeof XMLHttpRequest=="undefined"&&(window.XMLHttpRequest=function(){try{return new window.ActiveXObject("Msxml2.XMLHTTP.6.0")}catch(re){}try{return new window.ActiveXObject("Msxml2.XMLHTTP.3.0")}catch(re){}try{return new window.ActiveXObject("Msxml2.XMLHTTP")}catch(re){}throw new Error("This browser does not support XMLHttpRequest.")}),x=new XMLHttpRequest,x.onreadystatechange=function(){x.readyState===4&&(x.status===200?ne(x.responseText):E(x.responseText))};try{b===void 0&&(b=!0),x.open("GET",ee,b),z&&(x.withCredentials=!0)}catch(re){return void E(re)}try{x.send()}catch(re){E(re)}}}]),le}();ie.default=te},function(ce,ie,Ce){"use strict";function ue(ne,E){if(!(ne instanceof E))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function ne(E,b){for(var z=0;z<b.length;z++){var x=b[z];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(E,x.key,x)}}return function(E,b,z){return b&&ne(E.prototype,b),z&&ne(E,z),E}}(),te=Ce(27),le=Ce(30),ee=(Ce(10),function(){function ne(){ue(this,ne)}return se(ne,null,[{key:"randomUUID",value:function(){for(var E=[],b="0123456789abcdef",z=0;z<36;z++)E[z]=b.substr(Math.floor(16*Math.random()),1);return E[14]="4",E[19]=b.substr(3&E[19]|8,1),E[8]=E[13]=E[18]=E[23]="-",E.join("")}},{key:"aliyunEncodeURI",value:function(E){var b=encodeURIComponent(E);return b=b.replace(/\+/g,"%20").replace(/\*/g,"%2A").replace(/%7E/g,"~").replace(/!/g,"%21").replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/'/g,"%27")}},{key:"makeUTF8sort",value:function(E,b,z){if(!E)throw new Error("PrismPlayer Error: vid should not be null!");var x=[];for(var re in E)x.push(re);for(var ae=x.sort(),oe="",ve=ae.length,re=0;re<ve;re++){var ye=ne.aliyunEncodeURI(ae[re]),me=ne.aliyunEncodeURI(E[ae[re]]);oe==""?oe=ye+b+me:oe+=z+ye+b+me}return oe}},{key:"makeChangeSiga",value:function(E,b){if(!E)throw new Error("PrismPlayer Error: vid should not be null!");return le.stringify(te("GET&"+ne.aliyunEncodeURI("/")+"&"+ne.aliyunEncodeURI(ne.makeUTF8sort(E,"=","&")),b+"&"))}}]),ne}());ie.default=ee},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){return ue.enc.Utf8})},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){return ue.enc.Hex})},function(ce,ie,Ce){ce.exports=Ce(13)},function(ce,ie,Ce){"use strict";var ue,se,te=Ce(14),le=function(ne){return ne&&ne.__esModule?ne:{default:ne}}(te),ee={Vod:le.default};ue=[],(se=function(){return ee}.apply(ie,ue))!==void 0&&(ce.exports=se),window.AliyunUpload=ee,qt.exports=AliyunUpload},function(ce,ie,Ce){"use strict";function ue(je){return je&&je.__esModule?je:{default:je}}function se(je,Pe){if(!(je instanceof Pe))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var te=function(){function je(Pe,Qe){for(var Xe=0;Xe<Qe.length;Xe++){var ot=Qe[Xe];ot.enumerable=ot.enumerable||!1,ot.configurable=!0,"value"in ot&&(ot.writable=!0),Object.defineProperty(Pe,ot.key,ot)}}return function(Pe,Qe,Xe){return Qe&&je(Pe.prototype,Qe),Xe&&je(Pe,Xe),Pe}}(),le=Ce(15),ee=Ce(3),ne=Ce(16),E=ue(ne),b=Ce(18),z=ue(b),x=Ce(24),re=ue(x),ae=Ce(4),oe=ue(ae),ve=Ce(1),ye=ue(ve),me=Ce(5),ge=ue(me),_e=Ce(26),he=ue(_e),pe=Ce(31),ke=ue(pe),Te=Ce(32),Ee=ue(Te),Oe=(Ce(2),function(){function je(Pe){se(this,je),this.options=Pe,this.options.partSize=this.options.partSize||ee.UPLOADDEFAULT.PARTSIZE,this.options.parallel=this.options.parallel||ee.UPLOADDEFAULT.PARALLEL,this.options.region=this.options.region||"cn-shanghai",this.options.cname=this.options.cname||!1,this.options.localCheckpoint=this.options.localCheckpoint||!1,this.options.enableUploadProgress===void 0&&(this.options.enableUploadProgress=!0),this._ossCreditor=new Object,this._state=le.VODSTATE.INIT,this._uploadList=[],this._curIndex=-1,this._ossUpload=null,this._log=new oe.default,this._retryCount=0,this._retryTotal=this.options.retryCount||3,this._retryDuration=this.options.retryDuration||2,this._state=le.VODSTATE.INIT,this._uploadWay="vod",this._onbeforeunload=!1,this._invalidUserId=!1,this._initEvent()}return te(je,[{key:"init",value:function(Pe,Qe,Xe,ot){return this._retryCount=0,!(Xe&&!ot||!Xe&&ot)&&!(Pe&&!Qe||!Pe&&Qe)&&(this._ossCreditor.accessKeyId=Pe,this._ossCreditor.accessKeySecret=Qe,this._ossCreditor.securityToken=Xe,this._ossCreditor.expireTime=ot,!0)}},{key:"addFile",value:function(Pe,Qe,Xe,ot,He,rt){if(!Pe)return!1;if(Pe.size==0)try{this.options.onUploadFailed({file:Pe},"EmptyFile","\u6587\u4EF6\u5927\u5C0F\u4E3A0\uFF0C\u4E0D\u80FD\u4E0A\u4F20")}catch(ze){console.log(ze)}for(var Ye=(this.options,0);Ye<this._uploadList.length;Ye++)if(this._uploadList[Ye].file==Pe)return!1;var ut=new Object;if(ut.file=Pe,ut._endpoint=Qe,ut._bucket=Xe,ut._object=ot,ut.state=le.UPLOADSTATE.INIT,ut.isImage=ye.default.isImage(Pe.name),!ut.isImage&&this.options.enableUploadProgress){var Ge=this;Ee.default.getMd5(Pe,function(ze){ut.fileHash=ze;var Ve=Ge._getCheckoutpoint(ut);Ge.options.localCheckpoint||Ve||Ge._getCheckoutpointFromCloud(ut,function($e){if($e.UploadPoint){var nt=JSON.parse($e.UploadPoint);nt.loaded!=1&&(ut.checkpoint=nt.checkpoint,ut.loaded=nt.loaded,ut.videoId=$e.VideoId,Ge._saveCheckoutpoint(ut,nt.checkpoint))}},function($e){try{if(($e=JSON.parse($e))&&$e.Code=="InvalidParameter"&&$e.Message.indexOf("UserId")>0){Ge._invalidUserId=!0;var nt=$e.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(nt)}}catch(et){console.log(et)}})})}He&&(ut.videoInfo=He?JSON.parse(He).Vod:{},ut.userData=z.default.encode(He)),ut.ri=ge.default.create(),this._uploadList.push(ut),this._reportLog("20001",ut,{ql:this._uploadList.length});try{this.options.addFileSuccess&&this.options.addFileSuccess(ut)}catch(ze){console.log(ze)}return!0}},{key:"deleteFile",value:function(Pe){return!!this.cancelFile(Pe)&&(this._uploadList.splice(Pe,1),!0)}},{key:"cleanList",value:function(){this.stopUpload(),this._uploadList.length=0,this._curIndex=-1}},{key:"cancelFile",value:function(Pe){if(this.options,Pe<0||Pe>=this._uploadList.length)return!1;var Qe=this._uploadList[Pe];if(Pe==this._curIndex&&Qe.state==le.UPLOADSTATE.UPLOADING){Qe.state=le.UPLOADSTATE.CANCELED;var Xe=this._getCheckoutpoint(Qe);Xe&&Xe.checkpoint&&(Xe=Xe.checkpoint),Xe&&this._ossUpload.abort(Qe),this._removeCheckoutpoint(Qe),this.nextUpload()}else Qe.state!=le.UPLOADSTATE.SUCCESS&&(Qe.state=le.UPLOADSTATE.CANCELED);return this._reportLog("20008",Qe),!0}},{key:"resumeFile",value:function(Pe){if(this.options,Pe<0||Pe>=this._uploadList.length)return!1;var Qe=this._uploadList[Pe];return Qe.state==le.UPLOADSTATE.CANCELED&&(Qe.state=le.UPLOADSTATE.INIT,!0)}},{key:"listFiles",value:function(){return this._uploadList}},{key:"getCheckpoint",value:function(Pe){return this._getCheckoutpoint({file:Pe})}},{key:"startUpload",value:function(Pe){if(this._retryCount=0,this.options,this._state==le.VODSTATE.START||this._state==le.VODSTATE.EXPIRE)return void console.log("already started or expired");if(this._initState(),this._curIndex=this._findUploadIndex(),this._curIndex==-1)return void(this._state=le.VODSTATE.END);var Qe=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(Qe),this._state=le.VODSTATE.START}},{key:"nextUpload",value:function(){var Pe=this.options;if(this._state==le.VODSTATE.START)if(this._curIndex=this._findUploadIndex(),this._curIndex!=-1){var Qe=this._uploadList[this._curIndex];this._ossUpload=null,this._upload(Qe)}else{this._state=le.VODSTATE.END;try{Pe.onUploadEnd&&Pe.onUploadEnd(Qe)}catch(Xe){console.log(Xe)}}}},{key:"clear",value:function(Pe){for(var Qe=this.options,Xe=0,ot=0;ot<this._uploadList.length;ot++)Qe.uploadList[ot].state==le.UPLOADSTATE.SUCCESS&&Xe++,this._uploadList[ot].state==Pe&&(Qe.uploadList.splice(ot,1),ot--);Qe.onClear&&Qe.onClear(Qe.uploadList.length,Xe)}},{key:"stopUpload",value:function(){if((this._state==le.VODSTATE.START||this._state==le.VODSTATE.FAILURE||this._curIndex==-1)&&this._curIndex!=-1){var Pe=this._uploadList[this._curIndex];this._state=le.VODSTATE.STOP,Pe.state=le.UPLOADSTATE.STOPED,this._changeState(Pe,le.UPLOADSTATE.STOPED),this._ossUpload.cancel()}}},{key:"resumeUploadWithAuth",value:function(Pe){var Qe=this;if(!Pe)return!1;var Xe=JSON.parse(z.default.decode(Pe));return!!(Xe.AccessKeyId&&Xe.AccessKeySecret&&Xe.SecurityToken&&Xe.Expiration)&&Qe.resumeUploadWithToken(Xe.AccessKeyId,Xe.AccessKeySecret,Xe.SecurityToken,Xe.Expiration)}},{key:"resumeUploadWithToken",value:function(Pe,Qe,Xe,ot){if(this.options,!(Pe&&Qe&&Xe&&ot)||this._state!=le.VODSTATE.EXPIRE||this._curIndex==-1)return!1;var He="";return this._uploadList.length>this._curIndex&&(He=this._uploadList[this._curIndex]),He&&(this.init(Pe,Qe,Xe,ot),this._state=le.VODSTATE.START,this._ossUpload=null,this._uploadCore(He,He.retry),He.retry=!1),!0}},{key:"resumeUploadWithSTSToken",value:function(Pe,Qe,Xe){if(this._curIndex==-1||this._state!=le.VODSTATE.EXPIRE)return!1;if(this._uploadList.length>this._curIndex){var ot=this._uploadList[this._curIndex];ot.object?this._refreshSTSTokenUpload(ot,Pe,Qe,Xe):this.setSTSToken(ot,Pe,Qe,Xe)}}},{key:"setSTSTokenDirectlyUpload",value:function(Pe,Qe,Xe,ot,He){if(!(Qe&&Xe&&ot&&He))return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken and expiration should not be empty."),!1;this._ut="oss";var rt=Pe;this.init(Qe,Xe,ot,He),rt.endpoint=rt._endpoint,rt.bucket=rt._bucket,rt.object=rt._object,this._ossUpload=null,this._uploadCore(rt,Pe.retry),Pe.retry=!1}},{key:"setSTSToken",value:function(Pe,Qe,Xe,ot){if(!Qe||!Xe||!ot)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;this._ut="vod",this._uploadWay="sts";var He=Pe.videoInfo,rt={accessKeyId:Qe,securityToken:ot,accessKeySecret:Xe,fileName:Pe.file.name,title:He.Title,requestId:Pe.ri,region:this.options.region};He.ImageType&&(rt.imageType=He.ImageType),He.ImageExt&&(rt.imageExt=He.ImageExt),He.FileSize&&(rt.fileSize=He.FileSize),He.Description&&(rt.description=He.Description),He.CateId&&(rt.cateId=He.CateId),He.Tags&&(rt.tags=He.Tags),He.TemplateGroupId&&(rt.templateGroupId=He.TemplateGroupId),He.StorageLocation&&(rt.storageLocation=He.StorageLocation),He.CoverURL&&(rt.coverUrl=He.CoverURL),He.TransCodeMode&&(rt.transCodeMode=He.TransCodeMode),He.UserData&&(rt.userData=He.UserData);var Ye=this,ut="getUploadAuth";Pe.videoId?(rt.videoId=Pe.videoId,ut="refreshUploadAuth"):Pe.isImage&&(ut="getImageUploadAuth"),he.default[ut](rt,function(Ge){Pe.videoId=Ge.VideoId?Ge.VideoId:Pe.videoId,Ye.setUploadAuthAndAddress(Pe,Ge.UploadAuth,Ge.UploadAddress),Ye._state=le.VODSTATE.START},function(Ge){Ye._error(Pe,{name:Ge.Code,code:Ge.Code,message:Ge.Message,requestId:Ge.RequestId})})}},{key:"setUploadAuthAndAddress",value:function(Pe,Qe,Xe,ot){if(!Pe||!Qe||!Xe)return!1;var He=JSON.parse(z.default.decode(Qe));if(!(He.AccessKeyId&&He.AccessKeySecret&&He.SecurityToken&&He.Expiration))return console.error("uploadauth is invalid"),!1;var rt={},Ye=Pe;if(Xe){if(rt=JSON.parse(z.default.decode(Xe)),!rt.Endpoint||!rt.Bucket||!rt.FileName)return console.error("uploadAddress is invalid"),!1}else rt.Endpoint=Ye.endpoint,rt.Bucket=Ye.bucket,rt.FileName=Ye.object;this._ut="vod",this._uploadWay="vod",this.options.region=He.Region||this.options.region,this.init(He.AccessKeyId,He.AccessKeySecret,He.SecurityToken,He.Expiration),Ye.endpoint=Ye._endpoint?Ye._endpoint:rt.Endpoint,Ye.bucket=Ye._bucket?Ye._bucket:rt.Bucket,Ye.object=Ye._object?Ye._object:rt.FileName,Ye.region=this.options.region,ot&&(Ye.videoId=ot),this._ossUpload=null,this._uploadCore(Ye,Pe.retry),Pe.retry=!1}},{key:"_refreshSTSTokenUpload",value:function(Pe,Qe,Xe,ot){if(!Qe||!Xe||!ot)return console.log("accessKeyId\u3001ccessKeySecret\u3001securityToken should not be empty."),!1;var He={accessKeyId:Qe,securityToken:ot,accessKeySecret:Xe,videoId:Pe.object,requestId:Pe.ri,region:this.options.region},rt=this,Ye="refreshUploadAuth";Pe.isImage&&(Ye="getImageUploadAuth"),he.default[Ye](He,function(ut){rt.setUploadAuthAndAddress(Pe,ut.UploadAuth,UploadAddress),rt._state=le.VODSTATE.START},function(ut){rt._error(Pe,{name:ut.Code,code:ut.Code,message:ut.Message,requestId:ut.RequestId})})}},{key:"_upload",value:function(Pe){var Qe=arguments.length>1&&arguments[1]!==void 0&&arguments[1],Xe=this.options;if(Pe.retry=Qe,Xe.onUploadstarted&&!Qe)try{var ot=this._getCheckoutpoint(Pe);ot&&ot.state!=le.UPLOADSTATE.UPLOADING&&(Pe.checkpoint=ot,Pe.videoId=ot.videoId),Xe.onUploadstarted(Pe)}catch(He){console.log(He)}}},{key:"_uploadCore",value:function(Pe){if(arguments.length>1&&arguments[1]!==void 0&&arguments[1],!this._ossCreditor.accessKeyId||!this._ossCreditor.accessKeySecret||!this._ossCreditor.securityToken)throw new Error("AccessKeyId\u3001AccessKeySecret\u3001securityToken should not be null");if(Pe.state=le.UPLOADSTATE.UPLOADING,!this._ossUpload){Pe.endpoint=Pe.endpoint||"http://oss-cn-hangzhou.aliyuncs.com";var Qe=this;this._ossUpload=new E.default({bucket:Pe.bucket,endpoint:Pe.endpoint,AccessKeyId:this._ossCreditor.accessKeyId,AccessKeySecret:this._ossCreditor.accessKeySecret,SecurityToken:this._ossCreditor.securityToken,timeout:this.options.timeout,cname:this.options.cname},{onerror:function(Ge,ze){Qe._error.call(Qe,Ge,ze)},oncomplete:function(Ge,ze){Qe._complete.call(Qe,Ge,ze)},onprogress:function(Ge,ze,Ve){Qe._progress.call(Qe,Ge,ze,Ve)}})}var Xe=ye.default.getFileType(Pe.file.name),ot=this._getCheckoutpoint(Pe),He="",rt="";ot&&ot.checkpoint&&(rt=ot.state,He=ot.videoId,ot=ot.checkpoint),ot&&He==Pe.videoId&&rt!=le.UPLOADSTATE.UPLOADING&&(ot.file=Pe.file,Pe.checkpoint=ot,ot.uploadId);var Ye=this._adjustPartSize(Pe);this._reportLog("20002",Pe,{ft:Xe,fs:Pe.file.size,bu:Pe.bucket,ok:Pe.object,vid:Pe.videoId||"",fn:Pe.file.name,fw:null,fh:null,ps:Ye});var ut={headers:{"x-oss-notification":Pe.userData?Pe.userData:""},partSize:Ye,parallel:this.options.parallel};this._ossUpload.upload(Pe,ut)}},{key:"_findUploadIndex",value:function(){for(var Pe=-1,Qe=0;Qe<this._uploadList.length;Qe++)if(this._uploadList[Qe].state==le.UPLOADSTATE.INIT){Pe=Qe;break}return Pe}},{key:"_error",value:function(Pe,Qe){if(Qe.name=="cancel")try{this.options.onUploadCanceled(Pe,Qe)}catch(ot){console.log(ot)}else{if(Qe.message.indexOf("InvalidAccessKeyIdError")>0||Qe.name=="SignatureDoesNotMatchError"||Qe.code=="SecurityTokenExpired"||Qe.code=="InvalidSecurityToken.Expired"||Qe.code=="InvalidAccessKeyId"&&this._ossCreditor.securityToken){if(this.options.onUploadTokenExpired){this._state=le.VODSTATE.EXPIRE,Pe.state=le.UPLOADSTATE.FAIlURE;try{this.options.onUploadTokenExpired(Pe,Qe)}catch(ot){console.log(ot)}}return}if((Qe.name=="RequestTimeoutError"||Qe.name=="ConnectionTimeout"||Qe.name=="ConnectionTimeoutError")&&this._retryTotal>this._retryCount){var Xe=this;return setTimeout(function(){Xe._uploadCore(Pe,!0)},1e3*Xe._retryDuration),void this._retryCount++}Qe.name=="NoSuchUploadError"&&this._removeCheckoutpoint(Pe),this._handleError(Pe,Qe)}}},{key:"_handleError",value:function(Pe,Qe){var Xe=!(arguments.length>2&&arguments[2]!==void 0)||arguments[2],ot=le.UPLOADSTATE.FAIlURE;if(Pe.state!=le.UPLOADSTATE.CANCELED&&(Pe.state=le.UPLOADSTATE.FAIlURE,this._state=le.VODSTATE.FAILURE,this.options.onUploadFailed&&Qe&&Qe.code&&Qe.message))try{this.options.onUploadFailed(Pe,Qe.code,Qe.message)}catch(rt){console.log(rt)}if(Xe&&this._changeState(Pe,ot),this._reportLog("20006",Pe,{code:Qe.name,message:Qe.message,requestId:Qe.requestId,fs:Pe.file.size,bu:Pe.bucket,ok:Pe.object,fn:Pe.file.name}),this._reportLog("20004",Pe,{requestId:Qe.requestId,fs:Pe.file.size,bu:Pe.bucket,ok:Pe.object,fn:Pe.file.name}),Pe.ri=ge.default.create(),this._findUploadIndex()!=-1){var He=this;this._state=le.VODSTATE.START,setTimeout(function(){He.nextUpload()},100)}}},{key:"_complete",value:function(Pe,Qe){if(Pe.state=le.UPLOADSTATE.SUCCESS,this.options.onUploadSucceed)try{this.options.onUploadSucceed(Pe)}catch(He){console.log(He)}var Xe=0;Qe&&Qe.res&&Qe.res.headers&&(Xe=Qe.res.headers["x-oss-request-id"]),this._removeCheckoutpoint(Pe);var ot=this;setTimeout(function(){ot.nextUpload()},100),this._retryCount=0,this._reportLog("20003",Pe,{requestId:Xe})}},{key:"_progress",value:function(Pe,Qe,Xe){if(this.options.onUploadProgress)try{Pe.loaded=Qe.loaded,this.options.onUploadProgress(Pe,Qe.total,Qe.loaded)}catch(ze){console.log(ze)}var ot=Qe.checkpoint,He=0;ot&&(Pe.checkpoint=ot,this._saveCheckoutpoint(Pe,ot,le.UPLOADSTATE.UPLOADING),He=ot.uploadId),this._retryCount=0;var rt=this._getPortNumber(ot),Ye=0;if(Xe&&Xe.headers&&(Ye=Xe.headers["x-oss-request-id"]),Qe.loaded!=0&&this._reportLog("20007",Pe,{pn:rt,requestId:Ye}),Qe.loaded!=1&&this._reportLog("20005",Pe,{UploadId:He,pn:rt+1,pr:Pe.retry?1:0,fs:Pe.file.size,bu:Pe.bucket,ok:Pe.object,fn:Pe.file.name}),!this._invalidUserId&&!Pe.isImage&&this._ut=="vod"&&this.options.enableUploadProgress){var ut={file:Pe.file,checkpoint:Qe,userId:this.options.userId,videoId:Pe.videoId,region:this.options.region,fileHash:Pe.fileHash};try{var Ge=this;ke.default.upload(ut,function(){},function(ze){if((ze=JSON.parse(ze))&&ze.Code=="InvalidParameter"&&ze.Message.indexOf("UserId")>0){Ge._invalidUserId=!0;var Ve=ze.Message+"\uFF0C\u6B63\u786E\u8D26\u53F7ID(userId)\u8BF7\u53C2\u8003\uFF1Ahttps://help.aliyun.com/knowledge_detail/37196.html";console.log(Ve)}})}catch(ze){console.log(ze)}}}},{key:"_getPortNumber",value:function(Pe){if(Pe){var Qe=Pe.doneParts;if(Qe&&Qe.length>0)return Qe[Qe.length-1].number}return 0}},{key:"_removeCheckoutpoint",value:function(Pe){var Qe=this._getCheckoutpointKey(Pe);re.default.remove(Qe)}},{key:"_getCheckoutpoint",value:function(Pe){var Qe=this._getCheckoutpointKey(Pe),Xe=re.default.get(Qe);if(Xe)try{return JSON.parse(Xe)}catch(ot){}return""}},{key:"_saveCheckoutpoint",value:function(Pe,Qe,Xe){if(Qe){var ot=this._getCheckoutpointKey(Pe),He=Pe.file,rt={fileName:He.name,lastModified:He.lastModified,size:He.size,object:Pe.object,videoId:Pe.videoId,bucket:Pe.bucket,endpoint:Pe.endpoint,checkpoint:Qe,loaded:Pe.loaded,state:Xe};re.default.set(ot,JSON.stringify(rt))}}},{key:"_changeState",value:function(Pe,Qe){var Xe=this._getCheckoutpoint(Pe);Xe&&((this._onbeforeunload=!0)&&(Qe=le.UPLOADSTATE.STOPED),this._saveCheckoutpoint(Pe,Xe.checkpoint,Qe))}},{key:"_getCheckoutpointKey",value:function(Pe){return"upload_"+Pe.file.lastModified+"_"+Pe.file.name+"_"+Pe.file.size}},{key:"_getCheckoutpointFromCloud",value:function(Pe,Qe,Xe){var ot={userId:this.options.userId,uploadInfoList:[{FileName:Pe.file.name,FileSize:Pe.file.size,FileCreateTime:Pe.file.lastModified,FileHash:Pe.fileHash}],region:this.options.region};ke.default.get(ot,function(He){Qe(He)},Xe)}},{key:"_reportLog",value:function(Pe,Qe,Xe){Xe||(Xe={}),Xe.ri=Qe.ri,this._ut&&(Xe.ut=this._ut),this._log.log(Pe,Xe)}},{key:"_initEvent",value:function(){var Pe=this;window&&(window.onbeforeunload=function(Qe){if(Pe._onbeforeunload=!0,Pe._curIndex!=-1&&Pe._uploadList.length>Pe._curIndex){var Xe=Pe._uploadList[Pe._curIndex];Pe._changeState(Xe,le.UPLOADSTATE.STOPED)}})}},{key:"_initState",value:function(){for(var Pe=0;Pe<this._uploadList.length;Pe++){var Qe=this._uploadList[Pe];Qe.state!=le.UPLOADSTATE.FAIlURE&&Qe.state!=le.UPLOADSTATE.STOPED||(Qe.state=le.UPLOADSTATE.INIT)}this._state=le.VODSTATE.INIT}},{key:"_adjustPartSize",value:function(Pe){return Pe.file.size/this.options.partSize>1e4?Pe.file.size/9999:this.options.partSize}}]),je}());ie.default=Oe},function(ce,ie,Ce){"use strict";Object.defineProperty(ie,"__esModule",{value:!0}),ie.UPLOADSTATE={INIT:"Ready",UPLOADING:"Uploading",SUCCESS:"Success",FAIlURE:"Failure",CANCELED:"Canceled",STOPED:"Stoped"},ie.VODSTATE={INIT:"Init",START:"Start",STOP:"Stop",FAILURE:"Failure",EXPIRE:"Expire",END:"End"}},function(ce,ie,Ce){"use strict";function ue(b){return b&&b.__esModule?b:{default:b}}function se(b,z){if(!(b instanceof z))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var te=function(){function b(z,x){for(var re=0;re<x.length;re++){var ae=x[re];ae.enumerable=ae.enumerable||!1,ae.configurable=!0,"value"in ae&&(ae.writable=!0),Object.defineProperty(z,ae.key,ae)}}return function(z,x,re){return x&&b(z.prototype,x),re&&b(z,re),z}}(),le=Ce(3),ee=Ce(17),ne=(ue(ee),Ce(1)),E=(ue(ne),function(){function b(z,x){if(se(this,b),z){this._config=z,this.create(this._config),this._uploadInfo=null,this._callback={};var re=function(){};this._callback.onerror=x.onerror||re,this._callback.oncomplete=x.oncomplete||re,this._callback.onprogress=x.onprogress||re}}return te(b,[{key:"create",value:function(z){if(z.endpoint=z.endpoint||this._config.endpoint,z.bucket=z.bucket||this._config.bucket,!(z.AccessKeyId&&z.AccessKeySecret&&z.endpoint&&z.SecurityToken))throw new Error("AccessKeyId\u3001AccessKeySecret\u3001endpoint should not be null");var x={accessKeyId:z.AccessKeyId,accessKeySecret:z.AccessKeySecret,stsToken:z.SecurityToken,endpoint:z.endpoint||this._config.endpoint,bucket:z.bucket||this._config.bucket,secure:!0,cname:z.cname};z.timeout&&(x.timeout=z.timeout),this.oss=new OSS.Wrapper(x)}},{key:"abort",value:function(z){if(z.checkpoint){var x=z.checkpoint.uploadId;this.oss.abortMultipartUpload(z.object,x)}}},{key:"getVersion",value:function(){}},{key:"cancel",value:function(){this.oss.cancel&&this.oss.cancel()}},{key:"upload",value:function(z,x){this._uploadInfo=z;var re=this,ae=function(ve,ye,me){return function(ge){re._progress(ve,ye,me),ge()}},oe={parallel:x.parallel||this._config.parallel||le.UPLOADDEFAULT.PARALLEL,partSize:x.partSize||this._config.partSize||le.UPLOADDEFAULT.PARTSIZE,progress:ae};x.headers&&(oe.headers=x.headers),z.checkpoint&&(oe.checkpoint=z.checkpoint),z.bucket||(this.oss.options.bucket=z.bucket),z.endpoint||(this.oss.options.endpoint=z.endpoint),this.oss.multipartUpload(z.object,z.file,oe).then(function(ve,ye){re._complete(ve)}).catch(function(ve){re.oss.cancel&&(re.oss&&re.oss.isCancel()?console.log("oss is cancel as error"):re.oss.cancel()),re._error(ve)})}},{key:"header",value:function(z,x,re){this.oss.get(z.object).then(function(ae){x(ae)}).catch(function(ae){re(ae)})}},{key:"_progress",value:function(z,x,re){this._callback.onprogress(this._uploadInfo,{loaded:z,total:this._uploadInfo.file.size,checkpoint:x},re)}},{key:"_error",value:function(z){this._callback.onerror(this._uploadInfo,z)}},{key:"_complete",value:function(z){this._callback.oncomplete(this._uploadInfo,z)}}]),b}());ie.default=E},function(ce,ie,Ce){"use strict";function ue(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}(),te=function(){function le(){ue(this,le)}return se(le,null,[{key:"format",value:function(ee){if(arguments.length<2)return null;for(var ne=arguments[1],E=1;E<arguments.length;E++){var b=new RegExp("\\{"+(E-1)+"\\}","gm");ne=ne.replace(b,arguments[E+1])}return{code:ee,message:ne}}},{key:"CODE",get:function(){return{SUCCESS:"Successful",EmptyValue:"InvalidParameter.EmptyValue",STSInvalid:"InvalidParameter.TokenInvalid",ReadFileError:"ReadFileError",FILEDUPLICATION:"FileDuplication",UploadALEADRYSTARTED:"UploadAlearyStarted"}}},{key:"MESSAGE",get:function(){return{SUCCESS:"Successful",EmptyValue:"\u53C2\u6570 {0} \u4E0D\u80FD\u4E3A\u7A7A\u3002",STSInvalid:"STS\u53C2\u6570\u975E\u6CD5\uFF0C accessKeyId\u3001accessKeySecret\u3001secretToken\u3001expireTime\u90FD\u4E0D\u80FD\u4E3A\u7A7A\u3002",ReadFileError:"\u8BFB\u53D6\u6587\u4EF6{0}{1}\u5931\u8D25.",FILEDUPLICATION:"\u6587\u4EF6\u91CD\u590D\u6DFB\u52A0 {0}",UploadALEADRYSTARTED:"\u91CD\u590D\u5F00\u59CB."}}}]),le}();ie.default=te},function(ce,ie,Ce){"use strict";(function(ue){function se(ee,ne){if(!(ee instanceof ne))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var te=function(){function ee(ne,E){for(var b=0;b<E.length;b++){var z=E[b];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(ne,z.key,z)}}return function(ne,E,b){return E&&ee(ne.prototype,E),b&&ee(ne,b),ne}}(),le=function(){function ee(){se(this,ee)}return te(ee,null,[{key:"encode",value:function(ne){return new ue(ne).toString("base64")}},{key:"decode",value:function(ne){return new ue(ne,"base64").toString()}}]),ee}();ie.default=le}).call(ie,Ce(19).Buffer)},function(ce,ie,Ce){"use strict";(function(ue){function se(){return le.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function te(De,we){if(se()<we)throw new RangeError("Invalid typed array length");return le.TYPED_ARRAY_SUPPORT?(De=new Uint8Array(we),De.__proto__=le.prototype):(De===null&&(De=new le(we)),De.length=we),De}function le(De,we,Le){if(!(le.TYPED_ARRAY_SUPPORT||this instanceof le))return new le(De,we,Le);if(typeof De=="number"){if(typeof we=="string")throw new Error("If encoding is specified then the first argument must be a string");return b(this,De)}return ee(this,De,we,Le)}function ee(De,we,Le,Ue){if(typeof we=="number")throw new TypeError('"value" argument must not be a number');return typeof ArrayBuffer!="undefined"&&we instanceof ArrayBuffer?re(De,we,Le,Ue):typeof we=="string"?z(De,we,Le):ae(De,we)}function ne(De){if(typeof De!="number")throw new TypeError('"size" argument must be a number');if(De<0)throw new RangeError('"size" argument must not be negative')}function E(De,we,Le,Ue){return ne(we),we<=0?te(De,we):Le!==void 0?typeof Ue=="string"?te(De,we).fill(Le,Ue):te(De,we).fill(Le):te(De,we)}function b(De,we){if(ne(we),De=te(De,we<0?0:0|oe(we)),!le.TYPED_ARRAY_SUPPORT)for(var Le=0;Le<we;++Le)De[Le]=0;return De}function z(De,we,Le){if(typeof Le=="string"&&Le!==""||(Le="utf8"),!le.isEncoding(Le))throw new TypeError('"encoding" must be a valid string encoding');var Ue=0|ye(we,Le);De=te(De,Ue);var Me=De.write(we,Le);return Me!==Ue&&(De=De.slice(0,Me)),De}function x(De,we){var Le=we.length<0?0:0|oe(we.length);De=te(De,Le);for(var Ue=0;Ue<Le;Ue+=1)De[Ue]=255&we[Ue];return De}function re(De,we,Le,Ue){if(we.byteLength,Le<0||we.byteLength<Le)throw new RangeError("'offset' is out of bounds");if(we.byteLength<Le+(Ue||0))throw new RangeError("'length' is out of bounds");return we=Le===void 0&&Ue===void 0?new Uint8Array(we):Ue===void 0?new Uint8Array(we,Le):new Uint8Array(we,Le,Ue),le.TYPED_ARRAY_SUPPORT?(De=we,De.__proto__=le.prototype):De=x(De,we),De}function ae(De,we){if(le.isBuffer(we)){var Le=0|oe(we.length);return De=te(De,Le),De.length===0||we.copy(De,0,0,Le),De}if(we){if(typeof ArrayBuffer!="undefined"&&we.buffer instanceof ArrayBuffer||"length"in we)return typeof we.length!="number"||We(we.length)?te(De,0):x(De,we);if(we.type==="Buffer"&&Be(we.data))return x(De,we.data)}throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.")}function oe(De){if(De>=se())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+se().toString(16)+" bytes");return 0|De}function ve(De){return+De!=De&&(De=0),le.alloc(+De)}function ye(De,we){if(le.isBuffer(De))return De.length;if(typeof ArrayBuffer!="undefined"&&typeof ArrayBuffer.isView=="function"&&(ArrayBuffer.isView(De)||De instanceof ArrayBuffer))return De.byteLength;typeof De!="string"&&(De=""+De);var Le=De.length;if(Le===0)return 0;for(var Ue=!1;;)switch(we){case"ascii":case"latin1":case"binary":return Le;case"utf8":case"utf-8":case void 0:return dt(De).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*Le;case"hex":return Le>>>1;case"base64":return gt(De).length;default:if(Ue)return dt(De).length;we=(""+we).toLowerCase(),Ue=!0}}function me(De,we,Le){var Ue=!1;if((we===void 0||we<0)&&(we=0),we>this.length||((Le===void 0||Le>this.length)&&(Le=this.length),Le<=0)||(Le>>>=0,we>>>=0,Le<=we))return"";for(De||(De="utf8");;)switch(De){case"hex":return rt(this,we,Le);case"utf8":case"utf-8":return Qe(this,we,Le);case"ascii":return ot(this,we,Le);case"latin1":case"binary":return He(this,we,Le);case"base64":return Pe(this,we,Le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ye(this,we,Le);default:if(Ue)throw new TypeError("Unknown encoding: "+De);De=(De+"").toLowerCase(),Ue=!0}}function ge(De,we,Le){var Ue=De[we];De[we]=De[Le],De[Le]=Ue}function _e(De,we,Le,Ue,Me){if(De.length===0)return-1;if(typeof Le=="string"?(Ue=Le,Le=0):Le>2147483647?Le=2147483647:Le<-2147483648&&(Le=-2147483648),Le=+Le,isNaN(Le)&&(Le=Me?0:De.length-1),Le<0&&(Le=De.length+Le),Le>=De.length){if(Me)return-1;Le=De.length-1}else if(Le<0){if(!Me)return-1;Le=0}if(typeof we=="string"&&(we=le.from(we,Ue)),le.isBuffer(we))return we.length===0?-1:he(De,we,Le,Ue,Me);if(typeof we=="number")return we&=255,le.TYPED_ARRAY_SUPPORT&&typeof Uint8Array.prototype.indexOf=="function"?Me?Uint8Array.prototype.indexOf.call(De,we,Le):Uint8Array.prototype.lastIndexOf.call(De,we,Le):he(De,[we],Le,Ue,Me);throw new TypeError("val must be string, number or Buffer")}function he(De,we,Le,Ue,Me){function Re(Ft,yt){return tt===1?Ft[yt]:Ft.readUInt16BE(yt*tt)}var tt=1,lt=De.length,Pt=we.length;if(Ue!==void 0&&((Ue=String(Ue).toLowerCase())==="ucs2"||Ue==="ucs-2"||Ue==="utf16le"||Ue==="utf-16le")){if(De.length<2||we.length<2)return-1;tt=2,lt/=2,Pt/=2,Le/=2}var Ct;if(Me){var vt=-1;for(Ct=Le;Ct<lt;Ct++)if(Re(De,Ct)===Re(we,vt===-1?0:Ct-vt)){if(vt===-1&&(vt=Ct),Ct-vt+1===Pt)return vt*tt}else vt!==-1&&(Ct-=Ct-vt),vt=-1}else for(Le+Pt>lt&&(Le=lt-Pt),Ct=Le;Ct>=0;Ct--){for(var Ot=!0,zt=0;zt<Pt;zt++)if(Re(De,Ct+zt)!==Re(we,zt)){Ot=!1;break}if(Ot)return Ct}return-1}function pe(De,we,Le,Ue){Le=Number(Le)||0;var Me=De.length-Le;Ue?(Ue=Number(Ue))>Me&&(Ue=Me):Ue=Me;var Re=we.length;if(Re%2!=0)throw new TypeError("Invalid hex string");Ue>Re/2&&(Ue=Re/2);for(var tt=0;tt<Ue;++tt){var lt=parseInt(we.substr(2*tt,2),16);if(isNaN(lt))return tt;De[Le+tt]=lt}return tt}function ke(De,we,Le,Ue){return _t(dt(we,De.length-Le),De,Le,Ue)}function Te(De,we,Le,Ue){return _t(Mt(we),De,Le,Ue)}function Ee(De,we,Le,Ue){return Te(De,we,Le,Ue)}function Oe(De,we,Le,Ue){return _t(gt(we),De,Le,Ue)}function je(De,we,Le,Ue){return _t(xt(we,De.length-Le),De,Le,Ue)}function Pe(De,we,Le){return we===0&&Le===De.length?Ae.fromByteArray(De):Ae.fromByteArray(De.slice(we,Le))}function Qe(De,we,Le){Le=Math.min(De.length,Le);for(var Ue=[],Me=we;Me<Le;){var Re=De[Me],tt=null,lt=Re>239?4:Re>223?3:Re>191?2:1;if(Me+lt<=Le){var Pt,Ct,vt,Ot;switch(lt){case 1:Re<128&&(tt=Re);break;case 2:Pt=De[Me+1],(192&Pt)==128&&(Ot=(31&Re)<<6|63&Pt)>127&&(tt=Ot);break;case 3:Pt=De[Me+1],Ct=De[Me+2],(192&Pt)==128&&(192&Ct)==128&&(Ot=(15&Re)<<12|(63&Pt)<<6|63&Ct)>2047&&(Ot<55296||Ot>57343)&&(tt=Ot);break;case 4:Pt=De[Me+1],Ct=De[Me+2],vt=De[Me+3],(192&Pt)==128&&(192&Ct)==128&&(192&vt)==128&&(Ot=(15&Re)<<18|(63&Pt)<<12|(63&Ct)<<6|63&vt)>65535&&Ot<1114112&&(tt=Ot)}}tt===null?(tt=65533,lt=1):tt>65535&&(tt-=65536,Ue.push(tt>>>10&1023|55296),tt=56320|1023&tt),Ue.push(tt),Me+=lt}return Xe(Ue)}function Xe(De){var we=De.length;if(we<=Ke)return String.fromCharCode.apply(String,De);for(var Le="",Ue=0;Ue<we;)Le+=String.fromCharCode.apply(String,De.slice(Ue,Ue+=Ke));return Le}function ot(De,we,Le){var Ue="";Le=Math.min(De.length,Le);for(var Me=we;Me<Le;++Me)Ue+=String.fromCharCode(127&De[Me]);return Ue}function He(De,we,Le){var Ue="";Le=Math.min(De.length,Le);for(var Me=we;Me<Le;++Me)Ue+=String.fromCharCode(De[Me]);return Ue}function rt(De,we,Le){var Ue=De.length;(!we||we<0)&&(we=0),(!Le||Le<0||Le>Ue)&&(Le=Ue);for(var Me="",Re=we;Re<Le;++Re)Me+=It(De[Re]);return Me}function Ye(De,we,Le){for(var Ue=De.slice(we,Le),Me="",Re=0;Re<Ue.length;Re+=2)Me+=String.fromCharCode(Ue[Re]+256*Ue[Re+1]);return Me}function ut(De,we,Le){if(De%1!=0||De<0)throw new RangeError("offset is not uint");if(De+we>Le)throw new RangeError("Trying to access beyond buffer length")}function Ge(De,we,Le,Ue,Me,Re){if(!le.isBuffer(De))throw new TypeError('"buffer" argument must be a Buffer instance');if(we>Me||we<Re)throw new RangeError('"value" argument is out of bounds');if(Le+Ue>De.length)throw new RangeError("Index out of range")}function ze(De,we,Le,Ue){we<0&&(we=65535+we+1);for(var Me=0,Re=Math.min(De.length-Le,2);Me<Re;++Me)De[Le+Me]=(we&255<<8*(Ue?Me:1-Me))>>>8*(Ue?Me:1-Me)}function Ve(De,we,Le,Ue){we<0&&(we=4294967295+we+1);for(var Me=0,Re=Math.min(De.length-Le,4);Me<Re;++Me)De[Le+Me]=we>>>8*(Ue?Me:3-Me)&255}function $e(De,we,Le,Ue,Me,Re){if(Le+Ue>De.length)throw new RangeError("Index out of range");if(Le<0)throw new RangeError("Index out of range")}function nt(De,we,Le,Ue,Me){return Me||$e(De,we,Le,4,34028234663852886e22,-34028234663852886e22),Se.write(De,we,Le,Ue,23,4),Le+4}function et(De,we,Le,Ue,Me){return Me||$e(De,we,Le,8,17976931348623157e292,-17976931348623157e292),Se.write(De,we,Le,Ue,52,8),Le+8}function pt(De){if(De=ct(De).replace(Ne,""),De.length<2)return"";for(;De.length%4!=0;)De+="=";return De}function ct(De){return De.trim?De.trim():De.replace(/^\s+|\s+$/g,"")}function It(De){return De<16?"0"+De.toString(16):De.toString(16)}function dt(De,we){we=we||1/0;for(var Le,Ue=De.length,Me=null,Re=[],tt=0;tt<Ue;++tt){if((Le=De.charCodeAt(tt))>55295&&Le<57344){if(!Me){if(Le>56319){(we-=3)>-1&&Re.push(239,191,189);continue}if(tt+1===Ue){(we-=3)>-1&&Re.push(239,191,189);continue}Me=Le;continue}if(Le<56320){(we-=3)>-1&&Re.push(239,191,189),Me=Le;continue}Le=65536+(Me-55296<<10|Le-56320)}else Me&&(we-=3)>-1&&Re.push(239,191,189);if(Me=null,Le<128){if((we-=1)<0)break;Re.push(Le)}else if(Le<2048){if((we-=2)<0)break;Re.push(Le>>6|192,63&Le|128)}else if(Le<65536){if((we-=3)<0)break;Re.push(Le>>12|224,Le>>6&63|128,63&Le|128)}else{if(!(Le<1114112))throw new Error("Invalid code point");if((we-=4)<0)break;Re.push(Le>>18|240,Le>>12&63|128,Le>>6&63|128,63&Le|128)}}return Re}function Mt(De){for(var we=[],Le=0;Le<De.length;++Le)we.push(255&De.charCodeAt(Le));return we}function xt(De,we){for(var Le,Ue,Me,Re=[],tt=0;tt<De.length&&!((we-=2)<0);++tt)Le=De.charCodeAt(tt),Ue=Le>>8,Me=Le%256,Re.push(Me),Re.push(Ue);return Re}function gt(De){return Ae.toByteArray(pt(De))}function _t(De,we,Le,Ue){for(var Me=0;Me<Ue&&!(Me+Le>=we.length||Me>=De.length);++Me)we[Me+Le]=De[Me];return Me}function We(De){return De!==De}var Ae=Ce(21),Se=Ce(22),Be=Ce(23);ie.Buffer=le,ie.SlowBuffer=ve,ie.INSPECT_MAX_BYTES=50,le.TYPED_ARRAY_SUPPORT=ue.TYPED_ARRAY_SUPPORT!==void 0?ue.TYPED_ARRAY_SUPPORT:function(){try{var De=new Uint8Array(1);return De.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},De.foo()===42&&typeof De.subarray=="function"&&De.subarray(1,1).byteLength===0}catch(we){return!1}}(),ie.kMaxLength=se(),le.poolSize=8192,le._augment=function(De){return De.__proto__=le.prototype,De},le.from=function(De,we,Le){return ee(null,De,we,Le)},le.TYPED_ARRAY_SUPPORT&&(le.prototype.__proto__=Uint8Array.prototype,le.__proto__=Uint8Array,typeof Symbol!="undefined"&&Symbol.species&&le[Symbol.species]===le&&Object.defineProperty(le,Symbol.species,{value:null,configurable:!0})),le.alloc=function(De,we,Le){return E(null,De,we,Le)},le.allocUnsafe=function(De){return b(null,De)},le.allocUnsafeSlow=function(De){return b(null,De)},le.isBuffer=function(De){return!(De==null||!De._isBuffer)},le.compare=function(De,we){if(!le.isBuffer(De)||!le.isBuffer(we))throw new TypeError("Arguments must be Buffers");if(De===we)return 0;for(var Le=De.length,Ue=we.length,Me=0,Re=Math.min(Le,Ue);Me<Re;++Me)if(De[Me]!==we[Me]){Le=De[Me],Ue=we[Me];break}return Le<Ue?-1:Ue<Le?1:0},le.isEncoding=function(De){switch(String(De).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},le.concat=function(De,we){if(!Be(De))throw new TypeError('"list" argument must be an Array of Buffers');if(De.length===0)return le.alloc(0);var Le;if(we===void 0)for(we=0,Le=0;Le<De.length;++Le)we+=De[Le].length;var Ue=le.allocUnsafe(we),Me=0;for(Le=0;Le<De.length;++Le){var Re=De[Le];if(!le.isBuffer(Re))throw new TypeError('"list" argument must be an Array of Buffers');Re.copy(Ue,Me),Me+=Re.length}return Ue},le.byteLength=ye,le.prototype._isBuffer=!0,le.prototype.swap16=function(){var De=this.length;if(De%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var we=0;we<De;we+=2)ge(this,we,we+1);return this},le.prototype.swap32=function(){var De=this.length;if(De%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var we=0;we<De;we+=4)ge(this,we,we+3),ge(this,we+1,we+2);return this},le.prototype.swap64=function(){var De=this.length;if(De%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var we=0;we<De;we+=8)ge(this,we,we+7),ge(this,we+1,we+6),ge(this,we+2,we+5),ge(this,we+3,we+4);return this},le.prototype.toString=function(){var De=0|this.length;return De===0?"":arguments.length===0?Qe(this,0,De):me.apply(this,arguments)},le.prototype.equals=function(De){if(!le.isBuffer(De))throw new TypeError("Argument must be a Buffer");return this===De||le.compare(this,De)===0},le.prototype.inspect=function(){var De="",we=ie.INSPECT_MAX_BYTES;return this.length>0&&(De=this.toString("hex",0,we).match(/.{2}/g).join(" "),this.length>we&&(De+=" ... ")),"<Buffer "+De+">"},le.prototype.compare=function(De,we,Le,Ue,Me){if(!le.isBuffer(De))throw new TypeError("Argument must be a Buffer");if(we===void 0&&(we=0),Le===void 0&&(Le=De?De.length:0),Ue===void 0&&(Ue=0),Me===void 0&&(Me=this.length),we<0||Le>De.length||Ue<0||Me>this.length)throw new RangeError("out of range index");if(Ue>=Me&&we>=Le)return 0;if(Ue>=Me)return-1;if(we>=Le)return 1;if(we>>>=0,Le>>>=0,Ue>>>=0,Me>>>=0,this===De)return 0;for(var Re=Me-Ue,tt=Le-we,lt=Math.min(Re,tt),Pt=this.slice(Ue,Me),Ct=De.slice(we,Le),vt=0;vt<lt;++vt)if(Pt[vt]!==Ct[vt]){Re=Pt[vt],tt=Ct[vt];break}return Re<tt?-1:tt<Re?1:0},le.prototype.includes=function(De,we,Le){return this.indexOf(De,we,Le)!==-1},le.prototype.indexOf=function(De,we,Le){return _e(this,De,we,Le,!0)},le.prototype.lastIndexOf=function(De,we,Le){return _e(this,De,we,Le,!1)},le.prototype.write=function(De,we,Le,Ue){if(we===void 0)Ue="utf8",Le=this.length,we=0;else if(Le===void 0&&typeof we=="string")Ue=we,Le=this.length,we=0;else{if(!isFinite(we))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");we|=0,isFinite(Le)?(Le|=0,Ue===void 0&&(Ue="utf8")):(Ue=Le,Le=void 0)}var Me=this.length-we;if((Le===void 0||Le>Me)&&(Le=Me),De.length>0&&(Le<0||we<0)||we>this.length)throw new RangeError("Attempt to write outside buffer bounds");Ue||(Ue="utf8");for(var Re=!1;;)switch(Ue){case"hex":return pe(this,De,we,Le);case"utf8":case"utf-8":return ke(this,De,we,Le);case"ascii":return Te(this,De,we,Le);case"latin1":case"binary":return Ee(this,De,we,Le);case"base64":return Oe(this,De,we,Le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return je(this,De,we,Le);default:if(Re)throw new TypeError("Unknown encoding: "+Ue);Ue=(""+Ue).toLowerCase(),Re=!0}},le.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var Ke=4096;le.prototype.slice=function(De,we){var Le=this.length;De=~~De,we=we===void 0?Le:~~we,De<0?(De+=Le)<0&&(De=0):De>Le&&(De=Le),we<0?(we+=Le)<0&&(we=0):we>Le&&(we=Le),we<De&&(we=De);var Ue;if(le.TYPED_ARRAY_SUPPORT)Ue=this.subarray(De,we),Ue.__proto__=le.prototype;else{var Me=we-De;Ue=new le(Me,void 0);for(var Re=0;Re<Me;++Re)Ue[Re]=this[Re+De]}return Ue},le.prototype.readUIntLE=function(De,we,Le){De|=0,we|=0,Le||ut(De,we,this.length);for(var Ue=this[De],Me=1,Re=0;++Re<we&&(Me*=256);)Ue+=this[De+Re]*Me;return Ue},le.prototype.readUIntBE=function(De,we,Le){De|=0,we|=0,Le||ut(De,we,this.length);for(var Ue=this[De+--we],Me=1;we>0&&(Me*=256);)Ue+=this[De+--we]*Me;return Ue},le.prototype.readUInt8=function(De,we){return we||ut(De,1,this.length),this[De]},le.prototype.readUInt16LE=function(De,we){return we||ut(De,2,this.length),this[De]|this[De+1]<<8},le.prototype.readUInt16BE=function(De,we){return we||ut(De,2,this.length),this[De]<<8|this[De+1]},le.prototype.readUInt32LE=function(De,we){return we||ut(De,4,this.length),(this[De]|this[De+1]<<8|this[De+2]<<16)+16777216*this[De+3]},le.prototype.readUInt32BE=function(De,we){return we||ut(De,4,this.length),16777216*this[De]+(this[De+1]<<16|this[De+2]<<8|this[De+3])},le.prototype.readIntLE=function(De,we,Le){De|=0,we|=0,Le||ut(De,we,this.length);for(var Ue=this[De],Me=1,Re=0;++Re<we&&(Me*=256);)Ue+=this[De+Re]*Me;return Me*=128,Ue>=Me&&(Ue-=Math.pow(2,8*we)),Ue},le.prototype.readIntBE=function(De,we,Le){De|=0,we|=0,Le||ut(De,we,this.length);for(var Ue=we,Me=1,Re=this[De+--Ue];Ue>0&&(Me*=256);)Re+=this[De+--Ue]*Me;return Me*=128,Re>=Me&&(Re-=Math.pow(2,8*we)),Re},le.prototype.readInt8=function(De,we){return we||ut(De,1,this.length),128&this[De]?-1*(255-this[De]+1):this[De]},le.prototype.readInt16LE=function(De,we){we||ut(De,2,this.length);var Le=this[De]|this[De+1]<<8;return 32768&Le?4294901760|Le:Le},le.prototype.readInt16BE=function(De,we){we||ut(De,2,this.length);var Le=this[De+1]|this[De]<<8;return 32768&Le?4294901760|Le:Le},le.prototype.readInt32LE=function(De,we){return we||ut(De,4,this.length),this[De]|this[De+1]<<8|this[De+2]<<16|this[De+3]<<24},le.prototype.readInt32BE=function(De,we){return we||ut(De,4,this.length),this[De]<<24|this[De+1]<<16|this[De+2]<<8|this[De+3]},le.prototype.readFloatLE=function(De,we){return we||ut(De,4,this.length),Se.read(this,De,!0,23,4)},le.prototype.readFloatBE=function(De,we){return we||ut(De,4,this.length),Se.read(this,De,!1,23,4)},le.prototype.readDoubleLE=function(De,we){return we||ut(De,8,this.length),Se.read(this,De,!0,52,8)},le.prototype.readDoubleBE=function(De,we){return we||ut(De,8,this.length),Se.read(this,De,!1,52,8)},le.prototype.writeUIntLE=function(De,we,Le,Ue){De=+De,we|=0,Le|=0,!Ue&&Ge(this,De,we,Le,Math.pow(2,8*Le)-1,0);var Me=1,Re=0;for(this[we]=255&De;++Re<Le&&(Me*=256);)this[we+Re]=De/Me&255;return we+Le},le.prototype.writeUIntBE=function(De,we,Le,Ue){De=+De,we|=0,Le|=0,!Ue&&Ge(this,De,we,Le,Math.pow(2,8*Le)-1,0);var Me=Le-1,Re=1;for(this[we+Me]=255&De;--Me>=0&&(Re*=256);)this[we+Me]=De/Re&255;return we+Le},le.prototype.writeUInt8=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,1,255,0),le.TYPED_ARRAY_SUPPORT||(De=Math.floor(De)),this[we]=255&De,we+1},le.prototype.writeUInt16LE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,2,65535,0),le.TYPED_ARRAY_SUPPORT?(this[we]=255&De,this[we+1]=De>>>8):ze(this,De,we,!0),we+2},le.prototype.writeUInt16BE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,2,65535,0),le.TYPED_ARRAY_SUPPORT?(this[we]=De>>>8,this[we+1]=255&De):ze(this,De,we,!1),we+2},le.prototype.writeUInt32LE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,4,4294967295,0),le.TYPED_ARRAY_SUPPORT?(this[we+3]=De>>>24,this[we+2]=De>>>16,this[we+1]=De>>>8,this[we]=255&De):Ve(this,De,we,!0),we+4},le.prototype.writeUInt32BE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,4,4294967295,0),le.TYPED_ARRAY_SUPPORT?(this[we]=De>>>24,this[we+1]=De>>>16,this[we+2]=De>>>8,this[we+3]=255&De):Ve(this,De,we,!1),we+4},le.prototype.writeIntLE=function(De,we,Le,Ue){if(De=+De,we|=0,!Ue){var Me=Math.pow(2,8*Le-1);Ge(this,De,we,Le,Me-1,-Me)}var Re=0,tt=1,lt=0;for(this[we]=255&De;++Re<Le&&(tt*=256);)De<0&<===0&&this[we+Re-1]!==0&&(lt=1),this[we+Re]=(De/tt>>0)-lt&255;return we+Le},le.prototype.writeIntBE=function(De,we,Le,Ue){if(De=+De,we|=0,!Ue){var Me=Math.pow(2,8*Le-1);Ge(this,De,we,Le,Me-1,-Me)}var Re=Le-1,tt=1,lt=0;for(this[we+Re]=255&De;--Re>=0&&(tt*=256);)De<0&<===0&&this[we+Re+1]!==0&&(lt=1),this[we+Re]=(De/tt>>0)-lt&255;return we+Le},le.prototype.writeInt8=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,1,127,-128),le.TYPED_ARRAY_SUPPORT||(De=Math.floor(De)),De<0&&(De=255+De+1),this[we]=255&De,we+1},le.prototype.writeInt16LE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,2,32767,-32768),le.TYPED_ARRAY_SUPPORT?(this[we]=255&De,this[we+1]=De>>>8):ze(this,De,we,!0),we+2},le.prototype.writeInt16BE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,2,32767,-32768),le.TYPED_ARRAY_SUPPORT?(this[we]=De>>>8,this[we+1]=255&De):ze(this,De,we,!1),we+2},le.prototype.writeInt32LE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,4,2147483647,-2147483648),le.TYPED_ARRAY_SUPPORT?(this[we]=255&De,this[we+1]=De>>>8,this[we+2]=De>>>16,this[we+3]=De>>>24):Ve(this,De,we,!0),we+4},le.prototype.writeInt32BE=function(De,we,Le){return De=+De,we|=0,Le||Ge(this,De,we,4,2147483647,-2147483648),De<0&&(De=4294967295+De+1),le.TYPED_ARRAY_SUPPORT?(this[we]=De>>>24,this[we+1]=De>>>16,this[we+2]=De>>>8,this[we+3]=255&De):Ve(this,De,we,!1),we+4},le.prototype.writeFloatLE=function(De,we,Le){return nt(this,De,we,!0,Le)},le.prototype.writeFloatBE=function(De,we,Le){return nt(this,De,we,!1,Le)},le.prototype.writeDoubleLE=function(De,we,Le){return et(this,De,we,!0,Le)},le.prototype.writeDoubleBE=function(De,we,Le){return et(this,De,we,!1,Le)},le.prototype.copy=function(De,we,Le,Ue){if(Le||(Le=0),Ue||Ue===0||(Ue=this.length),we>=De.length&&(we=De.length),we||(we=0),Ue>0&&Ue<Le&&(Ue=Le),Ue===Le||De.length===0||this.length===0)return 0;if(we<0)throw new RangeError("targetStart out of bounds");if(Le<0||Le>=this.length)throw new RangeError("sourceStart out of bounds");if(Ue<0)throw new RangeError("sourceEnd out of bounds");Ue>this.length&&(Ue=this.length),De.length-we<Ue-Le&&(Ue=De.length-we+Le);var Me,Re=Ue-Le;if(this===De&&Le<we&&we<Ue)for(Me=Re-1;Me>=0;--Me)De[Me+we]=this[Me+Le];else if(Re<1e3||!le.TYPED_ARRAY_SUPPORT)for(Me=0;Me<Re;++Me)De[Me+we]=this[Me+Le];else Uint8Array.prototype.set.call(De,this.subarray(Le,Le+Re),we);return Re},le.prototype.fill=function(De,we,Le,Ue){if(typeof De=="string"){if(typeof we=="string"?(Ue=we,we=0,Le=this.length):typeof Le=="string"&&(Ue=Le,Le=this.length),De.length===1){var Me=De.charCodeAt(0);Me<256&&(De=Me)}if(Ue!==void 0&&typeof Ue!="string")throw new TypeError("encoding must be a string");if(typeof Ue=="string"&&!le.isEncoding(Ue))throw new TypeError("Unknown encoding: "+Ue)}else typeof De=="number"&&(De&=255);if(we<0||this.length<we||this.length<Le)throw new RangeError("Out of range index");if(Le<=we)return this;we>>>=0,Le=Le===void 0?this.length:Le>>>0,De||(De=0);var Re;if(typeof De=="number")for(Re=we;Re<Le;++Re)this[Re]=De;else{var tt=le.isBuffer(De)?De:dt(new le(De,Ue).toString()),lt=tt.length;for(Re=0;Re<Le-we;++Re)this[Re+we]=tt[Re%lt]}return this};var Ne=/[^+\/0-9A-Za-z-_]/g}).call(ie,Ce(20))},function(ce,ie){var Ce;Ce=function(){return this}();try{Ce=Ce||Function("return this")()||(0,eval)("this")}catch(ue){typeof window=="object"&&(Ce=window)}ce.exports=Ce},function(ce,ie,Ce){"use strict";function ue(oe){var ve=oe.length;if(ve%4>0)throw new Error("Invalid string. Length must be a multiple of 4");return oe[ve-2]==="="?2:oe[ve-1]==="="?1:0}function se(oe){return 3*oe.length/4-ue(oe)}function te(oe){var ve,ye,me,ge,_e,he=oe.length;ge=ue(oe),_e=new z(3*he/4-ge),ye=ge>0?he-4:he;var pe=0;for(ve=0;ve<ye;ve+=4)me=b[oe.charCodeAt(ve)]<<18|b[oe.charCodeAt(ve+1)]<<12|b[oe.charCodeAt(ve+2)]<<6|b[oe.charCodeAt(ve+3)],_e[pe++]=me>>16&255,_e[pe++]=me>>8&255,_e[pe++]=255&me;return ge===2?(me=b[oe.charCodeAt(ve)]<<2|b[oe.charCodeAt(ve+1)]>>4,_e[pe++]=255&me):ge===1&&(me=b[oe.charCodeAt(ve)]<<10|b[oe.charCodeAt(ve+1)]<<4|b[oe.charCodeAt(ve+2)]>>2,_e[pe++]=me>>8&255,_e[pe++]=255&me),_e}function le(oe){return E[oe>>18&63]+E[oe>>12&63]+E[oe>>6&63]+E[63&oe]}function ee(oe,ve,ye){for(var me,ge=[],_e=ve;_e<ye;_e+=3)me=(oe[_e]<<16)+(oe[_e+1]<<8)+oe[_e+2],ge.push(le(me));return ge.join("")}function ne(oe){for(var ve,ye=oe.length,me=ye%3,ge="",_e=[],he=0,pe=ye-me;he<pe;he+=16383)_e.push(ee(oe,he,he+16383>pe?pe:he+16383));return me===1?(ve=oe[ye-1],ge+=E[ve>>2],ge+=E[ve<<4&63],ge+="=="):me===2&&(ve=(oe[ye-2]<<8)+oe[ye-1],ge+=E[ve>>10],ge+=E[ve>>4&63],ge+=E[ve<<2&63],ge+="="),_e.push(ge),_e.join("")}ie.byteLength=se,ie.toByteArray=te,ie.fromByteArray=ne;for(var E=[],b=[],z=typeof Uint8Array!="undefined"?Uint8Array:Array,x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",re=0,ae=x.length;re<ae;++re)E[re]=x[re],b[x.charCodeAt(re)]=re;b[45]=62,b[95]=63},function(ce,ie){ie.read=function(Ce,ue,se,te,le){var ee,ne,E=8*le-te-1,b=(1<<E)-1,z=b>>1,x=-7,re=se?le-1:0,ae=se?-1:1,oe=Ce[ue+re];for(re+=ae,ee=oe&(1<<-x)-1,oe>>=-x,x+=E;x>0;ee=256*ee+Ce[ue+re],re+=ae,x-=8);for(ne=ee&(1<<-x)-1,ee>>=-x,x+=te;x>0;ne=256*ne+Ce[ue+re],re+=ae,x-=8);if(ee===0)ee=1-z;else{if(ee===b)return ne?NaN:1/0*(oe?-1:1);ne+=Math.pow(2,te),ee-=z}return(oe?-1:1)*ne*Math.pow(2,ee-te)},ie.write=function(Ce,ue,se,te,le,ee){var ne,E,b,z=8*ee-le-1,x=(1<<z)-1,re=x>>1,ae=le===23?Math.pow(2,-24)-Math.pow(2,-77):0,oe=te?0:ee-1,ve=te?1:-1,ye=ue<0||ue===0&&1/ue<0?1:0;for(ue=Math.abs(ue),isNaN(ue)||ue===1/0?(E=isNaN(ue)?1:0,ne=x):(ne=Math.floor(Math.log(ue)/Math.LN2),ue*(b=Math.pow(2,-ne))<1&&(ne--,b*=2),ue+=ne+re>=1?ae/b:ae*Math.pow(2,1-re),ue*b>=2&&(ne++,b/=2),ne+re>=x?(E=0,ne=x):ne+re>=1?(E=(ue*b-1)*Math.pow(2,le),ne+=re):(E=ue*Math.pow(2,re-1)*Math.pow(2,le),ne=0));le>=8;Ce[se+oe]=255&E,oe+=ve,E/=256,le-=8);for(ne=ne<<le|E,z+=le;z>0;Ce[se+oe]=255&ne,oe+=ve,ne/=256,z-=8);Ce[se+oe-ve]|=128*ye}},function(ce,ie){var Ce={}.toString;ce.exports=Array.isArray||function(ue){return Ce.call(ue)=="[object Array]"}},function(ce,ie,Ce){"use strict";function ue(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}(),te=function(){function le(){ue(this,le)}return se(le,null,[{key:"set",value:function(ee,ne){try{window.localStorage&&localStorage.setItem(ee,ne)}catch(E){window[ee+"_localStorage"]=ne}}},{key:"get",value:function(ee){try{if(window.localStorage)return localStorage.getItem(ee)}catch(ne){return window[ee+"_localStorage"]}return""}},{key:"remove",value:function(ee){try{window.localStorage&&localStorage.removeItem(ee)}catch(ne){delete window[ee+"_localStorage"]}}}]),le}();ie.default=te},function(ce,ie,Ce){"use strict";function ue(le,ee){if(!(le instanceof ee))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function le(ee,ne){for(var E=0;E<ne.length;E++){var b=ne[E];b.enumerable=b.enumerable||!1,b.configurable=!0,"value"in b&&(b.writable=!0),Object.defineProperty(ee,b.key,b)}}return function(ee,ne,E){return ne&&le(ee.prototype,ne),E&&le(ee,E),ee}}(),te=function(){function le(){ue(this,le)}return se(le,null,[{key:"get",value:function(ee){for(var ne=ee+"",E=document.cookie.split(";"),b=0;b<E.length;b++){var z=E[b].trim();if(z.indexOf(ne)==0)return unescape(z.substring(ne.length+1,z.length))}return""}},{key:"set",value:function(ee,ne,E){var b=new Date;b.setTime(b.getTime()+24*E*60*60*1e3);var z="expires="+b.toGMTString();document.cookie=ee+"="+escape(ne)+"; "+z}}]),le}();ie.default=te},function(ce,ie,Ce){"use strict";function ue(z){return z&&z.__esModule?z:{default:z}}function se(z,x){if(!(z instanceof x))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var te=function(){function z(x,re){for(var ae=0;ae<re.length;ae++){var oe=re[ae];oe.enumerable=oe.enumerable||!1,oe.configurable=!0,"value"in oe&&(oe.writable=!0),Object.defineProperty(x,oe.key,oe)}}return function(x,re,ae){return re&&z(x.prototype,re),ae&&z(x,ae),x}}(),le=Ce(8),ee=ue(le),ne=Ce(9),E=ue(ne),b=function(){function z(){se(this,z)}return te(z,null,[{key:"refreshUploadAuth",value:function(x,re,ae){var oe=(E.default.randomUUID(),E.default.randomUUID()),ve={AccessKeyId:x.accessKeyId,SecurityToken:x.securityToken,Action:"RefreshUploadVideo",VideoId:x.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:oe,RequestId:x.requestId},ye=E.default.makeUTF8sort(ve,"=","&")+"&Signature="+E.default.aliyunEncodeURI(E.default.makeChangeSiga(ve,x.accessKeySecret)),me="https://vod."+x.region+".aliyuncs.com/?"+ye;ee.default.get(me,function(_e){var _e=JSON.parse(_e);re&&re(_e)},function(ge){if(ae){var _e=JSON.parse(ge);ae(_e)}})}},{key:"getUploadAuth",value:function(x,re,ae){var oe=(E.default.randomUUID(),E.default.randomUUID()),ve={AccessKeyId:x.accessKeyId,SecurityToken:x.securityToken,Action:"CreateUploadVideo",Title:x.title,FileName:x.fileName,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:oe,RequestId:x.requestId};x.fileSize&&(ve.FileSize=x.fileSize),x.description&&(ve.Description=x.description),x.cateId&&(ve.CateId=x.cateId),x.tags&&(ve.Tags=x.tags),x.templateGroupId&&(ve.TemplateGroupId=x.templateGroupId),x.storageLocation&&(ve.StorageLocation=x.storageLocation),x.coverUrl&&(ve.CoverURL=x.coverUrl),x.transCodeMode&&(ve.TransCodeMode=x.transCodeMode),x.userData&&(ve.UserData=JSON.stringify(x.userData));var ye=E.default.makeUTF8sort(ve,"=","&")+"&Signature="+E.default.aliyunEncodeURI(E.default.makeChangeSiga(ve,x.accessKeySecret)),me="https://vod."+x.region+".aliyuncs.com/?"+ye;ee.default.get(me,function(ge){try{ge=JSON.parse(ge)}catch(_e){if(ae)return void ae({Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"})}re&&re(ge)},function(ge){if(ae){var _e={Code:"GetUploadAuthFailed",Message:"\u83B7\u53D6uploadauth\u5931\u8D25"};try{_e=JSON.parse(ge)}catch(he){}ae(_e)}})}},{key:"getImageUploadAuth",value:function(x,re,ae){var oe=(E.default.randomUUID(),E.default.randomUUID()),ve={AccessKeyId:x.accessKeyId,SecurityToken:x.securityToken,Action:"CreateUploadImage",ImageType:x.imageType?x.imageType:"default",Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:oe,RequestId:x.requestId};x.title&&(ve.Title=x.title),x.imageExt&&(ve.ImageExt=x.imageExt),x.tags&&(ve.Tags=x.tags),x.storageLocation&&(ve.StorageLocation=x.storageLocation);var ye=E.default.makeUTF8sort(ve,"=","&")+"&Signature="+E.default.aliyunEncodeURI(E.default.makeChangeSiga(ve,x.accessKeySecret)),me="https://vod."+x.region+".aliyuncs.com/?"+ye;ee.default.get(me,function(ge){ge=JSON.parse(ge),re&&re(ge)},function(ge){if(ae){var _e=JSON.parse(ge);ae(_e)}})}}]),z}();ie.default=b},function(ce,ie,Ce){(function(ue,se,te){ce.exports=ie=se(Ce(0),Ce(28),Ce(29))})(0,function(ue){return ue.HmacSHA1})},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){return function(){var se=ue,te=se.lib,le=te.WordArray,ee=te.Hasher,ne=se.algo,E=[],b=ne.SHA1=ee.extend({_doReset:function(){this._hash=new le.init([1732584193,4023233417,2562383102,271733878,3285377520])},_doProcessBlock:function(z,x){for(var re=this._hash.words,ae=re[0],oe=re[1],ve=re[2],ye=re[3],me=re[4],ge=0;ge<80;ge++){if(ge<16)E[ge]=0|z[x+ge];else{var _e=E[ge-3]^E[ge-8]^E[ge-14]^E[ge-16];E[ge]=_e<<1|_e>>>31}var he=(ae<<5|ae>>>27)+me+E[ge];he+=ge<20?1518500249+(oe&ve|~oe&ye):ge<40?1859775393+(oe^ve^ye):ge<60?(oe&ve|oe&ye|ve&ye)-1894007588:(oe^ve^ye)-899497514,me=ye,ye=ve,ve=oe<<30|oe>>>2,oe=ae,ae=he}re[0]=re[0]+ae|0,re[1]=re[1]+oe|0,re[2]=re[2]+ve|0,re[3]=re[3]+ye|0,re[4]=re[4]+me|0},_doFinalize:function(){var z=this._data,x=z.words,re=8*this._nDataBytes,ae=8*z.sigBytes;return x[ae>>>5]|=128<<24-ae%32,x[14+(ae+64>>>9<<4)]=Math.floor(re/4294967296),x[15+(ae+64>>>9<<4)]=re,z.sigBytes=4*x.length,this._process(),this._hash},clone:function(){var z=ee.clone.call(this);return z._hash=this._hash.clone(),z}});se.SHA1=ee._createHelper(b),se.HmacSHA1=ee._createHmacHelper(b)}(),ue.SHA1})},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){(function(){var se=ue,te=se.lib,le=te.Base,ee=se.enc,ne=ee.Utf8,E=se.algo;E.HMAC=le.extend({init:function(b,z){b=this._hasher=new b.init,typeof z=="string"&&(z=ne.parse(z));var x=b.blockSize,re=4*x;z.sigBytes>re&&(z=b.finalize(z)),z.clamp();for(var ae=this._oKey=z.clone(),oe=this._iKey=z.clone(),ve=ae.words,ye=oe.words,me=0;me<x;me++)ve[me]^=1549556828,ye[me]^=909522486;ae.sigBytes=oe.sigBytes=re,this.reset()},reset:function(){var b=this._hasher;b.reset(),b.update(this._iKey)},update:function(b){return this._hasher.update(b),this},finalize:function(b){var z=this._hasher,x=z.finalize(b);return z.reset(),z.finalize(this._oKey.clone().concat(x))}})})()})},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){return function(){function se(E,b,z){for(var x=[],re=0,ae=0;ae<b;ae++)if(ae%4){var oe=z[E.charCodeAt(ae-1)]<<ae%4*2,ve=z[E.charCodeAt(ae)]>>>6-ae%4*2;x[re>>>2]|=(oe|ve)<<24-re%4*8,re++}return ee.create(x,re)}var te=ue,le=te.lib,ee=le.WordArray,ne=te.enc;ne.Base64={stringify:function(E){var b=E.words,z=E.sigBytes,x=this._map;E.clamp();for(var re=[],ae=0;ae<z;ae+=3)for(var oe=b[ae>>>2]>>>24-ae%4*8&255,ve=b[ae+1>>>2]>>>24-(ae+1)%4*8&255,ye=b[ae+2>>>2]>>>24-(ae+2)%4*8&255,me=oe<<16|ve<<8|ye,ge=0;ge<4&&ae+.75*ge<z;ge++)re.push(x.charAt(me>>>6*(3-ge)&63));var _e=x.charAt(64);if(_e)for(;re.length%4;)re.push(_e);return re.join("")},parse:function(E){var b=E.length,z=this._map,x=this._reverseMap;if(!x){x=this._reverseMap=[];for(var re=0;re<z.length;re++)x[z.charCodeAt(re)]=re}var ae=z.charAt(64);if(ae){var oe=E.indexOf(ae);oe!==-1&&(b=oe)}return se(E,b,x)},_map:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}}(),ue.enc.Base64})},function(ce,ie,Ce){"use strict";function ue(pe){return pe&&pe.__esModule?pe:{default:pe}}function se(pe,ke){if(!(pe instanceof ke))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var te=function(){function pe(ke,Te){for(var Ee=0;Ee<Te.length;Ee++){var Oe=Te[Ee];Oe.enumerable=Oe.enumerable||!1,Oe.configurable=!0,"value"in Oe&&(Oe.writable=!0),Object.defineProperty(ke,Oe.key,Oe)}}return function(ke,Te,Ee){return Te&&pe(ke.prototype,Te),Ee&&pe(ke,Ee),ke}}(),le=Ce(8),ee=ue(le),ne=Ce(7),E=ue(ne),b=Ce(4),z=ue(b),x=Ce(6),re=ue(x),ae=Ce(1),oe=ue(ae),ve=Ce(9),ye=ue(ve),me=Ce(2),ge=Ce(11),_e=Ce(10),he=function(){function pe(){se(this,pe)}return te(pe,null,[{key:"getAuthInfo",value:function(ke,Te,Ee){var Oe=ke+"|f#Ylm&^1TppeRhLg|"+Ee;return Te&&(Oe=ke+"|"+Te+"|f#Ylm&^1TppeRhLg|"+Ee),me(_e.parse(Oe)).toString(ge)}},{key:"upload",value:function(ke,Te,Ee){var Oe=oe.default.ISODateString(new Date),je=Math.floor(new Date().valueOf()/1e3),Pe=z.default.getClientId();Pe=z.default.setClientId(Pe);var Qe=pe.getAuthInfo(ke.userId,Pe,je),Xe=ye.default.randomUUID(),ot={Source:"WebSDK",BusinessType:"UploadVideo",Action:"ReportUploadProgress",TerminalType:"H5",DeviceModel:E.default.browser.name+(E.default.browser.version||""),AppVersion:re.default.version,AuthTimestamp:je,Timestamp:Oe,AuthInfo:Qe,FileName:ke.file.name,FileSize:ke.file.size,FileCreateTime:ke.file.lastModified,FileHash:ke.fileHash,UploadId:ke.checkpoint.checkpoint.uploadId,PartSize:ke.checkpoint.checkpoint.partSize,DonePartsCount:ke.checkpoint.checkpoint.doneParts.length,UploadPoint:JSON.stringify(ke.checkpoint),UploadRatio:ke.checkpoint.loaded,UserId:ke.userId,VideoId:ke.videoId,Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:Xe};Pe&&(ot.ClientId=Pe);var He=ye.default.makeUTF8sort(ot,"=","&")+"&Signature="+ye.default.aliyunEncodeURI(ye.default.makeChangeSiga(ot,ke.accessKeySecret)),rt="https://vod."+ke.region+".aliyuncs.com/?"+He;ee.default.get(rt,function(Ye){Te&&Te()},function(Ye){Ye&&(Ee(Ye),console.log(Ye))})}},{key:"get",value:function(ke,Te,Ee){var Oe=oe.default.ISODateString(new Date),je=Math.floor(new Date().valueOf()/1e3),Pe=z.default.getClientId(),Qe=pe.getAuthInfo(ke.userId,Pe,je),Xe=ye.default.randomUUID(),ot={Source:"WebSDK",BusinessType:"UploadVideo",Action:"GetUploadProgress",TerminalType:"H5",DeviceModel:E.default.browser.name+(E.default.browser.version||""),AppVersion:re.default.version,AuthTimestamp:je,Timestamp:Oe,AuthInfo:Qe,UserId:ke.userId,UploadInfoList:JSON.stringify(ke.uploadInfoList),Version:"2017-03-21",Format:"JSON",SignatureMethod:"HMAC-SHA1",SignatureVersion:"1.0",SignatureNonce:Xe};Pe&&(ot.ClientId=Pe);var He=ye.default.makeUTF8sort(ot,"=","&")+"&Signature="+ye.default.aliyunEncodeURI(ye.default.makeChangeSiga(ot,ke.accessKeySecret)),rt="https://vod."+ke.region+".aliyuncs.com/?"+He;ee.default.get(rt,function(Ye){var ut={},Ge=Pe;Ye=Ye?JSON.parse(Ye):{},Ye.UploadProgress&&Ye.UploadProgress.UploadProgressList&&Ye.UploadProgress.UploadProgressList.length>0&&(ut=Ye.UploadProgress.UploadProgressList[0],Ge=ut.ClientId),z.default.setClientId(Ge),Te&&Te(ut)},function(Ye){Ye&&(Ee(Ye),console.log(Ye))})}}]),pe}();ie.default=he},function(ce,ie,Ce){"use strict";function ue(ne,E){if(!(ne instanceof E))throw new TypeError("Cannot call a class as a function")}Object.defineProperty(ie,"__esModule",{value:!0});var se=function(){function ne(E,b){for(var z=0;z<b.length;z++){var x=b[z];x.enumerable=x.enumerable||!1,x.configurable=!0,"value"in x&&(x.writable=!0),Object.defineProperty(E,x.key,x)}}return function(E,b,z){return b&&ne(E.prototype,b),z&&ne(E,z),E}}(),te=Ce(2),le=Ce(33),ee=(Ce(11),function(){function ne(){ue(this,ne)}return se(ne,null,[{key:"getMd5",value:function(E,b,z){var x=new FileReader;x.onload=function(oe){try{if(oe&&oe.target){var ve=te(le.parse(oe.target.result)),ye=ve.toString();b(ye)}}catch(me){console.log(me)}},x.onerror=function(oe){console.log(oe),errorCallback(oe)};var re=File.prototype.slice||File.prototype.mozSlice||File.prototype.webkitSlice,ae=re.call(E,0,1024);x.readAsBinaryString(ae)}}]),ne}());ie.default=ee},function(ce,ie,Ce){(function(ue,se){ce.exports=ie=se(Ce(0))})(0,function(ue){return ue.enc.Latin1})}])},99498:function(qt,Dt,be){(function(ce){ce(be(89780))})(function(ce){ce.defineOption("placeholder","",function(ee,ne,E){var b=E&&E!=ce.Init;if(ne&&!b)ee.on("blur",se),ee.on("change",te),ee.on("swapDoc",te),ce.on(ee.getInputField(),"compositionupdate",ee.state.placeholderCompose=function(){ue(ee)}),te(ee);else if(!ne&&b){ee.off("blur",se),ee.off("change",te),ee.off("swapDoc",te),ce.off(ee.getInputField(),"compositionupdate",ee.state.placeholderCompose),ie(ee);var z=ee.getWrapperElement();z.className=z.className.replace(" CodeMirror-empty","")}ne&&!ee.hasFocus()&&se(ee)});function ie(ee){ee.state.placeholder&&(ee.state.placeholder.parentNode.removeChild(ee.state.placeholder),ee.state.placeholder=null)}function Ce(ee){ie(ee);var ne=ee.state.placeholder=document.createElement("pre");ne.style.cssText="height: 0; overflow: visible",ne.style.direction=ee.getOption("direction"),ne.className="CodeMirror-placeholder CodeMirror-line-like";var E=ee.getOption("placeholder");typeof E=="string"&&(E=document.createTextNode(E)),ne.appendChild(E),ee.display.lineSpace.insertBefore(ne,ee.display.lineSpace.firstChild)}function ue(ee){setTimeout(function(){var ne=!1,E=ee.getInputField();E.nodeName=="TEXTAREA"?ne=!E.value:ee.lineCount()==1&&(ne=!/[^\u200b]/.test(E.querySelector(".CodeMirror-line").textContent)),ne?Ce(ee):ie(ee)},20)}function se(ee){le(ee)&&Ce(ee)}function te(ee){var ne=ee.getWrapperElement(),E=le(ee);ne.className=ne.className.replace(" CodeMirror-empty","")+(E?" CodeMirror-empty":""),E?Ce(ee):ie(ee)}function le(ee){return ee.lineCount()===1&&ee.getLine(0)===""}})},25717:function(qt,Dt,be){(function(ce){ce(be(89780))})(function(ce){var ie={pairs:`()[]{}''""`,closeBefore:`)]}'":;>`,triples:"",explode:"[]{}"},Ce=ce.Pos;ce.defineOption("autoCloseBrackets",!1,function(ae,oe,ve){ve&&ve!=ce.Init&&(ae.removeKeyMap(se),ae.state.closeBrackets=null),oe&&(te(ue(oe,"pairs")),ae.state.closeBrackets=oe,ae.addKeyMap(se))});function ue(ae,oe){return oe=="pairs"&&typeof ae=="string"?ae:typeof ae=="object"&&ae[oe]!=null?ae[oe]:ie[oe]}var se={Backspace:ne,Enter:E};function te(ae){for(var oe=0;oe<ae.length;oe++){var ve=ae.charAt(oe),ye="'"+ve+"'";se[ye]||(se[ye]=le(ve))}}te(ie.pairs+"`");function le(ae){return function(oe){return z(oe,ae)}}function ee(ae){var oe=ae.state.closeBrackets;if(!oe||oe.override)return oe;var ve=ae.getModeAt(ae.getCursor());return ve.closeBrackets||oe}function ne(ae){var oe=ee(ae);if(!oe||ae.getOption("disableInput"))return ce.Pass;for(var ve=ue(oe,"pairs"),ye=ae.listSelections(),me=0;me<ye.length;me++){if(!ye[me].empty())return ce.Pass;var ge=x(ae,ye[me].head);if(!ge||ve.indexOf(ge)%2!=0)return ce.Pass}for(var me=ye.length-1;me>=0;me--){var _e=ye[me].head;ae.replaceRange("",Ce(_e.line,_e.ch-1),Ce(_e.line,_e.ch+1),"+delete")}}function E(ae){var oe=ee(ae),ve=oe&&ue(oe,"explode");if(!ve||ae.getOption("disableInput"))return ce.Pass;for(var ye=ae.listSelections(),me=0;me<ye.length;me++){if(!ye[me].empty())return ce.Pass;var ge=x(ae,ye[me].head);if(!ge||ve.indexOf(ge)%2!=0)return ce.Pass}ae.operation(function(){var _e=ae.lineSeparator()||`
|
|
|
`;ae.replaceSelection(_e+_e,null),ae.execCommand("goCharLeft"),ye=ae.listSelections();for(var he=0;he<ye.length;he++){var pe=ye[he].head.line;ae.indentLine(pe,null,!0),ae.indentLine(pe+1,null,!0)}})}function b(ae){var oe=ce.cmpPos(ae.anchor,ae.head)>0;return{anchor:new Ce(ae.anchor.line,ae.anchor.ch+(oe?-1:1)),head:new Ce(ae.head.line,ae.head.ch+(oe?1:-1))}}function z(ae,oe){var ve=ee(ae);if(!ve||ae.getOption("disableInput"))return ce.Pass;var ye=ue(ve,"pairs"),me=ye.indexOf(oe);if(me==-1)return ce.Pass;for(var ge=ue(ve,"closeBefore"),_e=ue(ve,"triples"),he=ye.charAt(me+1)==oe,pe=ae.listSelections(),ke=me%2==0,Te,Ee=0;Ee<pe.length;Ee++){var Oe=pe[Ee],je=Oe.head,Pe,Qe=ae.getRange(je,Ce(je.line,je.ch+1));if(ke&&!Oe.empty())Pe="surround";else if((he||!ke)&&Qe==oe)he&&re(ae,je)?Pe="both":_e.indexOf(oe)>=0&&ae.getRange(je,Ce(je.line,je.ch+3))==oe+oe+oe?Pe="skipThree":Pe="skip";else if(he&&je.ch>1&&_e.indexOf(oe)>=0&&ae.getRange(Ce(je.line,je.ch-2),je)==oe+oe){if(je.ch>2&&/\bstring/.test(ae.getTokenTypeAt(Ce(je.line,je.ch-2))))return ce.Pass;Pe="addFour"}else if(he){var Xe=je.ch==0?" ":ae.getRange(Ce(je.line,je.ch-1),je);if(!ce.isWordChar(Qe)&&Xe!=oe&&!ce.isWordChar(Xe))Pe="both";else return ce.Pass}else if(ke&&(Qe.length===0||/\s/.test(Qe)||ge.indexOf(Qe)>-1))Pe="both";else return ce.Pass;if(!Te)Te=Pe;else if(Te!=Pe)return ce.Pass}var ot=me%2?ye.charAt(me-1):oe,He=me%2?oe:ye.charAt(me+1);ae.operation(function(){if(Te=="skip")ae.execCommand("goCharRight");else if(Te=="skipThree")for(var rt=0;rt<3;rt++)ae.execCommand("goCharRight");else if(Te=="surround"){for(var Ye=ae.getSelections(),rt=0;rt<Ye.length;rt++)Ye[rt]=ot+Ye[rt]+He;ae.replaceSelections(Ye,"around"),Ye=ae.listSelections().slice();for(var rt=0;rt<Ye.length;rt++)Ye[rt]=b(Ye[rt]);ae.setSelections(Ye)}else Te=="both"?(ae.replaceSelection(ot+He,null),ae.triggerElectric(ot+He),ae.execCommand("goCharLeft")):Te=="addFour"&&(ae.replaceSelection(ot+ot+ot+ot,"before"),ae.execCommand("goCharRight"))})}function x(ae,oe){var ve=ae.getRange(Ce(oe.line,oe.ch-1),Ce(oe.line,oe.ch+1));return ve.length==2?ve:null}function re(ae,oe){var ve=ae.getTokenAt(Ce(oe.line,oe.ch+1));return/\bstring/.test(ve.type)&&ve.start==oe.ch&&(oe.ch==0||!/\bstring/.test(ae.getTokenTypeAt(oe)))}})},6313:function(qt,Dt,be){(function(ce){ce(be(89780),be(32855))})(function(ce){ce.defineOption("autoCloseTags",!1,function(ne,E,b){if(b!=ce.Init&&b&&ne.removeKeyMap("autoCloseTags"),!!E){var z={name:"autoCloseTags"};(typeof E!="object"||E.whenClosing!==!1)&&(z["'/'"]=function(x){return te(x)}),(typeof E!="object"||E.whenOpening!==!1)&&(z["'>'"]=function(x){return ue(x)}),ne.addKeyMap(z)}});var ie=["area","base","br","col","command","embed","hr","img","input","keygen","link","meta","param","source","track","wbr"],Ce=["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 ue(ne){if(ne.getOption("disableInput"))return ce.Pass;for(var E=ne.listSelections(),b=[],z=ne.getOption("autoCloseTags"),x=0;x<E.length;x++){if(!E[x].empty())return ce.Pass;var re=E[x].head,ae=ne.getTokenAt(re),oe=ce.innerMode(ne.getMode(),ae.state),ve=oe.state,ye=oe.mode.xmlCurrentTag&&oe.mode.xmlCurrentTag(ve),me=ye&&ye.name;if(!me)return ce.Pass;var ge=oe.mode.configuration=="html",_e=typeof z=="object"&&z.dontCloseTags||ge&&ie,he=typeof z=="object"&&z.indentTags||ge&&Ce;ae.end>re.ch&&(me=me.slice(0,me.length-ae.end+re.ch));var pe=me.toLowerCase();if(!me||ae.type=="string"&&(ae.end!=re.ch||!/[\"\']/.test(ae.string.charAt(ae.string.length-1))||ae.string.length==1)||ae.type=="tag"&&ye.close||ae.string.indexOf("/")==re.ch-ae.start-1||_e&&le(_e,pe)>-1||ee(ne,oe.mode.xmlCurrentContext&&oe.mode.xmlCurrentContext(ve)||[],me,re,!0))return ce.Pass;var ke=typeof z=="object"&&z.emptyTags;if(ke&&le(ke,me)>-1){b[x]={text:"/>",newPos:ce.Pos(re.line,re.ch+2)};continue}var Te=he&&le(he,pe)>-1;b[x]={indent:Te,text:">"+(Te?`
|
|
|
|
|
|
`:"")+"</"+me+">",newPos:Te?ce.Pos(re.line+1,0):ce.Pos(re.line,re.ch+1)}}for(var Ee=typeof z=="object"&&z.dontIndentOnAutoClose,x=E.length-1;x>=0;x--){var Oe=b[x];ne.replaceRange(Oe.text,E[x].head,E[x].anchor,"+insert");var je=ne.listSelections().slice(0);je[x]={head:Oe.newPos,anchor:Oe.newPos},ne.setSelections(je),!Ee&&Oe.indent&&(ne.indentLine(Oe.newPos.line,null,!0),ne.indentLine(Oe.newPos.line+1,null,!0))}}function se(ne,E){for(var b=ne.listSelections(),z=[],x=E?"/":"</",re=ne.getOption("autoCloseTags"),ae=typeof re=="object"&&re.dontIndentOnSlash,oe=0;oe<b.length;oe++){if(!b[oe].empty())return ce.Pass;var ve=b[oe].head,ye=ne.getTokenAt(ve),me=ce.innerMode(ne.getMode(),ye.state),ge=me.state;if(E&&(ye.type=="string"||ye.string.charAt(0)!="<"||ye.start!=ve.ch-1))return ce.Pass;var _e,he=me.mode.name!="xml"&&ne.getMode().name=="htmlmixed";if(he&&me.mode.name=="javascript")_e=x+"script";else if(he&&me.mode.name=="css")_e=x+"style";else{var pe=me.mode.xmlCurrentContext&&me.mode.xmlCurrentContext(ge);if(!pe||pe.length&&ee(ne,pe,pe[pe.length-1],ve))return ce.Pass;_e=x+pe[pe.length-1]}ne.getLine(ve.line).charAt(ye.end)!=">"&&(_e+=">"),z[oe]=_e}if(ne.replaceSelections(z),b=ne.listSelections(),!ae)for(var oe=0;oe<b.length;oe++)(oe==b.length-1||b[oe].head.line<b[oe+1].head.line)&&ne.indentLine(b[oe].head.line)}function te(ne){return ne.getOption("disableInput")?ce.Pass:se(ne,!0)}ce.commands.closeTag=function(ne){return se(ne)};function le(ne,E){if(ne.indexOf)return ne.indexOf(E);for(var b=0,z=ne.length;b<z;++b)if(ne[b]==E)return b;return-1}function ee(ne,E,b,z,x){if(!ce.scanForClosingTag)return!1;var re=Math.min(ne.lastLine()+1,z.line+500),ae=ce.scanForClosingTag(ne,z,null,re);if(!ae||ae.tag!=b)return!1;for(var oe=x?1:0,ve=E.length-1;ve>=0&&E[ve]==b;ve--)++oe;z=ae.to;for(var ve=1;ve<oe;ve++){var ye=ce.scanForClosingTag(ne,z,null,re);if(!ye||ye.tag!=b)return!1;z=ye.to}return!0}})},32855:function(qt,Dt,be){(function(ce){ce(be(89780))})(function(ce){"use strict";var ie=ce.Pos;function Ce(ve,ye){return ve.line-ye.line||ve.ch-ye.ch}var ue="A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",se=ue+"-:.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040",te=new RegExp("<(/?)(["+ue+"]["+se+"]*)","g");function le(ve,ye,me,ge){this.line=ye,this.ch=me,this.cm=ve,this.text=ve.getLine(ye),this.min=ge?Math.max(ge.from,ve.firstLine()):ve.firstLine(),this.max=ge?Math.min(ge.to-1,ve.lastLine()):ve.lastLine()}function ee(ve,ye){var me=ve.cm.getTokenTypeAt(ie(ve.line,ye));return me&&/\btag\b/.test(me)}function ne(ve){if(!(ve.line>=ve.max))return ve.ch=0,ve.text=ve.cm.getLine(++ve.line),!0}function E(ve){if(!(ve.line<=ve.min))return ve.text=ve.cm.getLine(--ve.line),ve.ch=ve.text.length,!0}function b(ve){for(;;){var ye=ve.text.indexOf(">",ve.ch);if(ye==-1){if(ne(ve))continue;return}if(!ee(ve,ye+1)){ve.ch=ye+1;continue}var me=ve.text.lastIndexOf("/",ye),ge=me>-1&&!/\S/.test(ve.text.slice(me+1,ye));return ve.ch=ye+1,ge?"selfClose":"regular"}}function z(ve){for(;;){var ye=ve.ch?ve.text.lastIndexOf("<",ve.ch-1):-1;if(ye==-1){if(E(ve))continue;return}if(!ee(ve,ye+1)){ve.ch=ye;continue}te.lastIndex=ye,ve.ch=ye;var me=te.exec(ve.text);if(me&&me.index==ye)return me}}function x(ve){for(;;){te.lastIndex=ve.ch;var ye=te.exec(ve.text);if(!ye){if(ne(ve))continue;return}if(!ee(ve,ye.index+1)){ve.ch=ye.index+1;continue}return ve.ch=ye.index+ye[0].length,ye}}function re(ve){for(;;){var ye=ve.ch?ve.text.lastIndexOf(">",ve.ch-1):-1;if(ye==-1){if(E(ve))continue;return}if(!ee(ve,ye+1)){ve.ch=ye;continue}var me=ve.text.lastIndexOf("/",ye),ge=me>-1&&!/\S/.test(ve.text.slice(me+1,ye));return ve.ch=ye+1,ge?"selfClose":"regular"}}function ae(ve,ye){for(var me=[];;){var ge=x(ve),_e,he=ve.line,pe=ve.ch-(ge?ge[0].length:0);if(!ge||!(_e=b(ve)))return;if(_e!="selfClose")if(ge[1]){for(var ke=me.length-1;ke>=0;--ke)if(me[ke]==ge[2]){me.length=ke;break}if(ke<0&&(!ye||ye==ge[2]))return{tag:ge[2],from:ie(he,pe),to:ie(ve.line,ve.ch)}}else me.push(ge[2])}}function oe(ve,ye){for(var me=[];;){var ge=re(ve);if(!ge)return;if(ge=="selfClose"){z(ve);continue}var _e=ve.line,he=ve.ch,pe=z(ve);if(!pe)return;if(pe[1])me.push(pe[2]);else{for(var ke=me.length-1;ke>=0;--ke)if(me[ke]==pe[2]){me.length=ke;break}if(ke<0&&(!ye||ye==pe[2]))return{tag:pe[2],from:ie(ve.line,ve.ch),to:ie(_e,he)}}}}ce.registerHelper("fold","xml",function(ve,ye){for(var me=new le(ve,ye.line,0);;){var ge=x(me);if(!ge||me.line!=ye.line)return;var _e=b(me);if(!_e)return;if(!ge[1]&&_e!="selfClose"){var he=ie(me.line,me.ch),pe=ae(me,ge[2]);return pe&&Ce(pe.from,he)>0?{from:he,to:pe.from}:null}}}),ce.findMatchingTag=function(ve,ye,me){var ge=new le(ve,ye.line,ye.ch,me);if(!(ge.text.indexOf(">")==-1&&ge.text.indexOf("<")==-1)){var _e=b(ge),he=_e&&ie(ge.line,ge.ch),pe=_e&&z(ge);if(!(!_e||!pe||Ce(ge,ye)>0)){var ke={from:ie(ge.line,ge.ch),to:he,tag:pe[2]};return _e=="selfClose"?{open:ke,close:null,at:"open"}:pe[1]?{open:oe(ge,pe[2]),close:ke,at:"close"}:(ge=new le(ve,he.line,he.ch,me),{open:ke,close:ae(ge,pe[2]),at:"open"})}}},ce.findEnclosingTag=function(ve,ye,me,ge){for(var _e=new le(ve,ye.line,ye.ch,me);;){var he=oe(_e,ge);if(!he)break;var pe=new le(ve,ye.line,ye.ch,me),ke=ae(pe,he.tag);if(ke)return{open:he,close:ke}}},ce.scanForClosingTag=function(ve,ye,me,ge){var _e=new le(ve,ye.line,ye.ch,ge?{from:0,to:ge}:null);return ae(_e,me)}})},89780:function(qt){(function(Dt,be){qt.exports=be()})(this,function(){"use strict";var Dt=navigator.userAgent,be=navigator.platform,ce=/gecko\/\d/i.test(Dt),ie=/MSIE \d/.test(Dt),Ce=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Dt),ue=/Edge\/(\d+)/.exec(Dt),se=ie||Ce||ue,te=se&&(ie?document.documentMode||6:+(ue||Ce)[1]),le=!ue&&/WebKit\//.test(Dt),ee=le&&/Qt\/\d+\.\d+/.test(Dt),ne=!ue&&/Chrome\//.test(Dt),E=/Opera\//.test(Dt),b=/Apple Computer/.test(navigator.vendor),z=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(Dt),x=/PhantomJS/.test(Dt),re=!ue&&/AppleWebKit/.test(Dt)&&/Mobile\/\w+/.test(Dt),ae=/Android/.test(Dt),oe=re||ae||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(Dt),ve=re||/Mac/.test(be),ye=/\bCrOS\b/.test(Dt),me=/win/i.test(be),ge=E&&Dt.match(/Version\/(\d*\.\d*)/);ge&&(ge=Number(ge[1])),ge&&ge>=15&&(E=!1,le=!0);var _e=ve&&(ee||E&&(ge==null||ge<12.11)),he=ce||se&&te>=9;function pe(a){return new RegExp("(^|\\s)"+a+"(?:$|\\s)\\s*")}var ke=function(a,y){var fe=a.className,de=pe(y).exec(fe);if(de){var xe=fe.slice(de.index+de[0].length);a.className=fe.slice(0,de.index)+(xe?de[1]+xe:"")}};function Te(a){for(var y=a.childNodes.length;y>0;--y)a.removeChild(a.firstChild);return a}function Ee(a,y){return Te(a).appendChild(y)}function Oe(a,y,fe,de){var xe=document.createElement(a);if(fe&&(xe.className=fe),de&&(xe.style.cssText=de),typeof y=="string")xe.appendChild(document.createTextNode(y));else if(y)for(var Fe=0;Fe<y.length;++Fe)xe.appendChild(y[Fe]);return xe}function je(a,y,fe,de){var xe=Oe(a,y,fe,de);return xe.setAttribute("role","presentation"),xe}var Pe;document.createRange?Pe=function(a,y,fe,de){var xe=document.createRange();return xe.setEnd(de||a,fe),xe.setStart(a,y),xe}:Pe=function(a,y,fe){var de=document.body.createTextRange();try{de.moveToElementText(a.parentNode)}catch(xe){return de}return de.collapse(!0),de.moveEnd("character",fe),de.moveStart("character",y),de};function Qe(a,y){if(y.nodeType==3&&(y=y.parentNode),a.contains)return a.contains(y);do if(y.nodeType==11&&(y=y.host),y==a)return!0;while(y=y.parentNode)}function Xe(){var a;try{a=document.activeElement}catch(y){a=document.body||null}for(;a&&a.shadowRoot&&a.shadowRoot.activeElement;)a=a.shadowRoot.activeElement;return a}function ot(a,y){var fe=a.className;pe(y).test(fe)||(a.className+=(fe?" ":"")+y)}function He(a,y){for(var fe=a.split(" "),de=0;de<fe.length;de++)fe[de]&&!pe(fe[de]).test(y)&&(y+=" "+fe[de]);return y}var rt=function(a){a.select()};re?rt=function(a){a.selectionStart=0,a.selectionEnd=a.value.length}:se&&(rt=function(a){try{a.select()}catch(y){}});function Ye(a){var y=Array.prototype.slice.call(arguments,1);return function(){return a.apply(null,y)}}function ut(a,y,fe){y||(y={});for(var de in a)a.hasOwnProperty(de)&&(fe!==!1||!y.hasOwnProperty(de))&&(y[de]=a[de]);return y}function Ge(a,y,fe,de,xe){y==null&&(y=a.search(/[^\s\u00a0]/),y==-1&&(y=a.length));for(var Fe=de||0,Je=xe||0;;){var it=a.indexOf(" ",Fe);if(it<0||it>=y)return Je+(y-Fe);Je+=it-Fe,Je+=fe-Je%fe,Fe=it+1}}var ze=function(){this.id=null,this.f=null,this.time=0,this.handler=Ye(this.onTimeout,this)};ze.prototype.onTimeout=function(a){a.id=0,a.time<=+new Date?a.f():setTimeout(a.handler,a.time-+new Date)},ze.prototype.set=function(a,y){this.f=y;var fe=+new Date+a;(!this.id||fe<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,a),this.time=fe)};function Ve(a,y){for(var fe=0;fe<a.length;++fe)if(a[fe]==y)return fe;return-1}var $e=50,nt={toString:function(){return"CodeMirror.Pass"}},et={scroll:!1},pt={origin:"*mouse"},ct={origin:"+move"};function It(a,y,fe){for(var de=0,xe=0;;){var Fe=a.indexOf(" ",de);Fe==-1&&(Fe=a.length);var Je=Fe-de;if(Fe==a.length||xe+Je>=y)return de+Math.min(Je,y-xe);if(xe+=Fe-de,xe+=fe-xe%fe,de=Fe+1,xe>=y)return de}}var dt=[""];function Mt(a){for(;dt.length<=a;)dt.push(xt(dt)+" ");return dt[a]}function xt(a){return a[a.length-1]}function gt(a,y){for(var fe=[],de=0;de<a.length;de++)fe[de]=y(a[de],de);return fe}function _t(a,y,fe){for(var de=0,xe=fe(y);de<a.length&&fe(a[de])<=xe;)de++;a.splice(de,0,y)}function We(){}function Ae(a,y){var fe;return Object.create?fe=Object.create(a):(We.prototype=a,fe=new We),y&&ut(y,fe),fe}var Se=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function Be(a){return/\w/.test(a)||a>"\x80"&&(a.toUpperCase()!=a.toLowerCase()||Se.test(a))}function Ke(a,y){return y?y.source.indexOf("\\w")>-1&&Be(a)?!0:y.test(a):Be(a)}function Ne(a){for(var y in a)if(a.hasOwnProperty(y)&&a[y])return!1;return!0}var De=/[\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 we(a){return a.charCodeAt(0)>=768&&De.test(a)}function Le(a,y,fe){for(;(fe<0?y>0:y<a.length)&&we(a.charAt(y));)y+=fe;return y}function Ue(a,y,fe){for(var de=y>fe?-1:1;;){if(y==fe)return y;var xe=(y+fe)/2,Fe=de<0?Math.ceil(xe):Math.floor(xe);if(Fe==y)return a(Fe)?y:fe;a(Fe)?fe=Fe:y=Fe+de}}function Me(a,y,fe,de){if(!a)return de(y,fe,"ltr",0);for(var xe=!1,Fe=0;Fe<a.length;++Fe){var Je=a[Fe];(Je.from<fe&&Je.to>y||y==fe&&Je.to==y)&&(de(Math.max(Je.from,y),Math.min(Je.to,fe),Je.level==1?"rtl":"ltr",Fe),xe=!0)}xe||de(y,fe,"ltr")}var Re=null;function tt(a,y,fe){var de;Re=null;for(var xe=0;xe<a.length;++xe){var Fe=a[xe];if(Fe.from<y&&Fe.to>y)return xe;Fe.to==y&&(Fe.from!=Fe.to&&fe=="before"?de=xe:Re=xe),Fe.from==y&&(Fe.from!=Fe.to&&fe!="before"?de=xe:Re=xe)}return de!=null?de:Re}var lt=function(){var a="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",y="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111";function fe(ht){return ht<=247?a.charAt(ht):1424<=ht&&ht<=1524?"R":1536<=ht&&ht<=1785?y.charAt(ht-1536):1774<=ht&&ht<=2220?"r":8192<=ht&&ht<=8203?"w":ht==8204?"b":"L"}var de=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,xe=/[stwN]/,Fe=/[LRr]/,Je=/[Lb1n]/,it=/[1n]/;function at(ht,Rt,jt){this.level=ht,this.from=Rt,this.to=jt}return function(ht,Rt){var jt=Rt=="ltr"?"L":"R";if(ht.length==0||Rt=="ltr"&&!de.test(ht))return!1;for(var on=ht.length,en=[],Tn=0;Tn<on;++Tn)en.push(fe(ht.charCodeAt(Tn)));for(var Zn=0,Qn=jt;Zn<on;++Zn){var sr=en[Zn];sr=="m"?en[Zn]=Qn:Qn=sr}for(var vr=0,lr=jt;vr<on;++vr){var Er=en[vr];Er=="1"&&lr=="r"?en[vr]="n":Fe.test(Er)&&(lr=Er,Er=="r"&&(en[vr]="R"))}for(var ei=1,Kr=en[0];ei<on-1;++ei){var ki=en[ei];ki=="+"&&Kr=="1"&&en[ei+1]=="1"?en[ei]="1":ki==","&&Kr==en[ei+1]&&(Kr=="1"||Kr=="n")&&(en[ei]=Kr),Kr=ki}for(var eo=0;eo<on;++eo){var Mo=en[eo];if(Mo==",")en[eo]="N";else if(Mo=="%"){var ho=void 0;for(ho=eo+1;ho<on&&en[ho]=="%";++ho);for(var sa=eo&&en[eo-1]=="!"||ho<on&&en[ho]=="1"?"1":"N",$o=eo;$o<ho;++$o)en[$o]=sa;eo=ho-1}}for(var wo=0,ea=jt;wo<on;++wo){var Bo=en[wo];ea=="L"&&Bo=="1"?en[wo]="L":Fe.test(Bo)&&(ea=Bo)}for(var Lo=0;Lo<on;++Lo)if(xe.test(en[Lo])){var xo=void 0;for(xo=Lo+1;xo<on&&xe.test(en[xo]);++xo);for(var go=(Lo?en[Lo-1]:jt)=="L",ta=(xo<on?en[xo]:jt)=="L",Is=go==ta?go?"L":"R":jt,us=Lo;us<xo;++us)en[us]=Is;Lo=xo-1}for(var zo=[],Ua,Ro=0;Ro<on;)if(Je.test(en[Ro])){var xl=Ro;for(++Ro;Ro<on&&Je.test(en[Ro]);++Ro);zo.push(new at(0,xl,Ro))}else{var Xa=Ro,gs=zo.length,ys=Rt=="rtl"?1:0;for(++Ro;Ro<on&&en[Ro]!="L";++Ro);for(var Vo=Xa;Vo<Ro;)if(it.test(en[Vo])){Xa<Vo&&(zo.splice(gs,0,new at(1,Xa,Vo)),gs+=ys);var Os=Vo;for(++Vo;Vo<Ro&&it.test(en[Vo]);++Vo);zo.splice(gs,0,new at(2,Os,Vo)),gs+=ys,Xa=Vo}else++Vo;Xa<Ro&&zo.splice(gs,0,new at(1,Xa,Ro))}return Rt=="ltr"&&(zo[0].level==1&&(Ua=ht.match(/^\s+/))&&(zo[0].from=Ua[0].length,zo.unshift(new at(0,0,Ua[0].length))),xt(zo).level==1&&(Ua=ht.match(/\s+$/))&&(xt(zo).to-=Ua[0].length,zo.push(new at(0,on-Ua[0].length,on)))),Rt=="rtl"?zo.reverse():zo}}();function Pt(a,y){var fe=a.order;return fe==null&&(fe=a.order=lt(a.text,y)),fe}var Ct=[],vt=function(a,y,fe){if(a.addEventListener)a.addEventListener(y,fe,!1);else if(a.attachEvent)a.attachEvent("on"+y,fe);else{var de=a._handlers||(a._handlers={});de[y]=(de[y]||Ct).concat(fe)}};function Ot(a,y){return a._handlers&&a._handlers[y]||Ct}function zt(a,y,fe){if(a.removeEventListener)a.removeEventListener(y,fe,!1);else if(a.detachEvent)a.detachEvent("on"+y,fe);else{var de=a._handlers,xe=de&&de[y];if(xe){var Fe=Ve(xe,fe);Fe>-1&&(de[y]=xe.slice(0,Fe).concat(xe.slice(Fe+1)))}}}function Ft(a,y){var fe=Ot(a,y);if(fe.length)for(var de=Array.prototype.slice.call(arguments,2),xe=0;xe<fe.length;++xe)fe[xe].apply(null,de)}function yt(a,y,fe){return typeof y=="string"&&(y={type:y,preventDefault:function(){this.defaultPrevented=!0}}),Ft(a,fe||y.type,a,y),Yt(y)||y.codemirrorIgnore}function Xt(a){var y=a._handlers&&a._handlers.cursorActivity;if(y)for(var fe=a.curOp.cursorActivityHandlers||(a.curOp.cursorActivityHandlers=[]),de=0;de<y.length;++de)Ve(fe,y[de])==-1&&fe.push(y[de])}function Lt(a,y){return Ot(a,y).length>0}function Kt(a){a.prototype.on=function(y,fe){vt(this,y,fe)},a.prototype.off=function(y,fe){zt(this,y,fe)}}function sn(a){a.preventDefault?a.preventDefault():a.returnValue=!1}function Sn(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0}function Yt(a){return a.defaultPrevented!=null?a.defaultPrevented:a.returnValue==!1}function In(a){sn(a),Sn(a)}function Kn(a){return a.target||a.srcElement}function Gn(a){var y=a.which;return y==null&&(a.button&1?y=1:a.button&2?y=3:a.button&4&&(y=2)),ve&&a.ctrlKey&&y==1&&(y=3),y}var nr=function(){if(se&&te<9)return!1;var a=Oe("div");return"draggable"in a||"dragDrop"in a}(),hr;function ur(a){if(hr==null){var y=Oe("span","\u200B");Ee(a,Oe("span",[y,document.createTextNode("x")])),a.firstChild.offsetHeight!=0&&(hr=y.offsetWidth<=1&&y.offsetHeight>2&&!(se&&te<8))}var fe=hr?Oe("span","\u200B"):Oe("span","\xA0",null,"display: inline-block; width: 1px; margin-right: -1px");return fe.setAttribute("cm-text",""),fe}var Un;function Fn(a){if(Un!=null)return Un;var y=Ee(a,document.createTextNode("A\u062EA")),fe=Pe(y,0,1).getBoundingClientRect(),de=Pe(y,1,2).getBoundingClientRect();return Te(a),!fe||fe.left==fe.right?!1:Un=de.right-fe.right<3}var or=`
|
|
|
|
|
|
b`.split(/\n/).length!=3?function(a){for(var y=0,fe=[],de=a.length;y<=de;){var xe=a.indexOf(`
|
|
|
`,y);xe==-1&&(xe=a.length);var Fe=a.slice(y,a.charAt(xe-1)=="\r"?xe-1:xe),Je=Fe.indexOf("\r");Je!=-1?(fe.push(Fe.slice(0,Je)),y+=Je+1):(fe.push(Fe),y=xe+1)}return fe}:function(a){return a.split(/\r\n?|\n/)},Vn=window.getSelection?function(a){try{return a.selectionStart!=a.selectionEnd}catch(y){return!1}}:function(a){var y;try{y=a.ownerDocument.selection.createRange()}catch(fe){}return!y||y.parentElement()!=a?!1:y.compareEndPoints("StartToEnd",y)!=0},Bn=function(){var a=Oe("div");return"oncopy"in a?!0:(a.setAttribute("oncopy","return;"),typeof a.oncopy=="function")}(),_n=null;function zn(a){if(_n!=null)return _n;var y=Ee(a,Oe("span","x")),fe=y.getBoundingClientRect(),de=Pe(y,0,1).getBoundingClientRect();return _n=Math.abs(fe.left-de.left)>1}var cr={},Dn={};function Cn(a,y){arguments.length>2&&(y.dependencies=Array.prototype.slice.call(arguments,2)),cr[a]=y}function er(a,y){Dn[a]=y}function $t(a){if(typeof a=="string"&&Dn.hasOwnProperty(a))a=Dn[a];else if(a&&typeof a.name=="string"&&Dn.hasOwnProperty(a.name)){var y=Dn[a.name];typeof y=="string"&&(y={name:y}),a=Ae(y,a),a.name=y.name}else{if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+xml$/.test(a))return $t("application/xml");if(typeof a=="string"&&/^[\w\-]+\/[\w\-]+\+json$/.test(a))return $t("application/json")}return typeof a=="string"?{name:a}:a||{name:"null"}}function Ie(a,y){y=$t(y);var fe=cr[y.name];if(!fe)return Ie(a,"text/plain");var de=fe(a,y);if(Ze.hasOwnProperty(y.name)){var xe=Ze[y.name];for(var Fe in xe)xe.hasOwnProperty(Fe)&&(de.hasOwnProperty(Fe)&&(de["_"+Fe]=de[Fe]),de[Fe]=xe[Fe])}if(de.name=y.name,y.helperType&&(de.helperType=y.helperType),y.modeProps)for(var Je in y.modeProps)de[Je]=y.modeProps[Je];return de}var Ze={};function qe(a,y){var fe=Ze.hasOwnProperty(a)?Ze[a]:Ze[a]={};ut(y,fe)}function st(a,y){if(y===!0)return y;if(a.copyState)return a.copyState(y);var fe={};for(var de in y){var xe=y[de];xe instanceof Array&&(xe=xe.concat([])),fe[de]=xe}return fe}function mt(a,y){for(var fe;a.innerMode&&(fe=a.innerMode(y),!(!fe||fe.mode==a));)y=fe.state,a=fe.mode;return fe||{mode:a,state:y}}function Nt(a,y,fe){return a.startState?a.startState(y,fe):!0}var kt=function(a,y,fe){this.pos=this.start=0,this.string=a,this.tabSize=y||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=fe};kt.prototype.eol=function(){return this.pos>=this.string.length},kt.prototype.sol=function(){return this.pos==this.lineStart},kt.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},kt.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},kt.prototype.eat=function(a){var y=this.string.charAt(this.pos),fe;if(typeof a=="string"?fe=y==a:fe=y&&(a.test?a.test(y):a(y)),fe)return++this.pos,y},kt.prototype.eatWhile=function(a){for(var y=this.pos;this.eat(a););return this.pos>y},kt.prototype.eatSpace=function(){for(var a=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>a},kt.prototype.skipToEnd=function(){this.pos=this.string.length},kt.prototype.skipTo=function(a){var y=this.string.indexOf(a,this.pos);if(y>-1)return this.pos=y,!0},kt.prototype.backUp=function(a){this.pos-=a},kt.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=Ge(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?Ge(this.string,this.lineStart,this.tabSize):0)},kt.prototype.indentation=function(){return Ge(this.string,null,this.tabSize)-(this.lineStart?Ge(this.string,this.lineStart,this.tabSize):0)},kt.prototype.match=function(a,y,fe){if(typeof a=="string"){var de=function(Je){return fe?Je.toLowerCase():Je},xe=this.string.substr(this.pos,a.length);if(de(xe)==de(a))return y!==!1&&(this.pos+=a.length),!0}else{var Fe=this.string.slice(this.pos).match(a);return Fe&&Fe.index>0?null:(Fe&&y!==!1&&(this.pos+=Fe[0].length),Fe)}},kt.prototype.current=function(){return this.string.slice(this.start,this.pos)},kt.prototype.hideFirstChars=function(a,y){this.lineStart+=a;try{return y()}finally{this.lineStart-=a}},kt.prototype.lookAhead=function(a){var y=this.lineOracle;return y&&y.lookAhead(a)},kt.prototype.baseToken=function(){var a=this.lineOracle;return a&&a.baseToken(this.pos)};function Bt(a,y){if(y-=a.first,y<0||y>=a.size)throw new Error("There is no line "+(y+a.first)+" in the document.");for(var fe=a;!fe.lines;)for(var de=0;;++de){var xe=fe.children[de],Fe=xe.chunkSize();if(y<Fe){fe=xe;break}y-=Fe}return fe.lines[y]}function Jt(a,y,fe){var de=[],xe=y.line;return a.iter(y.line,fe.line+1,function(Fe){var Je=Fe.text;xe==fe.line&&(Je=Je.slice(0,fe.ch)),xe==y.line&&(Je=Je.slice(y.ch)),de.push(Je),++xe}),de}function En(a,y,fe){var de=[];return a.iter(y,fe,function(xe){de.push(xe.text)}),de}function qn(a,y){var fe=y-a.height;if(fe)for(var de=a;de;de=de.parent)de.height+=fe}function At(a){if(a.parent==null)return null;for(var y=a.parent,fe=Ve(y.lines,a),de=y.parent;de;y=de,de=de.parent)for(var xe=0;de.children[xe]!=y;++xe)fe+=de.children[xe].chunkSize();return fe+y.first}function St(a,y){var fe=a.first;e:do{for(var de=0;de<a.children.length;++de){var xe=a.children[de],Fe=xe.height;if(y<Fe){a=xe;continue e}y-=Fe,fe+=xe.chunkSize()}return fe}while(!a.lines);for(var Je=0;Je<a.lines.length;++Je){var it=a.lines[Je],at=it.height;if(y<at)break;y-=at}return fe+Je}function an(a,y){return y>=a.first&&y<a.first+a.size}function Ht(a,y){return String(a.lineNumberFormatter(y+a.firstLineNumber))}function Et(a,y,fe){if(fe===void 0&&(fe=null),!(this instanceof Et))return new Et(a,y,fe);this.line=a,this.ch=y,this.sticky=fe}function Ut(a,y){return a.line-y.line||a.ch-y.ch}function nn(a,y){return a.sticky==y.sticky&&Ut(a,y)==0}function rn(a){return Et(a.line,a.ch)}function gn(a,y){return Ut(a,y)<0?y:a}function bn(a,y){return Ut(a,y)<0?a:y}function An(a,y){return Math.max(a.first,Math.min(y,a.first+a.size-1))}function Gt(a,y){if(y.line<a.first)return Et(a.first,0);var fe=a.first+a.size-1;return y.line>fe?Et(fe,Bt(a,fe).text.length):Vt(y,Bt(a,y.line).text.length)}function Vt(a,y){var fe=a.ch;return fe==null||fe>y?Et(a.line,y):fe<0?Et(a.line,0):a}function wn(a,y){for(var fe=[],de=0;de<y.length;de++)fe[de]=Gt(a,y[de]);return fe}var jn=function(a,y){this.state=a,this.lookAhead=y},Wn=function(a,y,fe,de){this.state=y,this.doc=a,this.line=fe,this.maxLookAhead=de||0,this.baseTokens=null,this.baseTokenPos=1};Wn.prototype.lookAhead=function(a){var y=this.doc.getLine(this.line+a);return y!=null&&a>this.maxLookAhead&&(this.maxLookAhead=a),y},Wn.prototype.baseToken=function(a){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=a;)this.baseTokenPos+=2;var y=this.baseTokens[this.baseTokenPos+1];return{type:y&&y.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-a}},Wn.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},Wn.fromSaved=function(a,y,fe){return y instanceof jn?new Wn(a,st(a.mode,y.state),fe,y.lookAhead):new Wn(a,st(a.mode,y),fe)},Wn.prototype.save=function(a){var y=a!==!1?st(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new jn(y,this.maxLookAhead):y};function $n(a,y,fe,de){var xe=[a.state.modeGen],Fe={};Qr(a,y.text,a.doc.mode,fe,function(ht,Rt){return xe.push(ht,Rt)},Fe,de);for(var Je=fe.state,it=function(ht){fe.baseTokens=xe;var Rt=a.state.overlays[ht],jt=1,on=0;fe.state=!0,Qr(a,y.text,Rt.mode,fe,function(en,Tn){for(var Zn=jt;on<en;){var Qn=xe[jt];Qn>en&&xe.splice(jt,1,en,xe[jt+1],Qn),jt+=2,on=Math.min(en,Qn)}if(Tn)if(Rt.opaque)xe.splice(Zn,jt-Zn,en,"overlay "+Tn),jt=Zn+2;else for(;Zn<jt;Zn+=2){var sr=xe[Zn+1];xe[Zn+1]=(sr?sr+" ":"")+"overlay "+Tn}},Fe),fe.state=Je,fe.baseTokens=null,fe.baseTokenPos=1},at=0;at<a.state.overlays.length;++at)it(at);return{styles:xe,classes:Fe.bgClass||Fe.textClass?Fe:null}}function kr(a,y,fe){if(!y.styles||y.styles[0]!=a.state.modeGen){var de=Sr(a,At(y)),xe=y.text.length>a.options.maxHighlightLength&&st(a.doc.mode,de.state),Fe=$n(a,y,de);xe&&(de.state=xe),y.stateAfter=de.save(!xe),y.styles=Fe.styles,Fe.classes?y.styleClasses=Fe.classes:y.styleClasses&&(y.styleClasses=null),fe===a.doc.highlightFrontier&&(a.doc.modeFrontier=Math.max(a.doc.modeFrontier,++a.doc.highlightFrontier))}return y.styles}function Sr(a,y,fe){var de=a.doc,xe=a.display;if(!de.mode.startState)return new Wn(de,!0,y);var Fe=pi(a,y,fe),Je=Fe>de.first&&Bt(de,Fe-1).stateAfter,it=Je?Wn.fromSaved(de,Je,Fe):new Wn(de,Nt(de.mode),Fe);return de.iter(Fe,y,function(at){Yr(a,at.text,it);var ht=it.line;at.stateAfter=ht==y-1||ht%5==0||ht>=xe.viewFrom&&ht<xe.viewTo?it.save():null,it.nextLine()}),fe&&(de.modeFrontier=it.line),it}function Yr(a,y,fe,de){var xe=a.doc.mode,Fe=new kt(y,a.options.tabSize,fe);for(Fe.start=Fe.pos=de||0,y==""&&_r(xe,fe.state);!Fe.eol();)Ur(xe,Fe,fe.state),Fe.start=Fe.pos}function _r(a,y){if(a.blankLine)return a.blankLine(y);if(a.innerMode){var fe=mt(a,y);if(fe.mode.blankLine)return fe.mode.blankLine(fe.state)}}function Ur(a,y,fe,de){for(var xe=0;xe<10;xe++){de&&(de[0]=mt(a,fe).mode);var Fe=a.token(y,fe);if(y.pos>y.start)return Fe}throw new Error("Mode "+a.name+" failed to advance stream.")}var wr=function(a,y,fe){this.start=a.start,this.end=a.pos,this.string=a.current(),this.type=y||null,this.state=fe};function Dr(a,y,fe,de){var xe=a.doc,Fe=xe.mode,Je;y=Gt(xe,y);var it=Bt(xe,y.line),at=Sr(a,y.line,fe),ht=new kt(it.text,a.options.tabSize,at),Rt;for(de&&(Rt=[]);(de||ht.pos<y.ch)&&!ht.eol();)ht.start=ht.pos,Je=Ur(Fe,ht,at.state),de&&Rt.push(new wr(ht,Je,st(xe.mode,at.state)));return de?Rt:new wr(ht,Je,at.state)}function Hr(a,y){if(a)for(;;){var fe=a.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!fe)break;a=a.slice(0,fe.index)+a.slice(fe.index+fe[0].length);var de=fe[1]?"bgClass":"textClass";y[de]==null?y[de]=fe[2]:new RegExp("(?:^|\\s)"+fe[2]+"(?:$|\\s)").test(y[de])||(y[de]+=" "+fe[2])}return a}function Qr(a,y,fe,de,xe,Fe,Je){var it=fe.flattenSpans;it==null&&(it=a.options.flattenSpans);var at=0,ht=null,Rt=new kt(y,a.options.tabSize,de),jt,on=a.options.addModeClass&&[null];for(y==""&&Hr(_r(fe,de.state),Fe);!Rt.eol();){if(Rt.pos>a.options.maxHighlightLength?(it=!1,Je&&Yr(a,y,de,Rt.pos),Rt.pos=y.length,jt=null):jt=Hr(Ur(fe,Rt,de.state,on),Fe),on){var en=on[0].name;en&&(jt="m-"+(jt?en+" "+jt:en))}if(!it||ht!=jt){for(;at<Rt.start;)at=Math.min(Rt.start,at+5e3),xe(at,ht);ht=jt}Rt.start=Rt.pos}for(;at<Rt.pos;){var Tn=Math.min(Rt.pos,at+5e3);xe(Tn,ht),at=Tn}}function pi(a,y,fe){for(var de,xe,Fe=a.doc,Je=fe?-1:y-(a.doc.mode.innerMode?1e3:100),it=y;it>Je;--it){if(it<=Fe.first)return Fe.first;var at=Bt(Fe,it-1),ht=at.stateAfter;if(ht&&(!fe||it+(ht instanceof jn?ht.lookAhead:0)<=Fe.modeFrontier))return it;var Rt=Ge(at.text,null,a.options.tabSize);(xe==null||de>Rt)&&(xe=it-1,de=Rt)}return xe}function _i(a,y){if(a.modeFrontier=Math.min(a.modeFrontier,y),!(a.highlightFrontier<y-10)){for(var fe=a.first,de=y-1;de>fe;de--){var xe=Bt(a,de).stateAfter;if(xe&&(!(xe instanceof jn)||de+xe.lookAhead<y)){fe=de+1;break}}a.highlightFrontier=Math.min(a.highlightFrontier,fe)}}var Si=!1,oi=!1;function Mi(){Si=!0}function Li(){oi=!0}function rr(a,y,fe){this.marker=a,this.from=y,this.to=fe}function Cr(a,y){if(a)for(var fe=0;fe<a.length;++fe){var de=a[fe];if(de.marker==y)return de}}function Ar(a,y){for(var fe,de=0;de<a.length;++de)a[de]!=y&&(fe||(fe=[])).push(a[de]);return fe}function $r(a,y){a.markedSpans=a.markedSpans?a.markedSpans.concat([y]):[y],y.marker.attachLine(a)}function qr(a,y,fe){var de;if(a)for(var xe=0;xe<a.length;++xe){var Fe=a[xe],Je=Fe.marker,it=Fe.from==null||(Je.inclusiveLeft?Fe.from<=y:Fe.from<y);if(it||Fe.from==y&&Je.type=="bookmark"&&(!fe||!Fe.marker.insertLeft)){var at=Fe.to==null||(Je.inclusiveRight?Fe.to>=y:Fe.to>y);(de||(de=[])).push(new rr(Je,Fe.from,at?null:Fe.to))}}return de}function wi(a,y,fe){var de;if(a)for(var xe=0;xe<a.length;++xe){var Fe=a[xe],Je=Fe.marker,it=Fe.to==null||(Je.inclusiveRight?Fe.to>=y:Fe.to>y);if(it||Fe.from==y&&Je.type=="bookmark"&&(!fe||Fe.marker.insertLeft)){var at=Fe.from==null||(Je.inclusiveLeft?Fe.from<=y:Fe.from<y);(de||(de=[])).push(new rr(Je,at?null:Fe.from-y,Fe.to==null?null:Fe.to-y))}}return de}function Hi(a,y){if(y.full)return null;var fe=an(a,y.from.line)&&Bt(a,y.from.line).markedSpans,de=an(a,y.to.line)&&Bt(a,y.to.line).markedSpans;if(!fe&&!de)return null;var xe=y.from.ch,Fe=y.to.ch,Je=Ut(y.from,y.to)==0,it=qr(fe,xe,Je),at=wi(de,Fe,Je),ht=y.text.length==1,Rt=xt(y.text).length+(ht?xe:0);if(it)for(var jt=0;jt<it.length;++jt){var on=it[jt];if(on.to==null){var en=Cr(at,on.marker);en?ht&&(on.to=en.to==null?null:en.to+Rt):on.to=xe}}if(at)for(var Tn=0;Tn<at.length;++Tn){var Zn=at[Tn];if(Zn.to!=null&&(Zn.to+=Rt),Zn.from==null){var Qn=Cr(it,Zn.marker);Qn||(Zn.from=Rt,ht&&(it||(it=[])).push(Zn))}else Zn.from+=Rt,ht&&(it||(it=[])).push(Zn)}it&&(it=Tt(it)),at&&at!=it&&(at=Tt(at));var sr=[it];if(!ht){var vr=y.text.length-2,lr;if(vr>0&&it)for(var Er=0;Er<it.length;++Er)it[Er].to==null&&(lr||(lr=[])).push(new rr(it[Er].marker,null,null));for(var ei=0;ei<vr;++ei)sr.push(lr);sr.push(at)}return sr}function Tt(a){for(var y=0;y<a.length;++y){var fe=a[y];fe.from!=null&&fe.from==fe.to&&fe.marker.clearWhenEmpty!==!1&&a.splice(y--,1)}return a.length?a:null}function tn(a,y,fe){var de=null;if(a.iter(y.line,fe.line+1,function(en){if(en.markedSpans)for(var Tn=0;Tn<en.markedSpans.length;++Tn){var Zn=en.markedSpans[Tn].marker;Zn.readOnly&&(!de||Ve(de,Zn)==-1)&&(de||(de=[])).push(Zn)}}),!de)return null;for(var xe=[{from:y,to:fe}],Fe=0;Fe<de.length;++Fe)for(var Je=de[Fe],it=Je.find(0),at=0;at<xe.length;++at){var ht=xe[at];if(!(Ut(ht.to,it.from)<0||Ut(ht.from,it.to)>0)){var Rt=[at,1],jt=Ut(ht.from,it.from),on=Ut(ht.to,it.to);(jt<0||!Je.inclusiveLeft&&!jt)&&Rt.push({from:ht.from,to:it.from}),(on>0||!Je.inclusiveRight&&!on)&&Rt.push({from:it.to,to:ht.to}),xe.splice.apply(xe,Rt),at+=Rt.length-3}}return xe}function Zt(a){var y=a.markedSpans;if(y){for(var fe=0;fe<y.length;++fe)y[fe].marker.detachLine(a);a.markedSpans=null}}function Qt(a,y){if(y){for(var fe=0;fe<y.length;++fe)y[fe].marker.attachLine(a);a.markedSpans=y}}function cn(a){return a.inclusiveLeft?-1:0}function hn(a){return a.inclusiveRight?1:0}function Nn(a,y){var fe=a.lines.length-y.lines.length;if(fe!=0)return fe;var de=a.find(),xe=y.find(),Fe=Ut(de.from,xe.from)||cn(a)-cn(y);if(Fe)return-Fe;var Je=Ut(de.to,xe.to)||hn(a)-hn(y);return Je||y.id-a.id}function kn(a,y){var fe=oi&&a.markedSpans,de;if(fe)for(var xe=void 0,Fe=0;Fe<fe.length;++Fe)xe=fe[Fe],xe.marker.collapsed&&(y?xe.from:xe.to)==null&&(!de||Nn(de,xe.marker)<0)&&(de=xe.marker);return de}function yn(a){return kn(a,!0)}function Wt(a){return kn(a,!1)}function ln(a,y){var fe=oi&&a.markedSpans,de;if(fe)for(var xe=0;xe<fe.length;++xe){var Fe=fe[xe];Fe.marker.collapsed&&(Fe.from==null||Fe.from<y)&&(Fe.to==null||Fe.to>y)&&(!de||Nn(de,Fe.marker)<0)&&(de=Fe.marker)}return de}function dn(a,y,fe,de,xe){var Fe=Bt(a,y),Je=oi&&Fe.markedSpans;if(Je)for(var it=0;it<Je.length;++it){var at=Je[it];if(at.marker.collapsed){var ht=at.marker.find(0),Rt=Ut(ht.from,fe)||cn(at.marker)-cn(xe),jt=Ut(ht.to,de)||hn(at.marker)-hn(xe);if(!(Rt>=0&&jt<=0||Rt<=0&&jt>=0)&&(Rt<=0&&(at.marker.inclusiveRight&&xe.inclusiveLeft?Ut(ht.to,fe)>=0:Ut(ht.to,fe)>0)||Rt>=0&&(at.marker.inclusiveRight&&xe.inclusiveLeft?Ut(ht.from,de)<=0:Ut(ht.from,de)<0)))return!0}}}function un(a){for(var y;y=yn(a);)a=y.find(-1,!0).line;return a}function mn(a){for(var y;y=Wt(a);)a=y.find(1,!0).line;return a}function Hn(a){for(var y,fe;y=Wt(a);)a=y.find(1,!0).line,(fe||(fe=[])).push(a);return fe}function vn(a,y){var fe=Bt(a,y),de=un(fe);return fe==de?y:At(de)}function fn(a,y){if(y>a.lastLine())return y;var fe=Bt(a,y),de;if(!Mn(a,fe))return y;for(;de=Wt(fe);)fe=de.find(1,!0).line;return At(fe)+1}function Mn(a,y){var fe=oi&&y.markedSpans;if(fe){for(var de=void 0,xe=0;xe<fe.length;++xe)if(de=fe[xe],!!de.marker.collapsed){if(de.from==null)return!0;if(!de.marker.widgetNode&&de.from==0&&de.marker.inclusiveLeft&&Rn(a,y,de))return!0}}}function Rn(a,y,fe){if(fe.to==null){var de=fe.marker.find(1,!0);return Rn(a,de.line,Cr(de.line.markedSpans,fe.marker))}if(fe.marker.inclusiveRight&&fe.to==y.text.length)return!0;for(var xe=void 0,Fe=0;Fe<y.markedSpans.length;++Fe)if(xe=y.markedSpans[Fe],xe.marker.collapsed&&!xe.marker.widgetNode&&xe.from==fe.to&&(xe.to==null||xe.to!=fe.from)&&(xe.marker.inclusiveLeft||fe.marker.inclusiveRight)&&Rn(a,y,xe))return!0}function Yn(a){a=un(a);for(var y=0,fe=a.parent,de=0;de<fe.lines.length;++de){var xe=fe.lines[de];if(xe==a)break;y+=xe.height}for(var Fe=fe.parent;Fe;fe=Fe,Fe=fe.parent)for(var Je=0;Je<Fe.children.length;++Je){var it=Fe.children[Je];if(it==fe)break;y+=it.height}return y}function fr(a){if(a.height==0)return 0;for(var y=a.text.length,fe,de=a;fe=yn(de);){var xe=fe.find(0,!0);de=xe.from.line,y+=xe.from.ch-xe.to.ch}for(de=a;fe=Wt(de);){var Fe=fe.find(0,!0);y-=de.text.length-Fe.from.ch,de=Fe.to.line,y+=de.text.length-Fe.to.ch}return y}function ir(a){var y=a.display,fe=a.doc;y.maxLine=Bt(fe,fe.first),y.maxLineLength=fr(y.maxLine),y.maxLineChanged=!0,fe.iter(function(de){var xe=fr(de);xe>y.maxLineLength&&(y.maxLineLength=xe,y.maxLine=de)})}var Ir=function(a,y,fe){this.text=a,Qt(this,y),this.height=fe?fe(this):1};Ir.prototype.lineNo=function(){return At(this)},Kt(Ir);function br(a,y,fe,de){a.text=y,a.stateAfter&&(a.stateAfter=null),a.styles&&(a.styles=null),a.order!=null&&(a.order=null),Zt(a),Qt(a,fe);var xe=de?de(a):1;xe!=a.height&&qn(a,xe)}function Mr(a){a.parent=null,Zt(a)}var Wr={},Pr={};function li(a,y){if(!a||/^\s*$/.test(a))return null;var fe=y.addModeClass?Pr:Wr;return fe[a]||(fe[a]=a.replace(/\S+/g,"cm-$&"))}function zr(a,y){var fe=je("span",null,null,le?"padding-right: .1px":null),de={pre:je("pre",[fe],"CodeMirror-line"),content:fe,col:0,pos:0,cm:a,trailingSpace:!1,splitSpaces:a.getOption("lineWrapping")};y.measure={};for(var xe=0;xe<=(y.rest?y.rest.length:0);xe++){var Fe=xe?y.rest[xe-1]:y.line,Je=void 0;de.pos=0,de.addToken=Tr,Fn(a.display.measure)&&(Je=Pt(Fe,a.doc.direction))&&(de.addToken=dr(de.addToken,Je)),de.map=[];var it=y!=a.display.externalMeasured&&At(Fe);pr(Fe,de,kr(a,Fe,it)),Fe.styleClasses&&(Fe.styleClasses.bgClass&&(de.bgClass=He(Fe.styleClasses.bgClass,de.bgClass||"")),Fe.styleClasses.textClass&&(de.textClass=He(Fe.styleClasses.textClass,de.textClass||""))),de.map.length==0&&de.map.push(0,0,de.content.appendChild(ur(a.display.measure))),xe==0?(y.measure.map=de.map,y.measure.cache={}):((y.measure.maps||(y.measure.maps=[])).push(de.map),(y.measure.caches||(y.measure.caches=[])).push({}))}if(le){var at=de.content.lastChild;(/\bcm-tab\b/.test(at.className)||at.querySelector&&at.querySelector(".cm-tab"))&&(de.content.className="cm-tab-wrap-hack")}return Ft(a,"renderLine",a,y.line,de.pre),de.pre.className&&(de.textClass=He(de.pre.className,de.textClass||"")),de}function Xr(a){var y=Oe("span","\u2022","cm-invalidchar");return y.title="\\u"+a.charCodeAt(0).toString(16),y.setAttribute("aria-label",y.title),y}function Tr(a,y,fe,de,xe,Fe,Je){if(y){var it=a.splitSpaces?ar(y,a.trailingSpace):y,at=a.cm.state.specialChars,ht=!1,Rt;if(!at.test(y))a.col+=y.length,Rt=document.createTextNode(it),a.map.push(a.pos,a.pos+y.length,Rt),se&&te<9&&(ht=!0),a.pos+=y.length;else{Rt=document.createDocumentFragment();for(var jt=0;;){at.lastIndex=jt;var on=at.exec(y),en=on?on.index-jt:y.length-jt;if(en){var Tn=document.createTextNode(it.slice(jt,jt+en));se&&te<9?Rt.appendChild(Oe("span",[Tn])):Rt.appendChild(Tn),a.map.push(a.pos,a.pos+en,Tn),a.col+=en,a.pos+=en}if(!on)break;jt+=en+1;var Zn=void 0;if(on[0]==" "){var Qn=a.cm.options.tabSize,sr=Qn-a.col%Qn;Zn=Rt.appendChild(Oe("span",Mt(sr),"cm-tab")),Zn.setAttribute("role","presentation"),Zn.setAttribute("cm-text"," "),a.col+=sr}else on[0]=="\r"||on[0]==`
|
|
|
`?(Zn=Rt.appendChild(Oe("span",on[0]=="\r"?"\u240D":"\u2424","cm-invalidchar")),Zn.setAttribute("cm-text",on[0]),a.col+=1):(Zn=a.cm.options.specialCharPlaceholder(on[0]),Zn.setAttribute("cm-text",on[0]),se&&te<9?Rt.appendChild(Oe("span",[Zn])):Rt.appendChild(Zn),a.col+=1);a.map.push(a.pos,a.pos+1,Zn),a.pos++}}if(a.trailingSpace=it.charCodeAt(y.length-1)==32,fe||de||xe||ht||Fe||Je){var vr=fe||"";de&&(vr+=de),xe&&(vr+=xe);var lr=Oe("span",[Rt],vr,Fe);if(Je)for(var Er in Je)Je.hasOwnProperty(Er)&&Er!="style"&&Er!="class"&&lr.setAttribute(Er,Je[Er]);return a.content.appendChild(lr)}a.content.appendChild(Rt)}}function ar(a,y){if(a.length>1&&!/ /.test(a))return a;for(var fe=y,de="",xe=0;xe<a.length;xe++){var Fe=a.charAt(xe);Fe==" "&&fe&&(xe==a.length-1||a.charCodeAt(xe+1)==32)&&(Fe="\xA0"),de+=Fe,fe=Fe==" "}return de}function dr(a,y){return function(fe,de,xe,Fe,Je,it,at){xe=xe?xe+" cm-force-border":"cm-force-border";for(var ht=fe.pos,Rt=ht+de.length;;){for(var jt=void 0,on=0;on<y.length&&(jt=y[on],!(jt.to>ht&&jt.from<=ht));on++);if(jt.to>=Rt)return a(fe,de,xe,Fe,Je,it,at);a(fe,de.slice(0,jt.to-ht),xe,Fe,null,it,at),Fe=null,de=de.slice(jt.to-ht),ht=jt.to}}}function Nr(a,y,fe,de){var xe=!de&&fe.widgetNode;xe&&a.map.push(a.pos,a.pos+y,xe),!de&&a.cm.display.input.needsContentAttribute&&(xe||(xe=a.content.appendChild(document.createElement("span"))),xe.setAttribute("cm-marker",fe.id)),xe&&(a.cm.display.input.setUneditable(xe),a.content.appendChild(xe)),a.pos+=y,a.trailingSpace=!1}function pr(a,y,fe){var de=a.markedSpans,xe=a.text,Fe=0;if(!de){for(var Je=1;Je<fe.length;Je+=2)y.addToken(y,xe.slice(Fe,Fe=fe[Je]),li(fe[Je+1],y.cm.options));return}for(var it=xe.length,at=0,ht=1,Rt="",jt,on,en=0,Tn,Zn,Qn,sr,vr;;){if(en==at){Tn=Zn=Qn=on="",vr=null,sr=null,en=1/0;for(var lr=[],Er=void 0,ei=0;ei<de.length;++ei){var Kr=de[ei],ki=Kr.marker;if(ki.type=="bookmark"&&Kr.from==at&&ki.widgetNode)lr.push(ki);else if(Kr.from<=at&&(Kr.to==null||Kr.to>at||ki.collapsed&&Kr.to==at&&Kr.from==at)){if(Kr.to!=null&&Kr.to!=at&&en>Kr.to&&(en=Kr.to,Zn=""),ki.className&&(Tn+=" "+ki.className),ki.css&&(on=(on?on+";":"")+ki.css),ki.startStyle&&Kr.from==at&&(Qn+=" "+ki.startStyle),ki.endStyle&&Kr.to==en&&(Er||(Er=[])).push(ki.endStyle,Kr.to),ki.title&&((vr||(vr={})).title=ki.title),ki.attributes)for(var eo in ki.attributes)(vr||(vr={}))[eo]=ki.attributes[eo];ki.collapsed&&(!sr||Nn(sr.marker,ki)<0)&&(sr=Kr)}else Kr.from>at&&en>Kr.from&&(en=Kr.from)}if(Er)for(var Mo=0;Mo<Er.length;Mo+=2)Er[Mo+1]==en&&(Zn+=" "+Er[Mo]);if(!sr||sr.from==at)for(var ho=0;ho<lr.length;++ho)Nr(y,0,lr[ho]);if(sr&&(sr.from||0)==at){if(Nr(y,(sr.to==null?it+1:sr.to)-at,sr.marker,sr.from==null),sr.to==null)return;sr.to==at&&(sr=!1)}}if(at>=it)break;for(var sa=Math.min(it,en);;){if(Rt){var $o=at+Rt.length;if(!sr){var wo=$o>sa?Rt.slice(0,sa-at):Rt;y.addToken(y,wo,jt?jt+Tn:Tn,Qn,at+wo.length==en?Zn:"",on,vr)}if($o>=sa){Rt=Rt.slice(sa-at),at=sa;break}at=$o,Qn=""}Rt=xe.slice(Fe,Fe=fe[ht++]),jt=li(fe[ht++],y.cm.options)}}}function Jr(a,y,fe){this.line=y,this.rest=Hn(y),this.size=this.rest?At(xt(this.rest))-fe+1:1,this.node=this.text=null,this.hidden=Mn(a,y)}function ti(a,y,fe){for(var de=[],xe,Fe=y;Fe<fe;Fe=xe){var Je=new Jr(a.doc,Bt(a.doc,Fe),Fe);xe=Fe+Je.size,de.push(Je)}return de}var di=null;function po(a){di?di.ops.push(a):a.ownsGroup=di={ops:[a],delayedCallbacks:[]}}function ao(a){var y=a.delayedCallbacks,fe=0;do{for(;fe<y.length;fe++)y[fe].call(null);for(var de=0;de<a.ops.length;de++){var xe=a.ops[de];if(xe.cursorActivityHandlers)for(;xe.cursorActivityCalled<xe.cursorActivityHandlers.length;)xe.cursorActivityHandlers[xe.cursorActivityCalled++].call(null,xe.cm)}}while(fe<y.length)}function to(a,y){var fe=a.ownsGroup;if(fe)try{ao(fe)}finally{di=null,y(fe)}}var mo=null;function Ii(a,y){var fe=Ot(a,y);if(fe.length){var de=Array.prototype.slice.call(arguments,2),xe;di?xe=di.delayedCallbacks:mo?xe=mo:(xe=mo=[],setTimeout(Ti,0));for(var Fe=function(it){xe.push(function(){return fe[it].apply(null,de)})},Je=0;Je<fe.length;++Je)Fe(Je)}}function Ti(){var a=mo;mo=null;for(var y=0;y<a.length;++y)a[y]()}function Pi(a,y,fe,de){for(var xe=0;xe<y.changes.length;xe++){var Fe=y.changes[xe];Fe=="text"?ji(a,y):Fe=="gutter"?Gr(a,y,fe,de):Fe=="class"?gr(a,y):Fe=="widget"&&Zr(a,y,de)}y.changes=null}function vo(a){return a.node==a.text&&(a.node=Oe("div",null,null,"position: relative"),a.text.parentNode&&a.text.parentNode.replaceChild(a.node,a.text),a.node.appendChild(a.text),se&&te<8&&(a.node.style.zIndex=2)),a.node}function Fi(a,y){var fe=y.bgClass?y.bgClass+" "+(y.line.bgClass||""):y.line.bgClass;if(fe&&(fe+=" CodeMirror-linebackground"),y.background)fe?y.background.className=fe:(y.background.parentNode.removeChild(y.background),y.background=null);else if(fe){var de=vo(y);y.background=de.insertBefore(Oe("div",null,fe),de.firstChild),a.display.input.setUneditable(y.background)}}function Gi(a,y){var fe=a.display.externalMeasured;return fe&&fe.line==y.line?(a.display.externalMeasured=null,y.measure=fe.measure,fe.built):zr(a,y)}function ji(a,y){var fe=y.text.className,de=Gi(a,y);y.text==y.node&&(y.node=de.pre),y.text.parentNode.replaceChild(de.pre,y.text),y.text=de.pre,de.bgClass!=y.bgClass||de.textClass!=y.textClass?(y.bgClass=de.bgClass,y.textClass=de.textClass,gr(a,y)):fe&&(y.text.className=fe)}function gr(a,y){Fi(a,y),y.line.wrapClass?vo(y).className=y.line.wrapClass:y.node!=y.text&&(y.node.className="");var fe=y.textClass?y.textClass+" "+(y.line.textClass||""):y.line.textClass;y.text.className=fe||""}function Gr(a,y,fe,de){if(y.gutter&&(y.node.removeChild(y.gutter),y.gutter=null),y.gutterBackground&&(y.node.removeChild(y.gutterBackground),y.gutterBackground=null),y.line.gutterClass){var xe=vo(y);y.gutterBackground=Oe("div",null,"CodeMirror-gutter-background "+y.line.gutterClass,"left: "+(a.options.fixedGutter?de.fixedPos:-de.gutterTotalWidth)+"px; width: "+de.gutterTotalWidth+"px"),a.display.input.setUneditable(y.gutterBackground),xe.insertBefore(y.gutterBackground,y.text)}var Fe=y.line.gutterMarkers;if(a.options.lineNumbers||Fe){var Je=vo(y),it=y.gutter=Oe("div",null,"CodeMirror-gutter-wrapper","left: "+(a.options.fixedGutter?de.fixedPos:-de.gutterTotalWidth)+"px");if(a.display.input.setUneditable(it),Je.insertBefore(it,y.text),y.line.gutterClass&&(it.className+=" "+y.line.gutterClass),a.options.lineNumbers&&(!Fe||!Fe["CodeMirror-linenumbers"])&&(y.lineNumber=it.appendChild(Oe("div",Ht(a.options,fe),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+de.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+a.display.lineNumInnerWidth+"px"))),Fe)for(var at=0;at<a.display.gutterSpecs.length;++at){var ht=a.display.gutterSpecs[at].className,Rt=Fe.hasOwnProperty(ht)&&Fe[ht];Rt&&it.appendChild(Oe("div",[Rt],"CodeMirror-gutter-elt","left: "+de.gutterLeft[ht]+"px; width: "+de.gutterWidth[ht]+"px"))}}}function Zr(a,y,fe){y.alignable&&(y.alignable=null);for(var de=pe("CodeMirror-linewidget"),xe=y.node.firstChild,Fe=void 0;xe;xe=Fe)Fe=xe.nextSibling,de.test(xe.className)&&y.node.removeChild(xe);xi(a,y,fe)}function Vr(a,y,fe,de){var xe=Gi(a,y);return y.text=y.node=xe.pre,xe.bgClass&&(y.bgClass=xe.bgClass),xe.textClass&&(y.textClass=xe.textClass),gr(a,y),Gr(a,y,fe,de),xi(a,y,de),y.node}function xi(a,y,fe){if(Oi(a,y.line,y,fe,!0),y.rest)for(var de=0;de<y.rest.length;de++)Oi(a,y.rest[de],y,fe,!1)}function Oi(a,y,fe,de,xe){if(y.widgets)for(var Fe=vo(fe),Je=0,it=y.widgets;Je<it.length;++Je){var at=it[Je],ht=Oe("div",[at.node],"CodeMirror-linewidget"+(at.className?" "+at.className:""));at.handleMouseEvents||ht.setAttribute("cm-ignore-events","true"),Ao(at,ht,fe,de),a.display.input.setUneditable(ht),xe&&at.above?Fe.insertBefore(ht,fe.gutter||fe.text):Fe.appendChild(ht),Ii(at,"redraw")}}function Ao(a,y,fe,de){if(a.noHScroll){(fe.alignable||(fe.alignable=[])).push(y);var xe=de.wrapperWidth;y.style.left=de.fixedPos+"px",a.coverGutter||(xe-=de.gutterTotalWidth,y.style.paddingLeft=de.gutterTotalWidth+"px"),y.style.width=xe+"px"}a.coverGutter&&(y.style.zIndex=5,y.style.position="relative",a.noHScroll||(y.style.marginLeft=-de.gutterTotalWidth+"px"))}function Yi(a){if(a.height!=null)return a.height;var y=a.doc.cm;if(!y)return 0;if(!Qe(document.body,a.node)){var fe="position: relative;";a.coverGutter&&(fe+="margin-left: -"+y.display.gutters.offsetWidth+"px;"),a.noHScroll&&(fe+="width: "+y.display.wrapper.clientWidth+"px;"),Ee(y.display.measure,Oe("div",[a.node],null,fe))}return a.height=a.node.parentNode.offsetHeight}function Xi(a,y){for(var fe=Kn(y);fe!=a.wrapper;fe=fe.parentNode)if(!fe||fe.nodeType==1&&fe.getAttribute("cm-ignore-events")=="true"||fe.parentNode==a.sizer&&fe!=a.mover)return!0}function ui(a){return a.lineSpace.offsetTop}function no(a){return a.mover.offsetHeight-a.lineSpace.offsetHeight}function Io(a){if(a.cachedPaddingH)return a.cachedPaddingH;var y=Ee(a.measure,Oe("pre","x","CodeMirror-line-like")),fe=window.getComputedStyle?window.getComputedStyle(y):y.currentStyle,de={left:parseInt(fe.paddingLeft),right:parseInt(fe.paddingRight)};return!isNaN(de.left)&&!isNaN(de.right)&&(a.cachedPaddingH=de),de}function Ui(a){return $e-a.display.nativeBarWidth}function Ho(a){return a.display.scroller.clientWidth-Ui(a)-a.display.barWidth}function Co(a){return a.display.scroller.clientHeight-Ui(a)-a.display.barHeight}function Oo(a,y,fe){var de=a.options.lineWrapping,xe=de&&Ho(a);if(!y.measure.heights||de&&y.measure.width!=xe){var Fe=y.measure.heights=[];if(de){y.measure.width=xe;for(var Je=y.text.firstChild.getClientRects(),it=0;it<Je.length-1;it++){var at=Je[it],ht=Je[it+1];Math.abs(at.bottom-ht.bottom)>2&&Fe.push((at.bottom+ht.top)/2-fe.top)}}Fe.push(fe.bottom-fe.top)}}function Ki(a,y,fe){if(a.line==y)return{map:a.measure.map,cache:a.measure.cache};for(var de=0;de<a.rest.length;de++)if(a.rest[de]==y)return{map:a.measure.maps[de],cache:a.measure.caches[de]};for(var xe=0;xe<a.rest.length;xe++)if(At(a.rest[xe])>fe)return{map:a.measure.maps[xe],cache:a.measure.caches[xe],before:!0}}function Wo(a,y){y=un(y);var fe=At(y),de=a.display.externalMeasured=new Jr(a.doc,y,fe);de.lineN=fe;var xe=de.built=zr(a,de);return de.text=xe.pre,Ee(a.display.lineMeasure,xe.pre),de}function za(a,y,fe,de){return Zo(a,la(a,y),fe,de)}function Yo(a,y){if(y>=a.display.viewFrom&&y<a.display.viewTo)return a.display.view[_o(a,y)];var fe=a.display.externalMeasured;if(fe&&y>=fe.lineN&&y<fe.lineN+fe.size)return fe}function la(a,y){var fe=At(y),de=Yo(a,fe);de&&!de.text?de=null:de&&de.changes&&(Pi(a,de,fe,Xo(a)),a.curOp.forceUpdate=!0),de||(de=Wo(a,y));var xe=Ki(de,y,fe);return{line:y,view:de,rect:null,map:xe.map,cache:xe.cache,before:xe.before,hasHeights:!1}}function Zo(a,y,fe,de,xe){y.before&&(fe=-1);var Fe=fe+(de||""),Je;return y.cache.hasOwnProperty(Fe)?Je=y.cache[Fe]:(y.rect||(y.rect=y.view.text.getBoundingClientRect()),y.hasHeights||(Oo(a,y.view,y.rect),y.hasHeights=!0),Je=cs(a,y,fe,de),Je.bogus||(y.cache[Fe]=Je)),{left:Je.left,right:Je.right,top:xe?Je.rtop:Je.top,bottom:xe?Je.rbottom:Je.bottom}}var Da={left:0,right:0,top:0,bottom:0};function qa(a,y,fe){for(var de,xe,Fe,Je,it,at,ht=0;ht<a.length;ht+=3)if(it=a[ht],at=a[ht+1],y<it?(xe=0,Fe=1,Je="left"):y<at?(xe=y-it,Fe=xe+1):(ht==a.length-3||y==at&&a[ht+3]>y)&&(Fe=at-it,xe=Fe-1,y>=at&&(Je="right")),xe!=null){if(de=a[ht+2],it==at&&fe==(de.insertLeft?"left":"right")&&(Je=fe),fe=="left"&&xe==0)for(;ht&&a[ht-2]==a[ht-3]&&a[ht-1].insertLeft;)de=a[(ht-=3)+2],Je="left";if(fe=="right"&&xe==at-it)for(;ht<a.length-3&&a[ht+3]==a[ht+4]&&!a[ht+5].insertLeft;)de=a[(ht+=3)+2],Je="right";break}return{node:de,start:xe,end:Fe,collapse:Je,coverStart:it,coverEnd:at}}function ba(a,y){var fe=Da;if(y=="left")for(var de=0;de<a.length&&(fe=a[de]).left==fe.right;de++);else for(var xe=a.length-1;xe>=0&&(fe=a[xe]).left==fe.right;xe--);return fe}function cs(a,y,fe,de){var xe=qa(y.map,fe,de),Fe=xe.node,Je=xe.start,it=xe.end,at=xe.collapse,ht;if(Fe.nodeType==3){for(var Rt=0;Rt<4;Rt++){for(;Je&&we(y.line.text.charAt(xe.coverStart+Je));)--Je;for(;xe.coverStart+it<xe.coverEnd&&we(y.line.text.charAt(xe.coverStart+it));)++it;if(se&&te<9&&Je==0&&it==xe.coverEnd-xe.coverStart?ht=Fe.parentNode.getBoundingClientRect():ht=ba(Pe(Fe,Je,it).getClientRects(),de),ht.left||ht.right||Je==0)break;it=Je,Je=Je-1,at="right"}se&&te<11&&(ht=Ma(a.display.measure,ht))}else{Je>0&&(at=de="right");var jt;a.options.lineWrapping&&(jt=Fe.getClientRects()).length>1?ht=jt[de=="right"?jt.length-1:0]:ht=Fe.getBoundingClientRect()}if(se&&te<9&&!Je&&(!ht||!ht.left&&!ht.right)){var on=Fe.parentNode.getClientRects()[0];on?ht={left:on.left,right:on.left+Fo(a.display),top:on.top,bottom:on.bottom}:ht=Da}for(var en=ht.top-y.rect.top,Tn=ht.bottom-y.rect.top,Zn=(en+Tn)/2,Qn=y.view.measure.heights,sr=0;sr<Qn.length-1&&!(Zn<Qn[sr]);sr++);var vr=sr?Qn[sr-1]:0,lr=Qn[sr],Er={left:(at=="right"?ht.right:ht.left)-y.rect.left,right:(at=="left"?ht.left:ht.right)-y.rect.left,top:vr,bottom:lr};return!ht.left&&!ht.right&&(Er.bogus=!0),a.options.singleCursorHeightPerLine||(Er.rtop=en,Er.rbottom=Tn),Er}function Ma(a,y){if(!window.screen||screen.logicalXDPI==null||screen.logicalXDPI==screen.deviceXDPI||!zn(a))return y;var fe=screen.logicalXDPI/screen.deviceXDPI,de=screen.logicalYDPI/screen.deviceYDPI;return{left:y.left*fe,right:y.right*fe,top:y.top*de,bottom:y.bottom*de}}function Ha(a){if(a.measure&&(a.measure.cache={},a.measure.heights=null,a.rest))for(var y=0;y<a.rest.length;y++)a.measure.caches[y]={}}function Ra(a){a.display.externalMeasure=null,Te(a.display.lineMeasure);for(var y=0;y<a.display.view.length;y++)Ha(a.display.view[y])}function pa(a){Ra(a),a.display.cachedCharWidth=a.display.cachedTextHeight=a.display.cachedPaddingH=null,a.options.lineWrapping||(a.display.maxLineChanged=!0),a.display.lineNumChars=null}function Wa(){return ne&&ae?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Ja(){return ne&&ae?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Sa(a){var y=0;if(a.widgets)for(var fe=0;fe<a.widgets.length;++fe)a.widgets[fe].above&&(y+=Yi(a.widgets[fe]));return y}function wa(a,y,fe,de,xe){if(!xe){var Fe=Sa(y);fe.top+=Fe,fe.bottom+=Fe}if(de=="line")return fe;de||(de="local");var Je=Yn(y);if(de=="local"?Je+=ui(a.display):Je-=a.display.viewOffset,de=="page"||de=="window"){var it=a.display.lineSpace.getBoundingClientRect();Je+=it.top+(de=="window"?0:Ja());var at=it.left+(de=="window"?0:Wa());fe.left+=at,fe.right+=at}return fe.top+=Je,fe.bottom+=Je,fe}function ua(a,y,fe){if(fe=="div")return y;var de=y.left,xe=y.top;if(fe=="page")de-=Wa(),xe-=Ja();else if(fe=="local"||!fe){var Fe=a.display.sizer.getBoundingClientRect();de+=Fe.left,xe+=Fe.top}var Je=a.display.lineSpace.getBoundingClientRect();return{left:de-Je.left,top:xe-Je.top}}function To(a,y,fe,de,xe){return de||(de=Bt(a.doc,y.line)),wa(a,de,za(a,de,y.ch,xe),fe)}function qi(a,y,fe,de,xe,Fe){de=de||Bt(a.doc,y.line),xe||(xe=la(a,de));function Je(Tn,Zn){var Qn=Zo(a,xe,Tn,Zn?"right":"left",Fe);return Zn?Qn.left=Qn.right:Qn.right=Qn.left,wa(a,de,Qn,fe)}var it=Pt(de,a.doc.direction),at=y.ch,ht=y.sticky;if(at>=de.text.length?(at=de.text.length,ht="before"):at<=0&&(at=0,ht="after"),!it)return Je(ht=="before"?at-1:at,ht=="before");function Rt(Tn,Zn,Qn){var sr=it[Zn],vr=sr.level==1;return Je(Qn?Tn-1:Tn,vr!=Qn)}var jt=tt(it,at,ht),on=Re,en=Rt(at,jt,ht=="before");return on!=null&&(en.other=Rt(at,on,ht!="before")),en}function vi(a,y){var fe=0;y=Gt(a.doc,y),a.options.lineWrapping||(fe=Fo(a.display)*y.ch);var de=Bt(a.doc,y.line),xe=Yn(de)+ui(a.display);return{left:fe,right:fe,top:xe,bottom:xe+de.height}}function ai(a,y,fe,de,xe){var Fe=Et(a,y,fe);return Fe.xRel=xe,de&&(Fe.outside=de),Fe}function ro(a,y,fe){var de=a.doc;if(fe+=a.display.viewOffset,fe<0)return ai(de.first,0,null,-1,-1);var xe=St(de,fe),Fe=de.first+de.size-1;if(xe>Fe)return ai(de.first+de.size-1,Bt(de,Fe).text.length,null,1,1);y<0&&(y=0);for(var Je=Bt(de,xe);;){var it=na(a,Je,xe,y,fe),at=ln(Je,it.ch+(it.xRel>0||it.outside>0?1:0));if(!at)return it;var ht=at.find(1);if(ht.line==xe)return ht;Je=Bt(de,xe=ht.line)}}function Ji(a,y,fe,de){de-=Sa(y);var xe=y.text.length,Fe=Ue(function(Je){return Zo(a,fe,Je-1).bottom<=de},xe,0);return xe=Ue(function(Je){return Zo(a,fe,Je).top>de},Fe,xe),{begin:Fe,end:xe}}function io(a,y,fe,de){fe||(fe=la(a,y));var xe=wa(a,y,Zo(a,fe,de),"line").top;return Ji(a,y,fe,xe)}function co(a,y,fe,de){return a.bottom<=fe?!1:a.top>fe?!0:(de?a.left:a.right)>y}function na(a,y,fe,de,xe){xe-=Yn(y);var Fe=la(a,y),Je=Sa(y),it=0,at=y.text.length,ht=!0,Rt=Pt(y,a.doc.direction);if(Rt){var jt=(a.options.lineWrapping?ca:Go)(a,y,fe,Fe,Rt,de,xe);ht=jt.level!=1,it=ht?jt.from:jt.to-1,at=ht?jt.to:jt.from-1}var on=null,en=null,Tn=Ue(function(ei){var Kr=Zo(a,Fe,ei);return Kr.top+=Je,Kr.bottom+=Je,co(Kr,de,xe,!1)?(Kr.top<=xe&&Kr.left<=de&&(on=ei,en=Kr),!0):!1},it,at),Zn,Qn,sr=!1;if(en){var vr=de-en.left<en.right-de,lr=vr==ht;Tn=on+(lr?0:1),Qn=lr?"after":"before",Zn=vr?en.left:en.right}else{!ht&&(Tn==at||Tn==it)&&Tn++,Qn=Tn==0?"after":Tn==y.text.length?"before":Zo(a,Fe,Tn-(ht?1:0)).bottom+Je<=xe==ht?"after":"before";var Er=qi(a,Et(fe,Tn,Qn),"line",y,Fe);Zn=Er.left,sr=xe<Er.top?-1:xe>=Er.bottom?1:0}return Tn=Le(y.text,Tn,1),ai(fe,Tn,Qn,sr,de-Zn)}function Go(a,y,fe,de,xe,Fe,Je){var it=Ue(function(jt){var on=xe[jt],en=on.level!=1;return co(qi(a,Et(fe,en?on.to:on.from,en?"before":"after"),"line",y,de),Fe,Je,!0)},0,xe.length-1),at=xe[it];if(it>0){var ht=at.level!=1,Rt=qi(a,Et(fe,ht?at.from:at.to,ht?"after":"before"),"line",y,de);co(Rt,Fe,Je,!0)&&Rt.top>Je&&(at=xe[it-1])}return at}function ca(a,y,fe,de,xe,Fe,Je){var it=Ji(a,y,de,Je),at=it.begin,ht=it.end;/\s/.test(y.text.charAt(ht-1))&&ht--;for(var Rt=null,jt=null,on=0;on<xe.length;on++){var en=xe[on];if(!(en.from>=ht||en.to<=at)){var Tn=en.level!=1,Zn=Zo(a,de,Tn?Math.min(ht,en.to)-1:Math.max(at,en.from)).right,Qn=Zn<Fe?Fe-Zn+1e9:Zn-Fe;(!Rt||jt>Qn)&&(Rt=en,jt=Qn)}}return Rt||(Rt=xe[xe.length-1]),Rt.from<at&&(Rt={from:at,to:Rt.to,level:Rt.level}),Rt.to>ht&&(Rt={from:Rt.from,to:ht,level:Rt.level}),Rt}var Qi;function yo(a){if(a.cachedTextHeight!=null)return a.cachedTextHeight;if(Qi==null){Qi=Oe("pre",null,"CodeMirror-line-like");for(var y=0;y<49;++y)Qi.appendChild(document.createTextNode("x")),Qi.appendChild(Oe("br"));Qi.appendChild(document.createTextNode("x"))}Ee(a.measure,Qi);var fe=Qi.offsetHeight/50;return fe>3&&(a.cachedTextHeight=fe),Te(a.measure),fe||1}function Fo(a){if(a.cachedCharWidth!=null)return a.cachedCharWidth;var y=Oe("span","xxxxxxxxxx"),fe=Oe("pre",[y],"CodeMirror-line-like");Ee(a.measure,fe);var de=y.getBoundingClientRect(),xe=(de.right-de.left)/10;return xe>2&&(a.cachedCharWidth=xe),xe||10}function Xo(a){for(var y=a.display,fe={},de={},xe=y.gutters.clientLeft,Fe=y.gutters.firstChild,Je=0;Fe;Fe=Fe.nextSibling,++Je){var it=a.display.gutterSpecs[Je].className;fe[it]=Fe.offsetLeft+Fe.clientLeft+xe,de[it]=Fe.clientWidth}return{fixedPos:Ia(y),gutterTotalWidth:y.gutters.offsetWidth,gutterLeft:fe,gutterWidth:de,wrapperWidth:y.wrapper.clientWidth}}function Ia(a){return a.scroller.getBoundingClientRect().left-a.sizer.getBoundingClientRect().left}function ds(a){var y=yo(a.display),fe=a.options.lineWrapping,de=fe&&Math.max(5,a.display.scroller.clientWidth/Fo(a.display)-3);return function(xe){if(Mn(a.doc,xe))return 0;var Fe=0;if(xe.widgets)for(var Je=0;Je<xe.widgets.length;Je++)xe.widgets[Je].height&&(Fe+=xe.widgets[Je].height);return fe?Fe+(Math.ceil(xe.text.length/de)||1)*y:Fe+y}}function fs(a){var y=a.doc,fe=ds(a);y.iter(function(de){var xe=fe(de);xe!=de.height&&qn(de,xe)})}function da(a,y,fe,de){var xe=a.display;if(!fe&&Kn(y).getAttribute("cm-not-content")=="true")return null;var Fe,Je,it=xe.lineSpace.getBoundingClientRect();try{Fe=y.clientX-it.left,Je=y.clientY-it.top}catch(jt){return null}var at=ro(a,Fe,Je),ht;if(de&&at.xRel>0&&(ht=Bt(a.doc,at.line).text).length==at.ch){var Rt=Ge(ht,ht.length,a.options.tabSize)-ht.length;at=Et(at.line,Math.max(0,Math.round((Fe-Io(a.display).left)/Fo(a.display))-Rt))}return at}function _o(a,y){if(y>=a.display.viewTo||(y-=a.display.viewFrom,y<0))return null;for(var fe=a.display.view,de=0;de<fe.length;de++)if(y-=fe[de].size,y<0)return de}function Eo(a,y,fe,de){y==null&&(y=a.doc.first),fe==null&&(fe=a.doc.first+a.doc.size),de||(de=0);var xe=a.display;if(de&&fe<xe.viewTo&&(xe.updateLineNumbers==null||xe.updateLineNumbers>y)&&(xe.updateLineNumbers=y),a.curOp.viewChanged=!0,y>=xe.viewTo)oi&&vn(a.doc,y)<xe.viewTo&&Ko(a);else if(fe<=xe.viewFrom)oi&&fn(a.doc,fe+de)>xe.viewFrom?Ko(a):(xe.viewFrom+=de,xe.viewTo+=de);else if(y<=xe.viewFrom&&fe>=xe.viewTo)Ko(a);else if(y<=xe.viewFrom){var Fe=Qa(a,fe,fe+de,1);Fe?(xe.view=xe.view.slice(Fe.index),xe.viewFrom=Fe.lineN,xe.viewTo+=de):Ko(a)}else if(fe>=xe.viewTo){var Je=Qa(a,y,y,-1);Je?(xe.view=xe.view.slice(0,Je.index),xe.viewTo=Je.lineN):Ko(a)}else{var it=Qa(a,y,y,-1),at=Qa(a,fe,fe+de,1);it&&at?(xe.view=xe.view.slice(0,it.index).concat(ti(a,it.lineN,at.lineN)).concat(xe.view.slice(at.index)),xe.viewTo+=de):Ko(a)}var ht=xe.externalMeasured;ht&&(fe<ht.lineN?ht.lineN+=de:y<ht.lineN+ht.size&&(xe.externalMeasured=null))}function ko(a,y,fe){a.curOp.viewChanged=!0;var de=a.display,xe=a.display.externalMeasured;if(xe&&y>=xe.lineN&&y<xe.lineN+xe.size&&(de.externalMeasured=null),!(y<de.viewFrom||y>=de.viewTo)){var Fe=de.view[_o(a,y)];if(Fe.node!=null){var Je=Fe.changes||(Fe.changes=[]);Ve(Je,fe)==-1&&Je.push(fe)}}}function Ko(a){a.display.viewFrom=a.display.viewTo=a.doc.first,a.display.view=[],a.display.viewOffset=0}function Qa(a,y,fe,de){var xe=_o(a,y),Fe,Je=a.display.view;if(!oi||fe==a.doc.first+a.doc.size)return{index:xe,lineN:fe};for(var it=a.display.viewFrom,at=0;at<xe;at++)it+=Je[at].size;if(it!=y){if(de>0){if(xe==Je.length-1)return null;Fe=it+Je[xe].size-y,xe++}else Fe=it-y;y+=Fe,fe+=Fe}for(;vn(a.doc,fe)!=fe;){if(xe==(de<0?0:Je.length-1))return null;fe+=de*Je[xe-(de<0?1:0)].size,xe+=de}return{index:xe,lineN:fe}}function xa(a,y,fe){var de=a.display,xe=de.view;xe.length==0||y>=de.viewTo||fe<=de.viewFrom?(de.view=ti(a,y,fe),de.viewFrom=y):(de.viewFrom>y?de.view=ti(a,y,de.viewFrom).concat(de.view):de.viewFrom<y&&(de.view=de.view.slice(_o(a,y))),de.viewFrom=y,de.viewTo<fe?de.view=de.view.concat(ti(a,de.viewTo,fe)):de.viewTo>fe&&(de.view=de.view.slice(0,_o(a,fe)))),de.viewTo=fe}function _s(a){for(var y=a.display.view,fe=0,de=0;de<y.length;de++){var xe=y[de];!xe.hidden&&(!xe.node||xe.changes)&&++fe}return fe}function Oa(a){a.display.input.showSelection(a.display.input.prepareSelection())}function bs(a,y){y===void 0&&(y=!0);for(var fe=a.doc,de={},xe=de.cursors=document.createDocumentFragment(),Fe=de.selection=document.createDocumentFragment(),Je=0;Je<fe.sel.ranges.length;Je++)if(!(!y&&Je==fe.sel.primIndex)){var it=fe.sel.ranges[Je];if(!(it.from().line>=a.display.viewTo||it.to().line<a.display.viewFrom)){var at=it.empty();(at||a.options.showCursorWhenSelecting)&&$a(a,it.head,xe),at||Ss(a,it,Fe)}}return de}function $a(a,y,fe){var de=qi(a,y,"div",null,null,!a.options.singleCursorHeightPerLine),xe=fe.appendChild(Oe("div","\xA0","CodeMirror-cursor"));if(xe.style.left=de.left+"px",xe.style.top=de.top+"px",xe.style.height=Math.max(0,de.bottom-de.top)*a.options.cursorHeight+"px",de.other){var Fe=fe.appendChild(Oe("div","\xA0","CodeMirror-cursor CodeMirror-secondarycursor"));Fe.style.display="",Fe.style.left=de.other.left+"px",Fe.style.top=de.other.top+"px",Fe.style.height=(de.other.bottom-de.other.top)*.85+"px"}}function Ca(a,y){return a.top-y.top||a.left-y.left}function Ss(a,y,fe){var de=a.display,xe=a.doc,Fe=document.createDocumentFragment(),Je=Io(a.display),it=Je.left,at=Math.max(de.sizerWidth,Ho(a)-de.sizer.offsetLeft)-Je.right,ht=xe.direction=="ltr";function Rt(lr,Er,ei,Kr){Er<0&&(Er=0),Er=Math.round(Er),Kr=Math.round(Kr),Fe.appendChild(Oe("div",null,"CodeMirror-selected","position: absolute; left: "+lr+`px;
|
|
|
top: `+Er+"px; width: "+(ei==null?at-lr:ei)+`px;
|
|
|
height: `+(Kr-Er)+"px"))}function jt(lr,Er,ei){var Kr=Bt(xe,lr),ki=Kr.text.length,eo,Mo;function ho(wo,ea){return To(a,Et(lr,wo),"div",Kr,ea)}function sa(wo,ea,Bo){var Lo=io(a,Kr,null,wo),xo=ea=="ltr"==(Bo=="after")?"left":"right",go=Bo=="after"?Lo.begin:Lo.end-(/\s/.test(Kr.text.charAt(Lo.end-1))?2:1);return ho(go,xo)[xo]}var $o=Pt(Kr,xe.direction);return Me($o,Er||0,ei==null?ki:ei,function(wo,ea,Bo,Lo){var xo=Bo=="ltr",go=ho(wo,xo?"left":"right"),ta=ho(ea-1,xo?"right":"left"),Is=Er==null&&wo==0,us=ei==null&&ea==ki,zo=Lo==0,Ua=!$o||Lo==$o.length-1;if(ta.top-go.top<=3){var Ro=(ht?Is:us)&&zo,xl=(ht?us:Is)&&Ua,Xa=Ro?it:(xo?go:ta).left,gs=xl?at:(xo?ta:go).right;Rt(Xa,go.top,gs-Xa,go.bottom)}else{var ys,Vo,Os,Cl;xo?(ys=ht&&Is&&zo?it:go.left,Vo=ht?at:sa(wo,Bo,"before"),Os=ht?it:sa(ea,Bo,"after"),Cl=ht&&us&&Ua?at:ta.right):(ys=ht?sa(wo,Bo,"before"):it,Vo=!ht&&Is&&zo?at:go.right,Os=!ht&&us&&Ua?it:ta.left,Cl=ht?sa(ea,Bo,"after"):at),Rt(ys,go.top,Vo-ys,go.bottom),go.bottom<ta.top&&Rt(it,go.bottom,null,ta.top),Rt(Os,ta.top,Cl-Os,ta.bottom)}(!eo||Ca(go,eo)<0)&&(eo=go),Ca(ta,eo)<0&&(eo=ta),(!Mo||Ca(go,Mo)<0)&&(Mo=go),Ca(ta,Mo)<0&&(Mo=ta)}),{start:eo,end:Mo}}var on=y.from(),en=y.to();if(on.line==en.line)jt(on.line,on.ch,en.ch);else{var Tn=Bt(xe,on.line),Zn=Bt(xe,en.line),Qn=un(Tn)==un(Zn),sr=jt(on.line,on.ch,Qn?Tn.text.length+1:null).end,vr=jt(en.line,Qn?0:null,en.ch).start;Qn&&(sr.top<vr.top-2?(Rt(sr.right,sr.top,null,sr.bottom),Rt(it,vr.top,vr.left,vr.bottom)):Rt(sr.right,sr.top,vr.left-sr.right,sr.bottom)),sr.bottom<vr.top&&Rt(it,sr.bottom,null,vr.top)}fe.appendChild(Fe)}function es(a){if(a.state.focused){var y=a.display;clearInterval(y.blinker);var fe=!0;y.cursorDiv.style.visibility="",a.options.cursorBlinkRate>0?y.blinker=setInterval(function(){a.hasFocus()||Ga(a),y.cursorDiv.style.visibility=(fe=!fe)?"":"hidden"},a.options.cursorBlinkRate):a.options.cursorBlinkRate<0&&(y.cursorDiv.style.visibility="hidden")}}function ra(a){a.state.focused||(a.display.input.focus(),Ea(a))}function Za(a){a.state.delayingBlurEvent=!0,setTimeout(function(){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1,Ga(a))},100)}function Ea(a,y){a.state.delayingBlurEvent&&(a.state.delayingBlurEvent=!1),a.options.readOnly!="nocursor"&&(a.state.focused||(Ft(a,"focus",a,y),a.state.focused=!0,ot(a.display.wrapper,"CodeMirror-focused"),!a.curOp&&a.display.selForContextMenu!=a.doc.sel&&(a.display.input.reset(),le&&setTimeout(function(){return a.display.input.reset(!0)},20)),a.display.input.receivedFocus()),es(a))}function Ga(a,y){a.state.delayingBlurEvent||(a.state.focused&&(Ft(a,"blur",a,y),a.state.focused=!1,ke(a.display.wrapper,"CodeMirror-focused")),clearInterval(a.display.blinker),setTimeout(function(){a.state.focused||(a.display.shift=!1)},150))}function ts(a){for(var y=a.display,fe=y.lineDiv.offsetTop,de=0;de<y.view.length;de++){var xe=y.view[de],Fe=a.options.lineWrapping,Je=void 0,it=0;if(!xe.hidden){if(se&&te<8){var at=xe.node.offsetTop+xe.node.offsetHeight;Je=at-fe,fe=at}else{var ht=xe.node.getBoundingClientRect();Je=ht.bottom-ht.top,!Fe&&xe.text.firstChild&&(it=xe.text.firstChild.getBoundingClientRect().right-ht.left-1)}var Rt=xe.line.height-Je;if((Rt>.005||Rt<-.005)&&(qn(xe.line,Je),hs(xe.line),xe.rest))for(var jt=0;jt<xe.rest.length;jt++)hs(xe.rest[jt]);if(it>a.display.sizerWidth){var on=Math.ceil(it/Fo(a.display));on>a.display.maxLineLength&&(a.display.maxLineLength=on,a.display.maxLine=xe.line,a.display.maxLineChanged=!0)}}}}function hs(a){if(a.widgets)for(var y=0;y<a.widgets.length;++y){var fe=a.widgets[y],de=fe.node.parentNode;de&&(fe.height=de.offsetHeight)}}function ka(a,y,fe){var de=fe&&fe.top!=null?Math.max(0,fe.top):a.scroller.scrollTop;de=Math.floor(de-ui(a));var xe=fe&&fe.bottom!=null?fe.bottom:de+a.wrapper.clientHeight,Fe=St(y,de),Je=St(y,xe);if(fe&&fe.ensure){var it=fe.ensure.from.line,at=fe.ensure.to.line;it<Fe?(Fe=it,Je=St(y,Yn(Bt(y,it))+a.wrapper.clientHeight)):Math.min(at,y.lastLine())>=Je&&(Fe=St(y,Yn(Bt(y,at))-a.wrapper.clientHeight),Je=at)}return{from:Fe,to:Math.max(Je,Fe+1)}}function ps(a,y){if(!yt(a,"scrollCursorIntoView")){var fe=a.display,de=fe.sizer.getBoundingClientRect(),xe=null;if(y.top+de.top<0?xe=!0:y.bottom+de.top>(window.innerHeight||document.documentElement.clientHeight)&&(xe=!1),xe!=null&&!x){var Fe=Oe("div","\u200B",null,`position: absolute;
|
|
|
top: `+(y.top-fe.viewOffset-ui(a.display))+`px;
|
|
|
height: `+(y.bottom-y.top+Ui(a)+fe.barHeight)+`px;
|
|
|
left: `+y.left+"px; width: "+Math.max(2,y.right-y.left)+"px;");a.display.lineSpace.appendChild(Fe),Fe.scrollIntoView(xe),a.display.lineSpace.removeChild(Fe)}}}function ms(a,y,fe,de){de==null&&(de=0);var xe;!a.options.lineWrapping&&y==fe&&(y=y.ch?Et(y.line,y.sticky=="before"?y.ch-1:y.ch,"after"):y,fe=y.sticky=="before"?Et(y.line,y.ch+1,"before"):y);for(var Fe=0;Fe<5;Fe++){var Je=!1,it=qi(a,y),at=!fe||fe==y?it:qi(a,fe);xe={left:Math.min(it.left,at.left),top:Math.min(it.top,at.top)-de,right:Math.max(it.left,at.left),bottom:Math.max(it.bottom,at.bottom)+de};var ht=ns(a,xe),Rt=a.doc.scrollTop,jt=a.doc.scrollLeft;if(ht.scrollTop!=null&&(ia(a,ht.scrollTop),Math.abs(a.doc.scrollTop-Rt)>1&&(Je=!0)),ht.scrollLeft!=null&&(ma(a,ht.scrollLeft),Math.abs(a.doc.scrollLeft-jt)>1&&(Je=!0)),!Je)break}return xe}function ws(a,y){var fe=ns(a,y);fe.scrollTop!=null&&ia(a,fe.scrollTop),fe.scrollLeft!=null&&ma(a,fe.scrollLeft)}function ns(a,y){var fe=a.display,de=yo(a.display);y.top<0&&(y.top=0);var xe=a.curOp&&a.curOp.scrollTop!=null?a.curOp.scrollTop:fe.scroller.scrollTop,Fe=Co(a),Je={};y.bottom-y.top>Fe&&(y.bottom=y.top+Fe);var it=a.doc.height+no(fe),at=y.top<de,ht=y.bottom>it-de;if(y.top<xe)Je.scrollTop=at?0:y.top;else if(y.bottom>xe+Fe){var Rt=Math.min(y.top,(ht?it:y.bottom)-Fe);Rt!=xe&&(Je.scrollTop=Rt)}var jt=a.options.fixedGutter?0:fe.gutters.offsetWidth,on=a.curOp&&a.curOp.scrollLeft!=null?a.curOp.scrollLeft:fe.scroller.scrollLeft-jt,en=Ho(a)-fe.gutters.offsetWidth,Tn=y.right-y.left>en;return Tn&&(y.right=y.left+en),y.left<10?Je.scrollLeft=0:y.left<on?Je.scrollLeft=Math.max(0,y.left+jt-(Tn?0:10)):y.right>en+on-3&&(Je.scrollLeft=y.right+(Tn?0:10)-en),Je}function rs(a,y){y!=null&&(Pa(a),a.curOp.scrollTop=(a.curOp.scrollTop==null?a.doc.scrollTop:a.curOp.scrollTop)+y)}function La(a){Pa(a);var y=a.getCursor();a.curOp.scrollToPos={from:y,to:y,margin:a.options.cursorScrollMargin}}function Br(a,y,fe){(y!=null||fe!=null)&&Pa(a),y!=null&&(a.curOp.scrollLeft=y),fe!=null&&(a.curOp.scrollTop=fe)}function xs(a,y){Pa(a),a.curOp.scrollToPos=y}function Pa(a){var y=a.curOp.scrollToPos;if(y){a.curOp.scrollToPos=null;var fe=vi(a,y.from),de=vi(a,y.to);vs(a,fe,de,y.margin)}}function vs(a,y,fe,de){var xe=ns(a,{left:Math.min(y.left,fe.left),top:Math.min(y.top,fe.top)-de,right:Math.max(y.right,fe.right),bottom:Math.max(y.bottom,fe.bottom)+de});Br(a,xe.scrollLeft,xe.scrollTop)}function ia(a,y){Math.abs(a.doc.scrollTop-y)<2||(ce||yi(a,{top:y}),is(a,y,!0),ce&&yi(a),Ln(a,100))}function is(a,y,fe){y=Math.max(0,Math.min(a.display.scroller.scrollHeight-a.display.scroller.clientHeight,y)),!(a.display.scroller.scrollTop==y&&!fe)&&(a.doc.scrollTop=y,a.display.scrollbars.setScrollTop(y),a.display.scroller.scrollTop!=y&&(a.display.scroller.scrollTop=y))}function ma(a,y,fe,de){y=Math.max(0,Math.min(y,a.display.scroller.scrollWidth-a.display.scroller.clientWidth)),!((fe?y==a.doc.scrollLeft:Math.abs(a.doc.scrollLeft-y)<2)&&!de)&&(a.doc.scrollLeft=y,Ei(a),a.display.scroller.scrollLeft!=y&&(a.display.scroller.scrollLeft=y),a.display.scrollbars.setScrollLeft(y))}function hi(a){var y=a.display,fe=y.gutters.offsetWidth,de=Math.round(a.doc.height+no(a.display));return{clientHeight:y.scroller.clientHeight,viewHeight:y.wrapper.clientHeight,scrollWidth:y.scroller.scrollWidth,clientWidth:y.scroller.clientWidth,viewWidth:y.wrapper.clientWidth,barLeft:a.options.fixedGutter?fe:0,docHeight:de,scrollHeight:de+Ui(a)+y.barHeight,nativeBarWidth:y.nativeBarWidth,gutterWidth:fe}}var yr=function(a,y,fe){this.cm=fe;var de=this.vert=Oe("div",[Oe("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),xe=this.horiz=Oe("div",[Oe("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");de.tabIndex=xe.tabIndex=-1,a(de),a(xe),vt(de,"scroll",function(){de.clientHeight&&y(de.scrollTop,"vertical")}),vt(xe,"scroll",function(){xe.clientWidth&&y(xe.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,se&&te<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};yr.prototype.update=function(a){var y=a.scrollWidth>a.clientWidth+1,fe=a.scrollHeight>a.clientHeight+1,de=a.nativeBarWidth;if(fe){this.vert.style.display="block",this.vert.style.bottom=y?de+"px":"0";var xe=a.viewHeight-(y?de:0);this.vert.firstChild.style.height=Math.max(0,a.scrollHeight-a.clientHeight+xe)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(y){this.horiz.style.display="block",this.horiz.style.right=fe?de+"px":"0",this.horiz.style.left=a.barLeft+"px";var Fe=a.viewWidth-a.barLeft-(fe?de:0);this.horiz.firstChild.style.width=Math.max(0,a.scrollWidth-a.clientWidth+Fe)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&a.clientHeight>0&&(de==0&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:fe?de:0,bottom:y?de:0}},yr.prototype.setScrollLeft=function(a){this.horiz.scrollLeft!=a&&(this.horiz.scrollLeft=a),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},yr.prototype.setScrollTop=function(a){this.vert.scrollTop!=a&&(this.vert.scrollTop=a),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},yr.prototype.zeroWidthHack=function(){var a=ve&&!z?"12px":"18px";this.horiz.style.height=this.vert.style.width=a,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new ze,this.disableVert=new ze},yr.prototype.enableZeroWidthBar=function(a,y,fe){a.style.pointerEvents="auto";function de(){var xe=a.getBoundingClientRect(),Fe=fe=="vert"?document.elementFromPoint(xe.right-1,(xe.top+xe.bottom)/2):document.elementFromPoint((xe.right+xe.left)/2,xe.bottom-1);Fe!=a?a.style.pointerEvents="none":y.set(1e3,de)}y.set(1e3,de)},yr.prototype.clear=function(){var a=this.horiz.parentNode;a.removeChild(this.horiz),a.removeChild(this.vert)};var Ci=function(){};Ci.prototype.update=function(){return{bottom:0,right:0}},Ci.prototype.setScrollLeft=function(){},Ci.prototype.setScrollTop=function(){},Ci.prototype.clear=function(){};function So(a,y){y||(y=hi(a));var fe=a.display.barWidth,de=a.display.barHeight;Ni(a,y);for(var xe=0;xe<4&&fe!=a.display.barWidth||de!=a.display.barHeight;xe++)fe!=a.display.barWidth&&a.options.lineWrapping&&ts(a),Ni(a,hi(a)),fe=a.display.barWidth,de=a.display.barHeight}function Ni(a,y){var fe=a.display,de=fe.scrollbars.update(y);fe.sizer.style.paddingRight=(fe.barWidth=de.right)+"px",fe.sizer.style.paddingBottom=(fe.barHeight=de.bottom)+"px",fe.heightForcer.style.borderBottom=de.bottom+"px solid transparent",de.right&&de.bottom?(fe.scrollbarFiller.style.display="block",fe.scrollbarFiller.style.height=de.bottom+"px",fe.scrollbarFiller.style.width=de.right+"px"):fe.scrollbarFiller.style.display="",de.bottom&&a.options.coverGutterNextToScrollbar&&a.options.fixedGutter?(fe.gutterFiller.style.display="block",fe.gutterFiller.style.height=de.bottom+"px",fe.gutterFiller.style.width=y.gutterWidth+"px"):fe.gutterFiller.style.display=""}var Na={native:yr,null:Ci};function va(a){a.display.scrollbars&&(a.display.scrollbars.clear(),a.display.scrollbars.addClass&&ke(a.display.wrapper,a.display.scrollbars.addClass)),a.display.scrollbars=new Na[a.options.scrollbarStyle](function(y){a.display.wrapper.insertBefore(y,a.display.scrollbarFiller),vt(y,"mousedown",function(){a.state.focused&&setTimeout(function(){return a.display.input.focus()},0)}),y.setAttribute("cm-not-content","true")},function(y,fe){fe=="horizontal"?ma(a,y):ia(a,y)},a),a.display.scrollbars.addClass&&ot(a.display.wrapper,a.display.scrollbars.addClass)}var Aa=0;function Po(a){a.curOp={cm:a,viewChanged:!1,startHeight:a.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:++Aa},po(a.curOp)}function fa(a){var y=a.curOp;y&&to(y,function(fe){for(var de=0;de<fe.ops.length;de++)fe.ops[de].cm.curOp=null;sl(fe)})}function sl(a){for(var y=a.ops,fe=0;fe<y.length;fe++)ll(y[fe]);for(var de=0;de<y.length;de++)ul(y[de]);for(var xe=0;xe<y.length;xe++)cl(y[xe]);for(var Fe=0;Fe<y.length;Fe++)ft(y[Fe]);for(var Je=0;Je<y.length;Je++)bt(y[Je])}function ll(a){var y=a.cm,fe=y.display;Jn(y),a.updateMaxLine&&ir(y),a.mustUpdate=a.viewChanged||a.forceUpdate||a.scrollTop!=null||a.scrollToPos&&(a.scrollToPos.from.line<fe.viewFrom||a.scrollToPos.to.line>=fe.viewTo)||fe.maxLineChanged&&y.options.lineWrapping,a.update=a.mustUpdate&&new Pn(y,a.mustUpdate&&{top:a.scrollTop,ensure:a.scrollToPos},a.forceUpdate)}function ul(a){a.updatedDisplay=a.mustUpdate&&gi(a.cm,a.update)}function cl(a){var y=a.cm,fe=y.display;a.updatedDisplay&&ts(y),a.barMeasure=hi(y),fe.maxLineChanged&&!y.options.lineWrapping&&(a.adjustWidthTo=za(y,fe.maxLine,fe.maxLine.text.length).left+3,y.display.sizerWidth=a.adjustWidthTo,a.barMeasure.scrollWidth=Math.max(fe.scroller.clientWidth,fe.sizer.offsetLeft+a.adjustWidthTo+Ui(y)+y.display.barWidth),a.maxScrollLeft=Math.max(0,fe.sizer.offsetLeft+a.adjustWidthTo-Ho(y))),(a.updatedDisplay||a.selectionChanged)&&(a.preparedSelection=fe.input.prepareSelection())}function ft(a){var y=a.cm;a.adjustWidthTo!=null&&(y.display.sizer.style.minWidth=a.adjustWidthTo+"px",a.maxScrollLeft<y.doc.scrollLeft&&ma(y,Math.min(y.display.scroller.scrollLeft,a.maxScrollLeft),!0),y.display.maxLineChanged=!1);var fe=a.focus&&a.focus==Xe();a.preparedSelection&&y.display.input.showSelection(a.preparedSelection,fe),(a.updatedDisplay||a.startHeight!=y.doc.height)&&So(y,a.barMeasure),a.updatedDisplay&&ni(y,a.barMeasure),a.selectionChanged&&es(y),y.state.focused&&a.updateInput&&y.display.input.reset(a.typing),fe&&ra(a.cm)}function bt(a){var y=a.cm,fe=y.display,de=y.doc;if(a.updatedDisplay&&Lr(y,a.update),fe.wheelStartX!=null&&(a.scrollTop!=null||a.scrollLeft!=null||a.scrollToPos)&&(fe.wheelStartX=fe.wheelStartY=null),a.scrollTop!=null&&is(y,a.scrollTop,a.forceScroll),a.scrollLeft!=null&&ma(y,a.scrollLeft,!0,!0),a.scrollToPos){var xe=ms(y,Gt(de,a.scrollToPos.from),Gt(de,a.scrollToPos.to),a.scrollToPos.margin);ps(y,xe)}var Fe=a.maybeHiddenMarkers,Je=a.maybeUnhiddenMarkers;if(Fe)for(var it=0;it<Fe.length;++it)Fe[it].lines.length||Ft(Fe[it],"hide");if(Je)for(var at=0;at<Je.length;++at)Je[at].lines.length&&Ft(Je[at],"unhide");fe.wrapper.offsetHeight&&(de.scrollTop=y.display.scroller.scrollTop),a.changeObjs&&Ft(y,"changes",y,a.changeObjs),a.update&&a.update.finish()}function wt(a,y){if(a.curOp)return y();Po(a);try{return y()}finally{fa(a)}}function Xn(a,y){return function(){if(a.curOp)return y.apply(a,arguments);Po(a);try{return y.apply(a,arguments)}finally{fa(a)}}}function On(a){return function(){if(this.curOp)return a.apply(this,arguments);Po(this);try{return a.apply(this,arguments)}finally{fa(this)}}}function pn(a){return function(){var y=this.cm;if(!y||y.curOp)return a.apply(this,arguments);Po(y);try{return a.apply(this,arguments)}finally{fa(y)}}}function Ln(a,y){a.doc.highlightFrontier<a.display.viewTo&&a.state.highlight.set(y,Ye(xn,a))}function xn(a){var y=a.doc;if(!(y.highlightFrontier>=a.display.viewTo)){var fe=+new Date+a.options.workTime,de=Sr(a,y.highlightFrontier),xe=[];y.iter(de.line,Math.min(y.first+y.size,a.display.viewTo+500),function(Fe){if(de.line>=a.display.viewFrom){var Je=Fe.styles,it=Fe.text.length>a.options.maxHighlightLength?st(y.mode,de.state):null,at=$n(a,Fe,de,!0);it&&(de.state=it),Fe.styles=at.styles;var ht=Fe.styleClasses,Rt=at.classes;Rt?Fe.styleClasses=Rt:ht&&(Fe.styleClasses=null);for(var jt=!Je||Je.length!=Fe.styles.length||ht!=Rt&&(!ht||!Rt||ht.bgClass!=Rt.bgClass||ht.textClass!=Rt.textClass),on=0;!jt&&on<Je.length;++on)jt=Je[on]!=Fe.styles[on];jt&&xe.push(de.line),Fe.stateAfter=de.save(),de.nextLine()}else Fe.text.length<=a.options.maxHighlightLength&&Yr(a,Fe.text,de),Fe.stateAfter=de.line%5==0?de.save():null,de.nextLine();if(+new Date>fe)return Ln(a,a.options.workDelay),!0}),y.highlightFrontier=de.line,y.modeFrontier=Math.max(y.modeFrontier,de.line),xe.length&&wt(a,function(){for(var Fe=0;Fe<xe.length;Fe++)ko(a,xe[Fe],"text")})}}var Pn=function(a,y,fe){var de=a.display;this.viewport=y,this.visible=ka(de,a.doc,y),this.editorIsHidden=!de.wrapper.offsetWidth,this.wrapperHeight=de.wrapper.clientHeight,this.wrapperWidth=de.wrapper.clientWidth,this.oldDisplayWidth=Ho(a),this.force=fe,this.dims=Xo(a),this.events=[]};Pn.prototype.signal=function(a,y){Lt(a,y)&&this.events.push(arguments)},Pn.prototype.finish=function(){for(var a=0;a<this.events.length;a++)Ft.apply(null,this.events[a])};function Jn(a){var y=a.display;!y.scrollbarsClipped&&y.scroller.offsetWidth&&(y.nativeBarWidth=y.scroller.offsetWidth-y.scroller.clientWidth,y.heightForcer.style.height=Ui(a)+"px",y.sizer.style.marginBottom=-y.nativeBarWidth+"px",y.sizer.style.borderRightWidth=Ui(a)+"px",y.scrollbarsClipped=!0)}function ci(a){if(a.hasFocus())return null;var y=Xe();if(!y||!Qe(a.display.lineDiv,y))return null;var fe={activeElt:y};if(window.getSelection){var de=window.getSelection();de.anchorNode&&de.extend&&Qe(a.display.lineDiv,de.anchorNode)&&(fe.anchorNode=de.anchorNode,fe.anchorOffset=de.anchorOffset,fe.focusNode=de.focusNode,fe.focusOffset=de.focusOffset)}return fe}function Or(a){if(!(!a||!a.activeElt||a.activeElt==Xe())&&(a.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(a.activeElt.nodeName)&&a.anchorNode&&Qe(document.body,a.anchorNode)&&Qe(document.body,a.focusNode))){var y=window.getSelection(),fe=document.createRange();fe.setEnd(a.anchorNode,a.anchorOffset),fe.collapse(!1),y.removeAllRanges(),y.addRange(fe),y.extend(a.focusNode,a.focusOffset)}}function gi(a,y){var fe=a.display,de=a.doc;if(y.editorIsHidden)return Ko(a),!1;if(!y.force&&y.visible.from>=fe.viewFrom&&y.visible.to<=fe.viewTo&&(fe.updateLineNumbers==null||fe.updateLineNumbers>=fe.viewTo)&&fe.renderedView==fe.view&&_s(a)==0)return!1;Wi(a)&&(Ko(a),y.dims=Xo(a));var xe=de.first+de.size,Fe=Math.max(y.visible.from-a.options.viewportMargin,de.first),Je=Math.min(xe,y.visible.to+a.options.viewportMargin);fe.viewFrom<Fe&&Fe-fe.viewFrom<20&&(Fe=Math.max(de.first,fe.viewFrom)),fe.viewTo>Je&&fe.viewTo-Je<20&&(Je=Math.min(xe,fe.viewTo)),oi&&(Fe=vn(a.doc,Fe),Je=fn(a.doc,Je));var it=Fe!=fe.viewFrom||Je!=fe.viewTo||fe.lastWrapHeight!=y.wrapperHeight||fe.lastWrapWidth!=y.wrapperWidth;xa(a,Fe,Je),fe.viewOffset=Yn(Bt(a.doc,fe.viewFrom)),a.display.mover.style.top=fe.viewOffset+"px";var at=_s(a);if(!it&&at==0&&!y.force&&fe.renderedView==fe.view&&(fe.updateLineNumbers==null||fe.updateLineNumbers>=fe.viewTo))return!1;var ht=ci(a);return at>4&&(fe.lineDiv.style.display="none"),Fr(a,fe.updateLineNumbers,y.dims),at>4&&(fe.lineDiv.style.display=""),fe.renderedView=fe.view,Or(ht),Te(fe.cursorDiv),Te(fe.selectionDiv),fe.gutters.style.height=fe.sizer.style.minHeight=0,it&&(fe.lastWrapHeight=y.wrapperHeight,fe.lastWrapWidth=y.wrapperWidth,Ln(a,400)),fe.updateLineNumbers=null,!0}function Lr(a,y){for(var fe=y.viewport,de=!0;;de=!1){if(!de||!a.options.lineWrapping||y.oldDisplayWidth==Ho(a)){if(fe&&fe.top!=null&&(fe={top:Math.min(a.doc.height+no(a.display)-Co(a),fe.top)}),y.visible=ka(a.display,a.doc,fe),y.visible.from>=a.display.viewFrom&&y.visible.to<=a.display.viewTo)break}else de&&(y.visible=ka(a.display,a.doc,fe));if(!gi(a,y))break;ts(a);var xe=hi(a);Oa(a),So(a,xe),ni(a,xe),y.force=!1}y.signal(a,"update",a),(a.display.viewFrom!=a.display.reportedViewFrom||a.display.viewTo!=a.display.reportedViewTo)&&(y.signal(a,"viewportChange",a,a.display.viewFrom,a.display.viewTo),a.display.reportedViewFrom=a.display.viewFrom,a.display.reportedViewTo=a.display.viewTo)}function yi(a,y){var fe=new Pn(a,y);if(gi(a,fe)){ts(a),Lr(a,fe);var de=hi(a);Oa(a),So(a,de),ni(a,de),fe.finish()}}function Fr(a,y,fe){var de=a.display,xe=a.options.lineNumbers,Fe=de.lineDiv,Je=Fe.firstChild;function it(Tn){var Zn=Tn.nextSibling;return le&&ve&&a.display.currentWheelTarget==Tn?Tn.style.display="none":Tn.parentNode.removeChild(Tn),Zn}for(var at=de.view,ht=de.viewFrom,Rt=0;Rt<at.length;Rt++){var jt=at[Rt];if(!jt.hidden)if(!jt.node||jt.node.parentNode!=Fe){var on=Vr(a,jt,ht,fe);Fe.insertBefore(on,Je)}else{for(;Je!=jt.node;)Je=it(Je);var en=xe&&y!=null&&y<=ht&&jt.lineNumber;jt.changes&&(Ve(jt.changes,"gutter")>-1&&(en=!1),Pi(a,jt,ht,fe)),en&&(Te(jt.lineNumber),jt.lineNumber.appendChild(document.createTextNode(Ht(a.options,ht)))),Je=jt.node.nextSibling}ht+=jt.size}for(;Je;)Je=it(Je)}function zi(a){var y=a.gutters.offsetWidth;a.sizer.style.marginLeft=y+"px"}function ni(a,y){a.display.sizer.style.minHeight=y.docHeight+"px",a.display.heightForcer.style.top=y.docHeight+"px",a.display.gutters.style.height=y.docHeight+a.display.barHeight+Ui(a)+"px"}function Ei(a){var y=a.display,fe=y.view;if(!(!y.alignWidgets&&(!y.gutters.firstChild||!a.options.fixedGutter))){for(var de=Ia(y)-y.scroller.scrollLeft+a.doc.scrollLeft,xe=y.gutters.offsetWidth,Fe=de+"px",Je=0;Je<fe.length;Je++)if(!fe[Je].hidden){a.options.fixedGutter&&(fe[Je].gutter&&(fe[Je].gutter.style.left=Fe),fe[Je].gutterBackground&&(fe[Je].gutterBackground.style.left=Fe));var it=fe[Je].alignable;if(it)for(var at=0;at<it.length;at++)it[at].style.left=Fe}a.options.fixedGutter&&(y.gutters.style.left=de+xe+"px")}}function Wi(a){if(!a.options.lineNumbers)return!1;var y=a.doc,fe=Ht(a.options,y.first+y.size-1),de=a.display;if(fe.length!=de.lineNumChars){var xe=de.measure.appendChild(Oe("div",[Oe("div",fe)],"CodeMirror-linenumber CodeMirror-gutter-elt")),Fe=xe.firstChild.offsetWidth,Je=xe.offsetWidth-Fe;return de.lineGutter.style.width="",de.lineNumInnerWidth=Math.max(Fe,de.lineGutter.offsetWidth-Je)+1,de.lineNumWidth=de.lineNumInnerWidth+Je,de.lineNumChars=de.lineNumInnerWidth?fe.length:-1,de.lineGutter.style.width=de.lineNumWidth+"px",zi(a.display),!0}return!1}function ri(a,y){for(var fe=[],de=!1,xe=0;xe<a.length;xe++){var Fe=a[xe],Je=null;if(typeof Fe!="string"&&(Je=Fe.style,Fe=Fe.className),Fe=="CodeMirror-linenumbers")if(y)de=!0;else continue;fe.push({className:Fe,style:Je})}return y&&!de&&fe.push({className:"CodeMirror-linenumbers",style:null}),fe}function Di(a){var y=a.gutters,fe=a.gutterSpecs;Te(y),a.lineGutter=null;for(var de=0;de<fe.length;++de){var xe=fe[de],Fe=xe.className,Je=xe.style,it=y.appendChild(Oe("div",null,"CodeMirror-gutter "+Fe));Je&&(it.style.cssText=Je),Fe=="CodeMirror-linenumbers"&&(a.lineGutter=it,it.style.width=(a.lineNumWidth||1)+"px")}y.style.display=fe.length?"":"none",zi(a)}function tr(a){Di(a.display),Eo(a),Ei(a)}function Bi(a,y,fe,de){var xe=this;this.input=fe,xe.scrollbarFiller=Oe("div",null,"CodeMirror-scrollbar-filler"),xe.scrollbarFiller.setAttribute("cm-not-content","true"),xe.gutterFiller=Oe("div",null,"CodeMirror-gutter-filler"),xe.gutterFiller.setAttribute("cm-not-content","true"),xe.lineDiv=je("div",null,"CodeMirror-code"),xe.selectionDiv=Oe("div",null,null,"position: relative; z-index: 1"),xe.cursorDiv=Oe("div",null,"CodeMirror-cursors"),xe.measure=Oe("div",null,"CodeMirror-measure"),xe.lineMeasure=Oe("div",null,"CodeMirror-measure"),xe.lineSpace=je("div",[xe.measure,xe.lineMeasure,xe.selectionDiv,xe.cursorDiv,xe.lineDiv],null,"position: relative; outline: none");var Fe=je("div",[xe.lineSpace],"CodeMirror-lines");xe.mover=Oe("div",[Fe],null,"position: relative"),xe.sizer=Oe("div",[xe.mover],"CodeMirror-sizer"),xe.sizerWidth=null,xe.heightForcer=Oe("div",null,null,"position: absolute; height: "+$e+"px; width: 1px;"),xe.gutters=Oe("div",null,"CodeMirror-gutters"),xe.lineGutter=null,xe.scroller=Oe("div",[xe.sizer,xe.heightForcer,xe.gutters],"CodeMirror-scroll"),xe.scroller.setAttribute("tabIndex","-1"),xe.wrapper=Oe("div",[xe.scrollbarFiller,xe.gutterFiller,xe.scroller],"CodeMirror"),se&&te<8&&(xe.gutters.style.zIndex=-1,xe.scroller.style.paddingRight=0),!le&&!(ce&&oe)&&(xe.scroller.draggable=!0),a&&(a.appendChild?a.appendChild(xe.wrapper):a(xe.wrapper)),xe.viewFrom=xe.viewTo=y.first,xe.reportedViewFrom=xe.reportedViewTo=y.first,xe.view=[],xe.renderedView=null,xe.externalMeasured=null,xe.viewOffset=0,xe.lastWrapHeight=xe.lastWrapWidth=0,xe.updateLineNumbers=null,xe.nativeBarWidth=xe.barHeight=xe.barWidth=0,xe.scrollbarsClipped=!1,xe.lineNumWidth=xe.lineNumInnerWidth=xe.lineNumChars=null,xe.alignWidgets=!1,xe.cachedCharWidth=xe.cachedTextHeight=xe.cachedPaddingH=null,xe.maxLine=null,xe.maxLineLength=0,xe.maxLineChanged=!1,xe.wheelDX=xe.wheelDY=xe.wheelStartX=xe.wheelStartY=null,xe.shift=!1,xe.selForContextMenu=null,xe.activeTouch=null,xe.gutterSpecs=ri(de.gutters,de.lineNumbers),Di(xe),fe.init(xe)}var bi=0,Ri=null;se?Ri=-.53:ce?Ri=15:ne?Ri=-.7:b&&(Ri=-1/3);function No(a){var y=a.wheelDeltaX,fe=a.wheelDeltaY;return y==null&&a.detail&&a.axis==a.HORIZONTAL_AXIS&&(y=a.detail),fe==null&&a.detail&&a.axis==a.VERTICAL_AXIS?fe=a.detail:fe==null&&(fe=a.wheelDelta),{x:y,y:fe}}function mr(a){var y=No(a);return y.x*=Ri,y.y*=Ri,y}function Zi(a,y){var fe=No(y),de=fe.x,xe=fe.y,Fe=a.display,Je=Fe.scroller,it=Je.scrollWidth>Je.clientWidth,at=Je.scrollHeight>Je.clientHeight;if(de&&it||xe&&at){if(xe&&ve&&le){e:for(var ht=y.target,Rt=Fe.view;ht!=Je;ht=ht.parentNode)for(var jt=0;jt<Rt.length;jt++)if(Rt[jt].node==ht){a.display.currentWheelTarget=ht;break e}}if(de&&!ce&&!E&&Ri!=null){xe&&at&&ia(a,Math.max(0,Je.scrollTop+xe*Ri)),ma(a,Math.max(0,Je.scrollLeft+de*Ri)),(!xe||xe&&at)&&sn(y),Fe.wheelStartX=null;return}if(xe&&Ri!=null){var on=xe*Ri,en=a.doc.scrollTop,Tn=en+Fe.wrapper.clientHeight;on<0?en=Math.max(0,en+on-50):Tn=Math.min(a.doc.height,Tn+on+50),yi(a,{top:en,bottom:Tn})}bi<20&&(Fe.wheelStartX==null?(Fe.wheelStartX=Je.scrollLeft,Fe.wheelStartY=Je.scrollTop,Fe.wheelDX=de,Fe.wheelDY=xe,setTimeout(function(){if(Fe.wheelStartX!=null){var Zn=Je.scrollLeft-Fe.wheelStartX,Qn=Je.scrollTop-Fe.wheelStartY,sr=Qn&&Fe.wheelDY&&Qn/Fe.wheelDY||Zn&&Fe.wheelDX&&Zn/Fe.wheelDX;Fe.wheelStartX=Fe.wheelStartY=null,sr&&(Ri=(Ri*bi+sr)/(bi+1),++bi)}},200)):(Fe.wheelDX+=de,Fe.wheelDY+=xe))}}var si=function(a,y){this.ranges=a,this.primIndex=y};si.prototype.primary=function(){return this.ranges[this.primIndex]},si.prototype.equals=function(a){if(a==this)return!0;if(a.primIndex!=this.primIndex||a.ranges.length!=this.ranges.length)return!1;for(var y=0;y<this.ranges.length;y++){var fe=this.ranges[y],de=a.ranges[y];if(!nn(fe.anchor,de.anchor)||!nn(fe.head,de.head))return!1}return!0},si.prototype.deepCopy=function(){for(var a=[],y=0;y<this.ranges.length;y++)a[y]=new xr(rn(this.ranges[y].anchor),rn(this.ranges[y].head));return new si(a,this.primIndex)},si.prototype.somethingSelected=function(){for(var a=0;a<this.ranges.length;a++)if(!this.ranges[a].empty())return!0;return!1},si.prototype.contains=function(a,y){y||(y=a);for(var fe=0;fe<this.ranges.length;fe++){var de=this.ranges[fe];if(Ut(y,de.from())>=0&&Ut(a,de.to())<=0)return fe}return-1};var xr=function(a,y){this.anchor=a,this.head=y};xr.prototype.from=function(){return bn(this.anchor,this.head)},xr.prototype.to=function(){return gn(this.anchor,this.head)},xr.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function jr(a,y,fe){var de=a&&a.options.selectionsMayTouch,xe=y[fe];y.sort(function(on,en){return Ut(on.from(),en.from())}),fe=Ve(y,xe);for(var Fe=1;Fe<y.length;Fe++){var Je=y[Fe],it=y[Fe-1],at=Ut(it.to(),Je.from());if(de&&!Je.empty()?at>0:at>=0){var ht=bn(it.from(),Je.from()),Rt=gn(it.to(),Je.to()),jt=it.empty()?Je.from()==Je.head:it.from()==it.head;Fe<=fe&&--fe,y.splice(--Fe,2,new xr(jt?Rt:ht,jt?ht:Rt))}}return new si(y,fe)}function mi(a,y){return new si([new xr(a,y||a)],0)}function Rr(a){return a.text?Et(a.from.line+a.text.length-1,xt(a.text).length+(a.text.length==1?a.from.ch:0)):a.to}function qo(a,y){if(Ut(a,y.from)<0)return a;if(Ut(a,y.to)<=0)return Rr(y);var fe=a.line+y.text.length-(y.to.line-y.from.line)-1,de=a.ch;return a.line==y.to.line&&(de+=Rr(y).ch-y.to.ch),Et(fe,de)}function so(a,y){for(var fe=[],de=0;de<a.sel.ranges.length;de++){var xe=a.sel.ranges[de];fe.push(new xr(qo(xe.anchor,y),qo(xe.head,y)))}return jr(a.cm,fe,a.sel.primIndex)}function oa(a,y,fe){return a.line==y.line?Et(fe.line,a.ch-y.ch+fe.ch):Et(fe.line+(a.line-y.line),a.ch)}function os(a,y,fe){for(var de=[],xe=Et(a.first,0),Fe=xe,Je=0;Je<y.length;Je++){var it=y[Je],at=oa(it.from,xe,Fe),ht=oa(Rr(it),xe,Fe);if(xe=it.to,Fe=ht,fe=="around"){var Rt=a.sel.ranges[Je],jt=Ut(Rt.head,Rt.anchor)<0;de[Je]=new xr(jt?ht:at,jt?at:ht)}else de[Je]=new xr(at,at)}return new si(de,a.sel.primIndex)}function aa(a){a.doc.mode=Ie(a.options,a.doc.modeOption),ga(a)}function ga(a){a.doc.iter(function(y){y.stateAfter&&(y.stateAfter=null),y.styles&&(y.styles=null)}),a.doc.modeFrontier=a.doc.highlightFrontier=a.doc.first,Ln(a,100),a.state.modeGen++,a.curOp&&Eo(a)}function ii(a,y){return y.from.ch==0&&y.to.ch==0&&xt(y.text)==""&&(!a.cm||a.cm.options.wholeLineUpdateBefore)}function Ai(a,y,fe,de){function xe(vr){return fe?fe[vr]:null}function Fe(vr,lr,Er){br(vr,lr,Er,de),Ii(vr,"change",vr,y)}function Je(vr,lr){for(var Er=[],ei=vr;ei<lr;++ei)Er.push(new Ir(ht[ei],xe(ei),de));return Er}var it=y.from,at=y.to,ht=y.text,Rt=Bt(a,it.line),jt=Bt(a,at.line),on=xt(ht),en=xe(ht.length-1),Tn=at.line-it.line;if(y.full)a.insert(0,Je(0,ht.length)),a.remove(ht.length,a.size-ht.length);else if(ii(a,y)){var Zn=Je(0,ht.length-1);Fe(jt,jt.text,en),Tn&&a.remove(it.line,Tn),Zn.length&&a.insert(it.line,Zn)}else if(Rt==jt)if(ht.length==1)Fe(Rt,Rt.text.slice(0,it.ch)+on+Rt.text.slice(at.ch),en);else{var Qn=Je(1,ht.length-1);Qn.push(new Ir(on+Rt.text.slice(at.ch),en,de)),Fe(Rt,Rt.text.slice(0,it.ch)+ht[0],xe(0)),a.insert(it.line+1,Qn)}else if(ht.length==1)Fe(Rt,Rt.text.slice(0,it.ch)+ht[0]+jt.text.slice(at.ch),xe(0)),a.remove(it.line+1,Tn);else{Fe(Rt,Rt.text.slice(0,it.ch)+ht[0],xe(0)),Fe(jt,on+jt.text.slice(at.ch),en);var sr=Je(1,ht.length-1);Tn>1&&a.remove(it.line+1,Tn-1),a.insert(it.line+1,sr)}Ii(a,"change",a,y)}function oo(a,y,fe){function de(xe,Fe,Je){if(xe.linked)for(var it=0;it<xe.linked.length;++it){var at=xe.linked[it];if(at.doc!=Fe){var ht=Je&&at.sharedHist;fe&&!ht||(y(at.doc,ht),de(at.doc,xe,ht))}}}de(a,null,!0)}function Ba(a,y){if(y.cm)throw new Error("This document is already in use.");a.doc=y,y.cm=a,fs(a),aa(a),jo(a),a.options.lineWrapping||ir(a),a.options.mode=y.modeOption,Eo(a)}function jo(a){(a.doc.direction=="rtl"?ot:ke)(a.display.lineDiv,"CodeMirror-rtl")}function Cs(a){wt(a,function(){jo(a),Eo(a)})}function Jo(a){this.done=[],this.undone=[],this.undoDepth=1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=a||1}function lo(a,y){var fe={from:rn(y.from),to:Rr(y),text:Jt(a,y.from,y.to)};return Do(a,fe,y.from.line,y.to.line+1),oo(a,function(de){return Do(de,fe,y.from.line,y.to.line+1)},!0),fe}function Fa(a){for(;a.length;){var y=xt(a);if(y.ranges)a.pop();else break}}function dl(a,y){if(y)return Fa(a.done),xt(a.done);if(a.done.length&&!xt(a.done).ranges)return xt(a.done);if(a.done.length>1&&!a.done[a.done.length-2].ranges)return a.done.pop(),xt(a.done)}function Xs(a,y,fe,de){var xe=a.history;xe.undone.length=0;var Fe=+new Date,Je,it;if((xe.lastOp==de||xe.lastOrigin==y.origin&&y.origin&&(y.origin.charAt(0)=="+"&&xe.lastModTime>Fe-(a.cm?a.cm.options.historyEventDelay:500)||y.origin.charAt(0)=="*"))&&(Je=dl(xe,xe.lastOp==de)))it=xt(Je.changes),Ut(y.from,y.to)==0&&Ut(y.from,it.to)==0?it.to=Rr(y):Je.changes.push(lo(a,y));else{var at=xt(xe.done);for((!at||!at.ranges)&&$i(a.sel,xe.done),Je={changes:[lo(a,y)],generation:xe.generation},xe.done.push(Je);xe.done.length>xe.undoDepth;)xe.done.shift(),xe.done[0].ranges||xe.done.shift()}xe.done.push(fe),xe.generation=++xe.maxGeneration,xe.lastModTime=xe.lastSelTime=Fe,xe.lastOp=xe.lastSelOp=de,xe.lastOrigin=xe.lastSelOrigin=y.origin,it||Ft(a,"historyAdded")}function fl(a,y,fe,de){var xe=y.charAt(0);return xe=="*"||xe=="+"&&fe.ranges.length==de.ranges.length&&fe.somethingSelected()==de.somethingSelected()&&new Date-a.history.lastSelTime<=(a.cm?a.cm.options.historyEventDelay:500)}function fi(a,y,fe,de){var xe=a.history,Fe=de&&de.origin;fe==xe.lastSelOp||Fe&&xe.lastSelOrigin==Fe&&(xe.lastModTime==xe.lastSelTime&&xe.lastOrigin==Fe||fl(a,Fe,xt(xe.done),y))?xe.done[xe.done.length-1]=y:$i(y,xe.done),xe.lastSelTime=+new Date,xe.lastSelOrigin=Fe,xe.lastSelOp=fe,de&&de.clearRedo!==!1&&Fa(xe.undone)}function $i(a,y){var fe=xt(y);fe&&fe.ranges&&fe.equals(a)||y.push(a)}function Do(a,y,fe,de){var xe=y["spans_"+a.id],Fe=0;a.iter(Math.max(a.first,fe),Math.min(a.first+a.size,de),function(Je){Je.markedSpans&&((xe||(xe=y["spans_"+a.id]={}))[Fe]=Je.markedSpans),++Fe})}function ya(a){if(!a)return null;for(var y,fe=0;fe<a.length;++fe)a[fe].marker.explicitlyCleared?y||(y=a.slice(0,fe)):y&&y.push(a[fe]);return y?y.length?y:null:a}function fo(a,y){var fe=y["spans_"+a.id];if(!fe)return null;for(var de=[],xe=0;xe<y.text.length;++xe)de.push(ya(fe[xe]));return de}function _a(a,y){var fe=fo(a,y),de=Hi(a,y);if(!fe)return de;if(!de)return fe;for(var xe=0;xe<fe.length;++xe){var Fe=fe[xe],Je=de[xe];if(Fe&&Je)e:for(var it=0;it<Je.length;++it){for(var at=Je[it],ht=0;ht<Fe.length;++ht)if(Fe[ht].marker==at.marker)continue e;Fe.push(at)}else Je&&(fe[xe]=Je)}return fe}function ha(a,y,fe){for(var de=[],xe=0;xe<a.length;++xe){var Fe=a[xe];if(Fe.ranges){de.push(fe?si.prototype.deepCopy.call(Fe):Fe);continue}var Je=Fe.changes,it=[];de.push({changes:it});for(var at=0;at<Je.length;++at){var ht=Je[at],Rt=void 0;if(it.push({from:ht.from,to:ht.to,text:ht.text}),y)for(var jt in ht)(Rt=jt.match(/^spans_(\d+)$/))&&Ve(y,Number(Rt[1]))>-1&&(xt(it)[jt]=ht[jt],delete ht[jt])}}return de}function Ka(a,y,fe,de){if(de){var xe=a.anchor;if(fe){var Fe=Ut(y,xe)<0;Fe!=Ut(fe,xe)<0?(xe=y,y=fe):Fe!=Ut(y,fe)<0&&(y=fe)}return new xr(xe,y)}else return new xr(fe||y,y)}function Va(a,y,fe,de,xe){xe==null&&(xe=a.cm&&(a.cm.display.shift||a.extend)),Uo(a,new si([Ka(a.sel.primary(),y,fe,xe)],0),de)}function ja(a,y,fe){for(var de=[],xe=a.cm&&(a.cm.display.shift||a.extend),Fe=0;Fe<a.sel.ranges.length;Fe++)de[Fe]=Ka(a.sel.ranges[Fe],y[Fe],null,xe);var Je=jr(a.cm,de,a.sel.primIndex);Uo(a,Je,fe)}function Ps(a,y,fe,de){var xe=a.sel.ranges.slice(0);xe[y]=fe,Uo(a,jr(a.cm,xe,a.sel.primIndex),de)}function as(a,y,fe,de){Uo(a,mi(y,fe),de)}function hl(a,y,fe){var de={ranges:y.ranges,update:function(xe){this.ranges=[];for(var Fe=0;Fe<xe.length;Fe++)this.ranges[Fe]=new xr(Gt(a,xe[Fe].anchor),Gt(a,xe[Fe].head))},origin:fe&&fe.origin};return Ft(a,"beforeSelectionChange",a,de),a.cm&&Ft(a.cm,"beforeSelectionChange",a.cm,de),de.ranges!=y.ranges?jr(a.cm,de.ranges,de.ranges.length-1):y}function El(a,y,fe){var de=a.history.done,xe=xt(de);xe&&xe.ranges?(de[de.length-1]=y,Js(a,y,fe)):Uo(a,y,fe)}function Uo(a,y,fe){Js(a,y,fe),fi(a,a.sel,a.cm?a.cm.curOp.id:NaN,fe)}function Js(a,y,fe){(Lt(a,"beforeSelectionChange")||a.cm&&Lt(a.cm,"beforeSelectionChange"))&&(y=hl(a,y,fe));var de=fe&&fe.bias||(Ut(y.primary().head,a.sel.primary().head)<0?-1:1);kl(a,Al(a,y,de,!0)),!(fe&&fe.scroll===!1)&&a.cm&&La(a.cm)}function kl(a,y){y.equals(a.sel)||(a.sel=y,a.cm&&(a.cm.curOp.updateInput=1,a.cm.curOp.selectionChanged=!0,Xt(a.cm)),Ii(a,"cursorActivity",a))}function Ll(a){kl(a,Al(a,a.sel,null,!1))}function Al(a,y,fe,de){for(var xe,Fe=0;Fe<y.ranges.length;Fe++){var Je=y.ranges[Fe],it=y.ranges.length==a.sel.ranges.length&&a.sel.ranges[Fe],at=Qs(a,Je.anchor,it&&it.anchor,fe,de),ht=Qs(a,Je.head,it&&it.head,fe,de);(xe||at!=Je.anchor||ht!=Je.head)&&(xe||(xe=y.ranges.slice(0,Fe)),xe[Fe]=new xr(at,ht))}return xe?jr(a.cm,xe,y.primIndex):y}function Es(a,y,fe,de,xe){var Fe=Bt(a,y.line);if(Fe.markedSpans)for(var Je=0;Je<Fe.markedSpans.length;++Je){var it=Fe.markedSpans[Je],at=it.marker,ht="selectLeft"in at?!at.selectLeft:at.inclusiveLeft,Rt="selectRight"in at?!at.selectRight:at.inclusiveRight;if((it.from==null||(ht?it.from<=y.ch:it.from<y.ch))&&(it.to==null||(Rt?it.to>=y.ch:it.to>y.ch))){if(xe&&(Ft(at,"beforeCursorEnter"),at.explicitlyCleared))if(Fe.markedSpans){--Je;continue}else break;if(!at.atomic)continue;if(fe){var jt=at.find(de<0?1:-1),on=void 0;if((de<0?Rt:ht)&&(jt=Tl(a,jt,-de,jt&&jt.line==y.line?Fe:null)),jt&&jt.line==y.line&&(on=Ut(jt,fe))&&(de<0?on<0:on>0))return Es(a,jt,y,de,xe)}var en=at.find(de<0?-1:1);return(de<0?ht:Rt)&&(en=Tl(a,en,de,en.line==y.line?Fe:null)),en?Es(a,en,y,de,xe):null}}return y}function Qs(a,y,fe,de,xe){var Fe=de||1,Je=Es(a,y,fe,Fe,xe)||!xe&&Es(a,y,fe,Fe,!0)||Es(a,y,fe,-Fe,xe)||!xe&&Es(a,y,fe,-Fe,!0);return Je||(a.cantEdit=!0,Et(a.first,0))}function Tl(a,y,fe,de){return fe<0&&y.ch==0?y.line>a.first?Gt(a,Et(y.line-1)):null:fe>0&&y.ch==(de||Bt(a,y.line)).text.length?y.line<a.first+a.size-1?Et(y.line+1,0):null:new Et(y.line,y.ch+fe)}function Dl(a){a.setSelection(Et(a.firstLine(),0),Et(a.lastLine()),et)}function Ml(a,y,fe){var de={canceled:!1,from:y.from,to:y.to,text:y.text,origin:y.origin,cancel:function(){return de.canceled=!0}};return fe&&(de.update=function(xe,Fe,Je,it){xe&&(de.from=Gt(a,xe)),Fe&&(de.to=Gt(a,Fe)),Je&&(de.text=Je),it!==void 0&&(de.origin=it)}),Ft(a,"beforeChange",a,de),a.cm&&Ft(a.cm,"beforeChange",a.cm,de),de.canceled?(a.cm&&(a.cm.curOp.updateInput=2),null):{from:de.from,to:de.to,text:de.text,origin:de.origin}}function ks(a,y,fe){if(a.cm){if(!a.cm.curOp)return Xn(a.cm,ks)(a,y,fe);if(a.cm.state.suppressEdits)return}if(!((Lt(a,"beforeChange")||a.cm&&Lt(a.cm,"beforeChange"))&&(y=Ml(a,y,!0),!y))){var de=Si&&!fe&&tn(a,y.from,y.to);if(de)for(var xe=de.length-1;xe>=0;--xe)Rl(a,{from:de[xe].from,to:de[xe].to,text:xe?[""]:y.text,origin:y.origin});else Rl(a,y)}}function Rl(a,y){if(!(y.text.length==1&&y.text[0]==""&&Ut(y.from,y.to)==0)){var fe=so(a,y);Xs(a,y,fe,a.cm?a.cm.curOp.id:NaN),Ns(a,y,fe,Hi(a,y));var de=[];oo(a,function(xe,Fe){!Fe&&Ve(de,xe.history)==-1&&(Nl(xe.history,y),de.push(xe.history)),Ns(xe,y,null,Hi(xe,y))})}}function $s(a,y,fe){var de=a.cm&&a.cm.state.suppressEdits;if(!(de&&!fe)){for(var xe=a.history,Fe,Je=a.sel,it=y=="undo"?xe.done:xe.undone,at=y=="undo"?xe.undone:xe.done,ht=0;ht<it.length&&(Fe=it[ht],!(fe?Fe.ranges&&!Fe.equals(a.sel):!Fe.ranges));ht++);if(ht!=it.length){for(xe.lastOrigin=xe.lastSelOrigin=null;;)if(Fe=it.pop(),Fe.ranges){if($i(Fe,at),fe&&!Fe.equals(a.sel)){Uo(a,Fe,{clearRedo:!1});return}Je=Fe}else if(de){it.push(Fe);return}else break;var Rt=[];$i(Je,at),at.push({changes:Rt,generation:xe.generation}),xe.generation=Fe.generation||++xe.maxGeneration;for(var jt=Lt(a,"beforeChange")||a.cm&&Lt(a.cm,"beforeChange"),on=function(Zn){var Qn=Fe.changes[Zn];if(Qn.origin=y,jt&&!Ml(a,Qn,!1))return it.length=0,{};Rt.push(lo(a,Qn));var sr=Zn?so(a,Qn):xt(it);Ns(a,Qn,sr,_a(a,Qn)),!Zn&&a.cm&&a.cm.scrollIntoView({from:Qn.from,to:Rr(Qn)});var vr=[];oo(a,function(lr,Er){!Er&&Ve(vr,lr.history)==-1&&(Nl(lr.history,Qn),vr.push(lr.history)),Ns(lr,Qn,null,_a(lr,Qn))})},en=Fe.changes.length-1;en>=0;--en){var Tn=on(en);if(Tn)return Tn.v}}}}function Il(a,y){if(y!=0&&(a.first+=y,a.sel=new si(gt(a.sel.ranges,function(xe){return new xr(Et(xe.anchor.line+y,xe.anchor.ch),Et(xe.head.line+y,xe.head.ch))}),a.sel.primIndex),a.cm)){Eo(a.cm,a.first,a.first-y,y);for(var fe=a.cm.display,de=fe.viewFrom;de<fe.viewTo;de++)ko(a.cm,de,"gutter")}}function Ns(a,y,fe,de){if(a.cm&&!a.cm.curOp)return Xn(a.cm,Ns)(a,y,fe,de);if(y.to.line<a.first){Il(a,y.text.length-1-(y.to.line-y.from.line));return}if(!(y.from.line>a.lastLine())){if(y.from.line<a.first){var xe=y.text.length-1-(a.first-y.from.line);Il(a,xe),y={from:Et(a.first,0),to:Et(y.to.line+xe,y.to.ch),text:[xt(y.text)],origin:y.origin}}var Fe=a.lastLine();y.to.line>Fe&&(y={from:y.from,to:Et(Fe,Bt(a,Fe).text.length),text:[y.text[0]],origin:y.origin}),y.removed=Jt(a,y.from,y.to),fe||(fe=so(a,y)),a.cm?pu(a.cm,y,de):Ai(a,y,de),Js(a,fe,et),a.cantEdit&&Qs(a,Et(a.firstLine(),0))&&(a.cantEdit=!1)}}function pu(a,y,fe){var de=a.doc,xe=a.display,Fe=y.from,Je=y.to,it=!1,at=Fe.line;a.options.lineWrapping||(at=At(un(Bt(de,Fe.line))),de.iter(at,Je.line+1,function(en){if(en==xe.maxLine)return it=!0,!0})),de.sel.contains(y.from,y.to)>-1&&Xt(a),Ai(de,y,fe,ds(a)),a.options.lineWrapping||(de.iter(at,Fe.line+y.text.length,function(en){var Tn=fr(en);Tn>xe.maxLineLength&&(xe.maxLine=en,xe.maxLineLength=Tn,xe.maxLineChanged=!0,it=!1)}),it&&(a.curOp.updateMaxLine=!0)),_i(de,Fe.line),Ln(a,400);var ht=y.text.length-(Je.line-Fe.line)-1;y.full?Eo(a):Fe.line==Je.line&&y.text.length==1&&!ii(a.doc,y)?ko(a,Fe.line,"text"):Eo(a,Fe.line,Je.line+1,ht);var Rt=Lt(a,"changes"),jt=Lt(a,"change");if(jt||Rt){var on={from:Fe,to:Je,text:y.text,removed:y.removed,origin:y.origin};jt&&Ii(a,"change",a,on),Rt&&(a.curOp.changeObjs||(a.curOp.changeObjs=[])).push(on)}a.display.selForContextMenu=null}function Ls(a,y,fe,de,xe){var Fe;de||(de=fe),Ut(de,fe)<0&&(Fe=[de,fe],fe=Fe[0],de=Fe[1]),typeof y=="string"&&(y=a.splitLines(y)),ks(a,{from:fe,to:de,text:y,origin:xe})}function Ol(a,y,fe,de){fe<a.line?a.line+=de:y<a.line&&(a.line=y,a.ch=0)}function Pl(a,y,fe,de){for(var xe=0;xe<a.length;++xe){var Fe=a[xe],Je=!0;if(Fe.ranges){Fe.copied||(Fe=a[xe]=Fe.deepCopy(),Fe.copied=!0);for(var it=0;it<Fe.ranges.length;it++)Ol(Fe.ranges[it].anchor,y,fe,de),Ol(Fe.ranges[it].head,y,fe,de);continue}for(var at=0;at<Fe.changes.length;++at){var ht=Fe.changes[at];if(fe<ht.from.line)ht.from=Et(ht.from.line+de,ht.from.ch),ht.to=Et(ht.to.line+de,ht.to.ch);else if(y<=ht.to.line){Je=!1;break}}Je||(a.splice(0,xe+1),xe=0)}}function Nl(a,y){var fe=y.from.line,de=y.to.line,xe=y.text.length-(de-fe)-1;Pl(a.done,fe,de,xe),Pl(a.undone,fe,de,xe)}function Bs(a,y,fe,de){var xe=y,Fe=y;return typeof y=="number"?Fe=Bt(a,An(a,y)):xe=At(y),xe==null?null:(de(Fe,xe)&&a.cm&&ko(a.cm,xe,fe),Fe)}function Fs(a){this.lines=a,this.parent=null;for(var y=0,fe=0;fe<a.length;++fe)a[fe].parent=this,y+=a[fe].height;this.height=y}Fs.prototype={chunkSize:function(){return this.lines.length},removeInner:function(a,y){for(var fe=a,de=a+y;fe<de;++fe){var xe=this.lines[fe];this.height-=xe.height,Mr(xe),Ii(xe,"delete")}this.lines.splice(a,y)},collapse:function(a){a.push.apply(a,this.lines)},insertInner:function(a,y,fe){this.height+=fe,this.lines=this.lines.slice(0,a).concat(y).concat(this.lines.slice(a));for(var de=0;de<y.length;++de)y[de].parent=this},iterN:function(a,y,fe){for(var de=a+y;a<de;++a)if(fe(this.lines[a]))return!0}};function js(a){this.children=a;for(var y=0,fe=0,de=0;de<a.length;++de){var xe=a[de];y+=xe.chunkSize(),fe+=xe.height,xe.parent=this}this.size=y,this.height=fe,this.parent=null}js.prototype={chunkSize:function(){return this.size},removeInner:function(a,y){this.size-=y;for(var fe=0;fe<this.children.length;++fe){var de=this.children[fe],xe=de.chunkSize();if(a<xe){var Fe=Math.min(y,xe-a),Je=de.height;if(de.removeInner(a,Fe),this.height-=Je-de.height,xe==Fe&&(this.children.splice(fe--,1),de.parent=null),(y-=Fe)==0)break;a=0}else a-=xe}if(this.size-y<25&&(this.children.length>1||!(this.children[0]instanceof Fs))){var it=[];this.collapse(it),this.children=[new Fs(it)],this.children[0].parent=this}},collapse:function(a){for(var y=0;y<this.children.length;++y)this.children[y].collapse(a)},insertInner:function(a,y,fe){this.size+=y.length,this.height+=fe;for(var de=0;de<this.children.length;++de){var xe=this.children[de],Fe=xe.chunkSize();if(a<=Fe){if(xe.insertInner(a,y,fe),xe.lines&&xe.lines.length>50){for(var Je=xe.lines.length%25+25,it=Je;it<xe.lines.length;){var at=new Fs(xe.lines.slice(it,it+=25));xe.height-=at.height,this.children.splice(++de,0,at),at.parent=this}xe.lines=xe.lines.slice(0,Je),this.maybeSpill()}break}a-=Fe}},maybeSpill:function(){if(!(this.children.length<=10)){var a=this;do{var y=a.children.splice(a.children.length-5,5),fe=new js(y);if(a.parent){a.size-=fe.size,a.height-=fe.height;var xe=Ve(a.parent.children,a);a.parent.children.splice(xe+1,0,fe)}else{var de=new js(a.children);de.parent=a,a.children=[de,fe],a=de}fe.parent=a.parent}while(a.children.length>10);a.parent.maybeSpill()}},iterN:function(a,y,fe){for(var de=0;de<this.children.length;++de){var xe=this.children[de],Fe=xe.chunkSize();if(a<Fe){var Je=Math.min(y,Fe-a);if(xe.iterN(a,Je,fe))return!0;if((y-=Je)==0)break;a=0}else a-=Fe}}};var Us=function(a,y,fe){if(fe)for(var de in fe)fe.hasOwnProperty(de)&&(this[de]=fe[de]);this.doc=a,this.node=y};Us.prototype.clear=function(){var a=this.doc.cm,y=this.line.widgets,fe=this.line,de=At(fe);if(!(de==null||!y)){for(var xe=0;xe<y.length;++xe)y[xe]==this&&y.splice(xe--,1);y.length||(fe.widgets=null);var Fe=Yi(this);qn(fe,Math.max(0,fe.height-Fe)),a&&(wt(a,function(){Bl(a,fe,-Fe),ko(a,de,"widget")}),Ii(a,"lineWidgetCleared",a,this,de))}},Us.prototype.changed=function(){var a=this,y=this.height,fe=this.doc.cm,de=this.line;this.height=null;var xe=Yi(this)-y;xe&&(Mn(this.doc,de)||qn(de,de.height+xe),fe&&wt(fe,function(){fe.curOp.forceUpdate=!0,Bl(fe,de,xe),Ii(fe,"lineWidgetChanged",fe,a,At(de))}))},Kt(Us);function Bl(a,y,fe){Yn(y)<(a.curOp&&a.curOp.scrollTop||a.doc.scrollTop)&&rs(a,fe)}function mu(a,y,fe,de){var xe=new Us(a,fe,de),Fe=a.cm;return Fe&&xe.noHScroll&&(Fe.display.alignWidgets=!0),Bs(a,y,"widget",function(Je){var it=Je.widgets||(Je.widgets=[]);if(xe.insertAt==null?it.push(xe):it.splice(Math.min(it.length-1,Math.max(0,xe.insertAt)),0,xe),xe.line=Je,Fe&&!Mn(a,Je)){var at=Yn(Je)<a.scrollTop;qn(Je,Je.height+Yi(xe)),at&&rs(Fe,xe.height),Fe.curOp.forceUpdate=!0}return!0}),Fe&&Ii(Fe,"lineWidgetAdded",Fe,xe,typeof y=="number"?y:At(y)),xe}var Fl=0,ss=function(a,y){this.lines=[],this.type=y,this.doc=a,this.id=++Fl};ss.prototype.clear=function(){if(!this.explicitlyCleared){var a=this.doc.cm,y=a&&!a.curOp;if(y&&Po(a),Lt(this,"clear")){var fe=this.find();fe&&Ii(this,"clear",fe.from,fe.to)}for(var de=null,xe=null,Fe=0;Fe<this.lines.length;++Fe){var Je=this.lines[Fe],it=Cr(Je.markedSpans,this);a&&!this.collapsed?ko(a,At(Je),"text"):a&&(it.to!=null&&(xe=At(Je)),it.from!=null&&(de=At(Je))),Je.markedSpans=Ar(Je.markedSpans,it),it.from==null&&this.collapsed&&!Mn(this.doc,Je)&&a&&qn(Je,yo(a.display))}if(a&&this.collapsed&&!a.options.lineWrapping)for(var at=0;at<this.lines.length;++at){var ht=un(this.lines[at]),Rt=fr(ht);Rt>a.display.maxLineLength&&(a.display.maxLine=ht,a.display.maxLineLength=Rt,a.display.maxLineChanged=!0)}de!=null&&a&&this.collapsed&&Eo(a,de,xe+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,a&&Ll(a.doc)),a&&Ii(a,"markerCleared",a,this,de,xe),y&&fa(a),this.parent&&this.parent.clear()}},ss.prototype.find=function(a,y){a==null&&this.type=="bookmark"&&(a=1);for(var fe,de,xe=0;xe<this.lines.length;++xe){var Fe=this.lines[xe],Je=Cr(Fe.markedSpans,this);if(Je.from!=null&&(fe=Et(y?Fe:At(Fe),Je.from),a==-1))return fe;if(Je.to!=null&&(de=Et(y?Fe:At(Fe),Je.to),a==1))return de}return fe&&{from:fe,to:de}},ss.prototype.changed=function(){var a=this,y=this.find(-1,!0),fe=this,de=this.doc.cm;!y||!de||wt(de,function(){var xe=y.line,Fe=At(y.line),Je=Yo(de,Fe);if(Je&&(Ha(Je),de.curOp.selectionChanged=de.curOp.forceUpdate=!0),de.curOp.updateMaxLine=!0,!Mn(fe.doc,xe)&&fe.height!=null){var it=fe.height;fe.height=null;var at=Yi(fe)-it;at&&qn(xe,xe.height+at)}Ii(de,"markerChanged",de,a)})},ss.prototype.attachLine=function(a){if(!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(!y.maybeHiddenMarkers||Ve(y.maybeHiddenMarkers,this)==-1)&&(y.maybeUnhiddenMarkers||(y.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(a)},ss.prototype.detachLine=function(a){if(this.lines.splice(Ve(this.lines,a),1),!this.lines.length&&this.doc.cm){var y=this.doc.cm.curOp;(y.maybeHiddenMarkers||(y.maybeHiddenMarkers=[])).push(this)}},Kt(ss);function As(a,y,fe,de,xe){if(de&&de.shared)return vu(a,y,fe,de,xe);if(a.cm&&!a.cm.curOp)return Xn(a.cm,As)(a,y,fe,de,xe);var Fe=new ss(a,xe),Je=Ut(y,fe);if(de&&ut(de,Fe,!1),Je>0||Je==0&&Fe.clearWhenEmpty!==!1)return Fe;if(Fe.replacedWith&&(Fe.collapsed=!0,Fe.widgetNode=je("span",[Fe.replacedWith],"CodeMirror-widget"),de.handleMouseEvents||Fe.widgetNode.setAttribute("cm-ignore-events","true"),de.insertLeft&&(Fe.widgetNode.insertLeft=!0)),Fe.collapsed){if(dn(a,y.line,y,fe,Fe)||y.line!=fe.line&&dn(a,fe.line,y,fe,Fe))throw new Error("Inserting collapsed marker partially overlapping an existing one");Li()}Fe.addToHistory&&Xs(a,{from:y,to:fe,origin:"markText"},a.sel,NaN);var it=y.line,at=a.cm,ht;if(a.iter(it,fe.line+1,function(jt){at&&Fe.collapsed&&!at.options.lineWrapping&&un(jt)==at.display.maxLine&&(ht=!0),Fe.collapsed&&it!=y.line&&qn(jt,0),$r(jt,new rr(Fe,it==y.line?y.ch:null,it==fe.line?fe.ch:null)),++it}),Fe.collapsed&&a.iter(y.line,fe.line+1,function(jt){Mn(a,jt)&&qn(jt,0)}),Fe.clearOnEnter&&vt(Fe,"beforeCursorEnter",function(){return Fe.clear()}),Fe.readOnly&&(Mi(),(a.history.done.length||a.history.undone.length)&&a.clearHistory()),Fe.collapsed&&(Fe.id=++Fl,Fe.atomic=!0),at){if(ht&&(at.curOp.updateMaxLine=!0),Fe.collapsed)Eo(at,y.line,fe.line+1);else if(Fe.className||Fe.startStyle||Fe.endStyle||Fe.css||Fe.attributes||Fe.title)for(var Rt=y.line;Rt<=fe.line;Rt++)ko(at,Rt,"text");Fe.atomic&&Ll(at.doc),Ii(at,"markerAdded",at,Fe)}return Fe}var zs=function(a,y){this.markers=a,this.primary=y;for(var fe=0;fe<a.length;++fe)a[fe].parent=this};zs.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var a=0;a<this.markers.length;++a)this.markers[a].clear();Ii(this,"clear")}},zs.prototype.find=function(a,y){return this.primary.find(a,y)},Kt(zs);function vu(a,y,fe,de,xe){de=ut(de),de.shared=!1;var Fe=[As(a,y,fe,de,xe)],Je=Fe[0],it=de.widgetNode;return oo(a,function(at){it&&(de.widgetNode=it.cloneNode(!0)),Fe.push(As(at,Gt(at,y),Gt(at,fe),de,xe));for(var ht=0;ht<at.linked.length;++ht)if(at.linked[ht].isParent)return;Je=xt(Fe)}),new zs(Fe,Je)}function jl(a){return a.findMarks(Et(a.first,0),a.clipPos(Et(a.lastLine())),function(y){return y.parent})}function gu(a,y){for(var fe=0;fe<y.length;fe++){var de=y[fe],xe=de.find(),Fe=a.clipPos(xe.from),Je=a.clipPos(xe.to);if(Ut(Fe,Je)){var it=As(a,Fe,Je,de.primary,de.primary.type);de.markers.push(it),it.parent=de}}}function yu(a){for(var y=function(de){var xe=a[de],Fe=[xe.primary.doc];oo(xe.primary.doc,function(at){return Fe.push(at)});for(var Je=0;Je<xe.markers.length;Je++){var it=xe.markers[Je];Ve(Fe,it.doc)==-1&&(it.parent=null,xe.markers.splice(Je--,1))}},fe=0;fe<a.length;fe++)y(fe)}var _u=0,Qo=function(a,y,fe,de,xe){if(!(this instanceof Qo))return new Qo(a,y,fe,de,xe);fe==null&&(fe=0),js.call(this,[new Fs([new Ir("",null)])]),this.first=fe,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=fe;var Fe=Et(fe,0);this.sel=mi(Fe),this.history=new Jo(null),this.id=++_u,this.modeOption=y,this.lineSep=de,this.direction=xe=="rtl"?"rtl":"ltr",this.extend=!1,typeof a=="string"&&(a=this.splitLines(a)),Ai(this,{from:Fe,to:Fe,text:a}),Uo(this,mi(Fe),et)};Qo.prototype=Ae(js.prototype,{constructor:Qo,iter:function(a,y,fe){fe?this.iterN(a-this.first,y-a,fe):this.iterN(this.first,this.first+this.size,a)},insert:function(a,y){for(var fe=0,de=0;de<y.length;++de)fe+=y[de].height;this.insertInner(a-this.first,y,fe)},remove:function(a,y){this.removeInner(a-this.first,y)},getValue:function(a){var y=En(this,this.first,this.first+this.size);return a===!1?y:y.join(a||this.lineSeparator())},setValue:pn(function(a){var y=Et(this.first,0),fe=this.first+this.size-1;ks(this,{from:y,to:Et(fe,Bt(this,fe).text.length),text:this.splitLines(a),origin:"setValue",full:!0},!0),this.cm&&Br(this.cm,0,0),Uo(this,mi(y),et)}),replaceRange:function(a,y,fe,de){y=Gt(this,y),fe=fe?Gt(this,fe):y,Ls(this,a,y,fe,de)},getRange:function(a,y,fe){var de=Jt(this,Gt(this,a),Gt(this,y));return fe===!1?de:de.join(fe||this.lineSeparator())},getLine:function(a){var y=this.getLineHandle(a);return y&&y.text},getLineHandle:function(a){if(an(this,a))return Bt(this,a)},getLineNumber:function(a){return At(a)},getLineHandleVisualStart:function(a){return typeof a=="number"&&(a=Bt(this,a)),un(a)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(a){return Gt(this,a)},getCursor:function(a){var y=this.sel.primary(),fe;return a==null||a=="head"?fe=y.head:a=="anchor"?fe=y.anchor:a=="end"||a=="to"||a===!1?fe=y.to():fe=y.from(),fe},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:pn(function(a,y,fe){as(this,Gt(this,typeof a=="number"?Et(a,y||0):a),null,fe)}),setSelection:pn(function(a,y,fe){as(this,Gt(this,a),Gt(this,y||a),fe)}),extendSelection:pn(function(a,y,fe){Va(this,Gt(this,a),y&&Gt(this,y),fe)}),extendSelections:pn(function(a,y){ja(this,wn(this,a),y)}),extendSelectionsBy:pn(function(a,y){var fe=gt(this.sel.ranges,a);ja(this,wn(this,fe),y)}),setSelections:pn(function(a,y,fe){if(a.length){for(var de=[],xe=0;xe<a.length;xe++)de[xe]=new xr(Gt(this,a[xe].anchor),Gt(this,a[xe].head));y==null&&(y=Math.min(a.length-1,this.sel.primIndex)),Uo(this,jr(this.cm,de,y),fe)}}),addSelection:pn(function(a,y,fe){var de=this.sel.ranges.slice(0);de.push(new xr(Gt(this,a),Gt(this,y||a))),Uo(this,jr(this.cm,de,de.length-1),fe)}),getSelection:function(a){for(var y=this.sel.ranges,fe,de=0;de<y.length;de++){var xe=Jt(this,y[de].from(),y[de].to());fe=fe?fe.concat(xe):xe}return a===!1?fe:fe.join(a||this.lineSeparator())},getSelections:function(a){for(var y=[],fe=this.sel.ranges,de=0;de<fe.length;de++){var xe=Jt(this,fe[de].from(),fe[de].to());a!==!1&&(xe=xe.join(a||this.lineSeparator())),y[de]=xe}return y},replaceSelection:function(a,y,fe){for(var de=[],xe=0;xe<this.sel.ranges.length;xe++)de[xe]=a;this.replaceSelections(de,y,fe||"+input")},replaceSelections:pn(function(a,y,fe){for(var de=[],xe=this.sel,Fe=0;Fe<xe.ranges.length;Fe++){var Je=xe.ranges[Fe];de[Fe]={from:Je.from(),to:Je.to(),text:this.splitLines(a[Fe]),origin:fe}}for(var it=y&&y!="end"&&os(this,de,y),at=de.length-1;at>=0;at--)ks(this,de[at]);it?El(this,it):this.cm&&La(this.cm)}),undo:pn(function(){$s(this,"undo")}),redo:pn(function(){$s(this,"redo")}),undoSelection:pn(function(){$s(this,"undo",!0)}),redoSelection:pn(function(){$s(this,"redo",!0)}),setExtending:function(a){this.extend=a},getExtending:function(){return this.extend},historySize:function(){for(var a=this.history,y=0,fe=0,de=0;de<a.done.length;de++)a.done[de].ranges||++y;for(var xe=0;xe<a.undone.length;xe++)a.undone[xe].ranges||++fe;return{undo:y,redo:fe}},clearHistory:function(){var a=this;this.history=new Jo(this.history.maxGeneration),oo(this,function(y){return y.history=a.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(a){return a&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(a){return this.history.generation==(a||this.cleanGeneration)},getHistory:function(){return{done:ha(this.history.done),undone:ha(this.history.undone)}},setHistory:function(a){var y=this.history=new Jo(this.history.maxGeneration);y.done=ha(a.done.slice(0),null,!0),y.undone=ha(a.undone.slice(0),null,!0)},setGutterMarker:pn(function(a,y,fe){return Bs(this,a,"gutter",function(de){var xe=de.gutterMarkers||(de.gutterMarkers={});return xe[y]=fe,!fe&&Ne(xe)&&(de.gutterMarkers=null),!0})}),clearGutter:pn(function(a){var y=this;this.iter(function(fe){fe.gutterMarkers&&fe.gutterMarkers[a]&&Bs(y,fe,"gutter",function(){return fe.gutterMarkers[a]=null,Ne(fe.gutterMarkers)&&(fe.gutterMarkers=null),!0})})}),lineInfo:function(a){var y;if(typeof a=="number"){if(!an(this,a)||(y=a,a=Bt(this,a),!a))return null}else if(y=At(a),y==null)return null;return{line:y,handle:a,text:a.text,gutterMarkers:a.gutterMarkers,textClass:a.textClass,bgClass:a.bgClass,wrapClass:a.wrapClass,widgets:a.widgets}},addLineClass:pn(function(a,y,fe){return Bs(this,a,y=="gutter"?"gutter":"class",function(de){var xe=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass";if(!de[xe])de[xe]=fe;else{if(pe(fe).test(de[xe]))return!1;de[xe]+=" "+fe}return!0})}),removeLineClass:pn(function(a,y,fe){return Bs(this,a,y=="gutter"?"gutter":"class",function(de){var xe=y=="text"?"textClass":y=="background"?"bgClass":y=="gutter"?"gutterClass":"wrapClass",Fe=de[xe];if(Fe)if(fe==null)de[xe]=null;else{var Je=Fe.match(pe(fe));if(!Je)return!1;var it=Je.index+Je[0].length;de[xe]=Fe.slice(0,Je.index)+(!Je.index||it==Fe.length?"":" ")+Fe.slice(it)||null}else return!1;return!0})}),addLineWidget:pn(function(a,y,fe){return mu(this,a,y,fe)}),removeLineWidget:function(a){a.clear()},markText:function(a,y,fe){return As(this,Gt(this,a),Gt(this,y),fe,fe&&fe.type||"range")},setBookmark:function(a,y){var fe={replacedWith:y&&(y.nodeType==null?y.widget:y),insertLeft:y&&y.insertLeft,clearWhenEmpty:!1,shared:y&&y.shared,handleMouseEvents:y&&y.handleMouseEvents};return a=Gt(this,a),As(this,a,a,fe,"bookmark")},findMarksAt:function(a){a=Gt(this,a);var y=[],fe=Bt(this,a.line).markedSpans;if(fe)for(var de=0;de<fe.length;++de){var xe=fe[de];(xe.from==null||xe.from<=a.ch)&&(xe.to==null||xe.to>=a.ch)&&y.push(xe.marker.parent||xe.marker)}return y},findMarks:function(a,y,fe){a=Gt(this,a),y=Gt(this,y);var de=[],xe=a.line;return this.iter(a.line,y.line+1,function(Fe){var Je=Fe.markedSpans;if(Je)for(var it=0;it<Je.length;it++){var at=Je[it];!(at.to!=null&&xe==a.line&&a.ch>=at.to||at.from==null&&xe!=a.line||at.from!=null&&xe==y.line&&at.from>=y.ch)&&(!fe||fe(at.marker))&&de.push(at.marker.parent||at.marker)}++xe}),de},getAllMarks:function(){var a=[];return this.iter(function(y){var fe=y.markedSpans;if(fe)for(var de=0;de<fe.length;++de)fe[de].from!=null&&a.push(fe[de].marker)}),a},posFromIndex:function(a){var y,fe=this.first,de=this.lineSeparator().length;return this.iter(function(xe){var Fe=xe.text.length+de;if(Fe>a)return y=a,!0;a-=Fe,++fe}),Gt(this,Et(fe,y))},indexFromPos:function(a){a=Gt(this,a);var y=a.ch;if(a.line<this.first||a.ch<0)return 0;var fe=this.lineSeparator().length;return this.iter(this.first,a.line,function(de){y+=de.text.length+fe}),y},copy:function(a){var y=new Qo(En(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return y.scrollTop=this.scrollTop,y.scrollLeft=this.scrollLeft,y.sel=this.sel,y.extend=!1,a&&(y.history.undoDepth=this.history.undoDepth,y.setHistory(this.getHistory())),y},linkedDoc:function(a){a||(a={});var y=this.first,fe=this.first+this.size;a.from!=null&&a.from>y&&(y=a.from),a.to!=null&&a.to<fe&&(fe=a.to);var de=new Qo(En(this,y,fe),a.mode||this.modeOption,y,this.lineSep,this.direction);return a.sharedHist&&(de.history=this.history),(this.linked||(this.linked=[])).push({doc:de,sharedHist:a.sharedHist}),de.linked=[{doc:this,isParent:!0,sharedHist:a.sharedHist}],gu(de,jl(this)),de},unlinkDoc:function(a){if(a instanceof uo&&(a=a.doc),this.linked)for(var y=0;y<this.linked.length;++y){var fe=this.linked[y];if(fe.doc==a){this.linked.splice(y,1),a.unlinkDoc(this),yu(jl(this));break}}if(a.history==this.history){var de=[a.id];oo(a,function(xe){return de.push(xe.id)},!0),a.history=new Jo(null),a.history.done=ha(this.history.done,de),a.history.undone=ha(this.history.undone,de)}},iterLinkedDocs:function(a){oo(this,a)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(a){return this.lineSep?a.split(this.lineSep):or(a)},lineSeparator:function(){return this.lineSep||`
|
|
|
`},setDirection:pn(function(a){a!="rtl"&&(a="ltr"),a!=this.direction&&(this.direction=a,this.iter(function(y){return y.order=null}),this.cm&&Cs(this.cm))})}),Qo.prototype.eachLine=Qo.prototype.iter;var Ul=0;function bu(a){var y=this;if(zl(y),!(yt(y,a)||Xi(y.display,a))){sn(a),se&&(Ul=+new Date);var fe=da(y,a,!0),de=a.dataTransfer.files;if(!(!fe||y.isReadOnly()))if(de&&de.length&&window.FileReader&&window.File)for(var xe=de.length,Fe=Array(xe),Je=0,it=function(){++Je==xe&&Xn(y,function(){fe=Gt(y.doc,fe);var en={from:fe,to:fe,text:y.doc.splitLines(Fe.filter(function(Tn){return Tn!=null}).join(y.doc.lineSeparator())),origin:"paste"};ks(y.doc,en),El(y.doc,mi(Gt(y.doc,fe),Gt(y.doc,Rr(en))))})()},at=function(en,Tn){if(y.options.allowDropFileTypes&&Ve(y.options.allowDropFileTypes,en.type)==-1){it();return}var Zn=new FileReader;Zn.onerror=function(){return it()},Zn.onload=function(){var Qn=Zn.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(Qn)){it();return}Fe[Tn]=Qn,it()},Zn.readAsText(en)},ht=0;ht<de.length;ht++)at(de[ht],ht);else{if(y.state.draggingText&&y.doc.sel.contains(fe)>-1){y.state.draggingText(a),setTimeout(function(){return y.display.input.focus()},20);return}try{var Rt=a.dataTransfer.getData("Text");if(Rt){var jt;if(y.state.draggingText&&!y.state.draggingText.copy&&(jt=y.listSelections()),Js(y.doc,mi(fe,fe)),jt)for(var on=0;on<jt.length;++on)Ls(y.doc,"",jt[on].anchor,jt[on].head,"drag");y.replaceSelection(Rt,"around","paste"),y.display.input.focus()}}catch(en){}}}}function Su(a,y){if(se&&(!a.state.draggingText||+new Date-Ul<100)){In(y);return}if(!(yt(a,y)||Xi(a.display,y))&&(y.dataTransfer.setData("Text",a.getSelection()),y.dataTransfer.effectAllowed="copyMove",y.dataTransfer.setDragImage&&!b)){var fe=Oe("img",null,null,"position: fixed; left: 0; top: 0;");fe.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",E&&(fe.width=fe.height=1,a.display.wrapper.appendChild(fe),fe._top=fe.offsetTop),y.dataTransfer.setDragImage(fe,0,0),E&&fe.parentNode.removeChild(fe)}}function wu(a,y){var fe=da(a,y);if(fe){var de=document.createDocumentFragment();$a(a,fe,de),a.display.dragCursor||(a.display.dragCursor=Oe("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),a.display.lineSpace.insertBefore(a.display.dragCursor,a.display.cursorDiv)),Ee(a.display.dragCursor,de)}}function zl(a){a.display.dragCursor&&(a.display.lineSpace.removeChild(a.display.dragCursor),a.display.dragCursor=null)}function Hl(a){if(document.getElementsByClassName){for(var y=document.getElementsByClassName("CodeMirror"),fe=[],de=0;de<y.length;de++){var xe=y[de].CodeMirror;xe&&fe.push(xe)}fe.length&&fe[0].operation(function(){for(var Fe=0;Fe<fe.length;Fe++)a(fe[Fe])})}}var Wl=!1;function xu(){Wl||(Cu(),Wl=!0)}function Cu(){var a;vt(window,"resize",function(){a==null&&(a=setTimeout(function(){a=null,Hl(Eu)},100))}),vt(window,"blur",function(){return Hl(Ga)})}function Eu(a){var y=a.display;y.cachedCharWidth=y.cachedTextHeight=y.cachedPaddingH=null,y.scrollbarsClipped=!1,a.setSize()}for(var ls={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Hs=0;Hs<10;Hs++)ls[Hs+48]=ls[Hs+96]=String(Hs);for(var el=65;el<=90;el++)ls[el]=String.fromCharCode(el);for(var Ws=1;Ws<=12;Ws++)ls[Ws+111]=ls[Ws+63235]="F"+Ws;var Ya={};Ya.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"},Ya.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"},Ya.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"},Ya.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"]},Ya.default=ve?Ya.macDefault:Ya.pcDefault;function ku(a){var y=a.split(/-(?!$)/);a=y[y.length-1];for(var fe,de,xe,Fe,Je=0;Je<y.length-1;Je++){var it=y[Je];if(/^(cmd|meta|m)$/i.test(it))Fe=!0;else if(/^a(lt)?$/i.test(it))fe=!0;else if(/^(c|ctrl|control)$/i.test(it))de=!0;else if(/^s(hift)?$/i.test(it))xe=!0;else throw new Error("Unrecognized modifier name: "+it)}return fe&&(a="Alt-"+a),de&&(a="Ctrl-"+a),Fe&&(a="Cmd-"+a),xe&&(a="Shift-"+a),a}function Lu(a){var y={};for(var fe in a)if(a.hasOwnProperty(fe)){var de=a[fe];if(/^(name|fallthrough|(de|at)tach)$/.test(fe))continue;if(de=="..."){delete a[fe];continue}for(var xe=gt(fe.split(" "),ku),Fe=0;Fe<xe.length;Fe++){var Je=void 0,it=void 0;Fe==xe.length-1?(it=xe.join(" "),Je=de):(it=xe.slice(0,Fe+1).join(" "),Je="...");var at=y[it];if(!at)y[it]=Je;else if(at!=Je)throw new Error("Inconsistent bindings for "+it)}delete a[fe]}for(var ht in y)a[ht]=y[ht];return a}function Ts(a,y,fe,de){y=tl(y);var xe=y.call?y.call(a,de):y[a];if(xe===!1)return"nothing";if(xe==="...")return"multi";if(xe!=null&&fe(xe))return"handled";if(y.fallthrough){if(Object.prototype.toString.call(y.fallthrough)!="[object Array]")return Ts(a,y.fallthrough,fe,de);for(var Fe=0;Fe<y.fallthrough.length;Fe++){var Je=Ts(a,y.fallthrough[Fe],fe,de);if(Je)return Je}}}function Zl(a){var y=typeof a=="string"?a:ls[a.keyCode];return y=="Ctrl"||y=="Alt"||y=="Shift"||y=="Mod"}function Gl(a,y,fe){var de=a;return y.altKey&&de!="Alt"&&(a="Alt-"+a),(_e?y.metaKey:y.ctrlKey)&&de!="Ctrl"&&(a="Ctrl-"+a),(_e?y.ctrlKey:y.metaKey)&&de!="Mod"&&(a="Cmd-"+a),!fe&&y.shiftKey&&de!="Shift"&&(a="Shift-"+a),a}function Kl(a,y){if(E&&a.keyCode==34&&a.char)return!1;var fe=ls[a.keyCode];return fe==null||a.altGraphKey?!1:(a.keyCode==3&&a.code&&(fe=a.code),Gl(fe,a,y))}function tl(a){return typeof a=="string"?Ya[a]:a}function Ds(a,y){for(var fe=a.doc.sel.ranges,de=[],xe=0;xe<fe.length;xe++){for(var Fe=y(fe[xe]);de.length&&Ut(Fe.from,xt(de).to)<=0;){var Je=de.pop();if(Ut(Je.from,Fe.from)<0){Fe.from=Je.from;break}}de.push(Fe)}wt(a,function(){for(var it=de.length-1;it>=0;it--)Ls(a.doc,"",de[it].from,de[it].to,"+delete");La(a)})}function pl(a,y,fe){var de=Le(a.text,y+fe,fe);return de<0||de>a.text.length?null:de}function ml(a,y,fe){var de=pl(a,y.ch,fe);return de==null?null:new Et(y.line,de,fe<0?"after":"before")}function vl(a,y,fe,de,xe){if(a){y.doc.direction=="rtl"&&(xe=-xe);var Fe=Pt(fe,y.doc.direction);if(Fe){var Je=xe<0?xt(Fe):Fe[0],it=xe<0==(Je.level==1),at=it?"after":"before",ht;if(Je.level>0||y.doc.direction=="rtl"){var Rt=la(y,fe);ht=xe<0?fe.text.length-1:0;var jt=Zo(y,Rt,ht).top;ht=Ue(function(on){return Zo(y,Rt,on).top==jt},xe<0==(Je.level==1)?Je.from:Je.to-1,ht),at=="before"&&(ht=pl(fe,ht,1))}else ht=xe<0?Je.to:Je.from;return new Et(de,ht,at)}}return new Et(de,xe<0?fe.text.length:0,xe<0?"before":"after")}function Au(a,y,fe,de){var xe=Pt(y,a.doc.direction);if(!xe)return ml(y,fe,de);fe.ch>=y.text.length?(fe.ch=y.text.length,fe.sticky="before"):fe.ch<=0&&(fe.ch=0,fe.sticky="after");var Fe=tt(xe,fe.ch,fe.sticky),Je=xe[Fe];if(a.doc.direction=="ltr"&&Je.level%2==0&&(de>0?Je.to>fe.ch:Je.from<fe.ch))return ml(y,fe,de);var it=function(sr,vr){return pl(y,sr instanceof Et?sr.ch:sr,vr)},at,ht=function(sr){return a.options.lineWrapping?(at=at||la(a,y),io(a,y,at,sr)):{begin:0,end:y.text.length}},Rt=ht(fe.sticky=="before"?it(fe,-1):fe.ch);if(a.doc.direction=="rtl"||Je.level==1){var jt=Je.level==1==de<0,on=it(fe,jt?1:-1);if(on!=null&&(jt?on<=Je.to&&on<=Rt.end:on>=Je.from&&on>=Rt.begin)){var en=jt?"before":"after";return new Et(fe.line,on,en)}}var Tn=function(sr,vr,lr){for(var Er=function(eo,Mo){return Mo?new Et(fe.line,it(eo,1),"before"):new Et(fe.line,eo,"after")};sr>=0&&sr<xe.length;sr+=vr){var ei=xe[sr],Kr=vr>0==(ei.level!=1),ki=Kr?lr.begin:it(lr.end,-1);if(ei.from<=ki&&ki<ei.to||(ki=Kr?ei.from:it(ei.to,-1),lr.begin<=ki&&ki<lr.end))return Er(ki,Kr)}},Zn=Tn(Fe+de,de,Rt);if(Zn)return Zn;var Qn=de>0?Rt.end:it(Rt.begin,-1);return Qn!=null&&!(de>0&&Qn==y.text.length)&&(Zn=Tn(de>0?0:xe.length-1,de,ht(Qn)),Zn)?Zn:null}var Zs={selectAll:Dl,singleSelection:function(a){return a.setSelection(a.getCursor("anchor"),a.getCursor("head"),et)},killLine:function(a){return Ds(a,function(y){if(y.empty()){var fe=Bt(a.doc,y.head.line).text.length;return y.head.ch==fe&&y.head.line<a.lastLine()?{from:y.head,to:Et(y.head.line+1,0)}:{from:y.head,to:Et(y.head.line,fe)}}else return{from:y.from(),to:y.to()}})},deleteLine:function(a){return Ds(a,function(y){return{from:Et(y.from().line,0),to:Gt(a.doc,Et(y.to().line+1,0))}})},delLineLeft:function(a){return Ds(a,function(y){return{from:Et(y.from().line,0),to:y.from()}})},delWrappedLineLeft:function(a){return Ds(a,function(y){var fe=a.charCoords(y.head,"div").top+5,de=a.coordsChar({left:0,top:fe},"div");return{from:de,to:y.from()}})},delWrappedLineRight:function(a){return Ds(a,function(y){var fe=a.charCoords(y.head,"div").top+5,de=a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:fe},"div");return{from:y.from(),to:de}})},undo:function(a){return a.undo()},redo:function(a){return a.redo()},undoSelection:function(a){return a.undoSelection()},redoSelection:function(a){return a.redoSelection()},goDocStart:function(a){return a.extendSelection(Et(a.firstLine(),0))},goDocEnd:function(a){return a.extendSelection(Et(a.lastLine()))},goLineStart:function(a){return a.extendSelectionsBy(function(y){return Vl(a,y.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(a){return a.extendSelectionsBy(function(y){return Yl(a,y.head)},{origin:"+move",bias:1})},goLineEnd:function(a){return a.extendSelectionsBy(function(y){return Tu(a,y.head.line)},{origin:"+move",bias:-1})},goLineRight:function(a){return a.extendSelectionsBy(function(y){var fe=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:a.display.lineDiv.offsetWidth+100,top:fe},"div")},ct)},goLineLeft:function(a){return a.extendSelectionsBy(function(y){var fe=a.cursorCoords(y.head,"div").top+5;return a.coordsChar({left:0,top:fe},"div")},ct)},goLineLeftSmart:function(a){return a.extendSelectionsBy(function(y){var fe=a.cursorCoords(y.head,"div").top+5,de=a.coordsChar({left:0,top:fe},"div");return de.ch<a.getLine(de.line).search(/\S/)?Yl(a,y.head):de},ct)},goLineUp:function(a){return a.moveV(-1,"line")},goLineDown:function(a){return a.moveV(1,"line")},goPageUp:function(a){return a.moveV(-1,"page")},goPageDown:function(a){return a.moveV(1,"page")},goCharLeft:function(a){return a.moveH(-1,"char")},goCharRight:function(a){return a.moveH(1,"char")},goColumnLeft:function(a){return a.moveH(-1,"column")},goColumnRight:function(a){return a.moveH(1,"column")},goWordLeft:function(a){return a.moveH(-1,"word")},goGroupRight:function(a){return a.moveH(1,"group")},goGroupLeft:function(a){return a.moveH(-1,"group")},goWordRight:function(a){return a.moveH(1,"word")},delCharBefore:function(a){return a.deleteH(-1,"codepoint")},delCharAfter:function(a){return a.deleteH(1,"char")},delWordBefore:function(a){return a.deleteH(-1,"word")},delWordAfter:function(a){return a.deleteH(1,"word")},delGroupBefore:function(a){return a.deleteH(-1,"group")},delGroupAfter:function(a){return a.deleteH(1,"group")},indentAuto:function(a){return a.indentSelection("smart")},indentMore:function(a){return a.indentSelection("add")},indentLess:function(a){return a.indentSelection("subtract")},insertTab:function(a){return a.replaceSelection(" ")},insertSoftTab:function(a){for(var y=[],fe=a.listSelections(),de=a.options.tabSize,xe=0;xe<fe.length;xe++){var Fe=fe[xe].from(),Je=Ge(a.getLine(Fe.line),Fe.ch,de);y.push(Mt(de-Je%de))}a.replaceSelections(y)},defaultTab:function(a){a.somethingSelected()?a.indentSelection("add"):a.execCommand("insertTab")},transposeChars:function(a){return wt(a,function(){for(var y=a.listSelections(),fe=[],de=0;de<y.length;de++)if(y[de].empty()){var xe=y[de].head,Fe=Bt(a.doc,xe.line).text;if(Fe){if(xe.ch==Fe.length&&(xe=new Et(xe.line,xe.ch-1)),xe.ch>0)xe=new Et(xe.line,xe.ch+1),a.replaceRange(Fe.charAt(xe.ch-1)+Fe.charAt(xe.ch-2),Et(xe.line,xe.ch-2),xe,"+transpose");else if(xe.line>a.doc.first){var Je=Bt(a.doc,xe.line-1).text;Je&&(xe=new Et(xe.line,1),a.replaceRange(Fe.charAt(0)+a.doc.lineSeparator()+Je.charAt(Je.length-1),Et(xe.line-1,Je.length-1),xe,"+transpose"))}}fe.push(new xr(xe,xe))}a.setSelections(fe)})},newlineAndIndent:function(a){return wt(a,function(){for(var y=a.listSelections(),fe=y.length-1;fe>=0;fe--)a.replaceRange(a.doc.lineSeparator(),y[fe].anchor,y[fe].head,"+input");y=a.listSelections();for(var de=0;de<y.length;de++)a.indentLine(y[de].from().line,null,!0);La(a)})},openLine:function(a){return a.replaceSelection(`
|
|
|
`,"start")},toggleOverwrite:function(a){return a.toggleOverwrite()}};function Vl(a,y){var fe=Bt(a.doc,y),de=un(fe);return de!=fe&&(y=At(de)),vl(!0,a,de,y,1)}function Tu(a,y){var fe=Bt(a.doc,y),de=mn(fe);return de!=fe&&(y=At(de)),vl(!0,a,fe,y,-1)}function Yl(a,y){var fe=Vl(a,y.line),de=Bt(a.doc,fe.line),xe=Pt(de,a.doc.direction);if(!xe||xe[0].level==0){var Fe=Math.max(fe.ch,de.text.search(/\S/)),Je=y.line==fe.line&&y.ch<=Fe&&y.ch;return Et(fe.line,Je?0:Fe,fe.sticky)}return fe}function nl(a,y,fe){if(typeof y=="string"&&(y=Zs[y],!y))return!1;a.display.input.ensurePolled();var de=a.display.shift,xe=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),fe&&(a.display.shift=!1),xe=y(a)!=nt}finally{a.display.shift=de,a.state.suppressEdits=!1}return xe}function Du(a,y,fe){for(var de=0;de<a.state.keyMaps.length;de++){var xe=Ts(y,a.state.keyMaps[de],fe,a);if(xe)return xe}return a.options.extraKeys&&Ts(y,a.options.extraKeys,fe,a)||Ts(y,a.options.keyMap,fe,a)}var Mu=new ze;function Gs(a,y,fe,de){var xe=a.state.keySeq;if(xe){if(Zl(y))return"handled";if(/\'$/.test(y)?a.state.keySeq=null:Mu.set(50,function(){a.state.keySeq==xe&&(a.state.keySeq=null,a.display.input.reset())}),Xl(a,xe+" "+y,fe,de))return!0}return Xl(a,y,fe,de)}function Xl(a,y,fe,de){var xe=Du(a,y,de);return xe=="multi"&&(a.state.keySeq=y),xe=="handled"&&Ii(a,"keyHandled",a,y,fe),(xe=="handled"||xe=="multi")&&(sn(fe),es(a)),!!xe}function ql(a,y){var fe=Kl(y,!0);return fe?y.shiftKey&&!a.state.keySeq?Gs(a,"Shift-"+fe,y,function(de){return nl(a,de,!0)})||Gs(a,fe,y,function(de){if(typeof de=="string"?/^go[A-Z]/.test(de):de.motion)return nl(a,de)}):Gs(a,fe,y,function(de){return nl(a,de)}):!1}function Ru(a,y,fe){return Gs(a,"'"+fe+"'",y,function(de){return nl(a,de,!0)})}var gl=null;function Jl(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&(y.curOp.focus=Xe(),!yt(y,a))){se&&te<11&&a.keyCode==27&&(a.returnValue=!1);var fe=a.keyCode;y.display.shift=fe==16||a.shiftKey;var de=ql(y,a);E&&(gl=de?fe:null,!de&&fe==88&&!Bn&&(ve?a.metaKey:a.ctrlKey)&&y.replaceSelection("",null,"cut")),ce&&!ve&&!de&&fe==46&&a.shiftKey&&!a.ctrlKey&&document.execCommand&&document.execCommand("cut"),fe==18&&!/\bCodeMirror-crosshair\b/.test(y.display.lineDiv.className)&&Iu(y)}}function Iu(a){var y=a.display.lineDiv;ot(y,"CodeMirror-crosshair");function fe(de){(de.keyCode==18||!de.altKey)&&(ke(y,"CodeMirror-crosshair"),zt(document,"keyup",fe),zt(document,"mouseover",fe))}vt(document,"keyup",fe),vt(document,"mouseover",fe)}function Ql(a){a.keyCode==16&&(this.doc.sel.shift=!1),yt(this,a)}function $l(a){var y=this;if(!(a.target&&a.target!=y.display.input.getField())&&!(Xi(y.display,a)||yt(y,a)||a.ctrlKey&&!a.altKey||ve&&a.metaKey)){var fe=a.keyCode,de=a.charCode;if(E&&fe==gl){gl=null,sn(a);return}if(!(E&&(!a.which||a.which<10)&&ql(y,a))){var xe=String.fromCharCode(de==null?fe:de);xe!="\b"&&(Ru(y,a,xe)||y.display.input.onKeyPress(a))}}}var Ou=400,yl=function(a,y,fe){this.time=a,this.pos=y,this.button=fe};yl.prototype.compare=function(a,y,fe){return this.time+Ou>a&&Ut(y,this.pos)==0&&fe==this.button};var Ks,Vs;function Pu(a,y){var fe=+new Date;return Vs&&Vs.compare(fe,a,y)?(Ks=Vs=null,"triple"):Ks&&Ks.compare(fe,a,y)?(Vs=new yl(fe,a,y),Ks=null,"double"):(Ks=new yl(fe,a,y),Vs=null,"single")}function eu(a){var y=this,fe=y.display;if(!(yt(y,a)||fe.activeTouch&&fe.input.supportsTouch())){if(fe.input.ensurePolled(),fe.shift=a.shiftKey,Xi(fe,a)){le||(fe.scroller.draggable=!1,setTimeout(function(){return fe.scroller.draggable=!0},100));return}if(!_l(y,a)){var de=da(y,a),xe=Gn(a),Fe=de?Pu(de,xe):"single";window.focus(),xe==1&&y.state.selectingText&&y.state.selectingText(a),!(de&&Nu(y,xe,de,Fe,a))&&(xe==1?de?Fu(y,de,Fe,a):Kn(a)==fe.scroller&&sn(a):xe==2?(de&&Va(y.doc,de),setTimeout(function(){return fe.input.focus()},20)):xe==3&&(he?y.display.input.onContextMenu(a):Za(y)))}}}function Nu(a,y,fe,de,xe){var Fe="Click";return de=="double"?Fe="Double"+Fe:de=="triple"&&(Fe="Triple"+Fe),Fe=(y==1?"Left":y==2?"Middle":"Right")+Fe,Gs(a,Gl(Fe,xe),xe,function(Je){if(typeof Je=="string"&&(Je=Zs[Je]),!Je)return!1;var it=!1;try{a.isReadOnly()&&(a.state.suppressEdits=!0),it=Je(a,fe)!=nt}finally{a.state.suppressEdits=!1}return it})}function Bu(a,y,fe){var de=a.getOption("configureMouse"),xe=de?de(a,y,fe):{};if(xe.unit==null){var Fe=ye?fe.shiftKey&&fe.metaKey:fe.altKey;xe.unit=Fe?"rectangle":y=="single"?"char":y=="double"?"word":"line"}return(xe.extend==null||a.doc.extend)&&(xe.extend=a.doc.extend||fe.shiftKey),xe.addNew==null&&(xe.addNew=ve?fe.metaKey:fe.ctrlKey),xe.moveOnDrag==null&&(xe.moveOnDrag=!(ve?fe.altKey:fe.ctrlKey)),xe}function Fu(a,y,fe,de){se?setTimeout(Ye(ra,a),0):a.curOp.focus=Xe();var xe=Bu(a,fe,de),Fe=a.doc.sel,Je;a.options.dragDrop&&nr&&!a.isReadOnly()&&fe=="single"&&(Je=Fe.contains(y))>-1&&(Ut((Je=Fe.ranges[Je]).from(),y)<0||y.xRel>0)&&(Ut(Je.to(),y)>0||y.xRel<0)?ju(a,de,y,xe):Uu(a,de,y,xe)}function ju(a,y,fe,de){var xe=a.display,Fe=!1,Je=Xn(a,function(ht){le&&(xe.scroller.draggable=!1),a.state.draggingText=!1,zt(xe.wrapper.ownerDocument,"mouseup",Je),zt(xe.wrapper.ownerDocument,"mousemove",it),zt(xe.scroller,"dragstart",at),zt(xe.scroller,"drop",Je),Fe||(sn(ht),de.addNew||Va(a.doc,fe,null,null,de.extend),le&&!b||se&&te==9?setTimeout(function(){xe.wrapper.ownerDocument.body.focus({preventScroll:!0}),xe.input.focus()},20):xe.input.focus())}),it=function(ht){Fe=Fe||Math.abs(y.clientX-ht.clientX)+Math.abs(y.clientY-ht.clientY)>=10},at=function(){return Fe=!0};le&&(xe.scroller.draggable=!0),a.state.draggingText=Je,Je.copy=!de.moveOnDrag,xe.scroller.dragDrop&&xe.scroller.dragDrop(),vt(xe.wrapper.ownerDocument,"mouseup",Je),vt(xe.wrapper.ownerDocument,"mousemove",it),vt(xe.scroller,"dragstart",at),vt(xe.scroller,"drop",Je),Za(a),setTimeout(function(){return xe.input.focus()},20)}function tu(a,y,fe){if(fe=="char")return new xr(y,y);if(fe=="word")return a.findWordAt(y);if(fe=="line")return new xr(Et(y.line,0),Gt(a.doc,Et(y.line+1,0)));var de=fe(a,y);return new xr(de.from,de.to)}function Uu(a,y,fe,de){var xe=a.display,Fe=a.doc;sn(y);var Je,it,at=Fe.sel,ht=at.ranges;if(de.addNew&&!de.extend?(it=Fe.sel.contains(fe),it>-1?Je=ht[it]:Je=new xr(fe,fe)):(Je=Fe.sel.primary(),it=Fe.sel.primIndex),de.unit=="rectangle")de.addNew||(Je=new xr(fe,fe)),fe=da(a,y,!0,!0),it=-1;else{var Rt=tu(a,fe,de.unit);de.extend?Je=Ka(Je,Rt.anchor,Rt.head,de.extend):Je=Rt}de.addNew?it==-1?(it=ht.length,Uo(Fe,jr(a,ht.concat([Je]),it),{scroll:!1,origin:"*mouse"})):ht.length>1&&ht[it].empty()&&de.unit=="char"&&!de.extend?(Uo(Fe,jr(a,ht.slice(0,it).concat(ht.slice(it+1)),0),{scroll:!1,origin:"*mouse"}),at=Fe.sel):Ps(Fe,it,Je,pt):(it=0,Uo(Fe,new si([Je],0),pt),at=Fe.sel);var jt=fe;function on(lr){if(Ut(jt,lr)!=0)if(jt=lr,de.unit=="rectangle"){for(var Er=[],ei=a.options.tabSize,Kr=Ge(Bt(Fe,fe.line).text,fe.ch,ei),ki=Ge(Bt(Fe,lr.line).text,lr.ch,ei),eo=Math.min(Kr,ki),Mo=Math.max(Kr,ki),ho=Math.min(fe.line,lr.line),sa=Math.min(a.lastLine(),Math.max(fe.line,lr.line));ho<=sa;ho++){var $o=Bt(Fe,ho).text,wo=It($o,eo,ei);eo==Mo?Er.push(new xr(Et(ho,wo),Et(ho,wo))):$o.length>wo&&Er.push(new xr(Et(ho,wo),Et(ho,It($o,Mo,ei))))}Er.length||Er.push(new xr(fe,fe)),Uo(Fe,jr(a,at.ranges.slice(0,it).concat(Er),it),{origin:"*mouse",scroll:!1}),a.scrollIntoView(lr)}else{var ea=Je,Bo=tu(a,lr,de.unit),Lo=ea.anchor,xo;Ut(Bo.anchor,Lo)>0?(xo=Bo.head,Lo=bn(ea.from(),Bo.anchor)):(xo=Bo.anchor,Lo=gn(ea.to(),Bo.head));var go=at.ranges.slice(0);go[it]=zu(a,new xr(Gt(Fe,Lo),xo)),Uo(Fe,jr(a,go,it),pt)}}var en=xe.wrapper.getBoundingClientRect(),Tn=0;function Zn(lr){var Er=++Tn,ei=da(a,lr,!0,de.unit=="rectangle");if(ei)if(Ut(ei,jt)!=0){a.curOp.focus=Xe(),on(ei);var Kr=ka(xe,Fe);(ei.line>=Kr.to||ei.line<Kr.from)&&setTimeout(Xn(a,function(){Tn==Er&&Zn(lr)}),150)}else{var ki=lr.clientY<en.top?-20:lr.clientY>en.bottom?20:0;ki&&setTimeout(Xn(a,function(){Tn==Er&&(xe.scroller.scrollTop+=ki,Zn(lr))}),50)}}function Qn(lr){a.state.selectingText=!1,Tn=1/0,lr&&(sn(lr),xe.input.focus()),zt(xe.wrapper.ownerDocument,"mousemove",sr),zt(xe.wrapper.ownerDocument,"mouseup",vr),Fe.history.lastSelOrigin=null}var sr=Xn(a,function(lr){lr.buttons===0||!Gn(lr)?Qn(lr):Zn(lr)}),vr=Xn(a,Qn);a.state.selectingText=vr,vt(xe.wrapper.ownerDocument,"mousemove",sr),vt(xe.wrapper.ownerDocument,"mouseup",vr)}function zu(a,y){var fe=y.anchor,de=y.head,xe=Bt(a.doc,fe.line);if(Ut(fe,de)==0&&fe.sticky==de.sticky)return y;var Fe=Pt(xe);if(!Fe)return y;var Je=tt(Fe,fe.ch,fe.sticky),it=Fe[Je];if(it.from!=fe.ch&&it.to!=fe.ch)return y;var at=Je+(it.from==fe.ch==(it.level!=1)?0:1);if(at==0||at==Fe.length)return y;var ht;if(de.line!=fe.line)ht=(de.line-fe.line)*(a.doc.direction=="ltr"?1:-1)>0;else{var Rt=tt(Fe,de.ch,de.sticky),jt=Rt-Je||(de.ch-fe.ch)*(it.level==1?-1:1);Rt==at-1||Rt==at?ht=jt<0:ht=jt>0}var on=Fe[at+(ht?-1:0)],en=ht==(on.level==1),Tn=en?on.from:on.to,Zn=en?"after":"before";return fe.ch==Tn&&fe.sticky==Zn?y:new xr(new Et(fe.line,Tn,Zn),de)}function nu(a,y,fe,de){var xe,Fe;if(y.touches)xe=y.touches[0].clientX,Fe=y.touches[0].clientY;else try{xe=y.clientX,Fe=y.clientY}catch(on){return!1}if(xe>=Math.floor(a.display.gutters.getBoundingClientRect().right))return!1;de&&sn(y);var Je=a.display,it=Je.lineDiv.getBoundingClientRect();if(Fe>it.bottom||!Lt(a,fe))return Yt(y);Fe-=it.top-Je.viewOffset;for(var at=0;at<a.display.gutterSpecs.length;++at){var ht=Je.gutters.childNodes[at];if(ht&&ht.getBoundingClientRect().right>=xe){var Rt=St(a.doc,Fe),jt=a.display.gutterSpecs[at];return Ft(a,fe,a,Rt,jt.className,y),Yt(y)}}}function _l(a,y){return nu(a,y,"gutterClick",!0)}function ru(a,y){Xi(a.display,y)||Hu(a,y)||yt(a,y,"contextmenu")||he||a.display.input.onContextMenu(y)}function Hu(a,y){return Lt(a,"gutterContextMenu")?nu(a,y,"gutterContextMenu",!1):!1}function iu(a){a.display.wrapper.className=a.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+a.options.theme.replace(/(^|\s)\s*/g," cm-s-"),pa(a)}var Ms={toString:function(){return"CodeMirror.Init"}},ou={},rl={};function Wu(a){var y=a.optionHandlers;function fe(de,xe,Fe,Je){a.defaults[de]=xe,Fe&&(y[de]=Je?function(it,at,ht){ht!=Ms&&Fe(it,at,ht)}:Fe)}a.defineOption=fe,a.Init=Ms,fe("value","",function(de,xe){return de.setValue(xe)},!0),fe("mode",null,function(de,xe){de.doc.modeOption=xe,aa(de)},!0),fe("indentUnit",2,aa,!0),fe("indentWithTabs",!1),fe("smartIndent",!0),fe("tabSize",4,function(de){ga(de),pa(de),Eo(de)},!0),fe("lineSeparator",null,function(de,xe){if(de.doc.lineSep=xe,!!xe){var Fe=[],Je=de.doc.first;de.doc.iter(function(at){for(var ht=0;;){var Rt=at.text.indexOf(xe,ht);if(Rt==-1)break;ht=Rt+xe.length,Fe.push(Et(Je,Rt))}Je++});for(var it=Fe.length-1;it>=0;it--)Ls(de.doc,xe,Fe[it],Et(Fe[it].line,Fe[it].ch+xe.length))}}),fe("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b-\u200c\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(de,xe,Fe){de.state.specialChars=new RegExp(xe.source+(xe.test(" ")?"":"| "),"g"),Fe!=Ms&&de.refresh()}),fe("specialCharPlaceholder",Xr,function(de){return de.refresh()},!0),fe("electricChars",!0),fe("inputStyle",oe?"contenteditable":"textarea",function(){throw new Error("inputStyle can not (yet) be changed in a running editor")},!0),fe("spellcheck",!1,function(de,xe){return de.getInputField().spellcheck=xe},!0),fe("autocorrect",!1,function(de,xe){return de.getInputField().autocorrect=xe},!0),fe("autocapitalize",!1,function(de,xe){return de.getInputField().autocapitalize=xe},!0),fe("rtlMoveVisually",!me),fe("wholeLineUpdateBefore",!0),fe("theme","default",function(de){iu(de),tr(de)},!0),fe("keyMap","default",function(de,xe,Fe){var Je=tl(xe),it=Fe!=Ms&&tl(Fe);it&&it.detach&&it.detach(de,Je),Je.attach&&Je.attach(de,it||null)}),fe("extraKeys",null),fe("configureMouse",null),fe("lineWrapping",!1,Gu,!0),fe("gutters",[],function(de,xe){de.display.gutterSpecs=ri(xe,de.options.lineNumbers),tr(de)},!0),fe("fixedGutter",!0,function(de,xe){de.display.gutters.style.left=xe?Ia(de.display)+"px":"0",de.refresh()},!0),fe("coverGutterNextToScrollbar",!1,function(de){return So(de)},!0),fe("scrollbarStyle","native",function(de){va(de),So(de),de.display.scrollbars.setScrollTop(de.doc.scrollTop),de.display.scrollbars.setScrollLeft(de.doc.scrollLeft)},!0),fe("lineNumbers",!1,function(de,xe){de.display.gutterSpecs=ri(de.options.gutters,xe),tr(de)},!0),fe("firstLineNumber",1,tr,!0),fe("lineNumberFormatter",function(de){return de},tr,!0),fe("showCursorWhenSelecting",!1,Oa,!0),fe("resetSelectionOnContextMenu",!0),fe("lineWiseCopyCut",!0),fe("pasteLinesPerSelection",!0),fe("selectionsMayTouch",!1),fe("readOnly",!1,function(de,xe){xe=="nocursor"&&(Ga(de),de.display.input.blur()),de.display.input.readOnlyChanged(xe)}),fe("screenReaderLabel",null,function(de,xe){xe=xe===""?null:xe,de.display.input.screenReaderLabelChanged(xe)}),fe("disableInput",!1,function(de,xe){xe||de.display.input.reset()},!0),fe("dragDrop",!0,Zu),fe("allowDropFileTypes",null),fe("cursorBlinkRate",530),fe("cursorScrollMargin",0),fe("cursorHeight",1,Oa,!0),fe("singleCursorHeightPerLine",!0,Oa,!0),fe("workTime",100),fe("workDelay",100),fe("flattenSpans",!0,ga,!0),fe("addModeClass",!1,ga,!0),fe("pollInterval",100),fe("undoDepth",200,function(de,xe){return de.doc.history.undoDepth=xe}),fe("historyEventDelay",1250),fe("viewportMargin",10,function(de){return de.refresh()},!0),fe("maxHighlightLength",1e4,ga,!0),fe("moveInputWithCursor",!0,function(de,xe){xe||de.display.input.resetPosition()}),fe("tabindex",null,function(de,xe){return de.display.input.getField().tabIndex=xe||""}),fe("autofocus",null),fe("direction","ltr",function(de,xe){return de.doc.setDirection(xe)},!0),fe("phrases",null)}function Zu(a,y,fe){var de=fe&&fe!=Ms;if(!y!=!de){var xe=a.display.dragFunctions,Fe=y?vt:zt;Fe(a.display.scroller,"dragstart",xe.start),Fe(a.display.scroller,"dragenter",xe.enter),Fe(a.display.scroller,"dragover",xe.over),Fe(a.display.scroller,"dragleave",xe.leave),Fe(a.display.scroller,"drop",xe.drop)}}function Gu(a){a.options.lineWrapping?(ot(a.display.wrapper,"CodeMirror-wrap"),a.display.sizer.style.minWidth="",a.display.sizerWidth=null):(ke(a.display.wrapper,"CodeMirror-wrap"),ir(a)),fs(a),Eo(a),pa(a),setTimeout(function(){return So(a)},100)}function uo(a,y){var fe=this;if(!(this instanceof uo))return new uo(a,y);this.options=y=y?ut(y):{},ut(ou,y,!1);var de=y.value;typeof de=="string"?de=new Qo(de,y.mode,null,y.lineSeparator,y.direction):y.mode&&(de.modeOption=y.mode),this.doc=de;var xe=new uo.inputStyles[y.inputStyle](this),Fe=this.display=new Bi(a,de,xe,y);Fe.wrapper.CodeMirror=this,iu(this),y.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),va(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 ze,keySeq:null,specialChars:null},y.autofocus&&!oe&&Fe.input.focus(),se&&te<11&&setTimeout(function(){return fe.display.input.reset(!0)},20),Ku(this),xu(),Po(this),this.curOp.forceUpdate=!0,Ba(this,de),y.autofocus&&!oe||this.hasFocus()?setTimeout(function(){fe.hasFocus()&&!fe.state.focused&&Ea(fe)},20):Ga(this);for(var Je in rl)rl.hasOwnProperty(Je)&&rl[Je](this,y[Je],Ms);Wi(this),y.finishInit&&y.finishInit(this);for(var it=0;it<bl.length;++it)bl[it](this);fa(this),le&&y.lineWrapping&&getComputedStyle(Fe.lineDiv).textRendering=="optimizelegibility"&&(Fe.lineDiv.style.textRendering="auto")}uo.defaults=ou,uo.optionHandlers=rl;function Ku(a){var y=a.display;vt(y.scroller,"mousedown",Xn(a,eu)),se&&te<11?vt(y.scroller,"dblclick",Xn(a,function(at){if(!yt(a,at)){var ht=da(a,at);if(!(!ht||_l(a,at)||Xi(a.display,at))){sn(at);var Rt=a.findWordAt(ht);Va(a.doc,Rt.anchor,Rt.head)}}})):vt(y.scroller,"dblclick",function(at){return yt(a,at)||sn(at)}),vt(y.scroller,"contextmenu",function(at){return ru(a,at)}),vt(y.input.getField(),"contextmenu",function(at){y.scroller.contains(at.target)||ru(a,at)});var fe,de={end:0};function xe(){y.activeTouch&&(fe=setTimeout(function(){return y.activeTouch=null},1e3),de=y.activeTouch,de.end=+new Date)}function Fe(at){if(at.touches.length!=1)return!1;var ht=at.touches[0];return ht.radiusX<=1&&ht.radiusY<=1}function Je(at,ht){if(ht.left==null)return!0;var Rt=ht.left-at.left,jt=ht.top-at.top;return Rt*Rt+jt*jt>20*20}vt(y.scroller,"touchstart",function(at){if(!yt(a,at)&&!Fe(at)&&!_l(a,at)){y.input.ensurePolled(),clearTimeout(fe);var ht=+new Date;y.activeTouch={start:ht,moved:!1,prev:ht-de.end<=300?de:null},at.touches.length==1&&(y.activeTouch.left=at.touches[0].pageX,y.activeTouch.top=at.touches[0].pageY)}}),vt(y.scroller,"touchmove",function(){y.activeTouch&&(y.activeTouch.moved=!0)}),vt(y.scroller,"touchend",function(at){var ht=y.activeTouch;if(ht&&!Xi(y,at)&&ht.left!=null&&!ht.moved&&new Date-ht.start<300){var Rt=a.coordsChar(y.activeTouch,"page"),jt;!ht.prev||Je(ht,ht.prev)?jt=new xr(Rt,Rt):!ht.prev.prev||Je(ht,ht.prev.prev)?jt=a.findWordAt(Rt):jt=new xr(Et(Rt.line,0),Gt(a.doc,Et(Rt.line+1,0))),a.setSelection(jt.anchor,jt.head),a.focus(),sn(at)}xe()}),vt(y.scroller,"touchcancel",xe),vt(y.scroller,"scroll",function(){y.scroller.clientHeight&&(ia(a,y.scroller.scrollTop),ma(a,y.scroller.scrollLeft,!0),Ft(a,"scroll",a))}),vt(y.scroller,"mousewheel",function(at){return Zi(a,at)}),vt(y.scroller,"DOMMouseScroll",function(at){return Zi(a,at)}),vt(y.wrapper,"scroll",function(){return y.wrapper.scrollTop=y.wrapper.scrollLeft=0}),y.dragFunctions={enter:function(at){yt(a,at)||In(at)},over:function(at){yt(a,at)||(wu(a,at),In(at))},start:function(at){return Su(a,at)},drop:Xn(a,bu),leave:function(at){yt(a,at)||zl(a)}};var it=y.input.getField();vt(it,"keyup",function(at){return Ql.call(a,at)}),vt(it,"keydown",Xn(a,Jl)),vt(it,"keypress",Xn(a,$l)),vt(it,"focus",function(at){return Ea(a,at)}),vt(it,"blur",function(at){return Ga(a,at)})}var bl=[];uo.defineInitHook=function(a){return bl.push(a)};function Ys(a,y,fe,de){var xe=a.doc,Fe;fe==null&&(fe="add"),fe=="smart"&&(xe.mode.indent?Fe=Sr(a,y).state:fe="prev");var Je=a.options.tabSize,it=Bt(xe,y),at=Ge(it.text,null,Je);it.stateAfter&&(it.stateAfter=null);var ht=it.text.match(/^\s*/)[0],Rt;if(!de&&!/\S/.test(it.text))Rt=0,fe="not";else if(fe=="smart"&&(Rt=xe.mode.indent(Fe,it.text.slice(ht.length),it.text),Rt==nt||Rt>150)){if(!de)return;fe="prev"}fe=="prev"?y>xe.first?Rt=Ge(Bt(xe,y-1).text,null,Je):Rt=0:fe=="add"?Rt=at+a.options.indentUnit:fe=="subtract"?Rt=at-a.options.indentUnit:typeof fe=="number"&&(Rt=at+fe),Rt=Math.max(0,Rt);var jt="",on=0;if(a.options.indentWithTabs)for(var en=Math.floor(Rt/Je);en;--en)on+=Je,jt+=" ";if(on<Rt&&(jt+=Mt(Rt-on)),jt!=ht)return Ls(xe,jt,Et(y,0),Et(y,ht.length),"+input"),it.stateAfter=null,!0;for(var Tn=0;Tn<xe.sel.ranges.length;Tn++){var Zn=xe.sel.ranges[Tn];if(Zn.head.line==y&&Zn.head.ch<ht.length){var Qn=Et(y,ht.length);Ps(xe,Tn,new xr(Qn,Qn));break}}}var Ta=null;function il(a){Ta=a}function Sl(a,y,fe,de,xe){var Fe=a.doc;a.display.shift=!1,de||(de=Fe.sel);var Je=+new Date-200,it=xe=="paste"||a.state.pasteIncoming>Je,at=or(y),ht=null;if(it&&de.ranges.length>1)if(Ta&&Ta.text.join(`
|
|
|
`)==y){if(de.ranges.length%Ta.text.length==0){ht=[];for(var Rt=0;Rt<Ta.text.length;Rt++)ht.push(Fe.splitLines(Ta.text[Rt]))}}else at.length==de.ranges.length&&a.options.pasteLinesPerSelection&&(ht=gt(at,function(sr){return[sr]}));for(var jt=a.curOp.updateInput,on=de.ranges.length-1;on>=0;on--){var en=de.ranges[on],Tn=en.from(),Zn=en.to();en.empty()&&(fe&&fe>0?Tn=Et(Tn.line,Tn.ch-fe):a.state.overwrite&&!it?Zn=Et(Zn.line,Math.min(Bt(Fe,Zn.line).text.length,Zn.ch+xt(at).length)):it&&Ta&&Ta.lineWise&&Ta.text.join(`
|
|
|
`)==at.join(`
|
|
|
`)&&(Tn=Zn=Et(Tn.line,0)));var Qn={from:Tn,to:Zn,text:ht?ht[on%ht.length]:at,origin:xe||(it?"paste":a.state.cutIncoming>Je?"cut":"+input")};ks(a.doc,Qn),Ii(a,"inputRead",a,Qn)}y&&!it&&su(a,y),La(a),a.curOp.updateInput<2&&(a.curOp.updateInput=jt),a.curOp.typing=!0,a.state.pasteIncoming=a.state.cutIncoming=-1}function au(a,y){var fe=a.clipboardData&&a.clipboardData.getData("Text");if(fe)return a.preventDefault(),!y.isReadOnly()&&!y.options.disableInput&&wt(y,function(){return Sl(y,fe,0,null,"paste")}),!0}function su(a,y){if(!(!a.options.electricChars||!a.options.smartIndent))for(var fe=a.doc.sel,de=fe.ranges.length-1;de>=0;de--){var xe=fe.ranges[de];if(!(xe.head.ch>100||de&&fe.ranges[de-1].head.line==xe.head.line)){var Fe=a.getModeAt(xe.head),Je=!1;if(Fe.electricChars){for(var it=0;it<Fe.electricChars.length;it++)if(y.indexOf(Fe.electricChars.charAt(it))>-1){Je=Ys(a,xe.head.line,"smart");break}}else Fe.electricInput&&Fe.electricInput.test(Bt(a.doc,xe.head.line).text.slice(0,xe.head.ch))&&(Je=Ys(a,xe.head.line,"smart"));Je&&Ii(a,"electricInput",a,xe.head.line)}}}function lu(a){for(var y=[],fe=[],de=0;de<a.doc.sel.ranges.length;de++){var xe=a.doc.sel.ranges[de].head.line,Fe={anchor:Et(xe,0),head:Et(xe+1,0)};fe.push(Fe),y.push(a.getRange(Fe.anchor,Fe.head))}return{text:y,ranges:fe}}function uu(a,y,fe,de){a.setAttribute("autocorrect",fe?"":"off"),a.setAttribute("autocapitalize",de?"":"off"),a.setAttribute("spellcheck",!!y)}function cu(){var a=Oe("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),y=Oe("div",[a],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return le?a.style.width="1000px":a.setAttribute("wrap","off"),re&&(a.style.border="1px solid black"),uu(a),y}function Vu(a){var y=a.optionHandlers,fe=a.helpers={};a.prototype={constructor:a,focus:function(){window.focus(),this.display.input.focus()},setOption:function(de,xe){var Fe=this.options,Je=Fe[de];Fe[de]==xe&&de!="mode"||(Fe[de]=xe,y.hasOwnProperty(de)&&Xn(this,y[de])(this,xe,Je),Ft(this,"optionChange",this,de))},getOption:function(de){return this.options[de]},getDoc:function(){return this.doc},addKeyMap:function(de,xe){this.state.keyMaps[xe?"push":"unshift"](tl(de))},removeKeyMap:function(de){for(var xe=this.state.keyMaps,Fe=0;Fe<xe.length;++Fe)if(xe[Fe]==de||xe[Fe].name==de)return xe.splice(Fe,1),!0},addOverlay:On(function(de,xe){var Fe=de.token?de:a.getMode(this.options,de);if(Fe.startState)throw new Error("Overlays may not be stateful.");_t(this.state.overlays,{mode:Fe,modeSpec:de,opaque:xe&&xe.opaque,priority:xe&&xe.priority||0},function(Je){return Je.priority}),this.state.modeGen++,Eo(this)}),removeOverlay:On(function(de){for(var xe=this.state.overlays,Fe=0;Fe<xe.length;++Fe){var Je=xe[Fe].modeSpec;if(Je==de||typeof de=="string"&&Je.name==de){xe.splice(Fe,1),this.state.modeGen++,Eo(this);return}}}),indentLine:On(function(de,xe,Fe){typeof xe!="string"&&typeof xe!="number"&&(xe==null?xe=this.options.smartIndent?"smart":"prev":xe=xe?"add":"subtract"),an(this.doc,de)&&Ys(this,de,xe,Fe)}),indentSelection:On(function(de){for(var xe=this.doc.sel.ranges,Fe=-1,Je=0;Je<xe.length;Je++){var it=xe[Je];if(it.empty())it.head.line>Fe&&(Ys(this,it.head.line,de,!0),Fe=it.head.line,Je==this.doc.sel.primIndex&&La(this));else{var at=it.from(),ht=it.to(),Rt=Math.max(Fe,at.line);Fe=Math.min(this.lastLine(),ht.line-(ht.ch?0:1))+1;for(var jt=Rt;jt<Fe;++jt)Ys(this,jt,de);var on=this.doc.sel.ranges;at.ch==0&&xe.length==on.length&&on[Je].from().ch>0&&Ps(this.doc,Je,new xr(at,on[Je].to()),et)}}}),getTokenAt:function(de,xe){return Dr(this,de,xe)},getLineTokens:function(de,xe){return Dr(this,Et(de),xe,!0)},getTokenTypeAt:function(de){de=Gt(this.doc,de);var xe=kr(this,Bt(this.doc,de.line)),Fe=0,Je=(xe.length-1)/2,it=de.ch,at;if(it==0)at=xe[2];else for(;;){var ht=Fe+Je>>1;if((ht?xe[ht*2-1]:0)>=it)Je=ht;else if(xe[ht*2+1]<it)Fe=ht+1;else{at=xe[ht*2+2];break}}var Rt=at?at.indexOf("overlay "):-1;return Rt<0?at:Rt==0?null:at.slice(0,Rt-1)},getModeAt:function(de){var xe=this.doc.mode;return xe.innerMode?a.innerMode(xe,this.getTokenAt(de).state).mode:xe},getHelper:function(de,xe){return this.getHelpers(de,xe)[0]},getHelpers:function(de,xe){var Fe=[];if(!fe.hasOwnProperty(xe))return Fe;var Je=fe[xe],it=this.getModeAt(de);if(typeof it[xe]=="string")Je[it[xe]]&&Fe.push(Je[it[xe]]);else if(it[xe])for(var at=0;at<it[xe].length;at++){var ht=Je[it[xe][at]];ht&&Fe.push(ht)}else it.helperType&&Je[it.helperType]?Fe.push(Je[it.helperType]):Je[it.name]&&Fe.push(Je[it.name]);for(var Rt=0;Rt<Je._global.length;Rt++){var jt=Je._global[Rt];jt.pred(it,this)&&Ve(Fe,jt.val)==-1&&Fe.push(jt.val)}return Fe},getStateAfter:function(de,xe){var Fe=this.doc;return de=An(Fe,de==null?Fe.first+Fe.size-1:de),Sr(this,de+1,xe).state},cursorCoords:function(de,xe){var Fe,Je=this.doc.sel.primary();return de==null?Fe=Je.head:typeof de=="object"?Fe=Gt(this.doc,de):Fe=de?Je.from():Je.to(),qi(this,Fe,xe||"page")},charCoords:function(de,xe){return To(this,Gt(this.doc,de),xe||"page")},coordsChar:function(de,xe){return de=ua(this,de,xe||"page"),ro(this,de.left,de.top)},lineAtHeight:function(de,xe){return de=ua(this,{top:de,left:0},xe||"page").top,St(this.doc,de+this.display.viewOffset)},heightAtLine:function(de,xe,Fe){var Je=!1,it;if(typeof de=="number"){var at=this.doc.first+this.doc.size-1;de<this.doc.first?de=this.doc.first:de>at&&(de=at,Je=!0),it=Bt(this.doc,de)}else it=de;return wa(this,it,{top:0,left:0},xe||"page",Fe||Je).top+(Je?this.doc.height-Yn(it):0)},defaultTextHeight:function(){return yo(this.display)},defaultCharWidth:function(){return Fo(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(de,xe,Fe,Je,it){var at=this.display;de=qi(this,Gt(this.doc,de));var ht=de.bottom,Rt=de.left;if(xe.style.position="absolute",xe.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(xe),at.sizer.appendChild(xe),Je=="over")ht=de.top;else if(Je=="above"||Je=="near"){var jt=Math.max(at.wrapper.clientHeight,this.doc.height),on=Math.max(at.sizer.clientWidth,at.lineSpace.clientWidth);(Je=="above"||de.bottom+xe.offsetHeight>jt)&&de.top>xe.offsetHeight?ht=de.top-xe.offsetHeight:de.bottom+xe.offsetHeight<=jt&&(ht=de.bottom),Rt+xe.offsetWidth>on&&(Rt=on-xe.offsetWidth)}xe.style.top=ht+"px",xe.style.left=xe.style.right="",it=="right"?(Rt=at.sizer.clientWidth-xe.offsetWidth,xe.style.right="0px"):(it=="left"?Rt=0:it=="middle"&&(Rt=(at.sizer.clientWidth-xe.offsetWidth)/2),xe.style.left=Rt+"px"),Fe&&ws(this,{left:Rt,top:ht,right:Rt+xe.offsetWidth,bottom:ht+xe.offsetHeight})},triggerOnKeyDown:On(Jl),triggerOnKeyPress:On($l),triggerOnKeyUp:Ql,triggerOnMouseDown:On(eu),execCommand:function(de){if(Zs.hasOwnProperty(de))return Zs[de].call(null,this)},triggerElectric:On(function(de){su(this,de)}),findPosH:function(de,xe,Fe,Je){var it=1;xe<0&&(it=-1,xe=-xe);for(var at=Gt(this.doc,de),ht=0;ht<xe&&(at=wl(this.doc,at,it,Fe,Je),!at.hitSide);++ht);return at},moveH:On(function(de,xe){var Fe=this;this.extendSelectionsBy(function(Je){return Fe.display.shift||Fe.doc.extend||Je.empty()?wl(Fe.doc,Je.head,de,xe,Fe.options.rtlMoveVisually):de<0?Je.from():Je.to()},ct)}),deleteH:On(function(de,xe){var Fe=this.doc.sel,Je=this.doc;Fe.somethingSelected()?Je.replaceSelection("",null,"+delete"):Ds(this,function(it){var at=wl(Je,it.head,de,xe,!1);return de<0?{from:at,to:it.head}:{from:it.head,to:at}})}),findPosV:function(de,xe,Fe,Je){var it=1,at=Je;xe<0&&(it=-1,xe=-xe);for(var ht=Gt(this.doc,de),Rt=0;Rt<xe;++Rt){var jt=qi(this,ht,"div");if(at==null?at=jt.left:jt.left=at,ht=du(this,jt,it,Fe),ht.hitSide)break}return ht},moveV:On(function(de,xe){var Fe=this,Je=this.doc,it=[],at=!this.display.shift&&!Je.extend&&Je.sel.somethingSelected();if(Je.extendSelectionsBy(function(Rt){if(at)return de<0?Rt.from():Rt.to();var jt=qi(Fe,Rt.head,"div");Rt.goalColumn!=null&&(jt.left=Rt.goalColumn),it.push(jt.left);var on=du(Fe,jt,de,xe);return xe=="page"&&Rt==Je.sel.primary()&&rs(Fe,To(Fe,on,"div").top-jt.top),on},ct),it.length)for(var ht=0;ht<Je.sel.ranges.length;ht++)Je.sel.ranges[ht].goalColumn=it[ht]}),findWordAt:function(de){var xe=this.doc,Fe=Bt(xe,de.line).text,Je=de.ch,it=de.ch;if(Fe){var at=this.getHelper(de,"wordChars");(de.sticky=="before"||it==Fe.length)&&Je?--Je:++it;for(var ht=Fe.charAt(Je),Rt=Ke(ht,at)?function(jt){return Ke(jt,at)}:/\s/.test(ht)?function(jt){return/\s/.test(jt)}:function(jt){return!/\s/.test(jt)&&!Ke(jt)};Je>0&&Rt(Fe.charAt(Je-1));)--Je;for(;it<Fe.length&&Rt(Fe.charAt(it));)++it}return new xr(Et(de.line,Je),Et(de.line,it))},toggleOverwrite:function(de){de!=null&&de==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?ot(this.display.cursorDiv,"CodeMirror-overwrite"):ke(this.display.cursorDiv,"CodeMirror-overwrite"),Ft(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==Xe()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:On(function(de,xe){Br(this,de,xe)}),getScrollInfo:function(){var de=this.display.scroller;return{left:de.scrollLeft,top:de.scrollTop,height:de.scrollHeight-Ui(this)-this.display.barHeight,width:de.scrollWidth-Ui(this)-this.display.barWidth,clientHeight:Co(this),clientWidth:Ho(this)}},scrollIntoView:On(function(de,xe){de==null?(de={from:this.doc.sel.primary().head,to:null},xe==null&&(xe=this.options.cursorScrollMargin)):typeof de=="number"?de={from:Et(de,0),to:null}:de.from==null&&(de={from:de,to:null}),de.to||(de.to=de.from),de.margin=xe||0,de.from.line!=null?xs(this,de):vs(this,de.from,de.to,de.margin)}),setSize:On(function(de,xe){var Fe=this,Je=function(at){return typeof at=="number"||/^\d+$/.test(String(at))?at+"px":at};de!=null&&(this.display.wrapper.style.width=Je(de)),xe!=null&&(this.display.wrapper.style.height=Je(xe)),this.options.lineWrapping&&Ra(this);var it=this.display.viewFrom;this.doc.iter(it,this.display.viewTo,function(at){if(at.widgets){for(var ht=0;ht<at.widgets.length;ht++)if(at.widgets[ht].noHScroll){ko(Fe,it,"widget");break}}++it}),this.curOp.forceUpdate=!0,Ft(this,"refresh",this)}),operation:function(de){return wt(this,de)},startOperation:function(){return Po(this)},endOperation:function(){return fa(this)},refresh:On(function(){var de=this.display.cachedTextHeight;Eo(this),this.curOp.forceUpdate=!0,pa(this),Br(this,this.doc.scrollLeft,this.doc.scrollTop),zi(this.display),(de==null||Math.abs(de-yo(this.display))>.5||this.options.lineWrapping)&&fs(this),Ft(this,"refresh",this)}),swapDoc:On(function(de){var xe=this.doc;return xe.cm=null,this.state.selectingText&&this.state.selectingText(),Ba(this,de),pa(this),this.display.input.reset(),Br(this,de.scrollLeft,de.scrollTop),this.curOp.forceScroll=!0,Ii(this,"swapDoc",this,xe),xe}),phrase:function(de){var xe=this.options.phrases;return xe&&Object.prototype.hasOwnProperty.call(xe,de)?xe[de]:de},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}},Kt(a),a.registerHelper=function(de,xe,Fe){fe.hasOwnProperty(de)||(fe[de]=a[de]={_global:[]}),fe[de][xe]=Fe},a.registerGlobalHelper=function(de,xe,Fe,Je){a.registerHelper(de,xe,Je),fe[de]._global.push({pred:Fe,val:Je})}}function wl(a,y,fe,de,xe){var Fe=y,Je=fe,it=Bt(a,y.line),at=xe&&a.direction=="rtl"?-fe:fe;function ht(){var vr=y.line+at;return vr<a.first||vr>=a.first+a.size?!1:(y=new Et(vr,y.ch,y.sticky),it=Bt(a,vr))}function Rt(vr){var lr;if(de=="codepoint"){var Er=it.text.charCodeAt(y.ch+(de>0?0:-1));isNaN(Er)?lr=null:lr=new Et(y.line,Math.max(0,Math.min(it.text.length,y.ch+fe*(Er>=55296&&Er<56320?2:1))),-fe)}else xe?lr=Au(a.cm,it,y,fe):lr=ml(it,y,fe);if(lr==null)if(!vr&&ht())y=vl(xe,a.cm,it,y.line,at);else return!1;else y=lr;return!0}if(de=="char"||de=="codepoint")Rt();else if(de=="column")Rt(!0);else if(de=="word"||de=="group")for(var jt=null,on=de=="group",en=a.cm&&a.cm.getHelper(y,"wordChars"),Tn=!0;!(fe<0&&!Rt(!Tn));Tn=!1){var Zn=it.text.charAt(y.ch)||`
|
|
|
`,Qn=Ke(Zn,en)?"w":on&&Zn==`
|
|
|
`?"n":!on||/\s/.test(Zn)?null:"p";if(on&&!Tn&&!Qn&&(Qn="s"),jt&&jt!=Qn){fe<0&&(fe=1,Rt(),y.sticky="after");break}if(Qn&&(jt=Qn),fe>0&&!Rt(!Tn))break}var sr=Qs(a,y,Fe,Je,!0);return nn(Fe,sr)&&(sr.hitSide=!0),sr}function du(a,y,fe,de){var xe=a.doc,Fe=y.left,Je;if(de=="page"){var it=Math.min(a.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),at=Math.max(it-.5*yo(a.display),3);Je=(fe>0?y.bottom:y.top)+fe*at}else de=="line"&&(Je=fe>0?y.bottom+3:y.top-3);for(var ht;ht=ro(a,Fe,Je),!!ht.outside;){if(fe<0?Je<=0:Je>=xe.height){ht.hitSide=!0;break}Je+=fe*5}return ht}var Vi=function(a){this.cm=a,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new ze,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};Vi.prototype.init=function(a){var y=this,fe=this,de=fe.cm,xe=fe.div=a.lineDiv;uu(xe,de.options.spellcheck,de.options.autocorrect,de.options.autocapitalize);function Fe(it){for(var at=it.target;at;at=at.parentNode){if(at==xe)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(at.className))break}return!1}vt(xe,"paste",function(it){!Fe(it)||yt(de,it)||au(it,de)||te<=11&&setTimeout(Xn(de,function(){return y.updateFromDOM()}),20)}),vt(xe,"compositionstart",function(it){y.composing={data:it.data,done:!1}}),vt(xe,"compositionupdate",function(it){y.composing||(y.composing={data:it.data,done:!1})}),vt(xe,"compositionend",function(it){y.composing&&(it.data!=y.composing.data&&y.readFromDOMSoon(),y.composing.done=!0)}),vt(xe,"touchstart",function(){return fe.forceCompositionEnd()}),vt(xe,"input",function(){y.composing||y.readFromDOMSoon()});function Je(it){if(!(!Fe(it)||yt(de,it))){if(de.somethingSelected())il({lineWise:!1,text:de.getSelections()}),it.type=="cut"&&de.replaceSelection("",null,"cut");else if(de.options.lineWiseCopyCut){var at=lu(de);il({lineWise:!0,text:at.text}),it.type=="cut"&&de.operation(function(){de.setSelections(at.ranges,0,et),de.replaceSelection("",null,"cut")})}else return;if(it.clipboardData){it.clipboardData.clearData();var ht=Ta.text.join(`
|
|
|
`);if(it.clipboardData.setData("Text",ht),it.clipboardData.getData("Text")==ht){it.preventDefault();return}}var Rt=cu(),jt=Rt.firstChild;de.display.lineSpace.insertBefore(Rt,de.display.lineSpace.firstChild),jt.value=Ta.text.join(`
|
|
|
`);var on=document.activeElement;rt(jt),setTimeout(function(){de.display.lineSpace.removeChild(Rt),on.focus(),on==xe&&fe.showPrimarySelection()},50)}}vt(xe,"copy",Je),vt(xe,"cut",Je)},Vi.prototype.screenReaderLabelChanged=function(a){a?this.div.setAttribute("aria-label",a):this.div.removeAttribute("aria-label")},Vi.prototype.prepareSelection=function(){var a=bs(this.cm,!1);return a.focus=document.activeElement==this.div,a},Vi.prototype.showSelection=function(a,y){!a||!this.cm.display.view.length||((a.focus||y)&&this.showPrimarySelection(),this.showMultipleSelections(a))},Vi.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Vi.prototype.showPrimarySelection=function(){var a=this.getSelection(),y=this.cm,fe=y.doc.sel.primary(),de=fe.from(),xe=fe.to();if(y.display.viewTo==y.display.viewFrom||de.line>=y.display.viewTo||xe.line<y.display.viewFrom){a.removeAllRanges();return}var Fe=ol(y,a.anchorNode,a.anchorOffset),Je=ol(y,a.focusNode,a.focusOffset);if(!(Fe&&!Fe.bad&&Je&&!Je.bad&&Ut(bn(Fe,Je),de)==0&&Ut(gn(Fe,Je),xe)==0)){var it=y.display.view,at=de.line>=y.display.viewFrom&&fu(y,de)||{node:it[0].measure.map[2],offset:0},ht=xe.line<y.display.viewTo&&fu(y,xe);if(!ht){var Rt=it[it.length-1].measure,jt=Rt.maps?Rt.maps[Rt.maps.length-1]:Rt.map;ht={node:jt[jt.length-1],offset:jt[jt.length-2]-jt[jt.length-3]}}if(!at||!ht){a.removeAllRanges();return}var on=a.rangeCount&&a.getRangeAt(0),en;try{en=Pe(at.node,at.offset,ht.offset,ht.node)}catch(Tn){}en&&(!ce&&y.state.focused?(a.collapse(at.node,at.offset),en.collapsed||(a.removeAllRanges(),a.addRange(en))):(a.removeAllRanges(),a.addRange(en)),on&&a.anchorNode==null?a.addRange(on):ce&&this.startGracePeriod()),this.rememberSelection()}},Vi.prototype.startGracePeriod=function(){var a=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){a.gracePeriod=!1,a.selectionChanged()&&a.cm.operation(function(){return a.cm.curOp.selectionChanged=!0})},20)},Vi.prototype.showMultipleSelections=function(a){Ee(this.cm.display.cursorDiv,a.cursors),Ee(this.cm.display.selectionDiv,a.selection)},Vi.prototype.rememberSelection=function(){var a=this.getSelection();this.lastAnchorNode=a.anchorNode,this.lastAnchorOffset=a.anchorOffset,this.lastFocusNode=a.focusNode,this.lastFocusOffset=a.focusOffset},Vi.prototype.selectionInEditor=function(){var a=this.getSelection();if(!a.rangeCount)return!1;var y=a.getRangeAt(0).commonAncestorContainer;return Qe(this.div,y)},Vi.prototype.focus=function(){this.cm.options.readOnly!="nocursor"&&((!this.selectionInEditor()||document.activeElement!=this.div)&&this.showSelection(this.prepareSelection(),!0),this.div.focus())},Vi.prototype.blur=function(){this.div.blur()},Vi.prototype.getField=function(){return this.div},Vi.prototype.supportsTouch=function(){return!0},Vi.prototype.receivedFocus=function(){var a=this;this.selectionInEditor()?this.pollSelection():wt(this.cm,function(){return a.cm.curOp.selectionChanged=!0});function y(){a.cm.state.focused&&(a.pollSelection(),a.polling.set(a.cm.options.pollInterval,y))}this.polling.set(this.cm.options.pollInterval,y)},Vi.prototype.selectionChanged=function(){var a=this.getSelection();return a.anchorNode!=this.lastAnchorNode||a.anchorOffset!=this.lastAnchorOffset||a.focusNode!=this.lastFocusNode||a.focusOffset!=this.lastFocusOffset},Vi.prototype.pollSelection=function(){if(!(this.readDOMTimeout!=null||this.gracePeriod||!this.selectionChanged())){var a=this.getSelection(),y=this.cm;if(ae&&ne&&this.cm.display.gutterSpecs.length&&Yu(a.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var fe=ol(y,a.anchorNode,a.anchorOffset),de=ol(y,a.focusNode,a.focusOffset);fe&&de&&wt(y,function(){Uo(y.doc,mi(fe,de),et),(fe.bad||de.bad)&&(y.curOp.selectionChanged=!0)})}}},Vi.prototype.pollContent=function(){this.readDOMTimeout!=null&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var a=this.cm,y=a.display,fe=a.doc.sel.primary(),de=fe.from(),xe=fe.to();if(de.ch==0&&de.line>a.firstLine()&&(de=Et(de.line-1,Bt(a.doc,de.line-1).length)),xe.ch==Bt(a.doc,xe.line).text.length&&xe.line<a.lastLine()&&(xe=Et(xe.line+1,0)),de.line<y.viewFrom||xe.line>y.viewTo-1)return!1;var Fe,Je,it;de.line==y.viewFrom||(Fe=_o(a,de.line))==0?(Je=At(y.view[0].line),it=y.view[0].node):(Je=At(y.view[Fe].line),it=y.view[Fe-1].node.nextSibling);var at=_o(a,xe.line),ht,Rt;if(at==y.view.length-1?(ht=y.viewTo-1,Rt=y.lineDiv.lastChild):(ht=At(y.view[at+1].line)-1,Rt=y.view[at+1].node.previousSibling),!it)return!1;for(var jt=a.doc.splitLines(Xu(a,it,Rt,Je,ht)),on=Jt(a.doc,Et(Je,0),Et(ht,Bt(a.doc,ht).text.length));jt.length>1&&on.length>1;)if(xt(jt)==xt(on))jt.pop(),on.pop(),ht--;else if(jt[0]==on[0])jt.shift(),on.shift(),Je++;else break;for(var en=0,Tn=0,Zn=jt[0],Qn=on[0],sr=Math.min(Zn.length,Qn.length);en<sr&&Zn.charCodeAt(en)==Qn.charCodeAt(en);)++en;for(var vr=xt(jt),lr=xt(on),Er=Math.min(vr.length-(jt.length==1?en:0),lr.length-(on.length==1?en:0));Tn<Er&&vr.charCodeAt(vr.length-Tn-1)==lr.charCodeAt(lr.length-Tn-1);)++Tn;if(jt.length==1&&on.length==1&&Je==de.line)for(;en&&en>de.ch&&vr.charCodeAt(vr.length-Tn-1)==lr.charCodeAt(lr.length-Tn-1);)en--,Tn++;jt[jt.length-1]=vr.slice(0,vr.length-Tn).replace(/^\u200b+/,""),jt[0]=jt[0].slice(en).replace(/\u200b+$/,"");var ei=Et(Je,en),Kr=Et(ht,on.length?xt(on).length-Tn:0);if(jt.length>1||jt[0]||Ut(ei,Kr))return Ls(a.doc,jt,ei,Kr,"+input"),!0},Vi.prototype.ensurePolled=function(){this.forceCompositionEnd()},Vi.prototype.reset=function(){this.forceCompositionEnd()},Vi.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Vi.prototype.readFromDOMSoon=function(){var a=this;this.readDOMTimeout==null&&(this.readDOMTimeout=setTimeout(function(){if(a.readDOMTimeout=null,a.composing)if(a.composing.done)a.composing=null;else return;a.updateFromDOM()},80))},Vi.prototype.updateFromDOM=function(){var a=this;(this.cm.isReadOnly()||!this.pollContent())&&wt(this.cm,function(){return Eo(a.cm)})},Vi.prototype.setUneditable=function(a){a.contentEditable="false"},Vi.prototype.onKeyPress=function(a){a.charCode==0||this.composing||(a.preventDefault(),this.cm.isReadOnly()||Xn(this.cm,Sl)(this.cm,String.fromCharCode(a.charCode==null?a.keyCode:a.charCode),0))},Vi.prototype.readOnlyChanged=function(a){this.div.contentEditable=String(a!="nocursor")},Vi.prototype.onContextMenu=function(){},Vi.prototype.resetPosition=function(){},Vi.prototype.needsContentAttribute=!0;function fu(a,y){var fe=Yo(a,y.line);if(!fe||fe.hidden)return null;var de=Bt(a.doc,y.line),xe=Ki(fe,de,y.line),Fe=Pt(de,a.doc.direction),Je="left";if(Fe){var it=tt(Fe,y.ch);Je=it%2?"right":"left"}var at=qa(xe.map,y.ch,Je);return at.offset=at.collapse=="right"?at.end:at.start,at}function Yu(a){for(var y=a;y;y=y.parentNode)if(/CodeMirror-gutter-wrapper/.test(y.className))return!0;return!1}function Rs(a,y){return y&&(a.bad=!0),a}function Xu(a,y,fe,de,xe){var Fe="",Je=!1,it=a.doc.lineSeparator(),at=!1;function ht(en){return function(Tn){return Tn.id==en}}function Rt(){Je&&(Fe+=it,at&&(Fe+=it),Je=at=!1)}function jt(en){en&&(Rt(),Fe+=en)}function on(en){if(en.nodeType==1){var Tn=en.getAttribute("cm-text");if(Tn){jt(Tn);return}var Zn=en.getAttribute("cm-marker"),Qn;if(Zn){var sr=a.findMarks(Et(de,0),Et(xe+1,0),ht(+Zn));sr.length&&(Qn=sr[0].find(0))&&jt(Jt(a.doc,Qn.from,Qn.to).join(it));return}if(en.getAttribute("contenteditable")=="false")return;var vr=/^(pre|div|p|li|table|br)$/i.test(en.nodeName);if(!/^br$/i.test(en.nodeName)&&en.textContent.length==0)return;vr&&Rt();for(var lr=0;lr<en.childNodes.length;lr++)on(en.childNodes[lr]);/^(pre|p)$/i.test(en.nodeName)&&(at=!0),vr&&(Je=!0)}else en.nodeType==3&&jt(en.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}for(;on(y),y!=fe;)y=y.nextSibling,at=!1;return Fe}function ol(a,y,fe){var de;if(y==a.display.lineDiv){if(de=a.display.lineDiv.childNodes[fe],!de)return Rs(a.clipPos(Et(a.display.viewTo-1)),!0);y=null,fe=0}else for(de=y;;de=de.parentNode){if(!de||de==a.display.lineDiv)return null;if(de.parentNode&&de.parentNode==a.display.lineDiv)break}for(var xe=0;xe<a.display.view.length;xe++){var Fe=a.display.view[xe];if(Fe.node==de)return qu(Fe,y,fe)}}function qu(a,y,fe){var de=a.text.firstChild,xe=!1;if(!y||!Qe(de,y))return Rs(Et(At(a.line),0),!0);if(y==de&&(xe=!0,y=de.childNodes[fe],fe=0,!y)){var Fe=a.rest?xt(a.rest):a.line;return Rs(Et(At(Fe),Fe.text.length),xe)}var Je=y.nodeType==3?y:null,it=y;for(!Je&&y.childNodes.length==1&&y.firstChild.nodeType==3&&(Je=y.firstChild,fe&&(fe=Je.nodeValue.length));it.parentNode!=de;)it=it.parentNode;var at=a.measure,ht=at.maps;function Rt(Qn,sr,vr){for(var lr=-1;lr<(ht?ht.length:0);lr++)for(var Er=lr<0?at.map:ht[lr],ei=0;ei<Er.length;ei+=3){var Kr=Er[ei+2];if(Kr==Qn||Kr==sr){var ki=At(lr<0?a.line:a.rest[lr]),eo=Er[ei]+vr;return(vr<0||Kr!=Qn)&&(eo=Er[ei+(vr?1:0)]),Et(ki,eo)}}}var jt=Rt(Je,it,fe);if(jt)return Rs(jt,xe);for(var on=it.nextSibling,en=Je?Je.nodeValue.length-fe:0;on;on=on.nextSibling){if(jt=Rt(on,on.firstChild,0),jt)return Rs(Et(jt.line,jt.ch-en),xe);en+=on.textContent.length}for(var Tn=it.previousSibling,Zn=fe;Tn;Tn=Tn.previousSibling){if(jt=Rt(Tn,Tn.firstChild,-1),jt)return Rs(Et(jt.line,jt.ch+Zn),xe);Zn+=Tn.textContent.length}}var bo=function(a){this.cm=a,this.prevInput="",this.pollingFast=!1,this.polling=new ze,this.hasSelection=!1,this.composing=null};bo.prototype.init=function(a){var y=this,fe=this,de=this.cm;this.createField(a);var xe=this.textarea;a.wrapper.insertBefore(this.wrapper,a.wrapper.firstChild),re&&(xe.style.width="0px"),vt(xe,"input",function(){se&&te>=9&&y.hasSelection&&(y.hasSelection=null),fe.poll()}),vt(xe,"paste",function(Je){yt(de,Je)||au(Je,de)||(de.state.pasteIncoming=+new Date,fe.fastPoll())});function Fe(Je){if(!yt(de,Je)){if(de.somethingSelected())il({lineWise:!1,text:de.getSelections()});else if(de.options.lineWiseCopyCut){var it=lu(de);il({lineWise:!0,text:it.text}),Je.type=="cut"?de.setSelections(it.ranges,null,et):(fe.prevInput="",xe.value=it.text.join(`
|
|
|
`),rt(xe))}else return;Je.type=="cut"&&(de.state.cutIncoming=+new Date)}}vt(xe,"cut",Fe),vt(xe,"copy",Fe),vt(a.scroller,"paste",function(Je){if(!(Xi(a,Je)||yt(de,Je))){if(!xe.dispatchEvent){de.state.pasteIncoming=+new Date,fe.focus();return}var it=new Event("paste");it.clipboardData=Je.clipboardData,xe.dispatchEvent(it)}}),vt(a.lineSpace,"selectstart",function(Je){Xi(a,Je)||sn(Je)}),vt(xe,"compositionstart",function(){var Je=de.getCursor("from");fe.composing&&fe.composing.range.clear(),fe.composing={start:Je,range:de.markText(Je,de.getCursor("to"),{className:"CodeMirror-composing"})}}),vt(xe,"compositionend",function(){fe.composing&&(fe.poll(),fe.composing.range.clear(),fe.composing=null)})},bo.prototype.createField=function(a){this.wrapper=cu(),this.textarea=this.wrapper.firstChild},bo.prototype.screenReaderLabelChanged=function(a){a?this.textarea.setAttribute("aria-label",a):this.textarea.removeAttribute("aria-label")},bo.prototype.prepareSelection=function(){var a=this.cm,y=a.display,fe=a.doc,de=bs(a);if(a.options.moveInputWithCursor){var xe=qi(a,fe.sel.primary().head,"div"),Fe=y.wrapper.getBoundingClientRect(),Je=y.lineDiv.getBoundingClientRect();de.teTop=Math.max(0,Math.min(y.wrapper.clientHeight-10,xe.top+Je.top-Fe.top)),de.teLeft=Math.max(0,Math.min(y.wrapper.clientWidth-10,xe.left+Je.left-Fe.left))}return de},bo.prototype.showSelection=function(a){var y=this.cm,fe=y.display;Ee(fe.cursorDiv,a.cursors),Ee(fe.selectionDiv,a.selection),a.teTop!=null&&(this.wrapper.style.top=a.teTop+"px",this.wrapper.style.left=a.teLeft+"px")},bo.prototype.reset=function(a){if(!(this.contextMenuPending||this.composing)){var y=this.cm;if(y.somethingSelected()){this.prevInput="";var fe=y.getSelection();this.textarea.value=fe,y.state.focused&&rt(this.textarea),se&&te>=9&&(this.hasSelection=fe)}else a||(this.prevInput=this.textarea.value="",se&&te>=9&&(this.hasSelection=null))}},bo.prototype.getField=function(){return this.textarea},bo.prototype.supportsTouch=function(){return!1},bo.prototype.focus=function(){if(this.cm.options.readOnly!="nocursor"&&(!oe||Xe()!=this.textarea))try{this.textarea.focus()}catch(a){}},bo.prototype.blur=function(){this.textarea.blur()},bo.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},bo.prototype.receivedFocus=function(){this.slowPoll()},bo.prototype.slowPoll=function(){var a=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){a.poll(),a.cm.state.focused&&a.slowPoll()})},bo.prototype.fastPoll=function(){var a=!1,y=this;y.pollingFast=!0;function fe(){var de=y.poll();!de&&!a?(a=!0,y.polling.set(60,fe)):(y.pollingFast=!1,y.slowPoll())}y.polling.set(20,fe)},bo.prototype.poll=function(){var a=this,y=this.cm,fe=this.textarea,de=this.prevInput;if(this.contextMenuPending||!y.state.focused||Vn(fe)&&!de&&!this.composing||y.isReadOnly()||y.options.disableInput||y.state.keySeq)return!1;var xe=fe.value;if(xe==de&&!y.somethingSelected())return!1;if(se&&te>=9&&this.hasSelection===xe||ve&&/[\uf700-\uf7ff]/.test(xe))return y.display.input.reset(),!1;if(y.doc.sel==y.display.selForContextMenu){var Fe=xe.charCodeAt(0);if(Fe==8203&&!de&&(de="\u200B"),Fe==8666)return this.reset(),this.cm.execCommand("undo")}for(var Je=0,it=Math.min(de.length,xe.length);Je<it&&de.charCodeAt(Je)==xe.charCodeAt(Je);)++Je;return wt(y,function(){Sl(y,xe.slice(Je),de.length-Je,null,a.composing?"*compose":null),xe.length>1e3||xe.indexOf(`
|
|
|
`)>-1?fe.value=a.prevInput="":a.prevInput=xe,a.composing&&(a.composing.range.clear(),a.composing.range=y.markText(a.composing.start,y.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},bo.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},bo.prototype.onKeyPress=function(){se&&te>=9&&(this.hasSelection=null),this.fastPoll()},bo.prototype.onContextMenu=function(a){var y=this,fe=y.cm,de=fe.display,xe=y.textarea;y.contextMenuPending&&y.contextMenuPending();var Fe=da(fe,a),Je=de.scroller.scrollTop;if(!Fe||E)return;var it=fe.options.resetSelectionOnContextMenu;it&&fe.doc.sel.contains(Fe)==-1&&Xn(fe,Uo)(fe.doc,mi(Fe),et);var at=xe.style.cssText,ht=y.wrapper.style.cssText,Rt=y.wrapper.offsetParent.getBoundingClientRect();y.wrapper.style.cssText="position: static",xe.style.cssText=`position: absolute; width: 30px; height: 30px;
|
|
|
top: `+(a.clientY-Rt.top-5)+"px; left: "+(a.clientX-Rt.left-5)+`px;
|
|
|
z-index: 1000; background: `+(se?"rgba(255, 255, 255, .05)":"transparent")+`;
|
|
|
outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);`;var jt;le&&(jt=window.scrollY),de.input.focus(),le&&window.scrollTo(null,jt),de.input.reset(),fe.somethingSelected()||(xe.value=y.prevInput=" "),y.contextMenuPending=en,de.selForContextMenu=fe.doc.sel,clearTimeout(de.detectingSelectAll);function on(){if(xe.selectionStart!=null){var Zn=fe.somethingSelected(),Qn="\u200B"+(Zn?xe.value:"");xe.value="\u21DA",xe.value=Qn,y.prevInput=Zn?"":"\u200B",xe.selectionStart=1,xe.selectionEnd=Qn.length,de.selForContextMenu=fe.doc.sel}}function en(){if(y.contextMenuPending==en&&(y.contextMenuPending=!1,y.wrapper.style.cssText=ht,xe.style.cssText=at,se&&te<9&&de.scrollbars.setScrollTop(de.scroller.scrollTop=Je),xe.selectionStart!=null)){(!se||se&&te<9)&&on();var Zn=0,Qn=function(){de.selForContextMenu==fe.doc.sel&&xe.selectionStart==0&&xe.selectionEnd>0&&y.prevInput=="\u200B"?Xn(fe,Dl)(fe):Zn++<10?de.detectingSelectAll=setTimeout(Qn,500):(de.selForContextMenu=null,de.input.reset())};de.detectingSelectAll=setTimeout(Qn,200)}}if(se&&te>=9&&on(),he){In(a);var Tn=function(){zt(window,"mouseup",Tn),setTimeout(en,20)};vt(window,"mouseup",Tn)}else setTimeout(en,50)},bo.prototype.readOnlyChanged=function(a){a||this.reset(),this.textarea.disabled=a=="nocursor",this.textarea.readOnly=!!a},bo.prototype.setUneditable=function(){},bo.prototype.needsContentAttribute=!1;function Ju(a,y){if(y=y?ut(y):{},y.value=a.value,!y.tabindex&&a.tabIndex&&(y.tabindex=a.tabIndex),!y.placeholder&&a.placeholder&&(y.placeholder=a.placeholder),y.autofocus==null){var fe=Xe();y.autofocus=fe==a||a.getAttribute("autofocus")!=null&&fe==document.body}function de(){a.value=it.getValue()}var xe;if(a.form&&(vt(a.form,"submit",de),!y.leaveSubmitMethodAlone)){var Fe=a.form;xe=Fe.submit;try{var Je=Fe.submit=function(){de(),Fe.submit=xe,Fe.submit(),Fe.submit=Je}}catch(at){}}y.finishInit=function(at){at.save=de,at.getTextArea=function(){return a},at.toTextArea=function(){at.toTextArea=isNaN,de(),a.parentNode.removeChild(at.getWrapperElement()),a.style.display="",a.form&&(zt(a.form,"submit",de),!y.leaveSubmitMethodAlone&&typeof a.form.submit=="function"&&(a.form.submit=xe))}},a.style.display="none";var it=uo(function(at){return a.parentNode.insertBefore(at,a.nextSibling)},y);return it}function Qu(a){a.off=zt,a.on=vt,a.wheelEventPixels=mr,a.Doc=Qo,a.splitLines=or,a.countColumn=Ge,a.findColumn=It,a.isWordChar=Be,a.Pass=nt,a.signal=Ft,a.Line=Ir,a.changeEnd=Rr,a.scrollbarModel=Na,a.Pos=Et,a.cmpPos=Ut,a.modes=cr,a.mimeModes=Dn,a.resolveMode=$t,a.getMode=Ie,a.modeExtensions=Ze,a.extendMode=qe,a.copyState=st,a.startState=Nt,a.innerMode=mt,a.commands=Zs,a.keyMap=Ya,a.keyName=Kl,a.isModifierKey=Zl,a.lookupKey=Ts,a.normalizeKeyMap=Lu,a.StringStream=kt,a.SharedTextMarker=zs,a.TextMarker=ss,a.LineWidget=Us,a.e_preventDefault=sn,a.e_stopPropagation=Sn,a.e_stop=In,a.addClass=ot,a.contains=Qe,a.rmClass=ke,a.keyNames=ls}Wu(uo),Vu(uo);var $u="iter insert remove copy getEditor constructor".split(" ");for(var al in Qo.prototype)Qo.prototype.hasOwnProperty(al)&&Ve($u,al)<0&&(uo.prototype[al]=function(a){return function(){return a.apply(this.doc,arguments)}}(Qo.prototype[al]));return Kt(Qo),uo.inputStyles={textarea:bo,contenteditable:Vi},uo.defineMode=function(a){!uo.defaults.mode&&a!="null"&&(uo.defaults.mode=a),Cn.apply(this,arguments)},uo.defineMIME=er,uo.defineMode("null",function(){return{token:function(a){return a.skipToEnd()}}}),uo.defineMIME("text/plain","null"),uo.defineExtension=function(a,y){uo.prototype[a]=y},uo.defineDocExtension=function(a,y){Qo.prototype[a]=y},uo.fromTextArea=Ju,Qu(uo),uo.version="5.58.2",uo})},25419:function(qt,Dt,be){(function(ce){ce(be(89780),be(15525),be(98101))})(function(ce){"use strict";ce.defineMode("markdown",function(ie,Ce){var ue=ce.getMode(ie,"text/html"),se=ue.name=="null";function te(Ge){if(ce.findModeByName){var ze=ce.findModeByName(Ge);ze&&(Ge=ze.mime||ze.mimes[0])}var Ve=ce.getMode(ie,Ge);return Ve.name=="null"?null:Ve}Ce.highlightFormatting===void 0&&(Ce.highlightFormatting=!1),Ce.maxBlockquoteDepth===void 0&&(Ce.maxBlockquoteDepth=0),Ce.taskLists===void 0&&(Ce.taskLists=!1),Ce.strikethrough===void 0&&(Ce.strikethrough=!1),Ce.emoji===void 0&&(Ce.emoji=!1),Ce.fencedCodeBlockHighlighting===void 0&&(Ce.fencedCodeBlockHighlighting=!0),Ce.fencedCodeBlockDefaultMode===void 0&&(Ce.fencedCodeBlockDefaultMode="text/plain"),Ce.xml===void 0&&(Ce.xml=!0),Ce.tokenTypeOverrides===void 0&&(Ce.tokenTypeOverrides={});var le={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 ee in le)le.hasOwnProperty(ee)&&Ce.tokenTypeOverrides[ee]&&(le[ee]=Ce.tokenTypeOverrides[ee]);var ne=/^([*\-_])(?:\s*\1){2,}\s*$/,E=/^(?:[*\-+]|^[0-9]+([.)]))\s+/,b=/^\[(x| )\](?=\s)/i,z=Ce.allowAtxHeaderWithoutSpace?/^(#+)/:/^(#+)(?: |$)/,x=/^ {0,3}(?:\={1,}|-{2,})\s*$/,re=/^[^#!\[\]*_\\<>` "'(~:]+/,ae=/^(~~~+|```+)[ \t]*([\w\/+#-]*)[^\n`]*$/,oe=/^\s*\[[^\]]+?\]:.*$/,ve=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\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]/,ye=" ";function me(Ge,ze,Ve){return ze.f=ze.inline=Ve,Ve(Ge,ze)}function ge(Ge,ze,Ve){return ze.f=ze.block=Ve,Ve(Ge,ze)}function _e(Ge){return!Ge||!/\S/.test(Ge.string)}function he(Ge){if(Ge.linkTitle=!1,Ge.linkHref=!1,Ge.linkText=!1,Ge.em=!1,Ge.strong=!1,Ge.strikethrough=!1,Ge.quote=0,Ge.indentedCode=!1,Ge.f==ke){var ze=se;if(!ze){var Ve=ce.innerMode(ue,Ge.htmlState);ze=Ve.mode.name=="xml"&&Ve.state.tagStart===null&&!Ve.state.context&&Ve.state.tokenize.isInText}ze&&(Ge.f=je,Ge.block=pe,Ge.htmlState=null)}return Ge.trailingSpace=0,Ge.trailingSpaceNewLine=!1,Ge.prevLine=Ge.thisLine,Ge.thisLine={stream:null},null}function pe(Ge,ze){var Ve=Ge.column()===ze.indentation,$e=_e(ze.prevLine.stream),nt=ze.indentedCode,et=ze.prevLine.hr,pt=ze.list!==!1,ct=(ze.listStack[ze.listStack.length-1]||0)+3;ze.indentedCode=!1;var It=ze.indentation;if(ze.indentationDiff===null&&(ze.indentationDiff=ze.indentation,pt)){for(ze.list=null;It<ze.listStack[ze.listStack.length-1];)ze.listStack.pop(),ze.listStack.length?ze.indentation=ze.listStack[ze.listStack.length-1]:ze.list=!1;ze.list!==!1&&(ze.indentationDiff=It-ze.listStack[ze.listStack.length-1])}var dt=!$e&&!et&&!ze.prevLine.header&&(!pt||!nt)&&!ze.prevLine.fencedCodeEnd,Mt=(ze.list===!1||et||$e)&&ze.indentation<=ct&&Ge.match(ne),xt=null;if(ze.indentationDiff>=4&&(nt||ze.prevLine.fencedCodeEnd||ze.prevLine.header||$e))return Ge.skipToEnd(),ze.indentedCode=!0,le.code;if(Ge.eatSpace())return null;if(Ve&&ze.indentation<=ct&&(xt=Ge.match(z))&&xt[1].length<=6)return ze.quote=0,ze.header=xt[1].length,ze.thisLine.header=!0,Ce.highlightFormatting&&(ze.formatting="header"),ze.f=ze.inline,Ee(ze);if(ze.indentation<=ct&&Ge.eat(">"))return ze.quote=Ve?1:ze.quote+1,Ce.highlightFormatting&&(ze.formatting="quote"),Ge.eatSpace(),Ee(ze);if(!Mt&&!ze.setext&&Ve&&ze.indentation<=ct&&(xt=Ge.match(E))){var gt=xt[1]?"ol":"ul";return ze.indentation=It+Ge.current().length,ze.list=!0,ze.quote=0,ze.listStack.push(ze.indentation),ze.em=!1,ze.strong=!1,ze.code=!1,ze.strikethrough=!1,Ce.taskLists&&Ge.match(b,!1)&&(ze.taskList=!0),ze.f=ze.inline,Ce.highlightFormatting&&(ze.formatting=["list","list-"+gt]),Ee(ze)}else{if(Ve&&ze.indentation<=ct&&(xt=Ge.match(ae,!0)))return ze.quote=0,ze.fencedEndRE=new RegExp(xt[1]+"+ *$"),ze.localMode=Ce.fencedCodeBlockHighlighting&&te(xt[2]||Ce.fencedCodeBlockDefaultMode),ze.localMode&&(ze.localState=ce.startState(ze.localMode)),ze.f=ze.block=Te,Ce.highlightFormatting&&(ze.formatting="code-block"),ze.code=-1,Ee(ze);if(ze.setext||(!dt||!pt)&&!ze.quote&&ze.list===!1&&!ze.code&&!Mt&&!oe.test(Ge.string)&&(xt=Ge.lookAhead(1))&&(xt=xt.match(x)))return ze.setext?(ze.header=ze.setext,ze.setext=0,Ge.skipToEnd(),Ce.highlightFormatting&&(ze.formatting="header")):(ze.header=xt[0].charAt(0)=="="?1:2,ze.setext=ze.header),ze.thisLine.header=!0,ze.f=ze.inline,Ee(ze);if(Mt)return Ge.skipToEnd(),ze.hr=!0,ze.thisLine.hr=!0,le.hr;if(Ge.peek()==="[")return me(Ge,ze,He)}return me(Ge,ze,ze.inline)}function ke(Ge,ze){var Ve=ue.token(Ge,ze.htmlState);if(!se){var $e=ce.innerMode(ue,ze.htmlState);($e.mode.name=="xml"&&$e.state.tagStart===null&&!$e.state.context&&$e.state.tokenize.isInText||ze.md_inside&&Ge.current().indexOf(">")>-1)&&(ze.f=je,ze.block=pe,ze.htmlState=null)}return Ve}function Te(Ge,ze){var Ve=ze.listStack[ze.listStack.length-1]||0,$e=ze.indentation<Ve,nt=Ve+3;if(ze.fencedEndRE&&ze.indentation<=nt&&($e||Ge.match(ze.fencedEndRE))){Ce.highlightFormatting&&(ze.formatting="code-block");var et;return $e||(et=Ee(ze)),ze.localMode=ze.localState=null,ze.block=pe,ze.f=je,ze.fencedEndRE=null,ze.code=0,ze.thisLine.fencedCodeEnd=!0,$e?ge(Ge,ze,ze.block):et}else return ze.localMode?ze.localMode.token(Ge,ze.localState):(Ge.skipToEnd(),le.code)}function Ee(Ge){var ze=[];if(Ge.formatting){ze.push(le.formatting),typeof Ge.formatting=="string"&&(Ge.formatting=[Ge.formatting]);for(var Ve=0;Ve<Ge.formatting.length;Ve++)ze.push(le.formatting+"-"+Ge.formatting[Ve]),Ge.formatting[Ve]==="header"&&ze.push(le.formatting+"-"+Ge.formatting[Ve]+"-"+Ge.header),Ge.formatting[Ve]==="quote"&&(!Ce.maxBlockquoteDepth||Ce.maxBlockquoteDepth>=Ge.quote?ze.push(le.formatting+"-"+Ge.formatting[Ve]+"-"+Ge.quote):ze.push("error"))}if(Ge.taskOpen)return ze.push("meta"),ze.length?ze.join(" "):null;if(Ge.taskClosed)return ze.push("property"),ze.length?ze.join(" "):null;if(Ge.linkHref?ze.push(le.linkHref,"url"):(Ge.strong&&ze.push(le.strong),Ge.em&&ze.push(le.em),Ge.strikethrough&&ze.push(le.strikethrough),Ge.emoji&&ze.push(le.emoji),Ge.linkText&&ze.push(le.linkText),Ge.code&&ze.push(le.code),Ge.image&&ze.push(le.image),Ge.imageAltText&&ze.push(le.imageAltText,"link"),Ge.imageMarker&&ze.push(le.imageMarker)),Ge.header&&ze.push(le.header,le.header+"-"+Ge.header),Ge.quote&&(ze.push(le.quote),!Ce.maxBlockquoteDepth||Ce.maxBlockquoteDepth>=Ge.quote?ze.push(le.quote+"-"+Ge.quote):ze.push(le.quote+"-"+Ce.maxBlockquoteDepth)),Ge.list!==!1){var $e=(Ge.listStack.length-1)%3;$e?$e===1?ze.push(le.list2):ze.push(le.list3):ze.push(le.list1)}return Ge.trailingSpaceNewLine?ze.push("trailing-space-new-line"):Ge.trailingSpace&&ze.push("trailing-space-"+(Ge.trailingSpace%2?"a":"b")),ze.length?ze.join(" "):null}function Oe(Ge,ze){if(Ge.match(re,!0))return Ee(ze)}function je(Ge,ze){var Ve=ze.text(Ge,ze);if(typeof Ve!="undefined")return Ve;if(ze.list)return ze.list=null,Ee(ze);if(ze.taskList){var $e=Ge.match(b,!0)[1]===" ";return $e?ze.taskOpen=!0:ze.taskClosed=!0,Ce.highlightFormatting&&(ze.formatting="task"),ze.taskList=!1,Ee(ze)}if(ze.taskOpen=!1,ze.taskClosed=!1,ze.header&&Ge.match(/^#+$/,!0))return Ce.highlightFormatting&&(ze.formatting="header"),Ee(ze);var nt=Ge.next();if(ze.linkTitle){ze.linkTitle=!1;var et=nt;nt==="("&&(et=")"),et=(et+"").replace(/([.?*+^\[\]\\(){}|-])/g,"\\$1");var pt="^\\s*(?:[^"+et+"\\\\]+|\\\\\\\\|\\\\.)"+et;if(Ge.match(new RegExp(pt),!0))return le.linkHref}if(nt==="`"){var ct=ze.formatting;Ce.highlightFormatting&&(ze.formatting="code"),Ge.eatWhile("`");var It=Ge.current().length;if(ze.code==0&&(!ze.quote||It==1))return ze.code=It,Ee(ze);if(It==ze.code){var dt=Ee(ze);return ze.code=0,dt}else return ze.formatting=ct,Ee(ze)}else if(ze.code)return Ee(ze);if(nt==="\\"&&(Ge.next(),Ce.highlightFormatting)){var Mt=Ee(ze),xt=le.formatting+"-escape";return Mt?Mt+" "+xt:xt}if(nt==="!"&&Ge.match(/\[[^\]]*\] ?(?:\(|\[)/,!1))return ze.imageMarker=!0,ze.image=!0,Ce.highlightFormatting&&(ze.formatting="image"),Ee(ze);if(nt==="["&&ze.imageMarker&&Ge.match(/[^\]]*\](\(.*?\)| ?\[.*?\])/,!1))return ze.imageMarker=!1,ze.imageAltText=!0,Ce.highlightFormatting&&(ze.formatting="image"),Ee(ze);if(nt==="]"&&ze.imageAltText){Ce.highlightFormatting&&(ze.formatting="image");var Mt=Ee(ze);return ze.imageAltText=!1,ze.image=!1,ze.inline=ze.f=Qe,Mt}if(nt==="["&&!ze.image)return ze.linkText&&Ge.match(/^.*?\]/)||(ze.linkText=!0,Ce.highlightFormatting&&(ze.formatting="link")),Ee(ze);if(nt==="]"&&ze.linkText){Ce.highlightFormatting&&(ze.formatting="link");var Mt=Ee(ze);return ze.linkText=!1,ze.inline=ze.f=Ge.match(/\(.*?\)| ?\[.*?\]/,!1)?Qe:je,Mt}if(nt==="<"&&Ge.match(/^(https?|ftps?):\/\/(?:[^\\>]|\\.)+>/,!1)){ze.f=ze.inline=Pe,Ce.highlightFormatting&&(ze.formatting="link");var Mt=Ee(ze);return Mt?Mt+=" ":Mt="",Mt+le.linkInline}if(nt==="<"&&Ge.match(/^[^> \\]+@(?:[^\\>]|\\.)+>/,!1)){ze.f=ze.inline=Pe,Ce.highlightFormatting&&(ze.formatting="link");var Mt=Ee(ze);return Mt?Mt+=" ":Mt="",Mt+le.linkEmail}if(Ce.xml&&nt==="<"&&Ge.match(/^(!--|\?|!\[CDATA\[|[a-z][a-z0-9-]*(?:\s+[a-z_:.\-]+(?:\s*=\s*[^>]+)?)*\s*(?:>|$))/i,!1)){var gt=Ge.string.indexOf(">",Ge.pos);if(gt!=-1){var _t=Ge.string.substring(Ge.start,gt);/markdown\s*=\s*('|"){0,1}1('|"){0,1}/.test(_t)&&(ze.md_inside=!0)}return Ge.backUp(1),ze.htmlState=ce.startState(ue),ge(Ge,ze,ke)}if(Ce.xml&&nt==="<"&&Ge.match(/^\/\w*?>/))return ze.md_inside=!1,"tag";if(nt==="*"||nt==="_"){for(var We=1,Ae=Ge.pos==1?" ":Ge.string.charAt(Ge.pos-2);We<3&&Ge.eat(nt);)We++;var Se=Ge.peek()||" ",Be=!/\s/.test(Se)&&(!ve.test(Se)||/\s/.test(Ae)||ve.test(Ae)),Ke=!/\s/.test(Ae)&&(!ve.test(Ae)||/\s/.test(Se)||ve.test(Se)),Ne=null,De=null;if(We%2&&(!ze.em&&Be&&(nt==="*"||!Ke||ve.test(Ae))?Ne=!0:ze.em==nt&&Ke&&(nt==="*"||!Be||ve.test(Se))&&(Ne=!1)),We>1&&(!ze.strong&&Be&&(nt==="*"||!Ke||ve.test(Ae))?De=!0:ze.strong==nt&&Ke&&(nt==="*"||!Be||ve.test(Se))&&(De=!1)),De!=null||Ne!=null){Ce.highlightFormatting&&(ze.formatting=Ne==null?"strong":De==null?"em":"strong em"),Ne===!0&&(ze.em=nt),De===!0&&(ze.strong=nt);var dt=Ee(ze);return Ne===!1&&(ze.em=!1),De===!1&&(ze.strong=!1),dt}}else if(nt===" "&&(Ge.eat("*")||Ge.eat("_"))){if(Ge.peek()===" ")return Ee(ze);Ge.backUp(1)}if(Ce.strikethrough){if(nt==="~"&&Ge.eatWhile(nt)){if(ze.strikethrough){Ce.highlightFormatting&&(ze.formatting="strikethrough");var dt=Ee(ze);return ze.strikethrough=!1,dt}else if(Ge.match(/^[^\s]/,!1))return ze.strikethrough=!0,Ce.highlightFormatting&&(ze.formatting="strikethrough"),Ee(ze)}else if(nt===" "&&Ge.match(/^~~/,!0)){if(Ge.peek()===" ")return Ee(ze);Ge.backUp(2)}}if(Ce.emoji&&nt===":"&&Ge.match(/^(?:[a-z_\d+][a-z_\d+-]*|\-[a-z_\d+][a-z_\d+-]*):/)){ze.emoji=!0,Ce.highlightFormatting&&(ze.formatting="emoji");var we=Ee(ze);return ze.emoji=!1,we}return nt===" "&&(Ge.match(/^ +$/,!1)?ze.trailingSpace++:ze.trailingSpace&&(ze.trailingSpaceNewLine=!0)),Ee(ze)}function Pe(Ge,ze){var Ve=Ge.next();if(Ve===">"){ze.f=ze.inline=je,Ce.highlightFormatting&&(ze.formatting="link");var $e=Ee(ze);return $e?$e+=" ":$e="",$e+le.linkInline}return Ge.match(/^[^>]+/,!0),le.linkInline}function Qe(Ge,ze){if(Ge.eatSpace())return null;var Ve=Ge.next();return Ve==="("||Ve==="["?(ze.f=ze.inline=ot(Ve==="("?")":"]"),Ce.highlightFormatting&&(ze.formatting="link-string"),ze.linkHref=!0,Ee(ze)):"error"}var Xe={")":/^(?:[^\\\(\)]|\\.|\((?:[^\\\(\)]|\\.)*\))*?(?=\))/,"]":/^(?:[^\\\[\]]|\\.|\[(?:[^\\\[\]]|\\.)*\])*?(?=\])/};function ot(Ge){return function(ze,Ve){var $e=ze.next();if($e===Ge){Ve.f=Ve.inline=je,Ce.highlightFormatting&&(Ve.formatting="link-string");var nt=Ee(Ve);return Ve.linkHref=!1,nt}return ze.match(Xe[Ge]),Ve.linkHref=!0,Ee(Ve)}}function He(Ge,ze){return Ge.match(/^([^\]\\]|\\.)*\]:/,!1)?(ze.f=rt,Ge.next(),Ce.highlightFormatting&&(ze.formatting="link"),ze.linkText=!0,Ee(ze)):me(Ge,ze,je)}function rt(Ge,ze){if(Ge.match(/^\]:/,!0)){ze.f=ze.inline=Ye,Ce.highlightFormatting&&(ze.formatting="link");var Ve=Ee(ze);return ze.linkText=!1,Ve}return Ge.match(/^([^\]\\]|\\.)+/,!0),le.linkText}function Ye(Ge,ze){return Ge.eatSpace()?null:(Ge.match(/^[^\s]+/,!0),Ge.peek()===void 0?ze.linkTitle=!0:Ge.match(/^(?:\s+(?:"(?:[^"\\]|\\\\|\\.)+"|'(?:[^'\\]|\\\\|\\.)+'|\((?:[^)\\]|\\\\|\\.)+\)))?/,!0),ze.f=ze.inline=je,le.linkHref+" url")}var ut={startState:function(){return{f:pe,prevLine:{stream:null},thisLine:{stream:null},block:pe,htmlState:null,indentation:0,inline:je,text:Oe,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(Ge){return{f:Ge.f,prevLine:Ge.prevLine,thisLine:Ge.thisLine,block:Ge.block,htmlState:Ge.htmlState&&ce.copyState(ue,Ge.htmlState),indentation:Ge.indentation,localMode:Ge.localMode,localState:Ge.localMode?ce.copyState(Ge.localMode,Ge.localState):null,inline:Ge.inline,text:Ge.text,formatting:!1,linkText:Ge.linkText,linkTitle:Ge.linkTitle,linkHref:Ge.linkHref,code:Ge.code,em:Ge.em,strong:Ge.strong,strikethrough:Ge.strikethrough,emoji:Ge.emoji,header:Ge.header,setext:Ge.setext,hr:Ge.hr,taskList:Ge.taskList,list:Ge.list,listStack:Ge.listStack.slice(0),quote:Ge.quote,indentedCode:Ge.indentedCode,trailingSpace:Ge.trailingSpace,trailingSpaceNewLine:Ge.trailingSpaceNewLine,md_inside:Ge.md_inside,fencedEndRE:Ge.fencedEndRE}},token:function(Ge,ze){if(ze.formatting=!1,Ge!=ze.thisLine.stream){if(ze.header=0,ze.hr=!1,Ge.match(/^\s*$/,!0))return he(ze),null;if(ze.prevLine=ze.thisLine,ze.thisLine={stream:Ge},ze.taskList=!1,ze.trailingSpace=0,ze.trailingSpaceNewLine=!1,!ze.localState&&(ze.f=ze.block,ze.f!=ke)){var Ve=Ge.match(/^\s*/,!0)[0].replace(/\t/g,ye).length;if(ze.indentation=Ve,ze.indentationDiff=null,Ve>0)return null}}return ze.f(Ge,ze)},innerMode:function(Ge){return Ge.block==ke?{state:Ge.htmlState,mode:ue}:Ge.localState?{state:Ge.localState,mode:Ge.localMode}:{state:Ge,mode:ut}},indent:function(Ge,ze,Ve){return Ge.block==ke&&ue.indent?ue.indent(Ge.htmlState,ze,Ve):Ge.localState&&Ge.localMode.indent?Ge.localMode.indent(Ge.localState,ze,Ve):ce.Pass},blankLine:he,getType:Ee,blockCommentStart:"<!--",blockCommentEnd:"-->",closeBrackets:"()[]{}''\"\"``",fold:"markdown"};return ut},"xml"),ce.defineMIME("text/markdown","markdown"),ce.defineMIME("text/x-markdown","markdown")})},98101:function(qt,Dt,be){(function(ce){ce(be(89780))})(function(ce){"use strict";ce.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 ie=0;ie<ce.modeInfo.length;ie++){var Ce=ce.modeInfo[ie];Ce.mimes&&(Ce.mime=Ce.mimes[0])}ce.findModeByMIME=function(ue){ue=ue.toLowerCase();for(var se=0;se<ce.modeInfo.length;se++){var te=ce.modeInfo[se];if(te.mime==ue)return te;if(te.mimes){for(var le=0;le<te.mimes.length;le++)if(te.mimes[le]==ue)return te}}if(/\+xml$/.test(ue))return ce.findModeByMIME("application/xml");if(/\+json$/.test(ue))return ce.findModeByMIME("application/json")},ce.findModeByExtension=function(ue){ue=ue.toLowerCase();for(var se=0;se<ce.modeInfo.length;se++){var te=ce.modeInfo[se];if(te.ext){for(var le=0;le<te.ext.length;le++)if(te.ext[le]==ue)return te}}},ce.findModeByFileName=function(ue){for(var se=0;se<ce.modeInfo.length;se++){var te=ce.modeInfo[se];if(te.file&&te.file.test(ue))return te}var le=ue.lastIndexOf("."),ee=le>-1&&ue.substring(le+1,ue.length);if(ee)return ce.findModeByExtension(ee)},ce.findModeByName=function(ue){ue=ue.toLowerCase();for(var se=0;se<ce.modeInfo.length;se++){var te=ce.modeInfo[se];if(te.name.toLowerCase()==ue)return te;if(te.alias){for(var le=0;le<te.alias.length;le++)if(te.alias[le].toLowerCase()==ue)return te}}}})},67549:function(qt,Dt,be){(function(ce){ce(be(89780))})(function(ce){"use strict";ce.defineMode("stex",function(ie,Ce){"use strict";function ue(re,ae){re.cmdState.push(ae)}function se(re){return re.cmdState.length>0?re.cmdState[re.cmdState.length-1]:null}function te(re){var ae=re.cmdState.pop();ae&&ae.closeBracket()}function le(re){for(var ae=re.cmdState,oe=ae.length-1;oe>=0;oe--){var ve=ae[oe];if(ve.name!="DEFAULT")return ve}return{styleIdentifier:function(){return null}}}function ee(re,ae,oe){return function(){this.name=re,this.bracketNo=0,this.style=ae,this.styles=oe,this.argument=null,this.styleIdentifier=function(){return this.styles[this.bracketNo-1]||null},this.openBracket=function(){return this.bracketNo++,"bracket"},this.closeBracket=function(){}}}var ne={};ne.importmodule=ee("importmodule","tag",["string","builtin"]),ne.documentclass=ee("documentclass","tag",["","atom"]),ne.usepackage=ee("usepackage","tag",["atom"]),ne.begin=ee("begin","tag",["atom"]),ne.end=ee("end","tag",["atom"]),ne.label=ee("label","tag",["atom"]),ne.ref=ee("ref","tag",["atom"]),ne.eqref=ee("eqref","tag",["atom"]),ne.cite=ee("cite","tag",["atom"]),ne.bibitem=ee("bibitem","tag",["atom"]),ne.Bibitem=ee("Bibitem","tag",["atom"]),ne.RBibitem=ee("RBibitem","tag",["atom"]),ne.DEFAULT=function(){this.name="DEFAULT",this.style="tag",this.styleIdentifier=this.openBracket=this.closeBracket=function(){}};function E(re,ae){re.f=ae}function b(re,ae){var oe;if(re.match(/^\\[a-zA-Z@]+/)){var ve=re.current().slice(1);return oe=ne.hasOwnProperty(ve)?ne[ve]:ne.DEFAULT,oe=new oe,ue(ae,oe),E(ae,x),oe.style}if(re.match(/^\\[$&%#{}_]/)||re.match(/^\\[,;!\/\\]/))return"tag";if(re.match("\\["))return E(ae,function(me,ge){return z(me,ge,"\\]")}),"keyword";if(re.match("\\("))return E(ae,function(me,ge){return z(me,ge,"\\)")}),"keyword";if(re.match("$$"))return E(ae,function(me,ge){return z(me,ge,"$$")}),"keyword";if(re.match("$"))return E(ae,function(me,ge){return z(me,ge,"$")}),"keyword";var ye=re.next();if(ye=="%")return re.skipToEnd(),"comment";if(ye=="}"||ye=="]"){if(oe=se(ae),oe)oe.closeBracket(ye),E(ae,x);else return"error";return"bracket"}else return ye=="{"||ye=="["?(oe=ne.DEFAULT,oe=new oe,ue(ae,oe),"bracket"):/\d/.test(ye)?(re.eatWhile(/[\w.%]/),"atom"):(re.eatWhile(/[\w\-_]/),oe=le(ae),oe.name=="begin"&&(oe.argument=re.current()),oe.styleIdentifier())}function z(re,ae,oe){if(re.eatSpace())return null;if(oe&&re.match(oe))return E(ae,b),"keyword";if(re.match(/^\\[a-zA-Z@]+/))return"tag";if(re.match(/^[a-zA-Z]+/))return"variable-2";if(re.match(/^\\[$&%#{}_]/)||re.match(/^\\[,;!\/]/)||re.match(/^[\^_&]/))return"tag";if(re.match(/^[+\-<>|=,\/@!*:;'"`~#?]/))return null;if(re.match(/^(\d+\.\d*|\d*\.\d+|\d+)/))return"number";var ve=re.next();return ve=="{"||ve=="}"||ve=="["||ve=="]"||ve=="("||ve==")"?"bracket":ve=="%"?(re.skipToEnd(),"comment"):"error"}function x(re,ae){var oe=re.peek(),ve;return oe=="{"||oe=="["?(ve=se(ae),ve.openBracket(oe),re.eat(oe),E(ae,b),"bracket"):/[ \t\r]/.test(oe)?(re.eat(oe),null):(E(ae,b),te(ae),b(re,ae))}return{startState:function(){var re=Ce.inMathMode?function(ae,oe){return z(ae,oe)}:b;return{cmdState:[],f:re}},copyState:function(re){return{cmdState:re.cmdState.slice(),f:re.f}},token:function(re,ae){return ae.f(re,ae)},blankLine:function(re){re.f=b,re.cmdState.length=0},lineComment:"%"}}),ce.defineMIME("text/x-stex","stex"),ce.defineMIME("text/x-latex","stex")})},15525:function(qt,Dt,be){(function(ce){ce(be(89780))})(function(ce){"use strict";var ie={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},Ce={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};ce.defineMode("xml",function(ue,se){var te=ue.indentUnit,le={},ee=se.htmlMode?ie:Ce;for(var ne in ee)le[ne]=ee[ne];for(var ne in se)le[ne]=se[ne];var E,b;function z(Pe,Qe){function Xe(rt){return Qe.tokenize=rt,rt(Pe,Qe)}var ot=Pe.next();if(ot=="<")return Pe.eat("!")?Pe.eat("[")?Pe.match("CDATA[")?Xe(ae("atom","]]>")):null:Pe.match("--")?Xe(ae("comment","-->")):Pe.match("DOCTYPE",!0,!0)?(Pe.eatWhile(/[\w\._\-]/),Xe(oe(1))):null:Pe.eat("?")?(Pe.eatWhile(/[\w\._\-]/),Qe.tokenize=ae("meta","?>"),"meta"):(E=Pe.eat("/")?"closeTag":"openTag",Qe.tokenize=x,"tag bracket");if(ot=="&"){var He;return Pe.eat("#")?Pe.eat("x")?He=Pe.eatWhile(/[a-fA-F\d]/)&&Pe.eat(";"):He=Pe.eatWhile(/[\d]/)&&Pe.eat(";"):He=Pe.eatWhile(/[\w\.\-:]/)&&Pe.eat(";"),He?"atom":"error"}else return Pe.eatWhile(/[^&<]/),null}z.isInText=!0;function x(Pe,Qe){var Xe=Pe.next();if(Xe==">"||Xe=="/"&&Pe.eat(">"))return Qe.tokenize=z,E=Xe==">"?"endTag":"selfcloseTag","tag bracket";if(Xe=="=")return E="equals",null;if(Xe=="<"){Qe.tokenize=z,Qe.state=ge,Qe.tagName=Qe.tagStart=null;var ot=Qe.tokenize(Pe,Qe);return ot?ot+" tag error":"tag error"}else return/[\'\"]/.test(Xe)?(Qe.tokenize=re(Xe),Qe.stringStartCol=Pe.column(),Qe.tokenize(Pe,Qe)):(Pe.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function re(Pe){var Qe=function(Xe,ot){for(;!Xe.eol();)if(Xe.next()==Pe){ot.tokenize=x;break}return"string"};return Qe.isInAttribute=!0,Qe}function ae(Pe,Qe){return function(Xe,ot){for(;!Xe.eol();){if(Xe.match(Qe)){ot.tokenize=z;break}Xe.next()}return Pe}}function oe(Pe){return function(Qe,Xe){for(var ot;(ot=Qe.next())!=null;){if(ot=="<")return Xe.tokenize=oe(Pe+1),Xe.tokenize(Qe,Xe);if(ot==">")if(Pe==1){Xe.tokenize=z;break}else return Xe.tokenize=oe(Pe-1),Xe.tokenize(Qe,Xe)}return"meta"}}function ve(Pe,Qe,Xe){this.prev=Pe.context,this.tagName=Qe,this.indent=Pe.indented,this.startOfLine=Xe,(le.doNotIndent.hasOwnProperty(Qe)||Pe.context&&Pe.context.noIndent)&&(this.noIndent=!0)}function ye(Pe){Pe.context&&(Pe.context=Pe.context.prev)}function me(Pe,Qe){for(var Xe;;){if(!Pe.context||(Xe=Pe.context.tagName,!le.contextGrabbers.hasOwnProperty(Xe)||!le.contextGrabbers[Xe].hasOwnProperty(Qe)))return;ye(Pe)}}function ge(Pe,Qe,Xe){return Pe=="openTag"?(Xe.tagStart=Qe.column(),_e):Pe=="closeTag"?he:ge}function _e(Pe,Qe,Xe){return Pe=="word"?(Xe.tagName=Qe.current(),b="tag",Te):le.allowMissingTagName&&Pe=="endTag"?(b="tag bracket",Te(Pe,Qe,Xe)):(b="error",_e)}function he(Pe,Qe,Xe){if(Pe=="word"){var ot=Qe.current();return Xe.context&&Xe.context.tagName!=ot&&le.implicitlyClosed.hasOwnProperty(Xe.context.tagName)&&ye(Xe),Xe.context&&Xe.context.tagName==ot||le.matchClosing===!1?(b="tag",pe):(b="tag error",ke)}else return le.allowMissingTagName&&Pe=="endTag"?(b="tag bracket",pe(Pe,Qe,Xe)):(b="error",ke)}function pe(Pe,Qe,Xe){return Pe!="endTag"?(b="error",pe):(ye(Xe),ge)}function ke(Pe,Qe,Xe){return b="error",pe(Pe,Qe,Xe)}function Te(Pe,Qe,Xe){if(Pe=="word")return b="attribute",Ee;if(Pe=="endTag"||Pe=="selfcloseTag"){var ot=Xe.tagName,He=Xe.tagStart;return Xe.tagName=Xe.tagStart=null,Pe=="selfcloseTag"||le.autoSelfClosers.hasOwnProperty(ot)?me(Xe,ot):(me(Xe,ot),Xe.context=new ve(Xe,ot,He==Xe.indented)),ge}return b="error",Te}function Ee(Pe,Qe,Xe){return Pe=="equals"?Oe:(le.allowMissing||(b="error"),Te(Pe,Qe,Xe))}function Oe(Pe,Qe,Xe){return Pe=="string"?je:Pe=="word"&&le.allowUnquoted?(b="string",Te):(b="error",Te(Pe,Qe,Xe))}function je(Pe,Qe,Xe){return Pe=="string"?je:Te(Pe,Qe,Xe)}return{startState:function(Pe){var Qe={tokenize:z,state:ge,indented:Pe||0,tagName:null,tagStart:null,context:null};return Pe!=null&&(Qe.baseIndent=Pe),Qe},token:function(Pe,Qe){if(!Qe.tagName&&Pe.sol()&&(Qe.indented=Pe.indentation()),Pe.eatSpace())return null;E=null;var Xe=Qe.tokenize(Pe,Qe);return(Xe||E)&&Xe!="comment"&&(b=null,Qe.state=Qe.state(E||Xe,Pe,Qe),b&&(Xe=b=="error"?Xe+" error":b)),Xe},indent:function(Pe,Qe,Xe){var ot=Pe.context;if(Pe.tokenize.isInAttribute)return Pe.tagStart==Pe.indented?Pe.stringStartCol+1:Pe.indented+te;if(ot&&ot.noIndent)return ce.Pass;if(Pe.tokenize!=x&&Pe.tokenize!=z)return Xe?Xe.match(/^(\s*)/)[0].length:0;if(Pe.tagName)return le.multilineTagIndentPastTag!==!1?Pe.tagStart+Pe.tagName.length+2:Pe.tagStart+te*(le.multilineTagIndentFactor||1);if(le.alignCDATA&&/<!\[CDATA\[/.test(Qe))return 0;var He=Qe&&/^<(\/)?([\w_:\.-]*)/.exec(Qe);if(He&&He[1])for(;ot;)if(ot.tagName==He[2]){ot=ot.prev;break}else if(le.implicitlyClosed.hasOwnProperty(ot.tagName))ot=ot.prev;else break;else if(He)for(;ot;){var rt=le.contextGrabbers[ot.tagName];if(rt&&rt.hasOwnProperty(He[2]))ot=ot.prev;else break}for(;ot&&ot.prev&&!ot.startOfLine;)ot=ot.prev;return ot?ot.indent+te:Pe.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"<!--",blockCommentEnd:"-->",configuration:le.htmlMode?"html":"xml",helperType:le.htmlMode?"html":"xml",skipAttribute:function(Pe){Pe.state==Oe&&(Pe.state=Te)},xmlCurrentTag:function(Pe){return Pe.tagName?{name:Pe.tagName,close:Pe.type=="closeTag"}:null},xmlCurrentContext:function(Pe){for(var Qe=[],Xe=Pe.context;Xe;Xe=Xe.prev)Xe.tagName&&Qe.push(Xe.tagName);return Qe.reverse()}}}),ce.defineMIME("text/xml","xml"),ce.defineMIME("application/xml","xml"),ce.mimeModes.hasOwnProperty("text/html")||ce.defineMIME("text/html",{name:"xml",htmlMode:!0})})},3867:function(qt,Dt,be){var ce=be(97671);(function(ie,Ce){qt.exports=Ce()})(this,function(){"use strict";function ie(Le){var Ue=typeof Le;return Le!==null&&(Ue==="object"||Ue==="function")}function Ce(Le){return typeof Le=="function"}var ue=void 0;Array.isArray?ue=Array.isArray:ue=function(Le){return Object.prototype.toString.call(Le)==="[object Array]"};var se=ue,te=0,le=void 0,ee=void 0,ne=function(Ue,Me){he[te]=Ue,he[te+1]=Me,te+=2,te===2&&(ee?ee(pe):Te())};function E(Le){ee=Le}function b(Le){ne=Le}var z=typeof window!="undefined"?window:void 0,x=z||{},re=x.MutationObserver||x.WebKitMutationObserver,ae=typeof self=="undefined"&&typeof ce!="undefined"&&{}.toString.call(ce)==="[object process]",oe=typeof Uint8ClampedArray!="undefined"&&typeof importScripts!="undefined"&&typeof MessageChannel!="undefined";function ve(){return function(){return ce.nextTick(pe)}}function ye(){return typeof le!="undefined"?function(){le(pe)}:_e()}function me(){var Le=0,Ue=new re(pe),Me=document.createTextNode("");return Ue.observe(Me,{characterData:!0}),function(){Me.data=Le=++Le%2}}function ge(){var Le=new MessageChannel;return Le.port1.onmessage=pe,function(){return Le.port2.postMessage(0)}}function _e(){var Le=setTimeout;return function(){return Le(pe,1)}}var he=new Array(1e3);function pe(){for(var Le=0;Le<te;Le+=2){var Ue=he[Le],Me=he[Le+1];Ue(Me),he[Le]=void 0,he[Le+1]=void 0}te=0}function ke(){try{var Le=Function("return this")().require("vertx");return le=Le.runOnLoop||Le.runOnContext,ye()}catch(Ue){return _e()}}var Te=void 0;ae?Te=ve():re?Te=me():oe?Te=ge():z===void 0?Te=ke():Te=_e();function Ee(Le,Ue){var Me=this,Re=new this.constructor(Pe);Re[je]===void 0&>(Re);var tt=Me._state;if(tt){var lt=arguments[tt-1];ne(function(){return It(tt,Re,lt,Me._result)})}else pt(Me,Re,Le,Ue);return Re}function Oe(Le){var Ue=this;if(Le&&typeof Le=="object"&&Le.constructor===Ue)return Le;var Me=new Ue(Pe);return Ve(Me,Le),Me}var je=Math.random().toString(36).substring(2);function Pe(){}var Qe=void 0,Xe=1,ot=2;function He(){return new TypeError("You cannot resolve a promise with itself")}function rt(){return new TypeError("A promises callback cannot return that same promise.")}function Ye(Le,Ue,Me,Re){try{Le.call(Ue,Me,Re)}catch(tt){return tt}}function ut(Le,Ue,Me){ne(function(Re){var tt=!1,lt=Ye(Me,Ue,function(Pt){tt||(tt=!0,Ue!==Pt?Ve(Re,Pt):nt(Re,Pt))},function(Pt){tt||(tt=!0,et(Re,Pt))},"Settle: "+(Re._label||" unknown promise"));!tt&<&&(tt=!0,et(Re,lt))},Le)}function Ge(Le,Ue){Ue._state===Xe?nt(Le,Ue._result):Ue._state===ot?et(Le,Ue._result):pt(Ue,void 0,function(Me){return Ve(Le,Me)},function(Me){return et(Le,Me)})}function ze(Le,Ue,Me){Ue.constructor===Le.constructor&&Me===Ee&&Ue.constructor.resolve===Oe?Ge(Le,Ue):Me===void 0?nt(Le,Ue):Ce(Me)?ut(Le,Ue,Me):nt(Le,Ue)}function Ve(Le,Ue){if(Le===Ue)et(Le,He());else if(ie(Ue)){var Me=void 0;try{Me=Ue.then}catch(Re){et(Le,Re);return}ze(Le,Ue,Me)}else nt(Le,Ue)}function $e(Le){Le._onerror&&Le._onerror(Le._result),ct(Le)}function nt(Le,Ue){Le._state===Qe&&(Le._result=Ue,Le._state=Xe,Le._subscribers.length!==0&&ne(ct,Le))}function et(Le,Ue){Le._state===Qe&&(Le._state=ot,Le._result=Ue,ne($e,Le))}function pt(Le,Ue,Me,Re){var tt=Le._subscribers,lt=tt.length;Le._onerror=null,tt[lt]=Ue,tt[lt+Xe]=Me,tt[lt+ot]=Re,lt===0&&Le._state&&ne(ct,Le)}function ct(Le){var Ue=Le._subscribers,Me=Le._state;if(Ue.length!==0){for(var Re=void 0,tt=void 0,lt=Le._result,Pt=0;Pt<Ue.length;Pt+=3)Re=Ue[Pt],tt=Ue[Pt+Me],Re?It(Me,Re,tt,lt):tt(lt);Le._subscribers.length=0}}function It(Le,Ue,Me,Re){var tt=Ce(Me),lt=void 0,Pt=void 0,Ct=!0;if(tt){try{lt=Me(Re)}catch(vt){Ct=!1,Pt=vt}if(Ue===lt){et(Ue,rt());return}}else lt=Re;Ue._state!==Qe||(tt&&Ct?Ve(Ue,lt):Ct===!1?et(Ue,Pt):Le===Xe?nt(Ue,lt):Le===ot&&et(Ue,lt))}function dt(Le,Ue){try{Ue(function(Re){Ve(Le,Re)},function(Re){et(Le,Re)})}catch(Me){et(Le,Me)}}var Mt=0;function xt(){return Mt++}function gt(Le){Le[je]=Mt++,Le._state=void 0,Le._result=void 0,Le._subscribers=[]}function _t(){return new Error("Array Methods must be provided an Array")}var We=function(){function Le(Ue,Me){this._instanceConstructor=Ue,this.promise=new Ue(Pe),this.promise[je]||gt(this.promise),se(Me)?(this.length=Me.length,this._remaining=Me.length,this._result=new Array(this.length),this.length===0?nt(this.promise,this._result):(this.length=this.length||0,this._enumerate(Me),this._remaining===0&&nt(this.promise,this._result))):et(this.promise,_t())}return Le.prototype._enumerate=function(Me){for(var Re=0;this._state===Qe&&Re<Me.length;Re++)this._eachEntry(Me[Re],Re)},Le.prototype._eachEntry=function(Me,Re){var tt=this._instanceConstructor,lt=tt.resolve;if(lt===Oe){var Pt=void 0,Ct=void 0,vt=!1;try{Pt=Me.then}catch(zt){vt=!0,Ct=zt}if(Pt===Ee&&Me._state!==Qe)this._settledAt(Me._state,Re,Me._result);else if(typeof Pt!="function")this._remaining--,this._result[Re]=Me;else if(tt===De){var Ot=new tt(Pe);vt?et(Ot,Ct):ze(Ot,Me,Pt),this._willSettleAt(Ot,Re)}else this._willSettleAt(new tt(function(zt){return zt(Me)}),Re)}else this._willSettleAt(lt(Me),Re)},Le.prototype._settledAt=function(Me,Re,tt){var lt=this.promise;lt._state===Qe&&(this._remaining--,Me===ot?et(lt,tt):this._result[Re]=tt),this._remaining===0&&nt(lt,this._result)},Le.prototype._willSettleAt=function(Me,Re){var tt=this;pt(Me,void 0,function(lt){return tt._settledAt(Xe,Re,lt)},function(lt){return tt._settledAt(ot,Re,lt)})},Le}();function Ae(Le){return new We(this,Le).promise}function Se(Le){var Ue=this;return se(Le)?new Ue(function(Me,Re){for(var tt=Le.length,lt=0;lt<tt;lt++)Ue.resolve(Le[lt]).then(Me,Re)}):new Ue(function(Me,Re){return Re(new TypeError("You must pass an array to race."))})}function Be(Le){var Ue=this,Me=new Ue(Pe);return et(Me,Le),Me}function Ke(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}function Ne(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}var De=function(){function Le(Ue){this[je]=xt(),this._result=this._state=void 0,this._subscribers=[],Pe!==Ue&&(typeof Ue!="function"&&Ke(),this instanceof Le?dt(this,Ue):Ne())}return Le.prototype.catch=function(Me){return this.then(null,Me)},Le.prototype.finally=function(Me){var Re=this,tt=Re.constructor;return Ce(Me)?Re.then(function(lt){return tt.resolve(Me()).then(function(){return lt})},function(lt){return tt.resolve(Me()).then(function(){throw lt})}):Re.then(Me,Me)},Le}();De.prototype.then=Ee,De.all=Ae,De.race=Se,De.resolve=Oe,De.reject=Be,De._setScheduler=E,De._setAsap=b,De._asap=ne;function we(){var Le=void 0;if(typeof be.g!="undefined")Le=be.g;else if(typeof self!="undefined")Le=self;else try{Le=Function("return this")()}catch(Re){throw new Error("polyfill failed because global object is unavailable in this environment")}var Ue=Le.Promise;if(Ue){var Me=null;try{Me=Object.prototype.toString.call(Ue.resolve())}catch(Re){}if(Me==="[object Promise]"&&!Ue.cast)return}Le.Promise=De}return De.polyfill=we,De.Promise=De,De})},86204:function(qt){"use strict";var Dt=typeof Reflect=="object"?Reflect:null,be=Dt&&typeof Dt.apply=="function"?Dt.apply:function(ge,_e,he){return Function.prototype.apply.call(ge,_e,he)},ce;Dt&&typeof Dt.ownKeys=="function"?ce=Dt.ownKeys:Object.getOwnPropertySymbols?ce=function(ge){return Object.getOwnPropertyNames(ge).concat(Object.getOwnPropertySymbols(ge))}:ce=function(ge){return Object.getOwnPropertyNames(ge)};function ie(me){console&&console.warn&&console.warn(me)}var Ce=Number.isNaN||function(ge){return ge!==ge};function ue(){ue.init.call(this)}qt.exports=ue,qt.exports.once=oe,ue.EventEmitter=ue,ue.prototype._events=void 0,ue.prototype._eventsCount=0,ue.prototype._maxListeners=void 0;var se=10;function te(me){if(typeof me!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof me)}Object.defineProperty(ue,"defaultMaxListeners",{enumerable:!0,get:function(){return se},set:function(me){if(typeof me!="number"||me<0||Ce(me))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+me+".");se=me}}),ue.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},ue.prototype.setMaxListeners=function(ge){if(typeof ge!="number"||ge<0||Ce(ge))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+ge+".");return this._maxListeners=ge,this};function le(me){return me._maxListeners===void 0?ue.defaultMaxListeners:me._maxListeners}ue.prototype.getMaxListeners=function(){return le(this)},ue.prototype.emit=function(ge){for(var _e=[],he=1;he<arguments.length;he++)_e.push(arguments[he]);var pe=ge==="error",ke=this._events;if(ke!==void 0)pe=pe&&ke.error===void 0;else if(!pe)return!1;if(pe){var Te;if(_e.length>0&&(Te=_e[0]),Te instanceof Error)throw Te;var Ee=new Error("Unhandled error."+(Te?" ("+Te.message+")":""));throw Ee.context=Te,Ee}var Oe=ke[ge];if(Oe===void 0)return!1;if(typeof Oe=="function")be(Oe,this,_e);else for(var je=Oe.length,Pe=x(Oe,je),he=0;he<je;++he)be(Pe[he],this,_e);return!0};function ee(me,ge,_e,he){var pe,ke,Te;if(te(_e),ke=me._events,ke===void 0?(ke=me._events=Object.create(null),me._eventsCount=0):(ke.newListener!==void 0&&(me.emit("newListener",ge,_e.listener?_e.listener:_e),ke=me._events),Te=ke[ge]),Te===void 0)Te=ke[ge]=_e,++me._eventsCount;else if(typeof Te=="function"?Te=ke[ge]=he?[_e,Te]:[Te,_e]:he?Te.unshift(_e):Te.push(_e),pe=le(me),pe>0&&Te.length>pe&&!Te.warned){Te.warned=!0;var Ee=new Error("Possible EventEmitter memory leak detected. "+Te.length+" "+String(ge)+" listeners added. Use emitter.setMaxListeners() to increase limit");Ee.name="MaxListenersExceededWarning",Ee.emitter=me,Ee.type=ge,Ee.count=Te.length,ie(Ee)}return me}ue.prototype.addListener=function(ge,_e){return ee(this,ge,_e,!1)},ue.prototype.on=ue.prototype.addListener,ue.prototype.prependListener=function(ge,_e){return ee(this,ge,_e,!0)};function ne(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function E(me,ge,_e){var he={fired:!1,wrapFn:void 0,target:me,type:ge,listener:_e},pe=ne.bind(he);return pe.listener=_e,he.wrapFn=pe,pe}ue.prototype.once=function(ge,_e){return te(_e),this.on(ge,E(this,ge,_e)),this},ue.prototype.prependOnceListener=function(ge,_e){return te(_e),this.prependListener(ge,E(this,ge,_e)),this},ue.prototype.removeListener=function(ge,_e){var he,pe,ke,Te,Ee;if(te(_e),pe=this._events,pe===void 0)return this;if(he=pe[ge],he===void 0)return this;if(he===_e||he.listener===_e)--this._eventsCount===0?this._events=Object.create(null):(delete pe[ge],pe.removeListener&&this.emit("removeListener",ge,he.listener||_e));else if(typeof he!="function"){for(ke=-1,Te=he.length-1;Te>=0;Te--)if(he[Te]===_e||he[Te].listener===_e){Ee=he[Te].listener,ke=Te;break}if(ke<0)return this;ke===0?he.shift():re(he,ke),he.length===1&&(pe[ge]=he[0]),pe.removeListener!==void 0&&this.emit("removeListener",ge,Ee||_e)}return this},ue.prototype.off=ue.prototype.removeListener,ue.prototype.removeAllListeners=function(ge){var _e,he,pe;if(he=this._events,he===void 0)return this;if(he.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):he[ge]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete he[ge]),this;if(arguments.length===0){var ke=Object.keys(he),Te;for(pe=0;pe<ke.length;++pe)Te=ke[pe],Te!=="removeListener"&&this.removeAllListeners(Te);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(_e=he[ge],typeof _e=="function")this.removeListener(ge,_e);else if(_e!==void 0)for(pe=_e.length-1;pe>=0;pe--)this.removeListener(ge,_e[pe]);return this};function b(me,ge,_e){var he=me._events;if(he===void 0)return[];var pe=he[ge];return pe===void 0?[]:typeof pe=="function"?_e?[pe.listener||pe]:[pe]:_e?ae(pe):x(pe,pe.length)}ue.prototype.listeners=function(ge){return b(this,ge,!0)},ue.prototype.rawListeners=function(ge){return b(this,ge,!1)},ue.listenerCount=function(me,ge){return typeof me.listenerCount=="function"?me.listenerCount(ge):z.call(me,ge)},ue.prototype.listenerCount=z;function z(me){var ge=this._events;if(ge!==void 0){var _e=ge[me];if(typeof _e=="function")return 1;if(_e!==void 0)return _e.length}return 0}ue.prototype.eventNames=function(){return this._eventsCount>0?ce(this._events):[]};function x(me,ge){for(var _e=new Array(ge),he=0;he<ge;++he)_e[he]=me[he];return _e}function re(me,ge){for(;ge+1<me.length;ge++)me[ge]=me[ge+1];me.pop()}function ae(me){for(var ge=new Array(me.length),_e=0;_e<ge.length;++_e)ge[_e]=me[_e].listener||me[_e];return ge}function oe(me,ge){return new Promise(function(_e,he){function pe(Te){me.removeListener(ge,ke),he(Te)}function ke(){typeof me.removeListener=="function"&&me.removeListener("error",pe),_e([].slice.call(arguments))}ye(me,ge,ke,{once:!0}),ge!=="error"&&ve(me,pe,{once:!0})})}function ve(me,ge,_e){typeof me.on=="function"&&ye(me,"error",ge,_e)}function ye(me,ge,_e,he){if(typeof me.on=="function")he.once?me.once(ge,_e):me.on(ge,_e);else if(typeof me.addEventListener=="function")me.addEventListener(ge,function pe(ke){he.once&&me.removeEventListener(ge,pe),_e(ke)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof me)}},24334:function(qt,Dt,be){var ce,ie;(function(Ce,ue){qt.exports=ue(Ce)})(typeof self!="undefined"?self:typeof window!="undefined"?window:typeof be.g!="undefined"?be.g:this,function(Ce){"use strict";Ce=Ce||{};var ue=Ce.Base64,se="2.6.4",te="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",le=function(Xe){for(var ot={},He=0,rt=Xe.length;He<rt;He++)ot[Xe.charAt(He)]=He;return ot}(te),ee=String.fromCharCode,ne=function(Xe){if(Xe.length<2){var ot=Xe.charCodeAt(0);return ot<128?Xe:ot<2048?ee(192|ot>>>6)+ee(128|ot&63):ee(224|ot>>>12&15)+ee(128|ot>>>6&63)+ee(128|ot&63)}else{var ot=65536+(Xe.charCodeAt(0)-55296)*1024+(Xe.charCodeAt(1)-56320);return ee(240|ot>>>18&7)+ee(128|ot>>>12&63)+ee(128|ot>>>6&63)+ee(128|ot&63)}},E=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,b=function(Xe){return Xe.replace(E,ne)},z=function(Xe){var ot=[0,2,1][Xe.length%3],He=Xe.charCodeAt(0)<<16|(Xe.length>1?Xe.charCodeAt(1):0)<<8|(Xe.length>2?Xe.charCodeAt(2):0),rt=[te.charAt(He>>>18),te.charAt(He>>>12&63),ot>=2?"=":te.charAt(He>>>6&63),ot>=1?"=":te.charAt(He&63)];return rt.join("")},x=Ce.btoa&&typeof Ce.btoa=="function"?function(Xe){return Ce.btoa(Xe)}:function(Xe){if(Xe.match(/[^\x00-\xFF]/))throw new RangeError("The string contains invalid characters.");return Xe.replace(/[\s\S]{1,3}/g,z)},re=function(Xe){return x(b(String(Xe)))},ae=function(Xe){return Xe.replace(/[+\/]/g,function(ot){return ot=="+"?"-":"_"}).replace(/=/g,"")},oe=function(Xe,ot){return ot?ae(re(Xe)):re(Xe)},ve=function(Xe){return oe(Xe,!0)},ye;Ce.Uint8Array&&(ye=function(Xe,ot){for(var He="",rt=0,Ye=Xe.length;rt<Ye;rt+=3){var ut=Xe[rt],Ge=Xe[rt+1],ze=Xe[rt+2],Ve=ut<<16|Ge<<8|ze;He+=te.charAt(Ve>>>18)+te.charAt(Ve>>>12&63)+(typeof Ge!="undefined"?te.charAt(Ve>>>6&63):"=")+(typeof ze!="undefined"?te.charAt(Ve&63):"=")}return ot?ae(He):He});var me=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,ge=function(Xe){switch(Xe.length){case 4:var ot=(7&Xe.charCodeAt(0))<<18|(63&Xe.charCodeAt(1))<<12|(63&Xe.charCodeAt(2))<<6|63&Xe.charCodeAt(3),He=ot-65536;return ee((He>>>10)+55296)+ee((He&1023)+56320);case 3:return ee((15&Xe.charCodeAt(0))<<12|(63&Xe.charCodeAt(1))<<6|63&Xe.charCodeAt(2));default:return ee((31&Xe.charCodeAt(0))<<6|63&Xe.charCodeAt(1))}},_e=function(Xe){return Xe.replace(me,ge)},he=function(Xe){var ot=Xe.length,He=ot%4,rt=(ot>0?le[Xe.charAt(0)]<<18:0)|(ot>1?le[Xe.charAt(1)]<<12:0)|(ot>2?le[Xe.charAt(2)]<<6:0)|(ot>3?le[Xe.charAt(3)]:0),Ye=[ee(rt>>>16),ee(rt>>>8&255),ee(rt&255)];return Ye.length-=[0,0,2,1][He],Ye.join("")},pe=Ce.atob&&typeof Ce.atob=="function"?function(Xe){return Ce.atob(Xe)}:function(Xe){return Xe.replace(/\S{1,4}/g,he)},ke=function(Xe){return pe(String(Xe).replace(/[^A-Za-z0-9\+\/]/g,""))},Te=function(Xe){return _e(pe(Xe))},Ee=function(Xe){return String(Xe).replace(/[-_]/g,function(ot){return ot=="-"?"+":"/"}).replace(/[^A-Za-z0-9\+\/]/g,"")},Oe=function(Xe){return Te(Ee(Xe))},je;Ce.Uint8Array&&(je=function(Xe){return Uint8Array.from(ke(Ee(Xe)),function(ot){return ot.charCodeAt(0)})});var Pe=function(){var Xe=Ce.Base64;return Ce.Base64=ue,Xe};if(Ce.Base64={VERSION:se,atob:ke,btoa:x,fromBase64:Oe,toBase64:oe,utob:b,encode:oe,encodeURI:ve,btou:_e,decode:Oe,noConflict:Pe,fromUint8Array:ye,toUint8Array:je},typeof Object.defineProperty=="function"){var Qe=function(Xe){return{value:Xe,enumerable:!1,writable:!0,configurable:!0}};Ce.Base64.extendString=function(){Object.defineProperty(String.prototype,"fromBase64",Qe(function(){return Oe(this)})),Object.defineProperty(String.prototype,"toBase64",Qe(function(Xe){return oe(this,Xe)})),Object.defineProperty(String.prototype,"toBase64URI",Qe(function(){return oe(this,!0)}))}}return Ce.Meteor&&(Base64=Ce.Base64),qt.exports?qt.exports.Base64=Ce.Base64:(ce=[],ie=function(){return Ce.Base64}.apply(Dt,ce),ie!==void 0&&(qt.exports=ie)),{Base64:Ce.Base64}})},2859:function(qt,Dt,be){"use strict";be.d(Dt,{hP:function(){return _t}});var ce=function(We,Ae){return(ce=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(Se,Be){Se.__proto__=Be}||function(Se,Be){for(var Ke in Be)Object.prototype.hasOwnProperty.call(Be,Ke)&&(Se[Ke]=Be[Ke])})(We,Ae)};function ie(We,Ae){function Se(){this.constructor=We}ce(We,Ae),We.prototype=Ae===null?Object.create(Ae):(Se.prototype=Ae.prototype,new Se)}function Ce(We,Ae,Se,Be){return new(Se||(Se=Promise))(function(Ke,Ne){function De(Ue){try{Le(Be.next(Ue))}catch(Me){Ne(Me)}}function we(Ue){try{Le(Be.throw(Ue))}catch(Me){Ne(Me)}}function Le(Ue){var Me;Ue.done?Ke(Ue.value):(Me=Ue.value,Me instanceof Se?Me:new Se(function(Re){Re(Me)})).then(De,we)}Le((Be=Be.apply(We,Ae||[])).next())})}function ue(We,Ae){var Se,Be,Ke,Ne,De={label:0,sent:function(){if(1&Ke[0])throw Ke[1];return Ke[1]},trys:[],ops:[]};return Ne={next:we(0),throw:we(1),return:we(2)},typeof Symbol=="function"&&(Ne[Symbol.iterator]=function(){return this}),Ne;function we(Le){return function(Ue){return function(Me){if(Se)throw new TypeError("Generator is already executing.");for(;De;)try{if(Se=1,Be&&(Ke=2&Me[0]?Be.return:Me[0]?Be.throw||((Ke=Be.return)&&Ke.call(Be),0):Be.next)&&!(Ke=Ke.call(Be,Me[1])).done)return Ke;switch(Be=0,Ke&&(Me=[2&Me[0],Ke.value]),Me[0]){case 0:case 1:Ke=Me;break;case 4:return De.label++,{value:Me[1],done:!1};case 5:De.label++,Be=Me[1],Me=[0];continue;case 7:Me=De.ops.pop(),De.trys.pop();continue;default:if(Ke=De.trys,!((Ke=Ke.length>0&&Ke[Ke.length-1])||Me[0]!==6&&Me[0]!==2)){De=0;continue}if(Me[0]===3&&(!Ke||Me[1]>Ke[0]&&Me[1]<Ke[3])){De.label=Me[1];break}if(Me[0]===6&&De.label<Ke[1]){De.label=Ke[1],Ke=Me;break}if(Ke&&De.label<Ke[2]){De.label=Ke[2],De.ops.push(Me);break}Ke[2]&&De.ops.pop(),De.trys.pop();continue}Me=Ae.call(We,De)}catch(Re){Me=[6,Re],Be=0}finally{Se=Ke=0}if(5&Me[0])throw Me[1];return{value:Me[0]?Me[1]:void 0,done:!0}}([Le,Ue])}}}function se(){for(var We=0,Ae=0,Se=arguments.length;Ae<Se;Ae++)We+=arguments[Ae].length;var Be=Array(We),Ke=0;for(Ae=0;Ae<Se;Ae++)for(var Ne=arguments[Ae],De=0,we=Ne.length;De<we;De++,Ke++)Be[Ke]=Ne[De];return Be}var te=function(){function We(){}return We.createDefs=function(){return document.createElementNS("http://www.w3.org/2000/svg","defs")},We.setAttributes=function(Ae,Se){for(var Be=0,Ke=Se;Be<Ke.length;Be++){var Ne=Ke[Be],De=Ne[0],we=Ne[1];Ae.setAttribute(De,we)}},We.createRect=function(Ae,Se,Be){var Ke=document.createElementNS("http://www.w3.org/2000/svg","rect");return Ke.setAttribute("width",Ae.toString()),Ke.setAttribute("height",Se.toString()),Be&&We.setAttributes(Ke,Be),Ke},We.createLine=function(Ae,Se,Be,Ke,Ne){var De=document.createElementNS("http://www.w3.org/2000/svg","line");return De.setAttribute("x1",Ae.toString()),De.setAttribute("y1",Se.toString()),De.setAttribute("x2",Be.toString()),De.setAttribute("y2",Ke.toString()),Ne&&We.setAttributes(De,Ne),De},We.createPolygon=function(Ae,Se){var Be=document.createElementNS("http://www.w3.org/2000/svg","polygon");return Be.setAttribute("points",Ae),Se&&We.setAttributes(Be,Se),Be},We.createCircle=function(Ae,Se){var Be=document.createElementNS("http://www.w3.org/2000/svg","circle");return Be.setAttribute("cx",(Ae/2).toString()),Be.setAttribute("cy",(Ae/2).toString()),Be.setAttribute("r",Ae.toString()),Se&&We.setAttributes(Be,Se),Be},We.createEllipse=function(Ae,Se,Be){var Ke=document.createElementNS("http://www.w3.org/2000/svg","ellipse");return Ke.setAttribute("cx",(Ae/2).toString()),Ke.setAttribute("cy",(Se/2).toString()),Ke.setAttribute("rx",(Ae/2).toString()),Ke.setAttribute("ry",(Se/2).toString()),Be&&We.setAttributes(Ke,Be),Ke},We.createGroup=function(Ae){var Se=document.createElementNS("http://www.w3.org/2000/svg","g");return Ae&&We.setAttributes(Se,Ae),Se},We.createTransform=function(){return document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGTransform()},We.createMarker=function(Ae,Se,Be,Ke,Ne,De,we){var Le=document.createElementNS("http://www.w3.org/2000/svg","marker");return We.setAttributes(Le,[["id",Ae],["orient",Se],["markerWidth",Be.toString()],["markerHeight",Ke.toString()],["refX",Ne.toString()],["refY",De.toString()]]),Le.appendChild(we),Le},We.createText=function(Ae){var Se=document.createElementNS("http://www.w3.org/2000/svg","text");return Se.setAttribute("x","0"),Se.setAttribute("y","0"),Ae&&We.setAttributes(Se,Ae),Se},We.createTSpan=function(Ae,Se){var Be=document.createElementNS("http://www.w3.org/2000/svg","tspan");return Be.textContent=Ae,Se&&We.setAttributes(Be,Se),Be},We.createImage=function(Ae){var Se=document.createElementNS("http://www.w3.org/2000/svg","image");return Ae&&We.setAttributes(Se,Ae),Se},We.createPoint=function(Ae,Se){var Be=document.createElementNS("http://www.w3.org/2000/svg","svg").createSVGPoint();return Be.x=Ae,Be.y=Se,Be},We.createPath=function(Ae,Se){var Be=document.createElementNS("http://www.w3.org/2000/svg","path");return Be.setAttribute("d",Ae),Se&&We.setAttributes(Be,Se),Be},We}(),le=function(){function We(){}return We.addKey=function(Ae){We.key=Ae},Object.defineProperty(We,"isLicensed",{get:function(){return!!We.key&&new RegExp(/^MJS2-[A-Z][0-9]{3}-[A-Z][0-9]{3}-[0-9]{4}$/,"i").test(We.key)},enumerable:!1,configurable:!0}),We}(),ee=function(){function We(){this.naturalSize=!1,this.imageType="image/png",this.markersOnly=!1}return We.prototype.rasterize=function(Ae,Se,Be){var Ke=this;return new Promise(function(Ne){var De=Be!==void 0?Be:document.createElement("canvas");Ae===null&&(Ke.markersOnly=!0,Ke.naturalSize=!1);var we=document.createElementNS("http://www.w3.org/2000/svg","svg");we.setAttribute("xmlns","http://www.w3.org/2000/svg"),we.setAttribute("width",Se.width.baseVal.valueAsString),we.setAttribute("height",Se.height.baseVal.valueAsString),we.setAttribute("viewBox","0 0 "+Se.viewBox.baseVal.width.toString()+" "+Se.viewBox.baseVal.height.toString()),we.innerHTML=Se.innerHTML,Ke.naturalSize===!0?(we.width.baseVal.value=Ae.naturalWidth,we.height.baseVal.value=Ae.naturalHeight):Ke.width!==void 0&&Ke.height!==void 0&&(we.width.baseVal.value=Ke.width,we.height.baseVal.value=Ke.height),De.width=we.width.baseVal.value,De.height=we.height.baseVal.value;var Le=we.outerHTML,Ue=De.getContext("2d");Ke.markersOnly!==!0&&Ue.drawImage(Ae,0,0,De.width,De.height);var Me=window.URL,Re=new Image(De.width,De.height);Re.setAttribute("crossOrigin","anonymous");var tt=new Blob([Le],{type:"image/svg+xml"}),lt=Me.createObjectURL(tt);Re.onload=function(){Ue.drawImage(Re,0,0),Me.revokeObjectURL(lt);var Pt=De.toDataURL(Ke.imageType,Ke.imageQuality);Ne(Pt)},Re.src=lt})},We}(),ne=function(){},E=function(){function We(Ae){this._classNamePrefixBase="__markerjs2_",this.classes=[],this.rules=[],this.settings=this.defaultSettings,this._classNamePrefix=this._classNamePrefixBase+"_"+Ae+"_"}return Object.defineProperty(We.prototype,"classNamePrefixBase",{get:function(){return this._classNamePrefixBase},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"classNamePrefix",{get:function(){return this._classNamePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"defaultSettings",{get:function(){return{canvasBackgroundColor:"#ffffff",toolbarBackgroundColor:"#111111",toolbarBackgroundHoverColor:"#333333",toolbarColor:"#eeeeee",toolbarHeight:40,toolboxColor:"#eeeeee",toolboxAccentColor:"#3080c3",undoButtonVisible:!0,redoButtonVisible:!1,zoomButtonVisible:!1,zoomOutButtonVisible:!1,clearButtonVisible:!1,resultButtonBlockVisible:!0,logoPosition:"left"}},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"fadeInAnimationClassName",{get:function(){return this.classNamePrefix+"fade_in"},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"fadeOutAnimationClassName",{get:function(){return this.classNamePrefix+"fade_out"},enumerable:!1,configurable:!0}),We.prototype.addClass=function(Ae){return this.styleSheet===void 0&&this.addStyleSheet(),Ae.name=""+this.classNamePrefix+Ae.localName,this.classes.push(Ae),this.styleSheet.sheet.insertRule("."+Ae.name+" {"+Ae.style+"}",this.styleSheet.sheet.cssRules.length),Ae},We.prototype.addRule=function(Ae){this.styleSheet===void 0&&this.addStyleSheet(),this.rules.push(Ae),this.styleSheet.sheet.insertRule(Ae.selector+" {"+Ae.style+"}",this.styleSheet.sheet.cssRules.length)},We.prototype.addStyleSheet=function(){var Ae;this.styleSheet=document.createElement("style"),((Ae=this.styleSheetRoot)!==null&&Ae!==void 0?Ae:document.head).appendChild(this.styleSheet),this.addRule(new b("."+this.classNamePrefix+" h3","font-family: sans-serif")),this.addRule(new b("@keyframes "+this.classNamePrefix+"_fade_in_animation_frames",`
|
|
|
from {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
`)),this.addRule(new b("@keyframes "+this.classNamePrefix+"_fade_out_animation_frames",`
|
|
|
from {
|
|
|
opacity: 1;
|
|
|
}
|
|
|
to {
|
|
|
opacity: 0;
|
|
|
}
|
|
|
`)),this.addClass(new z("fade_in",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_in_animation_frames;
|
|
|
`)),this.addClass(new z("fade_out",`
|
|
|
animation-duration: 0.3s;
|
|
|
animation-name: `+this.classNamePrefix+`_fade_out_animation_frames;
|
|
|
`))},We.prototype.removeStyleSheet=function(){var Ae;this.styleSheet&&(((Ae=this.styleSheetRoot)!==null&&Ae!==void 0?Ae:document.head).removeChild(this.styleSheet),this.styleSheet=void 0)},We}(),b=function(We,Ae){this.selector=We,this.style=Ae},z=function(We,Ae){this.localName=We,this.style=Ae},x=function(){function We(Ae,Se,Be,Ke,Ne){this.buttons=[],this.markerButtons=[],this.buttonClickListeners=[],this.markerjsContainer=Ae,this.displayMode=Se,this.markerItems=Be,this.uiStyleSettings=Ke,this.styles=Ne,this.addStyles(),this.adjustLayout=this.adjustLayout.bind(this),this.overflowButtonClicked=this.overflowButtonClicked.bind(this),this.setCurrentMarker=this.setCurrentMarker.bind(this)}return We.prototype.show=function(Ae){var Se=this;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ae,this.uiContainer.className=this.toolbarStyleClass.name+" "+this.styles.fadeInAnimationClassName+" "+(this.uiStyleSettings.toolbarStyleColorsClassName?this.uiStyleSettings.toolbarStyleColorsClassName:this.toolbarStyleColorsClass.name);var Be=document.createElement("div");Be.className=this.toolbarBlockStyleClass.name,Be.style.whiteSpace="nowrap",this.uiContainer.appendChild(Be),this.addActionButton(Be,'<svg viewBox="0 0 24 24"><path d="M10.07 14.27a.997.997 0 011.33.48l2.3 4.99 1.8-.85-2.31-4.98c-.24-.5-.02-1.1.48-1.33l.28-.08 2.3-.45L8 5.12V15.9l1.82-1.47.25-.16m3.57 7.7a.99.99 0 01-1.33-.47l-2.18-4.74-2.51 2.02c-.17.14-.38.22-.62.22a1 1 0 01-1-1V3a1 1 0 011-1c.24 0 .47.09.64.23l.01-.01 11.49 9.64a1.001 1.001 0 01-.44 1.75l-3.16.62 2.2 4.73c.26.5.02 1.09-.48 1.32l-3.62 1.69z"/></svg>',"select"),this.addActionButton(Be,'<svg viewBox="0 0 24 24"><path d="M9 3v1H4v2h1v13a2 2 0 002 2h10a2 2 0 002-2V6h1V4h-5V3H9M7 6h10v13H7V6m2 2v9h2V8H9m4 0v9h2V8h-2z"/></svg>',"delete"),this.uiStyleSettings.clearButtonVisible&&this.addActionButton(Be,'<svg viewBox="0 0 24 24"><path d="M19.36 2.72l1.42 1.42-5.72 5.71c1.07 1.54 1.22 3.39.32 4.59L9.06 8.12c1.2-.9 3.05-.75 4.59.32l5.71-5.72M5.93 17.57c-2.01-2.01-3.24-4.41-3.58-6.65l4.88-2.09 7.44 7.44-2.09 4.88c-2.24-.34-4.64-1.57-6.65-3.58z"/></svg>',"clear"),this.uiStyleSettings.undoButtonVisible&&this.addActionButton(Be,'<svg viewBox="0 0 24 24"><path d="M12.5 8c-2.65 0-5.05 1-6.9 2.6L2 7v9h9l-3.62-3.62c1.39-1.16 3.16-1.88 5.12-1.88 3.54 0 6.55 2.31 7.6 5.5l2.37-.78C21.08 11.03 17.15 8 12.5 8z"/></svg>',"undo"),this.uiStyleSettings.redoButtonVisible&&this.addActionButton(Be,'<svg viewBox="0 0 24 24"><path d="M18.4 10.6C16.55 9 14.15 8 11.5 8c-4.65 0-8.58 3.03-9.96 7.22L3.9 16a8.002 8.002 0 017.6-5.5c1.95 0 3.73.72 5.12 1.88L13 16h9V7l-3.6 3.6z"/></svg>',"redo"),this.uiStyleSettings.zoomButtonVisible&&this.addActionButton(Be,'<svg viewBox="0 0 24 24"><path d="M15.5 14l5 5-1.5 1.5-5-5v-.79l-.27-.28A6.471 6.471 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3 6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.57 4.23l.28.27h.79m-6 0C12 14 14 12 14 9.5S12 5 9.5 5 5 7 5 9.5 7 14 9.5 14m2.5-4h-2v2H9v-2H7V9h2V7h1v2h2v1z"/></svg>',"zoom"),this.uiStyleSettings.zoomButtonVisible&&this.uiStyleSettings.zoomOutButtonVisible&&this.addActionButton(Be,'<svg viewBox="0 0 24 24"><path d="M15.5 14h-.79l-.28-.27A6.471 6.471 0 0016 9.5 6.5 6.5 0 009.5 3 6.5 6.5 0 003 9.5 6.5 6.5 0 009.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 5 1.5-1.5-5-5m-6 0C7 14 5 12 5 9.5S7 5 9.5 5 14 7 14 9.5 12 14 9.5 14M7 9h5v1H7V9z"/></svg>',"zoom-out"),this.uiStyleSettings.notesButtonVisible&&this.addActionButton(Be,'<svg viewBox="0 0 24 24"><path d="M18.13 12l1.26-1.26c.44-.44 1-.68 1.61-.74V9l-6-6H5c-1.11 0-2 .89-2 2v14a2 2 0 002 2h6v-1.87l.13-.13H5V5h7v7h6.13M14 4.5l5.5 5.5H14V4.5m5.13 9.33l2.04 2.04L15.04 22H13v-2.04l6.13-6.13m3.72.36l-.98.98-2.04-2.04.98-.98c.19-.2.52-.2.72 0l1.32 1.32c.2.2.2.53 0 .72z"/></svg>',"notes"),this.markerButtonBlock=document.createElement("div"),this.markerButtonBlock.className=this.toolbarBlockStyleClass.name,this.markerButtonBlock.style.flexGrow="2",this.markerButtonBlock.style.textAlign="center",this.uiContainer.appendChild(this.markerButtonBlock),this.markerButtonOverflowBlock=document.createElement("div"),this.markerButtonOverflowBlock.className=this.toolbarOverflowBlockStyleClass.name+" "+(this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName?this.uiStyleSettings.toolbarOverflowBlockStyleColorsClassName:this.toolbarOverflowBlockStyleColorsClass.name),this.markerButtonOverflowBlock.style.display="none",this.uiContainer.appendChild(this.markerButtonOverflowBlock),this.markerItems&&(this.markerItems.forEach(function(Ne){var De=document.createElement("div");De.className=""+Se.toolbarButtonStyleClass.name,De.setAttribute("data-type-name",Ne.typeName),De.innerHTML=Ne.icon,De.addEventListener("click",function(){Se.markerToolbarButtonClicked(De,Ne)}),Se.buttons.push(De),Se.markerButtons.push(De)}),this.overflowButton=document.createElement("div"),this.overflowButton.className=this.toolbarButtonStyleClass.name+" "+(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name),this.overflowButton.innerHTML='<svg viewBox="0 0 24 24"><path d="M12 16a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2m0-6a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2 2 2 0 012-2z"/></svg>',this.overflowButton.addEventListener("click",this.overflowButtonClicked),this.markerButtonBlock.appendChild(this.overflowButton));var Ke=document.createElement("div");Ke.className=this.toolbarBlockStyleClass.name,Ke.style.whiteSpace="nowrap",Ke.style.display=this.uiStyleSettings.resultButtonBlockVisible!==!1?"":"none",this.uiContainer.appendChild(Ke),this.addActionButton(Ke,'<svg viewBox="0 0 24 24"><path d="M9 20.42l-6.21-6.21 2.83-2.83L9 14.77l9.88-9.89 2.83 2.83L9 20.42z"/></svg>',"render"),this.addActionButton(Ke,'<svg viewBox="0 0 24 24"><path d="M20 6.91L17.09 4 12 9.09 6.91 4 4 6.91 9.09 12 4 17.09 6.91 20 12 14.91 17.09 20 20 17.09 14.91 12 20 6.91z"/></svg>',"close"),this.markerjsContainer.appendChild(this.uiContainer),this.setSelectMode(),this.setCurrentMarker(),this.adjustLayout()},We.prototype.addButtonClickListener=function(Ae){this.buttonClickListeners.push(Ae)},We.prototype.removeButtonClickListener=function(Ae){this.buttonClickListeners.indexOf(Ae)>-1&&this.buttonClickListeners.splice(this.buttonClickListeners.indexOf(Ae),1)},We.prototype.setSelectMode=function(){this.resetButtonStyles(),this.setActiveButton(this.buttons[0])},We.prototype.adjustLayout=function(){if(this.markerButtons&&this.markerButtons.length>0){var Ae=Math.floor(this.markerButtonBlock.clientWidth/this.uiStyleSettings.toolbarHeight)-1;this.markerButtonBlock.innerHTML="",this.markerButtonOverflowBlock.innerHTML="";for(var Se=0;Se<this.markerButtons.length;Se++)Se<Ae||Se===Ae&&this.markerButtons.length-1===Ae?this.markerButtonBlock.appendChild(this.markerButtons[Se]):(Se===Ae&&this.markerButtonBlock.appendChild(this.overflowButton),this.markerButtonOverflowBlock.appendChild(this.markerButtons[Se]))}},We.prototype.overflowButtonClicked=function(){this.markerButtonOverflowBlock.style.display!=="none"?(this.markerButtonOverflowBlock.className=this.markerButtonOverflowBlock.className.replace(this.styles.fadeInAnimationClassName,""),this.markerButtonOverflowBlock.style.display="none"):(this.markerButtonOverflowBlock.className+=" "+this.styles.fadeInAnimationClassName,this.markerButtonOverflowBlock.style.top=this.uiContainer.offsetTop+this.overflowButton.offsetHeight+"px",this.markerButtonOverflowBlock.style.right=this.uiContainer.offsetWidth-this.overflowButton.offsetLeft-this.overflowButton.offsetWidth+2*this.uiContainer.offsetLeft+"px",this.markerButtonOverflowBlock.style.display="inline-block")},We.prototype.resetButtonStyles=function(){var Ae=this;this.buttons.forEach(function(Se){Se.className=Se.className.replace(Ae.uiStyleSettings.toolbarButtonStyleColorsClassName?Ae.uiStyleSettings.toolbarButtonStyleColorsClassName:Ae.toolbarButtonStyleColorsClass.name,"").trim(),Se.className=Se.className.replace(Ae.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?Ae.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:Ae.toolbarActiveButtonStyleColorsClass.name,"").trim(),Se.className+=" "+(Ae.uiStyleSettings.toolbarButtonStyleColorsClassName?Ae.uiStyleSettings.toolbarButtonStyleColorsClassName:Ae.toolbarButtonStyleColorsClass.name)})},We.prototype.addActionButton=function(Ae,Se,Be){var Ke=this,Ne=document.createElement("div");switch(Ne.className=""+this.toolbarButtonStyleClass.name,Ne.innerHTML=Se,Ne.setAttribute("data-action",Be),Ne.addEventListener("click",function(){Ke.actionToolbarButtonClicked(Ne,Be)}),Be){case"select":Ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"delete":case"clear":Ne.style.fill=this.uiStyleSettings.deleteButtonColor;break;case"undo":case"redo":Ne.style.fill=this.uiStyleSettings.selectButtonColor;break;case"render":Ne.style.fill=this.uiStyleSettings.okButtonColor;break;case"close":Ne.style.fill=this.uiStyleSettings.closeButtonColor}Ae.appendChild(Ne),this.buttons.push(Ne)},We.prototype.addStyles=function(){this.toolbarStyleClass=this.styles.addClass(new z("toolbar",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: row;
|
|
|
justify-content: space-between;
|
|
|
height: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="inline"?"border-top-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-top-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolbarStyleColorsClass=this.styles.addClass(new z("toolbar_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
box-shadow: 0px 3px rgba(33, 33, 33, 0.1);
|
|
|
`)),this.toolbarBlockStyleClass=this.styles.addClass(new z("toolbar-block",`
|
|
|
display: inline-block;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleClass=this.styles.addClass(new z("toolbar-overflow-block",`
|
|
|
position: absolute;
|
|
|
top: `+this.uiStyleSettings.toolbarHeight+`px;
|
|
|
max-width: `+2*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
z-index: 10;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarOverflowBlockStyleColorsClass=this.styles.addClass(new z("toolbar-overflow-block_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`));var Ae=this.uiStyleSettings.toolbarHeight/4;this.toolbarButtonStyleClass=this.styles.addClass(new z("toolbar_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Ae)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Ae)+`px;
|
|
|
padding: `+Ae+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolbarButtonStyleColorsClass=this.styles.addClass(new z("toolbar_button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolbarActiveButtonStyleColorsClass=this.styles.addClass(new z("toolbar_active_button",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new b("."+this.toolbarButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`)),this.styles.addRule(new b("."+this.toolbarButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`))},We.prototype.markerToolbarButtonClicked=function(Ae,Se){this.setActiveButton(Ae),this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Be){return Be("marker",Se)}),this.markerButtonOverflowBlock.style.display="none"},We.prototype.actionToolbarButtonClicked=function(Ae,Se){this.buttonClickListeners&&this.buttonClickListeners.length>0&&this.buttonClickListeners.forEach(function(Be){return Be("action",Se)}),this.markerButtonOverflowBlock.style.display="none",this.setActiveButton(this.buttons[0])},We.prototype.setActiveButton=function(Ae){this.resetButtonStyles(),Ae.className=Ae.className.replace(this.uiStyleSettings.toolbarButtonStyleColorsClassName?this.uiStyleSettings.toolbarButtonStyleColorsClassName:this.toolbarButtonStyleColorsClass.name,"").trim(),Ae.className+=" "+(this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName?this.uiStyleSettings.toolbarActiveButtonStyleColorsClassName:this.toolbarActiveButtonStyleColorsClass.name)},We.prototype.setActiveMarkerButton=function(Ae){var Se=this.markerButtons.find(function(Be){return Be.getAttribute("data-type-name")===Ae});Se&&this.setActiveButton(Se)},We.prototype.setCurrentMarker=function(Ae){var Se=this;this.currentMarker=Ae,this.buttons.filter(function(Be){return/delete|notes/.test(Be.getAttribute("data-action"))}).forEach(function(Be){Se.currentMarker===void 0?(Be.style.fillOpacity="0.4",Be.style.pointerEvents="none"):(Be.style.fillOpacity="1",Be.style.pointerEvents="all")})},We}(),re=function(){function We(Ae,Se,Be,Ke){this.panels=[],this.panelButtons=[],this.markerjsContainer=Ae,this.displayMode=Se,this.uiStyleSettings=Be,this.styles=Ke,this.panelButtonClick=this.panelButtonClick.bind(this),this.addStyles()}return We.prototype.addStyles=function(){var Ae;this.toolboxStyleClass=this.styles.addClass(new z("toolbox",`
|
|
|
width: 100%;
|
|
|
flex-shrink: 0;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
font-family: sans-serif;
|
|
|
`+(this.displayMode==="popup"?"height:"+2.5*this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`+(this.displayMode==="popup"?"background-color: "+this.uiStyleSettings.canvasBackgroundColor+";":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-left-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
`+(this.displayMode==="inline"?"border-bottom-right-radius: "+Math.round(this.uiStyleSettings.toolbarHeight/10)+"px;":"")+`
|
|
|
overflow: hidden;
|
|
|
`)),this.toolboxStyleColorsClass=this.styles.addClass(new z("toolbox_colors",`
|
|
|
color: `+this.uiStyleSettings.toolboxColor+`;
|
|
|
`));var Se=this.uiStyleSettings.toolbarHeight/4;this.toolboxButtonRowStyleClass=this.styles.addClass(new z("toolbox-button-row",`
|
|
|
display: flex;
|
|
|
cursor: default;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonRowStyleColorsClass=this.styles.addClass(new z("toolbox-button-row_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundColor+`;
|
|
|
`)),this.toolboxPanelRowStyleClass=this.styles.addClass(new z("toolbox-panel-row",`
|
|
|
display: flex;
|
|
|
`+(this.displayMode==="inline"?"position: absolute;":"")+`
|
|
|
`+(this.displayMode==="inline"?"bottom: "+this.uiStyleSettings.toolbarHeight+"px;":"")+`
|
|
|
cursor: default;
|
|
|
height: `+1.5*this.uiStyleSettings.toolbarHeight+`px;
|
|
|
`+(this.displayMode==="inline"?"width: 100%;":"")+`
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxPanelRowStyleColorsClass=this.styles.addClass(new z("toolbox-panel-row_colors",`
|
|
|
background-color: `+((Ae=this.uiStyleSettings.toolboxBackgroundColor)!==null&&Ae!==void 0?Ae:this.uiStyleSettings.toolbarBackgroundHoverColor)+`;
|
|
|
`)),this.toolboxButtonStyleClass=this.styles.addClass(new z("toolbox_button",`
|
|
|
display: inline-block;
|
|
|
width: `+(this.uiStyleSettings.toolbarHeight-2*Se)+`px;
|
|
|
height: `+(this.uiStyleSettings.toolbarHeight-2*Se)+`px;
|
|
|
padding: `+Se+`px;
|
|
|
box-sizing: content-box;
|
|
|
`)),this.toolboxButtonStyleColorsClass=this.styles.addClass(new z("toolbox-button_colors",`
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.toolboxActiveButtonStyleColorsClass=this.styles.addClass(new z("toolbox-active-button_colors",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`;
|
|
|
fill: `+this.uiStyleSettings.toolbarColor+`;
|
|
|
`)),this.styles.addRule(new b("."+this.toolboxButtonStyleColorsClass.name+":hover",`
|
|
|
background-color: `+this.uiStyleSettings.toolbarBackgroundHoverColor+`
|
|
|
`)),this.styles.addRule(new b("."+this.toolboxButtonStyleClass.name+" svg",`
|
|
|
height: `+this.uiStyleSettings.toolbarHeight/2+`px;
|
|
|
`))},We.prototype.show=function(Ae){var Se;this.uiContainer=document.createElement("div"),this.uiContainer.style.visibility=Ae,this.uiContainer.className=this.toolboxStyleClass.name+" "+((Se=this.uiStyleSettings.toolboxStyleColorsClassName)!==null&&Se!==void 0?Se:this.toolboxStyleColorsClass.name),this.markerjsContainer.appendChild(this.uiContainer)},We.prototype.setPanelButtons=function(Ae){var Se,Be,Ke=this;this.panels=Ae,this.uiContainer!==void 0&&(this.uiContainer.innerHTML="",this.panelRow=document.createElement("div"),this.panelRow.className=this.toolboxPanelRowStyleClass.name+" "+((Se=this.uiStyleSettings.toolboxPanelRowStyleColorsClassName)!==null&&Se!==void 0?Se:this.toolboxPanelRowStyleColorsClass.name),this.uiContainer.appendChild(this.panelRow),this.buttonRow=document.createElement("div"),this.buttonRow.className=this.toolboxButtonRowStyleClass.name+" "+((Be=this.uiStyleSettings.toolboxButtonRowStyleColorsClassName)!==null&&Be!==void 0?Be:this.toolboxButtonRowStyleColorsClass.name)+" ",this.uiContainer.appendChild(this.buttonRow),this.panelButtons.splice(0),this.panels.forEach(function(Ne){var De;Ne.uiStyleSettings=Ke.uiStyleSettings;var we=document.createElement("div");we.className=Ke.toolboxButtonStyleClass.name+" "+((De=Ke.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&De!==void 0?De:Ke.toolboxButtonStyleColorsClass.name),we.innerHTML=Ne.icon,we.title=Ne.title,we.addEventListener("click",function(){Ke.panelButtonClick(Ne)}),Ke.panelButtons.push(we),Ke.buttonRow.appendChild(we)}),this.displayMode==="inline"?this.panelRow.style.display="none":this.panelRow.style.visibility="hidden")},We.prototype.panelButtonClick=function(Ae){var Se=this,Be=-1;if(Ae!==this.activePanel){Be=this.panels.indexOf(Ae),this.panelRow.innerHTML="";var Ke=Ae.getUi();Ke.style.margin=this.uiStyleSettings.toolbarHeight/4+"px",this.panelRow.appendChild(Ke),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=Ae}else this.activePanel=void 0,this.panelRow.className=this.panelRow.className.replace(this.styles.fadeInAnimationClassName,""),this.panelRow.className+=" "+this.styles.fadeOutAnimationClassName,setTimeout(function(){Se.displayMode==="inline"?Se.panelRow.style.display="none":Se.panelRow.style.visibility="hidden"},200);this.panelButtons.forEach(function(Ne,De){var we,Le;Ne.className=Se.toolboxButtonStyleClass.name+" "+(De===Be?""+((we=Se.uiStyleSettings.toolboxActiveButtonStyleColorsClassName)!==null&&we!==void 0?we:Se.toolboxActiveButtonStyleColorsClass.name):""+((Le=Se.uiStyleSettings.toolboxButtonStyleColorsClassName)!==null&&Le!==void 0?Le:Se.toolboxButtonStyleColorsClass.name))})},We}(),ae=function(We,Ae){this.title=We,this.icon=Ae},oe=function(We){function Ae(Se,Be,Ke,Ne){var De=We.call(this,Se,Ne||'<svg viewBox="0 0 24 24"><path d="M17.5 12a1.5 1.5 0 01-1.5-1.5A1.5 1.5 0 0117.5 9a1.5 1.5 0 011.5 1.5 1.5 1.5 0 01-1.5 1.5m-3-4A1.5 1.5 0 0113 6.5 1.5 1.5 0 0114.5 5 1.5 1.5 0 0116 6.5 1.5 1.5 0 0114.5 8m-5 0A1.5 1.5 0 018 6.5 1.5 1.5 0 019.5 5 1.5 1.5 0 0111 6.5 1.5 1.5 0 019.5 8m-3 4A1.5 1.5 0 015 10.5 1.5 1.5 0 016.5 9 1.5 1.5 0 018 10.5 1.5 1.5 0 016.5 12M12 3a9 9 0 00-9 9 9 9 0 009 9 1.5 1.5 0 001.5-1.5c0-.39-.15-.74-.39-1-.23-.27-.38-.62-.38-1a1.5 1.5 0 011.5-1.5H16a5 5 0 005-5c0-4.42-4.03-8-9-8z"/></svg>')||this;return De.colors=[],De.addTransparent=!1,De.colorBoxes=[],De.colors=Be,De.currentColor=Ke,De.setCurrentColor=De.setCurrentColor.bind(De),De.getColorBox=De.getColorBox.bind(De),De}return ie(Ae,We),Ae.prototype.getUi=function(){var Se=this,Be=document.createElement("div");return Be.style.overflow="hidden",Be.style.whiteSpace="nowrap",this.colors.forEach(function(Ke){var Ne=Se.getColorBox(Ke);Be.appendChild(Ne),Se.colorBoxes.push(Ne)}),Be},Ae.prototype.getColorBox=function(Se){var Be=this,Ke=this.uiStyleSettings.toolbarHeight/4,Ne=this.uiStyleSettings.toolbarHeight-Ke,De=document.createElement("div");De.style.display="inline-block",De.style.boxSizing="content-box",De.style.width=Ne-2+"px",De.style.height=Ne-2+"px",De.style.padding="1px",De.style.marginRight="2px",De.style.marginBottom="2px",De.style.borderWidth="2px",De.style.borderStyle="solid",De.style.borderRadius=(Ne+2)/2+"px",De.style.borderColor=Se===this.currentColor?this.uiStyleSettings.toolboxAccentColor:"transparent",De.addEventListener("click",function(){Be.setCurrentColor(Se,De)});var we=document.createElement("div");return we.style.display="inline-block",we.style.width=Ne-2+"px",we.style.height=Ne-2+"px",we.style.backgroundColor=Se,we.style.borderRadius=Ne/2+"px",Se==="transparent"&&(we.style.fill=this.uiStyleSettings.toolboxAccentColor,we.innerHTML=`<svg viewBox="0 0 24 24">
|
|
|
<path d="M2,5.27L3.28,4L20,20.72L18.73,22L15.65,18.92C14.5,19.3 13.28,19.5 12,19.5C7,19.5 2.73,16.39 1,12C1.69,10.24 2.79,8.69 4.19,7.46L2,5.27M12,9A3,3 0 0,1 15,12C15,12.35 14.94,12.69 14.83,13L11,9.17C11.31,9.06 11.65,9 12,9M12,4.5C17,4.5 21.27,7.61 23,12C22.18,14.08 20.79,15.88 19,17.19L17.58,15.76C18.94,14.82 20.06,13.54 20.82,12C19.17,8.64 15.76,6.5 12,6.5C10.91,6.5 9.84,6.68 8.84,7L7.3,5.47C8.74,4.85 10.33,4.5 12,4.5M3.18,12C4.83,15.36 8.24,17.5 12,17.5C12.69,17.5 13.37,17.43 14,17.29L11.72,15C10.29,14.85 9.15,13.71 9,12.28L5.6,8.87C4.61,9.72 3.78,10.78 3.18,12Z" />
|
|
|
</svg>`),De.appendChild(we),De},Ae.prototype.setCurrentColor=function(Se,Be){var Ke=this;this.currentColor=Se,this.colorBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Be?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onColorChanged&&this.onColorChanged(Se)},Ae}(ae),ve=function(){function We(Ae,Se,Be){this._state="new",this._isSelected=!1,this._container=Ae,this._overlayContainer=Se,this.globalSettings=Be,this.stateChanged=this.stateChanged.bind(this),this.colorChanged=this.colorChanged.bind(this),this.fillColorChanged=this.fillColorChanged.bind(this)}return Object.defineProperty(We.prototype,"typeName",{get:function(){return Object.getPrototypeOf(this).constructor.typeName},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"container",{get:function(){return this._container},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"overlayContainer",{get:function(){return this._overlayContainer},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"state",{get:function(){return this._state},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"toolboxPanels",{get:function(){return[]},enumerable:!1,configurable:!0}),We.prototype.ownsTarget=function(Ae){return!1},Object.defineProperty(We.prototype,"isSelected",{get:function(){return this._isSelected},enumerable:!1,configurable:!0}),We.prototype.select=function(){this.container.style.cursor="move",this._isSelected=!0,this.manipulationStartState=this.getState()},We.prototype.deselect=function(){this.container.style.cursor="default",this._isSelected=!1,this.stateChanged()},We.prototype.pointerDown=function(Ae,Se){},We.prototype.dblClick=function(Ae,Se){},We.prototype.manipulate=function(Ae){},We.prototype.pointerUp=function(Ae){this.stateChanged()},We.prototype.dispose=function(){},We.prototype.addMarkerVisualToContainer=function(Ae){this.container.childNodes.length>0?this.container.insertBefore(Ae,this.container.childNodes[0]):this.container.appendChild(Ae)},We.prototype.getState=function(){return{typeName:We.typeName,state:this.state,notes:this.notes}},We.prototype.restoreState=function(Ae){this._state=Ae.state,this.notes=Ae.notes},We.prototype.scale=function(Ae,Se){},We.prototype.colorChanged=function(Ae){this.onColorChanged&&this.onColorChanged(Ae),this.stateChanged()},We.prototype.fillColorChanged=function(Ae){this.onFillColorChanged&&this.onFillColorChanged(Ae),this.stateChanged()},We.prototype.stateChanged=function(){if(this.onStateChanged&&this.state!=="creating"&&this.state!=="new"){var Ae=this.getState();this.manipulationStartState!==void 0&&(this.manipulationStartState.state="select"),Ae.state="select",JSON.stringify(this.manipulationStartState)!=JSON.stringify(Ae)&&this.onStateChanged(this)}},We.typeName="MarkerBase",We}(),ye=function(){function We(){this.findGripByVisual=this.findGripByVisual.bind(this)}return We.prototype.findGripByVisual=function(Ae){return this.topLeft.ownsTarget(Ae)?this.topLeft:this.topCenter.ownsTarget(Ae)?this.topCenter:this.topRight.ownsTarget(Ae)?this.topRight:this.centerLeft.ownsTarget(Ae)?this.centerLeft:this.centerRight.ownsTarget(Ae)?this.centerRight:this.bottomLeft.ownsTarget(Ae)?this.bottomLeft:this.bottomCenter.ownsTarget(Ae)?this.bottomCenter:this.bottomRight.ownsTarget(Ae)?this.bottomRight:void 0},We}(),me=function(){function We(){this.GRIP_SIZE=10,this.visual=te.createGroup(),this.visual.appendChild(te.createCircle(1.5*this.GRIP_SIZE,[["fill","transparent"]])),this.visual.appendChild(te.createCircle(this.GRIP_SIZE,[["fill","#cccccc"],["fill-opacity","0.7"],["stroke","#333333"],["stroke-width","2"],["stroke-opacity","0.7"]]))}return We.prototype.ownsTarget=function(Ae){return Ae===this.visual||Ae===this.visual.childNodes[0]||Ae===this.visual.childNodes[1]},We}(),ge=function(){function We(){}return We.toITransformMatrix=function(Ae){return{a:Ae.a,b:Ae.b,c:Ae.c,d:Ae.d,e:Ae.e,f:Ae.f}},We.toSVGMatrix=function(Ae,Se){return Ae.a=Se.a,Ae.b=Se.b,Ae.c=Se.c,Ae.d=Se.d,Ae.e=Se.e,Ae.f=Se.f,Ae},We}(),_e=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.left=0,Ne.top=0,Ne.width=0,Ne.height=0,Ne.defaultSize={x:50,y:20},Ne.offsetX=0,Ne.offsetY=0,Ne.rotationAngle=0,Ne.CB_DISTANCE=10,Ne._suppressMarkerCreateEvent=!1,Ne.container.transform.baseVal.appendItem(te.createTransform()),Ne.setupControlBox(),Ne}return ie(Ae,We),Object.defineProperty(Ae.prototype,"centerX",{get:function(){return this.left+this.width/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"centerY",{get:function(){return this.top+this.height/2},enumerable:!1,configurable:!0}),Object.defineProperty(Ae.prototype,"visual",{get:function(){return this._visual},set:function(Se){this._visual=Se;var Be=te.createTransform();this._visual.transform.baseVal.appendItem(Be)},enumerable:!1,configurable:!0}),Ae.prototype.ownsTarget=function(Se){return!!We.prototype.ownsTarget.call(this,Se)||!!(this.controlGrips.findGripByVisual(Se)!==void 0||this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Se))},Ae.prototype.pointerDown=function(Se,Be){We.prototype.pointerDown.call(this,Se,Be),this.state==="new"&&(this.left=Se.x,this.top=Se.y),this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.manipulationStartWidth=this.width,this.manipulationStartHeight=this.height;var Ke=this.unrotatePoint(Se);if(this.manipulationStartX=Ke.x,this.manipulationStartY=Ke.y,this.offsetX=Ke.x-this.left,this.offsetY=Ke.y-this.top,this.state!=="new")if(this.select(),this.activeGrip=this.controlGrips.findGripByVisual(Be),this.activeGrip!==void 0)this._state="resize";else if(this.rotatorGrip!==void 0&&this.rotatorGrip.ownsTarget(Be)){this.activeGrip=this.rotatorGrip;var Ne=this.rotatePoint({x:this.centerX,y:this.centerY});this.left=Ne.x-this.width/2,this.top=Ne.y-this.height/2,this.moveVisual({x:this.left,y:this.top});var De=this.container.transform.baseVal.getItem(0);De.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(De,0),this.adjustControlBox(),this._state="rotate"}else this._state="move"},Ae.prototype.pointerUp=function(Se){var Be=this.state;We.prototype.pointerUp.call(this,Se),this.state==="creating"&&this.width<10&&this.height<10?(this.width=this.defaultSize.x,this.height=this.defaultSize.y):this.manipulate(Se),this._state="select",Be==="creating"&&this.onMarkerCreated&&this._suppressMarkerCreateEvent===!1&&this.onMarkerCreated(this)},Ae.prototype.moveVisual=function(Se){this.visual.style.transform="translate("+Se.x+"px, "+Se.y+"px)"},Ae.prototype.manipulate=function(Se){var Be=this.unrotatePoint(Se);this.state==="creating"?this.resize(Se):this.state==="move"?(this.left=this.manipulationStartLeft+(Be.x-this.manipulationStartLeft)-this.offsetX,this.top=this.manipulationStartTop+(Be.y-this.manipulationStartTop)-this.offsetY,this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()):this.state==="resize"?this.resize(Be):this.state==="rotate"&&this.rotate(Se)},Ae.prototype.resize=function(Se){var Be=this.manipulationStartLeft,Ke=this.manipulationStartWidth,Ne=this.manipulationStartTop,De=this.manipulationStartHeight;switch(this.activeGrip){case this.controlGrips.bottomLeft:case this.controlGrips.centerLeft:case this.controlGrips.topLeft:Be=this.manipulationStartLeft+Se.x-this.manipulationStartX,Ke=this.manipulationStartWidth+this.manipulationStartLeft-Be;break;case this.controlGrips.bottomRight:case this.controlGrips.centerRight:case this.controlGrips.topRight:case void 0:Ke=this.manipulationStartWidth+Se.x-this.manipulationStartX}switch(this.activeGrip){case this.controlGrips.topCenter:case this.controlGrips.topLeft:case this.controlGrips.topRight:Ne=this.manipulationStartTop+Se.y-this.manipulationStartY,De=this.manipulationStartHeight+this.manipulationStartTop-Ne;break;case this.controlGrips.bottomCenter:case this.controlGrips.bottomLeft:case this.controlGrips.bottomRight:case void 0:De=this.manipulationStartHeight+Se.y-this.manipulationStartY}Ke>=0?(this.left=Be,this.width=Ke):(this.left=Be+Ke,this.width=-Ke),De>=0?(this.top=Ne,this.height=De):(this.top=Ne+De,this.height=-De),this.setSize()},Ae.prototype.setSize=function(){this.moveVisual({x:this.left,y:this.top}),this.adjustControlBox()},Ae.prototype.rotate=function(Se){if(Math.abs(Se.x-this.centerX)>.1){var Be=Math.sign(Se.x-this.centerX);this.rotationAngle=180*Math.atan((Se.y-this.centerY)/(Se.x-this.centerX))/Math.PI+90*Be,this.applyRotation()}},Ae.prototype.applyRotation=function(){var Se=this.container.transform.baseVal.getItem(0);Se.setRotate(this.rotationAngle,this.centerX,this.centerY),this.container.transform.baseVal.replaceItem(Se,0)},Ae.prototype.rotatePoint=function(Se){if(this.rotationAngle===0)return Se;var Be=this.container.getCTM(),Ke=te.createPoint(Se.x,Se.y);return{x:(Ke=Ke.matrixTransform(Be)).x,y:Ke.y}},Ae.prototype.unrotatePoint=function(Se){if(this.rotationAngle===0)return Se;var Be=this.container.getCTM();Be=Be.inverse();var Ke=te.createPoint(Se.x,Se.y);return{x:(Ke=Ke.matrixTransform(Be)).x,y:Ke.y}},Ae.prototype.select=function(){We.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ae.prototype.deselect=function(){We.prototype.deselect.call(this),this.controlBox.style.display="none"},Ae.prototype.setupControlBox=function(){this.controlBox=te.createGroup();var Se=te.createTransform();Se.setTranslate(-this.CB_DISTANCE/2,-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.appendItem(Se),this.container.appendChild(this.controlBox),this.controlRect=te.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),this.globalSettings.disableRotation!==!0&&(this.rotatorGripLine=te.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 ye,this.addControlGrips(),this.controlBox.style.display="none"},Ae.prototype.adjustControlBox=function(){var Se=this.controlBox.transform.baseVal.getItem(0);Se.setTranslate(this.left-this.CB_DISTANCE/2,this.top-this.CB_DISTANCE/2),this.controlBox.transform.baseVal.replaceItem(Se,0),this.controlRect.setAttribute("width",(this.width+this.CB_DISTANCE).toString()),this.controlRect.setAttribute("height",(this.height+this.CB_DISTANCE).toString()),this.rotatorGripLine!==void 0&&(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()},Ae.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(),this.globalSettings.disableRotation!==!0&&(this.rotatorGrip=this.createGrip()),this.positionGrips()},Ae.prototype.createGrip=function(){var Se=new me;return Se.visual.transform.baseVal.appendItem(te.createTransform()),this.controlBox.appendChild(Se.visual),Se},Ae.prototype.positionGrips=function(){var Se=this.controlGrips.topLeft.GRIP_SIZE,Be=-Se/2,Ke=Be,Ne=(this.width+this.CB_DISTANCE)/2-Se/2,De=(this.height+this.CB_DISTANCE)/2-Se/2,we=this.height+this.CB_DISTANCE-Se/2,Le=this.width+this.CB_DISTANCE-Se/2;this.positionGrip(this.controlGrips.topLeft.visual,Be,Ke),this.positionGrip(this.controlGrips.topCenter.visual,Ne,Ke),this.positionGrip(this.controlGrips.topRight.visual,Le,Ke),this.positionGrip(this.controlGrips.centerLeft.visual,Be,De),this.positionGrip(this.controlGrips.centerRight.visual,Le,De),this.positionGrip(this.controlGrips.bottomLeft.visual,Be,we),this.positionGrip(this.controlGrips.bottomCenter.visual,Ne,we),this.positionGrip(this.controlGrips.bottomRight.visual,Le,we),this.rotatorGrip!==void 0&&this.positionGrip(this.rotatorGrip.visual,Ne,Ke-3*this.CB_DISTANCE)},Ae.prototype.positionGrip=function(Se,Be,Ke){var Ne=Se.transform.baseVal.getItem(0);Ne.setTranslate(Be,Ke),Se.transform.baseVal.replaceItem(Ne,0)},Ae.prototype.hideControlBox=function(){this.controlBox.style.display="none"},Ae.prototype.showControlBox=function(){this.controlBox.style.display=""},Ae.prototype.getState=function(){return Object.assign({left:this.left,top:this.top,width:this.width,height:this.height,rotationAngle:this.rotationAngle,visualTransformMatrix:ge.toITransformMatrix(this.visual.transform.baseVal.getItem(0).matrix),containerTransformMatrix:ge.toITransformMatrix(this.container.transform.baseVal.getItem(0).matrix)},We.prototype.getState.call(this))},Ae.prototype.restoreState=function(Se){We.prototype.restoreState.call(this,Se);var Be=Se;this.left=Be.left,this.top=Be.top,this.width=Be.width,this.height=Be.height,this.rotationAngle=Be.rotationAngle,this.visual.transform.baseVal.getItem(0).setMatrix(ge.toSVGMatrix(this.visual.transform.baseVal.getItem(0).matrix,Be.visualTransformMatrix)),this.container.transform.baseVal.getItem(0).setMatrix(ge.toSVGMatrix(this.container.transform.baseVal.getItem(0).matrix,Be.containerTransformMatrix))},Ae.prototype.scale=function(Se,Be){We.prototype.scale.call(this,Se,Be);var Ke=this.rotatePoint({x:this.left,y:this.top}),Ne=this.unrotatePoint({x:Ke.x*Se,y:Ke.y*Be});this.left=Ne.x,this.top=Ne.y,this.width=this.width*Se,this.height=this.height*Be,this.adjustControlBox()},Ae}(ve),he=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.fillColor="transparent",Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.opacity=1,Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setFillColor=Ne.setFillColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.createVisual=Ne.createVisual.bind(Ne),Ne}return ie(Ae,We),Ae.prototype.ownsTarget=function(Se){return!(!We.prototype.ownsTarget.call(this,Se)&&Se!==this.visual)},Ae.prototype.createVisual=function(){this.visual=te.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)},Ae.prototype.pointerDown=function(Se,Be){We.prototype.pointerDown.call(this,Se,Be),this.state==="new"&&(this.createVisual(),this.moveVisual(Se),this._state="creating")},Ae.prototype.manipulate=function(Se){We.prototype.manipulate.call(this,Se)},Ae.prototype.resize=function(Se){We.prototype.resize.call(this,Se),this.setSize()},Ae.prototype.setSize=function(){We.prototype.setSize.call(this),te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]])},Ae.prototype.pointerUp=function(Se){We.prototype.pointerUp.call(this,Se),this.setSize()},Ae.prototype.setStrokeColor=function(Se){this.strokeColor=Se,this.visual&&te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Se),this.stateChanged()},Ae.prototype.setFillColor=function(Se){this.fillColor=Se,this.visual&&te.setAttributes(this.visual,[["fill",this.fillColor]]),this.stateChanged()},Ae.prototype.setStrokeWidth=function(Se){this.strokeWidth=Se,this.visual&&te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ae.prototype.setStrokeDasharray=function(Se){this.strokeDasharray=Se,this.visual&&te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ae.prototype.getState=function(){return Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},We.prototype.getState.call(this))},Ae.prototype.restoreState=function(Se){var Be=Se;this.fillColor=Be.fillColor,this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.opacity=Be.opacity,this.createVisual(),We.prototype.restoreState.call(this,Se),this.setSize()},Ae.prototype.scale=function(Se,Be){We.prototype.scale.call(this,Se,Be),this.setSize()},Ae.title="Rectangle marker",Ae}(_e),pe=function(We){function Ae(Se,Be,Ke,Ne){var De=We.call(this,Se,Ne||'<svg viewBox="0 0 24 24"><path d="M3 17h18v-2H3v2m0 3h18v-1H3v1m0-7h18v-3H3v3m0-9v4h18V4H3z"/></svg>')||this;return De.widths=[],De.widthBoxes=[],De.widths=Be,De.currentWidth=Ke,De.setCurrentWidth=De.setCurrentWidth.bind(De),De}return ie(Ae,We),Ae.prototype.getUi=function(){var Se=this,Be=document.createElement("div");return Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2",this.widths.forEach(function(Ke){var Ne=document.createElement("div");Ne.style.display="flex",Ne.style.flexGrow="2",Ne.style.alignItems="center",Ne.style.justifyContent="space-between",Ne.style.padding="5px",Ne.style.borderWidth="2px",Ne.style.borderStyle="solid",Ne.style.borderColor=Ke===Se.currentWidth?Se.uiStyleSettings.toolboxAccentColor:"transparent",Ne.addEventListener("click",function(){Se.setCurrentWidth(Ke,Ne)}),Be.appendChild(Ne);var De=document.createElement("div");De.innerText=Ke.toString(),De.style.marginRight="5px",Ne.appendChild(De);var we=document.createElement("div");we.style.minHeight="20px",we.style.flexGrow="2",we.style.display="flex",we.style.alignItems="center";var Le=document.createElement("hr");Le.style.minWidth="20px",Le.style.border="0px",Le.style.borderTop=Ke+"px solid "+Se.uiStyleSettings.toolboxColor,Le.style.flexGrow="2",we.appendChild(Le),Ne.appendChild(we),Se.widthBoxes.push(Ne)}),Be},Ae.prototype.setCurrentWidth=function(Se,Be){var Ke=this;this.currentWidth=Se,this.widthBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Be?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onWidthChanged&&this.onWidthChanged(this.currentWidth)},Ae}(ae),ke=function(We){function Ae(Se,Be,Ke,Ne){var De=We.call(this,Se,Ne||'<svg viewBox="0 0 24 24"><path d="M3 16h5v-2H3v2m6.5 0h5v-2h-5v2m6.5 0h5v-2h-5v2M3 20h2v-2H3v2m4 0h2v-2H7v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2m4 0h2v-2h-2v2M3 12h8v-2H3v2m10 0h8v-2h-8v2M3 4v4h18V4H3z"/></svg>')||this;return De.styles=[],De.styleBoxes=[],De.styles=Be,De.currentStyle=Ke,De.setCurrentStyle=De.setCurrentStyle.bind(De),De}return ie(Ae,We),Ae.prototype.getUi=function(){var Se=this,Be=document.createElement("div");return Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2",this.styles.forEach(function(Ke){var Ne=document.createElement("div");Ne.style.display="flex",Ne.style.alignItems="center",Ne.style.justifyContent="space-between",Ne.style.padding="5px",Ne.style.borderWidth="2px",Ne.style.borderStyle="solid",Ne.style.overflow="hidden",Ne.style.maxWidth=100/Se.styles.length-5+"%",Ne.style.borderColor=Ke===Se.currentStyle?Se.uiStyleSettings.toolboxAccentColor:"transparent",Ne.addEventListener("click",function(){Se.setCurrentStyle(Ke,Ne)}),Be.appendChild(Ne);var De=document.createElement("div");De.style.minHeight="20px",De.style.flexGrow="2",De.style.overflow="hidden";var we=`<svg width="100" height="20">
|
|
|
<line x1="0" y1="10" x2="100" y2="10" stroke="`+Se.uiStyleSettings.toolboxColor+'" stroke-width="3" '+(Ke!==""?'stroke-dasharray="'+Ke+'"':"")+` />
|
|
|
</svg>`;De.innerHTML=we,Ne.appendChild(De),Se.styleBoxes.push(Ne)}),Be},Ae.prototype.setCurrentStyle=function(Se,Be){var Ke=this;this.currentStyle=Se,this.styleBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Be?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onStyleChanged&&this.onStyleChanged(this.currentStyle)},Ae}(ae),Te=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.strokeColor=Ke.defaultColor,Ne.strokeWidth=Ke.defaultStrokeWidth,Ne.strokeDasharray=Ke.defaultStrokeDasharray,Ne.strokePanel=new oe("Line color",Ke.defaultColorSet,Ke.defaultColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.strokeWidthPanel=new pe("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new ke("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne}return ie(Ae,We),Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var Se=We.prototype.getState.call(this);return Se.typeName=Ae.typeName,Se},Ae.typeName="FrameMarker",Ae.title="Frame marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4m14 11H6V8h12v9z"/></svg>',Ae}(he),Ee=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"},Oe=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.x1=0,Ne.y1=0,Ne.x2=0,Ne.y2=0,Ne.defaultLength=50,Ne.manipulationStartX=0,Ne.manipulationStartY=0,Ne.manipulationStartX1=0,Ne.manipulationStartY1=0,Ne.manipulationStartX2=0,Ne.manipulationStartY2=0,Ne.setupControlBox(),Ne}return ie(Ae,We),Ae.prototype.ownsTarget=function(Se){return!!We.prototype.ownsTarget.call(this,Se)||!(!this.grip1.ownsTarget(Se)&&!this.grip2.ownsTarget(Se))},Ae.prototype.pointerDown=function(Se,Be){We.prototype.pointerDown.call(this,Se,Be),this.manipulationStartX=Se.x,this.manipulationStartY=Se.y,this.state==="new"&&(this.x1=Se.x,this.y1=Se.y,this.x2=Se.x,this.y2=Se.y),this.manipulationStartX1=this.x1,this.manipulationStartY1=this.y1,this.manipulationStartX2=this.x2,this.manipulationStartY2=this.y2,this.state!=="new"&&(this.select(),this.grip1.ownsTarget(Be)?this.activeGrip=this.grip1:this.grip2.ownsTarget(Be)?this.activeGrip=this.grip2:this.activeGrip=void 0,this.activeGrip?this._state="resize":this._state="move")},Ae.prototype.pointerUp=function(Se){var Be=this.state;We.prototype.pointerUp.call(this,Se),this.state==="creating"&&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(Se),this._state="select",Be==="creating"&&this.onMarkerCreated&&this.onMarkerCreated(this)},Ae.prototype.adjustVisual=function(){},Ae.prototype.manipulate=function(Se){this.state==="creating"?this.resize(Se):this.state==="move"?(this.x1=this.manipulationStartX1+Se.x-this.manipulationStartX,this.y1=this.manipulationStartY1+Se.y-this.manipulationStartY,this.x2=this.manipulationStartX2+Se.x-this.manipulationStartX,this.y2=this.manipulationStartY2+Se.y-this.manipulationStartY,this.adjustVisual(),this.adjustControlBox()):this.state==="resize"&&this.resize(Se)},Ae.prototype.resize=function(Se){switch(this.activeGrip){case this.grip1:this.x1=Se.x,this.y1=Se.y;break;case this.grip2:case void 0:this.x2=Se.x,this.y2=Se.y}this.adjustVisual(),this.adjustControlBox()},Ae.prototype.select=function(){We.prototype.select.call(this),this.adjustControlBox(),this.controlBox.style.display=""},Ae.prototype.deselect=function(){We.prototype.deselect.call(this),this.controlBox.style.display="none"},Ae.prototype.setupControlBox=function(){this.controlBox=te.createGroup(),this.container.appendChild(this.controlBox),this.addControlGrips(),this.controlBox.style.display="none"},Ae.prototype.adjustControlBox=function(){this.positionGrips()},Ae.prototype.addControlGrips=function(){this.grip1=this.createGrip(),this.grip2=this.createGrip(),this.positionGrips()},Ae.prototype.createGrip=function(){var Se=new me;return Se.visual.transform.baseVal.appendItem(te.createTransform()),this.controlBox.appendChild(Se.visual),Se},Ae.prototype.positionGrips=function(){var Se=this.grip1.GRIP_SIZE;this.positionGrip(this.grip1.visual,this.x1-Se/2,this.y1-Se/2),this.positionGrip(this.grip2.visual,this.x2-Se/2,this.y2-Se/2)},Ae.prototype.positionGrip=function(Se,Be,Ke){var Ne=Se.transform.baseVal.getItem(0);Ne.setTranslate(Be,Ke),Se.transform.baseVal.replaceItem(Ne,0)},Ae.prototype.getState=function(){return Object.assign({x1:this.x1,y1:this.y1,x2:this.x2,y2:this.y2},We.prototype.getState.call(this))},Ae.prototype.restoreState=function(Se){We.prototype.restoreState.call(this,Se);var Be=Se;this.x1=Be.x1,this.y1=Be.y1,this.x2=Be.x2,this.y2=Be.y2},Ae.prototype.scale=function(Se,Be){We.prototype.scale.call(this,Se,Be),this.x1=this.x1*Se,this.y1=this.y1*Be,this.x2=this.x2*Se,this.y2=this.y2*Be,this.adjustVisual(),this.adjustControlBox()},Ae}(ve),je=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.strokeColor=Ke.defaultColor,Ne.strokeWidth=Ke.defaultStrokeWidth,Ne.strokeDasharray=Ke.defaultStrokeDasharray,Ne.strokePanel=new oe("Line color",Ke.defaultColorSet,Ke.defaultColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.strokeWidthPanel=new pe("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new ke("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne}return ie(Ae,We),Ae.prototype.ownsTarget=function(Se){return!(!We.prototype.ownsTarget.call(this,Se)&&Se!==this.visual&&Se!==this.selectorLine&&Se!==this.visibleLine)},Ae.prototype.createVisual=function(){this.visual=te.createGroup(),this.selectorLine=te.createLine(this.x1,this.y1,this.x2,this.y2,[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()]]),this.visibleLine=te.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)},Ae.prototype.pointerDown=function(Se,Be){We.prototype.pointerDown.call(this,Se,Be),this.state==="new"&&(this.createVisual(),this.adjustVisual(),this._state="creating")},Ae.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()),te.setAttributes(this.visibleLine,[["stroke",this.strokeColor]]),te.setAttributes(this.visibleLine,[["stroke-width",this.strokeWidth.toString()]]),te.setAttributes(this.visibleLine,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ae.prototype.setStrokeColor=function(Se){this.strokeColor=Se,this.adjustVisual(),this.colorChanged(Se)},Ae.prototype.setStrokeWidth=function(Se){this.strokeWidth=Se,this.adjustVisual()},Ae.prototype.setStrokeDasharray=function(Se){this.strokeDasharray=Se,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var Se=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray},We.prototype.getState.call(this));return Se.typeName=Ae.typeName,Se},Ae.prototype.restoreState=function(Se){We.prototype.restoreState.call(this,Se);var Be=Se;this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.createVisual(),this.adjustVisual()},Ae.typeName="LineMarker",Ae.title="Line marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M19 13H5v-2h14v2z"/></svg>',Ae}(Oe),Pe=function(We){function Ae(Se,Be,Ke,Ne){var De=We.call(this,Se,Ne||'<svg viewBox="0 0 24 24"><path d="M17 8h3v12h1v1h-4v-1h1v-3h-4l-1.5 3H14v1h-4v-1h1l6-12m1 1l-3.5 7H18V9M5 3h5c1.11 0 2 .89 2 2v11H9v-5H6v5H3V5c0-1.11.89-2 2-2m1 2v4h3V5H6z"/></svg>')||this;return De.fonts=[],De.fontBoxes=[],De.fonts=Be,De.currentFont=Ke,De.setCurrentFont=De.setCurrentFont.bind(De),De}return ie(Ae,We),Ae.prototype.getUi=function(){var Se=this,Be=document.createElement("div");return Be.style.overflow="hidden",Be.style.flexGrow="2",this.fonts.forEach(function(Ke){var Ne=document.createElement("div");Ne.style.display="inline-block",Ne.style.alignItems="center",Ne.style.justifyContent="space-between",Ne.style.padding="5px",Ne.style.borderWidth="2px",Ne.style.borderStyle="solid",Ne.style.overflow="hidden",Ne.style.maxWidth=100/Se.fonts.length-5+"%",Ne.style.borderColor=Ke===Se.currentFont?Se.uiStyleSettings.toolboxAccentColor:"transparent",Ne.addEventListener("click",function(){Se.setCurrentFont(Ke,Ne)}),Be.appendChild(Ne);var De=document.createElement("div");De.style.display="flex",De.style.minHeight="20px",De.style.flexGrow="2",De.style.fontFamily=Ke,De.style.overflow="hidden";var we=document.createElement("div");we.style.whiteSpace="nowrap",we.style.overflow="hidden",we.style.textOverflow="ellipsis",we.innerHTML="The quick brown fox jumps over the lazy dog",De.appendChild(we),Ne.appendChild(De),Se.fontBoxes.push(Ne)}),Be},Ae.prototype.setCurrentFont=function(Se,Be){var Ke=this;this.currentFont=Se,this.fontBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Be?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onFontChanged&&this.onFontChanged(this.currentFont)},Ae}(ae),Qe=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.color="transparent",Ne.padding=5,Ne.DEFAULT_TEXT="\u8BF7\u8F93\u5165\u6587\u672C",Ne.text=Ne.DEFAULT_TEXT,Ne.isMoved=!1,Ne.color=Ke.defaultColor,Ne.fontFamily=Ke.defaultFontFamily,Ne.defaultSize={x:100,y:30},Ne.setColor=Ne.setColor.bind(Ne),Ne.setFont=Ne.setFont.bind(Ne),Ne.renderText=Ne.renderText.bind(Ne),Ne.sizeText=Ne.sizeText.bind(Ne),Ne.textEditDivClicked=Ne.textEditDivClicked.bind(Ne),Ne.showTextEditor=Ne.showTextEditor.bind(Ne),Ne.setSize=Ne.setSize.bind(Ne),Ne.positionTextEditor=Ne.positionTextEditor.bind(Ne),Ne.colorPanel=new oe("Color",Ke.defaultColorSet,Ke.defaultColor),Ne.colorPanel.onColorChanged=Ne.setColor,Ne.fontFamilyPanel=new Pe("Font",Ke.defaultFontFamilies,Ke.defaultFontFamily),Ne.fontFamilyPanel.onFontChanged=Ne.setFont,Ne}return ie(Ae,We),Ae.prototype.ownsTarget=function(Se){if(We.prototype.ownsTarget.call(this,Se)||Se===this.visual||Se===this.textElement||Se===this.bgRectangle)return!0;var Be=!1;return this.textElement.childNodes.forEach(function(Ke){Ke===Se&&(Be=!0)}),Be},Ae.prototype.createVisual=function(){this.visual=te.createGroup(),this.bgRectangle=te.createRect(1,1,[["fill","transparent"]]),this.visual.appendChild(this.bgRectangle),this.textElement=te.createText([["fill",this.color],["font-family",this.fontFamily],["font-size","16px"],["x","0"],["y","0"]]),this.textElement.transform.baseVal.appendItem(te.createTransform()),this.textElement.transform.baseVal.appendItem(te.createTransform()),this.visual.appendChild(this.textElement),this.addMarkerVisualToContainer(this.visual),this.renderText()},Ae.prototype.pointerDown=function(Se,Be){We.prototype.pointerDown.call(this,Se,Be),this.isMoved=!1,this.pointerDownPoint=Se,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Se),this._state="creating")},Ae.prototype.renderText=function(){var Se=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(Be){Se.textElement.appendChild(te.createTSpan(Be.trim()===""?" ":Be.trim(),[["x","0"],["dy","1.2em"]]))}),setTimeout(this.sizeText,10)}},Ae.prototype.getTextScale=function(){var Se=this.textElement.getBBox(),Be=1;if(Se.width>0&&Se.height>0){var Ke=(1*this.width-this.width*this.padding*2/100)/Se.width,Ne=(1*this.height-this.height*this.padding*2/100)/Se.height;Be=Math.min(Ke,Ne)}return Be},Ae.prototype.getTextPosition=function(Se){var Be=this.textElement.getBBox(),Ke=0,Ne=0;return Be.width>0&&Be.height>0&&(Ke=(this.width-Be.width*Se)/2,Ne=this.height/2-Be.height*Se/2),{x:Ke,y:Ne}},Ae.prototype.sizeText=function(){var Se=this.textElement.getBBox(),Be=this.getTextScale(),Ke=this.getTextPosition(Be);Ke.y-=Se.y*Be,navigator.userAgent.indexOf("Edge/")>-1?this.textElement.style.transform="translate("+Ke.x+"px, "+Ke.y+"px) scale("+Be+", "+Be+")":(this.textElement.transform.baseVal.getItem(0).setTranslate(Ke.x,Ke.y),this.textElement.transform.baseVal.getItem(1).setScale(Be,Be))},Ae.prototype.manipulate=function(Se){We.prototype.manipulate.call(this,Se),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Se.x-this.pointerDownPoint.x)>5||Math.abs(Se.y-this.pointerDownPoint.y)>5)},Ae.prototype.resize=function(Se){We.prototype.resize.call(this,Se),this.isMoved=!0,this.setSize(),this.sizeText()},Ae.prototype.setSize=function(){We.prototype.setSize.call(this),this.visual&&this.bgRectangle&&(te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),te.setAttributes(this.bgRectangle,[["width",this.width.toString()],["height",this.height.toString()]]))},Ae.prototype.pointerUp=function(Se){var Be=this.state;Be==="creating"&&(this._suppressMarkerCreateEvent=!0),We.prototype.pointerUp.call(this,Se),this.setSize(),(Be==="creating"||!this.isMoved&&Date.now()-this.pointerDownTimestamp>500)&&this.showTextEditor(),this.pointerDownPoint=void 0},Ae.prototype.showTextEditor=function(){var Se=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(Be){Be.stopPropagation()}),this.textEditor.addEventListener("input",function(){for(var Be=Number.parseFloat(Se.textEditor.style.fontSize);Se.textEditor.clientWidth>=Number.parseInt(Se.textEditor.style.maxWidth)&&Be>.9;)Be-=.1,Se.textEditor.style.fontSize=Math.max(Be,.9)+"em"}),this.textEditor.addEventListener("keyup",function(Be){Be.cancelBubble=!0}),this.textEditor.addEventListener("paste",function(Be){if(Be.clipboardData){var Ke=Be.clipboardData.getData("text"),Ne=window.getSelection();if(!Ne.rangeCount)return!1;Ne.deleteFromDocument(),Ne.getRangeAt(0).insertNode(document.createTextNode(Ke)),Be.preventDefault()}}),this.textEditDiv.addEventListener("pointerup",function(){Se.textEditDivClicked(Se.textEditor.innerText)}),this.textEditDiv.appendChild(this.textEditor),this.overlayContainer.appendChild(this.textEditDiv),this.hideVisual(),this.textEditor.focus(),document.execCommand("selectAll")},Ae.prototype.positionTextEditor=function(){if(this.state==="edit")if(this.textEditor===void 0)this.showTextEditor();else{this.textElement.style.display="";var Se=this.getTextScale(),Be=this.rotatePoint({x:this.left+this.width/2,y:this.top+this.height/2}),Ke=this.textElement.getBBox(),Ne={x:Ke.width*Se,y:Ke.height*Se};Be.x-=Ne.x/2,Be.y-=Ne.y/2,this.textEditor.style.top=Be.y+"px",this.textEditor.style.left=Be.x+"px",this.textEditor.style.maxWidth=this.overlayContainer.offsetWidth-Be.x+"px",this.textEditor.style.fontSize=Math.max(16*Se,12)+"px",this.textElement.style.display="none"}},Ae.prototype.textEditDivClicked=function(Se){this.text=Se.trim(),this.overlayContainer.innerHTML="",this.renderText(),this.showVisual(),this._suppressMarkerCreateEvent&&(this._suppressMarkerCreateEvent=!1,this.onMarkerCreated&&this.onMarkerCreated(this)),this.stateChanged()},Ae.prototype.select=function(){We.prototype.select.call(this),this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText)},Ae.prototype.deselect=function(){this.state==="edit"&&this.textEditDivClicked(this.textEditor.innerText),We.prototype.deselect.call(this)},Ae.prototype.dblClick=function(Se,Be){We.prototype.dblClick.call(this,Se,Be),this.showTextEditor()},Ae.prototype.setColor=function(Se){this.textElement&&te.setAttributes(this.textElement,[["fill",Se]]),this.color=Se,this.textEditor&&(this.textEditor.style.color=this.color),this.colorChanged(Se)},Ae.prototype.setFont=function(Se){this.textElement&&te.setAttributes(this.textElement,[["font-family",Se]]),this.fontFamily=Se,this.textEditor&&(this.textEditor.style.fontFamily=this.fontFamily),this.renderText(),this.stateChanged()},Ae.prototype.hideVisual=function(){this.textElement.style.display="none",this.hideControlBox()},Ae.prototype.showVisual=function(){this.state==="edit"&&(this._state="select"),this.textElement.style.display="",this.showControlBox()},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var Se=Object.assign({color:this.color,fontFamily:this.fontFamily,padding:this.padding,text:this.text},We.prototype.getState.call(this));return Se.typeName=Ae.typeName,Se},Ae.prototype.restoreState=function(Se){var Be=Se;this.color=Be.color,this.fontFamily=Be.fontFamily,this.padding=Be.padding,this.text=Be.text,this.createVisual(),We.prototype.restoreState.call(this,Se),this.setSize()},Ae.prototype.scale=function(Se,Be){We.prototype.scale.call(this,Se,Be),this.setSize(),this.sizeText(),this.positionTextEditor()},Ae.typeName="TextMarker",Ae.title="Text marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M9.6 14L12 7.7l2.4 6.3M11 5L5.5 19h2.2l1.1-3H15l1.1 3h2.2L13 5h-2z"/></svg>',Ae}(_e),Xe=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.color="transparent",Ne.lineWidth=3,Ne.drawing=!1,Ne.pixelRatio=1,Ne.color=Ke.defaultColor,Ne.lineWidth=Ke.defaultStrokeWidth,Ne.pixelRatio=Ke.freehandPixelRatio,Ne.setColor=Ne.setColor.bind(Ne),Ne.addCanvas=Ne.addCanvas.bind(Ne),Ne.finishCreation=Ne.finishCreation.bind(Ne),Ne.setLineWidth=Ne.setLineWidth.bind(Ne),Ne.colorPanel=new oe("Color",Ke.defaultColorSet,Ke.defaultColor),Ne.colorPanel.onColorChanged=Ne.setColor,Ne.lineWidthPanel=new pe("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Ne.lineWidthPanel.onWidthChanged=Ne.setLineWidth,Ne}return ie(Ae,We),Ae.prototype.ownsTarget=function(Se){return!(!We.prototype.ownsTarget.call(this,Se)&&Se!==this.visual&&Se!==this.drawingImage)},Ae.prototype.createVisual=function(){this.visual=te.createGroup(),this.drawingImage=te.createImage(),this.visual.appendChild(this.drawingImage);var Se=te.createTransform();this.visual.transform.baseVal.appendItem(Se),this.addMarkerVisualToContainer(this.visual)},Ae.prototype.pointerDown=function(Se,Be){this.state==="new"&&(this.addCanvas(),this.createVisual(),this._state="creating"),this.state==="creating"?(this.canvasContext.strokeStyle=this.color,this.canvasContext.lineWidth=this.lineWidth,this.canvasContext.beginPath(),this.canvasContext.moveTo(Se.x,Se.y),this.drawing=!0):We.prototype.pointerDown.call(this,Se,Be)},Ae.prototype.manipulate=function(Se){this.state==="creating"?this.drawing&&(this.canvasContext.lineTo(Se.x,Se.y),this.canvasContext.stroke()):We.prototype.manipulate.call(this,Se)},Ae.prototype.resize=function(Se){We.prototype.resize.call(this,Se),te.setAttributes(this.visual,[["width",this.width.toString()],["height",this.height.toString()]]),te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]])},Ae.prototype.pointerUp=function(Se){this._state==="creating"?this.drawing&&(this.canvasContext.closePath(),this.drawing=!1,this.globalSettings.newFreehandMarkerOnPointerUp&&this.finishCreation()):We.prototype.pointerUp.call(this,Se)},Ae.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)},Ae.prototype.select=function(){this.state==="creating"&&this.finishCreation(),We.prototype.select.call(this)},Ae.prototype.deselect=function(){this.state==="creating"&&this.finishCreation(),We.prototype.deselect.call(this)},Ae.prototype.finishCreation=function(){for(var Se=this.canvasContext.getImageData(0,0,this.canvasElement.width,this.canvasElement.height),Be=[this.canvasElement.width+1,this.canvasElement.height+1,-1,-1],Ke=Be[0],Ne=Be[1],De=Be[2],we=Be[3],Le=!1,Ue=0;Ue<this.canvasElement.height;Ue++)for(var Me=0;Me<this.canvasElement.width;Me++)Se.data[Ue*this.canvasElement.width*4+4*Me+3]>0&&(Le=!0,Ue<Ne&&(Ne=Ue),Me<Ke&&(Ke=Me),Ue>we&&(we=Ue),Me>De&&(De=Me));if(Le){this.left=Ke/this.pixelRatio,this.top=Ne/this.pixelRatio,this.width=(De-Ke)/this.pixelRatio,this.height=(we-Ne)/this.pixelRatio;var Re=document.createElement("canvas");Re.width=De-Ke,Re.height=we-Ne,Re.getContext("2d").putImageData(this.canvasContext.getImageData(Ke,Ne,De-Ke,we-Ne),0,0),this.drawingImgUrl=Re.toDataURL("image/png"),this.setDrawingImage(),this._state="select",this.onMarkerCreated&&this.onMarkerCreated(this)}this.overlayContainer.innerHTML=""},Ae.prototype.setDrawingImage=function(){te.setAttributes(this.drawingImage,[["width",this.width.toString()],["height",this.height.toString()]]),te.setAttributes(this.drawingImage,[["href",this.drawingImgUrl]]),this.moveVisual({x:this.left,y:this.top})},Ae.prototype.setColor=function(Se){this.color=Se,this.colorChanged(Se)},Ae.prototype.setLineWidth=function(Se){this.lineWidth=Se},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return this.state==="new"||this.state==="creating"?[this.colorPanel,this.lineWidthPanel]:[]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var Se=Object.assign({drawingImgUrl:this.drawingImgUrl},We.prototype.getState.call(this));return Se.typeName=Ae.typeName,Se},Ae.prototype.restoreState=function(Se){this.createVisual(),We.prototype.restoreState.call(this,Se),this.drawingImgUrl=Se.drawingImgUrl,this.setDrawingImage()},Ae.prototype.scale=function(Se,Be){We.prototype.scale.call(this,Se,Be),this.setDrawingImage()},Ae.typeName="FreehandMarker",Ae.title="Freehand marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M9.75 20.85c1.78-.7 1.39-2.63.49-3.85-.89-1.25-2.12-2.11-3.36-2.94A9.817 9.817 0 014.54 12c-.28-.33-.85-.94-.27-1.06.59-.12 1.61.46 2.13.68.91.38 1.81.82 2.65 1.34l1.01-1.7C8.5 10.23 6.5 9.32 4.64 9.05c-1.06-.16-2.18.06-2.54 1.21-.32.99.19 1.99.77 2.77 1.37 1.83 3.5 2.71 5.09 4.29.34.33.75.72.95 1.18.21.44.16.47-.31.47-1.24 0-2.79-.97-3.8-1.61l-1.01 1.7c1.53.94 4.09 2.41 5.96 1.79m11.09-15.6c.22-.22.22-.58 0-.79l-1.3-1.3a.562.562 0 00-.78 0l-1.02 1.02 2.08 2.08M11 10.92V13h2.08l6.15-6.15-2.08-2.08L11 10.92z"/></svg>',Ae}(_e),ot=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Ke||'<svg viewBox="0 0 24 24"><path d="M8 14v4l-6-6 6-6v4h8V6l6 6-6 6v-4H8z"/></svg>')||this;return Ne.typeBoxes=[],Ne.currentType=Be,Ne.setCurrentType=Ne.setCurrentType.bind(Ne),Ne}return ie(Ae,We),Ae.prototype.getUi=function(){var Se=this,Be=document.createElement("div");Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2";for(var Ke=function(we){var Le="both";switch(we){case 0:Le="both";break;case 1:Le="start";break;case 2:Le="end";break;case 3:Le="none"}var Ue=document.createElement("div");if(Ue.style.display="flex",Ue.style.flexGrow="2",Ue.style.alignItems="center",Ue.style.justifyContent="space-between",Ue.style.padding="5px",Ue.style.borderWidth="2px",Ue.style.borderStyle="solid",Ue.style.borderColor=Le===Ne.currentType?Ne.uiStyleSettings.toolboxAccentColor:"transparent",Ue.addEventListener("click",function(){Se.setCurrentType(Le,Ue)}),Be.appendChild(Ue),Le==="both"||Le==="start"){var Me=document.createElement("div");Me.style.display="flex",Me.style.alignItems="center",Me.style.minHeight="20px",Me.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,5 10,0 10,10" fill="`+(Ne.uiStyleSettings!==void 0?Ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,Me.style.marginLeft="5px",Ue.appendChild(Me)}var Re=document.createElement("div");Re.style.display="flex",Re.style.alignItems="center",Re.style.minHeight="20px",Re.style.flexGrow="2";var tt=document.createElement("hr");if(tt.style.minWidth="20px",tt.style.border="0px",tt.style.borderTop="3px solid "+(Ne.uiStyleSettings!==void 0?Ne.uiStyleSettings.toolboxColor:"#eeeeee"),tt.style.flexGrow="2",Re.appendChild(tt),Ue.appendChild(Re),Le==="both"||Le==="end"){var lt=document.createElement("div");lt.style.display="flex",lt.style.alignItems="center",lt.style.minHeight="20px",lt.innerHTML=`<svg viewBox="0 0 10 10" width="10" height="10" xmlns="http://www.w3.org/2000/svg">
|
|
|
<polygon points="0,0 10,5 0,10" fill="`+(Ne.uiStyleSettings!==void 0?Ne.uiStyleSettings.toolboxColor:"#eeeeee")+`" />
|
|
|
</svg>`,lt.style.marginRight="5px",Ue.appendChild(lt)}Ne.typeBoxes.push(Ue)},Ne=this,De=0;De<4;De++)Ke(De);return Be},Ae.prototype.setCurrentType=function(Se,Be){var Ke=this;this.currentType=Se,this.typeBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Be?Ke.uiStyleSettings!==void 0?Ke.uiStyleSettings.toolboxAccentColor:"#3080c3":"transparent"}),this.onArrowTypeChanged&&this.onArrowTypeChanged(this.currentType)},Ae}(ae),He=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.arrowType="end",Ne.arrowBaseHeight=10,Ne.arrowBaseWidth=10,Ne.getArrowPoints=Ne.getArrowPoints.bind(Ne),Ne.setArrowType=Ne.setArrowType.bind(Ne),Ne.arrowTypePanel=new ot("Arrow type","end"),Ne.arrowTypePanel.onArrowTypeChanged=Ne.setArrowType,Ne}return ie(Ae,We),Ae.prototype.ownsTarget=function(Se){return!(!We.prototype.ownsTarget.call(this,Se)&&Se!==this.arrow1&&Se!==this.arrow2)},Ae.prototype.getArrowPoints=function(Se,Be){var Ke=this.arrowBaseWidth+2*this.strokeWidth,Ne=this.arrowBaseHeight+2*this.strokeWidth;return Se-Ke/2+","+(Be+Ne/2)+" "+Se+","+(Be-Ne/2)+" "+(Se+Ke/2)+","+(Be+Ne/2)},Ae.prototype.createTips=function(){this.arrow1=te.createPolygon(this.getArrowPoints(this.x1,this.y1),[["fill",this.strokeColor]]),this.arrow1.transform.baseVal.appendItem(te.createTransform()),this.visual.appendChild(this.arrow1),this.arrow2=te.createPolygon(this.getArrowPoints(this.x2,this.y2),[["fill",this.strokeColor]]),this.arrow2.transform.baseVal.appendItem(te.createTransform()),this.visual.appendChild(this.arrow2)},Ae.prototype.pointerDown=function(Se,Be){We.prototype.pointerDown.call(this,Se,Be),this.state==="creating"&&this.createTips()},Ae.prototype.adjustVisual=function(){if(We.prototype.adjustVisual.call(this),this.arrow1&&this.arrow2){this.arrow1.style.display=this.arrowType==="both"||this.arrowType==="start"?"":"none",this.arrow2.style.display=this.arrowType==="both"||this.arrowType==="end"?"":"none",te.setAttributes(this.arrow1,[["points",this.getArrowPoints(this.x1,this.y1)],["fill",this.strokeColor]]),te.setAttributes(this.arrow2,[["points",this.getArrowPoints(this.x2,this.y2)],["fill",this.strokeColor]]);var Se=0;Math.abs(this.x1-this.x2)>.1&&(Se=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2));var Be=this.arrow1.transform.baseVal.getItem(0);Be.setRotate(Se,this.x1,this.y1),this.arrow1.transform.baseVal.replaceItem(Be,0);var Ke=this.arrow2.transform.baseVal.getItem(0);Ke.setRotate(Se+180,this.x2,this.y2),this.arrow2.transform.baseVal.replaceItem(Ke,0)}},Ae.prototype.setArrowType=function(Se){this.arrowType=Se,this.adjustVisual(),this.stateChanged()},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel,this.arrowTypePanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var Se=Object.assign({arrowType:this.arrowType},We.prototype.getState.call(this));return Se.typeName=Ae.typeName,Se},Ae.prototype.restoreState=function(Se){We.prototype.restoreState.call(this,Se);var Be=Se;this.arrowType=Be.arrowType,this.createTips(),this.adjustVisual()},Ae.typeName="ArrowMarker",Ae.title="Arrow marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 7 15.59V9H5v10h10v-2H8.41L19 6.41z"/></svg>',Ae}(je),rt=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.fillColor=Ke.defaultFillColor,Ne.strokeWidth=0,Ne.fillPanel=new oe("Color",Ke.defaultColorSet,Ke.defaultFillColor),Ne.fillPanel.onColorChanged=Ne.setFillColor,Ne}return ie(Ae,We),Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.fillPanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var Se=We.prototype.getState.call(this);return Se.typeName=Ae.typeName,Se},Ae.typeName="CoverMarker",Ae.title="Cover marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M4 6v13h16V6H4z"/></svg>',Ae}(he),Ye=function(We){function Ae(Se,Be,Ke,Ne){var De=We.call(this,Se,Ne||'<svg viewBox="0 0 24 24"><path d="M17.66 8L12 2.35 6.34 8A8.02 8.02 0 004 13.64c0 2 .78 4.11 2.34 5.67a7.99 7.99 0 0011.32 0c1.56-1.56 2.34-3.67 2.34-5.67S19.22 9.56 17.66 8M6 14c0-2 .62-3.27 1.76-4.4L12 5.27l4.24 4.38C17.38 10.77 18 12 18 14H6z"/></svg>')||this;return De.opacities=[],De.opacityBoxes=[],De.opacities=Be,De.currentOpacity=Ke,De.setCurrentOpacity=De.setCurrentOpacity.bind(De),De}return ie(Ae,We),Ae.prototype.getUi=function(){var Se=this,Be=document.createElement("div");return Be.style.display="flex",Be.style.overflow="hidden",Be.style.flexGrow="2",Be.style.justifyContent="space-between",this.opacities.forEach(function(Ke){var Ne=document.createElement("div");Ne.style.display="flex",Ne.style.alignItems="center",Ne.style.justifyContent="center",Ne.style.padding="5px",Ne.style.borderWidth="2px",Ne.style.borderStyle="solid",Ne.style.borderColor=Ke===Se.currentOpacity?Se.uiStyleSettings.toolboxAccentColor:"transparent",Ne.addEventListener("click",function(){Se.setCurrentOpacity(Ke,Ne)}),Be.appendChild(Ne);var De=document.createElement("div");De.innerText=100*Ke+"%",Ne.appendChild(De),Se.opacityBoxes.push(Ne)}),Be},Ae.prototype.setCurrentOpacity=function(Se,Be){var Ke=this;this.currentOpacity=Se,this.opacityBoxes.forEach(function(Ne){Ne.style.borderColor=Ne===Be?Ke.uiStyleSettings.toolboxAccentColor:"transparent"}),this.onOpacityChanged&&this.onOpacityChanged(this.currentOpacity)},Ae}(ae),ut=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.setOpacity=Ne.setOpacity.bind(Ne),Ne.fillColor=Ke.defaultHighlightColor,Ne.strokeWidth=0,Ne.opacity=Ke.defaultHighlightOpacity,Ne.fillPanel=new oe("Color",Ke.defaultColorSet,Ne.fillColor),Ne.fillPanel.onColorChanged=Ne.setFillColor,Ne.opacityPanel=new Ye("Opacity",Ke.defaultOpacitySteps,Ne.opacity),Ne.opacityPanel.onOpacityChanged=Ne.setOpacity,Ne}return ie(Ae,We),Ae.prototype.setOpacity=function(Se){this.opacity=Se,this.visual&&te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.fillPanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var Se=We.prototype.getState.call(this);return Se.typeName=Ae.typeName,Se},Ae.typeName="HighlightMarker",Ae.title="Highlight marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M18.5 1.15c-.53 0-1.04.19-1.43.58l-5.81 5.82 5.65 5.65 5.82-5.81c.77-.78.77-2.04 0-2.83l-2.84-2.83c-.39-.39-.89-.58-1.39-.58M10.3 8.5l-5.96 5.96c-.78.78-.78 2.04.02 2.85C3.14 18.54 1.9 19.77.67 21h5.66l.86-.86c.78.76 2.03.75 2.81-.02l5.95-5.96"/></svg>',Ae}(rt),Ge='<svg viewBox="0 0 24 24"><path d="M9.62 12L12 5.67 14.37 12M11 3L5.5 17h2.25l1.12-3h6.25l1.13 3h2.25L13 3h-2z"/></svg>',ze='<svg viewBox="0 0 24 24"><path d="M19 11.5s-2 2.17-2 3.5a2 2 0 002 2 2 2 0 002-2c0-1.33-2-3.5-2-3.5M5.21 10L10 5.21 14.79 10m1.77-1.06L7.62 0 6.21 1.41l2.38 2.38-5.15 5.15c-.59.56-.59 1.53 0 2.12l5.5 5.5c.29.29.68.44 1.06.44s.77-.15 1.06-.44l5.5-5.5c.59-.59.59-1.56 0-2.12z"/></svg>',Ve=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.bgColor="transparent",Ne.tipPosition={x:0,y:0},Ne.tipBase1Position={x:0,y:0},Ne.tipBase2Position={x:0,y:0},Ne.tipMoving=!1,Ne.color=Ke.defaultStrokeColor,Ne.bgColor=Ke.defaultFillColor,Ne.fontFamily=Ke.defaultFontFamily,Ne.defaultSize={x:100,y:30},Ne.setBgColor=Ne.setBgColor.bind(Ne),Ne.getTipPoints=Ne.getTipPoints.bind(Ne),Ne.positionTip=Ne.positionTip.bind(Ne),Ne.setTipPoints=Ne.setTipPoints.bind(Ne),Ne.colorPanel=new oe("Text color",Ke.defaultColorSet,Ne.color,Ge),Ne.colorPanel.onColorChanged=Ne.setColor,Ne.bgColorPanel=new oe("Fill color",Ke.defaultColorSet,Ne.bgColor,ze),Ne.bgColorPanel.onColorChanged=Ne.setBgColor,Ne.fontFamilyPanel=new Pe("Font",Ke.defaultFontFamilies,Ke.defaultFontFamily),Ne.fontFamilyPanel.onFontChanged=Ne.setFont,Ne.tipGrip=new me,Ne.tipGrip.visual.transform.baseVal.appendItem(te.createTransform()),Ne.controlBox.appendChild(Ne.tipGrip.visual),Ne}return ie(Ae,We),Ae.prototype.ownsTarget=function(Se){return We.prototype.ownsTarget.call(this,Se)||this.tipGrip.ownsTarget(Se)||this.tip===Se},Ae.prototype.createTip=function(){te.setAttributes(this.bgRectangle,[["fill",this.bgColor],["rx","10px"]]),this.tip=te.createPolygon(this.getTipPoints(),[["fill",this.bgColor]]),this.visual.appendChild(this.tip)},Ae.prototype.pointerDown=function(Se,Be){this.state==="new"&&We.prototype.pointerDown.call(this,Se,Be),this.state==="creating"?this.createTip():this.tipGrip.ownsTarget(Be)?(this.manipulationStartLeft=this.left,this.manipulationStartTop=this.top,this.tipMoving=!0):We.prototype.pointerDown.call(this,Se,Be)},Ae.prototype.pointerUp=function(Se){if(this.tipMoving)this.tipMoving=!1,this.isMoved=!0,We.prototype.pointerUp.call(this,Se);else{var Be=this.state==="creating";We.prototype.pointerUp.call(this,Se),this.setTipPoints(Be),this.positionTip()}},Ae.prototype.manipulate=function(Se){if(this.tipMoving){var Be=this.unrotatePoint(Se);this.tipPosition={x:Be.x-this.manipulationStartLeft,y:Be.y-this.manipulationStartTop},this.positionTip()}else We.prototype.manipulate.call(this,Se)},Ae.prototype.setBgColor=function(Se){this.bgRectangle&&this.tip&&(te.setAttributes(this.bgRectangle,[["fill",Se]]),te.setAttributes(this.tip,[["fill",Se]])),this.bgColor=Se,this.fillColorChanged(Se)},Ae.prototype.getTipPoints=function(){return this.setTipPoints(this.state==="creating"),this.tipBase1Position.x+","+this.tipBase1Position.y+" "+this.tipBase2Position.x+","+this.tipBase2Position.y+" "+this.tipPosition.x+","+this.tipPosition.y},Ae.prototype.setTipPoints=function(Se){Se===void 0&&(Se=!1);var Be=Math.min(this.height/2,15),Ke=this.height/5;Se&&(this.tipPosition={x:Be+Ke/2,y:this.height+20});var Ne=Math.atan(this.height/2/(this.width/2));this.tipPosition.x<this.width/2&&this.tipPosition.y<this.height/2?Ne<Math.atan((this.height/2-this.tipPosition.y)/(this.width/2-this.tipPosition.x))?(Ke=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:Be,y:0},this.tipBase2Position={x:Be+Ke,y:0}):(this.tipBase1Position={x:0,y:Be},this.tipBase2Position={x:0,y:Be+Ke}):this.tipPosition.x>=this.width/2&&this.tipPosition.y<this.height/2?Ne<Math.atan((this.height/2-this.tipPosition.y)/(this.tipPosition.x-this.width/2))?(Ke=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Be-Ke,y:0},this.tipBase2Position={x:this.width-Be,y:0}):(this.tipBase1Position={x:this.width,y:Be},this.tipBase2Position={x:this.width,y:Be+Ke}):this.tipPosition.x>=this.width/2&&this.tipPosition.y>=this.height/2?Ne<Math.atan((this.tipPosition.y-this.height/2)/(this.tipPosition.x-this.width/2))?(Ke=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:this.width-Be-Ke,y:this.height},this.tipBase2Position={x:this.width-Be,y:this.height}):(this.tipBase1Position={x:this.width,y:this.height-Be-Ke},this.tipBase2Position={x:this.width,y:this.height-Be}):Ne<Math.atan((this.tipPosition.y-this.height/2)/(this.width/2-this.tipPosition.x))?(Ke=this.width/5,Be=Math.min(this.width/2,15),this.tipBase1Position={x:Be,y:this.height},this.tipBase2Position={x:Be+Ke,y:this.height}):(this.tipBase1Position={x:0,y:this.height-Be},this.tipBase2Position={x:0,y:this.height-Be-Ke})},Ae.prototype.resize=function(Se){We.prototype.resize.call(this,Se),this.positionTip()},Ae.prototype.positionTip=function(){te.setAttributes(this.tip,[["points",this.getTipPoints()]]);var Se=this.tipGrip.visual.transform.baseVal.getItem(0);Se.setTranslate(this.tipPosition.x,this.tipPosition.y),this.tipGrip.visual.transform.baseVal.replaceItem(Se,0)},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.colorPanel,this.bgColorPanel,this.fontFamilyPanel]},enumerable:!1,configurable:!0}),Ae.prototype.select=function(){this.positionTip(),We.prototype.select.call(this)},Ae.prototype.getState=function(){var Se=Object.assign({bgColor:this.bgColor,tipPosition:this.tipPosition},We.prototype.getState.call(this));return Se.typeName=Ae.typeName,Se},Ae.prototype.restoreState=function(Se){var Be=Se;this.bgColor=Be.bgColor,this.tipPosition=Be.tipPosition,We.prototype.restoreState.call(this,Se),this.createTip(),this.setTipPoints()},Ae.prototype.scale=function(Se,Be){We.prototype.scale.call(this,Se,Be),this.tipPosition={x:this.tipPosition.x*Se,y:this.tipPosition.y*Be},this.positionTip()},Ae.typeName="CalloutMarker",Ae.title="Callout marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M4 2h16a2 2 0 012 2v12a2 2 0 01-2 2h-4l-4 4-4-4H4a2 2 0 01-2-2V4a2 2 0 012-2m0 2v12h4.83L12 19.17 15.17 16H20V4H4m2 3h12v2H6V7m0 4h10v2H6v-2z"/></svg>',Ae}(Qe),$e=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.fillColor="transparent",Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.opacity=1,Ne.strokeColor=Ke.defaultColor,Ne.strokeWidth=Ke.defaultStrokeWidth,Ne.strokeDasharray=Ke.defaultStrokeDasharray,Ne.fillColor=Ke.defaultFillColor,Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setFillColor=Ne.setFillColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.setOpacity=Ne.setOpacity.bind(Ne),Ne.createVisual=Ne.createVisual.bind(Ne),Ne.strokePanel=new oe("Line color",se(Ke.defaultColorSet,["transparent"]),Ke.defaultColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.fillPanel=new oe("Fill color",se(Ke.defaultColorSet,["transparent"]),Ne.fillColor,ze),Ne.fillPanel.onColorChanged=Ne.setFillColor,Ne.strokeWidthPanel=new pe("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new ke("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne.opacityPanel=new Ye("Opacity",Ke.defaultOpacitySteps,Ne.opacity),Ne.opacityPanel.onOpacityChanged=Ne.setOpacity,Ne}return ie(Ae,We),Ae.prototype.ownsTarget=function(Se){return!(!We.prototype.ownsTarget.call(this,Se)&&Se!==this.visual)},Ae.prototype.createVisual=function(){this.visual=te.createEllipse(this.width/2,this.height/2,[["fill",this.fillColor],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()],["stroke-dasharray",this.strokeDasharray],["opacity",this.opacity.toString()]]),this.addMarkerVisualToContainer(this.visual)},Ae.prototype.pointerDown=function(Se,Be){We.prototype.pointerDown.call(this,Se,Be),this.state==="new"&&(this.createVisual(),this.moveVisual(Se),this._state="creating")},Ae.prototype.manipulate=function(Se){We.prototype.manipulate.call(this,Se)},Ae.prototype.resize=function(Se){We.prototype.resize.call(this,Se),this.setSize()},Ae.prototype.setSize=function(){We.prototype.setSize.call(this),te.setAttributes(this.visual,[["cx",(this.width/2).toString()],["cy",(this.height/2).toString()],["rx",(this.width/2).toString()],["ry",(this.height/2).toString()]])},Ae.prototype.pointerUp=function(Se){We.prototype.pointerUp.call(this,Se),this.setSize()},Ae.prototype.setStrokeColor=function(Se){this.strokeColor=Se,this.visual&&te.setAttributes(this.visual,[["stroke",this.strokeColor]]),this.colorChanged(Se),this.stateChanged()},Ae.prototype.setFillColor=function(Se){this.fillColor=Se,this.visual&&te.setAttributes(this.visual,[["fill",this.fillColor]]),this.fillColorChanged(Se),this.stateChanged()},Ae.prototype.setStrokeWidth=function(Se){this.strokeWidth=Se,this.visual&&te.setAttributes(this.visual,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ae.prototype.setStrokeDasharray=function(Se){this.strokeDasharray=Se,this.visual&&te.setAttributes(this.visual,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Ae.prototype.setOpacity=function(Se){this.opacity=Se,this.visual&&te.setAttributes(this.visual,[["opacity",this.opacity.toString()]]),this.stateChanged()},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.opacityPanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var Se=Object.assign({fillColor:this.fillColor,strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,opacity:this.opacity},We.prototype.getState.call(this));return Se.typeName=Ae.typeName,Se},Ae.prototype.restoreState=function(Se){var Be=Se;this.fillColor=Be.fillColor,this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.opacity=Be.opacity,this.createVisual(),We.prototype.restoreState.call(this,Se),this.setSize()},Ae.prototype.scale=function(Se,Be){We.prototype.scale.call(this,Se,Be),this.setSize()},Ae.typeName="EllipseMarker",Ae.title="Ellipse marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M12 4C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',Ae}(_e),nt=function(We){function Ae(Se,Be,Ke){return We.call(this,Se,Be,Ke)||this}return ie(Ae,We),Object.defineProperty(Ae.prototype,"tipLength",{get:function(){return 10+3*this.strokeWidth},enumerable:!1,configurable:!0}),Ae.prototype.ownsTarget=function(Se){return!(!We.prototype.ownsTarget.call(this,Se)&&Se!==this.tip1&&Se!==this.tip2)},Ae.prototype.createTips=function(){this.tip1=te.createLine(this.x1-this.tipLength/2,this.y1,this.x1+this.tipLength/2,this.y1,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip1.transform.baseVal.appendItem(te.createTransform()),this.visual.appendChild(this.tip1),this.tip2=te.createLine(this.x2-this.tipLength/2,this.y2,this.x2+this.tipLength/2,this.y2,[["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),this.tip2.transform.baseVal.appendItem(te.createTransform()),this.visual.appendChild(this.tip2)},Ae.prototype.pointerDown=function(Se,Be){We.prototype.pointerDown.call(this,Se,Be),this.state==="creating"&&this.createTips()},Ae.prototype.adjustVisual=function(){if(We.prototype.adjustVisual.call(this),this.tip1&&this.tip2&&(te.setAttributes(this.tip1,[["x1",(this.x1-this.tipLength/2).toString()],["y1",this.y1.toString()],["x2",(this.x1+this.tipLength/2).toString()],["y2",this.y1.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),te.setAttributes(this.tip2,[["x1",(this.x2-this.tipLength/2).toString()],["y1",this.y2.toString()],["x2",(this.x2+this.tipLength/2).toString()],["y2",this.y2.toString()],["stroke",this.strokeColor],["stroke-width",this.strokeWidth.toString()]]),Math.abs(this.x1-this.x2)>.1)){var Se=180*Math.atan((this.y2-this.y1)/(this.x2-this.x1))/Math.PI+90*Math.sign(this.x1-this.x2),Be=this.tip1.transform.baseVal.getItem(0);Be.setRotate(Se,this.x1,this.y1),this.tip1.transform.baseVal.replaceItem(Be,0);var Ke=this.tip2.transform.baseVal.getItem(0);Ke.setRotate(Se+180,this.x2,this.y2),this.tip2.transform.baseVal.replaceItem(Ke,0)}},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var Se=We.prototype.getState.call(this);return Se.typeName=Ae.typeName,Se},Ae.prototype.restoreState=function(Se){We.prototype.restoreState.call(this,Se),this.createTips(),this.adjustVisual()},Ae.typeName="MeasurementMarker",Ae.title="Measurement marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M1.39 18.36l1.77-1.76L4.58 18l1.06-1.05-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.42 1.41L10.59 12l-1.42-1.41 1.42-1.42 2.47 2.48 1.06-1.06-2.47-2.48 1.41-1.41 1.41 1.41 1.07-1.06-1.42-1.41 1.42-1.42L18 6.7l1.07-1.06-2.47-2.48 1.76-1.77 4.25 4.25L5.64 22.61l-4.25-4.25z"/></svg>',Ae}(je),et=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.strokePanel.colors=Ke.defaultColorSet,Ne.fillColor="transparent",Ne}return ie(Ae,We),Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var Se=We.prototype.getState.call(this);return Se.typeName=Ae.typeName,Se},Ae.typeName="EllipseFrameMarker",Ae.title="Ellipse frame marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M12 6c4.41 0 8 2.69 8 6s-3.59 6-8 6-8-2.69-8-6 3.59-6 8-6m0-2C6.5 4 2 7.58 2 12s4.5 8 10 8 10-3.58 10-8-4.5-8-10-8z"/></svg>',Ae}($e),pt=function(){function We(){this.undoStack=[],this.redoStack=[]}return Object.defineProperty(We.prototype,"isUndoPossible",{get:function(){return this.undoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isRedoPossible",{get:function(){return this.redoStack.length>0},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"undoStepCount",{get:function(){return this.undoStack.length},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"redoStepCount",{get:function(){return this.redoStack.length},enumerable:!1,configurable:!0}),We.prototype.addUndoStep=function(Ae){this.undoStack.length!==0&&JSON.stringify(this.undoStack[this.undoStack.length-1])===JSON.stringify(Ae)||(this.undoStack.push(Ae),JSON.stringify(this.lastRedoStep)!==JSON.stringify(Ae)&&this.redoStack.splice(0,this.redoStack.length))},We.prototype.replaceLastUndoStep=function(Ae){this.undoStack.length>0&&(this.undoStack[this.undoStack.length-1]=Ae)},We.prototype.getLastUndoStep=function(){return this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0},We.prototype.undo=function(){if(this.undoStack.length>1){var Ae=this.undoStack.pop();return Ae!==void 0&&this.redoStack.push(Ae),this.undoStack.length>0?this.undoStack[this.undoStack.length-1]:void 0}},We.prototype.redo=function(){return this.lastRedoStep=this.redoStack.pop(),this.lastRedoStep},We}(),ct=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.curveX=0,Ne.curveY=0,Ne.manipulationStartCurveX=0,Ne.manipulationStartCurveY=0,Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.positionGrips=Ne.positionGrips.bind(Ne),Ne.addControlGrips=Ne.addControlGrips.bind(Ne),Ne.adjustVisual=Ne.adjustVisual.bind(Ne),Ne.setupControlBox=Ne.setupControlBox.bind(Ne),Ne.resize=Ne.resize.bind(Ne),Ne.strokeColor=Ke.defaultColor,Ne.strokeWidth=Ke.defaultStrokeWidth,Ne.strokeDasharray=Ke.defaultStrokeDasharray,Ne.strokePanel=new oe("Line color",Ke.defaultColorSet,Ke.defaultColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.strokeWidthPanel=new pe("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new ke("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne}return ie(Ae,We),Ae.prototype.ownsTarget=function(Se){return!(!We.prototype.ownsTarget.call(this,Se)&&Se!==this.visual&&Se!==this.selectorCurve&&Se!==this.visibleCurve&&!this.curveGrip.ownsTarget(Se))},Ae.prototype.getPathD=function(){return"M "+this.x1+" "+this.y1+" Q "+this.curveX+" "+this.curveY+", "+this.x2+" "+this.y2},Ae.prototype.createVisual=function(){this.visual=te.createGroup(),this.selectorCurve=te.createPath(this.getPathD(),[["stroke","transparent"],["stroke-width",(this.strokeWidth+10).toString()],["fill","transparent"]]),this.visibleCurve=te.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)},Ae.prototype.pointerDown=function(Se,Be){We.prototype.pointerDown.call(this,Se,Be),this.manipulationStartCurveX=this.curveX,this.manipulationStartCurveY=this.curveY,this.state==="new"&&(this.curveX=Se.x,this.curveY=Se.y),this.state==="new"?(this.createVisual(),this.adjustVisual(),this._state="creating"):this.curveGrip.ownsTarget(Be)&&(this.activeGrip=this.curveGrip,this._state="resize")},Ae.prototype.adjustVisual=function(){this.selectorCurve&&this.visibleCurve&&(this.selectorCurve.setAttribute("d",this.getPathD()),this.visibleCurve.setAttribute("d",this.getPathD()),te.setAttributes(this.visibleCurve,[["stroke",this.strokeColor]]),te.setAttributes(this.visibleCurve,[["stroke-width",this.strokeWidth.toString()]]),te.setAttributes(this.visibleCurve,[["stroke-dasharray",this.strokeDasharray.toString()]]))},Ae.prototype.setupControlBox=function(){We.prototype.setupControlBox.call(this),this.curveControlLine1=te.createLine(this.x1,this.y1,this.curveX,this.curveY,[["stroke","black"],["stroke-width","1"],["stroke-opacity","0.5"],["stroke-dasharray","3, 2"]]),this.curveControlLine2=te.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)},Ae.prototype.addControlGrips=function(){this.curveGrip=this.createGrip(),this.curveX=0,this.curveY=0,We.prototype.addControlGrips.call(this)},Ae.prototype.positionGrips=function(){We.prototype.positionGrips.call(this);var Se=this.curveGrip.GRIP_SIZE;this.positionGrip(this.curveGrip.visual,this.curveX-Se/2,this.curveY-Se/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()))},Ae.prototype.manipulate=function(Se){this.state==="move"&&(this.curveX=this.manipulationStartCurveX+Se.x-this.manipulationStartX,this.curveY=this.manipulationStartCurveY+Se.y-this.manipulationStartY),We.prototype.manipulate.call(this,Se)},Ae.prototype.resize=function(Se){this.activeGrip===this.curveGrip&&(this.curveX=Se.x,this.curveY=Se.y),We.prototype.resize.call(this,Se),this.state==="creating"&&(this.curveX=this.x1+(this.x2-this.x1)/2,this.curveY=this.y1+(this.y2-this.y1)/2)},Ae.prototype.setStrokeColor=function(Se){this.strokeColor=Se,this.adjustVisual(),this.colorChanged(Se)},Ae.prototype.setStrokeWidth=function(Se){this.strokeWidth=Se,this.adjustVisual()},Ae.prototype.setStrokeDasharray=function(Se){this.strokeDasharray=Se,this.adjustVisual()},Ae.prototype.scale=function(Se,Be){this.curveX=this.curveX*Se,this.curveY=this.curveY*Be,We.prototype.scale.call(this,Se,Be)},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.strokeWidthPanel,this.strokeStylePanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var Se=Object.assign({strokeColor:this.strokeColor,strokeWidth:this.strokeWidth,strokeDasharray:this.strokeDasharray,curveX:this.curveX,curveY:this.curveY},We.prototype.getState.call(this));return Se.typeName=Ae.typeName,Se},Ae.prototype.restoreState=function(Se){We.prototype.restoreState.call(this,Se);var Be=Se;this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.curveX=Be.curveX,this.curveY=Be.curveY,this.createVisual(),this.adjustVisual()},Ae.typeName="CurveMarker",Ae.title="Curve marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M18.5 2A1.5 1.5 0 0120 3.5 1.5 1.5 0 0118.5 5c-.23 0-.45-.05-.65-.15l-3.69 3.7.34.45c2.19-1.26 4.76-2 7.5-2l1 .03v2.01L22 9c-2.58 0-5 .75-7 2.04A3.96 3.96 0 0111.04 15C9.75 17 9 19.42 9 22l.04 1H7.03L7 22c0-2.74.74-5.31 2-7.5l-.45-.34-3.7 3.69c.1.2.15.42.15.65A1.5 1.5 0 013.5 20 1.5 1.5 0 012 18.5 1.5 1.5 0 013.5 17c.23 0 .45.05.65.15l3.69-3.7C7.31 12.78 7 11.92 7 11a4 4 0 014-4c.92 0 1.78.31 2.45.84l3.7-3.69c-.1-.2-.15-.42-.15-.65A1.5 1.5 0 0118.5 2M11 9a2 2 0 00-2 2 2 2 0 002 2 2 2 0 002-2 2 2 0 00-2-2z"/></svg>',Ae}(Oe),It=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,Be,Ke)||this;return Ne.fillColor="transparent",Ne.strokeColor="transparent",Ne.strokeWidth=0,Ne.strokeDasharray="",Ne.textColor="transparent",Ne.fontSize="1rem",Ne.isMoved=!1,Ne.captionText="Caption",Ne.PADDING=5,Ne.captionBoxWidth=0,Ne.captionBoxHeight=0,Ne.strokeColor=Ke.defaultColor,Ne.strokeWidth=Ke.defaultStrokeWidth,Ne.strokeDasharray=Ke.defaultStrokeDasharray,Ne.fillColor=Ke.defaultFillColor,Ne.textColor=Ke.defaultStrokeColor,Ne.fontFamily=Ke.defaultFontFamily,Ne.fontSize=Ke.defaultCaptionFontSize,Ne.captionText=Ke.defaultCaptionText,Ne.setStrokeColor=Ne.setStrokeColor.bind(Ne),Ne.setFillColor=Ne.setFillColor.bind(Ne),Ne.setStrokeWidth=Ne.setStrokeWidth.bind(Ne),Ne.setStrokeDasharray=Ne.setStrokeDasharray.bind(Ne),Ne.createVisual=Ne.createVisual.bind(Ne),Ne.sizeCaption=Ne.sizeCaption.bind(Ne),Ne.setCaptionText=Ne.setCaptionText.bind(Ne),Ne.showTextEditor=Ne.showTextEditor.bind(Ne),Ne.positionTextEditor=Ne.positionTextEditor.bind(Ne),Ne.finishTextEditing=Ne.finishTextEditing.bind(Ne),Ne.setFont=Ne.setFont.bind(Ne),Ne.setTextColor=Ne.setTextColor.bind(Ne),Ne.strokePanel=new oe("Line color",se(Ke.defaultColorSet,["transparent"]),Ne.strokeColor),Ne.strokePanel.onColorChanged=Ne.setStrokeColor,Ne.fillPanel=new oe("Fill color",se(Ke.defaultColorSet,["transparent"]),Ne.fillColor,ze),Ne.fillPanel.onColorChanged=Ne.setFillColor,Ne.strokeWidthPanel=new pe("Line width",Ke.defaultStrokeWidths,Ke.defaultStrokeWidth),Ne.strokeWidthPanel.onWidthChanged=Ne.setStrokeWidth,Ne.strokeStylePanel=new ke("Line style",Ke.defaultStrokeDasharrays,Ke.defaultStrokeDasharray),Ne.strokeStylePanel.onStyleChanged=Ne.setStrokeDasharray,Ne.fontFamilyPanel=new Pe("Font",Ke.defaultFontFamilies,Ke.defaultFontFamily),Ne.fontFamilyPanel.onFontChanged=Ne.setFont,Ne.textColorPanel=new oe("Text color",Ke.defaultColorSet,Ne.textColor,Ge),Ne.textColorPanel.onColorChanged=Ne.setTextColor,Ne}return ie(Ae,We),Ae.prototype.ownsTarget=function(Se){return!(!We.prototype.ownsTarget.call(this,Se)&&Se!==this.visual&&Se!==this.frame&&Se!==this.captionBg&&Se!==this.captionElement)},Ae.prototype.createVisual=function(){this.visual=te.createGroup(),this.addMarkerVisualToContainer(this.visual),this.captionBg=te.createRect(1,1,[["fill",this.fillColor]]),this.visual.appendChild(this.captionBg),this.captionElement=te.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=te.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()},Ae.prototype.setCaptionText=function(Se){this.captionText=Se,this.captionElement.textContent=this.captionText,this.sizeCaption()},Ae.prototype.pointerDown=function(Se,Be){We.prototype.pointerDown.call(this,Se,Be),this.isMoved=!1,this.pointerDownPoint=Se,this.pointerDownTimestamp=Date.now(),this.state==="new"&&(this.createVisual(),this.moveVisual(Se),this._state="creating")},Ae.prototype.manipulate=function(Se){We.prototype.manipulate.call(this,Se),this.pointerDownPoint!==void 0&&(this.isMoved=Math.abs(Se.x-this.pointerDownPoint.x)>5||Math.abs(Se.y-this.pointerDownPoint.y)>5)},Ae.prototype.resize=function(Se){We.prototype.resize.call(this,Se),this.setSize()},Ae.prototype.sizeCaption=function(){var Se=this.captionElement.getBBox();this.captionText.trim()!==""?(this.captionBoxWidth=Se.width+2*this.PADDING,this.captionBoxHeight=Se.height+2*this.PADDING):(this.captionBoxWidth=0,this.captionBoxHeight=0),te.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')"]]),te.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')"]])},Ae.prototype.showTextEditor=function(){var Se=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(Be){Be.stopPropagation()}),this.textEditBox.addEventListener("keypress",function(Be){Be.key==="Enter"&&Se.finishTextEditing(Se.textEditBox.value)}),this.textEditBox.addEventListener("keyup",function(Be){Be.cancelBubble=!0}),this.textEditBox.addEventListener("blur",function(){Se.finishTextEditing(Se.textEditBox.value)}),this.textEditDiv.addEventListener("pointerup",function(){Se.finishTextEditing(Se.textEditBox.value)}),this.positionTextEditor(),this.textEditBox.focus()},Ae.prototype.positionTextEditor=function(){this.state==="edit"&&(this.textEditBox===void 0?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"))},Ae.prototype.finishTextEditing=function(Se){this.setCaptionText(Se.trim()),this.overlayContainer.innerHTML="",this.stateChanged()},Ae.prototype.setFont=function(Se){this.captionElement&&te.setAttributes(this.captionElement,[["font-family",Se]]),this.fontFamily=Se,this.textEditBox&&(this.textEditBox.style.fontFamily=this.fontFamily),this.sizeCaption(),this.stateChanged()},Ae.prototype.setTextColor=function(Se){this.captionElement&&te.setAttributes(this.captionElement,[["fill",Se]]),this.textColor=Se,this.textEditBox&&(this.textEditBox.style.color=this.textColor),this.stateChanged()},Ae.prototype.setSize=function(){We.prototype.setSize.call(this),te.setAttributes(this.frame,[["width",this.width.toString()],["height",this.height.toString()]]),this.sizeCaption()},Ae.prototype.pointerUp=function(Se){We.prototype.pointerUp.call(this,Se),this.setSize(),!this.isMoved&&Date.now()-this.pointerDownTimestamp>500&&this.showTextEditor(),this.pointerDownPoint=void 0},Ae.prototype.dblClick=function(Se,Be){We.prototype.dblClick.call(this,Se,Be),this.showTextEditor()},Ae.prototype.setStrokeColor=function(Se){this.strokeColor=Se,this.frame&&te.setAttributes(this.frame,[["stroke",this.strokeColor]]),this.colorChanged(Se),this.stateChanged()},Ae.prototype.setFillColor=function(Se){this.fillColor=Se,this.captionBg&&te.setAttributes(this.captionBg,[["fill",this.fillColor]]),this.fillColorChanged(Se),this.stateChanged()},Ae.prototype.setStrokeWidth=function(Se){this.strokeWidth=Se,this.frame&&te.setAttributes(this.frame,[["stroke-width",this.strokeWidth.toString()]]),this.stateChanged()},Ae.prototype.setStrokeDasharray=function(Se){this.strokeDasharray=Se,this.frame&&te.setAttributes(this.frame,[["stroke-dasharray",this.strokeDasharray]]),this.stateChanged()},Object.defineProperty(Ae.prototype,"toolboxPanels",{get:function(){return[this.strokePanel,this.fillPanel,this.strokeWidthPanel,this.strokeStylePanel,this.fontFamilyPanel,this.textColorPanel]},enumerable:!1,configurable:!0}),Ae.prototype.getState=function(){var Se=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},We.prototype.getState.call(this));return Se.typeName=this.typeName,Se},Ae.prototype.restoreState=function(Se){var Be=Se;this.fillColor=Be.fillColor,this.strokeColor=Be.strokeColor,this.strokeWidth=Be.strokeWidth,this.strokeDasharray=Be.strokeDasharray,this.textColor=Be.textColor,this.fontFamily=Be.fontFamily,this.captionText=Be.captionText,this.fontSize=Be.fontSize,this.createVisual(),We.prototype.restoreState.call(this,Se),this.setSize()},Ae.prototype.scale=function(Se,Be){We.prototype.scale.call(this,Se,Be),this.setSize()},Ae.typeName="CaptionFrameMarker",Ae.title="Caption frame marker",Ae.icon='<svg viewBox="0 0 24 24"><path d="M5 3c-1.11 0-2 .89-2 2v14c0 1.11.89 2 2 2h14c1.11 0 2-.89 2-2V5c0-1.11-.89-2-2-2H5m0 2h14v14H5V5m2 2v2h10V7H7z"/></svg>',Ae}(_e),dt=function(){function We(Ae,Se){Se===void 0&&(Se=!1),this.cancelable=!1,this._defaultPrevented=!1,this.markerArea=Ae,this.cancelable=Se}return Object.defineProperty(We.prototype,"defaultPrevented",{get:function(){return this._defaultPrevented},enumerable:!1,configurable:!0}),We.prototype.preventDefault=function(){this._defaultPrevented=!0},We}(),Mt=function(We){function Ae(Se,Be,Ke){var Ne=We.call(this,Se,!1)||this;return Ne.dataUrl=Be,Ne.state=Ke,Ne}return ie(Ae,We),Ae}(dt),xt=function(We){function Ae(Se,Be,Ke){Ke===void 0&&(Ke=!1);var Ne=We.call(this,Se,Ke)||this;return Ne.marker=Be,Ne}return ie(Ae,We),Ae}(dt),gt=function(){function We(){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 We.prototype.addEventListener=function(Ae,Se){this[Ae].push(Se)},We.prototype.removeEventListener=function(Ae,Se){var Be=this[Ae].indexOf(Se);Be>-1&&this[Ae].splice(Be,1)},We}(),_t=function(){function We(Ae){this.touchPoints=0,this._availableMarkerTypes=this.DEFAULT_MARKER_TYPES,this.mode="select",this.markers=[],this.isDragging=!1,this.renderEventListeners=[],this.closeEventListeners=[],this.settings=new Ee,this._isOpen=!1,this.undoRedoManager=new pt,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 gt,this._silentRenderMode=!1,this._isFocused=!1,this._instanceNo=We.instanceCounter++,this.styles=new E(this.instanceNo),this.uiStyleSettings=this.styles.settings,this.target=Ae,this.targetRoot=document.body,this.width=Ae.clientWidth,this.height=Ae.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(We.prototype,"ALL_MARKER_TYPES",{get:function(){return[Te,Xe,He,Qe,et,$e,ut,Ve,nt,rt,je,ct,It]},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"DEFAULT_MARKER_TYPES",{get:function(){return[Te,Xe,He,Qe,$e,ut,Ve]},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"BASIC_MARKER_TYPES",{get:function(){return[Te,Xe,He,Qe,ut]},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"availableMarkerTypes",{get:function(){return this._availableMarkerTypes},set:function(Ae){var Se=this;this._availableMarkerTypes.splice(0),Ae.forEach(function(Be){if(typeof Be=="string"){var Ke=Se.ALL_MARKER_TYPES.find(function(Ne){return Ne.typeName===Be});Ke!==void 0&&Se._availableMarkerTypes.push(Ke)}else Se._availableMarkerTypes.push(Be)})},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"currentMarker",{get:function(){return this._currentMarker},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isOpen",{get:function(){return this._isOpen},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isUndoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isUndoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"isRedoPossible",{get:function(){return!(!this.undoRedoManager||!this.undoRedoManager.isRedoPossible)},enumerable:!1,configurable:!0}),Object.defineProperty(We.prototype,"zoomLevel",{get:function(){return this._zoomLevel},set:function(Ae){this._zoomLevel=Ae,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(We.prototype,"instanceNo",{get:function(){return this._instanceNo},enumerable:!1,configurable:!0}),We.prototype.open=function(){this.setupResizeObserver(),this.setEditingTarget(),this.setTopLeft(),this.initMarkerCanvas(),this.initOverlay(),this.attachEvents(),this.settings.displayMode==="popup"&&this.onPopupTargetResize(),le.isLicensed||this.addLogo(),this._isOpen=!0,this._isFocused=!0},We.prototype.show=function(){var Ae=this;this.styles.styleSheetRoot===void 0&&ne.styleSheetRoot!==void 0&&(this.styles.styleSheetRoot=ne.styleSheetRoot),this.setWindowHeight(),this.showUI(),this.open(),this.eventListeners.show.forEach(function(Se){return Se(new dt(Ae))})},We.prototype.render=function(){return Ce(this,void 0,void 0,function(){var Ae;return ue(this,function(Se){switch(Se.label){case 0:return this.setCurrentMarker(),(Ae=new ee).naturalSize=this.renderAtNaturalSize,Ae.imageType=this.renderImageType,Ae.imageQuality=this.renderImageQuality,Ae.markersOnly=this.renderMarkersOnly,Ae.width=this.renderWidth,Ae.height=this.renderHeight,[4,Ae.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 1:return Se.sent(),[4,Ae.rasterize(this.target instanceof HTMLImageElement?this.target:null,this.markerImage,this.renderTarget)];case 2:return[2,Se.sent()]}})})},We.prototype.close=function(Ae){var Se=this;if(Ae===void 0&&(Ae=!1),this.isOpen){var Be=!1;Ae||this.eventListeners.beforeclose.forEach(function(Ke){var Ne=new dt(Se,!0);Ke(Ne),Ne.defaultPrevented&&(Be=!0)}),Be||(this.coverDiv&&this.closeUI(),this.targetObserver&&(this.targetObserver.unobserve(this.target),this.targetObserver.unobserve(this.editorCanvas)),this.settings.displayMode==="popup"&&window.removeEventListener("resize",this.setWindowHeight),this.eventListeners.close.forEach(function(Ke){return Ke(new dt(Se))}),this.detachEvents(),this._isOpen=!1)}},We.prototype.addMarkersToToolbar=function(){for(var Ae,Se=[],Be=0;Be<arguments.length;Be++)Se[Be]=arguments[Be];(Ae=this._availableMarkerTypes).push.apply(Ae,Se)},We.prototype.addRenderEventListener=function(Ae){this.addEventListener("render",function(Se){Ae(Se.dataUrl,Se.state)})},We.prototype.removeRenderEventListener=function(Ae){},We.prototype.addCloseEventListener=function(Ae){this.addEventListener("close",function(){Ae()})},We.prototype.removeCloseEventListener=function(Ae){},We.prototype.setupResizeObserver=function(){var Ae=this;this.settings.displayMode==="inline"?window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){Ae.resize(Ae.target.clientWidth,Ae.target.clientHeight)}),this.targetObserver.observe(this.target)):this.settings.displayMode==="popup"&&(window.ResizeObserver&&(this.targetObserver=new ResizeObserver(function(){return Ae.onPopupTargetResize()}),this.targetObserver.observe(this.editorCanvas)),window.addEventListener("resize",this.setWindowHeight))},We.prototype.onPopupTargetResize=function(){var Ae=1*this.target.clientWidth/this.target.clientHeight,Se=this.editorCanvas.clientWidth/Ae>this.editorCanvas.clientHeight?this.editorCanvas.clientHeight*Ae:this.editorCanvas.clientWidth,Be=Se<this.editorCanvas.clientWidth?this.editorCanvas.clientHeight:this.editorCanvas.clientWidth/Ae;this.resize(Se,Be)},We.prototype.setWindowHeight=function(){this.windowHeight=window.innerHeight},We.prototype.resize=function(Ae,Se){this._isResizing=!0;var Be=Ae/this.imageWidth,Ke=Se/this.imageHeight;this.imageWidth=Math.round(Ae),this.imageHeight=Math.round(Se),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px",this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.settings.displayMode!=="popup"?this.coverDiv.style.width=this.imageWidth.toString()+"px":(this.setTopLeft(),this.positionMarkerImage()),this.toolbar!==void 0&&this.toolbar.adjustLayout(),this.positionLogo(),this.scaleMarkers(Be,Ke),this._isResizing=!1},We.prototype.scaleMarkers=function(Ae,Se){var Be,Ke=this;this._currentMarker&&this._currentMarker instanceof Qe?this._currentMarker.scale(Ae,Se):(Be=this._currentMarker,this.setCurrentMarker()),this.markers.forEach(function(Ne){Ne!==Ke._currentMarker&&Ne.scale(Ae,Se)}),Be!==void 0&&this.setCurrentMarker(Be)},We.prototype.setEditingTarget=function(){this.imageWidth=Math.round(this.target.clientWidth),this.imageHeight=Math.round(this.target.clientHeight),this.target instanceof HTMLImageElement&&this.editingTarget instanceof HTMLImageElement&&(this.editingTarget.src=this.target.src),this.editingTarget.width=this.imageWidth,this.editingTarget.height=this.imageHeight,this.editingTarget.style.width=this.imageWidth+"px",this.editingTarget.style.height=this.imageHeight+"px"},We.prototype.setTopLeft=function(){var Ae=this.editingTarget.getBoundingClientRect(),Se=this.editorCanvas.getBoundingClientRect();this.left=Ae.left-Se.left,this.top=Ae.top-Se.top},We.prototype.initMarkerCanvas=function(){this.markerImageHolder=document.createElement("div"),this.markerImageHolder.style.setProperty("touch-action","pinch-zoom"),this.markerImage=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.markerImage.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.markerImage.setAttribute("width",this.imageWidth.toString()),this.markerImage.setAttribute("height",this.imageHeight.toString()),this.markerImage.setAttribute("viewBox","0 0 "+this.imageWidth.toString()+" "+this.imageHeight.toString()),this.markerImage.style.pointerEvents="auto",this.markerImageHolder.style.position="absolute",this.markerImageHolder.style.width=this.imageWidth+"px",this.markerImageHolder.style.height=this.imageHeight+"px",this.markerImageHolder.style.transformOrigin="top left",this.positionMarkerImage(),this.markerImageHolder.appendChild(this.markerImage),this.editorCanvas.appendChild(this.markerImageHolder)},We.prototype.addDefs=function(){for(var Ae,Se=[],Be=0;Be<arguments.length;Be++)Se[Be]=arguments[Be];this.defs=te.createDefs(),this.addDefsToImage(),(Ae=this.defs).append.apply(Ae,Se)},We.prototype.addDefsToImage=function(){this.defs&&this.markerImage.insertBefore(this.defs,this.markerImage.firstChild)},We.prototype.initOverlay=function(){this.overlayContainer=document.createElement("div"),this.overlayContainer.style.position="absolute",this.overlayContainer.style.left="0px",this.overlayContainer.style.top="0px",this.overlayContainer.style.width=this.imageWidth+"px",this.overlayContainer.style.height=this.imageHeight+"px",this.overlayContainer.style.display="flex",this.markerImageHolder.appendChild(this.overlayContainer)},We.prototype.positionMarkerImage=function(){this.markerImageHolder.style.top=this.top/this.zoomLevel+"px",this.markerImageHolder.style.left=this.left/this.zoomLevel+"px"},We.prototype.attachEvents=function(){this.markerImage.addEventListener("pointerdown",this.onPointerDown),this.markerImage.addEventListener("dblclick",this.onDblClick),this.attachWindowEvents()},We.prototype.attachWindowEvents=function(){window.addEventListener("pointermove",this.onPointerMove),window.addEventListener("pointerup",this.onPointerUp),window.addEventListener("pointercancel",this.onPointerOut),window.addEventListener("pointerout",this.onPointerOut),window.addEventListener("pointerleave",this.onPointerUp),window.addEventListener("resize",this.onWindowResize),window.addEventListener("keyup",this.onKeyUp)},We.prototype.detachEvents=function(){this.markerImage.removeEventListener("pointerdown",this.onPointerDown),this.markerImage.removeEventListener("dblclick",this.onDblClick),this.detachWindowEvents()},We.prototype.detachWindowEvents=function(){window.removeEventListener("pointermove",this.onPointerMove),window.removeEventListener("pointerup",this.onPointerUp),window.removeEventListener("pointercancel",this.onPointerOut),window.removeEventListener("pointerout",this.onPointerOut),window.removeEventListener("pointerleave",this.onPointerUp),window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("keyup",this.onKeyUp)},We.prototype.addLogo=function(){this.logoUI=document.createElement("div"),this.logoUI.style.display="inline-block",this.logoUI.style.margin="0px",this.logoUI.style.padding="0px",this.logoUI.style.fill="#333333";var Ae=document.createElement("a");Ae.href="https://markerjs.com/",Ae.target="_blank",Ae.innerHTML='<svg viewBox="0 0 112 96" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd" clip-rule="evenodd" stroke-linejoin="round" stroke-miterlimit="1.414"><path fill="#e5f20d" fill-opacity=".647" d="M0 40.386h111.96V95.62H0z"/><path d="M93.61 61.452c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.591 1.048-1.481 0-2.222-.74-2.222-2.22 0-16.617-.533-29.347-1.604-38.192-1.068-8.842-2.92-13.265-5.552-13.265-4.443 0-10.94 15.509-19.497 46.52v.124c0 .987-.328 1.831-.987 2.53-.657.7-1.52 1.048-2.592 1.048-1.48 0-2.22-.74-2.22-2.22 0-3.29.165-8.392.493-15.302.33-7.732.494-13.82.494-18.262 0-6.17-.186-10.55-.556-13.142-.37-2.591-1.172-3.887-2.406-3.887-2.796 0-6.333 5.12-10.612 15.363C38.494 34.367 34.01 46.44 29.32 60.34l-1.11 3.209a5.714 5.714 0 01-1.42 2.097c-.617.578-1.295.864-2.036.864-.987 0-1.644-.081-1.974-.247-.328-.162-.533-.656-.617-1.48-.41-4.03-.74-9.418-.987-16.165-.163-1.728-.329-4.566-.494-8.515-.822-13.901-1.562-23.3-2.221-28.196-.657-4.893-.987-7.628-.987-8.205 0-.657.33-1.44.987-2.345.659-.903 1.276-1.357 1.85-1.357 1.319 0 2.387.947 3.21 2.838.411.906.863 4.526 1.357 10.859.493 6.335.905 14.19 1.233 23.568l.617 18.88c4.527-13.983 9.216-26.673 14.068-38.068C45.65 6.686 50.093.988 54.123.988c2.715 0 4.566 1.974 5.553 5.923.987 3.949 1.481 9.667 1.481 17.152 0 3.949-.081 9.625-.247 17.029l-.123 5.676c3.373-11.762 6.725-21.634 10.057-29.615 3.331-7.979 6.685-11.97 10.056-11.97 8.475 0 12.71 18.757 12.71 56.269z" fill-rule="nonzero"/></svg>',Ae.title="Powered by marker.js",Ae.style.display="grid",Ae.style.alignItems="center",Ae.style.justifyItems="center",Ae.style.padding="3px",Ae.style.width="20px",Ae.style.height="20px",this.logoUI.appendChild(Ae),this.editorCanvas.appendChild(this.logoUI),this.logoUI.style.position="absolute",this.logoUI.style.pointerEvents="all",this.positionLogo()},We.prototype.positionLogo=function(){this.logoUI&&(this.uiStyleSettings.logoPosition!=="right"?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")},We.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"},We.prototype.restoreOverflow=function(){document.body.style.overflow=this.bodyOverflowState,window.scroll({top:this.scrollYState,left:this.scrollXState})},We.prototype.showUI=function(){switch(this.settings.displayMode==="popup"&&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 Ae=this.settings.uiOffsetTop!==void 0?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=Ae+"px",this.coverDiv.style.left=this.target.offsetLeft.toString()+"px",this.coverDiv.style.width=this.target.offsetWidth.toString()+"px",this.coverDiv.style.zIndex=this.uiStyleSettings.zIndex!==void 0?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=this.uiStyleSettings.zIndex!==void 0?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=this.settings.displayMode==="popup"?this.settings.popupMargin+"px":"0px",this.uiDiv.style.border="0px",this.coverDiv.appendChild(this.uiDiv),this.toolbar=new x(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",this.settings.displayMode==="popup"&&(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",this.settings.displayMode==="popup"&&(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"),this.settings.uiOffsetTop===void 0&&this.target.offsetTop<this.styles.settings.toolbarHeight&&(this.editingTarget.style.marginTop=this.target.offsetTop-this.styles.settings.toolbarHeight+"px"),this.editorCanvas.appendChild(this.editingTarget),this.toolbox=new re(this.uiDiv,this.settings.displayMode,this.uiStyleSettings,this.styles),this.toolbox.show(this._silentRenderMode||this.uiStyleSettings.hideToolbox?"hidden":"visible")},We.prototype.closeUI=function(){this.settings.displayMode==="popup"&&this.restoreOverflow(),this.targetRoot.removeChild(this.coverDiv)},We.prototype.removeMarker=function(Ae){this.markerImage.removeChild(Ae.container),this.markers.indexOf(Ae)>-1&&this.markers.splice(this.markers.indexOf(Ae),1),Ae.dispose()},We.prototype.switchToSelectMode=function(){this.mode="select",this.hideNotesEditor(),this._currentMarker!==void 0&&(this._currentMarker.state!=="new"?this._currentMarker.select():(this.removeMarker(this._currentMarker),this.setCurrentMarker(),this.markerImage.style.cursor="default"),this.addUndoStep())},We.prototype.toolbarButtonClicked=function(Ae,Se){if(Ae==="marker"&&Se!==void 0)this.createNewMarker(Se);else if(Ae==="action")switch(Se){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":this.notesArea===void 0?(this.switchToSelectMode(),this.zoomLevel=1,this.showNotesEditor()):this.switchToSelectMode();break;case"close":this.close();break;case"render":this.switchToSelectMode(),this.startRenderAndClose()}},We.prototype.deleteSelectedMarker=function(){var Ae=this;if(this._currentMarker!==void 0){var Se=!1;if(this.eventListeners.markerbeforedelete.forEach(function(Ke){var Ne=new xt(Ae,Ae._currentMarker,!0);Ke(Ne),Ne.defaultPrevented&&(Se=!0)}),!Se){var Be=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(Ke){return Ke(new xt(Ae,Be))})}}},We.prototype.clear=function(){var Ae=this,Se=!1;if(this.markers.length>0&&(this.eventListeners.markerbeforedelete.forEach(function(De){var we=new xt(Ae,void 0,!0);De(we),we.defaultPrevented&&(Se=!0)}),!Se)){this.setCurrentMarker();for(var Be=function(De){var we=Ke.markers[De];Ke.setCurrentMarker(Ke.markers[De]),Ke._currentMarker.dispose(),Ke.markerImage.removeChild(Ke._currentMarker.container),Ke.markers.splice(Ke.markers.indexOf(Ke._currentMarker),1),Ke.eventListeners.markerdelete.forEach(function(Le){return Le(new xt(Ae,we))})},Ke=this,Ne=this.markers.length-1;Ne>=0;Ne--)Be(Ne);this.addUndoStep()}},Object.defineProperty(We.prototype,"isNotesAreaOpen",{get:function(){return this.notesArea!==void 0},enumerable:!1,configurable:!0}),We.prototype.showNotesEditor=function(){var Ae;this._currentMarker!==void 0&&(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=(Ae=this._currentMarker.notes)!==null&&Ae!==void 0?Ae:"",this.overlayContainer.appendChild(this.notesArea))},We.prototype.hideNotesEditor=function(){this.isNotesAreaOpen&&(this._currentMarker!==void 0&&(this._currentMarker.notes=this.notesArea.value.trim()!==""?this.notesArea.value:void 0),this.overlayContainer.removeChild(this.notesArea),this.notesArea=void 0)},We.prototype.selectLastMarker=function(){this.markers.length>0?this.setCurrentMarker(this.markers[this.markers.length-1]):this.setCurrentMarker()},We.prototype.addUndoStep=function(){var Ae=this;if(this._currentMarker===void 0||this._currentMarker.state!=="edit"){var Se=this.getState(),Be=this.undoRedoManager.getLastUndoStep();if(!Be||Be.width===Se.width&&Be.height===Se.height){var Ke=this.undoRedoManager.undoStepCount;this.undoRedoManager.addUndoStep(Se),Ke<this.undoRedoManager.undoStepCount&&this.eventListeners.statechange.forEach(function(Ne){return Ne(new dt(Ae))})}else this.undoRedoManager.replaceLastUndoStep(Se),this.eventListeners.statechange.forEach(function(Ne){return Ne(new dt(Ae))})}},We.prototype.undo=function(){this.switchToSelectMode(),this.addUndoStep(),this.undoStep()},We.prototype.undoStep=function(){var Ae=this,Se=this.undoRedoManager.undo();Se!==void 0&&(this.restoreState(Se),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Be){return Be(new dt(Ae))}))},We.prototype.redo=function(){this.switchToSelectMode(),this.redoStep()},We.prototype.redoStep=function(){var Ae=this,Se=this.undoRedoManager.redo();Se!==void 0&&(this.restoreState(Se),this.addDefsToImage(),this.selectLastMarker(),this.eventListeners.statechange.forEach(function(Be){return Be(new dt(Ae))}))},We.prototype.stepZoom=function(){var Ae=this.zoomSteps.indexOf(this.zoomLevel);this.zoomLevel=Ae<this.zoomSteps.length-1?this.zoomSteps[Ae+1]:this.zoomSteps[0]},We.prototype.panTo=function(Ae){this.contentDiv.scrollBy({left:this.prevPanPoint.x-Ae.x,top:this.prevPanPoint.y-Ae.y}),this.prevPanPoint=Ae},We.prototype.startRenderAndClose=function(){return Ce(this,void 0,void 0,function(){var Ae,Se,Be=this;return ue(this,function(Ke){switch(Ke.label){case 0:return[4,this.render()];case 1:return Ae=Ke.sent(),Se=this.getState(),this.eventListeners.render.forEach(function(Ne){return Ne(new Mt(Be,Ae,Se))}),this.close(!0),[2]}})})},We.prototype.getState=function(Ae){Ae===!0&&this.setCurrentMarker();var Se={width:this.imageWidth,height:this.imageHeight,markers:[]};return this.markers.forEach(function(Be){return Se.markers.push(Be.getState())}),Se},We.prototype.restoreState=function(Ae){var Se=this;for(this.markers.splice(0);this.markerImage.lastChild;)this.markerImage.removeChild(this.markerImage.lastChild);Ae.markers.forEach(function(Be){var Ke=Se._availableMarkerTypes.find(function(De){return De.typeName===Be.typeName});if(Ke!==void 0){var Ne=Se.addNewMarker(Ke);Ne.restoreState(Be),Se.markers.push(Ne)}}),Ae.width&&Ae.height&&(Ae.width!==this.imageWidth||Ae.height!==this.imageHeight)&&this.scaleMarkers(this.imageWidth/Ae.width,this.imageHeight/Ae.height),this.eventListeners.restorestate.forEach(function(Be){return Be(new dt(Se))})},We.prototype.addNewMarker=function(Ae){var Se=te.createGroup();return this.markerImage.appendChild(Se),new Ae(Se,this.overlayContainer,this.settings)},We.prototype.createNewMarker=function(Ae){var Se,Be=this;(Se=typeof Ae=="string"?this._availableMarkerTypes.find(function(Ke){return Ke.typeName===Ae}):Ae)&&(this.setCurrentMarker(),this.addUndoStep(),this._currentMarker=this.addNewMarker(Se),this._currentMarker.onMarkerCreated=this.markerCreated,this._currentMarker.onColorChanged=this.colorChanged,this._currentMarker.onFillColorChanged=this.fillColorChanged,this._currentMarker.onStateChanged=this.markerStateChanged,this.markerImage.style.cursor="crosshair",this.toolbar.setActiveMarkerButton(Se.typeName),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this.eventListeners.markercreating.forEach(function(Ke){return Ke(new xt(Be,Be._currentMarker))}))},We.prototype.markerCreated=function(Ae){var Se=this;this.mode="select",this.markerImage.style.cursor="default",this.markers.push(Ae),this.setCurrentMarker(Ae),Ae instanceof Xe&&this.settings.newFreehandMarkerOnPointerUp?this.createNewMarker(Xe):this.toolbar.setSelectMode(),this.addUndoStep(),this.eventListeners.markercreate.forEach(function(Be){return Be(new xt(Se,Se._currentMarker))})},We.prototype.colorChanged=function(Ae){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultColor=Ae,this.settings.defaultStrokeColor=Ae)},We.prototype.fillColorChanged=function(Ae){this.settings.defaultColorsFollowCurrentColors&&(this.settings.defaultFillColor=Ae)},We.prototype.markerStateChanged=function(Ae){var Se=this;this.eventListeners.markerchange.forEach(function(Be){return Be(new xt(Se,Ae))})},We.prototype.setCurrentMarker=function(Ae){var Se=this;this._currentMarker!==Ae&&this._currentMarker!==void 0&&(this._currentMarker.deselect(),this.toolbar.setCurrentMarker(),this.toolbox.setPanelButtons([]),this._isResizing||this.eventListeners.markerdeselect.forEach(function(Be){return Be(new xt(Se,Se._currentMarker))})),this._currentMarker=Ae,this._currentMarker===void 0||this._currentMarker.isSelected||(this._currentMarker.state!=="new"&&this._currentMarker.select(),this.toolbar.setCurrentMarker(this._currentMarker),this.toolbox.setPanelButtons(this._currentMarker.toolboxPanels),this._isResizing||this.eventListeners.markerselect.forEach(function(Be){return Be(new xt(Se,Se._currentMarker))}))},We.prototype.onPointerDown=function(Ae){if(this._isFocused||this.focus(),this.touchPoints++,this.touchPoints===1||Ae.pointerType!=="touch")if(this._currentMarker===void 0||this._currentMarker.state!=="new"&&this._currentMarker.state!=="creating"){if(this.mode==="select"){var Se=this.markers.find(function(Be){return Be.ownsTarget(Ae.target)});Se!==void 0?(this.setCurrentMarker(Se),this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ae.clientX,Ae.clientY),Ae.target)):(this.setCurrentMarker(),this.isDragging=!0,this.prevPanPoint={x:Ae.clientX,y:Ae.clientY})}}else this.isDragging=!0,this._currentMarker.pointerDown(this.clientToLocalCoordinates(Ae.clientX,Ae.clientY))},We.prototype.onDblClick=function(Ae){if(this._isFocused||this.focus(),this.mode==="select"){var Se=this.markers.find(function(Be){return Be.ownsTarget(Ae.target)});Se!==void 0&&Se!==this._currentMarker&&this.setCurrentMarker(Se),this._currentMarker!==void 0?this._currentMarker.dblClick(this.clientToLocalCoordinates(Ae.clientX,Ae.clientY),Ae.target):this.setCurrentMarker()}},We.prototype.onPointerMove=function(Ae){this.touchPoints!==1&&Ae.pointerType==="touch"||(this._currentMarker!==void 0||this.isDragging)&&(this._currentMarker!==void 0&&this._currentMarker.state==="edit"||Ae.preventDefault(),this._currentMarker!==void 0?this._currentMarker.manipulate(this.clientToLocalCoordinates(Ae.clientX,Ae.clientY)):this.zoomLevel>1&&this.panTo({x:Ae.clientX,y:Ae.clientY}))},We.prototype.onPointerUp=function(Ae){this.touchPoints>0&&this.touchPoints--,this.touchPoints===0&&this.isDragging&&this._currentMarker!==void 0&&this._currentMarker.pointerUp(this.clientToLocalCoordinates(Ae.clientX,Ae.clientY)),this.isDragging=!1,this.addUndoStep()},We.prototype.onPointerOut=function(){this.touchPoints>0&&this.touchPoints--},We.prototype.onKeyUp=function(Ae){this._currentMarker===void 0||this.notesArea!==void 0||Ae.key!=="Delete"&&Ae.key!=="Backspace"||this.deleteSelectedMarker()},We.prototype.clientToLocalCoordinates=function(Ae,Se){var Be=this.markerImage.getBoundingClientRect();return{x:(Ae-Be.left)/this.zoomLevel,y:(Se-Be.top)/this.zoomLevel}},We.prototype.onWindowResize=function(){this.positionUI()},We.prototype.positionUI=function(){switch(this.setTopLeft(),this.settings.displayMode){case"inline":var Ae=this.target.getClientRects().item(0).y>this.styles.settings.toolbarHeight?this.target.offsetTop-this.styles.settings.toolbarHeight:0;this.coverDiv.style.top=Ae+"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()},We.prototype.addLicenseKey=function(Ae){le.addKey(Ae)},We.prototype.addEventListener=function(Ae,Se){this.eventListeners.addEventListener(Ae,Se)},We.prototype.removeEventListener=function(Ae,Se){this.eventListeners.removeEventListener(Ae,Se)},We.prototype.renderState=function(Ae){this._silentRenderMode=!0,this.settings.displayMode="inline",this.isOpen||this.show(),this.restoreState(Ae),this.startRenderAndClose(),this._silentRenderMode=!1},Object.defineProperty(We.prototype,"isFocused",{get:function(){return this._isFocused},enumerable:!1,configurable:!0}),We.prototype.focus=function(){var Ae=this;this._isFocused||(this.attachWindowEvents(),this._isFocused=!0,this._previousCurrentMarker!==void 0&&this.setCurrentMarker(this._previousCurrentMarker),this.eventListeners.focus.forEach(function(Se){return Se(new dt(Ae))}))},We.prototype.blur=function(){var Ae=this;this._isFocused&&(this.detachWindowEvents(),this._isFocused=!1,this._previousCurrentMarker=this._currentMarker,this.setCurrentMarker(),this.eventListeners.blur.forEach(function(Se){return Se(new dt(Ae))}))},We.instanceCounter=0,We}()},66042:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return Qe}});var ce=be(33885),ie=be(42978),Ce=be(43403),ue=be(34280),se=be(59301),te=se.createContext(null),le=se.createContext({}),ee=te,ne=be(20068),E=be(54476),b=be(92310),z=be.n(b),x=be(77900),re=be(10228),ae=be(26112),oe=be(75931),ve=be(8654),ye=["prefixCls","className","containerRef"],me=function(ot){var He=ot.prefixCls,rt=ot.className,Ye=ot.containerRef,ut=(0,oe.Z)(ot,ye),Ge=se.useContext(le),ze=Ge.panel,Ve=(0,ve.x1)(ze,Ye);return se.createElement("div",(0,E.Z)({className:z()("".concat(He,"-content"),rt),role:"dialog",ref:Ve},(0,ae.Z)(ot,{aria:!0}),{"aria-modal":"true"},ut))},ge=me,_e=be(48736);function he(Xe){return typeof Xe=="string"&&String(Number(Xe))===Xe?((0,_e.ZP)(!1,"Invalid value type of `width` or `height` which should be number type instead."),Number(Xe)):Xe}function pe(Xe){warning(!("wrapperClassName"in Xe),"'wrapperClassName' is removed. Please use 'rootClassName' instead."),warning(canUseDom()||!Xe.open,"Drawer with 'open' in SSR is not work since no place to createPortal. Please move to 'useEffect' instead.")}var ke={width:0,height:0,overflow:"hidden",outline:"none",position:"absolute"};function Te(Xe,ot){var He,rt,Ye,ut=Xe.prefixCls,Ge=Xe.open,ze=Xe.placement,Ve=Xe.inline,$e=Xe.push,nt=Xe.forceRender,et=Xe.autoFocus,pt=Xe.keyboard,ct=Xe.classNames,It=Xe.rootClassName,dt=Xe.rootStyle,Mt=Xe.zIndex,xt=Xe.className,gt=Xe.id,_t=Xe.style,We=Xe.motion,Ae=Xe.width,Se=Xe.height,Be=Xe.children,Ke=Xe.mask,Ne=Xe.maskClosable,De=Xe.maskMotion,we=Xe.maskClassName,Le=Xe.maskStyle,Ue=Xe.afterOpenChange,Me=Xe.onClose,Re=Xe.onMouseEnter,tt=Xe.onMouseOver,lt=Xe.onMouseLeave,Pt=Xe.onClick,Ct=Xe.onKeyDown,vt=Xe.onKeyUp,Ot=Xe.styles,zt=Xe.drawerRender,Ft=se.useRef(),yt=se.useRef(),Xt=se.useRef();se.useImperativeHandle(ot,function(){return Ft.current});var Lt=function(_n){var zn=_n.keyCode,cr=_n.shiftKey;switch(zn){case re.Z.TAB:{if(zn===re.Z.TAB){if(!cr&&document.activeElement===Xt.current){var Dn;(Dn=yt.current)===null||Dn===void 0||Dn.focus({preventScroll:!0})}else if(cr&&document.activeElement===yt.current){var Cn;(Cn=Xt.current)===null||Cn===void 0||Cn.focus({preventScroll:!0})}}break}case re.Z.ESC:{Me&&pt&&(_n.stopPropagation(),Me(_n));break}}};se.useEffect(function(){if(Ge&&et){var Bn;(Bn=Ft.current)===null||Bn===void 0||Bn.focus({preventScroll:!0})}},[Ge]);var Kt=se.useState(!1),sn=(0,ie.Z)(Kt,2),Sn=sn[0],Yt=sn[1],In=se.useContext(ee),Kn;typeof $e=="boolean"?Kn=$e?{}:{distance:0}:Kn=$e||{};var Gn=(He=(rt=(Ye=Kn)===null||Ye===void 0?void 0:Ye.distance)!==null&&rt!==void 0?rt:In==null?void 0:In.pushDistance)!==null&&He!==void 0?He:180,nr=se.useMemo(function(){return{pushDistance:Gn,push:function(){Yt(!0)},pull:function(){Yt(!1)}}},[Gn]);se.useEffect(function(){if(Ge){var Bn;In==null||(Bn=In.push)===null||Bn===void 0||Bn.call(In)}else{var _n;In==null||(_n=In.pull)===null||_n===void 0||_n.call(In)}},[Ge]),se.useEffect(function(){return function(){var Bn;In==null||(Bn=In.pull)===null||Bn===void 0||Bn.call(In)}},[]);var hr=Ke&&se.createElement(x.default,(0,E.Z)({key:"mask"},De,{visible:Ge}),function(Bn,_n){var zn=Bn.className,cr=Bn.style;return se.createElement("div",{className:z()("".concat(ut,"-mask"),zn,ct==null?void 0:ct.mask,we),style:(0,ce.Z)((0,ce.Z)((0,ce.Z)({},cr),Le),Ot==null?void 0:Ot.mask),onClick:Ne&&Ge?Me:void 0,ref:_n})}),ur=typeof We=="function"?We(ze):We,Un={};if(Sn&&Gn)switch(ze){case"top":Un.transform="translateY(".concat(Gn,"px)");break;case"bottom":Un.transform="translateY(".concat(-Gn,"px)");break;case"left":Un.transform="translateX(".concat(Gn,"px)");break;default:Un.transform="translateX(".concat(-Gn,"px)");break}ze==="left"||ze==="right"?Un.width=he(Ae):Un.height=he(Se);var Fn={onMouseEnter:Re,onMouseOver:tt,onMouseLeave:lt,onClick:Pt,onKeyDown:Ct,onKeyUp:vt},or=se.createElement(x.default,(0,E.Z)({key:"panel"},ur,{visible:Ge,forceRender:nt,onVisibleChanged:function(_n){Ue==null||Ue(_n)},removeOnLeave:!1,leavedClassName:"".concat(ut,"-content-wrapper-hidden")}),function(Bn,_n){var zn=Bn.className,cr=Bn.style,Dn=se.createElement(ge,(0,E.Z)({id:gt,containerRef:_n,prefixCls:ut,className:z()(xt,ct==null?void 0:ct.content),style:(0,ce.Z)((0,ce.Z)({},_t),Ot==null?void 0:Ot.content)},(0,ae.Z)(Xe,{aria:!0}),Fn),Be);return se.createElement("div",(0,E.Z)({className:z()("".concat(ut,"-content-wrapper"),ct==null?void 0:ct.wrapper,zn),style:(0,ce.Z)((0,ce.Z)((0,ce.Z)({},Un),cr),Ot==null?void 0:Ot.wrapper)},(0,ae.Z)(Xe,{data:!0})),zt?zt(Dn):Dn)}),Vn=(0,ce.Z)({},dt);return Mt&&(Vn.zIndex=Mt),se.createElement(ee.Provider,{value:nr},se.createElement("div",{className:z()(ut,"".concat(ut,"-").concat(ze),It,(0,ne.Z)((0,ne.Z)({},"".concat(ut,"-open"),Ge),"".concat(ut,"-inline"),Ve)),style:Vn,tabIndex:-1,ref:Ft,onKeyDown:Lt},hr,se.createElement("div",{tabIndex:0,ref:yt,style:ke,"aria-hidden":"true","data-sentinel":"start"}),or,se.createElement("div",{tabIndex:0,ref:Xt,style:ke,"aria-hidden":"true","data-sentinel":"end"})))}var Ee=se.forwardRef(Te),Oe=Ee,je=function(ot){var He=ot.open,rt=He===void 0?!1:He,Ye=ot.prefixCls,ut=Ye===void 0?"rc-drawer":Ye,Ge=ot.placement,ze=Ge===void 0?"right":Ge,Ve=ot.autoFocus,$e=Ve===void 0?!0:Ve,nt=ot.keyboard,et=nt===void 0?!0:nt,pt=ot.width,ct=pt===void 0?378:pt,It=ot.mask,dt=It===void 0?!0:It,Mt=ot.maskClosable,xt=Mt===void 0?!0:Mt,gt=ot.getContainer,_t=ot.forceRender,We=ot.afterOpenChange,Ae=ot.destroyOnClose,Se=ot.onMouseEnter,Be=ot.onMouseOver,Ke=ot.onMouseLeave,Ne=ot.onClick,De=ot.onKeyDown,we=ot.onKeyUp,Le=ot.panelRef,Ue=se.useState(!1),Me=(0,ie.Z)(Ue,2),Re=Me[0],tt=Me[1],lt=se.useState(!1),Pt=(0,ie.Z)(lt,2),Ct=Pt[0],vt=Pt[1];(0,ue.Z)(function(){vt(!0)},[]);var Ot=Ct?rt:!1,zt=se.useRef(),Ft=se.useRef();(0,ue.Z)(function(){Ot&&(Ft.current=document.activeElement)},[Ot]);var yt=function(Sn){var Yt;if(tt(Sn),We==null||We(Sn),!Sn&&Ft.current&&!((Yt=zt.current)!==null&&Yt!==void 0&&Yt.contains(Ft.current))){var In;(In=Ft.current)===null||In===void 0||In.focus({preventScroll:!0})}},Xt=se.useMemo(function(){return{panel:Le}},[Le]);if(!_t&&!Re&&!Ot&&Ae)return null;var Lt={onMouseEnter:Se,onMouseOver:Be,onMouseLeave:Ke,onClick:Ne,onKeyDown:De,onKeyUp:we},Kt=(0,ce.Z)((0,ce.Z)({},ot),{},{open:Ot,prefixCls:ut,placement:ze,autoFocus:$e,keyboard:et,width:ct,mask:dt,maskClosable:xt,inline:gt===!1,afterOpenChange:yt,ref:zt},Lt);return se.createElement(le.Provider,{value:Xt},se.createElement(Ce.Z,{open:Ot||_t||Re,autoDestroy:!1,getContainer:gt,autoLock:dt&&(Ot||Re)},se.createElement(Oe,Kt)))},Pe=je,Qe=Pe},91574:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return Pt}});var ce=be(54476),ie=be(33885),Ce=be(20068),ue=be(42978),se=be(76190),te=be(75931),le=be(92310),ee=be.n(le),ne=/margin|padding|width|height|max|min|offset/,E={left:!0,top:!0},b={cssFloat:1,styleFloat:1,float:1};function z(Ct){return Ct.nodeType===1?Ct.ownerDocument.defaultView.getComputedStyle(Ct,null):{}}function x(Ct,vt,Ot){if(vt=vt.toLowerCase(),Ot==="auto"){if(vt==="height")return Ct.offsetHeight;if(vt==="width")return Ct.offsetWidth}return vt in E||(E[vt]=ne.test(vt)),E[vt]?parseFloat(Ot)||0:Ot}function re(Ct,vt){var Ot=arguments.length,zt=z(Ct);return vt=b[vt]?"cssFloat"in Ct.style?"cssFloat":"styleFloat":vt,Ot===1?zt:x(Ct,vt,zt[vt]||Ct.style[vt])}function ae(Ct,vt,Ot){var zt=arguments.length;if(vt=b[vt]?"cssFloat"in Ct.style?"cssFloat":"styleFloat":vt,zt===3)return typeof Ot=="number"&&ne.test(vt)&&(Ot="".concat(Ot,"px")),Ct.style[vt]=Ot,Ot;for(var Ft in vt)vt.hasOwnProperty(Ft)&&ae(Ct,Ft,vt[Ft]);return z(Ct)}function oe(Ct){return Ct===document.body?document.documentElement.clientWidth:Ct.offsetWidth}function ve(Ct){return Ct===document.body?window.innerHeight||document.documentElement.clientHeight:Ct.offsetHeight}function ye(){var Ct=Math.max(document.documentElement.scrollWidth,document.body.scrollWidth),vt=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);return{width:Ct,height:vt}}function me(){var Ct=document.documentElement.clientWidth,vt=window.innerHeight||document.documentElement.clientHeight;return{width:Ct,height:vt}}function ge(){return{scrollLeft:Math.max(document.documentElement.scrollLeft,document.body.scrollLeft),scrollTop:Math.max(document.documentElement.scrollTop,document.body.scrollTop)}}function _e(Ct){var vt=Ct.getBoundingClientRect(),Ot=document.documentElement;return{left:vt.left+(window.pageXOffset||Ot.scrollLeft)-(Ot.clientLeft||document.body.clientLeft||0),top:vt.top+(window.pageYOffset||Ot.scrollTop)-(Ot.clientTop||document.body.clientTop||0)}}var he=be(18929),pe=be(59301),ke=be(55311),Te=be(8224),Ee=be(10228),Oe=be(43403),je=be(77900),Pe=pe.createContext(null),Qe=function(vt){var Ot=vt.visible,zt=vt.maskTransitionName,Ft=vt.getContainer,yt=vt.prefixCls,Xt=vt.rootClassName,Lt=vt.icons,Kt=vt.countRender,sn=vt.showSwitch,Sn=vt.showProgress,Yt=vt.current,In=vt.transform,Kn=vt.count,Gn=vt.scale,nr=vt.minScale,hr=vt.maxScale,ur=vt.closeIcon,Un=vt.onActive,Fn=vt.onClose,or=vt.onZoomIn,Vn=vt.onZoomOut,Bn=vt.onRotateRight,_n=vt.onRotateLeft,zn=vt.onFlipX,cr=vt.onFlipY,Dn=vt.onReset,Cn=vt.toolbarRender,er=vt.zIndex,$t=vt.image,Ie=(0,pe.useContext)(Pe),Ze=Lt.rotateLeft,qe=Lt.rotateRight,st=Lt.zoomIn,mt=Lt.zoomOut,Nt=Lt.close,kt=Lt.left,Bt=Lt.right,Jt=Lt.flipX,En=Lt.flipY,qn="".concat(yt,"-operations-operation");pe.useEffect(function(){var Gt=function(wn){wn.keyCode===Ee.Z.ESC&&Fn()};return Ot&&window.addEventListener("keydown",Gt),function(){window.removeEventListener("keydown",Gt)}},[Ot]);var At=function(Vt,wn){Vt.preventDefault(),Vt.stopPropagation(),Un(wn)},St=pe.useCallback(function(Gt){var Vt=Gt.type,wn=Gt.disabled,jn=Gt.onClick,Wn=Gt.icon;return pe.createElement("div",{key:Vt,className:ee()(qn,"".concat(yt,"-operations-operation-").concat(Vt),(0,Ce.Z)({},"".concat(yt,"-operations-operation-disabled"),!!wn)),onClick:jn},Wn)},[qn,yt]),an=sn?St({icon:kt,onClick:function(Vt){return At(Vt,-1)},type:"prev",disabled:Yt===0}):void 0,Ht=sn?St({icon:Bt,onClick:function(Vt){return At(Vt,1)},type:"next",disabled:Yt===Kn-1}):void 0,Et=St({icon:En,onClick:cr,type:"flipY"}),Ut=St({icon:Jt,onClick:zn,type:"flipX"}),nn=St({icon:Ze,onClick:_n,type:"rotateLeft"}),rn=St({icon:qe,onClick:Bn,type:"rotateRight"}),gn=St({icon:mt,onClick:Vn,type:"zoomOut",disabled:Gn<=nr}),bn=St({icon:st,onClick:or,type:"zoomIn",disabled:Gn===hr}),An=pe.createElement("div",{className:"".concat(yt,"-operations")},Et,Ut,nn,rn,gn,bn);return pe.createElement(je.default,{visible:Ot,motionName:zt},function(Gt){var Vt=Gt.className,wn=Gt.style;return pe.createElement(Oe.Z,{open:!0,getContainer:Ft!=null?Ft:document.body},pe.createElement("div",{className:ee()("".concat(yt,"-operations-wrapper"),Vt,Xt),style:(0,ie.Z)((0,ie.Z)({},wn),{},{zIndex:er})},ur===null?null:pe.createElement("button",{className:"".concat(yt,"-close"),onClick:Fn},ur||Nt),sn&&pe.createElement(pe.Fragment,null,pe.createElement("div",{className:ee()("".concat(yt,"-switch-left"),(0,Ce.Z)({},"".concat(yt,"-switch-left-disabled"),Yt===0)),onClick:function(Wn){return At(Wn,-1)}},kt),pe.createElement("div",{className:ee()("".concat(yt,"-switch-right"),(0,Ce.Z)({},"".concat(yt,"-switch-right-disabled"),Yt===Kn-1)),onClick:function(Wn){return At(Wn,1)}},Bt)),pe.createElement("div",{className:"".concat(yt,"-footer")},Sn&&pe.createElement("div",{className:"".concat(yt,"-progress")},Kt?Kt(Yt+1,Kn):"".concat(Yt+1," / ").concat(Kn)),Cn?Cn(An,(0,ie.Z)((0,ie.Z)({icons:{prevIcon:an,nextIcon:Ht,flipYIcon:Et,flipXIcon:Ut,rotateLeftIcon:nn,rotateRightIcon:rn,zoomOutIcon:gn,zoomInIcon:bn},actions:{onActive:Un,onFlipY:cr,onFlipX:zn,onRotateLeft:_n,onRotateRight:Bn,onZoomOut:Vn,onZoomIn:or,onReset:Dn,onClose:Fn},transform:In},Ie?{current:Yt,total:Kn}:{}),{},{image:$t})):An)))})},Xe=Qe,ot=be(13697),He=be(16089),rt={x:0,y:0,rotate:0,scale:1,flipX:!1,flipY:!1};function Ye(Ct,vt,Ot,zt){var Ft=(0,pe.useRef)(null),yt=(0,pe.useRef)([]),Xt=(0,pe.useState)(rt),Lt=(0,ue.Z)(Xt,2),Kt=Lt[0],sn=Lt[1],Sn=function(Gn){sn(rt),(0,ot.Z)(rt,Kt)||zt==null||zt({transform:rt,action:Gn})},Yt=function(Gn,nr){Ft.current===null&&(yt.current=[],Ft.current=(0,He.Z)(function(){sn(function(hr){var ur=hr;return yt.current.forEach(function(Un){ur=(0,ie.Z)((0,ie.Z)({},ur),Un)}),Ft.current=null,zt==null||zt({transform:ur,action:nr}),ur})})),yt.current.push((0,ie.Z)((0,ie.Z)({},Kt),Gn))},In=function(Gn,nr,hr,ur,Un){var Fn=Ct.current,or=Fn.width,Vn=Fn.height,Bn=Fn.offsetWidth,_n=Fn.offsetHeight,zn=Fn.offsetLeft,cr=Fn.offsetTop,Dn=Gn,Cn=Kt.scale*Gn;Cn>Ot?(Cn=Ot,Dn=Ot/Kt.scale):Cn<vt&&(Cn=Un?Cn:vt,Dn=Cn/Kt.scale);var er=hr!=null?hr:innerWidth/2,$t=ur!=null?ur:innerHeight/2,Ie=Dn-1,Ze=Ie*or*.5,qe=Ie*Vn*.5,st=Ie*(er-Kt.x-zn),mt=Ie*($t-Kt.y-cr),Nt=Kt.x-(st-Ze),kt=Kt.y-(mt-qe);if(Gn<1&&Cn===1){var Bt=Bn*Cn,Jt=_n*Cn,En=me(),qn=En.width,At=En.height;Bt<=qn&&Jt<=At&&(Nt=0,kt=0)}Yt({x:Nt,y:kt,scale:Cn},nr)};return{transform:Kt,resetTransform:Sn,updateTransform:Yt,dispatchZoomChange:In}}var ut=be(48736);function Ge(Ct,vt,Ot,zt){var Ft=vt+Ot,yt=(Ot-zt)/2;if(Ot>zt){if(vt>0)return(0,Ce.Z)({},Ct,yt);if(vt<0&&Ft<zt)return(0,Ce.Z)({},Ct,-yt)}else if(vt<0||Ft>zt)return(0,Ce.Z)({},Ct,vt<0?yt:-yt);return{}}function ze(Ct,vt,Ot,zt){var Ft=me(),yt=Ft.width,Xt=Ft.height,Lt=null;return Ct<=yt&&vt<=Xt?Lt={x:0,y:0}:(Ct>yt||vt>Xt)&&(Lt=(0,ie.Z)((0,ie.Z)({},Ge("x",Ot,Ct,yt)),Ge("y",zt,vt,Xt))),Lt}var Ve=1,$e=1;function nt(Ct,vt,Ot,zt,Ft,yt,Xt){var Lt=Ft.rotate,Kt=Ft.scale,sn=Ft.x,Sn=Ft.y,Yt=(0,pe.useState)(!1),In=(0,ue.Z)(Yt,2),Kn=In[0],Gn=In[1],nr=(0,pe.useRef)({diffX:0,diffY:0,transformX:0,transformY:0}),hr=function(Vn){!vt||Vn.button!==0||(Vn.preventDefault(),Vn.stopPropagation(),nr.current={diffX:Vn.pageX-sn,diffY:Vn.pageY-Sn,transformX:sn,transformY:Sn},Gn(!0))},ur=function(Vn){Ot&&Kn&&yt({x:Vn.pageX-nr.current.diffX,y:Vn.pageY-nr.current.diffY},"move")},Un=function(){if(Ot&&Kn){Gn(!1);var Vn=nr.current,Bn=Vn.transformX,_n=Vn.transformY,zn=sn!==Bn&&Sn!==_n;if(!zn)return;var cr=Ct.current.offsetWidth*Kt,Dn=Ct.current.offsetHeight*Kt,Cn=Ct.current.getBoundingClientRect(),er=Cn.left,$t=Cn.top,Ie=Lt%180!==0,Ze=ze(Ie?Dn:cr,Ie?cr:Dn,er,$t);Ze&&yt((0,ie.Z)({},Ze),"dragRebound")}},Fn=function(Vn){if(!(!Ot||Vn.deltaY==0)){var Bn=Math.abs(Vn.deltaY/100),_n=Math.min(Bn,$e),zn=Ve+_n*zt;Vn.deltaY>0&&(zn=Ve/zn),Xt(zn,"wheel",Vn.clientX,Vn.clientY)}};return(0,pe.useEffect)(function(){var or,Vn,Bn,_n;if(vt){Bn=(0,Te.Z)(window,"mouseup",Un,!1),_n=(0,Te.Z)(window,"mousemove",ur,!1);try{window.top!==window.self&&(or=(0,Te.Z)(window.top,"mouseup",Un,!1),Vn=(0,Te.Z)(window.top,"mousemove",ur,!1))}catch(zn){(0,ut.Kp)(!1,"[rc-image] ".concat(zn))}}return function(){var zn,cr,Dn,Cn;(zn=Bn)===null||zn===void 0||zn.remove(),(cr=_n)===null||cr===void 0||cr.remove(),(Dn=or)===null||Dn===void 0||Dn.remove(),(Cn=Vn)===null||Cn===void 0||Cn.remove()}},[Ot,Kn,sn,Sn,Lt,vt]),{isMoving:Kn,onMouseDown:hr,onMouseMove:ur,onMouseUp:Un,onWheel:Fn}}function et(Ct){return new Promise(function(vt){if(!Ct){vt(!1);return}var Ot=document.createElement("img");Ot.onerror=function(){return vt(!1)},Ot.onload=function(){return vt(!0)},Ot.src=Ct})}function pt(Ct){var vt=Ct.src,Ot=Ct.isCustomPlaceholder,zt=Ct.fallback,Ft=(0,pe.useState)(Ot?"loading":"normal"),yt=(0,ue.Z)(Ft,2),Xt=yt[0],Lt=yt[1],Kt=(0,pe.useRef)(!1),sn=Xt==="error";(0,pe.useEffect)(function(){var Kn=!0;return et(vt).then(function(Gn){!Gn&&Kn&&Lt("error")}),function(){Kn=!1}},[vt]),(0,pe.useEffect)(function(){Ot&&!Kt.current?Lt("loading"):sn&&Lt("normal")},[vt]);var Sn=function(){Lt("normal")},Yt=function(Gn){Kt.current=!1,Xt==="loading"&&Gn!==null&&Gn!==void 0&&Gn.complete&&(Gn.naturalWidth||Gn.naturalHeight)&&(Kt.current=!0,Sn())},In=sn&&zt?{src:zt}:{onLoad:Sn,src:vt};return[Yt,In,Xt]}function ct(Ct,vt){var Ot=Ct.x-vt.x,zt=Ct.y-vt.y;return Math.hypot(Ot,zt)}function It(Ct,vt,Ot,zt){var Ft=ct(Ct,Ot),yt=ct(vt,zt);if(Ft===0&&yt===0)return[Ct.x,Ct.y];var Xt=Ft/(Ft+yt),Lt=Ct.x+Xt*(vt.x-Ct.x),Kt=Ct.y+Xt*(vt.y-Ct.y);return[Lt,Kt]}function dt(Ct,vt,Ot,zt,Ft,yt,Xt){var Lt=Ft.rotate,Kt=Ft.scale,sn=Ft.x,Sn=Ft.y,Yt=(0,pe.useState)(!1),In=(0,ue.Z)(Yt,2),Kn=In[0],Gn=In[1],nr=(0,pe.useRef)({point1:{x:0,y:0},point2:{x:0,y:0},eventType:"none"}),hr=function(Vn){nr.current=(0,ie.Z)((0,ie.Z)({},nr.current),Vn)},ur=function(Vn){if(vt){Vn.stopPropagation(),Gn(!0);var Bn=Vn.touches,_n=Bn===void 0?[]:Bn;_n.length>1?hr({point1:{x:_n[0].clientX,y:_n[0].clientY},point2:{x:_n[1].clientX,y:_n[1].clientY},eventType:"touchZoom"}):hr({point1:{x:_n[0].clientX-sn,y:_n[0].clientY-Sn},eventType:"move"})}},Un=function(Vn){var Bn=Vn.touches,_n=Bn===void 0?[]:Bn,zn=nr.current,cr=zn.point1,Dn=zn.point2,Cn=zn.eventType;if(_n.length>1&&Cn==="touchZoom"){var er={x:_n[0].clientX,y:_n[0].clientY},$t={x:_n[1].clientX,y:_n[1].clientY},Ie=It(cr,Dn,er,$t),Ze=(0,ue.Z)(Ie,2),qe=Ze[0],st=Ze[1],mt=ct(er,$t)/ct(cr,Dn);Xt(mt,"touchZoom",qe,st,!0),hr({point1:er,point2:$t,eventType:"touchZoom"})}else Cn==="move"&&(yt({x:_n[0].clientX-cr.x,y:_n[0].clientY-cr.y},"move"),hr({eventType:"move"}))},Fn=function(){if(Ot){if(Kn&&Gn(!1),hr({eventType:"none"}),zt>Kt)return yt({x:0,y:0,scale:zt},"touchZoom");var Vn=Ct.current.offsetWidth*Kt,Bn=Ct.current.offsetHeight*Kt,_n=Ct.current.getBoundingClientRect(),zn=_n.left,cr=_n.top,Dn=Lt%180!==0,Cn=ze(Dn?Bn:Vn,Dn?Vn:Bn,zn,cr);Cn&&yt((0,ie.Z)({},Cn),"dragRebound")}};return(0,pe.useEffect)(function(){var or;return Ot&&vt&&(or=(0,Te.Z)(window,"touchmove",function(Vn){return Vn.preventDefault()},{passive:!1})),function(){var Vn;(Vn=or)===null||Vn===void 0||Vn.remove()}},[Ot,vt]),{isTouching:Kn,onTouchStart:ur,onTouchMove:Un,onTouchEnd:Fn}}var Mt=["fallback","src","imgRef"],xt=["prefixCls","src","alt","imageInfo","fallback","movable","onClose","visible","icons","rootClassName","closeIcon","getContainer","current","count","countRender","scaleStep","minScale","maxScale","transitionName","maskTransitionName","imageRender","imgCommonProps","toolbarRender","onTransform","onChange"],gt=function(vt){var Ot=vt.fallback,zt=vt.src,Ft=vt.imgRef,yt=(0,te.Z)(vt,Mt),Xt=pt({src:zt,fallback:Ot}),Lt=(0,ue.Z)(Xt,2),Kt=Lt[0],sn=Lt[1];return pe.createElement("img",(0,ce.Z)({ref:function(Yt){Ft.current=Yt,Kt(Yt)}},yt,sn))},_t=function(vt){var Ot=vt.prefixCls,zt=vt.src,Ft=vt.alt,yt=vt.imageInfo,Xt=vt.fallback,Lt=vt.movable,Kt=Lt===void 0?!0:Lt,sn=vt.onClose,Sn=vt.visible,Yt=vt.icons,In=Yt===void 0?{}:Yt,Kn=vt.rootClassName,Gn=vt.closeIcon,nr=vt.getContainer,hr=vt.current,ur=hr===void 0?0:hr,Un=vt.count,Fn=Un===void 0?1:Un,or=vt.countRender,Vn=vt.scaleStep,Bn=Vn===void 0?.5:Vn,_n=vt.minScale,zn=_n===void 0?1:_n,cr=vt.maxScale,Dn=cr===void 0?50:cr,Cn=vt.transitionName,er=Cn===void 0?"zoom":Cn,$t=vt.maskTransitionName,Ie=$t===void 0?"fade":$t,Ze=vt.imageRender,qe=vt.imgCommonProps,st=vt.toolbarRender,mt=vt.onTransform,Nt=vt.onChange,kt=(0,te.Z)(vt,xt),Bt=(0,pe.useRef)(),Jt=(0,pe.useContext)(Pe),En=Jt&&Fn>1,qn=Jt&&Fn>=1,At=(0,pe.useState)(!0),St=(0,ue.Z)(At,2),an=St[0],Ht=St[1],Et=Ye(Bt,zn,Dn,mt),Ut=Et.transform,nn=Et.resetTransform,rn=Et.updateTransform,gn=Et.dispatchZoomChange,bn=nt(Bt,Kt,Sn,Bn,Ut,rn,gn),An=bn.isMoving,Gt=bn.onMouseDown,Vt=bn.onWheel,wn=dt(Bt,Kt,Sn,zn,Ut,rn,gn),jn=wn.isTouching,Wn=wn.onTouchStart,$n=wn.onTouchMove,kr=wn.onTouchEnd,Sr=Ut.rotate,Yr=Ut.scale,_r=ee()((0,Ce.Z)({},"".concat(Ot,"-moving"),An));(0,pe.useEffect)(function(){an||Ht(!0)},[an]);var Ur=function(){nn("close")},wr=function(){gn(Ve+Bn,"zoomIn")},Dr=function(){gn(Ve/(Ve+Bn),"zoomOut")},Hr=function(){rn({rotate:Sr+90},"rotateRight")},Qr=function(){rn({rotate:Sr-90},"rotateLeft")},pi=function(){rn({flipX:!Ut.flipX},"flipX")},_i=function(){rn({flipY:!Ut.flipY},"flipY")},Si=function(){nn("reset")},oi=function($r){var qr=ur+$r;!Number.isInteger(qr)||qr<0||qr>Fn-1||(Ht(!1),nn($r<0?"prev":"next"),Nt==null||Nt(qr,ur))},Mi=function($r){!Sn||!En||($r.keyCode===Ee.Z.LEFT?oi(-1):$r.keyCode===Ee.Z.RIGHT&&oi(1))},Li=function($r){Sn&&(Yr!==1?rn({x:0,y:0,scale:1},"doubleClick"):gn(Ve+Bn,"doubleClick",$r.clientX,$r.clientY))};(0,pe.useEffect)(function(){var Ar=(0,Te.Z)(window,"keydown",Mi,!1);return function(){Ar.remove()}},[Sn,En,ur]);var rr=pe.createElement(gt,(0,ce.Z)({},qe,{width:vt.width,height:vt.height,imgRef:Bt,className:"".concat(Ot,"-img"),alt:Ft,style:{transform:"translate3d(".concat(Ut.x,"px, ").concat(Ut.y,"px, 0) scale3d(").concat(Ut.flipX?"-":"").concat(Yr,", ").concat(Ut.flipY?"-":"").concat(Yr,", 1) rotate(").concat(Sr,"deg)"),transitionDuration:(!an||jn)&&"0s"},fallback:Xt,src:zt,onWheel:Vt,onMouseDown:Gt,onDoubleClick:Li,onTouchStart:Wn,onTouchMove:$n,onTouchEnd:kr,onTouchCancel:kr})),Cr=(0,ie.Z)({url:zt,alt:Ft},yt);return pe.createElement(pe.Fragment,null,pe.createElement(ke.Z,(0,ce.Z)({transitionName:er,maskTransitionName:Ie,closable:!1,keyboard:!0,prefixCls:Ot,onClose:sn,visible:Sn,classNames:{wrapper:_r},rootClassName:Kn,getContainer:nr},kt,{afterClose:Ur}),pe.createElement("div",{className:"".concat(Ot,"-img-wrapper")},Ze?Ze(rr,(0,ie.Z)({transform:Ut,image:Cr},Jt?{current:ur}:{})):rr)),pe.createElement(Xe,{visible:Sn,transform:Ut,maskTransitionName:Ie,closeIcon:Gn,getContainer:nr,prefixCls:Ot,rootClassName:Kn,icons:In,countRender:or,showSwitch:En,showProgress:qn,current:ur,count:Fn,scale:Yr,minScale:zn,maxScale:Dn,toolbarRender:st,onActive:oi,onZoomIn:wr,onZoomOut:Dr,onRotateRight:Hr,onRotateLeft:Qr,onFlipX:pi,onFlipY:_i,onClose:sn,onReset:Si,zIndex:kt.zIndex!==void 0?kt.zIndex+1:void 0,image:Cr}))},We=_t,Ae=be(94480),Se=["crossOrigin","decoding","draggable","loading","referrerPolicy","sizes","srcSet","useMap","alt"];function Be(Ct){var vt=pe.useState({}),Ot=(0,ue.Z)(vt,2),zt=Ot[0],Ft=Ot[1],yt=pe.useCallback(function(Lt,Kt){return Ft(function(sn){return(0,ie.Z)((0,ie.Z)({},sn),{},(0,Ce.Z)({},Lt,Kt))}),function(){Ft(function(sn){var Sn=(0,ie.Z)({},sn);return delete Sn[Lt],Sn})}},[]),Xt=pe.useMemo(function(){return Ct?Ct.map(function(Lt){if(typeof Lt=="string")return{data:{src:Lt}};var Kt={};return Object.keys(Lt).forEach(function(sn){["src"].concat((0,Ae.Z)(Se)).includes(sn)&&(Kt[sn]=Lt[sn])}),{data:Kt}}):Object.keys(zt).reduce(function(Lt,Kt){var sn=zt[Kt],Sn=sn.canPreview,Yt=sn.data;return Sn&&Lt.push({data:Yt,id:Kt}),Lt},[])},[Ct,zt]);return[Xt,yt,!!Ct]}var Ke=["visible","onVisibleChange","getContainer","current","movable","minScale","maxScale","countRender","closeIcon","onChange","onTransform","toolbarRender","imageRender"],Ne=["src"],De=function(vt){var Ot,zt=vt.previewPrefixCls,Ft=zt===void 0?"rc-image-preview":zt,yt=vt.children,Xt=vt.icons,Lt=Xt===void 0?{}:Xt,Kt=vt.items,sn=vt.preview,Sn=vt.fallback,Yt=(0,se.Z)(sn)==="object"?sn:{},In=Yt.visible,Kn=Yt.onVisibleChange,Gn=Yt.getContainer,nr=Yt.current,hr=Yt.movable,ur=Yt.minScale,Un=Yt.maxScale,Fn=Yt.countRender,or=Yt.closeIcon,Vn=Yt.onChange,Bn=Yt.onTransform,_n=Yt.toolbarRender,zn=Yt.imageRender,cr=(0,te.Z)(Yt,Ke),Dn=Be(Kt),Cn=(0,ue.Z)(Dn,3),er=Cn[0],$t=Cn[1],Ie=Cn[2],Ze=(0,he.Z)(0,{value:nr}),qe=(0,ue.Z)(Ze,2),st=qe[0],mt=qe[1],Nt=(0,pe.useState)(!1),kt=(0,ue.Z)(Nt,2),Bt=kt[0],Jt=kt[1],En=((Ot=er[st])===null||Ot===void 0?void 0:Ot.data)||{},qn=En.src,At=(0,te.Z)(En,Ne),St=(0,he.Z)(!!In,{value:In,onChange:function(jn,Wn){Kn==null||Kn(jn,Wn,st)}}),an=(0,ue.Z)(St,2),Ht=an[0],Et=an[1],Ut=(0,pe.useState)(null),nn=(0,ue.Z)(Ut,2),rn=nn[0],gn=nn[1],bn=pe.useCallback(function(wn,jn,Wn,$n){var kr=Ie?er.findIndex(function(Sr){return Sr.data.src===jn}):er.findIndex(function(Sr){return Sr.id===wn});mt(kr<0?0:kr),Et(!0),gn({x:Wn,y:$n}),Jt(!0)},[er,Ie]);pe.useEffect(function(){Ht?Bt||mt(0):Jt(!1)},[Ht]);var An=function(jn,Wn){mt(jn),Vn==null||Vn(jn,Wn)},Gt=function(){Et(!1),gn(null)},Vt=pe.useMemo(function(){return{register:$t,onPreview:bn}},[$t,bn]);return pe.createElement(Pe.Provider,{value:Vt},yt,pe.createElement(We,(0,ce.Z)({"aria-hidden":!Ht,movable:hr,visible:Ht,prefixCls:Ft,closeIcon:or,onClose:Gt,mousePosition:rn,imgCommonProps:At,src:qn,fallback:Sn,icons:Lt,minScale:ur,maxScale:Un,getContainer:Gn,current:st,count:er.length,countRender:Fn,onTransform:Bn,toolbarRender:_n,imageRender:zn,onChange:An},cr)))},we=De,Le=0;function Ue(Ct,vt){var Ot=pe.useState(function(){return Le+=1,String(Le)}),zt=(0,ue.Z)(Ot,1),Ft=zt[0],yt=pe.useContext(Pe),Xt={data:vt,canPreview:Ct};return pe.useEffect(function(){if(yt)return yt.register(Ft,Xt)},[]),pe.useEffect(function(){yt&&yt.register(Ft,Xt)},[Ct,vt]),Ft}var Me=["src","alt","onPreviewClose","prefixCls","previewPrefixCls","placeholder","fallback","width","height","style","preview","className","onClick","onError","wrapperClassName","wrapperStyle","rootClassName"],Re=["src","visible","onVisibleChange","getContainer","mask","maskClassName","movable","icons","scaleStep","minScale","maxScale","imageRender","toolbarRender"],tt=function(vt){var Ot=vt.src,zt=vt.alt,Ft=vt.onPreviewClose,yt=vt.prefixCls,Xt=yt===void 0?"rc-image":yt,Lt=vt.previewPrefixCls,Kt=Lt===void 0?"".concat(Xt,"-preview"):Lt,sn=vt.placeholder,Sn=vt.fallback,Yt=vt.width,In=vt.height,Kn=vt.style,Gn=vt.preview,nr=Gn===void 0?!0:Gn,hr=vt.className,ur=vt.onClick,Un=vt.onError,Fn=vt.wrapperClassName,or=vt.wrapperStyle,Vn=vt.rootClassName,Bn=(0,te.Z)(vt,Me),_n=sn&&sn!==!0,zn=(0,se.Z)(nr)==="object"?nr:{},cr=zn.src,Dn=zn.visible,Cn=Dn===void 0?void 0:Dn,er=zn.onVisibleChange,$t=er===void 0?Ft:er,Ie=zn.getContainer,Ze=Ie===void 0?void 0:Ie,qe=zn.mask,st=zn.maskClassName,mt=zn.movable,Nt=zn.icons,kt=zn.scaleStep,Bt=zn.minScale,Jt=zn.maxScale,En=zn.imageRender,qn=zn.toolbarRender,At=(0,te.Z)(zn,Re),St=cr!=null?cr:Ot,an=(0,he.Z)(!!Cn,{value:Cn,onChange:$t}),Ht=(0,ue.Z)(an,2),Et=Ht[0],Ut=Ht[1],nn=pt({src:Ot,isCustomPlaceholder:_n,fallback:Sn}),rn=(0,ue.Z)(nn,3),gn=rn[0],bn=rn[1],An=rn[2],Gt=(0,pe.useState)(null),Vt=(0,ue.Z)(Gt,2),wn=Vt[0],jn=Vt[1],Wn=(0,pe.useContext)(Pe),$n=!!nr,kr=function(){Ut(!1),jn(null)},Sr=ee()(Xt,Fn,Vn,(0,Ce.Z)({},"".concat(Xt,"-error"),An==="error")),Yr=(0,pe.useMemo)(function(){var Dr={};return Se.forEach(function(Hr){vt[Hr]!==void 0&&(Dr[Hr]=vt[Hr])}),Dr},Se.map(function(Dr){return vt[Dr]})),_r=(0,pe.useMemo)(function(){return(0,ie.Z)((0,ie.Z)({},Yr),{},{src:St})},[St,Yr]),Ur=Ue($n,_r),wr=function(Hr){var Qr=_e(Hr.target),pi=Qr.left,_i=Qr.top;Wn?Wn.onPreview(Ur,St,pi,_i):(jn({x:pi,y:_i}),Ut(!0)),ur==null||ur(Hr)};return pe.createElement(pe.Fragment,null,pe.createElement("div",(0,ce.Z)({},Bn,{className:Sr,onClick:$n?wr:ur,style:(0,ie.Z)({width:Yt,height:In},or)}),pe.createElement("img",(0,ce.Z)({},Yr,{className:ee()("".concat(Xt,"-img"),(0,Ce.Z)({},"".concat(Xt,"-img-placeholder"),sn===!0),hr),style:(0,ie.Z)({height:In},Kn),ref:gn},bn,{width:Yt,height:In,onError:Un})),An==="loading"&&pe.createElement("div",{"aria-hidden":"true",className:"".concat(Xt,"-placeholder")},sn),qe&&$n&&pe.createElement("div",{className:ee()("".concat(Xt,"-mask"),st),style:{display:(Kn==null?void 0:Kn.display)==="none"?"none":void 0}},qe)),!Wn&&$n&&pe.createElement(We,(0,ce.Z)({"aria-hidden":!Et,visible:Et,prefixCls:Kt,onClose:kr,mousePosition:wn,src:St,alt:zt,imageInfo:{width:Yt,height:In},fallback:Sn,getContainer:Ze,icons:Nt,movable:mt,scaleStep:kt,minScale:Bt,maxScale:Jt,rootClassName:Vn,imageRender:En,imgCommonProps:Yr,toolbarRender:qn},At)))};tt.PreviewGroup=we;var lt=tt,Pt=lt},23425:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ke}});var ce=be(20068),ie=be(54476),Ce=be(76190),ue=be(33885),se=be(42978),te=be(92310),le=be.n(te),ee=be(18929),ne=be(10228),E=be(26112),b=be(48736),z=be(59301),x=be(17119),re=[10,20,50,100],ae=function(Ee){var Oe=Ee.pageSizeOptions,je=Oe===void 0?re:Oe,Pe=Ee.locale,Qe=Ee.changeSize,Xe=Ee.pageSize,ot=Ee.goButton,He=Ee.quickGo,rt=Ee.rootPrefixCls,Ye=Ee.disabled,ut=Ee.buildOptionText,Ge=Ee.showSizeChanger,ze=Ee.sizeChangerRender,Ve=z.useState(""),$e=(0,se.Z)(Ve,2),nt=$e[0],et=$e[1],pt=function(){return!nt||Number.isNaN(nt)?void 0:Number(nt)},ct=typeof ut=="function"?ut:function(Se){return"".concat(Se," ").concat(Pe.items_per_page)},It=function(Be){et(Be.target.value)},dt=function(Be){ot||nt===""||(et(""),!(Be.relatedTarget&&(Be.relatedTarget.className.indexOf("".concat(rt,"-item-link"))>=0||Be.relatedTarget.className.indexOf("".concat(rt,"-item"))>=0))&&(He==null||He(pt())))},Mt=function(Be){nt!==""&&(Be.keyCode===ne.Z.ENTER||Be.type==="click")&&(et(""),He==null||He(pt()))},xt=function(){return je.some(function(Be){return Be.toString()===Xe.toString()})?je:je.concat([Xe]).sort(function(Be,Ke){var Ne=Number.isNaN(Number(Be))?0:Number(Be),De=Number.isNaN(Number(Ke))?0:Number(Ke);return Ne-De})},gt="".concat(rt,"-options");if(!Ge&&!He)return null;var _t=null,We=null,Ae=null;return Ge&&ze&&(_t=ze({disabled:Ye,size:Xe,onSizeChange:function(Be){Qe==null||Qe(Number(Be))},"aria-label":Pe.page_size,className:"".concat(gt,"-size-changer"),options:xt().map(function(Se){return{label:ct(Se),value:Se}})})),He&&(ot&&(Ae=typeof ot=="boolean"?z.createElement("button",{type:"button",onClick:Mt,onKeyUp:Mt,disabled:Ye,className:"".concat(gt,"-quick-jumper-button")},Pe.jump_to_confirm):z.createElement("span",{onClick:Mt,onKeyUp:Mt},ot)),We=z.createElement("div",{className:"".concat(gt,"-quick-jumper")},Pe.jump_to,z.createElement("input",{disabled:Ye,type:"text",value:nt,onChange:It,onKeyUp:Mt,onBlur:dt,"aria-label":Pe.page}),Pe.page,Ae)),z.createElement("li",{className:gt},_t,We)},oe=ae,ve=function(Ee){var Oe=Ee.rootPrefixCls,je=Ee.page,Pe=Ee.active,Qe=Ee.className,Xe=Ee.showTitle,ot=Ee.onClick,He=Ee.onKeyPress,rt=Ee.itemRender,Ye="".concat(Oe,"-item"),ut=le()(Ye,"".concat(Ye,"-").concat(je),(0,ce.Z)((0,ce.Z)({},"".concat(Ye,"-active"),Pe),"".concat(Ye,"-disabled"),!je),Qe),Ge=function(){ot(je)},ze=function(nt){He(nt,ot,je)},Ve=rt(je,"page",z.createElement("a",{rel:"nofollow"},je));return Ve?z.createElement("li",{title:Xe?String(je):null,className:ut,onClick:Ge,onKeyDown:ze,tabIndex:0},Ve):null},ye=ve,me=function(Ee,Oe,je){return je};function ge(){}function _e(Te){var Ee=Number(Te);return typeof Ee=="number"&&!Number.isNaN(Ee)&&isFinite(Ee)&&Math.floor(Ee)===Ee}function he(Te,Ee,Oe){var je=typeof Te=="undefined"?Ee:Te;return Math.floor((Oe-1)/je)+1}var pe=function(Ee){var Oe=Ee.prefixCls,je=Oe===void 0?"rc-pagination":Oe,Pe=Ee.selectPrefixCls,Qe=Pe===void 0?"rc-select":Pe,Xe=Ee.className,ot=Ee.current,He=Ee.defaultCurrent,rt=He===void 0?1:He,Ye=Ee.total,ut=Ye===void 0?0:Ye,Ge=Ee.pageSize,ze=Ee.defaultPageSize,Ve=ze===void 0?10:ze,$e=Ee.onChange,nt=$e===void 0?ge:$e,et=Ee.hideOnSinglePage,pt=Ee.align,ct=Ee.showPrevNextJumpers,It=ct===void 0?!0:ct,dt=Ee.showQuickJumper,Mt=Ee.showLessItems,xt=Ee.showTitle,gt=xt===void 0?!0:xt,_t=Ee.onShowSizeChange,We=_t===void 0?ge:_t,Ae=Ee.locale,Se=Ae===void 0?x.Z:Ae,Be=Ee.style,Ke=Ee.totalBoundaryShowSizeChanger,Ne=Ke===void 0?50:Ke,De=Ee.disabled,we=Ee.simple,Le=Ee.showTotal,Ue=Ee.showSizeChanger,Me=Ue===void 0?ut>Ne:Ue,Re=Ee.sizeChangerRender,tt=Ee.pageSizeOptions,lt=Ee.itemRender,Pt=lt===void 0?me:lt,Ct=Ee.jumpPrevIcon,vt=Ee.jumpNextIcon,Ot=Ee.prevIcon,zt=Ee.nextIcon,Ft=z.useRef(null),yt=(0,ee.Z)(10,{value:Ge,defaultValue:Ve}),Xt=(0,se.Z)(yt,2),Lt=Xt[0],Kt=Xt[1],sn=(0,ee.Z)(1,{value:ot,defaultValue:rt,postState:function(Cr){return Math.max(1,Math.min(Cr,he(void 0,Lt,ut)))}}),Sn=(0,se.Z)(sn,2),Yt=Sn[0],In=Sn[1],Kn=z.useState(Yt),Gn=(0,se.Z)(Kn,2),nr=Gn[0],hr=Gn[1];(0,z.useEffect)(function(){hr(Yt)},[Yt]);var ur=nt!==ge,Un="current"in Ee,Fn=Math.max(1,Yt-(Mt?3:5)),or=Math.min(he(void 0,Lt,ut),Yt+(Mt?3:5));function Vn(rr,Cr){var Ar=rr||z.createElement("button",{type:"button","aria-label":Cr,className:"".concat(je,"-item-link")});return typeof rr=="function"&&(Ar=z.createElement(rr,(0,ue.Z)({},Ee))),Ar}function Bn(rr){var Cr=rr.target.value,Ar=he(void 0,Lt,ut),$r;return Cr===""?$r=Cr:Number.isNaN(Number(Cr))?$r=nr:Cr>=Ar?$r=Ar:$r=Number(Cr),$r}function _n(rr){return _e(rr)&&rr!==Yt&&_e(ut)&&ut>0}var zn=ut>Lt?dt:!1;function cr(rr){(rr.keyCode===ne.Z.UP||rr.keyCode===ne.Z.DOWN)&&rr.preventDefault()}function Dn(rr){var Cr=Bn(rr);switch(Cr!==nr&&hr(Cr),rr.keyCode){case ne.Z.ENTER:$t(Cr);break;case ne.Z.UP:$t(Cr-1);break;case ne.Z.DOWN:$t(Cr+1);break;default:break}}function Cn(rr){$t(Bn(rr))}function er(rr){var Cr=he(rr,Lt,ut),Ar=Yt>Cr&&Cr!==0?Cr:Yt;Kt(rr),hr(Ar),We==null||We(Yt,rr),In(Ar),nt==null||nt(Ar,rr)}function $t(rr){if(_n(rr)&&!De){var Cr=he(void 0,Lt,ut),Ar=rr;return rr>Cr?Ar=Cr:rr<1&&(Ar=1),Ar!==nr&&hr(Ar),In(Ar),nt==null||nt(Ar,Lt),Ar}return Yt}var Ie=Yt>1,Ze=Yt<he(void 0,Lt,ut);function qe(){Ie&&$t(Yt-1)}function st(){Ze&&$t(Yt+1)}function mt(){$t(Fn)}function Nt(){$t(or)}function kt(rr,Cr){if(rr.key==="Enter"||rr.charCode===ne.Z.ENTER||rr.keyCode===ne.Z.ENTER){for(var Ar=arguments.length,$r=new Array(Ar>2?Ar-2:0),qr=2;qr<Ar;qr++)$r[qr-2]=arguments[qr];Cr.apply(void 0,$r)}}function Bt(rr){kt(rr,qe)}function Jt(rr){kt(rr,st)}function En(rr){kt(rr,mt)}function qn(rr){kt(rr,Nt)}function At(rr){var Cr=Pt(rr,"prev",Vn(Ot,"prev page"));return z.isValidElement(Cr)?z.cloneElement(Cr,{disabled:!Ie}):Cr}function St(rr){var Cr=Pt(rr,"next",Vn(zt,"next page"));return z.isValidElement(Cr)?z.cloneElement(Cr,{disabled:!Ze}):Cr}function an(rr){(rr.type==="click"||rr.keyCode===ne.Z.ENTER)&&$t(nr)}var Ht=null,Et=(0,E.Z)(Ee,{aria:!0,data:!0}),Ut=Le&&z.createElement("li",{className:"".concat(je,"-total-text")},Le(ut,[ut===0?0:(Yt-1)*Lt+1,Yt*Lt>ut?ut:Yt*Lt])),nn=null,rn=he(void 0,Lt,ut);if(et&&ut<=Lt)return null;var gn=[],bn={rootPrefixCls:je,onClick:$t,onKeyPress:kt,showTitle:gt,itemRender:Pt,page:-1},An=Yt-1>0?Yt-1:0,Gt=Yt+1<rn?Yt+1:rn,Vt=dt&&dt.goButton,wn=(0,Ce.Z)(we)==="object"?we.readOnly:!we,jn=Vt,Wn=null;we&&(Vt&&(typeof Vt=="boolean"?jn=z.createElement("button",{type:"button",onClick:an,onKeyUp:an},Se.jump_to_confirm):jn=z.createElement("span",{onClick:an,onKeyUp:an},Vt),jn=z.createElement("li",{title:gt?"".concat(Se.jump_to).concat(Yt,"/").concat(rn):null,className:"".concat(je,"-simple-pager")},jn)),Wn=z.createElement("li",{title:gt?"".concat(Yt,"/").concat(rn):null,className:"".concat(je,"-simple-pager")},wn?nr:z.createElement("input",{type:"text","aria-label":Se.jump_to,value:nr,disabled:De,onKeyDown:cr,onKeyUp:Dn,onChange:Dn,onBlur:Cn,size:3}),z.createElement("span",{className:"".concat(je,"-slash")},"/"),rn));var $n=Mt?1:2;if(rn<=3+$n*2){rn||gn.push(z.createElement(ye,(0,ie.Z)({},bn,{key:"noPager",page:1,className:"".concat(je,"-item-disabled")})));for(var kr=1;kr<=rn;kr+=1)gn.push(z.createElement(ye,(0,ie.Z)({},bn,{key:kr,page:kr,active:Yt===kr})))}else{var Sr=Mt?Se.prev_3:Se.prev_5,Yr=Mt?Se.next_3:Se.next_5,_r=Pt(Fn,"jump-prev",Vn(Ct,"prev page")),Ur=Pt(or,"jump-next",Vn(vt,"next page"));It&&(Ht=_r?z.createElement("li",{title:gt?Sr:null,key:"prev",onClick:mt,tabIndex:0,onKeyDown:En,className:le()("".concat(je,"-jump-prev"),(0,ce.Z)({},"".concat(je,"-jump-prev-custom-icon"),!!Ct))},_r):null,nn=Ur?z.createElement("li",{title:gt?Yr:null,key:"next",onClick:Nt,tabIndex:0,onKeyDown:qn,className:le()("".concat(je,"-jump-next"),(0,ce.Z)({},"".concat(je,"-jump-next-custom-icon"),!!vt))},Ur):null);var wr=Math.max(1,Yt-$n),Dr=Math.min(Yt+$n,rn);Yt-1<=$n&&(Dr=1+$n*2),rn-Yt<=$n&&(wr=rn-$n*2);for(var Hr=wr;Hr<=Dr;Hr+=1)gn.push(z.createElement(ye,(0,ie.Z)({},bn,{key:Hr,page:Hr,active:Yt===Hr})));if(Yt-1>=$n*2&&Yt!==3&&(gn[0]=z.cloneElement(gn[0],{className:le()("".concat(je,"-item-after-jump-prev"),gn[0].props.className)}),gn.unshift(Ht)),rn-Yt>=$n*2&&Yt!==rn-2){var Qr=gn[gn.length-1];gn[gn.length-1]=z.cloneElement(Qr,{className:le()("".concat(je,"-item-before-jump-next"),Qr.props.className)}),gn.push(nn)}wr!==1&&gn.unshift(z.createElement(ye,(0,ie.Z)({},bn,{key:1,page:1}))),Dr!==rn&&gn.push(z.createElement(ye,(0,ie.Z)({},bn,{key:rn,page:rn})))}var pi=At(An);if(pi){var _i=!Ie||!rn;pi=z.createElement("li",{title:gt?Se.prev_page:null,onClick:qe,tabIndex:_i?null:0,onKeyDown:Bt,className:le()("".concat(je,"-prev"),(0,ce.Z)({},"".concat(je,"-disabled"),_i)),"aria-disabled":_i},pi)}var Si=St(Gt);if(Si){var oi,Mi;we?(oi=!Ze,Mi=Ie?0:null):(oi=!Ze||!rn,Mi=oi?null:0),Si=z.createElement("li",{title:gt?Se.next_page:null,onClick:st,tabIndex:Mi,onKeyDown:Jt,className:le()("".concat(je,"-next"),(0,ce.Z)({},"".concat(je,"-disabled"),oi)),"aria-disabled":oi},Si)}var Li=le()(je,Xe,(0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)((0,ce.Z)({},"".concat(je,"-start"),pt==="start"),"".concat(je,"-center"),pt==="center"),"".concat(je,"-end"),pt==="end"),"".concat(je,"-simple"),we),"".concat(je,"-disabled"),De));return z.createElement("ul",(0,ie.Z)({className:Li,style:Be,ref:Ft},Et),Ut,pi,we?Wn:gn,Si,z.createElement(oe,{locale:Se,rootPrefixCls:je,disabled:De,selectPrefixCls:Qe,changeSize:er,pageSize:Lt,pageSizeOptions:tt,quickGo:zn?$t:null,goButton:jn,showSizeChanger:Me,sizeChangerRender:Re}))},ke=pe},6551:function(qt,Dt,be){"use strict";be.d(Dt,{ZP:function(){return le}});var ce=be(42978),ie=be(59301),Ce=be(47273),ue=0,se=(0,Ce.Z)();function te(){var ee;return se?(ee=ue,ue+=1):ee="TEST_OR_SSR",ee}function le(ee){var ne=ie.useState(),E=(0,ce.Z)(ne,2),b=E[0],z=E[1];return ie.useEffect(function(){z("rc_select_".concat(te()))},[]),ee||b}},37463:function(qt,Dt,be){"use strict";be.d(Dt,{Ac:function(){return yt},Xo:function(){return Lt},Wx:function(){return sn},ZP:function(){return qn},lk:function(){return ge}});var ce=be(54476),ie=be(94480),Ce=be(20068),ue=be(33885),se=be(42978),te=be(75931),le=be(76190),ee=be(18929),ne=be(48736),E=be(59301),b=be(92310),z=be.n(b),x=be(34280),re=be(49658),ae=be(8654),oe=function(St){var an=St.className,Ht=St.customizeIcon,Et=St.customizeIconProps,Ut=St.children,nn=St.onMouseDown,rn=St.onClick,gn=typeof Ht=="function"?Ht(Et):Ht;return E.createElement("span",{className:an,onMouseDown:function(An){An.preventDefault(),nn==null||nn(An)},style:{userSelect:"none",WebkitUserSelect:"none"},unselectable:"on",onClick:rn,"aria-hidden":!0},gn!==void 0?gn:E.createElement("span",{className:z()(an.split(/\s+/).map(function(bn){return"".concat(bn,"-icon")}))},Ut))},ve=oe,ye=function(St,an,Ht,Et,Ut){var nn=arguments.length>5&&arguments[5]!==void 0?arguments[5]:!1,rn=arguments.length>6?arguments[6]:void 0,gn=arguments.length>7?arguments[7]:void 0,bn=E.useMemo(function(){if((0,le.Z)(Et)==="object")return Et.clearIcon;if(Ut)return Ut},[Et,Ut]),An=E.useMemo(function(){return!!(!nn&&Et&&(Ht.length||rn)&&!(gn==="combobox"&&rn===""))},[Et,nn,Ht.length,rn,gn]);return{allowClear:An,clearIcon:E.createElement(ve,{className:"".concat(St,"-clear"),onMouseDown:an,customizeIcon:bn},"\xD7")}},me=E.createContext(null);function ge(){return E.useContext(me)}function _e(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:10,St=E.useState(!1),an=(0,se.Z)(St,2),Ht=an[0],Et=an[1],Ut=E.useRef(null),nn=function(){window.clearTimeout(Ut.current)};E.useEffect(function(){return nn},[]);var rn=function(bn,An){nn(),Ut.current=window.setTimeout(function(){Et(bn),An&&An()},At)};return[Ht,rn,nn]}function he(){var At=arguments.length>0&&arguments[0]!==void 0?arguments[0]:250,St=E.useRef(null),an=E.useRef(null);E.useEffect(function(){return function(){window.clearTimeout(an.current)}},[]);function Ht(Et){(Et||St.current===null)&&(St.current=Et),window.clearTimeout(an.current),an.current=window.setTimeout(function(){St.current=null},At)}return[function(){return St.current},Ht]}function pe(At,St,an,Ht){var Et=E.useRef(null);Et.current={open:St,triggerOpen:an,customizedTrigger:Ht},E.useEffect(function(){function Ut(nn){var rn;if(!((rn=Et.current)!==null&&rn!==void 0&&rn.customizedTrigger)){var gn=nn.target;gn.shadowRoot&&nn.composed&&(gn=nn.composedPath()[0]||gn),Et.current.open&&At().filter(function(bn){return bn}).every(function(bn){return!bn.contains(gn)&&bn!==gn})&&Et.current.triggerOpen(!1)}}return window.addEventListener("mousedown",Ut),function(){return window.removeEventListener("mousedown",Ut)}},[])}var ke=be(10228);function Te(At){return At&&![ke.Z.ESC,ke.Z.SHIFT,ke.Z.BACKSPACE,ke.Z.TAB,ke.Z.WIN_KEY,ke.Z.ALT,ke.Z.META,ke.Z.WIN_KEY_RIGHT,ke.Z.CTRL,ke.Z.SEMICOLON,ke.Z.EQUALS,ke.Z.CAPS_LOCK,ke.Z.CONTEXT_MENU,ke.Z.F1,ke.Z.F2,ke.Z.F3,ke.Z.F4,ke.Z.F5,ke.Z.F6,ke.Z.F7,ke.Z.F8,ke.Z.F9,ke.Z.F10,ke.Z.F11,ke.Z.F12].includes(At)}var Ee=be(26112),Oe=be(11780);function je(At,St,an){var Ht=(0,ue.Z)((0,ue.Z)({},At),an?St:{});return Object.keys(St).forEach(function(Et){var Ut=St[Et];typeof Ut=="function"&&(Ht[Et]=function(){for(var nn,rn=arguments.length,gn=new Array(rn),bn=0;bn<rn;bn++)gn[bn]=arguments[bn];return Ut.apply(void 0,gn),(nn=At[Et])===null||nn===void 0?void 0:nn.call.apply(nn,[At].concat(gn))})}),Ht}var Pe=je,Qe=["prefixCls","id","inputElement","autoFocus","autoComplete","editable","activeDescendantId","value","open","attrs"],Xe=function(St,an){var Ht=St.prefixCls,Et=St.id,Ut=St.inputElement,nn=St.autoFocus,rn=St.autoComplete,gn=St.editable,bn=St.activeDescendantId,An=St.value,Gt=St.open,Vt=St.attrs,wn=(0,te.Z)(St,Qe),jn=Ut||E.createElement("input",null),Wn=jn,$n=Wn.ref,kr=Wn.props;return(0,ne.Kp)(!("maxLength"in jn.props),"Passing 'maxLength' to input element directly may not work because input in BaseSelect is controlled."),jn=E.cloneElement(jn,(0,ue.Z)((0,ue.Z)((0,ue.Z)({type:"search"},Pe(wn,kr,!0)),{},{id:Et,ref:(0,ae.sQ)(an,$n),autoComplete:rn||"off",autoFocus:nn,className:z()("".concat(Ht,"-selection-search-input"),kr==null?void 0:kr.className),role:"combobox","aria-expanded":Gt||!1,"aria-haspopup":"listbox","aria-owns":"".concat(Et,"_list"),"aria-autocomplete":"list","aria-controls":"".concat(Et,"_list"),"aria-activedescendant":Gt?bn:void 0},Vt),{},{value:gn?An:"",readOnly:!gn,unselectable:gn?null:"on",style:(0,ue.Z)((0,ue.Z)({},kr.style),{},{opacity:gn?null:0})})),jn},ot=E.forwardRef(Xe),He=ot;function rt(At){return Array.isArray(At)?At:At!==void 0?[At]:[]}var Ye=typeof window!="undefined"&&window.document&&window.document.documentElement,ut=Ye;function Ge(At){return At!=null}function ze(At){return!At&&At!==0}function Ve(At){return["string","number"].includes((0,le.Z)(At))}function $e(At){var St=void 0;return At&&(Ve(At.title)?St=At.title.toString():Ve(At.label)&&(St=At.label.toString())),St}function nt(At,St){ut?E.useLayoutEffect(At,St):E.useEffect(At,St)}function et(At){var St;return(St=At.key)!==null&&St!==void 0?St:At.value}var pt=function(St){St.preventDefault(),St.stopPropagation()},ct=function(St){var an=St.id,Ht=St.prefixCls,Et=St.values,Ut=St.open,nn=St.searchValue,rn=St.autoClearSearchValue,gn=St.inputRef,bn=St.placeholder,An=St.disabled,Gt=St.mode,Vt=St.showSearch,wn=St.autoFocus,jn=St.autoComplete,Wn=St.activeDescendantId,$n=St.tabIndex,kr=St.removeIcon,Sr=St.maxTagCount,Yr=St.maxTagTextLength,_r=St.maxTagPlaceholder,Ur=_r===void 0?function(dn){return"+ ".concat(dn.length," ...")}:_r,wr=St.tagRender,Dr=St.onToggleOpen,Hr=St.onRemove,Qr=St.onInputChange,pi=St.onInputPaste,_i=St.onInputKeyDown,Si=St.onInputMouseDown,oi=St.onInputCompositionStart,Mi=St.onInputCompositionEnd,Li=St.onInputBlur,rr=E.useRef(null),Cr=(0,E.useState)(0),Ar=(0,se.Z)(Cr,2),$r=Ar[0],qr=Ar[1],wi=(0,E.useState)(!1),Hi=(0,se.Z)(wi,2),Tt=Hi[0],tn=Hi[1],Zt="".concat(Ht,"-selection"),Qt=Ut||Gt==="multiple"&&rn===!1||Gt==="tags"?nn:"",cn=Gt==="tags"||Gt==="multiple"&&rn===!1||Vt&&(Ut||Tt);nt(function(){qr(rr.current.scrollWidth)},[Qt]);var hn=function(un,mn,Hn,vn,fn){return E.createElement("span",{title:$e(un),className:z()("".concat(Zt,"-item"),(0,Ce.Z)({},"".concat(Zt,"-item-disabled"),Hn))},E.createElement("span",{className:"".concat(Zt,"-item-content")},mn),vn&&E.createElement(ve,{className:"".concat(Zt,"-item-remove"),onMouseDown:pt,onClick:fn,customizeIcon:kr},"\xD7"))},Nn=function(un,mn,Hn,vn,fn,Mn){var Rn=function(fr){pt(fr),Dr(!Ut)};return E.createElement("span",{onMouseDown:Rn},wr({label:mn,value:un,disabled:Hn,closable:vn,onClose:fn,isMaxTag:!!Mn}))},kn=function(un){var mn=un.disabled,Hn=un.label,vn=un.value,fn=!An&&!mn,Mn=Hn;if(typeof Yr=="number"&&(typeof Hn=="string"||typeof Hn=="number")){var Rn=String(Mn);Rn.length>Yr&&(Mn="".concat(Rn.slice(0,Yr),"..."))}var Yn=function(ir){ir&&ir.stopPropagation(),Hr(un)};return typeof wr=="function"?Nn(vn,Mn,mn,fn,Yn):hn(un,Mn,mn,fn,Yn)},yn=function(un){if(!Et.length)return null;var mn=typeof Ur=="function"?Ur(un):Ur;return typeof wr=="function"?Nn(void 0,mn,!1,!1,void 0,!0):hn({title:mn},mn,!1)},Wt=E.createElement("div",{className:"".concat(Zt,"-search"),style:{width:$r},onFocus:function(){tn(!0)},onBlur:function(){tn(!1)}},E.createElement(He,{ref:gn,open:Ut,prefixCls:Ht,id:an,inputElement:null,disabled:An,autoFocus:wn,autoComplete:jn,editable:cn,activeDescendantId:Wn,value:Qt,onKeyDown:_i,onMouseDown:Si,onChange:Qr,onPaste:pi,onCompositionStart:oi,onCompositionEnd:Mi,onBlur:Li,tabIndex:$n,attrs:(0,Ee.Z)(St,!0)}),E.createElement("span",{ref:rr,className:"".concat(Zt,"-search-mirror"),"aria-hidden":!0},Qt,"\xA0")),ln=E.createElement(Oe.Z,{prefixCls:"".concat(Zt,"-overflow"),data:Et,renderItem:kn,renderRest:yn,suffix:Wt,itemKey:et,maxCount:Sr});return E.createElement("span",{className:"".concat(Zt,"-wrap")},ln,!Et.length&&!Qt&&E.createElement("span",{className:"".concat(Zt,"-placeholder")},bn))},It=ct,dt=function(St){var an=St.inputElement,Ht=St.prefixCls,Et=St.id,Ut=St.inputRef,nn=St.disabled,rn=St.autoFocus,gn=St.autoComplete,bn=St.activeDescendantId,An=St.mode,Gt=St.open,Vt=St.values,wn=St.placeholder,jn=St.tabIndex,Wn=St.showSearch,$n=St.searchValue,kr=St.activeValue,Sr=St.maxLength,Yr=St.onInputKeyDown,_r=St.onInputMouseDown,Ur=St.onInputChange,wr=St.onInputPaste,Dr=St.onInputCompositionStart,Hr=St.onInputCompositionEnd,Qr=St.onInputBlur,pi=St.title,_i=E.useState(!1),Si=(0,se.Z)(_i,2),oi=Si[0],Mi=Si[1],Li=An==="combobox",rr=Li||Wn,Cr=Vt[0],Ar=$n||"";Li&&kr&&!oi&&(Ar=kr),E.useEffect(function(){Li&&Mi(!1)},[Li,kr]);var $r=An!=="combobox"&&!Gt&&!Wn?!1:!!Ar,qr=pi===void 0?$e(Cr):pi,wi=E.useMemo(function(){return Cr?null:E.createElement("span",{className:"".concat(Ht,"-selection-placeholder"),style:$r?{visibility:"hidden"}:void 0},wn)},[Cr,$r,wn,Ht]);return E.createElement("span",{className:"".concat(Ht,"-selection-wrap")},E.createElement("span",{className:"".concat(Ht,"-selection-search")},E.createElement(He,{ref:Ut,prefixCls:Ht,id:Et,open:Gt,inputElement:an,disabled:nn,autoFocus:rn,autoComplete:gn,editable:rr,activeDescendantId:bn,value:Ar,onKeyDown:Yr,onMouseDown:_r,onChange:function(Tt){Mi(!0),Ur(Tt)},onPaste:wr,onCompositionStart:Dr,onCompositionEnd:Hr,onBlur:Qr,tabIndex:jn,attrs:(0,Ee.Z)(St,!0),maxLength:Li?Sr:void 0})),!Li&&Cr?E.createElement("span",{className:"".concat(Ht,"-selection-item"),title:qr,style:$r?{visibility:"hidden"}:void 0},Cr.label):null,wi)},Mt=dt,xt=function(St,an){var Ht=(0,E.useRef)(null),Et=(0,E.useRef)(!1),Ut=St.prefixCls,nn=St.open,rn=St.mode,gn=St.showSearch,bn=St.tokenWithEnter,An=St.disabled,Gt=St.prefix,Vt=St.autoClearSearchValue,wn=St.onSearch,jn=St.onSearchSubmit,Wn=St.onToggleOpen,$n=St.onInputKeyDown,kr=St.onInputBlur,Sr=St.domRef;E.useImperativeHandle(an,function(){return{focus:function(qr){Ht.current.focus(qr)},blur:function(){Ht.current.blur()}}});var Yr=he(0),_r=(0,se.Z)(Yr,2),Ur=_r[0],wr=_r[1],Dr=function(qr){var wi=qr.which,Hi=Ht.current instanceof HTMLTextAreaElement;!Hi&&nn&&(wi===ke.Z.UP||wi===ke.Z.DOWN)&&qr.preventDefault(),$n&&$n(qr),wi===ke.Z.ENTER&&rn==="tags"&&!Et.current&&!nn&&(jn==null||jn(qr.target.value)),!(Hi&&!nn&&~[ke.Z.UP,ke.Z.DOWN,ke.Z.LEFT,ke.Z.RIGHT].indexOf(wi))&&Te(wi)&&Wn(!0)},Hr=function(){wr(!0)},Qr=(0,E.useRef)(null),pi=function(qr){wn(qr,!0,Et.current)!==!1&&Wn(!0)},_i=function(){Et.current=!0},Si=function(qr){Et.current=!1,rn!=="combobox"&&pi(qr.target.value)},oi=function(qr){var wi=qr.target.value;if(bn&&Qr.current&&/[\r\n]/.test(Qr.current)){var Hi=Qr.current.replace(/[\r\n]+$/,"").replace(/\r\n/g," ").replace(/[\r\n]/g," ");wi=wi.replace(Hi,Qr.current)}Qr.current=null,pi(wi)},Mi=function(qr){var wi=qr.clipboardData,Hi=wi==null?void 0:wi.getData("text");Qr.current=Hi||""},Li=function(qr){var wi=qr.target;if(wi!==Ht.current){var Hi=document.body.style.msTouchAction!==void 0;Hi?setTimeout(function(){Ht.current.focus()}):Ht.current.focus()}},rr=function(qr){var wi=Ur();qr.target!==Ht.current&&!wi&&!(rn==="combobox"&&An)&&qr.preventDefault(),(rn!=="combobox"&&(!gn||!wi)||!nn)&&(nn&&Vt!==!1&&wn("",!0,!1),Wn())},Cr={inputRef:Ht,onInputKeyDown:Dr,onInputMouseDown:Hr,onInputChange:oi,onInputPaste:Mi,onInputCompositionStart:_i,onInputCompositionEnd:Si,onInputBlur:kr},Ar=rn==="multiple"||rn==="tags"?E.createElement(It,(0,ce.Z)({},St,Cr)):E.createElement(Mt,(0,ce.Z)({},St,Cr));return E.createElement("div",{ref:Sr,className:"".concat(Ut,"-selector"),onClick:Li,onMouseDown:rr},Gt&&E.createElement("div",{className:"".concat(Ut,"-prefix")},Gt),Ar)},gt=E.forwardRef(xt),_t=gt,We=be(65030),Ae=["prefixCls","disabled","visible","children","popupElement","animation","transitionName","dropdownStyle","dropdownClassName","direction","placement","builtinPlacements","dropdownMatchSelectWidth","dropdownRender","dropdownAlign","getPopupContainer","empty","getTriggerDOMNode","onPopupVisibleChange","onPopupMouseEnter"],Se=function(St){var an=St===!0?0:1;return{bottomLeft:{points:["tl","bl"],offset:[0,4],overflow:{adjustX:an,adjustY:1},htmlRegion:"scroll"},bottomRight:{points:["tr","br"],offset:[0,4],overflow:{adjustX:an,adjustY:1},htmlRegion:"scroll"},topLeft:{points:["bl","tl"],offset:[0,-4],overflow:{adjustX:an,adjustY:1},htmlRegion:"scroll"},topRight:{points:["br","tr"],offset:[0,-4],overflow:{adjustX:an,adjustY:1},htmlRegion:"scroll"}}},Be=function(St,an){var Ht=St.prefixCls,Et=St.disabled,Ut=St.visible,nn=St.children,rn=St.popupElement,gn=St.animation,bn=St.transitionName,An=St.dropdownStyle,Gt=St.dropdownClassName,Vt=St.direction,wn=Vt===void 0?"ltr":Vt,jn=St.placement,Wn=St.builtinPlacements,$n=St.dropdownMatchSelectWidth,kr=St.dropdownRender,Sr=St.dropdownAlign,Yr=St.getPopupContainer,_r=St.empty,Ur=St.getTriggerDOMNode,wr=St.onPopupVisibleChange,Dr=St.onPopupMouseEnter,Hr=(0,te.Z)(St,Ae),Qr="".concat(Ht,"-dropdown"),pi=rn;kr&&(pi=kr(rn));var _i=E.useMemo(function(){return Wn||Se($n)},[Wn,$n]),Si=gn?"".concat(Qr,"-").concat(gn):bn,oi=typeof $n=="number",Mi=E.useMemo(function(){return oi?null:$n===!1?"minWidth":"width"},[$n,oi]),Li=An;oi&&(Li=(0,ue.Z)((0,ue.Z)({},Li),{},{width:$n}));var rr=E.useRef(null);return E.useImperativeHandle(an,function(){return{getPopupElement:function(){var Ar;return(Ar=rr.current)===null||Ar===void 0?void 0:Ar.popupElement}}}),E.createElement(We.Z,(0,ce.Z)({},Hr,{showAction:wr?["click"]:[],hideAction:wr?["click"]:[],popupPlacement:jn||(wn==="rtl"?"bottomRight":"bottomLeft"),builtinPlacements:_i,prefixCls:Qr,popupTransitionName:Si,popup:E.createElement("div",{onMouseEnter:Dr},pi),ref:rr,stretch:Mi,popupAlign:Sr,popupVisible:Ut,getPopupContainer:Yr,popupClassName:z()(Gt,(0,Ce.Z)({},"".concat(Qr,"-empty"),_r)),popupStyle:Li,getTriggerDOMNode:Ur,onPopupVisibleChange:wr}),nn)},Ke=E.forwardRef(Be),Ne=Ke,De=be(66712);function we(At,St){var an=At.key,Ht;return"value"in At&&(Ht=At.value),an!=null?an:Ht!==void 0?Ht:"rc-index-key-".concat(St)}function Le(At){return typeof At!="undefined"&&!Number.isNaN(At)}function Ue(At,St){var an=At||{},Ht=an.label,Et=an.value,Ut=an.options,nn=an.groupLabel,rn=Ht||(St?"children":"label");return{label:rn,value:Et||"value",options:Ut||"options",groupLabel:nn||rn}}function Me(At){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},an=St.fieldNames,Ht=St.childrenAsData,Et=[],Ut=Ue(an,!1),nn=Ut.label,rn=Ut.value,gn=Ut.options,bn=Ut.groupLabel;function An(Gt,Vt){Array.isArray(Gt)&&Gt.forEach(function(wn){if(Vt||!(gn in wn)){var jn=wn[rn];Et.push({key:we(wn,Et.length),groupOption:Vt,data:wn,label:wn[nn],value:jn})}else{var Wn=wn[bn];Wn===void 0&&Ht&&(Wn=wn.label),Et.push({key:we(wn,Et.length),group:!0,data:wn,label:Wn}),An(wn[gn],!0)}})}return An(At,!1),Et}function Re(At){var St=(0,ue.Z)({},At);return"props"in St||Object.defineProperty(St,"props",{get:function(){return(0,ne.ZP)(!1,"Return type is option instead of Option instance. Please read value directly instead of reading from `props`."),St}}),St}var tt=function(St,an,Ht){if(!an||!an.length)return null;var Et=!1,Ut=function rn(gn,bn){var An=(0,De.Z)(bn),Gt=An[0],Vt=An.slice(1);if(!Gt)return[gn];var wn=gn.split(Gt);return Et=Et||wn.length>1,wn.reduce(function(jn,Wn){return[].concat((0,ie.Z)(jn),(0,ie.Z)(rn(Wn,Vt)))},[]).filter(Boolean)},nn=Ut(St,an);return Et?typeof Ht!="undefined"?nn.slice(0,Ht):nn:null},lt=E.createContext(null),Pt=lt;function Ct(At){var St=At.visible,an=At.values;if(!St)return null;var Ht=50;return E.createElement("span",{"aria-live":"polite",style:{width:0,height:0,position:"absolute",overflow:"hidden",opacity:0}},"".concat(an.slice(0,Ht).map(function(Et){var Ut=Et.label,nn=Et.value;return["number","string"].includes((0,le.Z)(Ut))?Ut:nn}).join(", ")),an.length>Ht?", ...":null)}var vt=["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"],Ot=["value","onChange","removeIcon","placeholder","autoFocus","maxTagCount","maxTagTextLength","maxTagPlaceholder","choiceTransitionName","onInputKeyDown","onPopupScroll","tabIndex"],zt=function(St){return St==="tags"||St==="multiple"},Ft=E.forwardRef(function(At,St){var an,Ht=At.id,Et=At.prefixCls,Ut=At.className,nn=At.showSearch,rn=At.tagRender,gn=At.direction,bn=At.omitDomProps,An=At.displayValues,Gt=At.onDisplayValuesChange,Vt=At.emptyOptions,wn=At.notFoundContent,jn=wn===void 0?"Not Found":wn,Wn=At.onClear,$n=At.mode,kr=At.disabled,Sr=At.loading,Yr=At.getInputElement,_r=At.getRawInputElement,Ur=At.open,wr=At.defaultOpen,Dr=At.onDropdownVisibleChange,Hr=At.activeValue,Qr=At.onActiveValueChange,pi=At.activeDescendantId,_i=At.searchValue,Si=At.autoClearSearchValue,oi=At.onSearch,Mi=At.onSearchSplit,Li=At.tokenSeparators,rr=At.allowClear,Cr=At.prefix,Ar=At.suffixIcon,$r=At.clearIcon,qr=At.OptionList,wi=At.animation,Hi=At.transitionName,Tt=At.dropdownStyle,tn=At.dropdownClassName,Zt=At.dropdownMatchSelectWidth,Qt=At.dropdownRender,cn=At.dropdownAlign,hn=At.placement,Nn=At.builtinPlacements,kn=At.getPopupContainer,yn=At.showAction,Wt=yn===void 0?[]:yn,ln=At.onFocus,dn=At.onBlur,un=At.onKeyUp,mn=At.onKeyDown,Hn=At.onMouseDown,vn=(0,te.Z)(At,vt),fn=zt($n),Mn=(nn!==void 0?nn:fn)||$n==="combobox",Rn=(0,ue.Z)({},vn);Ot.forEach(function(vi){delete Rn[vi]}),bn==null||bn.forEach(function(vi){delete Rn[vi]});var Yn=E.useState(!1),fr=(0,se.Z)(Yn,2),ir=fr[0],Ir=fr[1];E.useEffect(function(){Ir((0,re.Z)())},[]);var br=E.useRef(null),Mr=E.useRef(null),Wr=E.useRef(null),Pr=E.useRef(null),li=E.useRef(null),zr=E.useRef(!1),Xr=_e(),Tr=(0,se.Z)(Xr,3),ar=Tr[0],dr=Tr[1],Nr=Tr[2];E.useImperativeHandle(St,function(){var vi,ai;return{focus:(vi=Pr.current)===null||vi===void 0?void 0:vi.focus,blur:(ai=Pr.current)===null||ai===void 0?void 0:ai.blur,scrollTo:function(Ji){var io;return(io=li.current)===null||io===void 0?void 0:io.scrollTo(Ji)},nativeElement:br.current||Mr.current}});var pr=E.useMemo(function(){var vi;if($n!=="combobox")return _i;var ai=(vi=An[0])===null||vi===void 0?void 0:vi.value;return typeof ai=="string"||typeof ai=="number"?String(ai):""},[_i,$n,An]),Jr=$n==="combobox"&&typeof Yr=="function"&&Yr()||null,ti=typeof _r=="function"&&_r(),di=(0,ae.x1)(Mr,ti==null||(an=ti.props)===null||an===void 0?void 0:an.ref),po=E.useState(!1),ao=(0,se.Z)(po,2),to=ao[0],mo=ao[1];(0,x.Z)(function(){mo(!0)},[]);var Ii=(0,ee.Z)(!1,{defaultValue:wr,value:Ur}),Ti=(0,se.Z)(Ii,2),Pi=Ti[0],vo=Ti[1],Fi=to?Pi:!1,Gi=!jn&&Vt;(kr||Gi&&Fi&&$n==="combobox")&&(Fi=!1);var ji=Gi?!1:Fi,gr=E.useCallback(function(vi){var ai=vi!==void 0?vi:!Fi;kr||(vo(ai),Fi!==ai&&(Dr==null||Dr(ai)))},[kr,Fi,vo,Dr]),Gr=E.useMemo(function(){return(Li||[]).some(function(vi){return[`
|
|
|
`,`\r
|
|
|
`].includes(vi)})},[Li]),Zr=E.useContext(Pt)||{},Vr=Zr.maxCount,xi=Zr.rawValues,Oi=function(ai,ro,Ji){if(!(fn&&Le(Vr)&&(xi==null?void 0:xi.size)>=Vr)){var io=!0,co=ai;Qr==null||Qr(null);var na=tt(ai,Li,Le(Vr)?Vr-xi.size:void 0),Go=Ji?null:na;return $n!=="combobox"&&Go&&(co="",Mi==null||Mi(Go),gr(!1),io=!1),oi&&pr!==co&&oi(co,{source:ro?"typing":"effect"}),io}},Ao=function(ai){!ai||!ai.trim()||oi(ai,{source:"submit"})};E.useEffect(function(){!Fi&&!fn&&$n!=="combobox"&&Oi("",!1,!1)},[Fi]),E.useEffect(function(){Pi&&kr&&vo(!1),kr&&!zr.current&&dr(!1)},[kr]);var Yi=he(),Xi=(0,se.Z)(Yi,2),ui=Xi[0],no=Xi[1],Io=E.useRef(!1),Ui=function(ai){var ro=ui(),Ji=ai.key,io=Ji==="Enter";if(io&&($n!=="combobox"&&ai.preventDefault(),Fi||gr(!0)),no(!!pr),Ji==="Backspace"&&!ro&&fn&&!pr&&An.length){for(var co=(0,ie.Z)(An),na=null,Go=co.length-1;Go>=0;Go-=1){var ca=co[Go];if(!ca.disabled){co.splice(Go,1),na=ca;break}}na&&Gt(co,{type:"remove",values:[na]})}for(var Qi=arguments.length,yo=new Array(Qi>1?Qi-1:0),Fo=1;Fo<Qi;Fo++)yo[Fo-1]=arguments[Fo];if(Fi&&(!io||!Io.current)){var Xo;io&&(Io.current=!0),(Xo=li.current)===null||Xo===void 0||Xo.onKeyDown.apply(Xo,[ai].concat(yo))}mn==null||mn.apply(void 0,[ai].concat(yo))},Ho=function(ai){for(var ro=arguments.length,Ji=new Array(ro>1?ro-1:0),io=1;io<ro;io++)Ji[io-1]=arguments[io];if(Fi){var co;(co=li.current)===null||co===void 0||co.onKeyUp.apply(co,[ai].concat(Ji))}ai.key==="Enter"&&(Io.current=!1),un==null||un.apply(void 0,[ai].concat(Ji))},Co=function(ai){var ro=An.filter(function(Ji){return Ji!==ai});Gt(ro,{type:"remove",values:[ai]})},Oo=function(){Io.current=!1},Ki=E.useRef(!1),Wo=function(){dr(!0),kr||(ln&&!Ki.current&&ln.apply(void 0,arguments),Wt.includes("focus")&&gr(!0)),Ki.current=!0},za=function(){zr.current=!0,dr(!1,function(){Ki.current=!1,zr.current=!1,gr(!1)}),!kr&&(pr&&($n==="tags"?oi(pr,{source:"submit"}):$n==="multiple"&&oi("",{source:"blur"})),dn&&dn.apply(void 0,arguments))},Yo=[];E.useEffect(function(){return function(){Yo.forEach(function(vi){return clearTimeout(vi)}),Yo.splice(0,Yo.length)}},[]);var la=function(ai){var ro,Ji=ai.target,io=(ro=Wr.current)===null||ro===void 0?void 0:ro.getPopupElement();if(io&&io.contains(Ji)){var co=setTimeout(function(){var Qi=Yo.indexOf(co);if(Qi!==-1&&Yo.splice(Qi,1),Nr(),!ir&&!io.contains(document.activeElement)){var yo;(yo=Pr.current)===null||yo===void 0||yo.focus()}});Yo.push(co)}for(var na=arguments.length,Go=new Array(na>1?na-1:0),ca=1;ca<na;ca++)Go[ca-1]=arguments[ca];Hn==null||Hn.apply(void 0,[ai].concat(Go))},Zo=E.useState({}),Da=(0,se.Z)(Zo,2),qa=Da[1];function ba(){qa({})}var cs;ti&&(cs=function(ai){gr(ai)}),pe(function(){var vi;return[br.current,(vi=Wr.current)===null||vi===void 0?void 0:vi.getPopupElement()]},ji,gr,!!ti);var Ma=E.useMemo(function(){return(0,ue.Z)((0,ue.Z)({},At),{},{notFoundContent:jn,open:Fi,triggerOpen:ji,id:Ht,showSearch:Mn,multiple:fn,toggleOpen:gr})},[At,jn,ji,Fi,Ht,Mn,fn,gr]),Ha=!!Ar||Sr,Ra;Ha&&(Ra=E.createElement(ve,{className:z()("".concat(Et,"-arrow"),(0,Ce.Z)({},"".concat(Et,"-arrow-loading"),Sr)),customizeIcon:Ar,customizeIconProps:{loading:Sr,searchValue:pr,open:Fi,focused:ar,showSearch:Mn}}));var pa=function(){var ai;Wn==null||Wn(),(ai=Pr.current)===null||ai===void 0||ai.focus(),Gt([],{type:"clear",values:An}),Oi("",!1,!1)},Wa=ye(Et,pa,An,rr,$r,kr,pr,$n),Ja=Wa.allowClear,Sa=Wa.clearIcon,wa=E.createElement(qr,{ref:li}),ua=z()(Et,Ut,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},"".concat(Et,"-focused"),ar),"".concat(Et,"-multiple"),fn),"".concat(Et,"-single"),!fn),"".concat(Et,"-allow-clear"),rr),"".concat(Et,"-show-arrow"),Ha),"".concat(Et,"-disabled"),kr),"".concat(Et,"-loading"),Sr),"".concat(Et,"-open"),Fi),"".concat(Et,"-customize-input"),Jr),"".concat(Et,"-show-search"),Mn)),To=E.createElement(Ne,{ref:Wr,disabled:kr,prefixCls:Et,visible:ji,popupElement:wa,animation:wi,transitionName:Hi,dropdownStyle:Tt,dropdownClassName:tn,direction:gn,dropdownMatchSelectWidth:Zt,dropdownRender:Qt,dropdownAlign:cn,placement:hn,builtinPlacements:Nn,getPopupContainer:kn,empty:Vt,getTriggerDOMNode:function(ai){return Mr.current||ai},onPopupVisibleChange:cs,onPopupMouseEnter:ba},ti?E.cloneElement(ti,{ref:di}):E.createElement(_t,(0,ce.Z)({},At,{domRef:Mr,prefixCls:Et,inputElement:Jr,ref:Pr,id:Ht,prefix:Cr,showSearch:Mn,autoClearSearchValue:Si,mode:$n,activeDescendantId:pi,tagRender:rn,values:An,open:Fi,onToggleOpen:gr,activeValue:Hr,searchValue:pr,onSearch:Oi,onSearchSubmit:Ao,onRemove:Co,tokenWithEnter:Gr,onInputBlur:Oo}))),qi;return ti?qi=To:qi=E.createElement("div",(0,ce.Z)({className:ua},Rn,{ref:br,onMouseDown:la,onKeyDown:Ui,onKeyUp:Ho,onFocus:Wo,onBlur:za}),E.createElement(Ct,{visible:ar&&!Fi,values:An}),To,Ra,Ja&&Sa),E.createElement(me.Provider,{value:Ma},qi)}),yt=Ft,Xt=function(){return null};Xt.isSelectOptGroup=!0;var Lt=Xt,Kt=function(){return null};Kt.isSelectOption=!0;var sn=Kt,Sn=be(80547),Yt=be(2738),In=be(48911);function Kn(){return/(mac\sos|macintosh)/i.test(navigator.appVersion)}var Gn=["disabled","title","children","style","className"];function nr(At){return typeof At=="string"||typeof At=="number"}var hr=function(St,an){var Ht=ge(),Et=Ht.prefixCls,Ut=Ht.id,nn=Ht.open,rn=Ht.multiple,gn=Ht.mode,bn=Ht.searchValue,An=Ht.toggleOpen,Gt=Ht.notFoundContent,Vt=Ht.onPopupScroll,wn=E.useContext(Pt),jn=wn.maxCount,Wn=wn.flattenOptions,$n=wn.onActiveValue,kr=wn.defaultActiveFirstOption,Sr=wn.onSelect,Yr=wn.menuItemSelectedIcon,_r=wn.rawValues,Ur=wn.fieldNames,wr=wn.virtual,Dr=wn.direction,Hr=wn.listHeight,Qr=wn.listItemHeight,pi=wn.optionRender,_i="".concat(Et,"-item"),Si=(0,Sn.Z)(function(){return Wn},[nn,Wn],function(yn,Wt){return Wt[0]&&yn[1]!==Wt[1]}),oi=E.useRef(null),Mi=E.useMemo(function(){return rn&&Le(jn)&&(_r==null?void 0:_r.size)>=jn},[rn,jn,_r==null?void 0:_r.size]),Li=function(Wt){Wt.preventDefault()},rr=function(Wt){var ln;(ln=oi.current)===null||ln===void 0||ln.scrollTo(typeof Wt=="number"?{index:Wt}:Wt)},Cr=E.useCallback(function(yn){return gn==="combobox"?!1:_r.has(yn)},[gn,(0,ie.Z)(_r).toString(),_r.size]),Ar=function(Wt){for(var ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,dn=Si.length,un=0;un<dn;un+=1){var mn=(Wt+un*ln+dn)%dn,Hn=Si[mn]||{},vn=Hn.group,fn=Hn.data;if(!vn&&!(fn!=null&&fn.disabled)&&(Cr(fn.value)||!Mi))return mn}return-1},$r=E.useState(function(){return Ar(0)}),qr=(0,se.Z)($r,2),wi=qr[0],Hi=qr[1],Tt=function(Wt){var ln=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;Hi(Wt);var dn={source:ln?"keyboard":"mouse"},un=Si[Wt];if(!un){$n(null,-1,dn);return}$n(un.value,Wt,dn)};(0,E.useEffect)(function(){Tt(kr!==!1?Ar(0):-1)},[Si.length,bn]);var tn=E.useCallback(function(yn){return gn==="combobox"?String(yn).toLowerCase()===bn.toLowerCase():_r.has(yn)},[gn,bn,(0,ie.Z)(_r).toString(),_r.size]);(0,E.useEffect)(function(){var yn=setTimeout(function(){if(!rn&&nn&&_r.size===1){var ln=Array.from(_r)[0],dn=Si.findIndex(function(un){var mn=un.data;return bn?String(mn.value).startsWith(bn):mn.value===ln});dn!==-1&&(Tt(dn),rr(dn))}});if(nn){var Wt;(Wt=oi.current)===null||Wt===void 0||Wt.scrollTo(void 0)}return function(){return clearTimeout(yn)}},[nn,bn]);var Zt=function(Wt){Wt!==void 0&&Sr(Wt,{selected:!_r.has(Wt)}),rn||An(!1)};if(E.useImperativeHandle(an,function(){return{onKeyDown:function(Wt){var ln=Wt.which,dn=Wt.ctrlKey;switch(ln){case ke.Z.N:case ke.Z.P:case ke.Z.UP:case ke.Z.DOWN:{var un=0;if(ln===ke.Z.UP?un=-1:ln===ke.Z.DOWN?un=1:Kn()&&dn&&(ln===ke.Z.N?un=1:ln===ke.Z.P&&(un=-1)),un!==0){var mn=Ar(wi+un,un);rr(mn),Tt(mn,!0)}break}case ke.Z.TAB:case ke.Z.ENTER:{var Hn,vn=Si[wi];vn&&!(vn!=null&&(Hn=vn.data)!==null&&Hn!==void 0&&Hn.disabled)&&!Mi?Zt(vn.value):Zt(void 0),nn&&Wt.preventDefault();break}case ke.Z.ESC:An(!1),nn&&Wt.stopPropagation()}},onKeyUp:function(){},scrollTo:function(Wt){rr(Wt)}}}),Si.length===0)return E.createElement("div",{role:"listbox",id:"".concat(Ut,"_list"),className:"".concat(_i,"-empty"),onMouseDown:Li},Gt);var Qt=Object.keys(Ur).map(function(yn){return Ur[yn]}),cn=function(Wt){return Wt.label};function hn(yn,Wt){var ln=yn.group;return{role:ln?"presentation":"option",id:"".concat(Ut,"_list_").concat(Wt)}}var Nn=function(Wt){var ln=Si[Wt];if(!ln)return null;var dn=ln.data||{},un=dn.value,mn=ln.group,Hn=(0,Ee.Z)(dn,!0),vn=cn(ln);return ln?E.createElement("div",(0,ce.Z)({"aria-label":typeof vn=="string"&&!mn?vn:null},Hn,{key:Wt},hn(ln,Wt),{"aria-selected":tn(un)}),un):null},kn={role:"listbox",id:"".concat(Ut,"_list")};return E.createElement(E.Fragment,null,wr&&E.createElement("div",(0,ce.Z)({},kn,{style:{height:0,width:0,overflow:"hidden"}}),Nn(wi-1),Nn(wi),Nn(wi+1)),E.createElement(In.Z,{itemKey:"key",ref:oi,data:Si,height:Hr,itemHeight:Qr,fullHeight:!1,onMouseDown:Li,onScroll:Vt,virtual:wr,direction:Dr,innerProps:wr?null:kn},function(yn,Wt){var ln=yn.group,dn=yn.groupOption,un=yn.data,mn=yn.label,Hn=yn.value,vn=un.key;if(ln){var fn,Mn=(fn=un.title)!==null&&fn!==void 0?fn:nr(mn)?mn.toString():void 0;return E.createElement("div",{className:z()(_i,"".concat(_i,"-group"),un.className),title:Mn},mn!==void 0?mn:vn)}var Rn=un.disabled,Yn=un.title,fr=un.children,ir=un.style,Ir=un.className,br=(0,te.Z)(un,Gn),Mr=(0,Yt.Z)(br,Qt),Wr=Cr(Hn),Pr=Rn||!Wr&&Mi,li="".concat(_i,"-option"),zr=z()(_i,li,Ir,(0,Ce.Z)((0,Ce.Z)((0,Ce.Z)((0,Ce.Z)({},"".concat(li,"-grouped"),dn),"".concat(li,"-active"),wi===Wt&&!Pr),"".concat(li,"-disabled"),Pr),"".concat(li,"-selected"),Wr)),Xr=cn(yn),Tr=!Yr||typeof Yr=="function"||Wr,ar=typeof Xr=="number"?Xr:Xr||Hn,dr=nr(ar)?ar.toString():void 0;return Yn!==void 0&&(dr=Yn),E.createElement("div",(0,ce.Z)({},(0,Ee.Z)(Mr),wr?{}:hn(yn,Wt),{"aria-selected":tn(Hn),className:zr,title:dr,onMouseMove:function(){wi===Wt||Pr||Tt(Wt)},onClick:function(){Pr||Zt(Hn)},style:ir}),E.createElement("div",{className:"".concat(li,"-content")},typeof pi=="function"?pi(yn,{index:Wt}):ar),E.isValidElement(Yr)||Wr,Tr&&E.createElement(ve,{className:"".concat(_i,"-option-state"),customizeIcon:Yr,customizeIconProps:{value:Hn,disabled:Pr,isSelected:Wr}},Wr?"\u2713":null))}))},ur=E.forwardRef(hr),Un=ur,Fn=function(At,St){var an=E.useRef({values:new Map,options:new Map}),Ht=E.useMemo(function(){var Ut=an.current,nn=Ut.values,rn=Ut.options,gn=At.map(function(Gt){if(Gt.label===void 0){var Vt;return(0,ue.Z)((0,ue.Z)({},Gt),{},{label:(Vt=nn.get(Gt.value))===null||Vt===void 0?void 0:Vt.label})}return Gt}),bn=new Map,An=new Map;return gn.forEach(function(Gt){bn.set(Gt.value,Gt),An.set(Gt.value,St.get(Gt.value)||rn.get(Gt.value))}),an.current.values=bn,an.current.options=An,gn},[At,St]),Et=E.useCallback(function(Ut){return St.get(Ut)||an.current.options.get(Ut)},[St]);return[Ht,Et]};function or(At,St){return rt(At).join("").toUpperCase().includes(St)}var Vn=function(At,St,an,Ht,Et){return E.useMemo(function(){if(!an||Ht===!1)return At;var Ut=St.options,nn=St.label,rn=St.value,gn=[],bn=typeof Ht=="function",An=an.toUpperCase(),Gt=bn?Ht:function(wn,jn){return Et?or(jn[Et],An):jn[Ut]?or(jn[nn!=="children"?nn:"label"],An):or(jn[rn],An)},Vt=bn?function(wn){return Re(wn)}:function(wn){return wn};return At.forEach(function(wn){if(wn[Ut]){var jn=Gt(an,Vt(wn));if(jn)gn.push(wn);else{var Wn=wn[Ut].filter(function($n){return Gt(an,Vt($n))});Wn.length&&gn.push((0,ue.Z)((0,ue.Z)({},wn),{},(0,Ce.Z)({},Ut,Wn)))}return}Gt(an,Vt(wn))&&gn.push(wn)}),gn},[At,Ht,Et,an,St])},Bn=be(6551),_n=be(11592),zn=["children","value"],cr=["children"];function Dn(At){var St=At,an=St.key,Ht=St.props,Et=Ht.children,Ut=Ht.value,nn=(0,te.Z)(Ht,zn);return(0,ue.Z)({key:an,value:Ut!==void 0?Ut:an,children:Et},nn)}function Cn(At){var St=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return(0,_n.Z)(At).map(function(an,Ht){if(!E.isValidElement(an)||!an.type)return null;var Et=an,Ut=Et.type.isSelectOptGroup,nn=Et.key,rn=Et.props,gn=rn.children,bn=(0,te.Z)(rn,cr);return St||!Ut?Dn(an):(0,ue.Z)((0,ue.Z)({key:"__RC_SELECT_GRP__".concat(nn===null?Ht:nn,"__"),label:nn},bn),{},{options:Cn(gn)})}).filter(function(an){return an})}var er=function(St,an,Ht,Et,Ut){return E.useMemo(function(){var nn=St,rn=!St;rn&&(nn=Cn(an));var gn=new Map,bn=new Map,An=function(wn,jn,Wn){Wn&&typeof Wn=="string"&&wn.set(jn[Wn],jn)},Gt=function Vt(wn){for(var jn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,Wn=0;Wn<wn.length;Wn+=1){var $n=wn[Wn];!$n[Ht.options]||jn?(gn.set($n[Ht.value],$n),An(bn,$n,Ht.label),An(bn,$n,Et),An(bn,$n,Ut)):Vt($n[Ht.options],!0)}};return Gt(nn),{options:nn,valueOptions:gn,labelOptions:bn}},[St,an,Ht,Et,Ut])},$t=er;function Ie(At){var St=E.useRef();St.current=At;var an=E.useCallback(function(){return St.current.apply(St,arguments)},[]);return an}function Ze(At){var St=At.mode,an=At.options,Ht=At.children,Et=At.backfill,Ut=At.allowClear,nn=At.placeholder,rn=At.getInputElement,gn=At.showSearch,bn=At.onSearch,An=At.defaultOpen,Gt=At.autoFocus,Vt=At.labelInValue,wn=At.value,jn=At.inputValue,Wn=At.optionLabelProp,$n=isMultiple(St),kr=gn!==void 0?gn:$n||St==="combobox",Sr=an||convertChildrenToData(Ht);if(warning(St!=="tags"||Sr.every(function(wr){return!wr.disabled}),"Please avoid setting option to disabled in tags mode since user can always type text as tag."),St==="tags"||St==="combobox"){var Yr=Sr.some(function(wr){return wr.options?wr.options.some(function(Dr){return typeof("value"in Dr?Dr.value:Dr.key)=="number"}):typeof("value"in wr?wr.value:wr.key)=="number"});warning(!Yr,"`value` of Option should not use number type when `mode` is `tags` or `combobox`.")}if(warning(St!=="combobox"||!Wn,"`combobox` mode not support `optionLabelProp`. Please set `value` on Option directly."),warning(St==="combobox"||!Et,"`backfill` only works with `combobox` mode."),warning(St==="combobox"||!rn,"`getInputElement` only work with `combobox` mode."),noteOnce(St!=="combobox"||!rn||!Ut||!nn,"Customize `getInputElement` should customize clear and placeholder logic instead of configuring `allowClear` and `placeholder`."),bn&&!kr&&St!=="combobox"&&St!=="tags"&&warning(!1,"`onSearch` should work with `showSearch` instead of use alone."),noteOnce(!An||Gt,"`defaultOpen` makes Select open without focus which means it will not close by click outside. You can set `autoFocus` if needed."),wn!=null){var _r=toArray(wn);warning(!Vt||_r.every(function(wr){return _typeof(wr)==="object"&&("key"in wr||"value"in wr)}),"`value` should in shape of `{ value: string | number, label?: ReactNode }` when you set `labelInValue` to `true`"),warning(!$n||Array.isArray(wn),"`value` should be array when `mode` is `multiple` or `tags`")}if(Ht){var Ur=null;toNodeArray(Ht).some(function(wr){if(!React.isValidElement(wr)||!wr.type)return!1;var Dr=wr,Hr=Dr.type;if(Hr.isSelectOption)return!1;if(Hr.isSelectOptGroup){var Qr=toNodeArray(wr.props.children).every(function(pi){return!React.isValidElement(pi)||!wr.type||pi.type.isSelectOption?!0:(Ur=pi.type,!1)});return!Qr}return Ur=Hr,!0}),Ur&&warning(!1,"`children` should be `Select.Option` or `Select.OptGroup` instead of `".concat(Ur.displayName||Ur.name||Ur,"`.")),warning(jn===void 0,"`inputValue` is deprecated, please use `searchValue` instead.")}}function qe(At,St){if(At){var an=function Ht(Et){for(var Ut=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,nn=0;nn<Et.length;nn++){var rn=Et[nn];if(rn[St==null?void 0:St.value]===null)return warning(!1,"`value` in Select options should not be `null`."),!0;if(!Ut&&Array.isArray(rn[St==null?void 0:St.options])&&Ht(rn[St==null?void 0:St.options],!0))break}};an(At)}}var st=null,mt=["id","mode","prefixCls","backfill","fieldNames","inputValue","searchValue","onSearch","autoClearSearchValue","onSelect","onDeselect","dropdownMatchSelectWidth","filterOption","filterSort","optionFilterProp","optionLabelProp","options","optionRender","children","defaultActiveFirstOption","menuItemSelectedIcon","virtual","direction","listHeight","listItemHeight","labelRender","value","defaultValue","labelInValue","onChange","maxCount"],Nt=["inputValue"];function kt(At){return!At||(0,le.Z)(At)!=="object"}var Bt=E.forwardRef(function(At,St){var an=At.id,Ht=At.mode,Et=At.prefixCls,Ut=Et===void 0?"rc-select":Et,nn=At.backfill,rn=At.fieldNames,gn=At.inputValue,bn=At.searchValue,An=At.onSearch,Gt=At.autoClearSearchValue,Vt=Gt===void 0?!0:Gt,wn=At.onSelect,jn=At.onDeselect,Wn=At.dropdownMatchSelectWidth,$n=Wn===void 0?!0:Wn,kr=At.filterOption,Sr=At.filterSort,Yr=At.optionFilterProp,_r=At.optionLabelProp,Ur=At.options,wr=At.optionRender,Dr=At.children,Hr=At.defaultActiveFirstOption,Qr=At.menuItemSelectedIcon,pi=At.virtual,_i=At.direction,Si=At.listHeight,oi=Si===void 0?200:Si,Mi=At.listItemHeight,Li=Mi===void 0?20:Mi,rr=At.labelRender,Cr=At.value,Ar=At.defaultValue,$r=At.labelInValue,qr=At.onChange,wi=At.maxCount,Hi=(0,te.Z)(At,mt),Tt=(0,Bn.ZP)(an),tn=zt(Ht),Zt=!!(!Ur&&Dr),Qt=E.useMemo(function(){return kr===void 0&&Ht==="combobox"?!1:kr},[kr,Ht]),cn=E.useMemo(function(){return Ue(rn,Zt)},[JSON.stringify(rn),Zt]),hn=(0,ee.Z)("",{value:bn!==void 0?bn:gn,postState:function(Gr){return Gr||""}}),Nn=(0,se.Z)(hn,2),kn=Nn[0],yn=Nn[1],Wt=$t(Ur,Dr,cn,Yr,_r),ln=Wt.valueOptions,dn=Wt.labelOptions,un=Wt.options,mn=E.useCallback(function(gr){var Gr=rt(gr);return Gr.map(function(Zr){var Vr,xi,Oi,Ao,Yi;if(kt(Zr))Vr=Zr;else{var Xi;Oi=Zr.key,xi=Zr.label,Vr=(Xi=Zr.value)!==null&&Xi!==void 0?Xi:Oi}var ui=ln.get(Vr);if(ui){var no;if(xi===void 0&&(xi=ui==null?void 0:ui[_r||cn.label]),Oi===void 0&&(Oi=(no=ui==null?void 0:ui.key)!==null&&no!==void 0?no:Vr),Ao=ui==null?void 0:ui.disabled,Yi=ui==null?void 0:ui.title,0)var Io}return{label:xi,value:Vr,key:Oi,disabled:Ao,title:Yi}})},[cn,_r,ln]),Hn=(0,ee.Z)(Ar,{value:Cr}),vn=(0,se.Z)(Hn,2),fn=vn[0],Mn=vn[1],Rn=E.useMemo(function(){var gr,Gr=tn&&fn===null?[]:fn,Zr=mn(Gr);return Ht==="combobox"&&ze((gr=Zr[0])===null||gr===void 0?void 0:gr.value)?[]:Zr},[fn,mn,Ht,tn]),Yn=Fn(Rn,ln),fr=(0,se.Z)(Yn,2),ir=fr[0],Ir=fr[1],br=E.useMemo(function(){if(!Ht&&ir.length===1){var gr=ir[0];if(gr.value===null&&(gr.label===null||gr.label===void 0))return[]}return ir.map(function(Gr){var Zr;return(0,ue.Z)((0,ue.Z)({},Gr),{},{label:(Zr=typeof rr=="function"?rr(Gr):Gr.label)!==null&&Zr!==void 0?Zr:Gr.value})})},[Ht,ir,rr]),Mr=E.useMemo(function(){return new Set(ir.map(function(gr){return gr.value}))},[ir]);E.useEffect(function(){if(Ht==="combobox"){var gr,Gr=(gr=ir[0])===null||gr===void 0?void 0:gr.value;yn(Ge(Gr)?String(Gr):"")}},[ir]);var Wr=Ie(function(gr,Gr){var Zr=Gr!=null?Gr:gr;return(0,Ce.Z)((0,Ce.Z)({},cn.value,gr),cn.label,Zr)}),Pr=E.useMemo(function(){if(Ht!=="tags")return un;var gr=(0,ie.Z)(un),Gr=function(Vr){return ln.has(Vr)};return(0,ie.Z)(ir).sort(function(Zr,Vr){return Zr.value<Vr.value?-1:1}).forEach(function(Zr){var Vr=Zr.value;Gr(Vr)||gr.push(Wr(Vr,Zr.label))}),gr},[Wr,un,ln,ir,Ht]),li=Vn(Pr,cn,kn,Qt,Yr),zr=E.useMemo(function(){return Ht!=="tags"||!kn||li.some(function(gr){return gr[Yr||"value"]===kn})||li.some(function(gr){return gr[cn.value]===kn})?li:[Wr(kn)].concat((0,ie.Z)(li))},[Wr,Yr,Ht,li,kn,cn]),Xr=function gr(Gr){var Zr=(0,ie.Z)(Gr).sort(function(Vr,xi){return Sr(Vr,xi,{searchValue:kn})});return Zr.map(function(Vr){return Array.isArray(Vr.options)?(0,ue.Z)((0,ue.Z)({},Vr),{},{options:Vr.options.length>0?gr(Vr.options):Vr.options}):Vr})},Tr=E.useMemo(function(){return Sr?Xr(zr):zr},[zr,Sr,kn]),ar=E.useMemo(function(){return Me(Tr,{fieldNames:cn,childrenAsData:Zt})},[Tr,cn,Zt]),dr=function(Gr){var Zr=mn(Gr);if(Mn(Zr),qr&&(Zr.length!==ir.length||Zr.some(function(Oi,Ao){var Yi;return((Yi=ir[Ao])===null||Yi===void 0?void 0:Yi.value)!==(Oi==null?void 0:Oi.value)}))){var Vr=$r?Zr:Zr.map(function(Oi){return Oi.value}),xi=Zr.map(function(Oi){return Re(Ir(Oi.value))});qr(tn?Vr:Vr[0],tn?xi:xi[0])}},Nr=E.useState(null),pr=(0,se.Z)(Nr,2),Jr=pr[0],ti=pr[1],di=E.useState(0),po=(0,se.Z)(di,2),ao=po[0],to=po[1],mo=Hr!==void 0?Hr:Ht!=="combobox",Ii=E.useCallback(function(gr,Gr){var Zr=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},Vr=Zr.source,xi=Vr===void 0?"keyboard":Vr;to(Gr),nn&&Ht==="combobox"&&gr!==null&&xi==="keyboard"&&ti(String(gr))},[nn,Ht]),Ti=function(Gr,Zr,Vr){var xi=function(){var Co,Oo=Ir(Gr);return[$r?{label:Oo==null?void 0:Oo[cn.label],value:Gr,key:(Co=Oo==null?void 0:Oo.key)!==null&&Co!==void 0?Co:Gr}:Gr,Re(Oo)]};if(Zr&&wn){var Oi=xi(),Ao=(0,se.Z)(Oi,2),Yi=Ao[0],Xi=Ao[1];wn(Yi,Xi)}else if(!Zr&&jn&&Vr!=="clear"){var ui=xi(),no=(0,se.Z)(ui,2),Io=no[0],Ui=no[1];jn(Io,Ui)}},Pi=Ie(function(gr,Gr){var Zr,Vr=tn?Gr.selected:!0;Vr?Zr=tn?[].concat((0,ie.Z)(ir),[gr]):[gr]:Zr=ir.filter(function(xi){return xi.value!==gr}),dr(Zr),Ti(gr,Vr),Ht==="combobox"?ti(""):(!zt||Vt)&&(yn(""),ti(""))}),vo=function(Gr,Zr){dr(Gr);var Vr=Zr.type,xi=Zr.values;(Vr==="remove"||Vr==="clear")&&xi.forEach(function(Oi){Ti(Oi.value,!1,Vr)})},Fi=function(Gr,Zr){if(yn(Gr),ti(null),Zr.source==="submit"){var Vr=(Gr||"").trim();if(Vr){var xi=Array.from(new Set([].concat((0,ie.Z)(Mr),[Vr])));dr(xi),Ti(Vr,!0),yn("")}return}Zr.source!=="blur"&&(Ht==="combobox"&&dr(Gr),An==null||An(Gr))},Gi=function(Gr){var Zr=Gr;Ht!=="tags"&&(Zr=Gr.map(function(xi){var Oi=dn.get(xi);return Oi==null?void 0:Oi.value}).filter(function(xi){return xi!==void 0}));var Vr=Array.from(new Set([].concat((0,ie.Z)(Mr),(0,ie.Z)(Zr))));dr(Vr),Vr.forEach(function(xi){Ti(xi,!0)})},ji=E.useMemo(function(){var gr=pi!==!1&&$n!==!1;return(0,ue.Z)((0,ue.Z)({},Wt),{},{flattenOptions:ar,onActiveValue:Ii,defaultActiveFirstOption:mo,onSelect:Pi,menuItemSelectedIcon:Qr,rawValues:Mr,fieldNames:cn,virtual:gr,direction:_i,listHeight:oi,listItemHeight:Li,childrenAsData:Zt,maxCount:wi,optionRender:wr})},[wi,Wt,ar,Ii,mo,Pi,Qr,Mr,cn,pi,$n,_i,oi,Li,Zt,wr]);return E.createElement(Pt.Provider,{value:ji},E.createElement(yt,(0,ce.Z)({},Hi,{id:Tt,prefixCls:Ut,ref:St,omitDomProps:Nt,mode:Ht,displayValues:br,onDisplayValuesChange:vo,direction:_i,searchValue:kn,onSearch:Fi,autoClearSearchValue:Vt,onSearchSplit:Gi,dropdownMatchSelectWidth:$n,OptionList:Un,emptyOptions:!ar.length,activeValue:Jr,activeDescendantId:"".concat(Tt,"_list_").concat(ao)})))}),Jt=Bt;Jt.Option=sn,Jt.OptGroup=Lt;var En=Jt,qn=En},63158:function(qt,Dt,be){"use strict";var ce=be(54476),ie=be(20068),Ce=be(42978),ue=be(75931),se=be(59301),te=be(92310),le=be.n(te),ee=be(18929),ne=be(10228),E=["prefixCls","className","checked","defaultChecked","disabled","loadingIcon","checkedChildren","unCheckedChildren","onClick","onChange","onKeyDown"],b=se.forwardRef(function(z,x){var re,ae=z.prefixCls,oe=ae===void 0?"rc-switch":ae,ve=z.className,ye=z.checked,me=z.defaultChecked,ge=z.disabled,_e=z.loadingIcon,he=z.checkedChildren,pe=z.unCheckedChildren,ke=z.onClick,Te=z.onChange,Ee=z.onKeyDown,Oe=(0,ue.Z)(z,E),je=(0,ee.Z)(!1,{value:ye,defaultValue:me}),Pe=(0,Ce.Z)(je,2),Qe=Pe[0],Xe=Pe[1];function ot(ut,Ge){var ze=Qe;return ge||(ze=ut,Xe(ze),Te==null||Te(ze,Ge)),ze}function He(ut){ut.which===ne.Z.LEFT?ot(!1,ut):ut.which===ne.Z.RIGHT&&ot(!0,ut),Ee==null||Ee(ut)}function rt(ut){var Ge=ot(!Qe,ut);ke==null||ke(Ge,ut)}var Ye=le()(oe,ve,(re={},(0,ie.Z)(re,"".concat(oe,"-checked"),Qe),(0,ie.Z)(re,"".concat(oe,"-disabled"),ge),re));return se.createElement("button",(0,ce.Z)({},Oe,{type:"button",role:"switch","aria-checked":Qe,disabled:ge,className:Ye,ref:x,onKeyDown:He,onClick:rt}),_e,se.createElement("span",{className:"".concat(oe,"-inner")},se.createElement("span",{className:"".concat(oe,"-inner-checked")},he),se.createElement("span",{className:"".concat(oe,"-inner-unchecked")},pe)))});b.displayName="Switch",Dt.Z=b},86351:function(qt,Dt,be){"use strict";be.d(Dt,{R:function(){return ie},w:function(){return ce}});var ce={},ie="rc-table-internal-hook"},97347:function(qt,Dt,be){"use strict";be.d(Dt,{L:function(){return oe},Z:function(){return _e}});var ce=be(42978),ie=be(20068),Ce=be(94480),ue=be(76190),se=be(33885),te=be(75931),le=be(11592),ee=be(48736),ne=be(59301),E=be(86351),b=be(54451);function z(he){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";return typeof pe=="number"?pe:pe.endsWith("%")?he*parseFloat(pe)/100:null}function x(he,pe,ke){return ne.useMemo(function(){if(pe&&pe>0){var Te=0,Ee=0;he.forEach(function(rt){var Ye=z(pe,rt.width);Ye?Te+=Ye:Ee+=1});var Oe=Math.max(pe,ke),je=Math.max(Oe-Te,Ee),Pe=Ee,Qe=je/Ee,Xe=0,ot=he.map(function(rt){var Ye=(0,se.Z)({},rt),ut=z(pe,Ye.width);if(ut)Ye.width=ut;else{var Ge=Math.floor(Qe);Ye.width=Pe===1?je:Ge,je-=Ge,Pe-=1}return Xe+=Ye.width,Ye});if(Xe<Oe){var He=Oe/Xe;je=Oe,ot.forEach(function(rt,Ye){var ut=Math.floor(rt.width*He);rt.width=Ye===ot.length-1?je:ut,je-=ut})}return[ot,Math.max(Xe,Oe)]}return[he,pe]},[he,pe,ke])}var re=["children"],ae=["fixed"];function oe(he){return(0,le.Z)(he).filter(function(pe){return ne.isValidElement(pe)}).map(function(pe){var ke=pe.key,Te=pe.props,Ee=Te.children,Oe=(0,te.Z)(Te,re),je=(0,se.Z)({key:ke},Oe);return Ee&&(je.children=oe(Ee)),je})}function ve(he){return he.filter(function(pe){return pe&&(0,ue.Z)(pe)==="object"&&!pe.hidden}).map(function(pe){var ke=pe.children;return ke&&ke.length>0?(0,se.Z)((0,se.Z)({},pe),{},{children:ve(ke)}):pe})}function ye(he){var pe=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"key";return he.filter(function(ke){return ke&&(0,ue.Z)(ke)==="object"}).reduce(function(ke,Te,Ee){var Oe=Te.fixed,je=Oe===!0?"left":Oe,Pe="".concat(pe,"-").concat(Ee),Qe=Te.children;return Qe&&Qe.length>0?[].concat((0,Ce.Z)(ke),(0,Ce.Z)(ye(Qe,Pe).map(function(Xe){return(0,se.Z)({fixed:je},Xe)}))):[].concat((0,Ce.Z)(ke),[(0,se.Z)((0,se.Z)({key:Pe},Te),{},{fixed:je})])},[])}function me(he){return he.map(function(pe){var ke=pe.fixed,Te=(0,te.Z)(pe,ae),Ee=ke;return ke==="left"?Ee="right":ke==="right"&&(Ee="left"),(0,se.Z)({fixed:Ee},Te)})}function ge(he,pe){var ke=he.prefixCls,Te=he.columns,Ee=he.children,Oe=he.expandable,je=he.expandedKeys,Pe=he.columnTitle,Qe=he.getRowKey,Xe=he.onTriggerExpand,ot=he.expandIcon,He=he.rowExpandable,rt=he.expandIconColumnIndex,Ye=he.direction,ut=he.expandRowByClick,Ge=he.columnWidth,ze=he.fixed,Ve=he.scrollWidth,$e=he.clientWidth,nt=ne.useMemo(function(){var _t=Te||oe(Ee)||[];return ve(_t.slice())},[Te,Ee]),et=ne.useMemo(function(){if(Oe){var _t=nt.slice();if(!_t.includes(E.w)){var We=rt||0;We>=0&&(We||ze==="left"||!ze)&&_t.splice(We,0,E.w),ze==="right"&&_t.splice(nt.length,0,E.w)}var Ae=_t.indexOf(E.w);_t=_t.filter(function(Ne,De){return Ne!==E.w||De===Ae});var Se=nt[Ae],Be;ze?Be=ze:Be=Se?Se.fixed:null;var Ke=(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)({},b.v,{className:"".concat(ke,"-expand-icon-col"),columnType:"EXPAND_COLUMN"}),"title",Pe),"fixed",Be),"className","".concat(ke,"-row-expand-icon-cell")),"width",Ge),"render",function(De,we,Le){var Ue=Qe(we,Le),Me=je.has(Ue),Re=He?He(we):!0,tt=ot({prefixCls:ke,expanded:Me,expandable:Re,record:we,onExpand:Xe});return ut?ne.createElement("span",{onClick:function(Pt){return Pt.stopPropagation()}},tt):tt});return _t.map(function(Ne){return Ne===E.w?Ke:Ne})}return nt.filter(function(Ne){return Ne!==E.w})},[Oe,nt,Qe,je,ot,Ye]),pt=ne.useMemo(function(){var _t=et;return pe&&(_t=pe(_t)),_t.length||(_t=[{render:function(){return null}}]),_t},[pe,et,Ye]),ct=ne.useMemo(function(){return Ye==="rtl"?me(ye(pt)):ye(pt)},[pt,Ye,Ve]),It=ne.useMemo(function(){for(var _t=-1,We=ct.length-1;We>=0;We-=1){var Ae=ct[We].fixed;if(Ae==="left"||Ae===!0){_t=We;break}}if(_t>=0)for(var Se=0;Se<=_t;Se+=1){var Be=ct[Se].fixed;if(Be!=="left"&&Be!==!0)return!0}var Ke=ct.findIndex(function(we){var Le=we.fixed;return Le==="right"});if(Ke>=0)for(var Ne=Ke;Ne<ct.length;Ne+=1){var De=ct[Ne].fixed;if(De!=="right")return!0}return!1},[ct]),dt=x(ct,Ve,$e),Mt=(0,ce.Z)(dt,2),xt=Mt[0],gt=Mt[1];return[pt,xt,gt,It]}var _e=ge},4030:function(qt,Dt,be){"use strict";be.d(Dt,{w2:function(){return ce.w},vP:function(){return nr.v},RQ:function(){return ce.R},ER:function(){return Ue},Q$:function(){return kr},TN:function(){return qr}});var ce=be(86351),ie=be(42978),Ce=be(6089),ue=be(34280),se=be(13697),te=be(59301),le=be(4676);function ee(Tt){var tn=te.createContext(void 0),Zt=function(cn){var hn=cn.value,Nn=cn.children,kn=te.useRef(hn);kn.current=hn;var yn=te.useState(function(){return{getValue:function(){return kn.current},listeners:new Set}}),Wt=(0,ie.Z)(yn,1),ln=Wt[0];return(0,ue.Z)(function(){(0,le.unstable_batchedUpdates)(function(){ln.listeners.forEach(function(dn){dn(hn)})})},[hn]),te.createElement(tn.Provider,{value:ln},Nn)};return{Context:tn,Provider:Zt,defaultValue:Tt}}function ne(Tt,tn){var Zt=(0,Ce.Z)(typeof tn=="function"?tn:function(dn){if(tn===void 0)return dn;if(!Array.isArray(tn))return dn[tn];var un={};return tn.forEach(function(mn){un[mn]=dn[mn]}),un}),Qt=te.useContext(Tt==null?void 0:Tt.Context),cn=Qt||{},hn=cn.listeners,Nn=cn.getValue,kn=te.useRef();kn.current=Zt(Qt?Nn():Tt==null?void 0:Tt.defaultValue);var yn=te.useState({}),Wt=(0,ie.Z)(yn,2),ln=Wt[1];return(0,ue.Z)(function(){if(!Qt)return;function dn(un){var mn=Zt(un);(0,se.Z)(kn.current,mn,!0)||ln({})}return hn.add(dn),function(){hn.delete(dn)}},[Qt]),kn.current}var E=be(54476),b=be(8654);function z(){var Tt=te.createContext(null);function tn(){return te.useContext(Tt)}function Zt(cn,hn){var Nn=(0,b.Yr)(cn),kn=function(Wt,ln){var dn=Nn?{ref:ln}:{},un=te.useRef(0),mn=te.useRef(Wt),Hn=tn();return Hn!==null?te.createElement(cn,(0,E.Z)({},Wt,dn)):((!hn||hn(mn.current,Wt))&&(un.current+=1),mn.current=Wt,te.createElement(Tt.Provider,{value:un.current},te.createElement(cn,(0,E.Z)({},Wt,dn))))};return Nn?te.forwardRef(kn):kn}function Qt(cn,hn){var Nn=(0,b.Yr)(cn),kn=function(Wt,ln){var dn=Nn?{ref:ln}:{};return tn(),te.createElement(cn,(0,E.Z)({},Wt,dn))};return Nn?te.memo(te.forwardRef(kn),hn):te.memo(kn,hn)}return{makeImmutable:Zt,responseImmutable:Qt,useImmutableMark:tn}}var x=z(),re=x.makeImmutable,ae=x.responseImmutable,oe=x.useImmutableMark,ve=z(),ye=ve.makeImmutable,me=ve.responseImmutable,ge=ve.useImmutableMark,_e=ee(),he=_e;function pe(Tt,tn){var Zt=React.useRef(0);Zt.current+=1;var Qt=React.useRef(Tt),cn=[];Object.keys(Tt||{}).map(function(Nn){var kn;(Tt==null?void 0:Tt[Nn])!==((kn=Qt.current)===null||kn===void 0?void 0:kn[Nn])&&cn.push(Nn)}),Qt.current=Tt;var hn=React.useRef([]);return cn.length&&(hn.current=cn),React.useDebugValue(Zt.current),React.useDebugValue(hn.current.join(", ")),tn&&console.log("".concat(tn,":"),Zt.current,hn.current),Zt.current}var ke=null,Te=null,Ee=be(76190),Oe=be(33885),je=be(20068),Pe=be(92310),Qe=be.n(Pe),Xe=be(80547),ot=be(97938),He=be(48736),rt=te.createContext({renderWithProps:!1}),Ye=rt,ut="RC_TABLE_KEY";function Ge(Tt){return Tt==null?[]:Array.isArray(Tt)?Tt:[Tt]}function ze(Tt){var tn=[],Zt={};return Tt.forEach(function(Qt){for(var cn=Qt||{},hn=cn.key,Nn=cn.dataIndex,kn=hn||Ge(Nn).join("-")||ut;Zt[kn];)kn="".concat(kn,"_next");Zt[kn]=!0,tn.push(kn)}),tn}function Ve(Tt){return Tt!=null}function $e(Tt){return typeof Tt=="number"&&!Number.isNaN(Tt)}function nt(Tt){return Tt&&(0,Ee.Z)(Tt)==="object"&&!Array.isArray(Tt)&&!te.isValidElement(Tt)}function et(Tt,tn,Zt,Qt,cn,hn){var Nn=te.useContext(Ye),kn=ge(),yn=(0,Xe.Z)(function(){if(Ve(Qt))return[Qt];var Wt=tn==null||tn===""?[]:Array.isArray(tn)?tn:[tn],ln=(0,ot.Z)(Tt,Wt),dn=ln,un=void 0;if(cn){var mn=cn(ln,Tt,Zt);nt(mn)?(dn=mn.children,un=mn.props,Nn.renderWithProps=!0):dn=mn}return[dn,un]},[kn,Tt,Qt,tn,cn,Zt],function(Wt,ln){if(hn){var dn=(0,ie.Z)(Wt,2),un=dn[1],mn=(0,ie.Z)(ln,2),Hn=mn[1];return hn(Hn,un)}return Nn.renderWithProps?!0:!(0,se.Z)(Wt,ln,!0)});return yn}function pt(Tt,tn,Zt,Qt){var cn=Tt+tn-1;return Tt<=Qt&&cn>=Zt}function ct(Tt,tn){return ne(he,function(Zt){var Qt=pt(Tt,tn||1,Zt.hoverStartRow,Zt.hoverEndRow);return[Qt,Zt.onHover]})}var It=be(70425),dt=function(tn){var Zt=tn.ellipsis,Qt=tn.rowType,cn=tn.children,hn,Nn=Zt===!0?{showTitle:!0}:Zt;return Nn&&(Nn.showTitle||Qt==="header")&&(typeof cn=="string"||typeof cn=="number"?hn=cn.toString():te.isValidElement(cn)&&typeof cn.props.children=="string"&&(hn=cn.props.children)),hn};function Mt(Tt){var tn,Zt,Qt,cn,hn,Nn,kn,yn,Wt=Tt.component,ln=Tt.children,dn=Tt.ellipsis,un=Tt.scope,mn=Tt.prefixCls,Hn=Tt.className,vn=Tt.align,fn=Tt.record,Mn=Tt.render,Rn=Tt.dataIndex,Yn=Tt.renderIndex,fr=Tt.shouldCellUpdate,ir=Tt.index,Ir=Tt.rowType,br=Tt.colSpan,Mr=Tt.rowSpan,Wr=Tt.fixLeft,Pr=Tt.fixRight,li=Tt.firstFixLeft,zr=Tt.lastFixLeft,Xr=Tt.firstFixRight,Tr=Tt.lastFixRight,ar=Tt.appendNode,dr=Tt.additionalProps,Nr=dr===void 0?{}:dr,pr=Tt.isSticky,Jr="".concat(mn,"-cell"),ti=ne(he,["supportSticky","allColumnsFixedLeft","rowHoverable"]),di=ti.supportSticky,po=ti.allColumnsFixedLeft,ao=ti.rowHoverable,to=et(fn,Rn,Yn,ln,Mn,fr),mo=(0,ie.Z)(to,2),Ii=mo[0],Ti=mo[1],Pi={},vo=typeof Wr=="number"&&di,Fi=typeof Pr=="number"&&di;vo&&(Pi.position="sticky",Pi.left=Wr),Fi&&(Pi.position="sticky",Pi.right=Pr);var Gi=(tn=(Zt=(Qt=Ti==null?void 0:Ti.colSpan)!==null&&Qt!==void 0?Qt:Nr.colSpan)!==null&&Zt!==void 0?Zt:br)!==null&&tn!==void 0?tn:1,ji=(cn=(hn=(Nn=Ti==null?void 0:Ti.rowSpan)!==null&&Nn!==void 0?Nn:Nr.rowSpan)!==null&&hn!==void 0?hn:Mr)!==null&&cn!==void 0?cn:1,gr=ct(ir,ji),Gr=(0,ie.Z)(gr,2),Zr=Gr[0],Vr=Gr[1],xi=(0,It.zX)(function(Io){var Ui;fn&&Vr(ir,ir+ji-1),Nr==null||(Ui=Nr.onMouseEnter)===null||Ui===void 0||Ui.call(Nr,Io)}),Oi=(0,It.zX)(function(Io){var Ui;fn&&Vr(-1,-1),Nr==null||(Ui=Nr.onMouseLeave)===null||Ui===void 0||Ui.call(Nr,Io)});if(Gi===0||ji===0)return null;var Ao=(kn=Nr.title)!==null&&kn!==void 0?kn:dt({rowType:Ir,ellipsis:dn,children:Ii}),Yi=Qe()(Jr,Hn,(yn={},(0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)(yn,"".concat(Jr,"-fix-left"),vo&&di),"".concat(Jr,"-fix-left-first"),li&&di),"".concat(Jr,"-fix-left-last"),zr&&di),"".concat(Jr,"-fix-left-all"),zr&&po&&di),"".concat(Jr,"-fix-right"),Fi&&di),"".concat(Jr,"-fix-right-first"),Xr&&di),"".concat(Jr,"-fix-right-last"),Tr&&di),"".concat(Jr,"-ellipsis"),dn),"".concat(Jr,"-with-append"),ar),"".concat(Jr,"-fix-sticky"),(vo||Fi)&&pr&&di),(0,je.Z)(yn,"".concat(Jr,"-row-hover"),!Ti&&Zr)),Nr.className,Ti==null?void 0:Ti.className),Xi={};vn&&(Xi.textAlign=vn);var ui=(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({},Ti==null?void 0:Ti.style),Pi),Xi),Nr.style),no=Ii;return(0,Ee.Z)(no)==="object"&&!Array.isArray(no)&&!te.isValidElement(no)&&(no=null),dn&&(zr||Xr)&&(no=te.createElement("span",{className:"".concat(Jr,"-content")},no)),te.createElement(Wt,(0,E.Z)({},Ti,Nr,{className:Yi,style:ui,title:Ao,scope:un,onMouseEnter:ao?xi:void 0,onMouseLeave:ao?Oi:void 0,colSpan:Gi!==1?Gi:null,rowSpan:ji!==1?ji:null}),ar,no)}var xt=te.memo(Mt);function gt(Tt,tn,Zt,Qt,cn){var hn=Zt[Tt]||{},Nn=Zt[tn]||{},kn,yn;hn.fixed==="left"?kn=Qt.left[cn==="rtl"?tn:Tt]:Nn.fixed==="right"&&(yn=Qt.right[cn==="rtl"?Tt:tn]);var Wt=!1,ln=!1,dn=!1,un=!1,mn=Zt[tn+1],Hn=Zt[Tt-1],vn=mn&&!mn.fixed||Hn&&!Hn.fixed||Zt.every(function(fr){return fr.fixed==="left"});if(cn==="rtl"){if(kn!==void 0){var fn=Hn&&Hn.fixed==="left";un=!fn&&vn}else if(yn!==void 0){var Mn=mn&&mn.fixed==="right";dn=!Mn&&vn}}else if(kn!==void 0){var Rn=mn&&mn.fixed==="left";Wt=!Rn&&vn}else if(yn!==void 0){var Yn=Hn&&Hn.fixed==="right";ln=!Yn&&vn}return{fixLeft:kn,fixRight:yn,lastFixLeft:Wt,firstFixRight:ln,lastFixRight:dn,firstFixLeft:un,isSticky:Qt.isSticky}}var _t=te.createContext({}),We=_t;function Ae(Tt){var tn=Tt.className,Zt=Tt.index,Qt=Tt.children,cn=Tt.colSpan,hn=cn===void 0?1:cn,Nn=Tt.rowSpan,kn=Tt.align,yn=ne(he,["prefixCls","direction"]),Wt=yn.prefixCls,ln=yn.direction,dn=te.useContext(We),un=dn.scrollColumnIndex,mn=dn.stickyOffsets,Hn=dn.flattenColumns,vn=Zt+hn-1,fn=vn+1===un?hn+1:hn,Mn=gt(Zt,Zt+fn-1,Hn,mn,ln);return te.createElement(xt,(0,E.Z)({className:tn,index:Zt,component:"td",prefixCls:Wt,record:null,dataIndex:null,align:kn,colSpan:fn,rowSpan:Nn,render:function(){return Qt}},Mn))}var Se=be(75931),Be=["children"];function Ke(Tt){var tn=Tt.children,Zt=(0,Se.Z)(Tt,Be);return te.createElement("tr",Zt,tn)}function Ne(Tt){var tn=Tt.children;return tn}Ne.Row=Ke,Ne.Cell=Ae;var De=Ne;function we(Tt){var tn=Tt.children,Zt=Tt.stickyOffsets,Qt=Tt.flattenColumns,cn=ne(he,"prefixCls"),hn=Qt.length-1,Nn=Qt[hn],kn=te.useMemo(function(){return{stickyOffsets:Zt,flattenColumns:Qt,scrollColumnIndex:Nn!=null&&Nn.scrollbar?hn:null}},[Nn,Qt,hn,Zt]);return te.createElement(We.Provider,{value:kn},te.createElement("tfoot",{className:"".concat(cn,"-summary")},tn))}var Le=me(we),Ue=De,Me=be(29301),Re=be(24514),tt=be(75152),lt=be(26112);function Pt(Tt,tn,Zt,Qt,cn,hn,Nn){Tt.push({record:tn,indent:Zt,index:Nn});var kn=hn(tn),yn=cn==null?void 0:cn.has(kn);if(tn&&Array.isArray(tn[Qt])&&yn)for(var Wt=0;Wt<tn[Qt].length;Wt+=1)Pt(Tt,tn[Qt][Wt],Zt+1,Qt,cn,hn,Wt)}function Ct(Tt,tn,Zt,Qt){var cn=te.useMemo(function(){if(Zt!=null&&Zt.size){for(var hn=[],Nn=0;Nn<(Tt==null?void 0:Tt.length);Nn+=1){var kn=Tt[Nn];Pt(hn,kn,0,tn,Zt,Qt,Nn)}return hn}return Tt==null?void 0:Tt.map(function(yn,Wt){return{record:yn,indent:0,index:Wt}})},[Tt,tn,Zt,Qt]);return cn}function vt(Tt,tn,Zt,Qt){var cn=ne(he,["prefixCls","fixedInfoList","flattenColumns","expandableType","expandRowByClick","onTriggerExpand","rowClassName","expandedRowClassName","indentSize","expandIcon","expandedRowRender","expandIconColumnIndex","expandedKeys","childrenColumnName","rowExpandable","onRow"]),hn=cn.flattenColumns,Nn=cn.expandableType,kn=cn.expandedKeys,yn=cn.childrenColumnName,Wt=cn.onTriggerExpand,ln=cn.rowExpandable,dn=cn.onRow,un=cn.expandRowByClick,mn=cn.rowClassName,Hn=Nn==="nest",vn=Nn==="row"&&(!ln||ln(Tt)),fn=vn||Hn,Mn=kn&&kn.has(tn),Rn=yn&&Tt&&Tt[yn],Yn=(0,It.zX)(Wt),fr=dn==null?void 0:dn(Tt,Zt),ir=fr==null?void 0:fr.onClick,Ir=function(Pr){un&&fn&&Wt(Tt,Pr);for(var li=arguments.length,zr=new Array(li>1?li-1:0),Xr=1;Xr<li;Xr++)zr[Xr-1]=arguments[Xr];ir==null||ir.apply(void 0,[Pr].concat(zr))},br;typeof mn=="string"?br=mn:typeof mn=="function"&&(br=mn(Tt,Zt,Qt));var Mr=ze(hn);return(0,Oe.Z)((0,Oe.Z)({},cn),{},{columnsKey:Mr,nestExpandable:Hn,expanded:Mn,hasNestChildren:Rn,record:Tt,onTriggerExpand:Yn,rowSupportExpand:vn,expandable:fn,rowProps:(0,Oe.Z)((0,Oe.Z)({},fr),{},{className:Qe()(br,fr==null?void 0:fr.className),onClick:Ir})})}function Ot(Tt){var tn=Tt.prefixCls,Zt=Tt.children,Qt=Tt.component,cn=Tt.cellComponent,hn=Tt.className,Nn=Tt.expanded,kn=Tt.colSpan,yn=Tt.isEmpty,Wt=ne(he,["scrollbarSize","fixHeader","fixColumn","componentWidth","horizonScroll"]),ln=Wt.scrollbarSize,dn=Wt.fixHeader,un=Wt.fixColumn,mn=Wt.componentWidth,Hn=Wt.horizonScroll,vn=Zt;return(yn?Hn&&mn:un)&&(vn=te.createElement("div",{style:{width:mn-(dn&&!yn?ln:0),position:"sticky",left:0,overflow:"hidden"},className:"".concat(tn,"-expanded-row-fixed")},vn)),te.createElement(Qt,{className:hn,style:{display:Nn?null:"none"}},te.createElement(xt,{component:cn,prefixCls:tn,colSpan:kn},vn))}var zt=Ot;function Ft(Tt){var tn=Tt.prefixCls,Zt=Tt.record,Qt=Tt.onExpand,cn=Tt.expanded,hn=Tt.expandable,Nn="".concat(tn,"-row-expand-icon");if(!hn)return te.createElement("span",{className:Qe()(Nn,"".concat(tn,"-row-spaced"))});var kn=function(Wt){Qt(Zt,Wt),Wt.stopPropagation()};return te.createElement("span",{className:Qe()(Nn,(0,je.Z)((0,je.Z)({},"".concat(tn,"-row-expanded"),cn),"".concat(tn,"-row-collapsed"),!cn)),onClick:kn})}function yt(Tt,tn,Zt){var Qt=[];function cn(hn){(hn||[]).forEach(function(Nn,kn){Qt.push(tn(Nn,kn)),cn(Nn[Zt])})}return cn(Tt),Qt}function Xt(Tt,tn,Zt,Qt){return typeof Tt=="string"?Tt:typeof Tt=="function"?Tt(tn,Zt,Qt):""}function Lt(Tt,tn,Zt,Qt,cn){var hn=Tt.record,Nn=Tt.prefixCls,kn=Tt.columnsKey,yn=Tt.fixedInfoList,Wt=Tt.expandIconColumnIndex,ln=Tt.nestExpandable,dn=Tt.indentSize,un=Tt.expandIcon,mn=Tt.expanded,Hn=Tt.hasNestChildren,vn=Tt.onTriggerExpand,fn=kn[Zt],Mn=yn[Zt],Rn;Zt===(Wt||0)&&ln&&(Rn=te.createElement(te.Fragment,null,te.createElement("span",{style:{paddingLeft:"".concat(dn*Qt,"px")},className:"".concat(Nn,"-row-indent indent-level-").concat(Qt)}),un({prefixCls:Nn,expanded:mn,expandable:Hn,record:hn,onExpand:vn})));var Yn;return tn.onCell&&(Yn=tn.onCell(hn,cn)),{key:fn,fixedInfo:Mn,appendCellNode:Rn,additionalCellProps:Yn||{}}}function Kt(Tt){var tn=Tt.className,Zt=Tt.style,Qt=Tt.record,cn=Tt.index,hn=Tt.renderIndex,Nn=Tt.rowKey,kn=Tt.indent,yn=kn===void 0?0:kn,Wt=Tt.rowComponent,ln=Tt.cellComponent,dn=Tt.scopeCellComponent,un=vt(Qt,Nn,cn,yn),mn=un.prefixCls,Hn=un.flattenColumns,vn=un.expandedRowClassName,fn=un.expandedRowRender,Mn=un.rowProps,Rn=un.expanded,Yn=un.rowSupportExpand,fr=te.useRef(!1);fr.current||(fr.current=Rn);var ir=Xt(vn,Qt,cn,yn),Ir=te.createElement(Wt,(0,E.Z)({},Mn,{"data-row-key":Nn,className:Qe()(tn,"".concat(mn,"-row"),"".concat(mn,"-row-level-").concat(yn),Mn==null?void 0:Mn.className,(0,je.Z)({},ir,yn>=1)),style:(0,Oe.Z)((0,Oe.Z)({},Zt),Mn==null?void 0:Mn.style)}),Hn.map(function(Wr,Pr){var li=Wr.render,zr=Wr.dataIndex,Xr=Wr.className,Tr=Lt(un,Wr,Pr,yn,cn),ar=Tr.key,dr=Tr.fixedInfo,Nr=Tr.appendCellNode,pr=Tr.additionalCellProps;return te.createElement(xt,(0,E.Z)({className:Xr,ellipsis:Wr.ellipsis,align:Wr.align,scope:Wr.rowScope,component:Wr.rowScope?dn:ln,prefixCls:mn,key:ar,record:Qt,index:cn,renderIndex:hn,dataIndex:zr,render:li,shouldCellUpdate:Wr.shouldCellUpdate},dr,{appendNode:Nr,additionalProps:pr}))})),br;if(Yn&&(fr.current||Rn)){var Mr=fn(Qt,cn,yn+1,Rn);br=te.createElement(zt,{expanded:Rn,className:Qe()("".concat(mn,"-expanded-row"),"".concat(mn,"-expanded-row-level-").concat(yn+1),ir),prefixCls:mn,component:Wt,cellComponent:ln,colSpan:Hn.length,isEmpty:!1},Mr)}return te.createElement(te.Fragment,null,Ir,br)}var sn=me(Kt);function Sn(Tt){var tn=Tt.columnKey,Zt=Tt.onColumnResize,Qt=te.useRef();return(0,ue.Z)(function(){Qt.current&&Zt(tn,Qt.current.offsetWidth)},[]),te.createElement(Me.Z,{data:tn},te.createElement("td",{ref:Qt,style:{padding:0,border:0,height:0}},te.createElement("div",{style:{height:0,overflow:"hidden"}},"\xA0")))}var Yt=be(29194);function In(Tt){var tn=Tt.prefixCls,Zt=Tt.columnsKey,Qt=Tt.onColumnResize,cn=te.useRef(null);return te.createElement("tr",{"aria-hidden":"true",className:"".concat(tn,"-measure-row"),style:{height:0,fontSize:0},ref:cn},te.createElement(Me.Z.Collection,{onBatchResize:function(Nn){(0,Yt.Z)(cn.current)&&Nn.forEach(function(kn){var yn=kn.data,Wt=kn.size;Qt(yn,Wt.offsetWidth)})}},Zt.map(function(hn){return te.createElement(Sn,{key:hn,columnKey:hn,onColumnResize:Qt})})))}function Kn(Tt){var tn=Tt.data,Zt=Tt.measureColumnWidth,Qt=ne(he,["prefixCls","getComponent","onColumnResize","flattenColumns","getRowKey","expandedKeys","childrenColumnName","emptyNode"]),cn=Qt.prefixCls,hn=Qt.getComponent,Nn=Qt.onColumnResize,kn=Qt.flattenColumns,yn=Qt.getRowKey,Wt=Qt.expandedKeys,ln=Qt.childrenColumnName,dn=Qt.emptyNode,un=Ct(tn,ln,Wt,yn),mn=te.useRef({renderWithProps:!1}),Hn=hn(["body","wrapper"],"tbody"),vn=hn(["body","row"],"tr"),fn=hn(["body","cell"],"td"),Mn=hn(["body","cell"],"th"),Rn;tn.length?Rn=un.map(function(fr,ir){var Ir=fr.record,br=fr.indent,Mr=fr.index,Wr=yn(Ir,ir);return te.createElement(sn,{key:Wr,rowKey:Wr,record:Ir,index:ir,renderIndex:Mr,rowComponent:vn,cellComponent:fn,scopeCellComponent:Mn,indent:br})}):Rn=te.createElement(zt,{expanded:!0,className:"".concat(cn,"-placeholder"),prefixCls:cn,component:vn,cellComponent:fn,colSpan:kn.length,isEmpty:!0},dn);var Yn=ze(kn);return te.createElement(Ye.Provider,{value:mn.current},te.createElement(Hn,{className:"".concat(cn,"-tbody")},Zt&&te.createElement(In,{prefixCls:cn,columnsKey:Yn,onColumnResize:Nn}),Rn))}var Gn=me(Kn),nr=be(54451),hr=["columnType"];function ur(Tt){for(var tn=Tt.colWidths,Zt=Tt.columns,Qt=Tt.columCount,cn=ne(he,["tableLayout"]),hn=cn.tableLayout,Nn=[],kn=Qt||Zt.length,yn=!1,Wt=kn-1;Wt>=0;Wt-=1){var ln=tn[Wt],dn=Zt&&Zt[Wt],un=void 0,mn=void 0;if(dn&&(un=dn[nr.v],hn==="auto"&&(mn=dn.minWidth)),ln||mn||un||yn){var Hn=un||{},vn=Hn.columnType,fn=(0,Se.Z)(Hn,hr);Nn.unshift(te.createElement("col",(0,E.Z)({key:Wt,style:{width:ln,minWidth:mn}},fn))),yn=!0}}return te.createElement("colgroup",null,Nn)}var Un=ur,Fn=be(94480),or=["className","noData","columns","flattenColumns","colWidths","columCount","stickyOffsets","direction","fixHeader","stickyTopOffset","stickyBottomOffset","stickyClassName","onScroll","maxContentScroll","children"];function Vn(Tt,tn){return(0,te.useMemo)(function(){for(var Zt=[],Qt=0;Qt<tn;Qt+=1){var cn=Tt[Qt];if(cn!==void 0)Zt[Qt]=cn;else return null}return Zt},[Tt.join("_"),tn])}var Bn=te.forwardRef(function(Tt,tn){var Zt=Tt.className,Qt=Tt.noData,cn=Tt.columns,hn=Tt.flattenColumns,Nn=Tt.colWidths,kn=Tt.columCount,yn=Tt.stickyOffsets,Wt=Tt.direction,ln=Tt.fixHeader,dn=Tt.stickyTopOffset,un=Tt.stickyBottomOffset,mn=Tt.stickyClassName,Hn=Tt.onScroll,vn=Tt.maxContentScroll,fn=Tt.children,Mn=(0,Se.Z)(Tt,or),Rn=ne(he,["prefixCls","scrollbarSize","isSticky","getComponent"]),Yn=Rn.prefixCls,fr=Rn.scrollbarSize,ir=Rn.isSticky,Ir=Rn.getComponent,br=Ir(["header","table"],"table"),Mr=ir&&!ln?0:fr,Wr=te.useRef(null),Pr=te.useCallback(function(pr){(0,b.mH)(tn,pr),(0,b.mH)(Wr,pr)},[]);te.useEffect(function(){var pr;function Jr(ti){var di=ti,po=di.currentTarget,ao=di.deltaX;ao&&(Hn({currentTarget:po,scrollLeft:po.scrollLeft+ao}),ti.preventDefault())}return(pr=Wr.current)===null||pr===void 0||pr.addEventListener("wheel",Jr,{passive:!1}),function(){var ti;(ti=Wr.current)===null||ti===void 0||ti.removeEventListener("wheel",Jr)}},[]);var li=te.useMemo(function(){return hn.every(function(pr){return pr.width})},[hn]),zr=hn[hn.length-1],Xr={fixed:zr?zr.fixed:null,scrollbar:!0,onHeaderCell:function(){return{className:"".concat(Yn,"-cell-scrollbar")}}},Tr=(0,te.useMemo)(function(){return Mr?[].concat((0,Fn.Z)(cn),[Xr]):cn},[Mr,cn]),ar=(0,te.useMemo)(function(){return Mr?[].concat((0,Fn.Z)(hn),[Xr]):hn},[Mr,hn]),dr=(0,te.useMemo)(function(){var pr=yn.right,Jr=yn.left;return(0,Oe.Z)((0,Oe.Z)({},yn),{},{left:Wt==="rtl"?[].concat((0,Fn.Z)(Jr.map(function(ti){return ti+Mr})),[0]):Jr,right:Wt==="rtl"?pr:[].concat((0,Fn.Z)(pr.map(function(ti){return ti+Mr})),[0]),isSticky:ir})},[Mr,yn,ir]),Nr=Vn(Nn,kn);return te.createElement("div",{style:(0,Oe.Z)({overflow:"hidden"},ir?{top:dn,bottom:un}:{}),ref:Pr,className:Qe()(Zt,(0,je.Z)({},mn,!!mn))},te.createElement(br,{style:{tableLayout:"fixed",visibility:Qt||Nr?null:"hidden"}},(!Qt||!vn||li)&&te.createElement(Un,{colWidths:Nr?[].concat((0,Fn.Z)(Nr),[Mr]):[],columCount:kn+1,columns:ar}),fn((0,Oe.Z)((0,Oe.Z)({},Mn),{},{stickyOffsets:dr,columns:Tr,flattenColumns:ar}))))}),_n=te.memo(Bn),zn=function(tn){var Zt=tn.cells,Qt=tn.stickyOffsets,cn=tn.flattenColumns,hn=tn.rowComponent,Nn=tn.cellComponent,kn=tn.onHeaderRow,yn=tn.index,Wt=ne(he,["prefixCls","direction"]),ln=Wt.prefixCls,dn=Wt.direction,un;kn&&(un=kn(Zt.map(function(Hn){return Hn.column}),yn));var mn=ze(Zt.map(function(Hn){return Hn.column}));return te.createElement(hn,un,Zt.map(function(Hn,vn){var fn=Hn.column,Mn=gt(Hn.colStart,Hn.colEnd,cn,Qt,dn),Rn;return fn&&fn.onHeaderCell&&(Rn=Hn.column.onHeaderCell(fn)),te.createElement(xt,(0,E.Z)({},Hn,{scope:fn.title?Hn.colSpan>1?"colgroup":"col":null,ellipsis:fn.ellipsis,align:fn.align,component:Nn,prefixCls:ln,key:mn[vn]},Mn,{additionalProps:Rn,rowType:"header"}))}))},cr=zn;function Dn(Tt){var tn=[];function Zt(Nn,kn){var yn=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;tn[yn]=tn[yn]||[];var Wt=kn,ln=Nn.filter(Boolean).map(function(dn){var un={key:dn.key,className:dn.className||"",children:dn.title,column:dn,colStart:Wt},mn=1,Hn=dn.children;return Hn&&Hn.length>0&&(mn=Zt(Hn,Wt,yn+1).reduce(function(vn,fn){return vn+fn},0),un.hasSubColumns=!0),"colSpan"in dn&&(mn=dn.colSpan),"rowSpan"in dn&&(un.rowSpan=dn.rowSpan),un.colSpan=mn,un.colEnd=un.colStart+mn-1,tn[yn].push(un),Wt+=mn,mn});return ln}Zt(Tt,0);for(var Qt=tn.length,cn=function(kn){tn[kn].forEach(function(yn){!("rowSpan"in yn)&&!yn.hasSubColumns&&(yn.rowSpan=Qt-kn)})},hn=0;hn<Qt;hn+=1)cn(hn);return tn}var Cn=function(tn){var Zt=tn.stickyOffsets,Qt=tn.columns,cn=tn.flattenColumns,hn=tn.onHeaderRow,Nn=ne(he,["prefixCls","getComponent"]),kn=Nn.prefixCls,yn=Nn.getComponent,Wt=te.useMemo(function(){return Dn(Qt)},[Qt]),ln=yn(["header","wrapper"],"thead"),dn=yn(["header","row"],"tr"),un=yn(["header","cell"],"th");return te.createElement(ln,{className:"".concat(kn,"-thead")},Wt.map(function(mn,Hn){var vn=te.createElement(cr,{key:Hn,flattenColumns:cn,cells:mn,stickyOffsets:Zt,rowComponent:dn,cellComponent:un,onHeaderRow:hn,index:Hn});return vn}))},er=me(Cn),$t=be(97347);function Ie(Tt,tn,Zt){var Qt=(0,nr.g)(Tt),cn=Qt.expandIcon,hn=Qt.expandedRowKeys,Nn=Qt.defaultExpandedRowKeys,kn=Qt.defaultExpandAllRows,yn=Qt.expandedRowRender,Wt=Qt.onExpand,ln=Qt.onExpandedRowsChange,dn=Qt.childrenColumnName,un=cn||Ft,mn=dn||"children",Hn=te.useMemo(function(){return yn?"row":Tt.expandable&&Tt.internalHooks===ce.R&&Tt.expandable.__PARENT_RENDER_ICON__||tn.some(function(ir){return ir&&(0,Ee.Z)(ir)==="object"&&ir[mn]})?"nest":!1},[!!yn,tn]),vn=te.useState(function(){return Nn||(kn?yt(tn,Zt,mn):[])}),fn=(0,ie.Z)(vn,2),Mn=fn[0],Rn=fn[1],Yn=te.useMemo(function(){return new Set(hn||Mn||[])},[hn,Mn]),fr=te.useCallback(function(ir){var Ir=Zt(ir,tn.indexOf(ir)),br,Mr=Yn.has(Ir);Mr?(Yn.delete(Ir),br=(0,Fn.Z)(Yn)):br=[].concat((0,Fn.Z)(Yn),[Ir]),Rn(br),Wt&&Wt(!Mr,ir),ln&&ln(br)},[Zt,Yn,tn,Wt,ln]);return[Qt,Hn,Yn,un,mn,fr]}function Ze(Tt,tn,Zt){var Qt=Tt.map(function(cn,hn){return gt(hn,hn,Tt,tn,Zt)});return(0,Xe.Z)(function(){return Qt},[Qt],function(cn,hn){return!(0,se.Z)(cn,hn)})}function qe(Tt){var tn=(0,te.useRef)(Tt),Zt=(0,te.useState)({}),Qt=(0,ie.Z)(Zt,2),cn=Qt[1],hn=(0,te.useRef)(null),Nn=(0,te.useRef)([]);function kn(yn){Nn.current.push(yn);var Wt=Promise.resolve();hn.current=Wt,Wt.then(function(){if(hn.current===Wt){var ln=Nn.current,dn=tn.current;Nn.current=[],ln.forEach(function(un){tn.current=un(tn.current)}),hn.current=null,dn!==tn.current&&cn({})}})}return(0,te.useEffect)(function(){return function(){hn.current=null}},[]),[tn.current,kn]}function st(Tt){var tn=(0,te.useRef)(Tt||null),Zt=(0,te.useRef)();function Qt(){window.clearTimeout(Zt.current)}function cn(Nn){tn.current=Nn,Qt(),Zt.current=window.setTimeout(function(){tn.current=null,Zt.current=void 0},100)}function hn(){return tn.current}return(0,te.useEffect)(function(){return Qt},[]),[cn,hn]}function mt(){var Tt=te.useState(-1),tn=(0,ie.Z)(Tt,2),Zt=tn[0],Qt=tn[1],cn=te.useState(-1),hn=(0,ie.Z)(cn,2),Nn=hn[0],kn=hn[1],yn=te.useCallback(function(Wt,ln){Qt(Wt),kn(ln)},[]);return[Zt,Nn,yn]}var Nt=be(47273),kt=(0,Nt.Z)()?window:null;function Bt(Tt,tn){var Zt=(0,Ee.Z)(Tt)==="object"?Tt:{},Qt=Zt.offsetHeader,cn=Qt===void 0?0:Qt,hn=Zt.offsetSummary,Nn=hn===void 0?0:hn,kn=Zt.offsetScroll,yn=kn===void 0?0:kn,Wt=Zt.getContainer,ln=Wt===void 0?function(){return kt}:Wt,dn=ln()||kt,un=!!Tt;return te.useMemo(function(){return{isSticky:un,stickyClassName:un?"".concat(tn,"-sticky-holder"):"",offsetHeader:cn,offsetSummary:Nn,offsetScroll:yn,container:dn}},[un,yn,cn,Nn,tn,dn])}function Jt(Tt,tn,Zt){var Qt=(0,te.useMemo)(function(){var cn=tn.length,hn=function(Wt,ln,dn){for(var un=[],mn=0,Hn=Wt;Hn!==ln;Hn+=dn)un.push(mn),tn[Hn].fixed&&(mn+=Tt[Hn]||0);return un},Nn=hn(0,cn,1),kn=hn(cn-1,-1,-1).reverse();return Zt==="rtl"?{left:kn,right:Nn}:{left:Nn,right:kn}},[Tt,tn,Zt]);return Qt}var En=Jt;function qn(Tt){var tn=Tt.className,Zt=Tt.children;return te.createElement("div",{className:tn},Zt)}var At=qn,St=be(8224),an=be(16089),Ht=be(76846);function Et(Tt){var tn=(0,Ht.bn)(Tt),Zt=tn.getBoundingClientRect(),Qt=document.documentElement;return{left:Zt.left+(window.pageXOffset||Qt.scrollLeft)-(Qt.clientLeft||document.body.clientLeft||0),top:Zt.top+(window.pageYOffset||Qt.scrollTop)-(Qt.clientTop||document.body.clientTop||0)}}var Ut=function(tn,Zt){var Qt,cn,hn=tn.scrollBodyRef,Nn=tn.onScroll,kn=tn.offsetScroll,yn=tn.container,Wt=tn.direction,ln=ne(he,"prefixCls"),dn=((Qt=hn.current)===null||Qt===void 0?void 0:Qt.scrollWidth)||0,un=((cn=hn.current)===null||cn===void 0?void 0:cn.clientWidth)||0,mn=dn&&un*(un/dn),Hn=te.useRef(),vn=qe({scrollLeft:0,isHiddenScrollBar:!0}),fn=(0,ie.Z)(vn,2),Mn=fn[0],Rn=fn[1],Yn=te.useRef({delta:0,x:0}),fr=te.useState(!1),ir=(0,ie.Z)(fr,2),Ir=ir[0],br=ir[1],Mr=te.useRef(null);te.useEffect(function(){return function(){an.Z.cancel(Mr.current)}},[]);var Wr=function(){br(!1)},Pr=function(ar){ar.persist(),Yn.current.delta=ar.pageX-Mn.scrollLeft,Yn.current.x=0,br(!0),ar.preventDefault()},li=function(ar){var dr,Nr=ar||((dr=window)===null||dr===void 0?void 0:dr.event),pr=Nr.buttons;if(!Ir||pr===0){Ir&&br(!1);return}var Jr=Yn.current.x+ar.pageX-Yn.current.x-Yn.current.delta,ti=Wt==="rtl";Jr=Math.max(ti?mn-un:0,Math.min(ti?0:un-mn,Jr));var di=!ti||Math.abs(Jr)+Math.abs(mn)<un;di&&(Nn({scrollLeft:Jr/un*(dn+2)}),Yn.current.x=ar.pageX)},zr=function(){an.Z.cancel(Mr.current),Mr.current=(0,an.Z)(function(){if(hn.current){var ar=Et(hn.current).top,dr=ar+hn.current.offsetHeight,Nr=yn===window?document.documentElement.scrollTop+window.innerHeight:Et(yn).top+yn.clientHeight;dr-(0,tt.Z)()<=Nr||ar>=Nr-kn?Rn(function(pr){return(0,Oe.Z)((0,Oe.Z)({},pr),{},{isHiddenScrollBar:!0})}):Rn(function(pr){return(0,Oe.Z)((0,Oe.Z)({},pr),{},{isHiddenScrollBar:!1})})}})},Xr=function(ar){Rn(function(dr){return(0,Oe.Z)((0,Oe.Z)({},dr),{},{scrollLeft:ar/dn*un||0})})};return te.useImperativeHandle(Zt,function(){return{setScrollLeft:Xr,checkScrollBarVisible:zr}}),te.useEffect(function(){var Tr=(0,St.Z)(document.body,"mouseup",Wr,!1),ar=(0,St.Z)(document.body,"mousemove",li,!1);return zr(),function(){Tr.remove(),ar.remove()}},[mn,Ir]),te.useEffect(function(){if(hn.current){for(var Tr=[],ar=(0,Ht.bn)(hn.current);ar;)Tr.push(ar),ar=ar.parentElement;return Tr.forEach(function(dr){return dr.addEventListener("scroll",zr,!1)}),window.addEventListener("resize",zr,!1),window.addEventListener("scroll",zr,!1),yn.addEventListener("scroll",zr,!1),function(){Tr.forEach(function(dr){return dr.removeEventListener("scroll",zr)}),window.removeEventListener("resize",zr),window.removeEventListener("scroll",zr),yn.removeEventListener("scroll",zr)}}},[yn]),te.useEffect(function(){Mn.isHiddenScrollBar||Rn(function(Tr){var ar=hn.current;return ar?(0,Oe.Z)((0,Oe.Z)({},Tr),{},{scrollLeft:ar.scrollLeft/ar.scrollWidth*ar.clientWidth}):Tr})},[Mn.isHiddenScrollBar]),dn<=un||!mn||Mn.isHiddenScrollBar?null:te.createElement("div",{style:{height:(0,tt.Z)(),width:un,bottom:kn},className:"".concat(ln,"-sticky-scroll")},te.createElement("div",{onMouseDown:Pr,ref:Hn,className:Qe()("".concat(ln,"-sticky-scroll-bar"),(0,je.Z)({},"".concat(ln,"-sticky-scroll-bar-active"),Ir)),style:{width:"".concat(mn,"px"),transform:"translate3d(".concat(Mn.scrollLeft,"px, 0, 0)")}}))},nn=te.forwardRef(Ut);function rn(Tt){return null}var gn=rn;function bn(Tt){return null}var An=bn,Gt="rc-table",Vt=[],wn={};function jn(){return"No Data"}function Wn(Tt,tn){var Zt=(0,Oe.Z)({rowKey:"key",prefixCls:Gt,emptyText:jn},Tt),Qt=Zt.prefixCls,cn=Zt.className,hn=Zt.rowClassName,Nn=Zt.style,kn=Zt.data,yn=Zt.rowKey,Wt=Zt.scroll,ln=Zt.tableLayout,dn=Zt.direction,un=Zt.title,mn=Zt.footer,Hn=Zt.summary,vn=Zt.caption,fn=Zt.id,Mn=Zt.showHeader,Rn=Zt.components,Yn=Zt.emptyText,fr=Zt.onRow,ir=Zt.onHeaderRow,Ir=Zt.onScroll,br=Zt.internalHooks,Mr=Zt.transformColumns,Wr=Zt.internalRefs,Pr=Zt.tailor,li=Zt.getContainerWidth,zr=Zt.sticky,Xr=Zt.rowHoverable,Tr=Xr===void 0?!0:Xr,ar=kn||Vt,dr=!!ar.length,Nr=br===ce.R,pr=te.useCallback(function(hi,yr){return(0,ot.Z)(Rn,hi)||yr},[Rn]),Jr=te.useMemo(function(){return typeof yn=="function"?yn:function(hi){var yr=hi&&hi[yn];return yr}},[yn]),ti=pr(["body"]),di=mt(),po=(0,ie.Z)(di,3),ao=po[0],to=po[1],mo=po[2],Ii=Ie(Zt,ar,Jr),Ti=(0,ie.Z)(Ii,6),Pi=Ti[0],vo=Ti[1],Fi=Ti[2],Gi=Ti[3],ji=Ti[4],gr=Ti[5],Gr=Wt==null?void 0:Wt.x,Zr=te.useState(0),Vr=(0,ie.Z)(Zr,2),xi=Vr[0],Oi=Vr[1],Ao=(0,$t.Z)((0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({},Zt),Pi),{},{expandable:!!Pi.expandedRowRender,columnTitle:Pi.columnTitle,expandedKeys:Fi,getRowKey:Jr,onTriggerExpand:gr,expandIcon:Gi,expandIconColumnIndex:Pi.expandIconColumnIndex,direction:dn,scrollWidth:Nr&&Pr&&typeof Gr=="number"?Gr:null,clientWidth:xi}),Nr?Mr:null),Yi=(0,ie.Z)(Ao,4),Xi=Yi[0],ui=Yi[1],no=Yi[2],Io=Yi[3],Ui=no!=null?no:Gr,Ho=te.useMemo(function(){return{columns:Xi,flattenColumns:ui}},[Xi,ui]),Co=te.useRef(),Oo=te.useRef(),Ki=te.useRef(),Wo=te.useRef();te.useImperativeHandle(tn,function(){return{nativeElement:Co.current,scrollTo:function(yr){var Ci;if(Ki.current instanceof HTMLElement){var So=yr.index,Ni=yr.top,Na=yr.key;if($e(Ni)){var va;(va=Ki.current)===null||va===void 0||va.scrollTo({top:Ni})}else{var Aa,Po=Na!=null?Na:Jr(ar[So]);(Aa=Ki.current.querySelector('[data-row-key="'.concat(Po,'"]')))===null||Aa===void 0||Aa.scrollIntoView()}}else(Ci=Ki.current)!==null&&Ci!==void 0&&Ci.scrollTo&&Ki.current.scrollTo(yr)}}});var za=te.useRef(),Yo=te.useState(!1),la=(0,ie.Z)(Yo,2),Zo=la[0],Da=la[1],qa=te.useState(!1),ba=(0,ie.Z)(qa,2),cs=ba[0],Ma=ba[1],Ha=te.useState(new Map),Ra=(0,ie.Z)(Ha,2),pa=Ra[0],Wa=Ra[1],Ja=ze(ui),Sa=Ja.map(function(hi){return pa.get(hi)}),wa=te.useMemo(function(){return Sa},[Sa.join("_")]),ua=En(wa,ui,dn),To=Wt&&Ve(Wt.y),qi=Wt&&Ve(Ui)||!!Pi.fixed,vi=qi&&ui.some(function(hi){var yr=hi.fixed;return yr}),ai=te.useRef(),ro=Bt(zr,Qt),Ji=ro.isSticky,io=ro.offsetHeader,co=ro.offsetSummary,na=ro.offsetScroll,Go=ro.stickyClassName,ca=ro.container,Qi=te.useMemo(function(){return Hn==null?void 0:Hn(ar)},[Hn,ar]),yo=(To||Ji)&&te.isValidElement(Qi)&&Qi.type===De&&Qi.props.fixed,Fo,Xo,Ia;To&&(Xo={overflowY:dr?"scroll":"auto",maxHeight:Wt.y}),qi&&(Fo={overflowX:"auto"},To||(Xo={overflowY:"hidden"}),Ia={width:Ui===!0?"auto":Ui,minWidth:"100%"});var ds=te.useCallback(function(hi,yr){Wa(function(Ci){if(Ci.get(hi)!==yr){var So=new Map(Ci);return So.set(hi,yr),So}return Ci})},[]),fs=st(null),da=(0,ie.Z)(fs,2),_o=da[0],Eo=da[1];function ko(hi,yr){yr&&(typeof yr=="function"?yr(hi):yr.scrollLeft!==hi&&(yr.scrollLeft=hi,yr.scrollLeft!==hi&&setTimeout(function(){yr.scrollLeft=hi},0)))}var Ko=(0,Ce.Z)(function(hi){var yr=hi.currentTarget,Ci=hi.scrollLeft,So=dn==="rtl",Ni=typeof Ci=="number"?Ci:yr.scrollLeft,Na=yr||wn;if(!Eo()||Eo()===Na){var va;_o(Na),ko(Ni,Oo.current),ko(Ni,Ki.current),ko(Ni,za.current),ko(Ni,(va=ai.current)===null||va===void 0?void 0:va.setScrollLeft)}var Aa=yr||Oo.current;if(Aa){var Po=Nr&&Pr&&typeof Ui=="number"?Ui:Aa.scrollWidth,fa=Aa.clientWidth;if(Po===fa){Da(!1),Ma(!1);return}So?(Da(-Ni<Po-fa),Ma(-Ni>0)):(Da(Ni>0),Ma(Ni<Po-fa))}}),Qa=(0,Ce.Z)(function(hi){Ko(hi),Ir==null||Ir(hi)}),xa=function(){if(qi&&Ki.current){var yr;Ko({currentTarget:(0,Ht.bn)(Ki.current),scrollLeft:(yr=Ki.current)===null||yr===void 0?void 0:yr.scrollLeft})}else Da(!1),Ma(!1)},_s=function(yr){var Ci,So=yr.width;(Ci=ai.current)===null||Ci===void 0||Ci.checkScrollBarVisible();var Ni=Co.current?Co.current.offsetWidth:So;Nr&&li&&Co.current&&(Ni=li(Co.current,Ni)||Ni),Ni!==xi&&(xa(),Oi(Ni))},Oa=te.useRef(!1);te.useEffect(function(){Oa.current&&xa()},[qi,kn,Xi.length]),te.useEffect(function(){Oa.current=!0},[]);var bs=te.useState(0),$a=(0,ie.Z)(bs,2),Ca=$a[0],Ss=$a[1],es=te.useState(!0),ra=(0,ie.Z)(es,2),Za=ra[0],Ea=ra[1];(0,ue.Z)(function(){(!Pr||!Nr)&&(Ki.current instanceof Element?Ss((0,tt.o)(Ki.current).width):Ss((0,tt.o)(Wo.current).width)),Ea((0,Re.G)("position","sticky"))},[]),te.useEffect(function(){Nr&&Wr&&(Wr.body.current=Ki.current)});var Ga=te.useCallback(function(hi){return te.createElement(te.Fragment,null,te.createElement(er,hi),yo==="top"&&te.createElement(Le,hi,Qi))},[yo,Qi]),ts=te.useCallback(function(hi){return te.createElement(Le,hi,Qi)},[Qi]),hs=pr(["table"],"table"),ka=te.useMemo(function(){return ln||(vi?Ui==="max-content"?"auto":"fixed":To||Ji||ui.some(function(hi){var yr=hi.ellipsis;return yr})?"fixed":"auto")},[To,vi,ui,ln,Ji]),ps,ms={colWidths:wa,columCount:ui.length,stickyOffsets:ua,onHeaderRow:ir,fixHeader:To,scroll:Wt},ws=te.useMemo(function(){return dr?null:typeof Yn=="function"?Yn():Yn},[dr,Yn]),ns=te.createElement(Gn,{data:ar,measureColumnWidth:To||qi||Ji}),rs=te.createElement(Un,{colWidths:ui.map(function(hi){var yr=hi.width;return yr}),columns:ui}),La=vn!=null?te.createElement("caption",{className:"".concat(Qt,"-caption")},vn):void 0,Br=(0,lt.Z)(Zt,{data:!0}),xs=(0,lt.Z)(Zt,{aria:!0});if(To||Ji){var Pa;typeof ti=="function"?(Pa=ti(ar,{scrollbarSize:Ca,ref:Ki,onScroll:Ko}),ms.colWidths=ui.map(function(hi,yr){var Ci=hi.width,So=yr===ui.length-1?Ci-Ca:Ci;return typeof So=="number"&&!Number.isNaN(So)?So:0})):Pa=te.createElement("div",{style:(0,Oe.Z)((0,Oe.Z)({},Fo),Xo),onScroll:Qa,ref:Ki,className:Qe()("".concat(Qt,"-body"))},te.createElement(hs,(0,E.Z)({style:(0,Oe.Z)((0,Oe.Z)({},Ia),{},{tableLayout:ka})},xs),La,rs,ns,!yo&&Qi&&te.createElement(Le,{stickyOffsets:ua,flattenColumns:ui},Qi)));var vs=(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({noData:!ar.length,maxContentScroll:qi&&Ui==="max-content"},ms),Ho),{},{direction:dn,stickyClassName:Go,onScroll:Ko});ps=te.createElement(te.Fragment,null,Mn!==!1&&te.createElement(_n,(0,E.Z)({},vs,{stickyTopOffset:io,className:"".concat(Qt,"-header"),ref:Oo}),Ga),Pa,yo&&yo!=="top"&&te.createElement(_n,(0,E.Z)({},vs,{stickyBottomOffset:co,className:"".concat(Qt,"-summary"),ref:za}),ts),Ji&&Ki.current&&Ki.current instanceof Element&&te.createElement(nn,{ref:ai,offsetScroll:na,scrollBodyRef:Ki,onScroll:Ko,container:ca,direction:dn}))}else ps=te.createElement("div",{style:(0,Oe.Z)((0,Oe.Z)({},Fo),Xo),className:Qe()("".concat(Qt,"-content")),onScroll:Ko,ref:Ki},te.createElement(hs,(0,E.Z)({style:(0,Oe.Z)((0,Oe.Z)({},Ia),{},{tableLayout:ka})},xs),La,rs,Mn!==!1&&te.createElement(er,(0,E.Z)({},ms,Ho)),ns,Qi&&te.createElement(Le,{stickyOffsets:ua,flattenColumns:ui},Qi)));var ia=te.createElement("div",(0,E.Z)({className:Qe()(Qt,cn,(0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)((0,je.Z)({},"".concat(Qt,"-rtl"),dn==="rtl"),"".concat(Qt,"-ping-left"),Zo),"".concat(Qt,"-ping-right"),cs),"".concat(Qt,"-layout-fixed"),ln==="fixed"),"".concat(Qt,"-fixed-header"),To),"".concat(Qt,"-fixed-column"),vi),"".concat(Qt,"-fixed-column-gapped"),vi&&Io),"".concat(Qt,"-scroll-horizontal"),qi),"".concat(Qt,"-has-fix-left"),ui[0]&&ui[0].fixed),"".concat(Qt,"-has-fix-right"),ui[ui.length-1]&&ui[ui.length-1].fixed==="right")),style:Nn,id:fn,ref:Co},Br),un&&te.createElement(At,{className:"".concat(Qt,"-title")},un(ar)),te.createElement("div",{ref:Wo,className:"".concat(Qt,"-container")},ps),mn&&te.createElement(At,{className:"".concat(Qt,"-footer")},mn(ar)));qi&&(ia=te.createElement(Me.Z,{onResize:_s},ia));var is=Ze(ui,ua,dn),ma=te.useMemo(function(){return{scrollX:Ui,prefixCls:Qt,getComponent:pr,scrollbarSize:Ca,direction:dn,fixedInfoList:is,isSticky:Ji,supportSticky:Za,componentWidth:xi,fixHeader:To,fixColumn:vi,horizonScroll:qi,tableLayout:ka,rowClassName:hn,expandedRowClassName:Pi.expandedRowClassName,expandIcon:Gi,expandableType:vo,expandRowByClick:Pi.expandRowByClick,expandedRowRender:Pi.expandedRowRender,onTriggerExpand:gr,expandIconColumnIndex:Pi.expandIconColumnIndex,indentSize:Pi.indentSize,allColumnsFixedLeft:ui.every(function(hi){return hi.fixed==="left"}),emptyNode:ws,columns:Xi,flattenColumns:ui,onColumnResize:ds,hoverStartRow:ao,hoverEndRow:to,onHover:mo,rowExpandable:Pi.rowExpandable,onRow:fr,getRowKey:Jr,expandedKeys:Fi,childrenColumnName:ji,rowHoverable:Tr}},[Ui,Qt,pr,Ca,dn,is,Ji,Za,xi,To,vi,qi,ka,hn,Pi.expandedRowClassName,Gi,vo,Pi.expandRowByClick,Pi.expandedRowRender,gr,Pi.expandIconColumnIndex,Pi.indentSize,ws,Xi,ui,ds,ao,to,mo,Pi.rowExpandable,fr,Jr,Fi,ji,Tr]);return te.createElement(he.Provider,{value:ma},ia)}var $n=te.forwardRef(Wn);function kr(Tt){return ye($n,Tt)}var Sr=kr();Sr.EXPAND_COLUMN=ce.w,Sr.INTERNAL_HOOKS=ce.R,Sr.Column=gn,Sr.ColumnGroup=An,Sr.Summary=Ue;var Yr=Sr,_r=be(48911),Ur=ee(null),wr=ee(null);function Dr(Tt,tn,Zt){var Qt=tn||1;return Zt[Tt+Qt]-(Zt[Tt]||0)}function Hr(Tt){var tn=Tt.rowInfo,Zt=Tt.column,Qt=Tt.colIndex,cn=Tt.indent,hn=Tt.index,Nn=Tt.component,kn=Tt.renderIndex,yn=Tt.record,Wt=Tt.style,ln=Tt.className,dn=Tt.inverse,un=Tt.getHeight,mn=Zt.render,Hn=Zt.dataIndex,vn=Zt.className,fn=Zt.width,Mn=ne(wr,["columnsOffset"]),Rn=Mn.columnsOffset,Yn=Lt(tn,Zt,Qt,cn,hn),fr=Yn.key,ir=Yn.fixedInfo,Ir=Yn.appendCellNode,br=Yn.additionalCellProps,Mr=br.style,Wr=br.colSpan,Pr=Wr===void 0?1:Wr,li=br.rowSpan,zr=li===void 0?1:li,Xr=Qt-1,Tr=Dr(Xr,Pr,Rn),ar=Pr>1?fn-Tr:0,dr=(0,Oe.Z)((0,Oe.Z)((0,Oe.Z)({},Mr),Wt),{},{flex:"0 0 ".concat(Tr,"px"),width:"".concat(Tr,"px"),marginRight:ar,pointerEvents:"auto"}),Nr=te.useMemo(function(){return dn?zr<=1:Pr===0||zr===0||zr>1},[zr,Pr,dn]);Nr?dr.visibility="hidden":dn&&(dr.height=un==null?void 0:un(zr));var pr=Nr?function(){return null}:mn,Jr={};return(zr===0||Pr===0)&&(Jr.rowSpan=1,Jr.colSpan=1),te.createElement(xt,(0,E.Z)({className:Qe()(vn,ln),ellipsis:Zt.ellipsis,align:Zt.align,scope:Zt.rowScope,component:Nn,prefixCls:tn.prefixCls,key:fr,record:yn,index:hn,renderIndex:kn,dataIndex:Hn,render:pr,shouldCellUpdate:Zt.shouldCellUpdate},ir,{appendNode:Ir,additionalProps:(0,Oe.Z)((0,Oe.Z)({},br),{},{style:dr},Jr)}))}var Qr=Hr,pi=["data","index","className","rowKey","style","extra","getHeight"],_i=te.forwardRef(function(Tt,tn){var Zt=Tt.data,Qt=Tt.index,cn=Tt.className,hn=Tt.rowKey,Nn=Tt.style,kn=Tt.extra,yn=Tt.getHeight,Wt=(0,Se.Z)(Tt,pi),ln=Zt.record,dn=Zt.indent,un=Zt.index,mn=ne(he,["prefixCls","flattenColumns","fixColumn","componentWidth","scrollX"]),Hn=mn.scrollX,vn=mn.flattenColumns,fn=mn.prefixCls,Mn=mn.fixColumn,Rn=mn.componentWidth,Yn=ne(Ur,["getComponent"]),fr=Yn.getComponent,ir=vt(ln,hn,Qt,dn),Ir=fr(["body","row"],"div"),br=fr(["body","cell"],"div"),Mr=ir.rowSupportExpand,Wr=ir.expanded,Pr=ir.rowProps,li=ir.expandedRowRender,zr=ir.expandedRowClassName,Xr;if(Mr&&Wr){var Tr=li(ln,Qt,dn+1,Wr),ar=Xt(zr,ln,Qt,dn),dr={};Mn&&(dr={style:(0,je.Z)({},"--virtual-width","".concat(Rn,"px"))});var Nr="".concat(fn,"-expanded-row-cell");Xr=te.createElement(Ir,{className:Qe()("".concat(fn,"-expanded-row"),"".concat(fn,"-expanded-row-level-").concat(dn+1),ar)},te.createElement(xt,{component:br,prefixCls:fn,className:Qe()(Nr,(0,je.Z)({},"".concat(Nr,"-fixed"),Mn)),additionalProps:dr},Tr))}var pr=(0,Oe.Z)((0,Oe.Z)({},Nn),{},{width:Hn});kn&&(pr.position="absolute",pr.pointerEvents="none");var Jr=te.createElement(Ir,(0,E.Z)({},Pr,Wt,{"data-row-key":hn,ref:Mr?null:tn,className:Qe()(cn,"".concat(fn,"-row"),Pr==null?void 0:Pr.className,(0,je.Z)({},"".concat(fn,"-row-extra"),kn)),style:(0,Oe.Z)((0,Oe.Z)({},pr),Pr==null?void 0:Pr.style)}),vn.map(function(ti,di){return te.createElement(Qr,{key:di,component:br,rowInfo:ir,column:ti,colIndex:di,indent:dn,index:Qt,renderIndex:un,record:ln,inverse:kn,getHeight:yn})}));return Mr?te.createElement("div",{ref:tn},Jr,Xr):Jr}),Si=me(_i),oi=Si,Mi=te.forwardRef(function(Tt,tn){var Zt=Tt.data,Qt=Tt.onScroll,cn=ne(he,["flattenColumns","onColumnResize","getRowKey","prefixCls","expandedKeys","childrenColumnName","scrollX","direction"]),hn=cn.flattenColumns,Nn=cn.onColumnResize,kn=cn.getRowKey,yn=cn.expandedKeys,Wt=cn.prefixCls,ln=cn.childrenColumnName,dn=cn.scrollX,un=cn.direction,mn=ne(Ur),Hn=mn.sticky,vn=mn.scrollY,fn=mn.listItemHeight,Mn=mn.getComponent,Rn=mn.onScroll,Yn=te.useRef(),fr=Ct(Zt,ln,yn,kn),ir=te.useMemo(function(){var Xr=0;return hn.map(function(Tr){var ar=Tr.width,dr=Tr.key;return Xr+=ar,[dr,ar,Xr]})},[hn]),Ir=te.useMemo(function(){return ir.map(function(Xr){return Xr[2]})},[ir]);te.useEffect(function(){ir.forEach(function(Xr){var Tr=(0,ie.Z)(Xr,2),ar=Tr[0],dr=Tr[1];Nn(ar,dr)})},[ir]),te.useImperativeHandle(tn,function(){var Xr,Tr={scrollTo:function(dr){var Nr;(Nr=Yn.current)===null||Nr===void 0||Nr.scrollTo(dr)},nativeElement:(Xr=Yn.current)===null||Xr===void 0?void 0:Xr.nativeElement};return Object.defineProperty(Tr,"scrollLeft",{get:function(){var dr;return((dr=Yn.current)===null||dr===void 0?void 0:dr.getScrollInfo().x)||0},set:function(dr){var Nr;(Nr=Yn.current)===null||Nr===void 0||Nr.scrollTo({left:dr})}}),Tr});var br=function(Tr,ar){var dr,Nr=(dr=fr[ar])===null||dr===void 0?void 0:dr.record,pr=Tr.onCell;if(pr){var Jr,ti=pr(Nr,ar);return(Jr=ti==null?void 0:ti.rowSpan)!==null&&Jr!==void 0?Jr:1}return 1},Mr=function(Tr){var ar=Tr.start,dr=Tr.end,Nr=Tr.getSize,pr=Tr.offsetY;if(dr<0)return null;for(var Jr=hn.filter(function(Gi){return br(Gi,ar)===0}),ti=ar,di=function(ji){if(Jr=Jr.filter(function(gr){return br(gr,ji)===0}),!Jr.length)return ti=ji,1},po=ar;po>=0&&!di(po);po-=1);for(var ao=hn.filter(function(Gi){return br(Gi,dr)!==1}),to=dr,mo=function(ji){if(ao=ao.filter(function(gr){return br(gr,ji)!==1}),!ao.length)return to=Math.max(ji-1,dr),1},Ii=dr;Ii<fr.length&&!mo(Ii);Ii+=1);for(var Ti=[],Pi=function(ji){var gr=fr[ji];if(!gr)return 1;hn.some(function(Gr){return br(Gr,ji)>1})&&Ti.push(ji)},vo=ti;vo<=to;vo+=1)Pi(vo);var Fi=Ti.map(function(Gi){var ji=fr[Gi],gr=kn(ji.record,Gi),Gr=function(xi){var Oi=Gi+xi-1,Ao=kn(fr[Oi].record,Oi),Yi=Nr(gr,Ao);return Yi.bottom-Yi.top},Zr=Nr(gr);return te.createElement(oi,{key:Gi,data:ji,rowKey:gr,index:Gi,style:{top:-pr+Zr.top},extra:!0,getHeight:Gr})});return Fi},Wr=te.useMemo(function(){return{columnsOffset:Ir}},[Ir]),Pr="".concat(Wt,"-tbody"),li=Mn(["body","wrapper"]),zr={};return Hn&&(zr.position="sticky",zr.bottom=0,(0,Ee.Z)(Hn)==="object"&&Hn.offsetScroll&&(zr.bottom=Hn.offsetScroll)),te.createElement(wr.Provider,{value:Wr},te.createElement(_r.Z,{fullHeight:!1,ref:Yn,prefixCls:"".concat(Pr,"-virtual"),styles:{horizontalScrollBar:zr},className:Pr,height:vn,itemHeight:fn||24,data:fr,itemKey:function(Tr){return kn(Tr.record)},component:li,scrollWidth:dn,direction:un,onVirtualScroll:function(Tr){var ar,dr=Tr.x;Qt({currentTarget:(ar=Yn.current)===null||ar===void 0?void 0:ar.nativeElement,scrollLeft:dr})},onScroll:Rn,extraRender:Mr},function(Xr,Tr,ar){var dr=kn(Xr.record,Tr);return te.createElement(oi,{data:Xr,rowKey:dr,index:Tr,style:ar.style})}))}),Li=me(Mi),rr=Li,Cr=function(tn,Zt){var Qt=Zt.ref,cn=Zt.onScroll;return te.createElement(rr,{ref:Qt,data:tn,onScroll:cn})};function Ar(Tt,tn){var Zt=Tt.data,Qt=Tt.columns,cn=Tt.scroll,hn=Tt.sticky,Nn=Tt.prefixCls,kn=Nn===void 0?Gt:Nn,yn=Tt.className,Wt=Tt.listItemHeight,ln=Tt.components,dn=Tt.onScroll,un=cn||{},mn=un.x,Hn=un.y;typeof mn!="number"&&(mn=1),typeof Hn!="number"&&(Hn=500);var vn=(0,It.zX)(function(Rn,Yn){return(0,ot.Z)(ln,Rn)||Yn}),fn=(0,It.zX)(dn),Mn=te.useMemo(function(){return{sticky:hn,scrollY:Hn,listItemHeight:Wt,getComponent:vn,onScroll:fn}},[hn,Hn,Wt,vn,fn]);return te.createElement(Ur.Provider,{value:Mn},te.createElement(Yr,(0,E.Z)({},Tt,{className:Qe()(yn,"".concat(kn,"-virtual")),scroll:(0,Oe.Z)((0,Oe.Z)({},cn),{},{x:mn}),components:(0,Oe.Z)((0,Oe.Z)({},ln),{},{body:Zt!=null&&Zt.length?Cr:void 0}),columns:Qt,internalHooks:ce.R,tailor:!0,ref:tn})))}var $r=te.forwardRef(Ar);function qr(Tt){return ye($r,Tt)}var wi=qr(),Hi=null},54451:function(qt,Dt,be){"use strict";be.d(Dt,{g:function(){return te},v:function(){return se}});var ce=be(33885),ie=be(75931),Ce=be(48736),ue=["expandable"],se="RC_TABLE_INTERNAL_COL_DEFINE";function te(le){var ee=le.expandable,ne=(0,ie.Z)(le,ue),E;return"expandable"in le?E=(0,ce.Z)((0,ce.Z)({},ne),ee):E=ne,E.showExpandColumn===!1&&(E.expandIconColumnIndex=-1),E}},22711:function(qt,Dt,be){"use strict";be.r(Dt),be.d(Dt,{ResizableTextArea:function(){return Pe},default:function(){return He}});var ce=be(54476),ie=be(20068),Ce=be(33885),ue=be(94480),se=be(42978),te=be(75931),le=be(92310),ee=be.n(le),ne=be(36901),E=be(66003),b=be(30292),z=be(18929),x=be(59301),re=be(76190),ae=be(29301),oe=be(34280),ve=be(16089),ye=`
|
|
|
min-height:0 !important;
|
|
|
max-height:none !important;
|
|
|
height:0 !important;
|
|
|
visibility:hidden !important;
|
|
|
overflow:hidden !important;
|
|
|
position:absolute !important;
|
|
|
z-index:-1000 !important;
|
|
|
top:0 !important;
|
|
|
right:0 !important;
|
|
|
pointer-events: none !important;
|
|
|
`,me=["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"],ge={},_e;function he(rt){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ut=rt.getAttribute("id")||rt.getAttribute("data-reactid")||rt.getAttribute("name");if(Ye&&ge[ut])return ge[ut];var Ge=window.getComputedStyle(rt),ze=Ge.getPropertyValue("box-sizing")||Ge.getPropertyValue("-moz-box-sizing")||Ge.getPropertyValue("-webkit-box-sizing"),Ve=parseFloat(Ge.getPropertyValue("padding-bottom"))+parseFloat(Ge.getPropertyValue("padding-top")),$e=parseFloat(Ge.getPropertyValue("border-bottom-width"))+parseFloat(Ge.getPropertyValue("border-top-width")),nt=me.map(function(pt){return"".concat(pt,":").concat(Ge.getPropertyValue(pt))}).join(";"),et={sizingStyle:nt,paddingSize:Ve,borderSize:$e,boxSizing:ze};return Ye&&ut&&(ge[ut]=et),et}function pe(rt){var Ye=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,ut=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,Ge=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null;_e||(_e=document.createElement("textarea"),_e.setAttribute("tab-index","-1"),_e.setAttribute("aria-hidden","true"),_e.setAttribute("name","hiddenTextarea"),document.body.appendChild(_e)),rt.getAttribute("wrap")?_e.setAttribute("wrap",rt.getAttribute("wrap")):_e.removeAttribute("wrap");var ze=he(rt,Ye),Ve=ze.paddingSize,$e=ze.borderSize,nt=ze.boxSizing,et=ze.sizingStyle;_e.setAttribute("style","".concat(et,";").concat(ye)),_e.value=rt.value||rt.placeholder||"";var pt=void 0,ct=void 0,It,dt=_e.scrollHeight;if(nt==="border-box"?dt+=$e:nt==="content-box"&&(dt-=Ve),ut!==null||Ge!==null){_e.value=" ";var Mt=_e.scrollHeight-Ve;ut!==null&&(pt=Mt*ut,nt==="border-box"&&(pt=pt+Ve+$e),dt=Math.max(pt,dt)),Ge!==null&&(ct=Mt*Ge,nt==="border-box"&&(ct=ct+Ve+$e),It=dt>ct?"":"hidden",dt=Math.min(ct,dt))}var xt={height:dt,overflowY:It,resize:"none"};return pt&&(xt.minHeight=pt),ct&&(xt.maxHeight=ct),xt}var ke=["prefixCls","defaultValue","value","autoSize","onResize","className","style","disabled","onChange","onInternalAutoSize"],Te=0,Ee=1,Oe=2,je=x.forwardRef(function(rt,Ye){var ut=rt,Ge=ut.prefixCls,ze=ut.defaultValue,Ve=ut.value,$e=ut.autoSize,nt=ut.onResize,et=ut.className,pt=ut.style,ct=ut.disabled,It=ut.onChange,dt=ut.onInternalAutoSize,Mt=(0,te.Z)(ut,ke),xt=(0,z.Z)(ze,{value:Ve,postState:function(sn){return sn!=null?sn:""}}),gt=(0,se.Z)(xt,2),_t=gt[0],We=gt[1],Ae=function(sn){We(sn.target.value),It==null||It(sn)},Se=x.useRef();x.useImperativeHandle(Ye,function(){return{textArea:Se.current}});var Be=x.useMemo(function(){return $e&&(0,re.Z)($e)==="object"?[$e.minRows,$e.maxRows]:[]},[$e]),Ke=(0,se.Z)(Be,2),Ne=Ke[0],De=Ke[1],we=!!$e,Le=function(){try{if(document.activeElement===Se.current){var sn=Se.current,Sn=sn.selectionStart,Yt=sn.selectionEnd,In=sn.scrollTop;Se.current.setSelectionRange(Sn,Yt),Se.current.scrollTop=In}}catch(Kn){}},Ue=x.useState(Oe),Me=(0,se.Z)(Ue,2),Re=Me[0],tt=Me[1],lt=x.useState(),Pt=(0,se.Z)(lt,2),Ct=Pt[0],vt=Pt[1],Ot=function(){tt(Te)};(0,oe.Z)(function(){we&&Ot()},[Ve,Ne,De,we]),(0,oe.Z)(function(){if(Re===Te)tt(Ee);else if(Re===Ee){var Kt=pe(Se.current,!1,Ne,De);tt(Oe),vt(Kt)}else Le()},[Re]);var zt=x.useRef(),Ft=function(){ve.Z.cancel(zt.current)},yt=function(sn){Re===Oe&&(nt==null||nt(sn),$e&&(Ft(),zt.current=(0,ve.Z)(function(){Ot()})))};x.useEffect(function(){return Ft},[]);var Xt=we?Ct:null,Lt=(0,Ce.Z)((0,Ce.Z)({},pt),Xt);return(Re===Te||Re===Ee)&&(Lt.overflowY="hidden",Lt.overflowX="hidden"),x.createElement(ae.Z,{onResize:yt,disabled:!($e||nt)},x.createElement("textarea",(0,ce.Z)({},Mt,{ref:Se,style:Lt,className:ee()(Ge,et,(0,ie.Z)({},"".concat(Ge,"-disabled"),ct)),disabled:ct,value:_t,onChange:Ae})))}),Pe=je,Qe=["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"],Xe=x.forwardRef(function(rt,Ye){var ut,Ge=rt.defaultValue,ze=rt.value,Ve=rt.onFocus,$e=rt.onBlur,nt=rt.onChange,et=rt.allowClear,pt=rt.maxLength,ct=rt.onCompositionStart,It=rt.onCompositionEnd,dt=rt.suffix,Mt=rt.prefixCls,xt=Mt===void 0?"rc-textarea":Mt,gt=rt.showCount,_t=rt.count,We=rt.className,Ae=rt.style,Se=rt.disabled,Be=rt.hidden,Ke=rt.classNames,Ne=rt.styles,De=rt.onResize,we=rt.onClear,Le=rt.onPressEnter,Ue=rt.readOnly,Me=rt.autoSize,Re=rt.onKeyDown,tt=(0,te.Z)(rt,Qe),lt=(0,z.Z)(Ge,{value:ze,defaultValue:Ge}),Pt=(0,se.Z)(lt,2),Ct=Pt[0],vt=Pt[1],Ot=Ct==null?"":String(Ct),zt=x.useState(!1),Ft=(0,se.Z)(zt,2),yt=Ft[0],Xt=Ft[1],Lt=x.useRef(!1),Kt=x.useState(null),sn=(0,se.Z)(Kt,2),Sn=sn[0],Yt=sn[1],In=(0,x.useRef)(null),Kn=(0,x.useRef)(null),Gn=function(){var Jt;return(Jt=Kn.current)===null||Jt===void 0?void 0:Jt.textArea},nr=function(){Gn().focus()};(0,x.useImperativeHandle)(Ye,function(){var Bt;return{resizableTextArea:Kn.current,focus:nr,blur:function(){Gn().blur()},nativeElement:((Bt=In.current)===null||Bt===void 0?void 0:Bt.nativeElement)||Gn()}}),(0,x.useEffect)(function(){Xt(function(Bt){return!Se&&Bt})},[Se]);var hr=x.useState(null),ur=(0,se.Z)(hr,2),Un=ur[0],Fn=ur[1];x.useEffect(function(){if(Un){var Bt;(Bt=Gn()).setSelectionRange.apply(Bt,(0,ue.Z)(Un))}},[Un]);var or=(0,E.Z)(_t,gt),Vn=(ut=or.max)!==null&&ut!==void 0?ut:pt,Bn=Number(Vn)>0,_n=or.strategy(Ot),zn=!!Vn&&_n>Vn,cr=function(Jt,En){var qn=En;!Lt.current&&or.exceedFormatter&&or.max&&or.strategy(En)>or.max&&(qn=or.exceedFormatter(En,{max:or.max}),En!==qn&&Fn([Gn().selectionStart||0,Gn().selectionEnd||0])),vt(qn),(0,b.rJ)(Jt.currentTarget,Jt,nt,qn)},Dn=function(Jt){Lt.current=!0,ct==null||ct(Jt)},Cn=function(Jt){Lt.current=!1,cr(Jt,Jt.currentTarget.value),It==null||It(Jt)},er=function(Jt){cr(Jt,Jt.target.value)},$t=function(Jt){Jt.key==="Enter"&&Le&&Le(Jt),Re==null||Re(Jt)},Ie=function(Jt){Xt(!0),Ve==null||Ve(Jt)},Ze=function(Jt){Xt(!1),$e==null||$e(Jt)},qe=function(Jt){vt(""),nr(),(0,b.rJ)(Gn(),Jt,nt)},st=dt,mt;or.show&&(or.showFormatter?mt=or.showFormatter({value:Ot,count:_n,maxLength:Vn}):mt="".concat(_n).concat(Bn?" / ".concat(Vn):""),st=x.createElement(x.Fragment,null,st,x.createElement("span",{className:ee()("".concat(xt,"-data-count"),Ke==null?void 0:Ke.count),style:Ne==null?void 0:Ne.count},mt)));var Nt=function(Jt){var En;De==null||De(Jt),(En=Gn())!==null&&En!==void 0&&En.style.height&&Yt(!0)},kt=!Me&&!gt&&!et;return x.createElement(ne.BaseInput,{ref:In,value:Ot,allowClear:et,handleReset:qe,suffix:st,prefixCls:xt,classNames:(0,Ce.Z)((0,Ce.Z)({},Ke),{},{affixWrapper:ee()(Ke==null?void 0:Ke.affixWrapper,(0,ie.Z)((0,ie.Z)({},"".concat(xt,"-show-count"),gt),"".concat(xt,"-textarea-allow-clear"),et))}),disabled:Se,focused:yt,className:ee()(We,zn&&"".concat(xt,"-out-of-range")),style:(0,Ce.Z)((0,Ce.Z)({},Ae),Sn&&!kt?{height:"auto"}:{}),dataAttrs:{affixWrapper:{"data-count":typeof mt=="string"?mt:void 0}},hidden:Be,readOnly:Ue,onClear:we},x.createElement(Pe,(0,ce.Z)({},tt,{autoSize:Me,maxLength:pt,onKeyDown:$t,onChange:er,onFocus:Ie,onBlur:Ze,onCompositionStart:Dn,onCompositionEnd:Cn,className:ee()(Ke==null?void 0:Ke.textarea),style:(0,Ce.Z)((0,Ce.Z)({},Ne==null?void 0:Ne.textarea),{},{resize:Ae==null?void 0:Ae.resize}),disabled:Se,prefixCls:xt,onResize:Nt,ref:Kn,readOnly:Ue})))}),ot=Xe,He=ot},639:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ge}});var ce=be(54476),ie=be(20068),Ce=be(33885),ue=be(42978),se=be(75931),te=be(59301),le=be(92310),ee=be.n(le),ne=be(26112),E=be(30699),b=function(he){for(var pe=he.prefixCls,ke=he.level,Te=he.isStart,Ee=he.isEnd,Oe="".concat(pe,"-indent-unit"),je=[],Pe=0;Pe<ke;Pe+=1)je.push(te.createElement("span",{key:Pe,className:ee()(Oe,(0,ie.Z)((0,ie.Z)({},"".concat(Oe,"-start"),Te[Pe]),"".concat(Oe,"-end"),Ee[Pe]))}));return te.createElement("span",{"aria-hidden":"true",className:"".concat(pe,"-indent")},je)},z=te.memo(b),x=be(65065),re=be(34061),ae=["eventKey","className","style","dragOver","dragOverGapTop","dragOverGapBottom","isLeaf","isStart","isEnd","expanded","selected","checked","halfChecked","loading","domRef","active","data","onMouseMove","selectable"],oe="open",ve="close",ye="---",me=function(he){var pe,ke,Te,Ee=he.eventKey,Oe=he.className,je=he.style,Pe=he.dragOver,Qe=he.dragOverGapTop,Xe=he.dragOverGapBottom,ot=he.isLeaf,He=he.isStart,rt=he.isEnd,Ye=he.expanded,ut=he.selected,Ge=he.checked,ze=he.halfChecked,Ve=he.loading,$e=he.domRef,nt=he.active,et=he.data,pt=he.onMouseMove,ct=he.selectable,It=(0,se.Z)(he,ae),dt=te.useContext(E.k),Mt=te.useContext(E.y),xt=te.useRef(null),gt=te.useState(!1),_t=(0,ue.Z)(gt,2),We=_t[0],Ae=_t[1],Se=!!(dt.disabled||he.disabled||(pe=Mt.nodeDisabled)!==null&&pe!==void 0&&pe.call(Mt,et)),Be=te.useMemo(function(){return!dt.checkable||he.checkable===!1?!1:dt.checkable},[dt.checkable,he.checkable]),Ke=function(_n){Se||dt.onNodeSelect(_n,(0,re.F)(he))},Ne=function(_n){Se||!Be||he.disableCheckbox||dt.onNodeCheck(_n,(0,re.F)(he),!Ge)},De=te.useMemo(function(){return typeof ct=="boolean"?ct:dt.selectable},[ct,dt.selectable]),we=function(_n){dt.onNodeClick(_n,(0,re.F)(he)),De?Ke(_n):Ne(_n)},Le=function(_n){dt.onNodeDoubleClick(_n,(0,re.F)(he))},Ue=function(_n){dt.onNodeMouseEnter(_n,(0,re.F)(he))},Me=function(_n){dt.onNodeMouseLeave(_n,(0,re.F)(he))},Re=function(_n){dt.onNodeContextMenu(_n,(0,re.F)(he))},tt=te.useMemo(function(){return!!(dt.draggable&&(!dt.draggable.nodeDraggable||dt.draggable.nodeDraggable(et)))},[dt.draggable,et]),lt=function(_n){_n.stopPropagation(),Ae(!0),dt.onNodeDragStart(_n,he);try{_n.dataTransfer.setData("text/plain","")}catch(zn){}},Pt=function(_n){_n.preventDefault(),_n.stopPropagation(),dt.onNodeDragEnter(_n,he)},Ct=function(_n){_n.preventDefault(),_n.stopPropagation(),dt.onNodeDragOver(_n,he)},vt=function(_n){_n.stopPropagation(),dt.onNodeDragLeave(_n,he)},Ot=function(_n){_n.stopPropagation(),Ae(!1),dt.onNodeDragEnd(_n,he)},zt=function(_n){_n.preventDefault(),_n.stopPropagation(),Ae(!1),dt.onNodeDrop(_n,he)},Ft=function(_n){Ve||dt.onNodeExpand(_n,(0,re.F)(he))},yt=te.useMemo(function(){var Bn=(0,x.Z)(dt.keyEntities,Ee)||{},_n=Bn.children;return!!(_n||[]).length},[dt.keyEntities,Ee]),Xt=te.useMemo(function(){return ot===!1?!1:ot||!dt.loadData&&!yt||dt.loadData&&he.loaded&&!yt},[ot,dt.loadData,yt,he.loaded]);te.useEffect(function(){Ve||typeof dt.loadData=="function"&&Ye&&!Xt&&!he.loaded&&dt.onNodeLoad((0,re.F)(he))},[Ve,dt.loadData,dt.onNodeLoad,Ye,Xt,he]);var Lt=te.useMemo(function(){var Bn;return(Bn=dt.draggable)!==null&&Bn!==void 0&&Bn.icon?te.createElement("span",{className:"".concat(dt.prefixCls,"-draggable-icon")},dt.draggable.icon):null},[dt.draggable]),Kt=function(_n){var zn=he.switcherIcon||dt.switcherIcon;return typeof zn=="function"?zn((0,Ce.Z)((0,Ce.Z)({},he),{},{isLeaf:_n})):zn},sn=function(){if(Xt){var _n=Kt(!0);return _n!==!1?te.createElement("span",{className:ee()("".concat(dt.prefixCls,"-switcher"),"".concat(dt.prefixCls,"-switcher-noop"))},_n):null}var zn=Kt(!1);return zn!==!1?te.createElement("span",{onClick:Ft,className:ee()("".concat(dt.prefixCls,"-switcher"),"".concat(dt.prefixCls,"-switcher_").concat(Ye?oe:ve))},zn):null},Sn=te.useMemo(function(){if(!Be)return null;var Bn=typeof Be!="boolean"?Be:null;return te.createElement("span",{className:ee()("".concat(dt.prefixCls,"-checkbox"),(0,ie.Z)((0,ie.Z)((0,ie.Z)({},"".concat(dt.prefixCls,"-checkbox-checked"),Ge),"".concat(dt.prefixCls,"-checkbox-indeterminate"),!Ge&&ze),"".concat(dt.prefixCls,"-checkbox-disabled"),Se||he.disableCheckbox)),onClick:Ne,role:"checkbox","aria-checked":ze?"mixed":Ge,"aria-disabled":Se||he.disableCheckbox,"aria-label":"Select ".concat(typeof he.title=="string"?he.title:"tree node")},Bn)},[Be,Ge,ze,Se,he.disableCheckbox,he.title]),Yt=te.useMemo(function(){return Xt?null:Ye?oe:ve},[Xt,Ye]),In=te.useMemo(function(){return te.createElement("span",{className:ee()("".concat(dt.prefixCls,"-iconEle"),"".concat(dt.prefixCls,"-icon__").concat(Yt||"docu"),(0,ie.Z)({},"".concat(dt.prefixCls,"-icon_loading"),Ve))})},[dt.prefixCls,Yt,Ve]),Kn=te.useMemo(function(){var Bn=!!dt.draggable,_n=!he.disabled&&Bn&&dt.dragOverNodeKey===Ee;return _n?dt.dropIndicatorRender({dropPosition:dt.dropPosition,dropLevelOffset:dt.dropLevelOffset,indent:dt.indent,prefixCls:dt.prefixCls,direction:dt.direction}):null},[dt.dropPosition,dt.dropLevelOffset,dt.indent,dt.prefixCls,dt.direction,dt.draggable,dt.dragOverNodeKey,dt.dropIndicatorRender]),Gn=te.useMemo(function(){var Bn=he.title,_n=Bn===void 0?ye:Bn,zn="".concat(dt.prefixCls,"-node-content-wrapper"),cr;if(dt.showIcon){var Dn=he.icon||dt.icon;cr=Dn?te.createElement("span",{className:ee()("".concat(dt.prefixCls,"-iconEle"),"".concat(dt.prefixCls,"-icon__customize"))},typeof Dn=="function"?Dn(he):Dn):In}else dt.loadData&&Ve&&(cr=In);var Cn;return typeof _n=="function"?Cn=_n(et):dt.titleRender?Cn=dt.titleRender(et):Cn=_n,te.createElement("span",{ref:xt,title:typeof _n=="string"?_n:"",className:ee()(zn,"".concat(zn,"-").concat(Yt||"normal"),(0,ie.Z)({},"".concat(dt.prefixCls,"-node-selected"),!Se&&(ut||We))),onMouseEnter:Ue,onMouseLeave:Me,onContextMenu:Re,onClick:we,onDoubleClick:Le},cr,te.createElement("span",{className:"".concat(dt.prefixCls,"-title")},Cn),Kn)},[dt.prefixCls,dt.showIcon,he,dt.icon,In,dt.titleRender,et,Yt,Ue,Me,Re,we,Le]),nr=(0,ne.Z)(It,{aria:!0,data:!0}),hr=(0,x.Z)(dt.keyEntities,Ee)||{},ur=hr.level,Un=rt[rt.length-1],Fn=!Se&&tt,or=dt.draggingNodeKey===Ee,Vn=ct!==void 0?{"aria-selected":!!ct}:void 0;return te.createElement("div",(0,ce.Z)({ref:$e,role:"treeitem","aria-expanded":ot?void 0:Ye,className:ee()(Oe,"".concat(dt.prefixCls,"-treenode"),(Te={},(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)(Te,"".concat(dt.prefixCls,"-treenode-disabled"),Se),"".concat(dt.prefixCls,"-treenode-switcher-").concat(Ye?"open":"close"),!ot),"".concat(dt.prefixCls,"-treenode-checkbox-checked"),Ge),"".concat(dt.prefixCls,"-treenode-checkbox-indeterminate"),ze),"".concat(dt.prefixCls,"-treenode-selected"),ut),"".concat(dt.prefixCls,"-treenode-loading"),Ve),"".concat(dt.prefixCls,"-treenode-active"),nt),"".concat(dt.prefixCls,"-treenode-leaf-last"),Un),"".concat(dt.prefixCls,"-treenode-draggable"),tt),"dragging",or),(0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)((0,ie.Z)(Te,"drop-target",dt.dropTargetKey===Ee),"drop-container",dt.dropContainerKey===Ee),"drag-over",!Se&&Pe),"drag-over-gap-top",!Se&&Qe),"drag-over-gap-bottom",!Se&&Xe),"filter-node",(ke=dt.filterTreeNode)===null||ke===void 0?void 0:ke.call(dt,(0,re.F)(he))),"".concat(dt.prefixCls,"-treenode-leaf"),Xt))),style:je,draggable:Fn,onDragStart:Fn?lt:void 0,onDragEnter:tt?Pt:void 0,onDragOver:tt?Ct:void 0,onDragLeave:tt?vt:void 0,onDrop:tt?zt:void 0,onDragEnd:tt?Ot:void 0,onMouseMove:pt},Vn,nr),te.createElement(z,{prefixCls:dt.prefixCls,level:ur,isStart:He,isEnd:rt}),Lt,sn(),Sn,Gn)};me.isTreeNode=1;var ge=me},30699:function(qt,Dt,be){"use strict";be.d(Dt,{k:function(){return ie},y:function(){return Ce}});var ce=be(59301),ie=ce.createContext(null),Ce=ce.createContext({})},3741:function(qt,Dt,be){"use strict";be.d(Dt,{OF:function(){return Ee.Z},y6:function(){return ve.y},ZP:function(){return Se}});var ce=be(54476),ie=be(76190),Ce=be(33885),ue=be(94480),se=be(67732),te=be(83652),le=be(31226),ee=be(42403),ne=be(158),E=be(20068),b=be(92310),z=be.n(b),x=be(10228),re=be(26112),ae=be(48736),oe=be(59301),ve=be(30699),ye=function(Ke){var Ne=Ke.dropPosition,De=Ke.dropLevelOffset,we=Ke.indent,Le={pointerEvents:"none",position:"absolute",right:0,backgroundColor:"red",height:2};switch(Ne){case-1:Le.top=0,Le.left=-De*we;break;case 1:Le.bottom=0,Le.left=-De*we;break;case 0:Le.bottom=0,Le.left=we;break}return oe.createElement("div",{style:Le})},me=ye;function ge(Be){if(Be==null)throw new TypeError("Cannot destructure "+Be)}var _e=be(42978),he=be(75931),pe=be(34280),ke=be(48911),Te=be(77900),Ee=be(639);function Oe(Be,Ke){var Ne=oe.useState(!1),De=(0,_e.Z)(Ne,2),we=De[0],Le=De[1];(0,pe.Z)(function(){if(we)return Be(),function(){Ke()}},[we]),(0,pe.Z)(function(){return Le(!0),function(){Le(!1)}},[])}var je=Oe,Pe=be(34061),Qe=["className","style","motion","motionNodes","motionType","onMotionStart","onMotionEnd","active","treeNodeRequiredProps"],Xe=oe.forwardRef(function(Be,Ke){var Ne=Be.className,De=Be.style,we=Be.motion,Le=Be.motionNodes,Ue=Be.motionType,Me=Be.onMotionStart,Re=Be.onMotionEnd,tt=Be.active,lt=Be.treeNodeRequiredProps,Pt=(0,he.Z)(Be,Qe),Ct=oe.useState(!0),vt=(0,_e.Z)(Ct,2),Ot=vt[0],zt=vt[1],Ft=oe.useContext(ve.k),yt=Ft.prefixCls,Xt=Le&&Ue!=="hide";(0,pe.Z)(function(){Le&&Xt!==Ot&&zt(Xt)},[Le]);var Lt=function(){Le&&Me()},Kt=oe.useRef(!1),sn=function(){Le&&!Kt.current&&(Kt.current=!0,Re())};je(Lt,sn);var Sn=function(In){Xt===In&&sn()};return Le?oe.createElement(Te.default,(0,ce.Z)({ref:Ke,visible:Ot},we,{motionAppear:Ue==="show",onVisibleChanged:Sn}),function(Yt,In){var Kn=Yt.className,Gn=Yt.style;return oe.createElement("div",{ref:In,className:z()("".concat(yt,"-treenode-motion"),Kn),style:Gn},Le.map(function(nr){var hr=Object.assign({},(ge(nr.data),nr.data)),ur=nr.title,Un=nr.key,Fn=nr.isStart,or=nr.isEnd;delete hr.children;var Vn=(0,Pe.H8)(Un,lt);return oe.createElement(Ee.Z,(0,ce.Z)({},hr,Vn,{title:ur,active:tt,data:nr.data,key:Un,isStart:Fn,isEnd:or}))}))}):oe.createElement(Ee.Z,(0,ce.Z)({domRef:Ke,className:Ne,style:De},Pt,{active:tt}))}),ot=Xe;function He(){var Be=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],Ke=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],Ne=Be.length,De=Ke.length;if(Math.abs(Ne-De)!==1)return{add:!1,key:null};function we(Le,Ue){var Me=new Map;Le.forEach(function(tt){Me.set(tt,!0)});var Re=Ue.filter(function(tt){return!Me.has(tt)});return Re.length===1?Re[0]:null}return Ne<De?{add:!0,key:we(Be,Ke)}:{add:!1,key:we(Ke,Be)}}function rt(Be,Ke,Ne){var De=Be.findIndex(function(Me){return Me.key===Ne}),we=Be[De+1],Le=Ke.findIndex(function(Me){return Me.key===Ne});if(we){var Ue=Ke.findIndex(function(Me){return Me.key===we.key});return Ke.slice(Le+1,Ue)}return Ke.slice(Le+1)}var Ye=["prefixCls","data","selectable","checkable","expandedKeys","selectedKeys","checkedKeys","loadedKeys","loadingKeys","halfCheckedKeys","keyEntities","disabled","dragging","dragOverNodeKey","dropPosition","motion","height","itemHeight","virtual","scrollWidth","focusable","activeItem","focused","tabIndex","onKeyDown","onFocus","onBlur","onActiveChange","onListChangeStart","onListChangeEnd"],ut={width:0,height:0,display:"flex",overflow:"hidden",opacity:0,border:0,padding:0,margin:0},Ge=function(){},ze="RC_TREE_MOTION_".concat(Math.random()),Ve={key:ze},$e={key:ze,level:0,index:0,pos:"0",node:Ve,nodes:[Ve]},nt={parent:null,children:[],pos:$e.pos,data:Ve,title:null,key:ze,isStart:[],isEnd:[]};function et(Be,Ke,Ne,De){return Ke===!1||!Ne?Be:Be.slice(0,Math.ceil(Ne/De)+1)}function pt(Be){var Ke=Be.key,Ne=Be.pos;return(0,Pe.km)(Ke,Ne)}function ct(Be){for(var Ke=String(Be.data.key),Ne=Be;Ne.parent;)Ne=Ne.parent,Ke="".concat(Ne.data.key," > ").concat(Ke);return Ke}var It=oe.forwardRef(function(Be,Ke){var Ne=Be.prefixCls,De=Be.data,we=Be.selectable,Le=Be.checkable,Ue=Be.expandedKeys,Me=Be.selectedKeys,Re=Be.checkedKeys,tt=Be.loadedKeys,lt=Be.loadingKeys,Pt=Be.halfCheckedKeys,Ct=Be.keyEntities,vt=Be.disabled,Ot=Be.dragging,zt=Be.dragOverNodeKey,Ft=Be.dropPosition,yt=Be.motion,Xt=Be.height,Lt=Be.itemHeight,Kt=Be.virtual,sn=Be.scrollWidth,Sn=Be.focusable,Yt=Be.activeItem,In=Be.focused,Kn=Be.tabIndex,Gn=Be.onKeyDown,nr=Be.onFocus,hr=Be.onBlur,ur=Be.onActiveChange,Un=Be.onListChangeStart,Fn=Be.onListChangeEnd,or=(0,he.Z)(Be,Ye),Vn=oe.useRef(null),Bn=oe.useRef(null);oe.useImperativeHandle(Ke,function(){return{scrollTo:function(rn){Vn.current.scrollTo(rn)},getIndentWidth:function(){return Bn.current.offsetWidth}}});var _n=oe.useState(Ue),zn=(0,_e.Z)(_n,2),cr=zn[0],Dn=zn[1],Cn=oe.useState(De),er=(0,_e.Z)(Cn,2),$t=er[0],Ie=er[1],Ze=oe.useState(De),qe=(0,_e.Z)(Ze,2),st=qe[0],mt=qe[1],Nt=oe.useState([]),kt=(0,_e.Z)(Nt,2),Bt=kt[0],Jt=kt[1],En=oe.useState(null),qn=(0,_e.Z)(En,2),At=qn[0],St=qn[1],an=oe.useRef(De);an.current=De;function Ht(){var nn=an.current;Ie(nn),mt(nn),Jt([]),St(null),Fn()}(0,pe.Z)(function(){Dn(Ue);var nn=He(cr,Ue);if(nn.key!==null)if(nn.add){var rn=$t.findIndex(function(wn){var jn=wn.key;return jn===nn.key}),gn=et(rt($t,De,nn.key),Kt,Xt,Lt),bn=$t.slice();bn.splice(rn+1,0,nt),mt(bn),Jt(gn),St("show")}else{var An=De.findIndex(function(wn){var jn=wn.key;return jn===nn.key}),Gt=et(rt(De,$t,nn.key),Kt,Xt,Lt),Vt=De.slice();Vt.splice(An+1,0,nt),mt(Vt),Jt(Gt),St("hide")}else $t!==De&&(Ie(De),mt(De))},[Ue,De]),oe.useEffect(function(){Ot||Ht()},[Ot]);var Et=yt?st:De,Ut={expandedKeys:Ue,selectedKeys:Me,loadedKeys:tt,loadingKeys:lt,checkedKeys:Re,halfCheckedKeys:Pt,dragOverNodeKey:zt,dropPosition:Ft,keyEntities:Ct};return oe.createElement(oe.Fragment,null,In&&Yt&&oe.createElement("span",{style:ut,"aria-live":"assertive"},ct(Yt)),oe.createElement("div",null,oe.createElement("input",{style:ut,disabled:Sn===!1||vt,tabIndex:Sn!==!1?Kn:null,onKeyDown:Gn,onFocus:nr,onBlur:hr,value:"",onChange:Ge,"aria-label":"for screen reader"})),oe.createElement("div",{className:"".concat(Ne,"-treenode"),"aria-hidden":!0,style:{position:"absolute",pointerEvents:"none",visibility:"hidden",height:0,overflow:"hidden",border:0,padding:0}},oe.createElement("div",{className:"".concat(Ne,"-indent")},oe.createElement("div",{ref:Bn,className:"".concat(Ne,"-indent-unit")}))),oe.createElement(ke.Z,(0,ce.Z)({},or,{data:Et,itemKey:pt,height:Xt,fullHeight:!1,virtual:Kt,itemHeight:Lt,scrollWidth:sn,prefixCls:"".concat(Ne,"-list"),ref:Vn,role:"tree",onVisibleChange:function(rn){rn.every(function(gn){return pt(gn)!==ze})&&Ht()}}),function(nn){var rn=nn.pos,gn=Object.assign({},(ge(nn.data),nn.data)),bn=nn.title,An=nn.key,Gt=nn.isStart,Vt=nn.isEnd,wn=(0,Pe.km)(An,rn);delete gn.key,delete gn.children;var jn=(0,Pe.H8)(wn,Ut);return oe.createElement(ot,(0,ce.Z)({},gn,jn,{title:bn,active:!!Yt&&An===Yt.key,pos:rn,data:nn.data,isStart:Gt,isEnd:Vt,motion:yt,motionNodes:An===ze?Bt:null,motionType:At,onMotionStart:Un,onMotionEnd:Ht,treeNodeRequiredProps:Ut,onMouseMove:function(){ur(null)}}))}))}),dt=It,Mt=be(82661),xt=be(34643),gt=be(65065),_t=10,We=function(Be){(0,ee.Z)(Ne,Be);var Ke=(0,ne.Z)(Ne);function Ne(){var De;(0,se.Z)(this,Ne);for(var we=arguments.length,Le=new Array(we),Ue=0;Ue<we;Ue++)Le[Ue]=arguments[Ue];return De=Ke.call.apply(Ke,[this].concat(Le)),(0,E.Z)((0,le.Z)(De),"destroyed",!1),(0,E.Z)((0,le.Z)(De),"delayedDragEnterLogic",void 0),(0,E.Z)((0,le.Z)(De),"loadingRetryTimes",{}),(0,E.Z)((0,le.Z)(De),"state",{keyEntities:{},indent:null,selectedKeys:[],checkedKeys:[],halfCheckedKeys:[],loadedKeys:[],loadingKeys:[],expandedKeys:[],draggingNodeKey:null,dragChildrenKeys:[],dropTargetKey:null,dropPosition:null,dropContainerKey:null,dropLevelOffset:null,dropTargetPos:null,dropAllowed:!0,dragOverNodeKey:null,treeData:[],flattenNodes:[],focused:!1,activeKey:null,listChanging:!1,prevProps:null,fieldNames:(0,Pe.w$)()}),(0,E.Z)((0,le.Z)(De),"dragStartMousePosition",null),(0,E.Z)((0,le.Z)(De),"dragNodeProps",null),(0,E.Z)((0,le.Z)(De),"currentMouseOverDroppableNodeKey",null),(0,E.Z)((0,le.Z)(De),"listRef",oe.createRef()),(0,E.Z)((0,le.Z)(De),"onNodeDragStart",function(Me,Re){var tt=De.state,lt=tt.expandedKeys,Pt=tt.keyEntities,Ct=De.props.onDragStart,vt=Re.eventKey;De.dragNodeProps=Re,De.dragStartMousePosition={x:Me.clientX,y:Me.clientY};var Ot=(0,Mt._5)(lt,vt);De.setState({draggingNodeKey:vt,dragChildrenKeys:(0,Mt.wA)(vt,Pt),indent:De.listRef.current.getIndentWidth()}),De.setExpandedKeys(Ot),window.addEventListener("dragend",De.onWindowDragEnd),Ct==null||Ct({event:Me,node:(0,Pe.F)(Re)})}),(0,E.Z)((0,le.Z)(De),"onNodeDragEnter",function(Me,Re){var tt=De.state,lt=tt.expandedKeys,Pt=tt.keyEntities,Ct=tt.dragChildrenKeys,vt=tt.flattenNodes,Ot=tt.indent,zt=De.props,Ft=zt.onDragEnter,yt=zt.onExpand,Xt=zt.allowDrop,Lt=zt.direction,Kt=Re.pos,sn=Re.eventKey;if(De.currentMouseOverDroppableNodeKey!==sn&&(De.currentMouseOverDroppableNodeKey=sn),!De.dragNodeProps){De.resetDragState();return}var Sn=(0,Mt.OM)(Me,De.dragNodeProps,Re,Ot,De.dragStartMousePosition,Xt,vt,Pt,lt,Lt),Yt=Sn.dropPosition,In=Sn.dropLevelOffset,Kn=Sn.dropTargetKey,Gn=Sn.dropContainerKey,nr=Sn.dropTargetPos,hr=Sn.dropAllowed,ur=Sn.dragOverNodeKey;if(Ct.includes(Kn)||!hr){De.resetDragState();return}if(De.delayedDragEnterLogic||(De.delayedDragEnterLogic={}),Object.keys(De.delayedDragEnterLogic).forEach(function(Un){clearTimeout(De.delayedDragEnterLogic[Un])}),De.dragNodeProps.eventKey!==Re.eventKey&&(Me.persist(),De.delayedDragEnterLogic[Kt]=window.setTimeout(function(){if(De.state.draggingNodeKey!==null){var Un=(0,ue.Z)(lt),Fn=(0,gt.Z)(Pt,Re.eventKey);Fn&&(Fn.children||[]).length&&(Un=(0,Mt.L0)(lt,Re.eventKey)),De.props.hasOwnProperty("expandedKeys")||De.setExpandedKeys(Un),yt==null||yt(Un,{node:(0,Pe.F)(Re),expanded:!0,nativeEvent:Me.nativeEvent})}},800)),De.dragNodeProps.eventKey===Kn&&In===0){De.resetDragState();return}De.setState({dragOverNodeKey:ur,dropPosition:Yt,dropLevelOffset:In,dropTargetKey:Kn,dropContainerKey:Gn,dropTargetPos:nr,dropAllowed:hr}),Ft==null||Ft({event:Me,node:(0,Pe.F)(Re),expandedKeys:lt})}),(0,E.Z)((0,le.Z)(De),"onNodeDragOver",function(Me,Re){var tt=De.state,lt=tt.dragChildrenKeys,Pt=tt.flattenNodes,Ct=tt.keyEntities,vt=tt.expandedKeys,Ot=tt.indent,zt=De.props,Ft=zt.onDragOver,yt=zt.allowDrop,Xt=zt.direction;if(De.dragNodeProps){var Lt=(0,Mt.OM)(Me,De.dragNodeProps,Re,Ot,De.dragStartMousePosition,yt,Pt,Ct,vt,Xt),Kt=Lt.dropPosition,sn=Lt.dropLevelOffset,Sn=Lt.dropTargetKey,Yt=Lt.dropContainerKey,In=Lt.dropTargetPos,Kn=Lt.dropAllowed,Gn=Lt.dragOverNodeKey;lt.includes(Sn)||!Kn||(De.dragNodeProps.eventKey===Sn&&sn===0?De.state.dropPosition===null&&De.state.dropLevelOffset===null&&De.state.dropTargetKey===null&&De.state.dropContainerKey===null&&De.state.dropTargetPos===null&&De.state.dropAllowed===!1&&De.state.dragOverNodeKey===null||De.resetDragState():Kt===De.state.dropPosition&&sn===De.state.dropLevelOffset&&Sn===De.state.dropTargetKey&&Yt===De.state.dropContainerKey&&In===De.state.dropTargetPos&&Kn===De.state.dropAllowed&&Gn===De.state.dragOverNodeKey||De.setState({dropPosition:Kt,dropLevelOffset:sn,dropTargetKey:Sn,dropContainerKey:Yt,dropTargetPos:In,dropAllowed:Kn,dragOverNodeKey:Gn}),Ft==null||Ft({event:Me,node:(0,Pe.F)(Re)}))}}),(0,E.Z)((0,le.Z)(De),"onNodeDragLeave",function(Me,Re){De.currentMouseOverDroppableNodeKey===Re.eventKey&&!Me.currentTarget.contains(Me.relatedTarget)&&(De.resetDragState(),De.currentMouseOverDroppableNodeKey=null);var tt=De.props.onDragLeave;tt==null||tt({event:Me,node:(0,Pe.F)(Re)})}),(0,E.Z)((0,le.Z)(De),"onWindowDragEnd",function(Me){De.onNodeDragEnd(Me,null,!0),window.removeEventListener("dragend",De.onWindowDragEnd)}),(0,E.Z)((0,le.Z)(De),"onNodeDragEnd",function(Me,Re){var tt=De.props.onDragEnd;De.setState({dragOverNodeKey:null}),De.cleanDragState(),tt==null||tt({event:Me,node:(0,Pe.F)(Re)}),De.dragNodeProps=null,window.removeEventListener("dragend",De.onWindowDragEnd)}),(0,E.Z)((0,le.Z)(De),"onNodeDrop",function(Me,Re){var tt,lt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Pt=De.state,Ct=Pt.dragChildrenKeys,vt=Pt.dropPosition,Ot=Pt.dropTargetKey,zt=Pt.dropTargetPos,Ft=Pt.dropAllowed;if(Ft){var yt=De.props.onDrop;if(De.setState({dragOverNodeKey:null}),De.cleanDragState(),Ot!==null){var Xt=(0,Ce.Z)((0,Ce.Z)({},(0,Pe.H8)(Ot,De.getTreeNodeRequiredProps())),{},{active:((tt=De.getActiveItem())===null||tt===void 0?void 0:tt.key)===Ot,data:(0,gt.Z)(De.state.keyEntities,Ot).node}),Lt=Ct.includes(Ot);(0,ae.ZP)(!Lt,"Can not drop to dragNode's children node. This is a bug of rc-tree. Please report an issue.");var Kt=(0,Mt.yx)(zt),sn={event:Me,node:(0,Pe.F)(Xt),dragNode:De.dragNodeProps?(0,Pe.F)(De.dragNodeProps):null,dragNodesKeys:[De.dragNodeProps.eventKey].concat(Ct),dropToGap:vt!==0,dropPosition:vt+Number(Kt[Kt.length-1])};lt||yt==null||yt(sn),De.dragNodeProps=null}}}),(0,E.Z)((0,le.Z)(De),"cleanDragState",function(){var Me=De.state.draggingNodeKey;Me!==null&&De.setState({draggingNodeKey:null,dropPosition:null,dropContainerKey:null,dropTargetKey:null,dropLevelOffset:null,dropAllowed:!0,dragOverNodeKey:null}),De.dragStartMousePosition=null,De.currentMouseOverDroppableNodeKey=null}),(0,E.Z)((0,le.Z)(De),"triggerExpandActionExpand",function(Me,Re){var tt=De.state,lt=tt.expandedKeys,Pt=tt.flattenNodes,Ct=Re.expanded,vt=Re.key,Ot=Re.isLeaf;if(!(Ot||Me.shiftKey||Me.metaKey||Me.ctrlKey)){var zt=Pt.filter(function(yt){return yt.key===vt})[0],Ft=(0,Pe.F)((0,Ce.Z)((0,Ce.Z)({},(0,Pe.H8)(vt,De.getTreeNodeRequiredProps())),{},{data:zt.data}));De.setExpandedKeys(Ct?(0,Mt._5)(lt,vt):(0,Mt.L0)(lt,vt)),De.onNodeExpand(Me,Ft)}}),(0,E.Z)((0,le.Z)(De),"onNodeClick",function(Me,Re){var tt=De.props,lt=tt.onClick,Pt=tt.expandAction;Pt==="click"&&De.triggerExpandActionExpand(Me,Re),lt==null||lt(Me,Re)}),(0,E.Z)((0,le.Z)(De),"onNodeDoubleClick",function(Me,Re){var tt=De.props,lt=tt.onDoubleClick,Pt=tt.expandAction;Pt==="doubleClick"&&De.triggerExpandActionExpand(Me,Re),lt==null||lt(Me,Re)}),(0,E.Z)((0,le.Z)(De),"onNodeSelect",function(Me,Re){var tt=De.state.selectedKeys,lt=De.state,Pt=lt.keyEntities,Ct=lt.fieldNames,vt=De.props,Ot=vt.onSelect,zt=vt.multiple,Ft=Re.selected,yt=Re[Ct.key],Xt=!Ft;Xt?zt?tt=(0,Mt.L0)(tt,yt):tt=[yt]:tt=(0,Mt._5)(tt,yt);var Lt=tt.map(function(Kt){var sn=(0,gt.Z)(Pt,Kt);return sn?sn.node:null}).filter(Boolean);De.setUncontrolledState({selectedKeys:tt}),Ot==null||Ot(tt,{event:"select",selected:Xt,node:Re,selectedNodes:Lt,nativeEvent:Me.nativeEvent})}),(0,E.Z)((0,le.Z)(De),"onNodeCheck",function(Me,Re,tt){var lt=De.state,Pt=lt.keyEntities,Ct=lt.checkedKeys,vt=lt.halfCheckedKeys,Ot=De.props,zt=Ot.checkStrictly,Ft=Ot.onCheck,yt=Re.key,Xt,Lt={event:"check",node:Re,checked:tt,nativeEvent:Me.nativeEvent};if(zt){var Kt=tt?(0,Mt.L0)(Ct,yt):(0,Mt._5)(Ct,yt),sn=(0,Mt._5)(vt,yt);Xt={checked:Kt,halfChecked:sn},Lt.checkedNodes=Kt.map(function(nr){return(0,gt.Z)(Pt,nr)}).filter(Boolean).map(function(nr){return nr.node}),De.setUncontrolledState({checkedKeys:Kt})}else{var Sn=(0,xt.S)([].concat((0,ue.Z)(Ct),[yt]),!0,Pt),Yt=Sn.checkedKeys,In=Sn.halfCheckedKeys;if(!tt){var Kn=new Set(Yt);Kn.delete(yt);var Gn=(0,xt.S)(Array.from(Kn),{checked:!1,halfCheckedKeys:In},Pt);Yt=Gn.checkedKeys,In=Gn.halfCheckedKeys}Xt=Yt,Lt.checkedNodes=[],Lt.checkedNodesPositions=[],Lt.halfCheckedKeys=In,Yt.forEach(function(nr){var hr=(0,gt.Z)(Pt,nr);if(hr){var ur=hr.node,Un=hr.pos;Lt.checkedNodes.push(ur),Lt.checkedNodesPositions.push({node:ur,pos:Un})}}),De.setUncontrolledState({checkedKeys:Yt},!1,{halfCheckedKeys:In})}Ft==null||Ft(Xt,Lt)}),(0,E.Z)((0,le.Z)(De),"onNodeLoad",function(Me){var Re,tt=Me.key,lt=De.state.keyEntities,Pt=(0,gt.Z)(lt,tt);if(!(Pt!=null&&(Re=Pt.children)!==null&&Re!==void 0&&Re.length)){var Ct=new Promise(function(vt,Ot){De.setState(function(zt){var Ft=zt.loadedKeys,yt=Ft===void 0?[]:Ft,Xt=zt.loadingKeys,Lt=Xt===void 0?[]:Xt,Kt=De.props,sn=Kt.loadData,Sn=Kt.onLoad;if(!sn||yt.includes(tt)||Lt.includes(tt))return null;var Yt=sn(Me);return Yt.then(function(){var In=De.state.loadedKeys,Kn=(0,Mt.L0)(In,tt);Sn==null||Sn(Kn,{event:"load",node:Me}),De.setUncontrolledState({loadedKeys:Kn}),De.setState(function(Gn){return{loadingKeys:(0,Mt._5)(Gn.loadingKeys,tt)}}),vt()}).catch(function(In){if(De.setState(function(Gn){return{loadingKeys:(0,Mt._5)(Gn.loadingKeys,tt)}}),De.loadingRetryTimes[tt]=(De.loadingRetryTimes[tt]||0)+1,De.loadingRetryTimes[tt]>=_t){var Kn=De.state.loadedKeys;(0,ae.ZP)(!1,"Retry for `loadData` many times but still failed. No more retry."),De.setUncontrolledState({loadedKeys:(0,Mt.L0)(Kn,tt)}),vt()}Ot(In)}),{loadingKeys:(0,Mt.L0)(Lt,tt)}})});return Ct.catch(function(){}),Ct}}),(0,E.Z)((0,le.Z)(De),"onNodeMouseEnter",function(Me,Re){var tt=De.props.onMouseEnter;tt==null||tt({event:Me,node:Re})}),(0,E.Z)((0,le.Z)(De),"onNodeMouseLeave",function(Me,Re){var tt=De.props.onMouseLeave;tt==null||tt({event:Me,node:Re})}),(0,E.Z)((0,le.Z)(De),"onNodeContextMenu",function(Me,Re){var tt=De.props.onRightClick;tt&&(Me.preventDefault(),tt({event:Me,node:Re}))}),(0,E.Z)((0,le.Z)(De),"onFocus",function(){var Me=De.props.onFocus;De.setState({focused:!0});for(var Re=arguments.length,tt=new Array(Re),lt=0;lt<Re;lt++)tt[lt]=arguments[lt];Me==null||Me.apply(void 0,tt)}),(0,E.Z)((0,le.Z)(De),"onBlur",function(){var Me=De.props.onBlur;De.setState({focused:!1}),De.onActiveChange(null);for(var Re=arguments.length,tt=new Array(Re),lt=0;lt<Re;lt++)tt[lt]=arguments[lt];Me==null||Me.apply(void 0,tt)}),(0,E.Z)((0,le.Z)(De),"getTreeNodeRequiredProps",function(){var Me=De.state,Re=Me.expandedKeys,tt=Me.selectedKeys,lt=Me.loadedKeys,Pt=Me.loadingKeys,Ct=Me.checkedKeys,vt=Me.halfCheckedKeys,Ot=Me.dragOverNodeKey,zt=Me.dropPosition,Ft=Me.keyEntities;return{expandedKeys:Re||[],selectedKeys:tt||[],loadedKeys:lt||[],loadingKeys:Pt||[],checkedKeys:Ct||[],halfCheckedKeys:vt||[],dragOverNodeKey:Ot,dropPosition:zt,keyEntities:Ft}}),(0,E.Z)((0,le.Z)(De),"setExpandedKeys",function(Me){var Re=De.state,tt=Re.treeData,lt=Re.fieldNames,Pt=(0,Pe.oH)(tt,Me,lt);De.setUncontrolledState({expandedKeys:Me,flattenNodes:Pt},!0)}),(0,E.Z)((0,le.Z)(De),"onNodeExpand",function(Me,Re){var tt=De.state.expandedKeys,lt=De.state,Pt=lt.listChanging,Ct=lt.fieldNames,vt=De.props,Ot=vt.onExpand,zt=vt.loadData,Ft=Re.expanded,yt=Re[Ct.key];if(!Pt){var Xt=tt.includes(yt),Lt=!Ft;if((0,ae.ZP)(Ft&&Xt||!Ft&&!Xt,"Expand state not sync with index check"),tt=Lt?(0,Mt.L0)(tt,yt):(0,Mt._5)(tt,yt),De.setExpandedKeys(tt),Ot==null||Ot(tt,{node:Re,expanded:Lt,nativeEvent:Me.nativeEvent}),Lt&&zt){var Kt=De.onNodeLoad(Re);Kt&&Kt.then(function(){var sn=(0,Pe.oH)(De.state.treeData,tt,Ct);De.setUncontrolledState({flattenNodes:sn})}).catch(function(){var sn=De.state.expandedKeys,Sn=(0,Mt._5)(sn,yt);De.setExpandedKeys(Sn)})}}}),(0,E.Z)((0,le.Z)(De),"onListChangeStart",function(){De.setUncontrolledState({listChanging:!0})}),(0,E.Z)((0,le.Z)(De),"onListChangeEnd",function(){setTimeout(function(){De.setUncontrolledState({listChanging:!1})})}),(0,E.Z)((0,le.Z)(De),"onActiveChange",function(Me){var Re=De.state.activeKey,tt=De.props,lt=tt.onActiveChange,Pt=tt.itemScrollOffset,Ct=Pt===void 0?0:Pt;Re!==Me&&(De.setState({activeKey:Me}),Me!==null&&De.scrollTo({key:Me,offset:Ct}),lt==null||lt(Me))}),(0,E.Z)((0,le.Z)(De),"getActiveItem",function(){var Me=De.state,Re=Me.activeKey,tt=Me.flattenNodes;return Re===null?null:tt.find(function(lt){var Pt=lt.key;return Pt===Re})||null}),(0,E.Z)((0,le.Z)(De),"offsetActiveKey",function(Me){var Re=De.state,tt=Re.flattenNodes,lt=Re.activeKey,Pt=tt.findIndex(function(Ot){var zt=Ot.key;return zt===lt});Pt===-1&&Me<0&&(Pt=tt.length),Pt=(Pt+Me+tt.length)%tt.length;var Ct=tt[Pt];if(Ct){var vt=Ct.key;De.onActiveChange(vt)}else De.onActiveChange(null)}),(0,E.Z)((0,le.Z)(De),"onKeyDown",function(Me){var Re=De.state,tt=Re.activeKey,lt=Re.expandedKeys,Pt=Re.checkedKeys,Ct=Re.fieldNames,vt=De.props,Ot=vt.onKeyDown,zt=vt.checkable,Ft=vt.selectable;switch(Me.which){case x.Z.UP:{De.offsetActiveKey(-1),Me.preventDefault();break}case x.Z.DOWN:{De.offsetActiveKey(1),Me.preventDefault();break}}var yt=De.getActiveItem();if(yt&&yt.data){var Xt=De.getTreeNodeRequiredProps(),Lt=yt.data.isLeaf===!1||!!(yt.data[Ct.children]||[]).length,Kt=(0,Pe.F)((0,Ce.Z)((0,Ce.Z)({},(0,Pe.H8)(tt,Xt)),{},{data:yt.data,active:!0}));switch(Me.which){case x.Z.LEFT:{Lt&<.includes(tt)?De.onNodeExpand({},Kt):yt.parent&&De.onActiveChange(yt.parent.key),Me.preventDefault();break}case x.Z.RIGHT:{Lt&&!lt.includes(tt)?De.onNodeExpand({},Kt):yt.children&&yt.children.length&&De.onActiveChange(yt.children[0].key),Me.preventDefault();break}case x.Z.ENTER:case x.Z.SPACE:{zt&&!Kt.disabled&&Kt.checkable!==!1&&!Kt.disableCheckbox?De.onNodeCheck({},Kt,!Pt.includes(tt)):!zt&&Ft&&!Kt.disabled&&Kt.selectable!==!1&&De.onNodeSelect({},Kt);break}}}Ot==null||Ot(Me)}),(0,E.Z)((0,le.Z)(De),"setUncontrolledState",function(Me){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,tt=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null;if(!De.destroyed){var lt=!1,Pt=!0,Ct={};Object.keys(Me).forEach(function(vt){if(De.props.hasOwnProperty(vt)){Pt=!1;return}lt=!0,Ct[vt]=Me[vt]}),lt&&(!Re||Pt)&&De.setState((0,Ce.Z)((0,Ce.Z)({},Ct),tt))}}),(0,E.Z)((0,le.Z)(De),"scrollTo",function(Me){De.listRef.current.scrollTo(Me)}),De}return(0,te.Z)(Ne,[{key:"componentDidMount",value:function(){this.destroyed=!1,this.onUpdated()}},{key:"componentDidUpdate",value:function(){this.onUpdated()}},{key:"onUpdated",value:function(){var we=this.props,Le=we.activeKey,Ue=we.itemScrollOffset,Me=Ue===void 0?0:Ue;Le!==void 0&&Le!==this.state.activeKey&&(this.setState({activeKey:Le}),Le!==null&&this.scrollTo({key:Le,offset:Me}))}},{key:"componentWillUnmount",value:function(){window.removeEventListener("dragend",this.onWindowDragEnd),this.destroyed=!0}},{key:"resetDragState",value:function(){this.setState({dragOverNodeKey:null,dropPosition:null,dropLevelOffset:null,dropTargetKey:null,dropContainerKey:null,dropTargetPos:null,dropAllowed:!1})}},{key:"render",value:function(){var we=this.state,Le=we.focused,Ue=we.flattenNodes,Me=we.keyEntities,Re=we.draggingNodeKey,tt=we.activeKey,lt=we.dropLevelOffset,Pt=we.dropContainerKey,Ct=we.dropTargetKey,vt=we.dropPosition,Ot=we.dragOverNodeKey,zt=we.indent,Ft=this.props,yt=Ft.prefixCls,Xt=Ft.className,Lt=Ft.style,Kt=Ft.showLine,sn=Ft.focusable,Sn=Ft.tabIndex,Yt=Sn===void 0?0:Sn,In=Ft.selectable,Kn=Ft.showIcon,Gn=Ft.icon,nr=Ft.switcherIcon,hr=Ft.draggable,ur=Ft.checkable,Un=Ft.checkStrictly,Fn=Ft.disabled,or=Ft.motion,Vn=Ft.loadData,Bn=Ft.filterTreeNode,_n=Ft.height,zn=Ft.itemHeight,cr=Ft.scrollWidth,Dn=Ft.virtual,Cn=Ft.titleRender,er=Ft.dropIndicatorRender,$t=Ft.onContextMenu,Ie=Ft.onScroll,Ze=Ft.direction,qe=Ft.rootClassName,st=Ft.rootStyle,mt=(0,re.Z)(this.props,{aria:!0,data:!0}),Nt;hr&&((0,ie.Z)(hr)==="object"?Nt=hr:typeof hr=="function"?Nt={nodeDraggable:hr}:Nt={});var kt={prefixCls:yt,selectable:In,showIcon:Kn,icon:Gn,switcherIcon:nr,draggable:Nt,draggingNodeKey:Re,checkable:ur,checkStrictly:Un,disabled:Fn,keyEntities:Me,dropLevelOffset:lt,dropContainerKey:Pt,dropTargetKey:Ct,dropPosition:vt,dragOverNodeKey:Ot,indent:zt,direction:Ze,dropIndicatorRender:er,loadData:Vn,filterTreeNode:Bn,titleRender:Cn,onNodeClick:this.onNodeClick,onNodeDoubleClick:this.onNodeDoubleClick,onNodeExpand:this.onNodeExpand,onNodeSelect:this.onNodeSelect,onNodeCheck:this.onNodeCheck,onNodeLoad:this.onNodeLoad,onNodeMouseEnter:this.onNodeMouseEnter,onNodeMouseLeave:this.onNodeMouseLeave,onNodeContextMenu:this.onNodeContextMenu,onNodeDragStart:this.onNodeDragStart,onNodeDragEnter:this.onNodeDragEnter,onNodeDragOver:this.onNodeDragOver,onNodeDragLeave:this.onNodeDragLeave,onNodeDragEnd:this.onNodeDragEnd,onNodeDrop:this.onNodeDrop};return oe.createElement(ve.k.Provider,{value:kt},oe.createElement("div",{className:z()(yt,Xt,qe,(0,E.Z)((0,E.Z)((0,E.Z)({},"".concat(yt,"-show-line"),Kt),"".concat(yt,"-focused"),Le),"".concat(yt,"-active-focused"),tt!==null)),style:st},oe.createElement(dt,(0,ce.Z)({ref:this.listRef,prefixCls:yt,style:Lt,data:Ue,disabled:Fn,selectable:In,checkable:!!ur,motion:or,dragging:Re!==null,height:_n,itemHeight:zn,virtual:Dn,focusable:sn,focused:Le,tabIndex:Yt,activeItem:this.getActiveItem(),onFocus:this.onFocus,onBlur:this.onBlur,onKeyDown:this.onKeyDown,onActiveChange:this.onActiveChange,onListChangeStart:this.onListChangeStart,onListChangeEnd:this.onListChangeEnd,onContextMenu:$t,onScroll:Ie,scrollWidth:cr},this.getTreeNodeRequiredProps(),mt))))}}],[{key:"getDerivedStateFromProps",value:function(we,Le){var Ue=Le.prevProps,Me={prevProps:we};function Re(Yt){return!Ue&&we.hasOwnProperty(Yt)||Ue&&Ue[Yt]!==we[Yt]}var tt,lt=Le.fieldNames;if(Re("fieldNames")&&(lt=(0,Pe.w$)(we.fieldNames),Me.fieldNames=lt),Re("treeData")?tt=we.treeData:Re("children")&&((0,ae.ZP)(!1,"`children` of Tree is deprecated. Please use `treeData` instead."),tt=(0,Pe.zn)(we.children)),tt){Me.treeData=tt;var Pt=(0,Pe.I8)(tt,{fieldNames:lt});Me.keyEntities=(0,Ce.Z)((0,E.Z)({},ze,$e),Pt.keyEntities)}var Ct=Me.keyEntities||Le.keyEntities;if(Re("expandedKeys")||Ue&&Re("autoExpandParent"))Me.expandedKeys=we.autoExpandParent||!Ue&&we.defaultExpandParent?(0,Mt.r7)(we.expandedKeys,Ct):we.expandedKeys;else if(!Ue&&we.defaultExpandAll){var vt=(0,Ce.Z)({},Ct);delete vt[ze];var Ot=[];Object.keys(vt).forEach(function(Yt){var In=vt[Yt];In.children&&In.children.length&&Ot.push(In.key)}),Me.expandedKeys=Ot}else!Ue&&we.defaultExpandedKeys&&(Me.expandedKeys=we.autoExpandParent||we.defaultExpandParent?(0,Mt.r7)(we.defaultExpandedKeys,Ct):we.defaultExpandedKeys);if(Me.expandedKeys||delete Me.expandedKeys,tt||Me.expandedKeys){var zt=(0,Pe.oH)(tt||Le.treeData,Me.expandedKeys||Le.expandedKeys,lt);Me.flattenNodes=zt}if(we.selectable&&(Re("selectedKeys")?Me.selectedKeys=(0,Mt.BT)(we.selectedKeys,we):!Ue&&we.defaultSelectedKeys&&(Me.selectedKeys=(0,Mt.BT)(we.defaultSelectedKeys,we))),we.checkable){var Ft;if(Re("checkedKeys")?Ft=(0,Mt.E6)(we.checkedKeys)||{}:!Ue&&we.defaultCheckedKeys?Ft=(0,Mt.E6)(we.defaultCheckedKeys)||{}:tt&&(Ft=(0,Mt.E6)(we.checkedKeys)||{checkedKeys:Le.checkedKeys,halfCheckedKeys:Le.halfCheckedKeys}),Ft){var yt=Ft,Xt=yt.checkedKeys,Lt=Xt===void 0?[]:Xt,Kt=yt.halfCheckedKeys,sn=Kt===void 0?[]:Kt;if(!we.checkStrictly){var Sn=(0,xt.S)(Lt,!0,Ct);Lt=Sn.checkedKeys,sn=Sn.halfCheckedKeys}Me.checkedKeys=Lt,Me.halfCheckedKeys=sn}}return Re("loadedKeys")&&(Me.loadedKeys=we.loadedKeys),Me}}]),Ne}(oe.Component);(0,E.Z)(We,"defaultProps",{prefixCls:"rc-tree",showLine:!1,showIcon:!0,selectable:!0,multiple:!1,checkable:!1,disabled:!1,checkStrictly:!1,draggable:!1,defaultExpandParent:!0,autoExpandParent:!1,defaultExpandAll:!1,defaultExpandedKeys:[],defaultCheckedKeys:[],defaultSelectedKeys:[],dropIndicatorRender:me,allowDrop:function(){return!0},expandAction:!1}),(0,E.Z)(We,"TreeNode",Ee.Z);var Ae=We,Se=Ae},82661:function(qt,Dt,be){"use strict";be.d(Dt,{BT:function(){return oe},E6:function(){return me},L0:function(){return E},OM:function(){return ae},_5:function(){return ne},r7:function(){return ge},wA:function(){return z},yx:function(){return b}});var ce=be(94480),ie=be(76190),Ce=be(48736),ue=be(59301),se=be(639),te=be(65065),le=be(34061),ee=null;function ne(_e,he){if(!_e)return[];var pe=_e.slice(),ke=pe.indexOf(he);return ke>=0&&pe.splice(ke,1),pe}function E(_e,he){var pe=(_e||[]).slice();return pe.indexOf(he)===-1&&pe.push(he),pe}function b(_e){return _e.split("-")}function z(_e,he){var pe=[],ke=(0,te.Z)(he,_e);function Te(){var Ee=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];Ee.forEach(function(Oe){var je=Oe.key,Pe=Oe.children;pe.push(je),Te(Pe)})}return Te(ke.children),pe}function x(_e){if(_e.parent){var he=b(_e.pos);return Number(he[he.length-1])===_e.parent.children.length-1}return!1}function re(_e){var he=b(_e.pos);return Number(he[he.length-1])===0}function ae(_e,he,pe,ke,Te,Ee,Oe,je,Pe,Qe){var Xe,ot=_e.clientX,He=_e.clientY,rt=_e.target.getBoundingClientRect(),Ye=rt.top,ut=rt.height,Ge=(Qe==="rtl"?-1:1)*(((Te==null?void 0:Te.x)||0)-ot),ze=(Ge-12)/ke,Ve=Pe.filter(function(Se){var Be;return(Be=je[Se])===null||Be===void 0||(Be=Be.children)===null||Be===void 0?void 0:Be.length}),$e=(0,te.Z)(je,pe.eventKey);if(He<Ye+ut/2){var nt=Oe.findIndex(function(Se){return Se.key===$e.key}),et=nt<=0?0:nt-1,pt=Oe[et].key;$e=(0,te.Z)(je,pt)}var ct=$e.key,It=$e,dt=$e.key,Mt=0,xt=0;if(!Ve.includes(ct))for(var gt=0;gt<ze&&x($e);gt+=1)$e=$e.parent,xt+=1;var _t=he.data,We=$e.node,Ae=!0;return re($e)&&$e.level===0&&He<Ye+ut/2&&Ee({dragNode:_t,dropNode:We,dropPosition:-1})&&$e.key===pe.eventKey?Mt=-1:(It.children||[]).length&&Ve.includes(dt)?Ee({dragNode:_t,dropNode:We,dropPosition:0})?Mt=0:Ae=!1:xt===0?ze>-1.5?Ee({dragNode:_t,dropNode:We,dropPosition:1})?Mt=1:Ae=!1:Ee({dragNode:_t,dropNode:We,dropPosition:0})?Mt=0:Ee({dragNode:_t,dropNode:We,dropPosition:1})?Mt=1:Ae=!1:Ee({dragNode:_t,dropNode:We,dropPosition:1})?Mt=1:Ae=!1,{dropPosition:Mt,dropLevelOffset:xt,dropTargetKey:$e.key,dropTargetPos:$e.pos,dragOverNodeKey:dt,dropContainerKey:Mt===0?null:((Xe=$e.parent)===null||Xe===void 0?void 0:Xe.key)||null,dropAllowed:Ae}}function oe(_e,he){if(_e){var pe=he.multiple;return pe?_e.slice():_e.length?[_e[0]]:_e}}var ve=function(he){return he};function ye(_e,he){if(!_e)return[];var pe=he||{},ke=pe.processProps,Te=ke===void 0?ve:ke,Ee=Array.isArray(_e)?_e:[_e];return Ee.map(function(Oe){var je=Oe.children,Pe=_objectWithoutProperties(Oe,ee),Qe=ye(je,he);return React.createElement(TreeNode,_extends({key:Pe.key},Te(Pe)),Qe)})}function me(_e){if(!_e)return null;var he;if(Array.isArray(_e))he={checkedKeys:_e,halfCheckedKeys:void 0};else if((0,ie.Z)(_e)==="object")he={checkedKeys:_e.checked||void 0,halfCheckedKeys:_e.halfChecked||void 0};else return(0,Ce.ZP)(!1,"`checkedKeys` is not an array or an object"),null;return he}function ge(_e,he){var pe=new Set;function ke(Te){if(!pe.has(Te)){var Ee=(0,te.Z)(he,Te);if(Ee){pe.add(Te);var Oe=Ee.parent,je=Ee.node;je.disabled||Oe&&ke(Oe.key)}}}return(_e||[]).forEach(function(Te){ke(Te)}),(0,ce.Z)(pe)}},34643:function(qt,Dt,be){"use strict";be.d(Dt,{S:function(){return le}});var ce=be(48736),ie=be(65065);function Ce(ee,ne){var E=new Set;return ee.forEach(function(b){ne.has(b)||E.add(b)}),E}function ue(ee){var ne=ee||{},E=ne.disabled,b=ne.disableCheckbox,z=ne.checkable;return!!(E||b)||z===!1}function se(ee,ne,E,b){for(var z=new Set(ee),x=new Set,re=0;re<=E;re+=1){var ae=ne.get(re)||new Set;ae.forEach(function(me){var ge=me.key,_e=me.node,he=me.children,pe=he===void 0?[]:he;z.has(ge)&&!b(_e)&&pe.filter(function(ke){return!b(ke.node)}).forEach(function(ke){z.add(ke.key)})})}for(var oe=new Set,ve=E;ve>=0;ve-=1){var ye=ne.get(ve)||new Set;ye.forEach(function(me){var ge=me.parent,_e=me.node;if(!(b(_e)||!me.parent||oe.has(me.parent.key))){if(b(me.parent.node)){oe.add(ge.key);return}var he=!0,pe=!1;(ge.children||[]).filter(function(ke){return!b(ke.node)}).forEach(function(ke){var Te=ke.key,Ee=z.has(Te);he&&!Ee&&(he=!1),!pe&&(Ee||x.has(Te))&&(pe=!0)}),he&&z.add(ge.key),pe&&x.add(ge.key),oe.add(ge.key)}})}return{checkedKeys:Array.from(z),halfCheckedKeys:Array.from(Ce(x,z))}}function te(ee,ne,E,b,z){for(var x=new Set(ee),re=new Set(ne),ae=0;ae<=b;ae+=1){var oe=E.get(ae)||new Set;oe.forEach(function(ge){var _e=ge.key,he=ge.node,pe=ge.children,ke=pe===void 0?[]:pe;!x.has(_e)&&!re.has(_e)&&!z(he)&&ke.filter(function(Te){return!z(Te.node)}).forEach(function(Te){x.delete(Te.key)})})}re=new Set;for(var ve=new Set,ye=b;ye>=0;ye-=1){var me=E.get(ye)||new Set;me.forEach(function(ge){var _e=ge.parent,he=ge.node;if(!(z(he)||!ge.parent||ve.has(ge.parent.key))){if(z(ge.parent.node)){ve.add(_e.key);return}var pe=!0,ke=!1;(_e.children||[]).filter(function(Te){return!z(Te.node)}).forEach(function(Te){var Ee=Te.key,Oe=x.has(Ee);pe&&!Oe&&(pe=!1),!ke&&(Oe||re.has(Ee))&&(ke=!0)}),pe||x.delete(_e.key),ke&&re.add(_e.key),ve.add(_e.key)}})}return{checkedKeys:Array.from(x),halfCheckedKeys:Array.from(Ce(re,x))}}function le(ee,ne,E,b){var z=[],x;b?x=b:x=ue;var re=new Set(ee.filter(function(ye){var me=!!(0,ie.Z)(E,ye);return me||z.push(ye),me})),ae=new Map,oe=0;Object.keys(E).forEach(function(ye){var me=E[ye],ge=me.level,_e=ae.get(ge);_e||(_e=new Set,ae.set(ge,_e)),_e.add(me),oe=Math.max(oe,ge)}),(0,ce.ZP)(!z.length,"Tree missing follow keys: ".concat(z.slice(0,100).map(function(ye){return"'".concat(ye,"'")}).join(", ")));var ve;return ne===!0?ve=se(re,ae,oe,x):ve=te(re,ne.halfCheckedKeys,ae,oe,x),ve}},65065:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ce}});function ce(ie,Ce){return ie[Ce]}},34061:function(qt,Dt,be){"use strict";be.d(Dt,{F:function(){return ge},H8:function(){return me},I8:function(){return ye},km:function(){return z},oH:function(){return oe},w$:function(){return x},zn:function(){return ae}});var ce=be(76190),ie=be(94480),Ce=be(33885),ue=be(75931),se=be(11592),te=be(2738),le=be(48736),ee=be(65065),ne=["children"];function E(_e,he){return"".concat(_e,"-").concat(he)}function b(_e){return _e&&_e.type&&_e.type.isTreeNode}function z(_e,he){return _e!=null?_e:he}function x(_e){var he=_e||{},pe=he.title,ke=he._title,Te=he.key,Ee=he.children,Oe=pe||"title";return{title:Oe,_title:ke||[Oe],key:Te||"key",children:Ee||"children"}}function re(_e,he){var pe=new Map;function ke(Te){var Ee=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"";(Te||[]).forEach(function(Oe){var je=Oe[he.key],Pe=Oe[he.children];warning(je!=null,"Tree node must have a certain key: [".concat(Ee).concat(je,"]"));var Qe=String(je);warning(!pe.has(Qe)||je===null||je===void 0,"Same 'key' exist in the Tree: ".concat(Qe)),pe.set(Qe,!0),ke(Pe,"".concat(Ee).concat(Qe," > "))})}ke(_e)}function ae(_e){function he(pe){var ke=(0,se.Z)(pe);return ke.map(function(Te){if(!b(Te))return(0,le.ZP)(!Te,"Tree/TreeNode can only accept TreeNode as children."),null;var Ee=Te.key,Oe=Te.props,je=Oe.children,Pe=(0,ue.Z)(Oe,ne),Qe=(0,Ce.Z)({key:Ee},Pe),Xe=he(je);return Xe.length&&(Qe.children=Xe),Qe}).filter(function(Te){return Te})}return he(_e)}function oe(_e,he,pe){var ke=x(pe),Te=ke._title,Ee=ke.key,Oe=ke.children,je=new Set(he===!0?[]:he),Pe=[];function Qe(Xe){var ot=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null;return Xe.map(function(He,rt){for(var Ye=E(ot?ot.pos:"0",rt),ut=z(He[Ee],Ye),Ge,ze=0;ze<Te.length;ze+=1){var Ve=Te[ze];if(He[Ve]!==void 0){Ge=He[Ve];break}}var $e=Object.assign((0,te.Z)(He,[].concat((0,ie.Z)(Te),[Ee,Oe])),{title:Ge,key:ut,parent:ot,pos:Ye,children:null,data:He,isStart:[].concat((0,ie.Z)(ot?ot.isStart:[]),[rt===0]),isEnd:[].concat((0,ie.Z)(ot?ot.isEnd:[]),[rt===Xe.length-1])});return Pe.push($e),he===!0||je.has(ut)?$e.children=Qe(He[Oe]||[],$e):$e.children=[],$e})}return Qe(_e),Pe}function ve(_e,he,pe){var ke={};(0,ce.Z)(pe)==="object"?ke=pe:ke={externalGetKey:pe},ke=ke||{};var Te=ke,Ee=Te.childrenPropName,Oe=Te.externalGetKey,je=Te.fieldNames,Pe=x(je),Qe=Pe.key,Xe=Pe.children,ot=Ee||Xe,He;Oe?typeof Oe=="string"?He=function(ut){return ut[Oe]}:typeof Oe=="function"&&(He=function(ut){return Oe(ut)}):He=function(ut,Ge){return z(ut[Qe],Ge)};function rt(Ye,ut,Ge,ze){var Ve=Ye?Ye[ot]:_e,$e=Ye?E(Ge.pos,ut):"0",nt=Ye?[].concat((0,ie.Z)(ze),[Ye]):[];if(Ye){var et=He(Ye,$e),pt={node:Ye,index:ut,pos:$e,key:et,parentPos:Ge.node?Ge.pos:null,level:Ge.level+1,nodes:nt};he(pt)}Ve&&Ve.forEach(function(ct,It){rt(ct,It,{node:Ye,pos:$e,level:Ge?Ge.level+1:-1},nt)})}rt(null)}function ye(_e){var he=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},pe=he.initWrapper,ke=he.processEntity,Te=he.onProcessFinished,Ee=he.externalGetKey,Oe=he.childrenPropName,je=he.fieldNames,Pe=arguments.length>2?arguments[2]:void 0,Qe=Ee||Pe,Xe={},ot={},He={posEntities:Xe,keyEntities:ot};return pe&&(He=pe(He)||He),ve(_e,function(rt){var Ye=rt.node,ut=rt.index,Ge=rt.pos,ze=rt.key,Ve=rt.parentPos,$e=rt.level,nt=rt.nodes,et={node:Ye,nodes:nt,index:ut,key:ze,pos:Ge,level:$e},pt=z(ze,Ge);Xe[Ge]=et,ot[pt]=et,et.parent=Xe[Ve],et.parent&&(et.parent.children=et.parent.children||[],et.parent.children.push(et)),ke&&ke(et,He)},{externalGetKey:Qe,childrenPropName:Oe,fieldNames:je}),Te&&Te(He),He}function me(_e,he){var pe=he.expandedKeys,ke=he.selectedKeys,Te=he.loadedKeys,Ee=he.loadingKeys,Oe=he.checkedKeys,je=he.halfCheckedKeys,Pe=he.dragOverNodeKey,Qe=he.dropPosition,Xe=he.keyEntities,ot=(0,ee.Z)(Xe,_e),He={eventKey:_e,expanded:pe.indexOf(_e)!==-1,selected:ke.indexOf(_e)!==-1,loaded:Te.indexOf(_e)!==-1,loading:Ee.indexOf(_e)!==-1,checked:Oe.indexOf(_e)!==-1,halfChecked:je.indexOf(_e)!==-1,pos:String(ot?ot.pos:""),dragOver:Pe===_e&&Qe===0,dragOverGapTop:Pe===_e&&Qe===-1,dragOverGapBottom:Pe===_e&&Qe===1};return He}function ge(_e){var he=_e.data,pe=_e.expanded,ke=_e.selected,Te=_e.checked,Ee=_e.loaded,Oe=_e.loading,je=_e.halfChecked,Pe=_e.dragOver,Qe=_e.dragOverGapTop,Xe=_e.dragOverGapBottom,ot=_e.pos,He=_e.active,rt=_e.eventKey,Ye=(0,Ce.Z)((0,Ce.Z)({},he),{},{expanded:pe,selected:ke,checked:Te,loaded:Ee,loading:Oe,halfChecked:je,dragOver:Pe,dragOverGapTop:Qe,dragOverGapBottom:Xe,pos:ot,active:He,key:rt});return"props"in Ye||Object.defineProperty(Ye,"props",{get:function(){return(0,le.ZP)(!1,"Second param return from event is node data instead of TreeNode instance. Please read value directly instead of reading from `props`."),_e}}),Ye}},8224:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ie}});var ce=be(4676);function ie(Ce,ue,se,te){var le=ce.unstable_batchedUpdates?function(ne){ce.unstable_batchedUpdates(se,ne)}:se;return Ce!=null&&Ce.addEventListener&&Ce.addEventListener(ue,le,te),{remove:function(){Ce!=null&&Ce.removeEventListener&&Ce.removeEventListener(ue,le,te)}}}},24514:function(qt,Dt,be){"use strict";be.d(Dt,{G:function(){return ue}});var ce=be(47273),ie=function(te){if((0,ce.Z)()&&window.document.documentElement){var le=Array.isArray(te)?te:[te],ee=window.document.documentElement;return le.some(function(ne){return ne in ee.style})}return!1},Ce=function(te,le){if(!ie(te))return!1;var ee=document.createElement("div"),ne=ee.style[te];return ee.style[te]=le,ee.style[te]!==ne};function ue(se,te){return!Array.isArray(se)&&te!==void 0?Ce(se,te):ie(se)}},48911:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return _t}});var ce=be(54476),ie=be(76190),Ce=be(33885),ue=be(20068),se=be(42978),te=be(75931),le=be(92310),ee=be.n(le),ne=be(29301),E=be(70425),b=be(34280),z=be(59301),x=be(4676),re=z.forwardRef(function(We,Ae){var Se=We.height,Be=We.offsetY,Ke=We.offsetX,Ne=We.children,De=We.prefixCls,we=We.onInnerResize,Le=We.innerProps,Ue=We.rtl,Me=We.extra,Re={},tt={display:"flex",flexDirection:"column"};return Be!==void 0&&(Re={height:Se,position:"relative",overflow:"hidden"},tt=(0,Ce.Z)((0,Ce.Z)({},tt),{},(0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)((0,ue.Z)({transform:"translateY(".concat(Be,"px)")},Ue?"marginRight":"marginLeft",-Ke),"position","absolute"),"left",0),"right",0),"top",0))),z.createElement("div",{style:Re},z.createElement(ne.Z,{onResize:function(Pt){var Ct=Pt.offsetHeight;Ct&&we&&we()}},z.createElement("div",(0,ce.Z)({style:tt,className:ee()((0,ue.Z)({},"".concat(De,"-holder-inner"),De)),ref:Ae},Le),Ne,Me)))});re.displayName="Filler";var ae=re;function oe(We){var Ae=We.children,Se=We.setRef,Be=z.useCallback(function(Ke){Se(Ke)},[]);return z.cloneElement(Ae,{ref:Be})}function ve(We,Ae,Se,Be,Ke,Ne,De,we){var Le=we.getKey;return We.slice(Ae,Se+1).map(function(Ue,Me){var Re=Ae+Me,tt=De(Ue,Re,{style:{width:Be},offsetX:Ke}),lt=Le(Ue);return z.createElement(oe,{key:lt,setRef:function(Ct){return Ne(Ue,Ct)}},tt)})}function ye(We,Ae,Se,Be){var Ke=Se-We,Ne=Ae-Se,De=Math.min(Ke,Ne)*2;if(Be<=De){var we=Math.floor(Be/2);return Be%2?Se+we+1:Se-we}return Ke>Ne?Se-(Be-Ne):Se+(Be-Ke)}function me(We,Ae,Se){var Be=We.length,Ke=Ae.length,Ne,De;if(Be===0&&Ke===0)return null;Be<Ke?(Ne=We,De=Ae):(Ne=Ae,De=We);var we={__EMPTY_ITEM__:!0};function Le(Pt){return Pt!==void 0?Se(Pt):we}for(var Ue=null,Me=Math.abs(Be-Ke)!==1,Re=0;Re<De.length;Re+=1){var tt=Le(Ne[Re]),lt=Le(De[Re]);if(tt!==lt){Ue=Re,Me=Me||tt!==Le(De[Re+1]);break}}return Ue===null?null:{index:Ue,multiple:Me}}function ge(We,Ae,Se){var Be=z.useState(We),Ke=(0,se.Z)(Be,2),Ne=Ke[0],De=Ke[1],we=z.useState(null),Le=(0,se.Z)(we,2),Ue=Le[0],Me=Le[1];return z.useEffect(function(){var Re=me(Ne||[],We||[],Ae);(Re==null?void 0:Re.index)!==void 0&&(Se==null||Se(Re.index),Me(We[Re.index])),De(We)},[We]),[Ue]}var _e=be(16089),he=(typeof navigator=="undefined"?"undefined":(0,ie.Z)(navigator))==="object"&&/Firefox/i.test(navigator.userAgent),pe=he,ke=function(We,Ae,Se,Be){var Ke=(0,z.useRef)(!1),Ne=(0,z.useRef)(null);function De(){clearTimeout(Ne.current),Ke.current=!0,Ne.current=setTimeout(function(){Ke.current=!1},50)}var we=(0,z.useRef)({top:We,bottom:Ae,left:Se,right:Be});return we.current.top=We,we.current.bottom=Ae,we.current.left=Se,we.current.right=Be,function(Le,Ue){var Me=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,Re=Le?Ue<0&&we.current.left||Ue>0&&we.current.right:Ue<0&&we.current.top||Ue>0&&we.current.bottom;return Me&&Re?(clearTimeout(Ne.current),Ke.current=!1):(!Re||Ke.current)&&De(),!Ke.current&&Re}};function Te(We,Ae,Se,Be,Ke,Ne,De){var we=(0,z.useRef)(0),Le=(0,z.useRef)(null),Ue=(0,z.useRef)(null),Me=(0,z.useRef)(!1),Re=ke(Ae,Se,Be,Ke);function tt(zt,Ft){if(_e.Z.cancel(Le.current),!Re(!1,Ft)){var yt=zt;if(!yt._virtualHandled)yt._virtualHandled=!0;else return;we.current+=Ft,Ue.current=Ft,pe||yt.preventDefault(),Le.current=(0,_e.Z)(function(){var Xt=Me.current?10:1;De(we.current*Xt,!1),we.current=0})}}function lt(zt,Ft){De(Ft,!0),pe||zt.preventDefault()}var Pt=(0,z.useRef)(null),Ct=(0,z.useRef)(null);function vt(zt){if(We){_e.Z.cancel(Ct.current),Ct.current=(0,_e.Z)(function(){Pt.current=null},2);var Ft=zt.deltaX,yt=zt.deltaY,Xt=zt.shiftKey,Lt=Ft,Kt=yt;(Pt.current==="sx"||!Pt.current&&Xt&&yt&&!Ft)&&(Lt=yt,Kt=0,Pt.current="sx");var sn=Math.abs(Lt),Sn=Math.abs(Kt);Pt.current===null&&(Pt.current=Ne&&sn>Sn?"x":"y"),Pt.current==="y"?tt(zt,Kt):lt(zt,Lt)}}function Ot(zt){We&&(Me.current=zt.detail===Ue.current)}return[vt,Ot]}function Ee(We,Ae,Se,Be){var Ke=z.useMemo(function(){return[new Map,[]]},[We,Se.id,Be]),Ne=(0,se.Z)(Ke,2),De=Ne[0],we=Ne[1],Le=function(Me){var Re=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Me,tt=De.get(Me),lt=De.get(Re);if(tt===void 0||lt===void 0)for(var Pt=We.length,Ct=we.length;Ct<Pt;Ct+=1){var vt,Ot=We[Ct],zt=Ae(Ot);De.set(zt,Ct);var Ft=(vt=Se.get(zt))!==null&&vt!==void 0?vt:Be;if(we[Ct]=(we[Ct-1]||0)+Ft,zt===Me&&(tt=Ct),zt===Re&&(lt=Ct),tt!==void 0&<!==void 0)break}return{top:we[tt-1]||0,bottom:we[lt]}};return Le}var Oe=be(67732),je=be(83652),Pe=function(){function We(){(0,Oe.Z)(this,We),(0,ue.Z)(this,"maps",void 0),(0,ue.Z)(this,"id",0),(0,ue.Z)(this,"diffRecords",new Map),this.maps=Object.create(null)}return(0,je.Z)(We,[{key:"set",value:function(Se,Be){this.diffRecords.set(Se,this.maps[Se]),this.maps[Se]=Be,this.id+=1}},{key:"get",value:function(Se){return this.maps[Se]}},{key:"resetRecord",value:function(){this.diffRecords.clear()}},{key:"getRecord",value:function(){return this.diffRecords}}]),We}(),Qe=Pe;function Xe(We){var Ae=parseFloat(We);return isNaN(Ae)?0:Ae}function ot(We,Ae,Se){var Be=z.useState(0),Ke=(0,se.Z)(Be,2),Ne=Ke[0],De=Ke[1],we=(0,z.useRef)(new Map),Le=(0,z.useRef)(new Qe),Ue=(0,z.useRef)(0);function Me(){Ue.current+=1}function Re(){var lt=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1;Me();var Pt=function(){var Ot=!1;we.current.forEach(function(zt,Ft){if(zt&&zt.offsetParent){var yt=zt.offsetHeight,Xt=getComputedStyle(zt),Lt=Xt.marginTop,Kt=Xt.marginBottom,sn=Xe(Lt),Sn=Xe(Kt),Yt=yt+sn+Sn;Le.current.get(Ft)!==Yt&&(Le.current.set(Ft,Yt),Ot=!0)}}),Ot&&De(function(zt){return zt+1})};if(lt)Pt();else{Ue.current+=1;var Ct=Ue.current;Promise.resolve().then(function(){Ct===Ue.current&&Pt()})}}function tt(lt,Pt){var Ct=We(lt),vt=we.current.get(Ct);Pt?(we.current.set(Ct,Pt),Re()):we.current.delete(Ct),!vt!=!Pt&&(Pt?Ae==null||Ae(lt):Se==null||Se(lt))}return(0,z.useEffect)(function(){return Me},[]),[tt,Re,Le.current,Ne]}var He=14/15;function rt(We,Ae,Se){var Be=(0,z.useRef)(!1),Ke=(0,z.useRef)(0),Ne=(0,z.useRef)(0),De=(0,z.useRef)(null),we=(0,z.useRef)(null),Le,Ue=function(lt){if(Be.current){var Pt=Math.ceil(lt.touches[0].pageX),Ct=Math.ceil(lt.touches[0].pageY),vt=Ke.current-Pt,Ot=Ne.current-Ct,zt=Math.abs(vt)>Math.abs(Ot);zt?Ke.current=Pt:Ne.current=Ct;var Ft=Se(zt,zt?vt:Ot,!1,lt);Ft&<.preventDefault(),clearInterval(we.current),Ft&&(we.current=setInterval(function(){zt?vt*=He:Ot*=He;var yt=Math.floor(zt?vt:Ot);(!Se(zt,yt,!0)||Math.abs(yt)<=.1)&&clearInterval(we.current)},16))}},Me=function(){Be.current=!1,Le()},Re=function(lt){Le(),lt.touches.length===1&&!Be.current&&(Be.current=!0,Ke.current=Math.ceil(lt.touches[0].pageX),Ne.current=Math.ceil(lt.touches[0].pageY),De.current=lt.target,De.current.addEventListener("touchmove",Ue,{passive:!1}),De.current.addEventListener("touchend",Me,{passive:!0}))};Le=function(){De.current&&(De.current.removeEventListener("touchmove",Ue),De.current.removeEventListener("touchend",Me))},(0,b.Z)(function(){return We&&Ae.current.addEventListener("touchstart",Re,{passive:!0}),function(){var tt;(tt=Ae.current)===null||tt===void 0||tt.removeEventListener("touchstart",Re),Le(),clearInterval(we.current)}},[We])}function Ye(We){return Math.floor(Math.pow(We,.5))}function ut(We,Ae){var Se="touches"in We?We.touches[0]:We;return Se[Ae?"pageX":"pageY"]-window[Ae?"scrollX":"scrollY"]}function Ge(We,Ae,Se){z.useEffect(function(){var Be=Ae.current;if(We&&Be){var Ke=!1,Ne,De,we=function(){_e.Z.cancel(Ne)},Le=function tt(){we(),Ne=(0,_e.Z)(function(){Se(De),tt()})},Ue=function(){Ke=!1,we()},Me=function(lt){if(!(lt.target.draggable||lt.button!==0)){var Pt=lt;Pt._virtualHandled||(Pt._virtualHandled=!0,Ke=!0)}},Re=function(lt){if(Ke){var Pt=ut(lt,!1),Ct=Be.getBoundingClientRect(),vt=Ct.top,Ot=Ct.bottom;if(Pt<=vt){var zt=vt-Pt;De=-Ye(zt),Le()}else if(Pt>=Ot){var Ft=Pt-Ot;De=Ye(Ft),Le()}else we()}};return Be.addEventListener("mousedown",Me),Be.ownerDocument.addEventListener("mouseup",Ue),Be.ownerDocument.addEventListener("mousemove",Re),Be.ownerDocument.addEventListener("dragend",Ue),function(){Be.removeEventListener("mousedown",Me),Be.ownerDocument.removeEventListener("mouseup",Ue),Be.ownerDocument.removeEventListener("mousemove",Re),Be.ownerDocument.removeEventListener("dragend",Ue),we()}}},[We])}var ze=10;function Ve(We,Ae,Se,Be,Ke,Ne,De,we){var Le=z.useRef(),Ue=z.useState(null),Me=(0,se.Z)(Ue,2),Re=Me[0],tt=Me[1];return(0,b.Z)(function(){if(Re&&Re.times<ze){if(!We.current){tt(function(or){return(0,Ce.Z)({},or)});return}Ne();var lt=Re.targetAlign,Pt=Re.originAlign,Ct=Re.index,vt=Re.offset,Ot=We.current.clientHeight,zt=!1,Ft=lt,yt=null;if(Ot){for(var Xt=lt||Pt,Lt=0,Kt=0,sn=0,Sn=Math.min(Ae.length-1,Ct),Yt=0;Yt<=Sn;Yt+=1){var In=Ke(Ae[Yt]);Kt=Lt;var Kn=Se.get(In);sn=Kt+(Kn===void 0?Be:Kn),Lt=sn}for(var Gn=Xt==="top"?vt:Ot-vt,nr=Sn;nr>=0;nr-=1){var hr=Ke(Ae[nr]),ur=Se.get(hr);if(ur===void 0){zt=!0;break}if(Gn-=ur,Gn<=0)break}switch(Xt){case"top":yt=Kt-vt;break;case"bottom":yt=sn-Ot+vt;break;default:{var Un=We.current.scrollTop,Fn=Un+Ot;Kt<Un?Ft="top":sn>Fn&&(Ft="bottom")}}yt!==null&&De(yt),yt!==Re.lastTop&&(zt=!0)}zt&&tt((0,Ce.Z)((0,Ce.Z)({},Re),{},{times:Re.times+1,targetAlign:Ft,lastTop:yt}))}},[Re,We.current]),function(lt){if(lt==null){we();return}if(_e.Z.cancel(Le.current),typeof lt=="number")De(lt);else if(lt&&(0,ie.Z)(lt)==="object"){var Pt,Ct=lt.align;"index"in lt?Pt=lt.index:Pt=Ae.findIndex(function(zt){return Ke(zt)===lt.key});var vt=lt.offset,Ot=vt===void 0?0:vt;tt({times:0,index:Pt,offset:Ot,originAlign:Ct})}}}var $e=z.forwardRef(function(We,Ae){var Se=We.prefixCls,Be=We.rtl,Ke=We.scrollOffset,Ne=We.scrollRange,De=We.onStartMove,we=We.onStopMove,Le=We.onScroll,Ue=We.horizontal,Me=We.spinSize,Re=We.containerSize,tt=We.style,lt=We.thumbStyle,Pt=We.showScrollBar,Ct=z.useState(!1),vt=(0,se.Z)(Ct,2),Ot=vt[0],zt=vt[1],Ft=z.useState(null),yt=(0,se.Z)(Ft,2),Xt=yt[0],Lt=yt[1],Kt=z.useState(null),sn=(0,se.Z)(Kt,2),Sn=sn[0],Yt=sn[1],In=!Be,Kn=z.useRef(),Gn=z.useRef(),nr=z.useState(Pt),hr=(0,se.Z)(nr,2),ur=hr[0],Un=hr[1],Fn=z.useRef(),or=function(){Pt===!0||Pt===!1||(clearTimeout(Fn.current),Un(!0),Fn.current=setTimeout(function(){Un(!1)},3e3))},Vn=Ne-Re||0,Bn=Re-Me||0,_n=z.useMemo(function(){if(Ke===0||Vn===0)return 0;var qe=Ke/Vn;return qe*Bn},[Ke,Vn,Bn]),zn=function(st){st.stopPropagation(),st.preventDefault()},cr=z.useRef({top:_n,dragging:Ot,pageY:Xt,startTop:Sn});cr.current={top:_n,dragging:Ot,pageY:Xt,startTop:Sn};var Dn=function(st){zt(!0),Lt(ut(st,Ue)),Yt(cr.current.top),De(),st.stopPropagation(),st.preventDefault()};z.useEffect(function(){var qe=function(kt){kt.preventDefault()},st=Kn.current,mt=Gn.current;return st.addEventListener("touchstart",qe,{passive:!1}),mt.addEventListener("touchstart",Dn,{passive:!1}),function(){st.removeEventListener("touchstart",qe),mt.removeEventListener("touchstart",Dn)}},[]);var Cn=z.useRef();Cn.current=Vn;var er=z.useRef();er.current=Bn,z.useEffect(function(){if(Ot){var qe,st=function(kt){var Bt=cr.current,Jt=Bt.dragging,En=Bt.pageY,qn=Bt.startTop;_e.Z.cancel(qe);var At=Kn.current.getBoundingClientRect(),St=Re/(Ue?At.width:At.height);if(Jt){var an=(ut(kt,Ue)-En)*St,Ht=qn;!In&&Ue?Ht-=an:Ht+=an;var Et=Cn.current,Ut=er.current,nn=Ut?Ht/Ut:0,rn=Math.ceil(nn*Et);rn=Math.max(rn,0),rn=Math.min(rn,Et),qe=(0,_e.Z)(function(){Le(rn,Ue)})}},mt=function(){zt(!1),we()};return window.addEventListener("mousemove",st,{passive:!0}),window.addEventListener("touchmove",st,{passive:!0}),window.addEventListener("mouseup",mt,{passive:!0}),window.addEventListener("touchend",mt,{passive:!0}),function(){window.removeEventListener("mousemove",st),window.removeEventListener("touchmove",st),window.removeEventListener("mouseup",mt),window.removeEventListener("touchend",mt),_e.Z.cancel(qe)}}},[Ot]),z.useEffect(function(){return or(),function(){clearTimeout(Fn.current)}},[Ke]),z.useImperativeHandle(Ae,function(){return{delayHidden:or}});var $t="".concat(Se,"-scrollbar"),Ie={position:"absolute",visibility:ur?null:"hidden"},Ze={position:"absolute",borderRadius:99,background:"var(--rc-virtual-list-scrollbar-bg, rgba(0, 0, 0, 0.5))",cursor:"pointer",userSelect:"none"};return Ue?(Object.assign(Ie,{height:8,left:0,right:0,bottom:0}),Object.assign(Ze,(0,ue.Z)({height:"100%",width:Me},In?"left":"right",_n))):(Object.assign(Ie,(0,ue.Z)({width:8,top:0,bottom:0},In?"right":"left",0)),Object.assign(Ze,{width:"100%",height:Me,top:_n})),z.createElement("div",{ref:Kn,className:ee()($t,(0,ue.Z)((0,ue.Z)((0,ue.Z)({},"".concat($t,"-horizontal"),Ue),"".concat($t,"-vertical"),!Ue),"".concat($t,"-visible"),ur)),style:(0,Ce.Z)((0,Ce.Z)({},Ie),tt),onMouseDown:zn,onMouseMove:or},z.createElement("div",{ref:Gn,className:ee()("".concat($t,"-thumb"),(0,ue.Z)({},"".concat($t,"-thumb-moving"),Ot)),style:(0,Ce.Z)((0,Ce.Z)({},Ze),lt),onMouseDown:Dn}))}),nt=$e,et=20;function pt(){var We=arguments.length>0&&arguments[0]!==void 0?arguments[0]:0,Ae=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,Se=We/Ae*We;return isNaN(Se)&&(Se=0),Se=Math.max(Se,et),Math.floor(Se)}var ct=["prefixCls","className","height","itemHeight","fullHeight","style","data","children","itemKey","virtual","direction","scrollWidth","component","onScroll","onVirtualScroll","onVisibleChange","innerProps","extraRender","styles","showScrollBar"],It=[],dt={overflowY:"auto",overflowAnchor:"none"};function Mt(We,Ae){var Se=We.prefixCls,Be=Se===void 0?"rc-virtual-list":Se,Ke=We.className,Ne=We.height,De=We.itemHeight,we=We.fullHeight,Le=we===void 0?!0:we,Ue=We.style,Me=We.data,Re=We.children,tt=We.itemKey,lt=We.virtual,Pt=We.direction,Ct=We.scrollWidth,vt=We.component,Ot=vt===void 0?"div":vt,zt=We.onScroll,Ft=We.onVirtualScroll,yt=We.onVisibleChange,Xt=We.innerProps,Lt=We.extraRender,Kt=We.styles,sn=We.showScrollBar,Sn=sn===void 0?"optional":sn,Yt=(0,te.Z)(We,ct),In=z.useCallback(function(Wt){return typeof tt=="function"?tt(Wt):Wt==null?void 0:Wt[tt]},[tt]),Kn=ot(In,null,null),Gn=(0,se.Z)(Kn,4),nr=Gn[0],hr=Gn[1],ur=Gn[2],Un=Gn[3],Fn=!!(lt!==!1&&Ne&&De),or=z.useMemo(function(){return Object.values(ur.maps).reduce(function(Wt,ln){return Wt+ln},0)},[ur.id,ur.maps]),Vn=Fn&&Me&&(Math.max(De*Me.length,or)>Ne||!!Ct),Bn=Pt==="rtl",_n=ee()(Be,(0,ue.Z)({},"".concat(Be,"-rtl"),Bn),Ke),zn=Me||It,cr=(0,z.useRef)(),Dn=(0,z.useRef)(),Cn=(0,z.useRef)(),er=(0,z.useState)(0),$t=(0,se.Z)(er,2),Ie=$t[0],Ze=$t[1],qe=(0,z.useState)(0),st=(0,se.Z)(qe,2),mt=st[0],Nt=st[1],kt=(0,z.useState)(!1),Bt=(0,se.Z)(kt,2),Jt=Bt[0],En=Bt[1],qn=function(){En(!0)},At=function(){En(!1)},St={getKey:In};function an(Wt){Ze(function(ln){var dn;typeof Wt=="function"?dn=Wt(ln):dn=Wt;var un=Hr(dn);return cr.current.scrollTop=un,un})}var Ht=(0,z.useRef)({start:0,end:zn.length}),Et=(0,z.useRef)(),Ut=ge(zn,In),nn=(0,se.Z)(Ut,1),rn=nn[0];Et.current=rn;var gn=z.useMemo(function(){if(!Fn)return{scrollHeight:void 0,start:0,end:zn.length-1,offset:void 0};if(!Vn){var Wt;return{scrollHeight:((Wt=Dn.current)===null||Wt===void 0?void 0:Wt.offsetHeight)||0,start:0,end:zn.length-1,offset:void 0}}for(var ln=0,dn,un,mn,Hn=zn.length,vn=0;vn<Hn;vn+=1){var fn=zn[vn],Mn=In(fn),Rn=ur.get(Mn),Yn=ln+(Rn===void 0?De:Rn);Yn>=Ie&&dn===void 0&&(dn=vn,un=ln),Yn>Ie+Ne&&mn===void 0&&(mn=vn),ln=Yn}return dn===void 0&&(dn=0,un=0,mn=Math.ceil(Ne/De)),mn===void 0&&(mn=zn.length-1),mn=Math.min(mn+1,zn.length-1),{scrollHeight:ln,start:dn,end:mn,offset:un}},[Vn,Fn,Ie,zn,Un,Ne]),bn=gn.scrollHeight,An=gn.start,Gt=gn.end,Vt=gn.offset;Ht.current.start=An,Ht.current.end=Gt,z.useLayoutEffect(function(){var Wt=ur.getRecord();if(Wt.size===1){var ln=Array.from(Wt.keys())[0],dn=Wt.get(ln),un=zn[An];if(un&&dn===void 0){var mn=In(un);if(mn===ln){var Hn=ur.get(ln),vn=Hn-De;an(function(fn){return fn+vn})}}}ur.resetRecord()},[bn]);var wn=z.useState({width:0,height:Ne}),jn=(0,se.Z)(wn,2),Wn=jn[0],$n=jn[1],kr=function(ln){$n({width:ln.offsetWidth,height:ln.offsetHeight})},Sr=(0,z.useRef)(),Yr=(0,z.useRef)(),_r=z.useMemo(function(){return pt(Wn.width,Ct)},[Wn.width,Ct]),Ur=z.useMemo(function(){return pt(Wn.height,bn)},[Wn.height,bn]),wr=bn-Ne,Dr=(0,z.useRef)(wr);Dr.current=wr;function Hr(Wt){var ln=Wt;return Number.isNaN(Dr.current)||(ln=Math.min(ln,Dr.current)),ln=Math.max(ln,0),ln}var Qr=Ie<=0,pi=Ie>=wr,_i=mt<=0,Si=mt>=Ct,oi=ke(Qr,pi,_i,Si),Mi=function(){return{x:Bn?-mt:mt,y:Ie}},Li=(0,z.useRef)(Mi()),rr=(0,E.zX)(function(Wt){if(Ft){var ln=(0,Ce.Z)((0,Ce.Z)({},Mi()),Wt);(Li.current.x!==ln.x||Li.current.y!==ln.y)&&(Ft(ln),Li.current=ln)}});function Cr(Wt,ln){var dn=Wt;ln?((0,x.flushSync)(function(){Nt(dn)}),rr()):an(dn)}function Ar(Wt){var ln=Wt.currentTarget.scrollTop;ln!==Ie&&an(ln),zt==null||zt(Wt),rr()}var $r=function(ln){var dn=ln,un=Ct?Ct-Wn.width:0;return dn=Math.max(dn,0),dn=Math.min(dn,un),dn},qr=(0,E.zX)(function(Wt,ln){ln?((0,x.flushSync)(function(){Nt(function(dn){var un=dn+(Bn?-Wt:Wt);return $r(un)})}),rr()):an(function(dn){var un=dn+Wt;return un})}),wi=Te(Fn,Qr,pi,_i,Si,!!Ct,qr),Hi=(0,se.Z)(wi,2),Tt=Hi[0],tn=Hi[1];rt(Fn,cr,function(Wt,ln,dn,un){var mn=un;return oi(Wt,ln,dn)?!1:!mn||!mn._virtualHandled?(mn&&(mn._virtualHandled=!0),Tt({preventDefault:function(){},deltaX:Wt?ln:0,deltaY:Wt?0:ln}),!0):!1}),Ge(Vn,cr,function(Wt){an(function(ln){return ln+Wt})}),(0,b.Z)(function(){function Wt(dn){var un=Qr&&dn.detail<0,mn=pi&&dn.detail>0;Fn&&!un&&!mn&&dn.preventDefault()}var ln=cr.current;return ln.addEventListener("wheel",Tt,{passive:!1}),ln.addEventListener("DOMMouseScroll",tn,{passive:!0}),ln.addEventListener("MozMousePixelScroll",Wt,{passive:!1}),function(){ln.removeEventListener("wheel",Tt),ln.removeEventListener("DOMMouseScroll",tn),ln.removeEventListener("MozMousePixelScroll",Wt)}},[Fn,Qr,pi]),(0,b.Z)(function(){if(Ct){var Wt=$r(mt);Nt(Wt),rr({x:Wt})}},[Wn.width,Ct]);var Zt=function(){var ln,dn;(ln=Sr.current)===null||ln===void 0||ln.delayHidden(),(dn=Yr.current)===null||dn===void 0||dn.delayHidden()},Qt=Ve(cr,zn,ur,De,In,function(){return hr(!0)},an,Zt);z.useImperativeHandle(Ae,function(){return{nativeElement:Cn.current,getScrollInfo:Mi,scrollTo:function(ln){function dn(un){return un&&(0,ie.Z)(un)==="object"&&("left"in un||"top"in un)}dn(ln)?(ln.left!==void 0&&Nt($r(ln.left)),Qt(ln.top)):Qt(ln)}}}),(0,b.Z)(function(){if(yt){var Wt=zn.slice(An,Gt+1);yt(Wt,zn)}},[An,Gt,zn]);var cn=Ee(zn,In,ur,De),hn=Lt==null?void 0:Lt({start:An,end:Gt,virtual:Vn,offsetX:mt,offsetY:Vt,rtl:Bn,getSize:cn}),Nn=ve(zn,An,Gt,Ct,mt,nr,Re,St),kn=null;Ne&&(kn=(0,Ce.Z)((0,ue.Z)({},Le?"height":"maxHeight",Ne),dt),Fn&&(kn.overflowY="hidden",Ct&&(kn.overflowX="hidden"),Jt&&(kn.pointerEvents="none")));var yn={};return Bn&&(yn.dir="rtl"),z.createElement("div",(0,ce.Z)({ref:Cn,style:(0,Ce.Z)((0,Ce.Z)({},Ue),{},{position:"relative"}),className:_n},yn,Yt),z.createElement(ne.Z,{onResize:kr},z.createElement(Ot,{className:"".concat(Be,"-holder"),style:kn,ref:cr,onScroll:Ar,onMouseEnter:Zt},z.createElement(ae,{prefixCls:Be,height:bn,offsetX:mt,offsetY:Vt,scrollWidth:Ct,onInnerResize:hr,ref:Dn,innerProps:Xt,rtl:Bn,extra:hn},Nn))),Vn&&bn>Ne&&z.createElement(nt,{ref:Sr,prefixCls:Be,scrollOffset:Ie,scrollRange:bn,rtl:Bn,onScroll:Cr,onStartMove:qn,onStopMove:At,spinSize:Ur,containerSize:Wn.height,style:Kt==null?void 0:Kt.verticalScrollBar,thumbStyle:Kt==null?void 0:Kt.verticalScrollBarThumb,showScrollBar:Sn}),Vn&&Ct>Wn.width&&z.createElement(nt,{ref:Yr,prefixCls:Be,scrollOffset:mt,scrollRange:Ct,rtl:Bn,onScroll:Cr,onStartMove:qn,onStopMove:At,spinSize:_r,containerSize:Wn.width,horizontal:!0,style:Kt==null?void 0:Kt.horizontalScrollBar,thumbStyle:Kt==null?void 0:Kt.horizontalScrollBarThumb,showScrollBar:Sn}))}var xt=z.forwardRef(Mt);xt.displayName="List";var gt=xt,_t=gt},7062:function(qt,Dt,be){var ce=be(19637),ie=be(97573),Ce=[be(96627)];qt.exports=ce.createStore(ie,Ce)},96627:function(qt,Dt,be){qt.exports=ce;function ce(){return be(42424),{}}},42424:function(){typeof JSON!="object"&&(JSON={}),function(){"use strict";var rx_one=/^[\],:{}\s]*$/,rx_two=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,rx_three=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,rx_four=/(?:^|:|,)(?:\s*\[)+/g,rx_escapable=/[\\"\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,rx_dangerous=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g;function f(qt){return qt<10?"0"+qt:qt}function this_value(){return this.valueOf()}typeof Date.prototype.toJSON!="function"&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z":null},Boolean.prototype.toJSON=this_value,Number.prototype.toJSON=this_value,String.prototype.toJSON=this_value);var gap,indent,meta,rep;function quote(qt){return rx_escapable.lastIndex=0,rx_escapable.test(qt)?'"'+qt.replace(rx_escapable,function(Dt){var be=meta[Dt];return typeof be=="string"?be:"\\u"+("0000"+Dt.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+qt+'"'}function str(qt,Dt){var be,ce,ie,Ce,ue=gap,se,te=Dt[qt];switch(te&&typeof te=="object"&&typeof te.toJSON=="function"&&(te=te.toJSON(qt)),typeof rep=="function"&&(te=rep.call(Dt,qt,te)),typeof te){case"string":return quote(te);case"number":return isFinite(te)?String(te):"null";case"boolean":case"null":return String(te);case"object":if(!te)return"null";if(gap+=indent,se=[],Object.prototype.toString.apply(te)==="[object Array]"){for(Ce=te.length,be=0;be<Ce;be+=1)se[be]=str(be,te)||"null";return ie=se.length===0?"[]":gap?`[
|
|
|
`+gap+se.join(`,
|
|
|
`+gap)+`
|
|
|
`+ue+"]":"["+se.join(",")+"]",gap=ue,ie}if(rep&&typeof rep=="object")for(Ce=rep.length,be=0;be<Ce;be+=1)typeof rep[be]=="string"&&(ce=rep[be],ie=str(ce,te),ie&&se.push(quote(ce)+(gap?": ":":")+ie));else for(ce in te)Object.prototype.hasOwnProperty.call(te,ce)&&(ie=str(ce,te),ie&&se.push(quote(ce)+(gap?": ":":")+ie));return ie=se.length===0?"{}":gap?`{
|
|
|
`+gap+se.join(`,
|
|
|
`+gap)+`
|
|
|
`+ue+"}":"{"+se.join(",")+"}",gap=ue,ie}}typeof JSON.stringify!="function"&&(meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},JSON.stringify=function(qt,Dt,be){var ce;if(gap="",indent="",typeof be=="number")for(ce=0;ce<be;ce+=1)indent+=" ";else typeof be=="string"&&(indent=be);if(rep=Dt,Dt&&typeof Dt!="function"&&(typeof Dt!="object"||typeof Dt.length!="number"))throw new Error("JSON.stringify");return str("",{"":qt})}),typeof JSON.parse!="function"&&(JSON.parse=function(text,reviver){var j;function walk(qt,Dt){var be,ce,ie=qt[Dt];if(ie&&typeof ie=="object")for(be in ie)Object.prototype.hasOwnProperty.call(ie,be)&&(ce=walk(ie,be),ce!==void 0?ie[be]=ce:delete ie[be]);return reviver.call(qt,Dt,ie)}if(text=String(text),rx_dangerous.lastIndex=0,rx_dangerous.test(text)&&(text=text.replace(rx_dangerous,function(qt){return"\\u"+("0000"+qt.charCodeAt(0).toString(16)).slice(-4)})),rx_one.test(text.replace(rx_two,"@").replace(rx_three,"]").replace(rx_four,"")))return j=eval("("+text+")"),typeof reviver=="function"?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}()},19637:function(qt,Dt,be){var ce=be(67039),ie=ce.slice,Ce=ce.pluck,ue=ce.each,se=ce.bind,te=ce.create,le=ce.isList,ee=ce.isFunction,ne=ce.isObject;qt.exports={createStore:z};var E={version:"2.0.12",enabled:!1,get:function(x,re){var ae=this.storage.read(this._namespacePrefix+x);return this._deserialize(ae,re)},set:function(x,re){return re===void 0?this.remove(x):(this.storage.write(this._namespacePrefix+x,this._serialize(re)),re)},remove:function(x){this.storage.remove(this._namespacePrefix+x)},each:function(x){var re=this;this.storage.each(function(ae,oe){x.call(re,re._deserialize(ae),(oe||"").replace(re._namespaceRegexp,""))})},clearAll:function(){this.storage.clearAll()},hasNamespace:function(x){return this._namespacePrefix=="__storejs_"+x+"_"},createStore:function(){return z.apply(this,arguments)},addPlugin:function(x){this._addPlugin(x)},namespace:function(x){return z(this.storage,this.plugins,x)}};function b(){var x=typeof console=="undefined"?null:console;if(x){var re=x.warn?x.warn:x.log;re.apply(x,arguments)}}function z(x,re,ae){ae||(ae=""),x&&!le(x)&&(x=[x]),re&&!le(re)&&(re=[re]);var oe=ae?"__storejs_"+ae+"_":"",ve=ae?new RegExp("^"+oe):null,ye=/^[a-zA-Z0-9_\-]*$/;if(!ye.test(ae))throw new Error("store.js namespaces can only have alphanumerics + underscores and dashes");var me={_namespacePrefix:oe,_namespaceRegexp:ve,_testStorage:function(_e){try{var he="__storejs__test__";_e.write(he,he);var pe=_e.read(he)===he;return _e.remove(he),pe}catch(ke){return!1}},_assignPluginFnProp:function(_e,he){var pe=this[he];this[he]=function(){var Te=ie(arguments,0),Ee=this;function Oe(){if(pe)return ue(arguments,function(Pe,Qe){Te[Qe]=Pe}),pe.apply(Ee,Te)}var je=[Oe].concat(Te);return _e.apply(Ee,je)}},_serialize:function(_e){return JSON.stringify(_e)},_deserialize:function(_e,he){if(!_e)return he;var pe="";try{pe=JSON.parse(_e)}catch(ke){pe=_e}return pe!==void 0?pe:he},_addStorage:function(_e){this.enabled||this._testStorage(_e)&&(this.storage=_e,this.enabled=!0)},_addPlugin:function(_e){var he=this;if(le(_e)){ue(_e,function(Te){he._addPlugin(Te)});return}var pe=Ce(this.plugins,function(Te){return _e===Te});if(!pe){if(this.plugins.push(_e),!ee(_e))throw new Error("Plugins must be function values that return objects");var ke=_e.call(this);if(!ne(ke))throw new Error("Plugins must return an object of function properties");ue(ke,function(Te,Ee){if(!ee(Te))throw new Error("Bad plugin property: "+Ee+" from plugin "+_e.name+". Plugins should only return functions.");he._assignPluginFnProp(Te,Ee)})}},addStorage:function(_e){b("store.addStorage(storage) is deprecated. Use createStore([storages])"),this._addStorage(_e)}},ge=te(me,E,{plugins:[]});return ge.raw={},ue(ge,function(_e,he){ee(_e)&&(ge.raw[he]=se(ge,_e))}),ue(x,function(_e){ge._addStorage(_e)}),ue(re,function(_e){ge._addPlugin(_e)}),ge}},67039:function(qt,Dt,be){var ce=se(),ie=te(),Ce=le(),ue=typeof window!="undefined"?window:be.g;qt.exports={assign:ce,create:ie,trim:Ce,bind:ee,slice:ne,each:E,map:b,pluck:z,isList:x,isFunction:re,isObject:ae,Global:ue};function se(){return Object.assign?Object.assign:function(ve,ye,me,ge){for(var _e=1;_e<arguments.length;_e++)E(Object(arguments[_e]),function(he,pe){ve[pe]=he});return ve}}function te(){if(Object.create)return function(ye,me,ge,_e){var he=ne(arguments,1);return ce.apply(this,[Object.create(ye)].concat(he))};{let ve=function(){};var oe=ve;return function(me,ge,_e,he){var pe=ne(arguments,1);return ve.prototype=me,ce.apply(this,[new ve].concat(pe))}}}function le(){return String.prototype.trim?function(ve){return String.prototype.trim.call(ve)}:function(ve){return ve.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}}function ee(oe,ve){return function(){return ve.apply(oe,Array.prototype.slice.call(arguments,0))}}function ne(oe,ve){return Array.prototype.slice.call(oe,ve||0)}function E(oe,ve){z(oe,function(ye,me){return ve(ye,me),!1})}function b(oe,ve){var ye=x(oe)?[]:{};return z(oe,function(me,ge){return ye[ge]=ve(me,ge),!1}),ye}function z(oe,ve){if(x(oe)){for(var ye=0;ye<oe.length;ye++)if(ve(oe[ye],ye))return oe[ye]}else for(var me in oe)if(oe.hasOwnProperty(me)&&ve(oe[me],me))return oe[me]}function x(oe){return oe!=null&&typeof oe!="function"&&typeof oe.length=="number"}function re(oe){return oe&&{}.toString.call(oe)==="[object Function]"}function ae(oe){return oe&&{}.toString.call(oe)==="[object Object]"}},97573:function(qt,Dt,be){qt.exports=[be(52496),be(16436),be(76673),be(35701),be(65578),be(65300)]},35701:function(qt,Dt,be){var ce=be(67039),ie=ce.Global,Ce=ce.trim;qt.exports={name:"cookieStorage",read:se,write:le,each:te,remove:ee,clearAll:ne};var ue=ie.document;function se(b){if(!b||!E(b))return null;var z="(?:^|.*;\\s*)"+escape(b).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=\\s*((?:[^;](?!;))*[^;]?).*";return unescape(ue.cookie.replace(new RegExp(z),"$1"))}function te(b){for(var z=ue.cookie.split(/; ?/g),x=z.length-1;x>=0;x--)if(Ce(z[x])){var re=z[x].split("="),ae=unescape(re[0]),oe=unescape(re[1]);b(oe,ae)}}function le(b,z){b&&(ue.cookie=escape(b)+"="+escape(z)+"; expires=Tue, 19 Jan 2038 03:14:07 GMT; path=/")}function ee(b){!b||!E(b)||(ue.cookie=escape(b)+"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/")}function ne(){te(function(b,z){ee(z)})}function E(b){return new RegExp("(?:^|;\\s*)"+escape(b).replace(/[\-\.\+\*]/g,"\\$&")+"\\s*\\=").test(ue.cookie)}},52496:function(qt,Dt,be){var ce=be(67039),ie=ce.Global;qt.exports={name:"localStorage",read:ue,write:se,each:te,remove:le,clearAll:ee};function Ce(){return ie.localStorage}function ue(ne){return Ce().getItem(ne)}function se(ne,E){return Ce().setItem(ne,E)}function te(ne){for(var E=Ce().length-1;E>=0;E--){var b=Ce().key(E);ne(ue(b),b)}}function le(ne){return Ce().removeItem(ne)}function ee(){return Ce().clear()}},65300:function(qt){qt.exports={name:"memoryStorage",read:be,write:ce,each:ie,remove:Ce,clearAll:ue};var Dt={};function be(se){return Dt[se]}function ce(se,te){Dt[se]=te}function ie(se){for(var te in Dt)Dt.hasOwnProperty(te)&&se(Dt[te],te)}function Ce(se){delete Dt[se]}function ue(se){Dt={}}},16436:function(qt,Dt,be){var ce=be(67039),ie=ce.Global;qt.exports={name:"oldFF-globalStorage",read:ue,write:se,each:te,remove:le,clearAll:ee};var Ce=ie.globalStorage;function ue(ne){return Ce[ne]}function se(ne,E){Ce[ne]=E}function te(ne){for(var E=Ce.length-1;E>=0;E--){var b=Ce.key(E);ne(Ce[b],b)}}function le(ne){return Ce.removeItem(ne)}function ee(){te(function(ne,E){delete Ce[ne]})}},76673:function(qt,Dt,be){var ce=be(67039),ie=ce.Global;qt.exports={name:"oldIE-userDataStorage",write:le,read:ee,each:ne,remove:E,clearAll:b};var Ce="storejs",ue=ie.document,se=re(),te=(ie.navigator?ie.navigator.userAgent:"").match(/ (MSIE 8|MSIE 9|MSIE 10)\./);function le(ae,oe){if(!te){var ve=x(ae);se(function(ye){ye.setAttribute(ve,oe),ye.save(Ce)})}}function ee(ae){if(!te){var oe=x(ae),ve=null;return se(function(ye){ve=ye.getAttribute(oe)}),ve}}function ne(ae){se(function(oe){for(var ve=oe.XMLDocument.documentElement.attributes,ye=ve.length-1;ye>=0;ye--){var me=ve[ye];ae(oe.getAttribute(me.name),me.name)}})}function E(ae){var oe=x(ae);se(function(ve){ve.removeAttribute(oe),ve.save(Ce)})}function b(){se(function(ae){var oe=ae.XMLDocument.documentElement.attributes;ae.load(Ce);for(var ve=oe.length-1;ve>=0;ve--)ae.removeAttribute(oe[ve].name);ae.save(Ce)})}var z=new RegExp("[!\"#$%&'()*+,/\\\\:;<=>?@[\\]^`{|}~]","g");function x(ae){return ae.replace(/^\d/,"___$&").replace(z,"___")}function re(){if(!ue||!ue.documentElement||!ue.documentElement.addBehavior)return null;var ae="script",oe,ve,ye;try{ve=new ActiveXObject("htmlfile"),ve.open(),ve.write("<"+ae+">document.w=window</"+ae+'><iframe src="/favicon.ico"></iframe>'),ve.close(),oe=ve.w.frames[0].document,ye=oe.createElement("div")}catch(me){ye=ue.createElement("div"),oe=ue.body}return function(me){var ge=[].slice.call(arguments,0);ge.unshift(ye),oe.appendChild(ye),ye.addBehavior("#default#userData"),ye.load(Ce),me.apply(this,ge),oe.removeChild(ye)}}},65578:function(qt,Dt,be){var ce=be(67039),ie=ce.Global;qt.exports={name:"sessionStorage",read:ue,write:se,each:te,remove:le,clearAll:ee};function Ce(){return ie.sessionStorage}function ue(ne){return Ce().getItem(ne)}function se(ne,E){return Ce().setItem(ne,E)}function te(ne){for(var E=Ce().length-1;E>=0;E--){var b=Ce().key(E);ne(ue(b),b)}}function le(ne){return Ce().removeItem(ne)}function ee(){return Ce().clear()}},82059:function(qt){var Dt=arguments[3],be=arguments[4],ce=arguments[5],ie=JSON.stringify;qt.exports=function(Ce,ue){for(var se,te=Object.keys(ce),le=0,ee=te.length;le<ee;le++){var ne=te[le],E=ce[ne].exports;if(E===Ce||E&&E.default===Ce){se=ne;break}}if(!se){se=Math.floor(Math.pow(16,8)*Math.random()).toString(16);for(var b={},le=0,ee=te.length;le<ee;le++){var ne=te[le];b[ne]=ne}be[se]=["function(require,module,exports){"+Ce+"(self); }",b]}var z=Math.floor(Math.pow(16,8)*Math.random()).toString(16),x={};x[se]=se,be[z]=["function(require,module,exports){var f = require("+ie(se)+");(f.default ? f.default : f)(self);}",x];var re={};ae(z);function ae(_e){re[_e]=!0;for(var he in be[_e][1]){var pe=be[_e][1][he];re[pe]||ae(pe)}}var oe="("+Dt+")({"+Object.keys(re).map(function(_e){return ie(_e)+":["+be[_e][0]+","+ie(be[_e][1])+"]"}).join(",")+"},{},["+ie(z)+"])",ve=window.URL||window.webkitURL||window.mozURL||window.msURL,ye=new Blob([oe],{type:"text/javascript"});if(ue&&ue.bare)return ye;var me=ve.createObjectURL(ye),ge=new Worker(me);return ge.objectURL=me,ge}},34376:function(qt){(function(Dt,be){if(1)qt.exports=be();else var ce,ie})(window,function(){return function(Dt){var be={};function ce(ie){if(be[ie])return be[ie].exports;var Ce=be[ie]={i:ie,l:!1,exports:{}};return Dt[ie].call(Ce.exports,Ce,Ce.exports,ce),Ce.l=!0,Ce.exports}return ce.m=Dt,ce.c=be,ce.d=function(ie,Ce,ue){ce.o(ie,Ce)||Object.defineProperty(ie,Ce,{enumerable:!0,get:ue})},ce.r=function(ie){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(ie,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(ie,"__esModule",{value:!0})},ce.t=function(ie,Ce){if(1&Ce&&(ie=ce(ie)),8&Ce||4&Ce&&typeof ie=="object"&&ie&&ie.__esModule)return ie;var ue=Object.create(null);if(ce.r(ue),Object.defineProperty(ue,"default",{enumerable:!0,value:ie}),2&Ce&&typeof ie!="string")for(var se in ie)ce.d(ue,se,function(te){return ie[te]}.bind(null,se));return ue},ce.n=function(ie){var Ce=ie&&ie.__esModule?function(){return ie.default}:function(){return ie};return ce.d(Ce,"a",Ce),Ce},ce.o=function(ie,Ce){return Object.prototype.hasOwnProperty.call(ie,Ce)},ce.p="",ce(ce.s=34)}([function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.forwardEvent=be.EventEmitter=void 0;var ie=function(){function Ce(){this._listeners=[],this._disposed=!1}return Object.defineProperty(Ce.prototype,"event",{get:function(){var ue=this;return this._event||(this._event=function(se){return ue._listeners.push(se),{dispose:function(){if(!ue._disposed){for(var te=0;te<ue._listeners.length;te++)if(ue._listeners[te]===se)return void ue._listeners.splice(te,1)}}}}),this._event},enumerable:!1,configurable:!0}),Ce.prototype.fire=function(ue,se){for(var te=[],le=0;le<this._listeners.length;le++)te.push(this._listeners[le]);for(le=0;le<te.length;le++)te[le].call(void 0,ue,se)},Ce.prototype.dispose=function(){this._listeners&&(this._listeners.length=0),this._disposed=!0},Ce}();be.EventEmitter=ie,be.forwardEvent=function(Ce,ue){return Ce(function(se){return ue.fire(se)})}},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.IUnicodeService=be.IOptionsService=be.ILogService=be.IInstantiationService=be.IDirtyRowService=be.ICharsetService=be.ICoreService=be.ICoreMouseService=be.IBufferService=void 0;var ie=ce(14);be.IBufferService=ie.createDecorator("BufferService"),be.ICoreMouseService=ie.createDecorator("CoreMouseService"),be.ICoreService=ie.createDecorator("CoreService"),be.ICharsetService=ie.createDecorator("CharsetService"),be.IDirtyRowService=ie.createDecorator("DirtyRowService"),be.IInstantiationService=ie.createDecorator("InstantiationService"),be.ILogService=ie.createDecorator("LogService"),be.IOptionsService=ie.createDecorator("OptionsService"),be.IUnicodeService=ie.createDecorator("UnicodeService")},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.getDisposeArrayDisposable=be.disposeArray=be.Disposable=void 0;var ie=function(){function ue(){this._disposables=[],this._isDisposed=!1}return ue.prototype.dispose=function(){this._isDisposed=!0;for(var se=0,te=this._disposables;se<te.length;se++)te[se].dispose();this._disposables.length=0},ue.prototype.register=function(se){return this._disposables.push(se),se},ue.prototype.unregister=function(se){var te=this._disposables.indexOf(se);te!==-1&&this._disposables.splice(te,1)},ue}();function Ce(ue){for(var se=0,te=ue;se<te.length;se++)te[se].dispose();ue.length=0}be.Disposable=ie,be.disposeArray=Ce,be.getDisposeArrayDisposable=function(ue){return{dispose:function(){return Ce(ue)}}}},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WHITESPACE_CELL_CODE=be.WHITESPACE_CELL_WIDTH=be.WHITESPACE_CELL_CHAR=be.NULL_CELL_CODE=be.NULL_CELL_WIDTH=be.NULL_CELL_CHAR=be.CHAR_DATA_CODE_INDEX=be.CHAR_DATA_WIDTH_INDEX=be.CHAR_DATA_CHAR_INDEX=be.CHAR_DATA_ATTR_INDEX=be.DEFAULT_ATTR=be.DEFAULT_COLOR=void 0,be.DEFAULT_COLOR=256,be.DEFAULT_ATTR=256|be.DEFAULT_COLOR<<9,be.CHAR_DATA_ATTR_INDEX=0,be.CHAR_DATA_CHAR_INDEX=1,be.CHAR_DATA_WIDTH_INDEX=2,be.CHAR_DATA_CODE_INDEX=3,be.NULL_CELL_CHAR="",be.NULL_CELL_WIDTH=1,be.NULL_CELL_CODE=0,be.WHITESPACE_CELL_CHAR=" ",be.WHITESPACE_CELL_WIDTH=1,be.WHITESPACE_CELL_CODE=32},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ee,ne){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,b){E.__proto__=b}||function(E,b){for(var z in b)b.hasOwnProperty(z)&&(E[z]=b[z])})(ee,ne)},function(ee,ne){function E(){this.constructor=ee}ie(ee,ne),ee.prototype=ne===null?Object.create(ne):(E.prototype=ne.prototype,new E)});Object.defineProperty(be,"__esModule",{value:!0}),be.CellData=void 0;var ue=ce(8),se=ce(3),te=ce(6),le=function(ee){function ne(){var E=ee!==null&&ee.apply(this,arguments)||this;return E.content=0,E.fg=0,E.bg=0,E.extended=new te.ExtendedAttrs,E.combinedData="",E}return Ce(ne,ee),ne.fromCharData=function(E){var b=new ne;return b.setFromCharData(E),b},ne.prototype.isCombined=function(){return 2097152&this.content},ne.prototype.getWidth=function(){return this.content>>22},ne.prototype.getChars=function(){return 2097152&this.content?this.combinedData:2097151&this.content?ue.stringFromCodePoint(2097151&this.content):""},ne.prototype.getCode=function(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content},ne.prototype.setFromCharData=function(E){this.fg=E[se.CHAR_DATA_ATTR_INDEX],this.bg=0;var b=!1;if(E[se.CHAR_DATA_CHAR_INDEX].length>2)b=!0;else if(E[se.CHAR_DATA_CHAR_INDEX].length===2){var z=E[se.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=z&&z<=56319){var x=E[se.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=x&&x<=57343?this.content=1024*(z-55296)+x-56320+65536|E[se.CHAR_DATA_WIDTH_INDEX]<<22:b=!0}else b=!0}else this.content=E[se.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|E[se.CHAR_DATA_WIDTH_INDEX]<<22;b&&(this.combinedData=E[se.CHAR_DATA_CHAR_INDEX],this.content=2097152|E[se.CHAR_DATA_WIDTH_INDEX]<<22)},ne.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},ne}(te.AttributeData);be.CellData=le},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.ISoundService=be.ISelectionService=be.IRenderService=be.IMouseService=be.ICoreBrowserService=be.ICharSizeService=void 0;var ie=ce(14);be.ICharSizeService=ie.createDecorator("CharSizeService"),be.ICoreBrowserService=ie.createDecorator("CoreBrowserService"),be.IMouseService=ie.createDecorator("MouseService"),be.IRenderService=ie.createDecorator("RenderService"),be.ISelectionService=ie.createDecorator("SelectionService"),be.ISoundService=ie.createDecorator("SoundService")},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.ExtendedAttrs=be.AttributeData=void 0;var ie=function(){function ue(){this.fg=0,this.bg=0,this.extended=new Ce}return ue.toColorRGB=function(se){return[se>>>16&255,se>>>8&255,255&se]},ue.fromColorRGB=function(se){return(255&se[0])<<16|(255&se[1])<<8|255&se[2]},ue.prototype.clone=function(){var se=new ue;return se.fg=this.fg,se.bg=this.bg,se.extended=this.extended.clone(),se},ue.prototype.isInverse=function(){return 67108864&this.fg},ue.prototype.isBold=function(){return 134217728&this.fg},ue.prototype.isUnderline=function(){return 268435456&this.fg},ue.prototype.isBlink=function(){return 536870912&this.fg},ue.prototype.isInvisible=function(){return 1073741824&this.fg},ue.prototype.isItalic=function(){return 67108864&this.bg},ue.prototype.isDim=function(){return 134217728&this.bg},ue.prototype.getFgColorMode=function(){return 50331648&this.fg},ue.prototype.getBgColorMode=function(){return 50331648&this.bg},ue.prototype.isFgRGB=function(){return(50331648&this.fg)==50331648},ue.prototype.isBgRGB=function(){return(50331648&this.bg)==50331648},ue.prototype.isFgPalette=function(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432},ue.prototype.isBgPalette=function(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432},ue.prototype.isFgDefault=function(){return(50331648&this.fg)==0},ue.prototype.isBgDefault=function(){return(50331648&this.bg)==0},ue.prototype.isAttributeDefault=function(){return this.fg===0&&this.bg===0},ue.prototype.getFgColor=function(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}},ue.prototype.getBgColor=function(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}},ue.prototype.hasExtendedAttrs=function(){return 268435456&this.bg},ue.prototype.updateExtended=function(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456},ue.prototype.getUnderlineColor=function(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()},ue.prototype.getUnderlineColorMode=function(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()},ue.prototype.isUnderlineColorRGB=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()},ue.prototype.isUnderlineColorPalette=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()},ue.prototype.isUnderlineColorDefault=function(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()},ue.prototype.getUnderlineStyle=function(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0},ue}();be.AttributeData=ie;var Ce=function(){function ue(se,te){se===void 0&&(se=0),te===void 0&&(te=-1),this.underlineStyle=se,this.underlineColor=te}return ue.prototype.clone=function(){return new ue(this.underlineStyle,this.underlineColor)},ue.prototype.isEmpty=function(){return this.underlineStyle===0},ue}();be.ExtendedAttrs=Ce},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.addDisposableDomListener=void 0,be.addDisposableDomListener=function(ie,Ce,ue,se){ie.addEventListener(Ce,ue,se);var te=!1;return{dispose:function(){te||(te=!0,ie.removeEventListener(Ce,ue,se))}}}},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.Utf8ToUtf32=be.StringToUtf32=be.utf32ToString=be.stringFromCodePoint=void 0,be.stringFromCodePoint=function(ue){return ue>65535?(ue-=65536,String.fromCharCode(55296+(ue>>10))+String.fromCharCode(ue%1024+56320)):String.fromCharCode(ue)},be.utf32ToString=function(ue,se,te){se===void 0&&(se=0),te===void 0&&(te=ue.length);for(var le="",ee=se;ee<te;++ee){var ne=ue[ee];ne>65535?(ne-=65536,le+=String.fromCharCode(55296+(ne>>10))+String.fromCharCode(ne%1024+56320)):le+=String.fromCharCode(ne)}return le};var ie=function(){function ue(){this._interim=0}return ue.prototype.clear=function(){this._interim=0},ue.prototype.decode=function(se,te){var le=se.length;if(!le)return 0;var ee=0,ne=0;this._interim&&(56320<=(z=se.charCodeAt(ne++))&&z<=57343?te[ee++]=1024*(this._interim-55296)+z-56320+65536:(te[ee++]=this._interim,te[ee++]=z),this._interim=0);for(var E=ne;E<le;++E){var b=se.charCodeAt(E);if(55296<=b&&b<=56319){if(++E>=le)return this._interim=b,ee;var z;56320<=(z=se.charCodeAt(E))&&z<=57343?te[ee++]=1024*(b-55296)+z-56320+65536:(te[ee++]=b,te[ee++]=z)}else te[ee++]=b}return ee},ue}();be.StringToUtf32=ie;var Ce=function(){function ue(){this.interim=new Uint8Array(3)}return ue.prototype.clear=function(){this.interim.fill(0)},ue.prototype.decode=function(se,te){var le=se.length;if(!le)return 0;var ee,ne,E,b,z=0,x=0,re=0;if(this.interim[0]){var ae=!1,oe=this.interim[0];oe&=(224&oe)==192?31:(240&oe)==224?15:7;for(var ve=0,ye=void 0;(ye=63&this.interim[++ve])&&ve<4;)oe<<=6,oe|=ye;for(var me=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,ge=me-ve;re<ge;){if(re>=le)return 0;if((192&(ye=se[re++]))!=128){re--,ae=!0;break}this.interim[ve++]=ye,oe<<=6,oe|=63&ye}ae||(me===2?oe<128?re--:te[z++]=oe:me===3?oe<2048||oe>=55296&&oe<=57343||(te[z++]=oe):oe<65536||oe>1114111||(te[z++]=oe)),this.interim.fill(0)}for(var _e=le-4,he=re;he<le;){for(;!(!(he<_e)||128&(ee=se[he])||128&(ne=se[he+1])||128&(E=se[he+2])||128&(b=se[he+3]));)te[z++]=ee,te[z++]=ne,te[z++]=E,te[z++]=b,he+=4;if((ee=se[he++])<128)te[z++]=ee;else if((224&ee)==192){if(he>=le)return this.interim[0]=ee,z;if((192&(ne=se[he++]))!=128){he--;continue}if((x=(31&ee)<<6|63&ne)<128){he--;continue}te[z++]=x}else if((240&ee)==224){if(he>=le)return this.interim[0]=ee,z;if((192&(ne=se[he++]))!=128){he--;continue}if(he>=le)return this.interim[0]=ee,this.interim[1]=ne,z;if((192&(E=se[he++]))!=128){he--;continue}if((x=(15&ee)<<12|(63&ne)<<6|63&E)<2048||x>=55296&&x<=57343)continue;te[z++]=x}else if((248&ee)==240){if(he>=le)return this.interim[0]=ee,z;if((192&(ne=se[he++]))!=128){he--;continue}if(he>=le)return this.interim[0]=ee,this.interim[1]=ne,z;if((192&(E=se[he++]))!=128){he--;continue}if(he>=le)return this.interim[0]=ee,this.interim[1]=ne,this.interim[2]=E,z;if((192&(b=se[he++]))!=128){he--;continue}if((x=(7&ee)<<18|(63&ne)<<12|(63&E)<<6|63&b)<65536||x>1114111)continue;te[z++]=x}}return z},ue}();be.Utf8ToUtf32=Ce},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.CHAR_ATLAS_CELL_SPACING=be.DIM_OPACITY=be.INVERTED_DEFAULT_COLOR=void 0,be.INVERTED_DEFAULT_COLOR=257,be.DIM_OPACITY=.5,be.CHAR_ATLAS_CELL_SPACING=1},function(Dt,be,ce){"use strict";var ie,Ce,ue,se;function te(ee){var ne=ee.toString(16);return ne.length<2?"0"+ne:ne}function le(ee,ne){return ee<ne?(ne+.05)/(ee+.05):(ee+.05)/(ne+.05)}Object.defineProperty(be,"__esModule",{value:!0}),be.contrastRatio=be.toPaddedHex=be.rgba=be.rgb=be.css=be.color=be.channels=void 0,function(ee){ee.toCss=function(ne,E,b,z){return z!==void 0?"#"+te(ne)+te(E)+te(b)+te(z):"#"+te(ne)+te(E)+te(b)},ee.toRgba=function(ne,E,b,z){return z===void 0&&(z=255),(ne<<24|E<<16|b<<8|z)>>>0}}(ie=be.channels||(be.channels={})),(Ce=be.color||(be.color={})).blend=function(ee,ne){var E=(255&ne.rgba)/255;if(E===1)return{css:ne.css,rgba:ne.rgba};var b=ne.rgba>>24&255,z=ne.rgba>>16&255,x=ne.rgba>>8&255,re=ee.rgba>>24&255,ae=ee.rgba>>16&255,oe=ee.rgba>>8&255,ve=re+Math.round((b-re)*E),ye=ae+Math.round((z-ae)*E),me=oe+Math.round((x-oe)*E);return{css:ie.toCss(ve,ye,me),rgba:ie.toRgba(ve,ye,me)}},Ce.isOpaque=function(ee){return(255&ee.rgba)==255},Ce.ensureContrastRatio=function(ee,ne,E){var b=se.ensureContrastRatio(ee.rgba,ne.rgba,E);if(b)return se.toColor(b>>24&255,b>>16&255,b>>8&255)},Ce.opaque=function(ee){var ne=(255|ee.rgba)>>>0,E=se.toChannels(ne),b=E[0],z=E[1],x=E[2];return{css:ie.toCss(b,z,x),rgba:ne}},Ce.opacity=function(ee,ne){var E=Math.round(255*ne),b=se.toChannels(ee.rgba),z=b[0],x=b[1],re=b[2];return{css:ie.toCss(z,x,re,E),rgba:ie.toRgba(z,x,re,E)}},(be.css||(be.css={})).toColor=function(ee){switch(ee.length){case 7:return{css:ee,rgba:(parseInt(ee.slice(1),16)<<8|255)>>>0};case 9:return{css:ee,rgba:parseInt(ee.slice(1),16)>>>0}}throw new Error("css.toColor: Unsupported css format")},function(ee){function ne(E,b,z){var x=E/255,re=b/255,ae=z/255;return .2126*(x<=.03928?x/12.92:Math.pow((x+.055)/1.055,2.4))+.7152*(re<=.03928?re/12.92:Math.pow((re+.055)/1.055,2.4))+.0722*(ae<=.03928?ae/12.92:Math.pow((ae+.055)/1.055,2.4))}ee.relativeLuminance=function(E){return ne(E>>16&255,E>>8&255,255&E)},ee.relativeLuminance2=ne}(ue=be.rgb||(be.rgb={})),function(ee){function ne(b,z,x){for(var re=b>>24&255,ae=b>>16&255,oe=b>>8&255,ve=z>>24&255,ye=z>>16&255,me=z>>8&255,ge=le(ue.relativeLuminance2(ve,me,ye),ue.relativeLuminance2(re,ae,oe));ge<x&&(ve>0||ye>0||me>0);)ve-=Math.max(0,Math.ceil(.1*ve)),ye-=Math.max(0,Math.ceil(.1*ye)),me-=Math.max(0,Math.ceil(.1*me)),ge=le(ue.relativeLuminance2(ve,me,ye),ue.relativeLuminance2(re,ae,oe));return(ve<<24|ye<<16|me<<8|255)>>>0}function E(b,z,x){for(var re=b>>24&255,ae=b>>16&255,oe=b>>8&255,ve=z>>24&255,ye=z>>16&255,me=z>>8&255,ge=le(ue.relativeLuminance2(ve,me,ye),ue.relativeLuminance2(re,ae,oe));ge<x&&(ve<255||ye<255||me<255);)ve=Math.min(255,ve+Math.ceil(.1*(255-ve))),ye=Math.min(255,ye+Math.ceil(.1*(255-ye))),me=Math.min(255,me+Math.ceil(.1*(255-me))),ge=le(ue.relativeLuminance2(ve,me,ye),ue.relativeLuminance2(re,ae,oe));return(ve<<24|ye<<16|me<<8|255)>>>0}ee.ensureContrastRatio=function(b,z,x){var re=ue.relativeLuminance(b>>8),ae=ue.relativeLuminance(z>>8);if(le(re,ae)<x)return ae<re?ne(b,z,x):E(b,z,x)},ee.reduceLuminance=ne,ee.increaseLuminance=E,ee.toChannels=function(b){return[b>>24&255,b>>16&255,b>>8&255,255&b]},ee.toColor=function(b,z,x){return{css:ie.toCss(b,z,x),rgba:ie.toRgba(b,z,x)}}}(se=be.rgba||(be.rgba={})),be.toPaddedHex=te,be.contrastRatio=le},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.isLinux=be.isWindows=be.isIphone=be.isIpad=be.isMac=be.isSafari=be.isFirefox=void 0;var ie=typeof navigator=="undefined",Ce=ie?"node":navigator.userAgent,ue=ie?"node":navigator.platform;function se(te,le){return te.indexOf(le)>=0}be.isFirefox=!!~Ce.indexOf("Firefox"),be.isSafari=/^((?!chrome|android).)*safari/i.test(Ce),be.isMac=se(["Macintosh","MacIntel","MacPPC","Mac68K"],ue),be.isIpad=ue==="iPad",be.isIphone=ue==="iPhone",be.isWindows=se(["Windows","Win16","Win32","WinCE"],ue),be.isLinux=ue.indexOf("Linux")>=0},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.C1=be.C0=void 0,function(ie){ie.NUL="\0",ie.SOH="",ie.STX="",ie.ETX="",ie.EOT="",ie.ENQ="",ie.ACK="",ie.BEL="\x07",ie.BS="\b",ie.HT=" ",ie.LF=`
|
|
|
`,ie.VT="\v",ie.FF="\f",ie.CR="\r",ie.SO="",ie.SI="",ie.DLE="",ie.DC1="",ie.DC2="",ie.DC3="",ie.DC4="",ie.NAK="",ie.SYN="",ie.ETB="",ie.CAN="",ie.EM="",ie.SUB="",ie.ESC="\x1B",ie.FS="",ie.GS="",ie.RS="",ie.US="",ie.SP=" ",ie.DEL="\x7F"}(be.C0||(be.C0={})),function(ie){ie.PAD="\x80",ie.HOP="\x81",ie.BPH="\x82",ie.NBH="\x83",ie.IND="\x84",ie.NEL="\x85",ie.SSA="\x86",ie.ESA="\x87",ie.HTS="\x88",ie.HTJ="\x89",ie.VTS="\x8A",ie.PLD="\x8B",ie.PLU="\x8C",ie.RI="\x8D",ie.SS2="\x8E",ie.SS3="\x8F",ie.DCS="\x90",ie.PU1="\x91",ie.PU2="\x92",ie.STS="\x93",ie.CCH="\x94",ie.MW="\x95",ie.SPA="\x96",ie.EPA="\x97",ie.SOS="\x98",ie.SGCI="\x99",ie.SCI="\x9A",ie.CSI="\x9B",ie.ST="\x9C",ie.OSC="\x9D",ie.PM="\x9E",ie.APC="\x9F"}(be.C1||(be.C1={}))},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.BaseRenderLayer=void 0;var ie=ce(3),Ce=ce(9),ue=ce(25),se=ce(6),te=ce(28),le=ce(10),ee=ce(17),ne=function(){function E(b,z,x,re,ae,oe,ve,ye){this._container=b,this._alpha=re,this._colors=ae,this._rendererId=oe,this._bufferService=ve,this._optionsService=ye,this._scaledCharWidth=0,this._scaledCharHeight=0,this._scaledCellWidth=0,this._scaledCellHeight=0,this._scaledCharLeft=0,this._scaledCharTop=0,this._currentGlyphIdentifier={chars:"",code:0,bg:0,fg:0,bold:!1,dim:!1,italic:!1},this._canvas=document.createElement("canvas"),this._canvas.classList.add("xterm-"+z+"-layer"),this._canvas.style.zIndex=x.toString(),this._initCanvas(),this._container.appendChild(this._canvas)}return E.prototype.dispose=function(){var b;ee.removeElementFromParent(this._canvas),(b=this._charAtlas)===null||b===void 0||b.dispose()},E.prototype._initCanvas=function(){this._ctx=te.throwIfFalsy(this._canvas.getContext("2d",{alpha:this._alpha})),this._alpha||this._clearAll()},E.prototype.onOptionsChanged=function(){},E.prototype.onBlur=function(){},E.prototype.onFocus=function(){},E.prototype.onCursorMove=function(){},E.prototype.onGridChanged=function(b,z){},E.prototype.onSelectionChanged=function(b,z,x){x===void 0&&(x=!1)},E.prototype.setColors=function(b){this._refreshCharAtlas(b)},E.prototype._setTransparency=function(b){if(b!==this._alpha){var z=this._canvas;this._alpha=b,this._canvas=this._canvas.cloneNode(),this._initCanvas(),this._container.replaceChild(this._canvas,z),this._refreshCharAtlas(this._colors),this.onGridChanged(0,this._bufferService.rows-1)}},E.prototype._refreshCharAtlas=function(b){this._scaledCharWidth<=0&&this._scaledCharHeight<=0||(this._charAtlas=ue.acquireCharAtlas(this._optionsService.options,this._rendererId,b,this._scaledCharWidth,this._scaledCharHeight),this._charAtlas.warmUp())},E.prototype.resize=function(b){this._scaledCellWidth=b.scaledCellWidth,this._scaledCellHeight=b.scaledCellHeight,this._scaledCharWidth=b.scaledCharWidth,this._scaledCharHeight=b.scaledCharHeight,this._scaledCharLeft=b.scaledCharLeft,this._scaledCharTop=b.scaledCharTop,this._canvas.width=b.scaledCanvasWidth,this._canvas.height=b.scaledCanvasHeight,this._canvas.style.width=b.canvasWidth+"px",this._canvas.style.height=b.canvasHeight+"px",this._alpha||this._clearAll(),this._refreshCharAtlas(this._colors)},E.prototype._fillCells=function(b,z,x,re){this._ctx.fillRect(b*this._scaledCellWidth,z*this._scaledCellHeight,x*this._scaledCellWidth,re*this._scaledCellHeight)},E.prototype._fillBottomLineAtCells=function(b,z,x){x===void 0&&(x=1),this._ctx.fillRect(b*this._scaledCellWidth,(z+1)*this._scaledCellHeight-window.devicePixelRatio-1,x*this._scaledCellWidth,window.devicePixelRatio)},E.prototype._fillLeftLineAtCell=function(b,z,x){this._ctx.fillRect(b*this._scaledCellWidth,z*this._scaledCellHeight,window.devicePixelRatio*x,this._scaledCellHeight)},E.prototype._strokeRectAtCell=function(b,z,x,re){this._ctx.lineWidth=window.devicePixelRatio,this._ctx.strokeRect(b*this._scaledCellWidth+window.devicePixelRatio/2,z*this._scaledCellHeight+window.devicePixelRatio/2,x*this._scaledCellWidth-window.devicePixelRatio,re*this._scaledCellHeight-window.devicePixelRatio)},E.prototype._clearAll=function(){this._alpha?this._ctx.clearRect(0,0,this._canvas.width,this._canvas.height):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(0,0,this._canvas.width,this._canvas.height))},E.prototype._clearCells=function(b,z,x,re){this._alpha?this._ctx.clearRect(b*this._scaledCellWidth,z*this._scaledCellHeight,x*this._scaledCellWidth,re*this._scaledCellHeight):(this._ctx.fillStyle=this._colors.background.css,this._ctx.fillRect(b*this._scaledCellWidth,z*this._scaledCellHeight,x*this._scaledCellWidth,re*this._scaledCellHeight))},E.prototype._fillCharTrueColor=function(b,z,x){this._ctx.font=this._getFont(!1,!1),this._ctx.textBaseline="middle",this._clipRow(x),this._ctx.fillText(b.getChars(),z*this._scaledCellWidth+this._scaledCharLeft,x*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2)},E.prototype._drawChars=function(b,z,x){var re,ae,oe=this._getContrastColor(b);oe||b.isFgRGB()||b.isBgRGB()?this._drawUncachedChars(b,z,x,oe):(b.isInverse()?(re=b.isBgDefault()?Ce.INVERTED_DEFAULT_COLOR:b.getBgColor(),ae=b.isFgDefault()?Ce.INVERTED_DEFAULT_COLOR:b.getFgColor()):(ae=b.isBgDefault()?ie.DEFAULT_COLOR:b.getBgColor(),re=b.isFgDefault()?ie.DEFAULT_COLOR:b.getFgColor()),re+=this._optionsService.options.drawBoldTextInBrightColors&&b.isBold()&&re<8?8:0,this._currentGlyphIdentifier.chars=b.getChars()||ie.WHITESPACE_CELL_CHAR,this._currentGlyphIdentifier.code=b.getCode()||ie.WHITESPACE_CELL_CODE,this._currentGlyphIdentifier.bg=ae,this._currentGlyphIdentifier.fg=re,this._currentGlyphIdentifier.bold=!!b.isBold(),this._currentGlyphIdentifier.dim=!!b.isDim(),this._currentGlyphIdentifier.italic=!!b.isItalic(),this._charAtlas&&this._charAtlas.draw(this._ctx,this._currentGlyphIdentifier,z*this._scaledCellWidth+this._scaledCharLeft,x*this._scaledCellHeight+this._scaledCharTop)||this._drawUncachedChars(b,z,x))},E.prototype._drawUncachedChars=function(b,z,x,re){if(this._ctx.save(),this._ctx.font=this._getFont(!!b.isBold(),!!b.isItalic()),this._ctx.textBaseline="middle",b.isInverse())if(re)this._ctx.fillStyle=re.css;else if(b.isBgDefault())this._ctx.fillStyle=le.color.opaque(this._colors.background).css;else if(b.isBgRGB())this._ctx.fillStyle="rgb("+se.AttributeData.toColorRGB(b.getBgColor()).join(",")+")";else{var ae=b.getBgColor();this._optionsService.options.drawBoldTextInBrightColors&&b.isBold()&&ae<8&&(ae+=8),this._ctx.fillStyle=this._colors.ansi[ae].css}else if(re)this._ctx.fillStyle=re.css;else if(b.isFgDefault())this._ctx.fillStyle=this._colors.foreground.css;else if(b.isFgRGB())this._ctx.fillStyle="rgb("+se.AttributeData.toColorRGB(b.getFgColor()).join(",")+")";else{var oe=b.getFgColor();this._optionsService.options.drawBoldTextInBrightColors&&b.isBold()&&oe<8&&(oe+=8),this._ctx.fillStyle=this._colors.ansi[oe].css}this._clipRow(x),b.isDim()&&(this._ctx.globalAlpha=Ce.DIM_OPACITY),this._ctx.fillText(b.getChars(),z*this._scaledCellWidth+this._scaledCharLeft,x*this._scaledCellHeight+this._scaledCharTop+this._scaledCharHeight/2),this._ctx.restore()},E.prototype._clipRow=function(b){this._ctx.beginPath(),this._ctx.rect(0,b*this._scaledCellHeight,this._bufferService.cols*this._scaledCellWidth,this._scaledCellHeight),this._ctx.clip()},E.prototype._getFont=function(b,z){return(z?"italic":"")+" "+(b?this._optionsService.options.fontWeightBold:this._optionsService.options.fontWeight)+" "+this._optionsService.options.fontSize*window.devicePixelRatio+"px "+this._optionsService.options.fontFamily},E.prototype._getContrastColor=function(b){if(this._optionsService.options.minimumContrastRatio!==1){var z=this._colors.contrastCache.getColor(b.bg,b.fg);if(z!==void 0)return z||void 0;var x=b.getFgColor(),re=b.getFgColorMode(),ae=b.getBgColor(),oe=b.getBgColorMode(),ve=!!b.isInverse(),ye=!!b.isInverse();if(ve){var me=x;x=ae,ae=me;var ge=re;re=oe,oe=ge}var _e=this._resolveBackgroundRgba(oe,ae,ve),he=this._resolveForegroundRgba(re,x,ve,ye),pe=le.rgba.ensureContrastRatio(_e,he,this._optionsService.options.minimumContrastRatio);if(pe){var ke={css:le.channels.toCss(pe>>24&255,pe>>16&255,pe>>8&255),rgba:pe};return this._colors.contrastCache.setColor(b.bg,b.fg,ke),ke}this._colors.contrastCache.setColor(b.bg,b.fg,null)}},E.prototype._resolveBackgroundRgba=function(b,z,x){switch(b){case 16777216:case 33554432:return this._colors.ansi[z].rgba;case 50331648:return z<<8;case 0:default:return x?this._colors.foreground.rgba:this._colors.background.rgba}},E.prototype._resolveForegroundRgba=function(b,z,x,re){switch(b){case 16777216:case 33554432:return this._optionsService.options.drawBoldTextInBrightColors&&re&&z<8&&(z+=8),this._colors.ansi[z].rgba;case 50331648:return z<<8;case 0:default:return x?this._colors.background.rgba:this._colors.foreground.rgba}},E}();be.BaseRenderLayer=ne},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.createDecorator=be.getServiceDependencies=be.serviceRegistry=void 0;function ie(Ce,ue,se){ue.di$target===ue?ue.di$dependencies.push({id:Ce,index:se}):(ue.di$dependencies=[{id:Ce,index:se}],ue.di$target=ue)}be.serviceRegistry=new Map,be.getServiceDependencies=function(Ce){return Ce.di$dependencies||[]},be.createDecorator=function(Ce){if(be.serviceRegistry.has(Ce))return be.serviceRegistry.get(Ce);var ue=function(se,te,le){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");ie(ue,se,le)};return ue.toString=function(){return Ce},be.serviceRegistry.set(Ce,ue),ue}},function(Dt,be,ce){"use strict";function ie(Ce,ue,se,te){if(se===void 0&&(se=0),te===void 0&&(te=Ce.length),se>=Ce.length)return Ce;se=(Ce.length+se)%Ce.length,te=te>=Ce.length?Ce.length:(Ce.length+te)%Ce.length;for(var le=se;le<te;++le)Ce[le]=ue;return Ce}Object.defineProperty(be,"__esModule",{value:!0}),be.concat=be.fillFallback=be.fill=void 0,be.fill=function(Ce,ue,se,te){return Ce.fill?Ce.fill(ue,se,te):ie(Ce,ue,se,te)},be.fillFallback=ie,be.concat=function(Ce,ue){var se=new Ce.constructor(Ce.length+ue.length);return se.set(Ce),se.set(ue,Ce.length),se}},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.BufferLine=be.DEFAULT_ATTR_DATA=void 0;var ie=ce(8),Ce=ce(3),ue=ce(4),se=ce(6);be.DEFAULT_ATTR_DATA=Object.freeze(new se.AttributeData);var te=function(){function le(ee,ne,E){E===void 0&&(E=!1),this.isWrapped=E,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*ee);for(var b=ne||ue.CellData.fromCharData([0,Ce.NULL_CELL_CHAR,Ce.NULL_CELL_WIDTH,Ce.NULL_CELL_CODE]),z=0;z<ee;++z)this.setCell(z,b);this.length=ee}return le.prototype.get=function(ee){var ne=this._data[3*ee+0],E=2097151≠return[this._data[3*ee+1],2097152&ne?this._combined[ee]:E?ie.stringFromCodePoint(E):"",ne>>22,2097152&ne?this._combined[ee].charCodeAt(this._combined[ee].length-1):E]},le.prototype.set=function(ee,ne){this._data[3*ee+1]=ne[Ce.CHAR_DATA_ATTR_INDEX],ne[Ce.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[ee]=ne[1],this._data[3*ee+0]=2097152|ee|ne[Ce.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*ee+0]=ne[Ce.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|ne[Ce.CHAR_DATA_WIDTH_INDEX]<<22},le.prototype.getWidth=function(ee){return this._data[3*ee+0]>>22},le.prototype.hasWidth=function(ee){return 12582912&this._data[3*ee+0]},le.prototype.getFg=function(ee){return this._data[3*ee+1]},le.prototype.getBg=function(ee){return this._data[3*ee+2]},le.prototype.hasContent=function(ee){return 4194303&this._data[3*ee+0]},le.prototype.getCodePoint=function(ee){var ne=this._data[3*ee+0];return 2097152&ne?this._combined[ee].charCodeAt(this._combined[ee].length-1):2097151&ne},le.prototype.isCombined=function(ee){return 2097152&this._data[3*ee+0]},le.prototype.getString=function(ee){var ne=this._data[3*ee+0];return 2097152&ne?this._combined[ee]:2097151&ne?ie.stringFromCodePoint(2097151&ne):""},le.prototype.loadCell=function(ee,ne){var E=3*ee;return ne.content=this._data[E+0],ne.fg=this._data[E+1],ne.bg=this._data[E+2],2097152&ne.content&&(ne.combinedData=this._combined[ee]),268435456&ne.bg&&(ne.extended=this._extendedAttrs[ee]),ne},le.prototype.setCell=function(ee,ne){2097152&ne.content&&(this._combined[ee]=ne.combinedData),268435456&ne.bg&&(this._extendedAttrs[ee]=ne.extended),this._data[3*ee+0]=ne.content,this._data[3*ee+1]=ne.fg,this._data[3*ee+2]=ne.bg},le.prototype.setCellFromCodePoint=function(ee,ne,E,b,z,x){268435456&z&&(this._extendedAttrs[ee]=x),this._data[3*ee+0]=ne|E<<22,this._data[3*ee+1]=b,this._data[3*ee+2]=z},le.prototype.addCodepointToCell=function(ee,ne){var E=this._data[3*ee+0];2097152&E?this._combined[ee]+=ie.stringFromCodePoint(ne):(2097151&E?(this._combined[ee]=ie.stringFromCodePoint(2097151&E)+ie.stringFromCodePoint(ne),E&=-2097152,E|=2097152):E=ne|1<<22,this._data[3*ee+0]=E)},le.prototype.insertCells=function(ee,ne,E,b){if((ee%=this.length)&&this.getWidth(ee-1)===2&&this.setCellFromCodePoint(ee-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new se.ExtendedAttrs),ne<this.length-ee){for(var z=new ue.CellData,x=this.length-ee-ne-1;x>=0;--x)this.setCell(ee+ne+x,this.loadCell(ee+x,z));for(x=0;x<ne;++x)this.setCell(ee+x,E)}else for(x=ee;x<this.length;++x)this.setCell(x,E);this.getWidth(this.length-1)===2&&this.setCellFromCodePoint(this.length-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new se.ExtendedAttrs)},le.prototype.deleteCells=function(ee,ne,E,b){if(ee%=this.length,ne<this.length-ee){for(var z=new ue.CellData,x=0;x<this.length-ee-ne;++x)this.setCell(ee+x,this.loadCell(ee+ne+x,z));for(x=this.length-ne;x<this.length;++x)this.setCell(x,E)}else for(x=ee;x<this.length;++x)this.setCell(x,E);ee&&this.getWidth(ee-1)===2&&this.setCellFromCodePoint(ee-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new se.ExtendedAttrs),this.getWidth(ee)!==0||this.hasContent(ee)||this.setCellFromCodePoint(ee,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new se.ExtendedAttrs)},le.prototype.replaceCells=function(ee,ne,E,b){for(ee&&this.getWidth(ee-1)===2&&this.setCellFromCodePoint(ee-1,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new se.ExtendedAttrs),ne<this.length&&this.getWidth(ne-1)===2&&this.setCellFromCodePoint(ne,0,1,(b==null?void 0:b.fg)||0,(b==null?void 0:b.bg)||0,(b==null?void 0:b.extended)||new se.ExtendedAttrs);ee<ne&&ee<this.length;)this.setCell(ee++,E)},le.prototype.resize=function(ee,ne){if(ee!==this.length){if(ee>this.length){var E=new Uint32Array(3*ee);this.length&&(3*ee<this._data.length?E.set(this._data.subarray(0,3*ee)):E.set(this._data)),this._data=E;for(var b=this.length;b<ee;++b)this.setCell(b,ne)}else if(ee){(E=new Uint32Array(3*ee)).set(this._data.subarray(0,3*ee)),this._data=E;var z=Object.keys(this._combined);for(b=0;b<z.length;b++){var x=parseInt(z[b],10);x>=ee&&delete this._combined[x]}}else this._data=new Uint32Array(0),this._combined={};this.length=ee}},le.prototype.fill=function(ee){this._combined={},this._extendedAttrs={};for(var ne=0;ne<this.length;++ne)this.setCell(ne,ee)},le.prototype.copyFrom=function(ee){for(var ne in this.length!==ee.length?this._data=new Uint32Array(ee._data):this._data.set(ee._data),this.length=ee.length,this._combined={},ee._combined)this._combined[ne]=ee._combined[ne];for(var ne in this._extendedAttrs={},ee._extendedAttrs)this._extendedAttrs[ne]=ee._extendedAttrs[ne];this.isWrapped=ee.isWrapped},le.prototype.clone=function(){var ee=new le(0);for(var ne in ee._data=new Uint32Array(this._data),ee.length=this.length,this._combined)ee._combined[ne]=this._combined[ne];for(var ne in this._extendedAttrs)ee._extendedAttrs[ne]=this._extendedAttrs[ne];return ee.isWrapped=this.isWrapped,ee},le.prototype.getTrimmedLength=function(){for(var ee=this.length-1;ee>=0;--ee)if(4194303&this._data[3*ee+0])return ee+(this._data[3*ee+0]>>22);return 0},le.prototype.copyCellsFrom=function(ee,ne,E,b,z){var x=ee._data;if(z)for(var re=b-1;re>=0;re--)for(var ae=0;ae<3;ae++)this._data[3*(E+re)+ae]=x[3*(ne+re)+ae];else for(re=0;re<b;re++)for(ae=0;ae<3;ae++)this._data[3*(E+re)+ae]=x[3*(ne+re)+ae];var oe=Object.keys(ee._combined);for(ae=0;ae<oe.length;ae++){var ve=parseInt(oe[ae],10);ve>=ne&&(this._combined[ve-ne+E]=ee._combined[ve])}},le.prototype.translateToString=function(ee,ne,E){ee===void 0&&(ee=!1),ne===void 0&&(ne=0),E===void 0&&(E=this.length),ee&&(E=Math.min(E,this.getTrimmedLength()));for(var b="";ne<E;){var z=this._data[3*ne+0],x=2097151&z;b+=2097152&z?this._combined[ne]:x?ie.stringFromCodePoint(x):Ce.WHITESPACE_CELL_CHAR,ne+=z>>22||1}return b},le}();be.BufferLine=te},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.removeElementFromParent=void 0,be.removeElementFromParent=function(){for(var ie,Ce=[],ue=0;ue<arguments.length;ue++)Ce[ue]=arguments[ue];for(var se=0,te=Ce;se<te.length;se++){var le=te[se];(ie=le==null?void 0:le.parentElement)===null||ie===void 0||ie.removeChild(le)}}},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.tooMuchOutput=be.promptLabel=void 0,be.promptLabel="Terminal input",be.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(he,pe){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ke,Te){ke.__proto__=Te}||function(ke,Te){for(var Ee in Te)Te.hasOwnProperty(Ee)&&(ke[Ee]=Te[Ee])})(he,pe)},function(he,pe){function ke(){this.constructor=he}ie(he,pe),he.prototype=pe===null?Object.create(pe):(ke.prototype=pe.prototype,new ke)});Object.defineProperty(be,"__esModule",{value:!0}),be.InputHandler=be.WindowsOptionsReportType=void 0;var ue,se=ce(12),te=ce(20),le=ce(39),ee=ce(2),ne=ce(15),E=ce(8),b=ce(16),z=ce(0),x=ce(3),re=ce(4),ae=ce(6),oe=ce(22),ve=ce(24),ye={"(":0,")":1,"*":2,"+":3,"-":1,".":2};function me(he,pe){if(he>24)return pe.setWinLines||!1;switch(he){case 1:return!!pe.restoreWin;case 2:return!!pe.minimizeWin;case 3:return!!pe.setWinPosition;case 4:return!!pe.setWinSizePixels;case 5:return!!pe.raiseWin;case 6:return!!pe.lowerWin;case 7:return!!pe.refreshWin;case 8:return!!pe.setWinSizeChars;case 9:return!!pe.maximizeWin;case 10:return!!pe.fullscreenWin;case 11:return!!pe.getWinState;case 13:return!!pe.getWinPosition;case 14:return!!pe.getWinSizePixels;case 15:return!!pe.getScreenSizePixels;case 16:return!!pe.getCellSizePixels;case 18:return!!pe.getWinSizeChars;case 19:return!!pe.getScreenSizeChars;case 20:return!!pe.getIconTitle;case 21:return!!pe.getWinTitle;case 22:return!!pe.pushTitle;case 23:return!!pe.popTitle;case 24:return!!pe.setWinLines}return!1}(function(he){he[he.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",he[he.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(ue=be.WindowsOptionsReportType||(be.WindowsOptionsReportType={}));var ge=function(){function he(pe,ke,Te,Ee){this._bufferService=pe,this._coreService=ke,this._logService=Te,this._optionsService=Ee,this._data=new Uint32Array(0)}return he.prototype.hook=function(pe){this._data=new Uint32Array(0)},he.prototype.put=function(pe,ke,Te){this._data=ne.concat(this._data,pe.subarray(ke,Te))},he.prototype.unhook=function(pe){if(pe){var ke=E.utf32ToString(this._data);switch(this._data=new Uint32Array(0),ke){case'"q':return this._coreService.triggerDataEvent(se.C0.ESC+'P1$r0"q'+se.C0.ESC+"\\");case'"p':return this._coreService.triggerDataEvent(se.C0.ESC+'P1$r61;1"p'+se.C0.ESC+"\\");case"r":var Te=this._bufferService.buffer.scrollTop+1+";"+(this._bufferService.buffer.scrollBottom+1)+"r";return this._coreService.triggerDataEvent(se.C0.ESC+"P1$r"+Te+se.C0.ESC+"\\");case"m":return this._coreService.triggerDataEvent(se.C0.ESC+"P1$r0m"+se.C0.ESC+"\\");case" q":var Ee={block:2,underline:4,bar:6}[this._optionsService.options.cursorStyle];return Ee-=this._optionsService.options.cursorBlink?1:0,this._coreService.triggerDataEvent(se.C0.ESC+"P1$r"+Ee+" q"+se.C0.ESC+"\\");default:this._logService.debug("Unknown DCS $q %s",ke),this._coreService.triggerDataEvent(se.C0.ESC+"P0$r"+se.C0.ESC+"\\")}}else this._data=new Uint32Array(0)},he}(),_e=function(he){function pe(ke,Te,Ee,Oe,je,Pe,Qe,Xe,ot){ot===void 0&&(ot=new le.EscapeSequenceParser);var He=he.call(this)||this;He._bufferService=ke,He._charsetService=Te,He._coreService=Ee,He._dirtyRowService=Oe,He._logService=je,He._optionsService=Pe,He._coreMouseService=Qe,He._unicodeService=Xe,He._parser=ot,He._parseBuffer=new Uint32Array(4096),He._stringDecoder=new E.StringToUtf32,He._utf8Decoder=new E.Utf8ToUtf32,He._workCell=new re.CellData,He._windowTitle="",He._iconName="",He._windowTitleStack=[],He._iconNameStack=[],He._curAttrData=b.DEFAULT_ATTR_DATA.clone(),He._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone(),He._onRequestBell=new z.EventEmitter,He._onRequestRefreshRows=new z.EventEmitter,He._onRequestReset=new z.EventEmitter,He._onRequestScroll=new z.EventEmitter,He._onRequestSyncScrollBar=new z.EventEmitter,He._onRequestWindowsOptionsReport=new z.EventEmitter,He._onA11yChar=new z.EventEmitter,He._onA11yTab=new z.EventEmitter,He._onCursorMove=new z.EventEmitter,He._onLineFeed=new z.EventEmitter,He._onScroll=new z.EventEmitter,He._onTitleChange=new z.EventEmitter,He.register(He._parser),He._parser.setCsiHandlerFallback(function(Ge,ze){He._logService.debug("Unknown CSI code: ",{identifier:He._parser.identToString(Ge),params:ze.toArray()})}),He._parser.setEscHandlerFallback(function(Ge){He._logService.debug("Unknown ESC code: ",{identifier:He._parser.identToString(Ge)})}),He._parser.setExecuteHandlerFallback(function(Ge){He._logService.debug("Unknown EXECUTE code: ",{code:Ge})}),He._parser.setOscHandlerFallback(function(Ge,ze,Ve){He._logService.debug("Unknown OSC code: ",{identifier:Ge,action:ze,data:Ve})}),He._parser.setDcsHandlerFallback(function(Ge,ze,Ve){ze==="HOOK"&&(Ve=Ve.toArray()),He._logService.debug("Unknown DCS code: ",{identifier:He._parser.identToString(Ge),action:ze,payload:Ve})}),He._parser.setPrintHandler(function(Ge,ze,Ve){return He.print(Ge,ze,Ve)}),He._parser.setCsiHandler({final:"@"},function(Ge){return He.insertChars(Ge)}),He._parser.setCsiHandler({intermediates:" ",final:"@"},function(Ge){return He.scrollLeft(Ge)}),He._parser.setCsiHandler({final:"A"},function(Ge){return He.cursorUp(Ge)}),He._parser.setCsiHandler({intermediates:" ",final:"A"},function(Ge){return He.scrollRight(Ge)}),He._parser.setCsiHandler({final:"B"},function(Ge){return He.cursorDown(Ge)}),He._parser.setCsiHandler({final:"C"},function(Ge){return He.cursorForward(Ge)}),He._parser.setCsiHandler({final:"D"},function(Ge){return He.cursorBackward(Ge)}),He._parser.setCsiHandler({final:"E"},function(Ge){return He.cursorNextLine(Ge)}),He._parser.setCsiHandler({final:"F"},function(Ge){return He.cursorPrecedingLine(Ge)}),He._parser.setCsiHandler({final:"G"},function(Ge){return He.cursorCharAbsolute(Ge)}),He._parser.setCsiHandler({final:"H"},function(Ge){return He.cursorPosition(Ge)}),He._parser.setCsiHandler({final:"I"},function(Ge){return He.cursorForwardTab(Ge)}),He._parser.setCsiHandler({final:"J"},function(Ge){return He.eraseInDisplay(Ge)}),He._parser.setCsiHandler({prefix:"?",final:"J"},function(Ge){return He.eraseInDisplay(Ge)}),He._parser.setCsiHandler({final:"K"},function(Ge){return He.eraseInLine(Ge)}),He._parser.setCsiHandler({prefix:"?",final:"K"},function(Ge){return He.eraseInLine(Ge)}),He._parser.setCsiHandler({final:"L"},function(Ge){return He.insertLines(Ge)}),He._parser.setCsiHandler({final:"M"},function(Ge){return He.deleteLines(Ge)}),He._parser.setCsiHandler({final:"P"},function(Ge){return He.deleteChars(Ge)}),He._parser.setCsiHandler({final:"S"},function(Ge){return He.scrollUp(Ge)}),He._parser.setCsiHandler({final:"T"},function(Ge){return He.scrollDown(Ge)}),He._parser.setCsiHandler({final:"X"},function(Ge){return He.eraseChars(Ge)}),He._parser.setCsiHandler({final:"Z"},function(Ge){return He.cursorBackwardTab(Ge)}),He._parser.setCsiHandler({final:"`"},function(Ge){return He.charPosAbsolute(Ge)}),He._parser.setCsiHandler({final:"a"},function(Ge){return He.hPositionRelative(Ge)}),He._parser.setCsiHandler({final:"b"},function(Ge){return He.repeatPrecedingCharacter(Ge)}),He._parser.setCsiHandler({final:"c"},function(Ge){return He.sendDeviceAttributesPrimary(Ge)}),He._parser.setCsiHandler({prefix:">",final:"c"},function(Ge){return He.sendDeviceAttributesSecondary(Ge)}),He._parser.setCsiHandler({final:"d"},function(Ge){return He.linePosAbsolute(Ge)}),He._parser.setCsiHandler({final:"e"},function(Ge){return He.vPositionRelative(Ge)}),He._parser.setCsiHandler({final:"f"},function(Ge){return He.hVPosition(Ge)}),He._parser.setCsiHandler({final:"g"},function(Ge){return He.tabClear(Ge)}),He._parser.setCsiHandler({final:"h"},function(Ge){return He.setMode(Ge)}),He._parser.setCsiHandler({prefix:"?",final:"h"},function(Ge){return He.setModePrivate(Ge)}),He._parser.setCsiHandler({final:"l"},function(Ge){return He.resetMode(Ge)}),He._parser.setCsiHandler({prefix:"?",final:"l"},function(Ge){return He.resetModePrivate(Ge)}),He._parser.setCsiHandler({final:"m"},function(Ge){return He.charAttributes(Ge)}),He._parser.setCsiHandler({final:"n"},function(Ge){return He.deviceStatus(Ge)}),He._parser.setCsiHandler({prefix:"?",final:"n"},function(Ge){return He.deviceStatusPrivate(Ge)}),He._parser.setCsiHandler({intermediates:"!",final:"p"},function(Ge){return He.softReset(Ge)}),He._parser.setCsiHandler({intermediates:" ",final:"q"},function(Ge){return He.setCursorStyle(Ge)}),He._parser.setCsiHandler({final:"r"},function(Ge){return He.setScrollRegion(Ge)}),He._parser.setCsiHandler({final:"s"},function(Ge){return He.saveCursor(Ge)}),He._parser.setCsiHandler({final:"t"},function(Ge){return He.windowOptions(Ge)}),He._parser.setCsiHandler({final:"u"},function(Ge){return He.restoreCursor(Ge)}),He._parser.setCsiHandler({intermediates:"'",final:"}"},function(Ge){return He.insertColumns(Ge)}),He._parser.setCsiHandler({intermediates:"'",final:"~"},function(Ge){return He.deleteColumns(Ge)}),He._parser.setExecuteHandler(se.C0.BEL,function(){return He.bell()}),He._parser.setExecuteHandler(se.C0.LF,function(){return He.lineFeed()}),He._parser.setExecuteHandler(se.C0.VT,function(){return He.lineFeed()}),He._parser.setExecuteHandler(se.C0.FF,function(){return He.lineFeed()}),He._parser.setExecuteHandler(se.C0.CR,function(){return He.carriageReturn()}),He._parser.setExecuteHandler(se.C0.BS,function(){return He.backspace()}),He._parser.setExecuteHandler(se.C0.HT,function(){return He.tab()}),He._parser.setExecuteHandler(se.C0.SO,function(){return He.shiftOut()}),He._parser.setExecuteHandler(se.C0.SI,function(){return He.shiftIn()}),He._parser.setExecuteHandler(se.C1.IND,function(){return He.index()}),He._parser.setExecuteHandler(se.C1.NEL,function(){return He.nextLine()}),He._parser.setExecuteHandler(se.C1.HTS,function(){return He.tabSet()}),He._parser.setOscHandler(0,new oe.OscHandler(function(Ge){He.setTitle(Ge),He.setIconName(Ge)})),He._parser.setOscHandler(1,new oe.OscHandler(function(Ge){return He.setIconName(Ge)})),He._parser.setOscHandler(2,new oe.OscHandler(function(Ge){return He.setTitle(Ge)})),He._parser.setEscHandler({final:"7"},function(){return He.saveCursor()}),He._parser.setEscHandler({final:"8"},function(){return He.restoreCursor()}),He._parser.setEscHandler({final:"D"},function(){return He.index()}),He._parser.setEscHandler({final:"E"},function(){return He.nextLine()}),He._parser.setEscHandler({final:"H"},function(){return He.tabSet()}),He._parser.setEscHandler({final:"M"},function(){return He.reverseIndex()}),He._parser.setEscHandler({final:"="},function(){return He.keypadApplicationMode()}),He._parser.setEscHandler({final:">"},function(){return He.keypadNumericMode()}),He._parser.setEscHandler({final:"c"},function(){return He.fullReset()}),He._parser.setEscHandler({final:"n"},function(){return He.setgLevel(2)}),He._parser.setEscHandler({final:"o"},function(){return He.setgLevel(3)}),He._parser.setEscHandler({final:"|"},function(){return He.setgLevel(3)}),He._parser.setEscHandler({final:"}"},function(){return He.setgLevel(2)}),He._parser.setEscHandler({final:"~"},function(){return He.setgLevel(1)}),He._parser.setEscHandler({intermediates:"%",final:"@"},function(){return He.selectDefaultCharset()}),He._parser.setEscHandler({intermediates:"%",final:"G"},function(){return He.selectDefaultCharset()});var rt=function(Ge){Ye._parser.setEscHandler({intermediates:"(",final:Ge},function(){return He.selectCharset("("+Ge)}),Ye._parser.setEscHandler({intermediates:")",final:Ge},function(){return He.selectCharset(")"+Ge)}),Ye._parser.setEscHandler({intermediates:"*",final:Ge},function(){return He.selectCharset("*"+Ge)}),Ye._parser.setEscHandler({intermediates:"+",final:Ge},function(){return He.selectCharset("+"+Ge)}),Ye._parser.setEscHandler({intermediates:"-",final:Ge},function(){return He.selectCharset("-"+Ge)}),Ye._parser.setEscHandler({intermediates:".",final:Ge},function(){return He.selectCharset("."+Ge)}),Ye._parser.setEscHandler({intermediates:"/",final:Ge},function(){return He.selectCharset("/"+Ge)})},Ye=this;for(var ut in te.CHARSETS)rt(ut);return He._parser.setEscHandler({intermediates:"#",final:"8"},function(){return He.screenAlignmentPattern()}),He._parser.setErrorHandler(function(Ge){return He._logService.error("Parsing error: ",Ge),Ge}),He._parser.setDcsHandler({intermediates:"$",final:"q"},new ge(He._bufferService,He._coreService,He._logService,He._optionsService)),He}return Ce(pe,he),Object.defineProperty(pe.prototype,"onRequestBell",{get:function(){return this._onRequestBell.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onRequestRefreshRows",{get:function(){return this._onRequestRefreshRows.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onRequestReset",{get:function(){return this._onRequestReset.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onRequestScroll",{get:function(){return this._onRequestScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onRequestSyncScrollBar",{get:function(){return this._onRequestSyncScrollBar.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onRequestWindowsOptionsReport",{get:function(){return this._onRequestWindowsOptionsReport.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onA11yChar",{get:function(){return this._onA11yChar.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onA11yTab",{get:function(){return this._onA11yTab.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(pe.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),pe.prototype.dispose=function(){he.prototype.dispose.call(this)},pe.prototype.parse=function(ke){var Te=this._bufferService.buffer,Ee=Te.x,Oe=Te.y;if(this._logService.debug("parsing data",ke),this._parseBuffer.length<ke.length&&this._parseBuffer.length<131072&&(this._parseBuffer=new Uint32Array(Math.min(ke.length,131072))),this._dirtyRowService.clearRange(),ke.length>131072)for(var je=0;je<ke.length;je+=131072){var Pe=je+131072<ke.length?je+131072:ke.length,Qe=typeof ke=="string"?this._stringDecoder.decode(ke.substring(je,Pe),this._parseBuffer):this._utf8Decoder.decode(ke.subarray(je,Pe),this._parseBuffer);this._parser.parse(this._parseBuffer,Qe)}else Qe=typeof ke=="string"?this._stringDecoder.decode(ke,this._parseBuffer):this._utf8Decoder.decode(ke,this._parseBuffer),this._parser.parse(this._parseBuffer,Qe);(Te=this._bufferService.buffer).x===Ee&&Te.y===Oe||this._onCursorMove.fire(),this._onRequestRefreshRows.fire(this._dirtyRowService.start,this._dirtyRowService.end)},pe.prototype.print=function(ke,Te,Ee){var Oe,je,Pe=this._bufferService.buffer,Qe=this._charsetService.charset,Xe=this._optionsService.options.screenReaderMode,ot=this._bufferService.cols,He=this._coreService.decPrivateModes.wraparound,rt=this._coreService.modes.insertMode,Ye=this._curAttrData,ut=Pe.lines.get(Pe.ybase+Pe.y);this._dirtyRowService.markDirty(Pe.y),Pe.x&&Ee-Te>0&&ut.getWidth(Pe.x-1)===2&&ut.setCellFromCodePoint(Pe.x-1,0,1,Ye.fg,Ye.bg,Ye.extended);for(var Ge=Te;Ge<Ee;++Ge){if(Oe=ke[Ge],je=this._unicodeService.wcwidth(Oe),Oe<127&&Qe){var ze=Qe[String.fromCharCode(Oe)];ze&&(Oe=ze.charCodeAt(0))}if(Xe&&this._onA11yChar.fire(E.stringFromCodePoint(Oe)),je||!Pe.x){if(Pe.x+je-1>=ot){if(He){for(;Pe.x<ot;)ut.setCellFromCodePoint(Pe.x++,0,1,Ye.fg,Ye.bg,Ye.extended);Pe.x=0,Pe.y++,Pe.y===Pe.scrollBottom+1?(Pe.y--,this._onRequestScroll.fire(this._eraseAttrData(),!0)):(Pe.y>=this._bufferService.rows&&(Pe.y=this._bufferService.rows-1),Pe.lines.get(Pe.ybase+Pe.y).isWrapped=!0),ut=Pe.lines.get(Pe.ybase+Pe.y)}else if(Pe.x=ot-1,je===2)continue}if(rt&&(ut.insertCells(Pe.x,je,Pe.getNullCell(Ye),Ye),ut.getWidth(ot-1)===2&&ut.setCellFromCodePoint(ot-1,x.NULL_CELL_CODE,x.NULL_CELL_WIDTH,Ye.fg,Ye.bg,Ye.extended)),ut.setCellFromCodePoint(Pe.x++,Oe,je,Ye.fg,Ye.bg,Ye.extended),je>0)for(;--je;)ut.setCellFromCodePoint(Pe.x++,0,0,Ye.fg,Ye.bg,Ye.extended)}else ut.getWidth(Pe.x-1)?ut.addCodepointToCell(Pe.x-1,Oe):ut.addCodepointToCell(Pe.x-2,Oe)}Ee-Te>0&&(ut.loadCell(Pe.x-1,this._workCell),this._workCell.getWidth()===2||this._workCell.getCode()>65535?this._parser.precedingCodepoint=0:this._workCell.isCombined()?this._parser.precedingCodepoint=this._workCell.getChars().charCodeAt(0):this._parser.precedingCodepoint=this._workCell.content),Pe.x<ot&&Ee-Te>0&&ut.getWidth(Pe.x)===0&&!ut.hasContent(Pe.x)&&ut.setCellFromCodePoint(Pe.x,0,1,Ye.fg,Ye.bg,Ye.extended),this._dirtyRowService.markDirty(Pe.y)},pe.prototype.addCsiHandler=function(ke,Te){var Ee=this;return ke.final!=="t"||ke.prefix||ke.intermediates?this._parser.addCsiHandler(ke,Te):this._parser.addCsiHandler(ke,function(Oe){return!me(Oe.params[0],Ee._optionsService.options.windowOptions)||Te(Oe)})},pe.prototype.addDcsHandler=function(ke,Te){return this._parser.addDcsHandler(ke,new ve.DcsHandler(Te))},pe.prototype.addEscHandler=function(ke,Te){return this._parser.addEscHandler(ke,Te)},pe.prototype.addOscHandler=function(ke,Te){return this._parser.addOscHandler(ke,new oe.OscHandler(Te))},pe.prototype.bell=function(){this._onRequestBell.fire()},pe.prototype.lineFeed=function(){var ke=this._bufferService.buffer;this._dirtyRowService.markDirty(ke.y),this._optionsService.options.convertEol&&(ke.x=0),ke.y++,ke.y===ke.scrollBottom+1?(ke.y--,this._onRequestScroll.fire(this._eraseAttrData())):ke.y>=this._bufferService.rows&&(ke.y=this._bufferService.rows-1),ke.x>=this._bufferService.cols&&ke.x--,this._dirtyRowService.markDirty(ke.y),this._onLineFeed.fire()},pe.prototype.carriageReturn=function(){this._bufferService.buffer.x=0},pe.prototype.backspace=function(){var ke,Te=this._bufferService.buffer;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),void(Te.x>0&&Te.x--);if(this._restrictCursor(this._bufferService.cols),Te.x>0)Te.x--;else if(Te.x===0&&Te.y>Te.scrollTop&&Te.y<=Te.scrollBottom&&(!((ke=Te.lines.get(Te.ybase+Te.y))===null||ke===void 0)&&ke.isWrapped)){Te.lines.get(Te.ybase+Te.y).isWrapped=!1,Te.y--,Te.x=this._bufferService.cols-1;var Ee=Te.lines.get(Te.ybase+Te.y);Ee.hasWidth(Te.x)&&!Ee.hasContent(Te.x)&&Te.x--}this._restrictCursor()},pe.prototype.tab=function(){if(!(this._bufferService.buffer.x>=this._bufferService.cols)){var ke=this._bufferService.buffer.x;this._bufferService.buffer.x=this._bufferService.buffer.nextStop(),this._optionsService.options.screenReaderMode&&this._onA11yTab.fire(this._bufferService.buffer.x-ke)}},pe.prototype.shiftOut=function(){this._charsetService.setgLevel(1)},pe.prototype.shiftIn=function(){this._charsetService.setgLevel(0)},pe.prototype._restrictCursor=function(ke){ke===void 0&&(ke=this._bufferService.cols-1),this._bufferService.buffer.x=Math.min(ke,Math.max(0,this._bufferService.buffer.x)),this._bufferService.buffer.y=this._coreService.decPrivateModes.origin?Math.min(this._bufferService.buffer.scrollBottom,Math.max(this._bufferService.buffer.scrollTop,this._bufferService.buffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._bufferService.buffer.y)),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},pe.prototype._setCursor=function(ke,Te){this._dirtyRowService.markDirty(this._bufferService.buffer.y),this._coreService.decPrivateModes.origin?(this._bufferService.buffer.x=ke,this._bufferService.buffer.y=this._bufferService.buffer.scrollTop+Te):(this._bufferService.buffer.x=ke,this._bufferService.buffer.y=Te),this._restrictCursor(),this._dirtyRowService.markDirty(this._bufferService.buffer.y)},pe.prototype._moveCursor=function(ke,Te){this._restrictCursor(),this._setCursor(this._bufferService.buffer.x+ke,this._bufferService.buffer.y+Te)},pe.prototype.cursorUp=function(ke){var Te=this._bufferService.buffer.y-this._bufferService.buffer.scrollTop;Te>=0?this._moveCursor(0,-Math.min(Te,ke.params[0]||1)):this._moveCursor(0,-(ke.params[0]||1))},pe.prototype.cursorDown=function(ke){var Te=this._bufferService.buffer.scrollBottom-this._bufferService.buffer.y;Te>=0?this._moveCursor(0,Math.min(Te,ke.params[0]||1)):this._moveCursor(0,ke.params[0]||1)},pe.prototype.cursorForward=function(ke){this._moveCursor(ke.params[0]||1,0)},pe.prototype.cursorBackward=function(ke){this._moveCursor(-(ke.params[0]||1),0)},pe.prototype.cursorNextLine=function(ke){this.cursorDown(ke),this._bufferService.buffer.x=0},pe.prototype.cursorPrecedingLine=function(ke){this.cursorUp(ke),this._bufferService.buffer.x=0},pe.prototype.cursorCharAbsolute=function(ke){this._setCursor((ke.params[0]||1)-1,this._bufferService.buffer.y)},pe.prototype.cursorPosition=function(ke){this._setCursor(ke.length>=2?(ke.params[1]||1)-1:0,(ke.params[0]||1)-1)},pe.prototype.charPosAbsolute=function(ke){this._setCursor((ke.params[0]||1)-1,this._bufferService.buffer.y)},pe.prototype.hPositionRelative=function(ke){this._moveCursor(ke.params[0]||1,0)},pe.prototype.linePosAbsolute=function(ke){this._setCursor(this._bufferService.buffer.x,(ke.params[0]||1)-1)},pe.prototype.vPositionRelative=function(ke){this._moveCursor(0,ke.params[0]||1)},pe.prototype.hVPosition=function(ke){this.cursorPosition(ke)},pe.prototype.tabClear=function(ke){var Te=ke.params[0];Te===0?delete this._bufferService.buffer.tabs[this._bufferService.buffer.x]:Te===3&&(this._bufferService.buffer.tabs={})},pe.prototype.cursorForwardTab=function(ke){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Te=ke.params[0]||1;Te--;)this._bufferService.buffer.x=this._bufferService.buffer.nextStop()},pe.prototype.cursorBackwardTab=function(ke){if(!(this._bufferService.buffer.x>=this._bufferService.cols))for(var Te=ke.params[0]||1,Ee=this._bufferService.buffer;Te--;)Ee.x=Ee.prevStop()},pe.prototype._eraseInBufferLine=function(ke,Te,Ee,Oe){Oe===void 0&&(Oe=!1);var je=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+ke);je.replaceCells(Te,Ee,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),Oe&&(je.isWrapped=!1)},pe.prototype._resetBufferLine=function(ke){var Te=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+ke);Te.fill(this._bufferService.buffer.getNullCell(this._eraseAttrData())),Te.isWrapped=!1},pe.prototype.eraseInDisplay=function(ke){var Te;switch(this._restrictCursor(),ke.params[0]){case 0:for(Te=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Te),this._eraseInBufferLine(Te++,this._bufferService.buffer.x,this._bufferService.cols,this._bufferService.buffer.x===0);Te<this._bufferService.rows;Te++)this._resetBufferLine(Te);this._dirtyRowService.markDirty(Te);break;case 1:for(Te=this._bufferService.buffer.y,this._dirtyRowService.markDirty(Te),this._eraseInBufferLine(Te,0,this._bufferService.buffer.x+1,!0),this._bufferService.buffer.x+1>=this._bufferService.cols&&(this._bufferService.buffer.lines.get(Te+1).isWrapped=!1);Te--;)this._resetBufferLine(Te);this._dirtyRowService.markDirty(0);break;case 2:for(Te=this._bufferService.rows,this._dirtyRowService.markDirty(Te-1);Te--;)this._resetBufferLine(Te);this._dirtyRowService.markDirty(0);break;case 3:var Ee=this._bufferService.buffer.lines.length-this._bufferService.rows;Ee>0&&(this._bufferService.buffer.lines.trimStart(Ee),this._bufferService.buffer.ybase=Math.max(this._bufferService.buffer.ybase-Ee,0),this._bufferService.buffer.ydisp=Math.max(this._bufferService.buffer.ydisp-Ee,0),this._onScroll.fire(0))}},pe.prototype.eraseInLine=function(ke){switch(this._restrictCursor(),ke.params[0]){case 0:this._eraseInBufferLine(this._bufferService.buffer.y,this._bufferService.buffer.x,this._bufferService.cols);break;case 1:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.buffer.x+1);break;case 2:this._eraseInBufferLine(this._bufferService.buffer.y,0,this._bufferService.cols)}this._dirtyRowService.markDirty(this._bufferService.buffer.y)},pe.prototype.insertLines=function(ke){this._restrictCursor();var Te=ke.params[0]||1,Ee=this._bufferService.buffer;if(!(Ee.y>Ee.scrollBottom||Ee.y<Ee.scrollTop)){for(var Oe=Ee.ybase+Ee.y,je=this._bufferService.rows-1-Ee.scrollBottom,Pe=this._bufferService.rows-1+Ee.ybase-je+1;Te--;)Ee.lines.splice(Pe-1,1),Ee.lines.splice(Oe,0,Ee.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Ee.y,Ee.scrollBottom),Ee.x=0}},pe.prototype.deleteLines=function(ke){this._restrictCursor();var Te=ke.params[0]||1,Ee=this._bufferService.buffer;if(!(Ee.y>Ee.scrollBottom||Ee.y<Ee.scrollTop)){var Oe,je=Ee.ybase+Ee.y;for(Oe=this._bufferService.rows-1-Ee.scrollBottom,Oe=this._bufferService.rows-1+Ee.ybase-Oe;Te--;)Ee.lines.splice(je,1),Ee.lines.splice(Oe,0,Ee.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Ee.y,Ee.scrollBottom),Ee.x=0}},pe.prototype.insertChars=function(ke){this._restrictCursor();var Te=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Te&&(Te.insertCells(this._bufferService.buffer.x,ke.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},pe.prototype.deleteChars=function(ke){this._restrictCursor();var Te=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Te&&(Te.deleteCells(this._bufferService.buffer.x,ke.params[0]||1,this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},pe.prototype.scrollUp=function(ke){for(var Te=ke.params[0]||1,Ee=this._bufferService.buffer;Te--;)Ee.lines.splice(Ee.ybase+Ee.scrollTop,1),Ee.lines.splice(Ee.ybase+Ee.scrollBottom,0,Ee.getBlankLine(this._eraseAttrData()));this._dirtyRowService.markRangeDirty(Ee.scrollTop,Ee.scrollBottom)},pe.prototype.scrollDown=function(ke){for(var Te=ke.params[0]||1,Ee=this._bufferService.buffer;Te--;)Ee.lines.splice(Ee.ybase+Ee.scrollBottom,1),Ee.lines.splice(Ee.ybase+Ee.scrollTop,0,Ee.getBlankLine(b.DEFAULT_ATTR_DATA));this._dirtyRowService.markRangeDirty(Ee.scrollTop,Ee.scrollBottom)},pe.prototype.scrollLeft=function(ke){var Te=this._bufferService.buffer;if(!(Te.y>Te.scrollBottom||Te.y<Te.scrollTop)){for(var Ee=ke.params[0]||1,Oe=Te.scrollTop;Oe<=Te.scrollBottom;++Oe){var je=Te.lines.get(Te.ybase+Oe);je.deleteCells(0,Ee,Te.getNullCell(this._eraseAttrData()),this._eraseAttrData()),je.isWrapped=!1}this._dirtyRowService.markRangeDirty(Te.scrollTop,Te.scrollBottom)}},pe.prototype.scrollRight=function(ke){var Te=this._bufferService.buffer;if(!(Te.y>Te.scrollBottom||Te.y<Te.scrollTop)){for(var Ee=ke.params[0]||1,Oe=Te.scrollTop;Oe<=Te.scrollBottom;++Oe){var je=Te.lines.get(Te.ybase+Oe);je.insertCells(0,Ee,Te.getNullCell(this._eraseAttrData()),this._eraseAttrData()),je.isWrapped=!1}this._dirtyRowService.markRangeDirty(Te.scrollTop,Te.scrollBottom)}},pe.prototype.insertColumns=function(ke){var Te=this._bufferService.buffer;if(!(Te.y>Te.scrollBottom||Te.y<Te.scrollTop)){for(var Ee=ke.params[0]||1,Oe=Te.scrollTop;Oe<=Te.scrollBottom;++Oe){var je=this._bufferService.buffer.lines.get(Te.ybase+Oe);je.insertCells(Te.x,Ee,Te.getNullCell(this._eraseAttrData()),this._eraseAttrData()),je.isWrapped=!1}this._dirtyRowService.markRangeDirty(Te.scrollTop,Te.scrollBottom)}},pe.prototype.deleteColumns=function(ke){var Te=this._bufferService.buffer;if(!(Te.y>Te.scrollBottom||Te.y<Te.scrollTop)){for(var Ee=ke.params[0]||1,Oe=Te.scrollTop;Oe<=Te.scrollBottom;++Oe){var je=Te.lines.get(Te.ybase+Oe);je.deleteCells(Te.x,Ee,Te.getNullCell(this._eraseAttrData()),this._eraseAttrData()),je.isWrapped=!1}this._dirtyRowService.markRangeDirty(Te.scrollTop,Te.scrollBottom)}},pe.prototype.eraseChars=function(ke){this._restrictCursor();var Te=this._bufferService.buffer.lines.get(this._bufferService.buffer.ybase+this._bufferService.buffer.y);Te&&(Te.replaceCells(this._bufferService.buffer.x,this._bufferService.buffer.x+(ke.params[0]||1),this._bufferService.buffer.getNullCell(this._eraseAttrData()),this._eraseAttrData()),this._dirtyRowService.markDirty(this._bufferService.buffer.y))},pe.prototype.repeatPrecedingCharacter=function(ke){if(this._parser.precedingCodepoint){for(var Te=ke.params[0]||1,Ee=new Uint32Array(Te),Oe=0;Oe<Te;++Oe)Ee[Oe]=this._parser.precedingCodepoint;this.print(Ee,0,Ee.length)}},pe.prototype.sendDeviceAttributesPrimary=function(ke){ke.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(se.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(se.C0.ESC+"[?6c"))},pe.prototype.sendDeviceAttributesSecondary=function(ke){ke.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(se.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(se.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(ke.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(se.C0.ESC+"[>83;40003;0c"))},pe.prototype._is=function(ke){return(this._optionsService.options.termName+"").indexOf(ke)===0},pe.prototype.setMode=function(ke){for(var Te=0;Te<ke.length;Te++)switch(ke.params[Te]){case 4:this._coreService.modes.insertMode=!0}},pe.prototype.setModePrivate=function(ke){for(var Te=0;Te<ke.length;Te++)switch(ke.params[Te]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,te.DEFAULT_CHARSET),this._charsetService.setgCharset(1,te.DEFAULT_CHARSET),this._charsetService.setgCharset(2,te.DEFAULT_CHARSET),this._charsetService.setgCharset(3,te.DEFAULT_CHARSET);break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0;break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}},pe.prototype.resetMode=function(ke){for(var Te=0;Te<ke.length;Te++)switch(ke.params[Te]){case 4:this._coreService.modes.insertMode=!1}},pe.prototype.resetModePrivate=function(ke){for(var Te=0;Te<ke.length;Te++)switch(ke.params[Te]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.options.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),ke.params[Te]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}},pe.prototype._updateAttrColor=function(ke,Te,Ee,Oe,je){return Te===2?(ke|=50331648,ke&=-16777216,ke|=ae.AttributeData.fromColorRGB([Ee,Oe,je])):Te===5&&(ke&=-50331904,ke|=33554432|255&Ee),ke},pe.prototype._extractColor=function(ke,Te,Ee){var Oe=[0,0,-1,0,0,0],je=0,Pe=0;do{if(Oe[Pe+je]=ke.params[Te+Pe],ke.hasSubParams(Te+Pe)){var Qe=ke.getSubParams(Te+Pe),Xe=0;do Oe[1]===5&&(je=1),Oe[Pe+Xe+1+je]=Qe[Xe];while(++Xe<Qe.length&&Xe+Pe+1+je<Oe.length);break}if(Oe[1]===5&&Pe+je>=2||Oe[1]===2&&Pe+je>=5)break;Oe[1]&&(je=1)}while(++Pe+Te<ke.length&&Pe+je<Oe.length);for(Xe=2;Xe<Oe.length;++Xe)Oe[Xe]===-1&&(Oe[Xe]=0);switch(Oe[0]){case 38:Ee.fg=this._updateAttrColor(Ee.fg,Oe[1],Oe[3],Oe[4],Oe[5]);break;case 48:Ee.bg=this._updateAttrColor(Ee.bg,Oe[1],Oe[3],Oe[4],Oe[5]);break;case 58:Ee.extended=Ee.extended.clone(),Ee.extended.underlineColor=this._updateAttrColor(Ee.extended.underlineColor,Oe[1],Oe[3],Oe[4],Oe[5])}return Pe},pe.prototype._processUnderline=function(ke,Te){Te.extended=Te.extended.clone(),(!~ke||ke>5)&&(ke=1),Te.extended.underlineStyle=ke,Te.fg|=268435456,ke===0&&(Te.fg&=-268435457),Te.updateExtended()},pe.prototype.charAttributes=function(ke){if(ke.length===1&&ke.params[0]===0)return this._curAttrData.fg=b.DEFAULT_ATTR_DATA.fg,void(this._curAttrData.bg=b.DEFAULT_ATTR_DATA.bg);for(var Te,Ee=ke.length,Oe=this._curAttrData,je=0;je<Ee;je++)(Te=ke.params[je])>=30&&Te<=37?(Oe.fg&=-50331904,Oe.fg|=16777216|Te-30):Te>=40&&Te<=47?(Oe.bg&=-50331904,Oe.bg|=16777216|Te-40):Te>=90&&Te<=97?(Oe.fg&=-50331904,Oe.fg|=16777224|Te-90):Te>=100&&Te<=107?(Oe.bg&=-50331904,Oe.bg|=16777224|Te-100):Te===0?(Oe.fg=b.DEFAULT_ATTR_DATA.fg,Oe.bg=b.DEFAULT_ATTR_DATA.bg):Te===1?Oe.fg|=134217728:Te===3?Oe.bg|=67108864:Te===4?(Oe.fg|=268435456,this._processUnderline(ke.hasSubParams(je)?ke.getSubParams(je)[0]:1,Oe)):Te===5?Oe.fg|=536870912:Te===7?Oe.fg|=67108864:Te===8?Oe.fg|=1073741824:Te===2?Oe.bg|=134217728:Te===21?this._processUnderline(2,Oe):Te===22?(Oe.fg&=-134217729,Oe.bg&=-134217729):Te===23?Oe.bg&=-67108865:Te===24?Oe.fg&=-268435457:Te===25?Oe.fg&=-536870913:Te===27?Oe.fg&=-67108865:Te===28?Oe.fg&=-1073741825:Te===39?(Oe.fg&=-67108864,Oe.fg|=16777215&b.DEFAULT_ATTR_DATA.fg):Te===49?(Oe.bg&=-67108864,Oe.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):Te===38||Te===48||Te===58?je+=this._extractColor(ke,je,Oe):Te===59?(Oe.extended=Oe.extended.clone(),Oe.extended.underlineColor=-1,Oe.updateExtended()):Te===100?(Oe.fg&=-67108864,Oe.fg|=16777215&b.DEFAULT_ATTR_DATA.fg,Oe.bg&=-67108864,Oe.bg|=16777215&b.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",Te)},pe.prototype.deviceStatus=function(ke){switch(ke.params[0]){case 5:this._coreService.triggerDataEvent(se.C0.ESC+"[0n");break;case 6:var Te=this._bufferService.buffer.y+1,Ee=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(se.C0.ESC+"["+Te+";"+Ee+"R")}},pe.prototype.deviceStatusPrivate=function(ke){switch(ke.params[0]){case 6:var Te=this._bufferService.buffer.y+1,Ee=this._bufferService.buffer.x+1;this._coreService.triggerDataEvent(se.C0.ESC+"[?"+Te+";"+Ee+"R")}},pe.prototype.softReset=function(ke){this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._bufferService.buffer.scrollTop=0,this._bufferService.buffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._bufferService.buffer.savedX=0,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1},pe.prototype.setCursorStyle=function(ke){var Te=ke.params[0]||1;switch(Te){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}var Ee=Te%2==1;this._optionsService.options.cursorBlink=Ee},pe.prototype.setScrollRegion=function(ke){var Te,Ee=ke.params[0]||1;(ke.length<2||(Te=ke.params[1])>this._bufferService.rows||Te===0)&&(Te=this._bufferService.rows),Te>Ee&&(this._bufferService.buffer.scrollTop=Ee-1,this._bufferService.buffer.scrollBottom=Te-1,this._setCursor(0,0))},pe.prototype.windowOptions=function(ke){if(me(ke.params[0],this._optionsService.options.windowOptions)){var Te=ke.length>1?ke.params[1]:0;switch(ke.params[0]){case 14:Te!==2&&this._onRequestWindowsOptionsReport.fire(ue.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(ue.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(se.C0.ESC+"[8;"+this._bufferService.rows+";"+this._bufferService.cols+"t");break;case 22:Te!==0&&Te!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),Te!==0&&Te!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:Te!==0&&Te!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),Te!==0&&Te!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}}},pe.prototype.saveCursor=function(ke){this._bufferService.buffer.savedX=this._bufferService.buffer.x,this._bufferService.buffer.savedY=this._bufferService.buffer.ybase+this._bufferService.buffer.y,this._bufferService.buffer.savedCurAttrData.fg=this._curAttrData.fg,this._bufferService.buffer.savedCurAttrData.bg=this._curAttrData.bg,this._bufferService.buffer.savedCharset=this._charsetService.charset},pe.prototype.restoreCursor=function(ke){this._bufferService.buffer.x=this._bufferService.buffer.savedX||0,this._bufferService.buffer.y=Math.max(this._bufferService.buffer.savedY-this._bufferService.buffer.ybase,0),this._curAttrData.fg=this._bufferService.buffer.savedCurAttrData.fg,this._curAttrData.bg=this._bufferService.buffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._bufferService.buffer.savedCharset&&(this._charsetService.charset=this._bufferService.buffer.savedCharset),this._restrictCursor()},pe.prototype.setTitle=function(ke){this._windowTitle=ke,this._onTitleChange.fire(ke)},pe.prototype.setIconName=function(ke){this._iconName=ke},pe.prototype.nextLine=function(){this._bufferService.buffer.x=0,this.index()},pe.prototype.keypadApplicationMode=function(){this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire()},pe.prototype.keypadNumericMode=function(){this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire()},pe.prototype.selectDefaultCharset=function(){this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,te.DEFAULT_CHARSET)},pe.prototype.selectCharset=function(ke){ke.length===2?ke[0]!=="/"&&this._charsetService.setgCharset(ye[ke[0]],te.CHARSETS[ke[1]]||te.DEFAULT_CHARSET):this.selectDefaultCharset()},pe.prototype.index=function(){this._restrictCursor();var ke=this._bufferService.buffer;this._bufferService.buffer.y++,ke.y===ke.scrollBottom+1?(ke.y--,this._onRequestScroll.fire(this._eraseAttrData())):ke.y>=this._bufferService.rows&&(ke.y=this._bufferService.rows-1),this._restrictCursor()},pe.prototype.tabSet=function(){this._bufferService.buffer.tabs[this._bufferService.buffer.x]=!0},pe.prototype.reverseIndex=function(){this._restrictCursor();var ke=this._bufferService.buffer;if(ke.y===ke.scrollTop){var Te=ke.scrollBottom-ke.scrollTop;ke.lines.shiftElements(ke.ybase+ke.y,Te,1),ke.lines.set(ke.ybase+ke.y,ke.getBlankLine(this._eraseAttrData())),this._dirtyRowService.markRangeDirty(ke.scrollTop,ke.scrollBottom)}else ke.y--,this._restrictCursor()},pe.prototype.fullReset=function(){this._parser.reset(),this._onRequestReset.fire()},pe.prototype.reset=function(){this._curAttrData=b.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=b.DEFAULT_ATTR_DATA.clone()},pe.prototype._eraseAttrData=function(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal},pe.prototype.setgLevel=function(ke){this._charsetService.setgLevel(ke)},pe.prototype.screenAlignmentPattern=function(){var ke=new re.CellData;ke.content=1<<22|69,ke.fg=this._curAttrData.fg,ke.bg=this._curAttrData.bg;var Te=this._bufferService.buffer;this._setCursor(0,0);for(var Ee=0;Ee<this._bufferService.rows;++Ee){var Oe=Te.ybase+Te.y+Ee,je=Te.lines.get(Oe);je&&(je.fill(ke),je.isWrapped=!1)}this._dirtyRowService.markAllDirty(),this._setCursor(0,0)},pe}(ee.Disposable);be.InputHandler=_e},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.DEFAULT_CHARSET=be.CHARSETS=void 0,be.CHARSETS={},be.DEFAULT_CHARSET=be.CHARSETS.B,be.CHARSETS[0]={"`":"\u25C6",a:"\u2592",b:"\u2409",c:"\u240C",d:"\u240D",e:"\u240A",f:"\xB0",g:"\xB1",h:"\u2424",i:"\u240B",j:"\u2518",k:"\u2510",l:"\u250C",m:"\u2514",n:"\u253C",o:"\u23BA",p:"\u23BB",q:"\u2500",r:"\u23BC",s:"\u23BD",t:"\u251C",u:"\u2524",v:"\u2534",w:"\u252C",x:"\u2502",y:"\u2264",z:"\u2265","{":"\u03C0","|":"\u2260","}":"\xA3","~":"\xB7"},be.CHARSETS.A={"#":"\xA3"},be.CHARSETS.B=void 0,be.CHARSETS[4]={"#":"\xA3","@":"\xBE","[":"ij","\\":"\xBD","]":"|","{":"\xA8","|":"f","}":"\xBC","~":"\xB4"},be.CHARSETS.C=be.CHARSETS[5]={"[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},be.CHARSETS.R={"#":"\xA3","@":"\xE0","[":"\xB0","\\":"\xE7","]":"\xA7","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xA8"},be.CHARSETS.Q={"@":"\xE0","[":"\xE2","\\":"\xE7","]":"\xEA","^":"\xEE","`":"\xF4","{":"\xE9","|":"\xF9","}":"\xE8","~":"\xFB"},be.CHARSETS.K={"@":"\xA7","[":"\xC4","\\":"\xD6","]":"\xDC","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xDF"},be.CHARSETS.Y={"#":"\xA3","@":"\xA7","[":"\xB0","\\":"\xE7","]":"\xE9","`":"\xF9","{":"\xE0","|":"\xF2","}":"\xE8","~":"\xEC"},be.CHARSETS.E=be.CHARSETS[6]={"@":"\xC4","[":"\xC6","\\":"\xD8","]":"\xC5","^":"\xDC","`":"\xE4","{":"\xE6","|":"\xF8","}":"\xE5","~":"\xFC"},be.CHARSETS.Z={"#":"\xA3","@":"\xA7","[":"\xA1","\\":"\xD1","]":"\xBF","{":"\xB0","|":"\xF1","}":"\xE7"},be.CHARSETS.H=be.CHARSETS[7]={"@":"\xC9","[":"\xC4","\\":"\xD6","]":"\xC5","^":"\xDC","`":"\xE9","{":"\xE4","|":"\xF6","}":"\xE5","~":"\xFC"},be.CHARSETS["="]={"#":"\xF9","@":"\xE0","[":"\xE9","\\":"\xE7","]":"\xEA","^":"\xEE",_:"\xE8","`":"\xF4","{":"\xE4","|":"\xF6","}":"\xFC","~":"\xFB"}},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.Params=void 0;var ie=function(){function Ce(ue,se){if(ue===void 0&&(ue=32),se===void 0&&(se=32),this.maxLength=ue,this.maxSubParamsLength=se,se>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(ue),this.length=0,this._subParams=new Int32Array(se),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(ue),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}return Ce.fromArray=function(ue){var se=new Ce;if(!ue.length)return se;for(var te=ue[0]instanceof Array?1:0;te<ue.length;++te){var le=ue[te];if(le instanceof Array)for(var ee=0;ee<le.length;++ee)se.addSubParam(le[ee]);else se.addParam(le)}return se},Ce.prototype.clone=function(){var ue=new Ce(this.maxLength,this.maxSubParamsLength);return ue.params.set(this.params),ue.length=this.length,ue._subParams.set(this._subParams),ue._subParamsLength=this._subParamsLength,ue._subParamsIdx.set(this._subParamsIdx),ue._rejectDigits=this._rejectDigits,ue._rejectSubDigits=this._rejectSubDigits,ue._digitIsSub=this._digitIsSub,ue},Ce.prototype.toArray=function(){for(var ue=[],se=0;se<this.length;++se){ue.push(this.params[se]);var te=this._subParamsIdx[se]>>8,le=255&this._subParamsIdx[se];le-te>0&&ue.push(Array.prototype.slice.call(this._subParams,te,le))}return ue},Ce.prototype.reset=function(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1},Ce.prototype.addParam=function(ue){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(ue<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=ue>2147483647?2147483647:ue}},Ce.prototype.addSubParam=function(ue){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(ue<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=ue>2147483647?2147483647:ue,this._subParamsIdx[this.length-1]++}},Ce.prototype.hasSubParams=function(ue){return(255&this._subParamsIdx[ue])-(this._subParamsIdx[ue]>>8)>0},Ce.prototype.getSubParams=function(ue){var se=this._subParamsIdx[ue]>>8,te=255&this._subParamsIdx[ue];return te-se>0?this._subParams.subarray(se,te):null},Ce.prototype.getSubParamsAll=function(){for(var ue={},se=0;se<this.length;++se){var te=this._subParamsIdx[se]>>8,le=255&this._subParamsIdx[se];le-te>0&&(ue[se]=this._subParams.slice(te,le))}return ue},Ce.prototype.addDigit=function(ue){var se;if(!(this._rejectDigits||!(se=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)){var te=this._digitIsSub?this._subParams:this.params,le=te[se-1];te[se-1]=~le?Math.min(10*le+ue,2147483647):ue}},Ce}();be.Params=ie},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.OscHandler=be.OscParser=void 0;var ie=ce(23),Ce=ce(8),ue=function(){function te(){this._state=0,this._id=-1,this._handlers=Object.create(null),this._handlerFb=function(){}}return te.prototype.addHandler=function(le,ee){this._handlers[le]===void 0&&(this._handlers[le]=[]);var ne=this._handlers[le];return ne.push(ee),{dispose:function(){var E=ne.indexOf(ee);E!==-1&&ne.splice(E,1)}}},te.prototype.setHandler=function(le,ee){this._handlers[le]=[ee]},te.prototype.clearHandler=function(le){this._handlers[le]&&delete this._handlers[le]},te.prototype.setHandlerFallback=function(le){this._handlerFb=le},te.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},te.prototype.reset=function(){this._state===2&&this.end(!1),this._id=-1,this._state=0},te.prototype._start=function(){var le=this._handlers[this._id];if(le)for(var ee=le.length-1;ee>=0;ee--)le[ee].start();else this._handlerFb(this._id,"START")},te.prototype._put=function(le,ee,ne){var E=this._handlers[this._id];if(E)for(var b=E.length-1;b>=0;b--)E[b].put(le,ee,ne);else this._handlerFb(this._id,"PUT",Ce.utf32ToString(le,ee,ne))},te.prototype._end=function(le){var ee=this._handlers[this._id];if(ee){for(var ne=ee.length-1;ne>=0&&ee[ne].end(le)===!1;ne--);for(ne--;ne>=0;ne--)ee[ne].end(!1)}else this._handlerFb(this._id,"END",le)},te.prototype.start=function(){this.reset(),this._id=-1,this._state=1},te.prototype.put=function(le,ee,ne){if(this._state!==3){if(this._state===1)for(;ee<ne;){var E=le[ee++];if(E===59){this._state=2,this._start();break}if(E<48||57<E)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+E-48}this._state===2&&ne-ee>0&&this._put(le,ee,ne)}},te.prototype.end=function(le){this._state!==0&&(this._state!==3&&(this._state===1&&this._start(),this._end(le)),this._id=-1,this._state=0)},te}();be.OscParser=ue;var se=function(){function te(le){this._handler=le,this._data="",this._hitLimit=!1}return te.prototype.start=function(){this._data="",this._hitLimit=!1},te.prototype.put=function(le,ee,ne){this._hitLimit||(this._data+=Ce.utf32ToString(le,ee,ne),this._data.length>ie.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},te.prototype.end=function(le){var ee;return this._hitLimit?ee=!1:le&&(ee=this._handler(this._data)),this._data="",this._hitLimit=!1,ee},te}();be.OscHandler=se},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.PAYLOAD_LIMIT=void 0,be.PAYLOAD_LIMIT=1e7},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.DcsHandler=be.DcsParser=void 0;var ie=ce(8),Ce=ce(21),ue=ce(23),se=[],te=function(){function ee(){this._handlers=Object.create(null),this._active=se,this._ident=0,this._handlerFb=function(){}}return ee.prototype.dispose=function(){this._handlers=Object.create(null),this._handlerFb=function(){}},ee.prototype.addHandler=function(ne,E){this._handlers[ne]===void 0&&(this._handlers[ne]=[]);var b=this._handlers[ne];return b.push(E),{dispose:function(){var z=b.indexOf(E);z!==-1&&b.splice(z,1)}}},ee.prototype.setHandler=function(ne,E){this._handlers[ne]=[E]},ee.prototype.clearHandler=function(ne){this._handlers[ne]&&delete this._handlers[ne]},ee.prototype.setHandlerFallback=function(ne){this._handlerFb=ne},ee.prototype.reset=function(){this._active.length&&this.unhook(!1),this._active=se,this._ident=0},ee.prototype.hook=function(ne,E){if(this.reset(),this._ident=ne,this._active=this._handlers[ne]||se,this._active.length)for(var b=this._active.length-1;b>=0;b--)this._active[b].hook(E);else this._handlerFb(this._ident,"HOOK",E)},ee.prototype.put=function(ne,E,b){if(this._active.length)for(var z=this._active.length-1;z>=0;z--)this._active[z].put(ne,E,b);else this._handlerFb(this._ident,"PUT",ie.utf32ToString(ne,E,b))},ee.prototype.unhook=function(ne){if(this._active.length){for(var E=this._active.length-1;E>=0&&this._active[E].unhook(ne)===!1;E--);for(E--;E>=0;E--)this._active[E].unhook(!1)}else this._handlerFb(this._ident,"UNHOOK",ne);this._active=se,this._ident=0},ee}();be.DcsParser=te;var le=function(){function ee(ne){this._handler=ne,this._data="",this._hitLimit=!1}return ee.prototype.hook=function(ne){this._params=ne.clone(),this._data="",this._hitLimit=!1},ee.prototype.put=function(ne,E,b){this._hitLimit||(this._data+=ie.utf32ToString(ne,E,b),this._data.length>ue.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))},ee.prototype.unhook=function(ne){var E;return this._hitLimit?E=!1:ne&&(E=this._handler(this._data,this._params||new Ce.Params)),this._params=void 0,this._data="",this._hitLimit=!1,E},ee}();be.DcsHandler=le},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.removeTerminalFromCache=be.acquireCharAtlas=void 0;var ie=ce(26),Ce=ce(43),ue=[];be.acquireCharAtlas=function(se,te,le,ee,ne){for(var E=ie.generateConfig(ee,ne,se,le),b=0;b<ue.length;b++){var z=(x=ue[b]).ownedBy.indexOf(te);if(z>=0){if(ie.configEquals(x.config,E))return x.atlas;x.ownedBy.length===1?(x.atlas.dispose(),ue.splice(b,1)):x.ownedBy.splice(z,1);break}}for(b=0;b<ue.length;b++){var x=ue[b];if(ie.configEquals(x.config,E))return x.ownedBy.push(te),x.atlas}var re={atlas:new Ce.DynamicCharAtlas(document,E),config:E,ownedBy:[te]};return ue.push(re),re.atlas},be.removeTerminalFromCache=function(se){for(var te=0;te<ue.length;te++){var le=ue[te].ownedBy.indexOf(se);if(le!==-1){ue[te].ownedBy.length===1?(ue[te].atlas.dispose(),ue.splice(te,1)):ue[te].ownedBy.splice(le,1);break}}}},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.is256Color=be.configEquals=be.generateConfig=void 0;var ie=ce(3);be.generateConfig=function(Ce,ue,se,te){var le={foreground:te.foreground,background:te.background,cursor:void 0,cursorAccent:void 0,selection:void 0,ansi:te.ansi.slice(0,16)};return{devicePixelRatio:window.devicePixelRatio,scaledCharWidth:Ce,scaledCharHeight:ue,fontFamily:se.fontFamily,fontSize:se.fontSize,fontWeight:se.fontWeight,fontWeightBold:se.fontWeightBold,allowTransparency:se.allowTransparency,colors:le}},be.configEquals=function(Ce,ue){for(var se=0;se<Ce.colors.ansi.length;se++)if(Ce.colors.ansi[se].rgba!==ue.colors.ansi[se].rgba)return!1;return Ce.devicePixelRatio===ue.devicePixelRatio&&Ce.fontFamily===ue.fontFamily&&Ce.fontSize===ue.fontSize&&Ce.fontWeight===ue.fontWeight&&Ce.fontWeightBold===ue.fontWeightBold&&Ce.allowTransparency===ue.allowTransparency&&Ce.scaledCharWidth===ue.scaledCharWidth&&Ce.scaledCharHeight===ue.scaledCharHeight&&Ce.colors.foreground===ue.colors.foreground&&Ce.colors.background===ue.colors.background},be.is256Color=function(Ce){return Ce<ie.DEFAULT_COLOR}},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.ColorManager=be.DEFAULT_ANSI_COLORS=void 0;var ie=ce(10),Ce=ce(45),ue=ie.css.toColor("#ffffff"),se=ie.css.toColor("#000000"),te=ie.css.toColor("#ffffff"),le=ie.css.toColor("#000000"),ee={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};be.DEFAULT_ANSI_COLORS=function(){for(var E=[ie.css.toColor("#2e3436"),ie.css.toColor("#cc0000"),ie.css.toColor("#4e9a06"),ie.css.toColor("#c4a000"),ie.css.toColor("#3465a4"),ie.css.toColor("#75507b"),ie.css.toColor("#06989a"),ie.css.toColor("#d3d7cf"),ie.css.toColor("#555753"),ie.css.toColor("#ef2929"),ie.css.toColor("#8ae234"),ie.css.toColor("#fce94f"),ie.css.toColor("#729fcf"),ie.css.toColor("#ad7fa8"),ie.css.toColor("#34e2e2"),ie.css.toColor("#eeeeec")],b=[0,95,135,175,215,255],z=0;z<216;z++){var x=b[z/36%6|0],re=b[z/6%6|0],ae=b[z%6];E.push({css:ie.channels.toCss(x,re,ae),rgba:ie.channels.toRgba(x,re,ae)})}for(z=0;z<24;z++){var oe=8+10*z;E.push({css:ie.channels.toCss(oe,oe,oe),rgba:ie.channels.toRgba(oe,oe,oe)})}return E}();var ne=function(){function E(b,z){this.allowTransparency=z;var x=b.createElement("canvas");x.width=1,x.height=1;var re=x.getContext("2d");if(!re)throw new Error("Could not get rendering context");this._ctx=re,this._ctx.globalCompositeOperation="copy",this._litmusColor=this._ctx.createLinearGradient(0,0,1,1),this._contrastCache=new Ce.ColorContrastCache,this.colors={foreground:ue,background:se,cursor:te,cursorAccent:le,selectionTransparent:ee,selectionOpaque:ie.color.blend(se,ee),ansi:be.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache}}return E.prototype.onOptionsChange=function(b){b==="minimumContrastRatio"&&this._contrastCache.clear()},E.prototype.setTheme=function(b){b===void 0&&(b={}),this.colors.foreground=this._parseColor(b.foreground,ue),this.colors.background=this._parseColor(b.background,se),this.colors.cursor=this._parseColor(b.cursor,te,!0),this.colors.cursorAccent=this._parseColor(b.cursorAccent,le,!0),this.colors.selectionTransparent=this._parseColor(b.selection,ee,!0),this.colors.selectionOpaque=ie.color.blend(this.colors.background,this.colors.selectionTransparent),ie.color.isOpaque(this.colors.selectionTransparent)&&(this.colors.selectionTransparent=ie.color.opacity(this.colors.selectionTransparent,.3)),this.colors.ansi[0]=this._parseColor(b.black,be.DEFAULT_ANSI_COLORS[0]),this.colors.ansi[1]=this._parseColor(b.red,be.DEFAULT_ANSI_COLORS[1]),this.colors.ansi[2]=this._parseColor(b.green,be.DEFAULT_ANSI_COLORS[2]),this.colors.ansi[3]=this._parseColor(b.yellow,be.DEFAULT_ANSI_COLORS[3]),this.colors.ansi[4]=this._parseColor(b.blue,be.DEFAULT_ANSI_COLORS[4]),this.colors.ansi[5]=this._parseColor(b.magenta,be.DEFAULT_ANSI_COLORS[5]),this.colors.ansi[6]=this._parseColor(b.cyan,be.DEFAULT_ANSI_COLORS[6]),this.colors.ansi[7]=this._parseColor(b.white,be.DEFAULT_ANSI_COLORS[7]),this.colors.ansi[8]=this._parseColor(b.brightBlack,be.DEFAULT_ANSI_COLORS[8]),this.colors.ansi[9]=this._parseColor(b.brightRed,be.DEFAULT_ANSI_COLORS[9]),this.colors.ansi[10]=this._parseColor(b.brightGreen,be.DEFAULT_ANSI_COLORS[10]),this.colors.ansi[11]=this._parseColor(b.brightYellow,be.DEFAULT_ANSI_COLORS[11]),this.colors.ansi[12]=this._parseColor(b.brightBlue,be.DEFAULT_ANSI_COLORS[12]),this.colors.ansi[13]=this._parseColor(b.brightMagenta,be.DEFAULT_ANSI_COLORS[13]),this.colors.ansi[14]=this._parseColor(b.brightCyan,be.DEFAULT_ANSI_COLORS[14]),this.colors.ansi[15]=this._parseColor(b.brightWhite,be.DEFAULT_ANSI_COLORS[15]),this._contrastCache.clear()},E.prototype._parseColor=function(b,z,x){if(x===void 0&&(x=this.allowTransparency),b===void 0)return z;if(this._ctx.fillStyle=this._litmusColor,this._ctx.fillStyle=b,typeof this._ctx.fillStyle!="string")return console.warn("Color: "+b+" is invalid using fallback "+z.css),z;this._ctx.fillRect(0,0,1,1);var re=this._ctx.getImageData(0,0,1,1).data;if(re[3]!==255){if(!x)return console.warn("Color: "+b+" is using transparency, but allowTransparency is false. Using fallback "+z.css+"."),z;var ae=this._ctx.fillStyle.substring(5,this._ctx.fillStyle.length-1).split(",").map(function(_e){return Number(_e)}),oe=ae[0],ve=ae[1],ye=ae[2],me=ae[3],ge=Math.round(255*me);return{rgba:ie.channels.toRgba(oe,ve,ye,ge),css:b}}return{css:this._ctx.fillStyle,rgba:ie.channels.toRgba(re[0],re[1],re[2],re[3])}},E}();be.ColorManager=ne},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.throwIfFalsy=void 0,be.throwIfFalsy=function(ie){if(!ie)throw new Error("value must not be falsy");return ie}},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ne,E){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(b,z){b.__proto__=z}||function(b,z){for(var x in z)z.hasOwnProperty(x)&&(b[x]=z[x])})(ne,E)},function(ne,E){function b(){this.constructor=ne}ie(ne,E),ne.prototype=E===null?Object.create(E):(b.prototype=E.prototype,new b)});Object.defineProperty(be,"__esModule",{value:!0}),be.CharacterJoinerRegistry=be.JoinedCellData=void 0;var ue=ce(6),se=ce(3),te=ce(4),le=function(ne){function E(b,z,x){var re=ne.call(this)||this;return re.content=0,re.combinedData="",re.fg=b.fg,re.bg=b.bg,re.combinedData=z,re._width=x,re}return Ce(E,ne),E.prototype.isCombined=function(){return 2097152},E.prototype.getWidth=function(){return this._width},E.prototype.getChars=function(){return this.combinedData},E.prototype.getCode=function(){return 2097151},E.prototype.setFromCharData=function(b){throw new Error("not implemented")},E.prototype.getAsCharData=function(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]},E}(ue.AttributeData);be.JoinedCellData=le;var ee=function(){function ne(E){this._bufferService=E,this._characterJoiners=[],this._nextCharacterJoinerId=0,this._workCell=new te.CellData}return ne.prototype.registerCharacterJoiner=function(E){var b={id:this._nextCharacterJoinerId++,handler:E};return this._characterJoiners.push(b),b.id},ne.prototype.deregisterCharacterJoiner=function(E){for(var b=0;b<this._characterJoiners.length;b++)if(this._characterJoiners[b].id===E)return this._characterJoiners.splice(b,1),!0;return!1},ne.prototype.getJoinedCharacters=function(E){if(this._characterJoiners.length===0)return[];var b=this._bufferService.buffer.lines.get(E);if(!b||b.length===0)return[];for(var z=[],x=b.translateToString(!0),re=0,ae=0,oe=0,ve=b.getFg(0),ye=b.getBg(0),me=0;me<b.getTrimmedLength();me++)if(b.loadCell(me,this._workCell),this._workCell.getWidth()!==0){if(this._workCell.fg!==ve||this._workCell.bg!==ye){if(me-re>1)for(var ge=this._getJoinedRanges(x,oe,ae,b,re),_e=0;_e<ge.length;_e++)z.push(ge[_e]);re=me,oe=ae,ve=this._workCell.fg,ye=this._workCell.bg}ae+=this._workCell.getChars().length||se.WHITESPACE_CELL_CHAR.length}if(this._bufferService.cols-re>1)for(ge=this._getJoinedRanges(x,oe,ae,b,re),_e=0;_e<ge.length;_e++)z.push(ge[_e]);return z},ne.prototype._getJoinedRanges=function(E,b,z,x,re){for(var ae=E.substring(b,z),oe=this._characterJoiners[0].handler(ae),ve=1;ve<this._characterJoiners.length;ve++)for(var ye=this._characterJoiners[ve].handler(ae),me=0;me<ye.length;me++)ne._mergeRanges(oe,ye[me]);return this._stringRangesToCellRanges(oe,x,re),oe},ne.prototype._stringRangesToCellRanges=function(E,b,z){var x=0,re=!1,ae=0,oe=E[x];if(oe){for(var ve=z;ve<this._bufferService.cols;ve++){var ye=b.getWidth(ve),me=b.getString(ve).length||se.WHITESPACE_CELL_CHAR.length;if(ye!==0){if(!re&&oe[0]<=ae&&(oe[0]=ve,re=!0),oe[1]<=ae){if(oe[1]=ve,!(oe=E[++x]))break;oe[0]<=ae?(oe[0]=ve,re=!0):re=!1}ae+=me}}oe&&(oe[1]=this._bufferService.cols)}},ne._mergeRanges=function(E,b){for(var z=!1,x=0;x<E.length;x++){var re=E[x];if(z){if(b[1]<=re[0])return E[x-1][1]=b[1],E;if(b[1]<=re[1])return E[x-1][1]=Math.max(b[1],re[1]),E.splice(x,1),E;E.splice(x,1),x--}else{if(b[1]<=re[0])return E.splice(x,0,b),E;if(b[1]<=re[1])return re[0]=Math.min(b[0],re[0]),E;b[0]<re[1]&&(re[0]=Math.min(b[0],re[0]),z=!0)}}return z?E[E.length-1][1]=b[1]:E.push(b),E},ne}();be.CharacterJoinerRegistry=ee},function(Dt,be,ce){"use strict";function ie(Ce,ue){var se=ue.getBoundingClientRect();return[Ce.clientX-se.left,Ce.clientY-se.top]}Object.defineProperty(be,"__esModule",{value:!0}),be.getRawByteCoords=be.getCoords=be.getCoordsRelativeToElement=void 0,be.getCoordsRelativeToElement=ie,be.getCoords=function(Ce,ue,se,te,le,ee,ne,E){if(le){var b=ie(Ce,ue);if(b)return b[0]=Math.ceil((b[0]+(E?ee/2:0))/ee),b[1]=Math.ceil(b[1]/ne),b[0]=Math.min(Math.max(b[0],1),se+(E?1:0)),b[1]=Math.min(Math.max(b[1],1),te),b}},be.getRawByteCoords=function(Ce){if(Ce)return{x:Ce[0]+32,y:Ce[1]+32}}},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.RenderDebouncer=void 0;var ie=function(){function Ce(ue){this._renderCallback=ue}return Ce.prototype.dispose=function(){this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},Ce.prototype.refresh=function(ue,se,te){var le=this;this._rowCount=te,ue=ue!==void 0?ue:0,se=se!==void 0?se:this._rowCount-1,this._rowStart=this._rowStart!==void 0?Math.min(this._rowStart,ue):ue,this._rowEnd=this._rowEnd!==void 0?Math.max(this._rowEnd,se):se,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){return le._innerRefresh()}))},Ce.prototype._innerRefresh=function(){if(this._rowStart!==void 0&&this._rowEnd!==void 0&&this._rowCount!==void 0){var ue=Math.max(this._rowStart,0),se=Math.min(this._rowEnd,this._rowCount-1);this._rowStart=void 0,this._rowEnd=void 0,this._animationFrame=void 0,this._renderCallback(ue,se)}},Ce}();be.RenderDebouncer=ie},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(se,te){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,ee){le.__proto__=ee}||function(le,ee){for(var ne in ee)ee.hasOwnProperty(ne)&&(le[ne]=ee[ne])})(se,te)},function(se,te){function le(){this.constructor=se}ie(se,te),se.prototype=te===null?Object.create(te):(le.prototype=te.prototype,new le)});Object.defineProperty(be,"__esModule",{value:!0}),be.ScreenDprMonitor=void 0;var ue=function(se){function te(){var le=se!==null&&se.apply(this,arguments)||this;return le._currentDevicePixelRatio=window.devicePixelRatio,le}return Ce(te,se),te.prototype.setListener=function(le){var ee=this;this._listener&&this.clearListener(),this._listener=le,this._outerListener=function(){ee._listener&&(ee._listener(window.devicePixelRatio,ee._currentDevicePixelRatio),ee._updateDpr())},this._updateDpr()},te.prototype.dispose=function(){se.prototype.dispose.call(this),this.clearListener()},te.prototype._updateDpr=function(){var le;this._outerListener&&((le=this._resolutionMediaMatchList)===null||le===void 0||le.removeListener(this._outerListener),this._currentDevicePixelRatio=window.devicePixelRatio,this._resolutionMediaMatchList=window.matchMedia("screen and (resolution: "+window.devicePixelRatio+"dppx)"),this._resolutionMediaMatchList.addListener(this._outerListener))},te.prototype.clearListener=function(){this._resolutionMediaMatchList&&this._listener&&this._outerListener&&(this._resolutionMediaMatchList.removeListener(this._outerListener),this._resolutionMediaMatchList=void 0,this._listener=void 0,this._outerListener=void 0)},te}(ce(2).Disposable);be.ScreenDprMonitor=ue},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.clone=void 0,be.clone=function ie(Ce,ue){if(ue===void 0&&(ue=5),typeof Ce!="object")return Ce;var se=Array.isArray(Ce)?[]:{};for(var te in Ce)se[te]=ue<=1?Ce[te]:Ce[te]?ie(Ce[te],ue-1):Ce[te];return se}},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.Terminal=void 0;var ie=ce(4),Ce=ce(35),ue=ce(18),se=ce(0),te=ce(83),le=function(){function x(re){this._core=new Ce.Terminal(re),this._addonManager=new te.AddonManager}return x.prototype._checkProposedApi=function(){if(!this._core.optionsService.options.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")},Object.defineProperty(x.prototype,"onCursorMove",{get:function(){return this._core.onCursorMove},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onLineFeed",{get:function(){return this._core.onLineFeed},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onSelectionChange",{get:function(){return this._core.onSelectionChange},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onData",{get:function(){return this._core.onData},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onBinary",{get:function(){return this._core.onBinary},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onTitleChange",{get:function(){return this._core.onTitleChange},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onScroll",{get:function(){return this._core.onScroll},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onKey",{get:function(){return this._core.onKey},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onRender",{get:function(){return this._core.onRender},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"onResize",{get:function(){return this._core.onResize},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"element",{get:function(){return this._core.element},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"parser",{get:function(){return this._checkProposedApi(),this._parser||(this._parser=new b(this._core)),this._parser},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"unicode",{get:function(){return this._checkProposedApi(),new z(this._core)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"textarea",{get:function(){return this._core.textarea},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"rows",{get:function(){return this._core.rows},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"cols",{get:function(){return this._core.cols},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"buffer",{get:function(){return this._checkProposedApi(),new ne(this._core.buffers)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"markers",{get:function(){return this._checkProposedApi(),this._core.markers},enumerable:!1,configurable:!0}),x.prototype.blur=function(){this._core.blur()},x.prototype.focus=function(){this._core.focus()},x.prototype.resize=function(re,ae){this._verifyIntegers(re,ae),this._core.resize(re,ae)},x.prototype.open=function(re){this._core.open(re)},x.prototype.attachCustomKeyEventHandler=function(re){this._core.attachCustomKeyEventHandler(re)},x.prototype.registerLinkMatcher=function(re,ae,oe){return this._checkProposedApi(),this._core.registerLinkMatcher(re,ae,oe)},x.prototype.deregisterLinkMatcher=function(re){this._checkProposedApi(),this._core.deregisterLinkMatcher(re)},x.prototype.registerLinkProvider=function(re){return this._checkProposedApi(),this._core.registerLinkProvider(re)},x.prototype.registerCharacterJoiner=function(re){return this._checkProposedApi(),this._core.registerCharacterJoiner(re)},x.prototype.deregisterCharacterJoiner=function(re){this._checkProposedApi(),this._core.deregisterCharacterJoiner(re)},x.prototype.registerMarker=function(re){return this._checkProposedApi(),this._verifyIntegers(re),this._core.addMarker(re)},x.prototype.addMarker=function(re){return this.registerMarker(re)},x.prototype.hasSelection=function(){return this._core.hasSelection()},x.prototype.select=function(re,ae,oe){this._verifyIntegers(re,ae,oe),this._core.select(re,ae,oe)},x.prototype.getSelection=function(){return this._core.getSelection()},x.prototype.getSelectionPosition=function(){return this._core.getSelectionPosition()},x.prototype.clearSelection=function(){this._core.clearSelection()},x.prototype.selectAll=function(){this._core.selectAll()},x.prototype.selectLines=function(re,ae){this._verifyIntegers(re,ae),this._core.selectLines(re,ae)},x.prototype.dispose=function(){this._addonManager.dispose(),this._core.dispose()},x.prototype.scrollLines=function(re){this._verifyIntegers(re),this._core.scrollLines(re)},x.prototype.scrollPages=function(re){this._verifyIntegers(re),this._core.scrollPages(re)},x.prototype.scrollToTop=function(){this._core.scrollToTop()},x.prototype.scrollToBottom=function(){this._core.scrollToBottom()},x.prototype.scrollToLine=function(re){this._verifyIntegers(re),this._core.scrollToLine(re)},x.prototype.clear=function(){this._core.clear()},x.prototype.write=function(re,ae){this._core.write(re,ae)},x.prototype.writeUtf8=function(re,ae){this._core.write(re,ae)},x.prototype.writeln=function(re,ae){this._core.write(re),this._core.write(`\r
|
|
|
`,ae)},x.prototype.paste=function(re){this._core.paste(re)},x.prototype.getOption=function(re){return this._core.optionsService.getOption(re)},x.prototype.setOption=function(re,ae){this._core.optionsService.setOption(re,ae)},x.prototype.refresh=function(re,ae){this._verifyIntegers(re,ae),this._core.refresh(re,ae)},x.prototype.reset=function(){this._core.reset()},x.prototype.loadAddon=function(re){return this._addonManager.loadAddon(this,re)},Object.defineProperty(x,"strings",{get:function(){return ue},enumerable:!1,configurable:!0}),x.prototype._verifyIntegers=function(){for(var re=[],ae=0;ae<arguments.length;ae++)re[ae]=arguments[ae];for(var oe=0,ve=re;oe<ve.length;oe++){var ye=ve[oe];if(ye===1/0||isNaN(ye)||ye%1!=0)throw new Error("This API only accepts integers")}},x}();be.Terminal=le;var ee=function(){function x(re,ae){this._buffer=re,this.type=ae}return x.prototype.init=function(re){return this._buffer=re,this},Object.defineProperty(x.prototype,"cursorY",{get:function(){return this._buffer.y},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"cursorX",{get:function(){return this._buffer.x},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"viewportY",{get:function(){return this._buffer.ydisp},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"baseY",{get:function(){return this._buffer.ybase},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"length",{get:function(){return this._buffer.lines.length},enumerable:!1,configurable:!0}),x.prototype.getLine=function(re){var ae=this._buffer.lines.get(re);if(ae)return new E(ae)},x.prototype.getNullCell=function(){return new ie.CellData},x}(),ne=function(){function x(re){var ae=this;this._buffers=re,this._onBufferChange=new se.EventEmitter,this._normal=new ee(this._buffers.normal,"normal"),this._alternate=new ee(this._buffers.alt,"alternate"),this._buffers.onBufferActivate(function(){return ae._onBufferChange.fire(ae.active)})}return Object.defineProperty(x.prototype,"onBufferChange",{get:function(){return this._onBufferChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"active",{get:function(){if(this._buffers.active===this._buffers.normal)return this.normal;if(this._buffers.active===this._buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"normal",{get:function(){return this._normal.init(this._buffers.normal)},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"alternate",{get:function(){return this._alternate.init(this._buffers.alt)},enumerable:!1,configurable:!0}),x}(),E=function(){function x(re){this._line=re}return Object.defineProperty(x.prototype,"isWrapped",{get:function(){return this._line.isWrapped},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"length",{get:function(){return this._line.length},enumerable:!1,configurable:!0}),x.prototype.getCell=function(re,ae){if(!(re<0||re>=this._line.length))return ae?(this._line.loadCell(re,ae),ae):this._line.loadCell(re,new ie.CellData)},x.prototype.translateToString=function(re,ae,oe){return this._line.translateToString(re,ae,oe)},x}(),b=function(){function x(re){this._core=re}return x.prototype.registerCsiHandler=function(re,ae){return this._core.addCsiHandler(re,function(oe){return ae(oe.toArray())})},x.prototype.addCsiHandler=function(re,ae){return this.registerCsiHandler(re,ae)},x.prototype.registerDcsHandler=function(re,ae){return this._core.addDcsHandler(re,function(oe,ve){return ae(oe,ve.toArray())})},x.prototype.addDcsHandler=function(re,ae){return this.registerDcsHandler(re,ae)},x.prototype.registerEscHandler=function(re,ae){return this._core.addEscHandler(re,ae)},x.prototype.addEscHandler=function(re,ae){return this.registerEscHandler(re,ae)},x.prototype.registerOscHandler=function(re,ae){return this._core.addOscHandler(re,ae)},x.prototype.addOscHandler=function(re,ae){return this.registerOscHandler(re,ae)},x}(),z=function(){function x(re){this._core=re}return x.prototype.register=function(re){this._core.unicodeService.register(re)},Object.defineProperty(x.prototype,"versions",{get:function(){return this._core.unicodeService.versions},enumerable:!1,configurable:!0}),Object.defineProperty(x.prototype,"activeVersion",{get:function(){return this._core.unicodeService.activeVersion},set:function(re){this._core.unicodeService.activeVersion=re},enumerable:!1,configurable:!0}),x}()},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ot,He){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(rt,Ye){rt.__proto__=Ye}||function(rt,Ye){for(var ut in Ye)Ye.hasOwnProperty(ut)&&(rt[ut]=Ye[ut])})(ot,He)},function(ot,He){function rt(){this.constructor=ot}ie(ot,He),ot.prototype=He===null?Object.create(He):(rt.prototype=He.prototype,new rt)});Object.defineProperty(be,"__esModule",{value:!0}),be.Terminal=void 0;var ue=ce(36),se=ce(37),te=ce(38),le=ce(12),ee=ce(19),ne=ce(40),E=ce(50),b=ce(51),z=ce(11),x=ce(7),re=ce(18),ae=ce(54),oe=ce(55),ve=ce(56),ye=ce(57),me=ce(59),ge=ce(0),_e=ce(16),he=ce(27),pe=ce(60),ke=ce(5),Te=ce(61),Ee=ce(62),Oe=ce(63),je=ce(64),Pe=ce(65),Qe=typeof window!="undefined"?window.document:null,Xe=function(ot){function He(rt){rt===void 0&&(rt={});var Ye=ot.call(this,rt)||this;return Ye.browser=z,Ye._keyDownHandled=!1,Ye._onCursorMove=new ge.EventEmitter,Ye._onKey=new ge.EventEmitter,Ye._onRender=new ge.EventEmitter,Ye._onSelectionChange=new ge.EventEmitter,Ye._onTitleChange=new ge.EventEmitter,Ye._onFocus=new ge.EventEmitter,Ye._onBlur=new ge.EventEmitter,Ye._onA11yCharEmitter=new ge.EventEmitter,Ye._onA11yTabEmitter=new ge.EventEmitter,Ye._setup(),Ye.linkifier=Ye._instantiationService.createInstance(E.Linkifier),Ye.linkifier2=Ye.register(Ye._instantiationService.createInstance(Oe.Linkifier2)),Ye.register(Ye._inputHandler.onRequestBell(function(){return Ye.bell()})),Ye.register(Ye._inputHandler.onRequestRefreshRows(function(ut,Ge){return Ye.refresh(ut,Ge)})),Ye.register(Ye._inputHandler.onRequestReset(function(){return Ye.reset()})),Ye.register(Ye._inputHandler.onRequestScroll(function(ut,Ge){return Ye.scroll(ut,Ge||void 0)})),Ye.register(Ye._inputHandler.onRequestWindowsOptionsReport(function(ut){return Ye._reportWindowsOptions(ut)})),Ye.register(ge.forwardEvent(Ye._inputHandler.onCursorMove,Ye._onCursorMove)),Ye.register(ge.forwardEvent(Ye._inputHandler.onTitleChange,Ye._onTitleChange)),Ye.register(ge.forwardEvent(Ye._inputHandler.onA11yChar,Ye._onA11yCharEmitter)),Ye.register(ge.forwardEvent(Ye._inputHandler.onA11yTab,Ye._onA11yTabEmitter)),Ye.register(Ye._bufferService.onResize(function(ut){return Ye._afterResize(ut.cols,ut.rows)})),Ye}return Ce(He,ot),Object.defineProperty(He.prototype,"options",{get:function(){return this.optionsService.options},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onCursorMove",{get:function(){return this._onCursorMove.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onKey",{get:function(){return this._onKey.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onRender",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onTitleChange",{get:function(){return this._onTitleChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onFocus",{get:function(){return this._onFocus.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onBlur",{get:function(){return this._onBlur.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onA11yChar",{get:function(){return this._onA11yCharEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(He.prototype,"onA11yTab",{get:function(){return this._onA11yTabEmitter.event},enumerable:!1,configurable:!0}),He.prototype.dispose=function(){var rt,Ye,ut;this._isDisposed||(ot.prototype.dispose.call(this),(rt=this._renderService)===null||rt===void 0||rt.dispose(),this._customKeyEventHandler=void 0,this.write=function(){},(ut=(Ye=this.element)===null||Ye===void 0?void 0:Ye.parentNode)===null||ut===void 0||ut.removeChild(this.element))},He.prototype._setup=function(){ot.prototype._setup.call(this),this._customKeyEventHandler=void 0},Object.defineProperty(He.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),He.prototype.focus=function(){this.textarea&&this.textarea.focus({preventScroll:!0})},He.prototype._updateOptions=function(rt){var Ye,ut,Ge,ze;switch(ot.prototype._updateOptions.call(this,rt),rt){case"fontFamily":case"fontSize":(Ye=this._renderService)===null||Ye===void 0||Ye.clear(),(ut=this._charSizeService)===null||ut===void 0||ut.measure();break;case"cursorBlink":case"cursorStyle":this.refresh(this.buffer.y,this.buffer.y);break;case"drawBoldTextInBrightColors":case"letterSpacing":case"lineHeight":case"fontWeight":case"fontWeightBold":case"minimumContrastRatio":this._renderService&&(this._renderService.clear(),this._renderService.onResize(this.cols,this.rows),this.refresh(0,this.rows-1));break;case"rendererType":this._renderService&&(this._renderService.setRenderer(this._createRenderer()),this._renderService.onResize(this.cols,this.rows));break;case"scrollback":(Ge=this.viewport)===null||Ge===void 0||Ge.syncScrollArea();break;case"screenReaderMode":this.optionsService.options.screenReaderMode?!this._accessibilityManager&&this._renderService&&(this._accessibilityManager=new ve.AccessibilityManager(this,this._renderService)):((ze=this._accessibilityManager)===null||ze===void 0||ze.dispose(),this._accessibilityManager=void 0);break;case"tabStopWidth":this.buffers.setupTabStops();break;case"theme":this._setTheme(this.optionsService.options.theme)}},He.prototype._onTextAreaFocus=function(rt){this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(le.C0.ESC+"[I"),this.updateCursorStyle(rt),this.element.classList.add("focus"),this._showCursor(),this._onFocus.fire()},He.prototype.blur=function(){var rt;return(rt=this.textarea)===null||rt===void 0?void 0:rt.blur()},He.prototype._onTextAreaBlur=function(){this.textarea.value="",this.refresh(this.buffer.y,this.buffer.y),this._coreService.decPrivateModes.sendFocus&&this._coreService.triggerDataEvent(le.C0.ESC+"[O"),this.element.classList.remove("focus"),this._onBlur.fire()},He.prototype._syncTextArea=function(){if(this.textarea&&this.buffer.isCursorInViewport&&!this._compositionHelper.isComposing){var rt=Math.ceil(this._charSizeService.height*this.optionsService.options.lineHeight),Ye=this._bufferService.buffer.y*rt,ut=this._bufferService.buffer.x*this._charSizeService.width;this.textarea.style.left=ut+"px",this.textarea.style.top=Ye+"px",this.textarea.style.width=this._charSizeService.width+"px",this.textarea.style.height=rt+"px",this.textarea.style.lineHeight=rt+"px",this.textarea.style.zIndex="-5"}},He.prototype._initGlobal=function(){var rt=this;this._bindKeys(),this.register(x.addDisposableDomListener(this.element,"copy",function(ut){rt.hasSelection()&&te.copyHandler(ut,rt._selectionService)}));var Ye=function(ut){return te.handlePasteEvent(ut,rt.textarea,rt._coreService)};this.register(x.addDisposableDomListener(this.textarea,"paste",Ye)),this.register(x.addDisposableDomListener(this.element,"paste",Ye)),z.isFirefox?this.register(x.addDisposableDomListener(this.element,"mousedown",function(ut){ut.button===2&&te.rightClickHandler(ut,rt.textarea,rt.screenElement,rt._selectionService,rt.options.rightClickSelectsWord)})):this.register(x.addDisposableDomListener(this.element,"contextmenu",function(ut){te.rightClickHandler(ut,rt.textarea,rt.screenElement,rt._selectionService,rt.options.rightClickSelectsWord)})),z.isLinux&&this.register(x.addDisposableDomListener(this.element,"auxclick",function(ut){ut.button===1&&te.moveTextAreaUnderMouseCursor(ut,rt.textarea,rt.screenElement)}))},He.prototype._bindKeys=function(){var rt=this;this.register(x.addDisposableDomListener(this.textarea,"keyup",function(Ye){return rt._keyUp(Ye)},!0)),this.register(x.addDisposableDomListener(this.textarea,"keydown",function(Ye){return rt._keyDown(Ye)},!0)),this.register(x.addDisposableDomListener(this.textarea,"keypress",function(Ye){return rt._keyPress(Ye)},!0)),this.register(x.addDisposableDomListener(this.textarea,"compositionstart",function(){return rt._compositionHelper.compositionstart()})),this.register(x.addDisposableDomListener(this.textarea,"compositionupdate",function(Ye){return rt._compositionHelper.compositionupdate(Ye)})),this.register(x.addDisposableDomListener(this.textarea,"compositionend",function(){return rt._compositionHelper.compositionend()})),this.register(this.onRender(function(){return rt._compositionHelper.updateCompositionElements()})),this.register(this.onRender(function(Ye){return rt._queueLinkification(Ye.start,Ye.end)}))},He.prototype.open=function(rt){var Ye=this;if(!rt)throw new Error("Terminal requires a parent element.");Qe.body.contains(rt)||this._logService.debug("Terminal.open was called on an element that was not attached to the DOM"),this._document=rt.ownerDocument,this.element=this._document.createElement("div"),this.element.dir="ltr",this.element.classList.add("terminal"),this.element.classList.add("xterm"),this.element.setAttribute("tabindex","0"),rt.appendChild(this.element);var ut=Qe.createDocumentFragment();this._viewportElement=Qe.createElement("div"),this._viewportElement.classList.add("xterm-viewport"),ut.appendChild(this._viewportElement),this._viewportScrollArea=Qe.createElement("div"),this._viewportScrollArea.classList.add("xterm-scroll-area"),this._viewportElement.appendChild(this._viewportScrollArea),this.screenElement=Qe.createElement("div"),this.screenElement.classList.add("xterm-screen"),this._helperContainer=Qe.createElement("div"),this._helperContainer.classList.add("xterm-helpers"),this.screenElement.appendChild(this._helperContainer),ut.appendChild(this.screenElement),this.textarea=Qe.createElement("textarea"),this.textarea.classList.add("xterm-helper-textarea"),this.textarea.setAttribute("aria-label",re.promptLabel),this.textarea.setAttribute("aria-multiline","false"),this.textarea.setAttribute("autocorrect","off"),this.textarea.setAttribute("autocapitalize","off"),this.textarea.setAttribute("spellcheck","false"),this.textarea.tabIndex=0,this.register(x.addDisposableDomListener(this.textarea,"focus",function(Ve){return Ye._onTextAreaFocus(Ve)})),this.register(x.addDisposableDomListener(this.textarea,"blur",function(){return Ye._onTextAreaBlur()})),this._helperContainer.appendChild(this.textarea);var Ge=this._instantiationService.createInstance(je.CoreBrowserService,this.textarea);this._instantiationService.setService(ke.ICoreBrowserService,Ge),this._charSizeService=this._instantiationService.createInstance(Te.CharSizeService,this._document,this._helperContainer),this._instantiationService.setService(ke.ICharSizeService,this._charSizeService),this._compositionView=Qe.createElement("div"),this._compositionView.classList.add("composition-view"),this._compositionHelper=this._instantiationService.createInstance(ue.CompositionHelper,this.textarea,this._compositionView),this._helperContainer.appendChild(this._compositionView),this.element.appendChild(ut),this._theme=this.options.theme||this._theme,this._colorManager=new he.ColorManager(Qe,this.options.allowTransparency),this.register(this.optionsService.onOptionChange(function(Ve){return Ye._colorManager.onOptionsChange(Ve)})),this._colorManager.setTheme(this._theme);var ze=this._createRenderer();this._renderService=this.register(this._instantiationService.createInstance(pe.RenderService,ze,this.rows,this.screenElement)),this._instantiationService.setService(ke.IRenderService,this._renderService),this.register(this._renderService.onRenderedBufferChange(function(Ve){return Ye._onRender.fire(Ve)})),this.onResize(function(Ve){return Ye._renderService.resize(Ve.cols,Ve.rows)}),this._soundService=this._instantiationService.createInstance(ae.SoundService),this._instantiationService.setService(ke.ISoundService,this._soundService),this._mouseService=this._instantiationService.createInstance(Ee.MouseService),this._instantiationService.setService(ke.IMouseService,this._mouseService),this.viewport=this._instantiationService.createInstance(se.Viewport,function(Ve,$e){return Ye.scrollLines(Ve,$e)},this._viewportElement,this._viewportScrollArea),this.viewport.onThemeChange(this._colorManager.colors),this.register(this._inputHandler.onRequestSyncScrollBar(function(){return Ye.viewport.syncScrollArea()})),this.register(this.viewport),this.register(this.onCursorMove(function(){Ye._renderService.onCursorMove(),Ye._syncTextArea()})),this.register(this.onResize(function(){return Ye._renderService.onResize(Ye.cols,Ye.rows)})),this.register(this.onBlur(function(){return Ye._renderService.onBlur()})),this.register(this.onFocus(function(){return Ye._renderService.onFocus()})),this.register(this._renderService.onDimensionsChange(function(){return Ye.viewport.syncScrollArea()})),this._selectionService=this.register(this._instantiationService.createInstance(b.SelectionService,this.element,this.screenElement)),this._instantiationService.setService(ke.ISelectionService,this._selectionService),this.register(this._selectionService.onRequestScrollLines(function(Ve){return Ye.scrollLines(Ve.amount,Ve.suppressScrollEvent)})),this.register(this._selectionService.onSelectionChange(function(){return Ye._onSelectionChange.fire()})),this.register(this._selectionService.onRequestRedraw(function(Ve){return Ye._renderService.onSelectionChanged(Ve.start,Ve.end,Ve.columnSelectMode)})),this.register(this._selectionService.onLinuxMouseSelection(function(Ve){Ye.textarea.value=Ve,Ye.textarea.focus(),Ye.textarea.select()})),this.register(this.onScroll(function(){Ye.viewport.syncScrollArea(),Ye._selectionService.refresh()})),this.register(x.addDisposableDomListener(this._viewportElement,"scroll",function(){return Ye._selectionService.refresh()})),this._mouseZoneManager=this._instantiationService.createInstance(oe.MouseZoneManager,this.element,this.screenElement),this.register(this._mouseZoneManager),this.register(this.onScroll(function(){return Ye._mouseZoneManager.clearAll()})),this.linkifier.attachToDom(this.element,this._mouseZoneManager),this.linkifier2.attachToDom(this.element,this._mouseService,this._renderService),this.register(x.addDisposableDomListener(this.element,"mousedown",function(Ve){return Ye._selectionService.onMouseDown(Ve)})),this._coreMouseService.areMouseEventsActive?(this._selectionService.disable(),this.element.classList.add("enable-mouse-events")):this._selectionService.enable(),this.options.screenReaderMode&&(this._accessibilityManager=new ve.AccessibilityManager(this,this._renderService)),this._charSizeService.measure(),this.refresh(0,this.rows-1),this._initGlobal(),this.bindMouse()},He.prototype._createRenderer=function(){switch(this.options.rendererType){case"canvas":return this._instantiationService.createInstance(ne.Renderer,this._colorManager.colors,this.screenElement,this.linkifier,this.linkifier2);case"dom":return this._instantiationService.createInstance(ye.DomRenderer,this._colorManager.colors,this.element,this.screenElement,this._viewportElement,this.linkifier,this.linkifier2);default:throw new Error('Unrecognized rendererType "'+this.options.rendererType+'"')}},He.prototype._setTheme=function(rt){var Ye,ut,Ge;this._theme=rt,(Ye=this._colorManager)===null||Ye===void 0||Ye.setTheme(rt),(ut=this._renderService)===null||ut===void 0||ut.setColors(this._colorManager.colors),(Ge=this.viewport)===null||Ge===void 0||Ge.onThemeChange(this._colorManager.colors)},He.prototype.bindMouse=function(){var rt=this,Ye=this,ut=this.element;function Ge(pt){var ct,It,dt=Ye._mouseService.getRawByteCoords(pt,Ye.screenElement,Ye.cols,Ye.rows);if(!dt)return!1;switch(pt.overrideType||pt.type){case"mousemove":It=32,pt.buttons===void 0?(ct=3,pt.button!==void 0&&(ct=pt.button<3?pt.button:3)):ct=1&pt.buttons?0:4&pt.buttons?1:2&pt.buttons?2:3;break;case"mouseup":It=0,ct=pt.button<3?pt.button:3;break;case"mousedown":It=1,ct=pt.button<3?pt.button:3;break;case"wheel":pt.deltaY!==0&&(It=pt.deltaY<0?0:1),ct=4;break;default:return!1}return!(It===void 0||ct===void 0||ct>4)&&Ye._coreMouseService.triggerMouseEvent({col:dt.x-33,row:dt.y-33,button:ct,action:It,ctrl:pt.ctrlKey,alt:pt.altKey,shift:pt.shiftKey})}var ze={mouseup:null,wheel:null,mousedrag:null,mousemove:null},Ve=function(pt){return Ge(pt),pt.buttons||(rt._document.removeEventListener("mouseup",ze.mouseup),ze.mousedrag&&rt._document.removeEventListener("mousemove",ze.mousedrag)),rt.cancel(pt)},$e=function(pt){return Ge(pt),pt.preventDefault(),rt.cancel(pt)},nt=function(pt){pt.buttons&&Ge(pt)},et=function(pt){pt.buttons||Ge(pt)};this.register(this._coreMouseService.onProtocolChange(function(pt){pt?(rt.optionsService.options.logLevel==="debug"&&rt._logService.debug("Binding to mouse events:",rt._coreMouseService.explainEvents(pt)),rt.element.classList.add("enable-mouse-events"),rt._selectionService.disable()):(rt._logService.debug("Unbinding from mouse events."),rt.element.classList.remove("enable-mouse-events"),rt._selectionService.enable()),8&pt?ze.mousemove||(ut.addEventListener("mousemove",et),ze.mousemove=et):(ut.removeEventListener("mousemove",ze.mousemove),ze.mousemove=null),16&pt?ze.wheel||(ut.addEventListener("wheel",$e,{passive:!1}),ze.wheel=$e):(ut.removeEventListener("wheel",ze.wheel),ze.wheel=null),2&pt?ze.mouseup||(ze.mouseup=Ve):(rt._document.removeEventListener("mouseup",ze.mouseup),ze.mouseup=null),4&pt?ze.mousedrag||(ze.mousedrag=nt):(rt._document.removeEventListener("mousemove",ze.mousedrag),ze.mousedrag=null)})),this._coreMouseService.activeProtocol=this._coreMouseService.activeProtocol,this.register(x.addDisposableDomListener(ut,"mousedown",function(pt){if(pt.preventDefault(),rt.focus(),rt._coreMouseService.areMouseEventsActive&&!rt._selectionService.shouldForceSelection(pt))return Ge(pt),ze.mouseup&&rt._document.addEventListener("mouseup",ze.mouseup),ze.mousedrag&&rt._document.addEventListener("mousemove",ze.mousedrag),rt.cancel(pt)})),this.register(x.addDisposableDomListener(ut,"wheel",function(pt){if(!ze.wheel){if(!rt.buffer.hasScrollback){var ct=rt.viewport.getLinesScrolled(pt);if(ct===0)return;for(var It=le.C0.ESC+(rt._coreService.decPrivateModes.applicationCursorKeys?"O":"[")+(pt.deltaY<0?"A":"B"),dt="",Mt=0;Mt<Math.abs(ct);Mt++)dt+=It;rt._coreService.triggerDataEvent(dt,!0)}}},{passive:!0})),this.register(x.addDisposableDomListener(ut,"wheel",function(pt){if(!ze.wheel)return rt.viewport.onWheel(pt)?void 0:rt.cancel(pt)},{passive:!1})),this.register(x.addDisposableDomListener(ut,"touchstart",function(pt){if(!rt._coreMouseService.areMouseEventsActive)return rt.viewport.onTouchStart(pt),rt.cancel(pt)},{passive:!0})),this.register(x.addDisposableDomListener(ut,"touchmove",function(pt){if(!rt._coreMouseService.areMouseEventsActive)return rt.viewport.onTouchMove(pt)?void 0:rt.cancel(pt)},{passive:!1}))},He.prototype.refresh=function(rt,Ye){var ut;(ut=this._renderService)===null||ut===void 0||ut.refreshRows(rt,Ye)},He.prototype._queueLinkification=function(rt,Ye){var ut;(ut=this.linkifier)===null||ut===void 0||ut.linkifyRows(rt,Ye)},He.prototype.updateCursorStyle=function(rt){this._selectionService&&this._selectionService.shouldColumnSelect(rt)?this.element.classList.add("column-select"):this.element.classList.remove("column-select")},He.prototype._showCursor=function(){this._coreService.isCursorInitialized||(this._coreService.isCursorInitialized=!0,this.refresh(this.buffer.y,this.buffer.y))},He.prototype.scrollLines=function(rt,Ye){ot.prototype.scrollLines.call(this,rt,Ye),this.refresh(0,this.rows-1)},He.prototype.paste=function(rt){te.paste(rt,this.textarea,this._coreService)},He.prototype.attachCustomKeyEventHandler=function(rt){this._customKeyEventHandler=rt},He.prototype.registerLinkMatcher=function(rt,Ye,ut){var Ge=this.linkifier.registerLinkMatcher(rt,Ye,ut);return this.refresh(0,this.rows-1),Ge},He.prototype.deregisterLinkMatcher=function(rt){this.linkifier.deregisterLinkMatcher(rt)&&this.refresh(0,this.rows-1)},He.prototype.registerLinkProvider=function(rt){return this.linkifier2.registerLinkProvider(rt)},He.prototype.registerCharacterJoiner=function(rt){var Ye=this._renderService.registerCharacterJoiner(rt);return this.refresh(0,this.rows-1),Ye},He.prototype.deregisterCharacterJoiner=function(rt){this._renderService.deregisterCharacterJoiner(rt)&&this.refresh(0,this.rows-1)},Object.defineProperty(He.prototype,"markers",{get:function(){return this.buffer.markers},enumerable:!1,configurable:!0}),He.prototype.addMarker=function(rt){if(this.buffer===this.buffers.normal)return this.buffer.addMarker(this.buffer.ybase+this.buffer.y+rt)},He.prototype.hasSelection=function(){return!!this._selectionService&&this._selectionService.hasSelection},He.prototype.select=function(rt,Ye,ut){this._selectionService.setSelection(rt,Ye,ut)},He.prototype.getSelection=function(){return this._selectionService?this._selectionService.selectionText:""},He.prototype.getSelectionPosition=function(){if(this._selectionService&&this._selectionService.hasSelection)return{startColumn:this._selectionService.selectionStart[0],startRow:this._selectionService.selectionStart[1],endColumn:this._selectionService.selectionEnd[0],endRow:this._selectionService.selectionEnd[1]}},He.prototype.clearSelection=function(){var rt;(rt=this._selectionService)===null||rt===void 0||rt.clearSelection()},He.prototype.selectAll=function(){var rt;(rt=this._selectionService)===null||rt===void 0||rt.selectAll()},He.prototype.selectLines=function(rt,Ye){var ut;(ut=this._selectionService)===null||ut===void 0||ut.selectLines(rt,Ye)},He.prototype._keyDown=function(rt){if(this._keyDownHandled=!1,this._customKeyEventHandler&&this._customKeyEventHandler(rt)===!1)return!1;if(!this._compositionHelper.keydown(rt))return this.buffer.ybase!==this.buffer.ydisp&&this.scrollToBottom(),!1;var Ye=me.evaluateKeyboardEvent(rt,this._coreService.decPrivateModes.applicationCursorKeys,this.browser.isMac,this.options.macOptionIsMeta);if(this.updateCursorStyle(rt),Ye.type===3||Ye.type===2){var ut=this.rows-1;return this.scrollLines(Ye.type===2?-ut:ut),this.cancel(rt,!0)}return Ye.type===1&&this.selectAll(),!!this._isThirdLevelShift(this.browser,rt)||(Ye.cancel&&this.cancel(rt,!0),!Ye.key||(Ye.key!==le.C0.ETX&&Ye.key!==le.C0.CR||(this.textarea.value=""),this._onKey.fire({key:Ye.key,domEvent:rt}),this._showCursor(),this._coreService.triggerDataEvent(Ye.key,!0),this.optionsService.options.screenReaderMode?void(this._keyDownHandled=!0):this.cancel(rt,!0)))},He.prototype._isThirdLevelShift=function(rt,Ye){var ut=rt.isMac&&!this.options.macOptionIsMeta&&Ye.altKey&&!Ye.ctrlKey&&!Ye.metaKey||rt.isWindows&&Ye.altKey&&Ye.ctrlKey&&!Ye.metaKey;return Ye.type==="keypress"?ut:ut&&(!Ye.keyCode||Ye.keyCode>47)},He.prototype._keyUp=function(rt){this._customKeyEventHandler&&this._customKeyEventHandler(rt)===!1||(function(Ye){return Ye.keyCode===16||Ye.keyCode===17||Ye.keyCode===18}(rt)||this.focus(),this.updateCursorStyle(rt))},He.prototype._keyPress=function(rt){var Ye;if(this._keyDownHandled||this._customKeyEventHandler&&this._customKeyEventHandler(rt)===!1)return!1;if(this.cancel(rt),rt.charCode)Ye=rt.charCode;else if(rt.which===null||rt.which===void 0)Ye=rt.keyCode;else{if(rt.which===0||rt.charCode===0)return!1;Ye=rt.which}return!(!Ye||(rt.altKey||rt.ctrlKey||rt.metaKey)&&!this._isThirdLevelShift(this.browser,rt))&&(Ye=String.fromCharCode(Ye),this._onKey.fire({key:Ye,domEvent:rt}),this._showCursor(),this._coreService.triggerDataEvent(Ye,!0),!0)},He.prototype.bell=function(){this._soundBell()&&this._soundService.playBellSound()},He.prototype.resize=function(rt,Ye){rt!==this.cols||Ye!==this.rows?ot.prototype.resize.call(this,rt,Ye):this._charSizeService&&!this._charSizeService.hasValidSize&&this._charSizeService.measure()},He.prototype._afterResize=function(rt,Ye){var ut,Ge;(ut=this._charSizeService)===null||ut===void 0||ut.measure(),(Ge=this.viewport)===null||Ge===void 0||Ge.syncScrollArea(!0)},He.prototype.clear=function(){if(this.buffer.ybase!==0||this.buffer.y!==0){this.buffer.lines.set(0,this.buffer.lines.get(this.buffer.ybase+this.buffer.y)),this.buffer.lines.length=1,this.buffer.ydisp=0,this.buffer.ybase=0,this.buffer.y=0;for(var rt=1;rt<this.rows;rt++)this.buffer.lines.push(this.buffer.getBlankLine(_e.DEFAULT_ATTR_DATA));this.refresh(0,this.rows-1),this._onScroll.fire(this.buffer.ydisp)}},He.prototype.reset=function(){var rt,Ye;this.options.rows=this.rows,this.options.cols=this.cols;var ut=this._customKeyEventHandler;this._setup(),ot.prototype.reset.call(this),(rt=this._selectionService)===null||rt===void 0||rt.reset(),this._customKeyEventHandler=ut,this.refresh(0,this.rows-1),(Ye=this.viewport)===null||Ye===void 0||Ye.syncScrollArea()},He.prototype._reportWindowsOptions=function(rt){if(this._renderService)switch(rt){case ee.WindowsOptionsReportType.GET_WIN_SIZE_PIXELS:var Ye=this._renderService.dimensions.scaledCanvasWidth.toFixed(0),ut=this._renderService.dimensions.scaledCanvasHeight.toFixed(0);this._coreService.triggerDataEvent(le.C0.ESC+"[4;"+ut+";"+Ye+"t");break;case ee.WindowsOptionsReportType.GET_CELL_SIZE_PIXELS:var Ge=this._renderService.dimensions.scaledCellWidth.toFixed(0),ze=this._renderService.dimensions.scaledCellHeight.toFixed(0);this._coreService.triggerDataEvent(le.C0.ESC+"[6;"+ze+";"+Ge+"t")}},He.prototype.cancel=function(rt,Ye){if(this.options.cancelEvents||Ye)return rt.preventDefault(),rt.stopPropagation(),!1},He.prototype._visualBell=function(){return!1},He.prototype._soundBell=function(){return this.options.bellStyle==="sound"},He}(Pe.CoreTerminal);be.Terminal=Xe},function(Dt,be,ce){"use strict";var ie=this&&this.__decorate||function(le,ee,ne,E){var b,z=arguments.length,x=z<3?ee:E===null?E=Object.getOwnPropertyDescriptor(ee,ne):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(le,ee,ne,E);else for(var re=le.length-1;re>=0;re--)(b=le[re])&&(x=(z<3?b(x):z>3?b(ee,ne,x):b(ee,ne))||x);return z>3&&x&&Object.defineProperty(ee,ne,x),x},Ce=this&&this.__param||function(le,ee){return function(ne,E){ee(ne,E,le)}};Object.defineProperty(be,"__esModule",{value:!0}),be.CompositionHelper=void 0;var ue=ce(5),se=ce(1),te=function(){function le(ee,ne,E,b,z,x){this._textarea=ee,this._compositionView=ne,this._bufferService=E,this._optionsService=b,this._charSizeService=z,this._coreService=x,this._isComposing=!1,this._isSendingComposition=!1,this._compositionPosition={start:0,end:0}}return Object.defineProperty(le.prototype,"isComposing",{get:function(){return this._isComposing},enumerable:!1,configurable:!0}),le.prototype.compositionstart=function(){this._isComposing=!0,this._compositionPosition.start=this._textarea.value.length,this._compositionView.textContent="",this._compositionView.classList.add("active")},le.prototype.compositionupdate=function(ee){var ne=this;this._compositionView.textContent=ee.data,this.updateCompositionElements(),setTimeout(function(){ne._compositionPosition.end=ne._textarea.value.length},0)},le.prototype.compositionend=function(){this._finalizeComposition(!0)},le.prototype.keydown=function(ee){if(this._isComposing||this._isSendingComposition){if(ee.keyCode===229||ee.keyCode===16||ee.keyCode===17||ee.keyCode===18)return!1;this._finalizeComposition(!1)}return ee.keyCode!==229||(this._handleAnyTextareaChanges(),!1)},le.prototype._finalizeComposition=function(ee){var ne=this;if(this._compositionView.classList.remove("active"),this._isComposing=!1,ee){var E={start:this._compositionPosition.start,end:this._compositionPosition.end};this._isSendingComposition=!0,setTimeout(function(){if(ne._isSendingComposition){ne._isSendingComposition=!1;var z=void 0;z=ne._isComposing?ne._textarea.value.substring(E.start,E.end):ne._textarea.value.substring(E.start),ne._coreService.triggerDataEvent(z,!0)}},0)}else{this._isSendingComposition=!1;var b=this._textarea.value.substring(this._compositionPosition.start,this._compositionPosition.end);this._coreService.triggerDataEvent(b,!0)}},le.prototype._handleAnyTextareaChanges=function(){var ee=this,ne=this._textarea.value;setTimeout(function(){if(!ee._isComposing){var E=ee._textarea.value.replace(ne,"");E.length>0&&ee._coreService.triggerDataEvent(E,!0)}},0)},le.prototype.updateCompositionElements=function(ee){var ne=this;if(this._isComposing){if(this._bufferService.buffer.isCursorInViewport){var E=Math.ceil(this._charSizeService.height*this._optionsService.options.lineHeight),b=this._bufferService.buffer.y*E,z=this._bufferService.buffer.x*this._charSizeService.width;this._compositionView.style.left=z+"px",this._compositionView.style.top=b+"px",this._compositionView.style.height=E+"px",this._compositionView.style.lineHeight=E+"px",this._compositionView.style.fontFamily=this._optionsService.options.fontFamily,this._compositionView.style.fontSize=this._optionsService.options.fontSize+"px";var x=this._compositionView.getBoundingClientRect();this._textarea.style.left=z+"px",this._textarea.style.top=b+"px",this._textarea.style.width=x.width+"px",this._textarea.style.height=x.height+"px",this._textarea.style.lineHeight=x.height+"px"}ee||setTimeout(function(){return ne.updateCompositionElements(!0)},0)}},le=ie([Ce(2,se.IBufferService),Ce(3,se.IOptionsService),Ce(4,ue.ICharSizeService),Ce(5,se.ICoreService)],le)}();be.CompositionHelper=te},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(b,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,re){x.__proto__=re}||function(x,re){for(var ae in re)re.hasOwnProperty(ae)&&(x[ae]=re[ae])})(b,z)},function(b,z){function x(){this.constructor=b}ie(b,z),b.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)}),ue=this&&this.__decorate||function(b,z,x,re){var ae,oe=arguments.length,ve=oe<3?z:re===null?re=Object.getOwnPropertyDescriptor(z,x):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(b,z,x,re);else for(var ye=b.length-1;ye>=0;ye--)(ae=b[ye])&&(ve=(oe<3?ae(ve):oe>3?ae(z,x,ve):ae(z,x))||ve);return oe>3&&ve&&Object.defineProperty(z,x,ve),ve},se=this&&this.__param||function(b,z){return function(x,re){z(x,re,b)}};Object.defineProperty(be,"__esModule",{value:!0}),be.Viewport=void 0;var te=ce(2),le=ce(7),ee=ce(5),ne=ce(1),E=function(b){function z(x,re,ae,oe,ve,ye,me){var ge=b.call(this)||this;return ge._scrollLines=x,ge._viewportElement=re,ge._scrollArea=ae,ge._bufferService=oe,ge._optionsService=ve,ge._charSizeService=ye,ge._renderService=me,ge.scrollBarWidth=0,ge._currentRowHeight=0,ge._lastRecordedBufferLength=0,ge._lastRecordedViewportHeight=0,ge._lastRecordedBufferHeight=0,ge._lastTouchY=0,ge._lastScrollTop=0,ge._wheelPartialScroll=0,ge._refreshAnimationFrame=null,ge._ignoreNextScrollEvent=!1,ge.scrollBarWidth=ge._viewportElement.offsetWidth-ge._scrollArea.offsetWidth||15,ge.register(le.addDisposableDomListener(ge._viewportElement,"scroll",ge._onScroll.bind(ge))),setTimeout(function(){return ge.syncScrollArea()},0),ge}return Ce(z,b),z.prototype.onThemeChange=function(x){this._viewportElement.style.backgroundColor=x.background.css},z.prototype._refresh=function(x){var re=this;if(x)return this._innerRefresh(),void(this._refreshAnimationFrame!==null&&cancelAnimationFrame(this._refreshAnimationFrame));this._refreshAnimationFrame===null&&(this._refreshAnimationFrame=requestAnimationFrame(function(){return re._innerRefresh()}))},z.prototype._innerRefresh=function(){if(this._charSizeService.height>0){this._currentRowHeight=this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio,this._lastRecordedViewportHeight=this._viewportElement.offsetHeight;var x=Math.round(this._currentRowHeight*this._lastRecordedBufferLength)+(this._lastRecordedViewportHeight-this._renderService.dimensions.canvasHeight);this._lastRecordedBufferHeight!==x&&(this._lastRecordedBufferHeight=x,this._scrollArea.style.height=this._lastRecordedBufferHeight+"px")}var re=this._bufferService.buffer.ydisp*this._currentRowHeight;this._viewportElement.scrollTop!==re&&(this._ignoreNextScrollEvent=!0,this._viewportElement.scrollTop=re),this._refreshAnimationFrame=null},z.prototype.syncScrollArea=function(x){if(x===void 0&&(x=!1),this._lastRecordedBufferLength!==this._bufferService.buffer.lines.length)return this._lastRecordedBufferLength=this._bufferService.buffer.lines.length,void this._refresh(x);if(this._lastRecordedViewportHeight===this._renderService.dimensions.canvasHeight){var re=this._bufferService.buffer.ydisp*this._currentRowHeight;this._lastScrollTop===re&&this._lastScrollTop===this._viewportElement.scrollTop&&this._renderService.dimensions.scaledCellHeight/window.devicePixelRatio===this._currentRowHeight||this._refresh(x)}else this._refresh(x)},z.prototype._onScroll=function(x){if(this._lastScrollTop=this._viewportElement.scrollTop,this._viewportElement.offsetParent)if(this._ignoreNextScrollEvent)this._ignoreNextScrollEvent=!1;else{var re=Math.round(this._lastScrollTop/this._currentRowHeight)-this._bufferService.buffer.ydisp;this._scrollLines(re,!0)}},z.prototype._bubbleScroll=function(x,re){var ae=this._viewportElement.scrollTop+this._lastRecordedViewportHeight;return!(re<0&&this._viewportElement.scrollTop!==0||re>0&&ae<this._lastRecordedBufferHeight)||(x.cancelable&&x.preventDefault(),!1)},z.prototype.onWheel=function(x){var re=this._getPixelsScrolled(x);return re!==0&&(this._viewportElement.scrollTop+=re,this._bubbleScroll(x,re))},z.prototype._getPixelsScrolled=function(x){if(x.deltaY===0)return 0;var re=this._applyScrollModifier(x.deltaY,x);return x.deltaMode===WheelEvent.DOM_DELTA_LINE?re*=this._currentRowHeight:x.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(re*=this._currentRowHeight*this._bufferService.rows),re},z.prototype.getLinesScrolled=function(x){if(x.deltaY===0)return 0;var re=this._applyScrollModifier(x.deltaY,x);return x.deltaMode===WheelEvent.DOM_DELTA_PIXEL?(re/=this._currentRowHeight+0,this._wheelPartialScroll+=re,re=Math.floor(Math.abs(this._wheelPartialScroll))*(this._wheelPartialScroll>0?1:-1),this._wheelPartialScroll%=1):x.deltaMode===WheelEvent.DOM_DELTA_PAGE&&(re*=this._bufferService.rows),re},z.prototype._applyScrollModifier=function(x,re){var ae=this._optionsService.options.fastScrollModifier;return ae==="alt"&&re.altKey||ae==="ctrl"&&re.ctrlKey||ae==="shift"&&re.shiftKey?x*this._optionsService.options.fastScrollSensitivity*this._optionsService.options.scrollSensitivity:x*this._optionsService.options.scrollSensitivity},z.prototype.onTouchStart=function(x){this._lastTouchY=x.touches[0].pageY},z.prototype.onTouchMove=function(x){var re=this._lastTouchY-x.touches[0].pageY;return this._lastTouchY=x.touches[0].pageY,re!==0&&(this._viewportElement.scrollTop+=re,this._bubbleScroll(x,re))},z=ue([se(3,ne.IBufferService),se(4,ne.IOptionsService),se(5,ee.ICharSizeService),se(6,ee.IRenderService)],z)}(te.Disposable);be.Viewport=E},function(Dt,be,ce){"use strict";function ie(te){return te.replace(/\r?\n/g,"\r")}function Ce(te,le){return le?"\x1B[200~"+te+"\x1B[201~":te}function ue(te,le,ee){te=Ce(te=ie(te),ee.decPrivateModes.bracketedPasteMode),ee.triggerDataEvent(te,!0),le.value=""}function se(te,le,ee){var ne=ee.getBoundingClientRect(),E=te.clientX-ne.left-10,b=te.clientY-ne.top-10;le.style.width="20px",le.style.height="20px",le.style.left=E+"px",le.style.top=b+"px",le.style.zIndex="1000",le.focus()}Object.defineProperty(be,"__esModule",{value:!0}),be.rightClickHandler=be.moveTextAreaUnderMouseCursor=be.paste=be.handlePasteEvent=be.copyHandler=be.bracketTextForPaste=be.prepareTextForTerminal=void 0,be.prepareTextForTerminal=ie,be.bracketTextForPaste=Ce,be.copyHandler=function(te,le){te.clipboardData&&te.clipboardData.setData("text/plain",le.selectionText),te.preventDefault()},be.handlePasteEvent=function(te,le,ee){te.stopPropagation(),te.clipboardData&&ue(te.clipboardData.getData("text/plain"),le,ee)},be.paste=ue,be.moveTextAreaUnderMouseCursor=se,be.rightClickHandler=function(te,le,ee,ne,E){se(te,le,ee),E&&!ne.isClickInSelection(te)&&ne.selectWordAtCursor(te),le.value=ne.selectionText,le.select()}},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(b,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,re){x.__proto__=re}||function(x,re){for(var ae in re)re.hasOwnProperty(ae)&&(x[ae]=re[ae])})(b,z)},function(b,z){function x(){this.constructor=b}ie(b,z),b.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)});Object.defineProperty(be,"__esModule",{value:!0}),be.EscapeSequenceParser=be.VT500_TRANSITION_TABLE=be.TransitionTable=void 0;var ue=ce(2),se=ce(15),te=ce(21),le=ce(22),ee=ce(24),ne=function(){function b(z){this.table=new Uint8Array(z)}return b.prototype.setDefault=function(z,x){se.fill(this.table,z<<4|x)},b.prototype.add=function(z,x,re,ae){this.table[x<<8|z]=re<<4|ae},b.prototype.addMany=function(z,x,re,ae){for(var oe=0;oe<z.length;oe++)this.table[x<<8|z[oe]]=re<<4|ae},b}();be.TransitionTable=ne,be.VT500_TRANSITION_TABLE=function(){var b=new ne(4095),z=Array.apply(null,Array(256)).map(function(ye,me){return me}),x=function(ye,me){return z.slice(ye,me)},re=x(32,127),ae=x(0,24);ae.push(25),ae.push.apply(ae,x(28,32));var oe,ve=x(0,14);for(oe in b.setDefault(1,0),b.addMany(re,0,2,0),ve)b.addMany([24,26,153,154],oe,3,0),b.addMany(x(128,144),oe,3,0),b.addMany(x(144,152),oe,3,0),b.add(156,oe,0,0),b.add(27,oe,11,1),b.add(157,oe,4,8),b.addMany([152,158,159],oe,0,7),b.add(155,oe,11,3),b.add(144,oe,11,9);return b.addMany(ae,0,3,0),b.addMany(ae,1,3,1),b.add(127,1,0,1),b.addMany(ae,8,0,8),b.addMany(ae,3,3,3),b.add(127,3,0,3),b.addMany(ae,4,3,4),b.add(127,4,0,4),b.addMany(ae,6,3,6),b.addMany(ae,5,3,5),b.add(127,5,0,5),b.addMany(ae,2,3,2),b.add(127,2,0,2),b.add(93,1,4,8),b.addMany(re,8,5,8),b.add(127,8,5,8),b.addMany([156,27,24,26,7],8,6,0),b.addMany(x(28,32),8,0,8),b.addMany([88,94,95],1,0,7),b.addMany(re,7,0,7),b.addMany(ae,7,0,7),b.add(156,7,0,0),b.add(127,7,0,7),b.add(91,1,11,3),b.addMany(x(64,127),3,7,0),b.addMany(x(48,60),3,8,4),b.addMany([60,61,62,63],3,9,4),b.addMany(x(48,60),4,8,4),b.addMany(x(64,127),4,7,0),b.addMany([60,61,62,63],4,0,6),b.addMany(x(32,64),6,0,6),b.add(127,6,0,6),b.addMany(x(64,127),6,0,0),b.addMany(x(32,48),3,9,5),b.addMany(x(32,48),5,9,5),b.addMany(x(48,64),5,0,6),b.addMany(x(64,127),5,7,0),b.addMany(x(32,48),4,9,5),b.addMany(x(32,48),1,9,2),b.addMany(x(32,48),2,9,2),b.addMany(x(48,127),2,10,0),b.addMany(x(48,80),1,10,0),b.addMany(x(81,88),1,10,0),b.addMany([89,90,92],1,10,0),b.addMany(x(96,127),1,10,0),b.add(80,1,11,9),b.addMany(ae,9,0,9),b.add(127,9,0,9),b.addMany(x(28,32),9,0,9),b.addMany(x(32,48),9,9,12),b.addMany(x(48,60),9,8,10),b.addMany([60,61,62,63],9,9,10),b.addMany(ae,11,0,11),b.addMany(x(32,128),11,0,11),b.addMany(x(28,32),11,0,11),b.addMany(ae,10,0,10),b.add(127,10,0,10),b.addMany(x(28,32),10,0,10),b.addMany(x(48,60),10,8,10),b.addMany([60,61,62,63],10,0,11),b.addMany(x(32,48),10,9,12),b.addMany(ae,12,0,12),b.add(127,12,0,12),b.addMany(x(28,32),12,0,12),b.addMany(x(32,48),12,9,12),b.addMany(x(48,64),12,0,11),b.addMany(x(64,127),12,12,13),b.addMany(x(64,127),10,12,13),b.addMany(x(64,127),9,12,13),b.addMany(ae,13,13,13),b.addMany(re,13,13,13),b.add(127,13,0,13),b.addMany([27,156,24,26],13,14,0),b.add(160,0,2,0),b.add(160,8,5,8),b.add(160,6,0,6),b.add(160,11,0,11),b.add(160,13,13,13),b}();var E=function(b){function z(x){x===void 0&&(x=be.VT500_TRANSITION_TABLE);var re=b.call(this)||this;return re._transitions=x,re.initialState=0,re.currentState=re.initialState,re._params=new te.Params,re._params.addParam(0),re._collect=0,re.precedingCodepoint=0,re._printHandlerFb=function(ae,oe,ve){},re._executeHandlerFb=function(ae){},re._csiHandlerFb=function(ae,oe){},re._escHandlerFb=function(ae){},re._errorHandlerFb=function(ae){return ae},re._printHandler=re._printHandlerFb,re._executeHandlers=Object.create(null),re._csiHandlers=Object.create(null),re._escHandlers=Object.create(null),re._oscParser=new le.OscParser,re._dcsParser=new ee.DcsParser,re._errorHandler=re._errorHandlerFb,re.setEscHandler({final:"\\"},function(){}),re}return Ce(z,b),z.prototype._identifier=function(x,re){re===void 0&&(re=[64,126]);var ae=0;if(x.prefix){if(x.prefix.length>1)throw new Error("only one byte as prefix supported");if((ae=x.prefix.charCodeAt(0))&&60>ae||ae>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(x.intermediates){if(x.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(var oe=0;oe<x.intermediates.length;++oe){var ve=x.intermediates.charCodeAt(oe);if(32>ve||ve>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");ae<<=8,ae|=ve}}if(x.final.length!==1)throw new Error("final must be a single byte");var ye=x.final.charCodeAt(0);if(re[0]>ye||ye>re[1])throw new Error("final must be in range "+re[0]+" .. "+re[1]);return ae<<=8,ae|=ye},z.prototype.identToString=function(x){for(var re=[];x;)re.push(String.fromCharCode(255&x)),x>>=8;return re.reverse().join("")},z.prototype.dispose=function(){this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null),this._oscParser.dispose(),this._dcsParser.dispose()},z.prototype.setPrintHandler=function(x){this._printHandler=x},z.prototype.clearPrintHandler=function(){this._printHandler=this._printHandlerFb},z.prototype.addEscHandler=function(x,re){var ae=this._identifier(x,[48,126]);this._escHandlers[ae]===void 0&&(this._escHandlers[ae]=[]);var oe=this._escHandlers[ae];return oe.push(re),{dispose:function(){var ve=oe.indexOf(re);ve!==-1&&oe.splice(ve,1)}}},z.prototype.setEscHandler=function(x,re){this._escHandlers[this._identifier(x,[48,126])]=[re]},z.prototype.clearEscHandler=function(x){this._escHandlers[this._identifier(x,[48,126])]&&delete this._escHandlers[this._identifier(x,[48,126])]},z.prototype.setEscHandlerFallback=function(x){this._escHandlerFb=x},z.prototype.setExecuteHandler=function(x,re){this._executeHandlers[x.charCodeAt(0)]=re},z.prototype.clearExecuteHandler=function(x){this._executeHandlers[x.charCodeAt(0)]&&delete this._executeHandlers[x.charCodeAt(0)]},z.prototype.setExecuteHandlerFallback=function(x){this._executeHandlerFb=x},z.prototype.addCsiHandler=function(x,re){var ae=this._identifier(x);this._csiHandlers[ae]===void 0&&(this._csiHandlers[ae]=[]);var oe=this._csiHandlers[ae];return oe.push(re),{dispose:function(){var ve=oe.indexOf(re);ve!==-1&&oe.splice(ve,1)}}},z.prototype.setCsiHandler=function(x,re){this._csiHandlers[this._identifier(x)]=[re]},z.prototype.clearCsiHandler=function(x){this._csiHandlers[this._identifier(x)]&&delete this._csiHandlers[this._identifier(x)]},z.prototype.setCsiHandlerFallback=function(x){this._csiHandlerFb=x},z.prototype.addDcsHandler=function(x,re){return this._dcsParser.addHandler(this._identifier(x),re)},z.prototype.setDcsHandler=function(x,re){this._dcsParser.setHandler(this._identifier(x),re)},z.prototype.clearDcsHandler=function(x){this._dcsParser.clearHandler(this._identifier(x))},z.prototype.setDcsHandlerFallback=function(x){this._dcsParser.setHandlerFallback(x)},z.prototype.addOscHandler=function(x,re){return this._oscParser.addHandler(x,re)},z.prototype.setOscHandler=function(x,re){this._oscParser.setHandler(x,re)},z.prototype.clearOscHandler=function(x){this._oscParser.clearHandler(x)},z.prototype.setOscHandlerFallback=function(x){this._oscParser.setHandlerFallback(x)},z.prototype.setErrorHandler=function(x){this._errorHandler=x},z.prototype.clearErrorHandler=function(){this._errorHandler=this._errorHandlerFb},z.prototype.reset=function(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingCodepoint=0},z.prototype.parse=function(x,re){for(var ae=0,oe=0,ve=this.currentState,ye=this._oscParser,me=this._dcsParser,ge=this._collect,_e=this._params,he=this._transitions.table,pe=0;pe<re;++pe){switch((oe=he[ve<<8|((ae=x[pe])<160?ae:160)])>>4){case 2:for(var ke=pe+1;;++ke){if(ke>=re||(ae=x[ke])<32||ae>126&&ae<160){this._printHandler(x,pe,ke),pe=ke-1;break}if(++ke>=re||(ae=x[ke])<32||ae>126&&ae<160){this._printHandler(x,pe,ke),pe=ke-1;break}if(++ke>=re||(ae=x[ke])<32||ae>126&&ae<160){this._printHandler(x,pe,ke),pe=ke-1;break}if(++ke>=re||(ae=x[ke])<32||ae>126&&ae<160){this._printHandler(x,pe,ke),pe=ke-1;break}}break;case 3:this._executeHandlers[ae]?this._executeHandlers[ae]():this._executeHandlerFb(ae),this.precedingCodepoint=0;break;case 0:break;case 1:if(this._errorHandler({position:pe,code:ae,currentState:ve,collect:ge,params:_e,abort:!1}).abort)return;break;case 7:for(var Te=this._csiHandlers[ge<<8|ae],Ee=Te?Te.length-1:-1;Ee>=0&&Te[Ee](_e)===!1;Ee--);Ee<0&&this._csiHandlerFb(ge<<8|ae,_e),this.precedingCodepoint=0;break;case 8:do switch(ae){case 59:_e.addParam(0);break;case 58:_e.addSubParam(-1);break;default:_e.addDigit(ae-48)}while(++pe<re&&(ae=x[pe])>47&&ae<60);pe--;break;case 9:ge<<=8,ge|=ae;break;case 10:for(var Oe=this._escHandlers[ge<<8|ae],je=Oe?Oe.length-1:-1;je>=0&&Oe[je]()===!1;je--);je<0&&this._escHandlerFb(ge<<8|ae),this.precedingCodepoint=0;break;case 11:_e.reset(),_e.addParam(0),ge=0;break;case 12:me.hook(ge<<8|ae,_e);break;case 13:for(var Pe=pe+1;;++Pe)if(Pe>=re||(ae=x[Pe])===24||ae===26||ae===27||ae>127&&ae<160){me.put(x,pe,Pe),pe=Pe-1;break}break;case 14:me.unhook(ae!==24&&ae!==26),ae===27&&(oe|=1),_e.reset(),_e.addParam(0),ge=0,this.precedingCodepoint=0;break;case 4:ye.start();break;case 5:for(var Qe=pe+1;;Qe++)if(Qe>=re||(ae=x[Qe])<32||ae>127&&ae<=159){ye.put(x,pe,Qe),pe=Qe-1;break}break;case 6:ye.end(ae!==24&&ae!==26),ae===27&&(oe|=1),_e.reset(),_e.addParam(0),ge=0,this.precedingCodepoint=0}ve=15&oe}this._collect=ge,this.currentState=ve},z}(ue.Disposable);be.EscapeSequenceParser=E},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ye,me){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,_e){ge.__proto__=_e}||function(ge,_e){for(var he in _e)_e.hasOwnProperty(he)&&(ge[he]=_e[he])})(ye,me)},function(ye,me){function ge(){this.constructor=ye}ie(ye,me),ye.prototype=me===null?Object.create(me):(ge.prototype=me.prototype,new ge)}),ue=this&&this.__decorate||function(ye,me,ge,_e){var he,pe=arguments.length,ke=pe<3?me:_e===null?_e=Object.getOwnPropertyDescriptor(me,ge):_e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ke=Reflect.decorate(ye,me,ge,_e);else for(var Te=ye.length-1;Te>=0;Te--)(he=ye[Te])&&(ke=(pe<3?he(ke):pe>3?he(me,ge,ke):he(me,ge))||ke);return pe>3&&ke&&Object.defineProperty(me,ge,ke),ke},se=this&&this.__param||function(ye,me){return function(ge,_e){me(ge,_e,ye)}};Object.defineProperty(be,"__esModule",{value:!0}),be.Renderer=void 0;var te=ce(41),le=ce(47),ee=ce(48),ne=ce(49),E=ce(29),b=ce(2),z=ce(5),x=ce(1),re=ce(25),ae=ce(0),oe=1,ve=function(ye){function me(ge,_e,he,pe,ke,Te,Ee,Oe,je){var Pe=ye.call(this)||this;Pe._colors=ge,Pe._screenElement=_e,Pe._bufferService=ke,Pe._charSizeService=Te,Pe._optionsService=Ee,Pe._id=oe++,Pe._onRequestRedraw=new ae.EventEmitter;var Qe=Pe._optionsService.options.allowTransparency;return Pe._characterJoinerRegistry=new E.CharacterJoinerRegistry(Pe._bufferService),Pe._renderLayers=[new te.TextRenderLayer(Pe._screenElement,0,Pe._colors,Pe._characterJoinerRegistry,Qe,Pe._id,Pe._bufferService,Ee),new le.SelectionRenderLayer(Pe._screenElement,1,Pe._colors,Pe._id,Pe._bufferService,Ee),new ne.LinkRenderLayer(Pe._screenElement,2,Pe._colors,Pe._id,he,pe,Pe._bufferService,Ee),new ee.CursorRenderLayer(Pe._screenElement,3,Pe._colors,Pe._id,Pe._onRequestRedraw,Pe._bufferService,Ee,Oe,je)],Pe.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Pe._devicePixelRatio=window.devicePixelRatio,Pe._updateDimensions(),Pe.onOptionsChanged(),Pe}return Ce(me,ye),Object.defineProperty(me.prototype,"onRequestRedraw",{get:function(){return this._onRequestRedraw.event},enumerable:!1,configurable:!0}),me.prototype.dispose=function(){for(var ge=0,_e=this._renderLayers;ge<_e.length;ge++)_e[ge].dispose();ye.prototype.dispose.call(this),re.removeTerminalFromCache(this._id)},me.prototype.onDevicePixelRatioChange=function(){this._devicePixelRatio!==window.devicePixelRatio&&(this._devicePixelRatio=window.devicePixelRatio,this.onResize(this._bufferService.cols,this._bufferService.rows))},me.prototype.setColors=function(ge){this._colors=ge;for(var _e=0,he=this._renderLayers;_e<he.length;_e++){var pe=he[_e];pe.setColors(this._colors),pe.reset()}},me.prototype.onResize=function(ge,_e){this._updateDimensions();for(var he=0,pe=this._renderLayers;he<pe.length;he++)pe[he].resize(this.dimensions);this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},me.prototype.onCharSizeChanged=function(){this.onResize(this._bufferService.cols,this._bufferService.rows)},me.prototype.onBlur=function(){this._runOperation(function(ge){return ge.onBlur()})},me.prototype.onFocus=function(){this._runOperation(function(ge){return ge.onFocus()})},me.prototype.onSelectionChanged=function(ge,_e,he){he===void 0&&(he=!1),this._runOperation(function(pe){return pe.onSelectionChanged(ge,_e,he)})},me.prototype.onCursorMove=function(){this._runOperation(function(ge){return ge.onCursorMove()})},me.prototype.onOptionsChanged=function(){this._runOperation(function(ge){return ge.onOptionsChanged()})},me.prototype.clear=function(){this._runOperation(function(ge){return ge.reset()})},me.prototype._runOperation=function(ge){for(var _e=0,he=this._renderLayers;_e<he.length;_e++)ge(he[_e])},me.prototype.renderRows=function(ge,_e){for(var he=0,pe=this._renderLayers;he<pe.length;he++)pe[he].onGridChanged(ge,_e)},me.prototype._updateDimensions=function(){this._charSizeService.hasValidSize&&(this.dimensions.scaledCharWidth=Math.floor(this._charSizeService.width*window.devicePixelRatio),this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharTop=this._optionsService.options.lineHeight===1?0:Math.round((this.dimensions.scaledCellHeight-this.dimensions.scaledCharHeight)/2),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCharLeft=Math.floor(this._optionsService.options.letterSpacing/2),this.dimensions.scaledCanvasHeight=this._bufferService.rows*this.dimensions.scaledCellHeight,this.dimensions.scaledCanvasWidth=this._bufferService.cols*this.dimensions.scaledCellWidth,this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows,this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols)},me.prototype.registerCharacterJoiner=function(ge){return this._characterJoinerRegistry.registerCharacterJoiner(ge)},me.prototype.deregisterCharacterJoiner=function(ge){return this._characterJoinerRegistry.deregisterCharacterJoiner(ge)},me=ue([se(4,x.IBufferService),se(5,z.ICharSizeService),se(6,x.IOptionsService),se(7,x.ICoreService),se(8,z.ICoreBrowserService)],me)}(b.Disposable);be.Renderer=ve},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(b,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,re){x.__proto__=re}||function(x,re){for(var ae in re)re.hasOwnProperty(ae)&&(x[ae]=re[ae])})(b,z)},function(b,z){function x(){this.constructor=b}ie(b,z),b.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)});Object.defineProperty(be,"__esModule",{value:!0}),be.TextRenderLayer=void 0;var ue=ce(42),se=ce(13),te=ce(6),le=ce(3),ee=ce(29),ne=ce(4),E=function(b){function z(x,re,ae,oe,ve,ye,me,ge){var _e=b.call(this,x,"text",re,ve,ae,ye,me,ge)||this;return _e._characterWidth=0,_e._characterFont="",_e._characterOverlapCache={},_e._workCell=new ne.CellData,_e._state=new ue.GridCache,_e._characterJoinerRegistry=oe,_e}return Ce(z,b),z.prototype.resize=function(x){b.prototype.resize.call(this,x);var re=this._getFont(!1,!1);this._characterWidth===x.scaledCharWidth&&this._characterFont===re||(this._characterWidth=x.scaledCharWidth,this._characterFont=re,this._characterOverlapCache={}),this._state.clear(),this._state.resize(this._bufferService.cols,this._bufferService.rows)},z.prototype.reset=function(){this._state.clear(),this._clearAll()},z.prototype._forEachCell=function(x,re,ae,oe){for(var ve=x;ve<=re;ve++)for(var ye=ve+this._bufferService.buffer.ydisp,me=this._bufferService.buffer.lines.get(ye),ge=ae?ae.getJoinedCharacters(ye):[],_e=0;_e<this._bufferService.cols;_e++){me.loadCell(_e,this._workCell);var he=this._workCell,pe=!1,ke=_e;if(he.getWidth()!==0){if(ge.length>0&&_e===ge[0][0]){pe=!0;var Te=ge.shift();he=new ee.JoinedCellData(this._workCell,me.translateToString(!0,Te[0],Te[1]),Te[1]-Te[0]),ke=Te[1]-1}!pe&&this._isOverlapping(he)&&ke<me.length-1&&me.getCodePoint(ke+1)===le.NULL_CELL_CODE&&(he.content&=-12582913,he.content|=2<<22),oe(he,_e,ve),_e=ke}}},z.prototype._drawBackground=function(x,re){var ae=this,oe=this._ctx,ve=this._bufferService.cols,ye=0,me=0,ge=null;oe.save(),this._forEachCell(x,re,null,function(_e,he,pe){var ke=null;_e.isInverse()?ke=_e.isFgDefault()?ae._colors.foreground.css:_e.isFgRGB()?"rgb("+te.AttributeData.toColorRGB(_e.getFgColor()).join(",")+")":ae._colors.ansi[_e.getFgColor()].css:_e.isBgRGB()?ke="rgb("+te.AttributeData.toColorRGB(_e.getBgColor()).join(",")+")":_e.isBgPalette()&&(ke=ae._colors.ansi[_e.getBgColor()].css),ge===null&&(ye=he,me=pe),pe!==me?(oe.fillStyle=ge||"",ae._fillCells(ye,me,ve-ye,1),ye=he,me=pe):ge!==ke&&(oe.fillStyle=ge||"",ae._fillCells(ye,me,he-ye,1),ye=he,me=pe),ge=ke}),ge!==null&&(oe.fillStyle=ge,this._fillCells(ye,me,ve-ye,1)),oe.restore()},z.prototype._drawForeground=function(x,re){var ae=this;this._forEachCell(x,re,this._characterJoinerRegistry,function(oe,ve,ye){if(!oe.isInvisible()&&(ae._drawChars(oe,ve,ye),oe.isUnderline())){if(ae._ctx.save(),oe.isInverse())if(oe.isBgDefault())ae._ctx.fillStyle=ae._colors.background.css;else if(oe.isBgRGB())ae._ctx.fillStyle="rgb("+te.AttributeData.toColorRGB(oe.getBgColor()).join(",")+")";else{var me=oe.getBgColor();ae._optionsService.options.drawBoldTextInBrightColors&&oe.isBold()&&me<8&&(me+=8),ae._ctx.fillStyle=ae._colors.ansi[me].css}else if(oe.isFgDefault())ae._ctx.fillStyle=ae._colors.foreground.css;else if(oe.isFgRGB())ae._ctx.fillStyle="rgb("+te.AttributeData.toColorRGB(oe.getFgColor()).join(",")+")";else{var ge=oe.getFgColor();ae._optionsService.options.drawBoldTextInBrightColors&&oe.isBold()&&ge<8&&(ge+=8),ae._ctx.fillStyle=ae._colors.ansi[ge].css}ae._fillBottomLineAtCells(ve,ye,oe.getWidth()),ae._ctx.restore()}})},z.prototype.onGridChanged=function(x,re){this._state.cache.length!==0&&(this._charAtlas&&this._charAtlas.beginFrame(),this._clearCells(0,x,this._bufferService.cols,re-x+1),this._drawBackground(x,re),this._drawForeground(x,re))},z.prototype.onOptionsChanged=function(){this._setTransparency(this._optionsService.options.allowTransparency)},z.prototype._isOverlapping=function(x){if(x.getWidth()!==1||x.getCode()<256)return!1;var re=x.getChars();if(this._characterOverlapCache.hasOwnProperty(re))return this._characterOverlapCache[re];this._ctx.save(),this._ctx.font=this._characterFont;var ae=Math.floor(this._ctx.measureText(re).width)>this._characterWidth;return this._ctx.restore(),this._characterOverlapCache[re]=ae,ae},z}(se.BaseRenderLayer);be.TextRenderLayer=E},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.GridCache=void 0;var ie=function(){function Ce(){this.cache=[]}return Ce.prototype.resize=function(ue,se){for(var te=0;te<ue;te++){this.cache.length<=te&&this.cache.push([]);for(var le=this.cache[te].length;le<se;le++)this.cache[te].push(void 0);this.cache[te].length=se}this.cache.length=ue},Ce.prototype.clear=function(){for(var ue=0;ue<this.cache.length;ue++)for(var se=0;se<this.cache[ue].length;se++)this.cache[ue][se]=void 0},Ce}();be.GridCache=ie},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ae,oe){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ve,ye){ve.__proto__=ye}||function(ve,ye){for(var me in ye)ye.hasOwnProperty(me)&&(ve[me]=ye[me])})(ae,oe)},function(ae,oe){function ve(){this.constructor=ae}ie(ae,oe),ae.prototype=oe===null?Object.create(oe):(ve.prototype=oe.prototype,new ve)});Object.defineProperty(be,"__esModule",{value:!0}),be.NoneCharAtlas=be.DynamicCharAtlas=be.getGlyphCacheKey=void 0;var ue=ce(9),se=ce(44),te=ce(27),le=ce(46),ee=ce(11),ne=ce(28),E=ce(10),b={css:"rgba(0, 0, 0, 0)",rgba:0};function z(ae){return ae.code<<21|ae.bg<<12|ae.fg<<3|(ae.bold?0:4)+(ae.dim?0:2)+(ae.italic?0:1)}be.getGlyphCacheKey=z;var x=function(ae){function oe(ve,ye){var me=ae.call(this)||this;me._config=ye,me._drawToCacheCount=0,me._glyphsWaitingOnBitmap=[],me._bitmapCommitTimeout=null,me._bitmap=null,me._cacheCanvas=ve.createElement("canvas"),me._cacheCanvas.width=1024,me._cacheCanvas.height=1024,me._cacheCtx=ne.throwIfFalsy(me._cacheCanvas.getContext("2d",{alpha:!0}));var ge=ve.createElement("canvas");ge.width=me._config.scaledCharWidth,ge.height=me._config.scaledCharHeight,me._tmpCtx=ne.throwIfFalsy(ge.getContext("2d",{alpha:me._config.allowTransparency})),me._width=Math.floor(1024/me._config.scaledCharWidth),me._height=Math.floor(1024/me._config.scaledCharHeight);var _e=me._width*me._height;return me._cacheMap=new le.LRUMap(_e),me._cacheMap.prealloc(_e),me}return Ce(oe,ae),oe.prototype.dispose=function(){this._bitmapCommitTimeout!==null&&(window.clearTimeout(this._bitmapCommitTimeout),this._bitmapCommitTimeout=null)},oe.prototype.beginFrame=function(){this._drawToCacheCount=0},oe.prototype.draw=function(ve,ye,me,ge){if(ye.code===32)return!0;if(!this._canCache(ye))return!1;var _e=z(ye),he=this._cacheMap.get(_e);if(he!=null)return this._drawFromCache(ve,he,me,ge),!0;if(this._drawToCacheCount<100){var pe=void 0;pe=this._cacheMap.size<this._cacheMap.capacity?this._cacheMap.size:this._cacheMap.peek().index;var ke=this._drawToCache(ye,pe);return this._cacheMap.set(_e,ke),this._drawFromCache(ve,ke,me,ge),!0}return!1},oe.prototype._canCache=function(ve){return ve.code<256},oe.prototype._toCoordinateX=function(ve){return ve%this._width*this._config.scaledCharWidth},oe.prototype._toCoordinateY=function(ve){return Math.floor(ve/this._width)*this._config.scaledCharHeight},oe.prototype._drawFromCache=function(ve,ye,me,ge){if(!ye.isEmpty){var _e=this._toCoordinateX(ye.index),he=this._toCoordinateY(ye.index);ve.drawImage(ye.inBitmap?this._bitmap:this._cacheCanvas,_e,he,this._config.scaledCharWidth,this._config.scaledCharHeight,me,ge,this._config.scaledCharWidth,this._config.scaledCharHeight)}},oe.prototype._getColorFromAnsiIndex=function(ve){return ve<this._config.colors.ansi.length?this._config.colors.ansi[ve]:te.DEFAULT_ANSI_COLORS[ve]},oe.prototype._getBackgroundColor=function(ve){return this._config.allowTransparency?b:ve.bg===ue.INVERTED_DEFAULT_COLOR?this._config.colors.foreground:ve.bg<256?this._getColorFromAnsiIndex(ve.bg):this._config.colors.background},oe.prototype._getForegroundColor=function(ve){return ve.fg===ue.INVERTED_DEFAULT_COLOR?E.color.opaque(this._config.colors.background):ve.fg<256?this._getColorFromAnsiIndex(ve.fg):this._config.colors.foreground},oe.prototype._drawToCache=function(ve,ye){this._drawToCacheCount++,this._tmpCtx.save();var me=this._getBackgroundColor(ve);this._tmpCtx.globalCompositeOperation="copy",this._tmpCtx.fillStyle=me.css,this._tmpCtx.fillRect(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),this._tmpCtx.globalCompositeOperation="source-over";var ge=ve.bold?this._config.fontWeightBold:this._config.fontWeight,_e=ve.italic?"italic":"";this._tmpCtx.font=_e+" "+ge+" "+this._config.fontSize*this._config.devicePixelRatio+"px "+this._config.fontFamily,this._tmpCtx.textBaseline="middle",this._tmpCtx.fillStyle=this._getForegroundColor(ve).css,ve.dim&&(this._tmpCtx.globalAlpha=ue.DIM_OPACITY),this._tmpCtx.fillText(ve.chars,0,this._config.scaledCharHeight/2),this._tmpCtx.restore();var he=this._tmpCtx.getImageData(0,0,this._config.scaledCharWidth,this._config.scaledCharHeight),pe=!1;this._config.allowTransparency||(pe=function(Oe,je){for(var Pe=!0,Qe=je.rgba>>>24,Xe=je.rgba>>>16&255,ot=je.rgba>>>8&255,He=0;He<Oe.data.length;He+=4)Oe.data[He]===Qe&&Oe.data[He+1]===Xe&&Oe.data[He+2]===ot?Oe.data[He+3]=0:Pe=!1;return Pe}(he,me));var ke=this._toCoordinateX(ye),Te=this._toCoordinateY(ye);this._cacheCtx.putImageData(he,ke,Te);var Ee={index:ye,isEmpty:pe,inBitmap:!1};return this._addGlyphToBitmap(Ee),Ee},oe.prototype._addGlyphToBitmap=function(ve){var ye=this;!("createImageBitmap"in window)||ee.isFirefox||ee.isSafari||(this._glyphsWaitingOnBitmap.push(ve),this._bitmapCommitTimeout===null&&(this._bitmapCommitTimeout=window.setTimeout(function(){return ye._generateBitmap()},100)))},oe.prototype._generateBitmap=function(){var ve=this,ye=this._glyphsWaitingOnBitmap;this._glyphsWaitingOnBitmap=[],window.createImageBitmap(this._cacheCanvas).then(function(me){ve._bitmap=me;for(var ge=0;ge<ye.length;ge++)ye[ge].inBitmap=!0}),this._bitmapCommitTimeout=null},oe}(se.BaseCharAtlas);be.DynamicCharAtlas=x;var re=function(ae){function oe(ve,ye){return ae.call(this)||this}return Ce(oe,ae),oe.prototype.draw=function(ve,ye,me,ge){return!1},oe}(se.BaseCharAtlas);be.NoneCharAtlas=re},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.BaseCharAtlas=void 0;var ie=function(){function Ce(){this._didWarmUp=!1}return Ce.prototype.dispose=function(){},Ce.prototype.warmUp=function(){this._didWarmUp||(this._doWarmUp(),this._didWarmUp=!0)},Ce.prototype._doWarmUp=function(){},Ce.prototype.beginFrame=function(){},Ce}();be.BaseCharAtlas=ie},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.ColorContrastCache=void 0;var ie=function(){function Ce(){this._color={},this._rgba={}}return Ce.prototype.clear=function(){this._color={},this._rgba={}},Ce.prototype.setCss=function(ue,se,te){this._rgba[ue]||(this._rgba[ue]={}),this._rgba[ue][se]=te},Ce.prototype.getCss=function(ue,se){return this._rgba[ue]?this._rgba[ue][se]:void 0},Ce.prototype.setColor=function(ue,se,te){this._color[ue]||(this._color[ue]={}),this._color[ue][se]=te},Ce.prototype.getColor=function(ue,se){return this._color[ue]?this._color[ue][se]:void 0},Ce}();be.ColorContrastCache=ie},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.LRUMap=void 0;var ie=function(){function Ce(ue){this.capacity=ue,this._map={},this._head=null,this._tail=null,this._nodePool=[],this.size=0}return Ce.prototype._unlinkNode=function(ue){var se=ue.prev,te=ue.next;ue===this._head&&(this._head=te),ue===this._tail&&(this._tail=se),se!==null&&(se.next=te),te!==null&&(te.prev=se)},Ce.prototype._appendNode=function(ue){var se=this._tail;se!==null&&(se.next=ue),ue.prev=se,ue.next=null,this._tail=ue,this._head===null&&(this._head=ue)},Ce.prototype.prealloc=function(ue){for(var se=this._nodePool,te=0;te<ue;te++)se.push({prev:null,next:null,key:null,value:null})},Ce.prototype.get=function(ue){var se=this._map[ue];return se!==void 0?(this._unlinkNode(se),this._appendNode(se),se.value):null},Ce.prototype.peekValue=function(ue){var se=this._map[ue];return se!==void 0?se.value:null},Ce.prototype.peek=function(){var ue=this._head;return ue===null?null:ue.value},Ce.prototype.set=function(ue,se){var te=this._map[ue];if(te!==void 0)te=this._map[ue],this._unlinkNode(te),te.value=se;else if(this.size>=this.capacity)te=this._head,this._unlinkNode(te),delete this._map[te.key],te.key=ue,te.value=se,this._map[ue]=te;else{var le=this._nodePool;le.length>0?((te=le.pop()).key=ue,te.value=se):te={prev:null,next:null,key:ue,value:se},this._map[ue]=te,this.size++}this._appendNode(te)},Ce}();be.LRUMap=ie},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(se,te){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(le,ee){le.__proto__=ee}||function(le,ee){for(var ne in ee)ee.hasOwnProperty(ne)&&(le[ne]=ee[ne])})(se,te)},function(se,te){function le(){this.constructor=se}ie(se,te),se.prototype=te===null?Object.create(te):(le.prototype=te.prototype,new le)});Object.defineProperty(be,"__esModule",{value:!0}),be.SelectionRenderLayer=void 0;var ue=function(se){function te(le,ee,ne,E,b,z){var x=se.call(this,le,"selection",ee,!0,ne,E,b,z)||this;return x._clearState(),x}return Ce(te,se),te.prototype._clearState=function(){this._state={start:void 0,end:void 0,columnSelectMode:void 0,ydisp:void 0}},te.prototype.resize=function(le){se.prototype.resize.call(this,le),this._clearState()},te.prototype.reset=function(){this._state.start&&this._state.end&&(this._clearState(),this._clearAll())},te.prototype.onSelectionChanged=function(le,ee,ne){if(this._didStateChange(le,ee,ne,this._bufferService.buffer.ydisp))if(this._clearAll(),le&&ee){var E=le[1]-this._bufferService.buffer.ydisp,b=ee[1]-this._bufferService.buffer.ydisp,z=Math.max(E,0),x=Math.min(b,this._bufferService.rows-1);if(!(z>=this._bufferService.rows||x<0)){if(this._ctx.fillStyle=this._colors.selectionTransparent.css,ne){var re=le[0],ae=ee[0]-re,oe=x-z+1;this._fillCells(re,z,ae,oe)}else{re=E===z?le[0]:0;var ve=z===x?ee[0]:this._bufferService.cols;this._fillCells(re,z,ve-re,1);var ye=Math.max(x-z-1,0);if(this._fillCells(0,z+1,this._bufferService.cols,ye),z!==x){var me=b===x?ee[0]:this._bufferService.cols;this._fillCells(0,x,me,1)}}this._state.start=[le[0],le[1]],this._state.end=[ee[0],ee[1]],this._state.columnSelectMode=ne,this._state.ydisp=this._bufferService.buffer.ydisp}}else this._clearState()},te.prototype._didStateChange=function(le,ee,ne,E){return!this._areCoordinatesEqual(le,this._state.start)||!this._areCoordinatesEqual(ee,this._state.end)||ne!==this._state.columnSelectMode||E!==this._state.ydisp},te.prototype._areCoordinatesEqual=function(le,ee){return!(!le||!ee)&&le[0]===ee[0]&&le[1]===ee[1]},te}(ce(13).BaseRenderLayer);be.SelectionRenderLayer=ue},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ee,ne){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,b){E.__proto__=b}||function(E,b){for(var z in b)b.hasOwnProperty(z)&&(E[z]=b[z])})(ee,ne)},function(ee,ne){function E(){this.constructor=ee}ie(ee,ne),ee.prototype=ne===null?Object.create(ne):(E.prototype=ne.prototype,new E)});Object.defineProperty(be,"__esModule",{value:!0}),be.CursorRenderLayer=void 0;var ue=ce(13),se=ce(4),te=function(ee){function ne(E,b,z,x,re,ae,oe,ve,ye){var me=ee.call(this,E,"cursor",b,!0,z,x,ae,oe)||this;return me._onRequestRedraw=re,me._coreService=ve,me._coreBrowserService=ye,me._cell=new se.CellData,me._state={x:0,y:0,isFocused:!1,style:"",width:0},me._cursorRenderers={bar:me._renderBarCursor.bind(me),block:me._renderBlockCursor.bind(me),underline:me._renderUnderlineCursor.bind(me)},me}return Ce(ne,ee),ne.prototype.resize=function(E){ee.prototype.resize.call(this,E),this._state={x:0,y:0,isFocused:!1,style:"",width:0}},ne.prototype.reset=function(){this._clearCursor(),this._cursorBlinkStateManager&&(this._cursorBlinkStateManager.dispose(),this._cursorBlinkStateManager=void 0,this.onOptionsChanged())},ne.prototype.onBlur=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.pause(),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},ne.prototype.onFocus=function(){this._cursorBlinkStateManager?this._cursorBlinkStateManager.resume():this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},ne.prototype.onOptionsChanged=function(){var E,b=this;this._optionsService.options.cursorBlink?this._cursorBlinkStateManager||(this._cursorBlinkStateManager=new le(this._coreBrowserService.isFocused,function(){b._render(!0)})):((E=this._cursorBlinkStateManager)===null||E===void 0||E.dispose(),this._cursorBlinkStateManager=void 0),this._onRequestRedraw.fire({start:this._bufferService.buffer.y,end:this._bufferService.buffer.y})},ne.prototype.onCursorMove=function(){this._cursorBlinkStateManager&&this._cursorBlinkStateManager.restartBlinkAnimation()},ne.prototype.onGridChanged=function(E,b){!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isPaused?this._render(!1):this._cursorBlinkStateManager.restartBlinkAnimation()},ne.prototype._render=function(E){if(this._coreService.isCursorInitialized&&!this._coreService.isCursorHidden){var b=this._bufferService.buffer.ybase+this._bufferService.buffer.y,z=b-this._bufferService.buffer.ydisp;if(z<0||z>=this._bufferService.rows)this._clearCursor();else{var x=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1);if(this._bufferService.buffer.lines.get(b).loadCell(x,this._cell),this._cell.content!==void 0){if(!this._coreBrowserService.isFocused){this._clearCursor(),this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css;var re=this._optionsService.options.cursorStyle;return re&&re!=="block"?this._cursorRenderers[re](x,z,this._cell):this._renderBlurCursor(x,z,this._cell),this._ctx.restore(),this._state.x=x,this._state.y=z,this._state.isFocused=!1,this._state.style=re,void(this._state.width=this._cell.getWidth())}if(!this._cursorBlinkStateManager||this._cursorBlinkStateManager.isCursorVisible){if(this._state){if(this._state.x===x&&this._state.y===z&&this._state.isFocused===this._coreBrowserService.isFocused&&this._state.style===this._optionsService.options.cursorStyle&&this._state.width===this._cell.getWidth())return;this._clearCursor()}this._ctx.save(),this._cursorRenderers[this._optionsService.options.cursorStyle||"block"](x,z,this._cell),this._ctx.restore(),this._state.x=x,this._state.y=z,this._state.isFocused=!1,this._state.style=this._optionsService.options.cursorStyle,this._state.width=this._cell.getWidth()}else this._clearCursor()}}}else this._clearCursor()},ne.prototype._clearCursor=function(){this._state&&(this._clearCells(this._state.x,this._state.y,this._state.width,1),this._state={x:0,y:0,isFocused:!1,style:"",width:0})},ne.prototype._renderBarCursor=function(E,b,z){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillLeftLineAtCell(E,b,this._optionsService.options.cursorWidth),this._ctx.restore()},ne.prototype._renderBlockCursor=function(E,b,z){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillCells(E,b,z.getWidth(),1),this._ctx.fillStyle=this._colors.cursorAccent.css,this._fillCharTrueColor(z,E,b),this._ctx.restore()},ne.prototype._renderUnderlineCursor=function(E,b,z){this._ctx.save(),this._ctx.fillStyle=this._colors.cursor.css,this._fillBottomLineAtCells(E,b),this._ctx.restore()},ne.prototype._renderBlurCursor=function(E,b,z){this._ctx.save(),this._ctx.strokeStyle=this._colors.cursor.css,this._strokeRectAtCell(E,b,z.getWidth(),1),this._ctx.restore()},ne}(ue.BaseRenderLayer);be.CursorRenderLayer=te;var le=function(){function ee(ne,E){this._renderCallback=E,this.isCursorVisible=!0,ne&&this._restartInterval()}return Object.defineProperty(ee.prototype,"isPaused",{get:function(){return!(this._blinkStartTimeout||this._blinkInterval)},enumerable:!1,configurable:!0}),ee.prototype.dispose=function(){this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},ee.prototype.restartBlinkAnimation=function(){var ne=this;this.isPaused||(this._animationTimeRestarted=Date.now(),this.isCursorVisible=!0,this._animationFrame||(this._animationFrame=window.requestAnimationFrame(function(){ne._renderCallback(),ne._animationFrame=void 0})))},ee.prototype._restartInterval=function(ne){var E=this;ne===void 0&&(ne=600),this._blinkInterval&&window.clearInterval(this._blinkInterval),this._blinkStartTimeout=window.setTimeout(function(){if(E._animationTimeRestarted){var b=600-(Date.now()-E._animationTimeRestarted);if(E._animationTimeRestarted=void 0,b>0)return void E._restartInterval(b)}E.isCursorVisible=!1,E._animationFrame=window.requestAnimationFrame(function(){E._renderCallback(),E._animationFrame=void 0}),E._blinkInterval=window.setInterval(function(){if(E._animationTimeRestarted){var z=600-(Date.now()-E._animationTimeRestarted);return E._animationTimeRestarted=void 0,void E._restartInterval(z)}E.isCursorVisible=!E.isCursorVisible,E._animationFrame=window.requestAnimationFrame(function(){E._renderCallback(),E._animationFrame=void 0})},600)},ne)},ee.prototype.pause=function(){this.isCursorVisible=!0,this._blinkInterval&&(window.clearInterval(this._blinkInterval),this._blinkInterval=void 0),this._blinkStartTimeout&&(window.clearTimeout(this._blinkStartTimeout),this._blinkStartTimeout=void 0),this._animationFrame&&(window.cancelAnimationFrame(this._animationFrame),this._animationFrame=void 0)},ee.prototype.resume=function(){this.pause(),this._animationTimeRestarted=void 0,this._restartInterval(),this.restartBlinkAnimation()},ee}()},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ee,ne){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(E,b){E.__proto__=b}||function(E,b){for(var z in b)b.hasOwnProperty(z)&&(E[z]=b[z])})(ee,ne)},function(ee,ne){function E(){this.constructor=ee}ie(ee,ne),ee.prototype=ne===null?Object.create(ne):(E.prototype=ne.prototype,new E)});Object.defineProperty(be,"__esModule",{value:!0}),be.LinkRenderLayer=void 0;var ue=ce(13),se=ce(9),te=ce(26),le=function(ee){function ne(E,b,z,x,re,ae,oe,ve){var ye=ee.call(this,E,"link",b,!0,z,x,oe,ve)||this;return re.onShowLinkUnderline(function(me){return ye._onShowLinkUnderline(me)}),re.onHideLinkUnderline(function(me){return ye._onHideLinkUnderline(me)}),ae.onShowLinkUnderline(function(me){return ye._onShowLinkUnderline(me)}),ae.onHideLinkUnderline(function(me){return ye._onHideLinkUnderline(me)}),ye}return Ce(ne,ee),ne.prototype.resize=function(E){ee.prototype.resize.call(this,E),this._state=void 0},ne.prototype.reset=function(){this._clearCurrentLink()},ne.prototype._clearCurrentLink=function(){if(this._state){this._clearCells(this._state.x1,this._state.y1,this._state.cols-this._state.x1,1);var E=this._state.y2-this._state.y1-1;E>0&&this._clearCells(0,this._state.y1+1,this._state.cols,E),this._clearCells(0,this._state.y2,this._state.x2,1),this._state=void 0}},ne.prototype._onShowLinkUnderline=function(E){if(E.fg===se.INVERTED_DEFAULT_COLOR?this._ctx.fillStyle=this._colors.background.css:E.fg&&te.is256Color(E.fg)?this._ctx.fillStyle=this._colors.ansi[E.fg].css:this._ctx.fillStyle=this._colors.foreground.css,E.y1===E.y2)this._fillBottomLineAtCells(E.x1,E.y1,E.x2-E.x1);else{this._fillBottomLineAtCells(E.x1,E.y1,E.cols-E.x1);for(var b=E.y1+1;b<E.y2;b++)this._fillBottomLineAtCells(0,b,E.cols);this._fillBottomLineAtCells(0,E.y2,E.x2)}this._state=E},ne.prototype._onHideLinkUnderline=function(E){this._clearCurrentLink()},ne}(ue.BaseRenderLayer);be.LinkRenderLayer=le},function(Dt,be,ce){"use strict";var ie=this&&this.__decorate||function(ee,ne,E,b){var z,x=arguments.length,re=x<3?ne:b===null?b=Object.getOwnPropertyDescriptor(ne,E):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")re=Reflect.decorate(ee,ne,E,b);else for(var ae=ee.length-1;ae>=0;ae--)(z=ee[ae])&&(re=(x<3?z(re):x>3?z(ne,E,re):z(ne,E))||re);return x>3&&re&&Object.defineProperty(ne,E,re),re},Ce=this&&this.__param||function(ee,ne){return function(E,b){ne(E,b,ee)}};Object.defineProperty(be,"__esModule",{value:!0}),be.MouseZone=be.Linkifier=void 0;var ue=ce(0),se=ce(1),te=function(){function ee(ne,E,b){this._bufferService=ne,this._logService=E,this._unicodeService=b,this._linkMatchers=[],this._nextLinkMatcherId=0,this._onShowLinkUnderline=new ue.EventEmitter,this._onHideLinkUnderline=new ue.EventEmitter,this._onLinkTooltip=new ue.EventEmitter,this._rowsToLinkify={start:void 0,end:void 0}}return Object.defineProperty(ee.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"onLinkTooltip",{get:function(){return this._onLinkTooltip.event},enumerable:!1,configurable:!0}),ee.prototype.attachToDom=function(ne,E){this._element=ne,this._mouseZoneManager=E},ee.prototype.linkifyRows=function(ne,E){var b=this;this._mouseZoneManager&&(this._rowsToLinkify.start===void 0||this._rowsToLinkify.end===void 0?(this._rowsToLinkify.start=ne,this._rowsToLinkify.end=E):(this._rowsToLinkify.start=Math.min(this._rowsToLinkify.start,ne),this._rowsToLinkify.end=Math.max(this._rowsToLinkify.end,E)),this._mouseZoneManager.clearAll(ne,E),this._rowsTimeoutId&&clearTimeout(this._rowsTimeoutId),this._rowsTimeoutId=setTimeout(function(){return b._linkifyRows()},ee._timeBeforeLatency))},ee.prototype._linkifyRows=function(){this._rowsTimeoutId=void 0;var ne=this._bufferService.buffer;if(this._rowsToLinkify.start!==void 0&&this._rowsToLinkify.end!==void 0){var E=ne.ydisp+this._rowsToLinkify.start;if(!(E>=ne.lines.length)){for(var b=ne.ydisp+Math.min(this._rowsToLinkify.end,this._bufferService.rows)+1,z=Math.ceil(2e3/this._bufferService.cols),x=this._bufferService.buffer.iterator(!1,E,b,z,z);x.hasNext();)for(var re=x.next(),ae=0;ae<this._linkMatchers.length;ae++)this._doLinkifyRow(re.range.first,re.content,this._linkMatchers[ae]);this._rowsToLinkify.start=void 0,this._rowsToLinkify.end=void 0}}else this._logService.debug("_rowToLinkify was unset before _linkifyRows was called")},ee.prototype.registerLinkMatcher=function(ne,E,b){if(b===void 0&&(b={}),!E)throw new Error("handler must be defined");var z={id:this._nextLinkMatcherId++,regex:ne,handler:E,matchIndex:b.matchIndex,validationCallback:b.validationCallback,hoverTooltipCallback:b.tooltipCallback,hoverLeaveCallback:b.leaveCallback,willLinkActivate:b.willLinkActivate,priority:b.priority||0};return this._addLinkMatcherToList(z),z.id},ee.prototype._addLinkMatcherToList=function(ne){if(this._linkMatchers.length!==0){for(var E=this._linkMatchers.length-1;E>=0;E--)if(ne.priority<=this._linkMatchers[E].priority)return void this._linkMatchers.splice(E+1,0,ne);this._linkMatchers.splice(0,0,ne)}else this._linkMatchers.push(ne)},ee.prototype.deregisterLinkMatcher=function(ne){for(var E=0;E<this._linkMatchers.length;E++)if(this._linkMatchers[E].id===ne)return this._linkMatchers.splice(E,1),!0;return!1},ee.prototype._doLinkifyRow=function(ne,E,b){for(var z,x=this,re=new RegExp(b.regex.source,(b.regex.flags||"")+"g"),ae=-1,oe=function(){var ye=z[typeof b.matchIndex!="number"?0:b.matchIndex];if(!ye)return ve._logService.debug("match found without corresponding matchIndex",z,b),"break";if(ae=E.indexOf(ye,ae+1),re.lastIndex=ae+ye.length,ae<0)return"break";var me=ve._bufferService.buffer.stringIndexToBufferIndex(ne,ae);if(me[0]<0)return"break";var ge=ve._bufferService.buffer.lines.get(me[0]);if(!ge)return"break";var _e=ge.getFg(me[1]),he=_e?_e>>9&511:void 0;b.validationCallback?b.validationCallback(ye,function(pe){x._rowsTimeoutId||pe&&x._addLink(me[1],me[0]-x._bufferService.buffer.ydisp,ye,b,he)}):ve._addLink(me[1],me[0]-ve._bufferService.buffer.ydisp,ye,b,he)},ve=this;(z=re.exec(E))!==null&&oe()!=="break";);},ee.prototype._addLink=function(ne,E,b,z,x){var re=this;if(this._mouseZoneManager&&this._element){var ae=this._unicodeService.getStringCellWidth(b),oe=ne%this._bufferService.cols,ve=E+Math.floor(ne/this._bufferService.cols),ye=(oe+ae)%this._bufferService.cols,me=ve+Math.floor((oe+ae)/this._bufferService.cols);ye===0&&(ye=this._bufferService.cols,me--),this._mouseZoneManager.add(new le(oe+1,ve+1,ye+1,me+1,function(ge){if(z.handler)return z.handler(ge,b);var _e=window.open();_e?(_e.opener=null,_e.location.href=b):console.warn("Opening link blocked as opener could not be cleared")},function(){re._onShowLinkUnderline.fire(re._createLinkHoverEvent(oe,ve,ye,me,x)),re._element.classList.add("xterm-cursor-pointer")},function(ge){re._onLinkTooltip.fire(re._createLinkHoverEvent(oe,ve,ye,me,x)),z.hoverTooltipCallback&&z.hoverTooltipCallback(ge,b,{start:{x:oe,y:ve},end:{x:ye,y:me}})},function(){re._onHideLinkUnderline.fire(re._createLinkHoverEvent(oe,ve,ye,me,x)),re._element.classList.remove("xterm-cursor-pointer"),z.hoverLeaveCallback&&z.hoverLeaveCallback()},function(ge){return!z.willLinkActivate||z.willLinkActivate(ge,b)}))}},ee.prototype._createLinkHoverEvent=function(ne,E,b,z,x){return{x1:ne,y1:E,x2:b,y2:z,cols:this._bufferService.cols,fg:x}},ee._timeBeforeLatency=200,ee=ie([Ce(0,se.IBufferService),Ce(1,se.ILogService),Ce(2,se.IUnicodeService)],ee)}();be.Linkifier=te;var le=function(ee,ne,E,b,z,x,re,ae,oe){this.x1=ee,this.y1=ne,this.x2=E,this.y2=b,this.clickCallback=z,this.hoverCallback=x,this.tooltipCallback=re,this.leaveCallback=ae,this.willLinkActivate=oe};be.MouseZone=le},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ye,me){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ge,_e){ge.__proto__=_e}||function(ge,_e){for(var he in _e)_e.hasOwnProperty(he)&&(ge[he]=_e[he])})(ye,me)},function(ye,me){function ge(){this.constructor=ye}ie(ye,me),ye.prototype=me===null?Object.create(me):(ge.prototype=me.prototype,new ge)}),ue=this&&this.__decorate||function(ye,me,ge,_e){var he,pe=arguments.length,ke=pe<3?me:_e===null?_e=Object.getOwnPropertyDescriptor(me,ge):_e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ke=Reflect.decorate(ye,me,ge,_e);else for(var Te=ye.length-1;Te>=0;Te--)(he=ye[Te])&&(ke=(pe<3?he(ke):pe>3?he(me,ge,ke):he(me,ge))||ke);return pe>3&&ke&&Object.defineProperty(me,ge,ke),ke},se=this&&this.__param||function(ye,me){return function(ge,_e){me(ge,_e,ye)}};Object.defineProperty(be,"__esModule",{value:!0}),be.SelectionService=void 0;var te=ce(11),le=ce(52),ee=ce(4),ne=ce(0),E=ce(5),b=ce(1),z=ce(30),x=ce(53),re=ce(2),ae="\xA0",oe=new RegExp(ae,"g"),ve=function(ye){function me(ge,_e,he,pe,ke,Te,Ee){var Oe=ye.call(this)||this;return Oe._element=ge,Oe._screenElement=_e,Oe._bufferService=he,Oe._coreService=pe,Oe._mouseService=ke,Oe._optionsService=Te,Oe._renderService=Ee,Oe._dragScrollAmount=0,Oe._enabled=!0,Oe._workCell=new ee.CellData,Oe._mouseDownTimeStamp=0,Oe._onLinuxMouseSelection=Oe.register(new ne.EventEmitter),Oe._onRedrawRequest=Oe.register(new ne.EventEmitter),Oe._onSelectionChange=Oe.register(new ne.EventEmitter),Oe._onRequestScrollLines=Oe.register(new ne.EventEmitter),Oe._mouseMoveListener=function(je){return Oe._onMouseMove(je)},Oe._mouseUpListener=function(je){return Oe._onMouseUp(je)},Oe._coreService.onUserInput(function(){Oe.hasSelection&&Oe.clearSelection()}),Oe._trimListener=Oe._bufferService.buffer.lines.onTrim(function(je){return Oe._onTrim(je)}),Oe.register(Oe._bufferService.buffers.onBufferActivate(function(je){return Oe._onBufferActivate(je)})),Oe.enable(),Oe._model=new le.SelectionModel(Oe._bufferService),Oe._activeSelectionMode=0,Oe}return Ce(me,ye),Object.defineProperty(me.prototype,"onLinuxMouseSelection",{get:function(){return this._onLinuxMouseSelection.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onRequestRedraw",{get:function(){return this._onRedrawRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onSelectionChange",{get:function(){return this._onSelectionChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"onRequestScrollLines",{get:function(){return this._onRequestScrollLines.event},enumerable:!1,configurable:!0}),me.prototype.dispose=function(){this._removeMouseDownListeners()},me.prototype.reset=function(){this.clearSelection()},me.prototype.disable=function(){this.clearSelection(),this._enabled=!1},me.prototype.enable=function(){this._enabled=!0},Object.defineProperty(me.prototype,"selectionStart",{get:function(){return this._model.finalSelectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"selectionEnd",{get:function(){return this._model.finalSelectionEnd},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"hasSelection",{get:function(){var ge=this._model.finalSelectionStart,_e=this._model.finalSelectionEnd;return!(!ge||!_e)&&(ge[0]!==_e[0]||ge[1]!==_e[1])},enumerable:!1,configurable:!0}),Object.defineProperty(me.prototype,"selectionText",{get:function(){var ge=this._model.finalSelectionStart,_e=this._model.finalSelectionEnd;if(!ge||!_e)return"";var he=this._bufferService.buffer,pe=[];if(this._activeSelectionMode===3){if(ge[0]===_e[0])return"";for(var ke=ge[1];ke<=_e[1];ke++){var Te=he.translateBufferLineToString(ke,!0,ge[0],_e[0]);pe.push(Te)}}else{var Ee=ge[1]===_e[1]?_e[0]:void 0;for(pe.push(he.translateBufferLineToString(ge[1],!0,ge[0],Ee)),ke=ge[1]+1;ke<=_e[1]-1;ke++){var Oe=he.lines.get(ke);Te=he.translateBufferLineToString(ke,!0),Oe&&Oe.isWrapped?pe[pe.length-1]+=Te:pe.push(Te)}ge[1]!==_e[1]&&(Oe=he.lines.get(_e[1]),Te=he.translateBufferLineToString(_e[1],!0,0,_e[0]),Oe&&Oe.isWrapped?pe[pe.length-1]+=Te:pe.push(Te))}return pe.map(function(je){return je.replace(oe," ")}).join(te.isWindows?`\r
|
|
|
`:`
|
|
|
`)},enumerable:!1,configurable:!0}),me.prototype.clearSelection=function(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()},me.prototype.refresh=function(ge){var _e=this;this._refreshAnimationFrame||(this._refreshAnimationFrame=window.requestAnimationFrame(function(){return _e._refresh()})),te.isLinux&&ge&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)},me.prototype._refresh=function(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})},me.prototype.isClickInSelection=function(ge){var _e=this._getMouseBufferCoords(ge),he=this._model.finalSelectionStart,pe=this._model.finalSelectionEnd;return!!(he&&pe&&_e)&&this._areCoordsInSelection(_e,he,pe)},me.prototype._areCoordsInSelection=function(ge,_e,he){return ge[1]>_e[1]&&ge[1]<he[1]||_e[1]===he[1]&&ge[1]===_e[1]&&ge[0]>=_e[0]&&ge[0]<he[0]||_e[1]<he[1]&&ge[1]===he[1]&&ge[0]<he[0]||_e[1]<he[1]&&ge[1]===_e[1]&&ge[0]>=_e[0]},me.prototype.selectWordAtCursor=function(ge){var _e=this._getMouseBufferCoords(ge);_e&&(this._selectWordAt(_e,!1),this._model.selectionEnd=void 0,this.refresh(!0))},me.prototype.selectAll=function(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()},me.prototype.selectLines=function(ge,_e){this._model.clearSelection(),ge=Math.max(ge,0),_e=Math.min(_e,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,ge],this._model.selectionEnd=[this._bufferService.cols,_e],this.refresh(),this._onSelectionChange.fire()},me.prototype._onTrim=function(ge){this._model.onTrim(ge)&&this.refresh()},me.prototype._getMouseBufferCoords=function(ge){var _e=this._mouseService.getCoords(ge,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(_e)return _e[0]--,_e[1]--,_e[1]+=this._bufferService.buffer.ydisp,_e},me.prototype._getMouseEventScrollAmount=function(ge){var _e=z.getCoordsRelativeToElement(ge,this._screenElement)[1],he=this._renderService.dimensions.canvasHeight;return _e>=0&&_e<=he?0:(_e>he&&(_e-=he),_e=Math.min(Math.max(_e,-50),50),(_e/=50)/Math.abs(_e)+Math.round(14*_e))},me.prototype.shouldForceSelection=function(ge){return te.isMac?ge.altKey&&this._optionsService.options.macOptionClickForcesSelection:ge.shiftKey},me.prototype.onMouseDown=function(ge){if(this._mouseDownTimeStamp=ge.timeStamp,(ge.button!==2||!this.hasSelection)&&ge.button===0){if(!this._enabled){if(!this.shouldForceSelection(ge))return;ge.stopPropagation()}ge.preventDefault(),this._dragScrollAmount=0,this._enabled&&ge.shiftKey?this._onIncrementalClick(ge):ge.detail===1?this._onSingleClick(ge):ge.detail===2?this._onDoubleClick(ge):ge.detail===3&&this._onTripleClick(ge),this._addMouseDownListeners(),this.refresh(!0)}},me.prototype._addMouseDownListeners=function(){var ge=this;this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=window.setInterval(function(){return ge._dragScroll()},50)},me.prototype._removeMouseDownListeners=function(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0},me.prototype._onIncrementalClick=function(ge){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(ge))},me.prototype._onSingleClick=function(ge){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(ge)?3:0,this._model.selectionStart=this._getMouseBufferCoords(ge),this._model.selectionStart){this._model.selectionEnd=void 0;var _e=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);_e&&_e.length!==this._model.selectionStart[0]&&_e.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}},me.prototype._onDoubleClick=function(ge){var _e=this._getMouseBufferCoords(ge);_e&&(this._activeSelectionMode=1,this._selectWordAt(_e,!0))},me.prototype._onTripleClick=function(ge){var _e=this._getMouseBufferCoords(ge);_e&&(this._activeSelectionMode=2,this._selectLineAt(_e[1]))},me.prototype.shouldColumnSelect=function(ge){return ge.altKey&&!(te.isMac&&this._optionsService.options.macOptionClickForcesSelection)},me.prototype._onMouseMove=function(ge){if(ge.stopImmediatePropagation(),this._model.selectionStart){var _e=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(ge),this._model.selectionEnd){this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(ge),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));var he=this._bufferService.buffer;if(this._model.selectionEnd[1]<he.lines.length){var pe=he.lines.get(this._model.selectionEnd[1]);pe&&pe.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]++}_e&&_e[0]===this._model.selectionEnd[0]&&_e[1]===this._model.selectionEnd[1]||this.refresh(!0)}else this.refresh(!0)}},me.prototype._dragScroll=function(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});var ge=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(ge.ydisp+this._bufferService.rows,ge.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=ge.ydisp),this.refresh()}},me.prototype._onMouseUp=function(ge){var _e=ge.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&_e<500&&ge.altKey){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){var he=this._mouseService.getCoords(ge,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(he&&he[0]!==void 0&&he[1]!==void 0){var pe=x.moveToCellSequence(he[0]-1,he[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(pe,!0)}}}else this.hasSelection&&this._onSelectionChange.fire()},me.prototype._onBufferActivate=function(ge){var _e=this;this.clearSelection(),this._trimListener.dispose(),this._trimListener=ge.activeBuffer.lines.onTrim(function(he){return _e._onTrim(he)})},me.prototype._convertViewportColToCharacterIndex=function(ge,_e){for(var he=_e[0],pe=0;_e[0]>=pe;pe++){var ke=ge.loadCell(pe,this._workCell).getChars().length;this._workCell.getWidth()===0?he--:ke>1&&_e[0]!==pe&&(he+=ke-1)}return he},me.prototype.setSelection=function(ge,_e,he){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[ge,_e],this._model.selectionStartLength=he,this.refresh()},me.prototype._getWordAt=function(ge,_e,he,pe){if(he===void 0&&(he=!0),pe===void 0&&(pe=!0),!(ge[0]>=this._bufferService.cols)){var ke=this._bufferService.buffer,Te=ke.lines.get(ge[1]);if(Te){var Ee=ke.translateBufferLineToString(ge[1],!1),Oe=this._convertViewportColToCharacterIndex(Te,ge),je=Oe,Pe=ge[0]-Oe,Qe=0,Xe=0,ot=0,He=0;if(Ee.charAt(Oe)===" "){for(;Oe>0&&Ee.charAt(Oe-1)===" ";)Oe--;for(;je<Ee.length&&Ee.charAt(je+1)===" ";)je++}else{var rt=ge[0],Ye=ge[0];Te.getWidth(rt)===0&&(Qe++,rt--),Te.getWidth(Ye)===2&&(Xe++,Ye++);var ut=Te.getString(Ye).length;for(ut>1&&(He+=ut-1,je+=ut-1);rt>0&&Oe>0&&!this._isCharWordSeparator(Te.loadCell(rt-1,this._workCell));){Te.loadCell(rt-1,this._workCell);var Ge=this._workCell.getChars().length;this._workCell.getWidth()===0?(Qe++,rt--):Ge>1&&(ot+=Ge-1,Oe-=Ge-1),Oe--,rt--}for(;Ye<Te.length&&je+1<Ee.length&&!this._isCharWordSeparator(Te.loadCell(Ye+1,this._workCell));){Te.loadCell(Ye+1,this._workCell);var ze=this._workCell.getChars().length;this._workCell.getWidth()===2?(Xe++,Ye++):ze>1&&(He+=ze-1,je+=ze-1),je++,Ye++}}je++;var Ve=Oe+Pe-Qe+ot,$e=Math.min(this._bufferService.cols,je-Oe+Qe+Xe-ot-He);if(_e||Ee.slice(Oe,je).trim()!==""){if(he&&Ve===0&&Te.getCodePoint(0)!==32){var nt=ke.lines.get(ge[1]-1);if(nt&&Te.isWrapped&&nt.getCodePoint(this._bufferService.cols-1)!==32){var et=this._getWordAt([this._bufferService.cols-1,ge[1]-1],!1,!0,!1);if(et){var pt=this._bufferService.cols-et.start;Ve-=pt,$e+=pt}}}if(pe&&Ve+$e===this._bufferService.cols&&Te.getCodePoint(this._bufferService.cols-1)!==32){var ct=ke.lines.get(ge[1]+1);if(ct&&ct.isWrapped&&ct.getCodePoint(0)!==32){var It=this._getWordAt([0,ge[1]+1],!1,!1,!0);It&&($e+=It.length)}}return{start:Ve,length:$e}}}}},me.prototype._selectWordAt=function(ge,_e){var he=this._getWordAt(ge,_e);if(he){for(;he.start<0;)he.start+=this._bufferService.cols,ge[1]--;this._model.selectionStart=[he.start,ge[1]],this._model.selectionStartLength=he.length}},me.prototype._selectToWordAt=function(ge){var _e=this._getWordAt(ge,!0);if(_e){for(var he=ge[1];_e.start<0;)_e.start+=this._bufferService.cols,he--;if(!this._model.areSelectionValuesReversed())for(;_e.start+_e.length>this._bufferService.cols;)_e.length-=this._bufferService.cols,he++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?_e.start:_e.start+_e.length,he]}},me.prototype._isCharWordSeparator=function(ge){return ge.getWidth()!==0&&this._optionsService.options.wordSeparator.indexOf(ge.getChars())>=0},me.prototype._selectLineAt=function(ge){var _e=this._bufferService.buffer.getWrappedRangeForLine(ge);this._model.selectionStart=[0,_e.first],this._model.selectionEnd=[this._bufferService.cols,_e.last],this._model.selectionStartLength=0},me=ue([se(2,b.IBufferService),se(3,b.ICoreService),se(4,E.IMouseService),se(5,b.IOptionsService),se(6,E.IRenderService)],me)}(re.Disposable);be.SelectionService=ve},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.SelectionModel=void 0;var ie=function(){function Ce(ue){this._bufferService=ue,this.isSelectAllActive=!1,this.selectionStartLength=0}return Ce.prototype.clearSelection=function(){this.selectionStart=void 0,this.selectionEnd=void 0,this.isSelectAllActive=!1,this.selectionStartLength=0},Object.defineProperty(Ce.prototype,"finalSelectionStart",{get:function(){return this.isSelectAllActive?[0,0]:this.selectionEnd&&this.selectionStart&&this.areSelectionValuesReversed()?this.selectionEnd:this.selectionStart},enumerable:!1,configurable:!0}),Object.defineProperty(Ce.prototype,"finalSelectionEnd",{get:function(){if(this.isSelectAllActive)return[this._bufferService.cols,this._bufferService.buffer.ybase+this._bufferService.rows-1];if(this.selectionStart){if(!this.selectionEnd||this.areSelectionValuesReversed()){var ue=this.selectionStart[0]+this.selectionStartLength;return ue>this._bufferService.cols?[ue%this._bufferService.cols,this.selectionStart[1]+Math.floor(ue/this._bufferService.cols)]:[ue,this.selectionStart[1]]}return this.selectionStartLength&&this.selectionEnd[1]===this.selectionStart[1]?[Math.max(this.selectionStart[0]+this.selectionStartLength,this.selectionEnd[0]),this.selectionEnd[1]]:this.selectionEnd}},enumerable:!1,configurable:!0}),Ce.prototype.areSelectionValuesReversed=function(){var ue=this.selectionStart,se=this.selectionEnd;return!(!ue||!se)&&(ue[1]>se[1]||ue[1]===se[1]&&ue[0]>se[0])},Ce.prototype.onTrim=function(ue){return this.selectionStart&&(this.selectionStart[1]-=ue),this.selectionEnd&&(this.selectionEnd[1]-=ue),this.selectionEnd&&this.selectionEnd[1]<0?(this.clearSelection(),!0):(this.selectionStart&&this.selectionStart[1]<0&&(this.selectionStart[1]=0),!1)},Ce}();be.SelectionModel=ie},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.moveToCellSequence=void 0;var ie=ce(12);function Ce(ne,E,b,z){var x=ne-ue(b,ne),re=E-ue(b,E);return ee(Math.abs(x-re)-function(ae,oe,ve){for(var ye=0,me=ae-ue(ve,ae),ge=oe-ue(ve,oe),_e=0;_e<Math.abs(me-ge);_e++){var he=se(ae,oe)==="A"?-1:1,pe=ve.buffer.lines.get(me+he*_e);pe&&pe.isWrapped&&ye++}return ye}(ne,E,b),le(se(ne,E),z))}function ue(ne,E){for(var b=0,z=ne.buffer.lines.get(E),x=z&&z.isWrapped;x&&E>=0&&E<ne.rows;)b++,x=(z=ne.buffer.lines.get(--E))&&z.isWrapped;return b}function se(ne,E){return ne>E?"A":"B"}function te(ne,E,b,z,x,re){for(var ae=ne,oe=E,ve="";ae!==b||oe!==z;)ae+=x?1:-1,x&&ae>re.cols-1?(ve+=re.buffer.translateBufferLineToString(oe,!1,ne,ae),ae=0,ne=0,oe++):!x&&ae<0&&(ve+=re.buffer.translateBufferLineToString(oe,!1,0,ne+1),ne=ae=re.cols-1,oe--);return ve+re.buffer.translateBufferLineToString(oe,!1,ne,ae)}function le(ne,E){var b=E?"O":"[";return ie.C0.ESC+b+ne}function ee(ne,E){ne=Math.floor(ne);for(var b="",z=0;z<ne;z++)b+=E;return b}be.moveToCellSequence=function(ne,E,b,z){var x,re=b.buffer.x,ae=b.buffer.y;if(!b.buffer.hasScrollback)return function(ve,ye,me,ge,_e,he){return Ce(ye,ge,_e,he).length===0?"":ee(te(ve,ye,ve,ye-ue(_e,ye),!1,_e).length,le("D",he))}(re,ae,0,E,b,z)+Ce(ae,E,b,z)+function(ve,ye,me,ge,_e,he){var pe;pe=Ce(ye,ge,_e,he).length>0?ge-ue(_e,ge):ye;var ke=ge,Te=function(Ee,Oe,je,Pe,Qe,Xe){var ot;return ot=Ce(je,Pe,Qe,Xe).length>0?Pe-ue(Qe,Pe):Oe,Ee<je&&ot<=Pe||Ee>=je&&ot<Pe?"C":"D"}(ve,ye,me,ge,_e,he);return ee(te(ve,pe,me,ke,Te==="C",_e).length,le(Te,he))}(re,ae,ne,E,b,z);if(ae===E)return x=re>ne?"D":"C",ee(Math.abs(re-ne),le(x,z));x=ae>E?"D":"C";var oe=Math.abs(ae-E);return ee(function(ve,ye){return ye.cols-ve}(ae>E?ne:re,b)+(oe-1)*b.cols+1+((ae>E?re:ne)-1),le(x,z))}},function(Dt,be,ce){"use strict";var ie=this&&this.__decorate||function(te,le,ee,ne){var E,b=arguments.length,z=b<3?le:ne===null?ne=Object.getOwnPropertyDescriptor(le,ee):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(te,le,ee,ne);else for(var x=te.length-1;x>=0;x--)(E=te[x])&&(z=(b<3?E(z):b>3?E(le,ee,z):E(le,ee))||z);return b>3&&z&&Object.defineProperty(le,ee,z),z},Ce=this&&this.__param||function(te,le){return function(ee,ne){le(ee,ne,te)}};Object.defineProperty(be,"__esModule",{value:!0}),be.SoundService=void 0;var ue=ce(1),se=function(){function te(le){this._optionsService=le}return Object.defineProperty(te,"audioContext",{get:function(){if(!te._audioContext){var le=window.AudioContext||window.webkitAudioContext;if(!le)return console.warn("Web Audio API is not supported by this browser. Consider upgrading to the latest version"),null;te._audioContext=new le}return te._audioContext},enumerable:!1,configurable:!0}),te.prototype.playBellSound=function(){var le=te.audioContext;if(le){var ee=le.createBufferSource();le.decodeAudioData(this._base64ToArrayBuffer(this._removeMimeType(this._optionsService.options.bellSound)),function(ne){ee.buffer=ne,ee.connect(le.destination),ee.start(0)})}},te.prototype._base64ToArrayBuffer=function(le){for(var ee=window.atob(le),ne=ee.length,E=new Uint8Array(ne),b=0;b<ne;b++)E[b]=ee.charCodeAt(b);return E.buffer},te.prototype._removeMimeType=function(le){return le.split(",")[1]},te=ie([Ce(0,ue.IOptionsService)],te)}();be.SoundService=se},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(b,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,re){x.__proto__=re}||function(x,re){for(var ae in re)re.hasOwnProperty(ae)&&(x[ae]=re[ae])})(b,z)},function(b,z){function x(){this.constructor=b}ie(b,z),b.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)}),ue=this&&this.__decorate||function(b,z,x,re){var ae,oe=arguments.length,ve=oe<3?z:re===null?re=Object.getOwnPropertyDescriptor(z,x):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(b,z,x,re);else for(var ye=b.length-1;ye>=0;ye--)(ae=b[ye])&&(ve=(oe<3?ae(ve):oe>3?ae(z,x,ve):ae(z,x))||ve);return oe>3&&ve&&Object.defineProperty(z,x,ve),ve},se=this&&this.__param||function(b,z){return function(x,re){z(x,re,b)}};Object.defineProperty(be,"__esModule",{value:!0}),be.MouseZoneManager=void 0;var te=ce(2),le=ce(7),ee=ce(5),ne=ce(1),E=function(b){function z(x,re,ae,oe,ve,ye){var me=b.call(this)||this;return me._element=x,me._screenElement=re,me._bufferService=ae,me._mouseService=oe,me._selectionService=ve,me._optionsService=ye,me._zones=[],me._areZonesActive=!1,me._lastHoverCoords=[void 0,void 0],me._initialSelectionLength=0,me.register(le.addDisposableDomListener(me._element,"mousedown",function(ge){return me._onMouseDown(ge)})),me._mouseMoveListener=function(ge){return me._onMouseMove(ge)},me._mouseLeaveListener=function(ge){return me._onMouseLeave(ge)},me._clickListener=function(ge){return me._onClick(ge)},me}return Ce(z,b),z.prototype.dispose=function(){b.prototype.dispose.call(this),this._deactivate()},z.prototype.add=function(x){this._zones.push(x),this._zones.length===1&&this._activate()},z.prototype.clearAll=function(x,re){if(this._zones.length!==0){x&&re||(x=0,re=this._bufferService.rows-1);for(var ae=0;ae<this._zones.length;ae++){var oe=this._zones[ae];(oe.y1>x&&oe.y1<=re+1||oe.y2>x&&oe.y2<=re+1||oe.y1<x&&oe.y2>re+1)&&(this._currentZone&&this._currentZone===oe&&(this._currentZone.leaveCallback(),this._currentZone=void 0),this._zones.splice(ae--,1))}this._zones.length===0&&this._deactivate()}},z.prototype._activate=function(){this._areZonesActive||(this._areZonesActive=!0,this._element.addEventListener("mousemove",this._mouseMoveListener),this._element.addEventListener("mouseleave",this._mouseLeaveListener),this._element.addEventListener("click",this._clickListener))},z.prototype._deactivate=function(){this._areZonesActive&&(this._areZonesActive=!1,this._element.removeEventListener("mousemove",this._mouseMoveListener),this._element.removeEventListener("mouseleave",this._mouseLeaveListener),this._element.removeEventListener("click",this._clickListener))},z.prototype._onMouseMove=function(x){this._lastHoverCoords[0]===x.pageX&&this._lastHoverCoords[1]===x.pageY||(this._onHover(x),this._lastHoverCoords=[x.pageX,x.pageY])},z.prototype._onHover=function(x){var re=this,ae=this._findZoneEventAt(x);ae!==this._currentZone&&(this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout)),ae&&(this._currentZone=ae,ae.hoverCallback&&ae.hoverCallback(x),this._tooltipTimeout=window.setTimeout(function(){return re._onTooltip(x)},this._optionsService.options.linkTooltipHoverDuration)))},z.prototype._onTooltip=function(x){this._tooltipTimeout=void 0;var re=this._findZoneEventAt(x);re&&re.tooltipCallback&&re.tooltipCallback(x)},z.prototype._onMouseDown=function(x){if(this._initialSelectionLength=this._getSelectionLength(),this._areZonesActive){var re=this._findZoneEventAt(x);re!=null&&re.willLinkActivate(x)&&(x.preventDefault(),x.stopImmediatePropagation())}},z.prototype._onMouseLeave=function(x){this._currentZone&&(this._currentZone.leaveCallback(),this._currentZone=void 0,this._tooltipTimeout&&clearTimeout(this._tooltipTimeout))},z.prototype._onClick=function(x){var re=this._findZoneEventAt(x),ae=this._getSelectionLength();re&&ae===this._initialSelectionLength&&(re.clickCallback(x),x.preventDefault(),x.stopImmediatePropagation())},z.prototype._getSelectionLength=function(){var x=this._selectionService.selectionText;return x?x.length:0},z.prototype._findZoneEventAt=function(x){var re=this._mouseService.getCoords(x,this._screenElement,this._bufferService.cols,this._bufferService.rows);if(re)for(var ae=re[0],oe=re[1],ve=0;ve<this._zones.length;ve++){var ye=this._zones[ve];if(ye.y1===ye.y2){if(oe===ye.y1&&ae>=ye.x1&&ae<ye.x2)return ye}else if(oe===ye.y1&&ae>=ye.x1||oe===ye.y2&&ae<ye.x2||oe>ye.y1&&oe<ye.y2)return ye}},z=ue([se(2,ne.IBufferService),se(3,ee.IMouseService),se(4,ee.ISelectionService),se(5,ne.IOptionsService)],z)}(te.Disposable);be.MouseZoneManager=E},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(z,x){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(re,ae){re.__proto__=ae}||function(re,ae){for(var oe in ae)ae.hasOwnProperty(oe)&&(re[oe]=ae[oe])})(z,x)},function(z,x){function re(){this.constructor=z}ie(z,x),z.prototype=x===null?Object.create(x):(re.prototype=x.prototype,new re)});Object.defineProperty(be,"__esModule",{value:!0}),be.AccessibilityManager=void 0;var ue=ce(18),se=ce(11),te=ce(31),le=ce(7),ee=ce(2),ne=ce(32),E=ce(17),b=function(z){function x(re,ae){var oe=z.call(this)||this;oe._terminal=re,oe._renderService=ae,oe._liveRegionLineCount=0,oe._charsToConsume=[],oe._charsToAnnounce="",oe._accessibilityTreeRoot=document.createElement("div"),oe._accessibilityTreeRoot.classList.add("xterm-accessibility"),oe._rowContainer=document.createElement("div"),oe._rowContainer.classList.add("xterm-accessibility-tree"),oe._rowContainer.setAttribute("role","list"),oe._rowElements=[];for(var ve=0;ve<oe._terminal.rows;ve++)oe._rowElements[ve]=oe._createAccessibilityTreeNode(),oe._rowContainer.appendChild(oe._rowElements[ve]);if(oe._topBoundaryFocusListener=function(ye){return oe._onBoundaryFocus(ye,0)},oe._bottomBoundaryFocusListener=function(ye){return oe._onBoundaryFocus(ye,1)},oe._rowElements[0].addEventListener("focus",oe._topBoundaryFocusListener),oe._rowElements[oe._rowElements.length-1].addEventListener("focus",oe._bottomBoundaryFocusListener),oe._refreshRowsDimensions(),oe._accessibilityTreeRoot.appendChild(oe._rowContainer),oe._renderRowsDebouncer=new te.RenderDebouncer(oe._renderRows.bind(oe)),oe._refreshRows(),oe._liveRegion=document.createElement("div"),oe._liveRegion.classList.add("live-region"),oe._liveRegion.setAttribute("aria-live","assertive"),oe._accessibilityTreeRoot.appendChild(oe._liveRegion),!oe._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");return oe._terminal.element.insertAdjacentElement("afterbegin",oe._accessibilityTreeRoot),oe.register(oe._renderRowsDebouncer),oe.register(oe._terminal.onResize(function(ye){return oe._onResize(ye.rows)})),oe.register(oe._terminal.onRender(function(ye){return oe._refreshRows(ye.start,ye.end)})),oe.register(oe._terminal.onScroll(function(){return oe._refreshRows()})),oe.register(oe._terminal.onA11yChar(function(ye){return oe._onChar(ye)})),oe.register(oe._terminal.onLineFeed(function(){return oe._onChar(`
|
|
|
`)})),oe.register(oe._terminal.onA11yTab(function(ye){return oe._onTab(ye)})),oe.register(oe._terminal.onKey(function(ye){return oe._onKey(ye.key)})),oe.register(oe._terminal.onBlur(function(){return oe._clearLiveRegion()})),oe.register(oe._renderService.onDimensionsChange(function(){return oe._refreshRowsDimensions()})),oe._screenDprMonitor=new ne.ScreenDprMonitor,oe.register(oe._screenDprMonitor),oe._screenDprMonitor.setListener(function(){return oe._refreshRowsDimensions()}),oe.register(le.addDisposableDomListener(window,"resize",function(){return oe._refreshRowsDimensions()})),oe}return Ce(x,z),x.prototype.dispose=function(){z.prototype.dispose.call(this),E.removeElementFromParent(this._accessibilityTreeRoot),this._rowElements.length=0},x.prototype._onBoundaryFocus=function(re,ae){var oe=re.target,ve=this._rowElements[ae===0?1:this._rowElements.length-2];if(oe.getAttribute("aria-posinset")!==(ae===0?"1":""+this._terminal.buffer.lines.length)&&re.relatedTarget===ve){var ye,me;if(ae===0?(ye=oe,me=this._rowElements.pop(),this._rowContainer.removeChild(me)):(ye=this._rowElements.shift(),me=oe,this._rowContainer.removeChild(ye)),ye.removeEventListener("focus",this._topBoundaryFocusListener),me.removeEventListener("focus",this._bottomBoundaryFocusListener),ae===0){var ge=this._createAccessibilityTreeNode();this._rowElements.unshift(ge),this._rowContainer.insertAdjacentElement("afterbegin",ge)}else ge=this._createAccessibilityTreeNode(),this._rowElements.push(ge),this._rowContainer.appendChild(ge);this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(ae===0?-1:1),this._rowElements[ae===0?1:this._rowElements.length-2].focus(),re.preventDefault(),re.stopImmediatePropagation()}},x.prototype._onResize=function(re){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(var ae=this._rowContainer.children.length;ae<this._terminal.rows;ae++)this._rowElements[ae]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[ae]);for(;this._rowElements.length>re;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()},x.prototype._createAccessibilityTreeNode=function(){var re=document.createElement("div");return re.setAttribute("role","listitem"),re.tabIndex=-1,this._refreshRowDimensions(re),re},x.prototype._onTab=function(re){for(var ae=0;ae<re;ae++)this._onChar(" ")},x.prototype._onChar=function(re){var ae=this;this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==re&&(this._charsToAnnounce+=re):this._charsToAnnounce+=re,re===`
|
|
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=ue.tooMuchOutput)),se.isMac&&this._liveRegion.textContent&&this._liveRegion.textContent.length>0&&!this._liveRegion.parentNode&&setTimeout(function(){ae._accessibilityTreeRoot.appendChild(ae._liveRegion)},0))},x.prototype._clearLiveRegion=function(){this._liveRegion.textContent="",this._liveRegionLineCount=0,se.isMac&&E.removeElementFromParent(this._liveRegion)},x.prototype._onKey=function(re){this._clearLiveRegion(),this._charsToConsume.push(re)},x.prototype._refreshRows=function(re,ae){this._renderRowsDebouncer.refresh(re,ae,this._terminal.rows)},x.prototype._renderRows=function(re,ae){for(var oe=this._terminal.buffer,ve=oe.lines.length.toString(),ye=re;ye<=ae;ye++){var me=oe.translateBufferLineToString(oe.ydisp+ye,!0),ge=(oe.ydisp+ye+1).toString(),_e=this._rowElements[ye];_e&&(me.length===0?_e.innerHTML=" ":_e.textContent=me,_e.setAttribute("aria-posinset",ge),_e.setAttribute("aria-setsize",ve))}this._announceCharacters()},x.prototype._refreshRowsDimensions=function(){if(this._renderService.dimensions.actualCellHeight){this._rowElements.length!==this._terminal.rows&&this._onResize(this._terminal.rows);for(var re=0;re<this._terminal.rows;re++)this._refreshRowDimensions(this._rowElements[re])}},x.prototype._refreshRowDimensions=function(re){re.style.height=this._renderService.dimensions.actualCellHeight+"px"},x.prototype._announceCharacters=function(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")},x}(ee.Disposable);be.AccessibilityManager=b},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(oe,ve){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ye,me){ye.__proto__=me}||function(ye,me){for(var ge in me)me.hasOwnProperty(ge)&&(ye[ge]=me[ge])})(oe,ve)},function(oe,ve){function ye(){this.constructor=oe}ie(oe,ve),oe.prototype=ve===null?Object.create(ve):(ye.prototype=ve.prototype,new ye)}),ue=this&&this.__decorate||function(oe,ve,ye,me){var ge,_e=arguments.length,he=_e<3?ve:me===null?me=Object.getOwnPropertyDescriptor(ve,ye):me;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")he=Reflect.decorate(oe,ve,ye,me);else for(var pe=oe.length-1;pe>=0;pe--)(ge=oe[pe])&&(he=(_e<3?ge(he):_e>3?ge(ve,ye,he):ge(ve,ye))||he);return _e>3&&he&&Object.defineProperty(ve,ye,he),he},se=this&&this.__param||function(oe,ve){return function(ye,me){ve(ye,me,oe)}};Object.defineProperty(be,"__esModule",{value:!0}),be.DomRenderer=void 0;var te=ce(58),le=ce(9),ee=ce(2),ne=ce(5),E=ce(1),b=ce(0),z=ce(10),x=ce(17),re=1,ae=function(oe){function ve(ye,me,ge,_e,he,pe,ke,Te,Ee){var Oe=oe.call(this)||this;return Oe._colors=ye,Oe._element=me,Oe._screenElement=ge,Oe._viewportElement=_e,Oe._linkifier=he,Oe._linkifier2=pe,Oe._charSizeService=ke,Oe._optionsService=Te,Oe._bufferService=Ee,Oe._terminalClass=re++,Oe._rowElements=[],Oe._rowContainer=document.createElement("div"),Oe._rowContainer.classList.add("xterm-rows"),Oe._rowContainer.style.lineHeight="normal",Oe._rowContainer.setAttribute("aria-hidden","true"),Oe._refreshRowElements(Oe._bufferService.cols,Oe._bufferService.rows),Oe._selectionContainer=document.createElement("div"),Oe._selectionContainer.classList.add("xterm-selection"),Oe._selectionContainer.setAttribute("aria-hidden","true"),Oe.dimensions={scaledCharWidth:0,scaledCharHeight:0,scaledCellWidth:0,scaledCellHeight:0,scaledCharLeft:0,scaledCharTop:0,scaledCanvasWidth:0,scaledCanvasHeight:0,canvasWidth:0,canvasHeight:0,actualCellWidth:0,actualCellHeight:0},Oe._updateDimensions(),Oe._injectCss(),Oe._rowFactory=new te.DomRendererRowFactory(document,Oe._optionsService,Oe._colors),Oe._element.classList.add("xterm-dom-renderer-owner-"+Oe._terminalClass),Oe._screenElement.appendChild(Oe._rowContainer),Oe._screenElement.appendChild(Oe._selectionContainer),Oe._linkifier.onShowLinkUnderline(function(je){return Oe._onLinkHover(je)}),Oe._linkifier.onHideLinkUnderline(function(je){return Oe._onLinkLeave(je)}),Oe._linkifier2.onShowLinkUnderline(function(je){return Oe._onLinkHover(je)}),Oe._linkifier2.onHideLinkUnderline(function(je){return Oe._onLinkLeave(je)}),Oe}return Ce(ve,oe),Object.defineProperty(ve.prototype,"onRequestRedraw",{get:function(){return new b.EventEmitter().event},enumerable:!1,configurable:!0}),ve.prototype.dispose=function(){this._element.classList.remove("xterm-dom-renderer-owner-"+this._terminalClass),x.removeElementFromParent(this._rowContainer,this._selectionContainer,this._themeStyleElement,this._dimensionsStyleElement),oe.prototype.dispose.call(this)},ve.prototype._updateDimensions=function(){this.dimensions.scaledCharWidth=this._charSizeService.width*window.devicePixelRatio,this.dimensions.scaledCharHeight=Math.ceil(this._charSizeService.height*window.devicePixelRatio),this.dimensions.scaledCellWidth=this.dimensions.scaledCharWidth+Math.round(this._optionsService.options.letterSpacing),this.dimensions.scaledCellHeight=Math.floor(this.dimensions.scaledCharHeight*this._optionsService.options.lineHeight),this.dimensions.scaledCharLeft=0,this.dimensions.scaledCharTop=0,this.dimensions.scaledCanvasWidth=this.dimensions.scaledCellWidth*this._bufferService.cols,this.dimensions.scaledCanvasHeight=this.dimensions.scaledCellHeight*this._bufferService.rows,this.dimensions.canvasWidth=Math.round(this.dimensions.scaledCanvasWidth/window.devicePixelRatio),this.dimensions.canvasHeight=Math.round(this.dimensions.scaledCanvasHeight/window.devicePixelRatio),this.dimensions.actualCellWidth=this.dimensions.canvasWidth/this._bufferService.cols,this.dimensions.actualCellHeight=this.dimensions.canvasHeight/this._bufferService.rows;for(var ye=0,me=this._rowElements;ye<me.length;ye++){var ge=me[ye];ge.style.width=this.dimensions.canvasWidth+"px",ge.style.height=this.dimensions.actualCellHeight+"px",ge.style.lineHeight=this.dimensions.actualCellHeight+"px",ge.style.overflow="hidden"}this._dimensionsStyleElement||(this._dimensionsStyleElement=document.createElement("style"),this._screenElement.appendChild(this._dimensionsStyleElement));var _e=this._terminalSelector+" .xterm-rows span { display: inline-block; height: 100%; vertical-align: top; width: "+this.dimensions.actualCellWidth+"px}";this._dimensionsStyleElement.innerHTML=_e,this._selectionContainer.style.height=this._viewportElement.style.height,this._screenElement.style.width=this.dimensions.canvasWidth+"px",this._screenElement.style.height=this.dimensions.canvasHeight+"px"},ve.prototype.setColors=function(ye){this._colors=ye,this._injectCss()},ve.prototype._injectCss=function(){var ye=this;this._themeStyleElement||(this._themeStyleElement=document.createElement("style"),this._screenElement.appendChild(this._themeStyleElement));var me=this._terminalSelector+" .xterm-rows { color: "+this._colors.foreground.css+"; font-family: "+this._optionsService.options.fontFamily+"; font-size: "+this._optionsService.options.fontSize+"px;}";me+=this._terminalSelector+" span:not(."+te.BOLD_CLASS+") { font-weight: "+this._optionsService.options.fontWeight+";}"+this._terminalSelector+" span."+te.BOLD_CLASS+" { font-weight: "+this._optionsService.options.fontWeightBold+";}"+this._terminalSelector+" span."+te.ITALIC_CLASS+" { font-style: italic;}",me+="@keyframes blink_box_shadow_"+this._terminalClass+" { 50% { box-shadow: none; }}",me+="@keyframes blink_block_"+this._terminalClass+" { 0% { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+"; } 50% { background-color: "+this._colors.cursorAccent.css+"; color: "+this._colors.cursor.css+"; }}",me+=this._terminalSelector+" .xterm-rows:not(.xterm-focus) ."+te.CURSOR_CLASS+"."+te.CURSOR_STYLE_BLOCK_CLASS+" { outline: 1px solid "+this._colors.cursor.css+"; outline-offset: -1px;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+te.CURSOR_CLASS+"."+te.CURSOR_BLINK_CLASS+":not(."+te.CURSOR_STYLE_BLOCK_CLASS+") { animation: blink_box_shadow_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+te.CURSOR_CLASS+"."+te.CURSOR_BLINK_CLASS+"."+te.CURSOR_STYLE_BLOCK_CLASS+" { animation: blink_block_"+this._terminalClass+" 1s step-end infinite;}"+this._terminalSelector+" .xterm-rows.xterm-focus ."+te.CURSOR_CLASS+"."+te.CURSOR_STYLE_BLOCK_CLASS+" { background-color: "+this._colors.cursor.css+"; color: "+this._colors.cursorAccent.css+";}"+this._terminalSelector+" .xterm-rows ."+te.CURSOR_CLASS+"."+te.CURSOR_STYLE_BAR_CLASS+" { box-shadow: "+this._optionsService.options.cursorWidth+"px 0 0 "+this._colors.cursor.css+" inset;}"+this._terminalSelector+" .xterm-rows ."+te.CURSOR_CLASS+"."+te.CURSOR_STYLE_UNDERLINE_CLASS+" { box-shadow: 0 -1px 0 "+this._colors.cursor.css+" inset;}",me+=this._terminalSelector+" .xterm-selection { position: absolute; top: 0; left: 0; z-index: 1; pointer-events: none;}"+this._terminalSelector+" .xterm-selection div { position: absolute; background-color: "+this._colors.selectionTransparent.css+";}",this._colors.ansi.forEach(function(ge,_e){me+=ye._terminalSelector+" .xterm-fg-"+_e+" { color: "+ge.css+"; }"+ye._terminalSelector+" .xterm-bg-"+_e+" { background-color: "+ge.css+"; }"}),me+=this._terminalSelector+" .xterm-fg-"+le.INVERTED_DEFAULT_COLOR+" { color: "+z.color.opaque(this._colors.background).css+"; }"+this._terminalSelector+" .xterm-bg-"+le.INVERTED_DEFAULT_COLOR+" { background-color: "+this._colors.foreground.css+"; }",this._themeStyleElement.innerHTML=me},ve.prototype.onDevicePixelRatioChange=function(){this._updateDimensions()},ve.prototype._refreshRowElements=function(ye,me){for(var ge=this._rowElements.length;ge<=me;ge++){var _e=document.createElement("div");this._rowContainer.appendChild(_e),this._rowElements.push(_e)}for(;this._rowElements.length>me;)this._rowContainer.removeChild(this._rowElements.pop())},ve.prototype.onResize=function(ye,me){this._refreshRowElements(ye,me),this._updateDimensions()},ve.prototype.onCharSizeChanged=function(){this._updateDimensions()},ve.prototype.onBlur=function(){this._rowContainer.classList.remove("xterm-focus")},ve.prototype.onFocus=function(){this._rowContainer.classList.add("xterm-focus")},ve.prototype.onSelectionChanged=function(ye,me,ge){for(;this._selectionContainer.children.length;)this._selectionContainer.removeChild(this._selectionContainer.children[0]);if(ye&&me){var _e=ye[1]-this._bufferService.buffer.ydisp,he=me[1]-this._bufferService.buffer.ydisp,pe=Math.max(_e,0),ke=Math.min(he,this._bufferService.rows-1);if(!(pe>=this._bufferService.rows||ke<0)){var Te=document.createDocumentFragment();if(ge)Te.appendChild(this._createSelectionElement(pe,ye[0],me[0],ke-pe+1));else{var Ee=_e===pe?ye[0]:0,Oe=pe===ke?me[0]:this._bufferService.cols;Te.appendChild(this._createSelectionElement(pe,Ee,Oe));var je=ke-pe-1;if(Te.appendChild(this._createSelectionElement(pe+1,0,this._bufferService.cols,je)),pe!==ke){var Pe=he===ke?me[0]:this._bufferService.cols;Te.appendChild(this._createSelectionElement(ke,0,Pe))}}this._selectionContainer.appendChild(Te)}}},ve.prototype._createSelectionElement=function(ye,me,ge,_e){_e===void 0&&(_e=1);var he=document.createElement("div");return he.style.height=_e*this.dimensions.actualCellHeight+"px",he.style.top=ye*this.dimensions.actualCellHeight+"px",he.style.left=me*this.dimensions.actualCellWidth+"px",he.style.width=this.dimensions.actualCellWidth*(ge-me)+"px",he},ve.prototype.onCursorMove=function(){},ve.prototype.onOptionsChanged=function(){this._updateDimensions(),this._injectCss()},ve.prototype.clear=function(){for(var ye=0,me=this._rowElements;ye<me.length;ye++)me[ye].innerHTML=""},ve.prototype.renderRows=function(ye,me){for(var ge=this._bufferService.buffer.ybase+this._bufferService.buffer.y,_e=Math.min(this._bufferService.buffer.x,this._bufferService.cols-1),he=this._optionsService.options.cursorBlink,pe=ye;pe<=me;pe++){var ke=this._rowElements[pe];ke.innerHTML="";var Te=pe+this._bufferService.buffer.ydisp,Ee=this._bufferService.buffer.lines.get(Te),Oe=this._optionsService.options.cursorStyle;ke.appendChild(this._rowFactory.createRow(Ee,Te===ge,Oe,_e,he,this.dimensions.actualCellWidth,this._bufferService.cols))}},Object.defineProperty(ve.prototype,"_terminalSelector",{get:function(){return".xterm-dom-renderer-owner-"+this._terminalClass},enumerable:!1,configurable:!0}),ve.prototype.registerCharacterJoiner=function(ye){return-1},ve.prototype.deregisterCharacterJoiner=function(ye){return!1},ve.prototype._onLinkHover=function(ye){this._setCellUnderline(ye.x1,ye.x2,ye.y1,ye.y2,ye.cols,!0)},ve.prototype._onLinkLeave=function(ye){this._setCellUnderline(ye.x1,ye.x2,ye.y1,ye.y2,ye.cols,!1)},ve.prototype._setCellUnderline=function(ye,me,ge,_e,he,pe){for(;ye!==me||ge!==_e;){var ke=this._rowElements[ge];if(!ke)return;var Te=ke.children[ye];Te&&(Te.style.textDecoration=pe?"underline":"none"),++ye>=he&&(ye=0,ge++)}},ve=ue([se(6,ne.ICharSizeService),se(7,E.IOptionsService),se(8,E.IBufferService)],ve)}(ee.Disposable);be.DomRenderer=ae},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.DomRendererRowFactory=be.CURSOR_STYLE_UNDERLINE_CLASS=be.CURSOR_STYLE_BAR_CLASS=be.CURSOR_STYLE_BLOCK_CLASS=be.CURSOR_BLINK_CLASS=be.CURSOR_CLASS=be.UNDERLINE_CLASS=be.ITALIC_CLASS=be.DIM_CLASS=be.BOLD_CLASS=void 0;var ie=ce(9),Ce=ce(3),ue=ce(4),se=ce(10);be.BOLD_CLASS="xterm-bold",be.DIM_CLASS="xterm-dim",be.ITALIC_CLASS="xterm-italic",be.UNDERLINE_CLASS="xterm-underline",be.CURSOR_CLASS="xterm-cursor",be.CURSOR_BLINK_CLASS="xterm-cursor-blink",be.CURSOR_STYLE_BLOCK_CLASS="xterm-cursor-block",be.CURSOR_STYLE_BAR_CLASS="xterm-cursor-bar",be.CURSOR_STYLE_UNDERLINE_CLASS="xterm-cursor-underline";var te=function(){function ee(ne,E,b){this._document=ne,this._optionsService=E,this._colors=b,this._workCell=new ue.CellData}return ee.prototype.setColors=function(ne){this._colors=ne},ee.prototype.createRow=function(ne,E,b,z,x,re,ae){for(var oe=this._document.createDocumentFragment(),ve=0,ye=Math.min(ne.length,ae)-1;ye>=0;ye--)if(ne.loadCell(ye,this._workCell).getCode()!==Ce.NULL_CELL_CODE||E&&ye===z){ve=ye+1;break}for(ye=0;ye<ve;ye++){ne.loadCell(ye,this._workCell);var me=this._workCell.getWidth();if(me!==0){var ge=this._document.createElement("span");if(me>1&&(ge.style.width=re*me+"px"),E&&ye===z)switch(ge.classList.add(be.CURSOR_CLASS),x&&ge.classList.add(be.CURSOR_BLINK_CLASS),b){case"bar":ge.classList.add(be.CURSOR_STYLE_BAR_CLASS);break;case"underline":ge.classList.add(be.CURSOR_STYLE_UNDERLINE_CLASS);break;default:ge.classList.add(be.CURSOR_STYLE_BLOCK_CLASS)}this._workCell.isBold()&&ge.classList.add(be.BOLD_CLASS),this._workCell.isItalic()&&ge.classList.add(be.ITALIC_CLASS),this._workCell.isDim()&&ge.classList.add(be.DIM_CLASS),this._workCell.isUnderline()&&ge.classList.add(be.UNDERLINE_CLASS),this._workCell.isInvisible()?ge.textContent=Ce.WHITESPACE_CELL_CHAR:ge.textContent=this._workCell.getChars()||Ce.WHITESPACE_CELL_CHAR;var _e=this._workCell.getFgColor(),he=this._workCell.getFgColorMode(),pe=this._workCell.getBgColor(),ke=this._workCell.getBgColorMode(),Te=!!this._workCell.isInverse();if(Te){var Ee=_e;_e=pe,pe=Ee;var Oe=he;he=ke,ke=Oe}switch(he){case 16777216:case 33554432:this._workCell.isBold()&&_e<8&&this._optionsService.options.drawBoldTextInBrightColors&&(_e+=8),this._applyMinimumContrast(ge,this._colors.background,this._colors.ansi[_e])||ge.classList.add("xterm-fg-"+_e);break;case 50331648:var je=se.rgba.toColor(_e>>16&255,_e>>8&255,255&_e);this._applyMinimumContrast(ge,this._colors.background,je)||this._addStyle(ge,"color:#"+le(_e.toString(16),"0",6));break;case 0:default:this._applyMinimumContrast(ge,this._colors.background,this._colors.foreground)||Te&&ge.classList.add("xterm-fg-"+ie.INVERTED_DEFAULT_COLOR)}switch(ke){case 16777216:case 33554432:ge.classList.add("xterm-bg-"+pe);break;case 50331648:this._addStyle(ge,"background-color:#"+le(pe.toString(16),"0",6));break;case 0:default:Te&&ge.classList.add("xterm-bg-"+ie.INVERTED_DEFAULT_COLOR)}oe.appendChild(ge)}}return oe},ee.prototype._applyMinimumContrast=function(ne,E,b){if(this._optionsService.options.minimumContrastRatio===1)return!1;var z=this._colors.contrastCache.getColor(this._workCell.bg,this._workCell.fg);return z===void 0&&(z=se.color.ensureContrastRatio(E,b,this._optionsService.options.minimumContrastRatio),this._colors.contrastCache.setColor(this._workCell.bg,this._workCell.fg,z!=null?z:null)),!!z&&(this._addStyle(ne,"color:"+z.css),!0)},ee.prototype._addStyle=function(ne,E){ne.setAttribute("style",""+(ne.getAttribute("style")||"")+E+";")},ee}();function le(ee,ne,E){for(;ee.length<E;)ee=ne+ee;return ee}be.DomRendererRowFactory=te},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.evaluateKeyboardEvent=void 0;var ie=ce(12),Ce={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};be.evaluateKeyboardEvent=function(ue,se,te,le){var ee={type:0,cancel:!1,key:void 0},ne=(ue.shiftKey?1:0)|(ue.altKey?2:0)|(ue.ctrlKey?4:0)|(ue.metaKey?8:0);switch(ue.keyCode){case 0:ue.key==="UIKeyInputUpArrow"?ee.key=se?ie.C0.ESC+"OA":ie.C0.ESC+"[A":ue.key==="UIKeyInputLeftArrow"?ee.key=se?ie.C0.ESC+"OD":ie.C0.ESC+"[D":ue.key==="UIKeyInputRightArrow"?ee.key=se?ie.C0.ESC+"OC":ie.C0.ESC+"[C":ue.key==="UIKeyInputDownArrow"&&(ee.key=se?ie.C0.ESC+"OB":ie.C0.ESC+"[B");break;case 8:if(ue.shiftKey){ee.key=ie.C0.BS;break}if(ue.altKey){ee.key=ie.C0.ESC+ie.C0.DEL;break}ee.key=ie.C0.DEL;break;case 9:if(ue.shiftKey){ee.key=ie.C0.ESC+"[Z";break}ee.key=ie.C0.HT,ee.cancel=!0;break;case 13:ee.key=ue.altKey?ie.C0.ESC+ie.C0.CR:ie.C0.CR,ee.cancel=!0;break;case 27:ee.key=ie.C0.ESC,ue.altKey&&(ee.key=ie.C0.ESC+ie.C0.ESC),ee.cancel=!0;break;case 37:if(ue.metaKey)break;ne?(ee.key=ie.C0.ESC+"[1;"+(ne+1)+"D",ee.key===ie.C0.ESC+"[1;3D"&&(ee.key=ie.C0.ESC+(te?"b":"[1;5D"))):ee.key=se?ie.C0.ESC+"OD":ie.C0.ESC+"[D";break;case 39:if(ue.metaKey)break;ne?(ee.key=ie.C0.ESC+"[1;"+(ne+1)+"C",ee.key===ie.C0.ESC+"[1;3C"&&(ee.key=ie.C0.ESC+(te?"f":"[1;5C"))):ee.key=se?ie.C0.ESC+"OC":ie.C0.ESC+"[C";break;case 38:if(ue.metaKey)break;ne?(ee.key=ie.C0.ESC+"[1;"+(ne+1)+"A",te||ee.key!==ie.C0.ESC+"[1;3A"||(ee.key=ie.C0.ESC+"[1;5A")):ee.key=se?ie.C0.ESC+"OA":ie.C0.ESC+"[A";break;case 40:if(ue.metaKey)break;ne?(ee.key=ie.C0.ESC+"[1;"+(ne+1)+"B",te||ee.key!==ie.C0.ESC+"[1;3B"||(ee.key=ie.C0.ESC+"[1;5B")):ee.key=se?ie.C0.ESC+"OB":ie.C0.ESC+"[B";break;case 45:ue.shiftKey||ue.ctrlKey||(ee.key=ie.C0.ESC+"[2~");break;case 46:ee.key=ne?ie.C0.ESC+"[3;"+(ne+1)+"~":ie.C0.ESC+"[3~";break;case 36:ee.key=ne?ie.C0.ESC+"[1;"+(ne+1)+"H":se?ie.C0.ESC+"OH":ie.C0.ESC+"[H";break;case 35:ee.key=ne?ie.C0.ESC+"[1;"+(ne+1)+"F":se?ie.C0.ESC+"OF":ie.C0.ESC+"[F";break;case 33:ue.shiftKey?ee.type=2:ee.key=ie.C0.ESC+"[5~";break;case 34:ue.shiftKey?ee.type=3:ee.key=ie.C0.ESC+"[6~";break;case 112:ee.key=ne?ie.C0.ESC+"[1;"+(ne+1)+"P":ie.C0.ESC+"OP";break;case 113:ee.key=ne?ie.C0.ESC+"[1;"+(ne+1)+"Q":ie.C0.ESC+"OQ";break;case 114:ee.key=ne?ie.C0.ESC+"[1;"+(ne+1)+"R":ie.C0.ESC+"OR";break;case 115:ee.key=ne?ie.C0.ESC+"[1;"+(ne+1)+"S":ie.C0.ESC+"OS";break;case 116:ee.key=ne?ie.C0.ESC+"[15;"+(ne+1)+"~":ie.C0.ESC+"[15~";break;case 117:ee.key=ne?ie.C0.ESC+"[17;"+(ne+1)+"~":ie.C0.ESC+"[17~";break;case 118:ee.key=ne?ie.C0.ESC+"[18;"+(ne+1)+"~":ie.C0.ESC+"[18~";break;case 119:ee.key=ne?ie.C0.ESC+"[19;"+(ne+1)+"~":ie.C0.ESC+"[19~";break;case 120:ee.key=ne?ie.C0.ESC+"[20;"+(ne+1)+"~":ie.C0.ESC+"[20~";break;case 121:ee.key=ne?ie.C0.ESC+"[21;"+(ne+1)+"~":ie.C0.ESC+"[21~";break;case 122:ee.key=ne?ie.C0.ESC+"[23;"+(ne+1)+"~":ie.C0.ESC+"[23~";break;case 123:ee.key=ne?ie.C0.ESC+"[24;"+(ne+1)+"~":ie.C0.ESC+"[24~";break;default:if(!ue.ctrlKey||ue.shiftKey||ue.altKey||ue.metaKey)if(te&&!le||!ue.altKey||ue.metaKey)te&&!ue.altKey&&!ue.ctrlKey&&ue.metaKey?ue.keyCode===65&&(ee.type=1):ue.key&&!ue.ctrlKey&&!ue.altKey&&!ue.metaKey&&ue.keyCode>=48&&ue.key.length===1?ee.key=ue.key:ue.key&&ue.ctrlKey&&ue.key==="_"&&(ee.key=ie.C0.US);else{var E=Ce[ue.keyCode],b=E&&E[ue.shiftKey?1:0];if(b)ee.key=ie.C0.ESC+b;else if(ue.keyCode>=65&&ue.keyCode<=90){var z=ue.ctrlKey?ue.keyCode-64:ue.keyCode+32;ee.key=ie.C0.ESC+String.fromCharCode(z)}}else ue.keyCode>=65&&ue.keyCode<=90?ee.key=String.fromCharCode(ue.keyCode-64):ue.keyCode===32?ee.key=ie.C0.NUL:ue.keyCode>=51&&ue.keyCode<=55?ee.key=String.fromCharCode(ue.keyCode-51+27):ue.keyCode===56?ee.key=ie.C0.DEL:ue.keyCode===219?ee.key=ie.C0.ESC:ue.keyCode===220?ee.key=ie.C0.FS:ue.keyCode===221&&(ee.key=ie.C0.GS)}return ee}},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(re,ae){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(oe,ve){oe.__proto__=ve}||function(oe,ve){for(var ye in ve)ve.hasOwnProperty(ye)&&(oe[ye]=ve[ye])})(re,ae)},function(re,ae){function oe(){this.constructor=re}ie(re,ae),re.prototype=ae===null?Object.create(ae):(oe.prototype=ae.prototype,new oe)}),ue=this&&this.__decorate||function(re,ae,oe,ve){var ye,me=arguments.length,ge=me<3?ae:ve===null?ve=Object.getOwnPropertyDescriptor(ae,oe):ve;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ge=Reflect.decorate(re,ae,oe,ve);else for(var _e=re.length-1;_e>=0;_e--)(ye=re[_e])&&(ge=(me<3?ye(ge):me>3?ye(ae,oe,ge):ye(ae,oe))||ge);return me>3&&ge&&Object.defineProperty(ae,oe,ge),ge},se=this&&this.__param||function(re,ae){return function(oe,ve){ae(oe,ve,re)}};Object.defineProperty(be,"__esModule",{value:!0}),be.RenderService=void 0;var te=ce(31),le=ce(0),ee=ce(2),ne=ce(32),E=ce(7),b=ce(1),z=ce(5),x=function(re){function ae(oe,ve,ye,me,ge,_e){var he=re.call(this)||this;if(he._renderer=oe,he._rowCount=ve,he._isPaused=!1,he._needsFullRefresh=!1,he._isNextRenderRedrawOnly=!0,he._needsSelectionRefresh=!1,he._canvasWidth=0,he._canvasHeight=0,he._selectionState={start:void 0,end:void 0,columnSelectMode:!1},he._onDimensionsChange=new le.EventEmitter,he._onRender=new le.EventEmitter,he._onRefreshRequest=new le.EventEmitter,he.register({dispose:function(){return he._renderer.dispose()}}),he._renderDebouncer=new te.RenderDebouncer(function(ke,Te){return he._renderRows(ke,Te)}),he.register(he._renderDebouncer),he._screenDprMonitor=new ne.ScreenDprMonitor,he._screenDprMonitor.setListener(function(){return he.onDevicePixelRatioChange()}),he.register(he._screenDprMonitor),he.register(_e.onResize(function(ke){return he._fullRefresh()})),he.register(me.onOptionChange(function(){return he._renderer.onOptionsChanged()})),he.register(ge.onCharSizeChange(function(){return he.onCharSizeChanged()})),he._renderer.onRequestRedraw(function(ke){return he.refreshRows(ke.start,ke.end,!0)}),he.register(E.addDisposableDomListener(window,"resize",function(){return he.onDevicePixelRatioChange()})),"IntersectionObserver"in window){var pe=new IntersectionObserver(function(ke){return he._onIntersectionChange(ke[ke.length-1])},{threshold:0});pe.observe(ye),he.register({dispose:function(){return pe.disconnect()}})}return he}return Ce(ae,re),Object.defineProperty(ae.prototype,"onDimensionsChange",{get:function(){return this._onDimensionsChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onRenderedBufferChange",{get:function(){return this._onRender.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"onRefreshRequest",{get:function(){return this._onRefreshRequest.event},enumerable:!1,configurable:!0}),Object.defineProperty(ae.prototype,"dimensions",{get:function(){return this._renderer.dimensions},enumerable:!1,configurable:!0}),ae.prototype._onIntersectionChange=function(oe){this._isPaused=oe.intersectionRatio===0,!this._isPaused&&this._needsFullRefresh&&(this.refreshRows(0,this._rowCount-1),this._needsFullRefresh=!1)},ae.prototype.refreshRows=function(oe,ve,ye){ye===void 0&&(ye=!1),this._isPaused?this._needsFullRefresh=!0:(ye||(this._isNextRenderRedrawOnly=!1),this._renderDebouncer.refresh(oe,ve,this._rowCount))},ae.prototype._renderRows=function(oe,ve){this._renderer.renderRows(oe,ve),this._needsSelectionRefresh&&(this._renderer.onSelectionChanged(this._selectionState.start,this._selectionState.end,this._selectionState.columnSelectMode),this._needsSelectionRefresh=!1),this._isNextRenderRedrawOnly||this._onRender.fire({start:oe,end:ve}),this._isNextRenderRedrawOnly=!0},ae.prototype.resize=function(oe,ve){this._rowCount=ve,this._fireOnCanvasResize()},ae.prototype.changeOptions=function(){this._renderer.onOptionsChanged(),this.refreshRows(0,this._rowCount-1),this._fireOnCanvasResize()},ae.prototype._fireOnCanvasResize=function(){this._renderer.dimensions.canvasWidth===this._canvasWidth&&this._renderer.dimensions.canvasHeight===this._canvasHeight||this._onDimensionsChange.fire(this._renderer.dimensions)},ae.prototype.dispose=function(){re.prototype.dispose.call(this)},ae.prototype.setRenderer=function(oe){var ve=this;this._renderer.dispose(),this._renderer=oe,this._renderer.onRequestRedraw(function(ye){return ve.refreshRows(ye.start,ye.end,!0)}),this._needsSelectionRefresh=!0,this._fullRefresh()},ae.prototype._fullRefresh=function(){this._isPaused?this._needsFullRefresh=!0:this.refreshRows(0,this._rowCount-1)},ae.prototype.setColors=function(oe){this._renderer.setColors(oe),this._fullRefresh()},ae.prototype.onDevicePixelRatioChange=function(){this._renderer.onDevicePixelRatioChange(),this.refreshRows(0,this._rowCount-1)},ae.prototype.onResize=function(oe,ve){this._renderer.onResize(oe,ve),this._fullRefresh()},ae.prototype.onCharSizeChanged=function(){this._renderer.onCharSizeChanged()},ae.prototype.onBlur=function(){this._renderer.onBlur()},ae.prototype.onFocus=function(){this._renderer.onFocus()},ae.prototype.onSelectionChanged=function(oe,ve,ye){this._selectionState.start=oe,this._selectionState.end=ve,this._selectionState.columnSelectMode=ye,this._renderer.onSelectionChanged(oe,ve,ye)},ae.prototype.onCursorMove=function(){this._renderer.onCursorMove()},ae.prototype.clear=function(){this._renderer.clear()},ae.prototype.registerCharacterJoiner=function(oe){return this._renderer.registerCharacterJoiner(oe)},ae.prototype.deregisterCharacterJoiner=function(oe){return this._renderer.deregisterCharacterJoiner(oe)},ae=ue([se(3,b.IOptionsService),se(4,z.ICharSizeService),se(5,b.IBufferService)],ae)}(ee.Disposable);be.RenderService=x},function(Dt,be,ce){"use strict";var ie=this&&this.__decorate||function(ee,ne,E,b){var z,x=arguments.length,re=x<3?ne:b===null?b=Object.getOwnPropertyDescriptor(ne,E):b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")re=Reflect.decorate(ee,ne,E,b);else for(var ae=ee.length-1;ae>=0;ae--)(z=ee[ae])&&(re=(x<3?z(re):x>3?z(ne,E,re):z(ne,E))||re);return x>3&&re&&Object.defineProperty(ne,E,re),re},Ce=this&&this.__param||function(ee,ne){return function(E,b){ne(E,b,ee)}};Object.defineProperty(be,"__esModule",{value:!0}),be.CharSizeService=void 0;var ue=ce(1),se=ce(0),te=function(){function ee(ne,E,b){this._optionsService=b,this.width=0,this.height=0,this._onCharSizeChange=new se.EventEmitter,this._measureStrategy=new le(ne,E,this._optionsService)}return Object.defineProperty(ee.prototype,"hasValidSize",{get:function(){return this.width>0&&this.height>0},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"onCharSizeChange",{get:function(){return this._onCharSizeChange.event},enumerable:!1,configurable:!0}),ee.prototype.measure=function(){var ne=this._measureStrategy.measure();ne.width===this.width&&ne.height===this.height||(this.width=ne.width,this.height=ne.height,this._onCharSizeChange.fire())},ee=ie([Ce(2,ue.IOptionsService)],ee)}();be.CharSizeService=te;var le=function(){function ee(ne,E,b){this._document=ne,this._parentElement=E,this._optionsService=b,this._result={width:0,height:0},this._measureElement=this._document.createElement("span"),this._measureElement.classList.add("xterm-char-measure-element"),this._measureElement.textContent="W",this._measureElement.setAttribute("aria-hidden","true"),this._parentElement.appendChild(this._measureElement)}return ee.prototype.measure=function(){this._measureElement.style.fontFamily=this._optionsService.options.fontFamily,this._measureElement.style.fontSize=this._optionsService.options.fontSize+"px";var ne=this._measureElement.getBoundingClientRect();return ne.width!==0&&ne.height!==0&&(this._result.width=ne.width,this._result.height=Math.ceil(ne.height)),this._result},ee}()},function(Dt,be,ce){"use strict";var ie=this&&this.__decorate||function(le,ee,ne,E){var b,z=arguments.length,x=z<3?ee:E===null?E=Object.getOwnPropertyDescriptor(ee,ne):E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(le,ee,ne,E);else for(var re=le.length-1;re>=0;re--)(b=le[re])&&(x=(z<3?b(x):z>3?b(ee,ne,x):b(ee,ne))||x);return z>3&&x&&Object.defineProperty(ee,ne,x),x},Ce=this&&this.__param||function(le,ee){return function(ne,E){ee(ne,E,le)}};Object.defineProperty(be,"__esModule",{value:!0}),be.MouseService=void 0;var ue=ce(5),se=ce(30),te=function(){function le(ee,ne){this._renderService=ee,this._charSizeService=ne}return le.prototype.getCoords=function(ee,ne,E,b,z){return se.getCoords(ee,ne,E,b,this._charSizeService.hasValidSize,this._renderService.dimensions.actualCellWidth,this._renderService.dimensions.actualCellHeight,z)},le.prototype.getRawByteCoords=function(ee,ne,E,b){var z=this.getCoords(ee,ne,E,b);return se.getRawByteCoords(z)},le=ie([Ce(0,ue.IRenderService),Ce(1,ue.ICharSizeService)],le)}();be.MouseService=te},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(b,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,re){x.__proto__=re}||function(x,re){for(var ae in re)re.hasOwnProperty(ae)&&(x[ae]=re[ae])})(b,z)},function(b,z){function x(){this.constructor=b}ie(b,z),b.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)}),ue=this&&this.__decorate||function(b,z,x,re){var ae,oe=arguments.length,ve=oe<3?z:re===null?re=Object.getOwnPropertyDescriptor(z,x):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(b,z,x,re);else for(var ye=b.length-1;ye>=0;ye--)(ae=b[ye])&&(ve=(oe<3?ae(ve):oe>3?ae(z,x,ve):ae(z,x))||ve);return oe>3&&ve&&Object.defineProperty(z,x,ve),ve},se=this&&this.__param||function(b,z){return function(x,re){z(x,re,b)}};Object.defineProperty(be,"__esModule",{value:!0}),be.Linkifier2=void 0;var te=ce(1),le=ce(0),ee=ce(2),ne=ce(7),E=function(b){function z(x){var re=b.call(this)||this;return re._bufferService=x,re._linkProviders=[],re._linkCacheDisposables=[],re._isMouseOut=!0,re._activeLine=-1,re._onShowLinkUnderline=re.register(new le.EventEmitter),re._onHideLinkUnderline=re.register(new le.EventEmitter),re.register(ee.getDisposeArrayDisposable(re._linkCacheDisposables)),re}return Ce(z,b),Object.defineProperty(z.prototype,"onShowLinkUnderline",{get:function(){return this._onShowLinkUnderline.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"onHideLinkUnderline",{get:function(){return this._onHideLinkUnderline.event},enumerable:!1,configurable:!0}),z.prototype.registerLinkProvider=function(x){var re=this;return this._linkProviders.push(x),{dispose:function(){var ae=re._linkProviders.indexOf(x);ae!==-1&&re._linkProviders.splice(ae,1)}}},z.prototype.attachToDom=function(x,re,ae){var oe=this;this._element=x,this._mouseService=re,this._renderService=ae,this.register(ne.addDisposableDomListener(this._element,"mouseleave",function(){oe._isMouseOut=!0,oe._clearCurrentLink()})),this.register(ne.addDisposableDomListener(this._element,"mousemove",this._onMouseMove.bind(this))),this.register(ne.addDisposableDomListener(this._element,"click",this._onClick.bind(this)))},z.prototype._onMouseMove=function(x){if(this._lastMouseEvent=x,this._element&&this._mouseService){var re=this._positionFromMouseEvent(x,this._element,this._mouseService);if(re){this._isMouseOut=!1;for(var ae=x.composedPath(),oe=0;oe<ae.length;oe++){var ve=ae[oe];if(ve.classList.contains("xterm"))break;if(ve.classList.contains("xterm-hover"))return}this._lastBufferCell&&re.x===this._lastBufferCell.x&&re.y===this._lastBufferCell.y||(this._onHover(re),this._lastBufferCell=re)}}},z.prototype._onHover=function(x){if(this._activeLine!==x.y)return this._clearCurrentLink(),void this._askForLink(x,!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,x)||(this._clearCurrentLink(),this._askForLink(x,!0))},z.prototype._askForLink=function(x,re){var ae=this;this._activeProviderReplies&&re||(this._activeProviderReplies=new Map,this._activeLine=x.y);var oe=!1;this._linkProviders.forEach(function(ve,ye){var me;re?!((me=ae._activeProviderReplies)===null||me===void 0)&&me.get(ye)&&(oe=ae._checkLinkProviderResult(ye,x,oe)):ve.provideLinks(x.y,function(ge){var _e,he;if(!ae._isMouseOut){var pe=ge==null?void 0:ge.map(function(ke){return{link:ke}});(_e=ae._activeProviderReplies)===null||_e===void 0||_e.set(ye,pe),oe=ae._checkLinkProviderResult(ye,x,oe),((he=ae._activeProviderReplies)===null||he===void 0?void 0:he.size)===ae._linkProviders.length&&ae._removeIntersectingLinks(x.y,ae._activeProviderReplies)}})})},z.prototype._removeIntersectingLinks=function(x,re){for(var ae=new Set,oe=0;oe<re.size;oe++){var ve=re.get(oe);if(ve)for(var ye=0;ye<ve.length;ye++)for(var me=ve[ye],ge=me.link.range.start.y<x?0:me.link.range.start.x,_e=me.link.range.end.y>x?this._bufferService.cols:me.link.range.end.x,he=ge;he<=_e;he++){if(ae.has(he)){ve.splice(ye--,1);break}ae.add(he)}}},z.prototype._checkLinkProviderResult=function(x,re,ae){var oe,ve=this;if(!this._activeProviderReplies)return ae;for(var ye=this._activeProviderReplies.get(x),me=!1,ge=0;ge<x;ge++)this._activeProviderReplies.has(ge)&&!this._activeProviderReplies.get(ge)||(me=!0);if(!me&&ye){var _e=ye.find(function(pe){return ve._linkAtPosition(pe.link,re)});_e&&(ae=!0,this._handleNewLink(_e))}if(this._activeProviderReplies.size===this._linkProviders.length&&!ae)for(ge=0;ge<this._activeProviderReplies.size;ge++){var he=(oe=this._activeProviderReplies.get(ge))===null||oe===void 0?void 0:oe.find(function(pe){return ve._linkAtPosition(pe.link,re)});if(he){ae=!0,this._handleNewLink(he);break}}return ae},z.prototype._onClick=function(x){if(this._element&&this._mouseService&&this._currentLink){var re=this._positionFromMouseEvent(x,this._element,this._mouseService);re&&this._linkAtPosition(this._currentLink.link,re)&&this._currentLink.link.activate(x,this._currentLink.link.text)}},z.prototype._clearCurrentLink=function(x,re){this._element&&this._currentLink&&this._lastMouseEvent&&(!x||!re||this._currentLink.link.range.start.y>=x&&this._currentLink.link.range.end.y<=re)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,ee.disposeArray(this._linkCacheDisposables))},z.prototype._handleNewLink=function(x){var re=this;if(this._element&&this._lastMouseEvent&&this._mouseService){var ae=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);ae&&this._linkAtPosition(x.link,ae)&&(this._currentLink=x,this._currentLink.state={decorations:{underline:x.link.decorations===void 0||x.link.decorations.underline,pointerCursor:x.link.decorations===void 0||x.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,x.link,this._lastMouseEvent),x.link.decorations={},Object.defineProperties(x.link.decorations,{pointerCursor:{get:function(){var oe,ve;return(ve=(oe=re._currentLink)===null||oe===void 0?void 0:oe.state)===null||ve===void 0?void 0:ve.decorations.pointerCursor},set:function(oe){var ve,ye;!((ve=re._currentLink)===null||ve===void 0)&&ve.state&&re._currentLink.state.decorations.pointerCursor!==oe&&(re._currentLink.state.decorations.pointerCursor=oe,re._currentLink.state.isHovered&&((ye=re._element)===null||ye===void 0||ye.classList.toggle("xterm-cursor-pointer",oe)))}},underline:{get:function(){var oe,ve;return(ve=(oe=re._currentLink)===null||oe===void 0?void 0:oe.state)===null||ve===void 0?void 0:ve.decorations.underline},set:function(oe){var ve,ye,me;!((ve=re._currentLink)===null||ve===void 0)&&ve.state&&((me=(ye=re._currentLink)===null||ye===void 0?void 0:ye.state)===null||me===void 0?void 0:me.decorations.underline)!==oe&&(re._currentLink.state.decorations.underline=oe,re._currentLink.state.isHovered&&re._fireUnderlineEvent(x.link,oe))}}}),this._renderService&&this._linkCacheDisposables.push(this._renderService.onRenderedBufferChange(function(oe){var ve=oe.start===0?0:oe.start+1+re._bufferService.buffer.ydisp;re._clearCurrentLink(ve,oe.end+1+re._bufferService.buffer.ydisp)})))}},z.prototype._linkHover=function(x,re,ae){var oe;!((oe=this._currentLink)===null||oe===void 0)&&oe.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(re,!0),this._currentLink.state.decorations.pointerCursor&&x.classList.add("xterm-cursor-pointer")),re.hover&&re.hover(ae,re.text)},z.prototype._fireUnderlineEvent=function(x,re){var ae=x.range,oe=this._bufferService.buffer.ydisp,ve=this._createLinkUnderlineEvent(ae.start.x-1,ae.start.y-oe-1,ae.end.x,ae.end.y-oe-1,void 0);(re?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(ve)},z.prototype._linkLeave=function(x,re,ae){var oe;!((oe=this._currentLink)===null||oe===void 0)&&oe.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(re,!1),this._currentLink.state.decorations.pointerCursor&&x.classList.remove("xterm-cursor-pointer")),re.leave&&re.leave(ae,re.text)},z.prototype._linkAtPosition=function(x,re){var ae=x.range.start.y===x.range.end.y,oe=x.range.start.y<re.y,ve=x.range.end.y>re.y;return(ae&&x.range.start.x<=re.x&&x.range.end.x>=re.x||oe&&x.range.end.x>=re.x||ve&&x.range.start.x<=re.x||oe&&ve)&&x.range.start.y<=re.y&&x.range.end.y>=re.y},z.prototype._positionFromMouseEvent=function(x,re,ae){var oe=ae.getCoords(x,re,this._bufferService.cols,this._bufferService.rows);if(oe)return{x:oe[0],y:oe[1]+this._bufferService.buffer.ydisp}},z.prototype._createLinkUnderlineEvent=function(x,re,ae,oe,ve){return{x1:x,y1:re,x2:ae,y2:oe,cols:this._bufferService.cols,fg:ve}},z=ue([se(0,te.IBufferService)],z)}(ee.Disposable);be.Linkifier2=E},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.CoreBrowserService=void 0;var ie=function(){function Ce(ue){this._textarea=ue}return Object.defineProperty(Ce.prototype,"isFocused",{get:function(){return document.activeElement===this._textarea&&document.hasFocus()},enumerable:!1,configurable:!0}),Ce}();be.CoreBrowserService=ie},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(ge,_e){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(he,pe){he.__proto__=pe}||function(he,pe){for(var ke in pe)pe.hasOwnProperty(ke)&&(he[ke]=pe[ke])})(ge,_e)},function(ge,_e){function he(){this.constructor=ge}ie(ge,_e),ge.prototype=_e===null?Object.create(_e):(he.prototype=_e.prototype,new he)});Object.defineProperty(be,"__esModule",{value:!0}),be.CoreTerminal=void 0;var ue=ce(2),se=ce(1),te=ce(66),le=ce(67),ee=ce(68),ne=ce(74),E=ce(75),b=ce(0),z=ce(76),x=ce(77),re=ce(78),ae=ce(80),oe=ce(81),ve=ce(19),ye=ce(82),me=function(ge){function _e(he){var pe=ge.call(this)||this;return pe._onBinary=new b.EventEmitter,pe._onData=new b.EventEmitter,pe._onLineFeed=new b.EventEmitter,pe._onResize=new b.EventEmitter,pe._onScroll=new b.EventEmitter,pe._instantiationService=new te.InstantiationService,pe.optionsService=new ne.OptionsService(he),pe._instantiationService.setService(se.IOptionsService,pe.optionsService),pe._bufferService=pe.register(pe._instantiationService.createInstance(ee.BufferService)),pe._instantiationService.setService(se.IBufferService,pe._bufferService),pe._logService=pe._instantiationService.createInstance(le.LogService),pe._instantiationService.setService(se.ILogService,pe._logService),pe._coreService=pe.register(pe._instantiationService.createInstance(E.CoreService,function(){return pe.scrollToBottom()})),pe._instantiationService.setService(se.ICoreService,pe._coreService),pe._coreMouseService=pe._instantiationService.createInstance(z.CoreMouseService),pe._instantiationService.setService(se.ICoreMouseService,pe._coreMouseService),pe._dirtyRowService=pe._instantiationService.createInstance(x.DirtyRowService),pe._instantiationService.setService(se.IDirtyRowService,pe._dirtyRowService),pe.unicodeService=pe._instantiationService.createInstance(re.UnicodeService),pe._instantiationService.setService(se.IUnicodeService,pe.unicodeService),pe._charsetService=pe._instantiationService.createInstance(ae.CharsetService),pe._instantiationService.setService(se.ICharsetService,pe._charsetService),pe._inputHandler=new ve.InputHandler(pe._bufferService,pe._charsetService,pe._coreService,pe._dirtyRowService,pe._logService,pe.optionsService,pe._coreMouseService,pe.unicodeService),pe.register(b.forwardEvent(pe._inputHandler.onLineFeed,pe._onLineFeed)),pe.register(pe._inputHandler),pe.register(b.forwardEvent(pe._bufferService.onResize,pe._onResize)),pe.register(b.forwardEvent(pe._coreService.onData,pe._onData)),pe.register(b.forwardEvent(pe._coreService.onBinary,pe._onBinary)),pe.register(pe.optionsService.onOptionChange(function(ke){return pe._updateOptions(ke)})),pe._writeBuffer=new ye.WriteBuffer(function(ke){return pe._inputHandler.parse(ke)}),pe}return Ce(_e,ge),Object.defineProperty(_e.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"onLineFeed",{get:function(){return this._onLineFeed.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"onScroll",{get:function(){return this._onScroll.event},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"cols",{get:function(){return this._bufferService.cols},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"rows",{get:function(){return this._bufferService.rows},enumerable:!1,configurable:!0}),Object.defineProperty(_e.prototype,"buffers",{get:function(){return this._bufferService.buffers},enumerable:!1,configurable:!0}),_e.prototype.dispose=function(){var he;this._isDisposed||(ge.prototype.dispose.call(this),(he=this._windowsMode)===null||he===void 0||he.dispose(),this._windowsMode=void 0)},_e.prototype.write=function(he,pe){this._writeBuffer.write(he,pe)},_e.prototype.writeSync=function(he){this._writeBuffer.writeSync(he)},_e.prototype.resize=function(he,pe){isNaN(he)||isNaN(pe)||(he=Math.max(he,ee.MINIMUM_COLS),pe=Math.max(pe,ee.MINIMUM_ROWS),this._bufferService.resize(he,pe))},_e.prototype.scroll=function(he,pe){pe===void 0&&(pe=!1);var ke,Te=this._bufferService.buffer;(ke=this._cachedBlankLine)&&ke.length===this.cols&&ke.getFg(0)===he.fg&&ke.getBg(0)===he.bg||(ke=Te.getBlankLine(he,pe),this._cachedBlankLine=ke),ke.isWrapped=pe;var Ee=Te.ybase+Te.scrollTop,Oe=Te.ybase+Te.scrollBottom;if(Te.scrollTop===0){var je=Te.lines.isFull;Oe===Te.lines.length-1?je?Te.lines.recycle().copyFrom(ke):Te.lines.push(ke.clone()):Te.lines.splice(Oe+1,0,ke.clone()),je?this._bufferService.isUserScrolling&&(Te.ydisp=Math.max(Te.ydisp-1,0)):(Te.ybase++,this._bufferService.isUserScrolling||Te.ydisp++)}else{var Pe=Oe-Ee+1;Te.lines.shiftElements(Ee+1,Pe-1,-1),Te.lines.set(Oe,ke.clone())}this._bufferService.isUserScrolling||(Te.ydisp=Te.ybase),this._dirtyRowService.markRangeDirty(Te.scrollTop,Te.scrollBottom),this._onScroll.fire(Te.ydisp)},_e.prototype.scrollLines=function(he,pe){var ke=this._bufferService.buffer;if(he<0){if(ke.ydisp===0)return;this._bufferService.isUserScrolling=!0}else he+ke.ydisp>=ke.ybase&&(this._bufferService.isUserScrolling=!1);var Te=ke.ydisp;ke.ydisp=Math.max(Math.min(ke.ydisp+he,ke.ybase),0),Te!==ke.ydisp&&(pe||this._onScroll.fire(ke.ydisp))},_e.prototype.scrollPages=function(he){this.scrollLines(he*(this.rows-1))},_e.prototype.scrollToTop=function(){this.scrollLines(-this._bufferService.buffer.ydisp)},_e.prototype.scrollToBottom=function(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)},_e.prototype.scrollToLine=function(he){var pe=he-this._bufferService.buffer.ydisp;pe!==0&&this.scrollLines(pe)},_e.prototype.addEscHandler=function(he,pe){return this._inputHandler.addEscHandler(he,pe)},_e.prototype.addDcsHandler=function(he,pe){return this._inputHandler.addDcsHandler(he,pe)},_e.prototype.addCsiHandler=function(he,pe){return this._inputHandler.addCsiHandler(he,pe)},_e.prototype.addOscHandler=function(he,pe){return this._inputHandler.addOscHandler(he,pe)},_e.prototype._setup=function(){this.optionsService.options.windowsMode&&this._enableWindowsMode()},_e.prototype.reset=function(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this._coreService.reset(),this._coreMouseService.reset()},_e.prototype._updateOptions=function(he){var pe;switch(he){case"scrollback":this.buffers.resize(this.cols,this.rows);break;case"windowsMode":this.optionsService.options.windowsMode?this._enableWindowsMode():((pe=this._windowsMode)===null||pe===void 0||pe.dispose(),this._windowsMode=void 0)}},_e.prototype._enableWindowsMode=function(){var he=this;if(!this._windowsMode){var pe=[];pe.push(this.onLineFeed(oe.updateWindowsModeWrappedState.bind(null,this._bufferService))),pe.push(this.addCsiHandler({final:"H"},function(){return oe.updateWindowsModeWrappedState(he._bufferService),!1})),this._windowsMode={dispose:function(){for(var ke=0,Te=pe;ke<Te.length;ke++)Te[ke].dispose()}}}},_e}(ue.Disposable);be.CoreTerminal=me},function(Dt,be,ce){"use strict";var ie=this&&this.__spreadArrays||function(){for(var le=0,ee=0,ne=arguments.length;ee<ne;ee++)le+=arguments[ee].length;var E=Array(le),b=0;for(ee=0;ee<ne;ee++)for(var z=arguments[ee],x=0,re=z.length;x<re;x++,b++)E[b]=z[x];return E};Object.defineProperty(be,"__esModule",{value:!0}),be.InstantiationService=be.ServiceCollection=void 0;var Ce=ce(1),ue=ce(14),se=function(){function le(){for(var ee=[],ne=0;ne<arguments.length;ne++)ee[ne]=arguments[ne];this._entries=new Map;for(var E=0,b=ee;E<b.length;E++){var z=b[E],x=z[0],re=z[1];this.set(x,re)}}return le.prototype.set=function(ee,ne){var E=this._entries.get(ee);return this._entries.set(ee,ne),E},le.prototype.forEach=function(ee){this._entries.forEach(function(ne,E){return ee(E,ne)})},le.prototype.has=function(ee){return this._entries.has(ee)},le.prototype.get=function(ee){return this._entries.get(ee)},le}();be.ServiceCollection=se;var te=function(){function le(){this._services=new se,this._services.set(Ce.IInstantiationService,this)}return le.prototype.setService=function(ee,ne){this._services.set(ee,ne)},le.prototype.getService=function(ee){return this._services.get(ee)},le.prototype.createInstance=function(ee){for(var ne=[],E=1;E<arguments.length;E++)ne[E-1]=arguments[E];for(var b=ue.getServiceDependencies(ee).sort(function(ye,me){return ye.index-me.index}),z=[],x=0,re=b;x<re.length;x++){var ae=re[x],oe=this._services.get(ae.id);if(!oe)throw new Error("[createInstance] "+ee.name+" depends on UNKNOWN service "+ae.id+".");z.push(oe)}var ve=b.length>0?b[0].index:ne.length;if(ne.length!==ve)throw new Error("[createInstance] First service dependency of "+ee.name+" at position "+(ve+1)+" conflicts with "+ne.length+" static arguments");return new(ee.bind.apply(ee,ie([void 0],ie(ne,z))))},le}();be.InstantiationService=te},function(Dt,be,ce){"use strict";var ie=this&&this.__decorate||function(ne,E,b,z){var x,re=arguments.length,ae=re<3?E:z===null?z=Object.getOwnPropertyDescriptor(E,b):z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(ne,E,b,z);else for(var oe=ne.length-1;oe>=0;oe--)(x=ne[oe])&&(ae=(re<3?x(ae):re>3?x(E,b,ae):x(E,b))||ae);return re>3&&ae&&Object.defineProperty(E,b,ae),ae},Ce=this&&this.__param||function(ne,E){return function(b,z){E(b,z,ne)}},ue=this&&this.__spreadArrays||function(){for(var ne=0,E=0,b=arguments.length;E<b;E++)ne+=arguments[E].length;var z=Array(ne),x=0;for(E=0;E<b;E++)for(var re=arguments[E],ae=0,oe=re.length;ae<oe;ae++,x++)z[x]=re[ae];return z};Object.defineProperty(be,"__esModule",{value:!0}),be.LogService=be.LogLevel=void 0;var se,te=ce(1);(function(ne){ne[ne.DEBUG=0]="DEBUG",ne[ne.INFO=1]="INFO",ne[ne.WARN=2]="WARN",ne[ne.ERROR=3]="ERROR",ne[ne.OFF=4]="OFF"})(se=be.LogLevel||(be.LogLevel={}));var le={debug:se.DEBUG,info:se.INFO,warn:se.WARN,error:se.ERROR,off:se.OFF},ee=function(){function ne(E){var b=this;this._optionsService=E,this._updateLogLevel(),this._optionsService.onOptionChange(function(z){z==="logLevel"&&b._updateLogLevel()})}return ne.prototype._updateLogLevel=function(){this._logLevel=le[this._optionsService.options.logLevel]},ne.prototype._evalLazyOptionalParams=function(E){for(var b=0;b<E.length;b++)typeof E[b]=="function"&&(E[b]=E[b]())},ne.prototype._log=function(E,b,z){this._evalLazyOptionalParams(z),E.call.apply(E,ue([console,"xterm.js: "+b],z))},ne.prototype.debug=function(E){for(var b=[],z=1;z<arguments.length;z++)b[z-1]=arguments[z];this._logLevel<=se.DEBUG&&this._log(console.log,E,b)},ne.prototype.info=function(E){for(var b=[],z=1;z<arguments.length;z++)b[z-1]=arguments[z];this._logLevel<=se.INFO&&this._log(console.info,E,b)},ne.prototype.warn=function(E){for(var b=[],z=1;z<arguments.length;z++)b[z-1]=arguments[z];this._logLevel<=se.WARN&&this._log(console.warn,E,b)},ne.prototype.error=function(E){for(var b=[],z=1;z<arguments.length;z++)b[z-1]=arguments[z];this._logLevel<=se.ERROR&&this._log(console.error,E,b)},ne=ie([Ce(0,te.IOptionsService)],ne)}();be.LogService=ee},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(b,z){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(x,re){x.__proto__=re}||function(x,re){for(var ae in re)re.hasOwnProperty(ae)&&(x[ae]=re[ae])})(b,z)},function(b,z){function x(){this.constructor=b}ie(b,z),b.prototype=z===null?Object.create(z):(x.prototype=z.prototype,new x)}),ue=this&&this.__decorate||function(b,z,x,re){var ae,oe=arguments.length,ve=oe<3?z:re===null?re=Object.getOwnPropertyDescriptor(z,x):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(b,z,x,re);else for(var ye=b.length-1;ye>=0;ye--)(ae=b[ye])&&(ve=(oe<3?ae(ve):oe>3?ae(z,x,ve):ae(z,x))||ve);return oe>3&&ve&&Object.defineProperty(z,x,ve),ve},se=this&&this.__param||function(b,z){return function(x,re){z(x,re,b)}};Object.defineProperty(be,"__esModule",{value:!0}),be.BufferService=be.MINIMUM_ROWS=be.MINIMUM_COLS=void 0;var te=ce(1),le=ce(69),ee=ce(0),ne=ce(2);be.MINIMUM_COLS=2,be.MINIMUM_ROWS=1;var E=function(b){function z(x){var re=b.call(this)||this;return re._optionsService=x,re.isUserScrolling=!1,re._onResize=new ee.EventEmitter,re.cols=Math.max(x.options.cols,be.MINIMUM_COLS),re.rows=Math.max(x.options.rows,be.MINIMUM_ROWS),re.buffers=new le.BufferSet(x,re),re}return Ce(z,b),Object.defineProperty(z.prototype,"onResize",{get:function(){return this._onResize.event},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"buffer",{get:function(){return this.buffers.active},enumerable:!1,configurable:!0}),z.prototype.dispose=function(){b.prototype.dispose.call(this),this.buffers.dispose()},z.prototype.resize=function(x,re){this.cols=x,this.rows=re,this.buffers.resize(x,re),this.buffers.setupTabStops(this.cols),this._onResize.fire({cols:x,rows:re})},z.prototype.reset=function(){this.buffers.dispose(),this.buffers=new le.BufferSet(this._optionsService,this),this.isUserScrolling=!1},z=ue([se(0,te.IOptionsService)],z)}(ne.Disposable);be.BufferService=E},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(le,ee){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ne,E){ne.__proto__=E}||function(ne,E){for(var b in E)E.hasOwnProperty(b)&&(ne[b]=E[b])})(le,ee)},function(le,ee){function ne(){this.constructor=le}ie(le,ee),le.prototype=ee===null?Object.create(ee):(ne.prototype=ee.prototype,new ne)});Object.defineProperty(be,"__esModule",{value:!0}),be.BufferSet=void 0;var ue=ce(70),se=ce(0),te=function(le){function ee(ne,E){var b=le.call(this)||this;return b._onBufferActivate=b.register(new se.EventEmitter),b._normal=new ue.Buffer(!0,ne,E),b._normal.fillViewportRows(),b._alt=new ue.Buffer(!1,ne,E),b._activeBuffer=b._normal,b.setupTabStops(),b}return Ce(ee,le),Object.defineProperty(ee.prototype,"onBufferActivate",{get:function(){return this._onBufferActivate.event},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"alt",{get:function(){return this._alt},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"active",{get:function(){return this._activeBuffer},enumerable:!1,configurable:!0}),Object.defineProperty(ee.prototype,"normal",{get:function(){return this._normal},enumerable:!1,configurable:!0}),ee.prototype.activateNormalBuffer=function(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))},ee.prototype.activateAltBuffer=function(ne){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(ne),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))},ee.prototype.resize=function(ne,E){this._normal.resize(ne,E),this._alt.resize(ne,E)},ee.prototype.setupTabStops=function(ne){this._normal.setupTabStops(ne),this._alt.setupTabStops(ne)},ee}(ce(2).Disposable);be.BufferSet=te},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.BufferStringIterator=be.Buffer=be.MAX_BUFFER_SIZE=void 0;var ie=ce(71),Ce=ce(16),ue=ce(4),se=ce(3),te=ce(72),le=ce(73),ee=ce(20),ne=ce(6);be.MAX_BUFFER_SIZE=4294967295;var E=function(){function z(x,re,ae){this._hasScrollback=x,this._optionsService=re,this._bufferService=ae,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.savedY=0,this.savedX=0,this.savedCurAttrData=Ce.DEFAULT_ATTR_DATA.clone(),this.savedCharset=ee.DEFAULT_CHARSET,this.markers=[],this._nullCell=ue.CellData.fromCharData([0,se.NULL_CELL_CHAR,se.NULL_CELL_WIDTH,se.NULL_CELL_CODE]),this._whitespaceCell=ue.CellData.fromCharData([0,se.WHITESPACE_CELL_CHAR,se.WHITESPACE_CELL_WIDTH,se.WHITESPACE_CELL_CODE]),this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new ie.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}return z.prototype.getNullCell=function(x){return x?(this._nullCell.fg=x.fg,this._nullCell.bg=x.bg,this._nullCell.extended=x.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new ne.ExtendedAttrs),this._nullCell},z.prototype.getWhitespaceCell=function(x){return x?(this._whitespaceCell.fg=x.fg,this._whitespaceCell.bg=x.bg,this._whitespaceCell.extended=x.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new ne.ExtendedAttrs),this._whitespaceCell},z.prototype.getBlankLine=function(x,re){return new Ce.BufferLine(this._bufferService.cols,this.getNullCell(x),re)},Object.defineProperty(z.prototype,"hasScrollback",{get:function(){return this._hasScrollback&&this.lines.maxLength>this._rows},enumerable:!1,configurable:!0}),Object.defineProperty(z.prototype,"isCursorInViewport",{get:function(){var x=this.ybase+this.y-this.ydisp;return x>=0&&x<this._rows},enumerable:!1,configurable:!0}),z.prototype._getCorrectBufferLength=function(x){if(!this._hasScrollback)return x;var re=x+this._optionsService.options.scrollback;return re>be.MAX_BUFFER_SIZE?be.MAX_BUFFER_SIZE:re},z.prototype.fillViewportRows=function(x){if(this.lines.length===0){x===void 0&&(x=Ce.DEFAULT_ATTR_DATA);for(var re=this._rows;re--;)this.lines.push(this.getBlankLine(x))}},z.prototype.clear=function(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new ie.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()},z.prototype.resize=function(x,re){var ae=this.getNullCell(Ce.DEFAULT_ATTR_DATA),oe=this._getCorrectBufferLength(re);if(oe>this.lines.maxLength&&(this.lines.maxLength=oe),this.lines.length>0){if(this._cols<x)for(var ve=0;ve<this.lines.length;ve++)this.lines.get(ve).resize(x,ae);var ye=0;if(this._rows<re)for(var me=this._rows;me<re;me++)this.lines.length<re+this.ybase&&(this._optionsService.options.windowsMode?this.lines.push(new Ce.BufferLine(x,ae)):this.ybase>0&&this.lines.length<=this.ybase+this.y+ye+1?(this.ybase--,ye++,this.ydisp>0&&this.ydisp--):this.lines.push(new Ce.BufferLine(x,ae)));else for(me=this._rows;me>re;me--)this.lines.length>re+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(oe<this.lines.maxLength){var ge=this.lines.length-oe;ge>0&&(this.lines.trimStart(ge),this.ybase=Math.max(this.ybase-ge,0),this.ydisp=Math.max(this.ydisp-ge,0),this.savedY=Math.max(this.savedY-ge,0)),this.lines.maxLength=oe}this.x=Math.min(this.x,x-1),this.y=Math.min(this.y,re-1),ye&&(this.y+=ye),this.savedX=Math.min(this.savedX,x-1),this.scrollTop=0}if(this.scrollBottom=re-1,this._isReflowEnabled&&(this._reflow(x,re),this._cols>x))for(ve=0;ve<this.lines.length;ve++)this.lines.get(ve).resize(x,ae);this._cols=x,this._rows=re},Object.defineProperty(z.prototype,"_isReflowEnabled",{get:function(){return this._hasScrollback&&!this._optionsService.options.windowsMode},enumerable:!1,configurable:!0}),z.prototype._reflow=function(x,re){this._cols!==x&&(x>this._cols?this._reflowLarger(x,re):this._reflowSmaller(x,re))},z.prototype._reflowLarger=function(x,re){var ae=te.reflowLargerGetLinesToRemove(this.lines,this._cols,x,this.ybase+this.y,this.getNullCell(Ce.DEFAULT_ATTR_DATA));if(ae.length>0){var oe=te.reflowLargerCreateNewLayout(this.lines,ae);te.reflowLargerApplyNewLayout(this.lines,oe.layout),this._reflowLargerAdjustViewport(x,re,oe.countRemoved)}},z.prototype._reflowLargerAdjustViewport=function(x,re,ae){for(var oe=this.getNullCell(Ce.DEFAULT_ATTR_DATA),ve=ae;ve-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<re&&this.lines.push(new Ce.BufferLine(x,oe))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-ae,0)},z.prototype._reflowSmaller=function(x,re){for(var ae=this.getNullCell(Ce.DEFAULT_ATTR_DATA),oe=[],ve=0,ye=this.lines.length-1;ye>=0;ye--){var me=this.lines.get(ye);if(!(!me||!me.isWrapped&&me.getTrimmedLength()<=x)){for(var ge=[me];me.isWrapped&&ye>0;)me=this.lines.get(--ye),ge.unshift(me);var _e=this.ybase+this.y;if(!(_e>=ye&&_e<ye+ge.length)){var he=ge[ge.length-1].getTrimmedLength(),pe=te.reflowSmallerGetNewLineLengths(ge,this._cols,x),ke=pe.length-ge.length,Te=void 0;Te=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+ke):Math.max(0,this.lines.length-this.lines.maxLength+ke);for(var Ee=[],Oe=0;Oe<ke;Oe++){var je=this.getBlankLine(Ce.DEFAULT_ATTR_DATA,!0);Ee.push(je)}Ee.length>0&&(oe.push({start:ye+ge.length+ve,newLines:Ee}),ve+=Ee.length),ge.push.apply(ge,Ee);var Pe=pe.length-1,Qe=pe[Pe];Qe===0&&(Qe=pe[--Pe]);for(var Xe=ge.length-ke-1,ot=he;Xe>=0;){var He=Math.min(ot,Qe);if(ge[Pe].copyCellsFrom(ge[Xe],ot-He,Qe-He,He,!0),(Qe-=He)===0&&(Qe=pe[--Pe]),(ot-=He)===0){Xe--;var rt=Math.max(Xe,0);ot=te.getWrappedLineTrimmedLength(ge,rt,this._cols)}}for(Oe=0;Oe<ge.length;Oe++)pe[Oe]<x&&ge[Oe].setCell(pe[Oe],ae);for(var Ye=ke-Te;Ye-- >0;)this.ybase===0?this.y<re-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+ve)-re&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+ke,this.ybase+re-1)}}}if(oe.length>0){var ut=[],Ge=[];for(Oe=0;Oe<this.lines.length;Oe++)Ge.push(this.lines.get(Oe));var ze=this.lines.length,Ve=ze-1,$e=0,nt=oe[$e];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+ve);var et=0;for(Oe=Math.min(this.lines.maxLength-1,ze+ve-1);Oe>=0;Oe--)if(nt&&nt.start>Ve+et){for(var pt=nt.newLines.length-1;pt>=0;pt--)this.lines.set(Oe--,nt.newLines[pt]);Oe++,ut.push({index:Ve+1,amount:nt.newLines.length}),et+=nt.newLines.length,nt=oe[++$e]}else this.lines.set(Oe,Ge[Ve--]);var ct=0;for(Oe=ut.length-1;Oe>=0;Oe--)ut[Oe].index+=ct,this.lines.onInsertEmitter.fire(ut[Oe]),ct+=ut[Oe].amount;var It=Math.max(0,ze+ve-this.lines.maxLength);It>0&&this.lines.onTrimEmitter.fire(It)}},z.prototype.stringIndexToBufferIndex=function(x,re,ae){for(ae===void 0&&(ae=!1);re;){var oe=this.lines.get(x);if(!oe)return[-1,-1];for(var ve=ae?oe.getTrimmedLength():oe.length,ye=0;ye<ve;++ye)if(oe.get(ye)[se.CHAR_DATA_WIDTH_INDEX]&&(re-=oe.get(ye)[se.CHAR_DATA_CHAR_INDEX].length||1),re<0)return[x,ye];x++}return[x,0]},z.prototype.translateBufferLineToString=function(x,re,ae,oe){ae===void 0&&(ae=0);var ve=this.lines.get(x);return ve?ve.translateToString(re,ae,oe):""},z.prototype.getWrappedRangeForLine=function(x){for(var re=x,ae=x;re>0&&this.lines.get(re).isWrapped;)re--;for(;ae+1<this.lines.length&&this.lines.get(ae+1).isWrapped;)ae++;return{first:re,last:ae}},z.prototype.setupTabStops=function(x){for(x!=null?this.tabs[x]||(x=this.prevStop(x)):(this.tabs={},x=0);x<this._cols;x+=this._optionsService.options.tabStopWidth)this.tabs[x]=!0},z.prototype.prevStop=function(x){for(x==null&&(x=this.x);!this.tabs[--x]&&x>0;);return x>=this._cols?this._cols-1:x<0?0:x},z.prototype.nextStop=function(x){for(x==null&&(x=this.x);!this.tabs[++x]&&x<this._cols;);return x>=this._cols?this._cols-1:x<0?0:x},z.prototype.addMarker=function(x){var re=this,ae=new le.Marker(x);return this.markers.push(ae),ae.register(this.lines.onTrim(function(oe){ae.line-=oe,ae.line<0&&ae.dispose()})),ae.register(this.lines.onInsert(function(oe){ae.line>=oe.index&&(ae.line+=oe.amount)})),ae.register(this.lines.onDelete(function(oe){ae.line>=oe.index&&ae.line<oe.index+oe.amount&&ae.dispose(),ae.line>oe.index&&(ae.line-=oe.amount)})),ae.register(ae.onDispose(function(){return re._removeMarker(ae)})),ae},z.prototype._removeMarker=function(x){this.markers.splice(this.markers.indexOf(x),1)},z.prototype.iterator=function(x,re,ae,oe,ve){return new b(this,x,re,ae,oe,ve)},z}();be.Buffer=E;var b=function(){function z(x,re,ae,oe,ve,ye){ae===void 0&&(ae=0),oe===void 0&&(oe=x.lines.length),ve===void 0&&(ve=0),ye===void 0&&(ye=0),this._buffer=x,this._trimRight=re,this._startIndex=ae,this._endIndex=oe,this._startOverscan=ve,this._endOverscan=ye,this._startIndex<0&&(this._startIndex=0),this._endIndex>this._buffer.lines.length&&(this._endIndex=this._buffer.lines.length),this._current=this._startIndex}return z.prototype.hasNext=function(){return this._current<this._endIndex},z.prototype.next=function(){var x=this._buffer.getWrappedRangeForLine(this._current);x.first<this._startIndex-this._startOverscan&&(x.first=this._startIndex-this._startOverscan),x.last>this._endIndex+this._endOverscan&&(x.last=this._endIndex+this._endOverscan),x.first=Math.max(x.first,0),x.last=Math.min(x.last,this._buffer.lines.length);for(var re="",ae=x.first;ae<=x.last;++ae)re+=this._buffer.translateBufferLineToString(ae,this._trimRight);return this._current=x.last+1,{range:x,content:re}},z}();be.BufferStringIterator=b},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.CircularList=void 0;var ie=ce(0),Ce=function(){function ue(se){this._maxLength=se,this.onDeleteEmitter=new ie.EventEmitter,this.onInsertEmitter=new ie.EventEmitter,this.onTrimEmitter=new ie.EventEmitter,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}return Object.defineProperty(ue.prototype,"onDelete",{get:function(){return this.onDeleteEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onInsert",{get:function(){return this.onInsertEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"onTrim",{get:function(){return this.onTrimEmitter.event},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"maxLength",{get:function(){return this._maxLength},set:function(se){if(this._maxLength!==se){for(var te=new Array(se),le=0;le<Math.min(se,this.length);le++)te[le]=this._array[this._getCyclicIndex(le)];this._array=te,this._maxLength=se,this._startIndex=0}},enumerable:!1,configurable:!0}),Object.defineProperty(ue.prototype,"length",{get:function(){return this._length},set:function(se){if(se>this._length)for(var te=this._length;te<se;te++)this._array[te]=void 0;this._length=se},enumerable:!1,configurable:!0}),ue.prototype.get=function(se){return this._array[this._getCyclicIndex(se)]},ue.prototype.set=function(se,te){this._array[this._getCyclicIndex(se)]=te},ue.prototype.push=function(se){this._array[this._getCyclicIndex(this._length)]=se,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++},ue.prototype.recycle=function(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]},Object.defineProperty(ue.prototype,"isFull",{get:function(){return this._length===this._maxLength},enumerable:!1,configurable:!0}),ue.prototype.pop=function(){return this._array[this._getCyclicIndex(this._length---1)]},ue.prototype.splice=function(se,te){for(var le=[],ee=2;ee<arguments.length;ee++)le[ee-2]=arguments[ee];if(te){for(var ne=se;ne<this._length-te;ne++)this._array[this._getCyclicIndex(ne)]=this._array[this._getCyclicIndex(ne+te)];this._length-=te}for(ne=this._length-1;ne>=se;ne--)this._array[this._getCyclicIndex(ne+le.length)]=this._array[this._getCyclicIndex(ne)];for(ne=0;ne<le.length;ne++)this._array[this._getCyclicIndex(se+ne)]=le[ne];if(this._length+le.length>this._maxLength){var E=this._length+le.length-this._maxLength;this._startIndex+=E,this._length=this._maxLength,this.onTrimEmitter.fire(E)}else this._length+=le.length},ue.prototype.trimStart=function(se){se>this._length&&(se=this._length),this._startIndex+=se,this._length-=se,this.onTrimEmitter.fire(se)},ue.prototype.shiftElements=function(se,te,le){if(!(te<=0)){if(se<0||se>=this._length)throw new Error("start argument out of range");if(se+le<0)throw new Error("Cannot shift elements in list beyond index 0");if(le>0){for(var ee=te-1;ee>=0;ee--)this.set(se+ee+le,this.get(se+ee));var ne=se+te+le-this._length;if(ne>0)for(this._length+=ne;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(ee=0;ee<te;ee++)this.set(se+ee+le,this.get(se+ee))}},ue.prototype._getCyclicIndex=function(se){return(this._startIndex+se)%this._maxLength},ue}();be.CircularList=Ce},function(Dt,be,ce){"use strict";function ie(Ce,ue,se){if(ue===Ce.length-1)return Ce[ue].getTrimmedLength();var te=!Ce[ue].hasContent(se-1)&&Ce[ue].getWidth(se-1)===1,le=Ce[ue+1].getWidth(0)===2;return te&&le?se-1:se}Object.defineProperty(be,"__esModule",{value:!0}),be.getWrappedLineTrimmedLength=be.reflowSmallerGetNewLineLengths=be.reflowLargerApplyNewLayout=be.reflowLargerCreateNewLayout=be.reflowLargerGetLinesToRemove=void 0,be.reflowLargerGetLinesToRemove=function(Ce,ue,se,te,le){for(var ee=[],ne=0;ne<Ce.length-1;ne++){var E=ne,b=Ce.get(++E);if(b.isWrapped){for(var z=[Ce.get(ne)];E<Ce.length&&b.isWrapped;)z.push(b),b=Ce.get(++E);if(te>=ne&&te<E)ne+=z.length-1;else{for(var x=0,re=ie(z,x,ue),ae=1,oe=0;ae<z.length;){var ve=ie(z,ae,ue),ye=ve-oe,me=se-re,ge=Math.min(ye,me);z[x].copyCellsFrom(z[ae],oe,re,ge,!1),(re+=ge)===se&&(x++,re=0),(oe+=ge)===ve&&(ae++,oe=0),re===0&&x!==0&&z[x-1].getWidth(se-1)===2&&(z[x].copyCellsFrom(z[x-1],se-1,re++,1,!1),z[x-1].setCell(se-1,le))}z[x].replaceCells(re,se,le);for(var _e=0,he=z.length-1;he>0&&(he>x||z[he].getTrimmedLength()===0);he--)_e++;_e>0&&(ee.push(ne+z.length-_e),ee.push(_e)),ne+=z.length-1}}}return ee},be.reflowLargerCreateNewLayout=function(Ce,ue){for(var se=[],te=0,le=ue[te],ee=0,ne=0;ne<Ce.length;ne++)if(le===ne){var E=ue[++te];Ce.onDeleteEmitter.fire({index:ne-ee,amount:E}),ne+=E-1,ee+=E,le=ue[++te]}else se.push(ne);return{layout:se,countRemoved:ee}},be.reflowLargerApplyNewLayout=function(Ce,ue){for(var se=[],te=0;te<ue.length;te++)se.push(Ce.get(ue[te]));for(te=0;te<se.length;te++)Ce.set(te,se[te]);Ce.length=ue.length},be.reflowSmallerGetNewLineLengths=function(Ce,ue,se){for(var te=[],le=Ce.map(function(re,ae){return ie(Ce,ae,ue)}).reduce(function(re,ae){return re+ae}),ee=0,ne=0,E=0;E<le;){if(le-E<se){te.push(le-E);break}ee+=se;var b=ie(Ce,ne,ue);ee>b&&(ee-=b,ne++);var z=Ce[ne].getWidth(ee-1)===2;z&&ee--;var x=z?se-1:se;te.push(x),E+=x}return te},be.getWrappedLineTrimmedLength=ie},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(te,le){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ee,ne){ee.__proto__=ne}||function(ee,ne){for(var E in ne)ne.hasOwnProperty(E)&&(ee[E]=ne[E])})(te,le)},function(te,le){function ee(){this.constructor=te}ie(te,le),te.prototype=le===null?Object.create(le):(ee.prototype=le.prototype,new ee)});Object.defineProperty(be,"__esModule",{value:!0}),be.Marker=void 0;var ue=ce(0),se=function(te){function le(ee){var ne=te.call(this)||this;return ne.line=ee,ne._id=le._nextId++,ne.isDisposed=!1,ne._onDispose=new ue.EventEmitter,ne}return Ce(le,te),Object.defineProperty(le.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(le.prototype,"onDispose",{get:function(){return this._onDispose.event},enumerable:!1,configurable:!0}),le.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire())},le._nextId=1,le}(ce(2).Disposable);be.Marker=se},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.OptionsService=be.DEFAULT_OPTIONS=be.DEFAULT_BELL_SOUND=void 0;var ie=ce(0),Ce=ce(11),ue=ce(33);be.DEFAULT_BELL_SOUND="data:audio/mp3;base64,SUQzBAAAAAAAI1RTU0UAAAAPAAADTGF2ZjU4LjMyLjEwNAAAAAAAAAAAAAAA//tQxAADB8AhSmxhIIEVCSiJrDCQBTcu3UrAIwUdkRgQbFAZC1CQEwTJ9mjRvBA4UOLD8nKVOWfh+UlK3z/177OXrfOdKl7pyn3Xf//WreyTRUoAWgBgkOAGbZHBgG1OF6zM82DWbZaUmMBptgQhGjsyYqc9ae9XFz280948NMBWInljyzsNRFLPWdnZGWrddDsjK1unuSrVN9jJsK8KuQtQCtMBjCEtImISdNKJOopIpBFpNSMbIHCSRpRR5iakjTiyzLhchUUBwCgyKiweBv/7UsQbg8isVNoMPMjAAAA0gAAABEVFGmgqK////9bP/6XCykxBTUUzLjEwMKqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq",be.DEFAULT_OPTIONS=Object.freeze({cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,bellSound:be.DEFAULT_BELL_SOUND,bellStyle:"none",drawBoldTextInBrightColors:!0,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",lineHeight:1,linkTooltipHoverDuration:500,letterSpacing:0,logLevel:"info",scrollback:1e3,scrollSensitivity:1,screenReaderMode:!1,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!0,allowTransparency:!1,tabStopWidth:8,theme:{},rightClickSelectsWord:Ce.isMac,rendererType:"canvas",windowOptions:{},windowsMode:!1,wordSeparator:" ()[]{}',\"`",convertEol:!1,termName:"xterm",cancelEvents:!1});var se=["cols","rows"],te=function(){function le(ee){this._onOptionChange=new ie.EventEmitter,this.options=ue.clone(be.DEFAULT_OPTIONS);for(var ne=0,E=Object.keys(ee);ne<E.length;ne++){var b=E[ne];if(b in this.options){var z=ee[b];this.options[b]=z}}}return Object.defineProperty(le.prototype,"onOptionChange",{get:function(){return this._onOptionChange.event},enumerable:!1,configurable:!0}),le.prototype.setOption=function(ee,ne){if(!(ee in be.DEFAULT_OPTIONS))throw new Error('No option with key "'+ee+'"');if(se.indexOf(ee)!==-1)throw new Error('Option "'+ee+'" can only be set in the constructor');this.options[ee]!==ne&&(ne=this._sanitizeAndValidateOption(ee,ne),this.options[ee]!==ne&&(this.options[ee]=ne,this._onOptionChange.fire(ee)))},le.prototype._sanitizeAndValidateOption=function(ee,ne){switch(ee){case"bellStyle":case"cursorStyle":case"fontWeight":case"fontWeightBold":case"rendererType":case"wordSeparator":ne||(ne=be.DEFAULT_OPTIONS[ee]);break;case"cursorWidth":ne=Math.floor(ne);case"lineHeight":case"tabStopWidth":if(ne<1)throw new Error(ee+" cannot be less than 1, value: "+ne);break;case"minimumContrastRatio":ne=Math.max(1,Math.min(21,Math.round(10*ne)/10));break;case"scrollback":if((ne=Math.min(ne,4294967295))<0)throw new Error(ee+" cannot be less than 0, value: "+ne);break;case"fastScrollSensitivity":case"scrollSensitivity":if(ne<=0)throw new Error(ee+" cannot be less than or equal to 0, value: "+ne)}return ne},le.prototype.getOption=function(ee){if(!(ee in be.DEFAULT_OPTIONS))throw new Error('No option with key "'+ee+'"');return this.options[ee]},le}();be.OptionsService=te},function(Dt,be,ce){"use strict";var ie,Ce=this&&this.__extends||(ie=function(x,re){return(ie=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(ae,oe){ae.__proto__=oe}||function(ae,oe){for(var ve in oe)oe.hasOwnProperty(ve)&&(ae[ve]=oe[ve])})(x,re)},function(x,re){function ae(){this.constructor=x}ie(x,re),x.prototype=re===null?Object.create(re):(ae.prototype=re.prototype,new ae)}),ue=this&&this.__decorate||function(x,re,ae,oe){var ve,ye=arguments.length,me=ye<3?re:oe===null?oe=Object.getOwnPropertyDescriptor(re,ae):oe;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")me=Reflect.decorate(x,re,ae,oe);else for(var ge=x.length-1;ge>=0;ge--)(ve=x[ge])&&(me=(ye<3?ve(me):ye>3?ve(re,ae,me):ve(re,ae))||me);return ye>3&&me&&Object.defineProperty(re,ae,me),me},se=this&&this.__param||function(x,re){return function(ae,oe){re(ae,oe,x)}};Object.defineProperty(be,"__esModule",{value:!0}),be.CoreService=void 0;var te=ce(1),le=ce(0),ee=ce(33),ne=ce(2),E=Object.freeze({insertMode:!1}),b=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0}),z=function(x){function re(ae,oe,ve,ye){var me=x.call(this)||this;return me._bufferService=oe,me._logService=ve,me._optionsService=ye,me.isCursorInitialized=!1,me.isCursorHidden=!1,me._onData=me.register(new le.EventEmitter),me._onUserInput=me.register(new le.EventEmitter),me._onBinary=me.register(new le.EventEmitter),me._scrollToBottom=ae,me.register({dispose:function(){return me._scrollToBottom=void 0}}),me.modes=ee.clone(E),me.decPrivateModes=ee.clone(b),me}return Ce(re,x),Object.defineProperty(re.prototype,"onData",{get:function(){return this._onData.event},enumerable:!1,configurable:!0}),Object.defineProperty(re.prototype,"onUserInput",{get:function(){return this._onUserInput.event},enumerable:!1,configurable:!0}),Object.defineProperty(re.prototype,"onBinary",{get:function(){return this._onBinary.event},enumerable:!1,configurable:!0}),re.prototype.reset=function(){this.modes=ee.clone(E),this.decPrivateModes=ee.clone(b)},re.prototype.triggerDataEvent=function(ae,oe){if(oe===void 0&&(oe=!1),!this._optionsService.options.disableStdin){var ve=this._bufferService.buffer;ve.ybase!==ve.ydisp&&this._scrollToBottom(),oe&&this._onUserInput.fire(),this._logService.debug('sending data "'+ae+'"',function(){return ae.split("").map(function(ye){return ye.charCodeAt(0)})}),this._onData.fire(ae)}},re.prototype.triggerBinaryEvent=function(ae){this._optionsService.options.disableStdin||(this._logService.debug('sending binary "'+ae+'"',function(){return ae.split("").map(function(oe){return oe.charCodeAt(0)})}),this._onBinary.fire(ae))},re=ue([se(1,te.IBufferService),se(2,te.ILogService),se(3,te.IOptionsService)],re)}(ne.Disposable);be.CoreService=z},function(Dt,be,ce){"use strict";var ie=this&&this.__decorate||function(b,z,x,re){var ae,oe=arguments.length,ve=oe<3?z:re===null?re=Object.getOwnPropertyDescriptor(z,x):re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ve=Reflect.decorate(b,z,x,re);else for(var ye=b.length-1;ye>=0;ye--)(ae=b[ye])&&(ve=(oe<3?ae(ve):oe>3?ae(z,x,ve):ae(z,x))||ve);return oe>3&&ve&&Object.defineProperty(z,x,ve),ve},Ce=this&&this.__param||function(b,z){return function(x,re){z(x,re,b)}};Object.defineProperty(be,"__esModule",{value:!0}),be.CoreMouseService=void 0;var ue=ce(1),se=ce(0),te={NONE:{events:0,restrict:function(){return!1}},X10:{events:1,restrict:function(b){return b.button!==4&&b.action===1&&(b.ctrl=!1,b.alt=!1,b.shift=!1,!0)}},VT200:{events:19,restrict:function(b){return b.action!==32}},DRAG:{events:23,restrict:function(b){return b.action!==32||b.button!==3}},ANY:{events:31,restrict:function(b){return!0}}};function le(b,z){var x=(b.ctrl?16:0)|(b.shift?4:0)|(b.alt?8:0);return b.button===4?(x|=64,x|=b.action):(x|=3&b.button,4&b.button&&(x|=64),8&b.button&&(x|=128),b.action===32?x|=32:b.action!==0||z||(x|=3)),x}var ee=String.fromCharCode,ne={DEFAULT:function(b){var z=[le(b,!1)+32,b.col+32,b.row+32];return z[0]>255||z[1]>255||z[2]>255?"":"\x1B[M"+ee(z[0])+ee(z[1])+ee(z[2])},SGR:function(b){var z=b.action===0&&b.button!==4?"m":"M";return"\x1B[<"+le(b,!0)+";"+b.col+";"+b.row+z}},E=function(){function b(z,x){this._bufferService=z,this._coreService=x,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._onProtocolChange=new se.EventEmitter,this._lastEvent=null;for(var re=0,ae=Object.keys(te);re<ae.length;re++){var oe=ae[re];this.addProtocol(oe,te[oe])}for(var ve=0,ye=Object.keys(ne);ve<ye.length;ve++){var me=ye[ve];this.addEncoding(me,ne[me])}this.reset()}return b.prototype.addProtocol=function(z,x){this._protocols[z]=x},b.prototype.addEncoding=function(z,x){this._encodings[z]=x},Object.defineProperty(b.prototype,"activeProtocol",{get:function(){return this._activeProtocol},set:function(z){if(!this._protocols[z])throw new Error('unknown protocol "'+z+'"');this._activeProtocol=z,this._onProtocolChange.fire(this._protocols[z].events)},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"areMouseEventsActive",{get:function(){return this._protocols[this._activeProtocol].events!==0},enumerable:!1,configurable:!0}),Object.defineProperty(b.prototype,"activeEncoding",{get:function(){return this._activeEncoding},set:function(z){if(!this._encodings[z])throw new Error('unknown encoding "'+z+'"');this._activeEncoding=z},enumerable:!1,configurable:!0}),b.prototype.reset=function(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null},Object.defineProperty(b.prototype,"onProtocolChange",{get:function(){return this._onProtocolChange.event},enumerable:!1,configurable:!0}),b.prototype.triggerMouseEvent=function(z){if(z.col<0||z.col>=this._bufferService.cols||z.row<0||z.row>=this._bufferService.rows||z.button===4&&z.action===32||z.button===3&&z.action!==32||z.button!==4&&(z.action===2||z.action===3)||(z.col++,z.row++,z.action===32&&this._lastEvent&&this._compareEvents(this._lastEvent,z))||!this._protocols[this._activeProtocol].restrict(z))return!1;var x=this._encodings[this._activeEncoding](z);return x&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(x):this._coreService.triggerDataEvent(x,!0)),this._lastEvent=z,!0},b.prototype.explainEvents=function(z){return{down:!!(1&z),up:!!(2&z),drag:!!(4&z),move:!!(8&z),wheel:!!(16&z)}},b.prototype._compareEvents=function(z,x){return z.col===x.col&&z.row===x.row&&z.button===x.button&&z.action===x.action&&z.ctrl===x.ctrl&&z.alt===x.alt&&z.shift===x.shift},b=ie([Ce(0,ue.IBufferService),Ce(1,ue.ICoreService)],b)}();be.CoreMouseService=E},function(Dt,be,ce){"use strict";var ie=this&&this.__decorate||function(te,le,ee,ne){var E,b=arguments.length,z=b<3?le:ne===null?ne=Object.getOwnPropertyDescriptor(le,ee):ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(te,le,ee,ne);else for(var x=te.length-1;x>=0;x--)(E=te[x])&&(z=(b<3?E(z):b>3?E(le,ee,z):E(le,ee))||z);return b>3&&z&&Object.defineProperty(le,ee,z),z},Ce=this&&this.__param||function(te,le){return function(ee,ne){le(ee,ne,te)}};Object.defineProperty(be,"__esModule",{value:!0}),be.DirtyRowService=void 0;var ue=ce(1),se=function(){function te(le){this._bufferService=le,this.clearRange()}return Object.defineProperty(te.prototype,"start",{get:function(){return this._start},enumerable:!1,configurable:!0}),Object.defineProperty(te.prototype,"end",{get:function(){return this._end},enumerable:!1,configurable:!0}),te.prototype.clearRange=function(){this._start=this._bufferService.buffer.y,this._end=this._bufferService.buffer.y},te.prototype.markDirty=function(le){le<this._start?this._start=le:le>this._end&&(this._end=le)},te.prototype.markRangeDirty=function(le,ee){if(le>ee){var ne=le;le=ee,ee=ne}le<this._start&&(this._start=le),ee>this._end&&(this._end=ee)},te.prototype.markAllDirty=function(){this.markRangeDirty(0,this._bufferService.rows-1)},te=ie([Ce(0,ue.IBufferService)],te)}();be.DirtyRowService=se},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.UnicodeService=void 0;var ie=ce(0),Ce=ce(79),ue=function(){function se(){this._providers=Object.create(null),this._active="",this._onChange=new ie.EventEmitter;var te=new Ce.UnicodeV6;this.register(te),this._active=te.version,this._activeProvider=te}return Object.defineProperty(se.prototype,"onChange",{get:function(){return this._onChange.event},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"versions",{get:function(){return Object.keys(this._providers)},enumerable:!1,configurable:!0}),Object.defineProperty(se.prototype,"activeVersion",{get:function(){return this._active},set:function(te){if(!this._providers[te])throw new Error('unknown Unicode version "'+te+'"');this._active=te,this._activeProvider=this._providers[te],this._onChange.fire(te)},enumerable:!1,configurable:!0}),se.prototype.register=function(te){this._providers[te.version]=te},se.prototype.wcwidth=function(te){return this._activeProvider.wcwidth(te)},se.prototype.getStringCellWidth=function(te){for(var le=0,ee=te.length,ne=0;ne<ee;++ne){var E=te.charCodeAt(ne);if(55296<=E&&E<=56319){if(++ne>=ee)return le+this.wcwidth(E);var b=te.charCodeAt(ne);56320<=b&&b<=57343?E=1024*(E-55296)+b-56320+65536:le+=this.wcwidth(b)}le+=this.wcwidth(E)}return le},se}();be.UnicodeService=ue},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.UnicodeV6=void 0;var ie,Ce=ce(15),ue=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],se=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]],te=function(){function le(){if(this.version="6",!ie){ie=new Uint8Array(65536),Ce.fill(ie,1),ie[0]=0,Ce.fill(ie,0,1,32),Ce.fill(ie,0,127,160),Ce.fill(ie,2,4352,4448),ie[9001]=2,ie[9002]=2,Ce.fill(ie,2,11904,42192),ie[12351]=1,Ce.fill(ie,2,44032,55204),Ce.fill(ie,2,63744,64256),Ce.fill(ie,2,65040,65050),Ce.fill(ie,2,65072,65136),Ce.fill(ie,2,65280,65377),Ce.fill(ie,2,65504,65511);for(var ee=0;ee<ue.length;++ee)Ce.fill(ie,0,ue[ee][0],ue[ee][1]+1)}}return le.prototype.wcwidth=function(ee){return ee<32?0:ee<127?1:ee<65536?ie[ee]:function(ne,E){var b,z=0,x=E.length-1;if(ne<E[0][0]||ne>E[x][1])return!1;for(;x>=z;)if(ne>E[b=z+x>>1][1])z=b+1;else{if(!(ne<E[b][0]))return!0;x=b-1}return!1}(ee,se)?0:ee>=131072&&ee<=196605||ee>=196608&&ee<=262141?2:1},le}();be.UnicodeV6=te},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.CharsetService=void 0;var ie=function(){function Ce(){this.glevel=0,this._charsets=[]}return Ce.prototype.reset=function(){this.charset=void 0,this._charsets=[],this.glevel=0},Ce.prototype.setgLevel=function(ue){this.glevel=ue,this.charset=this._charsets[ue]},Ce.prototype.setgCharset=function(ue,se){this._charsets[ue]=se,this.glevel===ue&&(this.charset=se)},Ce}();be.CharsetService=ie},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.updateWindowsModeWrappedState=void 0;var ie=ce(3);be.updateWindowsModeWrappedState=function(Ce){var ue=Ce.buffer.lines.get(Ce.buffer.ybase+Ce.buffer.y-1),se=ue==null?void 0:ue.get(Ce.cols-1),te=Ce.buffer.lines.get(Ce.buffer.ybase+Ce.buffer.y);te&&se&&(te.isWrapped=se[ie.CHAR_DATA_CODE_INDEX]!==ie.NULL_CELL_CODE&&se[ie.CHAR_DATA_CODE_INDEX]!==ie.WHITESPACE_CELL_CODE)}},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.WriteBuffer=void 0;var ie=function(){function Ce(ue){this._action=ue,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0}return Ce.prototype.writeSync=function(ue){if(this._writeBuffer.length){for(var se=this._bufferOffset;se<this._writeBuffer.length;++se){var te=this._writeBuffer[se],le=this._callbacks[se];this._action(te),le&&le()}this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=2147483647}this._action(ue)},Ce.prototype.write=function(ue,se){var te=this;if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");this._writeBuffer.length||(this._bufferOffset=0,setTimeout(function(){return te._innerWrite()})),this._pendingData+=ue.length,this._writeBuffer.push(ue),this._callbacks.push(se)},Ce.prototype._innerWrite=function(){for(var ue=this,se=Date.now();this._writeBuffer.length>this._bufferOffset;){var te=this._writeBuffer[this._bufferOffset],le=this._callbacks[this._bufferOffset];if(this._bufferOffset++,this._action(te),this._pendingData-=te.length,le&&le(),Date.now()-se>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout(function(){return ue._innerWrite()},0)):(this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0)},Ce}();be.WriteBuffer=ie},function(Dt,be,ce){"use strict";Object.defineProperty(be,"__esModule",{value:!0}),be.AddonManager=void 0;var ie=function(){function Ce(){this._addons=[]}return Ce.prototype.dispose=function(){for(var ue=this._addons.length-1;ue>=0;ue--)this._addons[ue].instance.dispose()},Ce.prototype.loadAddon=function(ue,se){var te=this,le={instance:se,dispose:se.dispose,isDisposed:!1};this._addons.push(le),se.dispose=function(){return te._wrappedAddonDispose(le)},se.activate(ue)},Ce.prototype._wrappedAddonDispose=function(ue){if(!ue.isDisposed){for(var se=-1,te=0;te<this._addons.length;te++)if(this._addons[te]===ue){se=te;break}if(se===-1)throw new Error("Could not dispose an addon that has not been loaded");ue.isDisposed=!0,ue.dispose.apply(ue.instance),this._addons.splice(se,1)}},Ce}();be.AddonManager=ie}])})},93314:function(qt){"use strict";qt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMwAAACaCAYAAADl9acYAAAAAXNSR0IArs4c6QAAIABJREFUeF7tXQd4U1Ubfs/NaJtO9kzLahFQEJkiUBBFUFFkCCjiAAVFERT5FREQQQXBBcpysWRP2RtkKRsEOphNodCZdDfjnv85CU2TZt2bhABNDw9PmtzvrO+c957xLQIP0pkz1yrQIEmwwcDzHhTj91klEo7jpcG5zetWUJdmRjmPvTM9GI9JgSGvadOoLE9KJJ5kPp2YXLtZdO1kT8ooz2vigCNelvPYezPEG7z0CDAn4pJqPvJA5A3vdcl/S3LEy3Iee29OeIOX5YDx3nh4VFI5YDxin6DM5YARxKb7g6gcMHd+nMoBc+d57LKGhCQ1ZURBCoVL2nKCO8sBZWW50x1TOWDuLP8FlV4OGEFs8glROWB8wmbPKikHjGf882bucsB4k5t3qKxywNwhxrpRbJkGTOx0ehlA3d9e5VEtzA3ulGe55zmg1QOfrCVo34BgQGvr5rLDRl4RRZG+5NjBESBc4FHw1LlrCAuPsCo0JjKi7J5hYqfTXADBq4byCJLf82Nf3kA3OfD9LgKdgeCzZ4CUTJ1VKQFyKQgpmeMSjiKvQC+oplspN/wOMDcBVFv0Bo+KwYJ4VE50H3Jg7j6CWzkEX74A3MrSgTfeKZpSaBCHcAVn/JunBHlFPDR5BkG9LMjPt7mZLOtbskQADea9wqOW9coqiGHlRPcHBxYcJriQQvB9P+v2cqCwWFxgoOJk6JeTNX4HmJMAHv6xP4/6VXw/+OxNx/bM/pIohdUE9VW/VxwjOHiJYO5A6xolpGSpYW3jIW4w/A8wM+h+UHSY2pvHgzV9NXymeor0wPc7Cf7XzWJ/4Nsm+Ly2LzZx+OwZ3yuVbzhNsPEMwcI3rM8wMikHiURi5gNbbQoKrc84zpjkj2eYzQC6f96DomUd305ctrp8tp5gSk/f1utzlFhUOHYthy9f8D1gdpwnWHiEYOVQ6zNM6QM/AY+CImHnF9YtfwTMCgB9P+5G0SHa9xP3bk2gT9cBU3r6Hjp95nBYNcz3gDlwkRhX843vlfS59PmFHfjFzgC/2pJ1nEEnEIpIAG+834Wia2Ox7PJ8wt0twLz7J8Gsl3zf316zCVYPsz5oe85F1yUcu0YwcQPBjlElZyjL8wsrQeyBn+XxK8DETqefgyACFCPe6kjxfDPfT6C7BpilBLMG+L6/A34h+P1VikCZ60nuTYpzN4AxqznjCqPOMZ1RSp9f2OVLYZH1lbOrNvjVlswIGEAKYOyrj1K82NL3E+huAWbEMnbFSn1+Qzd4AcE3fajPZV6X04D3lnHGM4xOawKFJwLLYiD5H2AoCkHwJQMLA42v090CzJjVBBN7UCh8rN3AgDrqCYq6lX3L6RQ1MGQRhwWvA7UrALbnFzCJjOhG+d2WjFCkUYKZPZpSDIv1PWDGrycY34NCahI0+yxN/Ivg3c4UlUN8VqWxok/XEfRrSdG0tm/rzcoHBv7KYc5AILqqLWDcOb/45RmGEFyhFL8/0Yga33y+Tl9uJhjxOEVIoG9rnrqVKSJSRFb0fb3tG1A81sC39TLRSu85HL57Eaii0Bm3oqEKqZXSJaUURUxTU0Tyuy0ZAc5SYCUbxE+6+x4w3+0kGNiWooqP3/Qz9xB0bUTRsLqI2eEFUlbvA9WBJxv5ltdMit9jFocpLwB1InQIkBEQTmLUHStOBoMBOr24K2+/AwwPHOKArS2iKCY9VzKIg34jyMgTv6f1wpwqL8JLHKgUTLHwjZIxZTKg0V2Bzg2tLzvYBYA75xe/25J1mkEnGAzYyXE40KQmMK23uLeLN8b1j0ME7epTxFTzRmnCy/jzXyCqIny+NVryDzFeKfd+xLcrDOMMO8MMfgx45iFrOZA7AstiTvvVoZ91usM3tClHcLpeZWDmAN8DZtlRgkY1KJr5+BC87hQQLAeebCwcZN6gXH6MgG2P+rfyDmD+WLoV8xZugkIRiNh2TTHghcfRoF4tFBZpkXgpGQ81rmdu9puLOLzwMPBYPR1Cgzw/v7CC/WpLxjrc/jtaT2LApRrhwC+DfA+Y9aeI0dKzbT3vTCChk3r7eaBABzzfTGgO79CtPUmM9b7U2jv9bf3kOyjSlihLcoSg93MdkZ2Th227j2Hoq8/inTeeNzZ+xFIOsTHAsw/pAeL5+cUvAdPuG1pVRnArQgEsGex7wGw7RxAgBTo19M4EEjqtD1wEkrPYm15oDu/QbfkPSM0hHsu8du0/gSnfLkFGVrbThjFLynULJ6FOZHUw2RNbyd/qUJLFHZV+ywr9aksWO4Ou0BK8KueRz/bVq++CUuD+RGbhB3R/0LeAOZEEnFIRvPGYb+vdGw+cvU7w3uOe1dv+mfeRk5svCMUfvz8AA3o9jgkbCJQVgPe7lGTz5MDvj4f+VXs/JH1ip1PmAkHy17u8z42bjl4lxjf9C809m0CCZo4FUVwKsDPOJLz0ZTp6Fdh6jtnWe1bvuCm/4q/tRwQ1/b03e2LIwGfw1RaCkADg425AOvPkYCHZd0cG43dbsk4zaDFgWHiHcG85wjBQoEhnMhAzf5r/Jihkf9/+fjXDtDXqGA108+Eqcy0DYAfwMU95NnEFzVgLovibwK8HCab19qze61s24Pf5K7A5KwB5vHM1CblMij9m/Q87rtc1jsek54CMPIBayGD0BgP0ImUw/gwYFiqjllhHGAcvAkuPcijU8cgv0KGgSGv8LNJqweu1MOh14A3ss+S78W+Dzuo3RsPoTy0YgIjQALFz0C36tBzg570EE3p4NnHFVn5TA0zaSPDzy57Vu2bIS6jF67BDHYBHgnVI0kow+6ZjLyZNm9RD+35jkZINfNO7ZIVhEn+e16NQ6157/OqWjJ1h9n1IXoydTi8AeGD+KzxqinCEsfkswfBJC2HQacXOG7v0B+e9CGXVUK+U5aoQdm5iE3eqh296R/XoDEBu0e3/hcz3FzF+Z292trI91Zgav7N2tKrDrrfFTdgTI4dAl61BipZDDXYINRCMvBrusNvBikAMHT8LTM3/pwElK4xMAuQV6uBuKK4yA5hEVfY8SvmmHCETGyjDtzqbQLHf0KMgaCnWEcaW/whGT1mAHHZP6oW09bueaFy3khdKcl0EO+y+v4xgphs2MWxbs+K46bLCDIoi6+9iVLKY4PbTp8UB5t8h/UB53qimz1aJA9lyLExz7H1vyMCnUa15L/x9EfhtkIk/nh74y9ShPz5JnUGA26qFZIdcTofWqR5xxd5Uip1O9wDoJNYRxs4LBB9PXYxUdaHrGSqAYuWUp9GmSQ0BlN4h8cTq8qVfOGgKStpBeAoJb4DEYPrPsU89b/5e/LvEYPubLCIQX06NEtWpfwa/yA4h0FEgqVCK71OCUeTARdLLfbpg9PAXsfGsBBtOA0uHmKpyV0PZsqFl5lo5QaXWgRqNw4pTHiEYGa2M+KX0yMROpxsA9BDrCGNvAsG4GcuQdMt45eJx+nXsk3iyNbOY9k161wOry8/GqZCr1t4GBA/O3T0Nm7gSDl/89IBRHiU0nRk3CgU3knEmT4pZN51rrjI5TN2oGmCOMP44BKx7B8jINemP8ZRCK2Y5LNXAMrMlS0hSpwKw9TRGME+XHf5ekybEfPCInU7/BDBArCOMw5cIPvt+JRJUGqHj7JRu2rsd0P+JGBuanELTTVpwwO3/cnjFxNcTwMz95hquxud5pd+skIEfR6NJA+F2y6o1S3Fj4xpj/X9lBmK7OsDuChMUKMf+v36AXC4Fc4QxYwew/X0gM8/k5VKvN0BvcF9gfc8CJuGWuh4twgoQnJSBzK+nDP+3eLTsBahJSNL8DdD29kaUAFsDSU4vpVJp3FTETqdzAbwl1hHGySSCCTPX41RimlcmzthBrTCsV1Obss5cJ2hWXQupTIoiHUW+1nRYZkcn5kRbTzlIOQq5hBmimfRu2RwoeU4gl5rAFiI3Odpmb/NRK0zXu+zgKzZtWZWK/VvTxWZzSP/EK5HoEivcxsFQWIBzk8caVxmWmMT+g6thNlfMg/p1xYfv9DXSMEcYEzYAu247wnBXQ9myE/fslixRpf6FUgw2N5bgDChmk6Lw33MMqkqlg8JeVKmn8hRjHI0QIdgbiJynGWhiZ9AZoPhgaEeK50Q4wmDCvwmzt+HwGe8EcH67V1N8MshWV4UBpnlNLQID3Lcn5nkKrZ6iUEex4azEqC08di0BW1XDgsTP+2NHsrH6F+/0m9Xetns1PN9b3IWHPi8XyetXIOPoEeg1WbhYKMGK9CCoiiSoWq0SnuvWzqhLVuyoz+wI411mmi3epZI9Lt2zgElIUht9INtpdDJPMUsSGf59NCFFxc8TknI6AoZ9LqbCmj+V4X33zMAEAOMHtaXoJ0KLVpUJjJuzD3v+vSh+xtnJ0ffxaMwY0dHuCtO8pg6BAcK3LI4axCTai/4hRsBM3kww5DGK6o5vYx32S52pw9QxbEi8k6o2DMeoj2q5VVhqNnB29JsI0TP5M6Dj5Gg7dwmkpVZOsyOMtyg4joDyBhRq3d+Osbru3S2ZSp0LCmf+9ZM5CUY3qBWx3LREUy5RpbkKQOl0FAimvrksPAME08Q6wmD74DGz/8H2A/+5NdClM8U2r4VFE7rZBcwjtXQIkHsOGLbSLP7XBJhvdxD0fJiinhs+pVk5n41IBM/UFryQSHggvpxRooovpsgdFwjoD8MQri3ZIso/XYzm9a2FwDfUAFPxX/AaRYSCeCR/KW7fvQuYJE0RQF3vSQh2UQn3bsOaYXEJSZrPADrJBfP5BceCVx+4LO0r1hGG3gC8//Np/LXrmJjxdUhbv1YE9vzU22eAmbOPBRmieNCNFzvP8/jhaxVSL3vn4M9zBJN/bgSZgJsyplZ0KQ24oSZgq8vmE4V4+9hrkNIS8O5uPhbNOz+CprWpWRhd7Ahj9svMYM871rT38pbM/q2XvelHoeU4bpxBgt+Jjr8MAqfi80NXZEW/H1UEuOMIY/zCRPyxZr9XABMSJMP5pbelahYlsjNMi1p6402Pp8lyhWEhIBpVp2hdV1yp6nwgPAhYvzQF/+zOEpfZCfXgz6LRIMrxKsq0B5YcKsL6UxRFvBygelBdLjhZGMCx/RfTKWMCUGZzbAClvJEmtiGH97oEGLdhzBHGjL4UDyvLOmBUmn9AaamAay7GimAXgdErzG1RlX36k9el+PlgsPFtK9YRxtwtNzBl7havTZoLywYhuJRbSCNgauvBlAg9TQYDjyVHOeOWbOVxoEoo0Mn2JttpNZvOcmhfn0KTXoTr8TlITSnCrRSt8TMvV7gj79KVPDskCo+1tb/rZkLScavzcTlTARBrZUu+MB1coHNHZ8rQXEzvH4T+8yWY9DzQrj6QptFDzzRlPUj37JbM5pZMeCfZK5CNgsPt3PlbEny3LwSlHWEIqWLzcTWGfbFaCKkgml0zeyNaaa3QdqcAs+msSa2k+4OCmmYm2nyWQ98W9idabo4eqSla3EopMn6m3mRgKkJ6KlM6dV5Plz418ES3CjZE7Ar9w2X5UGXbv3bmC1NBAiqBEOf34zFhKlzLq40PuxK0i8qFutBzRdd7FjDx1zSDCKELxA2tmZoyyztqqc9tUdDlDAm+2hUCdxxhHIwrwOAJy5EvIkSCsz78Nq4rnmhpfU/BANOytgEydwQmpSpjQro/b68we+JNArzej4jjKouz0q+luDwGAzWCxnI1Kr0qPfpEZTzXv6pVwUzf6+MVBTiX6vi+hxoKQfUF4AJswWZZGF+UCUN2IsYMaINnbcVd4jp0m/qePcNcvJlTldcaUm5vVN3qnKNM1zUcJm4LhTuOMP65qMWYGWtxJcU76jGT3nwUrz1j7ZnCCBilAbLS96RucIFJtv88ZpLD/HMZSEgFXmkrrqANp2yjEYsroYRar6f44I3zxh9qNwnH8FHWNxBLj2ix6F85SKltmGV9lBrAF6RConCuh8fotCn7MSC2Fob3ELkPddDBexYwrL2JSZqtFPQpdwfHUT7mf+zjTWFwxxHG8St6zPhtCw6cZXcSnqdhLzTF2FethZcMMK2UBki9DBgmbz18mYAJbMUk5shiYBsxORzT5ucZ8PHbcUaC4OpBGDe55AbiShqP9/40gHLOt058UZbxXMPJnQuUKK+DLi8DEs0R/PJBLIIVwjULHPXgnt2SsQbHq7JeIJSYFIi8mNgeeeT6cFRQAItFOsL4L5li0do9WLrLriK06FZ2e7QO5v3PwugcgDcBo9MbsPT2CnMxFcYwdiNFuMhlKjcs/J23AMMEoONHJhj5JA2T44tvS2TTo5cX4kKqY5X9YuYacq9CEhzlMngmr8uGQasFLUpDPcUV/DCiKwrcNBwrrvueBsyKFVTSvG32aQraRPRMdJKBWaa+vSrcqNAo1hEGsyD8Y/1R/LzmjFea1EBZAbtn9rIqywiYSB5Siecey3U6A5YeN23JmCCPORIcK8IWhV0ps1Wpj8hzjyPmsDPN5P+ZNCWInMOXPz9g/PtgohZfbpEZ3SE5TxSGXBUkIa61vPnCDLCzFEuGrOMY1q02Xunq2VS6p7dkrKOJ17N7UAPP1PG9moatCoOBJ9go0hEGe+P+vC4e3yw84JX2VAoLxMmFL9sApnUkD4kXAKPV6bHsuNQIGDb5p28nmCwixmZSJnA5jeCZh1x3NzfpKi7M/xlFGRmo0qoNqnfohPAG1mcH1dUCfDP+sqkwjuCreY2Mf478swiJGa6V3Az518EFVgHhXMu0DYUZ4G8Dhuqy0Sg0EfM+8myHf88DhjEzIUmzAaA9XA+ZcIqR60KRp+XgjiOM3Sdu4s0vtyAkSIrgQCmCg6QIYZ+BMuPf7Dfzs9vP2bPi34ICZTh2szJ6NM41HuyrV7f2G8tWmNZRPCSc5yuMJWCYGcjHawm+7Sv8DPPfdSBfS9C5oWveHhg+GFqNyfRBEhgIeWgY2kz7AZysRDh5KT4fP0y5vZ0lwBdzGoO9FwbOK4S6KMDpCkP1eaD6fCNghCSDNhe8zmTsVznrMD59XIGa7Wx194SUVUxzT2/JihuZmJJThWoNZ0HgNY/EH28MRUY+B7GOMFibcrJzkJuXB3Z1zXHc7U9ivNlh0mX2aXpm/7ekLA57E6R44zHm5slWAs0A0ybKpDDoaWLhHJafMK0wLIm1ujx0iYD56WgrQO3ryuplSN6xzajkqM83+RCr1aUrol95A5zUJIT971QO5n2bZPybXYRNntsYvx4guLJrL1qkbsD2moOQHP6wlUskRkt5PfiCm5AEC/exa9DmgNcVoVL2KQy59RsqhAQg6tPvwAU5U1F0zvH7AjCsC4mqnE6UGpitvsfSJ0IIHb8lmNzIlkCsIwxPJzDLf10NrDtJMNyBjzDvAkaH5SdkbgOGOf5oVAN4sKawnl+YOwspf+81EzPIh9VvgCbvfoDAKlVx9JAai+ZcNz4PVBBE9W+M07uPo9/laeBgknSeC22ObbVeQ06QCRzselivuQhZBNveCX+JGAoyEZEThyE3fkIYNa00yh69UPdF6y2wsJ6ZqO6LLZl5pUlW9wHFMkrh6mTokgdf7QzG5UwpxDrCcFmwAAImPPztIMHorva3RkbA1GEhGoRPDkfVMj/EVoARaabM2vliCxj9QQtJ1GDAtU3rcGPXDmjVWWDfWWJbtHp9BiCwRScU6KQICJRg4VEp4g8ex4tXvrFSpGT0JxXNsKraIEgVFaHLuQ5ZSE1wAeLsEioRFZ5PnAVlTok5hiQwCG1+mAupwr1V5r4CDGNkgkrzEij93Znqi5CB/XafAhduySDWEYaQsl3RFGiB6Tsce4NkgGlbx+WtqatqjM9ZlOAVJ0tWmPeWEvzYX3gYcOY9cuKzsLE1EVK5oagQJ7/4DDlXS67gZTVqI6dlXxwNaIXrJ06j75UZkFhoHbNyK7Zqh2E3usHAlCupDgFhtSAJEmdsxsqJqZSHevmJaHPoC6vm1nvpNdTu7t6R+L4DjAk06t7M+tKuDb+QkQTw00EFTl2XQawjDIHFOyVj6h+frSeY4uC2it1MRVXgIeUIpBLTWcjdxMJArDgpN2/JPlpF8PlzwoPDjl9v0vZ1N2k1apz+ehJyVaZzS3HimUMKIoWUWrusqtDqUTR46308/bUKekghU1QBkbq+PbPXPkNuEog8DAOS5+ABzVEzSWj9GDSf+JVbXbovAcNs+oODFYSjsp8oqCm2gcj06z9BOHJNbjTZ7RDt/oQQWa2ZXEw0ZWY1yYzYGdCYuj5L7AJNwgBlvHRgj3mjnfvtx0YlS/Zcp9dj6wU5nmpiysccdLMYm5UECr3HruHwQ3/P+KPLzcWZ6VOQfdG5xWbVzl0R9fJgEI7DjO0Eu85rQSTuH1lbV45HbmYSzl1OR+2im4g0ZEJpyETdAC26zpnv1tDdt4AptulPNJ1rplMKUY6uFh8PxL5LARDrCMMtLtvJJAYw3qqTlcOCw7JYLUoBwWHZWWvBIYJxz3jeAiZxv7R0AZJ3bIetdT1B7T4voebTPc0VMbe2G08Wur26sII+6JyD5x4JQU6+FkfOp+DA2es4fO4GsvO1qFk5BE3qVEaTupWNn9G1K0AmILT1fQ8YxhhKqfTi9ewBoPQjSiFAxAasOh2AbfGBRr0qMY4wPJ86phLuFmBm7ibo2oSioYAL+uPXgKvpBIMe9VavgctnE5C7fyuyz58Bc2oRVKMWaj7XBxVbWGuELjxMsOxIAYjUtaqMo9Z90CkHz7WwXkoNPMXZy2k4ePYGDvx3HVdSTHIjBqCVn7verJQJwBQzjKnzJyRlPcZJuJ6UxwsAHEoP/joXgA3nAiHWEYa3ps7dAgyTeTwSRdHcuecDYzdXHCN4oBrwaH3v9Fqr55GWmY2ICNe3XWtOEvyy17MVZmRsLnq2dH4bdv5qBt6Ytg3d29TDOAFvhjIFmNLDGp+c1UxCycs8xTu3jcrMJDvi5VhxOghiHWF4Z+rcvRXGGBy2EvCYABB8sZHggycpqoa6f+lgya/MXC20RUUIDXV9gGJueb/d5tkZ5r0OOejd2nldm/+5gkkLDuOzQe3QrY1r2+0yDZjiwbp4PUNJeelKSqlZSX3/ZRkWHVNArCMMbwFm/AaC8c9Qt65rPWkDCw7Lggw9YVLhcprWnCCoH5qKGmHUaC4tl8sgl0kgl7FPqWhdt6upuQiWc1AoXN96MSd849ez62/31YPeeSwHL7Z1DpixvxzA7hNJWP9lL1RmjgtcJL8ADOOBSkWDCqiGaQoYlYn+TZJh/hEF3HGE4YqpQp7/sC0PrzRPhYxPg9yQjmCkoTA/HUV5aZDq0wBZBQQ0my6kKFE028/BGODpOYHBYfPy8qDT6aDT6Y2flolpUxeDhznscAWkfxKzEFNDAbncteIk8xIzYinxSBj1VrtcvPSo4y0Zs0Z96qPVqFpBgcXjnhXEx/saMCZfZNmTQCjTmZCAEC0oUglPU3iOnDEYtCcb16nCrDaN6ZxKU1HK0xOEIOrMDSlmHnDPEYZLzhoKAW0aivLSQXRpCKRp4HTpKMxNAy1KN36XE+cRAHjKIb/pckhk7h967bXz70STao47wWHZ9bZebwJOMYDY38Zrb4vEtKwZeAKMq5IJSDKZFOuPpqFr8yqCNBjYDd3AXwwgnPu+2Qa3zccrjzleNY7G3cR7P+7G8+2jMWaAMH8r9zVg4pKynudA1jmawExnjKf8fwRkAwF+j46MuJSoyupEKdkdnyoh0/e65wjDUX1c3MdA3hUEEO+YL6fU+BwRNUQa07tAM7v5OpNM8LoXg8PqDXrotHrojUDSQafXgXmrKZ3i0uV4vKkwiT2TJ/WcqYWBBLp8PzkieK1NIV5r71iO8/2qE1i2O8542GeHfiHpvgbMRVX2RzzlpwnpKCGEOa76i5dynxCeTriaTvpP2RnqliMMhwC9MBaBBaeFNEcQTU7FvpDWeU0QrVCiCynA7jjHip9Cy3FFxxz/mVYi0//sPD2u5wWgXUOBSmkAXvtVj7R819s3R215ta0Orz/m2FVVnwkbkJyWa7xOZtfKQtJ9DZiEpKzXAfKbkI6W0JAiQrDyZjZ5adyWUM4dRxiO6qOqRVCkLRPXHCfUt2gjhLXw7jmGBYdl18Uf+Tg47K4LBCz0uZh6P1oJnL/p/qH/5dYGvNnBfv5rN7PRb9JGVAoLwoavrC1enQ3gfQ2YC1ey6kil3CV2lhE7S7MKuMIxf4UGuuMIw1FdhszjCLk6XmxTHNLrqRT5TVdAJnNfPaR04cbgsPsIJjzrmbqL2E4evgxsPy+uXubM7+Vfmbss9661X2lDMdhuABRgyc4LmLnmJGKbKfHlW8KNyu5rwLBBS0zSbKBuWGOyWCoj1rrnCMPRZNEX5SLk3ACmVih2PjmkV9WYiso1RHrec1I7i1HJ5Ct3Kjiso6rPXgeY9P6bPsKB2uSRWKSlZbjNy3FjhuOTD5kIzja9891OnEhMxVs9muHVbsL5e98DJu5ydkNOxh934enfhmPsUDl0ZRgCZUS0IwyHWzJmqPPfcATorrk9yKUzZld5DTKlKUCQNxLr98jlJhV/X6ZrmcBXmwnmDBReb2R0CxQWmiOaiG5uj+5dsOyPH23yMd2ybmNWg6nJfDv8cbRpLDzO6H0PGMaN2zYyi8Q6/Ru+Ogw6A8FfIh1hOBs5evE7KLJ3ih5cRxluSR5FWLNxXiuPFeRJ6D53G5KWC3y4gmDhG8IAw7Ssa9Vlpsrup8jaNXHh+A6bAnYcu4bPfjto/H3z1D4IZ5JcgalMAIb1NVGlHkwpmQ1QwRf3H6wPRU6Re44wHPHXcGMTQm7+LJD9rsnU+soIaO2ux1z75Yu163fdStcUuYXA6wsIVg4VBpjMLDUeaOrgAOK6OjNFcvwhVCiluzbh90PYdvQqqlcMxuovSjSkhRRbZgDDOnsxOaczpYaFlEKQp4Sxm0KQlidxyxGGI+Zqs+IRfuUDIbwXTJMWsxghIc79CAsu7C6Ndg0lAAAdVklEQVStMEws88Jsgg3DhQEmSXUdLdt55hLJuIKs/g2x7UvcdrJtWPcxq40q/h2bKfGViAM/K69MAYZ16NKlzHCDlHwBwr0FUKdr7efbQpCs8a4jjMKCfITHDQRH3d97l578qmqTUblWczGYcErLzjDT+/hej63HLA5r32YOCl135dyFeHTuahtsynVOa4qvPv8II4aVyLJOXUzFsG9NW+bXuz+EISK9lJc5wBSz69KNzEheLxlFQVnEIrvmUlN3B+NiuncdYWi1OsjjP0KQznvxIDVVh0Bem1kreCcZg8N2pwhzX4juVkN6zebwx+u8oHr/OXoCPXrZBpsSW/GAvj3wy6yvzdl+WnsKi3aYnKFPHtIBnZu79qBpWWeZBUxxJ69coYE6ae4zlOqfIyBPM59uxc++36/AuZvedYTBJNz6+OkIL3AVn1b40N8K6oawRu8Jz+CCcvImgiEdKKoLF7p7pe4B8zl8148XVO+uPQcwYNAwj+tt0iga/+4t0Z4a8MUms9HY0vE9ECnUHc7tlpR5wFhyfA+l0lqq7L4A/QlAhTmHgnA8We51Rxh5FxejcvZSjwe7uIAk/cOo0nqK18qbsYPghebUGO7Dl+n1Pzh89iwvqN71G7fhzbc/9Lh5LALCzr+PQVMkR2w0Na4u566m49J1tVElRqyDEb8CTDH3LyblPMhTw67fjwZVPXTV+44wspP2oVq6IBU3QRPiprYWwtvOE0QrhGj2PoKO0dSoR+fL9O5SDm/H8oLq/XP5Gowc7R2tic9/XIlNyU2wY5RH1gJGVvklYFjHL6k0Ty85EbhxV6KceNsRRuatS6h1fYTX5mK+IQR5TZcbDb+8kVhw2MY1KFrV8UZpwsv4ZC3BCw8LC0o7/7fF+HRCydnDWS1FOSmQh1S363aX5XtlxGTEBfbCxveAIMFCB/s1+i1gGDsGL9Cvvpgm6eVtRxgZGZmomTQYHNUKn01OKHlIcEG5AfWE+eB2WefKY0DVMCDWO0G5XNZXTMDOTu3qUzxuinDhNH0/cx6+nGYrpS+diflxLkhPgFRRGfIQ+wzq9OxA5DUei5VDgYruObw0V+vXgOn8LR3L85jibUcY6iw1KiV9CLnhpqt5Ieg5DxkOV16PRyKFyTBcFbrxDPNZJj44rKtyXT1nvsYaVqeC4k1OmfoDfpjl2ncYb9CiMOOS0edyUOVoEGM4cuvUuGkrBHdbgIVvALWs4++6arLNc78GTOx0yq6efvS2I4zs7ByEJY1HkNYUactZ4kkg9FwE9JIKMEgijH8bjN/Z36bftCQcudLaeKC6q9KEPd8dB2Tliw8OK6x0x1Q/7SWoGkrRt4XrksZN/Brzfl3skpB59S9IN13hy0KrQxZkK+ANCQ1Do7ePYO5AoIF1DFqX5Zcm8G/AfENfB8Fv3naEkZubi6CkbxCou2yc9CZARJgBwcCRVlgZV3KC0aSmAhwnQYBcYowHI5FIwIN9MjPfkt/shcUQPdq3Mxy5DLDwfQNFBod1t77ifMyxuVxCBdX7wZgJWLzUdXh3Zh7NtmSgPCQBIQgIt+8/qtmw3fj5zep4yDoGregu+TVgOk2nTNl8pbcdYeTnFyA9U2MMDhQYIIFcwoGTSGCgnHHLECTnIJVIMG2H1BjywtcCRBYc9shlgrdEBocVPbtKZVjyDwGLLyqk3mHvjsGa9ZtdV0k4FGZdBa/NM/JbUcX+wSy692z8PDoWAjwpOa3TvwEzjXajHLa0b0DxSXfvnA9cj3AJxfe7TG5bq4aKyeU5bWIqsOkswcguvu3zyuPE6IBDSL2DBr+Hrdv3uOxshVqNkZqwH7q8NCNtYKUG4CS2V2G1OozE7ClvoZOHFx3+DZjptD0F/m4RRTHpOd9OHja4c/cRdHuQGh3r+TKxScuMuXz9kmDRmM/dgKB6+wwYgv0HjrhkS6+Bb2PlbzNQpDbZILEtGdualU4VH3gaX0/92ii89HZSVpY7NQllzvOLfYG7W7d7Nqe3a/NGA1hR7WfQZhKKU0yAN62396wkhTKFyUPa1qVo6KXDvNB62YH/2x0EXzzv/cnjrA07zhPsT4SgepkeGdMnc5V++nE6Phz/PTITmEIlhSykOmQK24M/W3mmzV2Lpxp7f5z9BjCPT6P1DRwuetMRhqsBtnzOnFHEVAMeVvp24hbpmata4lHcFzH9LKZl8TJXn4Cgep98+kWcPmtSknSWVi/7BZNmrsc/G2eC1xVAqqgEeYjtVRjhpPji1wN49qE7x+uYyAi7C4E3XvA+XWFU6Vo1ABsP2MzJwvDlMnjTEYarAbZ8zrYoVUKBR+vduUF01J67YUR2OhmYs49g9suu+9uhy/OIT2DyFedpz/bVWLXtFL77/F3o8zMhCQxHQJh9nZ/RU5diYJc7p95QZgCTnKHLppTaHK3Zm3bwYhkqKIDFg72/VLsabLZFYbYhnRu6nkCuyhL7/G4AJuEWwKT9QsyUWz3WDdeSkl1268zR3ThwLgtDBzyFIo0KnDwYgRH2VfYrP/jCzKTdX3pPZ8ll60wE990Kk5yhi6OU2kSaZx5OBy2UIkDqPUcYAnloJDtwkSC7AHj6Dm4THK4wIoPDiumXI1pVJjBqBcGqYa5fEA+16IxbqaabL2cp+dJJ3MqRoGXL1si7cRKcNAiBFe2vIopqDZemn133kqsyvf38fgTMJkops4WxSUOWSFGoI9joRUcYQhl+SgUkZZK7EtBp3DpgsjhzdqHdckiXlQcMWcReTq4Bw+z5mV2/sxQcrMCVuH+NoQof7DwESf/+aTz4B1WyH8tDHl7zhDpxlwA9A4+7alXAfQcYVYb2V1C8YY8N7y6XQl1AsGoojyD3vZK6zWHm9siDmK9u13u3Mgrtb71GbZCbm+e0mbVq1cDJIyavMK99OAvrfp0IfVEOFJWj7earUKUG9mxZ45WuOzqv2Cv8vgNMcqZuCuXpWHudGb1GipvZxKuOMLwyIn5eSGSDR8AiQDtLDzZ+ALu3rTKSzPrzAMa//xK0OSlQVLHZfd8uhuDQ/p1QKDyPiFCmAaNK17KD3g/2mP/ZXxJcyeAw/xUeNT3UZPXzOe7V7tes2wx6vcFpme3btcaa5SbX2gfP56Dnk62NipiKqo7tB1at+BMPPdjE47a6kr1YVnD/rTAZ+r6U8ivscWnyVgnibnL4sT+P+l6yN/F4NMoLQLXIh2zizpRmy9PduuCP+ab3YE4h8OCjzyMzfrvDMwyjm/rVZPR8vofHHC7TgLmRpetoMFC7Ximm75TgVDJn1G96srHrw6jHnC4vQBAHqipd+zvu/2JP/Dhjsrm8zv0n4sSWHx3KYRjh0DcH44NRnt8sl2nApGTROnqD7oq9kZq1T4IjV0Q7/xc06OVE7nPg6DS2bXL+AqvW4hVEdvnEXEna2bW4uGY4pEGO99ZPPv4YZs3y3DNpmQYM42hyujaBAjbXJxvOcFhxggHGI+UD92dGeU67HDg6/SGAd36GqfHoMNTuULJaFGZexem5T4CTOL7ufCCmAf7dv0EQ11MyrWN6WmYq84C5lqEdyVF8J4hTlkQc+URZUSbMG4PowsVlSEhSO3zlBtm5+alR0UOPD+KaZ5fa0aQryM+3oi/d/ocfaYOCQudxQCeOHYUPRrxpLocZk8U0i8Wt1HSHLQ+Qy3Hj0jFjzE1Xya8Bw4IuJWfoFgJ42RWjip8TQlbVqijtbwz3dw8kfwJM23YdkaXWOOX6tMljMWzIQCuawW9/hJVrNznNt37Fr+jc8VGXI+rXgCnmjipT353w/Es80IIALDAIM56QMFBQSpmkLAUEJzmeX1qrSuBfLrnqQwJ/AkyXJ7sh+bo5ALZdLs+cPgmvDuxj9ezPFesxbETJucZexrfeeAnTv3QdQqTMAyY5TdeZEspcjdjXjfDm5Ka4REDerF1F5tos0Ev1+hNger7QGxfiLzrl3PyfpqJfb+sr4vSMTDR4qCOYy15HSVmrJs4ddx3Dp8wDRpWhvQQKYfGjvTGJCS4rK8nvPDhvt9WfADPwlUE4etx5ROpFv/6A55950mYkn+zxMv45etLpCB/esw5NGjm3Vy77gEnX+lyQIua2xFOM+hNghg8fjp17Djhl2aolc9C1i21A1x9//h3jJn3jNO+EsaPwocWFgT3isg+Y8hXGatzv51uyTz75GGvWb3E66Teu+h0dLYIlFRNfuapCs7bOgzG1a9MCW9ezKI+OU5kHTPkZxnrw72fAfP3VFPy+yK42k7mTOzf+idYt7cfB7PBkH6cmzsz/29ULhxAe5thlT5kHjOV0SUzKfp6CLwkMAnIjJjLcyo3bRZV6Kk8xxpyPIjsmqiQgYkKS5jpAzfauBFzP6Miw9Z5urdzN709bsjmzZ+K7mb84ZdWBnavR9MFGdmm+/XE+Jn7pXOy2cP536NnD8UrkX4BRaSZQSieauUnIphhl+LNWoFJpFlFKSy7yCYmLUYabRyBBpdkISp8pzkMImRitDP/c3QnvaT5/AsyyJQswYcq3Tll29O+NaBht/45HyLZs0Et9MOvbSQ7r8DfArKOUPm/BjSkxkRFWl++JKvUuSvF4CSCwO1oZ0aX4e0KSmmn2fWoBmPXRynAf2ymW9MCfALNt8zqMGD3BKWDOHt2BKKVj36+du/XD8VNnHZZRu2YNnD+xqxwwjAOJKvU1SlHiDYGgT4wywspZb8I19QUQlBhPULokJqqCecVJUKl7g8JkocS0zQiSopURUZ6uFO7m9yfA/HtoL14Z8r5TViWe2Y9qVR2HUftp7kJ84iLGjLNVqsysMKcTk2s3i67t0KXIheTsSlJK0yilJRqVFPVjoiIuW59z1Ew5q8T9EsE3McoI85km4Zq6HgjMvn4IIVRPSJVGtcMy3J30nuTzJ8AkXjiJZ3uXRD+2xzdV/BGEhzsO1JlyMxWNHnncqRDzmymfYuhg+9pS3gKMq/kqZE54pBp85sy1CjRIEmww2BfnKoKC23NEsrzk/IKc/PycRjzTzrudQoLCAi3BwH6mlH6eV5Bjjo3HEUIUitALoDBfpfDU0C+/IM+5gEAIB9ygCVGEXXeUrawpX2bcvIx2jzuPHJ167SQCA5yHZevR9w3s+9uxy9mnn+qMZQtYyFPb5Awwaek3BcUBkEg4jhQY8po2jcpyY8gtprAnuV3kTVCpPwKFOcgkIdgbrYzobJntokrTgKfUKjY4B/RvEBlRAjTT1m4Ppehk0fIxMcoI51KxO9Q3f1phaFEmHmhuNWQ2XNWknHMYpq+YePGytXhnpPkYalNGSEgwkuIOQyq11V721grjjeng0QrjqgGJKs0SSqmF/ynyfUxk+CjLfAlJWR0BYmWFKZVyHevVDPvbmk7zHUBHFv9GCPkzWhkuWOPZVVvFPPcnwFQI5lE1qrlD9jA1/bSkUy7Zl52TiwYPdkBhUZFD2u0blqBta9u6/AcwSZrzFNR8PcxR8mqDqHCm2m9O8Uma/gTUKjY4R0h0A2W4lcbfxWuaQTyhC8yAAbkQHRne2OVI3QECfwIME7pWr9sC+QUFdjkZFhqK5MR/BHH5taEfOtUa+GT0u/hk9Ds2ZfkFYG7coIo8gyabUpiDHUqItGl9ZYjV/WJikmYUBbW66A+RhgfXrEmsLJsuqXIfMlD9mZIVBoZgSXhYaTpBI+chkb8BpknLJ6BKvmGXa1WrVMbFs/sFcXT7rv3o8/Iwh7SO1GT8AjCJydmPUp4/ZMGdwmhleCghRG+11VKpp4HiI4vfNDGRETbG4JRSaaJKk8Ni9ZhBw3HtomuHHRY0Wl4kEgsYL1bt9aJcWVyyCnv1HYBz5+x78K9Zswb27NwqqF16gwGxnZ9Eerr9y01mffnv4QNQKIIElceIfKl0y+q7Y2eY+CTNOwS05NqDkKMxyvDWpTmRqNIsppRanEXIhRgHW60ElYb5I21VXAYFGd4wMtxzTwqCh8dE6G+AGfzW2zhwwPLdV8KwunXqYOtm4VpKX0+bjt//cKxs+cu8n9Gh/WOCR6TMACZRlT2PUr7E0Jtw82KUYUNLcyL+mno3ISi5hiFkV4wy/Al7HEtQZc8F5d8q2ZZx86OVYebvgrnsIaG/Aeaj/43Fhr/smxs3bBiDDWtXCubohbg49OzVzyH9kMGv46MPzXc7LsstO4BJ0hyloC3Nkxt4JzoyYnZpDiRcU8eBwOxTlFK6uGFUhVfscSoxSf02BcwrCgE5Fh0Zbl5xXHLXSwRiAXM/ayuztn88/mv8PM/qrsbMyRbNH8KeLVYSAJdcZnKd/87H26Vr3uxB7NtmrR1d5s8w7LxxUZWdQ0Etzhvk0eja4TaSq4Qko4cFs5iYI9y0Bsqw/9kFTLKmLeWp+cxCQAobKMNszkUuR8xDAn8DzLTv5mDy1B/tcq1d25bYus4+mByxedacBRg7cardxxzH4VrcYSt1/zIPmMuqzKZ6ylnatRpCpPlhNWvWtLr5unmTBmdrNbmWnCOUjIqOCv/eHjdv3LihyNUrspmzjOLnUsI3q6esaL498xALgrL7G2B+W7gcI8fYVw5/PPYxrFvO3DcIT2npGWj4cGfo9Vb3P+YCmMSfSf6LU5kHTPy17FcJ4f8o2Y6R89GR4Taepy+pNNEGShOsAYN+0VERDi2WEpM05yioWf5CKfdaw6gws3xG+LC5T+lvgNmwaQcGDravgNm9a2csX2hfpcUZh/u/+i42b9ttl2T40Ffx1eclm4wyD5jEJM131FoqvyRaGW7tuMqo7pIVSynZa8k1Cr5jw8iKVlJ+y+elb9UIyPfRpbQH3IeCsJz+BphDR46jW0+7x0qj4RczABObNm7ZhZdef89uNmaMxozS/GaFSVSp91KKWAtufBQTGTG9NHcuXtf05w3WUn4CNIiOjHAYhTQhST0agFmHjBDsi1ZGlOiYiR05N+j9DTDxiZfRqoOVzZ+Za/369MD8WfbPI85Yq9Pp0fDhTmDumEondo5hZssRtzWgy/QKw1T5L6o0WZbq+pTiiYZRETYWQolJ2R9Q8DMsGRakDFcoCbGvhwEg/pq6CyEwO7MigKaBMrwCU/l3Y+67lcXfAMNC9tVp1M4ur159uQ9mznBsLemMwWMnTMOsueaduxXp0j9m4ZluJpvCMg2YxCR1fQqY9cDYRA4MC6usDCc2r5KEJDVbKdiKUZzUMZERFZwxWaXSVCwE0i1tbFytSm6hwkkmR4Cxp9rPirnfr5WZM75KymYwGGw99Qr1XmmPnefjEtG2k6UxbgmV5TmmbAMmWd2H8jBLsgjBtWhlhN1wuglJmiWAlTbz+Rg7lwOlmZ2oUl+lFGaLS8Khb3TtCLNFprcBUro8fwMM6z/zYpmaZutc/L23X8eUCZaaTeK437l7Pxw/aWu+3Oyhxvh7h2lIyzZgktRTKGCOY0kI1kUrI+xaICUkqZl715LzB8WumKgIu1J+y2FIVKnXUgqzTT8BvoyOjHBsbCFuDF1SiwWMywLvIoEQXTLWvB49+yAhwcpsydjqYUOHYNT79g/vQrq1bPkqTPj8CxtSdo759/DfCA1lLrcdp/te0p+g0myCRWhx5jGmYVQFu5f4CSpNHCg1S/kJIYuileGDXDE6/lrWBOY5xkxHyOYYZbjZq4yr/J4+90fAvPbGWzh8xFaNf8S772D4OzYaT4JZnJubi/Ydu9gNqTF39kx0irX1qGlZuM8Bc+PGZa86k8jVVzwGwOwRQQLD4CCpxq5LkFxDxXOgCC5mAOEwO5jLdHnlUqAP72KA5FcLxqWHSDPNajiCR8tNwlx9xav2sjo6w9ymTeCobjTR3bpjQlaDvLbddjnrptAV5oPRH2PTZlsPmLVrVv1q7+bf57rJSmO2Zu36TM3LLzArmAVWqo+qD/dD96c6Y1T3CiASx/F1JNpku9t9T9rjLO8d01a+Uw0uL/fucCCoSqPvCYGN9JJS8n5B2nn7ejMCmxpUpUl7TsL9HRHdBVWbD0CYspXRNZA+Lz394IQq91SI4HLACBxUfydTVGs8FpROseUDHZafGufRCtNxOh1nyM+YKFVUMqs86fLSaW7y0U1n5j/teahlLw5eOWC8yMyyXJSiWqMhoLBRGiOUvpaXFueRalLsdPongAGMfwUZl6G4sARtcw4e/XrXNhv7qbvN43sCMGcSUyy1Asw8aRpdw+gcw9FzMcwrLktMnnLaEg4oqjV8DpSzsRSjPAYUpF9Y5gmvOs2gbXke069tm8A9l7enaYNQWXCAhKMNK4ZFdl6yxqHfO0/qdDfvPQEYdxtfns93HIj9xpBm0BVUpgYteH0ReL0W1FAEWXDl/w5+VvEhIS1JSbli98VYnLdGjbr7furWZVGYXDawYlAAgmTSMY8vXn1XXGk56k+ZBYw3ViV7TLvXVipXk1DIRHZGwyYxex47nf4LwJ6xXuK+0cR5CDERjdjzWs8IXsvdvJRTGDDt7HXt9QLtmIJbF34QUcQdJS2zgLmjXPPHwmu2UCj0+SxYr1XiCN8l91a8fT19kXwqBv9Xg975fuHZaw9reZN6YLWqlfYe2rGoRO4motxiwIvI4pS0HDDe4qSflDPrqS5aA6UyAtAR23dz3u52gyffH3vj9HYWrcE0Nyl0lCOjC255dnXtrXaWA8ZbnPSTcna/3PsyBa0LILPLkjWVvN3tyk2emp+fljTEVC5N43j0zU2Ps/KM6u06xZRXDhgx3Cqnxe6Xe12gYKFJSF6XJaudK3qJ5xdRVG3ETNvZJcI5nqPPFt6ME629IL5a4TnKNGAopfLkbIRIDAgBj2BQnUJPiUIqQRD7JNSgAIgCBIGUkkCOIIAHH0gIFwBKAkH5QEogJwRyUCKn4OWEcDJCIQeBnFLIACoFAfOgLQX7TnH7O5UCHAdQCQjhQKkEIKbvAGf8m4DAFAqEEGIcCnLbbMH4m3FDAtDbtj70dtADCmb7w/6B8gB4gBiMfxNiAGW/se8sogLRg0IPYvyvA2D6DqIn7DuFlhJoKeV1BJwWhGophZZQaEG4QhBaSClfxIEr/HbR1mZrli2unp/8X6tcHW92bhJdv/6cLRvW/AIiyweHPIMEubXDkEsI0QqfhibK4KqNXqEA86hxOF9X1B1Zl5mDlHsq3dOASU2lIQYZKuv0usrgSCUJIRUBvgLlSQVKEMGBhPOgEaB8OEDCKBBGYAyJEUKBEAI2ocuTOxw4dfoMzp0/j/j4RJw5+x/i4uJZGBKbotq0boWFf9jGwKSAjgDMwUkuBXIIkA3QbBBOw4GoeVANoVATjmYBXJaB0syWrR79SSaX33rhuef7zpr2P/u+ad3pjBfz3BXAUEq5lCzUNhj0dQmhUQBRArQWBalBCGoAtBqlqAZAuM9QLzKlvCjgzaHDceCgydslc+Eqk8nNoSiYIRn7r9PpUCEiAn/vMxvAepN1BYTgFkBuUYoUApoCEBYcWEUpuSaRSK/UqIBkQghbZX2W7jhgKKWylCx9WwOPdoTQhylIE0IRbemzzGe9La+oTHGA+aWjBIkE9Byl5JSEw6EaFaRHCCFs+3lH0h0FTHK6bjIFhoNtm8pTOQd8wgGiJsBPtSvLrAIPe6vqOw8YguGg5YDx1oCVl+OCA4SoCb1PAcO6Zt6SAe0IpQ9TigcBRANwHhSxfGaUc8A1B1g4s0RC8B8l5JQE9/mWzFF/iw/9hOjrGkCiYKDmQz9AaxKCqpSSagAtP/S7njRllIIUEELZgT+VgqZwIDeMh34JUUlAr1FaRg/9noxm8bUy1esq6+1cK5vORiS8/FrZEy7fmbzOrpUBqgGImhCoCUqulaU8zSBSWbpEh/SqVYmVz+0700rxpd7RM4z45ng3hz3BJSREoadQSDkSZKBQgPIKUAeCS8IHMiElE16aBZeAnICTWQouCYHUJMQ0Ci9vCy6JlIJKOJOAkqNMcGkrwCTMFJdYCCwtBZilBZbsO5NWwiQPoaUFlsQouGQSS8oTkzCzRHAJGIWVtLTgEryOAtpiwSUTWjJhJqi14JKnKCKEFoKgEITLlxDk63laICXIh4Hme0Nw6d3RvzOl/R8AdGoXzom1qQAAAABJRU5ErkJggg=="},62522:function(qt){"use strict";qt.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAUYAAABYCAYAAACJfF6vAAAAAXNSR0IArs4c6QAAIABJREFUeF7sXQe4FcXZfmd2T7n90jtYsFGModkVUGNJ7BVTVIxdI5ii/iYmxkRjEhV7ohF7wQaxBqOIxgqCQSkWUKRIv72csjvzP9/M7p7ZPefce8EGhOOD95wt0+ed9yvzDcO2z7YW2NYCm00LNL19cQ/H4j/nEt+vKK38LhtyVWazKdz/UEHY/1Bdt1V1Wwts1i3QMGviGRLyJgAVVFCb4YiykZNe2KwLvZUWbhswbqUdu61aW1YL1L0z4TrG8Cuz1IyxOytH3njOllWTraO024Bx6+jHbbXYglugcfaEC4TErZEqNAN4q2rUpEO24KptsUXfBoxbbNdtK/jW0AINsyfsC2CGlIgzBgGJaRzi9jKeeo2NuDO7NdRxS6zDNmDcEnttW5k32xYYP3XZFADfA6QFsKWTj+2/e7HCyld+azeU1S8AsDOAjxnEGZWjbn7z26rc+H8u/yWEPMti9kV3HdN7+rdVjs0h323AuDn0wrYybDUtMH7a8lsh5QW6Qqxl8rH9yopVrmHWhLMl8HcAL1UK93i21y0N30ZD/Hj66rJYKjMZAid5+T82+dj+J38bZdlc8twGjJtLT2wrx1bRAmc+tWy8ZLhb4yJWTz6mf69CFSO2WF9av5QxLG1w2CH99rmx9dtogDP/uXygFHIqgCG6zOyhxkzf0x4/ibnfRnk2lzy3WGBsmDXhTSkxFAxSAksB9jFneIFZztMVw25Zt7k08Jcpx7p9d6lAPD5BMHkKY/K33V9e8MSXSe+berf+zYmdEZO3VpZUnf6/5od35tTloyTkO15bz5t8bP89CrV7/bsTvg+B+2yOoWUjJq36pvomms/4aStugxTne6A4td/RfU+4ijHxbZVnc8l3SwbGP0ng0gIN6TDgXhv896Wjbli+uTT0xpZj7ZihR0gmJwPoocmH/E33GQv+sLHpfBvP18+eOBFS3sAYplWOnHTst1GGbyvPs5/5oqvjOGphZmBP3X1sv+MLAuOsCVM4w2sVIyfd9m2V1c93/D+XHQWBS7Kl8e8/cGhPsob/z3+2WGCsnz3hcEg8X7QHpUwxxi6uHDXpzi2tl2tG7z4ky8UcAHG/7BJ4vueM+d/fEupSN2viSwzyIAbMqxw1qSBj2hLqsallPGPqshYGlDCGP959TP9fR9ORn1yUaKy1llQ4bCf2LYnQm1q3/5X3tlhgbPrg4h6ilR0NoBJgO0vIsQB2zBuEUl5WvedN121JHbruoKHXCSlNZ986Bjat+4wPztgS6tEwa8JqSUyXyb9VjbzpvC2hzF9lGcdPXbYSQG8p+ZH3HNf32WjaTbMvPsQFP7xq5I2XfJX5bkvrq2uBLRYYC4on7168JxPsCgkcGdxnEFzKMRWjbnrtq2u2rzeltWOHPCKBU1QuDNNjrOXkzi99Wv/15vrVpV4/awL539mc48qKEZOu/upS3jJSGj91+ceA3D4Vk90f/sGA2mip62dPuF5IPNBp1KT/bhk1+t8r5VYFjH73Ncye8CspEbBECTxVPWpSQV3P5tjla8cOeVMCezNgJUtnd+v2xkeNm2M5i5WpbtaEJgaUMc4urxxx45+2pLJ/FWU9Y+qyxUz5MPY7uFB6DbMn/LNy5CSSdrZ9NtMW2CqBUT52otWwXZ80AMtr9wVVoyZpd4TN/LNu/916iZhFRiMLjP22x8sf/H4zL3Je8RpmT3xfSjlUQl5fPeqmX2xp5f+y5R0/bdkqJnDF3cf1J+NZ6FP3/mWdrHT69xUjb7zoy+az7f2vrwW2SmCsfeOCATxmf0ZOWV7TPV01avNfoSXA144d8iSAY6jcUoq9er6y0Hf9+PpGwVeccv27E2+DkOcD7M2qUTfSlrf/mc/oV6S9Q92KVY1Z9H/8pH55vom170w8llbryj1vJN/BbZ/NtAW2SmBsmD3xH1LKM/02t5j8XvnIm/69mfaBKtYXhwwZYbns94A83Ctn4/L6RJcRc+Zscftl62dPHAUp/8gku/1/DQDGP7XiO5KJI+85tn9B16r6WRNulen0b6r3vyNP97g5j89vs2xrxgw5jjGc0W3G/KMYIL+Jsmx1wNjwzoS9JZNvBGyR4f6qkZNO+yYa88vksWbskPcBDDXSeKrHjPlbjF70y9R9a3p3/NSlxyezpdNvP6l7U6F61c+e+EjVyBvHbWqdT3/mi10t1zlTSowF5E4ASwJYx4A5kvEn7L59HrlzBNviFtNi7bF27ODnJZhPFu5Yt1pMGLJw4dcevHfrA8bZE5+QUvqAslzEsHun706q29SB+E29t3bMkMslwzWUH62KEjisx4z5L37d+cvHYKEbZYlyoMJuqXFjpby8NCvczjEeY04qYYML2+ash+uyOMAtBlYGLsshEQNYDC6LcUtWA7Ic4EwIxjizOJjkAsxidJGJCsncwVLCBhhnknFIFWiBQzAOFuiDAbrHyKddswPJpNADlUkwSbsyBJikLWt0X0gmXMaRhbBWMmmtEKBnJHkjuABzIaUEE6SpqBdSNoOLLIfMgCHrZuM1YI4DLh3Eso4U1hqb7nGRzXJHCJltTJSiEYl0Fk5jFp+iBWdDMIaCW+bOfnpl/zuP6rOsUL81vTtxqCvkiVWjJl25Kf3q7cMm9yde7H0GLHGZnHjvMQOe2ZQ8Nrd31o4dulJC9vbLxYAVYHig+8vz/+/rLOtWBYzyldOTDWXVtBE/Ro3GGT+hYuQNpLPb7D9LDt6hqlyUUrTmnTjDn7q9PP/6YoWWr8BGBVhtLUqTtSXlJYmycgi7Ck4sASa7u+lYGWDFmO30hcNLYKE7wBOMsTgYejLJ4hDclpIiRYsqSG4ziVJIZlFUGElgxRnBkCLeGp0UYOuP1MidGzxaujGvqVdzjxf5bqCftyKY+UTTMB7JS89/1pezKO/Q+8wvT2TI0yoU3DMKHVSU6iUlY3AkAS1nrWDCYWA1krEWMAWiDgTWSMgUlzIlpFwvuJuyZXwFIFKIpzOOK1en+x1xmpVe+4ps/M+MkuSGJnRCC4YXB9lo/585bfmVUsqrAKxnDA8I4AMmmC0hhzOGEwB00esH9Zz8e1m834RbjmBkhNxiP6vHDrmCAaZaYi1n1v7dXp738ddZqa0KGGvfmrAdt/CZbjBWXzlyRRfGHt88N8MT9wFY7Us7VKRSg7O9GlsqYGdLIXgP1121I+OpXnDRHdyuZpbsxJjVSQpWCclKmJQ9pFBglpRSJomAqWmv0MDXwtDcMJAp+BGFq2KQYsJQ9Huh3/41Dzl1HxSARq93FHCZMFbovWLXjCnhI6AHZBpqc5/QbR/sdENFytce7Ppp5upEeekSRurhP+Lb/ug3Y2jpNxKly94hMktAm5IMKTCWAU9+zJCth4y3CCHXcJlOwyIWm21yXb4STDaCZ1rSPLH2Bvu2C/YQ//7znuL6Fd0WoIVdpTKXJz42P15hV10Mhis1c1f1md0Fy8b9fPG+q+OVxNSBRhc8ZsHiApylwUorIRprIMuTiv8z4cKVaV0hYUGIVkiXQ4hmSLcesu/2EIsBpDdApnpDDv8CEoMhscBodl0mfwR8KZ0gzZF1Ywf/SoKRzSDOwY/rNuP9uUYXfy1ftypglO9eWtUgUrXekrmyetSkvl9FqylxE4ivWwfLcsFdC6LbWjUog832xOLqllaXV9t2SUZaXTi3ezAZJ5GzJ3N5FzDeFRI9mc07A6ySwA2CE0urUF5FUiQhpS0J49RQ9yjYV1GB/4U08hFws6p1troPRLIcidUfdbxcHqAGOA6pYqZIiQyYbAVjDYDbCMbXCVc0AW7dYj4ocV/ZFUeu4X1I90gagvoRLf+87uQNl7/tSrdFZLJpIeBK+geImJWQkkHINIRwmCsAkYgxtyVLugomShgTMt0kZQLSlRAiDVkhITYkId1WyGoBIco1aKYciIGdIeesgmzsBbluIeSJj+s58k0ZTTreuG0/uVUBI1W1ftYE2mM8jCRAy2Kjyobd+O6mNNZvfwv+i8HlXbK1sifSvNrm8c7cinWyLd6VMbu7xa1qzqxO4LyLBOvCGKohUQnBysBo7Y0OB4PB+ZjnPRPmOLq0Siw1eifKrfw6mbxHsxdTxM3VPPe+yZY01zF5nS61foamIf2NDpIoI/OoapBZsbL65TPYROid/HLk6rOxvDZXyxxiFqqr10u6zY26FypYobbVdfV5ajgvP21SmTbvtD9Klr0HKxUOuZjPbr20aLiwMP+lnggUr6Fcw6QszUtxZ8mlmBffW1eDMTky/Urr8al76rq4XzRKiRop3TrhoEYKd42Q7jrhOGuyWacWqUxNS1OmkWWd1kw6kxbSW/yTQCKblK02kwkJ0ZxlMiGYcAUTMgaZtJtcR0JUuhCuC+E4EM0JuCs6w1UAOQgSV+XkmU2Zk9/kO1sdMDbOnnCClOwByeRKKXF39ahJ10YbVOno0n0rG+viXUsEujPBezLGegsXfTh4HyZZDylkD0antUlUMrBySXrLnOwUiKlqSHrj0pdkc0o5z4ziI1wIMQpN9RBihpV6vknGm4hRNAugTOkE1axStooc8nldHczuQmKsLm8Ah+qL94JWOOZLoAaaUTVDeftlNhE+QCC/jB6squS9awFa5Z4JkMtEMm8FYVRnszlVmbz6UTtoSVbZYAKVQyQ7PwFdB7NP9QoVXAuht7d6+Te9l0nFp1rRu57pviPc8i4o+Wx2MBT9quaqXAB28/oqVy4Fxt7w0gpg0gl7+aqsGZ4qGY9/lVDsWV1osi/tkX0Luzrz0N39Akm0YKCz0APPQEpxwVhKSlnPGKsTUtRIR9RIIdesRo+113e6uef2rR988qMVv56damiuyWRaW9GUTrkMrisgkjakEGUiVmFlU2sbnLIyOCGAfBxkSAsj+TeJeB3Ma6sDxkL1llMGHipS1rGMyb6Q6A3BukOgE5R+jmkLnz+PNvsuM2tYiMN0sOc3y8c2k/q0KZZvXBndss5o3XEUkkvnwG74OsKEtl2e9+L74v7yCWji1Xk9/oOWB3F0y30dGgkEwv8uOQ5TSnVMkCGZ2eLCxiszNnMaIOUGIeU615Fr4IgFaz9fMzXT4NZx28rYaSuTSDRkurXAmROHO5w051sAc9zqgdF9aKffs1b+a9J3RyHFJx8B2QgTigAvFVkymEqUaxVK1385yLRAS0eIhrYCe/YTM02TpAQkMELeTHDPk30NohGQqUh5FJnymZXHMXxx3rc2q+YxlvsgiUi5i+UR1ClCBAtaS6IEt+CKF1ZehfI18CJEJs2yRtQVfhbm2hgdNAER9wh5MfsSpSHjpWjdaS+wdAtKF7+dI+9RYlxkrQus/GZbRHDQJ9rm+Izaghp4Nf5ZejreSB4GlykbjPpcWvcz7JhZGGh9cgO+sE7mxqrrsDA+PHj/qOZ7cWTLg6GeUTRD4LP1S9b9JF3XsiZt8VSpY7c2JxozdiMyS5fCGT0T7ubOGrdqYEw/OmC3WGNinnClct+Jgk1uAhSnCG2Sh0KT9Ute+6bza7e4aoR4ui0PGUMLRQhoDEjx5LyNrU8gxptIv7GJtFsp/4G2EjbvheRn7+VcSc2F0v8uyqqR2mE4eUKh5KM3wFPk7/31VCSaarFcNvAemJM8EKutvqiUdTiq6T7wwu6YRVtwXmJv3F15OVK8DF3dL3DN+h/n1Yu63kk7Tyx/f8WfrCRrjgurWTK7pU42prEOmcGD4JiGyw531zf44FYNjM7kHU9mGf6oJN9eY7T4SuygnX32Za7GhUZ7VEHvqxA9lhcARjsd6LOOfKJg6AWV+42hIywg4gfF7cDMIEW+0h+a7eB9z12LgEGR0RFisKbay9N1hfSSAV0LJ+abdvKXq+KNp97xgDpfS9WeiBvpUJ/+muYnkxrr9SCY9CH2JrUeN795cu3XOmh/iJIKJJbMhVW3us1nzaIEY2MTMFTXMLy05I+x3JXAf9Nf3DyJQOmnTcU5vWKMv5fLjsOUygsRlyncsvqIXN2M14SUi5fPXXluvJQ1Omm3IcOtxngy0WyvrEv3BTLYzHWNWzUwtt65ww/jLn9QEDCaKBiwEV1909Jn8KO8GRoeqznbrX6wLXTK3StkVzRFvVw6+fBTeK5EmYtZp0JMJ1zW8DQKrwy5t3NukhD+hhPaz+IHL9ItEF1L/PIWneO0QYU2uXhGg8A6X2BUBj0YEn/1GxE4D4msyhwkhVYle3qA0Dv+4qDsTLRhxtXpcRI5zYKYsGMODbNvc22Q7bUzrOZa8Ib1hlwabqFC7VK4x8Iek+EeD/VSpA/yx3d0/CkzDQG9t6rnl8m7YtiZaqweuLf6Uvyg8T7skpkXeC+YI4tJ+fnn81b83OWsgUlrQ0yI2qxrN6WbmlpTnZAefifoCJICy/03SAvbyGqrBUbyPUxt6D8+LmJ3amAsNk2LgYffatH32gLAQgAZGi5eosWms5mnDzXR8hXLn7zSPF922sCilD2FaG9RGMkfJpX9wfrtDayaC1m3RN23xlwDlHSFXP8R5Nt/Arjt7XjRrDywDkdTi2KMlQAffhHQZWeIF84DpAO+ywmQiQrPckxT2N/5VoCf1X8KufQlr55ha63GM822Wbch4PtcCvHGNZDrFxVHcMq1/wHgIy4E3CzEa78Daj/xDMvR/or2abElAUBJN10WNw1k/LCaxSCxEE60u7y0IaIXXZK83il2v1Ce7aUV6XAhVi6dv/pKxniNbcu1krs16Ra7wSpraUqvRurxx+FcRdrIzfSzVQLjF8/0LpULM/0qZfx7JeXJmzVe+G4o+X57bfdNeJDkGsznN20xCZ+NRlmFv6eOtgSHffWizLNt2DbSregH65C/ALESiDf/AvH5zHzGyyy1DdkHTJNr5IRDT0Sk3W+H3Qq+y5GQzevh3rs/2K7HwDpIez+JFy6E/PRfHt8mNkZfuQJKxcyyzWFcDpVGgg0aB2vMH3VaC5+EePkXsE57A6wy2BbbZreIT56DeOF8nZ/6FBjK8QpYp/8HLF6uvI3dx44BBM1F3WdR4ZvtdgKsg3V8Y+fRo4F1tJ2DGJX/fI6r+e/7eftSR2jZES6scc+BdR8M8fnrcKf9UJW3raU1l4MpqvsuWDSQuUd8zZEYxnuz4Uy5xmSLhcZVWxDsv5v/np9DWPKSQqxa/uHqaxnnG6SUqzmz1ieYqM3EE42OW9f64C3IbgPGb3BV+OLvKE0vLqt0m53ybj26HF7WKXGzIB//Dn/aY4TRhIo8b8UB2rJMcQzShlNvshP40B+CJavgzv0H0LwmkmAhRuc9YieA8t5qosMmj9sqsEQ5ECsFq9oOfMRZGmhWzgGaVwP0fKwcLFain7dLIT5+FuKNP3lMqwAL8EY+6z4U9slTlbjs/udPkB9OhfWj6WAl2u1DNq7SaRA75RYYidWKqVqQGz6B+9gP9G+FWTofk1cRteSH3gq+sz7fy33tj5CpGlU3PvgUINkJ4oOHgHSt1o1W7wA2+ESwRKVidO67t0O8c6PO23TXNFtTuOD7/Rp8+E91Hm/8GfLd2zSr9T4KchTZlWC7nwbrIL0t17n/IMiaxV7ZuUeFiwwiagdKhPpaJe5lIBzYp78K1nVniMX/gvvPM2kLe2EQz0s60jcl3WDtcwmQqoNMNwKpWv03XQ+01kDWL1eLInNaIZ1WQDiA6xi6QlKH5FQfG8n/iigsik0qBibE6s8/WnujZfO1rovVUsq1Nhc1djbe4LgNLdsNQGZzNsBsVYyRxOc1s5Bsaiov4yzbqUvP6sPKqkomuT4wBh6x5rocFbLDQyb8pM8Pciu0b7jweaOaaDQhTnocvO9IiA+fhvPCxZ4uDUD1AMTO1MfPZB86CnLVewGoqGAwBZTnvkKe9d0H9okPKZFZkmjmZIBsi/7nZsG676Ymslj9AeTaBWBOC2SmFcg0AdlGyEwKsuYTyDV01Ehupc/l6Rl8mAV73D/BegyBbK2Dc/d+sI67D7z3cD3xnbQCAaqnEt/pn3TAynuoeso18+E8eoTB5nLtFtL22iWwTnkesnk1xMuXQ9Z+ohYT6+C/gg08FHBaIeY/Cla9Hfh2YyEzjRCLnoCYdw/QsAygxUehdAH6511jJZ1hETjFyyBXzIb4/FXwXY/yyu2V381CiixYWXewLgP14vLpTA0+6z+EePcOSGJqGuVDIE8AZB9xK1i/vVR5Vds4aUgnpVgzXWexUsjapZBLXoTMpnR/ZBohs9Q3zQqAZZ23xT+AzVw+Kt8uuyB22nRISnvtIr0gJjuBlXWB3LAEYtFUWPv+XAGiyjvTAmQaIFMaRClPd/Ydqj455pj/zWSNftNG4c+fEwFLVg72YclJCrl2xeK1t0DytczCSjCsdaS7oYzH62W8saXvjUizbaJ0sZXlq70uT4S1ZgCSLXVl5Yg51V26Vx9eVpW8MQDG3Lje9IwLEUR/BBFK0mTlcdhH3wk+YB/F3sS7d4OVdVK6OVT0gjX0FK2PW/8J7ZEGEhUaTKaekQcmoYLacbBEJ0iaWG5Ki4WK7nCgtDPi57wDWDbcWXdCLHgCiJcCsSRYvBIgYGhaBbn8zQLOf0YuUsA64ApYo87VmNO4GuK/98PaXx9a6L76B4gPHlQTk0RPWAnIT54D67ITrCNuV6DhPD0ekkT56I6fvJkmgdJuQOt6NaH5/leC9dhdM8QuO4OVds4VjAw0NZ9Ctm7Q4LvybYi3/wzJSDTNbW1U4rHPIGlFIda472UqTfHW9bAO+A34sNM73P/is9fgPDEOMPz/Qi+rRXAK+Hb7dTjN6IPurL/BfY0izhmBQCJmJdZ7BGKnPglZsxTZe8eqvuc7HAL7uLvUGHMeP1UvTKQ+GHsVeN8Reux9+gpYCY29LhAeMLZb0I2nk3lJMinWLl+y/jYKSk9nF4HJNSIrakqteJ1b1tjctxLp/1nGKB8bPBCuHAQpi8aPa7eTog/45jO1rBuj1XVBLlmZjGOJtBt3Um4ZHGdEMmH9lHbG+5+8Po9cMBlgVKj10yjozWAnED/jZQVQSnSNWGwL1pNAzVvh5cq5cB4bFwBjSOw0zSjVA2Af9hc1AVi8RInRsElUToDFEjnQI0bnZgE3o1lMthViyb/hvnylLpsPHqbMQNvKuuyK2OkvBEYN2VqD7B3DwYefDZaogniboqE5YBX9YJ/5uqqW89y5kKvngX/nNCXquXNuU2JbSBzxK+Qp9iSBunpAX6DwhtYxD4JvN0axaLF0plI38O+OV/VQrE1kYe14OFj3QSAdo/PcOQCPhZSFwRY7SlYIFYZRZa1CM3LwwaeCb7e/Bm0Sa0lHyWkxs8Gq+oFV9dELQs2nqlxixbtwFePXuswQ41UXBPiw8WBdd1GirFJfWDEwuwSs1x5gSTIm6Y9ib9TGavGkfPW0cF67HuLtSYEDkKnH87+zHQ5C7IR7FMATawSxQiphSTXEp6/CeeInavFDNoXY+JfAuuwAZ/rlcOdOzhmolH7T15WEtQPqqsf88vWI+Xp5s28LmhKlrFu3vOH5eNKqY3G7JlZi11rxWGOs1G7hiVjGSjBhKck+7Nmw0XgQfYGpEBkL2GkffqmwZF+LKK222z465M9w5cVqj7HpEqbcIjyBxHfV8xCo0IAwLZ0+EwjSMxuFGBhZn10JmRWQGQGRykJkSM/yDXy4hfhPZ6pJIVtrwUq7gFX2gkw1wJ17H9Bap9lOayPsH9wAVlIF57Ub4M6ZrEUwEktVDNZ2PiVdYA0frydGlpgjibQEABQrinR8HmWykmBq4nMNnrEyuO/cCqSKn8Kq2p/biJ3zpmKxxApJj5W9bQ8l9lm7/wjW3hfCfeV3kGs/QOzsWWoyOdN/AT5gP7AdD4Xzr4shl7wQ7LQMgYmBKvaJT4GVddWTlvJ4+FDYR98Lvv1BEIunQ3zwAFDWA/b3rldA4D5/gWLJfNg54AP2V7pS59lzizNs4cA66DrwPqNUu0rhQrxzG8RHTytWb+09AeKDRz0Rlqk2tPf7Jaz9LlEDNHPLd4GWdZ6xyke2In2j+s3XK2rDGuszArEfPQEWU0Fu1Mf98F9wpp2r+4PAkwA5VqbGi0xt0NHjinz4bkcjdvStECvmwvn3FWCl3cAHHwtryLFwFz4N8eGziB11qxKjlZhN8X/XLAQavoBM1UEseRli0TPhyCTtjbUvcV86AulaB3aJDavMhl1qgyUssBhX/2B5BjvfDchD17Z8gUO+JV5TBTu2qAdyOEKBh++AvXBi3e17VGRY9iIwdgwDSE9Cr3wEiSeYFHd0n7mwYKT1rwcYH9h1nJT8YSMoV0GfsHC7FytKIe4U2UDviSAaGAVEVkJkXIi0A2Q1MJq6k0JOLB0dA4XSCd4lJiZcMDcDa9+JsMdeDtm4Bumbh+UsiVIgfv5b4J0GwPnPJDiveae8+vvvPKZVzFxEYiMxFPvAn2uWSOxDKdU99kkskUDTyWgdFgR4lx1VEdN3HQK5blFBCddnDFR+a+S5kM3rEDvmFpVG5ubdwfvvA/u4fyiwdT98Fu7L/4f4+f9VE9B58TLw7Q4E3/lwBfDOi5dCLHzUK1euxXILn0Rs/Fs5dtZSg+zfvwP76HvAdzhYMyLSmxK7SlJgcAoBS0HYaZktA7MTEB8RMBJjzG1xC/WrcBA75gHwHccG3ZN94VeQn0xH7IdTFaMia7vzxGkQa96nOOCwD7wc1t4XqD5M37wH0Oody+I78kf87fP0cb5es6IX4uOfA6vonjesss9eCnfu/XpBUM+TTloTJ27nC1YaDHSfxw67GrJuBdyPXlDMnPUdAWvHMXDnPgCxej5iR1wHsfQNuHMfBMq6qrbjuxwG3nMwnNdvgfPqtR4wdnzaB0+amxk6YIqRjkRrTVYBokX/SmzwhAUe46qeKq57QF4L2vQjiuNCMyJsc881NgVrZ2hdgL83zWbHA6xroflNIr4Q7gk9Zy56O3pfFW3D2xdV2sK2K/e+obbhrUs6WXGMEILIOErHAAAgAElEQVQNqBx1w10dBQzzOfnQoGkyI8Pn5vpwvykJtvdOIJ5JFTSOVisFjKkcMLaXxJe/T8Cko+4TxtnDfozYkddDppuRuW0fSIv0g+VAohLxo28G6zwAYvm7EJ+/qXVp8XKIms/hzrymbT0j8cLv/hix718H6WaQuedoyJYNSomvxGYCRkFHfngiavchSJw9XQPj5CMhV7Ud41NLt5rxxM94GtLJIPvYaYidcDdYvBRi1ftwnrkQrKInYqdM8RjjZRDzH4F99GTwgQcpcMw8cITyGwxEt0gDWwf+BqzrrkqsJQNP5o6hiNH7Ox4Cd+49cF75NVjlAMTPelOD8x17KAOCfdhNsIacAPHhM8g+d64WcYM5Y0weSQB/IVjvYbB2OlTlnn1mAsSCJ2GNOg/2mMu16JhqQPaJ8RCfv4HYIX+ANepM1YbpG4dqXa5qD49ntDVIfANQsjPi46eBd90RYsV/wXsP1Zb9T9+AtcO+yviSuf8UiOUUsFYdzKD/UsT0eDGNk1SMnA8+RvUBklVg8QogSeqUcjjvPUxCP+wxl8KZfQ/ceY9p4F/2NuzRl8P6zgnITr8S7ux/dNAi/uVng3AkUrUOrFILdmkMPGnBImCMW+A2qRMIGDsC0JsOHHXTObKk4Sz+yYCxST1e/uDSgsDYOHviLULKC82bDJhROWrSQZvSRPKBXQ6Dw6YJgUTeqlogQf+ZYnmZ99v8TqsvRdPMEjBqUZoYY6H0o8wv90yuI/LZYW4zYTRNThNw2KlK56P+VfcHq+6riTuJyaQLa2cciGWzkL77CCXqFdt0Rm1kDToa8RPuUCKi+8E0rTMk0VfpHMuV0UWJcMpFpwQsUaqB8f4TFBDnPiHhRF32daykx0uc85LKI33zSFijLwPvNRSZR05F4uyZYCWVQTKZB4+F/GK2Knfs2Mlw339YibrayTxaaa0/IVUQ2+4AxE56BLK1HpnbCRj/AT7we5Ak7jev1+JmdX8tCtct021JTChRAZes/c94wFhk4JCVn5X2QuICHZIzO+0CBagkVtt7XajAUTZ+gezTF0N89h/YR/wF9vAfK/AiYITTkktZScse8EaiuvnAycp7In7a4+DdBkLWLkfm4TOQuOAllUbmiYtgDT0G1i4HQbbUIn3PCZBfzM9593AGnsgBY0hOKusK3mUn5c4k0y1K9UBSAS2MSncqXMQOvRr23ucg+8pfwUo7wd7zTGSmTYC16+Gwdj0Umacugjv/iSKRIwsqsUKt2pakVGh+CUcgVedqxkjidIkHjDELzGOMxXCxmERXDEuimKAKzlm2cRZ/MvURO8WrCHVmA4USlJAlYJjEXPmX7jMXri40fJhii9xaAYo9aH6krK18vroru+qqDii+8pN279v1IubImzuiNivo8UpJRtlzm3KsjreXY4wColUDY9SFOn+y5gNEGDz8X4WQTReS7/p9JE65O3iNDAbMd3amePHL5yg9I4m/1sAD1XNi+Xtw3rxNsUrli9ZSqwHAlF9yKQbfeL+9YB90GcgVhXXdAcyy4Mx9HLJ+mU4r06z0m7HRExUIuO89BueNWyDrV+jJrvwNCwCW0Y0K3PuM0MYh8pGzbCXeypoliP/4SfBee0B89qpya3HnP6aNEF0GQjathnSaQ04nofbWMrtus377IDZuigLCzK0EjHeB73QoxLK34C6aBlbSBfYBv1LGF2fG75Uu1tr9VPA+w+Au+iecZ84L+eapRI3thWoZq+yLxLlvaWB86ly4BNhUAgLmIScp0VoxbikQG/corJ0OVm2Yvml3lZ+pw1KqIaVCNJmpNsCwXsOQOPUesMqeCujTdx2tdrskJ+q8Mw+fBffzt5G8aAZYeTcNjg+cAbGEDFgcFLmdE40INq7nwIrv9n3Ej7lZq06U6oDGOY1t7RLkLn9P6Y7t4eOQefYyWP33hLX7sUg/MA72AZfAGjASaWKp5IIUDK6oySTXL21PPH+QROdMGM6IC6TqXc0YCRiTNniSxGjNGEFHqpljMIquHWZD5qDV/aPdStkvNzwcmwUmf+JKcWfPLgvnsMfhytGj7XprQ//qlz8g61rRD2ucM+E44eIeOgNcG6XYUgb5Ghjuqhw56Y22Xm7vnnvPznfCwVlqS6y5KBWw7oUw0A/p5CtUI3UPdY25eitgJJc6ATframDMeCdJRhi5and1zQSIIp0dvBs5vCkoF9Mg1XMI0LIesrUB9l5nIbbv2Sr97L9+j+ysycp1Bs0bEDvkN4gdcJG65372JpxX/gJ36dtaFCbLYRBsthDhot0lxD457GE/RPwHeveI8/5UOHMeUVZQsorb+5yjxTgp4cx/VgMiufvEyuG88w+4S8idxq+AHz3Hm5jCQfz4v4F16g/33fthj/kleOf+yL78JwUa8cOv0oD79l1w/vNnZfW2Rp4Fe8xlkKveR2bKOL0FzmyfCA4r6bHfnoj/8CllrU3fMhixo++EtfNhcN+7D9kXL1dW4sS570BmWpB9bgJYshL23heDVfeDu3Aask+fF1Y7KCdrhY66X0lHWdEfifP0MM48+VOIj2m3Dj3iwP7BLeB9hmuDFG1R7KH9QGXTeqRu2UNbtf0Atyq8qpd+kI/eTxXb+1y9UMUSui73joNY+jZ47+8g+bOXVXbpyePgfvIy+Pb7ITH+UTA7rnSp2eeuRvY/f8uJ0iRSGztz/Ca0Bh4CRscjrPwv4if/A7xzP2Rn3gixar7yOLCGjYM95Eikp5yL2P4XgvcegtTNByB+8p3gPXZF6u+HQ6x8L5h50V0weSzNuJD/rIdaoWgo+pruZgaXGGODgE1MUTFGW4vSpGMkw4vaiu4fuFbA2u/TGdN7wpzDxrz3iZUqji7A/fysj0//Mnuxg+Eq5/2iDNmGDBtx51d2Jq2krXlryl8RjhyV7+cQgVUTGf1o0d4Yz9vLHwHZoGECxkjiNAGjA6QzoUVSRxQxNMn6FI0gzmA09mJQypBsEyGhweomgNIuiB/1V9hDj1RMIjP9j0qsip94q9qJ0HrtborRWbsdgfhRfwKr0lvgRN0KiKWzkH3tZsg1C4MA3N44038qeiNJohkBrEWGFy/Qge+a47nlKCfibAoyTY7dzcqxWzuC0/e00kHRJCkgSOvqxkpQ8qt5ynKenf5HWMNOVuIhiWlUvviJf4M96Ailn8s89CPIbDOs7fZD7NCrVFu7i19B5vGf0GF6hm+e15IGQPIdRiN+ysMK+NI3D0HsyNtg7XI43PfuR/ZflyoxOnHeO5DZFoiPXoQ15JigO5y5DyA7/Vdg3m4OXRfj+AhvceGdBiJxzqsaGJ8gYHzeD+etfDVjB+efZOrMfRDZ5y4J3Jo0kCr1sbJeB2OZRNjD/ojYfufoR9JNECs+gFyzCJJYe2ln2KN+qO5lX/orBInOrQ2wdjsUsf1+Grh0Zd9+COkpF4KXeuqWaLxK10H8Rw/CHnwEUveeivhxN4BX9oQz7ymIlfPgLnoB9sjTwAeMgjN3CuJHXwekm9B67RAkfz4LvKoXWm/YE3LDZ4EVMjqcQ9ZJv74eMQlNR/90yGKRpbz+VTpGAkYlSlvgSQMYycikHCh8v82INUcNdgMFQ9gQsckYZaWvnOM95tQdwC5YV9DaHEGdoj/b0Xp1NJniz7XevdMOiayc5Qp0UZn5QTr9KClm/UNHcuYmUl5gAq+hAv9h3/1HWfgIFCPAqBo6V8agHP71cFSynAnbfC8qeUSov5oEe56O2H7nKh0PsYv0Uz+H885kWLsdhuQZjypdUMs1g8G67QS56gOgvCeSP31KDVy1Y6XuC7TesJdiACFA9McCsZqBo/VuidYGSNoO5oGe2u2gdqF4/oEkT5COjqzWtnYLYdKBILHY1/3lKYf0BXvoMUiMu0ul1fLXkUj+5EHwnrsh+/odyDz3f0p8jR9yBZz50xTzSZz9HJzXb1NuKLF9ztELwtQL4c5/MvChCw00+pGoQOLM6WCdt1dVFcvegVizSIE3+Q6SzyUZqqzvjPO2txEI/UHrGxtWI/3YjyHXfeT5J1KCBYYyjyFxyiPg2+mzT2T9SmSe/xXkZ68q/RwZf2KjL/UAima6C3fFbLiz71QGGO1W5qVN45ZEaXKKpbHgT9ZkJ5T87FWgtBqp+36ExFHXgnffqc2J4342G86cx5E4/jrd55O+pxzplfHFrIb/3XGUCG71+y7SUy5A/Khr1KJFxh3JY8i+eA3cRc+p7ZKJs/6pnpOuA+fNu5B98x+KyZJhT0kk/sfre/UnSjSKld58zhw7/nej7ASM6UapdYtKlPZ1jCROkyit9alF9YzGfAt8iw0cDaauAZqWjVomxZ7s3E8/+bLI9bUDIxXQuX1H8iF6gjxBQt64QekLLQkGapkoEXonPLOVhEMOvWR8oX8kSqfDBDgiUbfbfnkrqxeJL9pwNMFLLvgXWFlnOB88B9Z1R/BOfZCZfg3E8jkouejfevfFuiXg3QciM/MWiDUfIXnyrQqAMtP/BPez1yE+fyeY5OGy5n5R2rH9zgNL0j5pMq5UALQThYwvcdobnQTI2Vs5EpO/nPZvdBZNR2rySdq/0fuE6kcjULhInvcvWNuNgvv5u2i9ZYya+Fb/YZBNG+DMI7CzdNrxUmVp5VU9VWqpxy6E1W+4EtPJpUc7ufvCldHUUiDxw4dg7UqGlkY1YWlrmwIv2srmLwwBpyWLU1w7S7uO3iMsXDhv3AbnndsVTciBmEpF/Zc49m8hlhnUuXGNcnshVqe2zSlLvrc9UKE0bRZIAyIDd8V7cOdP1fVQHg++OJ1rQWvH0aqdnQ+no+SC6eCd+mtH73gy5Mfov+F+9Bpabz0C9t5nQCz7L8SqBVpCiOsAEXkfK4bSKxaq3VNKd632p3O0/HkkxLpPtIph6NGIfe9y8OreSsep+j1RCrFyPlIPnQGxfknIt7TYwO/I/MifEzo18zrFJ0g1SdjEFAkck1bIXYcCJwWxNc2zfkIFi+KCeTN8jzZDAfKH9gWfPtLupO7AA98IMFI5sjdvfxOAnwUBPyMNaVazrXLnkZxIWymrNLnrBMBIq+TXUc3IEKKgCANGqd7m1X2R/NFdSg/XesuhyrhQdqk+CCnz4l8R/94vlOWz5c97IXHsn2EP+h5Ewxq0Xr+vUsq397H6D0fJRS+qx8joQqxDMUjSlZHxJdUImW5Q+6RlayMSx/wR9q4Hwf3kdbT+jazeOd+/PIpCi/n2+8EefjLcj2fCeW8KEifehtieWiQs9hH1q9Dy51F6H7Cn38ub5T4zJ3eFk25HbOQpSE25UDGf5Kn/AO+1a3tVz92ntr1xL22sCoy5xuiQLuLH/x32d46HWL1IuUbZI37UQReRXDbpx86ES47RKlQj7RPXfoehcajiOHr0R9FK2tViwR52EpKn3KwSa73xEIiWWu1mk01BrP7QA3CPkZKlPmYwX1+soeBrvQajdOJrehFReuKEyq/56sGKxpZe8h+wCu2qR+MoNXmcWoSTZzzkAWUD0lMugrPgaWXo+SY+tLakm0SOLXqMkZy7lbuOdxQ6laXQnI6SU7/MhXBCJcXY3dZFn+poIV/B5+tAjILFkn/vXSpSiXdcIYeoBwosTb6Pc4frFVm61Pj0GCMpf2UrsQsyAhRgLcbxoL7A5OupcirksPycC1yWn6L/LlmDS3/xhlrds7MeRfqRs1UorbLfLVKTsvX2YxA/+mpYfYYi+940pKddirLLZumdMPNfQCsNau98rvyjMnWFrZ6DUfpLvR0v9fBFELWfKdZAaShXHfJzI3ZF3xNlsHY6UCnr3c/nomXSgYox6pS0+5H5Ca4Qg1LRc7jaoZI4+Vbw/t/V7h4UtcXbbkgiqVy3BOl/XQuxZkFuEVLJ5tLWUWw8h1zyv+09FPEDL0DqYTJQ0WTlsLbfG9aAEWDlxB7bXAIhm2uQfeV6r4za4T8YV1638e33QfywK5C69xQV4Yj3GwVr6NHgXQbobZvEeok9q10oxIJt75/e1kdMtvX2AzWLVZsHSJQ29ZjeOPaNMV4ZVPbky7rXaUiedKOSCJqu3A2yaa0qIvO2uAftTu+ppjbkW6/tyOUoccx1iB9wLrJznoCz6EUkx92m+pDGS/aNu8F33A/x0efDefdxpJ/9DWQTHbolQe5DJec8Cd5zF6QeOAvu/GfUTp5ceF9/IvpNZ/aXP0V1LMyctGzuS89d1d9yM4SMoHSagzK+EFv0RWmbaUd2ZZXOjbzo3PfVZ8EjxlyPQofF2GKeYiPYZZ8W39bVYVDRD35jwEiZNV/Xb0Qixl93BWhTbwc/hci9iYi5+8qNQjFGjzUq44tpHY1mGV2XzJN7zYlpPtdGsel8j/OegT1wb8imGqQeOh9IlMDabk/ER+ugDK33nq4mSsn4+zWjvPFg8H7fRfKkG9Qq33Lb0RBLXvPdsyP2SQ/gO/VH+ZXzNA44eqeLzFIg1FbtlEx/lb9bg2KmVp/dwXsMhLtqEVr+NDLHGINN3/4uhNxADwtGXhBcK+HhlTezVVQdan9COo+FFhxR5gzwtoTSrKB3yBldJeHFqNT+MLl9owHAhhcpVRAF3JH+MIcGgR3lYerWaPX0YzIqZmvMArKSKpDSoio5XetAHb7xxRCjA5OngYYhC6NE/IDzkTj2GrWQNF0xEGjx521kTBOKBm46EcUbAeOJNyO+7+lovf+ncOY8BmvnMUiefBN41+08RKMtjwJoqVPO8MQslThN/ygqUHUvZP59PZx5Uw3G3PbCk4OHqDhb7Hd4LhG7TjVD6xb9fwmufBjVzhfl4to+/OgnpDpjO899jzY7WDybzboHlfxq+X86CCgdeqz9knUomY4/lP1Lvz9IsCuUz6H3WiHY8Z0WfEujryA2VxDTwqwajtgiGV8IGGm/NDl4k1U6cCQwGVKYlIcPlw+vf9EhlA8furS83zCUnj8VrLQarfefDWunAxDf+0ehxmm5/Vg4H81E2S9ehfvpW0i/+Fe1wpeMuw2Ztx+A++mb2o3BeMuEBHWnpBolZz4MpBqQnnEzxOfvqhBgjMKRKUtw7qPmfef+yulcttRBNHwRWODNsz18C6F5Ho5ieKZ1sJBjqcGW8vqz4Nwzw3x7NTPdYPIKX0TU8t1ofC8DD1uD1T6MxSrVQrAfPO9bYNUFj1P5MX2D8kWsqH5Zi4E3xckkR3irBLL2cyNqQ35sygAqC5WbMSROuR3pJ3+hw4mprVVxZd22B+4D1nV7ZcBj5bQNkBz8adtk+Py3ltuPg/vRyx778+Ubz5JfcKzlH6fgPxaMEc9dR6fmzxndzrRmppoZrCRXOkZb7XrxQDGWE6VDwytvjfOIQEAnfTlHP8j1PJkU++WyiR1HoI49+Y0Do7yhb4mTBVmptUj9ZT6RiWcaX1zSBRnAGMqmEAn9MuXI+QuBd+qL2N6nI/381bCHnYjS8fcoVkeg5Lz7BFLTLtfmTRLjyMjgR+GhkdSRiDx+OUmUVaPDi5i9UeUvhFi5vavmfA8tH1HSRg+aLgOh0WQ2cqTBDWlUgTO5SxlO04GwZu4aK4ZqJuKFQLUdRtTGbd/xOCiHiooSnEgTRtgQEhdoIL9Z1QFaHsFVeftRf1QjFuk9o5DF9EyKAXtxPGkskFqAouwkCJRpF1aVMmw5C6d7W0U3aqDohzdhvvjAaCu2yLUPY0IDo7JKk7/mpqKP1yycs8X1aB3W7dL1/pkRm1C5wq9satG+VAFar+m1vw02wxHKzVN93J12h6juDN7UCL58MVgTiQHGwAhNDDMsj/+YjsRMrDEkSmc0Y2yrooUE87YEhsKCvOeKpAaSACNLaawEvKKH2gusDCJkfS0AfoXwJupkWIi1RjtBY4tmeUEZjUEdGt8+WQsxKd1KodPjvIzz5kYAbsaREb5jut/aClC07kmLvl5PBCDoiUeBGO31kgeIXnVCTK/QPG1v3hbtrzZHsdniOaaYl5c/sEJKzvDxaiH+71Ok0O4ZjwkZB05pQ60uQ6QkoaHhA1cUZMwxFTX6mnOh0DgvNFfMNizWbH6VPOcGtDYzaGD0wJGs7krHaACjP9iCAhs5hQoeLoHFIQQThycvX6WtkF/x51sBRqpD5g+97hISP6XGFD37wdljn1zVhID14VzwZfoAJhPY2upInzH6ojQFkWAeMAYJFZtFHen5jjR+W7O0vRlcKP3QCPceaKsORXu0HQbV7vIRKZw3C0K7morm7TVu4HiaS0tH7MpRSK3jy2evHWn6dp8phDBFXsp/tI2p4gN+gZhZ/ltRcA4t+iZItlcJ1fdt9KU5NqLjpNgYb29cRt9r73lflG4hpsgDxmgpUZopcPSt0ib2hbiP0Q7RvlDqacYeif/6i1Pba65Nvf+tAWPT/3XvEUvyBeT4LZNlWq/TpTvcgYOB0jJVH+v9WeDL29zSGKp3IEordx2pwo75wNheX0bHUxSQ/d+FxlZHMLWtMekDf1vMpth4b69eZrmLMQF1XWVOu4C8H74hQiWQO6XP45TaUZ+e9Qvti9SBf5oBfjkiGGY79K6y49DqaJBKz0Ibqlu08MYKWbQN2hjd6p22Ot1IP1eTcII5K6wpFhqJdnR2bQwwFpjpHV0nOzpWollsypgnUbq1hcM2gJHHmLcl0NsrHR34HZTZbQv1TjoztPSPNcs3Ffjae6+jXddeOht9X/62c2Vaxpa4UnYNtUcsDnfEAZBduyuLoPXOTLD1RgAMf39mgV5W4yuwSoeBcaML2MEXOsLDOphU6LGNSndTR7yZowdyoTnq6/iKjRLf7cQDRUVkzH/tVdwHV2U00yCrPXeIURieP/5uqejq5E+s9vLpyP0oEBbpgDb7JdpOHVaiGYy5DY1jR6qxuTxDRvLWZgJG2vHClI7Rimu2GPgxmsBoLp7FFizveQtoyDp8YMW1q8kv6Wv5fGvA2Hx5tzMtjn/QRgJzfKufsRjcAw4FKqqAbAbWay+CNdbled3ltR+NLwpUSzvjlPHFAcsa26C8JizEvtpadTsy/wq93xG86ggT9J8pNHcVczN1qF6PtsmiCrIh32iam/pRybc9SZlA0WQXxepWcCSb9TAy6kgbRvG9LWbcXnp590N0yQsGFzzkHQLVluRfTPlnFFrt1S8wNovN+I1qVzMf73sU3Iv1ayGmGF2bouKvn5ZmjB4okvElrv/5sRiVp5XXNu0x3mh9KZSjI3BxxbXrtPf81/D5VoBR/hY8k+k6Kyvk8KKdX1UNMeZw7XOXSYPNmw2+fKnh8qDfDDWavyVQnRwpINNuDhgLjYaCANEBqtAubTDQvhgKb2xnbhSF3NjEizwfHfX+Y+YsNl7VkWg6kHexBztax0LPFSlTB0qT5w9UrBgdLV6QZ97sMhvUG70daS+zEsXqXiidQqhVbJX1N+60lU575TDua8ZIbjqenjHhidHEGGmn6JexStPeIs4Wzt+wfo8Rd+IrC3oTrV6Hxs5X+VDTJVUHWbb1b0e07WAutx8IOdIwyqRagYZ68E8+BL6gwKXhUmmdl9DbXsmXMeOCF2CMAaLSl+jgLbocR0ZkdJkrsOypSwa78Db06kyDm5El3SxPG2kGluNIx+R7dURi0kfr3N5yba4+HahzUJz2qFlBW2sbM69Q3gX6L+d76aVl0J5wfxRwQ2m3zJvmutKhuRONqGO+ZI4hf9AXpXPGOI2CXHRs5bVfcfaQ1zTGBb9dyYruOzUpxthMjJGAkURpDouMLqRnJMqnfPN1gYJ1MpK9/lm4UygGheOIoytvqKN9jl/551thjM0/r35RCBwSuG8YSBV1ixO7DQV2HxbykmdPPw7W0qwNAJHO1g7etCPEA0Y6+6SDzWb2S+F4dW0v1x1hFOFncr/ChKcjKRWrlF/y/DSieYedSvIdqcPt4TuO+PmGW9Usf87ZN1w/cy4Xw1gzVf128RiY/spYjCxG38yvj48MujTR9tA1Ldxjha621WvF26TYiMj1b+F0275aCAML1ye/1n7KbY1Vc0NE/kiQ5EuD1iYtSivWGCfG6OkXaTugxxgDA5Y3IMwRQ76tCmw95NX5eH6vKkAPe6Pkr7X7f5m4i34rN8ye+EdIwSua669iY+5NfePA2PCziv0si7/qio7vZpc9egGDhgCdOgPNTWDTnyuMCurYFR2sVjNGB5y2zKnWNro5mEkFhoC/9Sg4klA/83GP/fDgnrfA4TH0qV+E4Z9PxYilT8D2z1cJXCgKyJN5oqPvh+kvlx4tM5/zv7crn3qVMV1FzLoGLVWorv5N754aeQbMRN1C/PshhPENB5EjH6M+qN6AjkYsVkkVCHgaKoc3IbRrR1SpaoBX0fhZHVhoCrWzaorotCsA737bh9rdbG+vfyPNG4Y+T7wIrQyFdBNmFGcvwbzjM83dRZF0g6YIPM/DiuGgqAXu5y0URh1VW+XGghKlPWBUbNEAxoAxlpVD7rob0LMPUFau31+zGuxVHdw37xPpRosR/5GHV93UoA812sSPfOxEq2G7Pp8B6McYFnGJn200MNKu2LVjBl8Bxn4CyL7dZywoo814HSkTGR2bL6qY4YKNDnZMmMt9Macmv7M8uVStJN7ECzCPnhF0DKYEhTxS4JjRJ/aZm5t0dv6JKvqXz14KSR76nsSTw6/B2zuMC1WzqmUVjpp3NYau0FGh/dTCGw8NB2gDdHLP5FxhwvPGZzFmljmeZVsUXVoi49D5zbnJmnPtzokq+m5OwR+wIH81VuZgcxIauzz0i8Lz2CHlhzq+SfW5vq7/MrjSu0fXKLykMjoztadFvxN+V8UG8zaEUBGD5veu5drULLpn96ZgNPosOKXX1LvDJJ0RoL8zhbbaI1I9R9cBLumMWf+7vk42ALquvkum0qB3PViMUBlzDSkw6HNjKddXuUnmj6Yw7JutnQtgEu13nz371/2ezrmPm3n74zyXSi4YRM79KuBgxujNjZXoBlpznIWFXHPkewOGROkoY/R8GHsD+/wAABucSURBVFUUPPI6OHEcUKLPIwo+ixYA71LovSJqi9woUWW2OWaVrmrYh44t6AgGFXqmftYECh31YHCP4bmNBsa1Y4dMkcBJfiKJDOtc/foH7cfKAlB7QenRMfCpjg6YnQdI5n5LP/1CBTTX7CiwqR1SZJH29ktzP0hBCIAjPhFmAMzIObf+dP37mIfRlOiC9RXbwaXzgI3P7sufwwmzL0PSMYIGm2gbraxZljAa6g0i5pY5owH8r7YlUZIQZJlDayp0YLkKpapOryegAhw6WUEyRsZ/VzCWVYGzGMvScdCS0z04YCwrmHrWEf67HA4kpcOFpANS6Oh6AkDun3ziez4GJ0To4328+cppFkU6L1Qvg1/Qa9625LxQAR1acY2+iIroqkjGGhME3aLzuCRhKEG3Bk9IySm8AZNCOQ1JAZtLWLQzmUnYELC4pO+SwhPFoP/SM+o3h9SnmUgZk3SN4o8JWAS8+tBvLSVFu98HAX8BC4edCW1Nymd3+fipr5htHx2Lhd6JElx/Yvlp5es4cjhSYPs76RhbmizYcdIvMs8iTTtY9QmByir9vcOB3n1Cc0k+Ow1s/froxq/gGbN/6Ts1rhDih1V3ND+8KcAo559f3tgS/1ACfkEcbmH3jQLGNQcPPh6CPeG12Ycc7JLuMz54oSMFkhNR0pQqf8+VcpdgNSgACgUVgtFOLvSeVyi9dVRvC6SAtQoYTZSN0kNTtDAzD6homEc6PIHPuo3AGzudjoV9Dg50n10al+K0189Bz/qP2m8OXxqKgDUxKwZGgOaCSYpImiHwAkNGgGckZMayZLLKcreXHM11sP+bgUX7RDPCoueYSyDImHRIzUrbplQoNg6a6WFG5iMOU+cwqXv6EpEm9Vtdo3vK95o8U9TZPSpJdd3rBvVXNavnjmi+5z/nNwpBrHnNZIfRhgu3vE4/UMDkwW74bfKAiUYeFN47/nUCRg+RVU/4bpT0HD2j/qqDlbyFnMDUg5zgvtbSqKWDnvU4sGKcHqMlMLWYgC0JVIWkqItxLhBnAjEpBJ0NmGASCehTNeNcihiBrQQSBL5Mg2oArCFcizZStBGD8d3+sGz7iY1LyAdGHxR1dDfPj9H3U917HyCbBdatA0jlVVoKLPaCb5vspxDJMOa0zbC0Nd28e7fJ2Og90w2zJt4pIc8ykPeqqj0n/W6jgHH12CFEMY9gwPPdEqnj2AuL24rpFWrn+rNLf8OA39OsjwzhQPGthVb/E9m4X2ANKdRVKh4jBWAmcZrgROrjU/XHTD0navqiRTh3X+AsZoZhWNp1OJ4cdS3WVO2sUo87zThh1qXY4/NnNbL48CIgWZKtI320YCwNsLS00CoZUi7jadholUBGcmJujBidQ/GiiZ35sQY0sAn0yKaPtaQsXReLT81YVoMXkUmLutSSHqPzJqpQXE+zNw10mv7RZJacUWPpe/4z6j0tDWnA01oHDZ7+tZwUl2tQxbsM8KUSEcE0G9UvQ0hSz+lh1LMeYG8sUwyNqQhomkCn2sADPaYDIPpDgwRq4ssKgujQQ2/I+HIitVYAlKo1KLShHlZ+7RmtbNRaOuiPar3gPXVqLEG757/uxaZQ95nWClCHqzw8xqrst8RSIYidyhiXMsEEkkyKJHNRYgkkpZRJLmWJbJX9KdyiytyD5lwFw+ojv9JRBUtunvhVy7VsWJTOCdO5J3OGHOF6xhdijN4/Yosq5okPjF7SbUNuIRkgjCBaXyKvq7yr9bIIuLT5s37Wxb8G2NXGQ29Ujlx5IGOPuxsFjGvGDFnLGLrEhLNjp5kfLu1oIRrPiA9iFp+VldB7/Tbp0/6K5QORYoykY8ySHESEK9fdZtaFiCjdN3MK5eqHCvRC+pEaK4Mknh3xa8wdmgsvtseiKRjzn+tQ0lqraQjN/Z1j9yLGUwQy68p3Kuve/EmTJhpCcpoPNJ3ImOfp3bgHWEpbpvV4ssJJ71LlusfV27HJTZa1wtPzqbWAJAoveoTS21GaaocfAZQPah7AabDTQMaZSz7xckPlrmUPDf7bOQctvfHRoeueXk7vkXJbPavCxitKqQBSKXO4vu9SUCB/xvjPqUb0LBIUstG7bxn3Ff7471Ei3kd/s9RpBRszTOhAP/N5oldueNYH91XN1X1trfF/e3VkLleHNyjAI9BS36mzci2pAFA/o6LvUsQ3RpK2pQBTarDTayp1sgJDyodkdQW66h61jMUYl8wR4MpQS897ek71vgZogliS8VVa6rr3jA+uTLCY/DhzjmKlvjHIDzfJPUUqFc4LY0lo68Uh1opYb6dRVKKOEreO9kk2zZBJaaOLb3ghl2S180XHPw6oTi5NM/eOdr/uVovJtHDdfarvyc5tr4xS/taun1X/R8bwS0Pp8BG33f0rht2idtNsHDCOHUKHEn/aY8YHHQ4ZJk9EvKE8/qoA2ysnc0UUq1Hx1kSnQqgW7T2/JbwDi7QBRusa1bZC5oVlUs95Da7S0AnpPdakqyC2SX+9397ZUvq+vmakoL772+AW7XQEnj/oWqQT+iD6ZKoOw+Y/gt0Wv4AeNYsE286etLz7qOTbA04btrjb6BGjP7nxsX0+u2uRMhkxRpFGKWsFaASQJP4qwCMxWDJlT+qdbbnEYWzeukTiX8rsQUyPnieW6AGpAlHJSFkm6JvUpgR11f+uAM8DRmoZx7Jw28iXftMQ7zWcSTc7aMOLt5308c/+TXilwMsDKfW+B2gK2ChXPz6SoANJlQtFbkT7z3MPTP1QkfSO953AMhxBMjesbbI6ej/NwxjMgU/66uhE8J91BRi9T799TWxagJn3FVgLMFdIRmV3XeoC/WE+2HrMkNLzQdTi9A79ttSSRGBqS+8aMU+PUVIa5IFhWSo6GCdIVODnSjpFlERzbkmLCSa5YpuOBk0Swwm7lDFIU1Ddk3RPA6syJtEt6m7pIGEtzVzu6TZzZ197veF3ivJz9XXYEezRyK1BS8Xp9b4zLpVTNt1XbLZAfGCzD2ieNDfQ6sKU+ExitHbVocp6+kWz13wdfyEcCDqjDWOM9z4H/tvQlN6n3+PwTpMrDJH1syY8Rqaf4K7EJzHGDyoddUOw93qjgHH1mCGLOLC++yvz928Plf37tT+J/55x/IYOVwuAxHdmLbIomKuUD0SFvGECNud9UX+IzamtgdqfUekaSX5R2OOdc+Qw7c7jgV14t4ZWAPqBW4N+8VvK+xvs9PJ/A2go74nnxlyLxQNGh5pHhWZQTDCn9ko6jWsunrnPry3XcTgnzkZ6QEYSSMAg9TUlXYlymdmx0nEuWZOIn5/lzLE0eGrA84Dvk96Hdtll3YtrbQ+k6D49p80KZEohxSXtGtBgR3/p923DX/5VTbzvsVTomGj9+IhPr75kZN1Ta+i3gywVSHWJ7ernY2TXNT5kdTA3XobuW/khZ0LPuvnM0NcKk/Uia9i5VLoZIEumJe8T5KUKlitUNmU8Q+n4t/1n6Lx6Lx3KIks2de+TFWDqMTrNlMCR8rT0NdqUwATNco91kgnLLwsBsaWBVz8H5nDJYtqur8BTid2UJgGra3HvpIHgGgEkKVGUSOyCu0zqZyg9BgJPrhwS6LuUlgJaYXHhyJLYisxNkkptgqH/3R/kAUKaSmddgdA88Pex+xMwoBSeyT4ATg2WCjg1+IPYoioggSKBIQGjJ0YrWuwFGgmxUcM7KIotUTwohj1KGcHl9dX3ZH/RFj7J9y/r1JROnS8kjmMMq1wbP+r03Ul15jsbBYxrxg6+k2xJPWbM92Kqtw2PG35of8+22LOOgDrmJzSbom5vCjULMEn/utFBeRY3490cu/NZo+fTqEDSi1Sv5FWv7N4qpWUq739B6ED9UACSBggGZaBONtQgBJif9dkHb3znLHzaZz8IP+S/l50t0mu7NS15+ZCPr31mQO27tcRpCbwc4UrLUjpFQeOLmI4StMBElkH2TbdOdCwsqk2WPgtXAx39s+k+gJk7/GyHFC+3f7DkqkXSAk0ZGXc0YKnfHgBJi6nrpByOW5DXj/jPFQ3xnqdR8eKyZeapSy64eOem15tM5XHCZjLlX/AOpUiQzdr/JIFkDLI1BSTt8HV1LcbU8Tv0DDlntJAY29rquInCLhZEUIjAm6PLShPpKyN0Co1ZRq3gfYg+0VeiCyXeX5YFS9LZONGh6j9E17OS0X16znyQ2eG8MmlweiZtaxClpiCPMDVGfFW2C0bvBddtSQDHFAgToFkaGDUYx4xrksG/t7LHWNaaPDnbecM1TufGLwgYHQJJR/IYPaP1iJyAkyiYSyCZlqUla9NTpEQ8b1umyRBDQYINQIwCZh6g5vSH1MOv7nUJRvz3PpS2bvAS0fNHhQTzWKFmiNroooFT6x8UgG0M8kTBw3w3gpqW0pCIEzo96E5rG53avrsxxcOaMYP3BWOvS5sP7fni+/PbSrruVOzALfutrIvuPqaZUnHBkHLG7jU/bYU5eahaPGcFjL7oS6xRue94Ry6TPKpYYthXJADFAmwwaCDtHOf1fg5D1WDwixN5P2uXYE3nndGa7Cw+Hjj60qrWxYtHLpvyBTFAy4bIusTamAKtWIyipGUVoMU8NihdNe0lTaS+TnrKChsnu3bCIWAjgJMeCMks5F9Hz/nrOfOO+FWXzNqsjwxKXZ9lssR7rhlAaYxJ9TcO9feGnV6/qCXW5bK4aH7gwiWHX97FWRoo/GQcsjwJKTOQDSTzpyFLyY3H+2Rb4TZ31uA2cANcDIbEib5xO2/h6ajSaJPHc6FjyfEY+OLVsJMOeIyAxAfRJrBupWA1JWANLng1gLo6fb5fUIAqgHnMk5M7bOTTnAYrBzkmA82kyi4H+Q4wNBOE608L+QrEJeMecLY6GlRpgaAYJ6VxsJQjWToGVuKClSzvcyRrLbkWahWQNbKq4YzmLms/JLAlIM4yybNZcALYhB1j/neWFaWJdZkZkqzbxuQJ1Fc+MSkCgGqO+tvO6BkFoDkUNcH23UGn4vkD/4B95/4NY9/8c7ASBrxCsUmyQHvH5xAYWp5u0TtRN9qYphTtz/eQ378xx5Q6IDy8cj3DyLcKtdmss2/XKSBV1SZ9NgoYKYe1Y4e8CIaa7i/PP6VYjqtORLfSGJ/pSDYoqLDBqtR7oZbwfCV8tZ/RsXmWk+hqYbLMYJXzwJEU/8pQ4jl8EyB6orYyisg4Ym4vMJRA8Do49uqANKoiFANKowzR4Cn6t7E7QQE7c5vL+V4yzuticQgCKwK1uIAgpiLJM86CTNIZ7zaTIgNJrCpZwoRIM9lLNu1puTi4pqriavJHKEtByjiTFOO8ItEgp+xyz4CPq0bfd8Vr2x9YlYAkp9LqZI651dDvUv2b1vfOLZC0XIkWSNEMefegx3ocvvCkNT0qIft28t4j09poOGxMDgg3aYRtwS+RYWPxzxC3O+dA0a4CsxrCIMnLwKgd/aquawLr4f2gezWtYJ1LIOkvnX9Y1wryRVAjhZeCNabBqlClQDW2rO8vmMsvzzWbXO12qxmbqmioYXEwAtbyOJTvAgFrmktO7NgSoqykxn1Pu/gYjR5gm/7iy0DGj9DX4BkjDQLM1kQ1VncehLcHn44Ptz9UZdB9w4c47/HDQqKgr3P3nbiVvtJnkL6Bx2eMJiaYUldUujTHUPSd6Pjy9Y1MLnFSYv9uT2HVpgzBjQbGdWN230VAvMcYO637jA8eL5Rp3SnsSRfsuA5FWtmUUrfzjm+dVuzQY4+kdyRuoxmlbl07vSOYzC2wbuJzSN4cBkQTBA2wDAFn9LrPcv3JwZBNlcQGpWKx+pJSJmRKg1pZBRfEUirjdVIkIKtLIDes1y917ge5dh3glkLuWo8rHeCJmnIolu5UhrUS13xnye8E7GGXvTLgyHRnyMEAFiwEUp0gh/eCfHwhZLdBtN0IAlfpU1a+hmb/n0nSJyzeeVwMvwPDwgijHJT7PVOtMcCcVWAUTmpBLRgG6eZK1ITfsxvBSpcNIWdlpfNVHy4fkXssUL52vAWsphzM8sC1IQNWjWpkRLqsc0v6EylREurcEMAV6CKfTNAtg00GPz0gmnzow/i0dy6gS2mqBmc+cyK61S1WcykXvIQMODpwr69L9A06PmhGycTXNXAsJmd2elSO2ZT0NxoYKZO1Y4eeLiFvZVwc1v2lhfqAY+Oz4URcyRi7SslY5smQHruLxppV/WGIy37DmWKAfz94zPui/pisUeXpxcnzxWpKyDsFU62IVCa3AjzVP1RuaddDJlfoa9oRTRt7DVk5d2qeN4qiwOmnaFy3ORYtT8qR2RLIHmWQTi2kU5EDp/RqSAIxerXxY0iaRDMPzBVt3y/wQKw3cifeX+V7LepynvnUso/AsGDysf1zk2lTRsO2d76xFigo9nsjr/bgoYOzQr5vFMa17MyQLpmPCYUwZ2cNpslasERP/Z3GUB+wN7MSOpRfCB1zkysqhkafDc05rwD0zufdR+DOI55UV8pa1+P0F09Drw2eNi0kDXoqJ0/fqOaOZ2wJVGL+6Yv+tI+gUO5YHC8tE7wjPeTPf/XXn5IeaxSQ13d7DG0aYop1+CYBIyW2ZuyQ3wH4OYCf9Jgxf6qZQe0xqJZxzIRk3/GP9NA+w74C10DBApYU9VxQUx8BTZ7j93rOzh9OO6oj0SuaYoq+8THVByxLmiX6CCC5BojVEWLmUNoExADho02pfcT88EjaNU+XmQaCzdHsuji+8xD8+/GFYCcOgsRVADXe7/KHbx6Tk+ehk+vg9/ZduKhQJ/7kqRU720x8BMamTj6m33Hf2MzeltHX2gJrxw5ZLoG+QSZMXt3j5QVXmplGwXXdcdg/buFZR6IiEJl9pAvp78OGFOM83WDs5nlqQOLB0XcikW3CoXOvQ0XLGm/06kmiR32uRFqjpOenvu7r6M0a5EzRsrknZKoLwLNg8QawkvXKouWtFQHSezOr6L5ZJaVrr5IPbVvuX/kIPBls47prk4FRgeOYIbcBOE8yXNNDzP8dm5nTR607ChU8jjMZMCKI4rBxZdvkp42AyH6P+b3n15e5dbseL6VNqmCHlS3/J4vXu8qpWrvA5FTw+iySnGomNwpC5TOh3hsT5DG0hkvc3eVJLNjUyjhn4xjCWPsuhBYfP70zpi07g0lMBvDS5GP7H7Kp+Wx7b/NqgTVjhrwFhr38UjHgje4z5u/XXinXHYVdEMNPLaB3ofhV5txgMUXlgp040WGvniXPeXJkJP9JY0ulvzVSbRNVPmOhkpGXrN4PRN60yoEu9/GO7VYX1C4kmoQ1u54opXEYNs/CLl85h8WaOrDH1khcO5z8lzv4x/+3d7WxTZVR+Dn9WBk4BjLWDdmmyBC2zg9C4g+/YIUpxAxKVIjGIKUgiBKJP4zEECDRxBh/kCEJbN0w/jAGYkdggsC6KUJUVJB1w8wfaiewdW5B0cDW9R7z9mN00G39uGs3ec/P3vOec97nNufe956vybUYkIIzHHY3uexY2G/l7VxQvFkheh+MCwro1dyGpi8Tkzjyqz0Lix5lRXMy4ON4V46zOeLb2MhbMryGXht2XmNsz7RDxFBuIWutexcYGwH8WG3JH7Qj+vCaJMdoQsBjNp1lxoNhNnUbnS4Ru/nfUffCGZm9yngHAY+H5eKLfV7TMy+6s6H5VLI3ndAbY8hYj7n4KWaqgnhKEY4R086pzqajo/Ej/y+LZxom9o5rBAefxoQyY73reLKBj1afdy0+01di0COytdZ9HAzRzaKz2pLnT42SNLYR4Geh9XSZPARkMOMKCK1E+Cq73rVlbO9saOuDgd1dIPF/7qeuNEU3b3LjuahLkNXASBXHKAzxzC+6gzUa0ZVikz/7HvwbgQ5B4c97DPgu74vmiG88Yi0XFaW1G1GY29AS95EzGjDaF5aUaBSuYKA/tKFVaE5WY9PP0axPNg/bMKeP8LK+Eq8PpntNrdvFjGJxbJmQNn5SxZIpIuVQkkRgTCIgSiH/LDV9qADrb2yATxqdzeJtMmmkmmMMWdxuLplB4PVgrAaQFfqdwJdEWhgBfzHoKqCkgWkSCCLl6z4Rp0g36HMyjpwdkZGIHWbTWQw8mgjT/s02XJ8SS5egpN0ZkcxrwzZinNHZMUjLcsBa2+YGc57/AUPaR2qW3XU6mTZKXRIBtREQzrGz1HSCgfBUm+U3B3nV1hsuT3XHGBL+6/y7x2VQxpNM/JgCiNrqB4JVVAP3w+gE+DS0dMrX11szrbE1rijScCB1mIv3gGld2FNIYdZsyGlo2jvc2lRcF8cpbyZa9T24nz4WtRSRyepwi5TIQOcK0KZqS15FKuyVOiUCaiLQZS4u6lPIFQrcMqEup971tJo6hpI1Yo4xktKuxTMn9vWMm8qKL12rV7qv6HxdhTH0dEwEFM8Ck5UJ9qAD+VYL2pLlPO9MROZIru2x4RkwrAY7lgylx+po2wZQAUi5zhpNXU359MMjaZeULREIIbC61r0CjPVareatqvLp38SDzKX5s7J02rSlYCXdpyiHc8PaGd4UgOoyOl39J9B4dMWyJqmOMRbD1ObtNM+exay1KMyNOQ0twaESamtRRx6/BoP3Gs4zY7vBjrhatqtjiZQiERgcAavDLYZQlfm/4hB9YF+WJ/obRk2dpXPm+qA5RoFKSXHiqTc6m/oDL+1m0xlizAtc47+NzubMqIUnyHjbOMYEcUrq8l4b9hBhpY6QS3v9zWgkSQRGHQJWh1t89vI7NQKO2y35wklGTZ5SU2N4IJSAq41TXJOf2w9fMFAqar8DrTQZJ4wNrqTl6UrHGPVtTA6jdy22M2MrAe/oq/B2crRKLRKB2BGwOtzioS16WAi6XG3JnxaLlI5Sk+iJ4m9PxODNOsKp9sv8U3YWilmnEbOlZgTliT7nZVn1TSdikZ8Ir3SMiaCn4lp+ERO8BohKolUEdOv6cC/tiz9zX0XTpCiJQEQErI62VoALQxcV+B7aZ7nnXLRweUpNFxiY7XeMGlomBjURaVcCLKaQ3hh/ybzV2NAcPpslWhVx80nHGDd06izkddB7FYiB1TsAFPilEjamVWK3OhqkFInAyCCw5qB7NyvYECbdXm3Jt0WrLdiMpmYI/otEeCO73vVptDLV4pOOUS0kY5TjXYs3WfGXfC0CBb7TBOmTtCo8H6M4yS4RSDoCLx1qK9T4+Dw40Pzc39Bcy3M/Ki+IulCjw1zygsh7DpY/iubevzPoay376to7cMTU0hI+CSNpe5SOMWlQD1TktaGOcUsqzg/6HjwxVN5iisyVaiUCERFYc/CPVayw3T9AQxDzgerlBTcGTY1R3KRjTNGN67NhnQLsCakn4KguHSuoArKkL0X3RKqNDwGrw11GoPcU4gM1S/Pe7R+dG5+4UbFKOsYU3QZ+BTneXlxk4DIBO/RVqByNTTdSBI9UKxFIKQLSMaYQ/t7VeFj/D76n/ZGn5aXQNKlaInBbI/Af7NFDa4Ye3CIAAAAASUVORK5CYII="},16722:function(qt,Dt,be){"use strict";be.d(Dt,{Z:function(){return ee}});const ce=ne=>typeof ne=="object"&&ne!=null&&ne.nodeType===1,ie=(ne,E)=>(!E||ne!=="hidden")&&ne!=="visible"&&ne!=="clip",Ce=(ne,E)=>{if(ne.clientHeight<ne.scrollHeight||ne.clientWidth<ne.scrollWidth){const b=getComputedStyle(ne,null);return ie(b.overflowY,E)||ie(b.overflowX,E)||(z=>{const x=(re=>{if(!re.ownerDocument||!re.ownerDocument.defaultView)return null;try{return re.ownerDocument.defaultView.frameElement}catch(ae){return null}})(z);return!!x&&(x.clientHeight<z.scrollHeight||x.clientWidth<z.scrollWidth)})(ne)}return!1},ue=(ne,E,b,z,x,re,ae,oe)=>re<ne&&ae>E||re>ne&&ae<E?0:re<=ne&&oe<=b||ae>=E&&oe>=b?re-ne-z:ae>E&&oe<b||re<ne&&oe>b?ae-E+x:0,se=ne=>{const E=ne.parentElement;return E==null?ne.getRootNode().host||null:E},te=(ne,E)=>{var b,z,x,re;if(typeof document=="undefined")return[];const{scrollMode:ae,block:oe,inline:ve,boundary:ye,skipOverflowHiddenElements:me}=E,ge=typeof ye=="function"?ye:nt=>nt!==ye;if(!ce(ne))throw new TypeError("Invalid target");const _e=document.scrollingElement||document.documentElement,he=[];let pe=ne;for(;ce(pe)&&ge(pe);){if(pe=se(pe),pe===_e){he.push(pe);break}pe!=null&&pe===document.body&&Ce(pe)&&!Ce(document.documentElement)||pe!=null&&Ce(pe,me)&&he.push(pe)}const ke=(z=(b=window.visualViewport)==null?void 0:b.width)!=null?z:innerWidth,Te=(re=(x=window.visualViewport)==null?void 0:x.height)!=null?re:innerHeight,{scrollX:Ee,scrollY:Oe}=window,{height:je,width:Pe,top:Qe,right:Xe,bottom:ot,left:He}=ne.getBoundingClientRect(),{top:rt,right:Ye,bottom:ut,left:Ge}=(nt=>{const et=window.getComputedStyle(nt);return{top:parseFloat(et.scrollMarginTop)||0,right:parseFloat(et.scrollMarginRight)||0,bottom:parseFloat(et.scrollMarginBottom)||0,left:parseFloat(et.scrollMarginLeft)||0}})(ne);let ze=oe==="start"||oe==="nearest"?Qe-rt:oe==="end"?ot+ut:Qe+je/2-rt+ut,Ve=ve==="center"?He+Pe/2-Ge+Ye:ve==="end"?Xe+Ye:He-Ge;const $e=[];for(let nt=0;nt<he.length;nt++){const et=he[nt],{height:pt,width:ct,top:It,right:dt,bottom:Mt,left:xt}=et.getBoundingClientRect();if(ae==="if-needed"&&Qe>=0&&He>=0&&ot<=Te&&Xe<=ke&&(et===_e&&!Ce(et)||Qe>=It&&ot<=Mt&&He>=xt&&Xe<=dt))return $e;const gt=getComputedStyle(et),_t=parseInt(gt.borderLeftWidth,10),We=parseInt(gt.borderTopWidth,10),Ae=parseInt(gt.borderRightWidth,10),Se=parseInt(gt.borderBottomWidth,10);let Be=0,Ke=0;const Ne="offsetWidth"in et?et.offsetWidth-et.clientWidth-_t-Ae:0,De="offsetHeight"in et?et.offsetHeight-et.clientHeight-We-Se:0,we="offsetWidth"in et?et.offsetWidth===0?0:ct/et.offsetWidth:0,Le="offsetHeight"in et?et.offsetHeight===0?0:pt/et.offsetHeight:0;if(_e===et)Be=oe==="start"?ze:oe==="end"?ze-Te:oe==="nearest"?ue(Oe,Oe+Te,Te,We,Se,Oe+ze,Oe+ze+je,je):ze-Te/2,Ke=ve==="start"?Ve:ve==="center"?Ve-ke/2:ve==="end"?Ve-ke:ue(Ee,Ee+ke,ke,_t,Ae,Ee+Ve,Ee+Ve+Pe,Pe),Be=Math.max(0,Be+Oe),Ke=Math.max(0,Ke+Ee);else{Be=oe==="start"?ze-It-We:oe==="end"?ze-Mt+Se+De:oe==="nearest"?ue(It,Mt,pt,We,Se+De,ze,ze+je,je):ze-(It+pt/2)+De/2,Ke=ve==="start"?Ve-xt-_t:ve==="center"?Ve-(xt+ct/2)+Ne/2:ve==="end"?Ve-dt+Ae+Ne:ue(xt,dt,ct,_t,Ae+Ne,Ve,Ve+Pe,Pe);const{scrollLeft:Ue,scrollTop:Me}=et;Be=Le===0?0:Math.max(0,Math.min(Me+Be/Le,et.scrollHeight-pt/Le+De)),Ke=we===0?0:Math.max(0,Math.min(Ue+Ke/we,et.scrollWidth-ct/we+Ne)),ze+=Me-Be,Ve+=Ue-Ke}$e.push({el:et,top:Be,left:Ke})}return $e},le=ne=>ne===!1?{block:"end",inline:"nearest"}:(E=>E===Object(E)&&Object.keys(E).length!==0)(ne)?ne:{block:"start",inline:"nearest"};function ee(ne,E){if(!ne.isConnected||!(x=>{let re=x;for(;re&&re.parentNode;){if(re.parentNode===document)return!0;re=re.parentNode instanceof ShadowRoot?re.parentNode.host:re.parentNode}return!1})(ne))return;const b=(x=>{const re=window.getComputedStyle(x);return{top:parseFloat(re.scrollMarginTop)||0,right:parseFloat(re.scrollMarginRight)||0,bottom:parseFloat(re.scrollMarginBottom)||0,left:parseFloat(re.scrollMarginLeft)||0}})(ne);if((x=>typeof x=="object"&&typeof x.behavior=="function")(E))return E.behavior(te(ne,E));const z=typeof E=="boolean"||E==null?void 0:E.behavior;for(const{el:x,top:re,left:ae}of te(ne,le(E))){const oe=re-b.top+b.bottom,ve=ae-b.left+b.right;x.scroll({top:oe,left:ve,behavior:z})}}}}]);
|